1 /* $NetBSD: uipaq.c,v 1.4 2006/11/16 01:33:27 christos Exp $ */ 2 /* $OpenBSD: uipaq.c,v 1.1 2005/06/17 23:50:33 deraadt Exp $ */ 3 4 /* 5 * Copyright (c) 2000-2005 The NetBSD Foundation, Inc. 6 * All rights reserved. 7 * 8 * This code is derived from software contributed to The NetBSD Foundation 9 * by Lennart Augustsson (lennart@augustsson.net) at 10 * Carlstedt Research & Technology. 11 * 12 * Redistribution and use in source and binary forms, with or without 13 * modification, are permitted provided that the following conditions 14 * are met: 15 * 1. Redistributions of source code must retain the above copyright 16 * notice, this list of conditions and the following disclaimer. 17 * 2. Redistributions in binary form must reproduce the above copyright 18 * notice, this list of conditions and the following disclaimer in the 19 * documentation and/or other materials provided with the distribution. 20 * 3. All advertising materials mentioning features or use of this software 21 * must display the following acknowledgement: 22 * This product includes software developed by the NetBSD 23 * Foundation, Inc. and its contributors. 24 * 4. Neither the name of The NetBSD Foundation nor the names of its 25 * contributors may be used to endorse or promote products derived 26 * from this software without specific prior written permission. 27 * 28 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 29 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 30 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 31 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 32 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 33 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 34 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 35 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 36 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 37 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 * POSSIBILITY OF SUCH DAMAGE. 39 */ 40 41 /* 42 * iPAQ driver 43 * 44 * 19 July 2003: Incorporated changes suggested by Sam Lawrance from 45 * the uppc module 46 * 47 * 48 * Contact isis@cs.umd.edu if you have any questions/comments about this driver 49 */ 50 51 #include <sys/cdefs.h> 52 __FBSDID("$FreeBSD$"); 53 54 #include "usbdevs.h" 55 #include <dev/usb/usb.h> 56 #include <dev/usb/usb_mfunc.h> 57 #include <dev/usb/usb_error.h> 58 #include <dev/usb/usb_cdc.h> 59 60 #define USB_DEBUG_VAR usb2_debug 61 62 #include <dev/usb/usb_core.h> 63 #include <dev/usb/usb_debug.h> 64 #include <dev/usb/usb_process.h> 65 #include <dev/usb/usb_request.h> 66 #include <dev/usb/usb_lookup.h> 67 #include <dev/usb/usb_util.h> 68 #include <dev/usb/usb_busdma.h> 69 70 #include <dev/usb/serial/usb_serial.h> 71 72 #define UIPAQ_CONFIG_INDEX 0 /* config number 1 */ 73 #define UIPAQ_IFACE_INDEX 0 74 75 #define UIPAQ_BUF_SIZE 1024 76 77 enum { 78 UIPAQ_BULK_DT_WR, 79 UIPAQ_BULK_DT_RD, 80 UIPAQ_N_TRANSFER, 81 }; 82 83 struct uipaq_softc { 84 struct usb2_com_super_softc sc_super_ucom; 85 struct usb2_com_softc sc_ucom; 86 87 struct usb2_xfer *sc_xfer[UIPAQ_N_TRANSFER]; 88 struct usb2_device *sc_udev; 89 90 uint16_t sc_line; 91 92 uint8_t sc_lsr; /* local status register */ 93 uint8_t sc_msr; /* modem status register */ 94 }; 95 96 static device_probe_t uipaq_probe; 97 static device_attach_t uipaq_attach; 98 static device_detach_t uipaq_detach; 99 100 static usb2_callback_t uipaq_write_callback; 101 static usb2_callback_t uipaq_read_callback; 102 103 static void uipaq_start_read(struct usb2_com_softc *); 104 static void uipaq_stop_read(struct usb2_com_softc *); 105 static void uipaq_start_write(struct usb2_com_softc *); 106 static void uipaq_stop_write(struct usb2_com_softc *); 107 static void uipaq_cfg_set_dtr(struct usb2_com_softc *, uint8_t); 108 static void uipaq_cfg_set_rts(struct usb2_com_softc *, uint8_t); 109 static void uipaq_cfg_set_break(struct usb2_com_softc *, uint8_t); 110 111 static const struct usb2_config uipaq_config_data[UIPAQ_N_TRANSFER] = { 112 113 [UIPAQ_BULK_DT_WR] = { 114 .type = UE_BULK, 115 .endpoint = UE_ADDR_ANY, 116 .direction = UE_DIR_OUT, 117 .mh.bufsize = UIPAQ_BUF_SIZE, 118 .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,}, 119 .mh.callback = &uipaq_write_callback, 120 }, 121 122 [UIPAQ_BULK_DT_RD] = { 123 .type = UE_BULK, 124 .endpoint = UE_ADDR_ANY, 125 .direction = UE_DIR_IN, 126 .mh.bufsize = UIPAQ_BUF_SIZE, 127 .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, 128 .mh.callback = &uipaq_read_callback, 129 }, 130 }; 131 132 static const struct usb2_com_callback uipaq_callback = { 133 .usb2_com_cfg_set_dtr = &uipaq_cfg_set_dtr, 134 .usb2_com_cfg_set_rts = &uipaq_cfg_set_rts, 135 .usb2_com_cfg_set_break = &uipaq_cfg_set_break, 136 .usb2_com_start_read = &uipaq_start_read, 137 .usb2_com_stop_read = &uipaq_stop_read, 138 .usb2_com_start_write = &uipaq_start_write, 139 .usb2_com_stop_write = &uipaq_stop_write, 140 }; 141 142 /* 143 * Much of this list is generated from lists of other drivers that 144 * support the same hardware. Numeric values are used where no usbdevs 145 * entries exist. 146 */ 147 static const struct usb2_device_id uipaq_devs[] = { 148 /* Socket USB Sync */ 149 {USB_VPI(0x0104, 0x00be, 0)}, 150 /* USB Sync 0301 */ 151 {USB_VPI(0x04ad, 0x0301, 0)}, 152 /* USB Sync 0302 */ 153 {USB_VPI(0x04ad, 0x0302, 0)}, 154 /* USB Sync 0303 */ 155 {USB_VPI(0x04ad, 0x0303, 0)}, 156 /* GPS Pocket PC USB Sync */ 157 {USB_VPI(0x04ad, 0x0306, 0)}, 158 /* HHP PDT */ 159 {USB_VPI(0x0536, 0x01a0, 0)}, 160 /* Intermec Mobile Computer */ 161 {USB_VPI(0x067e, 0x1001, 0)}, 162 /* Linkup Systems USB Sync */ 163 {USB_VPI(0x094b, 0x0001, 0)}, 164 /* BCOM USB Sync 0065 */ 165 {USB_VPI(0x0960, 0x0065, 0)}, 166 /* BCOM USB Sync 0066 */ 167 {USB_VPI(0x0960, 0x0066, 0)}, 168 /* BCOM USB Sync 0067 */ 169 {USB_VPI(0x0960, 0x0067, 0)}, 170 /* Portatec USB Sync */ 171 {USB_VPI(0x0961, 0x0010, 0)}, 172 /* Trimble GeoExplorer */ 173 {USB_VPI(0x099e, 0x0052, 0)}, 174 /* TDS Data Collector */ 175 {USB_VPI(0x099e, 0x4000, 0)}, 176 /* Motorola iDEN Smartphone */ 177 {USB_VPI(0x0c44, 0x03a2, 0)}, 178 /* Cesscom Luxian Series */ 179 {USB_VPI(0x0c8e, 0x6000, 0)}, 180 /* Motorola PowerPad Pocket PCDevice */ 181 {USB_VPI(0x0cad, 0x9001, 0)}, 182 /* Freedom Scientific USB Sync */ 183 {USB_VPI(0x0f4e, 0x0200, 0)}, 184 /* Cyberbank USB Sync */ 185 {USB_VPI(0x0f98, 0x0201, 0)}, 186 /* Wistron USB Sync */ 187 {USB_VPI(0x0fb8, 0x3001, 0)}, 188 /* Wistron USB Sync */ 189 {USB_VPI(0x0fb8, 0x3002, 0)}, 190 /* Wistron USB Sync */ 191 {USB_VPI(0x0fb8, 0x3003, 0)}, 192 /* Wistron USB Sync */ 193 {USB_VPI(0x0fb8, 0x4001, 0)}, 194 /* E-TEN USB Sync */ 195 {USB_VPI(0x1066, 0x00ce, 0)}, 196 /* E-TEN P3XX Pocket PC */ 197 {USB_VPI(0x1066, 0x0300, 0)}, 198 /* E-TEN P5XX Pocket PC */ 199 {USB_VPI(0x1066, 0x0500, 0)}, 200 /* E-TEN P6XX Pocket PC */ 201 {USB_VPI(0x1066, 0x0600, 0)}, 202 /* E-TEN P7XX Pocket PC */ 203 {USB_VPI(0x1066, 0x0700, 0)}, 204 /* Psion Teklogix Sync 753x */ 205 {USB_VPI(0x1114, 0x0001, 0)}, 206 /* Psion Teklogix Sync netBookPro */ 207 {USB_VPI(0x1114, 0x0004, 0)}, 208 /* Psion Teklogix Sync 7525 */ 209 {USB_VPI(0x1114, 0x0006, 0)}, 210 /* VES USB Sync */ 211 {USB_VPI(0x1182, 0x1388, 0)}, 212 /* Rugged Pocket PC 2003 */ 213 {USB_VPI(0x11d9, 0x1002, 0)}, 214 /* Rugged Pocket PC 2003 */ 215 {USB_VPI(0x11d9, 0x1003, 0)}, 216 /* USB Sync 03 */ 217 {USB_VPI(0x1231, 0xce01, 0)}, 218 /* USB Sync 03 */ 219 {USB_VPI(0x1231, 0xce02, 0)}, 220 /* Mio DigiWalker PPC StrongARM */ 221 {USB_VPI(0x3340, 0x011c, 0)}, 222 /* Mio DigiWalker 338 */ 223 {USB_VPI(0x3340, 0x0326, 0)}, 224 /* Mio DigiWalker 338 */ 225 {USB_VPI(0x3340, 0x0426, 0)}, 226 /* Mio DigiWalker USB Sync */ 227 {USB_VPI(0x3340, 0x043a, 0)}, 228 /* MiTAC USB Sync 528 */ 229 {USB_VPI(0x3340, 0x051c, 0)}, 230 /* Mio DigiWalker SmartPhone USB Sync */ 231 {USB_VPI(0x3340, 0x053a, 0)}, 232 /* MiTAC USB Sync */ 233 {USB_VPI(0x3340, 0x071c, 0)}, 234 /* Generic PPC StrongARM */ 235 {USB_VPI(0x3340, 0x0b1c, 0)}, 236 /* Generic PPC USB Sync */ 237 {USB_VPI(0x3340, 0x0e3a, 0)}, 238 /* Itautec USB Sync */ 239 {USB_VPI(0x3340, 0x0f1c, 0)}, 240 /* Generic SmartPhone USB Sync */ 241 {USB_VPI(0x3340, 0x0f3a, 0)}, 242 /* Itautec USB Sync */ 243 {USB_VPI(0x3340, 0x1326, 0)}, 244 /* YAKUMO USB Sync */ 245 {USB_VPI(0x3340, 0x191c, 0)}, 246 /* Vobis USB Sync */ 247 {USB_VPI(0x3340, 0x2326, 0)}, 248 /* MEDION Winodws Moble USB Sync */ 249 {USB_VPI(0x3340, 0x3326, 0)}, 250 /* Legend USB Sync */ 251 {USB_VPI(0x3708, 0x20ce, 0)}, 252 /* Lenovo USB Sync */ 253 {USB_VPI(0x3708, 0x21ce, 0)}, 254 /* Mobile Media Technology USB Sync */ 255 {USB_VPI(0x4113, 0x0210, 0)}, 256 /* Mobile Media Technology USB Sync */ 257 {USB_VPI(0x4113, 0x0211, 0)}, 258 /* Mobile Media Technology USB Sync */ 259 {USB_VPI(0x4113, 0x0400, 0)}, 260 /* Mobile Media Technology USB Sync */ 261 {USB_VPI(0x4113, 0x0410, 0)}, 262 /* Smartphone */ 263 {USB_VPI(0x4505, 0x0010, 0)}, 264 /* SAGEM Wireless Assistant */ 265 {USB_VPI(0x5e04, 0xce00, 0)}, 266 /* c10 Series */ 267 {USB_VPI(USB_VENDOR_ACER, 0x1631, 0)}, 268 /* c20 Series */ 269 {USB_VPI(USB_VENDOR_ACER, 0x1632, 0)}, 270 /* Acer n10 Handheld USB Sync */ 271 {USB_VPI(USB_VENDOR_ACER, 0x16e1, 0)}, 272 /* Acer n20 Handheld USB Sync */ 273 {USB_VPI(USB_VENDOR_ACER, 0x16e2, 0)}, 274 /* Acer n30 Handheld USB Sync */ 275 {USB_VPI(USB_VENDOR_ACER, 0x16e3, 0)}, 276 /* ASUS USB Sync */ 277 {USB_VPI(USB_VENDOR_ASUS, 0x4200, 0)}, 278 /* ASUS USB Sync */ 279 {USB_VPI(USB_VENDOR_ASUS, 0x4201, 0)}, 280 /* ASUS USB Sync */ 281 {USB_VPI(USB_VENDOR_ASUS, 0x4202, 0)}, 282 /* ASUS USB Sync */ 283 {USB_VPI(USB_VENDOR_ASUS, 0x9200, 0)}, 284 /* ASUS USB Sync */ 285 {USB_VPI(USB_VENDOR_ASUS, 0x9202, 0)}, 286 /**/ 287 {USB_VPI(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_P535, 0)}, 288 /* CASIO USB Sync 2001 */ 289 {USB_VPI(USB_VENDOR_CASIO, 0x2001, 0)}, 290 /* CASIO USB Sync 2003 */ 291 {USB_VPI(USB_VENDOR_CASIO, 0x2003, 0)}, 292 /**/ 293 {USB_VPI(USB_VENDOR_CASIO, USB_PRODUCT_CASIO_BE300, 0)}, 294 /* MyGuide 7000 XL USB Sync */ 295 {USB_VPI(USB_VENDOR_COMPAL, 0x0531, 0)}, 296 /* Compaq iPAQ USB Sync */ 297 {USB_VPI(USB_VENDOR_COMPAQ, 0x0032, 0)}, 298 /**/ 299 {USB_VPI(USB_VENDOR_COMPAQ, USB_PRODUCT_COMPAQ_IPAQPOCKETPC, 0)}, 300 /* Dell Axim USB Sync */ 301 {USB_VPI(USB_VENDOR_DELL, 0x4001, 0)}, 302 /* Dell Axim USB Sync */ 303 {USB_VPI(USB_VENDOR_DELL, 0x4002, 0)}, 304 /* Dell Axim USB Sync */ 305 {USB_VPI(USB_VENDOR_DELL, 0x4003, 0)}, 306 /* Dell Axim USB Sync */ 307 {USB_VPI(USB_VENDOR_DELL, 0x4004, 0)}, 308 /* Dell Axim USB Sync */ 309 {USB_VPI(USB_VENDOR_DELL, 0x4005, 0)}, 310 /* Dell Axim USB Sync */ 311 {USB_VPI(USB_VENDOR_DELL, 0x4006, 0)}, 312 /* Dell Axim USB Sync */ 313 {USB_VPI(USB_VENDOR_DELL, 0x4007, 0)}, 314 /* Dell Axim USB Sync */ 315 {USB_VPI(USB_VENDOR_DELL, 0x4008, 0)}, 316 /* Dell Axim USB Sync */ 317 {USB_VPI(USB_VENDOR_DELL, 0x4009, 0)}, 318 /* Fujitsu Siemens Computers USB Sync */ 319 {USB_VPI(USB_VENDOR_FSC, 0x1001, 0)}, 320 /* FUJITSU USB Sync */ 321 {USB_VPI(USB_VENDOR_FUJITSU, 0x1058, 0)}, 322 /* FUJITSU USB Sync */ 323 {USB_VPI(USB_VENDOR_FUJITSU, 0x1079, 0)}, 324 /* Askey USB Sync */ 325 {USB_VPI(USB_VENDOR_GIGASET, 0x0601, 0)}, 326 /* Hitachi USB Sync */ 327 {USB_VPI(USB_VENDOR_HITACHI, 0x0014, 0)}, 328 /* HP USB Sync 1612 */ 329 {USB_VPI(USB_VENDOR_HP, 0x1216, 0)}, 330 /* HP USB Sync 1620 */ 331 {USB_VPI(USB_VENDOR_HP, 0x2016, 0)}, 332 /* HP USB Sync 1621 */ 333 {USB_VPI(USB_VENDOR_HP, 0x2116, 0)}, 334 /* HP USB Sync 1622 */ 335 {USB_VPI(USB_VENDOR_HP, 0x2216, 0)}, 336 /* HP USB Sync 1630 */ 337 {USB_VPI(USB_VENDOR_HP, 0x3016, 0)}, 338 /* HP USB Sync 1631 */ 339 {USB_VPI(USB_VENDOR_HP, 0x3116, 0)}, 340 /* HP USB Sync 1632 */ 341 {USB_VPI(USB_VENDOR_HP, 0x3216, 0)}, 342 /* HP USB Sync 1640 */ 343 {USB_VPI(USB_VENDOR_HP, 0x4016, 0)}, 344 /* HP USB Sync 1641 */ 345 {USB_VPI(USB_VENDOR_HP, 0x4116, 0)}, 346 /* HP USB Sync 1642 */ 347 {USB_VPI(USB_VENDOR_HP, 0x4216, 0)}, 348 /* HP USB Sync 1650 */ 349 {USB_VPI(USB_VENDOR_HP, 0x5016, 0)}, 350 /* HP USB Sync 1651 */ 351 {USB_VPI(USB_VENDOR_HP, 0x5116, 0)}, 352 /* HP USB Sync 1652 */ 353 {USB_VPI(USB_VENDOR_HP, 0x5216, 0)}, 354 /**/ 355 {USB_VPI(USB_VENDOR_HP, USB_PRODUCT_HP_2215, 0)}, 356 /**/ 357 {USB_VPI(USB_VENDOR_HP, USB_PRODUCT_HP_568J, 0)}, 358 /* HTC USB Modem */ 359 {USB_VPI(USB_VENDOR_HTC, 0x00cf, 0)}, 360 /* PocketPC USB Sync */ 361 {USB_VPI(USB_VENDOR_HTC, 0x0a01, 0)}, 362 /* PocketPC USB Sync */ 363 {USB_VPI(USB_VENDOR_HTC, 0x0a02, 0)}, 364 /* PocketPC USB Sync */ 365 {USB_VPI(USB_VENDOR_HTC, 0x0a03, 0)}, 366 /* PocketPC USB Sync */ 367 {USB_VPI(USB_VENDOR_HTC, 0x0a04, 0)}, 368 /* PocketPC USB Sync */ 369 {USB_VPI(USB_VENDOR_HTC, 0x0a05, 0)}, 370 /* PocketPC USB Sync */ 371 {USB_VPI(USB_VENDOR_HTC, 0x0a06, 0)}, 372 /* PocketPC USB Sync */ 373 {USB_VPI(USB_VENDOR_HTC, 0x0a07, 0)}, 374 /* PocketPC USB Sync */ 375 {USB_VPI(USB_VENDOR_HTC, 0x0a08, 0)}, 376 /* PocketPC USB Sync */ 377 {USB_VPI(USB_VENDOR_HTC, 0x0a09, 0)}, 378 /* PocketPC USB Sync */ 379 {USB_VPI(USB_VENDOR_HTC, 0x0a0a, 0)}, 380 /* PocketPC USB Sync */ 381 {USB_VPI(USB_VENDOR_HTC, 0x0a0b, 0)}, 382 /* PocketPC USB Sync */ 383 {USB_VPI(USB_VENDOR_HTC, 0x0a0c, 0)}, 384 /* PocketPC USB Sync */ 385 {USB_VPI(USB_VENDOR_HTC, 0x0a0d, 0)}, 386 /* PocketPC USB Sync */ 387 {USB_VPI(USB_VENDOR_HTC, 0x0a0e, 0)}, 388 /* PocketPC USB Sync */ 389 {USB_VPI(USB_VENDOR_HTC, 0x0a0f, 0)}, 390 /* PocketPC USB Sync */ 391 {USB_VPI(USB_VENDOR_HTC, 0x0a10, 0)}, 392 /* PocketPC USB Sync */ 393 {USB_VPI(USB_VENDOR_HTC, 0x0a11, 0)}, 394 /* PocketPC USB Sync */ 395 {USB_VPI(USB_VENDOR_HTC, 0x0a12, 0)}, 396 /* PocketPC USB Sync */ 397 {USB_VPI(USB_VENDOR_HTC, 0x0a13, 0)}, 398 /* PocketPC USB Sync */ 399 {USB_VPI(USB_VENDOR_HTC, 0x0a14, 0)}, 400 /* PocketPC USB Sync */ 401 {USB_VPI(USB_VENDOR_HTC, 0x0a15, 0)}, 402 /* PocketPC USB Sync */ 403 {USB_VPI(USB_VENDOR_HTC, 0x0a16, 0)}, 404 /* PocketPC USB Sync */ 405 {USB_VPI(USB_VENDOR_HTC, 0x0a17, 0)}, 406 /* PocketPC USB Sync */ 407 {USB_VPI(USB_VENDOR_HTC, 0x0a18, 0)}, 408 /* PocketPC USB Sync */ 409 {USB_VPI(USB_VENDOR_HTC, 0x0a19, 0)}, 410 /* PocketPC USB Sync */ 411 {USB_VPI(USB_VENDOR_HTC, 0x0a1a, 0)}, 412 /* PocketPC USB Sync */ 413 {USB_VPI(USB_VENDOR_HTC, 0x0a1b, 0)}, 414 /* PocketPC USB Sync */ 415 {USB_VPI(USB_VENDOR_HTC, 0x0a1c, 0)}, 416 /* PocketPC USB Sync */ 417 {USB_VPI(USB_VENDOR_HTC, 0x0a1d, 0)}, 418 /* PocketPC USB Sync */ 419 {USB_VPI(USB_VENDOR_HTC, 0x0a1e, 0)}, 420 /* PocketPC USB Sync */ 421 {USB_VPI(USB_VENDOR_HTC, 0x0a1f, 0)}, 422 /* PocketPC USB Sync */ 423 {USB_VPI(USB_VENDOR_HTC, 0x0a20, 0)}, 424 /* PocketPC USB Sync */ 425 {USB_VPI(USB_VENDOR_HTC, 0x0a21, 0)}, 426 /* PocketPC USB Sync */ 427 {USB_VPI(USB_VENDOR_HTC, 0x0a22, 0)}, 428 /* PocketPC USB Sync */ 429 {USB_VPI(USB_VENDOR_HTC, 0x0a23, 0)}, 430 /* PocketPC USB Sync */ 431 {USB_VPI(USB_VENDOR_HTC, 0x0a24, 0)}, 432 /* PocketPC USB Sync */ 433 {USB_VPI(USB_VENDOR_HTC, 0x0a25, 0)}, 434 /* PocketPC USB Sync */ 435 {USB_VPI(USB_VENDOR_HTC, 0x0a26, 0)}, 436 /* PocketPC USB Sync */ 437 {USB_VPI(USB_VENDOR_HTC, 0x0a27, 0)}, 438 /* PocketPC USB Sync */ 439 {USB_VPI(USB_VENDOR_HTC, 0x0a28, 0)}, 440 /* PocketPC USB Sync */ 441 {USB_VPI(USB_VENDOR_HTC, 0x0a29, 0)}, 442 /* PocketPC USB Sync */ 443 {USB_VPI(USB_VENDOR_HTC, 0x0a2a, 0)}, 444 /* PocketPC USB Sync */ 445 {USB_VPI(USB_VENDOR_HTC, 0x0a2b, 0)}, 446 /* PocketPC USB Sync */ 447 {USB_VPI(USB_VENDOR_HTC, 0x0a2c, 0)}, 448 /* PocketPC USB Sync */ 449 {USB_VPI(USB_VENDOR_HTC, 0x0a2d, 0)}, 450 /* PocketPC USB Sync */ 451 {USB_VPI(USB_VENDOR_HTC, 0x0a2e, 0)}, 452 /* PocketPC USB Sync */ 453 {USB_VPI(USB_VENDOR_HTC, 0x0a2f, 0)}, 454 /* PocketPC USB Sync */ 455 {USB_VPI(USB_VENDOR_HTC, 0x0a30, 0)}, 456 /* PocketPC USB Sync */ 457 {USB_VPI(USB_VENDOR_HTC, 0x0a31, 0)}, 458 /* PocketPC USB Sync */ 459 {USB_VPI(USB_VENDOR_HTC, 0x0a32, 0)}, 460 /* PocketPC USB Sync */ 461 {USB_VPI(USB_VENDOR_HTC, 0x0a33, 0)}, 462 /* PocketPC USB Sync */ 463 {USB_VPI(USB_VENDOR_HTC, 0x0a34, 0)}, 464 /* PocketPC USB Sync */ 465 {USB_VPI(USB_VENDOR_HTC, 0x0a35, 0)}, 466 /* PocketPC USB Sync */ 467 {USB_VPI(USB_VENDOR_HTC, 0x0a36, 0)}, 468 /* PocketPC USB Sync */ 469 {USB_VPI(USB_VENDOR_HTC, 0x0a37, 0)}, 470 /* PocketPC USB Sync */ 471 {USB_VPI(USB_VENDOR_HTC, 0x0a38, 0)}, 472 /* PocketPC USB Sync */ 473 {USB_VPI(USB_VENDOR_HTC, 0x0a39, 0)}, 474 /* PocketPC USB Sync */ 475 {USB_VPI(USB_VENDOR_HTC, 0x0a3a, 0)}, 476 /* PocketPC USB Sync */ 477 {USB_VPI(USB_VENDOR_HTC, 0x0a3b, 0)}, 478 /* PocketPC USB Sync */ 479 {USB_VPI(USB_VENDOR_HTC, 0x0a3c, 0)}, 480 /* PocketPC USB Sync */ 481 {USB_VPI(USB_VENDOR_HTC, 0x0a3d, 0)}, 482 /* PocketPC USB Sync */ 483 {USB_VPI(USB_VENDOR_HTC, 0x0a3e, 0)}, 484 /* PocketPC USB Sync */ 485 {USB_VPI(USB_VENDOR_HTC, 0x0a3f, 0)}, 486 /* PocketPC USB Sync */ 487 {USB_VPI(USB_VENDOR_HTC, 0x0a40, 0)}, 488 /* PocketPC USB Sync */ 489 {USB_VPI(USB_VENDOR_HTC, 0x0a41, 0)}, 490 /* PocketPC USB Sync */ 491 {USB_VPI(USB_VENDOR_HTC, 0x0a42, 0)}, 492 /* PocketPC USB Sync */ 493 {USB_VPI(USB_VENDOR_HTC, 0x0a43, 0)}, 494 /* PocketPC USB Sync */ 495 {USB_VPI(USB_VENDOR_HTC, 0x0a44, 0)}, 496 /* PocketPC USB Sync */ 497 {USB_VPI(USB_VENDOR_HTC, 0x0a45, 0)}, 498 /* PocketPC USB Sync */ 499 {USB_VPI(USB_VENDOR_HTC, 0x0a46, 0)}, 500 /* PocketPC USB Sync */ 501 {USB_VPI(USB_VENDOR_HTC, 0x0a47, 0)}, 502 /* PocketPC USB Sync */ 503 {USB_VPI(USB_VENDOR_HTC, 0x0a48, 0)}, 504 /* PocketPC USB Sync */ 505 {USB_VPI(USB_VENDOR_HTC, 0x0a49, 0)}, 506 /* PocketPC USB Sync */ 507 {USB_VPI(USB_VENDOR_HTC, 0x0a4a, 0)}, 508 /* PocketPC USB Sync */ 509 {USB_VPI(USB_VENDOR_HTC, 0x0a4b, 0)}, 510 /* PocketPC USB Sync */ 511 {USB_VPI(USB_VENDOR_HTC, 0x0a4c, 0)}, 512 /* PocketPC USB Sync */ 513 {USB_VPI(USB_VENDOR_HTC, 0x0a4d, 0)}, 514 /* PocketPC USB Sync */ 515 {USB_VPI(USB_VENDOR_HTC, 0x0a4e, 0)}, 516 /* PocketPC USB Sync */ 517 {USB_VPI(USB_VENDOR_HTC, 0x0a4f, 0)}, 518 /* HTC SmartPhone USB Sync */ 519 {USB_VPI(USB_VENDOR_HTC, 0x0a50, 0)}, 520 /* SmartPhone USB Sync */ 521 {USB_VPI(USB_VENDOR_HTC, 0x0a52, 0)}, 522 /* SmartPhone USB Sync */ 523 {USB_VPI(USB_VENDOR_HTC, 0x0a53, 0)}, 524 /* SmartPhone USB Sync */ 525 {USB_VPI(USB_VENDOR_HTC, 0x0a54, 0)}, 526 /* SmartPhone USB Sync */ 527 {USB_VPI(USB_VENDOR_HTC, 0x0a55, 0)}, 528 /* SmartPhone USB Sync */ 529 {USB_VPI(USB_VENDOR_HTC, 0x0a56, 0)}, 530 /* SmartPhone USB Sync */ 531 {USB_VPI(USB_VENDOR_HTC, 0x0a57, 0)}, 532 /* SmartPhone USB Sync */ 533 {USB_VPI(USB_VENDOR_HTC, 0x0a58, 0)}, 534 /* SmartPhone USB Sync */ 535 {USB_VPI(USB_VENDOR_HTC, 0x0a59, 0)}, 536 /* SmartPhone USB Sync */ 537 {USB_VPI(USB_VENDOR_HTC, 0x0a5a, 0)}, 538 /* SmartPhone USB Sync */ 539 {USB_VPI(USB_VENDOR_HTC, 0x0a5b, 0)}, 540 /* SmartPhone USB Sync */ 541 {USB_VPI(USB_VENDOR_HTC, 0x0a5c, 0)}, 542 /* SmartPhone USB Sync */ 543 {USB_VPI(USB_VENDOR_HTC, 0x0a5d, 0)}, 544 /* SmartPhone USB Sync */ 545 {USB_VPI(USB_VENDOR_HTC, 0x0a5e, 0)}, 546 /* SmartPhone USB Sync */ 547 {USB_VPI(USB_VENDOR_HTC, 0x0a5f, 0)}, 548 /* SmartPhone USB Sync */ 549 {USB_VPI(USB_VENDOR_HTC, 0x0a60, 0)}, 550 /* SmartPhone USB Sync */ 551 {USB_VPI(USB_VENDOR_HTC, 0x0a61, 0)}, 552 /* SmartPhone USB Sync */ 553 {USB_VPI(USB_VENDOR_HTC, 0x0a62, 0)}, 554 /* SmartPhone USB Sync */ 555 {USB_VPI(USB_VENDOR_HTC, 0x0a63, 0)}, 556 /* SmartPhone USB Sync */ 557 {USB_VPI(USB_VENDOR_HTC, 0x0a64, 0)}, 558 /* SmartPhone USB Sync */ 559 {USB_VPI(USB_VENDOR_HTC, 0x0a65, 0)}, 560 /* SmartPhone USB Sync */ 561 {USB_VPI(USB_VENDOR_HTC, 0x0a66, 0)}, 562 /* SmartPhone USB Sync */ 563 {USB_VPI(USB_VENDOR_HTC, 0x0a67, 0)}, 564 /* SmartPhone USB Sync */ 565 {USB_VPI(USB_VENDOR_HTC, 0x0a68, 0)}, 566 /* SmartPhone USB Sync */ 567 {USB_VPI(USB_VENDOR_HTC, 0x0a69, 0)}, 568 /* SmartPhone USB Sync */ 569 {USB_VPI(USB_VENDOR_HTC, 0x0a6a, 0)}, 570 /* SmartPhone USB Sync */ 571 {USB_VPI(USB_VENDOR_HTC, 0x0a6b, 0)}, 572 /* SmartPhone USB Sync */ 573 {USB_VPI(USB_VENDOR_HTC, 0x0a6c, 0)}, 574 /* SmartPhone USB Sync */ 575 {USB_VPI(USB_VENDOR_HTC, 0x0a6d, 0)}, 576 /* SmartPhone USB Sync */ 577 {USB_VPI(USB_VENDOR_HTC, 0x0a6e, 0)}, 578 /* SmartPhone USB Sync */ 579 {USB_VPI(USB_VENDOR_HTC, 0x0a6f, 0)}, 580 /* SmartPhone USB Sync */ 581 {USB_VPI(USB_VENDOR_HTC, 0x0a70, 0)}, 582 /* SmartPhone USB Sync */ 583 {USB_VPI(USB_VENDOR_HTC, 0x0a71, 0)}, 584 /* SmartPhone USB Sync */ 585 {USB_VPI(USB_VENDOR_HTC, 0x0a72, 0)}, 586 /* SmartPhone USB Sync */ 587 {USB_VPI(USB_VENDOR_HTC, 0x0a73, 0)}, 588 /* SmartPhone USB Sync */ 589 {USB_VPI(USB_VENDOR_HTC, 0x0a74, 0)}, 590 /* SmartPhone USB Sync */ 591 {USB_VPI(USB_VENDOR_HTC, 0x0a75, 0)}, 592 /* SmartPhone USB Sync */ 593 {USB_VPI(USB_VENDOR_HTC, 0x0a76, 0)}, 594 /* SmartPhone USB Sync */ 595 {USB_VPI(USB_VENDOR_HTC, 0x0a77, 0)}, 596 /* SmartPhone USB Sync */ 597 {USB_VPI(USB_VENDOR_HTC, 0x0a78, 0)}, 598 /* SmartPhone USB Sync */ 599 {USB_VPI(USB_VENDOR_HTC, 0x0a79, 0)}, 600 /* SmartPhone USB Sync */ 601 {USB_VPI(USB_VENDOR_HTC, 0x0a7a, 0)}, 602 /* SmartPhone USB Sync */ 603 {USB_VPI(USB_VENDOR_HTC, 0x0a7b, 0)}, 604 /* SmartPhone USB Sync */ 605 {USB_VPI(USB_VENDOR_HTC, 0x0a7c, 0)}, 606 /* SmartPhone USB Sync */ 607 {USB_VPI(USB_VENDOR_HTC, 0x0a7d, 0)}, 608 /* SmartPhone USB Sync */ 609 {USB_VPI(USB_VENDOR_HTC, 0x0a7e, 0)}, 610 /* SmartPhone USB Sync */ 611 {USB_VPI(USB_VENDOR_HTC, 0x0a7f, 0)}, 612 /* SmartPhone USB Sync */ 613 {USB_VPI(USB_VENDOR_HTC, 0x0a80, 0)}, 614 /* SmartPhone USB Sync */ 615 {USB_VPI(USB_VENDOR_HTC, 0x0a81, 0)}, 616 /* SmartPhone USB Sync */ 617 {USB_VPI(USB_VENDOR_HTC, 0x0a82, 0)}, 618 /* SmartPhone USB Sync */ 619 {USB_VPI(USB_VENDOR_HTC, 0x0a83, 0)}, 620 /* SmartPhone USB Sync */ 621 {USB_VPI(USB_VENDOR_HTC, 0x0a84, 0)}, 622 /* SmartPhone USB Sync */ 623 {USB_VPI(USB_VENDOR_HTC, 0x0a85, 0)}, 624 /* SmartPhone USB Sync */ 625 {USB_VPI(USB_VENDOR_HTC, 0x0a86, 0)}, 626 /* SmartPhone USB Sync */ 627 {USB_VPI(USB_VENDOR_HTC, 0x0a87, 0)}, 628 /* SmartPhone USB Sync */ 629 {USB_VPI(USB_VENDOR_HTC, 0x0a88, 0)}, 630 /* SmartPhone USB Sync */ 631 {USB_VPI(USB_VENDOR_HTC, 0x0a89, 0)}, 632 /* SmartPhone USB Sync */ 633 {USB_VPI(USB_VENDOR_HTC, 0x0a8a, 0)}, 634 /* SmartPhone USB Sync */ 635 {USB_VPI(USB_VENDOR_HTC, 0x0a8b, 0)}, 636 /* SmartPhone USB Sync */ 637 {USB_VPI(USB_VENDOR_HTC, 0x0a8c, 0)}, 638 /* SmartPhone USB Sync */ 639 {USB_VPI(USB_VENDOR_HTC, 0x0a8d, 0)}, 640 /* SmartPhone USB Sync */ 641 {USB_VPI(USB_VENDOR_HTC, 0x0a8e, 0)}, 642 /* SmartPhone USB Sync */ 643 {USB_VPI(USB_VENDOR_HTC, 0x0a8f, 0)}, 644 /* SmartPhone USB Sync */ 645 {USB_VPI(USB_VENDOR_HTC, 0x0a90, 0)}, 646 /* SmartPhone USB Sync */ 647 {USB_VPI(USB_VENDOR_HTC, 0x0a91, 0)}, 648 /* SmartPhone USB Sync */ 649 {USB_VPI(USB_VENDOR_HTC, 0x0a92, 0)}, 650 /* SmartPhone USB Sync */ 651 {USB_VPI(USB_VENDOR_HTC, 0x0a93, 0)}, 652 /* SmartPhone USB Sync */ 653 {USB_VPI(USB_VENDOR_HTC, 0x0a94, 0)}, 654 /* SmartPhone USB Sync */ 655 {USB_VPI(USB_VENDOR_HTC, 0x0a95, 0)}, 656 /* SmartPhone USB Sync */ 657 {USB_VPI(USB_VENDOR_HTC, 0x0a96, 0)}, 658 /* SmartPhone USB Sync */ 659 {USB_VPI(USB_VENDOR_HTC, 0x0a97, 0)}, 660 /* SmartPhone USB Sync */ 661 {USB_VPI(USB_VENDOR_HTC, 0x0a98, 0)}, 662 /* SmartPhone USB Sync */ 663 {USB_VPI(USB_VENDOR_HTC, 0x0a99, 0)}, 664 /* SmartPhone USB Sync */ 665 {USB_VPI(USB_VENDOR_HTC, 0x0a9a, 0)}, 666 /* SmartPhone USB Sync */ 667 {USB_VPI(USB_VENDOR_HTC, 0x0a9b, 0)}, 668 /* SmartPhone USB Sync */ 669 {USB_VPI(USB_VENDOR_HTC, 0x0a9c, 0)}, 670 /* SmartPhone USB Sync */ 671 {USB_VPI(USB_VENDOR_HTC, 0x0a9d, 0)}, 672 /* SmartPhone USB Sync */ 673 {USB_VPI(USB_VENDOR_HTC, 0x0a9e, 0)}, 674 /* SmartPhone USB Sync */ 675 {USB_VPI(USB_VENDOR_HTC, 0x0a9f, 0)}, 676 /* "High Tech Computer Corp" */ 677 {USB_VPI(USB_VENDOR_HTC, 0x0bce, 0)}, 678 /**/ 679 {USB_VPI(USB_VENDOR_HTC, USB_PRODUCT_HTC_PPC6700MODEM, 0)}, 680 /**/ 681 {USB_VPI(USB_VENDOR_HTC, USB_PRODUCT_HTC_SMARTPHONE, 0)}, 682 /**/ 683 {USB_VPI(USB_VENDOR_HTC, USB_PRODUCT_HTC_WINMOBILE, 0)}, 684 /* JVC USB Sync */ 685 {USB_VPI(USB_VENDOR_JVC, 0x3011, 0)}, 686 /* JVC USB Sync */ 687 {USB_VPI(USB_VENDOR_JVC, 0x3012, 0)}, 688 /* LGE USB Sync */ 689 {USB_VPI(USB_VENDOR_LG, 0x9c01, 0)}, 690 /* Microsoft USB Sync */ 691 {USB_VPI(USB_VENDOR_MICROSOFT, 0x00ce, 0)}, 692 /* Windows Pocket PC 2002 */ 693 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0400, 0)}, 694 /* Windows Pocket PC 2002 */ 695 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0401, 0)}, 696 /* Windows Pocket PC 2002 */ 697 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0402, 0)}, 698 /* Windows Pocket PC 2002 */ 699 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0403, 0)}, 700 /* Windows Pocket PC 2002 */ 701 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0404, 0)}, 702 /* Windows Pocket PC 2002 */ 703 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0405, 0)}, 704 /* Windows Pocket PC 2002 */ 705 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0406, 0)}, 706 /* Windows Pocket PC 2002 */ 707 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0407, 0)}, 708 /* Windows Pocket PC 2002 */ 709 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0408, 0)}, 710 /* Windows Pocket PC 2002 */ 711 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0409, 0)}, 712 /* Windows Pocket PC 2002 */ 713 {USB_VPI(USB_VENDOR_MICROSOFT, 0x040a, 0)}, 714 /* Windows Pocket PC 2002 */ 715 {USB_VPI(USB_VENDOR_MICROSOFT, 0x040b, 0)}, 716 /* Windows Pocket PC 2002 */ 717 {USB_VPI(USB_VENDOR_MICROSOFT, 0x040c, 0)}, 718 /* Windows Pocket PC 2002 */ 719 {USB_VPI(USB_VENDOR_MICROSOFT, 0x040d, 0)}, 720 /* Windows Pocket PC 2002 */ 721 {USB_VPI(USB_VENDOR_MICROSOFT, 0x040e, 0)}, 722 /* Windows Pocket PC 2002 */ 723 {USB_VPI(USB_VENDOR_MICROSOFT, 0x040f, 0)}, 724 /* Windows Pocket PC 2002 */ 725 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0410, 0)}, 726 /* Windows Pocket PC 2002 */ 727 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0411, 0)}, 728 /* Windows Pocket PC 2002 */ 729 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0412, 0)}, 730 /* Windows Pocket PC 2002 */ 731 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0413, 0)}, 732 /* Windows Pocket PC 2002 */ 733 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0414, 0)}, 734 /* Windows Pocket PC 2002 */ 735 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0415, 0)}, 736 /* Windows Pocket PC 2002 */ 737 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0416, 0)}, 738 /* Windows Pocket PC 2002 */ 739 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0417, 0)}, 740 /* Windows Pocket PC 2003 */ 741 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0432, 0)}, 742 /* Windows Pocket PC 2003 */ 743 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0433, 0)}, 744 /* Windows Pocket PC 2003 */ 745 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0434, 0)}, 746 /* Windows Pocket PC 2003 */ 747 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0435, 0)}, 748 /* Windows Pocket PC 2003 */ 749 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0436, 0)}, 750 /* Windows Pocket PC 2003 */ 751 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0437, 0)}, 752 /* Windows Pocket PC 2003 */ 753 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0438, 0)}, 754 /* Windows Pocket PC 2003 */ 755 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0439, 0)}, 756 /* Windows Pocket PC 2003 */ 757 {USB_VPI(USB_VENDOR_MICROSOFT, 0x043a, 0)}, 758 /* Windows Pocket PC 2003 */ 759 {USB_VPI(USB_VENDOR_MICROSOFT, 0x043b, 0)}, 760 /* Windows Pocket PC 2003 */ 761 {USB_VPI(USB_VENDOR_MICROSOFT, 0x043c, 0)}, 762 /* Windows Pocket PC 2003 */ 763 {USB_VPI(USB_VENDOR_MICROSOFT, 0x043d, 0)}, 764 /* Windows Pocket PC 2003 */ 765 {USB_VPI(USB_VENDOR_MICROSOFT, 0x043e, 0)}, 766 /* Windows Pocket PC 2003 */ 767 {USB_VPI(USB_VENDOR_MICROSOFT, 0x043f, 0)}, 768 /* Windows Pocket PC 2003 */ 769 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0440, 0)}, 770 /* Windows Pocket PC 2003 */ 771 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0441, 0)}, 772 /* Windows Pocket PC 2003 */ 773 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0442, 0)}, 774 /* Windows Pocket PC 2003 */ 775 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0443, 0)}, 776 /* Windows Pocket PC 2003 */ 777 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0444, 0)}, 778 /* Windows Pocket PC 2003 */ 779 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0445, 0)}, 780 /* Windows Pocket PC 2003 */ 781 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0446, 0)}, 782 /* Windows Pocket PC 2003 */ 783 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0447, 0)}, 784 /* Windows Pocket PC 2003 */ 785 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0448, 0)}, 786 /* Windows Pocket PC 2003 */ 787 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0449, 0)}, 788 /* Windows Pocket PC 2003 */ 789 {USB_VPI(USB_VENDOR_MICROSOFT, 0x044a, 0)}, 790 /* Windows Pocket PC 2003 */ 791 {USB_VPI(USB_VENDOR_MICROSOFT, 0x044b, 0)}, 792 /* Windows Pocket PC 2003 */ 793 {USB_VPI(USB_VENDOR_MICROSOFT, 0x044c, 0)}, 794 /* Windows Pocket PC 2003 */ 795 {USB_VPI(USB_VENDOR_MICROSOFT, 0x044d, 0)}, 796 /* Windows Pocket PC 2003 */ 797 {USB_VPI(USB_VENDOR_MICROSOFT, 0x044e, 0)}, 798 /* Windows Pocket PC 2003 */ 799 {USB_VPI(USB_VENDOR_MICROSOFT, 0x044f, 0)}, 800 /* Windows Pocket PC 2003 */ 801 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0450, 0)}, 802 /* Windows Pocket PC 2003 */ 803 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0451, 0)}, 804 /* Windows Pocket PC 2003 */ 805 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0452, 0)}, 806 /* Windows Pocket PC 2003 */ 807 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0453, 0)}, 808 /* Windows Pocket PC 2003 */ 809 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0454, 0)}, 810 /* Windows Pocket PC 2003 */ 811 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0455, 0)}, 812 /* Windows Pocket PC 2003 */ 813 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0456, 0)}, 814 /* Windows Pocket PC 2003 */ 815 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0457, 0)}, 816 /* Windows Pocket PC 2003 */ 817 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0458, 0)}, 818 /* Windows Pocket PC 2003 */ 819 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0459, 0)}, 820 /* Windows Pocket PC 2003 */ 821 {USB_VPI(USB_VENDOR_MICROSOFT, 0x045a, 0)}, 822 /* Windows Pocket PC 2003 */ 823 {USB_VPI(USB_VENDOR_MICROSOFT, 0x045b, 0)}, 824 /* Windows Pocket PC 2003 */ 825 {USB_VPI(USB_VENDOR_MICROSOFT, 0x045c, 0)}, 826 /* Windows Pocket PC 2003 */ 827 {USB_VPI(USB_VENDOR_MICROSOFT, 0x045d, 0)}, 828 /* Windows Pocket PC 2003 */ 829 {USB_VPI(USB_VENDOR_MICROSOFT, 0x045e, 0)}, 830 /* Windows Pocket PC 2003 */ 831 {USB_VPI(USB_VENDOR_MICROSOFT, 0x045f, 0)}, 832 /* Windows Pocket PC 2003 */ 833 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0460, 0)}, 834 /* Windows Pocket PC 2003 */ 835 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0461, 0)}, 836 /* Windows Pocket PC 2003 */ 837 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0462, 0)}, 838 /* Windows Pocket PC 2003 */ 839 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0463, 0)}, 840 /* Windows Pocket PC 2003 */ 841 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0464, 0)}, 842 /* Windows Pocket PC 2003 */ 843 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0465, 0)}, 844 /* Windows Pocket PC 2003 */ 845 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0466, 0)}, 846 /* Windows Pocket PC 2003 */ 847 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0467, 0)}, 848 /* Windows Pocket PC 2003 */ 849 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0468, 0)}, 850 /* Windows Pocket PC 2003 */ 851 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0469, 0)}, 852 /* Windows Pocket PC 2003 */ 853 {USB_VPI(USB_VENDOR_MICROSOFT, 0x046a, 0)}, 854 /* Windows Pocket PC 2003 */ 855 {USB_VPI(USB_VENDOR_MICROSOFT, 0x046b, 0)}, 856 /* Windows Pocket PC 2003 */ 857 {USB_VPI(USB_VENDOR_MICROSOFT, 0x046c, 0)}, 858 /* Windows Pocket PC 2003 */ 859 {USB_VPI(USB_VENDOR_MICROSOFT, 0x046d, 0)}, 860 /* Windows Pocket PC 2003 */ 861 {USB_VPI(USB_VENDOR_MICROSOFT, 0x046e, 0)}, 862 /* Windows Pocket PC 2003 */ 863 {USB_VPI(USB_VENDOR_MICROSOFT, 0x046f, 0)}, 864 /* Windows Pocket PC 2003 */ 865 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0470, 0)}, 866 /* Windows Pocket PC 2003 */ 867 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0471, 0)}, 868 /* Windows Pocket PC 2003 */ 869 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0472, 0)}, 870 /* Windows Pocket PC 2003 */ 871 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0473, 0)}, 872 /* Windows Pocket PC 2003 */ 873 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0474, 0)}, 874 /* Windows Pocket PC 2003 */ 875 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0475, 0)}, 876 /* Windows Pocket PC 2003 */ 877 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0476, 0)}, 878 /* Windows Pocket PC 2003 */ 879 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0477, 0)}, 880 /* Windows Pocket PC 2003 */ 881 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0478, 0)}, 882 /* Windows Pocket PC 2003 */ 883 {USB_VPI(USB_VENDOR_MICROSOFT, 0x0479, 0)}, 884 /* Windows Pocket PC 2003 */ 885 {USB_VPI(USB_VENDOR_MICROSOFT, 0x047a, 0)}, 886 /* Windows Pocket PC 2003 */ 887 {USB_VPI(USB_VENDOR_MICROSOFT, 0x047b, 0)}, 888 /* Windows Smartphone 2002 */ 889 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04c8, 0)}, 890 /* Windows Smartphone 2002 */ 891 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04c9, 0)}, 892 /* Windows Smartphone 2002 */ 893 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04ca, 0)}, 894 /* Windows Smartphone 2002 */ 895 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04cb, 0)}, 896 /* Windows Smartphone 2002 */ 897 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04cc, 0)}, 898 /* Windows Smartphone 2002 */ 899 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04cd, 0)}, 900 /* Windows Smartphone 2002 */ 901 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04ce, 0)}, 902 /* Windows Smartphone 2003 */ 903 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04d7, 0)}, 904 /* Windows Smartphone 2003 */ 905 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04d8, 0)}, 906 /* Windows Smartphone 2003 */ 907 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04d9, 0)}, 908 /* Windows Smartphone 2003 */ 909 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04da, 0)}, 910 /* Windows Smartphone 2003 */ 911 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04db, 0)}, 912 /* Windows Smartphone 2003 */ 913 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04dc, 0)}, 914 /* Windows Smartphone 2003 */ 915 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04dd, 0)}, 916 /* Windows Smartphone 2003 */ 917 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04de, 0)}, 918 /* Windows Smartphone 2003 */ 919 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04df, 0)}, 920 /* Windows Smartphone 2003 */ 921 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04e0, 0)}, 922 /* Windows Smartphone 2003 */ 923 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04e1, 0)}, 924 /* Windows Smartphone 2003 */ 925 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04e2, 0)}, 926 /* Windows Smartphone 2003 */ 927 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04e3, 0)}, 928 /* Windows Smartphone 2003 */ 929 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04e4, 0)}, 930 /* Windows Smartphone 2003 */ 931 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04e5, 0)}, 932 /* Windows Smartphone 2003 */ 933 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04e6, 0)}, 934 /* Windows Smartphone 2003 */ 935 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04e7, 0)}, 936 /* Windows Smartphone 2003 */ 937 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04e8, 0)}, 938 /* Windows Smartphone 2003 */ 939 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04e9, 0)}, 940 /* Windows Smartphone 2003 */ 941 {USB_VPI(USB_VENDOR_MICROSOFT, 0x04ea, 0)}, 942 /* Motorola MPx200 Smartphone */ 943 {USB_VPI(USB_VENDOR_MOTOROLA2, 0x4204, 0)}, 944 /* Motorola MPc GSM */ 945 {USB_VPI(USB_VENDOR_MOTOROLA2, 0x4214, 0)}, 946 /* Motorola MPx220 Smartphone */ 947 {USB_VPI(USB_VENDOR_MOTOROLA2, 0x4224, 0)}, 948 /* Motorola MPc CDMA */ 949 {USB_VPI(USB_VENDOR_MOTOROLA2, 0x4234, 0)}, 950 /* Motorola MPx100 Smartphone */ 951 {USB_VPI(USB_VENDOR_MOTOROLA2, 0x4244, 0)}, 952 /* NEC USB Sync */ 953 {USB_VPI(USB_VENDOR_NEC, 0x00d5, 0)}, 954 /* NEC USB Sync */ 955 {USB_VPI(USB_VENDOR_NEC, 0x00d6, 0)}, 956 /* NEC USB Sync */ 957 {USB_VPI(USB_VENDOR_NEC, 0x00d7, 0)}, 958 /* NEC USB Sync */ 959 {USB_VPI(USB_VENDOR_NEC, 0x8024, 0)}, 960 /* NEC USB Sync */ 961 {USB_VPI(USB_VENDOR_NEC, 0x8025, 0)}, 962 /* Panasonic USB Sync */ 963 {USB_VPI(USB_VENDOR_PANASONIC, 0x2500, 0)}, 964 /* Samsung NEXiO USB Sync */ 965 {USB_VPI(USB_VENDOR_SAMSUNG, 0x5f00, 0)}, 966 /* Samsung NEXiO USB Sync */ 967 {USB_VPI(USB_VENDOR_SAMSUNG, 0x5f01, 0)}, 968 /* Samsung NEXiO USB Sync */ 969 {USB_VPI(USB_VENDOR_SAMSUNG, 0x5f02, 0)}, 970 /* Samsung NEXiO USB Sync */ 971 {USB_VPI(USB_VENDOR_SAMSUNG, 0x5f03, 0)}, 972 /* Samsung NEXiO USB Sync */ 973 {USB_VPI(USB_VENDOR_SAMSUNG, 0x5f04, 0)}, 974 /* Samsung MITs USB Sync */ 975 {USB_VPI(USB_VENDOR_SAMSUNG, 0x6611, 0)}, 976 /* Samsung MITs USB Sync */ 977 {USB_VPI(USB_VENDOR_SAMSUNG, 0x6613, 0)}, 978 /* Samsung MITs USB Sync */ 979 {USB_VPI(USB_VENDOR_SAMSUNG, 0x6615, 0)}, 980 /* Samsung MITs USB Sync */ 981 {USB_VPI(USB_VENDOR_SAMSUNG, 0x6617, 0)}, 982 /* Samsung MITs USB Sync */ 983 {USB_VPI(USB_VENDOR_SAMSUNG, 0x6619, 0)}, 984 /* Samsung MITs USB Sync */ 985 {USB_VPI(USB_VENDOR_SAMSUNG, 0x661b, 0)}, 986 /* Samsung MITs USB Sync */ 987 {USB_VPI(USB_VENDOR_SAMSUNG, 0x662e, 0)}, 988 /* Samsung MITs USB Sync */ 989 {USB_VPI(USB_VENDOR_SAMSUNG, 0x6630, 0)}, 990 /* Samsung MITs USB Sync */ 991 {USB_VPI(USB_VENDOR_SAMSUNG, 0x6632, 0)}, 992 /* SHARP WS003SH USB Modem */ 993 {USB_VPI(USB_VENDOR_SHARP, 0x9102, 0)}, 994 /* SHARP WS004SH USB Modem */ 995 {USB_VPI(USB_VENDOR_SHARP, 0x9121, 0)}, 996 /* SHARP S01SH USB Modem */ 997 {USB_VPI(USB_VENDOR_SHARP, 0x9151, 0)}, 998 /**/ 999 {USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_WZERO3ES, 0)}, 1000 /* Symbol USB Sync */ 1001 {USB_VPI(USB_VENDOR_SYMBOL, 0x2000, 0)}, 1002 /* Symbol USB Sync 0x2001 */ 1003 {USB_VPI(USB_VENDOR_SYMBOL, 0x2001, 0)}, 1004 /* Symbol USB Sync 0x2002 */ 1005 {USB_VPI(USB_VENDOR_SYMBOL, 0x2002, 0)}, 1006 /* Symbol USB Sync 0x2003 */ 1007 {USB_VPI(USB_VENDOR_SYMBOL, 0x2003, 0)}, 1008 /* Symbol USB Sync 0x2004 */ 1009 {USB_VPI(USB_VENDOR_SYMBOL, 0x2004, 0)}, 1010 /* Symbol USB Sync 0x2005 */ 1011 {USB_VPI(USB_VENDOR_SYMBOL, 0x2005, 0)}, 1012 /* Symbol USB Sync 0x2006 */ 1013 {USB_VPI(USB_VENDOR_SYMBOL, 0x2006, 0)}, 1014 /* Symbol USB Sync 0x2007 */ 1015 {USB_VPI(USB_VENDOR_SYMBOL, 0x2007, 0)}, 1016 /* Symbol USB Sync 0x2008 */ 1017 {USB_VPI(USB_VENDOR_SYMBOL, 0x2008, 0)}, 1018 /* Symbol USB Sync 0x2009 */ 1019 {USB_VPI(USB_VENDOR_SYMBOL, 0x2009, 0)}, 1020 /* Symbol USB Sync 0x200a */ 1021 {USB_VPI(USB_VENDOR_SYMBOL, 0x200a, 0)}, 1022 /* TOSHIBA USB Sync 0700 */ 1023 {USB_VPI(USB_VENDOR_TOSHIBA, 0x0700, 0)}, 1024 /* TOSHIBA Pocket PC e310 */ 1025 {USB_VPI(USB_VENDOR_TOSHIBA, 0x0705, 0)}, 1026 /* TOSHIBA Pocket PC e330 Series */ 1027 {USB_VPI(USB_VENDOR_TOSHIBA, 0x0707, 0)}, 1028 /* TOSHIBA Pocket PC e350Series */ 1029 {USB_VPI(USB_VENDOR_TOSHIBA, 0x0708, 0)}, 1030 /* TOSHIBA Pocket PC e750 Series */ 1031 {USB_VPI(USB_VENDOR_TOSHIBA, 0x0709, 0)}, 1032 /* TOSHIBA Pocket PC e400 Series */ 1033 {USB_VPI(USB_VENDOR_TOSHIBA, 0x070a, 0)}, 1034 /* TOSHIBA Pocket PC e800 Series */ 1035 {USB_VPI(USB_VENDOR_TOSHIBA, 0x070b, 0)}, 1036 /* TOSHIBA Pocket PC e740 */ 1037 {USB_VPI(USB_VENDOR_TOSHIBA, USB_PRODUCT_TOSHIBA_POCKETPC_E740, 0)}, 1038 /* ViewSonic Color Pocket PC V35 */ 1039 {USB_VPI(USB_VENDOR_VIEWSONIC, 0x0ed9, 0)}, 1040 /* ViewSonic Color Pocket PC V36 */ 1041 {USB_VPI(USB_VENDOR_VIEWSONIC, 0x1527, 0)}, 1042 /* ViewSonic Color Pocket PC V37 */ 1043 {USB_VPI(USB_VENDOR_VIEWSONIC, 0x1529, 0)}, 1044 /* ViewSonic Color Pocket PC V38 */ 1045 {USB_VPI(USB_VENDOR_VIEWSONIC, 0x152b, 0)}, 1046 /* ViewSonic Pocket PC */ 1047 {USB_VPI(USB_VENDOR_VIEWSONIC, 0x152e, 0)}, 1048 /* ViewSonic Communicator Pocket PC */ 1049 {USB_VPI(USB_VENDOR_VIEWSONIC, 0x1921, 0)}, 1050 /* ViewSonic Smartphone */ 1051 {USB_VPI(USB_VENDOR_VIEWSONIC, 0x1922, 0)}, 1052 /* ViewSonic Pocket PC V30 */ 1053 {USB_VPI(USB_VENDOR_VIEWSONIC, 0x1923, 0)}, 1054 }; 1055 1056 static device_method_t uipaq_methods[] = { 1057 DEVMETHOD(device_probe, uipaq_probe), 1058 DEVMETHOD(device_attach, uipaq_attach), 1059 DEVMETHOD(device_detach, uipaq_detach), 1060 {0, 0} 1061 }; 1062 1063 static devclass_t uipaq_devclass; 1064 1065 static driver_t uipaq_driver = { 1066 .name = "uipaq", 1067 .methods = uipaq_methods, 1068 .size = sizeof(struct uipaq_softc), 1069 }; 1070 1071 DRIVER_MODULE(uipaq, ushub, uipaq_driver, uipaq_devclass, NULL, 0); 1072 MODULE_DEPEND(uipaq, ucom, 1, 1, 1); 1073 MODULE_DEPEND(uipaq, usb, 1, 1, 1); 1074 1075 static int 1076 uipaq_probe(device_t dev) 1077 { 1078 struct usb2_attach_arg *uaa = device_get_ivars(dev); 1079 1080 if (uaa->usb2_mode != USB_MODE_HOST) { 1081 return (ENXIO); 1082 } 1083 if (uaa->info.bConfigIndex != UIPAQ_CONFIG_INDEX) { 1084 return (ENXIO); 1085 } 1086 if (uaa->info.bIfaceIndex != UIPAQ_IFACE_INDEX) { 1087 return (ENXIO); 1088 } 1089 return (usb2_lookup_id_by_uaa(uipaq_devs, sizeof(uipaq_devs), uaa)); 1090 } 1091 1092 static int 1093 uipaq_attach(device_t dev) 1094 { 1095 struct usb2_device_request req; 1096 struct usb2_attach_arg *uaa = device_get_ivars(dev); 1097 struct uipaq_softc *sc = device_get_softc(dev); 1098 int error; 1099 uint8_t iface_index; 1100 uint8_t i; 1101 1102 sc->sc_udev = uaa->device; 1103 1104 device_set_usb2_desc(dev); 1105 1106 /* 1107 * Send magic bytes, cribbed from Linux ipaq driver that 1108 * claims to have sniffed them from Win98. Wait for driver to 1109 * become ready on device side? 1110 */ 1111 req.bmRequestType = UT_WRITE_CLASS_INTERFACE; 1112 req.bRequest = UCDC_SET_CONTROL_LINE_STATE; 1113 USETW(req.wValue, UCDC_LINE_DTR); 1114 USETW(req.wIndex, 0x0); 1115 USETW(req.wLength, 0); 1116 for (i = 0; i != 64; i++) { 1117 error = 1118 usb2_do_request_flags(uaa->device, NULL, &req, 1119 NULL, 0, NULL, 100); 1120 if (error == 0) 1121 break; 1122 usb2_pause_mtx(NULL, hz / 10); 1123 } 1124 1125 iface_index = UIPAQ_IFACE_INDEX; 1126 error = usb2_transfer_setup(uaa->device, &iface_index, 1127 sc->sc_xfer, uipaq_config_data, 1128 UIPAQ_N_TRANSFER, sc, &Giant); 1129 1130 if (error) { 1131 goto detach; 1132 } 1133 /* clear stall at first run */ 1134 usb2_transfer_set_stall(sc->sc_xfer[UIPAQ_BULK_DT_WR]); 1135 usb2_transfer_set_stall(sc->sc_xfer[UIPAQ_BULK_DT_RD]); 1136 1137 error = usb2_com_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc, 1138 &uipaq_callback, &Giant); 1139 if (error) { 1140 goto detach; 1141 } 1142 return (0); 1143 1144 detach: 1145 uipaq_detach(dev); 1146 return (ENXIO); 1147 } 1148 1149 int 1150 uipaq_detach(device_t dev) 1151 { 1152 struct uipaq_softc *sc = device_get_softc(dev); 1153 1154 usb2_com_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1); 1155 1156 usb2_transfer_unsetup(sc->sc_xfer, UIPAQ_N_TRANSFER); 1157 1158 return (0); 1159 } 1160 1161 static void 1162 uipaq_start_read(struct usb2_com_softc *ucom) 1163 { 1164 struct uipaq_softc *sc = ucom->sc_parent; 1165 1166 /* start read endpoint */ 1167 usb2_transfer_start(sc->sc_xfer[UIPAQ_BULK_DT_RD]); 1168 } 1169 1170 static void 1171 uipaq_stop_read(struct usb2_com_softc *ucom) 1172 { 1173 struct uipaq_softc *sc = ucom->sc_parent; 1174 1175 /* stop read endpoint */ 1176 usb2_transfer_stop(sc->sc_xfer[UIPAQ_BULK_DT_RD]); 1177 } 1178 1179 static void 1180 uipaq_start_write(struct usb2_com_softc *ucom) 1181 { 1182 struct uipaq_softc *sc = ucom->sc_parent; 1183 1184 usb2_transfer_start(sc->sc_xfer[UIPAQ_BULK_DT_WR]); 1185 } 1186 1187 static void 1188 uipaq_stop_write(struct usb2_com_softc *ucom) 1189 { 1190 struct uipaq_softc *sc = ucom->sc_parent; 1191 1192 usb2_transfer_stop(sc->sc_xfer[UIPAQ_BULK_DT_WR]); 1193 } 1194 1195 static void 1196 uipaq_cfg_set_dtr(struct usb2_com_softc *ucom, uint8_t onoff) 1197 { 1198 struct uipaq_softc *sc = ucom->sc_parent; 1199 struct usb2_device_request req; 1200 1201 DPRINTF("onoff=%d\n", onoff); 1202 1203 if (onoff) 1204 sc->sc_line |= UCDC_LINE_DTR; 1205 else 1206 sc->sc_line &= ~UCDC_LINE_DTR; 1207 1208 req.bmRequestType = UT_WRITE_CLASS_INTERFACE; 1209 req.bRequest = UCDC_SET_CONTROL_LINE_STATE; 1210 USETW(req.wValue, sc->sc_line); 1211 req.wIndex[0] = UIPAQ_IFACE_INDEX; 1212 req.wIndex[1] = 0; 1213 USETW(req.wLength, 0); 1214 1215 usb2_com_cfg_do_request(sc->sc_udev, &sc->sc_ucom, 1216 &req, NULL, 0, 1000); 1217 } 1218 1219 static void 1220 uipaq_cfg_set_rts(struct usb2_com_softc *ucom, uint8_t onoff) 1221 { 1222 struct uipaq_softc *sc = ucom->sc_parent; 1223 struct usb2_device_request req; 1224 1225 DPRINTF("onoff=%d\n", onoff); 1226 1227 if (onoff) 1228 sc->sc_line |= UCDC_LINE_RTS; 1229 else 1230 sc->sc_line &= ~UCDC_LINE_RTS; 1231 1232 req.bmRequestType = UT_WRITE_CLASS_INTERFACE; 1233 req.bRequest = UCDC_SET_CONTROL_LINE_STATE; 1234 USETW(req.wValue, sc->sc_line); 1235 req.wIndex[0] = UIPAQ_IFACE_INDEX; 1236 req.wIndex[1] = 0; 1237 USETW(req.wLength, 0); 1238 1239 usb2_com_cfg_do_request(sc->sc_udev, &sc->sc_ucom, 1240 &req, NULL, 0, 1000); 1241 } 1242 1243 static void 1244 uipaq_cfg_set_break(struct usb2_com_softc *ucom, uint8_t onoff) 1245 { 1246 struct uipaq_softc *sc = ucom->sc_parent; 1247 struct usb2_device_request req; 1248 uint16_t temp; 1249 1250 temp = onoff ? UCDC_BREAK_ON : UCDC_BREAK_OFF; 1251 1252 req.bmRequestType = UT_WRITE_CLASS_INTERFACE; 1253 req.bRequest = UCDC_SEND_BREAK; 1254 USETW(req.wValue, temp); 1255 req.wIndex[0] = UIPAQ_IFACE_INDEX; 1256 req.wIndex[1] = 0; 1257 USETW(req.wLength, 0); 1258 1259 usb2_com_cfg_do_request(sc->sc_udev, &sc->sc_ucom, 1260 &req, NULL, 0, 1000); 1261 } 1262 1263 static void 1264 uipaq_write_callback(struct usb2_xfer *xfer) 1265 { 1266 struct uipaq_softc *sc = xfer->priv_sc; 1267 uint32_t actlen; 1268 1269 switch (USB_GET_STATE(xfer)) { 1270 case USB_ST_SETUP: 1271 case USB_ST_TRANSFERRED: 1272 tr_setup: 1273 if (usb2_com_get_data(&sc->sc_ucom, xfer->frbuffers, 0, 1274 UIPAQ_BUF_SIZE, &actlen)) { 1275 xfer->frlengths[0] = actlen; 1276 usb2_start_hardware(xfer); 1277 } 1278 return; 1279 1280 default: /* Error */ 1281 if (xfer->error != USB_ERR_CANCELLED) { 1282 /* try to clear stall first */ 1283 xfer->flags.stall_pipe = 1; 1284 goto tr_setup; 1285 } 1286 return; 1287 } 1288 } 1289 1290 static void 1291 uipaq_read_callback(struct usb2_xfer *xfer) 1292 { 1293 struct uipaq_softc *sc = xfer->priv_sc; 1294 1295 switch (USB_GET_STATE(xfer)) { 1296 case USB_ST_TRANSFERRED: 1297 usb2_com_put_data(&sc->sc_ucom, xfer->frbuffers, 0, 1298 xfer->actlen); 1299 1300 case USB_ST_SETUP: 1301 tr_setup: 1302 xfer->frlengths[0] = xfer->max_data_length; 1303 usb2_start_hardware(xfer); 1304 return; 1305 1306 default: /* Error */ 1307 if (xfer->error != USB_ERR_CANCELLED) { 1308 /* try to clear stall first */ 1309 xfer->flags.stall_pipe = 1; 1310 goto tr_setup; 1311 } 1312 return; 1313 } 1314 } 1315