aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-20 19:13:02 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-20 19:13:02 -0500
commitec513b16c480c6cdda1e3d597e611eafca05227b (patch)
treeba8855093dbf4ca15f864947d947d65fdfa2a76d
parentbcee63488ece9a0fca8be19951428a7b41001e66 (diff)
parent2fc5a7dace3c43e62402ab4e8800a8f1834ffe2a (diff)
Merge tag 'usb-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB updates from Greg KH: "Here's the big USB pull request for 3.14-rc1 Lots of little things all over the place, and the usual USB gadget updates, and XHCI fixes (some for an issue reported by a lot of people). USB PHY updates as well as chipidea updates and fixes. All of these have been in the linux-next tree with no reported issues" * tag 'usb-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (318 commits) usb: chipidea: udc: using MultO at TD as real mult value for ISO-TX usb: chipidea: need to mask INT_STATUS when write otgsc usb: chipidea: put hw_phymode_configure before ci_usb_phy_init usb: chipidea: Fix Internal error: : 808 [#1] ARM related to STS flag usb: chipidea: imx: set CI_HDRC_IMX28_WRITE_FIX for imx28 usb: chipidea: add freescale imx28 special write register method usb: ehci: add freescale imx28 special write register method usb: core: check for valid id_table when using the RefId feature usb: cdc-wdm: resp_count can be 0 even if WDM_READ is set usb: core: bail out if user gives an unknown RefId when using new_id usb: core: allow a reference device for new_id usb: core: add sanity checks when using bInterfaceClass with new_id USB: image: correct spelling mistake in comment USB: c67x00: correct spelling mistakes in comments usb: delete non-required instances of include <linux/init.h> usb:hub set hub->change_bits when over-current happens Revert "usb: chipidea: imx: set CI_HDRC_IMX28_WRITE_FIX for imx28" xhci: Set scatter-gather limit to avoid failed block writes. xhci: Avoid infinite loop when sg urb requires too many trbs usb: gadget: remove unused variable in gr_queue_int() ...
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-ffs9
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-loopback8
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-sourcesink12
-rw-r--r--Documentation/ABI/testing/sysfs-bus-usb10
-rw-r--r--Documentation/ABI/testing/sysfs-platform-tahvo-usb16
-rw-r--r--Documentation/devicetree/bindings/phy/bcm-phy.txt15
-rw-r--r--Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt (renamed from Documentation/devicetree/bindings/usb/ci13xxx-imx.txt)0
-rw-r--r--Documentation/devicetree/bindings/usb/dwc2.txt12
-rw-r--r--Documentation/devicetree/bindings/usb/gr-udc.txt28
-rw-r--r--Documentation/devicetree/bindings/usb/omap-usb.txt2
-rw-r--r--arch/arm/mach-omap1/include/mach/usb.h38
-rw-r--r--drivers/phy/Kconfig6
-rw-r--r--drivers/phy/Makefile1
-rw-r--r--drivers/phy/phy-bcm-kona-usb2.c158
-rw-r--r--drivers/staging/octeon-usb/octeon-hcd.c1
-rw-r--r--drivers/staging/ozwpan/ozhcd.c2
-rw-r--r--drivers/usb/Kconfig4
-rw-r--r--drivers/usb/atm/cxacru.c1
-rw-r--r--drivers/usb/atm/speedtch.c1
-rw-r--r--drivers/usb/atm/ueagle-atm.c1
-rw-r--r--drivers/usb/atm/usbatm.c8
-rw-r--r--drivers/usb/c67x00/Makefile2
-rw-r--r--drivers/usb/c67x00/c67x00-hcd.c2
-rw-r--r--drivers/usb/c67x00/c67x00-hcd.h2
-rw-r--r--drivers/usb/c67x00/c67x00-ll-hpi.c14
-rw-r--r--drivers/usb/c67x00/c67x00-sched.c33
-rw-r--r--drivers/usb/chipidea/Makefile2
-rw-r--r--drivers/usb/chipidea/ci.h89
-rw-r--r--drivers/usb/chipidea/ci_hdrc_imx.c32
-rw-r--r--drivers/usb/chipidea/ci_hdrc_imx.h5
-rw-r--r--drivers/usb/chipidea/ci_hdrc_pci.c2
-rw-r--r--drivers/usb/chipidea/core.c105
-rw-r--r--drivers/usb/chipidea/host.c1
-rw-r--r--drivers/usb/chipidea/otg.h6
-rw-r--r--drivers/usb/chipidea/udc.c23
-rw-r--r--drivers/usb/chipidea/usbmisc_imx.c46
-rw-r--r--drivers/usb/class/cdc-acm.c116
-rw-r--r--drivers/usb/class/cdc-acm.h3
-rw-r--r--drivers/usb/class/cdc-wdm.c70
-rw-r--r--drivers/usb/class/usblp.c1
-rw-r--r--drivers/usb/class/usbtmc.c1
-rw-r--r--drivers/usb/core/Makefile2
-rw-r--r--drivers/usb/core/buffer.c2
-rw-r--r--drivers/usb/core/config.c8
-rw-r--r--drivers/usb/core/devio.c2
-rw-r--r--drivers/usb/core/driver.c33
-rw-r--r--drivers/usb/core/hcd-pci.c1
-rw-r--r--drivers/usb/core/hcd.c40
-rw-r--r--drivers/usb/core/hub.c116
-rw-r--r--drivers/usb/core/hub.h2
-rw-r--r--drivers/usb/core/message.c5
-rw-r--r--drivers/usb/core/quirks.c3
-rw-r--r--drivers/usb/core/sysfs.c2
-rw-r--r--drivers/usb/core/urb.c25
-rw-r--r--drivers/usb/core/usb-acpi.c2
-rw-r--r--drivers/usb/dwc2/hcd.c2
-rw-r--r--drivers/usb/dwc3/Kconfig7
-rw-r--r--drivers/usb/dwc3/Makefile1
-rw-r--r--drivers/usb/dwc3/dwc3-exynos.c1
-rw-r--r--drivers/usb/dwc3/dwc3-keystone.c202
-rw-r--r--drivers/usb/dwc3/dwc3-omap.c12
-rw-r--r--drivers/usb/dwc3/dwc3-pci.c3
-rw-r--r--drivers/usb/dwc3/gadget.c10
-rw-r--r--drivers/usb/gadget/Kconfig54
-rw-r--r--drivers/usb/gadget/Makefile9
-rw-r--r--drivers/usb/gadget/acm_ms.c2
-rw-r--r--drivers/usb/gadget/amd5536udc.c18
-rw-r--r--drivers/usb/gadget/at91_udc.c17
-rw-r--r--drivers/usb/gadget/atmel_usba_udc.c71
-rw-r--r--drivers/usb/gadget/bcm63xx_udc.c5
-rw-r--r--drivers/usb/gadget/composite.c18
-rw-r--r--drivers/usb/gadget/configfs.c8
-rw-r--r--drivers/usb/gadget/dummy_hcd.c2
-rw-r--r--drivers/usb/gadget/epautoconf.c9
-rw-r--r--drivers/usb/gadget/f_ecm.c73
-rw-r--r--drivers/usb/gadget/f_fs.c1012
-rw-r--r--drivers/usb/gadget/f_hid.c18
-rw-r--r--drivers/usb/gadget/f_loopback.c144
-rw-r--r--drivers/usb/gadget/f_midi.c22
-rw-r--r--drivers/usb/gadget/f_ncm.c2
-rw-r--r--drivers/usb/gadget/f_obex.c2
-rw-r--r--drivers/usb/gadget/f_phonet.c2
-rw-r--r--drivers/usb/gadget/f_rndis.c94
-rw-r--r--drivers/usb/gadget/f_serial.c2
-rw-r--r--drivers/usb/gadget/f_sourcesink.c349
-rw-r--r--drivers/usb/gadget/f_subset.c60
-rw-r--r--drivers/usb/gadget/fotg210-udc.c3
-rw-r--r--drivers/usb/gadget/fsl_qe_udc.c5
-rw-r--r--drivers/usb/gadget/fsl_udc_core.c7
-rw-r--r--drivers/usb/gadget/fusb300_udc.c4
-rw-r--r--drivers/usb/gadget/g_ffs.c466
-rw-r--r--drivers/usb/gadget/g_zero.h24
-rw-r--r--drivers/usb/gadget/goku_udc.c17
-rw-r--r--drivers/usb/gadget/gr_udc.c2238
-rw-r--r--drivers/usb/gadget/gr_udc.h220
-rw-r--r--drivers/usb/gadget/lpc32xx_udc.c2
-rw-r--r--drivers/usb/gadget/m66592-udc.c4
-rw-r--r--drivers/usb/gadget/multi.c2
-rw-r--r--drivers/usb/gadget/mv_u3d_core.c5
-rw-r--r--drivers/usb/gadget/mv_udc_core.c5
-rw-r--r--drivers/usb/gadget/net2272.c4
-rw-r--r--drivers/usb/gadget/net2280.c8
-rw-r--r--drivers/usb/gadget/nokia.c6
-rw-r--r--drivers/usb/gadget/omap_udc.c4
-rw-r--r--drivers/usb/gadget/pch_udc.c8
-rw-r--r--drivers/usb/gadget/pxa25x_udc.c2
-rw-r--r--drivers/usb/gadget/pxa27x_udc.c5
-rw-r--r--drivers/usb/gadget/r8a66597-udc.c10
-rw-r--r--drivers/usb/gadget/rndis.c8
-rw-r--r--drivers/usb/gadget/s3c-hsotg.c80
-rw-r--r--drivers/usb/gadget/s3c-hsotg.h1
-rw-r--r--drivers/usb/gadget/s3c-hsudc.c2
-rw-r--r--drivers/usb/gadget/s3c2410_udc.c1
-rw-r--r--drivers/usb/gadget/u_ether.c2
-rw-r--r--drivers/usb/gadget/u_ether.h43
-rw-r--r--drivers/usb/gadget/u_f.c32
-rw-r--r--drivers/usb/gadget/u_f.h26
-rw-r--r--drivers/usb/gadget/u_fs.h267
-rw-r--r--drivers/usb/gadget/u_rndis.h2
-rw-r--r--drivers/usb/gadget/usbstring.c1
-rw-r--r--drivers/usb/gadget/zero.c8
-rw-r--r--drivers/usb/host/Makefile2
-rw-r--r--drivers/usb/host/ehci-atmel.c1
-rw-r--r--drivers/usb/host/ehci-dbg.c10
-rw-r--r--drivers/usb/host/ehci-exynos.c1
-rw-r--r--drivers/usb/host/ehci-fsl.c33
-rw-r--r--drivers/usb/host/ehci-grlib.c4
-rw-r--r--drivers/usb/host/ehci-hcd.c14
-rw-r--r--drivers/usb/host/ehci-hub.c6
-rw-r--r--drivers/usb/host/ehci-mv.c3
-rw-r--r--drivers/usb/host/ehci-mxc.c1
-rw-r--r--drivers/usb/host/ehci-octeon.c24
-rw-r--r--drivers/usb/host/ehci-omap.c1
-rw-r--r--drivers/usb/host/ehci-orion.c46
-rw-r--r--drivers/usb/host/ehci-platform.c1
-rw-r--r--drivers/usb/host/ehci-pmcmsp.c4
-rw-r--r--drivers/usb/host/ehci-ppc-of.c4
-rw-r--r--drivers/usb/host/ehci-ps3.c1
-rw-r--r--drivers/usb/host/ehci-q.c4
-rw-r--r--drivers/usb/host/ehci-sead3.c1
-rw-r--r--drivers/usb/host/ehci-sh.c1
-rw-r--r--drivers/usb/host/ehci-spear.c1
-rw-r--r--drivers/usb/host/ehci-tegra.c1
-rw-r--r--drivers/usb/host/ehci-tilegx.c1
-rw-r--r--drivers/usb/host/ehci-w90x900.c22
-rw-r--r--drivers/usb/host/ehci-xilinx-of.c7
-rw-r--r--drivers/usb/host/ehci.h26
-rw-r--r--drivers/usb/host/fhci-hcd.c2
-rw-r--r--drivers/usb/host/fotg210-hcd.c96
-rw-r--r--drivers/usb/host/fotg210.h8
-rw-r--r--drivers/usb/host/fusbh200-hcd.c98
-rw-r--r--drivers/usb/host/fusbh200.h12
-rw-r--r--drivers/usb/host/hwa-hc.c24
-rw-r--r--drivers/usb/host/imx21-dbg.c4
-rw-r--r--drivers/usb/host/imx21-hcd.c7
-rw-r--r--drivers/usb/host/imx21-hcd.h4
-rw-r--r--drivers/usb/host/isp116x-hcd.c5
-rw-r--r--drivers/usb/host/isp1362-hcd.c5
-rw-r--r--drivers/usb/host/isp1760-hcd.c1
-rw-r--r--drivers/usb/host/ohci-at91.c82
-rw-r--r--drivers/usb/host/ohci-da8xx.c73
-rw-r--r--drivers/usb/host/ohci-dbg.c69
-rw-r--r--drivers/usb/host/ohci-exynos.c23
-rw-r--r--drivers/usb/host/ohci-hcd.c29
-rw-r--r--drivers/usb/host/ohci-hub.c6
-rw-r--r--drivers/usb/host/ohci-jz4740.c40
-rw-r--r--drivers/usb/host/ohci-nxp.c30
-rw-r--r--drivers/usb/host/ohci-octeon.c25
-rw-r--r--drivers/usb/host/ohci-omap.c5
-rw-r--r--drivers/usb/host/ohci-omap3.c1
-rw-r--r--drivers/usb/host/ohci-platform.c2
-rw-r--r--drivers/usb/host/ohci-ppc-of.c28
-rw-r--r--drivers/usb/host/ohci-ps3.c1
-rw-r--r--drivers/usb/host/ohci-pxa27x.c42
-rw-r--r--drivers/usb/host/ohci-q.c12
-rw-r--r--drivers/usb/host/ohci-s3c2410.c22
-rw-r--r--drivers/usb/host/ohci-sa1111.c4
-rw-r--r--drivers/usb/host/ohci-sm501.c1
-rw-r--r--drivers/usb/host/ohci-spear.c29
-rw-r--r--drivers/usb/host/ohci-tilegx.c1
-rw-r--r--drivers/usb/host/ohci-tmio.c2
-rw-r--r--drivers/usb/host/ohci.h13
-rw-r--r--drivers/usb/host/oxu210hp-hcd.c6
-rw-r--r--drivers/usb/host/pci-quirks.c1
-rw-r--r--drivers/usb/host/r8a66597-hcd.c4
-rw-r--r--drivers/usb/host/sl811-hcd.c3
-rw-r--r--drivers/usb/host/sl811_cs.c1
-rw-r--r--drivers/usb/host/u132-hcd.c3
-rw-r--r--drivers/usb/host/uhci-debug.c4
-rw-r--r--drivers/usb/host/uhci-grlib.c1
-rw-r--r--drivers/usb/host/uhci-hcd.c44
-rw-r--r--drivers/usb/host/uhci-pci.c2
-rw-r--r--drivers/usb/host/uhci-platform.c1
-rw-r--r--drivers/usb/host/whci/hcd.c1
-rw-r--r--drivers/usb/host/whci/int.c1
-rw-r--r--drivers/usb/host/whci/wusb.c1
-rw-r--r--drivers/usb/host/xhci-dbg.c42
-rw-r--r--drivers/usb/host/xhci-hub.c106
-rw-r--r--drivers/usb/host/xhci-mem.c68
-rw-r--r--drivers/usb/host/xhci-pci.c1
-rw-r--r--drivers/usb/host/xhci-plat.c2
-rw-r--r--drivers/usb/host/xhci-ring.c50
-rw-r--r--drivers/usb/host/xhci-trace.h6
-rw-r--r--drivers/usb/host/xhci.c227
-rw-r--r--drivers/usb/host/xhci.h67
-rw-r--r--drivers/usb/image/mdc800.c2
-rw-r--r--drivers/usb/image/microtek.c1
-rw-r--r--drivers/usb/misc/adutux.c1
-rw-r--r--drivers/usb/misc/cypress_cy7c63.c1
-rw-r--r--drivers/usb/misc/cytherm.c1
-rw-r--r--drivers/usb/misc/emi26.c1
-rw-r--r--drivers/usb/misc/emi62.c1
-rw-r--r--drivers/usb/misc/ezusb.c1
-rw-r--r--drivers/usb/misc/idmouse.c3
-rw-r--r--drivers/usb/misc/iowarrior.c3
-rw-r--r--drivers/usb/misc/ldusb.c1
-rw-r--r--drivers/usb/misc/legousbtower.c1
-rw-r--r--drivers/usb/misc/rio500.c1
-rw-r--r--drivers/usb/misc/sisusbvga/sisusb_init.c1
-rw-r--r--drivers/usb/misc/trancevibrator.c1
-rw-r--r--drivers/usb/misc/usblcd.c1
-rw-r--r--drivers/usb/misc/usbled.c1
-rw-r--r--drivers/usb/misc/usbsevseg.c3
-rw-r--r--drivers/usb/misc/usbtest.c42
-rw-r--r--drivers/usb/misc/yurex.c3
-rw-r--r--drivers/usb/musb/Kconfig16
-rw-r--r--drivers/usb/musb/Makefile1
-rw-r--r--drivers/usb/musb/am35x.c1
-rw-r--r--drivers/usb/musb/blackfin.c5
-rw-r--r--drivers/usb/musb/da8xx.c1
-rw-r--r--drivers/usb/musb/davinci.c1
-rw-r--r--drivers/usb/musb/jz4740.c201
-rw-r--r--drivers/usb/musb/musb_am335x.c1
-rw-r--r--drivers/usb/musb/musb_core.c74
-rw-r--r--drivers/usb/musb/musb_core.h3
-rw-r--r--drivers/usb/musb/musb_cppi41.c2
-rw-r--r--drivers/usb/musb/musb_dsps.c118
-rw-r--r--drivers/usb/musb/musb_gadget.c16
-rw-r--r--drivers/usb/musb/musb_host.c13
-rw-r--r--drivers/usb/musb/musb_host.h6
-rw-r--r--drivers/usb/musb/musb_virthub.c70
-rw-r--r--drivers/usb/musb/tusb6010.c1
-rw-r--r--drivers/usb/musb/tusb6010_omap.c1
-rw-r--r--drivers/usb/musb/ux500.c1
-rw-r--r--drivers/usb/musb/ux500_dma.c4
-rw-r--r--drivers/usb/phy/Kconfig52
-rw-r--r--drivers/usb/phy/Makefile7
-rw-r--r--drivers/usb/phy/phy-ab8500-usb.c2
-rw-r--r--drivers/usb/phy/phy-am335x-control.c6
-rw-r--r--drivers/usb/phy/phy-am335x.c39
-rw-r--r--drivers/usb/phy/phy-fsl-usb.c8
-rw-r--r--drivers/usb/phy/phy-fsl-usb.h2
-rw-r--r--drivers/usb/phy/phy-fsm-usb.c14
-rw-r--r--drivers/usb/phy/phy-generic.c1
-rw-r--r--drivers/usb/phy/phy-gpio-vbus-usb.c2
-rw-r--r--drivers/usb/phy/phy-isp1301-omap.c9
-rw-r--r--drivers/usb/phy/phy-keystone.c136
-rw-r--r--drivers/usb/phy/phy-msm-usb.c1
-rw-r--r--drivers/usb/phy/phy-mv-usb.c7
-rw-r--r--drivers/usb/phy/phy-mxs-usb.c13
-rw-r--r--drivers/usb/phy/phy-omap-control.c19
-rw-r--r--drivers/usb/phy/phy-omap-otg.c169
-rw-r--r--drivers/usb/phy/phy-rcar-gen2-usb.c2
-rw-r--r--drivers/usb/phy/phy-tahvo.c457
-rw-r--r--drivers/usb/phy/phy-twl6030-usb.c2
-rw-r--r--drivers/usb/phy/phy.c4
-rw-r--r--drivers/usb/renesas_usbhs/fifo.c18
-rw-r--r--drivers/usb/renesas_usbhs/mod_gadget.c4
-rw-r--r--drivers/usb/renesas_usbhs/mod_host.c1
-rw-r--r--drivers/usb/serial/Kconfig29
-rw-r--r--drivers/usb/serial/Makefile1
-rw-r--r--drivers/usb/serial/aircable.c10
-rw-r--r--drivers/usb/serial/ark3116.c5
-rw-r--r--drivers/usb/serial/belkin_sa.c3
-rw-r--r--drivers/usb/serial/bus.c4
-rw-r--r--drivers/usb/serial/ch341.c135
-rw-r--r--drivers/usb/serial/console.c3
-rw-r--r--drivers/usb/serial/cp210x.c8
-rw-r--r--drivers/usb/serial/cyberjack.c3
-rw-r--r--drivers/usb/serial/cypress_m8.c67
-rw-r--r--drivers/usb/serial/cypress_m8.h30
-rw-r--r--drivers/usb/serial/digi_acceleport.c1
-rw-r--r--drivers/usb/serial/empeg.c1
-rw-r--r--drivers/usb/serial/f81232.c55
-rw-r--r--drivers/usb/serial/ftdi_sio.c33
-rw-r--r--drivers/usb/serial/garmin_gps.c20
-rw-r--r--drivers/usb/serial/io_edgeport.c51
-rw-r--r--drivers/usb/serial/io_ti.c59
-rw-r--r--drivers/usb/serial/ipaq.c3
-rw-r--r--drivers/usb/serial/ipw.c1
-rw-r--r--drivers/usb/serial/ir-usb.c9
-rw-r--r--drivers/usb/serial/iuu_phoenix.c3
-rw-r--r--drivers/usb/serial/keyspan.c11
-rw-r--r--drivers/usb/serial/keyspan_pda.c1
-rw-r--r--drivers/usb/serial/keyspan_usa26msg.h2
-rw-r--r--drivers/usb/serial/kl5kusb105.c17
-rw-r--r--drivers/usb/serial/kobil_sct.c1
-rw-r--r--drivers/usb/serial/mct_u232.c1
-rw-r--r--drivers/usb/serial/metro-usb.c5
-rw-r--r--drivers/usb/serial/mos7720.c37
-rw-r--r--drivers/usb/serial/mos7840.c21
-rw-r--r--drivers/usb/serial/mxuport.c1393
-rw-r--r--drivers/usb/serial/navman.c1
-rw-r--r--drivers/usb/serial/omninet.c1
-rw-r--r--drivers/usb/serial/opticon.c11
-rw-r--r--drivers/usb/serial/option.c15
-rw-r--r--drivers/usb/serial/oti6858.c73
-rw-r--r--drivers/usb/serial/pl2303.c511
-rw-r--r--drivers/usb/serial/qcaux.c3
-rw-r--r--drivers/usb/serial/quatech2.c9
-rw-r--r--drivers/usb/serial/safe_serial.c3
-rw-r--r--drivers/usb/serial/sierra.c10
-rw-r--r--drivers/usb/serial/spcp8x5.c1
-rw-r--r--drivers/usb/serial/ssu100.c5
-rw-r--r--drivers/usb/serial/symbolserial.c1
-rw-r--r--drivers/usb/serial/ti_usb_3410_5052.c27
-rw-r--r--drivers/usb/serial/usb-serial-simple.c1
-rw-r--r--drivers/usb/serial/usb-serial.c2
-rw-r--r--drivers/usb/serial/usb_debug.c1
-rw-r--r--drivers/usb/serial/usb_wwan.c6
-rw-r--r--drivers/usb/serial/visor.c19
-rw-r--r--drivers/usb/serial/visor.h2
-rw-r--r--drivers/usb/serial/whiteheat.c9
-rw-r--r--drivers/usb/serial/wishbone-serial.c1
-rw-r--r--drivers/usb/serial/xsens_mt.c1
-rw-r--r--drivers/usb/serial/zte_ev.c21
-rw-r--r--drivers/usb/storage/onetouch.c1
-rw-r--r--drivers/usb/storage/protocol.c81
-rw-r--r--drivers/usb/storage/unusual_devs.h7
-rw-r--r--drivers/usb/storage/usb.c1
-rw-r--r--drivers/usb/usb-skeleton.c1
-rw-r--r--drivers/usb/wusbcore/cbaf.c22
-rw-r--r--drivers/usb/wusbcore/crypto.c2
-rw-r--r--drivers/usb/wusbcore/devconnect.c4
-rw-r--r--drivers/usb/wusbcore/mmc.c9
-rw-r--r--drivers/usb/wusbcore/pal.c1
-rw-r--r--drivers/usb/wusbcore/reservation.c1
-rw-r--r--drivers/usb/wusbcore/security.c42
-rw-r--r--drivers/usb/wusbcore/wa-hc.h25
-rw-r--r--drivers/usb/wusbcore/wa-nep.c10
-rw-r--r--drivers/usb/wusbcore/wa-rpipe.c19
-rw-r--r--drivers/usb/wusbcore/wa-xfer.c513
-rw-r--r--drivers/usb/wusbcore/wusbhc.c17
-rw-r--r--drivers/usb/wusbcore/wusbhc.h7
-rw-r--r--drivers/uwb/beacon.c9
-rw-r--r--drivers/uwb/radio.c6
-rw-r--r--drivers/uwb/rsv.c16
-rw-r--r--drivers/uwb/umc-bus.c2
-rw-r--r--drivers/uwb/umc-dev.c1
-rw-r--r--drivers/watchdog/pcwd_usb.c40
-rw-r--r--firmware/emi62/bitstream.HEX10325
-rw-r--r--include/linux/phy/phy.h28
-rw-r--r--include/linux/platform_data/usb-ehci-orion.h6
-rw-r--r--include/linux/platform_data/usb-omap1.h53
-rw-r--r--include/linux/scatterlist.h1
-rw-r--r--include/linux/tty.h1
-rw-r--r--include/linux/usb.h1
-rw-r--r--include/linux/usb/chipidea.h1
-rw-r--r--include/linux/usb/composite.h2
-rw-r--r--include/linux/usb/functionfs.h30
-rw-r--r--include/linux/usb/gadget.h58
-rw-r--r--include/linux/usb/hcd.h3
-rw-r--r--include/linux/usb/musb.h3
-rw-r--r--include/linux/usb/omap_control_usb.h6
-rw-r--r--include/linux/usb/otg-fsm.h (renamed from drivers/usb/phy/phy-fsm-usb.h)10
-rw-r--r--include/linux/uwb/umc.h2
-rw-r--r--lib/scatterlist.c3
367 files changed, 16189 insertions, 8071 deletions
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-ffs b/Documentation/ABI/testing/configfs-usb-gadget-ffs
new file mode 100644
index 000000000000..14343e237e83
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-ffs
@@ -0,0 +1,9 @@
1What: /config/usb-gadget/gadget/functions/ffs.name
2Date: Nov 2013
3KenelVersion: 3.13
4Description: The purpose of this directory is to create and remove it.
5
6 A corresponding USB function instance is created/removed.
7 There are no attributes here.
8
9 All parameters are set through FunctionFS.
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-loopback b/Documentation/ABI/testing/configfs-usb-gadget-loopback
new file mode 100644
index 000000000000..852b2365a5b5
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-loopback
@@ -0,0 +1,8 @@
1What: /config/usb-gadget/gadget/functions/Loopback.name
2Date: Nov 2013
3KenelVersion: 3.13
4Description:
5 The attributes:
6
7 qlen - depth of loopback queue
8 bulk_buflen - buffer length
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-sourcesink b/Documentation/ABI/testing/configfs-usb-gadget-sourcesink
new file mode 100644
index 000000000000..a30f3093ef6c
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-sourcesink
@@ -0,0 +1,12 @@
1What: /config/usb-gadget/gadget/functions/SourceSink.name
2Date: Nov 2013
3KenelVersion: 3.13
4Description:
5 The attributes:
6
7 pattern - 0 (all zeros), 1 (mod63), 2 (none)
8 isoc_interval - 1..16
9 isoc_maxpacket - 0 - 1023 (fs), 0 - 1024 (hs/ss)
10 isoc_mult - 0..2 (hs/ss only)
11 isoc_maxburst - 0..15 (ss only)
12 qlen - buffer length
diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb
index 1430f584b266..614d451cee41 100644
--- a/Documentation/ABI/testing/sysfs-bus-usb
+++ b/Documentation/ABI/testing/sysfs-bus-usb
@@ -50,13 +50,19 @@ Description:
50 This may allow the driver to support more hardware than 50 This may allow the driver to support more hardware than
51 was included in the driver's static device ID support 51 was included in the driver's static device ID support
52 table at compile time. The format for the device ID is: 52 table at compile time. The format for the device ID is:
53 idVendor idProduct bInterfaceClass. 53 idVendor idProduct bInterfaceClass RefIdVendor RefIdProduct
54 The vendor ID and device ID fields are required, the 54 The vendor ID and device ID fields are required, the
55 interface class is optional. 55 rest is optional. The Ref* tuple can be used to tell the
56 driver to use the same driver_data for the new device as
57 it is used for the reference device.
56 Upon successfully adding an ID, the driver will probe 58 Upon successfully adding an ID, the driver will probe
57 for the device and attempt to bind to it. For example: 59 for the device and attempt to bind to it. For example:
58 # echo "8086 10f5" > /sys/bus/usb/drivers/foo/new_id 60 # echo "8086 10f5" > /sys/bus/usb/drivers/foo/new_id
59 61
62 Here add a new device (0458:7045) using driver_data from
63 an already supported device (0458:704c):
64 # echo "0458 7045 0 0458 704c" > /sys/bus/usb/drivers/foo/new_id
65
60 Reading from this file will list all dynamically added 66 Reading from this file will list all dynamically added
61 device IDs in the same format, with one entry per 67 device IDs in the same format, with one entry per
62 line. For example: 68 line. For example:
diff --git a/Documentation/ABI/testing/sysfs-platform-tahvo-usb b/Documentation/ABI/testing/sysfs-platform-tahvo-usb
new file mode 100644
index 000000000000..f6e20ce4b538
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-platform-tahvo-usb
@@ -0,0 +1,16 @@
1What: /sys/bus/platform/devices/tahvo-usb/otg_mode
2Date: December 2013
3Contact: Aaro Koskinen <aaro.koskinen@iki.fi>
4Description:
5 Set or read the current OTG mode. Valid values are "host" and
6 "peripheral".
7
8 Reading: returns the current mode.
9
10What: /sys/bus/platform/devices/tahvo-usb/vbus
11Date: December 2013
12Contact: Aaro Koskinen <aaro.koskinen@iki.fi>
13Description:
14 Read the current VBUS state.
15
16 Reading: returns "on" or "off".
diff --git a/Documentation/devicetree/bindings/phy/bcm-phy.txt b/Documentation/devicetree/bindings/phy/bcm-phy.txt
new file mode 100644
index 000000000000..3dc8b3d2ffbb
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/bcm-phy.txt
@@ -0,0 +1,15 @@
1BROADCOM KONA USB2 PHY
2
3Required properties:
4 - compatible: brcm,kona-usb2-phy
5 - reg: offset and length of the PHY registers
6 - #phy-cells: must be 0
7Refer to phy/phy-bindings.txt for the generic PHY binding properties
8
9Example:
10
11 usbphy: usb-phy@3f130000 {
12 compatible = "brcm,kona-usb2-phy";
13 reg = <0x3f130000 0x28>;
14 #phy-cells = <0>;
15 };
diff --git a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt
index b4b5b7906c88..b4b5b7906c88 100644
--- a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt
+++ b/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt
diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt
index 8b60e90efe33..b8b6871f116f 100644
--- a/Documentation/devicetree/bindings/usb/dwc2.txt
+++ b/Documentation/devicetree/bindings/usb/dwc2.txt
@@ -7,6 +7,14 @@ Required properties:
7 - snps,dwc2: A generic DWC2 USB controller with default parameters. 7 - snps,dwc2: A generic DWC2 USB controller with default parameters.
8- reg : Should contain 1 register range (address and length) 8- reg : Should contain 1 register range (address and length)
9- interrupts : Should contain 1 interrupt 9- interrupts : Should contain 1 interrupt
10- clocks: clock provider specifier
11- clock-names: shall be "otg"
12Refer to clk/clock-bindings.txt for generic clock consumer properties
13
14Optional properties:
15- phys: phy provider specifier
16- phy-names: shall be "device"
17Refer to phy/phy-bindings.txt for generic phy consumer properties
10 18
11Example: 19Example:
12 20
@@ -14,4 +22,8 @@ Example:
14 compatible = "ralink,rt3050-usb, snps,dwc2"; 22 compatible = "ralink,rt3050-usb, snps,dwc2";
15 reg = <0x101c0000 40000>; 23 reg = <0x101c0000 40000>;
16 interrupts = <18>; 24 interrupts = <18>;
25 clocks = <&usb_otg_ahb_clk>;
26 clock-names = "otg";
27 phys = <&usbphy>;
28 phy-names = "usb2-phy";
17 }; 29 };
diff --git a/Documentation/devicetree/bindings/usb/gr-udc.txt b/Documentation/devicetree/bindings/usb/gr-udc.txt
new file mode 100644
index 000000000000..0c5118f7a916
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/gr-udc.txt
@@ -0,0 +1,28 @@
1USB Peripheral Controller driver for Aeroflex Gaisler GRUSBDC.
2
3The GRUSBDC USB Device Controller core is available in the GRLIB VHDL
4IP core library.
5
6Note: In the ordinary environment for the core, a Leon SPARC system,
7these properties are built from information in the AMBA plug&play.
8
9Required properties:
10
11- name : Should be "GAISLER_USBDC" or "01_021"
12
13- reg : Address and length of the register set for the device
14
15- interrupts : Interrupt numbers for this device
16
17Optional properties:
18
19- epobufsizes : An array of buffer sizes for OUT endpoints. If the property is
20 not present, or for endpoints outside of the array, 1024 is assumed by
21 the driver.
22
23- epibufsizes : An array of buffer sizes for IN endpoints. If the property is
24 not present, or for endpoints outside of the array, 1024 is assumed by
25 the driver.
26
27For further information look in the documentation for the GLIB IP core library:
28http://www.gaisler.com/products/grlib/grip.pdf
diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt
index 090e5e22bd2b..c495135115cb 100644
--- a/Documentation/devicetree/bindings/usb/omap-usb.txt
+++ b/Documentation/devicetree/bindings/usb/omap-usb.txt
@@ -87,6 +87,8 @@ Required properties:
87 e.g. USB3 PHY and SATA PHY on OMAP5. 87 e.g. USB3 PHY and SATA PHY on OMAP5.
88 "ti,control-phy-dra7usb2" - if it has power down register like USB2 PHY on 88 "ti,control-phy-dra7usb2" - if it has power down register like USB2 PHY on
89 DRA7 platform. 89 DRA7 platform.
90 "ti,control-phy-am437usb2" - if it has power down register like USB2 PHY on
91 AM437 platform.
90 - reg : Address and length of the register set for the device. It contains 92 - reg : Address and length of the register set for the device. It contains
91 the address of "otghs_control" for control-phy-otghs or "power" register 93 the address of "otghs_control" for control-phy-otghs or "power" register
92 for other types. 94 for other types.
diff --git a/arch/arm/mach-omap1/include/mach/usb.h b/arch/arm/mach-omap1/include/mach/usb.h
index 45e5ac707cbb..2c263051dc51 100644
--- a/arch/arm/mach-omap1/include/mach/usb.h
+++ b/arch/arm/mach-omap1/include/mach/usb.h
@@ -8,43 +8,7 @@
8#define is_usb0_device(config) 0 8#define is_usb0_device(config) 0
9#endif 9#endif
10 10
11struct omap_usb_config { 11#include <linux/platform_data/usb-omap1.h>
12 /* Configure drivers according to the connectors on your board:
13 * - "A" connector (rectagular)
14 * ... for host/OHCI use, set "register_host".
15 * - "B" connector (squarish) or "Mini-B"
16 * ... for device/gadget use, set "register_dev".
17 * - "Mini-AB" connector (very similar to Mini-B)
18 * ... for OTG use as device OR host, initialize "otg"
19 */
20 unsigned register_host:1;
21 unsigned register_dev:1;
22 u8 otg; /* port number, 1-based: usb1 == 2 */
23
24 u8 hmc_mode;
25
26 /* implicitly true if otg: host supports remote wakeup? */
27 u8 rwc;
28
29 /* signaling pins used to talk to transceiver on usbN:
30 * 0 == usbN unused
31 * 2 == usb0-only, using internal transceiver
32 * 3 == 3 wire bidirectional
33 * 4 == 4 wire bidirectional
34 * 6 == 6 wire unidirectional (or TLL)
35 */
36 u8 pins[3];
37
38 struct platform_device *udc_device;
39 struct platform_device *ohci_device;
40 struct platform_device *otg_device;
41
42 u32 (*usb0_init)(unsigned nwires, unsigned is_device);
43 u32 (*usb1_init)(unsigned nwires);
44 u32 (*usb2_init)(unsigned nwires, unsigned alt_pingroup);
45
46 int (*ocpi_enable)(void);
47};
48 12
49void omap_otg_init(struct omap_usb_config *config); 13void omap_otg_init(struct omap_usb_config *config);
50 14
diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index d0611b84d7f7..b901c472d7f3 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -57,4 +57,10 @@ config PHY_EXYNOS_DP_VIDEO
57 help 57 help
58 Support for Display Port PHY found on Samsung EXYNOS SoCs. 58 Support for Display Port PHY found on Samsung EXYNOS SoCs.
59 59
60config BCM_KONA_USB2_PHY
61 tristate "Broadcom Kona USB2 PHY Driver"
62 depends on GENERIC_PHY
63 help
64 Enable this to support the Broadcom Kona USB 2.0 PHY.
65
60endmenu 66endmenu
diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile
index 4e4adc96f753..b57c25371cca 100644
--- a/drivers/phy/Makefile
+++ b/drivers/phy/Makefile
@@ -3,6 +3,7 @@
3# 3#
4 4
5obj-$(CONFIG_GENERIC_PHY) += phy-core.o 5obj-$(CONFIG_GENERIC_PHY) += phy-core.o
6obj-$(CONFIG_BCM_KONA_USB2_PHY) += phy-bcm-kona-usb2.o
6obj-$(CONFIG_PHY_EXYNOS_DP_VIDEO) += phy-exynos-dp-video.o 7obj-$(CONFIG_PHY_EXYNOS_DP_VIDEO) += phy-exynos-dp-video.o
7obj-$(CONFIG_PHY_EXYNOS_MIPI_VIDEO) += phy-exynos-mipi-video.o 8obj-$(CONFIG_PHY_EXYNOS_MIPI_VIDEO) += phy-exynos-mipi-video.o
8obj-$(CONFIG_PHY_MVEBU_SATA) += phy-mvebu-sata.o 9obj-$(CONFIG_PHY_MVEBU_SATA) += phy-mvebu-sata.o
diff --git a/drivers/phy/phy-bcm-kona-usb2.c b/drivers/phy/phy-bcm-kona-usb2.c
new file mode 100644
index 000000000000..efc5c1a13a5d
--- /dev/null
+++ b/drivers/phy/phy-bcm-kona-usb2.c
@@ -0,0 +1,158 @@
1/*
2 * phy-bcm-kona-usb2.c - Broadcom Kona USB2 Phy Driver
3 *
4 * Copyright (C) 2013 Linaro Limited
5 * Matt Porter <mporter@linaro.org>
6 *
7 * This software is licensed under the terms of the GNU General Public
8 * License version 2, as published by the Free Software Foundation, and
9 * may be copied, distributed, and modified under those terms.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17#include <linux/clk.h>
18#include <linux/delay.h>
19#include <linux/err.h>
20#include <linux/io.h>
21#include <linux/module.h>
22#include <linux/of.h>
23#include <linux/phy/phy.h>
24#include <linux/platform_device.h>
25
26#define OTGCTL (0)
27#define OTGCTL_OTGSTAT2 BIT(31)
28#define OTGCTL_OTGSTAT1 BIT(30)
29#define OTGCTL_PRST_N_SW BIT(11)
30#define OTGCTL_HRESET_N BIT(10)
31#define OTGCTL_UTMI_LINE_STATE1 BIT(9)
32#define OTGCTL_UTMI_LINE_STATE0 BIT(8)
33
34#define P1CTL (8)
35#define P1CTL_SOFT_RESET BIT(1)
36#define P1CTL_NON_DRIVING BIT(0)
37
38struct bcm_kona_usb {
39 void __iomem *regs;
40};
41
42static void bcm_kona_usb_phy_power(struct bcm_kona_usb *phy, int on)
43{
44 u32 val;
45
46 val = readl(phy->regs + OTGCTL);
47 if (on) {
48 /* Configure and power PHY */
49 val &= ~(OTGCTL_OTGSTAT2 | OTGCTL_OTGSTAT1 |
50 OTGCTL_UTMI_LINE_STATE1 | OTGCTL_UTMI_LINE_STATE0);
51 val |= OTGCTL_PRST_N_SW | OTGCTL_HRESET_N;
52 } else {
53 val &= ~(OTGCTL_PRST_N_SW | OTGCTL_HRESET_N);
54 }
55 writel(val, phy->regs + OTGCTL);
56}
57
58static int bcm_kona_usb_phy_init(struct phy *gphy)
59{
60 struct bcm_kona_usb *phy = phy_get_drvdata(gphy);
61 u32 val;
62
63 /* Soft reset PHY */
64 val = readl(phy->regs + P1CTL);
65 val &= ~P1CTL_NON_DRIVING;
66 val |= P1CTL_SOFT_RESET;
67 writel(val, phy->regs + P1CTL);
68 writel(val & ~P1CTL_SOFT_RESET, phy->regs + P1CTL);
69 /* Reset needs to be asserted for 2ms */
70 mdelay(2);
71 writel(val | P1CTL_SOFT_RESET, phy->regs + P1CTL);
72
73 return 0;
74}
75
76static int bcm_kona_usb_phy_power_on(struct phy *gphy)
77{
78 struct bcm_kona_usb *phy = phy_get_drvdata(gphy);
79
80 bcm_kona_usb_phy_power(phy, 1);
81
82 return 0;
83}
84
85static int bcm_kona_usb_phy_power_off(struct phy *gphy)
86{
87 struct bcm_kona_usb *phy = phy_get_drvdata(gphy);
88
89 bcm_kona_usb_phy_power(phy, 0);
90
91 return 0;
92}
93
94static struct phy_ops ops = {
95 .init = bcm_kona_usb_phy_init,
96 .power_on = bcm_kona_usb_phy_power_on,
97 .power_off = bcm_kona_usb_phy_power_off,
98 .owner = THIS_MODULE,
99};
100
101static int bcm_kona_usb2_probe(struct platform_device *pdev)
102{
103 struct device *dev = &pdev->dev;
104 struct bcm_kona_usb *phy;
105 struct resource *res;
106 struct phy *gphy;
107 struct phy_provider *phy_provider;
108
109 phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL);
110 if (!phy)
111 return -ENOMEM;
112
113 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
114 phy->regs = devm_ioremap_resource(&pdev->dev, res);
115 if (IS_ERR(phy->regs))
116 return PTR_ERR(phy->regs);
117
118 platform_set_drvdata(pdev, phy);
119
120 gphy = devm_phy_create(dev, &ops, NULL);
121 if (IS_ERR(gphy))
122 return PTR_ERR(gphy);
123
124 /* The Kona PHY supports an 8-bit wide UTMI interface */
125 phy_set_bus_width(gphy, 8);
126
127 phy_set_drvdata(gphy, phy);
128
129 phy_provider = devm_of_phy_provider_register(dev,
130 of_phy_simple_xlate);
131 if (IS_ERR(phy_provider))
132 return PTR_ERR(phy_provider);
133
134 return 0;
135}
136
137static const struct of_device_id bcm_kona_usb2_dt_ids[] = {
138 { .compatible = "brcm,kona-usb2-phy" },
139 { /* sentinel */ }
140};
141
142MODULE_DEVICE_TABLE(of, bcm_kona_usb2_dt_ids);
143
144static struct platform_driver bcm_kona_usb2_driver = {
145 .probe = bcm_kona_usb2_probe,
146 .driver = {
147 .name = "bcm-kona-usb2",
148 .owner = THIS_MODULE,
149 .of_match_table = bcm_kona_usb2_dt_ids,
150 },
151};
152
153module_platform_driver(bcm_kona_usb2_driver);
154
155MODULE_ALIAS("platform:bcm-kona-usb2");
156MODULE_AUTHOR("Matt Porter <mporter@linaro.org>");
157MODULE_DESCRIPTION("BCM Kona USB 2.0 PHY driver");
158MODULE_LICENSE("GPL v2");
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index d118952c0a74..47e0a91238a1 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -3498,6 +3498,7 @@ static int octeon_usb_driver_probe(struct device *dev)
3498 kfree(hcd); 3498 kfree(hcd);
3499 return -1; 3499 return -1;
3500 } 3500 }
3501 device_wakeup_enable(hcd->self.controller);
3501 3502
3502 dev_dbg(dev, "Registered HCD for port %d on irq %d\n", usb_num, irq); 3503 dev_dbg(dev, "Registered HCD for port %d on irq %d\n", usb_num, irq);
3503 3504
diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c
index d9c43c3282e7..efaf26f734c3 100644
--- a/drivers/staging/ozwpan/ozhcd.c
+++ b/drivers/staging/ozwpan/ozhcd.c
@@ -2270,6 +2270,8 @@ static int oz_plat_probe(struct platform_device *dev)
2270 usb_put_hcd(hcd); 2270 usb_put_hcd(hcd);
2271 return -1; 2271 return -1;
2272 } 2272 }
2273 device_wakeup_enable(hcd->self.controller);
2274
2273 spin_lock_bh(&g_hcdlock); 2275 spin_lock_bh(&g_hcdlock);
2274 g_ozhcd = ozhcd; 2276 g_ozhcd = ozhcd;
2275 spin_unlock_bh(&g_hcdlock); 2277 spin_unlock_bh(&g_hcdlock);
diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
index 7eb909aa8bc0..2e6b832e004b 100644
--- a/drivers/usb/Kconfig
+++ b/drivers/usb/Kconfig
@@ -94,8 +94,6 @@ source "drivers/usb/wusbcore/Kconfig"
94 94
95source "drivers/usb/host/Kconfig" 95source "drivers/usb/host/Kconfig"
96 96
97source "drivers/usb/musb/Kconfig"
98
99source "drivers/usb/renesas_usbhs/Kconfig" 97source "drivers/usb/renesas_usbhs/Kconfig"
100 98
101source "drivers/usb/class/Kconfig" 99source "drivers/usb/class/Kconfig"
@@ -106,6 +104,8 @@ source "drivers/usb/image/Kconfig"
106 104
107endif 105endif
108 106
107source "drivers/usb/musb/Kconfig"
108
109source "drivers/usb/dwc3/Kconfig" 109source "drivers/usb/dwc3/Kconfig"
110 110
111source "drivers/usb/dwc2/Kconfig" 111source "drivers/usb/dwc2/Kconfig"
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index 8a7eb77233b4..813d4d3a51c6 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -35,7 +35,6 @@
35#include <linux/timer.h> 35#include <linux/timer.h>
36#include <linux/errno.h> 36#include <linux/errno.h>
37#include <linux/slab.h> 37#include <linux/slab.h>
38#include <linux/init.h>
39#include <linux/device.h> 38#include <linux/device.h>
40#include <linux/firmware.h> 39#include <linux/firmware.h>
41#include <linux/mutex.h> 40#include <linux/mutex.h>
diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c
index 69461d653972..0dc8c06a7b5f 100644
--- a/drivers/usb/atm/speedtch.c
+++ b/drivers/usb/atm/speedtch.c
@@ -27,7 +27,6 @@
27#include <linux/device.h> 27#include <linux/device.h>
28#include <linux/errno.h> 28#include <linux/errno.h>
29#include <linux/firmware.h> 29#include <linux/firmware.h>
30#include <linux/init.h>
31#include <linux/kernel.h> 30#include <linux/kernel.h>
32#include <linux/module.h> 31#include <linux/module.h>
33#include <linux/moduleparam.h> 32#include <linux/moduleparam.h>
diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index defff43950bc..5a459377574b 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -57,7 +57,6 @@
57 57
58#include <linux/module.h> 58#include <linux/module.h>
59#include <linux/moduleparam.h> 59#include <linux/moduleparam.h>
60#include <linux/init.h>
61#include <linux/crc32.h> 60#include <linux/crc32.h>
62#include <linux/usb.h> 61#include <linux/usb.h>
63#include <linux/firmware.h> 62#include <linux/firmware.h>
diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c
index 25a7bfcf666c..dada0146cd7f 100644
--- a/drivers/usb/atm/usbatm.c
+++ b/drivers/usb/atm/usbatm.c
@@ -170,9 +170,9 @@ struct usbatm_control {
170static void usbatm_atm_dev_close(struct atm_dev *atm_dev); 170static void usbatm_atm_dev_close(struct atm_dev *atm_dev);
171static int usbatm_atm_open(struct atm_vcc *vcc); 171static int usbatm_atm_open(struct atm_vcc *vcc);
172static void usbatm_atm_close(struct atm_vcc *vcc); 172static void usbatm_atm_close(struct atm_vcc *vcc);
173static int usbatm_atm_ioctl(struct atm_dev *atm_dev, unsigned int cmd, void __user * arg); 173static int usbatm_atm_ioctl(struct atm_dev *atm_dev, unsigned int cmd, void __user *arg);
174static int usbatm_atm_send(struct atm_vcc *vcc, struct sk_buff *skb); 174static int usbatm_atm_send(struct atm_vcc *vcc, struct sk_buff *skb);
175static int usbatm_atm_proc_read(struct atm_dev *atm_dev, loff_t * pos, char *page); 175static int usbatm_atm_proc_read(struct atm_dev *atm_dev, loff_t *pos, char *page);
176 176
177static struct atmdev_ops usbatm_atm_devops = { 177static struct atmdev_ops usbatm_atm_devops = {
178 .dev_close = usbatm_atm_dev_close, 178 .dev_close = usbatm_atm_dev_close,
@@ -739,7 +739,7 @@ static void usbatm_atm_dev_close(struct atm_dev *atm_dev)
739 usbatm_put_instance(instance); /* taken in usbatm_atm_init */ 739 usbatm_put_instance(instance); /* taken in usbatm_atm_init */
740} 740}
741 741
742static int usbatm_atm_proc_read(struct atm_dev *atm_dev, loff_t * pos, char *page) 742static int usbatm_atm_proc_read(struct atm_dev *atm_dev, loff_t *pos, char *page)
743{ 743{
744 struct usbatm_data *instance = atm_dev->dev_data; 744 struct usbatm_data *instance = atm_dev->dev_data;
745 int left = *pos; 745 int left = *pos;
@@ -895,7 +895,7 @@ static void usbatm_atm_close(struct atm_vcc *vcc)
895} 895}
896 896
897static int usbatm_atm_ioctl(struct atm_dev *atm_dev, unsigned int cmd, 897static int usbatm_atm_ioctl(struct atm_dev *atm_dev, unsigned int cmd,
898 void __user * arg) 898 void __user *arg)
899{ 899{
900 struct usbatm_data *instance = atm_dev->dev_data; 900 struct usbatm_data *instance = atm_dev->dev_data;
901 901
diff --git a/drivers/usb/c67x00/Makefile b/drivers/usb/c67x00/Makefile
index b1218683c8ec..da5f314a5de0 100644
--- a/drivers/usb/c67x00/Makefile
+++ b/drivers/usb/c67x00/Makefile
@@ -2,8 +2,6 @@
2# Makefile for Cypress C67X00 USB Controller 2# Makefile for Cypress C67X00 USB Controller
3# 3#
4 4
5ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
6
7obj-$(CONFIG_USB_C67X00_HCD) += c67x00.o 5obj-$(CONFIG_USB_C67X00_HCD) += c67x00.o
8 6
9c67x00-y := c67x00-drv.o c67x00-ll-hpi.o c67x00-hcd.o c67x00-sched.o 7c67x00-y := c67x00-drv.o c67x00-ll-hpi.o c67x00-hcd.o c67x00-sched.o
diff --git a/drivers/usb/c67x00/c67x00-hcd.c b/drivers/usb/c67x00/c67x00-hcd.c
index 75e47b860a53..20ec4eee1ac8 100644
--- a/drivers/usb/c67x00/c67x00-hcd.c
+++ b/drivers/usb/c67x00/c67x00-hcd.c
@@ -384,6 +384,8 @@ int c67x00_hcd_probe(struct c67x00_sie *sie)
384 goto err2; 384 goto err2;
385 } 385 }
386 386
387 device_wakeup_enable(hcd->self.controller);
388
387 spin_lock_irqsave(&sie->lock, flags); 389 spin_lock_irqsave(&sie->lock, flags);
388 sie->private_data = c67x00; 390 sie->private_data = c67x00;
389 sie->irq = c67x00_hcd_irq; 391 sie->irq = c67x00_hcd_irq;
diff --git a/drivers/usb/c67x00/c67x00-hcd.h b/drivers/usb/c67x00/c67x00-hcd.h
index e3d493d4d61a..cf8a455a6403 100644
--- a/drivers/usb/c67x00/c67x00-hcd.h
+++ b/drivers/usb/c67x00/c67x00-hcd.h
@@ -45,7 +45,7 @@
45/* 45/*
46 * The current implementation switches between _STD (default) and _ISO (when 46 * The current implementation switches between _STD (default) and _ISO (when
47 * isochronous transfers are scheduled), in order to optimize the throughput 47 * isochronous transfers are scheduled), in order to optimize the throughput
48 * in normal cicrumstances, but also provide good isochronous behaviour. 48 * in normal circumstances, but also provide good isochronous behaviour.
49 * 49 *
50 * Bandwidth is described in bit time so with a 12MHz USB clock and 1ms 50 * Bandwidth is described in bit time so with a 12MHz USB clock and 1ms
51 * frames; there are 12000 bit times per frame. 51 * frames; there are 12000 bit times per frame.
diff --git a/drivers/usb/c67x00/c67x00-ll-hpi.c b/drivers/usb/c67x00/c67x00-ll-hpi.c
index 3a1ca4dfc83a..b58151841e10 100644
--- a/drivers/usb/c67x00/c67x00-ll-hpi.c
+++ b/drivers/usb/c67x00/c67x00-ll-hpi.c
@@ -22,6 +22,7 @@
22 */ 22 */
23 23
24#include <asm/byteorder.h> 24#include <asm/byteorder.h>
25#include <linux/delay.h>
25#include <linux/io.h> 26#include <linux/io.h>
26#include <linux/jiffies.h> 27#include <linux/jiffies.h>
27#include <linux/usb/c67x00.h> 28#include <linux/usb/c67x00.h>
@@ -62,8 +63,8 @@ struct c67x00_lcp_int_data {
62 * HPI implementation 63 * HPI implementation
63 * 64 *
64 * The c67x00 chip also support control via SPI or HSS serial 65 * The c67x00 chip also support control via SPI or HSS serial
65 * interfaces. However, this driver assumes that register access can 66 * interfaces. However, this driver assumes that register access can
66 * be performed from IRQ context. While this is a safe assuption with 67 * be performed from IRQ context. While this is a safe assumption with
67 * the HPI interface, it is not true for the serial interfaces. 68 * the HPI interface, it is not true for the serial interfaces.
68 */ 69 */
69 70
@@ -73,13 +74,22 @@ struct c67x00_lcp_int_data {
73#define HPI_ADDR 2 74#define HPI_ADDR 2
74#define HPI_STATUS 3 75#define HPI_STATUS 3
75 76
77/*
78 * According to CY7C67300 specification (tables 140 and 141) HPI read and
79 * write cycle duration Tcyc must be at least 6T long, where T is 1/48MHz,
80 * which is 125ns.
81 */
82#define HPI_T_CYC_NS 125
83
76static inline u16 hpi_read_reg(struct c67x00_device *dev, int reg) 84static inline u16 hpi_read_reg(struct c67x00_device *dev, int reg)
77{ 85{
86 ndelay(HPI_T_CYC_NS);
78 return __raw_readw(dev->hpi.base + reg * dev->hpi.regstep); 87 return __raw_readw(dev->hpi.base + reg * dev->hpi.regstep);
79} 88}
80 89
81static inline void hpi_write_reg(struct c67x00_device *dev, int reg, u16 value) 90static inline void hpi_write_reg(struct c67x00_device *dev, int reg, u16 value)
82{ 91{
92 ndelay(HPI_T_CYC_NS);
83 __raw_writew(value, dev->hpi.base + reg * dev->hpi.regstep); 93 __raw_writew(value, dev->hpi.base + reg * dev->hpi.regstep);
84} 94}
85 95
diff --git a/drivers/usb/c67x00/c67x00-sched.c b/drivers/usb/c67x00/c67x00-sched.c
index 892cc96466eb..7311ed61e99a 100644
--- a/drivers/usb/c67x00/c67x00-sched.c
+++ b/drivers/usb/c67x00/c67x00-sched.c
@@ -144,8 +144,6 @@ struct c67x00_urb_priv {
144 144
145/* -------------------------------------------------------------------------- */ 145/* -------------------------------------------------------------------------- */
146 146
147#ifdef DEBUG
148
149/** 147/**
150 * dbg_td - Dump the contents of the TD 148 * dbg_td - Dump the contents of the TD
151 */ 149 */
@@ -166,16 +164,8 @@ static void dbg_td(struct c67x00_hcd *c67x00, struct c67x00_td *td, char *msg)
166 dev_dbg(dev, "retry_cnt: 0x%02x\n", td->retry_cnt); 164 dev_dbg(dev, "retry_cnt: 0x%02x\n", td->retry_cnt);
167 dev_dbg(dev, "residue: 0x%02x\n", td->residue); 165 dev_dbg(dev, "residue: 0x%02x\n", td->residue);
168 dev_dbg(dev, "next_td_addr: 0x%04x\n", td_next_td_addr(td)); 166 dev_dbg(dev, "next_td_addr: 0x%04x\n", td_next_td_addr(td));
169 dev_dbg(dev, "data:"); 167 dev_dbg(dev, "data: %*ph\n", td_length(td), td->data);
170 print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 16, 1,
171 td->data, td_length(td), 1);
172} 168}
173#else /* DEBUG */
174
175static inline void
176dbg_td(struct c67x00_hcd *c67x00, struct c67x00_td *td, char *msg) { }
177
178#endif /* DEBUG */
179 169
180/* -------------------------------------------------------------------------- */ 170/* -------------------------------------------------------------------------- */
181/* Helper functions */ 171/* Helper functions */
@@ -372,6 +362,13 @@ int c67x00_urb_enqueue(struct usb_hcd *hcd,
372 struct c67x00_hcd *c67x00 = hcd_to_c67x00_hcd(hcd); 362 struct c67x00_hcd *c67x00 = hcd_to_c67x00_hcd(hcd);
373 int port = get_root_port(urb->dev)-1; 363 int port = get_root_port(urb->dev)-1;
374 364
365 /* Allocate and initialize urb private data */
366 urbp = kzalloc(sizeof(*urbp), mem_flags);
367 if (!urbp) {
368 ret = -ENOMEM;
369 goto err_urbp;
370 }
371
375 spin_lock_irqsave(&c67x00->lock, flags); 372 spin_lock_irqsave(&c67x00->lock, flags);
376 373
377 /* Make sure host controller is running */ 374 /* Make sure host controller is running */
@@ -384,13 +381,6 @@ int c67x00_urb_enqueue(struct usb_hcd *hcd,
384 if (ret) 381 if (ret)
385 goto err_not_linked; 382 goto err_not_linked;
386 383
387 /* Allocate and initialize urb private data */
388 urbp = kzalloc(sizeof(*urbp), mem_flags);
389 if (!urbp) {
390 ret = -ENOMEM;
391 goto err_urbp;
392 }
393
394 INIT_LIST_HEAD(&urbp->hep_node); 384 INIT_LIST_HEAD(&urbp->hep_node);
395 urbp->urb = urb; 385 urbp->urb = urb;
396 urbp->port = port; 386 urbp->port = port;
@@ -453,11 +443,11 @@ int c67x00_urb_enqueue(struct usb_hcd *hcd,
453 return 0; 443 return 0;
454 444
455err_epdata: 445err_epdata:
456 kfree(urbp);
457err_urbp:
458 usb_hcd_unlink_urb_from_ep(hcd, urb); 446 usb_hcd_unlink_urb_from_ep(hcd, urb);
459err_not_linked: 447err_not_linked:
460 spin_unlock_irqrestore(&c67x00->lock, flags); 448 spin_unlock_irqrestore(&c67x00->lock, flags);
449 kfree(urbp);
450err_urbp:
461 451
462 return ret; 452 return ret;
463} 453}
@@ -780,7 +770,8 @@ static int c67x00_add_iso_urb(struct c67x00_hcd *c67x00, struct urb *urb)
780 ret = c67x00_create_td(c67x00, urb, td_buf, len, pid, 0, 770 ret = c67x00_create_td(c67x00, urb, td_buf, len, pid, 0,
781 urbp->cnt); 771 urbp->cnt);
782 if (ret) { 772 if (ret) {
783 printk(KERN_DEBUG "create failed: %d\n", ret); 773 dev_dbg(c67x00_hcd_dev(c67x00), "create failed: %d\n",
774 ret);
784 urb->iso_frame_desc[urbp->cnt].actual_length = 0; 775 urb->iso_frame_desc[urbp->cnt].actual_length = 0;
785 urb->iso_frame_desc[urbp->cnt].status = ret; 776 urb->iso_frame_desc[urbp->cnt].status = ret;
786 if (urbp->cnt + 1 == urb->number_of_packets) 777 if (urbp->cnt + 1 == urb->number_of_packets)
diff --git a/drivers/usb/chipidea/Makefile b/drivers/usb/chipidea/Makefile
index a99d980454a6..7345d2115af2 100644
--- a/drivers/usb/chipidea/Makefile
+++ b/drivers/usb/chipidea/Makefile
@@ -17,5 +17,5 @@ ifneq ($(CONFIG_PCI),)
17endif 17endif
18 18
19ifneq ($(CONFIG_OF),) 19ifneq ($(CONFIG_OF),)
20 obj-$(CONFIG_USB_CHIPIDEA) += ci_hdrc_imx.o usbmisc_imx.o 20 obj-$(CONFIG_USB_CHIPIDEA) += usbmisc_imx.o ci_hdrc_imx.o
21endif 21endif
diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h
index 1c94fc5257f4..88b80f7728e4 100644
--- a/drivers/usb/chipidea/ci.h
+++ b/drivers/usb/chipidea/ci.h
@@ -26,6 +26,35 @@
26#define ENDPT_MAX 32 26#define ENDPT_MAX 32
27 27
28/****************************************************************************** 28/******************************************************************************
29 * REGISTERS
30 *****************************************************************************/
31/* register indices */
32enum ci_hw_regs {
33 CAP_CAPLENGTH,
34 CAP_HCCPARAMS,
35 CAP_DCCPARAMS,
36 CAP_TESTMODE,
37 CAP_LAST = CAP_TESTMODE,
38 OP_USBCMD,
39 OP_USBSTS,
40 OP_USBINTR,
41 OP_DEVICEADDR,
42 OP_ENDPTLISTADDR,
43 OP_PORTSC,
44 OP_DEVLC,
45 OP_OTGSC,
46 OP_USBMODE,
47 OP_ENDPTSETUPSTAT,
48 OP_ENDPTPRIME,
49 OP_ENDPTFLUSH,
50 OP_ENDPTSTAT,
51 OP_ENDPTCOMPLETE,
52 OP_ENDPTCTRL,
53 /* endptctrl1..15 follow */
54 OP_LAST = OP_ENDPTCTRL + ENDPT_MAX / 2,
55};
56
57/******************************************************************************
29 * STRUCTURES 58 * STRUCTURES
30 *****************************************************************************/ 59 *****************************************************************************/
31/** 60/**
@@ -98,7 +127,7 @@ struct hw_bank {
98 void __iomem *cap; 127 void __iomem *cap;
99 void __iomem *op; 128 void __iomem *op;
100 size_t size; 129 size_t size;
101 void __iomem **regmap; 130 void __iomem *regmap[OP_LAST + 1];
102}; 131};
103 132
104/** 133/**
@@ -135,6 +164,7 @@ struct hw_bank {
135 * @id_event: indicates there is an id event, and handled at ci_otg_work 164 * @id_event: indicates there is an id event, and handled at ci_otg_work
136 * @b_sess_valid_event: indicates there is a vbus event, and handled 165 * @b_sess_valid_event: indicates there is a vbus event, and handled
137 * at ci_otg_work 166 * at ci_otg_work
167 * @imx28_write_fix: Freescale imx28 needs swp instruction for writing
138 */ 168 */
139struct ci_hdrc { 169struct ci_hdrc {
140 struct device *dev; 170 struct device *dev;
@@ -173,6 +203,7 @@ struct ci_hdrc {
173 struct dentry *debugfs; 203 struct dentry *debugfs;
174 bool id_event; 204 bool id_event;
175 bool b_sess_valid_event; 205 bool b_sess_valid_event;
206 bool imx28_write_fix;
176}; 207};
177 208
178static inline struct ci_role_driver *ci_role(struct ci_hdrc *ci) 209static inline struct ci_role_driver *ci_role(struct ci_hdrc *ci)
@@ -209,38 +240,6 @@ static inline void ci_role_stop(struct ci_hdrc *ci)
209 ci->roles[role]->stop(ci); 240 ci->roles[role]->stop(ci);
210} 241}
211 242
212/******************************************************************************
213 * REGISTERS
214 *****************************************************************************/
215/* register size */
216#define REG_BITS (32)
217
218/* register indices */
219enum ci_hw_regs {
220 CAP_CAPLENGTH,
221 CAP_HCCPARAMS,
222 CAP_DCCPARAMS,
223 CAP_TESTMODE,
224 CAP_LAST = CAP_TESTMODE,
225 OP_USBCMD,
226 OP_USBSTS,
227 OP_USBINTR,
228 OP_DEVICEADDR,
229 OP_ENDPTLISTADDR,
230 OP_PORTSC,
231 OP_DEVLC,
232 OP_OTGSC,
233 OP_USBMODE,
234 OP_ENDPTSETUPSTAT,
235 OP_ENDPTPRIME,
236 OP_ENDPTFLUSH,
237 OP_ENDPTSTAT,
238 OP_ENDPTCOMPLETE,
239 OP_ENDPTCTRL,
240 /* endptctrl1..15 follow */
241 OP_LAST = OP_ENDPTCTRL + ENDPT_MAX / 2,
242};
243
244/** 243/**
245 * hw_read: reads from a hw register 244 * hw_read: reads from a hw register
246 * @reg: register index 245 * @reg: register index
@@ -253,6 +252,26 @@ static inline u32 hw_read(struct ci_hdrc *ci, enum ci_hw_regs reg, u32 mask)
253 return ioread32(ci->hw_bank.regmap[reg]) & mask; 252 return ioread32(ci->hw_bank.regmap[reg]) & mask;
254} 253}
255 254
255#ifdef CONFIG_SOC_IMX28
256static inline void imx28_ci_writel(u32 val, volatile void __iomem *addr)
257{
258 __asm__ ("swp %0, %0, [%1]" : : "r"(val), "r"(addr));
259}
260#else
261static inline void imx28_ci_writel(u32 val, volatile void __iomem *addr)
262{
263}
264#endif
265
266static inline void __hw_write(struct ci_hdrc *ci, u32 val,
267 void __iomem *addr)
268{
269 if (ci->imx28_write_fix)
270 imx28_ci_writel(val, addr);
271 else
272 iowrite32(val, addr);
273}
274
256/** 275/**
257 * hw_write: writes to a hw register 276 * hw_write: writes to a hw register
258 * @reg: register index 277 * @reg: register index
@@ -266,7 +285,7 @@ static inline void hw_write(struct ci_hdrc *ci, enum ci_hw_regs reg,
266 data = (ioread32(ci->hw_bank.regmap[reg]) & ~mask) 285 data = (ioread32(ci->hw_bank.regmap[reg]) & ~mask)
267 | (data & mask); 286 | (data & mask);
268 287
269 iowrite32(data, ci->hw_bank.regmap[reg]); 288 __hw_write(ci, data, ci->hw_bank.regmap[reg]);
270} 289}
271 290
272/** 291/**
@@ -281,7 +300,7 @@ static inline u32 hw_test_and_clear(struct ci_hdrc *ci, enum ci_hw_regs reg,
281{ 300{
282 u32 val = ioread32(ci->hw_bank.regmap[reg]) & mask; 301 u32 val = ioread32(ci->hw_bank.regmap[reg]) & mask;
283 302
284 iowrite32(val, ci->hw_bank.regmap[reg]); 303 __hw_write(ci, val, ci->hw_bank.regmap[reg]);
285 return val; 304 return val;
286} 305}
287 306
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
index bb5d976e5b81..c00f77257d36 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -23,6 +23,26 @@
23#include "ci.h" 23#include "ci.h"
24#include "ci_hdrc_imx.h" 24#include "ci_hdrc_imx.h"
25 25
26#define CI_HDRC_IMX_IMX28_WRITE_FIX BIT(0)
27
28struct ci_hdrc_imx_platform_flag {
29 unsigned int flags;
30};
31
32static const struct ci_hdrc_imx_platform_flag imx27_usb_data = {
33};
34
35static const struct ci_hdrc_imx_platform_flag imx28_usb_data = {
36 .flags = CI_HDRC_IMX_IMX28_WRITE_FIX,
37};
38
39static const struct of_device_id ci_hdrc_imx_dt_ids[] = {
40 { .compatible = "fsl,imx28-usb", .data = &imx28_usb_data},
41 { .compatible = "fsl,imx27-usb", .data = &imx27_usb_data},
42 { /* sentinel */ }
43};
44MODULE_DEVICE_TABLE(of, ci_hdrc_imx_dt_ids);
45
26struct ci_hdrc_imx_data { 46struct ci_hdrc_imx_data {
27 struct usb_phy *phy; 47 struct usb_phy *phy;
28 struct platform_device *ci_pdev; 48 struct platform_device *ci_pdev;
@@ -82,6 +102,9 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
82 CI_HDRC_DISABLE_STREAMING, 102 CI_HDRC_DISABLE_STREAMING,
83 }; 103 };
84 int ret; 104 int ret;
105 const struct of_device_id *of_id =
106 of_match_device(ci_hdrc_imx_dt_ids, &pdev->dev);
107 const struct ci_hdrc_imx_platform_flag *imx_platform_flag = of_id->data;
85 108
86 data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); 109 data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
87 if (!data) { 110 if (!data) {
@@ -115,6 +138,9 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
115 138
116 pdata.phy = data->phy; 139 pdata.phy = data->phy;
117 140
141 if (imx_platform_flag->flags & CI_HDRC_IMX_IMX28_WRITE_FIX)
142 pdata.flags |= CI_HDRC_IMX28_WRITE_FIX;
143
118 ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); 144 ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
119 if (ret) 145 if (ret)
120 goto err_clk; 146 goto err_clk;
@@ -173,12 +199,6 @@ static int ci_hdrc_imx_remove(struct platform_device *pdev)
173 return 0; 199 return 0;
174} 200}
175 201
176static const struct of_device_id ci_hdrc_imx_dt_ids[] = {
177 { .compatible = "fsl,imx27-usb", },
178 { /* sentinel */ }
179};
180MODULE_DEVICE_TABLE(of, ci_hdrc_imx_dt_ids);
181
182static struct platform_driver ci_hdrc_imx_driver = { 202static struct platform_driver ci_hdrc_imx_driver = {
183 .probe = ci_hdrc_imx_probe, 203 .probe = ci_hdrc_imx_probe,
184 .remove = ci_hdrc_imx_remove, 204 .remove = ci_hdrc_imx_remove,
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.h b/drivers/usb/chipidea/ci_hdrc_imx.h
index c7271590dd0a..996ec93467b2 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.h
+++ b/drivers/usb/chipidea/ci_hdrc_imx.h
@@ -9,6 +9,9 @@
9 * http://www.gnu.org/copyleft/gpl.html 9 * http://www.gnu.org/copyleft/gpl.html
10 */ 10 */
11 11
12#ifndef __DRIVER_USB_CHIPIDEA_CI_HDRC_IMX_H
13#define __DRIVER_USB_CHIPIDEA_CI_HDRC_IMX_H
14
12struct imx_usbmisc_data { 15struct imx_usbmisc_data {
13 int index; 16 int index;
14 17
@@ -18,3 +21,5 @@ struct imx_usbmisc_data {
18 21
19int imx_usbmisc_init(struct imx_usbmisc_data *); 22int imx_usbmisc_init(struct imx_usbmisc_data *);
20int imx_usbmisc_init_post(struct imx_usbmisc_data *); 23int imx_usbmisc_init_post(struct imx_usbmisc_data *);
24
25#endif /* __DRIVER_USB_CHIPIDEA_CI_HDRC_IMX_H */
diff --git a/drivers/usb/chipidea/ci_hdrc_pci.c b/drivers/usb/chipidea/ci_hdrc_pci.c
index d514332ac081..241ae3444fde 100644
--- a/drivers/usb/chipidea/ci_hdrc_pci.c
+++ b/drivers/usb/chipidea/ci_hdrc_pci.c
@@ -112,7 +112,7 @@ static void ci_hdrc_pci_remove(struct pci_dev *pdev)
112 * 112 *
113 * Check "pci.h" for details 113 * Check "pci.h" for details
114 */ 114 */
115static DEFINE_PCI_DEVICE_TABLE(ci_hdrc_pci_id_table) = { 115static const struct pci_device_id ci_hdrc_pci_id_table[] = {
116 { 116 {
117 PCI_DEVICE(0x153F, 0x1004), 117 PCI_DEVICE(0x153F, 0x1004),
118 .driver_data = (kernel_ulong_t)&pci_platdata, 118 .driver_data = (kernel_ulong_t)&pci_platdata,
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 6e73f8cd60e5..33f22bc6ad7f 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -75,61 +75,54 @@
75#include "otg.h" 75#include "otg.h"
76 76
77/* Controller register map */ 77/* Controller register map */
78static uintptr_t ci_regs_nolpm[] = { 78static const u8 ci_regs_nolpm[] = {
79 [CAP_CAPLENGTH] = 0x000UL, 79 [CAP_CAPLENGTH] = 0x00U,
80 [CAP_HCCPARAMS] = 0x008UL, 80 [CAP_HCCPARAMS] = 0x08U,
81 [CAP_DCCPARAMS] = 0x024UL, 81 [CAP_DCCPARAMS] = 0x24U,
82 [CAP_TESTMODE] = 0x038UL, 82 [CAP_TESTMODE] = 0x38U,
83 [OP_USBCMD] = 0x000UL, 83 [OP_USBCMD] = 0x00U,
84 [OP_USBSTS] = 0x004UL, 84 [OP_USBSTS] = 0x04U,
85 [OP_USBINTR] = 0x008UL, 85 [OP_USBINTR] = 0x08U,
86 [OP_DEVICEADDR] = 0x014UL, 86 [OP_DEVICEADDR] = 0x14U,
87 [OP_ENDPTLISTADDR] = 0x018UL, 87 [OP_ENDPTLISTADDR] = 0x18U,
88 [OP_PORTSC] = 0x044UL, 88 [OP_PORTSC] = 0x44U,
89 [OP_DEVLC] = 0x084UL, 89 [OP_DEVLC] = 0x84U,
90 [OP_OTGSC] = 0x064UL, 90 [OP_OTGSC] = 0x64U,
91 [OP_USBMODE] = 0x068UL, 91 [OP_USBMODE] = 0x68U,
92 [OP_ENDPTSETUPSTAT] = 0x06CUL, 92 [OP_ENDPTSETUPSTAT] = 0x6CU,
93 [OP_ENDPTPRIME] = 0x070UL, 93 [OP_ENDPTPRIME] = 0x70U,
94 [OP_ENDPTFLUSH] = 0x074UL, 94 [OP_ENDPTFLUSH] = 0x74U,
95 [OP_ENDPTSTAT] = 0x078UL, 95 [OP_ENDPTSTAT] = 0x78U,
96 [OP_ENDPTCOMPLETE] = 0x07CUL, 96 [OP_ENDPTCOMPLETE] = 0x7CU,
97 [OP_ENDPTCTRL] = 0x080UL, 97 [OP_ENDPTCTRL] = 0x80U,
98}; 98};
99 99
100static uintptr_t ci_regs_lpm[] = { 100static const u8 ci_regs_lpm[] = {
101 [CAP_CAPLENGTH] = 0x000UL, 101 [CAP_CAPLENGTH] = 0x00U,
102 [CAP_HCCPARAMS] = 0x008UL, 102 [CAP_HCCPARAMS] = 0x08U,
103 [CAP_DCCPARAMS] = 0x024UL, 103 [CAP_DCCPARAMS] = 0x24U,
104 [CAP_TESTMODE] = 0x0FCUL, 104 [CAP_TESTMODE] = 0xFCU,
105 [OP_USBCMD] = 0x000UL, 105 [OP_USBCMD] = 0x00U,
106 [OP_USBSTS] = 0x004UL, 106 [OP_USBSTS] = 0x04U,
107 [OP_USBINTR] = 0x008UL, 107 [OP_USBINTR] = 0x08U,
108 [OP_DEVICEADDR] = 0x014UL, 108 [OP_DEVICEADDR] = 0x14U,
109 [OP_ENDPTLISTADDR] = 0x018UL, 109 [OP_ENDPTLISTADDR] = 0x18U,
110 [OP_PORTSC] = 0x044UL, 110 [OP_PORTSC] = 0x44U,
111 [OP_DEVLC] = 0x084UL, 111 [OP_DEVLC] = 0x84U,
112 [OP_OTGSC] = 0x0C4UL, 112 [OP_OTGSC] = 0xC4U,
113 [OP_USBMODE] = 0x0C8UL, 113 [OP_USBMODE] = 0xC8U,
114 [OP_ENDPTSETUPSTAT] = 0x0D8UL, 114 [OP_ENDPTSETUPSTAT] = 0xD8U,
115 [OP_ENDPTPRIME] = 0x0DCUL, 115 [OP_ENDPTPRIME] = 0xDCU,
116 [OP_ENDPTFLUSH] = 0x0E0UL, 116 [OP_ENDPTFLUSH] = 0xE0U,
117 [OP_ENDPTSTAT] = 0x0E4UL, 117 [OP_ENDPTSTAT] = 0xE4U,
118 [OP_ENDPTCOMPLETE] = 0x0E8UL, 118 [OP_ENDPTCOMPLETE] = 0xE8U,
119 [OP_ENDPTCTRL] = 0x0ECUL, 119 [OP_ENDPTCTRL] = 0xECU,
120}; 120};
121 121
122static int hw_alloc_regmap(struct ci_hdrc *ci, bool is_lpm) 122static int hw_alloc_regmap(struct ci_hdrc *ci, bool is_lpm)
123{ 123{
124 int i; 124 int i;
125 125
126 kfree(ci->hw_bank.regmap);
127
128 ci->hw_bank.regmap = kzalloc((OP_LAST + 1) * sizeof(void *),
129 GFP_KERNEL);
130 if (!ci->hw_bank.regmap)
131 return -ENOMEM;
132
133 for (i = 0; i < OP_ENDPTCTRL; i++) 126 for (i = 0; i < OP_ENDPTCTRL; i++)
134 ci->hw_bank.regmap[i] = 127 ci->hw_bank.regmap[i] =
135 (i <= CAP_LAST ? ci->hw_bank.cap : ci->hw_bank.op) + 128 (i <= CAP_LAST ? ci->hw_bank.cap : ci->hw_bank.op) +
@@ -208,7 +201,8 @@ static int hw_device_init(struct ci_hdrc *ci, void __iomem *base)
208 reg = hw_read(ci, CAP_HCCPARAMS, HCCPARAMS_LEN) >> 201 reg = hw_read(ci, CAP_HCCPARAMS, HCCPARAMS_LEN) >>
209 __ffs(HCCPARAMS_LEN); 202 __ffs(HCCPARAMS_LEN);
210 ci->hw_bank.lpm = reg; 203 ci->hw_bank.lpm = reg;
211 hw_alloc_regmap(ci, !!reg); 204 if (reg)
205 hw_alloc_regmap(ci, !!reg);
212 ci->hw_bank.size = ci->hw_bank.op - ci->hw_bank.abs; 206 ci->hw_bank.size = ci->hw_bank.op - ci->hw_bank.abs;
213 ci->hw_bank.size += OP_LAST; 207 ci->hw_bank.size += OP_LAST;
214 ci->hw_bank.size /= sizeof(u32); 208 ci->hw_bank.size /= sizeof(u32);
@@ -242,7 +236,7 @@ static int hw_device_init(struct ci_hdrc *ci, void __iomem *base)
242 236
243static void hw_phymode_configure(struct ci_hdrc *ci) 237static void hw_phymode_configure(struct ci_hdrc *ci)
244{ 238{
245 u32 portsc, lpm, sts; 239 u32 portsc, lpm, sts = 0;
246 240
247 switch (ci->platdata->phy_mode) { 241 switch (ci->platdata->phy_mode) {
248 case USBPHY_INTERFACE_MODE_UTMI: 242 case USBPHY_INTERFACE_MODE_UTMI:
@@ -272,10 +266,12 @@ static void hw_phymode_configure(struct ci_hdrc *ci)
272 266
273 if (ci->hw_bank.lpm) { 267 if (ci->hw_bank.lpm) {
274 hw_write(ci, OP_DEVLC, DEVLC_PTS(7) | DEVLC_PTW, lpm); 268 hw_write(ci, OP_DEVLC, DEVLC_PTS(7) | DEVLC_PTW, lpm);
275 hw_write(ci, OP_DEVLC, DEVLC_STS, sts); 269 if (sts)
270 hw_write(ci, OP_DEVLC, DEVLC_STS, DEVLC_STS);
276 } else { 271 } else {
277 hw_write(ci, OP_PORTSC, PORTSC_PTS(7) | PORTSC_PTW, portsc); 272 hw_write(ci, OP_PORTSC, PORTSC_PTS(7) | PORTSC_PTW, portsc);
278 hw_write(ci, OP_PORTSC, PORTSC_STS, sts); 273 if (sts)
274 hw_write(ci, OP_PORTSC, PORTSC_STS, PORTSC_STS);
279 } 275 }
280} 276}
281 277
@@ -554,6 +550,8 @@ static int ci_hdrc_probe(struct platform_device *pdev)
554 550
555 ci->dev = dev; 551 ci->dev = dev;
556 ci->platdata = dev->platform_data; 552 ci->platdata = dev->platform_data;
553 ci->imx28_write_fix = !!(ci->platdata->flags &
554 CI_HDRC_IMX28_WRITE_FIX);
557 555
558 ret = hw_device_init(ci, base); 556 ret = hw_device_init(ci, base);
559 if (ret < 0) { 557 if (ret < 0) {
@@ -561,6 +559,8 @@ static int ci_hdrc_probe(struct platform_device *pdev)
561 return -ENODEV; 559 return -ENODEV;
562 } 560 }
563 561
562 hw_phymode_configure(ci);
563
564 ret = ci_usb_phy_init(ci); 564 ret = ci_usb_phy_init(ci);
565 if (ret) { 565 if (ret) {
566 dev_err(dev, "unable to init phy: %d\n", ret); 566 dev_err(dev, "unable to init phy: %d\n", ret);
@@ -578,8 +578,6 @@ static int ci_hdrc_probe(struct platform_device *pdev)
578 578
579 ci_get_otg_capable(ci); 579 ci_get_otg_capable(ci);
580 580
581 hw_phymode_configure(ci);
582
583 dr_mode = ci->platdata->dr_mode; 581 dr_mode = ci->platdata->dr_mode;
584 /* initialize role(s) before the interrupt is requested */ 582 /* initialize role(s) before the interrupt is requested */
585 if (dr_mode == USB_DR_MODE_OTG || dr_mode == USB_DR_MODE_HOST) { 583 if (dr_mode == USB_DR_MODE_OTG || dr_mode == USB_DR_MODE_HOST) {
@@ -680,7 +678,6 @@ static int ci_hdrc_remove(struct platform_device *pdev)
680 ci_role_destroy(ci); 678 ci_role_destroy(ci);
681 ci_hdrc_enter_lpm(ci, true); 679 ci_hdrc_enter_lpm(ci, true);
682 ci_usb_phy_destroy(ci); 680 ci_usb_phy_destroy(ci);
683 kfree(ci->hw_bank.regmap);
684 681
685 return 0; 682 return 0;
686} 683}
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
index 526cd77563d8..a8ac6c16dac9 100644
--- a/drivers/usb/chipidea/host.c
+++ b/drivers/usb/chipidea/host.c
@@ -65,6 +65,7 @@ static int host_start(struct ci_hdrc *ci)
65 ehci->caps = ci->hw_bank.cap; 65 ehci->caps = ci->hw_bank.cap;
66 ehci->has_hostpc = ci->hw_bank.lpm; 66 ehci->has_hostpc = ci->hw_bank.lpm;
67 ehci->has_tdi_phy_lpm = ci->hw_bank.lpm; 67 ehci->has_tdi_phy_lpm = ci->hw_bank.lpm;
68 ehci->imx28_write_fix = ci->imx28_write_fix;
68 69
69 if (ci->platdata->reg_vbus) { 70 if (ci->platdata->reg_vbus) {
70 ret = regulator_enable(ci->platdata->reg_vbus); 71 ret = regulator_enable(ci->platdata->reg_vbus);
diff --git a/drivers/usb/chipidea/otg.h b/drivers/usb/chipidea/otg.h
index 2d9f090733bc..449bee07f4fe 100644
--- a/drivers/usb/chipidea/otg.h
+++ b/drivers/usb/chipidea/otg.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2013 Freescale Semiconductor, Inc. 2 * Copyright (C) 2013-2014 Freescale Semiconductor, Inc.
3 * 3 *
4 * Author: Peter Chen 4 * Author: Peter Chen
5 * 5 *
@@ -19,12 +19,12 @@ static inline void ci_clear_otg_interrupt(struct ci_hdrc *ci, u32 bits)
19 19
20static inline void ci_enable_otg_interrupt(struct ci_hdrc *ci, u32 bits) 20static inline void ci_enable_otg_interrupt(struct ci_hdrc *ci, u32 bits)
21{ 21{
22 hw_write(ci, OP_OTGSC, bits, bits); 22 hw_write(ci, OP_OTGSC, bits | OTGSC_INT_STATUS_BITS, bits);
23} 23}
24 24
25static inline void ci_disable_otg_interrupt(struct ci_hdrc *ci, u32 bits) 25static inline void ci_disable_otg_interrupt(struct ci_hdrc *ci, u32 bits)
26{ 26{
27 hw_write(ci, OP_OTGSC, bits, 0); 27 hw_write(ci, OP_OTGSC, bits | OTGSC_INT_STATUS_BITS, 0);
28} 28}
29 29
30int ci_hdrc_otg_init(struct ci_hdrc *ci); 30int ci_hdrc_otg_init(struct ci_hdrc *ci);
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 69d20fbb38a2..80de2f88ed2c 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -393,6 +393,14 @@ static int add_td_to_list(struct ci_hw_ep *hwep, struct ci_hw_req *hwreq,
393 node->ptr->token = cpu_to_le32(length << __ffs(TD_TOTAL_BYTES)); 393 node->ptr->token = cpu_to_le32(length << __ffs(TD_TOTAL_BYTES));
394 node->ptr->token &= cpu_to_le32(TD_TOTAL_BYTES); 394 node->ptr->token &= cpu_to_le32(TD_TOTAL_BYTES);
395 node->ptr->token |= cpu_to_le32(TD_STATUS_ACTIVE); 395 node->ptr->token |= cpu_to_le32(TD_STATUS_ACTIVE);
396 if (hwep->type == USB_ENDPOINT_XFER_ISOC && hwep->dir == TX) {
397 u32 mul = hwreq->req.length / hwep->ep.maxpacket;
398
399 if (hwreq->req.length == 0
400 || hwreq->req.length % hwep->ep.maxpacket)
401 mul++;
402 node->ptr->token |= mul << __ffs(TD_MULTO);
403 }
396 404
397 temp = (u32) (hwreq->req.dma + hwreq->req.actual); 405 temp = (u32) (hwreq->req.dma + hwreq->req.actual);
398 if (length) { 406 if (length) {
@@ -515,10 +523,11 @@ static int _hardware_enqueue(struct ci_hw_ep *hwep, struct ci_hw_req *hwreq)
515 hwep->qh.ptr->td.token &= 523 hwep->qh.ptr->td.token &=
516 cpu_to_le32(~(TD_STATUS_HALTED|TD_STATUS_ACTIVE)); 524 cpu_to_le32(~(TD_STATUS_HALTED|TD_STATUS_ACTIVE));
517 525
518 if (hwep->type == USB_ENDPOINT_XFER_ISOC) { 526 if (hwep->type == USB_ENDPOINT_XFER_ISOC && hwep->dir == RX) {
519 u32 mul = hwreq->req.length / hwep->ep.maxpacket; 527 u32 mul = hwreq->req.length / hwep->ep.maxpacket;
520 528
521 if (hwreq->req.length % hwep->ep.maxpacket) 529 if (hwreq->req.length == 0
530 || hwreq->req.length % hwep->ep.maxpacket)
522 mul++; 531 mul++;
523 hwep->qh.ptr->cap |= mul << __ffs(QH_MULT); 532 hwep->qh.ptr->cap |= mul << __ffs(QH_MULT);
524 } 533 }
@@ -1173,6 +1182,12 @@ static int ep_enable(struct usb_ep *ep,
1173 if (hwep->num) 1182 if (hwep->num)
1174 cap |= QH_ZLT; 1183 cap |= QH_ZLT;
1175 cap |= (hwep->ep.maxpacket << __ffs(QH_MAX_PKT)) & QH_MAX_PKT; 1184 cap |= (hwep->ep.maxpacket << __ffs(QH_MAX_PKT)) & QH_MAX_PKT;
1185 /*
1186 * For ISO-TX, we set mult at QH as the largest value, and use
1187 * MultO at TD as real mult value.
1188 */
1189 if (hwep->type == USB_ENDPOINT_XFER_ISOC && hwep->dir == TX)
1190 cap |= 3 << __ffs(QH_MULT);
1176 1191
1177 hwep->qh.ptr->cap = cpu_to_le32(cap); 1192 hwep->qh.ptr->cap = cpu_to_le32(cap);
1178 1193
@@ -1566,7 +1581,7 @@ static int init_eps(struct ci_hdrc *ci)
1566 * eps, maxP is set by epautoconfig() called 1581 * eps, maxP is set by epautoconfig() called
1567 * by gadget layer 1582 * by gadget layer
1568 */ 1583 */
1569 hwep->ep.maxpacket = (unsigned short)~0; 1584 usb_ep_set_maxpacket_limit(&hwep->ep, (unsigned short)~0);
1570 1585
1571 INIT_LIST_HEAD(&hwep->qh.queue); 1586 INIT_LIST_HEAD(&hwep->qh.queue);
1572 hwep->qh.ptr = dma_pool_alloc(ci->qh_pool, GFP_KERNEL, 1587 hwep->qh.ptr = dma_pool_alloc(ci->qh_pool, GFP_KERNEL,
@@ -1586,7 +1601,7 @@ static int init_eps(struct ci_hdrc *ci)
1586 else 1601 else
1587 ci->ep0in = hwep; 1602 ci->ep0in = hwep;
1588 1603
1589 hwep->ep.maxpacket = CTRL_PAYLOAD_MAX; 1604 usb_ep_set_maxpacket_limit(&hwep->ep, CTRL_PAYLOAD_MAX);
1590 continue; 1605 continue;
1591 } 1606 }
1592 1607
diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c
index 8a1094b1182f..cd061abe3507 100644
--- a/drivers/usb/chipidea/usbmisc_imx.c
+++ b/drivers/usb/chipidea/usbmisc_imx.c
@@ -21,6 +21,10 @@
21#define MX25_USB_PHY_CTRL_OFFSET 0x08 21#define MX25_USB_PHY_CTRL_OFFSET 0x08
22#define MX25_BM_EXTERNAL_VBUS_DIVIDER BIT(23) 22#define MX25_BM_EXTERNAL_VBUS_DIVIDER BIT(23)
23 23
24#define MX27_H1_PM_BIT BIT(8)
25#define MX27_H2_PM_BIT BIT(16)
26#define MX27_OTG_PM_BIT BIT(24)
27
24#define MX53_USB_OTG_PHY_CTRL_0_OFFSET 0x08 28#define MX53_USB_OTG_PHY_CTRL_0_OFFSET 0x08
25#define MX53_USB_UH2_CTRL_OFFSET 0x14 29#define MX53_USB_UH2_CTRL_OFFSET 0x14
26#define MX53_USB_UH3_CTRL_OFFSET 0x18 30#define MX53_USB_UH3_CTRL_OFFSET 0x18
@@ -68,6 +72,36 @@ static int usbmisc_imx25_post(struct imx_usbmisc_data *data)
68 return 0; 72 return 0;
69} 73}
70 74
75static int usbmisc_imx27_init(struct imx_usbmisc_data *data)
76{
77 unsigned long flags;
78 u32 val;
79
80 switch (data->index) {
81 case 0:
82 val = MX27_OTG_PM_BIT;
83 break;
84 case 1:
85 val = MX27_H1_PM_BIT;
86 break;
87 case 2:
88 val = MX27_H2_PM_BIT;
89 break;
90 default:
91 return -EINVAL;
92 };
93
94 spin_lock_irqsave(&usbmisc->lock, flags);
95 if (data->disable_oc)
96 val = readl(usbmisc->base) | val;
97 else
98 val = readl(usbmisc->base) & ~val;
99 writel(val, usbmisc->base);
100 spin_unlock_irqrestore(&usbmisc->lock, flags);
101
102 return 0;
103}
104
71static int usbmisc_imx53_init(struct imx_usbmisc_data *data) 105static int usbmisc_imx53_init(struct imx_usbmisc_data *data)
72{ 106{
73 void __iomem *reg = NULL; 107 void __iomem *reg = NULL;
@@ -128,6 +162,10 @@ static const struct usbmisc_ops imx25_usbmisc_ops = {
128 .post = usbmisc_imx25_post, 162 .post = usbmisc_imx25_post,
129}; 163};
130 164
165static const struct usbmisc_ops imx27_usbmisc_ops = {
166 .init = usbmisc_imx27_init,
167};
168
131static const struct usbmisc_ops imx53_usbmisc_ops = { 169static const struct usbmisc_ops imx53_usbmisc_ops = {
132 .init = usbmisc_imx53_init, 170 .init = usbmisc_imx53_init,
133}; 171};
@@ -162,6 +200,14 @@ static const struct of_device_id usbmisc_imx_dt_ids[] = {
162 .data = &imx25_usbmisc_ops, 200 .data = &imx25_usbmisc_ops,
163 }, 201 },
164 { 202 {
203 .compatible = "fsl,imx27-usbmisc",
204 .data = &imx27_usbmisc_ops,
205 },
206 {
207 .compatible = "fsl,imx51-usbmisc",
208 .data = &imx53_usbmisc_ops,
209 },
210 {
165 .compatible = "fsl,imx53-usbmisc", 211 .compatible = "fsl,imx53-usbmisc",
166 .data = &imx53_usbmisc_ops, 212 .data = &imx53_usbmisc_ops,
167 }, 213 },
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index e8404319ca68..900f7ff805ee 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -262,6 +262,7 @@ static void acm_ctrl_irq(struct urb *urb)
262 struct usb_cdc_notification *dr = urb->transfer_buffer; 262 struct usb_cdc_notification *dr = urb->transfer_buffer;
263 unsigned char *data; 263 unsigned char *data;
264 int newctrl; 264 int newctrl;
265 int difference;
265 int retval; 266 int retval;
266 int status = urb->status; 267 int status = urb->status;
267 268
@@ -302,20 +303,31 @@ static void acm_ctrl_irq(struct urb *urb)
302 tty_port_tty_hangup(&acm->port, false); 303 tty_port_tty_hangup(&acm->port, false);
303 } 304 }
304 305
306 difference = acm->ctrlin ^ newctrl;
307 spin_lock(&acm->read_lock);
305 acm->ctrlin = newctrl; 308 acm->ctrlin = newctrl;
309 acm->oldcount = acm->iocount;
310
311 if (difference & ACM_CTRL_DSR)
312 acm->iocount.dsr++;
313 if (difference & ACM_CTRL_BRK)
314 acm->iocount.brk++;
315 if (difference & ACM_CTRL_RI)
316 acm->iocount.rng++;
317 if (difference & ACM_CTRL_DCD)
318 acm->iocount.dcd++;
319 if (difference & ACM_CTRL_FRAMING)
320 acm->iocount.frame++;
321 if (difference & ACM_CTRL_PARITY)
322 acm->iocount.parity++;
323 if (difference & ACM_CTRL_OVERRUN)
324 acm->iocount.overrun++;
325 spin_unlock(&acm->read_lock);
326
327 if (difference)
328 wake_up_all(&acm->wioctl);
306 329
307 dev_dbg(&acm->control->dev, 330 break;
308 "%s - input control lines: dcd%c dsr%c break%c "
309 "ring%c framing%c parity%c overrun%c\n",
310 __func__,
311 acm->ctrlin & ACM_CTRL_DCD ? '+' : '-',
312 acm->ctrlin & ACM_CTRL_DSR ? '+' : '-',
313 acm->ctrlin & ACM_CTRL_BRK ? '+' : '-',
314 acm->ctrlin & ACM_CTRL_RI ? '+' : '-',
315 acm->ctrlin & ACM_CTRL_FRAMING ? '+' : '-',
316 acm->ctrlin & ACM_CTRL_PARITY ? '+' : '-',
317 acm->ctrlin & ACM_CTRL_OVERRUN ? '+' : '-');
318 break;
319 331
320 default: 332 default:
321 dev_dbg(&acm->control->dev, 333 dev_dbg(&acm->control->dev,
@@ -796,6 +808,72 @@ static int set_serial_info(struct acm *acm,
796 return retval; 808 return retval;
797} 809}
798 810
811static int wait_serial_change(struct acm *acm, unsigned long arg)
812{
813 int rv = 0;
814 DECLARE_WAITQUEUE(wait, current);
815 struct async_icount old, new;
816
817 if (arg & (TIOCM_DSR | TIOCM_RI | TIOCM_CD ))
818 return -EINVAL;
819 do {
820 spin_lock_irq(&acm->read_lock);
821 old = acm->oldcount;
822 new = acm->iocount;
823 acm->oldcount = new;
824 spin_unlock_irq(&acm->read_lock);
825
826 if ((arg & TIOCM_DSR) &&
827 old.dsr != new.dsr)
828 break;
829 if ((arg & TIOCM_CD) &&
830 old.dcd != new.dcd)
831 break;
832 if ((arg & TIOCM_RI) &&
833 old.rng != new.rng)
834 break;
835
836 add_wait_queue(&acm->wioctl, &wait);
837 set_current_state(TASK_INTERRUPTIBLE);
838 schedule();
839 remove_wait_queue(&acm->wioctl, &wait);
840 if (acm->disconnected) {
841 if (arg & TIOCM_CD)
842 break;
843 else
844 rv = -ENODEV;
845 } else {
846 if (signal_pending(current))
847 rv = -ERESTARTSYS;
848 }
849 } while (!rv);
850
851
852
853 return rv;
854}
855
856static int get_serial_usage(struct acm *acm,
857 struct serial_icounter_struct __user *count)
858{
859 struct serial_icounter_struct icount;
860 int rv = 0;
861
862 memset(&icount, 0, sizeof(icount));
863 icount.dsr = acm->iocount.dsr;
864 icount.rng = acm->iocount.rng;
865 icount.dcd = acm->iocount.dcd;
866 icount.frame = acm->iocount.frame;
867 icount.overrun = acm->iocount.overrun;
868 icount.parity = acm->iocount.parity;
869 icount.brk = acm->iocount.brk;
870
871 if (copy_to_user(count, &icount, sizeof(icount)) > 0)
872 rv = -EFAULT;
873
874 return rv;
875}
876
799static int acm_tty_ioctl(struct tty_struct *tty, 877static int acm_tty_ioctl(struct tty_struct *tty,
800 unsigned int cmd, unsigned long arg) 878 unsigned int cmd, unsigned long arg)
801{ 879{
@@ -809,6 +887,18 @@ static int acm_tty_ioctl(struct tty_struct *tty,
809 case TIOCSSERIAL: 887 case TIOCSSERIAL:
810 rv = set_serial_info(acm, (struct serial_struct __user *) arg); 888 rv = set_serial_info(acm, (struct serial_struct __user *) arg);
811 break; 889 break;
890 case TIOCMIWAIT:
891 rv = usb_autopm_get_interface(acm->control);
892 if (rv < 0) {
893 rv = -EIO;
894 break;
895 }
896 rv = wait_serial_change(acm, arg);
897 usb_autopm_put_interface(acm->control);
898 break;
899 case TIOCGICOUNT:
900 rv = get_serial_usage(acm, (struct serial_icounter_struct __user *) arg);
901 break;
812 } 902 }
813 903
814 return rv; 904 return rv;
@@ -1167,6 +1257,7 @@ made_compressed_probe:
1167 acm->readsize = readsize; 1257 acm->readsize = readsize;
1168 acm->rx_buflimit = num_rx_buf; 1258 acm->rx_buflimit = num_rx_buf;
1169 INIT_WORK(&acm->work, acm_softint); 1259 INIT_WORK(&acm->work, acm_softint);
1260 init_waitqueue_head(&acm->wioctl);
1170 spin_lock_init(&acm->write_lock); 1261 spin_lock_init(&acm->write_lock);
1171 spin_lock_init(&acm->read_lock); 1262 spin_lock_init(&acm->read_lock);
1172 mutex_init(&acm->mutex); 1263 mutex_init(&acm->mutex);
@@ -1383,6 +1474,7 @@ static void acm_disconnect(struct usb_interface *intf)
1383 device_remove_file(&acm->control->dev, 1474 device_remove_file(&acm->control->dev,
1384 &dev_attr_iCountryCodeRelDate); 1475 &dev_attr_iCountryCodeRelDate);
1385 } 1476 }
1477 wake_up_all(&acm->wioctl);
1386 device_remove_file(&acm->control->dev, &dev_attr_bmCapabilities); 1478 device_remove_file(&acm->control->dev, &dev_attr_bmCapabilities);
1387 usb_set_intfdata(acm->control, NULL); 1479 usb_set_intfdata(acm->control, NULL);
1388 usb_set_intfdata(acm->data, NULL); 1480 usb_set_intfdata(acm->data, NULL);
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
index 0f76e4af600e..e38dc785808f 100644
--- a/drivers/usb/class/cdc-acm.h
+++ b/drivers/usb/class/cdc-acm.h
@@ -106,6 +106,9 @@ struct acm {
106 struct work_struct work; /* work queue entry for line discipline waking up */ 106 struct work_struct work; /* work queue entry for line discipline waking up */
107 unsigned int ctrlin; /* input control lines (DCD, DSR, RI, break, overruns) */ 107 unsigned int ctrlin; /* input control lines (DCD, DSR, RI, break, overruns) */
108 unsigned int ctrlout; /* output control lines (DTR, RTS) */ 108 unsigned int ctrlout; /* output control lines (DTR, RTS) */
109 struct async_icount iocount; /* counters for control line changes */
110 struct async_icount oldcount; /* for comparison of counter */
111 wait_queue_head_t wioctl; /* for ioctl */
109 unsigned int writesize; /* max packet size for the output bulk endpoint */ 112 unsigned int writesize; /* max packet size for the output bulk endpoint */
110 unsigned int readsize,ctrlsize; /* buffer sizes for freeing */ 113 unsigned int readsize,ctrlsize; /* buffer sizes for freeing */
111 unsigned int minor; /* acm minor number */ 114 unsigned int minor; /* acm minor number */
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index 0b23a8639311..a051a7a2b1bd 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -432,6 +432,38 @@ outnl:
432 return rv < 0 ? rv : count; 432 return rv < 0 ? rv : count;
433} 433}
434 434
435/*
436 * clear WDM_READ flag and possibly submit the read urb if resp_count
437 * is non-zero.
438 *
439 * Called with desc->iuspin locked
440 */
441static int clear_wdm_read_flag(struct wdm_device *desc)
442{
443 int rv = 0;
444
445 clear_bit(WDM_READ, &desc->flags);
446
447 /* submit read urb only if the device is waiting for it */
448 if (!desc->resp_count || !--desc->resp_count)
449 goto out;
450
451 set_bit(WDM_RESPONDING, &desc->flags);
452 spin_unlock_irq(&desc->iuspin);
453 rv = usb_submit_urb(desc->response, GFP_KERNEL);
454 spin_lock_irq(&desc->iuspin);
455 if (rv) {
456 dev_err(&desc->intf->dev,
457 "usb_submit_urb failed with result %d\n", rv);
458
459 /* make sure the next notification trigger a submit */
460 clear_bit(WDM_RESPONDING, &desc->flags);
461 desc->resp_count = 0;
462 }
463out:
464 return rv;
465}
466
435static ssize_t wdm_read 467static ssize_t wdm_read
436(struct file *file, char __user *buffer, size_t count, loff_t *ppos) 468(struct file *file, char __user *buffer, size_t count, loff_t *ppos)
437{ 469{
@@ -503,8 +535,10 @@ retry:
503 535
504 if (!desc->reslength) { /* zero length read */ 536 if (!desc->reslength) { /* zero length read */
505 dev_dbg(&desc->intf->dev, "%s: zero length - clearing WDM_READ\n", __func__); 537 dev_dbg(&desc->intf->dev, "%s: zero length - clearing WDM_READ\n", __func__);
506 clear_bit(WDM_READ, &desc->flags); 538 rv = clear_wdm_read_flag(desc);
507 spin_unlock_irq(&desc->iuspin); 539 spin_unlock_irq(&desc->iuspin);
540 if (rv < 0)
541 goto err;
508 goto retry; 542 goto retry;
509 } 543 }
510 cntr = desc->length; 544 cntr = desc->length;
@@ -526,37 +560,9 @@ retry:
526 560
527 desc->length -= cntr; 561 desc->length -= cntr;
528 /* in case we had outstanding data */ 562 /* in case we had outstanding data */
529 if (!desc->length) { 563 if (!desc->length)
530 clear_bit(WDM_READ, &desc->flags); 564 clear_wdm_read_flag(desc);
531 565 spin_unlock_irq(&desc->iuspin);
532 if (--desc->resp_count) {
533 set_bit(WDM_RESPONDING, &desc->flags);
534 spin_unlock_irq(&desc->iuspin);
535
536 rv = usb_submit_urb(desc->response, GFP_KERNEL);
537 if (rv) {
538 dev_err(&desc->intf->dev,
539 "%s: usb_submit_urb failed with result %d\n",
540 __func__, rv);
541 spin_lock_irq(&desc->iuspin);
542 clear_bit(WDM_RESPONDING, &desc->flags);
543 spin_unlock_irq(&desc->iuspin);
544
545 if (rv == -ENOMEM) {
546 rv = schedule_work(&desc->rxwork);
547 if (rv)
548 dev_err(&desc->intf->dev, "Cannot schedule work\n");
549 } else {
550 spin_lock_irq(&desc->iuspin);
551 desc->resp_count = 0;
552 spin_unlock_irq(&desc->iuspin);
553 }
554 }
555 } else
556 spin_unlock_irq(&desc->iuspin);
557 } else
558 spin_unlock_irq(&desc->iuspin);
559
560 rv = cntr; 566 rv = cntr;
561 567
562err: 568err:
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index d4c47d5d7625..0924ee40a966 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -52,7 +52,6 @@
52#include <linux/sched.h> 52#include <linux/sched.h>
53#include <linux/signal.h> 53#include <linux/signal.h>
54#include <linux/poll.h> 54#include <linux/poll.h>
55#include <linux/init.h>
56#include <linux/slab.h> 55#include <linux/slab.h>
57#include <linux/lp.h> 56#include <linux/lp.h>
58#include <linux/mutex.h> 57#include <linux/mutex.h>
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 09de131ee0cb..cfbec9c7e09e 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -21,7 +21,6 @@
21 21
22#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 22#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
23 23
24#include <linux/init.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/kernel.h> 25#include <linux/kernel.h>
27#include <linux/fs.h> 26#include <linux/fs.h>
diff --git a/drivers/usb/core/Makefile b/drivers/usb/core/Makefile
index 5e847ad2f58a..2f6f93220046 100644
--- a/drivers/usb/core/Makefile
+++ b/drivers/usb/core/Makefile
@@ -2,8 +2,6 @@
2# Makefile for USB Core files and filesystem 2# Makefile for USB Core files and filesystem
3# 3#
4 4
5ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
6
7usbcore-y := usb.o hub.o hcd.o urb.o message.o driver.o 5usbcore-y := usb.o hub.o hcd.o urb.o message.o driver.o
8usbcore-y += config.o file.o buffer.o sysfs.o endpoint.o 6usbcore-y += config.o file.o buffer.o sysfs.o endpoint.o
9usbcore-y += devio.o notify.o generic.o quirks.o devices.o 7usbcore-y += devio.o notify.o generic.o quirks.o devices.o
diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c
index 23559746be92..684ef70dc09d 100644
--- a/drivers/usb/core/buffer.c
+++ b/drivers/usb/core/buffer.c
@@ -2,7 +2,7 @@
2 * DMA memory management for framework level HCD code (hc_driver) 2 * DMA memory management for framework level HCD code (hc_driver)
3 * 3 *
4 * This implementation plugs in through generic "usb_bus" level methods, 4 * This implementation plugs in through generic "usb_bus" level methods,
5 * and should work with all USB controllers, regardles of bus type. 5 * and should work with all USB controllers, regardless of bus type.
6 */ 6 */
7 7
8#include <linux/module.h> 8#include <linux/module.h>
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index a6b2cabe7930..8d72f0c65937 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -3,7 +3,6 @@
3#include <linux/usb/hcd.h> 3#include <linux/usb/hcd.h>
4#include <linux/usb/quirks.h> 4#include <linux/usb/quirks.h>
5#include <linux/module.h> 5#include <linux/module.h>
6#include <linux/init.h>
7#include <linux/slab.h> 6#include <linux/slab.h>
8#include <linux/device.h> 7#include <linux/device.h>
9#include <asm/byteorder.h> 8#include <asm/byteorder.h>
@@ -651,10 +650,6 @@ void usb_destroy_configuration(struct usb_device *dev)
651 * 650 *
652 * hub-only!! ... and only in reset path, or usb_new_device() 651 * hub-only!! ... and only in reset path, or usb_new_device()
653 * (used by real hubs and virtual root hubs) 652 * (used by real hubs and virtual root hubs)
654 *
655 * NOTE: if this is a WUSB device and is not authorized, we skip the
656 * whole thing. A non-authorized USB device has no
657 * configurations.
658 */ 653 */
659int usb_get_configuration(struct usb_device *dev) 654int usb_get_configuration(struct usb_device *dev)
660{ 655{
@@ -666,8 +661,6 @@ int usb_get_configuration(struct usb_device *dev)
666 struct usb_config_descriptor *desc; 661 struct usb_config_descriptor *desc;
667 662
668 cfgno = 0; 663 cfgno = 0;
669 if (dev->authorized == 0) /* Not really an error */
670 goto out_not_authorized;
671 result = -ENOMEM; 664 result = -ENOMEM;
672 if (ncfg > USB_MAXCONFIG) { 665 if (ncfg > USB_MAXCONFIG) {
673 dev_warn(ddev, "too many configurations: %d, " 666 dev_warn(ddev, "too many configurations: %d, "
@@ -751,7 +744,6 @@ int usb_get_configuration(struct usb_device *dev)
751 744
752err: 745err:
753 kfree(desc); 746 kfree(desc);
754out_not_authorized:
755 dev->descriptor.bNumConfigurations = cfgno; 747 dev->descriptor.bNumConfigurations = cfgno;
756err2: 748err2:
757 if (result == -ENOMEM) 749 if (result == -ENOMEM)
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 967152a63bd3..90e18f6fa2bb 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -118,7 +118,7 @@ module_param(usbfs_memory_mb, uint, 0644);
118MODULE_PARM_DESC(usbfs_memory_mb, 118MODULE_PARM_DESC(usbfs_memory_mb,
119 "maximum MB allowed for usbfs buffers (0 = no limit)"); 119 "maximum MB allowed for usbfs buffers (0 = no limit)");
120 120
121/* Hard limit, necessary to avoid aithmetic overflow */ 121/* Hard limit, necessary to avoid arithmetic overflow */
122#define USBFS_XFER_MAX (UINT_MAX / 2 - 1000000) 122#define USBFS_XFER_MAX (UINT_MAX / 2 - 1000000)
123 123
124static atomic_t usbfs_memory_usage; /* Total memory currently allocated */ 124static atomic_t usbfs_memory_usage; /* Total memory currently allocated */
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index 47aade2a5e74..5d01558cef66 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -37,6 +37,7 @@
37 * and cause the driver to probe for all devices again. 37 * and cause the driver to probe for all devices again.
38 */ 38 */
39ssize_t usb_store_new_id(struct usb_dynids *dynids, 39ssize_t usb_store_new_id(struct usb_dynids *dynids,
40 const struct usb_device_id *id_table,
40 struct device_driver *driver, 41 struct device_driver *driver,
41 const char *buf, size_t count) 42 const char *buf, size_t count)
42{ 43{
@@ -44,11 +45,12 @@ ssize_t usb_store_new_id(struct usb_dynids *dynids,
44 u32 idVendor = 0; 45 u32 idVendor = 0;
45 u32 idProduct = 0; 46 u32 idProduct = 0;
46 unsigned int bInterfaceClass = 0; 47 unsigned int bInterfaceClass = 0;
48 u32 refVendor, refProduct;
47 int fields = 0; 49 int fields = 0;
48 int retval = 0; 50 int retval = 0;
49 51
50 fields = sscanf(buf, "%x %x %x", &idVendor, &idProduct, 52 fields = sscanf(buf, "%x %x %x %x %x", &idVendor, &idProduct,
51 &bInterfaceClass); 53 &bInterfaceClass, &refVendor, &refProduct);
52 if (fields < 2) 54 if (fields < 2)
53 return -EINVAL; 55 return -EINVAL;
54 56
@@ -60,11 +62,30 @@ ssize_t usb_store_new_id(struct usb_dynids *dynids,
60 dynid->id.idVendor = idVendor; 62 dynid->id.idVendor = idVendor;
61 dynid->id.idProduct = idProduct; 63 dynid->id.idProduct = idProduct;
62 dynid->id.match_flags = USB_DEVICE_ID_MATCH_DEVICE; 64 dynid->id.match_flags = USB_DEVICE_ID_MATCH_DEVICE;
63 if (fields == 3) { 65 if (fields > 2 && bInterfaceClass) {
66 if (bInterfaceClass > 255)
67 return -EINVAL;
68
64 dynid->id.bInterfaceClass = (u8)bInterfaceClass; 69 dynid->id.bInterfaceClass = (u8)bInterfaceClass;
65 dynid->id.match_flags |= USB_DEVICE_ID_MATCH_INT_CLASS; 70 dynid->id.match_flags |= USB_DEVICE_ID_MATCH_INT_CLASS;
66 } 71 }
67 72
73 if (fields > 4) {
74 const struct usb_device_id *id = id_table;
75
76 if (!id)
77 return -ENODEV;
78
79 for (; id->match_flags; id++)
80 if (id->idVendor == refVendor && id->idProduct == refProduct)
81 break;
82
83 if (id->match_flags)
84 dynid->id.driver_info = id->driver_info;
85 else
86 return -ENODEV;
87 }
88
68 spin_lock(&dynids->lock); 89 spin_lock(&dynids->lock);
69 list_add_tail(&dynid->node, &dynids->list); 90 list_add_tail(&dynid->node, &dynids->list);
70 spin_unlock(&dynids->lock); 91 spin_unlock(&dynids->lock);
@@ -106,7 +127,7 @@ static ssize_t new_id_store(struct device_driver *driver,
106{ 127{
107 struct usb_driver *usb_drv = to_usb_driver(driver); 128 struct usb_driver *usb_drv = to_usb_driver(driver);
108 129
109 return usb_store_new_id(&usb_drv->dynids, driver, buf, count); 130 return usb_store_new_id(&usb_drv->dynids, usb_drv->id_table, driver, buf, count);
110} 131}
111static DRIVER_ATTR_RW(new_id); 132static DRIVER_ATTR_RW(new_id);
112 133
@@ -839,7 +860,7 @@ int usb_register_device_driver(struct usb_device_driver *new_udriver,
839 return -ENODEV; 860 return -ENODEV;
840 861
841 new_udriver->drvwrap.for_devices = 1; 862 new_udriver->drvwrap.for_devices = 1;
842 new_udriver->drvwrap.driver.name = (char *) new_udriver->name; 863 new_udriver->drvwrap.driver.name = new_udriver->name;
843 new_udriver->drvwrap.driver.bus = &usb_bus_type; 864 new_udriver->drvwrap.driver.bus = &usb_bus_type;
844 new_udriver->drvwrap.driver.probe = usb_probe_device; 865 new_udriver->drvwrap.driver.probe = usb_probe_device;
845 new_udriver->drvwrap.driver.remove = usb_unbind_device; 866 new_udriver->drvwrap.driver.remove = usb_unbind_device;
@@ -900,7 +921,7 @@ int usb_register_driver(struct usb_driver *new_driver, struct module *owner,
900 return -ENODEV; 921 return -ENODEV;
901 922
902 new_driver->drvwrap.for_devices = 0; 923 new_driver->drvwrap.for_devices = 0;
903 new_driver->drvwrap.driver.name = (char *) new_driver->name; 924 new_driver->drvwrap.driver.name = new_driver->name;
904 new_driver->drvwrap.driver.bus = &usb_bus_type; 925 new_driver->drvwrap.driver.bus = &usb_bus_type;
905 new_driver->drvwrap.driver.probe = usb_probe_interface; 926 new_driver->drvwrap.driver.probe = usb_probe_interface;
906 new_driver->drvwrap.driver.remove = usb_unbind_interface; 927 new_driver->drvwrap.driver.remove = usb_unbind_interface;
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
index dfe9d0f22978..d59d99347d54 100644
--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -282,6 +282,7 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
282 282
283 if (retval != 0) 283 if (retval != 0)
284 goto unmap_registers; 284 goto unmap_registers;
285 device_wakeup_enable(hcd->self.controller);
285 286
286 if (pci_dev_run_wake(dev)) 287 if (pci_dev_run_wake(dev))
287 pm_runtime_put_noidle(&dev->dev); 288 pm_runtime_put_noidle(&dev->dev);
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 6bffb8c87bc9..199aaea6bfe0 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -44,6 +44,7 @@
44 44
45#include <linux/usb.h> 45#include <linux/usb.h>
46#include <linux/usb/hcd.h> 46#include <linux/usb/hcd.h>
47#include <linux/usb/phy.h>
47 48
48#include "usb.h" 49#include "usb.h"
49 50
@@ -1297,7 +1298,7 @@ EXPORT_SYMBOL_GPL(usb_hcd_unlink_urb_from_ep);
1297 * DMA framework is dma_declare_coherent_memory() 1298 * DMA framework is dma_declare_coherent_memory()
1298 * 1299 *
1299 * - So we use that, even though the primary requirement 1300 * - So we use that, even though the primary requirement
1300 * is that the memory be "local" (hence addressible 1301 * is that the memory be "local" (hence addressable
1301 * by that device), not "coherent". 1302 * by that device), not "coherent".
1302 * 1303 *
1303 */ 1304 */
@@ -2588,6 +2589,24 @@ int usb_add_hcd(struct usb_hcd *hcd,
2588 int retval; 2589 int retval;
2589 struct usb_device *rhdev; 2590 struct usb_device *rhdev;
2590 2591
2592 if (IS_ENABLED(CONFIG_USB_PHY) && !hcd->phy) {
2593 struct usb_phy *phy = usb_get_phy_dev(hcd->self.controller, 0);
2594
2595 if (IS_ERR(phy)) {
2596 retval = PTR_ERR(phy);
2597 if (retval == -EPROBE_DEFER)
2598 return retval;
2599 } else {
2600 retval = usb_phy_init(phy);
2601 if (retval) {
2602 usb_put_phy(phy);
2603 return retval;
2604 }
2605 hcd->phy = phy;
2606 hcd->remove_phy = 1;
2607 }
2608 }
2609
2591 dev_info(hcd->self.controller, "%s\n", hcd->product_desc); 2610 dev_info(hcd->self.controller, "%s\n", hcd->product_desc);
2592 2611
2593 /* Keep old behaviour if authorized_default is not in [0, 1]. */ 2612 /* Keep old behaviour if authorized_default is not in [0, 1]. */
@@ -2603,7 +2622,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
2603 */ 2622 */
2604 if ((retval = hcd_buffer_create(hcd)) != 0) { 2623 if ((retval = hcd_buffer_create(hcd)) != 0) {
2605 dev_dbg(hcd->self.controller, "pool alloc failed\n"); 2624 dev_dbg(hcd->self.controller, "pool alloc failed\n");
2606 return retval; 2625 goto err_remove_phy;
2607 } 2626 }
2608 2627
2609 if ((retval = usb_register_bus(&hcd->self)) < 0) 2628 if ((retval = usb_register_bus(&hcd->self)) < 0)
@@ -2693,12 +2712,6 @@ int usb_add_hcd(struct usb_hcd *hcd,
2693 if (hcd->uses_new_polling && HCD_POLL_RH(hcd)) 2712 if (hcd->uses_new_polling && HCD_POLL_RH(hcd))
2694 usb_hcd_poll_rh_status(hcd); 2713 usb_hcd_poll_rh_status(hcd);
2695 2714
2696 /*
2697 * Host controllers don't generate their own wakeup requests;
2698 * they only forward requests from the root hub. Therefore
2699 * controllers should always be enabled for remote wakeup.
2700 */
2701 device_wakeup_enable(hcd->self.controller);
2702 return retval; 2715 return retval;
2703 2716
2704error_create_attr_group: 2717error_create_attr_group:
@@ -2734,6 +2747,12 @@ err_allocate_root_hub:
2734 usb_deregister_bus(&hcd->self); 2747 usb_deregister_bus(&hcd->self);
2735err_register_bus: 2748err_register_bus:
2736 hcd_buffer_destroy(hcd); 2749 hcd_buffer_destroy(hcd);
2750err_remove_phy:
2751 if (hcd->remove_phy && hcd->phy) {
2752 usb_phy_shutdown(hcd->phy);
2753 usb_put_phy(hcd->phy);
2754 hcd->phy = NULL;
2755 }
2737 return retval; 2756 return retval;
2738} 2757}
2739EXPORT_SYMBOL_GPL(usb_add_hcd); 2758EXPORT_SYMBOL_GPL(usb_add_hcd);
@@ -2806,6 +2825,11 @@ void usb_remove_hcd(struct usb_hcd *hcd)
2806 usb_put_dev(hcd->self.root_hub); 2825 usb_put_dev(hcd->self.root_hub);
2807 usb_deregister_bus(&hcd->self); 2826 usb_deregister_bus(&hcd->self);
2808 hcd_buffer_destroy(hcd); 2827 hcd_buffer_destroy(hcd);
2828 if (hcd->remove_phy && hcd->phy) {
2829 usb_phy_shutdown(hcd->phy);
2830 usb_put_phy(hcd->phy);
2831 hcd->phy = NULL;
2832 }
2809} 2833}
2810EXPORT_SYMBOL_GPL(usb_remove_hcd); 2834EXPORT_SYMBOL_GPL(usb_remove_hcd);
2811 2835
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index bd9dc3504b51..babba885978d 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -33,13 +33,6 @@
33 33
34#include "hub.h" 34#include "hub.h"
35 35
36/* if we are in debug mode, always announce new devices */
37#ifdef DEBUG
38#ifndef CONFIG_USB_ANNOUNCE_NEW_DEVICES
39#define CONFIG_USB_ANNOUNCE_NEW_DEVICES
40#endif
41#endif
42
43#define USB_VENDOR_GENESYS_LOGIC 0x05e3 36#define USB_VENDOR_GENESYS_LOGIC 0x05e3
44#define HUB_QUIRK_CHECK_PORT_AUTOSUSPEND 0x01 37#define HUB_QUIRK_CHECK_PORT_AUTOSUSPEND 0x01
45 38
@@ -1154,7 +1147,8 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
1154 /* Tell khubd to disconnect the device or 1147 /* Tell khubd to disconnect the device or
1155 * check for a new connection 1148 * check for a new connection
1156 */ 1149 */
1157 if (udev || (portstatus & USB_PORT_STAT_CONNECTION)) 1150 if (udev || (portstatus & USB_PORT_STAT_CONNECTION) ||
1151 (portstatus & USB_PORT_STAT_OVERCURRENT))
1158 set_bit(port1, hub->change_bits); 1152 set_bit(port1, hub->change_bits);
1159 1153
1160 } else if (portstatus & USB_PORT_STAT_ENABLE) { 1154 } else if (portstatus & USB_PORT_STAT_ENABLE) {
@@ -1607,7 +1601,7 @@ static void hub_disconnect(struct usb_interface *intf)
1607{ 1601{
1608 struct usb_hub *hub = usb_get_intfdata(intf); 1602 struct usb_hub *hub = usb_get_intfdata(intf);
1609 struct usb_device *hdev = interface_to_usbdev(intf); 1603 struct usb_device *hdev = interface_to_usbdev(intf);
1610 int i; 1604 int port1;
1611 1605
1612 /* Take the hub off the event list and don't let it be added again */ 1606 /* Take the hub off the event list and don't let it be added again */
1613 spin_lock_irq(&hub_event_lock); 1607 spin_lock_irq(&hub_event_lock);
@@ -1622,11 +1616,15 @@ static void hub_disconnect(struct usb_interface *intf)
1622 hub->error = 0; 1616 hub->error = 0;
1623 hub_quiesce(hub, HUB_DISCONNECT); 1617 hub_quiesce(hub, HUB_DISCONNECT);
1624 1618
1625 usb_set_intfdata (intf, NULL); 1619 /* Avoid races with recursively_mark_NOTATTACHED() */
1620 spin_lock_irq(&device_state_lock);
1621 port1 = hdev->maxchild;
1622 hdev->maxchild = 0;
1623 usb_set_intfdata(intf, NULL);
1624 spin_unlock_irq(&device_state_lock);
1626 1625
1627 for (i = 0; i < hdev->maxchild; i++) 1626 for (; port1 > 0; --port1)
1628 usb_hub_remove_port_device(hub, i + 1); 1627 usb_hub_remove_port_device(hub, port1);
1629 hub->hdev->maxchild = 0;
1630 1628
1631 if (hub->hdev->speed == USB_SPEED_HIGH) 1629 if (hub->hdev->speed == USB_SPEED_HIGH)
1632 highspeed_hubs--; 1630 highspeed_hubs--;
@@ -2235,17 +2233,13 @@ static int usb_enumerate_device(struct usb_device *udev)
2235 return err; 2233 return err;
2236 } 2234 }
2237 } 2235 }
2238 if (udev->wusb == 1 && udev->authorized == 0) { 2236
2239 udev->product = kstrdup("n/a (unauthorized)", GFP_KERNEL); 2237 /* read the standard strings and cache them if present */
2240 udev->manufacturer = kstrdup("n/a (unauthorized)", GFP_KERNEL); 2238 udev->product = usb_cache_string(udev, udev->descriptor.iProduct);
2241 udev->serial = kstrdup("n/a (unauthorized)", GFP_KERNEL); 2239 udev->manufacturer = usb_cache_string(udev,
2242 } else { 2240 udev->descriptor.iManufacturer);
2243 /* read the standard strings and cache them if present */ 2241 udev->serial = usb_cache_string(udev, udev->descriptor.iSerialNumber);
2244 udev->product = usb_cache_string(udev, udev->descriptor.iProduct); 2242
2245 udev->manufacturer = usb_cache_string(udev,
2246 udev->descriptor.iManufacturer);
2247 udev->serial = usb_cache_string(udev, udev->descriptor.iSerialNumber);
2248 }
2249 err = usb_enumerate_device_otg(udev); 2243 err = usb_enumerate_device_otg(udev);
2250 if (err < 0) 2244 if (err < 0)
2251 return err; 2245 return err;
@@ -2427,16 +2421,6 @@ int usb_deauthorize_device(struct usb_device *usb_dev)
2427 usb_dev->authorized = 0; 2421 usb_dev->authorized = 0;
2428 usb_set_configuration(usb_dev, -1); 2422 usb_set_configuration(usb_dev, -1);
2429 2423
2430 kfree(usb_dev->product);
2431 usb_dev->product = kstrdup("n/a (unauthorized)", GFP_KERNEL);
2432 kfree(usb_dev->manufacturer);
2433 usb_dev->manufacturer = kstrdup("n/a (unauthorized)", GFP_KERNEL);
2434 kfree(usb_dev->serial);
2435 usb_dev->serial = kstrdup("n/a (unauthorized)", GFP_KERNEL);
2436
2437 usb_destroy_configuration(usb_dev);
2438 usb_dev->descriptor.bNumConfigurations = 0;
2439
2440out_unauthorized: 2424out_unauthorized:
2441 usb_unlock_device(usb_dev); 2425 usb_unlock_device(usb_dev);
2442 return 0; 2426 return 0;
@@ -2464,17 +2448,7 @@ int usb_authorize_device(struct usb_device *usb_dev)
2464 goto error_device_descriptor; 2448 goto error_device_descriptor;
2465 } 2449 }
2466 2450
2467 kfree(usb_dev->product);
2468 usb_dev->product = NULL;
2469 kfree(usb_dev->manufacturer);
2470 usb_dev->manufacturer = NULL;
2471 kfree(usb_dev->serial);
2472 usb_dev->serial = NULL;
2473
2474 usb_dev->authorized = 1; 2451 usb_dev->authorized = 1;
2475 result = usb_enumerate_device(usb_dev);
2476 if (result < 0)
2477 goto error_enumerate;
2478 /* Choose and set the configuration. This registers the interfaces 2452 /* Choose and set the configuration. This registers the interfaces
2479 * with the driver core and lets interface drivers bind to them. 2453 * with the driver core and lets interface drivers bind to them.
2480 */ 2454 */
@@ -2490,7 +2464,6 @@ int usb_authorize_device(struct usb_device *usb_dev)
2490 } 2464 }
2491 dev_info(&usb_dev->dev, "authorized to connect\n"); 2465 dev_info(&usb_dev->dev, "authorized to connect\n");
2492 2466
2493error_enumerate:
2494error_device_descriptor: 2467error_device_descriptor:
2495 usb_autosuspend_device(usb_dev); 2468 usb_autosuspend_device(usb_dev);
2496error_autoresume: 2469error_autoresume:
@@ -2523,10 +2496,25 @@ static unsigned hub_is_wusb(struct usb_hub *hub)
2523#define HUB_LONG_RESET_TIME 200 2496#define HUB_LONG_RESET_TIME 200
2524#define HUB_RESET_TIMEOUT 800 2497#define HUB_RESET_TIMEOUT 800
2525 2498
2499/*
2500 * "New scheme" enumeration causes an extra state transition to be
2501 * exposed to an xhci host and causes USB3 devices to receive control
2502 * commands in the default state. This has been seen to cause
2503 * enumeration failures, so disable this enumeration scheme for USB3
2504 * devices.
2505 */
2506static bool use_new_scheme(struct usb_device *udev, int retry)
2507{
2508 if (udev->speed == USB_SPEED_SUPER)
2509 return false;
2510
2511 return USE_NEW_SCHEME(retry);
2512}
2513
2526static int hub_port_reset(struct usb_hub *hub, int port1, 2514static int hub_port_reset(struct usb_hub *hub, int port1,
2527 struct usb_device *udev, unsigned int delay, bool warm); 2515 struct usb_device *udev, unsigned int delay, bool warm);
2528 2516
2529/* Is a USB 3.0 port in the Inactive or Complinance Mode state? 2517/* Is a USB 3.0 port in the Inactive or Compliance Mode state?
2530 * Port worm reset is required to recover 2518 * Port worm reset is required to recover
2531 */ 2519 */
2532static bool hub_port_warm_reset_required(struct usb_hub *hub, u16 portstatus) 2520static bool hub_port_warm_reset_required(struct usb_hub *hub, u16 portstatus)
@@ -3334,7 +3322,8 @@ static int hub_suspend(struct usb_interface *intf, pm_message_t msg)
3334 3322
3335 udev = hub->ports[port1 - 1]->child; 3323 udev = hub->ports[port1 - 1]->child;
3336 if (udev && udev->can_submit) { 3324 if (udev && udev->can_submit) {
3337 dev_warn(&intf->dev, "port %d nyet suspended\n", port1); 3325 dev_warn(&intf->dev, "port %d not suspended yet\n",
3326 port1);
3338 if (PMSG_IS_AUTO(msg)) 3327 if (PMSG_IS_AUTO(msg))
3339 return -EBUSY; 3328 return -EBUSY;
3340 } 3329 }
@@ -3981,6 +3970,20 @@ static void hub_set_initial_usb2_lpm_policy(struct usb_device *udev)
3981 } 3970 }
3982} 3971}
3983 3972
3973static int hub_enable_device(struct usb_device *udev)
3974{
3975 struct usb_hcd *hcd = bus_to_hcd(udev->bus);
3976
3977 if (!hcd->driver->enable_device)
3978 return 0;
3979 if (udev->state == USB_STATE_ADDRESS)
3980 return 0;
3981 if (udev->state != USB_STATE_DEFAULT)
3982 return -EINVAL;
3983
3984 return hcd->driver->enable_device(hcd, udev);
3985}
3986
3984/* Reset device, (re)assign address, get device descriptor. 3987/* Reset device, (re)assign address, get device descriptor.
3985 * Device connection must be stable, no more debouncing needed. 3988 * Device connection must be stable, no more debouncing needed.
3986 * Returns device in USB_STATE_ADDRESS, except on error. 3989 * Returns device in USB_STATE_ADDRESS, except on error.
@@ -4093,7 +4096,7 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
4093 * this area, and this is how Linux has done it for ages. 4096 * this area, and this is how Linux has done it for ages.
4094 * Change it cautiously. 4097 * Change it cautiously.
4095 * 4098 *
4096 * NOTE: If USE_NEW_SCHEME() is true we will start by issuing 4099 * NOTE: If use_new_scheme() is true we will start by issuing
4097 * a 64-byte GET_DESCRIPTOR request. This is what Windows does, 4100 * a 64-byte GET_DESCRIPTOR request. This is what Windows does,
4098 * so it may help with some non-standards-compliant devices. 4101 * so it may help with some non-standards-compliant devices.
4099 * Otherwise we start with SET_ADDRESS and then try to read the 4102 * Otherwise we start with SET_ADDRESS and then try to read the
@@ -4101,10 +4104,17 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
4101 * value. 4104 * value.
4102 */ 4105 */
4103 for (i = 0; i < GET_DESCRIPTOR_TRIES; (++i, msleep(100))) { 4106 for (i = 0; i < GET_DESCRIPTOR_TRIES; (++i, msleep(100))) {
4104 if (USE_NEW_SCHEME(retry_counter) && !(hcd->driver->flags & HCD_USB3)) { 4107 bool did_new_scheme = false;
4108
4109 if (use_new_scheme(udev, retry_counter)) {
4105 struct usb_device_descriptor *buf; 4110 struct usb_device_descriptor *buf;
4106 int r = 0; 4111 int r = 0;
4107 4112
4113 did_new_scheme = true;
4114 retval = hub_enable_device(udev);
4115 if (retval < 0)
4116 goto fail;
4117
4108#define GET_DESCRIPTOR_BUFSIZE 64 4118#define GET_DESCRIPTOR_BUFSIZE 64
4109 buf = kmalloc(GET_DESCRIPTOR_BUFSIZE, GFP_NOIO); 4119 buf = kmalloc(GET_DESCRIPTOR_BUFSIZE, GFP_NOIO);
4110 if (!buf) { 4120 if (!buf) {
@@ -4193,7 +4203,11 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
4193 * - read ep0 maxpacket even for high and low speed, 4203 * - read ep0 maxpacket even for high and low speed,
4194 */ 4204 */
4195 msleep(10); 4205 msleep(10);
4196 if (USE_NEW_SCHEME(retry_counter) && !(hcd->driver->flags & HCD_USB3)) 4206 /* use_new_scheme() checks the speed which may have
4207 * changed since the initial look so we cache the result
4208 * in did_new_scheme
4209 */
4210 if (did_new_scheme)
4197 break; 4211 break;
4198 } 4212 }
4199 4213
@@ -4900,7 +4914,7 @@ static void hub_events(void)
4900 4914
4901static int hub_thread(void *__unused) 4915static int hub_thread(void *__unused)
4902{ 4916{
4903 /* khubd needs to be freezable to avoid intefering with USB-PERSIST 4917 /* khubd needs to be freezable to avoid interfering with USB-PERSIST
4904 * port handover. Otherwise it might see that a full-speed device 4918 * port handover. Otherwise it might see that a full-speed device
4905 * was gone before the EHCI controller had handed its port over to 4919 * was gone before the EHCI controller had handed its port over to
4906 * the companion full-speed controller. 4920 * the companion full-speed controller.
diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h
index 4e4790dea343..df629a310e44 100644
--- a/drivers/usb/core/hub.h
+++ b/drivers/usb/core/hub.h
@@ -78,7 +78,7 @@ struct usb_hub {
78 78
79/** 79/**
80 * struct usb port - kernel's representation of a usb port 80 * struct usb port - kernel's representation of a usb port
81 * @child: usb device attatched to the port 81 * @child: usb device attached to the port
82 * @dev: generic device interface 82 * @dev: generic device interface
83 * @port_owner: port's owner 83 * @port_owner: port's owner
84 * @connect_type: port's connect type 84 * @connect_type: port's connect type
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index bb315970e475..f829a1aad1c3 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -6,7 +6,6 @@
6#include <linux/usb.h> 6#include <linux/usb.h>
7#include <linux/module.h> 7#include <linux/module.h>
8#include <linux/slab.h> 8#include <linux/slab.h>
9#include <linux/init.h>
10#include <linux/mm.h> 9#include <linux/mm.h>
11#include <linux/timer.h> 10#include <linux/timer.h>
12#include <linux/ctype.h> 11#include <linux/ctype.h>
@@ -218,7 +217,7 @@ EXPORT_SYMBOL_GPL(usb_interrupt_msg);
218 * 217 *
219 * Return: 218 * Return:
220 * If successful, 0. Otherwise a negative error number. The number of actual 219 * If successful, 0. Otherwise a negative error number. The number of actual
221 * bytes transferred will be stored in the @actual_length paramater. 220 * bytes transferred will be stored in the @actual_length parameter.
222 * 221 *
223 */ 222 */
224int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, 223int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe,
@@ -518,7 +517,7 @@ void usb_sg_wait(struct usb_sg_request *io)
518 io->urbs[i]->dev = io->dev; 517 io->urbs[i]->dev = io->dev;
519 retval = usb_submit_urb(io->urbs[i], GFP_ATOMIC); 518 retval = usb_submit_urb(io->urbs[i], GFP_ATOMIC);
520 519
521 /* after we submit, let completions or cancelations fire; 520 /* after we submit, let completions or cancellations fire;
522 * we handshake using io->status. 521 * we handshake using io->status.
523 */ 522 */
524 spin_unlock_irq(&io->lock); 523 spin_unlock_irq(&io->lock);
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 12924dbfdc2c..8f37063c0a49 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -98,9 +98,6 @@ static const struct usb_device_id usb_quirk_list[] = {
98 /* Alcor Micro Corp. Hub */ 98 /* Alcor Micro Corp. Hub */
99 { USB_DEVICE(0x058f, 0x9254), .driver_info = USB_QUIRK_RESET_RESUME }, 99 { USB_DEVICE(0x058f, 0x9254), .driver_info = USB_QUIRK_RESET_RESUME },
100 100
101 /* MicroTouch Systems touchscreen */
102 { USB_DEVICE(0x0596, 0x051e), .driver_info = USB_QUIRK_RESET_RESUME },
103
104 /* appletouch */ 101 /* appletouch */
105 { USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME }, 102 { USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME },
106 103
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
index 52a97adf02a0..1236c6011c70 100644
--- a/drivers/usb/core/sysfs.c
+++ b/drivers/usb/core/sysfs.c
@@ -837,7 +837,7 @@ void usb_remove_sysfs_dev_files(struct usb_device *udev)
837 device_remove_bin_file(dev, &dev_bin_attr_descriptors); 837 device_remove_bin_file(dev, &dev_bin_attr_descriptors);
838} 838}
839 839
840/* Interface Accociation Descriptor fields */ 840/* Interface Association Descriptor fields */
841#define usb_intf_assoc_attr(field, format_string) \ 841#define usb_intf_assoc_attr(field, format_string) \
842static ssize_t \ 842static ssize_t \
843iad_##field##_show(struct device *dev, struct device_attribute *attr, \ 843iad_##field##_show(struct device *dev, struct device_attribute *attr, \
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
index e62208356c89..9ff665f1322f 100644
--- a/drivers/usb/core/urb.c
+++ b/drivers/usb/core/urb.c
@@ -2,7 +2,6 @@
2#include <linux/string.h> 2#include <linux/string.h>
3#include <linux/bitops.h> 3#include <linux/bitops.h>
4#include <linux/slab.h> 4#include <linux/slab.h>
5#include <linux/init.h>
6#include <linux/log2.h> 5#include <linux/log2.h>
7#include <linux/usb.h> 6#include <linux/usb.h>
8#include <linux/wait.h> 7#include <linux/wait.h>
@@ -53,7 +52,7 @@ EXPORT_SYMBOL_GPL(usb_init_urb);
53 * valid options for this. 52 * valid options for this.
54 * 53 *
55 * Creates an urb for the USB driver to use, initializes a few internal 54 * Creates an urb for the USB driver to use, initializes a few internal
56 * structures, incrementes the usage counter, and returns a pointer to it. 55 * structures, increments the usage counter, and returns a pointer to it.
57 * 56 *
58 * If the driver want to use this urb for interrupt, control, or bulk 57 * If the driver want to use this urb for interrupt, control, or bulk
59 * endpoints, pass '0' as the number of iso packets. 58 * endpoints, pass '0' as the number of iso packets.
@@ -281,7 +280,7 @@ EXPORT_SYMBOL_GPL(usb_unanchor_urb);
281 * 280 *
282 * Device drivers must explicitly request that repetition, by ensuring that 281 * Device drivers must explicitly request that repetition, by ensuring that
283 * some URB is always on the endpoint's queue (except possibly for short 282 * some URB is always on the endpoint's queue (except possibly for short
284 * periods during completion callacks). When there is no longer an urb 283 * periods during completion callbacks). When there is no longer an urb
285 * queued, the endpoint's bandwidth reservation is canceled. This means 284 * queued, the endpoint's bandwidth reservation is canceled. This means
286 * drivers can use their completion handlers to ensure they keep bandwidth 285 * drivers can use their completion handlers to ensure they keep bandwidth
287 * they need, by reinitializing and resubmitting the just-completed urb 286 * they need, by reinitializing and resubmitting the just-completed urb
@@ -325,10 +324,14 @@ EXPORT_SYMBOL_GPL(usb_unanchor_urb);
325 */ 324 */
326int usb_submit_urb(struct urb *urb, gfp_t mem_flags) 325int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
327{ 326{
327 static int pipetypes[4] = {
328 PIPE_CONTROL, PIPE_ISOCHRONOUS, PIPE_BULK, PIPE_INTERRUPT
329 };
328 int xfertype, max; 330 int xfertype, max;
329 struct usb_device *dev; 331 struct usb_device *dev;
330 struct usb_host_endpoint *ep; 332 struct usb_host_endpoint *ep;
331 int is_out; 333 int is_out;
334 unsigned int allowed;
332 335
333 if (!urb || !urb->complete) 336 if (!urb || !urb->complete)
334 return -EINVAL; 337 return -EINVAL;
@@ -436,15 +439,10 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
436 if (urb->transfer_buffer_length > INT_MAX) 439 if (urb->transfer_buffer_length > INT_MAX)
437 return -EMSGSIZE; 440 return -EMSGSIZE;
438 441
439#ifdef DEBUG 442 /*
440 /* stuff that drivers shouldn't do, but which shouldn't 443 * stuff that drivers shouldn't do, but which shouldn't
441 * cause problems in HCDs if they get it wrong. 444 * cause problems in HCDs if they get it wrong.
442 */ 445 */
443 {
444 unsigned int allowed;
445 static int pipetypes[4] = {
446 PIPE_CONTROL, PIPE_ISOCHRONOUS, PIPE_BULK, PIPE_INTERRUPT
447 };
448 446
449 /* Check that the pipe's type matches the endpoint's type */ 447 /* Check that the pipe's type matches the endpoint's type */
450 if (usb_pipetype(urb->pipe) != pipetypes[xfertype]) 448 if (usb_pipetype(urb->pipe) != pipetypes[xfertype])
@@ -476,8 +474,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
476 if (allowed != urb->transfer_flags) 474 if (allowed != urb->transfer_flags)
477 dev_WARN(&dev->dev, "BOGUS urb flags, %x --> %x\n", 475 dev_WARN(&dev->dev, "BOGUS urb flags, %x --> %x\n",
478 urb->transfer_flags, allowed); 476 urb->transfer_flags, allowed);
479 } 477
480#endif
481 /* 478 /*
482 * Force periodic transfer intervals to be legal values that are 479 * Force periodic transfer intervals to be legal values that are
483 * a power of two (so HCDs don't need to). 480 * a power of two (so HCDs don't need to).
@@ -492,9 +489,9 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
492 /* too small? */ 489 /* too small? */
493 switch (dev->speed) { 490 switch (dev->speed) {
494 case USB_SPEED_WIRELESS: 491 case USB_SPEED_WIRELESS:
495 if (urb->interval < 6) 492 if ((urb->interval < 6)
493 && (xfertype == USB_ENDPOINT_XFER_INT))
496 return -EINVAL; 494 return -EINVAL;
497 break;
498 default: 495 default:
499 if (urb->interval <= 0) 496 if (urb->interval <= 0)
500 return -EINVAL; 497 return -EINVAL;
diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c
index 4e243c37f17f..d7cb822d6eab 100644
--- a/drivers/usb/core/usb-acpi.c
+++ b/drivers/usb/core/usb-acpi.c
@@ -92,7 +92,7 @@ static int usb_acpi_check_port_connect_type(struct usb_device *hdev,
92 int ret = 0; 92 int ret = 0;
93 93
94 /* 94 /*
95 * Accoding to ACPI Spec 9.13. PLD indicates whether usb port is 95 * According to ACPI Spec 9.13. PLD indicates whether usb port is
96 * user visible and _UPC indicates whether it is connectable. If 96 * user visible and _UPC indicates whether it is connectable. If
97 * the port was visible and connectable, it could be freely connected 97 * the port was visible and connectable, it could be freely connected
98 * and disconnected with USB devices. If no visible and connectable, 98 * and disconnected with USB devices. If no visible and connectable,
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
index 07dfe855dc20..f59484d43b35 100644
--- a/drivers/usb/dwc2/hcd.c
+++ b/drivers/usb/dwc2/hcd.c
@@ -2935,6 +2935,8 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq,
2935 if (retval < 0) 2935 if (retval < 0)
2936 goto error3; 2936 goto error3;
2937 2937
2938 device_wakeup_enable(hcd->self.controller);
2939
2938 dwc2_hcd_dump_state(hsotg); 2940 dwc2_hcd_dump_state(hsotg);
2939 2941
2940 dwc2_enable_global_interrupts(hsotg); 2942 dwc2_enable_global_interrupts(hsotg);
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig
index 70fc43027a5c..e2c730fc9a90 100644
--- a/drivers/usb/dwc3/Kconfig
+++ b/drivers/usb/dwc3/Kconfig
@@ -70,6 +70,13 @@ config USB_DWC3_PCI
70 One such PCIe-based platform is Synopsys' PCIe HAPS model of 70 One such PCIe-based platform is Synopsys' PCIe HAPS model of
71 this IP. 71 this IP.
72 72
73config USB_DWC3_KEYSTONE
74 tristate "Texas Instruments Keystone2 Platforms"
75 default USB_DWC3
76 help
77 Support of USB2/3 functionality in TI Keystone2 platforms.
78 Say 'Y' or 'M' here if you have one such device
79
73comment "Debugging features" 80comment "Debugging features"
74 81
75config USB_DWC3_DEBUG 82config USB_DWC3_DEBUG
diff --git a/drivers/usb/dwc3/Makefile b/drivers/usb/dwc3/Makefile
index dd1760145c46..10ac3e72482e 100644
--- a/drivers/usb/dwc3/Makefile
+++ b/drivers/usb/dwc3/Makefile
@@ -32,3 +32,4 @@ endif
32obj-$(CONFIG_USB_DWC3_OMAP) += dwc3-omap.o 32obj-$(CONFIG_USB_DWC3_OMAP) += dwc3-omap.o
33obj-$(CONFIG_USB_DWC3_EXYNOS) += dwc3-exynos.o 33obj-$(CONFIG_USB_DWC3_EXYNOS) += dwc3-exynos.o
34obj-$(CONFIG_USB_DWC3_PCI) += dwc3-pci.o 34obj-$(CONFIG_USB_DWC3_PCI) += dwc3-pci.o
35obj-$(CONFIG_USB_DWC3_KEYSTONE) += dwc3-keystone.o
diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c
index 8b20c70d91e7..28c8ad79f5e6 100644
--- a/drivers/usb/dwc3/dwc3-exynos.c
+++ b/drivers/usb/dwc3/dwc3-exynos.c
@@ -50,6 +50,7 @@ static int dwc3_exynos_register_phys(struct dwc3_exynos *exynos)
50 50
51 exynos->usb2_phy = pdev; 51 exynos->usb2_phy = pdev;
52 pdata.type = USB_PHY_TYPE_USB2; 52 pdata.type = USB_PHY_TYPE_USB2;
53 pdata.gpio_reset = -1;
53 54
54 ret = platform_device_add_data(exynos->usb2_phy, &pdata, sizeof(pdata)); 55 ret = platform_device_add_data(exynos->usb2_phy, &pdata, sizeof(pdata));
55 if (ret) 56 if (ret)
diff --git a/drivers/usb/dwc3/dwc3-keystone.c b/drivers/usb/dwc3/dwc3-keystone.c
new file mode 100644
index 000000000000..1fad1618df6e
--- /dev/null
+++ b/drivers/usb/dwc3/dwc3-keystone.c
@@ -0,0 +1,202 @@
1/**
2 * dwc3-keystone.c - Keystone Specific Glue layer
3 *
4 * Copyright (C) 2010-2013 Texas Instruments Incorporated - http://www.ti.com
5 *
6 * Author: WingMan Kwok <w-kwok2@ti.com>
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 of
10 * the License as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 */
17
18#include <linux/clk.h>
19#include <linux/module.h>
20#include <linux/kernel.h>
21#include <linux/interrupt.h>
22#include <linux/platform_device.h>
23#include <linux/dma-mapping.h>
24#include <linux/io.h>
25#include <linux/of_platform.h>
26
27/* USBSS register offsets */
28#define USBSS_REVISION 0x0000
29#define USBSS_SYSCONFIG 0x0010
30#define USBSS_IRQ_EOI 0x0018
31#define USBSS_IRQSTATUS_RAW_0 0x0020
32#define USBSS_IRQSTATUS_0 0x0024
33#define USBSS_IRQENABLE_SET_0 0x0028
34#define USBSS_IRQENABLE_CLR_0 0x002c
35
36/* IRQ register bits */
37#define USBSS_IRQ_EOI_LINE(n) BIT(n)
38#define USBSS_IRQ_EVENT_ST BIT(0)
39#define USBSS_IRQ_COREIRQ_EN BIT(0)
40#define USBSS_IRQ_COREIRQ_CLR BIT(0)
41
42static u64 kdwc3_dma_mask;
43
44struct dwc3_keystone {
45 struct device *dev;
46 struct clk *clk;
47 void __iomem *usbss;
48};
49
50static inline u32 kdwc3_readl(void __iomem *base, u32 offset)
51{
52 return readl(base + offset);
53}
54
55static inline void kdwc3_writel(void __iomem *base, u32 offset, u32 value)
56{
57 writel(value, base + offset);
58}
59
60static void kdwc3_enable_irqs(struct dwc3_keystone *kdwc)
61{
62 u32 val;
63
64 val = kdwc3_readl(kdwc->usbss, USBSS_IRQENABLE_SET_0);
65 val |= USBSS_IRQ_COREIRQ_EN;
66 kdwc3_writel(kdwc->usbss, USBSS_IRQENABLE_SET_0, val);
67}
68
69static void kdwc3_disable_irqs(struct dwc3_keystone *kdwc)
70{
71 u32 val;
72
73 val = kdwc3_readl(kdwc->usbss, USBSS_IRQENABLE_SET_0);
74 val &= ~USBSS_IRQ_COREIRQ_EN;
75 kdwc3_writel(kdwc->usbss, USBSS_IRQENABLE_SET_0, val);
76}
77
78static irqreturn_t dwc3_keystone_interrupt(int irq, void *_kdwc)
79{
80 struct dwc3_keystone *kdwc = _kdwc;
81
82 kdwc3_writel(kdwc->usbss, USBSS_IRQENABLE_CLR_0, USBSS_IRQ_COREIRQ_CLR);
83 kdwc3_writel(kdwc->usbss, USBSS_IRQSTATUS_0, USBSS_IRQ_EVENT_ST);
84 kdwc3_writel(kdwc->usbss, USBSS_IRQENABLE_SET_0, USBSS_IRQ_COREIRQ_EN);
85 kdwc3_writel(kdwc->usbss, USBSS_IRQ_EOI, USBSS_IRQ_EOI_LINE(0));
86
87 return IRQ_HANDLED;
88}
89
90static int kdwc3_probe(struct platform_device *pdev)
91{
92 struct device *dev = &pdev->dev;
93 struct device_node *node = pdev->dev.of_node;
94 struct dwc3_keystone *kdwc;
95 struct resource *res;
96 int error, irq;
97
98 kdwc = devm_kzalloc(dev, sizeof(*kdwc), GFP_KERNEL);
99 if (!kdwc)
100 return -ENOMEM;
101
102 platform_set_drvdata(pdev, kdwc);
103
104 kdwc->dev = dev;
105
106 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
107 if (!res) {
108 dev_err(dev, "missing usbss resource\n");
109 return -EINVAL;
110 }
111
112 kdwc->usbss = devm_ioremap_resource(dev, res);
113 if (IS_ERR(kdwc->usbss))
114 return PTR_ERR(kdwc->usbss);
115
116 kdwc3_dma_mask = dma_get_mask(dev);
117 dev->dma_mask = &kdwc3_dma_mask;
118
119 kdwc->clk = devm_clk_get(kdwc->dev, "usb");
120
121 error = clk_prepare_enable(kdwc->clk);
122 if (error < 0) {
123 dev_dbg(kdwc->dev, "unable to enable usb clock, err %d\n",
124 error);
125 return error;
126 }
127
128 irq = platform_get_irq(pdev, 0);
129 if (irq < 0) {
130 dev_err(&pdev->dev, "missing irq\n");
131 goto err_irq;
132 }
133
134 error = devm_request_irq(dev, irq, dwc3_keystone_interrupt, IRQF_SHARED,
135 dev_name(dev), kdwc);
136 if (error) {
137 dev_err(dev, "failed to request IRQ #%d --> %d\n",
138 irq, error);
139 goto err_irq;
140 }
141
142 kdwc3_enable_irqs(kdwc);
143
144 error = of_platform_populate(node, NULL, NULL, dev);
145 if (error) {
146 dev_err(&pdev->dev, "failed to create dwc3 core\n");
147 goto err_core;
148 }
149
150 return 0;
151
152err_core:
153 kdwc3_disable_irqs(kdwc);
154err_irq:
155 clk_disable_unprepare(kdwc->clk);
156
157 return error;
158}
159
160static int kdwc3_remove_core(struct device *dev, void *c)
161{
162 struct platform_device *pdev = to_platform_device(dev);
163
164 platform_device_unregister(pdev);
165
166 return 0;
167}
168
169static int kdwc3_remove(struct platform_device *pdev)
170{
171 struct dwc3_keystone *kdwc = platform_get_drvdata(pdev);
172
173 kdwc3_disable_irqs(kdwc);
174 device_for_each_child(&pdev->dev, NULL, kdwc3_remove_core);
175 clk_disable_unprepare(kdwc->clk);
176 platform_set_drvdata(pdev, NULL);
177
178 return 0;
179}
180
181static const struct of_device_id kdwc3_of_match[] = {
182 { .compatible = "ti,keystone-dwc3", },
183 {},
184};
185MODULE_DEVICE_TABLE(of, kdwc3_of_match);
186
187static struct platform_driver kdwc3_driver = {
188 .probe = kdwc3_probe,
189 .remove = kdwc3_remove,
190 .driver = {
191 .name = "keystone-dwc3",
192 .owner = THIS_MODULE,
193 .of_match_table = kdwc3_of_match,
194 },
195};
196
197module_platform_driver(kdwc3_driver);
198
199MODULE_ALIAS("platform:keystone-dwc3");
200MODULE_AUTHOR("WingMan Kwok <w-kwok2@ti.com>");
201MODULE_LICENSE("GPL v2");
202MODULE_DESCRIPTION("DesignWare USB3 KEYSTONE Glue Layer");
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index 7f7ea62e961b..b269dbd47fc4 100644
--- a/drivers/usb/dwc3/dwc3-omap.c
+++ b/drivers/usb/dwc3/dwc3-omap.c
@@ -20,7 +20,6 @@
20#include <linux/kernel.h> 20#include <linux/kernel.h>
21#include <linux/slab.h> 21#include <linux/slab.h>
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/spinlock.h>
24#include <linux/platform_device.h> 23#include <linux/platform_device.h>
25#include <linux/platform_data/dwc3-omap.h> 24#include <linux/platform_data/dwc3-omap.h>
26#include <linux/pm_runtime.h> 25#include <linux/pm_runtime.h>
@@ -120,9 +119,6 @@
120#define USBOTGSS_UTMI_OTG_STATUS_VBUSVALID (1 << 1) 119#define USBOTGSS_UTMI_OTG_STATUS_VBUSVALID (1 << 1)
121 120
122struct dwc3_omap { 121struct dwc3_omap {
123 /* device lock */
124 spinlock_t lock;
125
126 struct device *dev; 122 struct device *dev;
127 123
128 int irq; 124 int irq;
@@ -280,8 +276,6 @@ static irqreturn_t dwc3_omap_interrupt(int irq, void *_omap)
280 struct dwc3_omap *omap = _omap; 276 struct dwc3_omap *omap = _omap;
281 u32 reg; 277 u32 reg;
282 278
283 spin_lock(&omap->lock);
284
285 reg = dwc3_omap_read_irqmisc_status(omap); 279 reg = dwc3_omap_read_irqmisc_status(omap);
286 280
287 if (reg & USBOTGSS_IRQMISC_DMADISABLECLR) { 281 if (reg & USBOTGSS_IRQMISC_DMADISABLECLR) {
@@ -322,8 +316,6 @@ static irqreturn_t dwc3_omap_interrupt(int irq, void *_omap)
322 316
323 dwc3_omap_write_irq0_status(omap, reg); 317 dwc3_omap_write_irq0_status(omap, reg);
324 318
325 spin_unlock(&omap->lock);
326
327 return IRQ_HANDLED; 319 return IRQ_HANDLED;
328} 320}
329 321
@@ -449,8 +441,6 @@ static int dwc3_omap_probe(struct platform_device *pdev)
449 } 441 }
450 } 442 }
451 443
452 spin_lock_init(&omap->lock);
453
454 omap->dev = dev; 444 omap->dev = dev;
455 omap->irq = irq; 445 omap->irq = irq;
456 omap->base = base; 446 omap->base = base;
@@ -535,7 +525,7 @@ static int dwc3_omap_probe(struct platform_device *pdev)
535 edev = of_extcon_get_extcon_dev(dev, 0); 525 edev = of_extcon_get_extcon_dev(dev, 0);
536 if (IS_ERR(edev)) { 526 if (IS_ERR(edev)) {
537 dev_vdbg(dev, "couldn't get extcon device\n"); 527 dev_vdbg(dev, "couldn't get extcon device\n");
538 ret = PTR_ERR(edev); 528 ret = -EPROBE_DEFER;
539 goto err2; 529 goto err2;
540 } 530 }
541 531
diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c
index 31443aeedcdb..f393c183cc69 100644
--- a/drivers/usb/dwc3/dwc3-pci.c
+++ b/drivers/usb/dwc3/dwc3-pci.c
@@ -52,6 +52,7 @@ static int dwc3_pci_register_phys(struct dwc3_pci *glue)
52 52
53 glue->usb2_phy = pdev; 53 glue->usb2_phy = pdev;
54 pdata.type = USB_PHY_TYPE_USB2; 54 pdata.type = USB_PHY_TYPE_USB2;
55 pdata.gpio_reset = -1;
55 56
56 ret = platform_device_add_data(glue->usb2_phy, &pdata, sizeof(pdata)); 57 ret = platform_device_add_data(glue->usb2_phy, &pdata, sizeof(pdata));
57 if (ret) 58 if (ret)
@@ -182,7 +183,7 @@ static void dwc3_pci_remove(struct pci_dev *pci)
182 pci_disable_device(pci); 183 pci_disable_device(pci);
183} 184}
184 185
185static DEFINE_PCI_DEVICE_TABLE(dwc3_pci_id_table) = { 186static const struct pci_device_id dwc3_pci_id_table[] = {
186 { 187 {
187 PCI_DEVICE(PCI_VENDOR_ID_SYNOPSYS, 188 PCI_DEVICE(PCI_VENDOR_ID_SYNOPSYS,
188 PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3), 189 PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3),
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 02e44fcaf205..2da0a5a2803a 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -1650,7 +1650,7 @@ static int dwc3_gadget_init_hw_endpoints(struct dwc3 *dwc,
1650 dev_vdbg(dwc->dev, "initializing %s\n", dep->name); 1650 dev_vdbg(dwc->dev, "initializing %s\n", dep->name);
1651 1651
1652 if (epnum == 0 || epnum == 1) { 1652 if (epnum == 0 || epnum == 1) {
1653 dep->endpoint.maxpacket = 512; 1653 usb_ep_set_maxpacket_limit(&dep->endpoint, 512);
1654 dep->endpoint.maxburst = 1; 1654 dep->endpoint.maxburst = 1;
1655 dep->endpoint.ops = &dwc3_gadget_ep0_ops; 1655 dep->endpoint.ops = &dwc3_gadget_ep0_ops;
1656 if (!epnum) 1656 if (!epnum)
@@ -1658,7 +1658,7 @@ static int dwc3_gadget_init_hw_endpoints(struct dwc3 *dwc,
1658 } else { 1658 } else {
1659 int ret; 1659 int ret;
1660 1660
1661 dep->endpoint.maxpacket = 1024; 1661 usb_ep_set_maxpacket_limit(&dep->endpoint, 1024);
1662 dep->endpoint.max_streams = 15; 1662 dep->endpoint.max_streams = 15;
1663 dep->endpoint.ops = &dwc3_gadget_ep_ops; 1663 dep->endpoint.ops = &dwc3_gadget_ep_ops;
1664 list_add_tail(&dep->endpoint.ep_list, 1664 list_add_tail(&dep->endpoint.ep_list,
@@ -2597,6 +2597,12 @@ int dwc3_gadget_init(struct dwc3 *dwc)
2597 dwc->gadget.name = "dwc3-gadget"; 2597 dwc->gadget.name = "dwc3-gadget";
2598 2598
2599 /* 2599 /*
2600 * Per databook, DWC3 needs buffer size to be aligned to MaxPacketSize
2601 * on ep out.
2602 */
2603 dwc->gadget.quirk_ep_out_aligned_size = true;
2604
2605 /*
2600 * REVISIT: Here we should clear all pending IRQs to be 2606 * REVISIT: Here we should clear all pending IRQs to be
2601 * sure we're starting from a well known location. 2607 * sure we're starting from a well known location.
2602 */ 2608 */
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index f66d96ad1f51..8154165aa601 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -216,6 +216,13 @@ config USB_FOTG210_UDC
216 Say "y" to link the driver statically, or "m" to build a 216 Say "y" to link the driver statically, or "m" to build a
217 dynamically linked module called "fotg210_udc". 217 dynamically linked module called "fotg210_udc".
218 218
219config USB_GR_UDC
220 tristate "Aeroflex Gaisler GRUSBDC USB Peripheral Controller Driver"
221 depends on HAS_DMA
222 help
223 Select this to support Aeroflex Gaisler GRUSBDC cores from the GRLIB
224 VHDL IP core library.
225
219config USB_OMAP 226config USB_OMAP
220 tristate "OMAP USB Device Controller" 227 tristate "OMAP USB Device Controller"
221 depends on ARCH_OMAP1 228 depends on ARCH_OMAP1
@@ -294,11 +301,11 @@ config USB_PXA27X
294 gadget drivers to also be dynamically linked. 301 gadget drivers to also be dynamically linked.
295 302
296config USB_S3C_HSOTG 303config USB_S3C_HSOTG
297 tristate "S3C HS/OtG USB Device controller" 304 depends on ARM
298 depends on S3C_DEV_USB_HSOTG 305 tristate "Designware/S3C HS/OtG USB Device controller"
299 help 306 help
300 The Samsung S3C64XX USB2.0 high-speed gadget controller 307 The Designware USB2.0 high-speed gadget controller
301 integrated into the S3C64XX series SoC. 308 integrated into many SoCs.
302 309
303config USB_S3C2410 310config USB_S3C2410
304 tristate "S3C2410 USB Device Controller" 311 tristate "S3C2410 USB Device Controller"
@@ -512,9 +519,6 @@ config USB_U_SERIAL
512config USB_U_ETHER 519config USB_U_ETHER
513 tristate 520 tristate
514 521
515config USB_U_RNDIS
516 tristate
517
518config USB_F_SERIAL 522config USB_F_SERIAL
519 tristate 523 tristate
520 524
@@ -542,6 +546,9 @@ config USB_F_RNDIS
542config USB_F_MASS_STORAGE 546config USB_F_MASS_STORAGE
543 tristate 547 tristate
544 548
549config USB_F_FS
550 tristate
551
545choice 552choice
546 tristate "USB Gadget Drivers" 553 tristate "USB Gadget Drivers"
547 default USB_ETH 554 default USB_ETH
@@ -642,7 +649,6 @@ config USB_CONFIGFS_RNDIS
642 depends on USB_CONFIGFS 649 depends on USB_CONFIGFS
643 depends on NET 650 depends on NET
644 select USB_U_ETHER 651 select USB_U_ETHER
645 select USB_U_RNDIS
646 select USB_F_RNDIS 652 select USB_F_RNDIS
647 help 653 help
648 Microsoft Windows XP bundles the "Remote NDIS" (RNDIS) protocol, 654 Microsoft Windows XP bundles the "Remote NDIS" (RNDIS) protocol,
@@ -690,6 +696,31 @@ config USB_CONFIGFS_MASS_STORAGE
690 device (in much the same way as the "loop" device driver), 696 device (in much the same way as the "loop" device driver),
691 specified as a module parameter or sysfs option. 697 specified as a module parameter or sysfs option.
692 698
699config USB_CONFIGFS_F_LB_SS
700 boolean "Loopback and sourcesink function (for testing)"
701 depends on USB_CONFIGFS
702 select USB_F_SS_LB
703 help
704 Loopback function loops back a configurable number of transfers.
705 Sourcesink function either sinks and sources bulk data.
706 It also implements control requests, for "chapter 9" conformance.
707 Make this be the first driver you try using on top of any new
708 USB peripheral controller driver. Then you can use host-side
709 test software, like the "usbtest" driver, to put your hardware
710 and its driver through a basic set of functional tests.
711
712config USB_CONFIGFS_F_FS
713 boolean "Function filesystem (FunctionFS)"
714 depends on USB_CONFIGFS
715 select USB_F_FS
716 help
717 The Function Filesystem (FunctionFS) lets one create USB
718 composite functions in user space in the same way GadgetFS
719 lets one create USB gadgets in user space. This allows creation
720 of composite gadgets such that some of the functions are
721 implemented in kernel space (for instance Ethernet, serial or
722 mass storage) and other are implemented in user space.
723
693config USB_ZERO 724config USB_ZERO
694 tristate "Gadget Zero (DEVELOPMENT)" 725 tristate "Gadget Zero (DEVELOPMENT)"
695 select USB_LIBCOMPOSITE 726 select USB_LIBCOMPOSITE
@@ -760,7 +791,6 @@ config USB_ETH
760 depends on NET 791 depends on NET
761 select USB_LIBCOMPOSITE 792 select USB_LIBCOMPOSITE
762 select USB_U_ETHER 793 select USB_U_ETHER
763 select USB_U_RNDIS
764 select USB_F_ECM 794 select USB_F_ECM
765 select USB_F_SUBSET 795 select USB_F_SUBSET
766 select CRC32 796 select CRC32
@@ -864,6 +894,7 @@ config USB_GADGETFS
864config USB_FUNCTIONFS 894config USB_FUNCTIONFS
865 tristate "Function Filesystem" 895 tristate "Function Filesystem"
866 select USB_LIBCOMPOSITE 896 select USB_LIBCOMPOSITE
897 select USB_F_FS
867 select USB_FUNCTIONFS_GENERIC if !(USB_FUNCTIONFS_ETH || USB_FUNCTIONFS_RNDIS) 898 select USB_FUNCTIONFS_GENERIC if !(USB_FUNCTIONFS_ETH || USB_FUNCTIONFS_RNDIS)
868 help 899 help
869 The Function Filesystem (FunctionFS) lets one create USB 900 The Function Filesystem (FunctionFS) lets one create USB
@@ -883,6 +914,8 @@ config USB_FUNCTIONFS_ETH
883 bool "Include configuration with CDC ECM (Ethernet)" 914 bool "Include configuration with CDC ECM (Ethernet)"
884 depends on USB_FUNCTIONFS && NET 915 depends on USB_FUNCTIONFS && NET
885 select USB_U_ETHER 916 select USB_U_ETHER
917 select USB_F_ECM
918 select USB_F_SUBSET
886 help 919 help
887 Include a configuration with CDC ECM function (Ethernet) and the 920 Include a configuration with CDC ECM function (Ethernet) and the
888 Function Filesystem. 921 Function Filesystem.
@@ -891,7 +924,7 @@ config USB_FUNCTIONFS_RNDIS
891 bool "Include configuration with RNDIS (Ethernet)" 924 bool "Include configuration with RNDIS (Ethernet)"
892 depends on USB_FUNCTIONFS && NET 925 depends on USB_FUNCTIONFS && NET
893 select USB_U_ETHER 926 select USB_U_ETHER
894 select USB_U_RNDIS 927 select USB_F_RNDIS
895 help 928 help
896 Include a configuration with RNDIS function (Ethernet) and the Filesystem. 929 Include a configuration with RNDIS function (Ethernet) and the Filesystem.
897 930
@@ -1065,7 +1098,6 @@ config USB_G_MULTI
1065config USB_G_MULTI_RNDIS 1098config USB_G_MULTI_RNDIS
1066 bool "RNDIS + CDC Serial + Storage configuration" 1099 bool "RNDIS + CDC Serial + Storage configuration"
1067 depends on USB_G_MULTI 1100 depends on USB_G_MULTI
1068 select USB_U_RNDIS
1069 select USB_F_RNDIS 1101 select USB_F_RNDIS
1070 default y 1102 default y
1071 help 1103 help
diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
index f1af39603d4d..5f150bc1b4bc 100644
--- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile
@@ -7,7 +7,7 @@ ccflags-$(CONFIG_USB_GADGET_VERBOSE) += -DVERBOSE_DEBUG
7obj-$(CONFIG_USB_GADGET) += udc-core.o 7obj-$(CONFIG_USB_GADGET) += udc-core.o
8obj-$(CONFIG_USB_LIBCOMPOSITE) += libcomposite.o 8obj-$(CONFIG_USB_LIBCOMPOSITE) += libcomposite.o
9libcomposite-y := usbstring.o config.o epautoconf.o 9libcomposite-y := usbstring.o config.o epautoconf.o
10libcomposite-y += composite.o functions.o configfs.o 10libcomposite-y += composite.o functions.o configfs.o u_f.o
11obj-$(CONFIG_USB_DUMMY_HCD) += dummy_hcd.o 11obj-$(CONFIG_USB_DUMMY_HCD) += dummy_hcd.o
12obj-$(CONFIG_USB_NET2272) += net2272.o 12obj-$(CONFIG_USB_NET2272) += net2272.o
13obj-$(CONFIG_USB_NET2280) += net2280.o 13obj-$(CONFIG_USB_NET2280) += net2280.o
@@ -35,6 +35,7 @@ mv_udc-y := mv_udc_core.o
35obj-$(CONFIG_USB_FUSB300) += fusb300_udc.o 35obj-$(CONFIG_USB_FUSB300) += fusb300_udc.o
36obj-$(CONFIG_USB_FOTG210_UDC) += fotg210-udc.o 36obj-$(CONFIG_USB_FOTG210_UDC) += fotg210-udc.o
37obj-$(CONFIG_USB_MV_U3D) += mv_u3d_core.o 37obj-$(CONFIG_USB_MV_U3D) += mv_u3d_core.o
38obj-$(CONFIG_USB_GR_UDC) += gr_udc.o
38 39
39# USB Functions 40# USB Functions
40usb_f_acm-y := f_acm.o 41usb_f_acm-y := f_acm.o
@@ -47,8 +48,6 @@ obj-$(CONFIG_USB_F_SERIAL) += usb_f_serial.o
47usb_f_obex-y := f_obex.o 48usb_f_obex-y := f_obex.o
48obj-$(CONFIG_USB_F_OBEX) += usb_f_obex.o 49obj-$(CONFIG_USB_F_OBEX) += usb_f_obex.o
49obj-$(CONFIG_USB_U_ETHER) += u_ether.o 50obj-$(CONFIG_USB_U_ETHER) += u_ether.o
50u_rndis-y := rndis.o
51obj-$(CONFIG_USB_U_RNDIS) += u_rndis.o
52usb_f_ncm-y := f_ncm.o 51usb_f_ncm-y := f_ncm.o
53obj-$(CONFIG_USB_F_NCM) += usb_f_ncm.o 52obj-$(CONFIG_USB_F_NCM) += usb_f_ncm.o
54usb_f_ecm-y := f_ecm.o 53usb_f_ecm-y := f_ecm.o
@@ -59,10 +58,12 @@ usb_f_eem-y := f_eem.o
59obj-$(CONFIG_USB_F_EEM) += usb_f_eem.o 58obj-$(CONFIG_USB_F_EEM) += usb_f_eem.o
60usb_f_ecm_subset-y := f_subset.o 59usb_f_ecm_subset-y := f_subset.o
61obj-$(CONFIG_USB_F_SUBSET) += usb_f_ecm_subset.o 60obj-$(CONFIG_USB_F_SUBSET) += usb_f_ecm_subset.o
62usb_f_rndis-y := f_rndis.o 61usb_f_rndis-y := f_rndis.o rndis.o
63obj-$(CONFIG_USB_F_RNDIS) += usb_f_rndis.o 62obj-$(CONFIG_USB_F_RNDIS) += usb_f_rndis.o
64usb_f_mass_storage-y := f_mass_storage.o storage_common.o 63usb_f_mass_storage-y := f_mass_storage.o storage_common.o
65obj-$(CONFIG_USB_F_MASS_STORAGE)+= usb_f_mass_storage.o 64obj-$(CONFIG_USB_F_MASS_STORAGE)+= usb_f_mass_storage.o
65usb_f_fs-y := f_fs.o
66obj-$(CONFIG_USB_F_FS) += usb_f_fs.o
66 67
67# 68#
68# USB gadget drivers 69# USB gadget drivers
diff --git a/drivers/usb/gadget/acm_ms.c b/drivers/usb/gadget/acm_ms.c
index 7bfa134fe0e3..a252444cc0a7 100644
--- a/drivers/usb/gadget/acm_ms.c
+++ b/drivers/usb/gadget/acm_ms.c
@@ -107,7 +107,7 @@ static unsigned int fsg_num_buffers = CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS;
107 */ 107 */
108#define fsg_num_buffers CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS 108#define fsg_num_buffers CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS
109 109
110#endif /* CONFIG_USB_DEBUG */ 110#endif /* CONFIG_USB_GADGET_DEBUG_FILES */
111 111
112FSG_MODULE_PARAMETERS(/* no prefix */, fsg_mod_data); 112FSG_MODULE_PARAMETERS(/* no prefix */, fsg_mod_data);
113 113
diff --git a/drivers/usb/gadget/amd5536udc.c b/drivers/usb/gadget/amd5536udc.c
index 54a1e2954cea..41b062eb4de0 100644
--- a/drivers/usb/gadget/amd5536udc.c
+++ b/drivers/usb/gadget/amd5536udc.c
@@ -40,7 +40,6 @@
40#include <linux/sched.h> 40#include <linux/sched.h>
41#include <linux/slab.h> 41#include <linux/slab.h>
42#include <linux/errno.h> 42#include <linux/errno.h>
43#include <linux/init.h>
44#include <linux/timer.h> 43#include <linux/timer.h>
45#include <linux/list.h> 44#include <linux/list.h>
46#include <linux/interrupt.h> 45#include <linux/interrupt.h>
@@ -446,7 +445,7 @@ static void ep_init(struct udc_regs __iomem *regs, struct udc_ep *ep)
446 ep->ep.ops = &udc_ep_ops; 445 ep->ep.ops = &udc_ep_ops;
447 INIT_LIST_HEAD(&ep->queue); 446 INIT_LIST_HEAD(&ep->queue);
448 447
449 ep->ep.maxpacket = (u16) ~0; 448 usb_ep_set_maxpacket_limit(&ep->ep,(u16) ~0);
450 /* set NAK */ 449 /* set NAK */
451 tmp = readl(&ep->regs->ctl); 450 tmp = readl(&ep->regs->ctl);
452 tmp |= AMD_BIT(UDC_EPCTL_SNAK); 451 tmp |= AMD_BIT(UDC_EPCTL_SNAK);
@@ -1564,12 +1563,15 @@ static void udc_setup_endpoints(struct udc *dev)
1564 } 1563 }
1565 /* EP0 max packet */ 1564 /* EP0 max packet */
1566 if (dev->gadget.speed == USB_SPEED_FULL) { 1565 if (dev->gadget.speed == USB_SPEED_FULL) {
1567 dev->ep[UDC_EP0IN_IX].ep.maxpacket = UDC_FS_EP0IN_MAX_PKT_SIZE; 1566 usb_ep_set_maxpacket_limit(&dev->ep[UDC_EP0IN_IX].ep,
1568 dev->ep[UDC_EP0OUT_IX].ep.maxpacket = 1567 UDC_FS_EP0IN_MAX_PKT_SIZE);
1569 UDC_FS_EP0OUT_MAX_PKT_SIZE; 1568 usb_ep_set_maxpacket_limit(&dev->ep[UDC_EP0OUT_IX].ep,
1569 UDC_FS_EP0OUT_MAX_PKT_SIZE);
1570 } else if (dev->gadget.speed == USB_SPEED_HIGH) { 1570 } else if (dev->gadget.speed == USB_SPEED_HIGH) {
1571 dev->ep[UDC_EP0IN_IX].ep.maxpacket = UDC_EP0IN_MAX_PKT_SIZE; 1571 usb_ep_set_maxpacket_limit(&dev->ep[UDC_EP0IN_IX].ep,
1572 dev->ep[UDC_EP0OUT_IX].ep.maxpacket = UDC_EP0OUT_MAX_PKT_SIZE; 1572 UDC_EP0IN_MAX_PKT_SIZE);
1573 usb_ep_set_maxpacket_limit(&dev->ep[UDC_EP0OUT_IX].ep,
1574 UDC_EP0OUT_MAX_PKT_SIZE);
1573 } 1575 }
1574 1576
1575 /* 1577 /*
@@ -3338,7 +3340,7 @@ static int udc_remote_wakeup(struct udc *dev)
3338} 3340}
3339 3341
3340/* PCI device parameters */ 3342/* PCI device parameters */
3341static DEFINE_PCI_DEVICE_TABLE(pci_id) = { 3343static const struct pci_device_id pci_id[] = {
3342 { 3344 {
3343 PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x2096), 3345 PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x2096),
3344 .class = (PCI_CLASS_SERIAL_USB << 8) | 0xfe, 3346 .class = (PCI_CLASS_SERIAL_USB << 8) | 0xfe,
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 4cc4fd6d1473..cea8c20a1425 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -21,7 +21,6 @@
21#include <linux/ioport.h> 21#include <linux/ioport.h>
22#include <linux/slab.h> 22#include <linux/slab.h>
23#include <linux/errno.h> 23#include <linux/errno.h>
24#include <linux/init.h>
25#include <linux/list.h> 24#include <linux/list.h>
26#include <linux/interrupt.h> 25#include <linux/interrupt.h>
27#include <linux/proc_fs.h> 26#include <linux/proc_fs.h>
@@ -834,7 +833,7 @@ static void udc_reinit(struct at91_udc *udc)
834 ep->ep.desc = NULL; 833 ep->ep.desc = NULL;
835 ep->stopped = 0; 834 ep->stopped = 0;
836 ep->fifo_bank = 0; 835 ep->fifo_bank = 0;
837 ep->ep.maxpacket = ep->maxpacket; 836 usb_ep_set_maxpacket_limit(&ep->ep, ep->maxpacket);
838 ep->creg = (void __iomem *) udc->udp_baseaddr + AT91_UDP_CSR(i); 837 ep->creg = (void __iomem *) udc->udp_baseaddr + AT91_UDP_CSR(i);
839 /* initialize one queue per endpoint */ 838 /* initialize one queue per endpoint */
840 INIT_LIST_HEAD(&ep->queue); 839 INIT_LIST_HEAD(&ep->queue);
@@ -1759,15 +1758,15 @@ static int at91udc_probe(struct platform_device *pdev)
1759 1758
1760 /* newer chips have more FIFO memory than rm9200 */ 1759 /* newer chips have more FIFO memory than rm9200 */
1761 if (cpu_is_at91sam9260() || cpu_is_at91sam9g20()) { 1760 if (cpu_is_at91sam9260() || cpu_is_at91sam9g20()) {
1762 udc->ep[0].maxpacket = 64; 1761 usb_ep_set_maxpacket_limit(&udc->ep[0].ep, 64);
1763 udc->ep[3].maxpacket = 64; 1762 usb_ep_set_maxpacket_limit(&udc->ep[3].ep, 64);
1764 udc->ep[4].maxpacket = 512; 1763 usb_ep_set_maxpacket_limit(&udc->ep[4].ep, 512);
1765 udc->ep[5].maxpacket = 512; 1764 usb_ep_set_maxpacket_limit(&udc->ep[5].ep, 512);
1766 } else if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) { 1765 } else if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) {
1767 udc->ep[3].maxpacket = 64; 1766 usb_ep_set_maxpacket_limit(&udc->ep[3].ep, 64);
1768 } else if (cpu_is_at91sam9263()) { 1767 } else if (cpu_is_at91sam9263()) {
1769 udc->ep[0].maxpacket = 64; 1768 usb_ep_set_maxpacket_limit(&udc->ep[0].ep, 64);
1770 udc->ep[3].maxpacket = 64; 1769 usb_ep_set_maxpacket_limit(&udc->ep[3].ep, 64);
1771 } 1770 }
1772 1771
1773 udc->udp_baseaddr = ioremap(res->start, resource_size(res)); 1772 udc->udp_baseaddr = ioremap(res->start, resource_size(res));
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index 2cb52e0438df..38bf67b1a97d 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -1012,7 +1012,7 @@ static void nop_release(struct device *dev)
1012 1012
1013} 1013}
1014 1014
1015struct usb_gadget usba_gadget_template = { 1015static struct usb_gadget usba_gadget_template = {
1016 .ops = &usba_udc_ops, 1016 .ops = &usba_udc_ops,
1017 .max_speed = USB_SPEED_HIGH, 1017 .max_speed = USB_SPEED_HIGH,
1018 .name = "atmel_usba_udc", 1018 .name = "atmel_usba_udc",
@@ -1904,7 +1904,7 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
1904 ep->dma_regs = udc->regs + USBA_DMA_BASE(i); 1904 ep->dma_regs = udc->regs + USBA_DMA_BASE(i);
1905 ep->fifo = udc->fifo + USBA_FIFO_BASE(i); 1905 ep->fifo = udc->fifo + USBA_FIFO_BASE(i);
1906 ep->ep.ops = &usba_ep_ops; 1906 ep->ep.ops = &usba_ep_ops;
1907 ep->ep.maxpacket = ep->fifo_size; 1907 usb_ep_set_maxpacket_limit(&ep->ep, ep->fifo_size);
1908 ep->udc = udc; 1908 ep->udc = udc;
1909 INIT_LIST_HEAD(&ep->queue); 1909 INIT_LIST_HEAD(&ep->queue);
1910 1910
@@ -1957,7 +1957,8 @@ static struct usba_ep * usba_udc_pdata(struct platform_device *pdev,
1957 ep->fifo = udc->fifo + USBA_FIFO_BASE(i); 1957 ep->fifo = udc->fifo + USBA_FIFO_BASE(i);
1958 ep->ep.ops = &usba_ep_ops; 1958 ep->ep.ops = &usba_ep_ops;
1959 ep->ep.name = pdata->ep[i].name; 1959 ep->ep.name = pdata->ep[i].name;
1960 ep->fifo_size = ep->ep.maxpacket = pdata->ep[i].fifo_size; 1960 ep->fifo_size = pdata->ep[i].fifo_size;
1961 usb_ep_set_maxpacket_limit(&ep->ep, ep->fifo_size);
1961 ep->udc = udc; 1962 ep->udc = udc;
1962 INIT_LIST_HEAD(&ep->queue); 1963 INIT_LIST_HEAD(&ep->queue);
1963 ep->nr_banks = pdata->ep[i].nr_banks; 1964 ep->nr_banks = pdata->ep[i].nr_banks;
@@ -1995,14 +1996,12 @@ static int __init usba_udc_probe(struct platform_device *pdev)
1995 if (irq < 0) 1996 if (irq < 0)
1996 return irq; 1997 return irq;
1997 1998
1998 pclk = clk_get(&pdev->dev, "pclk"); 1999 pclk = devm_clk_get(&pdev->dev, "pclk");
1999 if (IS_ERR(pclk)) 2000 if (IS_ERR(pclk))
2000 return PTR_ERR(pclk); 2001 return PTR_ERR(pclk);
2001 hclk = clk_get(&pdev->dev, "hclk"); 2002 hclk = devm_clk_get(&pdev->dev, "hclk");
2002 if (IS_ERR(hclk)) { 2003 if (IS_ERR(hclk))
2003 ret = PTR_ERR(hclk); 2004 return PTR_ERR(hclk);
2004 goto err_get_hclk;
2005 }
2006 2005
2007 spin_lock_init(&udc->lock); 2006 spin_lock_init(&udc->lock);
2008 udc->pdev = pdev; 2007 udc->pdev = pdev;
@@ -2011,17 +2010,17 @@ static int __init usba_udc_probe(struct platform_device *pdev)
2011 udc->vbus_pin = -ENODEV; 2010 udc->vbus_pin = -ENODEV;
2012 2011
2013 ret = -ENOMEM; 2012 ret = -ENOMEM;
2014 udc->regs = ioremap(regs->start, resource_size(regs)); 2013 udc->regs = devm_ioremap(&pdev->dev, regs->start, resource_size(regs));
2015 if (!udc->regs) { 2014 if (!udc->regs) {
2016 dev_err(&pdev->dev, "Unable to map I/O memory, aborting.\n"); 2015 dev_err(&pdev->dev, "Unable to map I/O memory, aborting.\n");
2017 goto err_map_regs; 2016 return ret;
2018 } 2017 }
2019 dev_info(&pdev->dev, "MMIO registers at 0x%08lx mapped at %p\n", 2018 dev_info(&pdev->dev, "MMIO registers at 0x%08lx mapped at %p\n",
2020 (unsigned long)regs->start, udc->regs); 2019 (unsigned long)regs->start, udc->regs);
2021 udc->fifo = ioremap(fifo->start, resource_size(fifo)); 2020 udc->fifo = devm_ioremap(&pdev->dev, fifo->start, resource_size(fifo));
2022 if (!udc->fifo) { 2021 if (!udc->fifo) {
2023 dev_err(&pdev->dev, "Unable to map FIFO, aborting.\n"); 2022 dev_err(&pdev->dev, "Unable to map FIFO, aborting.\n");
2024 goto err_map_fifo; 2023 return ret;
2025 } 2024 }
2026 dev_info(&pdev->dev, "FIFO at 0x%08lx mapped at %p\n", 2025 dev_info(&pdev->dev, "FIFO at 0x%08lx mapped at %p\n",
2027 (unsigned long)fifo->start, udc->fifo); 2026 (unsigned long)fifo->start, udc->fifo);
@@ -2032,7 +2031,7 @@ static int __init usba_udc_probe(struct platform_device *pdev)
2032 ret = clk_prepare_enable(pclk); 2031 ret = clk_prepare_enable(pclk);
2033 if (ret) { 2032 if (ret) {
2034 dev_err(&pdev->dev, "Unable to enable pclk, aborting.\n"); 2033 dev_err(&pdev->dev, "Unable to enable pclk, aborting.\n");
2035 goto err_clk_enable; 2034 return ret;
2036 } 2035 }
2037 toggle_bias(0); 2036 toggle_bias(0);
2038 usba_writel(udc, CTRL, USBA_DISABLE_MASK); 2037 usba_writel(udc, CTRL, USBA_DISABLE_MASK);
@@ -2043,22 +2042,22 @@ static int __init usba_udc_probe(struct platform_device *pdev)
2043 else 2042 else
2044 udc->usba_ep = usba_udc_pdata(pdev, udc); 2043 udc->usba_ep = usba_udc_pdata(pdev, udc);
2045 2044
2046 if (IS_ERR(udc->usba_ep)) { 2045 if (IS_ERR(udc->usba_ep))
2047 ret = PTR_ERR(udc->usba_ep); 2046 return PTR_ERR(udc->usba_ep);
2048 goto err_alloc_ep;
2049 }
2050 2047
2051 ret = request_irq(irq, usba_udc_irq, 0, "atmel_usba_udc", udc); 2048 ret = devm_request_irq(&pdev->dev, irq, usba_udc_irq, 0,
2049 "atmel_usba_udc", udc);
2052 if (ret) { 2050 if (ret) {
2053 dev_err(&pdev->dev, "Cannot request irq %d (error %d)\n", 2051 dev_err(&pdev->dev, "Cannot request irq %d (error %d)\n",
2054 irq, ret); 2052 irq, ret);
2055 goto err_request_irq; 2053 return ret;
2056 } 2054 }
2057 udc->irq = irq; 2055 udc->irq = irq;
2058 2056
2059 if (gpio_is_valid(udc->vbus_pin)) { 2057 if (gpio_is_valid(udc->vbus_pin)) {
2060 if (!devm_gpio_request(&pdev->dev, udc->vbus_pin, "atmel_usba_udc")) { 2058 if (!devm_gpio_request(&pdev->dev, udc->vbus_pin, "atmel_usba_udc")) {
2061 ret = request_irq(gpio_to_irq(udc->vbus_pin), 2059 ret = devm_request_irq(&pdev->dev,
2060 gpio_to_irq(udc->vbus_pin),
2062 usba_vbus_irq, 0, 2061 usba_vbus_irq, 0,
2063 "atmel_usba_udc", udc); 2062 "atmel_usba_udc", udc);
2064 if (ret) { 2063 if (ret) {
@@ -2077,31 +2076,13 @@ static int __init usba_udc_probe(struct platform_device *pdev)
2077 2076
2078 ret = usb_add_gadget_udc(&pdev->dev, &udc->gadget); 2077 ret = usb_add_gadget_udc(&pdev->dev, &udc->gadget);
2079 if (ret) 2078 if (ret)
2080 goto err_add_udc; 2079 return ret;
2081 2080
2082 usba_init_debugfs(udc); 2081 usba_init_debugfs(udc);
2083 for (i = 1; i < udc->num_ep; i++) 2082 for (i = 1; i < udc->num_ep; i++)
2084 usba_ep_init_debugfs(udc, &udc->usba_ep[i]); 2083 usba_ep_init_debugfs(udc, &udc->usba_ep[i]);
2085 2084
2086 return 0; 2085 return 0;
2087
2088err_add_udc:
2089 if (gpio_is_valid(udc->vbus_pin))
2090 free_irq(gpio_to_irq(udc->vbus_pin), udc);
2091
2092 free_irq(irq, udc);
2093err_request_irq:
2094err_alloc_ep:
2095err_clk_enable:
2096 iounmap(udc->fifo);
2097err_map_fifo:
2098 iounmap(udc->regs);
2099err_map_regs:
2100 clk_put(hclk);
2101err_get_hclk:
2102 clk_put(pclk);
2103
2104 return ret;
2105} 2086}
2106 2087
2107static int __exit usba_udc_remove(struct platform_device *pdev) 2088static int __exit usba_udc_remove(struct platform_device *pdev)
@@ -2117,16 +2098,6 @@ static int __exit usba_udc_remove(struct platform_device *pdev)
2117 usba_ep_cleanup_debugfs(&udc->usba_ep[i]); 2098 usba_ep_cleanup_debugfs(&udc->usba_ep[i]);
2118 usba_cleanup_debugfs(udc); 2099 usba_cleanup_debugfs(udc);
2119 2100
2120 if (gpio_is_valid(udc->vbus_pin)) {
2121 free_irq(gpio_to_irq(udc->vbus_pin), udc);
2122 }
2123
2124 free_irq(udc->irq, udc);
2125 iounmap(udc->fifo);
2126 iounmap(udc->regs);
2127 clk_put(udc->hclk);
2128 clk_put(udc->pclk);
2129
2130 return 0; 2101 return 0;
2131} 2102}
2132 2103
diff --git a/drivers/usb/gadget/bcm63xx_udc.c b/drivers/usb/gadget/bcm63xx_udc.c
index c58fcf1ebe41..888fbb43b338 100644
--- a/drivers/usb/gadget/bcm63xx_udc.c
+++ b/drivers/usb/gadget/bcm63xx_udc.c
@@ -19,7 +19,6 @@
19#include <linux/device.h> 19#include <linux/device.h>
20#include <linux/dma-mapping.h> 20#include <linux/dma-mapping.h>
21#include <linux/errno.h> 21#include <linux/errno.h>
22#include <linux/init.h>
23#include <linux/interrupt.h> 22#include <linux/interrupt.h>
24#include <linux/ioport.h> 23#include <linux/ioport.h>
25#include <linux/kconfig.h> 24#include <linux/kconfig.h>
@@ -549,7 +548,7 @@ static void bcm63xx_ep_setup(struct bcm63xx_udc *udc)
549 548
550 if (idx < 0) 549 if (idx < 0)
551 continue; 550 continue;
552 udc->bep[idx].ep.maxpacket = max_pkt; 551 usb_ep_set_maxpacket_limit(&udc->bep[idx].ep, max_pkt);
553 552
554 val = (idx << USBD_CSR_EP_LOG_SHIFT) | 553 val = (idx << USBD_CSR_EP_LOG_SHIFT) |
555 (cfg->dir << USBD_CSR_EP_DIR_SHIFT) | 554 (cfg->dir << USBD_CSR_EP_DIR_SHIFT) |
@@ -943,7 +942,7 @@ static int bcm63xx_init_udc_hw(struct bcm63xx_udc *udc)
943 bep->ep.ops = &bcm63xx_udc_ep_ops; 942 bep->ep.ops = &bcm63xx_udc_ep_ops;
944 list_add_tail(&bep->ep.ep_list, &udc->gadget.ep_list); 943 list_add_tail(&bep->ep.ep_list, &udc->gadget.ep_list);
945 bep->halted = 0; 944 bep->halted = 0;
946 bep->ep.maxpacket = BCM63XX_MAX_CTRL_PKT; 945 usb_ep_set_maxpacket_limit(&bep->ep, BCM63XX_MAX_CTRL_PKT);
947 bep->udc = udc; 946 bep->udc = udc;
948 bep->ep.desc = NULL; 947 bep->ep.desc = NULL;
949 INIT_LIST_HEAD(&bep->queue); 948 INIT_LIST_HEAD(&bep->queue);
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 2018ba1a2172..d742bed7a5fa 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -1452,8 +1452,22 @@ unknown:
1452 struct usb_configuration *c; 1452 struct usb_configuration *c;
1453 1453
1454 c = cdev->config; 1454 c = cdev->config;
1455 if (c && c->setup) 1455 if (!c)
1456 goto done;
1457
1458 /* try current config's setup */
1459 if (c->setup) {
1456 value = c->setup(c, ctrl); 1460 value = c->setup(c, ctrl);
1461 goto done;
1462 }
1463
1464 /* try the only function in the current config */
1465 if (!list_is_singular(&c->functions))
1466 goto done;
1467 f = list_first_entry(&c->functions, struct usb_function,
1468 list);
1469 if (f->setup)
1470 value = f->setup(f, ctrl);
1457 } 1471 }
1458 1472
1459 goto done; 1473 goto done;
@@ -1714,7 +1728,7 @@ composite_resume(struct usb_gadget *gadget)
1714{ 1728{
1715 struct usb_composite_dev *cdev = get_gadget_data(gadget); 1729 struct usb_composite_dev *cdev = get_gadget_data(gadget);
1716 struct usb_function *f; 1730 struct usb_function *f;
1717 u8 maxpower; 1731 u16 maxpower;
1718 1732
1719 /* REVISIT: should we have config level 1733 /* REVISIT: should we have config level
1720 * suspend/resume callbacks? 1734 * suspend/resume callbacks?
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
index 25885112fa35..7d1cc01796b6 100644
--- a/drivers/usb/gadget/configfs.c
+++ b/drivers/usb/gadget/configfs.c
@@ -4,6 +4,7 @@
4#include <linux/device.h> 4#include <linux/device.h>
5#include <linux/usb/composite.h> 5#include <linux/usb/composite.h>
6#include <linux/usb/gadget_configfs.h> 6#include <linux/usb/gadget_configfs.h>
7#include "configfs.h"
7 8
8int check_user_usb_string(const char *name, 9int check_user_usb_string(const char *name,
9 struct usb_gadget_strings *stringtab_dev) 10 struct usb_gadget_strings *stringtab_dev)
@@ -564,6 +565,13 @@ static struct config_group *function_make(
564 usb_put_function_instance(fi); 565 usb_put_function_instance(fi);
565 return ERR_PTR(ret); 566 return ERR_PTR(ret);
566 } 567 }
568 if (fi->set_inst_name) {
569 ret = fi->set_inst_name(fi, instance_name);
570 if (ret) {
571 usb_put_function_instance(fi);
572 return ERR_PTR(ret);
573 }
574 }
567 575
568 gi = container_of(group, struct gadget_info, functions_group); 576 gi = container_of(group, struct gadget_info, functions_group);
569 577
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index 8f4dae310923..8c06430dcc47 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -951,7 +951,7 @@ static void init_dummy_udc_hw(struct dummy *dum)
951 list_add_tail(&ep->ep.ep_list, &dum->gadget.ep_list); 951 list_add_tail(&ep->ep.ep_list, &dum->gadget.ep_list);
952 ep->halted = ep->wedged = ep->already_seen = 952 ep->halted = ep->wedged = ep->already_seen =
953 ep->setup_stage = 0; 953 ep->setup_stage = 0;
954 ep->ep.maxpacket = ~0; 954 usb_ep_set_maxpacket_limit(&ep->ep, ~0);
955 ep->ep.max_streams = 16; 955 ep->ep.max_streams = 16;
956 ep->last_io = jiffies; 956 ep->last_io = jiffies;
957 ep->gadget = &dum->gadget; 957 ep->gadget = &dum->gadget;
diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c
index a777f7bd11b4..0567cca1465e 100644
--- a/drivers/usb/gadget/epautoconf.c
+++ b/drivers/usb/gadget/epautoconf.c
@@ -11,7 +11,6 @@
11 11
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/init.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/device.h> 15#include <linux/device.h>
17 16
@@ -58,7 +57,7 @@ ep_matches (
58 return 0; 57 return 0;
59 58
60 /* only support ep0 for portable CONTROL traffic */ 59 /* only support ep0 for portable CONTROL traffic */
61 type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; 60 type = usb_endpoint_type(desc);
62 if (USB_ENDPOINT_XFER_CONTROL == type) 61 if (USB_ENDPOINT_XFER_CONTROL == type)
63 return 0; 62 return 0;
64 63
@@ -129,7 +128,7 @@ ep_matches (
129 * and wants to know the maximum possible, provide the info. 128 * and wants to know the maximum possible, provide the info.
130 */ 129 */
131 if (desc->wMaxPacketSize == 0) 130 if (desc->wMaxPacketSize == 0)
132 desc->wMaxPacketSize = cpu_to_le16(ep->maxpacket); 131 desc->wMaxPacketSize = cpu_to_le16(ep->maxpacket_limit);
133 132
134 /* endpoint maxpacket size is an input parameter, except for bulk 133 /* endpoint maxpacket size is an input parameter, except for bulk
135 * where it's an output parameter representing the full speed limit. 134 * where it's an output parameter representing the full speed limit.
@@ -145,7 +144,7 @@ ep_matches (
145 144
146 case USB_ENDPOINT_XFER_ISOC: 145 case USB_ENDPOINT_XFER_ISOC:
147 /* ISO: limit 1023 bytes full speed, 1024 high/super speed */ 146 /* ISO: limit 1023 bytes full speed, 1024 high/super speed */
148 if (ep->maxpacket < max) 147 if (ep->maxpacket_limit < max)
149 return 0; 148 return 0;
150 if (!gadget_is_dualspeed(gadget) && max > 1023) 149 if (!gadget_is_dualspeed(gadget) && max > 1023)
151 return 0; 150 return 0;
@@ -178,7 +177,7 @@ ep_matches (
178 177
179 /* report (variable) full speed bulk maxpacket */ 178 /* report (variable) full speed bulk maxpacket */
180 if ((USB_ENDPOINT_XFER_BULK == type) && !ep_comp) { 179 if ((USB_ENDPOINT_XFER_BULK == type) && !ep_comp) {
181 int size = ep->maxpacket; 180 int size = ep->maxpacket_limit;
182 181
183 /* min() doesn't work on bitfields with gcc-3.5 */ 182 /* min() doesn't work on bitfields with gcc-3.5 */
184 if (size > 64) 183 if (size > 64)
diff --git a/drivers/usb/gadget/f_ecm.c b/drivers/usb/gadget/f_ecm.c
index 8d9e6f7e8f1a..798760fa7e70 100644
--- a/drivers/usb/gadget/f_ecm.c
+++ b/drivers/usb/gadget/f_ecm.c
@@ -691,7 +691,6 @@ ecm_bind(struct usb_configuration *c, struct usb_function *f)
691 int status; 691 int status;
692 struct usb_ep *ep; 692 struct usb_ep *ep;
693 693
694#ifndef USBF_ECM_INCLUDED
695 struct f_ecm_opts *ecm_opts; 694 struct f_ecm_opts *ecm_opts;
696 695
697 if (!can_support_ecm(cdev->gadget)) 696 if (!can_support_ecm(cdev->gadget))
@@ -715,7 +714,7 @@ ecm_bind(struct usb_configuration *c, struct usb_function *f)
715 return status; 714 return status;
716 ecm_opts->bound = true; 715 ecm_opts->bound = true;
717 } 716 }
718#endif 717
719 us = usb_gstrings_attach(cdev, ecm_strings, 718 us = usb_gstrings_attach(cdev, ecm_strings,
720 ARRAY_SIZE(ecm_string_defs)); 719 ARRAY_SIZE(ecm_string_defs));
721 if (IS_ERR(us)) 720 if (IS_ERR(us))
@@ -834,74 +833,6 @@ fail:
834 return status; 833 return status;
835} 834}
836 835
837#ifdef USBF_ECM_INCLUDED
838
839static void
840ecm_old_unbind(struct usb_configuration *c, struct usb_function *f)
841{
842 struct f_ecm *ecm = func_to_ecm(f);
843
844 DBG(c->cdev, "ecm unbind\n");
845
846 usb_free_all_descriptors(f);
847
848 kfree(ecm->notify_req->buf);
849 usb_ep_free_request(ecm->notify, ecm->notify_req);
850 kfree(ecm);
851}
852
853/**
854 * ecm_bind_config - add CDC Ethernet network link to a configuration
855 * @c: the configuration to support the network link
856 * @ethaddr: a buffer in which the ethernet address of the host side
857 * side of the link was recorded
858 * @dev: eth_dev structure
859 * Context: single threaded during gadget setup
860 *
861 * Returns zero on success, else negative errno.
862 *
863 * Caller must have called @gether_setup(). Caller is also responsible
864 * for calling @gether_cleanup() before module unload.
865 */
866int
867ecm_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN],
868 struct eth_dev *dev)
869{
870 struct f_ecm *ecm;
871 int status;
872
873 if (!can_support_ecm(c->cdev->gadget) || !ethaddr)
874 return -EINVAL;
875
876 /* allocate and initialize one new instance */
877 ecm = kzalloc(sizeof *ecm, GFP_KERNEL);
878 if (!ecm)
879 return -ENOMEM;
880
881 /* export host's Ethernet address in CDC format */
882 snprintf(ecm->ethaddr, sizeof ecm->ethaddr, "%pm", ethaddr);
883 ecm_string_defs[1].s = ecm->ethaddr;
884
885 ecm->port.ioport = dev;
886 ecm->port.cdc_filter = DEFAULT_FILTER;
887
888 ecm->port.func.name = "cdc_ethernet";
889 /* descriptors are per-instance copies */
890 ecm->port.func.bind = ecm_bind;
891 ecm->port.func.unbind = ecm_old_unbind;
892 ecm->port.func.set_alt = ecm_set_alt;
893 ecm->port.func.get_alt = ecm_get_alt;
894 ecm->port.func.setup = ecm_setup;
895 ecm->port.func.disable = ecm_disable;
896
897 status = usb_add_function(c, &ecm->port.func);
898 if (status)
899 kfree(ecm);
900 return status;
901}
902
903#else
904
905static inline struct f_ecm_opts *to_f_ecm_opts(struct config_item *item) 836static inline struct f_ecm_opts *to_f_ecm_opts(struct config_item *item)
906{ 837{
907 return container_of(to_config_group(item), struct f_ecm_opts, 838 return container_of(to_config_group(item), struct f_ecm_opts,
@@ -1040,5 +971,3 @@ static struct usb_function *ecm_alloc(struct usb_function_instance *fi)
1040DECLARE_USB_FUNCTION_INIT(ecm, ecm_alloc_inst, ecm_alloc); 971DECLARE_USB_FUNCTION_INIT(ecm, ecm_alloc_inst, ecm_alloc);
1041MODULE_LICENSE("GPL"); 972MODULE_LICENSE("GPL");
1042MODULE_AUTHOR("David Brownell"); 973MODULE_AUTHOR("David Brownell");
1043
1044#endif
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
index 241fc873ffa4..306a2b52125c 100644
--- a/drivers/usb/gadget/f_fs.c
+++ b/drivers/usb/gadget/f_fs.c
@@ -22,218 +22,42 @@
22#include <linux/pagemap.h> 22#include <linux/pagemap.h>
23#include <linux/export.h> 23#include <linux/export.h>
24#include <linux/hid.h> 24#include <linux/hid.h>
25#include <linux/module.h>
25#include <asm/unaligned.h> 26#include <asm/unaligned.h>
26 27
27#include <linux/usb/composite.h> 28#include <linux/usb/composite.h>
28#include <linux/usb/functionfs.h> 29#include <linux/usb/functionfs.h>
29 30
31#include "u_fs.h"
32#include "configfs.h"
30 33
31#define FUNCTIONFS_MAGIC 0xa647361 /* Chosen by a honest dice roll ;) */ 34#define FUNCTIONFS_MAGIC 0xa647361 /* Chosen by a honest dice roll ;) */
32 35
33 36/* Variable Length Array Macros **********************************************/
34/* Debugging ****************************************************************/ 37#define vla_group(groupname) size_t groupname##__next = 0
35 38#define vla_group_size(groupname) groupname##__next
36#ifdef VERBOSE_DEBUG 39
37#ifndef pr_vdebug 40#define vla_item(groupname, type, name, n) \
38# define pr_vdebug pr_debug 41 size_t groupname##_##name##__offset = ({ \
39#endif /* pr_vdebug */ 42 size_t align_mask = __alignof__(type) - 1; \
40# define ffs_dump_mem(prefix, ptr, len) \ 43 size_t offset = (groupname##__next + align_mask) & ~align_mask;\
41 print_hex_dump_bytes(pr_fmt(prefix ": "), DUMP_PREFIX_NONE, ptr, len) 44 size_t size = (n) * sizeof(type); \
42#else 45 groupname##__next = offset + size; \
43#ifndef pr_vdebug 46 offset; \
44# define pr_vdebug(...) do { } while (0) 47 })
45#endif /* pr_vdebug */ 48
46# define ffs_dump_mem(prefix, ptr, len) do { } while (0) 49#define vla_item_with_sz(groupname, type, name, n) \
47#endif /* VERBOSE_DEBUG */ 50 size_t groupname##_##name##__sz = (n) * sizeof(type); \
48 51 size_t groupname##_##name##__offset = ({ \
49#define ENTER() pr_vdebug("%s()\n", __func__) 52 size_t align_mask = __alignof__(type) - 1; \
50 53 size_t offset = (groupname##__next + align_mask) & ~align_mask;\
51 54 size_t size = groupname##_##name##__sz; \
52/* The data structure and setup file ****************************************/ 55 groupname##__next = offset + size; \
53 56 offset; \
54enum ffs_state { 57 })
55 /* 58
56 * Waiting for descriptors and strings. 59#define vla_ptr(ptr, groupname, name) \
57 * 60 ((void *) ((char *)ptr + groupname##_##name##__offset))
58 * In this state no open(2), read(2) or write(2) on epfiles
59 * may succeed (which should not be the problem as there
60 * should be no such files opened in the first place).
61 */
62 FFS_READ_DESCRIPTORS,
63 FFS_READ_STRINGS,
64
65 /*
66 * We've got descriptors and strings. We are or have called
67 * functionfs_ready_callback(). functionfs_bind() may have
68 * been called but we don't know.
69 *
70 * This is the only state in which operations on epfiles may
71 * succeed.
72 */
73 FFS_ACTIVE,
74
75 /*
76 * All endpoints have been closed. This state is also set if
77 * we encounter an unrecoverable error. The only
78 * unrecoverable error is situation when after reading strings
79 * from user space we fail to initialise epfiles or
80 * functionfs_ready_callback() returns with error (<0).
81 *
82 * In this state no open(2), read(2) or write(2) (both on ep0
83 * as well as epfile) may succeed (at this point epfiles are
84 * unlinked and all closed so this is not a problem; ep0 is
85 * also closed but ep0 file exists and so open(2) on ep0 must
86 * fail).
87 */
88 FFS_CLOSING
89};
90
91
92enum ffs_setup_state {
93 /* There is no setup request pending. */
94 FFS_NO_SETUP,
95 /*
96 * User has read events and there was a setup request event
97 * there. The next read/write on ep0 will handle the
98 * request.
99 */
100 FFS_SETUP_PENDING,
101 /*
102 * There was event pending but before user space handled it
103 * some other event was introduced which canceled existing
104 * setup. If this state is set read/write on ep0 return
105 * -EIDRM. This state is only set when adding event.
106 */
107 FFS_SETUP_CANCELED
108};
109
110
111
112struct ffs_epfile;
113struct ffs_function;
114
115struct ffs_data {
116 struct usb_gadget *gadget;
117
118 /*
119 * Protect access read/write operations, only one read/write
120 * at a time. As a consequence protects ep0req and company.
121 * While setup request is being processed (queued) this is
122 * held.
123 */
124 struct mutex mutex;
125
126 /*
127 * Protect access to endpoint related structures (basically
128 * usb_ep_queue(), usb_ep_dequeue(), etc. calls) except for
129 * endpoint zero.
130 */
131 spinlock_t eps_lock;
132
133 /*
134 * XXX REVISIT do we need our own request? Since we are not
135 * handling setup requests immediately user space may be so
136 * slow that another setup will be sent to the gadget but this
137 * time not to us but another function and then there could be
138 * a race. Is that the case? Or maybe we can use cdev->req
139 * after all, maybe we just need some spinlock for that?
140 */
141 struct usb_request *ep0req; /* P: mutex */
142 struct completion ep0req_completion; /* P: mutex */
143 int ep0req_status; /* P: mutex */
144
145 /* reference counter */
146 atomic_t ref;
147 /* how many files are opened (EP0 and others) */
148 atomic_t opened;
149
150 /* EP0 state */
151 enum ffs_state state;
152
153 /*
154 * Possible transitions:
155 * + FFS_NO_SETUP -> FFS_SETUP_PENDING -- P: ev.waitq.lock
156 * happens only in ep0 read which is P: mutex
157 * + FFS_SETUP_PENDING -> FFS_NO_SETUP -- P: ev.waitq.lock
158 * happens only in ep0 i/o which is P: mutex
159 * + FFS_SETUP_PENDING -> FFS_SETUP_CANCELED -- P: ev.waitq.lock
160 * + FFS_SETUP_CANCELED -> FFS_NO_SETUP -- cmpxchg
161 */
162 enum ffs_setup_state setup_state;
163
164#define FFS_SETUP_STATE(ffs) \
165 ((enum ffs_setup_state)cmpxchg(&(ffs)->setup_state, \
166 FFS_SETUP_CANCELED, FFS_NO_SETUP))
167
168 /* Events & such. */
169 struct {
170 u8 types[4];
171 unsigned short count;
172 /* XXX REVISIT need to update it in some places, or do we? */
173 unsigned short can_stall;
174 struct usb_ctrlrequest setup;
175
176 wait_queue_head_t waitq;
177 } ev; /* the whole structure, P: ev.waitq.lock */
178
179 /* Flags */
180 unsigned long flags;
181#define FFS_FL_CALL_CLOSED_CALLBACK 0
182#define FFS_FL_BOUND 1
183
184 /* Active function */
185 struct ffs_function *func;
186
187 /*
188 * Device name, write once when file system is mounted.
189 * Intended for user to read if she wants.
190 */
191 const char *dev_name;
192 /* Private data for our user (ie. gadget). Managed by user. */
193 void *private_data;
194
195 /* filled by __ffs_data_got_descs() */
196 /*
197 * Real descriptors are 16 bytes after raw_descs (so you need
198 * to skip 16 bytes (ie. ffs->raw_descs + 16) to get to the
199 * first full speed descriptor). raw_descs_length and
200 * raw_fs_descs_length do not have those 16 bytes added.
201 */
202 const void *raw_descs;
203 unsigned raw_descs_length;
204 unsigned raw_fs_descs_length;
205 unsigned fs_descs_count;
206 unsigned hs_descs_count;
207
208 unsigned short strings_count;
209 unsigned short interfaces_count;
210 unsigned short eps_count;
211 unsigned short _pad1;
212
213 /* filled by __ffs_data_got_strings() */
214 /* ids in stringtabs are set in functionfs_bind() */
215 const void *raw_strings;
216 struct usb_gadget_strings **stringtabs;
217
218 /*
219 * File system's super block, write once when file system is
220 * mounted.
221 */
222 struct super_block *sb;
223
224 /* File permissions, written once when fs is mounted */
225 struct ffs_file_perms {
226 umode_t mode;
227 kuid_t uid;
228 kgid_t gid;
229 } file_perms;
230
231 /*
232 * The endpoint files, filled by ffs_epfiles_create(),
233 * destroyed by ffs_epfiles_destroy().
234 */
235 struct ffs_epfile *epfiles;
236};
237 61
238/* Reference counter handling */ 62/* Reference counter handling */
239static void ffs_data_get(struct ffs_data *ffs); 63static void ffs_data_get(struct ffs_data *ffs);
@@ -274,15 +98,12 @@ static struct ffs_function *ffs_func_from_usb(struct usb_function *f)
274 return container_of(f, struct ffs_function, function); 98 return container_of(f, struct ffs_function, function);
275} 99}
276 100
277static void ffs_func_free(struct ffs_function *func);
278 101
279static void ffs_func_eps_disable(struct ffs_function *func); 102static void ffs_func_eps_disable(struct ffs_function *func);
280static int __must_check ffs_func_eps_enable(struct ffs_function *func); 103static int __must_check ffs_func_eps_enable(struct ffs_function *func);
281 104
282static int ffs_func_bind(struct usb_configuration *, 105static int ffs_func_bind(struct usb_configuration *,
283 struct usb_function *); 106 struct usb_function *);
284static void ffs_func_unbind(struct usb_configuration *,
285 struct usb_function *);
286static int ffs_func_set_alt(struct usb_function *, unsigned, unsigned); 107static int ffs_func_set_alt(struct usb_function *, unsigned, unsigned);
287static void ffs_func_disable(struct usb_function *); 108static void ffs_func_disable(struct usb_function *);
288static int ffs_func_setup(struct usb_function *, 109static int ffs_func_setup(struct usb_function *,
@@ -335,6 +156,17 @@ ffs_sb_create_file(struct super_block *sb, const char *name, void *data,
335 const struct file_operations *fops, 156 const struct file_operations *fops,
336 struct dentry **dentry_p); 157 struct dentry **dentry_p);
337 158
159/* Devices management *******************************************************/
160
161DEFINE_MUTEX(ffs_lock);
162EXPORT_SYMBOL(ffs_lock);
163
164static struct ffs_dev *ffs_find_dev(const char *name);
165static int _ffs_name_dev(struct ffs_dev *dev, const char *name);
166static void *ffs_acquire_dev(const char *dev_name);
167static void ffs_release_dev(struct ffs_data *ffs_data);
168static int ffs_ready(struct ffs_data *ffs);
169static void ffs_closed(struct ffs_data *ffs);
338 170
339/* Misc helper functions ****************************************************/ 171/* Misc helper functions ****************************************************/
340 172
@@ -460,7 +292,7 @@ static ssize_t ffs_ep0_write(struct file *file, const char __user *buf,
460 ffs->state = FFS_ACTIVE; 292 ffs->state = FFS_ACTIVE;
461 mutex_unlock(&ffs->mutex); 293 mutex_unlock(&ffs->mutex);
462 294
463 ret = functionfs_ready_callback(ffs); 295 ret = ffs_ready(ffs);
464 if (unlikely(ret < 0)) { 296 if (unlikely(ret < 0)) {
465 ffs->state = FFS_CLOSING; 297 ffs->state = FFS_CLOSING;
466 return ret; 298 return ret;
@@ -753,78 +585,71 @@ static ssize_t ffs_epfile_io(struct file *file,
753 char __user *buf, size_t len, int read) 585 char __user *buf, size_t len, int read)
754{ 586{
755 struct ffs_epfile *epfile = file->private_data; 587 struct ffs_epfile *epfile = file->private_data;
588 struct usb_gadget *gadget = epfile->ffs->gadget;
756 struct ffs_ep *ep; 589 struct ffs_ep *ep;
757 char *data = NULL; 590 char *data = NULL;
758 ssize_t ret; 591 ssize_t ret, data_len;
759 int halt; 592 int halt;
760 593
761 goto first_try; 594 /* Are we still active? */
762 do { 595 if (WARN_ON(epfile->ffs->state != FFS_ACTIVE)) {
763 spin_unlock_irq(&epfile->ffs->eps_lock); 596 ret = -ENODEV;
764 mutex_unlock(&epfile->mutex); 597 goto error;
598 }
765 599
766first_try: 600 /* Wait for endpoint to be enabled */
767 /* Are we still active? */ 601 ep = epfile->ep;
768 if (WARN_ON(epfile->ffs->state != FFS_ACTIVE)) { 602 if (!ep) {
769 ret = -ENODEV; 603 if (file->f_flags & O_NONBLOCK) {
604 ret = -EAGAIN;
770 goto error; 605 goto error;
771 } 606 }
772 607
773 /* Wait for endpoint to be enabled */ 608 ret = wait_event_interruptible(epfile->wait, (ep = epfile->ep));
774 ep = epfile->ep; 609 if (ret) {
775 if (!ep) { 610 ret = -EINTR;
776 if (file->f_flags & O_NONBLOCK) {
777 ret = -EAGAIN;
778 goto error;
779 }
780
781 if (wait_event_interruptible(epfile->wait,
782 (ep = epfile->ep))) {
783 ret = -EINTR;
784 goto error;
785 }
786 }
787
788 /* Do we halt? */
789 halt = !read == !epfile->in;
790 if (halt && epfile->isoc) {
791 ret = -EINVAL;
792 goto error; 611 goto error;
793 } 612 }
613 }
794 614
795 /* Allocate & copy */ 615 /* Do we halt? */
796 if (!halt && !data) { 616 halt = !read == !epfile->in;
797 data = kzalloc(len, GFP_KERNEL); 617 if (halt && epfile->isoc) {
798 if (unlikely(!data)) 618 ret = -EINVAL;
799 return -ENOMEM; 619 goto error;
620 }
800 621
801 if (!read && 622 /* Allocate & copy */
802 unlikely(__copy_from_user(data, buf, len))) { 623 if (!halt) {
803 ret = -EFAULT; 624 /*
804 goto error; 625 * Controller may require buffer size to be aligned to
805 } 626 * maxpacketsize of an out endpoint.
806 } 627 */
628 data_len = read ? usb_ep_align_maybe(gadget, ep->ep, len) : len;
629
630 data = kmalloc(data_len, GFP_KERNEL);
631 if (unlikely(!data))
632 return -ENOMEM;
807 633
808 /* We will be using request */ 634 if (!read && unlikely(copy_from_user(data, buf, len))) {
809 ret = ffs_mutex_lock(&epfile->mutex, 635 ret = -EFAULT;
810 file->f_flags & O_NONBLOCK);
811 if (unlikely(ret))
812 goto error; 636 goto error;
637 }
638 }
813 639
814 /* 640 /* We will be using request */
815 * We're called from user space, we can use _irq rather then 641 ret = ffs_mutex_lock(&epfile->mutex, file->f_flags & O_NONBLOCK);
816 * _irqsave 642 if (unlikely(ret))
817 */ 643 goto error;
818 spin_lock_irq(&epfile->ffs->eps_lock);
819 644
820 /* 645 spin_lock_irq(&epfile->ffs->eps_lock);
821 * While we were acquiring mutex endpoint got disabled
822 * or changed?
823 */
824 } while (unlikely(epfile->ep != ep));
825 646
826 /* Halt */ 647 if (epfile->ep != ep) {
827 if (unlikely(halt)) { 648 /* In the meantime, endpoint got disabled or changed. */
649 ret = -ESHUTDOWN;
650 spin_unlock_irq(&epfile->ffs->eps_lock);
651 } else if (halt) {
652 /* Halt */
828 if (likely(epfile->ep == ep) && !WARN_ON(!ep->ep)) 653 if (likely(epfile->ep == ep) && !WARN_ON(!ep->ep))
829 usb_ep_set_halt(ep->ep); 654 usb_ep_set_halt(ep->ep);
830 spin_unlock_irq(&epfile->ffs->eps_lock); 655 spin_unlock_irq(&epfile->ffs->eps_lock);
@@ -837,7 +662,7 @@ first_try:
837 req->context = &done; 662 req->context = &done;
838 req->complete = ffs_epfile_io_complete; 663 req->complete = ffs_epfile_io_complete;
839 req->buf = data; 664 req->buf = data;
840 req->length = len; 665 req->length = data_len;
841 666
842 ret = usb_ep_queue(ep->ep, req, GFP_ATOMIC); 667 ret = usb_ep_queue(ep->ep, req, GFP_ATOMIC);
843 668
@@ -849,9 +674,17 @@ first_try:
849 ret = -EINTR; 674 ret = -EINTR;
850 usb_ep_dequeue(ep->ep, req); 675 usb_ep_dequeue(ep->ep, req);
851 } else { 676 } else {
677 /*
678 * XXX We may end up silently droping data here.
679 * Since data_len (i.e. req->length) may be bigger
680 * than len (after being rounded up to maxpacketsize),
681 * we may end up with more data then user space has
682 * space for.
683 */
852 ret = ep->status; 684 ret = ep->status;
853 if (read && ret > 0 && 685 if (read && ret > 0 &&
854 unlikely(copy_to_user(buf, data, ret))) 686 unlikely(copy_to_user(buf, data,
687 min_t(size_t, ret, len))))
855 ret = -EFAULT; 688 ret = -EFAULT;
856 } 689 }
857 } 690 }
@@ -1191,7 +1024,7 @@ ffs_fs_mount(struct file_system_type *t, int flags,
1191 return ERR_PTR(-ENOMEM); 1024 return ERR_PTR(-ENOMEM);
1192 } 1025 }
1193 1026
1194 ffs_dev = functionfs_acquire_dev_callback(dev_name); 1027 ffs_dev = ffs_acquire_dev(dev_name);
1195 if (IS_ERR(ffs_dev)) { 1028 if (IS_ERR(ffs_dev)) {
1196 ffs_data_put(ffs); 1029 ffs_data_put(ffs);
1197 return ERR_CAST(ffs_dev); 1030 return ERR_CAST(ffs_dev);
@@ -1201,7 +1034,7 @@ ffs_fs_mount(struct file_system_type *t, int flags,
1201 1034
1202 rv = mount_nodev(t, flags, &data, ffs_sb_fill); 1035 rv = mount_nodev(t, flags, &data, ffs_sb_fill);
1203 if (IS_ERR(rv) && data.ffs_data) { 1036 if (IS_ERR(rv) && data.ffs_data) {
1204 functionfs_release_dev_callback(data.ffs_data); 1037 ffs_release_dev(data.ffs_data);
1205 ffs_data_put(data.ffs_data); 1038 ffs_data_put(data.ffs_data);
1206 } 1039 }
1207 return rv; 1040 return rv;
@@ -1214,7 +1047,7 @@ ffs_fs_kill_sb(struct super_block *sb)
1214 1047
1215 kill_litter_super(sb); 1048 kill_litter_super(sb);
1216 if (sb->s_fs_info) { 1049 if (sb->s_fs_info) {
1217 functionfs_release_dev_callback(sb->s_fs_info); 1050 ffs_release_dev(sb->s_fs_info);
1218 ffs_data_put(sb->s_fs_info); 1051 ffs_data_put(sb->s_fs_info);
1219 } 1052 }
1220} 1053}
@@ -1327,7 +1160,7 @@ static void ffs_data_clear(struct ffs_data *ffs)
1327 ENTER(); 1160 ENTER();
1328 1161
1329 if (test_and_clear_bit(FFS_FL_CALL_CLOSED_CALLBACK, &ffs->flags)) 1162 if (test_and_clear_bit(FFS_FL_CALL_CLOSED_CALLBACK, &ffs->flags))
1330 functionfs_closed_callback(ffs); 1163 ffs_closed(ffs);
1331 1164
1332 BUG_ON(ffs->gadget); 1165 BUG_ON(ffs->gadget);
1333 1166
@@ -1463,71 +1296,6 @@ static void ffs_epfiles_destroy(struct ffs_epfile *epfiles, unsigned count)
1463 kfree(epfiles); 1296 kfree(epfiles);
1464} 1297}
1465 1298
1466static int functionfs_bind_config(struct usb_composite_dev *cdev,
1467 struct usb_configuration *c,
1468 struct ffs_data *ffs)
1469{
1470 struct ffs_function *func;
1471 int ret;
1472
1473 ENTER();
1474
1475 func = kzalloc(sizeof *func, GFP_KERNEL);
1476 if (unlikely(!func))
1477 return -ENOMEM;
1478
1479 func->function.name = "Function FS Gadget";
1480 func->function.strings = ffs->stringtabs;
1481
1482 func->function.bind = ffs_func_bind;
1483 func->function.unbind = ffs_func_unbind;
1484 func->function.set_alt = ffs_func_set_alt;
1485 func->function.disable = ffs_func_disable;
1486 func->function.setup = ffs_func_setup;
1487 func->function.suspend = ffs_func_suspend;
1488 func->function.resume = ffs_func_resume;
1489
1490 func->conf = c;
1491 func->gadget = cdev->gadget;
1492 func->ffs = ffs;
1493 ffs_data_get(ffs);
1494
1495 ret = usb_add_function(c, &func->function);
1496 if (unlikely(ret))
1497 ffs_func_free(func);
1498
1499 return ret;
1500}
1501
1502static void ffs_func_free(struct ffs_function *func)
1503{
1504 struct ffs_ep *ep = func->eps;
1505 unsigned count = func->ffs->eps_count;
1506 unsigned long flags;
1507
1508 ENTER();
1509
1510 /* cleanup after autoconfig */
1511 spin_lock_irqsave(&func->ffs->eps_lock, flags);
1512 do {
1513 if (ep->ep && ep->req)
1514 usb_ep_free_request(ep->ep, ep->req);
1515 ep->req = NULL;
1516 ++ep;
1517 } while (--count);
1518 spin_unlock_irqrestore(&func->ffs->eps_lock, flags);
1519
1520 ffs_data_put(func->ffs);
1521
1522 kfree(func->eps);
1523 /*
1524 * eps and interfaces_nums are allocated in the same chunk so
1525 * only one free is required. Descriptors are also allocated
1526 * in the same chunk.
1527 */
1528
1529 kfree(func);
1530}
1531 1299
1532static void ffs_func_eps_disable(struct ffs_function *func) 1300static void ffs_func_eps_disable(struct ffs_function *func)
1533{ 1301{
@@ -1901,30 +1669,34 @@ static int __ffs_data_got_strings(struct ffs_data *ffs,
1901 1669
1902 /* Allocate everything in one chunk so there's less maintenance. */ 1670 /* Allocate everything in one chunk so there's less maintenance. */
1903 { 1671 {
1904 struct {
1905 struct usb_gadget_strings *stringtabs[lang_count + 1];
1906 struct usb_gadget_strings stringtab[lang_count];
1907 struct usb_string strings[lang_count*(needed_count+1)];
1908 } *d;
1909 unsigned i = 0; 1672 unsigned i = 0;
1673 vla_group(d);
1674 vla_item(d, struct usb_gadget_strings *, stringtabs,
1675 lang_count + 1);
1676 vla_item(d, struct usb_gadget_strings, stringtab, lang_count);
1677 vla_item(d, struct usb_string, strings,
1678 lang_count*(needed_count+1));
1679
1680 char *vlabuf = kmalloc(vla_group_size(d), GFP_KERNEL);
1910 1681
1911 d = kmalloc(sizeof *d, GFP_KERNEL); 1682 if (unlikely(!vlabuf)) {
1912 if (unlikely(!d)) {
1913 kfree(_data); 1683 kfree(_data);
1914 return -ENOMEM; 1684 return -ENOMEM;
1915 } 1685 }
1916 1686
1917 stringtabs = d->stringtabs; 1687 /* Initialize the VLA pointers */
1918 t = d->stringtab; 1688 stringtabs = vla_ptr(vlabuf, d, stringtabs);
1689 t = vla_ptr(vlabuf, d, stringtab);
1919 i = lang_count; 1690 i = lang_count;
1920 do { 1691 do {
1921 *stringtabs++ = t++; 1692 *stringtabs++ = t++;
1922 } while (--i); 1693 } while (--i);
1923 *stringtabs = NULL; 1694 *stringtabs = NULL;
1924 1695
1925 stringtabs = d->stringtabs; 1696 /* stringtabs = vlabuf = d_stringtabs for later kfree */
1926 t = d->stringtab; 1697 stringtabs = vla_ptr(vlabuf, d, stringtabs);
1927 s = d->strings; 1698 t = vla_ptr(vlabuf, d, stringtab);
1699 s = vla_ptr(vlabuf, d, strings);
1928 strings = s; 1700 strings = s;
1929 } 1701 }
1930 1702
@@ -2187,8 +1959,57 @@ static int __ffs_func_bind_do_nums(enum ffs_entity_type type, u8 *valuep,
2187 return 0; 1959 return 0;
2188} 1960}
2189 1961
2190static int ffs_func_bind(struct usb_configuration *c, 1962static inline struct f_fs_opts *ffs_do_functionfs_bind(struct usb_function *f,
2191 struct usb_function *f) 1963 struct usb_configuration *c)
1964{
1965 struct ffs_function *func = ffs_func_from_usb(f);
1966 struct f_fs_opts *ffs_opts =
1967 container_of(f->fi, struct f_fs_opts, func_inst);
1968 int ret;
1969
1970 ENTER();
1971
1972 /*
1973 * Legacy gadget triggers binding in functionfs_ready_callback,
1974 * which already uses locking; taking the same lock here would
1975 * cause a deadlock.
1976 *
1977 * Configfs-enabled gadgets however do need ffs_dev_lock.
1978 */
1979 if (!ffs_opts->no_configfs)
1980 ffs_dev_lock();
1981 ret = ffs_opts->dev->desc_ready ? 0 : -ENODEV;
1982 func->ffs = ffs_opts->dev->ffs_data;
1983 if (!ffs_opts->no_configfs)
1984 ffs_dev_unlock();
1985 if (ret)
1986 return ERR_PTR(ret);
1987
1988 func->conf = c;
1989 func->gadget = c->cdev->gadget;
1990
1991 ffs_data_get(func->ffs);
1992
1993 /*
1994 * in drivers/usb/gadget/configfs.c:configfs_composite_bind()
1995 * configurations are bound in sequence with list_for_each_entry,
1996 * in each configuration its functions are bound in sequence
1997 * with list_for_each_entry, so we assume no race condition
1998 * with regard to ffs_opts->bound access
1999 */
2000 if (!ffs_opts->refcnt) {
2001 ret = functionfs_bind(func->ffs, c->cdev);
2002 if (ret)
2003 return ERR_PTR(ret);
2004 }
2005 ffs_opts->refcnt++;
2006 func->function.strings = func->ffs->stringtabs;
2007
2008 return ffs_opts;
2009}
2010
2011static int _ffs_func_bind(struct usb_configuration *c,
2012 struct usb_function *f)
2192{ 2013{
2193 struct ffs_function *func = ffs_func_from_usb(f); 2014 struct ffs_function *func = ffs_func_from_usb(f);
2194 struct ffs_data *ffs = func->ffs; 2015 struct ffs_data *ffs = func->ffs;
@@ -2200,16 +2021,16 @@ static int ffs_func_bind(struct usb_configuration *c,
2200 int ret; 2021 int ret;
2201 2022
2202 /* Make it a single chunk, less management later on */ 2023 /* Make it a single chunk, less management later on */
2203 struct { 2024 vla_group(d);
2204 struct ffs_ep eps[ffs->eps_count]; 2025 vla_item_with_sz(d, struct ffs_ep, eps, ffs->eps_count);
2205 struct usb_descriptor_header 2026 vla_item_with_sz(d, struct usb_descriptor_header *, fs_descs,
2206 *fs_descs[full ? ffs->fs_descs_count + 1 : 0]; 2027 full ? ffs->fs_descs_count + 1 : 0);
2207 struct usb_descriptor_header 2028 vla_item_with_sz(d, struct usb_descriptor_header *, hs_descs,
2208 *hs_descs[high ? ffs->hs_descs_count + 1 : 0]; 2029 high ? ffs->hs_descs_count + 1 : 0);
2209 short inums[ffs->interfaces_count]; 2030 vla_item_with_sz(d, short, inums, ffs->interfaces_count);
2210 char raw_descs[high ? ffs->raw_descs_length 2031 vla_item_with_sz(d, char, raw_descs,
2211 : ffs->raw_fs_descs_length]; 2032 high ? ffs->raw_descs_length : ffs->raw_fs_descs_length);
2212 } *data; 2033 char *vlabuf;
2213 2034
2214 ENTER(); 2035 ENTER();
2215 2036
@@ -2217,21 +2038,28 @@ static int ffs_func_bind(struct usb_configuration *c,
2217 if (unlikely(!(full | high))) 2038 if (unlikely(!(full | high)))
2218 return -ENOTSUPP; 2039 return -ENOTSUPP;
2219 2040
2220 /* Allocate */ 2041 /* Allocate a single chunk, less management later on */
2221 data = kmalloc(sizeof *data, GFP_KERNEL); 2042 vlabuf = kmalloc(vla_group_size(d), GFP_KERNEL);
2222 if (unlikely(!data)) 2043 if (unlikely(!vlabuf))
2223 return -ENOMEM; 2044 return -ENOMEM;
2224 2045
2225 /* Zero */ 2046 /* Zero */
2226 memset(data->eps, 0, sizeof data->eps); 2047 memset(vla_ptr(vlabuf, d, eps), 0, d_eps__sz);
2227 memcpy(data->raw_descs, ffs->raw_descs + 16, sizeof data->raw_descs); 2048 memcpy(vla_ptr(vlabuf, d, raw_descs), ffs->raw_descs + 16,
2228 memset(data->inums, 0xff, sizeof data->inums); 2049 d_raw_descs__sz);
2229 for (ret = ffs->eps_count; ret; --ret) 2050 memset(vla_ptr(vlabuf, d, inums), 0xff, d_inums__sz);
2230 data->eps[ret].num = -1; 2051 for (ret = ffs->eps_count; ret; --ret) {
2052 struct ffs_ep *ptr;
2053
2054 ptr = vla_ptr(vlabuf, d, eps);
2055 ptr[ret].num = -1;
2056 }
2231 2057
2232 /* Save pointers */ 2058 /* Save pointers
2233 func->eps = data->eps; 2059 * d_eps == vlabuf, func->eps used to kfree vlabuf later
2234 func->interfaces_nums = data->inums; 2060 */
2061 func->eps = vla_ptr(vlabuf, d, eps);
2062 func->interfaces_nums = vla_ptr(vlabuf, d, inums);
2235 2063
2236 /* 2064 /*
2237 * Go through all the endpoint descriptors and allocate 2065 * Go through all the endpoint descriptors and allocate
@@ -2239,10 +2067,10 @@ static int ffs_func_bind(struct usb_configuration *c,
2239 * numbers without worrying that it may be described later on. 2067 * numbers without worrying that it may be described later on.
2240 */ 2068 */
2241 if (likely(full)) { 2069 if (likely(full)) {
2242 func->function.fs_descriptors = data->fs_descs; 2070 func->function.fs_descriptors = vla_ptr(vlabuf, d, fs_descs);
2243 ret = ffs_do_descs(ffs->fs_descs_count, 2071 ret = ffs_do_descs(ffs->fs_descs_count,
2244 data->raw_descs, 2072 vla_ptr(vlabuf, d, raw_descs),
2245 sizeof data->raw_descs, 2073 d_raw_descs__sz,
2246 __ffs_func_bind_do_descs, func); 2074 __ffs_func_bind_do_descs, func);
2247 if (unlikely(ret < 0)) 2075 if (unlikely(ret < 0))
2248 goto error; 2076 goto error;
@@ -2251,10 +2079,10 @@ static int ffs_func_bind(struct usb_configuration *c,
2251 } 2079 }
2252 2080
2253 if (likely(high)) { 2081 if (likely(high)) {
2254 func->function.hs_descriptors = data->hs_descs; 2082 func->function.hs_descriptors = vla_ptr(vlabuf, d, hs_descs);
2255 ret = ffs_do_descs(ffs->hs_descs_count, 2083 ret = ffs_do_descs(ffs->hs_descs_count,
2256 data->raw_descs + ret, 2084 vla_ptr(vlabuf, d, raw_descs) + ret,
2257 (sizeof data->raw_descs) - ret, 2085 d_raw_descs__sz - ret,
2258 __ffs_func_bind_do_descs, func); 2086 __ffs_func_bind_do_descs, func);
2259 if (unlikely(ret < 0)) 2087 if (unlikely(ret < 0))
2260 goto error; 2088 goto error;
@@ -2267,7 +2095,7 @@ static int ffs_func_bind(struct usb_configuration *c,
2267 */ 2095 */
2268 ret = ffs_do_descs(ffs->fs_descs_count + 2096 ret = ffs_do_descs(ffs->fs_descs_count +
2269 (high ? ffs->hs_descs_count : 0), 2097 (high ? ffs->hs_descs_count : 0),
2270 data->raw_descs, sizeof data->raw_descs, 2098 vla_ptr(vlabuf, d, raw_descs), d_raw_descs__sz,
2271 __ffs_func_bind_do_nums, func); 2099 __ffs_func_bind_do_nums, func);
2272 if (unlikely(ret < 0)) 2100 if (unlikely(ret < 0))
2273 goto error; 2101 goto error;
@@ -2281,26 +2109,19 @@ error:
2281 return ret; 2109 return ret;
2282} 2110}
2283 2111
2284 2112static int ffs_func_bind(struct usb_configuration *c,
2285/* Other USB function hooks *************************************************/ 2113 struct usb_function *f)
2286
2287static void ffs_func_unbind(struct usb_configuration *c,
2288 struct usb_function *f)
2289{ 2114{
2290 struct ffs_function *func = ffs_func_from_usb(f); 2115 struct f_fs_opts *ffs_opts = ffs_do_functionfs_bind(f, c);
2291 struct ffs_data *ffs = func->ffs;
2292 2116
2293 ENTER(); 2117 if (IS_ERR(ffs_opts))
2118 return PTR_ERR(ffs_opts);
2294 2119
2295 if (ffs->func == func) { 2120 return _ffs_func_bind(c, f);
2296 ffs_func_eps_disable(func); 2121}
2297 ffs->func = NULL;
2298 }
2299 2122
2300 ffs_event_add(ffs, FUNCTIONFS_UNBIND);
2301 2123
2302 ffs_func_free(func); 2124/* Other USB function hooks *************************************************/
2303}
2304 2125
2305static int ffs_func_set_alt(struct usb_function *f, 2126static int ffs_func_set_alt(struct usb_function *f,
2306 unsigned interface, unsigned alt) 2127 unsigned interface, unsigned alt)
@@ -2428,6 +2249,411 @@ static int ffs_func_revmap_intf(struct ffs_function *func, u8 intf)
2428} 2249}
2429 2250
2430 2251
2252/* Devices management *******************************************************/
2253
2254static LIST_HEAD(ffs_devices);
2255
2256static struct ffs_dev *_ffs_find_dev(const char *name)
2257{
2258 struct ffs_dev *dev;
2259
2260 list_for_each_entry(dev, &ffs_devices, entry) {
2261 if (!dev->name || !name)
2262 continue;
2263 if (strcmp(dev->name, name) == 0)
2264 return dev;
2265 }
2266
2267 return NULL;
2268}
2269
2270/*
2271 * ffs_lock must be taken by the caller of this function
2272 */
2273static struct ffs_dev *ffs_get_single_dev(void)
2274{
2275 struct ffs_dev *dev;
2276
2277 if (list_is_singular(&ffs_devices)) {
2278 dev = list_first_entry(&ffs_devices, struct ffs_dev, entry);
2279 if (dev->single)
2280 return dev;
2281 }
2282
2283 return NULL;
2284}
2285
2286/*
2287 * ffs_lock must be taken by the caller of this function
2288 */
2289static struct ffs_dev *ffs_find_dev(const char *name)
2290{
2291 struct ffs_dev *dev;
2292
2293 dev = ffs_get_single_dev();
2294 if (dev)
2295 return dev;
2296
2297 return _ffs_find_dev(name);
2298}
2299
2300/* Configfs support *********************************************************/
2301
2302static inline struct f_fs_opts *to_ffs_opts(struct config_item *item)
2303{
2304 return container_of(to_config_group(item), struct f_fs_opts,
2305 func_inst.group);
2306}
2307
2308static void ffs_attr_release(struct config_item *item)
2309{
2310 struct f_fs_opts *opts = to_ffs_opts(item);
2311
2312 usb_put_function_instance(&opts->func_inst);
2313}
2314
2315static struct configfs_item_operations ffs_item_ops = {
2316 .release = ffs_attr_release,
2317};
2318
2319static struct config_item_type ffs_func_type = {
2320 .ct_item_ops = &ffs_item_ops,
2321 .ct_owner = THIS_MODULE,
2322};
2323
2324
2325/* Function registration interface ******************************************/
2326
2327static void ffs_free_inst(struct usb_function_instance *f)
2328{
2329 struct f_fs_opts *opts;
2330
2331 opts = to_f_fs_opts(f);
2332 ffs_dev_lock();
2333 ffs_free_dev(opts->dev);
2334 ffs_dev_unlock();
2335 kfree(opts);
2336}
2337
2338#define MAX_INST_NAME_LEN 40
2339
2340static int ffs_set_inst_name(struct usb_function_instance *fi, const char *name)
2341{
2342 struct f_fs_opts *opts;
2343 char *ptr;
2344 const char *tmp;
2345 int name_len, ret;
2346
2347 name_len = strlen(name) + 1;
2348 if (name_len > MAX_INST_NAME_LEN)
2349 return -ENAMETOOLONG;
2350
2351 ptr = kstrndup(name, name_len, GFP_KERNEL);
2352 if (!ptr)
2353 return -ENOMEM;
2354
2355 opts = to_f_fs_opts(fi);
2356 tmp = NULL;
2357
2358 ffs_dev_lock();
2359
2360 tmp = opts->dev->name_allocated ? opts->dev->name : NULL;
2361 ret = _ffs_name_dev(opts->dev, ptr);
2362 if (ret) {
2363 kfree(ptr);
2364 ffs_dev_unlock();
2365 return ret;
2366 }
2367 opts->dev->name_allocated = true;
2368
2369 ffs_dev_unlock();
2370
2371 kfree(tmp);
2372
2373 return 0;
2374}
2375
2376static struct usb_function_instance *ffs_alloc_inst(void)
2377{
2378 struct f_fs_opts *opts;
2379 struct ffs_dev *dev;
2380
2381 opts = kzalloc(sizeof(*opts), GFP_KERNEL);
2382 if (!opts)
2383 return ERR_PTR(-ENOMEM);
2384
2385 opts->func_inst.set_inst_name = ffs_set_inst_name;
2386 opts->func_inst.free_func_inst = ffs_free_inst;
2387 ffs_dev_lock();
2388 dev = ffs_alloc_dev();
2389 ffs_dev_unlock();
2390 if (IS_ERR(dev)) {
2391 kfree(opts);
2392 return ERR_CAST(dev);
2393 }
2394 opts->dev = dev;
2395 dev->opts = opts;
2396
2397 config_group_init_type_name(&opts->func_inst.group, "",
2398 &ffs_func_type);
2399 return &opts->func_inst;
2400}
2401
2402static void ffs_free(struct usb_function *f)
2403{
2404 kfree(ffs_func_from_usb(f));
2405}
2406
2407static void ffs_func_unbind(struct usb_configuration *c,
2408 struct usb_function *f)
2409{
2410 struct ffs_function *func = ffs_func_from_usb(f);
2411 struct ffs_data *ffs = func->ffs;
2412 struct f_fs_opts *opts =
2413 container_of(f->fi, struct f_fs_opts, func_inst);
2414 struct ffs_ep *ep = func->eps;
2415 unsigned count = ffs->eps_count;
2416 unsigned long flags;
2417
2418 ENTER();
2419 if (ffs->func == func) {
2420 ffs_func_eps_disable(func);
2421 ffs->func = NULL;
2422 }
2423
2424 if (!--opts->refcnt)
2425 functionfs_unbind(ffs);
2426
2427 /* cleanup after autoconfig */
2428 spin_lock_irqsave(&func->ffs->eps_lock, flags);
2429 do {
2430 if (ep->ep && ep->req)
2431 usb_ep_free_request(ep->ep, ep->req);
2432 ep->req = NULL;
2433 ++ep;
2434 } while (--count);
2435 spin_unlock_irqrestore(&func->ffs->eps_lock, flags);
2436 kfree(func->eps);
2437 func->eps = NULL;
2438 /*
2439 * eps, descriptors and interfaces_nums are allocated in the
2440 * same chunk so only one free is required.
2441 */
2442 func->function.fs_descriptors = NULL;
2443 func->function.hs_descriptors = NULL;
2444 func->interfaces_nums = NULL;
2445
2446 ffs_event_add(ffs, FUNCTIONFS_UNBIND);
2447}
2448
2449static struct usb_function *ffs_alloc(struct usb_function_instance *fi)
2450{
2451 struct ffs_function *func;
2452
2453 ENTER();
2454
2455 func = kzalloc(sizeof(*func), GFP_KERNEL);
2456 if (unlikely(!func))
2457 return ERR_PTR(-ENOMEM);
2458
2459 func->function.name = "Function FS Gadget";
2460
2461 func->function.bind = ffs_func_bind;
2462 func->function.unbind = ffs_func_unbind;
2463 func->function.set_alt = ffs_func_set_alt;
2464 func->function.disable = ffs_func_disable;
2465 func->function.setup = ffs_func_setup;
2466 func->function.suspend = ffs_func_suspend;
2467 func->function.resume = ffs_func_resume;
2468 func->function.free_func = ffs_free;
2469
2470 return &func->function;
2471}
2472
2473/*
2474 * ffs_lock must be taken by the caller of this function
2475 */
2476struct ffs_dev *ffs_alloc_dev(void)
2477{
2478 struct ffs_dev *dev;
2479 int ret;
2480
2481 if (ffs_get_single_dev())
2482 return ERR_PTR(-EBUSY);
2483
2484 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
2485 if (!dev)
2486 return ERR_PTR(-ENOMEM);
2487
2488 if (list_empty(&ffs_devices)) {
2489 ret = functionfs_init();
2490 if (ret) {
2491 kfree(dev);
2492 return ERR_PTR(ret);
2493 }
2494 }
2495
2496 list_add(&dev->entry, &ffs_devices);
2497
2498 return dev;
2499}
2500
2501/*
2502 * ffs_lock must be taken by the caller of this function
2503 * The caller is responsible for "name" being available whenever f_fs needs it
2504 */
2505static int _ffs_name_dev(struct ffs_dev *dev, const char *name)
2506{
2507 struct ffs_dev *existing;
2508
2509 existing = _ffs_find_dev(name);
2510 if (existing)
2511 return -EBUSY;
2512
2513 dev->name = name;
2514
2515 return 0;
2516}
2517
2518/*
2519 * The caller is responsible for "name" being available whenever f_fs needs it
2520 */
2521int ffs_name_dev(struct ffs_dev *dev, const char *name)
2522{
2523 int ret;
2524
2525 ffs_dev_lock();
2526 ret = _ffs_name_dev(dev, name);
2527 ffs_dev_unlock();
2528
2529 return ret;
2530}
2531EXPORT_SYMBOL(ffs_name_dev);
2532
2533int ffs_single_dev(struct ffs_dev *dev)
2534{
2535 int ret;
2536
2537 ret = 0;
2538 ffs_dev_lock();
2539
2540 if (!list_is_singular(&ffs_devices))
2541 ret = -EBUSY;
2542 else
2543 dev->single = true;
2544
2545 ffs_dev_unlock();
2546 return ret;
2547}
2548EXPORT_SYMBOL(ffs_single_dev);
2549
2550/*
2551 * ffs_lock must be taken by the caller of this function
2552 */
2553void ffs_free_dev(struct ffs_dev *dev)
2554{
2555 list_del(&dev->entry);
2556 if (dev->name_allocated)
2557 kfree(dev->name);
2558 kfree(dev);
2559 if (list_empty(&ffs_devices))
2560 functionfs_cleanup();
2561}
2562
2563static void *ffs_acquire_dev(const char *dev_name)
2564{
2565 struct ffs_dev *ffs_dev;
2566
2567 ENTER();
2568 ffs_dev_lock();
2569
2570 ffs_dev = ffs_find_dev(dev_name);
2571 if (!ffs_dev)
2572 ffs_dev = ERR_PTR(-ENODEV);
2573 else if (ffs_dev->mounted)
2574 ffs_dev = ERR_PTR(-EBUSY);
2575 else if (ffs_dev->ffs_acquire_dev_callback &&
2576 ffs_dev->ffs_acquire_dev_callback(ffs_dev))
2577 ffs_dev = ERR_PTR(-ENODEV);
2578 else
2579 ffs_dev->mounted = true;
2580
2581 ffs_dev_unlock();
2582 return ffs_dev;
2583}
2584
2585static void ffs_release_dev(struct ffs_data *ffs_data)
2586{
2587 struct ffs_dev *ffs_dev;
2588
2589 ENTER();
2590 ffs_dev_lock();
2591
2592 ffs_dev = ffs_data->private_data;
2593 if (ffs_dev)
2594 ffs_dev->mounted = false;
2595
2596 if (ffs_dev->ffs_release_dev_callback)
2597 ffs_dev->ffs_release_dev_callback(ffs_dev);
2598
2599 ffs_dev_unlock();
2600}
2601
2602static int ffs_ready(struct ffs_data *ffs)
2603{
2604 struct ffs_dev *ffs_obj;
2605 int ret = 0;
2606
2607 ENTER();
2608 ffs_dev_lock();
2609
2610 ffs_obj = ffs->private_data;
2611 if (!ffs_obj) {
2612 ret = -EINVAL;
2613 goto done;
2614 }
2615 if (WARN_ON(ffs_obj->desc_ready)) {
2616 ret = -EBUSY;
2617 goto done;
2618 }
2619
2620 ffs_obj->desc_ready = true;
2621 ffs_obj->ffs_data = ffs;
2622
2623 if (ffs_obj->ffs_ready_callback)
2624 ret = ffs_obj->ffs_ready_callback(ffs);
2625
2626done:
2627 ffs_dev_unlock();
2628 return ret;
2629}
2630
2631static void ffs_closed(struct ffs_data *ffs)
2632{
2633 struct ffs_dev *ffs_obj;
2634
2635 ENTER();
2636 ffs_dev_lock();
2637
2638 ffs_obj = ffs->private_data;
2639 if (!ffs_obj)
2640 goto done;
2641
2642 ffs_obj->desc_ready = false;
2643
2644 if (ffs_obj->ffs_closed_callback)
2645 ffs_obj->ffs_closed_callback(ffs);
2646
2647 if (!ffs_obj->opts || ffs_obj->opts->no_configfs
2648 || !ffs_obj->opts->func_inst.group.cg_item.ci_parent)
2649 goto done;
2650
2651 unregister_gadget_item(ffs_obj->opts->
2652 func_inst.group.cg_item.ci_parent->ci_parent);
2653done:
2654 ffs_dev_unlock();
2655}
2656
2431/* Misc helper functions ****************************************************/ 2657/* Misc helper functions ****************************************************/
2432 2658
2433static int ffs_mutex_lock(struct mutex *mutex, unsigned nonblock) 2659static int ffs_mutex_lock(struct mutex *mutex, unsigned nonblock)
@@ -2458,3 +2684,7 @@ static char *ffs_prepare_buffer(const char __user *buf, size_t len)
2458 2684
2459 return data; 2685 return data;
2460} 2686}
2687
2688DECLARE_USB_FUNCTION_INIT(ffs, ffs_alloc_inst, ffs_alloc);
2689MODULE_LICENSE("GPL");
2690MODULE_AUTHOR("Michal Nazarewicz");
diff --git a/drivers/usb/gadget/f_hid.c b/drivers/usb/gadget/f_hid.c
index 6e69a8e8d22a..a95290a1289f 100644
--- a/drivers/usb/gadget/f_hid.c
+++ b/drivers/usb/gadget/f_hid.c
@@ -20,6 +20,8 @@
20#include <linux/sched.h> 20#include <linux/sched.h>
21#include <linux/usb/g_hid.h> 21#include <linux/usb/g_hid.h>
22 22
23#include "u_f.h"
24
23static int major, minors; 25static int major, minors;
24static struct class *hidg_class; 26static struct class *hidg_class;
25 27
@@ -334,20 +336,10 @@ static int f_hidg_open(struct inode *inode, struct file *fd)
334/*-------------------------------------------------------------------------*/ 336/*-------------------------------------------------------------------------*/
335/* usb_function */ 337/* usb_function */
336 338
337static struct usb_request *hidg_alloc_ep_req(struct usb_ep *ep, unsigned length) 339static inline struct usb_request *hidg_alloc_ep_req(struct usb_ep *ep,
340 unsigned length)
338{ 341{
339 struct usb_request *req; 342 return alloc_ep_req(ep, length, length);
340
341 req = usb_ep_alloc_request(ep, GFP_ATOMIC);
342 if (req) {
343 req->length = length;
344 req->buf = kmalloc(length, GFP_ATOMIC);
345 if (!req->buf) {
346 usb_ep_free_request(ep, req);
347 req = NULL;
348 }
349 }
350 return req;
351} 343}
352 344
353static void hidg_set_report_complete(struct usb_ep *ep, struct usb_request *req) 345static void hidg_set_report_complete(struct usb_ep *ep, struct usb_request *req)
diff --git a/drivers/usb/gadget/f_loopback.c b/drivers/usb/gadget/f_loopback.c
index 4a3873a0f2d0..4557cd03f0b1 100644
--- a/drivers/usb/gadget/f_loopback.c
+++ b/drivers/usb/gadget/f_loopback.c
@@ -20,6 +20,7 @@
20#include <linux/usb/composite.h> 20#include <linux/usb/composite.h>
21 21
22#include "g_zero.h" 22#include "g_zero.h"
23#include "u_f.h"
23 24
24/* 25/*
25 * LOOPBACK FUNCTION ... a testing vehicle for USB peripherals, 26 * LOOPBACK FUNCTION ... a testing vehicle for USB peripherals,
@@ -119,7 +120,7 @@ static struct usb_endpoint_descriptor ss_loop_source_desc = {
119 .wMaxPacketSize = cpu_to_le16(1024), 120 .wMaxPacketSize = cpu_to_le16(1024),
120}; 121};
121 122
122struct usb_ss_ep_comp_descriptor ss_loop_source_comp_desc = { 123static struct usb_ss_ep_comp_descriptor ss_loop_source_comp_desc = {
123 .bLength = USB_DT_SS_EP_COMP_SIZE, 124 .bLength = USB_DT_SS_EP_COMP_SIZE,
124 .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, 125 .bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
125 .bMaxBurst = 0, 126 .bMaxBurst = 0,
@@ -135,7 +136,7 @@ static struct usb_endpoint_descriptor ss_loop_sink_desc = {
135 .wMaxPacketSize = cpu_to_le16(1024), 136 .wMaxPacketSize = cpu_to_le16(1024),
136}; 137};
137 138
138struct usb_ss_ep_comp_descriptor ss_loop_sink_comp_desc = { 139static struct usb_ss_ep_comp_descriptor ss_loop_sink_comp_desc = {
139 .bLength = USB_DT_SS_EP_COMP_SIZE, 140 .bLength = USB_DT_SS_EP_COMP_SIZE,
140 .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, 141 .bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
141 .bMaxBurst = 0, 142 .bMaxBurst = 0,
@@ -230,6 +231,14 @@ autoconf_fail:
230 231
231static void lb_free_func(struct usb_function *f) 232static void lb_free_func(struct usb_function *f)
232{ 233{
234 struct f_lb_opts *opts;
235
236 opts = container_of(f->fi, struct f_lb_opts, func_inst);
237
238 mutex_lock(&opts->lock);
239 opts->refcnt--;
240 mutex_unlock(&opts->lock);
241
233 usb_free_all_descriptors(f); 242 usb_free_all_descriptors(f);
234 kfree(func_to_loop(f)); 243 kfree(func_to_loop(f));
235} 244}
@@ -293,6 +302,11 @@ static void disable_loopback(struct f_loopback *loop)
293 VDBG(cdev, "%s disabled\n", loop->function.name); 302 VDBG(cdev, "%s disabled\n", loop->function.name);
294} 303}
295 304
305static inline struct usb_request *lb_alloc_ep_req(struct usb_ep *ep, int len)
306{
307 return alloc_ep_req(ep, len, buflen);
308}
309
296static int 310static int
297enable_loopback(struct usb_composite_dev *cdev, struct f_loopback *loop) 311enable_loopback(struct usb_composite_dev *cdev, struct f_loopback *loop)
298{ 312{
@@ -332,7 +346,7 @@ fail0:
332 * than 'buflen' bytes each. 346 * than 'buflen' bytes each.
333 */ 347 */
334 for (i = 0; i < qlen && result == 0; i++) { 348 for (i = 0; i < qlen && result == 0; i++) {
335 req = alloc_ep_req(ep, 0); 349 req = lb_alloc_ep_req(ep, 0);
336 if (req) { 350 if (req) {
337 req->complete = loopback_complete; 351 req->complete = loopback_complete;
338 result = usb_ep_queue(ep, req, GFP_ATOMIC); 352 result = usb_ep_queue(ep, req, GFP_ATOMIC);
@@ -380,6 +394,11 @@ static struct usb_function *loopback_alloc(struct usb_function_instance *fi)
380 return ERR_PTR(-ENOMEM); 394 return ERR_PTR(-ENOMEM);
381 395
382 lb_opts = container_of(fi, struct f_lb_opts, func_inst); 396 lb_opts = container_of(fi, struct f_lb_opts, func_inst);
397
398 mutex_lock(&lb_opts->lock);
399 lb_opts->refcnt++;
400 mutex_unlock(&lb_opts->lock);
401
383 buflen = lb_opts->bulk_buflen; 402 buflen = lb_opts->bulk_buflen;
384 qlen = lb_opts->qlen; 403 qlen = lb_opts->qlen;
385 if (!qlen) 404 if (!qlen)
@@ -396,6 +415,118 @@ static struct usb_function *loopback_alloc(struct usb_function_instance *fi)
396 return &loop->function; 415 return &loop->function;
397} 416}
398 417
418static inline struct f_lb_opts *to_f_lb_opts(struct config_item *item)
419{
420 return container_of(to_config_group(item), struct f_lb_opts,
421 func_inst.group);
422}
423
424CONFIGFS_ATTR_STRUCT(f_lb_opts);
425CONFIGFS_ATTR_OPS(f_lb_opts);
426
427static void lb_attr_release(struct config_item *item)
428{
429 struct f_lb_opts *lb_opts = to_f_lb_opts(item);
430
431 usb_put_function_instance(&lb_opts->func_inst);
432}
433
434static struct configfs_item_operations lb_item_ops = {
435 .release = lb_attr_release,
436 .show_attribute = f_lb_opts_attr_show,
437 .store_attribute = f_lb_opts_attr_store,
438};
439
440static ssize_t f_lb_opts_qlen_show(struct f_lb_opts *opts, char *page)
441{
442 int result;
443
444 mutex_lock(&opts->lock);
445 result = sprintf(page, "%d", opts->qlen);
446 mutex_unlock(&opts->lock);
447
448 return result;
449}
450
451static ssize_t f_lb_opts_qlen_store(struct f_lb_opts *opts,
452 const char *page, size_t len)
453{
454 int ret;
455 u32 num;
456
457 mutex_lock(&opts->lock);
458 if (opts->refcnt) {
459 ret = -EBUSY;
460 goto end;
461 }
462
463 ret = kstrtou32(page, 0, &num);
464 if (ret)
465 goto end;
466
467 opts->qlen = num;
468 ret = len;
469end:
470 mutex_unlock(&opts->lock);
471 return ret;
472}
473
474static struct f_lb_opts_attribute f_lb_opts_qlen =
475 __CONFIGFS_ATTR(qlen, S_IRUGO | S_IWUSR,
476 f_lb_opts_qlen_show,
477 f_lb_opts_qlen_store);
478
479static ssize_t f_lb_opts_bulk_buflen_show(struct f_lb_opts *opts, char *page)
480{
481 int result;
482
483 mutex_lock(&opts->lock);
484 result = sprintf(page, "%d", opts->bulk_buflen);
485 mutex_unlock(&opts->lock);
486
487 return result;
488}
489
490static ssize_t f_lb_opts_bulk_buflen_store(struct f_lb_opts *opts,
491 const char *page, size_t len)
492{
493 int ret;
494 u32 num;
495
496 mutex_lock(&opts->lock);
497 if (opts->refcnt) {
498 ret = -EBUSY;
499 goto end;
500 }
501
502 ret = kstrtou32(page, 0, &num);
503 if (ret)
504 goto end;
505
506 opts->bulk_buflen = num;
507 ret = len;
508end:
509 mutex_unlock(&opts->lock);
510 return ret;
511}
512
513static struct f_lb_opts_attribute f_lb_opts_bulk_buflen =
514 __CONFIGFS_ATTR(buflen, S_IRUGO | S_IWUSR,
515 f_lb_opts_bulk_buflen_show,
516 f_lb_opts_bulk_buflen_store);
517
518static struct configfs_attribute *lb_attrs[] = {
519 &f_lb_opts_qlen.attr,
520 &f_lb_opts_bulk_buflen.attr,
521 NULL,
522};
523
524static struct config_item_type lb_func_type = {
525 .ct_item_ops = &lb_item_ops,
526 .ct_attrs = lb_attrs,
527 .ct_owner = THIS_MODULE,
528};
529
399static void lb_free_instance(struct usb_function_instance *fi) 530static void lb_free_instance(struct usb_function_instance *fi)
400{ 531{
401 struct f_lb_opts *lb_opts; 532 struct f_lb_opts *lb_opts;
@@ -411,7 +542,14 @@ static struct usb_function_instance *loopback_alloc_instance(void)
411 lb_opts = kzalloc(sizeof(*lb_opts), GFP_KERNEL); 542 lb_opts = kzalloc(sizeof(*lb_opts), GFP_KERNEL);
412 if (!lb_opts) 543 if (!lb_opts)
413 return ERR_PTR(-ENOMEM); 544 return ERR_PTR(-ENOMEM);
545 mutex_init(&lb_opts->lock);
414 lb_opts->func_inst.free_func_inst = lb_free_instance; 546 lb_opts->func_inst.free_func_inst = lb_free_instance;
547 lb_opts->bulk_buflen = GZERO_BULK_BUFLEN;
548 lb_opts->qlen = GZERO_QLEN;
549
550 config_group_init_type_name(&lb_opts->func_inst.group, "",
551 &lb_func_type);
552
415 return &lb_opts->func_inst; 553 return &lb_opts->func_inst;
416} 554}
417DECLARE_USB_FUNCTION(Loopback, loopback_alloc_instance, loopback_alloc); 555DECLARE_USB_FUNCTION(Loopback, loopback_alloc_instance, loopback_alloc);
diff --git a/drivers/usb/gadget/f_midi.c b/drivers/usb/gadget/f_midi.c
index 263e721c2694..36d4bb23087f 100644
--- a/drivers/usb/gadget/f_midi.c
+++ b/drivers/usb/gadget/f_midi.c
@@ -32,6 +32,8 @@
32#include <linux/usb/audio.h> 32#include <linux/usb/audio.h>
33#include <linux/usb/midi.h> 33#include <linux/usb/midi.h>
34 34
35#include "u_f.h"
36
35MODULE_AUTHOR("Ben Williamson"); 37MODULE_AUTHOR("Ben Williamson");
36MODULE_LICENSE("GPL v2"); 38MODULE_LICENSE("GPL v2");
37 39
@@ -191,20 +193,10 @@ static struct usb_gadget_strings *midi_strings[] = {
191 NULL, 193 NULL,
192}; 194};
193 195
194static struct usb_request *alloc_ep_req(struct usb_ep *ep, unsigned length) 196static inline struct usb_request *midi_alloc_ep_req(struct usb_ep *ep,
197 unsigned length)
195{ 198{
196 struct usb_request *req; 199 return alloc_ep_req(ep, length, length);
197
198 req = usb_ep_alloc_request(ep, GFP_ATOMIC);
199 if (req) {
200 req->length = length;
201 req->buf = kmalloc(length, GFP_ATOMIC);
202 if (!req->buf) {
203 usb_ep_free_request(ep, req);
204 req = NULL;
205 }
206 }
207 return req;
208} 200}
209 201
210static void free_ep_req(struct usb_ep *ep, struct usb_request *req) 202static void free_ep_req(struct usb_ep *ep, struct usb_request *req)
@@ -365,7 +357,7 @@ static int f_midi_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
365 /* allocate a bunch of read buffers and queue them all at once. */ 357 /* allocate a bunch of read buffers and queue them all at once. */
366 for (i = 0; i < midi->qlen && err == 0; i++) { 358 for (i = 0; i < midi->qlen && err == 0; i++) {
367 struct usb_request *req = 359 struct usb_request *req =
368 alloc_ep_req(midi->out_ep, midi->buflen); 360 midi_alloc_ep_req(midi->out_ep, midi->buflen);
369 if (req == NULL) 361 if (req == NULL)
370 return -ENOMEM; 362 return -ENOMEM;
371 363
@@ -546,7 +538,7 @@ static void f_midi_transmit(struct f_midi *midi, struct usb_request *req)
546 return; 538 return;
547 539
548 if (!req) 540 if (!req)
549 req = alloc_ep_req(ep, midi->buflen); 541 req = midi_alloc_ep_req(ep, midi->buflen);
550 542
551 if (!req) { 543 if (!req) {
552 ERROR(midi, "gmidi_transmit: alloc_ep_request failed\n"); 544 ERROR(midi, "gmidi_transmit: alloc_ep_request failed\n");
diff --git a/drivers/usb/gadget/f_ncm.c b/drivers/usb/gadget/f_ncm.c
index 1c28fe13328a..a9499fd30792 100644
--- a/drivers/usb/gadget/f_ncm.c
+++ b/drivers/usb/gadget/f_ncm.c
@@ -1386,7 +1386,7 @@ static void ncm_unbind(struct usb_configuration *c, struct usb_function *f)
1386 usb_ep_free_request(ncm->notify, ncm->notify_req); 1386 usb_ep_free_request(ncm->notify, ncm->notify_req);
1387} 1387}
1388 1388
1389struct usb_function *ncm_alloc(struct usb_function_instance *fi) 1389static struct usb_function *ncm_alloc(struct usb_function_instance *fi)
1390{ 1390{
1391 struct f_ncm *ncm; 1391 struct f_ncm *ncm;
1392 struct f_ncm_opts *opts; 1392 struct f_ncm_opts *opts;
diff --git a/drivers/usb/gadget/f_obex.c b/drivers/usb/gadget/f_obex.c
index ad39f1dacba3..aebae1853bce 100644
--- a/drivers/usb/gadget/f_obex.c
+++ b/drivers/usb/gadget/f_obex.c
@@ -499,7 +499,7 @@ static void obex_unbind(struct usb_configuration *c, struct usb_function *f)
499 usb_free_all_descriptors(f); 499 usb_free_all_descriptors(f);
500} 500}
501 501
502struct usb_function *obex_alloc(struct usb_function_instance *fi) 502static struct usb_function *obex_alloc(struct usb_function_instance *fi)
503{ 503{
504 struct f_obex *obex; 504 struct f_obex *obex;
505 struct f_serial_opts *opts; 505 struct f_serial_opts *opts;
diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/f_phonet.c
index eb3aa817a662..f2b781773eed 100644
--- a/drivers/usb/gadget/f_phonet.c
+++ b/drivers/usb/gadget/f_phonet.c
@@ -689,7 +689,7 @@ static void pn_unbind(struct usb_configuration *c, struct usb_function *f)
689 usb_free_all_descriptors(f); 689 usb_free_all_descriptors(f);
690} 690}
691 691
692struct usb_function *phonet_alloc(struct usb_function_instance *fi) 692static struct usb_function *phonet_alloc(struct usb_function_instance *fi)
693{ 693{
694 struct f_phonet *fp; 694 struct f_phonet *fp;
695 struct f_phonet_opts *opts; 695 struct f_phonet_opts *opts;
diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c
index 717ed7f95639..c11761ce5113 100644
--- a/drivers/usb/gadget/f_rndis.c
+++ b/drivers/usb/gadget/f_rndis.c
@@ -675,7 +675,6 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f)
675 int status; 675 int status;
676 struct usb_ep *ep; 676 struct usb_ep *ep;
677 677
678#ifndef USB_FRNDIS_INCLUDED
679 struct f_rndis_opts *rndis_opts; 678 struct f_rndis_opts *rndis_opts;
680 679
681 if (!can_support_rndis(c)) 680 if (!can_support_rndis(c))
@@ -697,7 +696,7 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f)
697 return status; 696 return status;
698 rndis_opts->bound = true; 697 rndis_opts->bound = true;
699 } 698 }
700#endif 699
701 us = usb_gstrings_attach(cdev, rndis_strings, 700 us = usb_gstrings_attach(cdev, rndis_strings,
702 ARRAY_SIZE(rndis_string_defs)); 701 ARRAY_SIZE(rndis_string_defs));
703 if (IS_ERR(us)) 702 if (IS_ERR(us))
@@ -782,13 +781,6 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f)
782 rndis->port.open = rndis_open; 781 rndis->port.open = rndis_open;
783 rndis->port.close = rndis_close; 782 rndis->port.close = rndis_close;
784 783
785#ifdef USB_FRNDIS_INCLUDED
786 status = rndis_register(rndis_response_available, rndis);
787 if (status < 0)
788 goto fail;
789 rndis->config = status;
790#endif
791
792 rndis_set_param_medium(rndis->config, RNDIS_MEDIUM_802_3, 0); 784 rndis_set_param_medium(rndis->config, RNDIS_MEDIUM_802_3, 0);
793 rndis_set_host_mac(rndis->config, rndis->ethaddr); 785 rndis_set_host_mac(rndis->config, rndis->ethaddr);
794 786
@@ -830,66 +822,6 @@ fail:
830 return status; 822 return status;
831} 823}
832 824
833#ifdef USB_FRNDIS_INCLUDED
834
835static void
836rndis_old_unbind(struct usb_configuration *c, struct usb_function *f)
837{
838 struct f_rndis *rndis = func_to_rndis(f);
839
840 rndis_deregister(rndis->config);
841
842 usb_free_all_descriptors(f);
843
844 kfree(rndis->notify_req->buf);
845 usb_ep_free_request(rndis->notify, rndis->notify_req);
846
847 kfree(rndis);
848}
849
850int
851rndis_bind_config_vendor(struct usb_configuration *c, u8 ethaddr[ETH_ALEN],
852 u32 vendorID, const char *manufacturer, struct eth_dev *dev)
853{
854 struct f_rndis *rndis;
855 int status;
856
857 /* allocate and initialize one new instance */
858 status = -ENOMEM;
859 rndis = kzalloc(sizeof *rndis, GFP_KERNEL);
860 if (!rndis)
861 goto fail;
862
863 memcpy(rndis->ethaddr, ethaddr, ETH_ALEN);
864 rndis->vendorID = vendorID;
865 rndis->manufacturer = manufacturer;
866
867 rndis->port.ioport = dev;
868 /* RNDIS activates when the host changes this filter */
869 rndis->port.cdc_filter = 0;
870
871 /* RNDIS has special (and complex) framing */
872 rndis->port.header_len = sizeof(struct rndis_packet_msg_type);
873 rndis->port.wrap = rndis_add_header;
874 rndis->port.unwrap = rndis_rm_hdr;
875
876 rndis->port.func.name = "rndis";
877 /* descriptors are per-instance copies */
878 rndis->port.func.bind = rndis_bind;
879 rndis->port.func.unbind = rndis_old_unbind;
880 rndis->port.func.set_alt = rndis_set_alt;
881 rndis->port.func.setup = rndis_setup;
882 rndis->port.func.disable = rndis_disable;
883
884 status = usb_add_function(c, &rndis->port.func);
885 if (status)
886 kfree(rndis);
887fail:
888 return status;
889}
890
891#else
892
893void rndis_borrow_net(struct usb_function_instance *f, struct net_device *net) 825void rndis_borrow_net(struct usb_function_instance *f, struct net_device *net)
894{ 826{
895 struct f_rndis_opts *opts; 827 struct f_rndis_opts *opts;
@@ -1047,8 +979,26 @@ static struct usb_function *rndis_alloc(struct usb_function_instance *fi)
1047 return &rndis->port.func; 979 return &rndis->port.func;
1048} 980}
1049 981
1050DECLARE_USB_FUNCTION_INIT(rndis, rndis_alloc_inst, rndis_alloc); 982DECLARE_USB_FUNCTION(rndis, rndis_alloc_inst, rndis_alloc);
983
984static int __init rndis_mod_init(void)
985{
986 int ret;
987
988 ret = rndis_init();
989 if (ret)
990 return ret;
991
992 return usb_function_register(&rndisusb_func);
993}
994module_init(rndis_mod_init);
995
996static void __exit rndis_mod_exit(void)
997{
998 usb_function_unregister(&rndisusb_func);
999 rndis_exit();
1000}
1001module_exit(rndis_mod_exit);
1002
1051MODULE_LICENSE("GPL"); 1003MODULE_LICENSE("GPL");
1052MODULE_AUTHOR("David Brownell"); 1004MODULE_AUTHOR("David Brownell");
1053
1054#endif
diff --git a/drivers/usb/gadget/f_serial.c b/drivers/usb/gadget/f_serial.c
index 981113c9924d..9ecbcbf36a45 100644
--- a/drivers/usb/gadget/f_serial.c
+++ b/drivers/usb/gadget/f_serial.c
@@ -354,7 +354,7 @@ static void gser_unbind(struct usb_configuration *c, struct usb_function *f)
354 usb_free_all_descriptors(f); 354 usb_free_all_descriptors(f);
355} 355}
356 356
357struct usb_function *gser_alloc(struct usb_function_instance *fi) 357static struct usb_function *gser_alloc(struct usb_function_instance *fi)
358{ 358{
359 struct f_gser *gser; 359 struct f_gser *gser;
360 struct f_serial_opts *opts; 360 struct f_serial_opts *opts;
diff --git a/drivers/usb/gadget/f_sourcesink.c b/drivers/usb/gadget/f_sourcesink.c
index a8895859a221..d3cd52db78fe 100644
--- a/drivers/usb/gadget/f_sourcesink.c
+++ b/drivers/usb/gadget/f_sourcesink.c
@@ -21,6 +21,7 @@
21 21
22#include "g_zero.h" 22#include "g_zero.h"
23#include "gadget_chips.h" 23#include "gadget_chips.h"
24#include "u_f.h"
24 25
25/* 26/*
26 * SOURCE/SINK FUNCTION ... a primary testing vehicle for USB peripheral 27 * SOURCE/SINK FUNCTION ... a primary testing vehicle for USB peripheral
@@ -201,7 +202,7 @@ static struct usb_endpoint_descriptor ss_source_desc = {
201 .wMaxPacketSize = cpu_to_le16(1024), 202 .wMaxPacketSize = cpu_to_le16(1024),
202}; 203};
203 204
204struct usb_ss_ep_comp_descriptor ss_source_comp_desc = { 205static struct usb_ss_ep_comp_descriptor ss_source_comp_desc = {
205 .bLength = USB_DT_SS_EP_COMP_SIZE, 206 .bLength = USB_DT_SS_EP_COMP_SIZE,
206 .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, 207 .bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
207 208
@@ -218,7 +219,7 @@ static struct usb_endpoint_descriptor ss_sink_desc = {
218 .wMaxPacketSize = cpu_to_le16(1024), 219 .wMaxPacketSize = cpu_to_le16(1024),
219}; 220};
220 221
221struct usb_ss_ep_comp_descriptor ss_sink_comp_desc = { 222static struct usb_ss_ep_comp_descriptor ss_sink_comp_desc = {
222 .bLength = USB_DT_SS_EP_COMP_SIZE, 223 .bLength = USB_DT_SS_EP_COMP_SIZE,
223 .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, 224 .bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
224 225
@@ -236,7 +237,7 @@ static struct usb_endpoint_descriptor ss_iso_source_desc = {
236 .bInterval = 4, 237 .bInterval = 4,
237}; 238};
238 239
239struct usb_ss_ep_comp_descriptor ss_iso_source_comp_desc = { 240static struct usb_ss_ep_comp_descriptor ss_iso_source_comp_desc = {
240 .bLength = USB_DT_SS_EP_COMP_SIZE, 241 .bLength = USB_DT_SS_EP_COMP_SIZE,
241 .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, 242 .bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
242 243
@@ -254,7 +255,7 @@ static struct usb_endpoint_descriptor ss_iso_sink_desc = {
254 .bInterval = 4, 255 .bInterval = 4,
255}; 256};
256 257
257struct usb_ss_ep_comp_descriptor ss_iso_sink_comp_desc = { 258static struct usb_ss_ep_comp_descriptor ss_iso_sink_comp_desc = {
258 .bLength = USB_DT_SS_EP_COMP_SIZE, 259 .bLength = USB_DT_SS_EP_COMP_SIZE,
259 .bDescriptorType = USB_DT_SS_ENDPOINT_COMP, 260 .bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
260 261
@@ -301,23 +302,9 @@ static struct usb_gadget_strings *sourcesink_strings[] = {
301 302
302/*-------------------------------------------------------------------------*/ 303/*-------------------------------------------------------------------------*/
303 304
304struct usb_request *alloc_ep_req(struct usb_ep *ep, int len) 305static inline struct usb_request *ss_alloc_ep_req(struct usb_ep *ep, int len)
305{ 306{
306 struct usb_request *req; 307 return alloc_ep_req(ep, len, buflen);
307
308 req = usb_ep_alloc_request(ep, GFP_ATOMIC);
309 if (req) {
310 if (len)
311 req->length = len;
312 else
313 req->length = buflen;
314 req->buf = kmalloc(req->length, GFP_ATOMIC);
315 if (!req->buf) {
316 usb_ep_free_request(ep, req);
317 req = NULL;
318 }
319 }
320 return req;
321} 308}
322 309
323void free_ep_req(struct usb_ep *ep, struct usb_request *req) 310void free_ep_req(struct usb_ep *ep, struct usb_request *req)
@@ -490,6 +477,14 @@ no_iso:
490static void 477static void
491sourcesink_free_func(struct usb_function *f) 478sourcesink_free_func(struct usb_function *f)
492{ 479{
480 struct f_ss_opts *opts;
481
482 opts = container_of(f->fi, struct f_ss_opts, func_inst);
483
484 mutex_lock(&opts->lock);
485 opts->refcnt--;
486 mutex_unlock(&opts->lock);
487
493 usb_free_all_descriptors(f); 488 usb_free_all_descriptors(f);
494 kfree(func_to_ss(f)); 489 kfree(func_to_ss(f));
495} 490}
@@ -628,10 +623,10 @@ static int source_sink_start_ep(struct f_sourcesink *ss, bool is_in,
628 break; 623 break;
629 } 624 }
630 ep = is_in ? ss->iso_in_ep : ss->iso_out_ep; 625 ep = is_in ? ss->iso_in_ep : ss->iso_out_ep;
631 req = alloc_ep_req(ep, size); 626 req = ss_alloc_ep_req(ep, size);
632 } else { 627 } else {
633 ep = is_in ? ss->in_ep : ss->out_ep; 628 ep = is_in ? ss->in_ep : ss->out_ep;
634 req = alloc_ep_req(ep, 0); 629 req = ss_alloc_ep_req(ep, 0);
635 } 630 }
636 631
637 if (!req) 632 if (!req)
@@ -878,6 +873,11 @@ static struct usb_function *source_sink_alloc_func(
878 return NULL; 873 return NULL;
879 874
880 ss_opts = container_of(fi, struct f_ss_opts, func_inst); 875 ss_opts = container_of(fi, struct f_ss_opts, func_inst);
876
877 mutex_lock(&ss_opts->lock);
878 ss_opts->refcnt++;
879 mutex_unlock(&ss_opts->lock);
880
881 pattern = ss_opts->pattern; 881 pattern = ss_opts->pattern;
882 isoc_interval = ss_opts->isoc_interval; 882 isoc_interval = ss_opts->isoc_interval;
883 isoc_maxpacket = ss_opts->isoc_maxpacket; 883 isoc_maxpacket = ss_opts->isoc_maxpacket;
@@ -898,6 +898,303 @@ static struct usb_function *source_sink_alloc_func(
898 return &ss->function; 898 return &ss->function;
899} 899}
900 900
901static inline struct f_ss_opts *to_f_ss_opts(struct config_item *item)
902{
903 return container_of(to_config_group(item), struct f_ss_opts,
904 func_inst.group);
905}
906
907CONFIGFS_ATTR_STRUCT(f_ss_opts);
908CONFIGFS_ATTR_OPS(f_ss_opts);
909
910static void ss_attr_release(struct config_item *item)
911{
912 struct f_ss_opts *ss_opts = to_f_ss_opts(item);
913
914 usb_put_function_instance(&ss_opts->func_inst);
915}
916
917static struct configfs_item_operations ss_item_ops = {
918 .release = ss_attr_release,
919 .show_attribute = f_ss_opts_attr_show,
920 .store_attribute = f_ss_opts_attr_store,
921};
922
923static ssize_t f_ss_opts_pattern_show(struct f_ss_opts *opts, char *page)
924{
925 int result;
926
927 mutex_lock(&opts->lock);
928 result = sprintf(page, "%d", opts->pattern);
929 mutex_unlock(&opts->lock);
930
931 return result;
932}
933
934static ssize_t f_ss_opts_pattern_store(struct f_ss_opts *opts,
935 const char *page, size_t len)
936{
937 int ret;
938 u8 num;
939
940 mutex_lock(&opts->lock);
941 if (opts->refcnt) {
942 ret = -EBUSY;
943 goto end;
944 }
945
946 ret = kstrtou8(page, 0, &num);
947 if (ret)
948 goto end;
949
950 if (num != 0 && num != 1 && num != 2) {
951 ret = -EINVAL;
952 goto end;
953 }
954
955 opts->pattern = num;
956 ret = len;
957end:
958 mutex_unlock(&opts->lock);
959 return ret;
960}
961
962static struct f_ss_opts_attribute f_ss_opts_pattern =
963 __CONFIGFS_ATTR(pattern, S_IRUGO | S_IWUSR,
964 f_ss_opts_pattern_show,
965 f_ss_opts_pattern_store);
966
967static ssize_t f_ss_opts_isoc_interval_show(struct f_ss_opts *opts, char *page)
968{
969 int result;
970
971 mutex_lock(&opts->lock);
972 result = sprintf(page, "%d", opts->isoc_interval);
973 mutex_unlock(&opts->lock);
974
975 return result;
976}
977
978static ssize_t f_ss_opts_isoc_interval_store(struct f_ss_opts *opts,
979 const char *page, size_t len)
980{
981 int ret;
982 u8 num;
983
984 mutex_lock(&opts->lock);
985 if (opts->refcnt) {
986 ret = -EBUSY;
987 goto end;
988 }
989
990 ret = kstrtou8(page, 0, &num);
991 if (ret)
992 goto end;
993
994 if (num > 16) {
995 ret = -EINVAL;
996 goto end;
997 }
998
999 opts->isoc_interval = num;
1000 ret = len;
1001end:
1002 mutex_unlock(&opts->lock);
1003 return ret;
1004}
1005
1006static struct f_ss_opts_attribute f_ss_opts_isoc_interval =
1007 __CONFIGFS_ATTR(isoc_interval, S_IRUGO | S_IWUSR,
1008 f_ss_opts_isoc_interval_show,
1009 f_ss_opts_isoc_interval_store);
1010
1011static ssize_t f_ss_opts_isoc_maxpacket_show(struct f_ss_opts *opts, char *page)
1012{
1013 int result;
1014
1015 mutex_lock(&opts->lock);
1016 result = sprintf(page, "%d", opts->isoc_maxpacket);
1017 mutex_unlock(&opts->lock);
1018
1019 return result;
1020}
1021
1022static ssize_t f_ss_opts_isoc_maxpacket_store(struct f_ss_opts *opts,
1023 const char *page, size_t len)
1024{
1025 int ret;
1026 u16 num;
1027
1028 mutex_lock(&opts->lock);
1029 if (opts->refcnt) {
1030 ret = -EBUSY;
1031 goto end;
1032 }
1033
1034 ret = kstrtou16(page, 0, &num);
1035 if (ret)
1036 goto end;
1037
1038 if (num > 1024) {
1039 ret = -EINVAL;
1040 goto end;
1041 }
1042
1043 opts->isoc_maxpacket = num;
1044 ret = len;
1045end:
1046 mutex_unlock(&opts->lock);
1047 return ret;
1048}
1049
1050static struct f_ss_opts_attribute f_ss_opts_isoc_maxpacket =
1051 __CONFIGFS_ATTR(isoc_maxpacket, S_IRUGO | S_IWUSR,
1052 f_ss_opts_isoc_maxpacket_show,
1053 f_ss_opts_isoc_maxpacket_store);
1054
1055static ssize_t f_ss_opts_isoc_mult_show(struct f_ss_opts *opts, char *page)
1056{
1057 int result;
1058
1059 mutex_lock(&opts->lock);
1060 result = sprintf(page, "%d", opts->isoc_mult);
1061 mutex_unlock(&opts->lock);
1062
1063 return result;
1064}
1065
1066static ssize_t f_ss_opts_isoc_mult_store(struct f_ss_opts *opts,
1067 const char *page, size_t len)
1068{
1069 int ret;
1070 u8 num;
1071
1072 mutex_lock(&opts->lock);
1073 if (opts->refcnt) {
1074 ret = -EBUSY;
1075 goto end;
1076 }
1077
1078 ret = kstrtou8(page, 0, &num);
1079 if (ret)
1080 goto end;
1081
1082 if (num > 2) {
1083 ret = -EINVAL;
1084 goto end;
1085 }
1086
1087 opts->isoc_mult = num;
1088 ret = len;
1089end:
1090 mutex_unlock(&opts->lock);
1091 return ret;
1092}
1093
1094static struct f_ss_opts_attribute f_ss_opts_isoc_mult =
1095 __CONFIGFS_ATTR(isoc_mult, S_IRUGO | S_IWUSR,
1096 f_ss_opts_isoc_mult_show,
1097 f_ss_opts_isoc_mult_store);
1098
1099static ssize_t f_ss_opts_isoc_maxburst_show(struct f_ss_opts *opts, char *page)
1100{
1101 int result;
1102
1103 mutex_lock(&opts->lock);
1104 result = sprintf(page, "%d", opts->isoc_maxburst);
1105 mutex_unlock(&opts->lock);
1106
1107 return result;
1108}
1109
1110static ssize_t f_ss_opts_isoc_maxburst_store(struct f_ss_opts *opts,
1111 const char *page, size_t len)
1112{
1113 int ret;
1114 u8 num;
1115
1116 mutex_lock(&opts->lock);
1117 if (opts->refcnt) {
1118 ret = -EBUSY;
1119 goto end;
1120 }
1121
1122 ret = kstrtou8(page, 0, &num);
1123 if (ret)
1124 goto end;
1125
1126 if (num > 15) {
1127 ret = -EINVAL;
1128 goto end;
1129 }
1130
1131 opts->isoc_maxburst = num;
1132 ret = len;
1133end:
1134 mutex_unlock(&opts->lock);
1135 return ret;
1136}
1137
1138static struct f_ss_opts_attribute f_ss_opts_isoc_maxburst =
1139 __CONFIGFS_ATTR(isoc_maxburst, S_IRUGO | S_IWUSR,
1140 f_ss_opts_isoc_maxburst_show,
1141 f_ss_opts_isoc_maxburst_store);
1142
1143static ssize_t f_ss_opts_bulk_buflen_show(struct f_ss_opts *opts, char *page)
1144{
1145 int result;
1146
1147 mutex_lock(&opts->lock);
1148 result = sprintf(page, "%d", opts->bulk_buflen);
1149 mutex_unlock(&opts->lock);
1150
1151 return result;
1152}
1153
1154static ssize_t f_ss_opts_bulk_buflen_store(struct f_ss_opts *opts,
1155 const char *page, size_t len)
1156{
1157 int ret;
1158 u32 num;
1159
1160 mutex_lock(&opts->lock);
1161 if (opts->refcnt) {
1162 ret = -EBUSY;
1163 goto end;
1164 }
1165
1166 ret = kstrtou32(page, 0, &num);
1167 if (ret)
1168 goto end;
1169
1170 opts->bulk_buflen = num;
1171 ret = len;
1172end:
1173 mutex_unlock(&opts->lock);
1174 return ret;
1175}
1176
1177static struct f_ss_opts_attribute f_ss_opts_bulk_buflen =
1178 __CONFIGFS_ATTR(buflen, S_IRUGO | S_IWUSR,
1179 f_ss_opts_bulk_buflen_show,
1180 f_ss_opts_bulk_buflen_store);
1181
1182static struct configfs_attribute *ss_attrs[] = {
1183 &f_ss_opts_pattern.attr,
1184 &f_ss_opts_isoc_interval.attr,
1185 &f_ss_opts_isoc_maxpacket.attr,
1186 &f_ss_opts_isoc_mult.attr,
1187 &f_ss_opts_isoc_maxburst.attr,
1188 &f_ss_opts_bulk_buflen.attr,
1189 NULL,
1190};
1191
1192static struct config_item_type ss_func_type = {
1193 .ct_item_ops = &ss_item_ops,
1194 .ct_attrs = ss_attrs,
1195 .ct_owner = THIS_MODULE,
1196};
1197
901static void source_sink_free_instance(struct usb_function_instance *fi) 1198static void source_sink_free_instance(struct usb_function_instance *fi)
902{ 1199{
903 struct f_ss_opts *ss_opts; 1200 struct f_ss_opts *ss_opts;
@@ -913,7 +1210,15 @@ static struct usb_function_instance *source_sink_alloc_inst(void)
913 ss_opts = kzalloc(sizeof(*ss_opts), GFP_KERNEL); 1210 ss_opts = kzalloc(sizeof(*ss_opts), GFP_KERNEL);
914 if (!ss_opts) 1211 if (!ss_opts)
915 return ERR_PTR(-ENOMEM); 1212 return ERR_PTR(-ENOMEM);
1213 mutex_init(&ss_opts->lock);
916 ss_opts->func_inst.free_func_inst = source_sink_free_instance; 1214 ss_opts->func_inst.free_func_inst = source_sink_free_instance;
1215 ss_opts->isoc_interval = GZERO_ISOC_INTERVAL;
1216 ss_opts->isoc_maxpacket = GZERO_ISOC_MAXPACKET;
1217 ss_opts->bulk_buflen = GZERO_BULK_BUFLEN;
1218
1219 config_group_init_type_name(&ss_opts->func_inst.group, "",
1220 &ss_func_type);
1221
917 return &ss_opts->func_inst; 1222 return &ss_opts->func_inst;
918} 1223}
919DECLARE_USB_FUNCTION(SourceSink, source_sink_alloc_inst, 1224DECLARE_USB_FUNCTION(SourceSink, source_sink_alloc_inst,
diff --git a/drivers/usb/gadget/f_subset.c b/drivers/usb/gadget/f_subset.c
index 7c8674fa7e80..f1a59190ac9a 100644
--- a/drivers/usb/gadget/f_subset.c
+++ b/drivers/usb/gadget/f_subset.c
@@ -301,7 +301,6 @@ geth_bind(struct usb_configuration *c, struct usb_function *f)
301 int status; 301 int status;
302 struct usb_ep *ep; 302 struct usb_ep *ep;
303 303
304#ifndef USB_FSUBSET_INCLUDED
305 struct f_gether_opts *gether_opts; 304 struct f_gether_opts *gether_opts;
306 305
307 gether_opts = container_of(f->fi, struct f_gether_opts, func_inst); 306 gether_opts = container_of(f->fi, struct f_gether_opts, func_inst);
@@ -322,7 +321,7 @@ geth_bind(struct usb_configuration *c, struct usb_function *f)
322 return status; 321 return status;
323 gether_opts->bound = true; 322 gether_opts->bound = true;
324 } 323 }
325#endif 324
326 us = usb_gstrings_attach(cdev, geth_strings, 325 us = usb_gstrings_attach(cdev, geth_strings,
327 ARRAY_SIZE(geth_string_defs)); 326 ARRAY_SIZE(geth_string_defs));
328 if (IS_ERR(us)) 327 if (IS_ERR(us))
@@ -393,61 +392,6 @@ fail:
393 return status; 392 return status;
394} 393}
395 394
396#ifdef USB_FSUBSET_INCLUDED
397
398static void
399geth_old_unbind(struct usb_configuration *c, struct usb_function *f)
400{
401 geth_string_defs[0].id = 0;
402 usb_free_all_descriptors(f);
403 kfree(func_to_geth(f));
404}
405
406/**
407 * geth_bind_config - add CDC Subset network link to a configuration
408 * @c: the configuration to support the network link
409 * @ethaddr: a buffer in which the ethernet address of the host side
410 * side of the link was recorded
411 * @dev: eth_dev structure
412 * Context: single threaded during gadget setup
413 *
414 * Returns zero on success, else negative errno.
415 *
416 * Caller must have called @gether_setup(). Caller is also responsible
417 * for calling @gether_cleanup() before module unload.
418 */
419int geth_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN],
420 struct eth_dev *dev)
421{
422 struct f_gether *geth;
423 int status;
424
425 /* allocate and initialize one new instance */
426 geth = kzalloc(sizeof *geth, GFP_KERNEL);
427 if (!geth)
428 return -ENOMEM;
429
430 /* export host's Ethernet address in CDC format */
431 snprintf(geth->ethaddr, sizeof geth->ethaddr, "%pm", ethaddr);
432 geth_string_defs[1].s = geth->ethaddr;
433
434 geth->port.ioport = dev;
435 geth->port.cdc_filter = DEFAULT_FILTER;
436
437 geth->port.func.name = "cdc_subset";
438 geth->port.func.bind = geth_bind;
439 geth->port.func.unbind = geth_old_unbind;
440 geth->port.func.set_alt = geth_set_alt;
441 geth->port.func.disable = geth_disable;
442
443 status = usb_add_function(c, &geth->port.func);
444 if (status)
445 kfree(geth);
446 return status;
447}
448
449#else
450
451static inline struct f_gether_opts *to_f_gether_opts(struct config_item *item) 395static inline struct f_gether_opts *to_f_gether_opts(struct config_item *item)
452{ 396{
453 return container_of(to_config_group(item), struct f_gether_opts, 397 return container_of(to_config_group(item), struct f_gether_opts,
@@ -573,5 +517,3 @@ static struct usb_function *geth_alloc(struct usb_function_instance *fi)
573DECLARE_USB_FUNCTION_INIT(geth, geth_alloc_inst, geth_alloc); 517DECLARE_USB_FUNCTION_INIT(geth, geth_alloc_inst, geth_alloc);
574MODULE_LICENSE("GPL"); 518MODULE_LICENSE("GPL");
575MODULE_AUTHOR("David Brownell"); 519MODULE_AUTHOR("David Brownell");
576
577#endif
diff --git a/drivers/usb/gadget/fotg210-udc.c b/drivers/usb/gadget/fotg210-udc.c
index bbbfd1948778..2d0305280e8c 100644
--- a/drivers/usb/gadget/fotg210-udc.c
+++ b/drivers/usb/gadget/fotg210-udc.c
@@ -1157,8 +1157,9 @@ static int fotg210_udc_probe(struct platform_device *pdev)
1157 INIT_LIST_HEAD(&ep->queue); 1157 INIT_LIST_HEAD(&ep->queue);
1158 ep->ep.name = fotg210_ep_name[i]; 1158 ep->ep.name = fotg210_ep_name[i];
1159 ep->ep.ops = &fotg210_ep_ops; 1159 ep->ep.ops = &fotg210_ep_ops;
1160 usb_ep_set_maxpacket_limit(&ep->ep, (unsigned short) ~0);
1160 } 1161 }
1161 fotg210->ep[0]->ep.maxpacket = 0x40; 1162 usb_ep_set_maxpacket_limit(&fotg210->ep[0]->ep, 0x40);
1162 fotg210->gadget.ep0 = &fotg210->ep[0]->ep; 1163 fotg210->gadget.ep0 = &fotg210->ep[0]->ep;
1163 INIT_LIST_HEAD(&fotg210->gadget.ep0->ep_list); 1164 INIT_LIST_HEAD(&fotg210->gadget.ep0->ep_list);
1164 1165
diff --git a/drivers/usb/gadget/fsl_qe_udc.c b/drivers/usb/gadget/fsl_qe_udc.c
index 807127d56fa3..ad5483335167 100644
--- a/drivers/usb/gadget/fsl_qe_udc.c
+++ b/drivers/usb/gadget/fsl_qe_udc.c
@@ -22,7 +22,6 @@
22 22
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/kernel.h> 24#include <linux/kernel.h>
25#include <linux/init.h>
26#include <linux/ioport.h> 25#include <linux/ioport.h>
27#include <linux/types.h> 26#include <linux/types.h>
28#include <linux/errno.h> 27#include <linux/errno.h>
@@ -2429,7 +2428,7 @@ static int qe_ep_config(struct qe_udc *udc, unsigned char pipe_num)
2429 2428
2430 ep->ep.ops = &qe_ep_ops; 2429 ep->ep.ops = &qe_ep_ops;
2431 ep->stopped = 1; 2430 ep->stopped = 1;
2432 ep->ep.maxpacket = (unsigned short) ~0; 2431 usb_ep_set_maxpacket_limit(&ep->ep, (unsigned short) ~0);
2433 ep->ep.desc = NULL; 2432 ep->ep.desc = NULL;
2434 ep->dir = 0xff; 2433 ep->dir = 0xff;
2435 ep->epnum = (u8)pipe_num; 2434 ep->epnum = (u8)pipe_num;
@@ -2717,7 +2716,7 @@ MODULE_DEVICE_TABLE(of, qe_udc_match);
2717 2716
2718static struct platform_driver udc_driver = { 2717static struct platform_driver udc_driver = {
2719 .driver = { 2718 .driver = {
2720 .name = (char *)driver_name, 2719 .name = driver_name,
2721 .owner = THIS_MODULE, 2720 .owner = THIS_MODULE,
2722 .of_match_table = qe_udc_match, 2721 .of_match_table = qe_udc_match,
2723 }, 2722 },
diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
index 36ac7cfba91d..15960af0f67e 100644
--- a/drivers/usb/gadget/fsl_udc_core.c
+++ b/drivers/usb/gadget/fsl_udc_core.c
@@ -2311,7 +2311,7 @@ static int __init struct_ep_setup(struct fsl_udc *udc, unsigned char index,
2311 /* for ep0: maxP defined in desc 2311 /* for ep0: maxP defined in desc
2312 * for other eps, maxP is set by epautoconfig() called by gadget layer 2312 * for other eps, maxP is set by epautoconfig() called by gadget layer
2313 */ 2313 */
2314 ep->ep.maxpacket = (unsigned short) ~0; 2314 usb_ep_set_maxpacket_limit(&ep->ep, (unsigned short) ~0);
2315 2315
2316 /* the queue lists any req for this ep */ 2316 /* the queue lists any req for this ep */
2317 INIT_LIST_HEAD(&ep->queue); 2317 INIT_LIST_HEAD(&ep->queue);
@@ -2469,7 +2469,8 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
2469 * for other eps, gadget layer called ep_enable with defined desc 2469 * for other eps, gadget layer called ep_enable with defined desc
2470 */ 2470 */
2471 udc_controller->eps[0].ep.desc = &fsl_ep0_desc; 2471 udc_controller->eps[0].ep.desc = &fsl_ep0_desc;
2472 udc_controller->eps[0].ep.maxpacket = USB_MAX_CTRL_PAYLOAD; 2472 usb_ep_set_maxpacket_limit(&udc_controller->eps[0].ep,
2473 USB_MAX_CTRL_PAYLOAD);
2473 2474
2474 /* setup the udc->eps[] for non-control endpoints and link 2475 /* setup the udc->eps[] for non-control endpoints and link
2475 * to gadget.ep_list */ 2476 * to gadget.ep_list */
@@ -2666,7 +2667,7 @@ static struct platform_driver udc_driver = {
2666 .suspend = fsl_udc_suspend, 2667 .suspend = fsl_udc_suspend,
2667 .resume = fsl_udc_resume, 2668 .resume = fsl_udc_resume,
2668 .driver = { 2669 .driver = {
2669 .name = (char *)driver_name, 2670 .name = driver_name,
2670 .owner = THIS_MODULE, 2671 .owner = THIS_MODULE,
2671 /* udc suspend/resume called from OTG driver */ 2672 /* udc suspend/resume called from OTG driver */
2672 .suspend = fsl_udc_otg_suspend, 2673 .suspend = fsl_udc_otg_suspend,
diff --git a/drivers/usb/gadget/fusb300_udc.c b/drivers/usb/gadget/fusb300_udc.c
index b278abe52453..6423f1840ed9 100644
--- a/drivers/usb/gadget/fusb300_udc.c
+++ b/drivers/usb/gadget/fusb300_udc.c
@@ -1452,9 +1452,9 @@ static int __init fusb300_probe(struct platform_device *pdev)
1452 INIT_LIST_HEAD(&ep->queue); 1452 INIT_LIST_HEAD(&ep->queue);
1453 ep->ep.name = fusb300_ep_name[i]; 1453 ep->ep.name = fusb300_ep_name[i];
1454 ep->ep.ops = &fusb300_ep_ops; 1454 ep->ep.ops = &fusb300_ep_ops;
1455 ep->ep.maxpacket = HS_BULK_MAX_PACKET_SIZE; 1455 usb_ep_set_maxpacket_limit(&ep->ep, HS_BULK_MAX_PACKET_SIZE);
1456 } 1456 }
1457 fusb300->ep[0]->ep.maxpacket = HS_CTL_MAX_PACKET_SIZE; 1457 usb_ep_set_maxpacket_limit(&fusb300->ep[0]->ep, HS_CTL_MAX_PACKET_SIZE);
1458 fusb300->ep[0]->epnum = 0; 1458 fusb300->ep[0]->epnum = 0;
1459 fusb300->gadget.ep0 = &fusb300->ep[0]->ep; 1459 fusb300->gadget.ep0 = &fusb300->ep[0]->ep;
1460 INIT_LIST_HEAD(&fusb300->gadget.ep0->ep_list); 1460 INIT_LIST_HEAD(&fusb300->gadget.ep0->ep_list);
diff --git a/drivers/usb/gadget/g_ffs.c b/drivers/usb/gadget/g_ffs.c
index 2344efe4f4ce..fe12e6a27448 100644
--- a/drivers/usb/gadget/g_ffs.c
+++ b/drivers/usb/gadget/g_ffs.c
@@ -13,14 +13,10 @@
13#define pr_fmt(fmt) "g_ffs: " fmt 13#define pr_fmt(fmt) "g_ffs: " fmt
14 14
15#include <linux/module.h> 15#include <linux/module.h>
16/* 16
17 * kbuild is not very cooperative with respect to linking separately
18 * compiled library objects into one module. So for now we won't use
19 * separate compilation ... ensuring init/exit sections work to shrink
20 * the runtime footprint, and giving us at least some parts of what
21 * a "gcc --combine ... part1.c part2.c part3.c ... " build would.
22 */
23#if defined CONFIG_USB_FUNCTIONFS_ETH || defined CONFIG_USB_FUNCTIONFS_RNDIS 17#if defined CONFIG_USB_FUNCTIONFS_ETH || defined CONFIG_USB_FUNCTIONFS_RNDIS
18#include <linux/netdevice.h>
19
24# if defined USB_ETH_RNDIS 20# if defined USB_ETH_RNDIS
25# undef USB_ETH_RNDIS 21# undef USB_ETH_RNDIS
26# endif 22# endif
@@ -28,31 +24,31 @@
28# define USB_ETH_RNDIS y 24# define USB_ETH_RNDIS y
29# endif 25# endif
30 26
31#define USBF_ECM_INCLUDED 27# include "u_ecm.h"
32# include "f_ecm.c" 28# include "u_gether.h"
33#define USB_FSUBSET_INCLUDED
34# include "f_subset.c"
35# ifdef USB_ETH_RNDIS 29# ifdef USB_ETH_RNDIS
36# define USB_FRNDIS_INCLUDED 30# include "u_rndis.h"
37# include "f_rndis.c"
38# include "rndis.h" 31# include "rndis.h"
39# endif 32# endif
40# include "u_ether.h" 33# include "u_ether.h"
41 34
42static u8 gfs_host_mac[ETH_ALEN]; 35USB_ETHERNET_MODULE_PARAMETERS();
43static struct eth_dev *the_dev; 36
44# ifdef CONFIG_USB_FUNCTIONFS_ETH 37# ifdef CONFIG_USB_FUNCTIONFS_ETH
45static int eth_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN], 38static int eth_bind_config(struct usb_configuration *c);
46 struct eth_dev *dev); 39static struct usb_function_instance *fi_ecm;
40static struct usb_function *f_ecm;
41static struct usb_function_instance *fi_geth;
42static struct usb_function *f_geth;
43# endif
44# ifdef CONFIG_USB_FUNCTIONFS_RNDIS
45static int bind_rndis_config(struct usb_configuration *c);
46static struct usb_function_instance *fi_rndis;
47static struct usb_function *f_rndis;
47# endif 48# endif
48#else
49# define the_dev NULL
50# define gether_cleanup(dev) do { } while (0)
51# define gfs_host_mac NULL
52struct eth_dev;
53#endif 49#endif
54 50
55#include "f_fs.c" 51#include "u_fs.h"
56 52
57#define DRIVER_NAME "g_ffs" 53#define DRIVER_NAME "g_ffs"
58#define DRIVER_DESC "USB Function Filesystem" 54#define DRIVER_DESC "USB Function Filesystem"
@@ -67,19 +63,8 @@ MODULE_LICENSE("GPL");
67 63
68#define GFS_MAX_DEVS 10 64#define GFS_MAX_DEVS 10
69 65
70struct gfs_ffs_obj {
71 const char *name;
72 bool mounted;
73 bool desc_ready;
74 struct ffs_data *ffs_data;
75};
76
77USB_GADGET_COMPOSITE_OPTIONS(); 66USB_GADGET_COMPOSITE_OPTIONS();
78 67
79#if defined CONFIG_USB_FUNCTIONFS_ETH || defined CONFIG_USB_FUNCTIONFS_RNDIS
80USB_ETHERNET_MODULE_PARAMETERS();
81#endif
82
83static struct usb_device_descriptor gfs_dev_desc = { 68static struct usb_device_descriptor gfs_dev_desc = {
84 .bLength = sizeof gfs_dev_desc, 69 .bLength = sizeof gfs_dev_desc,
85 .bDescriptorType = USB_DT_DEVICE, 70 .bDescriptorType = USB_DT_DEVICE,
@@ -146,12 +131,12 @@ static struct usb_gadget_strings *gfs_dev_strings[] = {
146 131
147struct gfs_configuration { 132struct gfs_configuration {
148 struct usb_configuration c; 133 struct usb_configuration c;
149 int (*eth)(struct usb_configuration *c, u8 *ethaddr, 134 int (*eth)(struct usb_configuration *c);
150 struct eth_dev *dev); 135 int num;
151} gfs_configurations[] = { 136} gfs_configurations[] = {
152#ifdef CONFIG_USB_FUNCTIONFS_RNDIS 137#ifdef CONFIG_USB_FUNCTIONFS_RNDIS
153 { 138 {
154 .eth = rndis_bind_config, 139 .eth = bind_rndis_config,
155 }, 140 },
156#endif 141#endif
157 142
@@ -167,10 +152,15 @@ struct gfs_configuration {
167#endif 152#endif
168}; 153};
169 154
155static void *functionfs_acquire_dev(struct ffs_dev *dev);
156static void functionfs_release_dev(struct ffs_dev *dev);
157static int functionfs_ready_callback(struct ffs_data *ffs);
158static void functionfs_closed_callback(struct ffs_data *ffs);
170static int gfs_bind(struct usb_composite_dev *cdev); 159static int gfs_bind(struct usb_composite_dev *cdev);
171static int gfs_unbind(struct usb_composite_dev *cdev); 160static int gfs_unbind(struct usb_composite_dev *cdev);
172static int gfs_do_config(struct usb_configuration *c); 161static int gfs_do_config(struct usb_configuration *c);
173 162
163
174static __refdata struct usb_composite_driver gfs_driver = { 164static __refdata struct usb_composite_driver gfs_driver = {
175 .name = DRIVER_NAME, 165 .name = DRIVER_NAME,
176 .dev = &gfs_dev_desc, 166 .dev = &gfs_dev_desc,
@@ -180,206 +170,244 @@ static __refdata struct usb_composite_driver gfs_driver = {
180 .unbind = gfs_unbind, 170 .unbind = gfs_unbind,
181}; 171};
182 172
183static DEFINE_MUTEX(gfs_lock);
184static unsigned int missing_funcs; 173static unsigned int missing_funcs;
185static bool gfs_ether_setup;
186static bool gfs_registered; 174static bool gfs_registered;
187static bool gfs_single_func; 175static bool gfs_single_func;
188static struct gfs_ffs_obj *ffs_tab; 176static struct usb_function_instance **fi_ffs;
177static struct usb_function **f_ffs[] = {
178#ifdef CONFIG_USB_FUNCTIONFS_RNDIS
179 NULL,
180#endif
181
182#ifdef CONFIG_USB_FUNCTIONFS_ETH
183 NULL,
184#endif
185
186#ifdef CONFIG_USB_FUNCTIONFS_GENERIC
187 NULL,
188#endif
189};
190
191#define N_CONF ARRAY_SIZE(f_ffs)
189 192
190static int __init gfs_init(void) 193static int __init gfs_init(void)
191{ 194{
195 struct f_fs_opts *opts;
192 int i; 196 int i;
197 int ret = 0;
193 198
194 ENTER(); 199 ENTER();
195 200
196 if (!func_num) { 201 if (func_num < 2) {
197 gfs_single_func = true; 202 gfs_single_func = true;
198 func_num = 1; 203 func_num = 1;
199 } 204 }
200 205
201 ffs_tab = kcalloc(func_num, sizeof *ffs_tab, GFP_KERNEL); 206 /*
202 if (!ffs_tab) 207 * Allocate in one chunk for easier maintenance
203 return -ENOMEM; 208 */
209 f_ffs[0] = kcalloc(func_num * N_CONF, sizeof(*f_ffs), GFP_KERNEL);
210 if (!f_ffs[0]) {
211 ret = -ENOMEM;
212 goto no_func;
213 }
214 for (i = 1; i < N_CONF; ++i)
215 f_ffs[i] = f_ffs[0] + i * func_num;
204 216
205 if (!gfs_single_func) 217 fi_ffs = kcalloc(func_num, sizeof(*fi_ffs), GFP_KERNEL);
206 for (i = 0; i < func_num; i++) 218 if (!fi_ffs) {
207 ffs_tab[i].name = func_names[i]; 219 ret = -ENOMEM;
220 goto no_func;
221 }
222
223 for (i = 0; i < func_num; i++) {
224 fi_ffs[i] = usb_get_function_instance("ffs");
225 if (IS_ERR(fi_ffs[i])) {
226 ret = PTR_ERR(fi_ffs[i]);
227 --i;
228 goto no_dev;
229 }
230 opts = to_f_fs_opts(fi_ffs[i]);
231 if (gfs_single_func)
232 ret = ffs_single_dev(opts->dev);
233 else
234 ret = ffs_name_dev(opts->dev, func_names[i]);
235 if (ret)
236 goto no_dev;
237 opts->dev->ffs_ready_callback = functionfs_ready_callback;
238 opts->dev->ffs_closed_callback = functionfs_closed_callback;
239 opts->dev->ffs_acquire_dev_callback = functionfs_acquire_dev;
240 opts->dev->ffs_release_dev_callback = functionfs_release_dev;
241 opts->no_configfs = true;
242 }
208 243
209 missing_funcs = func_num; 244 missing_funcs = func_num;
210 245
211 return functionfs_init(); 246 return 0;
247no_dev:
248 while (i >= 0)
249 usb_put_function_instance(fi_ffs[i--]);
250 kfree(fi_ffs);
251no_func:
252 kfree(f_ffs[0]);
253 return ret;
212} 254}
213module_init(gfs_init); 255module_init(gfs_init);
214 256
215static void __exit gfs_exit(void) 257static void __exit gfs_exit(void)
216{ 258{
259 int i;
260
217 ENTER(); 261 ENTER();
218 mutex_lock(&gfs_lock);
219 262
220 if (gfs_registered) 263 if (gfs_registered)
221 usb_composite_unregister(&gfs_driver); 264 usb_composite_unregister(&gfs_driver);
222 gfs_registered = false; 265 gfs_registered = false;
223 266
224 functionfs_cleanup(); 267 kfree(f_ffs[0]);
268
269 for (i = 0; i < func_num; i++)
270 usb_put_function_instance(fi_ffs[i]);
225 271
226 mutex_unlock(&gfs_lock); 272 kfree(fi_ffs);
227 kfree(ffs_tab);
228} 273}
229module_exit(gfs_exit); 274module_exit(gfs_exit);
230 275
231static struct gfs_ffs_obj *gfs_find_dev(const char *dev_name) 276static void *functionfs_acquire_dev(struct ffs_dev *dev)
232{ 277{
233 int i; 278 if (!try_module_get(THIS_MODULE))
234 279 return ERR_PTR(-ENODEV);
235 ENTER(); 280
236 281 return 0;
237 if (gfs_single_func) 282}
238 return &ffs_tab[0];
239
240 for (i = 0; i < func_num; i++)
241 if (strcmp(ffs_tab[i].name, dev_name) == 0)
242 return &ffs_tab[i];
243 283
244 return NULL; 284static void functionfs_release_dev(struct ffs_dev *dev)
285{
286 module_put(THIS_MODULE);
245} 287}
246 288
289/*
290 * The caller of this function takes ffs_lock
291 */
247static int functionfs_ready_callback(struct ffs_data *ffs) 292static int functionfs_ready_callback(struct ffs_data *ffs)
248{ 293{
249 struct gfs_ffs_obj *ffs_obj; 294 int ret = 0;
250 int ret;
251
252 ENTER();
253 mutex_lock(&gfs_lock);
254 295
255 ffs_obj = ffs->private_data; 296 if (--missing_funcs)
256 if (!ffs_obj) { 297 return 0;
257 ret = -EINVAL;
258 goto done;
259 }
260 298
261 if (WARN_ON(ffs_obj->desc_ready)) { 299 if (gfs_registered)
262 ret = -EBUSY; 300 return -EBUSY;
263 goto done;
264 }
265 ffs_obj->desc_ready = true;
266 ffs_obj->ffs_data = ffs;
267
268 if (--missing_funcs) {
269 ret = 0;
270 goto done;
271 }
272 301
273 if (gfs_registered) {
274 ret = -EBUSY;
275 goto done;
276 }
277 gfs_registered = true; 302 gfs_registered = true;
278 303
279 ret = usb_composite_probe(&gfs_driver); 304 ret = usb_composite_probe(&gfs_driver);
280 if (unlikely(ret < 0)) 305 if (unlikely(ret < 0))
281 gfs_registered = false; 306 gfs_registered = false;
282 307
283done:
284 mutex_unlock(&gfs_lock);
285 return ret; 308 return ret;
286} 309}
287 310
311/*
312 * The caller of this function takes ffs_lock
313 */
288static void functionfs_closed_callback(struct ffs_data *ffs) 314static void functionfs_closed_callback(struct ffs_data *ffs)
289{ 315{
290 struct gfs_ffs_obj *ffs_obj;
291
292 ENTER();
293 mutex_lock(&gfs_lock);
294
295 ffs_obj = ffs->private_data;
296 if (!ffs_obj)
297 goto done;
298
299 ffs_obj->desc_ready = false;
300 missing_funcs++; 316 missing_funcs++;
301 317
302 if (gfs_registered) 318 if (gfs_registered)
303 usb_composite_unregister(&gfs_driver); 319 usb_composite_unregister(&gfs_driver);
304 gfs_registered = false; 320 gfs_registered = false;
305
306done:
307 mutex_unlock(&gfs_lock);
308} 321}
309 322
310static void *functionfs_acquire_dev_callback(const char *dev_name) 323/*
324 * It is assumed that gfs_bind is called from a context where ffs_lock is held
325 */
326static int gfs_bind(struct usb_composite_dev *cdev)
311{ 327{
312 struct gfs_ffs_obj *ffs_dev; 328#if defined CONFIG_USB_FUNCTIONFS_ETH || defined CONFIG_USB_FUNCTIONFS_RNDIS
329 struct net_device *net;
330#endif
331 int ret, i;
313 332
314 ENTER(); 333 ENTER();
315 mutex_lock(&gfs_lock);
316
317 ffs_dev = gfs_find_dev(dev_name);
318 if (!ffs_dev) {
319 ffs_dev = ERR_PTR(-ENODEV);
320 goto done;
321 }
322 334
323 if (ffs_dev->mounted) { 335 if (missing_funcs)
324 ffs_dev = ERR_PTR(-EBUSY); 336 return -ENODEV;
325 goto done; 337#if defined CONFIG_USB_FUNCTIONFS_ETH
338 if (can_support_ecm(cdev->gadget)) {
339 struct f_ecm_opts *ecm_opts;
340
341 fi_ecm = usb_get_function_instance("ecm");
342 if (IS_ERR(fi_ecm))
343 return PTR_ERR(fi_ecm);
344 ecm_opts = container_of(fi_ecm, struct f_ecm_opts, func_inst);
345 net = ecm_opts->net;
346 } else {
347 struct f_gether_opts *geth_opts;
348
349 fi_geth = usb_get_function_instance("geth");
350 if (IS_ERR(fi_geth))
351 return PTR_ERR(fi_geth);
352 geth_opts = container_of(fi_geth, struct f_gether_opts,
353 func_inst);
354 net = geth_opts->net;
326 } 355 }
327 ffs_dev->mounted = true; 356#endif
328 357
329done: 358#ifdef CONFIG_USB_FUNCTIONFS_RNDIS
330 mutex_unlock(&gfs_lock); 359 {
331 return ffs_dev; 360 struct f_rndis_opts *rndis_opts;
332}
333 361
334static void functionfs_release_dev_callback(struct ffs_data *ffs_data) 362 fi_rndis = usb_get_function_instance("rndis");
335{ 363 if (IS_ERR(fi_rndis)) {
336 struct gfs_ffs_obj *ffs_dev; 364 ret = PTR_ERR(fi_rndis);
365 goto error;
366 }
367 rndis_opts = container_of(fi_rndis, struct f_rndis_opts,
368 func_inst);
369#ifndef CONFIG_USB_FUNCTIONFS_ETH
370 net = rndis_opts->net;
371#endif
372 }
373#endif
337 374
338 ENTER(); 375#if defined CONFIG_USB_FUNCTIONFS_ETH || defined CONFIG_USB_FUNCTIONFS_RNDIS
339 mutex_lock(&gfs_lock); 376 gether_set_qmult(net, qmult);
377 if (!gether_set_host_addr(net, host_addr))
378 pr_info("using host ethernet address: %s", host_addr);
379 if (!gether_set_dev_addr(net, dev_addr))
380 pr_info("using self ethernet address: %s", dev_addr);
381#endif
340 382
341 ffs_dev = ffs_data->private_data; 383#if defined CONFIG_USB_FUNCTIONFS_RNDIS && defined CONFIG_USB_FUNCTIONFS_ETH
342 if (ffs_dev) 384 gether_set_gadget(net, cdev->gadget);
343 ffs_dev->mounted = false; 385 ret = gether_register_netdev(net);
386 if (ret)
387 goto error_rndis;
344 388
345 mutex_unlock(&gfs_lock); 389 if (can_support_ecm(cdev->gadget)) {
346} 390 struct f_ecm_opts *ecm_opts;
347 391
348/* 392 ecm_opts = container_of(fi_ecm, struct f_ecm_opts, func_inst);
349 * It is assumed that gfs_bind is called from a context where gfs_lock is held 393 ecm_opts->bound = true;
350 */ 394 } else {
351static int gfs_bind(struct usb_composite_dev *cdev) 395 struct f_gether_opts *geth_opts;
352{
353 int ret, i;
354 396
355 ENTER(); 397 geth_opts = container_of(fi_geth, struct f_gether_opts,
398 func_inst);
399 geth_opts->bound = true;
400 }
356 401
357 if (missing_funcs) 402 rndis_borrow_net(fi_rndis, net);
358 return -ENODEV;
359#if defined CONFIG_USB_FUNCTIONFS_ETH || defined CONFIG_USB_FUNCTIONFS_RNDIS
360 the_dev = gether_setup(cdev->gadget, dev_addr, host_addr, gfs_host_mac,
361 qmult);
362#endif 403#endif
363 if (IS_ERR(the_dev)) {
364 ret = PTR_ERR(the_dev);
365 goto error_quick;
366 }
367 gfs_ether_setup = true;
368 404
405 /* TODO: gstrings_attach? */
369 ret = usb_string_ids_tab(cdev, gfs_strings); 406 ret = usb_string_ids_tab(cdev, gfs_strings);
370 if (unlikely(ret < 0)) 407 if (unlikely(ret < 0))
371 goto error; 408 goto error_rndis;
372 gfs_dev_desc.iProduct = gfs_strings[USB_GADGET_PRODUCT_IDX].id; 409 gfs_dev_desc.iProduct = gfs_strings[USB_GADGET_PRODUCT_IDX].id;
373 410
374 for (i = func_num; i--; ) {
375 ret = functionfs_bind(ffs_tab[i].ffs_data, cdev);
376 if (unlikely(ret < 0)) {
377 while (++i < func_num)
378 functionfs_unbind(ffs_tab[i].ffs_data);
379 goto error;
380 }
381 }
382
383 for (i = 0; i < ARRAY_SIZE(gfs_configurations); ++i) { 411 for (i = 0; i < ARRAY_SIZE(gfs_configurations); ++i) {
384 struct gfs_configuration *c = gfs_configurations + i; 412 struct gfs_configuration *c = gfs_configurations + i;
385 int sid = USB_GADGET_FIRST_AVAIL_IDX + i; 413 int sid = USB_GADGET_FIRST_AVAIL_IDX + i;
@@ -389,6 +417,8 @@ static int gfs_bind(struct usb_composite_dev *cdev)
389 c->c.bConfigurationValue = 1 + i; 417 c->c.bConfigurationValue = 1 + i;
390 c->c.bmAttributes = USB_CONFIG_ATT_SELFPOWER; 418 c->c.bmAttributes = USB_CONFIG_ATT_SELFPOWER;
391 419
420 c->num = i;
421
392 ret = usb_add_config(cdev, &c->c, gfs_do_config); 422 ret = usb_add_config(cdev, &c->c, gfs_do_config);
393 if (unlikely(ret < 0)) 423 if (unlikely(ret < 0))
394 goto error_unbind; 424 goto error_unbind;
@@ -396,18 +426,24 @@ static int gfs_bind(struct usb_composite_dev *cdev)
396 usb_composite_overwrite_options(cdev, &coverwrite); 426 usb_composite_overwrite_options(cdev, &coverwrite);
397 return 0; 427 return 0;
398 428
429/* TODO */
399error_unbind: 430error_unbind:
400 for (i = 0; i < func_num; i++) 431error_rndis:
401 functionfs_unbind(ffs_tab[i].ffs_data); 432#ifdef CONFIG_USB_FUNCTIONFS_RNDIS
433 usb_put_function_instance(fi_rndis);
402error: 434error:
403 gether_cleanup(the_dev); 435#endif
404error_quick: 436#if defined CONFIG_USB_FUNCTIONFS_ETH
405 gfs_ether_setup = false; 437 if (can_support_ecm(cdev->gadget))
438 usb_put_function_instance(fi_ecm);
439 else
440 usb_put_function_instance(fi_geth);
441#endif
406 return ret; 442 return ret;
407} 443}
408 444
409/* 445/*
410 * It is assumed that gfs_unbind is called from a context where gfs_lock is held 446 * It is assumed that gfs_unbind is called from a context where ffs_lock is held
411 */ 447 */
412static int gfs_unbind(struct usb_composite_dev *cdev) 448static int gfs_unbind(struct usb_composite_dev *cdev)
413{ 449{
@@ -415,28 +451,30 @@ static int gfs_unbind(struct usb_composite_dev *cdev)
415 451
416 ENTER(); 452 ENTER();
417 453
418 /*
419 * We may have been called in an error recovery from
420 * composite_bind() after gfs_unbind() failure so we need to
421 * check if gfs_ffs_data is not NULL since gfs_bind() handles
422 * all error recovery itself. I'd rather we werent called
423 * from composite on orror recovery, but what you're gonna
424 * do...?
425 */
426 if (gfs_ether_setup)
427 gether_cleanup(the_dev);
428 gfs_ether_setup = false;
429 454
430 for (i = func_num; i--; ) 455#ifdef CONFIG_USB_FUNCTIONFS_RNDIS
431 if (ffs_tab[i].ffs_data) 456 usb_put_function(f_rndis);
432 functionfs_unbind(ffs_tab[i].ffs_data); 457 usb_put_function_instance(fi_rndis);
458#endif
459
460#if defined CONFIG_USB_FUNCTIONFS_ETH
461 if (can_support_ecm(cdev->gadget)) {
462 usb_put_function(f_ecm);
463 usb_put_function_instance(fi_ecm);
464 } else {
465 usb_put_function(f_geth);
466 usb_put_function_instance(fi_geth);
467 }
468#endif
469 for (i = 0; i < N_CONF * func_num; ++i)
470 usb_put_function(*(f_ffs[0] + i));
433 471
434 return 0; 472 return 0;
435} 473}
436 474
437/* 475/*
438 * It is assumed that gfs_do_config is called from a context where 476 * It is assumed that gfs_do_config is called from a context where
439 * gfs_lock is held 477 * ffs_lock is held
440 */ 478 */
441static int gfs_do_config(struct usb_configuration *c) 479static int gfs_do_config(struct usb_configuration *c)
442{ 480{
@@ -454,15 +492,22 @@ static int gfs_do_config(struct usb_configuration *c)
454 } 492 }
455 493
456 if (gc->eth) { 494 if (gc->eth) {
457 ret = gc->eth(c, gfs_host_mac, the_dev); 495 ret = gc->eth(c);
458 if (unlikely(ret < 0)) 496 if (unlikely(ret < 0))
459 return ret; 497 return ret;
460 } 498 }
461 499
462 for (i = 0; i < func_num; i++) { 500 for (i = 0; i < func_num; i++) {
463 ret = functionfs_bind_config(c->cdev, c, ffs_tab[i].ffs_data); 501 f_ffs[gc->num][i] = usb_get_function(fi_ffs[i]);
464 if (unlikely(ret < 0)) 502 if (IS_ERR(f_ffs[gc->num][i])) {
465 return ret; 503 ret = PTR_ERR(f_ffs[gc->num][i]);
504 goto error;
505 }
506 ret = usb_add_function(c, f_ffs[gc->num][i]);
507 if (ret < 0) {
508 usb_put_function(f_ffs[gc->num][i]);
509 goto error;
510 }
466 } 511 }
467 512
468 /* 513 /*
@@ -479,16 +524,59 @@ static int gfs_do_config(struct usb_configuration *c)
479 c->interface[c->next_interface_id] = NULL; 524 c->interface[c->next_interface_id] = NULL;
480 525
481 return 0; 526 return 0;
527error:
528 while (--i >= 0) {
529 if (!IS_ERR(f_ffs[gc->num][i]))
530 usb_remove_function(c, f_ffs[gc->num][i]);
531 usb_put_function(f_ffs[gc->num][i]);
532 }
533 return ret;
482} 534}
483 535
484#ifdef CONFIG_USB_FUNCTIONFS_ETH 536#ifdef CONFIG_USB_FUNCTIONFS_ETH
485 537
486static int eth_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN], 538static int eth_bind_config(struct usb_configuration *c)
487 struct eth_dev *dev) 539{
540 int status = 0;
541
542 if (can_support_ecm(c->cdev->gadget)) {
543 f_ecm = usb_get_function(fi_ecm);
544 if (IS_ERR(f_ecm))
545 return PTR_ERR(f_ecm);
546
547 status = usb_add_function(c, f_ecm);
548 if (status < 0)
549 usb_put_function(f_ecm);
550
551 } else {
552 f_geth = usb_get_function(fi_geth);
553 if (IS_ERR(f_geth))
554 return PTR_ERR(f_geth);
555
556 status = usb_add_function(c, f_geth);
557 if (status < 0)
558 usb_put_function(f_geth);
559 }
560 return status;
561}
562
563#endif
564
565#ifdef CONFIG_USB_FUNCTIONFS_RNDIS
566
567static int bind_rndis_config(struct usb_configuration *c)
488{ 568{
489 return can_support_ecm(c->cdev->gadget) 569 int status = 0;
490 ? ecm_bind_config(c, ethaddr, dev) 570
491 : geth_bind_config(c, ethaddr, dev); 571 f_rndis = usb_get_function(fi_rndis);
572 if (IS_ERR(f_rndis))
573 return PTR_ERR(f_rndis);
574
575 status = usb_add_function(c, f_rndis);
576 if (status < 0)
577 usb_put_function(f_rndis);
578
579 return status;
492} 580}
493 581
494#endif 582#endif
diff --git a/drivers/usb/gadget/g_zero.h b/drivers/usb/gadget/g_zero.h
index ef3e8515272b..15f180904f8a 100644
--- a/drivers/usb/gadget/g_zero.h
+++ b/drivers/usb/gadget/g_zero.h
@@ -6,6 +6,11 @@
6#ifndef __G_ZERO_H 6#ifndef __G_ZERO_H
7#define __G_ZERO_H 7#define __G_ZERO_H
8 8
9#define GZERO_BULK_BUFLEN 4096
10#define GZERO_QLEN 32
11#define GZERO_ISOC_INTERVAL 4
12#define GZERO_ISOC_MAXPACKET 1024
13
9struct usb_zero_options { 14struct usb_zero_options {
10 unsigned pattern; 15 unsigned pattern;
11 unsigned isoc_interval; 16 unsigned isoc_interval;
@@ -24,19 +29,36 @@ struct f_ss_opts {
24 unsigned isoc_mult; 29 unsigned isoc_mult;
25 unsigned isoc_maxburst; 30 unsigned isoc_maxburst;
26 unsigned bulk_buflen; 31 unsigned bulk_buflen;
32
33 /*
34 * Read/write access to configfs attributes is handled by configfs.
35 *
36 * This is to protect the data from concurrent access by read/write
37 * and create symlink/remove symlink.
38 */
39 struct mutex lock;
40 int refcnt;
27}; 41};
28 42
29struct f_lb_opts { 43struct f_lb_opts {
30 struct usb_function_instance func_inst; 44 struct usb_function_instance func_inst;
31 unsigned bulk_buflen; 45 unsigned bulk_buflen;
32 unsigned qlen; 46 unsigned qlen;
47
48 /*
49 * Read/write access to configfs attributes is handled by configfs.
50 *
51 * This is to protect the data from concurrent access by read/write
52 * and create symlink/remove symlink.
53 */
54 struct mutex lock;
55 int refcnt;
33}; 56};
34 57
35void lb_modexit(void); 58void lb_modexit(void);
36int lb_modinit(void); 59int lb_modinit(void);
37 60
38/* common utilities */ 61/* common utilities */
39struct usb_request *alloc_ep_req(struct usb_ep *ep, int len);
40void free_ep_req(struct usb_ep *ep, struct usb_request *req); 62void free_ep_req(struct usb_ep *ep, struct usb_request *req);
41void disable_endpoints(struct usb_composite_dev *cdev, 63void disable_endpoints(struct usb_composite_dev *cdev,
42 struct usb_ep *in, struct usb_ep *out, 64 struct usb_ep *in, struct usb_ep *out,
diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c
index f82768015715..6c85839e15ad 100644
--- a/drivers/usb/gadget/goku_udc.c
+++ b/drivers/usb/gadget/goku_udc.c
@@ -30,7 +30,6 @@
30#include <linux/ioport.h> 30#include <linux/ioport.h>
31#include <linux/slab.h> 31#include <linux/slab.h>
32#include <linux/errno.h> 32#include <linux/errno.h>
33#include <linux/init.h>
34#include <linux/timer.h> 33#include <linux/timer.h>
35#include <linux/list.h> 34#include <linux/list.h>
36#include <linux/interrupt.h> 35#include <linux/interrupt.h>
@@ -231,7 +230,7 @@ static void ep_reset(struct goku_udc_regs __iomem *regs, struct goku_ep *ep)
231 } 230 }
232 } 231 }
233 232
234 ep->ep.maxpacket = MAX_FIFO_SIZE; 233 usb_ep_set_maxpacket_limit(&ep->ep, MAX_FIFO_SIZE);
235 ep->ep.desc = NULL; 234 ep->ep.desc = NULL;
236 ep->stopped = 1; 235 ep->stopped = 1;
237 ep->irqs = 0; 236 ep->irqs = 0;
@@ -1251,7 +1250,7 @@ static void udc_reinit (struct goku_udc *dev)
1251 } 1250 }
1252 1251
1253 dev->ep[0].reg_mode = NULL; 1252 dev->ep[0].reg_mode = NULL;
1254 dev->ep[0].ep.maxpacket = MAX_EP0_SIZE; 1253 usb_ep_set_maxpacket_limit(&dev->ep[0].ep, MAX_EP0_SIZE);
1255 list_del_init (&dev->ep[0].ep.ep_list); 1254 list_del_init (&dev->ep[0].ep.ep_list);
1256} 1255}
1257 1256
@@ -1350,16 +1349,12 @@ static int goku_udc_start(struct usb_gadget *g,
1350 return 0; 1349 return 0;
1351} 1350}
1352 1351
1353static void 1352static void stop_activity(struct goku_udc *dev)
1354stop_activity(struct goku_udc *dev, struct usb_gadget_driver *driver)
1355{ 1353{
1356 unsigned i; 1354 unsigned i;
1357 1355
1358 DBG (dev, "%s\n", __func__); 1356 DBG (dev, "%s\n", __func__);
1359 1357
1360 if (dev->gadget.speed == USB_SPEED_UNKNOWN)
1361 driver = NULL;
1362
1363 /* disconnect gadget driver after quiesceing hw and the driver */ 1358 /* disconnect gadget driver after quiesceing hw and the driver */
1364 udc_reset (dev); 1359 udc_reset (dev);
1365 for (i = 0; i < 4; i++) 1360 for (i = 0; i < 4; i++)
@@ -1377,7 +1372,7 @@ static int goku_udc_stop(struct usb_gadget *g,
1377 1372
1378 spin_lock_irqsave(&dev->lock, flags); 1373 spin_lock_irqsave(&dev->lock, flags);
1379 dev->driver = NULL; 1374 dev->driver = NULL;
1380 stop_activity(dev, driver); 1375 stop_activity(dev);
1381 spin_unlock_irqrestore(&dev->lock, flags); 1376 spin_unlock_irqrestore(&dev->lock, flags);
1382 1377
1383 return 0; 1378 return 0;
@@ -1521,7 +1516,7 @@ rescan:
1521 if (unlikely(stat & INT_DEVWIDE)) { 1516 if (unlikely(stat & INT_DEVWIDE)) {
1522 if (stat & INT_SYSERROR) { 1517 if (stat & INT_SYSERROR) {
1523 ERROR(dev, "system error\n"); 1518 ERROR(dev, "system error\n");
1524 stop_activity(dev, dev->driver); 1519 stop_activity(dev);
1525 stat = 0; 1520 stat = 0;
1526 handled = 1; 1521 handled = 1;
1527 // FIXME have a neater way to prevent re-enumeration 1522 // FIXME have a neater way to prevent re-enumeration
@@ -1536,7 +1531,7 @@ rescan:
1536 } else { 1531 } else {
1537 DBG(dev, "disconnect\n"); 1532 DBG(dev, "disconnect\n");
1538 if (dev->gadget.speed == USB_SPEED_FULL) 1533 if (dev->gadget.speed == USB_SPEED_FULL)
1539 stop_activity(dev, dev->driver); 1534 stop_activity(dev);
1540 dev->ep0state = EP0_DISCONNECT; 1535 dev->ep0state = EP0_DISCONNECT;
1541 dev->int_enable = INT_DEVWIDE; 1536 dev->int_enable = INT_DEVWIDE;
1542 writel(dev->int_enable, &dev->regs->int_enable); 1537 writel(dev->int_enable, &dev->regs->int_enable);
diff --git a/drivers/usb/gadget/gr_udc.c b/drivers/usb/gadget/gr_udc.c
new file mode 100644
index 000000000000..914cbd84ee40
--- /dev/null
+++ b/drivers/usb/gadget/gr_udc.c
@@ -0,0 +1,2238 @@
1/*
2 * USB Peripheral Controller driver for Aeroflex Gaisler GRUSBDC.
3 *
4 * 2013 (c) Aeroflex Gaisler AB
5 *
6 * This driver supports GRUSBDC USB Device Controller cores available in the
7 * GRLIB VHDL IP core library.
8 *
9 * Full documentation of the GRUSBDC core can be found here:
10 * http://www.gaisler.com/products/grlib/grip.pdf
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 *
17 * Contributors:
18 * - Andreas Larsson <andreas@gaisler.com>
19 * - Marko Isomaki
20 */
21
22/*
23 * A GRUSBDC core can have up to 16 IN endpoints and 16 OUT endpoints each
24 * individually configurable to any of the four USB transfer types. This driver
25 * only supports cores in DMA mode.
26 */
27
28#include <linux/kernel.h>
29#include <linux/module.h>
30#include <linux/slab.h>
31#include <linux/spinlock.h>
32#include <linux/errno.h>
33#include <linux/list.h>
34#include <linux/interrupt.h>
35#include <linux/device.h>
36#include <linux/usb/ch9.h>
37#include <linux/usb/gadget.h>
38#include <linux/dma-mapping.h>
39#include <linux/dmapool.h>
40#include <linux/debugfs.h>
41#include <linux/seq_file.h>
42#include <linux/of_platform.h>
43#include <linux/of_irq.h>
44#include <linux/of_address.h>
45
46#include <asm/byteorder.h>
47
48#include "gr_udc.h"
49
50#define DRIVER_NAME "gr_udc"
51#define DRIVER_DESC "Aeroflex Gaisler GRUSBDC USB Peripheral Controller"
52
53static const char driver_name[] = DRIVER_NAME;
54static const char driver_desc[] = DRIVER_DESC;
55
56#define gr_read32(x) (ioread32be((x)))
57#define gr_write32(x, v) (iowrite32be((v), (x)))
58
59/* USB speed and corresponding string calculated from status register value */
60#define GR_SPEED(status) \
61 ((status & GR_STATUS_SP) ? USB_SPEED_FULL : USB_SPEED_HIGH)
62#define GR_SPEED_STR(status) usb_speed_string(GR_SPEED(status))
63
64/* Size of hardware buffer calculated from epctrl register value */
65#define GR_BUFFER_SIZE(epctrl) \
66 ((((epctrl) & GR_EPCTRL_BUFSZ_MASK) >> GR_EPCTRL_BUFSZ_POS) * \
67 GR_EPCTRL_BUFSZ_SCALER)
68
69/* ---------------------------------------------------------------------- */
70/* Debug printout functionality */
71
72static const char * const gr_modestring[] = {"control", "iso", "bulk", "int"};
73
74static const char *gr_ep0state_string(enum gr_ep0state state)
75{
76 static const char *const names[] = {
77 [GR_EP0_DISCONNECT] = "disconnect",
78 [GR_EP0_SETUP] = "setup",
79 [GR_EP0_IDATA] = "idata",
80 [GR_EP0_ODATA] = "odata",
81 [GR_EP0_ISTATUS] = "istatus",
82 [GR_EP0_OSTATUS] = "ostatus",
83 [GR_EP0_STALL] = "stall",
84 [GR_EP0_SUSPEND] = "suspend",
85 };
86
87 if (state < 0 || state >= ARRAY_SIZE(names))
88 return "UNKNOWN";
89
90 return names[state];
91}
92
93#ifdef VERBOSE_DEBUG
94
95static void gr_dbgprint_request(const char *str, struct gr_ep *ep,
96 struct gr_request *req)
97{
98 int buflen = ep->is_in ? req->req.length : req->req.actual;
99 int rowlen = 32;
100 int plen = min(rowlen, buflen);
101
102 dev_dbg(ep->dev->dev, "%s: 0x%p, %d bytes data%s:\n", str, req, buflen,
103 (buflen > plen ? " (truncated)" : ""));
104 print_hex_dump_debug(" ", DUMP_PREFIX_NONE,
105 rowlen, 4, req->req.buf, plen, false);
106}
107
108static void gr_dbgprint_devreq(struct gr_udc *dev, u8 type, u8 request,
109 u16 value, u16 index, u16 length)
110{
111 dev_vdbg(dev->dev, "REQ: %02x.%02x v%04x i%04x l%04x\n",
112 type, request, value, index, length);
113}
114#else /* !VERBOSE_DEBUG */
115
116static void gr_dbgprint_request(const char *str, struct gr_ep *ep,
117 struct gr_request *req) {}
118
119static void gr_dbgprint_devreq(struct gr_udc *dev, u8 type, u8 request,
120 u16 value, u16 index, u16 length) {}
121
122#endif /* VERBOSE_DEBUG */
123
124/* ---------------------------------------------------------------------- */
125/* Debugfs functionality */
126
127#ifdef CONFIG_USB_GADGET_DEBUG_FS
128
129static void gr_seq_ep_show(struct seq_file *seq, struct gr_ep *ep)
130{
131 u32 epctrl = gr_read32(&ep->regs->epctrl);
132 u32 epstat = gr_read32(&ep->regs->epstat);
133 int mode = (epctrl & GR_EPCTRL_TT_MASK) >> GR_EPCTRL_TT_POS;
134 struct gr_request *req;
135
136 seq_printf(seq, "%s:\n", ep->ep.name);
137 seq_printf(seq, " mode = %s\n", gr_modestring[mode]);
138 seq_printf(seq, " halted: %d\n", !!(epctrl & GR_EPCTRL_EH));
139 seq_printf(seq, " disabled: %d\n", !!(epctrl & GR_EPCTRL_ED));
140 seq_printf(seq, " valid: %d\n", !!(epctrl & GR_EPCTRL_EV));
141 seq_printf(seq, " dma_start = %d\n", ep->dma_start);
142 seq_printf(seq, " stopped = %d\n", ep->stopped);
143 seq_printf(seq, " wedged = %d\n", ep->wedged);
144 seq_printf(seq, " callback = %d\n", ep->callback);
145 seq_printf(seq, " maxpacket = %d\n", ep->ep.maxpacket);
146 seq_printf(seq, " bytes_per_buffer = %d\n", ep->bytes_per_buffer);
147 if (mode == 1 || mode == 3)
148 seq_printf(seq, " nt = %d\n",
149 (epctrl & GR_EPCTRL_NT_MASK) >> GR_EPCTRL_NT_POS);
150
151 seq_printf(seq, " Buffer 0: %s %s%d\n",
152 epstat & GR_EPSTAT_B0 ? "valid" : "invalid",
153 epstat & GR_EPSTAT_BS ? " " : "selected ",
154 (epstat & GR_EPSTAT_B0CNT_MASK) >> GR_EPSTAT_B0CNT_POS);
155 seq_printf(seq, " Buffer 1: %s %s%d\n",
156 epstat & GR_EPSTAT_B1 ? "valid" : "invalid",
157 epstat & GR_EPSTAT_BS ? "selected " : " ",
158 (epstat & GR_EPSTAT_B1CNT_MASK) >> GR_EPSTAT_B1CNT_POS);
159
160 if (list_empty(&ep->queue)) {
161 seq_puts(seq, " Queue: empty\n\n");
162 return;
163 }
164
165 seq_puts(seq, " Queue:\n");
166 list_for_each_entry(req, &ep->queue, queue) {
167 struct gr_dma_desc *desc;
168 struct gr_dma_desc *next;
169
170 seq_printf(seq, " 0x%p: 0x%p %d %d\n", req,
171 &req->req.buf, req->req.actual, req->req.length);
172
173 next = req->first_desc;
174 do {
175 desc = next;
176 next = desc->next_desc;
177 seq_printf(seq, " %c 0x%p (0x%08x): 0x%05x 0x%08x\n",
178 desc == req->curr_desc ? 'c' : ' ',
179 desc, desc->paddr, desc->ctrl, desc->data);
180 } while (desc != req->last_desc);
181 }
182 seq_puts(seq, "\n");
183}
184
185
186static int gr_seq_show(struct seq_file *seq, void *v)
187{
188 struct gr_udc *dev = seq->private;
189 u32 control = gr_read32(&dev->regs->control);
190 u32 status = gr_read32(&dev->regs->status);
191 struct gr_ep *ep;
192
193 seq_printf(seq, "usb state = %s\n",
194 usb_state_string(dev->gadget.state));
195 seq_printf(seq, "address = %d\n",
196 (control & GR_CONTROL_UA_MASK) >> GR_CONTROL_UA_POS);
197 seq_printf(seq, "speed = %s\n", GR_SPEED_STR(status));
198 seq_printf(seq, "ep0state = %s\n", gr_ep0state_string(dev->ep0state));
199 seq_printf(seq, "irq_enabled = %d\n", dev->irq_enabled);
200 seq_printf(seq, "remote_wakeup = %d\n", dev->remote_wakeup);
201 seq_printf(seq, "test_mode = %d\n", dev->test_mode);
202 seq_puts(seq, "\n");
203
204 list_for_each_entry(ep, &dev->ep_list, ep_list)
205 gr_seq_ep_show(seq, ep);
206
207 return 0;
208}
209
210static int gr_dfs_open(struct inode *inode, struct file *file)
211{
212 return single_open(file, gr_seq_show, inode->i_private);
213}
214
215static const struct file_operations gr_dfs_fops = {
216 .owner = THIS_MODULE,
217 .open = gr_dfs_open,
218 .read = seq_read,
219 .llseek = seq_lseek,
220 .release = single_release,
221};
222
223static void gr_dfs_create(struct gr_udc *dev)
224{
225 const char *name = "gr_udc_state";
226
227 dev->dfs_root = debugfs_create_dir(dev_name(dev->dev), NULL);
228 if (IS_ERR(dev->dfs_root)) {
229 dev_err(dev->dev, "Failed to create debugfs directory\n");
230 return;
231 }
232 dev->dfs_state = debugfs_create_file(name, 0444, dev->dfs_root,
233 dev, &gr_dfs_fops);
234 if (IS_ERR(dev->dfs_state))
235 dev_err(dev->dev, "Failed to create debugfs file %s\n", name);
236}
237
238static void gr_dfs_delete(struct gr_udc *dev)
239{
240 /* Handles NULL and ERR pointers internally */
241 debugfs_remove(dev->dfs_state);
242 debugfs_remove(dev->dfs_root);
243}
244
245#else /* !CONFIG_USB_GADGET_DEBUG_FS */
246
247static void gr_dfs_create(struct gr_udc *dev) {}
248static void gr_dfs_delete(struct gr_udc *dev) {}
249
250#endif /* CONFIG_USB_GADGET_DEBUG_FS */
251
252/* ---------------------------------------------------------------------- */
253/* DMA and request handling */
254
255/* Allocates a new struct gr_dma_desc, sets paddr and zeroes the rest */
256static struct gr_dma_desc *gr_alloc_dma_desc(struct gr_ep *ep, gfp_t gfp_flags)
257{
258 dma_addr_t paddr;
259 struct gr_dma_desc *dma_desc;
260
261 dma_desc = dma_pool_alloc(ep->dev->desc_pool, gfp_flags, &paddr);
262 if (!dma_desc) {
263 dev_err(ep->dev->dev, "Could not allocate from DMA pool\n");
264 return NULL;
265 }
266
267 memset(dma_desc, 0, sizeof(*dma_desc));
268 dma_desc->paddr = paddr;
269
270 return dma_desc;
271}
272
273static inline void gr_free_dma_desc(struct gr_udc *dev,
274 struct gr_dma_desc *desc)
275{
276 dma_pool_free(dev->desc_pool, desc, (dma_addr_t)desc->paddr);
277}
278
279/* Frees the chain of struct gr_dma_desc for the given request */
280static void gr_free_dma_desc_chain(struct gr_udc *dev, struct gr_request *req)
281{
282 struct gr_dma_desc *desc;
283 struct gr_dma_desc *next;
284
285 next = req->first_desc;
286 if (!next)
287 return;
288
289 do {
290 desc = next;
291 next = desc->next_desc;
292 gr_free_dma_desc(dev, desc);
293 } while (desc != req->last_desc);
294
295 req->first_desc = NULL;
296 req->curr_desc = NULL;
297 req->last_desc = NULL;
298}
299
300static void gr_ep0_setup(struct gr_udc *dev, struct gr_request *req);
301
302/*
303 * Frees allocated resources and calls the appropriate completion function/setup
304 * package handler for a finished request.
305 *
306 * Must be called with dev->lock held and irqs disabled.
307 */
308static void gr_finish_request(struct gr_ep *ep, struct gr_request *req,
309 int status)
310 __releases(&dev->lock)
311 __acquires(&dev->lock)
312{
313 struct gr_udc *dev;
314
315 list_del_init(&req->queue);
316
317 if (likely(req->req.status == -EINPROGRESS))
318 req->req.status = status;
319 else
320 status = req->req.status;
321
322 dev = ep->dev;
323 usb_gadget_unmap_request(&dev->gadget, &req->req, ep->is_in);
324 gr_free_dma_desc_chain(dev, req);
325
326 if (ep->is_in) /* For OUT, actual gets updated bit by bit */
327 req->req.actual = req->req.length;
328
329 if (!status) {
330 if (ep->is_in)
331 gr_dbgprint_request("SENT", ep, req);
332 else
333 gr_dbgprint_request("RECV", ep, req);
334 }
335
336 /* Prevent changes to ep->queue during callback */
337 ep->callback = 1;
338 if (req == dev->ep0reqo && !status) {
339 if (req->setup)
340 gr_ep0_setup(dev, req);
341 else
342 dev_err(dev->dev,
343 "Unexpected non setup packet on ep0in\n");
344 } else if (req->req.complete) {
345 spin_unlock(&dev->lock);
346
347 req->req.complete(&ep->ep, &req->req);
348
349 spin_lock(&dev->lock);
350 }
351 ep->callback = 0;
352}
353
354static struct usb_request *gr_alloc_request(struct usb_ep *_ep, gfp_t gfp_flags)
355{
356 struct gr_request *req;
357
358 req = kzalloc(sizeof(*req), gfp_flags);
359 if (!req)
360 return NULL;
361
362 INIT_LIST_HEAD(&req->queue);
363
364 return &req->req;
365}
366
367/*
368 * Starts DMA for endpoint ep if there are requests in the queue.
369 *
370 * Must be called with dev->lock held and with !ep->stopped.
371 */
372static void gr_start_dma(struct gr_ep *ep)
373{
374 struct gr_request *req;
375 u32 dmactrl;
376
377 if (list_empty(&ep->queue)) {
378 ep->dma_start = 0;
379 return;
380 }
381
382 req = list_first_entry(&ep->queue, struct gr_request, queue);
383
384 /* A descriptor should already have been allocated */
385 BUG_ON(!req->curr_desc);
386
387 wmb(); /* Make sure all is settled before handing it over to DMA */
388
389 /* Set the descriptor pointer in the hardware */
390 gr_write32(&ep->regs->dmaaddr, req->curr_desc->paddr);
391
392 /* Announce available descriptors */
393 dmactrl = gr_read32(&ep->regs->dmactrl);
394 gr_write32(&ep->regs->dmactrl, dmactrl | GR_DMACTRL_DA);
395
396 ep->dma_start = 1;
397}
398
399/*
400 * Finishes the first request in the ep's queue and, if available, starts the
401 * next request in queue.
402 *
403 * Must be called with dev->lock held, irqs disabled and with !ep->stopped.
404 */
405static void gr_dma_advance(struct gr_ep *ep, int status)
406{
407 struct gr_request *req;
408
409 req = list_first_entry(&ep->queue, struct gr_request, queue);
410 gr_finish_request(ep, req, status);
411 gr_start_dma(ep); /* Regardless of ep->dma_start */
412}
413
414/*
415 * Abort DMA for an endpoint. Sets the abort DMA bit which causes an ongoing DMA
416 * transfer to be canceled and clears GR_DMACTRL_DA.
417 *
418 * Must be called with dev->lock held.
419 */
420static void gr_abort_dma(struct gr_ep *ep)
421{
422 u32 dmactrl;
423
424 dmactrl = gr_read32(&ep->regs->dmactrl);
425 gr_write32(&ep->regs->dmactrl, dmactrl | GR_DMACTRL_AD);
426}
427
428/*
429 * Allocates and sets up a struct gr_dma_desc and putting it on the descriptor
430 * chain.
431 *
432 * Size is not used for OUT endpoints. Hardware can not be instructed to handle
433 * smaller buffer than MAXPL in the OUT direction.
434 */
435static int gr_add_dma_desc(struct gr_ep *ep, struct gr_request *req,
436 dma_addr_t data, unsigned size, gfp_t gfp_flags)
437{
438 struct gr_dma_desc *desc;
439
440 desc = gr_alloc_dma_desc(ep, gfp_flags);
441 if (!desc)
442 return -ENOMEM;
443
444 desc->data = data;
445 if (ep->is_in)
446 desc->ctrl =
447 (GR_DESC_IN_CTRL_LEN_MASK & size) | GR_DESC_IN_CTRL_EN;
448 else
449 desc->ctrl = GR_DESC_OUT_CTRL_IE;
450
451 if (!req->first_desc) {
452 req->first_desc = desc;
453 req->curr_desc = desc;
454 } else {
455 req->last_desc->next_desc = desc;
456 req->last_desc->next = desc->paddr;
457 req->last_desc->ctrl |= GR_DESC_OUT_CTRL_NX;
458 }
459 req->last_desc = desc;
460
461 return 0;
462}
463
464/*
465 * Sets up a chain of struct gr_dma_descriptors pointing to buffers that
466 * together covers req->req.length bytes of the buffer at DMA address
467 * req->req.dma for the OUT direction.
468 *
469 * The first descriptor in the chain is enabled, the rest disabled. The
470 * interrupt handler will later enable them one by one when needed so we can
471 * find out when the transfer is finished. For OUT endpoints, all descriptors
472 * therefore generate interrutps.
473 */
474static int gr_setup_out_desc_list(struct gr_ep *ep, struct gr_request *req,
475 gfp_t gfp_flags)
476{
477 u16 bytes_left; /* Bytes left to provide descriptors for */
478 u16 bytes_used; /* Bytes accommodated for */
479 int ret = 0;
480
481 req->first_desc = NULL; /* Signals that no allocation is done yet */
482 bytes_left = req->req.length;
483 bytes_used = 0;
484 while (bytes_left > 0) {
485 dma_addr_t start = req->req.dma + bytes_used;
486 u16 size = min(bytes_left, ep->bytes_per_buffer);
487
488 /* Should not happen however - gr_queue stops such lengths */
489 if (size < ep->bytes_per_buffer)
490 dev_warn(ep->dev->dev,
491 "Buffer overrun risk: %u < %u bytes/buffer\n",
492 size, ep->bytes_per_buffer);
493
494 ret = gr_add_dma_desc(ep, req, start, size, gfp_flags);
495 if (ret)
496 goto alloc_err;
497
498 bytes_left -= size;
499 bytes_used += size;
500 }
501
502 req->first_desc->ctrl |= GR_DESC_OUT_CTRL_EN;
503
504 return 0;
505
506alloc_err:
507 gr_free_dma_desc_chain(ep->dev, req);
508
509 return ret;
510}
511
512/*
513 * Sets up a chain of struct gr_dma_descriptors pointing to buffers that
514 * together covers req->req.length bytes of the buffer at DMA address
515 * req->req.dma for the IN direction.
516 *
517 * When more data is provided than the maximum payload size, the hardware splits
518 * this up into several payloads automatically. Moreover, ep->bytes_per_buffer
519 * is always set to a multiple of the maximum payload (restricted to the valid
520 * number of maximum payloads during high bandwidth isochronous or interrupt
521 * transfers)
522 *
523 * All descriptors are enabled from the beginning and we only generate an
524 * interrupt for the last one indicating that the entire request has been pushed
525 * to hardware.
526 */
527static int gr_setup_in_desc_list(struct gr_ep *ep, struct gr_request *req,
528 gfp_t gfp_flags)
529{
530 u16 bytes_left; /* Bytes left in req to provide descriptors for */
531 u16 bytes_used; /* Bytes in req accommodated for */
532 int ret = 0;
533
534 req->first_desc = NULL; /* Signals that no allocation is done yet */
535 bytes_left = req->req.length;
536 bytes_used = 0;
537 do { /* Allow for zero length packets */
538 dma_addr_t start = req->req.dma + bytes_used;
539 u16 size = min(bytes_left, ep->bytes_per_buffer);
540
541 ret = gr_add_dma_desc(ep, req, start, size, gfp_flags);
542 if (ret)
543 goto alloc_err;
544
545 bytes_left -= size;
546 bytes_used += size;
547 } while (bytes_left > 0);
548
549 /*
550 * Send an extra zero length packet to indicate that no more data is
551 * available when req->req.zero is set and the data length is even
552 * multiples of ep->ep.maxpacket.
553 */
554 if (req->req.zero && (req->req.length % ep->ep.maxpacket == 0)) {
555 ret = gr_add_dma_desc(ep, req, 0, 0, gfp_flags);
556 if (ret)
557 goto alloc_err;
558 }
559
560 /*
561 * For IN packets we only want to know when the last packet has been
562 * transmitted (not just put into internal buffers).
563 */
564 req->last_desc->ctrl |= GR_DESC_IN_CTRL_PI;
565
566 return 0;
567
568alloc_err:
569 gr_free_dma_desc_chain(ep->dev, req);
570
571 return ret;
572}
573
574/* Must be called with dev->lock held */
575static int gr_queue(struct gr_ep *ep, struct gr_request *req, gfp_t gfp_flags)
576{
577 struct gr_udc *dev = ep->dev;
578 int ret;
579
580 if (unlikely(!ep->ep.desc && ep->num != 0)) {
581 dev_err(dev->dev, "No ep descriptor for %s\n", ep->ep.name);
582 return -EINVAL;
583 }
584
585 if (unlikely(!req->req.buf || !list_empty(&req->queue))) {
586 dev_err(dev->dev,
587 "Invalid request for %s: buf=%p list_empty=%d\n",
588 ep->ep.name, req->req.buf, list_empty(&req->queue));
589 return -EINVAL;
590 }
591
592 /*
593 * The DMA controller can not handle smaller OUT buffers than
594 * maxpacket. It could lead to buffer overruns if unexpectedly long
595 * packet are received.
596 */
597 if (!ep->is_in && (req->req.length % ep->ep.maxpacket) != 0) {
598 dev_err(dev->dev,
599 "OUT request length %d is not multiple of maxpacket\n",
600 req->req.length);
601 return -EMSGSIZE;
602 }
603
604 if (unlikely(!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)) {
605 dev_err(dev->dev, "-ESHUTDOWN");
606 return -ESHUTDOWN;
607 }
608
609 /* Can't touch registers when suspended */
610 if (dev->ep0state == GR_EP0_SUSPEND) {
611 dev_err(dev->dev, "-EBUSY");
612 return -EBUSY;
613 }
614
615 /* Set up DMA mapping in case the caller didn't */
616 ret = usb_gadget_map_request(&dev->gadget, &req->req, ep->is_in);
617 if (ret) {
618 dev_err(dev->dev, "usb_gadget_map_request");
619 return ret;
620 }
621
622 if (ep->is_in)
623 ret = gr_setup_in_desc_list(ep, req, gfp_flags);
624 else
625 ret = gr_setup_out_desc_list(ep, req, gfp_flags);
626 if (ret)
627 return ret;
628
629 req->req.status = -EINPROGRESS;
630 req->req.actual = 0;
631 list_add_tail(&req->queue, &ep->queue);
632
633 /* Start DMA if not started, otherwise interrupt handler handles it */
634 if (!ep->dma_start && likely(!ep->stopped))
635 gr_start_dma(ep);
636
637 return 0;
638}
639
640/*
641 * Queue a request from within the driver.
642 *
643 * Must be called with dev->lock held.
644 */
645static inline int gr_queue_int(struct gr_ep *ep, struct gr_request *req,
646 gfp_t gfp_flags)
647{
648 if (ep->is_in)
649 gr_dbgprint_request("RESP", ep, req);
650
651 return gr_queue(ep, req, gfp_flags);
652}
653
654/* ---------------------------------------------------------------------- */
655/* General helper functions */
656
657/*
658 * Dequeue ALL requests.
659 *
660 * Must be called with dev->lock held and irqs disabled.
661 */
662static void gr_ep_nuke(struct gr_ep *ep)
663{
664 struct gr_request *req;
665
666 ep->stopped = 1;
667 ep->dma_start = 0;
668 gr_abort_dma(ep);
669
670 while (!list_empty(&ep->queue)) {
671 req = list_first_entry(&ep->queue, struct gr_request, queue);
672 gr_finish_request(ep, req, -ESHUTDOWN);
673 }
674}
675
676/*
677 * Reset the hardware state of this endpoint.
678 *
679 * Must be called with dev->lock held.
680 */
681static void gr_ep_reset(struct gr_ep *ep)
682{
683 gr_write32(&ep->regs->epctrl, 0);
684 gr_write32(&ep->regs->dmactrl, 0);
685
686 ep->ep.maxpacket = MAX_CTRL_PL_SIZE;
687 ep->ep.desc = NULL;
688 ep->stopped = 1;
689 ep->dma_start = 0;
690}
691
692/*
693 * Generate STALL on ep0in/out.
694 *
695 * Must be called with dev->lock held.
696 */
697static void gr_control_stall(struct gr_udc *dev)
698{
699 u32 epctrl;
700
701 epctrl = gr_read32(&dev->epo[0].regs->epctrl);
702 gr_write32(&dev->epo[0].regs->epctrl, epctrl | GR_EPCTRL_CS);
703 epctrl = gr_read32(&dev->epi[0].regs->epctrl);
704 gr_write32(&dev->epi[0].regs->epctrl, epctrl | GR_EPCTRL_CS);
705
706 dev->ep0state = GR_EP0_STALL;
707}
708
709/*
710 * Halts, halts and wedges, or clears halt for an endpoint.
711 *
712 * Must be called with dev->lock held.
713 */
714static int gr_ep_halt_wedge(struct gr_ep *ep, int halt, int wedge, int fromhost)
715{
716 u32 epctrl;
717 int retval = 0;
718
719 if (ep->num && !ep->ep.desc)
720 return -EINVAL;
721
722 if (ep->num && ep->ep.desc->bmAttributes == USB_ENDPOINT_XFER_ISOC)
723 return -EOPNOTSUPP;
724
725 /* Never actually halt ep0, and therefore never clear halt for ep0 */
726 if (!ep->num) {
727 if (halt && !fromhost) {
728 /* ep0 halt from gadget - generate protocol stall */
729 gr_control_stall(ep->dev);
730 dev_dbg(ep->dev->dev, "EP: stall ep0\n");
731 return 0;
732 }
733 return -EINVAL;
734 }
735
736 dev_dbg(ep->dev->dev, "EP: %s halt %s\n",
737 (halt ? (wedge ? "wedge" : "set") : "clear"), ep->ep.name);
738
739 epctrl = gr_read32(&ep->regs->epctrl);
740 if (halt) {
741 /* Set HALT */
742 gr_write32(&ep->regs->epctrl, epctrl | GR_EPCTRL_EH);
743 ep->stopped = 1;
744 if (wedge)
745 ep->wedged = 1;
746 } else {
747 gr_write32(&ep->regs->epctrl, epctrl & ~GR_EPCTRL_EH);
748 ep->stopped = 0;
749 ep->wedged = 0;
750
751 /* Things might have been queued up in the meantime */
752 if (!ep->dma_start)
753 gr_start_dma(ep);
754 }
755
756 return retval;
757}
758
759/* Must be called with dev->lock held */
760static inline void gr_set_ep0state(struct gr_udc *dev, enum gr_ep0state value)
761{
762 if (dev->ep0state != value)
763 dev_vdbg(dev->dev, "STATE: ep0state=%s\n",
764 gr_ep0state_string(value));
765 dev->ep0state = value;
766}
767
768/*
769 * Should only be called when endpoints can not generate interrupts.
770 *
771 * Must be called with dev->lock held.
772 */
773static void gr_disable_interrupts_and_pullup(struct gr_udc *dev)
774{
775 gr_write32(&dev->regs->control, 0);
776 wmb(); /* Make sure that we do not deny one of our interrupts */
777 dev->irq_enabled = 0;
778}
779
780/*
781 * Stop all device activity and disable data line pullup.
782 *
783 * Must be called with dev->lock held and irqs disabled.
784 */
785static void gr_stop_activity(struct gr_udc *dev)
786{
787 struct gr_ep *ep;
788
789 list_for_each_entry(ep, &dev->ep_list, ep_list)
790 gr_ep_nuke(ep);
791
792 gr_disable_interrupts_and_pullup(dev);
793
794 gr_set_ep0state(dev, GR_EP0_DISCONNECT);
795 usb_gadget_set_state(&dev->gadget, USB_STATE_NOTATTACHED);
796}
797
798/* ---------------------------------------------------------------------- */
799/* ep0 setup packet handling */
800
801static void gr_ep0_testmode_complete(struct usb_ep *_ep,
802 struct usb_request *_req)
803{
804 struct gr_ep *ep;
805 struct gr_udc *dev;
806 u32 control;
807
808 ep = container_of(_ep, struct gr_ep, ep);
809 dev = ep->dev;
810
811 spin_lock(&dev->lock);
812
813 control = gr_read32(&dev->regs->control);
814 control |= GR_CONTROL_TM | (dev->test_mode << GR_CONTROL_TS_POS);
815 gr_write32(&dev->regs->control, control);
816
817 spin_unlock(&dev->lock);
818}
819
820static void gr_ep0_dummy_complete(struct usb_ep *_ep, struct usb_request *_req)
821{
822 /* Nothing needs to be done here */
823}
824
825/*
826 * Queue a response on ep0in.
827 *
828 * Must be called with dev->lock held.
829 */
830static int gr_ep0_respond(struct gr_udc *dev, u8 *buf, int length,
831 void (*complete)(struct usb_ep *ep,
832 struct usb_request *req))
833{
834 u8 *reqbuf = dev->ep0reqi->req.buf;
835 int status;
836 int i;
837
838 for (i = 0; i < length; i++)
839 reqbuf[i] = buf[i];
840 dev->ep0reqi->req.length = length;
841 dev->ep0reqi->req.complete = complete;
842
843 status = gr_queue_int(&dev->epi[0], dev->ep0reqi, GFP_ATOMIC);
844 if (status < 0)
845 dev_err(dev->dev,
846 "Could not queue ep0in setup response: %d\n", status);
847
848 return status;
849}
850
851/*
852 * Queue a 2 byte response on ep0in.
853 *
854 * Must be called with dev->lock held.
855 */
856static inline int gr_ep0_respond_u16(struct gr_udc *dev, u16 response)
857{
858 __le16 le_response = cpu_to_le16(response);
859
860 return gr_ep0_respond(dev, (u8 *)&le_response, 2,
861 gr_ep0_dummy_complete);
862}
863
864/*
865 * Queue a ZLP response on ep0in.
866 *
867 * Must be called with dev->lock held.
868 */
869static inline int gr_ep0_respond_empty(struct gr_udc *dev)
870{
871 return gr_ep0_respond(dev, NULL, 0, gr_ep0_dummy_complete);
872}
873
874/*
875 * This is run when a SET_ADDRESS request is received. First writes
876 * the new address to the control register which is updated internally
877 * when the next IN packet is ACKED.
878 *
879 * Must be called with dev->lock held.
880 */
881static void gr_set_address(struct gr_udc *dev, u8 address)
882{
883 u32 control;
884
885 control = gr_read32(&dev->regs->control) & ~GR_CONTROL_UA_MASK;
886 control |= (address << GR_CONTROL_UA_POS) & GR_CONTROL_UA_MASK;
887 control |= GR_CONTROL_SU;
888 gr_write32(&dev->regs->control, control);
889}
890
891/*
892 * Returns negative for STALL, 0 for successful handling and positive for
893 * delegation.
894 *
895 * Must be called with dev->lock held.
896 */
897static int gr_device_request(struct gr_udc *dev, u8 type, u8 request,
898 u16 value, u16 index)
899{
900 u16 response;
901 u8 test;
902
903 switch (request) {
904 case USB_REQ_SET_ADDRESS:
905 dev_dbg(dev->dev, "STATUS: address %d\n", value & 0xff);
906 gr_set_address(dev, value & 0xff);
907 if (value)
908 usb_gadget_set_state(&dev->gadget, USB_STATE_ADDRESS);
909 else
910 usb_gadget_set_state(&dev->gadget, USB_STATE_DEFAULT);
911 return gr_ep0_respond_empty(dev);
912
913 case USB_REQ_GET_STATUS:
914 /* Self powered | remote wakeup */
915 response = 0x0001 | (dev->remote_wakeup ? 0x0002 : 0);
916 return gr_ep0_respond_u16(dev, response);
917
918 case USB_REQ_SET_FEATURE:
919 switch (value) {
920 case USB_DEVICE_REMOTE_WAKEUP:
921 /* Allow remote wakeup */
922 dev->remote_wakeup = 1;
923 return gr_ep0_respond_empty(dev);
924
925 case USB_DEVICE_TEST_MODE:
926 /* The hardware does not support TEST_FORCE_EN */
927 test = index >> 8;
928 if (test >= TEST_J && test <= TEST_PACKET) {
929 dev->test_mode = test;
930 return gr_ep0_respond(dev, NULL, 0,
931 gr_ep0_testmode_complete);
932 }
933 }
934 break;
935
936 case USB_REQ_CLEAR_FEATURE:
937 switch (value) {
938 case USB_DEVICE_REMOTE_WAKEUP:
939 /* Disallow remote wakeup */
940 dev->remote_wakeup = 0;
941 return gr_ep0_respond_empty(dev);
942 }
943 break;
944 }
945
946 return 1; /* Delegate the rest */
947}
948
949/*
950 * Returns negative for STALL, 0 for successful handling and positive for
951 * delegation.
952 *
953 * Must be called with dev->lock held.
954 */
955static int gr_interface_request(struct gr_udc *dev, u8 type, u8 request,
956 u16 value, u16 index)
957{
958 if (dev->gadget.state != USB_STATE_CONFIGURED)
959 return -1;
960
961 /*
962 * Should return STALL for invalid interfaces, but udc driver does not
963 * know anything about that. However, many gadget drivers do not handle
964 * GET_STATUS so we need to take care of that.
965 */
966
967 switch (request) {
968 case USB_REQ_GET_STATUS:
969 return gr_ep0_respond_u16(dev, 0x0000);
970
971 case USB_REQ_SET_FEATURE:
972 case USB_REQ_CLEAR_FEATURE:
973 /*
974 * No possible valid standard requests. Still let gadget drivers
975 * have a go at it.
976 */
977 break;
978 }
979
980 return 1; /* Delegate the rest */
981}
982
983/*
984 * Returns negative for STALL, 0 for successful handling and positive for
985 * delegation.
986 *
987 * Must be called with dev->lock held.
988 */
989static int gr_endpoint_request(struct gr_udc *dev, u8 type, u8 request,
990 u16 value, u16 index)
991{
992 struct gr_ep *ep;
993 int status;
994 int halted;
995 u8 epnum = index & USB_ENDPOINT_NUMBER_MASK;
996 u8 is_in = index & USB_ENDPOINT_DIR_MASK;
997
998 if ((is_in && epnum >= dev->nepi) || (!is_in && epnum >= dev->nepo))
999 return -1;
1000
1001 if (dev->gadget.state != USB_STATE_CONFIGURED && epnum != 0)
1002 return -1;
1003
1004 ep = (is_in ? &dev->epi[epnum] : &dev->epo[epnum]);
1005
1006 switch (request) {
1007 case USB_REQ_GET_STATUS:
1008 halted = gr_read32(&ep->regs->epctrl) & GR_EPCTRL_EH;
1009 return gr_ep0_respond_u16(dev, halted ? 0x0001 : 0);
1010
1011 case USB_REQ_SET_FEATURE:
1012 switch (value) {
1013 case USB_ENDPOINT_HALT:
1014 status = gr_ep_halt_wedge(ep, 1, 0, 1);
1015 if (status >= 0)
1016 status = gr_ep0_respond_empty(dev);
1017 return status;
1018 }
1019 break;
1020
1021 case USB_REQ_CLEAR_FEATURE:
1022 switch (value) {
1023 case USB_ENDPOINT_HALT:
1024 if (ep->wedged)
1025 return -1;
1026 status = gr_ep_halt_wedge(ep, 0, 0, 1);
1027 if (status >= 0)
1028 status = gr_ep0_respond_empty(dev);
1029 return status;
1030 }
1031 break;
1032 }
1033
1034 return 1; /* Delegate the rest */
1035}
1036
1037/* Must be called with dev->lock held */
1038static void gr_ep0out_requeue(struct gr_udc *dev)
1039{
1040 int ret = gr_queue_int(&dev->epo[0], dev->ep0reqo, GFP_ATOMIC);
1041
1042 if (ret)
1043 dev_err(dev->dev, "Could not queue ep0out setup request: %d\n",
1044 ret);
1045}
1046
1047/*
1048 * The main function dealing with setup requests on ep0.
1049 *
1050 * Must be called with dev->lock held and irqs disabled
1051 */
1052static void gr_ep0_setup(struct gr_udc *dev, struct gr_request *req)
1053 __releases(&dev->lock)
1054 __acquires(&dev->lock)
1055{
1056 union {
1057 struct usb_ctrlrequest ctrl;
1058 u8 raw[8];
1059 u32 word[2];
1060 } u;
1061 u8 type;
1062 u8 request;
1063 u16 value;
1064 u16 index;
1065 u16 length;
1066 int i;
1067 int status;
1068
1069 /* Restore from ep0 halt */
1070 if (dev->ep0state == GR_EP0_STALL) {
1071 gr_set_ep0state(dev, GR_EP0_SETUP);
1072 if (!req->req.actual)
1073 goto out;
1074 }
1075
1076 if (dev->ep0state == GR_EP0_ISTATUS) {
1077 gr_set_ep0state(dev, GR_EP0_SETUP);
1078 if (req->req.actual > 0)
1079 dev_dbg(dev->dev,
1080 "Unexpected setup packet at state %s\n",
1081 gr_ep0state_string(GR_EP0_ISTATUS));
1082 else
1083 goto out; /* Got expected ZLP */
1084 } else if (dev->ep0state != GR_EP0_SETUP) {
1085 dev_info(dev->dev,
1086 "Unexpected ep0out request at state %s - stalling\n",
1087 gr_ep0state_string(dev->ep0state));
1088 gr_control_stall(dev);
1089 gr_set_ep0state(dev, GR_EP0_SETUP);
1090 goto out;
1091 } else if (!req->req.actual) {
1092 dev_dbg(dev->dev, "Unexpected ZLP at state %s\n",
1093 gr_ep0state_string(dev->ep0state));
1094 goto out;
1095 }
1096
1097 /* Handle SETUP packet */
1098 for (i = 0; i < req->req.actual; i++)
1099 u.raw[i] = ((u8 *)req->req.buf)[i];
1100
1101 type = u.ctrl.bRequestType;
1102 request = u.ctrl.bRequest;
1103 value = le16_to_cpu(u.ctrl.wValue);
1104 index = le16_to_cpu(u.ctrl.wIndex);
1105 length = le16_to_cpu(u.ctrl.wLength);
1106
1107 gr_dbgprint_devreq(dev, type, request, value, index, length);
1108
1109 /* Check for data stage */
1110 if (length) {
1111 if (type & USB_DIR_IN)
1112 gr_set_ep0state(dev, GR_EP0_IDATA);
1113 else
1114 gr_set_ep0state(dev, GR_EP0_ODATA);
1115 }
1116
1117 status = 1; /* Positive status flags delegation */
1118 if ((type & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
1119 switch (type & USB_RECIP_MASK) {
1120 case USB_RECIP_DEVICE:
1121 status = gr_device_request(dev, type, request,
1122 value, index);
1123 break;
1124 case USB_RECIP_ENDPOINT:
1125 status = gr_endpoint_request(dev, type, request,
1126 value, index);
1127 break;
1128 case USB_RECIP_INTERFACE:
1129 status = gr_interface_request(dev, type, request,
1130 value, index);
1131 break;
1132 }
1133 }
1134
1135 if (status > 0) {
1136 spin_unlock(&dev->lock);
1137
1138 dev_vdbg(dev->dev, "DELEGATE\n");
1139 status = dev->driver->setup(&dev->gadget, &u.ctrl);
1140
1141 spin_lock(&dev->lock);
1142 }
1143
1144 /* Generate STALL on both ep0out and ep0in if requested */
1145 if (unlikely(status < 0)) {
1146 dev_vdbg(dev->dev, "STALL\n");
1147 gr_control_stall(dev);
1148 }
1149
1150 if ((type & USB_TYPE_MASK) == USB_TYPE_STANDARD &&
1151 request == USB_REQ_SET_CONFIGURATION) {
1152 if (!value) {
1153 dev_dbg(dev->dev, "STATUS: deconfigured\n");
1154 usb_gadget_set_state(&dev->gadget, USB_STATE_ADDRESS);
1155 } else if (status >= 0) {
1156 /* Not configured unless gadget OK:s it */
1157 dev_dbg(dev->dev, "STATUS: configured: %d\n", value);
1158 usb_gadget_set_state(&dev->gadget,
1159 USB_STATE_CONFIGURED);
1160 }
1161 }
1162
1163 /* Get ready for next stage */
1164 if (dev->ep0state == GR_EP0_ODATA)
1165 gr_set_ep0state(dev, GR_EP0_OSTATUS);
1166 else if (dev->ep0state == GR_EP0_IDATA)
1167 gr_set_ep0state(dev, GR_EP0_ISTATUS);
1168 else
1169 gr_set_ep0state(dev, GR_EP0_SETUP);
1170
1171out:
1172 gr_ep0out_requeue(dev);
1173}
1174
1175/* ---------------------------------------------------------------------- */
1176/* VBUS and USB reset handling */
1177
1178/* Must be called with dev->lock held and irqs disabled */
1179static void gr_vbus_connected(struct gr_udc *dev, u32 status)
1180{
1181 u32 control;
1182
1183 dev->gadget.speed = GR_SPEED(status);
1184 usb_gadget_set_state(&dev->gadget, USB_STATE_POWERED);
1185
1186 /* Turn on full interrupts and pullup */
1187 control = (GR_CONTROL_SI | GR_CONTROL_UI | GR_CONTROL_VI |
1188 GR_CONTROL_SP | GR_CONTROL_EP);
1189 gr_write32(&dev->regs->control, control);
1190}
1191
1192/* Must be called with dev->lock held */
1193static void gr_enable_vbus_detect(struct gr_udc *dev)
1194{
1195 u32 status;
1196
1197 dev->irq_enabled = 1;
1198 wmb(); /* Make sure we do not ignore an interrupt */
1199 gr_write32(&dev->regs->control, GR_CONTROL_VI);
1200
1201 /* Take care of the case we are already plugged in at this point */
1202 status = gr_read32(&dev->regs->status);
1203 if (status & GR_STATUS_VB)
1204 gr_vbus_connected(dev, status);
1205}
1206
1207/* Must be called with dev->lock held and irqs disabled */
1208static void gr_vbus_disconnected(struct gr_udc *dev)
1209{
1210 gr_stop_activity(dev);
1211
1212 /* Report disconnect */
1213 if (dev->driver && dev->driver->disconnect) {
1214 spin_unlock(&dev->lock);
1215
1216 dev->driver->disconnect(&dev->gadget);
1217
1218 spin_lock(&dev->lock);
1219 }
1220
1221 gr_enable_vbus_detect(dev);
1222}
1223
1224/* Must be called with dev->lock held and irqs disabled */
1225static void gr_udc_usbreset(struct gr_udc *dev, u32 status)
1226{
1227 gr_set_address(dev, 0);
1228 gr_set_ep0state(dev, GR_EP0_SETUP);
1229 usb_gadget_set_state(&dev->gadget, USB_STATE_DEFAULT);
1230 dev->gadget.speed = GR_SPEED(status);
1231
1232 gr_ep_nuke(&dev->epo[0]);
1233 gr_ep_nuke(&dev->epi[0]);
1234 dev->epo[0].stopped = 0;
1235 dev->epi[0].stopped = 0;
1236 gr_ep0out_requeue(dev);
1237}
1238
1239/* ---------------------------------------------------------------------- */
1240/* Irq handling */
1241
1242/*
1243 * Handles interrupts from in endpoints. Returns whether something was handled.
1244 *
1245 * Must be called with dev->lock held, irqs disabled and with !ep->stopped.
1246 */
1247static int gr_handle_in_ep(struct gr_ep *ep)
1248{
1249 struct gr_request *req;
1250
1251 req = list_first_entry(&ep->queue, struct gr_request, queue);
1252 if (!req->last_desc)
1253 return 0;
1254
1255 if (ACCESS_ONCE(req->last_desc->ctrl) & GR_DESC_IN_CTRL_EN)
1256 return 0; /* Not put in hardware buffers yet */
1257
1258 if (gr_read32(&ep->regs->epstat) & (GR_EPSTAT_B1 | GR_EPSTAT_B0))
1259 return 0; /* Not transmitted yet, still in hardware buffers */
1260
1261 /* Write complete */
1262 gr_dma_advance(ep, 0);
1263
1264 return 1;
1265}
1266
1267/*
1268 * Handles interrupts from out endpoints. Returns whether something was handled.
1269 *
1270 * Must be called with dev->lock held, irqs disabled and with !ep->stopped.
1271 */
1272static int gr_handle_out_ep(struct gr_ep *ep)
1273{
1274 u32 ep_dmactrl;
1275 u32 ctrl;
1276 u16 len;
1277 struct gr_request *req;
1278 struct gr_udc *dev = ep->dev;
1279
1280 req = list_first_entry(&ep->queue, struct gr_request, queue);
1281 if (!req->curr_desc)
1282 return 0;
1283
1284 ctrl = ACCESS_ONCE(req->curr_desc->ctrl);
1285 if (ctrl & GR_DESC_OUT_CTRL_EN)
1286 return 0; /* Not received yet */
1287
1288 /* Read complete */
1289 len = ctrl & GR_DESC_OUT_CTRL_LEN_MASK;
1290 req->req.actual += len;
1291 if (ctrl & GR_DESC_OUT_CTRL_SE)
1292 req->setup = 1;
1293
1294 if (len < ep->ep.maxpacket || req->req.actual == req->req.length) {
1295 /* Short packet or the expected size - we are done */
1296
1297 if ((ep == &dev->epo[0]) && (dev->ep0state == GR_EP0_OSTATUS)) {
1298 /*
1299 * Send a status stage ZLP to ack the DATA stage in the
1300 * OUT direction. This needs to be done before
1301 * gr_dma_advance as that can lead to a call to
1302 * ep0_setup that can change dev->ep0state.
1303 */
1304 gr_ep0_respond_empty(dev);
1305 gr_set_ep0state(dev, GR_EP0_SETUP);
1306 }
1307
1308 gr_dma_advance(ep, 0);
1309 } else {
1310 /* Not done yet. Enable the next descriptor to receive more. */
1311 req->curr_desc = req->curr_desc->next_desc;
1312 req->curr_desc->ctrl |= GR_DESC_OUT_CTRL_EN;
1313
1314 ep_dmactrl = gr_read32(&ep->regs->dmactrl);
1315 gr_write32(&ep->regs->dmactrl, ep_dmactrl | GR_DMACTRL_DA);
1316 }
1317
1318 return 1;
1319}
1320
1321/*
1322 * Handle state changes. Returns whether something was handled.
1323 *
1324 * Must be called with dev->lock held and irqs disabled.
1325 */
1326static int gr_handle_state_changes(struct gr_udc *dev)
1327{
1328 u32 status = gr_read32(&dev->regs->status);
1329 int handled = 0;
1330 int powstate = !(dev->gadget.state == USB_STATE_NOTATTACHED ||
1331 dev->gadget.state == USB_STATE_ATTACHED);
1332
1333 /* VBUS valid detected */
1334 if (!powstate && (status & GR_STATUS_VB)) {
1335 dev_dbg(dev->dev, "STATUS: vbus valid detected\n");
1336 gr_vbus_connected(dev, status);
1337 handled = 1;
1338 }
1339
1340 /* Disconnect */
1341 if (powstate && !(status & GR_STATUS_VB)) {
1342 dev_dbg(dev->dev, "STATUS: vbus invalid detected\n");
1343 gr_vbus_disconnected(dev);
1344 handled = 1;
1345 }
1346
1347 /* USB reset detected */
1348 if (status & GR_STATUS_UR) {
1349 dev_dbg(dev->dev, "STATUS: USB reset - speed is %s\n",
1350 GR_SPEED_STR(status));
1351 gr_write32(&dev->regs->status, GR_STATUS_UR);
1352 gr_udc_usbreset(dev, status);
1353 handled = 1;
1354 }
1355
1356 /* Speed change */
1357 if (dev->gadget.speed != GR_SPEED(status)) {
1358 dev_dbg(dev->dev, "STATUS: USB Speed change to %s\n",
1359 GR_SPEED_STR(status));
1360 dev->gadget.speed = GR_SPEED(status);
1361 handled = 1;
1362 }
1363
1364 /* Going into suspend */
1365 if ((dev->ep0state != GR_EP0_SUSPEND) && !(status & GR_STATUS_SU)) {
1366 dev_dbg(dev->dev, "STATUS: USB suspend\n");
1367 gr_set_ep0state(dev, GR_EP0_SUSPEND);
1368 dev->suspended_from = dev->gadget.state;
1369 usb_gadget_set_state(&dev->gadget, USB_STATE_SUSPENDED);
1370
1371 if ((dev->gadget.speed != USB_SPEED_UNKNOWN) &&
1372 dev->driver && dev->driver->suspend) {
1373 spin_unlock(&dev->lock);
1374
1375 dev->driver->suspend(&dev->gadget);
1376
1377 spin_lock(&dev->lock);
1378 }
1379 handled = 1;
1380 }
1381
1382 /* Coming out of suspend */
1383 if ((dev->ep0state == GR_EP0_SUSPEND) && (status & GR_STATUS_SU)) {
1384 dev_dbg(dev->dev, "STATUS: USB resume\n");
1385 if (dev->suspended_from == USB_STATE_POWERED)
1386 gr_set_ep0state(dev, GR_EP0_DISCONNECT);
1387 else
1388 gr_set_ep0state(dev, GR_EP0_SETUP);
1389 usb_gadget_set_state(&dev->gadget, dev->suspended_from);
1390
1391 if ((dev->gadget.speed != USB_SPEED_UNKNOWN) &&
1392 dev->driver && dev->driver->resume) {
1393 spin_unlock(&dev->lock);
1394
1395 dev->driver->resume(&dev->gadget);
1396
1397 spin_lock(&dev->lock);
1398 }
1399 handled = 1;
1400 }
1401
1402 return handled;
1403}
1404
1405/* Non-interrupt context irq handler */
1406static irqreturn_t gr_irq_handler(int irq, void *_dev)
1407{
1408 struct gr_udc *dev = _dev;
1409 struct gr_ep *ep;
1410 int handled = 0;
1411 int i;
1412 unsigned long flags;
1413
1414 spin_lock_irqsave(&dev->lock, flags);
1415
1416 if (!dev->irq_enabled)
1417 goto out;
1418
1419 /*
1420 * Check IN ep interrupts. We check these before the OUT eps because
1421 * some gadgets reuse the request that might already be currently
1422 * outstanding and needs to be completed (mainly setup requests).
1423 */
1424 for (i = 0; i < dev->nepi; i++) {
1425 ep = &dev->epi[i];
1426 if (!ep->stopped && !ep->callback && !list_empty(&ep->queue))
1427 handled = gr_handle_in_ep(ep) || handled;
1428 }
1429
1430 /* Check OUT ep interrupts */
1431 for (i = 0; i < dev->nepo; i++) {
1432 ep = &dev->epo[i];
1433 if (!ep->stopped && !ep->callback && !list_empty(&ep->queue))
1434 handled = gr_handle_out_ep(ep) || handled;
1435 }
1436
1437 /* Check status interrupts */
1438 handled = gr_handle_state_changes(dev) || handled;
1439
1440 /*
1441 * Check AMBA DMA errors. Only check if we didn't find anything else to
1442 * handle because this shouldn't happen if we did everything right.
1443 */
1444 if (!handled) {
1445 list_for_each_entry(ep, &dev->ep_list, ep_list) {
1446 if (gr_read32(&ep->regs->dmactrl) & GR_DMACTRL_AE) {
1447 dev_err(dev->dev,
1448 "AMBA Error occurred for %s\n",
1449 ep->ep.name);
1450 handled = 1;
1451 }
1452 }
1453 }
1454
1455out:
1456 spin_unlock_irqrestore(&dev->lock, flags);
1457
1458 return handled ? IRQ_HANDLED : IRQ_NONE;
1459}
1460
1461/* Interrupt context irq handler */
1462static irqreturn_t gr_irq(int irq, void *_dev)
1463{
1464 struct gr_udc *dev = _dev;
1465
1466 if (!dev->irq_enabled)
1467 return IRQ_NONE;
1468
1469 return IRQ_WAKE_THREAD;
1470}
1471
1472/* ---------------------------------------------------------------------- */
1473/* USB ep ops */
1474
1475/* Enable endpoint. Not for ep0in and ep0out that are handled separately. */
1476static int gr_ep_enable(struct usb_ep *_ep,
1477 const struct usb_endpoint_descriptor *desc)
1478{
1479 struct gr_udc *dev;
1480 struct gr_ep *ep;
1481 u8 mode;
1482 u8 nt;
1483 u16 max;
1484 u16 buffer_size = 0;
1485 u32 epctrl;
1486
1487 ep = container_of(_ep, struct gr_ep, ep);
1488 if (!_ep || !desc || desc->bDescriptorType != USB_DT_ENDPOINT)
1489 return -EINVAL;
1490
1491 dev = ep->dev;
1492
1493 /* 'ep0' IN and OUT are reserved */
1494 if (ep == &dev->epo[0] || ep == &dev->epi[0])
1495 return -EINVAL;
1496
1497 if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)
1498 return -ESHUTDOWN;
1499
1500 /* Make sure we are clear for enabling */
1501 epctrl = gr_read32(&ep->regs->epctrl);
1502 if (epctrl & GR_EPCTRL_EV)
1503 return -EBUSY;
1504
1505 /* Check that directions match */
1506 if (!ep->is_in != !usb_endpoint_dir_in(desc))
1507 return -EINVAL;
1508
1509 /* Check ep num */
1510 if ((!ep->is_in && ep->num >= dev->nepo) ||
1511 (ep->is_in && ep->num >= dev->nepi))
1512 return -EINVAL;
1513
1514 if (usb_endpoint_xfer_control(desc)) {
1515 mode = 0;
1516 } else if (usb_endpoint_xfer_isoc(desc)) {
1517 mode = 1;
1518 } else if (usb_endpoint_xfer_bulk(desc)) {
1519 mode = 2;
1520 } else if (usb_endpoint_xfer_int(desc)) {
1521 mode = 3;
1522 } else {
1523 dev_err(dev->dev, "Unknown transfer type for %s\n",
1524 ep->ep.name);
1525 return -EINVAL;
1526 }
1527
1528 /*
1529 * Bits 10-0 set the max payload. 12-11 set the number of
1530 * additional transactions.
1531 */
1532 max = 0x7ff & usb_endpoint_maxp(desc);
1533 nt = 0x3 & (usb_endpoint_maxp(desc) >> 11);
1534 buffer_size = GR_BUFFER_SIZE(epctrl);
1535 if (nt && (mode == 0 || mode == 2)) {
1536 dev_err(dev->dev,
1537 "%s mode: multiple trans./microframe not valid\n",
1538 (mode == 2 ? "Bulk" : "Control"));
1539 return -EINVAL;
1540 } else if (nt == 0x11) {
1541 dev_err(dev->dev, "Invalid value for trans./microframe\n");
1542 return -EINVAL;
1543 } else if ((nt + 1) * max > buffer_size) {
1544 dev_err(dev->dev, "Hw buffer size %d < max payload %d * %d\n",
1545 buffer_size, (nt + 1), max);
1546 return -EINVAL;
1547 } else if (max == 0) {
1548 dev_err(dev->dev, "Max payload cannot be set to 0\n");
1549 return -EINVAL;
1550 }
1551
1552 spin_lock(&ep->dev->lock);
1553
1554 if (!ep->stopped) {
1555 spin_unlock(&ep->dev->lock);
1556 return -EBUSY;
1557 }
1558
1559 ep->stopped = 0;
1560 ep->wedged = 0;
1561 ep->ep.desc = desc;
1562 ep->ep.maxpacket = max;
1563 ep->dma_start = 0;
1564
1565
1566 if (nt) {
1567 /*
1568 * Maximum possible size of all payloads in one microframe
1569 * regardless of direction when using high-bandwidth mode.
1570 */
1571 ep->bytes_per_buffer = (nt + 1) * max;
1572 } else if (ep->is_in) {
1573 /*
1574 * The biggest multiple of maximum packet size that fits into
1575 * the buffer. The hardware will split up into many packets in
1576 * the IN direction.
1577 */
1578 ep->bytes_per_buffer = (buffer_size / max) * max;
1579 } else {
1580 /*
1581 * Only single packets will be placed the buffers in the OUT
1582 * direction.
1583 */
1584 ep->bytes_per_buffer = max;
1585 }
1586
1587 epctrl = (max << GR_EPCTRL_MAXPL_POS)
1588 | (nt << GR_EPCTRL_NT_POS)
1589 | (mode << GR_EPCTRL_TT_POS)
1590 | GR_EPCTRL_EV;
1591 if (ep->is_in)
1592 epctrl |= GR_EPCTRL_PI;
1593 gr_write32(&ep->regs->epctrl, epctrl);
1594
1595 gr_write32(&ep->regs->dmactrl, GR_DMACTRL_IE | GR_DMACTRL_AI);
1596
1597 spin_unlock(&ep->dev->lock);
1598
1599 dev_dbg(ep->dev->dev, "EP: %s enabled - %s with %d bytes/buffer\n",
1600 ep->ep.name, gr_modestring[mode], ep->bytes_per_buffer);
1601 return 0;
1602}
1603
1604/* Disable endpoint. Not for ep0in and ep0out that are handled separately. */
1605static int gr_ep_disable(struct usb_ep *_ep)
1606{
1607 struct gr_ep *ep;
1608 struct gr_udc *dev;
1609 unsigned long flags;
1610
1611 ep = container_of(_ep, struct gr_ep, ep);
1612 if (!_ep || !ep->ep.desc)
1613 return -ENODEV;
1614
1615 dev = ep->dev;
1616
1617 /* 'ep0' IN and OUT are reserved */
1618 if (ep == &dev->epo[0] || ep == &dev->epi[0])
1619 return -EINVAL;
1620
1621 if (dev->ep0state == GR_EP0_SUSPEND)
1622 return -EBUSY;
1623
1624 dev_dbg(ep->dev->dev, "EP: disable %s\n", ep->ep.name);
1625
1626 spin_lock_irqsave(&dev->lock, flags);
1627
1628 gr_ep_nuke(ep);
1629 gr_ep_reset(ep);
1630 ep->ep.desc = NULL;
1631
1632 spin_unlock_irqrestore(&dev->lock, flags);
1633
1634 return 0;
1635}
1636
1637/*
1638 * Frees a request, but not any DMA buffers associated with it
1639 * (gr_finish_request should already have taken care of that).
1640 */
1641static void gr_free_request(struct usb_ep *_ep, struct usb_request *_req)
1642{
1643 struct gr_request *req;
1644
1645 if (!_ep || !_req)
1646 return;
1647 req = container_of(_req, struct gr_request, req);
1648
1649 /* Leads to memory leak */
1650 WARN(!list_empty(&req->queue),
1651 "request not dequeued properly before freeing\n");
1652
1653 kfree(req);
1654}
1655
1656/* Queue a request from the gadget */
1657static int gr_queue_ext(struct usb_ep *_ep, struct usb_request *_req,
1658 gfp_t gfp_flags)
1659{
1660 struct gr_ep *ep;
1661 struct gr_request *req;
1662 struct gr_udc *dev;
1663 int ret;
1664
1665 if (unlikely(!_ep || !_req))
1666 return -EINVAL;
1667
1668 ep = container_of(_ep, struct gr_ep, ep);
1669 req = container_of(_req, struct gr_request, req);
1670 dev = ep->dev;
1671
1672 spin_lock(&ep->dev->lock);
1673
1674 /*
1675 * The ep0 pointer in the gadget struct is used both for ep0in and
1676 * ep0out. In a data stage in the out direction ep0out needs to be used
1677 * instead of the default ep0in. Completion functions might use
1678 * driver_data, so that needs to be copied as well.
1679 */
1680 if ((ep == &dev->epi[0]) && (dev->ep0state == GR_EP0_ODATA)) {
1681 ep = &dev->epo[0];
1682 ep->ep.driver_data = dev->epi[0].ep.driver_data;
1683 }
1684
1685 if (ep->is_in)
1686 gr_dbgprint_request("EXTERN", ep, req);
1687
1688 ret = gr_queue(ep, req, gfp_flags);
1689
1690 spin_unlock(&ep->dev->lock);
1691
1692 return ret;
1693}
1694
1695/* Dequeue JUST ONE request */
1696static int gr_dequeue(struct usb_ep *_ep, struct usb_request *_req)
1697{
1698 struct gr_request *req;
1699 struct gr_ep *ep;
1700 struct gr_udc *dev;
1701 int ret = 0;
1702 unsigned long flags;
1703
1704 ep = container_of(_ep, struct gr_ep, ep);
1705 if (!_ep || !_req || (!ep->ep.desc && ep->num != 0))
1706 return -EINVAL;
1707 dev = ep->dev;
1708 if (!dev->driver)
1709 return -ESHUTDOWN;
1710
1711 /* We can't touch (DMA) registers when suspended */
1712 if (dev->ep0state == GR_EP0_SUSPEND)
1713 return -EBUSY;
1714
1715 spin_lock_irqsave(&dev->lock, flags);
1716
1717 /* Make sure it's actually queued on this endpoint */
1718 list_for_each_entry(req, &ep->queue, queue) {
1719 if (&req->req == _req)
1720 break;
1721 }
1722 if (&req->req != _req) {
1723 ret = -EINVAL;
1724 goto out;
1725 }
1726
1727 if (list_first_entry(&ep->queue, struct gr_request, queue) == req) {
1728 /* This request is currently being processed */
1729 gr_abort_dma(ep);
1730 if (ep->stopped)
1731 gr_finish_request(ep, req, -ECONNRESET);
1732 else
1733 gr_dma_advance(ep, -ECONNRESET);
1734 } else if (!list_empty(&req->queue)) {
1735 /* Not being processed - gr_finish_request dequeues it */
1736 gr_finish_request(ep, req, -ECONNRESET);
1737 } else {
1738 ret = -EOPNOTSUPP;
1739 }
1740
1741out:
1742 spin_unlock_irqrestore(&dev->lock, flags);
1743
1744 return ret;
1745}
1746
1747/* Helper for gr_set_halt and gr_set_wedge */
1748static int gr_set_halt_wedge(struct usb_ep *_ep, int halt, int wedge)
1749{
1750 int ret;
1751 struct gr_ep *ep;
1752
1753 if (!_ep)
1754 return -ENODEV;
1755 ep = container_of(_ep, struct gr_ep, ep);
1756
1757 spin_lock(&ep->dev->lock);
1758
1759 /* Halting an IN endpoint should fail if queue is not empty */
1760 if (halt && ep->is_in && !list_empty(&ep->queue)) {
1761 ret = -EAGAIN;
1762 goto out;
1763 }
1764
1765 ret = gr_ep_halt_wedge(ep, halt, wedge, 0);
1766
1767out:
1768 spin_unlock(&ep->dev->lock);
1769
1770 return ret;
1771}
1772
1773/* Halt endpoint */
1774static int gr_set_halt(struct usb_ep *_ep, int halt)
1775{
1776 return gr_set_halt_wedge(_ep, halt, 0);
1777}
1778
1779/* Halt and wedge endpoint */
1780static int gr_set_wedge(struct usb_ep *_ep)
1781{
1782 return gr_set_halt_wedge(_ep, 1, 1);
1783}
1784
1785/*
1786 * Return the total number of bytes currently stored in the internal buffers of
1787 * the endpoint.
1788 */
1789static int gr_fifo_status(struct usb_ep *_ep)
1790{
1791 struct gr_ep *ep;
1792 u32 epstat;
1793 u32 bytes = 0;
1794
1795 if (!_ep)
1796 return -ENODEV;
1797 ep = container_of(_ep, struct gr_ep, ep);
1798
1799 epstat = gr_read32(&ep->regs->epstat);
1800
1801 if (epstat & GR_EPSTAT_B0)
1802 bytes += (epstat & GR_EPSTAT_B0CNT_MASK) >> GR_EPSTAT_B0CNT_POS;
1803 if (epstat & GR_EPSTAT_B1)
1804 bytes += (epstat & GR_EPSTAT_B1CNT_MASK) >> GR_EPSTAT_B1CNT_POS;
1805
1806 return bytes;
1807}
1808
1809
1810/* Empty data from internal buffers of an endpoint. */
1811static void gr_fifo_flush(struct usb_ep *_ep)
1812{
1813 struct gr_ep *ep;
1814 u32 epctrl;
1815
1816 if (!_ep)
1817 return;
1818 ep = container_of(_ep, struct gr_ep, ep);
1819 dev_vdbg(ep->dev->dev, "EP: flush fifo %s\n", ep->ep.name);
1820
1821 spin_lock(&ep->dev->lock);
1822
1823 epctrl = gr_read32(&ep->regs->epctrl);
1824 epctrl |= GR_EPCTRL_CB;
1825 gr_write32(&ep->regs->epctrl, epctrl);
1826
1827 spin_unlock(&ep->dev->lock);
1828}
1829
1830static struct usb_ep_ops gr_ep_ops = {
1831 .enable = gr_ep_enable,
1832 .disable = gr_ep_disable,
1833
1834 .alloc_request = gr_alloc_request,
1835 .free_request = gr_free_request,
1836
1837 .queue = gr_queue_ext,
1838 .dequeue = gr_dequeue,
1839
1840 .set_halt = gr_set_halt,
1841 .set_wedge = gr_set_wedge,
1842 .fifo_status = gr_fifo_status,
1843 .fifo_flush = gr_fifo_flush,
1844};
1845
1846/* ---------------------------------------------------------------------- */
1847/* USB Gadget ops */
1848
1849static int gr_get_frame(struct usb_gadget *_gadget)
1850{
1851 struct gr_udc *dev;
1852
1853 if (!_gadget)
1854 return -ENODEV;
1855 dev = container_of(_gadget, struct gr_udc, gadget);
1856 return gr_read32(&dev->regs->status) & GR_STATUS_FN_MASK;
1857}
1858
1859static int gr_wakeup(struct usb_gadget *_gadget)
1860{
1861 struct gr_udc *dev;
1862
1863 if (!_gadget)
1864 return -ENODEV;
1865 dev = container_of(_gadget, struct gr_udc, gadget);
1866
1867 /* Remote wakeup feature not enabled by host*/
1868 if (!dev->remote_wakeup)
1869 return -EINVAL;
1870
1871 spin_lock(&dev->lock);
1872
1873 gr_write32(&dev->regs->control,
1874 gr_read32(&dev->regs->control) | GR_CONTROL_RW);
1875
1876 spin_unlock(&dev->lock);
1877
1878 return 0;
1879}
1880
1881static int gr_pullup(struct usb_gadget *_gadget, int is_on)
1882{
1883 struct gr_udc *dev;
1884 u32 control;
1885
1886 if (!_gadget)
1887 return -ENODEV;
1888 dev = container_of(_gadget, struct gr_udc, gadget);
1889
1890 spin_lock(&dev->lock);
1891
1892 control = gr_read32(&dev->regs->control);
1893 if (is_on)
1894 control |= GR_CONTROL_EP;
1895 else
1896 control &= ~GR_CONTROL_EP;
1897 gr_write32(&dev->regs->control, control);
1898
1899 spin_unlock(&dev->lock);
1900
1901 return 0;
1902}
1903
1904static int gr_udc_start(struct usb_gadget *gadget,
1905 struct usb_gadget_driver *driver)
1906{
1907 struct gr_udc *dev = to_gr_udc(gadget);
1908
1909 spin_lock(&dev->lock);
1910
1911 /* Hook up the driver */
1912 driver->driver.bus = NULL;
1913 dev->driver = driver;
1914
1915 /* Get ready for host detection */
1916 gr_enable_vbus_detect(dev);
1917
1918 spin_unlock(&dev->lock);
1919
1920 dev_info(dev->dev, "Started with gadget driver '%s'\n",
1921 driver->driver.name);
1922
1923 return 0;
1924}
1925
1926static int gr_udc_stop(struct usb_gadget *gadget,
1927 struct usb_gadget_driver *driver)
1928{
1929 struct gr_udc *dev = to_gr_udc(gadget);
1930 unsigned long flags;
1931
1932 spin_lock_irqsave(&dev->lock, flags);
1933
1934 dev->driver = NULL;
1935 gr_stop_activity(dev);
1936
1937 spin_unlock_irqrestore(&dev->lock, flags);
1938
1939 dev_info(dev->dev, "Stopped\n");
1940
1941 return 0;
1942}
1943
1944static const struct usb_gadget_ops gr_ops = {
1945 .get_frame = gr_get_frame,
1946 .wakeup = gr_wakeup,
1947 .pullup = gr_pullup,
1948 .udc_start = gr_udc_start,
1949 .udc_stop = gr_udc_stop,
1950 /* Other operations not supported */
1951};
1952
1953/* ---------------------------------------------------------------------- */
1954/* Module probe, removal and of-matching */
1955
1956static const char * const onames[] = {
1957 "ep0out", "ep1out", "ep2out", "ep3out", "ep4out", "ep5out",
1958 "ep6out", "ep7out", "ep8out", "ep9out", "ep10out", "ep11out",
1959 "ep12out", "ep13out", "ep14out", "ep15out"
1960};
1961
1962static const char * const inames[] = {
1963 "ep0in", "ep1in", "ep2in", "ep3in", "ep4in", "ep5in",
1964 "ep6in", "ep7in", "ep8in", "ep9in", "ep10in", "ep11in",
1965 "ep12in", "ep13in", "ep14in", "ep15in"
1966};
1967
1968/* Must be called with dev->lock held */
1969static int gr_ep_init(struct gr_udc *dev, int num, int is_in, u32 maxplimit)
1970{
1971 struct gr_ep *ep;
1972 struct gr_request *req;
1973 struct usb_request *_req;
1974 void *buf;
1975
1976 if (is_in) {
1977 ep = &dev->epi[num];
1978 ep->ep.name = inames[num];
1979 ep->regs = &dev->regs->epi[num];
1980 } else {
1981 ep = &dev->epo[num];
1982 ep->ep.name = onames[num];
1983 ep->regs = &dev->regs->epo[num];
1984 }
1985
1986 gr_ep_reset(ep);
1987 ep->num = num;
1988 ep->is_in = is_in;
1989 ep->dev = dev;
1990 ep->ep.ops = &gr_ep_ops;
1991 INIT_LIST_HEAD(&ep->queue);
1992
1993 if (num == 0) {
1994 _req = gr_alloc_request(&ep->ep, GFP_KERNEL);
1995 buf = devm_kzalloc(dev->dev, PAGE_SIZE, GFP_DMA | GFP_KERNEL);
1996 if (!_req || !buf) {
1997 /* possible _req freed by gr_probe via gr_remove */
1998 return -ENOMEM;
1999 }
2000
2001 req = container_of(_req, struct gr_request, req);
2002 req->req.buf = buf;
2003 req->req.length = MAX_CTRL_PL_SIZE;
2004
2005 if (is_in)
2006 dev->ep0reqi = req; /* Complete gets set as used */
2007 else
2008 dev->ep0reqo = req; /* Completion treated separately */
2009
2010 usb_ep_set_maxpacket_limit(&ep->ep, MAX_CTRL_PL_SIZE);
2011 ep->bytes_per_buffer = MAX_CTRL_PL_SIZE;
2012 } else {
2013 usb_ep_set_maxpacket_limit(&ep->ep, (u16)maxplimit);
2014 list_add_tail(&ep->ep.ep_list, &dev->gadget.ep_list);
2015 }
2016 list_add_tail(&ep->ep_list, &dev->ep_list);
2017
2018 return 0;
2019}
2020
2021/* Must be called with dev->lock held */
2022static int gr_udc_init(struct gr_udc *dev)
2023{
2024 struct device_node *np = dev->dev->of_node;
2025 u32 epctrl_val;
2026 u32 dmactrl_val;
2027 int i;
2028 int ret = 0;
2029 u32 *bufsizes;
2030 u32 bufsize;
2031 int len;
2032
2033 gr_set_address(dev, 0);
2034
2035 INIT_LIST_HEAD(&dev->gadget.ep_list);
2036 dev->gadget.speed = USB_SPEED_UNKNOWN;
2037 dev->gadget.ep0 = &dev->epi[0].ep;
2038
2039 INIT_LIST_HEAD(&dev->ep_list);
2040 gr_set_ep0state(dev, GR_EP0_DISCONNECT);
2041
2042 bufsizes = (u32 *)of_get_property(np, "epobufsizes", &len);
2043 len /= sizeof(u32);
2044 for (i = 0; i < dev->nepo; i++) {
2045 bufsize = (bufsizes && i < len) ? bufsizes[i] : 1024;
2046 ret = gr_ep_init(dev, i, 0, bufsize);
2047 if (ret)
2048 return ret;
2049 }
2050
2051 bufsizes = (u32 *)of_get_property(np, "epibufsizes", &len);
2052 len /= sizeof(u32);
2053 for (i = 0; i < dev->nepi; i++) {
2054 bufsize = (bufsizes && i < len) ? bufsizes[i] : 1024;
2055 ret = gr_ep_init(dev, i, 1, bufsize);
2056 if (ret)
2057 return ret;
2058 }
2059
2060 /* Must be disabled by default */
2061 dev->remote_wakeup = 0;
2062
2063 /* Enable ep0out and ep0in */
2064 epctrl_val = (MAX_CTRL_PL_SIZE << GR_EPCTRL_MAXPL_POS) | GR_EPCTRL_EV;
2065 dmactrl_val = GR_DMACTRL_IE | GR_DMACTRL_AI;
2066 gr_write32(&dev->epo[0].regs->epctrl, epctrl_val);
2067 gr_write32(&dev->epi[0].regs->epctrl, epctrl_val | GR_EPCTRL_PI);
2068 gr_write32(&dev->epo[0].regs->dmactrl, dmactrl_val);
2069 gr_write32(&dev->epi[0].regs->dmactrl, dmactrl_val);
2070
2071 return 0;
2072}
2073
2074static int gr_remove(struct platform_device *ofdev)
2075{
2076 struct gr_udc *dev = dev_get_drvdata(&ofdev->dev);
2077
2078 if (dev->added)
2079 usb_del_gadget_udc(&dev->gadget); /* Shuts everything down */
2080 if (dev->driver)
2081 return -EBUSY;
2082
2083 gr_dfs_delete(dev);
2084 if (dev->desc_pool)
2085 dma_pool_destroy(dev->desc_pool);
2086 dev_set_drvdata(&ofdev->dev, NULL);
2087
2088 gr_free_request(&dev->epi[0].ep, &dev->ep0reqi->req);
2089 gr_free_request(&dev->epo[0].ep, &dev->ep0reqo->req);
2090
2091 return 0;
2092}
2093static int gr_request_irq(struct gr_udc *dev, int irq)
2094{
2095 return devm_request_threaded_irq(dev->dev, irq, gr_irq, gr_irq_handler,
2096 IRQF_SHARED, driver_name, dev);
2097}
2098
2099static int gr_probe(struct platform_device *ofdev)
2100{
2101 struct gr_udc *dev;
2102 struct resource *res;
2103 struct gr_regs __iomem *regs;
2104 int retval;
2105 u32 status;
2106
2107 dev = devm_kzalloc(&ofdev->dev, sizeof(*dev), GFP_KERNEL);
2108 if (!dev)
2109 return -ENOMEM;
2110 dev->dev = &ofdev->dev;
2111
2112 res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
2113 regs = devm_ioremap_resource(dev->dev, res);
2114 if (IS_ERR(regs))
2115 return PTR_ERR(regs);
2116
2117 dev->irq = irq_of_parse_and_map(dev->dev->of_node, 0);
2118 if (!dev->irq) {
2119 dev_err(dev->dev, "No irq found\n");
2120 return -ENODEV;
2121 }
2122
2123 /* Some core configurations has separate irqs for IN and OUT events */
2124 dev->irqi = irq_of_parse_and_map(dev->dev->of_node, 1);
2125 if (dev->irqi) {
2126 dev->irqo = irq_of_parse_and_map(dev->dev->of_node, 2);
2127 if (!dev->irqo) {
2128 dev_err(dev->dev, "Found irqi but not irqo\n");
2129 return -ENODEV;
2130 }
2131 }
2132
2133 dev->gadget.name = driver_name;
2134 dev->gadget.max_speed = USB_SPEED_HIGH;
2135 dev->gadget.ops = &gr_ops;
2136 dev->gadget.quirk_ep_out_aligned_size = true;
2137
2138 spin_lock_init(&dev->lock);
2139 dev->regs = regs;
2140
2141 dev_set_drvdata(&ofdev->dev, dev);
2142
2143 /* Determine number of endpoints and data interface mode */
2144 status = gr_read32(&dev->regs->status);
2145 dev->nepi = ((status & GR_STATUS_NEPI_MASK) >> GR_STATUS_NEPI_POS) + 1;
2146 dev->nepo = ((status & GR_STATUS_NEPO_MASK) >> GR_STATUS_NEPO_POS) + 1;
2147
2148 if (!(status & GR_STATUS_DM)) {
2149 dev_err(dev->dev, "Slave mode cores are not supported\n");
2150 return -ENODEV;
2151 }
2152
2153 /* --- Effects of the following calls might need explicit cleanup --- */
2154
2155 /* Create DMA pool for descriptors */
2156 dev->desc_pool = dma_pool_create("desc_pool", dev->dev,
2157 sizeof(struct gr_dma_desc), 4, 0);
2158 if (!dev->desc_pool) {
2159 dev_err(dev->dev, "Could not allocate DMA pool");
2160 return -ENOMEM;
2161 }
2162
2163 spin_lock(&dev->lock);
2164
2165 /* Inside lock so that no gadget can use this udc until probe is done */
2166 retval = usb_add_gadget_udc(dev->dev, &dev->gadget);
2167 if (retval) {
2168 dev_err(dev->dev, "Could not add gadget udc");
2169 goto out;
2170 }
2171 dev->added = 1;
2172
2173 retval = gr_udc_init(dev);
2174 if (retval)
2175 goto out;
2176
2177 gr_dfs_create(dev);
2178
2179 /* Clear all interrupt enables that might be left on since last boot */
2180 gr_disable_interrupts_and_pullup(dev);
2181
2182 retval = gr_request_irq(dev, dev->irq);
2183 if (retval) {
2184 dev_err(dev->dev, "Failed to request irq %d\n", dev->irq);
2185 goto out;
2186 }
2187
2188 if (dev->irqi) {
2189 retval = gr_request_irq(dev, dev->irqi);
2190 if (retval) {
2191 dev_err(dev->dev, "Failed to request irqi %d\n",
2192 dev->irqi);
2193 goto out;
2194 }
2195 retval = gr_request_irq(dev, dev->irqo);
2196 if (retval) {
2197 dev_err(dev->dev, "Failed to request irqo %d\n",
2198 dev->irqo);
2199 goto out;
2200 }
2201 }
2202
2203 if (dev->irqi)
2204 dev_info(dev->dev, "regs: %p, irqs %d, %d, %d\n", dev->regs,
2205 dev->irq, dev->irqi, dev->irqo);
2206 else
2207 dev_info(dev->dev, "regs: %p, irq %d\n", dev->regs, dev->irq);
2208
2209out:
2210 spin_unlock(&dev->lock);
2211
2212 if (retval)
2213 gr_remove(ofdev);
2214
2215 return retval;
2216}
2217
2218static struct of_device_id gr_match[] = {
2219 {.name = "GAISLER_USBDC"},
2220 {.name = "01_021"},
2221 {},
2222};
2223MODULE_DEVICE_TABLE(of, gr_match);
2224
2225static struct platform_driver gr_driver = {
2226 .driver = {
2227 .name = DRIVER_NAME,
2228 .owner = THIS_MODULE,
2229 .of_match_table = gr_match,
2230 },
2231 .probe = gr_probe,
2232 .remove = gr_remove,
2233};
2234module_platform_driver(gr_driver);
2235
2236MODULE_AUTHOR("Aeroflex Gaisler AB.");
2237MODULE_DESCRIPTION(DRIVER_DESC);
2238MODULE_LICENSE("GPL");
diff --git a/drivers/usb/gadget/gr_udc.h b/drivers/usb/gadget/gr_udc.h
new file mode 100644
index 000000000000..8388897d9ec3
--- /dev/null
+++ b/drivers/usb/gadget/gr_udc.h
@@ -0,0 +1,220 @@
1/*
2 * USB Peripheral Controller driver for Aeroflex Gaisler GRUSBDC.
3 *
4 * 2013 (c) Aeroflex Gaisler AB
5 *
6 * This driver supports GRUSBDC USB Device Controller cores available in the
7 * GRLIB VHDL IP core library.
8 *
9 * Full documentation of the GRUSBDC core can be found here:
10 * http://www.gaisler.com/products/grlib/grip.pdf
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 *
17 * Contributors:
18 * - Andreas Larsson <andreas@gaisler.com>
19 * - Marko Isomaki
20 */
21
22/* Control registers on the AMBA bus */
23
24#define GR_MAXEP 16 /* Max # endpoints for *each* direction */
25
26struct gr_epregs {
27 u32 epctrl;
28 union {
29 struct { /* Slave mode*/
30 u32 slvctrl;
31 u32 slvdata;
32 };
33 struct { /* DMA mode*/
34 u32 dmactrl;
35 u32 dmaaddr;
36 };
37 };
38 u32 epstat;
39};
40
41struct gr_regs {
42 struct gr_epregs epo[GR_MAXEP]; /* 0x000 - 0x0fc */
43 struct gr_epregs epi[GR_MAXEP]; /* 0x100 - 0x1fc */
44 u32 control; /* 0x200 */
45 u32 status; /* 0x204 */
46};
47
48#define GR_EPCTRL_BUFSZ_SCALER 8
49#define GR_EPCTRL_BUFSZ_MASK 0xffe00000
50#define GR_EPCTRL_BUFSZ_POS 21
51#define GR_EPCTRL_PI BIT(20)
52#define GR_EPCTRL_CB BIT(19)
53#define GR_EPCTRL_CS BIT(18)
54#define GR_EPCTRL_MAXPL_MASK 0x0003ff80
55#define GR_EPCTRL_MAXPL_POS 7
56#define GR_EPCTRL_NT_MASK 0x00000060
57#define GR_EPCTRL_NT_POS 5
58#define GR_EPCTRL_TT_MASK 0x00000018
59#define GR_EPCTRL_TT_POS 3
60#define GR_EPCTRL_EH BIT(2)
61#define GR_EPCTRL_ED BIT(1)
62#define GR_EPCTRL_EV BIT(0)
63
64#define GR_DMACTRL_AE BIT(10)
65#define GR_DMACTRL_AD BIT(3)
66#define GR_DMACTRL_AI BIT(2)
67#define GR_DMACTRL_IE BIT(1)
68#define GR_DMACTRL_DA BIT(0)
69
70#define GR_EPSTAT_PT BIT(29)
71#define GR_EPSTAT_PR BIT(29)
72#define GR_EPSTAT_B1CNT_MASK 0x1fff0000
73#define GR_EPSTAT_B1CNT_POS 16
74#define GR_EPSTAT_B0CNT_MASK 0x0000fff8
75#define GR_EPSTAT_B0CNT_POS 3
76#define GR_EPSTAT_B1 BIT(2)
77#define GR_EPSTAT_B0 BIT(1)
78#define GR_EPSTAT_BS BIT(0)
79
80#define GR_CONTROL_SI BIT(31)
81#define GR_CONTROL_UI BIT(30)
82#define GR_CONTROL_VI BIT(29)
83#define GR_CONTROL_SP BIT(28)
84#define GR_CONTROL_FI BIT(27)
85#define GR_CONTROL_EP BIT(14)
86#define GR_CONTROL_DH BIT(13)
87#define GR_CONTROL_RW BIT(12)
88#define GR_CONTROL_TS_MASK 0x00000e00
89#define GR_CONTROL_TS_POS 9
90#define GR_CONTROL_TM BIT(8)
91#define GR_CONTROL_UA_MASK 0x000000fe
92#define GR_CONTROL_UA_POS 1
93#define GR_CONTROL_SU BIT(0)
94
95#define GR_STATUS_NEPI_MASK 0xf0000000
96#define GR_STATUS_NEPI_POS 28
97#define GR_STATUS_NEPO_MASK 0x0f000000
98#define GR_STATUS_NEPO_POS 24
99#define GR_STATUS_DM BIT(23)
100#define GR_STATUS_SU BIT(17)
101#define GR_STATUS_UR BIT(16)
102#define GR_STATUS_VB BIT(15)
103#define GR_STATUS_SP BIT(14)
104#define GR_STATUS_AF_MASK 0x00003800
105#define GR_STATUS_AF_POS 11
106#define GR_STATUS_FN_MASK 0x000007ff
107#define GR_STATUS_FN_POS 0
108
109
110#define MAX_CTRL_PL_SIZE 64 /* As per USB standard for full and high speed */
111
112/*-------------------------------------------------------------------------*/
113
114/* Driver data structures and utilities */
115
116struct gr_dma_desc {
117 u32 ctrl;
118 u32 data;
119 u32 next;
120
121 /* These must be last because hw uses the previous three */
122 u32 paddr;
123 struct gr_dma_desc *next_desc;
124};
125
126#define GR_DESC_OUT_CTRL_SE BIT(17)
127#define GR_DESC_OUT_CTRL_IE BIT(15)
128#define GR_DESC_OUT_CTRL_NX BIT(14)
129#define GR_DESC_OUT_CTRL_EN BIT(13)
130#define GR_DESC_OUT_CTRL_LEN_MASK 0x00001fff
131
132#define GR_DESC_IN_CTRL_MO BIT(18)
133#define GR_DESC_IN_CTRL_PI BIT(17)
134#define GR_DESC_IN_CTRL_ML BIT(16)
135#define GR_DESC_IN_CTRL_IE BIT(15)
136#define GR_DESC_IN_CTRL_NX BIT(14)
137#define GR_DESC_IN_CTRL_EN BIT(13)
138#define GR_DESC_IN_CTRL_LEN_MASK 0x00001fff
139
140#define GR_DESC_DMAADDR_MASK 0xfffffffc
141
142struct gr_ep {
143 struct usb_ep ep;
144 struct gr_udc *dev;
145 u16 bytes_per_buffer;
146 unsigned int dma_start;
147 struct gr_epregs __iomem *regs;
148
149 unsigned num:8;
150 unsigned is_in:1;
151 unsigned stopped:1;
152 unsigned wedged:1;
153 unsigned callback:1;
154
155 /* analogous to a host-side qh */
156 struct list_head queue;
157
158 struct list_head ep_list;
159};
160
161struct gr_request {
162 struct usb_request req;
163 struct list_head queue;
164
165 /* Chain of dma descriptors */
166 struct gr_dma_desc *first_desc; /* First in the chain */
167 struct gr_dma_desc *curr_desc; /* Current descriptor */
168 struct gr_dma_desc *last_desc; /* Last in the chain */
169
170 u8 setup; /* Setup packet */
171};
172
173enum gr_ep0state {
174 GR_EP0_DISCONNECT = 0, /* No host */
175 GR_EP0_SETUP, /* Between STATUS ack and SETUP report */
176 GR_EP0_IDATA, /* IN data stage */
177 GR_EP0_ODATA, /* OUT data stage */
178 GR_EP0_ISTATUS, /* Status stage after IN data stage */
179 GR_EP0_OSTATUS, /* Status stage after OUT data stage */
180 GR_EP0_STALL, /* Data or status stages */
181 GR_EP0_SUSPEND, /* USB suspend */
182};
183
184struct gr_udc {
185 struct usb_gadget gadget;
186 struct gr_ep epi[GR_MAXEP];
187 struct gr_ep epo[GR_MAXEP];
188 struct usb_gadget_driver *driver;
189 struct dma_pool *desc_pool;
190 struct device *dev;
191
192 enum gr_ep0state ep0state;
193 struct gr_request *ep0reqo;
194 struct gr_request *ep0reqi;
195
196 struct gr_regs __iomem *regs;
197 int irq;
198 int irqi;
199 int irqo;
200
201 unsigned added:1;
202 unsigned irq_enabled:1;
203 unsigned remote_wakeup:1;
204
205 u8 test_mode;
206
207 enum usb_device_state suspended_from;
208
209 unsigned int nepi;
210 unsigned int nepo;
211
212 struct list_head ep_list;
213
214 spinlock_t lock; /* General lock, a.k.a. "dev->lock" in comments */
215
216 struct dentry *dfs_root;
217 struct dentry *dfs_state;
218};
219
220#define to_gr_udc(gadget) (container_of((gadget), struct gr_udc, gadget))
diff --git a/drivers/usb/gadget/lpc32xx_udc.c b/drivers/usb/gadget/lpc32xx_udc.c
index 6a2a65aa0057..049ebab0d360 100644
--- a/drivers/usb/gadget/lpc32xx_udc.c
+++ b/drivers/usb/gadget/lpc32xx_udc.c
@@ -1449,7 +1449,7 @@ static void udc_reinit(struct lpc32xx_udc *udc)
1449 1449
1450 if (i != 0) 1450 if (i != 0)
1451 list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list); 1451 list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list);
1452 ep->ep.maxpacket = ep->maxpacket; 1452 usb_ep_set_maxpacket_limit(&ep->ep, ep->maxpacket);
1453 INIT_LIST_HEAD(&ep->queue); 1453 INIT_LIST_HEAD(&ep->queue);
1454 ep->req_pending = 0; 1454 ep->req_pending = 0;
1455 } 1455 }
diff --git a/drivers/usb/gadget/m66592-udc.c b/drivers/usb/gadget/m66592-udc.c
index d5f050d30edf..8cae01d88597 100644
--- a/drivers/usb/gadget/m66592-udc.c
+++ b/drivers/usb/gadget/m66592-udc.c
@@ -1647,9 +1647,9 @@ static int __init m66592_probe(struct platform_device *pdev)
1647 INIT_LIST_HEAD(&ep->queue); 1647 INIT_LIST_HEAD(&ep->queue);
1648 ep->ep.name = m66592_ep_name[i]; 1648 ep->ep.name = m66592_ep_name[i];
1649 ep->ep.ops = &m66592_ep_ops; 1649 ep->ep.ops = &m66592_ep_ops;
1650 ep->ep.maxpacket = 512; 1650 usb_ep_set_maxpacket_limit(&ep->ep, 512);
1651 } 1651 }
1652 m66592->ep[0].ep.maxpacket = 64; 1652 usb_ep_set_maxpacket_limit(&m66592->ep[0].ep, 64);
1653 m66592->ep[0].pipenum = 0; 1653 m66592->ep[0].pipenum = 0;
1654 m66592->ep[0].fifoaddr = M66592_CFIFO; 1654 m66592->ep[0].fifoaddr = M66592_CFIFO;
1655 m66592->ep[0].fifosel = M66592_CFIFOSEL; 1655 m66592->ep[0].fifosel = M66592_CFIFOSEL;
diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c
index 4fdaa54a2a2a..940f6cde8e89 100644
--- a/drivers/usb/gadget/multi.c
+++ b/drivers/usb/gadget/multi.c
@@ -134,7 +134,7 @@ static unsigned int fsg_num_buffers = CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS;
134 */ 134 */
135#define fsg_num_buffers CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS 135#define fsg_num_buffers CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS
136 136
137#endif /* CONFIG_USB_DEBUG */ 137#endif /* CONFIG_USB_GADGET_DEBUG_FILES */
138 138
139FSG_MODULE_PARAMETERS(/* no prefix */, fsg_mod_data); 139FSG_MODULE_PARAMETERS(/* no prefix */, fsg_mod_data);
140 140
diff --git a/drivers/usb/gadget/mv_u3d_core.c b/drivers/usb/gadget/mv_u3d_core.c
index 234711eabea1..d2ca59e7b477 100644
--- a/drivers/usb/gadget/mv_u3d_core.c
+++ b/drivers/usb/gadget/mv_u3d_core.c
@@ -15,7 +15,6 @@
15#include <linux/sched.h> 15#include <linux/sched.h>
16#include <linux/slab.h> 16#include <linux/slab.h>
17#include <linux/errno.h> 17#include <linux/errno.h>
18#include <linux/init.h>
19#include <linux/timer.h> 18#include <linux/timer.h>
20#include <linux/list.h> 19#include <linux/list.h>
21#include <linux/notifier.h> 20#include <linux/notifier.h>
@@ -1336,7 +1335,7 @@ static int mv_u3d_eps_init(struct mv_u3d *u3d)
1336 ep->ep.name = ep->name; 1335 ep->ep.name = ep->name;
1337 ep->ep.ops = &mv_u3d_ep_ops; 1336 ep->ep.ops = &mv_u3d_ep_ops;
1338 ep->wedge = 0; 1337 ep->wedge = 0;
1339 ep->ep.maxpacket = MV_U3D_EP0_MAX_PKT_SIZE; 1338 usb_ep_set_maxpacket_limit(&ep->ep, MV_U3D_EP0_MAX_PKT_SIZE);
1340 ep->ep_num = 0; 1339 ep->ep_num = 0;
1341 ep->ep.desc = &mv_u3d_ep0_desc; 1340 ep->ep.desc = &mv_u3d_ep0_desc;
1342 INIT_LIST_HEAD(&ep->queue); 1341 INIT_LIST_HEAD(&ep->queue);
@@ -1361,7 +1360,7 @@ static int mv_u3d_eps_init(struct mv_u3d *u3d)
1361 ep->ep.name = ep->name; 1360 ep->ep.name = ep->name;
1362 1361
1363 ep->ep.ops = &mv_u3d_ep_ops; 1362 ep->ep.ops = &mv_u3d_ep_ops;
1364 ep->ep.maxpacket = (unsigned short) ~0; 1363 usb_ep_set_maxpacket_limit(&ep->ep, (unsigned short) ~0);
1365 ep->ep_num = i / 2; 1364 ep->ep_num = i / 2;
1366 1365
1367 INIT_LIST_HEAD(&ep->queue); 1366 INIT_LIST_HEAD(&ep->queue);
diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c
index 104cdbea635a..fcff3a571b45 100644
--- a/drivers/usb/gadget/mv_udc_core.c
+++ b/drivers/usb/gadget/mv_udc_core.c
@@ -20,7 +20,6 @@
20#include <linux/slab.h> 20#include <linux/slab.h>
21#include <linux/errno.h> 21#include <linux/errno.h>
22#include <linux/err.h> 22#include <linux/err.h>
23#include <linux/init.h>
24#include <linux/timer.h> 23#include <linux/timer.h>
25#include <linux/list.h> 24#include <linux/list.h>
26#include <linux/interrupt.h> 25#include <linux/interrupt.h>
@@ -1261,7 +1260,7 @@ static int eps_init(struct mv_udc *udc)
1261 ep->ep.ops = &mv_ep_ops; 1260 ep->ep.ops = &mv_ep_ops;
1262 ep->wedge = 0; 1261 ep->wedge = 0;
1263 ep->stopped = 0; 1262 ep->stopped = 0;
1264 ep->ep.maxpacket = EP0_MAX_PKT_SIZE; 1263 usb_ep_set_maxpacket_limit(&ep->ep, EP0_MAX_PKT_SIZE);
1265 ep->ep_num = 0; 1264 ep->ep_num = 0;
1266 ep->ep.desc = &mv_ep0_desc; 1265 ep->ep.desc = &mv_ep0_desc;
1267 INIT_LIST_HEAD(&ep->queue); 1266 INIT_LIST_HEAD(&ep->queue);
@@ -1284,7 +1283,7 @@ static int eps_init(struct mv_udc *udc)
1284 1283
1285 ep->ep.ops = &mv_ep_ops; 1284 ep->ep.ops = &mv_ep_ops;
1286 ep->stopped = 0; 1285 ep->stopped = 0;
1287 ep->ep.maxpacket = (unsigned short) ~0; 1286 usb_ep_set_maxpacket_limit(&ep->ep, (unsigned short) ~0);
1288 ep->ep_num = i / 2; 1287 ep->ep_num = i / 2;
1289 1288
1290 INIT_LIST_HEAD(&ep->queue); 1289 INIT_LIST_HEAD(&ep->queue);
diff --git a/drivers/usb/gadget/net2272.c b/drivers/usb/gadget/net2272.c
index bf2bb39f35a2..ca15405583e2 100644
--- a/drivers/usb/gadget/net2272.c
+++ b/drivers/usb/gadget/net2272.c
@@ -266,7 +266,7 @@ static void net2272_ep_reset(struct net2272_ep *ep)
266 ep->desc = NULL; 266 ep->desc = NULL;
267 INIT_LIST_HEAD(&ep->queue); 267 INIT_LIST_HEAD(&ep->queue);
268 268
269 ep->ep.maxpacket = ~0; 269 usb_ep_set_maxpacket_limit(&ep->ep, ~0);
270 ep->ep.ops = &net2272_ep_ops; 270 ep->ep.ops = &net2272_ep_ops;
271 271
272 /* disable irqs, endpoint */ 272 /* disable irqs, endpoint */
@@ -1409,7 +1409,7 @@ net2272_usb_reinit(struct net2272 *dev)
1409 ep->fifo_size = 64; 1409 ep->fifo_size = 64;
1410 net2272_ep_reset(ep); 1410 net2272_ep_reset(ep);
1411 } 1411 }
1412 dev->ep[0].ep.maxpacket = 64; 1412 usb_ep_set_maxpacket_limit(&dev->ep[0].ep, 64);
1413 1413
1414 dev->gadget.ep0 = &dev->ep[0].ep; 1414 dev->gadget.ep0 = &dev->ep[0].ep;
1415 dev->ep[0].stopped = 0; 1415 dev->ep[0].stopped = 0;
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c
index fc852177c087..43e5e2f9888f 100644
--- a/drivers/usb/gadget/net2280.c
+++ b/drivers/usb/gadget/net2280.c
@@ -293,7 +293,7 @@ static void ep_reset (struct net2280_regs __iomem *regs, struct net2280_ep *ep)
293 ep->desc = NULL; 293 ep->desc = NULL;
294 INIT_LIST_HEAD (&ep->queue); 294 INIT_LIST_HEAD (&ep->queue);
295 295
296 ep->ep.maxpacket = ~0; 296 usb_ep_set_maxpacket_limit(&ep->ep, ~0);
297 ep->ep.ops = &net2280_ep_ops; 297 ep->ep.ops = &net2280_ep_ops;
298 298
299 /* disable the dma, irqs, endpoint... */ 299 /* disable the dma, irqs, endpoint... */
@@ -1805,9 +1805,9 @@ static void usb_reinit (struct net2280 *dev)
1805 ep->regs = &dev->epregs [tmp]; 1805 ep->regs = &dev->epregs [tmp];
1806 ep_reset (dev->regs, ep); 1806 ep_reset (dev->regs, ep);
1807 } 1807 }
1808 dev->ep [0].ep.maxpacket = 64; 1808 usb_ep_set_maxpacket_limit(&dev->ep [0].ep, 64);
1809 dev->ep [5].ep.maxpacket = 64; 1809 usb_ep_set_maxpacket_limit(&dev->ep [5].ep, 64);
1810 dev->ep [6].ep.maxpacket = 64; 1810 usb_ep_set_maxpacket_limit(&dev->ep [6].ep, 64);
1811 1811
1812 dev->gadget.ep0 = &dev->ep [0].ep; 1812 dev->gadget.ep0 = &dev->ep [0].ep;
1813 dev->ep [0].stopped = 0; 1813 dev->ep [0].stopped = 0;
diff --git a/drivers/usb/gadget/nokia.c b/drivers/usb/gadget/nokia.c
index 0a8099a488c4..3ab386167519 100644
--- a/drivers/usb/gadget/nokia.c
+++ b/drivers/usb/gadget/nokia.c
@@ -126,9 +126,9 @@ static int __init nokia_bind_config(struct usb_configuration *c)
126 struct usb_function *f_ecm; 126 struct usb_function *f_ecm;
127 struct usb_function *f_obex2 = NULL; 127 struct usb_function *f_obex2 = NULL;
128 int status = 0; 128 int status = 0;
129 int obex1_stat = 0; 129 int obex1_stat = -1;
130 int obex2_stat = 0; 130 int obex2_stat = -1;
131 int phonet_stat = 0; 131 int phonet_stat = -1;
132 132
133 if (!IS_ERR(fi_phonet)) { 133 if (!IS_ERR(fi_phonet)) {
134 f_phonet = usb_get_function(fi_phonet); 134 f_phonet = usb_get_function(fi_phonet);
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c
index 83957cc225d9..2ae4f6d69f74 100644
--- a/drivers/usb/gadget/omap_udc.c
+++ b/drivers/usb/gadget/omap_udc.c
@@ -22,7 +22,6 @@
22#include <linux/errno.h> 22#include <linux/errno.h>
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/slab.h> 24#include <linux/slab.h>
25#include <linux/init.h>
26#include <linux/timer.h> 25#include <linux/timer.h>
27#include <linux/list.h> 26#include <linux/list.h>
28#include <linux/interrupt.h> 27#include <linux/interrupt.h>
@@ -2586,7 +2585,8 @@ omap_ep_setup(char *name, u8 addr, u8 type,
2586 2585
2587 ep->ep.name = ep->name; 2586 ep->ep.name = ep->name;
2588 ep->ep.ops = &omap_ep_ops; 2587 ep->ep.ops = &omap_ep_ops;
2589 ep->ep.maxpacket = ep->maxpacket = maxp; 2588 ep->maxpacket = maxp;
2589 usb_ep_set_maxpacket_limit(&ep->ep, ep->maxpacket);
2590 list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list); 2590 list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list);
2591 2591
2592 return buf; 2592 return buf;
diff --git a/drivers/usb/gadget/pch_udc.c b/drivers/usb/gadget/pch_udc.c
index 32d5e923750b..eb8c3bedb57a 100644
--- a/drivers/usb/gadget/pch_udc.c
+++ b/drivers/usb/gadget/pch_udc.c
@@ -2896,12 +2896,12 @@ static void pch_udc_pcd_reinit(struct pch_udc_dev *dev)
2896 ep->offset_addr = (UDC_EPINT_OUT_SHIFT + ep->num) * 2896 ep->offset_addr = (UDC_EPINT_OUT_SHIFT + ep->num) *
2897 UDC_EP_REG_SHIFT; 2897 UDC_EP_REG_SHIFT;
2898 /* need to set ep->ep.maxpacket and set Default Configuration?*/ 2898 /* need to set ep->ep.maxpacket and set Default Configuration?*/
2899 ep->ep.maxpacket = UDC_BULK_MAX_PKT_SIZE; 2899 usb_ep_set_maxpacket_limit(&ep->ep, UDC_BULK_MAX_PKT_SIZE);
2900 list_add_tail(&ep->ep.ep_list, &dev->gadget.ep_list); 2900 list_add_tail(&ep->ep.ep_list, &dev->gadget.ep_list);
2901 INIT_LIST_HEAD(&ep->queue); 2901 INIT_LIST_HEAD(&ep->queue);
2902 } 2902 }
2903 dev->ep[UDC_EP0IN_IDX].ep.maxpacket = UDC_EP0IN_MAX_PKT_SIZE; 2903 usb_ep_set_maxpacket_limit(&dev->ep[UDC_EP0IN_IDX].ep, UDC_EP0IN_MAX_PKT_SIZE);
2904 dev->ep[UDC_EP0OUT_IDX].ep.maxpacket = UDC_EP0OUT_MAX_PKT_SIZE; 2904 usb_ep_set_maxpacket_limit(&dev->ep[UDC_EP0OUT_IDX].ep, UDC_EP0OUT_MAX_PKT_SIZE);
2905 2905
2906 /* remove ep0 in and out from the list. They have own pointer */ 2906 /* remove ep0 in and out from the list. They have own pointer */
2907 list_del_init(&dev->ep[UDC_EP0IN_IDX].ep.ep_list); 2907 list_del_init(&dev->ep[UDC_EP0IN_IDX].ep.ep_list);
@@ -3210,7 +3210,7 @@ finished:
3210 return retval; 3210 return retval;
3211} 3211}
3212 3212
3213static DEFINE_PCI_DEVICE_TABLE(pch_udc_pcidev_id) = { 3213static const struct pci_device_id pch_udc_pcidev_id[] = {
3214 { 3214 {
3215 PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EG20T_UDC), 3215 PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EG20T_UDC),
3216 .class = (PCI_CLASS_SERIAL_USB << 8) | 0xfe, 3216 .class = (PCI_CLASS_SERIAL_USB << 8) | 0xfe,
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
index 409a3c45a36a..9984437d2952 100644
--- a/drivers/usb/gadget/pxa25x_udc.c
+++ b/drivers/usb/gadget/pxa25x_udc.c
@@ -24,7 +24,6 @@
24#include <linux/err.h> 24#include <linux/err.h>
25#include <linux/delay.h> 25#include <linux/delay.h>
26#include <linux/slab.h> 26#include <linux/slab.h>
27#include <linux/init.h>
28#include <linux/timer.h> 27#include <linux/timer.h>
29#include <linux/list.h> 28#include <linux/list.h>
30#include <linux/interrupt.h> 29#include <linux/interrupt.h>
@@ -1194,6 +1193,7 @@ static void udc_reinit(struct pxa25x_udc *dev)
1194 ep->stopped = 0; 1193 ep->stopped = 0;
1195 INIT_LIST_HEAD (&ep->queue); 1194 INIT_LIST_HEAD (&ep->queue);
1196 ep->pio_irqs = 0; 1195 ep->pio_irqs = 0;
1196 usb_ep_set_maxpacket_limit(&ep->ep, ep->ep.maxpacket);
1197 } 1197 }
1198 1198
1199 /* the rest was statically initialized, and is read-only */ 1199 /* the rest was statically initialized, and is read-only */
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c
index 3c97da7760da..cdf4d678be96 100644
--- a/drivers/usb/gadget/pxa27x_udc.c
+++ b/drivers/usb/gadget/pxa27x_udc.c
@@ -1737,9 +1737,12 @@ static void udc_init_data(struct pxa_udc *dev)
1737 } 1737 }
1738 1738
1739 /* USB endpoints init */ 1739 /* USB endpoints init */
1740 for (i = 1; i < NR_USB_ENDPOINTS; i++) 1740 for (i = 1; i < NR_USB_ENDPOINTS; i++) {
1741 list_add_tail(&dev->udc_usb_ep[i].usb_ep.ep_list, 1741 list_add_tail(&dev->udc_usb_ep[i].usb_ep.ep_list,
1742 &dev->gadget.ep_list); 1742 &dev->gadget.ep_list);
1743 usb_ep_set_maxpacket_limit(&dev->udc_usb_ep[i].usb_ep,
1744 dev->udc_usb_ep[i].usb_ep.maxpacket);
1745 }
1743} 1746}
1744 1747
1745/** 1748/**
diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c
index 68be48d33404..aff0a6718bc6 100644
--- a/drivers/usb/gadget/r8a66597-udc.c
+++ b/drivers/usb/gadget/r8a66597-udc.c
@@ -1833,7 +1833,7 @@ static int __exit r8a66597_remove(struct platform_device *pdev)
1833 r8a66597_free_request(&r8a66597->ep[0].ep, r8a66597->ep0_req); 1833 r8a66597_free_request(&r8a66597->ep[0].ep, r8a66597->ep0_req);
1834 1834
1835 if (r8a66597->pdata->on_chip) { 1835 if (r8a66597->pdata->on_chip) {
1836 clk_disable(r8a66597->clk); 1836 clk_disable_unprepare(r8a66597->clk);
1837 clk_put(r8a66597->clk); 1837 clk_put(r8a66597->clk);
1838 } 1838 }
1839 1839
@@ -1931,7 +1931,7 @@ static int __init r8a66597_probe(struct platform_device *pdev)
1931 ret = PTR_ERR(r8a66597->clk); 1931 ret = PTR_ERR(r8a66597->clk);
1932 goto clean_up; 1932 goto clean_up;
1933 } 1933 }
1934 clk_enable(r8a66597->clk); 1934 clk_prepare_enable(r8a66597->clk);
1935 } 1935 }
1936 1936
1937 if (r8a66597->pdata->sudmac) { 1937 if (r8a66597->pdata->sudmac) {
@@ -1964,9 +1964,9 @@ static int __init r8a66597_probe(struct platform_device *pdev)
1964 INIT_LIST_HEAD(&ep->queue); 1964 INIT_LIST_HEAD(&ep->queue);
1965 ep->ep.name = r8a66597_ep_name[i]; 1965 ep->ep.name = r8a66597_ep_name[i];
1966 ep->ep.ops = &r8a66597_ep_ops; 1966 ep->ep.ops = &r8a66597_ep_ops;
1967 ep->ep.maxpacket = 512; 1967 usb_ep_set_maxpacket_limit(&ep->ep, 512);
1968 } 1968 }
1969 r8a66597->ep[0].ep.maxpacket = 64; 1969 usb_ep_set_maxpacket_limit(&r8a66597->ep[0].ep, 64);
1970 r8a66597->ep[0].pipenum = 0; 1970 r8a66597->ep[0].pipenum = 0;
1971 r8a66597->ep[0].fifoaddr = CFIFO; 1971 r8a66597->ep[0].fifoaddr = CFIFO;
1972 r8a66597->ep[0].fifosel = CFIFOSEL; 1972 r8a66597->ep[0].fifosel = CFIFOSEL;
@@ -1996,7 +1996,7 @@ clean_up3:
1996 free_irq(irq, r8a66597); 1996 free_irq(irq, r8a66597);
1997clean_up2: 1997clean_up2:
1998 if (r8a66597->pdata->on_chip) { 1998 if (r8a66597->pdata->on_chip) {
1999 clk_disable(r8a66597->clk); 1999 clk_disable_unprepare(r8a66597->clk);
2000 clk_put(r8a66597->clk); 2000 clk_put(r8a66597->clk);
2001 } 2001 }
2002clean_up: 2002clean_up:
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c
index a3ad732bc812..d822d822efb3 100644
--- a/drivers/usb/gadget/rndis.c
+++ b/drivers/usb/gadget/rndis.c
@@ -25,7 +25,6 @@
25#include <linux/moduleparam.h> 25#include <linux/moduleparam.h>
26#include <linux/kernel.h> 26#include <linux/kernel.h>
27#include <linux/errno.h> 27#include <linux/errno.h>
28#include <linux/init.h>
29#include <linux/list.h> 28#include <linux/list.h>
30#include <linux/proc_fs.h> 29#include <linux/proc_fs.h>
31#include <linux/slab.h> 30#include <linux/slab.h>
@@ -1142,7 +1141,7 @@ static struct proc_dir_entry *rndis_connect_state [RNDIS_MAX_CONFIGS];
1142#endif /* CONFIG_USB_GADGET_DEBUG_FILES */ 1141#endif /* CONFIG_USB_GADGET_DEBUG_FILES */
1143 1142
1144 1143
1145static int rndis_init(void) 1144int rndis_init(void)
1146{ 1145{
1147 u8 i; 1146 u8 i;
1148 1147
@@ -1174,9 +1173,8 @@ static int rndis_init(void)
1174 1173
1175 return 0; 1174 return 0;
1176} 1175}
1177module_init(rndis_init);
1178 1176
1179static void rndis_exit(void) 1177void rndis_exit(void)
1180{ 1178{
1181#ifdef CONFIG_USB_GADGET_DEBUG_FILES 1179#ifdef CONFIG_USB_GADGET_DEBUG_FILES
1182 u8 i; 1180 u8 i;
@@ -1188,6 +1186,4 @@ static void rndis_exit(void)
1188 } 1186 }
1189#endif 1187#endif
1190} 1188}
1191module_exit(rndis_exit);
1192 1189
1193MODULE_LICENSE("GPL");
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
index e20bc109fdd7..1172eaeddd85 100644
--- a/drivers/usb/gadget/s3c-hsotg.c
+++ b/drivers/usb/gadget/s3c-hsotg.c
@@ -30,14 +30,13 @@
30#include <linux/clk.h> 30#include <linux/clk.h>
31#include <linux/regulator/consumer.h> 31#include <linux/regulator/consumer.h>
32#include <linux/of_platform.h> 32#include <linux/of_platform.h>
33#include <linux/phy/phy.h>
33 34
34#include <linux/usb/ch9.h> 35#include <linux/usb/ch9.h>
35#include <linux/usb/gadget.h> 36#include <linux/usb/gadget.h>
36#include <linux/usb/phy.h> 37#include <linux/usb/phy.h>
37#include <linux/platform_data/s3c-hsotg.h> 38#include <linux/platform_data/s3c-hsotg.h>
38 39
39#include <mach/map.h>
40
41#include "s3c-hsotg.h" 40#include "s3c-hsotg.h"
42 41
43static const char * const s3c_hsotg_supply_names[] = { 42static const char * const s3c_hsotg_supply_names[] = {
@@ -140,11 +139,13 @@ struct s3c_hsotg_ep {
140 * @dev: The parent device supplied to the probe function 139 * @dev: The parent device supplied to the probe function
141 * @driver: USB gadget driver 140 * @driver: USB gadget driver
142 * @phy: The otg phy transceiver structure for phy control. 141 * @phy: The otg phy transceiver structure for phy control.
142 * @uphy: The otg phy transceiver structure for old USB phy control.
143 * @plat: The platform specific configuration data. This can be removed once 143 * @plat: The platform specific configuration data. This can be removed once
144 * all SoCs support usb transceiver. 144 * all SoCs support usb transceiver.
145 * @regs: The memory area mapped for accessing registers. 145 * @regs: The memory area mapped for accessing registers.
146 * @irq: The IRQ number we are using 146 * @irq: The IRQ number we are using
147 * @supplies: Definition of USB power supplies 147 * @supplies: Definition of USB power supplies
148 * @phyif: PHY interface width
148 * @dedicated_fifos: Set if the hardware has dedicated IN-EP fifos. 149 * @dedicated_fifos: Set if the hardware has dedicated IN-EP fifos.
149 * @num_of_eps: Number of available EPs (excluding EP0) 150 * @num_of_eps: Number of available EPs (excluding EP0)
150 * @debug_root: root directrory for debugfs. 151 * @debug_root: root directrory for debugfs.
@@ -161,7 +162,8 @@ struct s3c_hsotg_ep {
161struct s3c_hsotg { 162struct s3c_hsotg {
162 struct device *dev; 163 struct device *dev;
163 struct usb_gadget_driver *driver; 164 struct usb_gadget_driver *driver;
164 struct usb_phy *phy; 165 struct phy *phy;
166 struct usb_phy *uphy;
165 struct s3c_hsotg_plat *plat; 167 struct s3c_hsotg_plat *plat;
166 168
167 spinlock_t lock; 169 spinlock_t lock;
@@ -172,6 +174,7 @@ struct s3c_hsotg {
172 174
173 struct regulator_bulk_data supplies[ARRAY_SIZE(s3c_hsotg_supply_names)]; 175 struct regulator_bulk_data supplies[ARRAY_SIZE(s3c_hsotg_supply_names)];
174 176
177 u32 phyif;
175 unsigned int dedicated_fifos:1; 178 unsigned int dedicated_fifos:1;
176 unsigned char num_of_eps; 179 unsigned char num_of_eps;
177 180
@@ -2086,13 +2089,13 @@ static void s3c_hsotg_irq_enumdone(struct s3c_hsotg *hsotg)
2086 case DSTS_EnumSpd_FS48: 2089 case DSTS_EnumSpd_FS48:
2087 hsotg->gadget.speed = USB_SPEED_FULL; 2090 hsotg->gadget.speed = USB_SPEED_FULL;
2088 ep0_mps = EP0_MPS_LIMIT; 2091 ep0_mps = EP0_MPS_LIMIT;
2089 ep_mps = 64; 2092 ep_mps = 1023;
2090 break; 2093 break;
2091 2094
2092 case DSTS_EnumSpd_HS: 2095 case DSTS_EnumSpd_HS:
2093 hsotg->gadget.speed = USB_SPEED_HIGH; 2096 hsotg->gadget.speed = USB_SPEED_HIGH;
2094 ep0_mps = EP0_MPS_LIMIT; 2097 ep0_mps = EP0_MPS_LIMIT;
2095 ep_mps = 512; 2098 ep_mps = 1024;
2096 break; 2099 break;
2097 2100
2098 case DSTS_EnumSpd_LS: 2101 case DSTS_EnumSpd_LS:
@@ -2156,6 +2159,9 @@ static void kill_all_requests(struct s3c_hsotg *hsotg,
2156 s3c_hsotg_complete_request(hsotg, ep, req, 2159 s3c_hsotg_complete_request(hsotg, ep, req,
2157 result); 2160 result);
2158 } 2161 }
2162 if(hsotg->dedicated_fifos)
2163 if ((readl(hsotg->regs + DTXFSTS(ep->index)) & 0xffff) * 4 < 3072)
2164 s3c_hsotg_txfifo_flush(hsotg, ep->index);
2159} 2165}
2160 2166
2161#define call_gadget(_hs, _entry) \ 2167#define call_gadget(_hs, _entry) \
@@ -2283,7 +2289,7 @@ static void s3c_hsotg_core_init(struct s3c_hsotg *hsotg)
2283 */ 2289 */
2284 2290
2285 /* set the PLL on, remove the HNP/SRP and set the PHY */ 2291 /* set the PLL on, remove the HNP/SRP and set the PHY */
2286 writel(GUSBCFG_PHYIf16 | GUSBCFG_TOutCal(7) | 2292 writel(hsotg->phyif | GUSBCFG_TOutCal(7) |
2287 (0x5 << 10), hsotg->regs + GUSBCFG); 2293 (0x5 << 10), hsotg->regs + GUSBCFG);
2288 2294
2289 s3c_hsotg_init_fifo(hsotg); 2295 s3c_hsotg_init_fifo(hsotg);
@@ -2908,8 +2914,11 @@ static void s3c_hsotg_phy_enable(struct s3c_hsotg *hsotg)
2908 2914
2909 dev_dbg(hsotg->dev, "pdev 0x%p\n", pdev); 2915 dev_dbg(hsotg->dev, "pdev 0x%p\n", pdev);
2910 2916
2911 if (hsotg->phy) 2917 if (hsotg->phy) {
2912 usb_phy_init(hsotg->phy); 2918 phy_init(hsotg->phy);
2919 phy_power_on(hsotg->phy);
2920 } else if (hsotg->uphy)
2921 usb_phy_init(hsotg->uphy);
2913 else if (hsotg->plat->phy_init) 2922 else if (hsotg->plat->phy_init)
2914 hsotg->plat->phy_init(pdev, hsotg->plat->phy_type); 2923 hsotg->plat->phy_init(pdev, hsotg->plat->phy_type);
2915} 2924}
@@ -2925,8 +2934,11 @@ static void s3c_hsotg_phy_disable(struct s3c_hsotg *hsotg)
2925{ 2934{
2926 struct platform_device *pdev = to_platform_device(hsotg->dev); 2935 struct platform_device *pdev = to_platform_device(hsotg->dev);
2927 2936
2928 if (hsotg->phy) 2937 if (hsotg->phy) {
2929 usb_phy_shutdown(hsotg->phy); 2938 phy_power_off(hsotg->phy);
2939 phy_exit(hsotg->phy);
2940 } else if (hsotg->uphy)
2941 usb_phy_shutdown(hsotg->uphy);
2930 else if (hsotg->plat->phy_exit) 2942 else if (hsotg->plat->phy_exit)
2931 hsotg->plat->phy_exit(pdev, hsotg->plat->phy_type); 2943 hsotg->plat->phy_exit(pdev, hsotg->plat->phy_type);
2932} 2944}
@@ -3152,7 +3164,7 @@ static void s3c_hsotg_initep(struct s3c_hsotg *hsotg,
3152 3164
3153 hs_ep->parent = hsotg; 3165 hs_ep->parent = hsotg;
3154 hs_ep->ep.name = hs_ep->name; 3166 hs_ep->ep.name = hs_ep->name;
3155 hs_ep->ep.maxpacket = epnum ? 1024 : EP0_MPS_LIMIT; 3167 usb_ep_set_maxpacket_limit(&hs_ep->ep, epnum ? 1024 : EP0_MPS_LIMIT);
3156 hs_ep->ep.ops = &s3c_hsotg_ep_ops; 3168 hs_ep->ep.ops = &s3c_hsotg_ep_ops;
3157 3169
3158 /* 3170 /*
@@ -3533,7 +3545,8 @@ static void s3c_hsotg_delete_debug(struct s3c_hsotg *hsotg)
3533static int s3c_hsotg_probe(struct platform_device *pdev) 3545static int s3c_hsotg_probe(struct platform_device *pdev)
3534{ 3546{
3535 struct s3c_hsotg_plat *plat = dev_get_platdata(&pdev->dev); 3547 struct s3c_hsotg_plat *plat = dev_get_platdata(&pdev->dev);
3536 struct usb_phy *phy; 3548 struct phy *phy;
3549 struct usb_phy *uphy;
3537 struct device *dev = &pdev->dev; 3550 struct device *dev = &pdev->dev;
3538 struct s3c_hsotg_ep *eps; 3551 struct s3c_hsotg_ep *eps;
3539 struct s3c_hsotg *hsotg; 3552 struct s3c_hsotg *hsotg;
@@ -3548,19 +3561,26 @@ static int s3c_hsotg_probe(struct platform_device *pdev)
3548 return -ENOMEM; 3561 return -ENOMEM;
3549 } 3562 }
3550 3563
3551 phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2); 3564 /*
3565 * Attempt to find a generic PHY, then look for an old style
3566 * USB PHY, finally fall back to pdata
3567 */
3568 phy = devm_phy_get(&pdev->dev, "usb2-phy");
3552 if (IS_ERR(phy)) { 3569 if (IS_ERR(phy)) {
3553 /* Fallback for pdata */ 3570 uphy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
3554 plat = dev_get_platdata(&pdev->dev); 3571 if (IS_ERR(uphy)) {
3555 if (!plat) { 3572 /* Fallback for pdata */
3556 dev_err(&pdev->dev, "no platform data or transceiver defined\n"); 3573 plat = dev_get_platdata(&pdev->dev);
3557 return -EPROBE_DEFER; 3574 if (!plat) {
3558 } else { 3575 dev_err(&pdev->dev,
3576 "no platform data or transceiver defined\n");
3577 return -EPROBE_DEFER;
3578 }
3559 hsotg->plat = plat; 3579 hsotg->plat = plat;
3560 } 3580 } else
3561 } else { 3581 hsotg->uphy = uphy;
3582 } else
3562 hsotg->phy = phy; 3583 hsotg->phy = phy;
3563 }
3564 3584
3565 hsotg->dev = dev; 3585 hsotg->dev = dev;
3566 3586
@@ -3627,6 +3647,19 @@ static int s3c_hsotg_probe(struct platform_device *pdev)
3627 goto err_supplies; 3647 goto err_supplies;
3628 } 3648 }
3629 3649
3650 /* Set default UTMI width */
3651 hsotg->phyif = GUSBCFG_PHYIf16;
3652
3653 /*
3654 * If using the generic PHY framework, check if the PHY bus
3655 * width is 8-bit and set the phyif appropriately.
3656 */
3657 if (hsotg->phy && (phy_get_bus_width(phy) == 8))
3658 hsotg->phyif = GUSBCFG_PHYIf8;
3659
3660 if (hsotg->phy)
3661 phy_init(hsotg->phy);
3662
3630 /* usb phy enable */ 3663 /* usb phy enable */
3631 s3c_hsotg_phy_enable(hsotg); 3664 s3c_hsotg_phy_enable(hsotg);
3632 3665
@@ -3720,6 +3753,8 @@ static int s3c_hsotg_remove(struct platform_device *pdev)
3720 } 3753 }
3721 3754
3722 s3c_hsotg_phy_disable(hsotg); 3755 s3c_hsotg_phy_disable(hsotg);
3756 if (hsotg->phy)
3757 phy_exit(hsotg->phy);
3723 clk_disable_unprepare(hsotg->clk); 3758 clk_disable_unprepare(hsotg->clk);
3724 3759
3725 return 0; 3760 return 0;
@@ -3733,6 +3768,7 @@ static int s3c_hsotg_remove(struct platform_device *pdev)
3733#ifdef CONFIG_OF 3768#ifdef CONFIG_OF
3734static const struct of_device_id s3c_hsotg_of_ids[] = { 3769static const struct of_device_id s3c_hsotg_of_ids[] = {
3735 { .compatible = "samsung,s3c6400-hsotg", }, 3770 { .compatible = "samsung,s3c6400-hsotg", },
3771 { .compatible = "snps,dwc2", },
3736 { /* sentinel */ } 3772 { /* sentinel */ }
3737}; 3773};
3738MODULE_DEVICE_TABLE(of, s3c_hsotg_of_ids); 3774MODULE_DEVICE_TABLE(of, s3c_hsotg_of_ids);
diff --git a/drivers/usb/gadget/s3c-hsotg.h b/drivers/usb/gadget/s3c-hsotg.h
index d650b1295831..85f549ff8c1f 100644
--- a/drivers/usb/gadget/s3c-hsotg.h
+++ b/drivers/usb/gadget/s3c-hsotg.h
@@ -55,6 +55,7 @@
55#define GUSBCFG_HNPCap (1 << 9) 55#define GUSBCFG_HNPCap (1 << 9)
56#define GUSBCFG_SRPCap (1 << 8) 56#define GUSBCFG_SRPCap (1 << 8)
57#define GUSBCFG_PHYIf16 (1 << 3) 57#define GUSBCFG_PHYIf16 (1 << 3)
58#define GUSBCFG_PHYIf8 (0 << 3)
58#define GUSBCFG_TOutCal_MASK (0x7 << 0) 59#define GUSBCFG_TOutCal_MASK (0x7 << 0)
59#define GUSBCFG_TOutCal_SHIFT (0) 60#define GUSBCFG_TOutCal_SHIFT (0)
60#define GUSBCFG_TOutCal_LIMIT (0x7) 61#define GUSBCFG_TOutCal_LIMIT (0x7)
diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c
index 1a1a41498db2..ea4bbfe72ec0 100644
--- a/drivers/usb/gadget/s3c-hsudc.c
+++ b/drivers/usb/gadget/s3c-hsudc.c
@@ -999,7 +999,7 @@ static void s3c_hsudc_initep(struct s3c_hsudc *hsudc,
999 999
1000 hsep->dev = hsudc; 1000 hsep->dev = hsudc;
1001 hsep->ep.name = hsep->name; 1001 hsep->ep.name = hsep->name;
1002 hsep->ep.maxpacket = epnum ? 512 : 64; 1002 usb_ep_set_maxpacket_limit(&hsep->ep, epnum ? 512 : 64);
1003 hsep->ep.ops = &s3c_hsudc_ep_ops; 1003 hsep->ep.ops = &s3c_hsudc_ep_ops;
1004 hsep->fifo = hsudc->regs + S3C_BR(epnum); 1004 hsep->fifo = hsudc->regs + S3C_BR(epnum);
1005 hsep->ep.desc = NULL; 1005 hsep->ep.desc = NULL;
diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c
index c72d810e6b36..f04b2c3154de 100644
--- a/drivers/usb/gadget/s3c2410_udc.c
+++ b/drivers/usb/gadget/s3c2410_udc.c
@@ -1629,6 +1629,7 @@ static void s3c2410_udc_reinit(struct s3c2410_udc *dev)
1629 ep->ep.desc = NULL; 1629 ep->ep.desc = NULL;
1630 ep->halted = 0; 1630 ep->halted = 0;
1631 INIT_LIST_HEAD(&ep->queue); 1631 INIT_LIST_HEAD(&ep->queue);
1632 usb_ep_set_maxpacket_limit(&ep->ep, &ep->ep.maxpacket);
1632 } 1633 }
1633} 1634}
1634 1635
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c
index 2aae0d61bb19..b7d4f82872b7 100644
--- a/drivers/usb/gadget/u_ether.c
+++ b/drivers/usb/gadget/u_ether.c
@@ -753,7 +753,7 @@ static struct device_type gadget_type = {
753 * gadget driver using this framework. The link layer addresses are 753 * gadget driver using this framework. The link layer addresses are
754 * set up using module parameters. 754 * set up using module parameters.
755 * 755 *
756 * Returns negative errno, or zero on success 756 * Returns an eth_dev pointer on success, or an ERR_PTR on failure.
757 */ 757 */
758struct eth_dev *gether_setup_name(struct usb_gadget *g, 758struct eth_dev *gether_setup_name(struct usb_gadget *g,
759 const char *dev_addr, const char *host_addr, 759 const char *dev_addr, const char *host_addr,
diff --git a/drivers/usb/gadget/u_ether.h b/drivers/usb/gadget/u_ether.h
index fb23d1fde8eb..0f0290acea7e 100644
--- a/drivers/usb/gadget/u_ether.h
+++ b/drivers/usb/gadget/u_ether.h
@@ -106,7 +106,7 @@ struct eth_dev *gether_setup_name(struct usb_gadget *g,
106 * gadget driver using this framework. The link layer addresses are 106 * gadget driver using this framework. The link layer addresses are
107 * set up using module parameters. 107 * set up using module parameters.
108 * 108 *
109 * Returns negative errno, or zero on success 109 * Returns a eth_dev pointer on success, or an ERR_PTR on failure
110 */ 110 */
111static inline struct eth_dev *gether_setup(struct usb_gadget *g, 111static inline struct eth_dev *gether_setup(struct usb_gadget *g,
112 const char *dev_addr, const char *host_addr, 112 const char *dev_addr, const char *host_addr,
@@ -267,45 +267,4 @@ static inline bool can_support_ecm(struct usb_gadget *gadget)
267 return true; 267 return true;
268} 268}
269 269
270/* each configuration may bind one instance of an ethernet link */
271int geth_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN],
272 struct eth_dev *dev);
273int ecm_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN],
274 struct eth_dev *dev);
275
276#ifdef USB_ETH_RNDIS
277
278int rndis_bind_config_vendor(struct usb_configuration *c, u8 ethaddr[ETH_ALEN],
279 u32 vendorID, const char *manufacturer, struct eth_dev *dev);
280
281#else
282
283static inline int
284rndis_bind_config_vendor(struct usb_configuration *c, u8 ethaddr[ETH_ALEN],
285 u32 vendorID, const char *manufacturer, struct eth_dev *dev)
286{
287 return 0;
288}
289
290#endif
291
292/**
293 * rndis_bind_config - add RNDIS network link to a configuration
294 * @c: the configuration to support the network link
295 * @ethaddr: a buffer in which the ethernet address of the host side
296 * side of the link was recorded
297 * Context: single threaded during gadget setup
298 *
299 * Returns zero on success, else negative errno.
300 *
301 * Caller must have called @gether_setup(). Caller is also responsible
302 * for calling @gether_cleanup() before module unload.
303 */
304static inline int rndis_bind_config(struct usb_configuration *c,
305 u8 ethaddr[ETH_ALEN], struct eth_dev *dev)
306{
307 return rndis_bind_config_vendor(c, ethaddr, 0, NULL, dev);
308}
309
310
311#endif /* __U_ETHER_H */ 270#endif /* __U_ETHER_H */
diff --git a/drivers/usb/gadget/u_f.c b/drivers/usb/gadget/u_f.c
new file mode 100644
index 000000000000..63b6642c162b
--- /dev/null
+++ b/drivers/usb/gadget/u_f.c
@@ -0,0 +1,32 @@
1/*
2 * u_f.c -- USB function utilities for Gadget stack
3 *
4 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com
6 *
7 * Author: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#include <linux/usb/gadget.h>
15#include "u_f.h"
16
17struct usb_request *alloc_ep_req(struct usb_ep *ep, int len, int default_len)
18{
19 struct usb_request *req;
20
21 req = usb_ep_alloc_request(ep, GFP_ATOMIC);
22 if (req) {
23 req->length = len ?: default_len;
24 req->buf = kmalloc(req->length, GFP_ATOMIC);
25 if (!req->buf) {
26 usb_ep_free_request(ep, req);
27 req = NULL;
28 }
29 }
30 return req;
31}
32EXPORT_SYMBOL(alloc_ep_req);
diff --git a/drivers/usb/gadget/u_f.h b/drivers/usb/gadget/u_f.h
new file mode 100644
index 000000000000..71034c061fca
--- /dev/null
+++ b/drivers/usb/gadget/u_f.h
@@ -0,0 +1,26 @@
1/*
2 * u_f.h
3 *
4 * Utility definitions for USB functions
5 *
6 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
7 * http://www.samsung.com
8 *
9 * Author: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */
15
16#ifndef __U_F_H__
17#define __U_F_H__
18
19struct usb_ep;
20struct usb_request;
21
22struct usb_request *alloc_ep_req(struct usb_ep *ep, int len, int default_len);
23
24#endif /* __U_F_H__ */
25
26
diff --git a/drivers/usb/gadget/u_fs.h b/drivers/usb/gadget/u_fs.h
new file mode 100644
index 000000000000..bc2d3718219b
--- /dev/null
+++ b/drivers/usb/gadget/u_fs.h
@@ -0,0 +1,267 @@
1/*
2 * u_fs.h
3 *
4 * Utility definitions for the FunctionFS
5 *
6 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
7 * http://www.samsung.com
8 *
9 * Author: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */
15
16#ifndef U_FFS_H
17#define U_FFS_H
18
19#include <linux/usb/composite.h>
20#include <linux/list.h>
21#include <linux/mutex.h>
22
23#ifdef VERBOSE_DEBUG
24#ifndef pr_vdebug
25# define pr_vdebug pr_debug
26#endif /* pr_vdebug */
27# define ffs_dump_mem(prefix, ptr, len) \
28 print_hex_dump_bytes(pr_fmt(prefix ": "), DUMP_PREFIX_NONE, ptr, len)
29#else
30#ifndef pr_vdebug
31# define pr_vdebug(...) do { } while (0)
32#endif /* pr_vdebug */
33# define ffs_dump_mem(prefix, ptr, len) do { } while (0)
34#endif /* VERBOSE_DEBUG */
35
36#define ENTER() pr_vdebug("%s()\n", __func__)
37
38struct f_fs_opts;
39
40struct ffs_dev {
41 const char *name;
42 bool name_allocated;
43 bool mounted;
44 bool desc_ready;
45 bool single;
46 struct ffs_data *ffs_data;
47 struct f_fs_opts *opts;
48 struct list_head entry;
49
50 int (*ffs_ready_callback)(struct ffs_data *ffs);
51 void (*ffs_closed_callback)(struct ffs_data *ffs);
52 void *(*ffs_acquire_dev_callback)(struct ffs_dev *dev);
53 void (*ffs_release_dev_callback)(struct ffs_dev *dev);
54};
55
56extern struct mutex ffs_lock;
57
58static inline void ffs_dev_lock(void)
59{
60 mutex_lock(&ffs_lock);
61}
62
63static inline void ffs_dev_unlock(void)
64{
65 mutex_unlock(&ffs_lock);
66}
67
68struct ffs_dev *ffs_alloc_dev(void);
69int ffs_name_dev(struct ffs_dev *dev, const char *name);
70int ffs_single_dev(struct ffs_dev *dev);
71void ffs_free_dev(struct ffs_dev *dev);
72
73struct ffs_epfile;
74struct ffs_function;
75
76enum ffs_state {
77 /*
78 * Waiting for descriptors and strings.
79 *
80 * In this state no open(2), read(2) or write(2) on epfiles
81 * may succeed (which should not be the problem as there
82 * should be no such files opened in the first place).
83 */
84 FFS_READ_DESCRIPTORS,
85 FFS_READ_STRINGS,
86
87 /*
88 * We've got descriptors and strings. We are or have called
89 * functionfs_ready_callback(). functionfs_bind() may have
90 * been called but we don't know.
91 *
92 * This is the only state in which operations on epfiles may
93 * succeed.
94 */
95 FFS_ACTIVE,
96
97 /*
98 * All endpoints have been closed. This state is also set if
99 * we encounter an unrecoverable error. The only
100 * unrecoverable error is situation when after reading strings
101 * from user space we fail to initialise epfiles or
102 * functionfs_ready_callback() returns with error (<0).
103 *
104 * In this state no open(2), read(2) or write(2) (both on ep0
105 * as well as epfile) may succeed (at this point epfiles are
106 * unlinked and all closed so this is not a problem; ep0 is
107 * also closed but ep0 file exists and so open(2) on ep0 must
108 * fail).
109 */
110 FFS_CLOSING
111};
112
113enum ffs_setup_state {
114 /* There is no setup request pending. */
115 FFS_NO_SETUP,
116 /*
117 * User has read events and there was a setup request event
118 * there. The next read/write on ep0 will handle the
119 * request.
120 */
121 FFS_SETUP_PENDING,
122 /*
123 * There was event pending but before user space handled it
124 * some other event was introduced which canceled existing
125 * setup. If this state is set read/write on ep0 return
126 * -EIDRM. This state is only set when adding event.
127 */
128 FFS_SETUP_CANCELED
129};
130
131struct ffs_data {
132 struct usb_gadget *gadget;
133
134 /*
135 * Protect access read/write operations, only one read/write
136 * at a time. As a consequence protects ep0req and company.
137 * While setup request is being processed (queued) this is
138 * held.
139 */
140 struct mutex mutex;
141
142 /*
143 * Protect access to endpoint related structures (basically
144 * usb_ep_queue(), usb_ep_dequeue(), etc. calls) except for
145 * endpoint zero.
146 */
147 spinlock_t eps_lock;
148
149 /*
150 * XXX REVISIT do we need our own request? Since we are not
151 * handling setup requests immediately user space may be so
152 * slow that another setup will be sent to the gadget but this
153 * time not to us but another function and then there could be
154 * a race. Is that the case? Or maybe we can use cdev->req
155 * after all, maybe we just need some spinlock for that?
156 */
157 struct usb_request *ep0req; /* P: mutex */
158 struct completion ep0req_completion; /* P: mutex */
159 int ep0req_status; /* P: mutex */
160
161 /* reference counter */
162 atomic_t ref;
163 /* how many files are opened (EP0 and others) */
164 atomic_t opened;
165
166 /* EP0 state */
167 enum ffs_state state;
168
169 /*
170 * Possible transitions:
171 * + FFS_NO_SETUP -> FFS_SETUP_PENDING -- P: ev.waitq.lock
172 * happens only in ep0 read which is P: mutex
173 * + FFS_SETUP_PENDING -> FFS_NO_SETUP -- P: ev.waitq.lock
174 * happens only in ep0 i/o which is P: mutex
175 * + FFS_SETUP_PENDING -> FFS_SETUP_CANCELED -- P: ev.waitq.lock
176 * + FFS_SETUP_CANCELED -> FFS_NO_SETUP -- cmpxchg
177 */
178 enum ffs_setup_state setup_state;
179
180#define FFS_SETUP_STATE(ffs) \
181 ((enum ffs_setup_state)cmpxchg(&(ffs)->setup_state, \
182 FFS_SETUP_CANCELED, FFS_NO_SETUP))
183
184 /* Events & such. */
185 struct {
186 u8 types[4];
187 unsigned short count;
188 /* XXX REVISIT need to update it in some places, or do we? */
189 unsigned short can_stall;
190 struct usb_ctrlrequest setup;
191
192 wait_queue_head_t waitq;
193 } ev; /* the whole structure, P: ev.waitq.lock */
194
195 /* Flags */
196 unsigned long flags;
197#define FFS_FL_CALL_CLOSED_CALLBACK 0
198#define FFS_FL_BOUND 1
199
200 /* Active function */
201 struct ffs_function *func;
202
203 /*
204 * Device name, write once when file system is mounted.
205 * Intended for user to read if she wants.
206 */
207 const char *dev_name;
208 /* Private data for our user (ie. gadget). Managed by user. */
209 void *private_data;
210
211 /* filled by __ffs_data_got_descs() */
212 /*
213 * Real descriptors are 16 bytes after raw_descs (so you need
214 * to skip 16 bytes (ie. ffs->raw_descs + 16) to get to the
215 * first full speed descriptor). raw_descs_length and
216 * raw_fs_descs_length do not have those 16 bytes added.
217 */
218 const void *raw_descs;
219 unsigned raw_descs_length;
220 unsigned raw_fs_descs_length;
221 unsigned fs_descs_count;
222 unsigned hs_descs_count;
223
224 unsigned short strings_count;
225 unsigned short interfaces_count;
226 unsigned short eps_count;
227 unsigned short _pad1;
228
229 /* filled by __ffs_data_got_strings() */
230 /* ids in stringtabs are set in functionfs_bind() */
231 const void *raw_strings;
232 struct usb_gadget_strings **stringtabs;
233
234 /*
235 * File system's super block, write once when file system is
236 * mounted.
237 */
238 struct super_block *sb;
239
240 /* File permissions, written once when fs is mounted */
241 struct ffs_file_perms {
242 umode_t mode;
243 kuid_t uid;
244 kgid_t gid;
245 } file_perms;
246
247 /*
248 * The endpoint files, filled by ffs_epfiles_create(),
249 * destroyed by ffs_epfiles_destroy().
250 */
251 struct ffs_epfile *epfiles;
252};
253
254
255struct f_fs_opts {
256 struct usb_function_instance func_inst;
257 struct ffs_dev *dev;
258 unsigned refcnt;
259 bool no_configfs;
260};
261
262static inline struct f_fs_opts *to_f_fs_opts(struct usb_function_instance *fi)
263{
264 return container_of(fi, struct f_fs_opts, func_inst);
265}
266
267#endif /* U_FFS_H */
diff --git a/drivers/usb/gadget/u_rndis.h b/drivers/usb/gadget/u_rndis.h
index c62ba82e9600..7291b15c9dce 100644
--- a/drivers/usb/gadget/u_rndis.h
+++ b/drivers/usb/gadget/u_rndis.h
@@ -36,6 +36,8 @@ struct f_rndis_opts {
36 int refcnt; 36 int refcnt;
37}; 37};
38 38
39int rndis_init(void);
40void rndis_exit(void);
39void rndis_borrow_net(struct usb_function_instance *f, struct net_device *net); 41void rndis_borrow_net(struct usb_function_instance *f, struct net_device *net);
40 42
41#endif /* U_RNDIS_H */ 43#endif /* U_RNDIS_H */
diff --git a/drivers/usb/gadget/usbstring.c b/drivers/usb/gadget/usbstring.c
index 1f49fce0f0b7..73a4dfba0edb 100644
--- a/drivers/usb/gadget/usbstring.c
+++ b/drivers/usb/gadget/usbstring.c
@@ -13,7 +13,6 @@
13#include <linux/list.h> 13#include <linux/list.h>
14#include <linux/string.h> 14#include <linux/string.h>
15#include <linux/device.h> 15#include <linux/device.h>
16#include <linux/init.h>
17#include <linux/nls.h> 16#include <linux/nls.h>
18 17
19#include <linux/usb/ch9.h> 18#include <linux/usb/ch9.h>
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c
index f49b0b61ecc8..9f170c53e3d9 100644
--- a/drivers/usb/gadget/zero.c
+++ b/drivers/usb/gadget/zero.c
@@ -64,10 +64,10 @@ static bool loopdefault = 0;
64module_param(loopdefault, bool, S_IRUGO|S_IWUSR); 64module_param(loopdefault, bool, S_IRUGO|S_IWUSR);
65 65
66static struct usb_zero_options gzero_options = { 66static struct usb_zero_options gzero_options = {
67 .isoc_interval = 4, 67 .isoc_interval = GZERO_ISOC_INTERVAL,
68 .isoc_maxpacket = 1024, 68 .isoc_maxpacket = GZERO_ISOC_MAXPACKET,
69 .bulk_buflen = 4096, 69 .bulk_buflen = GZERO_BULK_BUFLEN,
70 .qlen = 32, 70 .qlen = GZERO_QLEN,
71}; 71};
72 72
73/*-------------------------------------------------------------------------*/ 73/*-------------------------------------------------------------------------*/
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
index 01e879ef3654..7530468c9a4f 100644
--- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile
@@ -2,8 +2,6 @@
2# Makefile for USB Host Controller Drivers 2# Makefile for USB Host Controller Drivers
3# 3#
4 4
5ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
6
7# tell define_trace.h where to find the xhci trace header 5# tell define_trace.h where to find the xhci trace header
8CFLAGS_xhci-trace.o := -I$(src) 6CFLAGS_xhci-trace.o := -I$(src)
9 7
diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
index 284f8417eae5..ec9f7b75d497 100644
--- a/drivers/usb/host/ehci-atmel.c
+++ b/drivers/usb/host/ehci-atmel.c
@@ -153,6 +153,7 @@ static int ehci_atmel_drv_probe(struct platform_device *pdev)
153 retval = usb_add_hcd(hcd, irq, IRQF_SHARED); 153 retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
154 if (retval) 154 if (retval)
155 goto fail_add_hcd; 155 goto fail_add_hcd;
156 device_wakeup_enable(hcd->self.controller);
156 157
157 return retval; 158 return retval;
158 159
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c
index 4a9c2edbcb2b..524cbf26d992 100644
--- a/drivers/usb/host/ehci-dbg.c
+++ b/drivers/usb/host/ehci-dbg.c
@@ -18,7 +18,7 @@
18 18
19/* this file is part of ehci-hcd.c */ 19/* this file is part of ehci-hcd.c */
20 20
21#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 21#ifdef CONFIG_DYNAMIC_DEBUG
22 22
23/* check the values in the HCSPARAMS register 23/* check the values in the HCSPARAMS register
24 * (host controller _Structural_ parameters) 24 * (host controller _Structural_ parameters)
@@ -62,7 +62,7 @@ static inline void dbg_hcs_params (struct ehci_hcd *ehci, char *label) {}
62 62
63#endif 63#endif
64 64
65#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 65#ifdef CONFIG_DYNAMIC_DEBUG
66 66
67/* check the values in the HCCPARAMS register 67/* check the values in the HCCPARAMS register
68 * (host controller _Capability_ parameters) 68 * (host controller _Capability_ parameters)
@@ -101,7 +101,7 @@ static inline void dbg_hcc_params (struct ehci_hcd *ehci, char *label) {}
101 101
102#endif 102#endif
103 103
104#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 104#ifdef CONFIG_DYNAMIC_DEBUG
105 105
106static void __maybe_unused 106static void __maybe_unused
107dbg_qtd (const char *label, struct ehci_hcd *ehci, struct ehci_qtd *qtd) 107dbg_qtd (const char *label, struct ehci_hcd *ehci, struct ehci_qtd *qtd)
@@ -301,7 +301,7 @@ static inline int __maybe_unused
301dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status) 301dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status)
302{ return 0; } 302{ return 0; }
303 303
304#endif /* DEBUG || CONFIG_DYNAMIC_DEBUG */ 304#endif /* CONFIG_DYNAMIC_DEBUG */
305 305
306/* functions have the "wrong" filename when they're output... */ 306/* functions have the "wrong" filename when they're output... */
307#define dbg_status(ehci, label, status) { \ 307#define dbg_status(ehci, label, status) { \
@@ -818,7 +818,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf)
818 818
819#ifdef CONFIG_PCI 819#ifdef CONFIG_PCI
820 /* EHCI 0.96 and later may have "extended capabilities" */ 820 /* EHCI 0.96 and later may have "extended capabilities" */
821 if (hcd->self.controller->bus == &pci_bus_type) { 821 if (dev_is_pci(hcd->self.controller)) {
822 struct pci_dev *pdev; 822 struct pci_dev *pdev;
823 u32 offset, cap, cap2; 823 u32 offset, cap, cap2;
824 unsigned count = 256/4; 824 unsigned count = 256/4;
diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c
index e97c198e052f..d1d8c47777c5 100644
--- a/drivers/usb/host/ehci-exynos.c
+++ b/drivers/usb/host/ehci-exynos.c
@@ -166,6 +166,7 @@ skip_phy:
166 dev_err(&pdev->dev, "Failed to add USB HCD\n"); 166 dev_err(&pdev->dev, "Failed to add USB HCD\n");
167 goto fail_add_hcd; 167 goto fail_add_hcd;
168 } 168 }
169 device_wakeup_enable(hcd->self.controller);
169 170
170 platform_set_drvdata(pdev, hcd); 171 platform_set_drvdata(pdev, hcd);
171 172
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index a06d5012201f..6f2c8d3899d2 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -102,19 +102,11 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver,
102 } 102 }
103 hcd->rsrc_start = res->start; 103 hcd->rsrc_start = res->start;
104 hcd->rsrc_len = resource_size(res); 104 hcd->rsrc_len = resource_size(res);
105 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, 105 hcd->regs = devm_ioremap_resource(&pdev->dev, res);
106 driver->description)) { 106 if (IS_ERR(hcd->regs)) {
107 dev_dbg(&pdev->dev, "controller already in use\n"); 107 retval = PTR_ERR(hcd->regs);
108 retval = -EBUSY;
109 goto err2; 108 goto err2;
110 } 109 }
111 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
112
113 if (hcd->regs == NULL) {
114 dev_dbg(&pdev->dev, "error mapping memory\n");
115 retval = -EFAULT;
116 goto err3;
117 }
118 110
119 pdata->regs = hcd->regs; 111 pdata->regs = hcd->regs;
120 112
@@ -126,7 +118,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver,
126 */ 118 */
127 if (pdata->init && pdata->init(pdev)) { 119 if (pdata->init && pdata->init(pdev)) {
128 retval = -ENODEV; 120 retval = -ENODEV;
129 goto err4; 121 goto err2;
130 } 122 }
131 123
132 /* Enable USB controller, 83xx or 8536 */ 124 /* Enable USB controller, 83xx or 8536 */
@@ -137,7 +129,8 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver,
137 129
138 retval = usb_add_hcd(hcd, irq, IRQF_SHARED); 130 retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
139 if (retval != 0) 131 if (retval != 0)
140 goto err4; 132 goto err2;
133 device_wakeup_enable(hcd->self.controller);
141 134
142#ifdef CONFIG_USB_OTG 135#ifdef CONFIG_USB_OTG
143 if (pdata->operating_mode == FSL_USB2_DR_OTG) { 136 if (pdata->operating_mode == FSL_USB2_DR_OTG) {
@@ -152,21 +145,17 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver,
152 &ehci_to_hcd(ehci)->self); 145 &ehci_to_hcd(ehci)->self);
153 if (retval) { 146 if (retval) {
154 usb_put_phy(hcd->phy); 147 usb_put_phy(hcd->phy);
155 goto err4; 148 goto err2;
156 } 149 }
157 } else { 150 } else {
158 dev_err(&pdev->dev, "can't find phy\n"); 151 dev_err(&pdev->dev, "can't find phy\n");
159 retval = -ENODEV; 152 retval = -ENODEV;
160 goto err4; 153 goto err2;
161 } 154 }
162 } 155 }
163#endif 156#endif
164 return retval; 157 return retval;
165 158
166 err4:
167 iounmap(hcd->regs);
168 err3:
169 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
170 err2: 159 err2:
171 usb_put_hcd(hcd); 160 usb_put_hcd(hcd);
172 err1: 161 err1:
@@ -205,8 +194,6 @@ static void usb_hcd_fsl_remove(struct usb_hcd *hcd,
205 */ 194 */
206 if (pdata->exit) 195 if (pdata->exit)
207 pdata->exit(pdev); 196 pdata->exit(pdev);
208 iounmap(hcd->regs);
209 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
210 usb_put_hcd(hcd); 197 usb_put_hcd(hcd);
211} 198}
212 199
@@ -267,7 +254,7 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd,
267 if (!(spin_event_timeout(in_be32(non_ehci + FSL_SOC_USB_CTRL) & 254 if (!(spin_event_timeout(in_be32(non_ehci + FSL_SOC_USB_CTRL) &
268 PHY_CLK_VALID, FSL_USB_PHY_CLK_TIMEOUT, 0) || 255 PHY_CLK_VALID, FSL_USB_PHY_CLK_TIMEOUT, 0) ||
269 in_be32(non_ehci + FSL_SOC_USB_PRICTRL))) { 256 in_be32(non_ehci + FSL_SOC_USB_PRICTRL))) {
270 printk(KERN_WARNING "fsl-ehci: USB PHY clock invalid\n"); 257 dev_warn(hcd->self.controller, "USB PHY clock invalid\n");
271 return -EINVAL; 258 return -EINVAL;
272 } 259 }
273 } 260 }
@@ -413,7 +400,7 @@ static int ehci_fsl_mpc512x_drv_suspend(struct device *dev)
413 struct fsl_usb2_platform_data *pdata = dev_get_platdata(dev); 400 struct fsl_usb2_platform_data *pdata = dev_get_platdata(dev);
414 u32 tmp; 401 u32 tmp;
415 402
416#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 403#ifdef CONFIG_DYNAMIC_DEBUG
417 u32 mode = ehci_readl(ehci, hcd->regs + FSL_SOC_USB_USBMODE); 404 u32 mode = ehci_readl(ehci, hcd->regs + FSL_SOC_USB_USBMODE);
418 mode &= USBMODE_CM_MASK; 405 mode &= USBMODE_CM_MASK;
419 tmp = ehci_readl(ehci, hcd->regs + 0x140); /* usbcmd */ 406 tmp = ehci_readl(ehci, hcd->regs + 0x140); /* usbcmd */
diff --git a/drivers/usb/host/ehci-grlib.c b/drivers/usb/host/ehci-grlib.c
index b52a66ce92e8..495b6fbcbcd9 100644
--- a/drivers/usb/host/ehci-grlib.c
+++ b/drivers/usb/host/ehci-grlib.c
@@ -113,7 +113,8 @@ static int ehci_hcd_grlib_probe(struct platform_device *op)
113 113
114 irq = irq_of_parse_and_map(dn, 0); 114 irq = irq_of_parse_and_map(dn, 0);
115 if (irq == NO_IRQ) { 115 if (irq == NO_IRQ) {
116 printk(KERN_ERR "%s: irq_of_parse_and_map failed\n", __FILE__); 116 dev_err(&op->dev, "%s: irq_of_parse_and_map failed\n",
117 __FILE__);
117 rv = -EBUSY; 118 rv = -EBUSY;
118 goto err_irq; 119 goto err_irq;
119 } 120 }
@@ -140,6 +141,7 @@ static int ehci_hcd_grlib_probe(struct platform_device *op)
140 if (rv) 141 if (rv)
141 goto err_ioremap; 142 goto err_ioremap;
142 143
144 device_wakeup_enable(hcd->self.controller);
143 return 0; 145 return 0;
144 146
145err_ioremap: 147err_ioremap:
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index e8ba4c44223a..471142725ffe 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -71,7 +71,6 @@
71static const char hcd_name [] = "ehci_hcd"; 71static const char hcd_name [] = "ehci_hcd";
72 72
73 73
74#undef VERBOSE_DEBUG
75#undef EHCI_URB_TRACE 74#undef EHCI_URB_TRACE
76 75
77/* magic numbers that can affect system performance */ 76/* magic numbers that can affect system performance */
@@ -714,13 +713,6 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
714 cmd = ehci_readl(ehci, &ehci->regs->command); 713 cmd = ehci_readl(ehci, &ehci->regs->command);
715 bh = 0; 714 bh = 0;
716 715
717#ifdef VERBOSE_DEBUG
718 /* unrequested/ignored: Frame List Rollover */
719 dbg_status (ehci, "irq", status);
720#endif
721
722 /* INT, ERR, and IAA interrupt rates can be throttled */
723
724 /* normal [4.15.1.2] or error [4.15.1.1] completion */ 716 /* normal [4.15.1.2] or error [4.15.1.1] completion */
725 if (likely ((status & (STS_INT|STS_ERR)) != 0)) { 717 if (likely ((status & (STS_INT|STS_ERR)) != 0)) {
726 if (likely ((status & STS_ERR) == 0)) 718 if (likely ((status & STS_ERR) == 0))
@@ -1320,7 +1312,7 @@ static int __init ehci_hcd_init(void)
1320 sizeof(struct ehci_qh), sizeof(struct ehci_qtd), 1312 sizeof(struct ehci_qh), sizeof(struct ehci_qtd),
1321 sizeof(struct ehci_itd), sizeof(struct ehci_sitd)); 1313 sizeof(struct ehci_itd), sizeof(struct ehci_sitd));
1322 1314
1323#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 1315#ifdef CONFIG_DYNAMIC_DEBUG
1324 ehci_debug_root = debugfs_create_dir("ehci", usb_debug_root); 1316 ehci_debug_root = debugfs_create_dir("ehci", usb_debug_root);
1325 if (!ehci_debug_root) { 1317 if (!ehci_debug_root) {
1326 retval = -ENOENT; 1318 retval = -ENOENT;
@@ -1369,7 +1361,7 @@ clean2:
1369 platform_driver_unregister(&PLATFORM_DRIVER); 1361 platform_driver_unregister(&PLATFORM_DRIVER);
1370clean0: 1362clean0:
1371#endif 1363#endif
1372#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 1364#ifdef CONFIG_DYNAMIC_DEBUG
1373 debugfs_remove(ehci_debug_root); 1365 debugfs_remove(ehci_debug_root);
1374 ehci_debug_root = NULL; 1366 ehci_debug_root = NULL;
1375err_debug: 1367err_debug:
@@ -1393,7 +1385,7 @@ static void __exit ehci_hcd_cleanup(void)
1393#ifdef PS3_SYSTEM_BUS_DRIVER 1385#ifdef PS3_SYSTEM_BUS_DRIVER
1394 ps3_ehci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); 1386 ps3_ehci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
1395#endif 1387#endif
1396#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 1388#ifdef CONFIG_DYNAMIC_DEBUG
1397 debugfs_remove(ehci_debug_root); 1389 debugfs_remove(ehci_debug_root);
1398#endif 1390#endif
1399 clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded); 1391 clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 835fc0844a66..47b858fc50b2 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -1114,10 +1114,8 @@ static int ehci_hub_control (
1114 if (test_bit(wIndex, &ehci->port_c_suspend)) 1114 if (test_bit(wIndex, &ehci->port_c_suspend))
1115 status |= USB_PORT_STAT_C_SUSPEND << 16; 1115 status |= USB_PORT_STAT_C_SUSPEND << 16;
1116 1116
1117#ifndef VERBOSE_DEBUG 1117 if (status & ~0xffff) /* only if wPortChange is interesting */
1118 if (status & ~0xffff) /* only if wPortChange is interesting */ 1118 dbg_port(ehci, "GetStatus", wIndex + 1, temp);
1119#endif
1120 dbg_port (ehci, "GetStatus", wIndex + 1, temp);
1121 put_unaligned_le32(status, buf); 1119 put_unaligned_le32(status, buf);
1122 break; 1120 break;
1123 case SetHubFeature: 1121 case SetHubFeature:
diff --git a/drivers/usb/host/ehci-mv.c b/drivers/usb/host/ehci-mv.c
index 417c10da9450..bd61612a7251 100644
--- a/drivers/usb/host/ehci-mv.c
+++ b/drivers/usb/host/ehci-mv.c
@@ -178,7 +178,7 @@ static int mv_ehci_probe(struct platform_device *pdev)
178 178
179 ehci_mv->phy_regs = devm_ioremap(&pdev->dev, r->start, 179 ehci_mv->phy_regs = devm_ioremap(&pdev->dev, r->start,
180 resource_size(r)); 180 resource_size(r));
181 if (ehci_mv->phy_regs == 0) { 181 if (!ehci_mv->phy_regs) {
182 dev_err(&pdev->dev, "failed to map phy I/O memory\n"); 182 dev_err(&pdev->dev, "failed to map phy I/O memory\n");
183 retval = -EFAULT; 183 retval = -EFAULT;
184 goto err_put_hcd; 184 goto err_put_hcd;
@@ -257,6 +257,7 @@ static int mv_ehci_probe(struct platform_device *pdev)
257 "failed to add hcd with err %d\n", retval); 257 "failed to add hcd with err %d\n", retval);
258 goto err_set_vbus; 258 goto err_set_vbus;
259 } 259 }
260 device_wakeup_enable(hcd->self.controller);
260 } 261 }
261 262
262 if (pdata->private_init) 263 if (pdata->private_init)
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
index 0528dc4526c8..dbe5e4eea08d 100644
--- a/drivers/usb/host/ehci-mxc.c
+++ b/drivers/usb/host/ehci-mxc.c
@@ -155,6 +155,7 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
155 if (ret) 155 if (ret)
156 goto err_add; 156 goto err_add;
157 157
158 device_wakeup_enable(hcd->self.controller);
158 return 0; 159 return 0;
159 160
160err_add: 161err_add:
diff --git a/drivers/usb/host/ehci-octeon.c b/drivers/usb/host/ehci-octeon.c
index 4c528b2c033a..9051439039a7 100644
--- a/drivers/usb/host/ehci-octeon.c
+++ b/drivers/usb/host/ehci-octeon.c
@@ -128,20 +128,12 @@ static int ehci_octeon_drv_probe(struct platform_device *pdev)
128 hcd->rsrc_start = res_mem->start; 128 hcd->rsrc_start = res_mem->start;
129 hcd->rsrc_len = resource_size(res_mem); 129 hcd->rsrc_len = resource_size(res_mem);
130 130
131 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, 131 hcd->regs = devm_ioremap_resource(&pdev->dev, res_mem);
132 OCTEON_EHCI_HCD_NAME)) { 132 if (IS_ERR(hcd->regs)) {
133 dev_err(&pdev->dev, "request_mem_region failed\n"); 133 ret = PTR_ERR(hcd->regs);
134 ret = -EBUSY;
135 goto err1; 134 goto err1;
136 } 135 }
137 136
138 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
139 if (!hcd->regs) {
140 dev_err(&pdev->dev, "ioremap failed\n");
141 ret = -ENOMEM;
142 goto err2;
143 }
144
145 ehci_octeon_start(); 137 ehci_octeon_start();
146 138
147 ehci = hcd_to_ehci(hcd); 139 ehci = hcd_to_ehci(hcd);
@@ -156,18 +148,16 @@ static int ehci_octeon_drv_probe(struct platform_device *pdev)
156 ret = usb_add_hcd(hcd, irq, IRQF_SHARED); 148 ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
157 if (ret) { 149 if (ret) {
158 dev_dbg(&pdev->dev, "failed to add hcd with err %d\n", ret); 150 dev_dbg(&pdev->dev, "failed to add hcd with err %d\n", ret);
159 goto err3; 151 goto err2;
160 } 152 }
153 device_wakeup_enable(hcd->self.controller);
161 154
162 platform_set_drvdata(pdev, hcd); 155 platform_set_drvdata(pdev, hcd);
163 156
164 return 0; 157 return 0;
165err3: 158err2:
166 ehci_octeon_stop(); 159 ehci_octeon_stop();
167 160
168 iounmap(hcd->regs);
169err2:
170 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
171err1: 161err1:
172 usb_put_hcd(hcd); 162 usb_put_hcd(hcd);
173 return ret; 163 return ret;
@@ -180,8 +170,6 @@ static int ehci_octeon_drv_remove(struct platform_device *pdev)
180 usb_remove_hcd(hcd); 170 usb_remove_hcd(hcd);
181 171
182 ehci_octeon_stop(); 172 ehci_octeon_stop();
183 iounmap(hcd->regs);
184 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
185 usb_put_hcd(hcd); 173 usb_put_hcd(hcd);
186 174
187 return 0; 175 return 0;
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 6fa82d6b7661..a24720beb39d 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -215,6 +215,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
215 dev_err(dev, "failed to add hcd with err %d\n", ret); 215 dev_err(dev, "failed to add hcd with err %d\n", ret);
216 goto err_pm_runtime; 216 goto err_pm_runtime;
217 } 217 }
218 device_wakeup_enable(hcd->self.controller);
218 219
219 /* 220 /*
220 * Bring PHYs out of reset for non PHY modes. 221 * Bring PHYs out of reset for non PHY modes.
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c
index 2ba76730e650..30d35e5e503a 100644
--- a/drivers/usb/host/ehci-orion.c
+++ b/drivers/usb/host/ehci-orion.c
@@ -184,33 +184,23 @@ static int ehci_orion_drv_probe(struct platform_device *pdev)
184 if (err) 184 if (err)
185 goto err1; 185 goto err1;
186 186
187 if (!request_mem_region(res->start, resource_size(res), 187 regs = devm_ioremap_resource(&pdev->dev, res);
188 ehci_orion_hc_driver.description)) { 188 if (IS_ERR(regs)) {
189 dev_dbg(&pdev->dev, "controller already in use\n"); 189 err = PTR_ERR(regs);
190 err = -EBUSY;
191 goto err1; 190 goto err1;
192 } 191 }
193 192
194 regs = ioremap(res->start, resource_size(res));
195 if (regs == NULL) {
196 dev_dbg(&pdev->dev, "error mapping memory\n");
197 err = -EFAULT;
198 goto err2;
199 }
200
201 /* Not all platforms can gate the clock, so it is not 193 /* Not all platforms can gate the clock, so it is not
202 an error if the clock does not exists. */ 194 an error if the clock does not exists. */
203 clk = clk_get(&pdev->dev, NULL); 195 clk = devm_clk_get(&pdev->dev, NULL);
204 if (!IS_ERR(clk)) { 196 if (!IS_ERR(clk))
205 clk_prepare_enable(clk); 197 clk_prepare_enable(clk);
206 clk_put(clk);
207 }
208 198
209 hcd = usb_create_hcd(&ehci_orion_hc_driver, 199 hcd = usb_create_hcd(&ehci_orion_hc_driver,
210 &pdev->dev, dev_name(&pdev->dev)); 200 &pdev->dev, dev_name(&pdev->dev));
211 if (!hcd) { 201 if (!hcd) {
212 err = -ENOMEM; 202 err = -ENOMEM;
213 goto err3; 203 goto err2;
214 } 204 }
215 205
216 hcd->rsrc_start = res->start; 206 hcd->rsrc_start = res->start;
@@ -245,25 +235,21 @@ static int ehci_orion_drv_probe(struct platform_device *pdev)
245 case EHCI_PHY_DD: 235 case EHCI_PHY_DD:
246 case EHCI_PHY_KW: 236 case EHCI_PHY_KW:
247 default: 237 default:
248 printk(KERN_WARNING "Orion ehci -USB phy version isn't supported.\n"); 238 dev_warn(&pdev->dev, "USB phy version isn't supported.\n");
249 } 239 }
250 240
251 err = usb_add_hcd(hcd, irq, IRQF_SHARED); 241 err = usb_add_hcd(hcd, irq, IRQF_SHARED);
252 if (err) 242 if (err)
253 goto err4; 243 goto err3;
254 244
245 device_wakeup_enable(hcd->self.controller);
255 return 0; 246 return 0;
256 247
257err4:
258 usb_put_hcd(hcd);
259err3: 248err3:
260 if (!IS_ERR(clk)) { 249 usb_put_hcd(hcd);
261 clk_disable_unprepare(clk);
262 clk_put(clk);
263 }
264 iounmap(regs);
265err2: 250err2:
266 release_mem_region(res->start, resource_size(res)); 251 if (!IS_ERR(clk))
252 clk_disable_unprepare(clk);
267err1: 253err1:
268 dev_err(&pdev->dev, "init %s fail, %d\n", 254 dev_err(&pdev->dev, "init %s fail, %d\n",
269 dev_name(&pdev->dev), err); 255 dev_name(&pdev->dev), err);
@@ -277,15 +263,11 @@ static int ehci_orion_drv_remove(struct platform_device *pdev)
277 struct clk *clk; 263 struct clk *clk;
278 264
279 usb_remove_hcd(hcd); 265 usb_remove_hcd(hcd);
280 iounmap(hcd->regs);
281 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
282 usb_put_hcd(hcd); 266 usb_put_hcd(hcd);
283 267
284 clk = clk_get(&pdev->dev, NULL); 268 clk = devm_clk_get(&pdev->dev, NULL);
285 if (!IS_ERR(clk)) { 269 if (!IS_ERR(clk))
286 clk_disable_unprepare(clk); 270 clk_disable_unprepare(clk);
287 clk_put(clk);
288 }
289 return 0; 271 return 0;
290} 272}
291 273
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index 7f30b7168d5a..01536cfd361d 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -132,6 +132,7 @@ static int ehci_platform_probe(struct platform_device *dev)
132 if (err) 132 if (err)
133 goto err_put_hcd; 133 goto err_put_hcd;
134 134
135 device_wakeup_enable(hcd->self.controller);
135 platform_set_drvdata(dev, hcd); 136 platform_set_drvdata(dev, hcd);
136 137
137 return err; 138 return err;
diff --git a/drivers/usb/host/ehci-pmcmsp.c b/drivers/usb/host/ehci-pmcmsp.c
index 893b707f0000..af3974a5e7c2 100644
--- a/drivers/usb/host/ehci-pmcmsp.c
+++ b/drivers/usb/host/ehci-pmcmsp.c
@@ -210,8 +210,10 @@ int usb_hcd_msp_probe(const struct hc_driver *driver,
210 210
211 211
212 retval = usb_add_hcd(hcd, res->start, IRQF_SHARED); 212 retval = usb_add_hcd(hcd, res->start, IRQF_SHARED);
213 if (retval == 0) 213 if (retval == 0) {
214 device_wakeup_enable(hcd->self.controller);
214 return 0; 215 return 0;
216 }
215 217
216 usb_remove_hcd(hcd); 218 usb_remove_hcd(hcd);
217err3: 219err3:
diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c
index 875d2fcc9e0e..547924796d29 100644
--- a/drivers/usb/host/ehci-ppc-of.c
+++ b/drivers/usb/host/ehci-ppc-of.c
@@ -119,7 +119,8 @@ static int ehci_hcd_ppc_of_probe(struct platform_device *op)
119 119
120 irq = irq_of_parse_and_map(dn, 0); 120 irq = irq_of_parse_and_map(dn, 0);
121 if (irq == NO_IRQ) { 121 if (irq == NO_IRQ) {
122 printk(KERN_ERR "%s: irq_of_parse_and_map failed\n", __FILE__); 122 dev_err(&op->dev, "%s: irq_of_parse_and_map failed\n",
123 __FILE__);
123 rv = -EBUSY; 124 rv = -EBUSY;
124 goto err_irq; 125 goto err_irq;
125 } 126 }
@@ -169,6 +170,7 @@ static int ehci_hcd_ppc_of_probe(struct platform_device *op)
169 if (rv) 170 if (rv)
170 goto err_ioremap; 171 goto err_ioremap;
171 172
173 device_wakeup_enable(hcd->self.controller);
172 return 0; 174 return 0;
173 175
174err_ioremap: 176err_ioremap:
diff --git a/drivers/usb/host/ehci-ps3.c b/drivers/usb/host/ehci-ps3.c
index 8188542ba17e..7934ff9b35e1 100644
--- a/drivers/usb/host/ehci-ps3.c
+++ b/drivers/usb/host/ehci-ps3.c
@@ -189,6 +189,7 @@ static int ps3_ehci_probe(struct ps3_system_bus_device *dev)
189 goto fail_add_hcd; 189 goto fail_add_hcd;
190 } 190 }
191 191
192 device_wakeup_enable(hcd->self.controller);
192 return result; 193 return result;
193 194
194fail_add_hcd: 195fail_add_hcd:
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index db05bd8ee9d5..54f5332f814d 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -168,13 +168,13 @@ static void ehci_clear_tt_buffer(struct ehci_hcd *ehci, struct ehci_qh *qh,
168 * Note: this routine is never called for Isochronous transfers. 168 * Note: this routine is never called for Isochronous transfers.
169 */ 169 */
170 if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) { 170 if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) {
171#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 171#ifdef CONFIG_DYNAMIC_DEBUG
172 struct usb_device *tt = urb->dev->tt->hub; 172 struct usb_device *tt = urb->dev->tt->hub;
173 dev_dbg(&tt->dev, 173 dev_dbg(&tt->dev,
174 "clear tt buffer port %d, a%d ep%d t%08x\n", 174 "clear tt buffer port %d, a%d ep%d t%08x\n",
175 urb->dev->ttport, urb->dev->devnum, 175 urb->dev->ttport, urb->dev->devnum,
176 usb_pipeendpoint(urb->pipe), token); 176 usb_pipeendpoint(urb->pipe), token);
177#endif /* DEBUG || CONFIG_DYNAMIC_DEBUG */ 177#endif /* CONFIG_DYNAMIC_DEBUG */
178 if (!ehci_is_TDI(ehci) 178 if (!ehci_is_TDI(ehci)
179 || urb->dev->tt->hub != 179 || urb->dev->tt->hub !=
180 ehci_to_hcd(ehci)->self.root_hub) { 180 ehci_to_hcd(ehci)->self.root_hub) {
diff --git a/drivers/usb/host/ehci-sead3.c b/drivers/usb/host/ehci-sead3.c
index 8a734498079b..cf1267673868 100644
--- a/drivers/usb/host/ehci-sead3.c
+++ b/drivers/usb/host/ehci-sead3.c
@@ -126,6 +126,7 @@ static int ehci_hcd_sead3_drv_probe(struct platform_device *pdev)
126 IRQF_SHARED); 126 IRQF_SHARED);
127 if (ret == 0) { 127 if (ret == 0) {
128 platform_set_drvdata(pdev, hcd); 128 platform_set_drvdata(pdev, hcd);
129 device_wakeup_enable(hcd->self.controller);
129 return ret; 130 return ret;
130 } 131 }
131 132
diff --git a/drivers/usb/host/ehci-sh.c b/drivers/usb/host/ehci-sh.c
index dc899eb2b861..9b9b9f5b016e 100644
--- a/drivers/usb/host/ehci-sh.c
+++ b/drivers/usb/host/ehci-sh.c
@@ -151,6 +151,7 @@ static int ehci_hcd_sh_probe(struct platform_device *pdev)
151 dev_err(&pdev->dev, "Failed to add hcd"); 151 dev_err(&pdev->dev, "Failed to add hcd");
152 goto fail_add_hcd; 152 goto fail_add_hcd;
153 } 153 }
154 device_wakeup_enable(hcd->self.controller);
154 155
155 priv->hcd = hcd; 156 priv->hcd = hcd;
156 platform_set_drvdata(pdev, priv); 157 platform_set_drvdata(pdev, priv);
diff --git a/drivers/usb/host/ehci-spear.c b/drivers/usb/host/ehci-spear.c
index ee6f9ffaa0e7..8bd915b2ae8c 100644
--- a/drivers/usb/host/ehci-spear.c
+++ b/drivers/usb/host/ehci-spear.c
@@ -130,6 +130,7 @@ static int spear_ehci_hcd_drv_probe(struct platform_device *pdev)
130 if (retval) 130 if (retval)
131 goto err_stop_ehci; 131 goto err_stop_ehci;
132 132
133 device_wakeup_enable(hcd->self.controller);
133 return retval; 134 return retval;
134 135
135err_stop_ehci: 136err_stop_ehci:
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index b9fd0396011e..a8f4471dae7b 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -455,6 +455,7 @@ static int tegra_ehci_probe(struct platform_device *pdev)
455 dev_err(&pdev->dev, "Failed to add USB HCD\n"); 455 dev_err(&pdev->dev, "Failed to add USB HCD\n");
456 goto cleanup_otg_set_host; 456 goto cleanup_otg_set_host;
457 } 457 }
458 device_wakeup_enable(hcd->self.controller);
458 459
459 return err; 460 return err;
460 461
diff --git a/drivers/usb/host/ehci-tilegx.c b/drivers/usb/host/ehci-tilegx.c
index 67026ffbf9a8..f3713d32c9a1 100644
--- a/drivers/usb/host/ehci-tilegx.c
+++ b/drivers/usb/host/ehci-tilegx.c
@@ -170,6 +170,7 @@ static int ehci_hcd_tilegx_drv_probe(struct platform_device *pdev)
170 ret = usb_add_hcd(hcd, pdata->irq, IRQF_SHARED); 170 ret = usb_add_hcd(hcd, pdata->irq, IRQF_SHARED);
171 if (ret == 0) { 171 if (ret == 0) {
172 platform_set_drvdata(pdev, hcd); 172 platform_set_drvdata(pdev, hcd);
173 device_wakeup_enable(hcd->self.controller);
173 return ret; 174 return ret;
174 } 175 }
175 176
diff --git a/drivers/usb/host/ehci-w90x900.c b/drivers/usb/host/ehci-w90x900.c
index cdad8438c02b..a9303aff125e 100644
--- a/drivers/usb/host/ehci-w90x900.c
+++ b/drivers/usb/host/ehci-w90x900.c
@@ -58,17 +58,12 @@ static int usb_w90x900_probe(const struct hc_driver *driver,
58 hcd->rsrc_start = res->start; 58 hcd->rsrc_start = res->start;
59 hcd->rsrc_len = resource_size(res); 59 hcd->rsrc_len = resource_size(res);
60 60
61 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { 61 hcd->regs = devm_ioremap_resource(&pdev->dev, res);
62 retval = -EBUSY; 62 if (IS_ERR(hcd->regs)) {
63 retval = PTR_ERR(hcd->regs);
63 goto err2; 64 goto err2;
64 } 65 }
65 66
66 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
67 if (hcd->regs == NULL) {
68 retval = -EFAULT;
69 goto err3;
70 }
71
72 ehci = hcd_to_ehci(hcd); 67 ehci = hcd_to_ehci(hcd);
73 ehci->caps = hcd->regs; 68 ehci->caps = hcd->regs;
74 ehci->regs = hcd->regs + 69 ehci->regs = hcd->regs +
@@ -88,17 +83,14 @@ static int usb_w90x900_probe(const struct hc_driver *driver,
88 83
89 irq = platform_get_irq(pdev, 0); 84 irq = platform_get_irq(pdev, 0);
90 if (irq < 0) 85 if (irq < 0)
91 goto err4; 86 goto err2;
92 87
93 retval = usb_add_hcd(hcd, irq, IRQF_SHARED); 88 retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
94 if (retval != 0) 89 if (retval != 0)
95 goto err4; 90 goto err2;
96 91
92 device_wakeup_enable(hcd->self.controller);
97 return retval; 93 return retval;
98err4:
99 iounmap(hcd->regs);
100err3:
101 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
102err2: 94err2:
103 usb_put_hcd(hcd); 95 usb_put_hcd(hcd);
104err1: 96err1:
@@ -109,8 +101,6 @@ static void usb_w90x900_remove(struct usb_hcd *hcd,
109 struct platform_device *pdev) 101 struct platform_device *pdev)
110{ 102{
111 usb_remove_hcd(hcd); 103 usb_remove_hcd(hcd);
112 iounmap(hcd->regs);
113 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
114 usb_put_hcd(hcd); 104 usb_put_hcd(hcd);
115} 105}
116 106
diff --git a/drivers/usb/host/ehci-xilinx-of.c b/drivers/usb/host/ehci-xilinx-of.c
index 95979f9f4381..fe57710753e8 100644
--- a/drivers/usb/host/ehci-xilinx-of.c
+++ b/drivers/usb/host/ehci-xilinx-of.c
@@ -155,7 +155,8 @@ static int ehci_hcd_xilinx_of_probe(struct platform_device *op)
155 155
156 irq = irq_of_parse_and_map(dn, 0); 156 irq = irq_of_parse_and_map(dn, 0);
157 if (!irq) { 157 if (!irq) {
158 printk(KERN_ERR "%s: irq_of_parse_and_map failed\n", __FILE__); 158 dev_err(&op->dev, "%s: irq_of_parse_and_map failed\n",
159 __FILE__);
159 rv = -EBUSY; 160 rv = -EBUSY;
160 goto err_irq; 161 goto err_irq;
161 } 162 }
@@ -191,8 +192,10 @@ static int ehci_hcd_xilinx_of_probe(struct platform_device *op)
191 ehci->caps = hcd->regs + 0x100; 192 ehci->caps = hcd->regs + 0x100;
192 193
193 rv = usb_add_hcd(hcd, irq, 0); 194 rv = usb_add_hcd(hcd, irq, 0);
194 if (rv == 0) 195 if (rv == 0) {
196 device_wakeup_enable(hcd->self.controller);
195 return 0; 197 return 0;
198 }
196 199
197err_irq: 200err_irq:
198 usb_put_hcd(hcd); 201 usb_put_hcd(hcd);
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index e8f41c5e771b..9dfc6c1394d6 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -38,7 +38,7 @@ typedef __u16 __bitwise __hc16;
38#endif 38#endif
39 39
40/* statistics can be kept for tuning/monitoring */ 40/* statistics can be kept for tuning/monitoring */
41#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 41#ifdef CONFIG_DYNAMIC_DEBUG
42#define EHCI_STATS 42#define EHCI_STATS
43#endif 43#endif
44 44
@@ -225,6 +225,7 @@ struct ehci_hcd { /* one per controller */
225 unsigned has_synopsys_hc_bug:1; /* Synopsys HC */ 225 unsigned has_synopsys_hc_bug:1; /* Synopsys HC */
226 unsigned frame_index_bug:1; /* MosChip (AKA NetMos) */ 226 unsigned frame_index_bug:1; /* MosChip (AKA NetMos) */
227 unsigned need_oc_pp_cycle:1; /* MPC834X port power */ 227 unsigned need_oc_pp_cycle:1; /* MPC834X port power */
228 unsigned imx28_write_fix:1; /* For Freescale i.MX28 */
228 229
229 /* required for usb32 quirk */ 230 /* required for usb32 quirk */
230 #define OHCI_CTRL_HCFS (3 << 6) 231 #define OHCI_CTRL_HCFS (3 << 6)
@@ -248,7 +249,7 @@ struct ehci_hcd { /* one per controller */
248#endif 249#endif
249 250
250 /* debug files */ 251 /* debug files */
251#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) 252#ifdef CONFIG_DYNAMIC_DEBUG
252 struct dentry *debug_dir; 253 struct dentry *debug_dir;
253#endif 254#endif
254 255
@@ -728,6 +729,18 @@ static inline unsigned int ehci_readl(const struct ehci_hcd *ehci,
728#endif 729#endif
729} 730}
730 731
732#ifdef CONFIG_SOC_IMX28
733static inline void imx28_ehci_writel(const unsigned int val,
734 volatile __u32 __iomem *addr)
735{
736 __asm__ ("swp %0, %0, [%1]" : : "r"(val), "r"(addr));
737}
738#else
739static inline void imx28_ehci_writel(const unsigned int val,
740 volatile __u32 __iomem *addr)
741{
742}
743#endif
731static inline void ehci_writel(const struct ehci_hcd *ehci, 744static inline void ehci_writel(const struct ehci_hcd *ehci,
732 const unsigned int val, __u32 __iomem *regs) 745 const unsigned int val, __u32 __iomem *regs)
733{ 746{
@@ -736,7 +749,10 @@ static inline void ehci_writel(const struct ehci_hcd *ehci,
736 writel_be(val, regs) : 749 writel_be(val, regs) :
737 writel(val, regs); 750 writel(val, regs);
738#else 751#else
739 writel(val, regs); 752 if (ehci->imx28_write_fix)
753 imx28_ehci_writel(val, regs);
754 else
755 writel(val, regs);
740#endif 756#endif
741} 757}
742 758
@@ -832,9 +848,9 @@ static inline u32 hc32_to_cpup (const struct ehci_hcd *ehci, const __hc32 *x)
832 dev_warn(ehci_to_hcd(ehci)->self.controller , fmt , ## args) 848 dev_warn(ehci_to_hcd(ehci)->self.controller , fmt , ## args)
833 849
834 850
835#if !defined(DEBUG) && !defined(CONFIG_DYNAMIC_DEBUG) 851#ifndef CONFIG_DYNAMIC_DEBUG
836#define STUB_DEBUG_FILES 852#define STUB_DEBUG_FILES
837#endif /* !DEBUG && !CONFIG_DYNAMIC_DEBUG */ 853#endif
838 854
839/*-------------------------------------------------------------------------*/ 855/*-------------------------------------------------------------------------*/
840 856
diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c
index 0551c0af0fd1..1cf68eaf2ed8 100644
--- a/drivers/usb/host/fhci-hcd.c
+++ b/drivers/usb/host/fhci-hcd.c
@@ -754,6 +754,8 @@ static int of_fhci_probe(struct platform_device *ofdev)
754 if (ret < 0) 754 if (ret < 0)
755 goto err_add_hcd; 755 goto err_add_hcd;
756 756
757 device_wakeup_enable(hcd->self.controller);
758
757 fhci_dfs_create(fhci); 759 fhci_dfs_create(fhci);
758 760
759 return 0; 761 return 0;
diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c
index 55486bd23cf1..98a89d16cc3e 100644
--- a/drivers/usb/host/fotg210-hcd.c
+++ b/drivers/usb/host/fotg210-hcd.c
@@ -56,12 +56,9 @@
56 56
57static const char hcd_name[] = "fotg210_hcd"; 57static const char hcd_name[] = "fotg210_hcd";
58 58
59#undef VERBOSE_DEBUG
60#undef FOTG210_URB_TRACE 59#undef FOTG210_URB_TRACE
61 60
62#ifdef DEBUG
63#define FOTG210_STATS 61#define FOTG210_STATS
64#endif
65 62
66/* magic numbers that can affect system performance */ 63/* magic numbers that can affect system performance */
67#define FOTG210_TUNE_CERR 3 /* 0-3 qtd retries; 0 == don't stop */ 64#define FOTG210_TUNE_CERR 3 /* 0-3 qtd retries; 0 == don't stop */
@@ -107,14 +104,6 @@ MODULE_PARM_DESC(hird, "host initiated resume duration, +1 for each 75us");
107#define fotg210_warn(fotg210, fmt, args...) \ 104#define fotg210_warn(fotg210, fmt, args...) \
108 dev_warn(fotg210_to_hcd(fotg210)->self.controller , fmt , ## args) 105 dev_warn(fotg210_to_hcd(fotg210)->self.controller , fmt , ## args)
109 106
110#ifdef VERBOSE_DEBUG
111# define fotg210_vdbg fotg210_dbg
112#else
113 static inline void fotg210_vdbg(struct fotg210_hcd *fotg210, ...) {}
114#endif
115
116#ifdef DEBUG
117
118/* check the values in the HCSPARAMS register 107/* check the values in the HCSPARAMS register
119 * (host controller _Structural_ parameters) 108 * (host controller _Structural_ parameters)
120 * see EHCI spec, Table 2-4 for each value 109 * see EHCI spec, Table 2-4 for each value
@@ -129,13 +118,6 @@ static void dbg_hcs_params(struct fotg210_hcd *fotg210, char *label)
129 HCS_N_PORTS(params) 118 HCS_N_PORTS(params)
130 ); 119 );
131} 120}
132#else
133
134static inline void dbg_hcs_params(struct fotg210_hcd *fotg210, char *label) {}
135
136#endif
137
138#ifdef DEBUG
139 121
140/* check the values in the HCCPARAMS register 122/* check the values in the HCCPARAMS register
141 * (host controller _Capability_ parameters) 123 * (host controller _Capability_ parameters)
@@ -152,13 +134,6 @@ static void dbg_hcc_params(struct fotg210_hcd *fotg210, char *label)
152 HCC_PGM_FRAMELISTLEN(params) ? "256/512/1024" : "1024", 134 HCC_PGM_FRAMELISTLEN(params) ? "256/512/1024" : "1024",
153 HCC_CANPARK(params) ? " park" : ""); 135 HCC_CANPARK(params) ? " park" : "");
154} 136}
155#else
156
157static inline void dbg_hcc_params(struct fotg210_hcd *fotg210, char *label) {}
158
159#endif
160
161#ifdef DEBUG
162 137
163static void __maybe_unused 138static void __maybe_unused
164dbg_qtd(const char *label, struct fotg210_hcd *fotg210, struct fotg210_qtd *qtd) 139dbg_qtd(const char *label, struct fotg210_hcd *fotg210, struct fotg210_qtd *qtd)
@@ -272,8 +247,8 @@ dbg_command_buf(char *buf, unsigned len, const char *label, u32 command)
272 ); 247 );
273} 248}
274 249
275static int 250static char
276dbg_port_buf(char *buf, unsigned len, const char *label, int port, u32 status) 251*dbg_port_buf(char *buf, unsigned len, const char *label, int port, u32 status)
277{ 252{
278 char *sig; 253 char *sig;
279 254
@@ -293,7 +268,7 @@ dbg_port_buf(char *buf, unsigned len, const char *label, int port, u32 status)
293 break; 268 break;
294 } 269 }
295 270
296 return scnprintf(buf, len, 271 scnprintf(buf, len,
297 "%s%sport:%d status %06x %d " 272 "%s%sport:%d status %06x %d "
298 "sig=%s%s%s%s%s%s%s%s", 273 "sig=%s%s%s%s%s%s%s%s",
299 label, label[0] ? " " : "", port, status, 274 label, label[0] ? " " : "", port, status,
@@ -306,31 +281,9 @@ dbg_port_buf(char *buf, unsigned len, const char *label, int port, u32 status)
306 (status & PORT_PE) ? " PE" : "", 281 (status & PORT_PE) ? " PE" : "",
307 (status & PORT_CSC) ? " CSC" : "", 282 (status & PORT_CSC) ? " CSC" : "",
308 (status & PORT_CONNECT) ? " CONNECT" : ""); 283 (status & PORT_CONNECT) ? " CONNECT" : "");
284 return buf;
309} 285}
310 286
311#else
312static inline void __maybe_unused
313dbg_qh(char *label, struct fotg210_hcd *fotg210, struct fotg210_qh *qh)
314{}
315
316static inline int __maybe_unused
317dbg_status_buf(char *buf, unsigned len, const char *label, u32 status)
318{ return 0; }
319
320static inline int __maybe_unused
321dbg_command_buf(char *buf, unsigned len, const char *label, u32 command)
322{ return 0; }
323
324static inline int __maybe_unused
325dbg_intr_buf(char *buf, unsigned len, const char *label, u32 enable)
326{ return 0; }
327
328static inline int __maybe_unused
329dbg_port_buf(char *buf, unsigned len, const char *label, int port, u32 status)
330{ return 0; }
331
332#endif /* DEBUG */
333
334/* functions have the "wrong" filename when they're output... */ 287/* functions have the "wrong" filename when they're output... */
335#define dbg_status(fotg210, label, status) { \ 288#define dbg_status(fotg210, label, status) { \
336 char _buf[80]; \ 289 char _buf[80]; \
@@ -346,19 +299,11 @@ dbg_port_buf(char *buf, unsigned len, const char *label, int port, u32 status)
346 299
347#define dbg_port(fotg210, label, port, status) { \ 300#define dbg_port(fotg210, label, port, status) { \
348 char _buf[80]; \ 301 char _buf[80]; \
349 dbg_port_buf(_buf, sizeof(_buf), label, port, status); \ 302 fotg210_dbg(fotg210, "%s\n", dbg_port_buf(_buf, sizeof(_buf), label, port, status) ); \
350 fotg210_dbg(fotg210, "%s\n", _buf); \
351} 303}
352 304
353/*-------------------------------------------------------------------------*/ 305/*-------------------------------------------------------------------------*/
354 306
355#ifdef STUB_DEBUG_FILES
356
357static inline void create_debug_files(struct fotg210_hcd *bus) { }
358static inline void remove_debug_files(struct fotg210_hcd *bus) { }
359
360#else
361
362/* troubleshooting help: expose state in debugfs */ 307/* troubleshooting help: expose state in debugfs */
363 308
364static int debug_async_open(struct inode *, struct file *); 309static int debug_async_open(struct inode *, struct file *);
@@ -954,7 +899,6 @@ static inline void remove_debug_files(struct fotg210_hcd *fotg210)
954 debugfs_remove_recursive(fotg210->debug_dir); 899 debugfs_remove_recursive(fotg210->debug_dir);
955} 900}
956 901
957#endif /* STUB_DEBUG_FILES */
958/*-------------------------------------------------------------------------*/ 902/*-------------------------------------------------------------------------*/
959 903
960/* 904/*
@@ -1398,7 +1342,7 @@ static void fotg210_iaa_watchdog(struct fotg210_hcd *fotg210)
1398 &fotg210->regs->status); 1342 &fotg210->regs->status);
1399 } 1343 }
1400 1344
1401 fotg210_vdbg(fotg210, "IAA watchdog: status %x cmd %x\n", 1345 fotg210_dbg(fotg210, "IAA watchdog: status %x cmd %x\n",
1402 status, cmd); 1346 status, cmd);
1403 end_unlink_async(fotg210); 1347 end_unlink_async(fotg210);
1404 } 1348 }
@@ -1810,10 +1754,8 @@ static int fotg210_hub_control(
1810 if (test_bit(wIndex, &fotg210->port_c_suspend)) 1754 if (test_bit(wIndex, &fotg210->port_c_suspend))
1811 status |= USB_PORT_STAT_C_SUSPEND << 16; 1755 status |= USB_PORT_STAT_C_SUSPEND << 16;
1812 1756
1813#ifndef VERBOSE_DEBUG 1757 if (status & ~0xffff) /* only if wPortChange is interesting */
1814 if (status & ~0xffff) /* only if wPortChange is interesting */ 1758 dbg_port(fotg210, "GetStatus", wIndex + 1, temp);
1815#endif
1816 dbg_port(fotg210, "GetStatus", wIndex + 1, temp);
1817 put_unaligned_le32(status, buf); 1759 put_unaligned_le32(status, buf);
1818 break; 1760 break;
1819 case SetHubFeature: 1761 case SetHubFeature:
@@ -1856,7 +1798,7 @@ static int fotg210_hub_control(
1856 * which can be fine if this root hub has a 1798 * which can be fine if this root hub has a
1857 * transaction translator built in. 1799 * transaction translator built in.
1858 */ 1800 */
1859 fotg210_vdbg(fotg210, "port %d reset\n", wIndex + 1); 1801 fotg210_dbg(fotg210, "port %d reset\n", wIndex + 1);
1860 temp |= PORT_RESET; 1802 temp |= PORT_RESET;
1861 temp &= ~PORT_PE; 1803 temp &= ~PORT_PE;
1862 1804
@@ -2274,13 +2216,12 @@ static void fotg210_clear_tt_buffer(struct fotg210_hcd *fotg210,
2274 * Note: this routine is never called for Isochronous transfers. 2216 * Note: this routine is never called for Isochronous transfers.
2275 */ 2217 */
2276 if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) { 2218 if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) {
2277#ifdef DEBUG
2278 struct usb_device *tt = urb->dev->tt->hub; 2219 struct usb_device *tt = urb->dev->tt->hub;
2279 dev_dbg(&tt->dev, 2220 dev_dbg(&tt->dev,
2280 "clear tt buffer port %d, a%d ep%d t%08x\n", 2221 "clear tt buffer port %d, a%d ep%d t%08x\n",
2281 urb->dev->ttport, urb->dev->devnum, 2222 urb->dev->ttport, urb->dev->devnum,
2282 usb_pipeendpoint(urb->pipe), token); 2223 usb_pipeendpoint(urb->pipe), token);
2283#endif /* DEBUG */ 2224
2284 if (urb->dev->tt->hub != 2225 if (urb->dev->tt->hub !=
2285 fotg210_to_hcd(fotg210)->self.root_hub) { 2226 fotg210_to_hcd(fotg210)->self.root_hub) {
2286 if (usb_hub_clear_tt_buffer(urb) == 0) 2227 if (usb_hub_clear_tt_buffer(urb) == 0)
@@ -2341,7 +2282,7 @@ static int qtd_copy_status(
2341 status = -EPROTO; 2282 status = -EPROTO;
2342 } 2283 }
2343 2284
2344 fotg210_vdbg(fotg210, 2285 fotg210_dbg(fotg210,
2345 "dev%d ep%d%s qtd token %08x --> status %d\n", 2286 "dev%d ep%d%s qtd token %08x --> status %d\n",
2346 usb_pipedevice(urb->pipe), 2287 usb_pipedevice(urb->pipe),
2347 usb_pipeendpoint(urb->pipe), 2288 usb_pipeendpoint(urb->pipe),
@@ -3583,11 +3524,9 @@ periodic_usecs(struct fotg210_hcd *fotg210, unsigned frame, unsigned uframe)
3583 break; 3524 break;
3584 } 3525 }
3585 } 3526 }
3586#ifdef DEBUG
3587 if (usecs > fotg210->uframe_periodic_max) 3527 if (usecs > fotg210->uframe_periodic_max)
3588 fotg210_err(fotg210, "uframe %d sched overrun: %d usecs\n", 3528 fotg210_err(fotg210, "uframe %d sched overrun: %d usecs\n",
3589 frame * 8 + uframe, usecs); 3529 frame * 8 + uframe, usecs);
3590#endif
3591 return usecs; 3530 return usecs;
3592} 3531}
3593 3532
@@ -4646,7 +4585,7 @@ static void itd_link_urb(
4646 if (unlikely(list_empty(&stream->td_list))) { 4585 if (unlikely(list_empty(&stream->td_list))) {
4647 fotg210_to_hcd(fotg210)->self.bandwidth_allocated 4586 fotg210_to_hcd(fotg210)->self.bandwidth_allocated
4648 += stream->bandwidth; 4587 += stream->bandwidth;
4649 fotg210_vdbg(fotg210, 4588 fotg210_dbg(fotg210,
4650 "schedule devp %s ep%d%s-iso period %d start %d.%d\n", 4589 "schedule devp %s ep%d%s-iso period %d start %d.%d\n",
4651 urb->dev->devpath, stream->bEndpointAddress & 0x0f, 4590 urb->dev->devpath, stream->bEndpointAddress & 0x0f,
4652 (stream->bEndpointAddress & USB_DIR_IN) ? "in" : "out", 4591 (stream->bEndpointAddress & USB_DIR_IN) ? "in" : "out",
@@ -4779,7 +4718,7 @@ static bool itd_complete(struct fotg210_hcd *fotg210, struct fotg210_itd *itd)
4779 if (unlikely(list_is_singular(&stream->td_list))) { 4718 if (unlikely(list_is_singular(&stream->td_list))) {
4780 fotg210_to_hcd(fotg210)->self.bandwidth_allocated 4719 fotg210_to_hcd(fotg210)->self.bandwidth_allocated
4781 -= stream->bandwidth; 4720 -= stream->bandwidth;
4782 fotg210_vdbg(fotg210, 4721 fotg210_dbg(fotg210,
4783 "deschedule devp %s ep%d%s-iso\n", 4722 "deschedule devp %s ep%d%s-iso\n",
4784 dev->devpath, stream->bEndpointAddress & 0x0f, 4723 dev->devpath, stream->bEndpointAddress & 0x0f,
4785 (stream->bEndpointAddress & USB_DIR_IN) ? "in" : "out"); 4724 (stream->bEndpointAddress & USB_DIR_IN) ? "in" : "out");
@@ -5444,10 +5383,8 @@ static irqreturn_t fotg210_irq(struct usb_hcd *hcd)
5444 cmd = fotg210_readl(fotg210, &fotg210->regs->command); 5383 cmd = fotg210_readl(fotg210, &fotg210->regs->command);
5445 bh = 0; 5384 bh = 0;
5446 5385
5447#ifdef VERBOSE_DEBUG
5448 /* unrequested/ignored: Frame List Rollover */ 5386 /* unrequested/ignored: Frame List Rollover */
5449 dbg_status(fotg210, "irq", status); 5387 dbg_status(fotg210, "irq", status);
5450#endif
5451 5388
5452 /* INT, ERR, and IAA interrupt rates can be throttled */ 5389 /* INT, ERR, and IAA interrupt rates can be throttled */
5453 5390
@@ -5952,6 +5889,7 @@ static int fotg210_hcd_probe(struct platform_device *pdev)
5952 dev_err(dev, "failed to add hcd with err %d\n", retval); 5889 dev_err(dev, "failed to add hcd with err %d\n", retval);
5953 goto fail_add_hcd; 5890 goto fail_add_hcd;
5954 } 5891 }
5892 device_wakeup_enable(hcd->self.controller);
5955 5893
5956 return retval; 5894 return retval;
5957 5895
@@ -6013,13 +5951,11 @@ static int __init fotg210_hcd_init(void)
6013 sizeof(struct fotg210_qh), sizeof(struct fotg210_qtd), 5951 sizeof(struct fotg210_qh), sizeof(struct fotg210_qtd),
6014 sizeof(struct fotg210_itd)); 5952 sizeof(struct fotg210_itd));
6015 5953
6016#ifdef DEBUG
6017 fotg210_debug_root = debugfs_create_dir("fotg210", usb_debug_root); 5954 fotg210_debug_root = debugfs_create_dir("fotg210", usb_debug_root);
6018 if (!fotg210_debug_root) { 5955 if (!fotg210_debug_root) {
6019 retval = -ENOENT; 5956 retval = -ENOENT;
6020 goto err_debug; 5957 goto err_debug;
6021 } 5958 }
6022#endif
6023 5959
6024 retval = platform_driver_register(&fotg210_hcd_driver); 5960 retval = platform_driver_register(&fotg210_hcd_driver);
6025 if (retval < 0) 5961 if (retval < 0)
@@ -6028,11 +5964,9 @@ static int __init fotg210_hcd_init(void)
6028 5964
6029 platform_driver_unregister(&fotg210_hcd_driver); 5965 platform_driver_unregister(&fotg210_hcd_driver);
6030clean: 5966clean:
6031#ifdef DEBUG
6032 debugfs_remove(fotg210_debug_root); 5967 debugfs_remove(fotg210_debug_root);
6033 fotg210_debug_root = NULL; 5968 fotg210_debug_root = NULL;
6034err_debug: 5969err_debug:
6035#endif
6036 clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded); 5970 clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
6037 return retval; 5971 return retval;
6038} 5972}
@@ -6041,9 +5975,7 @@ module_init(fotg210_hcd_init);
6041static void __exit fotg210_hcd_cleanup(void) 5975static void __exit fotg210_hcd_cleanup(void)
6042{ 5976{
6043 platform_driver_unregister(&fotg210_hcd_driver); 5977 platform_driver_unregister(&fotg210_hcd_driver);
6044#ifdef DEBUG
6045 debugfs_remove(fotg210_debug_root); 5978 debugfs_remove(fotg210_debug_root);
6046#endif
6047 clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded); 5979 clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
6048} 5980}
6049module_exit(fotg210_hcd_cleanup); 5981module_exit(fotg210_hcd_cleanup);
diff --git a/drivers/usb/host/fotg210.h b/drivers/usb/host/fotg210.h
index 8920f9d32564..ac6cd1bfd208 100644
--- a/drivers/usb/host/fotg210.h
+++ b/drivers/usb/host/fotg210.h
@@ -174,9 +174,7 @@ struct fotg210_hcd { /* one per controller */
174#endif 174#endif
175 175
176 /* debug files */ 176 /* debug files */
177#ifdef DEBUG
178 struct dentry *debug_dir; 177 struct dentry *debug_dir;
179#endif
180}; 178};
181 179
182/* convert between an HCD pointer and the corresponding FOTG210_HCD */ 180/* convert between an HCD pointer and the corresponding FOTG210_HCD */
@@ -741,10 +739,4 @@ static inline unsigned fotg210_read_frame_index(struct fotg210_hcd *fotg210)
741}) 739})
742/*-------------------------------------------------------------------------*/ 740/*-------------------------------------------------------------------------*/
743 741
744#ifndef DEBUG
745#define STUB_DEBUG_FILES
746#endif /* DEBUG */
747
748/*-------------------------------------------------------------------------*/
749
750#endif /* __LINUX_FOTG210_H */ 742#endif /* __LINUX_FOTG210_H */
diff --git a/drivers/usb/host/fusbh200-hcd.c b/drivers/usb/host/fusbh200-hcd.c
index e1c6d850a7e1..ba9499060f63 100644
--- a/drivers/usb/host/fusbh200-hcd.c
+++ b/drivers/usb/host/fusbh200-hcd.c
@@ -57,13 +57,8 @@
57 57
58static const char hcd_name [] = "fusbh200_hcd"; 58static const char hcd_name [] = "fusbh200_hcd";
59 59
60#undef VERBOSE_DEBUG
61#undef FUSBH200_URB_TRACE 60#undef FUSBH200_URB_TRACE
62 61
63#ifdef DEBUG
64#define FUSBH200_STATS
65#endif
66
67/* magic numbers that can affect system performance */ 62/* magic numbers that can affect system performance */
68#define FUSBH200_TUNE_CERR 3 /* 0-3 qtd retries; 0 == don't stop */ 63#define FUSBH200_TUNE_CERR 3 /* 0-3 qtd retries; 0 == don't stop */
69#define FUSBH200_TUNE_RL_HS 4 /* nak throttle; see 4.9 */ 64#define FUSBH200_TUNE_RL_HS 4 /* nak throttle; see 4.9 */
@@ -108,14 +103,6 @@ MODULE_PARM_DESC(hird, "host initiated resume duration, +1 for each 75us");
108#define fusbh200_warn(fusbh200, fmt, args...) \ 103#define fusbh200_warn(fusbh200, fmt, args...) \
109 dev_warn (fusbh200_to_hcd(fusbh200)->self.controller , fmt , ## args ) 104 dev_warn (fusbh200_to_hcd(fusbh200)->self.controller , fmt , ## args )
110 105
111#ifdef VERBOSE_DEBUG
112# define fusbh200_vdbg fusbh200_dbg
113#else
114 static inline void fusbh200_vdbg(struct fusbh200_hcd *fusbh200, ...) {}
115#endif
116
117#ifdef DEBUG
118
119/* check the values in the HCSPARAMS register 106/* check the values in the HCSPARAMS register
120 * (host controller _Structural_ parameters) 107 * (host controller _Structural_ parameters)
121 * see EHCI spec, Table 2-4 for each value 108 * see EHCI spec, Table 2-4 for each value
@@ -130,13 +117,6 @@ static void dbg_hcs_params (struct fusbh200_hcd *fusbh200, char *label)
130 HCS_N_PORTS (params) 117 HCS_N_PORTS (params)
131 ); 118 );
132} 119}
133#else
134
135static inline void dbg_hcs_params (struct fusbh200_hcd *fusbh200, char *label) {}
136
137#endif
138
139#ifdef DEBUG
140 120
141/* check the values in the HCCPARAMS register 121/* check the values in the HCCPARAMS register
142 * (host controller _Capability_ parameters) 122 * (host controller _Capability_ parameters)
@@ -153,13 +133,6 @@ static void dbg_hcc_params (struct fusbh200_hcd *fusbh200, char *label)
153 HCC_PGM_FRAMELISTLEN(params) ? "256/512/1024" : "1024", 133 HCC_PGM_FRAMELISTLEN(params) ? "256/512/1024" : "1024",
154 HCC_CANPARK(params) ? " park" : ""); 134 HCC_CANPARK(params) ? " park" : "");
155} 135}
156#else
157
158static inline void dbg_hcc_params (struct fusbh200_hcd *fusbh200, char *label) {}
159
160#endif
161
162#ifdef DEBUG
163 136
164static void __maybe_unused 137static void __maybe_unused
165dbg_qtd (const char *label, struct fusbh200_hcd *fusbh200, struct fusbh200_qtd *qtd) 138dbg_qtd (const char *label, struct fusbh200_hcd *fusbh200, struct fusbh200_qtd *qtd)
@@ -302,29 +275,6 @@ dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status)
302 (status & PORT_CONNECT) ? " CONNECT" : ""); 275 (status & PORT_CONNECT) ? " CONNECT" : "");
303} 276}
304 277
305#else
306static inline void __maybe_unused
307dbg_qh (char *label, struct fusbh200_hcd *fusbh200, struct fusbh200_qh *qh)
308{}
309
310static inline int __maybe_unused
311dbg_status_buf (char *buf, unsigned len, const char *label, u32 status)
312{ return 0; }
313
314static inline int __maybe_unused
315dbg_command_buf (char *buf, unsigned len, const char *label, u32 command)
316{ return 0; }
317
318static inline int __maybe_unused
319dbg_intr_buf (char *buf, unsigned len, const char *label, u32 enable)
320{ return 0; }
321
322static inline int __maybe_unused
323dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status)
324{ return 0; }
325
326#endif /* DEBUG */
327
328/* functions have the "wrong" filename when they're output... */ 278/* functions have the "wrong" filename when they're output... */
329#define dbg_status(fusbh200, label, status) { \ 279#define dbg_status(fusbh200, label, status) { \
330 char _buf [80]; \ 280 char _buf [80]; \
@@ -346,13 +296,6 @@ dbg_port_buf (char *buf, unsigned len, const char *label, int port, u32 status)
346 296
347/*-------------------------------------------------------------------------*/ 297/*-------------------------------------------------------------------------*/
348 298
349#ifdef STUB_DEBUG_FILES
350
351static inline void create_debug_files (struct fusbh200_hcd *bus) { }
352static inline void remove_debug_files (struct fusbh200_hcd *bus) { }
353
354#else
355
356/* troubleshooting help: expose state in debugfs */ 299/* troubleshooting help: expose state in debugfs */
357 300
358static int debug_async_open(struct inode *, struct file *); 301static int debug_async_open(struct inode *, struct file *);
@@ -775,7 +718,6 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf)
775 next += temp; 718 next += temp;
776 } 719 }
777 720
778#ifdef FUSBH200_STATS
779 temp = scnprintf (next, size, 721 temp = scnprintf (next, size,
780 "irq normal %ld err %ld iaa %ld (lost %ld)\n", 722 "irq normal %ld err %ld iaa %ld (lost %ld)\n",
781 fusbh200->stats.normal, fusbh200->stats.error, fusbh200->stats.iaa, 723 fusbh200->stats.normal, fusbh200->stats.error, fusbh200->stats.iaa,
@@ -787,7 +729,6 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf)
787 fusbh200->stats.complete, fusbh200->stats.unlink); 729 fusbh200->stats.complete, fusbh200->stats.unlink);
788 size -= temp; 730 size -= temp;
789 next += temp; 731 next += temp;
790#endif
791 732
792done: 733done:
793 spin_unlock_irqrestore (&fusbh200->lock, flags); 734 spin_unlock_irqrestore (&fusbh200->lock, flags);
@@ -928,7 +869,6 @@ static inline void remove_debug_files (struct fusbh200_hcd *fusbh200)
928 debugfs_remove_recursive(fusbh200->debug_dir); 869 debugfs_remove_recursive(fusbh200->debug_dir);
929} 870}
930 871
931#endif /* STUB_DEBUG_FILES */
932/*-------------------------------------------------------------------------*/ 872/*-------------------------------------------------------------------------*/
933 873
934/* 874/*
@@ -1362,7 +1302,7 @@ static void fusbh200_iaa_watchdog(struct fusbh200_hcd *fusbh200)
1362 fusbh200_writel(fusbh200, STS_IAA, &fusbh200->regs->status); 1302 fusbh200_writel(fusbh200, STS_IAA, &fusbh200->regs->status);
1363 } 1303 }
1364 1304
1365 fusbh200_vdbg(fusbh200, "IAA watchdog: status %x cmd %x\n", 1305 fusbh200_dbg(fusbh200, "IAA watchdog: status %x cmd %x\n",
1366 status, cmd); 1306 status, cmd);
1367 end_unlink_async(fusbh200); 1307 end_unlink_async(fusbh200);
1368 } 1308 }
@@ -1769,10 +1709,8 @@ static int fusbh200_hub_control (
1769 if (test_bit(wIndex, &fusbh200->port_c_suspend)) 1709 if (test_bit(wIndex, &fusbh200->port_c_suspend))
1770 status |= USB_PORT_STAT_C_SUSPEND << 16; 1710 status |= USB_PORT_STAT_C_SUSPEND << 16;
1771 1711
1772#ifndef VERBOSE_DEBUG 1712 if (status & ~0xffff) /* only if wPortChange is interesting */
1773 if (status & ~0xffff) /* only if wPortChange is interesting */ 1713 dbg_port(fusbh200, "GetStatus", wIndex + 1, temp);
1774#endif
1775 dbg_port (fusbh200, "GetStatus", wIndex + 1, temp);
1776 put_unaligned_le32(status, buf); 1714 put_unaligned_le32(status, buf);
1777 break; 1715 break;
1778 case SetHubFeature: 1716 case SetHubFeature:
@@ -1814,7 +1752,7 @@ static int fusbh200_hub_control (
1814 * which can be fine if this root hub has a 1752 * which can be fine if this root hub has a
1815 * transaction translator built in. 1753 * transaction translator built in.
1816 */ 1754 */
1817 fusbh200_vdbg (fusbh200, "port %d reset\n", wIndex + 1); 1755 fusbh200_dbg(fusbh200, "port %d reset\n", wIndex + 1);
1818 temp |= PORT_RESET; 1756 temp |= PORT_RESET;
1819 temp &= ~PORT_PE; 1757 temp &= ~PORT_PE;
1820 1758
@@ -2230,13 +2168,13 @@ static void fusbh200_clear_tt_buffer(struct fusbh200_hcd *fusbh200, struct fusbh
2230 * Note: this routine is never called for Isochronous transfers. 2168 * Note: this routine is never called for Isochronous transfers.
2231 */ 2169 */
2232 if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) { 2170 if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) {
2233#ifdef DEBUG
2234 struct usb_device *tt = urb->dev->tt->hub; 2171 struct usb_device *tt = urb->dev->tt->hub;
2172
2235 dev_dbg(&tt->dev, 2173 dev_dbg(&tt->dev,
2236 "clear tt buffer port %d, a%d ep%d t%08x\n", 2174 "clear tt buffer port %d, a%d ep%d t%08x\n",
2237 urb->dev->ttport, urb->dev->devnum, 2175 urb->dev->ttport, urb->dev->devnum,
2238 usb_pipeendpoint(urb->pipe), token); 2176 usb_pipeendpoint(urb->pipe), token);
2239#endif /* DEBUG */ 2177
2240 if (urb->dev->tt->hub != 2178 if (urb->dev->tt->hub !=
2241 fusbh200_to_hcd(fusbh200)->self.root_hub) { 2179 fusbh200_to_hcd(fusbh200)->self.root_hub) {
2242 if (usb_hub_clear_tt_buffer(urb) == 0) 2180 if (usb_hub_clear_tt_buffer(urb) == 0)
@@ -2297,7 +2235,7 @@ static int qtd_copy_status (
2297 status = -EPROTO; 2235 status = -EPROTO;
2298 } 2236 }
2299 2237
2300 fusbh200_vdbg (fusbh200, 2238 fusbh200_dbg(fusbh200,
2301 "dev%d ep%d%s qtd token %08x --> status %d\n", 2239 "dev%d ep%d%s qtd token %08x --> status %d\n",
2302 usb_pipedevice (urb->pipe), 2240 usb_pipedevice (urb->pipe),
2303 usb_pipeendpoint (urb->pipe), 2241 usb_pipeendpoint (urb->pipe),
@@ -3529,11 +3467,9 @@ periodic_usecs (struct fusbh200_hcd *fusbh200, unsigned frame, unsigned uframe)
3529 break; 3467 break;
3530 } 3468 }
3531 } 3469 }
3532#ifdef DEBUG
3533 if (usecs > fusbh200->uframe_periodic_max) 3470 if (usecs > fusbh200->uframe_periodic_max)
3534 fusbh200_err (fusbh200, "uframe %d sched overrun: %d usecs\n", 3471 fusbh200_err (fusbh200, "uframe %d sched overrun: %d usecs\n",
3535 frame * 8 + uframe, usecs); 3472 frame * 8 + uframe, usecs);
3536#endif
3537 return usecs; 3473 return usecs;
3538} 3474}
3539 3475
@@ -4586,7 +4522,7 @@ static void itd_link_urb(
4586 if (unlikely (list_empty(&stream->td_list))) { 4522 if (unlikely (list_empty(&stream->td_list))) {
4587 fusbh200_to_hcd(fusbh200)->self.bandwidth_allocated 4523 fusbh200_to_hcd(fusbh200)->self.bandwidth_allocated
4588 += stream->bandwidth; 4524 += stream->bandwidth;
4589 fusbh200_vdbg (fusbh200, 4525 fusbh200_dbg(fusbh200,
4590 "schedule devp %s ep%d%s-iso period %d start %d.%d\n", 4526 "schedule devp %s ep%d%s-iso period %d start %d.%d\n",
4591 urb->dev->devpath, stream->bEndpointAddress & 0x0f, 4527 urb->dev->devpath, stream->bEndpointAddress & 0x0f,
4592 (stream->bEndpointAddress & USB_DIR_IN) ? "in" : "out", 4528 (stream->bEndpointAddress & USB_DIR_IN) ? "in" : "out",
@@ -4717,7 +4653,7 @@ static bool itd_complete(struct fusbh200_hcd *fusbh200, struct fusbh200_itd *itd
4717 if (unlikely(list_is_singular(&stream->td_list))) { 4653 if (unlikely(list_is_singular(&stream->td_list))) {
4718 fusbh200_to_hcd(fusbh200)->self.bandwidth_allocated 4654 fusbh200_to_hcd(fusbh200)->self.bandwidth_allocated
4719 -= stream->bandwidth; 4655 -= stream->bandwidth;
4720 fusbh200_vdbg (fusbh200, 4656 fusbh200_dbg(fusbh200,
4721 "deschedule devp %s ep%d%s-iso\n", 4657 "deschedule devp %s ep%d%s-iso\n",
4722 dev->devpath, stream->bEndpointAddress & 0x0f, 4658 dev->devpath, stream->bEndpointAddress & 0x0f,
4723 (stream->bEndpointAddress & USB_DIR_IN) ? "in" : "out"); 4659 (stream->bEndpointAddress & USB_DIR_IN) ? "in" : "out");
@@ -5115,13 +5051,11 @@ static void fusbh200_stop (struct usb_hcd *hcd)
5115 spin_unlock_irq (&fusbh200->lock); 5051 spin_unlock_irq (&fusbh200->lock);
5116 fusbh200_mem_cleanup (fusbh200); 5052 fusbh200_mem_cleanup (fusbh200);
5117 5053
5118#ifdef FUSBH200_STATS
5119 fusbh200_dbg(fusbh200, "irq normal %ld err %ld iaa %ld (lost %ld)\n", 5054 fusbh200_dbg(fusbh200, "irq normal %ld err %ld iaa %ld (lost %ld)\n",
5120 fusbh200->stats.normal, fusbh200->stats.error, fusbh200->stats.iaa, 5055 fusbh200->stats.normal, fusbh200->stats.error, fusbh200->stats.iaa,
5121 fusbh200->stats.lost_iaa); 5056 fusbh200->stats.lost_iaa);
5122 fusbh200_dbg (fusbh200, "complete %ld unlink %ld\n", 5057 fusbh200_dbg (fusbh200, "complete %ld unlink %ld\n",
5123 fusbh200->stats.complete, fusbh200->stats.unlink); 5058 fusbh200->stats.complete, fusbh200->stats.unlink);
5124#endif
5125 5059
5126 dbg_status (fusbh200, "fusbh200_stop completed", 5060 dbg_status (fusbh200, "fusbh200_stop completed",
5127 fusbh200_readl(fusbh200, &fusbh200->regs->status)); 5061 fusbh200_readl(fusbh200, &fusbh200->regs->status));
@@ -5365,13 +5299,6 @@ static irqreturn_t fusbh200_irq (struct usb_hcd *hcd)
5365 cmd = fusbh200_readl(fusbh200, &fusbh200->regs->command); 5299 cmd = fusbh200_readl(fusbh200, &fusbh200->regs->command);
5366 bh = 0; 5300 bh = 0;
5367 5301
5368#ifdef VERBOSE_DEBUG
5369 /* unrequested/ignored: Frame List Rollover */
5370 dbg_status (fusbh200, "irq", status);
5371#endif
5372
5373 /* INT, ERR, and IAA interrupt rates can be throttled */
5374
5375 /* normal [4.15.1.2] or error [4.15.1.1] completion */ 5302 /* normal [4.15.1.2] or error [4.15.1.1] completion */
5376 if (likely ((status & (STS_INT|STS_ERR)) != 0)) { 5303 if (likely ((status & (STS_INT|STS_ERR)) != 0)) {
5377 if (likely ((status & STS_ERR) == 0)) 5304 if (likely ((status & STS_ERR) == 0))
@@ -5871,6 +5798,7 @@ static int fusbh200_hcd_probe(struct platform_device *pdev)
5871 dev_err(dev, "failed to add hcd with err %d\n", retval); 5798 dev_err(dev, "failed to add hcd with err %d\n", retval);
5872 goto fail_add_hcd; 5799 goto fail_add_hcd;
5873 } 5800 }
5801 device_wakeup_enable(hcd->self.controller);
5874 5802
5875 return retval; 5803 return retval;
5876 5804
@@ -5936,13 +5864,11 @@ static int __init fusbh200_hcd_init(void)
5936 sizeof(struct fusbh200_qh), sizeof(struct fusbh200_qtd), 5864 sizeof(struct fusbh200_qh), sizeof(struct fusbh200_qtd),
5937 sizeof(struct fusbh200_itd)); 5865 sizeof(struct fusbh200_itd));
5938 5866
5939#ifdef DEBUG
5940 fusbh200_debug_root = debugfs_create_dir("fusbh200", usb_debug_root); 5867 fusbh200_debug_root = debugfs_create_dir("fusbh200", usb_debug_root);
5941 if (!fusbh200_debug_root) { 5868 if (!fusbh200_debug_root) {
5942 retval = -ENOENT; 5869 retval = -ENOENT;
5943 goto err_debug; 5870 goto err_debug;
5944 } 5871 }
5945#endif
5946 5872
5947 retval = platform_driver_register(&fusbh200_hcd_fusbh200_driver); 5873 retval = platform_driver_register(&fusbh200_hcd_fusbh200_driver);
5948 if (retval < 0) 5874 if (retval < 0)
@@ -5951,11 +5877,9 @@ static int __init fusbh200_hcd_init(void)
5951 5877
5952 platform_driver_unregister(&fusbh200_hcd_fusbh200_driver); 5878 platform_driver_unregister(&fusbh200_hcd_fusbh200_driver);
5953clean: 5879clean:
5954#ifdef DEBUG
5955 debugfs_remove(fusbh200_debug_root); 5880 debugfs_remove(fusbh200_debug_root);
5956 fusbh200_debug_root = NULL; 5881 fusbh200_debug_root = NULL;
5957err_debug: 5882err_debug:
5958#endif
5959 clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded); 5883 clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
5960 return retval; 5884 return retval;
5961} 5885}
@@ -5964,9 +5888,7 @@ module_init(fusbh200_hcd_init);
5964static void __exit fusbh200_hcd_cleanup(void) 5888static void __exit fusbh200_hcd_cleanup(void)
5965{ 5889{
5966 platform_driver_unregister(&fusbh200_hcd_fusbh200_driver); 5890 platform_driver_unregister(&fusbh200_hcd_fusbh200_driver);
5967#ifdef DEBUG
5968 debugfs_remove(fusbh200_debug_root); 5891 debugfs_remove(fusbh200_debug_root);
5969#endif
5970 clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded); 5892 clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
5971} 5893}
5972module_exit(fusbh200_hcd_cleanup); 5894module_exit(fusbh200_hcd_cleanup);
diff --git a/drivers/usb/host/fusbh200.h b/drivers/usb/host/fusbh200.h
index 797c9e855270..6b719e066c3f 100644
--- a/drivers/usb/host/fusbh200.h
+++ b/drivers/usb/host/fusbh200.h
@@ -165,17 +165,11 @@ struct fusbh200_hcd { /* one per controller */
165 u8 sbrn; /* packed release number */ 165 u8 sbrn; /* packed release number */
166 166
167 /* irq statistics */ 167 /* irq statistics */
168#ifdef FUSBH200_STATS
169 struct fusbh200_stats stats; 168 struct fusbh200_stats stats;
170# define COUNT(x) do { (x)++; } while (0) 169# define COUNT(x) do { (x)++; } while (0)
171#else
172# define COUNT(x) do {} while (0)
173#endif
174 170
175 /* debug files */ 171 /* debug files */
176#ifdef DEBUG
177 struct dentry *debug_dir; 172 struct dentry *debug_dir;
178#endif
179}; 173};
180 174
181/* convert between an HCD pointer and the corresponding FUSBH200_HCD */ 175/* convert between an HCD pointer and the corresponding FUSBH200_HCD */
@@ -734,10 +728,4 @@ static inline unsigned fusbh200_read_frame_index(struct fusbh200_hcd *fusbh200)
734}) 728})
735/*-------------------------------------------------------------------------*/ 729/*-------------------------------------------------------------------------*/
736 730
737#ifndef DEBUG
738#define STUB_DEBUG_FILES
739#endif /* DEBUG */
740
741/*-------------------------------------------------------------------------*/
742
743#endif /* __LINUX_FUSBH200_H */ 731#endif /* __LINUX_FUSBH200_H */
diff --git a/drivers/usb/host/hwa-hc.c b/drivers/usb/host/hwa-hc.c
index ada0a52797b1..e07669993f58 100644
--- a/drivers/usb/host/hwa-hc.c
+++ b/drivers/usb/host/hwa-hc.c
@@ -54,7 +54,6 @@
54 * DWA). 54 * DWA).
55 */ 55 */
56#include <linux/kernel.h> 56#include <linux/kernel.h>
57#include <linux/init.h>
58#include <linux/slab.h> 57#include <linux/slab.h>
59#include <linux/module.h> 58#include <linux/module.h>
60#include <linux/workqueue.h> 59#include <linux/workqueue.h>
@@ -86,7 +85,7 @@ static int __hwahc_set_cluster_id(struct hwahc *hwahc, u8 cluster_id)
86 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 85 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
87 cluster_id, 86 cluster_id,
88 wa->usb_iface->cur_altsetting->desc.bInterfaceNumber, 87 wa->usb_iface->cur_altsetting->desc.bInterfaceNumber,
89 NULL, 0, 1000 /* FIXME: arbitrary */); 88 NULL, 0, USB_CTRL_SET_TIMEOUT);
90 if (result < 0) 89 if (result < 0)
91 dev_err(dev, "Cannot set WUSB Cluster ID to 0x%02x: %d\n", 90 dev_err(dev, "Cannot set WUSB Cluster ID to 0x%02x: %d\n",
92 cluster_id, result); 91 cluster_id, result);
@@ -106,7 +105,7 @@ static int __hwahc_op_set_num_dnts(struct wusbhc *wusbhc, u8 interval, u8 slots)
106 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 105 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
107 interval << 8 | slots, 106 interval << 8 | slots,
108 wa->usb_iface->cur_altsetting->desc.bInterfaceNumber, 107 wa->usb_iface->cur_altsetting->desc.bInterfaceNumber,
109 NULL, 0, 1000 /* FIXME: arbitrary */); 108 NULL, 0, USB_CTRL_SET_TIMEOUT);
110} 109}
111 110
112/* 111/*
@@ -224,7 +223,7 @@ static int hwahc_op_urb_dequeue(struct usb_hcd *usb_hcd, struct urb *urb,
224 struct wusbhc *wusbhc = usb_hcd_to_wusbhc(usb_hcd); 223 struct wusbhc *wusbhc = usb_hcd_to_wusbhc(usb_hcd);
225 struct hwahc *hwahc = container_of(wusbhc, struct hwahc, wusbhc); 224 struct hwahc *hwahc = container_of(wusbhc, struct hwahc, wusbhc);
226 225
227 return wa_urb_dequeue(&hwahc->wa, urb); 226 return wa_urb_dequeue(&hwahc->wa, urb, status);
228} 227}
229 228
230/* 229/*
@@ -281,7 +280,7 @@ static void __hwahc_op_wusbhc_stop(struct wusbhc *wusbhc, int delay)
281 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 280 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
282 delay * 1000, 281 delay * 1000,
283 iface_no, 282 iface_no,
284 NULL, 0, 1000 /* FIXME: arbitrary */); 283 NULL, 0, USB_CTRL_SET_TIMEOUT);
285 if (ret == 0) 284 if (ret == 0)
286 msleep(delay); 285 msleep(delay);
287 286
@@ -310,7 +309,7 @@ static int __hwahc_op_bwa_set(struct wusbhc *wusbhc, s8 stream_index,
310 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 309 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
311 stream_index, 310 stream_index,
312 wa->usb_iface->cur_altsetting->desc.bInterfaceNumber, 311 wa->usb_iface->cur_altsetting->desc.bInterfaceNumber,
313 NULL, 0, 1000 /* FIXME: arbitrary */); 312 NULL, 0, USB_CTRL_SET_TIMEOUT);
314 if (result < 0) { 313 if (result < 0) {
315 dev_err(dev, "Cannot set WUSB stream index: %d\n", result); 314 dev_err(dev, "Cannot set WUSB stream index: %d\n", result);
316 goto out; 315 goto out;
@@ -321,7 +320,7 @@ static int __hwahc_op_bwa_set(struct wusbhc *wusbhc, s8 stream_index,
321 WUSB_REQ_SET_WUSB_MAS, 320 WUSB_REQ_SET_WUSB_MAS,
322 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 321 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
323 0, wa->usb_iface->cur_altsetting->desc.bInterfaceNumber, 322 0, wa->usb_iface->cur_altsetting->desc.bInterfaceNumber,
324 mas_le, 32, 1000 /* FIXME: arbitrary */); 323 mas_le, 32, USB_CTRL_SET_TIMEOUT);
325 if (result < 0) 324 if (result < 0)
326 dev_err(dev, "Cannot set WUSB MAS allocation: %d\n", result); 325 dev_err(dev, "Cannot set WUSB MAS allocation: %d\n", result);
327out: 326out:
@@ -355,7 +354,7 @@ static int __hwahc_op_mmcie_add(struct wusbhc *wusbhc, u8 interval,
355 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 354 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
356 interval << 8 | repeat_cnt, 355 interval << 8 | repeat_cnt,
357 handle << 8 | iface_no, 356 handle << 8 | iface_no,
358 wuie, wuie->bLength, 1000 /* FIXME: arbitrary */); 357 wuie, wuie->bLength, USB_CTRL_SET_TIMEOUT);
359} 358}
360 359
361/* 360/*
@@ -372,7 +371,7 @@ static int __hwahc_op_mmcie_rm(struct wusbhc *wusbhc, u8 handle)
372 WUSB_REQ_REMOVE_MMC_IE, 371 WUSB_REQ_REMOVE_MMC_IE,
373 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 372 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
374 0, handle << 8 | iface_no, 373 0, handle << 8 | iface_no,
375 NULL, 0, 1000 /* FIXME: arbitrary */); 374 NULL, 0, USB_CTRL_SET_TIMEOUT);
376} 375}
377 376
378/* 377/*
@@ -415,7 +414,7 @@ static int __hwahc_op_dev_info_set(struct wusbhc *wusbhc,
415 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 414 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
416 0, wusb_dev->port_idx << 8 | iface_no, 415 0, wusb_dev->port_idx << 8 | iface_no,
417 dev_info, sizeof(struct hwa_dev_info), 416 dev_info, sizeof(struct hwa_dev_info),
418 1000 /* FIXME: arbitrary */); 417 USB_CTRL_SET_TIMEOUT);
419 kfree(dev_info); 418 kfree(dev_info);
420 return ret; 419 return ret;
421} 420}
@@ -455,7 +454,7 @@ static int __hwahc_dev_set_key(struct wusbhc *wusbhc, u8 port_idx, u32 tkid,
455 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 454 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
456 USB_DT_KEY << 8 | key_idx, 455 USB_DT_KEY << 8 | key_idx,
457 port_idx << 8 | iface_no, 456 port_idx << 8 | iface_no,
458 keyd, keyd_len, 1000 /* FIXME: arbitrary */); 457 keyd, keyd_len, USB_CTRL_SET_TIMEOUT);
459 458
460 kzfree(keyd); /* clear keys etc. */ 459 kzfree(keyd); /* clear keys etc. */
461 return result; 460 return result;
@@ -497,7 +496,7 @@ static int __hwahc_op_set_ptk(struct wusbhc *wusbhc, u8 port_idx, u32 tkid,
497 USB_REQ_SET_ENCRYPTION, 496 USB_REQ_SET_ENCRYPTION,
498 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 497 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
499 encryption_value, port_idx << 8 | iface_no, 498 encryption_value, port_idx << 8 | iface_no,
500 NULL, 0, 1000 /* FIXME: arbitrary */); 499 NULL, 0, USB_CTRL_SET_TIMEOUT);
501 if (result < 0) 500 if (result < 0)
502 dev_err(wusbhc->dev, "Can't set host's WUSB encryption for " 501 dev_err(wusbhc->dev, "Can't set host's WUSB encryption for "
503 "port index %u to %s (value %d): %d\n", port_idx, 502 "port index %u to %s (value %d): %d\n", port_idx,
@@ -791,6 +790,7 @@ static int hwahc_probe(struct usb_interface *usb_iface,
791 dev_err(dev, "Cannot add HCD: %d\n", result); 790 dev_err(dev, "Cannot add HCD: %d\n", result);
792 goto error_add_hcd; 791 goto error_add_hcd;
793 } 792 }
793 device_wakeup_enable(usb_hcd->self.controller);
794 result = wusbhc_b_create(&hwahc->wusbhc); 794 result = wusbhc_b_create(&hwahc->wusbhc);
795 if (result < 0) { 795 if (result < 0) {
796 dev_err(dev, "Cannot setup phase B of WUSBHC: %d\n", result); 796 dev_err(dev, "Cannot setup phase B of WUSBHC: %d\n", result);
diff --git a/drivers/usb/host/imx21-dbg.c b/drivers/usb/host/imx21-dbg.c
index ec98ecee3517..4f320d050da7 100644
--- a/drivers/usb/host/imx21-dbg.c
+++ b/drivers/usb/host/imx21-dbg.c
@@ -18,6 +18,10 @@
18 18
19/* this file is part of imx21-hcd.c */ 19/* this file is part of imx21-hcd.c */
20 20
21#ifdef CONFIG_DYNAMIC_DEBUG
22#define DEBUG
23#endif
24
21#ifndef DEBUG 25#ifndef DEBUG
22 26
23static inline void create_debug_files(struct imx21 *imx21) { } 27static inline void create_debug_files(struct imx21 *imx21) { }
diff --git a/drivers/usb/host/imx21-hcd.c b/drivers/usb/host/imx21-hcd.c
index adb01d950a16..207bad99301f 100644
--- a/drivers/usb/host/imx21-hcd.c
+++ b/drivers/usb/host/imx21-hcd.c
@@ -62,6 +62,10 @@
62 62
63#include "imx21-hcd.h" 63#include "imx21-hcd.h"
64 64
65#ifdef CONFIG_DYNAMIC_DEBUG
66#define DEBUG
67#endif
68
65#ifdef DEBUG 69#ifdef DEBUG
66#define DEBUG_LOG_FRAME(imx21, etd, event) \ 70#define DEBUG_LOG_FRAME(imx21, etd, event) \
67 (etd)->event##_frame = readl((imx21)->regs + USBH_FRMNUB) 71 (etd)->event##_frame = readl((imx21)->regs + USBH_FRMNUB)
@@ -1906,6 +1910,7 @@ static int imx21_probe(struct platform_device *pdev)
1906 dev_err(imx21->dev, "usb_add_hcd() returned %d\n", ret); 1910 dev_err(imx21->dev, "usb_add_hcd() returned %d\n", ret);
1907 goto failed_add_hcd; 1911 goto failed_add_hcd;
1908 } 1912 }
1913 device_wakeup_enable(hcd->self.controller);
1909 1914
1910 return 0; 1915 return 0;
1911 1916
@@ -1926,7 +1931,7 @@ failed_request_mem:
1926 1931
1927static struct platform_driver imx21_hcd_driver = { 1932static struct platform_driver imx21_hcd_driver = {
1928 .driver = { 1933 .driver = {
1929 .name = (char *)hcd_name, 1934 .name = hcd_name,
1930 }, 1935 },
1931 .probe = imx21_probe, 1936 .probe = imx21_probe,
1932 .remove = imx21_remove, 1937 .remove = imx21_remove,
diff --git a/drivers/usb/host/imx21-hcd.h b/drivers/usb/host/imx21-hcd.h
index c005770a73e9..05122f8a6983 100644
--- a/drivers/usb/host/imx21-hcd.h
+++ b/drivers/usb/host/imx21-hcd.h
@@ -24,6 +24,10 @@
24#ifndef __LINUX_IMX21_HCD_H__ 24#ifndef __LINUX_IMX21_HCD_H__
25#define __LINUX_IMX21_HCD_H__ 25#define __LINUX_IMX21_HCD_H__
26 26
27#ifdef CONFIG_DYNAMIC_DEBUG
28#define DEBUG
29#endif
30
27#include <linux/platform_data/usb-mx2.h> 31#include <linux/platform_data/usb-mx2.h>
28 32
29#define NUM_ISO_ETDS 2 33#define NUM_ISO_ETDS 2
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c
index c7d0f8f231be..240e792c81a7 100644
--- a/drivers/usb/host/isp116x-hcd.c
+++ b/drivers/usb/host/isp116x-hcd.c
@@ -60,7 +60,6 @@
60#include <linux/debugfs.h> 60#include <linux/debugfs.h>
61#include <linux/seq_file.h> 61#include <linux/seq_file.h>
62#include <linux/errno.h> 62#include <linux/errno.h>
63#include <linux/init.h>
64#include <linux/list.h> 63#include <linux/list.h>
65#include <linux/slab.h> 64#include <linux/slab.h>
66#include <linux/usb.h> 65#include <linux/usb.h>
@@ -1645,6 +1644,8 @@ static int isp116x_probe(struct platform_device *pdev)
1645 if (ret) 1644 if (ret)
1646 goto err6; 1645 goto err6;
1647 1646
1647 device_wakeup_enable(hcd->self.controller);
1648
1648 ret = create_debug_file(isp116x); 1649 ret = create_debug_file(isp116x);
1649 if (ret) { 1650 if (ret) {
1650 ERR("Couldn't create debugfs entry\n"); 1651 ERR("Couldn't create debugfs entry\n");
@@ -1705,7 +1706,7 @@ static struct platform_driver isp116x_driver = {
1705 .suspend = isp116x_suspend, 1706 .suspend = isp116x_suspend,
1706 .resume = isp116x_resume, 1707 .resume = isp116x_resume,
1707 .driver = { 1708 .driver = {
1708 .name = (char *)hcd_name, 1709 .name = hcd_name,
1709 .owner = THIS_MODULE, 1710 .owner = THIS_MODULE,
1710 }, 1711 },
1711}; 1712};
diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c
index 935a2dd367a8..875bcfd3ec1a 100644
--- a/drivers/usb/host/isp1362-hcd.c
+++ b/drivers/usb/host/isp1362-hcd.c
@@ -67,7 +67,6 @@
67#include <linux/sched.h> 67#include <linux/sched.h>
68#include <linux/slab.h> 68#include <linux/slab.h>
69#include <linux/errno.h> 69#include <linux/errno.h>
70#include <linux/init.h>
71#include <linux/list.h> 70#include <linux/list.h>
72#include <linux/interrupt.h> 71#include <linux/interrupt.h>
73#include <linux/usb.h> 72#include <linux/usb.h>
@@ -2746,6 +2745,8 @@ static int isp1362_probe(struct platform_device *pdev)
2746 retval = usb_add_hcd(hcd, irq, irq_flags | IRQF_SHARED); 2745 retval = usb_add_hcd(hcd, irq, irq_flags | IRQF_SHARED);
2747 if (retval != 0) 2746 if (retval != 0)
2748 goto err6; 2747 goto err6;
2748 device_wakeup_enable(hcd->self.controller);
2749
2749 pr_info("%s, irq %d\n", hcd->product_desc, irq); 2750 pr_info("%s, irq %d\n", hcd->product_desc, irq);
2750 2751
2751 create_debug_file(isp1362_hcd); 2752 create_debug_file(isp1362_hcd);
@@ -2829,7 +2830,7 @@ static struct platform_driver isp1362_driver = {
2829 .suspend = isp1362_suspend, 2830 .suspend = isp1362_suspend,
2830 .resume = isp1362_resume, 2831 .resume = isp1362_resume,
2831 .driver = { 2832 .driver = {
2832 .name = (char *)hcd_name, 2833 .name = hcd_name,
2833 .owner = THIS_MODULE, 2834 .owner = THIS_MODULE,
2834 }, 2835 },
2835}; 2836};
diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
index 2facee53eab1..51a0ae9cdd1d 100644
--- a/drivers/usb/host/isp1760-hcd.c
+++ b/drivers/usb/host/isp1760-hcd.c
@@ -2250,6 +2250,7 @@ struct usb_hcd *isp1760_register(phys_addr_t res_start, resource_size_t res_len,
2250 ret = usb_add_hcd(hcd, irq, irqflags); 2250 ret = usb_add_hcd(hcd, irq, irqflags);
2251 if (ret) 2251 if (ret)
2252 goto err_unmap; 2252 goto err_unmap;
2253 device_wakeup_enable(hcd->self.controller);
2253 2254
2254 return hcd; 2255 return hcd;
2255 2256
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index 8c356af79409..091ae4905cfc 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -152,49 +152,42 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
152 return irq; 152 return irq;
153 } 153 }
154 154
155 hcd = usb_create_hcd(driver, &pdev->dev, "at91"); 155 hcd = usb_create_hcd(driver, dev, "at91");
156 if (!hcd) 156 if (!hcd)
157 return -ENOMEM; 157 return -ENOMEM;
158 hcd->rsrc_start = res->start; 158 hcd->rsrc_start = res->start;
159 hcd->rsrc_len = resource_size(res); 159 hcd->rsrc_len = resource_size(res);
160 160
161 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { 161 hcd->regs = devm_ioremap_resource(dev, res);
162 pr_debug("request_mem_region failed\n"); 162 if (IS_ERR(hcd->regs)) {
163 retval = -EBUSY; 163 retval = PTR_ERR(hcd->regs);
164 goto err1; 164 goto err;
165 } 165 }
166 166
167 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); 167 iclk = devm_clk_get(dev, "ohci_clk");
168 if (!hcd->regs) {
169 pr_debug("ioremap failed\n");
170 retval = -EIO;
171 goto err2;
172 }
173
174 iclk = clk_get(&pdev->dev, "ohci_clk");
175 if (IS_ERR(iclk)) { 168 if (IS_ERR(iclk)) {
176 dev_err(&pdev->dev, "failed to get ohci_clk\n"); 169 dev_err(dev, "failed to get ohci_clk\n");
177 retval = PTR_ERR(iclk); 170 retval = PTR_ERR(iclk);
178 goto err3; 171 goto err;
179 } 172 }
180 fclk = clk_get(&pdev->dev, "uhpck"); 173 fclk = devm_clk_get(dev, "uhpck");
181 if (IS_ERR(fclk)) { 174 if (IS_ERR(fclk)) {
182 dev_err(&pdev->dev, "failed to get uhpck\n"); 175 dev_err(dev, "failed to get uhpck\n");
183 retval = PTR_ERR(fclk); 176 retval = PTR_ERR(fclk);
184 goto err4; 177 goto err;
185 } 178 }
186 hclk = clk_get(&pdev->dev, "hclk"); 179 hclk = devm_clk_get(dev, "hclk");
187 if (IS_ERR(hclk)) { 180 if (IS_ERR(hclk)) {
188 dev_err(&pdev->dev, "failed to get hclk\n"); 181 dev_err(dev, "failed to get hclk\n");
189 retval = PTR_ERR(hclk); 182 retval = PTR_ERR(hclk);
190 goto err5; 183 goto err;
191 } 184 }
192 if (IS_ENABLED(CONFIG_COMMON_CLK)) { 185 if (IS_ENABLED(CONFIG_COMMON_CLK)) {
193 uclk = clk_get(&pdev->dev, "usb_clk"); 186 uclk = devm_clk_get(dev, "usb_clk");
194 if (IS_ERR(uclk)) { 187 if (IS_ERR(uclk)) {
195 dev_err(&pdev->dev, "failed to get uclk\n"); 188 dev_err(dev, "failed to get uclk\n");
196 retval = PTR_ERR(uclk); 189 retval = PTR_ERR(uclk);
197 goto err6; 190 goto err;
198 } 191 }
199 } 192 }
200 193
@@ -204,28 +197,15 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
204 at91_start_hc(pdev); 197 at91_start_hc(pdev);
205 198
206 retval = usb_add_hcd(hcd, irq, IRQF_SHARED); 199 retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
207 if (retval == 0) 200 if (retval == 0) {
201 device_wakeup_enable(hcd->self.controller);
208 return retval; 202 return retval;
203 }
209 204
210 /* Error handling */ 205 /* Error handling */
211 at91_stop_hc(pdev); 206 at91_stop_hc(pdev);
212 207
213 if (IS_ENABLED(CONFIG_COMMON_CLK)) 208 err:
214 clk_put(uclk);
215 err6:
216 clk_put(hclk);
217 err5:
218 clk_put(fclk);
219 err4:
220 clk_put(iclk);
221
222 err3:
223 iounmap(hcd->regs);
224
225 err2:
226 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
227
228 err1:
229 usb_put_hcd(hcd); 209 usb_put_hcd(hcd);
230 return retval; 210 return retval;
231} 211}
@@ -248,16 +228,7 @@ static void usb_hcd_at91_remove(struct usb_hcd *hcd,
248{ 228{
249 usb_remove_hcd(hcd); 229 usb_remove_hcd(hcd);
250 at91_stop_hc(pdev); 230 at91_stop_hc(pdev);
251 iounmap(hcd->regs);
252 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
253 usb_put_hcd(hcd); 231 usb_put_hcd(hcd);
254
255 if (IS_ENABLED(CONFIG_COMMON_CLK))
256 clk_put(uclk);
257 clk_put(hclk);
258 clk_put(fclk);
259 clk_put(iclk);
260 fclk = iclk = hclk = NULL;
261} 232}
262 233
263/*-------------------------------------------------------------------------*/ 234/*-------------------------------------------------------------------------*/
@@ -639,10 +610,17 @@ ohci_hcd_at91_drv_suspend(struct platform_device *pdev, pm_message_t mesg)
639{ 610{
640 struct usb_hcd *hcd = platform_get_drvdata(pdev); 611 struct usb_hcd *hcd = platform_get_drvdata(pdev);
641 struct ohci_hcd *ohci = hcd_to_ohci(hcd); 612 struct ohci_hcd *ohci = hcd_to_ohci(hcd);
613 bool do_wakeup = device_may_wakeup(&pdev->dev);
614 int ret;
642 615
643 if (device_may_wakeup(&pdev->dev)) 616 if (do_wakeup)
644 enable_irq_wake(hcd->irq); 617 enable_irq_wake(hcd->irq);
645 618
619 ret = ohci_suspend(hcd, do_wakeup);
620 if (ret) {
621 disable_irq_wake(hcd->irq);
622 return ret;
623 }
646 /* 624 /*
647 * The integrated transceivers seem unable to notice disconnect, 625 * The integrated transceivers seem unable to notice disconnect,
648 * reconnect, or wakeup without the 48 MHz clock active. so for 626 * reconnect, or wakeup without the 48 MHz clock active. so for
@@ -661,7 +639,7 @@ ohci_hcd_at91_drv_suspend(struct platform_device *pdev, pm_message_t mesg)
661 at91_stop_clock(); 639 at91_stop_clock();
662 } 640 }
663 641
664 return 0; 642 return ret;
665} 643}
666 644
667static int ohci_hcd_at91_drv_resume(struct platform_device *pdev) 645static int ohci_hcd_at91_drv_resume(struct platform_device *pdev)
diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c
index 9be59f11e051..df06be6b47f5 100644
--- a/drivers/usb/host/ohci-da8xx.c
+++ b/drivers/usb/host/ohci-da8xx.c
@@ -300,41 +300,28 @@ static int usb_hcd_da8xx_probe(const struct hc_driver *driver,
300 if (hub == NULL) 300 if (hub == NULL)
301 return -ENODEV; 301 return -ENODEV;
302 302
303 usb11_clk = clk_get(&pdev->dev, "usb11"); 303 usb11_clk = devm_clk_get(&pdev->dev, "usb11");
304 if (IS_ERR(usb11_clk)) 304 if (IS_ERR(usb11_clk))
305 return PTR_ERR(usb11_clk); 305 return PTR_ERR(usb11_clk);
306 306
307 usb20_clk = clk_get(&pdev->dev, "usb20"); 307 usb20_clk = devm_clk_get(&pdev->dev, "usb20");
308 if (IS_ERR(usb20_clk)) { 308 if (IS_ERR(usb20_clk))
309 error = PTR_ERR(usb20_clk); 309 return PTR_ERR(usb20_clk);
310 goto err0;
311 }
312 310
313 hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev)); 311 hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev));
314 if (!hcd) { 312 if (!hcd)
315 error = -ENOMEM; 313 return -ENOMEM;
316 goto err1;
317 }
318 314
319 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 315 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
320 if (!mem) { 316 if (!mem)
321 error = -ENODEV; 317 return -ENODEV;
322 goto err2;
323 }
324 hcd->rsrc_start = mem->start; 318 hcd->rsrc_start = mem->start;
325 hcd->rsrc_len = resource_size(mem); 319 hcd->rsrc_len = resource_size(mem);
326 320
327 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { 321 hcd->regs = devm_ioremap_resource(&pdev->dev, mem);
328 dev_dbg(&pdev->dev, "request_mem_region failed\n"); 322 if (IS_ERR(hcd->regs)) {
329 error = -EBUSY; 323 error = PTR_ERR(hcd->regs);
330 goto err2; 324 goto err;
331 }
332
333 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
334 if (!hcd->regs) {
335 dev_err(&pdev->dev, "ioremap failed\n");
336 error = -ENOMEM;
337 goto err3;
338 } 325 }
339 326
340 ohci_hcd_init(hcd_to_ohci(hcd)); 327 ohci_hcd_init(hcd_to_ohci(hcd));
@@ -342,11 +329,13 @@ static int usb_hcd_da8xx_probe(const struct hc_driver *driver,
342 irq = platform_get_irq(pdev, 0); 329 irq = platform_get_irq(pdev, 0);
343 if (irq < 0) { 330 if (irq < 0) {
344 error = -ENODEV; 331 error = -ENODEV;
345 goto err4; 332 goto err;
346 } 333 }
347 error = usb_add_hcd(hcd, irq, 0); 334 error = usb_add_hcd(hcd, irq, 0);
348 if (error) 335 if (error)
349 goto err4; 336 goto err;
337
338 device_wakeup_enable(hcd->self.controller);
350 339
351 if (hub->ocic_notify) { 340 if (hub->ocic_notify) {
352 error = hub->ocic_notify(ohci_da8xx_ocic_handler); 341 error = hub->ocic_notify(ohci_da8xx_ocic_handler);
@@ -355,16 +344,8 @@ static int usb_hcd_da8xx_probe(const struct hc_driver *driver,
355 } 344 }
356 345
357 usb_remove_hcd(hcd); 346 usb_remove_hcd(hcd);
358err4: 347err:
359 iounmap(hcd->regs);
360err3:
361 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
362err2:
363 usb_put_hcd(hcd); 348 usb_put_hcd(hcd);
364err1:
365 clk_put(usb20_clk);
366err0:
367 clk_put(usb11_clk);
368 return error; 349 return error;
369} 350}
370 351
@@ -384,11 +365,7 @@ usb_hcd_da8xx_remove(struct usb_hcd *hcd, struct platform_device *pdev)
384 365
385 hub->ocic_notify(NULL); 366 hub->ocic_notify(NULL);
386 usb_remove_hcd(hcd); 367 usb_remove_hcd(hcd);
387 iounmap(hcd->regs);
388 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
389 usb_put_hcd(hcd); 368 usb_put_hcd(hcd);
390 clk_put(usb20_clk);
391 clk_put(usb11_clk);
392} 369}
393 370
394static int ohci_hcd_da8xx_drv_probe(struct platform_device *dev) 371static int ohci_hcd_da8xx_drv_probe(struct platform_device *dev)
@@ -406,19 +383,27 @@ static int ohci_hcd_da8xx_drv_remove(struct platform_device *dev)
406} 383}
407 384
408#ifdef CONFIG_PM 385#ifdef CONFIG_PM
409static int ohci_da8xx_suspend(struct platform_device *dev, pm_message_t message) 386static int ohci_da8xx_suspend(struct platform_device *pdev,
387 pm_message_t message)
410{ 388{
411 struct usb_hcd *hcd = platform_get_drvdata(dev); 389 struct usb_hcd *hcd = platform_get_drvdata(pdev);
412 struct ohci_hcd *ohci = hcd_to_ohci(hcd); 390 struct ohci_hcd *ohci = hcd_to_ohci(hcd);
391 bool do_wakeup = device_may_wakeup(&pdev->dev);
392 int ret;
393
413 394
414 if (time_before(jiffies, ohci->next_statechange)) 395 if (time_before(jiffies, ohci->next_statechange))
415 msleep(5); 396 msleep(5);
416 ohci->next_statechange = jiffies; 397 ohci->next_statechange = jiffies;
417 398
399 ret = ohci_suspend(hcd, do_wakeup);
400 if (ret)
401 return ret;
402
418 ohci_da8xx_clock(0); 403 ohci_da8xx_clock(0);
419 hcd->state = HC_STATE_SUSPENDED; 404 hcd->state = HC_STATE_SUSPENDED;
420 dev->dev.power.power_state = PMSG_SUSPEND; 405
421 return 0; 406 return ret;
422} 407}
423 408
424static int ohci_da8xx_resume(struct platform_device *dev) 409static int ohci_da8xx_resume(struct platform_device *dev)
diff --git a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c
index 3fca52ec02ac..45032e933e18 100644
--- a/drivers/usb/host/ohci-dbg.c
+++ b/drivers/usb/host/ohci-dbg.c
@@ -9,8 +9,6 @@
9 9
10/*-------------------------------------------------------------------------*/ 10/*-------------------------------------------------------------------------*/
11 11
12#ifdef DEBUG
13
14#define edstring(ed_type) ({ char *temp; \ 12#define edstring(ed_type) ({ char *temp; \
15 switch (ed_type) { \ 13 switch (ed_type) { \
16 case PIPE_CONTROL: temp = "ctrl"; break; \ 14 case PIPE_CONTROL: temp = "ctrl"; break; \
@@ -20,57 +18,6 @@
20 } temp;}) 18 } temp;})
21#define pipestring(pipe) edstring(usb_pipetype(pipe)) 19#define pipestring(pipe) edstring(usb_pipetype(pipe))
22 20
23/* debug| print the main components of an URB
24 * small: 0) header + data packets 1) just header
25 */
26static void __maybe_unused
27urb_print(struct urb * urb, char * str, int small, int status)
28{
29 unsigned int pipe= urb->pipe;
30
31 if (!urb->dev || !urb->dev->bus) {
32 printk(KERN_DEBUG "%s URB: no dev\n", str);
33 return;
34 }
35
36#ifndef OHCI_VERBOSE_DEBUG
37 if (status != 0)
38#endif
39 printk(KERN_DEBUG "%s %p dev=%d ep=%d%s-%s flags=%x len=%d/%d stat=%d\n",
40 str,
41 urb,
42 usb_pipedevice (pipe),
43 usb_pipeendpoint (pipe),
44 usb_pipeout (pipe)? "out" : "in",
45 pipestring (pipe),
46 urb->transfer_flags,
47 urb->actual_length,
48 urb->transfer_buffer_length,
49 status);
50
51#ifdef OHCI_VERBOSE_DEBUG
52 if (!small) {
53 int i, len;
54
55 if (usb_pipecontrol (pipe)) {
56 printk (KERN_DEBUG "%s: setup(8):", __FILE__);
57 for (i = 0; i < 8 ; i++)
58 printk (" %02x", ((__u8 *) urb->setup_packet) [i]);
59 printk ("\n");
60 }
61 if (urb->transfer_buffer_length > 0 && urb->transfer_buffer) {
62 printk (KERN_DEBUG "%s: data(%d/%d):", __FILE__,
63 urb->actual_length,
64 urb->transfer_buffer_length);
65 len = usb_pipeout (pipe)?
66 urb->transfer_buffer_length: urb->actual_length;
67 for (i = 0; i < 16 && i < len; i++)
68 printk (" %02x", ((__u8 *) urb->transfer_buffer) [i]);
69 printk ("%s stat:%d\n", i < len? "...": "", status);
70 }
71 }
72#endif
73}
74 21
75#define ohci_dbg_sw(ohci, next, size, format, arg...) \ 22#define ohci_dbg_sw(ohci, next, size, format, arg...) \
76 do { \ 23 do { \
@@ -407,22 +354,8 @@ ohci_dump_ed (const struct ohci_hcd *ohci, const char *label,
407 } 354 }
408} 355}
409 356
410#else
411static inline void ohci_dump (struct ohci_hcd *controller, int verbose) {}
412
413#undef OHCI_VERBOSE_DEBUG
414
415#endif /* DEBUG */
416
417/*-------------------------------------------------------------------------*/ 357/*-------------------------------------------------------------------------*/
418 358
419#ifdef STUB_DEBUG_FILES
420
421static inline void create_debug_files (struct ohci_hcd *bus) { }
422static inline void remove_debug_files (struct ohci_hcd *bus) { }
423
424#else
425
426static int debug_async_open(struct inode *, struct file *); 359static int debug_async_open(struct inode *, struct file *);
427static int debug_periodic_open(struct inode *, struct file *); 360static int debug_periodic_open(struct inode *, struct file *);
428static int debug_registers_open(struct inode *, struct file *); 361static int debug_registers_open(struct inode *, struct file *);
@@ -871,7 +804,5 @@ static inline void remove_debug_files (struct ohci_hcd *ohci)
871 debugfs_remove(ohci->debug_dir); 804 debugfs_remove(ohci->debug_dir);
872} 805}
873 806
874#endif
875
876/*-------------------------------------------------------------------------*/ 807/*-------------------------------------------------------------------------*/
877 808
diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c
index 91ec9b2cd378..68588d8a09bb 100644
--- a/drivers/usb/host/ohci-exynos.c
+++ b/drivers/usb/host/ohci-exynos.c
@@ -146,6 +146,7 @@ skip_phy:
146 dev_err(&pdev->dev, "Failed to add USB HCD\n"); 146 dev_err(&pdev->dev, "Failed to add USB HCD\n");
147 goto fail_add_hcd; 147 goto fail_add_hcd;
148 } 148 }
149 device_wakeup_enable(hcd->self.controller);
149 return 0; 150 return 0;
150 151
151fail_add_hcd: 152fail_add_hcd:
@@ -191,23 +192,14 @@ static int exynos_ohci_suspend(struct device *dev)
191 struct exynos_ohci_hcd *exynos_ohci = to_exynos_ohci(hcd); 192 struct exynos_ohci_hcd *exynos_ohci = to_exynos_ohci(hcd);
192 struct ohci_hcd *ohci = hcd_to_ohci(hcd); 193 struct ohci_hcd *ohci = hcd_to_ohci(hcd);
193 struct platform_device *pdev = to_platform_device(dev); 194 struct platform_device *pdev = to_platform_device(dev);
195 bool do_wakeup = device_may_wakeup(dev);
194 unsigned long flags; 196 unsigned long flags;
195 int rc = 0; 197 int rc = ohci_suspend(hcd, do_wakeup);
196 198
197 /* 199 if (rc)
198 * Root hub was already suspended. Disable irq emission and 200 return rc;
199 * mark HW unaccessible, bail out if RH has been resumed. Use
200 * the spinlock to properly synchronize with possible pending
201 * RH suspend or resume activity.
202 */
203 spin_lock_irqsave(&ohci->lock, flags);
204 if (ohci->rh_state != OHCI_RH_SUSPENDED &&
205 ohci->rh_state != OHCI_RH_HALTED) {
206 rc = -EINVAL;
207 goto fail;
208 }
209 201
210 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); 202 spin_lock_irqsave(&ohci->lock, flags);
211 203
212 if (exynos_ohci->otg) 204 if (exynos_ohci->otg)
213 exynos_ohci->otg->set_host(exynos_ohci->otg, &hcd->self); 205 exynos_ohci->otg->set_host(exynos_ohci->otg, &hcd->self);
@@ -216,10 +208,9 @@ static int exynos_ohci_suspend(struct device *dev)
216 208
217 clk_disable_unprepare(exynos_ohci->clk); 209 clk_disable_unprepare(exynos_ohci->clk);
218 210
219fail:
220 spin_unlock_irqrestore(&ohci->lock, flags); 211 spin_unlock_irqrestore(&ohci->lock, flags);
221 212
222 return rc; 213 return 0;
223} 214}
224 215
225static int exynos_ohci_resume(struct device *dev) 216static int exynos_ohci_resume(struct device *dev)
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 8ada13f8dde2..3586460fb2a1 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -51,8 +51,6 @@
51 51
52/*-------------------------------------------------------------------------*/ 52/*-------------------------------------------------------------------------*/
53 53
54#undef OHCI_VERBOSE_DEBUG /* not always helpful */
55
56/* For initializing controller (mask in an HCFS mode too) */ 54/* For initializing controller (mask in an HCFS mode too) */
57#define OHCI_CONTROL_INIT OHCI_CTRL_CBSR 55#define OHCI_CONTROL_INIT OHCI_CTRL_CBSR
58#define OHCI_INTR_INIT \ 56#define OHCI_INTR_INIT \
@@ -127,10 +125,6 @@ static int ohci_urb_enqueue (
127 unsigned long flags; 125 unsigned long flags;
128 int retval = 0; 126 int retval = 0;
129 127
130#ifdef OHCI_VERBOSE_DEBUG
131 urb_print(urb, "SUB", usb_pipein(pipe), -EINPROGRESS);
132#endif
133
134 /* every endpoint has a ed, locate and maybe (re)initialize it */ 128 /* every endpoint has a ed, locate and maybe (re)initialize it */
135 if (! (ed = ed_get (ohci, urb->ep, urb->dev, pipe, urb->interval))) 129 if (! (ed = ed_get (ohci, urb->ep, urb->dev, pipe, urb->interval)))
136 return -ENOMEM; 130 return -ENOMEM;
@@ -284,10 +278,6 @@ static int ohci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
284 unsigned long flags; 278 unsigned long flags;
285 int rc; 279 int rc;
286 280
287#ifdef OHCI_VERBOSE_DEBUG
288 urb_print(urb, "UNLINK", 1, status);
289#endif
290
291 spin_lock_irqsave (&ohci->lock, flags); 281 spin_lock_irqsave (&ohci->lock, flags);
292 rc = usb_hcd_check_unlink_urb(hcd, urb, status); 282 rc = usb_hcd_check_unlink_urb(hcd, urb, status);
293 if (rc) { 283 if (rc) {
@@ -840,7 +830,7 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)
840 } 830 }
841 831
842 if (ints & OHCI_INTR_RHSC) { 832 if (ints & OHCI_INTR_RHSC) {
843 ohci_vdbg(ohci, "rhsc\n"); 833 ohci_dbg(ohci, "rhsc\n");
844 ohci->next_statechange = jiffies + STATECHANGE_DELAY; 834 ohci->next_statechange = jiffies + STATECHANGE_DELAY;
845 ohci_writel(ohci, OHCI_INTR_RD | OHCI_INTR_RHSC, 835 ohci_writel(ohci, OHCI_INTR_RD | OHCI_INTR_RHSC,
846 &regs->intrstatus); 836 &regs->intrstatus);
@@ -862,7 +852,7 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)
862 * this might not happen. 852 * this might not happen.
863 */ 853 */
864 else if (ints & OHCI_INTR_RD) { 854 else if (ints & OHCI_INTR_RD) {
865 ohci_vdbg(ohci, "resume detect\n"); 855 ohci_dbg(ohci, "resume detect\n");
866 ohci_writel(ohci, OHCI_INTR_RD, &regs->intrstatus); 856 ohci_writel(ohci, OHCI_INTR_RD, &regs->intrstatus);
867 set_bit(HCD_FLAG_POLL_RH, &hcd->flags); 857 set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
868 if (ohci->autostop) { 858 if (ohci->autostop) {
@@ -1036,6 +1026,7 @@ int ohci_suspend(struct usb_hcd *hcd, bool do_wakeup)
1036{ 1026{
1037 struct ohci_hcd *ohci = hcd_to_ohci (hcd); 1027 struct ohci_hcd *ohci = hcd_to_ohci (hcd);
1038 unsigned long flags; 1028 unsigned long flags;
1029 int rc = 0;
1039 1030
1040 /* Disable irq emission and mark HW unaccessible. Use 1031 /* Disable irq emission and mark HW unaccessible. Use
1041 * the spinlock to properly synchronize with possible pending 1032 * the spinlock to properly synchronize with possible pending
@@ -1048,7 +1039,13 @@ int ohci_suspend(struct usb_hcd *hcd, bool do_wakeup)
1048 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); 1039 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
1049 spin_unlock_irqrestore (&ohci->lock, flags); 1040 spin_unlock_irqrestore (&ohci->lock, flags);
1050 1041
1051 return 0; 1042 synchronize_irq(hcd->irq);
1043
1044 if (do_wakeup && HCD_WAKEUP_PENDING(hcd)) {
1045 ohci_resume(hcd, false);
1046 rc = -EBUSY;
1047 }
1048 return rc;
1052} 1049}
1053EXPORT_SYMBOL_GPL(ohci_suspend); 1050EXPORT_SYMBOL_GPL(ohci_suspend);
1054 1051
@@ -1233,13 +1230,11 @@ static int __init ohci_hcd_mod_init(void)
1233 sizeof (struct ed), sizeof (struct td)); 1230 sizeof (struct ed), sizeof (struct td));
1234 set_bit(USB_OHCI_LOADED, &usb_hcds_loaded); 1231 set_bit(USB_OHCI_LOADED, &usb_hcds_loaded);
1235 1232
1236#ifdef DEBUG
1237 ohci_debug_root = debugfs_create_dir("ohci", usb_debug_root); 1233 ohci_debug_root = debugfs_create_dir("ohci", usb_debug_root);
1238 if (!ohci_debug_root) { 1234 if (!ohci_debug_root) {
1239 retval = -ENOENT; 1235 retval = -ENOENT;
1240 goto error_debug; 1236 goto error_debug;
1241 } 1237 }
1242#endif
1243 1238
1244#ifdef PS3_SYSTEM_BUS_DRIVER 1239#ifdef PS3_SYSTEM_BUS_DRIVER
1245 retval = ps3_ohci_driver_register(&PS3_SYSTEM_BUS_DRIVER); 1240 retval = ps3_ohci_driver_register(&PS3_SYSTEM_BUS_DRIVER);
@@ -1314,11 +1309,9 @@ static int __init ohci_hcd_mod_init(void)
1314 ps3_ohci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); 1309 ps3_ohci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
1315 error_ps3: 1310 error_ps3:
1316#endif 1311#endif
1317#ifdef DEBUG
1318 debugfs_remove(ohci_debug_root); 1312 debugfs_remove(ohci_debug_root);
1319 ohci_debug_root = NULL; 1313 ohci_debug_root = NULL;
1320 error_debug: 1314 error_debug:
1321#endif
1322 1315
1323 clear_bit(USB_OHCI_LOADED, &usb_hcds_loaded); 1316 clear_bit(USB_OHCI_LOADED, &usb_hcds_loaded);
1324 return retval; 1317 return retval;
@@ -1348,9 +1341,7 @@ static void __exit ohci_hcd_mod_exit(void)
1348#ifdef PS3_SYSTEM_BUS_DRIVER 1341#ifdef PS3_SYSTEM_BUS_DRIVER
1349 ps3_ohci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); 1342 ps3_ohci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
1350#endif 1343#endif
1351#ifdef DEBUG
1352 debugfs_remove(ohci_debug_root); 1344 debugfs_remove(ohci_debug_root);
1353#endif
1354 clear_bit(USB_OHCI_LOADED, &usb_hcds_loaded); 1345 clear_bit(USB_OHCI_LOADED, &usb_hcds_loaded);
1355} 1346}
1356module_exit(ohci_hcd_mod_exit); 1347module_exit(ohci_hcd_mod_exit);
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
index 61705a760e7d..c81c8721cc5a 100644
--- a/drivers/usb/host/ohci-hub.c
+++ b/drivers/usb/host/ohci-hub.c
@@ -725,10 +725,8 @@ static int ohci_hub_control (
725 temp = roothub_portstatus (ohci, wIndex); 725 temp = roothub_portstatus (ohci, wIndex);
726 put_unaligned_le32(temp, buf); 726 put_unaligned_le32(temp, buf);
727 727
728#ifndef OHCI_VERBOSE_DEBUG 728 if (*(u16*)(buf+2)) /* only if wPortChange is interesting */
729 if (*(u16*)(buf+2)) /* only if wPortChange is interesting */ 729 dbg_port(ohci, "GetStatus", wIndex, temp);
730#endif
731 dbg_port (ohci, "GetStatus", wIndex, temp);
732 break; 730 break;
733 case SetHubFeature: 731 case SetHubFeature:
734 switch (wValue) { 732 switch (wValue) {
diff --git a/drivers/usb/host/ohci-jz4740.c b/drivers/usb/host/ohci-jz4740.c
index d4ef53990d73..af8dc1b92d75 100644
--- a/drivers/usb/host/ohci-jz4740.c
+++ b/drivers/usb/host/ohci-jz4740.c
@@ -174,31 +174,23 @@ static int jz4740_ohci_probe(struct platform_device *pdev)
174 174
175 jz4740_ohci = hcd_to_jz4740_hcd(hcd); 175 jz4740_ohci = hcd_to_jz4740_hcd(hcd);
176 176
177 res = request_mem_region(res->start, resource_size(res), hcd_name);
178 if (!res) {
179 dev_err(&pdev->dev, "Failed to request mem region.\n");
180 ret = -EBUSY;
181 goto err_free;
182 }
183
184 hcd->rsrc_start = res->start; 177 hcd->rsrc_start = res->start;
185 hcd->rsrc_len = resource_size(res); 178 hcd->rsrc_len = resource_size(res);
186 hcd->regs = ioremap(res->start, resource_size(res));
187 179
188 if (!hcd->regs) { 180 hcd->regs = devm_ioremap_resource(&pdev->dev, res);
189 dev_err(&pdev->dev, "Failed to ioremap registers.\n"); 181 if (IS_ERR(hcd->regs)) {
190 ret = -EBUSY; 182 ret = PTR_ERR(hcd->regs);
191 goto err_release_mem; 183 goto err_free;
192 } 184 }
193 185
194 jz4740_ohci->clk = clk_get(&pdev->dev, "uhc"); 186 jz4740_ohci->clk = devm_clk_get(&pdev->dev, "uhc");
195 if (IS_ERR(jz4740_ohci->clk)) { 187 if (IS_ERR(jz4740_ohci->clk)) {
196 ret = PTR_ERR(jz4740_ohci->clk); 188 ret = PTR_ERR(jz4740_ohci->clk);
197 dev_err(&pdev->dev, "Failed to get clock: %d\n", ret); 189 dev_err(&pdev->dev, "Failed to get clock: %d\n", ret);
198 goto err_iounmap; 190 goto err_free;
199 } 191 }
200 192
201 jz4740_ohci->vbus = regulator_get(&pdev->dev, "vbus"); 193 jz4740_ohci->vbus = devm_regulator_get(&pdev->dev, "vbus");
202 if (IS_ERR(jz4740_ohci->vbus)) 194 if (IS_ERR(jz4740_ohci->vbus))
203 jz4740_ohci->vbus = NULL; 195 jz4740_ohci->vbus = NULL;
204 196
@@ -217,21 +209,15 @@ static int jz4740_ohci_probe(struct platform_device *pdev)
217 dev_err(&pdev->dev, "Failed to add hcd: %d\n", ret); 209 dev_err(&pdev->dev, "Failed to add hcd: %d\n", ret);
218 goto err_disable; 210 goto err_disable;
219 } 211 }
212 device_wakeup_enable(hcd->self.controller);
220 213
221 return 0; 214 return 0;
222 215
223err_disable: 216err_disable:
224 if (jz4740_ohci->vbus) { 217 if (jz4740_ohci->vbus)
225 regulator_disable(jz4740_ohci->vbus); 218 regulator_disable(jz4740_ohci->vbus);
226 regulator_put(jz4740_ohci->vbus);
227 }
228 clk_disable(jz4740_ohci->clk); 219 clk_disable(jz4740_ohci->clk);
229 220
230 clk_put(jz4740_ohci->clk);
231err_iounmap:
232 iounmap(hcd->regs);
233err_release_mem:
234 release_mem_region(res->start, resource_size(res));
235err_free: 221err_free:
236 usb_put_hcd(hcd); 222 usb_put_hcd(hcd);
237 223
@@ -245,16 +231,10 @@ static int jz4740_ohci_remove(struct platform_device *pdev)
245 231
246 usb_remove_hcd(hcd); 232 usb_remove_hcd(hcd);
247 233
248 if (jz4740_ohci->vbus) { 234 if (jz4740_ohci->vbus)
249 regulator_disable(jz4740_ohci->vbus); 235 regulator_disable(jz4740_ohci->vbus);
250 regulator_put(jz4740_ohci->vbus);
251 }
252 236
253 clk_disable(jz4740_ohci->clk); 237 clk_disable(jz4740_ohci->clk);
254 clk_put(jz4740_ohci->clk);
255
256 iounmap(hcd->regs);
257 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
258 238
259 usb_put_hcd(hcd); 239 usb_put_hcd(hcd);
260 240
diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c
index e99db8a6d55f..ba180ed0f81c 100644
--- a/drivers/usb/host/ohci-nxp.c
+++ b/drivers/usb/host/ohci-nxp.c
@@ -196,17 +196,17 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev)
196 __raw_writel(USB_SLAVE_HCLK_EN | PAD_CONTROL_LAST_DRIVEN, USB_CTRL); 196 __raw_writel(USB_SLAVE_HCLK_EN | PAD_CONTROL_LAST_DRIVEN, USB_CTRL);
197 197
198 /* Enable USB PLL */ 198 /* Enable USB PLL */
199 usb_pll_clk = clk_get(&pdev->dev, "ck_pll5"); 199 usb_pll_clk = devm_clk_get(&pdev->dev, "ck_pll5");
200 if (IS_ERR(usb_pll_clk)) { 200 if (IS_ERR(usb_pll_clk)) {
201 dev_err(&pdev->dev, "failed to acquire USB PLL\n"); 201 dev_err(&pdev->dev, "failed to acquire USB PLL\n");
202 ret = PTR_ERR(usb_pll_clk); 202 ret = PTR_ERR(usb_pll_clk);
203 goto fail_pll; 203 goto fail_disable;
204 } 204 }
205 205
206 ret = clk_enable(usb_pll_clk); 206 ret = clk_enable(usb_pll_clk);
207 if (ret < 0) { 207 if (ret < 0) {
208 dev_err(&pdev->dev, "failed to start USB PLL\n"); 208 dev_err(&pdev->dev, "failed to start USB PLL\n");
209 goto fail_pllen; 209 goto fail_disable;
210 } 210 }
211 211
212 ret = clk_set_rate(usb_pll_clk, 48000); 212 ret = clk_set_rate(usb_pll_clk, 48000);
@@ -216,21 +216,21 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev)
216 } 216 }
217 217
218 /* Enable USB device clock */ 218 /* Enable USB device clock */
219 usb_dev_clk = clk_get(&pdev->dev, "ck_usbd"); 219 usb_dev_clk = devm_clk_get(&pdev->dev, "ck_usbd");
220 if (IS_ERR(usb_dev_clk)) { 220 if (IS_ERR(usb_dev_clk)) {
221 dev_err(&pdev->dev, "failed to acquire USB DEV Clock\n"); 221 dev_err(&pdev->dev, "failed to acquire USB DEV Clock\n");
222 ret = PTR_ERR(usb_dev_clk); 222 ret = PTR_ERR(usb_dev_clk);
223 goto fail_dev; 223 goto fail_rate;
224 } 224 }
225 225
226 ret = clk_enable(usb_dev_clk); 226 ret = clk_enable(usb_dev_clk);
227 if (ret < 0) { 227 if (ret < 0) {
228 dev_err(&pdev->dev, "failed to start USB DEV Clock\n"); 228 dev_err(&pdev->dev, "failed to start USB DEV Clock\n");
229 goto fail_deven; 229 goto fail_rate;
230 } 230 }
231 231
232 /* Enable USB otg clocks */ 232 /* Enable USB otg clocks */
233 usb_otg_clk = clk_get(&pdev->dev, "ck_usb_otg"); 233 usb_otg_clk = devm_clk_get(&pdev->dev, "ck_usb_otg");
234 if (IS_ERR(usb_otg_clk)) { 234 if (IS_ERR(usb_otg_clk)) {
235 dev_err(&pdev->dev, "failed to acquire USB DEV Clock\n"); 235 dev_err(&pdev->dev, "failed to acquire USB DEV Clock\n");
236 ret = PTR_ERR(usb_otg_clk); 236 ret = PTR_ERR(usb_otg_clk);
@@ -242,7 +242,7 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev)
242 ret = clk_enable(usb_otg_clk); 242 ret = clk_enable(usb_otg_clk);
243 if (ret < 0) { 243 if (ret < 0) {
244 dev_err(&pdev->dev, "failed to start USB DEV Clock\n"); 244 dev_err(&pdev->dev, "failed to start USB DEV Clock\n");
245 goto fail_otgen; 245 goto fail_otg;
246 } 246 }
247 247
248 isp1301_configure(); 248 isp1301_configure();
@@ -274,26 +274,20 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev)
274 274
275 dev_info(&pdev->dev, "at 0x%p, irq %d\n", hcd->regs, hcd->irq); 275 dev_info(&pdev->dev, "at 0x%p, irq %d\n", hcd->regs, hcd->irq);
276 ret = usb_add_hcd(hcd, irq, 0); 276 ret = usb_add_hcd(hcd, irq, 0);
277 if (ret == 0) 277 if (ret == 0) {
278 device_wakeup_enable(hcd->self.controller);
278 return ret; 279 return ret;
280 }
279 281
280 ohci_nxp_stop_hc(); 282 ohci_nxp_stop_hc();
281fail_resource: 283fail_resource:
282 usb_put_hcd(hcd); 284 usb_put_hcd(hcd);
283fail_hcd: 285fail_hcd:
284 clk_disable(usb_otg_clk); 286 clk_disable(usb_otg_clk);
285fail_otgen:
286 clk_put(usb_otg_clk);
287fail_otg: 287fail_otg:
288 clk_disable(usb_dev_clk); 288 clk_disable(usb_dev_clk);
289fail_deven:
290 clk_put(usb_dev_clk);
291fail_dev:
292fail_rate: 289fail_rate:
293 clk_disable(usb_pll_clk); 290 clk_disable(usb_pll_clk);
294fail_pllen:
295 clk_put(usb_pll_clk);
296fail_pll:
297fail_disable: 291fail_disable:
298 isp1301_i2c_client = NULL; 292 isp1301_i2c_client = NULL;
299 return ret; 293 return ret;
@@ -307,9 +301,7 @@ static int ohci_hcd_nxp_remove(struct platform_device *pdev)
307 ohci_nxp_stop_hc(); 301 ohci_nxp_stop_hc();
308 usb_put_hcd(hcd); 302 usb_put_hcd(hcd);
309 clk_disable(usb_pll_clk); 303 clk_disable(usb_pll_clk);
310 clk_put(usb_pll_clk);
311 clk_disable(usb_dev_clk); 304 clk_disable(usb_dev_clk);
312 clk_put(usb_dev_clk);
313 i2c_unregister_device(isp1301_i2c_client); 305 i2c_unregister_device(isp1301_i2c_client);
314 isp1301_i2c_client = NULL; 306 isp1301_i2c_client = NULL;
315 307
diff --git a/drivers/usb/host/ohci-octeon.c b/drivers/usb/host/ohci-octeon.c
index 6c16dcef15c6..15af8954085e 100644
--- a/drivers/usb/host/ohci-octeon.c
+++ b/drivers/usb/host/ohci-octeon.c
@@ -138,20 +138,12 @@ static int ohci_octeon_drv_probe(struct platform_device *pdev)
138 hcd->rsrc_start = res_mem->start; 138 hcd->rsrc_start = res_mem->start;
139 hcd->rsrc_len = resource_size(res_mem); 139 hcd->rsrc_len = resource_size(res_mem);
140 140
141 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, 141 reg_base = devm_ioremap_resource(&pdev->dev, res_mem);
142 OCTEON_OHCI_HCD_NAME)) { 142 if (IS_ERR(reg_base)) {
143 dev_err(&pdev->dev, "request_mem_region failed\n"); 143 ret = PTR_ERR(reg_base);
144 ret = -EBUSY;
145 goto err1; 144 goto err1;
146 } 145 }
147 146
148 reg_base = ioremap(hcd->rsrc_start, hcd->rsrc_len);
149 if (!reg_base) {
150 dev_err(&pdev->dev, "ioremap failed\n");
151 ret = -ENOMEM;
152 goto err2;
153 }
154
155 ohci_octeon_hw_start(); 147 ohci_octeon_hw_start();
156 148
157 hcd->regs = reg_base; 149 hcd->regs = reg_base;
@@ -168,19 +160,18 @@ static int ohci_octeon_drv_probe(struct platform_device *pdev)
168 ret = usb_add_hcd(hcd, irq, IRQF_SHARED); 160 ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
169 if (ret) { 161 if (ret) {
170 dev_dbg(&pdev->dev, "failed to add hcd with err %d\n", ret); 162 dev_dbg(&pdev->dev, "failed to add hcd with err %d\n", ret);
171 goto err3; 163 goto err2;
172 } 164 }
173 165
166 device_wakeup_enable(hcd->self.controller);
167
174 platform_set_drvdata(pdev, hcd); 168 platform_set_drvdata(pdev, hcd);
175 169
176 return 0; 170 return 0;
177 171
178err3: 172err2:
179 ohci_octeon_hw_stop(); 173 ohci_octeon_hw_stop();
180 174
181 iounmap(hcd->regs);
182err2:
183 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
184err1: 175err1:
185 usb_put_hcd(hcd); 176 usb_put_hcd(hcd);
186 return ret; 177 return ret;
@@ -193,8 +184,6 @@ static int ohci_octeon_drv_remove(struct platform_device *pdev)
193 usb_remove_hcd(hcd); 184 usb_remove_hcd(hcd);
194 185
195 ohci_octeon_hw_stop(); 186 ohci_octeon_hw_stop();
196 iounmap(hcd->regs);
197 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
198 usb_put_hcd(hcd); 187 usb_put_hcd(hcd);
199 188
200 return 0; 189 return 0;
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index f253214741ba..c923cafcaca7 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -311,14 +311,14 @@ static int usb_hcd_omap_probe (const struct hc_driver *driver,
311 struct usb_hcd *hcd = 0; 311 struct usb_hcd *hcd = 0;
312 312
313 if (pdev->num_resources != 2) { 313 if (pdev->num_resources != 2) {
314 printk(KERN_ERR "hcd probe: invalid num_resources: %i\n", 314 dev_err(&pdev->dev, "invalid num_resources: %i\n",
315 pdev->num_resources); 315 pdev->num_resources);
316 return -ENODEV; 316 return -ENODEV;
317 } 317 }
318 318
319 if (pdev->resource[0].flags != IORESOURCE_MEM 319 if (pdev->resource[0].flags != IORESOURCE_MEM
320 || pdev->resource[1].flags != IORESOURCE_IRQ) { 320 || pdev->resource[1].flags != IORESOURCE_IRQ) {
321 printk(KERN_ERR "hcd probe: invalid resource type\n"); 321 dev_err(&pdev->dev, "invalid resource type\n");
322 return -ENODEV; 322 return -ENODEV;
323 } 323 }
324 324
@@ -367,6 +367,7 @@ static int usb_hcd_omap_probe (const struct hc_driver *driver,
367 if (retval) 367 if (retval)
368 goto err3; 368 goto err3;
369 369
370 device_wakeup_enable(hcd->self.controller);
370 return 0; 371 return 0;
371err3: 372err3:
372 iounmap(hcd->regs); 373 iounmap(hcd->regs);
diff --git a/drivers/usb/host/ohci-omap3.c b/drivers/usb/host/ohci-omap3.c
index 21457417a856..ec15aebe8786 100644
--- a/drivers/usb/host/ohci-omap3.c
+++ b/drivers/usb/host/ohci-omap3.c
@@ -130,6 +130,7 @@ static int ohci_hcd_omap3_probe(struct platform_device *pdev)
130 dev_dbg(dev, "failed to add hcd with err %d\n", ret); 130 dev_dbg(dev, "failed to add hcd with err %d\n", ret);
131 goto err_add_hcd; 131 goto err_add_hcd;
132 } 132 }
133 device_wakeup_enable(hcd->self.controller);
133 134
134 return 0; 135 return 0;
135 136
diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c
index f351ff5b171f..68f674cd095f 100644
--- a/drivers/usb/host/ohci-platform.c
+++ b/drivers/usb/host/ohci-platform.c
@@ -108,6 +108,8 @@ static int ohci_platform_probe(struct platform_device *dev)
108 if (err) 108 if (err)
109 goto err_put_hcd; 109 goto err_put_hcd;
110 110
111 device_wakeup_enable(hcd->self.controller);
112
111 platform_set_drvdata(dev, hcd); 113 platform_set_drvdata(dev, hcd);
112 114
113 return err; 115 return err;
diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c
index 81f3eba215c1..965e3e9e688a 100644
--- a/drivers/usb/host/ohci-ppc-of.c
+++ b/drivers/usb/host/ohci-ppc-of.c
@@ -115,24 +115,18 @@ static int ohci_hcd_ppc_of_probe(struct platform_device *op)
115 hcd->rsrc_start = res.start; 115 hcd->rsrc_start = res.start;
116 hcd->rsrc_len = resource_size(&res); 116 hcd->rsrc_len = resource_size(&res);
117 117
118 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { 118 hcd->regs = devm_ioremap_resource(&op->dev, &res);
119 printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__); 119 if (IS_ERR(hcd->regs)) {
120 rv = -EBUSY; 120 rv = PTR_ERR(hcd->regs);
121 goto err_rmr; 121 goto err_rmr;
122 } 122 }
123 123
124 irq = irq_of_parse_and_map(dn, 0); 124 irq = irq_of_parse_and_map(dn, 0);
125 if (irq == NO_IRQ) { 125 if (irq == NO_IRQ) {
126 printk(KERN_ERR "%s: irq_of_parse_and_map failed\n", __FILE__); 126 dev_err(&op->dev, "%s: irq_of_parse_and_map failed\n",
127 __FILE__);
127 rv = -EBUSY; 128 rv = -EBUSY;
128 goto err_irq; 129 goto err_rmr;
129 }
130
131 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
132 if (!hcd->regs) {
133 printk(KERN_ERR "%s: ioremap failed\n", __FILE__);
134 rv = -ENOMEM;
135 goto err_ioremap;
136 } 130 }
137 131
138 ohci = hcd_to_ohci(hcd); 132 ohci = hcd_to_ohci(hcd);
@@ -147,8 +141,10 @@ static int ohci_hcd_ppc_of_probe(struct platform_device *op)
147 ohci_hcd_init(ohci); 141 ohci_hcd_init(ohci);
148 142
149 rv = usb_add_hcd(hcd, irq, 0); 143 rv = usb_add_hcd(hcd, irq, 0);
150 if (rv == 0) 144 if (rv == 0) {
145 device_wakeup_enable(hcd->self.controller);
151 return 0; 146 return 0;
147 }
152 148
153 /* by now, 440epx is known to show usb_23 erratum */ 149 /* by now, 440epx is known to show usb_23 erratum */
154 np = of_find_compatible_node(NULL, NULL, "ibm,usb-ehci-440epx"); 150 np = of_find_compatible_node(NULL, NULL, "ibm,usb-ehci-440epx");
@@ -174,11 +170,7 @@ static int ohci_hcd_ppc_of_probe(struct platform_device *op)
174 pr_debug("%s: cannot get ehci offset from fdt\n", __FILE__); 170 pr_debug("%s: cannot get ehci offset from fdt\n", __FILE__);
175 } 171 }
176 172
177 iounmap(hcd->regs);
178err_ioremap:
179 irq_dispose_mapping(irq); 173 irq_dispose_mapping(irq);
180err_irq:
181 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
182err_rmr: 174err_rmr:
183 usb_put_hcd(hcd); 175 usb_put_hcd(hcd);
184 176
@@ -193,9 +185,7 @@ static int ohci_hcd_ppc_of_remove(struct platform_device *op)
193 185
194 usb_remove_hcd(hcd); 186 usb_remove_hcd(hcd);
195 187
196 iounmap(hcd->regs);
197 irq_dispose_mapping(hcd->irq); 188 irq_dispose_mapping(hcd->irq);
198 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
199 189
200 usb_put_hcd(hcd); 190 usb_put_hcd(hcd);
201 191
diff --git a/drivers/usb/host/ohci-ps3.c b/drivers/usb/host/ohci-ps3.c
index 7d35cd9e2862..71d8bc4c27f6 100644
--- a/drivers/usb/host/ohci-ps3.c
+++ b/drivers/usb/host/ohci-ps3.c
@@ -173,6 +173,7 @@ static int ps3_ohci_probe(struct ps3_system_bus_device *dev)
173 goto fail_add_hcd; 173 goto fail_add_hcd;
174 } 174 }
175 175
176 device_wakeup_enable(hcd->self.controller);
176 return result; 177 return result;
177 178
178fail_add_hcd: 179fail_add_hcd:
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
index 9b7435f0dcd6..d21d5fefa76c 100644
--- a/drivers/usb/host/ohci-pxa27x.c
+++ b/drivers/usb/host/ohci-pxa27x.c
@@ -388,37 +388,28 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device
388 return -ENXIO; 388 return -ENXIO;
389 } 389 }
390 390
391 usb_clk = clk_get(&pdev->dev, NULL); 391 usb_clk = devm_clk_get(&pdev->dev, NULL);
392 if (IS_ERR(usb_clk)) 392 if (IS_ERR(usb_clk))
393 return PTR_ERR(usb_clk); 393 return PTR_ERR(usb_clk);
394 394
395 hcd = usb_create_hcd (driver, &pdev->dev, "pxa27x"); 395 hcd = usb_create_hcd (driver, &pdev->dev, "pxa27x");
396 if (!hcd) { 396 if (!hcd)
397 retval = -ENOMEM; 397 return -ENOMEM;
398 goto err0;
399 }
400 398
401 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); 399 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
402 if (!r) { 400 if (!r) {
403 pr_err("no resource of IORESOURCE_MEM"); 401 pr_err("no resource of IORESOURCE_MEM");
404 retval = -ENXIO; 402 retval = -ENXIO;
405 goto err1; 403 goto err;
406 } 404 }
407 405
408 hcd->rsrc_start = r->start; 406 hcd->rsrc_start = r->start;
409 hcd->rsrc_len = resource_size(r); 407 hcd->rsrc_len = resource_size(r);
410 408
411 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { 409 hcd->regs = devm_ioremap_resource(&pdev->dev, r);
412 pr_debug("request_mem_region failed"); 410 if (IS_ERR(hcd->regs)) {
413 retval = -EBUSY; 411 retval = PTR_ERR(hcd->regs);
414 goto err1; 412 goto err;
415 }
416
417 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
418 if (!hcd->regs) {
419 pr_debug("ioremap failed");
420 retval = -ENOMEM;
421 goto err2;
422 } 413 }
423 414
424 /* initialize "struct pxa27x_ohci" */ 415 /* initialize "struct pxa27x_ohci" */
@@ -429,7 +420,7 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device
429 retval = pxa27x_start_hc(pxa_ohci, &pdev->dev); 420 retval = pxa27x_start_hc(pxa_ohci, &pdev->dev);
430 if (retval < 0) { 421 if (retval < 0) {
431 pr_debug("pxa27x_start_hc failed"); 422 pr_debug("pxa27x_start_hc failed");
432 goto err3; 423 goto err;
433 } 424 }
434 425
435 /* Select Power Management Mode */ 426 /* Select Power Management Mode */
@@ -443,18 +434,14 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device
443 ohci->num_ports = 3; 434 ohci->num_ports = 3;
444 435
445 retval = usb_add_hcd(hcd, irq, 0); 436 retval = usb_add_hcd(hcd, irq, 0);
446 if (retval == 0) 437 if (retval == 0) {
438 device_wakeup_enable(hcd->self.controller);
447 return retval; 439 return retval;
440 }
448 441
449 pxa27x_stop_hc(pxa_ohci, &pdev->dev); 442 pxa27x_stop_hc(pxa_ohci, &pdev->dev);
450 err3: 443 err:
451 iounmap(hcd->regs);
452 err2:
453 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
454 err1:
455 usb_put_hcd(hcd); 444 usb_put_hcd(hcd);
456 err0:
457 clk_put(usb_clk);
458 return retval; 445 return retval;
459} 446}
460 447
@@ -478,9 +465,6 @@ void usb_hcd_pxa27x_remove (struct usb_hcd *hcd, struct platform_device *pdev)
478 465
479 usb_remove_hcd(hcd); 466 usb_remove_hcd(hcd);
480 pxa27x_stop_hc(pxa_ohci, &pdev->dev); 467 pxa27x_stop_hc(pxa_ohci, &pdev->dev);
481 iounmap(hcd->regs);
482 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
483 clk_put(pxa_ohci->clk);
484 usb_put_hcd(hcd); 468 usb_put_hcd(hcd);
485} 469}
486 470
diff --git a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c
index e7f577e63624..d4253e319428 100644
--- a/drivers/usb/host/ohci-q.c
+++ b/drivers/usb/host/ohci-q.c
@@ -68,10 +68,6 @@ __acquires(ohci->lock)
68 break; 68 break;
69 } 69 }
70 70
71#ifdef OHCI_VERBOSE_DEBUG
72 urb_print(urb, "RET", usb_pipeout (urb->pipe), status);
73#endif
74
75 /* urb->complete() can reenter this HCD */ 71 /* urb->complete() can reenter this HCD */
76 usb_hcd_unlink_urb_from_ep(ohci_to_hcd(ohci), urb); 72 usb_hcd_unlink_urb_from_ep(ohci_to_hcd(ohci), urb);
77 spin_unlock (&ohci->lock); 73 spin_unlock (&ohci->lock);
@@ -147,7 +143,7 @@ static void periodic_link (struct ohci_hcd *ohci, struct ed *ed)
147{ 143{
148 unsigned i; 144 unsigned i;
149 145
150 ohci_vdbg (ohci, "link %sed %p branch %d [%dus.], interval %d\n", 146 ohci_dbg(ohci, "link %sed %p branch %d [%dus.], interval %d\n",
151 (ed->hwINFO & cpu_to_hc32 (ohci, ED_ISO)) ? "iso " : "", 147 (ed->hwINFO & cpu_to_hc32 (ohci, ED_ISO)) ? "iso " : "",
152 ed, ed->branch, ed->load, ed->interval); 148 ed, ed->branch, ed->load, ed->interval);
153 149
@@ -294,7 +290,7 @@ static void periodic_unlink (struct ohci_hcd *ohci, struct ed *ed)
294 } 290 }
295 ohci_to_hcd(ohci)->self.bandwidth_allocated -= ed->load / ed->interval; 291 ohci_to_hcd(ohci)->self.bandwidth_allocated -= ed->load / ed->interval;
296 292
297 ohci_vdbg (ohci, "unlink %sed %p branch %d [%dus.], interval %d\n", 293 ohci_dbg(ohci, "unlink %sed %p branch %d [%dus.], interval %d\n",
298 (ed->hwINFO & cpu_to_hc32 (ohci, ED_ISO)) ? "iso " : "", 294 (ed->hwINFO & cpu_to_hc32 (ohci, ED_ISO)) ? "iso " : "",
299 ed, ed->branch, ed->load, ed->interval); 295 ed, ed->branch, ed->load, ed->interval);
300} 296}
@@ -765,7 +761,7 @@ static int td_done(struct ohci_hcd *ohci, struct urb *urb, struct td *td)
765 urb->iso_frame_desc [td->index].status = cc_to_error [cc]; 761 urb->iso_frame_desc [td->index].status = cc_to_error [cc];
766 762
767 if (cc != TD_CC_NOERROR) 763 if (cc != TD_CC_NOERROR)
768 ohci_vdbg (ohci, 764 ohci_dbg(ohci,
769 "urb %p iso td %p (%d) len %d cc %d\n", 765 "urb %p iso td %p (%d) len %d cc %d\n",
770 urb, td, 1 + td->index, dlen, cc); 766 urb, td, 1 + td->index, dlen, cc);
771 767
@@ -797,7 +793,7 @@ static int td_done(struct ohci_hcd *ohci, struct urb *urb, struct td *td)
797 } 793 }
798 794
799 if (cc != TD_CC_NOERROR && cc < 0x0E) 795 if (cc != TD_CC_NOERROR && cc < 0x0E)
800 ohci_vdbg (ohci, 796 ohci_dbg(ohci,
801 "urb %p td %p (%d) cc %d, len=%d/%d\n", 797 "urb %p td %p (%d) cc %d, len=%d/%d\n",
802 urb, td, 1 + td->index, cc, 798 urb, td, 1 + td->index, cc,
803 urb->actual_length, 799 urb->actual_length,
diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c
index f90101b9cdb9..ff7c8f1c48fb 100644
--- a/drivers/usb/host/ohci-s3c2410.c
+++ b/drivers/usb/host/ohci-s3c2410.c
@@ -395,6 +395,7 @@ static int usb_hcd_s3c2410_probe(const struct hc_driver *driver,
395 if (retval != 0) 395 if (retval != 0)
396 goto err_ioremap; 396 goto err_ioremap;
397 397
398 device_wakeup_enable(hcd->self.controller);
398 return 0; 399 return 0;
399 400
400 err_ioremap: 401 err_ioremap:
@@ -426,28 +427,15 @@ static int ohci_hcd_s3c2410_drv_remove(struct platform_device *pdev)
426static int ohci_hcd_s3c2410_drv_suspend(struct device *dev) 427static int ohci_hcd_s3c2410_drv_suspend(struct device *dev)
427{ 428{
428 struct usb_hcd *hcd = dev_get_drvdata(dev); 429 struct usb_hcd *hcd = dev_get_drvdata(dev);
429 struct ohci_hcd *ohci = hcd_to_ohci(hcd);
430 struct platform_device *pdev = to_platform_device(dev); 430 struct platform_device *pdev = to_platform_device(dev);
431 unsigned long flags; 431 bool do_wakeup = device_may_wakeup(dev);
432 int rc = 0; 432 int rc = 0;
433 433
434 /* 434 rc = ohci_suspend(hcd, do_wakeup);
435 * Root hub was already suspended. Disable irq emission and 435 if (rc)
436 * mark HW unaccessible, bail out if RH has been resumed. Use 436 return rc;
437 * the spinlock to properly synchronize with possible pending
438 * RH suspend or resume activity.
439 */
440 spin_lock_irqsave(&ohci->lock, flags);
441 if (ohci->rh_state != OHCI_RH_SUSPENDED) {
442 rc = -EINVAL;
443 goto bail;
444 }
445
446 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
447 437
448 s3c2410_stop_hc(pdev); 438 s3c2410_stop_hc(pdev);
449bail:
450 spin_unlock_irqrestore(&ohci->lock, flags);
451 439
452 return rc; 440 return rc;
453} 441}
diff --git a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c
index aa9e127bbe71..2ac266d692a2 100644
--- a/drivers/usb/host/ohci-sa1111.c
+++ b/drivers/usb/host/ohci-sa1111.c
@@ -211,8 +211,10 @@ static int ohci_hcd_sa1111_probe(struct sa1111_dev *dev)
211 goto err2; 211 goto err2;
212 212
213 ret = usb_add_hcd(hcd, dev->irq[1], 0); 213 ret = usb_add_hcd(hcd, dev->irq[1], 0);
214 if (ret == 0) 214 if (ret == 0) {
215 device_wakeup_enable(hcd->self.controller);
215 return ret; 216 return ret;
217 }
216 218
217 sa1111_stop_hc(dev); 219 sa1111_stop_hc(dev);
218 err2: 220 err2:
diff --git a/drivers/usb/host/ohci-sm501.c b/drivers/usb/host/ohci-sm501.c
index 2a5de5fecd8f..4e81c804c73e 100644
--- a/drivers/usb/host/ohci-sm501.c
+++ b/drivers/usb/host/ohci-sm501.c
@@ -168,6 +168,7 @@ static int ohci_hcd_sm501_drv_probe(struct platform_device *pdev)
168 retval = usb_add_hcd(hcd, irq, IRQF_SHARED); 168 retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
169 if (retval) 169 if (retval)
170 goto err5; 170 goto err5;
171 device_wakeup_enable(hcd->self.controller);
171 172
172 /* enable power and unmask interrupts */ 173 /* enable power and unmask interrupts */
173 174
diff --git a/drivers/usb/host/ohci-spear.c b/drivers/usb/host/ohci-spear.c
index 6b02107d281d..8b29a0c04c23 100644
--- a/drivers/usb/host/ohci-spear.c
+++ b/drivers/usb/host/ohci-spear.c
@@ -81,17 +81,10 @@ static int spear_ohci_hcd_drv_probe(struct platform_device *pdev)
81 81
82 hcd->rsrc_start = pdev->resource[0].start; 82 hcd->rsrc_start = pdev->resource[0].start;
83 hcd->rsrc_len = resource_size(res); 83 hcd->rsrc_len = resource_size(res);
84 if (!devm_request_mem_region(&pdev->dev, hcd->rsrc_start, hcd->rsrc_len,
85 hcd_name)) {
86 dev_dbg(&pdev->dev, "request_mem_region failed\n");
87 retval = -EBUSY;
88 goto err_put_hcd;
89 }
90 84
91 hcd->regs = devm_ioremap(&pdev->dev, hcd->rsrc_start, hcd->rsrc_len); 85 hcd->regs = devm_ioremap_resource(&pdev->dev, res);
92 if (!hcd->regs) { 86 if (IS_ERR(hcd->regs)) {
93 dev_dbg(&pdev->dev, "ioremap failed\n"); 87 retval = PTR_ERR(hcd->regs);
94 retval = -ENOMEM;
95 goto err_put_hcd; 88 goto err_put_hcd;
96 } 89 }
97 90
@@ -103,8 +96,10 @@ static int spear_ohci_hcd_drv_probe(struct platform_device *pdev)
103 ohci = hcd_to_ohci(hcd); 96 ohci = hcd_to_ohci(hcd);
104 97
105 retval = usb_add_hcd(hcd, platform_get_irq(pdev, 0), 0); 98 retval = usb_add_hcd(hcd, platform_get_irq(pdev, 0), 0);
106 if (retval == 0) 99 if (retval == 0) {
100 device_wakeup_enable(hcd->self.controller);
107 return retval; 101 return retval;
102 }
108 103
109 clk_disable_unprepare(sohci_p->clk); 104 clk_disable_unprepare(sohci_p->clk);
110err_put_hcd: 105err_put_hcd:
@@ -129,20 +124,26 @@ static int spear_ohci_hcd_drv_remove(struct platform_device *pdev)
129} 124}
130 125
131#if defined(CONFIG_PM) 126#if defined(CONFIG_PM)
132static int spear_ohci_hcd_drv_suspend(struct platform_device *dev, 127static int spear_ohci_hcd_drv_suspend(struct platform_device *pdev,
133 pm_message_t message) 128 pm_message_t message)
134{ 129{
135 struct usb_hcd *hcd = platform_get_drvdata(dev); 130 struct usb_hcd *hcd = platform_get_drvdata(pdev);
136 struct ohci_hcd *ohci = hcd_to_ohci(hcd); 131 struct ohci_hcd *ohci = hcd_to_ohci(hcd);
137 struct spear_ohci *sohci_p = to_spear_ohci(hcd); 132 struct spear_ohci *sohci_p = to_spear_ohci(hcd);
133 bool do_wakeup = device_may_wakeup(&pdev->dev);
134 int ret;
138 135
139 if (time_before(jiffies, ohci->next_statechange)) 136 if (time_before(jiffies, ohci->next_statechange))
140 msleep(5); 137 msleep(5);
141 ohci->next_statechange = jiffies; 138 ohci->next_statechange = jiffies;
142 139
140 ret = ohci_suspend(hcd, do_wakeup);
141 if (ret)
142 return ret;
143
143 clk_disable_unprepare(sohci_p->clk); 144 clk_disable_unprepare(sohci_p->clk);
144 145
145 return 0; 146 return ret;
146} 147}
147 148
148static int spear_ohci_hcd_drv_resume(struct platform_device *dev) 149static int spear_ohci_hcd_drv_resume(struct platform_device *dev)
diff --git a/drivers/usb/host/ohci-tilegx.c b/drivers/usb/host/ohci-tilegx.c
index 22540ab71f55..0b183e0b0a8a 100644
--- a/drivers/usb/host/ohci-tilegx.c
+++ b/drivers/usb/host/ohci-tilegx.c
@@ -159,6 +159,7 @@ static int ohci_hcd_tilegx_drv_probe(struct platform_device *pdev)
159 ret = usb_add_hcd(hcd, pdata->irq, IRQF_SHARED); 159 ret = usb_add_hcd(hcd, pdata->irq, IRQF_SHARED);
160 if (ret == 0) { 160 if (ret == 0) {
161 platform_set_drvdata(pdev, hcd); 161 platform_set_drvdata(pdev, hcd);
162 device_wakeup_enable(hcd->self.controller);
162 return ret; 163 return ret;
163 } 164 }
164 165
diff --git a/drivers/usb/host/ohci-tmio.c b/drivers/usb/host/ohci-tmio.c
index ecb09a5ada9c..bb409588d39c 100644
--- a/drivers/usb/host/ohci-tmio.c
+++ b/drivers/usb/host/ohci-tmio.c
@@ -27,7 +27,6 @@
27/*#include <linux/fs.h> 27/*#include <linux/fs.h>
28#include <linux/mount.h> 28#include <linux/mount.h>
29#include <linux/pagemap.h> 29#include <linux/pagemap.h>
30#include <linux/init.h>
31#include <linux/namei.h> 30#include <linux/namei.h>
32#include <linux/sched.h>*/ 31#include <linux/sched.h>*/
33#include <linux/platform_device.h> 32#include <linux/platform_device.h>
@@ -250,6 +249,7 @@ static int ohci_hcd_tmio_drv_probe(struct platform_device *dev)
250 if (ret) 249 if (ret)
251 goto err_add_hcd; 250 goto err_add_hcd;
252 251
252 device_wakeup_enable(hcd->self.controller);
253 if (ret == 0) 253 if (ret == 0)
254 return ret; 254 return ret;
255 255
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index e2e5faa5a402..9250cada13f0 100644
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -415,12 +415,11 @@ struct ohci_hcd {
415 struct ed *ed_to_check; 415 struct ed *ed_to_check;
416 unsigned zf_delay; 416 unsigned zf_delay;
417 417
418#ifdef DEBUG
419 struct dentry *debug_dir; 418 struct dentry *debug_dir;
420 struct dentry *debug_async; 419 struct dentry *debug_async;
421 struct dentry *debug_periodic; 420 struct dentry *debug_periodic;
422 struct dentry *debug_registers; 421 struct dentry *debug_registers;
423#endif 422
424 /* platform-specific data -- must come last */ 423 /* platform-specific data -- must come last */
425 unsigned long priv[0] __aligned(sizeof(s64)); 424 unsigned long priv[0] __aligned(sizeof(s64));
426 425
@@ -474,10 +473,6 @@ static inline struct usb_hcd *ohci_to_hcd (const struct ohci_hcd *ohci)
474 473
475/*-------------------------------------------------------------------------*/ 474/*-------------------------------------------------------------------------*/
476 475
477#ifndef DEBUG
478#define STUB_DEBUG_FILES
479#endif /* DEBUG */
480
481#define ohci_dbg(ohci, fmt, args...) \ 476#define ohci_dbg(ohci, fmt, args...) \
482 dev_dbg (ohci_to_hcd(ohci)->self.controller , fmt , ## args ) 477 dev_dbg (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
483#define ohci_err(ohci, fmt, args...) \ 478#define ohci_err(ohci, fmt, args...) \
@@ -487,12 +482,6 @@ static inline struct usb_hcd *ohci_to_hcd (const struct ohci_hcd *ohci)
487#define ohci_warn(ohci, fmt, args...) \ 482#define ohci_warn(ohci, fmt, args...) \
488 dev_warn (ohci_to_hcd(ohci)->self.controller , fmt , ## args ) 483 dev_warn (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
489 484
490#ifdef OHCI_VERBOSE_DEBUG
491# define ohci_vdbg ohci_dbg
492#else
493# define ohci_vdbg(ohci, fmt, args...) do { } while (0)
494#endif
495
496/*-------------------------------------------------------------------------*/ 485/*-------------------------------------------------------------------------*/
497 486
498/* 487/*
diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c
index 4a6df2d8f902..e07248b6ab67 100644
--- a/drivers/usb/host/oxu210hp-hcd.c
+++ b/drivers/usb/host/oxu210hp-hcd.c
@@ -29,7 +29,6 @@
29#include <linux/sched.h> 29#include <linux/sched.h>
30#include <linux/slab.h> 30#include <linux/slab.h>
31#include <linux/errno.h> 31#include <linux/errno.h>
32#include <linux/init.h>
33#include <linux/timer.h> 32#include <linux/timer.h>
34#include <linux/list.h> 33#include <linux/list.h>
35#include <linux/interrupt.h> 34#include <linux/interrupt.h>
@@ -60,6 +59,10 @@
60#define oxu_info(oxu, fmt, args...) \ 59#define oxu_info(oxu, fmt, args...) \
61 dev_info(oxu_to_hcd(oxu)->self.controller , fmt , ## args) 60 dev_info(oxu_to_hcd(oxu)->self.controller , fmt , ## args)
62 61
62#ifdef CONFIG_DYNAMIC_DEBUG
63#define DEBUG
64#endif
65
63static inline struct usb_hcd *oxu_to_hcd(struct oxu_hcd *oxu) 66static inline struct usb_hcd *oxu_to_hcd(struct oxu_hcd *oxu)
64{ 67{
65 return container_of((void *) oxu, struct usb_hcd, hcd_priv); 68 return container_of((void *) oxu, struct usb_hcd, hcd_priv);
@@ -3747,6 +3750,7 @@ static struct usb_hcd *oxu_create(struct platform_device *pdev,
3747 if (ret < 0) 3750 if (ret < 0)
3748 return ERR_PTR(ret); 3751 return ERR_PTR(ret);
3749 3752
3753 device_wakeup_enable(hcd->self.controller);
3750 return hcd; 3754 return hcd;
3751} 3755}
3752 3756
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index dfbdd3aefe98..00661d305143 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -12,7 +12,6 @@
12#include <linux/kconfig.h> 12#include <linux/kconfig.h>
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/pci.h> 14#include <linux/pci.h>
15#include <linux/init.h>
16#include <linux/delay.h> 15#include <linux/delay.h>
17#include <linux/export.h> 16#include <linux/export.h>
18#include <linux/acpi.h> 17#include <linux/acpi.h>
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index 2ad004ae747c..c6c325e4d80d 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -27,7 +27,6 @@
27#include <linux/kernel.h> 27#include <linux/kernel.h>
28#include <linux/sched.h> 28#include <linux/sched.h>
29#include <linux/errno.h> 29#include <linux/errno.h>
30#include <linux/init.h>
31#include <linux/timer.h> 30#include <linux/timer.h>
32#include <linux/delay.h> 31#include <linux/delay.h>
33#include <linux/list.h> 32#include <linux/list.h>
@@ -2514,6 +2513,7 @@ static int r8a66597_probe(struct platform_device *pdev)
2514 dev_err(&pdev->dev, "Failed to add hcd\n"); 2513 dev_err(&pdev->dev, "Failed to add hcd\n");
2515 goto clean_up3; 2514 goto clean_up3;
2516 } 2515 }
2516 device_wakeup_enable(hcd->self.controller);
2517 2517
2518 return 0; 2518 return 0;
2519 2519
@@ -2534,7 +2534,7 @@ static struct platform_driver r8a66597_driver = {
2534 .probe = r8a66597_probe, 2534 .probe = r8a66597_probe,
2535 .remove = r8a66597_remove, 2535 .remove = r8a66597_remove,
2536 .driver = { 2536 .driver = {
2537 .name = (char *) hcd_name, 2537 .name = hcd_name,
2538 .owner = THIS_MODULE, 2538 .owner = THIS_MODULE,
2539 .pm = R8A66597_DEV_PM_OPS, 2539 .pm = R8A66597_DEV_PM_OPS,
2540 }, 2540 },
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index 79620c39217e..a517151867af 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -39,7 +39,6 @@
39#include <linux/sched.h> 39#include <linux/sched.h>
40#include <linux/slab.h> 40#include <linux/slab.h>
41#include <linux/errno.h> 41#include <linux/errno.h>
42#include <linux/init.h>
43#include <linux/timer.h> 42#include <linux/timer.h>
44#include <linux/list.h> 43#include <linux/list.h>
45#include <linux/interrupt.h> 44#include <linux/interrupt.h>
@@ -1732,6 +1731,8 @@ sl811h_probe(struct platform_device *dev)
1732 if (retval != 0) 1731 if (retval != 0)
1733 goto err6; 1732 goto err6;
1734 1733
1734 device_wakeup_enable(hcd->self.controller);
1735
1735 create_debug_file(sl811); 1736 create_debug_file(sl811);
1736 return retval; 1737 return retval;
1737 1738
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c
index 469564e57a52..88a9bffe93df 100644
--- a/drivers/usb/host/sl811_cs.c
+++ b/drivers/usb/host/sl811_cs.c
@@ -12,7 +12,6 @@
12 12
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/init.h>
16#include <linux/ptrace.h> 15#include <linux/ptrace.h>
17#include <linux/slab.h> 16#include <linux/slab.h>
18#include <linux/string.h> 17#include <linux/string.h>
diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c
index e402beb5a069..c0671750671f 100644
--- a/drivers/usb/host/u132-hcd.c
+++ b/drivers/usb/host/u132-hcd.c
@@ -3133,6 +3133,7 @@ static int u132_probe(struct platform_device *pdev)
3133 u132_u132_put_kref(u132); 3133 u132_u132_put_kref(u132);
3134 return retval; 3134 return retval;
3135 } else { 3135 } else {
3136 device_wakeup_enable(hcd->self.controller);
3136 u132_monitor_queue_work(u132, 100); 3137 u132_monitor_queue_work(u132, 100);
3137 return 0; 3138 return 0;
3138 } 3139 }
@@ -3217,7 +3218,7 @@ static struct platform_driver u132_platform_driver = {
3217 .suspend = u132_suspend, 3218 .suspend = u132_suspend,
3218 .resume = u132_resume, 3219 .resume = u132_resume,
3219 .driver = { 3220 .driver = {
3220 .name = (char *)hcd_name, 3221 .name = hcd_name,
3221 .owner = THIS_MODULE, 3222 .owner = THIS_MODULE,
3222 }, 3223 },
3223}; 3224};
diff --git a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci-debug.c
index 8e239cdd95d5..1b28a000d5c6 100644
--- a/drivers/usb/host/uhci-debug.c
+++ b/drivers/usb/host/uhci-debug.c
@@ -20,7 +20,7 @@
20 20
21static struct dentry *uhci_debugfs_root; 21static struct dentry *uhci_debugfs_root;
22 22
23#ifdef DEBUG 23#ifdef CONFIG_DYNAMIC_DEBUG
24 24
25/* Handle REALLY large printks so we don't overflow buffers */ 25/* Handle REALLY large printks so we don't overflow buffers */
26static void lprintk(char *buf) 26static void lprintk(char *buf)
@@ -635,7 +635,7 @@ static const struct file_operations uhci_debug_operations = {
635 635
636#endif /* CONFIG_DEBUG_FS */ 636#endif /* CONFIG_DEBUG_FS */
637 637
638#else /* DEBUG */ 638#else /* CONFIG_DYNAMIC_DEBUG*/
639 639
640static inline void lprintk(char *buf) 640static inline void lprintk(char *buf)
641{} 641{}
diff --git a/drivers/usb/host/uhci-grlib.c b/drivers/usb/host/uhci-grlib.c
index 53c23ff7d685..ab25dc397e8b 100644
--- a/drivers/usb/host/uhci-grlib.c
+++ b/drivers/usb/host/uhci-grlib.c
@@ -141,6 +141,7 @@ static int uhci_hcd_grlib_probe(struct platform_device *op)
141 if (rv) 141 if (rv)
142 goto err_uhci; 142 goto err_uhci;
143 143
144 device_wakeup_enable(hcd->self.controller);
144 return 0; 145 return 0;
145 146
146err_uhci: 147err_uhci:
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index 4a86b63745b8..27f35e8f161b 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -69,18 +69,21 @@ MODULE_PARM_DESC(ignore_oc, "ignore hardware overcurrent indications");
69 * show all queues in /sys/kernel/debug/uhci/[pci_addr] 69 * show all queues in /sys/kernel/debug/uhci/[pci_addr]
70 * debug = 3, show all TDs in URBs when dumping 70 * debug = 3, show all TDs in URBs when dumping
71 */ 71 */
72#ifdef DEBUG 72#ifdef CONFIG_DYNAMIC_DEBUG
73#define DEBUG_CONFIGURED 1 73
74static int debug = 1; 74static int debug = 1;
75module_param(debug, int, S_IRUGO | S_IWUSR); 75module_param(debug, int, S_IRUGO | S_IWUSR);
76MODULE_PARM_DESC(debug, "Debug level"); 76MODULE_PARM_DESC(debug, "Debug level");
77static char *errbuf;
77 78
78#else 79#else
79#define DEBUG_CONFIGURED 0 80
80#define debug 0 81#define debug 0
82#define errbuf NULL
83
81#endif 84#endif
82 85
83static char *errbuf; 86
84#define ERRBUF_LEN (32 * 1024) 87#define ERRBUF_LEN (32 * 1024)
85 88
86static struct kmem_cache *uhci_up_cachep; /* urb_priv */ 89static struct kmem_cache *uhci_up_cachep; /* urb_priv */
@@ -516,13 +519,12 @@ static void release_uhci(struct uhci_hcd *uhci)
516{ 519{
517 int i; 520 int i;
518 521
519 if (DEBUG_CONFIGURED) {
520 spin_lock_irq(&uhci->lock);
521 uhci->is_initialized = 0;
522 spin_unlock_irq(&uhci->lock);
523 522
524 debugfs_remove(uhci->dentry); 523 spin_lock_irq(&uhci->lock);
525 } 524 uhci->is_initialized = 0;
525 spin_unlock_irq(&uhci->lock);
526
527 debugfs_remove(uhci->dentry);
526 528
527 for (i = 0; i < UHCI_NUM_SKELQH; i++) 529 for (i = 0; i < UHCI_NUM_SKELQH; i++)
528 uhci_free_qh(uhci, uhci->skelqh[i]); 530 uhci_free_qh(uhci, uhci->skelqh[i]);
@@ -868,14 +870,14 @@ static int __init uhci_hcd_init(void)
868 ignore_oc ? ", overcurrent ignored" : ""); 870 ignore_oc ? ", overcurrent ignored" : "");
869 set_bit(USB_UHCI_LOADED, &usb_hcds_loaded); 871 set_bit(USB_UHCI_LOADED, &usb_hcds_loaded);
870 872
871 if (DEBUG_CONFIGURED) { 873#ifdef CONFIG_DYNAMIC_DEBUG
872 errbuf = kmalloc(ERRBUF_LEN, GFP_KERNEL); 874 errbuf = kmalloc(ERRBUF_LEN, GFP_KERNEL);
873 if (!errbuf) 875 if (!errbuf)
874 goto errbuf_failed; 876 goto errbuf_failed;
875 uhci_debugfs_root = debugfs_create_dir("uhci", usb_debug_root); 877 uhci_debugfs_root = debugfs_create_dir("uhci", usb_debug_root);
876 if (!uhci_debugfs_root) 878 if (!uhci_debugfs_root)
877 goto debug_failed; 879 goto debug_failed;
878 } 880#endif
879 881
880 uhci_up_cachep = kmem_cache_create("uhci_urb_priv", 882 uhci_up_cachep = kmem_cache_create("uhci_urb_priv",
881 sizeof(struct urb_priv), 0, 0, NULL); 883 sizeof(struct urb_priv), 0, 0, NULL);
@@ -906,12 +908,14 @@ clean0:
906 kmem_cache_destroy(uhci_up_cachep); 908 kmem_cache_destroy(uhci_up_cachep);
907 909
908up_failed: 910up_failed:
911#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)
909 debugfs_remove(uhci_debugfs_root); 912 debugfs_remove(uhci_debugfs_root);
910 913
911debug_failed: 914debug_failed:
912 kfree(errbuf); 915 kfree(errbuf);
913 916
914errbuf_failed: 917errbuf_failed:
918#endif
915 919
916 clear_bit(USB_UHCI_LOADED, &usb_hcds_loaded); 920 clear_bit(USB_UHCI_LOADED, &usb_hcds_loaded);
917 return retval; 921 return retval;
@@ -927,7 +931,9 @@ static void __exit uhci_hcd_cleanup(void)
927#endif 931#endif
928 kmem_cache_destroy(uhci_up_cachep); 932 kmem_cache_destroy(uhci_up_cachep);
929 debugfs_remove(uhci_debugfs_root); 933 debugfs_remove(uhci_debugfs_root);
934#ifdef CONFIG_DYNAMIC_DEBUG
930 kfree(errbuf); 935 kfree(errbuf);
936#endif
931 clear_bit(USB_UHCI_LOADED, &usb_hcds_loaded); 937 clear_bit(USB_UHCI_LOADED, &usb_hcds_loaded);
932} 938}
933 939
diff --git a/drivers/usb/host/uhci-pci.c b/drivers/usb/host/uhci-pci.c
index 4cd79888804b..940304c33224 100644
--- a/drivers/usb/host/uhci-pci.c
+++ b/drivers/usb/host/uhci-pci.c
@@ -279,7 +279,7 @@ static const struct hc_driver uhci_driver = {
279 .hub_control = uhci_hub_control, 279 .hub_control = uhci_hub_control,
280}; 280};
281 281
282static DEFINE_PCI_DEVICE_TABLE(uhci_pci_ids) = { { 282static const struct pci_device_id uhci_pci_ids[] = { {
283 /* handle any USB UHCI controller */ 283 /* handle any USB UHCI controller */
284 PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_UHCI, ~0), 284 PCI_DEVICE_CLASS(PCI_CLASS_SERIAL_USB_UHCI, ~0),
285 .driver_data = (unsigned long) &uhci_driver, 285 .driver_data = (unsigned long) &uhci_driver,
diff --git a/drivers/usb/host/uhci-platform.c b/drivers/usb/host/uhci-platform.c
index 3003fefaa964..44e6c9da8892 100644
--- a/drivers/usb/host/uhci-platform.c
+++ b/drivers/usb/host/uhci-platform.c
@@ -108,6 +108,7 @@ static int uhci_hcd_platform_probe(struct platform_device *pdev)
108 if (ret) 108 if (ret)
109 goto err_uhci; 109 goto err_uhci;
110 110
111 device_wakeup_enable(hcd->self.controller);
111 return 0; 112 return 0;
112 113
113err_uhci: 114err_uhci:
diff --git a/drivers/usb/host/whci/hcd.c b/drivers/usb/host/whci/hcd.c
index 1b0888f8da9a..d7b363a418de 100644
--- a/drivers/usb/host/whci/hcd.c
+++ b/drivers/usb/host/whci/hcd.c
@@ -293,6 +293,7 @@ static int whc_probe(struct umc_dev *umc)
293 dev_err(dev, "cannot add HCD: %d\n", ret); 293 dev_err(dev, "cannot add HCD: %d\n", ret);
294 goto error_usb_add_hcd; 294 goto error_usb_add_hcd;
295 } 295 }
296 device_wakeup_enable(usb_hcd->self.controller);
296 297
297 ret = wusbhc_b_create(wusbhc); 298 ret = wusbhc_b_create(wusbhc);
298 if (ret) { 299 if (ret) {
diff --git a/drivers/usb/host/whci/int.c b/drivers/usb/host/whci/int.c
index 6aae70028101..0c086b2790d1 100644
--- a/drivers/usb/host/whci/int.c
+++ b/drivers/usb/host/whci/int.c
@@ -16,7 +16,6 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */ 17 */
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/uwb/umc.h> 19#include <linux/uwb/umc.h>
21 20
22#include "../../wusbcore/wusbhc.h" 21#include "../../wusbcore/wusbhc.h"
diff --git a/drivers/usb/host/whci/wusb.c b/drivers/usb/host/whci/wusb.c
index f24efdebad17..8d2762682869 100644
--- a/drivers/usb/host/whci/wusb.c
+++ b/drivers/usb/host/whci/wusb.c
@@ -16,7 +16,6 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */ 17 */
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/uwb/umc.h> 19#include <linux/uwb/umc.h>
21 20
22#include "../../wusbcore/wusbhc.h" 21#include "../../wusbcore/wusbhc.h"
diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 73503a81ee81..b016d38199f2 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -32,7 +32,7 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
32 32
33 xhci_dbg(xhci, "// xHCI capability registers at %p:\n", 33 xhci_dbg(xhci, "// xHCI capability registers at %p:\n",
34 xhci->cap_regs); 34 xhci->cap_regs);
35 temp = xhci_readl(xhci, &xhci->cap_regs->hc_capbase); 35 temp = readl(&xhci->cap_regs->hc_capbase);
36 xhci_dbg(xhci, "// @%p = 0x%x (CAPLENGTH AND HCIVERSION)\n", 36 xhci_dbg(xhci, "// @%p = 0x%x (CAPLENGTH AND HCIVERSION)\n",
37 &xhci->cap_regs->hc_capbase, temp); 37 &xhci->cap_regs->hc_capbase, temp);
38 xhci_dbg(xhci, "// CAPLENGTH: 0x%x\n", 38 xhci_dbg(xhci, "// CAPLENGTH: 0x%x\n",
@@ -44,13 +44,13 @@ void xhci_dbg_regs(struct xhci_hcd *xhci)
44 44
45 xhci_dbg(xhci, "// xHCI operational registers at %p:\n", xhci->op_regs); 45 xhci_dbg(xhci, "// xHCI operational registers at %p:\n", xhci->op_regs);
46 46
47 temp = xhci_readl(xhci, &xhci->cap_regs->run_regs_off); 47 temp = readl(&xhci->cap_regs->run_regs_off);
48 xhci_dbg(xhci, "// @%p = 0x%x RTSOFF\n", 48 xhci_dbg(xhci, "// @%p = 0x%x RTSOFF\n",
49 &xhci->cap_regs->run_regs_off, 49 &xhci->cap_regs->run_regs_off,
50 (unsigned int) temp & RTSOFF_MASK); 50 (unsigned int) temp & RTSOFF_MASK);
51 xhci_dbg(xhci, "// xHCI runtime registers at %p:\n", xhci->run_regs); 51 xhci_dbg(xhci, "// xHCI runtime registers at %p:\n", xhci->run_regs);
52 52
53 temp = xhci_readl(xhci, &xhci->cap_regs->db_off); 53 temp = readl(&xhci->cap_regs->db_off);
54 xhci_dbg(xhci, "// @%p = 0x%x DBOFF\n", &xhci->cap_regs->db_off, temp); 54 xhci_dbg(xhci, "// @%p = 0x%x DBOFF\n", &xhci->cap_regs->db_off, temp);
55 xhci_dbg(xhci, "// Doorbell array at %p:\n", xhci->dba); 55 xhci_dbg(xhci, "// Doorbell array at %p:\n", xhci->dba);
56} 56}
@@ -61,7 +61,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
61 61
62 xhci_dbg(xhci, "xHCI capability registers at %p:\n", xhci->cap_regs); 62 xhci_dbg(xhci, "xHCI capability registers at %p:\n", xhci->cap_regs);
63 63
64 temp = xhci_readl(xhci, &xhci->cap_regs->hc_capbase); 64 temp = readl(&xhci->cap_regs->hc_capbase);
65 xhci_dbg(xhci, "CAPLENGTH AND HCIVERSION 0x%x:\n", 65 xhci_dbg(xhci, "CAPLENGTH AND HCIVERSION 0x%x:\n",
66 (unsigned int) temp); 66 (unsigned int) temp);
67 xhci_dbg(xhci, "CAPLENGTH: 0x%x\n", 67 xhci_dbg(xhci, "CAPLENGTH: 0x%x\n",
@@ -69,7 +69,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
69 xhci_dbg(xhci, "HCIVERSION: 0x%x\n", 69 xhci_dbg(xhci, "HCIVERSION: 0x%x\n",
70 (unsigned int) HC_VERSION(temp)); 70 (unsigned int) HC_VERSION(temp));
71 71
72 temp = xhci_readl(xhci, &xhci->cap_regs->hcs_params1); 72 temp = readl(&xhci->cap_regs->hcs_params1);
73 xhci_dbg(xhci, "HCSPARAMS 1: 0x%x\n", 73 xhci_dbg(xhci, "HCSPARAMS 1: 0x%x\n",
74 (unsigned int) temp); 74 (unsigned int) temp);
75 xhci_dbg(xhci, " Max device slots: %u\n", 75 xhci_dbg(xhci, " Max device slots: %u\n",
@@ -79,7 +79,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
79 xhci_dbg(xhci, " Max ports: %u\n", 79 xhci_dbg(xhci, " Max ports: %u\n",
80 (unsigned int) HCS_MAX_PORTS(temp)); 80 (unsigned int) HCS_MAX_PORTS(temp));
81 81
82 temp = xhci_readl(xhci, &xhci->cap_regs->hcs_params2); 82 temp = readl(&xhci->cap_regs->hcs_params2);
83 xhci_dbg(xhci, "HCSPARAMS 2: 0x%x\n", 83 xhci_dbg(xhci, "HCSPARAMS 2: 0x%x\n",
84 (unsigned int) temp); 84 (unsigned int) temp);
85 xhci_dbg(xhci, " Isoc scheduling threshold: %u\n", 85 xhci_dbg(xhci, " Isoc scheduling threshold: %u\n",
@@ -87,7 +87,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
87 xhci_dbg(xhci, " Maximum allowed segments in event ring: %u\n", 87 xhci_dbg(xhci, " Maximum allowed segments in event ring: %u\n",
88 (unsigned int) HCS_ERST_MAX(temp)); 88 (unsigned int) HCS_ERST_MAX(temp));
89 89
90 temp = xhci_readl(xhci, &xhci->cap_regs->hcs_params3); 90 temp = readl(&xhci->cap_regs->hcs_params3);
91 xhci_dbg(xhci, "HCSPARAMS 3 0x%x:\n", 91 xhci_dbg(xhci, "HCSPARAMS 3 0x%x:\n",
92 (unsigned int) temp); 92 (unsigned int) temp);
93 xhci_dbg(xhci, " Worst case U1 device exit latency: %u\n", 93 xhci_dbg(xhci, " Worst case U1 device exit latency: %u\n",
@@ -95,14 +95,14 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
95 xhci_dbg(xhci, " Worst case U2 device exit latency: %u\n", 95 xhci_dbg(xhci, " Worst case U2 device exit latency: %u\n",
96 (unsigned int) HCS_U2_LATENCY(temp)); 96 (unsigned int) HCS_U2_LATENCY(temp));
97 97
98 temp = xhci_readl(xhci, &xhci->cap_regs->hcc_params); 98 temp = readl(&xhci->cap_regs->hcc_params);
99 xhci_dbg(xhci, "HCC PARAMS 0x%x:\n", (unsigned int) temp); 99 xhci_dbg(xhci, "HCC PARAMS 0x%x:\n", (unsigned int) temp);
100 xhci_dbg(xhci, " HC generates %s bit addresses\n", 100 xhci_dbg(xhci, " HC generates %s bit addresses\n",
101 HCC_64BIT_ADDR(temp) ? "64" : "32"); 101 HCC_64BIT_ADDR(temp) ? "64" : "32");
102 /* FIXME */ 102 /* FIXME */
103 xhci_dbg(xhci, " FIXME: more HCCPARAMS debugging\n"); 103 xhci_dbg(xhci, " FIXME: more HCCPARAMS debugging\n");
104 104
105 temp = xhci_readl(xhci, &xhci->cap_regs->run_regs_off); 105 temp = readl(&xhci->cap_regs->run_regs_off);
106 xhci_dbg(xhci, "RTSOFF 0x%x:\n", temp & RTSOFF_MASK); 106 xhci_dbg(xhci, "RTSOFF 0x%x:\n", temp & RTSOFF_MASK);
107} 107}
108 108
@@ -110,7 +110,7 @@ static void xhci_print_command_reg(struct xhci_hcd *xhci)
110{ 110{
111 u32 temp; 111 u32 temp;
112 112
113 temp = xhci_readl(xhci, &xhci->op_regs->command); 113 temp = readl(&xhci->op_regs->command);
114 xhci_dbg(xhci, "USBCMD 0x%x:\n", temp); 114 xhci_dbg(xhci, "USBCMD 0x%x:\n", temp);
115 xhci_dbg(xhci, " HC is %s\n", 115 xhci_dbg(xhci, " HC is %s\n",
116 (temp & CMD_RUN) ? "running" : "being stopped"); 116 (temp & CMD_RUN) ? "running" : "being stopped");
@@ -128,7 +128,7 @@ static void xhci_print_status(struct xhci_hcd *xhci)
128{ 128{
129 u32 temp; 129 u32 temp;
130 130
131 temp = xhci_readl(xhci, &xhci->op_regs->status); 131 temp = readl(&xhci->op_regs->status);
132 xhci_dbg(xhci, "USBSTS 0x%x:\n", temp); 132 xhci_dbg(xhci, "USBSTS 0x%x:\n", temp);
133 xhci_dbg(xhci, " Event ring is %sempty\n", 133 xhci_dbg(xhci, " Event ring is %sempty\n",
134 (temp & STS_EINT) ? "not " : ""); 134 (temp & STS_EINT) ? "not " : "");
@@ -163,7 +163,7 @@ static void xhci_print_ports(struct xhci_hcd *xhci)
163 for (j = 0; j < NUM_PORT_REGS; ++j) { 163 for (j = 0; j < NUM_PORT_REGS; ++j) {
164 xhci_dbg(xhci, "%p port %s reg = 0x%x\n", 164 xhci_dbg(xhci, "%p port %s reg = 0x%x\n",
165 addr, names[j], 165 addr, names[j],
166 (unsigned int) xhci_readl(xhci, addr)); 166 (unsigned int) readl(addr));
167 addr++; 167 addr++;
168 } 168 }
169 } 169 }
@@ -177,7 +177,7 @@ void xhci_print_ir_set(struct xhci_hcd *xhci, int set_num)
177 u64 temp_64; 177 u64 temp_64;
178 178
179 addr = &ir_set->irq_pending; 179 addr = &ir_set->irq_pending;
180 temp = xhci_readl(xhci, addr); 180 temp = readl(addr);
181 if (temp == XHCI_INIT_VALUE) 181 if (temp == XHCI_INIT_VALUE)
182 return; 182 return;
183 183
@@ -187,28 +187,28 @@ void xhci_print_ir_set(struct xhci_hcd *xhci, int set_num)
187 (unsigned int)temp); 187 (unsigned int)temp);
188 188
189 addr = &ir_set->irq_control; 189 addr = &ir_set->irq_control;
190 temp = xhci_readl(xhci, addr); 190 temp = readl(addr);
191 xhci_dbg(xhci, " %p: ir_set.control = 0x%x\n", addr, 191 xhci_dbg(xhci, " %p: ir_set.control = 0x%x\n", addr,
192 (unsigned int)temp); 192 (unsigned int)temp);
193 193
194 addr = &ir_set->erst_size; 194 addr = &ir_set->erst_size;
195 temp = xhci_readl(xhci, addr); 195 temp = readl(addr);
196 xhci_dbg(xhci, " %p: ir_set.erst_size = 0x%x\n", addr, 196 xhci_dbg(xhci, " %p: ir_set.erst_size = 0x%x\n", addr,
197 (unsigned int)temp); 197 (unsigned int)temp);
198 198
199 addr = &ir_set->rsvd; 199 addr = &ir_set->rsvd;
200 temp = xhci_readl(xhci, addr); 200 temp = readl(addr);
201 if (temp != XHCI_INIT_VALUE) 201 if (temp != XHCI_INIT_VALUE)
202 xhci_dbg(xhci, " WARN: %p: ir_set.rsvd = 0x%x\n", 202 xhci_dbg(xhci, " WARN: %p: ir_set.rsvd = 0x%x\n",
203 addr, (unsigned int)temp); 203 addr, (unsigned int)temp);
204 204
205 addr = &ir_set->erst_base; 205 addr = &ir_set->erst_base;
206 temp_64 = xhci_read_64(xhci, addr); 206 temp_64 = readq(addr);
207 xhci_dbg(xhci, " %p: ir_set.erst_base = @%08llx\n", 207 xhci_dbg(xhci, " %p: ir_set.erst_base = @%08llx\n",
208 addr, temp_64); 208 addr, temp_64);
209 209
210 addr = &ir_set->erst_dequeue; 210 addr = &ir_set->erst_dequeue;
211 temp_64 = xhci_read_64(xhci, addr); 211 temp_64 = readq(addr);
212 xhci_dbg(xhci, " %p: ir_set.erst_dequeue = @%08llx\n", 212 xhci_dbg(xhci, " %p: ir_set.erst_dequeue = @%08llx\n",
213 addr, temp_64); 213 addr, temp_64);
214} 214}
@@ -219,12 +219,12 @@ void xhci_print_run_regs(struct xhci_hcd *xhci)
219 int i; 219 int i;
220 220
221 xhci_dbg(xhci, "xHCI runtime registers at %p:\n", xhci->run_regs); 221 xhci_dbg(xhci, "xHCI runtime registers at %p:\n", xhci->run_regs);
222 temp = xhci_readl(xhci, &xhci->run_regs->microframe_index); 222 temp = readl(&xhci->run_regs->microframe_index);
223 xhci_dbg(xhci, " %p: Microframe index = 0x%x\n", 223 xhci_dbg(xhci, " %p: Microframe index = 0x%x\n",
224 &xhci->run_regs->microframe_index, 224 &xhci->run_regs->microframe_index,
225 (unsigned int) temp); 225 (unsigned int) temp);
226 for (i = 0; i < 7; ++i) { 226 for (i = 0; i < 7; ++i) {
227 temp = xhci_readl(xhci, &xhci->run_regs->rsvd[i]); 227 temp = readl(&xhci->run_regs->rsvd[i]);
228 if (temp != XHCI_INIT_VALUE) 228 if (temp != XHCI_INIT_VALUE)
229 xhci_dbg(xhci, " WARN: %p: Rsvd[%i] = 0x%x\n", 229 xhci_dbg(xhci, " WARN: %p: Rsvd[%i] = 0x%x\n",
230 &xhci->run_regs->rsvd[i], 230 &xhci->run_regs->rsvd[i],
@@ -412,7 +412,7 @@ void xhci_dbg_cmd_ptrs(struct xhci_hcd *xhci)
412{ 412{
413 u64 val; 413 u64 val;
414 414
415 val = xhci_read_64(xhci, &xhci->op_regs->cmd_ring); 415 val = readq(&xhci->op_regs->cmd_ring);
416 xhci_dbg(xhci, "// xHC command ring deq ptr low bits + flags = @%08x\n", 416 xhci_dbg(xhci, "// xHC command ring deq ptr low bits + flags = @%08x\n",
417 lower_32_bits(val)); 417 lower_32_bits(val));
418 xhci_dbg(xhci, "// xHC command ring deq ptr high bits = @%08x\n", 418 xhci_dbg(xhci, "// xHC command ring deq ptr high bits = @%08x\n",
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index 805f2348eeba..9992fbfec85f 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -94,7 +94,7 @@ static void xhci_usb2_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci,
94 */ 94 */
95 memset(port_removable, 0, sizeof(port_removable)); 95 memset(port_removable, 0, sizeof(port_removable));
96 for (i = 0; i < ports; i++) { 96 for (i = 0; i < ports; i++) {
97 portsc = xhci_readl(xhci, xhci->usb2_ports[i]); 97 portsc = readl(xhci->usb2_ports[i]);
98 /* If a device is removable, PORTSC reports a 0, same as in the 98 /* If a device is removable, PORTSC reports a 0, same as in the
99 * hub descriptor DeviceRemovable bits. 99 * hub descriptor DeviceRemovable bits.
100 */ 100 */
@@ -148,7 +148,7 @@ static void xhci_usb3_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci,
148 port_removable = 0; 148 port_removable = 0;
149 /* bit 0 is reserved, bit 1 is for port 1, etc. */ 149 /* bit 0 is reserved, bit 1 is for port 1, etc. */
150 for (i = 0; i < ports; i++) { 150 for (i = 0; i < ports; i++) {
151 portsc = xhci_readl(xhci, xhci->usb3_ports[i]); 151 portsc = readl(xhci->usb3_ports[i]);
152 if (portsc & PORT_DEV_REMOVE) 152 if (portsc & PORT_DEV_REMOVE)
153 port_removable |= 1 << (i + 1); 153 port_removable |= 1 << (i + 1);
154 } 154 }
@@ -342,8 +342,8 @@ static void xhci_disable_port(struct usb_hcd *hcd, struct xhci_hcd *xhci,
342 } 342 }
343 343
344 /* Write 1 to disable the port */ 344 /* Write 1 to disable the port */
345 xhci_writel(xhci, port_status | PORT_PE, addr); 345 writel(port_status | PORT_PE, addr);
346 port_status = xhci_readl(xhci, addr); 346 port_status = readl(addr);
347 xhci_dbg(xhci, "disable port, actual port %d status = 0x%x\n", 347 xhci_dbg(xhci, "disable port, actual port %d status = 0x%x\n",
348 wIndex, port_status); 348 wIndex, port_status);
349} 349}
@@ -388,8 +388,8 @@ static void xhci_clear_port_change_bit(struct xhci_hcd *xhci, u16 wValue,
388 return; 388 return;
389 } 389 }
390 /* Change bits are all write 1 to clear */ 390 /* Change bits are all write 1 to clear */
391 xhci_writel(xhci, port_status | status, addr); 391 writel(port_status | status, addr);
392 port_status = xhci_readl(xhci, addr); 392 port_status = readl(addr);
393 xhci_dbg(xhci, "clear port %s change, actual port %d status = 0x%x\n", 393 xhci_dbg(xhci, "clear port %s change, actual port %d status = 0x%x\n",
394 port_change_bit, wIndex, port_status); 394 port_change_bit, wIndex, port_status);
395} 395}
@@ -415,11 +415,11 @@ void xhci_set_link_state(struct xhci_hcd *xhci, __le32 __iomem **port_array,
415{ 415{
416 u32 temp; 416 u32 temp;
417 417
418 temp = xhci_readl(xhci, port_array[port_id]); 418 temp = readl(port_array[port_id]);
419 temp = xhci_port_state_to_neutral(temp); 419 temp = xhci_port_state_to_neutral(temp);
420 temp &= ~PORT_PLS_MASK; 420 temp &= ~PORT_PLS_MASK;
421 temp |= PORT_LINK_STROBE | link_state; 421 temp |= PORT_LINK_STROBE | link_state;
422 xhci_writel(xhci, temp, port_array[port_id]); 422 writel(temp, port_array[port_id]);
423} 423}
424 424
425static void xhci_set_remote_wake_mask(struct xhci_hcd *xhci, 425static void xhci_set_remote_wake_mask(struct xhci_hcd *xhci,
@@ -427,7 +427,7 @@ static void xhci_set_remote_wake_mask(struct xhci_hcd *xhci,
427{ 427{
428 u32 temp; 428 u32 temp;
429 429
430 temp = xhci_readl(xhci, port_array[port_id]); 430 temp = readl(port_array[port_id]);
431 temp = xhci_port_state_to_neutral(temp); 431 temp = xhci_port_state_to_neutral(temp);
432 432
433 if (wake_mask & USB_PORT_FEAT_REMOTE_WAKE_CONNECT) 433 if (wake_mask & USB_PORT_FEAT_REMOTE_WAKE_CONNECT)
@@ -445,7 +445,7 @@ static void xhci_set_remote_wake_mask(struct xhci_hcd *xhci,
445 else 445 else
446 temp &= ~PORT_WKOC_E; 446 temp &= ~PORT_WKOC_E;
447 447
448 xhci_writel(xhci, temp, port_array[port_id]); 448 writel(temp, port_array[port_id]);
449} 449}
450 450
451/* Test and clear port RWC bit */ 451/* Test and clear port RWC bit */
@@ -454,11 +454,11 @@ void xhci_test_and_clear_bit(struct xhci_hcd *xhci, __le32 __iomem **port_array,
454{ 454{
455 u32 temp; 455 u32 temp;
456 456
457 temp = xhci_readl(xhci, port_array[port_id]); 457 temp = readl(port_array[port_id]);
458 if (temp & port_bit) { 458 if (temp & port_bit) {
459 temp = xhci_port_state_to_neutral(temp); 459 temp = xhci_port_state_to_neutral(temp);
460 temp |= port_bit; 460 temp |= port_bit;
461 xhci_writel(xhci, temp, port_array[port_id]); 461 writel(temp, port_array[port_id]);
462 } 462 }
463} 463}
464 464
@@ -623,8 +623,7 @@ static u32 xhci_get_port_status(struct usb_hcd *hcd,
623 } 623 }
624 xhci_ring_device(xhci, slot_id); 624 xhci_ring_device(xhci, slot_id);
625 } else { 625 } else {
626 int port_status = xhci_readl(xhci, 626 int port_status = readl(port_array[wIndex]);
627 port_array[wIndex]);
628 xhci_warn(xhci, "Port resume took longer than %i msec, port status = 0x%x\n", 627 xhci_warn(xhci, "Port resume took longer than %i msec, port status = 0x%x\n",
629 XHCI_MAX_REXIT_TIMEOUT, 628 XHCI_MAX_REXIT_TIMEOUT,
630 port_status); 629 port_status);
@@ -733,12 +732,12 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
733 /* Set the U1 and U2 exit latencies. */ 732 /* Set the U1 and U2 exit latencies. */
734 memcpy(buf, &usb_bos_descriptor, 733 memcpy(buf, &usb_bos_descriptor,
735 USB_DT_BOS_SIZE + USB_DT_USB_SS_CAP_SIZE); 734 USB_DT_BOS_SIZE + USB_DT_USB_SS_CAP_SIZE);
736 temp = xhci_readl(xhci, &xhci->cap_regs->hcs_params3); 735 temp = readl(&xhci->cap_regs->hcs_params3);
737 buf[12] = HCS_U1_LATENCY(temp); 736 buf[12] = HCS_U1_LATENCY(temp);
738 put_unaligned_le16(HCS_U2_LATENCY(temp), &buf[13]); 737 put_unaligned_le16(HCS_U2_LATENCY(temp), &buf[13]);
739 738
740 /* Indicate whether the host has LTM support. */ 739 /* Indicate whether the host has LTM support. */
741 temp = xhci_readl(xhci, &xhci->cap_regs->hcc_params); 740 temp = readl(&xhci->cap_regs->hcc_params);
742 if (HCC_LTC(temp)) 741 if (HCC_LTC(temp))
743 buf[8] |= USB_LTM_SUPPORT; 742 buf[8] |= USB_LTM_SUPPORT;
744 743
@@ -748,7 +747,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
748 if (!wIndex || wIndex > max_ports) 747 if (!wIndex || wIndex > max_ports)
749 goto error; 748 goto error;
750 wIndex--; 749 wIndex--;
751 temp = xhci_readl(xhci, port_array[wIndex]); 750 temp = readl(port_array[wIndex]);
752 if (temp == 0xffffffff) { 751 if (temp == 0xffffffff) {
753 retval = -ENODEV; 752 retval = -ENODEV;
754 break; 753 break;
@@ -775,7 +774,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
775 if (!wIndex || wIndex > max_ports) 774 if (!wIndex || wIndex > max_ports)
776 goto error; 775 goto error;
777 wIndex--; 776 wIndex--;
778 temp = xhci_readl(xhci, port_array[wIndex]); 777 temp = readl(port_array[wIndex]);
779 if (temp == 0xffffffff) { 778 if (temp == 0xffffffff) {
780 retval = -ENODEV; 779 retval = -ENODEV;
781 break; 780 break;
@@ -784,7 +783,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
784 /* FIXME: What new port features do we need to support? */ 783 /* FIXME: What new port features do we need to support? */
785 switch (wValue) { 784 switch (wValue) {
786 case USB_PORT_FEAT_SUSPEND: 785 case USB_PORT_FEAT_SUSPEND:
787 temp = xhci_readl(xhci, port_array[wIndex]); 786 temp = readl(port_array[wIndex]);
788 if ((temp & PORT_PLS_MASK) != XDEV_U0) { 787 if ((temp & PORT_PLS_MASK) != XDEV_U0) {
789 /* Resume the port to U0 first */ 788 /* Resume the port to U0 first */
790 xhci_set_link_state(xhci, port_array, wIndex, 789 xhci_set_link_state(xhci, port_array, wIndex,
@@ -797,7 +796,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
797 * a port unless the port reports that it is in the 796 * a port unless the port reports that it is in the
798 * enabled (PED = ‘1’,PLS < ‘3’) state. 797 * enabled (PED = ‘1’,PLS < ‘3’) state.
799 */ 798 */
800 temp = xhci_readl(xhci, port_array[wIndex]); 799 temp = readl(port_array[wIndex]);
801 if ((temp & PORT_PE) == 0 || (temp & PORT_RESET) 800 if ((temp & PORT_PE) == 0 || (temp & PORT_RESET)
802 || (temp & PORT_PLS_MASK) >= XDEV_U3) { 801 || (temp & PORT_PLS_MASK) >= XDEV_U3) {
803 xhci_warn(xhci, "USB core suspending device " 802 xhci_warn(xhci, "USB core suspending device "
@@ -822,11 +821,11 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
822 msleep(10); /* wait device to enter */ 821 msleep(10); /* wait device to enter */
823 spin_lock_irqsave(&xhci->lock, flags); 822 spin_lock_irqsave(&xhci->lock, flags);
824 823
825 temp = xhci_readl(xhci, port_array[wIndex]); 824 temp = readl(port_array[wIndex]);
826 bus_state->suspended_ports |= 1 << wIndex; 825 bus_state->suspended_ports |= 1 << wIndex;
827 break; 826 break;
828 case USB_PORT_FEAT_LINK_STATE: 827 case USB_PORT_FEAT_LINK_STATE:
829 temp = xhci_readl(xhci, port_array[wIndex]); 828 temp = readl(port_array[wIndex]);
830 829
831 /* Disable port */ 830 /* Disable port */
832 if (link_state == USB_SS_PORT_LS_SS_DISABLED) { 831 if (link_state == USB_SS_PORT_LS_SS_DISABLED) {
@@ -839,9 +838,8 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
839 temp |= PORT_CSC | PORT_PEC | PORT_WRC | 838 temp |= PORT_CSC | PORT_PEC | PORT_WRC |
840 PORT_OCC | PORT_RC | PORT_PLC | 839 PORT_OCC | PORT_RC | PORT_PLC |
841 PORT_CEC; 840 PORT_CEC;
842 xhci_writel(xhci, temp | PORT_PE, 841 writel(temp | PORT_PE, port_array[wIndex]);
843 port_array[wIndex]); 842 temp = readl(port_array[wIndex]);
844 temp = xhci_readl(xhci, port_array[wIndex]);
845 break; 843 break;
846 } 844 }
847 845
@@ -850,7 +848,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
850 xhci_dbg(xhci, "Enable port %d\n", wIndex); 848 xhci_dbg(xhci, "Enable port %d\n", wIndex);
851 xhci_set_link_state(xhci, port_array, wIndex, 849 xhci_set_link_state(xhci, port_array, wIndex,
852 link_state); 850 link_state);
853 temp = xhci_readl(xhci, port_array[wIndex]); 851 temp = readl(port_array[wIndex]);
854 break; 852 break;
855 } 853 }
856 854
@@ -884,7 +882,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
884 msleep(20); /* wait device to enter */ 882 msleep(20); /* wait device to enter */
885 spin_lock_irqsave(&xhci->lock, flags); 883 spin_lock_irqsave(&xhci->lock, flags);
886 884
887 temp = xhci_readl(xhci, port_array[wIndex]); 885 temp = readl(port_array[wIndex]);
888 if (link_state == USB_SS_PORT_LS_U3) 886 if (link_state == USB_SS_PORT_LS_U3)
889 bus_state->suspended_ports |= 1 << wIndex; 887 bus_state->suspended_ports |= 1 << wIndex;
890 break; 888 break;
@@ -895,10 +893,9 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
895 * However, khubd will ignore the roothub events until 893 * However, khubd will ignore the roothub events until
896 * the roothub is registered. 894 * the roothub is registered.
897 */ 895 */
898 xhci_writel(xhci, temp | PORT_POWER, 896 writel(temp | PORT_POWER, port_array[wIndex]);
899 port_array[wIndex]);
900 897
901 temp = xhci_readl(xhci, port_array[wIndex]); 898 temp = readl(port_array[wIndex]);
902 xhci_dbg(xhci, "set port power, actual port %d status = 0x%x\n", wIndex, temp); 899 xhci_dbg(xhci, "set port power, actual port %d status = 0x%x\n", wIndex, temp);
903 900
904 spin_unlock_irqrestore(&xhci->lock, flags); 901 spin_unlock_irqrestore(&xhci->lock, flags);
@@ -911,52 +908,52 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
911 break; 908 break;
912 case USB_PORT_FEAT_RESET: 909 case USB_PORT_FEAT_RESET:
913 temp = (temp | PORT_RESET); 910 temp = (temp | PORT_RESET);
914 xhci_writel(xhci, temp, port_array[wIndex]); 911 writel(temp, port_array[wIndex]);
915 912
916 temp = xhci_readl(xhci, port_array[wIndex]); 913 temp = readl(port_array[wIndex]);
917 xhci_dbg(xhci, "set port reset, actual port %d status = 0x%x\n", wIndex, temp); 914 xhci_dbg(xhci, "set port reset, actual port %d status = 0x%x\n", wIndex, temp);
918 break; 915 break;
919 case USB_PORT_FEAT_REMOTE_WAKE_MASK: 916 case USB_PORT_FEAT_REMOTE_WAKE_MASK:
920 xhci_set_remote_wake_mask(xhci, port_array, 917 xhci_set_remote_wake_mask(xhci, port_array,
921 wIndex, wake_mask); 918 wIndex, wake_mask);
922 temp = xhci_readl(xhci, port_array[wIndex]); 919 temp = readl(port_array[wIndex]);
923 xhci_dbg(xhci, "set port remote wake mask, " 920 xhci_dbg(xhci, "set port remote wake mask, "
924 "actual port %d status = 0x%x\n", 921 "actual port %d status = 0x%x\n",
925 wIndex, temp); 922 wIndex, temp);
926 break; 923 break;
927 case USB_PORT_FEAT_BH_PORT_RESET: 924 case USB_PORT_FEAT_BH_PORT_RESET:
928 temp |= PORT_WR; 925 temp |= PORT_WR;
929 xhci_writel(xhci, temp, port_array[wIndex]); 926 writel(temp, port_array[wIndex]);
930 927
931 temp = xhci_readl(xhci, port_array[wIndex]); 928 temp = readl(port_array[wIndex]);
932 break; 929 break;
933 case USB_PORT_FEAT_U1_TIMEOUT: 930 case USB_PORT_FEAT_U1_TIMEOUT:
934 if (hcd->speed != HCD_USB3) 931 if (hcd->speed != HCD_USB3)
935 goto error; 932 goto error;
936 temp = xhci_readl(xhci, port_array[wIndex] + PORTPMSC); 933 temp = readl(port_array[wIndex] + PORTPMSC);
937 temp &= ~PORT_U1_TIMEOUT_MASK; 934 temp &= ~PORT_U1_TIMEOUT_MASK;
938 temp |= PORT_U1_TIMEOUT(timeout); 935 temp |= PORT_U1_TIMEOUT(timeout);
939 xhci_writel(xhci, temp, port_array[wIndex] + PORTPMSC); 936 writel(temp, port_array[wIndex] + PORTPMSC);
940 break; 937 break;
941 case USB_PORT_FEAT_U2_TIMEOUT: 938 case USB_PORT_FEAT_U2_TIMEOUT:
942 if (hcd->speed != HCD_USB3) 939 if (hcd->speed != HCD_USB3)
943 goto error; 940 goto error;
944 temp = xhci_readl(xhci, port_array[wIndex] + PORTPMSC); 941 temp = readl(port_array[wIndex] + PORTPMSC);
945 temp &= ~PORT_U2_TIMEOUT_MASK; 942 temp &= ~PORT_U2_TIMEOUT_MASK;
946 temp |= PORT_U2_TIMEOUT(timeout); 943 temp |= PORT_U2_TIMEOUT(timeout);
947 xhci_writel(xhci, temp, port_array[wIndex] + PORTPMSC); 944 writel(temp, port_array[wIndex] + PORTPMSC);
948 break; 945 break;
949 default: 946 default:
950 goto error; 947 goto error;
951 } 948 }
952 /* unblock any posted writes */ 949 /* unblock any posted writes */
953 temp = xhci_readl(xhci, port_array[wIndex]); 950 temp = readl(port_array[wIndex]);
954 break; 951 break;
955 case ClearPortFeature: 952 case ClearPortFeature:
956 if (!wIndex || wIndex > max_ports) 953 if (!wIndex || wIndex > max_ports)
957 goto error; 954 goto error;
958 wIndex--; 955 wIndex--;
959 temp = xhci_readl(xhci, port_array[wIndex]); 956 temp = readl(port_array[wIndex]);
960 if (temp == 0xffffffff) { 957 if (temp == 0xffffffff) {
961 retval = -ENODEV; 958 retval = -ENODEV;
962 break; 959 break;
@@ -965,7 +962,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
965 temp = xhci_port_state_to_neutral(temp); 962 temp = xhci_port_state_to_neutral(temp);
966 switch (wValue) { 963 switch (wValue) {
967 case USB_PORT_FEAT_SUSPEND: 964 case USB_PORT_FEAT_SUSPEND:
968 temp = xhci_readl(xhci, port_array[wIndex]); 965 temp = readl(port_array[wIndex]);
969 xhci_dbg(xhci, "clear USB_PORT_FEAT_SUSPEND\n"); 966 xhci_dbg(xhci, "clear USB_PORT_FEAT_SUSPEND\n");
970 xhci_dbg(xhci, "PORTSC %04x\n", temp); 967 xhci_dbg(xhci, "PORTSC %04x\n", temp);
971 if (temp & PORT_RESET) 968 if (temp & PORT_RESET)
@@ -1008,8 +1005,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
1008 port_array[wIndex], temp); 1005 port_array[wIndex], temp);
1009 break; 1006 break;
1010 case USB_PORT_FEAT_POWER: 1007 case USB_PORT_FEAT_POWER:
1011 xhci_writel(xhci, temp & ~PORT_POWER, 1008 writel(temp & ~PORT_POWER, port_array[wIndex]);
1012 port_array[wIndex]);
1013 1009
1014 spin_unlock_irqrestore(&xhci->lock, flags); 1010 spin_unlock_irqrestore(&xhci->lock, flags);
1015 temp = usb_acpi_power_manageable(hcd->self.root_hub, 1011 temp = usb_acpi_power_manageable(hcd->self.root_hub,
@@ -1070,7 +1066,7 @@ int xhci_hub_status_data(struct usb_hcd *hcd, char *buf)
1070 spin_lock_irqsave(&xhci->lock, flags); 1066 spin_lock_irqsave(&xhci->lock, flags);
1071 /* For each port, did anything change? If so, set that bit in buf. */ 1067 /* For each port, did anything change? If so, set that bit in buf. */
1072 for (i = 0; i < max_ports; i++) { 1068 for (i = 0; i < max_ports; i++) {
1073 temp = xhci_readl(xhci, port_array[i]); 1069 temp = readl(port_array[i]);
1074 if (temp == 0xffffffff) { 1070 if (temp == 0xffffffff) {
1075 retval = -ENODEV; 1071 retval = -ENODEV;
1076 break; 1072 break;
@@ -1124,7 +1120,7 @@ int xhci_bus_suspend(struct usb_hcd *hcd)
1124 u32 t1, t2; 1120 u32 t1, t2;
1125 int slot_id; 1121 int slot_id;
1126 1122
1127 t1 = xhci_readl(xhci, port_array[port_index]); 1123 t1 = readl(port_array[port_index]);
1128 t2 = xhci_port_state_to_neutral(t1); 1124 t2 = xhci_port_state_to_neutral(t1);
1129 1125
1130 if ((t1 & PORT_PE) && !(t1 & PORT_PLS_MASK)) { 1126 if ((t1 & PORT_PE) && !(t1 & PORT_PLS_MASK)) {
@@ -1157,7 +1153,7 @@ int xhci_bus_suspend(struct usb_hcd *hcd)
1157 1153
1158 t1 = xhci_port_state_to_neutral(t1); 1154 t1 = xhci_port_state_to_neutral(t1);
1159 if (t1 != t2) 1155 if (t1 != t2)
1160 xhci_writel(xhci, t2, port_array[port_index]); 1156 writel(t2, port_array[port_index]);
1161 } 1157 }
1162 hcd->state = HC_STATE_SUSPENDED; 1158 hcd->state = HC_STATE_SUSPENDED;
1163 bus_state->next_statechange = jiffies + msecs_to_jiffies(10); 1159 bus_state->next_statechange = jiffies + msecs_to_jiffies(10);
@@ -1187,9 +1183,9 @@ int xhci_bus_resume(struct usb_hcd *hcd)
1187 } 1183 }
1188 1184
1189 /* delay the irqs */ 1185 /* delay the irqs */
1190 temp = xhci_readl(xhci, &xhci->op_regs->command); 1186 temp = readl(&xhci->op_regs->command);
1191 temp &= ~CMD_EIE; 1187 temp &= ~CMD_EIE;
1192 xhci_writel(xhci, temp, &xhci->op_regs->command); 1188 writel(temp, &xhci->op_regs->command);
1193 1189
1194 port_index = max_ports; 1190 port_index = max_ports;
1195 while (port_index--) { 1191 while (port_index--) {
@@ -1198,7 +1194,7 @@ int xhci_bus_resume(struct usb_hcd *hcd)
1198 u32 temp; 1194 u32 temp;
1199 int slot_id; 1195 int slot_id;
1200 1196
1201 temp = xhci_readl(xhci, port_array[port_index]); 1197 temp = readl(port_array[port_index]);
1202 if (DEV_SUPERSPEED(temp)) 1198 if (DEV_SUPERSPEED(temp))
1203 temp &= ~(PORT_RWC_BITS | PORT_CEC | PORT_WAKE_BITS); 1199 temp &= ~(PORT_RWC_BITS | PORT_CEC | PORT_WAKE_BITS);
1204 else 1200 else
@@ -1235,17 +1231,17 @@ int xhci_bus_resume(struct usb_hcd *hcd)
1235 if (slot_id) 1231 if (slot_id)
1236 xhci_ring_device(xhci, slot_id); 1232 xhci_ring_device(xhci, slot_id);
1237 } else 1233 } else
1238 xhci_writel(xhci, temp, port_array[port_index]); 1234 writel(temp, port_array[port_index]);
1239 } 1235 }
1240 1236
1241 (void) xhci_readl(xhci, &xhci->op_regs->command); 1237 (void) readl(&xhci->op_regs->command);
1242 1238
1243 bus_state->next_statechange = jiffies + msecs_to_jiffies(5); 1239 bus_state->next_statechange = jiffies + msecs_to_jiffies(5);
1244 /* re-enable irqs */ 1240 /* re-enable irqs */
1245 temp = xhci_readl(xhci, &xhci->op_regs->command); 1241 temp = readl(&xhci->op_regs->command);
1246 temp |= CMD_EIE; 1242 temp |= CMD_EIE;
1247 xhci_writel(xhci, temp, &xhci->op_regs->command); 1243 writel(temp, &xhci->op_regs->command);
1248 temp = xhci_readl(xhci, &xhci->op_regs->command); 1244 temp = readl(&xhci->op_regs->command);
1249 1245
1250 spin_unlock_irqrestore(&xhci->lock, flags); 1246 spin_unlock_irqrestore(&xhci->lock, flags);
1251 return 0; 1247 return 0;
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 49b8bd063fab..873c272b3ef5 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -57,7 +57,7 @@ static struct xhci_segment *xhci_segment_alloc(struct xhci_hcd *xhci,
57 /* If the cycle state is 0, set the cycle bit to 1 for all the TRBs */ 57 /* If the cycle state is 0, set the cycle bit to 1 for all the TRBs */
58 if (cycle_state == 0) { 58 if (cycle_state == 0) {
59 for (i = 0; i < TRBS_PER_SEGMENT; i++) 59 for (i = 0; i < TRBS_PER_SEGMENT; i++)
60 seg->trbs[i].link.control |= TRB_CYCLE; 60 seg->trbs[i].link.control |= cpu_to_le32(TRB_CYCLE);
61 } 61 }
62 seg->dma = dma; 62 seg->dma = dma;
63 seg->next = NULL; 63 seg->next = NULL;
@@ -308,7 +308,8 @@ static void xhci_reinit_cached_ring(struct xhci_hcd *xhci,
308 sizeof(union xhci_trb)*TRBS_PER_SEGMENT); 308 sizeof(union xhci_trb)*TRBS_PER_SEGMENT);
309 if (cycle_state == 0) { 309 if (cycle_state == 0) {
310 for (i = 0; i < TRBS_PER_SEGMENT; i++) 310 for (i = 0; i < TRBS_PER_SEGMENT; i++)
311 seg->trbs[i].link.control |= TRB_CYCLE; 311 seg->trbs[i].link.control |=
312 cpu_to_le32(TRB_CYCLE);
312 } 313 }
313 /* All endpoint rings have link TRBs */ 314 /* All endpoint rings have link TRBs */
314 xhci_link_segments(xhci, seg, seg->next, type); 315 xhci_link_segments(xhci, seg, seg->next, type);
@@ -432,10 +433,10 @@ static void xhci_free_stream_ctx(struct xhci_hcd *xhci,
432 unsigned int num_stream_ctxs, 433 unsigned int num_stream_ctxs,
433 struct xhci_stream_ctx *stream_ctx, dma_addr_t dma) 434 struct xhci_stream_ctx *stream_ctx, dma_addr_t dma)
434{ 435{
435 struct pci_dev *pdev = to_pci_dev(xhci_to_hcd(xhci)->self.controller); 436 struct device *dev = xhci_to_hcd(xhci)->self.controller;
436 437
437 if (num_stream_ctxs > MEDIUM_STREAM_ARRAY_SIZE) 438 if (num_stream_ctxs > MEDIUM_STREAM_ARRAY_SIZE)
438 dma_free_coherent(&pdev->dev, 439 dma_free_coherent(dev,
439 sizeof(struct xhci_stream_ctx)*num_stream_ctxs, 440 sizeof(struct xhci_stream_ctx)*num_stream_ctxs,
440 stream_ctx, dma); 441 stream_ctx, dma);
441 else if (num_stream_ctxs <= SMALL_STREAM_ARRAY_SIZE) 442 else if (num_stream_ctxs <= SMALL_STREAM_ARRAY_SIZE)
@@ -460,10 +461,10 @@ static struct xhci_stream_ctx *xhci_alloc_stream_ctx(struct xhci_hcd *xhci,
460 unsigned int num_stream_ctxs, dma_addr_t *dma, 461 unsigned int num_stream_ctxs, dma_addr_t *dma,
461 gfp_t mem_flags) 462 gfp_t mem_flags)
462{ 463{
463 struct pci_dev *pdev = to_pci_dev(xhci_to_hcd(xhci)->self.controller); 464 struct device *dev = xhci_to_hcd(xhci)->self.controller;
464 465
465 if (num_stream_ctxs > MEDIUM_STREAM_ARRAY_SIZE) 466 if (num_stream_ctxs > MEDIUM_STREAM_ARRAY_SIZE)
466 return dma_alloc_coherent(&pdev->dev, 467 return dma_alloc_coherent(dev,
467 sizeof(struct xhci_stream_ctx)*num_stream_ctxs, 468 sizeof(struct xhci_stream_ctx)*num_stream_ctxs,
468 dma, mem_flags); 469 dma, mem_flags);
469 else if (num_stream_ctxs <= SMALL_STREAM_ARRAY_SIZE) 470 else if (num_stream_ctxs <= SMALL_STREAM_ARRAY_SIZE)
@@ -721,8 +722,7 @@ void xhci_free_stream_info(struct xhci_hcd *xhci,
721 stream_info->stream_ctx_array, 722 stream_info->stream_ctx_array,
722 stream_info->ctx_array_dma); 723 stream_info->ctx_array_dma);
723 724
724 if (stream_info) 725 kfree(stream_info->stream_rings);
725 kfree(stream_info->stream_rings);
726 kfree(stream_info); 726 kfree(stream_info);
727} 727}
728 728
@@ -1616,7 +1616,7 @@ static void scratchpad_free(struct xhci_hcd *xhci)
1616{ 1616{
1617 int num_sp; 1617 int num_sp;
1618 int i; 1618 int i;
1619 struct pci_dev *pdev = to_pci_dev(xhci_to_hcd(xhci)->self.controller); 1619 struct device *dev = xhci_to_hcd(xhci)->self.controller;
1620 1620
1621 if (!xhci->scratchpad) 1621 if (!xhci->scratchpad)
1622 return; 1622 return;
@@ -1624,13 +1624,13 @@ static void scratchpad_free(struct xhci_hcd *xhci)
1624 num_sp = HCS_MAX_SCRATCHPAD(xhci->hcs_params2); 1624 num_sp = HCS_MAX_SCRATCHPAD(xhci->hcs_params2);
1625 1625
1626 for (i = 0; i < num_sp; i++) { 1626 for (i = 0; i < num_sp; i++) {
1627 dma_free_coherent(&pdev->dev, xhci->page_size, 1627 dma_free_coherent(dev, xhci->page_size,
1628 xhci->scratchpad->sp_buffers[i], 1628 xhci->scratchpad->sp_buffers[i],
1629 xhci->scratchpad->sp_dma_buffers[i]); 1629 xhci->scratchpad->sp_dma_buffers[i]);
1630 } 1630 }
1631 kfree(xhci->scratchpad->sp_dma_buffers); 1631 kfree(xhci->scratchpad->sp_dma_buffers);
1632 kfree(xhci->scratchpad->sp_buffers); 1632 kfree(xhci->scratchpad->sp_buffers);
1633 dma_free_coherent(&pdev->dev, num_sp * sizeof(u64), 1633 dma_free_coherent(dev, num_sp * sizeof(u64),
1634 xhci->scratchpad->sp_array, 1634 xhci->scratchpad->sp_array,
1635 xhci->scratchpad->sp_dma); 1635 xhci->scratchpad->sp_dma);
1636 kfree(xhci->scratchpad); 1636 kfree(xhci->scratchpad);
@@ -1692,7 +1692,7 @@ void xhci_free_command(struct xhci_hcd *xhci,
1692 1692
1693void xhci_mem_cleanup(struct xhci_hcd *xhci) 1693void xhci_mem_cleanup(struct xhci_hcd *xhci)
1694{ 1694{
1695 struct pci_dev *pdev = to_pci_dev(xhci_to_hcd(xhci)->self.controller); 1695 struct device *dev = xhci_to_hcd(xhci)->self.controller;
1696 struct xhci_cd *cur_cd, *next_cd; 1696 struct xhci_cd *cur_cd, *next_cd;
1697 int size; 1697 int size;
1698 int i, j, num_ports; 1698 int i, j, num_ports;
@@ -1700,7 +1700,7 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
1700 /* Free the Event Ring Segment Table and the actual Event Ring */ 1700 /* Free the Event Ring Segment Table and the actual Event Ring */
1701 size = sizeof(struct xhci_erst_entry)*(xhci->erst.num_entries); 1701 size = sizeof(struct xhci_erst_entry)*(xhci->erst.num_entries);
1702 if (xhci->erst.entries) 1702 if (xhci->erst.entries)
1703 dma_free_coherent(&pdev->dev, size, 1703 dma_free_coherent(dev, size,
1704 xhci->erst.entries, xhci->erst.erst_dma_addr); 1704 xhci->erst.entries, xhci->erst.erst_dma_addr);
1705 xhci->erst.entries = NULL; 1705 xhci->erst.entries = NULL;
1706 xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Freed ERST"); 1706 xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Freed ERST");
@@ -1748,7 +1748,7 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
1748 "Freed medium stream array pool"); 1748 "Freed medium stream array pool");
1749 1749
1750 if (xhci->dcbaa) 1750 if (xhci->dcbaa)
1751 dma_free_coherent(&pdev->dev, sizeof(*xhci->dcbaa), 1751 dma_free_coherent(dev, sizeof(*xhci->dcbaa),
1752 xhci->dcbaa, xhci->dcbaa->dma); 1752 xhci->dcbaa, xhci->dcbaa->dma);
1753 xhci->dcbaa = NULL; 1753 xhci->dcbaa = NULL;
1754 1754
@@ -1958,7 +1958,7 @@ static void xhci_set_hc_event_deq(struct xhci_hcd *xhci)
1958 xhci_warn(xhci, "WARN something wrong with SW event ring " 1958 xhci_warn(xhci, "WARN something wrong with SW event ring "
1959 "dequeue ptr.\n"); 1959 "dequeue ptr.\n");
1960 /* Update HC event ring dequeue pointer */ 1960 /* Update HC event ring dequeue pointer */
1961 temp = xhci_read_64(xhci, &xhci->ir_set->erst_dequeue); 1961 temp = readq(&xhci->ir_set->erst_dequeue);
1962 temp &= ERST_PTR_MASK; 1962 temp &= ERST_PTR_MASK;
1963 /* Don't clear the EHB bit (which is RW1C) because 1963 /* Don't clear the EHB bit (which is RW1C) because
1964 * there might be more events to service. 1964 * there might be more events to service.
@@ -1967,7 +1967,7 @@ static void xhci_set_hc_event_deq(struct xhci_hcd *xhci)
1967 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 1967 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
1968 "// Write event ring dequeue pointer, " 1968 "// Write event ring dequeue pointer, "
1969 "preserving EHB bit"); 1969 "preserving EHB bit");
1970 xhci_write_64(xhci, ((u64) deq & (u64) ~ERST_PTR_MASK) | temp, 1970 writeq(((u64) deq & (u64) ~ERST_PTR_MASK) | temp,
1971 &xhci->ir_set->erst_dequeue); 1971 &xhci->ir_set->erst_dequeue);
1972} 1972}
1973 1973
@@ -1986,7 +1986,7 @@ static void xhci_add_in_port(struct xhci_hcd *xhci, unsigned int num_ports,
1986 } 1986 }
1987 1987
1988 /* Port offset and count in the third dword, see section 7.2 */ 1988 /* Port offset and count in the third dword, see section 7.2 */
1989 temp = xhci_readl(xhci, addr + 2); 1989 temp = readl(addr + 2);
1990 port_offset = XHCI_EXT_PORT_OFF(temp); 1990 port_offset = XHCI_EXT_PORT_OFF(temp);
1991 port_count = XHCI_EXT_PORT_COUNT(temp); 1991 port_count = XHCI_EXT_PORT_COUNT(temp);
1992 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 1992 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
@@ -2069,7 +2069,7 @@ static int xhci_setup_port_arrays(struct xhci_hcd *xhci, gfp_t flags)
2069 int cap_count = 0; 2069 int cap_count = 0;
2070 2070
2071 addr = &xhci->cap_regs->hcc_params; 2071 addr = &xhci->cap_regs->hcc_params;
2072 offset = XHCI_HCC_EXT_CAPS(xhci_readl(xhci, addr)); 2072 offset = XHCI_HCC_EXT_CAPS(readl(addr));
2073 if (offset == 0) { 2073 if (offset == 0) {
2074 xhci_err(xhci, "No Extended Capability registers, " 2074 xhci_err(xhci, "No Extended Capability registers, "
2075 "unable to set up roothub.\n"); 2075 "unable to set up roothub.\n");
@@ -2106,7 +2106,7 @@ static int xhci_setup_port_arrays(struct xhci_hcd *xhci, gfp_t flags)
2106 /* count extended protocol capability entries for later caching */ 2106 /* count extended protocol capability entries for later caching */
2107 do { 2107 do {
2108 u32 cap_id; 2108 u32 cap_id;
2109 cap_id = xhci_readl(xhci, tmp_addr); 2109 cap_id = readl(tmp_addr);
2110 if (XHCI_EXT_CAPS_ID(cap_id) == XHCI_EXT_CAPS_PROTOCOL) 2110 if (XHCI_EXT_CAPS_ID(cap_id) == XHCI_EXT_CAPS_PROTOCOL)
2111 cap_count++; 2111 cap_count++;
2112 tmp_offset = XHCI_EXT_CAPS_NEXT(cap_id); 2112 tmp_offset = XHCI_EXT_CAPS_NEXT(cap_id);
@@ -2120,7 +2120,7 @@ static int xhci_setup_port_arrays(struct xhci_hcd *xhci, gfp_t flags)
2120 while (1) { 2120 while (1) {
2121 u32 cap_id; 2121 u32 cap_id;
2122 2122
2123 cap_id = xhci_readl(xhci, addr); 2123 cap_id = readl(addr);
2124 if (XHCI_EXT_CAPS_ID(cap_id) == XHCI_EXT_CAPS_PROTOCOL) 2124 if (XHCI_EXT_CAPS_ID(cap_id) == XHCI_EXT_CAPS_PROTOCOL)
2125 xhci_add_in_port(xhci, num_ports, addr, 2125 xhci_add_in_port(xhci, num_ports, addr,
2126 (u8) XHCI_EXT_PORT_MAJOR(cap_id), 2126 (u8) XHCI_EXT_PORT_MAJOR(cap_id),
@@ -2224,7 +2224,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
2224 2224
2225 INIT_LIST_HEAD(&xhci->cancel_cmd_list); 2225 INIT_LIST_HEAD(&xhci->cancel_cmd_list);
2226 2226
2227 page_size = xhci_readl(xhci, &xhci->op_regs->page_size); 2227 page_size = readl(&xhci->op_regs->page_size);
2228 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 2228 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
2229 "Supported page size register = 0x%x", page_size); 2229 "Supported page size register = 0x%x", page_size);
2230 for (i = 0; i < 16; i++) { 2230 for (i = 0; i < 16; i++) {
@@ -2247,14 +2247,14 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
2247 * Program the Number of Device Slots Enabled field in the CONFIG 2247 * Program the Number of Device Slots Enabled field in the CONFIG
2248 * register with the max value of slots the HC can handle. 2248 * register with the max value of slots the HC can handle.
2249 */ 2249 */
2250 val = HCS_MAX_SLOTS(xhci_readl(xhci, &xhci->cap_regs->hcs_params1)); 2250 val = HCS_MAX_SLOTS(readl(&xhci->cap_regs->hcs_params1));
2251 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 2251 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
2252 "// xHC can handle at most %d device slots.", val); 2252 "// xHC can handle at most %d device slots.", val);
2253 val2 = xhci_readl(xhci, &xhci->op_regs->config_reg); 2253 val2 = readl(&xhci->op_regs->config_reg);
2254 val |= (val2 & ~HCS_SLOTS_MASK); 2254 val |= (val2 & ~HCS_SLOTS_MASK);
2255 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 2255 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
2256 "// Setting Max device slots reg = 0x%x.", val); 2256 "// Setting Max device slots reg = 0x%x.", val);
2257 xhci_writel(xhci, val, &xhci->op_regs->config_reg); 2257 writel(val, &xhci->op_regs->config_reg);
2258 2258
2259 /* 2259 /*
2260 * Section 5.4.8 - doorbell array must be 2260 * Section 5.4.8 - doorbell array must be
@@ -2269,7 +2269,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
2269 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 2269 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
2270 "// Device context base array address = 0x%llx (DMA), %p (virt)", 2270 "// Device context base array address = 0x%llx (DMA), %p (virt)",
2271 (unsigned long long)xhci->dcbaa->dma, xhci->dcbaa); 2271 (unsigned long long)xhci->dcbaa->dma, xhci->dcbaa);
2272 xhci_write_64(xhci, dma, &xhci->op_regs->dcbaa_ptr); 2272 writeq(dma, &xhci->op_regs->dcbaa_ptr);
2273 2273
2274 /* 2274 /*
2275 * Initialize the ring segment pool. The ring must be a contiguous 2275 * Initialize the ring segment pool. The ring must be a contiguous
@@ -2312,13 +2312,13 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
2312 (unsigned long long)xhci->cmd_ring->first_seg->dma); 2312 (unsigned long long)xhci->cmd_ring->first_seg->dma);
2313 2313
2314 /* Set the address in the Command Ring Control register */ 2314 /* Set the address in the Command Ring Control register */
2315 val_64 = xhci_read_64(xhci, &xhci->op_regs->cmd_ring); 2315 val_64 = readq(&xhci->op_regs->cmd_ring);
2316 val_64 = (val_64 & (u64) CMD_RING_RSVD_BITS) | 2316 val_64 = (val_64 & (u64) CMD_RING_RSVD_BITS) |
2317 (xhci->cmd_ring->first_seg->dma & (u64) ~CMD_RING_RSVD_BITS) | 2317 (xhci->cmd_ring->first_seg->dma & (u64) ~CMD_RING_RSVD_BITS) |
2318 xhci->cmd_ring->cycle_state; 2318 xhci->cmd_ring->cycle_state;
2319 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 2319 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
2320 "// Setting command ring address to 0x%x", val); 2320 "// Setting command ring address to 0x%x", val);
2321 xhci_write_64(xhci, val_64, &xhci->op_regs->cmd_ring); 2321 writeq(val_64, &xhci->op_regs->cmd_ring);
2322 xhci_dbg_cmd_ptrs(xhci); 2322 xhci_dbg_cmd_ptrs(xhci);
2323 2323
2324 xhci->lpm_command = xhci_alloc_command(xhci, true, true, flags); 2324 xhci->lpm_command = xhci_alloc_command(xhci, true, true, flags);
@@ -2331,7 +2331,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
2331 */ 2331 */
2332 xhci->cmd_ring_reserved_trbs++; 2332 xhci->cmd_ring_reserved_trbs++;
2333 2333
2334 val = xhci_readl(xhci, &xhci->cap_regs->db_off); 2334 val = readl(&xhci->cap_regs->db_off);
2335 val &= DBOFF_MASK; 2335 val &= DBOFF_MASK;
2336 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 2336 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
2337 "// Doorbell array is located at offset 0x%x" 2337 "// Doorbell array is located at offset 0x%x"
@@ -2382,13 +2382,13 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
2382 } 2382 }
2383 2383
2384 /* set ERST count with the number of entries in the segment table */ 2384 /* set ERST count with the number of entries in the segment table */
2385 val = xhci_readl(xhci, &xhci->ir_set->erst_size); 2385 val = readl(&xhci->ir_set->erst_size);
2386 val &= ERST_SIZE_MASK; 2386 val &= ERST_SIZE_MASK;
2387 val |= ERST_NUM_SEGS; 2387 val |= ERST_NUM_SEGS;
2388 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 2388 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
2389 "// Write ERST size = %i to ir_set 0 (some bits preserved)", 2389 "// Write ERST size = %i to ir_set 0 (some bits preserved)",
2390 val); 2390 val);
2391 xhci_writel(xhci, val, &xhci->ir_set->erst_size); 2391 writel(val, &xhci->ir_set->erst_size);
2392 2392
2393 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 2393 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
2394 "// Set ERST entries to point to event ring."); 2394 "// Set ERST entries to point to event ring.");
@@ -2396,10 +2396,10 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
2396 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 2396 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
2397 "// Set ERST base address for ir_set 0 = 0x%llx", 2397 "// Set ERST base address for ir_set 0 = 0x%llx",
2398 (unsigned long long)xhci->erst.erst_dma_addr); 2398 (unsigned long long)xhci->erst.erst_dma_addr);
2399 val_64 = xhci_read_64(xhci, &xhci->ir_set->erst_base); 2399 val_64 = readq(&xhci->ir_set->erst_base);
2400 val_64 &= ERST_PTR_MASK; 2400 val_64 &= ERST_PTR_MASK;
2401 val_64 |= (xhci->erst.erst_dma_addr & (u64) ~ERST_PTR_MASK); 2401 val_64 |= (xhci->erst.erst_dma_addr & (u64) ~ERST_PTR_MASK);
2402 xhci_write_64(xhci, val_64, &xhci->ir_set->erst_base); 2402 writeq(val_64, &xhci->ir_set->erst_base);
2403 2403
2404 /* Set the event ring dequeue address */ 2404 /* Set the event ring dequeue address */
2405 xhci_set_hc_event_deq(xhci); 2405 xhci_set_hc_event_deq(xhci);
@@ -2431,10 +2431,10 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
2431 * is necessary for allowing USB 3.0 devices to do remote wakeup from 2431 * is necessary for allowing USB 3.0 devices to do remote wakeup from
2432 * U3 (device suspend). 2432 * U3 (device suspend).
2433 */ 2433 */
2434 temp = xhci_readl(xhci, &xhci->op_regs->dev_notification); 2434 temp = readl(&xhci->op_regs->dev_notification);
2435 temp &= ~DEV_NOTE_MASK; 2435 temp &= ~DEV_NOTE_MASK;
2436 temp |= DEV_NOTE_FWAKE; 2436 temp |= DEV_NOTE_FWAKE;
2437 xhci_writel(xhci, temp, &xhci->op_regs->dev_notification); 2437 writel(temp, &xhci->op_regs->dev_notification);
2438 2438
2439 return 0; 2439 return 0;
2440 2440
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 73f5208714a4..3c898c12a06b 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -336,6 +336,7 @@ static const struct hc_driver xhci_pci_hc_driver = {
336 .check_bandwidth = xhci_check_bandwidth, 336 .check_bandwidth = xhci_check_bandwidth,
337 .reset_bandwidth = xhci_reset_bandwidth, 337 .reset_bandwidth = xhci_reset_bandwidth,
338 .address_device = xhci_address_device, 338 .address_device = xhci_address_device,
339 .enable_device = xhci_enable_device,
339 .update_hub_device = xhci_update_hub_device, 340 .update_hub_device = xhci_update_hub_device,
340 .reset_device = xhci_discover_or_reset_device, 341 .reset_device = xhci_discover_or_reset_device,
341 342
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index d9c169f470d3..8abda5c73ca1 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -69,6 +69,7 @@ static const struct hc_driver xhci_plat_xhci_driver = {
69 .check_bandwidth = xhci_check_bandwidth, 69 .check_bandwidth = xhci_check_bandwidth,
70 .reset_bandwidth = xhci_reset_bandwidth, 70 .reset_bandwidth = xhci_reset_bandwidth,
71 .address_device = xhci_address_device, 71 .address_device = xhci_address_device,
72 .enable_device = xhci_enable_device,
72 .update_hub_device = xhci_update_hub_device, 73 .update_hub_device = xhci_update_hub_device,
73 .reset_device = xhci_discover_or_reset_device, 74 .reset_device = xhci_discover_or_reset_device,
74 75
@@ -139,6 +140,7 @@ static int xhci_plat_probe(struct platform_device *pdev)
139 ret = usb_add_hcd(hcd, irq, IRQF_SHARED); 140 ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
140 if (ret) 141 if (ret)
141 goto unmap_registers; 142 goto unmap_registers;
143 device_wakeup_enable(hcd->self.controller);
142 144
143 /* USB 2.0 roothub is stored in the platform_device now. */ 145 /* USB 2.0 roothub is stored in the platform_device now. */
144 hcd = platform_get_drvdata(pdev); 146 hcd = platform_get_drvdata(pdev);
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 53c2e296467f..a0b248c34526 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -156,8 +156,6 @@ static void next_trb(struct xhci_hcd *xhci,
156 */ 156 */
157static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring) 157static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring)
158{ 158{
159 unsigned long long addr;
160
161 ring->deq_updates++; 159 ring->deq_updates++;
162 160
163 /* 161 /*
@@ -186,8 +184,6 @@ static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring)
186 ring->dequeue++; 184 ring->dequeue++;
187 } 185 }
188 } while (last_trb(xhci, ring, ring->deq_seg, ring->dequeue)); 186 } while (last_trb(xhci, ring, ring->deq_seg, ring->dequeue));
189
190 addr = (unsigned long long) xhci_trb_virt_to_dma(ring->deq_seg, ring->dequeue);
191} 187}
192 188
193/* 189/*
@@ -212,7 +208,6 @@ static void inc_enq(struct xhci_hcd *xhci, struct xhci_ring *ring,
212{ 208{
213 u32 chain; 209 u32 chain;
214 union xhci_trb *next; 210 union xhci_trb *next;
215 unsigned long long addr;
216 211
217 chain = le32_to_cpu(ring->enqueue->generic.field[3]) & TRB_CHAIN; 212 chain = le32_to_cpu(ring->enqueue->generic.field[3]) & TRB_CHAIN;
218 /* If this is not event ring, there is one less usable TRB */ 213 /* If this is not event ring, there is one less usable TRB */
@@ -264,7 +259,6 @@ static void inc_enq(struct xhci_hcd *xhci, struct xhci_ring *ring,
264 ring->enqueue = ring->enq_seg->trbs; 259 ring->enqueue = ring->enq_seg->trbs;
265 next = ring->enqueue; 260 next = ring->enqueue;
266 } 261 }
267 addr = (unsigned long long) xhci_trb_virt_to_dma(ring->enq_seg, ring->enqueue);
268} 262}
269 263
270/* 264/*
@@ -295,9 +289,9 @@ void xhci_ring_cmd_db(struct xhci_hcd *xhci)
295 return; 289 return;
296 290
297 xhci_dbg(xhci, "// Ding dong!\n"); 291 xhci_dbg(xhci, "// Ding dong!\n");
298 xhci_writel(xhci, DB_VALUE_HOST, &xhci->dba->doorbell[0]); 292 writel(DB_VALUE_HOST, &xhci->dba->doorbell[0]);
299 /* Flush PCI posted writes */ 293 /* Flush PCI posted writes */
300 xhci_readl(xhci, &xhci->dba->doorbell[0]); 294 readl(&xhci->dba->doorbell[0]);
301} 295}
302 296
303static int xhci_abort_cmd_ring(struct xhci_hcd *xhci) 297static int xhci_abort_cmd_ring(struct xhci_hcd *xhci)
@@ -313,14 +307,13 @@ static int xhci_abort_cmd_ring(struct xhci_hcd *xhci)
313 return 0; 307 return 0;
314 } 308 }
315 309
316 temp_64 = xhci_read_64(xhci, &xhci->op_regs->cmd_ring); 310 temp_64 = readq(&xhci->op_regs->cmd_ring);
317 if (!(temp_64 & CMD_RING_RUNNING)) { 311 if (!(temp_64 & CMD_RING_RUNNING)) {
318 xhci_dbg(xhci, "Command ring had been stopped\n"); 312 xhci_dbg(xhci, "Command ring had been stopped\n");
319 return 0; 313 return 0;
320 } 314 }
321 xhci->cmd_ring_state = CMD_RING_STATE_ABORTED; 315 xhci->cmd_ring_state = CMD_RING_STATE_ABORTED;
322 xhci_write_64(xhci, temp_64 | CMD_RING_ABORT, 316 writeq(temp_64 | CMD_RING_ABORT, &xhci->op_regs->cmd_ring);
323 &xhci->op_regs->cmd_ring);
324 317
325 /* Section 4.6.1.2 of xHCI 1.0 spec says software should 318 /* Section 4.6.1.2 of xHCI 1.0 spec says software should
326 * time the completion od all xHCI commands, including 319 * time the completion od all xHCI commands, including
@@ -427,7 +420,7 @@ void xhci_ring_ep_doorbell(struct xhci_hcd *xhci,
427 if ((ep_state & EP_HALT_PENDING) || (ep_state & SET_DEQ_PENDING) || 420 if ((ep_state & EP_HALT_PENDING) || (ep_state & SET_DEQ_PENDING) ||
428 (ep_state & EP_HALTED)) 421 (ep_state & EP_HALTED))
429 return; 422 return;
430 xhci_writel(xhci, DB_VALUE(ep_index, stream_id), db_addr); 423 writel(DB_VALUE(ep_index, stream_id), db_addr);
431 /* The CPU has better things to do at this point than wait for a 424 /* The CPU has better things to do at this point than wait for a
432 * write-posting flush. It'll get there soon enough. 425 * write-posting flush. It'll get there soon enough.
433 */ 426 */
@@ -1655,7 +1648,7 @@ static void handle_device_notification(struct xhci_hcd *xhci,
1655 u32 slot_id; 1648 u32 slot_id;
1656 struct usb_device *udev; 1649 struct usb_device *udev;
1657 1650
1658 slot_id = TRB_TO_SLOT_ID(event->generic.field[3]); 1651 slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->generic.field[3]));
1659 if (!xhci->devs[slot_id]) { 1652 if (!xhci->devs[slot_id]) {
1660 xhci_warn(xhci, "Device Notification event for " 1653 xhci_warn(xhci, "Device Notification event for "
1661 "unused slot %u\n", slot_id); 1654 "unused slot %u\n", slot_id);
@@ -1739,7 +1732,7 @@ static void handle_port_status(struct xhci_hcd *xhci,
1739 faked_port_index = find_faked_portnum_from_hw_portnum(hcd, xhci, 1732 faked_port_index = find_faked_portnum_from_hw_portnum(hcd, xhci,
1740 port_id); 1733 port_id);
1741 1734
1742 temp = xhci_readl(xhci, port_array[faked_port_index]); 1735 temp = readl(port_array[faked_port_index]);
1743 if (hcd->state == HC_STATE_SUSPENDED) { 1736 if (hcd->state == HC_STATE_SUSPENDED) {
1744 xhci_dbg(xhci, "resume root hub\n"); 1737 xhci_dbg(xhci, "resume root hub\n");
1745 usb_hcd_resume_root_hub(hcd); 1738 usb_hcd_resume_root_hub(hcd);
@@ -1748,7 +1741,7 @@ static void handle_port_status(struct xhci_hcd *xhci,
1748 if ((temp & PORT_PLC) && (temp & PORT_PLS_MASK) == XDEV_RESUME) { 1741 if ((temp & PORT_PLC) && (temp & PORT_PLS_MASK) == XDEV_RESUME) {
1749 xhci_dbg(xhci, "port resume event for port %d\n", port_id); 1742 xhci_dbg(xhci, "port resume event for port %d\n", port_id);
1750 1743
1751 temp1 = xhci_readl(xhci, &xhci->op_regs->command); 1744 temp1 = readl(&xhci->op_regs->command);
1752 if (!(temp1 & CMD_RUN)) { 1745 if (!(temp1 & CMD_RUN)) {
1753 xhci_warn(xhci, "xHC is not running.\n"); 1746 xhci_warn(xhci, "xHC is not running.\n");
1754 goto cleanup; 1747 goto cleanup;
@@ -2831,7 +2824,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd)
2831 2824
2832 spin_lock(&xhci->lock); 2825 spin_lock(&xhci->lock);
2833 /* Check if the xHC generated the interrupt, or the irq is shared */ 2826 /* Check if the xHC generated the interrupt, or the irq is shared */
2834 status = xhci_readl(xhci, &xhci->op_regs->status); 2827 status = readl(&xhci->op_regs->status);
2835 if (status == 0xffffffff) 2828 if (status == 0xffffffff)
2836 goto hw_died; 2829 goto hw_died;
2837 2830
@@ -2853,16 +2846,16 @@ hw_died:
2853 * Write 1 to clear the interrupt status. 2846 * Write 1 to clear the interrupt status.
2854 */ 2847 */
2855 status |= STS_EINT; 2848 status |= STS_EINT;
2856 xhci_writel(xhci, status, &xhci->op_regs->status); 2849 writel(status, &xhci->op_regs->status);
2857 /* FIXME when MSI-X is supported and there are multiple vectors */ 2850 /* FIXME when MSI-X is supported and there are multiple vectors */
2858 /* Clear the MSI-X event interrupt status */ 2851 /* Clear the MSI-X event interrupt status */
2859 2852
2860 if (hcd->irq) { 2853 if (hcd->irq) {
2861 u32 irq_pending; 2854 u32 irq_pending;
2862 /* Acknowledge the PCI interrupt */ 2855 /* Acknowledge the PCI interrupt */
2863 irq_pending = xhci_readl(xhci, &xhci->ir_set->irq_pending); 2856 irq_pending = readl(&xhci->ir_set->irq_pending);
2864 irq_pending |= IMAN_IP; 2857 irq_pending |= IMAN_IP;
2865 xhci_writel(xhci, irq_pending, &xhci->ir_set->irq_pending); 2858 writel(irq_pending, &xhci->ir_set->irq_pending);
2866 } 2859 }
2867 2860
2868 if (xhci->xhc_state & XHCI_STATE_DYING) { 2861 if (xhci->xhc_state & XHCI_STATE_DYING) {
@@ -2871,9 +2864,8 @@ hw_died:
2871 /* Clear the event handler busy flag (RW1C); 2864 /* Clear the event handler busy flag (RW1C);
2872 * the event ring should be empty. 2865 * the event ring should be empty.
2873 */ 2866 */
2874 temp_64 = xhci_read_64(xhci, &xhci->ir_set->erst_dequeue); 2867 temp_64 = readq(&xhci->ir_set->erst_dequeue);
2875 xhci_write_64(xhci, temp_64 | ERST_EHB, 2868 writeq(temp_64 | ERST_EHB, &xhci->ir_set->erst_dequeue);
2876 &xhci->ir_set->erst_dequeue);
2877 spin_unlock(&xhci->lock); 2869 spin_unlock(&xhci->lock);
2878 2870
2879 return IRQ_HANDLED; 2871 return IRQ_HANDLED;
@@ -2885,7 +2877,7 @@ hw_died:
2885 */ 2877 */
2886 while (xhci_handle_event(xhci) > 0) {} 2878 while (xhci_handle_event(xhci) > 0) {}
2887 2879
2888 temp_64 = xhci_read_64(xhci, &xhci->ir_set->erst_dequeue); 2880 temp_64 = readq(&xhci->ir_set->erst_dequeue);
2889 /* If necessary, update the HW's version of the event ring deq ptr. */ 2881 /* If necessary, update the HW's version of the event ring deq ptr. */
2890 if (event_ring_deq != xhci->event_ring->dequeue) { 2882 if (event_ring_deq != xhci->event_ring->dequeue) {
2891 deq = xhci_trb_virt_to_dma(xhci->event_ring->deq_seg, 2883 deq = xhci_trb_virt_to_dma(xhci->event_ring->deq_seg,
@@ -2900,7 +2892,7 @@ hw_died:
2900 2892
2901 /* Clear the event handler busy flag (RW1C); event ring is empty. */ 2893 /* Clear the event handler busy flag (RW1C); event ring is empty. */
2902 temp_64 |= ERST_EHB; 2894 temp_64 |= ERST_EHB;
2903 xhci_write_64(xhci, temp_64, &xhci->ir_set->erst_dequeue); 2895 writeq(temp_64, &xhci->ir_set->erst_dequeue);
2904 2896
2905 spin_unlock(&xhci->lock); 2897 spin_unlock(&xhci->lock);
2906 2898
@@ -3008,7 +3000,7 @@ static int prepare_ring(struct xhci_hcd *xhci, struct xhci_ring *ep_ring,
3008 if (num_trbs >= TRBS_PER_SEGMENT) { 3000 if (num_trbs >= TRBS_PER_SEGMENT) {
3009 xhci_err(xhci, "Too many fragments %d, max %d\n", 3001 xhci_err(xhci, "Too many fragments %d, max %d\n",
3010 num_trbs, TRBS_PER_SEGMENT - 1); 3002 num_trbs, TRBS_PER_SEGMENT - 1);
3011 return -ENOMEM; 3003 return -EINVAL;
3012 } 3004 }
3013 3005
3014 nop_cmd = cpu_to_le32(TRB_TYPE(TRB_TR_NOOP) | 3006 nop_cmd = cpu_to_le32(TRB_TYPE(TRB_TR_NOOP) |
@@ -3981,7 +3973,7 @@ int xhci_queue_isoc_tx_prepare(struct xhci_hcd *xhci, gfp_t mem_flags,
3981 if (ret) 3973 if (ret)
3982 return ret; 3974 return ret;
3983 3975
3984 start_frame = xhci_readl(xhci, &xhci->run_regs->microframe_index); 3976 start_frame = readl(&xhci->run_regs->microframe_index);
3985 start_frame &= 0x3fff; 3977 start_frame &= 0x3fff;
3986 3978
3987 urb->start_frame = start_frame; 3979 urb->start_frame = start_frame;
@@ -4056,12 +4048,12 @@ int xhci_queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id)
4056 4048
4057/* Queue an address device command TRB */ 4049/* Queue an address device command TRB */
4058int xhci_queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, 4050int xhci_queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr,
4059 u32 slot_id) 4051 u32 slot_id, enum xhci_setup_dev setup)
4060{ 4052{
4061 return queue_command(xhci, lower_32_bits(in_ctx_ptr), 4053 return queue_command(xhci, lower_32_bits(in_ctx_ptr),
4062 upper_32_bits(in_ctx_ptr), 0, 4054 upper_32_bits(in_ctx_ptr), 0,
4063 TRB_TYPE(TRB_ADDR_DEV) | SLOT_ID_FOR_TRB(slot_id), 4055 TRB_TYPE(TRB_ADDR_DEV) | SLOT_ID_FOR_TRB(slot_id)
4064 false); 4056 | (setup == SETUP_CONTEXT_ONLY ? TRB_BSR : 0), false);
4065} 4057}
4066 4058
4067int xhci_queue_vendor_command(struct xhci_hcd *xhci, 4059int xhci_queue_vendor_command(struct xhci_hcd *xhci,
diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci-trace.h
index 20364cc8d2fb..dde3959b7a33 100644
--- a/drivers/usb/host/xhci-trace.h
+++ b/drivers/usb/host/xhci-trace.h
@@ -116,12 +116,12 @@ DECLARE_EVENT_CLASS(xhci_log_event,
116 __field(u64, dma) 116 __field(u64, dma)
117 __field(u32, status) 117 __field(u32, status)
118 __field(u32, flags) 118 __field(u32, flags)
119 __dynamic_array(__le32, trb, 4) 119 __dynamic_array(u8, trb, sizeof(struct xhci_generic_trb))
120 ), 120 ),
121 TP_fast_assign( 121 TP_fast_assign(
122 __entry->va = trb_va; 122 __entry->va = trb_va;
123 __entry->dma = le64_to_cpu(((u64)ev->field[1]) << 32 | 123 __entry->dma = ((u64)le32_to_cpu(ev->field[1])) << 32 |
124 ev->field[0]); 124 le32_to_cpu(ev->field[0]);
125 __entry->status = le32_to_cpu(ev->field[2]); 125 __entry->status = le32_to_cpu(ev->field[2]);
126 __entry->flags = le32_to_cpu(ev->field[3]); 126 __entry->flags = le32_to_cpu(ev->field[3]);
127 memcpy(__get_dynamic_array(trb), trb_va, 127 memcpy(__get_dynamic_array(trb), trb_va,
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 4265b48856f6..ad364394885a 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -40,6 +40,10 @@ static int link_quirk;
40module_param(link_quirk, int, S_IRUGO | S_IWUSR); 40module_param(link_quirk, int, S_IRUGO | S_IWUSR);
41MODULE_PARM_DESC(link_quirk, "Don't clear the chain bit on a link TRB"); 41MODULE_PARM_DESC(link_quirk, "Don't clear the chain bit on a link TRB");
42 42
43static unsigned int quirks;
44module_param(quirks, uint, S_IRUGO);
45MODULE_PARM_DESC(quirks, "Bit flags for quirks to be enabled as default");
46
43/* TODO: copied from ehci-hcd.c - can this be refactored? */ 47/* TODO: copied from ehci-hcd.c - can this be refactored? */
44/* 48/*
45 * xhci_handshake - spin reading hc until handshake completes or fails 49 * xhci_handshake - spin reading hc until handshake completes or fails
@@ -60,7 +64,7 @@ int xhci_handshake(struct xhci_hcd *xhci, void __iomem *ptr,
60 u32 result; 64 u32 result;
61 65
62 do { 66 do {
63 result = xhci_readl(xhci, ptr); 67 result = readl(ptr);
64 if (result == ~(u32)0) /* card removed */ 68 if (result == ~(u32)0) /* card removed */
65 return -ENODEV; 69 return -ENODEV;
66 result &= mask; 70 result &= mask;
@@ -82,13 +86,13 @@ void xhci_quiesce(struct xhci_hcd *xhci)
82 u32 mask; 86 u32 mask;
83 87
84 mask = ~(XHCI_IRQS); 88 mask = ~(XHCI_IRQS);
85 halted = xhci_readl(xhci, &xhci->op_regs->status) & STS_HALT; 89 halted = readl(&xhci->op_regs->status) & STS_HALT;
86 if (!halted) 90 if (!halted)
87 mask &= ~CMD_RUN; 91 mask &= ~CMD_RUN;
88 92
89 cmd = xhci_readl(xhci, &xhci->op_regs->command); 93 cmd = readl(&xhci->op_regs->command);
90 cmd &= mask; 94 cmd &= mask;
91 xhci_writel(xhci, cmd, &xhci->op_regs->command); 95 writel(cmd, &xhci->op_regs->command);
92} 96}
93 97
94/* 98/*
@@ -124,11 +128,11 @@ static int xhci_start(struct xhci_hcd *xhci)
124 u32 temp; 128 u32 temp;
125 int ret; 129 int ret;
126 130
127 temp = xhci_readl(xhci, &xhci->op_regs->command); 131 temp = readl(&xhci->op_regs->command);
128 temp |= (CMD_RUN); 132 temp |= (CMD_RUN);
129 xhci_dbg_trace(xhci, trace_xhci_dbg_init, "// Turn on HC, cmd = 0x%x.", 133 xhci_dbg_trace(xhci, trace_xhci_dbg_init, "// Turn on HC, cmd = 0x%x.",
130 temp); 134 temp);
131 xhci_writel(xhci, temp, &xhci->op_regs->command); 135 writel(temp, &xhci->op_regs->command);
132 136
133 /* 137 /*
134 * Wait for the HCHalted Status bit to be 0 to indicate the host is 138 * Wait for the HCHalted Status bit to be 0 to indicate the host is
@@ -158,16 +162,16 @@ int xhci_reset(struct xhci_hcd *xhci)
158 u32 state; 162 u32 state;
159 int ret, i; 163 int ret, i;
160 164
161 state = xhci_readl(xhci, &xhci->op_regs->status); 165 state = readl(&xhci->op_regs->status);
162 if ((state & STS_HALT) == 0) { 166 if ((state & STS_HALT) == 0) {
163 xhci_warn(xhci, "Host controller not halted, aborting reset.\n"); 167 xhci_warn(xhci, "Host controller not halted, aborting reset.\n");
164 return 0; 168 return 0;
165 } 169 }
166 170
167 xhci_dbg_trace(xhci, trace_xhci_dbg_init, "// Reset the HC"); 171 xhci_dbg_trace(xhci, trace_xhci_dbg_init, "// Reset the HC");
168 command = xhci_readl(xhci, &xhci->op_regs->command); 172 command = readl(&xhci->op_regs->command);
169 command |= CMD_RESET; 173 command |= CMD_RESET;
170 xhci_writel(xhci, command, &xhci->op_regs->command); 174 writel(command, &xhci->op_regs->command);
171 175
172 ret = xhci_handshake(xhci, &xhci->op_regs->command, 176 ret = xhci_handshake(xhci, &xhci->op_regs->command,
173 CMD_RESET, 0, 10 * 1000 * 1000); 177 CMD_RESET, 0, 10 * 1000 * 1000);
@@ -321,6 +325,9 @@ static void xhci_cleanup_msix(struct xhci_hcd *xhci)
321 struct usb_hcd *hcd = xhci_to_hcd(xhci); 325 struct usb_hcd *hcd = xhci_to_hcd(xhci);
322 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); 326 struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
323 327
328 if (xhci->quirks & XHCI_PLAT)
329 return;
330
324 xhci_free_irq(xhci); 331 xhci_free_irq(xhci);
325 332
326 if (xhci->msix_entries) { 333 if (xhci->msix_entries) {
@@ -422,7 +429,7 @@ static void compliance_mode_recovery(unsigned long arg)
422 xhci = (struct xhci_hcd *)arg; 429 xhci = (struct xhci_hcd *)arg;
423 430
424 for (i = 0; i < xhci->num_usb3_ports; i++) { 431 for (i = 0; i < xhci->num_usb3_ports; i++) {
425 temp = xhci_readl(xhci, xhci->usb3_ports[i]); 432 temp = readl(xhci->usb3_ports[i]);
426 if ((temp & PORT_PLS_MASK) == USB_SS_PORT_LS_COMP_MOD) { 433 if ((temp & PORT_PLS_MASK) == USB_SS_PORT_LS_COMP_MOD) {
427 /* 434 /*
428 * Compliance Mode Detected. Letting USB Core 435 * Compliance Mode Detected. Letting USB Core
@@ -604,31 +611,30 @@ int xhci_run(struct usb_hcd *hcd)
604 xhci_dbg(xhci, "Event ring:\n"); 611 xhci_dbg(xhci, "Event ring:\n");
605 xhci_debug_ring(xhci, xhci->event_ring); 612 xhci_debug_ring(xhci, xhci->event_ring);
606 xhci_dbg_ring_ptrs(xhci, xhci->event_ring); 613 xhci_dbg_ring_ptrs(xhci, xhci->event_ring);
607 temp_64 = xhci_read_64(xhci, &xhci->ir_set->erst_dequeue); 614 temp_64 = readq(&xhci->ir_set->erst_dequeue);
608 temp_64 &= ~ERST_PTR_MASK; 615 temp_64 &= ~ERST_PTR_MASK;
609 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 616 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
610 "ERST deq = 64'h%0lx", (long unsigned int) temp_64); 617 "ERST deq = 64'h%0lx", (long unsigned int) temp_64);
611 618
612 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 619 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
613 "// Set the interrupt modulation register"); 620 "// Set the interrupt modulation register");
614 temp = xhci_readl(xhci, &xhci->ir_set->irq_control); 621 temp = readl(&xhci->ir_set->irq_control);
615 temp &= ~ER_IRQ_INTERVAL_MASK; 622 temp &= ~ER_IRQ_INTERVAL_MASK;
616 temp |= (u32) 160; 623 temp |= (u32) 160;
617 xhci_writel(xhci, temp, &xhci->ir_set->irq_control); 624 writel(temp, &xhci->ir_set->irq_control);
618 625
619 /* Set the HCD state before we enable the irqs */ 626 /* Set the HCD state before we enable the irqs */
620 temp = xhci_readl(xhci, &xhci->op_regs->command); 627 temp = readl(&xhci->op_regs->command);
621 temp |= (CMD_EIE); 628 temp |= (CMD_EIE);
622 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 629 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
623 "// Enable interrupts, cmd = 0x%x.", temp); 630 "// Enable interrupts, cmd = 0x%x.", temp);
624 xhci_writel(xhci, temp, &xhci->op_regs->command); 631 writel(temp, &xhci->op_regs->command);
625 632
626 temp = xhci_readl(xhci, &xhci->ir_set->irq_pending); 633 temp = readl(&xhci->ir_set->irq_pending);
627 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 634 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
628 "// Enabling event ring interrupter %p by writing 0x%x to irq_pending", 635 "// Enabling event ring interrupter %p by writing 0x%x to irq_pending",
629 xhci->ir_set, (unsigned int) ER_IRQ_ENABLE(temp)); 636 xhci->ir_set, (unsigned int) ER_IRQ_ENABLE(temp));
630 xhci_writel(xhci, ER_IRQ_ENABLE(temp), 637 writel(ER_IRQ_ENABLE(temp), &xhci->ir_set->irq_pending);
631 &xhci->ir_set->irq_pending);
632 xhci_print_ir_set(xhci, 0); 638 xhci_print_ir_set(xhci, 0);
633 639
634 if (xhci->quirks & XHCI_NEC_HOST) 640 if (xhci->quirks & XHCI_NEC_HOST)
@@ -698,18 +704,17 @@ void xhci_stop(struct usb_hcd *hcd)
698 704
699 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 705 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
700 "// Disabling event ring interrupts"); 706 "// Disabling event ring interrupts");
701 temp = xhci_readl(xhci, &xhci->op_regs->status); 707 temp = readl(&xhci->op_regs->status);
702 xhci_writel(xhci, temp & ~STS_EINT, &xhci->op_regs->status); 708 writel(temp & ~STS_EINT, &xhci->op_regs->status);
703 temp = xhci_readl(xhci, &xhci->ir_set->irq_pending); 709 temp = readl(&xhci->ir_set->irq_pending);
704 xhci_writel(xhci, ER_IRQ_DISABLE(temp), 710 writel(ER_IRQ_DISABLE(temp), &xhci->ir_set->irq_pending);
705 &xhci->ir_set->irq_pending);
706 xhci_print_ir_set(xhci, 0); 711 xhci_print_ir_set(xhci, 0);
707 712
708 xhci_dbg_trace(xhci, trace_xhci_dbg_init, "cleaning up memory"); 713 xhci_dbg_trace(xhci, trace_xhci_dbg_init, "cleaning up memory");
709 xhci_mem_cleanup(xhci); 714 xhci_mem_cleanup(xhci);
710 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 715 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
711 "xhci_stop completed - status = %x", 716 "xhci_stop completed - status = %x",
712 xhci_readl(xhci, &xhci->op_regs->status)); 717 readl(&xhci->op_regs->status));
713} 718}
714 719
715/* 720/*
@@ -739,7 +744,7 @@ void xhci_shutdown(struct usb_hcd *hcd)
739 744
740 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 745 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
741 "xhci_shutdown completed - status = %x", 746 "xhci_shutdown completed - status = %x",
742 xhci_readl(xhci, &xhci->op_regs->status)); 747 readl(&xhci->op_regs->status));
743 748
744 /* Yet another workaround for spurious wakeups at shutdown with HSW */ 749 /* Yet another workaround for spurious wakeups at shutdown with HSW */
745 if (xhci->quirks & XHCI_SPURIOUS_WAKEUP) 750 if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
@@ -749,28 +754,28 @@ void xhci_shutdown(struct usb_hcd *hcd)
749#ifdef CONFIG_PM 754#ifdef CONFIG_PM
750static void xhci_save_registers(struct xhci_hcd *xhci) 755static void xhci_save_registers(struct xhci_hcd *xhci)
751{ 756{
752 xhci->s3.command = xhci_readl(xhci, &xhci->op_regs->command); 757 xhci->s3.command = readl(&xhci->op_regs->command);
753 xhci->s3.dev_nt = xhci_readl(xhci, &xhci->op_regs->dev_notification); 758 xhci->s3.dev_nt = readl(&xhci->op_regs->dev_notification);
754 xhci->s3.dcbaa_ptr = xhci_read_64(xhci, &xhci->op_regs->dcbaa_ptr); 759 xhci->s3.dcbaa_ptr = readq(&xhci->op_regs->dcbaa_ptr);
755 xhci->s3.config_reg = xhci_readl(xhci, &xhci->op_regs->config_reg); 760 xhci->s3.config_reg = readl(&xhci->op_regs->config_reg);
756 xhci->s3.erst_size = xhci_readl(xhci, &xhci->ir_set->erst_size); 761 xhci->s3.erst_size = readl(&xhci->ir_set->erst_size);
757 xhci->s3.erst_base = xhci_read_64(xhci, &xhci->ir_set->erst_base); 762 xhci->s3.erst_base = readq(&xhci->ir_set->erst_base);
758 xhci->s3.erst_dequeue = xhci_read_64(xhci, &xhci->ir_set->erst_dequeue); 763 xhci->s3.erst_dequeue = readq(&xhci->ir_set->erst_dequeue);
759 xhci->s3.irq_pending = xhci_readl(xhci, &xhci->ir_set->irq_pending); 764 xhci->s3.irq_pending = readl(&xhci->ir_set->irq_pending);
760 xhci->s3.irq_control = xhci_readl(xhci, &xhci->ir_set->irq_control); 765 xhci->s3.irq_control = readl(&xhci->ir_set->irq_control);
761} 766}
762 767
763static void xhci_restore_registers(struct xhci_hcd *xhci) 768static void xhci_restore_registers(struct xhci_hcd *xhci)
764{ 769{
765 xhci_writel(xhci, xhci->s3.command, &xhci->op_regs->command); 770 writel(xhci->s3.command, &xhci->op_regs->command);
766 xhci_writel(xhci, xhci->s3.dev_nt, &xhci->op_regs->dev_notification); 771 writel(xhci->s3.dev_nt, &xhci->op_regs->dev_notification);
767 xhci_write_64(xhci, xhci->s3.dcbaa_ptr, &xhci->op_regs->dcbaa_ptr); 772 writeq(xhci->s3.dcbaa_ptr, &xhci->op_regs->dcbaa_ptr);
768 xhci_writel(xhci, xhci->s3.config_reg, &xhci->op_regs->config_reg); 773 writel(xhci->s3.config_reg, &xhci->op_regs->config_reg);
769 xhci_writel(xhci, xhci->s3.erst_size, &xhci->ir_set->erst_size); 774 writel(xhci->s3.erst_size, &xhci->ir_set->erst_size);
770 xhci_write_64(xhci, xhci->s3.erst_base, &xhci->ir_set->erst_base); 775 writeq(xhci->s3.erst_base, &xhci->ir_set->erst_base);
771 xhci_write_64(xhci, xhci->s3.erst_dequeue, &xhci->ir_set->erst_dequeue); 776 writeq(xhci->s3.erst_dequeue, &xhci->ir_set->erst_dequeue);
772 xhci_writel(xhci, xhci->s3.irq_pending, &xhci->ir_set->irq_pending); 777 writel(xhci->s3.irq_pending, &xhci->ir_set->irq_pending);
773 xhci_writel(xhci, xhci->s3.irq_control, &xhci->ir_set->irq_control); 778 writel(xhci->s3.irq_control, &xhci->ir_set->irq_control);
774} 779}
775 780
776static void xhci_set_cmd_ring_deq(struct xhci_hcd *xhci) 781static void xhci_set_cmd_ring_deq(struct xhci_hcd *xhci)
@@ -778,7 +783,7 @@ static void xhci_set_cmd_ring_deq(struct xhci_hcd *xhci)
778 u64 val_64; 783 u64 val_64;
779 784
780 /* step 2: initialize command ring buffer */ 785 /* step 2: initialize command ring buffer */
781 val_64 = xhci_read_64(xhci, &xhci->op_regs->cmd_ring); 786 val_64 = readq(&xhci->op_regs->cmd_ring);
782 val_64 = (val_64 & (u64) CMD_RING_RSVD_BITS) | 787 val_64 = (val_64 & (u64) CMD_RING_RSVD_BITS) |
783 (xhci_trb_virt_to_dma(xhci->cmd_ring->deq_seg, 788 (xhci_trb_virt_to_dma(xhci->cmd_ring->deq_seg,
784 xhci->cmd_ring->dequeue) & 789 xhci->cmd_ring->dequeue) &
@@ -787,7 +792,7 @@ static void xhci_set_cmd_ring_deq(struct xhci_hcd *xhci)
787 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 792 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
788 "// Setting command ring address to 0x%llx", 793 "// Setting command ring address to 0x%llx",
789 (long unsigned long) val_64); 794 (long unsigned long) val_64);
790 xhci_write_64(xhci, val_64, &xhci->op_regs->cmd_ring); 795 writeq(val_64, &xhci->op_regs->cmd_ring);
791} 796}
792 797
793/* 798/*
@@ -866,9 +871,9 @@ int xhci_suspend(struct xhci_hcd *xhci)
866 /* skipped assuming that port suspend has done */ 871 /* skipped assuming that port suspend has done */
867 872
868 /* step 2: clear Run/Stop bit */ 873 /* step 2: clear Run/Stop bit */
869 command = xhci_readl(xhci, &xhci->op_regs->command); 874 command = readl(&xhci->op_regs->command);
870 command &= ~CMD_RUN; 875 command &= ~CMD_RUN;
871 xhci_writel(xhci, command, &xhci->op_regs->command); 876 writel(command, &xhci->op_regs->command);
872 877
873 /* Some chips from Fresco Logic need an extraordinary delay */ 878 /* Some chips from Fresco Logic need an extraordinary delay */
874 delay *= (xhci->quirks & XHCI_SLOW_SUSPEND) ? 10 : 1; 879 delay *= (xhci->quirks & XHCI_SLOW_SUSPEND) ? 10 : 1;
@@ -885,9 +890,9 @@ int xhci_suspend(struct xhci_hcd *xhci)
885 xhci_save_registers(xhci); 890 xhci_save_registers(xhci);
886 891
887 /* step 4: set CSS flag */ 892 /* step 4: set CSS flag */
888 command = xhci_readl(xhci, &xhci->op_regs->command); 893 command = readl(&xhci->op_regs->command);
889 command |= CMD_CSS; 894 command |= CMD_CSS;
890 xhci_writel(xhci, command, &xhci->op_regs->command); 895 writel(command, &xhci->op_regs->command);
891 if (xhci_handshake(xhci, &xhci->op_regs->status, 896 if (xhci_handshake(xhci, &xhci->op_regs->status,
892 STS_SAVE, 0, 10 * 1000)) { 897 STS_SAVE, 0, 10 * 1000)) {
893 xhci_warn(xhci, "WARN: xHC save state timeout\n"); 898 xhci_warn(xhci, "WARN: xHC save state timeout\n");
@@ -951,16 +956,16 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
951 xhci_set_cmd_ring_deq(xhci); 956 xhci_set_cmd_ring_deq(xhci);
952 /* step 3: restore state and start state*/ 957 /* step 3: restore state and start state*/
953 /* step 3: set CRS flag */ 958 /* step 3: set CRS flag */
954 command = xhci_readl(xhci, &xhci->op_regs->command); 959 command = readl(&xhci->op_regs->command);
955 command |= CMD_CRS; 960 command |= CMD_CRS;
956 xhci_writel(xhci, command, &xhci->op_regs->command); 961 writel(command, &xhci->op_regs->command);
957 if (xhci_handshake(xhci, &xhci->op_regs->status, 962 if (xhci_handshake(xhci, &xhci->op_regs->status,
958 STS_RESTORE, 0, 10 * 1000)) { 963 STS_RESTORE, 0, 10 * 1000)) {
959 xhci_warn(xhci, "WARN: xHC restore state timeout\n"); 964 xhci_warn(xhci, "WARN: xHC restore state timeout\n");
960 spin_unlock_irq(&xhci->lock); 965 spin_unlock_irq(&xhci->lock);
961 return -ETIMEDOUT; 966 return -ETIMEDOUT;
962 } 967 }
963 temp = xhci_readl(xhci, &xhci->op_regs->status); 968 temp = readl(&xhci->op_regs->status);
964 } 969 }
965 970
966 /* If restore operation fails, re-initialize the HC during resume */ 971 /* If restore operation fails, re-initialize the HC during resume */
@@ -984,17 +989,16 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
984 xhci_cleanup_msix(xhci); 989 xhci_cleanup_msix(xhci);
985 990
986 xhci_dbg(xhci, "// Disabling event ring interrupts\n"); 991 xhci_dbg(xhci, "// Disabling event ring interrupts\n");
987 temp = xhci_readl(xhci, &xhci->op_regs->status); 992 temp = readl(&xhci->op_regs->status);
988 xhci_writel(xhci, temp & ~STS_EINT, &xhci->op_regs->status); 993 writel(temp & ~STS_EINT, &xhci->op_regs->status);
989 temp = xhci_readl(xhci, &xhci->ir_set->irq_pending); 994 temp = readl(&xhci->ir_set->irq_pending);
990 xhci_writel(xhci, ER_IRQ_DISABLE(temp), 995 writel(ER_IRQ_DISABLE(temp), &xhci->ir_set->irq_pending);
991 &xhci->ir_set->irq_pending);
992 xhci_print_ir_set(xhci, 0); 996 xhci_print_ir_set(xhci, 0);
993 997
994 xhci_dbg(xhci, "cleaning up memory\n"); 998 xhci_dbg(xhci, "cleaning up memory\n");
995 xhci_mem_cleanup(xhci); 999 xhci_mem_cleanup(xhci);
996 xhci_dbg(xhci, "xhci_stop completed - status = %x\n", 1000 xhci_dbg(xhci, "xhci_stop completed - status = %x\n",
997 xhci_readl(xhci, &xhci->op_regs->status)); 1001 readl(&xhci->op_regs->status));
998 1002
999 /* USB core calls the PCI reinit and start functions twice: 1003 /* USB core calls the PCI reinit and start functions twice:
1000 * first with the primary HCD, and then with the secondary HCD. 1004 * first with the primary HCD, and then with the secondary HCD.
@@ -1023,9 +1027,9 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
1023 } 1027 }
1024 1028
1025 /* step 4: set Run/Stop bit */ 1029 /* step 4: set Run/Stop bit */
1026 command = xhci_readl(xhci, &xhci->op_regs->command); 1030 command = readl(&xhci->op_regs->command);
1027 command |= CMD_RUN; 1031 command |= CMD_RUN;
1028 xhci_writel(xhci, command, &xhci->op_regs->command); 1032 writel(command, &xhci->op_regs->command);
1029 xhci_handshake(xhci, &xhci->op_regs->status, STS_HALT, 1033 xhci_handshake(xhci, &xhci->op_regs->status, STS_HALT,
1030 0, 250 * 1000); 1034 0, 250 * 1000);
1031 1035
@@ -1464,7 +1468,7 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
1464 ret = usb_hcd_check_unlink_urb(hcd, urb, status); 1468 ret = usb_hcd_check_unlink_urb(hcd, urb, status);
1465 if (ret || !urb->hcpriv) 1469 if (ret || !urb->hcpriv)
1466 goto done; 1470 goto done;
1467 temp = xhci_readl(xhci, &xhci->op_regs->status); 1471 temp = readl(&xhci->op_regs->status);
1468 if (temp == 0xffffffff || (xhci->xhc_state & XHCI_STATE_HALTED)) { 1472 if (temp == 0xffffffff || (xhci->xhc_state & XHCI_STATE_HALTED)) {
1469 xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb, 1473 xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
1470 "HW died, freeing TD."); 1474 "HW died, freeing TD.");
@@ -1892,8 +1896,8 @@ static u32 xhci_count_num_new_endpoints(struct xhci_hcd *xhci,
1892 * (bit 1). The default control endpoint is added during the Address 1896 * (bit 1). The default control endpoint is added during the Address
1893 * Device command and is never removed until the slot is disabled. 1897 * Device command and is never removed until the slot is disabled.
1894 */ 1898 */
1895 valid_add_flags = ctrl_ctx->add_flags >> 2; 1899 valid_add_flags = le32_to_cpu(ctrl_ctx->add_flags) >> 2;
1896 valid_drop_flags = ctrl_ctx->drop_flags >> 2; 1900 valid_drop_flags = le32_to_cpu(ctrl_ctx->drop_flags) >> 2;
1897 1901
1898 /* Use hweight32 to count the number of ones in the add flags, or 1902 /* Use hweight32 to count the number of ones in the add flags, or
1899 * number of endpoints added. Don't count endpoints that are changed 1903 * number of endpoints added. Don't count endpoints that are changed
@@ -1909,8 +1913,8 @@ static unsigned int xhci_count_num_dropped_endpoints(struct xhci_hcd *xhci,
1909 u32 valid_add_flags; 1913 u32 valid_add_flags;
1910 u32 valid_drop_flags; 1914 u32 valid_drop_flags;
1911 1915
1912 valid_add_flags = ctrl_ctx->add_flags >> 2; 1916 valid_add_flags = le32_to_cpu(ctrl_ctx->add_flags) >> 2;
1913 valid_drop_flags = ctrl_ctx->drop_flags >> 2; 1917 valid_drop_flags = le32_to_cpu(ctrl_ctx->drop_flags) >> 2;
1914 1918
1915 return hweight32(valid_drop_flags) - 1919 return hweight32(valid_drop_flags) -
1916 hweight32(valid_add_flags & valid_drop_flags); 1920 hweight32(valid_add_flags & valid_drop_flags);
@@ -3585,7 +3589,7 @@ void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev)
3585 3589
3586 spin_lock_irqsave(&xhci->lock, flags); 3590 spin_lock_irqsave(&xhci->lock, flags);
3587 /* Don't disable the slot if the host controller is dead. */ 3591 /* Don't disable the slot if the host controller is dead. */
3588 state = xhci_readl(xhci, &xhci->op_regs->status); 3592 state = readl(&xhci->op_regs->status);
3589 if (state == 0xffffffff || (xhci->xhc_state & XHCI_STATE_DYING) || 3593 if (state == 0xffffffff || (xhci->xhc_state & XHCI_STATE_DYING) ||
3590 (xhci->xhc_state & XHCI_STATE_HALTED)) { 3594 (xhci->xhc_state & XHCI_STATE_HALTED)) {
3591 xhci_free_virt_device(xhci, udev->slot_id); 3595 xhci_free_virt_device(xhci, udev->slot_id);
@@ -3712,13 +3716,15 @@ disable_slot:
3712} 3716}
3713 3717
3714/* 3718/*
3715 * Issue an Address Device command (which will issue a SetAddress request to 3719 * Issue an Address Device command and optionally send a corresponding
3716 * the device). 3720 * SetAddress request to the device.
3717 * We should be protected by the usb_address0_mutex in khubd's hub_port_init, so 3721 * We should be protected by the usb_address0_mutex in khubd's hub_port_init, so
3718 * we should only issue and wait on one address command at the same time. 3722 * we should only issue and wait on one address command at the same time.
3719 */ 3723 */
3720int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev) 3724static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,
3725 enum xhci_setup_dev setup)
3721{ 3726{
3727 const char *act = setup == SETUP_CONTEXT_ONLY ? "context" : "address";
3722 unsigned long flags; 3728 unsigned long flags;
3723 int timeleft; 3729 int timeleft;
3724 struct xhci_virt_device *virt_dev; 3730 struct xhci_virt_device *virt_dev;
@@ -3771,12 +3777,12 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)
3771 xhci_dbg(xhci, "Slot ID %d Input Context:\n", udev->slot_id); 3777 xhci_dbg(xhci, "Slot ID %d Input Context:\n", udev->slot_id);
3772 xhci_dbg_ctx(xhci, virt_dev->in_ctx, 2); 3778 xhci_dbg_ctx(xhci, virt_dev->in_ctx, 2);
3773 trace_xhci_address_ctx(xhci, virt_dev->in_ctx, 3779 trace_xhci_address_ctx(xhci, virt_dev->in_ctx,
3774 slot_ctx->dev_info >> 27); 3780 le32_to_cpu(slot_ctx->dev_info) >> 27);
3775 3781
3776 spin_lock_irqsave(&xhci->lock, flags); 3782 spin_lock_irqsave(&xhci->lock, flags);
3777 cmd_trb = xhci_find_next_enqueue(xhci->cmd_ring); 3783 cmd_trb = xhci_find_next_enqueue(xhci->cmd_ring);
3778 ret = xhci_queue_address_device(xhci, virt_dev->in_ctx->dma, 3784 ret = xhci_queue_address_device(xhci, virt_dev->in_ctx->dma,
3779 udev->slot_id); 3785 udev->slot_id, setup);
3780 if (ret) { 3786 if (ret) {
3781 spin_unlock_irqrestore(&xhci->lock, flags); 3787 spin_unlock_irqrestore(&xhci->lock, flags);
3782 xhci_dbg_trace(xhci, trace_xhci_dbg_address, 3788 xhci_dbg_trace(xhci, trace_xhci_dbg_address,
@@ -3794,8 +3800,8 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)
3794 * command on a timeout. 3800 * command on a timeout.
3795 */ 3801 */
3796 if (timeleft <= 0) { 3802 if (timeleft <= 0) {
3797 xhci_warn(xhci, "%s while waiting for address device command\n", 3803 xhci_warn(xhci, "%s while waiting for setup %s command\n",
3798 timeleft == 0 ? "Timeout" : "Signal"); 3804 timeleft == 0 ? "Timeout" : "Signal", act);
3799 /* cancel the address device command */ 3805 /* cancel the address device command */
3800 ret = xhci_cancel_cmd(xhci, NULL, cmd_trb); 3806 ret = xhci_cancel_cmd(xhci, NULL, cmd_trb);
3801 if (ret < 0) 3807 if (ret < 0)
@@ -3806,26 +3812,27 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)
3806 switch (virt_dev->cmd_status) { 3812 switch (virt_dev->cmd_status) {
3807 case COMP_CTX_STATE: 3813 case COMP_CTX_STATE:
3808 case COMP_EBADSLT: 3814 case COMP_EBADSLT:
3809 xhci_err(xhci, "Setup ERROR: address device command for slot %d.\n", 3815 xhci_err(xhci, "Setup ERROR: setup %s command for slot %d.\n",
3810 udev->slot_id); 3816 act, udev->slot_id);
3811 ret = -EINVAL; 3817 ret = -EINVAL;
3812 break; 3818 break;
3813 case COMP_TX_ERR: 3819 case COMP_TX_ERR:
3814 dev_warn(&udev->dev, "Device not responding to set address.\n"); 3820 dev_warn(&udev->dev, "Device not responding to setup %s.\n", act);
3815 ret = -EPROTO; 3821 ret = -EPROTO;
3816 break; 3822 break;
3817 case COMP_DEV_ERR: 3823 case COMP_DEV_ERR:
3818 dev_warn(&udev->dev, "ERROR: Incompatible device for address " 3824 dev_warn(&udev->dev,
3819 "device command.\n"); 3825 "ERROR: Incompatible device for setup %s command\n", act);
3820 ret = -ENODEV; 3826 ret = -ENODEV;
3821 break; 3827 break;
3822 case COMP_SUCCESS: 3828 case COMP_SUCCESS:
3823 xhci_dbg_trace(xhci, trace_xhci_dbg_address, 3829 xhci_dbg_trace(xhci, trace_xhci_dbg_address,
3824 "Successful Address Device command"); 3830 "Successful setup %s command", act);
3825 break; 3831 break;
3826 default: 3832 default:
3827 xhci_err(xhci, "ERROR: unexpected command completion " 3833 xhci_err(xhci,
3828 "code 0x%x.\n", virt_dev->cmd_status); 3834 "ERROR: unexpected setup %s command completion code 0x%x.\n",
3835 act, virt_dev->cmd_status);
3829 xhci_dbg(xhci, "Slot ID %d Output Context:\n", udev->slot_id); 3836 xhci_dbg(xhci, "Slot ID %d Output Context:\n", udev->slot_id);
3830 xhci_dbg_ctx(xhci, virt_dev->out_ctx, 2); 3837 xhci_dbg_ctx(xhci, virt_dev->out_ctx, 2);
3831 trace_xhci_address_ctx(xhci, virt_dev->out_ctx, 1); 3838 trace_xhci_address_ctx(xhci, virt_dev->out_ctx, 1);
@@ -3835,7 +3842,7 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)
3835 if (ret) { 3842 if (ret) {
3836 return ret; 3843 return ret;
3837 } 3844 }
3838 temp_64 = xhci_read_64(xhci, &xhci->op_regs->dcbaa_ptr); 3845 temp_64 = readq(&xhci->op_regs->dcbaa_ptr);
3839 xhci_dbg_trace(xhci, trace_xhci_dbg_address, 3846 xhci_dbg_trace(xhci, trace_xhci_dbg_address,
3840 "Op regs DCBAA ptr = %#016llx", temp_64); 3847 "Op regs DCBAA ptr = %#016llx", temp_64);
3841 xhci_dbg_trace(xhci, trace_xhci_dbg_address, 3848 xhci_dbg_trace(xhci, trace_xhci_dbg_address,
@@ -3850,7 +3857,7 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)
3850 xhci_dbg(xhci, "Slot ID %d Input Context:\n", udev->slot_id); 3857 xhci_dbg(xhci, "Slot ID %d Input Context:\n", udev->slot_id);
3851 xhci_dbg_ctx(xhci, virt_dev->in_ctx, 2); 3858 xhci_dbg_ctx(xhci, virt_dev->in_ctx, 2);
3852 trace_xhci_address_ctx(xhci, virt_dev->in_ctx, 3859 trace_xhci_address_ctx(xhci, virt_dev->in_ctx,
3853 slot_ctx->dev_info >> 27); 3860 le32_to_cpu(slot_ctx->dev_info) >> 27);
3854 xhci_dbg(xhci, "Slot ID %d Output Context:\n", udev->slot_id); 3861 xhci_dbg(xhci, "Slot ID %d Output Context:\n", udev->slot_id);
3855 xhci_dbg_ctx(xhci, virt_dev->out_ctx, 2); 3862 xhci_dbg_ctx(xhci, virt_dev->out_ctx, 2);
3856 /* 3863 /*
@@ -3859,7 +3866,7 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)
3859 */ 3866 */
3860 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->out_ctx); 3867 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->out_ctx);
3861 trace_xhci_address_ctx(xhci, virt_dev->out_ctx, 3868 trace_xhci_address_ctx(xhci, virt_dev->out_ctx,
3862 slot_ctx->dev_info >> 27); 3869 le32_to_cpu(slot_ctx->dev_info) >> 27);
3863 /* Zero the input context control for later use */ 3870 /* Zero the input context control for later use */
3864 ctrl_ctx->add_flags = 0; 3871 ctrl_ctx->add_flags = 0;
3865 ctrl_ctx->drop_flags = 0; 3872 ctrl_ctx->drop_flags = 0;
@@ -3871,6 +3878,16 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)
3871 return 0; 3878 return 0;
3872} 3879}
3873 3880
3881int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)
3882{
3883 return xhci_setup_device(hcd, udev, SETUP_CONTEXT_ADDRESS);
3884}
3885
3886int xhci_enable_device(struct usb_hcd *hcd, struct usb_device *udev)
3887{
3888 return xhci_setup_device(hcd, udev, SETUP_CONTEXT_ONLY);
3889}
3890
3874/* 3891/*
3875 * Transfer the port index into real index in the HW port status 3892 * Transfer the port index into real index in the HW port status
3876 * registers. Caculate offset between the port's PORTSC register 3893 * registers. Caculate offset between the port's PORTSC register
@@ -4042,7 +4059,7 @@ int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd,
4042 port_array = xhci->usb2_ports; 4059 port_array = xhci->usb2_ports;
4043 port_num = udev->portnum - 1; 4060 port_num = udev->portnum - 1;
4044 pm_addr = port_array[port_num] + PORTPMSC; 4061 pm_addr = port_array[port_num] + PORTPMSC;
4045 pm_val = xhci_readl(xhci, pm_addr); 4062 pm_val = readl(pm_addr);
4046 hlpm_addr = port_array[port_num] + PORTHLPMC; 4063 hlpm_addr = port_array[port_num] + PORTHLPMC;
4047 field = le32_to_cpu(udev->bos->ext_cap->bmAttributes); 4064 field = le32_to_cpu(udev->bos->ext_cap->bmAttributes);
4048 4065
@@ -4082,26 +4099,26 @@ int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd,
4082 spin_lock_irqsave(&xhci->lock, flags); 4099 spin_lock_irqsave(&xhci->lock, flags);
4083 4100
4084 hlpm_val = xhci_calculate_usb2_hw_lpm_params(udev); 4101 hlpm_val = xhci_calculate_usb2_hw_lpm_params(udev);
4085 xhci_writel(xhci, hlpm_val, hlpm_addr); 4102 writel(hlpm_val, hlpm_addr);
4086 /* flush write */ 4103 /* flush write */
4087 xhci_readl(xhci, hlpm_addr); 4104 readl(hlpm_addr);
4088 } else { 4105 } else {
4089 hird = xhci_calculate_hird_besl(xhci, udev); 4106 hird = xhci_calculate_hird_besl(xhci, udev);
4090 } 4107 }
4091 4108
4092 pm_val &= ~PORT_HIRD_MASK; 4109 pm_val &= ~PORT_HIRD_MASK;
4093 pm_val |= PORT_HIRD(hird) | PORT_RWE | PORT_L1DS(udev->slot_id); 4110 pm_val |= PORT_HIRD(hird) | PORT_RWE | PORT_L1DS(udev->slot_id);
4094 xhci_writel(xhci, pm_val, pm_addr); 4111 writel(pm_val, pm_addr);
4095 pm_val = xhci_readl(xhci, pm_addr); 4112 pm_val = readl(pm_addr);
4096 pm_val |= PORT_HLE; 4113 pm_val |= PORT_HLE;
4097 xhci_writel(xhci, pm_val, pm_addr); 4114 writel(pm_val, pm_addr);
4098 /* flush write */ 4115 /* flush write */
4099 xhci_readl(xhci, pm_addr); 4116 readl(pm_addr);
4100 } else { 4117 } else {
4101 pm_val &= ~(PORT_HLE | PORT_RWE | PORT_HIRD_MASK | PORT_L1DS_MASK); 4118 pm_val &= ~(PORT_HLE | PORT_RWE | PORT_HIRD_MASK | PORT_L1DS_MASK);
4102 xhci_writel(xhci, pm_val, pm_addr); 4119 writel(pm_val, pm_addr);
4103 /* flush write */ 4120 /* flush write */
4104 xhci_readl(xhci, pm_addr); 4121 readl(pm_addr);
4105 if (udev->usb2_hw_lpm_besl_capable) { 4122 if (udev->usb2_hw_lpm_besl_capable) {
4106 spin_unlock_irqrestore(&xhci->lock, flags); 4123 spin_unlock_irqrestore(&xhci->lock, flags);
4107 mutex_lock(hcd->bandwidth_mutex); 4124 mutex_lock(hcd->bandwidth_mutex);
@@ -4455,7 +4472,7 @@ static u16 xhci_calculate_lpm_timeout(struct usb_hcd *hcd,
4455 if (!config) 4472 if (!config)
4456 return timeout; 4473 return timeout;
4457 4474
4458 for (i = 0; i < USB_MAXINTERFACES; i++) { 4475 for (i = 0; i < config->desc.bNumInterfaces; i++) {
4459 struct usb_driver *driver; 4476 struct usb_driver *driver;
4460 struct usb_interface *intf = config->interface[i]; 4477 struct usb_interface *intf = config->interface[i];
4461 4478
@@ -4704,7 +4721,7 @@ int xhci_get_frame(struct usb_hcd *hcd)
4704{ 4721{
4705 struct xhci_hcd *xhci = hcd_to_xhci(hcd); 4722 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
4706 /* EHCI mods by the periodic size. Why? */ 4723 /* EHCI mods by the periodic size. Why? */
4707 return xhci_readl(xhci, &xhci->run_regs->microframe_index) >> 3; 4724 return readl(&xhci->run_regs->microframe_index) >> 3;
4708} 4725}
4709 4726
4710int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks) 4727int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
@@ -4713,8 +4730,8 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
4713 struct device *dev = hcd->self.controller; 4730 struct device *dev = hcd->self.controller;
4714 int retval; 4731 int retval;
4715 4732
4716 /* Accept arbitrarily long scatter-gather lists */ 4733 /* Limit the block layer scatter-gather lists to half a segment. */
4717 hcd->self.sg_tablesize = ~0; 4734 hcd->self.sg_tablesize = TRBS_PER_SEGMENT / 2;
4718 4735
4719 /* support to build packet from discontinuous buffers */ 4736 /* support to build packet from discontinuous buffers */
4720 hcd->self.no_sg_constraint = 1; 4737 hcd->self.no_sg_constraint = 1;
@@ -4748,18 +4765,20 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
4748 4765
4749 xhci->cap_regs = hcd->regs; 4766 xhci->cap_regs = hcd->regs;
4750 xhci->op_regs = hcd->regs + 4767 xhci->op_regs = hcd->regs +
4751 HC_LENGTH(xhci_readl(xhci, &xhci->cap_regs->hc_capbase)); 4768 HC_LENGTH(readl(&xhci->cap_regs->hc_capbase));
4752 xhci->run_regs = hcd->regs + 4769 xhci->run_regs = hcd->regs +
4753 (xhci_readl(xhci, &xhci->cap_regs->run_regs_off) & RTSOFF_MASK); 4770 (readl(&xhci->cap_regs->run_regs_off) & RTSOFF_MASK);
4754 /* Cache read-only capability registers */ 4771 /* Cache read-only capability registers */
4755 xhci->hcs_params1 = xhci_readl(xhci, &xhci->cap_regs->hcs_params1); 4772 xhci->hcs_params1 = readl(&xhci->cap_regs->hcs_params1);
4756 xhci->hcs_params2 = xhci_readl(xhci, &xhci->cap_regs->hcs_params2); 4773 xhci->hcs_params2 = readl(&xhci->cap_regs->hcs_params2);
4757 xhci->hcs_params3 = xhci_readl(xhci, &xhci->cap_regs->hcs_params3); 4774 xhci->hcs_params3 = readl(&xhci->cap_regs->hcs_params3);
4758 xhci->hcc_params = xhci_readl(xhci, &xhci->cap_regs->hc_capbase); 4775 xhci->hcc_params = readl(&xhci->cap_regs->hc_capbase);
4759 xhci->hci_version = HC_VERSION(xhci->hcc_params); 4776 xhci->hci_version = HC_VERSION(xhci->hcc_params);
4760 xhci->hcc_params = xhci_readl(xhci, &xhci->cap_regs->hcc_params); 4777 xhci->hcc_params = readl(&xhci->cap_regs->hcc_params);
4761 xhci_print_registers(xhci); 4778 xhci_print_registers(xhci);
4762 4779
4780 xhci->quirks = quirks;
4781
4763 get_quirks(dev, xhci); 4782 get_quirks(dev, xhci);
4764 4783
4765 /* In xhci controllers which follow xhci 1.0 spec gives a spurious 4784 /* In xhci controllers which follow xhci 1.0 spec gives a spurious
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 03c74b7965f8..f8416639bf31 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -28,6 +28,17 @@
28#include <linux/kernel.h> 28#include <linux/kernel.h>
29#include <linux/usb/hcd.h> 29#include <linux/usb/hcd.h>
30 30
31/*
32 * Registers should always be accessed with double word or quad word accesses.
33 *
34 * Some xHCI implementations may support 64-bit address pointers. Registers
35 * with 64-bit address pointers should be written to with dword accesses by
36 * writing the low dword first (ptr[0]), then the high dword (ptr[1]) second.
37 * xHCI implementations that do not support 64-bit address pointers will ignore
38 * the high dword, and write order is irrelevant.
39 */
40#include <asm-generic/io-64-nonatomic-lo-hi.h>
41
31/* Code sharing between pci-quirks and xhci hcd */ 42/* Code sharing between pci-quirks and xhci hcd */
32#include "xhci-ext-caps.h" 43#include "xhci-ext-caps.h"
33#include "pci-quirks.h" 44#include "pci-quirks.h"
@@ -752,7 +763,7 @@ struct xhci_stream_ctx {
752}; 763};
753 764
754/* Stream Context Types (section 6.4.1) - bits 3:1 of stream ctx deq ptr */ 765/* Stream Context Types (section 6.4.1) - bits 3:1 of stream ctx deq ptr */
755#define SCT_FOR_CTX(p) (((p) << 1) & 0x7) 766#define SCT_FOR_CTX(p) (((p) & 0x7) << 1)
756/* Secondary stream array type, dequeue pointer is to a transfer ring */ 767/* Secondary stream array type, dequeue pointer is to a transfer ring */
757#define SCT_SEC_TR 0 768#define SCT_SEC_TR 0
758/* Primary stream array type, dequeue pointer is to a transfer ring */ 769/* Primary stream array type, dequeue pointer is to a transfer ring */
@@ -1097,6 +1108,14 @@ struct xhci_event_cmd {
1097}; 1108};
1098 1109
1099/* flags bitmasks */ 1110/* flags bitmasks */
1111
1112/* Address device - disable SetAddress */
1113#define TRB_BSR (1<<9)
1114enum xhci_setup_dev {
1115 SETUP_CONTEXT_ONLY,
1116 SETUP_CONTEXT_ADDRESS,
1117};
1118
1100/* bits 16:23 are the virtual function ID */ 1119/* bits 16:23 are the virtual function ID */
1101/* bits 24:31 are the slot ID */ 1120/* bits 24:31 are the slot ID */
1102#define TRB_TO_SLOT_ID(p) (((p) & (0xff<<24)) >> 24) 1121#define TRB_TO_SLOT_ID(p) (((p) & (0xff<<24)) >> 24)
@@ -1260,7 +1279,7 @@ union xhci_trb {
1260 * since the command ring is 64-byte aligned. 1279 * since the command ring is 64-byte aligned.
1261 * It must also be greater than 16. 1280 * It must also be greater than 16.
1262 */ 1281 */
1263#define TRBS_PER_SEGMENT 64 1282#define TRBS_PER_SEGMENT 256
1264/* Allow two commands + a link TRB, along with any reserved command TRBs */ 1283/* Allow two commands + a link TRB, along with any reserved command TRBs */
1265#define MAX_RSVD_CMD_TRBS (TRBS_PER_SEGMENT - 3) 1284#define MAX_RSVD_CMD_TRBS (TRBS_PER_SEGMENT - 3)
1266#define TRB_SEGMENT_SIZE (TRBS_PER_SEGMENT*16) 1285#define TRB_SEGMENT_SIZE (TRBS_PER_SEGMENT*16)
@@ -1595,47 +1614,6 @@ static inline struct usb_hcd *xhci_to_hcd(struct xhci_hcd *xhci)
1595#define xhci_warn_ratelimited(xhci, fmt, args...) \ 1614#define xhci_warn_ratelimited(xhci, fmt, args...) \
1596 dev_warn_ratelimited(xhci_to_hcd(xhci)->self.controller , fmt , ## args) 1615 dev_warn_ratelimited(xhci_to_hcd(xhci)->self.controller , fmt , ## args)
1597 1616
1598/* TODO: copied from ehci.h - can be refactored? */
1599/* xHCI spec says all registers are little endian */
1600static inline unsigned int xhci_readl(const struct xhci_hcd *xhci,
1601 __le32 __iomem *regs)
1602{
1603 return readl(regs);
1604}
1605static inline void xhci_writel(struct xhci_hcd *xhci,
1606 const unsigned int val, __le32 __iomem *regs)
1607{
1608 writel(val, regs);
1609}
1610
1611/*
1612 * Registers should always be accessed with double word or quad word accesses.
1613 *
1614 * Some xHCI implementations may support 64-bit address pointers. Registers
1615 * with 64-bit address pointers should be written to with dword accesses by
1616 * writing the low dword first (ptr[0]), then the high dword (ptr[1]) second.
1617 * xHCI implementations that do not support 64-bit address pointers will ignore
1618 * the high dword, and write order is irrelevant.
1619 */
1620static inline u64 xhci_read_64(const struct xhci_hcd *xhci,
1621 __le64 __iomem *regs)
1622{
1623 __u32 __iomem *ptr = (__u32 __iomem *) regs;
1624 u64 val_lo = readl(ptr);
1625 u64 val_hi = readl(ptr + 1);
1626 return val_lo + (val_hi << 32);
1627}
1628static inline void xhci_write_64(struct xhci_hcd *xhci,
1629 const u64 val, __le64 __iomem *regs)
1630{
1631 __u32 __iomem *ptr = (__u32 __iomem *) regs;
1632 u32 val_lo = lower_32_bits(val);
1633 u32 val_hi = upper_32_bits(val);
1634
1635 writel(val_lo, ptr);
1636 writel(val_hi, ptr + 1);
1637}
1638
1639static inline int xhci_link_trb_quirk(struct xhci_hcd *xhci) 1617static inline int xhci_link_trb_quirk(struct xhci_hcd *xhci)
1640{ 1618{
1641 return xhci->quirks & XHCI_LINK_TRB_QUIRK; 1619 return xhci->quirks & XHCI_LINK_TRB_QUIRK;
@@ -1790,6 +1768,7 @@ int xhci_free_streams(struct usb_hcd *hcd, struct usb_device *udev,
1790 struct usb_host_endpoint **eps, unsigned int num_eps, 1768 struct usb_host_endpoint **eps, unsigned int num_eps,
1791 gfp_t mem_flags); 1769 gfp_t mem_flags);
1792int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev); 1770int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev);
1771int xhci_enable_device(struct usb_hcd *hcd, struct usb_device *udev);
1793int xhci_update_device(struct usb_hcd *hcd, struct usb_device *udev); 1772int xhci_update_device(struct usb_hcd *hcd, struct usb_device *udev);
1794int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd, 1773int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd,
1795 struct usb_device *udev, int enable); 1774 struct usb_device *udev, int enable);
@@ -1813,7 +1792,7 @@ int xhci_is_vendor_info_code(struct xhci_hcd *xhci, unsigned int trb_comp_code);
1813void xhci_ring_cmd_db(struct xhci_hcd *xhci); 1792void xhci_ring_cmd_db(struct xhci_hcd *xhci);
1814int xhci_queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id); 1793int xhci_queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id);
1815int xhci_queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, 1794int xhci_queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr,
1816 u32 slot_id); 1795 u32 slot_id, enum xhci_setup_dev);
1817int xhci_queue_vendor_command(struct xhci_hcd *xhci, 1796int xhci_queue_vendor_command(struct xhci_hcd *xhci,
1818 u32 field1, u32 field2, u32 field3, u32 field4); 1797 u32 field1, u32 field2, u32 field3, u32 field4);
1819int xhci_queue_stop_endpoint(struct xhci_hcd *xhci, int slot_id, 1798int xhci_queue_stop_endpoint(struct xhci_hcd *xhci, int slot_id,
diff --git a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c
index 7121b50098d3..a62865af53cc 100644
--- a/drivers/usb/image/mdc800.c
+++ b/drivers/usb/image/mdc800.c
@@ -51,7 +51,7 @@
51 * 51 *
52 * version 0.7.3 52 * version 0.7.3
53 * bugfix : The mdc800->state field gets set to READY after the 53 * bugfix : The mdc800->state field gets set to READY after the
54 * the diconnect function sets it to NOT_CONNECTED. This makes the 54 * the disconnect function sets it to NOT_CONNECTED. This makes the
55 * driver running like the camera is connected and causes some 55 * driver running like the camera is connected and causes some
56 * hang ups. 56 * hang ups.
57 * 57 *
diff --git a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c
index 9c0f8caba3be..37b44b04a701 100644
--- a/drivers/usb/image/microtek.c
+++ b/drivers/usb/image/microtek.c
@@ -125,7 +125,6 @@
125#include <linux/errno.h> 125#include <linux/errno.h>
126#include <linux/random.h> 126#include <linux/random.h>
127#include <linux/poll.h> 127#include <linux/poll.h>
128#include <linux/init.h>
129#include <linux/slab.h> 128#include <linux/slab.h>
130#include <linux/spinlock.h> 129#include <linux/spinlock.h>
131#include <linux/usb.h> 130#include <linux/usb.h>
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c
index 3eaa83f05086..493c7f268b6f 100644
--- a/drivers/usb/misc/adutux.c
+++ b/drivers/usb/misc/adutux.c
@@ -22,7 +22,6 @@
22 22
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24#include <linux/errno.h> 24#include <linux/errno.h>
25#include <linux/init.h>
26#include <linux/slab.h> 25#include <linux/slab.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/usb.h> 27#include <linux/usb.h>
diff --git a/drivers/usb/misc/cypress_cy7c63.c b/drivers/usb/misc/cypress_cy7c63.c
index 3f7c1a92579f..402b94dd2531 100644
--- a/drivers/usb/misc/cypress_cy7c63.c
+++ b/drivers/usb/misc/cypress_cy7c63.c
@@ -29,7 +29,6 @@
29* published by the Free Software Foundation, version 2. 29* published by the Free Software Foundation, version 2.
30*/ 30*/
31 31
32#include <linux/init.h>
33#include <linux/module.h> 32#include <linux/module.h>
34#include <linux/kernel.h> 33#include <linux/kernel.h>
35#include <linux/slab.h> 34#include <linux/slab.h>
diff --git a/drivers/usb/misc/cytherm.c b/drivers/usb/misc/cytherm.c
index 5b9831b95d97..9bab1a33bc16 100644
--- a/drivers/usb/misc/cytherm.c
+++ b/drivers/usb/misc/cytherm.c
@@ -16,7 +16,6 @@
16 16
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/errno.h> 18#include <linux/errno.h>
19#include <linux/init.h>
20#include <linux/slab.h> 19#include <linux/slab.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/usb.h> 21#include <linux/usb.h>
diff --git a/drivers/usb/misc/emi26.c b/drivers/usb/misc/emi26.c
index d65984dee751..8950fa5e973d 100644
--- a/drivers/usb/misc/emi26.c
+++ b/drivers/usb/misc/emi26.c
@@ -13,7 +13,6 @@
13#include <linux/errno.h> 13#include <linux/errno.h>
14#include <linux/slab.h> 14#include <linux/slab.h>
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/init.h>
17#include <linux/usb.h> 16#include <linux/usb.h>
18#include <linux/delay.h> 17#include <linux/delay.h>
19#include <linux/firmware.h> 18#include <linux/firmware.h>
diff --git a/drivers/usb/misc/emi62.c b/drivers/usb/misc/emi62.c
index ae794b90766b..1d9be4431b72 100644
--- a/drivers/usb/misc/emi62.c
+++ b/drivers/usb/misc/emi62.c
@@ -10,7 +10,6 @@
10#include <linux/kernel.h> 10#include <linux/kernel.h>
11#include <linux/errno.h> 11#include <linux/errno.h>
12#include <linux/slab.h> 12#include <linux/slab.h>
13#include <linux/init.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/usb.h> 14#include <linux/usb.h>
16#include <linux/delay.h> 15#include <linux/delay.h>
diff --git a/drivers/usb/misc/ezusb.c b/drivers/usb/misc/ezusb.c
index e712afed947c..947811bc8126 100644
--- a/drivers/usb/misc/ezusb.c
+++ b/drivers/usb/misc/ezusb.c
@@ -9,7 +9,6 @@
9 */ 9 */
10 10
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/slab.h> 12#include <linux/slab.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/usb.h> 14#include <linux/usb.h>
diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c
index ce978384fda1..4e38683c653c 100644
--- a/drivers/usb/misc/idmouse.c
+++ b/drivers/usb/misc/idmouse.c
@@ -19,7 +19,6 @@
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/errno.h> 20#include <linux/errno.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/init.h>
23#include <linux/slab.h> 22#include <linux/slab.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <linux/completion.h> 24#include <linux/completion.h>
@@ -386,7 +385,7 @@ static int idmouse_probe(struct usb_interface *interface,
386 result = usb_register_dev(interface, &idmouse_class); 385 result = usb_register_dev(interface, &idmouse_class);
387 if (result) { 386 if (result) {
388 /* something prevented us from registering this device */ 387 /* something prevented us from registering this device */
389 dev_err(&interface->dev, "Unble to allocate minor number.\n"); 388 dev_err(&interface->dev, "Unable to allocate minor number.\n");
390 usb_set_intfdata(interface, NULL); 389 usb_set_intfdata(interface, NULL);
391 idmouse_delete(dev); 390 idmouse_delete(dev);
392 return result; 391 return result;
diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c
index d36f34e25bed..20bcfdd7eace 100644
--- a/drivers/usb/misc/iowarrior.c
+++ b/drivers/usb/misc/iowarrior.c
@@ -15,7 +15,6 @@
15 15
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/usb.h> 17#include <linux/usb.h>
18#include <linux/init.h>
19#include <linux/slab.h> 18#include <linux/slab.h>
20#include <linux/sched.h> 19#include <linux/sched.h>
21#include <linux/mutex.h> 20#include <linux/mutex.h>
@@ -300,7 +299,7 @@ static ssize_t iowarrior_read(struct file *file, char __user *buffer,
300 do { 299 do {
301 atomic_set(&dev->overflow_flag, 0); 300 atomic_set(&dev->overflow_flag, 0);
302 if ((read_idx = read_index(dev)) == -1) { 301 if ((read_idx = read_index(dev)) == -1) {
303 /* queue emty */ 302 /* queue empty */
304 if (file->f_flags & O_NONBLOCK) 303 if (file->f_flags & O_NONBLOCK)
305 return -EAGAIN; 304 return -EAGAIN;
306 else { 305 else {
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c
index b1d59532ac22..82503a7ff6c8 100644
--- a/drivers/usb/misc/ldusb.c
+++ b/drivers/usb/misc/ldusb.c
@@ -24,7 +24,6 @@
24 24
25#include <linux/kernel.h> 25#include <linux/kernel.h>
26#include <linux/errno.h> 26#include <linux/errno.h>
27#include <linux/init.h>
28#include <linux/slab.h> 27#include <linux/slab.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/mutex.h> 29#include <linux/mutex.h>
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c
index eb37c9542052..97cd9e24bd25 100644
--- a/drivers/usb/misc/legousbtower.c
+++ b/drivers/usb/misc/legousbtower.c
@@ -79,7 +79,6 @@
79 79
80#include <linux/kernel.h> 80#include <linux/kernel.h>
81#include <linux/errno.h> 81#include <linux/errno.h>
82#include <linux/init.h>
83#include <linux/slab.h> 82#include <linux/slab.h>
84#include <linux/module.h> 83#include <linux/module.h>
85#include <linux/completion.h> 84#include <linux/completion.h>
diff --git a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c
index b9b356a9dd11..13731d512624 100644
--- a/drivers/usb/misc/rio500.c
+++ b/drivers/usb/misc/rio500.c
@@ -36,7 +36,6 @@
36#include <linux/errno.h> 36#include <linux/errno.h>
37#include <linux/random.h> 37#include <linux/random.h>
38#include <linux/poll.h> 38#include <linux/poll.h>
39#include <linux/init.h>
40#include <linux/slab.h> 39#include <linux/slab.h>
41#include <linux/spinlock.h> 40#include <linux/spinlock.h>
42#include <linux/usb.h> 41#include <linux/usb.h>
diff --git a/drivers/usb/misc/sisusbvga/sisusb_init.c b/drivers/usb/misc/sisusbvga/sisusb_init.c
index cb8a3d91f970..bf0032ca35ed 100644
--- a/drivers/usb/misc/sisusbvga/sisusb_init.c
+++ b/drivers/usb/misc/sisusbvga/sisusb_init.c
@@ -40,7 +40,6 @@
40#include <linux/kernel.h> 40#include <linux/kernel.h>
41#include <linux/errno.h> 41#include <linux/errno.h>
42#include <linux/poll.h> 42#include <linux/poll.h>
43#include <linux/init.h>
44#include <linux/spinlock.h> 43#include <linux/spinlock.h>
45 44
46#include "sisusb.h" 45#include "sisusb.h"
diff --git a/drivers/usb/misc/trancevibrator.c b/drivers/usb/misc/trancevibrator.c
index 741efed4a236..4145314a515b 100644
--- a/drivers/usb/misc/trancevibrator.c
+++ b/drivers/usb/misc/trancevibrator.c
@@ -21,7 +21,6 @@
21/* Standard include files */ 21/* Standard include files */
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/errno.h> 23#include <linux/errno.h>
24#include <linux/init.h>
25#include <linux/slab.h> 24#include <linux/slab.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/usb.h> 26#include <linux/usb.h>
diff --git a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c
index 89927bcff974..1184390508e9 100644
--- a/drivers/usb/misc/usblcd.c
+++ b/drivers/usb/misc/usblcd.c
@@ -14,7 +14,6 @@
14 *****************************************************************************/ 14 *****************************************************************************/
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/init.h>
18#include <linux/slab.h> 17#include <linux/slab.h>
19#include <linux/errno.h> 18#include <linux/errno.h>
20#include <linux/mutex.h> 19#include <linux/mutex.h>
diff --git a/drivers/usb/misc/usbled.c b/drivers/usb/misc/usbled.c
index 12d03e7ad636..78eb4ff33269 100644
--- a/drivers/usb/misc/usbled.c
+++ b/drivers/usb/misc/usbled.c
@@ -11,7 +11,6 @@
11 11
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/errno.h> 13#include <linux/errno.h>
14#include <linux/init.h>
15#include <linux/slab.h> 14#include <linux/slab.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/usb.h> 16#include <linux/usb.h>
diff --git a/drivers/usb/misc/usbsevseg.c b/drivers/usb/misc/usbsevseg.c
index b2d82b937392..1fe6b73c22f3 100644
--- a/drivers/usb/misc/usbsevseg.c
+++ b/drivers/usb/misc/usbsevseg.c
@@ -12,7 +12,6 @@
12 12
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/errno.h> 14#include <linux/errno.h>
15#include <linux/init.h>
16#include <linux/slab.h> 15#include <linux/slab.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/string.h> 17#include <linux/string.h>
@@ -57,7 +56,7 @@ struct usb_sevsegdev {
57 * if str commands are used, we would assume the end of string 56 * if str commands are used, we would assume the end of string
58 * so mem commands are used. 57 * so mem commands are used.
59 */ 58 */
60inline size_t my_memlen(const char *buf, size_t count) 59static inline size_t my_memlen(const char *buf, size_t count)
61{ 60{
62 if (count > 0 && buf[count-1] == '\n') 61 if (count > 0 && buf[count-1] == '\n')
63 return count - 1; 62 return count - 1;
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index b4152820d655..f6568b5e9b06 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -10,6 +10,7 @@
10 10
11#include <linux/usb.h> 11#include <linux/usb.h>
12 12
13#define SIMPLE_IO_TIMEOUT 10000 /* in milliseconds */
13 14
14/*-------------------------------------------------------------------------*/ 15/*-------------------------------------------------------------------------*/
15 16
@@ -366,6 +367,7 @@ static int simple_io(
366 int max = urb->transfer_buffer_length; 367 int max = urb->transfer_buffer_length;
367 struct completion completion; 368 struct completion completion;
368 int retval = 0; 369 int retval = 0;
370 unsigned long expire;
369 371
370 urb->context = &completion; 372 urb->context = &completion;
371 while (retval == 0 && iterations-- > 0) { 373 while (retval == 0 && iterations-- > 0) {
@@ -378,9 +380,15 @@ static int simple_io(
378 if (retval != 0) 380 if (retval != 0)
379 break; 381 break;
380 382
381 /* NOTE: no timeouts; can't be broken out of by interrupt */ 383 expire = msecs_to_jiffies(SIMPLE_IO_TIMEOUT);
382 wait_for_completion(&completion); 384 if (!wait_for_completion_timeout(&completion, expire)) {
383 retval = urb->status; 385 usb_kill_urb(urb);
386 retval = (urb->status == -ENOENT ?
387 -ETIMEDOUT : urb->status);
388 } else {
389 retval = urb->status;
390 }
391
384 urb->dev = udev; 392 urb->dev = udev;
385 if (retval == 0 && usb_pipein(urb->pipe)) 393 if (retval == 0 && usb_pipein(urb->pipe))
386 retval = simple_check_buf(tdev, urb); 394 retval = simple_check_buf(tdev, urb);
@@ -619,8 +627,8 @@ static int is_good_ext(struct usbtest_dev *tdev, u8 *buf)
619 } 627 }
620 628
621 attr = le32_to_cpu(ext->bmAttributes); 629 attr = le32_to_cpu(ext->bmAttributes);
622 /* bits[1:4] is used and others are reserved */ 630 /* bits[1:15] is used and others are reserved */
623 if (attr & ~0x1e) { /* reserved == 0 */ 631 if (attr & ~0xfffe) { /* reserved == 0 */
624 ERROR(tdev, "reserved bits set\n"); 632 ERROR(tdev, "reserved bits set\n");
625 return 0; 633 return 0;
626 } 634 }
@@ -763,7 +771,7 @@ static int ch9_postconfig(struct usbtest_dev *dev)
763 * there's always [9.4.3] a bos device descriptor [9.6.2] in USB 771 * there's always [9.4.3] a bos device descriptor [9.6.2] in USB
764 * 3.0 spec 772 * 3.0 spec
765 */ 773 */
766 if (le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0300) { 774 if (le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0210) {
767 struct usb_bos_descriptor *bos = NULL; 775 struct usb_bos_descriptor *bos = NULL;
768 struct usb_dev_cap_header *header = NULL; 776 struct usb_dev_cap_header *header = NULL;
769 unsigned total, num, length; 777 unsigned total, num, length;
@@ -944,7 +952,7 @@ struct ctrl_ctx {
944 int last; 952 int last;
945}; 953};
946 954
947#define NUM_SUBCASES 15 /* how many test subcases here? */ 955#define NUM_SUBCASES 16 /* how many test subcases here? */
948 956
949struct subcase { 957struct subcase {
950 struct usb_ctrlrequest setup; 958 struct usb_ctrlrequest setup;
@@ -1218,6 +1226,15 @@ test_ctrl_queue(struct usbtest_dev *dev, struct usbtest_param *param)
1218 } 1226 }
1219 expected = -EREMOTEIO; 1227 expected = -EREMOTEIO;
1220 break; 1228 break;
1229 case 15:
1230 req.wValue = cpu_to_le16(USB_DT_BOS << 8);
1231 if (udev->bos)
1232 len = le16_to_cpu(udev->bos->desc->wTotalLength);
1233 else
1234 len = sizeof(struct usb_bos_descriptor);
1235 if (le16_to_cpu(udev->descriptor.bcdUSB) < 0x0201)
1236 expected = -EPIPE;
1237 break;
1221 default: 1238 default:
1222 ERROR(dev, "bogus number of ctrl queue testcases!\n"); 1239 ERROR(dev, "bogus number of ctrl queue testcases!\n");
1223 context.status = -EINVAL; 1240 context.status = -EINVAL;
@@ -1537,8 +1554,17 @@ static int test_halt(struct usbtest_dev *tdev, int ep, struct urb *urb)
1537 return retval; 1554 return retval;
1538 } 1555 }
1539 retval = verify_halted(tdev, ep, urb); 1556 retval = verify_halted(tdev, ep, urb);
1540 if (retval < 0) 1557 if (retval < 0) {
1558 int ret;
1559
1560 /* clear halt anyways, else further tests will fail */
1561 ret = usb_clear_halt(urb->dev, urb->pipe);
1562 if (ret)
1563 ERROR(tdev, "ep %02x couldn't clear halt, %d\n",
1564 ep, ret);
1565
1541 return retval; 1566 return retval;
1567 }
1542 1568
1543 /* clear halt (tests API + protocol), verify it worked */ 1569 /* clear halt (tests API + protocol), verify it worked */
1544 retval = usb_clear_halt(urb->dev, urb->pipe); 1570 retval = usb_clear_halt(urb->dev, urb->pipe);
diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c
index b6ab515bfc6c..24278208bf74 100644
--- a/drivers/usb/misc/yurex.c
+++ b/drivers/usb/misc/yurex.c
@@ -11,7 +11,6 @@
11 11
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/errno.h> 13#include <linux/errno.h>
14#include <linux/init.h>
15#include <linux/slab.h> 14#include <linux/slab.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/kref.h> 16#include <linux/kref.h>
@@ -464,7 +463,7 @@ static ssize_t yurex_write(struct file *file, const char *user_buffer, size_t co
464 goto error; 463 goto error;
465 464
466 mutex_lock(&dev->io_mutex); 465 mutex_lock(&dev->io_mutex);
467 if (!dev->interface) { /* alreaday disconnected */ 466 if (!dev->interface) { /* already disconnected */
468 mutex_unlock(&dev->io_mutex); 467 mutex_unlock(&dev->io_mutex);
469 retval = -ENODEV; 468 retval = -ENODEV;
470 goto error; 469 goto error;
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index 57dfc0cedb00..688dc8bb192d 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -6,7 +6,7 @@
6# (M)HDRC = (Multipoint) Highspeed Dual-Role Controller 6# (M)HDRC = (Multipoint) Highspeed Dual-Role Controller
7config USB_MUSB_HDRC 7config USB_MUSB_HDRC
8 tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)' 8 tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
9 depends on USB_GADGET 9 depends on (USB || USB_GADGET)
10 help 10 help
11 Say Y here if your system has a dual role high speed USB 11 Say Y here if your system has a dual role high speed USB
12 controller based on the Mentor Graphics silicon IP. Then 12 controller based on the Mentor Graphics silicon IP. Then
@@ -35,21 +35,21 @@ choice
35 35
36config USB_MUSB_HOST 36config USB_MUSB_HOST
37 bool "Host only mode" 37 bool "Host only mode"
38 depends on USB 38 depends on USB=y || USB=USB_MUSB_HDRC
39 help 39 help
40 Select this when you want to use MUSB in host mode only, 40 Select this when you want to use MUSB in host mode only,
41 thereby the gadget feature will be regressed. 41 thereby the gadget feature will be regressed.
42 42
43config USB_MUSB_GADGET 43config USB_MUSB_GADGET
44 bool "Gadget only mode" 44 bool "Gadget only mode"
45 depends on USB_GADGET 45 depends on USB_GADGET=y || USB_GADGET=USB_MUSB_HDRC
46 help 46 help
47 Select this when you want to use MUSB in gadget mode only, 47 Select this when you want to use MUSB in gadget mode only,
48 thereby the host feature will be regressed. 48 thereby the host feature will be regressed.
49 49
50config USB_MUSB_DUAL_ROLE 50config USB_MUSB_DUAL_ROLE
51 bool "Dual Role mode" 51 bool "Dual Role mode"
52 depends on (USB && USB_GADGET) 52 depends on ((USB=y || USB=USB_MUSB_HDRC) && (USB_GADGET=y || USB_GADGET=USB_MUSB_HDRC))
53 help 53 help
54 This is the default mode of working of MUSB controller where 54 This is the default mode of working of MUSB controller where
55 both host and gadget features are enabled. 55 both host and gadget features are enabled.
@@ -93,6 +93,12 @@ config USB_MUSB_BLACKFIN
93config USB_MUSB_UX500 93config USB_MUSB_UX500
94 tristate "Ux500 platforms" 94 tristate "Ux500 platforms"
95 95
96config USB_MUSB_JZ4740
97 tristate "JZ4740"
98 depends on MACH_JZ4740 || COMPILE_TEST
99 depends on USB_MUSB_GADGET
100 depends on USB_OTG_BLACKLIST_HUB
101
96endchoice 102endchoice
97 103
98config USB_MUSB_AM335X_CHILD 104config USB_MUSB_AM335X_CHILD
@@ -100,7 +106,7 @@ config USB_MUSB_AM335X_CHILD
100 106
101choice 107choice
102 prompt 'MUSB DMA mode' 108 prompt 'MUSB DMA mode'
103 default MUSB_PIO_ONLY if ARCH_MULTIPLATFORM 109 default MUSB_PIO_ONLY if ARCH_MULTIPLATFORM || USB_MUSB_JZ4740
104 default USB_UX500_DMA if USB_MUSB_UX500 110 default USB_UX500_DMA if USB_MUSB_UX500
105 default USB_INVENTRA_DMA if USB_MUSB_OMAP2PLUS || USB_MUSB_BLACKFIN 111 default USB_INVENTRA_DMA if USB_MUSB_OMAP2PLUS || USB_MUSB_BLACKFIN
106 default USB_TI_CPPI_DMA if USB_MUSB_DAVINCI 112 default USB_TI_CPPI_DMA if USB_MUSB_DAVINCI
diff --git a/drivers/usb/musb/Makefile b/drivers/usb/musb/Makefile
index c5ea5c6dc169..ba495018b416 100644
--- a/drivers/usb/musb/Makefile
+++ b/drivers/usb/musb/Makefile
@@ -19,6 +19,7 @@ obj-$(CONFIG_USB_MUSB_DAVINCI) += davinci.o
19obj-$(CONFIG_USB_MUSB_DA8XX) += da8xx.o 19obj-$(CONFIG_USB_MUSB_DA8XX) += da8xx.o
20obj-$(CONFIG_USB_MUSB_BLACKFIN) += blackfin.o 20obj-$(CONFIG_USB_MUSB_BLACKFIN) += blackfin.o
21obj-$(CONFIG_USB_MUSB_UX500) += ux500.o 21obj-$(CONFIG_USB_MUSB_UX500) += ux500.o
22obj-$(CONFIG_USB_MUSB_JZ4740) += jz4740.o
22 23
23 24
24obj-$(CONFIG_USB_MUSB_AM335X_CHILD) += musb_am335x.o 25obj-$(CONFIG_USB_MUSB_AM335X_CHILD) += musb_am335x.o
diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c
index ca45b39db5b9..b3aa0184af9a 100644
--- a/drivers/usb/musb/am35x.c
+++ b/drivers/usb/musb/am35x.c
@@ -26,7 +26,6 @@
26 * 26 *
27 */ 27 */
28 28
29#include <linux/init.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/clk.h> 30#include <linux/clk.h>
32#include <linux/err.h> 31#include <linux/err.h>
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
index d9692f78e227..796677fa9a15 100644
--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
@@ -11,7 +11,6 @@
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/sched.h> 13#include <linux/sched.h>
14#include <linux/init.h>
15#include <linux/list.h> 14#include <linux/list.h>
16#include <linux/gpio.h> 15#include <linux/gpio.h>
17#include <linux/io.h> 16#include <linux/io.h>
@@ -77,7 +76,7 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *src)
77 bfin_write16(USB_DMA_REG(epnum, USB_DMAx_CTRL), dma_reg); 76 bfin_write16(USB_DMA_REG(epnum, USB_DMAx_CTRL), dma_reg);
78 SSYNC(); 77 SSYNC();
79 78
80 /* Wait for compelete */ 79 /* Wait for complete */
81 while (!(bfin_read_USB_DMA_INTERRUPT() & (1 << epnum))) 80 while (!(bfin_read_USB_DMA_INTERRUPT() & (1 << epnum)))
82 cpu_relax(); 81 cpu_relax();
83 82
@@ -131,7 +130,7 @@ void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
131 bfin_write16(USB_DMA_REG(epnum, USB_DMAx_CTRL), dma_reg); 130 bfin_write16(USB_DMA_REG(epnum, USB_DMAx_CTRL), dma_reg);
132 SSYNC(); 131 SSYNC();
133 132
134 /* Wait for compelete */ 133 /* Wait for complete */
135 while (!(bfin_read_USB_DMA_INTERRUPT() & (1 << epnum))) 134 while (!(bfin_read_USB_DMA_INTERRUPT() & (1 << epnum)))
136 cpu_relax(); 135 cpu_relax();
137 136
diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c
index 2f2c1cb36421..e3486de71995 100644
--- a/drivers/usb/musb/da8xx.c
+++ b/drivers/usb/musb/da8xx.c
@@ -26,7 +26,6 @@
26 * 26 *
27 */ 27 */
28 28
29#include <linux/init.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/clk.h> 30#include <linux/clk.h>
32#include <linux/err.h> 31#include <linux/err.h>
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
index 1121fd741bf8..c259dac9d056 100644
--- a/drivers/usb/musb/davinci.c
+++ b/drivers/usb/musb/davinci.c
@@ -24,7 +24,6 @@
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/kernel.h> 25#include <linux/kernel.h>
26#include <linux/sched.h> 26#include <linux/sched.h>
27#include <linux/init.h>
28#include <linux/list.h> 27#include <linux/list.h>
29#include <linux/delay.h> 28#include <linux/delay.h>
30#include <linux/clk.h> 29#include <linux/clk.h>
diff --git a/drivers/usb/musb/jz4740.c b/drivers/usb/musb/jz4740.c
new file mode 100644
index 000000000000..5f30537f1927
--- /dev/null
+++ b/drivers/usb/musb/jz4740.c
@@ -0,0 +1,201 @@
1/*
2 * Ingenic JZ4740 "glue layer"
3 *
4 * Copyright (C) 2013, Apelete Seketeli <apelete@seketeli.net>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * You should have received a copy of the GNU General Public License along
12 * with this program; if not, write to the Free Software Foundation, Inc.,
13 * 675 Mass Ave, Cambridge, MA 02139, USA.
14 */
15
16#include <linux/clk.h>
17#include <linux/dma-mapping.h>
18#include <linux/errno.h>
19#include <linux/kernel.h>
20#include <linux/module.h>
21#include <linux/platform_device.h>
22
23#include "musb_core.h"
24
25struct jz4740_glue {
26 struct device *dev;
27 struct platform_device *musb;
28 struct clk *clk;
29};
30
31static irqreturn_t jz4740_musb_interrupt(int irq, void *__hci)
32{
33 unsigned long flags;
34 irqreturn_t retval = IRQ_NONE;
35 struct musb *musb = __hci;
36
37 spin_lock_irqsave(&musb->lock, flags);
38
39 musb->int_usb = musb_readb(musb->mregs, MUSB_INTRUSB);
40 musb->int_tx = musb_readw(musb->mregs, MUSB_INTRTX);
41 musb->int_rx = musb_readw(musb->mregs, MUSB_INTRRX);
42
43 /*
44 * The controller is gadget only, the state of the host mode IRQ bits is
45 * undefined. Mask them to make sure that the musb driver core will
46 * never see them set
47 */
48 musb->int_usb &= MUSB_INTR_SUSPEND | MUSB_INTR_RESUME |
49 MUSB_INTR_RESET | MUSB_INTR_SOF;
50
51 if (musb->int_usb || musb->int_tx || musb->int_rx)
52 retval = musb_interrupt(musb);
53
54 spin_unlock_irqrestore(&musb->lock, flags);
55
56 return retval;
57}
58
59static struct musb_fifo_cfg jz4740_musb_fifo_cfg[] = {
60{ .hw_ep_num = 1, .style = FIFO_TX, .maxpacket = 512, },
61{ .hw_ep_num = 1, .style = FIFO_RX, .maxpacket = 512, },
62{ .hw_ep_num = 2, .style = FIFO_TX, .maxpacket = 64, },
63};
64
65static struct musb_hdrc_config jz4740_musb_config = {
66 /* Silicon does not implement USB OTG. */
67 .multipoint = 0,
68 /* Max EPs scanned, driver will decide which EP can be used. */
69 .num_eps = 4,
70 /* RAMbits needed to configure EPs from table */
71 .ram_bits = 9,
72 .fifo_cfg = jz4740_musb_fifo_cfg,
73 .fifo_cfg_size = ARRAY_SIZE(jz4740_musb_fifo_cfg),
74};
75
76static struct musb_hdrc_platform_data jz4740_musb_platform_data = {
77 .mode = MUSB_PERIPHERAL,
78 .config = &jz4740_musb_config,
79};
80
81static int jz4740_musb_init(struct musb *musb)
82{
83 musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2);
84 if (!musb->xceiv) {
85 pr_err("HS UDC: no transceiver configured\n");
86 return -ENODEV;
87 }
88
89 /* Silicon does not implement ConfigData register.
90 * Set dyn_fifo to avoid reading EP config from hardware.
91 */
92 musb->dyn_fifo = true;
93
94 musb->isr = jz4740_musb_interrupt;
95
96 return 0;
97}
98
99static int jz4740_musb_exit(struct musb *musb)
100{
101 usb_put_phy(musb->xceiv);
102
103 return 0;
104}
105
106static const struct musb_platform_ops jz4740_musb_ops = {
107 .init = jz4740_musb_init,
108 .exit = jz4740_musb_exit,
109};
110
111static int jz4740_probe(struct platform_device *pdev)
112{
113 struct musb_hdrc_platform_data *pdata = &jz4740_musb_platform_data;
114 struct platform_device *musb;
115 struct jz4740_glue *glue;
116 struct clk *clk;
117 int ret;
118
119 glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL);
120 if (!glue)
121 return -ENOMEM;
122
123 musb = platform_device_alloc("musb-hdrc", PLATFORM_DEVID_AUTO);
124 if (!musb) {
125 dev_err(&pdev->dev, "failed to allocate musb device\n");
126 return -ENOMEM;
127 }
128
129 clk = devm_clk_get(&pdev->dev, "udc");
130 if (IS_ERR(clk)) {
131 dev_err(&pdev->dev, "failed to get clock\n");
132 ret = PTR_ERR(clk);
133 goto err_platform_device_put;
134 }
135
136 ret = clk_prepare_enable(clk);
137 if (ret) {
138 dev_err(&pdev->dev, "failed to enable clock\n");
139 goto err_platform_device_put;
140 }
141
142 musb->dev.parent = &pdev->dev;
143
144 glue->dev = &pdev->dev;
145 glue->musb = musb;
146 glue->clk = clk;
147
148 pdata->platform_ops = &jz4740_musb_ops;
149
150 platform_set_drvdata(pdev, glue);
151
152 ret = platform_device_add_resources(musb, pdev->resource,
153 pdev->num_resources);
154 if (ret) {
155 dev_err(&pdev->dev, "failed to add resources\n");
156 goto err_clk_disable;
157 }
158
159 ret = platform_device_add_data(musb, pdata, sizeof(*pdata));
160 if (ret) {
161 dev_err(&pdev->dev, "failed to add platform_data\n");
162 goto err_clk_disable;
163 }
164
165 ret = platform_device_add(musb);
166 if (ret) {
167 dev_err(&pdev->dev, "failed to register musb device\n");
168 goto err_clk_disable;
169 }
170
171 return 0;
172
173err_clk_disable:
174 clk_disable_unprepare(clk);
175err_platform_device_put:
176 platform_device_put(musb);
177 return ret;
178}
179
180static int jz4740_remove(struct platform_device *pdev)
181{
182 struct jz4740_glue *glue = platform_get_drvdata(pdev);
183
184 platform_device_unregister(glue->musb);
185 clk_disable_unprepare(glue->clk);
186
187 return 0;
188}
189
190static struct platform_driver jz4740_driver = {
191 .probe = jz4740_probe,
192 .remove = jz4740_remove,
193 .driver = {
194 .name = "musb-jz4740",
195 },
196};
197
198MODULE_DESCRIPTION("JZ4740 MUSB Glue Layer");
199MODULE_AUTHOR("Apelete Seketeli <apelete@seketeli.net>");
200MODULE_LICENSE("GPL v2");
201module_platform_driver(jz4740_driver);
diff --git a/drivers/usb/musb/musb_am335x.c b/drivers/usb/musb/musb_am335x.c
index 8be9b02c3cc2..d2353781bd2d 100644
--- a/drivers/usb/musb/musb_am335x.c
+++ b/drivers/usb/musb/musb_am335x.c
@@ -1,4 +1,3 @@
1#include <linux/init.h>
2#include <linux/platform_device.h> 1#include <linux/platform_device.h>
3#include <linux/pm_runtime.h> 2#include <linux/pm_runtime.h>
4#include <linux/module.h> 3#include <linux/module.h>
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 4d4499b80449..fc192ad9cc6a 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -83,7 +83,7 @@
83 * This gets many kinds of configuration information: 83 * This gets many kinds of configuration information:
84 * - Kconfig for everything user-configurable 84 * - Kconfig for everything user-configurable
85 * - platform_device for addressing, irq, and platform_data 85 * - platform_device for addressing, irq, and platform_data
86 * - platform_data is mostly for board-specific informarion 86 * - platform_data is mostly for board-specific information
87 * (plus recentrly, SOC or family details) 87 * (plus recentrly, SOC or family details)
88 * 88 *
89 * Most of the conditional compilation will (someday) vanish. 89 * Most of the conditional compilation will (someday) vanish.
@@ -93,7 +93,6 @@
93#include <linux/kernel.h> 93#include <linux/kernel.h>
94#include <linux/sched.h> 94#include <linux/sched.h>
95#include <linux/slab.h> 95#include <linux/slab.h>
96#include <linux/init.h>
97#include <linux/list.h> 96#include <linux/list.h>
98#include <linux/kobject.h> 97#include <linux/kobject.h>
99#include <linux/prefetch.h> 98#include <linux/prefetch.h>
@@ -478,8 +477,8 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
478 musb->port1_status |= 477 musb->port1_status |=
479 (USB_PORT_STAT_C_SUSPEND << 16) 478 (USB_PORT_STAT_C_SUSPEND << 16)
480 | MUSB_PORT_STAT_RESUME; 479 | MUSB_PORT_STAT_RESUME;
481 musb->rh_timer = jiffies 480 schedule_delayed_work(
482 + msecs_to_jiffies(20); 481 &musb->finish_resume_work, 20);
483 482
484 musb->xceiv->state = OTG_STATE_A_HOST; 483 musb->xceiv->state = OTG_STATE_A_HOST;
485 musb->is_active = 1; 484 musb->is_active = 1;
@@ -1187,7 +1186,7 @@ fifo_setup(struct musb *musb, struct musb_hw_ep *hw_ep,
1187 musb_writeb(mbase, MUSB_INDEX, hw_ep->epnum); 1186 musb_writeb(mbase, MUSB_INDEX, hw_ep->epnum);
1188 1187
1189 /* EP0 reserved endpoint for control, bidirectional; 1188 /* EP0 reserved endpoint for control, bidirectional;
1190 * EP1 reserved for bulk, two unidirection halves. 1189 * EP1 reserved for bulk, two unidirectional halves.
1191 */ 1190 */
1192 if (hw_ep->epnum == 1) 1191 if (hw_ep->epnum == 1)
1193 musb->bulk_ep = hw_ep; 1192 musb->bulk_ep = hw_ep;
@@ -1813,6 +1812,21 @@ static void musb_free(struct musb *musb)
1813 musb_host_free(musb); 1812 musb_host_free(musb);
1814} 1813}
1815 1814
1815static void musb_deassert_reset(struct work_struct *work)
1816{
1817 struct musb *musb;
1818 unsigned long flags;
1819
1820 musb = container_of(work, struct musb, deassert_reset_work.work);
1821
1822 spin_lock_irqsave(&musb->lock, flags);
1823
1824 if (musb->port1_status & USB_PORT_STAT_RESET)
1825 musb_port_reset(musb, false);
1826
1827 spin_unlock_irqrestore(&musb->lock, flags);
1828}
1829
1816/* 1830/*
1817 * Perform generic per-controller initialization. 1831 * Perform generic per-controller initialization.
1818 * 1832 *
@@ -1857,7 +1871,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
1857 /* The musb_platform_init() call: 1871 /* The musb_platform_init() call:
1858 * - adjusts musb->mregs 1872 * - adjusts musb->mregs
1859 * - sets the musb->isr 1873 * - sets the musb->isr
1860 * - may initialize an integrated tranceiver 1874 * - may initialize an integrated transceiver
1861 * - initializes musb->xceiv, usually by otg_get_phy() 1875 * - initializes musb->xceiv, usually by otg_get_phy()
1862 * - stops powering VBUS 1876 * - stops powering VBUS
1863 * 1877 *
@@ -1897,6 +1911,8 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
1897 1911
1898 /* Init IRQ workqueue before request_irq */ 1912 /* Init IRQ workqueue before request_irq */
1899 INIT_WORK(&musb->irq_work, musb_irq_work); 1913 INIT_WORK(&musb->irq_work, musb_irq_work);
1914 INIT_DELAYED_WORK(&musb->deassert_reset_work, musb_deassert_reset);
1915 INIT_DELAYED_WORK(&musb->finish_resume_work, musb_host_finish_resume);
1900 1916
1901 /* setup musb parts of the core (especially endpoints) */ 1917 /* setup musb parts of the core (especially endpoints) */
1902 status = musb_core_init(plat->config->multipoint 1918 status = musb_core_init(plat->config->multipoint
@@ -1940,17 +1956,26 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
1940 switch (musb->port_mode) { 1956 switch (musb->port_mode) {
1941 case MUSB_PORT_MODE_HOST: 1957 case MUSB_PORT_MODE_HOST:
1942 status = musb_host_setup(musb, plat->power); 1958 status = musb_host_setup(musb, plat->power);
1959 if (status < 0)
1960 goto fail3;
1961 status = musb_platform_set_mode(musb, MUSB_HOST);
1943 break; 1962 break;
1944 case MUSB_PORT_MODE_GADGET: 1963 case MUSB_PORT_MODE_GADGET:
1945 status = musb_gadget_setup(musb); 1964 status = musb_gadget_setup(musb);
1965 if (status < 0)
1966 goto fail3;
1967 status = musb_platform_set_mode(musb, MUSB_PERIPHERAL);
1946 break; 1968 break;
1947 case MUSB_PORT_MODE_DUAL_ROLE: 1969 case MUSB_PORT_MODE_DUAL_ROLE:
1948 status = musb_host_setup(musb, plat->power); 1970 status = musb_host_setup(musb, plat->power);
1949 if (status < 0) 1971 if (status < 0)
1950 goto fail3; 1972 goto fail3;
1951 status = musb_gadget_setup(musb); 1973 status = musb_gadget_setup(musb);
1952 if (status) 1974 if (status) {
1953 musb_host_cleanup(musb); 1975 musb_host_cleanup(musb);
1976 goto fail3;
1977 }
1978 status = musb_platform_set_mode(musb, MUSB_OTG);
1954 break; 1979 break;
1955 default: 1980 default:
1956 dev_err(dev, "unsupported port mode %d\n", musb->port_mode); 1981 dev_err(dev, "unsupported port mode %d\n", musb->port_mode);
@@ -1981,6 +2006,8 @@ fail4:
1981 2006
1982fail3: 2007fail3:
1983 cancel_work_sync(&musb->irq_work); 2008 cancel_work_sync(&musb->irq_work);
2009 cancel_delayed_work_sync(&musb->finish_resume_work);
2010 cancel_delayed_work_sync(&musb->deassert_reset_work);
1984 if (musb->dma_controller) 2011 if (musb->dma_controller)
1985 dma_controller_destroy(musb->dma_controller); 2012 dma_controller_destroy(musb->dma_controller);
1986fail2_5: 2013fail2_5:
@@ -2044,6 +2071,8 @@ static int musb_remove(struct platform_device *pdev)
2044 dma_controller_destroy(musb->dma_controller); 2071 dma_controller_destroy(musb->dma_controller);
2045 2072
2046 cancel_work_sync(&musb->irq_work); 2073 cancel_work_sync(&musb->irq_work);
2074 cancel_delayed_work_sync(&musb->finish_resume_work);
2075 cancel_delayed_work_sync(&musb->deassert_reset_work);
2047 musb_free(musb); 2076 musb_free(musb);
2048 device_init_wakeup(dev, 0); 2077 device_init_wakeup(dev, 0);
2049 return 0; 2078 return 0;
@@ -2216,16 +2245,28 @@ static int musb_suspend(struct device *dev)
2216 */ 2245 */
2217 } 2246 }
2218 2247
2248 musb_save_context(musb);
2249
2219 spin_unlock_irqrestore(&musb->lock, flags); 2250 spin_unlock_irqrestore(&musb->lock, flags);
2220 return 0; 2251 return 0;
2221} 2252}
2222 2253
2223static int musb_resume_noirq(struct device *dev) 2254static int musb_resume_noirq(struct device *dev)
2224{ 2255{
2225 /* for static cmos like DaVinci, register values were preserved 2256 struct musb *musb = dev_to_musb(dev);
2257
2258 /*
2259 * For static cmos like DaVinci, register values were preserved
2226 * unless for some reason the whole soc powered down or the USB 2260 * unless for some reason the whole soc powered down or the USB
2227 * module got reset through the PSC (vs just being disabled). 2261 * module got reset through the PSC (vs just being disabled).
2262 *
2263 * For the DSPS glue layer though, a full register restore has to
2264 * be done. As it shouldn't harm other platforms, we do it
2265 * unconditionally.
2228 */ 2266 */
2267
2268 musb_restore_context(musb);
2269
2229 return 0; 2270 return 0;
2230} 2271}
2231 2272
@@ -2283,19 +2324,4 @@ static struct platform_driver musb_driver = {
2283 .shutdown = musb_shutdown, 2324 .shutdown = musb_shutdown,
2284}; 2325};
2285 2326
2286/*-------------------------------------------------------------------------*/ 2327module_platform_driver(musb_driver);
2287
2288static int __init musb_init(void)
2289{
2290 if (usb_disabled())
2291 return 0;
2292
2293 return platform_driver_register(&musb_driver);
2294}
2295module_init(musb_init);
2296
2297static void __exit musb_cleanup(void)
2298{
2299 platform_driver_unregister(&musb_driver);
2300}
2301module_exit(musb_cleanup);
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index 29f7cd7c7964..7083e82776ff 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -47,6 +47,7 @@
47#include <linux/usb/otg.h> 47#include <linux/usb/otg.h>
48#include <linux/usb/musb.h> 48#include <linux/usb/musb.h>
49#include <linux/phy/phy.h> 49#include <linux/phy/phy.h>
50#include <linux/workqueue.h>
50 51
51struct musb; 52struct musb;
52struct musb_hw_ep; 53struct musb_hw_ep;
@@ -295,6 +296,8 @@ struct musb {
295 296
296 irqreturn_t (*isr)(int, void *); 297 irqreturn_t (*isr)(int, void *);
297 struct work_struct irq_work; 298 struct work_struct irq_work;
299 struct delayed_work deassert_reset_work;
300 struct delayed_work finish_resume_work;
298 u16 hwvers; 301 u16 hwvers;
299 302
300 u16 intrrxe; 303 u16 intrrxe;
diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c
index a12bd30401e0..f88929609bac 100644
--- a/drivers/usb/musb/musb_cppi41.c
+++ b/drivers/usb/musb/musb_cppi41.c
@@ -615,7 +615,7 @@ static int cppi41_dma_controller_start(struct cppi41_dma_controller *controller)
615 615
616 dc = dma_request_slave_channel(dev, str); 616 dc = dma_request_slave_channel(dev, str);
617 if (!dc) { 617 if (!dc) {
618 dev_err(dev, "Falied to request %s.\n", str); 618 dev_err(dev, "Failed to request %s.\n", str);
619 ret = -EPROBE_DEFER; 619 ret = -EPROBE_DEFER;
620 goto err; 620 goto err;
621 } 621 }
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 1901f6fe5807..7a109eae9b9a 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -29,7 +29,6 @@
29 * da8xx.c would be merged to this file after testing. 29 * da8xx.c would be merged to this file after testing.
30 */ 30 */
31 31
32#include <linux/init.h>
33#include <linux/io.h> 32#include <linux/io.h>
34#include <linux/err.h> 33#include <linux/err.h>
35#include <linux/platform_device.h> 34#include <linux/platform_device.h>
@@ -83,6 +82,8 @@ struct dsps_musb_wrapper {
83 u16 coreintr_status; 82 u16 coreintr_status;
84 u16 phy_utmi; 83 u16 phy_utmi;
85 u16 mode; 84 u16 mode;
85 u16 tx_mode;
86 u16 rx_mode;
86 87
87 /* bit positions for control */ 88 /* bit positions for control */
88 unsigned reset:5; 89 unsigned reset:5;
@@ -106,10 +107,24 @@ struct dsps_musb_wrapper {
106 107
107 /* bit positions for mode */ 108 /* bit positions for mode */
108 unsigned iddig:5; 109 unsigned iddig:5;
110 unsigned iddig_mux:5;
109 /* miscellaneous stuff */ 111 /* miscellaneous stuff */
110 u8 poll_seconds; 112 u8 poll_seconds;
111}; 113};
112 114
115/*
116 * register shadow for suspend
117 */
118struct dsps_context {
119 u32 control;
120 u32 epintr;
121 u32 coreintr;
122 u32 phy_utmi;
123 u32 mode;
124 u32 tx_mode;
125 u32 rx_mode;
126};
127
113/** 128/**
114 * DSPS glue structure. 129 * DSPS glue structure.
115 */ 130 */
@@ -119,6 +134,8 @@ struct dsps_glue {
119 const struct dsps_musb_wrapper *wrp; /* wrapper register offsets */ 134 const struct dsps_musb_wrapper *wrp; /* wrapper register offsets */
120 struct timer_list timer; /* otg_workaround timer */ 135 struct timer_list timer; /* otg_workaround timer */
121 unsigned long last_timer; /* last timer data for each instance */ 136 unsigned long last_timer; /* last timer data for each instance */
137
138 struct dsps_context context;
122}; 139};
123 140
124static void dsps_musb_try_idle(struct musb *musb, unsigned long timeout) 141static void dsps_musb_try_idle(struct musb *musb, unsigned long timeout)
@@ -341,8 +358,9 @@ static irqreturn_t dsps_interrupt(int irq, void *hci)
341 if (musb->int_tx || musb->int_rx || musb->int_usb) 358 if (musb->int_tx || musb->int_rx || musb->int_usb)
342 ret |= musb_interrupt(musb); 359 ret |= musb_interrupt(musb);
343 360
344 /* Poll for ID change */ 361 /* Poll for ID change in OTG port mode */
345 if (musb->xceiv->state == OTG_STATE_B_IDLE) 362 if (musb->xceiv->state == OTG_STATE_B_IDLE &&
363 musb->port_mode == MUSB_PORT_MODE_DUAL_ROLE)
346 mod_timer(&glue->timer, jiffies + wrp->poll_seconds * HZ); 364 mod_timer(&glue->timer, jiffies + wrp->poll_seconds * HZ);
347out: 365out:
348 spin_unlock_irqrestore(&musb->lock, flags); 366 spin_unlock_irqrestore(&musb->lock, flags);
@@ -406,6 +424,54 @@ static int dsps_musb_exit(struct musb *musb)
406 return 0; 424 return 0;
407} 425}
408 426
427static int dsps_musb_set_mode(struct musb *musb, u8 mode)
428{
429 struct device *dev = musb->controller;
430 struct dsps_glue *glue = dev_get_drvdata(dev->parent);
431 const struct dsps_musb_wrapper *wrp = glue->wrp;
432 void __iomem *ctrl_base = musb->ctrl_base;
433 void __iomem *base = musb->mregs;
434 u32 reg;
435
436 reg = dsps_readl(base, wrp->mode);
437
438 switch (mode) {
439 case MUSB_HOST:
440 reg &= ~(1 << wrp->iddig);
441
442 /*
443 * if we're setting mode to host-only or device-only, we're
444 * going to ignore whatever the PHY sends us and just force
445 * ID pin status by SW
446 */
447 reg |= (1 << wrp->iddig_mux);
448
449 dsps_writel(base, wrp->mode, reg);
450 dsps_writel(ctrl_base, wrp->phy_utmi, 0x02);
451 break;
452 case MUSB_PERIPHERAL:
453 reg |= (1 << wrp->iddig);
454
455 /*
456 * if we're setting mode to host-only or device-only, we're
457 * going to ignore whatever the PHY sends us and just force
458 * ID pin status by SW
459 */
460 reg |= (1 << wrp->iddig_mux);
461
462 dsps_writel(base, wrp->mode, reg);
463 break;
464 case MUSB_OTG:
465 dsps_writel(base, wrp->phy_utmi, 0x02);
466 break;
467 default:
468 dev_err(glue->dev, "unsupported mode %d\n", mode);
469 return -EINVAL;
470 }
471
472 return 0;
473}
474
409static struct musb_platform_ops dsps_ops = { 475static struct musb_platform_ops dsps_ops = {
410 .init = dsps_musb_init, 476 .init = dsps_musb_init,
411 .exit = dsps_musb_exit, 477 .exit = dsps_musb_exit,
@@ -414,6 +480,7 @@ static struct musb_platform_ops dsps_ops = {
414 .disable = dsps_musb_disable, 480 .disable = dsps_musb_disable,
415 481
416 .try_idle = dsps_musb_try_idle, 482 .try_idle = dsps_musb_try_idle,
483 .set_mode = dsps_musb_set_mode,
417}; 484};
418 485
419static u64 musb_dmamask = DMA_BIT_MASK(32); 486static u64 musb_dmamask = DMA_BIT_MASK(32);
@@ -507,6 +574,7 @@ static int dsps_create_musb_pdev(struct dsps_glue *glue,
507 574
508 config->num_eps = get_int_prop(dn, "mentor,num-eps"); 575 config->num_eps = get_int_prop(dn, "mentor,num-eps");
509 config->ram_bits = get_int_prop(dn, "mentor,ram-bits"); 576 config->ram_bits = get_int_prop(dn, "mentor,ram-bits");
577 config->host_port_deassert_reset_at_resume = 1;
510 pdata.mode = get_musb_port_mode(dev); 578 pdata.mode = get_musb_port_mode(dev);
511 /* DT keeps this entry in mA, musb expects it as per USB spec */ 579 /* DT keeps this entry in mA, musb expects it as per USB spec */
512 pdata.power = get_int_prop(dn, "mentor,power") / 2; 580 pdata.power = get_int_prop(dn, "mentor,power") / 2;
@@ -605,9 +673,12 @@ static const struct dsps_musb_wrapper am33xx_driver_data = {
605 .coreintr_status = 0x34, 673 .coreintr_status = 0x34,
606 .phy_utmi = 0xe0, 674 .phy_utmi = 0xe0,
607 .mode = 0xe8, 675 .mode = 0xe8,
676 .tx_mode = 0x70,
677 .rx_mode = 0x74,
608 .reset = 0, 678 .reset = 0,
609 .otg_disable = 21, 679 .otg_disable = 21,
610 .iddig = 8, 680 .iddig = 8,
681 .iddig_mux = 7,
611 .usb_shift = 0, 682 .usb_shift = 0,
612 .usb_mask = 0x1ff, 683 .usb_mask = 0x1ff,
613 .usb_bitmap = (0x1ff << 0), 684 .usb_bitmap = (0x1ff << 0),
@@ -628,11 +699,52 @@ static const struct of_device_id musb_dsps_of_match[] = {
628}; 699};
629MODULE_DEVICE_TABLE(of, musb_dsps_of_match); 700MODULE_DEVICE_TABLE(of, musb_dsps_of_match);
630 701
702#ifdef CONFIG_PM
703static int dsps_suspend(struct device *dev)
704{
705 struct dsps_glue *glue = dev_get_drvdata(dev);
706 const struct dsps_musb_wrapper *wrp = glue->wrp;
707 struct musb *musb = platform_get_drvdata(glue->musb);
708 void __iomem *mbase = musb->ctrl_base;
709
710 glue->context.control = dsps_readl(mbase, wrp->control);
711 glue->context.epintr = dsps_readl(mbase, wrp->epintr_set);
712 glue->context.coreintr = dsps_readl(mbase, wrp->coreintr_set);
713 glue->context.phy_utmi = dsps_readl(mbase, wrp->phy_utmi);
714 glue->context.mode = dsps_readl(mbase, wrp->mode);
715 glue->context.tx_mode = dsps_readl(mbase, wrp->tx_mode);
716 glue->context.rx_mode = dsps_readl(mbase, wrp->rx_mode);
717
718 return 0;
719}
720
721static int dsps_resume(struct device *dev)
722{
723 struct dsps_glue *glue = dev_get_drvdata(dev);
724 const struct dsps_musb_wrapper *wrp = glue->wrp;
725 struct musb *musb = platform_get_drvdata(glue->musb);
726 void __iomem *mbase = musb->ctrl_base;
727
728 dsps_writel(mbase, wrp->control, glue->context.control);
729 dsps_writel(mbase, wrp->epintr_set, glue->context.epintr);
730 dsps_writel(mbase, wrp->coreintr_set, glue->context.coreintr);
731 dsps_writel(mbase, wrp->phy_utmi, glue->context.phy_utmi);
732 dsps_writel(mbase, wrp->mode, glue->context.mode);
733 dsps_writel(mbase, wrp->tx_mode, glue->context.tx_mode);
734 dsps_writel(mbase, wrp->rx_mode, glue->context.rx_mode);
735
736 return 0;
737}
738#endif
739
740static SIMPLE_DEV_PM_OPS(dsps_pm_ops, dsps_suspend, dsps_resume);
741
631static struct platform_driver dsps_usbss_driver = { 742static struct platform_driver dsps_usbss_driver = {
632 .probe = dsps_probe, 743 .probe = dsps_probe,
633 .remove = dsps_remove, 744 .remove = dsps_remove,
634 .driver = { 745 .driver = {
635 .name = "musb-dsps", 746 .name = "musb-dsps",
747 .pm = &dsps_pm_ops,
636 .of_match_table = musb_dsps_of_match, 748 .of_match_table = musb_dsps_of_match,
637 }, 749 },
638}; 750};
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 32fb057c03f5..d4aa779339f1 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1727,14 +1727,14 @@ init_peripheral_ep(struct musb *musb, struct musb_ep *ep, u8 epnum, int is_in)
1727 ep->end_point.name = ep->name; 1727 ep->end_point.name = ep->name;
1728 INIT_LIST_HEAD(&ep->end_point.ep_list); 1728 INIT_LIST_HEAD(&ep->end_point.ep_list);
1729 if (!epnum) { 1729 if (!epnum) {
1730 ep->end_point.maxpacket = 64; 1730 usb_ep_set_maxpacket_limit(&ep->end_point, 64);
1731 ep->end_point.ops = &musb_g_ep0_ops; 1731 ep->end_point.ops = &musb_g_ep0_ops;
1732 musb->g.ep0 = &ep->end_point; 1732 musb->g.ep0 = &ep->end_point;
1733 } else { 1733 } else {
1734 if (is_in) 1734 if (is_in)
1735 ep->end_point.maxpacket = hw_ep->max_packet_sz_tx; 1735 usb_ep_set_maxpacket_limit(&ep->end_point, hw_ep->max_packet_sz_tx);
1736 else 1736 else
1737 ep->end_point.maxpacket = hw_ep->max_packet_sz_rx; 1737 usb_ep_set_maxpacket_limit(&ep->end_point, hw_ep->max_packet_sz_rx);
1738 ep->end_point.ops = &musb_ep_ops; 1738 ep->end_point.ops = &musb_ep_ops;
1739 list_add_tail(&ep->end_point.ep_list, &musb->g.ep_list); 1739 list_add_tail(&ep->end_point.ep_list, &musb->g.ep_list);
1740 } 1740 }
@@ -2119,7 +2119,15 @@ __acquires(musb->lock)
2119 /* Normal reset, as B-Device; 2119 /* Normal reset, as B-Device;
2120 * or else after HNP, as A-Device 2120 * or else after HNP, as A-Device
2121 */ 2121 */
2122 if (devctl & MUSB_DEVCTL_BDEVICE) { 2122 if (!musb->g.is_otg) {
2123 /* USB device controllers that are not OTG compatible
2124 * may not have DEVCTL register in silicon.
2125 * In that case, do not rely on devctl for setting
2126 * peripheral mode.
2127 */
2128 musb->xceiv->state = OTG_STATE_B_PERIPHERAL;
2129 musb->g.is_a_peripheral = 0;
2130 } else if (devctl & MUSB_DEVCTL_BDEVICE) {
2123 musb->xceiv->state = OTG_STATE_B_PERIPHERAL; 2131 musb->xceiv->state = OTG_STATE_B_PERIPHERAL;
2124 musb->g.is_a_peripheral = 0; 2132 musb->g.is_a_peripheral = 0;
2125 } else { 2133 } else {
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index 6582a20bec05..ed455724017b 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -39,7 +39,6 @@
39#include <linux/sched.h> 39#include <linux/sched.h>
40#include <linux/slab.h> 40#include <linux/slab.h>
41#include <linux/errno.h> 41#include <linux/errno.h>
42#include <linux/init.h>
43#include <linux/list.h> 42#include <linux/list.h>
44#include <linux/dma-mapping.h> 43#include <linux/dma-mapping.h>
45 44
@@ -2013,7 +2012,7 @@ static int musb_schedule(
2013 head = &musb->out_bulk; 2012 head = &musb->out_bulk;
2014 2013
2015 /* Enable bulk RX/TX NAK timeout scheme when bulk requests are 2014 /* Enable bulk RX/TX NAK timeout scheme when bulk requests are
2016 * multiplexed. This scheme doen't work in high speed to full 2015 * multiplexed. This scheme does not work in high speed to full
2017 * speed scenario as NAK interrupts are not coming from a 2016 * speed scenario as NAK interrupts are not coming from a
2018 * full speed device connected to a high speed device. 2017 * full speed device connected to a high speed device.
2019 * NAK timeout interval is 8 (128 uframe or 16ms) for HS and 2018 * NAK timeout interval is 8 (128 uframe or 16ms) for HS and
@@ -2433,6 +2432,8 @@ static int musb_bus_suspend(struct usb_hcd *hcd)
2433 struct musb *musb = hcd_to_musb(hcd); 2432 struct musb *musb = hcd_to_musb(hcd);
2434 u8 devctl; 2433 u8 devctl;
2435 2434
2435 musb_port_suspend(musb, true);
2436
2436 if (!is_host_active(musb)) 2437 if (!is_host_active(musb))
2437 return 0; 2438 return 0;
2438 2439
@@ -2462,7 +2463,12 @@ static int musb_bus_suspend(struct usb_hcd *hcd)
2462 2463
2463static int musb_bus_resume(struct usb_hcd *hcd) 2464static int musb_bus_resume(struct usb_hcd *hcd)
2464{ 2465{
2465 /* resuming child port does the work */ 2466 struct musb *musb = hcd_to_musb(hcd);
2467
2468 if (musb->config &&
2469 musb->config->host_port_deassert_reset_at_resume)
2470 musb_port_reset(musb, false);
2471
2466 return 0; 2472 return 0;
2467} 2473}
2468 2474
@@ -2657,6 +2663,7 @@ int musb_host_setup(struct musb *musb, int power_budget)
2657 if (ret < 0) 2663 if (ret < 0)
2658 return ret; 2664 return ret;
2659 2665
2666 device_wakeup_enable(hcd->self.controller);
2660 return 0; 2667 return 0;
2661} 2668}
2662 2669
diff --git a/drivers/usb/musb/musb_host.h b/drivers/usb/musb/musb_host.h
index 960d73570b2f..7bbf01bf4bb0 100644
--- a/drivers/usb/musb/musb_host.h
+++ b/drivers/usb/musb/musb_host.h
@@ -92,6 +92,9 @@ extern void musb_host_rx(struct musb *, u8);
92extern void musb_root_disconnect(struct musb *musb); 92extern void musb_root_disconnect(struct musb *musb);
93extern void musb_host_resume_root_hub(struct musb *musb); 93extern void musb_host_resume_root_hub(struct musb *musb);
94extern void musb_host_poke_root_hub(struct musb *musb); 94extern void musb_host_poke_root_hub(struct musb *musb);
95extern void musb_port_suspend(struct musb *musb, bool do_suspend);
96extern void musb_port_reset(struct musb *musb, bool do_reset);
97extern void musb_host_finish_resume(struct work_struct *work);
95#else 98#else
96static inline struct musb *hcd_to_musb(struct usb_hcd *hcd) 99static inline struct musb *hcd_to_musb(struct usb_hcd *hcd)
97{ 100{
@@ -121,6 +124,9 @@ static inline void musb_root_disconnect(struct musb *musb) {}
121static inline void musb_host_resume_root_hub(struct musb *musb) {} 124static inline void musb_host_resume_root_hub(struct musb *musb) {}
122static inline void musb_host_poll_rh_status(struct musb *musb) {} 125static inline void musb_host_poll_rh_status(struct musb *musb) {}
123static inline void musb_host_poke_root_hub(struct musb *musb) {} 126static inline void musb_host_poke_root_hub(struct musb *musb) {}
127static inline void musb_port_suspend(struct musb *musb, bool do_suspend) {}
128static inline void musb_port_reset(struct musb *musb, bool do_reset) {}
129static inline void musb_host_finish_resume(struct work_struct *work) {}
124#endif 130#endif
125 131
126struct usb_hcd; 132struct usb_hcd;
diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c
index 9af6bba5eac9..eb634433ef09 100644
--- a/drivers/usb/musb/musb_virthub.c
+++ b/drivers/usb/musb/musb_virthub.c
@@ -36,7 +36,6 @@
36#include <linux/kernel.h> 36#include <linux/kernel.h>
37#include <linux/sched.h> 37#include <linux/sched.h>
38#include <linux/errno.h> 38#include <linux/errno.h>
39#include <linux/init.h>
40#include <linux/time.h> 39#include <linux/time.h>
41#include <linux/timer.h> 40#include <linux/timer.h>
42 41
@@ -44,7 +43,38 @@
44 43
45#include "musb_core.h" 44#include "musb_core.h"
46 45
47static void musb_port_suspend(struct musb *musb, bool do_suspend) 46void musb_host_finish_resume(struct work_struct *work)
47{
48 struct musb *musb;
49 unsigned long flags;
50 u8 power;
51
52 musb = container_of(work, struct musb, finish_resume_work.work);
53
54 spin_lock_irqsave(&musb->lock, flags);
55
56 power = musb_readb(musb->mregs, MUSB_POWER);
57 power &= ~MUSB_POWER_RESUME;
58 dev_dbg(musb->controller, "root port resume stopped, power %02x\n",
59 power);
60 musb_writeb(musb->mregs, MUSB_POWER, power);
61
62 /*
63 * ISSUE: DaVinci (RTL 1.300) disconnects after
64 * resume of high speed peripherals (but not full
65 * speed ones).
66 */
67 musb->is_active = 1;
68 musb->port1_status &= ~(USB_PORT_STAT_SUSPEND | MUSB_PORT_STAT_RESUME);
69 musb->port1_status |= USB_PORT_STAT_C_SUSPEND << 16;
70 usb_hcd_poll_rh_status(musb->hcd);
71 /* NOTE: it might really be A_WAIT_BCON ... */
72 musb->xceiv->state = OTG_STATE_A_HOST;
73
74 spin_unlock_irqrestore(&musb->lock, flags);
75}
76
77void musb_port_suspend(struct musb *musb, bool do_suspend)
48{ 78{
49 struct usb_otg *otg = musb->xceiv->otg; 79 struct usb_otg *otg = musb->xceiv->otg;
50 u8 power; 80 u8 power;
@@ -105,11 +135,11 @@ static void musb_port_suspend(struct musb *musb, bool do_suspend)
105 135
106 /* later, GetPortStatus will stop RESUME signaling */ 136 /* later, GetPortStatus will stop RESUME signaling */
107 musb->port1_status |= MUSB_PORT_STAT_RESUME; 137 musb->port1_status |= MUSB_PORT_STAT_RESUME;
108 musb->rh_timer = jiffies + msecs_to_jiffies(20); 138 schedule_delayed_work(&musb->finish_resume_work, 20);
109 } 139 }
110} 140}
111 141
112static void musb_port_reset(struct musb *musb, bool do_reset) 142void musb_port_reset(struct musb *musb, bool do_reset)
113{ 143{
114 u8 power; 144 u8 power;
115 void __iomem *mbase = musb->mregs; 145 void __iomem *mbase = musb->mregs;
@@ -150,7 +180,7 @@ static void musb_port_reset(struct musb *musb, bool do_reset)
150 180
151 musb->port1_status |= USB_PORT_STAT_RESET; 181 musb->port1_status |= USB_PORT_STAT_RESET;
152 musb->port1_status &= ~USB_PORT_STAT_ENABLE; 182 musb->port1_status &= ~USB_PORT_STAT_ENABLE;
153 musb->rh_timer = jiffies + msecs_to_jiffies(50); 183 schedule_delayed_work(&musb->deassert_reset_work, 50);
154 } else { 184 } else {
155 dev_dbg(musb->controller, "root port reset stopped\n"); 185 dev_dbg(musb->controller, "root port reset stopped\n");
156 musb_writeb(mbase, MUSB_POWER, 186 musb_writeb(mbase, MUSB_POWER,
@@ -325,36 +355,6 @@ int musb_hub_control(
325 if (wIndex != 1) 355 if (wIndex != 1)
326 goto error; 356 goto error;
327 357
328 /* finish RESET signaling? */
329 if ((musb->port1_status & USB_PORT_STAT_RESET)
330 && time_after_eq(jiffies, musb->rh_timer))
331 musb_port_reset(musb, false);
332
333 /* finish RESUME signaling? */
334 if ((musb->port1_status & MUSB_PORT_STAT_RESUME)
335 && time_after_eq(jiffies, musb->rh_timer)) {
336 u8 power;
337
338 power = musb_readb(musb->mregs, MUSB_POWER);
339 power &= ~MUSB_POWER_RESUME;
340 dev_dbg(musb->controller, "root port resume stopped, power %02x\n",
341 power);
342 musb_writeb(musb->mregs, MUSB_POWER, power);
343
344 /* ISSUE: DaVinci (RTL 1.300) disconnects after
345 * resume of high speed peripherals (but not full
346 * speed ones).
347 */
348
349 musb->is_active = 1;
350 musb->port1_status &= ~(USB_PORT_STAT_SUSPEND
351 | MUSB_PORT_STAT_RESUME);
352 musb->port1_status |= USB_PORT_STAT_C_SUSPEND << 16;
353 usb_hcd_poll_rh_status(musb->hcd);
354 /* NOTE: it might really be A_WAIT_BCON ... */
355 musb->xceiv->state = OTG_STATE_A_HOST;
356 }
357
358 put_unaligned(cpu_to_le32(musb->port1_status 358 put_unaligned(cpu_to_le32(musb->port1_status
359 & ~MUSB_PORT_STAT_RESUME), 359 & ~MUSB_PORT_STAT_RESUME),
360 (__le32 *) buf); 360 (__le32 *) buf);
diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c
index 4432314d70ee..4e9fb1d08698 100644
--- a/drivers/usb/musb/tusb6010.c
+++ b/drivers/usb/musb/tusb6010.c
@@ -18,7 +18,6 @@
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/errno.h> 19#include <linux/errno.h>
20#include <linux/err.h> 20#include <linux/err.h>
21#include <linux/init.h>
22#include <linux/prefetch.h> 21#include <linux/prefetch.h>
23#include <linux/usb.h> 22#include <linux/usb.h>
24#include <linux/irq.h> 23#include <linux/irq.h>
diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c
index b8794eb81e9c..e33b6b2c44c2 100644
--- a/drivers/usb/musb/tusb6010_omap.c
+++ b/drivers/usb/musb/tusb6010_omap.c
@@ -11,7 +11,6 @@
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/errno.h> 13#include <linux/errno.h>
14#include <linux/init.h>
15#include <linux/usb.h> 14#include <linux/usb.h>
16#include <linux/platform_device.h> 15#include <linux/platform_device.h>
17#include <linux/dma-mapping.h> 16#include <linux/dma-mapping.h>
diff --git a/drivers/usb/musb/ux500.c b/drivers/usb/musb/ux500.c
index 122446bf1664..c2e45e632723 100644
--- a/drivers/usb/musb/ux500.c
+++ b/drivers/usb/musb/ux500.c
@@ -21,7 +21,6 @@
21 21
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24#include <linux/init.h>
25#include <linux/clk.h> 24#include <linux/clk.h>
26#include <linux/err.h> 25#include <linux/err.h>
27#include <linux/io.h> 26#include <linux/io.h>
diff --git a/drivers/usb/musb/ux500_dma.c b/drivers/usb/musb/ux500_dma.c
index 3700e9713258..9aad00f11bd5 100644
--- a/drivers/usb/musb/ux500_dma.c
+++ b/drivers/usb/musb/ux500_dma.c
@@ -336,7 +336,9 @@ static int ux500_dma_controller_start(struct ux500_dma_controller *controller)
336 data ? 336 data ?
337 data->dma_filter : 337 data->dma_filter :
338 NULL, 338 NULL,
339 param_array[ch_num]); 339 param_array ?
340 param_array[ch_num] :
341 NULL);
340 342
341 if (!ux500_channel->dma_chan) { 343 if (!ux500_channel->dma_chan) {
342 ERR("Dma pipe allocation error dir=%d ch=%d\n", 344 ERR("Dma pipe allocation error dir=%d ch=%d\n",
diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
index 2b41c636a52a..7d1451d5bbea 100644
--- a/drivers/usb/phy/Kconfig
+++ b/drivers/usb/phy/Kconfig
@@ -6,6 +6,15 @@ menu "USB Physical Layer drivers"
6config USB_PHY 6config USB_PHY
7 def_bool n 7 def_bool n
8 8
9config USB_OTG_FSM
10 tristate "USB 2.0 OTG FSM implementation"
11 depends on USB
12 select USB_OTG
13 select USB_PHY
14 help
15 Implements OTG Final State Machine as specified in On-The-Go
16 and Embedded Host Supplement to the USB Revision 2.0 Specification.
17
9# 18#
10# USB Transceiver Drivers 19# USB Transceiver Drivers
11# 20#
@@ -19,9 +28,8 @@ config AB8500_USB
19 in host mode, low speed. 28 in host mode, low speed.
20 29
21config FSL_USB2_OTG 30config FSL_USB2_OTG
22 tristate "Freescale USB OTG Transceiver Driver" 31 bool "Freescale USB OTG Transceiver Driver"
23 depends on USB_EHCI_FSL && USB_FSL_USB2 && PM_RUNTIME 32 depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_OTG_FSM && PM_RUNTIME
24 depends on USB
25 select USB_OTG 33 select USB_OTG
26 select USB_PHY 34 select USB_PHY
27 help 35 help
@@ -40,7 +48,16 @@ config ISP1301_OMAP
40 Instruments OMAP processors. 48 Instruments OMAP processors.
41 49
42 This driver can also be built as a module. If so, the module 50 This driver can also be built as a module. If so, the module
43 will be called isp1301_omap. 51 will be called phy-isp1301-omap.
52
53config KEYSTONE_USB_PHY
54 tristate "Keystone USB PHY Driver"
55 depends on ARCH_KEYSTONE || COMPILE_TEST
56 select NOP_USB_XCEIV
57 help
58 Enable this to support Keystone USB phy. This driver provides
59 interface to interact with USB 2.0 and USB 3.0 PHY that is part
60 of the Keystone SOC.
44 61
45config MV_U3D_PHY 62config MV_U3D_PHY
46 bool "Marvell USB 3.0 PHY controller Driver" 63 bool "Marvell USB 3.0 PHY controller Driver"
@@ -136,6 +153,31 @@ config USB_GPIO_VBUS
136 optionally control of a D+ pullup GPIO as well as a VBUS 153 optionally control of a D+ pullup GPIO as well as a VBUS
137 current limit regulator. 154 current limit regulator.
138 155
156config OMAP_OTG
157 tristate "OMAP USB OTG controller driver"
158 depends on ARCH_OMAP_OTG && EXTCON
159 help
160 Enable this to support some transceivers on OMAP1 platforms. OTG
161 controller is needed to switch between host and peripheral modes.
162
163 This driver can also be built as a module. If so, the module
164 will be called phy-omap-otg.
165
166config TAHVO_USB
167 tristate "Tahvo USB transceiver driver"
168 depends on MFD_RETU && EXTCON
169 select USB_PHY
170 help
171 Enable this to support USB transceiver on Tahvo. This is used
172 at least on Nokia 770.
173
174config TAHVO_USB_HOST_BY_DEFAULT
175 depends on TAHVO_USB
176 boolean "Device in USB host mode by default"
177 help
178 Say Y here, if you want the device to enter USB host mode
179 by default on bootup.
180
139config USB_ISP1301 181config USB_ISP1301
140 tristate "NXP ISP1301 USB transceiver support" 182 tristate "NXP ISP1301 USB transceiver support"
141 depends on USB || USB_GADGET 183 depends on USB || USB_GADGET
@@ -147,7 +189,7 @@ config USB_ISP1301
147 and OTG drivers (to be selected separately). 189 and OTG drivers (to be selected separately).
148 190
149 To compile this driver as a module, choose M here: the 191 To compile this driver as a module, choose M here: the
150 module will be called isp1301. 192 module will be called phy-isp1301.
151 193
152config USB_MSM_OTG 194config USB_MSM_OTG
153 tristate "OTG support for Qualcomm on-chip USB controller" 195 tristate "OTG support for Qualcomm on-chip USB controller"
diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile
index 022c1da7fb78..be58adae3496 100644
--- a/drivers/usb/phy/Makefile
+++ b/drivers/usb/phy/Makefile
@@ -3,18 +3,20 @@
3# 3#
4obj-$(CONFIG_USB_PHY) += phy.o 4obj-$(CONFIG_USB_PHY) += phy.o
5obj-$(CONFIG_OF) += of.o 5obj-$(CONFIG_OF) += of.o
6obj-$(CONFIG_USB_OTG_FSM) += phy-fsm-usb.o
6 7
7# transceiver drivers, keep the list sorted 8# transceiver drivers, keep the list sorted
8 9
9obj-$(CONFIG_AB8500_USB) += phy-ab8500-usb.o 10obj-$(CONFIG_AB8500_USB) += phy-ab8500-usb.o
10phy-fsl-usb2-objs := phy-fsl-usb.o phy-fsm-usb.o 11obj-$(CONFIG_FSL_USB2_OTG) += phy-fsl-usb.o
11obj-$(CONFIG_FSL_USB2_OTG) += phy-fsl-usb2.o
12obj-$(CONFIG_ISP1301_OMAP) += phy-isp1301-omap.o 12obj-$(CONFIG_ISP1301_OMAP) += phy-isp1301-omap.o
13obj-$(CONFIG_MV_U3D_PHY) += phy-mv-u3d-usb.o 13obj-$(CONFIG_MV_U3D_PHY) += phy-mv-u3d-usb.o
14obj-$(CONFIG_NOP_USB_XCEIV) += phy-generic.o 14obj-$(CONFIG_NOP_USB_XCEIV) += phy-generic.o
15obj-$(CONFIG_TAHVO_USB) += phy-tahvo.o
15obj-$(CONFIG_OMAP_CONTROL_USB) += phy-omap-control.o 16obj-$(CONFIG_OMAP_CONTROL_USB) += phy-omap-control.o
16obj-$(CONFIG_AM335X_CONTROL_USB) += phy-am335x-control.o 17obj-$(CONFIG_AM335X_CONTROL_USB) += phy-am335x-control.o
17obj-$(CONFIG_AM335X_PHY_USB) += phy-am335x.o 18obj-$(CONFIG_AM335X_PHY_USB) += phy-am335x.o
19obj-$(CONFIG_OMAP_OTG) += phy-omap-otg.o
18obj-$(CONFIG_OMAP_USB3) += phy-omap-usb3.o 20obj-$(CONFIG_OMAP_USB3) += phy-omap-usb3.o
19obj-$(CONFIG_SAMSUNG_USBPHY) += phy-samsung-usb.o 21obj-$(CONFIG_SAMSUNG_USBPHY) += phy-samsung-usb.o
20obj-$(CONFIG_SAMSUNG_USB2PHY) += phy-samsung-usb2.o 22obj-$(CONFIG_SAMSUNG_USB2PHY) += phy-samsung-usb2.o
@@ -30,3 +32,4 @@ obj-$(CONFIG_USB_RCAR_PHY) += phy-rcar-usb.o
30obj-$(CONFIG_USB_RCAR_GEN2_PHY) += phy-rcar-gen2-usb.o 32obj-$(CONFIG_USB_RCAR_GEN2_PHY) += phy-rcar-gen2-usb.o
31obj-$(CONFIG_USB_ULPI) += phy-ulpi.o 33obj-$(CONFIG_USB_ULPI) += phy-ulpi.o
32obj-$(CONFIG_USB_ULPI_VIEWPORT) += phy-ulpi-viewport.o 34obj-$(CONFIG_USB_ULPI_VIEWPORT) += phy-ulpi-viewport.o
35obj-$(CONFIG_KEYSTONE_USB_PHY) += phy-keystone.o
diff --git a/drivers/usb/phy/phy-ab8500-usb.c b/drivers/usb/phy/phy-ab8500-usb.c
index 087402350b6d..11ab2c45e462 100644
--- a/drivers/usb/phy/phy-ab8500-usb.c
+++ b/drivers/usb/phy/phy-ab8500-usb.c
@@ -1415,8 +1415,6 @@ static int ab8500_usb_probe(struct platform_device *pdev)
1415 1415
1416 platform_set_drvdata(pdev, ab); 1416 platform_set_drvdata(pdev, ab);
1417 1417
1418 ATOMIC_INIT_NOTIFIER_HEAD(&ab->phy.notifier);
1419
1420 /* all: Disable phy when called from set_host and set_peripheral */ 1418 /* all: Disable phy when called from set_host and set_peripheral */
1421 INIT_WORK(&ab->phy_dis_work, ab8500_usb_phy_disable_work); 1419 INIT_WORK(&ab->phy_dis_work, ab8500_usb_phy_disable_work);
1422 1420
diff --git a/drivers/usb/phy/phy-am335x-control.c b/drivers/usb/phy/phy-am335x-control.c
index 634f49acd20e..d75196ad5f2f 100644
--- a/drivers/usb/phy/phy-am335x-control.c
+++ b/drivers/usb/phy/phy-am335x-control.c
@@ -3,11 +3,7 @@
3#include <linux/err.h> 3#include <linux/err.h>
4#include <linux/of.h> 4#include <linux/of.h>
5#include <linux/io.h> 5#include <linux/io.h>
6 6#include "am35x-phy-control.h"
7struct phy_control {
8 void (*phy_power)(struct phy_control *phy_ctrl, u32 id, bool on);
9 void (*phy_wkup)(struct phy_control *phy_ctrl, u32 id, bool on);
10};
11 7
12struct am335x_control_usb { 8struct am335x_control_usb {
13 struct device *dev; 9 struct device *dev;
diff --git a/drivers/usb/phy/phy-am335x.c b/drivers/usb/phy/phy-am335x.c
index 0e3c60cb669a..12fc3468a01e 100644
--- a/drivers/usb/phy/phy-am335x.c
+++ b/drivers/usb/phy/phy-am335x.c
@@ -63,6 +63,19 @@ static int am335x_phy_probe(struct platform_device *pdev)
63 am_phy->usb_phy_gen.phy.shutdown = am335x_shutdown; 63 am_phy->usb_phy_gen.phy.shutdown = am335x_shutdown;
64 64
65 platform_set_drvdata(pdev, am_phy); 65 platform_set_drvdata(pdev, am_phy);
66 device_init_wakeup(dev, true);
67
68 /*
69 * If we leave PHY wakeup enabled then AM33XX wakes up
70 * immediately from DS0. To avoid this we mark dev->power.can_wakeup
71 * to false. The same is checked in suspend routine to decide
72 * on whether to enable PHY wakeup or not.
73 * PHY wakeup works fine in standby mode, there by allowing us to
74 * handle remote wakeup, wakeup on disconnect and connect.
75 */
76
77 device_set_wakeup_enable(dev, false);
78 phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, false);
66 79
67 return 0; 80 return 0;
68} 81}
@@ -75,38 +88,48 @@ static int am335x_phy_remove(struct platform_device *pdev)
75 return 0; 88 return 0;
76} 89}
77 90
78#ifdef CONFIG_PM_RUNTIME 91#ifdef CONFIG_PM_SLEEP
79 92static int am335x_phy_suspend(struct device *dev)
80static int am335x_phy_runtime_suspend(struct device *dev)
81{ 93{
82 struct platform_device *pdev = to_platform_device(dev); 94 struct platform_device *pdev = to_platform_device(dev);
83 struct am335x_phy *am_phy = platform_get_drvdata(pdev); 95 struct am335x_phy *am_phy = platform_get_drvdata(pdev);
84 96
97 /*
98 * Enable phy wakeup only if dev->power.can_wakeup is true.
99 * Make sure to enable wakeup to support remote wakeup in
100 * standby mode ( same is not supported in OFF(DS0) mode).
101 * Enable it by doing
102 * echo enabled > /sys/bus/platform/devices/<usb-phy-id>/power/wakeup
103 */
104
85 if (device_may_wakeup(dev)) 105 if (device_may_wakeup(dev))
86 phy_ctrl_wkup(am_phy->phy_ctrl, am_phy->id, true); 106 phy_ctrl_wkup(am_phy->phy_ctrl, am_phy->id, true);
107
87 phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, false); 108 phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, false);
109
88 return 0; 110 return 0;
89} 111}
90 112
91static int am335x_phy_runtime_resume(struct device *dev) 113static int am335x_phy_resume(struct device *dev)
92{ 114{
93 struct platform_device *pdev = to_platform_device(dev); 115 struct platform_device *pdev = to_platform_device(dev);
94 struct am335x_phy *am_phy = platform_get_drvdata(pdev); 116 struct am335x_phy *am_phy = platform_get_drvdata(pdev);
95 117
96 phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, true); 118 phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, true);
119
97 if (device_may_wakeup(dev)) 120 if (device_may_wakeup(dev))
98 phy_ctrl_wkup(am_phy->phy_ctrl, am_phy->id, false); 121 phy_ctrl_wkup(am_phy->phy_ctrl, am_phy->id, false);
122
99 return 0; 123 return 0;
100} 124}
101 125
102static const struct dev_pm_ops am335x_pm_ops = { 126static const struct dev_pm_ops am335x_pm_ops = {
103 SET_RUNTIME_PM_OPS(am335x_phy_runtime_suspend, 127 SET_SYSTEM_SLEEP_PM_OPS(am335x_phy_suspend, am335x_phy_resume)
104 am335x_phy_runtime_resume, NULL)
105}; 128};
106 129
107#define DEV_PM_OPS (&am335x_pm_ops) 130#define DEV_PM_OPS (&am335x_pm_ops)
108#else 131#else
109#define DEV_PM_OPS NULL 132#define DEV_PM_OPS NULL
110#endif 133#endif
111 134
112static const struct of_device_id am335x_phy_ids[] = { 135static const struct of_device_id am335x_phy_ids[] = {
diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/phy-fsl-usb.c
index 7f3c73b967ce..2b0f968d9325 100644
--- a/drivers/usb/phy/phy-fsl-usb.c
+++ b/drivers/usb/phy/phy-fsl-usb.c
@@ -27,7 +27,6 @@
27#include <linux/slab.h> 27#include <linux/slab.h>
28#include <linux/proc_fs.h> 28#include <linux/proc_fs.h>
29#include <linux/errno.h> 29#include <linux/errno.h>
30#include <linux/init.h>
31#include <linux/interrupt.h> 30#include <linux/interrupt.h>
32#include <linux/io.h> 31#include <linux/io.h>
33#include <linux/timer.h> 32#include <linux/timer.h>
@@ -848,7 +847,7 @@ static int fsl_otg_conf(struct platform_device *pdev)
848 pr_info("Couldn't init OTG timers\n"); 847 pr_info("Couldn't init OTG timers\n");
849 goto err; 848 goto err;
850 } 849 }
851 spin_lock_init(&fsl_otg_tc->fsm.lock); 850 mutex_init(&fsl_otg_tc->fsm.lock);
852 851
853 /* Set OTG state machine operations */ 852 /* Set OTG state machine operations */
854 fsl_otg_tc->fsm.ops = &fsl_otg_ops; 853 fsl_otg_tc->fsm.ops = &fsl_otg_ops;
@@ -1017,10 +1016,9 @@ static int show_fsl_usb2_otg_state(struct device *dev,
1017 struct otg_fsm *fsm = &fsl_otg_dev->fsm; 1016 struct otg_fsm *fsm = &fsl_otg_dev->fsm;
1018 char *next = buf; 1017 char *next = buf;
1019 unsigned size = PAGE_SIZE; 1018 unsigned size = PAGE_SIZE;
1020 unsigned long flags;
1021 int t; 1019 int t;
1022 1020
1023 spin_lock_irqsave(&fsm->lock, flags); 1021 mutex_lock(&fsm->lock);
1024 1022
1025 /* basic driver infomation */ 1023 /* basic driver infomation */
1026 t = scnprintf(next, size, 1024 t = scnprintf(next, size,
@@ -1088,7 +1086,7 @@ static int show_fsl_usb2_otg_state(struct device *dev,
1088 size -= t; 1086 size -= t;
1089 next += t; 1087 next += t;
1090 1088
1091 spin_unlock_irqrestore(&fsm->lock, flags); 1089 mutex_unlock(&fsm->lock);
1092 1090
1093 return PAGE_SIZE - size; 1091 return PAGE_SIZE - size;
1094} 1092}
diff --git a/drivers/usb/phy/phy-fsl-usb.h b/drivers/usb/phy/phy-fsl-usb.h
index 7365170a2f23..5986c96354df 100644
--- a/drivers/usb/phy/phy-fsl-usb.h
+++ b/drivers/usb/phy/phy-fsl-usb.h
@@ -15,7 +15,7 @@
15 * 675 Mass Ave, Cambridge, MA 02139, USA. 15 * 675 Mass Ave, Cambridge, MA 02139, USA.
16 */ 16 */
17 17
18#include "phy-fsm-usb.h" 18#include <linux/usb/otg-fsm.h>
19#include <linux/usb/otg.h> 19#include <linux/usb/otg.h>
20#include <linux/ioctl.h> 20#include <linux/ioctl.h>
21 21
diff --git a/drivers/usb/phy/phy-fsm-usb.c b/drivers/usb/phy/phy-fsm-usb.c
index 329c2d2f8595..7aa314ef4a8a 100644
--- a/drivers/usb/phy/phy-fsm-usb.c
+++ b/drivers/usb/phy/phy-fsm-usb.c
@@ -23,13 +23,12 @@
23 23
24#include <linux/kernel.h> 24#include <linux/kernel.h>
25#include <linux/types.h> 25#include <linux/types.h>
26#include <linux/spinlock.h> 26#include <linux/mutex.h>
27#include <linux/delay.h> 27#include <linux/delay.h>
28#include <linux/usb.h> 28#include <linux/usb.h>
29#include <linux/usb/gadget.h> 29#include <linux/usb/gadget.h>
30#include <linux/usb/otg.h> 30#include <linux/usb/otg.h>
31 31#include <linux/usb/otg-fsm.h>
32#include "phy-fsm-usb.h"
33 32
34/* Change USB protocol when there is a protocol change */ 33/* Change USB protocol when there is a protocol change */
35static int otg_set_protocol(struct otg_fsm *fsm, int protocol) 34static int otg_set_protocol(struct otg_fsm *fsm, int protocol)
@@ -65,7 +64,7 @@ static int otg_set_protocol(struct otg_fsm *fsm, int protocol)
65static int state_changed; 64static int state_changed;
66 65
67/* Called when leaving a state. Do state clean up jobs here */ 66/* Called when leaving a state. Do state clean up jobs here */
68void otg_leave_state(struct otg_fsm *fsm, enum usb_otg_state old_state) 67static void otg_leave_state(struct otg_fsm *fsm, enum usb_otg_state old_state)
69{ 68{
70 switch (old_state) { 69 switch (old_state) {
71 case OTG_STATE_B_IDLE: 70 case OTG_STATE_B_IDLE:
@@ -122,7 +121,7 @@ void otg_leave_state(struct otg_fsm *fsm, enum usb_otg_state old_state)
122} 121}
123 122
124/* Called when entering a state */ 123/* Called when entering a state */
125int otg_set_state(struct otg_fsm *fsm, enum usb_otg_state new_state) 124static int otg_set_state(struct otg_fsm *fsm, enum usb_otg_state new_state)
126{ 125{
127 state_changed = 1; 126 state_changed = 1;
128 if (fsm->otg->phy->state == new_state) 127 if (fsm->otg->phy->state == new_state)
@@ -245,9 +244,8 @@ int otg_set_state(struct otg_fsm *fsm, enum usb_otg_state new_state)
245int otg_statemachine(struct otg_fsm *fsm) 244int otg_statemachine(struct otg_fsm *fsm)
246{ 245{
247 enum usb_otg_state state; 246 enum usb_otg_state state;
248 unsigned long flags;
249 247
250 spin_lock_irqsave(&fsm->lock, flags); 248 mutex_lock(&fsm->lock);
251 249
252 state = fsm->otg->phy->state; 250 state = fsm->otg->phy->state;
253 state_changed = 0; 251 state_changed = 0;
@@ -359,7 +357,7 @@ int otg_statemachine(struct otg_fsm *fsm)
359 default: 357 default:
360 break; 358 break;
361 } 359 }
362 spin_unlock_irqrestore(&fsm->lock, flags); 360 mutex_unlock(&fsm->lock);
363 361
364 VDBG("quit statemachine, changed = %d\n", state_changed); 362 VDBG("quit statemachine, changed = %d\n", state_changed);
365 return state_changed; 363 return state_changed;
diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index aa6d37b3378a..bb394980532b 100644
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -241,7 +241,6 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_gen_xceiv *nop,
241 nop->phy.otg->set_host = nop_set_host; 241 nop->phy.otg->set_host = nop_set_host;
242 nop->phy.otg->set_peripheral = nop_set_peripheral; 242 nop->phy.otg->set_peripheral = nop_set_peripheral;
243 243
244 ATOMIC_INIT_NOTIFIER_HEAD(&nop->phy.notifier);
245 return 0; 244 return 0;
246} 245}
247EXPORT_SYMBOL_GPL(usb_phy_gen_create_phy); 246EXPORT_SYMBOL_GPL(usb_phy_gen_create_phy);
diff --git a/drivers/usb/phy/phy-gpio-vbus-usb.c b/drivers/usb/phy/phy-gpio-vbus-usb.c
index 02799a5efcd4..69462e09d014 100644
--- a/drivers/usb/phy/phy-gpio-vbus-usb.c
+++ b/drivers/usb/phy/phy-gpio-vbus-usb.c
@@ -314,8 +314,6 @@ static int gpio_vbus_probe(struct platform_device *pdev)
314 goto err_irq; 314 goto err_irq;
315 } 315 }
316 316
317 ATOMIC_INIT_NOTIFIER_HEAD(&gpio_vbus->phy.notifier);
318
319 INIT_DELAYED_WORK(&gpio_vbus->work, gpio_vbus_work); 317 INIT_DELAYED_WORK(&gpio_vbus->work, gpio_vbus_work);
320 318
321 gpio_vbus->vbus_draw = regulator_get(&pdev->dev, "vbus_draw"); 319 gpio_vbus->vbus_draw = regulator_get(&pdev->dev, "vbus_draw");
diff --git a/drivers/usb/phy/phy-isp1301-omap.c b/drivers/usb/phy/phy-isp1301-omap.c
index d3a5160e4cc7..6e146d723b37 100644
--- a/drivers/usb/phy/phy-isp1301-omap.c
+++ b/drivers/usb/phy/phy-isp1301-omap.c
@@ -1277,7 +1277,7 @@ isp1301_set_host(struct usb_otg *otg, struct usb_bus *host)
1277{ 1277{
1278 struct isp1301 *isp = container_of(otg->phy, struct isp1301, phy); 1278 struct isp1301 *isp = container_of(otg->phy, struct isp1301, phy);
1279 1279
1280 if (!otg || isp != the_transceiver) 1280 if (isp != the_transceiver)
1281 return -ENODEV; 1281 return -ENODEV;
1282 1282
1283 if (!host) { 1283 if (!host) {
@@ -1333,7 +1333,7 @@ isp1301_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget)
1333{ 1333{
1334 struct isp1301 *isp = container_of(otg->phy, struct isp1301, phy); 1334 struct isp1301 *isp = container_of(otg->phy, struct isp1301, phy);
1335 1335
1336 if (!otg || isp != the_transceiver) 1336 if (isp != the_transceiver)
1337 return -ENODEV; 1337 return -ENODEV;
1338 1338
1339 if (!gadget) { 1339 if (!gadget) {
@@ -1414,8 +1414,7 @@ isp1301_start_srp(struct usb_otg *otg)
1414 struct isp1301 *isp = container_of(otg->phy, struct isp1301, phy); 1414 struct isp1301 *isp = container_of(otg->phy, struct isp1301, phy);
1415 u32 otg_ctrl; 1415 u32 otg_ctrl;
1416 1416
1417 if (!otg || isp != the_transceiver 1417 if (isp != the_transceiver || isp->phy.state != OTG_STATE_B_IDLE)
1418 || isp->phy.state != OTG_STATE_B_IDLE)
1419 return -ENODEV; 1418 return -ENODEV;
1420 1419
1421 otg_ctrl = omap_readl(OTG_CTRL); 1420 otg_ctrl = omap_readl(OTG_CTRL);
@@ -1442,7 +1441,7 @@ isp1301_start_hnp(struct usb_otg *otg)
1442 struct isp1301 *isp = container_of(otg->phy, struct isp1301, phy); 1441 struct isp1301 *isp = container_of(otg->phy, struct isp1301, phy);
1443 u32 l; 1442 u32 l;
1444 1443
1445 if (!otg || isp != the_transceiver) 1444 if (isp != the_transceiver)
1446 return -ENODEV; 1445 return -ENODEV;
1447 if (otg->default_a && (otg->host == NULL || !otg->host->b_hnp_enable)) 1446 if (otg->default_a && (otg->host == NULL || !otg->host->b_hnp_enable))
1448 return -ENOTCONN; 1447 return -ENOTCONN;
diff --git a/drivers/usb/phy/phy-keystone.c b/drivers/usb/phy/phy-keystone.c
new file mode 100644
index 000000000000..d762003896c0
--- /dev/null
+++ b/drivers/usb/phy/phy-keystone.c
@@ -0,0 +1,136 @@
1/*
2 * phy-keystone - USB PHY, talking to dwc3 controller in Keystone.
3 *
4 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * Author: WingMan Kwok <w-kwok2@ti.com>
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 */
18
19#include <linux/module.h>
20#include <linux/platform_device.h>
21#include <linux/usb/usb_phy_gen_xceiv.h>
22#include <linux/io.h>
23#include <linux/of.h>
24
25#include "phy-generic.h"
26
27/* USB PHY control register offsets */
28#define USB_PHY_CTL_UTMI 0x0000
29#define USB_PHY_CTL_PIPE 0x0004
30#define USB_PHY_CTL_PARAM_1 0x0008
31#define USB_PHY_CTL_PARAM_2 0x000c
32#define USB_PHY_CTL_CLOCK 0x0010
33#define USB_PHY_CTL_PLL 0x0014
34
35#define PHY_REF_SSP_EN BIT(29)
36
37struct keystone_usbphy {
38 struct usb_phy_gen_xceiv usb_phy_gen;
39 void __iomem *phy_ctrl;
40};
41
42static inline u32 keystone_usbphy_readl(void __iomem *base, u32 offset)
43{
44 return readl(base + offset);
45}
46
47static inline void keystone_usbphy_writel(void __iomem *base,
48 u32 offset, u32 value)
49{
50 writel(value, base + offset);
51}
52
53static int keystone_usbphy_init(struct usb_phy *phy)
54{
55 struct keystone_usbphy *k_phy = dev_get_drvdata(phy->dev);
56 u32 val;
57
58 val = keystone_usbphy_readl(k_phy->phy_ctrl, USB_PHY_CTL_CLOCK);
59 keystone_usbphy_writel(k_phy->phy_ctrl, USB_PHY_CTL_CLOCK,
60 val | PHY_REF_SSP_EN);
61 return 0;
62}
63
64static void keystone_usbphy_shutdown(struct usb_phy *phy)
65{
66 struct keystone_usbphy *k_phy = dev_get_drvdata(phy->dev);
67 u32 val;
68
69 val = keystone_usbphy_readl(k_phy->phy_ctrl, USB_PHY_CTL_CLOCK);
70 keystone_usbphy_writel(k_phy->phy_ctrl, USB_PHY_CTL_CLOCK,
71 val &= ~PHY_REF_SSP_EN);
72}
73
74static int keystone_usbphy_probe(struct platform_device *pdev)
75{
76 struct device *dev = &pdev->dev;
77 struct keystone_usbphy *k_phy;
78 struct resource *res;
79 int ret;
80
81 k_phy = devm_kzalloc(dev, sizeof(*k_phy), GFP_KERNEL);
82 if (!k_phy)
83 return -ENOMEM;
84
85 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
86 k_phy->phy_ctrl = devm_ioremap_resource(dev, res);
87 if (IS_ERR(k_phy->phy_ctrl))
88 return PTR_ERR(k_phy->phy_ctrl);
89
90 ret = usb_phy_gen_create_phy(dev, &k_phy->usb_phy_gen, NULL);
91 if (ret)
92 return ret;
93
94 k_phy->usb_phy_gen.phy.init = keystone_usbphy_init;
95 k_phy->usb_phy_gen.phy.shutdown = keystone_usbphy_shutdown;
96
97 platform_set_drvdata(pdev, k_phy);
98
99 ret = usb_add_phy_dev(&k_phy->usb_phy_gen.phy);
100 if (ret)
101 return ret;
102
103 return 0;
104}
105
106static int keystone_usbphy_remove(struct platform_device *pdev)
107{
108 struct keystone_usbphy *k_phy = platform_get_drvdata(pdev);
109
110 usb_remove_phy(&k_phy->usb_phy_gen.phy);
111
112 return 0;
113}
114
115static const struct of_device_id keystone_usbphy_ids[] = {
116 { .compatible = "ti,keystone-usbphy" },
117 { }
118};
119MODULE_DEVICE_TABLE(of, keystone_usbphy_ids);
120
121static struct platform_driver keystone_usbphy_driver = {
122 .probe = keystone_usbphy_probe,
123 .remove = keystone_usbphy_remove,
124 .driver = {
125 .name = "keystone-usbphy",
126 .owner = THIS_MODULE,
127 .of_match_table = keystone_usbphy_ids,
128 },
129};
130
131module_platform_driver(keystone_usbphy_driver);
132
133MODULE_ALIAS("platform:keystone-usbphy");
134MODULE_AUTHOR("Texas Instruments Inc.");
135MODULE_DESCRIPTION("Keystone USB phy driver");
136MODULE_LICENSE("GPL v2");
diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index e9d4cd960ecd..37752832b770 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -669,6 +669,7 @@ static void msm_otg_start_host(struct usb_phy *phy, int on)
669 pdata->setup_gpio(OTG_STATE_A_HOST); 669 pdata->setup_gpio(OTG_STATE_A_HOST);
670#ifdef CONFIG_USB 670#ifdef CONFIG_USB
671 usb_add_hcd(hcd, hcd->irq, IRQF_SHARED); 671 usb_add_hcd(hcd, hcd->irq, IRQF_SHARED);
672 device_wakeup_enable(hcd->self.controller);
672#endif 673#endif
673 } else { 674 } else {
674 dev_dbg(phy->dev, "host off\n"); 675 dev_dbg(phy->dev, "host off\n");
diff --git a/drivers/usb/phy/phy-mv-usb.c b/drivers/usb/phy/phy-mv-usb.c
index 98f6ac6a78ea..7d80c54f0ac6 100644
--- a/drivers/usb/phy/phy-mv-usb.c
+++ b/drivers/usb/phy/phy-mv-usb.c
@@ -11,7 +11,6 @@
11 11
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/io.h> 14#include <linux/io.h>
16#include <linux/uaccess.h> 15#include <linux/uaccess.h>
17#include <linux/device.h> 16#include <linux/device.h>
@@ -213,10 +212,12 @@ static void mv_otg_start_host(struct mv_otg *mvotg, int on)
213 212
214 hcd = bus_to_hcd(otg->host); 213 hcd = bus_to_hcd(otg->host);
215 214
216 if (on) 215 if (on) {
217 usb_add_hcd(hcd, hcd->irq, IRQF_SHARED); 216 usb_add_hcd(hcd, hcd->irq, IRQF_SHARED);
218 else 217 device_wakeup_enable(hcd->self.controller);
218 } else {
219 usb_remove_hcd(hcd); 219 usb_remove_hcd(hcd);
220 }
220#endif /* CONFIG_USB */ 221#endif /* CONFIG_USB */
221} 222}
222 223
diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c
index 545844b7e796..b42897b6474c 100644
--- a/drivers/usb/phy/phy-mxs-usb.c
+++ b/drivers/usb/phy/phy-mxs-usb.c
@@ -63,9 +63,13 @@ static int mxs_phy_hw_init(struct mxs_phy *mxs_phy)
63 63
64static int mxs_phy_init(struct usb_phy *phy) 64static int mxs_phy_init(struct usb_phy *phy)
65{ 65{
66 int ret;
66 struct mxs_phy *mxs_phy = to_mxs_phy(phy); 67 struct mxs_phy *mxs_phy = to_mxs_phy(phy);
67 68
68 clk_prepare_enable(mxs_phy->clk); 69 ret = clk_prepare_enable(mxs_phy->clk);
70 if (ret)
71 return ret;
72
69 return mxs_phy_hw_init(mxs_phy); 73 return mxs_phy_hw_init(mxs_phy);
70} 74}
71 75
@@ -81,6 +85,7 @@ static void mxs_phy_shutdown(struct usb_phy *phy)
81 85
82static int mxs_phy_suspend(struct usb_phy *x, int suspend) 86static int mxs_phy_suspend(struct usb_phy *x, int suspend)
83{ 87{
88 int ret;
84 struct mxs_phy *mxs_phy = to_mxs_phy(x); 89 struct mxs_phy *mxs_phy = to_mxs_phy(x);
85 90
86 if (suspend) { 91 if (suspend) {
@@ -89,7 +94,9 @@ static int mxs_phy_suspend(struct usb_phy *x, int suspend)
89 x->io_priv + HW_USBPHY_CTRL_SET); 94 x->io_priv + HW_USBPHY_CTRL_SET);
90 clk_disable_unprepare(mxs_phy->clk); 95 clk_disable_unprepare(mxs_phy->clk);
91 } else { 96 } else {
92 clk_prepare_enable(mxs_phy->clk); 97 ret = clk_prepare_enable(mxs_phy->clk);
98 if (ret)
99 return ret;
93 writel(BM_USBPHY_CTRL_CLKGATE, 100 writel(BM_USBPHY_CTRL_CLKGATE,
94 x->io_priv + HW_USBPHY_CTRL_CLR); 101 x->io_priv + HW_USBPHY_CTRL_CLR);
95 writel(0, x->io_priv + HW_USBPHY_PWD); 102 writel(0, x->io_priv + HW_USBPHY_PWD);
@@ -160,8 +167,6 @@ static int mxs_phy_probe(struct platform_device *pdev)
160 mxs_phy->phy.notify_disconnect = mxs_phy_on_disconnect; 167 mxs_phy->phy.notify_disconnect = mxs_phy_on_disconnect;
161 mxs_phy->phy.type = USB_PHY_TYPE_USB2; 168 mxs_phy->phy.type = USB_PHY_TYPE_USB2;
162 169
163 ATOMIC_INIT_NOTIFIER_HEAD(&mxs_phy->phy.notifier);
164
165 mxs_phy->clk = clk; 170 mxs_phy->clk = clk;
166 171
167 platform_set_drvdata(pdev, mxs_phy); 172 platform_set_drvdata(pdev, mxs_phy);
diff --git a/drivers/usb/phy/phy-omap-control.c b/drivers/usb/phy/phy-omap-control.c
index 09c5ace1edd8..e7253182e47d 100644
--- a/drivers/usb/phy/phy-omap-control.c
+++ b/drivers/usb/phy/phy-omap-control.c
@@ -84,6 +84,20 @@ void omap_control_usb_phy_power(struct device *dev, int on)
84 else 84 else
85 val |= OMAP_CTRL_USB2_PHY_PD; 85 val |= OMAP_CTRL_USB2_PHY_PD;
86 break; 86 break;
87
88 case OMAP_CTRL_TYPE_AM437USB2:
89 if (on) {
90 val &= ~(AM437X_CTRL_USB2_PHY_PD |
91 AM437X_CTRL_USB2_OTG_PD);
92 val |= (AM437X_CTRL_USB2_OTGVDET_EN |
93 AM437X_CTRL_USB2_OTGSESSEND_EN);
94 } else {
95 val &= ~(AM437X_CTRL_USB2_OTGVDET_EN |
96 AM437X_CTRL_USB2_OTGSESSEND_EN);
97 val |= (AM437X_CTRL_USB2_PHY_PD |
98 AM437X_CTRL_USB2_OTG_PD);
99 }
100 break;
87 default: 101 default:
88 dev_err(dev, "%s: type %d not recognized\n", 102 dev_err(dev, "%s: type %d not recognized\n",
89 __func__, control_usb->type); 103 __func__, control_usb->type);
@@ -197,6 +211,7 @@ static const enum omap_control_usb_type otghs_data = OMAP_CTRL_TYPE_OTGHS;
197static const enum omap_control_usb_type usb2_data = OMAP_CTRL_TYPE_USB2; 211static const enum omap_control_usb_type usb2_data = OMAP_CTRL_TYPE_USB2;
198static const enum omap_control_usb_type pipe3_data = OMAP_CTRL_TYPE_PIPE3; 212static const enum omap_control_usb_type pipe3_data = OMAP_CTRL_TYPE_PIPE3;
199static const enum omap_control_usb_type dra7usb2_data = OMAP_CTRL_TYPE_DRA7USB2; 213static const enum omap_control_usb_type dra7usb2_data = OMAP_CTRL_TYPE_DRA7USB2;
214static const enum omap_control_usb_type am437usb2_data = OMAP_CTRL_TYPE_AM437USB2;
200 215
201static const struct of_device_id omap_control_usb_id_table[] = { 216static const struct of_device_id omap_control_usb_id_table[] = {
202 { 217 {
@@ -215,6 +230,10 @@ static const struct of_device_id omap_control_usb_id_table[] = {
215 .compatible = "ti,control-phy-dra7usb2", 230 .compatible = "ti,control-phy-dra7usb2",
216 .data = &dra7usb2_data, 231 .data = &dra7usb2_data,
217 }, 232 },
233 {
234 .compatible = "ti,control-phy-am437usb2",
235 .data = &am437usb2_data,
236 },
218 {}, 237 {},
219}; 238};
220MODULE_DEVICE_TABLE(of, omap_control_usb_id_table); 239MODULE_DEVICE_TABLE(of, omap_control_usb_id_table);
diff --git a/drivers/usb/phy/phy-omap-otg.c b/drivers/usb/phy/phy-omap-otg.c
new file mode 100644
index 000000000000..11598cdb3189
--- /dev/null
+++ b/drivers/usb/phy/phy-omap-otg.c
@@ -0,0 +1,169 @@
1/*
2 * OMAP OTG controller driver
3 *
4 * Based on code from tahvo-usb.c and isp1301_omap.c drivers.
5 *
6 * Copyright (C) 2005-2006 Nokia Corporation
7 * Copyright (C) 2004 Texas Instruments
8 * Copyright (C) 2004 David Brownell
9 *
10 * This file is subject to the terms and conditions of the GNU General
11 * Public License. See the file "COPYING" in the main directory of this
12 * archive for more details.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 */
19
20#include <linux/io.h>
21#include <linux/err.h>
22#include <linux/extcon.h>
23#include <linux/kernel.h>
24#include <linux/module.h>
25#include <linux/interrupt.h>
26#include <linux/platform_device.h>
27#include <linux/platform_data/usb-omap1.h>
28
29struct otg_device {
30 void __iomem *base;
31 bool id;
32 bool vbus;
33 struct extcon_specific_cable_nb vbus_dev;
34 struct extcon_specific_cable_nb id_dev;
35 struct notifier_block vbus_nb;
36 struct notifier_block id_nb;
37};
38
39#define OMAP_OTG_CTRL 0x0c
40#define OMAP_OTG_ASESSVLD (1 << 20)
41#define OMAP_OTG_BSESSEND (1 << 19)
42#define OMAP_OTG_BSESSVLD (1 << 18)
43#define OMAP_OTG_VBUSVLD (1 << 17)
44#define OMAP_OTG_ID (1 << 16)
45#define OMAP_OTG_XCEIV_OUTPUTS \
46 (OMAP_OTG_ASESSVLD | OMAP_OTG_BSESSEND | OMAP_OTG_BSESSVLD | \
47 OMAP_OTG_VBUSVLD | OMAP_OTG_ID)
48
49static void omap_otg_ctrl(struct otg_device *otg_dev, u32 outputs)
50{
51 u32 l;
52
53 l = readl(otg_dev->base + OMAP_OTG_CTRL);
54 l &= ~OMAP_OTG_XCEIV_OUTPUTS;
55 l |= outputs;
56 writel(l, otg_dev->base + OMAP_OTG_CTRL);
57}
58
59static void omap_otg_set_mode(struct otg_device *otg_dev)
60{
61 if (!otg_dev->id && otg_dev->vbus)
62 /* Set B-session valid. */
63 omap_otg_ctrl(otg_dev, OMAP_OTG_ID | OMAP_OTG_BSESSVLD);
64 else if (otg_dev->vbus)
65 /* Set A-session valid. */
66 omap_otg_ctrl(otg_dev, OMAP_OTG_ASESSVLD);
67 else if (!otg_dev->id)
68 /* Set B-session end to indicate no VBUS. */
69 omap_otg_ctrl(otg_dev, OMAP_OTG_ID | OMAP_OTG_BSESSEND);
70}
71
72static int omap_otg_id_notifier(struct notifier_block *nb,
73 unsigned long event, void *ptr)
74{
75 struct otg_device *otg_dev = container_of(nb, struct otg_device, id_nb);
76
77 otg_dev->id = event;
78 omap_otg_set_mode(otg_dev);
79
80 return NOTIFY_DONE;
81}
82
83static int omap_otg_vbus_notifier(struct notifier_block *nb,
84 unsigned long event, void *ptr)
85{
86 struct otg_device *otg_dev = container_of(nb, struct otg_device,
87 vbus_nb);
88
89 otg_dev->vbus = event;
90 omap_otg_set_mode(otg_dev);
91
92 return NOTIFY_DONE;
93}
94
95static int omap_otg_probe(struct platform_device *pdev)
96{
97 const struct omap_usb_config *config = pdev->dev.platform_data;
98 struct otg_device *otg_dev;
99 struct extcon_dev *extcon;
100 int ret;
101 u32 rev;
102
103 if (!config || !config->extcon)
104 return -ENODEV;
105
106 extcon = extcon_get_extcon_dev(config->extcon);
107 if (!extcon)
108 return -EPROBE_DEFER;
109
110 otg_dev = devm_kzalloc(&pdev->dev, sizeof(*otg_dev), GFP_KERNEL);
111 if (!otg_dev)
112 return -ENOMEM;
113
114 otg_dev->base = devm_ioremap_resource(&pdev->dev, &pdev->resource[0]);
115 if (IS_ERR(otg_dev->base))
116 return PTR_ERR(otg_dev->base);
117
118 otg_dev->id_nb.notifier_call = omap_otg_id_notifier;
119 otg_dev->vbus_nb.notifier_call = omap_otg_vbus_notifier;
120
121 ret = extcon_register_interest(&otg_dev->id_dev, config->extcon,
122 "USB-HOST", &otg_dev->id_nb);
123 if (ret)
124 return ret;
125
126 ret = extcon_register_interest(&otg_dev->vbus_dev, config->extcon,
127 "USB", &otg_dev->vbus_nb);
128 if (ret) {
129 extcon_unregister_interest(&otg_dev->id_dev);
130 return ret;
131 }
132
133 otg_dev->id = extcon_get_cable_state(extcon, "USB-HOST");
134 otg_dev->vbus = extcon_get_cable_state(extcon, "USB");
135 omap_otg_set_mode(otg_dev);
136
137 rev = readl(otg_dev->base);
138
139 dev_info(&pdev->dev,
140 "OMAP USB OTG controller rev %d.%d (%s, id=%d, vbus=%d)\n",
141 (rev >> 4) & 0xf, rev & 0xf, config->extcon, otg_dev->id,
142 otg_dev->vbus);
143
144 return 0;
145}
146
147static int omap_otg_remove(struct platform_device *pdev)
148{
149 struct otg_device *otg_dev = platform_get_drvdata(pdev);
150
151 extcon_unregister_interest(&otg_dev->id_dev);
152 extcon_unregister_interest(&otg_dev->vbus_dev);
153
154 return 0;
155}
156
157static struct platform_driver omap_otg_driver = {
158 .probe = omap_otg_probe,
159 .remove = omap_otg_remove,
160 .driver = {
161 .owner = THIS_MODULE,
162 .name = "omap_otg",
163 },
164};
165module_platform_driver(omap_otg_driver);
166
167MODULE_DESCRIPTION("OMAP USB OTG controller driver");
168MODULE_LICENSE("GPL");
169MODULE_AUTHOR("Aaro Koskinen <aaro.koskinen@iki.fi>");
diff --git a/drivers/usb/phy/phy-rcar-gen2-usb.c b/drivers/usb/phy/phy-rcar-gen2-usb.c
index db3ab34cddb4..551e0a6c0e22 100644
--- a/drivers/usb/phy/phy-rcar-gen2-usb.c
+++ b/drivers/usb/phy/phy-rcar-gen2-usb.c
@@ -213,7 +213,7 @@ static int rcar_gen2_usb_phy_probe(struct platform_device *pdev)
213 priv->phy.shutdown = rcar_gen2_usb_phy_shutdown; 213 priv->phy.shutdown = rcar_gen2_usb_phy_shutdown;
214 priv->phy.set_suspend = rcar_gen2_usb_phy_set_suspend; 214 priv->phy.set_suspend = rcar_gen2_usb_phy_set_suspend;
215 215
216 retval = usb_add_phy(&priv->phy, USB_PHY_TYPE_USB2); 216 retval = usb_add_phy_dev(&priv->phy);
217 if (retval < 0) { 217 if (retval < 0) {
218 dev_err(dev, "Failed to add USB phy\n"); 218 dev_err(dev, "Failed to add USB phy\n");
219 return retval; 219 return retval;
diff --git a/drivers/usb/phy/phy-tahvo.c b/drivers/usb/phy/phy-tahvo.c
new file mode 100644
index 000000000000..cc61ee44b911
--- /dev/null
+++ b/drivers/usb/phy/phy-tahvo.c
@@ -0,0 +1,457 @@
1/*
2 * Tahvo USB transceiver driver
3 *
4 * Copyright (C) 2005-2006 Nokia Corporation
5 *
6 * Parts copied from isp1301_omap.c.
7 * Copyright (C) 2004 Texas Instruments
8 * Copyright (C) 2004 David Brownell
9 *
10 * Original driver written by Juha Yrjölä, Tony Lindgren and Timo Teräs.
11 * Modified for Retu/Tahvo MFD by Aaro Koskinen.
12 *
13 * This file is subject to the terms and conditions of the GNU General
14 * Public License. See the file "COPYING" in the main directory of this
15 * archive for more details.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 */
22
23#include <linux/io.h>
24#include <linux/clk.h>
25#include <linux/usb.h>
26#include <linux/extcon.h>
27#include <linux/kernel.h>
28#include <linux/module.h>
29#include <linux/usb/otg.h>
30#include <linux/mfd/retu.h>
31#include <linux/usb/gadget.h>
32#include <linux/platform_device.h>
33
34#define DRIVER_NAME "tahvo-usb"
35
36#define TAHVO_REG_IDSR 0x02
37#define TAHVO_REG_USBR 0x06
38
39#define USBR_SLAVE_CONTROL (1 << 8)
40#define USBR_VPPVIO_SW (1 << 7)
41#define USBR_SPEED (1 << 6)
42#define USBR_REGOUT (1 << 5)
43#define USBR_MASTER_SW2 (1 << 4)
44#define USBR_MASTER_SW1 (1 << 3)
45#define USBR_SLAVE_SW (1 << 2)
46#define USBR_NSUSPEND (1 << 1)
47#define USBR_SEMODE (1 << 0)
48
49#define TAHVO_MODE_HOST 0
50#define TAHVO_MODE_PERIPHERAL 1
51
52struct tahvo_usb {
53 struct platform_device *pt_dev;
54 struct usb_phy phy;
55 int vbus_state;
56 struct mutex serialize;
57 struct clk *ick;
58 int irq;
59 int tahvo_mode;
60 struct extcon_dev extcon;
61};
62
63static const char *tahvo_cable[] = {
64 "USB-HOST",
65 "USB",
66 NULL,
67};
68
69static ssize_t vbus_state_show(struct device *device,
70 struct device_attribute *attr, char *buf)
71{
72 struct tahvo_usb *tu = dev_get_drvdata(device);
73 return sprintf(buf, "%s\n", tu->vbus_state ? "on" : "off");
74}
75static DEVICE_ATTR(vbus, 0444, vbus_state_show, NULL);
76
77static void check_vbus_state(struct tahvo_usb *tu)
78{
79 struct retu_dev *rdev = dev_get_drvdata(tu->pt_dev->dev.parent);
80 int reg, prev_state;
81
82 reg = retu_read(rdev, TAHVO_REG_IDSR);
83 if (reg & TAHVO_STAT_VBUS) {
84 switch (tu->phy.state) {
85 case OTG_STATE_B_IDLE:
86 /* Enable the gadget driver */
87 if (tu->phy.otg->gadget)
88 usb_gadget_vbus_connect(tu->phy.otg->gadget);
89 tu->phy.state = OTG_STATE_B_PERIPHERAL;
90 break;
91 case OTG_STATE_A_IDLE:
92 /*
93 * Session is now valid assuming the USB hub is driving
94 * Vbus.
95 */
96 tu->phy.state = OTG_STATE_A_HOST;
97 break;
98 default:
99 break;
100 }
101 dev_info(&tu->pt_dev->dev, "USB cable connected\n");
102 } else {
103 switch (tu->phy.state) {
104 case OTG_STATE_B_PERIPHERAL:
105 if (tu->phy.otg->gadget)
106 usb_gadget_vbus_disconnect(tu->phy.otg->gadget);
107 tu->phy.state = OTG_STATE_B_IDLE;
108 break;
109 case OTG_STATE_A_HOST:
110 tu->phy.state = OTG_STATE_A_IDLE;
111 break;
112 default:
113 break;
114 }
115 dev_info(&tu->pt_dev->dev, "USB cable disconnected\n");
116 }
117
118 prev_state = tu->vbus_state;
119 tu->vbus_state = reg & TAHVO_STAT_VBUS;
120 if (prev_state != tu->vbus_state) {
121 extcon_set_cable_state(&tu->extcon, "USB", tu->vbus_state);
122 sysfs_notify(&tu->pt_dev->dev.kobj, NULL, "vbus_state");
123 }
124}
125
126static void tahvo_usb_become_host(struct tahvo_usb *tu)
127{
128 struct retu_dev *rdev = dev_get_drvdata(tu->pt_dev->dev.parent);
129
130 extcon_set_cable_state(&tu->extcon, "USB-HOST", true);
131
132 /* Power up the transceiver in USB host mode */
133 retu_write(rdev, TAHVO_REG_USBR, USBR_REGOUT | USBR_NSUSPEND |
134 USBR_MASTER_SW2 | USBR_MASTER_SW1);
135 tu->phy.state = OTG_STATE_A_IDLE;
136
137 check_vbus_state(tu);
138}
139
140static void tahvo_usb_stop_host(struct tahvo_usb *tu)
141{
142 tu->phy.state = OTG_STATE_A_IDLE;
143}
144
145static void tahvo_usb_become_peripheral(struct tahvo_usb *tu)
146{
147 struct retu_dev *rdev = dev_get_drvdata(tu->pt_dev->dev.parent);
148
149 extcon_set_cable_state(&tu->extcon, "USB-HOST", false);
150
151 /* Power up transceiver and set it in USB peripheral mode */
152 retu_write(rdev, TAHVO_REG_USBR, USBR_SLAVE_CONTROL | USBR_REGOUT |
153 USBR_NSUSPEND | USBR_SLAVE_SW);
154 tu->phy.state = OTG_STATE_B_IDLE;
155
156 check_vbus_state(tu);
157}
158
159static void tahvo_usb_stop_peripheral(struct tahvo_usb *tu)
160{
161 if (tu->phy.otg->gadget)
162 usb_gadget_vbus_disconnect(tu->phy.otg->gadget);
163 tu->phy.state = OTG_STATE_B_IDLE;
164}
165
166static void tahvo_usb_power_off(struct tahvo_usb *tu)
167{
168 struct retu_dev *rdev = dev_get_drvdata(tu->pt_dev->dev.parent);
169
170 /* Disable gadget controller if any */
171 if (tu->phy.otg->gadget)
172 usb_gadget_vbus_disconnect(tu->phy.otg->gadget);
173
174 /* Power off transceiver */
175 retu_write(rdev, TAHVO_REG_USBR, 0);
176 tu->phy.state = OTG_STATE_UNDEFINED;
177}
178
179static int tahvo_usb_set_suspend(struct usb_phy *dev, int suspend)
180{
181 struct tahvo_usb *tu = container_of(dev, struct tahvo_usb, phy);
182 struct retu_dev *rdev = dev_get_drvdata(tu->pt_dev->dev.parent);
183 u16 w;
184
185 dev_dbg(&tu->pt_dev->dev, "%s\n", __func__);
186
187 w = retu_read(rdev, TAHVO_REG_USBR);
188 if (suspend)
189 w &= ~USBR_NSUSPEND;
190 else
191 w |= USBR_NSUSPEND;
192 retu_write(rdev, TAHVO_REG_USBR, w);
193
194 return 0;
195}
196
197static int tahvo_usb_set_host(struct usb_otg *otg, struct usb_bus *host)
198{
199 struct tahvo_usb *tu = container_of(otg->phy, struct tahvo_usb, phy);
200
201 dev_dbg(&tu->pt_dev->dev, "%s %p\n", __func__, host);
202
203 mutex_lock(&tu->serialize);
204
205 if (host == NULL) {
206 if (tu->tahvo_mode == TAHVO_MODE_HOST)
207 tahvo_usb_power_off(tu);
208 otg->host = NULL;
209 mutex_unlock(&tu->serialize);
210 return 0;
211 }
212
213 if (tu->tahvo_mode == TAHVO_MODE_HOST) {
214 otg->host = NULL;
215 tahvo_usb_become_host(tu);
216 }
217
218 otg->host = host;
219
220 mutex_unlock(&tu->serialize);
221
222 return 0;
223}
224
225static int tahvo_usb_set_peripheral(struct usb_otg *otg,
226 struct usb_gadget *gadget)
227{
228 struct tahvo_usb *tu = container_of(otg->phy, struct tahvo_usb, phy);
229
230 dev_dbg(&tu->pt_dev->dev, "%s %p\n", __func__, gadget);
231
232 mutex_lock(&tu->serialize);
233
234 if (!gadget) {
235 if (tu->tahvo_mode == TAHVO_MODE_PERIPHERAL)
236 tahvo_usb_power_off(tu);
237 tu->phy.otg->gadget = NULL;
238 mutex_unlock(&tu->serialize);
239 return 0;
240 }
241
242 tu->phy.otg->gadget = gadget;
243 if (tu->tahvo_mode == TAHVO_MODE_PERIPHERAL)
244 tahvo_usb_become_peripheral(tu);
245
246 mutex_unlock(&tu->serialize);
247
248 return 0;
249}
250
251static irqreturn_t tahvo_usb_vbus_interrupt(int irq, void *_tu)
252{
253 struct tahvo_usb *tu = _tu;
254
255 mutex_lock(&tu->serialize);
256 check_vbus_state(tu);
257 mutex_unlock(&tu->serialize);
258
259 return IRQ_HANDLED;
260}
261
262static ssize_t otg_mode_show(struct device *device,
263 struct device_attribute *attr, char *buf)
264{
265 struct tahvo_usb *tu = dev_get_drvdata(device);
266
267 switch (tu->tahvo_mode) {
268 case TAHVO_MODE_HOST:
269 return sprintf(buf, "host\n");
270 case TAHVO_MODE_PERIPHERAL:
271 return sprintf(buf, "peripheral\n");
272 }
273
274 return -EINVAL;
275}
276
277static ssize_t otg_mode_store(struct device *device,
278 struct device_attribute *attr,
279 const char *buf, size_t count)
280{
281 struct tahvo_usb *tu = dev_get_drvdata(device);
282 int r;
283
284 mutex_lock(&tu->serialize);
285 if (count >= 4 && strncmp(buf, "host", 4) == 0) {
286 if (tu->tahvo_mode == TAHVO_MODE_PERIPHERAL)
287 tahvo_usb_stop_peripheral(tu);
288 tu->tahvo_mode = TAHVO_MODE_HOST;
289 if (tu->phy.otg->host) {
290 dev_info(device, "HOST mode: host controller present\n");
291 tahvo_usb_become_host(tu);
292 } else {
293 dev_info(device, "HOST mode: no host controller, powering off\n");
294 tahvo_usb_power_off(tu);
295 }
296 r = strlen(buf);
297 } else if (count >= 10 && strncmp(buf, "peripheral", 10) == 0) {
298 if (tu->tahvo_mode == TAHVO_MODE_HOST)
299 tahvo_usb_stop_host(tu);
300 tu->tahvo_mode = TAHVO_MODE_PERIPHERAL;
301 if (tu->phy.otg->gadget) {
302 dev_info(device, "PERIPHERAL mode: gadget driver present\n");
303 tahvo_usb_become_peripheral(tu);
304 } else {
305 dev_info(device, "PERIPHERAL mode: no gadget driver, powering off\n");
306 tahvo_usb_power_off(tu);
307 }
308 r = strlen(buf);
309 } else {
310 r = -EINVAL;
311 }
312 mutex_unlock(&tu->serialize);
313
314 return r;
315}
316static DEVICE_ATTR(otg_mode, 0644, otg_mode_show, otg_mode_store);
317
318static struct attribute *tahvo_attributes[] = {
319 &dev_attr_vbus.attr,
320 &dev_attr_otg_mode.attr,
321 NULL
322};
323
324static struct attribute_group tahvo_attr_group = {
325 .attrs = tahvo_attributes,
326};
327
328static int tahvo_usb_probe(struct platform_device *pdev)
329{
330 struct retu_dev *rdev = dev_get_drvdata(pdev->dev.parent);
331 struct tahvo_usb *tu;
332 int ret;
333
334 tu = devm_kzalloc(&pdev->dev, sizeof(*tu), GFP_KERNEL);
335 if (!tu)
336 return -ENOMEM;
337
338 tu->phy.otg = devm_kzalloc(&pdev->dev, sizeof(*tu->phy.otg),
339 GFP_KERNEL);
340 if (!tu->phy.otg)
341 return -ENOMEM;
342
343 tu->pt_dev = pdev;
344
345 /* Default mode */
346#ifdef CONFIG_TAHVO_USB_HOST_BY_DEFAULT
347 tu->tahvo_mode = TAHVO_MODE_HOST;
348#else
349 tu->tahvo_mode = TAHVO_MODE_PERIPHERAL;
350#endif
351
352 mutex_init(&tu->serialize);
353
354 tu->ick = devm_clk_get(&pdev->dev, "usb_l4_ick");
355 if (!IS_ERR(tu->ick))
356 clk_enable(tu->ick);
357
358 /*
359 * Set initial state, so that we generate kevents only on state changes.
360 */
361 tu->vbus_state = retu_read(rdev, TAHVO_REG_IDSR) & TAHVO_STAT_VBUS;
362
363 tu->extcon.name = DRIVER_NAME;
364 tu->extcon.supported_cable = tahvo_cable;
365 tu->extcon.dev.parent = &pdev->dev;
366
367 ret = extcon_dev_register(&tu->extcon);
368 if (ret) {
369 dev_err(&pdev->dev, "could not register extcon device: %d\n",
370 ret);
371 goto err_disable_clk;
372 }
373
374 /* Set the initial cable state. */
375 extcon_set_cable_state(&tu->extcon, "USB-HOST",
376 tu->tahvo_mode == TAHVO_MODE_HOST);
377 extcon_set_cable_state(&tu->extcon, "USB", tu->vbus_state);
378
379 /* Create OTG interface */
380 tahvo_usb_power_off(tu);
381 tu->phy.dev = &pdev->dev;
382 tu->phy.state = OTG_STATE_UNDEFINED;
383 tu->phy.label = DRIVER_NAME;
384 tu->phy.set_suspend = tahvo_usb_set_suspend;
385
386 tu->phy.otg->phy = &tu->phy;
387 tu->phy.otg->set_host = tahvo_usb_set_host;
388 tu->phy.otg->set_peripheral = tahvo_usb_set_peripheral;
389
390 ret = usb_add_phy(&tu->phy, USB_PHY_TYPE_USB2);
391 if (ret < 0) {
392 dev_err(&pdev->dev, "cannot register USB transceiver: %d\n",
393 ret);
394 goto err_extcon_unreg;
395 }
396
397 dev_set_drvdata(&pdev->dev, tu);
398
399 tu->irq = platform_get_irq(pdev, 0);
400 ret = request_threaded_irq(tu->irq, NULL, tahvo_usb_vbus_interrupt, 0,
401 "tahvo-vbus", tu);
402 if (ret) {
403 dev_err(&pdev->dev, "could not register tahvo-vbus irq: %d\n",
404 ret);
405 goto err_remove_phy;
406 }
407
408 /* Attributes */
409 ret = sysfs_create_group(&pdev->dev.kobj, &tahvo_attr_group);
410 if (ret) {
411 dev_err(&pdev->dev, "cannot create sysfs group: %d\n", ret);
412 goto err_free_irq;
413 }
414
415 return 0;
416
417err_free_irq:
418 free_irq(tu->irq, tu);
419err_remove_phy:
420 usb_remove_phy(&tu->phy);
421err_extcon_unreg:
422 extcon_dev_unregister(&tu->extcon);
423err_disable_clk:
424 if (!IS_ERR(tu->ick))
425 clk_disable(tu->ick);
426
427 return ret;
428}
429
430static int tahvo_usb_remove(struct platform_device *pdev)
431{
432 struct tahvo_usb *tu = platform_get_drvdata(pdev);
433
434 sysfs_remove_group(&pdev->dev.kobj, &tahvo_attr_group);
435 free_irq(tu->irq, tu);
436 usb_remove_phy(&tu->phy);
437 extcon_dev_unregister(&tu->extcon);
438 if (!IS_ERR(tu->ick))
439 clk_disable(tu->ick);
440
441 return 0;
442}
443
444static struct platform_driver tahvo_usb_driver = {
445 .probe = tahvo_usb_probe,
446 .remove = tahvo_usb_remove,
447 .driver = {
448 .name = "tahvo-usb",
449 .owner = THIS_MODULE,
450 },
451};
452module_platform_driver(tahvo_usb_driver);
453
454MODULE_DESCRIPTION("Tahvo USB transceiver driver");
455MODULE_LICENSE("GPL");
456MODULE_AUTHOR("Juha Yrjölä, Tony Lindgren, and Timo Teräs");
457MODULE_AUTHOR("Aaro Koskinen <aaro.koskinen@iki.fi>");
diff --git a/drivers/usb/phy/phy-twl6030-usb.c b/drivers/usb/phy/phy-twl6030-usb.c
index bad57ce77ba5..214172b68d5d 100644
--- a/drivers/usb/phy/phy-twl6030-usb.c
+++ b/drivers/usb/phy/phy-twl6030-usb.c
@@ -328,7 +328,7 @@ static int twl6030_usb_probe(struct platform_device *pdev)
328 struct device *dev = &pdev->dev; 328 struct device *dev = &pdev->dev;
329 struct twl4030_usb_data *pdata = dev_get_platdata(dev); 329 struct twl4030_usb_data *pdata = dev_get_platdata(dev);
330 330
331 twl = devm_kzalloc(dev, sizeof *twl, GFP_KERNEL); 331 twl = devm_kzalloc(dev, sizeof(*twl), GFP_KERNEL);
332 if (!twl) 332 if (!twl)
333 return -ENOMEM; 333 return -ENOMEM;
334 334
diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c
index 1b74523e1fee..e6f61e4361df 100644
--- a/drivers/usb/phy/phy.c
+++ b/drivers/usb/phy/phy.c
@@ -329,6 +329,8 @@ int usb_add_phy(struct usb_phy *x, enum usb_phy_type type)
329 return -EINVAL; 329 return -EINVAL;
330 } 330 }
331 331
332 ATOMIC_INIT_NOTIFIER_HEAD(&x->notifier);
333
332 spin_lock_irqsave(&phy_lock, flags); 334 spin_lock_irqsave(&phy_lock, flags);
333 335
334 list_for_each_entry(phy, &phy_list, head) { 336 list_for_each_entry(phy, &phy_list, head) {
@@ -367,6 +369,8 @@ int usb_add_phy_dev(struct usb_phy *x)
367 return -EINVAL; 369 return -EINVAL;
368 } 370 }
369 371
372 ATOMIC_INIT_NOTIFIER_HEAD(&x->notifier);
373
370 spin_lock_irqsave(&phy_lock, flags); 374 spin_lock_irqsave(&phy_lock, flags);
371 list_for_each_entry(phy_bind, &phy_bind_list, list) 375 list_for_each_entry(phy_bind, &phy_bind_list, list)
372 if (!(strcmp(phy_bind->phy_dev_name, dev_name(x->dev)))) 376 if (!(strcmp(phy_bind->phy_dev_name, dev_name(x->dev))))
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
index 45b94019aec8..d49f9c326035 100644
--- a/drivers/usb/renesas_usbhs/fifo.c
+++ b/drivers/usb/renesas_usbhs/fifo.c
@@ -1124,19 +1124,8 @@ void usbhs_fifo_init(struct usbhs_priv *priv)
1124 mod->irq_brdysts = 0; 1124 mod->irq_brdysts = 0;
1125 1125
1126 cfifo->pipe = NULL; 1126 cfifo->pipe = NULL;
1127 cfifo->tx_chan = NULL;
1128 cfifo->rx_chan = NULL;
1129
1130 d0fifo->pipe = NULL; 1127 d0fifo->pipe = NULL;
1131 d0fifo->tx_chan = NULL;
1132 d0fifo->rx_chan = NULL;
1133
1134 d1fifo->pipe = NULL; 1128 d1fifo->pipe = NULL;
1135 d1fifo->tx_chan = NULL;
1136 d1fifo->rx_chan = NULL;
1137
1138 usbhsf_dma_init(priv, usbhsf_get_d0fifo(priv));
1139 usbhsf_dma_init(priv, usbhsf_get_d1fifo(priv));
1140} 1129}
1141 1130
1142void usbhs_fifo_quit(struct usbhs_priv *priv) 1131void usbhs_fifo_quit(struct usbhs_priv *priv)
@@ -1147,9 +1136,6 @@ void usbhs_fifo_quit(struct usbhs_priv *priv)
1147 mod->irq_ready = NULL; 1136 mod->irq_ready = NULL;
1148 mod->irq_bempsts = 0; 1137 mod->irq_bempsts = 0;
1149 mod->irq_brdysts = 0; 1138 mod->irq_brdysts = 0;
1150
1151 usbhsf_dma_quit(priv, usbhsf_get_d0fifo(priv));
1152 usbhsf_dma_quit(priv, usbhsf_get_d1fifo(priv));
1153} 1139}
1154 1140
1155int usbhs_fifo_probe(struct usbhs_priv *priv) 1141int usbhs_fifo_probe(struct usbhs_priv *priv)
@@ -1171,6 +1157,7 @@ int usbhs_fifo_probe(struct usbhs_priv *priv)
1171 fifo->ctr = D0FIFOCTR; 1157 fifo->ctr = D0FIFOCTR;
1172 fifo->tx_slave.shdma_slave.slave_id = usbhs_get_dparam(priv, d0_tx_id); 1158 fifo->tx_slave.shdma_slave.slave_id = usbhs_get_dparam(priv, d0_tx_id);
1173 fifo->rx_slave.shdma_slave.slave_id = usbhs_get_dparam(priv, d0_rx_id); 1159 fifo->rx_slave.shdma_slave.slave_id = usbhs_get_dparam(priv, d0_rx_id);
1160 usbhsf_dma_init(priv, fifo);
1174 1161
1175 /* D1FIFO */ 1162 /* D1FIFO */
1176 fifo = usbhsf_get_d1fifo(priv); 1163 fifo = usbhsf_get_d1fifo(priv);
@@ -1180,10 +1167,13 @@ int usbhs_fifo_probe(struct usbhs_priv *priv)
1180 fifo->ctr = D1FIFOCTR; 1167 fifo->ctr = D1FIFOCTR;
1181 fifo->tx_slave.shdma_slave.slave_id = usbhs_get_dparam(priv, d1_tx_id); 1168 fifo->tx_slave.shdma_slave.slave_id = usbhs_get_dparam(priv, d1_tx_id);
1182 fifo->rx_slave.shdma_slave.slave_id = usbhs_get_dparam(priv, d1_rx_id); 1169 fifo->rx_slave.shdma_slave.slave_id = usbhs_get_dparam(priv, d1_rx_id);
1170 usbhsf_dma_init(priv, fifo);
1183 1171
1184 return 0; 1172 return 0;
1185} 1173}
1186 1174
1187void usbhs_fifo_remove(struct usbhs_priv *priv) 1175void usbhs_fifo_remove(struct usbhs_priv *priv)
1188{ 1176{
1177 usbhsf_dma_quit(priv, usbhsf_get_d0fifo(priv));
1178 usbhsf_dma_quit(priv, usbhsf_get_d1fifo(priv));
1189} 1179}
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
index 3385aeb5a364..458f3766bef1 100644
--- a/drivers/usb/renesas_usbhs/mod_gadget.c
+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
@@ -987,11 +987,11 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv)
987 /* init DCP */ 987 /* init DCP */
988 if (usbhsg_is_dcp(uep)) { 988 if (usbhsg_is_dcp(uep)) {
989 gpriv->gadget.ep0 = &uep->ep; 989 gpriv->gadget.ep0 = &uep->ep;
990 uep->ep.maxpacket = 64; 990 usb_ep_set_maxpacket_limit(&uep->ep, 64);
991 } 991 }
992 /* init normal pipe */ 992 /* init normal pipe */
993 else { 993 else {
994 uep->ep.maxpacket = 512; 994 usb_ep_set_maxpacket_limit(&uep->ep, 512);
995 list_add_tail(&uep->ep.ep_list, &gpriv->gadget.ep_list); 995 list_add_tail(&uep->ep.ep_list, &gpriv->gadget.ep_list);
996 } 996 }
997 } 997 }
diff --git a/drivers/usb/renesas_usbhs/mod_host.c b/drivers/usb/renesas_usbhs/mod_host.c
index e40f565004d0..10e1ded9c9cc 100644
--- a/drivers/usb/renesas_usbhs/mod_host.c
+++ b/drivers/usb/renesas_usbhs/mod_host.c
@@ -1469,6 +1469,7 @@ static int usbhsh_start(struct usbhs_priv *priv)
1469 ret = usb_add_hcd(hcd, 0, 0); 1469 ret = usb_add_hcd(hcd, 0, 0);
1470 if (ret < 0) 1470 if (ret < 0)
1471 return 0; 1471 return 0;
1472 device_wakeup_enable(hcd->self.controller);
1472 1473
1473 /* 1474 /*
1474 * pipe initialize and enable DCP 1475 * pipe initialize and enable DCP
diff --git a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig
index ddb9c51f2c99..3ce5c74b29e4 100644
--- a/drivers/usb/serial/Kconfig
+++ b/drivers/usb/serial/Kconfig
@@ -472,6 +472,35 @@ config USB_SERIAL_MOS7840
472 To compile this driver as a module, choose M here: the 472 To compile this driver as a module, choose M here: the
473 module will be called mos7840. If unsure, choose N. 473 module will be called mos7840. If unsure, choose N.
474 474
475config USB_SERIAL_MXUPORT
476 tristate "USB Moxa UPORT Serial Driver"
477 ---help---
478 Say Y here if you want to use a MOXA UPort Serial hub.
479
480 This driver supports:
481
482 [2 Port]
483 - UPort 1250 : 2 Port RS-232/422/485 USB to Serial Hub
484 - UPort 1250I : 2 Port RS-232/422/485 USB to Serial Hub with
485 Isolation
486
487 [4 Port]
488 - UPort 1410 : 4 Port RS-232 USB to Serial Hub
489 - UPort 1450 : 4 Port RS-232/422/485 USB to Serial Hub
490 - UPort 1450I : 4 Port RS-232/422/485 USB to Serial Hub with
491 Isolation
492
493 [8 Port]
494 - UPort 1610-8 : 8 Port RS-232 USB to Serial Hub
495 - UPort 1650-8 : 8 Port RS-232/422/485 USB to Serial Hub
496
497 [16 Port]
498 - UPort 1610-16 : 16 Port RS-232 USB to Serial Hub
499 - UPort 1650-16 : 16 Port RS-232/422/485 USB to Serial Hub
500
501 To compile this driver as a module, choose M here: the
502 module will be called mxuport.
503
475config USB_SERIAL_NAVMAN 504config USB_SERIAL_NAVMAN
476 tristate "USB Navman GPS device" 505 tristate "USB Navman GPS device"
477 help 506 help
diff --git a/drivers/usb/serial/Makefile b/drivers/usb/serial/Makefile
index 42670f0b5bc0..bfdafd349441 100644
--- a/drivers/usb/serial/Makefile
+++ b/drivers/usb/serial/Makefile
@@ -37,6 +37,7 @@ obj-$(CONFIG_USB_SERIAL_MCT_U232) += mct_u232.o
37obj-$(CONFIG_USB_SERIAL_METRO) += metro-usb.o 37obj-$(CONFIG_USB_SERIAL_METRO) += metro-usb.o
38obj-$(CONFIG_USB_SERIAL_MOS7720) += mos7720.o 38obj-$(CONFIG_USB_SERIAL_MOS7720) += mos7720.o
39obj-$(CONFIG_USB_SERIAL_MOS7840) += mos7840.o 39obj-$(CONFIG_USB_SERIAL_MOS7840) += mos7840.o
40obj-$(CONFIG_USB_SERIAL_MXUPORT) += mxuport.o
40obj-$(CONFIG_USB_SERIAL_NAVMAN) += navman.o 41obj-$(CONFIG_USB_SERIAL_NAVMAN) += navman.o
41obj-$(CONFIG_USB_SERIAL_OMNINET) += omninet.o 42obj-$(CONFIG_USB_SERIAL_OMNINET) += omninet.o
42obj-$(CONFIG_USB_SERIAL_OPTICON) += opticon.o 43obj-$(CONFIG_USB_SERIAL_OPTICON) += opticon.o
diff --git a/drivers/usb/serial/aircable.c b/drivers/usb/serial/aircable.c
index 6e320cec397d..80a9845cd93f 100644
--- a/drivers/usb/serial/aircable.c
+++ b/drivers/usb/serial/aircable.c
@@ -10,9 +10,9 @@
10 * 10 *
11 * The device works as an standard CDC device, it has 2 interfaces, the first 11 * The device works as an standard CDC device, it has 2 interfaces, the first
12 * one is for firmware access and the second is the serial one. 12 * one is for firmware access and the second is the serial one.
13 * The protocol is very simply, there are two posibilities reading or writing. 13 * The protocol is very simply, there are two possibilities reading or writing.
14 * When writing the first urb must have a Header that starts with 0x20 0x29 the 14 * When writing the first urb must have a Header that starts with 0x20 0x29 the
15 * next two bytes must say how much data will be sended. 15 * next two bytes must say how much data will be sent.
16 * When reading the process is almost equal except that the header starts with 16 * When reading the process is almost equal except that the header starts with
17 * 0x00 0x20. 17 * 0x00 0x20.
18 * 18 *
@@ -31,15 +31,15 @@
31 * 31 *
32 * The driver registers himself with the USB-serial core and the USB Core. I had 32 * The driver registers himself with the USB-serial core and the USB Core. I had
33 * to implement a probe function against USB-serial, because other way, the 33 * to implement a probe function against USB-serial, because other way, the
34 * driver was attaching himself to both interfaces. I have tryed with different 34 * driver was attaching himself to both interfaces. I have tried with different
35 * configurations of usb_serial_driver with out exit, only the probe function 35 * configurations of usb_serial_driver with out exit, only the probe function
36 * could handle this correctly. 36 * could handle this correctly.
37 * 37 *
38 * I have taken some info from a Greg Kroah-Hartman article: 38 * I have taken some info from a Greg Kroah-Hartman article:
39 * http://www.linuxjournal.com/article/6573 39 * http://www.linuxjournal.com/article/6573
40 * And from Linux Device Driver Kit CD, which is a great work, the authors taken 40 * And from Linux Device Driver Kit CD, which is a great work, the authors taken
41 * the work to recompile lots of information an knowladge in drivers development 41 * the work to recompile lots of information an knowledge in drivers development
42 * and made it all avaible inside a cd. 42 * and made it all available inside a cd.
43 * URL: http://kernel.org/pub/linux/kernel/people/gregkh/ddk/ 43 * URL: http://kernel.org/pub/linux/kernel/people/gregkh/ddk/
44 * 44 *
45 */ 45 */
diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
index bc77e955cbef..1532cde8a437 100644
--- a/drivers/usb/serial/ark3116.c
+++ b/drivers/usb/serial/ark3116.c
@@ -23,7 +23,6 @@
23 */ 23 */
24 24
25#include <linux/kernel.h> 25#include <linux/kernel.h>
26#include <linux/init.h>
27#include <linux/ioctl.h> 26#include <linux/ioctl.h>
28#include <linux/tty.h> 27#include <linux/tty.h>
29#include <linux/slab.h> 28#include <linux/slab.h>
@@ -71,7 +70,7 @@ struct ark3116_private {
71 __u32 lcr; /* line control register value */ 70 __u32 lcr; /* line control register value */
72 __u32 hcr; /* handshake control register (0x8) 71 __u32 hcr; /* handshake control register (0x8)
73 * value */ 72 * value */
74 __u32 mcr; /* modem contol register value */ 73 __u32 mcr; /* modem control register value */
75 74
76 /* protects the status values below */ 75 /* protects the status values below */
77 spinlock_t status_lock; 76 spinlock_t status_lock;
@@ -609,7 +608,7 @@ static void ark3116_read_int_callback(struct urb *urb)
609} 608}
610 609
611 610
612/* Data comes in via the bulk (data) URB, erors/interrupts via the int URB. 611/* Data comes in via the bulk (data) URB, errors/interrupts via the int URB.
613 * This means that we cannot be sure which data byte has an associated error 612 * This means that we cannot be sure which data byte has an associated error
614 * condition, so we report an error for all data in the next bulk read. 613 * condition, so we report an error for all data in the next bulk read.
615 * 614 *
diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c
index 84217e78ded4..15bc71853db5 100644
--- a/drivers/usb/serial/belkin_sa.c
+++ b/drivers/usb/serial/belkin_sa.c
@@ -18,14 +18,13 @@
18 * driver 18 * driver
19 * 19 *
20 * TODO: 20 * TODO:
21 * -- Add true modem contol line query capability. Currently we track the 21 * -- Add true modem control line query capability. Currently we track the
22 * states reported by the interrupt and the states we request. 22 * states reported by the interrupt and the states we request.
23 * -- Add support for flush commands 23 * -- Add support for flush commands
24 */ 24 */
25 25
26#include <linux/kernel.h> 26#include <linux/kernel.h>
27#include <linux/errno.h> 27#include <linux/errno.h>
28#include <linux/init.h>
29#include <linux/slab.h> 28#include <linux/slab.h>
30#include <linux/tty.h> 29#include <linux/tty.h>
31#include <linux/tty_driver.h> 30#include <linux/tty_driver.h>
diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c
index 6335490d5760..35a2373cde67 100644
--- a/drivers/usb/serial/bus.c
+++ b/drivers/usb/serial/bus.c
@@ -125,10 +125,12 @@ static ssize_t new_id_store(struct device_driver *driver,
125 const char *buf, size_t count) 125 const char *buf, size_t count)
126{ 126{
127 struct usb_serial_driver *usb_drv = to_usb_serial_driver(driver); 127 struct usb_serial_driver *usb_drv = to_usb_serial_driver(driver);
128 ssize_t retval = usb_store_new_id(&usb_drv->dynids, driver, buf, count); 128 ssize_t retval = usb_store_new_id(&usb_drv->dynids, usb_drv->id_table,
129 driver, buf, count);
129 130
130 if (retval >= 0 && usb_drv->usb_driver != NULL) 131 if (retval >= 0 && usb_drv->usb_driver != NULL)
131 retval = usb_store_new_id(&usb_drv->usb_driver->dynids, 132 retval = usb_store_new_id(&usb_drv->usb_driver->dynids,
133 usb_drv->usb_driver->id_table,
132 &usb_drv->usb_driver->drvwrap.driver, 134 &usb_drv->usb_driver->drvwrap.driver,
133 buf, count); 135 buf, count);
134 return retval; 136 return retval;
diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c
index c2a4171ab9cb..82371f61f23d 100644
--- a/drivers/usb/serial/ch341.c
+++ b/drivers/usb/serial/ch341.c
@@ -16,7 +16,6 @@
16 */ 16 */
17 17
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/tty.h> 19#include <linux/tty.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/slab.h> 21#include <linux/slab.h>
@@ -83,7 +82,6 @@ struct ch341_private {
83 unsigned baud_rate; /* set baud rate */ 82 unsigned baud_rate; /* set baud rate */
84 u8 line_control; /* set line control value RTS/DTR */ 83 u8 line_control; /* set line control value RTS/DTR */
85 u8 line_status; /* active status of modem control inputs */ 84 u8 line_status; /* active status of modem control inputs */
86 u8 multi_status_change; /* status changed multiple since last call */
87}; 85};
88 86
89static int ch341_control_out(struct usb_device *dev, u8 request, 87static int ch341_control_out(struct usb_device *dev, u8 request,
@@ -174,7 +172,6 @@ static int ch341_get_status(struct usb_device *dev, struct ch341_private *priv)
174 r = 0; 172 r = 0;
175 spin_lock_irqsave(&priv->lock, flags); 173 spin_lock_irqsave(&priv->lock, flags);
176 priv->line_status = (~(*buffer)) & CH341_BITS_MODEM_STAT; 174 priv->line_status = (~(*buffer)) & CH341_BITS_MODEM_STAT;
177 priv->multi_status_change = 0;
178 spin_unlock_irqrestore(&priv->lock, flags); 175 spin_unlock_irqrestore(&priv->lock, flags);
179 } else 176 } else
180 r = -EPROTO; 177 r = -EPROTO;
@@ -384,10 +381,8 @@ static void ch341_break_ctl(struct tty_struct *tty, int break_state)
384 uint8_t *break_reg; 381 uint8_t *break_reg;
385 382
386 break_reg = kmalloc(2, GFP_KERNEL); 383 break_reg = kmalloc(2, GFP_KERNEL);
387 if (!break_reg) { 384 if (!break_reg)
388 dev_err(&port->dev, "%s - kmalloc failed\n", __func__);
389 return; 385 return;
390 }
391 386
392 r = ch341_control_in(port->serial->dev, CH341_REQ_READ_REG, 387 r = ch341_control_in(port->serial->dev, CH341_REQ_READ_REG,
393 ch341_break_reg, 0, break_reg, 2); 388 ch341_break_reg, 0, break_reg, 2);
@@ -442,11 +437,55 @@ static int ch341_tiocmset(struct tty_struct *tty,
442 return ch341_set_handshake(port->serial->dev, control); 437 return ch341_set_handshake(port->serial->dev, control);
443} 438}
444 439
440static void ch341_update_line_status(struct usb_serial_port *port,
441 unsigned char *data, size_t len)
442{
443 struct ch341_private *priv = usb_get_serial_port_data(port);
444 struct tty_struct *tty;
445 unsigned long flags;
446 u8 status;
447 u8 delta;
448
449 if (len < 4)
450 return;
451
452 status = ~data[2] & CH341_BITS_MODEM_STAT;
453
454 spin_lock_irqsave(&priv->lock, flags);
455 delta = status ^ priv->line_status;
456 priv->line_status = status;
457 spin_unlock_irqrestore(&priv->lock, flags);
458
459 if (data[1] & CH341_MULT_STAT)
460 dev_dbg(&port->dev, "%s - multiple status change\n", __func__);
461
462 if (!delta)
463 return;
464
465 if (delta & CH341_BIT_CTS)
466 port->icount.cts++;
467 if (delta & CH341_BIT_DSR)
468 port->icount.dsr++;
469 if (delta & CH341_BIT_RI)
470 port->icount.rng++;
471 if (delta & CH341_BIT_DCD) {
472 port->icount.dcd++;
473 tty = tty_port_tty_get(&port->port);
474 if (tty) {
475 usb_serial_handle_dcd_change(port, tty,
476 status & CH341_BIT_DCD);
477 tty_kref_put(tty);
478 }
479 }
480
481 wake_up_interruptible(&port->port.delta_msr_wait);
482}
483
445static void ch341_read_int_callback(struct urb *urb) 484static void ch341_read_int_callback(struct urb *urb)
446{ 485{
447 struct usb_serial_port *port = (struct usb_serial_port *) urb->context; 486 struct usb_serial_port *port = urb->context;
448 unsigned char *data = urb->transfer_buffer; 487 unsigned char *data = urb->transfer_buffer;
449 unsigned int actual_length = urb->actual_length; 488 unsigned int len = urb->actual_length;
450 int status; 489 int status;
451 490
452 switch (urb->status) { 491 switch (urb->status) {
@@ -457,89 +496,23 @@ static void ch341_read_int_callback(struct urb *urb)
457 case -ENOENT: 496 case -ENOENT:
458 case -ESHUTDOWN: 497 case -ESHUTDOWN:
459 /* this urb is terminated, clean up */ 498 /* this urb is terminated, clean up */
460 dev_dbg(&urb->dev->dev, "%s - urb shutting down with status: %d\n", 499 dev_dbg(&urb->dev->dev, "%s - urb shutting down: %d\n",
461 __func__, urb->status); 500 __func__, urb->status);
462 return; 501 return;
463 default: 502 default:
464 dev_dbg(&urb->dev->dev, "%s - nonzero urb status received: %d\n", 503 dev_dbg(&urb->dev->dev, "%s - nonzero urb status: %d\n",
465 __func__, urb->status); 504 __func__, urb->status);
466 goto exit; 505 goto exit;
467 } 506 }
468 507
469 usb_serial_debug_data(&port->dev, __func__, 508 usb_serial_debug_data(&port->dev, __func__, len, data);
470 urb->actual_length, urb->transfer_buffer); 509 ch341_update_line_status(port, data, len);
471
472 if (actual_length >= 4) {
473 struct ch341_private *priv = usb_get_serial_port_data(port);
474 unsigned long flags;
475 u8 prev_line_status = priv->line_status;
476
477 spin_lock_irqsave(&priv->lock, flags);
478 priv->line_status = (~(data[2])) & CH341_BITS_MODEM_STAT;
479 if ((data[1] & CH341_MULT_STAT))
480 priv->multi_status_change = 1;
481 spin_unlock_irqrestore(&priv->lock, flags);
482
483 if ((priv->line_status ^ prev_line_status) & CH341_BIT_DCD) {
484 struct tty_struct *tty = tty_port_tty_get(&port->port);
485 if (tty)
486 usb_serial_handle_dcd_change(port, tty,
487 priv->line_status & CH341_BIT_DCD);
488 tty_kref_put(tty);
489 }
490
491 wake_up_interruptible(&port->port.delta_msr_wait);
492 }
493
494exit: 510exit:
495 status = usb_submit_urb(urb, GFP_ATOMIC); 511 status = usb_submit_urb(urb, GFP_ATOMIC);
496 if (status) 512 if (status) {
497 dev_err(&urb->dev->dev, 513 dev_err(&urb->dev->dev, "%s - usb_submit_urb failed: %d\n",
498 "%s - usb_submit_urb failed with result %d\n",
499 __func__, status); 514 __func__, status);
500}
501
502static int ch341_tiocmiwait(struct tty_struct *tty, unsigned long arg)
503{
504 struct usb_serial_port *port = tty->driver_data;
505 struct ch341_private *priv = usb_get_serial_port_data(port);
506 unsigned long flags;
507 u8 prevstatus;
508 u8 status;
509 u8 changed;
510 u8 multi_change = 0;
511
512 spin_lock_irqsave(&priv->lock, flags);
513 prevstatus = priv->line_status;
514 priv->multi_status_change = 0;
515 spin_unlock_irqrestore(&priv->lock, flags);
516
517 while (!multi_change) {
518 interruptible_sleep_on(&port->port.delta_msr_wait);
519 /* see if a signal did it */
520 if (signal_pending(current))
521 return -ERESTARTSYS;
522
523 if (port->serial->disconnected)
524 return -EIO;
525
526 spin_lock_irqsave(&priv->lock, flags);
527 status = priv->line_status;
528 multi_change = priv->multi_status_change;
529 spin_unlock_irqrestore(&priv->lock, flags);
530
531 changed = prevstatus ^ status;
532
533 if (((arg & TIOCM_RNG) && (changed & CH341_BIT_RI)) ||
534 ((arg & TIOCM_DSR) && (changed & CH341_BIT_DSR)) ||
535 ((arg & TIOCM_CD) && (changed & CH341_BIT_DCD)) ||
536 ((arg & TIOCM_CTS) && (changed & CH341_BIT_CTS))) {
537 return 0;
538 }
539 prevstatus = status;
540 } 515 }
541
542 return 0;
543} 516}
544 517
545static int ch341_tiocmget(struct tty_struct *tty) 518static int ch341_tiocmget(struct tty_struct *tty)
@@ -595,7 +568,7 @@ static struct usb_serial_driver ch341_device = {
595 .break_ctl = ch341_break_ctl, 568 .break_ctl = ch341_break_ctl,
596 .tiocmget = ch341_tiocmget, 569 .tiocmget = ch341_tiocmget,
597 .tiocmset = ch341_tiocmset, 570 .tiocmset = ch341_tiocmset,
598 .tiocmiwait = ch341_tiocmiwait, 571 .tiocmiwait = usb_serial_generic_tiocmiwait,
599 .read_int_callback = ch341_read_int_callback, 572 .read_int_callback = ch341_read_int_callback,
600 .port_probe = ch341_port_probe, 573 .port_probe = ch341_port_probe,
601 .port_remove = ch341_port_remove, 574 .port_remove = ch341_port_remove,
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c
index c69bb50d4663..8d7fc48b1f30 100644
--- a/drivers/usb/serial/console.c
+++ b/drivers/usb/serial/console.c
@@ -14,7 +14,6 @@
14#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 14#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
15 15
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/init.h>
18#include <linux/slab.h> 17#include <linux/slab.h>
19#include <linux/tty.h> 18#include <linux/tty.h>
20#include <linux/console.h> 19#include <linux/console.h>
@@ -135,7 +134,6 @@ static int usb_console_setup(struct console *co, char *options)
135 tty = kzalloc(sizeof(*tty), GFP_KERNEL); 134 tty = kzalloc(sizeof(*tty), GFP_KERNEL);
136 if (!tty) { 135 if (!tty) {
137 retval = -ENOMEM; 136 retval = -ENOMEM;
138 dev_err(&port->dev, "no more memory\n");
139 goto reset_open_count; 137 goto reset_open_count;
140 } 138 }
141 kref_init(&tty->kref); 139 kref_init(&tty->kref);
@@ -144,7 +142,6 @@ static int usb_console_setup(struct console *co, char *options)
144 tty->index = co->index; 142 tty->index = co->index;
145 if (tty_init_termios(tty)) { 143 if (tty_init_termios(tty)) {
146 retval = -ENOMEM; 144 retval = -ENOMEM;
147 dev_err(&port->dev, "no more memory\n");
148 goto free_tty; 145 goto free_tty;
149 } 146 }
150 } 147 }
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index 6987b535aa98..95fa1217afdd 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -305,10 +305,8 @@ static int cp210x_get_config(struct usb_serial_port *port, u8 request,
305 length = (((size - 1) | 3) + 1) / 4; 305 length = (((size - 1) | 3) + 1) / 4;
306 306
307 buf = kcalloc(length, sizeof(__le32), GFP_KERNEL); 307 buf = kcalloc(length, sizeof(__le32), GFP_KERNEL);
308 if (!buf) { 308 if (!buf)
309 dev_err(&port->dev, "%s - out of memory.\n", __func__);
310 return -ENOMEM; 309 return -ENOMEM;
311 }
312 310
313 /* Issue the request, attempting to read 'size' bytes */ 311 /* Issue the request, attempting to read 'size' bytes */
314 result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), 312 result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
@@ -352,10 +350,8 @@ static int cp210x_set_config(struct usb_serial_port *port, u8 request,
352 length = (((size - 1) | 3) + 1) / 4; 350 length = (((size - 1) | 3) + 1) / 4;
353 351
354 buf = kmalloc(length * sizeof(__le32), GFP_KERNEL); 352 buf = kmalloc(length * sizeof(__le32), GFP_KERNEL);
355 if (!buf) { 353 if (!buf)
356 dev_err(&port->dev, "%s - out of memory.\n", __func__);
357 return -ENOMEM; 354 return -ENOMEM;
358 }
359 355
360 /* Array of integers into bytes */ 356 /* Array of integers into bytes */
361 for (i = 0; i < length; i++) 357 for (i = 0; i < length; i++)
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c
index 6e1b69d0f5f5..0ac3b3b3236c 100644
--- a/drivers/usb/serial/cyberjack.c
+++ b/drivers/usb/serial/cyberjack.c
@@ -30,7 +30,6 @@
30 30
31#include <linux/kernel.h> 31#include <linux/kernel.h>
32#include <linux/errno.h> 32#include <linux/errno.h>
33#include <linux/init.h>
34#include <linux/slab.h> 33#include <linux/slab.h>
35#include <linux/tty.h> 34#include <linux/tty.h>
36#include <linux/tty_driver.h> 35#include <linux/tty_driver.h>
@@ -285,7 +284,7 @@ static void cyberjack_read_int_callback(struct urb *urb)
285 goto resubmit; 284 goto resubmit;
286 } 285 }
287 286
288 /* "+=" is probably more fault tollerant than "=" */ 287 /* "+=" is probably more fault tolerant than "=" */
289 priv->rdtodo += size; 288 priv->rdtodo += size;
290 289
291 dev_dbg(dev, "%s - rdtodo: %d\n", __func__, priv->rdtodo); 290 dev_dbg(dev, "%s - rdtodo: %d\n", __func__, priv->rdtodo);
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index 558605d646f3..bccb1223143a 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -27,7 +27,6 @@
27 27
28#include <linux/kernel.h> 28#include <linux/kernel.h>
29#include <linux/errno.h> 29#include <linux/errno.h>
30#include <linux/init.h>
31#include <linux/slab.h> 30#include <linux/slab.h>
32#include <linux/tty.h> 31#include <linux/tty.h>
33#include <linux/tty_driver.h> 32#include <linux/tty_driver.h>
@@ -113,7 +112,7 @@ struct cypress_private {
113 int baud_rate; /* stores current baud rate in 112 int baud_rate; /* stores current baud rate in
114 integer form */ 113 integer form */
115 int isthrottled; /* if throttled, discard reads */ 114 int isthrottled; /* if throttled, discard reads */
116 char prev_status, diff_status; /* used for TIOCMIWAIT */ 115 char prev_status; /* used for TIOCMIWAIT */
117 /* we pass a pointer to this as the argument sent to 116 /* we pass a pointer to this as the argument sent to
118 cypress_set_termios old_termios */ 117 cypress_set_termios old_termios */
119 struct ktermios tmp_termios; /* stores the old termios settings */ 118 struct ktermios tmp_termios; /* stores the old termios settings */
@@ -136,7 +135,6 @@ static void cypress_set_termios(struct tty_struct *tty,
136static int cypress_tiocmget(struct tty_struct *tty); 135static int cypress_tiocmget(struct tty_struct *tty);
137static int cypress_tiocmset(struct tty_struct *tty, 136static int cypress_tiocmset(struct tty_struct *tty,
138 unsigned int set, unsigned int clear); 137 unsigned int set, unsigned int clear);
139static int cypress_tiocmiwait(struct tty_struct *tty, unsigned long arg);
140static int cypress_chars_in_buffer(struct tty_struct *tty); 138static int cypress_chars_in_buffer(struct tty_struct *tty);
141static void cypress_throttle(struct tty_struct *tty); 139static void cypress_throttle(struct tty_struct *tty);
142static void cypress_unthrottle(struct tty_struct *tty); 140static void cypress_unthrottle(struct tty_struct *tty);
@@ -162,7 +160,7 @@ static struct usb_serial_driver cypress_earthmate_device = {
162 .set_termios = cypress_set_termios, 160 .set_termios = cypress_set_termios,
163 .tiocmget = cypress_tiocmget, 161 .tiocmget = cypress_tiocmget,
164 .tiocmset = cypress_tiocmset, 162 .tiocmset = cypress_tiocmset,
165 .tiocmiwait = cypress_tiocmiwait, 163 .tiocmiwait = usb_serial_generic_tiocmiwait,
166 .chars_in_buffer = cypress_chars_in_buffer, 164 .chars_in_buffer = cypress_chars_in_buffer,
167 .throttle = cypress_throttle, 165 .throttle = cypress_throttle,
168 .unthrottle = cypress_unthrottle, 166 .unthrottle = cypress_unthrottle,
@@ -188,7 +186,7 @@ static struct usb_serial_driver cypress_hidcom_device = {
188 .set_termios = cypress_set_termios, 186 .set_termios = cypress_set_termios,
189 .tiocmget = cypress_tiocmget, 187 .tiocmget = cypress_tiocmget,
190 .tiocmset = cypress_tiocmset, 188 .tiocmset = cypress_tiocmset,
191 .tiocmiwait = cypress_tiocmiwait, 189 .tiocmiwait = usb_serial_generic_tiocmiwait,
192 .chars_in_buffer = cypress_chars_in_buffer, 190 .chars_in_buffer = cypress_chars_in_buffer,
193 .throttle = cypress_throttle, 191 .throttle = cypress_throttle,
194 .unthrottle = cypress_unthrottle, 192 .unthrottle = cypress_unthrottle,
@@ -214,7 +212,7 @@ static struct usb_serial_driver cypress_ca42v2_device = {
214 .set_termios = cypress_set_termios, 212 .set_termios = cypress_set_termios,
215 .tiocmget = cypress_tiocmget, 213 .tiocmget = cypress_tiocmget,
216 .tiocmset = cypress_tiocmset, 214 .tiocmset = cypress_tiocmset,
217 .tiocmiwait = cypress_tiocmiwait, 215 .tiocmiwait = usb_serial_generic_tiocmiwait,
218 .chars_in_buffer = cypress_chars_in_buffer, 216 .chars_in_buffer = cypress_chars_in_buffer,
219 .throttle = cypress_throttle, 217 .throttle = cypress_throttle,
220 .unthrottle = cypress_unthrottle, 218 .unthrottle = cypress_unthrottle,
@@ -864,45 +862,6 @@ static int cypress_tiocmset(struct tty_struct *tty,
864 return cypress_write(tty, port, NULL, 0); 862 return cypress_write(tty, port, NULL, 0);
865} 863}
866 864
867
868static int cypress_tiocmiwait(struct tty_struct *tty, unsigned long arg)
869{
870 struct usb_serial_port *port = tty->driver_data;
871 struct cypress_private *priv = usb_get_serial_port_data(port);
872 char diff;
873
874 for (;;) {
875 interruptible_sleep_on(&port->port.delta_msr_wait);
876 /* see if a signal did it */
877 if (signal_pending(current))
878 return -ERESTARTSYS;
879
880 if (port->serial->disconnected)
881 return -EIO;
882
883 diff = priv->diff_status;
884 if (diff == 0)
885 return -EIO; /* no change => error */
886
887 /* consume all events */
888 priv->diff_status = 0;
889
890 /* return 0 if caller wanted to know about
891 these bits */
892 if (((arg & TIOCM_RNG) && (diff & UART_RI)) ||
893 ((arg & TIOCM_DSR) && (diff & UART_DSR)) ||
894 ((arg & TIOCM_CD) && (diff & UART_CD)) ||
895 ((arg & TIOCM_CTS) && (diff & UART_CTS)))
896 return 0;
897 /* otherwise caller can't care less about what
898 * happened, and so we continue to wait for
899 * more events.
900 */
901 }
902
903 return 0;
904}
905
906static void cypress_set_termios(struct tty_struct *tty, 865static void cypress_set_termios(struct tty_struct *tty,
907 struct usb_serial_port *port, struct ktermios *old_termios) 866 struct usb_serial_port *port, struct ktermios *old_termios)
908{ 867{
@@ -1185,9 +1144,21 @@ static void cypress_read_int_callback(struct urb *urb)
1185 spin_lock_irqsave(&priv->lock, flags); 1144 spin_lock_irqsave(&priv->lock, flags);
1186 /* check to see if status has changed */ 1145 /* check to see if status has changed */
1187 if (priv->current_status != priv->prev_status) { 1146 if (priv->current_status != priv->prev_status) {
1188 priv->diff_status |= priv->current_status ^ 1147 u8 delta = priv->current_status ^ priv->prev_status;
1189 priv->prev_status; 1148
1190 wake_up_interruptible(&port->port.delta_msr_wait); 1149 if (delta & UART_MSR_MASK) {
1150 if (delta & UART_CTS)
1151 port->icount.cts++;
1152 if (delta & UART_DSR)
1153 port->icount.dsr++;
1154 if (delta & UART_RI)
1155 port->icount.rng++;
1156 if (delta & UART_CD)
1157 port->icount.dcd++;
1158
1159 wake_up_interruptible(&port->port.delta_msr_wait);
1160 }
1161
1191 priv->prev_status = priv->current_status; 1162 priv->prev_status = priv->current_status;
1192 } 1163 }
1193 spin_unlock_irqrestore(&priv->lock, flags); 1164 spin_unlock_irqrestore(&priv->lock, flags);
diff --git a/drivers/usb/serial/cypress_m8.h b/drivers/usb/serial/cypress_m8.h
index b461311a2ae7..119d2e17077b 100644
--- a/drivers/usb/serial/cypress_m8.h
+++ b/drivers/usb/serial/cypress_m8.h
@@ -55,19 +55,23 @@
55#define CT_GENERIC 0x0F 55#define CT_GENERIC 0x0F
56/* End of chiptype definitions */ 56/* End of chiptype definitions */
57 57
58/* RS-232 serial data communication protocol definitions */ 58/*
59/* these are sent / read at byte 0 of the input/output hid reports */ 59 * RS-232 serial data communication protocol definitions.
60/* You can find these values defined in the CY4601 USB to Serial design notes */ 60 *
61 61 * These are sent / read at byte 0 of the input/output hid reports.
62#define CONTROL_DTR 0x20 /* data terminal ready - flow control - host to device */ 62 * You can find these values defined in the CY4601 USB to Serial design notes.
63#define UART_DSR 0x20 /* data set ready - flow control - device to host */ 63 */
64#define CONTROL_RTS 0x10 /* request to send - flow control - host to device */ 64
65#define UART_CTS 0x10 /* clear to send - flow control - device to host */ 65#define CONTROL_DTR 0x20 /* data terminal ready */
66#define UART_RI 0x10 /* ring indicator - modem - device to host */ 66#define CONTROL_RTS 0x10 /* request to send */
67#define UART_CD 0x40 /* carrier detect - modem - device to host */ 67#define CONTROL_RESET 0x08 /* sent with output report */
68#define CYP_ERROR 0x08 /* received from input report - device to host */ 68
69/* Note - the below has nothing to do with the "feature report" reset */ 69#define UART_MSR_MASK 0xf0
70#define CONTROL_RESET 0x08 /* sent with output report - host to device */ 70#define UART_RI 0x80 /* ring indicator */
71#define UART_CD 0x40 /* carrier detect */
72#define UART_DSR 0x20 /* data set ready */
73#define UART_CTS 0x10 /* clear to send */
74#define CYP_ERROR 0x08 /* received from input report */
71 75
72/* End of RS-232 protocol definitions */ 76/* End of RS-232 protocol definitions */
73 77
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
index 19b467fe0388..8a23c53b946e 100644
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -17,7 +17,6 @@
17 17
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/errno.h> 19#include <linux/errno.h>
20#include <linux/init.h>
21#include <linux/slab.h> 20#include <linux/slab.h>
22#include <linux/tty.h> 21#include <linux/tty.h>
23#include <linux/tty_driver.h> 22#include <linux/tty_driver.h>
diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c
index 0f658618db13..90e603d5f660 100644
--- a/drivers/usb/serial/empeg.c
+++ b/drivers/usb/serial/empeg.c
@@ -17,7 +17,6 @@
17 17
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/errno.h> 19#include <linux/errno.h>
20#include <linux/init.h>
21#include <linux/slab.h> 20#include <linux/slab.h>
22#include <linux/tty.h> 21#include <linux/tty.h>
23#include <linux/tty_driver.h> 22#include <linux/tty_driver.h>
diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c
index 639a18fb67e6..c5dc233db2d9 100644
--- a/drivers/usb/serial/f81232.c
+++ b/drivers/usb/serial/f81232.c
@@ -12,7 +12,6 @@
12 12
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/errno.h> 14#include <linux/errno.h>
15#include <linux/init.h>
16#include <linux/slab.h> 15#include <linux/slab.h>
17#include <linux/tty.h> 16#include <linux/tty.h>
18#include <linux/tty_driver.h> 17#include <linux/tty_driver.h>
@@ -55,6 +54,13 @@ static void f81232_update_line_status(struct usb_serial_port *port,
55 unsigned char *data, 54 unsigned char *data,
56 unsigned int actual_length) 55 unsigned int actual_length)
57{ 56{
57 /*
58 * FIXME: Update port->icount, and call
59 *
60 * wake_up_interruptible(&port->port.delta_msr_wait);
61 *
62 * on MSR changes.
63 */
58} 64}
59 65
60static void f81232_read_int_callback(struct urb *urb) 66static void f81232_read_int_callback(struct urb *urb)
@@ -110,7 +116,6 @@ static void f81232_process_read_urb(struct urb *urb)
110 line_status = priv->line_status; 116 line_status = priv->line_status;
111 priv->line_status &= ~UART_STATE_TRANSIENT_MASK; 117 priv->line_status &= ~UART_STATE_TRANSIENT_MASK;
112 spin_unlock_irqrestore(&priv->lock, flags); 118 spin_unlock_irqrestore(&priv->lock, flags);
113 wake_up_interruptible(&port->port.delta_msr_wait);
114 119
115 if (!urb->actual_length) 120 if (!urb->actual_length)
116 return; 121 return;
@@ -241,54 +246,12 @@ static int f81232_carrier_raised(struct usb_serial_port *port)
241 return 0; 246 return 0;
242} 247}
243 248
244static int f81232_tiocmiwait(struct tty_struct *tty, unsigned long arg)
245{
246 struct usb_serial_port *port = tty->driver_data;
247 struct f81232_private *priv = usb_get_serial_port_data(port);
248 unsigned long flags;
249 unsigned int prevstatus;
250 unsigned int status;
251 unsigned int changed;
252
253 spin_lock_irqsave(&priv->lock, flags);
254 prevstatus = priv->line_status;
255 spin_unlock_irqrestore(&priv->lock, flags);
256
257 while (1) {
258 interruptible_sleep_on(&port->port.delta_msr_wait);
259 /* see if a signal did it */
260 if (signal_pending(current))
261 return -ERESTARTSYS;
262
263 if (port->serial->disconnected)
264 return -EIO;
265
266 spin_lock_irqsave(&priv->lock, flags);
267 status = priv->line_status;
268 spin_unlock_irqrestore(&priv->lock, flags);
269
270 changed = prevstatus ^ status;
271
272 if (((arg & TIOCM_RNG) && (changed & UART_RING)) ||
273 ((arg & TIOCM_DSR) && (changed & UART_DSR)) ||
274 ((arg & TIOCM_CD) && (changed & UART_DCD)) ||
275 ((arg & TIOCM_CTS) && (changed & UART_CTS))) {
276 return 0;
277 }
278 prevstatus = status;
279 }
280 /* NOTREACHED */
281 return 0;
282}
283
284static int f81232_ioctl(struct tty_struct *tty, 249static int f81232_ioctl(struct tty_struct *tty,
285 unsigned int cmd, unsigned long arg) 250 unsigned int cmd, unsigned long arg)
286{ 251{
287 struct serial_struct ser; 252 struct serial_struct ser;
288 struct usb_serial_port *port = tty->driver_data; 253 struct usb_serial_port *port = tty->driver_data;
289 254
290 dev_dbg(&port->dev, "%s cmd = 0x%04x\n", __func__, cmd);
291
292 switch (cmd) { 255 switch (cmd) {
293 case TIOCGSERIAL: 256 case TIOCGSERIAL:
294 memset(&ser, 0, sizeof ser); 257 memset(&ser, 0, sizeof ser);
@@ -302,8 +265,6 @@ static int f81232_ioctl(struct tty_struct *tty,
302 265
303 return 0; 266 return 0;
304 default: 267 default:
305 dev_dbg(&port->dev, "%s not supported = 0x%04x\n",
306 __func__, cmd);
307 break; 268 break;
308 } 269 }
309 return -ENOIOCTLCMD; 270 return -ENOIOCTLCMD;
@@ -354,7 +315,7 @@ static struct usb_serial_driver f81232_device = {
354 .set_termios = f81232_set_termios, 315 .set_termios = f81232_set_termios,
355 .tiocmget = f81232_tiocmget, 316 .tiocmget = f81232_tiocmget,
356 .tiocmset = f81232_tiocmset, 317 .tiocmset = f81232_tiocmset,
357 .tiocmiwait = f81232_tiocmiwait, 318 .tiocmiwait = usb_serial_generic_tiocmiwait,
358 .process_read_urb = f81232_process_read_urb, 319 .process_read_urb = f81232_process_read_urb,
359 .read_int_callback = f81232_read_int_callback, 320 .read_int_callback = f81232_read_int_callback,
360 .port_probe = f81232_port_probe, 321 .port_probe = f81232_port_probe,
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index fb0d537435eb..ce0d7b0db012 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -33,7 +33,6 @@
33 33
34#include <linux/kernel.h> 34#include <linux/kernel.h>
35#include <linux/errno.h> 35#include <linux/errno.h>
36#include <linux/init.h>
37#include <linux/slab.h> 36#include <linux/slab.h>
38#include <linux/tty.h> 37#include <linux/tty.h>
39#include <linux/tty_driver.h> 38#include <linux/tty_driver.h>
@@ -145,7 +144,7 @@ static struct ftdi_sio_quirk ftdi_8u2232c_quirk = {
145 * Device ID not listed? Test it using 144 * Device ID not listed? Test it using
146 * /sys/bus/usb-serial/drivers/ftdi_sio/new_id and send a patch or report. 145 * /sys/bus/usb-serial/drivers/ftdi_sio/new_id and send a patch or report.
147 */ 146 */
148static struct usb_device_id id_table_combined [] = { 147static const struct usb_device_id id_table_combined[] = {
149 { USB_DEVICE(FTDI_VID, FTDI_ZEITCONTROL_TAGTRACE_MIFARE_PID) }, 148 { USB_DEVICE(FTDI_VID, FTDI_ZEITCONTROL_TAGTRACE_MIFARE_PID) },
150 { USB_DEVICE(FTDI_VID, FTDI_CTI_MINI_PID) }, 149 { USB_DEVICE(FTDI_VID, FTDI_CTI_MINI_PID) },
151 { USB_DEVICE(FTDI_VID, FTDI_CTI_NANO_PID) }, 150 { USB_DEVICE(FTDI_VID, FTDI_CTI_NANO_PID) },
@@ -1695,11 +1694,8 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port)
1695 1694
1696 1695
1697 priv = kzalloc(sizeof(struct ftdi_private), GFP_KERNEL); 1696 priv = kzalloc(sizeof(struct ftdi_private), GFP_KERNEL);
1698 if (!priv) { 1697 if (!priv)
1699 dev_err(&port->dev, "%s- kmalloc(%Zd) failed.\n", __func__,
1700 sizeof(struct ftdi_private));
1701 return -ENOMEM; 1698 return -ENOMEM;
1702 }
1703 1699
1704 mutex_init(&priv->cfg_lock); 1700 mutex_init(&priv->cfg_lock);
1705 1701
@@ -2124,10 +2120,20 @@ static void ftdi_set_termios(struct tty_struct *tty,
2124 } 2120 }
2125 2121
2126 /* 2122 /*
2127 * All FTDI UART chips are limited to CS7/8. We won't pretend to 2123 * All FTDI UART chips are limited to CS7/8. We shouldn't pretend to
2128 * support CS5/6 and revert the CSIZE setting instead. 2124 * support CS5/6 and revert the CSIZE setting instead.
2125 *
2126 * CS5 however is used to control some smartcard readers which abuse
2127 * this limitation to switch modes. Original FTDI chips fall back to
2128 * eight data bits.
2129 *
2130 * TODO: Implement a quirk to only allow this with mentioned
2131 * readers. One I know of (Argolis Smartreader V1)
2132 * returns "USB smartcard server" as iInterface string.
2133 * The vendor didn't bother with a custom VID/PID of
2134 * course.
2129 */ 2135 */
2130 if ((C_CSIZE(tty) != CS8) && (C_CSIZE(tty) != CS7)) { 2136 if (C_CSIZE(tty) == CS6) {
2131 dev_warn(ddev, "requested CSIZE setting not supported\n"); 2137 dev_warn(ddev, "requested CSIZE setting not supported\n");
2132 2138
2133 termios->c_cflag &= ~CSIZE; 2139 termios->c_cflag &= ~CSIZE;
@@ -2174,6 +2180,9 @@ no_skip:
2174 urb_value |= FTDI_SIO_SET_DATA_PARITY_NONE; 2180 urb_value |= FTDI_SIO_SET_DATA_PARITY_NONE;
2175 } 2181 }
2176 switch (cflag & CSIZE) { 2182 switch (cflag & CSIZE) {
2183 case CS5:
2184 dev_dbg(ddev, "Setting CS5 quirk\n");
2185 break;
2177 case CS7: 2186 case CS7:
2178 urb_value |= 7; 2187 urb_value |= 7;
2179 dev_dbg(ddev, "Setting CS7\n"); 2188 dev_dbg(ddev, "Setting CS7\n");
@@ -2383,8 +2392,6 @@ static int ftdi_ioctl(struct tty_struct *tty,
2383{ 2392{
2384 struct usb_serial_port *port = tty->driver_data; 2393 struct usb_serial_port *port = tty->driver_data;
2385 2394
2386 dev_dbg(&port->dev, "%s cmd 0x%04x\n", __func__, cmd);
2387
2388 /* Based on code from acm.c and others */ 2395 /* Based on code from acm.c and others */
2389 switch (cmd) { 2396 switch (cmd) {
2390 2397
@@ -2401,11 +2408,7 @@ static int ftdi_ioctl(struct tty_struct *tty,
2401 default: 2408 default:
2402 break; 2409 break;
2403 } 2410 }
2404 /* This is not necessarily an error - turns out the higher layers 2411
2405 * will do some ioctls themselves (see comment above)
2406 */
2407 dev_dbg(&port->dev, "%s arg not supported - it was 0x%04x - check /usr/include/asm/ioctls.h\n",
2408 __func__, cmd);
2409 return -ENOIOCTLCMD; 2412 return -ENOIOCTLCMD;
2410} 2413}
2411 2414
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c
index 04b5ed90ffb2..db591d19d416 100644
--- a/drivers/usb/serial/garmin_gps.c
+++ b/drivers/usb/serial/garmin_gps.c
@@ -25,7 +25,6 @@
25 25
26#include <linux/kernel.h> 26#include <linux/kernel.h>
27#include <linux/errno.h> 27#include <linux/errno.h>
28#include <linux/init.h>
29#include <linux/slab.h> 28#include <linux/slab.h>
30#include <linux/timer.h> 29#include <linux/timer.h>
31#include <linux/tty.h> 30#include <linux/tty.h>
@@ -275,14 +274,13 @@ static int pkt_add(struct garmin_data *garmin_data_p,
275 unsigned long flags; 274 unsigned long flags;
276 struct garmin_packet *pkt; 275 struct garmin_packet *pkt;
277 276
278 /* process only packets containg data ... */ 277 /* process only packets containing data ... */
279 if (data_length) { 278 if (data_length) {
280 pkt = kmalloc(sizeof(struct garmin_packet)+data_length, 279 pkt = kmalloc(sizeof(struct garmin_packet)+data_length,
281 GFP_ATOMIC); 280 GFP_ATOMIC);
282 if (pkt == NULL) { 281 if (!pkt)
283 dev_err(&garmin_data_p->port->dev, "out of memory\n");
284 return 0; 282 return 0;
285 } 283
286 pkt->size = data_length; 284 pkt->size = data_length;
287 memcpy(pkt->data, data, data_length); 285 memcpy(pkt->data, data, data_length);
288 286
@@ -1006,14 +1004,11 @@ static int garmin_write_bulk(struct usb_serial_port *port,
1006 spin_unlock_irqrestore(&garmin_data_p->lock, flags); 1004 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
1007 1005
1008 buffer = kmalloc(count, GFP_ATOMIC); 1006 buffer = kmalloc(count, GFP_ATOMIC);
1009 if (!buffer) { 1007 if (!buffer)
1010 dev_err(&port->dev, "out of memory\n");
1011 return -ENOMEM; 1008 return -ENOMEM;
1012 }
1013 1009
1014 urb = usb_alloc_urb(0, GFP_ATOMIC); 1010 urb = usb_alloc_urb(0, GFP_ATOMIC);
1015 if (!urb) { 1011 if (!urb) {
1016 dev_err(&port->dev, "no more free urbs\n");
1017 kfree(buffer); 1012 kfree(buffer);
1018 return -ENOMEM; 1013 return -ENOMEM;
1019 } 1014 }
@@ -1148,7 +1143,7 @@ static void garmin_read_process(struct garmin_data *garmin_data_p,
1148 unsigned long flags; 1143 unsigned long flags;
1149 1144
1150 if (garmin_data_p->flags & FLAGS_DROP_DATA) { 1145 if (garmin_data_p->flags & FLAGS_DROP_DATA) {
1151 /* abort-transfer cmd is actice */ 1146 /* abort-transfer cmd is active */
1152 dev_dbg(&garmin_data_p->port->dev, "%s - pkt dropped\n", __func__); 1147 dev_dbg(&garmin_data_p->port->dev, "%s - pkt dropped\n", __func__);
1153 } else if (garmin_data_p->state != STATE_DISCONNECTED && 1148 } else if (garmin_data_p->state != STATE_DISCONNECTED &&
1154 garmin_data_p->state != STATE_RESET) { 1149 garmin_data_p->state != STATE_RESET) {
@@ -1393,10 +1388,9 @@ static int garmin_port_probe(struct usb_serial_port *port)
1393 struct garmin_data *garmin_data_p; 1388 struct garmin_data *garmin_data_p;
1394 1389
1395 garmin_data_p = kzalloc(sizeof(struct garmin_data), GFP_KERNEL); 1390 garmin_data_p = kzalloc(sizeof(struct garmin_data), GFP_KERNEL);
1396 if (garmin_data_p == NULL) { 1391 if (!garmin_data_p)
1397 dev_err(&port->dev, "%s - Out of memory\n", __func__);
1398 return -ENOMEM; 1392 return -ENOMEM;
1399 } 1393
1400 init_timer(&garmin_data_p->timer); 1394 init_timer(&garmin_data_p->timer);
1401 spin_lock_init(&garmin_data_p->lock); 1395 spin_lock_init(&garmin_data_p->lock);
1402 INIT_LIST_HEAD(&garmin_data_p->pktlist); 1396 INIT_LIST_HEAD(&garmin_data_p->pktlist);
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
index c91481d74a14..c0866971db2b 100644
--- a/drivers/usb/serial/io_edgeport.c
+++ b/drivers/usb/serial/io_edgeport.c
@@ -32,7 +32,6 @@
32#include <linux/kernel.h> 32#include <linux/kernel.h>
33#include <linux/jiffies.h> 33#include <linux/jiffies.h>
34#include <linux/errno.h> 34#include <linux/errno.h>
35#include <linux/init.h>
36#include <linux/slab.h> 35#include <linux/slab.h>
37#include <linux/tty.h> 36#include <linux/tty.h>
38#include <linux/tty_driver.h> 37#include <linux/tty_driver.h>
@@ -898,7 +897,6 @@ static int edge_open(struct tty_struct *tty, struct usb_serial_port *port)
898 edge_port->txfifo.fifo = kmalloc(edge_port->maxTxCredits, GFP_KERNEL); 897 edge_port->txfifo.fifo = kmalloc(edge_port->maxTxCredits, GFP_KERNEL);
899 898
900 if (!edge_port->txfifo.fifo) { 899 if (!edge_port->txfifo.fifo) {
901 dev_dbg(dev, "%s - no memory\n", __func__);
902 edge_close(port); 900 edge_close(port);
903 return -ENOMEM; 901 return -ENOMEM;
904 } 902 }
@@ -908,7 +906,6 @@ static int edge_open(struct tty_struct *tty, struct usb_serial_port *port)
908 edge_port->write_in_progress = false; 906 edge_port->write_in_progress = false;
909 907
910 if (!edge_port->write_urb) { 908 if (!edge_port->write_urb) {
911 dev_dbg(dev, "%s - no memory\n", __func__);
912 edge_close(port); 909 edge_close(port);
913 return -ENOMEM; 910 return -ENOMEM;
914 } 911 }
@@ -1245,9 +1242,7 @@ static void send_more_port_data(struct edgeport_serial *edge_serial,
1245 to send out */ 1242 to send out */
1246 count = fifo->count; 1243 count = fifo->count;
1247 buffer = kmalloc(count+2, GFP_ATOMIC); 1244 buffer = kmalloc(count+2, GFP_ATOMIC);
1248 if (buffer == NULL) { 1245 if (!buffer) {
1249 dev_err_console(edge_port->port,
1250 "%s - no more kernel memory...\n", __func__);
1251 edge_port->write_in_progress = false; 1246 edge_port->write_in_progress = false;
1252 goto exit_send; 1247 goto exit_send;
1253 } 1248 }
@@ -1593,8 +1588,6 @@ static int edge_ioctl(struct tty_struct *tty,
1593 DEFINE_WAIT(wait); 1588 DEFINE_WAIT(wait);
1594 struct edgeport_port *edge_port = usb_get_serial_port_data(port); 1589 struct edgeport_port *edge_port = usb_get_serial_port_data(port);
1595 1590
1596 dev_dbg(&port->dev, "%s - cmd = 0x%x\n", __func__, cmd);
1597
1598 switch (cmd) { 1591 switch (cmd) {
1599 case TIOCSERGETLSR: 1592 case TIOCSERGETLSR:
1600 dev_dbg(&port->dev, "%s TIOCSERGETLSR\n", __func__); 1593 dev_dbg(&port->dev, "%s TIOCSERGETLSR\n", __func__);
@@ -2027,11 +2020,8 @@ static int sram_write(struct usb_serial *serial, __u16 extAddr, __u16 addr,
2027 dev_dbg(&serial->dev->dev, "%s - %x, %x, %d\n", __func__, extAddr, addr, length); 2020 dev_dbg(&serial->dev->dev, "%s - %x, %x, %d\n", __func__, extAddr, addr, length);
2028 2021
2029 transfer_buffer = kmalloc(64, GFP_KERNEL); 2022 transfer_buffer = kmalloc(64, GFP_KERNEL);
2030 if (!transfer_buffer) { 2023 if (!transfer_buffer)
2031 dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n",
2032 __func__, 64);
2033 return -ENOMEM; 2024 return -ENOMEM;
2034 }
2035 2025
2036 /* need to split these writes up into 64 byte chunks */ 2026 /* need to split these writes up into 64 byte chunks */
2037 result = 0; 2027 result = 0;
@@ -2075,11 +2065,8 @@ static int rom_write(struct usb_serial *serial, __u16 extAddr, __u16 addr,
2075 unsigned char *transfer_buffer; 2065 unsigned char *transfer_buffer;
2076 2066
2077 transfer_buffer = kmalloc(64, GFP_KERNEL); 2067 transfer_buffer = kmalloc(64, GFP_KERNEL);
2078 if (!transfer_buffer) { 2068 if (!transfer_buffer)
2079 dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n",
2080 __func__, 64);
2081 return -ENOMEM; 2069 return -ENOMEM;
2082 }
2083 2070
2084 /* need to split these writes up into 64 byte chunks */ 2071 /* need to split these writes up into 64 byte chunks */
2085 result = 0; 2072 result = 0;
@@ -2121,11 +2108,8 @@ static int rom_read(struct usb_serial *serial, __u16 extAddr,
2121 unsigned char *transfer_buffer; 2108 unsigned char *transfer_buffer;
2122 2109
2123 transfer_buffer = kmalloc(64, GFP_KERNEL); 2110 transfer_buffer = kmalloc(64, GFP_KERNEL);
2124 if (!transfer_buffer) { 2111 if (!transfer_buffer)
2125 dev_err(&serial->dev->dev,
2126 "%s - kmalloc(%d) failed.\n", __func__, 64);
2127 return -ENOMEM; 2112 return -ENOMEM;
2128 }
2129 2113
2130 /* need to split these reads up into 64 byte chunks */ 2114 /* need to split these reads up into 64 byte chunks */
2131 result = 0; 2115 result = 0;
@@ -2165,11 +2149,8 @@ static int send_iosp_ext_cmd(struct edgeport_port *edge_port,
2165 int status = 0; 2149 int status = 0;
2166 2150
2167 buffer = kmalloc(10, GFP_ATOMIC); 2151 buffer = kmalloc(10, GFP_ATOMIC);
2168 if (!buffer) { 2152 if (!buffer)
2169 dev_err(&edge_port->port->dev,
2170 "%s - kmalloc(%d) failed.\n", __func__, 10);
2171 return -ENOMEM; 2153 return -ENOMEM;
2172 }
2173 2154
2174 currentCommand = buffer; 2155 currentCommand = buffer;
2175 2156
@@ -2276,10 +2257,9 @@ static int send_cmd_write_baud_rate(struct edgeport_port *edge_port,
2276 2257
2277 /* Alloc memory for the string of commands. */ 2258 /* Alloc memory for the string of commands. */
2278 cmdBuffer = kmalloc(0x100, GFP_ATOMIC); 2259 cmdBuffer = kmalloc(0x100, GFP_ATOMIC);
2279 if (!cmdBuffer) { 2260 if (!cmdBuffer)
2280 dev_err(dev, "%s - kmalloc(%d) failed.\n", __func__, 0x100);
2281 return -ENOMEM; 2261 return -ENOMEM;
2282 } 2262
2283 currCmd = cmdBuffer; 2263 currCmd = cmdBuffer;
2284 2264
2285 /* Enable access to divisor latch */ 2265 /* Enable access to divisor latch */
@@ -2785,10 +2765,9 @@ static int edge_startup(struct usb_serial *serial)
2785 2765
2786 /* create our private serial structure */ 2766 /* create our private serial structure */
2787 edge_serial = kzalloc(sizeof(struct edgeport_serial), GFP_KERNEL); 2767 edge_serial = kzalloc(sizeof(struct edgeport_serial), GFP_KERNEL);
2788 if (edge_serial == NULL) { 2768 if (!edge_serial)
2789 dev_err(&serial->dev->dev, "%s - Out of memory\n", __func__);
2790 return -ENOMEM; 2769 return -ENOMEM;
2791 } 2770
2792 spin_lock_init(&edge_serial->es_lock); 2771 spin_lock_init(&edge_serial->es_lock);
2793 edge_serial->serial = serial; 2772 edge_serial->serial = serial;
2794 usb_set_serial_data(serial, edge_serial); 2773 usb_set_serial_data(serial, edge_serial);
@@ -2877,14 +2856,12 @@ static int edge_startup(struct usb_serial *serial)
2877 /* not set up yet, so do it now */ 2856 /* not set up yet, so do it now */
2878 edge_serial->interrupt_read_urb = 2857 edge_serial->interrupt_read_urb =
2879 usb_alloc_urb(0, GFP_KERNEL); 2858 usb_alloc_urb(0, GFP_KERNEL);
2880 if (!edge_serial->interrupt_read_urb) { 2859 if (!edge_serial->interrupt_read_urb)
2881 dev_err(ddev, "out of memory\n");
2882 return -ENOMEM; 2860 return -ENOMEM;
2883 } 2861
2884 edge_serial->interrupt_in_buffer = 2862 edge_serial->interrupt_in_buffer =
2885 kmalloc(buffer_size, GFP_KERNEL); 2863 kmalloc(buffer_size, GFP_KERNEL);
2886 if (!edge_serial->interrupt_in_buffer) { 2864 if (!edge_serial->interrupt_in_buffer) {
2887 dev_err(ddev, "out of memory\n");
2888 usb_free_urb(edge_serial->interrupt_read_urb); 2865 usb_free_urb(edge_serial->interrupt_read_urb);
2889 return -ENOMEM; 2866 return -ENOMEM;
2890 } 2867 }
@@ -2914,14 +2891,12 @@ static int edge_startup(struct usb_serial *serial)
2914 /* not set up yet, so do it now */ 2891 /* not set up yet, so do it now */
2915 edge_serial->read_urb = 2892 edge_serial->read_urb =
2916 usb_alloc_urb(0, GFP_KERNEL); 2893 usb_alloc_urb(0, GFP_KERNEL);
2917 if (!edge_serial->read_urb) { 2894 if (!edge_serial->read_urb)
2918 dev_err(ddev, "out of memory\n");
2919 return -ENOMEM; 2895 return -ENOMEM;
2920 } 2896
2921 edge_serial->bulk_in_buffer = 2897 edge_serial->bulk_in_buffer =
2922 kmalloc(buffer_size, GFP_KERNEL); 2898 kmalloc(buffer_size, GFP_KERNEL);
2923 if (!edge_serial->bulk_in_buffer) { 2899 if (!edge_serial->bulk_in_buffer) {
2924 dev_err(&dev->dev, "out of memory\n");
2925 usb_free_urb(edge_serial->read_urb); 2900 usb_free_urb(edge_serial->read_urb);
2926 return -ENOMEM; 2901 return -ENOMEM;
2927 } 2902 }
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
index b7187bf32469..a2db5be9c305 100644
--- a/drivers/usb/serial/io_ti.c
+++ b/drivers/usb/serial/io_ti.c
@@ -20,7 +20,6 @@
20#include <linux/kernel.h> 20#include <linux/kernel.h>
21#include <linux/jiffies.h> 21#include <linux/jiffies.h>
22#include <linux/errno.h> 22#include <linux/errno.h>
23#include <linux/init.h>
24#include <linux/slab.h> 23#include <linux/slab.h>
25#include <linux/tty.h> 24#include <linux/tty.h>
26#include <linux/tty_driver.h> 25#include <linux/tty_driver.h>
@@ -364,11 +363,9 @@ static int write_boot_mem(struct edgeport_serial *serial,
364 /* Must do a read before write */ 363 /* Must do a read before write */
365 if (!serial->TiReadI2C) { 364 if (!serial->TiReadI2C) {
366 temp = kmalloc(1, GFP_KERNEL); 365 temp = kmalloc(1, GFP_KERNEL);
367 if (!temp) { 366 if (!temp)
368 dev_err(&serial->serial->dev->dev,
369 "%s - out of memory\n", __func__);
370 return -ENOMEM; 367 return -ENOMEM;
371 } 368
372 status = read_boot_mem(serial, 0, 1, temp); 369 status = read_boot_mem(serial, 0, 1, temp);
373 kfree(temp); 370 kfree(temp);
374 if (status) 371 if (status)
@@ -471,10 +468,8 @@ static int tx_active(struct edgeport_port *port)
471 int bytes_left = 0; 468 int bytes_left = 0;
472 469
473 oedb = kmalloc(sizeof(*oedb), GFP_KERNEL); 470 oedb = kmalloc(sizeof(*oedb), GFP_KERNEL);
474 if (!oedb) { 471 if (!oedb)
475 dev_err(&port->port->dev, "%s - out of memory\n", __func__);
476 return -ENOMEM; 472 return -ENOMEM;
477 }
478 473
479 lsr = kmalloc(1, GFP_KERNEL); /* Sigh, that's right, just one byte, 474 lsr = kmalloc(1, GFP_KERNEL); /* Sigh, that's right, just one byte,
480 as not all platforms can do DMA 475 as not all platforms can do DMA
@@ -625,14 +620,11 @@ static int check_i2c_image(struct edgeport_serial *serial)
625 __u16 ttype; 620 __u16 ttype;
626 621
627 rom_desc = kmalloc(sizeof(*rom_desc), GFP_KERNEL); 622 rom_desc = kmalloc(sizeof(*rom_desc), GFP_KERNEL);
628 if (!rom_desc) { 623 if (!rom_desc)
629 dev_err(dev, "%s - out of memory\n", __func__);
630 return -ENOMEM; 624 return -ENOMEM;
631 } 625
632 buffer = kmalloc(TI_MAX_I2C_SIZE, GFP_KERNEL); 626 buffer = kmalloc(TI_MAX_I2C_SIZE, GFP_KERNEL);
633 if (!buffer) { 627 if (!buffer) {
634 dev_err(dev, "%s - out of memory when allocating buffer\n",
635 __func__);
636 kfree(rom_desc); 628 kfree(rom_desc);
637 return -ENOMEM; 629 return -ENOMEM;
638 } 630 }
@@ -706,10 +698,9 @@ static int get_manuf_info(struct edgeport_serial *serial, __u8 *buffer)
706 struct device *dev = &serial->serial->dev->dev; 698 struct device *dev = &serial->serial->dev->dev;
707 699
708 rom_desc = kmalloc(sizeof(*rom_desc), GFP_KERNEL); 700 rom_desc = kmalloc(sizeof(*rom_desc), GFP_KERNEL);
709 if (!rom_desc) { 701 if (!rom_desc)
710 dev_err(dev, "%s - out of memory\n", __func__);
711 return -ENOMEM; 702 return -ENOMEM;
712 } 703
713 start_address = get_descriptor_addr(serial, I2C_DESC_TYPE_ION, 704 start_address = get_descriptor_addr(serial, I2C_DESC_TYPE_ION,
714 rom_desc); 705 rom_desc);
715 706
@@ -769,10 +760,8 @@ static int build_i2c_fw_hdr(__u8 *header, struct device *dev)
769 sizeof(struct ti_i2c_firmware_rec)); 760 sizeof(struct ti_i2c_firmware_rec));
770 761
771 buffer = kmalloc(buffer_size, GFP_KERNEL); 762 buffer = kmalloc(buffer_size, GFP_KERNEL);
772 if (!buffer) { 763 if (!buffer)
773 dev_err(dev, "%s - out of memory\n", __func__);
774 return -ENOMEM; 764 return -ENOMEM;
775 }
776 765
777 // Set entire image of 0xffs 766 // Set entire image of 0xffs
778 memset(buffer, 0xff, buffer_size); 767 memset(buffer, 0xff, buffer_size);
@@ -832,10 +821,8 @@ static int i2c_type_bootmode(struct edgeport_serial *serial)
832 u8 *data; 821 u8 *data;
833 822
834 data = kmalloc(1, GFP_KERNEL); 823 data = kmalloc(1, GFP_KERNEL);
835 if (!data) { 824 if (!data)
836 dev_err(dev, "%s - out of memory\n", __func__);
837 return -ENOMEM; 825 return -ENOMEM;
838 }
839 826
840 /* Try to read type 2 */ 827 /* Try to read type 2 */
841 status = ti_vread_sync(serial->serial->dev, UMPC_MEMORY_READ, 828 status = ti_vread_sync(serial->serial->dev, UMPC_MEMORY_READ,
@@ -986,10 +973,9 @@ static int download_fw(struct edgeport_serial *serial)
986 * Read Manufacturing Descriptor from TI Based Edgeport 973 * Read Manufacturing Descriptor from TI Based Edgeport
987 */ 974 */
988 ti_manuf_desc = kmalloc(sizeof(*ti_manuf_desc), GFP_KERNEL); 975 ti_manuf_desc = kmalloc(sizeof(*ti_manuf_desc), GFP_KERNEL);
989 if (!ti_manuf_desc) { 976 if (!ti_manuf_desc)
990 dev_err(dev, "%s - out of memory.\n", __func__);
991 return -ENOMEM; 977 return -ENOMEM;
992 } 978
993 status = get_manuf_info(serial, (__u8 *)ti_manuf_desc); 979 status = get_manuf_info(serial, (__u8 *)ti_manuf_desc);
994 if (status) { 980 if (status) {
995 kfree(ti_manuf_desc); 981 kfree(ti_manuf_desc);
@@ -1006,7 +992,6 @@ static int download_fw(struct edgeport_serial *serial)
1006 992
1007 rom_desc = kmalloc(sizeof(*rom_desc), GFP_KERNEL); 993 rom_desc = kmalloc(sizeof(*rom_desc), GFP_KERNEL);
1008 if (!rom_desc) { 994 if (!rom_desc) {
1009 dev_err(dev, "%s - out of memory.\n", __func__);
1010 kfree(ti_manuf_desc); 995 kfree(ti_manuf_desc);
1011 return -ENOMEM; 996 return -ENOMEM;
1012 } 997 }
@@ -1023,7 +1008,6 @@ static int download_fw(struct edgeport_serial *serial)
1023 firmware_version = kmalloc(sizeof(*firmware_version), 1008 firmware_version = kmalloc(sizeof(*firmware_version),
1024 GFP_KERNEL); 1009 GFP_KERNEL);
1025 if (!firmware_version) { 1010 if (!firmware_version) {
1026 dev_err(dev, "%s - out of memory.\n", __func__);
1027 kfree(rom_desc); 1011 kfree(rom_desc);
1028 kfree(ti_manuf_desc); 1012 kfree(ti_manuf_desc);
1029 return -ENOMEM; 1013 return -ENOMEM;
@@ -1068,8 +1052,6 @@ static int download_fw(struct edgeport_serial *serial)
1068 1052
1069 record = kmalloc(1, GFP_KERNEL); 1053 record = kmalloc(1, GFP_KERNEL);
1070 if (!record) { 1054 if (!record) {
1071 dev_err(dev, "%s - out of memory.\n",
1072 __func__);
1073 kfree(firmware_version); 1055 kfree(firmware_version);
1074 kfree(rom_desc); 1056 kfree(rom_desc);
1075 kfree(ti_manuf_desc); 1057 kfree(ti_manuf_desc);
@@ -1153,7 +1135,6 @@ static int download_fw(struct edgeport_serial *serial)
1153 1135
1154 header = kmalloc(HEADER_SIZE, GFP_KERNEL); 1136 header = kmalloc(HEADER_SIZE, GFP_KERNEL);
1155 if (!header) { 1137 if (!header) {
1156 dev_err(dev, "%s - out of memory.\n", __func__);
1157 kfree(rom_desc); 1138 kfree(rom_desc);
1158 kfree(ti_manuf_desc); 1139 kfree(ti_manuf_desc);
1159 return -ENOMEM; 1140 return -ENOMEM;
@@ -1161,7 +1142,6 @@ static int download_fw(struct edgeport_serial *serial)
1161 1142
1162 vheader = kmalloc(HEADER_SIZE, GFP_KERNEL); 1143 vheader = kmalloc(HEADER_SIZE, GFP_KERNEL);
1163 if (!vheader) { 1144 if (!vheader) {
1164 dev_err(dev, "%s - out of memory.\n", __func__);
1165 kfree(header); 1145 kfree(header);
1166 kfree(rom_desc); 1146 kfree(rom_desc);
1167 kfree(ti_manuf_desc); 1147 kfree(ti_manuf_desc);
@@ -1290,10 +1270,9 @@ static int download_fw(struct edgeport_serial *serial)
1290 * Read Manufacturing Descriptor from TI Based Edgeport 1270 * Read Manufacturing Descriptor from TI Based Edgeport
1291 */ 1271 */
1292 ti_manuf_desc = kmalloc(sizeof(*ti_manuf_desc), GFP_KERNEL); 1272 ti_manuf_desc = kmalloc(sizeof(*ti_manuf_desc), GFP_KERNEL);
1293 if (!ti_manuf_desc) { 1273 if (!ti_manuf_desc)
1294 dev_err(dev, "%s - out of memory.\n", __func__);
1295 return -ENOMEM; 1274 return -ENOMEM;
1296 } 1275
1297 status = get_manuf_info(serial, (__u8 *)ti_manuf_desc); 1276 status = get_manuf_info(serial, (__u8 *)ti_manuf_desc);
1298 if (status) { 1277 if (status) {
1299 kfree(ti_manuf_desc); 1278 kfree(ti_manuf_desc);
@@ -1328,10 +1307,8 @@ static int download_fw(struct edgeport_serial *serial)
1328 buffer_size = (((1024 * 16) - 512) + 1307 buffer_size = (((1024 * 16) - 512) +
1329 sizeof(struct ti_i2c_image_header)); 1308 sizeof(struct ti_i2c_image_header));
1330 buffer = kmalloc(buffer_size, GFP_KERNEL); 1309 buffer = kmalloc(buffer_size, GFP_KERNEL);
1331 if (!buffer) { 1310 if (!buffer)
1332 dev_err(dev, "%s - out of memory\n", __func__);
1333 return -ENOMEM; 1311 return -ENOMEM;
1334 }
1335 1312
1336 /* Initialize the buffer to 0xff (pad the buffer) */ 1313 /* Initialize the buffer to 0xff (pad the buffer) */
1337 memset(buffer, 0xff, buffer_size); 1314 memset(buffer, 0xff, buffer_size);
@@ -2122,7 +2099,6 @@ static void change_port_settings(struct tty_struct *tty,
2122 config = kmalloc (sizeof (*config), GFP_KERNEL); 2099 config = kmalloc (sizeof (*config), GFP_KERNEL);
2123 if (!config) { 2100 if (!config) {
2124 tty->termios = *old_termios; 2101 tty->termios = *old_termios;
2125 dev_err(dev, "%s - out of memory\n", __func__);
2126 return; 2102 return;
2127 } 2103 }
2128 2104
@@ -2362,8 +2338,6 @@ static int edge_ioctl(struct tty_struct *tty,
2362 struct usb_serial_port *port = tty->driver_data; 2338 struct usb_serial_port *port = tty->driver_data;
2363 struct edgeport_port *edge_port = usb_get_serial_port_data(port); 2339 struct edgeport_port *edge_port = usb_get_serial_port_data(port);
2364 2340
2365 dev_dbg(&port->dev, "%s - cmd = 0x%x\n", __func__, cmd);
2366
2367 switch (cmd) { 2341 switch (cmd) {
2368 case TIOCGSERIAL: 2342 case TIOCGSERIAL:
2369 dev_dbg(&port->dev, "%s - TIOCGSERIAL\n", __func__); 2343 dev_dbg(&port->dev, "%s - TIOCGSERIAL\n", __func__);
@@ -2395,10 +2369,9 @@ static int edge_startup(struct usb_serial *serial)
2395 2369
2396 /* create our private serial structure */ 2370 /* create our private serial structure */
2397 edge_serial = kzalloc(sizeof(struct edgeport_serial), GFP_KERNEL); 2371 edge_serial = kzalloc(sizeof(struct edgeport_serial), GFP_KERNEL);
2398 if (edge_serial == NULL) { 2372 if (!edge_serial)
2399 dev_err(&serial->dev->dev, "%s - Out of memory\n", __func__);
2400 return -ENOMEM; 2373 return -ENOMEM;
2401 } 2374
2402 mutex_init(&edge_serial->es_lock); 2375 mutex_init(&edge_serial->es_lock);
2403 edge_serial->serial = serial; 2376 edge_serial->serial = serial;
2404 usb_set_serial_data(serial, edge_serial); 2377 usb_set_serial_data(serial, edge_serial);
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c
index 76c9a847da5d..f51a5d52c0ed 100644
--- a/drivers/usb/serial/ipaq.c
+++ b/drivers/usb/serial/ipaq.c
@@ -12,7 +12,6 @@
12 12
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/errno.h> 14#include <linux/errno.h>
15#include <linux/init.h>
16#include <linux/slab.h> 15#include <linux/slab.h>
17#include <linux/tty.h> 16#include <linux/tty.h>
18#include <linux/tty_driver.h> 17#include <linux/tty_driver.h>
@@ -37,7 +36,7 @@ static int ipaq_open(struct tty_struct *tty,
37static int ipaq_calc_num_ports(struct usb_serial *serial); 36static int ipaq_calc_num_ports(struct usb_serial *serial);
38static int ipaq_startup(struct usb_serial *serial); 37static int ipaq_startup(struct usb_serial *serial);
39 38
40static struct usb_device_id ipaq_id_table [] = { 39static const struct usb_device_id ipaq_id_table[] = {
41 { USB_DEVICE(0x0104, 0x00BE) }, /* Socket USB Sync */ 40 { USB_DEVICE(0x0104, 0x00BE) }, /* Socket USB Sync */
42 { USB_DEVICE(0x03F0, 0x1016) }, /* HP USB Sync */ 41 { USB_DEVICE(0x03F0, 0x1016) }, /* HP USB Sync */
43 { USB_DEVICE(0x03F0, 0x1116) }, /* HP USB Sync 1611 */ 42 { USB_DEVICE(0x03F0, 0x1116) }, /* HP USB Sync 1611 */
diff --git a/drivers/usb/serial/ipw.c b/drivers/usb/serial/ipw.c
index 155eab14b30e..8b1cf18a668b 100644
--- a/drivers/usb/serial/ipw.c
+++ b/drivers/usb/serial/ipw.c
@@ -38,7 +38,6 @@
38 38
39#include <linux/kernel.h> 39#include <linux/kernel.h>
40#include <linux/errno.h> 40#include <linux/errno.h>
41#include <linux/init.h>
42#include <linux/slab.h> 41#include <linux/slab.h>
43#include <linux/tty.h> 42#include <linux/tty.h>
44#include <linux/tty_flip.h> 43#include <linux/tty_flip.h>
diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
index 716930ab1bb1..73956d48a0c5 100644
--- a/drivers/usb/serial/ir-usb.c
+++ b/drivers/usb/serial/ir-usb.c
@@ -377,15 +377,12 @@ static void ir_set_termios(struct tty_struct *tty,
377 * send the baud change out on an "empty" data packet 377 * send the baud change out on an "empty" data packet
378 */ 378 */
379 urb = usb_alloc_urb(0, GFP_KERNEL); 379 urb = usb_alloc_urb(0, GFP_KERNEL);
380 if (!urb) { 380 if (!urb)
381 dev_err(&port->dev, "%s - no more urbs\n", __func__);
382 return; 381 return;
383 } 382
384 transfer_buffer = kmalloc(1, GFP_KERNEL); 383 transfer_buffer = kmalloc(1, GFP_KERNEL);
385 if (!transfer_buffer) { 384 if (!transfer_buffer)
386 dev_err(&port->dev, "%s - out of memory\n", __func__);
387 goto err_buf; 385 goto err_buf;
388 }
389 386
390 *transfer_buffer = ir_xbof | ir_baud; 387 *transfer_buffer = ir_xbof | ir_baud;
391 388
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
index 57c439a24b5a..d00dae17d520 100644
--- a/drivers/usb/serial/iuu_phoenix.c
+++ b/drivers/usb/serial/iuu_phoenix.c
@@ -17,7 +17,6 @@
17 */ 17 */
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/errno.h> 19#include <linux/errno.h>
20#include <linux/init.h>
21#include <linux/slab.h> 20#include <linux/slab.h>
22#include <linux/tty.h> 21#include <linux/tty.h>
23#include <linux/tty_driver.h> 22#include <linux/tty_driver.h>
@@ -770,7 +769,7 @@ uart_enable_failed:
770 return status; 769 return status;
771} 770}
772 771
773/* Diables the IUU UART (a.k.a. the Phoenix voiderface) */ 772/* Disables the IUU UART (a.k.a. the Phoenix voiderface) */
774static int iuu_uart_off(struct usb_serial_port *port) 773static int iuu_uart_off(struct usb_serial_port *port)
775{ 774{
776 int status; 775 int status;
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
index d6960aebe246..265c6776b081 100644
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -31,7 +31,6 @@
31#include <linux/kernel.h> 31#include <linux/kernel.h>
32#include <linux/jiffies.h> 32#include <linux/jiffies.h>
33#include <linux/errno.h> 33#include <linux/errno.h>
34#include <linux/init.h>
35#include <linux/slab.h> 34#include <linux/slab.h>
36#include <linux/tty.h> 35#include <linux/tty.h>
37#include <linux/tty_driver.h> 36#include <linux/tty_driver.h>
@@ -165,7 +164,7 @@ static void keyspan_set_termios(struct tty_struct *tty,
165 if (d_details->calculate_baud_rate(port, baud_rate, d_details->baudclk, 164 if (d_details->calculate_baud_rate(port, baud_rate, d_details->baudclk,
166 NULL, NULL, NULL, device_port) == KEYSPAN_BAUD_RATE_OK) { 165 NULL, NULL, NULL, device_port) == KEYSPAN_BAUD_RATE_OK) {
167 /* FIXME - more to do here to ensure rate changes cleanly */ 166 /* FIXME - more to do here to ensure rate changes cleanly */
168 /* FIXME - calcuate exact rate from divisor ? */ 167 /* FIXME - calculate exact rate from divisor ? */
169 p_priv->baud = baud_rate; 168 p_priv->baud = baud_rate;
170 } else 169 } else
171 baud_rate = tty_termios_baud_rate(old_termios); 170 baud_rate = tty_termios_baud_rate(old_termios);
@@ -1226,10 +1225,8 @@ static struct urb *keyspan_setup_urb(struct usb_serial *serial, int endpoint,
1226 1225
1227 dev_dbg(&serial->interface->dev, "%s - alloc for endpoint %d.\n", __func__, endpoint); 1226 dev_dbg(&serial->interface->dev, "%s - alloc for endpoint %d.\n", __func__, endpoint);
1228 urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */ 1227 urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */
1229 if (urb == NULL) { 1228 if (!urb)
1230 dev_dbg(&serial->interface->dev, "%s - alloc for endpoint %d failed.\n", __func__, endpoint);
1231 return NULL; 1229 return NULL;
1232 }
1233 1230
1234 if (endpoint == 0) { 1231 if (endpoint == 0) {
1235 /* control EP filled in when used */ 1232 /* control EP filled in when used */
@@ -2312,10 +2309,8 @@ static int keyspan_startup(struct usb_serial *serial)
2312 2309
2313 /* Setup private data for serial driver */ 2310 /* Setup private data for serial driver */
2314 s_priv = kzalloc(sizeof(struct keyspan_serial_private), GFP_KERNEL); 2311 s_priv = kzalloc(sizeof(struct keyspan_serial_private), GFP_KERNEL);
2315 if (!s_priv) { 2312 if (!s_priv)
2316 dev_dbg(&serial->dev->dev, "%s - kmalloc for keyspan_serial_private failed.\n", __func__);
2317 return -ENOMEM; 2313 return -ENOMEM;
2318 }
2319 2314
2320 s_priv->instat_buf = kzalloc(INSTAT_BUFLEN, GFP_KERNEL); 2315 s_priv->instat_buf = kzalloc(INSTAT_BUFLEN, GFP_KERNEL);
2321 if (!s_priv->instat_buf) 2316 if (!s_priv->instat_buf)
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
index 5f1d382e55cf..e972412b614b 100644
--- a/drivers/usb/serial/keyspan_pda.c
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -17,7 +17,6 @@
17 17
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/errno.h> 19#include <linux/errno.h>
20#include <linux/init.h>
21#include <linux/slab.h> 20#include <linux/slab.h>
22#include <linux/tty.h> 21#include <linux/tty.h>
23#include <linux/tty_driver.h> 22#include <linux/tty_driver.h>
diff --git a/drivers/usb/serial/keyspan_usa26msg.h b/drivers/usb/serial/keyspan_usa26msg.h
index 3808727db65a..09e21e84fc4e 100644
--- a/drivers/usb/serial/keyspan_usa26msg.h
+++ b/drivers/usb/serial/keyspan_usa26msg.h
@@ -62,7 +62,7 @@
62 or: 62 or:
63 63
64 (b) 0x80 bit set 64 (b) 0x80 bit set
65 indiates that the bytes following alternate data and 65 indicates that the bytes following alternate data and
66 status bytes: 66 status bytes:
67 67
68 STAT DATA STAT DATA STAT DATA STAT DATA ... 68 STAT DATA STAT DATA STAT DATA STAT DATA ...
diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c
index 1b4054fe52a5..c88cc4966b23 100644
--- a/drivers/usb/serial/kl5kusb105.c
+++ b/drivers/usb/serial/kl5kusb105.c
@@ -37,7 +37,6 @@
37 37
38#include <linux/kernel.h> 38#include <linux/kernel.h>
39#include <linux/errno.h> 39#include <linux/errno.h>
40#include <linux/init.h>
41#include <linux/slab.h> 40#include <linux/slab.h>
42#include <linux/tty.h> 41#include <linux/tty.h>
43#include <linux/tty_driver.h> 42#include <linux/tty_driver.h>
@@ -182,11 +181,9 @@ static int klsi_105_get_line_state(struct usb_serial_port *port,
182 dev_info(&port->serial->dev->dev, "sending SIO Poll request\n"); 181 dev_info(&port->serial->dev->dev, "sending SIO Poll request\n");
183 182
184 status_buf = kmalloc(KLSI_STATUSBUF_LEN, GFP_KERNEL); 183 status_buf = kmalloc(KLSI_STATUSBUF_LEN, GFP_KERNEL);
185 if (!status_buf) { 184 if (!status_buf)
186 dev_err(&port->dev, "%s - out of memory for status buffer.\n",
187 __func__);
188 return -ENOMEM; 185 return -ENOMEM;
189 } 186
190 status_buf[0] = 0xff; 187 status_buf[0] = 0xff;
191 status_buf[1] = 0xff; 188 status_buf[1] = 0xff;
192 rc = usb_control_msg(port->serial->dev, 189 rc = usb_control_msg(port->serial->dev,
@@ -273,11 +270,9 @@ static int klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port)
273 * priv->line_state. 270 * priv->line_state.
274 */ 271 */
275 cfg = kmalloc(sizeof(*cfg), GFP_KERNEL); 272 cfg = kmalloc(sizeof(*cfg), GFP_KERNEL);
276 if (!cfg) { 273 if (!cfg)
277 dev_err(&port->dev, "%s - out of memory for config buffer.\n",
278 __func__);
279 return -ENOMEM; 274 return -ENOMEM;
280 } 275
281 cfg->pktlen = 5; 276 cfg->pktlen = 5;
282 cfg->baudrate = kl5kusb105a_sio_b9600; 277 cfg->baudrate = kl5kusb105a_sio_b9600;
283 cfg->databits = kl5kusb105a_dtb_8; 278 cfg->databits = kl5kusb105a_dtb_8;
@@ -417,10 +412,8 @@ static void klsi_105_set_termios(struct tty_struct *tty,
417 speed_t baud; 412 speed_t baud;
418 413
419 cfg = kmalloc(sizeof(*cfg), GFP_KERNEL); 414 cfg = kmalloc(sizeof(*cfg), GFP_KERNEL);
420 if (!cfg) { 415 if (!cfg)
421 dev_err(dev, "%s - out of memory for config buffer.\n", __func__);
422 return; 416 return;
423 }
424 417
425 /* lock while we are modifying the settings */ 418 /* lock while we are modifying the settings */
426 spin_lock_irqsave(&priv->lock, flags); 419 spin_lock_irqsave(&priv->lock, flags);
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
index 78b48c31abf5..d8d164b82dc3 100644
--- a/drivers/usb/serial/kobil_sct.c
+++ b/drivers/usb/serial/kobil_sct.c
@@ -25,7 +25,6 @@
25 25
26#include <linux/kernel.h> 26#include <linux/kernel.h>
27#include <linux/errno.h> 27#include <linux/errno.h>
28#include <linux/init.h>
29#include <linux/slab.h> 28#include <linux/slab.h>
30#include <linux/tty.h> 29#include <linux/tty.h>
31#include <linux/tty_driver.h> 30#include <linux/tty_driver.h>
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
index 6a15adf53360..fd707d6a10e2 100644
--- a/drivers/usb/serial/mct_u232.c
+++ b/drivers/usb/serial/mct_u232.c
@@ -23,7 +23,6 @@
23 23
24#include <linux/kernel.h> 24#include <linux/kernel.h>
25#include <linux/errno.h> 25#include <linux/errno.h>
26#include <linux/init.h>
27#include <linux/slab.h> 26#include <linux/slab.h>
28#include <linux/tty.h> 27#include <linux/tty.h>
29#include <linux/tty_driver.h> 28#include <linux/tty_driver.h>
diff --git a/drivers/usb/serial/metro-usb.c b/drivers/usb/serial/metro-usb.c
index 40ccf6e5e318..39e683096e94 100644
--- a/drivers/usb/serial/metro-usb.c
+++ b/drivers/usb/serial/metro-usb.c
@@ -7,7 +7,6 @@
7*/ 7*/
8 8
9#include <linux/kernel.h> 9#include <linux/kernel.h>
10#include <linux/init.h>
11#include <linux/tty.h> 10#include <linux/tty.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/usb.h> 12#include <linux/usb.h>
@@ -43,7 +42,7 @@ struct metrousb_private {
43}; 42};
44 43
45/* Device table list. */ 44/* Device table list. */
46static struct usb_device_id id_table[] = { 45static const struct usb_device_id id_table[] = {
47 { USB_DEVICE(FOCUS_VENDOR_ID, FOCUS_PRODUCT_ID_BI) }, 46 { USB_DEVICE(FOCUS_VENDOR_ID, FOCUS_PRODUCT_ID_BI) },
48 { USB_DEVICE(FOCUS_VENDOR_ID, FOCUS_PRODUCT_ID_UNI) }, 47 { USB_DEVICE(FOCUS_VENDOR_ID, FOCUS_PRODUCT_ID_UNI) },
49 { }, /* Terminating entry. */ 48 { }, /* Terminating entry. */
@@ -54,7 +53,7 @@ MODULE_DEVICE_TABLE(usb, id_table);
54#define UNI_CMD_OPEN 0x80 53#define UNI_CMD_OPEN 0x80
55#define UNI_CMD_CLOSE 0xFF 54#define UNI_CMD_CLOSE 0xFF
56 55
57inline int metrousb_is_unidirectional_mode(struct usb_serial_port *port) 56static inline int metrousb_is_unidirectional_mode(struct usb_serial_port *port)
58{ 57{
59 __u16 product_id = le16_to_cpu( 58 __u16 product_id = le16_to_cpu(
60 port->serial->dev->descriptor.idProduct); 59 port->serial->dev->descriptor.idProduct);
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index 439c951f261b..4eb277225a77 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * mos7720.c 2 * mos7720.c
3 * Controls the Moschip 7720 usb to dual port serial convertor 3 * Controls the Moschip 7720 usb to dual port serial converter
4 * 4 *
5 * Copyright 2006 Moschip Semiconductor Tech. Ltd. 5 * Copyright 2006 Moschip Semiconductor Tech. Ltd.
6 * 6 *
@@ -22,7 +22,6 @@
22 */ 22 */
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24#include <linux/errno.h> 24#include <linux/errno.h>
25#include <linux/init.h>
26#include <linux/slab.h> 25#include <linux/slab.h>
27#include <linux/tty.h> 26#include <linux/tty.h>
28#include <linux/tty_driver.h> 27#include <linux/tty_driver.h>
@@ -46,7 +45,7 @@
46#define MOS_WRITE 0x0E 45#define MOS_WRITE 0x0E
47#define MOS_READ 0x0D 46#define MOS_READ 0x0D
48 47
49/* Interrupt Rotinue Defines */ 48/* Interrupt Routines Defines */
50#define SERIAL_IIR_RLS 0x06 49#define SERIAL_IIR_RLS 0x06
51#define SERIAL_IIR_RDA 0x04 50#define SERIAL_IIR_RDA 0x04
52#define SERIAL_IIR_CTI 0x0c 51#define SERIAL_IIR_CTI 0x0c
@@ -362,15 +361,13 @@ static int write_parport_reg_nonblock(struct mos7715_parport *mos_parport,
362 361
363 /* create and initialize the control urb and containing urbtracker */ 362 /* create and initialize the control urb and containing urbtracker */
364 urbtrack = kmalloc(sizeof(struct urbtracker), GFP_ATOMIC); 363 urbtrack = kmalloc(sizeof(struct urbtracker), GFP_ATOMIC);
365 if (urbtrack == NULL) { 364 if (!urbtrack)
366 dev_err(&usbdev->dev, "out of memory");
367 return -ENOMEM; 365 return -ENOMEM;
368 } 366
369 kref_get(&mos_parport->ref_count); 367 kref_get(&mos_parport->ref_count);
370 urbtrack->mos_parport = mos_parport; 368 urbtrack->mos_parport = mos_parport;
371 urbtrack->urb = usb_alloc_urb(0, GFP_ATOMIC); 369 urbtrack->urb = usb_alloc_urb(0, GFP_ATOMIC);
372 if (urbtrack->urb == NULL) { 370 if (!urbtrack->urb) {
373 dev_err(&usbdev->dev, "out of urbs");
374 kfree(urbtrack); 371 kfree(urbtrack);
375 return -ENOMEM; 372 return -ENOMEM;
376 } 373 }
@@ -440,7 +437,7 @@ static int write_parport_reg_nonblock(struct mos7715_parport *mos_parport,
440 * not called the release function yet because someone has a serial port open. 437 * not called the release function yet because someone has a serial port open.
441 * The shared release_lock prevents the first, and the mutex and disconnected 438 * The shared release_lock prevents the first, and the mutex and disconnected
442 * flag maintained by usbserial covers the second. We also use the msg_pending 439 * flag maintained by usbserial covers the second. We also use the msg_pending
443 * flag to ensure that all synchronous usb messgage calls have completed before 440 * flag to ensure that all synchronous usb message calls have completed before
444 * our release function can return. 441 * our release function can return.
445 */ 442 */
446static int parport_prologue(struct parport *pp) 443static int parport_prologue(struct parport *pp)
@@ -471,7 +468,7 @@ static int parport_prologue(struct parport *pp)
471} 468}
472 469
473/* 470/*
474 * This is the the common bottom part of all parallel port functions that send 471 * This is the common bottom part of all parallel port functions that send
475 * synchronous messages to the device. 472 * synchronous messages to the device.
476 */ 473 */
477static inline void parport_epilogue(struct parport *pp) 474static inline void parport_epilogue(struct parport *pp)
@@ -702,10 +699,9 @@ static int mos7715_parport_init(struct usb_serial *serial)
702 699
703 /* allocate and initialize parallel port control struct */ 700 /* allocate and initialize parallel port control struct */
704 mos_parport = kzalloc(sizeof(struct mos7715_parport), GFP_KERNEL); 701 mos_parport = kzalloc(sizeof(struct mos7715_parport), GFP_KERNEL);
705 if (mos_parport == NULL) { 702 if (!mos_parport)
706 dev_dbg(&serial->dev->dev, "%s: kzalloc failed\n", __func__);
707 return -ENOMEM; 703 return -ENOMEM;
708 } 704
709 mos_parport->msg_pending = false; 705 mos_parport->msg_pending = false;
710 kref_init(&mos_parport->ref_count); 706 kref_init(&mos_parport->ref_count);
711 spin_lock_init(&mos_parport->listlock); 707 spin_lock_init(&mos_parport->listlock);
@@ -1018,18 +1014,12 @@ static int mos7720_open(struct tty_struct *tty, struct usb_serial_port *port)
1018 for (j = 0; j < NUM_URBS; ++j) { 1014 for (j = 0; j < NUM_URBS; ++j) {
1019 urb = usb_alloc_urb(0, GFP_KERNEL); 1015 urb = usb_alloc_urb(0, GFP_KERNEL);
1020 mos7720_port->write_urb_pool[j] = urb; 1016 mos7720_port->write_urb_pool[j] = urb;
1021 1017 if (!urb)
1022 if (urb == NULL) {
1023 dev_err(&port->dev, "No more urbs???\n");
1024 continue; 1018 continue;
1025 }
1026 1019
1027 urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE, 1020 urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE,
1028 GFP_KERNEL); 1021 GFP_KERNEL);
1029 if (!urb->transfer_buffer) { 1022 if (!urb->transfer_buffer) {
1030 dev_err(&port->dev,
1031 "%s-out of memory for urb buffers.\n",
1032 __func__);
1033 usb_free_urb(mos7720_port->write_urb_pool[j]); 1023 usb_free_urb(mos7720_port->write_urb_pool[j]);
1034 mos7720_port->write_urb_pool[j] = NULL; 1024 mos7720_port->write_urb_pool[j] = NULL;
1035 continue; 1025 continue;
@@ -1250,11 +1240,8 @@ static int mos7720_write(struct tty_struct *tty, struct usb_serial_port *port,
1250 if (urb->transfer_buffer == NULL) { 1240 if (urb->transfer_buffer == NULL) {
1251 urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE, 1241 urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE,
1252 GFP_KERNEL); 1242 GFP_KERNEL);
1253 if (urb->transfer_buffer == NULL) { 1243 if (!urb->transfer_buffer)
1254 dev_err_console(port, "%s no more kernel memory...\n",
1255 __func__);
1256 goto exit; 1244 goto exit;
1257 }
1258 } 1245 }
1259 transfer_size = min(count, URB_TRANSFER_BUFFER_SIZE); 1246 transfer_size = min(count, URB_TRANSFER_BUFFER_SIZE);
1260 1247
@@ -1885,8 +1872,6 @@ static int mos7720_ioctl(struct tty_struct *tty,
1885 if (mos7720_port == NULL) 1872 if (mos7720_port == NULL)
1886 return -ENODEV; 1873 return -ENODEV;
1887 1874
1888 dev_dbg(&port->dev, "%s - cmd = 0x%x", __func__, cmd);
1889
1890 switch (cmd) { 1875 switch (cmd) {
1891 case TIOCSERGETLSR: 1876 case TIOCSERGETLSR:
1892 dev_dbg(&port->dev, "%s TIOCSERGETLSR\n", __func__); 1877 dev_dbg(&port->dev, "%s TIOCSERGETLSR\n", __func__);
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index a69da83604c0..e9d967ff521b 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -24,7 +24,6 @@
24 24
25#include <linux/kernel.h> 25#include <linux/kernel.h>
26#include <linux/errno.h> 26#include <linux/errno.h>
27#include <linux/init.h>
28#include <linux/slab.h> 27#include <linux/slab.h>
29#include <linux/tty.h> 28#include <linux/tty.h>
30#include <linux/tty_driver.h> 29#include <linux/tty_driver.h>
@@ -876,20 +875,14 @@ static int mos7840_open(struct tty_struct *tty, struct usb_serial_port *port)
876 for (j = 0; j < NUM_URBS; ++j) { 875 for (j = 0; j < NUM_URBS; ++j) {
877 urb = usb_alloc_urb(0, GFP_KERNEL); 876 urb = usb_alloc_urb(0, GFP_KERNEL);
878 mos7840_port->write_urb_pool[j] = urb; 877 mos7840_port->write_urb_pool[j] = urb;
879 878 if (!urb)
880 if (urb == NULL) {
881 dev_err(&port->dev, "No more urbs???\n");
882 continue; 879 continue;
883 }
884 880
885 urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE, 881 urb->transfer_buffer = kmalloc(URB_TRANSFER_BUFFER_SIZE,
886 GFP_KERNEL); 882 GFP_KERNEL);
887 if (!urb->transfer_buffer) { 883 if (!urb->transfer_buffer) {
888 usb_free_urb(urb); 884 usb_free_urb(urb);
889 mos7840_port->write_urb_pool[j] = NULL; 885 mos7840_port->write_urb_pool[j] = NULL;
890 dev_err(&port->dev,
891 "%s-out of memory for urb buffers.\n",
892 __func__);
893 continue; 886 continue;
894 } 887 }
895 } 888 }
@@ -1381,12 +1374,8 @@ static int mos7840_write(struct tty_struct *tty, struct usb_serial_port *port,
1381 if (urb->transfer_buffer == NULL) { 1374 if (urb->transfer_buffer == NULL) {
1382 urb->transfer_buffer = 1375 urb->transfer_buffer =
1383 kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL); 1376 kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
1384 1377 if (!urb->transfer_buffer)
1385 if (urb->transfer_buffer == NULL) {
1386 dev_err_console(port, "%s no more kernel memory...\n",
1387 __func__);
1388 goto exit; 1378 goto exit;
1389 }
1390 } 1379 }
1391 transfer_size = min(count, URB_TRANSFER_BUFFER_SIZE); 1380 transfer_size = min(count, URB_TRANSFER_BUFFER_SIZE);
1392 1381
@@ -2070,8 +2059,6 @@ static int mos7840_ioctl(struct tty_struct *tty,
2070 if (mos7840_port == NULL) 2059 if (mos7840_port == NULL)
2071 return -1; 2060 return -1;
2072 2061
2073 dev_dbg(&port->dev, "%s - cmd = 0x%x\n", __func__, cmd);
2074
2075 switch (cmd) { 2062 switch (cmd) {
2076 /* return number of bytes available */ 2063 /* return number of bytes available */
2077 2064
@@ -2208,10 +2195,8 @@ static int mos7840_port_probe(struct usb_serial_port *port)
2208 2195
2209 dev_dbg(&port->dev, "mos7840_startup: configuring port %d\n", pnum); 2196 dev_dbg(&port->dev, "mos7840_startup: configuring port %d\n", pnum);
2210 mos7840_port = kzalloc(sizeof(struct moschip_port), GFP_KERNEL); 2197 mos7840_port = kzalloc(sizeof(struct moschip_port), GFP_KERNEL);
2211 if (mos7840_port == NULL) { 2198 if (!mos7840_port)
2212 dev_err(&port->dev, "%s - Out of memory\n", __func__);
2213 return -ENOMEM; 2199 return -ENOMEM;
2214 }
2215 2200
2216 /* Initialize all port interrupt end point to port 0 int 2201 /* Initialize all port interrupt end point to port 0 int
2217 * endpoint. Our device has only one interrupt end point 2202 * endpoint. Our device has only one interrupt end point
diff --git a/drivers/usb/serial/mxuport.c b/drivers/usb/serial/mxuport.c
new file mode 100644
index 000000000000..ab1d690274ae
--- /dev/null
+++ b/drivers/usb/serial/mxuport.c
@@ -0,0 +1,1393 @@
1/*
2 * mxuport.c - MOXA UPort series driver
3 *
4 * Copyright (c) 2006 Moxa Technologies Co., Ltd.
5 * Copyright (c) 2013 Andrew Lunn <andrew@lunn.ch>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * Supports the following Moxa USB to serial converters:
13 * 2 ports : UPort 1250, UPort 1250I
14 * 4 ports : UPort 1410, UPort 1450, UPort 1450I
15 * 8 ports : UPort 1610-8, UPort 1650-8
16 * 16 ports : UPort 1610-16, UPort 1650-16
17 */
18
19#include <linux/kernel.h>
20#include <linux/module.h>
21#include <linux/firmware.h>
22#include <linux/jiffies.h>
23#include <linux/serial.h>
24#include <linux/serial_reg.h>
25#include <linux/slab.h>
26#include <linux/tty.h>
27#include <linux/tty_driver.h>
28#include <linux/tty_flip.h>
29#include <linux/uaccess.h>
30#include <linux/usb.h>
31#include <linux/usb/serial.h>
32#include <asm/unaligned.h>
33
34/* Definitions for the vendor ID and device ID */
35#define MX_USBSERIAL_VID 0x110A
36#define MX_UPORT1250_PID 0x1250
37#define MX_UPORT1251_PID 0x1251
38#define MX_UPORT1410_PID 0x1410
39#define MX_UPORT1450_PID 0x1450
40#define MX_UPORT1451_PID 0x1451
41#define MX_UPORT1618_PID 0x1618
42#define MX_UPORT1658_PID 0x1658
43#define MX_UPORT1613_PID 0x1613
44#define MX_UPORT1653_PID 0x1653
45
46/* Definitions for USB info */
47#define HEADER_SIZE 4
48#define EVENT_LENGTH 8
49#define DOWN_BLOCK_SIZE 64
50
51/* Definitions for firmware info */
52#define VER_ADDR_1 0x20
53#define VER_ADDR_2 0x24
54#define VER_ADDR_3 0x28
55
56/* Definitions for USB vendor request */
57#define RQ_VENDOR_NONE 0x00
58#define RQ_VENDOR_SET_BAUD 0x01 /* Set baud rate */
59#define RQ_VENDOR_SET_LINE 0x02 /* Set line status */
60#define RQ_VENDOR_SET_CHARS 0x03 /* Set Xon/Xoff chars */
61#define RQ_VENDOR_SET_RTS 0x04 /* Set RTS */
62#define RQ_VENDOR_SET_DTR 0x05 /* Set DTR */
63#define RQ_VENDOR_SET_XONXOFF 0x06 /* Set auto Xon/Xoff */
64#define RQ_VENDOR_SET_RX_HOST_EN 0x07 /* Set RX host enable */
65#define RQ_VENDOR_SET_OPEN 0x08 /* Set open/close port */
66#define RQ_VENDOR_PURGE 0x09 /* Purge Rx/Tx buffer */
67#define RQ_VENDOR_SET_MCR 0x0A /* Set MCR register */
68#define RQ_VENDOR_SET_BREAK 0x0B /* Set Break signal */
69
70#define RQ_VENDOR_START_FW_DOWN 0x0C /* Start firmware download */
71#define RQ_VENDOR_STOP_FW_DOWN 0x0D /* Stop firmware download */
72#define RQ_VENDOR_QUERY_FW_READY 0x0E /* Query if new firmware ready */
73
74#define RQ_VENDOR_SET_FIFO_DISABLE 0x0F /* Set fifo disable */
75#define RQ_VENDOR_SET_INTERFACE 0x10 /* Set interface */
76#define RQ_VENDOR_SET_HIGH_PERFOR 0x11 /* Set hi-performance */
77
78#define RQ_VENDOR_ERASE_BLOCK 0x12 /* Erase flash block */
79#define RQ_VENDOR_WRITE_PAGE 0x13 /* Write flash page */
80#define RQ_VENDOR_PREPARE_WRITE 0x14 /* Prepare write flash */
81#define RQ_VENDOR_CONFIRM_WRITE 0x15 /* Confirm write flash */
82#define RQ_VENDOR_LOCATE 0x16 /* Locate the device */
83
84#define RQ_VENDOR_START_ROM_DOWN 0x17 /* Start firmware download */
85#define RQ_VENDOR_ROM_DATA 0x18 /* Rom file data */
86#define RQ_VENDOR_STOP_ROM_DOWN 0x19 /* Stop firmware download */
87#define RQ_VENDOR_FW_DATA 0x20 /* Firmware data */
88
89#define RQ_VENDOR_RESET_DEVICE 0x23 /* Try to reset the device */
90#define RQ_VENDOR_QUERY_FW_CONFIG 0x24
91
92#define RQ_VENDOR_GET_VERSION 0x81 /* Get firmware version */
93#define RQ_VENDOR_GET_PAGE 0x82 /* Read flash page */
94#define RQ_VENDOR_GET_ROM_PROC 0x83 /* Get ROM process state */
95
96#define RQ_VENDOR_GET_INQUEUE 0x84 /* Data in input buffer */
97#define RQ_VENDOR_GET_OUTQUEUE 0x85 /* Data in output buffer */
98
99#define RQ_VENDOR_GET_MSR 0x86 /* Get modem status register */
100
101/* Definitions for UPort event type */
102#define UPORT_EVENT_NONE 0 /* None */
103#define UPORT_EVENT_TXBUF_THRESHOLD 1 /* Tx buffer threshold */
104#define UPORT_EVENT_SEND_NEXT 2 /* Send next */
105#define UPORT_EVENT_MSR 3 /* Modem status */
106#define UPORT_EVENT_LSR 4 /* Line status */
107#define UPORT_EVENT_MCR 5 /* Modem control */
108
109/* Definitions for serial event type */
110#define SERIAL_EV_CTS 0x0008 /* CTS changed state */
111#define SERIAL_EV_DSR 0x0010 /* DSR changed state */
112#define SERIAL_EV_RLSD 0x0020 /* RLSD changed state */
113
114/* Definitions for modem control event type */
115#define SERIAL_EV_XOFF 0x40 /* XOFF received */
116
117/* Definitions for line control of communication */
118#define MX_WORDLENGTH_5 5
119#define MX_WORDLENGTH_6 6
120#define MX_WORDLENGTH_7 7
121#define MX_WORDLENGTH_8 8
122
123#define MX_PARITY_NONE 0
124#define MX_PARITY_ODD 1
125#define MX_PARITY_EVEN 2
126#define MX_PARITY_MARK 3
127#define MX_PARITY_SPACE 4
128
129#define MX_STOP_BITS_1 0
130#define MX_STOP_BITS_1_5 1
131#define MX_STOP_BITS_2 2
132
133#define MX_RTS_DISABLE 0x0
134#define MX_RTS_ENABLE 0x1
135#define MX_RTS_HW 0x2
136#define MX_RTS_NO_CHANGE 0x3 /* Flag, not valid register value*/
137
138#define MX_INT_RS232 0
139#define MX_INT_2W_RS485 1
140#define MX_INT_RS422 2
141#define MX_INT_4W_RS485 3
142
143/* Definitions for holding reason */
144#define MX_WAIT_FOR_CTS 0x0001
145#define MX_WAIT_FOR_DSR 0x0002
146#define MX_WAIT_FOR_DCD 0x0004
147#define MX_WAIT_FOR_XON 0x0008
148#define MX_WAIT_FOR_START_TX 0x0010
149#define MX_WAIT_FOR_UNTHROTTLE 0x0020
150#define MX_WAIT_FOR_LOW_WATER 0x0040
151#define MX_WAIT_FOR_SEND_NEXT 0x0080
152
153#define MX_UPORT_2_PORT BIT(0)
154#define MX_UPORT_4_PORT BIT(1)
155#define MX_UPORT_8_PORT BIT(2)
156#define MX_UPORT_16_PORT BIT(3)
157
158/* This structure holds all of the local port information */
159struct mxuport_port {
160 u8 mcr_state; /* Last MCR state */
161 u8 msr_state; /* Last MSR state */
162 struct mutex mutex; /* Protects mcr_state */
163 spinlock_t spinlock; /* Protects msr_state */
164};
165
166/* Table of devices that work with this driver */
167static const struct usb_device_id mxuport_idtable[] = {
168 { USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1250_PID),
169 .driver_info = MX_UPORT_2_PORT },
170 { USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1251_PID),
171 .driver_info = MX_UPORT_2_PORT },
172 { USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1410_PID),
173 .driver_info = MX_UPORT_4_PORT },
174 { USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1450_PID),
175 .driver_info = MX_UPORT_4_PORT },
176 { USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1451_PID),
177 .driver_info = MX_UPORT_4_PORT },
178 { USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1618_PID),
179 .driver_info = MX_UPORT_8_PORT },
180 { USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1658_PID),
181 .driver_info = MX_UPORT_8_PORT },
182 { USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1613_PID),
183 .driver_info = MX_UPORT_16_PORT },
184 { USB_DEVICE(MX_USBSERIAL_VID, MX_UPORT1653_PID),
185 .driver_info = MX_UPORT_16_PORT },
186 {} /* Terminating entry */
187};
188
189MODULE_DEVICE_TABLE(usb, mxuport_idtable);
190
191/*
192 * Add a four byte header containing the port number and the number of
193 * bytes of data in the message. Return the number of bytes in the
194 * buffer.
195 */
196static int mxuport_prepare_write_buffer(struct usb_serial_port *port,
197 void *dest, size_t size)
198{
199 u8 *buf = dest;
200 int count;
201
202 count = kfifo_out_locked(&port->write_fifo, buf + HEADER_SIZE,
203 size - HEADER_SIZE,
204 &port->lock);
205
206 put_unaligned_be16(port->port_number, buf);
207 put_unaligned_be16(count, buf + 2);
208
209 dev_dbg(&port->dev, "%s - size %zd count %d\n", __func__,
210 size, count);
211
212 return count + HEADER_SIZE;
213}
214
215/* Read the given buffer in from the control pipe. */
216static int mxuport_recv_ctrl_urb(struct usb_serial *serial,
217 u8 request, u16 value, u16 index,
218 u8 *data, size_t size)
219{
220 int status;
221
222 status = usb_control_msg(serial->dev,
223 usb_rcvctrlpipe(serial->dev, 0),
224 request,
225 (USB_DIR_IN | USB_TYPE_VENDOR |
226 USB_RECIP_DEVICE), value, index,
227 data, size,
228 USB_CTRL_GET_TIMEOUT);
229 if (status < 0) {
230 dev_err(&serial->interface->dev,
231 "%s - usb_control_msg failed (%d)\n",
232 __func__, status);
233 return status;
234 }
235
236 if (status != size) {
237 dev_err(&serial->interface->dev,
238 "%s - short read (%d / %zd)\n",
239 __func__, status, size);
240 return -EIO;
241 }
242
243 return status;
244}
245
246/* Write the given buffer out to the control pipe. */
247static int mxuport_send_ctrl_data_urb(struct usb_serial *serial,
248 u8 request,
249 u16 value, u16 index,
250 u8 *data, size_t size)
251{
252 int status;
253
254 status = usb_control_msg(serial->dev,
255 usb_sndctrlpipe(serial->dev, 0),
256 request,
257 (USB_DIR_OUT | USB_TYPE_VENDOR |
258 USB_RECIP_DEVICE), value, index,
259 data, size,
260 USB_CTRL_SET_TIMEOUT);
261 if (status < 0) {
262 dev_err(&serial->interface->dev,
263 "%s - usb_control_msg failed (%d)\n",
264 __func__, status);
265 return status;
266 }
267
268 if (status != size) {
269 dev_err(&serial->interface->dev,
270 "%s - short write (%d / %zd)\n",
271 __func__, status, size);
272 return -EIO;
273 }
274
275 return 0;
276}
277
278/* Send a vendor request without any data */
279static int mxuport_send_ctrl_urb(struct usb_serial *serial,
280 u8 request, u16 value, u16 index)
281{
282 return mxuport_send_ctrl_data_urb(serial, request, value, index,
283 NULL, 0);
284}
285
286/*
287 * mxuport_throttle - throttle function of driver
288 *
289 * This function is called by the tty driver when it wants to stop the
290 * data being read from the port. Since all the data comes over one
291 * bulk in endpoint, we cannot stop submitting urbs by setting
292 * port->throttle. Instead tell the device to stop sending us data for
293 * the port.
294 */
295static void mxuport_throttle(struct tty_struct *tty)
296{
297 struct usb_serial_port *port = tty->driver_data;
298 struct usb_serial *serial = port->serial;
299
300 dev_dbg(&port->dev, "%s\n", __func__);
301
302 mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_RX_HOST_EN,
303 0, port->port_number);
304}
305
306/*
307 * mxuport_unthrottle - unthrottle function of driver
308 *
309 * This function is called by the tty driver when it wants to resume
310 * the data being read from the port. Tell the device it can resume
311 * sending us received data from the port.
312 */
313static void mxuport_unthrottle(struct tty_struct *tty)
314{
315
316 struct usb_serial_port *port = tty->driver_data;
317 struct usb_serial *serial = port->serial;
318
319 dev_dbg(&port->dev, "%s\n", __func__);
320
321 mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_RX_HOST_EN,
322 1, port->port_number);
323}
324
325/*
326 * Processes one chunk of data received for a port. Mostly a copy of
327 * usb_serial_generic_process_read_urb().
328 */
329static void mxuport_process_read_urb_data(struct usb_serial_port *port,
330 char *data, int size)
331{
332 int i;
333
334 if (!port->port.console || !port->sysrq) {
335 tty_insert_flip_string(&port->port, data, size);
336 } else {
337 for (i = 0; i < size; i++, data++) {
338 if (!usb_serial_handle_sysrq_char(port, *data))
339 tty_insert_flip_char(&port->port, *data,
340 TTY_NORMAL);
341 }
342 }
343 tty_flip_buffer_push(&port->port);
344}
345
346static void mxuport_msr_event(struct usb_serial_port *port, u8 buf[4])
347{
348 struct mxuport_port *mxport = usb_get_serial_port_data(port);
349 u8 rcv_msr_hold = buf[2] & 0xF0;
350 u16 rcv_msr_event = get_unaligned_be16(buf);
351 unsigned long flags;
352
353 if (rcv_msr_event == 0)
354 return;
355
356 /* Update MSR status */
357 spin_lock_irqsave(&mxport->spinlock, flags);
358
359 dev_dbg(&port->dev, "%s - current MSR status = 0x%x\n",
360 __func__, mxport->msr_state);
361
362 if (rcv_msr_hold & UART_MSR_CTS) {
363 mxport->msr_state |= UART_MSR_CTS;
364 dev_dbg(&port->dev, "%s - CTS high\n", __func__);
365 } else {
366 mxport->msr_state &= ~UART_MSR_CTS;
367 dev_dbg(&port->dev, "%s - CTS low\n", __func__);
368 }
369
370 if (rcv_msr_hold & UART_MSR_DSR) {
371 mxport->msr_state |= UART_MSR_DSR;
372 dev_dbg(&port->dev, "%s - DSR high\n", __func__);
373 } else {
374 mxport->msr_state &= ~UART_MSR_DSR;
375 dev_dbg(&port->dev, "%s - DSR low\n", __func__);
376 }
377
378 if (rcv_msr_hold & UART_MSR_DCD) {
379 mxport->msr_state |= UART_MSR_DCD;
380 dev_dbg(&port->dev, "%s - DCD high\n", __func__);
381 } else {
382 mxport->msr_state &= ~UART_MSR_DCD;
383 dev_dbg(&port->dev, "%s - DCD low\n", __func__);
384 }
385 spin_unlock_irqrestore(&mxport->spinlock, flags);
386
387 if (rcv_msr_event &
388 (SERIAL_EV_CTS | SERIAL_EV_DSR | SERIAL_EV_RLSD)) {
389
390 if (rcv_msr_event & SERIAL_EV_CTS) {
391 port->icount.cts++;
392 dev_dbg(&port->dev, "%s - CTS change\n", __func__);
393 }
394
395 if (rcv_msr_event & SERIAL_EV_DSR) {
396 port->icount.dsr++;
397 dev_dbg(&port->dev, "%s - DSR change\n", __func__);
398 }
399
400 if (rcv_msr_event & SERIAL_EV_RLSD) {
401 port->icount.dcd++;
402 dev_dbg(&port->dev, "%s - DCD change\n", __func__);
403 }
404 wake_up_interruptible(&port->port.delta_msr_wait);
405 }
406}
407
408static void mxuport_lsr_event(struct usb_serial_port *port, u8 buf[4])
409{
410 u8 lsr_event = buf[2];
411
412 if (lsr_event & UART_LSR_BI) {
413 port->icount.brk++;
414 dev_dbg(&port->dev, "%s - break error\n", __func__);
415 }
416
417 if (lsr_event & UART_LSR_FE) {
418 port->icount.frame++;
419 dev_dbg(&port->dev, "%s - frame error\n", __func__);
420 }
421
422 if (lsr_event & UART_LSR_PE) {
423 port->icount.parity++;
424 dev_dbg(&port->dev, "%s - parity error\n", __func__);
425 }
426
427 if (lsr_event & UART_LSR_OE) {
428 port->icount.overrun++;
429 dev_dbg(&port->dev, "%s - overrun error\n", __func__);
430 }
431}
432
433/*
434 * When something interesting happens, modem control lines XON/XOFF
435 * etc, the device sends an event. Process these events.
436 */
437static void mxuport_process_read_urb_event(struct usb_serial_port *port,
438 u8 buf[4], u32 event)
439{
440 dev_dbg(&port->dev, "%s - receive event : %04x\n", __func__, event);
441
442 switch (event) {
443 case UPORT_EVENT_SEND_NEXT:
444 /*
445 * Sent as part of the flow control on device buffers.
446 * Not currently used.
447 */
448 break;
449 case UPORT_EVENT_MSR:
450 mxuport_msr_event(port, buf);
451 break;
452 case UPORT_EVENT_LSR:
453 mxuport_lsr_event(port, buf);
454 break;
455 case UPORT_EVENT_MCR:
456 /*
457 * Event to indicate a change in XON/XOFF from the
458 * peer. Currently not used. We just continue
459 * sending the device data and it will buffer it if
460 * needed. This event could be used for flow control
461 * between the host and the device.
462 */
463 break;
464 default:
465 dev_dbg(&port->dev, "Unexpected event\n");
466 break;
467 }
468}
469
470/*
471 * One URB can contain data for multiple ports. Demultiplex the data,
472 * checking the port exists, is opened and the message is valid.
473 */
474static void mxuport_process_read_urb_demux_data(struct urb *urb)
475{
476 struct usb_serial_port *port = urb->context;
477 struct usb_serial *serial = port->serial;
478 u8 *data = urb->transfer_buffer;
479 u8 *end = data + urb->actual_length;
480 struct usb_serial_port *demux_port;
481 u8 *ch;
482 u16 rcv_port;
483 u16 rcv_len;
484
485 while (data < end) {
486 if (data + HEADER_SIZE > end) {
487 dev_warn(&port->dev, "%s - message with short header\n",
488 __func__);
489 return;
490 }
491
492 rcv_port = get_unaligned_be16(data);
493 if (rcv_port >= serial->num_ports) {
494 dev_warn(&port->dev, "%s - message for invalid port\n",
495 __func__);
496 return;
497 }
498
499 demux_port = serial->port[rcv_port];
500 rcv_len = get_unaligned_be16(data + 2);
501 if (!rcv_len || data + HEADER_SIZE + rcv_len > end) {
502 dev_warn(&port->dev, "%s - short data\n", __func__);
503 return;
504 }
505
506 if (test_bit(ASYNCB_INITIALIZED, &demux_port->port.flags)) {
507 ch = data + HEADER_SIZE;
508 mxuport_process_read_urb_data(demux_port, ch, rcv_len);
509 } else {
510 dev_dbg(&demux_port->dev, "%s - data for closed port\n",
511 __func__);
512 }
513 data += HEADER_SIZE + rcv_len;
514 }
515}
516
517/*
518 * One URB can contain events for multiple ports. Demultiplex the event,
519 * checking the port exists, and is opened.
520 */
521static void mxuport_process_read_urb_demux_event(struct urb *urb)
522{
523 struct usb_serial_port *port = urb->context;
524 struct usb_serial *serial = port->serial;
525 u8 *data = urb->transfer_buffer;
526 u8 *end = data + urb->actual_length;
527 struct usb_serial_port *demux_port;
528 u8 *ch;
529 u16 rcv_port;
530 u16 rcv_event;
531
532 while (data < end) {
533 if (data + EVENT_LENGTH > end) {
534 dev_warn(&port->dev, "%s - message with short event\n",
535 __func__);
536 return;
537 }
538
539 rcv_port = get_unaligned_be16(data);
540 if (rcv_port >= serial->num_ports) {
541 dev_warn(&port->dev, "%s - message for invalid port\n",
542 __func__);
543 return;
544 }
545
546 demux_port = serial->port[rcv_port];
547 if (test_bit(ASYNCB_INITIALIZED, &demux_port->port.flags)) {
548 ch = data + HEADER_SIZE;
549 rcv_event = get_unaligned_be16(data + 2);
550 mxuport_process_read_urb_event(demux_port, ch,
551 rcv_event);
552 } else {
553 dev_dbg(&demux_port->dev,
554 "%s - event for closed port\n", __func__);
555 }
556 data += EVENT_LENGTH;
557 }
558}
559
560/*
561 * This is called when we have received data on the bulk in
562 * endpoint. Depending on which port it was received on, it can
563 * contain serial data or events.
564 */
565static void mxuport_process_read_urb(struct urb *urb)
566{
567 struct usb_serial_port *port = urb->context;
568 struct usb_serial *serial = port->serial;
569
570 if (port == serial->port[0])
571 mxuport_process_read_urb_demux_data(urb);
572
573 if (port == serial->port[1])
574 mxuport_process_read_urb_demux_event(urb);
575}
576
577/*
578 * Ask the device how many bytes it has queued to be sent out. If
579 * there are none, return true.
580 */
581static bool mxuport_tx_empty(struct usb_serial_port *port)
582{
583 struct usb_serial *serial = port->serial;
584 bool is_empty = true;
585 u32 txlen;
586 u8 *len_buf;
587 int err;
588
589 len_buf = kzalloc(4, GFP_KERNEL);
590 if (!len_buf)
591 goto out;
592
593 err = mxuport_recv_ctrl_urb(serial, RQ_VENDOR_GET_OUTQUEUE, 0,
594 port->port_number, len_buf, 4);
595 if (err < 0)
596 goto out;
597
598 txlen = get_unaligned_be32(len_buf);
599 dev_dbg(&port->dev, "%s - tx len = %u\n", __func__, txlen);
600
601 if (txlen != 0)
602 is_empty = false;
603
604out:
605 kfree(len_buf);
606 return is_empty;
607}
608
609static int mxuport_set_mcr(struct usb_serial_port *port, u8 mcr_state)
610{
611 struct usb_serial *serial = port->serial;
612 int err;
613
614 dev_dbg(&port->dev, "%s - %02x\n", __func__, mcr_state);
615
616 err = mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_MCR,
617 mcr_state, port->port_number);
618 if (err)
619 dev_err(&port->dev, "%s - failed to change MCR\n", __func__);
620
621 return err;
622}
623
624static int mxuport_set_dtr(struct usb_serial_port *port, int on)
625{
626 struct mxuport_port *mxport = usb_get_serial_port_data(port);
627 struct usb_serial *serial = port->serial;
628 int err;
629
630 mutex_lock(&mxport->mutex);
631
632 err = mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_DTR,
633 !!on, port->port_number);
634 if (!err) {
635 if (on)
636 mxport->mcr_state |= UART_MCR_DTR;
637 else
638 mxport->mcr_state &= ~UART_MCR_DTR;
639 }
640
641 mutex_unlock(&mxport->mutex);
642
643 return err;
644}
645
646static int mxuport_set_rts(struct usb_serial_port *port, u8 state)
647{
648 struct mxuport_port *mxport = usb_get_serial_port_data(port);
649 struct usb_serial *serial = port->serial;
650 int err;
651 u8 mcr_state;
652
653 mutex_lock(&mxport->mutex);
654 mcr_state = mxport->mcr_state;
655
656 switch (state) {
657 case MX_RTS_DISABLE:
658 mcr_state &= ~UART_MCR_RTS;
659 break;
660 case MX_RTS_ENABLE:
661 mcr_state |= UART_MCR_RTS;
662 break;
663 case MX_RTS_HW:
664 /*
665 * Do not update mxport->mcr_state when doing hardware
666 * flow control.
667 */
668 break;
669 default:
670 /*
671 * Should not happen, but somebody might try passing
672 * MX_RTS_NO_CHANGE, which is not valid.
673 */
674 err = -EINVAL;
675 goto out;
676 }
677 err = mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_RTS,
678 state, port->port_number);
679 if (!err)
680 mxport->mcr_state = mcr_state;
681
682out:
683 mutex_unlock(&mxport->mutex);
684
685 return err;
686}
687
688static void mxuport_dtr_rts(struct usb_serial_port *port, int on)
689{
690 struct mxuport_port *mxport = usb_get_serial_port_data(port);
691 u8 mcr_state;
692 int err;
693
694 mutex_lock(&mxport->mutex);
695 mcr_state = mxport->mcr_state;
696
697 if (on)
698 mcr_state |= (UART_MCR_RTS | UART_MCR_DTR);
699 else
700 mcr_state &= ~(UART_MCR_RTS | UART_MCR_DTR);
701
702 err = mxuport_set_mcr(port, mcr_state);
703 if (!err)
704 mxport->mcr_state = mcr_state;
705
706 mutex_unlock(&mxport->mutex);
707}
708
709static int mxuport_tiocmset(struct tty_struct *tty, unsigned int set,
710 unsigned int clear)
711{
712 struct usb_serial_port *port = tty->driver_data;
713 struct mxuport_port *mxport = usb_get_serial_port_data(port);
714 int err;
715 u8 mcr_state;
716
717 mutex_lock(&mxport->mutex);
718 mcr_state = mxport->mcr_state;
719
720 if (set & TIOCM_RTS)
721 mcr_state |= UART_MCR_RTS;
722
723 if (set & TIOCM_DTR)
724 mcr_state |= UART_MCR_DTR;
725
726 if (clear & TIOCM_RTS)
727 mcr_state &= ~UART_MCR_RTS;
728
729 if (clear & TIOCM_DTR)
730 mcr_state &= ~UART_MCR_DTR;
731
732 err = mxuport_set_mcr(port, mcr_state);
733 if (!err)
734 mxport->mcr_state = mcr_state;
735
736 mutex_unlock(&mxport->mutex);
737
738 return err;
739}
740
741static int mxuport_tiocmget(struct tty_struct *tty)
742{
743 struct mxuport_port *mxport;
744 struct usb_serial_port *port = tty->driver_data;
745 unsigned int result;
746 unsigned long flags;
747 unsigned int msr;
748 unsigned int mcr;
749
750 mxport = usb_get_serial_port_data(port);
751
752 mutex_lock(&mxport->mutex);
753 spin_lock_irqsave(&mxport->spinlock, flags);
754
755 msr = mxport->msr_state;
756 mcr = mxport->mcr_state;
757
758 spin_unlock_irqrestore(&mxport->spinlock, flags);
759 mutex_unlock(&mxport->mutex);
760
761 result = (((mcr & UART_MCR_DTR) ? TIOCM_DTR : 0) | /* 0x002 */
762 ((mcr & UART_MCR_RTS) ? TIOCM_RTS : 0) | /* 0x004 */
763 ((msr & UART_MSR_CTS) ? TIOCM_CTS : 0) | /* 0x020 */
764 ((msr & UART_MSR_DCD) ? TIOCM_CAR : 0) | /* 0x040 */
765 ((msr & UART_MSR_RI) ? TIOCM_RI : 0) | /* 0x080 */
766 ((msr & UART_MSR_DSR) ? TIOCM_DSR : 0)); /* 0x100 */
767
768 dev_dbg(&port->dev, "%s - 0x%04x\n", __func__, result);
769
770 return result;
771}
772
773static int mxuport_set_termios_flow(struct tty_struct *tty,
774 struct ktermios *old_termios,
775 struct usb_serial_port *port,
776 struct usb_serial *serial)
777{
778 u8 xon = START_CHAR(tty);
779 u8 xoff = STOP_CHAR(tty);
780 int enable;
781 int err;
782 u8 *buf;
783 u8 rts;
784
785 buf = kmalloc(2, GFP_KERNEL);
786 if (!buf)
787 return -ENOMEM;
788
789 /* S/W flow control settings */
790 if (I_IXOFF(tty) || I_IXON(tty)) {
791 enable = 1;
792 buf[0] = xon;
793 buf[1] = xoff;
794
795 err = mxuport_send_ctrl_data_urb(serial, RQ_VENDOR_SET_CHARS,
796 0, port->port_number,
797 buf, 2);
798 if (err)
799 goto out;
800
801 dev_dbg(&port->dev, "%s - XON = 0x%02x, XOFF = 0x%02x\n",
802 __func__, xon, xoff);
803 } else {
804 enable = 0;
805 }
806
807 err = mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_XONXOFF,
808 enable, port->port_number);
809 if (err)
810 goto out;
811
812 rts = MX_RTS_NO_CHANGE;
813
814 /* H/W flow control settings */
815 if (!old_termios ||
816 C_CRTSCTS(tty) != (old_termios->c_cflag & CRTSCTS)) {
817 if (C_CRTSCTS(tty))
818 rts = MX_RTS_HW;
819 else
820 rts = MX_RTS_ENABLE;
821 }
822
823 if (C_BAUD(tty)) {
824 if (old_termios && (old_termios->c_cflag & CBAUD) == B0) {
825 /* Raise DTR and RTS */
826 if (C_CRTSCTS(tty))
827 rts = MX_RTS_HW;
828 else
829 rts = MX_RTS_ENABLE;
830 mxuport_set_dtr(port, 1);
831 }
832 } else {
833 /* Drop DTR and RTS */
834 rts = MX_RTS_DISABLE;
835 mxuport_set_dtr(port, 0);
836 }
837
838 if (rts != MX_RTS_NO_CHANGE)
839 err = mxuport_set_rts(port, rts);
840
841out:
842 kfree(buf);
843 return err;
844}
845
846static void mxuport_set_termios(struct tty_struct *tty,
847 struct usb_serial_port *port,
848 struct ktermios *old_termios)
849{
850 struct usb_serial *serial = port->serial;
851 u8 *buf;
852 u8 data_bits;
853 u8 stop_bits;
854 u8 parity;
855 int baud;
856 int err;
857
858 if (old_termios &&
859 !tty_termios_hw_change(&tty->termios, old_termios) &&
860 tty->termios.c_iflag == old_termios->c_iflag) {
861 dev_dbg(&port->dev, "%s - nothing to change\n", __func__);
862 return;
863 }
864
865 buf = kmalloc(4, GFP_KERNEL);
866 if (!buf)
867 return;
868
869 /* Set data bit of termios */
870 switch (C_CSIZE(tty)) {
871 case CS5:
872 data_bits = MX_WORDLENGTH_5;
873 break;
874 case CS6:
875 data_bits = MX_WORDLENGTH_6;
876 break;
877 case CS7:
878 data_bits = MX_WORDLENGTH_7;
879 break;
880 case CS8:
881 default:
882 data_bits = MX_WORDLENGTH_8;
883 break;
884 }
885
886 /* Set parity of termios */
887 if (C_PARENB(tty)) {
888 if (C_CMSPAR(tty)) {
889 if (C_PARODD(tty))
890 parity = MX_PARITY_MARK;
891 else
892 parity = MX_PARITY_SPACE;
893 } else {
894 if (C_PARODD(tty))
895 parity = MX_PARITY_ODD;
896 else
897 parity = MX_PARITY_EVEN;
898 }
899 } else {
900 parity = MX_PARITY_NONE;
901 }
902
903 /* Set stop bit of termios */
904 if (C_CSTOPB(tty))
905 stop_bits = MX_STOP_BITS_2;
906 else
907 stop_bits = MX_STOP_BITS_1;
908
909 buf[0] = data_bits;
910 buf[1] = parity;
911 buf[2] = stop_bits;
912 buf[3] = 0;
913
914 err = mxuport_send_ctrl_data_urb(serial, RQ_VENDOR_SET_LINE,
915 0, port->port_number, buf, 4);
916 if (err)
917 goto out;
918
919 err = mxuport_set_termios_flow(tty, old_termios, port, serial);
920 if (err)
921 goto out;
922
923 baud = tty_get_baud_rate(tty);
924 if (!baud)
925 baud = 9600;
926
927 /* Note: Little Endian */
928 put_unaligned_le32(baud, buf);
929
930 err = mxuport_send_ctrl_data_urb(serial, RQ_VENDOR_SET_BAUD,
931 0, port->port_number,
932 buf, 4);
933 if (err)
934 goto out;
935
936 dev_dbg(&port->dev, "baud_rate : %d\n", baud);
937 dev_dbg(&port->dev, "data_bits : %d\n", data_bits);
938 dev_dbg(&port->dev, "parity : %d\n", parity);
939 dev_dbg(&port->dev, "stop_bits : %d\n", stop_bits);
940
941out:
942 kfree(buf);
943}
944
945/*
946 * Determine how many ports this device has dynamically. It will be
947 * called after the probe() callback is called, but before attach().
948 */
949static int mxuport_calc_num_ports(struct usb_serial *serial)
950{
951 unsigned long features = (unsigned long)usb_get_serial_data(serial);
952
953 if (features & MX_UPORT_2_PORT)
954 return 2;
955 if (features & MX_UPORT_4_PORT)
956 return 4;
957 if (features & MX_UPORT_8_PORT)
958 return 8;
959 if (features & MX_UPORT_16_PORT)
960 return 16;
961
962 return 0;
963}
964
965/* Get the version of the firmware currently running. */
966static int mxuport_get_fw_version(struct usb_serial *serial, u32 *version)
967{
968 u8 *ver_buf;
969 int err;
970
971 ver_buf = kzalloc(4, GFP_KERNEL);
972 if (!ver_buf)
973 return -ENOMEM;
974
975 /* Get firmware version from SDRAM */
976 err = mxuport_recv_ctrl_urb(serial, RQ_VENDOR_GET_VERSION, 0, 0,
977 ver_buf, 4);
978 if (err != 4) {
979 err = -EIO;
980 goto out;
981 }
982
983 *version = (ver_buf[0] << 16) | (ver_buf[1] << 8) | ver_buf[2];
984 err = 0;
985out:
986 kfree(ver_buf);
987 return err;
988}
989
990/* Given a firmware blob, download it to the device. */
991static int mxuport_download_fw(struct usb_serial *serial,
992 const struct firmware *fw_p)
993{
994 u8 *fw_buf;
995 size_t txlen;
996 size_t fwidx;
997 int err;
998
999 fw_buf = kmalloc(DOWN_BLOCK_SIZE, GFP_KERNEL);
1000 if (!fw_buf)
1001 return -ENOMEM;
1002
1003 dev_dbg(&serial->interface->dev, "Starting firmware download...\n");
1004 err = mxuport_send_ctrl_urb(serial, RQ_VENDOR_START_FW_DOWN, 0, 0);
1005 if (err)
1006 goto out;
1007
1008 fwidx = 0;
1009 do {
1010 txlen = min_t(size_t, (fw_p->size - fwidx), DOWN_BLOCK_SIZE);
1011
1012 memcpy(fw_buf, &fw_p->data[fwidx], txlen);
1013 err = mxuport_send_ctrl_data_urb(serial, RQ_VENDOR_FW_DATA,
1014 0, 0, fw_buf, txlen);
1015 if (err) {
1016 mxuport_send_ctrl_urb(serial, RQ_VENDOR_STOP_FW_DOWN,
1017 0, 0);
1018 goto out;
1019 }
1020
1021 fwidx += txlen;
1022 usleep_range(1000, 2000);
1023
1024 } while (fwidx < fw_p->size);
1025
1026 msleep(1000);
1027 err = mxuport_send_ctrl_urb(serial, RQ_VENDOR_STOP_FW_DOWN, 0, 0);
1028 if (err)
1029 goto out;
1030
1031 msleep(1000);
1032 err = mxuport_send_ctrl_urb(serial, RQ_VENDOR_QUERY_FW_READY, 0, 0);
1033
1034out:
1035 kfree(fw_buf);
1036 return err;
1037}
1038
1039static int mxuport_probe(struct usb_serial *serial,
1040 const struct usb_device_id *id)
1041{
1042 u16 productid = le16_to_cpu(serial->dev->descriptor.idProduct);
1043 const struct firmware *fw_p = NULL;
1044 u32 version;
1045 int local_ver;
1046 char buf[32];
1047 int err;
1048
1049 /* Load our firmware */
1050 err = mxuport_send_ctrl_urb(serial, RQ_VENDOR_QUERY_FW_CONFIG, 0, 0);
1051 if (err) {
1052 mxuport_send_ctrl_urb(serial, RQ_VENDOR_RESET_DEVICE, 0, 0);
1053 return err;
1054 }
1055
1056 err = mxuport_get_fw_version(serial, &version);
1057 if (err < 0)
1058 return err;
1059
1060 dev_dbg(&serial->interface->dev, "Device firmware version v%x.%x.%x\n",
1061 (version & 0xff0000) >> 16,
1062 (version & 0xff00) >> 8,
1063 (version & 0xff));
1064
1065 snprintf(buf, sizeof(buf) - 1, "moxa/moxa-%04x.fw", productid);
1066
1067 err = request_firmware(&fw_p, buf, &serial->interface->dev);
1068 if (err) {
1069 dev_warn(&serial->interface->dev, "Firmware %s not found\n",
1070 buf);
1071
1072 /* Use the firmware already in the device */
1073 err = 0;
1074 } else {
1075 local_ver = ((fw_p->data[VER_ADDR_1] << 16) |
1076 (fw_p->data[VER_ADDR_2] << 8) |
1077 fw_p->data[VER_ADDR_3]);
1078 dev_dbg(&serial->interface->dev,
1079 "Available firmware version v%x.%x.%x\n",
1080 fw_p->data[VER_ADDR_1], fw_p->data[VER_ADDR_2],
1081 fw_p->data[VER_ADDR_3]);
1082 if (local_ver > version) {
1083 err = mxuport_download_fw(serial, fw_p);
1084 if (err)
1085 goto out;
1086 err = mxuport_get_fw_version(serial, &version);
1087 if (err < 0)
1088 goto out;
1089 }
1090 }
1091
1092 dev_info(&serial->interface->dev,
1093 "Using device firmware version v%x.%x.%x\n",
1094 (version & 0xff0000) >> 16,
1095 (version & 0xff00) >> 8,
1096 (version & 0xff));
1097
1098 /*
1099 * Contains the features of this hardware. Store away for
1100 * later use, eg, number of ports.
1101 */
1102 usb_set_serial_data(serial, (void *)id->driver_info);
1103out:
1104 if (fw_p)
1105 release_firmware(fw_p);
1106 return err;
1107}
1108
1109
1110static int mxuport_port_probe(struct usb_serial_port *port)
1111{
1112 struct usb_serial *serial = port->serial;
1113 struct mxuport_port *mxport;
1114 int err;
1115
1116 mxport = devm_kzalloc(&port->dev, sizeof(struct mxuport_port),
1117 GFP_KERNEL);
1118 if (!mxport)
1119 return -ENOMEM;
1120
1121 mutex_init(&mxport->mutex);
1122 spin_lock_init(&mxport->spinlock);
1123
1124 /* Set the port private data */
1125 usb_set_serial_port_data(port, mxport);
1126
1127 /* Set FIFO (Enable) */
1128 err = mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_FIFO_DISABLE,
1129 0, port->port_number);
1130 if (err)
1131 return err;
1132
1133 /* Set transmission mode (Hi-Performance) */
1134 err = mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_HIGH_PERFOR,
1135 0, port->port_number);
1136 if (err)
1137 return err;
1138
1139 /* Set interface (RS-232) */
1140 err = mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_INTERFACE,
1141 MX_INT_RS232,
1142 port->port_number);
1143 if (err)
1144 return err;
1145
1146 return 0;
1147}
1148
1149static int mxuport_alloc_write_urb(struct usb_serial *serial,
1150 struct usb_serial_port *port,
1151 struct usb_serial_port *port0,
1152 int j)
1153{
1154 struct usb_device *dev = interface_to_usbdev(serial->interface);
1155
1156 set_bit(j, &port->write_urbs_free);
1157 port->write_urbs[j] = usb_alloc_urb(0, GFP_KERNEL);
1158 if (!port->write_urbs[j])
1159 return -ENOMEM;
1160
1161 port->bulk_out_buffers[j] = kmalloc(port0->bulk_out_size, GFP_KERNEL);
1162 if (!port->bulk_out_buffers[j])
1163 return -ENOMEM;
1164
1165 usb_fill_bulk_urb(port->write_urbs[j], dev,
1166 usb_sndbulkpipe(dev, port->bulk_out_endpointAddress),
1167 port->bulk_out_buffers[j],
1168 port->bulk_out_size,
1169 serial->type->write_bulk_callback,
1170 port);
1171 return 0;
1172}
1173
1174
1175static int mxuport_alloc_write_urbs(struct usb_serial *serial,
1176 struct usb_serial_port *port,
1177 struct usb_serial_port *port0)
1178{
1179 int j;
1180 int ret;
1181
1182 for (j = 0; j < ARRAY_SIZE(port->write_urbs); ++j) {
1183 ret = mxuport_alloc_write_urb(serial, port, port0, j);
1184 if (ret)
1185 return ret;
1186 }
1187 return 0;
1188}
1189
1190
1191static int mxuport_attach(struct usb_serial *serial)
1192{
1193 struct usb_serial_port *port0 = serial->port[0];
1194 struct usb_serial_port *port1 = serial->port[1];
1195 struct usb_serial_port *port;
1196 int err;
1197 int i;
1198 int j;
1199
1200 /*
1201 * Throw away all but the first allocated write URBs so we can
1202 * set them up again to fit the multiplexing scheme.
1203 */
1204 for (i = 1; i < serial->num_bulk_out; ++i) {
1205 port = serial->port[i];
1206 for (j = 0; j < ARRAY_SIZE(port->write_urbs); ++j) {
1207 usb_free_urb(port->write_urbs[j]);
1208 kfree(port->bulk_out_buffers[j]);
1209 port->write_urbs[j] = NULL;
1210 port->bulk_out_buffers[j] = NULL;
1211 }
1212 port->write_urbs_free = 0;
1213 }
1214
1215 /*
1216 * All write data is sent over the first bulk out endpoint,
1217 * with an added header to indicate the port. Allocate URBs
1218 * for each port to the first bulk out endpoint.
1219 */
1220 for (i = 1; i < serial->num_ports; ++i) {
1221 port = serial->port[i];
1222 port->bulk_out_size = port0->bulk_out_size;
1223 port->bulk_out_endpointAddress =
1224 port0->bulk_out_endpointAddress;
1225
1226 err = mxuport_alloc_write_urbs(serial, port, port0);
1227 if (err)
1228 return err;
1229
1230 port->write_urb = port->write_urbs[0];
1231 port->bulk_out_buffer = port->bulk_out_buffers[0];
1232
1233 /*
1234 * Ensure each port has a fifo. The framework only
1235 * allocates a fifo to ports with a bulk out endpoint,
1236 * where as we need one for every port.
1237 */
1238 if (!kfifo_initialized(&port->write_fifo)) {
1239 err = kfifo_alloc(&port->write_fifo, PAGE_SIZE,
1240 GFP_KERNEL);
1241 if (err)
1242 return err;
1243 }
1244 }
1245
1246 /*
1247 * All data from the ports is received on the first bulk in
1248 * endpoint, with a multiplex header. The second bulk in is
1249 * used for events.
1250 *
1251 * Start to read from the device.
1252 */
1253 err = usb_serial_generic_submit_read_urbs(port0, GFP_KERNEL);
1254 if (err)
1255 return err;
1256
1257 err = usb_serial_generic_submit_read_urbs(port1, GFP_KERNEL);
1258 if (err) {
1259 usb_serial_generic_close(port0);
1260 return err;
1261 }
1262
1263 return 0;
1264}
1265
1266static int mxuport_open(struct tty_struct *tty, struct usb_serial_port *port)
1267{
1268 struct mxuport_port *mxport = usb_get_serial_port_data(port);
1269 struct usb_serial *serial = port->serial;
1270 int err;
1271
1272 /* Set receive host (enable) */
1273 err = mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_RX_HOST_EN,
1274 1, port->port_number);
1275 if (err)
1276 return err;
1277
1278 err = mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_OPEN,
1279 1, port->port_number);
1280 if (err) {
1281 mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_RX_HOST_EN,
1282 0, port->port_number);
1283 return err;
1284 }
1285
1286 /* Initial port termios */
1287 mxuport_set_termios(tty, port, NULL);
1288
1289 /*
1290 * TODO: use RQ_VENDOR_GET_MSR, once we know what it
1291 * returns.
1292 */
1293 mxport->msr_state = 0;
1294
1295 return err;
1296}
1297
1298static void mxuport_close(struct usb_serial_port *port)
1299{
1300 struct usb_serial *serial = port->serial;
1301
1302 mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_OPEN, 0,
1303 port->port_number);
1304
1305 mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_RX_HOST_EN, 0,
1306 port->port_number);
1307}
1308
1309/* Send a break to the port. */
1310static void mxuport_break_ctl(struct tty_struct *tty, int break_state)
1311{
1312 struct usb_serial_port *port = tty->driver_data;
1313 struct usb_serial *serial = port->serial;
1314 int enable;
1315
1316 if (break_state == -1) {
1317 enable = 1;
1318 dev_dbg(&port->dev, "%s - sending break\n", __func__);
1319 } else {
1320 enable = 0;
1321 dev_dbg(&port->dev, "%s - clearing break\n", __func__);
1322 }
1323
1324 mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_BREAK,
1325 enable, port->port_number);
1326}
1327
1328static int mxuport_resume(struct usb_serial *serial)
1329{
1330 struct usb_serial_port *port;
1331 int c = 0;
1332 int i;
1333 int r;
1334
1335 for (i = 0; i < 2; i++) {
1336 port = serial->port[i];
1337
1338 r = usb_serial_generic_submit_read_urbs(port, GFP_NOIO);
1339 if (r < 0)
1340 c++;
1341 }
1342
1343 for (i = 0; i < serial->num_ports; i++) {
1344 port = serial->port[i];
1345 if (!test_bit(ASYNCB_INITIALIZED, &port->port.flags))
1346 continue;
1347
1348 r = usb_serial_generic_write_start(port, GFP_NOIO);
1349 if (r < 0)
1350 c++;
1351 }
1352
1353 return c ? -EIO : 0;
1354}
1355
1356static struct usb_serial_driver mxuport_device = {
1357 .driver = {
1358 .owner = THIS_MODULE,
1359 .name = "mxuport",
1360 },
1361 .description = "MOXA UPort",
1362 .id_table = mxuport_idtable,
1363 .num_ports = 0,
1364 .probe = mxuport_probe,
1365 .port_probe = mxuport_port_probe,
1366 .attach = mxuport_attach,
1367 .calc_num_ports = mxuport_calc_num_ports,
1368 .open = mxuport_open,
1369 .close = mxuport_close,
1370 .set_termios = mxuport_set_termios,
1371 .break_ctl = mxuport_break_ctl,
1372 .tx_empty = mxuport_tx_empty,
1373 .tiocmiwait = usb_serial_generic_tiocmiwait,
1374 .get_icount = usb_serial_generic_get_icount,
1375 .throttle = mxuport_throttle,
1376 .unthrottle = mxuport_unthrottle,
1377 .tiocmget = mxuport_tiocmget,
1378 .tiocmset = mxuport_tiocmset,
1379 .dtr_rts = mxuport_dtr_rts,
1380 .process_read_urb = mxuport_process_read_urb,
1381 .prepare_write_buffer = mxuport_prepare_write_buffer,
1382 .resume = mxuport_resume,
1383};
1384
1385static struct usb_serial_driver *const serial_drivers[] = {
1386 &mxuport_device, NULL
1387};
1388
1389module_usb_serial_driver(serial_drivers, mxuport_idtable);
1390
1391MODULE_AUTHOR("Andrew Lunn <andrew@lunn.ch>");
1392MODULE_AUTHOR("<support@moxa.com>");
1393MODULE_LICENSE("GPL");
diff --git a/drivers/usb/serial/navman.c b/drivers/usb/serial/navman.c
index 38725fc8c2c8..2a97cdc078d5 100644
--- a/drivers/usb/serial/navman.c
+++ b/drivers/usb/serial/navman.c
@@ -14,7 +14,6 @@
14 14
15#include <linux/gfp.h> 15#include <linux/gfp.h>
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/init.h>
18#include <linux/tty.h> 17#include <linux/tty.h>
19#include <linux/tty_flip.h> 18#include <linux/tty_flip.h>
20#include <linux/module.h> 19#include <linux/module.h>
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
index 5739bf6f7200..f6c6900bccf0 100644
--- a/drivers/usb/serial/omninet.c
+++ b/drivers/usb/serial/omninet.c
@@ -13,7 +13,6 @@
13 13
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/errno.h> 15#include <linux/errno.h>
16#include <linux/init.h>
17#include <linux/slab.h> 16#include <linux/slab.h>
18#include <linux/tty.h> 17#include <linux/tty.h>
19#include <linux/tty_driver.h> 18#include <linux/tty_driver.h>
diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c
index cbe779f578f9..4856fb7e637e 100644
--- a/drivers/usb/serial/opticon.c
+++ b/drivers/usb/serial/opticon.c
@@ -12,7 +12,6 @@
12 */ 12 */
13 13
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/tty.h> 15#include <linux/tty.h>
17#include <linux/tty_driver.h> 16#include <linux/tty_driver.h>
18#include <linux/slab.h> 17#include <linux/slab.h>
@@ -139,7 +138,7 @@ static int opticon_open(struct tty_struct *tty, struct usb_serial_port *port)
139 /* Clear RTS line */ 138 /* Clear RTS line */
140 send_control_msg(port, CONTROL_RTS, 0); 139 send_control_msg(port, CONTROL_RTS, 0);
141 140
142 /* clear the halt status of the enpoint */ 141 /* clear the halt status of the endpoint */
143 usb_clear_halt(port->serial->dev, port->read_urb->pipe); 142 usb_clear_halt(port->serial->dev, port->read_urb->pipe);
144 143
145 res = usb_serial_generic_open(tty, port); 144 res = usb_serial_generic_open(tty, port);
@@ -200,15 +199,12 @@ static int opticon_write(struct tty_struct *tty, struct usb_serial_port *port,
200 199
201 buffer = kmalloc(count, GFP_ATOMIC); 200 buffer = kmalloc(count, GFP_ATOMIC);
202 if (!buffer) { 201 if (!buffer) {
203 dev_err(&port->dev, "out of memory\n");
204 count = -ENOMEM; 202 count = -ENOMEM;
205
206 goto error_no_buffer; 203 goto error_no_buffer;
207 } 204 }
208 205
209 urb = usb_alloc_urb(0, GFP_ATOMIC); 206 urb = usb_alloc_urb(0, GFP_ATOMIC);
210 if (!urb) { 207 if (!urb) {
211 dev_err(&port->dev, "no more free urbs\n");
212 count = -ENOMEM; 208 count = -ENOMEM;
213 goto error_no_urb; 209 goto error_no_urb;
214 } 210 }
@@ -217,11 +213,10 @@ static int opticon_write(struct tty_struct *tty, struct usb_serial_port *port,
217 213
218 usb_serial_debug_data(&port->dev, __func__, count, buffer); 214 usb_serial_debug_data(&port->dev, __func__, count, buffer);
219 215
220 /* The conncected devices do not have a bulk write endpoint, 216 /* The connected devices do not have a bulk write endpoint,
221 * to transmit data to de barcode device the control endpoint is used */ 217 * to transmit data to de barcode device the control endpoint is used */
222 dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_NOIO); 218 dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_NOIO);
223 if (!dr) { 219 if (!dr) {
224 dev_err(&port->dev, "out of memory\n");
225 count = -ENOMEM; 220 count = -ENOMEM;
226 goto error_no_dr; 221 goto error_no_dr;
227 } 222 }
@@ -367,8 +362,6 @@ static int opticon_ioctl(struct tty_struct *tty,
367{ 362{
368 struct usb_serial_port *port = tty->driver_data; 363 struct usb_serial_port *port = tty->driver_data;
369 364
370 dev_dbg(&port->dev, "%s - cmd = 0x%x\n", __func__, cmd);
371
372 switch (cmd) { 365 switch (cmd) {
373 case TIOCGSERIAL: 366 case TIOCGSERIAL:
374 return get_serial_info(port, 367 return get_serial_info(port,
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index cc7a24154490..5c86f57e4afa 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -320,6 +320,9 @@ static void option_instat_callback(struct urb *urb);
320 * It seems to contain a Qualcomm QSC6240/6290 chipset */ 320 * It seems to contain a Qualcomm QSC6240/6290 chipset */
321#define FOUR_G_SYSTEMS_PRODUCT_W14 0x9603 321#define FOUR_G_SYSTEMS_PRODUCT_W14 0x9603
322 322
323/* iBall 3.5G connect wireless modem */
324#define IBALL_3_5G_CONNECT 0x9605
325
323/* Zoom */ 326/* Zoom */
324#define ZOOM_PRODUCT_4597 0x9607 327#define ZOOM_PRODUCT_4597 0x9607
325 328
@@ -1447,6 +1450,17 @@ static const struct usb_device_id option_ids[] = {
1447 .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, 1450 .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
1448 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff), 1451 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff),
1449 .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, 1452 .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
1453 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffe9, 0xff, 0xff, 0xff) },
1454 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8b, 0xff, 0xff, 0xff) },
1455 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8c, 0xff, 0xff, 0xff) },
1456 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8d, 0xff, 0xff, 0xff) },
1457 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8e, 0xff, 0xff, 0xff) },
1458 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8f, 0xff, 0xff, 0xff) },
1459 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff90, 0xff, 0xff, 0xff) },
1460 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff91, 0xff, 0xff, 0xff) },
1461 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff92, 0xff, 0xff, 0xff) },
1462 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff93, 0xff, 0xff, 0xff) },
1463 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff94, 0xff, 0xff, 0xff) },
1450 1464
1451 /* NOTE: most ZTE CDMA devices should be driven by zte_ev, not option */ 1465 /* NOTE: most ZTE CDMA devices should be driven by zte_ev, not option */
1452 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2718, 0xff, 0xff, 0xff), 1466 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2718, 0xff, 0xff, 0xff),
@@ -1489,6 +1503,7 @@ static const struct usb_device_id option_ids[] = {
1489 .driver_info = (kernel_ulong_t)&four_g_w14_blacklist 1503 .driver_info = (kernel_ulong_t)&four_g_w14_blacklist
1490 }, 1504 },
1491 { USB_DEVICE(LONGCHEER_VENDOR_ID, ZOOM_PRODUCT_4597) }, 1505 { USB_DEVICE(LONGCHEER_VENDOR_ID, ZOOM_PRODUCT_4597) },
1506 { USB_DEVICE(LONGCHEER_VENDOR_ID, IBALL_3_5G_CONNECT) },
1492 { USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) }, 1507 { USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) },
1493 /* Pirelli */ 1508 /* Pirelli */
1494 { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_1, 0xff) }, 1509 { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_1, 0xff) },
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c
index a2080ac7b7e5..a4b88bc038b6 100644
--- a/drivers/usb/serial/oti6858.c
+++ b/drivers/usb/serial/oti6858.c
@@ -39,7 +39,6 @@
39 39
40#include <linux/kernel.h> 40#include <linux/kernel.h>
41#include <linux/errno.h> 41#include <linux/errno.h>
42#include <linux/init.h>
43#include <linux/slab.h> 42#include <linux/slab.h>
44#include <linux/tty.h> 43#include <linux/tty.h>
45#include <linux/tty_driver.h> 44#include <linux/tty_driver.h>
@@ -103,6 +102,7 @@ struct oti6858_control_pkt {
103#define TX_BUFFER_EMPTIED 0x09 102#define TX_BUFFER_EMPTIED 0x09
104 u8 pin_state; 103 u8 pin_state;
105#define PIN_MASK 0x3f 104#define PIN_MASK 0x3f
105#define PIN_MSR_MASK 0x1b
106#define PIN_RTS 0x20 /* output pin */ 106#define PIN_RTS 0x20 /* output pin */
107#define PIN_CTS 0x10 /* input pin, active low */ 107#define PIN_CTS 0x10 /* input pin, active low */
108#define PIN_DSR 0x08 /* input pin, active low */ 108#define PIN_DSR 0x08 /* input pin, active low */
@@ -134,7 +134,6 @@ static int oti6858_chars_in_buffer(struct tty_struct *tty);
134static int oti6858_tiocmget(struct tty_struct *tty); 134static int oti6858_tiocmget(struct tty_struct *tty);
135static int oti6858_tiocmset(struct tty_struct *tty, 135static int oti6858_tiocmset(struct tty_struct *tty,
136 unsigned int set, unsigned int clear); 136 unsigned int set, unsigned int clear);
137static int oti6858_tiocmiwait(struct tty_struct *tty, unsigned long arg);
138static int oti6858_port_probe(struct usb_serial_port *port); 137static int oti6858_port_probe(struct usb_serial_port *port);
139static int oti6858_port_remove(struct usb_serial_port *port); 138static int oti6858_port_remove(struct usb_serial_port *port);
140 139
@@ -153,7 +152,7 @@ static struct usb_serial_driver oti6858_device = {
153 .init_termios = oti6858_init_termios, 152 .init_termios = oti6858_init_termios,
154 .tiocmget = oti6858_tiocmget, 153 .tiocmget = oti6858_tiocmget,
155 .tiocmset = oti6858_tiocmset, 154 .tiocmset = oti6858_tiocmset,
156 .tiocmiwait = oti6858_tiocmiwait, 155 .tiocmiwait = usb_serial_generic_tiocmiwait,
157 .read_bulk_callback = oti6858_read_bulk_callback, 156 .read_bulk_callback = oti6858_read_bulk_callback,
158 .read_int_callback = oti6858_read_int_callback, 157 .read_int_callback = oti6858_read_int_callback,
159 .write_bulk_callback = oti6858_write_bulk_callback, 158 .write_bulk_callback = oti6858_write_bulk_callback,
@@ -200,8 +199,7 @@ static void setup_line(struct work_struct *work)
200 int result; 199 int result;
201 200
202 new_setup = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL); 201 new_setup = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL);
203 if (new_setup == NULL) { 202 if (!new_setup) {
204 dev_err(&port->dev, "%s(): out of memory!\n", __func__);
205 /* we will try again */ 203 /* we will try again */
206 schedule_delayed_work(&priv->delayed_setup_work, 204 schedule_delayed_work(&priv->delayed_setup_work,
207 msecs_to_jiffies(2)); 205 msecs_to_jiffies(2));
@@ -287,11 +285,9 @@ static void send_data(struct work_struct *work)
287 285
288 if (count != 0) { 286 if (count != 0) {
289 allow = kmalloc(1, GFP_KERNEL); 287 allow = kmalloc(1, GFP_KERNEL);
290 if (!allow) { 288 if (!allow)
291 dev_err_console(port, "%s(): kmalloc failed\n",
292 __func__);
293 return; 289 return;
294 } 290
295 result = usb_control_msg(port->serial->dev, 291 result = usb_control_msg(port->serial->dev,
296 usb_rcvctrlpipe(port->serial->dev, 0), 292 usb_rcvctrlpipe(port->serial->dev, 0),
297 OTI6858_REQ_T_CHECK_TXBUFF, 293 OTI6858_REQ_T_CHECK_TXBUFF,
@@ -517,10 +513,8 @@ static int oti6858_open(struct tty_struct *tty, struct usb_serial_port *port)
517 usb_clear_halt(serial->dev, port->read_urb->pipe); 513 usb_clear_halt(serial->dev, port->read_urb->pipe);
518 514
519 buf = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL); 515 buf = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL);
520 if (buf == NULL) { 516 if (!buf)
521 dev_err(&port->dev, "%s(): out of memory!\n", __func__);
522 return -ENOMEM; 517 return -ENOMEM;
523 }
524 518
525 result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), 519 result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
526 OTI6858_REQ_T_GET_STATUS, 520 OTI6858_REQ_T_GET_STATUS,
@@ -647,46 +641,6 @@ static int oti6858_tiocmget(struct tty_struct *tty)
647 return result; 641 return result;
648} 642}
649 643
650static int oti6858_tiocmiwait(struct tty_struct *tty, unsigned long arg)
651{
652 struct usb_serial_port *port = tty->driver_data;
653 struct oti6858_private *priv = usb_get_serial_port_data(port);
654 unsigned long flags;
655 unsigned int prev, status;
656 unsigned int changed;
657
658 spin_lock_irqsave(&priv->lock, flags);
659 prev = priv->status.pin_state;
660 spin_unlock_irqrestore(&priv->lock, flags);
661
662 while (1) {
663 wait_event_interruptible(port->port.delta_msr_wait,
664 port->serial->disconnected ||
665 priv->status.pin_state != prev);
666 if (signal_pending(current))
667 return -ERESTARTSYS;
668
669 if (port->serial->disconnected)
670 return -EIO;
671
672 spin_lock_irqsave(&priv->lock, flags);
673 status = priv->status.pin_state & PIN_MASK;
674 spin_unlock_irqrestore(&priv->lock, flags);
675
676 changed = prev ^ status;
677 /* FIXME: check if this is correct (active high/low) */
678 if (((arg & TIOCM_RNG) && (changed & PIN_RI)) ||
679 ((arg & TIOCM_DSR) && (changed & PIN_DSR)) ||
680 ((arg & TIOCM_CD) && (changed & PIN_DCD)) ||
681 ((arg & TIOCM_CTS) && (changed & PIN_CTS)))
682 return 0;
683 prev = status;
684 }
685
686 /* NOTREACHED */
687 return 0;
688}
689
690static void oti6858_read_int_callback(struct urb *urb) 644static void oti6858_read_int_callback(struct urb *urb)
691{ 645{
692 struct usb_serial_port *port = urb->context; 646 struct usb_serial_port *port = urb->context;
@@ -744,8 +698,21 @@ static void oti6858_read_int_callback(struct urb *urb)
744 } 698 }
745 699
746 if (!priv->transient) { 700 if (!priv->transient) {
747 if (xs->pin_state != priv->status.pin_state) 701 u8 delta = xs->pin_state ^ priv->status.pin_state;
702
703 if (delta & PIN_MSR_MASK) {
704 if (delta & PIN_CTS)
705 port->icount.cts++;
706 if (delta & PIN_DSR)
707 port->icount.dsr++;
708 if (delta & PIN_RI)
709 port->icount.rng++;
710 if (delta & PIN_DCD)
711 port->icount.dcd++;
712
748 wake_up_interruptible(&port->port.delta_msr_wait); 713 wake_up_interruptible(&port->port.delta_msr_wait);
714 }
715
749 memcpy(&priv->status, xs, OTI6858_CTRL_PKT_SIZE); 716 memcpy(&priv->status, xs, OTI6858_CTRL_PKT_SIZE);
750 } 717 }
751 718
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 1e3318dfa1cb..2e22fc22c382 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -12,12 +12,10 @@
12 * 12 *
13 * See Documentation/usb/usb-serial.txt for more information on using this 13 * See Documentation/usb/usb-serial.txt for more information on using this
14 * driver 14 * driver
15 *
16 */ 15 */
17 16
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/errno.h> 18#include <linux/errno.h>
20#include <linux/init.h>
21#include <linux/slab.h> 19#include <linux/slab.h>
22#include <linux/tty.h> 20#include <linux/tty.h>
23#include <linux/tty_driver.h> 21#include <linux/tty_driver.h>
@@ -32,10 +30,9 @@
32#include <asm/unaligned.h> 30#include <asm/unaligned.h>
33#include "pl2303.h" 31#include "pl2303.h"
34 32
35/* 33
36 * Version Information 34#define PL2303_QUIRK_UART_STATE_IDX0 BIT(0)
37 */ 35#define PL2303_QUIRK_LEGACY BIT(1)
38#define DRIVER_DESC "Prolific PL2303 USB to serial adaptor driver"
39 36
40static const struct usb_device_id id_table[] = { 37static const struct usb_device_id id_table[] = {
41 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID) }, 38 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID) },
@@ -64,9 +61,12 @@ static const struct usb_device_id id_table[] = {
64 { USB_DEVICE(SITECOM_VENDOR_ID, SITECOM_PRODUCT_ID) }, 61 { USB_DEVICE(SITECOM_VENDOR_ID, SITECOM_PRODUCT_ID) },
65 { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_ID) }, 62 { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_ID) },
66 { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_ID) }, 63 { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_ID) },
67 { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_SX1) }, 64 { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_SX1),
68 { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_X65) }, 65 .driver_info = PL2303_QUIRK_UART_STATE_IDX0 },
69 { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_X75) }, 66 { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_X65),
67 .driver_info = PL2303_QUIRK_UART_STATE_IDX0 },
68 { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_X75),
69 .driver_info = PL2303_QUIRK_UART_STATE_IDX0 },
70 { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_EF81) }, 70 { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_EF81) },
71 { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_ID_S81) }, /* Benq/Siemens S81 */ 71 { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_ID_S81) }, /* Benq/Siemens S81 */
72 { USB_DEVICE(SYNTECH_VENDOR_ID, SYNTECH_PRODUCT_ID) }, 72 { USB_DEVICE(SYNTECH_VENDOR_ID, SYNTECH_PRODUCT_ID) },
@@ -116,7 +116,8 @@ MODULE_DEVICE_TABLE(usb, id_table);
116#define VENDOR_READ_REQUEST_TYPE 0xc0 116#define VENDOR_READ_REQUEST_TYPE 0xc0
117#define VENDOR_READ_REQUEST 0x01 117#define VENDOR_READ_REQUEST 0x01
118 118
119#define UART_STATE 0x08 119#define UART_STATE_INDEX 8
120#define UART_STATE_MSR_MASK 0x8b
120#define UART_STATE_TRANSIENT_MASK 0x74 121#define UART_STATE_TRANSIENT_MASK 0x74
121#define UART_DCD 0x01 122#define UART_DCD 0x01
122#define UART_DSR 0x02 123#define UART_DSR 0x02
@@ -129,98 +130,142 @@ MODULE_DEVICE_TABLE(usb, id_table);
129 130
130 131
131enum pl2303_type { 132enum pl2303_type {
132 type_0, /* don't know the difference between type 0 and */ 133 TYPE_01, /* Type 0 and 1 (difference unknown) */
133 type_1, /* type 1, until someone from prolific tells us... */ 134 TYPE_HX, /* HX version of the pl2303 chip */
134 HX, /* HX version of the pl2303 chip */ 135 TYPE_COUNT
136};
137
138struct pl2303_type_data {
139 speed_t max_baud_rate;
140 unsigned long quirks;
135}; 141};
136 142
137struct pl2303_serial_private { 143struct pl2303_serial_private {
138 enum pl2303_type type; 144 const struct pl2303_type_data *type;
145 unsigned long quirks;
139}; 146};
140 147
141struct pl2303_private { 148struct pl2303_private {
142 spinlock_t lock; 149 spinlock_t lock;
143 u8 line_control; 150 u8 line_control;
144 u8 line_status; 151 u8 line_status;
152
153 u8 line_settings[7];
154};
155
156static const struct pl2303_type_data pl2303_type_data[TYPE_COUNT] = {
157 [TYPE_01] = {
158 .max_baud_rate = 1228800,
159 .quirks = PL2303_QUIRK_LEGACY,
160 },
145}; 161};
146 162
147static int pl2303_vendor_read(__u16 value, __u16 index, 163static int pl2303_vendor_read(struct usb_serial *serial, u16 value,
148 struct usb_serial *serial, unsigned char *buf) 164 unsigned char buf[1])
149{ 165{
150 int res = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), 166 struct device *dev = &serial->interface->dev;
167 int res;
168
169 res = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
151 VENDOR_READ_REQUEST, VENDOR_READ_REQUEST_TYPE, 170 VENDOR_READ_REQUEST, VENDOR_READ_REQUEST_TYPE,
152 value, index, buf, 1, 100); 171 value, 0, buf, 1, 100);
153 dev_dbg(&serial->interface->dev, "0x%x:0x%x:0x%x:0x%x %d - %x\n", 172 if (res != 1) {
154 VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, value, index, 173 dev_err(dev, "%s - failed to read [%04x]: %d\n", __func__,
155 res, buf[0]); 174 value, res);
156 return res; 175 if (res >= 0)
176 res = -EIO;
177
178 return res;
179 }
180
181 dev_dbg(dev, "%s - [%04x] = %02x\n", __func__, value, buf[0]);
182
183 return 0;
157} 184}
158 185
159static int pl2303_vendor_write(__u16 value, __u16 index, 186static int pl2303_vendor_write(struct usb_serial *serial, u16 value, u16 index)
160 struct usb_serial *serial)
161{ 187{
162 int res = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), 188 struct device *dev = &serial->interface->dev;
189 int res;
190
191 dev_dbg(dev, "%s - [%04x] = %02x\n", __func__, value, index);
192
193 res = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
163 VENDOR_WRITE_REQUEST, VENDOR_WRITE_REQUEST_TYPE, 194 VENDOR_WRITE_REQUEST, VENDOR_WRITE_REQUEST_TYPE,
164 value, index, NULL, 0, 100); 195 value, index, NULL, 0, 100);
165 dev_dbg(&serial->interface->dev, "0x%x:0x%x:0x%x:0x%x %d\n", 196 if (res) {
166 VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, value, index, 197 dev_err(dev, "%s - failed to write [%04x]: %d\n", __func__,
167 res); 198 value, res);
168 return res; 199 return res;
200 }
201
202 return 0;
203}
204
205static int pl2303_probe(struct usb_serial *serial,
206 const struct usb_device_id *id)
207{
208 usb_set_serial_data(serial, (void *)id->driver_info);
209
210 return 0;
169} 211}
170 212
171static int pl2303_startup(struct usb_serial *serial) 213static int pl2303_startup(struct usb_serial *serial)
172{ 214{
173 struct pl2303_serial_private *spriv; 215 struct pl2303_serial_private *spriv;
174 enum pl2303_type type = type_0; 216 enum pl2303_type type = TYPE_01;
175 unsigned char *buf; 217 unsigned char *buf;
176 218
177 spriv = kzalloc(sizeof(*spriv), GFP_KERNEL); 219 spriv = kzalloc(sizeof(*spriv), GFP_KERNEL);
178 if (!spriv) 220 if (!spriv)
179 return -ENOMEM; 221 return -ENOMEM;
180 222
181 buf = kmalloc(10, GFP_KERNEL); 223 buf = kmalloc(1, GFP_KERNEL);
182 if (!buf) { 224 if (!buf) {
183 kfree(spriv); 225 kfree(spriv);
184 return -ENOMEM; 226 return -ENOMEM;
185 } 227 }
186 228
187 if (serial->dev->descriptor.bDeviceClass == 0x02) 229 if (serial->dev->descriptor.bDeviceClass == 0x02)
188 type = type_0; 230 type = TYPE_01; /* type 0 */
189 else if (serial->dev->descriptor.bMaxPacketSize0 == 0x40) 231 else if (serial->dev->descriptor.bMaxPacketSize0 == 0x40)
190 type = HX; 232 type = TYPE_HX;
191 else if (serial->dev->descriptor.bDeviceClass == 0x00) 233 else if (serial->dev->descriptor.bDeviceClass == 0x00)
192 type = type_1; 234 type = TYPE_01; /* type 1 */
193 else if (serial->dev->descriptor.bDeviceClass == 0xFF) 235 else if (serial->dev->descriptor.bDeviceClass == 0xFF)
194 type = type_1; 236 type = TYPE_01; /* type 1 */
195 dev_dbg(&serial->interface->dev, "device type: %d\n", type); 237 dev_dbg(&serial->interface->dev, "device type: %d\n", type);
196 238
197 spriv->type = type; 239 spriv->type = &pl2303_type_data[type];
240 spriv->quirks = (unsigned long)usb_get_serial_data(serial);
241 spriv->quirks |= spriv->type->quirks;
242
198 usb_set_serial_data(serial, spriv); 243 usb_set_serial_data(serial, spriv);
199 244
200 pl2303_vendor_read(0x8484, 0, serial, buf); 245 pl2303_vendor_read(serial, 0x8484, buf);
201 pl2303_vendor_write(0x0404, 0, serial); 246 pl2303_vendor_write(serial, 0x0404, 0);
202 pl2303_vendor_read(0x8484, 0, serial, buf); 247 pl2303_vendor_read(serial, 0x8484, buf);
203 pl2303_vendor_read(0x8383, 0, serial, buf); 248 pl2303_vendor_read(serial, 0x8383, buf);
204 pl2303_vendor_read(0x8484, 0, serial, buf); 249 pl2303_vendor_read(serial, 0x8484, buf);
205 pl2303_vendor_write(0x0404, 1, serial); 250 pl2303_vendor_write(serial, 0x0404, 1);
206 pl2303_vendor_read(0x8484, 0, serial, buf); 251 pl2303_vendor_read(serial, 0x8484, buf);
207 pl2303_vendor_read(0x8383, 0, serial, buf); 252 pl2303_vendor_read(serial, 0x8383, buf);
208 pl2303_vendor_write(0, 1, serial); 253 pl2303_vendor_write(serial, 0, 1);
209 pl2303_vendor_write(1, 0, serial); 254 pl2303_vendor_write(serial, 1, 0);
210 if (type == HX) 255 if (spriv->quirks & PL2303_QUIRK_LEGACY)
211 pl2303_vendor_write(2, 0x44, serial); 256 pl2303_vendor_write(serial, 2, 0x24);
212 else 257 else
213 pl2303_vendor_write(2, 0x24, serial); 258 pl2303_vendor_write(serial, 2, 0x44);
214 259
215 kfree(buf); 260 kfree(buf);
261
216 return 0; 262 return 0;
217} 263}
218 264
219static void pl2303_release(struct usb_serial *serial) 265static void pl2303_release(struct usb_serial *serial)
220{ 266{
221 struct pl2303_serial_private *spriv; 267 struct pl2303_serial_private *spriv = usb_get_serial_data(serial);
222 268
223 spriv = usb_get_serial_data(serial);
224 kfree(spriv); 269 kfree(spriv);
225} 270}
226 271
@@ -243,9 +288,8 @@ static int pl2303_port_probe(struct usb_serial_port *port)
243 288
244static int pl2303_port_remove(struct usb_serial_port *port) 289static int pl2303_port_remove(struct usb_serial_port *port)
245{ 290{
246 struct pl2303_private *priv; 291 struct pl2303_private *priv = usb_get_serial_port_data(port);
247 292
248 priv = usb_get_serial_port_data(port);
249 kfree(priv); 293 kfree(priv);
250 294
251 return 0; 295 return 0;
@@ -256,39 +300,31 @@ static int pl2303_set_control_lines(struct usb_serial_port *port, u8 value)
256 struct usb_device *dev = port->serial->dev; 300 struct usb_device *dev = port->serial->dev;
257 int retval; 301 int retval;
258 302
303 dev_dbg(&port->dev, "%s - %02x\n", __func__, value);
304
259 retval = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), 305 retval = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
260 SET_CONTROL_REQUEST, SET_CONTROL_REQUEST_TYPE, 306 SET_CONTROL_REQUEST, SET_CONTROL_REQUEST_TYPE,
261 value, 0, NULL, 0, 100); 307 value, 0, NULL, 0, 100);
262 dev_dbg(&port->dev, "%s - value = %d, retval = %d\n", __func__, 308 if (retval)
263 value, retval); 309 dev_err(&port->dev, "%s - failed: %d\n", __func__, retval);
310
264 return retval; 311 return retval;
265} 312}
266 313
267static void pl2303_encode_baudrate(struct tty_struct *tty, 314/*
268 struct usb_serial_port *port, 315 * Returns the nearest supported baud rate that can be set directly without
269 u8 buf[4]) 316 * using divisors.
317 */
318static speed_t pl2303_get_supported_baud_rate(speed_t baud)
270{ 319{
271 const int baud_sup[] = { 75, 150, 300, 600, 1200, 1800, 2400, 3600, 320 static const speed_t baud_sup[] = {
272 4800, 7200, 9600, 14400, 19200, 28800, 38400, 321 75, 150, 300, 600, 1200, 1800, 2400, 3600, 4800, 7200, 9600,
273 57600, 115200, 230400, 460800, 500000, 614400, 322 14400, 19200, 28800, 38400, 57600, 115200, 230400, 460800,
274 921600, 1228800, 2457600, 3000000, 6000000 }; 323 614400, 921600, 1228800, 2457600, 3000000, 6000000
275 324 };
276 struct usb_serial *serial = port->serial;
277 struct pl2303_serial_private *spriv = usb_get_serial_data(serial);
278 int baud;
279 int i;
280 325
281 /* 326 unsigned i;
282 * NOTE: Only the values defined in baud_sup are supported!
283 * => if unsupported values are set, the PL2303 seems to use
284 * 9600 baud (at least my PL2303X always does)
285 */
286 baud = tty_get_baud_rate(tty);
287 dev_dbg(&port->dev, "baud requested = %d\n", baud);
288 if (!baud)
289 return;
290 327
291 /* Set baudrate to nearest supported value */
292 for (i = 0; i < ARRAY_SIZE(baud_sup); ++i) { 328 for (i = 0; i < ARRAY_SIZE(baud_sup); ++i) {
293 if (baud_sup[i] > baud) 329 if (baud_sup[i] > baud)
294 break; 330 break;
@@ -301,31 +337,120 @@ static void pl2303_encode_baudrate(struct tty_struct *tty,
301 else 337 else
302 baud = baud_sup[i]; 338 baud = baud_sup[i];
303 339
304 /* type_0, type_1 only support up to 1228800 baud */ 340 return baud;
305 if (spriv->type != HX) 341}
306 baud = min_t(int, baud, 1228800);
307 342
308 if (baud <= 115200) { 343/*
309 put_unaligned_le32(baud, buf); 344 * NOTE: If unsupported baud rates are set directly, the PL2303 seems to
310 } else { 345 * use 9600 baud.
311 /* 346 */
312 * Apparently the formula for higher speeds is: 347static speed_t pl2303_encode_baud_rate_direct(unsigned char buf[4],
313 * baudrate = 12M * 32 / (2^buf[1]) / buf[0] 348 speed_t baud)
314 */ 349{
315 unsigned tmp = 12000000 * 32 / baud; 350 put_unaligned_le32(baud, buf);
316 buf[3] = 0x80; 351
317 buf[2] = 0; 352 return baud;
318 buf[1] = (tmp >= 256); 353}
319 while (tmp >= 256) { 354
320 tmp >>= 2; 355static speed_t pl2303_encode_baud_rate_divisor(unsigned char buf[4],
321 buf[1] <<= 1; 356 speed_t baud)
322 } 357{
323 buf[0] = tmp; 358 unsigned int tmp;
359
360 /*
361 * Apparently the formula is:
362 * baudrate = 12M * 32 / (2^buf[1]) / buf[0]
363 */
364 tmp = 12000000 * 32 / baud;
365 buf[3] = 0x80;
366 buf[2] = 0;
367 buf[1] = (tmp >= 256);
368 while (tmp >= 256) {
369 tmp >>= 2;
370 buf[1] <<= 1;
324 } 371 }
372 buf[0] = tmp;
373
374 return baud;
375}
376
377static void pl2303_encode_baud_rate(struct tty_struct *tty,
378 struct usb_serial_port *port,
379 u8 buf[4])
380{
381 struct usb_serial *serial = port->serial;
382 struct pl2303_serial_private *spriv = usb_get_serial_data(serial);
383 speed_t baud_sup;
384 speed_t baud;
385
386 baud = tty_get_baud_rate(tty);
387 dev_dbg(&port->dev, "baud requested = %u\n", baud);
388 if (!baud)
389 return;
390
391 if (spriv->type->max_baud_rate)
392 baud = min_t(speed_t, baud, spriv->type->max_baud_rate);
393 /*
394 * Set baud rate to nearest supported value.
395 *
396 * NOTE: Baud rate 500k can only be set using divisors.
397 */
398 baud_sup = pl2303_get_supported_baud_rate(baud);
399
400 if (baud == 500000)
401 baud = pl2303_encode_baud_rate_divisor(buf, baud);
402 else
403 baud = pl2303_encode_baud_rate_direct(buf, baud_sup);
325 404
326 /* Save resulting baud rate */ 405 /* Save resulting baud rate */
327 tty_encode_baud_rate(tty, baud, baud); 406 tty_encode_baud_rate(tty, baud, baud);
328 dev_dbg(&port->dev, "baud set = %d\n", baud); 407 dev_dbg(&port->dev, "baud set = %u\n", baud);
408}
409
410static int pl2303_get_line_request(struct usb_serial_port *port,
411 unsigned char buf[7])
412{
413 struct usb_device *udev = port->serial->dev;
414 int ret;
415
416 ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
417 GET_LINE_REQUEST, GET_LINE_REQUEST_TYPE,
418 0, 0, buf, 7, 100);
419 if (ret != 7) {
420 dev_err(&port->dev, "%s - failed: %d\n", __func__, ret);
421
422 if (ret > 0)
423 ret = -EIO;
424
425 return ret;
426 }
427
428 dev_dbg(&port->dev, "%s - %7ph\n", __func__, buf);
429
430 return 0;
431}
432
433static int pl2303_set_line_request(struct usb_serial_port *port,
434 unsigned char buf[7])
435{
436 struct usb_device *udev = port->serial->dev;
437 int ret;
438
439 ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
440 SET_LINE_REQUEST, SET_LINE_REQUEST_TYPE,
441 0, 0, buf, 7, 100);
442 if (ret != 7) {
443 dev_err(&port->dev, "%s - failed: %d\n", __func__, ret);
444
445 if (ret > 0)
446 ret = -EIO;
447
448 return ret;
449 }
450
451 dev_dbg(&port->dev, "%s - %7ph\n", __func__, buf);
452
453 return 0;
329} 454}
330 455
331static void pl2303_set_termios(struct tty_struct *tty, 456static void pl2303_set_termios(struct tty_struct *tty,
@@ -336,30 +461,21 @@ static void pl2303_set_termios(struct tty_struct *tty,
336 struct pl2303_private *priv = usb_get_serial_port_data(port); 461 struct pl2303_private *priv = usb_get_serial_port_data(port);
337 unsigned long flags; 462 unsigned long flags;
338 unsigned char *buf; 463 unsigned char *buf;
339 int i; 464 int ret;
340 u8 control; 465 u8 control;
341 466
342 /*
343 * The PL2303 is reported to lose bytes if you change serial settings
344 * even to the same values as before. Thus we actually need to filter
345 * in this specific case.
346 */
347 if (old_termios && !tty_termios_hw_change(&tty->termios, old_termios)) 467 if (old_termios && !tty_termios_hw_change(&tty->termios, old_termios))
348 return; 468 return;
349 469
350 buf = kzalloc(7, GFP_KERNEL); 470 buf = kzalloc(7, GFP_KERNEL);
351 if (!buf) { 471 if (!buf) {
352 dev_err(&port->dev, "%s - out of memory.\n", __func__);
353 /* Report back no change occurred */ 472 /* Report back no change occurred */
354 if (old_termios) 473 if (old_termios)
355 tty->termios = *old_termios; 474 tty->termios = *old_termios;
356 return; 475 return;
357 } 476 }
358 477
359 i = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), 478 pl2303_get_line_request(port, buf);
360 GET_LINE_REQUEST, GET_LINE_REQUEST_TYPE,
361 0, 0, buf, 7, 100);
362 dev_dbg(&port->dev, "0xa1:0x21:0:0 %d - %7ph\n", i, buf);
363 479
364 switch (C_CSIZE(tty)) { 480 switch (C_CSIZE(tty)) {
365 case CS5: 481 case CS5:
@@ -378,7 +494,7 @@ static void pl2303_set_termios(struct tty_struct *tty,
378 dev_dbg(&port->dev, "data bits = %d\n", buf[6]); 494 dev_dbg(&port->dev, "data bits = %d\n", buf[6]);
379 495
380 /* For reference buf[0]:buf[3] baud rate value */ 496 /* For reference buf[0]:buf[3] baud rate value */
381 pl2303_encode_baudrate(tty, port, &buf[0]); 497 pl2303_encode_baud_rate(tty, port, &buf[0]);
382 498
383 /* For reference buf[4]=0 is 1 stop bits */ 499 /* For reference buf[4]=0 is 1 stop bits */
384 /* For reference buf[4]=1 is 1.5 stop bits */ 500 /* For reference buf[4]=1 is 1.5 stop bits */
@@ -407,7 +523,7 @@ static void pl2303_set_termios(struct tty_struct *tty,
407 /* For reference buf[5]=3 is mark parity */ 523 /* For reference buf[5]=3 is mark parity */
408 /* For reference buf[5]=4 is space parity */ 524 /* For reference buf[5]=4 is space parity */
409 if (C_PARODD(tty)) { 525 if (C_PARODD(tty)) {
410 if (tty->termios.c_cflag & CMSPAR) { 526 if (C_CMSPAR(tty)) {
411 buf[5] = 3; 527 buf[5] = 3;
412 dev_dbg(&port->dev, "parity = mark\n"); 528 dev_dbg(&port->dev, "parity = mark\n");
413 } else { 529 } else {
@@ -415,7 +531,7 @@ static void pl2303_set_termios(struct tty_struct *tty,
415 dev_dbg(&port->dev, "parity = odd\n"); 531 dev_dbg(&port->dev, "parity = odd\n");
416 } 532 }
417 } else { 533 } else {
418 if (tty->termios.c_cflag & CMSPAR) { 534 if (C_CMSPAR(tty)) {
419 buf[5] = 4; 535 buf[5] = 4;
420 dev_dbg(&port->dev, "parity = space\n"); 536 dev_dbg(&port->dev, "parity = space\n");
421 } else { 537 } else {
@@ -428,10 +544,23 @@ static void pl2303_set_termios(struct tty_struct *tty,
428 dev_dbg(&port->dev, "parity = none\n"); 544 dev_dbg(&port->dev, "parity = none\n");
429 } 545 }
430 546
431 i = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), 547 /*
432 SET_LINE_REQUEST, SET_LINE_REQUEST_TYPE, 548 * Some PL2303 are known to lose bytes if you change serial settings
433 0, 0, buf, 7, 100); 549 * even to the same values as before. Thus we actually need to filter
434 dev_dbg(&port->dev, "0x21:0x20:0:0 %d\n", i); 550 * in this specific case.
551 *
552 * Note that the tty_termios_hw_change check above is not sufficient
553 * as a previously requested baud rate may differ from the one
554 * actually used (and stored in old_termios).
555 *
556 * NOTE: No additional locking needed for line_settings as it is
557 * only used in set_termios, which is serialised against itself.
558 */
559 if (!old_termios || memcmp(buf, priv->line_settings, 7)) {
560 ret = pl2303_set_line_request(port, buf);
561 if (!ret)
562 memcpy(priv->line_settings, buf, 7);
563 }
435 564
436 /* change control lines if we are switching to or from B0 */ 565 /* change control lines if we are switching to or from B0 */
437 spin_lock_irqsave(&priv->lock, flags); 566 spin_lock_irqsave(&priv->lock, flags);
@@ -448,19 +577,13 @@ static void pl2303_set_termios(struct tty_struct *tty,
448 spin_unlock_irqrestore(&priv->lock, flags); 577 spin_unlock_irqrestore(&priv->lock, flags);
449 } 578 }
450 579
451 memset(buf, 0, 7);
452 i = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
453 GET_LINE_REQUEST, GET_LINE_REQUEST_TYPE,
454 0, 0, buf, 7, 100);
455 dev_dbg(&port->dev, "0xa1:0x21:0:0 %d - %7ph\n", i, buf);
456
457 if (C_CRTSCTS(tty)) { 580 if (C_CRTSCTS(tty)) {
458 if (spriv->type == HX) 581 if (spriv->quirks & PL2303_QUIRK_LEGACY)
459 pl2303_vendor_write(0x0, 0x61, serial); 582 pl2303_vendor_write(serial, 0x0, 0x41);
460 else 583 else
461 pl2303_vendor_write(0x0, 0x41, serial); 584 pl2303_vendor_write(serial, 0x0, 0x61);
462 } else { 585 } else {
463 pl2303_vendor_write(0x0, 0x0, serial); 586 pl2303_vendor_write(serial, 0x0, 0x0);
464 } 587 }
465 588
466 kfree(buf); 589 kfree(buf);
@@ -473,13 +596,13 @@ static void pl2303_dtr_rts(struct usb_serial_port *port, int on)
473 u8 control; 596 u8 control;
474 597
475 spin_lock_irqsave(&priv->lock, flags); 598 spin_lock_irqsave(&priv->lock, flags);
476 /* Change DTR and RTS */
477 if (on) 599 if (on)
478 priv->line_control |= (CONTROL_DTR | CONTROL_RTS); 600 priv->line_control |= (CONTROL_DTR | CONTROL_RTS);
479 else 601 else
480 priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS); 602 priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS);
481 control = priv->line_control; 603 control = priv->line_control;
482 spin_unlock_irqrestore(&priv->lock, flags); 604 spin_unlock_irqrestore(&priv->lock, flags);
605
483 pl2303_set_control_lines(port, control); 606 pl2303_set_control_lines(port, control);
484} 607}
485 608
@@ -495,13 +618,13 @@ static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port)
495 struct pl2303_serial_private *spriv = usb_get_serial_data(serial); 618 struct pl2303_serial_private *spriv = usb_get_serial_data(serial);
496 int result; 619 int result;
497 620
498 if (spriv->type != HX) { 621 if (spriv->quirks & PL2303_QUIRK_LEGACY) {
499 usb_clear_halt(serial->dev, port->write_urb->pipe); 622 usb_clear_halt(serial->dev, port->write_urb->pipe);
500 usb_clear_halt(serial->dev, port->read_urb->pipe); 623 usb_clear_halt(serial->dev, port->read_urb->pipe);
501 } else { 624 } else {
502 /* reset upstream data pipes */ 625 /* reset upstream data pipes */
503 pl2303_vendor_write(8, 0, serial); 626 pl2303_vendor_write(serial, 8, 0);
504 pl2303_vendor_write(9, 0, serial); 627 pl2303_vendor_write(serial, 9, 0);
505 } 628 }
506 629
507 /* Setup termios */ 630 /* Setup termios */
@@ -510,8 +633,8 @@ static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port)
510 633
511 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); 634 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
512 if (result) { 635 if (result) {
513 dev_err(&port->dev, "%s - failed submitting interrupt urb," 636 dev_err(&port->dev, "failed to submit interrupt urb: %d\n",
514 " error %d\n", __func__, result); 637 result);
515 return result; 638 return result;
516 } 639 }
517 640
@@ -581,48 +704,10 @@ static int pl2303_tiocmget(struct tty_struct *tty)
581static int pl2303_carrier_raised(struct usb_serial_port *port) 704static int pl2303_carrier_raised(struct usb_serial_port *port)
582{ 705{
583 struct pl2303_private *priv = usb_get_serial_port_data(port); 706 struct pl2303_private *priv = usb_get_serial_port_data(port);
707
584 if (priv->line_status & UART_DCD) 708 if (priv->line_status & UART_DCD)
585 return 1; 709 return 1;
586 return 0;
587}
588 710
589static int pl2303_tiocmiwait(struct tty_struct *tty, unsigned long arg)
590{
591 struct usb_serial_port *port = tty->driver_data;
592 struct pl2303_private *priv = usb_get_serial_port_data(port);
593 unsigned long flags;
594 unsigned int prevstatus;
595 unsigned int status;
596 unsigned int changed;
597
598 spin_lock_irqsave(&priv->lock, flags);
599 prevstatus = priv->line_status;
600 spin_unlock_irqrestore(&priv->lock, flags);
601
602 while (1) {
603 interruptible_sleep_on(&port->port.delta_msr_wait);
604 /* see if a signal did it */
605 if (signal_pending(current))
606 return -ERESTARTSYS;
607
608 if (port->serial->disconnected)
609 return -EIO;
610
611 spin_lock_irqsave(&priv->lock, flags);
612 status = priv->line_status;
613 spin_unlock_irqrestore(&priv->lock, flags);
614
615 changed = prevstatus ^ status;
616
617 if (((arg & TIOCM_RNG) && (changed & UART_RING)) ||
618 ((arg & TIOCM_DSR) && (changed & UART_DSR)) ||
619 ((arg & TIOCM_CD) && (changed & UART_DCD)) ||
620 ((arg & TIOCM_CTS) && (changed & UART_CTS))) {
621 return 0;
622 }
623 prevstatus = status;
624 }
625 /* NOTREACHED */
626 return 0; 711 return 0;
627} 712}
628 713
@@ -632,8 +717,6 @@ static int pl2303_ioctl(struct tty_struct *tty,
632 struct serial_struct ser; 717 struct serial_struct ser;
633 struct usb_serial_port *port = tty->driver_data; 718 struct usb_serial_port *port = tty->driver_data;
634 719
635 dev_dbg(&port->dev, "%s cmd = 0x%04x\n", __func__, cmd);
636
637 switch (cmd) { 720 switch (cmd) {
638 case TIOCGSERIAL: 721 case TIOCGSERIAL:
639 memset(&ser, 0, sizeof ser); 722 memset(&ser, 0, sizeof ser);
@@ -647,9 +730,9 @@ static int pl2303_ioctl(struct tty_struct *tty,
647 730
648 return 0; 731 return 0;
649 default: 732 default:
650 dev_dbg(&port->dev, "%s not supported = 0x%04x\n", __func__, cmd);
651 break; 733 break;
652 } 734 }
735
653 return -ENOIOCTLCMD; 736 return -ENOIOCTLCMD;
654} 737}
655 738
@@ -664,6 +747,7 @@ static void pl2303_break_ctl(struct tty_struct *tty, int break_state)
664 state = BREAK_OFF; 747 state = BREAK_OFF;
665 else 748 else
666 state = BREAK_ON; 749 state = BREAK_ON;
750
667 dev_dbg(&port->dev, "%s - turning break %s\n", __func__, 751 dev_dbg(&port->dev, "%s - turning break %s\n", __func__,
668 state == BREAK_OFF ? "off" : "on"); 752 state == BREAK_OFF ? "off" : "on");
669 753
@@ -678,48 +762,51 @@ static void pl2303_update_line_status(struct usb_serial_port *port,
678 unsigned char *data, 762 unsigned char *data,
679 unsigned int actual_length) 763 unsigned int actual_length)
680{ 764{
681 765 struct usb_serial *serial = port->serial;
766 struct pl2303_serial_private *spriv = usb_get_serial_data(serial);
682 struct pl2303_private *priv = usb_get_serial_port_data(port); 767 struct pl2303_private *priv = usb_get_serial_port_data(port);
683 struct tty_struct *tty; 768 struct tty_struct *tty;
684 unsigned long flags; 769 unsigned long flags;
685 u8 status_idx = UART_STATE; 770 unsigned int status_idx = UART_STATE_INDEX;
686 u8 length = UART_STATE + 1; 771 u8 status;
687 u8 prev_line_status; 772 u8 delta;
688 u16 idv, idp;
689
690 idv = le16_to_cpu(port->serial->dev->descriptor.idVendor);
691 idp = le16_to_cpu(port->serial->dev->descriptor.idProduct);
692
693 773
694 if (idv == SIEMENS_VENDOR_ID) { 774 if (spriv->quirks & PL2303_QUIRK_UART_STATE_IDX0)
695 if (idp == SIEMENS_PRODUCT_ID_X65 || 775 status_idx = 0;
696 idp == SIEMENS_PRODUCT_ID_SX1 ||
697 idp == SIEMENS_PRODUCT_ID_X75) {
698 776
699 length = 1; 777 if (actual_length < status_idx + 1)
700 status_idx = 0;
701 }
702 }
703
704 if (actual_length < length)
705 return; 778 return;
706 779
780 status = data[status_idx];
781
707 /* Save off the uart status for others to look at */ 782 /* Save off the uart status for others to look at */
708 spin_lock_irqsave(&priv->lock, flags); 783 spin_lock_irqsave(&priv->lock, flags);
709 prev_line_status = priv->line_status; 784 delta = priv->line_status ^ status;
710 priv->line_status = data[status_idx]; 785 priv->line_status = status;
711 spin_unlock_irqrestore(&priv->lock, flags); 786 spin_unlock_irqrestore(&priv->lock, flags);
712 if (priv->line_status & UART_BREAK_ERROR) 787
788 if (status & UART_BREAK_ERROR)
713 usb_serial_handle_break(port); 789 usb_serial_handle_break(port);
714 wake_up_interruptible(&port->port.delta_msr_wait);
715 790
716 tty = tty_port_tty_get(&port->port); 791 if (delta & UART_STATE_MSR_MASK) {
717 if (!tty) 792 if (delta & UART_CTS)
718 return; 793 port->icount.cts++;
719 if ((priv->line_status ^ prev_line_status) & UART_DCD) 794 if (delta & UART_DSR)
720 usb_serial_handle_dcd_change(port, tty, 795 port->icount.dsr++;
721 priv->line_status & UART_DCD); 796 if (delta & UART_RING)
722 tty_kref_put(tty); 797 port->icount.rng++;
798 if (delta & UART_DCD) {
799 port->icount.dcd++;
800 tty = tty_port_tty_get(&port->port);
801 if (tty) {
802 usb_serial_handle_dcd_change(port, tty,
803 status & UART_DCD);
804 tty_kref_put(tty);
805 }
806 }
807
808 wake_up_interruptible(&port->port.delta_msr_wait);
809 }
723} 810}
724 811
725static void pl2303_read_int_callback(struct urb *urb) 812static void pl2303_read_int_callback(struct urb *urb)
@@ -754,10 +841,11 @@ static void pl2303_read_int_callback(struct urb *urb)
754 841
755exit: 842exit:
756 retval = usb_submit_urb(urb, GFP_ATOMIC); 843 retval = usb_submit_urb(urb, GFP_ATOMIC);
757 if (retval) 844 if (retval) {
758 dev_err(&port->dev, 845 dev_err(&port->dev,
759 "%s - usb_submit_urb failed with result %d\n", 846 "%s - usb_submit_urb failed with result %d\n",
760 __func__, retval); 847 __func__, retval);
848 }
761} 849}
762 850
763static void pl2303_process_read_urb(struct urb *urb) 851static void pl2303_process_read_urb(struct urb *urb)
@@ -775,13 +863,14 @@ static void pl2303_process_read_urb(struct urb *urb)
775 line_status = priv->line_status; 863 line_status = priv->line_status;
776 priv->line_status &= ~UART_STATE_TRANSIENT_MASK; 864 priv->line_status &= ~UART_STATE_TRANSIENT_MASK;
777 spin_unlock_irqrestore(&priv->lock, flags); 865 spin_unlock_irqrestore(&priv->lock, flags);
778 wake_up_interruptible(&port->port.delta_msr_wait);
779 866
780 if (!urb->actual_length) 867 if (!urb->actual_length)
781 return; 868 return;
782 869
783 /* break takes precedence over parity, */ 870 /*
784 /* which takes precedence over framing errors */ 871 * Break takes precedence over parity, which takes precedence over
872 * framing errors.
873 */
785 if (line_status & UART_BREAK_ERROR) 874 if (line_status & UART_BREAK_ERROR)
786 tty_flag = TTY_BREAK; 875 tty_flag = TTY_BREAK;
787 else if (line_status & UART_PARITY_ERROR) 876 else if (line_status & UART_PARITY_ERROR)
@@ -809,7 +898,6 @@ static void pl2303_process_read_urb(struct urb *urb)
809 tty_flip_buffer_push(&port->port); 898 tty_flip_buffer_push(&port->port);
810} 899}
811 900
812/* All of the device info needed for the PL2303 SIO serial converter */
813static struct usb_serial_driver pl2303_device = { 901static struct usb_serial_driver pl2303_device = {
814 .driver = { 902 .driver = {
815 .owner = THIS_MODULE, 903 .owner = THIS_MODULE,
@@ -821,16 +909,17 @@ static struct usb_serial_driver pl2303_device = {
821 .bulk_out_size = 256, 909 .bulk_out_size = 256,
822 .open = pl2303_open, 910 .open = pl2303_open,
823 .close = pl2303_close, 911 .close = pl2303_close,
824 .dtr_rts = pl2303_dtr_rts, 912 .dtr_rts = pl2303_dtr_rts,
825 .carrier_raised = pl2303_carrier_raised, 913 .carrier_raised = pl2303_carrier_raised,
826 .ioctl = pl2303_ioctl, 914 .ioctl = pl2303_ioctl,
827 .break_ctl = pl2303_break_ctl, 915 .break_ctl = pl2303_break_ctl,
828 .set_termios = pl2303_set_termios, 916 .set_termios = pl2303_set_termios,
829 .tiocmget = pl2303_tiocmget, 917 .tiocmget = pl2303_tiocmget,
830 .tiocmset = pl2303_tiocmset, 918 .tiocmset = pl2303_tiocmset,
831 .tiocmiwait = pl2303_tiocmiwait, 919 .tiocmiwait = usb_serial_generic_tiocmiwait,
832 .process_read_urb = pl2303_process_read_urb, 920 .process_read_urb = pl2303_process_read_urb,
833 .read_int_callback = pl2303_read_int_callback, 921 .read_int_callback = pl2303_read_int_callback,
922 .probe = pl2303_probe,
834 .attach = pl2303_startup, 923 .attach = pl2303_startup,
835 .release = pl2303_release, 924 .release = pl2303_release,
836 .port_probe = pl2303_port_probe, 925 .port_probe = pl2303_port_probe,
@@ -843,5 +932,5 @@ static struct usb_serial_driver * const serial_drivers[] = {
843 932
844module_usb_serial_driver(serial_drivers, id_table); 933module_usb_serial_driver(serial_drivers, id_table);
845 934
846MODULE_DESCRIPTION(DRIVER_DESC); 935MODULE_DESCRIPTION("Prolific PL2303 USB to serial adaptor driver");
847MODULE_LICENSE("GPL"); 936MODULE_LICENSE("GPL");
diff --git a/drivers/usb/serial/qcaux.c b/drivers/usb/serial/qcaux.c
index 31f81c3c15eb..6e9f8af96959 100644
--- a/drivers/usb/serial/qcaux.c
+++ b/drivers/usb/serial/qcaux.c
@@ -16,7 +16,6 @@
16 */ 16 */
17 17
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/tty.h> 19#include <linux/tty.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/usb.h> 21#include <linux/usb.h>
@@ -54,7 +53,7 @@
54#define SAMSUNG_VENDOR_ID 0x04e8 53#define SAMSUNG_VENDOR_ID 0x04e8
55#define SAMSUNG_PRODUCT_U520 0x6640 /* SCH-U520 */ 54#define SAMSUNG_PRODUCT_U520 0x6640 /* SCH-U520 */
56 55
57static struct usb_device_id id_table[] = { 56static const struct usb_device_id id_table[] = {
58 { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, UTSTARCOM_PRODUCT_PC5740, 0xff, 0x00, 0x00) }, 57 { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, UTSTARCOM_PRODUCT_PC5740, 0xff, 0x00, 0x00) },
59 { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, UTSTARCOM_PRODUCT_PC5750, 0xff, 0x00, 0x00) }, 58 { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, UTSTARCOM_PRODUCT_PC5750, 0xff, 0x00, 0x00) },
60 { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, UTSTARCOM_PRODUCT_UM150, 0xff, 0x00, 0x00) }, 59 { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, UTSTARCOM_PRODUCT_UM150, 0xff, 0x00, 0x00) },
diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c
index a24d59ae4032..7725ed261ed6 100644
--- a/drivers/usb/serial/quatech2.c
+++ b/drivers/usb/serial/quatech2.c
@@ -15,7 +15,6 @@
15 15
16#include <asm/unaligned.h> 16#include <asm/unaligned.h>
17#include <linux/errno.h> 17#include <linux/errno.h>
18#include <linux/init.h>
19#include <linux/slab.h> 18#include <linux/slab.h>
20#include <linux/tty.h> 19#include <linux/tty.h>
21#include <linux/tty_driver.h> 20#include <linux/tty_driver.h>
@@ -676,10 +675,8 @@ static int qt2_setup_urbs(struct usb_serial *serial)
676 675
677 serial_priv = usb_get_serial_data(serial); 676 serial_priv = usb_get_serial_data(serial);
678 serial_priv->read_urb = usb_alloc_urb(0, GFP_KERNEL); 677 serial_priv->read_urb = usb_alloc_urb(0, GFP_KERNEL);
679 if (!serial_priv->read_urb) { 678 if (!serial_priv->read_urb)
680 dev_err(&serial->dev->dev, "No free urbs available\n");
681 return -ENOMEM; 679 return -ENOMEM;
682 }
683 680
684 usb_fill_bulk_urb(serial_priv->read_urb, serial->dev, 681 usb_fill_bulk_urb(serial_priv->read_urb, serial->dev,
685 usb_rcvbulkpipe(serial->dev, 682 usb_rcvbulkpipe(serial->dev,
@@ -715,10 +712,8 @@ static int qt2_attach(struct usb_serial *serial)
715 } 712 }
716 713
717 serial_priv = kzalloc(sizeof(*serial_priv), GFP_KERNEL); 714 serial_priv = kzalloc(sizeof(*serial_priv), GFP_KERNEL);
718 if (!serial_priv) { 715 if (!serial_priv)
719 dev_err(&serial->dev->dev, "%s - Out of memory\n", __func__);
720 return -ENOMEM; 716 return -ENOMEM;
721 }
722 717
723 serial_priv->read_buffer = kmalloc(QT2_READ_BUFFER_SIZE, GFP_KERNEL); 718 serial_priv->read_buffer = kmalloc(QT2_READ_BUFFER_SIZE, GFP_KERNEL);
724 if (!serial_priv->read_buffer) { 719 if (!serial_priv->read_buffer) {
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c
index ba895989d8c4..b2dff0f14743 100644
--- a/drivers/usb/serial/safe_serial.c
+++ b/drivers/usb/serial/safe_serial.c
@@ -67,7 +67,6 @@
67#include <linux/kernel.h> 67#include <linux/kernel.h>
68#include <linux/errno.h> 68#include <linux/errno.h>
69#include <linux/gfp.h> 69#include <linux/gfp.h>
70#include <linux/init.h>
71#include <linux/tty.h> 70#include <linux/tty.h>
72#include <linux/tty_driver.h> 71#include <linux/tty_driver.h>
73#include <linux/tty_flip.h> 72#include <linux/tty_flip.h>
@@ -125,7 +124,7 @@ MODULE_PARM_DESC(padded, "Pad to full wMaxPacketSize On/Off");
125 .bInterfaceClass = (ic), \ 124 .bInterfaceClass = (ic), \
126 .bInterfaceSubClass = (isc), 125 .bInterfaceSubClass = (isc),
127 126
128static struct usb_device_id id_table[] = { 127static const struct usb_device_id id_table[] = {
129 {MY_USB_DEVICE(0x49f, 0xffff, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)}, /* Itsy */ 128 {MY_USB_DEVICE(0x49f, 0xffff, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)}, /* Itsy */
130 {MY_USB_DEVICE(0x3f0, 0x2101, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)}, /* Calypso */ 129 {MY_USB_DEVICE(0x3f0, 0x2101, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)}, /* Calypso */
131 {MY_USB_DEVICE(0x4dd, 0x8001, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)}, /* Iris */ 130 {MY_USB_DEVICE(0x4dd, 0x8001, CDC_DEVICE_CLASS, LINEO_INTERFACE_CLASS, LINEO_INTERFACE_SUBCLASS_SAFESERIAL)}, /* Iris */
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index de958c5b52e3..a9eb6221a815 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -497,14 +497,12 @@ static int sierra_write(struct tty_struct *tty, struct usb_serial_port *port,
497 497
498 buffer = kmalloc(writesize, GFP_ATOMIC); 498 buffer = kmalloc(writesize, GFP_ATOMIC);
499 if (!buffer) { 499 if (!buffer) {
500 dev_err(&port->dev, "out of memory\n");
501 retval = -ENOMEM; 500 retval = -ENOMEM;
502 goto error_no_buffer; 501 goto error_no_buffer;
503 } 502 }
504 503
505 urb = usb_alloc_urb(0, GFP_ATOMIC); 504 urb = usb_alloc_urb(0, GFP_ATOMIC);
506 if (!urb) { 505 if (!urb) {
507 dev_err(&port->dev, "no more free urbs\n");
508 retval = -ENOMEM; 506 retval = -ENOMEM;
509 goto error_no_urb; 507 goto error_no_urb;
510 } 508 }
@@ -736,11 +734,8 @@ static struct urb *sierra_setup_urb(struct usb_serial *serial, int endpoint,
736 return NULL; 734 return NULL;
737 735
738 urb = usb_alloc_urb(0, mem_flags); 736 urb = usb_alloc_urb(0, mem_flags);
739 if (urb == NULL) { 737 if (!urb)
740 dev_dbg(&serial->dev->dev, "%s: alloc for endpoint %d failed\n",
741 __func__, endpoint);
742 return NULL; 738 return NULL;
743 }
744 739
745 buf = kmalloc(len, mem_flags); 740 buf = kmalloc(len, mem_flags);
746 if (buf) { 741 if (buf) {
@@ -752,9 +747,6 @@ static struct urb *sierra_setup_urb(struct usb_serial *serial, int endpoint,
752 dev_dbg(&serial->dev->dev, "%s %c u : %p d:%p\n", __func__, 747 dev_dbg(&serial->dev->dev, "%s %c u : %p d:%p\n", __func__,
753 dir == USB_DIR_IN ? 'i' : 'o', urb, buf); 748 dir == USB_DIR_IN ? 'i' : 'o', urb, buf);
754 } else { 749 } else {
755 dev_dbg(&serial->dev->dev, "%s %c u:%p d:%p\n", __func__,
756 dir == USB_DIR_IN ? 'i' : 'o', urb, buf);
757
758 sierra_release_urb(urb); 750 sierra_release_urb(urb);
759 urb = NULL; 751 urb = NULL;
760 } 752 }
diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c
index 5b793c352267..4ec04f73c800 100644
--- a/drivers/usb/serial/spcp8x5.c
+++ b/drivers/usb/serial/spcp8x5.c
@@ -16,7 +16,6 @@
16 */ 16 */
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/errno.h> 18#include <linux/errno.h>
19#include <linux/init.h>
20#include <linux/slab.h> 19#include <linux/slab.h>
21#include <linux/tty.h> 20#include <linux/tty.h>
22#include <linux/tty_driver.h> 21#include <linux/tty_driver.h>
diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c
index e5750be49054..a7fe664b6b7d 100644
--- a/drivers/usb/serial/ssu100.c
+++ b/drivers/usb/serial/ssu100.c
@@ -6,7 +6,6 @@
6 */ 6 */
7 7
8#include <linux/errno.h> 8#include <linux/errno.h>
9#include <linux/init.h>
10#include <linux/slab.h> 9#include <linux/slab.h>
11#include <linux/tty.h> 10#include <linux/tty.h>
12#include <linux/tty_driver.h> 11#include <linux/tty_driver.h>
@@ -342,8 +341,6 @@ static int ssu100_ioctl(struct tty_struct *tty,
342{ 341{
343 struct usb_serial_port *port = tty->driver_data; 342 struct usb_serial_port *port = tty->driver_data;
344 343
345 dev_dbg(&port->dev, "%s cmd 0x%04x\n", __func__, cmd);
346
347 switch (cmd) { 344 switch (cmd) {
348 case TIOCGSERIAL: 345 case TIOCGSERIAL:
349 return get_serial_info(port, 346 return get_serial_info(port,
@@ -352,8 +349,6 @@ static int ssu100_ioctl(struct tty_struct *tty,
352 break; 349 break;
353 } 350 }
354 351
355 dev_dbg(&port->dev, "%s arg not supported\n", __func__);
356
357 return -ENOIOCTLCMD; 352 return -ENOIOCTLCMD;
358} 353}
359 354
diff --git a/drivers/usb/serial/symbolserial.c b/drivers/usb/serial/symbolserial.c
index 9b1648945e7a..9fa7dd413e83 100644
--- a/drivers/usb/serial/symbolserial.c
+++ b/drivers/usb/serial/symbolserial.c
@@ -11,7 +11,6 @@
11 */ 11 */
12 12
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/tty.h> 14#include <linux/tty.h>
16#include <linux/slab.h> 15#include <linux/slab.h>
17#include <linux/tty_driver.h> 16#include <linux/tty_driver.h>
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
index c9a35697ebe9..ec7cea585663 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -21,7 +21,6 @@
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/errno.h> 22#include <linux/errno.h>
23#include <linux/firmware.h> 23#include <linux/firmware.h>
24#include <linux/init.h>
25#include <linux/slab.h> 24#include <linux/slab.h>
26#include <linux/tty.h> 25#include <linux/tty.h>
27#include <linux/tty_driver.h> 26#include <linux/tty_driver.h>
@@ -143,7 +142,7 @@ static int ti_download_firmware(struct ti_device *tdev);
143static int closing_wait = TI_DEFAULT_CLOSING_WAIT; 142static int closing_wait = TI_DEFAULT_CLOSING_WAIT;
144 143
145/* supported devices */ 144/* supported devices */
146static struct usb_device_id ti_id_table_3410[] = { 145static const struct usb_device_id ti_id_table_3410[] = {
147 { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, 146 { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) },
148 { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, 147 { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) },
149 { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) }, 148 { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) },
@@ -163,7 +162,7 @@ static struct usb_device_id ti_id_table_3410[] = {
163 { } /* terminator */ 162 { } /* terminator */
164}; 163};
165 164
166static struct usb_device_id ti_id_table_5052[] = { 165static const struct usb_device_id ti_id_table_5052[] = {
167 { USB_DEVICE(TI_VENDOR_ID, TI_5052_BOOT_PRODUCT_ID) }, 166 { USB_DEVICE(TI_VENDOR_ID, TI_5052_BOOT_PRODUCT_ID) },
168 { USB_DEVICE(TI_VENDOR_ID, TI_5152_BOOT_PRODUCT_ID) }, 167 { USB_DEVICE(TI_VENDOR_ID, TI_5152_BOOT_PRODUCT_ID) },
169 { USB_DEVICE(TI_VENDOR_ID, TI_5052_EEPROM_PRODUCT_ID) }, 168 { USB_DEVICE(TI_VENDOR_ID, TI_5052_EEPROM_PRODUCT_ID) },
@@ -171,7 +170,7 @@ static struct usb_device_id ti_id_table_5052[] = {
171 { } /* terminator */ 170 { } /* terminator */
172}; 171};
173 172
174static struct usb_device_id ti_id_table_combined[] = { 173static const struct usb_device_id ti_id_table_combined[] = {
175 { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, 174 { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) },
176 { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, 175 { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) },
177 { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) }, 176 { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) },
@@ -301,10 +300,9 @@ static int ti_startup(struct usb_serial *serial)
301 300
302 /* create device structure */ 301 /* create device structure */
303 tdev = kzalloc(sizeof(struct ti_device), GFP_KERNEL); 302 tdev = kzalloc(sizeof(struct ti_device), GFP_KERNEL);
304 if (tdev == NULL) { 303 if (!tdev)
305 dev_err(&dev->dev, "%s - out of memory\n", __func__);
306 return -ENOMEM; 304 return -ENOMEM;
307 } 305
308 mutex_init(&tdev->td_open_close_lock); 306 mutex_init(&tdev->td_open_close_lock);
309 tdev->td_serial = serial; 307 tdev->td_serial = serial;
310 usb_set_serial_data(serial, tdev); 308 usb_set_serial_data(serial, tdev);
@@ -683,8 +681,6 @@ static int ti_ioctl(struct tty_struct *tty,
683 struct usb_serial_port *port = tty->driver_data; 681 struct usb_serial_port *port = tty->driver_data;
684 struct ti_port *tport = usb_get_serial_port_data(port); 682 struct ti_port *tport = usb_get_serial_port_data(port);
685 683
686 dev_dbg(&port->dev, "%s - cmd = 0x%04X\n", __func__, cmd);
687
688 if (tport == NULL) 684 if (tport == NULL)
689 return -ENODEV; 685 return -ENODEV;
690 686
@@ -724,10 +720,8 @@ static void ti_set_termios(struct tty_struct *tty,
724 return; 720 return;
725 721
726 config = kmalloc(sizeof(*config), GFP_KERNEL); 722 config = kmalloc(sizeof(*config), GFP_KERNEL);
727 if (!config) { 723 if (!config)
728 dev_err(&port->dev, "%s - out of memory\n", __func__);
729 return; 724 return;
730 }
731 725
732 config->wFlags = 0; 726 config->wFlags = 0;
733 727
@@ -1196,10 +1190,8 @@ static int ti_get_lsr(struct ti_port *tport, u8 *lsr)
1196 1190
1197 size = sizeof(struct ti_port_status); 1191 size = sizeof(struct ti_port_status);
1198 data = kmalloc(size, GFP_KERNEL); 1192 data = kmalloc(size, GFP_KERNEL);
1199 if (!data) { 1193 if (!data)
1200 dev_err(&port->dev, "%s - out of memory\n", __func__);
1201 return -ENOMEM; 1194 return -ENOMEM;
1202 }
1203 1195
1204 status = ti_command_in_sync(tdev, TI_GET_PORT_STATUS, 1196 status = ti_command_in_sync(tdev, TI_GET_PORT_STATUS,
1205 (__u8)(TI_UART1_PORT+port_number), 0, (__u8 *)data, size); 1197 (__u8)(TI_UART1_PORT+port_number), 0, (__u8 *)data, size);
@@ -1399,10 +1391,8 @@ static int ti_write_byte(struct usb_serial_port *port,
1399 1391
1400 size = sizeof(struct ti_write_data_bytes) + 2; 1392 size = sizeof(struct ti_write_data_bytes) + 2;
1401 data = kmalloc(size, GFP_KERNEL); 1393 data = kmalloc(size, GFP_KERNEL);
1402 if (!data) { 1394 if (!data)
1403 dev_err(&port->dev, "%s - out of memory\n", __func__);
1404 return -ENOMEM; 1395 return -ENOMEM;
1405 }
1406 1396
1407 data->bAddrType = TI_RW_DATA_ADDR_XDATA; 1397 data->bAddrType = TI_RW_DATA_ADDR_XDATA;
1408 data->bDataType = TI_RW_DATA_BYTE; 1398 data->bDataType = TI_RW_DATA_BYTE;
@@ -1518,7 +1508,6 @@ static int ti_download_firmware(struct ti_device *tdev)
1518 status = ti_do_download(dev, pipe, buffer, fw_p->size); 1508 status = ti_do_download(dev, pipe, buffer, fw_p->size);
1519 kfree(buffer); 1509 kfree(buffer);
1520 } else { 1510 } else {
1521 dev_dbg(&dev->dev, "%s ENOMEM\n", __func__);
1522 status = -ENOMEM; 1511 status = -ENOMEM;
1523 } 1512 }
1524 release_firmware(fw_p); 1513 release_firmware(fw_p);
diff --git a/drivers/usb/serial/usb-serial-simple.c b/drivers/usb/serial/usb-serial-simple.c
index 52eb91f2eb2a..f112b079ddfc 100644
--- a/drivers/usb/serial/usb-serial-simple.c
+++ b/drivers/usb/serial/usb-serial-simple.c
@@ -15,7 +15,6 @@
15 */ 15 */
16 16
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/tty.h> 18#include <linux/tty.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/usb.h> 20#include <linux/usb.h>
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 6091bd5a1f4f..7c9dc28640bb 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -405,7 +405,7 @@ static int serial_ioctl(struct tty_struct *tty,
405 struct usb_serial_port *port = tty->driver_data; 405 struct usb_serial_port *port = tty->driver_data;
406 int retval = -ENOIOCTLCMD; 406 int retval = -ENOIOCTLCMD;
407 407
408 dev_dbg(tty->dev, "%s - cmd 0x%.4x\n", __func__, cmd); 408 dev_dbg(tty->dev, "%s - cmd 0x%04x\n", __func__, cmd);
409 409
410 switch (cmd) { 410 switch (cmd) {
411 case TIOCMIWAIT: 411 case TIOCMIWAIT:
diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c
index 5760f97ee508..ca2fa5bbe17e 100644
--- a/drivers/usb/serial/usb_debug.c
+++ b/drivers/usb/serial/usb_debug.c
@@ -10,7 +10,6 @@
10 10
11#include <linux/gfp.h> 11#include <linux/gfp.h>
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/tty.h> 13#include <linux/tty.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/usb.h> 15#include <linux/usb.h>
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c
index 85365784040b..640fe0173236 100644
--- a/drivers/usb/serial/usb_wwan.c
+++ b/drivers/usb/serial/usb_wwan.c
@@ -447,12 +447,8 @@ static struct urb *usb_wwan_setup_urb(struct usb_serial_port *port,
447 struct urb *urb; 447 struct urb *urb;
448 448
449 urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */ 449 urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */
450 if (urb == NULL) { 450 if (!urb)
451 dev_dbg(&serial->interface->dev,
452 "%s: alloc for endpoint %d failed.\n", __func__,
453 endpoint);
454 return NULL; 451 return NULL;
455 }
456 452
457 /* Fill URB using supplied data. */ 453 /* Fill URB using supplied data. */
458 usb_fill_bulk_urb(urb, serial->dev, 454 usb_fill_bulk_urb(urb, serial->dev,
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
index 9910aa2edf4b..bf2bd40e5f2a 100644
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
@@ -16,7 +16,6 @@
16 16
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/errno.h> 18#include <linux/errno.h>
19#include <linux/init.h>
20#include <linux/slab.h> 19#include <linux/slab.h>
21#include <linux/tty.h> 20#include <linux/tty.h>
22#include <linux/tty_driver.h> 21#include <linux/tty_driver.h>
@@ -51,7 +50,7 @@ static int palm_os_3_probe(struct usb_serial *serial,
51static int palm_os_4_probe(struct usb_serial *serial, 50static int palm_os_4_probe(struct usb_serial *serial,
52 const struct usb_device_id *id); 51 const struct usb_device_id *id);
53 52
54static struct usb_device_id id_table [] = { 53static const struct usb_device_id id_table[] = {
55 { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID), 54 { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID),
56 .driver_info = (kernel_ulong_t)&palm_os_3_probe }, 55 .driver_info = (kernel_ulong_t)&palm_os_3_probe },
57 { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_TREO_ID), 56 { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_TREO_ID),
@@ -113,18 +112,18 @@ static struct usb_device_id id_table [] = {
113 { } /* Terminating entry */ 112 { } /* Terminating entry */
114}; 113};
115 114
116static struct usb_device_id clie_id_5_table [] = { 115static const struct usb_device_id clie_id_5_table[] = {
117 { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_UX50_ID), 116 { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_UX50_ID),
118 .driver_info = (kernel_ulong_t)&palm_os_4_probe }, 117 .driver_info = (kernel_ulong_t)&palm_os_4_probe },
119 { } /* Terminating entry */ 118 { } /* Terminating entry */
120}; 119};
121 120
122static struct usb_device_id clie_id_3_5_table [] = { 121static const struct usb_device_id clie_id_3_5_table[] = {
123 { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_3_5_ID) }, 122 { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_3_5_ID) },
124 { } /* Terminating entry */ 123 { } /* Terminating entry */
125}; 124};
126 125
127static struct usb_device_id id_table_combined [] = { 126static const struct usb_device_id id_table_combined[] = {
128 { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) }, 127 { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) },
129 { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_TREO_ID) }, 128 { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_TREO_ID) },
130 { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_TREO600_ID) }, 129 { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_TREO600_ID) },
@@ -324,11 +323,8 @@ static int palm_os_3_probe(struct usb_serial *serial,
324 int num_ports = 0; 323 int num_ports = 0;
325 324
326 transfer_buffer = kmalloc(sizeof(*connection_info), GFP_KERNEL); 325 transfer_buffer = kmalloc(sizeof(*connection_info), GFP_KERNEL);
327 if (!transfer_buffer) { 326 if (!transfer_buffer)
328 dev_err(dev, "%s - kmalloc(%Zd) failed.\n", __func__,
329 sizeof(*connection_info));
330 return -ENOMEM; 327 return -ENOMEM;
331 }
332 328
333 /* send a get connection info request */ 329 /* send a get connection info request */
334 retval = usb_control_msg(serial->dev, 330 retval = usb_control_msg(serial->dev,
@@ -419,11 +415,8 @@ static int palm_os_4_probe(struct usb_serial *serial,
419 int retval; 415 int retval;
420 416
421 transfer_buffer = kmalloc(sizeof(*connection_info), GFP_KERNEL); 417 transfer_buffer = kmalloc(sizeof(*connection_info), GFP_KERNEL);
422 if (!transfer_buffer) { 418 if (!transfer_buffer)
423 dev_err(dev, "%s - kmalloc(%Zd) failed.\n", __func__,
424 sizeof(*connection_info));
425 return -ENOMEM; 419 return -ENOMEM;
426 }
427 420
428 retval = usb_control_msg(serial->dev, 421 retval = usb_control_msg(serial->dev,
429 usb_rcvctrlpipe(serial->dev, 0), 422 usb_rcvctrlpipe(serial->dev, 0),
diff --git a/drivers/usb/serial/visor.h b/drivers/usb/serial/visor.h
index 88db4d06aefb..4c456dd69ce5 100644
--- a/drivers/usb/serial/visor.h
+++ b/drivers/usb/serial/visor.h
@@ -136,7 +136,7 @@ struct visor_connection_info {
136 * connections.end_point_info is non-zero. If value is 0, then 136 * connections.end_point_info is non-zero. If value is 0, then
137 * connections.port contains the endpoint number, which is the same for in 137 * connections.port contains the endpoint number, which is the same for in
138 * and out. 138 * and out.
139 * @port_function_id: contains the creator id of the applicaton that opened 139 * @port_function_id: contains the creator id of the application that opened
140 * this connection. 140 * this connection.
141 * @port: contains the in/out endpoint number. Is 0 if in and out endpoint 141 * @port: contains the in/out endpoint number. Is 0 if in and out endpoint
142 * numbers are different. 142 * numbers are different.
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index 36a7740e827c..e62f2dff8b7d 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -18,7 +18,6 @@
18 18
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/errno.h> 20#include <linux/errno.h>
21#include <linux/init.h>
22#include <linux/slab.h> 21#include <linux/slab.h>
23#include <linux/tty.h> 22#include <linux/tty.h>
24#include <linux/tty_driver.h> 23#include <linux/tty_driver.h>
@@ -288,12 +287,8 @@ static int whiteheat_attach(struct usb_serial *serial)
288 287
289 command_info = kmalloc(sizeof(struct whiteheat_command_private), 288 command_info = kmalloc(sizeof(struct whiteheat_command_private),
290 GFP_KERNEL); 289 GFP_KERNEL);
291 if (command_info == NULL) { 290 if (!command_info)
292 dev_err(&serial->dev->dev,
293 "%s: Out of memory for port structures\n",
294 serial->type->description);
295 goto no_command_private; 291 goto no_command_private;
296 }
297 292
298 mutex_init(&command_info->mutex); 293 mutex_init(&command_info->mutex);
299 command_info->port_running = 0; 294 command_info->port_running = 0;
@@ -455,8 +450,6 @@ static int whiteheat_ioctl(struct tty_struct *tty,
455 struct serial_struct serstruct; 450 struct serial_struct serstruct;
456 void __user *user_arg = (void __user *)arg; 451 void __user *user_arg = (void __user *)arg;
457 452
458 dev_dbg(&port->dev, "%s - cmd 0x%.4x\n", __func__, cmd);
459
460 switch (cmd) { 453 switch (cmd) {
461 case TIOCGSERIAL: 454 case TIOCGSERIAL:
462 memset(&serstruct, 0, sizeof(serstruct)); 455 memset(&serstruct, 0, sizeof(serstruct));
diff --git a/drivers/usb/serial/wishbone-serial.c b/drivers/usb/serial/wishbone-serial.c
index 100573c6f19e..4fed4a0bd702 100644
--- a/drivers/usb/serial/wishbone-serial.c
+++ b/drivers/usb/serial/wishbone-serial.c
@@ -11,7 +11,6 @@
11 */ 11 */
12 12
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/tty.h> 14#include <linux/tty.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/usb.h> 16#include <linux/usb.h>
diff --git a/drivers/usb/serial/xsens_mt.c b/drivers/usb/serial/xsens_mt.c
index 1d5798d891bc..4841fb57400c 100644
--- a/drivers/usb/serial/xsens_mt.c
+++ b/drivers/usb/serial/xsens_mt.c
@@ -9,7 +9,6 @@
9 */ 9 */
10 10
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/tty.h> 12#include <linux/tty.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/usb.h> 14#include <linux/usb.h>
diff --git a/drivers/usb/serial/zte_ev.c b/drivers/usb/serial/zte_ev.c
index eae2c873b39f..e40ab739c4a6 100644
--- a/drivers/usb/serial/zte_ev.c
+++ b/drivers/usb/serial/zte_ev.c
@@ -13,7 +13,6 @@
13 * show the commands used to talk to the device, but I am not sure. 13 * show the commands used to talk to the device, but I am not sure.
14 */ 14 */
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/tty.h> 16#include <linux/tty.h>
18#include <linux/slab.h> 17#include <linux/slab.h>
19#include <linux/module.h> 18#include <linux/module.h>
@@ -53,7 +52,7 @@ static int zte_ev_usb_serial_open(struct tty_struct *tty,
53 USB_CTRL_GET_TIMEOUT); 52 USB_CTRL_GET_TIMEOUT);
54 dev_dbg(dev, "result = %d\n", result); 53 dev_dbg(dev, "result = %d\n", result);
55 54
56 /* send 2st cmd and recieve data */ 55 /* send 2st cmd and receive data */
57 /* 56 /*
58 * 16.0 CTL a1 21 00 00 00 00 07 00 CLASS 25.1.0(5) 57 * 16.0 CTL a1 21 00 00 00 00 07 00 CLASS 25.1.0(5)
59 * 16.0 DI 00 96 00 00 00 00 08 58 * 16.0 DI 00 96 00 00 00 00 08
@@ -65,7 +64,7 @@ static int zte_ev_usb_serial_open(struct tty_struct *tty,
65 USB_CTRL_GET_TIMEOUT); 64 USB_CTRL_GET_TIMEOUT);
66 debug_data(dev, __func__, len, buf, result); 65 debug_data(dev, __func__, len, buf, result);
67 66
68 /* send 3 cmd */ 67 /* send 3rd cmd */
69 /* 68 /*
70 * 16.0 CTL 21 20 00 00 00 00 07 00 CLASS 30.1.0 69 * 16.0 CTL 21 20 00 00 00 00 07 00 CLASS 30.1.0
71 * 16.0 DO 80 25 00 00 00 00 08 .%..... 30.2.0 70 * 16.0 DO 80 25 00 00 00 00 08 .%..... 30.2.0
@@ -84,7 +83,7 @@ static int zte_ev_usb_serial_open(struct tty_struct *tty,
84 USB_CTRL_GET_TIMEOUT); 83 USB_CTRL_GET_TIMEOUT);
85 debug_data(dev, __func__, len, buf, result); 84 debug_data(dev, __func__, len, buf, result);
86 85
87 /* send 4 cmd */ 86 /* send 4th cmd */
88 /* 87 /*
89 * 16.0 CTL 21 22 03 00 00 00 00 00 88 * 16.0 CTL 21 22 03 00 00 00 00 00
90 */ 89 */
@@ -95,7 +94,7 @@ static int zte_ev_usb_serial_open(struct tty_struct *tty,
95 USB_CTRL_GET_TIMEOUT); 94 USB_CTRL_GET_TIMEOUT);
96 dev_dbg(dev, "result = %d\n", result); 95 dev_dbg(dev, "result = %d\n", result);
97 96
98 /* send 5 cmd */ 97 /* send 5th cmd */
99 /* 98 /*
100 * 16.0 CTL a1 21 00 00 00 00 07 00 CLASS 33.1.0 99 * 16.0 CTL a1 21 00 00 00 00 07 00 CLASS 33.1.0
101 * 16.0 DI 80 25 00 00 00 00 08 100 * 16.0 DI 80 25 00 00 00 00 08
@@ -107,7 +106,7 @@ static int zte_ev_usb_serial_open(struct tty_struct *tty,
107 USB_CTRL_GET_TIMEOUT); 106 USB_CTRL_GET_TIMEOUT);
108 debug_data(dev, __func__, len, buf, result); 107 debug_data(dev, __func__, len, buf, result);
109 108
110 /* send 6 cmd */ 109 /* send 6th cmd */
111 /* 110 /*
112 * 16.0 CTL 21 20 00 00 00 00 07 00 CLASS 34.1.0 111 * 16.0 CTL 21 20 00 00 00 00 07 00 CLASS 34.1.0
113 * 16.0 DO 80 25 00 00 00 00 08 112 * 16.0 DO 80 25 00 00 00 00 08
@@ -195,7 +194,7 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port)
195 USB_CTRL_GET_TIMEOUT); 194 USB_CTRL_GET_TIMEOUT);
196 debug_data(dev, __func__, len, buf, result); 195 debug_data(dev, __func__, len, buf, result);
197 196
198 /* send 4 cmd */ 197 /* send 4th cmd */
199 /* 198 /*
200 * 16.0 CTL 21 20 00 00 00 00 07 00 CLASS 30.1.0 199 * 16.0 CTL 21 20 00 00 00 00 07 00 CLASS 30.1.0
201 * 16.0 DO 00 c2 01 00 00 00 08 .%..... 30.2.0 200 * 16.0 DO 00 c2 01 00 00 00 08 .%..... 30.2.0
@@ -214,7 +213,7 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port)
214 USB_CTRL_GET_TIMEOUT); 213 USB_CTRL_GET_TIMEOUT);
215 debug_data(dev, __func__, len, buf, result); 214 debug_data(dev, __func__, len, buf, result);
216 215
217 /* send 5 cmd */ 216 /* send 5th cmd */
218 /* 217 /*
219 * 16.0 CTL 21 22 03 00 00 00 00 00 218 * 16.0 CTL 21 22 03 00 00 00 00 00
220 */ 219 */
@@ -225,7 +224,7 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port)
225 USB_CTRL_GET_TIMEOUT); 224 USB_CTRL_GET_TIMEOUT);
226 dev_dbg(dev, "result = %d\n", result); 225 dev_dbg(dev, "result = %d\n", result);
227 226
228 /* send 6 cmd */ 227 /* send 6th cmd */
229 /* 228 /*
230 * 16.0 CTL a1 21 00 00 00 00 07 00 CLASS 33.1.0 229 * 16.0 CTL a1 21 00 00 00 00 07 00 CLASS 33.1.0
231 * 16.0 DI 00 c2 01 00 00 00 08 230 * 16.0 DI 00 c2 01 00 00 00 08
@@ -237,7 +236,7 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port)
237 USB_CTRL_GET_TIMEOUT); 236 USB_CTRL_GET_TIMEOUT);
238 debug_data(dev, __func__, len, buf, result); 237 debug_data(dev, __func__, len, buf, result);
239 238
240 /* send 7 cmd */ 239 /* send 7th cmd */
241 /* 240 /*
242 * 16.0 CTL 21 20 00 00 00 00 07 00 CLASS 354.1.0 241 * 16.0 CTL 21 20 00 00 00 00 07 00 CLASS 354.1.0
243 * 16.0 DO 00 c2 01 00 00 00 08 ....... 354.2.0 242 * 16.0 DO 00 c2 01 00 00 00 08 ....... 354.2.0
@@ -256,7 +255,7 @@ static void zte_ev_usb_serial_close(struct usb_serial_port *port)
256 USB_CTRL_GET_TIMEOUT); 255 USB_CTRL_GET_TIMEOUT);
257 debug_data(dev, __func__, len, buf, result); 256 debug_data(dev, __func__, len, buf, result);
258 257
259 /* send 8 cmd */ 258 /* send 8th cmd */
260 /* 259 /*
261 * 16.0 CTL 21 22 03 00 00 00 00 00 260 * 16.0 CTL 21 22 03 00 00 00 00 00
262 */ 261 */
diff --git a/drivers/usb/storage/onetouch.c b/drivers/usb/storage/onetouch.c
index 26964895c88b..74e2aa23b045 100644
--- a/drivers/usb/storage/onetouch.c
+++ b/drivers/usb/storage/onetouch.c
@@ -30,7 +30,6 @@
30 30
31#include <linux/kernel.h> 31#include <linux/kernel.h>
32#include <linux/input.h> 32#include <linux/input.h>
33#include <linux/init.h>
34#include <linux/slab.h> 33#include <linux/slab.h>
35#include <linux/module.h> 34#include <linux/module.h>
36#include <linux/usb/input.h> 35#include <linux/usb/input.h>
diff --git a/drivers/usb/storage/protocol.c b/drivers/usb/storage/protocol.c
index 5dfb4c36a1b0..12e3c2fac642 100644
--- a/drivers/usb/storage/protocol.c
+++ b/drivers/usb/storage/protocol.c
@@ -135,69 +135,42 @@ unsigned int usb_stor_access_xfer_buf(unsigned char *buffer,
135 unsigned int buflen, struct scsi_cmnd *srb, struct scatterlist **sgptr, 135 unsigned int buflen, struct scsi_cmnd *srb, struct scatterlist **sgptr,
136 unsigned int *offset, enum xfer_buf_dir dir) 136 unsigned int *offset, enum xfer_buf_dir dir)
137{ 137{
138 unsigned int cnt; 138 unsigned int cnt = 0;
139 struct scatterlist *sg = *sgptr; 139 struct scatterlist *sg = *sgptr;
140 struct sg_mapping_iter miter;
141 unsigned int nents = scsi_sg_count(srb);
140 142
141 /* We have to go through the list one entry 143 if (sg)
142 * at a time. Each s-g entry contains some number of pages, and 144 nents = sg_nents(sg);
143 * each page has to be kmap()'ed separately. If the page is already 145 else
144 * in kernel-addressable memory then kmap() will return its address.
145 * If the page is not directly accessible -- such as a user buffer
146 * located in high memory -- then kmap() will map it to a temporary
147 * position in the kernel's virtual address space.
148 */
149
150 if (!sg)
151 sg = scsi_sglist(srb); 146 sg = scsi_sglist(srb);
152 147
153 /* This loop handles a single s-g list entry, which may 148 sg_miter_start(&miter, sg, nents, dir == FROM_XFER_BUF ?
154 * include multiple pages. Find the initial page structure 149 SG_MITER_FROM_SG: SG_MITER_TO_SG);
155 * and the starting offset within the page, and update
156 * the *offset and **sgptr values for the next loop.
157 */
158 cnt = 0;
159 while (cnt < buflen && sg) {
160 struct page *page = sg_page(sg) +
161 ((sg->offset + *offset) >> PAGE_SHIFT);
162 unsigned int poff = (sg->offset + *offset) & (PAGE_SIZE-1);
163 unsigned int sglen = sg->length - *offset;
164
165 if (sglen > buflen - cnt) {
166
167 /* Transfer ends within this s-g entry */
168 sglen = buflen - cnt;
169 *offset += sglen;
170 } else {
171 150
172 /* Transfer continues to next s-g entry */ 151 if (!sg_miter_skip(&miter, *offset))
173 *offset = 0; 152 return cnt;
174 sg = sg_next(sg); 153
175 } 154 while (sg_miter_next(&miter) && cnt < buflen) {
155 unsigned int len = min_t(unsigned int, miter.length,
156 buflen - cnt);
157
158 if (dir == FROM_XFER_BUF)
159 memcpy(buffer + cnt, miter.addr, len);
160 else
161 memcpy(miter.addr, buffer + cnt, len);
176 162
177 /* Transfer the data for all the pages in this 163 if (*offset + len < miter.piter.sg->length) {
178 * s-g entry. For each page: call kmap(), do the 164 *offset += len;
179 * transfer, and call kunmap() immediately after. */ 165 *sgptr = miter.piter.sg;
180 while (sglen > 0) { 166 } else {
181 unsigned int plen = min(sglen, (unsigned int) 167 *offset = 0;
182 PAGE_SIZE - poff); 168 *sgptr = sg_next(miter.piter.sg);
183 unsigned char *ptr = kmap(page);
184
185 if (dir == TO_XFER_BUF)
186 memcpy(ptr + poff, buffer + cnt, plen);
187 else
188 memcpy(buffer + cnt, ptr + poff, plen);
189 kunmap(page);
190
191 /* Start at the beginning of the next page */
192 poff = 0;
193 ++page;
194 cnt += plen;
195 sglen -= plen;
196 } 169 }
170 cnt += len;
197 } 171 }
198 *sgptr = sg; 172 sg_miter_stop(&miter);
199 173
200 /* Return the amount actually transferred */
201 return cnt; 174 return cnt;
202} 175}
203EXPORT_SYMBOL_GPL(usb_stor_access_xfer_buf); 176EXPORT_SYMBOL_GPL(usb_stor_access_xfer_buf);
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index de32cfa5bfa6..ad06255c2ade 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -234,6 +234,13 @@ UNUSUAL_DEV( 0x0421, 0x0495, 0x0370, 0x0370,
234 USB_SC_DEVICE, USB_PR_DEVICE, NULL, 234 USB_SC_DEVICE, USB_PR_DEVICE, NULL,
235 US_FL_MAX_SECTORS_64 ), 235 US_FL_MAX_SECTORS_64 ),
236 236
237/* Patch submitted by Mikhail Zolotaryov <lebon@lebon.org.ua> */
238UNUSUAL_DEV( 0x0421, 0x06aa, 0x1110, 0x1110,
239 "Nokia",
240 "502",
241 USB_SC_DEVICE, USB_PR_DEVICE, NULL,
242 US_FL_MAX_SECTORS_64 ),
243
237#ifdef NO_SDDR09 244#ifdef NO_SDDR09
238UNUSUAL_DEV( 0x0436, 0x0005, 0x0100, 0x0100, 245UNUSUAL_DEV( 0x0436, 0x0005, 0x0100, 0x0100,
239 "Microtech", 246 "Microtech",
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 5c4fe0749af1..1c0b89f2a138 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -53,7 +53,6 @@
53#include <linux/errno.h> 53#include <linux/errno.h>
54#include <linux/freezer.h> 54#include <linux/freezer.h>
55#include <linux/module.h> 55#include <linux/module.h>
56#include <linux/init.h>
57#include <linux/slab.h> 56#include <linux/slab.h>
58#include <linux/kthread.h> 57#include <linux/kthread.h>
59#include <linux/mutex.h> 58#include <linux/mutex.h>
diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c
index ff97652343a3..545d09b8081d 100644
--- a/drivers/usb/usb-skeleton.c
+++ b/drivers/usb/usb-skeleton.c
@@ -14,7 +14,6 @@
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/init.h>
18#include <linux/slab.h> 17#include <linux/slab.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/kref.h> 19#include <linux/kref.h>
diff --git a/drivers/usb/wusbcore/cbaf.c b/drivers/usb/wusbcore/cbaf.c
index f06ed82e63d1..da1b872918b5 100644
--- a/drivers/usb/wusbcore/cbaf.c
+++ b/drivers/usb/wusbcore/cbaf.c
@@ -144,7 +144,7 @@ static int cbaf_check(struct cbaf *cbaf)
144 CBAF_REQ_GET_ASSOCIATION_INFORMATION, 144 CBAF_REQ_GET_ASSOCIATION_INFORMATION,
145 USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 145 USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
146 0, cbaf->usb_iface->cur_altsetting->desc.bInterfaceNumber, 146 0, cbaf->usb_iface->cur_altsetting->desc.bInterfaceNumber,
147 cbaf->buffer, cbaf->buffer_size, 1000 /* FIXME: arbitrary */); 147 cbaf->buffer, cbaf->buffer_size, USB_CTRL_GET_TIMEOUT);
148 if (result < 0) { 148 if (result < 0) {
149 dev_err(dev, "Cannot get available association types: %d\n", 149 dev_err(dev, "Cannot get available association types: %d\n",
150 result); 150 result);
@@ -184,7 +184,7 @@ static int cbaf_check(struct cbaf *cbaf)
184 assoc_request = itr; 184 assoc_request = itr;
185 185
186 if (top - itr < sizeof(*assoc_request)) { 186 if (top - itr < sizeof(*assoc_request)) {
187 dev_err(dev, "Not enough data to decode associaton " 187 dev_err(dev, "Not enough data to decode association "
188 "request (%zu vs %zu bytes needed)\n", 188 "request (%zu vs %zu bytes needed)\n",
189 top - itr, sizeof(*assoc_request)); 189 top - itr, sizeof(*assoc_request));
190 break; 190 break;
@@ -235,7 +235,7 @@ static int cbaf_check(struct cbaf *cbaf)
235 235
236static const struct wusb_cbaf_host_info cbaf_host_info_defaults = { 236static const struct wusb_cbaf_host_info cbaf_host_info_defaults = {
237 .AssociationTypeId_hdr = WUSB_AR_AssociationTypeId, 237 .AssociationTypeId_hdr = WUSB_AR_AssociationTypeId,
238 .AssociationTypeId = cpu_to_le16(AR_TYPE_WUSB), 238 .AssociationTypeId = cpu_to_le16(AR_TYPE_WUSB),
239 .AssociationSubTypeId_hdr = WUSB_AR_AssociationSubTypeId, 239 .AssociationSubTypeId_hdr = WUSB_AR_AssociationSubTypeId,
240 .AssociationSubTypeId = cpu_to_le16(AR_TYPE_WUSB_RETRIEVE_HOST_INFO), 240 .AssociationSubTypeId = cpu_to_le16(AR_TYPE_WUSB_RETRIEVE_HOST_INFO),
241 .CHID_hdr = WUSB_AR_CHID, 241 .CHID_hdr = WUSB_AR_CHID,
@@ -260,12 +260,13 @@ static int cbaf_send_host_info(struct cbaf *cbaf)
260 hi->HostFriendlyName_hdr.len = cpu_to_le16(name_len); 260 hi->HostFriendlyName_hdr.len = cpu_to_le16(name_len);
261 hi_size = sizeof(*hi) + name_len; 261 hi_size = sizeof(*hi) + name_len;
262 262
263 return usb_control_msg(cbaf->usb_dev, usb_sndctrlpipe(cbaf->usb_dev, 0), 263 return usb_control_msg(cbaf->usb_dev,
264 usb_sndctrlpipe(cbaf->usb_dev, 0),
264 CBAF_REQ_SET_ASSOCIATION_RESPONSE, 265 CBAF_REQ_SET_ASSOCIATION_RESPONSE,
265 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 266 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
266 0x0101, 267 0x0101,
267 cbaf->usb_iface->cur_altsetting->desc.bInterfaceNumber, 268 cbaf->usb_iface->cur_altsetting->desc.bInterfaceNumber,
268 hi, hi_size, 1000 /* FIXME: arbitrary */); 269 hi, hi_size, USB_CTRL_SET_TIMEOUT);
269} 270}
270 271
271/* 272/*
@@ -288,9 +289,10 @@ static int cbaf_cdid_get(struct cbaf *cbaf)
288 CBAF_REQ_GET_ASSOCIATION_REQUEST, 289 CBAF_REQ_GET_ASSOCIATION_REQUEST,
289 USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 290 USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
290 0x0200, cbaf->usb_iface->cur_altsetting->desc.bInterfaceNumber, 291 0x0200, cbaf->usb_iface->cur_altsetting->desc.bInterfaceNumber,
291 di, cbaf->buffer_size, 1000 /* FIXME: arbitrary */); 292 di, cbaf->buffer_size, USB_CTRL_GET_TIMEOUT);
292 if (result < 0) { 293 if (result < 0) {
293 dev_err(dev, "Cannot request device information: %d\n", result); 294 dev_err(dev, "Cannot request device information: %d\n",
295 result);
294 return result; 296 return result;
295 } 297 }
296 298
@@ -491,11 +493,11 @@ static DEVICE_ATTR(wusb_device_name, 0600, cbaf_wusb_device_name_show, NULL);
491 493
492static const struct wusb_cbaf_cc_data cbaf_cc_data_defaults = { 494static const struct wusb_cbaf_cc_data cbaf_cc_data_defaults = {
493 .AssociationTypeId_hdr = WUSB_AR_AssociationTypeId, 495 .AssociationTypeId_hdr = WUSB_AR_AssociationTypeId,
494 .AssociationTypeId = cpu_to_le16(AR_TYPE_WUSB), 496 .AssociationTypeId = cpu_to_le16(AR_TYPE_WUSB),
495 .AssociationSubTypeId_hdr = WUSB_AR_AssociationSubTypeId, 497 .AssociationSubTypeId_hdr = WUSB_AR_AssociationSubTypeId,
496 .AssociationSubTypeId = cpu_to_le16(AR_TYPE_WUSB_ASSOCIATE), 498 .AssociationSubTypeId = cpu_to_le16(AR_TYPE_WUSB_ASSOCIATE),
497 .Length_hdr = WUSB_AR_Length, 499 .Length_hdr = WUSB_AR_Length,
498 .Length = cpu_to_le32(sizeof(struct wusb_cbaf_cc_data)), 500 .Length = cpu_to_le32(sizeof(struct wusb_cbaf_cc_data)),
499 .ConnectionContext_hdr = WUSB_AR_ConnectionContext, 501 .ConnectionContext_hdr = WUSB_AR_ConnectionContext,
500 .BandGroups_hdr = WUSB_AR_BandGroups, 502 .BandGroups_hdr = WUSB_AR_BandGroups,
501}; 503};
@@ -536,7 +538,7 @@ static int cbaf_cc_upload(struct cbaf *cbaf)
536 CBAF_REQ_SET_ASSOCIATION_RESPONSE, 538 CBAF_REQ_SET_ASSOCIATION_RESPONSE,
537 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 539 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
538 0x0201, cbaf->usb_iface->cur_altsetting->desc.bInterfaceNumber, 540 0x0201, cbaf->usb_iface->cur_altsetting->desc.bInterfaceNumber,
539 ccd, sizeof(*ccd), 1000 /* FIXME: arbitrary */); 541 ccd, sizeof(*ccd), USB_CTRL_SET_TIMEOUT);
540 542
541 return result; 543 return result;
542} 544}
diff --git a/drivers/usb/wusbcore/crypto.c b/drivers/usb/wusbcore/crypto.c
index 7e4bf95f8f7b..9a95b2dc6d1b 100644
--- a/drivers/usb/wusbcore/crypto.c
+++ b/drivers/usb/wusbcore/crypto.c
@@ -87,7 +87,7 @@ struct aes_ccm_block {
87 * B1 contains l(a), the MAC header, the encryption offset and padding. 87 * B1 contains l(a), the MAC header, the encryption offset and padding.
88 * 88 *
89 * If EO is nonzero, additional blocks are built from payload bytes 89 * If EO is nonzero, additional blocks are built from payload bytes
90 * until EO is exahusted (FIXME: padding to 16 bytes, I guess). The 90 * until EO is exhausted (FIXME: padding to 16 bytes, I guess). The
91 * padding is not xmitted. 91 * padding is not xmitted.
92 */ 92 */
93 93
diff --git a/drivers/usb/wusbcore/devconnect.c b/drivers/usb/wusbcore/devconnect.c
index f14e7929ba22..3b959e83b28e 100644
--- a/drivers/usb/wusbcore/devconnect.c
+++ b/drivers/usb/wusbcore/devconnect.c
@@ -265,9 +265,9 @@ static void wusbhc_devconnect_acked_work(struct work_struct *work)
265 * Addresses: because WUSB hosts have no downstream hubs, we can do a 265 * Addresses: because WUSB hosts have no downstream hubs, we can do a
266 * 1:1 mapping between 'port number' and device 266 * 1:1 mapping between 'port number' and device
267 * address. This simplifies many things, as during this 267 * address. This simplifies many things, as during this
268 * initial connect phase the USB stack has no knoledge of 268 * initial connect phase the USB stack has no knowledge of
269 * the device and hasn't assigned an address yet--we know 269 * the device and hasn't assigned an address yet--we know
270 * USB's choose_address() will use the same euristics we 270 * USB's choose_address() will use the same heuristics we
271 * use here, so we can assume which address will be assigned. 271 * use here, so we can assume which address will be assigned.
272 * 272 *
273 * USB stack always assigns address 1 to the root hub, so 273 * USB stack always assigns address 1 to the root hub, so
diff --git a/drivers/usb/wusbcore/mmc.c b/drivers/usb/wusbcore/mmc.c
index b71760c8d3ad..44741267c917 100644
--- a/drivers/usb/wusbcore/mmc.c
+++ b/drivers/usb/wusbcore/mmc.c
@@ -206,13 +206,15 @@ int wusbhc_start(struct wusbhc *wusbhc)
206 206
207 result = wusbhc_devconnect_start(wusbhc); 207 result = wusbhc_devconnect_start(wusbhc);
208 if (result < 0) { 208 if (result < 0) {
209 dev_err(dev, "error enabling device connections: %d\n", result); 209 dev_err(dev, "error enabling device connections: %d\n",
210 result);
210 goto error_devconnect_start; 211 goto error_devconnect_start;
211 } 212 }
212 213
213 result = wusbhc_sec_start(wusbhc); 214 result = wusbhc_sec_start(wusbhc);
214 if (result < 0) { 215 if (result < 0) {
215 dev_err(dev, "error starting security in the HC: %d\n", result); 216 dev_err(dev, "error starting security in the HC: %d\n",
217 result);
216 goto error_sec_start; 218 goto error_sec_start;
217 } 219 }
218 220
@@ -284,7 +286,8 @@ int wusbhc_chid_set(struct wusbhc *wusbhc, const struct wusb_ckhdid *chid)
284 wusbhc->uwb_rc = uwb_rc_get_by_grandpa(wusbhc->dev->parent); 286 wusbhc->uwb_rc = uwb_rc_get_by_grandpa(wusbhc->dev->parent);
285 if (wusbhc->uwb_rc == NULL) { 287 if (wusbhc->uwb_rc == NULL) {
286 result = -ENODEV; 288 result = -ENODEV;
287 dev_err(wusbhc->dev, "Cannot get associated UWB Host Controller\n"); 289 dev_err(wusbhc->dev,
290 "Cannot get associated UWB Host Controller\n");
288 goto error_rc_get; 291 goto error_rc_get;
289 } 292 }
290 293
diff --git a/drivers/usb/wusbcore/pal.c b/drivers/usb/wusbcore/pal.c
index 59e100c2eb50..090f27371a8f 100644
--- a/drivers/usb/wusbcore/pal.c
+++ b/drivers/usb/wusbcore/pal.c
@@ -22,6 +22,7 @@ static void wusbhc_channel_changed(struct uwb_pal *pal, int channel)
22{ 22{
23 struct wusbhc *wusbhc = container_of(pal, struct wusbhc, pal); 23 struct wusbhc *wusbhc = container_of(pal, struct wusbhc, pal);
24 24
25 dev_dbg(wusbhc->dev, "%s: channel = %d\n", __func__, channel);
25 if (channel < 0) 26 if (channel < 0)
26 wusbhc_stop(wusbhc); 27 wusbhc_stop(wusbhc);
27 else 28 else
diff --git a/drivers/usb/wusbcore/reservation.c b/drivers/usb/wusbcore/reservation.c
index ead79f793927..d5efd0f07d2b 100644
--- a/drivers/usb/wusbcore/reservation.c
+++ b/drivers/usb/wusbcore/reservation.c
@@ -51,6 +51,7 @@ static void wusbhc_rsv_complete_cb(struct uwb_rsv *rsv)
51 struct uwb_mas_bm mas; 51 struct uwb_mas_bm mas;
52 char buf[72]; 52 char buf[72];
53 53
54 dev_dbg(dev, "%s: state = %d\n", __func__, rsv->state);
54 switch (rsv->state) { 55 switch (rsv->state) {
55 case UWB_RSV_STATE_O_ESTABLISHED: 56 case UWB_RSV_STATE_O_ESTABLISHED:
56 uwb_rsv_get_usable_mas(rsv, &mas); 57 uwb_rsv_get_usable_mas(rsv, &mas);
diff --git a/drivers/usb/wusbcore/security.c b/drivers/usb/wusbcore/security.c
index 4c40d0dbf53d..95be9953cd47 100644
--- a/drivers/usb/wusbcore/security.c
+++ b/drivers/usb/wusbcore/security.c
@@ -33,7 +33,8 @@ static void wusbhc_gtk_rekey_work(struct work_struct *work);
33 33
34int wusbhc_sec_create(struct wusbhc *wusbhc) 34int wusbhc_sec_create(struct wusbhc *wusbhc)
35{ 35{
36 wusbhc->gtk.descr.bLength = sizeof(wusbhc->gtk.descr) + sizeof(wusbhc->gtk.data); 36 wusbhc->gtk.descr.bLength = sizeof(wusbhc->gtk.descr) +
37 sizeof(wusbhc->gtk.data);
37 wusbhc->gtk.descr.bDescriptorType = USB_DT_KEY; 38 wusbhc->gtk.descr.bDescriptorType = USB_DT_KEY;
38 wusbhc->gtk.descr.bReserved = 0; 39 wusbhc->gtk.descr.bReserved = 0;
39 wusbhc->gtk_index = 0; 40 wusbhc->gtk_index = 0;
@@ -56,7 +57,7 @@ void wusbhc_sec_destroy(struct wusbhc *wusbhc)
56 * @wusb_dev: the device whose PTK the TKID is for 57 * @wusb_dev: the device whose PTK the TKID is for
57 * (or NULL for a TKID for a GTK) 58 * (or NULL for a TKID for a GTK)
58 * 59 *
59 * The generated TKID consist of two parts: the device's authenicated 60 * The generated TKID consists of two parts: the device's authenticated
60 * address (or 0 or a GTK); and an incrementing number. This ensures 61 * address (or 0 or a GTK); and an incrementing number. This ensures
61 * that TKIDs cannot be shared between devices and by the time the 62 * that TKIDs cannot be shared between devices and by the time the
62 * incrementing number wraps around the older TKIDs will no longer be 63 * incrementing number wraps around the older TKIDs will no longer be
@@ -138,7 +139,7 @@ const char *wusb_et_name(u8 x)
138 case USB_ENC_TYPE_WIRED: return "wired"; 139 case USB_ENC_TYPE_WIRED: return "wired";
139 case USB_ENC_TYPE_CCM_1: return "CCM-1"; 140 case USB_ENC_TYPE_CCM_1: return "CCM-1";
140 case USB_ENC_TYPE_RSA_1: return "RSA-1"; 141 case USB_ENC_TYPE_RSA_1: return "RSA-1";
141 default: return "unknown"; 142 default: return "unknown";
142 } 143 }
143} 144}
144EXPORT_SYMBOL_GPL(wusb_et_name); 145EXPORT_SYMBOL_GPL(wusb_et_name);
@@ -165,7 +166,7 @@ static int wusb_dev_set_encryption(struct usb_device *usb_dev, int value)
165 result = usb_control_msg(usb_dev, usb_sndctrlpipe(usb_dev, 0), 166 result = usb_control_msg(usb_dev, usb_sndctrlpipe(usb_dev, 0),
166 USB_REQ_SET_ENCRYPTION, 167 USB_REQ_SET_ENCRYPTION,
167 USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE, 168 USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE,
168 value, 0, NULL, 0, 1000 /* FIXME: arbitrary */); 169 value, 0, NULL, 0, USB_CTRL_SET_TIMEOUT);
169 if (result < 0) 170 if (result < 0)
170 dev_err(dev, "Can't set device's WUSB encryption to " 171 dev_err(dev, "Can't set device's WUSB encryption to "
171 "%s (value %d): %d\n", 172 "%s (value %d): %d\n",
@@ -191,7 +192,7 @@ static int wusb_dev_set_gtk(struct wusbhc *wusbhc, struct wusb_dev *wusb_dev)
191 USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE, 192 USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE,
192 USB_DT_KEY << 8 | key_index, 0, 193 USB_DT_KEY << 8 | key_index, 0,
193 &wusbhc->gtk.descr, wusbhc->gtk.descr.bLength, 194 &wusbhc->gtk.descr, wusbhc->gtk.descr.bLength,
194 1000); 195 USB_CTRL_SET_TIMEOUT);
195} 196}
196 197
197 198
@@ -222,7 +223,8 @@ int wusb_dev_sec_add(struct wusbhc *wusbhc,
222 secd_size = le16_to_cpu(secd->wTotalLength); 223 secd_size = le16_to_cpu(secd->wTotalLength);
223 new_secd = krealloc(secd, secd_size, GFP_KERNEL); 224 new_secd = krealloc(secd, secd_size, GFP_KERNEL);
224 if (new_secd == NULL) { 225 if (new_secd == NULL) {
225 dev_err(dev, "Can't allocate space for security descriptors\n"); 226 dev_err(dev,
227 "Can't allocate space for security descriptors\n");
226 goto out; 228 goto out;
227 } 229 }
228 secd = new_secd; 230 secd = new_secd;
@@ -301,8 +303,9 @@ int wusb_dev_update_address(struct wusbhc *wusbhc, struct wusb_dev *wusb_dev)
301 303
302 /* Set address 0 */ 304 /* Set address 0 */
303 result = usb_control_msg(usb_dev, usb_sndctrlpipe(usb_dev, 0), 305 result = usb_control_msg(usb_dev, usb_sndctrlpipe(usb_dev, 0),
304 USB_REQ_SET_ADDRESS, 0, 306 USB_REQ_SET_ADDRESS,
305 0, 0, NULL, 0, 1000 /* FIXME: arbitrary */); 307 USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE,
308 0, 0, NULL, 0, USB_CTRL_SET_TIMEOUT);
306 if (result < 0) { 309 if (result < 0) {
307 dev_err(dev, "auth failed: can't set address 0: %d\n", 310 dev_err(dev, "auth failed: can't set address 0: %d\n",
308 result); 311 result);
@@ -316,9 +319,10 @@ int wusb_dev_update_address(struct wusbhc *wusbhc, struct wusb_dev *wusb_dev)
316 319
317 /* Set new (authenticated) address. */ 320 /* Set new (authenticated) address. */
318 result = usb_control_msg(usb_dev, usb_sndctrlpipe(usb_dev, 0), 321 result = usb_control_msg(usb_dev, usb_sndctrlpipe(usb_dev, 0),
319 USB_REQ_SET_ADDRESS, 0, 322 USB_REQ_SET_ADDRESS,
320 new_address, 0, NULL, 0, 323 USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE,
321 1000 /* FIXME: arbitrary */); 324 new_address, 0, NULL, 0,
325 USB_CTRL_SET_TIMEOUT);
322 if (result < 0) { 326 if (result < 0) {
323 dev_err(dev, "auth failed: can't set address %u: %d\n", 327 dev_err(dev, "auth failed: can't set address %u: %d\n",
324 new_address, result); 328 new_address, result);
@@ -375,13 +379,13 @@ int wusb_dev_4way_handshake(struct wusbhc *wusbhc, struct wusb_dev *wusb_dev,
375 hs[0].bReserved = 0; 379 hs[0].bReserved = 0;
376 memcpy(hs[0].CDID, &wusb_dev->cdid, sizeof(hs[0].CDID)); 380 memcpy(hs[0].CDID, &wusb_dev->cdid, sizeof(hs[0].CDID));
377 get_random_bytes(&hs[0].nonce, sizeof(hs[0].nonce)); 381 get_random_bytes(&hs[0].nonce, sizeof(hs[0].nonce));
378 memset(hs[0].MIC, 0, sizeof(hs[0].MIC)); /* Per WUSB1.0[T7-22] */ 382 memset(hs[0].MIC, 0, sizeof(hs[0].MIC)); /* Per WUSB1.0[T7-22] */
379 383
380 result = usb_control_msg( 384 result = usb_control_msg(
381 usb_dev, usb_sndctrlpipe(usb_dev, 0), 385 usb_dev, usb_sndctrlpipe(usb_dev, 0),
382 USB_REQ_SET_HANDSHAKE, 386 USB_REQ_SET_HANDSHAKE,
383 USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE, 387 USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE,
384 1, 0, &hs[0], sizeof(hs[0]), 1000 /* FIXME: arbitrary */); 388 1, 0, &hs[0], sizeof(hs[0]), USB_CTRL_SET_TIMEOUT);
385 if (result < 0) { 389 if (result < 0) {
386 dev_err(dev, "Handshake1: request failed: %d\n", result); 390 dev_err(dev, "Handshake1: request failed: %d\n", result);
387 goto error_hs1; 391 goto error_hs1;
@@ -392,7 +396,7 @@ int wusb_dev_4way_handshake(struct wusbhc *wusbhc, struct wusb_dev *wusb_dev,
392 usb_dev, usb_rcvctrlpipe(usb_dev, 0), 396 usb_dev, usb_rcvctrlpipe(usb_dev, 0),
393 USB_REQ_GET_HANDSHAKE, 397 USB_REQ_GET_HANDSHAKE,
394 USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_DEVICE, 398 USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_DEVICE,
395 2, 0, &hs[1], sizeof(hs[1]), 1000 /* FIXME: arbitrary */); 399 2, 0, &hs[1], sizeof(hs[1]), USB_CTRL_GET_TIMEOUT);
396 if (result < 0) { 400 if (result < 0) {
397 dev_err(dev, "Handshake2: request failed: %d\n", result); 401 dev_err(dev, "Handshake2: request failed: %d\n", result);
398 goto error_hs2; 402 goto error_hs2;
@@ -422,7 +426,7 @@ int wusb_dev_4way_handshake(struct wusbhc *wusbhc, struct wusb_dev *wusb_dev,
422 } 426 }
423 427
424 /* Setup the CCM nonce */ 428 /* Setup the CCM nonce */
425 memset(&ccm_n.sfn, 0, sizeof(ccm_n.sfn)); /* Per WUSB1.0[6.5.2] */ 429 memset(&ccm_n.sfn, 0, sizeof(ccm_n.sfn)); /* Per WUSB1.0[6.5.2] */
426 memcpy(ccm_n.tkid, &tkid_le, sizeof(ccm_n.tkid)); 430 memcpy(ccm_n.tkid, &tkid_le, sizeof(ccm_n.tkid));
427 ccm_n.src_addr = wusbhc->uwb_rc->uwb_dev.dev_addr; 431 ccm_n.src_addr = wusbhc->uwb_rc->uwb_dev.dev_addr;
428 ccm_n.dest_addr.data[0] = wusb_dev->addr; 432 ccm_n.dest_addr.data[0] = wusb_dev->addr;
@@ -469,7 +473,7 @@ int wusb_dev_4way_handshake(struct wusbhc *wusbhc, struct wusb_dev *wusb_dev,
469 usb_dev, usb_sndctrlpipe(usb_dev, 0), 473 usb_dev, usb_sndctrlpipe(usb_dev, 0),
470 USB_REQ_SET_HANDSHAKE, 474 USB_REQ_SET_HANDSHAKE,
471 USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE, 475 USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE,
472 3, 0, &hs[2], sizeof(hs[2]), 1000 /* FIXME: arbitrary */); 476 3, 0, &hs[2], sizeof(hs[2]), USB_CTRL_SET_TIMEOUT);
473 if (result < 0) { 477 if (result < 0) {
474 dev_err(dev, "Handshake3: request failed: %d\n", result); 478 dev_err(dev, "Handshake3: request failed: %d\n", result);
475 goto error_hs3; 479 goto error_hs3;
@@ -553,11 +557,13 @@ static void wusbhc_gtk_rekey_work(struct work_struct *work)
553 list_for_each_entry_safe(wusb_dev, wusb_dev_next, &rekey_list, 557 list_for_each_entry_safe(wusb_dev, wusb_dev_next, &rekey_list,
554 rekey_node) { 558 rekey_node) {
555 list_del_init(&wusb_dev->rekey_node); 559 list_del_init(&wusb_dev->rekey_node);
556 dev_dbg(&wusb_dev->usb_dev->dev, "%s: rekey device at port %d\n", 560 dev_dbg(&wusb_dev->usb_dev->dev,
561 "%s: rekey device at port %d\n",
557 __func__, wusb_dev->port_idx); 562 __func__, wusb_dev->port_idx);
558 563
559 if (wusb_dev_set_gtk(wusbhc, wusb_dev) < 0) { 564 if (wusb_dev_set_gtk(wusbhc, wusb_dev) < 0) {
560 dev_err(&wusb_dev->usb_dev->dev, "%s: rekey device at port %d failed\n", 565 dev_err(&wusb_dev->usb_dev->dev,
566 "%s: rekey device at port %d failed\n",
561 __func__, wusb_dev->port_idx); 567 __func__, wusb_dev->port_idx);
562 } 568 }
563 wusb_dev_put(wusb_dev); 569 wusb_dev_put(wusb_dev);
diff --git a/drivers/usb/wusbcore/wa-hc.h b/drivers/usb/wusbcore/wa-hc.h
index e614f02f0cf2..a2ef84b8397e 100644
--- a/drivers/usb/wusbcore/wa-hc.h
+++ b/drivers/usb/wusbcore/wa-hc.h
@@ -36,7 +36,7 @@
36 * 36 *
37 * hcd glue with the USB API Host Controller Interface API. 37 * hcd glue with the USB API Host Controller Interface API.
38 * 38 *
39 * nep Notification EndPoint managent: collect notifications 39 * nep Notification EndPoint management: collect notifications
40 * and queue them with the workqueue daemon. 40 * and queue them with the workqueue daemon.
41 * 41 *
42 * Handle notifications as coming from the NEP. Sends them 42 * Handle notifications as coming from the NEP. Sends them
@@ -144,7 +144,7 @@ enum wa_quirks {
144 * 144 *
145 * @wa_descr Can be accessed without locking because it is in 145 * @wa_descr Can be accessed without locking because it is in
146 * the same area where the device descriptors were 146 * the same area where the device descriptors were
147 * read, so it is guaranteed to exist umodified while 147 * read, so it is guaranteed to exist unmodified while
148 * the device exists. 148 * the device exists.
149 * 149 *
150 * Endianess has been converted to CPU's. 150 * Endianess has been converted to CPU's.
@@ -167,8 +167,8 @@ enum wa_quirks {
167 * submitted from an atomic context). 167 * submitted from an atomic context).
168 * 168 *
169 * FIXME: this needs to be layered up: a wusbhc layer (for sharing 169 * FIXME: this needs to be layered up: a wusbhc layer (for sharing
170 * comonalities with WHCI), a wa layer (for sharing 170 * commonalities with WHCI), a wa layer (for sharing
171 * comonalities with DWA-RC). 171 * commonalities with DWA-RC).
172 */ 172 */
173struct wahc { 173struct wahc {
174 struct usb_device *usb_dev; 174 struct usb_device *usb_dev;
@@ -197,10 +197,10 @@ struct wahc {
197 struct mutex rpipe_mutex; /* assigning resources to endpoints */ 197 struct mutex rpipe_mutex; /* assigning resources to endpoints */
198 198
199 /* 199 /*
200 * dti_state is used to track the state of the dti_urb. When dti_state 200 * dti_state is used to track the state of the dti_urb. When dti_state
201 * is WA_DTI_ISOC_PACKET_STATUS_PENDING, dti_isoc_xfer_in_progress and 201 * is WA_DTI_ISOC_PACKET_STATUS_PENDING, dti_isoc_xfer_in_progress and
202 * dti_isoc_xfer_seg identify which xfer the incoming isoc packet status 202 * dti_isoc_xfer_seg identify which xfer the incoming isoc packet
203 * refers to. 203 * status refers to.
204 */ 204 */
205 enum wa_dti_state dti_state; 205 enum wa_dti_state dti_state;
206 u32 dti_isoc_xfer_in_progress; 206 u32 dti_isoc_xfer_in_progress;
@@ -211,7 +211,7 @@ struct wahc {
211 void *dti_buf; 211 void *dti_buf;
212 size_t dti_buf_size; 212 size_t dti_buf_size;
213 213
214 unsigned long dto_in_use; /* protect dto endoint serialization. */ 214 unsigned long dto_in_use; /* protect dto endoint serialization */
215 215
216 s32 status; /* For reading status */ 216 s32 status; /* For reading status */
217 217
@@ -332,7 +332,7 @@ static inline int rpipe_avail_inc(struct wa_rpipe *rpipe)
332/* Transferring data */ 332/* Transferring data */
333extern int wa_urb_enqueue(struct wahc *, struct usb_host_endpoint *, 333extern int wa_urb_enqueue(struct wahc *, struct usb_host_endpoint *,
334 struct urb *, gfp_t); 334 struct urb *, gfp_t);
335extern int wa_urb_dequeue(struct wahc *, struct urb *); 335extern int wa_urb_dequeue(struct wahc *, struct urb *, int);
336extern void wa_handle_notif_xfer(struct wahc *, struct wa_notif_hdr *); 336extern void wa_handle_notif_xfer(struct wahc *, struct wa_notif_hdr *);
337 337
338 338
@@ -345,7 +345,7 @@ extern void wa_handle_notif_xfer(struct wahc *, struct wa_notif_hdr *);
345 * it...no RC specific function is called...unless I miss 345 * it...no RC specific function is called...unless I miss
346 * something. 346 * something.
347 * 347 *
348 * FIXME: has to go away in favour of an 'struct' hcd based sollution 348 * FIXME: has to go away in favour of a 'struct' hcd based solution
349 */ 349 */
350static inline struct wahc *wa_get(struct wahc *wa) 350static inline struct wahc *wa_get(struct wahc *wa)
351{ 351{
@@ -366,7 +366,7 @@ static inline int __wa_feature(struct wahc *wa, unsigned op, u16 feature)
366 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 366 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
367 feature, 367 feature,
368 wa->usb_iface->cur_altsetting->desc.bInterfaceNumber, 368 wa->usb_iface->cur_altsetting->desc.bInterfaceNumber,
369 NULL, 0, 1000 /* FIXME: arbitrary */); 369 NULL, 0, USB_CTRL_SET_TIMEOUT);
370} 370}
371 371
372 372
@@ -400,8 +400,7 @@ s32 __wa_get_status(struct wahc *wa)
400 USB_REQ_GET_STATUS, 400 USB_REQ_GET_STATUS,
401 USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 401 USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
402 0, wa->usb_iface->cur_altsetting->desc.bInterfaceNumber, 402 0, wa->usb_iface->cur_altsetting->desc.bInterfaceNumber,
403 &wa->status, sizeof(wa->status), 403 &wa->status, sizeof(wa->status), USB_CTRL_GET_TIMEOUT);
404 1000 /* FIXME: arbitrary */);
405 if (result >= 0) 404 if (result >= 0)
406 result = wa->status; 405 result = wa->status;
407 return result; 406 return result;
diff --git a/drivers/usb/wusbcore/wa-nep.c b/drivers/usb/wusbcore/wa-nep.c
index ada4e0870623..60a10d21947d 100644
--- a/drivers/usb/wusbcore/wa-nep.c
+++ b/drivers/usb/wusbcore/wa-nep.c
@@ -69,8 +69,8 @@ struct wa_notif_work {
69 * [the wuswad daemon, basically] 69 * [the wuswad daemon, basically]
70 * 70 *
71 * @_nw: Pointer to a descriptor which has the pointer to the 71 * @_nw: Pointer to a descriptor which has the pointer to the
72 * @wa, the size of the buffer and the work queue 72 * @wa, the size of the buffer and the work queue
73 * structure (so we can free all when done). 73 * structure (so we can free all when done).
74 * @returns 0 if ok, < 0 errno code on error. 74 * @returns 0 if ok, < 0 errno code on error.
75 * 75 *
76 * All notifications follow the same format; they need to start with a 76 * All notifications follow the same format; they need to start with a
@@ -93,7 +93,8 @@ static void wa_notif_dispatch(struct work_struct *ws)
93{ 93{
94 void *itr; 94 void *itr;
95 u8 missing = 0; 95 u8 missing = 0;
96 struct wa_notif_work *nw = container_of(ws, struct wa_notif_work, work); 96 struct wa_notif_work *nw = container_of(ws, struct wa_notif_work,
97 work);
97 struct wahc *wa = nw->wa; 98 struct wahc *wa = nw->wa;
98 struct wa_notif_hdr *notif_hdr; 99 struct wa_notif_hdr *notif_hdr;
99 size_t size; 100 size_t size;
@@ -271,7 +272,8 @@ int wa_nep_create(struct wahc *wa, struct usb_interface *iface)
271 wa->nep_buffer_size = 1024; 272 wa->nep_buffer_size = 1024;
272 wa->nep_buffer = kmalloc(wa->nep_buffer_size, GFP_KERNEL); 273 wa->nep_buffer = kmalloc(wa->nep_buffer_size, GFP_KERNEL);
273 if (wa->nep_buffer == NULL) { 274 if (wa->nep_buffer == NULL) {
274 dev_err(dev, "Unable to allocate notification's read buffer\n"); 275 dev_err(dev,
276 "Unable to allocate notification's read buffer\n");
275 goto error_nep_buffer; 277 goto error_nep_buffer;
276 } 278 }
277 wa->nep_urb = usb_alloc_urb(0, GFP_KERNEL); 279 wa->nep_urb = usb_alloc_urb(0, GFP_KERNEL);
diff --git a/drivers/usb/wusbcore/wa-rpipe.c b/drivers/usb/wusbcore/wa-rpipe.c
index b48e74cc54d7..6ca80a4efc1b 100644
--- a/drivers/usb/wusbcore/wa-rpipe.c
+++ b/drivers/usb/wusbcore/wa-rpipe.c
@@ -57,7 +57,6 @@
57 * urb->dev->devnum, to make sure that we always have the right 57 * urb->dev->devnum, to make sure that we always have the right
58 * destination address. 58 * destination address.
59 */ 59 */
60#include <linux/init.h>
61#include <linux/atomic.h> 60#include <linux/atomic.h>
62#include <linux/bitmap.h> 61#include <linux/bitmap.h>
63#include <linux/slab.h> 62#include <linux/slab.h>
@@ -80,7 +79,7 @@ static int __rpipe_get_descr(struct wahc *wa,
80 USB_REQ_GET_DESCRIPTOR, 79 USB_REQ_GET_DESCRIPTOR,
81 USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_RPIPE, 80 USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_RPIPE,
82 USB_DT_RPIPE<<8, index, descr, sizeof(*descr), 81 USB_DT_RPIPE<<8, index, descr, sizeof(*descr),
83 1000 /* FIXME: arbitrary */); 82 USB_CTRL_GET_TIMEOUT);
84 if (result < 0) { 83 if (result < 0) {
85 dev_err(dev, "rpipe %u: get descriptor failed: %d\n", 84 dev_err(dev, "rpipe %u: get descriptor failed: %d\n",
86 index, (int)result); 85 index, (int)result);
@@ -118,7 +117,7 @@ static int __rpipe_set_descr(struct wahc *wa,
118 USB_REQ_SET_DESCRIPTOR, 117 USB_REQ_SET_DESCRIPTOR,
119 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_RPIPE, 118 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_RPIPE,
120 USB_DT_RPIPE<<8, index, descr, sizeof(*descr), 119 USB_DT_RPIPE<<8, index, descr, sizeof(*descr),
121 HZ / 10); 120 USB_CTRL_SET_TIMEOUT);
122 if (result < 0) { 121 if (result < 0) {
123 dev_err(dev, "rpipe %u: set descriptor failed: %d\n", 122 dev_err(dev, "rpipe %u: set descriptor failed: %d\n",
124 index, (int)result); 123 index, (int)result);
@@ -184,7 +183,7 @@ EXPORT_SYMBOL_GPL(rpipe_destroy);
184/* 183/*
185 * Locate an idle rpipe, create an structure for it and return it 184 * Locate an idle rpipe, create an structure for it and return it
186 * 185 *
187 * @wa is referenced and unlocked 186 * @wa is referenced and unlocked
188 * @crs enum rpipe_attr, required endpoint characteristics 187 * @crs enum rpipe_attr, required endpoint characteristics
189 * 188 *
190 * The rpipe can be used only sequentially (not in parallel). 189 * The rpipe can be used only sequentially (not in parallel).
@@ -237,7 +236,7 @@ static int __rpipe_reset(struct wahc *wa, unsigned index)
237 wa->usb_dev, usb_sndctrlpipe(wa->usb_dev, 0), 236 wa->usb_dev, usb_sndctrlpipe(wa->usb_dev, 0),
238 USB_REQ_RPIPE_RESET, 237 USB_REQ_RPIPE_RESET,
239 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_RPIPE, 238 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_RPIPE,
240 0, index, NULL, 0, 1000 /* FIXME: arbitrary */); 239 0, index, NULL, 0, USB_CTRL_SET_TIMEOUT);
241 if (result < 0) 240 if (result < 0)
242 dev_err(dev, "rpipe %u: reset failed: %d\n", 241 dev_err(dev, "rpipe %u: reset failed: %d\n",
243 index, result); 242 index, result);
@@ -308,7 +307,7 @@ out:
308/* 307/*
309 * Aim an rpipe to its device & endpoint destination 308 * Aim an rpipe to its device & endpoint destination
310 * 309 *
311 * Make sure we change the address to unauthenticathed if the device 310 * Make sure we change the address to unauthenticated if the device
312 * is WUSB and it is not authenticated. 311 * is WUSB and it is not authenticated.
313 */ 312 */
314static int rpipe_aim(struct wa_rpipe *rpipe, struct wahc *wa, 313static int rpipe_aim(struct wa_rpipe *rpipe, struct wahc *wa,
@@ -329,7 +328,8 @@ static int rpipe_aim(struct wa_rpipe *rpipe, struct wahc *wa,
329 } 328 }
330 unauth = usb_dev->wusb && !usb_dev->authenticated ? 0x80 : 0; 329 unauth = usb_dev->wusb && !usb_dev->authenticated ? 0x80 : 0;
331 __rpipe_reset(wa, le16_to_cpu(rpipe->descr.wRPipeIndex)); 330 __rpipe_reset(wa, le16_to_cpu(rpipe->descr.wRPipeIndex));
332 atomic_set(&rpipe->segs_available, le16_to_cpu(rpipe->descr.wRequests)); 331 atomic_set(&rpipe->segs_available,
332 le16_to_cpu(rpipe->descr.wRequests));
333 /* FIXME: block allocation system; request with queuing and timeout */ 333 /* FIXME: block allocation system; request with queuing and timeout */
334 /* FIXME: compute so seg_size > ep->maxpktsize */ 334 /* FIXME: compute so seg_size > ep->maxpktsize */
335 rpipe->descr.wBlocks = cpu_to_le16(16); /* given */ 335 rpipe->descr.wBlocks = cpu_to_le16(16); /* given */
@@ -527,7 +527,7 @@ void rpipe_ep_disable(struct wahc *wa, struct usb_host_endpoint *ep)
527 wa->usb_dev, usb_rcvctrlpipe(wa->usb_dev, 0), 527 wa->usb_dev, usb_rcvctrlpipe(wa->usb_dev, 0),
528 USB_REQ_RPIPE_ABORT, 528 USB_REQ_RPIPE_ABORT,
529 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_RPIPE, 529 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_RPIPE,
530 0, index, NULL, 0, 1000 /* FIXME: arbitrary */); 530 0, index, NULL, 0, USB_CTRL_SET_TIMEOUT);
531 rpipe_put(rpipe); 531 rpipe_put(rpipe);
532 } 532 }
533 mutex_unlock(&wa->rpipe_mutex); 533 mutex_unlock(&wa->rpipe_mutex);
@@ -548,9 +548,8 @@ void rpipe_clear_feature_stalled(struct wahc *wa, struct usb_host_endpoint *ep)
548 wa->usb_dev, usb_rcvctrlpipe(wa->usb_dev, 0), 548 wa->usb_dev, usb_rcvctrlpipe(wa->usb_dev, 0),
549 USB_REQ_CLEAR_FEATURE, 549 USB_REQ_CLEAR_FEATURE,
550 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_RPIPE, 550 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_RPIPE,
551 RPIPE_STALL, index, NULL, 0, 1000); 551 RPIPE_STALL, index, NULL, 0, USB_CTRL_SET_TIMEOUT);
552 } 552 }
553 mutex_unlock(&wa->rpipe_mutex); 553 mutex_unlock(&wa->rpipe_mutex);
554} 554}
555EXPORT_SYMBOL_GPL(rpipe_clear_feature_stalled); 555EXPORT_SYMBOL_GPL(rpipe_clear_feature_stalled);
556
diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c
index ed5abe87b049..3cd96e936d77 100644
--- a/drivers/usb/wusbcore/wa-xfer.c
+++ b/drivers/usb/wusbcore/wa-xfer.c
@@ -79,7 +79,6 @@
79 * availability of the different required components (blocks, 79 * availability of the different required components (blocks,
80 * rpipes, segment slots, etc), we go scheduling them. Painful. 80 * rpipes, segment slots, etc), we go scheduling them. Painful.
81 */ 81 */
82#include <linux/init.h>
83#include <linux/spinlock.h> 82#include <linux/spinlock.h>
84#include <linux/slab.h> 83#include <linux/slab.h>
85#include <linux/hash.h> 84#include <linux/hash.h>
@@ -124,6 +123,8 @@ struct wa_seg {
124 u8 index; /* which segment we are */ 123 u8 index; /* which segment we are */
125 int isoc_frame_count; /* number of isoc frames in this segment. */ 124 int isoc_frame_count; /* number of isoc frames in this segment. */
126 int isoc_frame_offset; /* starting frame offset in the xfer URB. */ 125 int isoc_frame_offset; /* starting frame offset in the xfer URB. */
126 /* Isoc frame that the current transfer buffer corresponds to. */
127 int isoc_frame_index;
127 int isoc_size; /* size of all isoc frames sent by this seg. */ 128 int isoc_size; /* size of all isoc frames sent by this seg. */
128 enum wa_seg_status status; 129 enum wa_seg_status status;
129 ssize_t result; /* bytes xfered or error */ 130 ssize_t result; /* bytes xfered or error */
@@ -158,8 +159,6 @@ struct wa_xfer {
158 unsigned is_dma:1; 159 unsigned is_dma:1;
159 size_t seg_size; 160 size_t seg_size;
160 int result; 161 int result;
161 /* Isoc frame that the current transfer buffer corresponds to. */
162 int dto_isoc_frame_index;
163 162
164 gfp_t gfp; /* allocation mask */ 163 gfp_t gfp; /* allocation mask */
165 164
@@ -282,6 +281,7 @@ static void wa_xfer_giveback(struct wa_xfer *xfer)
282 281
283 spin_lock_irqsave(&xfer->wa->xfer_list_lock, flags); 282 spin_lock_irqsave(&xfer->wa->xfer_list_lock, flags);
284 list_del_init(&xfer->list_node); 283 list_del_init(&xfer->list_node);
284 usb_hcd_unlink_urb_from_ep(&(xfer->wa->wusb->usb_hcd), xfer->urb);
285 spin_unlock_irqrestore(&xfer->wa->xfer_list_lock, flags); 285 spin_unlock_irqrestore(&xfer->wa->xfer_list_lock, flags);
286 /* FIXME: segmentation broken -- kills DWA */ 286 /* FIXME: segmentation broken -- kills DWA */
287 wusbhc_giveback_urb(xfer->wa->wusb, xfer->urb, xfer->result); 287 wusbhc_giveback_urb(xfer->wa->wusb, xfer->urb, xfer->result);
@@ -372,10 +372,10 @@ static unsigned __wa_xfer_is_done(struct wa_xfer *xfer)
372 seg->result); 372 seg->result);
373 goto out; 373 goto out;
374 case WA_SEG_ABORTED: 374 case WA_SEG_ABORTED:
375 dev_dbg(dev, "xfer %p ID %08X#%u ABORTED: result %d\n", 375 xfer->result = seg->result;
376 xfer, wa_xfer_id(xfer), seg->index, 376 dev_dbg(dev, "xfer %p ID %08X#%u: ABORTED result %zu(0x%08zX)\n",
377 urb->status); 377 xfer, wa_xfer_id(xfer), seg->index, seg->result,
378 xfer->result = urb->status; 378 seg->result);
379 goto out; 379 goto out;
380 default: 380 default:
381 dev_warn(dev, "xfer %p ID %08X#%u: is_done bad state %d\n", 381 dev_warn(dev, "xfer %p ID %08X#%u: is_done bad state %d\n",
@@ -487,13 +487,14 @@ static int __wa_seg_calculate_isoc_frame_count(struct wa_xfer *xfer,
487 && ((segment_size + iso_frame_desc[index].length) 487 && ((segment_size + iso_frame_desc[index].length)
488 <= xfer->seg_size)) { 488 <= xfer->seg_size)) {
489 /* 489 /*
490 * For Alereon HWA devices, only include an isoc frame in a 490 * For Alereon HWA devices, only include an isoc frame in an
491 * segment if it is physically contiguous with the previous 491 * out segment if it is physically contiguous with the previous
492 * frame. This is required because those devices expect 492 * frame. This is required because those devices expect
493 * the isoc frames to be sent as a single USB transaction as 493 * the isoc frames to be sent as a single USB transaction as
494 * opposed to one transaction per frame with standard HWA. 494 * opposed to one transaction per frame with standard HWA.
495 */ 495 */
496 if ((xfer->wa->quirks & WUSB_QUIRK_ALEREON_HWA_CONCAT_ISOC) 496 if ((xfer->wa->quirks & WUSB_QUIRK_ALEREON_HWA_CONCAT_ISOC)
497 && (xfer->is_inbound == 0)
497 && (index > isoc_frame_offset) 498 && (index > isoc_frame_offset)
498 && ((iso_frame_desc[index - 1].offset + 499 && ((iso_frame_desc[index - 1].offset +
499 iso_frame_desc[index - 1].length) != 500 iso_frame_desc[index - 1].length) !=
@@ -536,14 +537,8 @@ static ssize_t __wa_xfer_setup_sizes(struct wa_xfer *xfer,
536 result = sizeof(struct wa_xfer_bi); 537 result = sizeof(struct wa_xfer_bi);
537 break; 538 break;
538 case USB_ENDPOINT_XFER_ISOC: 539 case USB_ENDPOINT_XFER_ISOC:
539 if (usb_pipeout(urb->pipe)) { 540 *pxfer_type = WA_XFER_TYPE_ISO;
540 *pxfer_type = WA_XFER_TYPE_ISO; 541 result = sizeof(struct wa_xfer_hwaiso);
541 result = sizeof(struct wa_xfer_hwaiso);
542 } else {
543 dev_err(dev, "FIXME: ISOC IN not implemented\n");
544 result = -ENOSYS;
545 goto error;
546 }
547 break; 542 break;
548 default: 543 default:
549 /* never happens */ 544 /* never happens */
@@ -554,10 +549,22 @@ static ssize_t __wa_xfer_setup_sizes(struct wa_xfer *xfer,
554 xfer->is_dma = urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP ? 1 : 0; 549 xfer->is_dma = urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP ? 1 : 0;
555 550
556 maxpktsize = le16_to_cpu(rpipe->descr.wMaxPacketSize); 551 maxpktsize = le16_to_cpu(rpipe->descr.wMaxPacketSize);
552 xfer->seg_size = le16_to_cpu(rpipe->descr.wBlocks)
553 * 1 << (xfer->wa->wa_descr->bRPipeBlockSize - 1);
554 /* Compute the segment size and make sure it is a multiple of
555 * the maxpktsize (WUSB1.0[8.3.3.1])...not really too much of
556 * a check (FIXME) */
557 if (xfer->seg_size < maxpktsize) {
558 dev_err(dev,
559 "HW BUG? seg_size %zu smaller than maxpktsize %zu\n",
560 xfer->seg_size, maxpktsize);
561 result = -EINVAL;
562 goto error;
563 }
564 xfer->seg_size = (xfer->seg_size / maxpktsize) * maxpktsize;
557 if ((rpipe->descr.bmAttribute & 0x3) == USB_ENDPOINT_XFER_ISOC) { 565 if ((rpipe->descr.bmAttribute & 0x3) == USB_ENDPOINT_XFER_ISOC) {
558 int index = 0; 566 int index = 0;
559 567
560 xfer->seg_size = maxpktsize;
561 xfer->segs = 0; 568 xfer->segs = 0;
562 /* 569 /*
563 * loop over urb->number_of_packets to determine how many 570 * loop over urb->number_of_packets to determine how many
@@ -570,19 +577,6 @@ static ssize_t __wa_xfer_setup_sizes(struct wa_xfer *xfer,
570 ++xfer->segs; 577 ++xfer->segs;
571 } 578 }
572 } else { 579 } else {
573 xfer->seg_size = le16_to_cpu(rpipe->descr.wBlocks)
574 * 1 << (xfer->wa->wa_descr->bRPipeBlockSize - 1);
575 /* Compute the segment size and make sure it is a multiple of
576 * the maxpktsize (WUSB1.0[8.3.3.1])...not really too much of
577 * a check (FIXME) */
578 if (xfer->seg_size < maxpktsize) {
579 dev_err(dev,
580 "HW BUG? seg_size %zu smaller than maxpktsize %zu\n",
581 xfer->seg_size, maxpktsize);
582 result = -EINVAL;
583 goto error;
584 }
585 xfer->seg_size = (xfer->seg_size / maxpktsize) * maxpktsize;
586 xfer->segs = DIV_ROUND_UP(urb->transfer_buffer_length, 580 xfer->segs = DIV_ROUND_UP(urb->transfer_buffer_length,
587 xfer->seg_size); 581 xfer->seg_size);
588 if (xfer->segs == 0 && *pxfer_type == WA_XFER_TYPE_CTL) 582 if (xfer->segs == 0 && *pxfer_type == WA_XFER_TYPE_CTL)
@@ -700,23 +694,23 @@ static void wa_seg_dto_cb(struct urb *urb)
700 if (usb_pipeisoc(xfer->urb->pipe)) { 694 if (usb_pipeisoc(xfer->urb->pipe)) {
701 /* Alereon HWA sends all isoc frames in a single transfer. */ 695 /* Alereon HWA sends all isoc frames in a single transfer. */
702 if (wa->quirks & WUSB_QUIRK_ALEREON_HWA_CONCAT_ISOC) 696 if (wa->quirks & WUSB_QUIRK_ALEREON_HWA_CONCAT_ISOC)
703 xfer->dto_isoc_frame_index += seg->isoc_frame_count; 697 seg->isoc_frame_index += seg->isoc_frame_count;
704 else 698 else
705 xfer->dto_isoc_frame_index += 1; 699 seg->isoc_frame_index += 1;
706 if (xfer->dto_isoc_frame_index < seg->isoc_frame_count) { 700 if (seg->isoc_frame_index < seg->isoc_frame_count) {
707 data_send_done = 0; 701 data_send_done = 0;
708 holding_dto = 1; /* checked in error cases. */ 702 holding_dto = 1; /* checked in error cases. */
709 /* 703 /*
710 * if this is the last isoc frame of the segment, we 704 * if this is the last isoc frame of the segment, we
711 * can release DTO after sending this frame. 705 * can release DTO after sending this frame.
712 */ 706 */
713 if ((xfer->dto_isoc_frame_index + 1) >= 707 if ((seg->isoc_frame_index + 1) >=
714 seg->isoc_frame_count) 708 seg->isoc_frame_count)
715 release_dto = 1; 709 release_dto = 1;
716 } 710 }
717 dev_dbg(dev, "xfer 0x%08X#%u: isoc frame = %d, holding_dto = %d, release_dto = %d.\n", 711 dev_dbg(dev, "xfer 0x%08X#%u: isoc frame = %d, holding_dto = %d, release_dto = %d.\n",
718 wa_xfer_id(xfer), seg->index, 712 wa_xfer_id(xfer), seg->index, seg->isoc_frame_index,
719 xfer->dto_isoc_frame_index, holding_dto, release_dto); 713 holding_dto, release_dto);
720 } 714 }
721 spin_unlock_irqrestore(&xfer->lock, flags); 715 spin_unlock_irqrestore(&xfer->lock, flags);
722 716
@@ -736,8 +730,7 @@ static void wa_seg_dto_cb(struct urb *urb)
736 * send the URB and release DTO if we no longer need it. 730 * send the URB and release DTO if we no longer need it.
737 */ 731 */
738 __wa_populate_dto_urb_isoc(xfer, seg, 732 __wa_populate_dto_urb_isoc(xfer, seg,
739 seg->isoc_frame_offset + 733 seg->isoc_frame_offset + seg->isoc_frame_index);
740 xfer->dto_isoc_frame_index);
741 734
742 /* resubmit the URB with the next isoc frame. */ 735 /* resubmit the URB with the next isoc frame. */
743 result = usb_submit_urb(seg->dto_urb, GFP_ATOMIC); 736 result = usb_submit_urb(seg->dto_urb, GFP_ATOMIC);
@@ -844,7 +837,7 @@ static void wa_seg_iso_pack_desc_cb(struct urb *urb)
844 wa_xfer_id(xfer), seg->index, urb->status); 837 wa_xfer_id(xfer), seg->index, urb->status);
845 if (edc_inc(&wa->nep_edc, EDC_MAX_ERRORS, 838 if (edc_inc(&wa->nep_edc, EDC_MAX_ERRORS,
846 EDC_ERROR_TIMEFRAME)){ 839 EDC_ERROR_TIMEFRAME)){
847 dev_err(dev, "DTO: URB max acceptable errors exceeded, resetting device\n"); 840 dev_err(dev, "iso xfer: URB max acceptable errors exceeded, resetting device\n");
848 wa_reset_all(wa); 841 wa_reset_all(wa);
849 } 842 }
850 if (seg->status != WA_SEG_ERROR) { 843 if (seg->status != WA_SEG_ERROR) {
@@ -1108,7 +1101,7 @@ static int __wa_xfer_setup_segs(struct wa_xfer *xfer, size_t xfer_hdr_size)
1108 const struct usb_endpoint_descriptor *dto_epd = xfer->wa->dto_epd; 1101 const struct usb_endpoint_descriptor *dto_epd = xfer->wa->dto_epd;
1109 struct wa_seg *seg; 1102 struct wa_seg *seg;
1110 size_t buf_itr, buf_size, buf_itr_size; 1103 size_t buf_itr, buf_size, buf_itr_size;
1111 int xfer_isoc_frame_offset = 0; 1104 int isoc_frame_offset = 0;
1112 1105
1113 result = -ENOMEM; 1106 result = -ENOMEM;
1114 xfer->seg = kcalloc(xfer->segs, sizeof(xfer->seg[0]), GFP_ATOMIC); 1107 xfer->seg = kcalloc(xfer->segs, sizeof(xfer->seg[0]), GFP_ATOMIC);
@@ -1121,10 +1114,14 @@ static int __wa_xfer_setup_segs(struct wa_xfer *xfer, size_t xfer_hdr_size)
1121 size_t iso_pkt_descr_size = 0; 1114 size_t iso_pkt_descr_size = 0;
1122 int seg_isoc_frame_count = 0, seg_isoc_size = 0; 1115 int seg_isoc_frame_count = 0, seg_isoc_size = 0;
1123 1116
1117 /*
1118 * Adjust the size of the segment object to contain space for
1119 * the isoc packet descriptor buffer.
1120 */
1124 if (usb_pipeisoc(xfer->urb->pipe)) { 1121 if (usb_pipeisoc(xfer->urb->pipe)) {
1125 seg_isoc_frame_count = 1122 seg_isoc_frame_count =
1126 __wa_seg_calculate_isoc_frame_count(xfer, 1123 __wa_seg_calculate_isoc_frame_count(xfer,
1127 xfer_isoc_frame_offset, &seg_isoc_size); 1124 isoc_frame_offset, &seg_isoc_size);
1128 1125
1129 iso_pkt_descr_size = 1126 iso_pkt_descr_size =
1130 sizeof(struct wa_xfer_packet_info_hwaiso) + 1127 sizeof(struct wa_xfer_packet_info_hwaiso) +
@@ -1137,15 +1134,40 @@ static int __wa_xfer_setup_segs(struct wa_xfer *xfer, size_t xfer_hdr_size)
1137 wa_seg_init(seg); 1134 wa_seg_init(seg);
1138 seg->xfer = xfer; 1135 seg->xfer = xfer;
1139 seg->index = cnt; 1136 seg->index = cnt;
1140 seg->isoc_frame_count = seg_isoc_frame_count;
1141 seg->isoc_frame_offset = xfer_isoc_frame_offset;
1142 seg->isoc_size = seg_isoc_size;
1143 usb_fill_bulk_urb(&seg->tr_urb, usb_dev, 1137 usb_fill_bulk_urb(&seg->tr_urb, usb_dev,
1144 usb_sndbulkpipe(usb_dev, 1138 usb_sndbulkpipe(usb_dev,
1145 dto_epd->bEndpointAddress), 1139 dto_epd->bEndpointAddress),
1146 &seg->xfer_hdr, xfer_hdr_size, 1140 &seg->xfer_hdr, xfer_hdr_size,
1147 wa_seg_tr_cb, seg); 1141 wa_seg_tr_cb, seg);
1148 buf_itr_size = min(buf_size, xfer->seg_size); 1142 buf_itr_size = min(buf_size, xfer->seg_size);
1143
1144 if (usb_pipeisoc(xfer->urb->pipe)) {
1145 seg->isoc_frame_count = seg_isoc_frame_count;
1146 seg->isoc_frame_offset = isoc_frame_offset;
1147 seg->isoc_size = seg_isoc_size;
1148 /* iso packet descriptor. */
1149 seg->isoc_pack_desc_urb =
1150 usb_alloc_urb(0, GFP_ATOMIC);
1151 if (seg->isoc_pack_desc_urb == NULL)
1152 goto error_iso_pack_desc_alloc;
1153 /*
1154 * The buffer for the isoc packet descriptor starts
1155 * after the transfer request header in the
1156 * segment object memory buffer.
1157 */
1158 usb_fill_bulk_urb(
1159 seg->isoc_pack_desc_urb, usb_dev,
1160 usb_sndbulkpipe(usb_dev,
1161 dto_epd->bEndpointAddress),
1162 (void *)(&seg->xfer_hdr) +
1163 xfer_hdr_size,
1164 iso_pkt_descr_size,
1165 wa_seg_iso_pack_desc_cb, seg);
1166
1167 /* adjust starting frame offset for next seg. */
1168 isoc_frame_offset += seg_isoc_frame_count;
1169 }
1170
1149 if (xfer->is_inbound == 0 && buf_size > 0) { 1171 if (xfer->is_inbound == 0 && buf_size > 0) {
1150 /* outbound data. */ 1172 /* outbound data. */
1151 seg->dto_urb = usb_alloc_urb(0, GFP_ATOMIC); 1173 seg->dto_urb = usb_alloc_urb(0, GFP_ATOMIC);
@@ -1158,25 +1180,6 @@ static int __wa_xfer_setup_segs(struct wa_xfer *xfer, size_t xfer_hdr_size)
1158 NULL, 0, wa_seg_dto_cb, seg); 1180 NULL, 0, wa_seg_dto_cb, seg);
1159 1181
1160 if (usb_pipeisoc(xfer->urb->pipe)) { 1182 if (usb_pipeisoc(xfer->urb->pipe)) {
1161 /* iso packet descriptor. */
1162 seg->isoc_pack_desc_urb =
1163 usb_alloc_urb(0, GFP_ATOMIC);
1164 if (seg->isoc_pack_desc_urb == NULL)
1165 goto error_iso_pack_desc_alloc;
1166 /*
1167 * The buffer for the isoc packet descriptor
1168 * after the transfer request header in the
1169 * segment object memory buffer.
1170 */
1171 usb_fill_bulk_urb(
1172 seg->isoc_pack_desc_urb, usb_dev,
1173 usb_sndbulkpipe(usb_dev,
1174 dto_epd->bEndpointAddress),
1175 (void *)(&seg->xfer_hdr) +
1176 xfer_hdr_size,
1177 iso_pkt_descr_size,
1178 wa_seg_iso_pack_desc_cb, seg);
1179
1180 /* 1183 /*
1181 * Fill in the xfer buffer information for the 1184 * Fill in the xfer buffer information for the
1182 * first isoc frame. Subsequent frames in this 1185 * first isoc frame. Subsequent frames in this
@@ -1184,9 +1187,7 @@ static int __wa_xfer_setup_segs(struct wa_xfer *xfer, size_t xfer_hdr_size)
1184 * DTO completion routine, if needed. 1187 * DTO completion routine, if needed.
1185 */ 1188 */
1186 __wa_populate_dto_urb_isoc(xfer, seg, 1189 __wa_populate_dto_urb_isoc(xfer, seg,
1187 xfer_isoc_frame_offset); 1190 seg->isoc_frame_offset);
1188 /* adjust starting frame offset for next seg. */
1189 xfer_isoc_frame_offset += seg_isoc_frame_count;
1190 } else { 1191 } else {
1191 /* fill in the xfer buffer information. */ 1192 /* fill in the xfer buffer information. */
1192 result = __wa_populate_dto_urb(xfer, seg, 1193 result = __wa_populate_dto_urb(xfer, seg,
@@ -1207,10 +1208,11 @@ static int __wa_xfer_setup_segs(struct wa_xfer *xfer, size_t xfer_hdr_size)
1207 * Use the fact that cnt is left at were it failed. The remaining 1208 * Use the fact that cnt is left at were it failed. The remaining
1208 * segments will be cleaned up by wa_xfer_destroy. 1209 * segments will be cleaned up by wa_xfer_destroy.
1209 */ 1210 */
1210error_iso_pack_desc_alloc:
1211error_seg_outbound_populate: 1211error_seg_outbound_populate:
1212 usb_free_urb(xfer->seg[cnt]->dto_urb); 1212 usb_free_urb(xfer->seg[cnt]->dto_urb);
1213error_dto_alloc: 1213error_dto_alloc:
1214 usb_free_urb(xfer->seg[cnt]->isoc_pack_desc_urb);
1215error_iso_pack_desc_alloc:
1214 kfree(xfer->seg[cnt]); 1216 kfree(xfer->seg[cnt]);
1215 xfer->seg[cnt] = NULL; 1217 xfer->seg[cnt] = NULL;
1216error_seg_kmalloc: 1218error_seg_kmalloc:
@@ -1259,8 +1261,11 @@ static int __wa_xfer_setup(struct wa_xfer *xfer, struct urb *urb)
1259 for (cnt = 1; cnt < xfer->segs; cnt++) { 1261 for (cnt = 1; cnt < xfer->segs; cnt++) {
1260 struct wa_xfer_packet_info_hwaiso *packet_desc; 1262 struct wa_xfer_packet_info_hwaiso *packet_desc;
1261 struct wa_seg *seg = xfer->seg[cnt]; 1263 struct wa_seg *seg = xfer->seg[cnt];
1264 struct wa_xfer_hwaiso *xfer_iso;
1262 1265
1263 xfer_hdr = &seg->xfer_hdr; 1266 xfer_hdr = &seg->xfer_hdr;
1267 xfer_iso = container_of(xfer_hdr,
1268 struct wa_xfer_hwaiso, hdr);
1264 packet_desc = ((void *)xfer_hdr) + xfer_hdr_size; 1269 packet_desc = ((void *)xfer_hdr) + xfer_hdr_size;
1265 /* 1270 /*
1266 * Copy values from the 0th header. Segment specific 1271 * Copy values from the 0th header. Segment specific
@@ -1270,6 +1275,8 @@ static int __wa_xfer_setup(struct wa_xfer *xfer, struct urb *urb)
1270 xfer_hdr->bTransferSegment = cnt; 1275 xfer_hdr->bTransferSegment = cnt;
1271 xfer_hdr->dwTransferLength = 1276 xfer_hdr->dwTransferLength =
1272 cpu_to_le32(seg->isoc_size); 1277 cpu_to_le32(seg->isoc_size);
1278 xfer_iso->dwNumOfPackets =
1279 cpu_to_le32(seg->isoc_frame_count);
1273 __wa_setup_isoc_packet_descr(packet_desc, xfer, seg); 1280 __wa_setup_isoc_packet_descr(packet_desc, xfer, seg);
1274 seg->status = WA_SEG_READY; 1281 seg->status = WA_SEG_READY;
1275 } 1282 }
@@ -1320,32 +1327,31 @@ static int __wa_seg_submit(struct wa_rpipe *rpipe, struct wa_xfer *xfer,
1320 } 1327 }
1321 /* submit the isoc packet descriptor if present. */ 1328 /* submit the isoc packet descriptor if present. */
1322 if (seg->isoc_pack_desc_urb) { 1329 if (seg->isoc_pack_desc_urb) {
1323 struct wahc *wa = xfer->wa;
1324
1325 result = usb_submit_urb(seg->isoc_pack_desc_urb, GFP_ATOMIC); 1330 result = usb_submit_urb(seg->isoc_pack_desc_urb, GFP_ATOMIC);
1331 seg->isoc_frame_index = 0;
1326 if (result < 0) { 1332 if (result < 0) {
1327 pr_err("%s: xfer %p#%u: ISO packet descriptor submit failed: %d\n", 1333 pr_err("%s: xfer %p#%u: ISO packet descriptor submit failed: %d\n",
1328 __func__, xfer, seg->index, result); 1334 __func__, xfer, seg->index, result);
1329 goto error_iso_pack_desc_submit; 1335 goto error_iso_pack_desc_submit;
1330 } 1336 }
1331 xfer->dto_isoc_frame_index = 0;
1332 /*
1333 * If this segment contains more than one isoc frame, hold
1334 * onto the dto resource until we send all frames.
1335 * Only applies to non-Alereon devices.
1336 */
1337 if (((wa->quirks & WUSB_QUIRK_ALEREON_HWA_CONCAT_ISOC) == 0)
1338 && (seg->isoc_frame_count > 1))
1339 *dto_done = 0;
1340 } 1337 }
1341 /* submit the out data if this is an out request. */ 1338 /* submit the out data if this is an out request. */
1342 if (seg->dto_urb) { 1339 if (seg->dto_urb) {
1340 struct wahc *wa = xfer->wa;
1343 result = usb_submit_urb(seg->dto_urb, GFP_ATOMIC); 1341 result = usb_submit_urb(seg->dto_urb, GFP_ATOMIC);
1344 if (result < 0) { 1342 if (result < 0) {
1345 pr_err("%s: xfer %p#%u: DTO submit failed: %d\n", 1343 pr_err("%s: xfer %p#%u: DTO submit failed: %d\n",
1346 __func__, xfer, seg->index, result); 1344 __func__, xfer, seg->index, result);
1347 goto error_dto_submit; 1345 goto error_dto_submit;
1348 } 1346 }
1347 /*
1348 * If this segment contains more than one isoc frame, hold
1349 * onto the dto resource until we send all frames.
1350 * Only applies to non-Alereon devices.
1351 */
1352 if (((wa->quirks & WUSB_QUIRK_ALEREON_HWA_CONCAT_ISOC) == 0)
1353 && (seg->isoc_frame_count > 1))
1354 *dto_done = 0;
1349 } 1355 }
1350 seg->status = WA_SEG_SUBMITTED; 1356 seg->status = WA_SEG_SUBMITTED;
1351 rpipe_avail_dec(rpipe); 1357 rpipe_avail_dec(rpipe);
@@ -1567,7 +1573,8 @@ static int wa_urb_enqueue_b(struct wa_xfer *xfer)
1567 wusb_dev = __wusb_dev_get_by_usb_dev(wusbhc, urb->dev); 1573 wusb_dev = __wusb_dev_get_by_usb_dev(wusbhc, urb->dev);
1568 if (wusb_dev == NULL) { 1574 if (wusb_dev == NULL) {
1569 mutex_unlock(&wusbhc->mutex); 1575 mutex_unlock(&wusbhc->mutex);
1570 pr_err("%s: error wusb dev gone\n", __func__); 1576 dev_err(&(urb->dev->dev), "%s: error wusb dev gone\n",
1577 __func__);
1571 goto error_dev_gone; 1578 goto error_dev_gone;
1572 } 1579 }
1573 mutex_unlock(&wusbhc->mutex); 1580 mutex_unlock(&wusbhc->mutex);
@@ -1576,18 +1583,18 @@ static int wa_urb_enqueue_b(struct wa_xfer *xfer)
1576 xfer->wusb_dev = wusb_dev; 1583 xfer->wusb_dev = wusb_dev;
1577 result = urb->status; 1584 result = urb->status;
1578 if (urb->status != -EINPROGRESS) { 1585 if (urb->status != -EINPROGRESS) {
1579 pr_err("%s: error_dequeued\n", __func__); 1586 dev_err(&(urb->dev->dev), "%s: error_dequeued\n", __func__);
1580 goto error_dequeued; 1587 goto error_dequeued;
1581 } 1588 }
1582 1589
1583 result = __wa_xfer_setup(xfer, urb); 1590 result = __wa_xfer_setup(xfer, urb);
1584 if (result < 0) { 1591 if (result < 0) {
1585 pr_err("%s: error_xfer_setup\n", __func__); 1592 dev_err(&(urb->dev->dev), "%s: error_xfer_setup\n", __func__);
1586 goto error_xfer_setup; 1593 goto error_xfer_setup;
1587 } 1594 }
1588 result = __wa_xfer_submit(xfer); 1595 result = __wa_xfer_submit(xfer);
1589 if (result < 0) { 1596 if (result < 0) {
1590 pr_err("%s: error_xfer_submit\n", __func__); 1597 dev_err(&(urb->dev->dev), "%s: error_xfer_submit\n", __func__);
1591 goto error_xfer_submit; 1598 goto error_xfer_submit;
1592 } 1599 }
1593 spin_unlock_irqrestore(&xfer->lock, flags); 1600 spin_unlock_irqrestore(&xfer->lock, flags);
@@ -1730,6 +1737,12 @@ int wa_urb_enqueue(struct wahc *wa, struct usb_host_endpoint *ep,
1730 dump_stack(); 1737 dump_stack();
1731 } 1738 }
1732 1739
1740 spin_lock_irqsave(&wa->xfer_list_lock, my_flags);
1741 result = usb_hcd_link_urb_to_ep(&(wa->wusb->usb_hcd), urb);
1742 spin_unlock_irqrestore(&wa->xfer_list_lock, my_flags);
1743 if (result < 0)
1744 goto error_link_urb;
1745
1733 result = -ENOMEM; 1746 result = -ENOMEM;
1734 xfer = kzalloc(sizeof(*xfer), gfp); 1747 xfer = kzalloc(sizeof(*xfer), gfp);
1735 if (xfer == NULL) 1748 if (xfer == NULL)
@@ -1769,6 +1782,9 @@ int wa_urb_enqueue(struct wahc *wa, struct usb_host_endpoint *ep,
1769 __func__, result); 1782 __func__, result);
1770 wa_put(xfer->wa); 1783 wa_put(xfer->wa);
1771 wa_xfer_put(xfer); 1784 wa_xfer_put(xfer);
1785 spin_lock_irqsave(&wa->xfer_list_lock, my_flags);
1786 usb_hcd_unlink_urb_from_ep(&(wa->wusb->usb_hcd), urb);
1787 spin_unlock_irqrestore(&wa->xfer_list_lock, my_flags);
1772 return result; 1788 return result;
1773 } 1789 }
1774 } 1790 }
@@ -1777,6 +1793,10 @@ int wa_urb_enqueue(struct wahc *wa, struct usb_host_endpoint *ep,
1777error_dequeued: 1793error_dequeued:
1778 kfree(xfer); 1794 kfree(xfer);
1779error_kmalloc: 1795error_kmalloc:
1796 spin_lock_irqsave(&wa->xfer_list_lock, my_flags);
1797 usb_hcd_unlink_urb_from_ep(&(wa->wusb->usb_hcd), urb);
1798 spin_unlock_irqrestore(&wa->xfer_list_lock, my_flags);
1799error_link_urb:
1780 return result; 1800 return result;
1781} 1801}
1782EXPORT_SYMBOL_GPL(wa_urb_enqueue); 1802EXPORT_SYMBOL_GPL(wa_urb_enqueue);
@@ -1799,7 +1819,7 @@ EXPORT_SYMBOL_GPL(wa_urb_enqueue);
1799 * asynch request] and then make sure we cancel each segment. 1819 * asynch request] and then make sure we cancel each segment.
1800 * 1820 *
1801 */ 1821 */
1802int wa_urb_dequeue(struct wahc *wa, struct urb *urb) 1822int wa_urb_dequeue(struct wahc *wa, struct urb *urb, int status)
1803{ 1823{
1804 unsigned long flags, flags2; 1824 unsigned long flags, flags2;
1805 struct wa_xfer *xfer; 1825 struct wa_xfer *xfer;
@@ -1807,6 +1827,14 @@ int wa_urb_dequeue(struct wahc *wa, struct urb *urb)
1807 struct wa_rpipe *rpipe; 1827 struct wa_rpipe *rpipe;
1808 unsigned cnt, done = 0, xfer_abort_pending; 1828 unsigned cnt, done = 0, xfer_abort_pending;
1809 unsigned rpipe_ready = 0; 1829 unsigned rpipe_ready = 0;
1830 int result;
1831
1832 /* check if it is safe to unlink. */
1833 spin_lock_irqsave(&wa->xfer_list_lock, flags);
1834 result = usb_hcd_check_unlink_urb(&(wa->wusb->usb_hcd), urb, status);
1835 spin_unlock_irqrestore(&wa->xfer_list_lock, flags);
1836 if (result)
1837 return result;
1810 1838
1811 xfer = urb->hcpriv; 1839 xfer = urb->hcpriv;
1812 if (xfer == NULL) { 1840 if (xfer == NULL) {
@@ -1822,9 +1850,10 @@ int wa_urb_dequeue(struct wahc *wa, struct urb *urb)
1822 pr_debug("%s: DEQUEUE xfer id 0x%08X\n", __func__, wa_xfer_id(xfer)); 1850 pr_debug("%s: DEQUEUE xfer id 0x%08X\n", __func__, wa_xfer_id(xfer));
1823 rpipe = xfer->ep->hcpriv; 1851 rpipe = xfer->ep->hcpriv;
1824 if (rpipe == NULL) { 1852 if (rpipe == NULL) {
1825 pr_debug("%s: xfer id 0x%08X has no RPIPE. %s", 1853 pr_debug("%s: xfer %p id 0x%08X has no RPIPE. %s",
1826 __func__, wa_xfer_id(xfer), 1854 __func__, xfer, wa_xfer_id(xfer),
1827 "Probably already aborted.\n" ); 1855 "Probably already aborted.\n" );
1856 result = -ENOENT;
1828 goto out_unlock; 1857 goto out_unlock;
1829 } 1858 }
1830 /* Check the delayed list -> if there, release and complete */ 1859 /* Check the delayed list -> if there, release and complete */
@@ -1855,6 +1884,7 @@ int wa_urb_dequeue(struct wahc *wa, struct urb *urb)
1855 * segments will be completed in the DTI interrupt. 1884 * segments will be completed in the DTI interrupt.
1856 */ 1885 */
1857 seg->status = WA_SEG_ABORTED; 1886 seg->status = WA_SEG_ABORTED;
1887 seg->result = -ENOENT;
1858 spin_lock_irqsave(&rpipe->seg_lock, flags2); 1888 spin_lock_irqsave(&rpipe->seg_lock, flags2);
1859 list_del(&seg->list_node); 1889 list_del(&seg->list_node);
1860 xfer->segs_done++; 1890 xfer->segs_done++;
@@ -1894,12 +1924,12 @@ int wa_urb_dequeue(struct wahc *wa, struct urb *urb)
1894 wa_xfer_completion(xfer); 1924 wa_xfer_completion(xfer);
1895 if (rpipe_ready) 1925 if (rpipe_ready)
1896 wa_xfer_delayed_run(rpipe); 1926 wa_xfer_delayed_run(rpipe);
1897 return 0; 1927 return result;
1898 1928
1899out_unlock: 1929out_unlock:
1900 spin_unlock_irqrestore(&xfer->lock, flags); 1930 spin_unlock_irqrestore(&xfer->lock, flags);
1901out: 1931out:
1902 return 0; 1932 return result;
1903 1933
1904dequeue_delayed: 1934dequeue_delayed:
1905 list_del_init(&xfer->list_node); 1935 list_del_init(&xfer->list_node);
@@ -1935,7 +1965,7 @@ static int wa_xfer_status_to_errno(u8 status)
1935 [WA_XFER_STATUS_NOT_FOUND] = 0, 1965 [WA_XFER_STATUS_NOT_FOUND] = 0,
1936 [WA_XFER_STATUS_INSUFFICIENT_RESOURCE] = -ENOMEM, 1966 [WA_XFER_STATUS_INSUFFICIENT_RESOURCE] = -ENOMEM,
1937 [WA_XFER_STATUS_TRANSACTION_ERROR] = -EILSEQ, 1967 [WA_XFER_STATUS_TRANSACTION_ERROR] = -EILSEQ,
1938 [WA_XFER_STATUS_ABORTED] = -EINTR, 1968 [WA_XFER_STATUS_ABORTED] = -ENOENT,
1939 [WA_XFER_STATUS_RPIPE_NOT_READY] = EINVAL, 1969 [WA_XFER_STATUS_RPIPE_NOT_READY] = EINVAL,
1940 [WA_XFER_INVALID_FORMAT] = EINVAL, 1970 [WA_XFER_INVALID_FORMAT] = EINVAL,
1941 [WA_XFER_UNEXPECTED_SEGMENT_NUMBER] = EINVAL, 1971 [WA_XFER_UNEXPECTED_SEGMENT_NUMBER] = EINVAL,
@@ -1968,7 +1998,7 @@ static int wa_xfer_status_to_errno(u8 status)
1968 * the xfer will complete cleanly. 1998 * the xfer will complete cleanly.
1969 */ 1999 */
1970static void wa_complete_remaining_xfer_segs(struct wa_xfer *xfer, 2000static void wa_complete_remaining_xfer_segs(struct wa_xfer *xfer,
1971 struct wa_seg *incoming_seg) 2001 struct wa_seg *incoming_seg, enum wa_seg_status status)
1972{ 2002{
1973 int index; 2003 int index;
1974 struct wa_rpipe *rpipe = xfer->ep->hcpriv; 2004 struct wa_rpipe *rpipe = xfer->ep->hcpriv;
@@ -1990,7 +2020,7 @@ static void wa_complete_remaining_xfer_segs(struct wa_xfer *xfer,
1990 */ 2020 */
1991 case WA_SEG_DELAYED: 2021 case WA_SEG_DELAYED:
1992 xfer->segs_done++; 2022 xfer->segs_done++;
1993 current_seg->status = incoming_seg->status; 2023 current_seg->status = status;
1994 break; 2024 break;
1995 case WA_SEG_ABORTED: 2025 case WA_SEG_ABORTED:
1996 break; 2026 break;
@@ -2003,6 +2033,77 @@ static void wa_complete_remaining_xfer_segs(struct wa_xfer *xfer,
2003 } 2033 }
2004} 2034}
2005 2035
2036/* Populate the wa->buf_in_urb based on the current isoc transfer state. */
2037static void __wa_populate_buf_in_urb_isoc(struct wahc *wa, struct wa_xfer *xfer,
2038 struct wa_seg *seg, int curr_iso_frame)
2039{
2040 BUG_ON(wa->buf_in_urb->status == -EINPROGRESS);
2041
2042 /* this should always be 0 before a resubmit. */
2043 wa->buf_in_urb->num_mapped_sgs = 0;
2044 wa->buf_in_urb->transfer_dma = xfer->urb->transfer_dma +
2045 xfer->urb->iso_frame_desc[curr_iso_frame].offset;
2046 wa->buf_in_urb->transfer_buffer_length =
2047 xfer->urb->iso_frame_desc[curr_iso_frame].length;
2048 wa->buf_in_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
2049 wa->buf_in_urb->transfer_buffer = NULL;
2050 wa->buf_in_urb->sg = NULL;
2051 wa->buf_in_urb->num_sgs = 0;
2052 wa->buf_in_urb->context = seg;
2053}
2054
2055/* Populate the wa->buf_in_urb based on the current transfer state. */
2056static int wa_populate_buf_in_urb(struct wahc *wa, struct wa_xfer *xfer,
2057 unsigned int seg_idx, unsigned int bytes_transferred)
2058{
2059 int result = 0;
2060 struct wa_seg *seg = xfer->seg[seg_idx];
2061
2062 BUG_ON(wa->buf_in_urb->status == -EINPROGRESS);
2063 /* this should always be 0 before a resubmit. */
2064 wa->buf_in_urb->num_mapped_sgs = 0;
2065
2066 if (xfer->is_dma) {
2067 wa->buf_in_urb->transfer_dma = xfer->urb->transfer_dma
2068 + (seg_idx * xfer->seg_size);
2069 wa->buf_in_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
2070 wa->buf_in_urb->transfer_buffer = NULL;
2071 wa->buf_in_urb->sg = NULL;
2072 wa->buf_in_urb->num_sgs = 0;
2073 } else {
2074 /* do buffer or SG processing. */
2075 wa->buf_in_urb->transfer_flags &= ~URB_NO_TRANSFER_DMA_MAP;
2076
2077 if (xfer->urb->transfer_buffer) {
2078 wa->buf_in_urb->transfer_buffer =
2079 xfer->urb->transfer_buffer
2080 + (seg_idx * xfer->seg_size);
2081 wa->buf_in_urb->sg = NULL;
2082 wa->buf_in_urb->num_sgs = 0;
2083 } else {
2084 /* allocate an SG list to store seg_size bytes
2085 and copy the subset of the xfer->urb->sg
2086 that matches the buffer subset we are
2087 about to read. */
2088 wa->buf_in_urb->sg = wa_xfer_create_subset_sg(
2089 xfer->urb->sg,
2090 seg_idx * xfer->seg_size,
2091 bytes_transferred,
2092 &(wa->buf_in_urb->num_sgs));
2093
2094 if (!(wa->buf_in_urb->sg)) {
2095 wa->buf_in_urb->num_sgs = 0;
2096 result = -ENOMEM;
2097 }
2098 wa->buf_in_urb->transfer_buffer = NULL;
2099 }
2100 }
2101 wa->buf_in_urb->transfer_buffer_length = bytes_transferred;
2102 wa->buf_in_urb->context = seg;
2103
2104 return result;
2105}
2106
2006/* 2107/*
2007 * Process a xfer result completion message 2108 * Process a xfer result completion message
2008 * 2109 *
@@ -2016,12 +2117,13 @@ static void wa_xfer_result_chew(struct wahc *wa, struct wa_xfer *xfer,
2016 int result; 2117 int result;
2017 struct device *dev = &wa->usb_iface->dev; 2118 struct device *dev = &wa->usb_iface->dev;
2018 unsigned long flags; 2119 unsigned long flags;
2019 u8 seg_idx; 2120 unsigned int seg_idx;
2020 struct wa_seg *seg; 2121 struct wa_seg *seg;
2021 struct wa_rpipe *rpipe; 2122 struct wa_rpipe *rpipe;
2022 unsigned done = 0; 2123 unsigned done = 0;
2023 u8 usb_status; 2124 u8 usb_status;
2024 unsigned rpipe_ready = 0; 2125 unsigned rpipe_ready = 0;
2126 unsigned bytes_transferred = le32_to_cpu(xfer_result->dwTransferLength);
2025 2127
2026 spin_lock_irqsave(&xfer->lock, flags); 2128 spin_lock_irqsave(&xfer->lock, flags);
2027 seg_idx = xfer_result->bTransferSegment & 0x7f; 2129 seg_idx = xfer_result->bTransferSegment & 0x7f;
@@ -2054,66 +2156,34 @@ static void wa_xfer_result_chew(struct wahc *wa, struct wa_xfer *xfer,
2054 /* FIXME: we ignore warnings, tally them for stats */ 2156 /* FIXME: we ignore warnings, tally them for stats */
2055 if (usb_status & 0x40) /* Warning?... */ 2157 if (usb_status & 0x40) /* Warning?... */
2056 usb_status = 0; /* ... pass */ 2158 usb_status = 0; /* ... pass */
2057 if (usb_pipeisoc(xfer->urb->pipe)) { 2159 /*
2160 * If the last segment bit is set, complete the remaining segments.
2161 * When the current segment is completed, either in wa_buf_in_cb for
2162 * transfers with data or below for no data, the xfer will complete.
2163 */
2164 if (xfer_result->bTransferSegment & 0x80)
2165 wa_complete_remaining_xfer_segs(xfer, seg, WA_SEG_DONE);
2166 if (usb_pipeisoc(xfer->urb->pipe)
2167 && (le32_to_cpu(xfer_result->dwNumOfPackets) > 0)) {
2058 /* set up WA state to read the isoc packet status next. */ 2168 /* set up WA state to read the isoc packet status next. */
2059 wa->dti_isoc_xfer_in_progress = wa_xfer_id(xfer); 2169 wa->dti_isoc_xfer_in_progress = wa_xfer_id(xfer);
2060 wa->dti_isoc_xfer_seg = seg_idx; 2170 wa->dti_isoc_xfer_seg = seg_idx;
2061 wa->dti_state = WA_DTI_ISOC_PACKET_STATUS_PENDING; 2171 wa->dti_state = WA_DTI_ISOC_PACKET_STATUS_PENDING;
2062 } else if (xfer->is_inbound) { /* IN data phase: read to buffer */ 2172 } else if (xfer->is_inbound && !usb_pipeisoc(xfer->urb->pipe)
2173 && (bytes_transferred > 0)) {
2174 /* IN data phase: read to buffer */
2063 seg->status = WA_SEG_DTI_PENDING; 2175 seg->status = WA_SEG_DTI_PENDING;
2064 BUG_ON(wa->buf_in_urb->status == -EINPROGRESS); 2176 result = wa_populate_buf_in_urb(wa, xfer, seg_idx,
2065 /* this should always be 0 before a resubmit. */ 2177 bytes_transferred);
2066 wa->buf_in_urb->num_mapped_sgs = 0; 2178 if (result < 0)
2067 2179 goto error_buf_in_populate;
2068 if (xfer->is_dma) {
2069 wa->buf_in_urb->transfer_dma =
2070 xfer->urb->transfer_dma
2071 + (seg_idx * xfer->seg_size);
2072 wa->buf_in_urb->transfer_flags
2073 |= URB_NO_TRANSFER_DMA_MAP;
2074 wa->buf_in_urb->transfer_buffer = NULL;
2075 wa->buf_in_urb->sg = NULL;
2076 wa->buf_in_urb->num_sgs = 0;
2077 } else {
2078 /* do buffer or SG processing. */
2079 wa->buf_in_urb->transfer_flags
2080 &= ~URB_NO_TRANSFER_DMA_MAP;
2081
2082 if (xfer->urb->transfer_buffer) {
2083 wa->buf_in_urb->transfer_buffer =
2084 xfer->urb->transfer_buffer
2085 + (seg_idx * xfer->seg_size);
2086 wa->buf_in_urb->sg = NULL;
2087 wa->buf_in_urb->num_sgs = 0;
2088 } else {
2089 /* allocate an SG list to store seg_size bytes
2090 and copy the subset of the xfer->urb->sg
2091 that matches the buffer subset we are
2092 about to read. */
2093 wa->buf_in_urb->sg = wa_xfer_create_subset_sg(
2094 xfer->urb->sg,
2095 seg_idx * xfer->seg_size,
2096 le32_to_cpu(
2097 xfer_result->dwTransferLength),
2098 &(wa->buf_in_urb->num_sgs));
2099
2100 if (!(wa->buf_in_urb->sg)) {
2101 wa->buf_in_urb->num_sgs = 0;
2102 goto error_sg_alloc;
2103 }
2104 wa->buf_in_urb->transfer_buffer = NULL;
2105 }
2106 }
2107 wa->buf_in_urb->transfer_buffer_length =
2108 le32_to_cpu(xfer_result->dwTransferLength);
2109 wa->buf_in_urb->context = seg;
2110 result = usb_submit_urb(wa->buf_in_urb, GFP_ATOMIC); 2180 result = usb_submit_urb(wa->buf_in_urb, GFP_ATOMIC);
2111 if (result < 0) 2181 if (result < 0)
2112 goto error_submit_buf_in; 2182 goto error_submit_buf_in;
2113 } else { 2183 } else {
2114 /* OUT data phase, complete it -- */ 2184 /* OUT data phase or no data, complete it -- */
2115 seg->status = WA_SEG_DONE; 2185 seg->status = WA_SEG_DONE;
2116 seg->result = le32_to_cpu(xfer_result->dwTransferLength); 2186 seg->result = bytes_transferred;
2117 xfer->segs_done++; 2187 xfer->segs_done++;
2118 rpipe_ready = rpipe_avail_inc(rpipe); 2188 rpipe_ready = rpipe_avail_inc(rpipe);
2119 done = __wa_xfer_is_done(xfer); 2189 done = __wa_xfer_is_done(xfer);
@@ -2137,13 +2207,13 @@ error_submit_buf_in:
2137 seg->result = result; 2207 seg->result = result;
2138 kfree(wa->buf_in_urb->sg); 2208 kfree(wa->buf_in_urb->sg);
2139 wa->buf_in_urb->sg = NULL; 2209 wa->buf_in_urb->sg = NULL;
2140error_sg_alloc: 2210error_buf_in_populate:
2141 __wa_xfer_abort(xfer); 2211 __wa_xfer_abort(xfer);
2142 seg->status = WA_SEG_ERROR; 2212 seg->status = WA_SEG_ERROR;
2143error_complete: 2213error_complete:
2144 xfer->segs_done++; 2214 xfer->segs_done++;
2145 rpipe_ready = rpipe_avail_inc(rpipe); 2215 rpipe_ready = rpipe_avail_inc(rpipe);
2146 wa_complete_remaining_xfer_segs(xfer, seg); 2216 wa_complete_remaining_xfer_segs(xfer, seg, seg->status);
2147 done = __wa_xfer_is_done(xfer); 2217 done = __wa_xfer_is_done(xfer);
2148 /* 2218 /*
2149 * queue work item to clear STALL for control endpoints. 2219 * queue work item to clear STALL for control endpoints.
@@ -2172,7 +2242,7 @@ error_complete:
2172 2242
2173error_bad_seg: 2243error_bad_seg:
2174 spin_unlock_irqrestore(&xfer->lock, flags); 2244 spin_unlock_irqrestore(&xfer->lock, flags);
2175 wa_urb_dequeue(wa, xfer->urb); 2245 wa_urb_dequeue(wa, xfer->urb, -ENOENT);
2176 if (printk_ratelimit()) 2246 if (printk_ratelimit())
2177 dev_err(dev, "xfer %p#%u: bad segment\n", xfer, seg_idx); 2247 dev_err(dev, "xfer %p#%u: bad segment\n", xfer, seg_idx);
2178 if (edc_inc(&wa->dti_edc, EDC_MAX_ERRORS, EDC_ERROR_TIMEFRAME)) { 2248 if (edc_inc(&wa->dti_edc, EDC_MAX_ERRORS, EDC_ERROR_TIMEFRAME)) {
@@ -2192,7 +2262,7 @@ segment_aborted:
2192 * 2262 *
2193 * inbound transfers: need to schedule a buf_in_urb read 2263 * inbound transfers: need to schedule a buf_in_urb read
2194 */ 2264 */
2195static void wa_process_iso_packet_status(struct wahc *wa, struct urb *urb) 2265static int wa_process_iso_packet_status(struct wahc *wa, struct urb *urb)
2196{ 2266{
2197 struct device *dev = &wa->usb_iface->dev; 2267 struct device *dev = &wa->usb_iface->dev;
2198 struct wa_xfer_packet_status_hwaiso *packet_status; 2268 struct wa_xfer_packet_status_hwaiso *packet_status;
@@ -2201,8 +2271,8 @@ static void wa_process_iso_packet_status(struct wahc *wa, struct urb *urb)
2201 unsigned long flags; 2271 unsigned long flags;
2202 struct wa_seg *seg; 2272 struct wa_seg *seg;
2203 struct wa_rpipe *rpipe; 2273 struct wa_rpipe *rpipe;
2204 unsigned done = 0; 2274 unsigned done = 0, dti_busy = 0, data_frame_count = 0, seg_index;
2205 unsigned rpipe_ready = 0, seg_index; 2275 unsigned first_frame_index = 0, rpipe_ready = 0;
2206 int expected_size; 2276 int expected_size;
2207 2277
2208 /* We have a xfer result buffer; check it */ 2278 /* We have a xfer result buffer; check it */
@@ -2238,18 +2308,48 @@ static void wa_process_iso_packet_status(struct wahc *wa, struct urb *urb)
2238 le16_to_cpu(packet_status->wLength)); 2308 le16_to_cpu(packet_status->wLength));
2239 goto error_bad_seg; 2309 goto error_bad_seg;
2240 } 2310 }
2241 /* isoc packet status and lengths back xfer urb. */ 2311 /* write isoc packet status and lengths back to the xfer urb. */
2242 status_array = packet_status->PacketStatus; 2312 status_array = packet_status->PacketStatus;
2313 xfer->urb->start_frame =
2314 wa->wusb->usb_hcd.driver->get_frame_number(&wa->wusb->usb_hcd);
2243 for (seg_index = 0; seg_index < seg->isoc_frame_count; ++seg_index) { 2315 for (seg_index = 0; seg_index < seg->isoc_frame_count; ++seg_index) {
2244 xfer->urb->iso_frame_desc[seg->index].status = 2316 struct usb_iso_packet_descriptor *iso_frame_desc =
2317 xfer->urb->iso_frame_desc;
2318 const int urb_frame_index =
2319 seg->isoc_frame_offset + seg_index;
2320
2321 iso_frame_desc[urb_frame_index].status =
2245 wa_xfer_status_to_errno( 2322 wa_xfer_status_to_errno(
2246 le16_to_cpu(status_array[seg_index].PacketStatus)); 2323 le16_to_cpu(status_array[seg_index].PacketStatus));
2247 xfer->urb->iso_frame_desc[seg->index].actual_length = 2324 iso_frame_desc[urb_frame_index].actual_length =
2248 le16_to_cpu(status_array[seg_index].PacketLength); 2325 le16_to_cpu(status_array[seg_index].PacketLength);
2326 /* track the number of frames successfully transferred. */
2327 if (iso_frame_desc[urb_frame_index].actual_length > 0) {
2328 /* save the starting frame index for buf_in_urb. */
2329 if (!data_frame_count)
2330 first_frame_index = seg_index;
2331 ++data_frame_count;
2332 }
2249 } 2333 }
2250 2334
2251 if (!xfer->is_inbound) { 2335 if (xfer->is_inbound && data_frame_count) {
2252 /* OUT transfer, complete it -- */ 2336 int result;
2337
2338 seg->isoc_frame_index = first_frame_index;
2339 /* submit a read URB for the first frame with data. */
2340 __wa_populate_buf_in_urb_isoc(wa, xfer, seg,
2341 seg->isoc_frame_index + seg->isoc_frame_offset);
2342
2343 result = usb_submit_urb(wa->buf_in_urb, GFP_ATOMIC);
2344 if (result < 0) {
2345 dev_err(dev, "DTI Error: Could not submit buf in URB (%d)",
2346 result);
2347 wa_reset_all(wa);
2348 } else if (data_frame_count > 1)
2349 /* If we need to read multiple frames, set DTI busy. */
2350 dti_busy = 1;
2351 } else {
2352 /* OUT transfer or no more IN data, complete it -- */
2253 seg->status = WA_SEG_DONE; 2353 seg->status = WA_SEG_DONE;
2254 xfer->segs_done++; 2354 xfer->segs_done++;
2255 rpipe_ready = rpipe_avail_inc(rpipe); 2355 rpipe_ready = rpipe_avail_inc(rpipe);
@@ -2262,13 +2362,13 @@ static void wa_process_iso_packet_status(struct wahc *wa, struct urb *urb)
2262 if (rpipe_ready) 2362 if (rpipe_ready)
2263 wa_xfer_delayed_run(rpipe); 2363 wa_xfer_delayed_run(rpipe);
2264 wa_xfer_put(xfer); 2364 wa_xfer_put(xfer);
2265 return; 2365 return dti_busy;
2266 2366
2267error_bad_seg: 2367error_bad_seg:
2268 spin_unlock_irqrestore(&xfer->lock, flags); 2368 spin_unlock_irqrestore(&xfer->lock, flags);
2269 wa_xfer_put(xfer); 2369 wa_xfer_put(xfer);
2270error_parse_buffer: 2370error_parse_buffer:
2271 return; 2371 return dti_busy;
2272} 2372}
2273 2373
2274/* 2374/*
@@ -2288,7 +2388,7 @@ static void wa_buf_in_cb(struct urb *urb)
2288 struct wahc *wa; 2388 struct wahc *wa;
2289 struct device *dev; 2389 struct device *dev;
2290 struct wa_rpipe *rpipe; 2390 struct wa_rpipe *rpipe;
2291 unsigned rpipe_ready; 2391 unsigned rpipe_ready = 0, seg_index, isoc_data_frame_count = 0;
2292 unsigned long flags; 2392 unsigned long flags;
2293 u8 done = 0; 2393 u8 done = 0;
2294 2394
@@ -2296,19 +2396,61 @@ static void wa_buf_in_cb(struct urb *urb)
2296 kfree(urb->sg); 2396 kfree(urb->sg);
2297 urb->sg = NULL; 2397 urb->sg = NULL;
2298 2398
2399 spin_lock_irqsave(&xfer->lock, flags);
2400 wa = xfer->wa;
2401 dev = &wa->usb_iface->dev;
2402
2403 if (usb_pipeisoc(xfer->urb->pipe)) {
2404 /*
2405 * Find the next isoc frame with data. Bail out after
2406 * isoc_data_frame_count > 1 since there is no need to walk
2407 * the entire frame array. We just need to know if
2408 * isoc_data_frame_count is 0, 1, or >1.
2409 */
2410 seg_index = seg->isoc_frame_index + 1;
2411 while ((seg_index < seg->isoc_frame_count)
2412 && (isoc_data_frame_count <= 1)) {
2413 struct usb_iso_packet_descriptor *iso_frame_desc =
2414 xfer->urb->iso_frame_desc;
2415 const int urb_frame_index =
2416 seg->isoc_frame_offset + seg_index;
2417
2418 if (iso_frame_desc[urb_frame_index].actual_length > 0) {
2419 /* save the index of the next frame with data */
2420 if (!isoc_data_frame_count)
2421 seg->isoc_frame_index = seg_index;
2422 ++isoc_data_frame_count;
2423 }
2424 ++seg_index;
2425 }
2426 }
2427 spin_unlock_irqrestore(&xfer->lock, flags);
2428
2299 switch (urb->status) { 2429 switch (urb->status) {
2300 case 0: 2430 case 0:
2301 spin_lock_irqsave(&xfer->lock, flags); 2431 spin_lock_irqsave(&xfer->lock, flags);
2302 wa = xfer->wa; 2432
2303 dev = &wa->usb_iface->dev; 2433 seg->result += urb->actual_length;
2304 rpipe = xfer->ep->hcpriv; 2434 if (isoc_data_frame_count > 0) {
2305 dev_dbg(dev, "xfer %p#%u: data in done (%zu bytes)\n", 2435 int result;
2306 xfer, seg->index, (size_t)urb->actual_length); 2436 /* submit a read URB for the first frame with data. */
2307 seg->status = WA_SEG_DONE; 2437 __wa_populate_buf_in_urb_isoc(wa, xfer, seg,
2308 seg->result = urb->actual_length; 2438 seg->isoc_frame_index + seg->isoc_frame_offset);
2309 xfer->segs_done++; 2439 result = usb_submit_urb(wa->buf_in_urb, GFP_ATOMIC);
2310 rpipe_ready = rpipe_avail_inc(rpipe); 2440 if (result < 0) {
2311 done = __wa_xfer_is_done(xfer); 2441 dev_err(dev, "DTI Error: Could not submit buf in URB (%d)",
2442 result);
2443 wa_reset_all(wa);
2444 }
2445 } else {
2446 rpipe = xfer->ep->hcpriv;
2447 seg->status = WA_SEG_DONE;
2448 dev_dbg(dev, "xfer %p#%u: data in done (%zu bytes)\n",
2449 xfer, seg->index, seg->result);
2450 xfer->segs_done++;
2451 rpipe_ready = rpipe_avail_inc(rpipe);
2452 done = __wa_xfer_is_done(xfer);
2453 }
2312 spin_unlock_irqrestore(&xfer->lock, flags); 2454 spin_unlock_irqrestore(&xfer->lock, flags);
2313 if (done) 2455 if (done)
2314 wa_xfer_completion(xfer); 2456 wa_xfer_completion(xfer);
@@ -2320,8 +2462,6 @@ static void wa_buf_in_cb(struct urb *urb)
2320 break; 2462 break;
2321 default: /* Other errors ... */ 2463 default: /* Other errors ... */
2322 spin_lock_irqsave(&xfer->lock, flags); 2464 spin_lock_irqsave(&xfer->lock, flags);
2323 wa = xfer->wa;
2324 dev = &wa->usb_iface->dev;
2325 rpipe = xfer->ep->hcpriv; 2465 rpipe = xfer->ep->hcpriv;
2326 if (printk_ratelimit()) 2466 if (printk_ratelimit())
2327 dev_err(dev, "xfer %p#%u: data in error %d\n", 2467 dev_err(dev, "xfer %p#%u: data in error %d\n",
@@ -2344,6 +2484,20 @@ static void wa_buf_in_cb(struct urb *urb)
2344 if (rpipe_ready) 2484 if (rpipe_ready)
2345 wa_xfer_delayed_run(rpipe); 2485 wa_xfer_delayed_run(rpipe);
2346 } 2486 }
2487 /*
2488 * If we are in this callback and isoc_data_frame_count > 0, it means
2489 * that the dti_urb submission was delayed in wa_dti_cb. Once
2490 * isoc_data_frame_count gets to 1, we can submit the deferred URB
2491 * since the last buf_in_urb was just submitted.
2492 */
2493 if (isoc_data_frame_count == 1) {
2494 int result = usb_submit_urb(wa->dti_urb, GFP_ATOMIC);
2495 if (result < 0) {
2496 dev_err(dev, "DTI Error: Could not submit DTI URB (%d)\n",
2497 result);
2498 wa_reset_all(wa);
2499 }
2500 }
2347} 2501}
2348 2502
2349/* 2503/*
@@ -2374,7 +2528,7 @@ static void wa_buf_in_cb(struct urb *urb)
2374 */ 2528 */
2375static void wa_dti_cb(struct urb *urb) 2529static void wa_dti_cb(struct urb *urb)
2376{ 2530{
2377 int result; 2531 int result, dti_busy = 0;
2378 struct wahc *wa = urb->context; 2532 struct wahc *wa = urb->context;
2379 struct device *dev = &wa->usb_iface->dev; 2533 struct device *dev = &wa->usb_iface->dev;
2380 u32 xfer_id; 2534 u32 xfer_id;
@@ -2422,7 +2576,7 @@ static void wa_dti_cb(struct urb *urb)
2422 wa_xfer_result_chew(wa, xfer, xfer_result); 2576 wa_xfer_result_chew(wa, xfer, xfer_result);
2423 wa_xfer_put(xfer); 2577 wa_xfer_put(xfer);
2424 } else if (wa->dti_state == WA_DTI_ISOC_PACKET_STATUS_PENDING) { 2578 } else if (wa->dti_state == WA_DTI_ISOC_PACKET_STATUS_PENDING) {
2425 wa_process_iso_packet_status(wa, urb); 2579 dti_busy = wa_process_iso_packet_status(wa, urb);
2426 } else { 2580 } else {
2427 dev_err(dev, "DTI Error: unexpected EP state = %d\n", 2581 dev_err(dev, "DTI Error: unexpected EP state = %d\n",
2428 wa->dti_state); 2582 wa->dti_state);
@@ -2445,12 +2599,15 @@ static void wa_dti_cb(struct urb *urb)
2445 dev_err(dev, "DTI: URB error %d\n", urb->status); 2599 dev_err(dev, "DTI: URB error %d\n", urb->status);
2446 break; 2600 break;
2447 } 2601 }
2448 /* Resubmit the DTI URB */ 2602
2449 result = usb_submit_urb(wa->dti_urb, GFP_ATOMIC); 2603 /* Resubmit the DTI URB if we are not busy processing isoc in frames. */
2450 if (result < 0) { 2604 if (!dti_busy) {
2451 dev_err(dev, "DTI Error: Could not submit DTI URB (%d), " 2605 result = usb_submit_urb(wa->dti_urb, GFP_ATOMIC);
2452 "resetting\n", result); 2606 if (result < 0) {
2453 wa_reset_all(wa); 2607 dev_err(dev, "DTI Error: Could not submit DTI URB (%d)\n",
2608 result);
2609 wa_reset_all(wa);
2610 }
2454 } 2611 }
2455out: 2612out:
2456 return; 2613 return;
@@ -2517,8 +2674,8 @@ void wa_handle_notif_xfer(struct wahc *wa, struct wa_notif_hdr *notif_hdr)
2517 NULL, 0, wa_buf_in_cb, wa); 2674 NULL, 0, wa_buf_in_cb, wa);
2518 result = usb_submit_urb(wa->dti_urb, GFP_KERNEL); 2675 result = usb_submit_urb(wa->dti_urb, GFP_KERNEL);
2519 if (result < 0) { 2676 if (result < 0) {
2520 dev_err(dev, "DTI Error: Could not submit DTI URB (%d), " 2677 dev_err(dev, "DTI Error: Could not submit DTI URB (%d) resetting\n",
2521 "resetting\n", result); 2678 result);
2522 goto error_dti_urb_submit; 2679 goto error_dti_urb_submit;
2523 } 2680 }
2524out: 2681out:
diff --git a/drivers/usb/wusbcore/wusbhc.c b/drivers/usb/wusbcore/wusbhc.c
index 742c607d1fa3..3e1ba51d1a43 100644
--- a/drivers/usb/wusbcore/wusbhc.c
+++ b/drivers/usb/wusbcore/wusbhc.c
@@ -55,7 +55,8 @@ static struct wusbhc *usbhc_dev_to_wusbhc(struct device *dev)
55 * value of trust_timeout is jiffies. 55 * value of trust_timeout is jiffies.
56 */ 56 */
57static ssize_t wusb_trust_timeout_show(struct device *dev, 57static ssize_t wusb_trust_timeout_show(struct device *dev,
58 struct device_attribute *attr, char *buf) 58 struct device_attribute *attr,
59 char *buf)
59{ 60{
60 struct wusbhc *wusbhc = usbhc_dev_to_wusbhc(dev); 61 struct wusbhc *wusbhc = usbhc_dev_to_wusbhc(dev);
61 62
@@ -173,7 +174,8 @@ static ssize_t wusb_phy_rate_store(struct device *dev,
173 wusbhc->phy_rate = phy_rate; 174 wusbhc->phy_rate = phy_rate;
174 return size; 175 return size;
175} 176}
176static DEVICE_ATTR(wusb_phy_rate, 0644, wusb_phy_rate_show, wusb_phy_rate_store); 177static DEVICE_ATTR(wusb_phy_rate, 0644, wusb_phy_rate_show,
178 wusb_phy_rate_store);
177 179
178static ssize_t wusb_dnts_show(struct device *dev, 180static ssize_t wusb_dnts_show(struct device *dev,
179 struct device_attribute *attr, 181 struct device_attribute *attr,
@@ -227,7 +229,8 @@ static ssize_t wusb_retry_count_store(struct device *dev,
227 if (result != 1) 229 if (result != 1)
228 return -EINVAL; 230 return -EINVAL;
229 231
230 wusbhc->retry_count = max_t(uint8_t, retry_count, WUSB_RETRY_COUNT_MAX); 232 wusbhc->retry_count = max_t(uint8_t, retry_count,
233 WUSB_RETRY_COUNT_MAX);
231 234
232 return size; 235 return size;
233} 236}
@@ -321,7 +324,8 @@ int wusbhc_b_create(struct wusbhc *wusbhc)
321 324
322 result = sysfs_create_group(wusbhc_kobj(wusbhc), &wusbhc_attr_group); 325 result = sysfs_create_group(wusbhc_kobj(wusbhc), &wusbhc_attr_group);
323 if (result < 0) { 326 if (result < 0) {
324 dev_err(dev, "Cannot register WUSBHC attributes: %d\n", result); 327 dev_err(dev, "Cannot register WUSBHC attributes: %d\n",
328 result);
325 goto error_create_attr_group; 329 goto error_create_attr_group;
326 } 330 }
327 331
@@ -419,13 +423,14 @@ EXPORT_SYMBOL_GPL(wusb_cluster_id_put);
419 * - After a successful transfer, update the trust timeout timestamp 423 * - After a successful transfer, update the trust timeout timestamp
420 * for the WUSB device. 424 * for the WUSB device.
421 * 425 *
422 * - [WUSB] sections 4.13 and 7.5.1 specifies the stop retrasmittion 426 * - [WUSB] sections 4.13 and 7.5.1 specify the stop retransmission
423 * condition for the WCONNECTACK_IE is that the host has observed 427 * condition for the WCONNECTACK_IE is that the host has observed
424 * the associated device responding to a control transfer. 428 * the associated device responding to a control transfer.
425 */ 429 */
426void wusbhc_giveback_urb(struct wusbhc *wusbhc, struct urb *urb, int status) 430void wusbhc_giveback_urb(struct wusbhc *wusbhc, struct urb *urb, int status)
427{ 431{
428 struct wusb_dev *wusb_dev = __wusb_dev_get_by_usb_dev(wusbhc, urb->dev); 432 struct wusb_dev *wusb_dev = __wusb_dev_get_by_usb_dev(wusbhc,
433 urb->dev);
429 434
430 if (status == 0 && wusb_dev) { 435 if (status == 0 && wusb_dev) {
431 wusb_dev->entry_ts = jiffies; 436 wusb_dev->entry_ts = jiffies;
diff --git a/drivers/usb/wusbcore/wusbhc.h b/drivers/usb/wusbcore/wusbhc.h
index 6bd3b819a6b5..2384add45371 100644
--- a/drivers/usb/wusbcore/wusbhc.h
+++ b/drivers/usb/wusbcore/wusbhc.h
@@ -164,7 +164,7 @@ struct wusb_port {
164 * functions/operations that only deal with general Wireless USB HC 164 * functions/operations that only deal with general Wireless USB HC
165 * issues use this data type to refer to the host. 165 * issues use this data type to refer to the host.
166 * 166 *
167 * @usb_hcd Instantiation of a USB host controller 167 * @usb_hcd Instantiation of a USB host controller
168 * (initialized by upper layer [HWA=HC or WHCI]. 168 * (initialized by upper layer [HWA=HC or WHCI].
169 * 169 *
170 * @dev Device that implements this; initialized by the 170 * @dev Device that implements this; initialized by the
@@ -196,7 +196,7 @@ struct wusb_port {
196 * @ports_max Number of simultaneous device connections (fake 196 * @ports_max Number of simultaneous device connections (fake
197 * ports) this HC will take. Read-only. 197 * ports) this HC will take. Read-only.
198 * 198 *
199 * @port Array of port status for each fake root port. Guaranteed to 199 * @port Array of port status for each fake root port. Guaranteed to
200 * always be the same length during device existence 200 * always be the same length during device existence
201 * [this allows for some unlocked but referenced reading]. 201 * [this allows for some unlocked but referenced reading].
202 * 202 *
@@ -329,7 +329,8 @@ void wusbhc_pal_unregister(struct wusbhc *wusbhc);
329 * This is a safe assumption as @usb_dev->bus is referenced all the 329 * This is a safe assumption as @usb_dev->bus is referenced all the
330 * time during the @usb_dev life cycle. 330 * time during the @usb_dev life cycle.
331 */ 331 */
332static inline struct usb_hcd *usb_hcd_get_by_usb_dev(struct usb_device *usb_dev) 332static inline
333struct usb_hcd *usb_hcd_get_by_usb_dev(struct usb_device *usb_dev)
333{ 334{
334 struct usb_hcd *usb_hcd; 335 struct usb_hcd *usb_hcd;
335 usb_hcd = container_of(usb_dev->bus, struct usb_hcd, self); 336 usb_hcd = container_of(usb_dev->bus, struct usb_hcd, self);
diff --git a/drivers/uwb/beacon.c b/drivers/uwb/beacon.c
index dcdd59bfcd09..57b5ff61020c 100644
--- a/drivers/uwb/beacon.c
+++ b/drivers/uwb/beacon.c
@@ -117,6 +117,7 @@ int uwb_rc_beacon(struct uwb_rc *rc, int channel, unsigned bpst_offset)
117 int result; 117 int result;
118 struct device *dev = &rc->uwb_dev.dev; 118 struct device *dev = &rc->uwb_dev.dev;
119 119
120 dev_dbg(dev, "%s: channel = %d\n", __func__, channel);
120 if (channel < 0) 121 if (channel < 0)
121 channel = -1; 122 channel = -1;
122 if (channel == -1) 123 if (channel == -1)
@@ -184,7 +185,7 @@ out:
184 185
185/* Find a beacon by dev addr in the cache */ 186/* Find a beacon by dev addr in the cache */
186static 187static
187struct uwb_beca_e *__uwb_beca_find_bymac(struct uwb_rc *rc, 188struct uwb_beca_e *__uwb_beca_find_bymac(struct uwb_rc *rc,
188 const struct uwb_mac_addr *mac_addr) 189 const struct uwb_mac_addr *mac_addr)
189{ 190{
190 struct uwb_beca_e *bce, *next; 191 struct uwb_beca_e *bce, *next;
@@ -515,13 +516,13 @@ int uwbd_evt_handle_rc_bp_slot_change(struct uwb_event *evt)
515 } 516 }
516 bpsc = container_of(evt->notif.rceb, struct uwb_rc_evt_bp_slot_change, rceb); 517 bpsc = container_of(evt->notif.rceb, struct uwb_rc_evt_bp_slot_change, rceb);
517 518
518 mutex_lock(&rc->uwb_dev.mutex);
519 if (uwb_rc_evt_bp_slot_change_no_slot(bpsc)) { 519 if (uwb_rc_evt_bp_slot_change_no_slot(bpsc)) {
520 dev_info(dev, "stopped beaconing: No free slots in BP\n"); 520 dev_err(dev, "stopped beaconing: No free slots in BP\n");
521 mutex_lock(&rc->uwb_dev.mutex);
521 rc->beaconing = -1; 522 rc->beaconing = -1;
523 mutex_unlock(&rc->uwb_dev.mutex);
522 } else 524 } else
523 rc->uwb_dev.beacon_slot = uwb_rc_evt_bp_slot_change_slot_num(bpsc); 525 rc->uwb_dev.beacon_slot = uwb_rc_evt_bp_slot_change_slot_num(bpsc);
524 mutex_unlock(&rc->uwb_dev.mutex);
525 526
526 return 0; 527 return 0;
527} 528}
diff --git a/drivers/uwb/radio.c b/drivers/uwb/radio.c
index d58dfecf9a79..fd23d985ea71 100644
--- a/drivers/uwb/radio.c
+++ b/drivers/uwb/radio.c
@@ -62,6 +62,10 @@ static void uwb_radio_channel_changed(struct uwb_rc *rc, int channel)
62static int uwb_radio_change_channel(struct uwb_rc *rc, int channel) 62static int uwb_radio_change_channel(struct uwb_rc *rc, int channel)
63{ 63{
64 int ret = 0; 64 int ret = 0;
65 struct device *dev = &rc->uwb_dev.dev;
66
67 dev_dbg(dev, "%s: channel = %d, rc->beaconing = %d\n", __func__,
68 channel, rc->beaconing);
65 69
66 if (channel == -1) 70 if (channel == -1)
67 uwb_radio_channel_changed(rc, channel); 71 uwb_radio_channel_changed(rc, channel);
@@ -89,7 +93,7 @@ static int uwb_radio_change_channel(struct uwb_rc *rc, int channel)
89 * uwb_radio_start - request that the radio be started 93 * uwb_radio_start - request that the radio be started
90 * @pal: the PAL making the request. 94 * @pal: the PAL making the request.
91 * 95 *
92 * If the radio is not already active, aa suitable channel is selected 96 * If the radio is not already active, a suitable channel is selected
93 * and beacons are started. 97 * and beacons are started.
94 */ 98 */
95int uwb_radio_start(struct uwb_pal *pal) 99int uwb_radio_start(struct uwb_pal *pal)
diff --git a/drivers/uwb/rsv.c b/drivers/uwb/rsv.c
index 738e8a8cb811..3fe611941046 100644
--- a/drivers/uwb/rsv.c
+++ b/drivers/uwb/rsv.c
@@ -237,7 +237,7 @@ void uwb_rsv_backoff_win_increment(struct uwb_rc *rc)
237 /* reset the timer associated variables */ 237 /* reset the timer associated variables */
238 timeout_us = bow->n * UWB_SUPERFRAME_LENGTH_US; 238 timeout_us = bow->n * UWB_SUPERFRAME_LENGTH_US;
239 bow->total_expired = 0; 239 bow->total_expired = 0;
240 mod_timer(&bow->timer, jiffies + usecs_to_jiffies(timeout_us)); 240 mod_timer(&bow->timer, jiffies + usecs_to_jiffies(timeout_us));
241} 241}
242 242
243static void uwb_rsv_stroke_timer(struct uwb_rsv *rsv) 243static void uwb_rsv_stroke_timer(struct uwb_rsv *rsv)
@@ -257,7 +257,7 @@ static void uwb_rsv_stroke_timer(struct uwb_rsv *rsv)
257 sframes = 1; 257 sframes = 1;
258 if (rsv->state == UWB_RSV_STATE_O_ESTABLISHED) 258 if (rsv->state == UWB_RSV_STATE_O_ESTABLISHED)
259 sframes = 0; 259 sframes = 0;
260 260
261 } 261 }
262 262
263 if (sframes > 0) { 263 if (sframes > 0) {
@@ -611,7 +611,7 @@ int uwb_rsv_try_move(struct uwb_rsv *rsv, struct uwb_mas_bm *available)
611 struct device *dev = &rc->uwb_dev.dev; 611 struct device *dev = &rc->uwb_dev.dev;
612 struct uwb_rsv_move *mv; 612 struct uwb_rsv_move *mv;
613 int ret = 0; 613 int ret = 0;
614 614
615 if (bow->can_reserve_extra_mases == false) 615 if (bow->can_reserve_extra_mases == false)
616 return -EBUSY; 616 return -EBUSY;
617 617
@@ -628,7 +628,7 @@ int uwb_rsv_try_move(struct uwb_rsv *rsv, struct uwb_mas_bm *available)
628 } else { 628 } else {
629 dev_dbg(dev, "new allocation not found\n"); 629 dev_dbg(dev, "new allocation not found\n");
630 } 630 }
631 631
632 return ret; 632 return ret;
633} 633}
634 634
@@ -640,7 +640,7 @@ void uwb_rsv_handle_drp_avail_change(struct uwb_rc *rc)
640 struct uwb_drp_backoff_win *bow = &rc->bow; 640 struct uwb_drp_backoff_win *bow = &rc->bow;
641 struct uwb_rsv *rsv; 641 struct uwb_rsv *rsv;
642 struct uwb_mas_bm mas; 642 struct uwb_mas_bm mas;
643 643
644 if (bow->can_reserve_extra_mases == false) 644 if (bow->can_reserve_extra_mases == false)
645 return; 645 return;
646 646
@@ -652,7 +652,7 @@ void uwb_rsv_handle_drp_avail_change(struct uwb_rc *rc)
652 uwb_rsv_try_move(rsv, &mas); 652 uwb_rsv_try_move(rsv, &mas);
653 } 653 }
654 } 654 }
655 655
656} 656}
657 657
658/** 658/**
@@ -916,10 +916,10 @@ static void uwb_rsv_alien_bp_work(struct work_struct *work)
916 struct uwb_rsv *rsv; 916 struct uwb_rsv *rsv;
917 917
918 mutex_lock(&rc->rsvs_mutex); 918 mutex_lock(&rc->rsvs_mutex);
919 919
920 list_for_each_entry(rsv, &rc->reservations, rc_node) { 920 list_for_each_entry(rsv, &rc->reservations, rc_node) {
921 if (rsv->type != UWB_DRP_TYPE_ALIEN_BP) { 921 if (rsv->type != UWB_DRP_TYPE_ALIEN_BP) {
922 rsv->callback(rsv); 922 uwb_rsv_callback(rsv);
923 } 923 }
924 } 924 }
925 925
diff --git a/drivers/uwb/umc-bus.c b/drivers/uwb/umc-bus.c
index e3ed6ff6a481..88a290f57ea0 100644
--- a/drivers/uwb/umc-bus.c
+++ b/drivers/uwb/umc-bus.c
@@ -85,7 +85,7 @@ int umc_match_pci_id(struct umc_driver *umc_drv, struct umc_dev *umc)
85 const struct pci_device_id *id_table = umc_drv->match_data; 85 const struct pci_device_id *id_table = umc_drv->match_data;
86 struct pci_dev *pci; 86 struct pci_dev *pci;
87 87
88 if (umc->dev.parent->bus != &pci_bus_type) 88 if (!dev_is_pci(umc->dev.parent))
89 return 0; 89 return 0;
90 90
91 pci = to_pci_dev(umc->dev.parent); 91 pci = to_pci_dev(umc->dev.parent);
diff --git a/drivers/uwb/umc-dev.c b/drivers/uwb/umc-dev.c
index 4613c13cd851..7b0b268e0c8e 100644
--- a/drivers/uwb/umc-dev.c
+++ b/drivers/uwb/umc-dev.c
@@ -66,6 +66,7 @@ int umc_device_register(struct umc_dev *umc)
66 return 0; 66 return 0;
67 67
68error_device_register: 68error_device_register:
69 put_device(&umc->dev);
69 release_resource(&umc->resource); 70 release_resource(&umc->resource);
70error_request_resource: 71error_request_resource:
71 return err; 72 return err;
diff --git a/drivers/watchdog/pcwd_usb.c b/drivers/watchdog/pcwd_usb.c
index b731b5d129be..e562e0476016 100644
--- a/drivers/watchdog/pcwd_usb.c
+++ b/drivers/watchdog/pcwd_usb.c
@@ -44,23 +44,6 @@
44#include <linux/hid.h> /* For HID_REQ_SET_REPORT & HID_DT_REPORT */ 44#include <linux/hid.h> /* For HID_REQ_SET_REPORT & HID_DT_REPORT */
45#include <linux/uaccess.h> /* For copy_to_user/put_user/... */ 45#include <linux/uaccess.h> /* For copy_to_user/put_user/... */
46 46
47#ifdef CONFIG_USB_DEBUG
48static int debug = 1;
49#else
50static int debug;
51#endif
52
53/* Use our own dbg macro */
54
55#undef dbg
56#ifndef DEBUG
57#define DEBUG
58#endif
59#define dbg(format, ...) \
60do { \
61 if (debug) \
62 pr_debug(format "\n", ##__VA_ARGS__); \
63} while (0)
64 47
65/* Module and Version Information */ 48/* Module and Version Information */
66#define DRIVER_VERSION "1.02" 49#define DRIVER_VERSION "1.02"
@@ -73,10 +56,6 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
73MODULE_DESCRIPTION(DRIVER_DESC); 56MODULE_DESCRIPTION(DRIVER_DESC);
74MODULE_LICENSE(DRIVER_LICENSE); 57MODULE_LICENSE(DRIVER_LICENSE);
75 58
76/* Module Parameters */
77module_param(debug, int, 0);
78MODULE_PARM_DESC(debug, "Debug enabled or not");
79
80#define WATCHDOG_HEARTBEAT 0 /* default heartbeat = 59#define WATCHDOG_HEARTBEAT 0 /* default heartbeat =
81 delay-time from dip-switches */ 60 delay-time from dip-switches */
82static int heartbeat = WATCHDOG_HEARTBEAT; 61static int heartbeat = WATCHDOG_HEARTBEAT;
@@ -193,6 +172,7 @@ static void usb_pcwd_intr_done(struct urb *urb)
193 struct usb_pcwd_private *usb_pcwd = 172 struct usb_pcwd_private *usb_pcwd =
194 (struct usb_pcwd_private *)urb->context; 173 (struct usb_pcwd_private *)urb->context;
195 unsigned char *data = usb_pcwd->intr_buffer; 174 unsigned char *data = usb_pcwd->intr_buffer;
175 struct device *dev = &usb_pcwd->interface->dev;
196 int retval; 176 int retval;
197 177
198 switch (urb->status) { 178 switch (urb->status) {
@@ -202,17 +182,17 @@ static void usb_pcwd_intr_done(struct urb *urb)
202 case -ENOENT: 182 case -ENOENT:
203 case -ESHUTDOWN: 183 case -ESHUTDOWN:
204 /* this urb is terminated, clean up */ 184 /* this urb is terminated, clean up */
205 dbg("%s - urb shutting down with status: %d", __func__, 185 dev_dbg(dev, "%s - urb shutting down with status: %d",
206 urb->status); 186 __func__, urb->status);
207 return; 187 return;
208 /* -EPIPE: should clear the halt */ 188 /* -EPIPE: should clear the halt */
209 default: /* error */ 189 default: /* error */
210 dbg("%s - nonzero urb status received: %d", __func__, 190 dev_dbg(dev, "%s - nonzero urb status received: %d",
211 urb->status); 191 __func__, urb->status);
212 goto resubmit; 192 goto resubmit;
213 } 193 }
214 194
215 dbg("received following data cmd=0x%02x msb=0x%02x lsb=0x%02x", 195 dev_dbg(dev, "received following data cmd=0x%02x msb=0x%02x lsb=0x%02x",
216 data[0], data[1], data[2]); 196 data[0], data[1], data[2]);
217 197
218 usb_pcwd->cmd_command = data[0]; 198 usb_pcwd->cmd_command = data[0];
@@ -251,7 +231,8 @@ static int usb_pcwd_send_command(struct usb_pcwd_private *usb_pcwd,
251 buf[2] = *lsb; /* Byte 2 = Data LSB */ 231 buf[2] = *lsb; /* Byte 2 = Data LSB */
252 buf[3] = buf[4] = buf[5] = 0; /* All other bytes not used */ 232 buf[3] = buf[4] = buf[5] = 0; /* All other bytes not used */
253 233
254 dbg("sending following data cmd=0x%02x msb=0x%02x lsb=0x%02x", 234 dev_dbg(&usb_pcwd->interface->dev,
235 "sending following data cmd=0x%02x msb=0x%02x lsb=0x%02x",
255 buf[0], buf[1], buf[2]); 236 buf[0], buf[1], buf[2]);
256 237
257 atomic_set(&usb_pcwd->cmd_received, 0); 238 atomic_set(&usb_pcwd->cmd_received, 0);
@@ -260,8 +241,9 @@ static int usb_pcwd_send_command(struct usb_pcwd_private *usb_pcwd,
260 HID_REQ_SET_REPORT, HID_DT_REPORT, 241 HID_REQ_SET_REPORT, HID_DT_REPORT,
261 0x0200, usb_pcwd->interface_number, buf, 6, 242 0x0200, usb_pcwd->interface_number, buf, 6,
262 USB_COMMAND_TIMEOUT) != 6) { 243 USB_COMMAND_TIMEOUT) != 6) {
263 dbg("usb_pcwd_send_command: error in usb_control_msg for " 244 dev_dbg(&usb_pcwd->interface->dev,
264 "cmd 0x%x 0x%x 0x%x\n", cmd, *msb, *lsb); 245 "usb_pcwd_send_command: error in usb_control_msg for cmd 0x%x 0x%x 0x%x\n",
246 cmd, *msb, *lsb);
265 } 247 }
266 /* wait till the usb card processed the command, 248 /* wait till the usb card processed the command,
267 * with a max. timeout of USB_COMMAND_TIMEOUT */ 249 * with a max. timeout of USB_COMMAND_TIMEOUT */
diff --git a/firmware/emi62/bitstream.HEX b/firmware/emi62/bitstream.HEX
index 3c6ecc35eaab..a0f4f570f076 100644
--- a/firmware/emi62/bitstream.HEX
+++ b/firmware/emi62/bitstream.HEX
@@ -1,4372 +1,6107 @@
1:10801000FFFFFFFFAA9955663000800100000007AE 1:10801000FFFFFFFFAA9955663000800100000007AE
2:10802000300160010000000B3001200100803F2D75 2:10802000300160010000000D3001200100803F2D73
3:108030003000C00100000000300080010000000995 3:108030003000C00100000000300080010000000995
4:10804000300020010000000030008001000000012D 4:10804000300020010000000030008001000000012D
5:108050003000400050003E040812100000000000F4 5:10805000300040005000581A80121000000000004C
6:108060000000000000000000000000000000000010 6:108060000000000000000000000000000000000010
7:1080700000000000000000000000000000004004BC 7:108070000000000000000000000000000000000000
8:10808000800000000000000000121000000000004E 8:10808000000000000000014004800000000000002B
9:1080900000000000000000000000000000000000E0 9:1080900000121000000000000000000000000000BE
10:1080A000000000000000000000000000000040840C 10:1080A00000000000000000000000000000000000D0
11:1080B000800000000000000000020000000000003E 11:1080B0000000000000000000000000000000014877
12:1080C00000000000000000000000000000000000B0 12:1080C000048000000000000000020000000000002A
13:1080D0000000000000000000000000000000080098 13:1080D00000000000000000000000000000000000A0
14:1080E000C0000000000000000002000000000000CE 14:1080E0000000000000000000000000000000000090
15:1080F0000000000000000000000000000000000080 15:1080F000000000000000000000C0000000000000C0
16:10810000000000000000000000000000000000006F 16:10810000000200000000000000000000000000006D
17:1081100080000000000000000012000000000000CD 17:10811000000000000000000000000000000000005F
18:10812000000000000000000000000000000000004F 18:10812000000000000000000000000000000000004F
19:10813000000000000000000000000000000000043B 19:1081300000800000000000000012000000000000AD
20:108140008000000000000000081300000000000094 20:10814000000000000000000000000000000000002F
21:10815000000000000000000000000000000000001F 21:10815000000000000000000000000000000000001F
22:10816000000000000000000000000000000000000F 22:10816000000000000000000004800000000000008B
23:10817000900000000000000000120000000000005D 23:10817000801200000000000000000000000000006D
24:1081800000000000000000000000000000000000EF 24:1081800000000000000000000000000000000000EF
25:10819000000000000000000000000000000000845B 25:1081900000000000000000000000000000000000DF
26:1081A0009000000000000000F710011400250005F9 26:1081A000009000000000000000120000000000002D
27:1081B0004001500094001500074001D000940025B4 27:1081B00000000000000000000000000000000000BF
28:1081C00080016002D800F6002F8002E004D8374416 28:1081C00000000000000000000000000000000000AF
29:1081D0009000000000000000C005F200CC903920A3 29:1081D0000000000000000008049000000000000003
30:1081E0000D9803D200E78037040EF1837E00DF9004 30:1081E0007F100034000D00034000D0003400050073
31:1081F00031E48F79037C20DF2233C00CF022300081 31:1081F000074001D00074001D00074001D00074004A
32:108200007000000000000000801062008024222026 32:108200001D8007E001B8006E001B8006E0013837D2
33:10821000089812E2008B8120940874022E008A01D3 33:10821000C490000000000000C001FC80FB3036C8A4
34:1082200022C80892023D808B60228008B0022004A0 34:108220004E0903FC84FF103BC00EC8072280FF22CA
35:1082300030000000000000008805C800A0002000F9 35:1082300033C00FC8336E00FB803F200DC253D48083
36:108240000B1002C000A10024094A32024800B1000C 36:10824000CC3A3F000CF103F0007000000000000089
37:1082500062C009A046CC2493492A8048302262019A 37:108250008000ED60BF6023F00D82123C608F7023C0
38:108260007000000000000000C015A812A800220045 38:10826000F0088802A540BFD063D60B88022E0CBB55
39:10827000089002E0008980224408B012A800A940BA 39:10827000802E20888D02E64080602E300AB11220C8
40:1082800022C0089082AC009B042AC408B00270048B 40:1082800004300000000000008805CC80A3402CC40E
41:10829000600000000000000000148400E980B26467 41:108290004A00128C88A32220C40A904204A9A30099
42:1082A0004DA003EA20E9C036400EB0034400FB9025 42:1082A00024C88B8002CC00B3002E01090802840090
43:1082B000B2880DBC03EC085B0038602CB06340044E 43:1082B00080202C100A3242220170000000000000D1
44:1082C0007000000000000000E001B426DD9037409F 44:1082C000C015AC04B3002AC00808A28C008B00A221
45:1082D0004FE013F280FD003DA00D700375005E00BD 45:1082D000C1109842A700BB0166C10B8002AC04BB71
46:1082E0003FA40DF9035C10EB0037200F3003B800FA 46:1082E000002E000BB812E40289080E400AB00230DA
47:1082F00060000000000000004010AC00E980324047 47:1082F00004600000000000000010AC00EB003EC075
48:108300000CA183E800E90032420EB003AC48E9005A 48:108300004AB823EC18EB0032C00E2C122210EB00FE
49:108310003A800EA403EC00EB00B2030EB00B100485 49:1083100026C04F0043ED00FB002E240D8013E40027
50:108320002000000000000000C8052E8089D12040F8 50:10832000C8D07C120EB003400470000000000000B2
51:1083300008A002C0008180225808F5022F408B005F 51:10833000E100BC00FF0035C04FE0037C08FF0117DF
52:1083400020C00830437C008700224008F002320041 52:10834000C24DC003F408F7003BC007C0037C80FFA8
53:108350004000000000000000E00542019A4428A20D 53:10835000243F400CF001F404BC083F280FF00378E0
54:10836000081802C080A180A0000830028E00AB0077 54:1083600000600000000000004010AC08FB043AC8A8
55:108370002C400A30020C00A30020440A30023800CE 55:108370000F9403EC10F30034C00EB0036104FB0053
56:1083800050000000000000006001320096822BA225 56:1083800036C00EA3032C80FB723E020F8A03E40268
57:10839000885A02F200058029A0087842BE008E8427 57:10839000C9802A500FB003D0042000000000000064
58:1083A0002F610AD8024E10A78020280878021800F2 58:1083A000CA443C00BF0003C00880037C00BF003FFC
59:1083B000400000000000000048080800F224388057 59:1083B000E20890436000BF0037C00890016D00BB29
60:1083C0002C1A03C400E058A0802E30038841E30239 60:1083C000402C100BB042D7C089002A7C0BF002F27F
61:1083D0003C400620038C00E30010000E31431202E3 61:1083D0000040000000000000E2054C00B30020D582
62:1083E0000000000000000000401D9800EE013784EE 62:1083E0004A00000C0493000CF00B09020801B320B2
63:1083F0009FD903F048FD1037C007B0035C00F610AA 63:1083F00028C00A0C0A0E00B3002430090002C6107F
64:1084000033C00DE103ED20DF103F480FF023D0060D 64:10840000804220008BB002F8005000000000000005
65:108410006000000000000000A805E402CB8030C02E 65:1084100022011E00B79421E448D9125E40B790298A
66:108420000CA003E202C9003A400DB6036400EB0061 66:10842000E08B6912D68037822CE8084A025E00B7DA
67:108430003EC00FB003ED00FB013EE00CB002EA00CD 67:10843000A42D200B7902D608869029A00B7902D8AA
68:10844000700000000000000048119400870021C067 68:10844000004000000000000048000C00FBA028E8ED
69:10845000286002D00085002D8048F0821C00B70003 69:108450000E2A028C00D30064C00F00430EC4F30048
70:108460002D000B5002DC00B7A02F80287A02D20426 70:1084600078EC0E0A430E2073E03C024F0003C44038
71:108470006000000000000000C100BE00878021E015 71:10847000C30038C00F3003D202000000000000002B
72:10848000286802D70084802DE04979065309B58019 72:10848000401DBC00FF00BCCC0EB003EC20FB003C48
73:108490002DE20B7802DE80B7902DB0087902F00053 73:10849000C20C20036C50F30036C40F4003FC08FFED
74:1084A00020000000000000004814CC10830128C800 74:1084A0001A3F800FF001E430FF023FC00FF063D0AD
75:1084B000082002C20681002CC88830620E21B3A0B9 75:1084B0000660000000000000A815EC40FB00B2D8E8
76:1084C0002CC10BB602CC00B3002CE0083002D20461 76:1084C0000CB0012D20DB013AC88C3803A800FB4812
77:1084D0003000000000000000E815A800CA40B0808D 77:1084D0003EC90F8003EC40FB013E000F0803A408D7
78:1084E0000C2C02F800C6203F900DA0037B01EEE0AB 78:1084E000FA80B2800FB1026A007000000000000044
79:1084F0003FB40FEC03E800FA003FA00CA003FA041D 79:1084F00048191C80BF3021CA08F00A0C808F502117
80:1085000060000000000000004800E300F8092600B9 80:10850000C20870509C00B70039C40B40029C04B7ED
81:108510000FC183E010F8403C000F8003E001F80039 81:108510002025400B70021480B60021800BF8021257
82:108520003E000F8103E004F8003E100F8003D200EC 82:108520000460000000000000C0009E00B7B021EC15
83:1085300030000000000000000810E402C9003E40C6 83:108530000B7812DE8497800DE028F802DE00B790F9
84:108540004F906326843902B2400C91032400F90055 84:108540002DE40B68825E80B7A029200B48029600BC
85:108550003E400F90032400F1003A440F9003C20400 85:10855000B78021E10B7A027040200000000000008B
86:1085600030000000000000008004450089402E40DB 86:108560004804CC00B30020C00B38028C04830028E0
87:1085700008920A2400B931226088948A2420B90024 87:10857000C08839024C40B30428C01B10028C01B3E0
88:108580002E400B90022400B90022680B9002E000FC 88:108580000424884B31020400B38020F20B30020235
89:108590001000000000000000180524A08D842F406A 89:108590002430000000000000E805A800FA00328046
90:1085A0000BD1022400B900224A0810022C40B90065 90:1085A0000FE803E800DA013A808CED03FB04FA00DF
91:1085B0002E400B90022400B9002A400B9002C60006 91:1085B0003E800F6C03FBC8BEC21F800FE503A800FE
92:1085C00040000000000000000804140085802D40D9 92:1085C000FE4833804FA0037A0460000000000000E2
93:1085D000085002040CB900A0500814220400B10095 93:1085D0004800E000F8003C000C81936000F8013690
94:1085E0002C400B10020400B128204A0B1302C201D8 94:1085E000100F8003A020F8002A018F8413E100F807
95:1085F0000000000000000000B80D6000C0503E8088 95:1085F0001836000F8013E000F8203E140F8003D2DD
96:108600000FC0432000F80030002C80232000F851D8 96:1086000080300000000000000800E400F100AA40F3
97:108610003E148F850B2140F8703A080F8483EE03D7 97:108610000C90032400E10038401C9003E400F9A012
98:108620005000000000000000981DC400F9043E4006 98:108620003A40479A93A280F8103E400B9403E640EC
99:108630000F9023D400FD003F500F9403F404FD007D 99:10863000F9C03E680B100302843000000000000007
100:108640003F418FD043E50CF9023F4A0F9203E60207 100:108640008004E404B9002240089002240489003622
101:1086500070000000000000008805D401FD003D40CE 101:1086500040089002E404B9802E404F94036110E872
102:108660000CD013F400D500336A1CDC833400D10431 102:10866000402E400B9042E604B9002E400B900220B1
103:108670003E500C9103E6C0DDB0336A2C9C83E600CB 103:10867000001000000000000018042400B90022408F
104:1086800070000000000000003810E009F8802E00A3 104:108680000A10520404A9042A4008B002E401B90007
105:10869000888000E800BA0022B0088E02280088A86E 105:108690002E400B9002A80DB8402E40099402E50030
106:1086A0002628088A22E20088E42230088C02CE04C0 106:1086A000B9042E400B9002060040000000000000BC
107:1086B00030000000000000000805C400B1282E4072 107:1086B00008040480B12020C80A10420490812004DC
108:1086C000081002C400990020424810026401918001 108:1086C000C8083026C400B1202C480B90024501B1E7
109:1086D0002C48081002C4C08140204A081202C2017E 109:1086D000402C400B1282C400B12B2C4A0B12820298
110:1086E00070000000000000001815A494A9022E409C 110:1086E0000100000000000000B8082148F8503200E6
111:1086F0000A90026400B90082600890026600891046 111:1086F0004E850B2140A8522A00088023E140F80053
112:108700002462089002E40089022240189002C60404 112:108700003A140FA043A800F8003E000F8203E000D7
113:108710006000000000000000A015E600B9043E4023 113:10871000F0203E884F820B2E035000000000000026
114:108720000C9013E400D1C012502890034400D900EB 114:108720009819E440F91134442DD003E450791038FD
115:108730003E40289203E402D90032428C9012E804B1 115:10873000442FD003F510F9103E45065003E500E93B
116:1087400070000000000000002801A620F9003E4152 116:10874000403F400FD043F500FD283F400F9283E6A5
117:108750002D9003E400F9203E404F9001A400F90061 117:1087500006700000000000000801E600D9903769AB
118:1087600036408F9207E400F100BE400F9003CA002C 118:108760004D90236780D9E037680ED007A4000586B6
119:1087700060000000000000002810A000C8003E209B 119:108770003E660D50232600C9823D400DD8073602C3
120:108780000C8003E040F80036122C0003E0C0F80033 120:10878000CDC033600C9C03060070000000000000A8
121:1087900032100D8403A000F8023E080F8000CA04C6 121:108790003810E28088A22210288A82238488A022AE
122:1087A000200000000000000028053A908E002DA057 122:1087A00014488042820088402E30088002A200D8FF
123:1087B00080E802FA00BE40238008E802FA008A003E 123:1087B00090260008840A2100C8A0A214288C020E6A
124:1087C000368008A002E800BA002F800BA0038A00C0 124:1087C00004300000000000000805C52091402C4442
125:1087D00040000000000000002805460283002C80B5 125:1087D0001810028504B1400C400A10068430814014
126:1087E000082242C680B1602EF4083822CE00A300D1 126:1087E0002C4859101A046081092E401B14022500E0
127:1087F00020C0083002AC00B1002E400B3002CA008D 127:1087F00091E02060081602000170000000000000F7
128:108800005000000000000000A0011E0285012DC2E2 128:108800001815A40081002A41089002A400A1002AA2
129:10881000A84402D400BD0129401868D2DC008F8032 129:108810004108B08224118B002E40189102A00498C8
130:1088200025CC287342DC80B5302DC01B7202E800D5 130:10882000202E541B90822C0089102244889002062E
131:108830004000000000000000A8081E04C6823DE0C1 131:108830000460000000000000A015E400D9003E40E4
132:108840000C4812D610F5803CA00C7003DE00E790B7 132:108840004C9003A410F9003E408E1002A4C2C9004F
133:1088500023EA047A039E00F5803DE00F7A03EA02E2 133:108850003E400D16130184C8203C600F90120400A6
134:108860000000000000000000080DAC009C003EC0AD 134:10886000D94032500C9003288470000000000000B2
135:108870000F8003E410F90036010FA003C000EB00E5 135:1088700028018400F90036404F994A44009900B419
136:108880003ED84EB083EC00F9003EC00FB4438206E0 136:10888000400F9013E600F9003C400F9003E300F81E
137:108890006000000000000000C005DE00CF8431E071 137:108890000136400C9903E402F9803E604F900BCA08
138:1088A0000EC843D600CD8033E0CDD9033A00FF880F 138:1088A00000600000000000002810A000D8003C007C
139:1088B00033E00FF913FE24FD803F200CF6831000F7 139:1088B0001D80032000E80032000C8483E010E820D3
140:1088C0007000000000000000A8119C00850021C479 140:1088C00032008E84032180C8003A190F0403E0248B
141:1088D000284082D000D500238048C9021C00B70080 141:1088D000F0023C000F80138A04200000000000001A
142:1088E00021C00B7102DE80B5102DC028F0022A04D1 142:1088E000280528028A010FA268A00028008A0077C4
143:1088F000600000000000000010009C00960021C0F5 143:1088F0008068E012E800DE00368108E0037A08AE06
144:108900000A4102F5408D0021400952029820B7002B 144:10890000C42F8008ED02FA00BEA03B800BA0420AF3
145:1089100021C00B7006DC80B5002DC0087002040079 145:10891000004000000000000028854C0093002CC09F
146:1089200020000000000000006014CC10980000C07F 146:1089200088B0020C14A30420C4183802EC1093542D
147:10893000880482C000910420030900028A00B30A5F 147:1089300028C00A00024E00834968C0023942CE4076
148:1089400020C48B3402CC00B9002CC00030021804C3 148:10894000B3002CE60BB0028B0050000000000000CA
149:108950003000000000000000F815AC00DB00B0C0E3 149:1089500020011C0887202C8018F2221C008710217F
150:108960000E9C02C500C110B2C00DB00BA708FF00DD 150:10896000C0087082DC8096802DC00A40027D4027BE
151:10897000B3C00FFA03FC00FD003ED40CF00B2E0434 151:10897000646DD0486042D805B60429C04B72022805
152:1089800060000000000000008000EC04ED003E40AC 152:10898000004000000000000028083E88D7E03DE0DD
153:108990000F8403E540F9403E60CEB4436400FB80A1 153:10899000087C423E00E38220E00C6803DF04D780BD
154:1089A0003EC20FB013EC00F9023EC04FB003E1002D 154:1089A0003BE04E480A5E80C7C219E00E7803D60845
155:1089B00030000000000000009010FF00CE0033C027 155:1089B000F7803DE00FF803AA02000000000000006D
156:1089C0000EC0077404EC0011800CCA03FE60FF00A7 156:1089C000081DAC40FB407E800E3683ED40DB603EF0
157:1089D0003FC00FF0833C00DD00B3502CF0032004B7 157:1089D000800FA003ED28DA0032C40CB00BCC00FBF2
158:1089E000300000000000000081004C048B0B22705E 158:1089E000003EC00E8013E010F8003E000FB153C2ED
159:1089F00008080367208A88A200288402E700BB00D9 159:1089F00006600000000000004005FE00FFC033E0FC
160:108A00003EC00BB0022C00B900226108B0036040E8 160:108A00000CF9037F04CFD03FE40FB803FE00FF94BE
161:108A1000100000000000000080052C008B2022E2E6 161:108A10003FE00FC8037E10F3803BE00FF803FE48F1
162:108A20000A8C022600A9802AC008B442ED00BB00CF 162:108A2000ED80332404F803300070000000000000E3
163:108A30002EC00B30022C00B90020800830026000EC 163:108A3000A8119C80BF04212808F8021EC0CF9021F5
164:108A4000400000000000000008040E018100A0C0EA 164:108A40004C0B5A42DE00B7802CE80B04021C00B726
165:108A5000088102440081002881083202CC00B30062 165:108A5000A035108F7113DEC0841021800D71022AA1
166:108A600028C00B30020C80B10020C0083012420137 166:108A6000046000000000000080409C08B70025C89A
167:108A70000000000000000000800D6C00C20132C048 167:108A7000087102CC80970029C08B7206DC08B50013
168:108A80002E80162C08E9003A400C8003EC00F70019 168:108A80002DC80B40021C40BF1021C00B7402D480C3
169:108A90002FC00FF00B2C00D90030400CF003600306 169:108A9000A7402141087002040020000000000000EF
170:108AA0005000000000000000A00DF808FF003FC0CB 170:108AA0006014CC00B3002400083482AC1183002091
171:108AB0000FC217FC00F70037000F8403FC00FF0013 171:108AB000004B1826CF20B1062CC10B32020E08B392
172:108AC0003FC00FF003ED00FD003F400FF003E8064C 172:108AC0008824320A301284088000A034283002182A
173:108AD0007000000000000000C005FC00CF30174807 173:108AD0000430000000000000A811BC00FF00B640F8
174:108AE0000C5903B900DF2835240D82A37C80FF00D8 174:108AE0002CF443FC01DF003A00039203FF88F900F5
175:108AF0003FC80FF203E4A0EF803FE18CD843300081 175:108AF0002FC01B0E4B2E90FBE030320B9802EC087F
176:108B000070000000000000008010ED488934A37060 176:108B00006BC032C008F0093E0460000000000000A5
177:108B100028B02360008BC0224008B4822F40BFD110 177:108B10008000EC00F3003AC00FB0016C00FB003A9B
178:108B20006FF48EBD02E700BB803AE008980A280483 178:108B2000100FB403EC00F0003CC00F800BAD20FB35
179:108B300030000000000000008805C4B09100A8507B 179:108B3000403E1007A863E000FB803ED80FB003E082
180:108B400008B202C884930024490B02024C00B3040B 180:108B400000300000000000000110FC00FF00720077
181:108B50002CC00B30428400B3002E000AB012220158 181:108B50000FF023FC00DF003F400FC003DC008F005C
182:108B60007000000000000000C011AC0299182A44F7 182:108B600033C10CC003BE00FF903B280E59032E00FA
183:108B700008B882A201BB0028600AA0126C00BB00EA 183:108B70007B0032C40FB003D00430000000000000BE
184:108B80006EC00AB002E400BB002A002AB00238041A 184:108B8000C1046C00BB0062A00FB002EC098B002E88
185:108B900060000000000000004011E408DAC03A6004 185:108B9000300BA803AC00FAC122C1088C022C00B330
186:108BA0000C180AEB04DB0036E00785836C00FB0041 186:108BA000812A000D88B22200B3C022C80BB04261F6
187:108BB0002EC00FB043E400EB003E880E18031004F3 187:108BB000401000000000000080056C00BB01226234
188:108BC0007000000000000000E0419C10E9003760E8 188:108BC0000BB002EC048B002EA2498826EC00A88092
189:108BD00087F0177000CF0137C04C9803BC00FB0032 189:108BD00022C028820AACA0BB0822C008800A2884D0
190:108BE0003FC20FF003E400FF403FE40DD903F00063 190:108BE000B9C0A2000BB002E000400000000000008D
191:108BF00060000000000000004010A400F4003040BD 191:108BF00008040C00B31020480A3202CC8083012400
192:108C00000FB4039900FB003EC00D04232C08FB8821 192:108C0000000B02068C60A02020C80801020C00B3F3
193:108C100032C00FB003E600DB103E020FB083D00479 193:108C10000028000920020880B100A0800B30024229
194:108C20002000000000000000C8052C00B950A24838 194:108C2000010000000000000000096C00FF00A20E1F
195:108C30008BB0032000D7802ED80080023C00BF807C 195:108C30000BF103FC08CF203EC00F8003FC84A8206A
196:108C400023E88BF002F4408B400C4203B602F200A2 196:108C4000B2C88C8003AC44FB703AC00E90032CA4D5
197:108C50004000000000000000E0054C00B24400C8E5 197:108C5000FB00B2400FB003C0035000000000000052
198:108C60000B30128C00A38024C80B000ACC00B34444 198:108C6000A01DFC00FF263E000FB613ED00FB103FD9
199:108C700004C01B3602C501830C2CA00B3002F80087 199:108C7000000FC113AC80F8123EC64F4243FC04FF04
200:108C8000500000000000000020011E08B790216481 200:108C8000313F000FF003EC00FF00BFC08FF003E89E
201:108C90000BF8024A0497812FE40A78029E00B780FD 201:108C90000670000000000000C001FC40FC8036C8E7
202:108CA00021E08B7882D68687842DA00B7802C000C5 202:108CA0000F0903C200F8C033CC2C4C036390E09052
203:108CB000400000000000000048080400F20030C03E 203:108CB0003AC00D500B3C04DF643FC88DF1432C00DB
204:108CC0000F30038C00E30A3CC00F18038C00F30242 204:108CC000D50033C045F223700070000000000000A2
205:108CD00030C01F3001C680C3003CC00F1203DA024F 205:108CD0008010ED80BA0221DE8B8222E020B0002BD2
206:108CE0000000000000000000400DBC00FF003F41FC 206:108CE000EC098002E340BA202FDC0898122C008B9C
207:108CF0000FF003B808FF083FC00DF0033C20FF0849 207:108CF000512AD00872222E008D8021D008B6822001
208:108D00003BD20FF003F440EF003FC40FD003D00676 208:108D000004300000000000008805CC40B92824C0D1
209:108D10006000000000000000A805E400FE0032C270 209:108D10004A12128885A82020C00B2202C091A1000F
210:108D20000C300B2600FB8036C00DA003EC00FBE0EE 210:108D200028C20B00128C40A32020C40B300A0C1167
211:108D300032D00FB8436444DB043E800FB003E2003E 211:108D3000990020C5090102620170000000000000D6
212:108D4000700000000000000048119C00B700A1C0A6 212:108D4000C011AC00B88022C00B8802EE01B8C12A65
213:108D50008870031000B72021C0087002DC80B33097 213:108D5000C01BA806E200BB802EC08A8002AC00AB1C
214:108D600031C80B7402140087402DC04B7002D20032 214:108D6000002EC00AB0022C00990024C008800230F6
215:108D70006000000000000000C0009620B68020E0E7 215:108D700004600000000000004015EC00B08036C028
216:108D800028F8029410B78127E2097802DE00B7A024 216:108D80000EA813E285F3C032C00E9C23E724E882CC
217:108D9000A9E80B3802760087802DA00B5802F0005E 217:108D90003AC10F9403AC02EB003EC00FB0032E109B
218:108DA00020000000000000004814CE10B30020C4D2 218:108DA0005100B2C00DB0035004700000000000007C
219:108DB0000820028010B30022C808B002CC11B30210 219:108DB000E001BC00FF003FC08FD003F004FD043F82
220:108DC00028C00B3002040093802CD20B1002D20476 220:108DC000C04CC003F010FC001FC00DD1231C00C715
221:108DD0003000000000000000E815A800FE4032A0AE 221:108DD0000039C00DF083FE44ED003BC00F7403F872
222:108DE0000CE4039880FA0037A00DE083E800FE0051 222:108DE00000600000000000004010AC00F901BAC1B2
223:108DF0003A800BA0036800D8A03F900FA003FA04AC 223:108DF0000CB003A108FA0030C88F94032500F900D5
224:108E000060000000000000004800E008F8083E0094 224:108E00003CC00F0483EC00FB003EE00F710B2C40D4
225:108E10000F80032000F8403E000F8003E000F804BC 225:108E1000FD0837C04E9103900420000000000000C0
226:108E200030100F8003E002E8003E000F8003D20004 226:108E2000C8053C00B90023C00890022400C80037E0
227:108E300030000000000000000810E400F1003240A3 227:108E3000F00B80016400490233C0849C033C00BFF6
228:108E40000E9083A400C9803E400E9003A400F90058 228:108E4000020FD008F4020E10BD8033E008900A3201
229:108E50003E400C9003E400C8003E408F90030204A3 229:108E50000040000000000000E0054C00B00620C00B
230:108E6000300000000000000080046400B940A062EF 230:108E60000800428400A00020F00B0022CC009000FB
231:108E7000081002241089002E400890022400B90036 231:108E700028C0023D028C00B3002CC29A38020604BE
232:108E80002E52089402C40089402E400B100360103B 232:108E8000B11220E00830023800500000000000005D
233:108E9000100000000000000018052400B91822444A 233:108E900020011E00B68021E028EA02368086906517
234:108EA0000A9002AC0089102EC00A9002A400B9807A 234:108EA000E01BDA065E019E8425EC0A78025E00B7BC
235:108EB0002E60089802E60289082E400B90020600F8 235:108EB000802DE008794A1640BD8025E00838020878
236:108EC000400000000000000008040480B120A04819 236:108EC000004000000000000048080C00FB0028E003
237:108ED000089002240881232C500810020480B1203D 237:108ED0000818028A88A1A020C21F2A23E6C8F0C071
238:108EE0002C48281202E48081202C400B9802420575 238:108EE0003AED4E34028C08F3811EC00E30030EC0E2
239:108EF0000000000000000000B80D6140F850320092 239:108EF000F100B0CA0E210392020000000000000041
240:108F00000E8503A1E0CA003E000E8503A000F80014 240:108F0000401DBC08FE103FD20FE003EC04FF147EAE
241:108F10002E009CA003E000C8283E000F80032E0115 241:108F1000C00FB123FC01EE003AC40DB013BC00FF3A
242:108F20005000000000000000981DF440F5103F4480 242:108F2000003FC00EF083FC0CFD103BC02FE103D0CE
243:108F30000FD003F400F1103D408FD403E450F9103A 243:108F30000660000000000000A805EC40F08032D080
244:108F40003E450F9103D440FC003FC08FD023E60480 244:108F40000CA0036C00F38032DA0FB003EC00FB00DE
245:108F500070000000000000001805E620CDA8334096 245:108F50003ECC4C98132C10FB043EC40CF283A6109C
246:108F60008DD0032680CD003D500C9A036400F9A0FB 246:108F6000DD203FD10CB003EA0070000000000000DB
247:108F70007A6A0F9A63E680C9803E400F900306002C 247:108F700048119C80B70021C80C7002DC08B70021A2
248:108F800070000000000000003810E10088E03600AA 248:108F8000C80E7022D800B7002CC20A700A1F08B79A
249:108F900008800A2142C8002E290CA4422000B840B3 249:108F90000039C80A70021400C5692CCA2A7002D2AE
250:108FA0002E000B8102E10088023A010BC0020E0480 250:108FA0000460000000000000C0009E00BF8164E17A
251:108FB00030000000000000000805C40281082440C1 251:108FB0000878025A01BF8021EC4B78469F08378021
252:108FC000091002040091002C404B14024400B5101B 252:108FC0002DE88818021E81B7B02DE0097A028E00C4
253:108FD00029400B5002F500B5002D400BD0020201D4 253:108FD00095A02DE4087802F00020000000000000B9
254:108FE00070000000000000001811A6018900264052 254:108FE0004814EC00B36020C008B602CC00B30120E6
255:108FF000089402240189002E401A90026C00BF02DE 255:108FF000C08AB086CF00BB106CC10A38020C01B326
256:109000002F400BD002F402BD802B408BD83A0604CF 256:109000000228C00BB00A0C0081002EC00AB482D224
257:109010006000000000000000A015E400C905364112 257:109010000430000000000000E815A800FE40B68003
258:109020000D1C032400D9003E422F94036400F90074 258:109020000CE4037880FE7432800BE603F900FE0046
259:109030003A400F9003C400F9003E700F100328045B 259:109030003E800CE0032800FA003E804DA003A8000B
260:10904000700000000000000028018408F9243E4060 260:10904000DA043E800CE403FA046000000000000033
261:109050000F9103E400F9003E410D1003A400F90054 261:109050004800E000F8003E002E8023E000F8013CCC
262:109060003E400F9003E400C9003E640F9003CA0025 262:10906000000E8003E020F8203E018F8903E000F825
263:1090700060000000000000002810A008C880320234 263:10907000003A100E8001E000E8407E004F8003D2ED
264:109080000F80030000C8083A10CE8403E000FC0003 264:1090800000300000000000000810E402C9017E402A
265:109090003F008FC003F080FC003F180FC043CA049C 265:109090002C900B2400F9003E68059013A404D9001D
266:1090A0002000000000000000280528008E00A1809C 266:1090A00032410E9103E400F9003E600E900324006B
267:1090B0000BE0022800DEC2239000A002E800BA0004 267:1090B000F10032406890438204300000000000005C
268:1090C0002E800BA002E800FA002E800BA002CA003E 268:1090C0008004640089006E400890422400B9002E9C
269:1090D000400000000000000028054C00998160C09D 269:1090D000708890032400B9002240089812E400B977
270:1090E0000B10020C0090102AFC0B3002CC00B300D5 270:1090E000002E400A900A2600B980A2400890122063
271:1090F0002CC00B3002CC00B3002CC00B3002CA00D5 271:1090F00000100000000000001805240089042C4026
272:109100005000000000000000A0011C82954021C01A 272:109100000890022401B9002A400BB002A401B90062
273:109110000B50021C8090802301097212DC00B60003 273:10911000E0400A9082A400B9002C480A98022480FA
274:109120002D000B4002D000B4092D004B4082E80016 274:10912000392022402A900286004000000000000002
275:109130004000000000000000A8083E80DD80B1E093 275:109130000804048081002C480810120410B1042C8B
276:109140000FDA030F80D48039E00B7A03DE00F5805C 276:10914000D80A10020400B1002048081002C480B1FF
277:109150003D200F4803D610F6813DE08F6803EA02F8 277:10915000222C508A328205A0B12A204A0A128202A9
278:109160000000000000000000081DAC00ED003E0003 278:109160000100000000000000B80D6150C8522E142C
279:109170000F910BEC10F8003E000EB003EC00F8006D 279:109170000C85032140F8503A001F8503A140F850A8
280:109180003EC04FB003E800E9013E000F9003C20665 280:1091800032140E8003A140F8503C800E0203208070
281:1091900060000000000000000005FE20BF8133A435 281:10919000FA2032080E8213AE0350000000000000D7
282:1091A0008C19033E00CD803FE00FF8833E00EF8036 282:1091A000981DE450FD003E440FD003F400FD003E46
283:1091B0003FE00FF913FA10FD803FA40FD803C00061 283:1091B000448DD001BD00FD023E440FD400E4487947
284:1091C0007000000000000000A8119C00BF2031C208 284:1091C000143E500F92A2F408FD003E4A0DD283E6F1
285:1091D000085A023C0287002D940B700A1C4086102E 285:1091D00006700000000000001805E700F9103A6E64
286:1091E0002D000B4002D400F6002D404B6002EA0433 286:1091E0000CB103E440F9443B618E9403E400E94090
287:1091F000600000000000000000009C00B701238018 287:1091F00032660FDA0BA728C9E03F680CDA83B32088
288:109200002850021C0084002DC00B30021C00B50049 288:10920000EDA0337908D8034600700000000000008C
289:109210002D000B4006D040B4082D800B4802C00042 289:109210003810E200B8A02E38088A02E288E8812ED1
290:1092200020000000000000002014CC00B308A020A3 290:1092200014090A03E280B88032300B85022101A8BC
291:1092300008118A0E0080002C900B37020C00900061 291:10923000F4382A080ECA2390C8543438088A920E8B
292:109240002CC00B3042CC04A3802C500B3002C8043D 292:1092400004300000000000000805C500B1002840FF
293:109250003000000000000000A815BC00F98032605A 293:10925000191002C400B12028400B1006C420A1A29E
294:109260000CD4033C8088003ED00FF8032800FA009D 294:109260006C480B1002840881202C50091002C404A1
295:109270003EC00FB007EC01BB803E540FB006EA04BD 295:10927000B1002458083C02420170000000000000C8
296:1092800060000000000000008000EE08F9803AC095 296:109280001815A401B9202C40099002E410A9402E21
297:109290000F9003EC00F8403E580FB043E900EB4458 297:10929000400B9002A400B1012A400B94022400A9C3
298:1092A0003E000F8003E00DF8003E800F8003E000D9 298:1092A000002A4001105264008900264000980246BE
299:1092B00030000000000000000110DC00CF0033404F 299:1092B0000460000000000000A015E400F9613A40DD
300:1092C0000CD0033C30CC003BC02DF003D802CC00C6 300:1092C0000D9083E520F9013A402E9002E440E90137
301:1092D0003D000CC003F400EE0237400CE003C04434 301:1092D0009E400F9403A40089003E402D9002E608B2
302:1092E000300000000000000081046C18838420001E 302:1092E000B90136402C9001680470000000000000B5
303:1092F0004A10020C00A8482E6008B002E90089401C 303:1092F0002801A400F9003E402E9003E480F9003CD0
304:109300002EC008B002E810B10120800A9003A040EE 304:10930000400C9C23E400F90036400F10438400F920
305:10931000100000000000000080052C008B82220855 305:10931000023E400E90038080F9003C402F90038A6B
306:109320000890022C1488042C0808B012E8008A0067 306:1093200000600000000000002810A000C8403601C6
307:109330002EC00AB002E801B9002604089002E0003D 307:109330000D8403E100E8403E080C8003E100F800E2
308:10934000400000000000000008040C008380A2C060 308:1093400032008F8003A010F80032040E808360008A
309:109350000A92022C00A2002C00083402C8008300EC 309:10935000F8003E000C00030A04200000000000009A
310:109360002C00280002C401BA0022C0022006C2015B 310:10936000280528008A01228008A024E8000A002F8E
311:109370000000000000000000000D6C00CA00B200F8 311:10937000801AA0022800BA0016800BE0032808EA31
312:109380000C920B2C04C8043A000CB403E800C8008B 312:1093800000339008EC1B2280C6142F9108A0434A9A
313:109390002E000C8033E140E80036000C8003C0034F 313:10939000004000000000000028054C00930024C09D
314:1093A0005000000000000000A01DFC00FF003D0078 314:1093A000093012CC04A3046CC00930028C00B30055
315:1093B0000FD10BFC01FC003F000FF003D800FD00B3 315:1093B0002CC01330028C00B300E6B80A380244080F
316:1093C0003FC00FF003FC80FF003FC00FF007A8066E 316:1093C00082502CD23A30028A005000000000000087
317:1093D0007000000000000000C015F300CF80356071 317:1093D000A0010E8097B421C4497102DE8187212D3E
318:1093E0004E68435C00E78039C00CC1037E00CF3477 318:1093E000D00B7B021C01BF2029C40B30025C00A7FC
319:1093F00035E14DF2037C00DF383FC80FF803F00081 319:1093F000A121C04A708A0C8184002DD00A5002E855
320:109400007000000000000000C018C800DB8422606B 320:109400000040000000000000A8081E82DFA034EC2D
321:1094100008AC0A2C008B8022300891222C90276106 321:109410000D7902FE80E7E82FA0097A029E00F7A2EC
322:1094200022CA88FC22BF008B622FD009B803B00487 322:1094200025EA0B48039E04FFC065E40E68035F0055
323:109430003000000000000000C805E280A9022440BE 323:10943000E4803DE00EF803AA0200000000000000F6
324:109440008234420400A90028C54832024C208330EF 324:10944000081DAC48EB053ED90EB203EC00FB603EB4
325:1094500020C00831020D00B3202CC40B3002F201F1 325:10945000C00EB283AC00F350A6C04FB003AC00FB0B
326:109460007000000000000000C005AA02B9042260DC 326:10946000803FD80DA003EC0AF9003EC00D900342E6
327:1094700028B2022600898802C0083112EC008B0055 327:1094700006600000000000000005FE00BB903EE01A
328:109480002AD008B002AC002B002EC00BB002B004F2 328:109480000839039E20CF8277E01FF803EE00FFC06B
329:109490006000000000000000C005E200E30036208C 329:109490003FE50DF903EE00FB9037A008F80F1E0022
330:1094A0000EA4636E00E1C01AC10C80036870CB008B 330:1094A000CC9433600DF803C0007000000000000091
331:1094B00036800DB0034C00FB043EC10FB003D00456 331:1094B000A8119C00B7902FE4087A021E008F122595
332:1094C0007000000000000000E001B804DF003F0071 332:1094C000D80BBB021E00B7002DE8087D82DE40BB32
333:1094D0000FE803FC00FD003F002B98033A007700E3 333:1094D000A027900A76025C80850037C44D7103EAAC
334:1094E00027E40FF003FC00DF003EC00DF043F8005E 334:1094E000046000000000000000009C00B7202DC0B8
335:1094F00060000000000000005000A468CB203A90FB 335:1094F00029F222BC80970025410B70129C00B7080E
336:109500000F24A3AC00E9503AC00EB4832C08EB0042 336:1095000029C0084212DC40B70029C0096022DC10E3
337:109510003A900EB08BEC80FB003EC00EB00390047E 337:1095100080002140097002C000200000000000000F
338:109520002000000000000000C8010A008BA020807D 338:109520002014CC00B3C02EC00834822D0093002438
339:109530000DA8022C04894028E808B2022C00AF00D4 339:10953000C00B30020F8013002CC00A34A2EC00B321
340:109540000280087C033D803F002FC008B002360037 340:109540000028C00B0002CC00810020C00930028935
341:109550004000000000000000E0054900034028C072 341:109550000430000000000000A811BC00FFE03FC084
342:109560002B284A2800A10068D20A2042A401A300A7 342:109560000CF483BD00DF0836400B7542FC20FF8001
343:1095700002400A34020D0033002CC00A3000B8004B 343:109570003BC02C3C03FC00BF00BEC08D900BAC0276
344:109580005000000000000000B8011A00879021E49C 344:10958000CA0022800DB002EA046000000000000062
345:109590002BC8123A0085C02B21286802B600A78488 345:109590008000EC00FB081EC00FB013EC00EB003A9B
346:1095A00023600838801E00B7802DE00878022E0066 346:1095A000100FB023AC01FB003EC03C8403EC00FB79
347:1095B000400000000000000048080800C1003854C6 347:1095B0000026400E940B2C00F9403E900E9013E0D4
348:1095C0000F26838000E03428C80E2C0B8C00E300AB 348:1095C00000300000000000000110DC02CF003FC0AE
349:1095D00078450E30038E80F3003CC80E30039202B3 349:1095D0000DF00B3C20CF003D000EF0079C01CF02A8
350:1095E0000000000000000000401DB800F5023F44EC 350:1095E0003EC00FC4033C00CF000FC00E44031F0257
351:1095F0000D9003F800BD141FC00FE1235C449F428F 351:1095F000CC003F802C7003004430000000000000CD
352:109600003FC00FF4827D40FF103FC04F7007D0066F 352:1096000081046C008B022EC00DB0022C00AB000652
353:109610006000000000000000A805E802CB0038C090 353:109610002008B003FC00AB002EC00F8006BC00ABDE
354:109620003CA003EC00E9003EC00CB0032004FB2189 354:10962000043AF00C88022C00C9803A9208900AA0F3
355:109630003E804FB403CF00CB003ECC4FB043EA0096 355:10963000401000000000000080052C00AB002EC090
356:109640007000000000000000C8919800870021C051 356:109640000930022C008B0026600BB002AC008B00AE
357:10965000084002DC04B5002D002D70021C1CB7026E 357:109650006EC00BB0422C009B004CE00A90222C0004
358:109660002DC00B7202DC0087402DCA8B7002F20401 358:109660008AC22C4008B042200040000000000000E8
359:1096700060000000000000008000BA0087882BE036 359:1096700008040C00830D2CC60931020D81A31124AE
360:10968000187822D611A4822FE00878021200B7942D 360:10968000008AB1E24C80A3002CCC0B02028C80A398
361:109690006D604B7A02DE40B7A02DE00B7806E0004B 361:109690004808C008000A0D00810028C00830028276
362:1096A00020000000000000004814C912838228D462 362:1096A0000100000000000000000D6C00CB202FC85E
363:1096B000980006EF05B1902CC109B4020C04B30167 363:1096B0008DF6132DB08F0036400FF002ADA88F103D
364:1096C0006CF00B3002CC00BB002EC00B3002D20479 364:1096C0003FCA0B80922C10DB403FC00E00032D04DC
365:1096D0003000000000000000E815B840CA803BA040 365:1096D000C8023E400CB00300035000000000000030
366:1096E0004CE502F880EE003D802CE00F3880FA0057 366:1096E000A01DFC00FF003FC80EF103EC84FF2037F3
367:1096F0003FA90FA003E800BA023E808BA003FA0442 367:1096F000000DB203BCA0FF003EC90E8003FD11FFA8
368:1097000060000000000000004800E010F8002602A1 368:10970000003BC00EC003FC80ED003BC00FF043687F
369:109710000F8403E024F8003E004F80A3E030F800FF 369:109710000670000000000000C001FC90CC923BC825
370:1097200036020F8023E00408003E000F8003D200C1 370:109720000DF0837310FF2837CA4FB203FC00DF200F
371:1097300030000000000000000810E400D900B6412D 371:10973000B3C40D6843FE14CB8433E00D7803BE0040
372:109740004E990BA40069103E400C9003A410C90070 372:10974000FF8037A00CF30330007000000000000021
373:109750003E400D9203E600F9003A400E9003C20429 373:109750008000FC48822103F40FF64220048A602B2B
374:1097600030000000000000008004640081002042FE 374:10976000DA0BF9023F048F5223D54D8802AE00DB9D
375:1097700008149A240089006E500090022410D90227 375:109770008036C00880022004B80022600D7403E027
376:109780006E400B9403A700B9002240089003E0004C 376:1097800000300000000000008805CCA0800108C067
377:109790001000000000000000180506009900A64116 377:109790004B30824290A3082CC81A30228D009300CF
378:1097A0000A90062C00A9096E5008910284048900D1 378:1097A00024C809A0120C04AB0062C009B002CC00AE
379:1097B0000E400B9402E549B9000A400A9002C60027 379:1097B000B3002880083606A20170000000000000F7
380:1097C0004000000000000000080406008100224064 380:1097C000C015AC00880822C00A301A001182000AB5
381:1097D0000812220481A1002C4008160204009120E6 381:1097D000C00BB0422C008B0026C0099102EC20BBCC
382:1097E0002C400B12428489B1202048081002C2018B 382:1097E0002866C00880026000B8002A4081B006F8F0
383:1097F0000000000000000000B80D6140D8003600F5 383:1097F00004600000000000000015EC02C8043AC03C
384:109800000A8003A140E8002E000C0023A140C850AC 384:1098000089B0036800E9C11EC10E3003EC00DB0023
385:109810002E140D8003E000F8503A000E8003EE0392 385:1098100036C10D00230E00EB8032C8CD3032EC088B
386:109820005000000000000000881DD400F500BF407B 386:10982000F3003C800CB006800470000000000000D3
387:109830000FD103F444DD023D502BD123F400F91085 387:10983000E0019C007C003FC00BB043FD00BEC4377C
388:109840003F400D9103A448F9123E4E1F9003A6021B 388:10984000C01FF0035C00FF013BC00EC803BF20DF58
389:1098500070000000000000001815F400C5043B4033 389:10985000003FD00FC013B0007C00B7400FF01BB02A
390:109860000FD803A780FD00B3680DD843A510C9A089 390:1098600000600000000000004010AC0CD84132C085
391:1098700032514F5A433600C9A07A680BD003C60153 391:109870000EB007A8016940B2C08DB0A3EC08F30098
392:1098800070000000000000007818CA8888020200FA 392:1098800032C00F8003ED00FB483AC00DB0832C00BE
393:109890008D84222342F8002204288AA2AA9488E90F 393:10989000FB203E800F7023D0042000000000000059
394:1098A00020A80A800A214080E22E280B8002CE04E4 394:1098A000C8053C00880023C008F0062C10885137FA
395:1098B00030000000000000004805C420A104A8C03A 395:1098B000C008F0077D608F0237C00B8C002D00B30D
396:1098C0000B1C2A2400390420402A1E02E480B11017 396:1098C0000038C00880822000B8002E500BF0003213
397:1098D0002A48091446040081382C5B0B1002D20080 397:1098D0000040000000000000E0054C00980028C097
398:1098E00030000000000000001805A412A924224046 398:1098E0000A30028404A30000C06839060C109320DB
399:1098F000299002240039000258081810E601B90026 399:1098F00022C09B01A08F14331428C0093C020C0124
400:10990000AA44089002240089000E410B9002C6046C 400:1099000093402C880B3002B800500000000000008B
401:109910006000000000000000A005E400E1012A64EE 401:1099100060011E10878029E00878023E00839024B1
402:109920002F94132402716012604D9000C502F9005B 402:10992000E0087810CE04079125E083C9021E04B731
403:109930003A400F90232402C9023A400F9002E804F3 403:10993000842BA408484212CCB4802D640B78021901
404:1099400050000000000000006801A400D9003E6043 404:10994000004000000000000048002C00D01028C893
405:10995000AF90836488F9203E62039083A400C9001D 405:109950000E3B028400E34030C80C38628C00530098
406:1099600036600F1003C400F9007E400F9003DA0048 406:1099600030C41F00238C3CF38018C00D30030E80E0
407:1099700060000000000000002800A100C882320042 407:10997000D3103C800F300392000000000000000074
408:109980006F0003A000D84030000E80036004F8018F 408:10998000401DBD00F912B4C007B003CC004A0077F7
409:109990003E104F808B2200F80032010E8003CA0473 409:10999000C00E71436C00F3003FD01FD053AC68FB86
410:1099A0002000000000000000280138000E00A990EF 410:1099A000183DC00FC013F050FC043F400FF403906B
411:1099B0002FE62088009E8023800AE8032800BA0052 411:1099B0000660000000000000A805ED40F8043ED25B
412:1099C00018800DEC023880BA00A28008A0038A003B 412:1099C0000FB313E010F900B2CC0EBA036D80DB02C6
413:1099D000400000000000000028056C02838020C8C1 413:1099D00032DC4F00036C04F30236400EB003CC00BF
414:1099E0000B20020C01921068C03A3C02CC103B02E2 414:1099E0004B003C800CF1036200700000000000009E
415:1099F0000CC0283C024E00B30028C0283002CA0028 415:1099F00048119C00B4002DC90B7082DC00BC04210E
416:109A00005000000000000000A001140087422BC09D 416:109A0000C44B37020CA08F7421C00B40021C81B7DD
417:109A10002970229C00B6002BC20A60861C00B72168 417:109A1000202BC0084002D00284002D400AF202121E
418:109A200029C00074025C00379101E0087402A800AC 418:109A20000460000000000000C0009E80B4C02DE46F
419:109A30004000000000000000A8081E00C78021E0D0 419:109A30000B7A02D200B58821E80A7802DE4097004E
420:109A40002F78029E00968039E02EF803DE30F7D0A2 420:109A400021E80BCC465E28B7C421F00A7802FE0854
421:109A50002DF20078035200F7A23BE00E7807EA02ED 421:109A500097842DA00878027000200000000000000C
422:109A60000000000000000000081DB400FB000CC056 422:109A60000814CC00B0C02CC09BB002CC20B3602244
423:109A70000F3003EC10D300B4C02F80036C48FB0000 423:109A7000C00B30028C00830120C01B06164F00B3C0
424:109A80003EC84D9003A400FB201EC00FB003C206C9 424:109A8000A02AF0080002E00090002C400A300202F8
425:109A900060000000000000000005FE00CC802B2CC0 425:109A90000430000000000000E815A810FEC03E8061
426:109AA0002FF8037E006E803BA10DD8433E00FF904F 426:109AA0000FA003F908FE4022800EA003E800D200B8
427:109AB00033E00FE933FE00CFC03FE20FD803C00010 427:109AB00032808FE0035800F60033B00E2002E80C2D
428:109AC0007000000000000000A811B44087002104CD 428:109AC000D2023C800CA0037A046000000000000079
429:109AD0000878021C00860021C0289002DC00B71024 429:109AD0004800E000F8203E010B8003E000F0403E2B
430:109AE00021C00F7302CC0087002DC00B5002EA008A 430:109AE000005780230000F8003E000F8403A03038A8
431:109AF000600000000000000000009D00A400294854 431:109AF000003A080FC403F000EC003F100F8003D2BF
432:109B00006AF0824C00AE00A1C42974025C40A3102C 432:109B000000300000000000000810E400D9013C48CB
433:109B100061C20B6006C80087002DC00B5002C00454 433:109B10004C900B2401C9C03240AC9003E400D94002
434:109B200020000000000000002014E601A3022040F5 434:109B200030400D9A032284C81432400E9003240062
435:109B3000283C020C00834220C8081002CD00B3006C 435:109B3000C90082682C90030204300000000000007D
436:109B400028F00B3002CC0183042CC0831002C8041F 436:109B40008004640089002E4008902224008902824B
437:109B50003000000000000000A815AA80EB0038C00B 437:109B500040089002E740898036418D1802A024A871
438:109B60000A90037C22A24032480DB00B3E00FF0059 438:109B600004624008948324008901227208900B202B
439:109B700033F40F9003EC008F023FC00F9003EA0410 439:109B700000100000000000001805040099002A40B1
440:109B800060000000000000008000E000D9023EC03C 440:109B8000289012040089002240089002A420990025
441:109B90000EB603EC00FA203EC04F2423AC60FB005D 441:109B900022401890062001880862400A9002341082
442:109BA000A6C00E9003E400FB003CC10F9003E00050 442:109BA0008D812341081002060040000000000000E3
443:109BB00030000000000000000110F802CF0033E088 443:109BB0000804048081042C48081202040283202037
444:109BC0002CF013BC002E10B1642EF0023C00FF02FA 444:109BC00048081202C48083602448193462A504A1A5
445:109BD0003FC14DEC63FE00B7003BC00CD803C0444E 445:109BD00002604008D00254008D0029400812820221
446:109BE000300000000000000080046C28818122E029 446:109BE0000100000000000000B80D6140D8503A802C
447:109BF0000A38023C04BAC932E02084022C00BB00BF 447:109BF0000C85022144885032144C8043E000D80088
448:109C00002EC00B9C02E781BB0422C00A9902E0002F 448:109C000022140C80032000C800A2000E8003200054
449:109C10001000000000000000800528408880228895 449:109C1000C80033000C82032E035000000000000037
450:109C200028BC42AC00BA002A80088402AC00BB0009 450:109C2000981DE444FD003E440F9103F410FF103EE4
451:109C30002EC00BB082E890AB0062C008B012E0000A 451:109C3000440F9103E440F9103E440BF013E510F992
452:109C400040000000000000000804000089002A8095 452:109C4000403F4A2F928AA4A2F92836400F9283A659
453:109C500028B2020C00BA0020C00800028C00B30039 453:109C500006700000000000001811E6C0C1003F6956
454:109C60002CC00B30204C14B30020C0083002C201BD 454:109C60000C9A436C00FDA03E782CD807D602D596FE
455:109C70000000000000000000000D6800C800B2C035 455:109C700032780D90032700FDA0355006D403E5008F
456:109C80002CB203AC00FA003AC04EA503BC00FF00A2 456:109C8000FD40B3400F98A3460070000000000000A4
457:109C90003FC009A003E904EF00BAC00CB001C00145 457:109C90003810E3C288882E14A88AC222A0B8C02C2B
458:109CA0001000000000000000A019FC00F50035C005 458:109CA00024488402E10098C4203C088A822380B8BA
459:109CB000AF3403FC00F40039C00FC2037C00FF0185 459:109CB000042220088803A200B8A022000B88020E0C
460:109CC0003FC00FF003FCA0FF003FC00FF003E8050A 460:109CC00004300000000000000805C480A1206C40A2
461:109CD0006000000000000000C005FC00FF293D20DE 461:109CD0000A14024404A1682C48081402C5008160DB
462:109CE0008EC1033248DC8023250EF2033CC0DF84A2 462:109CE00020481990028581B14024680A1242C4803C
463:109CF00033C90FF203FC00CF8033400CF203300075 463:109CF000B92020408B10824201700000000000005B
464:109D000070000000000000008010ECC0BB602E0856 464:109D00001805A410A9006EC00A10022414B9002E70
465:109D100008810220048820204808F1822DC0830099 465:109D100040089012E40099002240088006A060B933
466:109D200022D409F502FC088B01224028B402200449 466:109D2000092260089002A400B90002400B10060648
467:109D300030000000000000008805CC20B3092C8210 467:109D30000460000000000000A005E400E9803E414E
468:109D4000081016A010900828480A32020C00BB0028 468:109D40000E90036400E9C03E400C9002E400C9009C
469:109D50002CC00B3002CC02930120008A3122E20198 469:109D500022410D8002A304F14036400E9002E4003F
470:109D60007000000000000000C015AC04BB002C8097 470:109D6000F10012400F900368047000000000000032
471:109D7000088602A020A0002A600AB0102C00AB0CBC 471:109D70002801A400D9223E420D9003E400B9C43C5E
472:109D80006EC009B002CC009B0022600AB002F00451 472:109D8000400F9003E400E902AE400F804B6210F9EF
473:109D900060000000000000000015EC00BB003E3435 473:109D9000203E400F9003E400F9027E410F9013CA69
474:109DA00008A00B8300D9023AE02EB00B2C00F880FB 474:109DA000006000000000000028008000C8003800AB
475:109DB0003EC04FB003EC00CA40B2720EB00BC004FC 475:109DB0000F8020E000A82032000C8007E080C8005F
476:109DC0007000000000000000E001BC10FB003F003C 476:109DC00038000D80832110F86032008E80B32008A7
477:109DD0000DF8137048DD4037C28DF003DC00DDC89C 477:109DD000F8003E000C8003CA0420000000000000D0
478:109DE00013C00FF003FC00EE407F400D70033800FD 478:109DE000280528048A00339043A02228008E80761C
479:109DF00060000000000000004010AC00FB0132C019 479:109DF0008008E1031900868022800D60017800BE92
480:109E00000410032040E8103AC00DB003AC08F8403D 480:109E00000036800CE402A810BEA02F800DA0020A2C
481:109E1000B2C02CB033A482DA40BA400FB003D004F1 481:109E1000004000000000000028114C0403042CD472
482:109E20002000000000000000C8053C08BF8022C8D8 482:109E20000B30024C01A3C420C02835028600838079
483:109E300008B700234488D022D0087082FC00B2E02A 483:109E300028C00838060E9430C0A2C00B3C020C00AB
484:109E400003F408F50237048BD122604BFD02F200C7 484:109E4000B3802C480830028A005000000000000057
485:109E50004000000000000000E0054C00B310A440EA 485:109E5000A0010C048F8021C11B72421EC083882187
486:109E60000800024800A0422AD00130028C00B380D2 486:109E6000C01828061021863821C019F7025DC0B439
487:109E70002CC0093102CC00890022E8033802F80026 487:109E70004127D00878C69C00B7002F6009720228DD
488:109E8000500000000000000060011E00B780276441 488:109E80000040000000000000A8081E02C7802DA0AE
489:109E9000684A0252008C8021E0087802DE00B78018 489:109E90000F3E03FE80A780A1E00C7802940085A00D
490:109EA0002DE21939025E30859821E40B7902D80041 490:109EA00039E40C78131E90B58431E00FF8871E0456
491:109EB000400000000000000048080C00F3203400BF 491:109EB000F7803D600C3B03AA020000000000000098
492:109EC0000CB8034880E22238C00D30038C00F30048 492:109EC000081DADE4FB543E800FB423EC32FB003E92
493:109ED0003EC00D3103EC00CB0038060F3083D202B8 493:109ED000D84FA003E400F9003EC00F3033EC04F289
494:109EE0000000000000000000401DBC00FF003B011E 494:109EE000013EC00FB203FE10FB683C410FF04382FD
495:109EF0000FD0039000F6003FC00FF401FC00FF01FB 495:109EF00006600000000000004005FE00CFE43FE4E3
496:109F000033C20EF513BC00ED003FC40FF003D006C2 496:109F00000CFC037E80CF8133FA0FF803F600FF804C
497:109F10006000000000000000A805EC00FB003CC051 497:109F10003FE20F79033E40F48033600CE8033E00DB
498:109F20000EA0016401D80032E02CB5032C00F20031 498:109F2000FF8033600CF883500070000000000000D8
499:109F30007AC00DB4032D80C90232C00CB0032A00D0 499:109F3000A8119C00D7A02DC408BA023CA0872021FC
500:109F4000700000000000000048119C80B7002DC088 500:109F4000C00F5203D400B6102DC08B73035C40B415
501:109F50000D6002D001840021C00830021D00B7004E 501:109F5000B02B482841020C00BF1835462872422A0F
502:109F600021C80BF4031EC0860021C0087C035204E4 502:109F6000046000000000000018009C0087412D44A0
503:109F70006000000000000000C0009EC0B7902DE00F 503:109F70000A73029CC481006DC88B7002D400B700C4
504:109F8000087806D601B48221E008780A1E00B5C020 504:109F80002DC00BF0469C55B42025401860821C0063
505:109F900029E809780236C1978028B00A7A02300091 505:109F9000B700234008704644002000000000000085
506:109FA00020000000000000004814CC00BB002CE0A2 506:109FA0006014CC0093002C400BB0020C8280C020C7
507:109FB000093582C0C1A05120E40830028C00BBC426 507:109FB000C00A10020400B3002CC01B3000CD01B059
508:109FC00020C00B300206009318AAB02A300A5204AF 508:109FC00040AC78888C060D60B34C241208300A1817
509:109FD0003000000000000000E815A800FA013DACC8 509:109FD0000430000000000000B815BC00C7002E408F
510:109FE0004CEC137810F680B3900CA0032800FE0010 510:109FE0000EF02ABF00C8C8BFC00B9002E404BF0037
511:109FF0003A810DA00F2A80DE043BA00EA0033A0494 511:109FF0003FC00FB20AAC00F88034490CB90B3F00E7
512:10A0000060000000000000004800E000F8003E0092 512:10A00000FBC030F00CF0036E0460000000000000A4
513:10A010000D8002E100D8483E120F80136000F86006 513:10A010008000CC00FB803E412CB013AC00F8003E29
514:10A020003E00078003A002E8042608058003920092 514:10A02000C10FA003E800FA403EC00FB00B6D40F82E
515:10A0300030000000000000000810E400F9043A407D 515:10A03000103A400FB003EC10FE403EC00FF003E1B9
516:10A040000C12032482C90036440F10032400F900C7 516:10A0400000300000000000000010EC0CDF003B803E
517:10A0500036400490030400C90012400C900302042F 517:10A050000FF00B3C08E70833C00BD023740054000A
518:10A06000300000000000000080046400B98122403C 518:10A0600033C00FF083BE20FD0C3B602CE0033C00AE
519:10A0700008901A2400890022680B99022400B90074 519:10A07000CF1233500C300380043000000000000089
520:10A08000224068900A24008900A24008900A20001B 520:10A0800081046C04AB0022A00BB0060C00AB403680
521:10A09000100000000000000018052400B91022E0A4 521:10A09000C00BA8026600B80036C10B3443EE00B214
522:10A0A00008940004048B0826C00B90022404B90C09 522:10A0A00000226008B4828C048A21224008B0022079
523:10A0B00024400A1002240023022A40A810020600AD 523:10A0B000401000000000000080052C009B002A20BA
524:10A0C000400000000000000008040490B12022407D 524:10A0C0000BB0022C0088C522C00B8882E601BB08B9
525:10A0D0000812020C108102A0500B12020480B1057C 525:10A0D00022C00AB282AC60B8024AC408B1022C00A5
526:10A0E00000480A100204A0A100284A081200020138 526:10A0E000830022C008B002A0004000000000000071
527:10A0F0000000000000000000B80D6140F850BA14E4 527:10A0F00008040C00AB2020010B32062C00A000202D
528:10A100000C85030142C85034000F85032140F8003C 528:10A10000C0090422C400B20024C18BB0024C00B0CC
529:10A1100036000E80132080E0001A080C00032E0386 529:10A110000062C0483002AC10820020C00830020249
530:10A120005000000000000000981DE444F9103F407A 530:10A120000100000000000000000D7C08DF2A3A005A
531:10A130002FD113F404F5003F400F910BE440FF28AA 531:10A130000FF5123C10C900A3C00F8053EC01DA00E8
532:10A14000BE4E0D9683D4A2DD28374A0F9383E606D0 532:10A1400033C00EB003AC04F8703AC00C60432C422C
533:10A1500070000000000000009805E410CD003F40B2 533:10A15000CD00B2402CF0038003500000000000004E
534:10A160000FD00335025D0131440FD0032400F90004 534:10A16000A019FC00FB013D000FB417FC003C003FB0
535:10A1700032600C9883E640D900366A0C9E83260133 535:10A17000C04FC0037408FE003FC04FF003FC08F856
536:10A1800060000000000000003810E00088002E0091 536:10A18000303FC00FF003FC04FC003D000FF003E87B
537:10A190000B804202808A0022208880032008B88237 537:10A190000670000000000000C005F490EF003FD8FA
538:10A1A0002221088882E24288A8222008CE020E04DA 538:10A1A0000EF3032C01D48037CC0D89431250EC2CD4
539:10A1B00030000000000000000805C4028100684073 539:10A1B00032050DB0533CD4C5947FA08FF0433000DE
540:10A1C0000B10028401B900204049100A0400B508B0 540:10A1C000DC0033000C4807F00050000000000000E5
541:10A1D0002146085002D4008D20254A0B500242012E 541:10A1D0008010E6408B702FDC08F7020C808A20008C
542:10A1E00030000000000000001811A40089046E5423 542:10A1E000C84A2202A0008A48225888FD02AD02A96E
543:10A1F0000B1012A401A900A2401890162400B90067 543:10A1F000201EA00380022C048B0022C04C88076024
544:10A20000234018D002F4008D40214A0BD0024604AE 544:10A2000004300000000000008805C000232C2CC989
545:10A210006000000000000000A015E400C9003A50F2 545:10A210000230020C68A0282CD00912028400A02170
546:10A220008F960B8402F10130488D90032410F900C1 546:10A22000201819302280D083060CA00BB006001233
547:10A23000B2402C9003E640D1C036502F900B6804FA 547:10A23000A000200029000EA2017000000000000014
548:10A2400070000000000000002801A400F9003E603A 548:10A24000C011A8308B002EC04A300A2C14A0800AFE
549:10A250000F99C36400D9283E400D9003A400F94033 549:10A25000C108888687008300224908B006A040AB69
550:10A260003E400F9003E420F9403E400C90038A00EA 550:10A260002022200B800A0C04AB0222C0888002F05E
551:10A2700060000000000000002810A000F801360077 551:10A2700004600000000000004015EF40EB063EC007
552:10A280008F8003E002F80432000D80432002CC00EE 552:10A280000EB0032C02F9A03EC00D8C03AA10E940C9
553:10A290003F000FC0139002DC403F104CC0230A0463 553:10A29000B2480DB043AD00CB862E200F3003240012
554:10A2A000200000000000000028052800BA002280DD 554:10A2A000F98032C00D0CC290047000000000000064
555:10A2B0000BE820F8004EC023A008A00368008A0025 555:10A2B000E0019400FF003DC00DF0037C00DF00379B
556:10A2C0002E801FA0022A068A002EA00260030A0028 556:10A2C000C00FE003F000FE203F400F7003FE00FFD0
557:10A2D000400000000000000028056C00B30020C012 557:10A2D000827F000FC003F904DE20BD000FD90B7C84
558:10A2E0000B3D02C003230020E001B0064C008B00B0 558:10A2E00000600000000000004010AC01CB003EC048
559:10A2F0002EC04B30028E0883802CC400348E4A005E 559:10A2F0002CB00B2C00E8403EC00F94072900C94049
560:10A300005000000000000000A0011C80B58061C06A 560:10A30000B2C00FB0030102CB0032044FF04334C09F
561:10A310000B4002D400840823C20850025EC08401AE 561:10A31000B51A3FC10F8093D0042000000000000058
562:10A320002D008A0802102484086D000A03122800F8 562:10A32000C80528008F002FC008F0023C04D8002B7D
563:10A330004000000000000000A8081E00F582216017 563:10A33000C00C804560007B5822C80BFA0161408B3D
564:10A340000F7803D604AE8031E00D58237E00C6801E 564:10A340000032044BCE0228003A402E070B90022622
565:10A350002DE00B78038E00D7823DF00C7A036A0261 565:10A350000040000000000000E0054C0083014CC0FC
566:10A360000000000000000000081DAC00F100BAD899 566:10A360000B3002EC1090002AC00A8006C00483045F
567:10A370000F8003E412F800BE800E1003EC00F90019 567:10A37000A289193006CC00830020900B30C248001F
568:10A380003E005F8003E008F8043C000F8003C20633 568:10A38000B24024200B0900B800500000000000007B
569:10A3900060000000000000004005FE20FF803FF04C 569:10A390002001060487A42DE0093802DE009E8129F1
570:10A3A0000FF803D200EF84B3610CB903FE00FF8005 570:10A3A000E0087852FAC0968001A08B3A22CE408F06
571:10A3B00033E00CF8132211CD903F600CE80310003D 571:10A3B000B025A00B08025608B5902DE44BD8220C0E
572:10A3C0007000000000000000A8119C00F5002DC0E6 572:10A3C00000400000000000004808080283802EE8DA
573:10A3D0000B0002D40484202340085A02DC00B4009D 573:10A3D0000B3813CE41D31028C00E3A02C6084B40AA
574:10A3E000210028C2021E0486042D8808D0022A04F7 574:10A3E00030600D3B27CFC4C3A030000F304348403E
575:10A3F000600000000000000010009C00B5002D402F 575:10A3F000F2003C040F020392020000000000000083
576:10A400000B7002F420A70421C00A5002DC00BE0039 576:10A40000401DB800FF003FC40EF1033C00FF0133C4
577:10A4100021C0087012000085002D4088680A0400E1 577:10A41000C04DB1077C90FF003F4003F1037000FB8B
578:10A4200020000000000000006014CC00A1002EC03D 578:10A42000103B000FC00BB400FD003FC40FD00390E1
579:10A430001B0806C420800020981A1002CC00B10826 579:10A430000260000000000000A805EC04FB843AC2A2
580:10A4400020000800020C0182C02CAC2890221804C5 580:10A440004CB4932C04E9003AC48D08032E00CB01D0
581:10A450003000000000000000A815BC00B3003E4022 581:10A4500032808FB283EC00CB8032000FF9033C10C6
582:10A460000FBA03E502E9043290AEB003FC10FB40E2 582:10A46000DF81B3E08CA003EA007000000000000070
583:10A47000B2000C800B2C0282183FA00CD0032E04DB 583:10A4700048119408B70424C81A304A1D00B7012DAA
584:10A4800060000000000000009000EC04FB013E4072 584:10A48000C08870061C00820021804B7612DC008799
585:10A490000FB643E400F8003E80019003EC00F88121 585:10A490000029408B40021000BC002001287003B24C
586:10A4A0003ED00DB453E000F9403E400FA003E00061 586:10A4A0000460000000000000C0009A00B3902DE49A
587:10A4B00030000000000000008010DC02CD8033601E 587:10A4B0000979021E80A7802CE819F8125E018780B6
588:10A4C0002CDA03FC00EC0033400FF2037C04FE00A6 588:10A4C00025E04B7806D200978021620B3A021E00ED
589:10A4D00032000CC8033C00CE0031800CD1032404B0 589:10A4D000B78629F0086806E00020000000000000B0
590:10A4E000300000000000000091046C0009002A64A4 590:10A4E0004814CFC0B30024C08A30320C00B3082C0B
591:10A4F000088E02C210A0103E100B9802EC00B900AA 591:10A4F000C00830120E20830024F10B3006CE0083FA
592:10A5000002D808BE2220008900225008A002204064 592:10A500009028600B002A2180B008280008370292AA
593:10A51000100000000000000080052C000B202240ED 593:10A510000430000000000000E815B900FA003E8099
594:10A5200008A002E542AB0422180BB0026C00B30095 594:10A520004DA0032800EE413E800DE00378008E40F0
595:10A5300020040801020004A8402210088002200024 595:10A5300027A80BA003FB02CA8233A00FA013290097
596:10A54000400000000000000008040C0883002840C0 596:10A54000FA403A800C6C03FA04600000000000003E
597:10A55000080402C402A8002C000B1202CC00B000B8 597:10A550004800C000F8003A000C8003E008F8003E14
598:10A5600020C04030020C008B00A8C008300202114D 598:10A56000008F8023A042F809BA104F8003E060F802
599:10A570000000000000000000800D6C00C9003340A6 599:10A57000003E200FC003F000FC0027008F800392F4
600:10A580000CB003EC02EB0032400FB0036C00FA0099 600:10A5800000300000000000000810E50089003E4097
601:10A5900032000C80032080C80030000C80032003B0 601:10A590006E9003A408C9003C400D90032410F9A05C
602:10A5A0005000000000000000A019FC00FD003F402A 602:10A5A00032420C9013C400C9003E400F9003E440B7
603:10A5B0000FC213F000F4003F004FD403FC00F5007D 603:10A5B000C9203E52CF900902043000000000000084
604:10A5C0003FC08FF003FC40FF0037C02FF003E806C8 604:10A5C0008004660089042E400890022400D9003AD5
605:10A5D0007000000000000000C005F000CC00330057 605:10A5D00041089005A400B940A2400D9002E54689CB
606:10A5E0000ED00B3300CC0033E00FC0837C00CF20B3 606:10A5E000002E400B9012E500A9C82E618B944220EA
607:10A5F0007B098CF803FE50CF383FE10DC203F00019 607:10A5F000001000000000000018012400A9006C40B9
608:10A6000070000000000000008010E2009808208028 608:10A600004810228403A9002E40099002E404B108F6
609:10A61000089802200088D022E00EB4227D199F699C 609:10A610002840189802E50089002E400B9002F42093
610:10A620002E900830922881DB642EE18816A2E00487 610:10A620008D002F400B944286004000000000000087
611:10A6300030000000000000008805C80090242001C0 611:10A6300008040480A1242C481812020480A10028D8
612:10A640000810160082830128C10B02820CE0A310BF 612:10A6400048081002840091202048091202C4948115
613:10A65000280E1B9202848493202EC0083102E2014E 613:10A65000002C610B5A82D4A0A5282D4A0B900282AF
614:10A660007000000000000000C015A81098002280B3 614:10A660000100000000000000B80D6002E8502E1448
615:10A6700008900200608A102AC00A20026C18BB00F1 615:10A670000E8503A140A8503E140D85018140F8527B
616:10A680006E602B900246208B002EC208B182F0042F 616:10A6800032940C8013C142C0513E008F8203E0809F
617:10A6900060000000000000004011E402CB00B24066 617:10A69000C8203F080F8003AE0350000000000000F8
618:10A6A0002C920327008800BAC00F88032C00EB040B 618:10A6A0009819F450D9113E448F9143E440DD003AAB
619:10A6B0003AA0CF2CA3ED009B003CF02D8C33D004AE 619:10A6B000444FD027B400FD123F444F9143F440FD76
620:10A6C0007000000000000000E001B404EF003FC093 620:10A6C000003F410F9283E4A0F9283E4A0FD0036671
621:10A6D0000D5103F000F18137C00EF4039C10CF0040 621:10A6D00006700000000000001811F680E9C03E7806
622:10A6E0003D800CEC07B808FF021FC40FC803F80038 622:10A6E0008F9B03A780C94036780F1023E504DDA4B3
623:10A6F000600000000000000040109E00C3003840D1 623:10A6F00033620FDA03F660C91033400E9893E630E8
624:10A700000C9203A480FB203AC00D94032C40FB0064 624:10A70000C9C932788CD00B06007000000000000030
625:10A710003E010F8003E500EB003AC00D840B1004EE 625:10A710003810E00088E22E300B88422340A0A122AE
626:10A720002000000000000000C8052C088B0222C099 626:10A72000380B8A02E280AAE022300B8023AB028839
627:10A7300008920321008B4822C00BB7023D403F0125 627:10A73000A02A000B8C02E30088E023380880020E78
628:10A7400022740B90022804BF00B2C00B85023200B5 628:10A7400004300000000000000805C500A14428589E
629:10A750004000000000000000E005400180002800EB 629:10A75000431622848181202C58491080C48191485D
630:10A76000082C128840B04008C00B18020E00B3003D 630:10A760006C4A0B14024484810160400A5286D4A0D2
631:10A7700028201130020C00B3002400090006380024 631:10A770008500A150689006D2017000000000000022
632:10A78000500000000000000020011200848021A081 632:10A780001805A60089002E400B90020400A9602243
633:10A790002868123A00848025E08B58021E40B78258 633:10A79000400B9502E410B1004E400B9066AC8089EE
634:10A7A00021A60B78021A00B78021200B580208005E 634:10A7A000002A600B9052F40085002140089002C6F8
635:10A7B000400000000000000048080800C8213809D7 635:10A7B0000460000000000000A005E620E9003E4023
636:10A7C0000C28038001F10038C00D85020C00FB004D 636:10A7C0000F9003A410C90036400F9401E520D94032
637:10A7D00038850F10038C00EB103CC80D30031202BB 637:10A7D000BA688F9007E600C91032620E9002E41842
638:10A7E0000000000000000000401D9800FC013F80B8 638:10A7E000C90032400C9003E8047000000000000033
639:10A7F0000F6803D040FC003BC00DC003FC20FF00ED 639:10A7F0002801A400F9043E400B90036400F9003ED8
640:10A800003BC50FF00BB440FF183F000FF103D0061B 640:10A80000408F9003E400E90272680F9003E600F9BC
641:10A810006000000000000000A805E400EB00B0416B 641:10A81000013E420F9003C402F9043E404F90031AD8
642:10A820000CA003E004CA04B0E00EB003EC80CB201F 642:10A82000006000000000000028008002C800320024
643:10A8300032810CA003EE00DB003E000EB0032A00C4 643:10A830000C80036000C84036000F8403A000D8508D
644:10A84000700000000000000048119404870021C03F 644:10A84000B2108C8103C120C8003E000FC013F00479
645:10A85000486002F000870021C0087002FCA0832835 645:10A850004C003F000F80030A0420000000000000AD
646:10A86000A380086002DC0087202DC00B7002120458 646:10A8600028152A008A04228128A01228008A01368D
647:10A870006000000000000000C0009C02A380216076 647:10A87000800BA0102810CE0123810CA812FB008AA7
648:10A88000086802D200878021E0297802DE80879064 648:10A88000013B8083A042E8108A002F800B60420ABF
649:10A8900021A0194802FE0097802DE00A388230007E 649:10A89000004000000000000028054C008300A0C01C
650:10A8A00020000000000000004814CC01838020C07C 650:10A8A00018B000CC009B0024C00B30066C00A3083D
651:10A8B000082042C0308370A0C0893402CC028300DB 651:10A8B00028C8093002CC438B002C800B3002CC021C
652:10A8C00060C0290002CE0083002CC80BBC02120419 652:10A8C00083012CC04B30004A005000000000000003
653:10A8D0003000000000000000E815A900EAE2329014 653:10A8D000A0010C24879421E4183102DC8097102514
654:10A8E0002CE003FB02CEC032800FE403E8008A00B4 654:10A8E000CD0BF2027C00A00028E0187002DC01878A
655:10A8F00033880D64C3FA00DA003D900EE00B3A0491 655:10A8F000342940094002D00484042D004BD0226842
656:10A9000060000000000000004800C024F8083E126B 656:10A900000040000000000000A8081600CFA070E979
657:10A910000FC003E048F0003E000E8093C000F80036 657:10A91000187B03FF4097A035E80F74025E20E480A7
658:10A920007E010E80C2E040F8007E008F8403D200DA 658:10A9200039A02D7803FE00C7803DE05F6843C20078
659:10A9300030000000000000000810E500C1013248AE 659:10A93000C4841D600F78036A02000000000000005C
660:10A940000C9803E640C90032400F90036600C9002E 660:10A94000080DA4003B002ED80FB4032D8AEB623A09
661:10A9500018610C90036420F9053E400C90830204BA 661:10A95000D00FB2870CD0D80032C04F9043EC00FB30
662:10A9600030000000000000008004662089002052B2 662:10A96000083E408F9003FC00FF043F800F002B82C5
663:10A970002810C22602A90022400B900A2700A90035 663:10A9700006600000000000000005F600FFA03EF4A5
664:10A9800022700890022408B9002E400A900A200084 664:10A980000EB803EE084BF07FF40CF923EE487890F4
665:10A990001000000000000000180524028D00234074 665:10A9900032E40CF903FE00FF803FE41C79032E40F3
666:10A9A00008D1028420890022600B11F224B08100BA 666:10A9A000FF8033E02C7807000070000000000000FA
667:10A9B0002A460890426408B9002E40089202060018 667:10A9B000A8119400B3000CE50B3802FE808F806173
668:10A9C0004000000000000000080414808520234897 668:10A9C000C42878004E00F48425A80C7002CC04B38F
669:10A9D0000852028408810020400B12020480A1204A 669:10A9D0009025400C41835240B410A3000C52036AEE
670:10A9E0002849289002040031202E4008320202013A 670:10A9E000046000000000000000009400B7216DC862
671:10A9F0000000000000000000B80D6000C850B21454 671:10A9F0004B7002DC42A73129C4087202DC00B72880
672:10AA00000CC003A140C800B2000785032140C85014 672:10AA00002480087006D420B7012DC1086002508050
673:10AA10003A150C85036140F8513E002C85032E0346 673:10AA1000B4082162097406800020000000000000D4
674:10AA20005000000000000000981DC448F9103E448A 674:10AA20002014C704B3002CC00BB002CC00A30260FA
675:10AA30004F91037400F5443E400FD103E440F910F8 675:10AA3000C00838024E44A0C02491083002C000B3C0
676:10AA400037440FD003D400F9103FC00FD103E606FE 676:10AA4000002460081C024C88B3C020A008000A88BB
677:10AA500070000000000000001815F6A0DD8C3378AF 677:10AA50000430000000000000A815AC00FF002FC06B
678:10AA60000EDA033500CDA033400DF80B3681E980B6 678:10AA60004FF013FC08E78A3FC00CF5C2FE10BBC0D4
679:10AA700033700C9103E440F9C03EC00FDC03C60004 679:10AA700032D40C3013E304BF002E6208B9026E001A
680:10AA800070000000000000003810E104B840203CD5 680:10AA8000FB0132A44D9402AB046000000000000002
681:10AA90000C850202848A402200088F822300B8E8D5 681:10AA90008000EC60FB001EC00FB013EC005B003ABE
682:10AAA0002220088802E200B8D02E000B8C02CE04CF 682:10AAA000C00FB041EC007B45BA402EB015E001FB71
683:10AAB00030000000000000000805C400910060485C 683:10AAB000003E500EC003F040FC203F508F900160DC
684:10AAC0004B1002048A814060404910028DA0A141D0 684:10AAC00000300000000000000110F400FF003FC053
685:10AAD0002050091222C480B1202C404B3E02C201FA 685:10AAD0008FF0031C02CF0036C00DF0037C007F2AEC
686:10AAE00070000000000000001815A408B904A04080 686:10AAE0003F800FF8139021CF003F620CE00330004D
687:10AAF00048B0022400890082400890A6A400B9044E 687:10AAF000F8003F000FD00380443000000000000049
688:10AB00002254299502E540B9006E400B9202C6041A 688:10AB000081046411BB002EC00BB0022C00DB0432A8
689:10AB10006000000000000000A005E4009100324049 689:10AB1000C00EB002EC00BB842E400BB94222428B27
690:10AB20000F90092400899032400D9403A400E9029B 690:10AB2000012C720A90422C00BB002EC28F8806E0D6
691:10AB300072600D9403E401F9013E600F9003E80494 691:10AB3000001000000000000080012400BB006EC077
692:10AB400070000000000000002801A440F9003E4011 692:10AB400048B0422C008B0026C00AB012EC00BB407B
693:10AB50004F9003E710F9803E400F10136400F1009E 693:10AB50002EC80BB0122C008B002E480A30026C005D
694:10AB6000BE400E9003E608F9013E640F9003CA0050 694:10AB6000BB002E804B9802E0004000000000000077
695:10AB700060000000000000002800A000F80032087B 695:10AB700008040400B3006CC24B31020C509B20202F
696:10AB80000C010B2040C84032000E84832000F804E2 696:10AB8000C00A3212CC80B3006C0C0B31020C428331
697:10AB90003E040F80032100E8003E100F8803CA0422 697:10AB9000082E400A00020080B0002C410B10024237
698:10ABA0002000000000000000280538003E0423803B 698:10ABA0000100000000000000000D6400BB403FCC2D
699:10ABB00008EC123944A600288108E0003808BA00E1 699:10ABB0000EF0833DA0CF2037C00CF7C3FD48F30053
700:10ABC0003F800BA002A8008A022E800BE002CA0080 700:10ABC0003E880FB413A5008F303E400CA003608078
701:10ABD000400000000000000028054800310024D09B 701:10ABD000F8003E000F9023C003500000000000006A
702:10ABE000083E12AE0881A02CC00A38004C00B30009 702:10ABE000A019F400FF293FC90FF013FC94EF123BAA
703:10ABF0006EC00A30020C00A3006CC00B3002CA0009 703:10ABF000C08EB207FD04FF103F0C0FF003F000FB06
704:10AC00005000000000000000A0011800B51025C091 704:10AC0000203D400FD043FC40FF043FC00EC043E84E
705:10AC10002860129010A5082DC20864225818B700A9 705:10AC10000670000000000000C005FCA2C7203F2411
706:10AC20002D800B7902BEC087016DC00B6002E80069 706:10AC20000CF0033C80CC0933D10CF123FC20DF363F
707:10AC30004000000000000000A8081E00F584352038 707:10AC30003FC00E4803FE00FF8037E40D780311A0EB
708:10AC40008C18029210C5803D600EC80B5A0877F32D 708:10AC4000CF0037C80CF00330017000000000000096
709:10AC50003DA00FF8031EB0E7853DE00F7803EA0240 709:10AC50008010FF008FD12E080DB6123D45F96427F4
710:10AC60000000000000000000081DAC00F104BA0163 710:10AC6000D088BA14CC048F4023F00B88022E04BB8A
711:10AC70000FA0436009E10038400EA003A814FB2098 711:10AC700080AEC008B80A210088D0222028B0022067
712:10AC80003A800FB41B4C80FB293EC00FB023C20694 712:10AC800004200000000000008805CC0093002E0086
713:10AC900060000000000000000005FA00CD803BE0ED 713:10AC90000A34828CA0A00824D8093102CC20B33217
714:10ACA0004EF803F202D4813BE08E98073E44EF91C8 714:10ACA00028D04A8002CC0CBB00224089B0026080D0
715:10ACB0003FE04FFC07EED0CF9833E40FF803C0001D 715:10ACB000930024D00B3002A20130000000000000FD
716:10ACC0007000000000000000A801980085102DC44D 716:10ACC000C011AC009B002E2009B04A2C02A0000647
717:10ACD0000D1102F000852031C40B7B003840D710E5 717:10ACD000C009B000EC00AB002AC00B88026C00BBBE
718:10ACE0002D800B7062FEE1871439C00B6002EA040C 718:10ACE000202AE241B82A600A980026000BB002B878
719:10ACF00060000000000000000010BC40A5002940DA 719:10ACF00004600000000000004015EC08DB023E206C
720:10AD00000B5082DC4084042DC00B10065844A71061 720:10AD00004CB0032C028B2012C029B012EC00FB00C7
721:10AD10002D800B7102DC00870421C20B5002C01091 721:10AD10003AC00E8803ED20FBC834F00DBA0347603B
722:10AD200020000000000000002014CC0AA1012C40EB 722:10AD2000C90036400FB00B90047000000000000016
723:10AD3000891802C100A10820C00B34064000930509 723:10AD3000E0019C00EF000F000F3000FC00DF90BB33
724:10AD40002C140B3C86CE10830128F10B1402C8048E 724:10AD4000C0CEF003FC04CB0017C00FC003BC84FFCF
725:10AD50003000000000000000A815A000ED003AC07F 725:10AD50000037C00ED063B800EA003A800C300370B0
726:10AD600007BC63ED0081403EC00E88036400EF0025 726:10AD600000600000000000004010AC00FB02320058
727:10AD70007E500FF002FD42CF0072C01FB403EA0400 727:10AD70000FB0532C00FA0032C08FB0072C00FB003C
728:10AD800060000000000000008000E80099003EE044 728:10AD8000B2C00F8007AC80DB247ED00EB0237404E9
729:10AD90004FB483ED9009403EC00FA183A801EB01A1 729:10AD9000DD08B5400CB003100420000000000000E6
730:10ADA0003E000FB113EC0CFB003AC05F2023E00023 730:10ADA000C8053C00BFC0A0001BF0023F60EA502372
731:10ADB00030000000000000000110F800FD043FB06A 731:10ADB000C008FA07FC00DF0063C04818022D00B38A
732:10ADC0000D60033E00CD0033F00FF201F000FF03F1 732:10ADC000006EC00D3A032400828032800DF0033201
733:10ADD0003F030FF001FC00FB0233C20FF0E300441D 733:10ADD0000040000000000000E0054C14B359208042
734:10ADE000300000000000000081046A00B9022EA0BB 734:10ADE0000930022E05B0442EC0093482EC00AB04B9
735:10ADF0004AAC020E80F9C036E10BA0022A08BB0063 735:10ADF00020C00921B28E0493C024C00A18064C005A
736:10AE00002E200EB002EC00EB0022C08BB0022040DE 736:10AE0000925020C008300270005000000000000086
737:10AE1000100000000000000080012300A90028C0ED 737:10AE100020011E00B78061E00B780A5E01B1A02D11
738:10AE200009B2226C4089892AC00B14062600AB02A5 738:10AE2000E00A78025E00079021E018C8021E00B711
739:10AE30006EE009B0066C00B30222C00BB002200025 739:10AE3000802DE08AD8023EC085802120197822002A
740:10AE4000400000000000000008040800B1002CC011 740:10AE4000004000000000000048080C00F3942010AF
741:10AE50000A30022C00BB0064C00B320A0800330029 741:10AE50004B30070C00F3003EC80F3003CC0023102A
742:10AE60006C80023046CC18A30020C00B28020211CF 742:10AE600000CB0520028C60930A2EC40A01074C8097
743:10AE7000000000000000000000056800E90038C183 743:10AE7000D20130C02C300B5A02000000000000004C
744:10AE80000DB10B2C0089003AC00B90036000FF024B 744:10AE8000401DBC00FF010F400FF013BC00EF267304
745:10AE90003E800FF003FC80FF0032C08F800B000368 745:10AE9000C20CB083BC40FF183DC04AC103FC00FB9C
746:10AEA0005000000000000000A011D800FD043FC0C9 746:10AEA000123FC44DC10BFC81FD003F200FF003D0C9
747:10AEB0002FF203FC11EF003FC00FF4437000FF00BE 747:10AEB0000660000000000000A805EC20CB483E0022
748:10AEC0003F0046F003FD00EF003FC00FC003E8065F 748:10AEC0000CB0032D20E980FAC80DB003EE00DB249E
749:10AED0007000000000000000C005FE00FF803DE0A3 749:10AED00076F38E8033EC44EB103EC00F9003E80411
750:10AEE0000CF913DE007F80B3E00FFC03BE40CF807F 750:10AEE000DC00B3610CB0032A007000000000000019
751:10AEF00033F00FF8037C04CC8033A00CF00B30014E 751:10AEF00048118D0087202F012870020C848D0431A9
752:10AF000070000000000000008010E02088002E206B 752:10AF0000CCC97202DD00373321D8084002DC00B71B
753:10AF1000088212E080A88122020B80022080A88093 753:10AF1000203DC0095022F000970021800AFC0292D7
754:10AF200022080B80022C028804AA2008B002200408 754:10AF20000460000000000000C0001E8287B02D20D9
755:10AF300020000000000000008805EC00A3082C8021 755:10AF30000839021E41A78024E0097A328E8207A0D8
756:10AF4000083202C420A30028400B92028400A90109 756:10AF400025E08B48021E00A7E12DE04B5800DA00F7
757:10AF500028C81B1282CC40A80024E00A30422201FB 757:10AF5000A0802460087A0230002000000000000079
758:10AF60003000000000000000C011A880A8022E40A0 758:10AF60004814CC0083002C000830028C009300228F
759:10AF7000688010C800B8402A900BA0002800AA08DA 759:10AF7000C1093042CC00830060C0081A02CE04B37D
760:10AF80002A020320028C00A8882E200AB002300476 760:10AF8000E028A0091C824B08A38024A02A30029A42
761:10AF900060000000000000004015E804FA003C409A 761:10AF90000410000000000000E815A800CA002F8877
762:10AFA0000CA003E800EB003AC00F2053A800E340D8 762:10AFA0000CA0132800EE002E802DA003E800DA008C
763:10AFB0002A400FA0036C00A88034201EB0031004A8 763:10AFB00076800EE803BB80EE402FA28FE603EB867F
764:10AFC0007000000000000000E001B4009D913F808F 764:10AFC000FA8037820C20073A04600000000000007D
765:10AFD0000FDA23F400CC20370007D0137400BC0034 765:10AFD0004800E000F8401E000F800B6100E8C03A16
766:10AFE000B7800BD0437C00DC043B006DF003F8001D 766:10AFE000000E8003E001F8007E101E8103E008F8E7
767:10AFF00060000000000000004010A800FA803A0045 767:10AFF000003E000D8003C028DC503B000F8003D2D0
768:10B000002CA00B2002CB623E500E88032000D910EA 768:10B0000000300000000000000810C402C9003E42E9
769:10B010003E708C8033EC80D8403A020DB0031004AF 769:10B010000F1003A600C9013A400E9401E410F10498
770:10B020002000000000000000C8010C00398022C090 770:10B0200032400F9A232060F8040A420E9013240045
771:10B030000C9D822C10D0402EA008B8034E028A40EE 771:10B03000C10032400F900302043000000000000005
772:10B040000EA00DB0033D00D09036100BF002B20000 772:10B0400080046708A9006E400890022782890026C4
773:10B050004000000000000000E0054C00B10060C0AE 773:10B0500040089C03A410B90036409B1C1A2304B876
774:10B060008A18028C0880400CA0023002CE00824870 774:10B06000003A400E10022402C9A0A2400B900A2010
775:10B070002C802B30068C008102209009B002380011 775:10B0700000100000000000001805258089042C4005
776:10B08000500000000000000020011200B690A33024 776:10B08000089002848199402E401A9006E401B9008C
777:10B0900008E822B21487802D600849121261959049 777:10B09000A6411B90822100B8102E400A920AA401FA
778:10B0A0002D610A48161E80958025200B78028800A5 778:10B0A0008F2223400B9002060040000000000000A9
779:10B0B000400000000000000048080C00F100288C4F 779:10B0B00008040480A3202C4109120204808120246A
780:10B0C0008E1003848080002C020A9A02E400D000D3 780:10B0C000480A3602C480B12004C84B14020500B1FE
781:10B0D0003E800B91038E80C20838800DB0031202AF 781:10B0D0000528500A90020502850021400B12020249
782:10B0E0000000000000000000401DB000F6003F44DA 782:10B0E0000100000000000000B80D6000C8006E14F0
783:10B0F0000F21137800FF003DC00FE0037800EF043C 783:10B0F0002C8502A140C8503A140E8002E140B050A5
784:10B100003F408DE803DC04F6003F000FF083D006DB 784:10B1000032000B80032000FA003E000E8003A002F4
785:10B110006000000000000000A805E800E880324060 785:10B11000C80013000F82032E03500000000000003F
786:10B120000F880B280078023E800E28032800CA8072 786:10B12000981DE448F9143F400C9103E442FD1036A9
787:10B1300032000FA003EC00C98032800FB0032A0058 787:10B13000440D9123A448F91138440FD003E5143984
788:10B14000700000000000000048118C008F00A180FA 788:10B14000427B408ED001F500A9403E50079683E631
789:10B150000B70421400B7002D410B50421400A500A3 789:10B1500006700000000000001801F680DDAE3A50D5
790:10B16000A1C00B5002FC80A50021000BF2021204CA 790:10B160000D9A0B7680CF8832702DDA03A701E99211
791:10B170006000000000000000C000BA00A480293078 791:10B1700037680D9403E700EDA03A500FD003E702C3
792:10B180004B48065208B4802D200B48423200848080 792:10B18000CD8033680CD883060070000000000000FA
793:10B1900021200B4812DE40868129A00B780A30005E 793:10B190003810E100884020200C8C02230088E02237
794:10B1A00020000000000000004814CC00830520E0CF 794:10B1A00030088402E300B8E022148D8802E300B87E
795:10B1B0000B34026C10B3002CC00B364A0D0DA300EB 795:10B1B000502EA88B8022E34888502200088C020E73
796:10B1C00020C00B3482CC02A20028000B30021204F3 796:10B1C00004300000000000000805C44091002A4837
797:10B1D0003000000000000000E815A920EA4030A07F 797:10B1D0000914820520810820580911028588B14090
798:10B1E00007A0436940FA003C800FA0030840CA0052 798:10B1E000A040081202C580A10028400B1802C484A8
799:10B1F00030A00FA403E800CE003B980FA0033A0450 799:10B1F000A10024500810920301700000000000001C
800:10B2000060000000000000004800D200FC083F0081 800:10B200001815AC109B002240089002040689042007
801:10B210000BC203B000FC003F000FC003F000FC00B5 801:10B2100040099002E401B902224189A082E0A0B96C
802:10B220003F040FC003E000F800B6020F8003D20015 802:10B22000282E440BB002E402B90026402810020682
803:10B2300030000000000000000810E400D9003E6863 803:10B230000460000000000000A015E400D9003840C0
804:10B240004C9101E408C9003E402C9203E402C9A0DD 804:10B240000D90032400C9A0A2408D9003A400F90032
805:10B250003E700E9003C642C9003E400F1003020428 805:10B2500036400C8413E200E9003A500F9C02E68469
806:10B2600030000000000000008004640089860E6049 806:10B26000E900B6400C9003280470000000000000C4
807:10B27000089802E40889102E60089002E400890C06 807:10B270002801A400E1003E680E1003A400F1283A62
808:10B280002E60089002E68889002E400B9002A000F4 808:10B28000400E9003E400F9003E420F8023E200F9F3
809:10B290001000000000000000180524009D102F4041 809:10B29000003E400F9123E440C1003A400F900BCA9A
810:10B2A00028D006F402AD002F6008D002F4008D0013 810:10B2A000006000000000000028108000C80032008C
811:10B2B0002F400AD002E40089002E600B90020600A5 811:10B2B0000C8003A020C8403E000E81636000F004B3
812:10B2C00040000000000000000804340085002D400C 812:10B2C0003C010C8403E000C8003E000E8003C10076
813:10B2D000085802D400A5022D40085000D400850073 813:10B2D000D81032000C80230A042000000000000077
814:10B2E0002D40085402C48081002C600B140282019E 814:10B2E000280538608E0022800AA0023880BE003A0D
815:10B2F0000000000000000000B80D6140D8523E0080 815:10B2F0008008E0022800BA00239818EC02F820AE7B
816:10B300000C0503E140E8043E140C8503E140C8004D 816:10B300000022800BE482E802CE4428800DA00A0AC5
817:10B310003E140EC003E000C0023E004F80232E0307 817:10B310000040000000000000280540008204A0C09A
818:10B320005000000000000000981DF400F9013E40AC 818:10B320000930028E0483506CC00A30860C00B300D2
819:10B330004F9013E400D9001E400F9003C410F10099 819:10B3300028300A3612CC80810024C00B3206CC00A3
820:10B340001E400F9003E4E0FD283F400F9403E60603 820:10B3400080886460281002020050000000000000A5
821:10B3500070000000000000001805A400FD003F4040 821:10B35000A0011012844021C80A72021000B7002D0B
822:10B360004D5002E4009504334028D003F400FD0062 822:10B36000CC0838121C00B3302000087182FE00A403
823:10B3700033400F91033400CD4033400F98810600D5 823:10B370008021C80B7002DC0187002C420951022099
824:10B3800070000000000000003810E010B8002E002F 824:10B380000040000000000000A8081200C28031F850
825:10B390000B8002E010B8002200088002E000B80034 825:10B390004CFC139209C7803CED1E78271E00F78CE9
826:10B3A00022000B8803C280888022000B8C020E04CE 826:10B3A0007920087A03DE8184803DE00E7803FE2058
827:10B3B00030000000000000000804C400B1002CC0F0 827:10B3B000C58135602C58032A0200000000000000FF
828:10B3C0000B1002C400BB002240081002C401B900E7 828:10B3C000081D8000F8043ED00FB013E000FB023AE5
829:10B3D00020401B90020422890020600B128202018F 829:10B3D000D00FA00BAC40FB003A002FB003CC00F024
830:10B3E00070000000000000001815A444B9002EC031 830:10B3E000003AC40FB003FC41F3003A400F5093C23F
831:10B3F0004B9002E410B9020240089142E400B98087 831:10B3F00006600000000000000005F600CC813FFC64
832:10B4000022400B9202C400994022404B9012060445 832:10B400001CF8037640EF923FE48CF803BF10FF80F6
833:10B410006000000000000000A015E600B9013E58E1 833:10B41000B3200EF913FE24FD9437E01CF903EE006F
834:10B420000D9003E600D10032600C9802E640F9006E 834:10B42000CD80B3E00C580200007000000000000066
835:10B43000B2400F18032400C98032500F9023280413 835:10B43000A811944080002FC4087202DD08D7002DA7
836:10B4400070000000000000002801A400F9003E4246 836:10B44000CC08DE035C00B7042180C87083DC00B444
837:10B450000B9003E708F900BE480F9003E400F900E1 837:10B45000A02FC00C7002DE80870021C20A51422A50
838:10B460003E400F9803A400E9A0BE400F100B4A0015 838:10B4600004600000000000000000900084002DC86F
839:10B4700060000000000000002810A000D8013E007D 839:10B47000487002540CA7002CC08972025C00B31003
840:10B480000F808B2000F8203E010F8103E000F808B8 840:10B4800020000A7006DC00B4202DC0087002DC80A9
841:10B490003A000C8003E000D84032000F80130A0409 841:10B49000930020C0085002000020000000000000BF
842:10B4A0002000000000000000280528008A802F915D 842:10B4A0002014C00080002EC0083002C408A2422C24
843:10B4B0000BEE022801BE0020800BA002EA80B648F5 843:10B4B000C10920024C00B3002080083C228C20B03F
844:10B4C00022800DA002FA028641A3A60BA0030A0067 844:10B4C000082EE0083810CF0A9340A0F00A100208B6
845:10B4D000400000000000000028054C0093802CC0B4 845:10B4D0000430000000000000A815A800C1003FC013
846:10B4E0000B30020C10B30028C00B3802CC00B300A4 846:10B4E0002CF0036800AA003FC02D80037C00FF0001
847:10B4F00028C0093002C601836020700B300A4A0060 847:10B4F00032000EB012ED24FA0827C810B8A2FF607F
848:10B500005000000000000000A0012E8885082D805A 848:10B5000098A0A2E00C50032A046000000000000094
849:10B510004BF8061C80B70021C00B5002D400B600C7 849:10B510008000C906F8413EC00FB003E9105A203E32
850:10B520002960097002D0A08D0021400B3202280052 850:10B52000C00E8003EC00F3007E010FB093ED00F835
851:10B530004000000000000000A8081E00D5803DE08B 851:10B53000403EC00EB003FC00E3083CC20FD013E055
852:10B540008F78031E84B7823D600F5903DE00F780B9 852:10B5400000300000000000000110F302CC003BC2FC
853:10B550002960157803DE00C78031600F7C036A0222 853:10B550000CF023AE40DF8139C006D003FC00FF04AD
854:10B560000000000000000000081DAC40E9003E8023 854:10B5600031410CF003FC00CCA037C20CF0037C048A
855:10B570000FA003ED30FB0036C10F9603E400B300CB 855:10B57000CD0033F00CD00308443000000000000080
856:10B5800034400FB783EC4021003E400FB003C206A9 856:10B5800081046000888022C00AB002E900AB442E2A
857:10B5900060000000000000000005FE00FF8133E0B5 857:10B59000C0088802EC00BB00A2700AB402CC00A074
858:10B5A0000FF903DE20CF813FE00778033E00FF80E4 858:10B5A0002022C00FBC02CC0A8B80A2C00D900220CA
859:10B5B0003FE004F813FE02DE8033600FF803000062 859:10B5B00040100000000000008005200089802AC0A3
860:10B5C0007000000000000000A8119C00B70021C41A 860:10B5C00008B002CC0688602EC00A9806EC01BB00C9
861:10B5D0000B5A02DC4886502DC00B31029460B4181F 861:10B5D000223102B202ECA08A0026C048A802EC0484
862:10B5E0002D40487002E800A51021400B71022A048A 862:10B5E000A9802240089002200040000000000000D6
863:10B5F000600000000000000000009C00BD0021422F 863:10B5F00008040000800020C00A3042CC0080012CEA
864:10B600000B7002FC02850025400B50029C00B70025 864:10B60000C01A1202CC00B30020004A3002CC00A0C5
865:10B610002F40287102DC00A60021C00B7002000040 865:10B610000008C00B2006ECA0A300A04029100002E7
866:10B62000200000000000000020146D80B120A05018 866:10B620000100000000000000000D6000C8503BC099
867:10B630000BB206CE00A0342EF00B18028520B34AC0 867:10B630000CB003AC00C9003BC00E9283FC00BF00FD
868:10B640002C54883802CC10A10020B00B3002080422 868:10B6400012000CB003EC00882616C00C80175C803A
869:10B650003000000000000000A815BE80F308105460 869:10B65000E90132402CD0030003500000000000003C
870:10B660000B8813FF00C0803E640FB4830700F9C04D 870:10B66000A01DD000FC203FC00FF003FC00FC003FF9
871:10B670003EF00CFC13F400EA0032700FF00B2A04C9 871:10B67000C00D8003FC08FF003F000FF003FC10F832
872:10B6800060000000000000008000EC00F9003E10A7 872:10B680004037C00EE021FC08DF003F400FD003E050
873:10B69000079103ECC058003E440F9203E400F90008 873:10B690000670000000000000C005FCC0FF217124FE
874:10B6A0003EC08FB303E000BB00BE440FB003E00018 874:10B6A0000FF183F240FF0037C49FF2473D04C720EB
875:10B6B00030000000000000000110FC02CD0433E067 875:10B6B00033C00C7823FE40E81027C40FF2133C84FB
876:10B6C0000CC0033C08FE0033602CD002B480CF00D5 876:10B6C000C48133204CF023700070000000000000A3
877:10B6D0003F5207F013FC00CE1033420CB003C044BD 877:10B6D0008010ED40BF5462C80BF602E000BBD022E0
878:10B6E000300000000000000081046C0089002AB0D6 878:10B6E000F01FF9123D809F812BE00AB812E8008F0D
879:10B6F0000888022C00BA0036440890002600DBC0FF 879:10B6F0000422D008B38ABF428B8222E0288C022029
880:10B700002E400BB002EC0083C028400AB002E0409B 880:10B7000004300000000000008805CC00B3282808A1
881:10B71000100000000000000080052C008B002208B3 881:10B710000B30068080B30224D10B30028D80931051
882:10B720001AA2022C10B92022400830022C04AA547C 882:10B7200020CE8B3002CC84A1212CCC0A300A4C00D4
883:10B730002EC00BB012CC008B08224008B002E000F3 883:10B73000930028C0083C02220170000000000000B5
884:10B74000400000000000000008040C0083042A00F0 884:10B74000C015AC10BB026AE00BB002E108BB042AD2
885:10B750000A08820C00B8006440083002A400B0005F 885:10B75000C00AB0128C009B002AC00BB106C8808BB7
886:10B760002CC08B3010C8028B002A400A3002C20164 886:10B76000826AC10A3002AC1888102A480880023068
887:10B770000000000000000000000D6C00C900320055 887:10B7700004600000000000004015EC00FB00AA304F
888:10B780001A82033C00F90032400CD103AC00EB00FC 888:10B780000FB003A800F301B6C10BB002AC084B0028
889:10B790003E400FF003ED00C30032C08CB003C00385 889:10B79000B2C00FB802EC10A9813EC00FB0030C007C
890:10B7A0005000000000000000A019FC00F5003F0060 890:10B7A000CBA018D00CB00310047000000000000003
891:10B7B0000D804BFC007C003F400FD20B7400DF007B 891:10B7B000E001BC08F70037000FF003FD00FF003781
892:10B7C0001D408FF003FCA0FF003F800FF003E80650 892:10B7C000C00FB0077C00E7003EC00AF003FE00F7A0
893:10B7D0007000000000000000C005FC00DF843BE0BA 893:10B7D0000036C00CF003FC00FF8037E00FA003B878
894:10B7E0000FF80B3E00EC8033E10C30033C80CF4877 894:10B7E00000600000000000004010AC00DB003600EC
895:10B7F00037C00E4003E0C0C791B3040CF003300023 895:10B7F0000EB0036900DB093AC01F3023EC08CB20F0
896:10B8000070000000000000008010EF048B802241D7 896:10B8000034C02FB003EC40EB483EC44DB08B6C000D
897:10B810000BB0822E008880A2E00AA292AD808742FF 897:10B81000CB0032900F3003900420000000000000A5
898:10B8200023D88AAD02E0C08B00204C48A40220043B 898:10B82000C8053C008F00220048F0222C008F002326
899:10B8300030000000000000008805CC58BB002880C4 899:10B83000E08BF5103C008F8023F08098032D44DBD3
900:10B840000BB2422400A8002AC00A10020460A32000 900:10B840000023D408F8023C00830022C00BA48232FB
901:10B8500024D20800428C839B0120490833C2220174 901:10B850000040000000000000E0054C0093002400C0
902:10B860007000000000000000C015AC00AB8822A0F2 902:10B860000B30028400B30128F60934328C01B3D0C6
903:10B870000BB802260CA8002AC00A9202A400AB064C 903:10B8700024E80A310A860083002AE00030028C00A6
904:10B8800022C00AB002E8009B00024008A042300437 904:10B88000830028C08938A278005000000000000022
905:10B8900060000000000000004015EC00D3803AE09A 905:10B8900020011E00979423E0093802320097A1216D
906:10B8A0000F18010600E83038660EB8032A40EB0096 906:10B8A000E40B78021E40B7A025EC08FC023A009396
907:10B8B00036C10E9603E280DA0832802CBB031004F6 907:10B8B000B821E00878829E4087C029A00B58024832
908:10B8C0007000000000000000E0019C00DF003FC0AD 908:10B8C000004000000000000048082C00DB0034208D
909:10B8D0000FD003F400DC8037600FE803FA00DF01CB 909:10B8D0000F3A038E00F3B028C40B3A03AE40F3A036
910:10B8E0003FC00FC043E64CEFA03F440FA003F80059 910:10B8E00034EE0F30238400E3F038C00CB00B8E42EE
911:10B8F00060000000000000004010AC40DB0036801B 911:10B8F000C30038C00F3063D2020000000000000017
912:10B900000C98032600F8003EC00E18038402E301E1 912:10B90000401DBC00EB423AC41EB10788D1E3003FA2
913:10B9100038C10EB403AC80CA183AD02C30031004DE 913:10B91000C58FF163AC10CB503BC30FD103C800BB44
914:10B920002000000000000000C8053F40B9882E80BC 914:10B92000203BC02EF1031C00FF0037C04FD1039015
915:10B9300008BC02A300B0000EC008B00620008F04AF 915:10B930000660000000000000A805EC40FB44B2C017
916:10B9400023C108B9122F008380364008AD023200AF 916:10B940004FB3432400DB1036C04CBE226D20CB50D9
917:10B950004000000000000000E0054C00B2002CC0D8 917:10B950003EC94CB0132400CF2033C03DF0232CC08F
918:10B96000093202840033002CB20A36128C08930587 918:10B96000D8003E408F30032A007000000000000025
919:10B9700020C00B1802ED0091806A00081002380008 919:10B9700048119C04B76021C18BF0A2141087000FFE
920:10B98000500000000000000020011E00B7802DE0E4 920:10B98000C80D710A1D0087002CCC48702A9C0087C6
921:10B990000978029740B4802FA008E8020E409782F1 921:10B990000C21C00C72020CA287002DC00B70021289
922:10B9A00021E09868821A189D902DA118580208006D 922:10B9A0000460000000000000C0009E00B38021E0A1
923:10B9B000400000000000000048080CC0F3003EC03A 923:10B9B0000B7A02DE00B78105E40879025C8087A07B
924:10B9C0000DB0438440F0003C820E38128C44F330BA 924:10B9C0002DE008F806B600878020E40A7B121E905E
925:10B9D000BAC11E10478E22D11038180C30831202C3 925:10B9D00097882DE00B780E3000200000000000005A
926:10B9E0000000000000000000401DBC40FF003FC000 926:10B9E0004814CC00B30020D00BB0026E34A3002C5E
927:10B9F0000EE003F440FC003DC40FD001F441EF1809 927:10B9F000C10930024C0083002CC04810028D8083A6
928:10BA00003FC41FF003F848EF1433800FC103D00682 928:10BA0000C000C08A30120C0080002C160B380212C5
929:10BA10006000000000000000A805FC40FB003EC0E4 929:10BA10000430000000000000E815A800FA00338898
930:10BA20000F98032400CB003E400FB003A800DB2892 930:10BA20000FA0037990FA0136801CA0036800CA00B9
931:10BA30003EC41F9023EC00CA0032E00C9003EA00E1 931:10BA30003E812CA00BB90CCEE2B2808EA00B280068
932:10BA4000700000000000000048119C80B7002DC06D 932:10BA4000DA803CB00FE0833A0460000000000000A0
933:10BA50004B50521400D4012D800B6002D800A72057 933:10BA50004800E000F0003E000F8003A000C8002E68
934:10BA60002DC50B4016DC00840023C0084002D20420 934:10BA6000000F8423A000F0403E100F8403E102F891
935:10BA70006000000000000000C0009E80B7802DE044 935:10BA7000483E100C8003C010F8803E000F0003D237
936:10BA80000B780A960094802D601B7806D200A78060 936:10BA800000300000000000000810E400D900364239
937:10BA90002DE00B7822DE00878221E0085802F000BA 937:10BA90000F90032418F9103C48689213E400A91190
938:10BAA00020000000000000004814CC00B3E42CC0CB 938:10BAA000B2600E91032600C90032600C1003240816
939:10BAB0001B2102810090002CC80B3902CE00A3008C 939:10BAB000C9003E400C90230204300000000000004A
940:10BAC0002CC00B3002CD008B2020F008B202D20433 940:10BAC00080046400890022400B9002A40889002EA3
941:10BAD0003000000000000000E815A800FEA03F8232 941:10BAD00042489402E40089802270081422A402895A
942:10BAE0000FE8039830D6003FA00FE003BAC0FA0079 942:10BAE000422A7028900A2400A9002E40289002A023
943:10BAF0003E800FEC33F802CE00B3B82CEC83FA048E 943:10BAF000001000000000000018050400990026C096
944:10BB000060000000000000004800E018F8403E001F 944:10BB00000390022401A9000E400A9046C40A89004D
945:10BB10000F80026084F8052E048F8041E0007802D7 945:10BB100020480A900205808141A05888900224089C
946:10BB20003E000F8183E020F800BE020F8003D200A8 946:10BB20008D802FC008980206004000000000000031
947:10BB300030000000000000000810E618F9203E4028 947:10BB300008040480812020400B1202840081242C00
948:10BB40000F9C03E440C90032610C9013C408C90182 948:10BB4000580A3222C584A100205008B0028508811D
949:10BB50003E410F18032400C9A032400F984302044D 949:10BB500040205A0816820400A5002D400812828257
950:10BB6000300000000000000080046500B1C02240E9 950:10BB60000100000000000000B80D6140D8503614FC
951:10BB70000B9C02E71089002844089422E4108900F5 951:10BB70000F85230140E8003E000E8043C008CA0044
952:10BB80002E400B9F222660898022400B910A2000C4 952:10BB800032800E80032000C00032082C02032008FF
953:10BB9000100000000000000018052480B9002EC02D 953:10BB9000C8003F000C82032E03500000000000008C
954:10BBA0004BB402E42089202240089402EC00890072 954:10BBA000981DE440F9103F400F9143F404F9103E12
955:10BBB0002E410B90020400894022400B90020600A7 955:10BBB000440D1103E44459403E504F5043D402FD1C
956:10BBC000400000000000000008040400B104204010 956:10BBC000403E400F900BE500F9003E404FD003E6A9
957:10BBD0008B1002E40581002840281212C4828120C3 957:10BBD000067000000000000018056660C9E03244ED
958:10BBE0002C480B120A0482810020480B1202020129 958:10BBE0000F9C03E400DD843F688FD842E6A0DDA40B
959:10BBF0000000000000000000B80D68A0FA023E142A 959:10BBF00033680D70032500C9E0B2680C9AC32600B3
960:10BC00000F8503E000C80032000C8503C140C85313 960:10BC000099003E400F9A03060070000000000000FB
961:10BC10003E140F80030148C050B2140F85032E0359 961:10BC10003810E3008880AA208B8802E288B8012EC1
962:10BC20005000000000000000981DE400FD00BF402F 962:10BC2000000B8402E2B088502214088002828088CF
963:10BC30000F5013D402FD002FC00FD103F440F910B0 963:10BC3000E0B63A08CEA2210888002E000BC4020EFE
964:10BC40003E440FD103F440FF00BF440FD103E6068A 964:10BC400004300000000000000805C48081606848DE
965:10BC500070000000000000001805E6A0FD013E4451 965:10BC50005B1602C420A1406C500B1402C400A1006A
966:10BC60000FD103D400C50033410FDB032720D9E0F7 966:10BC600024400B90221490854221505B501A1500FD
967:10BC7000B2700DDA83F640CF1032782DDA03060069 967:10BC700095002D400B510A82017000000000000069
968:10BC800070000000000000003810E100B8002E280D 968:10BC80001815A40189002A400B9046E400B9012E42
969:10BC90000B8842E010D80022000B8C0A230088C0D9 969:10BC9000400B9020E400B900264018B802A4028DA1
970:10BCA0002228088402C28080A0223048AA820E0482 970:10BCA000082F408BD00224008D202F480BD0028615
971:10BCB00030000000000000000805C400B1002C4066 971:10BCB0000460000000000000A015E400C90032404C
972:10BCC0008B1202C400990228408B160284819130A5 972:10BCC0000F9002E41049003E400F9002E400E901A9
973:10BCD0002058091002C5008100644D083402020199 973:10BCD00036400F18132410C98232407F902324006D
974:10BCE00070000000000000001815AC0CB9042E48CC 974:10BCE000D9203E720F9003A80470000000000000ED
975:10BCF0000B9406E4009940AA400B9222A40089000C 975:10BCF00028018402F10116404F9003E510F9082E47
976:10BD00006040089402E4008980A65008920206046C 976:10BD0000400F9013E400C9013A401F9003E400F98A
977:10BD10006000000000000000A015E400F9983E4813 977:10BD10002034408C9003C408F9003E600F10034AA1
978:10BD20000F9803E520D9003A640F9483A4C0D90288 978:10BD200000600000000000002810A008F8003E009D
979:10BD300072404D9042E482C94036400C900B28047A 979:10BD30000C80036000E8003E024F8013E000D0005A
980:10BD400070000000000000002801AC28F9883E4087 980:10BD40003E000E81033000CC4033000CC00B20209D
981:10BD50000F9913E700F9C036600F90036600F100F9 981:10BD5000E8003E100FC003CA0420000000000000ED
982:10BD60007E400F9907E460F90038400F9803CA003D 982:10BD600028052804BA00228008A0022800BEC86F57
983:10BD700060000000000000002810A000F810320051 983:10BD7000800BE122A8008E202F800BE02368008A30
984:10BD80000F820B2100E80036040C8603E100D80086 984:10BD800000228008E00229008A002EA80BA000CA29
985:10BD900032000F80036100C80032000F00030A0464 985:10BD9000004000000000000028054C00B30024C053
986:10BDA000200000000000000028052820BE0022809E 986:10BDA0000930020C00B3C12CE00B38562C101300E4
987:10BDB00028EC021904820003800DE482E8008A0165 987:10BDB0002EC00A386A2000880020000980224C42E8
988:10BDC000AA808BED823B808E9036800BE0034A0088 988:10BDC000A3002CE00B2480CA0050000000000000FB
989:10BDD000400000000000000028054200B38020C0A1 989:10BDD000A0011C08B7242FE00939021C01B6002D70
990:10BDE0006B341640C08310247288B002EC008300CC 990:10BDE000900B60928E0086822DC20BF0025C06875B
991:10BDF00024C00B04026F099B0024C00B30020A0010 991:10BDF0000060C02970025C0086002DC00B6002E864
992:10BE00005000000000000000A0011400B78023E4EF 992:10BE00000040000000000000A8081F40F3E43DE8E7
993:10BE100028788274148F0061E0095012DC048722B4 993:10BE10000D790B1EC067802DE00F70431D80D5008B
994:10BE200025C81B780214009440A5C00B602268004E 994:10BE20003D600E78031E00CD8031E00DC8034E004A
995:10BE30004000000000000000A8081220B780B1E018 995:10BE3000E5803DE00F4803EA02000000000000003A
996:10BE40008FF8031202E78035E00C6806CFC2CFB04E 996:10BE4000081DAC80FB0070C06EB613AD40FA003E1A
997:10BE500025F40F58035A02D58075FA4FF8032A02C9 997:10BE5000C00F20432D1859003E0003B00BE000FA3C
998:10BE60000000000000000000081DA590F3003DC088 998:10BE600000BE000EB013AC00F8003EC00F8003C24D
999:10BE70004FB013A804FB003CC00F8043EC80EB6084 999:10BE700006600000000000000005FE40FF803FE675
1000:10BE80003AC90F3003EC00E9003EC80FA003C20618 1000:10BE80000FF8232E04FF903FE40DBA03FF40CF804C
1001:10BE900060000000000000000005F600EE803FE0BA 1001:10BE900022E10C39433210EC9033208EC803F200BB
1002:10BEA0000D8903D240E58139E03CF907FE00CF88D7 1002:10BEA000DF803F600FF803C000700000000000005A
1003:10BEB0003FE00FE803F208CE8033E00CF803000007 1003:10BEB000A8119C40B7903CE00B3A034E80F3B12DA3
1004:10BEC0007000000000000000A8119444C6002FC0BC 1004:10BEC000044C3823AE00808034E84D78023E8087F1
1005:10BED000085802D0C485242190085412DC8207003F 1005:10BED000A029C0087002C08086022D410B7002EAC2
1006:10BEE0002DC00B7006D4008E4821C00A60022A04BF 1006:10BEE000046000000000000000009C4837012DC9DC
1007:10BEF000600000000000000000009C00A7402DC072 1007:10BEF0000B72221C84B5160DC4194042DC808700E9
1008:10BF0000084202D000AD0029C0087022DC2887005A 1008:10BF000020C888730A9C80B50029C00A4802C00274
1009:10BF10002DC00B400298009700A0C40870020000DA 1009:10BF100095002D420B5802C00020000000000000D8
1010:10BF200020000000000000002014CC0893002CE04A 1010:10BF20002014CC00B3002AE00B30024C20A10124E5
1011:10BF3000083C22C10081002080881502CE30830099 1011:10BF3000C10800028C008100248009380A608092C8
1012:10BF40002CC00B3C02CC0493C020F44A0C820804A1 1012:10BF4000402A000A3002C00080C82C720B1402C8BC
1013:10BF50003000000000000000A815A000E3C01FE0B2 1013:10BF50000430000000000000A815BC00FF002FF412
1014:10BF60006C1083E004EB003A524CB403FE02CF00A5 1014:10BF60008FF0033C00B9003E40099003FC02C3017E
1015:10BF70003FC00F8443E102D8C233C00C840B2A04B3 1015:10BF700032C048B813A100BA002A000AA007EC009A
1016:10BF800060000000000000008000E900EB103EC4EB 1016:10BF8000DBC83E900FA202EA04600000000000003F
1017:10BF90000E9403E400FB183EC20FB603EC00FB0155 1017:10BF90008000EC00FB023EC40FB063EC01F8403EB1
1018:10BFA0003EC00F3503C428EA423EC00F8103E000C3 1018:10BFA000400B8003CC00FA423EC00FB500AC58E90C
1019:10BFB00030000000000000000110FC40FF0033C012 1019:10BFB000823EC01D9003EC04FA003E800FA003E017
1020:10BFC0000CC0A33028CDA033C00CE8030C00EF0553 1020:10BFC00000300000000000000110FC0CDF007FC00A
1021:10BFD0003DC00CCA833C00CD083FC20CA003C04446 1021:10BFD0002CF0037C01C70033408FD003FC00D80055
1022:10BFE000300000000000000081046700BB8020C01A 1022:10BFE00015440CE01B3C00CB0E33C05C62021C020B
1023:10BFF00008AA020800A10134D108A4122C008B0069 1023:10BFF000C5002B800FC08780443000000000000087
1024:10C000006EC088B2022C0889802EC00AA803A04006 1024:10C0000081446C10BB002EC008B0520C01FAC4224F
1025:10C01000100000000000000080052C00BA80A2C0C3 1025:10C01000610B88036C0088472A000E1C02200288EE
1026:10C0200008A80AA0008B00A2C0481102AC048B0033 1026:10C0200000AA0028900A2C04A80022900B8002E0AD
1027:10C030002EC00080122A088B142CC0088802E00051 1027:10C03000401000000000000080012C00BB002EC159
1028:10C04000400000000000000008040C00B20022C004 1028:10C040000830126C0088882A300BB802EC009B087C
1029:10C0500008B2128000AB0124C00800020C04830067 1029:10C050002A4008B80220008210220008A022A00076
1030:10C060002CC00830020700820024C00808028201A8 1030:10C060008B002A020BB002E000400000000000003C
1031:10C070000000000000000000000D6C00FB0032C05A 1031:10C0700008000C00B3202CC20836022CC0A00820F7
1032:10C080000CA203A000C90032C02494033C02CF00DC 1032:10C08000000B3346CD28802028C00B32020C2081C3
1033:10C090002FC004800B0902CB013FC02CA003C003BA 1033:10C090003028C00810028100AA002800033002C224
1034:10C0A0005000000000000000A019DC00FD023FC0AD 1034:10C0A0000100000000000000000C7C00FB282ECCEA
1035:10C0B0004FE4137000FD003FC00FC283FC00FF007F 1035:10C0B0000C70537D098800BA000F8003FD80DA60A0
1036:10C0C0003FC00FF003FC00FF003FC00FC003A806F5 1036:10C0C0003A508CA2832C804B2030C028A003A100C2
1037:10C0D0007000000000000000C005FC20EF303F04AD 1037:10C0D000C9003A000F9003C00310000000000000E8
1038:10C0E0006C88033A42E4913F0D0D48033CC0FF02C7 1038:10C0E000A01DFC04FB007EC90BB603FCC0F80C3F8E
1039:10C0F00033440CF403FC82DF3033600DF103300075 1039:10C0F000004FC3432C00B8383F8E5EF043E010F889
1040:10C100007000000000000000A010ED008B702E18E1 1040:10C10000303F010FD0037000FC0037000DD007E96D
1041:10C1100088224A2C82EA262E0C0BB8423D80BF9022 1041:10C110000360000000000000C005FCE0CC8033C0DC
1042:10C120002A5428B402CD00DB402A4A483002A00439 1042:10C120000DF083FC80DC9433C01CF1037D8CFF3068
1043:10C1300030000000000000008805CCB0A3006C10A7 1043:10C130003F308FC8037E10CF9039A08DF803AE003A
1044:10C140000900822082A0202C884B80000C40B30183 1044:10C14000D58013E00C5803F00160000000000000EF
1045:10C1500020480B36028CE0836424402832022201FE 1045:10C150008010DD08880023C408FC02ECA8CB202155
1046:10C160007000000000000000E011AC008B002E0009 1046:10C16000C20DF7121C40DF3022A00B88022E04DB28
1047:10C17000098080A600BA112E880BB0002C00BB02EB 1047:10C170002122C008B8222E00B9802A600A8802E075
1048:10C18000024009B002EC008B002CC808B882B00451 1048:10C1800004300000000000008845CC10802C28CA34
1049:10C1900060000000000000004015EC00EB003E9243 1049:10C190006830028D009B2028C4083202CC10B30006
1050:10C1A0000D80030A20E9003E504580012C04F30075 1050:10C1A00024080B80426C0083002ACA3AB0028C0437
1051:10C1B000906009B003EC008B0226508DBC03100484 1051:10C1B000B00428C0081002E30130000000000000B5
1052:10C1C0007000000000000000C001BC00FF023F80C2 1052:10C1C000C0158C028040AAC008B002EC009B202A57
1053:10C1D0000EF9027C22AF003F6003C00BFC10FF0091 1053:10C1D000C088B002AC009B0026E00380822C289B24
1054:10C1E0003F4A4EF003FC00F7002B600F7003F8008D 1054:10C1E0002022E10BB202AC80B8802AC10A9802F08A
1055:10C1F00060000000000000004010AC00FB00B00038 1055:10C1F00004600000000000004015EC00C8503AC088
1056:10C200000F820BA900C90032D20FA083AC00CB1063 1056:10C200000DB003EC00DB88BAC008B0036C08FB007B
1057:10C210003E400CB003EC00DB0032502C95031004C0 1057:10C2100036600F8C636C00CBC03A800EBE03AF84D7
1058:10C220002000000000000000C8053C04BF0222807E 1058:10C2200079803A88049801D0047000000000000072
1059:10C230000B98002900CB4022C00B24023C088F50F1 1059:10C23000E001BC00FC8035C04FF003DC00EF0037AC
1060:10C240002E500DF002FD428F5822E048B502320018 1060:10C24000C0AFF0031C016F0013000FC123FCB8FF47
1061:10C250004000000000000000E0056C00B300244036 1061:10C250000437C00CF8437E04FD003F040FD003F800
1062:10C260004B940049009080043009000E4C008380FC 1062:10C2600000600000000000004010AC00C8403AC070
1063:10C270002CC00930226E42838020480838023800E2 1063:10C270000CB003EC00FB4038C10EB0432C08C300E7
1064:10C28000500000000000000020011E00B780652063 1064:10C280003E400E82036D00DB4032C15FB4A3ED205F
1065:10C290000B78827A088CC025A34B78025E048784D1 1065:10C29000C94032E08F984390042000000000000065
1066:10C2A0002D61897802DE048780E96208780208003F 1066:10C2A000C8053C00880023C028F5C2FC00B3042365
1067:10C2B000400000000000000048080C00FB0034486B 1067:10C2B000C148F022BC06AF000E40080002CD00BB12
1068:10C2C0000F3B034800934834500D00036C00C3102B 1068:10C2C0000120C0083002EE0081E034A00B90023261
1069:10C2D0001CC2053003CC40CB0032400C20031202BC 1069:10C2D0000040000000000000E0054C02800028C083
1070:10C2E0000000000000000000401DBC20FF010340D2 1070:10C2E000093C024C00B3002CC00AB0020C008301D0
1071:10C2F0000FF0231C00FF003B800FB0233C02FF50D7 1071:10C2F0002C000A0502CD58BB0020000A3D02CF40A9
1072:10C300003DC40FF103EC00EF00B7C00FE103D0060E 1072:10C30000212060C0091002F8005000000000000069
1073:10C3100060000000000000008805EC00FB023EE029 1073:10C3100020011E00848028E4887842DE00B7906502
1074:10C320000C80034802C88132000F9042ECA0FB1041 1074:10C32000E4887A429E40A7902DA00A4822DE04B7F6
1075:10C330003EE00CB103EC40FB1032401FF0032A003A 1075:10C33000802360487842FE80AF9065E00BE802C839
1076:10C34000700000000000000048119C00B7242D8000 1076:10C34000004000000000000048080C00C80038C091
1077:10C35000087042D8108C0221400B5002DD00E7200B 1077:10C350000C3003CC00FB003CC00EBA030C00C30041
1078:10C360002F40087002DC05B70021C00BF002120458 1078:10C360003E004E2202CCC0FB4030C00A3003CE80DB
1079:10C370006000000000000000C0009E00B7902F4049 1079:10C37000E14130C90F3003D202000000000000008C
1080:10C380000A68027A00978021E00B7802DE00B7800D 1080:10C38000401DBC20FC0037C20EF123EC40FF043AF4
1081:10C390002DE0087806DE00B7A021600B784230005F 1081:10C39000C00FB023FC00FF043EC00DA003FC58FFFB
1082:10C3A00020000000000000004814CC00B3002CC0A6 1082:10C3A00000BFC006F083DC62DF003FC00FF0031067
1083:10C3B0000A3402C800834A20F80B3102CC00A300E3 1083:10C3B0000660000000000000A805ED80C9013EC035
1084:10C3C0002CC0083002CC00B30020B20B2042120473 1084:10C3C0008CB207AE04CB803AC84CB2032C84CB307D
1085:10C3D0003000000000000000E815A800BA003F8807 1085:10C3D000B0E00D880B2C00EB0030000CBC832D80EE
1086:10C3E0002EE0435988DE0033B00F6C03E800FA00FA 1086:10C3E000FB0032C00C9003EA047000000000000063
1087:10C3F0003E802CA003E804FA0023B80FE08B3A0437 1087:10C3F00048119C4087002CCC0876823C8287002123
1088:10C4000060000000000000004800E004F8013E0069 1088:10C40000C28D32820D4CA72821800840021D80BFBA
1089:10C41000098221E000F840BE140F8481E000E800AA 1089:10C410002035400972435CA0B70029C0087002D2E1
1090:10C420003E001F8003E000F800BE000F8803D2002A 1090:10C420000460000000000000C0008E0084802DE049
1091:10C4300030000000000000000810E400E10032407D 1091:10C43000087802DEC08F8028EC287B0A9E948384D3
1092:10C440000C9043E420D9003C440890032400F901F7 1092:10C4400023E00958509E10A7B023E00B78021E206D
1093:10C450003E480F10432500C900B2400C900302046F 1093:10C45000B78021E0097802F0002000000000000011
1094:10C46000300000000000000080046400B900A0401B 1094:10C460004814CC02821C2CC02830024C0083C0200F
1095:10C47000089802E608A9602E490894022400B90031 1095:10C47000C00830020C00A30060D2081D020F20BBD0
1096:10C480002E700B900226028900A0400A900A20001C 1096:10C480002424C00B3C024F00B38028D8093202D2CA
1097:10C49000100000000000000018052400B900224030 1097:10C490000430000000000000E811A800CE843E80B7
1098:10C4A000089804E60099802E400AB1022400B900E1 1098:10C4A0000CA003E800CEC03A8008A003A800CA0090
1099:10C4B0000E400B900A0400810122C0081002060001 1099:10C4B00033800DEC033B80EE8233800AC08710404E
1100:10C4C000400000000000000008040480B120224861 1100:10C4C000F6C03390AD6403FA006000000000000085
1101:10C4D000081806C400A1002C482A30020480B122AA 1101:10C4D0004800C002F8003C001F0403A004F8303EEE
1102:10C4E0002C480B12020580816022500A14020201BE 1102:10C4E000000F8003E000F8003E040F8093E000F8A6
1103:10C4F0000000000000000000B80D6140F850321448 1103:10C4F000103E002C8403E000F8183E100E8003D29A
1104:10C500000C8503E140D8503E140E800B2140FA0008 1104:10C5000000300000000000000810E400D9003E40A8
1105:10C510003E940F85032000C00032000C80032E03E0 1105:10C510000E9003A410F9003E400490032400410053
1106:10C520005000000000000000981DE441F9103D4556 1106:10C520003E400F9113E108F8003240088983A200D1
1107:10C530000FD003F400FF003F450DD003E440F91095 1107:10C53000C98032400C900B02003000000000000067
1108:10C540003F440F9103E442F9103F400FD403E60645 1108:10C540008004640289002E400D90022400B9002E60
1109:10C5500070000000000000001805E400F9003E40F3 1109:10C5500040489002A400890022408B9442E220B817
1110:10C560000CD003F4088D023F400FD003E400CD004F 1110:10C5600000A240089402E504A990346008900220DB
1111:10C5700033400C90032400F90032404C982306000D 1111:10C5700000100000000000001805241099002E4053
1112:10C5800070000000000000003810E000E8002E00FD 1112:10C580000A9002E400B90024400A10020400A90045
1113:10C59000488002E800D0002E800B8012E002880064 1113:10C590002A400B9082E001B80020403A9002A44467
1114:10C5A000A2000A80122200B881222808CF020E04BD 1114:10C5A0008904226208980206004000000000000092
1115:10C5B00030000000000000000805C400B1002C405D 1115:10C5B0000804048A81002C480932064480B1002C0A
1116:10C5C000281002C40081002C400B1002C40091000E 1116:10C5C000480A12028480A12020500B1402C500B139
1117:10C5D000264009100254A0B52CA542085082020141 1117:10C5D0004020500A2402C900A3002440081102028E
1118:10C5E00070000000000000001815A400A9002E50E3 1118:10C5E0000100000000000000B80D6140D8503E146A
1119:10C5F000589002E4809B002E458B9202E400990043 1119:10C5F0000E8003E140F85136142E85432142E85065
1120:10C6000026440B90026408B500254A08510206042E 1120:10C600003A000F8012E000F80032001E8043A000C4
1121:10C610006000000000000000A015E400F9003E5496 1121:10C61000C80132000C80032E03500000000000000F
1122:10C620000C9043C400C9903E700F9803E400D900F9 1122:10C62000981DE440FD003E444E1103A440B5003E79
1123:10C6300034604D900A6400F90036402C9E032804B3 1123:10C63000440D9103E440D9103F400F5003E500F949
1124:10C6400070000000000000002801A400F9003C4038 1124:10C64000403F400D4403F100F5023DC02FD203E608
1125:10C650000F9C03E630F9003E620F9003E400E9000E 1125:10C6500006700000000000001805E700E9003660E1
1126:10C660003A404E9003A400790C3A400F901BCA0048 1126:10C660000DDA03E640F9403E680C9A03662089A083
1127:10C6700060000000000000002810A000F8003E004C 1127:10C6700033400E9007A600F9803E500CCA03F380A9
1128:10C680000C8113E108C84832003C8003C000F01060 1128:10C68000C50233400CC003C600700000000000006B
1129:10C690003E060C8003F008CC0033040CC0030A04EF 1129:10C690003810E30488A22038088002E340B0802EDE
1130:10C6A000200000000000000028052800BA002E80AD 1130:10C6A00028088A82238088802200DB88026204B8FE
1131:10C6B00008EC42FA208E0023A008E842E800BE8081 1131:10C6B000B02EA8888EA2EA8088002A002888038EDF
1132:10C6C0002F8008A002E800DA00228048E0020A0079 1132:10C6C00004300000000000000805C582A9082C52B3
1133:10C6D000400000000000000028054C00B3002CC002 1133:10C6D0000B1402C480B1210C5288140244209169C9
1134:10C6E000093482C900838020F0083082CC00B380F6 1134:10C6E00020400A1082C6E0B10C2C48080102E193F8
1135:10C6F0002CF008B002C1208000A0320800020A001D 1135:10C6F000A10124410A1002C20170000000000000E4
1136:10C700005000000000000000A0011CC0B7012FC8AD 1136:10C700001815A40089042240089000E40039020EA4
1137:10C71000895002D80287C421E2487082DC00B70049 1137:10C71000400810622400910062408B8002E054B90E
1138:10C720002C40087202CE00970823C008700228002F 1138:10C720000C2E4009B652EC00A9002A400A928086DD
1139:10C730004000000000000000A8081E00F7E13DE8EE 1139:10C730000460000000000000A011E400E160364049
1140:10C740002D6803F200C780B0E0086803DF80F68040 1140:10C740000D9023E400F9303E402C90436406C9006C
1141:10C750003DE08C7E03DA00CC8031200CC80B2A022D 1141:10C7500032490E8D93E000F9002E402C9403C7401F
1142:10C760000000000000000000081DAC08FB003CC0F9 1142:10C76000E92030550E9003E804700000000000003E
1143:10C770000E8003E008F9003E400FB002EC00FA0022 1143:10C770002801A400F9001E400F9003E400F9803C5A
1144:10C780003E402FB003E400FB003CC02FB003C206C4 1144:10C78000404F9003E400E904BE400F88336200F993
1145:10C7900060000000000000000005FE00FF927FEA3C 1145:10C79000C23E482E8833E200D9003E600D8003CAB5
1146:10C7A0000CF803FE00CCA03F200DF9033E00CF8023 1146:10C7A00000600000000000002810A000C8003E004B
1147:10C7B00033600FF803F600EF8433E02CC803000069 1147:10C7B0000D8003A004E840BA000C8003E004C80028
1148:10C7C0007000000000000000A8119C00B7002FC8F6 1148:10C7C0003A000E8C03E000F80232000E8003612074
1149:10C7D000085402D800D6042D010869021C00850007 1149:10C7D000F80032160F8003CA042000000000000099
1150:10C7E00021430B70039AC08C00A30208F1022A04B3 1150:10C7E000280528008A002E8008E20328008A0022FB
1151:10C7F000600000000000000000009C00B7012DCC8C 1151:10C7F0008008A002E8048A002EA209E802FA04BE1A
1152:10C80000087002D40094282DC208C2025C00860081 1152:10C8000000A28008CD823320B6C037A04BC882CAB0
1153:10C8100021800B7102DC00A71021C00848024000F3 1153:10C81000004000000000000028056C00830026C0D6
1154:10C8200020000000000000002014CC08B3002CF011 1154:10C820000938024C00B30024C0083002EC00830039
1155:10C83000080502C02090802E000800824C02800073 1155:10C8300028E00B3002CE81B30062C0083C024F00FA
1156:10C84000A0610B3002A0008000A03088B10A48042B 1156:10C84000B3A020B0033002CA005000000000000076
1157:10C850003000000000000000A815BC00FF002DC83B 1157:10C85000A0010C4187342DC00860029E40B7A02D76
1158:10C860000C3D03E400DB023EF02C904B7C00C10049 1158:10C86000C0087302DC0087202DC00B7082DD85BFFD
1159:10C8700032204FF013E000E80132008CAC036A0470 1159:10C870008163C8887B021C00B74065001B7202E818
1160:10C8800060000000000000008000EC00FB043EC2DD 1160:10C880000040000000000000A8081E00C7813DE035
1161:10C890004FB003E004FA403EC24E9823AC10F800BB 1161:10C89000DD7003FE80F7903FE02C7903FE80C7A097
1162:10C8A0003E5007B013AC00FB003EC20F9203A00045 1162:10C8A00039E00F7A02DE84F7C231F20C79035E04BC
1163:10C8B00030000000000000000110DC00CF003FC08D 1163:10C8B000F78431600F7E03EA0200000000000000F0
1164:10C8C0000CC8233682CF803F800CE003EC00F920B7 1164:10C8C000081DAD0AFB607ED40F30036C00CB003234
1165:10C8D00033C00EF003F810DC0033004CE8210044B4 1165:10C8D000DE2FB203ED421B603EC10DB103EC50F7F9
1166:10C8E000300000000000000081046C00AB002EC08E 1166:10C8E000803DD82E3203EC30FB003E400FB003C237
1167:10C8F0004A8D4221008B422ED208B003EC00B8884A 1167:10C8F00006600000000000000005FF00CBD03FF004
1168:10C9000034620DB002E4008B0022C008900A20407F 1168:10C900004CF813FE00CF883FE00CF8433F00CFC83F
1169:10C91000100000000000000080052C008B002EC0DD 1169:10C9100033E00CF803FE00FF803FE02CF803BE205C
1170:10C9200008A0020D0089102E08289202EC04BB001A 1170:10C92000C78033E00CF80100007000000000000038
1171:10C9300022A008B0026402B30220C008A202A00034 1171:10C93000A801BC4087903DC0084002DC80D7002D94
1172:10C94000400000000000000008040C00A3002EC0FE 1172:10C94000C00C30037C00871021C41E7020DC44B76B
1173:10C950000A90220C1080002C00180282CC00B0003B 1173:10C950000039C00C71021C40D70229400870022A1D
1174:10C960002640093002C820800020000810068201FD 1174:10C96000046000000000000000009C0087322DC021
1175:10C970000000000000000000000D6C00CB002EC085 1175:10C97000087002DC0187002CC02B700A5C00830069
1176:10C980000CA102240088003C000C8003EC00FB009A 1176:10C9800023C0087002DD00B7002DC40BF0029C200C
1177:10C9900032800EB003CC80DB0032C00CA0038003D9 1177:10C990008718294008708200002000000000000075
1178:10C9A0005000000000000000A01DFC00FF003FC080 1178:10C9A0002014CC00830228C0081002CC0883402E3B
1179:10C9B0004FC213D410FC003F000F0003BC00FC006A 1179:10C9B000C02A30020C008B0020F20A3002CE00B3F5
1180:10C9C0003F400FF023E012FC01BF000FD0036802CC 1180:10C9C000882AD00A30060C0092002878083C4208D9
1181:10C9D0007000000000000000C005FC00C78033C0EC 1181:10C9D0000430000000000000A815BC02C7002FC0F2
1182:10C9E0008BB403B0C0CF2E1F0C4FC3033080FF01A8 1182:10C9E0002C9002FC028FD83FC04BF0027C02CF009B
1183:10C9F0003F080FF0007C00FF2133E40CE00330001F 1183:10C9F00020F208B013EE80FF003FD42EBD83AC00C0
1184:10CA000070000000000000008010EE008B8223F018 1184:10CA0000CB803AA0ACB8032A04600000000000000C
1185:10CA10000BB5120D8888C00E980B86022100BBC092 1185:10CA10008000EC00FB103EC00F8403EC10FB003ED6
1186:10CA20002EE44BF7832F44BF9022C848A6822004EF 1186:10CA2000C001B003EC00FB00BEC00EB023EC08FB5D
1187:10CA300030000000000000008805CC098A0020506A 1187:10CA3000103FC00DB403ED04F9001E14CFB083E025
1188:10CA40004BB20A80CC83010C8C0B230A0460B31414 1188:10CA400000300000000000000110FC00CF0030C0EA
1189:10CA500024404B3002CC10B30020C8E9110662011B 1189:10CA50000C4003AC00FF003FC02CB003BC00FF0043
1190:10CA60007000000000000000C015AC018A80A244E4 1190:10CA6000B3E00DFA037E80CF0033C00CFC43FF20FF
1191:10CA70000BB002A10488402EA00B20022820BB404E 1191:10CA7000FF003F4008F803C0443000000000000001
1192:10CA80002E400BB0022C08BB0022C009B00270047B 1192:10CA800081046C10AB002AC00A8E422C04BB002E1D
1193:10CA900060000000000000004015EC00C38332E09D 1193:10CA9000C008B0026C00BB003AC00E30020D088323
1194:10CAA0008F0003A002CBC43E28078B032100F9C0EE 1194:10CAA0000222C00ABC02EF00BBC02C680AB902E037
1195:10CAB0003E100FB003EC007B0032C00DA003500409 1195:10CAB000401000000000000080050C008B0022C028
1196:10CAC0007000000000000000E0019C02FF003FE059 1196:10CAC00008B802AC00BB022EC008B002EC00BB00EC
1197:10CAD0000FF4435E80FC943F000FC02BF250FD2109 1197:10CAD000264819B0026D008B0022C00AB002EC0497
1198:10CAE0007E848FF0036C0CFF003FC00E6203B80021 1198:10CAE000BB1C2E200AB002E0004000000000000045
1199:10CAF00060000000000000004010AC00EB0032407D 1199:10CAF00008140C00AB2028C00A00020C0093042C80
1200:10CB00002C80036900CB30B2004FB343E500CB402B 1200:10CB0000C10830024C00B300244109B8020C028372
1201:10CB100072182CB003EC28C3213AC10F94031004FF 1201:10CB100001A0C00A3002CC1093002C000A3002C2DF
1202:10CB20002000000000000000C8053C008B202250BF 1202:10CB2000010000000000000000057C00CF2833C099
1203:10CB300008B002280088C02A008BB402E800DB009D 1203:10CB30000CA046AC11BF003FC05CF043FC00FF04FA
1204:10CB4000623008F002FC008F8022C00B9547320053 1204:10CB400032400DB0036C08CB0431C00CB033ED4063
1205:10CB50004000000000000000E0054C00B10020C2D1 1205:10CB5000FB043E400EB003C0035000000000000084
1206:10CB60004830024980834260120B3002C8008202C2 1206:10CB6000A015FC00FF003FC00FC023FC01FF003FE9
1207:10CB70002C3009B002CF0183502AC00B2002B8002C 1207:10CB7000C04FF0877C00FF0039400EF003FC00FF3F
1208:10CB8000500000000000000020011E009D80A0E079 1208:10CB8000003FC00F7003DC80FF003D400F7003E8E2
1209:10CB90000879225E60879029A00B7802C6009281F6 1209:10CB90000670000000000000C005FC40EB483EC2EB
1210:10CBA00005E0097802DE40878021E00B29020800B9 1210:10CBA0000E0903BC60C02035240ED2132C60FB6A32
1211:10CBB000400000000000000048080C40F20030C0B7 1211:10CBB00033C00FCA032220C08037C00DF0037C00B1
1212:10CBC000083A034404C31430C00F2203CC80C200CF 1212:10CBC000EF0033240FC803300070000000000000A5
1213:10CBD000A4D20D3013CC20C30038C44F044312023A 1213:10CBD0008010DD008F602FD808A202FD80C870226F
1214:10CBE0000000000000000000401D9C00EE003FE03F 1214:10CBE000002CFD07DC84BF6023D20BBD022300882C
1215:10CBF0000F7003B402F4103FC08FA003FC007E004E 1215:10CBF00080A22088B0223400BB5022C80BB0022093
1216:10CC00003BC00EF083EC00F7003FC00FC003D0061E 1216:10CC000004300000000000008805CC40A3032CC2C3
1217:10CC10006000000000000000A805FC00F9003EC014 1217:10CC10000A00428C82A30A24800B3002CC90B3001D
1218:10CC20000FA003AA12CB0132800FB0132814F98091 1218:10CC200028D80B10028C02900020C00B10424C0040
1219:10CC30003A4003B403EC42CB183EC00FB0032A00C5 1219:10CC3000B30424C00B300EA20170000000000000FD
1220:10CC4000700000000000000048119D00B5002DC4D8 1220:10CC4000C015AC109B042CC0F89806EC00AB8026F5
1221:10CC50000B704B7C00840021800B70029410B2009A 1221:10CC50002008902AAC10BB000AC01BB022AD00987F
1222:10CC600029C00B7282DC0087202DC10E70021204D5 1222:10CC6000402A704BB0022C00B300A6861BB082B0E5
1223:10CC70006000000000000000C0009E00B7802DE0B2 1223:10CC700004600000000000004015EC00EB003EC026
1224:10CC80000B68029E00838021E05B38021E00B4C066 1224:10CC80008E9803AC08E8C036304FB042EC00F98013
1225:10CC900025E0097832CE0097802DE00B5C4E300005 1225:10CC90003AC08F88422010C81030F00F30136C104B
1226:10CCA00020000000000000004814CC00B3442CC059 1226:10CCA000EB0036F00FBD03900470000000000000A0
1227:10CCB0000B3C02CC40930820E00B30028C10B3C038 1227:10CCB000E001BC00EF047FC00FF043DC00C4003B88
1228:10CCC00028D81B3002CC0893016CC00AB882120429 1228:10CCC000408BDC037C10F99036C24FF9236241ACF3
1229:10CCD0003000000000000000E815A800F6103E80BB 1229:10CCD00001134004B003E400FF003BC00FC0037821
1230:10CCE0004BED83B800CEE4B3A30FE0033800FE00A1 1230:10CCE000006000000000000040108C12CB00F2C079
1231:10CCF0003B800DA002E800DA003E800FE8023A0413 1231:10CCF0000F8003AC08D9003A800F1203AC00E100AA
1232:10CD000060000000000000004800E010F8403E0015 1232:10CD000032C00C9003ED02C8403ED00F90132C02AD
1233:10CD10000F80136000E0003E00430803E000F808C5 1233:10CD1000DB003E500CB403100420000000000000B3
1234:10CD20003A000F8003E000E8403E000E8023D2006E 1234:10CD2000C8053C008F0017C00890023C088D002207
1235:10CD300030000000000000000810C400D9C0BE4050 1235:10CD30005408B4033C00890023C0403502CC248051
1236:10CD40000F9003E600F9003240019A032400F90035 1236:10CD40000022744CB0022C008F002ED40AB00A329C
1237:10CD50003E400F9003C44009100E400F9A03020496 1237:10CD50000040000000000000E0014C02830024C0FD
1238:10CD60003000000000000000800464048904A26018 1238:10CD60000900028C0190006A410A30204E10310205
1239:10CD70008B9D80A600B98022404898022400B9000B 1239:10CD70002CC0092006CE00800060E00A30820C083A
1240:10CD80002E408B9002E49489602E400B940B20007F 1240:10CD800083082CD009B00278005000000000000099
1241:10CD90001000000000000000180524009908AE48AB 1241:10CD900020011E0487B020EC09E9028E589DB02BBB
1242:10CDA0004B1002E581B91020441B94022410B900F5 1242:10CDA000A5405B06DE4095942DE4197B06DE0084E9
1243:10CDB0006E600B9002E40089002E400B9402060086 1243:10CDB0008060E00A780A161087802D680B79024897
1244:10CDC0004000000000000000080404808900A06802 1244:10CDC000004000000000000048080C00CBA024E058
1245:10CDD0000B12028489B12020481A12120480B12259 1245:10CDD0000F2A038E00D2D038FA0F18C3CE2431B0F8
1246:10CDE0000C480B1202C481A1202C400B120202013C 1246:10CDE0003CE50C3B17CE04C08238C29E10030C00F9
1247:10CDF0000000000000000000B80D6000D800BE0078 1247:10CDF000C3013EC00D81035202000000000000008C
1248:10CE00000F050BE140F80032140F85032140F800B4 1248:10CE0000401DBC00EF103EC20EB1232CC1AB013659
1249:10CE10002E800F8513E002C8003E140F05012E037B 1249:10CE1000800FB0232D90E98472C862F117FC00FCEA
1250:10CE20005000000000000000981DE440FD00BF44D9 1250:10CE2000003BC41DF003EC00EF083FC80EF1039077
1251:10CE30000FD103F4407D10BF4445F12BF440FD10A9 1251:10CE30000660000000000000A805EC80FBA43AC8D2
1252:10CE40003F440F9103E440D9103E400FD103A606A2 1252:10CE40000E90032C04CA0030602D1A276C84CB602E
1253:10CE500070000000000000001805F600FD001F62D1 1253:10CE500032D20CA0132D84CB023EC00DB803AC809F
1254:10CE60000FD8823600BDA03B680CDC8326C8D9A051 1254:10CE6000CB8132800CB003AA0070000000000000EB
1255:10CE700033600D99835620D5A82E440CD8838604A0 1255:10CE700048119CA4B72873C208F0023CC08F00314F
1256:10CE800070000000000000003810E148B8002E00DB 1256:10CE8000C00970829C80870C20D80970221C3084D5
1257:10CE90000B0A822220B85022BA088A2222808800F7 1257:10CE9000003DC0087002142487A021C0087012123F
1258:10CEA0002201080C02200088002E28888802CE0467 1258:10CEA0000460000000000000C0009E40B39529E926
1259:10CEB00030000000000000000805C400B1002C4054 1259:10CEB0000A68029ED086F0A3E00878129E44A382FE
1260:10CEC0001B100A8440B10028580A3202050099401C 1260:10CEC00021E80B38020E1087802FE00B18028E022B
1261:10CED0002065091042C40091002C400A3082C20132 1261:10CED000870021E0087802300020000000000000F8
1262:10CEE00070000000000000001811A400B9002E40DE 1262:10CEE0004814CC00B30024C04830020C04838020D6
1263:10CEF0001B9002A580B910224808104204100900B6 1263:10CEF000D00910028C06A38020C00B30020C0280E7
1264:10CF00002240089002E4009B002C400A9422C604B0 1264:10CF00004028D20A30020C018300223C088702121A
1265:10CF10006000000000000000A015E400F9203E4081 1265:10CF10000430000000000000E815A818FA003A806C
1266:10CF20000F9013A710F960BA502E9C0A2584D1F0F7 1266:10CF20008EE4422802CE8033804DA083E800EAA040
1267:10CF3000B2600D9003E400D9003E400E9003A800BB 1267:10CF3000B2800AA00A2800CE182F800FA013A800E4
1268:10CF400070000000000000002801A40CF9903E6A67 1268:10CF4000CA0032902CAC0B3A0460000000000000D4
1269:10CF50008F90236600F1083C400F9C43E440F98029 1269:10CF50004800E000F8043A000F8083C008E8033A74
1270:10CF60003A440F90032404E9023E402D9113CA0075 1270:10CF6000000E8022C000D0007E10A48003C000F814
1271:10CF700060000000000000002810A000E8203E0132 1271:10CF7000003E100D8403C000F800BE000F80015277
1272:10CF80000C0003A120E85032102C8C032100E80093 1272:10CF800000300000000000000810C402C900364054
1273:10CF900032020F00132088C80832000F8C03CA0029 1273:10CF90000C90036402890432420D9203E642C900F8
1274:10CFA0002000000000000000280528208EE32F90BC 1274:10CFA00032700E120B2408C9003E450E9903E402AC
1275:10CFB0000AE0063B00EE04239008E00228088A02FB 1275:10CFB000C10032500494030204300000000000005D
1276:10CFC00075908BA04158908E802A810BE0038A10C7 1276:10CFC0008004640089006E400890022400890022D9
1277:10CFD000400000000000000028054E00A3006C6027 1277:10CFD000540B9003E6008900224008900A2400893F
1278:10CFE00008381A8E40A08020CC0930020C05A3041A 1278:10CFE000003848089082E404D900224008900220CA
1279:10CFF00028C40B30020D0183C020C00B3002CA00D0 1279:10CFF00000100000000000001805240089012C40EA
1280:10D000005000000000000000A0011E0887002D62F3 1280:10D000002810426400A1042250019042E4008904E7
1281:10D010000B70921C08A00061C00960061C80A7006C 1281:10D0100020420A9042340089006E400A9000E400E9
1282:10D0200021C00B72025801878829C00B6012A8002A 1282:10D02000890023400AD002060040000000000000F2
1283:10D030004000000000000000A8081E00E6803D60DF 1283:10D030000804048081242C480810020480A12028C0
1284:10D040000C78429600E480A3600D78033F00E380F3 1284:10D04000400B100285808120204808506214028124
1285:10D0500021E00F7B031608C78031E24F7843EA02D4 1285:10D05000032E40881682C4A0912821402A50020243
1286:10D060000000000000000000081D8C01F8003C409A 1286:10D060000100000000000000B80D6140C8502E14FF
1287:10D070000EB002EC00F8013E404E3033ED20DB01F3 1287:10D070000C85036140E850B2154D8002C000485055
1288:10D08000BEC00FB403EC00FB003ED80FA003C206E5 1288:10D08000B2151A80133008C8003E000E8203E080FB
1289:10D0900060000000000000000005FE00C78423605F 1289:10D09000C02030000E400B2E0350000000000000A6
1290:10D0A0000C780BBE00FD803FE00FEB033E00CF800D 1290:10D0A000981DE440F9103E440FD003E448DD1037EA
1291:10D0B0003B250CF8837E40CD8033E20BF903000062 1291:10D0B000400FD407E440FD103E450F9403E508FD02
1292:10D0C0007000000000000000A8119C0287001548B5 1292:10D0C0000239D00FD043F4A0F9283E4B0D9283E6ED
1293:10D0D0000870021420B600359A49C8039C84A70042 1293:10D0D00006700000000000001805E680C9A632684E
1294:10D0E00039D00A70021A08A40021C00961422A043A 1294:10D0E0000C9003A681E9E93B400E58033620C9A005
1295:10D0F000600000000000000000009C00870021404C 1295:10D0F00037780DDA033626C50037690EDE03A682BF
1296:10D100000871029400B5002D400BF1225C02070863 1296:10D10000CDC033500FD003060070000000000000B7
1297:10D110002C50087002500087002DC40B50420000B4 1297:10D110003810E3A488A9223A08080022A0B8E53014
1298:10D1200020000000000000002014CC0083022440F6 1298:10D120002028802243A008E82A3D08A46220008825
1299:10D13000183D0A0100B05824200930028F4083E0D6 1299:10D13000002E10088E0323A088A020280B8A820EC0
1300:10D140002CC10A30420800B3016CC009081608045B 1300:10D1400004300000000000000805C4409140204465
1301:10D150003000000000000000A8158C008B00324059 1301:10D150000890A28510A1202C420B14128C01911072
1302:10D160000C2503A848F8813E800F80637C00CB80AB 1302:10D160002C4809110AC40081002C500B1112C50172
1303:10D170003AC00CF0036C00CA02BFC00F988B2A049F 1303:10D17000B14024480B180E020170000000000000AE
1304:10D1800060000000000000008000EC00F9003E504C 1304:10D180001815A400910022410894422400B14020C7
1305:10D190002FA40BC800F0403ED00FA033EC20FB04BE 1305:10D190004049B262240099000A40089002E5808963
1306:10D1A0007AE00FB003ED08E90332C00D9003E00010 1306:10D1A000002E4009B0022480B90026504B900206A0
1307:10D1B00030000000000000000110EC40EE003EC016 1307:10D1B0000460000000000000A015E402D900B240A5
1308:10D1C0000CDA037004CC02B1A00EF023EC00FF00D7 1308:10D1C0002C9513A410E900BE608F900BA410590099
1309:10D1D0003720CDB073EC88FB803FC00F3003004494 1309:10D1D0001E409D9423E402890034400F9003E6082A
1310:10D1E000300000000000000081046E0088802CE107 1310:10D1E0007900B64007980328047000000000000092
1311:10D1F00008940AA902884022D008B942EC04BB0076 1311:10D1F00028018400E9023C402F9802E400F9423AF9
1312:10D200002CD40DB002ED20BBD02EC00BB002A0403C 1312:10D20000680A1003E410E9003E400E900F2600F972
1313:10D21000100000000000000080052400AB802EF00C 1313:10D21000043E400E1C03E600C1003A500F9983CA39
1314:10D2200029A0826D0088082204089042EC00BB000F 1314:10D2200000600000000000002810A000E8003A00A4
1315:10D230002A8108B002E409BA042EC14B988220006A 1315:10D230000C84032000D84232040C8813E000C8009C
1316:10D2400040000000000000000804040083002CC01F 1316:10D2400030000C040B0000D80036000E80230000D4
1317:10D250000A210284108200E000180A12CC00B300F8 1317:10D25000C88032000C80010A042000000000000099
1318:10D260000CC0093002CC90B0002CC00B100282011F 1318:10D26000280528108A002E8028202228008A0023E2
1319:10D270000000000000000000000D6400EB003E0014 1319:10D27000B088E0022810DA00A3B408E81028008E75
1320:10D280002CB40364088800B2000CB243FC00FB001D 1320:10D280002023A048ED1A2800DE0023900AE0020ABD
1321:10D2900056000CF001E400FB003FC00F800B0003C0 1321:10D29000004000000000000028054C00A30028C04A
1322:10D2A0005000000000000000A01DF400FF003F40FF 1322:10D2A00008300A0C00930020C22A3022A400BB00E0
1323:10D2B0002DF061F000F40027010DB111FC00FF0218 1323:10D2B00008E018090A4C00930224E80208064C0012
1324:10D2C00007C00FF003EC40FF003FC00FC00368062B 1324:10D2C000930020D80A90024A00500000000000009D
1325:10D2D0007000000000000000C005F600EF903D4C1B 1325:10D2D000A0011C8087042DC00870020E0087102555
1326:10D2E0002CC013F408FD20374C8E82837484DCC27A 1326:10D2E000000A60025E009700298208501254008FE5
1327:10D2F0003FD80DF203ECC0FF813F000CF803F000B3 1327:10D2F0008061D00804025C01B708A9A00A508268C6
1328:10D3000070000000000000008010E6008B242E5CFE 1328:10D300000040000000000000A8083E80E78038E4EC
1329:10D31000088D02FF48B9902F540B84823E40A080B4 1329:10D31000087E031F00DF80B1211E7803DC04F38048
1330:10D320002EC40AFC42ED80B9802E600A9812E004F7 1330:10D320005BE10828035E00D78035600E68034E007D
1331:10D3300030000000000000008805E401A300284838 1331:10D33000DF8031E00EF80B6A020000000000000000
1332:10D340000A0042C400B1002C490B0A4204A29121F8 1332:10D34000081DAD02FB743ED04FB283ED007B683AFE
1333:10D350002CC90831028CC1A3002C40081802A2017C 1333:10D35000008D8003A420DB0136806FB0418400EB98
1334:10D360007000000000000000C015A0208B822E4439 1334:10D36000003CC00FE683BC40DB00B6800FB00382F8
1335:10D37000588002E400BB102E400BA1120C01891052 1335:10D3700006600000000000000005FF20DFC03BE663
1336:10D380002EC00AB002EC01B8802EE20AA102F0041D 1336:10D380000EF813FF44C7823BE00FF903BE10CFC86D
1337:10D3900060000000000000004015EB40EB403E60E4 1337:10D3900033608DEB033E00DB823FE00CD8033E4060
1338:10D3A0000E8733E400B9A136C00EA80B2600DAC000 1338:10D3A000CE8033E40FF8030000700000000000009E
1339:10D3B0003EC08DB003EC00FB853EE108B80390054C 1339:10D3B000A811BC40870021E40B78A2CE90C7B02012
1340:10D3C0002000000000000000E001B800FF022F6014 1340:10D3C000E80B2892B68887A020640B3503140087E9
1341:10D3D00003E883FC10FD801F401FD013BE40EE0405 1341:10D3D000B239C02CC0035E02CF0031CE0B76122AC8
1342:10D3E0003FC00FF043FC08FD003CC00FD011F80017 1342:10D3E000046000000000000000009C00A31029C899
1343:10D3F00060000000000000004010A400DB00B2400C 1343:10D3F0000B7402DC808F0029CC0A30061480871061
1344:10D400000E94032400D900BAC00C2003E490FB0062 1344:10D4000021C00B66025C0087002DC00B51021C80FE
1345:10D410003AC00CB003EC01FA003ED02C9803900403 1345:10D41000960021C05B748200002000000000000024
1346:10D420002000000000000000C80503008B00224817 1346:10D420002014CC08A30020C00BB802CC008B40A86D
1347:10D430000884222C00B90022C008A002ED008BA0B5 1347:10D43000C08B08228C02830060C00B304204008342
1348:10D4400021C008F002FC00B9802EC008A002320002 1348:10D440004028FC8A00026E008300A0D08B380208BE
1349:10D450004000000000000000E0054520930022F895 1349:10D450000430000000000000A811BC02EF003BC037
1350:10D460000B300A8440B2002040081002C4008080C3 1350:10D460004FF802FC02CF0038120E98022C00CF00B9
1351:10D4700028C02839024C00B1002CC0083002B80086 1351:10D4700032C0099003640281C03ED00F90073C0384
1352:10D480005000000000000000200136009F80216055 1352:10D48000D90032600F88032A046000000000000009
1353:10D490000938029E00B2C02060484812D6C686D025 1353:10D490008000CC00DB003EC08FB003EC00FB023606
1354:10D4A00021E0087800DE80B7822DE008F80208004D 1354:10D4A000C04F9002E400FB00BE900F9C13EC00E91B
1355:10D4B000400000000000000048080C20D31030C8D5 1355:10D4B000183AD004D503EC40E9003A008F8003E02D
1356:10D4C0000F30038400F1003040241903E4C0E04031 1356:10D4C00000300000000000000110FC00CF003DC152
1357:10D4D0003AC00C3203CE80B1283CC00C301392020B 1357:10D4D0008CF0032C00EF0AB3122C7023140A4F00B7
1358:10D4E0000000000000000000401D9C00E6007FC01E 1358:10D4E00035600DB0030400CD8007E80CC4032C00A8
1359:10D4F0000EF0237440FF103F404FD003FCD2CE0407 1359:10D4F000CD0031E22CE003004430000000000000C9
1360:10D500003FC00FF403FC00FE003FC00F7103D012B8 1360:10D5000081046C02AB022EC00EB0022C008B0032E4
1361:10D510006000000000000000A805EE00CB0016C06F 1361:10D5100030009C036C008B04223608344A2C0889A6
1362:10D520000D80032720CB003EC20AB053E428C181FE 1362:10D520009020B80F8400AC02890036A008A4022025
1363:10D5300032C10EB9032C00F18035E00CB8032A0487 1363:10D53000401000000000000080052C008B002EC071
1364:10D54000700000000000000048119C0287102D4070 1364:10D5400008B0020C008B0022D10888122600A3002C
1365:10D550000870035C00A7002D40287002D4048704E3 1365:10D5500026400BB00226008B0026C05810122C0467
1366:10D56000A1D00B72021D00F70021C00D5002120461 1366:10D5600082802A49083002200040000000000000AC
1367:10D570006000000000000000C0009E00858025E0E3 1367:10D5700008040C00A3142CC81A348A0C848340229B
1368:10D58000097802370387802FE0087812C6108D8053 1368:10D58000C80803624CC0A36020400A30020C008B24
1369:10D5900025E80B38021E80BC8425E0085802700084 1369:10D590004508C00B10028CA08300264008300A0208
1370:10D5A00020000000000000004814CD8083882CC0BB 1370:10D5A0000100000000000000000D7C00CF402FD2E1
1371:10D5B000083C024E01A3D22EC408B102CC008380E5 1371:10D5B0008CF6033C22CF4032D64CA6C13DA0874812
1372:10D5C00024C10B30020C00B340A0D209301252002B 1372:10D5C000360D0FB1022442CB6016C00CD0032C8064
1373:10D5D0003000000000000000E815BA00CAC0368024 1373:10D5D000CA0032C00C3003000350000000000000FD
1374:10D5E0000D67132800CE003EA00CED03E800CEE04E 1374:10D5E000A019FC00FF203ECA0EB003EC20DB343A49
1375:10D5F00036801EA00B2804FE00B7B20CE00B7A00A8 1375:10D5F000C80F8003E410DB213E180DF203FC80FF0E
1376:10D6000060000000000000004800E040F8102E100C 1376:10D600003035C00FC013EC00FF003BC00FF003E843
1377:10D610000F8003E001D80A3E000F8003C002F80823 1377:10D610000670000000000000C011FC00FB0B2FCAC8
1378:10D620003A000F8003E010E820BE000F8013920044 1378:10D620008DF203FA0096803BC40DF1037C80EC8000
1379:10D6300020000000000000000810E500FB003E4054 1379:10D630003B080CC2037402CC803F480EF00330A0BC
1380:10D640000C91032600618032400C90032400C90035 1380:10D64000D5803F400CF803F000700000000000009F
1381:10D650001E400C9C03E401F9003E400F9003C20001 1381:10D650008008EE40BF802FF00BF722EE208A802357
1382:10D66000300000000000000080046700B9002C407A 1382:10D66000FC8875123D00880022002880022408886A
1383:10D67000009C02A600790022402890022400890024 1383:10D67000006F5000F502290089002E540D9011A072
1384:10D680002C44089802E400B9802E400B9002E0017F 1384:10D6800004100000000000008805CC00B3002CC18D
1385:10D69000000000000000000018012400BB0026501C 1385:10D69000093082CC82BB0028C0493202CD00B800DC
1386:10D6A00028908224849920224049900224008900F5 1386:10D6A0002C500901020C4080006C4409300220001B
1387:10D6B0002E40089002E400B9602E400B9002C60490 1387:10D6B000B0002C40183006E20170000000000000AD
1388:10D6C000400000000000000008040600B1002E48E1 1388:10D6C000C001AC00BB012EC00BB002EE00AA004AA4
1389:10D6D0000812028480B120A04809120A0480810047 1389:10D6D000C008B052EC00980226400980026C01AAF2
1390:10D6E0002C48281242C48831002C400B1802C20179 1390:10D6E000042E4009B0022200A9802E41099002F0C8
1391:10D6F0000000000000000000B80D6000F850361473 1391:10D6F00004600000000000004005EC00FB003EC09C
1392:10D700000C80032000E80032140C85032140C8502F 1392:10D700000DB003CE84FA001AC08DB043EC00F002D5
1393:10D710003E140C8003E14038003E008F8003EE038E 1393:10D710003F000DD1033500CB482E402FB0092280A9
1394:10D720005000000000000000981DD400FB043D44A0 1394:10D72000F9C81EE008B1E2D004700000000000005B
1395:10D730000F5123D448ED103D444ED123F442FD0057 1395:10D73000E001BC007B003FC00FF023FC00DE0024B2
1396:10D740003E448F9103E458FD003F500F5003E6061E 1396:10D74000C04FF0032C00EC203B000E98039402DD48
1397:10D7500070000000000000001805F400F9003D40D2 1397:10D75000003F404EF001F800DD003CE40FD803B874
1398:10D760000CD003F400DD023E400C9003E440C910ED 1398:10D7600000600000000000004000ACC0FB2032C898
1399:10D77000374007D0072400E5002F6A0F700306002A 1399:10D770008DB003EC00F9003AC22C30036C04D802DF
1400:10D7800070000000000000003810E000B8003A000F 1400:10D780003C448D1003AD03EA003C400C7023E400E0
1401:10D79000808002E00088002E000A8053A2802CA026 1401:10D79000C8403AC00DBC0350042000000000000047
1402:10D7A00022000B800A2000B8002E100980030E040E 1402:10D7A000C8013D00BF4223F00DF002E500E2013761
1403:10D7B00030000000000000000805C400B1006C400B 1403:10D7B000F108F00E3DC0A8002E542890022C008ADB
1404:10D7C0002A1002840181802E40091002F4008D0489 1404:10D7C000053B4148F5038C00890022D40E9502F2F6
1405:10D7D00020400B10028400B1002C400B9802420143 1405:10D7D0000040000000000000E0054C00B30420C041
1406:10D7E00070000000000000001811A420B9002A40B9 1406:10D7E000893002CC40B2002CC44830022C02A20086
1407:10D7F00088B402E601A9202E480A9000A440AD405A 1407:10D7F0002C2019201A8008B0006C40083002C400A8
1408:10D8000022400B9012A404B9012E410B9002060491 1408:10D8000081002C40083002F80050000000000000A9
1409:10D810006000000000000000A015E400F9C03E60B8 1409:10D8100020011E00B7A0E1E0097802DF04AE802DF0
1410:10D820000C9413A602D9421C600C9E01C604C100D0 1410:10D82000E00879021E1087902C282968028281B4B2
1411:10D83000B2401F9002A400E9083E684F980B6804AC 1411:10D83000802D60087810BC008F802D600B6802C8B6
1412:10D8400070000000000000002801A640F920387098 1412:10D84000004000000000000048000C05F39230CAC0
1413:10D850000F9103E400D9803E400F9C13A400F9000F 1413:10D850000D3003CC00F3003CC00C30020C80700093
1414:10D860003E400F10036410F90A3E500D9A03CA009F 1414:10D860002C400D20038900B1003E402C3003EC50C9
1415:10D8700060000000000000002810A100D8043E0055 1415:10D87000C3203C400C3003D2020000000000000036
1416:10D880000C8113C002D8203E002D8403E000CC0898 1416:10D88000401DBC00FF003CC00EB083EC40EA0036F7
1417:10D890003A000F8043E000F841320007818B0A0410 1417:10D89000C20FB083AC00F8003E480EE00B7A80CF98
1418:10D8A000200000000000000028053A608A002FA830 1418:10D8A000003B440FF003ECC0FF0003440EE003D044
1419:10D8B0000AE022E8027E482E8008A042E8048E009A 1419:10D8B0000660000000000000A805EC00FB233EC845
1420:10D8C00023A80BA882E800EE00A2804B60020A00A9 1420:10D8C0001DB003EE00CA003EC80CB2032D90C88400
1421:10D8D000400000000000000028054C0093006CC0D0 1421:10D8D00036002DB00360189B8033500CF203E20039
1422:10D8E000083002CC0013812CC0083002CE408240A8 1422:10D8E000C98032400CB8032A00700000000000001C
1423:10D8F00028E00B3802CC00B31024C08B38020A0099 1423:10D8F00048119C00B7280CD2287302FC0086042C27
1424:10D900005000000000000000A0011E0087202FC072 1424:10D90000CC2870830C20950120000930121004856A
1425:10D910000A7002DC0AB6002CC8887206D80086009D 1425:10D91000002152087502D8008700214008600212D9
1426:10D9200021C00B7002DC84AF80A5C00BD0022800A0 1426:10D920000460000000000000C0009ED4B7B109E10F
1427:10D930004000000000000000A8081E00D7803DA0A5 1427:10D93000087822DE0095802DE008780A5E4294C0C7
1428:10D940001C7813D602D7803DEC087E23FE00CE80E3 1428:10D9400021600878025A0087802D68087A02D70083
1429:10D9500039600F7803DF00F68075E00F78032A0244 1429:10D95000978020600978023000200000000000005D
1430:10D960000000000000000000081D8C00FB103E803D 1430:10D960004810CC00B3002CC008B002CD8092002C2F
1431:10D970001FA021CC00FA003EC00EB003E802FA005E 1431:10D97000C008B002CC009080A04009360248028363
1432:10D980003E400FB013EC00EA013AC00F9003C2060C 1432:10D98000A0AC402A3006CE029304A04009200A121F
1433:10D9900060000000000000000005FC00FF803F6008 1433:10D990000430000000000000E815A800FA003A80FA
1434:10D9A0000899077E00DD803FE20CF803F602DF8075 1434:10D9A0000DA003FB02DE803E800CA0032800CE8089
1435:10D9B000B3E00CF8033E41CC8033E40FF803C00021 1435:10D9B00032800CA4037800CEA43F800CA007F900AD
1436:10D9C0007000000000000000A8119C40B7002DC0AE 1436:10D9C000DE0032802DE0023A04600000000000001A
1437:10D9D0000D5A22DC8075002DC0087102F0208700EE 1437:10D9D0004800E100F8007C000F8003E040E8103CC4
1438:10D9E00021C00A70021C00D42821C00B7202EA0474 1438:10D9E00001CF800F2000E8003E000E04039000E805
1439:10D9F000600000000000000000009C40B7002D0007 1439:10D9F0000020000D8007E000E8003E040E8003D206
1440:10DA0000087222F40087002DC2087002D4008780BB 1440:10DA000000300000000000000810E400F9107E4122
1441:10DA100025400930025C01AD0029D04B7002C000E6 1441:10DA10000E90032400F90036680E900FA408C90088
1442:10DA200020000000000000002014CC00BBC82CA087 1442:10DA20003A400C900B2412E9003E442C90036424ED
1443:10DA3000092002CE00A3002CE0A83D42C2008B804A 1443:10DA3000F9022E400C9003C20430000000000000E8
1444:10DA400024400B300A6C08A340A8E00B3402C80441 1444:10DA400080046510B9803E4008900A2600B1102A73
1445:10DA50003000000000000000A815AD00FF483C2881 1445:10DA500072089007640289402E40289012250089A0
1446:10DA60000CA9236C808B003FC00CFC03EC00D88019 1446:10DA6000453E500D900A2500B9402E40289403E011
1447:10DA700034400D30037C02A34038680F2403EA04CD 1447:10DA7000001000000000000018052400B9002E402E
1448:10DA800060000000000000008000ED88FB003E50B8 1448:10DA80004890422601B94026400A904284018B0802
1449:10DA90000FA103EC043AC03EC00FB083E802F810B7 1449:10DA90002C4009D0823432A9086E4208100224209A
1450:10DAA0003A410E9003AC009B08B6400F8103E000A2 1450:10DAA000B9082C40189082C6004000000000000019
1451:10DAB00030000000000000000110FC00FF00B32057 1451:10DAB00008040480B32028480812020401B1002899
1452:10DAC0000C50131C09CD8333C08370003C00DC1064 1452:10DAC00058081202058981402C5808560615808195
1453:10DAD00032600EF1432C00CE043B700CF083004406 1453:10DAD0004028500914020580B1402C5A081402C293
1454:10DAE000300000000000000081046780BB0162215B 1454:10DAE0000100000000000000B80D6800F8002E00E2
1455:10DAF0008A89202C0080E022C00BB003D8108C044F 1455:10DAF0002E85032148F80036008E0502A00880001C
1456:10DB00002240059002AC00D88036400A90022040A6 1456:10DB00003E000D800B1004E0002C004C8003400010
1457:10DB1000100000000000000080052600BB00220667 1457:10DB1000F0003E080C0003EE03500000000000007F
1458:10DB20000880022E00882022C009B002A4009900BB 1458:10DB2000981DE440F9103E440F9103F400FD003EBF
1459:10DB300062C408B0062C008880224108A0022000A0 1459:10DB3000440F9103E440FD033F441F911BE440FD6B
1460:10DB4000400000000000000008040C00B30020406A 1460:10DB4000013F500E9403F440FD003F400FD003A668
1461:10DB50000A00820C00800020C00B3022A00081004F 1461:10DB500006700000000000001815F400CDA07168E8
1462:10DB6000A0C00930028C00900024400A2802020163 1462:10DB60008D9803D400CD0033600C988F2720C940D6
1463:10DB70000000000000000000000D6000FB0220001B 1463:10DB70003E780C9E8B2720D11130608C9C032500B1
1464:10DB80002C92032C02880031C00BB502A400D104F2 1464:10DB8000F9403E780F90034600700000000000004E
1465:10DB900032400E90032C40C9003A408CA003000391 1465:10DB90003810E01088012201088C22E80088022A4F
1466:10DBA0005000000000000000A01DF400FF002F0046 1466:10DBA00014088C0B239088A02EB0088C4223008888
1467:10DBB0000FC003DC00FC003FC10FF043F000FD008C 1467:10DBB000A0362A188A022200B8A02E340BCA820E80
1468:10DBC0003F404FD003FC00F5003F400FE003E80664 1468:10DBC00000300000000000000805C400814024501F
1469:10DBD0007000000000000000C005D880CC00B70431 1469:10DBD000091682C400A9002040081292540885004A
1470:10DBE0004EE1033C20DF10318006F0037F00FFC0D0 1470:10DBE0002F4C09521214809D002150085422148099
1471:10DBF0003BC00EF2035E00EF1033D02CF203300076 1471:10DBF000B5002D480BD00242057000000000000067
1472:10DC00007000000000000000C010E90088C6205C21 1472:10DC00001805A4028901A240489002E402A9002A52
1473:10DC100008A45765008F522AF009FC020400BB00DB 1473:10DC1000406890026410AD002F4128500234008DFE
1474:10DC20002DD90974836428834422848806823004B1 1474:10DC200044274039D0023500BD142F400BD00246A6
1475:10DC30003000000000000000C805C9008010200866 1475:10DC30000460000000000000A005C400C9003640D8
1476:10DC400008311204B2A30020841B34020C80B320DC 1476:10DC40002D9003E700E1E032400C900B6402C9081C
1477:10DC50002CC70936028C809340ACC80831283201A9 1477:10DC50003C500C90022602D9C032400C9013270091
1478:10DC60007000000000000000C015A9008800A2504C 1478:10DC6000F9203E400F90036804700000000000009F
1479:10DC700008350224008B042EC109B0022494BB0095 1479:10DC70002801A402F90038400F9003E680D9A03CA7
1480:10DC80002EC00BB002CC608B002E800880003004C8 1480:10DC8000400F1003A400D9103E400F9003C492F936
1481:10DC900060000000000000000015E702CB18B28011 1481:10DC9000213C402E900FE680F9803E400F90038A91
1482:10DCA0002CAC0A2E08EB0032124EB0032B80FB0086 1482:10DCA00000600000000000002800A040E8103E04D2
1483:10DCB0003AC00AB003AB08EB042E480CB88300044A 1483:10DCB0004E80032080D8603A020C80132000F84088
1484:10DCC0007000000000000000E001B680FF8039CA4B 1484:10DCC00036102D8003A008E84032000D0003210229
1485:10DCD0000DE803D640E7043B664E7003B800FF0131 1485:10DCD000C840B2000FC003CA0420000000000000CA
1486:10DCE0003FC06CF0037006E70031040FC143F80039 1486:10DCE00028113B1086012FA00DA00238008EE023E2
1487:10DCF000600000000000000040108500CB40329022 1487:10DCF000A208A0022800BA80228008A00228008280
1488:10DD00002FB00B6480FB08BA100DB0A72D00FB04E8 1488:10DD0000002A8028A0022A048A8022A00B6002CA6E
1489:10DD10003EC08EB0036D00DB0132408C33039004B3 1489:10DD1000004000000000000028054380A2002CA065
1490:10DD20002000000000000000C005240083E0A2D015 1490:10DD20000830022E00920028C02830022C00B38058
1491:10DD300040B0022504BF80A05008F80220008B02EA 1491:10DD300024C009300A8C00A30060C008300A4C00DF
1492:10DD40002FD008F00224008F80360108844236006C 1492:10DD4000830020E00B2002CA005000000000000009
1493:10DD50004000000000000000E8054400834820C4A3 1493:10DD5000A001100086002DC0093A0235008600217E
1494:10DD60000900024600B301A8901930128C00A304E8 1494:10DD6000C00873021000BF8821000870021C088FD1
1495:10DD70002EE20AB0020C00834928C0093C02380098 1495:10DD7000002BC00820125E20878821830B6002E8F8
1496:10DD80005000000000000000F0013604838021E113 1496:10DD80000040000000000000A8081200E5813DA04E
1497:10DD90000838121E28B39821A0193882960087836C 1497:10DD90002C7A0B1E00D48038E00CFA0B1E00F680A3
1498:10DDA0002DE2087822368C87802DE00979023E002A 1498:10DDA00034E00D28038A00E68031200C78037A04E1
1499:10DDB000400000000000000048080400C33030C8E4 1499:10DDB000CE8431E04F7843EA00000000000000000C
1500:10DDC0004D000B4C80F31238C00D3A028C80F300EA 1500:10DDC000080D8000F8003EC00FB523E400F00436D3
1501:10DDD0003CC00E300B0E00C30C3AC00D30031202D3 1501:10DDD000400FB687E000F2003E001FA00BE800FAFB
1502:10DDE0000000000000000000401DB406FF103FC00E 1502:10DDE000003E000EA003A800FA003E800FB003C260
1503:10DDF0000FB013BC00FF107FC00EF1A37C00FF1218 1503:10DDF00004600000000000000005F600CC8033A0A5
1504:10DE00003FC20FF523BC41EF183780AEC003500668 1504:10DE00000CFC033E00FC8037E00FB9213E00FD8290
1505:10DE10006000000000000000A805E400DB003EDA1E 1505:10DE100033E02CF8037E10DF843DE00CF803F600BD
1506:10DE20000C800366108B0032808CB6034A004B8056 1506:10DE2000FD803F600CE8230000700000000000004F
1507:10DE300032C80CB4030A10DB003EC10CB0432A0008 1507:10DE3000A8119840841021C00870021080B40021FD
1508:10DE40007000000000000000C811B40087042CC05E 1508:10DE4000C80B7A021000FD0021040870021C4287F2
1509:10DE50000D70031C08874820810D72825C00D7007A 1509:10DE5000002DC4486102D680B5002F040861822AD3
1510:10DE600021CC28F0021C1087202C0008400A320424 1510:10DE6000046000000000000000009000810021809C
1511:10DE7000600000000000000080009600B7812DE0E7 1511:10DE70000830021C10BC0825804B300E1C00B4007A
1512:10DE80000848020E04878021E00878023E0187805E 1512:10DE800020C0082002580096002F000A7002D0809F
1513:10DE900021E01879023A0197A02D6008380220008D 1513:10DE9000B4182D4009F80200002000000000000026
1514:10DEA00020000000000000004814C600A3C62CC0DB 1514:10DEA0002014C8028000A0C00830220BC0B0C022DD
1515:10DEB0000930020C01830020E00930024E0093007B 1515:10DEB000800B30020000A004220028A0022B008A60
1516:10DEC00020C04930220F6483026CD428300212042F 1516:10DEC000002C0008A006C000B0C22C0009BC1A0833
1517:10DED0003000000000000000E811AB80FAE03C8850 1517:10DED0000430000000000000A815A000C80032C0F7
1518:10DEE0000CE0022802CA00B3A90CA0033B10CA0030 1518:10DEE0000CF00B2600F9C036000FF0132C10BB40CD
1519:10DEF000A2800CA00B3800DA003FB00CE6033A0415 1519:10DEF000F2C00890036700D9803EC0089002EC0091
1520:10DF000060000000000000004800C02098083E00AB 1520:10DF0000FBD03EC0298C002A046000000000000005
1521:10DF10000F800BE100F8013C104F0003A040F80017 1521:10DF10008000E000F8443CD02FB003E400F9203E3C
1522:10DF20003E100E8003E000F8003C022F0493D20064 1522:10DF2000400F3003E000FB083E000F9013E442F97D
1523:10DF300030000000000000000810E400C1C13240C1 1523:10DF3000103EC00F8003EE00FB003E800E8203E027
1524:10DF40000C98032640F90032400C98032424F90071 1524:10DF400000300000000000000110E008FC8032E416
1525:10DF50003C600C1003A400F98232400C90030204D0 1525:10DF50000EF0037400FC003F400CF00B3C00FE0090
1526:10DF6000300000000000000080046400890022509E 1526:10DF60003FC00DC1032020CC1033000CD10358005A
1527:10DF70000D98022580B90022520D9C022400B900A0 1527:10DF7000CE002FC00FD1030044300000000000008D
1528:10DF80002E600890422400B940364008900A2000D4 1528:10DF800081446200B0402AF108B0122608B8C82EB9
1529:10DF90001000000000000000180524008D00234040 1529:10DF9000700AB0022000BA002E00288003224088B8
1530:10DFA0000812022400A110A26008928A2400B9017C 1530:10DFA0000120000A800228008A012E808B90022026
1531:10DFB0002E46089002A400B150224028908206000C 1531:10DFB000401000000000000080052600B828224222
1532:10DFC0004000000000000000080404848520A1D85F 1532:10DFC0000830026600B8802E3088B0022C00B901FB
1533:10DFD0000910020480B32020402912060400B10178 1533:10DFD0002EC0889002A400890022C0089002240C60
1534:10DFE0002C482812020400B1202448081202020121 1534:10DFE00089012E401B8002600040000000000000FC
1535:10DFF0000000000000000000B80D61428A00B3007C 1535:10DFF00008040000B00028C02830020000B0002C47
1536:10E000000C05032140E050B2002C80022140F0506A 1536:10E00000400A30020000B1002C0008100A04008110
1537:10E010003C140C8513A150F85032140C85232E03A8 1537:10E0100001A2C008000A048081002C001B000A0233
1538:10E020005000000000000000981DF440F9103E442C 1538:10E020000100000000000000000D6000F800324018
1539:10E030000FD40BF444F9103F504F1103F400F900D2 1539:10E030000EF0236408F8002E000CF0032C00F8000A
1540:10E040003E440F9153F414F9103F440FD103E602FC 1540:10E040003EC00C80032002C80432001C9003200054
1541:10E0500070000000000000009805E6A0DD88B366AF 1541:10E05000C8013E419F904340035000000000000073
1542:10E060000CDC833688BDA0376A0CDA0B2502C94068 1542:10E06000A01DF000FC0C3FC00FF003F010F4003FC7
1543:10E070003F784F98B3E504CDA072780CD88B261466 1543:10E07000000FF423F000FC003F000EC003B000FCD2
1544:10E0800070000000000000003810E30088422231D8 1544:10E08000003F000FC003E100FC003F011F5003E808
1545:10E09000080A0222A0B8F922100D84126A80888032 1545:10E090000670000000000000C00DF0D0FF203ED050
1546:10E0A0002E200B0802E280A8A8A23848A8020E0081 1546:10E0A0008EB003ECA0DB283ECC0CB303AD08F83CEB
1547:10E0B00030000000000000004805C4A28100204894 1547:10E0B00032230E48237A00FD943FE00F7833EE08B8
1548:10E0C0000812424500B100244009140224008120B6 1548:10E0C000BF803FE40FF90330007000000000000043
1549:10E0D0002C580B1082C4049140646C0830821205E5 1549:10E0D000A000ECC8BFD10FC80C2682FD248F002EF3
1550:10E0E00070000000000000001815A4008900224103 1550:10E0E000990AF2621DD099612271888802AC00B849
1551:10E0F00008908A6480B9002250099006640899004B 1551:10E0F000222E204B8803A00080002E080B80236076
1552:10E100002E400B9006C401B90226618890020604D5 1552:10E1000004300000000000008805CC04B3030CCCF0
1553:10E110006000000000000000A015E400C9002240DB 1553:10E110000A1312CC14A30E0C580A33028C10A3203D
1554:10E120002C94236400B90036400990130500C900FF 1554:10E12000A00A18900248A0B02024800A2002CC093E
1555:10E130003E404F9013E5C0D90026402C94032800A0 1555:10E13000A1002C800B3242A2017000000000000000
1556:10E1400070000000000000006801A402E9083C40E3 1556:10E14000E011AC20BB002EC04B80A2EC00AB004E17
1557:10E150000F900BA400F1003E410F9043A488E90406 1557:10E15000462AB0022C049B802A608A9C02AC00B93B
1558:10E160003E400F9003E600E1003A409F9263DA00E0 1558:10E16000812E400B9802A3008A002E400B8004F001
1559:10E17000600000000000000028108010E001320064 1559:10E1700004600000000000004015E100FB043EC008
1560:10E180008F80032000D80830018C0003E102C8040E 1560:10E180000EB403EC0ADB022ED10EB003AC00FB820E
1561:10E190003E000C800B2100C80078000F86030A00A7 1561:10E1900032281E0C036800B9003E404FB043ED002A
1562:10E1A0002000000000000000280528008E402B827F 1562:10E1A000EA003E400F800390047000000000000071
1563:10E1B0000BA0023A008E80238208E20228108A0017 1563:10E1B000C001B818FF021FC00CE203FC00DF032FF0
1564:10E1C0002F9828A01228008E202E804BE4020A00EF 1564:10E1C000A10F7003FC04AB0437422DD0027C00FC8D
1565:10E1D000400000000000000028054C02A240208002 1565:10E1D000003F800FC003B000FD003F800FF00378C8
1566:10E1E0000BB0024E4093C0A0200836028C00930072 1566:10E1E00000600000000000004010A900DB003CC0FF
1567:10E1F0002CE20830064C12930828C00BB0020A002B 1567:10E1F0002E94016C11CB00B8C00CB0036C00EB0185
1568:10E200005000000000000000A0011C0882402940CE 1568:10E200003210079203A800F8003E0C07A203AD00ED
1569:10E210000B70025E08840823400870061C8087008B 1569:10E21000D80032000C8003D0042000000000000071
1570:10E220002D200879125C0094002DC00B304228008C 1570:10E22000C8052808BF002FC08880023C08EF0322E1
1571:10E230004000000000000000A8083E00E48031A17A 1571:10E23000000DF5003C008B822260039C022C10B97B
1572:10E240000F58137600D08031C00C3803BE80D781C0 1572:10E24000B022F00B90022000BB0022E20DB002F2DF
1573:10E250003F208C79037F01D68039E84F68032A007C 1573:10E250000040000000000000E0054000B3022CC0B8
1574:10E260000000000000000000081DBE00FA003E0093 1574:10E260000830026C00830020C0093404EC00A800D0
1575:10E270008F960BA400EA003CC00F9003AC20FB403B 1575:10E2700022F00B00028800B30028E00B1402A0007B
1576:10E280002E000FB203ADA0EA003EC00FA01BC204D7 1576:10E28000930020C008B002F8005000000000000019
1577:10E2900060000000000000004005FE08DE8133A49D 1577:10E2900020011E04B7802DE80878020EC8A790213F
1578:10E2A0000EFC133E00FC8013200C68033E20FFC8C8 1578:10E2A000A81938529EC1878021E20BD9829E00B600
1579:10E2B0003F601DF8037E00C78033E20CD8031000D6 1579:10E2B000A02D200B68021E00B4C12120094802C80D
1580:10E2C0007000000000000000A8119C00864131C4CD 1580:10E2C000004000000000000048000C80B3103EE059
1581:10E2D0000879429C00BC1021408535035C00B700E2 1581:10E2D0000E3A074E00CB903A610D3803CED1E1984B
1582:10E2E0002DC00872022C00A70137C00851422A0035 1582:10E2E00030A48F10038800BAA13C8407000382D4B5
1583:10E2F000600000000000000010008C4082002481BB 1583:10E2F000D10072800C3003D2020000000000000048
1584:10E3000008D8021420B50020400960021C40B70064 1584:10E300004015BC04FF003FC00FC223ECB0FF003239
1585:10E310002C400B3022DC00970021C408400244004E 1585:10E310000406B4237C10BF003E840FB0037C40FF92
1586:10E3200020000000000000006014EC009206209025 1586:10E320000033400FF003FC00FE00BF400FC803D0D5
1587:10E330003815028600B80060500930024E01BB005B 1587:10E3300006600000000000008805E400CB333EC802
1588:10E340002E400B3002CE20B30024F048020A5804BD 1588:10E340004CB003AC90DBA036C00EBA436C00C900E1
1589:10E350003000000000000000A815BC00CA00A69410 1589:10E350003E400F000F2800FB003E400F18436000B6
1590:10E360002C90032E00FB05B2850D90033F90FF001B 1590:10E36000FA003E404F080B2A007000000000000039
1591:10E370007E801FF043FC219A0033C83CB2036A043C 1591:10E3700048119C1007082CCA0820021C2087283F3F
1592:10E3800060000000000000009000EC02EA403D80C8 1592:10E38000808AF0021D4087042DC00B70021C00B66D
1593:10E390000F1093ED00FB403E908F3003EC80FB00AC 1593:10E39000002D800B60031C00B5002D800B70021255
1594:10E3A0003E911CB0032C10E8003EC81F9003A5103E 1594:10E3A0000460000000000000C0008E0087A02DE483
1595:10E3B00030000000000000008010FC02E40073A0A8 1595:10E3B0000A58021E01839021700B79029E0185C0CC
1596:10E3C0000CFC037C02FF1013C41CC0033C00FF00C4 1596:10E3C0002DE04B58121A00B6802D200B4802520047
1597:10E3D00037E00DF003FC00ED8031C00C3263200407 1597:10E3D000B4802D200B480230002000000000000017
1598:10E3E000300000000000000084006C008AC022B1F0 1598:10E3E0004814EC0083002CC08836020C0283006CB9
1599:10E3F0008AB8434A10DB2020F00A94036C00BB0764 1599:10E3F000C00B300AAC009BE06CC80B32020C01B3BE
1600:10E4000022B808B002EC11E8C0B2C02A921A20006B 1600:10E40000002CC00B30020C10B3402CC00B3C82120D
1601:10E41000100000000000000080012C00AA8022985B 1601:10E410000430000000000000E815B802CA003E8089
1602:10E420000890022F03BB012A8308B24E2C04AB02D2 1602:10E420000EE48B2800CA0033950FA007A802CE4047
1603:10E4300022C428B022EC09B35062C008B002200008 1603:10E430003FB00FE4822800FA003E800FA02368005E
1604:10E44000400000000000000008040C018300608010 1604:10E44000FA403E814FA4E33A04600000000000005F
1605:10E4500008120A440093002A804A30020C00B300DC 1605:10E450004800E080F0003C002F00026000E8003C33
1606:10E4600060C0083002CC00B30260C0080046020160 1606:10E46000000E80012000E8045E040F8003E000FC41
1607:10E470000000000000000000800D6C00E802228017 1607:10E47000013F100FC403B000FC093F000FC003D2DE
1608:10E480002CF2432C00FB00BAC008A5023C00EF00B0 1608:10E4800000300000000000000810E400A920364021
1609:10E4900036C04DF013FD51FB0032C00CB00320011B 1609:10E490000E90034404D9003E400D9003E404C900EB
1610:10E4A0005000000000000000A01DFC007E043F8022 1610:10E4A00032408F900BE408F9003E440E9803E600DA
1611:10E4B0000F3143F002FF0037C00FF003FC08FF00EC 1611:10E4B000F9003E400F9003C204300000000000004D
1612:10E4C0003FC00FF003FC00EF003BC00FC003E81695 1612:10E4C0008004640089002240189002240089002EF4
1613:10E4D0007000000000000000C005F240FC803F24F6 1613:10E4D00040089402E400D90422400B1C0B6400B9EC
1614:10E4E0000DD853D604DF323FCC4CC043FC00DF6074 1614:10E4E000942C50089C02E414B9900E400B9002E06A
1615:10E4F00037C00FC4037CD0DF2033D80DF843F000C1 1615:10E4F00000100000000000001805240289002640DA
1616:10E5000070000000000000008018E880B0012E08B4 1616:10E500004A9002640099042E40089882E400890031
1617:10E51000889002EC208B702FCC08B382FDE0BF40C6 1617:10E510006A400A9282E400BD012F5012D602F440F4
1618:10E5200022D80B9302FDC0AF1028F008BC12F004F3 1618:10E52000BD000F400BD002C60040000000000000FC
1619:10E5300030000000000000008805C400B0002E017B 1619:10E530000804048081202048081202048081222CD3
1620:10E540000A1282EC80B3002CC80A00328C00A3307F 1620:10E5400048A81206C490912028500B90024500B5AF
1621:10E5500020D20900028C80830028D80B3412F201EB 1621:10E55000406D40085012D404B5022D400B5002C249
1622:10E560007000000000000000C005AC01B8022E00E1 1622:10E560000100000000000000B80D6140C800361432
1623:10E570000A9012EC108B002EC00AB000EC00B30021 1623:10E570000A85034140D8502E140C8503C140C85071
1624:10E5800022C10B9202CC01AB002AC002B002F004FF 1624:10E58000BA000E8023E00078003E000E8003E00415
1625:10E5900060000000000000004015E000FA0C3EC0E2 1625:10E59000F8003E000FC003EE035000000000000032
1626:10E5A0000FA013EE20DB003EC02E8853EC00FB00D2 1626:10E5A000981DF440D9103E4407F103E440F9103FB0
1627:10E5B000B2C08FAC83AC08DB001AC04FB003C004FC 1627:10E5B00044AF9103E440FD1037500FD003E400F95D
1628:10E5C0007000000000000000E001B800FE003FC045 1628:10E5C000003E400F9003E4A0F9283E4A0F9283E6F4
1629:10E5D0002DE003FE807F003FC00DD203FC00BF0191 1629:10E5D00006700000000000001805E6D4FDA23A70A5
1630:10E5E0003EC00DC803FC0CFF003FC009F023F8003B 1630:10E5E0008C9E032680C9A032680CDB4327809DA245
1631:10E5F00060000000000000004010A400FA4032C19A 1631:10E5F000B7400F50036500FD003FC107D003F5048D
1632:10E600000FA0032908DB003EC00E8503EC20CB00E1 1632:10E60000FD402FC00CD003C60070000000000000C9
1633:10E610003AC00EA403EC00FB003AC20EB003100493 1633:10E610003810E388B8502238088E00A2A088E8227B
1634:10E620002000000000000000C8052C00BA6020C0D7 1634:10E62000384888036210A8E83C000B80036280B879
1635:10E630000BA0020800AF002FD00BB502FE028F0026 1635:10E63000012E800B8021A200B0842E2A288A82CE4F
1636:10E640002FC00D800A3C00B70023C205F02236001F 1636:10E6400000300000000000000805C440B100285858
1637:10E650004000000000000000C0044000B18820001D 1637:10E6500080134005008140205228160285809BC20D
1638:10E660000B10020C0083002EC80B08064D408300DF 1638:10E6600064418B98020400B1092C401B1020C400A7
1639:10E6700020C00830060C0893200AE04A3002380017 1639:10E67000B1002C40481002C20570000000000000EC
1640:10E68000500000000000000020105A00B59021202A 1640:10E680001815A584B900204008900224000100203C
1641:10E690000B58423E00A7802DE00B6902DE408792B6 1641:10E69000500890426400A910AE580398026400B973
1642:10E6A0002DE00918029E01B78029E00370023E00A8 1642:10E6A000002E400B9046A410B9002E41089002C6DF
1643:10E6B000400000000000000048084400F101300064 1643:10E6B0000460000000000000A011E700F9002A40FB
1644:10E6C0005F18030C1083003CC40E0403EC008300AD 1644:10E6C0002C940B2402C900B2440C90032404D9807A
1645:10E6D00030C40C31038C00F30038C80E3103120231 1645:10E6D000B6418F18032400F9603E400F9603E40012
1646:10E6E00000000000000000004015BC00FD04BF0455 1646:10E6E000F9803E428C9003E80470000000000000B6
1647:10E6F0004F5803F808EF083FC00FF001FC00FF4C33 1647:10E6F0002801A600F1003E400F1C03C400F9003EB3
1648:10E700003FC10FD0033C00F70037C20D7203D006A3 1648:10E70000408F9023C410F900BE400F900BE400F935
1649:10E7100060000000000000000805E200DB0032C0DD 1649:10E71000003E40079023E400F9203E408F9003CA5A
1650:10E720004DA8032C08FB007EC88FB00B6F45EBC2D1 1650:10E7200000600000000000002810A100F800BE00FA
1651:10E7300036C007A003EF20CB50B2C00C79032A00EB 1651:10E730000E84032000C80032000C00832000F80083
1652:10E740007000000000000000481998008F0021C0F0 1652:10E740003E000C8003A000F80036100F8043E00864
1653:10E750000B60035C0037002DD20B30020CA887241D 1653:10E75000F80032000F8003CA04000000000000002F
1654:10E7600021D0097002DD88872A23E808700232046C 1654:10E7600028052800BA00228048A0036800AA002AD1
1655:10E7700060000000000000002000B600978021E04B 1655:10E770008008E003680082002F8008E6022804BEBB
1656:10E780000B68021E00B7802DE88B48821E80A38490 1656:10E780004023800BE802EA00BE0122800BE002CAAF
1657:10E7900025E80B6802CE02878021E0087A0220007B 1657:10E79000004000000000000028054C01930120C14A
1658:10E7A00020000000000000006804CC08838220E004 1658:10E7A0000A30020C00A30020C08838420C00A300ED
1659:10E7B0008B2A024840B3002CC00B30820C0083002F 1659:10E7B00024C00A3E428C00B24C24E04B3802C441D3
1660:10E7C00000C1093102CC00830020C008300A1204C5 1660:10E7C000B30022C00B1002CA00500000000000007D
1661:10E7D0003000000000000000E815E800DAA032A8D0 1661:10E7D000A0011C00B70020C9487002DC40A7142C1F
1662:10E7E0008DA8033B00FA003E800FE4036800EA02B4 1662:10E7E000C82830825CC185002DE02AF0121C80B759
1663:10E7F00036800FE403E800CA0032802CA0033A04FC 1663:10E7F000A021820B7082D411B68021404B5002E8D8
1664:10E8000060000000000000004801A010F800BE20D9 1664:10E800000040000000000000A8081E80D58029EA12
1665:10E810008FC103E024F8003E100F8403E000F801EC 1665:10E810004E3A070E80E3B031FC0C48030E41E7800E
1666:10E820003E000F8003E000F801BE100F8003D2000D 1666:10E820003DE00E78039E80F4C435E00F7827DE00CB
1667:10E8300030000000000000000810A400F940324041 1667:10E83000F580B1E00F5803EA00000000000000007E
1668:10E84000CF9003E400C9000E500F1A032600F90010 1668:10E84000081DAC0031043AC40FB5936D08FB403A83
1669:10E850003E400F9081E400F98032400C9003C204E6 1669:10E85000C8638023EC98E9003EC00DB043EC00F3A0
1670:10E86000300000000000000080046404B104224075 1670:10E86000803E404FA003EC00F8683E408F9803C202
1671:10E870000B9002E400A9002E530B920A2648B9041B 1671:10E8700004600000000000000005FE60EB903EE434
1672:10E880002E400B9002E400B9800250089002E00094 1672:10E880000FB8003F40CB807FE00EFB032E40CB80D3
1673:10E89000100000000000000038052400BD002340E7 1673:10E890003FE00F79432E60CA8133648FD903FE00B5
1674:10E8A0000BD012C40089022E400B90222400B90024 1674:10E8A000FF8133E00FD98B000070000000000000F2
1675:10E8B0002E400B9002E400B1202040689022C60058 1675:10E8B000A8019C00878119E40BFA135E8087B22DB2
1676:10E8C000400000000000000028141400BF12A14006 1676:10E8C000EC0D79019E00D5902DF80B78037E08ABF6
1677:10E8D0000B5002C400A1202C480B12020410B111ED 1677:10E8D0009129850B5102DC48B64021400B50022A99
1678:10E8E0002C480B1322C400B140205A081002C20168 1678:10E8E000046000000000000000008C14B5206DC81A
1679:10E8F0000000000000000000B80D6140F840321434 1679:10E8F0000B72025C80872069C0885302CC819750DC
1680:10E900000F4503E140C8503E158F850321E8F868A4 1680:10E900002DC80BF70ADCC0840121441B7022DC00F7
1681:10E910003E140F8403E1E0F02832A8CC8023EE03FC 1681:10E91000B50021C40B50860000200000000000005C
1682:10E9200050000000000000009815C410F9203E407F 1682:10E920002014CF3091002CC00B34024C0083002CFB
1683:10E930000F9003F400F9103E440FD103E400F920D6 1683:10E93000F20B10220C0091002CC80B180ACD01A379
1684:10E940003E440FD303E400F900BE400F9403E606F3 1684:10E940000028600B2102CE20B840A0540B1802080A
1685:10E9500070000000000000001815E400FD103340B6 1685:10E950000430000000000000A811BD00F9002FC025
1686:10E960000CD0032400D9003F404CD003F600FD90AA 1686:10E960000FF4027C12CF033FC20EB003FC049B02E3
1687:10E970003A400C9003E6A0FDA837680CD883260027 1687:10E970002EF20FA40BDC00CE00B0C88FA403EF0072
1688:10E9800070000000000000003810E008C8A022005D 1688:10E98000F88032F51FDD032A04600000000000005B
1689:10E99000088002200088002E000C8012E000B88061 1689:10E990008000EC40E9003AC00FB103CC00F3003E28
1690:10E9A00022000D0A02E380B0C020340884034E0424 1690:10E9A000C00DB409EC18F9103E104FB10A6C80F993
1691:10E9B000300000000000000048008409A100204150 1691:10E9B0008936820BA603EC50F9503EC01F900360CD
1692:10E9C000089002240091002C40081002C500B1609C 1692:10E9C00000300000000000000110FC00FDA03DC070
1693:10E9D00020400810A2C420B128244A081002520185 1693:10E9D0000C70832C00EF0235C00DE203FC04FF0233
1694:10E9E00070000000000000001814A4018100A24083 1694:10E9E0002DE08EF0033C10DC003F800CD803FC00CF
1695:10E9F000A89000254089012C40089402E400B90049 1695:10E9F000DE1833F04FD003C04430000000000000A8
1696:10EA00002A40099002E401B90422414890024604D8 1696:10EA000081006C00B9002EC04CB0036C008B023644
1697:10EA10006000000000000000A014A520E9003240C2 1697:10EA1000C00DAC12EC0079002E300D3D42AC0089E7
1698:10EA20004C100B2600D9003E402C9803E400F9005E 1698:10EA2000881A100D8602EE04BB4022E00B9002E033
1699:10EA3000B2400C9003E400F90036402C90036804C7 1699:10EA3000401000000000000080052C01B9002EC02D
1700:10EA400070000000000000004801A400E9003E4002 1700:10EA400008B042AC000B0526C0099420EC00B98048
1701:10EA50000F9003E600F9003E400E9A03E400F9002F 1701:10EA50006EC488B0822C009B822E42088102E48022
1702:10EA600036400F9003E400F9003C400F9003DA00B9 1702:10EA6000B80022C10B9002E000400000000000004E
1703:10EA700060000000000000000810A100F800320053 1703:10EA700008040C10B1252CCA083446CC08830024A5
1704:10EA80000F8013A000C80032048C8003A0C0F800DF 1704:10EA8000C20B0252CC8183002C0019B242AC8081AF
1705:10EA90003A000F80032000C00932004C80010A04B4 1705:10EA9000082880090002C440B10020C00B1002C247
1706:10EAA000200000000000000028052800BE00208093 1706:10EAA000010000000000000000056C00B9003FD02C
1707:10EAB0000BE0028800AA0003A00AE602FA008A001E 1707:10EAB00008F607BCC2AF3075DC0D1602FCE0B95099
1708:10EAC00032800BA00228008E80A3802820028A00BA 1708:10EAC0003ECC0CB0232C10D9003E000C9003EC007F
1709:10EAD000400000000000000028056C00B348204002 1709:10EAD000DE0132C00F9003C00350000000000000B0
1710:10EAE0000B10020C00830020C00834828E049900B1 1710:10EAE000A019FC00FD103FCA2EF6036D949F303A2A
1711:10EAF0000AC01B30020C02905020600830020A004D 1711:10EAF000C90C8393FC80FF117E190BB103FC40FD10
1712:10EB0000500000000000000080111C80BD0A214858 1712:10EB0000083B000FC003FC807700BFC00F5003E834
1713:10EB10000B52029C40A3A020800A6002CE008520F8 1713:10EB10000670000000000000C001FC00F49437C83B
1714:10EB200021C40B7A061E80952021900870022800CF 1714:10EB20000D69637C10FF6237C00DB4037C60D48034
1715:10EB3000400000000000000088081E80F780B179C6 1715:10EB30003F400F48233200CE00BF408FD10330E06A
1716:10EB40000FDB023E20C7A0B160CC78139600F1F035 1716:10EB4000FF303B600FD803B00070000000000000F1
1717:10EB500039E20F7B130F00D4A031602C70032A021E 1717:10EB50008010ED20B82423F449A2023F408F5123B6
1718:10EB600000000000000000000815AC00F7003E4067 1718:10EB6000DA08F6123D809B802E494B80034000D985
1719:10EB70000F9003ED80FB103E400BB023EC00F9201A 1719:10EB70000122740BD5022100BF422E490B9C02E0FA
1720:10EB80003AD80FB00BED81ED103E800F3003C20676 1720:10EB800004300000000000008805CD80B82028C1B6
1721:10EB900060000000000000000004BE20EE80336032 1721:10EB90001BA0024C0093202CD80B3402CC00900117
1722:10EBA0000CD8831E006F8033E00FB8113204F5805B 1722:10EBA0002CC61AA00268088300A4400B10020000C3
1723:10EBB00033E00FF8832F40FE80B3E00CF803100021 1723:10EBB000B31028420B1402A20170000000000000F4
1724:10EBC0007000000000000000A8189C00BC00A144D8 1724:10EBC000C015AC00B8602AC01BA08EAC019B052606
1725:10EBD0000810035C008F0021800BEA221C80B50125 1725:10EBD000C003B0426C009B802EC003A00669009960
1726:10EBE00021C00BF0021E80BE0023802A70022A047E 1726:10EBE00080AAC00B900263003B002E584B9002F0AD
1727:10EBF000600000000000000000009C20A7002340EF 1727:10EBF00004600000000000004011EC04F880BAC07E
1728:10EC00000B500A3C00A70025C00A43021000B500C3 1728:10EC00000F30036C10DB0336C08FB003EC08D880E4
1729:10EC100021C00B70821C80B40021C0087002040067 1729:10EC10007EE00688034108CBA03E640F900B2A00DB
1730:10EC2000200000000000000020048E04B3002240F9 1730:10EC20007B003A010F900390047000000000000088
1731:10EC30000914024C00830020C00B24820400B100A0 1731:10EC3000E001BC00FC8432C00CF9035C10EF003B27
1732:10EC400020C08B3A022C01B00020800A30021A0446 1732:10EC4000C00C70039C00EC013FE44FD103F100F3D2
1733:10EC50003000000000000000A8159E00EB043340C7 1733:10EC50000533600FD003BC04FF003F210FD003F841
1734:10EC60002DDC031D60EF003200CF9A032800FD0069 1734:10EC600000600000000000004010AC00C8403AC640
1735:10EC700033C18BFC0B3C00FC0032800C90032A0457 1735:10EC70000DB4036C00F30034C00EB0036C00E91057
1736:10EC800060000000000000008000AC10F8003E4072 1736:10EC80003AC00F84032C60CB0032600C500361004B
1737:10EC90000E9823AC04FB003C000F8420ED00F9002B 1737:10EC9000CB003E900E90A3900420000000000000E6
1738:10ECA0003EC04FB003EC00FD003E800F9003E40037 1738:10ECA000C8053C02880101F020B0013E003F00335E
1739:10ECB00030000000000000002110FC00CF80334035 1739:10ECB000C00BF0323C08898022C0011512AC008BD9
1740:10ECC0000CD083FC00EF003F400CF1413010CD0030 1740:10ECC0000022C048DB022F408F002E0108D4803282
1741:10ECD0003FC00070133C00E400B1D00C10032004CE 1741:10ECD0000040000000000000E0054C00080008F0C3
1742:10ECE0003000000000000000A1042C008AE42A404B 1742:10ECE0000800124C00330124C04A30024C00A0201E
1743:10ECF000289002EC008B003E020A80022C828904DC 1743:10ECF00028C00B10024604830420C02918020440D7
1744:10ED00002EC10AB00A2C00890222F22A98022000A1 1744:10ED0000B3002C400A1C42B100500000000000007B
1745:10ED1000100000000000000080052C0280142A4032 1745:10ED100020011E018D8021E018C8021E00B3A02131
1746:10ED2000089002EC08AB042E84081082801089033E 1746:10ED2000E01B38020E01A78021E009D840D64087B9
1747:10ED30002CC04AB0222C00AA002280089102200098 1747:10ED30008001E0095902160097842D6008584000B0
1748:10ED4000400000000000000008142C008000284053 1748:10ED4000004000000000000048082C40C00038C40B
1749:10ED5000081102EC0083002C810A005A880001008F 1749:10ED50000C30274C20F30134C10E3A034CC4E000C0
1750:10ED60002CC00A30020C00820020800A100202012E 1750:10ED600018C80F34034440C30030C00D90032E0078
1751:10ED70000000000000000000000D6C00C9003A40D7 1751:10ED7000F3003E400E10019A020000000000000067
1752:10ED80000CD403FC00EB003E400C9203A0004D00AD 1752:10ED8000401DBC00F9000ED40EB003EC20FB203F68
1753:10ED90003FC00EF0333C80E80032C00C90032003EB 1753:10ED9000C40FF103EC60DB103FC04FF003A446FB4F
1754:10EDA0005000000000000000A011FC00FC003D40ED 1754:10EDA00000BDC00ED00BB400EF483F400F5003D061
1755:10EDB0000F5003FC023F043B014FC4137000FD00E1 1755:10EDB0000660000000000000A805EC00F80032D456
1756:10EDC0003FC01FF001FC40FC003FC00FD013E8061D 1756:10EDC0000F8003AD00EB0822D20CB6036C00F2807A
1757:10EDD0007000000000000000C005F8E0FF803DC0AA 1757:10EDD00036C00EA0032810CB00B2C00FD6032810F7
1758:10EDE0000DF382F080FF4031CB0CF303FD04EFC143 1758:10EDE000FB203E404F99132B0070000000000000F4
1759:10EDF00033E00F7903FE00CF4233F04CF8033000CC 1759:10EDF00048119D10B40121C18BC0021CA0BF042783
1760:10EE00007000000000000000E010E908B9812FF058 1760:10EE0000C80875021CC0B60021C008F04218108F57
1761:10EE100008F452E920BF4023F00AF302FD088B00FA 1761:10EE10000021C00B54A21C00B7042D410B5202125A
1762:10EE200036E00B8022E8808F4022C008B082300498 1762:10EE20000460000000000000C0009E80B688A5E0DD
1763:10EE30003000000000000000C805CC00B1802CC5E7 1763:10EE30000B78129E81A79025E48878021E80BF80FF
1764:10EE4000093242C8C0B33120C1083202CCD4BB2041 1764:10EE400024600B68021E00878461E00A1A0A1A0017
1765:10EE500068C00B3002CC2093602088083202320157 1765:10EE5000B7A02DE00BDA0230002000000000000017
1766:10EE60007000000000000000E015A000BB802EC074 1766:10EE60004814CC00BAC0A4C00B34020C00B3002478
1767:10EE700008B002EA00BB0062C10AB002CC00AB00DD 1767:10EE7000C008B00E2C00B39820600933022C00A308
1768:10EE80002EC00BA000E800830022C108300230042D 1768:10EE8000C820C00B10020C00B3002CF00B100212B3
1769:10EE900060000000000000000015E890FB803EC00C 1769:10EE90000430000000000000E815A800FE80368164
1770:10EEA0000DB003E210FB0032C04CB013EC00E9548B 1770:10EEA0000BE003A800EA00B28008A0036800FE009F
1771:10EEB0003AC00FB003E600CB00B2400CB00304042C 1771:10EEB00036A01FE8133B82CEE022808EA0033800EC
1772:10EEC0007000000000000000E001B800FF003FC03B 1772:10EEC000BA003FA20FA0033A046000000000000057
1773:10EED0008FF003F000F702BFC10FF023FC00DF0644 1773:10EED0004800E000F8203A10078003C100F800382D
1774:10EEE00037C08FC907FA92FF043F502FF003F80094 1774:10EEE000002F8003A001F8423E050E800BE080D881
1775:10EEF00060000000000000005010AC00C9003EC2DD 1775:10EEF000003E000F8403E100F8003E000F840BD2B7
1776:10EF00000EB023E400EB003AC80EB003EC00F900A9 1776:10EF000000300000000000000810E400C9003A5082
1777:10EF10003EC00FB403A400FB003E800FB083D004BA 1777:10EF10008F9083A402D100B2404C90232408C901F1
1778:10EF20002000000000000000C80528008B742DC0E0 1778:10EF20003E400C90032400C10032400F140A2520FB
1779:10EF300008F002E4008F0021F008F002FC10D3007A 1779:10EF3000E9003E420F9003C20430000000000000D0
1780:10EF40002EC00B90122C00EF002EC00BB602F60064 1780:10EF40008004640A890022700B90122580C9002277
1781:10EF50004000000000000000E8054800A3002CC4A9 1781:10EF5000400A9003640089202C400A900A2400890A
1782:10EF60000A3002C000A30068F00A3012CC04A200EC 1782:10EF6000C132400B9802060089902E400B9412E0AB
1783:10EF70002CC00B3002EC00B3012EC00B3402F800A1 1783:10EF700000100000000000001801040089006A422F
1784:10EF80005000000000000000B0010C0087802DE858 1784:10EF80000A1002A4008900A2400A9002240009008D
1785:10EF9000087842DA00878025E0087902CE00968062 1785:10EF90002E4058100224008980AA600B9002A4041D
1786:10EFA0002DE00BD902DE00A7802DE00B7802FC00DB 1786:10EFA000A9002E400B9402C60040000000000000A3
1787:10EFB000400000000000000048080C40E3103CC086 1787:10EFB00008040480810060480B10020481812060F5
1788:10EFC0000A3803E800EB0038C20A3003CC00E34003 1788:10EFC000480A1202448881000E590A140205008181
1789:10EFD0003CC00F3403CD00F3203C880F3003D20235 1789:10EFD000C028504930028C8401602C500B1002C2B2
1790:10EFE0000000000000000000401DB480FF043FC886 1790:10EFE0000100000000000000B80D6140C0542A007C
1791:10EFF0000FF083F840FF183BC00FF483FC00EE02D3 1791:10EFF0000E8503A000C85032151E05222142C8000C
1792:10F000003FC00FF0033C00EF083F800FF013D00625 1792:10F000003E000C80030004C8003A004F8503A14075
1793:10F0100060000000000000008805E800CB003EF220 1793:10F0100068003E000F8003EE035000000000000077
1794:10F020004DB213E804CB0132F84DB2136D20F80055 1794:10F02000981DE440FD033E440FD003E448E9103E40
1795:10F030003EC00F30032400FB003E408FB8032A007F 1795:10F03000450F9113E440FD003F440FD003F402FD5F
1796:10F040007000000000000000C8118C0086002CC079 1796:10F040004033500FD4237440F9103F400F5403E66F
1797:10F05000087302D812873020CB08F2021D05B500D4 1797:10F0500002700000000000001805E400F901336AA6
1798:10F060002DC00B60035010B7092DC00BF002320405 1798:10F06000099003B634F9C832640C9A03E6A0DD00B7
1799:10F07000600000000000000080009E0087802DE4FA 1799:10F070003C700F9003A500898033320FD8133C00F9
1800:10F08000097A02CE01878021EC0978025E80B7C040 1800:10F08000FD0070500FD0030600700000000000006B
1801:10F090002DE00BF8021E00B7A02D600B78022000B7 1801:10F090003810E280B8A822100888022100B8C020E9
1802:10F0A00020000000000000004814EE0082802CC008 1802:10F0A000300D8E87838888002E340B8A822280DC84
1803:10F0B000083002EC008300A0C00830020C00B380CE 1803:10F0B000E022380B80022000F8A82A280B80020EDC
1804:10F0C0002CC10B30024E00B3002CF10B300A12049D 1804:10F0C00000300000000000000805C420B10020400E
1805:10F0D0003000000000000000E815BA80C6003E8045 1805:10F0D0000A92928411B1246858091102C420910146
1806:10F0E0000DA003F840CA0032800DA0136800FE0294 1806:10F0E0002C481B500274849548AC480B94020404CD
1807:10F0F0007E800FED833910FA003F8C0FA0033A0495 1807:10F0F000B10224480B10020205700000000000005D
1808:10F1000060000000000000004800E012F8903E009F 1808:10F100001811A400B12022400A90062C01B9002A4F
1809:10F110000F8003E000F8053E000E0003E000F880D9 1809:10F1100040099002A4009B082E480B121A74009517
1810:10F120003E000F8003E060F8007E000F8003D200F5 1810:10F12000452E600390022400B9002E400B90020689
1811:10F1300030000000000000000810E400C9803264C4 1811:10F130000460000000000000A015E400F9803040E9
1812:10F140000F9043E406C1043A400F9003E400E90045 1812:10F140000E1603A400B90432400D9002E400D94029
1813:10F1500032400F90032400C10132400C9003C204DE 1813:10F150002E401F9803E580D900AE6007100B2601F2
1814:10F1600030000000000000008004640089C02240DC 1814:10F16000B900A6400F900B280470000000000000BA
1815:10F170000B90022400890022501B90222400810061 1815:10F170002801A400F900BE40AC9203E400F900B4F9
1816:10F1800022400B90222408C9002040089402E0008D 1816:10F18000400F9003E400E9003E600F9003A480F973
1817:10F190001000000000000000180524009920224003 1817:10F190000032000F9083E685E10032440F1003CA6D
1818:10F1A0000B1002A40089002A580B90028400A900C9 1818:10F1A00000600000000000002810A000F8003200FD
1819:10F1B00022400B100A0400990222C1089082C60066 1819:10F1B0000F8013E094E00032000C80036000C80070
1820:10F1C0004000000000000000080404009102A0C8F4 1820:10F1C0003E000D80432008F80032000F8003E0402D
1821:10F1D0000B12020480812220489B120204908901B4 1821:10F1D000F80032004C8023CA042000000000000028
1822:10F1E00020400B1002040281222240081002C201BA 1822:10F1E00028052800BA0023800BA002FB046A002235
1823:10F1F0000000000000000000B80D6142DA01320199 1823:10F1F000800AA003680A8E883A8008A0020800BA34
1824:10F200000F8503A140C0503A018B8523A144E850EB 1824:10F2000000B72203E402FA008A00228008E802CA5A
1825:10F21000B2000F85032148D85132142C8503EE0328 1825:10F21000004000000000000028054C00B3006041E1
1826:10F220005000000000000000981DF500ED023E4473 1826:10F22000033002CC41A30004C00B30022C00A380A9
1827:10F230000F9103F440F9103E440F9103E440FD00A8 1827:10F230002CC00938020C00B300A0C00B3402CC80F3
1828:10F240003E400FD003F400E910BF400F9003660664 1828:10F24000A10020C0083802CA0050000000000000E1
1829:10F2500070000000000000001805E621C5003368BA 1829:10F25000A0011C40B70061000B7102DC00A3002577
1830:10F260000F9A036F88C9C033680C9E032780D9406A 1830:10F26000C81938025C80A7000FE80964221000B3B7
1831:10F270003E400F9003C510D9E836500CD003E6008D 1831:10F270000025C80B6002F200850123E8087082E8CF
1832:10F2800070000000000000003810E10888008200D3 1832:10F280000040000000000000A8081E20FF80A1A090
1833:10F290000B8E82EBC888E02200288842A2808A80F8 1833:10F290000F7A42DA00E7E835F02F7B621E82E680C3
1834:10F2A00022000BAA02E20088C022A9088A038E0469 1834:10F2A0001DE00DF80B1E00F78031F00F7803DE0C27
1835:10F2B00030000000000000004805C400810020D09C 1835:10F2B000EF8031F82C7803EA000000000000000025
1836:10F2C0000B1132848481606050081606050091207D 1836:10F2C000081DAD84FB683E000FB003E800FB00FAA8
1837:10F2D00020400B1082E409912024400810C2D20182 1837:10F2D000D80EB503ED00DB003AC08EA003E000FBC2
1838:10F2E00070000000000000001815A40489042240EA 1838:10F2E000403EC00BB043C404EF02BFC00FB003C226
1839:10F2F0000B9002C400A9002241009002A4008100EA 1839:10F2F00004600000000000000005FE42C7383364CF
1840:10F3000022400B9222E58099012261089002860436 1840:10F300000E7C035E00DFA037F00DF803FF20CF81F5
1841:10F310006000000000000000A014A582819032402F 1841:10F3100033E20CD803BE007FC033E00CF9037E005B
1842:10F320000F90136702C90032400C90232404D9C007 1842:10F32000FD803FE00FF803C0007000000000000007
1843:10F33000B2400F9C03E600D90036500C9003E8045D 1843:10F33000A8119C0087A021140871021410D7203551
1844:10F3400070000000000000006800A680F9003E4048 1844:10F34000C00C7003BC0085082BC04D4602D100B72D
1845:10F350000F9003E700D900BC420F9053E404F9106A 1845:10F350000021C00860020880F5203DCA0F5403EA6E
1846:10F360003E400F9803E604E1003E402F9003DA0090 1846:10F36000046000000000000000009C118F01208458
1847:10F3700060000000000000002810811048103208D2 1847:10F370001AF0021800A73465C0097102DC008E0083
1848:10F380000C800F2102C8003A040F80076000F8408B 1848:10F3800029C00850069C00BF882DC40A6026582456
1849:10F39000B2000F840B2000D80036100C8003CA0482 1849:10F3900097006DC09B7002C00020000000000000BC
1850:10F3A0002000000000000000280428048E80238034 1850:10F3A0002014CC008B4020001830020000BB022447
1851:10F3B00008A04228008A0023A04BA002E800BA005F 1851:10F3B000C0083020CC0081C028C00B0482E010BB04
1852:10F3C00076800BA00208008A00328008E003CA00A1 1852:10F3C000A02CE00A20060000B30028C00A10028822
1853:10F3D000400000000000000028054C00820020D002 1853:10F3D0000430000000000000A815BC00CF1032006F
1854:10F3E0000830020C009B0028C01AB0026C00B30267 1854:10F3E0000EF00B2400EF0037C00DF003FC06C150F7
1855:10F3F00020C00B30020C00A30022C0283482CA00B7 1855:10F3F0003BC00CB403AC00F8C0BEC82EB0036E0115
1856:10F40000500000000000000020011C00870020E0E8 1856:10F40000FB002DC04B9002EA0460000000000000E9
1857:10F410000878020C00972025C00B7102DC81B72010 1857:10F410008000EC04FB003E000FB003AD009B003EFB
1858:10F4200021C00B7A423C80872021C0087002E8008E 1858:10F42000C00F3003AC00F8002EC005B403ED00F8A7
1859:10F43000400000000000000028080E82C780B1E0F4 1859:10F430004032C0090003E091E3003EC00F9011E0AC
1860:10F440002CFA061E08D3B139604E78125EA0FFF088 1860:10F4400000300000000000000110EC00EF0033204D
1861:10F4500021E00FF8031F08E3A033E00C6803EA0281 1861:10F450004FF003B400EF033AC00FF0033C00DC00B0
1862:10F460000000000000000000081DAC40FB003EC092 1862:10F4600031C08DF803FE04CF0032C80CF00B1C0035
1863:10F470000FB203EDA8EB103A800FB0C3EC40FB00D5 1863:10F47000CF9333C08C4002004430000000000000F5
1864:10F480003EC00FB083EC80EB70BEC40FB0038206A9 1864:10F4800081046C00BB00A2040B30020E00AB002A0A
1865:10F4900060000000000000004005FE00CE80B36068 1865:10F49000C009B0036C08A8C036C008BC02EF02ABBC
1866:10F4A0000FFC837E20EFB03BE00FB8033E00CF811E 1866:10F4A000D020E008B82226108B0022C0209C022029
1867:10F4B0003FE08FF883EF40FFC233E10CF803D00048 1867:10F4B000401000000000000080052C00BB0026006A
1868:10F4C0007000000000000000A8119C8287182180B5 1868:10F4C0000AB002A208AB006AC00BB00A0C008B8025
1869:10F4D0000B30021C60D71021D00B7B023C00D70000 1869:10F4D00022C009B102EC40880822C008B802260008
1870:10F4E0002DC00B7002DE00BF00A3C4087003AA0485 1870:10F4E0008B0022C0089802A000400000000000002D
1871:10F4F00060000000000000000000BC11870021C077 1871:10F4F00008040C00B30024000BB0020001830020BC
1872:10F500000B30021C00932069C00B70021C008700A6 1872:10F50000C00930024C00000424C00830064C0080C2
1873:10F510002DC00B7102DC20B71021C00860028400EE 1873:10F51000002CC008000200418300A2C008100A822B
1874:10F5200020000000000000006014CD00834020C0D7 1874:10F520000100000000000000000D7C00EF08260034
1875:10F530004B30020C01830020C00B30020C00938082 1875:10F530000EF002A000E7003BC00FF5433C02DA00EA
1876:10F540002CC00B3002CC01B30020C008302298043C 1876:10F5400032C00DB003EC00CB00B2C00CA0032810F9
1877:10F550003000000000000000A815BF20CAC03280A3 1877:10F55000CB0032C00C80038003500000000000008C
1878:10F560000FF0033E009F003A800FF00B3C00CF9855 1878:10F56000A00DFC00FB003B000FF003F000FF023F8A
1879:10F570003EC00FF603FF00FF0031E02CB003AE04E5 1879:10F57000C00DF203BC00F4003FC00FF003FC00F725
1880:10F5800060000000000000008000CC80FB003E50C6 1880:10F580000033C00F6003F088FF003FC04FD0036816
1881:10F590000FB003AC02FB007E500FB003EC00FB0089 1881:10F590000670000000000000C005FC40FC313B0884
1882:10F5A0003EC00FB203EC20F3003EC60F9003A00054 1882:10F5A0004FF943EF00DF3032210F94077D80EF38B1
1883:10F5B00030000000000000000110FC02CF9873C86A 1883:10F5B00032091C3803F221FD0033C40CF002FC00B8
1884:10F5C0000F70033C00FF0033280FB0021C004F00F7 1884:10F5C000DF0033C00FF003300070000000000000C7
1885:10F5D0003FC00FF003FC00FF0133C00CE403E40460 1885:10F5D0008010EC888B6022E50EB222EC80AF112AFD
1886:10F5E000300000000000000080046C008380A2F85E 1886:10F5E000200BB113AC488B4534CC48B0026B00BA49
1887:10F5F0000BB0422C00BB0032100FB0036C04AB0008 1887:10F5F000823600088822C0048800A2088B88622016
1888:10F600002EC00BB012EC04EB0022C04A9482E00042 1888:10F6000004300000000000008805CC00A130280074
1889:10F61000100000000000000080056C008A0022003D 1889:10F610000B3202CC00A3222C008B1206C880A30060
1890:10F620000BB0022C00B300A2C00B3002AC00AB0444 1890:10F620002002CA3006C401B10068800920028800A7
1891:10F630002EC00BB042EC00BB0022C008B022E0009C 1891:10F63000830020C20B000AA201700000000000003D
1892:10F64000400000000000000008000C008B012000BA 1892:10F64000C015AC008B6162C00BB202E800AB022AAD
1893:10F650000B30060C00B30020C00A320ACC00A30015 1893:10F65000611B9002A800AB0020C00AB0026C04BA83
1894:10F660002CC00B3002CC00A30022C04A0012C20101 1894:10F66000002E40899002E608980022000BB002B0FC
1895:10F67000000000000000000000086C008B0422C0A5 1895:10F6700004600000000000004015EE00F8013A04AC
1896:10F680000FF1031C00FF0432C00BF203BC00EF00BB 1896:10F680000FAC03EC90FB023EE00B90426780A8C4F5
1897:10F690003EC007F003FC80FF00B2C00CA003E003F3 1897:10F690002248228603E140B8022A40299003EC0266
1898:10F6A0005000000000000000A019DC00F5003FC081 1898:10F6A000C94832400FB01390047000000000000001
1899:10F6B0000FF003FC01FF023BC00FF1037C00FF00D1 1899:10F6B000E001AC40FB001FA20EF882FC08FF003FF7
1900:10F6C0003FC00FF013FC40EF003FC00FC003E8063F 1900:10F6C000C00FFA439644D4913F400DC003FA00FFA7
1901:10F6D0007000000000000000C015F240CC80372010 1901:10F6D0000825800EE003D000EA003F800FC00378C9
1902:10F6E0000CD803B044FC083F0E0FC103FC00CC94BF 1902:10F6E00000600000000000004010AC00E1203A5033
1903:10F6F0003F0A2EC4037D80CF103FC00FC08330006F 1903:10F6F0000F90032C00EB0876050EB027E010EA40CF
1904:10F7000070000000000000008008E0908802228164 1904:10F70000B2C00CA4432500F80032080F8043E80083
1905:10F71000089213A4403B6022180B8102FCD48100A4 1905:10F71000D108EE400F0003D00420000000000000DC
1906:10F720003AB00A94023D40AF632FDF0B98002004EB 1906:10F72000C8052C008B0022D00B90822C0087402231
1907:10F7300030000000000000008805E0008800204044 1907:10F73000608BB002E000D85022D00CA0036C00B364
1908:10F74000883082C000B00828800A1002CC208001D6 1908:10F74000C83ED00BB80225088A202A808BB882F2E6
1909:10F750002C401B06028C90936068C04A0042220134 1909:10F750000040000000000000E0056400A0C024C0DC
1910:10F760007000000000000000C005A002880022C058 1910:10F760000938022C0083032000103022CC008300D3
1911:10F7700008B002E420BB8826980B8042CC188A008F 1911:10F7700060080A30824C00B1C000D10B380284808E
1912:10F780002EC21B9802AC00AB002EC00B9882300436 1912:10F7800082012080033802F80050000000000000D1
1913:10F7900060000000000000000011E3C0CB02320056 1913:10F7900020011640849825E00B7A02FA48A32061E4
1914:10F7A0002C8003AE08B9003E700FB903EC02484844 1914:10F7A000240B7900CEC093A421A60B7812DE80B67C
1915:10F7B0003CC00F8C93EC00DB001AC00EAC031004AD 1915:10F7B000802D240B4B021A40858121600B4802C822
1916:10F7C0007000000000000000E001B200FF00BB80FC 1916:10F7C000004000000000000048080C00E2A0B4FE69
1917:10F7D0000FC043B640BD003B600FE803FC00FF9440 1917:10F7D0004BB80B0E00A3B024A80E1B02CEC1C3C0B1
1918:10F7E0003BE40E600F6C08EF013FC00F6003F800B0 1918:10F7E00030682E3A474E80F18030800F22838000AF
1919:10F7F00060000000000000004010A100FB003E601F 1919:10F7F000C21038804F0007D2020000000000000055
1920:10F800000FA003ED00F9403A000F9003EC02C90489 1920:10F80000400DBC10FE043BC107F0031CC8DF2A0BEF
1921:10F8100032D00F90032C08DB00B6C00DB403D00427 1921:10F81000C48FD143F8027F003FC00CF10F3C00F2CF
1922:10F820002000000000000000C8050000B3892EE0A1 1922:10F82000113F411F5203BC0EED143F400FF803D0AF
1923:10F830000BA403A401B9002E010B9042FC108950C7 1923:10F830000660000000000000A805E400E900328036
1924:10F84000A2C08DB4023C448F0023C008B002F20075 1924:10F840000EBE4B6F00CB827AC02CB0032C00C900D7
1925:10F850004000000000000000C0040C00B0802E003A 1925:10F8500032002C10032C08C00026406C9013241298
1926:10F860000B1202C800BA002CC00B2002CC00A20070 1926:10F86000C8013E000FB80B2A007000000000000025
1927:10F8700020002B2D9A2E42830028C0082002F80079 1927:10F87000481194008D0021800B70823C2083322936
1928:10F88000500000000000000020001E04B4802DA0E5 1928:10F88000C008F0201400800023000850069C04D714
1929:10F890000B58029200B6802DE00B6802DE40A68075 1929:10F89000022880086002081087002DC00B40021269
1930:10F8A00021242948021E80878069E0086102C8007F 1930:10F8A0000460000000000000C0009E00A78021E06E
1931:10F8B000400000000000000048180C00F0303C4CF4 1931:10F8B0000B5C121E0487820DA00978160200B4802A
1932:10F8C0000F3203C880B20038800F1B03EC00E03019 1932:10F8C00025E00B78029E00848021220808021201A4
1933:10F8D00030040FB1030E85CB003AC00C3103D202C5 1933:10F8D00084C02D200B080230002000000000000032
1934:10F8E0000000000000000000401CBC00FC113FC4F0 1934:10F8E0004814CC008342A0D80B34820C00A3022021
1935:10F8F0000FB813B004FE023F800FC003FD00DF12FB 1935:10F8F000E008B0020C88B32124D80B3E028C0093A0
1936:10F900001D040FD043BC01EF1033C40EF303D00627 1936:10F900000828C00838022C058B012CE00B300212AD
1937:10F9100060000000000000000805EE00CB003E0083 1937:10F910000430000000000000E815A800EE0033905D
1938:10F920000F80032800F8003E403DB003EF08C900F7 1938:10F920000FA00B6800CA017FA80CAA033A12FEE2DE
1939:10F930003A000CA003EC98FB2032D20CA8032A0258 1939:10F9300037B00FEE021800CA4036A008A08B28008E
1940:10F94000700000000000000048119C0087012D801D 1940:10F94000CA812EA00FE0033A04600000000000000E
1941:10F950000B40421C043700A140086002CC808700A5 1941:10F950004800E000F8083E000F8003A202D8403EB5
1942:10F960002D802E7002DCA9B72821D0087002120069 1942:10F96000080F8013E0404840B8040884036100FC9D
1943:10F9700060000000000000002000BE0287802D60B3 1943:10F97000003F004FC003F100FC003F040FC003D262
1944:10F980004BE8025A01B48828E08878C2DE5286C06B 1944:10F9800000300000000000000810C400F9003050F2
1945:10F990002960086802DE40B392E1E828280270007E 1945:10F990004CB9036C18F90036400E9C23A4024100B8
1946:10F9A00020000000000000006814CC008B802EC0F6 1946:10F9A000B2440E9A03A680C9003A600A9003A4806C
1947:10F9B0000B20024D809B2020E0083802CC00838081 1947:10F9B000C90034400C9003C2043000000000000075
1948:10F9C0002CC00AB002CC08B30020C0083102520497 1948:10F9C0008004640089402278089402E410B9003C65
1949:10F9D0003000000000000000E805A800CAE03E80FA 1949:10F9D00062189482A40089C82270481E016780D1F1
1950:10F9E0001FA40B7900FE003F821DE003E800CE401B 1950:10F9E00000BC42081002252089022240089002E053
1951:10F9F0003B882CE403E801FA0032800CE8037A0427 1951:10F9F000001000000000000018052400B12822407B
1952:10FA000060000000000000004811A000F8093E005E 1952:10FA000008B082640439412E480A90020418A920E3
1953:10FA10008FC083A018F8003C200F8803E000F8088E 1953:10FA100022424A90022C0489042B4802D002B40AE4
1954:10FA20003E200E8083E101F0003C000F800B92002D 1954:10FA20008D8023C048D002C60040000000000000C6
1955:10FA300030000000000000000810A400F94232402D 1955:10FA3000080404808120A048281002C400B1242AB0
1956:10FA40004C98030400C9003A400F90232400B98168 1956:10FA4000400812428580A120A048089002440095F9
1957:10FA50003C400C92032400F90532406C90C3C20470 1957:10FA50002C2D5A0A728214A085A8214A085282C20B
1958:10FA6000300000000000000080042414B900A254FB 1958:10FA60000100000000000000B80D4140F8503200D5
1959:10FA7000089B1A240289002240289002A400B99011 1959:10FA70008C05036140F8512E000A85022000E850F1
1960:10FA80002E40289C822504B9002240089812E000EC 1960:10FA80003214068517A000C8203A080E8203A08011
1961:10FA9000100000000000000018052400AD00234005 1961:10FA9000C82032082CC203EE035000000000000012
1962:10FAA000085002640089002A400810026400B9006E 1962:10FAA0009819F440FF103F440BB003E400F9103DF7
1963:10FAB0006E400890022500A9002240089106C60069 1963:10FAB000400FD103F4589D103F444FD003D500F9B7
1964:10FAC000400000000000000008041400B510A1442C 1964:10FAC000003E408D9003E4B8F928BA6A0F9003E62F
1965:10FAD0002850024480813020480812028440B180BE 1965:10FAD00006700000000000001801E700FD883E608D
1966:10FAE0006CC80812020480B1342048081202C20116 1966:10FAE0008FD0032401DD8073400FD803A604CDA27C
1967:10FAF0000000000000000000B80D6140E8403290B6 1967:10FAF00033781CD0033401F5883B680CDA47378033
1968:10FB00000CC5036140C0403A140F850321B0F85082 1968:10FB0000CD8832620CDA03060070000000000000AD
1969:10FB10003E000C85032140F840B0140C8003EE0138 1969:10FB10003810E380B8802E140B0A822280B8F8A235
1970:10FB20005000000000000000B81DC404F9220E4877 1970:10FB2000000B8FA383E088EB22A9088812A005B8F8
1971:10FB30000F1013B440FD303F444FD100E484FF0167 1971:10FB3000002AAA88801362828880222888A4020E64
1972:10FB40003D440FD10BE440F9303E440FD103E604AD 1972:10FB400004300000000000000805C500B10A2C4187
1973:10FB500070000000000000003805E400DD403F5068 1973:10FB50000B10060420A10000408B1046C401911137
1974:10FB60000CD0032C00C90036400F90132704F50178 1974:10FB600024586890C20400B100A85009140A0595F1
1975:10FB700037400CF003F620F9A832680CD003C60019 1975:10FB7000A108A04228110A02017000000000000044
1976:10FB800070000000000000001800E00088A02E288F 1976:10FB80001815A418B9202E500B90062409B900228C
1977:10FB9000288002200088A022000B800A6280B80022 1977:10FB9000408B9102840099642440589002A420BBB9
1978:10FBA0002200088002E100B8E0223A08A002CE0458 1978:10FBA000002A4009B0020501A900224088920206FD
1979:10FBB00030000000000000004800840281002E4058 1979:10FBB0000460000000000000A015E600F9403E408F
1980:10FBC00008100A4402810824400A10024580B90046 1980:10FBC0004F980B2480D90022720B9803E484D9004B
1981:10FBD0002440291002C400B1082444081002C201C4 1981:10FBD000B6700899022400B9002A400D94C225008D
1982:10FBE00070000000000000001814A40489012E50C9 1982:10FBE000A90022400C9403280470000000000000CB
1983:10FBF00048B2026400910022460B90026400B901F1 1983:10FBF0002801A680F9083EC00F9143E400F9003EB9
1984:10FC000026C009B012E400B1002640089002C604E4 1984:10FC0000500F9803A500E9003A640F9003E400F94F
1985:10FC10006000000000000000A004E400C9003C40B7 1985:10FC1000003C406E9003E420D9003C400F9082CA23
1986:10FC20000C90036400C90236500E93032400F9902F 1986:10FC200000600000000000002810A000E8003E0076
1987:10FC300036480D9483E408F900B6400C9403E804B8 1987:10FC30004F840B2000F80036010E8003E000C8401E
1988:10FC400070000000000000006810A400E9003E40C1 1988:10FC400032102D8003E054C80036100F0483E050BA
1989:10FC50000F9013A400E9022E61059003A400F9009F 1989:10FC5000D80412000C000B0A042000000000000071
1990:10FC60003A400E9043E410F90038402F9003CA0048 1990:10FC6000280528008E422EA28BEA022808BE89377A
1991:10FC700060000000000000002810A000D80132043D 1991:10FC70008448E01228028EC023B04D6062F80086EE
1992:10FC80000F8043C001C800B2010C80032000C840AF 1992:10FC80000023800BE002F8000E00228008E4020A44
1993:10FC900030008C8483E000C80032006C8403CA0406 1993:10FC9000004000000000000028054C00A3002C805C
1994:10FCA000200000000000000008042800BA002380A3 1994:10FCA0001BB09A4C109B8024C00A30000C049B208F
1995:10FCB0000BEA02E800AA00228008A00228008620A1 1995:10FCB00020D60830028E08A30424C0193402C707D6
1996:10FCC00037A08DE402F800DA00228008A002CA0002 1996:10FCC000AAA4A0C04834020A0050000000000000AE
1997:10FCD000400000000000000008056C00B30020C0D8 1997:10FCD000A0010E0087002DC00B40025C40B314252C
1998:10FCE0000BB8024C04830020C008B0020C02830051 1998:10FCE000E0087A029EC09240A000496002CE028ED7
1999:10FCF0002040283402CE908300A0C0083002CA0001 1999:10FCF0000121C08B5402C408864021C88810022804
2000:10FD0000500000000000000020011CC0B588214008 2000:10FD00000040000000000000A8081EC0E4803DE2A2
2001:10FD10000B7002DC80A32021E04832420E908E015D 2001:10FD10000F58035E90B6A235E00E7C231C00D680FF
2002:10FD20006550097002DE20932121C0087002E800AE 2002:10FD200031E0847803DE00C78035E00F6803DE0031
2003:10FD3000400000000000000028181E00FF80B1A055 2003:10FD3000E38033E82C78032A020000000000000072
2004:10FD40000F48027E0087A033E0287A0B1F00C48092 2004:10FD4000081DAC90FA007E400F9003AC01FB003C14
2005:10FD500031608C5803FE00C7C833E80C5803EA0230 2005:10FD5000410F300B2D04EB013EC00EB003EC00FA56
2006:10FD60000000000000000000081DAC00FF003E0085 2006:10FD6000003FC00F8003EC00E9603EE40F9003C247
2007:10FD70000F9023ECA0FB403EC08FB503ED80F80050 2007:10FD700006600000000000000005FE20FF903E200D
2008:10FD80003C400FB003E800FB023ED00F9003C206D8 2008:10FD80000CA9072E44C99130A00CB8632F44CBA115
2009:10FD900060000000000000006004BE00FF803FE043 2009:10FD900036208CF8033600CF8233E00CF8232E0097
2010:10FDA0000FD903FE20CFC833EA8FFC033F00FD804C 2010:10FDA000CEC03BE00C6803000070000000000000C3
2011:10FDB0003F600EE803F200CF802FFE0C78030000B6 2011:10FDB000A8119C84B3542CF428BA8A3E4081A0290F
2012:10FDC0007000000000000000A8009C00B5022DC0DB 2012:10FDC000B00F7842AE00839033E80DE100854082A9
2013:10FDD0000B5842DC80CF0021C10B30121C40B40212 2013:10FDD0002423C60D71035EE087002BC10D44022A67
2014:10FDE0002D46087112C800E7002DC40870036A048C 2014:10FDE000046000000000000000009C0835146DC095
2015:10FDF000600000000000000000009C00B7002D0221 2015:10FDF0008872325C8084302B880A70425CA891083B
2016:10FE00000B4602DC08970021C90A30221C00B4000E 2016:10FE000025C80970024C22830A61C009200204003F
2017:10FE10002D400A5082C400B7002CC8285002401060 2017:10FE1000870021C0086002000020000000000000F0
2018:10FE2000200000000000000040148C18B3002E20B9 2018:10FE20002014CC10B3856CDC0834024D21810028ED
2019:10FE30000B1802CF4A83C220C10B34220C04B858DD 2019:10FE3000024A3112EF0C91C220F00830428E00824B
2020:10FE40002C400B2802C800A3002CC0081402480450 2020:10FE40004020C8192802228183C028D409000A084A
2021:10FE50003000000000000000A805BC00FB003E8050 2021:10FE50000430000000000000A815BC00FBA03EC05C
2022:10FE60000FA002FC00DFA0B3C00EF00B3C00FBC0F3 2022:10FE60008C04127D10CF023A5008C0427D525801D6
2023:10FE70003CA00EBD03EC00FF003FC00C30036A0441 2023:10FE7000362269D0132A00888232F009B8822F0016
2024:10FE80006000000000000000A010EC00F9003E013E 2024:10FE8000C9C823C00C8A032A0460000000000000D7
2025:10FE90008FB143EC00F3003EC04FB013EC00FB0009 2025:10FE90008000EC00B9403C504F8023AC12FB002A9C
2026:10FEA0003E800C8403E10073003EC10FB243E000CA 2026:10FEA000C06D8013AC00E804BA100F8003E800F3C3
2027:10FEB00030000000000000000150FC10FF8037C03F 2027:10FEB000083C800F9083EC04F9602CC20F8083E033
2028:10FEC0000CE003FC20FF0833C00FF083BC00FF00F0 2028:10FEC00000300000000000000110DC00EC2C3FF0CE
2029:10FED00033C02E40031C01CF0011C04CD00300449E 2029:10FED0008CFA8BBC00FE003F000F79033C00CE087B
2030:10FEE000300000000000000081046C04B3022272A4 2030:10FEE0000BC20CF003BC00FC0033408C7A033A00D8
2031:10FEF00008A116EC00BB0422C00BB042EC00BA19FA 2031:10FEF000C50033C04CC803004430000000000000BF
2032:10FF0000B6D0089C4A2680DB0022C00890036040DF 2032:10FF000081046C0088C02EE00894022C00BB80663F
2033:10FF1000100000000000000080052C00B9106220D5 2033:10FF10003016B0022C00DA4C22F008F003EC00EBB3
2034:10FF200048A002EC00BB0022C00BB002EC10BB00EA 2034:10FF2000C022680094022C02A98022C0080C02A002
2035:10FF300066080AA81226109B002AC028B0262000B6 2035:10FF3000401000000000000080052C00AB042EC023
2036:10FF4000400000000000000008000C00B900200084 2036:10FF400008A4062C04AB102E604380826C018180D3
2037:10FF5000083202CC04B30020C04B3002CC00B30006 2037:10FF5000280A089100E000B88002E00880022D80A5
2038:10FF600020000800020100930028C008300642115A 2038:10FF600088C022C00882022000400000000000007B
2039:10FF70000000000000000000001C6C00F900B2400E 2039:10FF700008040C0080442CC828A0220C04B3262CB2
2040:10FF80000C8202DC01FF00B2C00BF103BC00F900DF 2040:10FF8000C88801060CE09120200C380422C048A348
2041:10FF900026402E80032104CF00BBC00C9003000339 2041:10FF900042A0810800020C80810020C0280002825B
2042:10FFA0005000000000000000A01DFC00FD003F40CC 2042:10FFA0000100000000000000000D7C00A9403E445C
2043:10FFB0000F8103FC00FF003FC00FF023FC00FC009A 2043:10FFB00008B1032C40EA492E0D0BB6137D80C940D1
2044:10FFC0002D402FC003F088FF0037C08FD003E80218 2044:10FFC000BAD00CB403AC00F80032400C800B200017
2045:10FFD0007000000000000000C005FE40FF8033C23A 2045:10FFD000C500B2C00C800300035000000000000008
2046:10FFE0000CF8037CA0FF903FC42CB403BC80CF402E 2046:10FFE000A01DFC04FC003DC50BF100FCD0772937B7
2047:10FFF00037E00FF1936E44BF303F202CF863F004DC 2047:10FFF0000C8E7403FC08FD693FD80FF003BC00EFC2
2048:1080100070000000000000008010EC00EB2023F056 2048:10801000003F4007C003F040FD003FC00FC003E831
2049:1080200008B8523D00B3002EDC08F4421C428B40DD 2049:108020000670000000000000C00DFCC0DC803FC8EE
2050:1080300022C80BF6036C88BB302E0008B202E004A5 2050:108030000F48037C20FF6837E00EF1039C00BF204F
2051:1080400030000000000000008805CC00BB0820C004 2051:1080400037E00CC8133C40ED60BBE42C434B70A000
2052:108050000830024CA0B3202680883602CCA0936062 2052:10805000CC2C3F090FD843700070000000000000D6
2053:10806000A4C20A32424C90B3202C0B883082E20129 2053:108060008000EDC0B8802FF40F98023F00BF42227D
2054:108070007000000000000000C015AC08BB22A2C0C8 2054:10807000CA08F4023E00BFD0226028880A3D808DE5
2055:1080800008B0022C00BB002E9008B002EC009B0050 2055:108080004022C80881022180DBC02EA50B98422027
2056:1080900022C00BB0026C00BB022E2008B002F00020 2056:1080900004300000000000008805CC10B0002CC0A7
2057:1080A00060000000000000004015EC00B18332C009 2057:1080A0000B2002CC00B32026C08A36128C41B300CC
2058:1080B0000C1A036C10FB0034C00CB003EC08DA009F 2058:1080B0002E400800020D81A13022C889A24208206A
2059:1080C00036C00EB00B6C00FB003E280CB002D00096 2059:1080C000B0002C400B902662017000000000000000
2060:1080D0007000000000000000E001BC00ED803FC027 2060:1080D000C015AC00B8502EC00A9002AC00BB002204
2061:1080E0000FD403EC00FF003FC80FB0033C00EE408C 2061:1080E000C008B0622C10BB042AF04A88020C008140
2062:1080F0003FC00F7003FC00FF003F800FF003F8004B 2062:1080F0000022C009B8802600B8802E210B900230E3
2063:1081000060000000000000004010AC00FB20B0C088 2063:1081000004600000000000008015EC00D8C03EC0F4
2064:108110000FB403AC02CB0032900EB0036C00EB0046 2064:108110000B8003EC00FB0036800EB003AC00FB00CC
2065:108120003AC00CB002EC00FB003E910FB00390008F 2065:108120003CE00C0C032C00E90010C00C8C03060092
2066:108130002000000000000000C8052C00BB8023D7F1 2066:10813000F8CD3E220F18034004700000000000003C
2067:108140000B90023C148B006A0828F000BC008300EE 2067:10814000E001BC00FF003EC00FF0037C00F7023FDF
2068:10815000BEC088F0132C00EF002E800BB007B200D9 2068:10815000E40F70037C04B70037400DC003FC00FD42
2069:108160004000000000000000E0054C00B34020D0BB 2069:108160000037D00EC043F400DF003F808FDA03F801
2070:108170000B28028C00830120C01AB8006C10A100EB 2070:1081700000600000000000004010AC00F8103AC0A1
2071:1081800068C02A30028C00B3022E004B3002F80483 2071:108180006DA613EC00CB003AD00FB0032C10DB101F
2072:10819000500000000000000020011E00B7A021E0F8 2072:1081900036D80D8403EC06C9083AC00E8603A860E1
2073:1081A0000BECC21E04878029E40879829E40AF90C0 2073:1081A000F8203A400C900354042000000000000026
2074:1081B00029E00A38001E00A7902D240B78028800C1 2074:1081B00098053C00BB4023D00830023E10AF0020A1
2075:1081C000400000000000000048080C50FB0930C0CF 2075:1081C000C00BF0023C008F502EC8068A02FC008DC6
2076:1081D0000F20028C40C30020C00A38034C44E10049 2076:1081D0002482D60832022D083A4022800D90036294
2077:1081E000AAC00E31438E00F3003C000F3003D202D0 2077:1081E0000040000000000000E8054C00B02028C25C
2078:1081F0000000000000000000404DBC00FF203FD008 2078:1081F0000804028C00130228C00B30020C3093805C
2079:108200004F7003FC00FF003DC00FF343FC40D7005C 2079:1082000024D0092002CC00914008C02A1402810029
2080:10821000BFC00DF4C3FC40FF003F400FF003D00689 2080:10821000900068000818023A0050000000000000BA
2081:108220006000000000000000A805EC00FB0032D058 2081:1082200070011E00B4A021E008C8129E00B3822194
2082:108230000D9001EDC0FB003EC01FBA03ACC0C800EA 2082:10823000E00B7A0A1E0097802DE10A4802CE409595
2083:1082400032E08DB443EC00FB0036A00CB0036A00B2 2083:108240009029E40858029A00B78821E00958025C96
2084:10825000700000000000000048119C00B70021C819 2084:1082500000400000000000004A000C00F08038C41C
2085:10826000086002DC20B7002DC00F74A21C28D600C5 2085:108260000C25038C20930038C40FB0030C80D3007E
2086:1082700035C00872025C08B744A180487002120041 2086:1082700034C00D0413CC0899002AC00E21038804D1
2087:108280006000000000000000C0009E00B78020E4F5 2087:10828000F30038C00C11831202000000000000004F
2088:10829000097826DE00B7802DE20A70128C88818072 2088:108290004215BC00F4003FC30EC0031C00AF4A7F70
2089:1082A00021E0097802DE00B3A025A028780270043E 2089:1082A000C40FB203FD01EF103F840FC003FC00E9CF
2090:1082B00020000000000000004814CC01BB8020C05A 2090:1082B0000037C20EF1477C00F7003DC00F5003D0DD
2091:1082C000083042EC00B3002CC00A30220C009300AE 2091:1082C0000660000000000000AA15EC08F8003ECA95
2092:1082D00024C1083002CC00B30020E008B002120430 2092:1082D0000F9003EF21FB807A408FB2A12F00CB607B
2093:1082E0003000000000000000E815A800FA08B28085 2093:1082E0003EC00FB003EDA0E93032C02DB003E40072
2094:1082F0000DE203E800FA003F800AA003A800CE5078 2094:1082F000F8003E000FB003EA00700000000000002C
2095:10830000328005A003E800FA0037A80CA0037A0425 2095:10830000C8919D00B4012DC80B7002CC808F202134
2096:10831000600000000000000048006008F8003C0019 2096:10831000C08B76035D00870A2DC00B4022FD008DC7
2097:108320000F8801E000F8043C004F0013C000F80083 2097:108320001023C8085012D400B7002DC00B7002F201
2098:108330003E000F80036000F8023E010F8003D20070 2098:10833000046000000000000081009E00B4802DE079
2099:1083400030000000000000000810E400F990124026 2099:108340000B7C02DE40A7822DE00B3A028E00879064
2100:108350000C9003A400C9003E700E94332408C90099 2100:108350002DE00B58025E00A5A265E0086882DA00F5
2101:108360002A400B9003E400F9003A400F9003020406 2101:1083600095802D600B7802E00020000000000000E6
2102:10837000300000000000000080046400B942226068 2102:108370000884CC00B0092CC00B3802CC0083002E3E
2103:10838000081002240089032E40089002A4018104F1 2103:10838000C00B30424C0083002CA00B0402CC0081B7
2104:108390003E400B9002E400B90222400E9002200001 2104:1083900000A0C008B006CF80B3102CC40B3102C3BC
2105:1083A000100000000000000018052400B9402A4A0F 2105:1083A0000430000000000000E805A800FE803E80C8
2106:1083B000089102A40089002E401A900A2404890022 2106:1083B0000FE813E800EA003FB00FA003A802C200D4
2107:1083C0002A400B9002E400B1002A400B9002060004 2107:1083C0002F880FE003E800EA0036000CE003F920F4
2108:1083D000400000000000000008040400B101A848AB 2108:1083D000DE803FA04FA803FA046000000000000008
2109:1083E000889002048081402C5018140A841089401F 2109:1083E0004800E000F8103C100F8083E100E8002214
2110:1083F0002C400B1002C400312020400A100A020158 2110:1083F000060F0013E001F8003E000F8083E000F854
2111:108400000000000000000000B80D6140F0503A008C 2111:10840000003E000F8423E000F8003E100F8003D2EE
2112:108410002CA002A142C8003E00DE002321428800B9 2112:1084100000300000000000000800E400F9103E44B5
2113:1084200038140F8503E140F85038140F05032E016E 2113:108420000D9003E400F9003E400C90122400F91076
2114:108430005000000000000000981DE408FD003644D4 2114:1084300032408F9003C400C90032100C9C0124000C
2115:108440000FD0036440F9003D500F9403E5007D40D8 2115:10844000F9103E700F9002C20430000000000000DE
2116:108450003E400F9403E400F9103F400E9003E60401 2116:1084500080146400B9C02E48089102E400B9002ECF
2117:1084600070000000000000001805E400FD403368C3 2117:10846000400D90036700B9802A600B9902E40081F7
2118:108470000CD003E781F90033780DD81326A0CDA0E6 2118:108470000022402C90122520B9482E520B9402E085
2119:1084800032400D9B032400F9A03C442C9007860049 2119:10848000001000000000000018052400B9002E4074
2120:1084900070000000000000003810E000B8A0A2103A 2120:10849000689046E400B9002EC0089002A460B900BC
2121:1084A0001880038284B880362C2E0F02A3A0D8E057 2121:1084A00022480B9006E4028900A040089002A61022
2122:1084B00036228B080342A0F8E02E28088802CE045A 2122:1084B000B9000E400B9002C6004000000000000012
2123:1084C00030000000000000000805C400B100A0500A 2123:1084C00008040480B1002C48081002C484B1202C98
2124:1084D000283002C580B10820400910A24408814814 2124:1084D00040091202C480B12028400B1002C48089D8
2125:1084E00020400B14020480B1382C4808128282010B 2125:1084E0002020404B120A8484B1202C488B1002C2F9
2126:1084F00070000000000000001811A400B10022402C 2126:1084F0001100000000000000B80D6140BA002E001D
2127:10850000089202E400B90226584A9002E408994011 2127:108500000C8003E808F8503E140C85032000B800E6
2128:1085100026400B90026408B9012C48089012C6044A 2128:1085100032000FA003E140C85032140CA503A14063
2129:108520006000000000000000A015E400F980324067 2129:10852000F8003E000FA003EE035000000000000022
2130:10853000089883E404B90130400D900B6402C9002F 2130:10853000880DE440FD003E440FD003E440B9113FF4
2131:1085400032400F90032400F9001E580C9003A80439 2131:10854000400F91036444F9103F400FD003E440FD15
2132:1085500070000000000000002801A400F9203C4049 2132:10855000103F108CD1037440FF103F440FD003E64E
2133:108560000F9803A400B9003E428E104B8404F9001A 2133:10856000067000000000000008056620ED00336979
2134:108570003E408F9003E400E9003E400F9003CA00A4 2134:108570004D50435600F9A034400F9A0B3400DD8073
2135:1085800060000000000000002810A000D8003208A1 2135:108580003B400B5003E400F90032E00ED003F4004E
2136:108590000F8483A004C8043E008380012000C00033 2136:10859000FD003F400CD003C600700000000000004A
2137:1085A00032000F0003A000C80032104E8013CA042E 2137:1085A0007810E280880422100B80022009B8F022A3
2138:1085B0002000000000000000280528008E90A38005 2138:1085B000000B8E12A000B8522E000B8002E005B80E
2139:1085C0000BE4022800CA002F804AA013A800AA00CA 2139:1085C000AA233E0D8002E000B8003A00088002CEE7
2140:1085D00036810BA00228008A00228008A0038A00AE 2140:1085D00004300000000000004805C420A900A444A5
2141:1085E000400000000000000028054C0093C020D08F 2141:1085E000099002C500A1082C400B11820400B100C3
2142:1085F0000B34028C008B002CF08B18024C00830093 2142:1085F00028400A1042C400B500A140081002C4007F
2143:1086000060C00B30028C02830028C10A3002CA000D 2143:10860000B1012C40081020D20170000000000000D1
2144:108610005000000000000000A0011E00B40B69C063 2144:108610001815A400890422400B9000AC0039002AF0
2145:108620000958061E8097102FC24870829C80A708A8 2145:10862000400B1002A400B9002E480B9012E400B9D0
2146:1086300025CC0B70021E8187A2ABC4087302E80030 2146:10863000002160099222E428B9000A50089006C679
2147:108640004000000000000000A8083E10DC8421E08B 2147:108640000460000000000000A015E400E9003640CE
2148:108650000F78429F02C7883DE02F71034E00CF8004 2148:108650000D9003E400F9003E480F90032400D90078
2149:1086600021E20F78839E49CFD039E80E7803EA02E1 2149:108660003A780E9803E400B900B2400E9223E60077
2150:108670000000000000000000084DAC40CA003600B9 2150:10867000B9503E702C9003E8047000000000000028
2151:108680008F3023ECA8EB403CC00F9643ED80FB00FD 2151:1086800068018400F9003E404F9C236400F90436E1
2152:108690003ED88FB143ED80FB2036CA0FB0A38206CF 2152:10869000480F9003E400F9003E600F9203E400F9F4
2153:1086A00060000000000000000005FE80FC8031E05A 2153:1086A000003E408F9083E444F90078640F9003DA31
2154:1086B00005AA10FE44FF903FE1CFF9173F20D78075 2154:1086B00000600000000000002810A000F8003E004C
2155:1086C0008BE40FF8033E30FF8037E00FF8004000E6 2155:1086C0000F8203A040E8003E000D800320C0C88058
2156:1086D0007000000000000000A8119C00BD1021C027 2156:1086D0003E120F800360007C0033000D8013E01019
2157:1086E000084A02DCC0B7002DC20CD3021C808700F0 2157:1086E000C8643E080C8203CA042000000000000099
2158:1086F00029C04B72021C00B70121C00BF0122A04E2 2158:1086F00028052800B6E00FA00B60823800AA002EE3
2159:10870000600000000000000000009C903400218008 2159:108700008008A042BA00AE202F880BE5022800BAEC
2160:108710000970005C0CB7002DC408501A0C009700BB 2160:10871000D8378008EC02F8048E002F900DE002CAD2
2161:1087200021C04B30021C00B70025C00B7002400076 2161:10872000004000000000000028054C00B0242C6030
2162:1087300020000000000000002014CC00B000600009 2162:108730000B38028E80AB002CC00930020D0800807F
2163:10874000083E02CC00B3020CE02BB0020C009300F8 2163:108740006CD00B3402CC00B8C02000483412CC40AE
2164:1087500028C00BB0022C10B30020D603300208044E 2164:1087500083002CE00A3502CA00500000000000002F
2165:108760003000000000000000A815BC00FB00B200B3 2165:10876000A0011C40B7002D028B60029E0087202FC5
2166:1087700005BE037C00FF003E200CB0033C00D98006 2166:10877000E00872029E00A4002DC00BF8029CC0B35A
2167:1087800033C08BF0033C00FF0037E00FF0036A04B6 2167:1087800002A5C0085086FE0087002FD0097002E8BD
2168:1087900060000000000000008000EC00FB043E00D0 2168:108790000040000000000000A8081E00F4803D20FA
2169:1087A0000FA423CC00FB003E81089003EC00E914E9 2169:1087A0000F58039E0067803DF80D38021A10448070
2170:1087B0003EC00FB003EC10FB003EC00FB003E00062 2170:1087B0003DE00F5803DE20B48033A02C6803D600C0
2171:1087C00030000000000000000110FC00FF003780B6 2171:1087C000C7813DE00C7803EA0200000000000000D1
2172:1087D0000FFA03FC00CF003F9006DC233C00FD10A5 2172:1087D000081DAC08F8003E008F80036C003B123E81
2173:1087E00033C00FF00B3C00430033C00FF003C04414 2173:1087E000CA0FB503C800F8047EC00F90036C80FB6D
2174:1087F000300000000000000081006C09BB1922322B 2174:1087F000043A400F9023C800F9013CC00FB003C2F7
2175:108800000BBE036C008B002C900DB802AC00B100C5 2175:108800000660000000000000C005FE00AC9031488A
2176:10881000F2C00BB012AC008B0022C00BB003A04022 2176:1088100008F803FA00CF803FE00CFC133E04FC8014
2177:10882000100000000000000080052C10B30026207E 2177:1088200035A00C7803BE00DF803B2024F8032E40E7
2178:108830000B9012EC018B002AC20A90022C00BB00A4 2178:10883000CF8033E003F903D0007000000000000097
2179:10884000A2C00BB0022C00AB002AC00BB002E000AB 2179:10884000A811BC0080000100087202D00087002D32
2180:10885000400000000000000008040C01B3002000EC 2180:10885000C80AF0029840F50061410074021C00B49F
2181:108860000B00028C0083002EC00B34028C00BB0076 2181:108860000021C80860023E20860821D80F5002EA85
2182:1088700020C00B30020D00A300A0C00B300282010B 2182:10887000046000000000000018009C00A40021001B
2183:108880000000000000000000000D6C00BB043680FA 2183:10888000085002D80097002DC08871021400B00073
2184:108890000FB202FC02CF0238C00EF0033C00FB0016 2184:10889000259008C0829C40930029A1886002141290
2185:1088A00023C00FF0033D02EF0033C00FF043C003BD 2185:1088A000874029400B6002C4002000000000000047
2186:1088B0005000000000000000A01DFC00FF003F0071 2186:1088B0006014CC0080D0A000081C02C00093002CE3
2187:1088C0000FF4237C00FF003FC00DD003FC00FF002D 2187:1088C000D00AB0268000B30024E40808028C00B06F
2188:1088D0003BC00FF003FC88DF003FC00FF003A80689 2188:1088D0000202410808020301810028421A0042D81E
2189:1088E0007000000000000000C005F050CE1233D030 2189:1088E0000430000000000000F815BC00E8C0328031
2190:1088F0004C868330805F6833C40FF3833CC0CC3830 2190:1088F0000CB503E4009F003DE00CF00B2400F800F1
2191:10890000B3080CC603F1A0FF0033240CC203F0002F 2191:1089000036E00C2503BC05D8022A0008BA022A006A
2192:1089100070000000000000008010EC80D22023D8FE 2192:10891000C1023A508B9003EE04600000000000009A
2193:108920000D96028860AF4023DC0BF6023CC28860E3 2193:108920008000EC00FB083E800FA103EC04EB022E5C
2194:108930002252089122E100B724A2488A848260046E 2194:10893000C60FB0174400E8003A400F80026C00FBFD
2195:1089400030000000000000008805C4008100E0C481 2195:10894000003EE00F9093E100D90026708F9001E186
2196:108950000A00020480A320A8C01B300A0C00A0005B 2196:1089500000300000000000000010FC00FC03372481
2197:10896000280C090202C480B31C2208190302E21178 2197:108960000DF803E000FF003FC18DF00B3800CC0094
2198:108970007000000000000000C015A400998062C0D3 2198:108970003FC00FFA033C0CFC043B800CA003942086
2199:108980000BA032A451AB002AC08BB0000C00A9C0D0 2199:1089800089053B004FD023C00430000000000000E8
2200:108990002A2108B822E200BB0022841BA8427004EE 2200:1089900080046C00B006201388A802EB00BB002EF8
2201:1089A00060000000000000004015E200CBC932C0AA 2201:1089A000C008B0022A00A8802EE00B941A2C00BB4D
2202:1089B0000E8B132210DB0132C00FB00B2C0068812C 2202:1089B00000A240299802E200A98422200B9802E03C
2203:1089C0003A222C8823E300FB0030308D9C83D004B6 2203:1089C000001000000000000080052C00B80022000C
2204:1089D0007000000000000000E001BA40F7043EC251 2204:1089D000098202E600BB002EC00BB0022600888090
2205:1089E0000DD823D8007B0037C00F7033FC10D200A5 2205:1089E0002EA00BA0022C00B3002A00099802EA2056
2206:1089F00035C08FC003F400F7023FE00E8003F8009B 2206:1089F000A9802A609B9882E00040000000000000EF
2207:108A0000600000000000000040108120C80830C055 2207:108A000008040C00B8002000090802C400B30026C6
2208:108A10000C00832440C3893AC00EB00B2C08C9480F 2208:108A1000C0003002000081002C410B00020C00B0AD
2209:108A200072540F9103ED02EB8A3A628C800B1004B2 2209:108A20000020C00B0002C880A80020410B1002C229
2210:108A30002000000000000000C8052B048840A3C2ED 2210:108A30000100000000000000000D6C10F850B200B2
2211:108A400002AE1227428F4423C20BF4023D000A40BB 2211:108A40000D8003E000FB003DC00DF0132402C806BA
2212:108A500022E00BB502EC208F44A2408DBD233200F2 2212:108A50003E800FA0033C04FB0078800CA003E400E0
2213:108A60004000000000000000E0054940838124C16F 2213:108A6000E9001A400F9003C003500000000000000E
2214:108A700008280201009300A0E80A30828F60B390BA 2214:108A7000A01DFC00F4203F000EC002F001FF003FEB
2215:108A800060B80B28124A0093002090092002780059 2215:108A8000C00FF023F000FD003FC00FC003FC00FC4E
2216:108A9000500000000000000020011E0287A825E011 2216:108A9000003F409CC003F040FD003F400FD043E842
2217:108AA0000A7B021A04878021E40B78828E02969159 2217:108AA0000670000000000000C005F000ED23B7488C
2218:108AB00021210B6940DB40979223A089588208004E 2218:108AB0000CE1C37CC0DD8037E00FCB03FE08FC284F
2219:108AC000400000000000000048082582C30034C0B8 2219:108AC0003FF01CFB237C01FF1477E24FE8237C007E
2220:108AD0000C9B4308D0D32038C00EB0038C00B300E9 2220:108AD000C48033482CF822300070000000000000F1
2221:108AE0002080071003E000D31038180D3003520225 2221:108AE0008010E0E0C9C0225B8896222D00892222F6
2222:108AF0000000000000000000401DB4007F201BD0DB 2222:108AF000CA0B9E22E2A0B9612CE0889F023D85BF8F
2223:108B00000FF103F840EF003FC00FB4037C20CF0407 2223:108B000060265048A0023C008800225008B0022095
2224:108B1000BF400FF003E410EF183DC00FE003D00694 2224:108B100004300000000000008805C080B11020442F
2225:108B20006000000000000000A805E800E300B2C4F7 2225:108B20000BB202CED081082CC00B01028C08B30816
2226:108B30000CA0032400DB6832C80CB403EC80C880AE 2226:108B30002CC90810628C60B33224800AA0026C0336
2227:108B4000B6E00CA0032E00CBE0B2600CB80B2A00FC 2227:108B40009A01264448B04262017000000000000013
2228:108B5000700000000000000048119C028700A1C8BE 2228:108B5000C015A4A08B0222E00BB062AC9899002A49
2229:108B60000870021C08970221D4087402DCC00700B8 2229:108B6000C20B9806E400BB022EC00891422C10BB39
2230:108B700021C08870021800830821C0085002120426 2230:108B7000006E800A80026C001B00064048B80A7034
2231:108B80006000000000000000C0009E20AD8029E0D1 2231:108B800004600000000000000011E700A1007678FA
2232:108B90000858021E0097B021E8087802DE10158000 2232:108B90000FB003E810D9003ED04B9E13AC08B8A02C
2233:108BA00021A10848025E0087A465A0087802300071 2233:108BA0007EC608A8022C01BB0026304E20034C18BC
2234:108BB00020000000000000004814CF108170A8C001 2234:108BB0009980B4404C3A034004700000000000006B
2235:108BC00038300A0D009300A0C1283002CC028388FF 2235:108BC000E001B200FDC53BC04CD0036A02ED0633A4
2236:108BD00020E038340A4D72830024E82834821204DD 2236:108BD000C40FD053F800FC907FC10F7803BC04FF92
2237:108BE0003000000000000000E815BA40EEC0BA8076 2237:108BE0000037640CF103A400EDA13B400BF083B807
2238:108BF0000CE0033910DA0032800CA003E800DEC874 2238:108BF000006000000000000040108C00CB203E719F
2239:108C000033A00CE0037B00CA0037B10CE4233A0424 2239:108C00000FB3039802FB0236480F9003EC20F800E4
2240:108C100060000000000000004800C100F8003600BD 2240:108C10003ECC0484032C00DB043C100FA003EC00CA
2241:108C20000F8003C02038003E000F0003E000F80270 2241:108C20009B0032400C9003D00420000000000000A4
2242:108C30003A240F8083A001F8043A040D8013D20077 2242:108C300088052C028B482EE00B34036B008BF52249
2243:108C400030000000000000000810E444C100324081 2243:108C4000F20B9C03AF00B8502EC008B0027C008F1E
2244:108C50000C9032240CC10638400D90090400D90054 2244:108C5000000E5D0B8002F54083502354089C02E611
2245:108C60003E400F18032400F9013E400F9003C20458 2245:108C60000040000000000000E0044C0081812E4024
2246:108C700030000000000000008004640689002A50D3 2246:108C7000032C020433990020F04A2880CC40B00035
2247:108C800008940A2400894222500A90122500890083 2247:108C800026100820024C0083002CC0092002CC00D2
2248:108C90002E500B9C0A2510B9002E500B9002E000BC 2248:108C9000A00228400808027A0050000000000000EE
2249:108CA0001000000000000000180524208900204268 2249:108CA00020010A0085802DF80BDA02D64085A0212C
2250:108CB0000810C2AC1089082A4209900224209900A9 2250:108CB000E00B48069204B5802D210800024E008783
2251:108CC0002E420AB1822C20B9006E420B9002C600DF 2251:108CC000A42D600B6802DEC2AD902B60285882DCB8
2252:108CD0004000000000000000080404008300284851 2252:108CD000004000000000000048084C40C3102C6C0D
2253:108CE0000812628C80810020400210028480812062 2253:108CE0000F300386A2F9B0B0E00F2983CE44F380A1
2254:108CF0002C490B12060484B3026C400B1202C20111 2254:108CF0003CAC0C30030C00C3003CD50F2003CEC1AC
2255:108D00000000000000000000B80D41E0C8783014F9 2255:108D0000E010B8400C0003D2020000000000000098
2256:108D10004C0513A142C078381E0D87830140D05006 2256:108D1000C01DBC00EB003ECC0F32036408F9003BE1
2257:108D20003C140E05030140F8783C140F0503EE03D4 2257:108D2000900FF043E440FB343F8107D103AD20EBCB
2258:108D30005000000000000000981DFC00FF000E44E1 2258:108D3000207FC40FE103FC50CD1035400FD003D08D
2259:108D40002FF1037440F9003E400D90036440FD1084 2259:108D40000260000000000000A805E404FD043D40AE
2260:108D50003F440FD101F440F9013FC00FD103E606B3 2260:108D50002D30023C00C9013EC04FB843EC10FB006F
2261:108D600070000000000000001805E622E988B2400B 2261:108D600032400FA023EC80CB3632804DA8032C106C
2262:108D70000F90032416C98C367B8F9C83A790C90063 2262:108D7000CB0032400C90036A00700000000000003D
2263:108D80003E500494132450C9E03E500F9003060057 2263:108D8000C8119008B5002DC0085002BC0285042D02
2264:108D900070000000000000003810E28088A0222847 2264:108D9000C08E6006D804B70421400B7002FC80AF7F
2265:108DA0000B8A022A8088A42230088E0A220288A018 2265:108DA0002821C00B70020640870021500850023273
2266:108DB0002E2888AA12229088F42E200BC8020E04B6 2266:108DB000046000000000000080009E20B7802B703F
2267:108DC00030000000000000000805D420A508214262 2267:108DC00008F8061E0087802DE00B7032DE04378421
2268:108DD0000B50821431850825400A502294408508A2 2268:108DD00025E00B6806DE80878021A11B68021E400B
2269:108DE0006D40085002540295002D480B50824201FC 2269:108DE0009F80206008580220002000000000000042
2270:108DF0007000000000000000181584008D10234052 2270:108DF0004814CC20B3002C8088B4228D0083902CA2
2271:108E00000BD00034018D00234158D00234008D086E 2271:108E0000C00A3802CE08BB2024D00BB302CC00A38A
2272:108E10002F5008D20274809D002F480BDC024604BC 2272:108E10000060D20B202A04089350204008170A0251
2273:108E20006000000000000000A015E740E9C03240EB 2273:108E20000430000000000000E815BA00BAA03F843A
2274:108E30000F90092600C90436401F9023A408C9409A 2274:108E30001CE00B38408E062E800BE303F880FEE426
2275:108E40003E400C940B6420D9023E410F9403680409 2275:108E4000B7900FEC02E8008A00A3A009E4032A020D
2276:108E500070000000000000002801A400F9803E40DE 2276:108E5000DEC0F3800C6C033A0460000000000000E8
2277:108E60000F1403C508F9003E401F9023E400F900E9 2277:108E60004801E000F8403E000F8413E000F8002EB7
2278:108E70003C40AF98038600E9003E400F100B8A008B 2278:108E7000300A8403E004F8003A020F8013E000F89F
2279:108E800060000000000000002810B000DC40B300CB 2279:108E8000003E040D8083E040E8203E002F8003D2A6
2280:108E90000FC0033102C404B1003C40031000FC4089 2280:108E900010300000000000000810A400F9003C643D
2281:108EA00033000CC403B100CC00B3000CC403CA04EB 2281:108EA0004E90832480C90032E00F10032500F900A2
2282:108EB0002000000000000000280528008A8022A071 2282:108EB00032440F92236400C10032400C9013E4004E
2283:108EC0000BA0022A008A8422A108A0022808BA0165 2283:108EC000C90022400C9003020430000000000000A2
2284:108ED000228008A02B28008A802A8008E002CA008D 2284:108ED00080046400B9202E404896222500D9C0A203
2285:108EE000400000000000000028054C029B8120E0AB 2285:108EE000700B98022400B940A2704B90022400D964
2286:108EF0008B3806CE00938020C00838020C00B38067 2286:108EF00000A2402C9422E4028900A240289413206E
2287:108F00006CE00AB0024C00930020E0083002CA0076 2287:108F0000001000000000000018012400B9002E40ED
2288:108F10005000000000000000A001100480082102A1 2288:108F10000A900204008180A2440B910225001940AE
2289:108F20004B4406D020900821028044021000B4C0B7 2289:108F200062400BB402440089002040089082C401D2
2290:108F30002D10484002000094892930084002E800C2 2290:108F300083022840489082060040000000000000A4
2291:108F40004000000000000000A8083200D68031A0D8 2291:108F400000040580B1006C5108141A05009300203C
2292:108F50000FE80BCA00D68023A004F80B1A00FF808C 2292:108F5000408B14020500B12020500B1406048091B0
2293:108F6000BFA02EC813DA025E8073A02C7803EA0239 2293:108F6000202040091002C4A88100284A08904A42E3
2294:108F70000000000000000000081DAC00F9003E40A9 2294:108F70000100000000000000B80D6000F8003E0095
2295:108F80000F90032400E9003E400E8003E400F80047 2295:108F80000E80032801C85032948BA0032000B050FB
2296:108F900032400FB003E401E90436400F8003C206FB 2296:108F900032800F80076151C85022000C0003E0842A
2297:108FA00060000000000000000005FE00CD8033607E 2297:108FA000C8043A080C00032E035000000000000023
2298:108FB0000CD8433600CD8033600CD923BE004D80E1 2298:108FB000989DF440BD413F500FF403F510FD003E75
2299:108FC000336008F80B3E00FD843F600FF903C000DA 2299:108FC000400FD403F400FF102F404FD440A448F9C1
2300:108FD0007000000000000000A8119004DE00238053 2300:108FD000123F5A8ED283F4A8F52C374A0FD283A6BB
2301:108FE000086002B8208E04238008680210008E20DA 2301:108FE00012700000000000001805E680FD283F4CCC
2302:108FF00023820840021200F6002D800B41A0EA04F3 2302:108FF0000F50033C44CD403FD00DD0021401FDA0E2
2303:1090000060000000000000000000900084002100CB 2303:10900000314003D003E789F9907E500C9403E6C009
2304:109010000841025040940021000A5202D800850203 2304:10901000C910326D0F9102C6007000000000000000
2305:1090200025040840221808B4002D100B7840C00019 2305:109020003810E080B8012E0C8B8482204288A06E1C
2306:1090300020000000000000002014EE22930020C059 2306:1090300020088003600098E82200098002E3C0E86D
2307:10904000083802EC00930020C12A2002640282103A 2307:10904000D02E28088A23E284D8A0223D0BC802CE65
2308:1090500024F00A3C422428B3002CE00B8882C80488 2308:1090500000300000000000004805C5B0B1002C48F9
2309:109060003000000000000000A815AD00CB00B2C029 2309:109060000B13020402B1202E40881022C400B11458
2310:10907000ACBE036E02DB00B2C01EA003E400CA1146 2310:1090700024400B1052C400B1212D480A5202D500E1
2311:10908000B6D0ACBC032400FB003EC0CF8403EA048E 2311:10908000BD00AD400B5202D2017000000000000094
2312:1090900060000000000000008000E040F8003C009C 2312:109090001855A500B9822E498BB012241099022EC2
2313:1090A0002F8203A000E8003E001D9013A800F900E5 2313:1090A0004008B200650099802644099102E409A9AC
2314:1090B0003A00818343E800E8033E040FB003E00078 2314:1090B000042E460AD402B400BD402F400BD002C695
2315:1090C00030000000000000000110E000D6003780F2 2315:1090C0000460000000000000A015E740F9802E6257
2316:1090D0000CA003F800CE0033800DA0132008CE00B2 2316:1090D0000F9C42240099012E682C92026400B94032
2317:1090E00033820C40733018CE001F804FC1430044C0 2317:1090E000B6600F9A03E400B9002E703E9906E402C0
2318:1090F000300000000000000081047C008D0023404F 2318:1090F000F9003E400F9803E80470000000000000F3
2319:109100000AD002F4008D00234008D4803E428D40F6 2319:109100006801A600F9003E401F12ABE400E9903E62
2320:10911000234008F0023E408D000F400BF402204037 2320:10911000490E9803E400F1003A400D9803E400F989
2321:10912000100000000000000080052C009900A640FF 2321:10912000013E60059013E400592032408F9103DA2C
2322:10913000089006E400910020408800022408804046 2322:1091300000600000000000006810A000C8083E01A8
2323:1091400020400AB002240089000E400B8402200057 2323:109140000F84630022E8203E130F8403E1C0D84C53
2324:1091500040000000000000000804000082002080A1 2324:1091500032000C8443E000F80022100F840300006A
2325:109160000A2106C801820020800832820808830094 2325:10916000C800B2000CC0030A042000000000000088
2326:1091700060800A0012088082002C800B300A0201F5 2326:10917000280528008E002F864BE00239088E202D0E
2327:109180000000000000000000000D6000D800360064 2327:10918000900BED92F8028EE0A39808E002E808BA8E
2328:109190000C8423E000C80032000D820B2002C800BE 2328:1091900000628008A00228000280028048E0034AA2
2329:1091A00032000E00032002C8003E000F80030003BF 2329:1091A000004000000000000068054C0083102CF017
2330:1091B0005000000000000000A01DFC00BF003FC0E8 2330:1091B0000A142A0D1AB30124D00BBC32CC080300C8
2331:1091C0000FF003FC00FF00BFC08FB003FC08FF02DC 2331:1091C00020C80B3002CC00B30222C00930020C11BF
2332:1091D0003FC00DF003ED00FF023FC00FF003E806B3 2332:1091D000830020C02820020A005000000000000088
2333:1091E0007000000000000000C001F08CFF003D6036 2333:1091E00020011E0185002D000B7002183286002D13
2334:1091F0002CB2837C90DF3831E00FF8033C00FF2075 2334:1091F000C00B6016FE04860027A08B7042DC80B78F
2335:109200003FC40EF4037C00F48033000DF803F0003B 2335:1092000080210108F80A1800860820A008E80A68EA
2336:1092100070000000000000008010E120BB622E42C0 2336:10921000004000000000000028083E02C6803DE03B
2337:1092200028F4423E408F4422E00BB0837F44BFC10C 2337:109220000F48030604F58235E00F7803DA00D38097
2338:109230002DDC2AF6023F45B880226188B802E0049E 2338:109230003160077803DE20F3B081E04F68070E024B
2339:1092400030000000000000008805C580B2182EC85C 2339:10924000CF8031E00C78132A0000000000000000FD
2340:109250002930320C08B32020C04B92020C00B340DE 2340:10925000081DADA0F9003F000FB053F810A9003E63
2341:109260002CC08934124C00B00024C1493002E20104 2341:10926000000F8001EC00FB023AC00CB003EC00FBE5
2342:109270007000000000000000C011A400BA0C2EE035 2342:10927000743C000F2003E800FA003E800F3003C268
2343:10928000A9B0062C008B00A2C00B90006C00BB00A4 2343:1092800006600000000000004005FE028F8035E00F
2344:109290002EC00B30026C00BA8026F008B002F00439 2344:109290008DD9032EC4F68032A40CB803DE00CF9023
2345:1092A00060000000000000004011EE00FBC43E78AA 2345:1092A0003CE40CB803FE65FF800FEC8FF803FE0072
2346:1092B0002DB0036C08FB0032C08B24832C00FB0014 2346:1092B000C58033E00F68031000700000000000005C
2347:1092C0003EC08FB00B6C08B2E016608DB023D004A6 2347:1092C000AA119C8084B0202029730A0E82A2A0A239
2348:1092D0007000000000000000E001BE98FF403FC0A9 2348:1092D000A04F3B038784B2802CA00A7D02DE80F77A
2349:1092E0000E7003DC00FF003FC00FE003FC00FF0036 2349:1092E000202506087002C840840035800B60036AA0
2350:1092F0003FC00EF003AC00FE00B9C00FF003F80051 2350:1092F000006000000000000000009C10863827C0BD
2351:1093000060000000000000004010AD00FA403ED0B8 2351:1093000049540654401D2021CA096140F880B72005
2352:109310000EB203EC00C3003EC00CA0032C01FB0006 2352:109310002F00897012DC81B7042DC90A6002CC00CD
2353:109320003CC00EB803EC00DA003AD04FB023D004B2 2353:109320008D002DC00BF8020400200000000000009A
2354:109330002000000000000000C8052C00BA002CC06E 2354:109330006014CD288000240009B0224C02A1012035
2355:1093400008F407BC14DF003EC01AA052BC00BF04E2 2355:10934000301B2302AF20B3082C801B3000CC04A3B9
2356:109350003FC08AF003BC00FA0022C80FB003F2003D 2356:1093500001263008AC22E80280082E804BB4025867
2357:109360004000000000000000E0054801B1006CC2B0 2357:109360000430000000000000A815BC108B8036F00F
2358:109370000A3042CC0083052CC00830028C01B304B3 2358:109370002DBC0B6C01DA0422407D9422E400AB4446
2359:109380002CC00A30228C00808028C00B3022F800CC 2359:109380002EC009B802FC00BF003EF0CA9202E402FF
2360:10939000500000000000000020011E08B7806FE0B0 2360:10939000CB006E400F84012E04600000000000002E
2361:1093A0001878028E40B7802DE00A78029E00B780C0 2361:1093A0008000EC00FB003AE02EBC039808EA40364F
2362:1093B00029E10A78029E01BC8029E40B7802C800EA 2362:1093B000438C9003A4442A403E100EB583EC14FB6A
2363:1093C000400000000000000048080940F1203CC4B3 2363:1093C0000026000E9203E040FA0016000F8013E022
2364:1093D0000E3902CC00C3002CC40892038C88B31051 2364:1093D00000300000000000000110EC02FA803FE2C3
2365:1093E0002CC40EB0078C00C20838C00F3043D20224 2365:1093E0000FB00B2400EF92BBE01CD0037400CF053C
2366:1093F0000000000000000000401DBC10FC007FC009 2366:1093F0003B400FC8035C00CF0032C24DC123344054
2367:109400000FF083FC21DF083BC08F9001FC21FF0C93 2367:10940000CF0017440CD1830004300000000000009E
2368:109410003FC20FF103EC00EF0077C01EF00390068F 2368:1094100081046C008B842E540BBC0A29808B803213
2369:109420006000000000000000A805E801F90032C05B 2369:1094200000089C03A700AB842E7C0B80022C10DB71
2370:109430000FB203EE90DBE13AC04D38132D30FB0044 2370:1094300001360008800220008200220008900224E9
2371:109440003EE04FBA432C40FA003FC08CB003EA0024 2371:10944000001000000000000080050C0089106690EC
2372:10945000700000000000000048119C00B10021C015 2372:109450000BB8026E12A34120040A9822E200891977
2373:109460000B7102CC20A72821C00B70135C08B71029 2373:109460002EC04B31226C08830022C00990022400D8
2374:109470002DC44B34831CC1B7022DC01A7002D20414 2374:1094700089002A400880022000400000000000000F
2375:109480006000000000000000C0009A20B4C425A2C3 2375:1094800008100C0080202C0E1B300204418020208C
2376:109490000B7806DE00838029E01BF8025E80A7A01F 2376:10949000121816420050A0402C881B30020C8193F9
2377:1094A0002DC80A72021E00A68028E0087802F0008B 2377:1094A00000240008102A000A8800280028000A0268
2378:1094B00020000000000000004814ED00B34024C369 2378:1094B0000100000000000000000C7C11E80026986C
2379:1094C0000B3042CC00A30020C01B34024C00B30080 2379:1094C0000FB013210CEB603AD82884A2E180C820A9
2380:1094D0002CC04B30020C00B3882CD40A3002D204CA 2380:1094D0003E5E1F82037C00CF0032C04D8007250016
2381:1094E0003000000000000000E815B800FE40B7A002 2381:1094E000C90032400C900300015000000000000051
2382:1094F0000FA003E800DA003A800FE2036800FA00E8 2382:1094F000A111FC00F8131E000BF001F0D0F9191FA8
2383:109500003E800FA00B2800EEE03FB004A003FA0459 2383:10950000084FC013A100F8623FC00BC407ED00FF75
2384:1095100060000000000000004800E004F0083A107D 2384:10951000003F000FC023F0A0FC0033000FD003E891
2385:109520000F8403E010F8003E004F8083E000F80055 2385:109520000670000000000000C005FC00FF0C3F209A
2386:109530003C000F80038000F8403E090F8003D200FA 2386:109530000CC9033200CF383FD00F4803FCA0CE2225
2387:1095400030000000000000000810E420E900324470 2387:1095400033000FC1033C00FF003DC44CC0238CE43A
2388:109550000C90032400F9003E400F9013E400B90082 2388:10955000FF10372008F103F0007000000000000049
2389:109560001E400C10032400C9A03C640C900382042C 2389:109560008010FE00BF802E74052202A210DF612F42
2390:1095700030000000000000008004640089002268C0 2390:10957000D08B90023DA4AA9022F40B07121D20BBB1
2391:109580000813022408F9002E481B9002E400B900D9 2391:10958000C02FD8889782FD80EF72220828F623E04A
2392:109590003E400C90022408F9402E600A9006E0003C 2392:1095900004300000000000008805CC40B3002C001F
2393:1095A000100000000000000018012400A900204065 2393:1095A0000882022200830108CC8B2082CC0090002C
2394:1095B0000890022400B9012E400B9002E400B9008B 2394:1095B00020004B12020D80B3402CD80820428C8032
2395:1095C0002E40089222240089002E40089002C600F6 2395:1095C000B3202602183326E20170000000000000DC
2396:1095D0004000000000000000080404808121E050E9 2396:1095D000C015AC09BB002E60088002A2009B002EC3
2397:1095E00028160A0480A1402C404B1422C400B1006C 2397:1095E000C00BAC022C00BA0622C20B9402AC10BB1A
2398:1095F0002C500914020404B1002C400A1002C201CC 2398:1095F000002EC108A802EC00AB00220008B006F063
2399:109600000000000000000000B80D6140E85032008A 2399:1096000004600000000000009015EC00FB043E60C8
2400:109610008C80022000B8003E000B8033E010F80080 2400:109610002882130E08CB003AC00F8C03EC11DB201C
2401:109620003E000C80032008CA003E000C8003AE03FD 2401:10962000B2904BA80B2C00BB002CC00C8813AC00D4
2402:109630005000000000000000981DFC40FD102F416C 2402:10963000F300360648B012C40470000000000000B9
2403:109640004F9103E440F9403E404FD063E500F940BC 2403:10964000E001BC00FB083D408FEA01F400FF012F60
2404:109650003A502E94036500ED003F500F9003E6064C 2404:10965000C00FD022FC04AF003FC08FE9037C00FFA5
2405:1096600070000000000000001815E600F9E033501B 2405:10966000003FC00F9043FC20EF023F008FF003B893
2406:109670000CDA03A600D9803F400F9103A600F988B9 2406:1096700000600000000000005010AC08EB00124039
2407:109680003E680CDE036600ED003B690C9003C600EB 2407:109680000F90032820AB003AC08F8583AC10F350B5
2408:1096900070000000000000003810E108B8E0202051 2408:1096900032904C34136C00FB003EC00C98032C40FD
2409:1096A000188E26E10080A02E004B8842E150B84081 2409:1096A000EB8032120DB00B500420000000000000CF
2410:1096B0002E2A0D0A022008B8002E140D8002CE04B6 2410:1096B00088013C100F05A2500C100222108F0023CD
2411:1096C00030000000000000000805C500B160204027 2411:1096C000C00B88123C009B8222C008B0023C008F75
2412:1096D0000831A2C50091482C401B12028400B10041 2412:1096D000A02FC008B0023C088F02200008F003262B
2413:1096E0002C500916020500A3042840081002C201EC 2413:1096E0000040000000000000E0054D20930020B283
2414:1096F00070000000000000001805A400B9082070E8 2414:1096F0000B10020100A30068C00B8402AC00B38011
2415:10970000289002E40089002E400B9002E408B9037F 2415:1097000020400A30024C00A3042CC00800020D00C7
2416:109710002C402990026400B9002E62099002C60410 2416:10971000A3002024083002380050000000000000A0
2417:109720006000000000000000A005E500F9D0B27064 2417:1097200070011C20978023600878123A00839129E9
2418:10973000089003E400D9043E400F9003A410F902FE 2418:10973000E40B59021E00979020FC0A78021E008755
2419:109740003E400D902B6400E98D3A600C9003E804D4 2419:10974000902DE01959021E80838061A008780218CC
2420:1097500070000000000000002801A400F9803E42D3 2420:10975000004000000000000048080C40D3323006F2
2421:109760000F9003E400F9003E400F9A03E400F90073 2421:109760000F30030464E30138C41F30078C18F10084
2422:109770003E402F1003A400F9223C404F9003CA0042 2422:10977000304C0E30034C00E3002CC00C20030E00D4
2423:1097800060000000000000002800A000F04032004F 2423:10978000E30032080CB103120200000000000000E8
2424:109790000C8003C000F80032201F8003E000C800E6 2424:10979000401D9C80EF103D444FF107CC00FF083680
2425:1097A00032000C80022000C8C03E000C8003CA04B6 2425:1097A000C6CFB003FC009700BECC0DB103FD04FF93
2426:1097B000200000000000000028152810BA0023A097 2426:1097B0000C3FD29EE04BFD20FF023F800EF013D005
2427:1097C0000AE402E800BA002BA10BA002E800AA00FC 2427:1097C0000660000000000000A815ECC0CB283EC0D9
2428:1097D0002A810AA003E808DE002E800AA002CA003F 2428:1097D0000F8003EC00FB0132E90C28032C00FB0096
2429:1097E000400000000000000028054C00B304A0B1B8 2429:1097E00032C00CB4832C01EF00B2C80C20036D0012
2430:1097F000083622CC00B30020E40B3002CC008300FA 2430:1097F000CB103E000FB203EA007000000000000032
2431:1098000020C00818020C0091012CC0083006CA00C4 2431:10980000C8919CC487602DC00B6002DC00B7122099
2432:109810005000000000000000A0011CC8B32121C2BC 2432:10981000CC0A70021CC0B300A0C0C870221C80B764
2433:109820002A7002DC00B7A029C00B7202CE00A7810B 2433:109820002421C84850020C8087102D400B7282F210
2434:1098300029C04A7402FE0097012CC00A7012E80089 2434:10983000046000000000000081008E0287802DE09F
2435:109840004000000000000000A8081E80F7C031E0C2 2435:109840000B7812DE00B7A021E008F88E1E40B78822
2436:109850000C4803DE11F78021E00B7A03DE00C380A1 2436:1098500021E00838021E40B3A120E848F8825E02E9
2437:1098600033D86C78033E00D6803DE00C7803EA02E2 2437:1098600087802D220B7902E000200000000000001C
2438:109870000000000000000000080DAC08FB803EC0A6 2438:109870000804CC0483022CD40B3002CC00B300A02B
2439:109880000FD003EC04FB3C3EC00FB6076C01FB009D 2439:10988000C08A38060C00B38020E14839122C00B39E
2440:109890003ED00F9407EC01EA003EC00FB003C206B1 2440:109890000022C008B0826C0083002C480B3002C24A
2441:1098A00060000000000000000001FE00CFA43B604B 2441:1098A0000430000000000000E805A800CA003FA046
2442:1098B00008D9037E00CF803F254FFC87BE00CF80B4 2442:1098B0000FE403D800FA0032800CE8032800FA40D5
2443:1098C0007FFC0CFC037C00F69033E00FF803C00033 2443:1098C00032A82CA0092808F20032800CE4036800BA
2444:1098D0007000000000000000A8119C088F282140A3 2444:1098D000CA003F800FA003FB0460000000000000EE
2445:1098E00008D0021C40A72031041B7802DC80D7007E 2445:1098E0004800C000F8013E120B8003E040F8003E43
2446:1098F0002FC41AD0021E48B60061C00B7006EA04DD 2446:1098F000004F8403E004F0083E004F0003E000F84E
2447:10990000600000000000000000008C008730694407 2447:10990000413E002F8403A000F8003E000F8003D2E8
2448:109910000850220C0087012D448B70068C108700A4 2448:1099100000300000000000000800E600C9123E50C0
2449:1099200029C90850021C44A60061C00B7002C00087 2449:109920008F9083E420C1003A410F9003E400F900D6
2450:1099300020000000000000002014CD00838860405B 2450:1099300030680C90032400D9003A400E98032400AC
2451:109940000010024C002B002C411B3002CC00930075 2451:10994000C9903E690C1003020430000000000000C2
2452:109950002CC00A30420C00B24020F10B3002C80487 2452:109950008004674A89802E500B9002E480A900227F
2453:109960003000000000000000A815BD41CFC0BAF0D3 2453:10996000400B9002E400B9012240089002241089C3
2454:1099700028901B6C08CF002CC00FF003AC008B00AC 2454:10997000002240089302242289422C604890022051
2455:109980003FC06CB04B2C01FB4022C80FB003EA046F 2455:1099800000100000000000001815240099002E406F
2456:1099900060000000000000008000EC04FB043FD4E5 2456:109990000B9002E40089002A400B9002E400B90019
2457:1099A0000F1003AC00FB0032C05FB003EC00FB04FF 2457:1099A000234008D002240099002A400A900624404F
2458:1099B0003EC04F1013EC00FB883EC04FB003E000E8 2458:1099B00089412E400890020600400000000000008F
2459:1099C00030000000000000000110DC00C70033621E 2459:1099C00008040C8091202C480B1002C400A1202018
2460:1099D0000CC00B3C00EF0033E01CF0133C08F70018 2460:1099D000480B1002C480B120A14908524A0480817A
2461:1099E00031C00ED803BC00FE003DC60CF003C044DD 2461:1099E00000204848120A048081202C4028120202DC
2462:1099F000300000000000000081046C00CB0322470F 2462:1099F0000100000000000000B80D6008D8043E809F
2463:109A00000898422C009B002AC00AB0022C00BB041C 2463:109A00000F8503E000C0503A140FA503E140F802AF
2464:109A10002AC00AB002AC08FA002E6008B002E0408A 2464:109A100032802CC5032140DA003A140E85432140E0
2465:109A2000100000000000000080052C009B0020407A 2465:109A2000C8523E140C850B2E0350000000000000AD
2466:109A30000898022C00BB0022880830022C00BB00D2 2466:109A3000881DE444E9103F444FD002FC00F9123E77
2467:109A400022C08A9202AC00AA802EC008B006E000B4 2467:109A4000440FD003E440FD103E444F9103E440E94D
2468:109A5000400000000000000008040C008300A0404B 2468:109A5000403E440FD103E440F9123F400F9103E62A
2469:109A60000810020C00B30028800A32120C00B30464 2469:109A600006700000000000000805F6A0FD80B3406D
2470:109A700028C00A30228C20B2002CC0083002C2015B 2470:109A70000C10031400FDA032400FD103E400F58662
2471:109A80000000000000000000000D6C02CB00304020 2471:109A800033602C9A832404FDA822400D5043F40037
2472:109A90001C94032C00EF0032C088F08B2C00FB00DC 2472:109A9000FD0033400F90030600700000000000003E
2473:109AA00033C0AEF003AC80EA013EC02CB003C0036B 2473:109AA0007810E100B80022002880022000B800A24F
2474:109AB0005000000000000000A01DFC00FF002F402F 2474:109AB000000B8A12E000B80422140884022000B8C7
2475:109AC00007D283FC00DF043FC00FB003FC00FF009F 2475:109AC000402000888002E000B800A2000B80020E57
2476:109AD0003FC00FD00BEC00EE003F400FF003E80654 2476:109AD00004300000000000004805C400B1422040EE
2477:109AE0007000000000000000C005F500CF083F48EE 2477:109AE0000810020400B14020400B1006C400B14031
2478:109AF0000FC39370D0DC303FD80CB2033CC0FF40A2 2478:109AF00024400810024404B1006040091002C40070
2479:109B000033C42CF1036250FC3433000F5C03F000CB 2479:109B0000B10020400B1002120170000000000000A4
2480:109B100070000000000000008010C4808B002F5AED 2480:109B10001815A400B90222600894022400B9012299
2481:109B20000BA61221C089702FDC08F2C23DD0BF40C5 2481:109B2000400B9006E400B92026400894026408B96E
2482:109B300037DC88F50A2080E8102A160B9002E00432 2482:109B3000002240089202EC08B90422410B100206F0
2483:109B400030000000000000008805C00083082C449D 2483:109B40000460000000000000A015E410F100326085
2484:109B50000B02020C0080002CC80833428C90B330FA 2484:109B50000C940B2500F90032408F94D3E400F900F7
2485:109B600028C84A3212800CB0A028280B1202E20149 2485:109B600036404C900B6400F10032400D9212E4003C
2486:109B70007000000000000000C015A2008B002E48FD 2486:109B7000F90032400F900B28047000000000000034
2487:109B80000BA022202088802EC028B00AAC00BB0089 2487:109B80006841A400F9003C408F9203E400F9003ED4
2488:109B90002EC00AB002A000AB822AA00BB202F004D1 2488:109B9000400F9C03E400F900BA402F9023A400F981
2489:109BA00060000000000000004015E700CB003EC050 2489:109BA00008BE40CF9003E410F1013E410F9003DA6C
2490:109BB000CF9C0B2100D8883EC00CB003AC00FB004A 2490:109BB00000600000000000002810A0C8F8003E036C
2491:109BC0003AC00EB043E840F8803A600F9803D004E2 2491:109BC0000C8403A110E80032008C8583E000C00003
2492:109BD0007000000000000000E001B400FF000FE092 2492:109BD000380C2C00036000C8003C000D80022010EF
2493:109BE00007A103E802FB003FC00F70237C00FF02C7 2493:109BE000C820B2020F8003CA042000000000000059
2494:109BF00035C04DB0037420FC013F000FF803F8009E 2494:109BF00028053910BE046FA008A0023A008200A216
2495:109C000060000000000000004010A500CB00BA403A 2495:109C0000808DEC03A8008A00238008A02228008E03
2496:109C10000C140B2F22C94032C08EB003AC00FB00E5 2496:109C1000CC2F8008E8C2B8008E6023900BA002CA47
2497:109C20003EC00EB003E400C90032002C90031004C3 2497:109C2000004000000000000028054E08B0722CD053
2498:109C30002000000000000000C80124008F00224026 2498:109C300028B0068C01A10220C0083802CC008300A5
2499:109C40002CA54229008B04A3C10DF00A3C00BF00E3 2499:109C400020C02930024C0081002CC00832020C4098
2500:109C50003FC008F0016900DA0522D00894037200C1 2500:109C5000830020F40B3002CA005000000000000016
2501:109C60004000000000000000E0056040830120C0CB 2501:109C6000A0011C00B4002DD048F2021E2185202046
2502:109C70000900022000826022C00830424C10BB0262 2502:109C7000E80972028E808F0120C00972020E80876F
2503:109C80002CC008B01205009B002082093202380067 2503:109C8000002DCC1858028E00850021C00B7202E80E
2504:109C9000500000000000000020011690878020E0A6 2504:109C90000040000000000000A8081E00B4802DE075
2505:109CA0000858021614848121E02939025E00B78029 2505:109CA0000C78839A00EDD031F40C6A03DE82C78011
2506:109CB00028E00878027A80968121E009F8024800BD 2506:109CB00039E00DF8835EC2C5803DE80C68031200F0
2507:109CC0004000000000000000480808098B103844DC 2507:109CC000CF8031E00F7E83EA020000000000000038
2508:109CD0004D25120C00C21022C80A3803CC00F31024 2508:109CD000080DAC08F8003CC00FB303EC00F9023EDD
2509:109CE0002CC00C30038AC0D91032402D1003120250 2509:109CE000C80FB003ED40FB00BE800EB303EDC0FB18
2510:109CF0000000000000000000401DBC80FF003F404D 2510:109CF000003ED22E8003EC02F9003EC00FB003C23A
2511:109D00000FF003F440ED003FC00EF303BC04FF006E 2511:109D00000660000000000000C005FE00F09133E096
2512:109D10003FC20FF00BD400FF10BF800EF003D0063F 2512:109D10008FF803FE00FD803FE00C78833F00CF808A
2513:109D20006000000000000000A805FA00CB023EC061 2513:109D20003FA00CF8033E00CD803FE00FF813FE107B
2514:109D30000F9003A000CB003ACA0CB313AF24CB485A 2514:109D3000FF803F200FF943D00070000000000000BA
2515:109D40001EC80FB6032C00FA003EC00F9003EA00B5 2515:109D4000A8119C00B4C131C00B7002D410E5202FC3
2516:109D5000700000000000000048119C0887202DC4FE 2516:109D5000C80F40035C0087002D800870021C4087FC
2517:109D60000B5012DC0487002CC00870A21D00A74015 2517:109D6000102DC00B7602DC80B7002DC00B7002EA0C
2518:109D700025CB8B74821C00B7002DC10B7002D2045E 2518:109D7000046000000000000010009C00B62221D00A
2519:109D80006000000000000000C0009A0187902DE0F4 2519:109D80000B7082D840B5022DC08865020C00871880
2520:109D90000B7802CE0086802DE4297A029E8087A06F 2520:109D90002C040830028C0285002DC00B70469010F8
2521:109DA0006DE80B78021E00B5802D600B7802F00084 2521:109DA000B6002D000B7022C400200000000000004F
2522:109DB00020000000000000004814CD0083022CE0C9 2522:109DB0006014CC08B200A4C00B3042C610A1002C25
2523:109DC0000B3002CC0083E02CC00830020C00A30052 2523:109DC000C00A00024C0083002C080830028C00837B
2524:109DD00024C00BB0020E20B3082CC00B3002D204FA 2524:109DD000002CC00B1882C400B0002C400B3012D8ED
2525:109DE0003000000000000000E815B882CA003EA85C 2525:109DE0000430000000000000F815AC0038003250CC
2526:109DF0000FE003F8028E803E800DA05BA800CA0031 2526:109DF0000FF003E620FD003FC008D0023C02CB80FC
2527:109E00003E800FA0033B80FE422F800FA803FA0480 2527:109E00003C502CF00ABC00C9003FC00FBE03AC00A0
2528:109E100060000000000000004800E020F8003E0064 2528:109E1000FA022EF74FF003EE04600000000000008D
2529:109E20000F0603C000F8113E000F0003E000F80029 2529:109E20008000EC00F1003AF00FB003E900F9013EC8
2530:109E300036000F800BE000F8043E200F8103D200B3 2530:109E3000C00F9013EC00F9003E550FB0016C00FB11
2531:109E400030000000000000000810E400F9003E406F 2531:109E4000023EC00F9073E000F8413E000F3001E089
2532:109E50000C9A032440C9C03E404C90032400F900F2 2532:109E500000300000000000000010FC00FC0033C0D7
2533:109E600036400790032400C90432600F9003C204F7 2533:109E60001FF013F008FD023FC08DC0033C00CFA0DF
2534:109E7000300000000000000080046400B9022E40A1 2534:109E70003F800C70033C10FC0037C00FE003B000C3
2535:109E80000A9202250289E02E409890022400B9002F 2535:109E8000FE003FC00CF0030404300000000000009E
2536:109E900022400990020400D90022440B9C02E000F9 2536:109E900084046E00B9C2A2F00BB042EB00B9002EF0
2537:109EA000100000000000000018052C00B9002C4034 2537:109EA000C00F18036C00D9812EB00AB0422C00BA42
2538:109EB000089002242889002C40689042240CB104A8 2538:109EB000C62EC00B8C02E300B8C03CA00DB002203F
2539:109EC00026400B900A2C8081002240CB9282C60053 2539:109EC000001000000000000080052F00B88022E292
2540:109ED000400000000000000008040400B1202C48ED 2540:109ED0000BB002E620B9002CC008B8020C008B00C1
2541:109EE0000A1202048081212C4C0811020408B110CE 2541:109EE0002E3048B0022C00B9C02EC10B8802EE10F3
2542:109EF000204C09120224019120A0480B1002C2013B 2542:109EF000B9C02E2019B00220004000000000000070
2543:109F00000000000000000000B80D41E0F8503E14D1 2543:109F000008040C00B00020C00B3006C00091002CEB
2544:109F10000C85032140C8503E1008068301F0F86804 2544:109F1000C04980024C0491002C008A300A0C04B124
2545:109F200036100F05032940C85032940F8503EE0305 2545:109F2000002CC01B00124910B1002E200930020283
2546:109F30005000000000000000981DF400F9103F449C 2546:109F30000100000000000000000D6C00B82022C0ED
2547:109F40000FD10BF440FD122E4C03920BE400F920CC 2547:109F40008BF003E008FD003FC00CA0033C00CB00F9
2548:109F50003E4C0F9103FC00FD103F440FD003E6067A 2548:109F50003E004CF00A3C00B90037C10FA003E000FE
2549:109F600070000000000000001805F620C9013E4006 2549:109F6000FA003E000DF00B0003500000000000005E
2550:109F70000FD0033C00BD0032630C9E432700E9C0B4 2550:109F7000A01DF001FC403F804FF002F000FD003FCB
2551:109F80003E680C98033400F9103F400FD003C60020 2551:109F8000C10FC003FC00FD003F004FF063FC00FD6B
2552:109F900070000000000000003810C220D8002E0021 2552:109F9000043FC00FC003F080FC007B000FF043E8DB
2553:109FA0000B80522804B8002238088803620088F029 2553:109FA0000670000000000000C005F800C81033046F
2554:109FB0002E3A488F0A2000B0802E000B8002CE047B 2554:109FB0000C40023400C8851FC02DD903FCC0DB282B
2555:109FC00030000000000000000805C48081002C4023 2555:109FC00037640FDB033E00FF253FC80EF203FE207F
2556:109FD0000B10020400B10020424814420580A12069 2556:109FD000FFA437C40CC80330047000000000000068
2557:109FE0002C440810820400B1202C400B1002C20146 2557:109FE0008010E80088202200088812260489822E2A
2558:109FF00070000000000000001815A50199002E4017 2558:109FF000F448B802FCC498C2227C4B9D422608BF9C
2559:10A000000B90022440BB0122410890122400A900B9 2559:10A000001877E408F182EF00BBD022D80890836073
2560:10A010002C400810402408B9406E500B9202C60430 2560:10A0100002300000000000008845C804A0002400B1
2561:10A020006000000000000000A015E714C9053E41D3 2561:10A020000A00020C0082042CE0081002CC8083009D
2562:10A030000F900B2404F908B2402C900A2400E90088 2562:10A0300024000B1006C801B3202CC0293202C80826
2563:10A040003E402C90032700F9803E600F9003E80407 2563:10A04000B10024D00882026201700000000000000C
2564:10A05000700000000000000028018488F9003E48DC 2564:10A05000C015A800A80C26000A80022C148A026EE3
2565:10A060000F9903E600F9023C40AF1003E412D90453 2565:10A06000E008B0024C08A80026200B9C02E400BBCC
2566:10A070003E400F9003E500F9C03E640F9083CA0094 2566:10A070000422C019B002E801BB1102C0889002F0AE
2567:10A0800060000000000000002810A100C8003E0091 2567:10A0800000600000000000000015EC02EA40B6602D
2568:10A090000F80032100C840B2000C80032010C800CC 2568:10A090002E980B2002C8023EC00D9803EC02DB880C
2569:10A0A00032000C8003E080F80432002C800B0A049C 2569:10A0A000B6210F8803AC08FB002CC00EB043E5803E
2570:10A0B000200000000000000028052800CA002E80B3 2570:10A0B000F06036C00C01434804700000000000004E
2571:10A0C0000BE80A38108EC022800DA00228000A0476 2571:10A0C000E001BC00D6013B6485D903F00CFF003EE3
2572:10A0D000028028A002FB00BA0037B048EA020A005A 2572:10A0D000C10FFC21EC00D7903B400F50033C00FF28
2573:10A0E000400000000000000028054C0093012CC037 2573:10A0E000003FC08EF003F440FD883FC02FD00278BF
2574:10A0F0008BB0420C909B2020C04830422C00830043 2574:10A0F000006000000000000040108C00DA403C408E
2575:10A1000020C0083002CD40B30024C80838020A003D 2575:10A100000F10034800F9223CC20E9083EC02DB04DE
2576:10A110005000000000000000A001140087002DC0C6 2576:10A110003A080F8487E800CB003EC40EB003ED0080
2577:10A120000B24061600930821C80931020C8087A071 2577:10A12000E8423AC00F800B1004200000000000003D
2578:10A1300021C0187202DC00B7B424E30878022800BA 2578:10A1300088052C088A002E428B90022818BB4922E1
2579:10A140004000000000000000A8081E0297A03DF09B 2579:10A14000D038BC82FC00E8022262CB9C00EF60DFCA
2580:10A150000F48033E00D68030E02C7A021E82C3F006 2580:10A15000002FC00BF002EC00094037C00B90023218
2581:10A1600033EC0C7C03D600F78035E00CD8032A02D0 2581:10A160000040000000000000E005481011002CA095
2582:10A1700000000000000000000819A5A0FB003ECA76 2582:10A170000B2002440090C06434283402CC00938445
2583:10A180000F8003EC02EA003EC60FB40BED40FB006B 2583:10A1800028400B0800CE0093002CC20A3002C00009
2584:10A19000BEC00FB643E000FB023E800F9003C20634 2584:10A19000B24022C00B20023000000000000000008E
2585:10A1A00060000000000000000005FE02CF883FE0D4 2585:10A1A00070011A4085802DA00B68061680BD902591
2586:10A1B0000CB903FE00DD8133E08CFC033F04CF804B 2586:10A1B00024187B42DE40A08021E00B6802D6009785
2587:10A1C00033E24FFC033E00CFC033640CF803C00001 2587:10A1C000902DE00B7802CE4092806DE40B7802086F
2588:10A1D0007000000000000000A811944087002FC10B 2588:10A1D000000000000000000048082800D1803C88F2
2589:10A1E0000D69A2D040BC0023C008F0029C0087008B 2589:10A1E0000B22034E80F2A13C242A3903CC40D3AC8D
2590:10A1F00021C00B700A3C048710214C086002EA045D 2590:10A1F00038C50F3082C800D3003CC00E3013C000F9
2591:10A20000600000000000000000009E0087002DC0DC 2591:10A20000F10038C00FA0031A060000000000000093
2592:10A21000096202D800970021C40870020C40970020 2592:10A21000401DB810FD343E800FE003EE0072003A9E
2593:10A2200021C40B30025800A7082180086082C000BA 2593:10A22000000FB063EC40F8223EC00FF003D440FFB3
2594:10A2300020000000000000002014E42583002CC052 2594:10A23000003FD20FF003EC00CF0037C00FF003D087
2595:10A24000092202CC20B20020C028B0028C0093006A 2595:10A240000620000000000000A805EE00EB0036E04C
2596:10A2500020C00B30426C20830820E208B802C804FA 2596:10A250000DB0032000F08033C008B8032C80CB0081
2597:10A260003000000000000000A815A400CF003FC08F 2597:10A2600032800FA0136E08CB2832E00DB483E200D9
2598:10A270000D9C03E800DB8033C00CF00B3C06DF00D4 2598:10A27000CA003EE00CA803020070000000000000CD
2599:10A28000B3C00BF0076800EF4032A80CA803EA0443 2599:10A28000C8118C04830021C04870021000B702215D
2600:10A2900060000000000000008000EC00FB002EC009 2600:10A29000C04A70020D48D40035C00E6002DC00A731
2601:10A2A0000F9403C540FA303EC00FB0036C00EB00C2 2601:10A2A0004029C0097202D410A6022FC808700212F9
2602:10A2B0003EC00F3013AD40FB023ED00FB403E000B0 2602:10A2B000006000000000000080009E00A78020E0F9
2603:10A2C00030000000000000000110E400C70031C1B0 2603:10A2C0000A38021A00B58021E008F8225C818380F8
2604:10A2D0008CD0033400CD003DC00CF0017C00DB01CC 2604:10A2D00021A10B78825A1083A020E80A7B02DA00C1
2605:10A2E0003DC04CF00B3002C30032000FD0030044DD 2605:10A2E00097C02DE408E802080020000000000000EC
2606:10A2F000300000000000000081046E408B002AC086 2606:10A2F0000814CC00831020C00A30020808B3702074
2607:10A30000288442228088803AC00DB002AC088B00BD 2607:10A30000F80A30424C04931426C40A3802CC00A345
2608:10A310002EC008B00223208B0022308B8C022040FC 2608:10A310000028C0AA3002CE40B3882CC028300A12D0
2609:10A320001000000000000000800524008B0022C007 2609:10A320000430000000000000E815A900EA80B690A3
2610:10A330000838862A0089802AC008B002CC009B0019 2610:10A330002F240B3904BEC033920CA00B6818CEC07A
2611:10A340002EC008B04226008B0022710B8C02200028 2611:10A3400033800FE9437800CA0032800FA013F84829
2612:10A35000400000000000000008040C00830028C03A 2612:10A35000DE003E800CE0023A002000000000000019
2613:10A360000832420000810028C00930528C08830066 2613:10A360004800E024F8003E120D8093B028F800BCAD
2614:10A370002CC018300600008300A0000B0002020170 2614:10A37000000F8403A000F0003E020E8000E000F811
2615:10A380000000000000000000000D74028B0033C0CC 2615:10A38000013E000D8003E000E8003E000F8003D294
2616:10A390000C920B2002C8003BC00CF503FC00DF014F 2616:10A3900004200000000000000810E400F900B27082
2617:10A3A0003FC104F0332140CF0032000F800B000387 2617:10A3A0000F90010400C9003E400C9803E404E90842
2618:10A3B0005000000000000000A019FC00FF003FC09A 2618:10A3B0003A480C9A03E400F90036400B100B268053
2619:10A3C0000FC403F0009C003BC00FF003FC00FF0033 2619:10A3C000F18032400F9003C2042000000000000022
2620:10A3D0002FC00FF003F080FF003F000FC003E8061E 2620:10A3D00080046400B90022610B9002240889002ED9
2621:10A3E0007000000000000000C005F0C0FFA0312494 2621:10A3E000400D9A02E408A90022780D9406E410B901
2622:10A3F0000EF0631004EF643FC04CF3031C80DF08D1 2622:10A3F0000022500B90022580B98036400B9002E07D
2623:10A4000037C00FF003F0A0FC0031082CD203F0009D 2623:10A40000000000000000000018052400B5002342F1
2624:10A4100070000000000000008010E100BBC1224875 2624:10A410000BD00EB40089042E60089102C404B90464
2625:10A4200008FD022E0097002FC24871237E40BF0016 2625:10A420002AC0089402E410B10026420A90022400D7
2626:10A4300021C54BF502EF00BB4036E008A802E0045E 2626:10A43000B92162400B9002C60040000000000000FD
2627:10A4400030000000000000008805C584B311A2C9D7 2627:10A4400008040500B54021504B5006940281002CB1
2628:10A450000A30020001B33028C40832420C00A308BD 2628:10A4500060291406C500A1222051891402C400B14C
2629:10A46000A0CA0A32828010B0412411083102E201F0 2629:10A460002020480B14020401B10004500B1002C25A
2630:10A470007000000000000000C015A500BB0022E134 2630:10A470000100000000000000B80D6008B8003200C4
2631:10A4800028B0022C809B002EC008B0026C00B300E4 2631:10A480008F8003B00088003E000C8003E000E804E9
2632:10A4900022C00BB000EC20BB0026C0088002F004F4 2632:10A490003A000C8002E000F85036000F80032004E0
2633:10A4A00060000000000000004015E340F70432C0E7 2633:10A4A000F80112004F8007EE075000000000000086
2634:10A4B0004EB0232E20EB001EC00CB0012C00FB0080 2634:10A4B000981DE510F9403E500F94026501FD013DE5
2635:10A4C00036C01FB003E140FB0036980C9003D00467 2635:10A4C000504F5013E500FD101F5007D443D400F93E
2636:10A4D0007000000000000000E001B604FF023FC071 2636:10A4D000101E440F9403D500FD403E500F5283EEF2
2637:10A4E0000FF003FE00EF023DC00FF023FC00FF0061 2637:10A4E00006700000000000001815E440F9603F44C9
2638:10A4F0003FC04FF003FC00F4003B400FA013F800F6 2638:10A4F0000FD0C3E430F9013E420CD003E780DDA069
2639:10A5000060000000000000004010AA20EB1036C0E0 2639:10A5000033400CD003FC00C9903F681E9103340017
2640:10A510000DB007EC20DB0032C00CB0026C20EB0069 2640:10A51000FD003E680C94030E007000000000000077
2641:10A520003EC10DB003E020DBA032904CB00B100414 2641:10A520003910E000B8422E090B8402E104BE002E6F
2642:10A530002000000000000000C8052D008F8020C111 2642:10A5300010088022C280884022000A8002E000A821
2643:10A54000087012CF008F00A3C00DF0023C008F00F6 2643:10A54000D02E104B8A036000BA002E30088A028693
2644:10A5500037C088F002EC00880020400880023200FA 2644:10A5500000300000000000004005C580B1606CD0F4
2645:10A560004000000000000000E0054C00A3802481B2 2645:10A560000B1000DC0CB5002C41081002C5809110C6
2646:10A57000093006CC40930028C108B002CF40A300A8 2646:10A5700068C0083002E40C81222C5008104204000C
2647:10A580002CC0093002CD00904060402810023800F5 2647:10A58000A1002C5A28900252102000000000000068
2648:10A59000500000000000000020010E00878023E032 2648:10A590001815A400B9002E410B9012F480BF002EB4
2649:10A5A000487902DE41978029E01978069E0087806D 2649:10A5A00040089002E400A96060420A9412E500A904
2650:10A5B00025E0087802D203838021A0086802080001 2650:10A5B000002E400B90026420B9000E40099002C6A4
2651:10A5C000400000000000000048080C00A30034C058 2651:10A5C0000420000000000000A005E400F9003E4166
2652:10A5D0000D3042CC01D3103AC50C3903CC00E30452 2652:10A5D0000F9023E400F9003E400C9003E404D1C046
2653:10A5E0003CC40D3003CE00D00030400C30031202CA 2653:10A5E000BA700C9803C400C9003E400E9003254089
2654:10A5F0000000000000000000401DBC00F7003FC04C 2654:10A5F000E9403E400C10036800200000000000000D
2655:10A600001FF053FC00EF0837D10FF0837C00F740B8 2655:10A600006801A414F9003E400F9023E408F9A03C2F
2656:10A610003FC10FF103D000FF00BF840FC803D00675 2656:10A61000C22F9003C400D9803E700F9143E400F92B
2657:10A620006000000000000000A805E000FB003EE024 2657:10A62000003E401F9013E620F9A03C404E90039A54
2658:10A630002CBE83EC00EB403EC00FB403ED20FB10BA 2658:10A6300004200000000000002800A000F8003E02F6
2659:10A64000B6D20FB483EC00DB8036C10C90212A0017 2659:10A640000F8013200CFC013E000C8003E000C8507A
2660:10A65000700000000000000048119400B7002FC0F7 2660:10A6500032000F800B2008F80032002C8043E040CD
2661:10A660000836020C0887302DD98B7286DD00B320A6 2661:10A66000F8023A008F80030A042000000000000076
2662:10A6700021C80B7402D0028400A00028200212041A 2662:10A67000A88528083A000F804BA1022800BA822E34
2663:10A680006000000000000000C0009A00B7802DE0CC 2663:10A680008848E402E800AE90A3900BE0003800BADE
2664:10A69000087A029D00A7A02DE00B78029E80A7807B 2664:10A690000037A008A002F8009EE022800BA0234211
2665:10A6A00021E4087A269E18830421E008780A7000C5 2665:10A6A000000000000000000028054C1033002CD0F2
2666:10A6B00020000000000000004814CC00B3002CE093 2666:10A6B0000B14020C00B2912CD0083E024C008340D7
2667:10A6C0005830120E8283002CC00B3002CC01B30034 2667:10A6C00024C20B36008C00B30020C009B002CE00BB
2668:10A6D00020C10B3002C00888D2202008000252049A 2668:10A6D000B3CC68C00B300202005000000000000044
2669:10A6E0003000000000000000E815B860FA003F826A 2669:10A6E000E0011C88B7252DC08B581A1C08B6002D18
2670:10A6F0000CA003FA00AA001E808FA003E800F2005D 2670:10A6F000C0087402DC40A50025C01B78029408B78E
2671:10A7000032801FA003E800DA003688ACE0037A0448 2671:10A700008025E30A7102DC00978321C88BF102489F
2672:10A7100060000000000000004800E100F8003E205A 2672:10A710000060000000000000A8081F00F7E27DE0D4
2673:10A720004F8003E100F0003C000B8003E000F802E2 2673:10A720000F58431E18F6807CE02C68025E90C380B0
2674:10A730003A000F8043F100FC0A3D000FC003920075 2674:10A7300035E00FF8039E04FFA120A10D7803D60099
2675:10A7400030000000000000000810E600C9903E4004 2675:10A74000F78039F80F78030A0600000000000000C7
2676:10A750000F9203E400D9003240049007E700F9109B 2676:10A75000481DAC00FB407F410F1003EC04FA003EA3
2677:10A7600030400C9043E409D98022402C100B0204A5 2677:10A76000D00FA003ED00E9002A000FB0036400FB46
2678:10A7700030000000000000008004646089C02E40AA 2678:10A77000403EC00DB003E400D30036C00F3803C222
2679:10A780000B9826C58089002240289012E710B90056 2679:10A7800006600000000000004005FE48CFC03360B6
2680:10A790003640289012C583C980B640089002200038 2680:10A790008CC843D600CC943FB00DF8037F00DF8017
2681:10A7A00010000000000000001805040089402E4140 2681:10A7A0003F600FD803DE00CFCA3D600CF8133A4477
2682:10A7B0004B9002E4009900A2400A9002E500B90023 2682:10A7B000DD803FE00FF8431800200000000000009B
2683:10A7C000E241089042E4009D50AB4A08D0260600C2 2683:10A7C000A8119C008F1133C0484112C44884112C39
2684:10A7D00040000000000000000804048281202C508A 2684:10A7D000EC2ABA033C40D7482D410B6002D400D785
2685:10A7E0000B1002E400814020504A1432C400B140F2 2685:10A7E000013DC00DF0035A0084182DC00B70036AA0
2686:10A7F0002451181412D40085402D4008500602013F 2686:10A7F000002000000000000000408C08870021407D
2687:10A800000000000000000000B80D6140C8003E00DC 2687:10A80000094002D400A4922DC80962825C0087002E
2688:10A810000F8002E000D80032000A8002E010F80049 2688:10A810002DC00B5002FC0087002D040870021C8024
2689:10A820003200048003E000D8003A000CC0032E037D 2689:10A82000B5002DC00BF00200002000000000000069
2690:10A830005000000000000000981DF440F9103F4156 2690:10A830006010CC0083002040090022C700A0412CFA
2691:10A840000F9403F500F9403E500D9403E510F940D4 2691:10A84000C14B08022C0093402C7C0B3802C720938C
2692:10A850003E504F9403C500E94136500F9403E6067D 2692:10A85000002CC00930024F84B0802CC00B32105045
2693:10A8600070000000000000001805F600FDA83A4046 2693:10A860000420000000000000AA15BC02CF00B24086
2694:10A870000CD8233600E9A03E780F9E03B680CDE2C7 2694:10A870000D1003E824EBC13EC02D98137C0AC2439F
2695:10A8800032680C9B0336824DA037688C9803060013 2695:10A880003EB00FA903E920CF003EC08CF0030D209D
2696:10A8900070000000000000003810EBA0B84020203D 2696:10A89000FAC03FC00F74012A0060000000000000F1
2697:10A8A000088502215188C02E290B8E02E100D8E0D4 2697:10A8A0008000EC00FB023A408E9003E8145B503CC1
2698:10A8B00022320D8D23614898D4A2102884020E0400 2698:10A8B000504E8403EC00F8403E80078103EC08F31F
2699:10A8C00030000000000000000805C500B3002A4A5F 2699:10A8C000003AC09F3003EC00CB203EC00FB023E81D
2700:10A8D00028104EA408A16828440B1402C50081402A 2700:10A8D00004300000000000000190FC00FF003F4039
2701:10A8E000A0500810020402912A204428144A0201B0 2701:10A8E0000FD0033820CF0832C10ED003FC00FE0881
2702:10A8F00070000000000000001815AC80B900224074 2702:10A8F00031E50EE4033A00FF0033800FF02B240013
2703:10A90000489006A400A9002E400B9022E400990074 2703:10A90000CCA03FC00FF00300443000000000000066
2704:10A9100022400910026402990022400890020604B5 2704:10A9100080046C00BB003A690B906E0800834136DE
2705:10A920006000000000000000A015E400F9003858A5 2705:10A9200040C888C6EC00884036800DA8036E50BB36
2706:10A930000C90538414A9043E400F9003E400C90016 2706:10A930000036C00BB0022400D9082EC00BB003E0D3
2707:10A9400032400C90032404D900B6404C900B2804EC 2707:10A94000401000000000000080052C00BB002E60BD
2708:10A9500070000000000000002801A400F9023E4938 2708:10A95000038002200089012258089822EC01AB00F4
2709:10A960000F10436400D9003E400F9003C400F10271 2709:10A9600022000A10022800BB0022400BB00228007F
2710:10A970003E400F9003C402E9043C400F1C03CA0090 2710:10A970008A002EC00BB042200050000000000000F2
2711:10A9800060000000000000002810A180C8203E00E8 2711:10A9800008040C00B30028408B0002024089012417
2712:10A990008C800B2000E8023E000F8003A082C800DC 2712:10A99000D2281002CC00831024200808024E00B3F5
2713:10A9A0006C000F80032010C80032020C80030A04E0 2713:10A9A00004A0C00B3002088892002CC00BB002C279
2714:10A9B00020000000000000002805380086002E80DE 2714:10A9B0000000000000000000000D6C00FF003E00E1
2715:10A9C00068A8803A008A002E800BA002F8008A0056 2715:10A9C0000F80022010895022D82E9622FC00EB40E6
2716:10A9D0002E800BA00A3A008E10238008A0030A00E4 2716:10A9D00032C00A90032800FF0022000FB0032CA011
2717:10A9E000400000000000000028054D0083002CC03E 2717:10A9E000C8003EC00FB003000610000000000000C9
2718:10A9F0000838000C6023002CC00B3002CC408300D0 2718:10A9F000A019FC00FF0C3B000FC0027090FD003E50
2719:10AA00002CC00B30020C028A80A0E028300A4A00D9 2719:10AA0000C90F96C3FC00FF003FC00FF003FC04FF1A
2720:10AA10005000000000000000A001162087022DC198 2720:10AA1000043FC00FF003EC00FC003FC00F7003E8E0
2721:10AA20004870127C00A7202DC90B7200DC0087083B 2721:10AA20000670000000000000C005DC80FB283F002D
2722:10AA30002DC41B32021D01874221C208700228006A 2722:10AA30000CC10BF102ED0037302CF103B240FF00E6
2723:10AA40004000000000000000A8083E02C7803DEC66 2723:10AA4000BBC00F4806B200FC803BCC0CF00370800A
2724:10AA50000C58031E00E7803DEC0F7F039600C78073 2724:10AA5000DF2833040FF40330007000000000000012
2725:10AA60002DE20779030A06C38030208C38036A027E 2725:10AA60008010FF40BF602E210882022000A9282A02
2726:10AA70000000000000000000081DAC00FB003EC00C 2726:10AA70000009FA022000BF5123D8099802E430B03F
2727:10AA80000F10438C00DB383ED80FB003CC04FB44DE 2727:10AA80000023D008F5A225A48F423C100BB00A2069
2728:10AA90003EC08FB613EC02FF023E000FB003C206A9 2728:10AA900004300000000000008805CC00B3082C0042
2729:10AAA00060000000000000000005FA00FF8031E3B4 2729:10AAA00028001AC084200024C84B3142C000930201
2730:10AAB0000EF823FE02DF80B7E20EF8037E006DD0B1 2730:10AAB00020C6080006C081B3002CD8093202A0408D
2731:10AAC00033E00CF89B76C0DF84B3E004F803C000E9 2731:10AAC0009301244C0B3202220170000000000000B0
2732:10AAD0007000000000000000A8119040B70221C4DF 2732:10AAD000C011AC00BB022E0A0880826000A8002EC4
2733:10AAE000087B42DC00870021C40B300010808D0001 2733:10AAE000E01BB00262013B0022C1099002E200BB00
2734:10AAF00023C00DF20204428F0029C8287002EA0424 2734:10AAF0006026C108B02A26009B042E210BB002302C
2735:10AB0000600000000000000000009400B60023C0B8 2735:10AB000004600000000000004011EC10FB003E104B
2736:10AB10000A72028C00870021C00A30020401A702D9 2736:10AB1000088413EC02A90436200FB003EE80FB007A
2737:10AB200021C0087042008A870021C0287002C0003E 2737:10AB20003AC00CA003A28079401EC08CB0636A10AA
2738:10AB300020000000000000002014C500B000A0D0DC 2738:10AB3000D30036A207B0030004700000000000003C
2739:10AB400008B002C9428B0020C00B302204008300F1 2739:10AB4000E001BC00FF003E204D41039C00FD20AB16
2740:10AB5000A0C0493002454093C0A8D4003502C804C3 2740:10AB5000000CF003B800F7003FC04DC903F400FF3C
2741:10AB60003000000000000000A815AC00BB0031C0A0 2741:10AB6000003BC02EF000F000EF003F004B7003F8F8
2742:10AB70000EB023CD00DF0037C00EF0016800E30007 2742:10AB700000600000000000004010AC80EB007E1080
2743:10AB800033C01CF0034500DAC892D42CB403EA04A5 2743:10AB80002E8403EC00E00032500FB0862500DB205D
2744:10AB900060000000000000008000E520FB003EC0D7 2744:10AB90003AC00DB063E110FB4838C10F30032C04FC
2745:10ABA0000FB003EC00FB003EC04FB003AD00FB0054 2745:10ABA000FB0832C00CB00B90042000000000000035
2746:10ABB0007EC01F3003A480E9203CC00F3203E000B8 2746:10ABB000C8053C008F006429288003EC02E804A843
2747:10ABC00030000000000000000110DC00C70033C2AC 2747:10ABC0005608FC07E0000FA0BFC00B9502A000BB19
2748:10ABD0002CF0033E20DB0013C00C70033C80EF041C 2748:10ABD0000537C089F00A0DC8BF082A8008F0023284
2749:10ABE00073C10FF0223000C600B2C00CF003004465 2749:10ABE0000040000000000000E0054C01B30224E03A
2750:10ABF0003000000000000000810069008B44A2C109 2750:10ABF0000A30128003A300A80002B822C000B300EC
2751:10AC000088B0036C008B0022C028B00A2D00BB0066 2751:10AC000028C10B04020800B94028C00B300203041D
2752:10AC100062C00BB00226028B8022C008B003204025 2752:10AC1000B34420004A300238005000000000000019
2753:10AC20001000000000000000800528018A0822C0F2 2753:10AC200020011E2017A065EC083802C241B3922B08
2754:10AC300008B2026C409B0028C048B0162904B90134 2754:10AC3000640A38023601B7902DE003F8009A00B597
2755:10AC400022C049B006AE098B8022E048B002200045 2755:10AC4000802DE08978121E00B78029E00A7802087A
2756:10AC5000400000000000000008040002820022C042 2756:10AC5000004000000000000048080C0073B024C849
2757:10AC600088B0024400830028C00830020800B10008 2757:10AC60004E300A8002E20038940E31A2C800730010
2758:10AC700020C00B30028C00838020E008300A0201E3 2758:10AC700018C40500030000F30038C007B10300004A
2759:10AC80000000000000000000000D6400CA0033C096 2759:10AC8000F30130410EB0039202000000000000000A
2760:10AC90000CB2032C00DF003BC04CF5132C04EF007A 2760:10AC9000401DBD00EF1026C803B103E000EA817833
2761:10ACA000A3C00DF003A840CB00B2002CB0030003FA 2761:10ACA000C50CB5E3DC00C3003EC10FF083B000FF6C
2762:10ACB0005000000000000000A01DF000F4003FC0A4 2762:10ACB0000037C00DF403E400F7003F400DF003D06F
2763:10ACC0000FB103F000FF0037C00FF003FC00FF00DE 2763:10ACC0000660000000000000A805ED10CB283EC083
2764:10ACD0003FC007F00B7C08FF013F000FF003A80600 2764:10ACD0000DB013AC10FB003A8004B403AC00FB04CD
2765:10ACE0007000000000000000C005F0C5ED333BCC53 2765:10ACE0003EC00FA4B3E000FB8032C00FB003E80009
2766:10ACF0000CF0033040FF253FCC0CF3833CD0DF4801 2766:10ACF000FB48B2800FB043EA007000000000000083
2767:10AD000037304CF303FD80CF2833D80CF1033000EB 2767:10AD000048119C02874438C08D30024C00FF00215E
2768:10AD100070000000000000008010ECD0BB3120CC9F 2768:10AD1000C00870039C00B35021D44E6202D000BF23
2769:10AD200088F3422050BF902FC40AF6027DC08F40A6 2769:10AD20000035D4097022D800BF2221C00B7202D294
2770:10AD300026408FF602FD00FF0839C808F602A0047D 2770:10AD30000460000000000000C0009E4087802DE0FD
2771:10AD400030000000000000008805C480A12028C950 2771:10AD4000097802DE00B68029A1287A32DE0037A019
2772:10AD500008309A0009B3002CC02030024C908320A8 2772:10AD500025E0097806D200B78021E80B7902DE00F1
2773:10AD600002080B3312CD80932024D808342222010C 2773:10AD6000B79021E00B7902F0002000000000000005
2774:10AD70007000000000000000C011AE00BB1022C037 2774:10AD70004814CC04830128C089B00A4F00B20020D7
2775:10AD800008B00226013B016EC008B0024C088B00DF 2775:10AD8000C4883016CF00BB0420C10A3206C200B30B
2776:10AD9000A2890BB002EC00AB006AC128B002B0047B 2776:10AD90000024C0093042EF10B30020C00B3002D2B3
2777:10ADA000600000000000000040156E00E8C13AC0DD 2777:10ADA0000430000000000000E815A8004A003E80C2
2778:10ADB0002CB0432600FB063EC10CB00B2C02CB008E 2778:10ADB0002DA00BAA80FE002B800CA043FB30FA00D4
2779:10ADC00034229FB043EC009B0236C18CB0031004C8 2779:10ADC0003E800FA083FA04FE1822800FA003FA84AD
2780:10ADD0007000000000000000E001BC00FC803DD0DD 2780:10ADD000F20033A20FA003F20460000000000000A4
2781:10ADE0002FF003FC00FB003DC0073003BC00EF0464 2781:10ADE0004800E000F0003E002F8003A020FC023E5F
2782:10ADF0003FE05EB001FC00FF001BC00FF003F80055 2782:10ADF000001F8403A000F8403E004F8001E040F8AF
2783:10AE000060000000000000004010AC00CB013EC913 2783:10AE0000403E000D8013E000F8003E000F8003D2AA
2784:10AE10000CB0172084EB00B2C10DB0036C00C3006E 2784:10AE100000300000000000000810C600D9003640D5
2785:10AE200032500FB0030C40C3007EC00C300310043E 2785:10AE20000F900B0400C90036686C9403E420B990BD
2786:10AE30002000000000000000C8052C008A582EE009 2786:10AE300036400C9403E40029803E400F9003242008
2787:10AE400048F0022D00EF0123C008F0223C048F607F 2787:10AE4000C90036400F9003C204300000000000002B
2788:10AE500036540BF00A3D408F002FC008F0037200FB 2788:10AE500080046650890020500890022409D90020FF
2789:10AE60004000000000000000E005400089802C1038 2789:10AE600048489006E40499A022400DB822640009E5
2790:10AE700008B0024900A3A024C00930024C0083C9D5 2790:10AE70005032400B9002279089402A400B9002E00C
2791:10AE800020904230124D0083006AC0093002380021 2791:10AE80000010000000000000180124009900664234
2792:10AE900050000000000000002001160085806D6257 2792:10AE90000AD0123400850026404A9002E401B9012C
2793:10AEA000087E025640278025E01978060E00838030 2793:10AEA0002440589012C40029402E400B100A2480E0
2794:10AEB00061A00B78024E0087826DE009790248009C 2794:10AEB000890526410B9002C60040000000000000FA
2795:10AEC000400000000000000048082C02C3613C88DC 2795:10AEC00008040480812061480852021481952020E2
2796:10AED0002CBA124910E32C36C00D30534C44C30039 2796:10AED000400A3602C400B12000484110424401A19A
2797:10AEE00020010F31034C00C3013CC02DB1031202FD 2797:10AEE0000024480B12120480812028480B1202CA49
2798:10AEF0000000000000000000401DBC00FF003F00FB 2798:10AEF0000100000000000000B80D6000D8503600CE
2799:10AF00004FF109B000FF003BC00EF401FD24FF40EB 2799:10AF00000E852321428C5434140E8002E140F85007
2800:10AF1000BFC007F003BC006F103FC41EF183D00612 2800:10AF10003614048003E144E8507E150F8503214276
2801:10AF20006000000000000000A805C400E804320032 2801:10AF20004A0036140F8003EE0350000000000000BA
2802:10AF30000CB603E802CB0036CA0FB503AD00FB2008 2802:10AF3000981DC440F9101E444E9103E440F9103F9F
2803:10AF40003E400FB303EC80FBA832C68CB6032A0048 2803:10AF4000C00D9103F400D9143E440F90037400DD4A
2804:10AF5000700000000000000048119402E60020008C 2804:10AF5000007A440F9103F440F9383F440F9383E79C
2805:10AF6000087302DC0087702DD00BF0021C84B72020 2805:10AF600006700000000000001801F680F9A43F6898
2806:10AF70002DC00B7082DD24B74034C9287282920440 2806:10AF70000E9E436780D9E43F410FD8430400EDC0E3
2807:10AF80006000000000000000C000BE02AC80A120F4 2807:10AF800036400C9003E400D54032400C9003F400AE
2808:10AF9000087900CE04878065E00B7A029E00B790A6 2808:10AF9000DD0032402C9A03C60130000000000000A2
2809:10AFA0006DA00B7802DE00B78021E0087802300047 2809:10AFA0003810E000E8C02E144D8F2223C0F8F0AA1C
2810:10AFB00020000000000000004814ED82ABE020E417 2810:10AFB000000C8003A2A0D8822200088002E800D8FA
2811:10AFC000083002EE0483002CC11B30020C08B300D1 2811:10AFC000802A00088002E80888A83600488A82CED5
2812:10AFD00064F60BB002CC04B30026C0083002920421 2812:10AFD00004300000000000000805C500B1482E4004
2813:10AFE0003000000000000000E815BB80EE4931A0F1 2813:10AFE0000A122244009104A4410A940624009142CA
2814:10AFF0002CA003FA00CA0236800FA003A800FA02B0 2814:10AFF0002441091002E40191202440091002C401F7
2815:10B000003F900FA063E800FA0032800CA0233A04BE 2815:10B0000091002C40091402C2013000000000000031
2816:10B0100060000000000000004800E00AE8003E0870 2816:10B010001815A400A9002E404810022400B940AA27
2817:10B020000F8003E350F0003E000F8013E000F800B3 2817:10B020004018B002E40899002240199046E4809943
2818:10B030003E000F8003E001F8017E000F8003D20084 2818:10B03000042E40099002E40199042650099002C6AA
2819:10B0400030000000000000000810E440C9A13240B8 2819:10B040000460000000000000A011E400F9063C408C
2820:10B05000201101A640C98436400D900344004100F0 2820:10B050000A90036402D900B6500E90232601F9002D
2821:10B0600032400F900B2400F9003E404C10030204C4 2821:10B060003640299483E400D94836400D9003C70048
2822:10B070003000000000000000800464008982A240CB 2822:10B07000D1073A50CD9003E8042000000000000002
2823:10B08000089C02250089C82240089042240089209B 2823:10B080002801A408E9003E408F9003C408F1003A6B
2824:10B0900022600B90022410B9002E4008900360003B 2824:10B09000688F9003A441F900BE400E9003E400F9CC
2825:10B0A000100000000000000018052400890422CAD6 2825:10B0A000C038402E9003E640E9003E68069003CA8F
2826:10B0B0000A900A2502892020402810026401A90074 2826:10B0B00000200000000000002810A000D8053E007D
2827:10B0C000224B0B90022401B9002E41289002060069 2827:10B0C00007800B2000E8403E100D82036000C8009E
2828:10B0D00040000000000000000804049081A0204807 2828:10B0D000B2008D8303E000D8503A001E8003E124C3
2829:10B0E0000A320204808100204408110204D0A12009 2829:10B0E000F800B2000F8003020420000000000000FE
2830:10B0F00020400B11020600B1312C48081402420115 2830:10B0F000280538008A042F846AA00BE8088E003DDA
2831:10B100000000000000000000B80D6142C854321475 2831:10B100008088EC036810A601368008A800C8108E5D
2832:10B110000E85032144C828B21A4C86936114E85066 2832:10B1100010228008A002FB20BE512A800BA00282D0
2833:10B1200022140F86832140F0401E140C00032E03CE 2833:10B1200000000000000000002805412193002CF0E1
2834:10B130005000000000000000981D7444F5103F44CA 2834:10B130003930060C00A300280828BC022C008380AC
2835:10B140000D91037440F9003E480B9203E4C2D910FC 2835:10B140002AC0083000CC009A8028C00A3002CD0006
2836:10B15000BF400F9203E504F9303E440F9443E606E6 2836:10B15000B30462C10B30020A00500000000000007E
2837:10B1600070000000000000001805F622CDA1336138 2837:10B16000A0011E0407112CD00A3222DCC187006D19
2838:10B170000CD8D33410CDA83E608E9C93A708CD8008 2838:10B17000D00834027C00A70824C8087002DC800FC5
2839:10B1800033400E9AD336A0C98032600C9903060072 2839:10B180000021C4087306DC00B20061C80B3A0288D3
2840:10B1900070000000000000003810E3888AA020281A 2840:10B190000440000000000000A8080A0057812DA00C
2841:10B1A000088022201288402C28088A022200880069 2841:10B1A0002D7C023E82E3E03BE00C78031E20C7804A
2842:10B1B00022000B8C03210088D0A23E288D020E04B1 2842:10B1B000B9E82C7803FF80D6803BEC027A03DE00EE
2843:10B1C00030000000000000000805CE20A1482052F9 2843:10B1C000F78131EC8F7C030A0200000000000000D0
2844:10B1D000291002240381002C520A1012851091407C 2844:10B1D000081DAC00FB001E8023B683EDA0DB643E9F
2845:10B1E000A4400A128244009128244028120202013D 2845:10B1E000C00EB003EDC0F2003ED40AB003EC30EE66
2846:10B1F00070000000000000001815A400A9142240EF 2846:10B1F000643EC007B0C3E800FB013EC80FB803C2FD
2847:10B20000099002A40189042C4008900224009900AE 2847:10B2000004600000000000000005F600EF803BE055
2848:10B2100022444B10422414990026400810020604D0 2848:10B210000FF8637E04CFC0B7200EF803FC00C78090
2849:10B220006000000000000000A015E440E940B27892 2849:10B2200033F00CCC03FE08F7C133E04FF803B24013
2850:10B230000D900B2422C9033E410E9003A402D900B5 2850:10B23000FFA031E60CF803100470000000000000CD
2851:10B24000165806900B6402D90036400C900B280467 2851:10B24000A8119C00EF0221402D70021C00F710296C
2852:10B25000700000000000000028018400D9803E4AF0 2852:10B2500040087022FCC0A7003DC0084002DC00B7D7
2853:10B260000E90036420F9083E410F9003E400E108CA 2853:10B260004021C00B7002DA80B72429C648F0022AB8
2854:10B270003E400F9003C400E10038400F9003CA0025 2854:10B27000066000000000000000009C00A700288479
2855:10B2800060000000000000002810A009F040B0108D 2855:10B280000B30020C00930025800A6102DC01A7103C
2856:10B290004C000B2000F8003A001C0003E000C8003E 2856:10B2900024C0084082DC009F0025C40B7002942566
2857:10B2A00036000C80032000C80032000F80030A041F 2857:10B2A000B73223C41B700200002000000000000021
2858:10B2B0002000000000000000280528003E8823A28E 2858:10B2B0002014CC0CA300200029300A0C00A3006C41
2859:10B2C00048E0001980BE882E800DA042E8008E0064 2859:10B2C00000081042CD10AA00ACC0000402CD00BBA3
2860:10B2D000239008A00A3A00DA0036800BA00A0A0080 2860:10B2D0001024C0033042C309B3002CD00A30021836
2861:10B2E000400000000000000028054C00B38020E072 2861:10B2E0000030000000000000A8158000EF003A4088
2862:10B2F0002830C20F10B34028C00B3002EC1183403D 2862:10B2F00007F0433C009FC0B6140E8006FC01CB0152
2863:10B3000028D20A30020CC0830020C00B30020A0091 2863:10B3000037C0ACB402FC00D90137C04BF013AE0813
2864:10B310005000000000000000A0011C00B60021C089 2864:10B31000FB0033D02EF00B2A00600000000000007C
2865:10B320000820C21C10B5002DC80A7202DC40850836 2865:10B320008000EC00FB053E400F3003AC14FBA03A5C
2866:10B3300029A21A72220C00933005C40B3222280075 2866:10B33000C00F8443EC01F9403EC00FA203EC21F999
2867:10B340004000000000000000A8081600B280312074 2867:10B34000003AC00FB003E420F000BAC00DB003E033
2868:10B350000C58031E00F78039F80B7C22CE40CF80BA 2868:10B3500000300000000000000110F800D70135683F
2869:10B360009B602E3B031A00C7A811E00F78032A0246 2869:10B360006DF0033C01E70033C00DC003FC24CF02A5
2870:10B370000000000000000000081DA400FA003EC00C 2870:10B3700037C00DD202FC00DF0133C05E70331C18F1
2871:10B380000F9023E800FB003ED02DB603ED02F9003C 2871:10B38000CF4131C20CF0034040300000000000000B
2872:10B3900032400DB007EC00FB603EC80FB503C2069B 2872:10B3900081006C008B0022522AB0036C00AB0028A5
2873:10B3A00060000000000000000005FE00FF8033A0E8 2873:10B3A000C00A8C02EC108BE022C00F8002CC008B14
2874:10B3B0000CF80B3240CE8137F00CBC03FE00FF844A 2874:10B3B0008022C008B0022A10D98022C0C8B002E0A2
2875:10B3C00033E02CF883E602CF8533F00CFC03001445 2875:10B3C0004010000000000000800524019B00268042
2876:10B3D0007000000000000000A8119C00BE0035C6EF 2876:10B3D00029B0620C00AB016A00089802CC009B8384
2877:10B3E0002830023040870023C0087A02DC00BE000B 2877:10B3E0002EC0CBB412EC038B8028C00AB006A2009A
2878:10B3F00023C0087012FE00870021C008F0022A0452 2878:10B3F0008B0262C008B002E00050000000000000B4
2879:10B40000600000000000000000009520B6002080D1 2879:10B4000008040C01831420000A30024C0083002A37
2880:10B410000831025C01870025C0087202DC00B6001A 2880:10B41000400A1000CC02930028C00A2002EC00036E
2881:10B4200021D0097002D408930020C00870020000E7 2881:10B420000020C00830160080910060C0083002C2C1
2882:10B4300020000000000000002014C400B0E02460E0 2882:10B430000100000000000000000D6C00DB00368001
2883:10B440000820064801800020C0083002CC04B30068 2883:10B440002DF0033C00AF003A800D8003FC005B0050
2884:10B4500020840B3002E8009B0020C0083002080462 2884:10B4500037C0099003FC00DF0033C00AF003A420CA
2885:10B460003000000000000000A815AC00B9E03280F8 2885:10B46000CB00B3C08CB0034002100000000000000D
2886:10B470006CB0236F00C30037C13CF003FC00FA003E 2886:10B47000A01DFC04FF200F0027F003FC00FF002D9F
2887:10B48000B0C009F003EC10DF0073C00CF00B2A0011 2887:10B48000000BD027FC00EF0037C00FC043FC00FFCB
2888:10B4900060000000000000008000EC10F8003E4258 2888:10B49000003FC00DF00BE000F5003FC01FF003E8D7
2889:10B4A0000F2403A860F8003CC10FB003EC00F94082 2889:10B4A0000730000000000000C001F4C0FC227FC093
2890:10B4B0003E8004B023E100EB003EC00FB003E0008B 2890:10B4B0000CD0433600C48134C01C8907F280CF8091
2891:10B4C00030000000000000000110F400EE003D30EC 2891:10B4C00033600F79033CE0CF0833480DC403F050DC
2892:10B4D0000CC0031400CCA0B3C04C70035C10DF00A0 2892:10B4D000DC9037CC0FF803F0007000000000000093
2893:10B4E0003F000CF003F800CF0023C00CF003004035 2893:10B4E0008010E990B8807EE488990A2608A9802215
2894:10B4F000300000000000000081046400BA812E5872 2894:10B4F000F42C9903A702898022340B9A037D00DF84
2895:10B500000888022780892022C028B0022C00888366 2895:10B50000482B60080502E500822022C48BB002E0CF
2896:10B510002E2005B062E3008B002AC008B003604013 2896:10B5100006300000000000008805C500B0102CC0F7
2897:10B52000100000000000000080052600B9812E40B8 2897:10B520002A0002A408A804E0800B0002C441B2046F
2898:10B53000088C062600880022C008B0166C00988887 2898:10B53000A40A0BB0028C81832060509812128B8079
2899:10B540002E2008B004E3010B0028C00830022000C0 2899:10B5400089002CC80B3002E20170000000000000EE
2900:10B55000400000000000000008040400B0002CC0FF 2900:10B55000C011AC20BB022AC00A8802A408A980A29C
2901:10B5600028000E0010800020C00832020C00800469 2901:10B56000E11B9C22E600B84026300B9002CC0193F0
2902:10B570002E20093002C412830028C0083002420184 2902:10B57000042A40399882EC148B652AC00BB202F879
2903:10B580000000000000000000000D6C00FA003E000A 2903:10B5800000600000000000004015E700B8482E00F1
2904:10B590002C910320008A0033C00CF0037C00D800FB 2904:10B590000E88438400E3C136E80F9C12E280F3C0BA
2905:10B5A0002E400CF003E080CF003BC00CF003000302 2905:10B5A00036705FA823AC01CB0422404D8403E20037
2906:10B5B0005000000000000000A01DFC00FC013F4006 2906:10B5B000D8003EC00F9003D00470000000000000CF
2907:10B5C0000FC013F000F4003FC10FF423FC08FC008F 2907:10B5C000E001B309FE103E810DC003740CFF003D85
2908:10B5D0003F000FF003F040FF003FC00FF003E8060C 2908:10B5D000C18CD0831400CD203A400DCA017C00FFFD
2909:10B5E0007000000000000000C005FC20CD1039C82C 2909:10B5E000001F400EC023F246FE8437C00FD803F878
2910:10B5F0000DC1033C80EF9023D80FF800FE00CF80F0 2910:10B5F00000600000000000004010AC00DD023D4093
2911:10B600001FD00FF903FF00E7C033C40FF003B000F1 2911:10B600000E9003AC00EB483ED00C8063A208CA0049
2912:10B610007000000000000000C010FE02894023F00E 2912:10B6100032080CB003AC08EB003E400CD483582039
2913:10B620000885103C008B00A3DC4BB282EC208B0021 2913:10B62000F94232C00CB003D004200000000000003A
2914:10B6300026C04BB002EC10B9042AC90BB580F00447 2914:10B63000C8052802DB002EE0283A022E00DB6076E7
2915:10B640003000000000000000C805CC00816428C460 2915:10B64000E00D8C02E000880236586815837C08BF44
2916:10B6500009B20A0CF0A32020C80B3202EC028308C6 2916:10B65000002D60089002A900B30523C008B002F2D3
2917:10B660002CC8093202CC80ABA020C80B3200B2013A 2917:10B660000040000000000000E0054C1080000CC10C
2918:10B670007000000000000000C015AC10890022C05E 2918:10B67000081C82060093C020F60A200208009300EE
2919:10B6800008B2122C020B0022C00BB802EC008B0097 2919:10B680002460093C020C0083002C60090112004078
2920:10B6900026C04BB046EC00B9000AC00BB002F00463 2920:10B69000B000E0C0083002700010000000000000A0
2921:10B6A0006000000000000000D015EC10C9E03AC0B6 2921:10B6A00020410A4086812DE058180A16A09780256F
2922:10B6B0000D28032C00EB1032C00F8203C400CB0016 2922:10B6B000E9197882D600978025A019F8025E00B7B4
2923:10B6C0003EC10FB006EC08E900B2C00FB013900401 2923:10B6C000802D602848129600B48021E0287802C8B6
2924:10B6D0007000000000000000E0019C00F5A03FC0E9 2924:10B6D000041000000000000048080C0081303CC24B
2925:10B6E0000FE803FC08FF003FC08FC003FC00FF0011 2925:10B6E0000E00028400E34028E84C29030C00D3003C
2926:10B6F00037C00FF003FC00FF043EC00FF003F8005A 2926:10B6F00034C40D31038C08E3003C460C2003008069
2927:10B7000060000000000000005010AC00F94034C0A0 2927:10B70000F20032C00C3003D2021000000000000032
2928:10B710000DB4032C00DB403EC02C80036408FB10FA 2928:10B710004019B800FF102FC00FC023C4807F103E17
2929:10B720003EC68FB003EC00F98032C00CB00B14049D 2929:10B72000C00FB103DC00E7003F8006F143FC00FFDF
2930:10B730002000000000000000C8053E20E9C837D402 2930:10B73000087D500EE123B408FE103FC40FF003D083
2931:10B7400048AA221C008B006FE0088582ED40BB8474 2931:10B740000460000000000000A805E402CC003E00F8
2932:10B750002FC04BB803AD40B30023D408F70232002A 2932:10B750002CC0030401CB0033602C9013E80073006D
2933:10B760004000000000000000E0014C00B164A4C0F3 2933:10B76000B2C10FA003EC80FB283E541FD003FE02A1
2934:10B7700009200A0C04B8006CC0083802C840B38025 2934:10B77000C98032C00FB003CA007000000000000092
2935:10B780002CD10B3002CC04B30028C00830023A00A0 2935:10B780004811800086002D800820021408870029B7
2936:10B790005000000000000000B0011E00A58025E060 2936:10B7900040087002DC00B70021C00B60025CA0977B
2937:10B7A000883A121E00A6902DE2087902DA00B782CC 2937:10B7A000202D480B5002DC108D0021C80B7002D2F6
2938:10B7B0002DE00378829E00BCC129E00878022C109D 2938:10B7B0000660000000000000C0009F0085812C6032
2939:10B7C000400000000000000049080C00F30034C0F5 2939:10B7C000185802DE20B78228605A7852DE10BF80F7
2940:10B7D0000D3E030C00F0402EC00C3043C800F300B7 2940:10B7D00021E04B7806DE40B7A02D699B7812CE00A1
2941:10B7E0003CC0073003CC80F20038C00C300312029A 2941:10B7E0008780E1E40B7802C0002000000000000028
2942:10B7F00000000000000000004019BD20F7003FC21B 2942:10B7F0004814EE0083002CC20836028C0883F068DF
2943:10B800000FF10BDC20DE043FD207F013F840FF00FD 2943:10B80000400A3E02CD40B30020E00B32064C009BC4
2944:10B810003FC007F003FC00FD0037C00F7003D006E7 2944:10B81000000C400B3002CD80830820C00BB102DA4F
2945:10B820006000000000000000AA05CF00DC003ECA56 2945:10B820000030000000000000E815B800CE083FB06E
2946:10B830000FA000AC92C90032C00FB011A408FB00E9 2946:10B830000CE423DA02DE40BBB20EE243FA00FE0063
2947:10B840002EC04FB023EC00F9003EC40FB003EA0055 2947:10B8400033900BE003E800FA003E810BE013F908A7
2948:10B850007000000000000000C8919C00840001C03E 2948:10B85000CE4032800FA803FA047000000000000000
2949:10B860004B70221CC0870021C04B70021C00B70126 2949:10B860004800E02498083C040F000B6000F8402ECC
2950:10B8700025D80B7022DC00B6002DC00B7222F2041A 2950:10B87000030D8003E000F8003E060B8003E000D8D3
2951:10B88000600000000000000080009E809780A9E01A 2951:10B88000003C00038C23E100F8007E000F8003D20F
2952:10B890000BF802CE08858029E80BFC021700B78060 2952:10B8900000600000000000000810E402C9003E4003
2953:10B8A0002DE08B7802DE00B4C02DE80B7902E000B9 2953:10B8A0008C90032500E98032440F9402E420F900D3
2954:10B8B00020000000000000004814CC008308A0C055 2954:10B8B00032700F9A43E400F90032400C1033241028
2955:10B8C0008B3C024C008300A0C01B3C0A0F29B30034 2955:10B8C000F9013E400F900302042000000000000038
2956:10B8D00024C00B3002CC00B3802CC00B3002D20449 2956:10B8D0008004640089822E40289002248281C0A2C4
2957:10B8E0003000000000000000E815A800DE003A80EB 2957:10B8E000700B9C02E4003142A2600B9482E400B928
2958:10B8F0000FEA02E800CE003A800FE0033800FA00B9 2958:10B8F000002A400894A22500B9002E400B900A208F
2959:10B900003E800FA003E800FE003E800BA003FA0477 2959:10B9000000100000000000001805240089642E408B
2960:10B9100060000000000000004800E000F804BA01E8 2960:10B91000089042A400896022420B9002E600B980A0
2961:10B920000F820B8004F8803E000F86036000F80051 2961:10B9200022400B9002A404B9002240289002240473
2962:10B9300036000F8023E100F8003E000F8003D200A4 2962:10B93000B9002E400B90020E0040000000000000F5
2963:10B9400030000000000000000810E401F90032405F 2963:10B940000804058081002CC1481002A40281002057
2964:10B950000F9003E400490032400B9003240049009B 2964:10B9500040833402C400BB0020D00B1402C480B169
2965:10B960003C400D9003E408C9003E600C90030204C3 2965:10B9600020A06818141A0D00B1402C500B10020AC8
2966:10B97000300000000000000080046400B940A264B0 2966:10B970000500000000000000B80D6000C8003E0097
2967:10B980000B18022500D15036504E900A24028940EF 2967:10B980008C800BA004E8003200078003E000F80080
2968:10B990003A51089402E52289442E6028900A20003A 2968:10B9900032001F8003A140F85032000C80032000C9
2969:10B9A000100000000000000018012400B10822402F 2969:10B9A000F8003E000F80032E03500000000000004E
2970:10B9B0004B9282A500A90822500A10020C00A9404F 2970:10B9B000981DF446FD403F5023D4137404F5023F14
2971:10B9C0006E500B9402C40489446C488810024600EF 2971:10B9C000500FD403FD00BD002F500FD003E440F909
2972:10B9D000400000000000000000040400B140E0400E 2972:10B9D000103F440FD403F508FD063E500FD283E616
2973:10B9E0001B140A0400B90024401A10220400A1000C 2973:10B9E00004700000000000001805E640ED043E4829
2974:10B9F00028400A1012C40081026C40081202420161 2974:10B9F0000CB283F400C10032408CD0033400FD004F
2975:10BA00000000000000000000B80D6008B000320027 2975:10BA000037400FD003E620F9883D620CD803FE24AE
2976:10BA10004F8002A150E05032140EA5232140E8507F 2976:10BA1000C1003E780FD00306007000000000000057
2977:10BA20003E140F8503E140C8501E140C85436E037D 2977:10BA20003810E10088402E1008C423A00888062A98
2978:10BA30005000000000000000D819E500FD403E5015 2978:10BA3000140880036004B80022000B8002E200B802
2979:10BA40000F7403A5005D003E500A5013F400D900A6 2979:10BA4000802E00088C02E38088022E380B88020EBC
2980:10BA50003A500D9013E400FF003E500F9103A606EC 2980:10BA500006300000000000000805C580A1C02D7060
2981:10BA600070000000000000001805F690BDE8236B90 2981:10BA6000085042C400A90020E02A100A0410B100C6
2982:10BA70000BDA0B3680C9003268469043E400490077 2982:10BA700024404B1006C420B1086E400B1682C4202F
2983:10BA800032680C90032440F90032600C9C03C6011C 2983:10BA800081002C500B928252002000000000000028
2984:10BA900060000000000000007810E100B8E0A21192 2984:10BA90001811A400A9012E4028D020A404A9002A2E
2985:10BAA0000B8E0A232288802A31288802620088802F 2985:10BAA000401AB0122400B90C22420B9402E400B9EF
2986:10BAB000A23028888A2200B8A8A23908CA02CE0477 2986:10BAB000006E400B9602E41189206E400B90024606
2987:10BAC00030000000000000004805C50821000040CB 2987:10BAC0000020000000000000A015E4C0A9C03E5006
2988:10BAD0000314828580AD0821529850823423850852 2988:10BAD000089C83E402E900B2402A92122640F94011
2989:10BAE00021520850065400B520215A095402D201AF 2989:10BAE00036700F9403E404F9013C400F9803E6021A
2990:10BAF00030000000000000001811A400B9612240CD 2990:10BAF000C9223E400F1002680470000000000000E0
2991:10BB00000B90060400AD00694008D0027400850067 2991:10BB000028018604D9401C400F9223A4B0DB043CDA
2992:10BB100001400070067404B500234009D002C60439 2992:10BB1000C00D9A03E400F9003E440F9003E400F9DD
2993:10BB20006000000000000000A014A400E900324002 2993:10BB2000003E422C9023E480F9003E408F92039225
2994:10BB30004F950BA400E90032408C90032400C9000B 2994:10BB300000600000000000002810A100C8203200B2
2995:10BB400032400C90036408F90032403D9003E80451 2995:10BB40004CC08B2002C83132202D8403E104F84818
2996:10BB500070000000000000006801A408F9003E40E9 2996:10BB5000BA000F8903E000C80032000D81132010E5
2997:10BB60004F908BE404D9013E400D90036400D9014D 2997:10BB6000F8003A000F8123020420000000000000CA
2998:10BB70003E400F9003A400F9003C400E9003DA0011 2998:10BB7000280528000E40228028A40219005280A225
2999:10BB800060000000000000002810A000F8403620EF 2999:10BB8000804DED82E800B64223BD0BE802E804DAFE
3000:10BB90001784032021C8007E022C80432000E80285 3000:10BB900000378008E0023A20BA0022800BA80A0A87
3001:10BBA0003E010F8003E000C8401E000F8003CA045E 3001:10BBA000004000000000000028054C00838060C0B9
3002:10BBB000200000000000000028052A88B60223A00B 3002:10BBB0000829020D00924024C008B402CC00B30052
3003:10BBC0000BEC422B00D2806EB108A0220800EA04E0 3003:10BBC00068E01B3002CC00930124C06938026C008D
3004:10BBD0003A809FA003A8008A042E800BA802CA0006 3004:10BBD000B3002CC00B30020A00500000000000002F
3005:10BBE000400000000000000028054C00B200A4E165 3005:10BBE000A0011C4083C020400828069C189C022409
3006:10BBF0008BB432474583902CF44B38120E44A3018A 3006:10BBF000C0097002D400B70021C00B7002CE40977C
3007:10BC00002CC04B3002CE0093006CC00B3802CA002F 3007:10BC0000B0254008781A5800BFA265C80B780220FA
3008:10BC10005000000000000000A0011C00B74421C239 3008:10BC10000440000000000000A8080E028780B1A0C8
3009:10BC20000B5402540587002C409B6C021810A7048B 3009:10BC20000C68031A08D69235E4287842D610F580BD
3010:10BC300029C00A70029B0097040D800B6082E80007 3010:10BC300039A00F7823DE30D3A235A04DE8035E0093
3011:10BC40004000000000000000A8081E00F38035E05E 3011:10BC4000F7D03DF80FF003220200000000000000D2
3012:10BC50000B3802521084802DA00FF80B1E00E680D6 3012:10BC5000081DAC00FB043E000BA0034804FA413A67
3013:10BC60001DA00B6803FE02D6803DE00F7803EA02B8 3013:10BC6000500FB003E400F1003EC00FB003ED88FBBD
3014:10BC700000000000000000000A1DAC00FB003EC1F7 3014:10BC70004D3E000FF003BC08FB203AC00FB003C2DA
3015:10BC80008B900B800AB8012E000CB003E800FA007C 3015:10BC800004600000000000000005FE00DC80B3E05E
3016:10BC90003EC00FA043EC00EB003E800FA623C20283 3016:10BC90000CD803CE00C8A031A08DE903BE00B2804D
3017:10BCA00060000000000000000005FE00FE80332060 3017:10BCA00033E00CE8437E040F8131E40CD803F60046
3018:10BCB0004EC912F650EF903FE00C1900B642CF216A 3018:10BCB000FF803FE00FF803000420000000000000B8
3019:10BCC0003FE00EF902E6C0FF803FE04CDC0340009D 3019:10BCC000A8119C00B4403540085082DE80D49021F9
3020:10BCD0007000000000000000AA119400B70081402D 3020:10BCD000E00D5102D440B6B02B900EE5029C40D747
3021:10BCE00008030214C487012DC8086A12384087026D 3021:10BCE00022195C0D7002D800B7202DC00BF0036A3A
3022:10BCF0002DC0087112D280B7002D800860022A047E 3022:10BCF000042000000000000000009C009310218040
3023:10BD0000600000000000000000009C00B7102180CF 3023:10BD0000085802DCC0940023D00870A0D420B502EB
3024:10BD100008F4129404A6002CC018D202144886100D 3024:10BD100029800960820C00870225C0194002D400E6
3025:10BD20002D800A6132D400B6182DC40858020010C4 3025:10BD2000B7006DC00B700200002000000000000092
3026:10BD300020000000000000002014C400B30020C058 3026:10BD30002014EC00B3C02001481802CC028144A0BA
3027:10BD400040B022040082810CC008300A0A008A0038 3027:10BD4000C0893802C780B1002C094A0062AC09934F
3028:10BD50002EC008A002C400BB002E800820020804E8 3028:10BD5000012840193002CD10B3902CC00B3002C81E
3029:10BD60003000000000000000A815AC00FB00A0C0DF 3029:10BD60000420000000000000A815BC20DB6222E0D7
3030:10BD7000249423AC10EBA00EC00CB0022E20C900FE 3030:10BD70006CA003E400980032C0EC9823AE08FB08E6
3031:10BD80002E400E9003EC00F9803E406CA00B2A047C 3031:10BD80003A780990037C10CF0026400CB003EC00F9
3032:10BD900060000000000000008000CC00FB003EC0FE 3032:10BD9000FF803FC00F90032A0460000000000000F5
3033:10BDA0008990032C00FB023E404FA0036D01FB4134 3033:10BDA0008000EC20FB483C610FA043ED00F8243EEE
3034:10BDB0003EC08FB403E800FB203E500FA403E00018 3034:10BDB000500F9083E400FB003A500F8043EC08FBE7
3035:10BDC00030000000000000000110FC00C320B2C0E1 3035:10BDC000003E400F4003F000FB003EC10F900360B7
3036:10BDD0000DD0033800CD003F800DF003FC00FD02C4 3036:10BDD00000300000000000000110FC00DDA03280F7
3037:10BDE00036000CD0033F08FC0412C00CA003C04472 3037:10BDE0000CE001FC00DC9139C03C40033400FF80D2
3038:10BDF000300000000000000080046C028BC822C0EC 3038:10BDF0003F000FD007FC00CB003D400CE003382093
3039:10BE000008980A2A4089202E018EB012EC80BBF0DF 3039:10BE0000CF023DC00CD00308443000000000000009
3040:10BE100022E508BD022E00BB9022ED08A202E00040 3040:10BE100081046C000140220028A002CE86836422A7
3041:10BE2000100000000000000080052C008B012200A3 3041:10BE2000F4088C0F6400BB102E600B9C03AC01DB8C
3042:10BE300049A81E04008B012EC0499002E400B900FD 3042:10BE3000003E60088F0223408B003AC00D1043681B
3043:10BE400022400A90022C00B9002A40088002E0003B 3043:10BE4000401000000000000080052C009900A2C0F6
3044:10BE500040000000000000000804040081002040B1 3044:10BE5000089002A607980002C24888022C00BA0285
3045:10BE6000082002040083002CC00A2042CC00B3004A 3045:10BE60006E600A9802EC008B012E600890020500BB
3046:10BE700020C00230020884B3040840082002C21126 3046:10BE70008B002EC008B1022000400000000000002E
3047:10BE80000000000000000000000D6C008B00B2807C 3047:10BE800008040C1081002040281026CC808020A0BF
3048:10BE90000DB1032402CB013EC04D9043E400F900F4 3048:10BE9000CC1814420400B2206C400B00028C0083CA
3049:10BEA000B2002E900B2C80F800BAC02C8003C00387 3049:10BEA0000028402800020000830028C009B0024298
3050:10BEB0005000000000000000A01DF4007D003FC005 3050:10BEB0000500000000000000000D6C00D900228089
3051:10BEC0000F7203D400FF003FC00EF147FC00FF00DB 3051:10BEC0000C9003AC80DA292AD22880022400FB20BF
3052:10BED0003BC00DF013FC50FF0037C00FE003E80635 3052:10BED0003E000F9002FC008F002E400C800B2002D1
3053:10BEE0007000000000000000C005F0C4CC333F0427 3053:10BEE000CF003EC00CB00300035000000000000073
3054:10BEF0002CF6033860CC90B3200FF123F060FF01E3 3054:10BEF000A01DFC00FD003F000FD063FC49F5003E93
3055:10BF000023C80CF28A3C81DF303F640CD803300434 3055:10BF0000C00BC001F4007F403F401FD003BC00FFC6
3056:10BF100070000000000000008010E0C28A302E187F 3056:10BF1000003F400FC003F000FF003BC00FF003E8FC
3057:10BF200008F530A594582222214BF302E1009F70BE 3057:10BF20000470000000000000C001F240ECA03FE0FF
3058:10BF30002BE40AF4121D40AF722C492F3082A00668 3058:10BF30000D48037D80F480336C0EC8033200DD9021
3059:10BF400030000000000000008805C48080A02C980C 3059:10BF40003BA02DF003FCC0FF003BE08EF0033C045F
3060:10BF5000083222080082002800033202C084B30C99 3060:10BF5000EC6031000CF003B0007000000000000045
3061:10BF600020C05832928C30A3202EC0481242620169 3061:10BF60008010EC00D9C12EE10D88023C80F88036AB
3062:10BF70007000000000000000C015A8008B002E20FB 3062:10BF70007D18A00228B0EA202220087702FD50BBDD
3063:10BF800008B00A200198002A220BB002E6009B00AC 3063:10BF80008022400BF4423D808831221208F602E004
3064:10BF900022C00AB012AC04AB002EC003B002F00005 3064:10BF900004300000000000008805CC0080112EC194
3065:10BFA00060000000000000000015E500C8003EB081 3065:10BFA0000800024D80B80020000A0282000099209B
3066:10BFB0000CB0032900C8003A204FB003E220FB0177 3066:10BFB00022C0093082CC00B30028CA0B34820D2085
3067:10BFC000B0C00CB0032C00FB023C410C9043480471 3067:10BFC0008000A08C083482A20170000000000000F4
3068:10BFD0007000000000000000E001A280FE403E0072 3068:10BFD000C015AC4099802EC20994022C00A980267D
3069:10BFE0000FF063EC00BFC417420FF003EC00FF003A 3069:10BFE000600838422220BA4162463BB002EC01BBF5
3070:10BFF0001FC10FB0035C00FB003F404FF000B800D2 3070:10BFF0008022400BB0460C1888C0222208B006F000
3071:10C0000060000000000000004010A502C8003E9043 3071:10C0000004600000000000004015CC00C9813CC164
3072:10C010002CB00B0106CB013E505FB0132110CB00BA 3072:10C010000CA9236C00B28032780A8A0B26009901A1
3073:10C020007EC00CB00B2C00CB0032C00C900310046F 3073:10C0200030E00DB003EC00B9003AC01EB0032C00A4
3074:10C030002000000000000000C80528018BD02C342F 3074:10C03000CB8032610CB0139004700000000000004F
3075:10C0400048FF023000AA042E690FF0036810DF00D9 3075:10C04000E001BC10DD003FC20FE803AC00FE003D84
3076:10C050002FD40DF0023E005F04B6C008B00372009A 3076:10C05000400FC043F810EF14B7E00CF003FC00F5FC
3077:10C060004000000000000000E005699081802C0085 3077:10C06000023F444FB04BFC02D4043D402FF003F894
3078:10C0700048B802080999004CB00B30020C008B0044 3078:10C0700000600000000000004010AC00F9083E60C5
3079:10C080002CC009B0400C40830000400A90023000F0 3079:10C080000DA003AC00E85032000C8403A500E900C9
3080:10C0900050000000000000002001160084882DE4FC 3080:10C090003AD80FB0032C00F9003AC00F30032C003F
3081:10C0A0004839021600B4802DE00A7B065E009780B6 3081:10C0A000CB443ED40EB003D00420000000000000BA
3082:10C0B0002DE20978021E90978025648A7802480054 3082:10C0B000C8052C08B9802EC00A30423C008904769D
3083:10C0C000400000000000000048080D0081102C9680 3083:10C0C000600890622000820422D008F0437C00BB0C
3084:10C0D0000831230C0090203CC41BB8020840C30068 3084:10C0D0008222400BF0423C008AC02EC108F002F2DE
3085:10C0E0002CC40D30030E40C31030C04E10071A127E 3085:10C0E0000040000000000000E0054C10B2D02CC061
3086:10C0F0000000000000000000401DBC007D053FC5A1 3086:10C0F0002918028C04A100249C0810028000A101D0
3087:10C100000FB10BF400EF001F450FF043FC01FF409F 3087:10C100000CC12B30528C04B30128404B30024C0040
3088:10C110003DC41FF006FC10FF003BC12DF103D0060B 3088:10C1100090202C200A3002F800500000000000009F
3089:10C120006000000000000000A805EC04CB043EA065 3089:10C1200020411E00B7A225E88A68021E00858025EE
3090:10C1300044B6032804CB8032800FB3936008FB2001 3090:10C130008088E8023E0085802FE4287802DE00B780
3091:10C140003ED21FB3032D80FB617E408C98032A00F2 3091:10C140008061E00378025E82B7822DE0087802C841
3092:10C1500070000000000000004811840C86052DC00E 3092:10C15000004000000000000048080D00F0103C8086
3093:10C1600008F4828C908500A1C00BF0025C003700BF 3093:10C160000D10838C00E25026040C11038840EB0074
3094:10C170002DD00B71021CC8B7482D400A7002120462 3094:10C170003CC40F30038C00F30838400730036E4096
3095:10C180006000000000000000C0009E0087802DA11C 3095:10C18000D0083C880E3043D20200000000000000BE
3096:10C1900060784A16D0A78029E00B78529601B790B4 3096:10C19000401DBC00FB343CC94EB023ED20FB043FE6
3097:10C1A0002DE80B7A225E40B7A02FE14850223000E4 3097:10C1A000C88F70534C00EB1031C50EF4036D00F3D3
3098:10C1B00020000000000000004814CC1083842CC034 3098:10C1B000003FC00FF40BBC00CD003FC00FF483D094
3099:10C1C000083002A41083CB28E00B302A4F409300A4 3099:10C1C0000660000000000000A805CE04C904B0C14C
3100:10C1D0002CC00B30024C10B3022CC0AA3002120447 3100:10C1D0000F98136C90CB023EC04FB063E400F18027
3101:10C1E0003000000000000000E815B800CEA03F803D 3101:10C1E00012C00CB503ECC0CF8332400FB3232DA493
3102:10C1F0004CA02B3A00CE403BB80FA003B900BA00C8 3102:10C1F000FB003E000FB4032A0070000000000000A6
3103:10C200003E800FA0036800FA007E801CA00B3A0459 3103:10C2000048119C00870021C02D60021C00D7003916
3104:10C2100060000000000000004800E002F8003E045A 3104:10C21000C00B6002DC00B50021C02A7012CC808700
3105:10C220008F0003E04AF81026180F8003A080F80260 3105:10C220000035C00B72521C00B7002D410B320212B8
3106:10C230003E008F000BA000F8023E000F8013D200DA 3106:10C230000460000000000000C000BE0081C0232098
3107:10C2400030000000000000000810E420C900324067 3107:10C240000BD8025E0006C02DA00B7C12DE08BF805A
3108:10C250004D99032400C9023E680F90022400E900B2 3108:10C25000A1E22A7A02DE00938025600B781E5E50F0
3109:10C2600030408C90030440C9003E400C900302040F 3109:10C26000B7802DA00B7802300020000000000000F5
3110:10C270003000000000000000800464208906225085 3110:10C270004814CE00836020C00931022C00930028AE
3111:10C280008B9CC22400D9012E400B90422408B90196 3111:10C28000C01BB006CC80B34820F00A3002EC00930B
3112:10C2900022460D900A260289002C400A1002200036 3112:10C290008024C00BB0024C10B3C82CD28B300212D9
3113:10C2A00010000000000000001801060091404270DC 3113:10C2A0000430000000000000E815BB00C6C4318166
3114:10C2B0000B90122C028B002E400B1022E410B100C8 3114:10C2B0000FE0036800CE803FA20BE803F900FE40C8
3115:10C2C000A240489012240899022E400890020600CD 3115:10C2C00031806EA007E800DA0026810FA002680125
3116:10C2D0004000000000000000080404929120E048A3 3116:10C2D000F6E03D920FA0033A046000000000000069
3117:10C2E0000B1202040291102CC00B100684C0B11076 3117:10C2E0004800E0C2F8043E140F8013E010F8013E4D
3118:10C2F0002048891102058091402E442A94020201AF 3118:10C2F000100F8043E000B8003E00478003E002E8F2
3119:10C300000000000000000000B80D6140D85030145B 3119:10C30000103E000F8007A000F8002E000F800BD217
3120:10C310000F850B21E080403E000F878BE10CF86C0D 3120:10C3100000300000000000000810E400F901324085
3121:10C3200032008406832004D8283E100C00032E031C 3121:10C320008C9003E400C90036420F9003A400C900BA
3122:10C330005000000000000000981DF440AD103F4583 3122:10C330003E420D90036400D9003E400F900B640014
3123:10C340000F9103FC187D201F410F900374C0F92149 3123:10C34000F99032410C90030204300000000000001C
3124:10C350003E440F9201E440E9003D484FD003E60619 3124:10C3500080046400B9C8A2600A9202E40089402EF9
3125:10C3600070000000000000001805F780FDE0337049 3125:10C36000580B90020400D9002E42089002E4048980
3126:10C370000CDA032620C94031400E9A032400F980CC 3126:10C37000002E400B90062404B9082A404890122051
3127:10C380003B600F9C8336A0F9A1B0400F9103C6001B 3127:10C38000001000000000000018052400B91022442D
3128:10C3900070000000000000003810E290B8A02228D1 3128:10C39000089002E400890022458B9002A4008900E5
3129:10C3A00028880A220288A02200088802C280B88851 3129:10C3A0002A40099002E40099802E400B9026240038
3130:10C3B00022040B8E032280B8D02A200B8802CE04E0 3130:10C3B000B9012270091002060040000000000000D0
3131:10C3C00030000000000000000805C580B161005881 3131:10C3C00008040408B12020400A1002C48083002C15
3132:10C3D00048168A04A0890122401A14880420B1401A 3132:10C3D000504B1002240091002E40081202C48181AB
3133:10C3E00028400B100A0420B12C204A0B1202C20173 3133:10C3E000A26C400B12020480B9202A4829120202D2
3134:10C3F00070000000000000001815A590BB40204010 3134:10C3F0000100000000000000B80D6140F80032802C
3135:10C40000089002244089426258081002E500B903EE 3135:10C40000088003E142C80032001F8503A140C850E4
3136:10C4100022C00B9002A41431002A440B9002C604DF 3136:10C410003A008D85036140D8003E000F050321409E
3137:10C420006000000000000000A010A500F9013240EB 3137:10C42000F85032140D850B2E035000000000000060
3138:10C430008C90032700C19430400E90032400F90033 3138:10C43000981DF404FD103F400F5003C440FD003F21
3139:10C440003A400F90032400F9003260079027E80576 3139:10C44000510FD003F400FF013D400F9103E440FD84
3140:10C4500020000000000000002800A418F900BE44DD 3140:10C45000103F4A0F9103E440FD103F440E9103E664
3141:10C460000F9003C400F900BE618F9003A400F10097 3141:10C4600002700000000000001805C500CD0031403A
3142:10C470001E400F10032408F9007E400F9003CA00ED 3142:10C470000DD043E400CD0033404F1102E404C1006D
3143:10C4800020000000000000002810A181F800320404 3143:10C480003D400C9003E400EDA432500F9003E40013
3144:10C490000C00D32100D8043A149C80032101C80069 3144:10C49000FD003F400F9003C6007000000000000048
3145:10C4A00036000C80132010C80032002C8003CA0410 3145:10C4A0003810E208D8003201008012C0004800367F
3146:10C4B000200000000000000028043A00BE8423850C 3146:10C4B000800B8A02E000A8002E000F8002E00088B6
3147:10C4C00008EC8368048A002F904DA0022801DA004E 3147:10C4C0005034280B8002E000B8002E000B8002CE12
3148:10C4D00023B00AA0022A08DA0122800FA002CA00B3 3148:10C4D00004300000000000000805C48081002640F0
3149:10C4E000000000000000000028054C00BBF020C048 3149:10C4E000091802C408210028408B1002C400B101C1
3150:10C4F000083C0A0C00930128C88930064C008302CE 3150:10C4F0002E40181002C400A10120481B1002C400E5
3151:10C500002CF60830020400A30020C00A3002CA0042 3151:10C50000B1006C400B1012C201700000000000006E
3152:10C51000500000000000000020011D11B300A0C069 3152:10C510001811A4009980A242489002E400A92A269A
3153:10C520000850025C1087016D814932521EC387009A 3153:10C52000440B9082C481B9002E400B9042C4008914
3154:10C5300028E00A32261F00370023E00B7202C800F1 3154:10C530000026400B9002E400B9012E410B9002C688
3155:10C54000400000000000000028081200B7823120DF 3155:10C540000460000000000000A015C520C984307000
3156:10C550000808370F08D7E03960197A0B5E0C83B2F0 3156:10C550000D9013E402E90032700F9403E400F940F7
3157:10C560007DE00C7A0B3E02AFA0B1E00E7A03CA0266 3157:10C560003C480C9003E400E10032400F9001E400ED
3158:10C570000000000000000000081DA010FB003EC0ED 3158:10C57000F9903E600F9026E8047000000000000073
3159:10C580006FB043EC11FB003E400FB503EC20FB50B5 3159:10C580002801A500F1043A448F9003E410C9043E49
3160:10C5900036000FB543E5A1DB783EC00FB403C206F9 3160:10C59000600F9003E400E9203E400F9003E410F99F
3161:10C5A00060000000000000004005FE00FFA03FA06A 3161:10C5A000903E400F9003E400F9803E640F9007CA6C
3162:10C5B0000DC9133E00CFD03DE802FF133E00CF82ED 3162:10C5B00000600000000000002810A100C8043A003C
3163:10C5C0003F600CFC233E10EF8033F20CFC83100024 3163:10C5C0001E80038003C8402A041F800320008800C7
3164:10C5D0007000000000000000A8119C40B5012DD0A3 3164:10C5D00032300C80032000F8003E000C8003E000A5
3165:10C5E0000858021C4057102D5A283102BC019710E0 3165:10C5E000C8803E200F8003CA042000000000000025
3166:10C5F0002D000A70028404CF0029C00AF0022A0428 3166:10C5F00028053800AED0378008EC463800D6042332
3167:10C60000600000000000000000009000B72A2D82AA 3167:10C60000A00BA0417804FA0037800DA002A810EE1C
3168:10C610000842223C0087110DCC8832021D00970091 3168:10C61000212E8008A002E8088E802FA08BA002CADD
3169:10C620002CC40830021400A70023C0097082000047 3169:10C62000004000000000000028014C0283C0A8E880
3170:10C6300020000000000000006014C020B0202C503A 3170:10C630004A36028C0013A028C20B30060C00B3004F
3171:10C640000810022DC093E22C210830020E0893003E 3171:10C6400024840930020C00B32028C0093002CC0039
3172:10C650002C400A30028C0093002AC00B30021804D0 3172:10C6500083802CC00B3002CA0100000000000000E3
3173:10C660003000000000000000A815AC00F8C03E80BB 3173:10C66000A0013C44AF4025C248F8821CC89F082165
3174:10C670002CA00B3F00C7603ED00CF00B3C00CF005D 3174:10C67000C08BF8025C00BFB02780093A029C00A57D
3175:10C680003E800CF00B2C00EF0033C10DF00B2A04A0 3175:10C68000022DE8097002CE8085082DC20B7302E8E6
3176:10C6900060000000000000008000EC40F3403E50CD 3176:10C690000040000000000000A8081E00C782A9E0BA
3177:10C6A0008EB403EC10FB003E090FB013EC42EB001C 3177:10C6A0000A78029E40978439A00B7A833F80D79105
3178:10C6B0003C008FB013C411E3003EC00EB003E00095 3178:10C6B00035A00D7A091E44F7803DE82D7A03DE820D
3179:10C6C00030000000000000000110FC00FC8031225E 3179:10C6C000C6803D204B7B23EA0200000000000000F2
3180:10C6D0000CA8033C00CF0033A00EF003DC00CF0019 3180:10C6D000081DAC00D3003EC10F3003ED80E3003EE7
3181:10C6E0001FF00CF003F400CF0233C00CF002005432 3181:10C6E000800FB621EC08DB213E800FB5036C40F9CA
3182:10C6F000300000000000000081046F00BBC0227009 3182:10C6F000003EDC0EB203ED40F9023E800FB003C2F3
3183:10C700000AB9422C108B00761183B002EC10AB00FA 3183:10C7000006600000000000000005FE00CF803DE054
3184:10C710002EB00AB003EC048B00A2C028B002204067 3184:10C710000FC843FE00FE843FE00DF8C3FF10AF904A
3185:10C72000100000000000000080056540B820224491 3185:10C7200035A00CFC033E14EC843FF00EFCC3FF0864
3186:10C7300058340A2C008B0022844BB002EC008B0092 3186:10C730004F8033E40CF8030000700000000000009C
3187:10C740006EC008B042E6048B0002C0083002A001AF 3187:10C74000A8119C00D7A22DC40C41C2DC00740025A6
3188:10C7500040000000000000000C000000B10020C0FC 3188:10C75000800F7242DC90D7382D980A70021C048634
3189:10C760000A300A0C008B0324800B3002CC00A3009B 3189:10C76000003FC00D7002CC00860837C62870022A30
3190:10C770006C000A30028D00830020C0183002820055 3190:10C77000006000000000000000009C0087602DC2E7
3191:10C78000000000000000000000086400F800300015 3191:10C780000A5002DC00B61025C2097086DC30970022
3192:10C790004CA00B2C02CF0022400EF503FC00CF0171 3192:10C7900025800830025C0087082DC0087002CC405C
3193:10C7A0003E000CF012DD02CF0233C04CF00B8003D0 3193:10C7A0008600210009700A0004200000000000003B
3194:10C7B0001000000000000000A419F000FC003F4041 3194:10C7B0002014ED8093000CE1281802CC08A000247E
3195:10C7C0000FB103DC00BF013F000FF223FC10FF009C 3195:10C7C000121A3402CF0493402C800AB0224C02810A
3196:10C7D0003F000FF001F484FF003DC04FF0136806E6 3196:10C7D0008028E0283002CC008882242008B002089B
3197:10C7E0007000000000000000C005FE40DF8033C87C 3197:10C7E0000430000000000000A815BF20C9E02CF1B3
3198:10C7F0000CF8033C0A9FC03FF008B8023E00FF80DF 3198:10C7F0000EBD03FC00B940364009F502FD40FF8044
3199:10C800003FD80CF9612E406F903FE48FF1833000E8 3199:10C8000036A208F00B7C00EB802FE00AF043FC021C
3200:10C8100070000000000000008010EC048B8023F00A 3200:10C810008BD032F00DF0032A04600000000000000D
3201:10C8200008B8023D40AB000E084822826C20BB00D5 3201:10C820008000EC10FB003EC80F9413EC00F940367A
3202:10C830002FD048B0022C00BB002EC10BB002300438 3202:10C83000401FB003EC10FB013ED00FB003AC00F979
3203:10C8400030000000000000008805CC028301A0C574 3203:10C84000003EC40FB001EC00F9043E480FB003E015
3204:10C8500008B04A4CA0802428C80932024C00B30812 3204:10C8500000300000000000000110FC00DF003FC0BD
3205:10C860002ED129B23A0C84A3212CC84BB20A320132 3205:10C860000CE007FC00FC0A27004FF003FC00FF0867
3206:10C870007000000000000000C015AC088B0022C052 3206:10C8700033800CF0002C005F0033C00CF001FC0092
3207:10C8800008B0024C008821242109B0466C00BB0688 3207:10C88000FE0023400FB00300443000000000000011
3208:10C890002EC009B0022C10BB002EC00BB002300419 3208:10C8900081046C008B862EE0488F02EC08B8A0362D
3209:10C8A00060000000000000004015EC00CB0032C02A 3209:10C8A000304BB003AC0C9B023CA00CB0436C00B10D
3210:10C8B0000CB9026C00CBC83AC02D900B2C08FB00C1 3210:10C8B0000028C00DB012EC10B980A2610BB00220AC
3211:10C8C0003EC00D30422C00EB003EC00FB013000400 3211:10C8C000401000000000000080052C009B882EE036
3212:10C8D0007000000000000000E001BC00EF003DC05F 3212:10C8D00008A002EC01BB8026620BB002EC00B301A1
3213:10C8E0000FF003BC06EF823F404EC983BC00FF003F 3213:10C8E0002A2108B0122C00B80022C008B012EC14A3
3214:10C8F0007FC01CF0137C00FF043FC00FF003F80062 3214:10C8F000B98422A20BB002A000400000000000009A
3215:10C9000060000000000000004010AC00FB023EC0D0 3215:10C9000008040C0493002CE0080002CC09910020DC
3216:10C910000EB003AC20D8403EC08C900B2C00FB0026 3216:10C91000400B30064C0413002600083002CC04B251
3217:10C920003EC90DB033EC08FB023EC00FB00B5404FF 3217:10C92000002AC0013000CD00B00020800B300A0288
3218:10C930002000000000000000C8052C00B3002FC03C 3218:10C930000100000000000000000D6C00DB246EC050
3219:10C940000B3012FC0088A02E402894022C10BB044F 3219:10C940002CA002FC00BA0426404FF057FC003F0127
3220:10C950002DC028B002EC00BB002EC00B72063200C6 3220:10C950003A002CF0013C00DB0033C084F003FD08FA
3221:10C960004000000000000000E0056C00B3002CE077 3221:10C96000FA0032000FF00300015000000000000048
3222:10C970000A1002CD0093002CC008B0024C00B30096 3222:10C97000A019DC00EA403F0007C003FC04FC003FB4
3223:10C9800028C0083002CC00B3002CC00B30023A00A3 3223:10C98000400FF0039C00FF003F000EF0037C00FD11
3224:10C99000500000000000000020011E40B7802DE282 3224:10C99000003FC10FF003FC84F4003F000FF003E8F8
3225:10C9A0000B5802DE0297812FA00868025E00B78153 3225:10C9A0000470000000000000C001F080FF0003C21E
3226:10C9B0002FE0087902DE00B7812DE00B78023C0001 3226:10C9B0000FC2033E00DFC03EC04DDB02B0C0DC3022
3227:10C9C000400000000000000048080C00F3003CC0DC 3227:10C9C0003FE00FDB23F620FF2633E00F52035E002B
3228:10C9D0000E3203CC80D3003CC40C39034C08F31A4C 3228:10C9D000FF8033C04C4903300070000000000000AD
3229:10C9E0003CC60D3003CE20F3083CC00F300352028A 3229:10C9E0008010E1E0B70823F00BAD0A2E009A042E68
3230:10C9F0000000000000000000401DAC00FB002EC045 3230:10C9F000B0098F03A040B9302EA00B9F03A700BB46
3231:10CA00000BB003CC20EB003C800FB041AC00FB002E 3231:10CA00008026E00BDD022E00BB8022F40A9202A0F9
3232:10CA10003CC20FB003EC40FB003EC00F3003D00619 3232:10CA100004300000000000008805C880B31024C066
3233:10CA20006000000000000000A805EE02C38030CEC8 3233:10CA20000B8002AC00A3242CD0081006C080B201F9
3234:10CA30000D9803ACA0C380B2C00FB003EC00FB00A4 3234:10CA30002CEA4B0012C204B31008C00A90020C008A
3235:10CA40003ED24FB0092E084B013EC024B003EA008D 3235:10CA4000930424C0098202A20170000000000000CB
3236:10CA5000700000000000000048119C00870121C008 3236:10CA5000C015A500BB0022C00B8002AC08BB182E7D
3237:10CA60004850124C00870035C04B6002DC04B7010F 3237:10CA6000E0188802EC01BA002E800B9886E200BB29
3238:10CA70002DC00B70021C0087002DC10C7202F20445 3238:10CA70000022C40B90026C00BB00A6C00B9000B05B
3239:10CA80006000000000000000C0009E00878023E0DE 3239:10CA800004600000000000004011E700FB00B2C09D
3240:10CA900008F802DE808F8121E04B7812DE043780B7 3240:10CA90000FA803AC02EB003E600D9E03EC00D840F3
3241:10CAA0002DE80BF8023E1887802FE0097902E0009C 3241:10CAA0003E400F8843E200FB2032C00F100B6F9016
3242:10CAB00020000000000000004814CC008300A0C04B 3242:10CAB0005B8236C02D080190047000000000000069
3243:10CAC0002830424C00830024C00B3806CC04B3004D 3243:10CAC000E001B708F7003FC00FF9037C08CF823CB4
3244:10CAD0002CC00B30020C0283002CC0083002D204A0 3244:10CAD00000AFD021BC08FD103F808FC003A400F739
3245:10CAE0003000000000000000E815A800CA003180F6 3245:10CAE00001BFC007D003BD30FFA438C00EDA03F881
3246:10CAF00008E0029802CE0033840BEA03E800BA0093 3246:10CAF00000600000000000004010A800FB00B2C170
3247:10CB00003F810FA0032800CA003E800DE003FA0415 3247:10CB00000E8103EC40FB443AC10E9503E000CB419B
3248:10CB100060000000000000004800E000F8003E0057 3248:10CB1000324D0F8103E020C90072E84491036D009B
3249:10CB20000E8423A000F8003A100F8003E000F80004 3249:10CB2000CB023EC00C8003900420000000000000F7
3250:10CB30003E100F8013E000F8003E000D8003D2008D 3250:10CB3000C8052400BF0033C4081D038C00BB983611
3251:10CB400030000000000000000810E401F9003E4041 3251:10CB4000484D9822ED40DB0036B00B9802E300DB45
3252:10CB50000C9A13E400C9003E400C9823E480F900CD 3252:10CB50000032E088D8022C02C3802FC008900372F4
3253:10CB60003E402C98036400F9003E400C9003C20440 3253:10CB60000040000000000000E0014400B30020F09D
3254:10CB7000300000000000000080046404B9002E4072 3254:10CB70001808024F84B1C024C0890602C400910085
3255:10CB8000689C22E40289017C508D9822E480B920BF 3255:10CB800020F01B1882C60093002CD1081E020E4410
3256:10CB90002E5048100B2500B9442C40289000E0008E 3256:10CB900093942CC0082002B8005000000000000050
3257:10CBA000100000000000000018052400B9002E50FD 3257:10CBA00020011E04B78020E20868069E80BF84250D
3258:10CBB000089002E40489002E500A9202E400B900B1 3258:10CBB000A8096802C60093A065E40B7812DE009312
3259:10CBC0002C400891022400B9002E40089002C600B3 3259:10CBC00000A1E008D8021ED0A7802DE008F8024896
3260:10CBD000400000000000000008040500B1012C40E6 3260:10CBD000104000000000000048080800B32030C0EA
3261:10CBE000483002E40081002A404B1002C400B1002A 3261:10CBE0000A2202CE40F3A03CE80B3002C100D0C1C3
3262:10CBF0000CC00890020C00B3002E40481202C20183 3262:10CBF00030C00B2113CC21D3002CC02C100B0C8087
3263:10CC00000000000000000000B80D6000B8013E0008 3263:10CC0000D3613CC82C200392020000000000000009
3264:10CC10001C8007E150C8502E141E8503E141F850D6 3264:10CC1000401DBC00FF403BC00FE003FC00F7507F0D
3265:10CC20003E140C85132148F8503E140C8543EE0346 3265:10CC2000C42EF003FC40FE003FC00FF047FC00FFA5
3266:10CC300050000000000000009819C400F9003E51A7 3266:10CC3000007DC20FD001BC805F003FC00FF003D069
3267:10CC40000F5003E500FD003F401DD003F410F90034 3267:10CC40000260000000000000A805E400FBC032C83C
3268:10CC50003E500F50009400F9003D400F9103E6064E 3268:10CC50000EE003ACA0EB2032408CA0132C00D900D6
3269:10CC600070000000000000001801E450CD003160A9 3269:10CC60003E600CB003E800FA8030C03C9203EF60F5
3270:10CC700004D0033680C1422E501F9403E500E90220 3270:10CC7000C32031C40CA0032A007000000000000093
3271:10CC80002E720A90220508E9403E50409C0326007F 3271:10CC800048119C00332021DA0B70439C01B5002130
3272:10CC900070000000000000003810C28288002215D9 3272:10CC9000000AE0021C00B7002FC00D70039C00B614
3273:10CCA000088002235888A02E280BAA42E28288809E 3273:10CCA0000031C8085702DC00875021C00A70429248
3274:10CCB0002E382888022280B8A03A2808CD020E0417 3274:10CCB0000460000000000000C0009A11B79021E05D
3275:10CCC00030000000000000000805C4008100A640FC 3275:10CCC0000B6882DE08A78024600870121208958025
3276:10CCD00028100A242695000D400B50027400850888 3276:10CCD0002D60096C02DE00B18023E00A5862FE007C
3277:10CCE0002F4079D2AA1400A5012F4038500212011A 3277:10CCE00097A021E809E802301020000000000000B1
3278:10CCF00070000000000000001815A4048900264000 3278:10CCF0004814CD00B30020C08B3C028C00BB002444
3279:10CD000008910224109D082F400BD002F4008D02E0 3279:10CD0000C41A3D022F88B3482CE0893E028D8093DF
3280:10CD10002F4009D0003400BD000B401870020604FB 3280:10CD1000D9A440881002CC0493C820C00B300292E2
3281:10CD20006000000000000000A015C400C9053641E5 3281:10CD20000430000000000000E815B940FA00B280AD
3282:10CD30004C90632400D9003E400B90034408C90086 3282:10CD30000FE003E800EA8037A00CE8133B08DE01AF
3283:10CD40003E401510032400E9003C400C90032804E9 3283:10CD40003F820CE043FA80FE8031280CA003F00201
3284:10CD500070000000000000002801A404F9003A401F 3284:10CD5000C4C0B2800DE0033A04600000000000008F
3285:10CD60004F9803E400E9993E404F9003E420F90A0C 3285:10CD60004800E000F8003E100B8083E000F8303A05
3286:10CD70003E400E90436424F9083A420F908BDA004B 3286:10CD7000006D8083E144B8043E100F8013E000F89A
3287:10CD800060000000000000002810A000C800120091 3287:10CD8000003A104F0403E300E8103E000E8003D287
3288:10CD90000C8043E000C84032000F8453E010F800DC 3288:10CD900000300000000000000810E400C900384026
3289:10CDA0003E000D80232000D8003E000F80030A04BF 3289:10CDA0000F1A032E00FBA036600C9803E604D10096
3290:10CDB0002000000000000000280538028200A18841 3290:10CDB00036480E9102E600F9003E000C99036240ED
3291:10CDC000086022C8008A4036A10BA002E910BA44CC 3291:10CDC000F800A0680C90030204300000000000008E
3292:10CDD0002C800CA41229028A442E980BA4020A006B 3292:10CDD0008004640289042E64889402A500B980202E
3293:10CDE000400000000000000028054C10830020E0F7 3293:10CDE000640D9C02E642890022600B9C02E410B9AB
3294:10CDF000183092C408934020E00B3002CD00B340BD 3294:10CDF000403A50089C022720B900224008100360E6
3295:10CE00002CC00B3A42CD0083402CD00B38024A0094 3295:10CE00000010000000000000180504008900224006
3296:10CE10005000000000000000A0411C00870021C05D 3296:10CE10000A9082254CB9000240089602E41089006D
3297:10CE2000287002D1009D8025C24B6002DC08B70249 3297:10CE20002650139402E440B9082E4008908A24004A
3298:10CE30002CC00A7402FE0087002DC00B340268006B 3298:10CE3000B9012A40089002060040000000000000EE
3299:10CE40004000000000000000A8081E00C78431E078 3299:10CE40000804058081402CC80810068400B1042025
3300:10CE50000C6803D600978031A00F5813DE08F782C4 3300:10CE500049091442CC89812020500B1446C400B1EA
3301:10CE60003DA00FF80BDE00C7803DE00F788B6A0213 3301:10CE6000002AC02814020101B0042840389402426C
3302:10CE70000000000000000000081DAD80F3003EC16E 3302:10CE70001100000000000000B80D600088003A00BA
3303:10CE80000FA023C002E9003E810F8003EC00FB00ED 3303:10CE80000E80232000F850B2000C8012E140D850F0
3304:10CE90003EC00DB0132C00EB003EC00FB003820269 3304:10CE900036000E8003E000F8002E000C8053600482
3305:10CEA00060000000000000000005FF32C780336012 3305:10CEA000F8003A000C80032E035000000000000040
3306:10CEB0000F78033EC84E8023640CF8033A00CE80FE 3306:10CEB000981DF440F9443E440FD403E400F1003FD0
3307:10CEC00013EC06D8033A00DE8033A40CC803D0006C 3307:10CEC000440FD453F444FD102F400FF403FD00FD34
3308:10CED0007000000000000000A8119C00871001C035 3308:10CED000403B100FD423D1047C4336500F5003E65F
3309:10CEE0000B7002185084002B4408601298008613BF 3309:10CEE00006700000000000001805A600F9102E6270
3310:10CEF00021C4885002188086002180086102EA045B 3310:10CEF0000FD283E400BD423E610FD003F6C0C9A249
3311:10CF0000600000000000000000009C00870021403D 3311:10CF00002B400CD0033400F9813E6808C143FA007D
3312:10CF10000BF1025C800600210088D0025C008700D3 3312:10CF1000F5803F620C140306007000000000000062
3313:10CF200020898AF1021C0887102181884802C600E6 3313:10CF20003810E12088112E100B8002E000B8822E0C
3314:10CF300020000000000000002014CC108304A0C1D9 3314:10CF3000100B8000E3C488F022000B800A2000E878
3315:10CF40000B300A480C88066038080442EC018B0458 3315:10CF4000402F14088802E200B8002E000888028EE4
3316:10CF500022C108300A2C008B002280002002D80455 3316:10CF500004300000000000000804C500A1002C40BF
3317:10CF60003000000000000000A815BC00C3002280B3 3317:10CF60000B1002C418B1226CD10B1026C40081082A
3318:10CF70008F9003640ACB02B2F2203512640AC90012 3318:10CF70002A408810020404B5C00F400B020241A0F1
3319:10CF8000B2400EA003240AC900A2402CA003EE0464 3319:10CF8000B1402C40081202021170000000000000A5
3320:10CF900060000000000000008000EC00FB003C800E 3320:10CF90001815A40089062E400B9012E400B9402E0B
3321:10CFA0000F9003A500DB403ED04DB413A408FB0155 3321:10CFA000400BB082C402894422400A90022400A9A6
3322:10CFB0003EC01CA0036C00FB043E504FA403E000E5 3322:10CFB00000274809B012EC18B9012E4040900286B3
3323:10CFC00030000000000000000110FC00FF0033C032 3323:10CFC0000460000000000000A015E784E9013E4075
3324:10CFD0000CE8432600DF80B3E00FF8037C00CD00AF 3324:10CFD0000F9003E400F9003E720F9003E7608910A0
3325:10CFE00033040CE0233440CD0023400CE003E00484 3325:10CFE0003A400C90032400F9443C402D9003E76044
3326:10CFF000300000000000000081046C10BB00A2D2D1 3326:10CFF000F9713E40289003280470000000000000F2
3327:10D0000008280204608B1922C60EB18A2E408B902C 3327:10D000002801A448A9003EC00F9A43EC00F9207EF5
3328:10D0100022C108A4822C008B90226448A402E00064 3328:10D01000C80F9A07660079807E400F1C03E700E97D
3329:10D02000100000000000000080052C00BB00220062 3329:10D02000A03E40468003E020F9003C400F9003CA38
3330:10D0300008912E24009B0022C08BB012200488008F 3330:10D03000006000000000000028108000F8003A00A6
3331:10D040002240081022200088012AD0088042E000F7 3331:10D040000F8003A008E8403A100C8303A1C0F04011
3332:10D05000400000000000000008040C00B304208021 3332:10D050003E060F8403E100F8003B000F810320002F
3333:10D060000810060410830020C08BB012000082005C 3333:10D06000F810B2004C800B0A042000000000000001
3334:10D0700020C02810420906820028C0082002C201F0 3334:10D0700028052800BA002EB00BE802E9003E900215
3335:10D080000000000000000000000D7C00BB003240EA 3335:10D080008108E4127800BA002DB089E822F80CBAC1
3336:10D090002CB0032400D30032C05FB5030C02C100E2 3336:10D09000006E8003C5033000BA0022A808A0228ACF
3337:10D0A000B2000CB00B0500C100B8C02C8013E00327 3337:10D0A000004000000000000028054C00B30028E804
3338:10D0B0005000000000000000A01DDC00FF001FC0A9 3338:10D0B0001B31128CC4A3922C408834068E0093003E
3339:10D0C00087F001F400FF003FC00E7043FC107F00AA 3339:10D0C0002CF01931A2CC04B30028800138024C00A6
3340:10D0D0003FC00F7003FC00FF0037C00FE003E806FD 3340:10D0D000B38020E00AB012020050000000000000FF
3341:10D0E0007000000000000000C005F184FE6131D82E 3341:10D0E000A0011C00B7142D420B6002DC00B78127A1
3342:10D0F0000CB2C3FCE0CC807BC00EF1037CE0CC839F 3342:10D0F000E01860025818B7222D80097022DC00B7B2
3343:10D100003F200FF0CB3244DC843F254CF24330000B 3343:10D10000002D800B3B021DD0BF8028C08AF202A0F8
3344:10D1100070000000000000008010E448B01022DC25 3344:10D110000040000000000000A8081F80F7A039E2CE
3345:10D1200008B602FD92888523F440F102ED00882DB7 3345:10D120000F68039E00ED843DE24478039E00F7B44F
3346:10D130000E600BBC122C10A8822E000AFC22A00448 3346:10D130002DE00D6803D600F68039E00F79035E908C
3347:10D1400030000000000000008805C080B32228C025 3347:10D14000F78131602E7C032A0200000000000000FD
3348:10D15000083082CC0188002CC04A3202CC00010188 3348:10D15000081DAD00FB423EC80FA003EDA0BB003888
3349:10D1600028004BB002A00080002C090834026201A4 3349:10D16000C80FB0036800FB113E4009B041EC00FA63
3350:10D170007000000000000000C015AC04B2102AC10D 3350:10D17000023EC00FB20BED803B0036400DB02342A3
3351:10D1800008B002EC10898022C008B002EC088800C8 3351:10D1800006600000000000000005FF00CFD033E47F
3352:10D190002E4083B002A040B9802C210AB002F004D6 3352:10D190004FF903DE40DC8036E40CB913FE00CF907B
3353:10D1A00060000000000000004015EC00FA00BAC06A 3353:10D1A00037E50FF843FE00CF923FA40F78031F002E
3354:10D1B0002CB043EC00C0803EC08EB0034C0CC810B5 3354:10D1B000C58033600CF82000007000000000000003
3355:10D1C0003E808FB0038210D8823E280CB00B5004F2 3355:10D1C000A811BC000F1021810B600384008B082183
3356:10D1D0007000000000000000E001B680FD0237C1D1 3356:10D1D000600A7B0398008B1029840E6422DC40D700
3357:10D1E0000FB003FC00FD003EC00FB053FC02FF0176 3357:10D1E000022D840B70021C00851821400AF022AA2F
3358:10D1F0002FA48BF0837C00AD022F40037003B80096 3358:10D1F000046000000000000000009C00A71469C04B
3359:10D2000060000000000000004010AC00FB0432C0D1 3359:10D200001A6012FC01A4102DC00A52024540870C7E
3360:10D210004CB0232C00F8403EC20CB0032C00FB4164 3360:10D2100021801B6082D400860325E01B70025C40E5
3361:10D2200032C20FB0432D00C8503E400CB00B10046A 3361:10D220009D0029400870020000200000000000005E
3362:10D230002000000000000000C8052F90B95003C076 3362:10D230002014CD00A30028C01B20228C11A300685D
3363:10D2400018F01A3C00B9322DE038F0603C04F900C7 3363:10D24000F60A3C068200838028840A8C82CC4492B1
3364:10D250003EF00B7C802C00D9C02E400DF002320035 3364:10D25000002CC00B30024E00910028400A3002889A
3365:10D260004000000000000000E0054B24B21002C1A5 3365:10D260000430000000000000A815BE22EF04BAC080
3366:10D270002830026C04B2C12CC00830000C00B2008F 3366:10D270000F1493EC02F1C33EF00E90836600CFD200
3367:10D280002824033C0A000082C82CA0083002380081 3367:10D2800032500F9C03CB00C9803E280FB0034F00E3
3368:10D29000500000000000000020011600B48021E4CE 3368:10D29000D1C0AAC00C71032A046000000000000085
3369:10D2A000487B025E00B6806DE24879221E40AC8465 3369:10D2A0008000EC20DB0026800FA003EC081B00367A
3370:10D2B0002DE00BFA00524096802DE8193802080044 3370:10D2B000C00F8601E540FB023A480E9403EC80F172
3371:10D2C000400000000000000048080840F310B0C40F 3371:10D2C000843E004FB003ADC0EB2036C00FB023E06A
3372:10D2D000083A024C90F3103CCC0831030C49B040A2 3372:10D2D00000300000000000000110DC00CF003F60C3
3373:10D2E00030050F3007214043013EC21C304312027B 3373:10D2E0000CE0833E80ED0833D08F50039E00DF00BA
3374:10D2F0000000000000000000400DBC10FC103FC505 3374:10D2F00033400CC0033000CC1033680CF0033C8486
3375:10D300000FF101BC04FF043FC40FB14BFC64F700F4 3375:10D300008D9030400CF00308443000000000000015
3376:10D3100037C00F7253AC44FF013FC90FF403D0066E 3376:10D3100081046C008B022CF408A8620C808B802A9C
3377:10D320006000000000000000A805EC08FA003EE0E4 3377:10D32000600F9C022E008B0020600D98022C80D88C
3378:10D330000CB0032C00CB023ECA0FB2072E00DB025A 3378:10D330000014400834122E008B8232400DB003607E
3379:10D3400032080F31032C00CB043E800C35032A0039 3379:10D34000401000000000000080052C008B002ED053
3380:10D35000700000000000000048119400B5002DC8C6 3380:10D3500008B8022C008A8422C00B8802E4A0830053
3381:10D3600008700A1C2287002DC90BF2829C80A6003F 3381:10D3600022620A98022800890022000AB1062C00D5
3382:10D37000098B0B700A1C0285002D40087002920474 3382:10D37000AB00224008B00260004000000000000046
3383:10D380006000000000000000C0009E00B7802CEC90 3383:10D3800008040C02A3002CC10820020C028B002808
3384:10D39000087B025E4085892DEC8B7B024E848F805A 3384:10D39000C20A00024410831022400B10060C0091B8
3385:10D3A00025640BFA02120897806FE1087A023000B8 3385:10D3A00004AA002830022C00A101204009B002424A
3386:10D3B00020000000000000004814CC20B3642CC002 3386:10D3B0001100000000000000000D7C008F003EC046
3387:10D3C0000830060C10838A6CC05B3042CC00AB1076 3387:10D3C0002CA0032940A84032CC8B8002E000CF4043
3388:10D3D0002CF20B30020D0093042CD508300A920475 3388:10D3D00032000E800A2000880022400CB0032C048A
3389:10D3E0003000000000000000E815BB00FEC03E80D9 3389:10D3E000EB00B2408CB0034003500000000000008E
3390:10D3F0002CA0036800C6403F800FA0026800CE4406 3390:10D3F000A01DFC00DF003F400FE003FC80FF283D44
3391:10D4000036904F60031B70DED83FA00C20033A0417 3391:10D40000C00BC103B014FF003F000DD003DC00FCD3
3392:10D4100060000000000000004800E040F8103E00FE 3392:10D410000037400FF021FC001D007B408FF003E03F
3393:10D420000F8003A010F8423E101F8003A000E80CFC 3393:10D420000670000000000000C005D200DF0031A03F
3394:10D430003A041F8003E000E8457E022F8003D200FB 3394:10D430004DF0433200CE141B680EDA23B2C02F0029
3395:10D44000300000000000000008106400E980324055 3395:10D440003FC22CE8033C40FD083BC84CF0833CA0A5
3396:10D450000F900B0408D98036400F10132408F900F0 3396:10D45000CF0033C40CF307F00070000000000000A0
3397:10D4600072700F91132410C9103E690C90030204CE 3397:10D460008010E2008FC022A008FD422F008B7022A6
3398:10D47000300000000000000080046408B9802240F1 3398:10D470001E48890227C08F5A2E50483002BDC0BDB9
3399:10D480000B1002240089C422520B90422400B900E0 3399:10D480004023C548F4823D2C877022C008F103E098
3400:10D4900022E00B90122404D94A2E60089003600009 3400:10D4900004300000000000008805E00093102681A1
3401:10D4A000100000000000000018052400B118224000 3401:10D4A0004930028040832028400A10028000A324D3
3402:10D4B0000B900224008B2026490B90026400B900D7 3402:10D4B0002CCA0832820C00912820CA1B32020C8828
3403:10D4C000A2400B908A24008B002C40A890020600FA 3403:10D4C000830920C8093202E2017000000000000058
3404:10D4D000400000000000000008040484B120A048BF 3404:10D4D000C015A3148B04268908B002AC228B882ABD
3405:10D4E0000B11060400830000404B11020449B110E7 3405:10D4E00020089882A610AB002ECA08B082AC00B902
3406:10D4F00028400B1002244191002C500810024201D8 3406:10D4F0000022C029B00A2C018B0022C009B022F002
3407:10D500000000000000000000B80D6940E85032142F 3407:10D5000004600000000000004015E300DB0034E28E
3408:10D510000F869321E2C800360A0B868B61A8F8407B 3408:10D510000DB003A300CA80BA700E8803A600EB000A
3409:10D5200022800F82A32108C8023E000C80432E03F4 3409:10D520003E900CB5032C00FB10BAC00EB0032C02C9
3410:10D530005000000000000000981DF448FD123E4419 3410:10D53000CB0232C009B002D004700000000000002D
3411:10D540000F1203C4007D011E400B9203E480F520FE 3411:10D54000E001B008FF00BBE00F70036500F4003598
3412:10D5500036400F9003D4907D003D400F9403E606C3 3412:10D55000400F40035400DF003E400FF803EC00F79B
3413:10D5600070000000000000001801F6C1DD88327272 3413:10D56000013DC10E3003EC00FF003FC08EF003B858
3414:10D570000C98032622DD003F622C998346A0C94007 3414:10D5700000600000000000004010A040EB083E806A
3415:10D58000B2400FD8032400FD0033512CD88306008D 3415:10D580000DB003E000C8003A510F82036420DB00B5
3416:10D5900070000000000000003810E3C288C0223094 3416:10D590003D820CBC032C10DB0072C00DB1030C20CB
3417:10D5A000088C4222118A012E00088852230080A391 3417:10D5A000D30032C00FB00B50042000000000000078
3418:10D5B0002A004B804222A0B80022280884028E0450 3418:10D5B000C805010087C02EA808F112C540880022C6
3419:10D5C00030000000000000000805C400812D204844 3419:10D5C000400B84022700AF002EC008BC123C008B29
3420:10D5D000681480042081002E400B12120424812044 3420:10D5D0000123C028F54A3D28DF0033C04BF0033259
3421:10D5E00020400B94320490B900204048104A0201B8 3421:10D5E0000040000000000000E0054880A3902C00EF
3422:10D5F00070000000000000001815A40089202240DF 3422:10D5F000083002C100920428000B14124300B30447
3423:10D60000089012240089002E4008900224088940C6 3423:10D600002C300AB00A8C00930060C0083C060E0162
3424:10D6100022500BB0022420B909A2440890028604CB 3424:10D61000B3002EC08B300638005000000000000020
3425:10D620006000000000000000A015E400D908B2402E 3425:10D620002001120087802D24087802D200958021E5
3426:10D630004C10230404D9C13E408F900B0408C14014 3426:10D63000A00B68025A2087802D661A7C029E008704
3427:10D6400012400F90432404F14130780C90032804D9 3427:10D640008021E11879029E40B780A1E00B78024862
3428:10D65000700000000000000028018664F9803E4050 3428:10D65000004000000000000048080000E3A03C403B
3429:10D660000F900BE400F9983E402F1003A402F9102C 3429:10D660000C3003C422D90038D40F30836840F30053
3430:10D670003E400F900BE640F9903E600F9003CA00C9 3430:10D670003C800A32028C00DB00A2C40C30030C0098
3431:10D6800060000000000000002810A000C841320027 3431:10D68000F3003CC00FB103120200000000000000D4
3432:10D690000C80072010C8103E0C0E8003E004C80068 3432:10D69000400DB000FF103F400EF003FC00ED003FD6
3433:10D6A000BA000F81432000F8703E000F000B0A04FF 3433:10D6A000C00F3013BC407F103FC12DF0037C00FB46
3434:10D6B0002000000000000000280539028E20A38011 3434:10D6B000403FC20EF4837C00DF003FC20FF00390B6
3435:10D6C00028E00A3810AE043DA18EE002F8008E007A 3435:10D6C0000660000000000000A805EC00DBA032C0EE
3436:10D6D00076800B60037800BE402F820BA003CA0047 3436:10D6D0000DB703E000CA043E800FB8032C10FB0016
3437:10D6E000400000000000000028054D008B8822C08B 3437:10D6E00033008DB0032C80E9403ED20FB4032D806F
3438:10D6F0001830020C0083442CD01B3012CC0683005F 3438:10D6F000EB20B2C00FB203EA00700000000000008F
3439:10D7000020C10B30820C01B3002C400B30020A0008 3439:10D7000048119000B71011C0087082D80A87012D07
3440:10D710005000000000000000A0011C00850020CC8B 3440:10D7100080897003D808B70A21402C70020DC0859B
3441:10D720000870061C84A70129C00B7222DC80873494 3441:10D720000179C80B32020D208F2821C00B7282D2E2
3442:10D7300061800B10025C00B7002DC00B7002E80086 3442:10D730000460000000000000C0409610979023E0B5
3443:10D740004000000000000000A8080E008C8031E0BE 3443:10D74000097A02D60097802DF00B78821E00B3B0C4
3444:10D750000CFE023F00C5802DE00E7803DFA0C7A0BD 3444:10D7500021A00878021E00A5802DE00B7A021E8011
3445:10D7600021600F78031E80F7803DE00F78032A02C6 3445:10D76000A7B021E80B7902F00020000000000000C3
3446:10D770000000000000000000081DAC00F9003EC0E1 3446:10D770004814C000B30020E2083002C64093702C69
3447:10D780000FB003EC00FA003EC006B003EC80FB28AB 3447:10D78000C0093C028E00B30020D80818020C0081AA
3448:10D7900036D84FA003EC10FA003E500F3003C206FB 3448:10D79000902EC00B302A2C108300A0C00B3002D278
3449:10D7A00060000000000000000005FA00CC80B3E03B 3449:10D7A0000430000000000000E811B900DA0233B8CC
3450:10D7B0000FF8033E00CF903F604FF8C33E00EF806C 3450:10D7B0000DA003F800DEC03FB04FEC063840FA0081
3451:10D7C00033F00C7A033E70C59033F10C78030000FF 3451:10D7C000B3900C6C0B2808EA017E800FA0032800A0
3452:10D7D0007000000000000000A811B800870021C000 3452:10D7D000EA0032800FA003FA04600000000000009D
3453:10D7E0000B704A1C0087102DC04B710A3C448F12ED 3453:10D7E0004800E000F8403A000F8403E100E8023E00
3454:10D7F00021860D72021E008700234008700A2A0449 3454:10D7F000000F8403E140F8003E000F8103E000F8D1
3455:10D80000600000000000000000009C00840025C0B3 3455:10D80000003A000F8003E000F8003E000F8003D2D2
3456:10D810000B710A0C00A7122D840B700A1C00B708AC 3456:10D8100000300000000000000810E420F9C03E7055
3457:10D82000234009F31A5C869708254008700200001F 3457:10D820000E9002E480C90032420C9883A484F9006F
3458:10D8300020000000000000002014CC20812026C021 3458:10D83000B2600C90832400C9003E400C1A02240000
3459:10D840000B30022C0082422C800B30220C089B8073 3459:10D84000C100B2400F9001C204300000000000008F
3460:10D8500020E00920024D08920024E508300A08045F 3460:10D8500080046500B9812C600D94C2C7088900223C
3461:10D860003000000000000000A815AE82CAE0B7C07A 3461:10D86000400895C7A400B9002870A8940A2400892C
3462:10D870000FF0133C0AC9C83E400FF0033C04FF847C 3462:10D87000042E4028902A2600890022400B9002E0C6
3463:10D8800032C00D90137C00D900F6C02C10032A047E 3463:10D88000001000000000000018052400B9402E40E0
3464:10D8900060000000000000008000E400F3003AC1D6 3464:10D890000A9002E5008100A040099042EC00B1002E
3465:10D8A0004FB003EC00F9083C000F3013EC00EB0420 3465:10D8A00022580890A2040289002E40089002A4A0E9
3466:10D8B000BE180F9023AC60E9023A404F9003E0009D 3466:10D8B000890022400B9002C60040000000000000DA
3467:10D8C00030000000000000000110FC00CA0033C05E 3467:10D8C00008040400B1202EC0891202C480812020E7
3468:10D8D0000CF003FC00CD027F400CF0423C00CF086E 3468:10D8D00040611042C500B120284818904204808160
3469:10D8E00037100FD003FC10CD083F662CD90300443D 3469:10D8E000282C4808128284A0812020480B1282C272
3470:10D8F0003000000000000000810463808BE022C043 3470:10D8F0000100000000000000B80D6800F8002E00D4
3471:10D9000008B022EC00D8806E2068B01A2C01FB0011 3471:10D900000E8003E008C85032140D8017E804F85068
3472:10D9100022180B88434C0088A02CC01D9002204088 3472:10D9100032144C050B2140C8203E000C8703A1C2E5
3473:10D920001000000000000000800108808B2022C051 3473:10D92000C80032148F8203EE035000000000000094
3474:10D9300008B022EC0088882E6248B01ACC008B0018 3474:10D93000981DF400F1103D400F9102D442FD103FBC
3475:10D9400026C04A8802EC0008842E4009900220007C 3475:10D94000510E5413B500F91035442FD003E450FDA7
3476:10D95000400000000000000008040000830060C0D8 3476:10D95000283E4E0F90036400F9383E440F9283E650
3477:10D96000083002CC0090066C000830028C00A30442 3477:10D9600006700000000000001815F400FD003D40A6
3478:10D9700020008B00064C2180006CC049100A020177 3478:10D970002CD003B600F9823E400CD003F400F980AD
3479:10D980000000000000000000000D6C00CA00B2C1E1 3479:10D9800033700C50033400C9C03E400CDA031680DB
3480:10D9900088B403EC10C8002E000CB00BBC088F003C 3480:10D99000C9403E622C988306007000000000000021
3481:10D9A0003600068003EC80C8023FC10C90030003E0 3481:10D9A0003810E000B8002E000880022800B8502689
3482:10D9B0005000000000000000A01DF000FF003FC06C 3482:10D9B0000008A002E800B8002A342AAA0A20008839
3483:10D9C0000F7283FC18FC033F008F70037C00FF0084 3483:10D9C000C02E2A0880222100A8802E000880020E86
3484:10D9D0003D000FC0238C06FC003F400ED003E8063C 3484:10D9D00004300000000000000805C400B1002E4023
3485:10D9E000700000000000000000C541037040DC1022 3485:10D9E0004810068D00B1002C40281002C400B14040
3486:10D9F00037040DC1037040DC1037040DC1017040C5 3486:10D9F0002C48081082440081602C4028140A0440FE
3487:10DA00009C10171405C1037040DC1017040DC031C1 3487:10DA000081202C400810020201700000000000007C
3488:10DA1000000000000000000000C5440571015C40EA 3488:10DA10001805A440B9002E4008B0022400B9282EF1
3489:10DA2000571015C40521015C40571015C401710140 3489:10DA200050089022E400B9002E600B124264008975
3490:10DA30005C40171005C40571055C41571015C011F5 3490:10DA3000002C400990022400A9002C400810024646
3491:10DA400050000000000000000080020120804820FB 3491:10DA40000460000000000000A005E600F9003C4270
3492:10DA500012080482012080482012080482012080DC 3492:10DA50000C9003A740F9403E700C9802E540F90095
3493:10DA600048201208048201208048201208048020E7 3493:10DA60003E400C98036406C9012E400C9003240428
3494:10DA7000000000000000000000800000600058006E 3494:10DA7000C9003E400C900B2804700000000000001C
3495:10DA80001600058001600058001600058005600042 3495:10DA80002801A400F9003E400F9083E610F900360B
3496:10DA900058001618018001600058005600058020CB 3496:10DA9000680F9C03E600F9003A400E9893A400F941
3497:10DAA000000000000000000000C5480522011C80A5 3497:10DAA000003E400E9083C400F9003E400F90038A70
3498:10DAB000472011C80472015C80572011C8047241CC 3498:10DAB00000600000000000002800A000F8003E0404
3499:10DAC0005C80572011C80472011C80472015C031AA 3499:10DAC0000C80032102C84032000F8003E100F00007
3500:10DAD000500000000000000000C540006000180079 3500:10DAD0003E020C80032000F8003E000C00032000F2
3501:10DAE0000600018000600018000600018000600050 3501:10DAE000C80032000F80030A04200000000000007C
3502:10DAF0001800060001800060001800060001803157 3502:10DAF00028153A00BE022FB008681238008A042A9E
3503:10DB0000000000000000000000C548042201088059 3503:10DB0000800BE042FB20BA002F9108E0022800BA07
3504:10DB10004220108804220108804220108004230142 3504:10DB100000268008EE0A38008A0022800BA0028AC4
3505:10DB20000880422010880422010800422010802131 3505:10DB2000004000000000000028054200B3002CC2A5
3506:10DB3000000000000000000000C54A05428150A01E 3506:10DB300028380A4800830422C00B1002CD80B300AD
3507:10DB4000442C110B04428110E05428110200428140 3507:10DB40002EC0081C022400B3002CC00834120E4062
3508:10DB500010A04438110B0542811021142815003102 3508:10DB5000830020C00B30120A0050000000000000BB
3509:10DB6000500000000000000000800C01570054C06D 3509:10DB6000A0011100B7002FC00870A24E008FB02195
3510:10DB70001530044C01130054C01570054C015300BE 3510:10DB7000CC0B6012DC10B7302DC008D0821480B7F7
3511:10DB800054C01530854C01130054C0153005402198 3511:10DB80001225C8286002140087B221CC0B3102A8EC
3512:10DB90004000000000000000008000004000100075 3512:10DB90000040000000000000A8081200F7803DE0EF
3513:10DBA000040000400010001062040001080441005D 3513:10DBA0000C38035600C790B1E40F7803DE00F790FD
3514:10DBB0001000441811000010001080040001012022 3514:10DBB0001F602C480B16A0F7803CF40C38031E00A5
3515:10DBC0000000000000000000004560020800820024 3515:10DBC000CFA0B1E80F7B032A020000000000000094
3516:10DBD00020800860021800820020800820000820B1 3516:10DBD000080DA000F8003EC00BB003AC00F3213EDE
3517:10DBE000820000808020021800820020800801311D 3517:10DBE000C807B002E400FB203F400F8003E480FB45
3518:10DBF000500000000000000000C54005640158000E 3518:10DBF0000036D00FA003E008FB423ED80FB003C2AE
3519:10DC000056001580056001580056401580056001DA 3519:10DC000006600000000000000005F080CF8031E1D8
3520:10DC100058005600158005600158007600158031C7 3520:10DC10000CF803DA10EF803FE40FD803FE10FF8208
3521:10DC2000000000000000000000C540036000D800B4 3521:10DC20003FE04CD81B1620CF803FE04CD830EE4070
3522:10DC300036000D80036000980036001D88056000E6 3522:10DC3000FFC0B3F40FF803C0007000000000000044
3523:10DC4000D80016000D80036000D88046000D80319A 3523:10DC4000A8019820834021C0087102DC8487202D20
3524:10DC5000000000000000000000C5420430810C20DC 3524:10DC5000C00B6002D960F7002DC008F08214048761
3525:10DC6000430810C20430810C22410818C2043089D4 3525:10DC6000002DC008F0031E00B72021C08B7002EA0F
3526:10DC70000C20030810C20430810C20430810C0108F 3526:10DC700004600000000000000000B0008700218068
3527:10DC800050000000000000000080000030000C0088 3527:10DC8000087002F50427002DC08B7002DC00B7007D
3528:10DC9000030000C00030000C00030000C000300092 3528:10DC90002C50084002140087002DC00850025C047C
3529:10DCA0000C00030000C00030000C00030000C001A5 3529:10DCA000B700A1C08B7002C000200000000000007F
3530:10DCB00000000000000000000080020130804C20C5 3530:10DCB0002014C80080000080083002CE0083C02CF1
3531:10DCC000130804C20130804C20130804C3013080C3 3531:10DCC000D04B3002CE00AB022C4048BC0204008393
3532:10DCD0004C20130804C20130804C30130804C021CA 3532:10DCD000002CC00810020008B30020C0093002C8A0
3533:10DCE000000000000000000000C5420560815820CF 3533:10DCE0000430000000000000A8158340C80030C0C8
3534:10DCF0005608118205608158205608118300608102 3534:10DCF0002CB003EC00EF883FE607B183E100BF00E2
3535:10DD0000582046081182046081183056081580306A 3535:10DD00003EE00CB8033400CF003FC02CB0036810D5
3536:10DD1000500000000000000000C5420020800820E4 3536:10DD1000FF0033C00FF003EA0460000000000000C1
3537:10DD20000208008200208008200208008200308063 3537:10DD20008000E400F1403EC00FB403ED40FB083E2C
3538:10DD300008200200008200208008200308008031B3 3538:10DD3000C00FA003E520FB003EE00DB083E400F33C
3539:10DD4000000000000000000000C5420460811820AF 3539:10DD4000003EC00F8003C400FB003EC00F3003E064
3540:10DD500046481192046081192046281182003481BE 3540:10DD500000300000000000000110F000CA0033E0B5
3541:10DD60001820464811920460811820430811801140 3541:10DD60004EF0033400FF003FC08FE803F000FF00D7
3542:10DD7000000000000000000000C5600458015600CB 3542:10DD7000B1400CE0033400EF00B3C00CF0033800F6
3543:10DD80005580156004580116005580016004180183 3543:10DD8000CF003DC00AF00300443000000000000056
3544:10DD90005600458011600458011600418011403141 3544:10DD900081046222889022E0083C022E08BB012EFA
3545:10DDA000500000000000000000800601418050602B 3545:10DDA000C00BA0026600BB0022A008A9022400BB91
3546:10DDB00014180506014180506004180506004180D2 3546:10DDB0000022C0282C02A200DB002EC00AB002A064
3547:10DDC00010601418050601418050601418050020E9 3547:10DDC000401000000000000080052200980022C8DA
3548:10DDD0000000000000000000000002010080402060 3548:10DDD0000A98022704BB002EC00BB102E200BB0070
3549:10DDE0001048041201008041201008040201048040 3549:10DDE00022E208B002A400AB0020C00A888223000F
3550:10DDF00040205048041201008440201008040020F4 3550:10DDF0008B002EC008B002A0004000000000000010
3551:10DE0000000000000000000000C546035180D460FF 3551:10DE000008140400914022C00810020C00B3002C3A
3552:10DE100030180D46035180D56035180D4603058036 3552:10DE1000C04B28224004B30020C028300A0404B3B9
3553:10DE2000D46015180D46031180D46035180D4031AB 3553:10DE20000060C0080002842093002CC00A300282E7
3554:10DE3000500000000000000000C5460571805C60D5 3554:10DE3000010000000000000000056000DA40B28030
3555:10DE4000971815C60571815C20571815C603708197 3555:10DE40000E90032400FF003FC08FA003E009FF00F5
3556:10DE50005C60571811C60531815C60771815C031B8 3556:10DE5000324008A00B3400EB0031C00C8003288056
3557:10DE60000000000000000000004546037180DC60F7 3557:10DE6000C7003FC00CF0030003500000000000009A
3558:10DE700037180DC6037180DD60371805C60175813E 3558:10DE7000A015D000EC203F000FC00BFC10FF013FAD
3559:10DE8000DC6037180DC60371845C60171819C01167 3559:10DE8000C00FE003F400FF003FC00FF003F400FFF9
3560:10DE900000000000000000000045460571815C6044 3560:10DE9000003FC04FC001F008FF003FC00FF003E893
3561:10DEA000571814860571815C60571805C6043181C6 3561:10DEA0000670000000000000C005FC00CC90372088
3562:10DEB0005C60571815C60571805C60431815C01169 3562:10DEB0000EF013BD04D4C1332C4CD9233260FF20A3
3563:10DEC00050000000000000000000020120804820F7 3563:10DEC0003DE04FC103B640CD0037E00CE28B10C0FF
3564:10DED0001208048201208048201208048201708008 3564:10DED000CD0033C60FD803300070000000000000F2
3565:10DEE000482012080482012080482017080480007E 3565:10DEE0008010EE088A20220008B7022D008A00B6B2
3566:10DEF0000000000000000000000006016180586082 3566:10DEF0003C0899022784BF682E820B01022440D976
3567:10DF0000161841860161801860063C058604618010 3567:10DF00004220C08AAC022DC28248A2D00B820220DD
3568:10DF10001860161801860061805860561815801028 3568:10DF100006300000000000008805CC008804268040
3569:10DF200000000000000000000045400570015C009A 3569:10DF20002A30C2A580A92128008A00020000A3107F
3570:10DF3000570015C00470015C00570010C004700049 3570:10DF30002CC80B0002C490834224C1080002408810
3571:10DF40001C00470011C00470015C00470001C011B3 3571:10DF4000A360A8C00B00C222017000000000000006
3572:10DF500050000000000000000045420060801820D2 3572:10DF5000C015AC068A0022E048B0022E02AB802E2B
3573:10DF60000608018200608018200608008200608098 3573:10DF6000204A8C022620BB006E800B30C246049BE8
3574:10DF70001820060801820060801820060801801120 3574:10DF70000AA2C00A80126C40A8002AC00B8C023092
3575:10DF8000400000000000000000054204208108203D 3575:10DF800000600000000000004015EC00C10936618F
3576:10DF90004208108204208108204208118204208057 3576:10DF90000E3203AB20F8843A782E98032600EB006B
3577:10DFA00008204208108204208108204208008011C5 3577:10DFA0003E404F9003E200C94036E00CB4036E00DF
3578:10DFB00000000000000000000045420540815020A4 3578:10DFB000EB003AC00F88031004700000000000005E
3579:10DFC000540815020540811020540C154200408170 3579:10DFC000E001BC00FD003F400FFA13F810DC04270D
3580:10DFD000502044081102054081102014080500114A 3580:10DFD000400D5043F400FF003F400FD903B000F95B
3581:10DFE00050000000000000000001030150C0543048 3581:10DFE000013FF00FF023B200D4A037C00FC00BF8F0
3582:10DFF000150805420150C05430150C05430150C0AE 3582:10DFF00000600000000000004010AC20EB10F200B8
3583:10E000005430150C05420150C05430150C05401019 3583:10E000000EB4032180C9403A480F9013E120FB0071
3584:10E010000000000000000000000008004200108026 3584:10E010003EC00C84032400FB0136E00C740B9C0012
3585:10E0200004200188006200108004001108004200F2 3585:10E02000CF0032E00F8403D0042000000000000085
3586:10E03000108004200108004201108004200100002B 3586:10E03000C8051E008B80204008B802838081A02282
3587:10E040000000000000000000004542020080802027 3587:10E04000780B9183E300BF000EC10AB4036404B9E6
3588:10E050002008080202208080202028000202008080 3588:10E050005032C00AB2022000880023D40B8802F29A
3589:10E060008020200A080202008000202008080011F9 3589:10E060000040000000000000E0054C42A0802000BD
3590:10E07000500000000000000000454005600158000D 3590:10E070004800020D0680802AD0030002C800B300C9
3591:10E08000560005800560015808560015800760029B 3591:10E080002CC00836024000B90222C28B26020C10B6
3592:10E090005800564015800560031800760015801161 3592:10E09000010224C04BA102F80010000000000000A3
3593:10E0A000000000000000000000C540036000D80030 3593:10E0A00020011E088E8021210828C29E008E80211A
3594:10E0B00036000D80016000D80A36000D8005700919 3594:10E0B000600B78029E20B7822FA10A78025E00B51D
3595:10E0C000D80136000D80036000D80057000D800095 3595:10E0C00091A1E00B290232448680A5E00B4C02C8E6
3596:10E0D00000000000000000000000000430010C00FF 3596:10E0D000001000000000000048080C00E100228051
3597:10E0E000430010C00030010C00432010C004600148 3597:10E0E0000E000B2400C04428AD0F2002C800F3002E
3598:10E0F0000C00434050C10430010C00460010C00029 3598:10E0F0001CC00C0103484CF20430C00F15038040D3
3599:10E1000000000000000000000000000030000C00D3 3599:10E10000C10014C80F0003DA021000000000000074
3600:10E11000010000C00030000C00030000D00020000F 3600:10E11000401D9C40F7003FC08FC003E400FA013F60
3601:10E120000C00034000C00030000D00020000C000E1 3601:10E12000C00FF023FC08FB003F800FF001FC10FF44
3602:10E1300000000000000000000000050131404C50CC 3602:10E13000003FC00ED103FC42FE803BC00FC003D0A5
3603:10E14000131004C40131404C50131404C511314163 3603:10E140000660000000000000A805EC40C8003EC0CA
3604:10E150004C50131404C50131404C50131404C0003A 3604:10E150000F9003EE08CB0032C00FA023E603CB4C98
3605:10E1600000000000000000000000230568C15A30D4 3605:10E1600032400FB007E800F90016400CA00B6C001D
3606:10E17000568C11A30468C11A30568C11A30568C0CF 3606:10E17000CF0232C50C8003020070000000000000D6
3607:10E180005A30468C11A30468C15A30168C15800091 3607:10E1800048119C8084042DC10B4040DC0087042191
3608:10E190000000000000000000000000002000080057 3608:10E19000C04B7012FC018F6029400B70139C00B5BE
3609:10E1A00002000080002000080002200090002000F3 3609:10E1A00000A3400A60020000840021C0084002125F
3610:10E1B00008000240008000200009000200008000EA 3610:10E1B0000660000000000000C0008E0087802DA2D5
3611:10E1C0000000000000000000000008446201188404 3611:10E1C0000B4C16D608978821A04B6802DE04A78066
3612:10E1D0004621118844621118844601118844621056 3612:10E1D00021E00B4802DA04B68225600AE8621E00DC
3613:10E1E0001884462111884462111884062111800088 3613:10E1E000878020E8084802080020000000000000A6
3614:10E1F0000000000000000000000000455011540421 3614:10E1F0004814CC008B806CF00B3C02CE469BC020B8
3615:10E200005501114045501114004501114044500082 3615:10E20000E40B3C02CC20A30028E00B30028D80B14F
3616:10E2100014044500154044501114045501114000E8 3616:10E210008022440A210A03828080A0C008060A12D4
3617:10E2200000000000000000000000082142085082A9 3617:10E220000030000000000000E815A802CE803FA0EA
3618:10E2300014208508214208508204208508214208C4 3618:10E230000FE003FA40DEC0B3900FEA13F908EA04D6
3619:10E2400050821420050821420850821420850000C5 3619:10E2400033828FE403FB08FEA036A00CAC0B6B827C
3620:10E25000000000000000000000000A01028040A051 3620:10E25000C6A032802CE4033A0470000000000000E5
3621:10E260001028040A01028040A01028400A01028000 3621:10E260004800E000F8903E020F8083E100E8203E85
3622:10E2700040A01028440A01028040A0102804000099 3622:10E27000030F8203E140D8003E200F0093A040F836
3623:10E28000000000000000000000000C035300D4C098 3623:10E28000003E108F080BF000FC003E000F8003D210
3624:10E2900035300D4C015300D4C035100C4C035300E5 3624:10E2900000600000000000000810E400E9003640C3
3625:10E2A000D4C035300D4C035300D4C035300D400080 3625:10E2A0000F9407E600F980B0400C9403E440F900B5
3626:10E2B00000000000000000000000080572015C8002 3626:10E2B00032400F940BA40071C032402C94232402EE
3627:10E2C000172005C80672015C80572015C80272012C 3627:10E2C000C90032400C90030204200000000000004E
3628:10E2D0005C80572015C80572015C80372011C00092 3628:10E2D00080044400890022400B9802E660B90022C5
3629:10E2E00000000000000000000000231840C61231AA 3629:10E2E000600A9C02E624B90436400B98002400B969
3630:10E2F000848C21230848C61230840C61231048C244 3630:10E2F00080A25208900224008940224068940220A3
3631:10E300001231848C01230848C61231048C6100004C 3631:10E30000001000000000000018052400A9002640AD
3632:10E31000000000000000000000003FFF4FFFD3FF9F 3632:10E31000039402E401B9102255089022E400B100F0
3633:10E32000F4FFFD3FFF4FFFD3FFF4FFFD3FFF4FFF23 3633:10E3200026400B90002C09B900226008900A1C04BA
3634:10E33000D3FFF4FFFD3FFF4FFFD3FFF4FFFD0000CD 3634:10E330008D08A0400810820E004000000000000080
3635:10E3400008040600810020500B1242C480B1042052
3636:10E35000500A1402C500B12224400B12220401B15C
3637:10E3600040205008100A15008540285008140A0A59
3638:10E370000500000000000000B80D6000E850360005
3639:10E380000F8502E140F85032000CA023E010F85055
3640:10E39000B2140FA503A148FA00B2000C80032004B8
3641:10E3A000C40232000C00032E0350000000000000E5
3642:10E3B000981DE500FD003F400FD103D444F5003F18
3643:10E3C000510FD403F500F9103B400FD100F510F5C3
3644:10E3D000407F400F542BE500F94036500FD003E644
3645:10E3E00004700000000000001805F610BD40334026
3646:10E3F0000FDA033780CD003F400FD003F400E9A0CF
3647:10E400003E400CDE17A408FDC033418DDA1326A070
3648:10E41000F9A832780CB40B06007000000000000070
3649:10E420003810E100B8A036200B8A82A2802AA82EDC
3650:10E43000000B8012E004B8A12E284A8E022AA0BA4E
3651:10E44000C022280885022108B8E8A23C08C8020EAC
3652:10E4500006300000000000000805C500B900204A91
3653:10E460000B1402058001002C410B1002C404A14AC8
3654:10E470002E420814028410B160A04A091002440020
3655:10E48000B501294018D2021200200000000000004F
3656:10E490001815A400B92126400B9602A410A9002E3D
3657:10E4A000400B9612E420B9002E410A90422400B994
3658:10E4B0000022410898226400B9202B4128D402068A
3659:10E4C0000020000000000000A011E400F9E0325834
3660:10E4D0000F98032640C9403E580F9C03E400E90012
3661:10E4E0006E400C9A02A600F94432400D9A0B6484E7
3662:10E4F000F900BA400C180328047000000000000066
3663:10E500002801A400F9003E500F9003E600F9043EF4
3664:10E51000480F9003E440F9003E650F9981E450F9FB
3665:10E52000203E408F9003A480F90034400F9203D224
3666:10E5300000600000000000002810A000F8403E101D
3667:10E540000E84036008C8003E080F8083E028E804BA
3668:10E550003E000C8403211CF04832000B0003E00253
3669:10E56000C00032000CC00B020420000000000000BC
3670:10E5700028053800B2882E8008E0037A808E002FAC
3671:10E58000A00BE802F910BA002C8028E4022800BE93
3672:10E590004023B808E802E804CA20A28008E8020A7A
3673:10E5A000004000000000000028054C01B3002C4092
3674:10E5B00008B8426C0283002CE00B3800CF40B30057
3675:10E5C0002CC008B40A0C00B340A2820A3902CC0065
3676:10E5D0009380A0C02920020A005000000000000023
3677:10E5E000A0011D00B7002D64287402400087052D8E
3678:10E5F000900B7402DC10B7302DC80834061C80B7AD
3679:10E6000000A1C00A7002DE80830001000960822040
3680:10E610000440000000000000A8081A00F7803D60D8
3681:10E620000ED80B5E00C7803DE00F6803DE10F7A92F
3682:10E630007FE84878031F30FF9433A00E7803CF247F
3683:10E64000D680B1E00DF84322020000000000000077
3684:10E65000081DAC00BB000C400FB003EC08F9003EF5
3685:10E66000000F9041EC00FB617ED00FB003EC80FB0B
3686:10E67000403F9B0CB003ED90FA003C000EB003C28B
3687:10E6800004600000000000000005DE00EF80336041
3688:10E690000DD8033640EF903EE00FF903FE00FF80F7
3689:10E6A00033FE0CFA03FE00CF80B3E00FF803FE0048
3690:10E6B000CD8033E00FC843C0002000000000000000
3691:10E6C000A8119C0085083540087003522087112C42
3692:10E6D000EC0B7102D000E70035C4087402DC4087FF
3693:10E6E0001021C00B7002FC80850821000B4182EADA
3694:10E6F000062000000000000000009800AF0023503A
3695:10E700000950021C80A70129C01B6006DC40B7101D
3696:10E7100021C84A5202DC00830021C00B7002DC13C6
3697:10E72000840025C00B5802C000200000000000003B
3698:10E730002014CC0081802440083E026E0089002C09
3699:10E74000C00BB402CA80A30024C00A0402EC4082B9
3700:10E750000A20C00B3002CD1080C0A4000B1C02C8E0
3701:10E760000020000000000000A8158400EB8033406A
3702:10E770000D8C832600E9A03E788F9083E100FF0096
3703:10E7800031D10E8423FC00CB8232C08FB002FD4019
3704:10E79000CB80B6C00FA403EA0460000000000000B4
3705:10E7A0008000EC00FB003E400FA003E000F9013EBA
3706:10E7B000420F9003E554E3003EC8059303EC80FB51
3707:10E7C000C13EC00F2003CC48F3083A000FA043E03D
3708:10E7D00000300000000000000110F000CF003F40BA
3709:10E7E0000F30012C0ACD1033000FD0831400CB0260
3710:10E7F00033C00CE103EC10CD0033C00CF0333C000F
3711:10E80000EA0033C00CF083C8443000000000000070
3712:10E8100081046E008B002E400BBC022E000B0022E8
3713:10E82000300B9C022780AB002AC008B802EC00899C
3714:10E83000C020E008AE022C088A00220008B042E89E
3715:10E84000401000000000000080052E008B042E40C8
3716:10E850008B8C02AE10890022700B8C02A2008B01FF
3717:10E8600022C0088002EC108288A27009B8022C082D
3718:10E87000890020C0288022E0104000000000000035
3719:10E8800008040C0481002C400B200280008104A0AD
3720:10E89000504B000A8000A3012AC1201002CC14832F
3721:10E8A0000022C00820020C008100E000080002C223
3722:10E8B0000500000000000000000D6800CB003E4095
3723:10E8C0000F900BAC80C90032100F8003A400CF0260
3724:10E8D00031C00C8013FC02CD0033C02C90033C02ED
3725:10E8E000E800B2C00C9003C003500000000000001C
3726:10E8F000A01DFC02F5003D408FF0236D00FF003F9E
3727:10E90000040FC003701CFF013FC04FC003FC00FD9B
3728:10E91000003FC00FE00FFC18FC003F000FD003E8E1
3729:10E920000470000000000000C005FE00D7020F3098
3730:10E930000CF2017E0644303F200EF0027C84FD2064
3731:10E9400027080CD0013600FF6033CC0BF1132CC428
3732:10E95000FF300FCD0CF403F0007000000000000049
3733:10E960008010EE008FC02E0008FC022E008A302896
3734:10E970005208F6823C68BD903234489C122600CF83
3735:10E980004023CC0BF6023D00BF102FCC88F602E0EE
3736:10E9900004300000000000008805CC0093102C0813
3737:10E9A0000931024C009B2064580331624C81A10064
3738:10E9B00020004814024400933024C00B33028D849D
3739:10E9C000B3206CC02A3602E2017000000000000093
3740:10E9D000C015AC109B022E410BB002A4009A004A55
3741:10E9E0006088B0526C01B9002600089122EC08BB87
3742:10E9F0000026C00BB002AC00BB056EC10AB002F02D
3743:10EA000004600000000000004015EC00DB013E3017
3744:10EA10002D30034760D8A016388FB0036C00790200
3745:10EA200031600CC80A6600BB00B6C00FB00BAC006A
3746:10EA3000FB013EC10EB003D00470000000000000D6
3747:10EA4000E001BC10EF083F240CF0037620EE903577
3748:10EA5000400E7003AC00FD00BB640F88133480CB04
3749:10EA6000003BC00FB0036C08FF003EC00DF003F880
3750:10EA700000600000000000004010AC01FB8032107C
3751:10EA80000EB003ED00CB503E408CB0432C10F9008B
3752:10EA900032600C400B2600C30436C00C30032C003F
3753:10EAA0009B00B0C00CB003D00420000000000000A8
3754:10EAB000C8050E80BF042A4000F500E60082D2227D
3755:10EAC000400DF0223C00950236400A80022E008F55
3756:10EAD0000037C00AF0423C008F0023C028F002F249
3757:10EAE0000040000000000000E0054E00B3002220BE
3758:10EAF0004A3000CC0081C028000830020C10A10070
3759:10EB000028801830220404830024C0083002CC0876
3760:10EB1000930020C0083006F80050000000000000FC
3761:10EB200020011E00B78029A0087802FE208D8029D0
3762:10EB3000E55B38421E40A18125A80879023700878D
3763:10EB40008025E00A780ADE81878025E5487802C8BA
3764:10EB5000004000000000000048080C00B310301214
3765:10EB60000E3012CCC0C30038800C31060C40F100CE
3766:10EB700038800C30430442C30036C00C3203CEC090
3767:10EB8000DB0030C00C3003D20200000000000000A7
3768:10EB9000401DBC00FF103D844FF103D040FC1033FA
3769:10EBA000805DB183FC50DD0A25890FB803D400FFD6
3770:10EBB000103FC00FF4033C40FF003BC00FF003D0F8
3771:10EBC0000660000000000000A805EC00FB203E00ED
3772:10EBD0000FB5032920F90032A00CB083EC0049C81E
3773:10EBE000B2C08CA0036400FB0812EA0CB00B2C80AE
3774:10EBF000FB202ED26CB643EA047000000000000037
3775:10EC000048119C00B7492D000B30821001B50283DA
3776:10EC1000C01A7222DD41850061C01820201400BF97
3777:10EC20004035D00D34021D20B72825C1087482D28A
3778:10EC30000660000000000000C0009E0437A02D20E8
3779:10EC40000B7A121601B38021E20878429E0085807B
3780:10EC500020E11868025600B7A025E0087A021E00DD
3781:10EC6000B7902CE5887A02F0002000000000000038
3782:10EC70004814CC00B3006C241B30020000B000200C
3783:10EC8000F80A3002CC00810020D81820020400B31A
3784:10EC90000024C00930020C00B30026C0083002D2A4
3785:10ECA0000030000000000000E815A800FA003D80D8
3786:10ECB0000F200B2880FE0033A00CA003E802CA023C
3787:10ECC00032902CE4037800FA0032800CA003280074
3788:10ECD000FA003E800CA003FA006000000000000073
3789:10ECE0004800E100F0003E004F8003E080F8003E65
3790:10ECF000000F8023C000F8023C000FC0836000B802
3791:10ED0000003E000F8023E018F80136000F8003D288
3792:10ED100000300000000000000810E600F921326019
3793:10ED20000C90032C44F900B2400F901B2400E90022
3794:10ED30003E400C1003A400F90032400F10332410A1
3795:10ED4000F10032400C90030200300000000000008F
3796:10ED500080046400B940A2410890022480E90022A6
3797:10ED6000400B9012240089006E411890422400B993
3798:10ED7000042A410B90036400F9002A400A900A20FB
3799:10ED8000001000000000000018012480B942624811
3800:10ED900028900A2400B10022400B10022410B9026E
3801:10EDA0002E4008D002A400B10022400B900224049F
3802:10EDB000B9002240081002060040000000000000D8
3803:10EDC00008040C00B12060400812020400A12020B9
3804:10EDD000400B1202048091202D680852120400B1E9
3805:10EDE00028284A09128244A0B12C284A0A12820219
3806:10EDF0000100000000000000B80D6000F8003214AF
3807:10EE00000C80032000F85032140F85030140F800F5
3808:10EE10002E0028C003A000F82430080F8223208091
3809:10EE2000F82032080C82032E03500000000000007E
3810:10EE3000981DE408F9103F408F9113E400ED103F56
3811:10EE4000500F9103E440A5103E440F9103F404F9E0
3812:10EE5000283E4B0B92A3E4A0E9283E4A0F9283E69A
3813:10EE600006700000000000001805F400CD003340DB
3814:10EE700080D001F400A50026400F90032600F18801
3815:10EE80003E680D98834400C9C03A400C980324089A
3816:10EE9000F9A032780F9A030600700000000000000D
3817:10EEA0003810E0028800A200088002E0000A002278
3818:10EEB000000B80022000B8402E14088043300088E8
3819:10EEC000A0222A0A8A42A005B84232380B80020EDC
3820:10EED00004300000000000000805C4039100244035
3821:10EEE0000B1002C411B10420411B10224500B500D3
3822:10EEF0002540095002540181402C400914924400DD
3823:10EF0000B140244C0B140A420170000000000000C4
3824:10EF10001815A400990024420B9002E401992026C0
3825:10EF200040CB90026400BB002F410AD0023400891C
3826:10EF30000026400B1002E400310062400B900246B4
3827:10EF40000460000000000000A015C400D901365084
3828:10EF50002F9003E660F98036520B900A6400F900A6
3829:10EF600036400D9003640209003E400D900364009A
3830:10EF7000B900B6400F900368047000000000000064
3831:10EF80002801A400E1003A410C9023E620E900BAF0
3832:10EF9000700F9003A400F9003E400D1013A700F974
3833:10EFA000003A400E9043A408F9003A400F90038ABB
3834:10EFB00000600000000000002810A020F8003200CF
3835:10EFC0000F80832100F0003A11098003E000C8019E
3836:10EFD00030010C8003B000D00034000D800320000D
3837:10EFE000C80032000C80030A04200000000000006A
3838:10EFF00028053800BE00228003E8021A08BE482215
3839:10F00000800AA003B800CA0822800FA40208008A60
3840:10F010000022808DA0022800DA002A8108A0028A3E
3841:10F02000004000000000000028054400B30020401C
3842:10F030000B30020800B06468C108B022CC0C938089
3843:10F0400000C04836028800B30024C00830060C0116
3844:10F05000A3022CC008B0020A00500000000000000B
3845:10F06000A0011408B50021400B38821C21B70023F1
3846:10F07000E84A72269E408F81AB404270523800A30E
3847:10F080002220C44931021E0AB7222DE8087202A8C4
3848:10F090000040000000000000A8081200F68021E0F7
3849:10F0A0000B780B1E00B4823BE84C7C13FE02978069
3850:10F0B00033A00838039A00F78835E20C78E30E0095
3851:10F0C000E3E834F80C3C232A0200000000000000B2
3852:10F0D000081DA804F1003E420FB013EC00FB00BE77
3853:10F0E000CC1EB607ED80FB0036000FB0436800CBA6
3854:10F0F000303ED80FB60BED40CB003AC02FB603C25E
3855:10F1000006600000000000000005F240FB913D4C4D
3856:10F1100080F803DE40C6801BF04FFD07FF00CD8066
3857:10F1200033E00C6803BA00FF8033E007F8033F10B8
3858:10F13000CF803FE00CFC03000070000000000000E6
3859:10F14000A8119000B5C02D40086202DC20D6022133
3860:10F15000C88F7002DC81B50081440D61221804B7AC
3861:10F160000035C00B7002BC00A7012DC0087003EA77
3862:10F17000046000000000000000009001B6012FC0F4
3863:10F18000187002DC0A961029C14B7006DC1085004D
3864:10F1900025800860821A20A30025C00B31025C4044
3865:10F1A00087002DC008700200002000000000000051
3866:10F1B0002014C800B1002C40882002ED008A602095
3867:10F1C000C00A3002CC04B10024002824020A003313
3868:10F1D0000024C00BB002CC00A3002CC088300288F1
3869:10F1E0000430000000000000A815A000FB003EC68F
3870:10F1F0000C8003E50009C8ABE20BF002FC004A00FA
3871:10F2000036C0089003A600FF0033C00FF0037C0057
3872:10F210008F002FC028F0022A0460000000000000C8
3873:10F220008000E100FA013EC00F8003EC00F9403E8F
3874:10F23000C007B003EC00FA003A400F9023E500FB52
3875:10F24000003EC00FB003AC00FB003CC00FB023E099
3876:10F2500000300000000000000110F000FC203FC062
3877:10F260000CC803FC20CD81B3C24FF003FC00CA00E0
3878:10F270003C800CD0823601FF003FC00FF0033C08F9
3879:10F28000CF043AC05CB003C044300000000000006E
3880:10F2900081046204B8402C60088902EE80A9602ACB
3881:10F2A000C00BB0038C00AA402E000810022681EB90
3882:10F2B0000026C08BB0136C00DB002EC03DB002E016
3883:10F2C000401000000000000080052300BB032EC892
3884:10F2D00009B002EE008B1026C00BB002EC00A800B3
3885:10F2E0002EC0088822A480BB002EC04BB0220C0088
3886:10F2F0008B002EC00BB002E00040000000000000B8
3887:10F3000008040000B2002EC0292802EC01A002204F
3888:10F31000C0093002CC00A0002C40080042840093B9
3889:10F32000006CC00B30064D0093002CC0083002C2A8
3890:10F330001100000000000000000D6000F8202FC048
3891:10F340000DB003EC00CB0033C00BF003FC18E80059
3892:10F350002E80088003A400BF003FC00FF0433D1182
3893:10F36000CF033EC15DF023C0035000000000000049
3894:10F37000A01DF000FC103F400EE003FC00FC003F2D
3895:10F38000C00FF003BC00FC003F002FC0037400EF6F
3896:10F390000027C00FF003FC18FF003FC00FF003E888
3897:10F3A0000670000000000000C015FC889C293F0882
3898:10F3B0000FD283EC00FF083F280FCA033C41CF2047
3899:10F3C000732C0CC0033020CF6033D80F78033F80FC
3900:10F3D000DD9233C80F5003300070000000000000C1
3901:10F3E0008010E54088402E048B9402E400B9000EA2
3902:10F3F0007F8F9E836582CF683E508D04922F04D309
3903:10F400004074DC0DA2022040890022F00B980220FB
3904:10F4100004300000000000008805C809A0852C0108
3905:10F420000B0010CC40A2082C00DB110289009330A5
3906:10F4300020050813028008A36060C00AB082088417
3907:10F44000812020D00B1002A20170000000000000FB
3908:10F45000C015A41288806E200B8882EE00BA812E1F
3909:10F46000605A9802A2008B002A6008111A2C00BB77
3910:10F470000022C008B80A2800812002C00B9002B008
3911:10F4800004600000000000004005ED00D9803E202F
3912:10F490004F9800EB20FBE02E600B8C62AE208B00BF
3913:10F4A000226008BC03A020EB0022C10A180B250033
3914:10F4B000D900B2C00F900B90047000000000000053
3915:10F4C000E0019488FF003F010FD001F008DD013F0B
3916:10F4D000420740035C00AF003F400FF800F000DF40
3917:10F4E000003FC00FC023F450FD803FC00FD0037811
3918:10F4F00000600000000000004000AC00D9003E4069
3919:10F500000F9403A820CA403A400F9403EA08FB0076
3920:10F510003A004CF6232C30CB0036C00D9003A102EC
3921:10F52000D900BAC00F9803100420000000000000AA
3922:10F53000C80524008A002E400B9502E0088880222E
3923:10F54000708F8C02E000BF02200008B8020E00DFBE
3924:10F550000023DD0898822A00898023C00B501A32CC
3925:10F560000040000000000000E00544008305244145
3926:10F57000091002CE0083902C801B2482CC00BB009B
3927:10F580002C8008040804018B0022C02812026C8021
3928:10F59000814824C40B100238005000000000000015
3929:10F5A00020013E4286802D600B6802F6908D8021FE
3930:10F5B000220B5802D740B79021E00849921E53977A
3931:10F5C0008121E048C80A5222858825E00B580208AC
3932:10F5D000004000000000000048080C00830034C018
3933:10F5E0000F0003CE20C3307C940B3483CC14F30281
3934:10F5F0003C800C04030460C300B0C00C1003EC009A
3935:10F60000C9003CC40F1103120200000000000000FA
3936:10F61000401D9C00EE013FC04FE103D440F5167A37
3937:10F62000C04EF003F41037053DC00FC00BDC40FFA7
3938:10F63000003BC20ED007BC02EF003BC60FD003D088
3939:10F640000660000000000000A805F400DD8433809F
3940:10F6500004F0036C02CB027EC01FA053EC00CB2051
3941:10F6600034400CD00B2010EB001EE00F300B2C00B0
3942:10F67000C10032C00F9103EA0070000000000000DA
3943:10F6800048119C0087002180086000140085002D2F
3944:10F69000800B7052D404832829C02850035000875F
3945:10F6A0004025C80F60020400A7003DC80B5202D2DB
3946:10F6B0000460000000000000C0008E00958021E082
3947:10F6C0000938021E11A7802DF00B7852CE0A9795AB
3948:10F6D00021E0195C020E00A78029C80BF8021E2049
3949:10F6E0008D8021E00B5802F0002000000000000097
3950:10F6F0004814CC0082E0A0E82930060E50AB802CE4
3951:10F70000F00B3142CC00930028C40998024C2883A6
3952:10F710000024C00AB0020D00A25828C00B1002D26B
3953:10F720000430000000000000E815B900DE8031A0C0
3954:10F7300009E20B7804EEA42FA48BEC02D800DA00C7
3955:10F7400027810DEC061B00EA043E800BE0033B0022
3956:10F75000CEC022800FA003FA046000000000000069
3957:10F760004800E080F8103E050E8803E00898403E0F
3958:10F77000000F8483E140E8003A020E8043E140F844
3959:10F780000036000F8003E020F8003E000F8003D217
3960:10F7900000300000000000000810C400E9003E40F6
3961:10F7A0000C90030420E99032680E9803A400C10075
3962:10F7B00030400C94832408C9003E400C9003A40000
3963:10F7C000C90030500C1A0302043000000000000091
3964:10F7D0008004640089402E5028900A240889061667
3965:10F7E000610B9C02E420A90036400D90022760A91D
3966:10F7F000002E4028901A24008900364028980220C4
3967:10F80000001000000000000018052C00A9082EC2FE
3968:10F810000910002400A9000640899606E600890028
3969:10F8200022C00890022402890024400890020C069D
3970:10F830008300224008900206004000000000000003
3971:10F840000804050081442C500814020580812064BE
3972:10F85000701B1402E480A120644019120A0480A1E4
3973:10F86000002C5018140285008140244040100202F0
3974:10F870000100000000000000B80D6000E0003C0046
3975:10F880000D80020000AA5036000F8003E140C852EC
3976:10F8900072140C05162008C8503E010C8003A00409
3977:10F8A000C800B2000C800B2E0350000000000000C6
3978:10F8B0009819F502FD403FD00FD423F444FD147F86
3979:10F8C000500FD407F440F9103F5007D123F440F90A
3980:10F8D000401E5007D00B7500FD023E500FD403E6CA
3981:10F8E00006700000000000001805F600C9A83E726E
3982:10F8F0000F9803E6C0FDA0B3400FD0037780CD90F2
3983:10F900007F400FDAA31690A9C032604CB1032400E7
3984:10F91000C100336A0BDA030600700000000000002B
3985:10F920003810E34088E02E300B8D02F340B8E876C3
3986:10F93000004F800A228088906E288F8A036144F8E5
3987:10F94000E13E2A08880342A0DCA03E100B850A0E87
3988:10F9500004300000000000000805C4A085082D4800
3989:10F960001B5282D480B11420400B18020582810002
3990:10F970006C420B12820400A16021500B50021490C3
3991:10F98000952C28400B1002020170000000000000BE
3992:10F990001815A4018D442F400BD402F404B9082299
3993:10F9A000400A92022C8489002E400A14026C80A91D
3994:10F9B000012A4009500A5C028D602A400B904206E1
3995:10F9C0000460000000000000A015E662C9023E5479
3996:10F9D0000F9003E400F94022460B98036720C90109
3997:10F9E0002E690B940B2520A90022402D920A262275
3998:10F9F00099002A408F900328047000000000000046
3999:10FA000028018602F9003E400F9003E680F1A03EF7
4000:10FA1000620F9883C620F9003E490F9083E400717D
4001:10FA2000023E400E900BE680F9803E400F9003CAE4
4002:10FA300000600000000000002810A010C8003E0078
4003:10FA40004F8043B000C84132000F80032102C8023A
4004:10FA50003E104C80030120C8003B000CC003B000E6
4005:10FA6000CC0432000F80030A0420000000000000D4
4006:10FA7000280528008A802E800BA002F8048E00231F
4007:10FA8000B20EE082F9048A002E810CE00A3A80DA94
4008:10FA90000022B608A00228008E002A800B600B0A04
4009:10FAA00000400000000000002805440293812CC0A3
4010:10FAB0004B3002C80083CA20E019B0068C008104D4
4011:10FAC00044400834020D0083002A0008000A8040E8
4012:10FAD000880020C00B30024B0050000000000000E6
4013:10FAE000A001040297082DC00B6006CA00830921FB
4014:10FAF000C00A7002DC0085312D680930021C1493A5
4015:10FB00002020C008F0429C028F0029400370122878
4016:10FB10000040000000000000A808160096843DA0E8
4017:10FB20000F78039A028780B1E00B7803B600C5A076
4018:10FB300035610C78131E02C78029000C4803900021
4019:10FB4000C48031600F58036A02000000000000000A
4020:10FB5000081DA400EA003E800FA003E808FB003E59
4021:10FB6000800F9013E408F9003C502EF003E808FBE6
4022:10FB7000403EC00B30136C00FB003E400F3003C210
4023:10FB800006600000000000000005D600CD8033E0D4
4024:10FB90000CF803FA00FD803FA00DF803FA40CDD029
4025:10FBA000777E0CE8431E00CFD83FE00CC8033AC470
4026:10FBB000CC8033E00CF8030000700000000000006F
4027:10FBC000A81194028D0021C0086003D81035208B45
4028:10FBD000D40D6403D8C085002F4E0764029C02D761
4029:10FBE000302F040DF10B5440AF0035400870022A4D
4030:10FBF0000060000000000000000094408418218094
4031:10FC0000087002DA20B5000900087002D4048500EB
4032:10FC10006D4C8960025C4097006DC00940025880BD
4033:10FC20008488254008D00200002000000000000069
4034:10FC30002014C6488000208008AC02A800B100A8AB
4035:10FC400088092202864281006C520B2002C752832F
4036:10FC5000002C000834826700A3802040083002088E
4037:10FC60000430000000000000A815A300CBC0B24083
4038:10FC70002C9082E600BB80BE78088E02EE008D00DC
4039:10FC800027600D900A6F009F022E0009B403678061
4040:10FC9000CA40E4C00C30032A0460000000000000E9
4041:10FCA0008000E080FB223E400F8013E400FB803E9A
4042:10FCB000400F9003E500F9003E400E7023AC20FB9E
4043:10FCC000003EC08F8003E920F9083E400FB013E0EA
4044:10FCD00000300000000000000110F000C6003200FB
4045:10FCE0000FD1833440CF003D400CD003DE500D00D7
4046:10FCF00073400CD1037C408702B3000DF403240051
4047:10FD0000CE2032400CD00300443000000000000040
4048:10FD1000810461228A0022000B8040250089C32EC5
4049:10FD2000200A9803A100890036408894020F01AB95
4050:10FD30000032C008040A2900A902A2400DB00A201E
4051:10FD400040100000000000008005000089002261D2
4052:10FD50000B900225019B882E60088802E800B10202
4053:10FD600024401890022C00AB0120C108B4422C00A2
4054:10FD7000820022C008B00220004000000000000005
4055:10FD800008040000010020400B000A044683012CF7
4056:10FD9000401A000680008100244008200A0C01A3BC
4057:10FDA0000024000880020000A10020400930020267
4058:10FDB0000100000000000000000D6002C8002200E9
4059:10FDC0000F90022500DA003E400C9002CC00FD00AE
4060:10FDD00037400C10132C02AF0032C00DB0032C00C2
4061:10FDE000CA0032404C900B0001500000000000009F
4062:10FDF000A01DF000FC003F0007C003F41CF4003F0E
4063:10FE0000001FC023B0029D013F408FC007FC02FFCE
4064:10FE1000007B000FC003F000FD003F400F7003E8BF
4065:10FE20000670000000000000C005FA00CB803F24EF
4066:10FE30000AC103FC24CD20370A0CC2833080DC02C7
4067:10FE40003FCC0DD9033C58DF3033C80DF4233C4080
4068:10FE5000FF003FC54FF023B000700000000000001D
4069:10FE60008000EC020B822E080DB702FD0083180AF9
4070:10FE7000580A84A2A5A089302255081262BD908F2D
4071:10FE80006221D648F3023CC5BF482FD84BB702E0E9
4072:10FE900004300000000000008805EC0083002E897B
4073:10FEA000280002ECA08922288208120228409A0821
4074:10FEB00028C888B20A0D109310A0C82830024C0040
4075:10FEC000B3602CC40B30C2E20170000000000000DF
4076:10FED000C015AC408B002E8008B102EC028B0020D4
4077:10FEE000D00A9002AC000B0126400894028C008BD3
4078:10FEF0000022C008B0022C10BB002EC00BB002F0D4
4079:10FF0000046000000000000000148C20CB023E2D95
4080:10FF1000088003EC08C9801E040CB00301085018C7
4081:10FF20003E400C04032C00DB0132C00CB00B2C084B
4082:10FF3000BB003EC00FB00380047000000000000052
4083:10FF4000E100BC00FF003F600FC023EC00FFC0BE1B
4084:10FF5000608FC923F650ED80B850AFC003FC00FF9E
4085:10FF6000003FC10EB003FC04FF023FC00FF003F8D6
4086:10FF700000600000000000004010AC00EB00328088
4087:10FF80000D90032C0089003E988C30036180FA406C
4088:10FF90003E402CA5032C00FB013CC02C30032C0060
4089:10FFA000DB0232C00FB003D00420000000000000CC
4090:10FFB000CA002E808B82A0C08C90023C008BF02265
4091:10FFC000C20D800227008B1022400880223C00BF17
4092:10FFD000002FC008F0023C00BF01A3C00BF012F2DA
4093:10FFE0000040000000000000E0054C00B31C204071
4094:10FFF0000800062C009B0020D00820024C00A30023
4095:108010002CC008100A0C00BB0028C00930020C005C
4096:10802000B30020C00B3002F8005000000000000038
4097:1080300022111E0097A021A00879021E009790210E
4098:108040006009E8223E00AF8421E4485C021E00B7CC
4099:10805000902DE00978001E09B39021E40B7802D836
4100:10806000004000000000000048182C40B3B032402F
4101:108070002C81130C42D100B0C08C30034820E301A6
4102:108080003CC00C30030C00F3103CC0CD320B0C4054
4103:10809000D30030C00F3003D2020000000000000007
4104:1080A0004015BC00E7003F800BF103FD006D00327E
4105:1080B000401F7007D841C3103BC00FD103FD00FF24
4106:1080C000103FC00EF003EC10FF083FC30FF003D0C9
4107:1080D0000660000000000000A815EC04FB023E4012
4108:1080E0000BA003AC00DB0036800DB003AC00E80051
4109:1080F00036C12E90032C00CBA036DC0FB0032D68C8
4110:10810000FBA092C20CB103EA007000000000000066
4111:1081100048119C0837002DC00BE0021D80B70423D6
4112:10812000000A40021C18840025C01850320D80A39C
4113:108130003021CC0B34821C10B73021C8087002D219
4114:108140000460000000000000C0009E20B7802D6089
4115:108150000BFC229E008D8025A008F8229200B4809E
4116:1081600025E008F8021E0087B021E0097A021E18F7
4117:10817000B38021E0087802F0002000000000000039
4118:108180004804C520B3012CD80B3C022C08B90020B0
4119:10819000030A00822208900D26E40810020C00A3B6
4120:1081A0000022C00B30026C00B30022C0283002C293
4121:1081B0000430000000000000E8059900FA023F903A
4122:1081C0000FEC23A800DA0035800DE002BA02FEC2EF
4123:1081D000B6A00EE40B2800CA00B2800FA00B280046
4124:1081E000FA0032800CA003FA0460000000000000D6
4125:1081F0004800E000F8003E000F8203E000F8003E77
4126:10820000000F8103E040E8103A004F8483E000F85B
4127:10821000003A000F0003A000F8003E000F8003D2D8
4128:1082200000300000000000000800E500C9023E40E8
4129:108230000F90232400C90032682F10032400E91492
4130:1082400032400D900B0400D9001E400C9003240016
4131:10825000C90036400C90030204300000000000000A
4132:108260008014640089012E404B9012240089C2A220
4133:1082700060889003640089C1A240481603640289A3
4134:10828000002E40089022240089003E4028900A20B9
4135:1082900000100000000000001804240089022E4095
4136:1082A0000B1002240089102240899002AC00A10822
4137:1082B0002240099802A40089002A40089002240064
4138:1082C000890026400810020600400000000000005F
4139:1082D0000800240081002C410B120204818120221D
4140:1082E00048081202C481812402480A900284A081B5
4141:1082F000286C4A0812D204A181282C4A0812820252
4142:108300000100000000000000B8086140C8002E1401
4143:108310000F850B2142CA5022140D8543A140E8501D
4144:1083200030000D8502A1C0D8203A082C820B208293
4145:10833000C82034098C82032E035000000000000086
4146:10834000980DFC02F9003F404FD103E440F514BF03
4147:10835000440D51235C40F5101F4E4D50036408F945
4148:10836000283E4A8F9283E4A0F9283A4B0F9283E685
4149:1083700006700000000000000805F440FD003040D9
4150:108380000C90032400DD003B400E900374005D0060
4151:1083900036640DD000A600F94032780C99032440D1
4152:1083A000C99032500F9B03060070000000000000CF
4153:1083B0003810E280B800220108800A200088002AD4
4154:1083C00000088002200088002220088A8BE100B883
4155:1083D000802230280D022200D8E422280B8F0A0EBA
4156:1083E00004300000000000000805C480B100A04077
4157:1083F0000810020400890008400A904244009100DD
4158:10840000205828900285008120A04C09120A04807F
4159:108410009140A0400B10020201700000000000001B
4160:108420001815A400B9022040089002040089012216
4161:1084300040289022040089102240089002E400B1F4
4162:108440000022408190020400910022400B9002061D
4163:108450000460000000000000A015E500F10032609B
4164:108460002C92132402D1103A400E12036604D90054
4165:10847000B6400D1903A400F9003240099001240010
4166:10848000D90222400F900328047000000000000071
4167:108490002A01A500F9003E640F1003E400F9813EB3
4168:1084A000668F9023E480F9043E408F9003E404F942
4169:1084B000003C400E9003E400F9003E400F1003CA58
4170:1084C00000600000000000002A10A000F8243E0018
4171:1084D0002C84032000B8203E008C8003A000708212
4172:1084E00032000F80032008F80032002C800B200897
4173:1084F000C8003E000C8003CA0420000000000000F9
4174:1085000028052804BE803A8008A00228048E006D49
4175:10851000900DA0023A008E80A2800EE00B6800BA97
4176:1085200000228008A0022800DA002E8008A002CADB
4177:10853000004000000000000028814C00B1002CC069
4178:108540000830020C18A3022C108830068281A0008B
4179:108550002AC00B300A4C00B30020C01AB0028C01B4
4180:1085600083002CC0083002CA005000000000000048
4181:1085700020011C10B40A2BC80831261C0086002DCF
4182:10858000C00972021D00A54029C00A60025C88B3C0
4183:108590002025C80A72029C8097202CE8807202E88D
4184:1085A000004000000000000028081600B5803DE2F1
4185:1085B0000C7A8B0EC0A7812C200CFC039202EF805A
4186:1085C00039E40BD8011F00F780B3F48E79038E00D5
4187:1085D000C7C43DE82C7B03EA020000000000000055
4188:1085E000081DAC00F8003EDD87B603EDCCE9003E87
4189:1085F000400FB007CC100B0036D80F8043AD80FB86
4190:10860000283AC00DB4036CE2EB603ED40FB003C255
4191:1086100006600000000000004005FE00FE903FE5FF
4192:108620000EF8033E10FF9017600FFC037A00EE80F7
4193:1086300037E20E780FFF40EF881FE00CF883FE80D2
4194:10864000CFD0B3F00CF8C3100070000000000000A1
4195:10865000A8119C40B4100FCC0072021C00B6020995
4196:10866000C028F0029800A60021C00B6003FC02871E
4197:10867000002DC0087002DE008F1021C008F0036AD0
4198:10868000046000000000000080009400B6022FC2C9
4199:108690001A30801C00B60801400AF002180087005A
4200:1086A00021C00BD0029C10870029C0087002DC4456
4201:1086B000871064C00870020600200000000000005F
4202:1086C0006014CE60B0002CC008340A0C08B004005E
4203:1086D000400830A28980A26220E00B000ACC088307
4204:1086E000006CC0083052CC00830024C0083002580F
4205:1086F0000430000000000000A815AE00F8003FD0D4
4206:108700000EFC033C00F90092840FFC03640080001F
4207:10871000B7C30FB883BC04EF003FC03CF003FC02BA
4208:10872000CF0037C028F0132A0460000000000000CA
4209:108730008000EC00F8413EC80F3203EC00F8003A2C
4210:10874000C40FB103C400F90036C00FE40BEC04FB06
4211:10875000003EC10FB043EC04FB003AC00FB003E48D
4212:1087600000300000000000000110F400FC803FC059
4213:108770001FF0033C08FB0033802EF013A404CB0051
4214:10878000B9C02CD80B3C00FF003FC00970002C047E
4215:10879000FF003FC00FF003C00430000000000000E5
4216:1087A000C1006C00B8802EC00BB0036C00B9162855
4217:1087B0007208B0222740DB0022C008BD822C08BB13
4218:1087C000002EC048B0022C00BB002EC10BB002E04E
4219:1087D000401000000000000080052C00B8602EC092
4220:1087E0000BB0022C00B1002A844A3022AC209880C1
4221:1087F0002AC0083002AC003B002CC00AB002AC0812
4222:10880000BB002EC00BB042E00040000000000000A2
4223:1088100008040C01B0002CC00B30024C04B0002A3C
4224:10882000800830020000100428C00820428C00B3E9
4225:10883000002CC042300A8C00B3002CC08B3002C226
4226:108840000100000000000000000D6400F8503FC06F
4227:108850000BF0033C00FA0432800EF023AC00D90088
4228:108860003BC00C9003BC04FF003DC02EF00B3C004D
4229:10887000FF043FC00FF003C00350000000000000E1
4230:10888000A01DFC00FC003FC007F003FC047C02B507
4231:10889000000FF003F000FC0037C00FF0137C00FF66
4232:1088A000003FC00DF0036D00FF003FC01FF003E864
4233:1088B0000670000000000000C005D200D580330A19
4234:1088C0004CF803F200FC0037261FCA03BCC4CF20BB
4235:1088D00033E40F78033E44CF003BCE9F6813D000B3
4236:1088E000CD80B3600FFA83F0047000000000000038
4237:1088F0008010E080C928223008B222EA01B8822024
4238:10890000504F9C00A8D1DB10A6E017B803EC80DB29
4239:10891000081FD00BB802F600FB8022400BB00260AB
4240:1089200004300000000000008805C4208180200081
4241:108930008B3082C000B01028088B1130C48490287E
4242:1089400024C80B30024C00831004C80B3002CC004A
4243:10895000B30024400B3002E2017000000000000070
4244:10896000C015A600810022100BB012EA20BB002A1D
4245:10897000700A9C026200988826C802B2028E088B98
4246:108980001822C00BA002EE203B0026400BB0027064
4247:1089900004600000000000004015E000CB003280C1
4248:1089A0000FB003E700B8523E204B0C43EF829BC050
4249:1089B00032C00BB0026C018B802EC00BA083E6008E
4250:1089C000FB0036400FF003D00470000000000000F0
4251:1089D000E001B002FF043F900CF101F4087D803704
4252:1089E000000FC0239800F7002BE00FF823FC06FBD4
4253:1089F00083BFC087D003DC00EF003BC00FB001F89D
4254:108A000000600000000000004010A600CB00338092
4255:108A10000FB003E110F240B2003D94172D44FA412B
4256:108A200032C09FB0232C02CB4032C04F90033D0098
4257:108A3000CB003E400FB003100420000000000000F7
4258:108A4000880526008B7120D5039902E000BB8022A7
4259:108A5000601C80036000B80222C20B32022C018F1E
4260:108A600002D7C00BA0036D4053802EC00EF043729E
4261:108A70000040000000000000E005680280002400C3
4262:108A80000B3526C200B09020C08800024F20B302F0
4263:108A900060E21B38020C00880060C00B34824C027C
4264:108AA000A1902C400B30023001500000000000006B
4265:108AB00020013A088CA02D204B7802DA00B29021D8
4266:108AC00066487902DE40B791A1E0DBF8021E4084DF
4267:108AD0009001E08BF9025E0197802D600A780048D2
4268:108AE000041000000000000048080C00800024046E
4269:108AF0000F3203C4A0F14230C42C31024400F11102
4270:108B0000A0C00B300B0C42830000C00F30034C029E
4271:108B1000E3003C400B3001120200000000000000A6
4272:108B2000C01DBC00FCA533C00FD003FC01BF003F3B
4273:108B3000C40E7103740075103FC005F003DC40FFE4
4274:108B4000043FC00FF043FC007F003F400EF003D015
4275:108B50000460000000000000A804E800F204B380F4
4276:108B60000FB80B2C00EB8032C00C20132E08CB0169
4277:108B700032C50FB103EC48C81032FA8C38033C9070
4278:108B8000CB003E400FB013C2047000000000000094
4279:108B9000C8109800F60061810BF0021C00D700B7E6
4280:108BA000800C7002BC108F0021C88B7243FC88DCE3
4281:108BB0000037C80D50021C2287002DC00B7002D355
4282:108BC000046000000000000080009E00B680A9A0A4
4283:108BD0004B7C025E30A38821F00878021600858065
4284:108BE00021E00B7802DE008780A1E408D8024E0065
4285:108BF00097802D700B7802C8002000000000000054
4286:108C00004814EC00B20028C00B10024E90930222D0
4287:108C1000F00838428C42830422E44B38028E4083B1
4288:108C20000020C00938224E2193002EE00B3002DBD9
4289:108C30000430000000000000E815A801FA003B899C
4290:108C40000FA0027808AE4023802C6C0B3A008E8C6B
4291:108C5000B2000B8082E0028E0022800CE8027B8052
4292:108C60009A803E800FA003FA04700000000000000C
4293:108C70004800E009EC0036210B8013A100F8603EAB
4294:108C8000000F8103E000F8003E000F8043E010F881
4295:108C900000BE000F850B8000E8103E000F8003D25D
4296:108CA00000600000000000000810E402C902304823
4297:108CB0000C9913A402C9003E420C908F2400F900C5
4298:108CC00032280C8803E000C900B2400F9003E7008F
4299:108CD000C9103E400C1003020420000000000000F8
4300:108CE000800464018980A248289242C50089402EF0
4301:108CF000402C90062500B9002250089802C4008933
4302:108D00000176404B9202E50289002E400D900360EF
4303:108D100000100000000000001805240C8520A2406F
4304:108D2000089006E50089402E40099042A4A0310039
4305:108D30002250189102E400810022400B9006E400CA
4306:108D400089002E400990020E004000000000000043
4307:108D50000004150085402040081426E40081002C02
4308:108D6000401810028480B120A050081402E502814E
4309:108D70004020480B1006CC0081012C500914024AF7
4310:108D80000500000000000000B80D60008C003200FB
4311:108D90000C8023E000C8003E140D8012A144F8515D
4312:108DA00032002C8003E000880422140F8007E000CA
4313:108DB000C8003E000D80032E03500000000000009C
4314:108DC000989DE400F9003F500FD003DC01BD423F05
4315:108DD000504FD4437441FD103F101FC413F100FDE8
4316:108DE000407E440FD043F501FD003F400F9403E661
4317:108DF00004700000000000001805F400DF05336176
4318:108E00000F50533410FD0433444F500376C1CDE06E
4319:108E100033600CCE03F6C0E1C0B6648F500B3682CF
4320:108E2000CD003E444C9EC3C601700000000000000F
4321:108E30003810EA2880A0B2040B8A836000FA00365A
4322:108E4000288B8003E3C8C8842214088A02E280D8F1
4323:108E50008234341B8003600488002E200A8E42CEA8
4324:108E600006300000000000004805C480810804416D
4325:108E70000B92020400B1002C400B18022400B160D8
4326:108E800026400A1602C500A1C020480B90024700E8
4327:108E900091012C48181202D201600000000000006D
4328:108EA0001815A40C8B04A2500B91022404A9012EC6
4329:108EB000420B9002A400A90026600A9002E60081FD
4330:108EC0000022408BB002240899102E401A9002C64E
4331:108ED0000020000000000000A015E500C900364099
4332:108EE0000F10022500B1002E600F10122402B9A04D
4333:108EF000A4402E9103E600A90022400B19806404CF
4334:108F0000D9812E404C9003E814700000000000004E
4335:108F10006801A40AE900BE480F980BE400F9C436C2
4336:108F2000701F9203E690C1903A408D8803E400F9E7
4337:108F3000903E400B9803E640E9003E400F9003D27C
4338:108F400000600000000000006810A102D820B210EC
4339:108F50000C80832140C858B2104C800B2000F8428E
4340:108F600032000F8003E002D80072001C8000200055
4341:108F7000F8043E000F8003020420000000000000FF
4342:108F800028053804CE41238008E0023910AE402283
4343:108F90008008E0021A00BA002BAD038002E800CA84
4344:108FA000002A800AE0021800BA001A800BA0034AC7
4345:108FB000004000000000000068056C128900A0E07D
4346:108FC0000838020D88830004E00838320E2531018C
4347:108FD00024E08B3802E401830020C00830028C00BA
4348:108FE000B3002EC00B30020A005000000000000049
4349:108FF000A0011420862029B008F0823E04A7002199
4350:10900000708870921C20BD0069C00B7602D4808FDE
4351:109010002129E00A60869801B7002DC80B3B026049
4352:109020000440000000000000A8083E00C7A0B0E017
4353:109030002C780B1A00C38037E02878031A08F590C3
4354:1090400035E00F7C12D682C79021E40878039E0099
4355:10905000F5803DF10F7803220200000000000000BF
4356:109060000819A400EE8036C14FD003C800FB003EB3
4357:10907000510FB003E408F1603EC00FB003C500EB30
4358:10908000103EC00FB0096C00FB003AC00FB003C225
4359:1090900004600000000000000001FE00FD88336055
4360:1090A0000FF903CE40D78437700CD8233600C5881B
4361:1090B00033E04FF813F728DF8037E20C58033E0007
4362:1090C000FF903FE00CF803000020000000000000CB
4363:1090D000A9119C08F600A1000B6302D6308541312E
4364:1090E000C80850231C00D520B1800F7003B400C7FE
4365:1090F0000021C00F40A35840B7003FC40AF0022A25
4366:10910000062000000000000000009C40B71021D2A3
4367:109110000B7002DC42860025610851025000950068
4368:1091200025C0097082D400870024C00850025C006A
4369:1091300095042DC00870020000200000000000000F
4370:109140002014CC08B2D020E04B0802C4008080205C
4371:10915000F0081A028548811020400A3002C6109398
4372:109160000020C00A1C020D40B30068C40AB0020906
4373:109170000030000000000000A815AC01FE0032F035
4374:109180000F8803E600C8C836F628A60A6D009D00C1
4375:1091900032000BB003F603C70037C0089C0A6E000C
4376:1091A000BB002FC00CF0032A046000000000000088
4377:1091B0008000E401EB403E804FC103E400B8083A70
4378:1091C000408FA4136C20F9003E700FB003A440EB55
4379:1091D000003EC00F9223E800F9803EC00FB063E06C
4380:1091E00000300000000000000110FC08CE0833C071
4381:1091F0000FDA033000E40435C00DA0032800C500D9
4382:1092000033000BFA03F403CB0031C00CD403142059
4383:10921000CD8023C10CF002084430000000000000A3
4384:1092200081044410CBD022C00B94022284B8C60221
4385:1092300040082802A580890022600BB80264008BD8
4386:10924000002AC0C800036600810000C00DB00AA853
4387:10925000401000000000000080052C001300224098
4388:109260008B24022A00BB82224000AC0284008900C9
4389:1092700022220BB002C4009B002AC008B0022E00BC
4390:109280008B102AC008B002A01040000000000000AF
4391:1092900008040C10830020010B20020080B1002084
4392:1092A000C108200288018100A0000B300244019B0C
4393:1092B0000028C008B002480689002AC0093002828E
4394:1092C0000500000000000000008D6C00C300B2C06B
4395:1092D0000FB0032820FA00B1400DA007A000CD0078
4396:1092E00022000FB003F4009F003BC02CB00B240001
4397:1092F000C900BAC00CB00380035000000000000099
4398:10930000A01DFC06FF02AFC00FC003F010FC003F21
4399:10931000C09FE013F000FD043F404FF0037400EFE6
4400:10932000003FC08FE002B401FD0437C00FF0436876
4401:109330000470000000000000C005FC00C720B3C896
4402:109340001CF1037C20CF0A3FD00DF0037C808F32CC
4403:1093500033C40FF1833CE0CF1033C40DF2833CE201
4404:10936000C78017CC4CF38330007000000000000071
4405:109370008010E3408868223008060201A188C40EEC
4406:109380001408878001C0285002048B8602A19888A7
4407:10939000412A040A8482BD808B082BC488F40360B0
4408:1093A00004300000000000008805CC088240201036
4409:1093B000082112440482042C0889900244218B0065
4410:1093C00024888BA00040848930224888B002CC08D1
4411:1093D0008820A4C800320A220170000000000000AA
4412:1093E000C015A000890022C1889062280889082E33
4413:1093F000C008A0022808A80026420B9002CC508A80
4414:10940000222A860A8002EC0088842AC108B026300D
4415:1094100004600000000000004015F002CF0033C0DF
4416:1094200048F84379008DC03F308D60837860C45820
4417:1094300037200F58137B02CCC431200C4403EC02BC
4418:109440008B8036C024B012100470000000000000B1
4419:10945000E0019C00F4103D006FC913D412FE903F50
4420:10946000F00FDA23F414FF023BF00FEA23B600FFFB
4421:10947000823FE18FF403BC00FF003FC0AF7003F8F0
4422:1094800000600000000000004010A000CA00320888
4423:109490001CA003A520CB40BA101FB003AC00EB000A
4424:1094A00072900CB4032904C95232500CB4030C005E
4425:1094B000F84032C10EB00B50042000000000000044
4426:1094C000C8052D80898022D90890222A008854223C
4427:1094D000C08B80222019C80022408D801A2410D20F
4428:1094E0004422810D80037C00B00037C088F0023236
4429:1094F0001040000000000000E0054E008100A0F0D8
4430:109500000890028902800022C00B0022A000B00057
4431:1095100020400800020400826020800800020C083D
4432:10952000B20022C0083002380050000000000000E5
4433:10953000200103108E902324086B0216608F802177
4434:10954000280BF9061E408F8023A44979023A409DDA
4435:1095500090236409F8025E40BE9024E42879020852
4436:10956000004000000000000048080C42C009300024
4437:1095700028020384008A2030C48B11038450B30076
4438:1095800020C00CA4220400CB4030C50C30030E4098
4439:10959000F31030C40CB00312020000000000000001
4440:1095A000401DB004FB043DC00FF243F804FD013F31
4441:1095B0000C0F6103F848F4003D010FD003C800FC14
4442:1095C00004BD040B4803FC18FF143FD50DF00390B5
4443:1095D0000660000000000000A805E000F90132C0AC
4444:1095E0008E90032802D10032C00DA80B0800E800BD
4445:1095F0002E400C980B2E02CA00B2A06C80232D8046
4446:10960000CA8032D00CBA032A0070000000000000AB
4447:1096100048119C00B600A3000860020400860429DB
4448:10962000000850421404A7000D804A600200008127
4449:109630000021400870029D42860120C0083282123B
4450:109640000460000000000000C0009200BC806320A5
4451:10965000820802520084C22320880C0233008480D6
4452:109660002F21894C02121494C56421084C020E80EB
4453:109670009782A1EC08790230002000000000000071
4454:109680004814CD44B30020C00830024D8003882820
4455:10969000C0083C060F00A3432CC21B38020F009BDE
4456:1096A0008864D008B8028C10930020C008300A12D9
4457:1096B0000430000000000000E815AA00FA0532801E
4458:1096C0008EA00B6900CA4032A03CA8032A00EA26FB
4459:1096D0003EB00DA1632820CA4036A00CE013280933
4460:1096E000DE0032802CA0033A04600000000000007D
4461:1096F0004800F020F4003F000F4023B000EC003F92
4462:10970000061EC213F088FC203F048EC003F080ECDC
4463:10971000403B0C0FC0A3E000E8003E004F8003D2A6
4464:1097200000300000000000000810E400F9003240A2
4465:109730000C90032400C98032400F9053E410C900FC
4466:1097400032400D9003E400F90036408F900324105E
4467:10975000C9013C400C9003C204300000000000002E
4468:109760008004474489002040089002250A81102285
4469:1097700040489003C40089007640289002E410B964
4470:1097800040B2400B9003640089002E41089042E0F3
4471:10979000001000000000000018052402BD0023484E
4472:1097A00008D0061D048D0029C04AD022F40085008F
4473:1097B000614018D012FC00BD40A3404BF0020401F0
4474:1097C0008B002E40089002C6004000000000000000
4475:1097D000080436808520A34808520A148185202970
4476:1097E00048085202B48085202548885202D480B5AA
4477:1097F0002021480B520244A281002C4A081282C246
4478:109800000100000000000000B80D6000F8512200C7
4479:109810002C85022148C800BA140F8512E142C850B5
4480:1098200022000C0003E000F85032000745032080BE
4481:10983000C0013E082C8203EE03500000000000002F
4482:10984000980DE440F1103E44079143E458F9113477
4483:10985000444F9102E450F9103C4F0F9383E4F0F928
4484:10986000113A4F0F9103E4A0FD283E4A0F9283E680
4485:1098700006700000000000001805F6A0CDA0B36837
4486:109880008C9A033680C5A022600C9A232604F9A086
4487:1098900032660C9A830620C5A022600C9B032648E2
4488:1098A000C9003E780C9A030600700000000000001A
4489:1098B0003800E10088442295088512A142884002C0
4490:1098C0009008840223A0BA4022A0088E92A3A0A8E8
4491:1098D000402A1008AE02234088002E380884120E59
4492:1098E00004300000000000000815C4008B12224064
4493:1098F00008900244008140A05008110A0500B110F0
4494:10990000A04808900204008140205028110244829F
4495:1099100081002C50081102020170000000000000BC
4496:109920001815A40289402240089412A50089282213
4497:10993000490894022448B9142240089402A440A182
4498:10994000502A50089142640089402E4008100206B7
4499:109950000460000000000000A015E400C9003070A1
4500:109960002C100B6600C94032500C90032620F9C021
4501:1099700032700C90032620C90032400C9C03640016
4502:10998000C9413E402C900B280470000000000000EC
4503:109990002801A400F9043E480F9003E488F900343C
4504:1099A000412F9C03E410F9003E442F9903E410F981
4505:1099B000003E500F104BA410F9203C400F90034A7A
4506:1099C00000600000000000002810A000C8003E1049
4507:1099D0002C80032002C04032001C040F2100C00470
4508:1099E00038000F80032108C86030100F800220006B
4509:1099F000F80032000C8003CA0420000000000000C0
4510:109A000028051A2082042F8008A00238008E8022A8
4511:109A10008008E00228008A0022810B20022800DE54
4512:109A2000E436800BA0422800BA04228008A002CAB3
4513:109A3000004000000000000028054C0083012C803D
4514:109A40000830022E608290A0C04830020C028300D1
4515:109A500028C00B300A2C0083C220C00B302A2C00F7
4516:109A6000B300A0C0083002CA00500000000000008F
4517:109A7000A0013C0087012DC208F3123C008F012198
4518:109A8000C86872221E04872021C40B70023C849F88
4519:109A90000025C44B70021C04B78121C8087202E87B
4520:109AA0000040000000000000A8001E00C7813CA08C
4521:109AB0004C7A0B1A00C68030E008F8820E40CFF0D6
4522:109AC00039E80F3A031E20C78031E30F38231F08FF
4523:109AD000FFC033F20C7E03EA020000000000000029
4524:109AE0000815880A7B003EC10B3423C810FB023ED8
4525:109AF000CA0FB743EC80FB002EC20BB483EDD0FA43
4526:109B0000003ED90FB383EC80BB203ED82FB403C2F4
4527:109B100006600000000000000005FE00F59131A085
4528:109B20000CFC03FE00C48131EE8DF80A3E30CF8478
4529:109B300033E02CF883FE10FE8033E00CF9193F4827
4530:109B4000CFC033E004FC03C0007000000000000040
4531:109B5000A8119C08B7A121C8087102F0A085202196
4532:109B6000CE0870023C808F002BC5087102DC10B457
4533:109B70000021C10AF3820C00870129C00871026A22
4534:109B8000046000000000000000009D00BD2127824D
4535:109B9000007002FC048C00A7CCA870023C08AF0047
4536:109BA00021C0087002DC00B70021C40870161C0A2E
4537:109BB0008F0021C0087002C00020000000000000DB
4538:109BC0002010C800BB4424E208B102C280018024F6
4539:109BD000D08830020F52839128E4883D02CED0B065
4540:109BE000B2A2C00A34120C02830028C00830024816
4541:109BF0000430000000000000A815AC00FB01E440A8
4542:109C00002CF043E5008A8837E000FA023D00EF00BF
4543:109C100033D10CF403FD00F94033E80CFC013C04A3
4544:109C2000CF0233C02CF003EA046000000000000003
4545:109C30008000EE08F9103AD00FB093EC00FB0B3A1D
4546:109C4000C08EB083EC80FB097EC80FB213EC00F924
4547:109C5000003EC28FB24BCC04FB003EC00FB003608D
4548:109C600000300000000000000110FC00FF0833C0BD
4549:109C70001CF0037040C4C033C20FF0031C10C700B7
4550:109C800031C00C70031C00C54133C00CF0232C0004
4551:109C9000CF00B3C06CF0038044300000000000002F
4552:109CA00081046A00B99032F108B0020A10D900228A
4553:109CB000C10BB0022C00CB0622C088B0122C008849
4554:109CC0008022C10DB0022C00830022C108B046E002
4555:109CD000401000000000000080012E00B90022F0BA
4556:109CE00008B01264008A0022C00B30422C008B00A6
4557:109CF00022C008B0022C008A0022C088300A2C0042
4558:109D00008B0020C008B002E000400000000000000E
4559:109D100008040C04B102E4C108B022200293002020
4560:109D2000C00B30120C028302A0C028300E0C02803F
4561:109D300000A0C049300A0C028B0020C0083002C2CB
4562:109D40000100000000000000000D6C00F92432C08A
4563:109D500008F0036400C800B3C01FF00B3C008F0084
4564:109D600033C04CF0433C08C30031C00CF0033D4805
4565:109D7000CF0031C00CF00380035000000000000051
4566:109D8000A01DF004F9413BC04FF003F011FD003F6E
4567:109D9000C0877027FC00EF063FC00FF002FC08FCF4
4568:109DA000003FC047F043FC0077003FC00FF003E8DE
4569:109DB0000670000000000000C005D200C701370C8B
4570:109DC0000FE823104AC4C031300CC9033446CF1009
4571:109DD00033D00CF4033C58CF0033C02DF1033E02C6
4572:109DE000CF213FE40FF203300070000000000000BC
4573:109DF0008010E4840B40224C0BA8022CC08B202244
4574:109E0000C84A32022480832020C008300220008B00
4575:109E10002132CA4832022C308F902E880BBD12207E
4576:109E200004300000000000008805CE20A340E04878
4577:109E30004B20220C0282002A00082002048080208D
4578:109E400020C80802020C00800C60000820122C8838
4579:109E500083002CE80B30026201700000000000005B
4580:109E6000C015AE00AB01A2600BA002200181002250
4581:109E7000C00A901204208A0822C108A00228008883
4582:109E800000244408A202AC008B042E8803B00270A8
4583:109E900004600000000000004015EC00EA90322849
4584:109EA0000FB6032008C9043AC04C90222400CB40CE
4585:109EB00032A80CB2032C00CB80B2E00CB00B040033
4586:109EC000CB003EC04FB00B500470000000000000FB
4587:109ED000E001BC00DF803B810FF0C3FC00BE011F2E
4588:109EE000000FE023F400FF003FB04FF043D402FF27
4589:109EF000913AE04EF0037C0CFF002F800F3003B846
4590:109F000000600000000000004010AC01CA00725068
4591:109F100004B4032C82CB0032E00CB8032704C8C879
4592:109F2000B2A20C88032C00C1003E002C301B2C0474
4593:109F3000FB103EC00FB00310042000000000000022
4594:109F4000C8052C040350A2E00834423300880020E6
4595:109F5000100D840325008A40229008A5022C008958
4596:109F6000A43A4008B0022C00BF842E800BF052327D
4597:109F70000040000000000000E0056C808180248823
4598:109F8000893C2621009000200208808200209B004E
4599:109F9000224088B0120C0883802CC00810020C00EC
4600:109FA000B3802C400B30023800500000000000004D
4601:109FB00020013E0A85A0A56008FB823E849F816344
4602:109FC000E089791252809782216C187802120087FA
4603:109FD000A129E0085B021E00B7C02D600B780208C3
4604:109FE000004000000000000048080C00810826C264
4605:109FF0002C32130EA4D200B0001C21122402D12056
4606:10A0000030C80C10030C00C2103C800C23030C4021
4607:10A01000F3003C480F300B1202000000000000006B
4608:10A02000401DBC00FD20BB40077202F010ED103F48
4609:10A03000C40FD163B480EF003FC80FF003D800FE17
4610:10A04000343FC40FEB43FC00FF087F400FF183D087
4611:10A050000660000000000000A805EC00C800338086
4612:10A060008F28032000490232C00F90032000CB004C
4613:10A0700032404CB00B2C00CB8032C00E9E0324002B
4614:10A08000FB203EC00FB0032A00700000000000005B
4615:10A0900048119C008D0121C00B60021D00D60021DB
4616:10A0A000000BE00200008304204008704234028765
4617:10A0B0000123C028510A1C04B7302DC00B72039233
4618:10A0C0000460000000000000C0009E00A64021A027
4619:10A0D0000B68020E008F8021E00B78021610A5801D
4620:10A0E00021E00818021E00838021A00878021F00CA
4621:10A0F000B7802DE00B380230002000000000000087
4622:10A100004814EC12A16420E60B20020010904A20B3
4623:10A11000204B00420400830020C20830028C0083E0
4624:10A120000420C00830020E00B3002CE04B30029235
4625:10A130000430000000000000E815B800EEC03390C5
4626:10A140000FA01B0800CA40B2820FA00B2802CA0051
4627:10A15000B290ACA0032900CA40B2808EA4032A00AA
4628:10A16000FA003FA80FA00B3A0460000000000000B6
4629:10A170004800E20290003E000F8803F100FC023F1D
4630:10A18000200FC803C100F0003E008F00016002F8FC
4631:10A19000083E000F8083E000F8002E008F801392AD
4632:10A1A00000300000000000000810E402C900B264A2
4633:10A1B0000F9103E404C90032406C90032502C9905A
4634:10A1C000B0400C90032420C9A03E404C9023E400F2
4635:10A1D000F10092400C100302043000000000000067
4636:10A1E000800464008980A2400B9642E50489002225
4637:10A1F00040089002240809412240489042240489E2
4638:10A20000802640089002E400B90022400894022011
4639:10A2100000100000000000001805250089202240E1
4640:10A220000B9002F4848500214048500224208D08C0
4641:10A23000234008D00294008D0029400AD002A408CF
4642:10A24000B90028401890C20600400000000000003D
4643:10A2500008040500810020510B1002F58085C1A182
4644:10A260005008540A050685402150885402950085FF
4645:10A27000442D502A5412C501B100085008100202A2
4646:10A280000100000000000000B80D6000CA503280DC
4647:10A290000F8003E802C80132002CC0032000C8026E
4648:10A2A00032002C800BA000C8003A004E4023A008CA
4649:10A2B000F8003A002C800B2E035000000000000034
4650:10A2C000981DDC04FD403F504F9063E440F1023E96
4651:10A2D000410F9013F504F9413E500F94436502F984
4652:10A2E0004136504D9403F400F94137404F9403E652
4653:10A2F00006700000000000001801FC00CDA83370BB
4654:10A300000FD013F688CD0032504F142307A0C9C0D8
4655:10A3100032780C9E033702CDC032640F98032400BC
4656:10A32000CD0032402CDA030600700000000000006F
4657:10A330003810E20888EB22300B8012E804A0A02A33
4658:10A34000200B8A0A23008880222800C842238080AC
4659:10A35000D420280980022294A8002A008885020EB1
4660:10A3600004300000000000000805C4A0830024D8C9
4661:10A370008B1002E514890A21480B52025480854053
4662:10A3800025580956024502812020500B1402043042
4663:10A39000810020400810024201700000000000000F
4664:10A3A0001815A4128900A6400B9042E498A9802BAE
4665:10A3B000400B510255009D08274809F602440081D0
4666:10A3C00004224019918A2480A9002A40089002465C
4667:10A3D0000460000000000000A015E702C904365820
4668:10A3E0000F9003C500C90032400F90136402C900EA
4669:10A3F00036402D900B6604C9E0B2488F9847240080
4670:10A40000C90072400C1003680470000000000000D6
4671:10A410002801A508F9213A400F9003E604F9003E0F
4672:10A42000404F9883A400E940BA600E9003A480F9DD
4673:10A43000A33E480F980BE400F9001E400F90038ADA
4674:10A4400000600000000000002810A248C820320868
4675:10A450001F8083E122C80133002CC0033004CC40AC
4676:10A46000B1000C44032012C84132002D840B60005F
4677:10A47000F800B2004C800B0A04200000000000002D
4678:10A4800028053A00A600239003E492F800820036E3
4679:10A490008008A0036800CA00228308A00228038A5B
4680:10A4A00000228008A0022800B68022800DE8020A5F
4681:10A4B000004000000000000028056E00824220C01D
4682:10A4C0000B3402CD09800020000800020002980031
4683:10A4D000202028000A0410818020C008B0022C002F
4684:10A4E000B30022C01831020A005000000000000032
4685:10A4F000A0013802A30021401B7002DC2084056506
4686:10A50000E008F0027C10970024C0083002548887CD
4687:10A510000921E80933021C80B60863C809381228EB
4688:10A520000040000000000000A8081E00C7A0A1E035
4689:10A530000B7803FE00C58233200C48031E01DF8028
4690:10A5400031200C48030640878231F80D7B035F0001
4691:10A55000F38031F20C60032A0200000000000000CA
4692:10A56000081D9C00FB012F4007B003E804F9003EE2
4693:10A57000C10FB003E006E8023AC00FB001A410F921
4694:10A5800040BED006B003EE00FA003CD80FA003C2D4
4695:10A5900006600000000000000005F600CF8833646C
4696:10A5A0002CF803FE02C4B033208CD8033200CCB4A4
4697:10A5B00033A00CC8031620CFC033F00CF803FE0004
4698:10A5C000CD803FE00FD803000070000000000000C5
4699:10A5D000A811B5048712A1500A7412C44084112333
4700:10A5E000C028E0021C02A711215848700A14008DEF
4701:10A5F0000023C00B7002FC4086002DC00B50022AC5
4702:10A600000460000000000000000095008740210069
4703:10A61000187102DC009528E1020850023C42A72292
4704:10A62000218088410214008500A1C0097102DC006C
4705:10A63000B5102DC00B4002000020000000000000FB
4706:10A640002014C41083842011083002C310912020EC
4707:10A65000C00828120000A08420400830020426838D
4708:10A660000020D00B3002CC00B2002CC00B0002083E
4709:10A670000430000000000000A815AD00CF88B2E84B
4710:10A680000C3013CEC2D08232000C0E0B2000C888D2
4711:10A69000B2402CBA433702CB00B3C02CF003FC12FB
4712:10A6A000FB007FD10F300B2B046000000000000086
4713:10A6B0008000ED02F1403E410FB023ED00E8013E85
4714:10A6C000C80FB013EC04DB003C800F0403E440F936
4715:10A6D000003CC20EB003EE004B413EC00FB003E0A1
4716:10A6E00000300000000000000110FC004B0032426E
4717:10A6F0000CF0033680CD0033004CC0833C04F700DF
4718:10A7000032400CB1431400CD8033C00CF003FC0088
4719:10A71000FF00B3C20CA003004430000000000000A2
4720:10A7200081044F028B80203008BC02201089002257
4721:10A73000C000B0036004B800A290288C1A24028BD9
4722:10A740008322C108B002FC00B36020C00DA003E06A
4723:10A75000401000000000000080052E00ABC0226009
4724:10A7600008B8022900880120000890022000B800E3
4725:10A7700022C008B002E4008124A2C009B046EC0067
4726:10A78000B90022C008900220004000000000000034
4727:10A7900008042C00A100A04108B00A205388002022
4728:10A7A000C028A0024C00B30020008800028400836F
4729:10A7B0000420C0283002CC00B30262C0091002C2DB
4730:10A7C0000100000000000000000D6C00E900220004
4731:10A7D0000CB0030004C900B2000C90032C00F3007D
4732:10A7E000B2C08CB003B4028F0023C004F003EC08A5
4733:10A7F000F90033C00C80030003500000000000008B
4734:10A80000A01DFC10DD043F000FC023F090FD002FC1
4735:10A81000C00FE043D000FC003F008FC0227400FD59
4736:10A82000043FC00FF003FC00FF063FC00FC043E829
4737:10A830000670000000000000C005FC80EF2011C081
4738:10A840000E7203BDB0CF31BFCC02F003FCC6CF0106
4739:10A850000BC50FF1033C04EF6133D807F0033480DC
4740:10A86000CD3073CC0FE80330007000000000000012
4741:10A870008018E90088692210088C00218488412210
4742:10A88000108886920100886222104B870221A088DE
4743:10A890006020100B86A235A0AB60A1C40BB80220CB
4744:10A8A00004300000000000008805CDA8334120C618
4745:10A8B0004A31008C10933328CC2934128C50931CCD
4746:10A8C000288401204A4C41831024CC4B31424C4017
4747:10A8D000911024C00B8002220170000000000000D3
4748:10A8E000C005A820900222000880002030B8082669
4749:10A8F0000001808220201808424003910260000875
4750:10A9000001A6000B80006C10BB0126C04B900A30E2
4751:10A9100004600000000000000011FD00FD4133A1B3
4752:10A920000ED203B502DF423B010FD443B500CD4048
4753:10A930001BC40D78037002EC0017A10FE80B2C026A
4754:10A94000D99026C00FAC0300047000000000000086
4755:10A95000E001B800EE001F644FE003D810C41833C4
4756:10A96000C00CA0A1B809E60936220F8823BC00FB61
4757:10A97000003B640FD9039C00E3043BC00FF403F8D1
4758:10A98000006000000000000040108D00C940B6804B
4759:10A990000F1003A720FB50B6084C14036522D940C2
4760:10A9A000B6800EA00B0000D800768228A023640099
4761:10A9B000C90412C08E800390042000000000000033
4762:10A9C000C8052B608A09205008A023E900B8C022DE
4763:10A9D000F008AC0228048AC222500890062C008B92
4764:10A9E000042251089402E4048B0437C0081842265C
4765:10A9F0000040000000000000C0044B0082C8244357
4766:10AA00000B260A8800B08022E40B20426900A29045
4767:10AA10002840E810020C00BB002850889082C40136
4768:10AA2000830020C00A1002BA00500000000000009D
4769:10AA300020104E80810021A8085802D601B79068E6
4770:10AA4000200359825600A5842DA2186922020034E1
4771:10AA50008029A8086806C614858225E00858821C4B
4772:10AA6000004000000000000048084800C2F03440E8
4773:10AA70000F20038880F81030C027210B4880EA207F
4774:10AA800038000C00120C087300B8400C12234C0262
4775:10AA9000433430C00E110392020000000000000099
4776:10AAA0004015AC90F9012E884B90116400FB1032D8
4777:10AAB00000009103A400C90032C44DB043E004C8B3
4778:10AAC0000036890FA803ED00F9143EC00F1043D0E3
4779:10AAD00006600000000000000805E800C8003A0019
4780:10AAE0000C0053A000E80132010E80532010C80072
4781:10AAF0003A400C90032010E804B6008480032D1225
4782:10AB0000CB002ECA049003EA007000000000000091
4783:10AB10004C198C00870221C00870020C00830021B0
4784:10AB2000C00830624C048300218048E0123C00875A
4785:10AB30000021C00870021C00850124D00A5002F2D6
4786:10AB4000046000000000000020009A00808028209F
4787:10AB5000084C22D200A48024300B4802520084C04A
4788:10AB600021200948681300A48060200908025600CB
4789:10AB700097802DE0885802E01020000000000000BF
4790:10AB80006C04CC00838020D80830024C4083002421
4791:10AB9000D109B9424E00830020C18930420C0083A4
4792:10ABA000F0A0D9193622660691000CC10A1002C223
4793:10ABB0000430000000000000E815E802CAA52A9150
4794:10ABC00028A803EA02AA00B6A00FA00A2A92CA8304
4795:10ABD000BA8029A0032B00EA4066902DE40B6A801E
4796:10ABE000DA003E800CE003FA046000000000000080
4797:10ABF00048018000FC003D000FC003B014FC003B86
4798:10AC0000120EC043B114FC003D000EC003F020F44E
4799:10AC10000031000E4413A000E80636004F8013D226
4800:10AC200000300000000000000810A400D1003660D1
4801:10AC30001C180B4600D98030402C98058600C18036
4802:10AC400092400D10034402890032700C98012400D8
4803:10AC5000C90430400C9003C2043000000000000022
4804:10AC60008004640089002240089402248089012223
4805:10AC7000404891022400D990224108901224108962
4806:10AC800000324008951224028100A2410D9042E05A
4807:10AC90000010000000000000380524029D0023443D
4808:10ACA00008D2067480B52023401AD00635908D0254
4809:10ACB0002F4419D00274008D00634018D402A411EF
4810:10ACC0008900224008B002C60040000000000000D9
4811:10ACD00028140480852021680852021480A520A130
4812:10ACE000480A7238148095242D4828520214808511
4813:10ACF00020214808520684808120204A091002C27F
4814:10AD00000100000000000000380D6140D850B2146E
4815:10AD100028A0036140F85032944E85042142C85067
4816:10AD20003C140D800361408850B2142CC509A14029
4817:10AD3000C850321C0C8003EE0350000000000000DD
4818:10AD40009815E440F9103A440F9103E440D9143EB9
4819:10AD5000440D91436440E91032440793C3E450D159
4820:10AD6000107E440391015444FD143E400FD003E68D
4821:10AD700006700000000000001805F680DDA03368B2
4822:10AD80001EDA033690CDA03B680AD823760CED80FE
4823:10AD90002B620B9902A780F9E137680CDA03278050
4824:10ADA000C9A222684C5003C60070000000000000D9
4825:10ADB0003818E1408850221408802260008804225C
4826:10ADC0000008042601008850221008AF02230088E2
4827:10ADD000C0A0108884022380A0402A100880124E50
4828:10ADE0000430000000000000480084008101204081
4829:10ADF0000A1402450081412C500B14020504A100E5
4830:10AE000028408210028440A132805009140204C4F8
4831:10AE100091106444281002D201700000000000006C
4832:10AE20001804AC02810022C1089002440289022663
4833:10AE30004109900A240C8904225008902624008994
4834:10AE40000022410910222440B9012E4008900246F8
4835:10AE50000460000000000000A015E41089003240EA
4836:10AE60000A900B241089001E409B90022410290098
4837:10AE70001A400E9441A4002900124005904126007A
4838:10AE8000D90024400C9003E804700000000000008A
4839:10AE90004801A402A900BC400F9003A404F9003AA1
4840:10AEA000410E90838400F9003C400E9002C408E9F2
4841:10AEB000003A402E900BE600E1043A400F92035A0C
4842:10AEC00000600000000000000810A020D80036023A
4843:10AED0000E00A3E018C00030030F803320004000B4
4844:10AEE000320D0F040BA002C80232028C8203200232
4845:10AEF000C80416004E80010A042000000000000073
4846:10AF000028053B008ED8238008E002F8808E1023AD
4847:10AF1000A20BE0827A208E3023A10BE00228008E63
4848:10AF2000002B8808E44238008E04238008A0020A1F
4849:10AF3000004000000000000028056F4093C6244038
4850:10AF40000A3802CC008301ACF00BB4024C04A3809D
4851:10AF500028D04B30024C00AB042AC02A300AAC1077
4852:10AF6000930020C10A31020A0050000000000000D6
4853:10AF700080111C0082002142887406DC0B86022DA1
4854:10AF8000800B702A5800A600A9C00B70025C88A72D
4855:10AF90002029C00A70029C109720A1C808D8022856
4856:10AFA000004000000000000088080E00D7803760D5
4857:10AFB0000E6813FE00CF803DE00F78231E00EF8265
4858:10AFC00031E00F3CC37E04EF80B1E00EE803BE80A9
4859:10AFD000D7E033EA0E78032A0200000000000000E8
4860:10AFE0000815AC00FA013E000FB003E004F800328F
4861:10AFF000800F8043AC0AD80036400FB0032C0CDB26
4862:10B000000026C109A0136C40EB403ADC0F900BC244
4863:10B0100006600000000000004004BE00CF8133E95C
4864:10B020001FF913B650EF801FE404C8037E006D8142
4865:10B0300033640CF81B3E202F8893E80FFB032E800F
4866:10B04000CFC073E02CD903D00070000000000000D6
4867:10B05000A8189042891821C01F710214C0F7202738
4868:10B06000404071121800872021804871023C0887F7
4869:10B070002021820B61A21E44DF0131C8087302EA5D
4870:10B08000046000000000000010008C00870021C850
4871:10B090000B70029C0987022D829940020400A509C9
4872:10B0A00021401970021C00870525484B72020C4094
4873:10B0B0008700A1C0485002C400200000000000002A
4874:10B0C0006804C120894CA0B40A38022200A1D0240F
4875:10B0D00030098002274481C62214093D2A0F028BC1
4876:10B0E000C0A6200B24000C10938120C0483006D845
4877:10B0F0000430000000000000B815A10089C132D161
4878:10B1000003BC03A92089413E6085BC8B2540EB41EF
4879:10B11000A2A00DF0133E20CF9036304FBC0B3C0068
4880:10B12000CF8033C10CB103EA0460000000000000CE
4881:10B130008000ED00F8013CD00FB303E882D8203640
4882:10B14000802EB213E100FA007EC82EB003EC80DB43
4883:10B15000103A084FB223CC02FB103AC00F9003E420
4884:10B160000030000000000000A010F000CD103342BD
4885:10B170000CCA237C00CF00336206F0013A00CF08EE
4886:10B1800033801CF0813C00FF0033A00CCA01FC049A
4887:10B19000CF003FC00FF003C00430000000000000EB
4888:10B1A000A1046D408848A231081002201088B42202
4889:10B1B000A00880006A848820225208B00A2C10BBA4
4890:10B1C0000032B3888002EC00DB002EC00B9012E14D
4891:10B1D0000010000000000000000500108A0122A0FD
4892:10B1E00008B0426020800020441A801AE442A00681
4893:10B1F0002200783002AC00BB00A24408B012EC0080
4894:10B200008B000EC00B9002E0004000000000000028
4895:10B21000081400088000208108300240128000A03D
4896:10B220004008B002C000820000800830028C00BBE1
4897:10B23000002000082002CC8093002CC00B3002C2FA
4898:10B240000100000000000000000D6000CA14320080
4899:10B250000CB0034C00CA0032000E0012A000C00067
4900:10B26000700028F013AC00FB0032402C1043EC00BF
4901:10B27000CF003FC00F9003C003500000000000004B
4902:10B280002015F002FC001F00677003B000FC003FB7
4903:10B29000002DC0033010FC01BF000F70037C00F7CD
4904:10B2A000043B000FC013FD10FF003DC00FF003E88A
4905:10B2B0001270000000000000C005F4C0CF803360B1
4906:10B2C0000EC9133650CE863F080CC0033E02D7800D
4907:10B2D00039E00FF8133E40C7303BCE0DF6033D88F2
4908:10B2E000CF3133E40F78033000700000000000001D
4909:10B2F0008010E5D0DB807260889202E4108A802E94
4910:10B30000344A8C032E00AB8002E00BB8022C808FF5
4911:10B310006013D84A76029D84AF3022480B8812A071
4912:10B3200004300000000000008805C4008B002400E9
4913:10B330004A0002AC8083002C01280402AC008B017F
4914:10B3400020C003B0020C80834020C1A834228D139A
4915:10B350008320ACC80BB00262017000000000000046
4916:10B36000C01586009B04AE000A9002EC000B142E60
4917:10B37000C602B1126C00AB202AC10BB0422C008B6C
4918:10B380000226C10AB002AC00AB042A400B9002F0C6
4919:10B3900004600000000000000011E700C301364017
4920:10B3A0000E88132402CA001E202C8E0B2C00CB000A
4921:10B3B0002AC00FB8032E06CB003AC04CB013AC0C19
4922:10B3C000CB003EC80FB043500470000000000000E6
4923:10B3D000E001B408FF91334009DC01F4207E022E25
4924:10B3E000400D9801BC80EF80B7E48FF40BFE407FE6
4925:10B3F00000B9C04EF003FC08F70037C00FE002B8F8
4926:10B4000000600000000000004010A144CB023200A8
4927:10B410000D800A6D00EB04109028220B2CC2CB206B
4928:10B4200076C00EB103EC01CB0632C10C30032C0206
4929:10B43000CB003ED00CB00310042000000000000040
4930:10B44000C8052148AB0020000095234C08BB012211
4931:10B45000C008B2020C08838892D5283402EC028F0F
4932:10B460002023C04DF0017C00DF002EC00D300372A0
4933:10B470000040000000000000E00544008310206050
4934:10B480000925020008A0004C000B0C224F1293402B
4935:10B4900000C0093E02EC00AB80A4C00930222C0899
4936:10B4A000B3010C8108300238005000000000000099
4937:10B4B00060011609B78021640878061200B4822D55
4938:10B4C000A41B69067E04179225E6097806DE80A78C
4939:10B4D0009025E00979505E04B7922F6109C80248AF
4940:10B4E000004000000000000048082500C300B00331
4941:10B4F0000DA3420940E100BC400F11034C001300B2
4942:10B5000020C0093203CC10A30026C48D302B0C8040
4943:10B51000F3007C800C3001120200000000000000EB
4944:10B52000401DBC00E7103D012FF142E800F59003FB
4945:10B53000C10CF1439C04EF083BC20CF081DCA0DF9E
4946:10B54000003BC33FF083FC05DF0C3D400FD103D02F
4947:10B550000660000000000000A805F400CB80304029
4948:10B560002CA003E000F88032C02EB80B2C46D3008C
4949:10B5700030C00C30030C00DB4832C01FB4032C88F1
4950:10B58000CB4832800C30132A00700000000000000D
4951:10B590004811B40087012140087042D008B4002946
4952:10B5A000C00870021C00870021C80C720A1C848F1E
4953:10B5B0004009C48F73129C40832021C0086002920E
4954:10B5C0000460000000000000C0009601AF80212050
4955:10B5D000086802DA00BD8021E00978021E008F8829
4956:10B5E00083E229F8825F8087A025E00B3A120E5093
4957:10B5F00097A421A02978023000200000000000005C
4958:10B600000814CC02A1810000487002C800B1002CCF
4959:10B61000F80931420C10830020E00838124E0083F4
4960:10B62000006AC00B30028C04930020E009380292BB
4961:10B630000430000000000000E815B940EE20308022
4962:10B640000CA003E800FA0033B00DE4033288CC808C
4963:10B6500023000DC0036202CA0036800FA0432806F3
4964:10B66000DA0033A00D6A033A046000000000000015
4965:10B670004800E0009801BE000F8003F000BC0038D5
4966:10B68000040880A3E000F8003E000F8013A000E053
4967:10B69000003E000E0003C000E800BE044E8007D24A
4968:10B6A00000300000000000000810E480C9003E687F
4969:10B6B0000C90036400C9003E400C9043E000C800B9
4970:10B6C00032000C80132000C90036400C9003640047
4971:10B6D000810032400490130204300000000000009A
4972:10B6E0008004650689402E601A142A052089002EE0
4973:10B6F00040089002C408C102204008101A240089A2
4974:10B7000010324108901224008904364088940A209F
4975:10B7100000100000000000001805042089552E408C
4976:10B7200008D50234008D002E40189002E4009900E4
4977:10B730002640089002040A8900264038900A240016
4978:10B74000A90020400A90820600400000000000008E
4979:10B750000804050081002F400AD402340085012C22
4980:10B7600040081042E40699002240081002050081BA
4981:10B770004028500814120500A14024505A1002021B
4982:10B780000100000000000000B80D6000C8043E0089
4983:10B790000880032142CC003E002C8002E000D8004B
4984:10B7A000B6002C80022002C80036000C8003600224
4985:10B7B000E80032008E80032E0350000000000000DD
4986:10B7C000981DF500F5003E40879003E400F1003D30
4987:10B7D000500F5403D100EC403F100BC443F100F96B
4988:10B7E0004036500F9413E510D9443D402DD003E668
4989:10B7F00006700000000000001805F660CD023B4016
4990:10B800000CD003B440FD063E400C90036604C98290
4991:10B81000B6620F180B3600CD4032610C9023240A1B
4992:10B82000C90032404CD04306007000000000000008
4993:10B830003910E380D80022000D80022294B8002E37
4994:10B84000000D80032100884022000BC42221508873
4995:10B85000802222088002201080012A000A80034EE4
4996:10B8600004300000000000000005C60089002A40E6
4997:10B8700088100A8408B10029400A700AB5008F4078
4998:10B8800029C00BF4022400812028448910020404FA
4999:10B8900081022A400810020201700000000000002E
5000:10B8A0001815A600992022400990122480B9002F73
5001:10B8B0004403D002F4008D002B410BD002261089E6
5002:10B8C000042A4009906E240089002A400A94024606
5003:10B8D0000460000000000000A215E600C900384224
5004:10B8E0000C1013A60479083A78069203A408C9003C
5005:10B8F0003A608F98230602C9023A400D9003040073
5006:10B90000C90038400C9003280470000000000000BB
5007:10B9100028018410F980BE404F9002E400F9003CF9
5008:10B92000608D92032442E91032500F9403E400F931
5009:10B9300000B6412E1003E400F9002E400F9003CA18
5010:10B9400000600000000000002810A008C8003E10A1
5011:10B950000F88032008F8C01E102C4003F200CC0012
5012:10B960003F000CC0132002C00030000C802B2010C0
5013:10B97000C00432000F80030A042000000000000011
5014:10B98000A8053A8086E02FA01BE0023A80BA042E78
5015:10B990008008A0038808C2002E8108600228108E4B
5016:10B9A00081038008E00178008E040380096803CADF
5017:10B9B000004000000000000028054C0083602C447B
5018:10B9C0000B38020F80B1002CE5033010CC1083003F
5019:10B9D0000CC02930220409911024C0C830004C0446
5020:10B9E000930224C00B31020A005000000000000046
5021:10B9F000E001188087002D400B74421C01B5012C1A
5022:10BA0000C00B6002B00094042F2009C0021490976C
5023:10BA10000025C80870024C80972025C0097002E8F4
5024:10BA20000040000000000000A8083A82C6802D6097
5025:10BA30000BF80B1A00F5803DE08F7803DE02C7801B
5026:10BA40002DE00D780B1702DF8024F82CFD035E0C2F
5027:10BA5000D7E035E00F68032A020000000000000074
5028:10BA6000481DAE40FA043E400F8013EC04F9003E3E
5029:10BA7000C10CA013C010E8003C004E8043C42089D4
5030:10BA800000BAC007B621ED06EB68BACC0F2013C28E
5031:10BA900006600000000000004005BE00C680316066
5032:10BAA0002D780B3E48EC923D600C58035A40D580EF
5033:10BAB00031610C58233600CF823FE00CF803FF6061
5034:10BAC000CF9033F00C520300007000000000000023
5035:10BAD000A811B8848614B5C00870021EC0C4002D19
5036:10BAE0004008400214D0861021804C62423440A5A8
5037:10BAF0000035C0287042DCC28F3023C00850022AB3
5038:10BB00000460000000000000020098288E00A5409C
5039:10BB100008F1021864B4006D42085002180185084B
5040:10BB20002140095822540085102DC4097002DC04FC
5041:10BB3000970025C00844020010200000000000000B
5042:10BB400060148C00828024C00880022D00804A2C62
5043:10BB500042080A420600928420A08828424400A39A
5044:10BB60000624C00B3002CC10930424C10900020843
5045:10BB70000430000000000000A815BC00CB003640D7
5046:10BB80000CB4132C00F9003EA00CA2030408C280E0
5047:10BB900030A80D2A035400CB003FC00DF003FC0871
5048:10BBA000DF0037D00CB0032A046000000000000062
5049:10BBB0008000E000FB103A400EB003ED90F9117EDA
5050:10BBC000804FB053E840E9003E400F9003A608F9CB
5051:10BBD000013AC00CB013CC00EB023AC68EB803E0B9
5052:10BBE00000300000000000000110F00CCE003FE02B
5053:10BBF0002CF0833A48CD0135800C6012340ACE0017
5054:10BC0000B3802CE00B7400C910B3C10FF01B3C00D3
5055:10BC1000CF00B7C02CE0030044300000000000005B
5056:10BC200081046E1088802CC01898022D8081003607
5057:10BC30009108B0036800C9002240089002240083E4
5058:10BC40008036C00B30022C02830020C00820036025
5059:10BC50004010000000000000800506008A802E458C
5060:10BC6000288802240288020202088002A2009800AA
5061:10BC700022000880122400890122C10AB0026C004F
5062:10BC8000AB0022C1089012600040000000000000DC
5063:10BC90000804000080002CC04808120080800224A4
5064:10BCA00000081842AC028B8022E008B8120402831C
5065:10BCB0000020C00B30420C00A30160C048100242BB
5066:10BCC0000100000000000000000D6808CA002E40BE
5067:10BCD0000880030000C80632000C8002A000D800D3
5068:10BCE00032000C80037400CB0022C00FF0033C0034
5069:10BCF000EF0037C00C80014003500000000000003E
5070:10BD0000A019FC00FC043FC00FC003E100FC003B95
5071:10BD1000000FD0037C00EF002FC00FF011F410FDD6
5072:10BD2000023DC04FF003DC00DF043FC00FC043E919
5073:10BD3000067000000000000000C541027020DC1009
5074:10BD400067040DC10270209C1037040DC1067040BD
5075:10BD50004C10371415C1037040DC1013040DC107DB
5076:10BD60007040DC1037040DC03100000000000000FE
5077:10BD700000C5440571215C40571015C40571055C70
5078:10BD800040571015C40671014C4057100DC4057181
5079:10BD9000055C40531015C40771015C40571015C075
5080:10BDA00011500000000000000080020120804820A7
5081:10BDB0001208048201208048201208048201208099
5082:10BDC00048201208048201208048201208048201C1
5083:10BDD000208048201208048020000000000000009D
5084:10BDE000008400016000580056000580016004587E
5085:10BDF0000016000580012001580016000580016032
5086:10BE000000580056000580016000580016000180AF
5087:10BE1000200000000000000000C5480572115C8091
5088:10BE2000172015D80532111C804720148800720194
5089:10BE30001C80572005C80472015C80572015C8017A
5090:10BE400072015C80572415C01150000000000000F2
5091:10BE500000C140006000180006000180402000186A
5092:10BE6000000600019000600018000600418000609C
5093:10BE70000018000600018000600018100600018014
5094:10BE8000310000000000000000C5480422010880C5
5095:10BE900002201088046201088042201088002001DE
5096:10BEA00008804220008804220108004220108800F7
5097:10BEB00022010880423010803100000000000000A4
5098:10BEC00000C54A05428150A00428150A0552811078
5099:10BED000A04428111A00408010A05428050A0542E9
5100:10BEE0008151201428150A01428150A054281500C0
5101:10BEF000315000000000000000800C01534054C08D
5102:10BF00001530055C01574054C01530055C015300E5
5103:10BF100055C01574054C01530055C01574054C01EE
5104:10BF2000530054C0113001402110000000000000F7
5105:10BF300000800000400010000400010000400010DC
5106:10BF40000004000100004200100004001100004045
5107:10BF50000010C104000100004000100001100101A8
5108:10BF6000200000000000000000C560020800820000
5109:10BF7000208008200208008200208008200208009B
5110:10BF80008200208400200208008200208408200211
5111:10BF9000080082002180080111500000000000000C
5112:10BFA00000C54005600158009600159005640258D0
5113:10BFB0000056005590056001D900164015800560B7
5114:10BFC0000159007640158005600158005600158023
5115:10BFD000310000000000000000C440036000D800F1
5116:10BFE00036004D80036000D80036000D80076200E7
5117:10BFF000580036000D80076000D88016000D8003C1
5118:10C000006000D80036001D803100000000000000F4
5119:10C0100000C5420430810C20430810C20430810C5A
5120:10C0200020430810C20430C10C20430810C206305F
5121:10C03000810C20430810C20430810C20430818C032
5122:10C04000115000000000000000C0000030000C0093
5123:10C05000030000C00030000C00030000C0403000AE
5124:10C060000C00030000C00030000C00030000C00002
5125:10C0700030000C00030000C00000000000000000C1
5126:10C080000080020130804C20130804C20130804C33
5127:10C0900020130804C22530814C20130804C201304B
5128:10C0A000804C32530804C20130804C20130804C075
5129:10C0B000204000000000000000C5420562815820B9
5130:10C0C000560815820460815820460815820160C117
5131:10C0D000582046081582016081583056081582059F
5132:10C0E00060815820560805801150000000000000B3
5133:10C0F00000C542002080082002080082002080083D
5134:10C1000020020800820020800C200208008200200B
5135:10C110008008200308008200208008200208008098
5136:10C12000210000000000000000C5420466811820C4
5137:10C13000460811820464811820460811820060813B
5138:10C140000C204608118200608119204308118204E6
5139:10C1500060811920464801801100000000000000A5
5140:10C1600000C56005580156005580156004580156F9
5141:10C170000045801160005800060045801560015898
5142:10C1800001160001801560055801560055800540D4
5143:10C19000115000000000000000800601498010607E
5144:10C1A00014180506017980506014180106014180B9
5145:10C1B000506004180506014180106014180506013E
5146:10C1C00041805060141805002000000000000000AD
5147:10C1D0000080020104804020100804020004044092
5148:10C1E000201008040201008440201008040201000D
5149:10C1F00080412010080402110080412010480400F2
5150:10C20000000000000000000000C546035180D4601B
5151:10C2100035180D46021180D46035180D4603118083
5152:10C22000D46035180D46035180D46035180D46038F
5153:10C230005180D46035180D403150000000000000DE
5154:10C2400000C5460570815C60071815C60471811C25
5155:10C2500060171815C6053181DC60571815C60571C1
5156:10C26000801C60771815CE0571815C60571815C069
5157:10C2700011000000000000000005460271809C6172
5158:10C2800077180DC60271809C6037180DC20331808B
5159:10C290005C6027180DC60371809C6017180DCE03D3
5160:10C2A0007180DC6037180DC0110000000000000034
5161:10C2B0000045460575815C60771815C60575815C7B
5162:10C2C00060571815C60531810C60571815C60571E1
5163:10C2D000815C60431815C60571815C60571815C0F4
5164:10C2E00011500000000000000040020120804820A2
5165:10C2F0001208048201208048201208048201208054
5166:10C300005C20120804820120804800170804820182
5167:10C310002080482012080480000000000000000077
5168:10C320000000060163805860161805860161805878
5169:10C33000601618058601618158601618058601612E
5170:10C34000805860561805860161805860161805806F
5171:10C3500000000000000000000045400570015C0086
5172:10C36000170015C08574011C00470011C00570013D
5173:10C370005C00530010C00570015C00570014C90434
5174:10C3800070011C00570015C0115000000000000093
5175:10C390000045420060C01820060801820060801835
5176:10C3A00020060801820020801830020800821060F8
5177:10C3B000801820060800820060801820060801808E
5178:10C3C0001100000000000000004442042081082009
5179:10C3D0000208108204208108204208108204208173
5180:10C3E0000820460811820420810820420811820496
5181:10C3F0002081082042081080110000000000000089
5182:10C400000045420540C550201408150004408150E5
5183:10C4100020540811020500801020450C11420440F0
5184:10C42000815020140C15420440811020540815003E
5185:10C4300011500000000000000040030150C04430D3
5186:10C44000150C05430150C04C30150C05432150C05C
5187:10C450005430150C05430150C05430150C054301F0
5188:10C4600050C05420150C05400000000000000000E2
5189:10C47000000008004200048004200108004200047B
5190:10C48000800420010800020010000400010800429E
5191:10C490000010800400010800420010800420010008
5192:10C4A00000000000000000000045420200808420DF
5193:10C4B0002008080202008084202008080202008070
5194:10C4C00080A0202808020200808020202808020284
5195:10C4D00000808020200808001150000000000000AB
5196:10C4E0000045400560415800560015800560015820
5197:10C4F0000056001580052001D80056001580056003
5198:10C50000015800760015800560015800560015801E
5199:10C51000110000000000000000C540036000D800CA
5200:10C5200026000D80026000D80036000D80076001F3
5201:10C530005C0036000D80036000D80057000D8002BB
5202:10C540006000980036000D80000000000000000030
5203:10C550000000000430210C00430010C00430010C26
5204:10C5600000430010C00430011800430010C0043024
5205:10C57000010C00460010C00430010C00430010C044
5206:10C5800000000000000000000000000030000C006F
5207:10C59000030000C00035080C00030000C6001400B2
5208:10C5A0000800034000C00030000D40020000C00041
5209:10C5B00030000C00030000C000000000000000007C
5210:10C5C0000000050131404C50131404C50131C04C2A
5211:10C5D00050131404C50531414C50131404C50131E6
5212:10C5E000404C70531404C50131404C40131404C036
5213:10C5F00000000000000000000000230568C15A3060
5214:10C60000568C15A30569C15A30468C11A70168C024
5215:10C610001A30568C11A30468C11A30168C15A30465
5216:10C6200068C15A30568C11800000000000000000E4
5217:10C630000000000020000800020000800024000824
5218:10C6400001020000800024000880026000800020B9
5219:10C650000009400220008000200008000200008045
5220:10C66000000000000000000000000844621118846F
5221:10C67000462111884462091884462111886062109D
5222:10C68000180446011188446211188006011188447B
5223:10C690006211188446211180000000000000000093
5224:10C6A00000000045501154045501154044501154E8
5225:10C6B00004450111404050105404450115404450B8
5226:10C6C0001114001501154044501154045500114037
5227:10C6D0000000000000000000000008214208508215
5228:10C6E0001420850821420050821420850820420829
5229:10C6F0005082152005482142085082142081402193
5230:10C700004208508214208500000000000000000054
5231:10C7100000000A01028040A01028040A010284409F
5232:10C72000A11028040A01028040A00028000A01028A
5233:10C730008040B01028000A01028040A010280400A8
5234:10C74000000000000000000000000C035300D4C0F3
5235:10C7500035300D4C035300D4C035300D4C0353001D
5236:10C76000D4C02130084C035300D4C03530084C03EA
5237:10C770005300D4C035300D40000000000000000020
5238:10C780000000080470015C80072025C90472015C68
5239:10C7900080472015C8007205DC80572015C8057237
5240:10C7A000011C90672015C80572011C80572015C018
5241:10C7B00000000000000000000000231848C21231F1
5242:10C7C000848C61031840C81231848C61031848C4FA
5243:10C7D0001031840C41231848C61030040C61231812
5244:10C7E00048C61230848C21000000000000000000C8
5245:10C7F00000003FFF4FFFD3FFF4FFFD3FFF4FFFD38C
5246:10C80000FFF4FFFD3FFF4FFFD3FFF4FFFD3FFF4F5E
5247:10C81000FFD3FFF4FFFD3FFF4FFFD3FFF4FFBD0049
5248:10C820000000000000000000000000000000000008
5249:10C8300000000000000000000000000000000000F8
5250:10C8400000000000000000000000000000000000E8
5251:10C8500000000000000000000000000000000000D8
5252:10C8600000002CDB0B36C2CDB0B36C2CDB0936C21A
5253:10C87000CDB0B36C2CDB0B36C2CDB0B36C2CDB0B64
5254:10C8800036C2CDB0B36C2CDB0B36C2CDB0B32C00AE
5255:10C8900000000000000000000000333C4CCF1333C8
5256:10C8A000C4CCF1333C4D4E9333C4CCF12B3C4CCF34
5257:10C8B0001333C4CCE9333C4CCF12B5C4CCF1333C78
5258:10C8C0004CCF1333C4CD3100000000000000000045
5259:10C8D00000003B7E4EC793B7E4EDF9237E4E4793AD
5260:10C8E000B7E4EDF93F7E4EDE1237E48DF93B7E4E24
5261:10C8F000DF93F7848DF93B7E4EDF93B1E4EDB90011
5262:10C9000000000000000000000000010270409C11C7
5263:10C91000670419C30270409C10270409C1027040CB
5264:10C920001C10271401C10270409C50070409C10269
5265:10C9300070409C10671411C000000000000000004F
5266:10C940000000040571015C40571015C40571015CBD
5267:10C9500040571015C60571015C40571010C4057191
5268:10C96000015C64031055C40571015C40571015C08B
5269:10C9700000000000000000000000020120804820AC
5270:10C9800012080482012180482012080480012080BE
5271:10C990004820120805C2012080482417080482019B
5272:10C9A00020804820120804800000000000000000E1
5273:10C9B00000000000600018004600118400600018AC
5274:10C9C00000060001800060011800061091800060E0
5275:10C9D000001846461801800060001800061001800B
5276:10C9E00000000000000000000000080473011C802B
5277:10C9F000072001C80472011C80472011C80472017D
5278:10CA00001C80472211C80472011C80072011C80431
5279:10CA100072011C80072811C0000000000000000007
5280:10CA2000000000006000180006000180006000188F
5281:10CA30000006000180006000180006000180006010
5282:10CA40000018004604018000600018000600018004
5283:10CA5000000000000000000000000D04220108801A
5284:10CA600002200090042781088042201098042401AD
5285:10CA7000088042481088042201094042601088045E
5286:10CA8000220108C0024010800000000000000000E9
5287:10CA900000002A044B8112A004A8012A044A811232
5288:10CAA000A044A8112A04488012A04488012A044AFC
5289:10CAB00081122004AC112A044A8112B0449C110056
5290:10CAC000000000000000000008C00C00530014C06B
5291:10CAD0000530014400530014C00530040C0053001D
5292:10CAE00014C005B0014C00530016C00130014C00C9
5293:10CAF000530014C001380040100000000000000086
5294:10CB000008C0001040001000040001100044801014
5295:10CB10000004000110004600000004600100004015
5296:10CB200000116002400100104000106001501040F0
5297:10CB3000300000000000000008C04002000080003B
5298:10CB40002000080802000080002000080002000009
5299:10CB500080002000080002000080000000080002A1
5300:10CB600000008000210008403000000000000000AC
5301:10CB700008C04004600118004600118004600118DC
5302:10CB80000046001180046001C80046001980006062
5303:10CB90000018006600118004600118000600118072
5304:10CBA000300000000000000010010002600098004A
5305:10CBB00026000981026001980026000980066200B3
5306:10CBC0004800262001C00260019800070009800289
5307:10CBD0006000980026001182100000000000000094
5308:10CBE0004045420430810C20430810C20430858C3B
5309:10CBF00020430810C20430810C20434811820430C5
5310:10CC0000818D20460810C20430810C20430C10C0D6
5311:10CC100011500000000000004004000030000C0033
5312:10CC2000030000C00010000C00030000C000300032
5313:10CC30000800030000800030000C80020000C000EB
5314:10CC400030000C00032000C0104000000000000075
5315:10CC50004000020030800C21030800C20030800C2C
5316:10CC600020030800C20430C10C20030C10C20030A5
5317:10CC7000800CB0430800C20030800C20032810C094
5318:10CC800000000000000000004045420460811820C0
5319:10CC900046081182046080182046081182006081D5
5320:10CCA00018204608118204608018200608118204AA
5321:10CCB00060811820460C11C01150000000000000D7
5322:10CCC00040014200208008200208008200208008E5
5323:10CCD00020020800820020800C20020800C20020F0
5324:10CCE000800820420800820020800820020801807D
5325:10CCF0000000000000000000500142046081182084
5326:10CD0000460811820460801820460811820060C124
5327:10CD10000C20460C10C204608018304208118204B6
5328:10CD200060811820460810800040000000000000CC
5329:10CD300040454004500114004500114004500014C7
5330:10CD40000045001140005000040045000040045020
5331:10CD5000001400010011400450011400450000427D
5332:10CD600001500000000000004800060041801060F3
5333:10CD7000041801060041801060041801060041807B
5334:10CD800010600418010600418010600418010600BC
5335:10CD90004180106004180100100000000000000035
5336:10CDA0004800020100804021100804020100804078
5337:10CDB0002010080402010080402110080402010034
5338:10CDC0008040301008040211008440201008140034
5339:10CDD0000000000000000000404546035180D46080
5340:10CDE00035180D46035180D46035180D4603518027
5341:10CDF000D46035100D46035180D44035180D4603DC
5342:10CE00005180D46035180D40115000000000000022
5343:10CE10000001460471811C60071811CE0471811C49
5344:10CE200060471801C60471819C60471819C60471D7
5345:10CE3000801C60671811C60471811C60471811C0FE
5346:10CE400000000000000000004000460271809C606D
5347:10CE5000271809C60671801C60271809C601318091
5348:10CE60001C60071809C60271809C60071809C61269
5349:10CE700071809C60331801C00000000000000000B9
5350:10CE80005045460571815C60571815C60571805C78
5351:10CE900060571815C60131810C60171810C605714E
5352:10CEA000815C60031815C60571815C605318188297
5353:10CEB0001050000000000000404012012480482073
5354:10CEC0001208048201248048201208048201208074
5355:10CED0005820520C0582012080492002080482015A
5356:10CEE000208049201248048001000000000000005A
5357:10CEF00040040600618018600618018604618018ED
5358:10CF00006006180186006181486006181486006179
5359:10CF10008018604218018600618018600618008041
5360:10CF200001000000000000000045600478011E00C0
5361:10CF3000478011E80078011E00478011E004780165
5362:10CF40001E00438011E00478011E00038015E004F8
5363:10CF500078011E00478011C0105000000000000042
5364:10CF600040011200648018200608018200648018C5
5365:10CF700020060801820060801830020801820060EB
5366:10CF80008019304208008200608019200648018024
5367:10CF90000000000000000000400142042081082041
5368:10CFA000420810820020810820420810820420815B
5369:10CFB00008204608108204208108204208118204BB
5370:10CFC00020810820420810800000000000000000BE
5371:10CFD0004045420440811020440811020040811065
5372:10CFE000204408110204408010204508010204403A
5373:10CFF000811021000C11020440811020440801001E
5374:10D0000011500000000000004000030050C0143028
5375:10D01000050C01430050C01430050C01430050C002
5376:10D020001430050C01430050C01430050C014300BE
5377:10D0300050C01430050C014000000000000000004A
5378:10D040004000080042041080042001090042011041
5379:10D050008004200108004200100004200108004262
5380:10D06000001000040001080042001080042011009C
5381:10D0700000000000000000004045420200808020C7
5382:10D08000200808020200800020200808020000801A
5383:10D0900080A0000A08020200808034622808020290
5384:10D0A00000808030200C08001150000000000000BB
5385:10D0B000400140046001180046001180046003181C
5386:10D0C000004600118006600198004600118004604F
5387:10D0D00001180066001180046001180046001180EC
5388:10D0E0000000000000000000400100026000980005
5389:10D0F0002600098002640098002600199002600052
5390:10D100001D00260001C0026000990006401980023F
5391:10D110006000980066000180000000000000000030
5392:10D120004045600438010E00438010E00438010ED1
5393:10D1300000438010E00438011A00438011A0043835
5394:10D14000010E00028040E00438010E004380188088
5395:10D1500011500000000000005004010030400C108D
5396:10D16000030400C90030400C10030400C10030402B
5397:10D170000810030400810030400C78021400C10044
5398:10D1800030400C100304008000000000000000008C
5399:10D190004000050031400C50031400C50035400C20
5400:10D1A00050031410D50031410D50031410C5003147
5401:10D1B000400D48435410C50031400C40431000C29C
5402:10D1C00001000000000000004045430460C1183029
5403:10D1D000460C11830461C11830460C01870460C1FC
5404:10D1E0001830460811830460C11820060C0183041E
5405:10D1F00060C11830460C1180105000000000000083
5406:10D2000040014000200008000200008000200008CB
5407:10D2100000020000810020000880020000C0002001
5408:10D220000008404330008000200008000200008019
5409:10D230000000000000000000400148446211188412
5410:10D240004621118844630118844621018804621133
5411:10D250001804462110C8446211180543018188440E
5412:10D2600062111884462111800000000000000000B7
5413:10D27000404540045001140445011140445001143C
5414:10D28000044501014045001014044503004044508A
5415:10D2900011140401054140445011140405010140DA
5416:10D2A00011500000000000004000082042081082D9
5417:10D2B00004208108004200108204208108004208F6
5418:10D2C000108205208108204208108A0520050820C8
5419:10D2D00042081082042281000000000000000000CB
5420:10D2E00000000A01028040A01028040201028040D0
5421:10D2F000A01028040A01028040A00029040A0102AB
5422:10D300008040A40028040A01028040A8102B1400C9
5423:10D31000004000000000000040454D035340D4D0C1
5424:10D3200035340D4D035340D4D035340D4D035340A7
5425:10D33000D4D021344D4D035340D4D96134040D036E
5426:10D340005340C0D835370D40115000000000000098
5427:10D350004001480472001C80472011C80472011C5F
5428:10D3600080472011C80472009C80472019C80072B1
5429:10D37000011C88672011C80472015C82472211C019
5430:10D3800000000000000000000000230848C2123125
5431:10D39000848C61231040C01231848C61031048C416
5432:10D3A0001031848C41231848C61030040C412318D6
5433:10D3B00048C61230848C010000000000000000000C
5434:10D3C00000003FFF4FFFD3FFF4FFFD3FFF4FFFD3B0
5435:10D3D000FFF4FFFD3FFF4FFFD3FFF4FFFD3FFF4F83
5436:10D3E000FFD3FFF4FFDD3FFF4FFFD3FFF4FFFD004E
5437:10D3F000000000000000000000000000000000002D
5438:10D40000000000000000000000000000000000001C
5439:10D41000000000000000000000000000000000000C
5440:10D4200000000000000000000000000000000000FC
5441:10D4300000002CDB0B36C2CDB0B36C2CDB0B36C23C
5442:10D44000CDB0B36C2CDB0B36C2CDB0B36C2CDB0B88
5443:10D4500036C2CDB0B34C2CDB0B36C2CDB0B36C00B2
5444:10D4600000000000000000000000335C4CD71333C4
5445:10D47000C4CCF1333A4AD69333C4CCF12B3A4CCFD7
5446:10D480001333C4CCE9333C4CCF12B5A4ACC9333C04
5447:10D490004CCF1335C4CD690000000000000000002F
5448:10D4A00000003B7E4EDF93B7E4EDF93B7E4EDF9309
5449:10D4B000B7E4EDF93B7E4EDE1237E4EDE13B7E4E04
5450:10D4C000DF9231848DD93B7E4EDF93B1E4EC610075
5451:10D4D00000000000000000000000008404A1832C74
5452:10D4E000030A1082C134108F004009140203149102
5453:10D4F0000008420B1882C40031CA0C520210808509
5454:10D5000000218228400A10000000000000000000F6
5455:10D5100000000A0402014080732810480706010435
5456:10D52000A44121140844061140807020140A04020A
5457:10D5300000C88441211C08061201C080602014002C
5458:10D5400000000000000000000000028404218208A6
5459:10D5500053021080C500814A0442021400042021B5
5460:10D5600080A872221C88C406A1428C52221C888585
5461:10D570002621C08850221800000000000000000092
5462:10D5800000000244000101006200100004000101DB
5463:10D590002040001C00440401022062001C8004049E
5464:10D5A00080892050081480042401C1005000180014
5465:10D5B0000000000000000000000002803820040C81
5466:10D5C000310A00000218208CA810280888C1141005
5467:10D5D000C600220308020108B0000C21020082806C
5468:10D5E00008004908000200000000000000000000E0
5469:10D5F00000000001008008200300040243200040D6
5470:10D600000020000442011080842011080400000062
5471:10D6100000442420090840030090C42020080C0284
5472:10D6200000000000000000000800088108200488B5
5473:10D6300002220808C32A90408410200480C22620B9
5474:10D64000498822220C08C126A0C98C122A048843CA
5475:10D650000EA0CB8810220C02000000000000000089
5476:10D6600008000A4032000180312800000112808D3C
5477:10D670008400280C080132008C8002200C08012E46
5478:10D6800000C38002200408430200408010200402EE
5479:10D690000000000000000000080008870A2104883C
5480:10D6A000112A1C0A06222140A0422A1088850AA1BC
5481:10D6B00006A462221C0AC40221808C5222144886CD
5482:10D6C000222008A8602A14020000000000000000C8
5483:10D6D000000008450601898063201C884034110140
5484:10D6E000A450281848040E014B8073281C8A040695
5485:10D6F00091490463201C8A06260185807020180247
5486:10D7000000000000000000000800008500B1452C6A
5487:10D71000700214C00708214900420114820500115B
5488:10D72000840052021C00C40021C42C53021C02813C
5489:10D7300004A1CD0850021402000000000000000007
5490:10D74000081012043401CC0073401C9045040148B9
5491:10D7500004604118C0440401050473481450473460
5492:10D7600001452062081CC2040C81C700738018C2E6
5493:10D770000400000000000000080010841021CC28E4
5494:10D7800042021412C51021840440001C80840091C0
5495:10D79000000873821C90050C01CF0C400214304528
5496:10D7A00020A1C0085002100200000000000000008C
5497:10D7B000000000450C8100000108080005189105D3
5498:10D7C00004000104400618000224704004004000D8
5499:10D7D00001C4240088040043100040200088000099
5500:10D7E0000000000000000000000012852431020C3F
5501:10D7F00002C20410C42821490C02C004B2061C2035
5502:10D80000030850420C800104A1490C00C20C1043D3
5503:10D8100024A0C10810420000000000000000000029
5504:10D820000010A2002000CD000040042001100009DB
5505:10D830000402490C92073000000033080C924100AA
5506:10D8400080CC0000000C00432880C20010000000C3
5507:10D850000420000000000000000030105080000094
5508:10D86000100000F00010800000008000D0808000D8
5509:10D8700000000080109080800000000080109080E8
5510:10D880000000000000C01080000000000000000048
5511:10D890003C3C10808000000000001090A080000040
5512:10D8A000000040109080A000000000C0109080A0F8
5513:10D8B00000000020801090A0A00000000080108FC9
5514:10D8C0000F0000000000000000002CC2E481803F37
5515:10D8D000D9BFD998719D428000267FE672AB7C3A11
5516:10D8E000400019802648DD3C91C026402640383152
5517:10D8F000DB61C01999BFC980000000000000000072
5518:10D90000000010801014800684979686960690007A
5519:10D910003FA1280102901200801788169E90900463
5520:10D92000100036BEBE9E861612848013BE97AE804F
5521:10D93000000000000000000000000000000008825D
5522:10D940008184214000000008A13801780000000017
5523:10D9500008B8217268800000000898448868800038
5524:10D96000000008B80178014000000000000000003D
5525:10D9700000003FFFFFFFC0000000003FF7AFFFC007
5526:10D98000000000003FFFFFFFC0000000003FFFFF5E
5527:10D99000FFC0000000003FFFBFFFC000000000000C
5528:10D9A000000000000000000000003FFFFFFFC0007B
5529:10D9B0000000003FFFFF7F40000000003FFFFFFF2F
5530:10D9C000C0000000003FFFFFFFC0000000003FFF5D
5531:10D9D0002FFFC00000000000000000000000000059
5532:10D9E00000003FFFFFFFC0000000003FFFFF7FC0BF
5533:10D9F000000000003FFFFFFFC0000000003FFFFFEE
5534:10DA0000FFC0000000003FFFFF7F8000000000001B
5535:10DA1000000000000000000000003FFFFFFFC0000A
5536:10DA20000000003FFFBFBFC0000000003FDFBFDFBE
5537:10DA3000C0000000003FEFFFFF80000000003FDF5C
5538:10DA4000FFFFC00000000000000000000000000018
5539:10DA500000003FFFFFFFC0000000003F3EAFFFC0DF
5540:10DA6000000000001FFFDFFFC0000000003FE7FED6
5541:10DA7000EFC0000000003FFFFFDFC000000000001B
5542:10DA8000000000000000000000003FFFFFFFC0009A
5543:10DA90000000003FFFFFFFC0000000002FF7FFFF66
5544:10DAA000C0000000002FFFFFDFC0000000003FF7B4
5545:10DAB000DFF7C000000000000000000000000000D0
5546:10DAC000000002C400B1C32C50091482C43091C7B5
5547:10DAD0002460081C820734914C04430A10C2840459
5548:10DAE000918424520B1802C424B1C32C400A108024
5549:10DAF0000000000000000000000008050201C480D2
5550:10DB000060201C08442201C08450019C08070A01BF
5551:10DB1000C08472201CC8041211448041011C80077B
5552:10DB20000811C4007000100000C0000000000000D8
5553:10DB3000000000862C214A0C52021C80042021CABD
5554:10DB40001062021C81470421C32051011C80042C57
5555:10DB500001CB0452031440C72031C80C502210805E
5556:10DB600001200000000000000000000620018900E4
5557:10DB700052001480042801450462001080463011D0
5558:10DB80000D00420114C0440011050050001C004467
5559:10DB90002801490070001080000000000000000013
5560:10DBA000000008C002300C8C30220888C226000811
5561:10DBB0008020220C88810210C48010220C084002B0
5562:10DBC000104888012304C8420210468C122200002B
5563:10DBD0000010000000000000080002000080C820C3
5564:10DBE000110900804110900824300804424100903F
5565:10DBF000C420000804420010804C20230904C243C2
5566:10DC000030804020110800020000000000000000E9
5567:10DC1000080008810220C98C122004484122000912
5568:10DC20008830200C88030E00498C10220C88402E6E
5569:10DC300000C984132104C8C32200CB8C3222000007
5570:10DC400004000000000000000800080102004B80F2
5571:10DC5000322108884102100F8010218C08410200F7
5572:10DC6000878410200488000200478010210C88411E
5573:10DC70001610468030200002000000000000000066
5574:10DC800000000AC422A108A4722A140A8502818411
5575:10DC9000A042281C0AC5029140B8732910CAC402C8
5576:10DCA000A180A4422A14CA85229180A8702A180251
5577:10DCB0000080000000000000080008041E01C88069
5578:10DCC00043201808453E010C8061209C48061281C3
5579:10DCD000C08073001088060201C800422010C807E7
5580:10DCE0000211CD80512014820000000000000000CD
5581:10DCF000080000C42421C80C420114000028104C64
5582:10DD000008520214804524294004720010C00524E2
5583:10DD1000114408430114C04724204808720210002F
5584:10DD200000000000000000000810000710110600AD
5585:10DD3000720018D04620014D00714010500730117C
5586:10DD4000C300714110B0052C01490043001C50452F
5587:10DD500030018C0061401842040000000000000007
5588:10DD6000000030C50021C00C40011412440431846D
5589:10DD700024408014A1C70001400840011420052060
5590:10DD800011C002608218008724114008404210022E
5591:10DD90000000000000000000000002000C80C4240D
5592:10DDA00031480C000108C14100004900420308103D
5593:10DDB000802021090C02021880C12430080C420185
5594:10DDC0001080832011080000000000000000000007
5595:10DDD000000010C10420480C1242040083003148A6
5596:10DDE00000024104A0070C20400012C20C80C12098
5597:10DDF00020C80012C10CB0412000490802420000B6
5598:10DE000000000000000000000010800100108100F0
5599:10DE100030400820030010C12002000480403090F0
5600:10DE20000114024004804020000904320108A003CC
5601:10DE30000410080022400000043000000000000030
5602:10DE40000000300010800000004000F000000000E2
5603:10DE500000108000F00080800000200000F010A082
5604:10DE6000000000200000F00010000000208000CC26
5605:10DE700040000000000000003C3C10A080000000BA
5606:10DE80000000109080C040000000001090808000D2
5607:10DE900000000000109080800000000000109080C2
5608:10DEA000E00000000000108C0800000000000000EE
5609:10DEB0000000094DB1E90026402A7FE3F25498C0E2
5610:10DEC0003FE64000014291D0C013E5876383B8CD9F
5611:10DED000F900267F0000352ED503403FD9BFB18021
5612:10DEE00001F0000000000000000004021614001CF5
5613:10DEF000A83F881600808480379EBAA05010021276
5614:10DF0000001796972650101082801E80DEBE941453
5615:10DF100002108017BE819400000000000000000085
5616:10DF200000000000000008A84494288000000008B9
5617:10DF30009421445100000000088442410100000087
5618:10DF40000008A17223414000000008B80178324067
5619:10DF5000000000000000000000003FFFFFFFC000C5
5620:10DF60000000003FF7FED7C0000000003FFFD7DFF2
5621:10DF7000C0000000003FFF7FFFC000000000377FAF
5622:10DF8000FFFFC000000000000000000000000000D3
5623:10DF900000003FFFFFFFC0000000001EFFDE77C053
5624:10DFA000000000001FEFFFFFC0000000003FFFFF68
5625:10DFB000FFC0000000003FFFFF7FC0000000000026
5626:10DFC000000000000000000000003FFFFFFFC00055
5627:10DFD0000000001FCFDFFFC0000000003FFFFFBFB9
5628:10DFE000C0000000003FFFFFBFC0000000003FFF77
5629:10DFF000FFBFC000000000000000000000000000A3
5630:10E0000000003FFFFFFFC0000000003FFFFFFFC018
5631:10E01000000000003FFFFFFFC0000000001FFF1FC7
5632:10E020007FC0000000002FDFFFCFC0000000000015
5633:10E03000000000000000000000003FFFFFFFC000E4
5634:10E040000000003FBFAFFFC0000000003FFFFFFF28
5635:10E05000C0000000003EDE7FFFC0000000003FFF68
5636:10E06000FFF7C000000000000000000000000000FA
5637:10E0700000003FFFFFFFC0000000003F7FFFFFC028
5638:10E08000000000003FFFFFFFC0000000003FFEBE99
5639:10E090007FC0000000003EFFD77FC00000000000EE
5640:10E0A0000000000000000000000000000000000070
5641:10E0B0000000000000000000000000000000000060
5642:10E0C0000000000000000000000000000000000050
5643:10E0D0000000000000000000000000000000000040
5644:10E0E00030002001020000003000438E00000000DC
5645:10E0F0000000000000000000000000000000000020
5646:10E10000000000000000000000000000000000000F
5647:10E1100000000000000000000000000000000000FF
5648:10E1200000000000000000000000000000000000EF
5649:10E1300000000000000000000000000000000000DF
5650:10E1400000000000000000000000000000000000CF
5651:10E1500000000000000000000000000000000000BF
5652:10E1600000000000000000000000000000000000AF
5653:10E17000000000000000000000000000000000009F
5654:10E18000000000000000000000000000000000008F
5655:10E19000000000000000000000000000000000007F
5656:10E1A000000000000000000000000000000000006F
5657:10E1B000000000000000000000000000000000005F
5658:10E1C000000000000000000000000000000000004F
5659:10E1D000000000000000000000000000000000003F
5660:10E1E000000000000000000000000000000000002F
5661:10E1F000000000000000000000000000000000001F
5662:10E20000000000000000000000000000000000000E
5663:10E2100000000000000000000000000000000000FE
5664:10E2200000000000000000000000000000000000EE
5665:10E2300000000000000000000000000000000000DE
5666:10E2400000000000000000000000000000000000CE
5667:10E2500000000000000000000000000000000000BE
5668:10E2600000000000000000000000000000000000AE
5669:10E27000000000000000000000000000000000009E
5670:10E28000000000000000000000000000000000008E
5671:10E29000000000000000000000000000000000007E
5672:10E2A000000000000000000000000000000000006E
5673:10E2B000000000000000000000000000000000005E
5674:10E2C000000000000000000000000000000000004E
5675:10E2D000000000000000000000000000000000003E
5676:10E2E000000000000000000000000000000000002E
5677:10E2F000000000000000000000000000000000001E
5678:10E30000000000000000000000000000000000000D
5679:10E3100000000000000000000000000000000000FD
5680:10E3200000000000000000000000000000000000ED
5681:10E3300000000000000000000000000000000000DD
3635:10E3400000000000000000000000000000000000CD 5682:10E3400000000000000000000000000000000000CD
3636:10E3500000000000000000000000000000000000BD 5683:10E3500000000000000000000000000000000000BD
3637:10E3600000000000000000000000000000000000AD 5684:10E3600000000000000000000000000000000000AD
3638:10E37000000000000000000000002CDB0FB6C2CD42 5685:10E37000000000000000000000000000000000009D
3639:10E38000B0B36C2CDB0B36C2DFB0B36C2CDB0B7E76 5686:10E38000000000000000000000000000000000008D
3640:10E39000C2CDB0B7FD2CDB0B36C2CDB0B36C0000E4 5687:10E39000000000000000000000000000000000007D
3641:10E3A00000000000000000000000333C4FCF13339A 5688:10E3A000000000000000000000000000000000006D
3642:10E3B000C4CCF1333C4CCF133FC4CCF1333C4CFFC5 5689:10E3B000000000000000000000000000000000005D
3643:10E3C0001333C4CFFD333C4CCF1333C4CCF1000026 5690:10E3C000000000000000000000000000000000004D
3644:10E3D000000000000000000000003B7E4EDF93B70D 5691:10E3D000000000000000000000000000000000003D
3645:10E3E000E4EC793B1E4EDF93BFE48DF93B784EFFA2 5692:10E3E000000000000000000000000000000000002D
3646:10E3F00093B7E4EDFD3B1E4EDF93B784EDF90000CB 5693:10E3F000000000000000000000000000000000001D
3647:10E4000000000000000000000000010270409C10AD 5694:10E40000000000000000000000000000000000000C
3648:10E41000271C09C10130401C10670409C10270416A 5695:10E4100000000000000000000000000000000000FC
3649:10E420009C11071401C10270409C50071C01C000E0 5696:10E4200000000000000000000000000000000000EC
3650:10E4300000000000000000000000040571015C40C5 5697:10E4300000000000000000000000000000000000DC
3651:10E44000571055C40131005C40571015C4057101C7 5698:10E4400000000000000000000000000000000000CC
3652:10E45000DC4017181DC40571055C4057101DC00035 5699:10E4500000000000000000000000000000000000BC
3653:10E4600000000000000000000000020120804820A1 5700:10E4600000000000000000000000000000000000AC
3654:10E4700012000482012080482012080482012080BA 5701:10E47000000000000000000000000000000000009C
3655:10E48000482012080482012080486012080480009D 5702:10E48000000000000000000000000000000000008C
3656:10E490000000000000000000000000006000180004 5703:10E49000000000000000000000000000000000007C
3657:10E4A0000600418000600018004600018000600006 5704:10E4A000000000000000000000000000000000006C
3658:10E4B0001000061001800060001820461001800046 5705:10E4B000000000000000000000000000000000005C
3659:10E4C00000000000000000000000080472011C8031 5706:10E4C000000000000000000000000000000000004C
3660:10E4D000472011C80472011C80072011C804730072 5707:10E4D000000000000000000000000000000000003C
3661:10E4E0001C80472011CC0472011C80472011C00001 5708:10E4E000000000000000000000000000000000002C
3662:10E4F00000000000000000000000000060001800A4 5709:10E4F000000000000000000000000000000000001C
3663:10E5000006000184006000180006000180006040E1 5710:10E50000000000000000000000000000000000000B
3664:10E510001800060401810060001800061401800044 5711:10E5100000000000000000000000000000000000FB
3665:10E520000000000000000000000008042201088034 5712:10E5200000000000000000000000000000000000EB
3666:10E530004270108C04220108C002201088042200BE 5713:10E5300000000000000000000000000000000000DB
3667:10E540000880425010080422010900424010800057 5714:10E5400000000000000000000000000000000000CB
3668:10E55000000000000000000000002E044A8112A00C 5715:10E5500000000000000000000000000000000000BB
3669:10E5600044A8112A044A8112A004A8112A044B804D 5716:10E5600000000000000000000000000000000000AB
3670:10E5700012A04488012E044A811220049801000050 5717:10E57000000000000000000000000000000000009B
3671:10E58000000000000000000008C00E00530014C08E 5718:10E58000000000000000000000000000000000008B
3672:10E590000530014C00530014E00530014C005300DD 5719:10E59000000000000000000000000000000000007B
3673:10E5A00004C00530004C00030014C00530004010CA 5720:10E5A000000000000000000000000000000000006B
3674:10E5B000000000000000000008C00400400010003F 5721:10E5B000000000000000000000000000000000005B
3675:10E5C0000458010400400010000400010000410054 5722:10E5C000000000000000000000000000000000004B
3676:10E5D00004004458104400000011800450104030E2 5723:10E5D000000000000000000000000000000000003B
3677:10E5E000000000000000000008C0400200008000A1 5724:10E5E000000000000000000000000000000000002B
3678:10E5F0002000080040000000002000080002000089 5725:10E5F000000000000000000000000000000000001B
3679:10E600008400000008400200008000200008403024 5726:10E60000000000000000000000000000000000000A
3680:10E61000000000000000000008C040006001180079 5727:10E6100000000000000000000000000000000000FA
3681:10E6200046000180066001980046001180046001E8 5728:10E6200000000000000000000000000000000000EA
3682:10E630001800460011800420011800660011803087 5729:10E6300000000000000000000000000000000000DA
3683:10E640000000000000000000100140006000980081 5730:10E6400000000000000000000000000000000000CA
3684:10E6500026000980026001980006000C800260001C 5731:10E6500000000000000000000000000000000000BA
3685:10E660001800060001800260009880060001820008 5732:10E6600000000000000000000000000000000000AA
3686:10E6700000000000000000004045420030810C20F6 5733:10E67000000000000000000000000000000000009A
3687:10E68000430810C22430818C20030810C20420806B 5734:10E68000000000000000000000000000000000008A
3688:10E690000C20030818C20430810C20430818C01154 5735:10E69000000000000000000000000000000000007A
3689:10E6A00050000000000000004000000030000C009E 5736:10E6A000000000000000000000000000000000006A
3690:10E6B000030000C04030000C000300008000300068 5737:10E6B000000000000000000000000000000000005A
3691:10E6C0000C00032000C00030000C00032000C0003C 5738:10E6C000000000000000000000000000000000004A
3692:10E6D00000000000000000004001021030800C200B 5739:10E6D000000000000000000000000000000000003A
3693:10E6E000030800C20030800C20030800C201208013 5740:10E6E000000000000000000000000000000000002A
3694:10E6F0000C20032C00C20030800C30432C00C000E2 5741:10E6F000000000000000000000000000000000001A
3695:10E7000040000000000000004045420460811820E5 5742:10E700000000000000000000000000000000000009
3696:10E710004608118204608018204608118204608136 5743:10E7100000000000000000000000000000000000F9
3697:10E720001820460C11C20460811830460C11C0112B 5744:10E7200000000000000000000000000000000000E9
3698:10E73000500000000000000040014200208008203E 5745:10E7300000000000000000000000000000000000D9
3699:10E740000228008200208008200208008200208029 5746:10E7400000000000000000000000000000000000C9
3700:10E7500008200208018200208008200308018000B0 5747:10E7500000000000000000000000000000000000B9
3701:10E7600000000000000000005001420460811820F9 5748:10E7600000000000000000000000000000000000A9
3702:10E7700046281182046080182046081182046081B6 5749:10E770000000000000000000000000000000000099
3703:10E780001820460810820460811820430810800079 5750:10E780000000000000000000000000000000000089
3704:10E79000000000000000000040454004500114004B 5751:10E790000000000000000000000000000000000079
3705:10E7A00045001140250000140045001140045001AF 5752:10E7A0000000000000000000000000000000000069
3706:10E7B00014004500004004500140000100004211D7 5753:10E7B0000000000000000000000000000000000059
3707:10E7C000500000000000000048000600418010607A 5754:10E7C0000000000000000000000000000000000049
3708:10E7D0000418010600418010600418010600418001 5755:10E7D0000000000000000000000000000000000039
3709:10E7E0001060041801060041801060041801000048 5756:10E7E0000000000000000000000000000000000029
3710:10E7F00000000000000000004800020500804021E9 5757:10E7F0000000000000000000000000000000000019
3711:10E80000100804000100804020100804020100806C 5758:10E800000000000000000000000000000000000008
3712:10E810004020500814021100844020100814000009 5759:10E8100000000000000000000000000000000000F8
3713:10E820000000000000000000404546015180D46017 5760:10E8200000000000000000000000000000000000E8
3714:10E8300035180D46035180D46015180D46035180DC 5761:10E8300000000000000000000000000000000000D8
3715:10E84000546015180D46035180D46035180D4011E1 5762:10E8400000000000000000000000000000000000C8
3716:10E8500050000000000000000001460471811C60AF 5763:10E8500000000000000000000000000000000000B8
3717:10E86000451811D60471811C60671811C6047181A6 5764:10E8600000000000000000000000000000000000A8
3718:10E870009C60471811C60471811C60671811C000A4 5765:10E870000000000000000000000000000000000098
3719:10E8800000000000000000004005460271809C600E 5766:10E880000000000000000000000000000000000088
3720:10E89000271809C60071809C60671809C60271803C 5767:10E890000000000000000000000000000000000078
3721:10E8A0009C61271801C60271809C60071801C00096 5768:10E8A0000000000000000000000000000000000068
3722:10E8B00000000000000000005045460571815C60CA 5769:10E8B0000000000000000000000000000000000058
3723:10E8C000571855D60171815C60571815C6057181BE 5770:10E8C0000000000000000000000000000000000048
3724:10E8D0005C60571818C60571815C60431818821176 5771:10E8D0000000000000000000000000000000000038
3725:10E8E0005000000000000000400452012080482039 5772:10E8E0000000000000000000000000000000000028
3726:10E8F00012480490012080492012080482012480DB 5773:10E8F0000000000000000000000000000000000018
3727:10E9000048201248009201208048201748048001C6 5774:10E900000000000000000000000000000000000007
3728:10E910000000000000000000400006006180186058 5775:10E9100000000000000000000000000000000000F7
3729:10E92000063C0186006180186046180186006180FF 5776:10E9200000000000000000000000000000000000E7
3730:10E930001860061801860061801860461801800181 5777:10E9300000000000000000000000000000000000D7
3731:10E9400000000000000000000041600478011E008B 5778:10E9400000000000000000000000000000000000C7
3732:10E95000478011E02478011E00078011E00478014F 5779:10E9500000000000000000000000000000000000B7
3733:10E960001E00478011E00438011E00478011C011CD 5780:10E9600000000000000000000000000000000000A7
3734:10E9700050000000000000004001120060801820DC 5781:10E970000000000000000000000000000000000097
3735:10E980000648019200608019200608018200648018 5782:10E980000000000000000000000000000000000087
3736:10E9900018200648019300208018200648018000B6 5783:10E990000000000000000000000000000000000077
3737:10E9A0000000000000000000400142042081082017 5784:10E9A0000000000000000000000000000000000067
3738:10E9B000420810820420810820020810820420816D 5785:10E9B0000000000000000000000000000000000057
3739:10E9C00008204208108A0460810820420810800054 5786:10E9C0000000000000000000000000000000000047
3740:10E9D000000000000000000040454204408110207B 5787:10E9D0000000000000000000000000000000000037
3741:10E9E00044081102044081102004081102044081EF 5788:10E9E0000000000000000000000000000000000027
3742:10E9F0001021440801020450811020040801001174 5789:10E9F0000000000000000000000000000000000017
3743:10EA000050000000000000004000030050C014301F 5790:10EA00000000000000000000000000000000000006
3744:10EA1000050C01430050C01430050C014300508028 5791:10EA100000000000000000000000000000000000F6
3745:10EA200014300508014A0050C014300508014000A8 5792:10EA200000000000000000000000000000000000E6
3746:10EA300000000000000000004000080042001080BC 5793:10EA300000000000000000000000000000000000D6
3747:10EA40000420010800420010800420010800420058 5794:10EA400000000000000000000000000000000000C6
3748:10EA500010800420110000420010800420110010DA 5795:10EA500000000000000000000000000000000000B6
3749:10EA6000400000000000000040454202008080207D 5796:10EA600000000000000000000000000000000000A6
3750:10EA70002008080200008080202008080202008090 5797:10EA70000000000000000000000000000000000096
3751:10EA80008020200808020200808020200808001151 5798:10EA80000000000000000000000000000000000086
3752:10EA9000500000000000000040014000600118002C 5799:10EA90000000000000000000000000000000000076
3753:10EAA00046001180066001180046001180046001D4 5800:10EAA0000000000000000000000000000000000066
3754:10EAB00018004600118004600118006600118010E3 5801:10EAB0000000000000000000000000000000000056
3755:10EAC00000000000000000004001400264009800C7 5802:10EAC0000000000000000000000000000000000046
3756:10EAD0002600099006600198002640098002600027 5803:10EAD0000000000000000000000000000000000036
3757:10EAE0009800260000900260009800070001800056 5804:10EAE0000000000000000000000000000000000026
3758:10EAF00000000000000000004045600438050E00E2 5805:10EAF0000000000000000000000000000000000016
3759:10EB0000438010E04438010E00438010E0043801D7 5806:10EB00000000000000000000000000000000000005
3760:10EB10000E00438018A00438010E004680188011B2 5807:10EB100000000000000000000000000000000000F5
3761:10EB200050000000000000005000010030400C10B8 5808:10EB200000000000000000000000000000000000E5
3762:10EB3000030400C50030400C10031400C100304035 5809:10EB300000000000000000000000000000000000D5
3763:10EB40000C10030400874030400C100204008000C9 5810:10EB400000000000000000000000000000000000C5
3764:10EB500000000000000000004004050035400C509B 5811:10EB500000000000000000000000000000000000B5
3765:10EB6000031400D50431410C50035C00C500310092 5812:10EB600000000000000000000000000000000000A5
3766:10EB70000C50031000940031400C50431000C200B0 5813:10EB70000000000000000000000000000000000095
3767:10EB800000000000000000004045430520C118308F 5814:10EB80000000000000000000000000000000000085
3768:10EB9000460C11970060C01830461C11830460C1F8 5815:10EB90000000000000000000000000000000000075
3769:10EBA0001830520C11870460C11830460C118011C6 5816:10EBA0000000000000000000000000000000000065
3770:10EBB000500000000000000040010000214008005B 5817:10EBB0000000000000000000000000000000000055
3771:10EBC00002000080002000080002000080002000F9 5818:10EBC0000000000000000000000000000000000045
3772:10EBD0000800020000800020000800020000800001 5819:10EBD0000000000000000000000000000000000035
3773:10EBE0000000000000000000400148442201188499 5820:10EBE0000000000000000000000000000000000025
3774:10EBF0004621119800621018844420118844621143 5821:10EBF0000000000000000000000000000000000015
3775:10EC00001884422111804462111884462111800029 5822:10EC00000000000000000000000000000000000004
3776:10EC100000000000000000004045400450111404B2 5823:10EC100000000000000000000000000000000000F4
3777:10EC2000450011410050101400450111404450119D 5824:10EC200000000000000000000000000000000000E4
3778:10EC30001404450101404450111404050101401120 5825:10EC300000000000000000000000000000000000D4
3779:10EC40005000000000000000400008204208108230 5826:10EC400000000000000000000000000000000000C4
3780:10EC50000420010820420810820420810820420874 5827:10EC500000000000000000000000000000000000B4
3781:10EC6000108204228108205208108A0422810000A8 5828:10EC600000000000000000000000000000000000A4
3782:10EC7000000000000000000000040A01028440A11E 5829:10EC70000000000000000000000000000000000094
3783:10EC80001028000A01028040A01028040A01028016 5830:10EC80000000000000000000000000000000000084
3784:10EC900040A0102C140A00028040B0102C14000078 5831:10EC90000000000000000000000000000000000074
3785:10ECA000000000000000000040454D035340D4D058 5832:10ECA0000000000000000000000000000000000064
3786:10ECB00035300C4D035340D4D035340D4D03534003 5833:10ECB0000000000000000000000000000000000054
3787:10ECC000D4D035340D4D021340D4D035340D40111D 5834:10ECC0000000000000000000000000000000000044
3788:10ECD00050000000000000004001080472011C8088 5835:10ECD0000000000000000000000000000000000034
3789:10ECE000472015C80472011C80472011C804721106 5836:10ECE0000000000000000000000000000000000024
3790:10ECF0001C80472611C84472011C90672611C00071 5837:10ECF0000000000000000000000000000000000014
3791:10ED000000000000000000000000230840C612318F 5838:10ED00000000000000000000000000000000000003
3792:10ED1000848C01030848C61230840C61231848C251 5839:10ED100000000000000000000000000000000000F3
3793:10ED20001231848C01030848C61231048C010000A2 5840:10ED200000000000000000000000000000000000E3
3794:10ED3000000000000000000000003FFF4FFFD3FF75 5841:10ED300000000000000000000000000000000000D3
3795:10ED4000F4FFFD3FFF4FFFD3FFF4FFFD3FFF4FFFF9 5842:10ED400000000000000000000000000000000000C3
3796:10ED5000D3FFF4FFFD3FFF4FFFD3FFF4FFFD0000A3 5843:10ED500000000000000000000000000000000000B3
3797:10ED600000000000000000000000000000000000A3 5844:10ED600000000000000000000000000000000000A3
3798:10ED70000000000000000000000000000000000093 5845:10ED70000000000000000000000000000000000093
3799:10ED80000000000000000000000000000000000083 5846:10ED80000000000000000000000000000000000083
3800:10ED9000000000000000000000002DFB0FB6C2CDF7 5847:10ED90000000000000000000000000000000000073
3801:10EDA000B0B7FD3FFB0B36C2DFB0FB6C2CDB0B7E3C 5848:10EDA0000000000000000000000000000000000063
3802:10EDB000C2CDB0B7FD3FFB0B36C2CDF4B7FD0000AE 5849:10EDB0000000000000000000000000000000000053
3803:10EDC0000000000000000000000033FC4FCF1333B0 5850:10EDC0000000000000000000000000000000000043
3804:10EDD000C4CFFD3FFC4CCF133FC4FCF1333C4CFF90 5851:10EDD0000000000000000000000000000000000033
3805:10EDE0001333C4CFFD3FFC4CCF1333F4CFFD0000F1 5852:10EDE0000000000000000000000000000000000023
3806:10EDF000000000000000000000003B7E4EDF93B7E3 5853:10EDF0000000000000000000000000000000000013
3807:10EE0000E4EDF93FFE4EDF93B7E4EDF93B7E4EC7EC 5854:10EE00000000000000000000000000000000000002
3808:10EE100093B7E4EC61231E4EDF93B784EC610000EE 5855:10EE100000000000000000000000000000000000F2
3809:10EE20000000000000000000000000C524A14A24EA 5856:10EE200000000000000000000000000000000000E2
3810:10EE3000630114024400810B2871021082403811D2 5857:10EE300000000000000000000000000000000000D2
3811:10EE4000410450081882873831C32C520A10000040 5858:10EE400000000000000000000000000000000000C2
3812:10EE5000000000000000000000000845128144800E 5859:10EE500000000000000000000000000000000000B2
3813:10EE600071211C0A071A8102A0522014480712813E 5860:10EE600000000000000000000000000000000000A2
3814:10EE7000C680602008884702014A80702010000088 5861:10EE70000000000000000000000000000000000092
3815:10EE80000000000000000000000002C52C014A0044 5862:10EE80000000000000000000000000000000000082
3816:10EE900052091C800724210808710210804520A116 5863:10EE90000000000000000000000000000000000072
3817:10EEA0004928520114C0450091C4007202100000AC 5864:10EEA0000000000000000000000000000000000062
3818:10EEB0000000000000000000000002072001C10067 5865:10EEB0000000000000000000000000000000000052
3819:10EEC0007109108007000101007008188007000117 5866:10EEC0000000000000000000000000000000000042
3820:10EED000892052010C8046308145046000100000FA 5867:10EED0000000000000000000000000000000000032
3821:10EEE0000000000000000000000008C202200088AE 5868:10EEE0000000000000000000000000000000000022
3822:10EEF00020220008C22280408802220008820AA044 5869:10EEF0000000000000000000000000000000000012
3823:10EF00000CA802220008800A00808C022200000067 5870:10EF00000000000000000000000000000000000001
3824:10EF10000000000000000000080002430000402044 5871:10EF100000000000000000000000000000000000F1
3825:10EF200030080440413010C8000000000203001007 5872:10EF20000000000030002001020200003000438099
3826:10EF3000C000110800C2431080C020010800020078 5873:10EF300000000000000000000000000000000000D1
3827:10EF40000000000000000000080008C30A20C18C77 5874:10EF400000000000000000000000000000000000C1
3828:10EF500012220488013620C3081228040801040084 5875:10EF500000000000000000000000000000000000B1
3829:10EF60004AA8220104C8412630C0880221000200BC 5876:10EF600000000000000000000000000000000000A1
3830:10EF70000000000000000000080008000A10C18026 5877:10EF70000000000000000000000000000000000091
3831:10EF800032210C88430280448012290408420A90EE 5878:10EF80000000000000000000000000000000000081
3832:10EF90008A8000200448030A1082800020000200BA 5879:10EF90000000000000000000000000000000000071
3833:10EFA000000000000000000000000A8702A180AC01 5880:10EFA0000000000000000000000000000000000061
3834:10EFB0004329148A8402A100AC412010080626319E 5881:10EFB0000000000000000000000000000000000051
3835:10EFC00080A46020144A44328181AC602A18020077 5882:10EFC0000000000000000000000000000000000041
3836:10EFD0000000000000000000080008072201C580B2 5883:10EFD0000000000000000000000000000000000031
3837:10EFE00073211CC8072A010C807220104847261183 5884:10EFE0000000000000000000000000000000000021
3838:10EFF000C58073201C88072A1149807020140200E4 5885:10EFF0000000000000000000000000000000000011
3839:10F000000000000000000000080000451031C90C9D 5886:10F000000000000000000000000000000000000000
3840:10F0100073021CC04704010A0C510A1082472031B8 5887:10F0100000000000000000000000000000000000F0
3841:10F02000C80072021C40053011C4007201180200B1 5888:10F0200000000000000000000000000000000000E0
3842:10F030000000000000000000081010062401450434 5889:10F0300000000000000000000000000000000000D0
3843:10F04000518118904714010404718810120534018D 5890:10F0400000000000000000000000000000000000C0
3844:10F050004404514018D0073801C404520114C204BA 5891:10F0500000000000000000000000000000000000B0
3845:10F060000000000000000000000000870021890C63 5892:10F0600000000000000000000000000000000000A0
3846:10F0700060011CD0452401C10C42010000C52031B3 5893:10F070000000000000000000000000000000000090
3847:10F08000410840001880450021410C70421CC2001C 5894:10F080000000000000000000000000000000000080
3848:10F090000000000000000000000002011C80C420ED 5895:10F090000000000000000000000000000000000070
3849:10F0A00031081042420880C62031090020031C901C 5896:10F0A0000000000000000000000000000000000060
3850:10F0B000C42001490C424310804420310810000054 5897:10F0B0000000000000000000000000000000000050
3851:10F0C0000000000000000000000030832030480CE9 5898:10F0C0000000000000000000000000000000000040
3852:10F0D00032401090812420C80432401020C3208088 5899:10F0D0000000000000000000000000000000000030
3853:10F0E000C800024A0CA0012410C8083241100000D8 5900:10F0E0000000000000000000000000000000000020
3854:10F0F0000000000000000000001090030000C904A0 5901:10F0F0000000000000000000000000000000000010
3855:10F10000304000900020008000104010004020108F 5902:10F1000000000000000000000000000000000000FF
3856:10F11000C20000800820430810810032400CC00467 5903:10F1100000000000000000000000000000000000EF
3857:10F12000200000000000000000003000400000004F 5904:10F1200000000000000000000000000000000000DF
3858:10F13000100000F01020000000100000F0108040CF 5905:10F1300000000000000000000000000000000000CF
3859:10F140000000004000F01090800000000000C000AF 5906:10F1400000000000000000000000000000000000BF
3860:10F1500000000000000000003C3C108090400000D7 5907:10F1500000000000000000000000000000000000AF
3861:10F1600000801090A09000000000001090808000AF 5908:10F16000000000000000000000000000000000009F
3862:10F1700000000000109080900000000040108F0FF1 5909:10F17000000000000000000000000000000000008F
3863:10F180000000000000000000000024C6BA06C01CF9 5910:10F18000000000000000000000000000000000007F
3864:10F19000492861142B1C0E403FD9BFD9AABC1A5F65 5911:10F19000000000000000000000000000000000006F
3865:10F1A0000010A6503B61B325BC4019BFFFE98000A9 5912:10F1A000000000000000000000000000000000005F
3866:10F1B0000000000000000000000010921494800C79 5913:10F1B000000000000000000000000000000000004F
3867:10F1C000073F2B948614848028000049140486127B 5914:10F1C000000000000000000000000000000000003F
3868:10F1D0008000412734D0908492002D8A211E800027 5915:10F1D000000000000000000000000000000000002F
3869:10F1E000000000000000000000000000000008A275 5916:10F1E000000000000000000000000000000000001F
3870:10F1F000B10101000000000884B17828000000007F 5917:10F1F000000000000000000000000000000000000F
3871:10F2000008B13214140000000008A8235421400063 5918:10F2000000000000000000000000000000000000FE
3872:10F21000000000000000000000003FFFFFFFC000F2 5919:10F2100000000000000000000000000000000000EE
3873:10F220000000002FFFFEF7C0000000002FD7FEEF08 5920:10F2200000000000000000000000000000000000DE
3874:10F23000C0000000003FFF7FFFC000000000000092 5921:10F2300000000000000000000000000000000000CE
3875:10F24000000000000000000000003FFFFFFFC000C2 5922:10F2400000000000000000000000000000000000BE
3876:10F250000000000FEF77FFC0000000003EFFFEEF50 5923:10F2500000000000000000000000000000000000AE
3877:10F2600040000000003FFFBFFF4000000000000022 5924:10F26000000000000000000000000000000000009E
3878:10F27000000000000000000000003FFFFFFFC00092 5925:10F27000000000000000000000000000000000008E
3879:10F280000000003FFFDFFFC0000000003FFFFFFF66 5926:10F28000000000000000000000000000000000007E
3880:10F29000C0000000003F7F2FFFC000000000000002 5927:10F29000000000000000000000000000000000006E
3881:10F2A000000000000000000000003FFFFFFFC00062 5928:10F2A000000000000000000000000000000000005E
3882:10F2B0000000001FFFFFEFC0000000001FEFEFEF96 5929:10F2B000000000000000000000000000000000004E
3883:10F2C000C0000000002FFFFFFFC000000000000092 5930:10F2C000000000000000000000000000000000003E
3884:10F2D000000000000000000000003FFFFFFFC00032 5931:10F2D000000000000000000000000000000000002E
3885:10F2E0000000003FFFEFFFC0000000002FAFDFFF76 5932:10F2E000000000000000000000000000000000001E
3886:10F2F000C0000000003FEFFFF7C00000000000006A 5933:10F2F000000000000000000000000000000000000E
3887:10F30000000000000000000000003FFFFFFFC00001 5934:10F3000000000000000000000000000000000000FD
3888:10F310000000003FDFDFFFC0000000003FFFFFFFF5 5935:10F3100000000000000000000000000000000000ED
3889:10F32000C0000000001FFFDFFFC000000000000061 5936:10F3200000000000000000000000000000000000DD
3890:10F330000000000000000000000002C424A1002C16 5937:10F3300000000000000000000000000000000000CD
3891:10F34000520B18C2862CA18038620A0840C42CA136 5938:10F3400000000000000000000000000000000000BD
3892:10F350000828420B14008514A10828430A10000055 5939:10F3500000000000000000000000000000000000AD
3893:10F3600000000000000000000000080412010380FB 5940:10F36000000000000000000000000000000000009D
3894:10F3700061201008071241428070201C08041A0105 5941:10F37000000000000000000000000000000000008D
3895:10F3800084814020180846368105806320100001E2 5942:10F38000000000000000000000000000000000007D
3896:10F390008000000000000000000000842421000C18 5943:10F39000000000000000000000000000000000006D
3897:10F3A00052021400872821810872061C82842021C1 5944:10F3A000000000000000000000000000000000005D
3898:10F3B0004818420354804530254A18530210000172 5945:10F3B000000000000000000000000000000000004D
3899:10F3C000200000000000000000000804220101806D 5946:10F3C000000000000000000000000000000000003D
3900:10F3D000422018C8442201808442201C8804220153 5947:10F3D000000000000000000000000000000000002D
3901:10F3E0000080402010884436014080410010000019 5948:10F3E000000000000000000000000000000000001D
3902:10F3F0000000000000000000000000C00820000C19 5949:10F3F000000000000000000000000000000000000D
3903:10F4000022030440810020840803000080C2002001 5950:10F4000000000000000000000000000000000000FC
3904:10F41000C408000308888216A040883222800000B9 5951:10F4100000000000000000000000000000000000EC
3905:10F42000000000000000000008000201008004202D 5952:10F4200000000000000000000000000000000000DC
3906:10F4300010080CC2121084C82212080402030088AB 5953:10F4300000000000000000000000000000000000CC
3907:10F440000021000C0C404130008420100800020014 5954:10F4400000000000000000000000000000000000BC
3908:10F450000000000000000000080008820620088C60 5955:10F4500000000000000000000000000000000000AC
3909:10F4600032220C888126204D882322808883062022 5956:10F46000000000000000000000000000000000009C
3910:10F4700008880023048A8136204B8832220000004D 5957:10F47000000000000000000000000000000000008C
3911:10F4800000000000000000000800080202000980DF 5958:10F48000000000000000000000000000000000007C
3912:10F49000322004886022008984002008980002003D 5959:10F49000000000000000000000000000000000006C
3913:10F4A000008000200008023A8048803020000200DE 5960:10F4A000000000000000000000000000000000005C
3914:10F4B000000000000000000008000AC41AA180A893 5961:10F4B000000000000000000000000000000000004C
3915:10F4C000412A10CAC71AA104AD712A184AD406B13C 5962:10F4C000000000000000000000000000000000003C
3916:10F4D00000A8712A100884262906AC522A100200BE 5963:10F4D000000000000000000000000000000000002C
3917:10F4E0000000000000000000080008042A0141801C 5964:10F4E000000000000000000000000000000000001C
3918:10F4F00042201C00040A01098451201C8844020196 5965:10F4F000000000000000000000000000000000000C
3919:10F5000008804020104A4702014880632010020012 5966:10F5000000000000000000000000000000000000FB
3920:10F510008000000000000000080000C41021810CE1 5967:10F5100000000000000000000000000000000000EB
3921:10F5200041020C00C020610D0E72021C40C4083163 5968:10F5200000000000000000000000000000000000DB
3922:10F530000418420210808720B1C40C53021000004E 5969:10F5300000000000000000000000000000000000CB
3923:10F540000000000000000000081020072401CC008B 5970:10F5400000000000000000000000000000000000BB
3924:10F55000724014000424010800734110C0073011E8 5971:10F5500000000000000000000000000000000000AB
3925:10F56000CC007101100204208146104240100204B8 5972:10F56000000000000000000000000000000000009B
3926:10F570000000000000000000080000C51021000885 5973:10F57000000000000000000000000000000000008B
3927:10F5800062021C90C52421000C70821C10C4203122 5974:10F58000000000000000000000000000000000007B
3928:10F59000880240061C008500A1000C4042000200C9 5975:10F59000000000000000000000000000000000006B
3929:10F5A000000000000000000000002205148001207F 5976:10F5A000000000000000000000000000000000005B
3930:10F5B00030080C42060080012451080C02410080F2 5977:10F5B000000000000000000000000000000000004B
3931:10F5C0004C2000080C304204000420000800000019 5978:10F5C000000000000000000000000000000000003B
3932:10F5D0000000000000000000000010C62420000C05 5979:10F5D000000000000000000000000000000000002B
3933:10F5E00032C20480C73020000C53C20410C22870FD 5980:10F5E000000000000000000000000000000000001B
3934:10F5F0000C0902024C80810430090C024210000008 5981:10F5F000000000000000000000000000000000000B
3935:10F60000000000000000000000108001380002002F 5982:10F6000000000000000000000000000000000000FA
3936:10F6100012400C200734040200630108100024107B 5983:10F6100000000000000000000000000000000000EA
3937:10F620000400020104820108800910024010000455 5984:10F6200000000000000000000000000000000000DA
3938:10F6300030000000000000000000302010800000BA 5985:10F6300000000000000000000000000000000000CA
3939:10F64000208000F02010800000208000D08000008A 5986:10F6400000000000000000000000000000000000BA
3940:10F650004000000000301000800000000000CC409E 5987:10F6500000000000000000000000000000000000AA
3941:10F6600000000000000000003C3C10808000000012 5988:10F66000000000000000000000000000000000009A
3942:10F67000000010908080000000000010908000903A 5989:10F67000000000000000000000000000000000008A
3943:10F68000800010000010A0800000002000108C08F6 5990:10F68000000000000000000000000000000000007A
3944:10F6900000000000000000000000341ABE178000C7 5991:10F69000000000000000000000000000000000006A
3945:10F6A0003E40266FBAE32480001659BD828182D87D 5992:10F6A000000000000000000000000000000000005A
3946:10F6B000800000199986806480C03FD9998000013C 5993:10F6B000000000000000000000000000000000004A
3947:10F6C000F000000000000000000006160294001682 5994:10F6C000000000000000000000000000000000003A
3948:10F6D000C01694829016108021182828020A020869 5995:10F6D000000000000000000000000000000000002A
3949:10F6E00080000000000282801400011411A040007C 5996:10F6E000000000000000000000000000000000001A
3950:10F6F000000000000000000000000000000008847E 5997:10F6F000000000000000000000000000000000000A
3951:10F700000284A8800000000891228441A2082401FC 5998:10F7000000000000000000000000000000000000F9
3952:10F7100030000000000000000008840144010000E7 5999:10F7100000000000000000000000000000000000E9
3953:10F72000000000000000000000003FFFFFFFC000DD 6000:10F7200000000000000000000000000000000000D9
3954:10F730000000003EF7FFF7C0000000002FE7B7FF12 6001:10F7300000000000000000000000000000000000C9
3955:10F74000C0000000002FFE7FF7C000000000000096 6002:10F7400000000000000000000000000000000000B9
3956:10F75000000000000000000000003FFFFFFFC000AD 6003:10F7500000000000000000000000000000000000A9
3957:10F7600000000036BFFEDFC0000000000FF7DFFF23 6004:10F760000000000000000000000000000000000099
3958:10F77000C0000000003DB7B7EFC00000000000006F 6005:10F770000000000000000000000000000000000089
3959:10F78000000000000000000000003FFFFFFFC0007D 6006:10F780000000000000000000000000000000000079
3960:10F790000000001FDFDFFFC0000000000FDFDFFF01 6007:10F790000000000000000000000000000000000069
3961:10F7A000C0000000003FEFFFFFC0000000000000AD 6008:10F7A0000000000000000000000000000000000059
3962:10F7B000000000000000000000003FFFFFFFC0004D 6009:10F7B0000000000000000000000000000000000049
3963:10F7C0000000003FBF7FFFC0000000003FFF7FF749 6010:10F7C0000000000000000000000000000000000039
3964:10F7D000C0000000003FDFFFFFC00000000000008D 6011:10F7D0000000000000000000000000000000000029
3965:10F7E000000000000000000000003FFFFFFFC0001D 6012:10F7E0000000000000000000000000000000000019
3966:10F7F0000000003F7EFFFF40000000003FFEFFFFD3 6013:10F7F0000000000000000000000000000000000009
3967:10F80000C0000000003FFFFFFFC00000000000003C 6014:10F8000000000000000000000000000000000000F8
3968:10F81000000000000000000000003FFFFFFFC000EC 6015:10F8100000000000000000000000000000000000E8
3969:10F8200000000037FF6FFFC0000000003FFFFFFF38 6016:10F8200000000000000000000000000000000000D8
3970:10F83000C0000000003FFFFFFFC00000000000000C 6017:10F8300000000000000000000000000000000000C8
3971:10F8400000000000000000000000000000000000B8 6018:10F8400000000000000000000000000000000000B8
3972:10F8500000000000000000000000000000000000A8 6019:10F8500000000000000000000000000000000000A8
3973:10F860000000000000000000000000000000000098 6020:10F860000000000000000000000000000000000098
3974:10F870000000000000000000300020010200000035 6021:10F870000000000000000000000000000000000088
3975:10F880003000430C000000000000000000000000F9 6022:10F880000000000000000000000000000000000078
3976:10F890000000000000000000000000000000000068 6023:10F890000000000000000000000000000000000068
3977:10F8A0000000000000000000000000000000000058 6024:10F8A0000000000000000000000000000000000058
3978:10F8B0000000000000000000000000000000000048 6025:10F8B0000000000000000000000000000000000048
3979:10F8C0000000000000000000000000000000000038 6026:10F8C0000000000000000000000000000000000038
3980:10F8D0000000000000000000000000000000000028 6027:10F8D0000000000000000000000000000000000028
3981:10F8E0000000000000000000000000000000000018 6028:10F8E0000000000000000000000000000000000018
3982:10F8F00000000000000000000030C00000000030E8 6029:10F8F0000000000000000000000000000000000008
3983:10F90000C000000000000000000000000000000037 6030:10F9000000000000000000000000000000000000F7
3984:10F9100000000000000000000000000000000000E7 6031:10F9100000000000000000000000000000000000E7
3985:10F9200000000000000000000000000000000000D7 6032:10F9200000000000000000000000000000000000D7
3986:10F9300000000000000000000000000000000000C7 6033:10F9300000000000000000000000000000000000C7
3987:10F9400000000000000000000000000000000000B7 6034:10F9400000000000000000000000000000000000B7
3988:10F95000000000000000000000000030C030C000C7 6035:10F9500000000000000000000000000000000000A7
3989:10F960000000000000000000000000000000000097 6036:10F960000000000000000000000000000000000097
3990:10F970000000000000000000000000000000000087 6037:10F970000000000000000000000000000000000087
3991:10F980000000000000000000000000000000000077 6038:10F980000000000000000000000000000000000077
3992:10F990000000000000000000000000000000000067 6039:10F990000000000000000000000000000000000067
3993:10F9A0000000000000000000000000000000000057 6040:10F9A0000000000000000000000000000000000057
3994:10F9B00000000000000000000030C030C030C03047 6041:10F9B0000000000000000000000000000000000047
3995:10F9C000C000000000000000000000000000000077 6042:10F9C0000000000000000000000000000000000037
3996:10F9D0000000000000000000000000000000000027 6043:10F9D0000000000000000000000000000000000027
3997:10F9E0000000000000000000000000000000000017 6044:10F9E0000000000000000000000000000000000017
3998:10F9F0000000000000000000000000000000000007 6045:10F9F0000000000000000000000000000000000007
3999:10FA000000000000000000000000000000000000F6 6046:10FA000000000000000000000000000000000000F6
4000:10FA10000000000000000000000F00000000000FC8 6047:10FA100000000000000000000000000000000000E6
4001:10FA200000000000000000000000000000000000D6 6048:10FA200000000000000000000000000000000000D6
4002:10FA300000000000000000000000000000000000C6 6049:10FA300000000000000000000000000000000000C6
4003:10FA400000000000000000000000000000000000B6 6050:10FA400000000000000000000000000000000000B6
4004:10FA500000000000000000000000000000000000A6 6051:10FA500000000000000000000000000000000000A6
4005:10FA60000000000000000000000000000000000096 6052:10FA60000000000000000000000000000000000096
4006:10FA70000000000000000000003FC0000000003F48 6053:10FA70000000000000000000000000000000000086
4007:10FA8000C0000000000000000000000000000000B6 6054:10FA80000000000000000000000000000000000076
4008:10FA90000000000000000000000000000000000066 6055:10FA90000000000000000000000000000000000066
4009:10FAA0000000000000000000000000000000000056 6056:10FAA0000000000000000000000000000000000056
4010:10FAB0000000000000000000000000000000000046 6057:10FAB0000000000000000000000000000000000046
4011:10FAC0000000000000000000000000000000000036 6058:10FAC0000000000000000000000000000000000036
4012:10FAD0000000000000000000000F0030C030C00F28 6059:10FAD0000000000000000000000000000000000026
4013:10FAE0000000000000000000000000000000000016 6060:10FAE0000000000000000000000000000000000016
4014:10FAF0000000000000000000000000000000000006 6061:10FAF0000000000000000000000000000000000006
4015:10FB000000000000000000000000000000000000F5 6062:10FB000000000000000000000000000000000000F5
4016:10FB100000000000000000000000000000000000E5 6063:10FB100000000000000000000000000000000000E5
4017:10FB200000000000000000000000000000000000D5 6064:10FB200000000000000000000000000000000000D5
4018:10FB3000000000000000000000136B00C000CF2C8C 6065:10FB300000000000000000000000000000000000C5
4019:10FB40004000000000000000000000000000000075 6066:10FB400000000000000000000000000000000000B5
4020:10FB500000000000000000000000000000000000A5 6067:10FB500000000000000000000000000000000000A5
4021:10FB60000000000000000000000000000000000095 6068:10FB60000000000000000000000000000000000095
4022:10FB70000000000000000000000000000000000085 6069:10FB70000000000000000000000000000000000085
4023:10FB80000000000000000000000000000000000075 6070:10FB80000000000000000000000000000000000075
4024:10FB900000000000000000000000000F000F000047 6071:10FB90000000000000000000000000000000000065
4025:10FBA0000000000000000000000000000000000055 6072:10FBA0000000000000000000000000000000000055
4026:10FBB0000000000000000000000000000000000045 6073:10FBB0000000000000000000000000000000000045
4027:10FBC0000000000000000000000000000000000035 6074:10FBC0000000000000000000000000000000000035
4028:10FBD0000000000000000000000000000000000025 6075:10FBD0000000000000000000000000000000000025
4029:10FBE0000000000000000000000000000000000015 6076:10FBE0000000000000000000000000000000000015
4030:10FBF00000000000000000000030C00F000F0030C7 6077:10FBF0000000000000000000000000000000000005
4031:10FC0000C000000000000000000000000000000034 6078:10FC000000000000000000000000000000000000F4
4032:10FC100000000000000000000000000000000000E4 6079:10FC100000000000000000000000000000000000E4
4033:10FC200000000000000000000000000000000000D4 6080:10FC200000000000000000000000000000000000D4
4034:10FC300000000000000000000000000000000000C4 6081:10FC300000000000000000000000000000000000C4
4035:10FC400000000000000000000000000000000000B4 6082:10FC400000000000000000000000000000000000B4
4036:10FC500000000000000000000000003FC03FC000A6 6083:10FC500000000000000000000000000000000000A4
4037:10FC60000000000000000000000000000000000094 6084:10FC60000000000000000000000000000000000094
4038:10FC70000000000000000000000000000000000084 6085:10FC70000000000000000000000000000000000084
4039:10FC80000000000000000000000000000000000074 6086:10FC80000000000000000000000000000000000074
4040:10FC90000000000000000000000000000000000064 6087:10FC90000000000000000000000000000000000064
4041:10FCA0000000000000000000000000000000000054 6088:10FCA0000000000000000000000000000000000054
4042:10FCB00000000000000000000030C03FC03FC03026 6089:10FCB0000000000000000000000000000000000044
4043:10FCC000C000000000000000000000000000000074 6090:10FCC0000000000000000000000000000000000034
4044:10FCD0000000000000000000000000000000000024 6091:10FCD0000000000000000000000000000000000024
4045:10FCE0000000000000000000000000000000000014 6092:10FCE0000000000000000000000000000000000014
4046:10FCF0000000000000000000000000000000000004 6093:10FCF0000000000000000000000000000000000004
4047:10FD000000000000000000000000000000000000F3 6094:10FD000000000000000000000000000000000000F3
4048:10FD10000000000000000000000F000F000F000FA7 6095:10FD100000000000000000000000000000000000E3
4049:10FD200000000000000000000000000000000000D3 6096:10FD200000000000000000000000000000000000D3
4050:10FD300000000000000000000000000000000000C3 6097:10FD30003000000100005FA73000800100000003D8
4051:10FD400000000000000000000000000000000000B3 6098:10FD40003000400E00000000000000000000000035
4052:10FD500000000000000000000000000000000000A3 6099:10FD500000000000000000000000000000000000A3
4053:10FD60000000000000000000000000000000000093 6100:10FD60000000000000000000000000000000000093
4054:10FD70000000000000000000003FC00F000F003F27 6101:10FD700000000000000000000000000030008001D2
4055:10FD8000C0000000000000000000000000000000B3 6102:10FD8000000000053000A00100000000300000016C
4056:10FD90000000000000000000000000000000000063 6103:10FD900000006B9700000000000000000000000061
4057:10FDA0000000000000000000000000000000000053 6104:04FDA000000000005F
4058:10FDB0000000000000000000000000000000000043
4059:10FDC0000000000000000000000000000000000033
4060:10FDD0000000000000000000000F003FC03FC00F07
4061:10FDE0000000000000000000000000000000000013
4062:10FDF0000000000000000000000000000000000003
4063:10FE000000000000000000000000000000000000F2
4064:10FE100000000000000000000000000000000000E2
4065:10FE200000000000000000000000000000000000D2
4066:10FE3000000000000000000006335D80C000FDAC43
4067:10FE400002000000000000000000000000000000B0
4068:10FE500000000000000000000000000000000000A2
4069:10FE60000000000000000000000000000000000092
4070:10FE70000000000000000000000000000000000082
4071:10FE80000000000000000000000000000000000072
4072:10FE90000000000000000000000000000000000062
4073:10FEA0000000000000000000000000000000000052
4074:10FEB0000000000000000000000000000000000042
4075:10FEC0000000000000000000000000000000000032
4076:10FED0000000000000000000000000000000000022
4077:10FEE0000000000000000000000000000000000012
4078:10FEF00000000000000000000030C00000000030E2
4079:10FF0000C000000000000000000000000000000031
4080:10FF100000000000000000000000000000000000E1
4081:10FF200000000000000000000000000000000000D1
4082:10FF300000000000000000000000000000000000C1
4083:10FF400000000000000000000000000000000000B1
4084:10FF5000000000000000000000000030C030C000C1
4085:10FF60000000000000000000000000000000000091
4086:10FF70000000000000000000000000000000000081
4087:10FF80000000000000000000000000000000000071
4088:10FF90000000000000000000000000000000000061
4089:10FFA0000000000000000000000000000000000051
4090:10FFB00000000000000000000030C030C030C03041
4091:10FFC000C000000000000000000000000000000071
4092:10FFD0000000000000000000000000000000000021
4093:10FFE0000000000000000000000000000000000011
4094:10FFF0000000000000000000000000000000000001
4095:108010000000000000000000000000000000000060
4096:108020000000000000000000000F00000000000F32
4097:108030000000000000000000000000000000000040
4098:108040000000000000000000000000000000000030
4099:108050000000000000000000000000000000000020
4100:108060000000000000000000000000000000000010
4101:108070000000000000000000000000000000000000
4102:108080000000000000000000003FC0000000003FB2
4103:10809000C000000000000000000000000000000020
4104:1080A00000000000000000000000000000000000D0
4105:1080B00000000000000000000000000000000000C0
4106:1080C00000000000000000000000000000000000B0
4107:1080D00000000000000000000000000000000000A0
4108:1080E0000000000000000000000F0030C030C00F92
4109:1080F0000000000000000000000000000000000080
4110:10810000000000000000000000000000000000006F
4111:10811000000000000000000000000000000000005F
4112:10812000000000000000000000000000000000004F
4113:10813000000000000000000000000000000000003F
4114:108140000000000000000000001374C0C000F0EC4C
4115:1081500040000000000000000000000000000000DF
4116:10816000000000000000000000000000000000000F
4117:1081700000000000000000000000000000000000FF
4118:1081800000000000000000000000000000000000EF
4119:1081900000000000000000000000000000000000DF
4120:1081A00000000000000000000000000F000F0000B1
4121:1081B00000000000000000000000000000000000BF
4122:1081C00000000000000000000000000000000000AF
4123:1081D000000000000000000000000000000000009F
4124:1081E000000000000000000000000000000000008F
4125:1081F000000000000000000000000000000000007F
4126:1082000000000000000000000030C00F000F003030
4127:10821000C00000000000000000000000000000009E
4128:10822000000000000000000000000000000000004E
4129:10823000000000000000000000000000000000003E
4130:10824000000000000000000000000000000000002E
4131:10825000000000000000000000000000000000001E
4132:1082600000000000000000000000003FC03FC00010
4133:1082700000000000000000000000000000000000FE
4134:1082800000000000000000000000000000000000EE
4135:1082900000000000000000000000000000000000DE
4136:1082A00000000000000000000000000000000000CE
4137:1082B00000000000000000000000000000000000BE
4138:1082C0000000000000000000001986108030823D90
4139:1082D000800000000000000000000000000000001E
4140:1082E000000000000000000000000000000000008E
4141:1082F000000000000000000000000000000000007E
4142:10830000000000000000000000000000000000006D
4143:10831000000000000000000000000000000000005D
4144:108320000000000000000000000F000F000F000F11
4145:10833000000000000000000000000000000000003D
4146:10834000000000000000000000000000000000002D
4147:10835000000000000000000000000000000000001D
4148:10836000000000000000000000000000000000000D
4149:1083700000000000000000000000000000000000FD
4150:108380000000000000000000003FC00F000F003F91
4151:10839000C00000000000000000000000000000001D
4152:1083A00000000000000000000000000000000000CD
4153:1083B00000000000000000000000000000000000BD
4154:1083C00000000000000000000000000000000000AD
4155:1083D000000000000000000000000000000000009D
4156:1083E0000000000000000000000F003FC03FC00F71
4157:1083F000000000000000000000000000000000007D
4158:10840000000000000000000000000000000000006C
4159:10841000000000000000000000000000000000005C
4160:10842000000000000000000000000000000000004C
4161:10843000000000000000000000000000000000003C
4162:108440000000000000000000376525E48000B088CF
4163:10845000AB40000000000000000000000000000031
4164:10846000000000000000000000000000000000000C
4165:1084700000000000000000000000000000000000FC
4166:1084800000000000000000000000000000000000EC
4167:1084900000000000000000000000000000000000DC
4168:1084A00000000000000000000000000000000000CC
4169:1084B00000000000000000000000000000000000BC
4170:1084C00000000000300020010202000030004300E4
4171:1084D000000000000000000000000000000000009C
4172:1084E000000000000000000000000000000000008C
4173:1084F000000000000000000000000000000000007C
4174:10850000000000000000000000000000000000006B
4175:10851000000000000000000000000000000000005B
4176:10852000000000000000000000000000000000004B
4177:10853000000000000000000000000000000000003B
4178:10854000000000000000000000000000000000002B
4179:10855000000000000000000000000000000000001B
4180:10856000000000000000000000000000000000000B
4181:1085700000000000000000000000000000000000FB
4182:1085800000000000000000000000000000000000EB
4183:1085900000000000000000000000000000000000DB
4184:1085A00000000000000000000000000000000000CB
4185:1085B00000000000000000000000000000000000BB
4186:1085C00000000000000000000000000000000000AB
4187:1085D000000000000000000000000000000000009B
4188:1085E000000000000000000000000000000000008B
4189:1085F000000000000000000000000000000000007B
4190:10860000000000000000000000000000000000006A
4191:10861000000000000000000000000000000000005A
4192:10862000000000000000000000000000000000004A
4193:10863000000000000000000000000000000000003A
4194:10864000000000000000000000000000000000002A
4195:10865000000000000000000000000000000000001A
4196:10866000000000000000000000000000000000000A
4197:1086700000000000000000000000000000000000FA
4198:1086800000000000000000000000000000000000EA
4199:1086900000000000000000000000000000000000DA
4200:1086A00000000000000000000000000000000000CA
4201:1086B00000000000000000000000000000000000BA
4202:1086C00000000000000000000000000000000000AA
4203:1086D000000000000000000000000000000000009A
4204:1086E000000000000000000000000000000000008A
4205:1086F000000000000000000000000000000000007A
4206:108700000000000000000000000000000000000069
4207:108710000000000000000000000000000000000059
4208:108720000000000000000000000000000000000049
4209:108730000000000000000000000000000000000039
4210:108740000000000000000000000000000000000029
4211:108750000000000000000000000000000000000019
4212:108760000000000000000000000000000000000009
4213:1087700000000000000000000000000000000000F9
4214:1087800000000000000000000000000000000000E9
4215:1087900000000000000000000000000000000000D9
4216:1087A00000000000000000000000000000000000C9
4217:1087B00000000000000000000000000000000000B9
4218:1087C00000000000000000000000000000000000A9
4219:1087D0000000000000000000000000000000000099
4220:1087E0000000000000000000000000000000000089
4221:1087F0000000000000000000000000000000000079
4222:108800000000000000000000000000000000000068
4223:108810000000000000000000000000000000000058
4224:108820000000000000000000000000000000000048
4225:108830000000000000000000000000000000000038
4226:108840000000000000000000000000000000000028
4227:108850000000000000000000000000000000000018
4228:108860000000000000000000000000000000000008
4229:1088700000000000000000000000000000000000F8
4230:1088800000000000000000000000000000000000E8
4231:1088900000000000000000000000000000000000D8
4232:1088A00000000000000000000000000000000000C8
4233:1088B00000000000000000000000000000000000B8
4234:1088C00000000000000000000000000000000000A8
4235:1088D0000000000000000000000000000000000098
4236:1088E0000000000000000000000000000000000088
4237:1088F0000000000000000000000000000000000078
4238:108900000000000000000000000000000000000067
4239:108910000000000000000000000000000000000057
4240:108920000000000000000000000000000000000047
4241:108930000000000000000000000000000000000037
4242:108940000000000000000000000000000000000027
4243:108950000000000000000000000000000000000017
4244:108960000000000000000000000000000000000007
4245:1089700000000000000000000000000000000000F7
4246:1089800000000000000000000000000000000000E7
4247:1089900000000000000000000000000000000000D7
4248:1089A00000000000000000000000000000000000C7
4249:1089B00000000000000000000000000000000000B7
4250:1089C00000000000000000000000000000000000A7
4251:1089D0000000000000000000000000000000000097
4252:1089E0000000000000000000000000000000000087
4253:1089F0000000000000000000000000000000000077
4254:108A00000000000000000000000000000000000066
4255:108A10000000000000000000000000000000000056
4256:108A20000000000000000000000000000000000046
4257:108A30000000000000000000000000000000000036
4258:108A40000000000000000000000000000000000026
4259:108A50000000000000000000000000000000000016
4260:108A60000000000000000000000000000000000006
4261:108A700000000000000000000000000000000000F6
4262:108A800000000000000000000000000000000000E6
4263:108A900000000000000000000000000000000000D6
4264:108AA00000000000000000000000000000000000C6
4265:108AB00000000000000000000000000000000000B6
4266:108AC00000000000000000000000000000000000A6
4267:108AD0000000000000000000000000000000000096
4268:108AE0000000000000000000000000000000000086
4269:108AF0000000000000000000000000000000000076
4270:108B00000000000000000000000000000000000065
4271:108B10000000000000000000000000000000000055
4272:108B20000000000000000000000000000000000045
4273:108B30000000000000000000000000000000000035
4274:108B40000000000000000000000000000000000025
4275:108B50000000000000000000000000000000000015
4276:108B60000000000000000000000000000000000005
4277:108B700000000000000000000000000000000000F5
4278:108B800000000000000000000000000000000000E5
4279:108B900000000000000000000000000000000000D5
4280:108BA00000000000000000000000000000000000C5
4281:108BB00000000000000000000000000000000000B5
4282:108BC00000000000000000000000000000000000A5
4283:108BD0000000000000000000000000000000000095
4284:108BE0000000000000000000000000000000000085
4285:108BF0000000000000000000000000000000000075
4286:108C00000000000000000000000000000000000064
4287:108C10000000000000000000000000000000000054
4288:108C20000000000000000000000000000000000044
4289:108C30000000000000000000000000000000000034
4290:108C40000000000000000000000000000000000024
4291:108C50000000000000000000000000000000000014
4292:108C60000000000000000000000000000000000004
4293:108C700000000000000000000000000000000000F4
4294:108C800000000000000000000000000000000000E4
4295:108C900000000000000000000000000000000000D4
4296:108CA00000000000000000000000000000000000C4
4297:108CB00000000000000000000000000000000000B4
4298:108CC00000000000000000000000000000000000A4
4299:108CD0000000000000000000000000000000000094
4300:108CE0000000000000000000000000000000000084
4301:108CF0000000000000000000000000000000000074
4302:108D00000000000000000000000000000000000063
4303:108D10000000000000000000000000000000000053
4304:108D20000000000000000000000000000000000043
4305:108D30000000000000000000000000000000000033
4306:108D40000000000000000000000000000000000023
4307:108D50000000000000000000000000000000000013
4308:108D60000000000000000000000000000000000003
4309:108D700000000000000000000000000000000000F3
4310:108D800000000000000000000000000000000000E3
4311:108D900000000000000000000000000000000000D3
4312:108DA00000000000000000000000000000000000C3
4313:108DB00000000000000000000000000000000000B3
4314:108DC00000000000000000000000000000000000A3
4315:108DD0000000000000000000000000000000000093
4316:108DE0000000000000000000000000000000000083
4317:108DF0000000000000000000000000000000000073
4318:108E00000000000000000000000000000000000062
4319:108E10000000000000000000000000000000000052
4320:108E20000000000000000000000000000000000042
4321:108E30000000000000000000000000000000000032
4322:108E40000000000000000000000000000000000022
4323:108E50000000000000000000000000000000000012
4324:108E60000000000000000000000000000000000002
4325:108E700000000000000000000000000000000000F2
4326:108E800000000000000000000000000000000000E2
4327:108E900000000000000000000000000000000000D2
4328:108EA00000000000000000000000000000000000C2
4329:108EB00000000000000000000000000000000000B2
4330:108EC00000000000000000000000000000000000A2
4331:108ED0000000000000000000000000000000000092
4332:108EE0000000000000000000000000000000000082
4333:108EF0000000000000000000000000000000000072
4334:108F00000000000000000000000000000000000061
4335:108F10000000000000000000000000000000000051
4336:108F20000000000000000000000000000000000041
4337:108F30000000000000000000000000000000000031
4338:108F40000000000000000000000000000000000021
4339:108F50000000000000000000000000000000000011
4340:108F60000000000000000000000000000000000001
4341:108F700000000000000000000000000000000000F1
4342:108F800000000000000000000000000000000000E1
4343:108F900000000000000000000000000000000000D1
4344:108FA00000000000000000000000000000000000C1
4345:108FB00000000000000000000000000000000000B1
4346:108FC00000000000000000000000000000000000A1
4347:108FD0000000000000000000000000000000000091
4348:108FE0000000000000000000000000000000000081
4349:108FF0000000000000000000000000000000000071
4350:109000000000000000000000000000000000000060
4351:109010000000000000000000000000000000000050
4352:109020000000000000000000000000000000000040
4353:109030000000000000000000000000000000000030
4354:109040000000000000000000000000000000000020
4355:109050000000000000000000000000000000000010
4356:109060000000000000000000000000000000000000
4357:1090700000000000000000000000000000000000F0
4358:1090800000000000000000000000000000000000E0
4359:1090900000000000000000000000000000000000D0
4360:1090A00000000000000000000000000000000000C0
4361:1090B00000000000000000000000000000000000B0
4362:1090C00000000000000000000000000000000000A0
4363:1090D00030000001000044723000800100000003F5
4364:1090E0003000400C00000000000000000000000004
4365:1090F0000000000000000000000000000000000070
4366:10910000000000000000000000000000000000005F
4367:109110000000000030008001000000053000A001C8
4368:1091200000000000300000010000E15A00000000D3
4369:0C91300000000000000000000000000033
4370:00000001FF 6105:00000001FF
4371// VERSION= 1.0.0.191 6106// VERSION= 1.0.0.191
4372// DATE= 2002oct28 6107// DATE= 2002oct28
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index 6d722695e027..e273e5ac19c9 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -38,6 +38,14 @@ struct phy_ops {
38}; 38};
39 39
40/** 40/**
41 * struct phy_attrs - represents phy attributes
42 * @bus_width: Data path width implemented by PHY
43 */
44struct phy_attrs {
45 u32 bus_width;
46};
47
48/**
41 * struct phy - represents the phy device 49 * struct phy - represents the phy device
42 * @dev: phy device 50 * @dev: phy device
43 * @id: id of the phy device 51 * @id: id of the phy device
@@ -46,6 +54,7 @@ struct phy_ops {
46 * @mutex: mutex to protect phy_ops 54 * @mutex: mutex to protect phy_ops
47 * @init_count: used to protect when the PHY is used by multiple consumers 55 * @init_count: used to protect when the PHY is used by multiple consumers
48 * @power_count: used to protect when the PHY is used by multiple consumers 56 * @power_count: used to protect when the PHY is used by multiple consumers
57 * @phy_attrs: used to specify PHY specific attributes
49 */ 58 */
50struct phy { 59struct phy {
51 struct device dev; 60 struct device dev;
@@ -55,6 +64,7 @@ struct phy {
55 struct mutex mutex; 64 struct mutex mutex;
56 int init_count; 65 int init_count;
57 int power_count; 66 int power_count;
67 struct phy_attrs attrs;
58}; 68};
59 69
60/** 70/**
@@ -127,6 +137,14 @@ int phy_init(struct phy *phy);
127int phy_exit(struct phy *phy); 137int phy_exit(struct phy *phy);
128int phy_power_on(struct phy *phy); 138int phy_power_on(struct phy *phy);
129int phy_power_off(struct phy *phy); 139int phy_power_off(struct phy *phy);
140static inline int phy_get_bus_width(struct phy *phy)
141{
142 return phy->attrs.bus_width;
143}
144static inline void phy_set_bus_width(struct phy *phy, int bus_width)
145{
146 phy->attrs.bus_width = bus_width;
147}
130struct phy *phy_get(struct device *dev, const char *string); 148struct phy *phy_get(struct device *dev, const char *string);
131struct phy *devm_phy_get(struct device *dev, const char *string); 149struct phy *devm_phy_get(struct device *dev, const char *string);
132void phy_put(struct phy *phy); 150void phy_put(struct phy *phy);
@@ -199,6 +217,16 @@ static inline int phy_power_off(struct phy *phy)
199 return -ENOSYS; 217 return -ENOSYS;
200} 218}
201 219
220static inline int phy_get_bus_width(struct phy *phy)
221{
222 return -ENOSYS;
223}
224
225static inline void phy_set_bus_width(struct phy *phy, int bus_width)
226{
227 return;
228}
229
202static inline struct phy *phy_get(struct device *dev, const char *string) 230static inline struct phy *phy_get(struct device *dev, const char *string)
203{ 231{
204 return ERR_PTR(-ENOSYS); 232 return ERR_PTR(-ENOSYS);
diff --git a/include/linux/platform_data/usb-ehci-orion.h b/include/linux/platform_data/usb-ehci-orion.h
index 6fc78e430420..52b0acb35fd7 100644
--- a/include/linux/platform_data/usb-ehci-orion.h
+++ b/include/linux/platform_data/usb-ehci-orion.h
@@ -1,13 +1,11 @@
1/* 1/*
2 * arch/arm/plat-orion/include/plat/ehci-orion.h
3 *
4 * This file is licensed under the terms of the GNU General Public 2 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any 3 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied. 4 * warranty of any kind, whether express or implied.
7 */ 5 */
8 6
9#ifndef __PLAT_EHCI_ORION_H 7#ifndef __USB_EHCI_ORION_H
10#define __PLAT_EHCI_ORION_H 8#define __USB_EHCI_ORION_H
11 9
12#include <linux/mbus.h> 10#include <linux/mbus.h>
13 11
diff --git a/include/linux/platform_data/usb-omap1.h b/include/linux/platform_data/usb-omap1.h
new file mode 100644
index 000000000000..43b5ce139c37
--- /dev/null
+++ b/include/linux/platform_data/usb-omap1.h
@@ -0,0 +1,53 @@
1/*
2 * Platform data for OMAP1 USB
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive for
6 * more details.
7 */
8#ifndef __LINUX_USB_OMAP1_H
9#define __LINUX_USB_OMAP1_H
10
11#include <linux/platform_device.h>
12
13struct omap_usb_config {
14 /* Configure drivers according to the connectors on your board:
15 * - "A" connector (rectagular)
16 * ... for host/OHCI use, set "register_host".
17 * - "B" connector (squarish) or "Mini-B"
18 * ... for device/gadget use, set "register_dev".
19 * - "Mini-AB" connector (very similar to Mini-B)
20 * ... for OTG use as device OR host, initialize "otg"
21 */
22 unsigned register_host:1;
23 unsigned register_dev:1;
24 u8 otg; /* port number, 1-based: usb1 == 2 */
25
26 const char *extcon; /* extcon device for OTG */
27
28 u8 hmc_mode;
29
30 /* implicitly true if otg: host supports remote wakeup? */
31 u8 rwc;
32
33 /* signaling pins used to talk to transceiver on usbN:
34 * 0 == usbN unused
35 * 2 == usb0-only, using internal transceiver
36 * 3 == 3 wire bidirectional
37 * 4 == 4 wire bidirectional
38 * 6 == 6 wire unidirectional (or TLL)
39 */
40 u8 pins[3];
41
42 struct platform_device *udc_device;
43 struct platform_device *ohci_device;
44 struct platform_device *otg_device;
45
46 u32 (*usb0_init)(unsigned nwires, unsigned is_device);
47 u32 (*usb1_init)(unsigned nwires);
48 u32 (*usb2_init)(unsigned nwires, unsigned alt_pingroup);
49
50 int (*ocpi_enable)(void);
51};
52
53#endif /* __LINUX_USB_OMAP1_H */
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h
index adae88f5b0ab..a964f7285600 100644
--- a/include/linux/scatterlist.h
+++ b/include/linux/scatterlist.h
@@ -345,6 +345,7 @@ struct sg_mapping_iter {
345 345
346void sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl, 346void sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl,
347 unsigned int nents, unsigned int flags); 347 unsigned int nents, unsigned int flags);
348bool sg_miter_skip(struct sg_mapping_iter *miter, off_t offset);
348bool sg_miter_next(struct sg_mapping_iter *miter); 349bool sg_miter_next(struct sg_mapping_iter *miter);
349void sg_miter_stop(struct sg_mapping_iter *miter); 350void sg_miter_stop(struct sg_mapping_iter *miter);
350 351
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 978d0f09d039..90b4fdc8a61f 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -142,6 +142,7 @@ struct tty_bufhead {
142#define C_CLOCAL(tty) _C_FLAG((tty), CLOCAL) 142#define C_CLOCAL(tty) _C_FLAG((tty), CLOCAL)
143#define C_CIBAUD(tty) _C_FLAG((tty), CIBAUD) 143#define C_CIBAUD(tty) _C_FLAG((tty), CIBAUD)
144#define C_CRTSCTS(tty) _C_FLAG((tty), CRTSCTS) 144#define C_CRTSCTS(tty) _C_FLAG((tty), CRTSCTS)
145#define C_CMSPAR(tty) _C_FLAG((tty), CMSPAR)
145 146
146#define L_ISIG(tty) _L_FLAG((tty), ISIG) 147#define L_ISIG(tty) _L_FLAG((tty), ISIG)
147#define L_ICANON(tty) _L_FLAG((tty), ICANON) 148#define L_ICANON(tty) _L_FLAG((tty), ICANON)
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 512ab162832c..c716da18c668 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -965,6 +965,7 @@ struct usb_dynid {
965}; 965};
966 966
967extern ssize_t usb_store_new_id(struct usb_dynids *dynids, 967extern ssize_t usb_store_new_id(struct usb_dynids *dynids,
968 const struct usb_device_id *id_table,
968 struct device_driver *driver, 969 struct device_driver *driver,
969 const char *buf, size_t count); 970 const char *buf, size_t count);
970 971
diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h
index 7d399671a566..708bd119627f 100644
--- a/include/linux/usb/chipidea.h
+++ b/include/linux/usb/chipidea.h
@@ -24,6 +24,7 @@ struct ci_hdrc_platform_data {
24 * but otg is not supported (no register otgsc). 24 * but otg is not supported (no register otgsc).
25 */ 25 */
26#define CI_HDRC_DUAL_ROLE_NOT_OTG BIT(4) 26#define CI_HDRC_DUAL_ROLE_NOT_OTG BIT(4)
27#define CI_HDRC_IMX28_WRITE_FIX BIT(5)
27 enum usb_dr_mode dr_mode; 28 enum usb_dr_mode dr_mode;
28#define CI_HDRC_CONTROLLER_RESET_EVENT 0 29#define CI_HDRC_CONTROLLER_RESET_EVENT 0
29#define CI_HDRC_CONTROLLER_STOPPED_EVENT 1 30#define CI_HDRC_CONTROLLER_STOPPED_EVENT 1
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index 5e61589fc166..dba63f53906c 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -468,6 +468,8 @@ struct usb_function_instance {
468 struct config_group group; 468 struct config_group group;
469 struct list_head cfs_list; 469 struct list_head cfs_list;
470 struct usb_function_driver *fd; 470 struct usb_function_driver *fd;
471 int (*set_inst_name)(struct usb_function_instance *inst,
472 const char *name);
471 void (*free_func_inst)(struct usb_function_instance *inst); 473 void (*free_func_inst)(struct usb_function_instance *inst);
472}; 474};
473 475
diff --git a/include/linux/usb/functionfs.h b/include/linux/usb/functionfs.h
index 65d0a88dbc67..71190663f1ee 100644
--- a/include/linux/usb/functionfs.h
+++ b/include/linux/usb/functionfs.h
@@ -3,34 +3,4 @@
3 3
4#include <uapi/linux/usb/functionfs.h> 4#include <uapi/linux/usb/functionfs.h>
5 5
6
7struct ffs_data;
8struct usb_composite_dev;
9struct usb_configuration;
10
11
12static int functionfs_init(void) __attribute__((warn_unused_result));
13static void functionfs_cleanup(void);
14
15static int functionfs_bind(struct ffs_data *ffs, struct usb_composite_dev *cdev)
16 __attribute__((warn_unused_result, nonnull));
17static void functionfs_unbind(struct ffs_data *ffs)
18 __attribute__((nonnull));
19
20static int functionfs_bind_config(struct usb_composite_dev *cdev,
21 struct usb_configuration *c,
22 struct ffs_data *ffs)
23 __attribute__((warn_unused_result, nonnull));
24
25
26static int functionfs_ready_callback(struct ffs_data *ffs)
27 __attribute__((warn_unused_result, nonnull));
28static void functionfs_closed_callback(struct ffs_data *ffs)
29 __attribute__((nonnull));
30static void *functionfs_acquire_dev_callback(const char *dev_name)
31 __attribute__((warn_unused_result, nonnull));
32static void functionfs_release_dev_callback(struct ffs_data *ffs_data)
33 __attribute__((nonnull));
34
35
36#endif 6#endif
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 942ef5e053bf..c3a61853cd13 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -148,6 +148,9 @@ struct usb_ep_ops {
148 * @maxpacket:The maximum packet size used on this endpoint. The initial 148 * @maxpacket:The maximum packet size used on this endpoint. The initial
149 * value can sometimes be reduced (hardware allowing), according to 149 * value can sometimes be reduced (hardware allowing), according to
150 * the endpoint descriptor used to configure the endpoint. 150 * the endpoint descriptor used to configure the endpoint.
151 * @maxpacket_limit:The maximum packet size value which can be handled by this
152 * endpoint. It's set once by UDC driver when endpoint is initialized, and
153 * should not be changed. Should not be confused with maxpacket.
151 * @max_streams: The maximum number of streams supported 154 * @max_streams: The maximum number of streams supported
152 * by this EP (0 - 16, actual number is 2^n) 155 * by this EP (0 - 16, actual number is 2^n)
153 * @mult: multiplier, 'mult' value for SS Isoc EPs 156 * @mult: multiplier, 'mult' value for SS Isoc EPs
@@ -171,6 +174,7 @@ struct usb_ep {
171 const struct usb_ep_ops *ops; 174 const struct usb_ep_ops *ops;
172 struct list_head ep_list; 175 struct list_head ep_list;
173 unsigned maxpacket:16; 176 unsigned maxpacket:16;
177 unsigned maxpacket_limit:16;
174 unsigned max_streams:16; 178 unsigned max_streams:16;
175 unsigned mult:2; 179 unsigned mult:2;
176 unsigned maxburst:5; 180 unsigned maxburst:5;
@@ -182,6 +186,21 @@ struct usb_ep {
182/*-------------------------------------------------------------------------*/ 186/*-------------------------------------------------------------------------*/
183 187
184/** 188/**
189 * usb_ep_set_maxpacket_limit - set maximum packet size limit for endpoint
190 * @ep:the endpoint being configured
191 * @maxpacket_limit:value of maximum packet size limit
192 *
193 * This function shoud be used only in UDC drivers to initialize endpoint
194 * (usually in probe function).
195 */
196static inline void usb_ep_set_maxpacket_limit(struct usb_ep *ep,
197 unsigned maxpacket_limit)
198{
199 ep->maxpacket_limit = maxpacket_limit;
200 ep->maxpacket = maxpacket_limit;
201}
202
203/**
185 * usb_ep_enable - configure endpoint, making it usable 204 * usb_ep_enable - configure endpoint, making it usable
186 * @ep:the endpoint being configured. may not be the endpoint named "ep0". 205 * @ep:the endpoint being configured. may not be the endpoint named "ep0".
187 * drivers discover endpoints through the ep_list of a usb_gadget. 206 * drivers discover endpoints through the ep_list of a usb_gadget.
@@ -485,6 +504,11 @@ struct usb_gadget_ops {
485 * @max_speed: Maximal speed the UDC can handle. UDC must support this 504 * @max_speed: Maximal speed the UDC can handle. UDC must support this
486 * and all slower speeds. 505 * and all slower speeds.
487 * @state: the state we are now (attached, suspended, configured, etc) 506 * @state: the state we are now (attached, suspended, configured, etc)
507 * @name: Identifies the controller hardware type. Used in diagnostics
508 * and sometimes configuration.
509 * @dev: Driver model state for this abstract device.
510 * @out_epnum: last used out ep number
511 * @in_epnum: last used in ep number
488 * @sg_supported: true if we can handle scatter-gather 512 * @sg_supported: true if we can handle scatter-gather
489 * @is_otg: True if the USB device port uses a Mini-AB jack, so that the 513 * @is_otg: True if the USB device port uses a Mini-AB jack, so that the
490 * gadget driver must provide a USB OTG descriptor. 514 * gadget driver must provide a USB OTG descriptor.
@@ -497,11 +521,8 @@ struct usb_gadget_ops {
497 * only supports HNP on a different root port. 521 * only supports HNP on a different root port.
498 * @b_hnp_enable: OTG device feature flag, indicating that the A-Host 522 * @b_hnp_enable: OTG device feature flag, indicating that the A-Host
499 * enabled HNP support. 523 * enabled HNP support.
500 * @name: Identifies the controller hardware type. Used in diagnostics 524 * @quirk_ep_out_aligned_size: epout requires buffer size to be aligned to
501 * and sometimes configuration. 525 * MaxPacketSize.
502 * @dev: Driver model state for this abstract device.
503 * @out_epnum: last used out ep number
504 * @in_epnum: last used in ep number
505 * 526 *
506 * Gadgets have a mostly-portable "gadget driver" implementing device 527 * Gadgets have a mostly-portable "gadget driver" implementing device
507 * functions, handling all usb configurations and interfaces. Gadget 528 * functions, handling all usb configurations and interfaces. Gadget
@@ -530,16 +551,18 @@ struct usb_gadget {
530 enum usb_device_speed speed; 551 enum usb_device_speed speed;
531 enum usb_device_speed max_speed; 552 enum usb_device_speed max_speed;
532 enum usb_device_state state; 553 enum usb_device_state state;
554 const char *name;
555 struct device dev;
556 unsigned out_epnum;
557 unsigned in_epnum;
558
533 unsigned sg_supported:1; 559 unsigned sg_supported:1;
534 unsigned is_otg:1; 560 unsigned is_otg:1;
535 unsigned is_a_peripheral:1; 561 unsigned is_a_peripheral:1;
536 unsigned b_hnp_enable:1; 562 unsigned b_hnp_enable:1;
537 unsigned a_hnp_support:1; 563 unsigned a_hnp_support:1;
538 unsigned a_alt_hnp_support:1; 564 unsigned a_alt_hnp_support:1;
539 const char *name; 565 unsigned quirk_ep_out_aligned_size:1;
540 struct device dev;
541 unsigned out_epnum;
542 unsigned in_epnum;
543}; 566};
544#define work_to_gadget(w) (container_of((w), struct usb_gadget, work)) 567#define work_to_gadget(w) (container_of((w), struct usb_gadget, work))
545 568
@@ -558,6 +581,23 @@ static inline struct usb_gadget *dev_to_usb_gadget(struct device *dev)
558 581
559 582
560/** 583/**
584 * usb_ep_align_maybe - returns @len aligned to ep's maxpacketsize if gadget
585 * requires quirk_ep_out_aligned_size, otherwise reguens len.
586 * @g: controller to check for quirk
587 * @ep: the endpoint whose maxpacketsize is used to align @len
588 * @len: buffer size's length to align to @ep's maxpacketsize
589 *
590 * This helper is used in case it's required for any reason to check and maybe
591 * align buffer's size to an ep's maxpacketsize.
592 */
593static inline size_t
594usb_ep_align_maybe(struct usb_gadget *g, struct usb_ep *ep, size_t len)
595{
596 return !g->quirk_ep_out_aligned_size ? len :
597 round_up(len, (size_t)ep->desc->wMaxPacketSize);
598}
599
600/**
561 * gadget_is_dualspeed - return true iff the hardware handles high speed 601 * gadget_is_dualspeed - return true iff the hardware handles high speed
562 * @g: controller that might support both high and full speeds 602 * @g: controller that might support both high and full speeds
563 */ 603 */
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
index b8aba196f7f1..efe8d8a7c7ad 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -134,6 +134,7 @@ struct usb_hcd {
134 unsigned rh_registered:1;/* is root hub registered? */ 134 unsigned rh_registered:1;/* is root hub registered? */
135 unsigned rh_pollable:1; /* may we poll the root hub? */ 135 unsigned rh_pollable:1; /* may we poll the root hub? */
136 unsigned msix_enabled:1; /* driver has MSI-X enabled? */ 136 unsigned msix_enabled:1; /* driver has MSI-X enabled? */
137 unsigned remove_phy:1; /* auto-remove USB phy */
137 138
138 /* The next flag is a stopgap, to be removed when all the HCDs 139 /* The next flag is a stopgap, to be removed when all the HCDs
139 * support the new root-hub polling mechanism. */ 140 * support the new root-hub polling mechanism. */
@@ -352,6 +353,8 @@ struct hc_driver {
352 void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *); 353 void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *);
353 /* Returns the hardware-chosen device address */ 354 /* Returns the hardware-chosen device address */
354 int (*address_device)(struct usb_hcd *, struct usb_device *udev); 355 int (*address_device)(struct usb_hcd *, struct usb_device *udev);
356 /* prepares the hardware to send commands to the device */
357 int (*enable_device)(struct usb_hcd *, struct usb_device *udev);
355 /* Notifies the HCD after a hub descriptor is fetched. 358 /* Notifies the HCD after a hub descriptor is fetched.
356 * Will block. 359 * Will block.
357 */ 360 */
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h
index eb505250940a..a4ee1b582183 100644
--- a/include/linux/usb/musb.h
+++ b/include/linux/usb/musb.h
@@ -76,6 +76,9 @@ struct musb_hdrc_config {
76 unsigned dma:1 __deprecated; /* supports DMA */ 76 unsigned dma:1 __deprecated; /* supports DMA */
77 unsigned vendor_req:1 __deprecated; /* vendor registers required */ 77 unsigned vendor_req:1 __deprecated; /* vendor registers required */
78 78
79 /* need to explicitly de-assert the port reset after resume? */
80 unsigned host_port_deassert_reset_at_resume:1;
81
79 u8 num_eps; /* number of endpoints _with_ ep0 */ 82 u8 num_eps; /* number of endpoints _with_ ep0 */
80 u8 dma_channels __deprecated; /* number of dma channels */ 83 u8 dma_channels __deprecated; /* number of dma channels */
81 u8 dyn_fifo_size; /* dynamic size in bytes */ 84 u8 dyn_fifo_size; /* dynamic size in bytes */
diff --git a/include/linux/usb/omap_control_usb.h b/include/linux/usb/omap_control_usb.h
index 596b01918813..69ae383ee3cc 100644
--- a/include/linux/usb/omap_control_usb.h
+++ b/include/linux/usb/omap_control_usb.h
@@ -24,6 +24,7 @@ enum omap_control_usb_type {
24 OMAP_CTRL_TYPE_USB2, /* USB2_PHY, power down in CONTROL_DEV_CONF */ 24 OMAP_CTRL_TYPE_USB2, /* USB2_PHY, power down in CONTROL_DEV_CONF */
25 OMAP_CTRL_TYPE_PIPE3, /* PIPE3 PHY, DPLL & seperate Rx/Tx power */ 25 OMAP_CTRL_TYPE_PIPE3, /* PIPE3 PHY, DPLL & seperate Rx/Tx power */
26 OMAP_CTRL_TYPE_DRA7USB2, /* USB2 PHY, power and power_aux e.g. DRA7 */ 26 OMAP_CTRL_TYPE_DRA7USB2, /* USB2 PHY, power and power_aux e.g. DRA7 */
27 OMAP_CTRL_TYPE_AM437USB2, /* USB2 PHY, power e.g. AM437x */
27}; 28};
28 29
29struct omap_control_usb { 30struct omap_control_usb {
@@ -64,6 +65,11 @@ enum omap_control_usb_mode {
64 65
65#define OMAP_CTRL_USB2_PHY_PD BIT(28) 66#define OMAP_CTRL_USB2_PHY_PD BIT(28)
66 67
68#define AM437X_CTRL_USB2_PHY_PD BIT(0)
69#define AM437X_CTRL_USB2_OTG_PD BIT(1)
70#define AM437X_CTRL_USB2_OTGVDET_EN BIT(19)
71#define AM437X_CTRL_USB2_OTGSESSEND_EN BIT(20)
72
67#if IS_ENABLED(CONFIG_OMAP_CONTROL_USB) 73#if IS_ENABLED(CONFIG_OMAP_CONTROL_USB)
68extern void omap_control_usb_phy_power(struct device *dev, int on); 74extern void omap_control_usb_phy_power(struct device *dev, int on);
69extern void omap_control_usb_set_mode(struct device *dev, 75extern void omap_control_usb_set_mode(struct device *dev,
diff --git a/drivers/usb/phy/phy-fsm-usb.h b/include/linux/usb/otg-fsm.h
index 7441b46a27f1..b6ba1bfb86f2 100644
--- a/drivers/usb/phy/phy-fsm-usb.h
+++ b/include/linux/usb/otg-fsm.h
@@ -15,6 +15,12 @@
15 * 675 Mass Ave, Cambridge, MA 02139, USA. 15 * 675 Mass Ave, Cambridge, MA 02139, USA.
16 */ 16 */
17 17
18#ifndef __LINUX_USB_OTG_FSM_H
19#define __LINUX_USB_OTG_FSM_H
20
21#include <linux/mutex.h>
22#include <linux/errno.h>
23
18#undef VERBOSE 24#undef VERBOSE
19 25
20#ifdef VERBOSE 26#ifdef VERBOSE
@@ -110,7 +116,7 @@ struct otg_fsm {
110 116
111 /* Current usb protocol used: 0:undefine; 1:host; 2:client */ 117 /* Current usb protocol used: 0:undefine; 1:host; 2:client */
112 int protocol; 118 int protocol;
113 spinlock_t lock; 119 struct mutex lock;
114}; 120};
115 121
116struct otg_fsm_ops { 122struct otg_fsm_ops {
@@ -234,3 +240,5 @@ static inline int otg_start_gadget(struct otg_fsm *fsm, int on)
234} 240}
235 241
236int otg_statemachine(struct otg_fsm *fsm); 242int otg_statemachine(struct otg_fsm *fsm);
243
244#endif /* __LINUX_USB_OTG_FSM_H */
diff --git a/include/linux/uwb/umc.h b/include/linux/uwb/umc.h
index 891d1d5f3947..ba82f03d8287 100644
--- a/include/linux/uwb/umc.h
+++ b/include/linux/uwb/umc.h
@@ -143,7 +143,7 @@ int umc_match_pci_id(struct umc_driver *umc_drv, struct umc_dev *umc);
143static inline struct pci_dev *umc_parent_pci_dev(struct umc_dev *umc_dev) 143static inline struct pci_dev *umc_parent_pci_dev(struct umc_dev *umc_dev)
144{ 144{
145 struct pci_dev *pci_dev = NULL; 145 struct pci_dev *pci_dev = NULL;
146 if (umc_dev->dev.parent->bus == &pci_bus_type) 146 if (dev_is_pci(umc_dev->dev.parent))
147 pci_dev = to_pci_dev(umc_dev->dev.parent); 147 pci_dev = to_pci_dev(umc_dev->dev.parent);
148 return pci_dev; 148 return pci_dev;
149} 149}
diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index d16fa295ae1d..3a8e8e8fb2a5 100644
--- a/lib/scatterlist.c
+++ b/lib/scatterlist.c
@@ -495,7 +495,7 @@ static bool sg_miter_get_next_page(struct sg_mapping_iter *miter)
495 * true if @miter contains the valid mapping. false if end of sg 495 * true if @miter contains the valid mapping. false if end of sg
496 * list is reached. 496 * list is reached.
497 */ 497 */
498static bool sg_miter_skip(struct sg_mapping_iter *miter, off_t offset) 498bool sg_miter_skip(struct sg_mapping_iter *miter, off_t offset)
499{ 499{
500 sg_miter_stop(miter); 500 sg_miter_stop(miter);
501 501
@@ -513,6 +513,7 @@ static bool sg_miter_skip(struct sg_mapping_iter *miter, off_t offset)
513 513
514 return true; 514 return true;
515} 515}
516EXPORT_SYMBOL(sg_miter_skip);
516 517
517/** 518/**
518 * sg_miter_next - proceed mapping iterator to the next mapping 519 * sg_miter_next - proceed mapping iterator to the next mapping