]> git.pld-linux.org Git - packages/kernel.git/blob - linux-2.4.20-rc3-USB.patch
- obsolete
[packages/kernel.git] / linux-2.4.20-rc3-USB.patch
1 diff -Nur linux-2.4.19.old/drivers/usb/CDCEther.c linux-2.4.19/drivers/usb/CDCEther.c
2 --- linux-2.4.19.old/drivers/usb/CDCEther.c     Sat Aug  3 02:39:44 2002
3 +++ linux-2.4.19/drivers/usb/CDCEther.c Mon Nov 25 12:26:54 2002
4 @@ -148,7 +148,7 @@
5         // Give this to the USB subsystem so it can tell us 
6         // when more data arrives.
7         if ( (res = usb_submit_urb(&ether_dev->rx_urb)) ) {
8 -               warn( __FUNCTION__ " failed submit rx_urb %d", res);
9 +               warn("%s failed submit rx_urb %d", __FUNCTION__, res);
10         }
11         
12         // We are no longer busy, show us the frames!!!
13 @@ -379,7 +379,7 @@
14  
15         // Turn on the USB and let the packets flow!!!
16         if ( (res = enable_net_traffic( ether_dev )) ) {
17 -               err( __FUNCTION__ "can't enable_net_traffic() - %d", res );
18 +               err("%s can't enable_net_traffic() - %d", __FUNCTION__, res );
19                 return -EIO;
20         }
21  
22 @@ -392,7 +392,7 @@
23         /* Put it out there so the device can send us stuff */
24         if ( (res = usb_submit_urb(&ether_dev->rx_urb)) ) {
25                 /* Hmm...  Okay... */
26 -               warn( __FUNCTION__ " failed rx_urb %d", res );
27 +               warn( "%s failed rx_urb %d", __FUNCTION__, res );
28         }
29  
30         if (ether_dev->properties & HAVE_NOTIFICATION_ELEMENT) {
31 @@ -406,7 +406,7 @@
32                         ether_dev,
33                         ether_dev->intr_interval);
34                 if ( (res = usb_submit_urb(&ether_dev->intr_urb)) ) {
35 -                       warn( __FUNCTION__ " failed intr_urb %d", res );
36 +                       warn("%s failed intr_urb %d", __FUNCTION__, res );
37                 }
38         }
39  
40 @@ -497,14 +497,14 @@
41  static void CDC_SetEthernetPacketFilter (ether_dev_t *ether_dev)
42  {
43  #if 0
44 -       devrequest *dr = &ether_dev->ctrl_dr;
45 +       struct usb_ctrlrequest *dr = &ether_dev->ctrl_dr;
46         int res;
47  
48 -       dr->requesttype = USB_TYPE_CLASS | USB_DIR_OUT | USB_RECIP_INTERFACE;
49 -       dr->request = SET_ETHERNET_PACKET_FILTER;
50 -       dr->value = cpu_to_le16(ether_dev->mode_flags);
51 -       dr->index = cpu_to_le16((u16)ether_dev->comm_interface);
52 -       dr->length = 0;
53 +       dr->bRequestType = USB_TYPE_CLASS | USB_DIR_OUT | USB_RECIP_INTERFACE;
54 +       dr->bRequest = SET_ETHERNET_PACKET_FILTER;
55 +       dr->wValue = cpu_to_le16(ether_dev->mode_flags);
56 +       dr->wIndex = cpu_to_le16((u16)ether_dev->comm_interface);
57 +       dr->wLength = 0;
58  
59         FILL_CONTROL_URB(&ether_dev->ctrl_urb,
60                         ether_dev->usb,
61 @@ -515,7 +515,7 @@
62                         setpktfilter_done,
63                         ether_dev);
64         if ( (res = usb_submit_urb(&ether_dev->ctrl_urb)) ) {
65 -               warn( __FUNCTION__ " failed submit ctrl_urb %d", res);
66 +               warn("%s failed submit ctrl_urb %d", __FUNCTION__, res);
67         }
68  #endif
69  
70 diff -Nur linux-2.4.19.old/drivers/usb/CDCEther.h linux-2.4.19/drivers/usb/CDCEther.h
71 --- linux-2.4.19.old/drivers/usb/CDCEther.h     Sat Aug  3 02:39:44 2002
72 +++ linux-2.4.19/drivers/usb/CDCEther.h Mon Nov 25 12:26:54 2002
73 @@ -75,7 +75,7 @@
74         __u8                    bNumberPowerFilters;
75         __u16                   mode_flags;
76         int                     intr_interval;
77 -       devrequest              ctrl_dr;
78 +       struct usb_ctrlrequest  ctrl_dr;
79         struct urb              rx_urb, tx_urb, intr_urb, ctrl_urb;
80         unsigned char           rx_buff[CDC_ETHER_MAX_MTU] __attribute__((aligned(L1_CACHE_BYTES)));
81         unsigned char           tx_buff[CDC_ETHER_MAX_MTU] __attribute__((aligned(L1_CACHE_BYTES)));
82 diff -Nur linux-2.4.19.old/drivers/usb/Config.in linux-2.4.19/drivers/usb/Config.in
83 --- linux-2.4.19.old/drivers/usb/Config.in      Sat Aug  3 02:39:44 2002
84 +++ linux-2.4.19/drivers/usb/Config.in  Mon Nov 25 12:26:54 2002
85 @@ -33,6 +33,7 @@
86     dep_tristate '  USB Audio support' CONFIG_USB_AUDIO $CONFIG_USB $CONFIG_SOUND
87     dep_tristate '    EMI 2|6 USB Audio interface support' CONFIG_USB_EMI26 $CONFIG_USB_AUDIO
88     dep_tristate '  USB Bluetooth support (EXPERIMENTAL)' CONFIG_USB_BLUETOOTH $CONFIG_USB $CONFIG_EXPERIMENTAL
89 +   dep_tristate '  USB MIDI support' CONFIG_USB_MIDI $CONFIG_USB
90     if [ "$CONFIG_SCSI" = "n" ]; then
91        comment '  SCSI support is needed for USB Storage'
92     fi
93 @@ -44,6 +45,7 @@
94        dep_mbool '    Microtech CompactFlash/SmartMedia support' CONFIG_USB_STORAGE_DPCM $CONFIG_USB_STORAGE
95        dep_mbool '    HP CD-Writer 82xx support' CONFIG_USB_STORAGE_HP8200e $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
96        dep_mbool '    SanDisk SDDR-09 (and other SmartMedia) support' CONFIG_USB_STORAGE_SDDR09 $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
97 +      dep_mbool '    SanDisk SDDR-55 SmartMedia support' CONFIG_USB_STORAGE_SDDR55 $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
98        dep_mbool '    Lexar Jumpshot Compact Flash Reader' CONFIG_USB_STORAGE_JUMPSHOT $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
99     dep_tristate '  USB Modem (CDC ACM) support' CONFIG_USB_ACM $CONFIG_USB
100     dep_tristate '  USB Printer support' CONFIG_USB_PRINTER $CONFIG_USB
101 @@ -59,6 +61,7 @@
102        dep_tristate '  USB HIDBP Keyboard (basic) support' CONFIG_USB_KBD $CONFIG_USB $CONFIG_INPUT
103        dep_tristate '  USB HIDBP Mouse (basic) support' CONFIG_USB_MOUSE $CONFIG_USB $CONFIG_INPUT
104     fi
105 +   dep_tristate '  Aiptek 6000U/8000U tablet support' CONFIG_USB_AIPTEK $CONFIG_USB $CONFIG_INPUT
106     dep_tristate '  Wacom Intuos/Graphire tablet support' CONFIG_USB_WACOM $CONFIG_USB $CONFIG_INPUT
107  
108     comment 'USB Imaging devices'
109 @@ -101,6 +104,8 @@
110     comment 'USB Miscellaneous drivers'
111     dep_tristate '  USB Diamond Rio500 support (EXPERIMENTAL)' CONFIG_USB_RIO500 $CONFIG_USB $CONFIG_EXPERIMENTAL
112     dep_tristate '  USB Auerswald ISDN support (EXPERIMENTAL)' CONFIG_USB_AUERSWALD $CONFIG_USB $CONFIG_EXPERIMENTAL
113 +   dep_tristate '  Texas Instruments Graph Link USB (aka SilverLink) cable support' CONFIG_USB_TIGL $CONFIG_USB
114     dep_tristate '  Tieman Voyager USB Braille display support (EXPERIMENTAL)' CONFIG_USB_BRLVGER $CONFIG_USB $CONFIG_EXPERIMENTAL
115 +   dep_tristate '  USB LCD device support' CONFIG_USB_LCD $CONFIG_USB
116  fi
117  endmenu
118 diff -Nur linux-2.4.19.old/drivers/usb/Makefile linux-2.4.19/drivers/usb/Makefile
119 --- linux-2.4.19.old/drivers/usb/Makefile       Sat Aug  3 02:39:44 2002
120 +++ linux-2.4.19/drivers/usb/Makefile   Mon Nov 25 12:26:54 2002
121 @@ -62,6 +62,7 @@
122  obj-$(CONFIG_USB_MOUSE)                += usbmouse.o
123  obj-$(CONFIG_USB_HID)          += hid.o
124  obj-$(CONFIG_USB_KBD)          += usbkbd.o
125 +obj-$(CONFIG_USB_AIPTEK)       += aiptek.o
126  obj-$(CONFIG_USB_WACOM)                += wacom.o
127  
128  obj-$(CONFIG_USB_SCANNER)      += scanner.o
129 @@ -69,6 +70,7 @@
130  obj-$(CONFIG_USB_PRINTER)      += printer.o
131  obj-$(CONFIG_USB_AUDIO)                += audio.o
132  obj-$(CONFIG_USB_EMI26)                += emi26.o
133 +obj-$(CONFIG_USB_MIDI)         += usb-midi.o
134  obj-$(CONFIG_USB_IBMCAM)       += ibmcam.o usbvideo.o ultracam.o
135  obj-$(CONFIG_USB_PWC)          += pwc.o
136  obj-$(CONFIG_USB_DC2XX)                += dc2xx.o
137 @@ -85,6 +87,7 @@
138  obj-$(CONFIG_USB_KAWETH)        += kaweth.o
139  obj-$(CONFIG_USB_CDCETHER)     += CDCEther.o
140  obj-$(CONFIG_USB_RIO500)       += rio500.o
141 +obj-$(CONFIG_USB_TIGL)          += tiglusb.o
142  obj-$(CONFIG_USB_DSBR)         += dsbr100.o
143  obj-$(CONFIG_USB_MICROTEK)     += microtek.o
144  obj-$(CONFIG_USB_HPUSBSCSI)    += hpusbscsi.o
145 @@ -92,6 +95,7 @@
146  obj-$(CONFIG_USB_USBNET)       += usbnet.o
147  obj-$(CONFIG_USB_AUERSWALD)    += auerswald.o
148  obj-$(CONFIG_USB_BRLVGER)      += brlvger.o
149 +obj-$(CONFIG_USB_LCD)          += usblcd.o
150  
151  # Object files in subdirectories
152  mod-subdirs    := serial hcd
153 diff -Nur linux-2.4.19.old/drivers/usb/acm.c linux-2.4.19/drivers/usb/acm.c
154 --- linux-2.4.19.old/drivers/usb/acm.c  Fri Oct  5 21:06:08 2001
155 +++ linux-2.4.19/drivers/usb/acm.c      Mon Nov 25 12:26:54 2002
156 @@ -184,7 +184,7 @@
157  static void acm_ctrl_irq(struct urb *urb)
158  {
159         struct acm *acm = urb->context;
160 -       devrequest *dr = urb->transfer_buffer;
161 +       struct usb_ctrlrequest *dr = urb->transfer_buffer;
162         unsigned char *data = (unsigned char *)(dr + 1);
163         int newctrl;
164  
165 @@ -195,7 +195,7 @@
166                 return;
167         }
168  
169 -       switch (dr->request) {
170 +       switch (dr->bRequest) {
171  
172                 case ACM_IRQ_NETWORK:
173  
174 @@ -223,7 +223,7 @@
175  
176                 default:
177                         dbg("unknown control event received: request %d index %d len %d data0 %d data1 %d",
178 -                               dr->request, dr->index, dr->length, data[0], data[1]);
179 +                               dr->bRequest, dr->wIndex, dr->wLength, data[0], data[1]);
180                         return;
181         }
182  }
183 diff -Nur linux-2.4.19.old/drivers/usb/aiptek.c linux-2.4.19/drivers/usb/aiptek.c
184 --- linux-2.4.19.old/drivers/usb/aiptek.c       Thu Jan  1 01:00:00 1970
185 +++ linux-2.4.19/drivers/usb/aiptek.c   Mon Nov 25 12:26:54 2002
186 @@ -0,0 +1,332 @@
187 +/*
188 + *  Native support for the Aiptek 8000U
189 + *
190 + *  Copyright (c) 2001 Chris Atenasio          <chris@crud.net>
191 + *
192 + *  based on wacom.c by
193 + *     Vojtech Pavlik      <vojtech@suse.cz>
194 + *     Andreas Bach Aaen   <abach@stofanet.dk>
195 + *     Clifford Wolf       <clifford@clifford.at>
196 + *     Sam Mosel           <sam.mosel@computer.org>
197 + *     James E. Blair      <corvus@gnu.org>
198 + *     Daniel Egger        <egger@suse.de>
199 + *
200 + *
201 + *  Many thanks to Oliver Kuechemann for his support.
202 + *
203 + *  ChangeLog:
204 + *      v0.1 - Initial release
205 + *      v0.2 - Hack to get around fake event 28's.
206 + *      v0.3 - Make URB dynamic (Bryan W. Headley, Jun-8-2002)
207 + */
208 +
209 +/*
210 + * This program is free software; you can redistribute it and/or modify
211 + * it under the terms of the GNU General Public License as published by
212 + * the Free Software Foundation; either version 2 of the License, or
213 + * (at your option) any later version.
214 + *
215 + * This program is distributed in the hope that it will be useful,
216 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
217 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
218 + * GNU General Public License for more details.
219 + *
220 + * You should have received a copy of the GNU General Public License
221 + * along with this program; if not, write to the Free Software
222 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
223 + */
224 +
225 +#include <linux/kernel.h>
226 +#include <linux/slab.h>
227 +#include <linux/input.h>
228 +#include <linux/module.h>
229 +#include <linux/init.h>
230 +#include <linux/usb.h>
231 +
232 +/*
233 + * Version Information
234 + */
235 +#define DRIVER_VERSION "v0.3"
236 +#define DRIVER_AUTHOR "Chris Atenasio <chris@crud.net>"
237 +#define DRIVER_DESC "USB Aiptek 6000U/8000U tablet driver (Linux 2.4.x)"
238 +
239 +MODULE_AUTHOR(DRIVER_AUTHOR);
240 +MODULE_DESCRIPTION(DRIVER_DESC);
241 +MODULE_LICENSE("GPL");
242 +
243 +/*
244 + * Aiptek status packet:
245 + *
246 + *        bit7  bit6  bit5  bit4  bit3  bit2  bit1  bit0
247 + * byte0   0     0     0     0     0     0     1     0
248 + * byte1  X7    X6    X5    X4    X3    X2    X1    X0
249 + * byte2  X15   X14   X13   X12   X11   X10   X9    X8
250 + * byte3  Y7    Y6    Y5    Y4    Y3    Y2    Y1    Y0
251 + * byte4  Y15   Y14   Y13   Y12   Y11   Y10   Y9    Y8
252 + * byte5   *     *     *    BS2   BS1   Tip   DV    IR
253 + * byte6  P7    P6    P5    P4    P3    P2    P1    P0
254 + * byte7  P15   P14   P13   P12   P11   P10   P9    P8
255 + *
256 + * IR: In Range = Proximity on
257 + * DV = Data Valid
258 + *
259 + * 
260 + * Command Summary:
261 + *
262 + * Command/Data    Description     Return Bytes    Return Value
263 + * 0x10/0x00       SwitchToMouse       0
264 + * 0x10/0x01       SwitchToTablet      0
265 + * 0x18/0x04       Resolution500LPI    0
266 + * 0x17/0x00       FilterOn            0
267 + * 0x12/0xFF       AutoGainOn          0
268 + * 0x01/0x00       GetXExtension       2           MaxX
269 + * 0x01/0x01       GetYExtension       2           MaxY
270 + * 0x02/0x00       GetModelCode        2           ModelCode = LOBYTE
271 + * 0x03/0x00       GetODMCode          2           ODMCode
272 + * 0x08/0x00       GetPressureLevels   2           =512
273 + * 0x04/0x00       GetFirmwareVersion  2           Firmware Version
274 + *
275 + *
276 + * To initialize the tablet:
277 + *
278 + * (1) Send command Resolution500LPI
279 + * (2) Option Commands (GetXExtension, GetYExtension)
280 + * (3) Send command SwitchToTablet
281 + */
282 +
283 +#define USB_VENDOR_ID_AIPTEK   0x08ca
284 +
285 +struct aiptek_features {
286 +       char *name;
287 +       int pktlen;
288 +       int x_max;
289 +       int y_max;
290 +       int pressure_min;
291 +       int pressure_max;
292 +       void (*irq) (struct urb * urb);
293 +       unsigned long evbit;
294 +       unsigned long absbit;
295 +       unsigned long relbit;
296 +       unsigned long btnbit;
297 +       unsigned long digibit;
298 +};
299 +
300 +struct aiptek {
301 +       signed char data[10];
302 +       struct input_dev dev;
303 +       struct usb_device *usbdev;
304 +       struct urb *irq;
305 +       struct aiptek_features *features;
306 +       int tool;
307 +       int open;
308 +};
309 +
310 +static void
311 +aiptek_irq(struct urb *urb)
312 +{
313 +       struct aiptek *aiptek = urb->context;
314 +       unsigned char *data = aiptek->data;
315 +       struct input_dev *dev = &aiptek->dev;
316 +       int x;
317 +       int y;
318 +       int pressure;
319 +       int proximity;
320 +
321 +       if (urb->status)
322 +               return;
323 +
324 +       if ((data[0] & 2) == 0) {
325 +               dbg("received unknown report #%d", data[0]);
326 +       }
327 +
328 +       proximity = data[5] & 0x01;
329 +       input_report_key(dev, BTN_TOOL_PEN, proximity);
330 +
331 +       x = ((__u32) data[1]) | ((__u32) data[2] << 8);
332 +       y = ((__u32) data[3]) | ((__u32) data[4] << 8);
333 +       pressure = ((__u32) data[6]) | ((__u32) data[7] << 8);
334 +       pressure -= aiptek->features->pressure_min;
335 +
336 +       if (pressure < 0) {
337 +               pressure = 0;
338 +       }
339 +
340 +       if (proximity) {
341 +               input_report_abs(dev, ABS_X, x);
342 +               input_report_abs(dev, ABS_Y, y);
343 +               input_report_abs(dev, ABS_PRESSURE, pressure);
344 +               input_report_key(dev, BTN_TOUCH, data[5] & 0x04);
345 +               input_report_key(dev, BTN_STYLUS, data[5] & 0x08);
346 +               input_report_key(dev, BTN_STYLUS2, data[5] & 0x10);
347 +       }
348 +
349 +}
350 +
351 +struct aiptek_features aiptek_features[] = {
352 +       {"Aiptek 6000U/8000U", 
353 +        8, 3000, 2250, 26, 511, aiptek_irq, 0, 0, 0, 0},
354 +       {NULL, 0}
355 +};
356 +
357 +struct usb_device_id aiptek_ids[] = {
358 +       {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x20), driver_info:0},
359 +       {}
360 +};
361 +
362 +MODULE_DEVICE_TABLE(usb, aiptek_ids);
363 +
364 +static int
365 +aiptek_open(struct input_dev *dev)
366 +{
367 +       struct aiptek *aiptek = dev->private;
368 +
369 +       if (aiptek->open++)
370 +               return 0;
371 +
372 +       aiptek->irq->dev = aiptek->usbdev;
373 +       if (usb_submit_urb(aiptek->irq))
374 +               return -EIO;
375 +
376 +       return 0;
377 +}
378 +
379 +static void
380 +aiptek_close(struct input_dev *dev)
381 +{
382 +       struct aiptek *aiptek = dev->private;
383 +
384 +       if (!--aiptek->open)
385 +               usb_unlink_urb(aiptek->irq);
386 +}
387 +
388 +static void
389 +aiptek_command(struct usb_device *dev, unsigned int ifnum,
390 +              unsigned char command, unsigned char data)
391 +{
392 +       __u8 buf[3];
393 +
394 +       buf[0] = 4;
395 +       buf[1] = command;
396 +       buf[2] = data;
397 +
398 +       if (usb_set_report(dev, ifnum, 3, 2, buf, 3) != 3) {
399 +               dbg("aiptek_command: 0x%x 0x%x\n", command, data);
400 +       }
401 +}
402 +
403 +static void*
404 +aiptek_probe(struct usb_device *dev, unsigned int ifnum,
405 +            const struct usb_device_id *id)
406 +{
407 +       struct usb_endpoint_descriptor *endpoint;
408 +       struct aiptek *aiptek;
409 +
410 +       if (!(aiptek = kmalloc(sizeof (struct aiptek), GFP_KERNEL)))
411 +               return NULL;
412 +
413 +       memset(aiptek, 0, sizeof (struct aiptek));
414 +
415 +       aiptek->irq = usb_alloc_urb(0);
416 +       if (!aiptek->irq) {
417 +               kfree(aiptek);
418 +               return NULL;
419 +       }
420 +
421 +       // Resolution500LPI
422 +       aiptek_command(dev, ifnum, 0x18, 0x04);
423 +
424 +       // SwitchToTablet
425 +       aiptek_command(dev, ifnum, 0x10, 0x01);
426 +
427 +       aiptek->features = aiptek_features + id->driver_info;
428 +
429 +       aiptek->dev.evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_MSC) |
430 +           aiptek->features->evbit;
431 +
432 +       aiptek->dev.absbit[0] |= BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE) |
433 +           BIT(ABS_MISC) | aiptek->features->absbit;
434 +
435 +       aiptek->dev.relbit[0] |= aiptek->features->relbit;
436 +
437 +       aiptek->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) |
438 +           BIT(BTN_MIDDLE) | aiptek->features->btnbit;
439 +
440 +       aiptek->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) |
441 +           BIT(BTN_TOOL_MOUSE) | BIT(BTN_TOUCH) |
442 +           BIT(BTN_STYLUS) | BIT(BTN_STYLUS2) | aiptek->features->digibit;
443 +
444 +       aiptek->dev.mscbit[0] = BIT(MSC_SERIAL);
445 +
446 +       aiptek->dev.absmax[ABS_X] = aiptek->features->x_max;
447 +       aiptek->dev.absmax[ABS_Y] = aiptek->features->y_max;
448 +       aiptek->dev.absmax[ABS_PRESSURE] = aiptek->features->pressure_max -
449 +           aiptek->features->pressure_min;
450 +
451 +       aiptek->dev.absfuzz[ABS_X] = 0;
452 +       aiptek->dev.absfuzz[ABS_Y] = 0;
453 +
454 +       aiptek->dev.private = aiptek;
455 +       aiptek->dev.open = aiptek_open;
456 +       aiptek->dev.close = aiptek_close;
457 +
458 +       aiptek->dev.name = aiptek->features->name;
459 +       aiptek->dev.idbus = BUS_USB;
460 +       aiptek->dev.idvendor = dev->descriptor.idVendor;
461 +       aiptek->dev.idproduct = dev->descriptor.idProduct;
462 +       aiptek->dev.idversion = dev->descriptor.bcdDevice;
463 +       aiptek->usbdev = dev;
464 +
465 +       endpoint = dev->config[0].interface[ifnum].altsetting[0].endpoint + 0;
466 +
467 +       FILL_INT_URB(aiptek->irq,
468 +                 dev,
469 +                 usb_rcvintpipe(dev, endpoint->bEndpointAddress),
470 +                        aiptek->data,
471 +                 aiptek->features->pktlen,
472 +                        aiptek->features->irq,
473 +                 aiptek,
474 +                 endpoint->bInterval);
475 +
476 +       input_register_device(&aiptek->dev);
477 +
478 +       printk(KERN_INFO "input%d: %s on usb%d:%d.%d\n",
479 +              aiptek->dev.number, aiptek->features->name, dev->bus->busnum,
480 +              dev->devnum, ifnum);
481 +
482 +       return aiptek;
483 +}
484 +
485 +static void
486 +aiptek_disconnect(struct usb_device *dev, void *ptr)
487 +{
488 +       struct aiptek *aiptek = ptr;
489 +       usb_unlink_urb(aiptek->irq);
490 +       input_unregister_device(&aiptek->dev);
491 +       usb_free_urb(aiptek->irq);
492 +       kfree(aiptek);
493 +}
494 +
495 +static struct usb_driver aiptek_driver = {
496 +       name:"aiptek",
497 +       probe:aiptek_probe,
498 +       disconnect:aiptek_disconnect,
499 +       id_table:aiptek_ids,
500 +};
501 +
502 +static int __init
503 +aiptek_init(void)
504 +{
505 +       usb_register(&aiptek_driver);
506 +       info(DRIVER_VERSION " " DRIVER_AUTHOR);
507 +       info(DRIVER_DESC);
508 +       return 0;
509 +}
510 +
511 +static void __exit
512 +aiptek_exit(void)
513 +{
514 +       usb_deregister(&aiptek_driver);
515 +}
516 +
517 +module_init(aiptek_init);
518 +module_exit(aiptek_exit);
519 diff -Nur linux-2.4.19.old/drivers/usb/audio.c linux-2.4.19/drivers/usb/audio.c
520 --- linux-2.4.19.old/drivers/usb/audio.c        Sat Aug  3 02:39:44 2002
521 +++ linux-2.4.19/drivers/usb/audio.c    Mon Nov 25 12:26:54 2002
522 @@ -297,13 +297,13 @@
523  #define FLG_CONNECTED    32
524  
525  struct my_data_urb {
526 -       urb_t urb;
527 -       iso_packet_descriptor_t isoframe[DESCFRAMES];
528 +       struct urb urb;
529 +       struct iso_packet_descriptor isoframe[DESCFRAMES];
530  };
531  
532  struct my_sync_urb {
533 -       urb_t urb;
534 -       iso_packet_descriptor_t isoframe[SYNCFRAMES];
535 +       struct urb urb;
536 +       struct iso_packet_descriptor isoframe[SYNCFRAMES];
537  };
538  
539  
540 @@ -833,7 +833,7 @@
541         }
542  }              
543  
544 -static int usbin_prepare_desc(struct usbin *u, purb_t urb)
545 +static int usbin_prepare_desc(struct usbin *u, struct urb *urb)
546  {
547         unsigned int i, maxsize, offs;
548  
549 @@ -850,7 +850,7 @@
550   * return value: 0 if descriptor should be restarted, -1 otherwise
551   * convert sample format on the fly if necessary
552   */
553 -static int usbin_retire_desc(struct usbin *u, purb_t urb)
554 +static int usbin_retire_desc(struct usbin *u, struct urb *urb)
555  {
556         unsigned int i, ufmtsh, dfmtsh, err = 0, cnt, scnt, dmafree;
557         unsigned char *cp;
558 @@ -930,7 +930,7 @@
559  /*
560   * we output sync data
561   */
562 -static int usbin_sync_prepare_desc(struct usbin *u, purb_t urb)
563 +static int usbin_sync_prepare_desc(struct usbin *u, struct urb *urb)
564  {
565         unsigned char *cp = urb->transfer_buffer;
566         unsigned int i, offs;
567 @@ -948,7 +948,7 @@
568  /*
569   * return value: 0 if descriptor should be restarted, -1 otherwise
570   */
571 -static int usbin_sync_retire_desc(struct usbin *u, purb_t urb)
572 +static int usbin_sync_retire_desc(struct usbin *u, struct urb *urb)
573  {
574         unsigned int i;
575         
576 @@ -996,7 +996,7 @@
577  {
578         struct usb_device *dev = as->state->usbdev;
579         struct usbin *u = &as->usbin;
580 -       purb_t urb;
581 +       struct urb *urb;
582         unsigned long flags;
583         unsigned int maxsze, bufsz;
584  
585 @@ -1186,7 +1186,7 @@
586         }
587  }              
588  
589 -static int usbout_prepare_desc(struct usbout *u, purb_t urb)
590 +static int usbout_prepare_desc(struct usbout *u, struct urb *urb)
591  {
592         unsigned int i, ufmtsh, dfmtsh, err = 0, cnt, scnt, offs;
593         unsigned char *cp = urb->transfer_buffer;
594 @@ -1238,7 +1238,7 @@
595  /*
596   * return value: 0 if descriptor should be restarted, -1 otherwise
597   */
598 -static int usbout_retire_desc(struct usbout *u, purb_t urb)
599 +static int usbout_retire_desc(struct usbout *u, struct urb *urb)
600  {
601         unsigned int i;
602  
603 @@ -1285,7 +1285,7 @@
604         spin_unlock_irqrestore(&as->lock, flags);
605  }
606  
607 -static int usbout_sync_prepare_desc(struct usbout *u, purb_t urb)
608 +static int usbout_sync_prepare_desc(struct usbout *u, struct urb *urb)
609  {
610         unsigned int i, offs;
611  
612 @@ -1299,7 +1299,7 @@
613  /*
614   * return value: 0 if descriptor should be restarted, -1 otherwise
615   */
616 -static int usbout_sync_retire_desc(struct usbout *u, purb_t urb)
617 +static int usbout_sync_retire_desc(struct usbout *u, struct urb *urb)
618  {
619         unsigned char *cp = urb->transfer_buffer;
620         unsigned int f, i;
621 @@ -1361,7 +1361,7 @@
622  {
623         struct usb_device *dev = as->state->usbdev;
624         struct usbout *u = &as->usbout;
625 -       purb_t urb;
626 +       struct urb *urb;
627         unsigned long flags;
628         unsigned int maxsze, bufsz;
629  
630 diff -Nur linux-2.4.19.old/drivers/usb/auerswald.c linux-2.4.19/drivers/usb/auerswald.c
631 --- linux-2.4.19.old/drivers/usb/auerswald.c    Sat Aug  3 02:39:44 2002
632 +++ linux-2.4.19/drivers/usb/auerswald.c        Mon Nov 25 12:26:54 2002
633 @@ -2,7 +2,7 @@
634  /*
635   *      auerswald.c  --  Auerswald PBX/System Telephone usb driver.
636   *
637 - *      Copyright (C) 2001  Wolfgang Mües (wmues@nexgo.de)
638 + *      Copyright (C) 2001  Wolfgang Mües (wolfgang@iksw-muees.de)
639   *
640   *      Very much code of this driver is borrowed from dabusb.c (Deti Fliegl)
641   *      and from the USB Skeleton driver (Greg Kroah-Hartman). Thank you.
642 @@ -50,7 +50,7 @@
643  /*-------------------------------------------------------------------*/
644  /* Version Information */
645  #define DRIVER_VERSION "0.9.11"
646 -#define DRIVER_AUTHOR  "Wolfgang Mües <wmues@nexgo.de>"
647 +#define DRIVER_AUTHOR  "Wolfgang Mües <wolfgang@iksw-muees.de>"
648  #define DRIVER_DESC    "Auerswald PBX/System Telephone usb driver"
649  
650  /*-------------------------------------------------------------------*/
651 @@ -176,7 +176,7 @@
652  typedef struct
653  {
654          struct auerchain *chain;        /* pointer to the chain to which this element belongs */
655 -        urb_t * urbp;                   /* pointer to attached urb */
656 +        struct urb * urbp;                   /* pointer to attached urb */
657          void *context;                  /* saved URB context */
658          usb_complete_t complete;        /* saved URB completion function */
659          struct list_head list;          /* to include element into a list */
660 @@ -206,8 +206,8 @@
661          char *bufp;                     /* reference to allocated data buffer */
662          unsigned int len;               /* number of characters in data buffer */
663         unsigned int retries;           /* for urb retries */
664 -        devrequest *dr;                 /* for setup data in control messages */
665 -        urb_t * urbp;                   /* USB urb */
666 +        struct usb_ctrlrequest *dr;                 /* for setup data in control messages */
667 +        struct urb * urbp;                   /* USB urb */
668          struct auerbufctl *list;        /* pointer to list */
669          struct list_head buff_list;     /* reference to next buffer in list */
670  } auerbuf_t,*pauerbuf_t;
671 @@ -244,7 +244,7 @@
672         int                     open_count;         /* count the number of open character channels */
673          char                   dev_desc[AUSI_DLEN];/* for storing a textual description */
674          unsigned int           maxControlLength;   /* max. Length of control paket (without header) */
675 -        urb_t *                inturbp;            /* interrupt urb */
676 +        struct urb *           inturbp;            /* interrupt urb */
677          char *                 intbufp;            /* data buffer for interrupt urb */
678         unsigned int            irqsize;            /* size of interrupt endpoint 1 */
679          struct auerchain       controlchain;       /* for chaining of control messages */
680 @@ -281,7 +281,7 @@
681  
682  /*-------------------------------------------------------------------*/
683  /* Forwards */
684 -static void auerswald_ctrlread_complete (urb_t * urb);
685 +static void auerswald_ctrlread_complete (struct urb * urb);
686  static void auerswald_removeservice (pauerswald_t cp, pauerscon_t scp);
687  
688  
689 @@ -290,7 +290,7 @@
690  /* --------------------------                                        */
691  
692  /* completion function for chained urbs */
693 -static void auerchain_complete (urb_t * urb)
694 +static void auerchain_complete (struct urb * urb)
695  {
696         unsigned long flags;
697          int result;
698 @@ -357,7 +357,7 @@
699     this function may be called from completion context or from user space!
700     early = 1 -> submit in front of chain
701  */
702 -static int auerchain_submit_urb_list (pauerchain_t acp, urb_t * urb, int early)
703 +static int auerchain_submit_urb_list (pauerchain_t acp, struct urb * urb, int early)
704  {
705          int result;
706          unsigned long flags;
707 @@ -431,7 +431,7 @@
708  /* submit function for chained urbs
709     this function may be called from completion context or from user space!
710  */
711 -static int auerchain_submit_urb (pauerchain_t acp, urb_t * urb)
712 +static int auerchain_submit_urb (pauerchain_t acp, struct urb * urb)
713  {
714         return auerchain_submit_urb_list (acp, urb, 0);
715  }
716 @@ -440,10 +440,10 @@
717     the result is 0 if the urb is cancelled, or -EINPROGRESS if
718     USB_ASYNC_UNLINK is set and the function is successfully started.
719  */
720 -static int auerchain_unlink_urb (pauerchain_t acp, urb_t * urb)
721 +static int auerchain_unlink_urb (pauerchain_t acp, struct urb * urb)
722  {
723         unsigned long flags;
724 -        urb_t * urbp;
725 +        struct urb * urbp;
726          pauerchainelement_t acep;
727          struct list_head *tmp;
728  
729 @@ -499,7 +499,7 @@
730  static void auerchain_unlink_all (pauerchain_t acp)
731  {
732         unsigned long flags;
733 -        urb_t * urbp;
734 +        struct urb * urbp;
735          pauerchainelement_t acep;
736  
737          dbg ("auerchain_unlink_all called");
738 @@ -605,7 +605,7 @@
739  
740  
741  /* completion handler for synchronous chained URBs */
742 -static void auerchain_blocking_completion (urb_t *urb)
743 +static void auerchain_blocking_completion (struct urb *urb)
744  {
745         pauerchain_chs_t pchs = (pauerchain_chs_t)urb->context;
746         pchs->done = 1;
747 @@ -615,7 +615,7 @@
748  
749  
750  /* Starts chained urb and waits for completion or timeout */
751 -static int auerchain_start_wait_urb (pauerchain_t acp, urb_t *urb, int timeout, int* actual_length)
752 +static int auerchain_start_wait_urb (pauerchain_t acp, struct urb *urb, int timeout, int* actual_length)
753  {
754         DECLARE_WAITQUEUE (wait, current);
755         auerchain_chs_t chs;
756 @@ -690,12 +690,12 @@
757                                   __u16 value, __u16 index, void *data, __u16 size, int timeout)
758  {
759         int ret;
760 -       devrequest *dr;
761 -       urb_t *urb;
762 +       struct usb_ctrlrequest *dr;
763 +       struct urb *urb;
764          int length;
765  
766          dbg ("auerchain_control_msg");
767 -        dr = kmalloc (sizeof (devrequest), GFP_KERNEL);
768 +        dr = kmalloc (sizeof (struct usb_ctrlrequest), GFP_KERNEL);
769         if (!dr)
770                 return -ENOMEM;
771         urb = usb_alloc_urb (0);
772 @@ -704,11 +704,11 @@
773                 return -ENOMEM;
774          }
775  
776 -       dr->requesttype = requesttype;
777 -       dr->request = request;
778 -       dr->value  = cpu_to_le16 (value);
779 -       dr->index  = cpu_to_le16 (index);
780 -       dr->length = cpu_to_le16 (size);
781 +       dr->bRequestType = requesttype;
782 +       dr->bRequest = request;
783 +       dr->wValue  = cpu_to_le16 (value);
784 +       dr->wIndex  = cpu_to_le16 (index);
785 +       dr->wLength = cpu_to_le16 (size);
786  
787         FILL_CONTROL_URB (urb, dev, pipe, (unsigned char*)dr, data, size,    /* build urb */
788                           (usb_complete_t)auerchain_blocking_completion,0);
789 @@ -799,7 +799,7 @@
790                  INIT_LIST_HEAD (&bep->buff_list);
791                  bep->bufp = (char *) kmalloc (bufsize, GFP_KERNEL);
792                  if (!bep->bufp) goto bl_fail;
793 -                bep->dr = (devrequest *) kmalloc (sizeof (devrequest), GFP_KERNEL);
794 +                bep->dr = (struct usb_ctrlrequest *) kmalloc (sizeof (struct usb_ctrlrequest), GFP_KERNEL);
795                  if (!bep->dr) goto bl_fail;
796                  bep->urbp = usb_alloc_urb (0);
797                  if (!bep->urbp) goto bl_fail;
798 @@ -874,7 +874,7 @@
799  }
800  
801  /* Completion of asynchronous write block */
802 -static void auerchar_ctrlwrite_complete (urb_t * urb)
803 +static void auerchar_ctrlwrite_complete (struct urb * urb)
804  {
805         pauerbuf_t bp = (pauerbuf_t) urb->context;
806         pauerswald_t cp = ((pauerswald_t)((char *)(bp->list)-(unsigned long)(&((pauerswald_t)0)->bufctl)));
807 @@ -887,7 +887,7 @@
808  }
809  
810  /* Completion handler for dummy retry packet */
811 -static void auerswald_ctrlread_wretcomplete (urb_t * urb)
812 +static void auerswald_ctrlread_wretcomplete (struct urb * urb)
813  {
814          pauerbuf_t bp = (pauerbuf_t) urb->context;
815          pauerswald_t cp;
816 @@ -907,13 +907,13 @@
817         }
818  
819         /* fill the control message */
820 -       bp->dr->requesttype = AUT_RREQ;
821 -       bp->dr->request     = AUV_RBLOCK;
822 -       bp->dr->length      = bp->dr->value;    /* temporary stored */
823 -       bp->dr->value       = cpu_to_le16 (1);  /* Retry Flag */
824 +       bp->dr->bRequestType = AUT_RREQ;
825 +       bp->dr->bRequest     = AUV_RBLOCK;
826 +       bp->dr->wLength      = bp->dr->wValue;  /* temporary stored */
827 +       bp->dr->wValue       = cpu_to_le16 (1); /* Retry Flag */
828         /* bp->dr->index    = channel id;          remains */
829         FILL_CONTROL_URB (bp->urbp, cp->usbdev, usb_rcvctrlpipe (cp->usbdev, 0),
830 -                          (unsigned char*)bp->dr, bp->bufp, le16_to_cpu (bp->dr->length),
831 +                          (unsigned char*)bp->dr, bp->bufp, le16_to_cpu (bp->dr->wLength),
832                           (usb_complete_t)auerswald_ctrlread_complete,bp);
833  
834         /* submit the control msg as next paket */
835 @@ -926,7 +926,7 @@
836  }
837  
838  /* completion handler for receiving of control messages */
839 -static void auerswald_ctrlread_complete (urb_t * urb)
840 +static void auerswald_ctrlread_complete (struct urb * urb)
841  {
842          unsigned int  serviceid;
843          pauerswald_t  cp;
844 @@ -955,11 +955,11 @@
845                 bp->retries++;
846                 dbg ("Retry count = %d", bp->retries);
847                 /* send a long dummy control-write-message to allow device firmware to react */
848 -               bp->dr->requesttype = AUT_WREQ;
849 -               bp->dr->request     = AUV_DUMMY;
850 -               bp->dr->value       = bp->dr->length; /* temporary storage */
851 +               bp->dr->bRequestType = AUT_WREQ;
852 +               bp->dr->bRequest     = AUV_DUMMY;
853 +               bp->dr->wValue       = bp->dr->wLength; /* temporary storage */
854                 // bp->dr->index    channel ID remains
855 -               bp->dr->length      = cpu_to_le16 (32); /* >= 8 bytes */
856 +               bp->dr->wLength      = cpu_to_le16 (32); /* >= 8 bytes */
857                 FILL_CONTROL_URB (bp->urbp, cp->usbdev, usb_sndctrlpipe (cp->usbdev, 0),
858                         (unsigned char*)bp->dr, bp->bufp, 32,
859                         (usb_complete_t)auerswald_ctrlread_wretcomplete,bp);
860 @@ -972,7 +972,7 @@
861                                 auerswald_ctrlread_wretcomplete (bp->urbp);
862                 }
863                  return;
864 -        }
865 +       } 
866  
867          /* get the actual bytecount (incl. headerbyte) */
868          bp->len = urb->actual_length;
869 @@ -998,7 +998,7 @@
870     messages from the USB device.
871  */
872  /* int completion handler. */
873 -static void auerswald_int_complete (urb_t * urb)
874 +static void auerswald_int_complete (struct urb * urb)
875  {
876          unsigned long flags;
877          unsigned  int channelid;
878 @@ -1074,11 +1074,11 @@
879          }
880  
881         /* fill the control message */
882 -        bp->dr->requesttype = AUT_RREQ;
883 -       bp->dr->request     = AUV_RBLOCK;
884 -       bp->dr->value       = cpu_to_le16 (0);
885 -       bp->dr->index       = cpu_to_le16 (channelid | AUH_DIRECT | AUH_UNSPLIT);
886 -       bp->dr->length      = cpu_to_le16 (bytecount);
887 +        bp->dr->bRequestType = AUT_RREQ;
888 +       bp->dr->bRequest     = AUV_RBLOCK;
889 +       bp->dr->wValue       = cpu_to_le16 (0);
890 +       bp->dr->wIndex       = cpu_to_le16 (channelid | AUH_DIRECT | AUH_UNSPLIT);
891 +       bp->dr->wLength      = cpu_to_le16 (bytecount);
892         FILL_CONTROL_URB (bp->urbp, cp->usbdev, usb_rcvctrlpipe (cp->usbdev, 0),
893                            (unsigned char*)bp->dr, bp->bufp, bytecount,
894                           (usb_complete_t)auerswald_ctrlread_complete,bp);
895 @@ -1327,7 +1327,7 @@
896  }
897  
898  
899 -/* remove a service from the the device
900 +/* remove a service from the device
901     scp->id must be set! */
902  static void auerswald_removeservice (pauerswald_t cp, pauerscon_t scp)
903  {
904 @@ -1813,11 +1813,11 @@
905  
906         /* Set the transfer Parameters */
907         bp->len = len+AUH_SIZE;
908 -        bp->dr->requesttype = AUT_WREQ;
909 -       bp->dr->request     = AUV_WBLOCK;
910 -       bp->dr->value       = cpu_to_le16 (0);
911 -       bp->dr->index       = cpu_to_le16 (ccp->scontext.id | AUH_DIRECT | AUH_UNSPLIT);
912 -       bp->dr->length      = cpu_to_le16 (len+AUH_SIZE);
913 +        bp->dr->bRequestType = AUT_WREQ;
914 +       bp->dr->bRequest     = AUV_WBLOCK;
915 +       bp->dr->wValue       = cpu_to_le16 (0);
916 +       bp->dr->wIndex       = cpu_to_le16 (ccp->scontext.id | AUH_DIRECT | AUH_UNSPLIT);
917 +       bp->dr->wLength      = cpu_to_le16 (len+AUH_SIZE);
918         FILL_CONTROL_URB (bp->urbp, cp->usbdev, usb_sndctrlpipe (cp->usbdev, 0),
919                     (unsigned char*)bp->dr, bp->bufp, len+AUH_SIZE,
920                     auerchar_ctrlwrite_complete, bp);
921 diff -Nur linux-2.4.19.old/drivers/usb/bluetooth.c linux-2.4.19/drivers/usb/bluetooth.c
922 --- linux-2.4.19.old/drivers/usb/bluetooth.c    Tue Nov 13 18:19:41 2001
923 +++ linux-2.4.19/drivers/usb/bluetooth.c        Mon Nov 25 12:26:54 2002
924 @@ -4,8 +4,12 @@
925   * Copyright (c) 2000, 2001 Greg Kroah-Hartman <greg@kroah.com>
926   * Copyright (c) 2000 Mark Douglas Corner      <mcorner@umich.edu>
927   *
928 - * USB Bluetooth driver, based on the Bluetooth Spec version 1.0B
929 + * USB Bluetooth TTY driver, based on the Bluetooth Spec version 1.0B
930   * 
931 + * (2001/11/30) Version 0.13 gkh
932 + *     - added locking patch from Masoodur Rahman <rmasoodu@in.ibm.com>
933 + *     - removed active variable, as open_count will do.
934 + *
935   * (2001/07/09) Version 0.12 gkh
936   *     - removed in_interrupt() call, as it doesn't make sense to do 
937   *       that anymore.
938 @@ -100,17 +104,14 @@
939  
940  
941  #include <linux/kernel.h>
942 -#include <linux/sched.h>
943 -#include <linux/signal.h>
944  #include <linux/errno.h>
945 -#include <linux/poll.h>
946  #include <linux/init.h>
947  #include <linux/slab.h>
948 -#include <linux/fcntl.h>
949  #include <linux/tty.h>
950  #include <linux/tty_driver.h>
951  #include <linux/tty_flip.h>
952  #include <linux/module.h>
953 +#include <asm/uaccess.h>
954  
955  #define DEBUG
956  #include <linux/usb.h>
957 @@ -118,7 +119,7 @@
958  /*
959   * Version Information
960   */
961 -#define DRIVER_VERSION "v0.12"
962 +#define DRIVER_VERSION "v0.13"
963  #define DRIVER_AUTHOR "Greg Kroah-Hartman, Mark Douglas Corner"
964  #define DRIVER_DESC "USB Bluetooth tty driver"
965  
966 @@ -170,12 +171,12 @@
967         struct tty_struct *     tty;            /* the coresponding tty for this port */
968  
969         unsigned char           minor;          /* the starting minor number for this device */
970 -       char                    active;         /* someone has this device open */
971         int                     throttle;       /* throttled by tty layer */
972 +       int                     open_count;
973         
974         __u8                    control_out_bInterfaceNum;
975         struct urb *            control_urb_pool[NUM_CONTROL_URBS];
976 -       devrequest              dr[NUM_CONTROL_URBS];
977 +       struct usb_ctrlrequest  dr[NUM_CONTROL_URBS];
978  
979         unsigned char *         interrupt_in_buffer;
980         struct urb *            interrupt_in_urb;
981 @@ -200,6 +201,7 @@
982         unsigned char           int_buffer[EVENT_BUFFER_SIZE];
983         unsigned int            bulk_packet_pos;
984         unsigned char           bulk_buffer[ACL_BUFFER_SIZE];   /* 64k preallocated, fix? */
985 +       struct semaphore        lock;
986  };
987  
988  
989 @@ -232,10 +234,10 @@
990  MODULE_DEVICE_TABLE (usb, usb_bluetooth_ids);
991  
992  static struct usb_driver usb_bluetooth_driver = {
993 -       name:           "bluetooth",
994 -       probe:          usb_bluetooth_probe,
995 -       disconnect:     usb_bluetooth_disconnect,
996 -       id_table:       usb_bluetooth_ids,
997 +       .name =         "bluetty",
998 +       .probe =        usb_bluetooth_probe,
999 +       .disconnect =   usb_bluetooth_disconnect,
1000 +       .id_table =     usb_bluetooth_ids,
1001  };
1002  
1003  static int                     bluetooth_refcount;
1004 @@ -283,11 +285,11 @@
1005  static int bluetooth_ctrl_msg (struct usb_bluetooth *bluetooth, int request, int value, const unsigned char *buf, int len)
1006  {
1007         struct urb *urb = NULL;
1008 -       devrequest *dr = NULL;
1009 +       struct usb_ctrlrequest *dr = NULL;
1010         int i;
1011         int status;
1012  
1013 -       dbg (__FUNCTION__);
1014 +       dbg ("%s", __FUNCTION__);
1015  
1016         /* try to find a free urb in our list */
1017         for (i = 0; i < NUM_CONTROL_URBS; ++i) {
1018 @@ -298,7 +300,7 @@
1019                 }
1020         }
1021         if (urb == NULL) {
1022 -               dbg (__FUNCTION__ " - no free urbs");
1023 +               dbg ("%s - no free urbs", __FUNCTION__);
1024                 return -ENOMEM;
1025         }
1026  
1027 @@ -306,7 +308,7 @@
1028         if (urb->transfer_buffer == NULL) {
1029                 urb->transfer_buffer = kmalloc (len, GFP_KERNEL);
1030                 if (urb->transfer_buffer == NULL) {
1031 -                       err (__FUNCTION__" - out of memory");
1032 +                       err ("%s - out of memory", __FUNCTION__);
1033                         return -ENOMEM;
1034                 }
1035         }
1036 @@ -314,17 +316,17 @@
1037                 kfree (urb->transfer_buffer);
1038                 urb->transfer_buffer = kmalloc (len, GFP_KERNEL);
1039                 if (urb->transfer_buffer == NULL) {
1040 -                       err (__FUNCTION__" - out of memory");
1041 +                       err ("%s - out of memory", __FUNCTION__);
1042                         return -ENOMEM;
1043                 }
1044         }
1045         memcpy (urb->transfer_buffer, buf, len);
1046  
1047 -       dr->requesttype = BLUETOOTH_CONTROL_REQUEST_TYPE;
1048 -       dr->request = request;
1049 -       dr->value = cpu_to_le16((u16) value);
1050 -       dr->index = cpu_to_le16((u16) bluetooth->control_out_bInterfaceNum);
1051 -       dr->length = cpu_to_le16((u16) len);
1052 +       dr->bRequestType= BLUETOOTH_CONTROL_REQUEST_TYPE;
1053 +       dr->bRequest = request;
1054 +       dr->wValue = cpu_to_le16((u16) value);
1055 +       dr->wIndex = cpu_to_le16((u16) bluetooth->control_out_bInterfaceNum);
1056 +       dr->wLength = cpu_to_le16((u16) len);
1057         
1058         FILL_CONTROL_URB (urb, bluetooth->dev, usb_sndctrlpipe(bluetooth->dev, 0),
1059                           (unsigned char*)dr, urb->transfer_buffer, len, bluetooth_ctrl_callback, bluetooth);
1060 @@ -332,7 +334,7 @@
1061         /* send it down the pipe */
1062         status = usb_submit_urb(urb);
1063         if (status)
1064 -               dbg(__FUNCTION__ " - usb_submit_urb(control) failed with status = %d", status);
1065 +               dbg("%s - usb_submit_urb(control) failed with status = %d", __FUNCTION__, status);
1066         
1067         return status;
1068  }
1069 @@ -349,7 +351,7 @@
1070         struct usb_bluetooth *bluetooth;
1071         int result;
1072  
1073 -       dbg(__FUNCTION__);
1074 +       dbg("%s", __FUNCTION__);
1075  
1076         /* initialize the pointer incase something fails */
1077         tty->driver_data = NULL;
1078 @@ -361,43 +363,46 @@
1079                 return -ENODEV;
1080         }
1081  
1082 -       if (bluetooth->active) {
1083 -               dbg (__FUNCTION__ " - device already open");
1084 -               return -EINVAL;
1085 -       }
1086 -
1087 -       /* set up our structure making the tty driver remember our object, and us it */
1088 -       tty->driver_data = bluetooth;
1089 -       bluetooth->tty = tty;
1090 -
1091 -       /* force low_latency on so that our tty_push actually forces the data through, 
1092 -        * otherwise it is scheduled, and with high data rates (like with OHCI) data
1093 -        * can get lost. */
1094 -       bluetooth->tty->low_latency = 1;
1095 +       down (&bluetooth->lock);
1096
1097 +       ++bluetooth->open_count;
1098 +       if (bluetooth->open_count == 1) {
1099 +               /* set up our structure making the tty driver remember our object, and us it */
1100 +               tty->driver_data = bluetooth;
1101 +               bluetooth->tty = tty;
1102 +
1103 +               /* force low_latency on so that our tty_push actually forces the data through, 
1104 +                * otherwise it is scheduled, and with high data rates (like with OHCI) data
1105 +                * can get lost. */
1106 +               bluetooth->tty->low_latency = 1;
1107         
1108 -       bluetooth->active = 1;
1109 -
1110 -       /* Reset the packet position counters */
1111 -       bluetooth->int_packet_pos = 0;
1112 -       bluetooth->bulk_packet_pos = 0;
1113 +               /* Reset the packet position counters */
1114 +               bluetooth->int_packet_pos = 0;
1115 +               bluetooth->bulk_packet_pos = 0;
1116  
1117  #ifndef BTBUGGYHARDWARE
1118 -       /* Start reading from the device */
1119 -       FILL_BULK_URB(bluetooth->read_urb, bluetooth->dev, 
1120 -                     usb_rcvbulkpipe(bluetooth->dev, bluetooth->bulk_in_endpointAddress),
1121 -                     bluetooth->bulk_in_buffer, bluetooth->bulk_in_buffer_size, 
1122 -                     bluetooth_read_bulk_callback, bluetooth);
1123 -       result = usb_submit_urb(bluetooth->read_urb);
1124 -       if (result)
1125 -               dbg(__FUNCTION__ " - usb_submit_urb(read bulk) failed with status %d", result);
1126 +               /* Start reading from the device */
1127 +               FILL_BULK_URB (bluetooth->read_urb, bluetooth->dev, 
1128 +                              usb_rcvbulkpipe(bluetooth->dev, bluetooth->bulk_in_endpointAddress),
1129 +                              bluetooth->bulk_in_buffer,
1130 +                              bluetooth->bulk_in_buffer_size,
1131 +                              bluetooth_read_bulk_callback, bluetooth);
1132 +               result = usb_submit_urb(bluetooth->read_urb);
1133 +               if (result)
1134 +                       dbg("%s - usb_submit_urb(read bulk) failed with status %d", __FUNCTION__, result);
1135  #endif
1136 -       FILL_INT_URB(bluetooth->interrupt_in_urb, bluetooth->dev, 
1137 -                    usb_rcvintpipe(bluetooth->dev, bluetooth->interrupt_in_endpointAddress),
1138 -                    bluetooth->interrupt_in_buffer, bluetooth->interrupt_in_buffer_size, 
1139 -                    bluetooth_int_callback, bluetooth, bluetooth->interrupt_in_interval);
1140 -       result = usb_submit_urb(bluetooth->interrupt_in_urb);
1141 -       if (result)
1142 -               dbg(__FUNCTION__ " - usb_submit_urb(interrupt in) failed with status %d", result);
1143 +               FILL_INT_URB (bluetooth->interrupt_in_urb, bluetooth->dev, 
1144 +                             usb_rcvintpipe(bluetooth->dev, bluetooth->interrupt_in_endpointAddress),
1145 +                             bluetooth->interrupt_in_buffer,
1146 +                             bluetooth->interrupt_in_buffer_size,
1147 +                             bluetooth_int_callback, bluetooth,
1148 +                             bluetooth->interrupt_in_interval);
1149 +               result = usb_submit_urb(bluetooth->interrupt_in_urb);
1150 +               if (result)
1151 +                       dbg("%s - usb_submit_urb(interrupt in) failed with status %d", __FUNCTION__, result);
1152 +       }
1153 +       
1154 +       up(&bluetooth->lock);
1155  
1156         return 0;
1157  }
1158 @@ -412,20 +417,26 @@
1159                 return;
1160         }
1161  
1162 -       dbg(__FUNCTION__);
1163 +       dbg("%s", __FUNCTION__);
1164  
1165 -       if (!bluetooth->active) {
1166 -               dbg (__FUNCTION__ " - device not opened");
1167 +       if (!bluetooth->open_count) {
1168 +               dbg ("%s - device not opened", __FUNCTION__);
1169                 return;
1170         }
1171  
1172 -       /* shutdown any bulk reads and writes that might be going on */
1173 -       for (i = 0; i < NUM_BULK_URBS; ++i)
1174 -               usb_unlink_urb (bluetooth->write_urb_pool[i]);
1175 -       usb_unlink_urb (bluetooth->read_urb);
1176 -       usb_unlink_urb (bluetooth->interrupt_in_urb);
1177 +       down (&bluetooth->lock);
1178
1179 +       --bluetooth->open_count;
1180 +       if (bluetooth->open_count <= 0) {
1181 +               bluetooth->open_count = 0;
1182  
1183 -       bluetooth->active = 0;
1184 +               /* shutdown any bulk reads and writes that might be going on */
1185 +               for (i = 0; i < NUM_BULK_URBS; ++i)
1186 +                       usb_unlink_urb (bluetooth->write_urb_pool[i]);
1187 +               usb_unlink_urb (bluetooth->read_urb);
1188 +               usb_unlink_urb (bluetooth->interrupt_in_urb);
1189 +       }
1190 +       up(&bluetooth->lock);
1191  }
1192  
1193  
1194 @@ -445,24 +456,24 @@
1195                 return -ENODEV;
1196         }
1197  
1198 -       dbg(__FUNCTION__ " - %d byte(s)", count);
1199 +       dbg("%s - %d byte(s)", __FUNCTION__, count);
1200  
1201 -       if (!bluetooth->active) {
1202 -               dbg (__FUNCTION__ " - device not opened");
1203 +       if (!bluetooth->open_count) {
1204 +               dbg ("%s - device not opened", __FUNCTION__);
1205                 return -EINVAL;
1206         }
1207  
1208         if (count == 0) {
1209 -               dbg(__FUNCTION__ " - write request of 0 bytes");
1210 +               dbg("%s - write request of 0 bytes", __FUNCTION__);
1211                 return 0;
1212         }
1213         if (count == 1) {
1214 -               dbg(__FUNCTION__ " - write request only included type %d", buf[0]);
1215 +               dbg("%s - write request only included type %d", __FUNCTION__, buf[0]);
1216                 return 1;
1217         }
1218  
1219  #ifdef DEBUG
1220 -       printk (KERN_DEBUG __FILE__ ": " __FUNCTION__ " - length = %d, data = ", count);
1221 +       printk (KERN_DEBUG __FILE__ ": %s - length = %d, data = ", __FUNCTION__, count);
1222         for (i = 0; i < count; ++i) {
1223                 printk ("%.2x ", buf[i]);
1224         }
1225 @@ -472,11 +483,14 @@
1226         if (from_user) {
1227                 temp_buffer = kmalloc (count, GFP_KERNEL);
1228                 if (temp_buffer == NULL) {
1229 -                       err (__FUNCTION__ "- out of memory.");
1230 +                       err ("%s - out of memory.", __FUNCTION__);
1231                         retval = -ENOMEM;
1232                         goto exit;
1233                 }
1234 -               copy_from_user (temp_buffer, buf, count);
1235 +               if (copy_from_user (temp_buffer, buf, count)) {
1236 +                       retval = -EFAULT;
1237 +                       goto exit;
1238 +               }
1239                 current_buffer = temp_buffer;
1240         } else {
1241                 current_buffer = buf;
1242 @@ -485,7 +499,7 @@
1243         switch (*current_buffer) {
1244                 /* First byte indicates the type of packet */
1245                 case CMD_PKT:
1246 -                       /* dbg(__FUNCTION__ "- Send cmd_pkt len:%d", count);*/
1247 +                       /* dbg("%s- Send cmd_pkt len:%d", __FUNCTION__, count);*/
1248  
1249                         retval = bluetooth_ctrl_msg (bluetooth, 0x00, 0x00, &current_buffer[1], count-1);
1250                         if (retval) {
1251 @@ -511,7 +525,7 @@
1252                                         }
1253                                 }
1254                                 if (urb == NULL) {
1255 -                                       dbg (__FUNCTION__ " - no free urbs");
1256 +                                       dbg ("%s - no free urbs", __FUNCTION__);
1257                                         retval = bytes_sent;
1258                                         goto exit;
1259                                 }
1260 @@ -528,7 +542,7 @@
1261                                 /* send it down the pipe */
1262                                 retval = usb_submit_urb(urb);
1263                                 if (retval) {
1264 -                                       dbg(__FUNCTION__ " - usb_submit_urb(write bulk) failed with error = %d", retval);
1265 +                                       dbg("%s - usb_submit_urb(write bulk) failed with error = %d", __FUNCTION__, retval);
1266                                         goto exit;
1267                                 }
1268  #ifdef BTBUGGYHARDWARE
1269 @@ -547,7 +561,7 @@
1270                         break;
1271                 
1272                 default :
1273 -                       dbg(__FUNCTION__" - unsupported (at this time) write type");
1274 +                       dbg("%s - unsupported (at this time) write type", __FUNCTION__);
1275                         retval = -EINVAL;
1276                         break;
1277         }
1278 @@ -570,10 +584,10 @@
1279                 return -ENODEV;
1280         }
1281  
1282 -       dbg(__FUNCTION__);
1283 +       dbg("%s", __FUNCTION__);
1284  
1285 -       if (!bluetooth->active) {
1286 -               dbg (__FUNCTION__ " - device not open");
1287 +       if (!bluetooth->open_count) {
1288 +               dbg ("%s - device not open", __FUNCTION__);
1289                 return -EINVAL;
1290         }
1291  
1292 @@ -583,7 +597,7 @@
1293                 }
1294         }
1295  
1296 -       dbg(__FUNCTION__ " - returns %d", room);
1297 +       dbg("%s - returns %d", __FUNCTION__, room);
1298         return room;
1299  }
1300  
1301 @@ -598,8 +612,8 @@
1302                 return -ENODEV;
1303         }
1304  
1305 -       if (!bluetooth->active) {
1306 -               dbg (__FUNCTION__ " - device not open");
1307 +       if (!bluetooth->open_count) {
1308 +               dbg ("%s - device not open", __FUNCTION__);
1309                 return -EINVAL;
1310         }
1311  
1312 @@ -609,7 +623,7 @@
1313                 }
1314         }
1315  
1316 -       dbg (__FUNCTION__ " - returns %d", chars);
1317 +       dbg ("%s - returns %d", __FUNCTION__, chars);
1318         return chars;
1319  }
1320  
1321 @@ -622,14 +636,14 @@
1322                 return;
1323         }
1324  
1325 -       dbg(__FUNCTION__);
1326 +       dbg("%s", __FUNCTION__);
1327  
1328 -       if (!bluetooth->active) {
1329 -               dbg (__FUNCTION__ " - device not open");
1330 +       if (!bluetooth->open_count) {
1331 +               dbg ("%s - device not open", __FUNCTION__);
1332                 return;
1333         }
1334         
1335 -       dbg(__FUNCTION__ " unsupported (at this time)");
1336 +       dbg("%s unsupported (at this time)", __FUNCTION__);
1337  
1338         return;
1339  }
1340 @@ -643,14 +657,14 @@
1341                 return;
1342         }
1343  
1344 -       dbg(__FUNCTION__);
1345 +       dbg("%s", __FUNCTION__);
1346  
1347 -       if (!bluetooth->active) {
1348 -               dbg (__FUNCTION__ " - device not open");
1349 +       if (!bluetooth->open_count) {
1350 +               dbg ("%s - device not open", __FUNCTION__);
1351                 return;
1352         }
1353  
1354 -       dbg(__FUNCTION__ " unsupported (at this time)");
1355 +       dbg("%s unsupported (at this time)", __FUNCTION__);
1356  }
1357  
1358  
1359 @@ -662,10 +676,10 @@
1360                 return -ENODEV;
1361         }
1362  
1363 -       dbg(__FUNCTION__ " - cmd 0x%.4x", cmd);
1364 +       dbg("%s - cmd 0x%.4x", __FUNCTION__, cmd);
1365  
1366 -       if (!bluetooth->active) {
1367 -               dbg (__FUNCTION__ " - device not open");
1368 +       if (!bluetooth->open_count) {
1369 +               dbg ("%s - device not open", __FUNCTION__);
1370                 return -ENODEV;
1371         }
1372  
1373 @@ -682,10 +696,10 @@
1374                 return;
1375         }
1376  
1377 -       dbg(__FUNCTION__);
1378 +       dbg("%s", __FUNCTION__);
1379  
1380 -       if (!bluetooth->active) {
1381 -               dbg (__FUNCTION__ " - device not open");
1382 +       if (!bluetooth->open_count) {
1383 +               dbg ("%s - device not open", __FUNCTION__);
1384                 return;
1385         }
1386  
1387 @@ -704,10 +718,10 @@
1388                 return;
1389         }
1390  
1391 -       dbg(__FUNCTION__);
1392 +       dbg("%s", __FUNCTION__);
1393  
1394 -       if (!bluetooth->active) {
1395 -               dbg (__FUNCTION__ " - device not open");
1396 +       if (!bluetooth->open_count) {
1397 +               dbg ("%s - device not open", __FUNCTION__);
1398                 return;
1399         }
1400  
1401 @@ -718,7 +732,7 @@
1402                               bluetooth_read_bulk_callback, bluetooth);
1403                 result = usb_submit_urb(bluetooth->read_urb);
1404                 if (result)
1405 -                       err (__FUNCTION__ " - failed submitting read urb, error %d", result);
1406 +                       err ("%s - failed submitting read urb, error %d", __FUNCTION__, result);
1407         }
1408  }
1409  
1410 @@ -729,10 +743,10 @@
1411                 return;
1412         }
1413  
1414 -       dbg(__FUNCTION__);
1415 +       dbg("%s", __FUNCTION__);
1416  
1417 -       if (!bluetooth->active) {
1418 -               dbg (__FUNCTION__ " - device not open");
1419 +       if (!bluetooth->open_count) {
1420 +               dbg ("%s - device not open", __FUNCTION__);
1421                 return;
1422         }
1423  
1424 @@ -755,27 +769,27 @@
1425         unsigned int count = urb->actual_length;
1426         unsigned int packet_size;
1427  
1428 -       dbg(__FUNCTION__);
1429 +       dbg("%s", __FUNCTION__);
1430  
1431         if (!bluetooth) {
1432 -               dbg(__FUNCTION__ " - bad bluetooth pointer, exiting");
1433 +               dbg("%s - bad bluetooth pointer, exiting", __FUNCTION__);
1434                 return;
1435         }
1436  
1437         if (urb->status) {
1438 -               dbg(__FUNCTION__ " - nonzero int status received: %d", urb->status);
1439 +               dbg("%s - nonzero int status received: %d", __FUNCTION__, urb->status);
1440                 return;
1441         }
1442  
1443         if (!count) {
1444 -               dbg(__FUNCTION__ " - zero length int");
1445 +               dbg("%s - zero length int", __FUNCTION__);
1446                 return;
1447         }
1448  
1449  
1450  #ifdef DEBUG
1451         if (count) {
1452 -               printk (KERN_DEBUG __FILE__ ": " __FUNCTION__ "- length = %d, data = ", count);
1453 +               printk (KERN_DEBUG __FILE__ ": %s- length = %d, data = ", __FUNCTION__, count);
1454                 for (i = 0; i < count; ++i) {
1455                         printk ("%.2x ", data[i]);
1456                 }
1457 @@ -805,7 +819,7 @@
1458         }
1459         
1460         if (bluetooth->int_packet_pos + count > EVENT_BUFFER_SIZE) {
1461 -               err(__FUNCTION__ " - exceeded EVENT_BUFFER_SIZE");
1462 +               err("%s - exceeded EVENT_BUFFER_SIZE", __FUNCTION__);
1463                 bluetooth->int_packet_pos = 0;
1464                 return;
1465         }
1466 @@ -821,7 +835,7 @@
1467                 return;
1468  
1469         if (packet_size + EVENT_HDR_SIZE < bluetooth->int_packet_pos) {
1470 -               err(__FUNCTION__ " - packet was too long");
1471 +               err("%s - packet was too long", __FUNCTION__);
1472                 bluetooth->int_packet_pos = 0;
1473                 return;
1474         }
1475 @@ -845,15 +859,15 @@
1476  {
1477         struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__);
1478  
1479 -       dbg(__FUNCTION__);
1480 +       dbg("%s", __FUNCTION__);
1481  
1482         if (!bluetooth) {
1483 -               dbg(__FUNCTION__ " - bad bluetooth pointer, exiting");
1484 +               dbg("%s - bad bluetooth pointer, exiting", __FUNCTION__);
1485                 return;
1486         }
1487  
1488         if (urb->status) {
1489 -               dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
1490 +               dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
1491                 return;
1492         }
1493  }
1494 @@ -869,30 +883,30 @@
1495         int result;
1496  
1497  
1498 -       dbg(__FUNCTION__);
1499 +       dbg("%s", __FUNCTION__);
1500  
1501         if (!bluetooth) {
1502 -               dbg(__FUNCTION__ " - bad bluetooth pointer, exiting");
1503 +               dbg("%s - bad bluetooth pointer, exiting", __FUNCTION__);
1504                 return;
1505         }
1506  
1507         if (urb->status) {
1508 -               dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
1509 +               dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
1510                 if (urb->status == -ENOENT) {                   
1511 -                       dbg(__FUNCTION__ " - URB canceled, won't reschedule");
1512 +                       dbg("%s - URB canceled, won't reschedule", __FUNCTION__);
1513                         return;
1514                 }
1515                 goto exit;
1516         }
1517  
1518         if (!count) {
1519 -               dbg(__FUNCTION__ " - zero length read bulk");
1520 +               dbg("%s - zero length read bulk", __FUNCTION__);
1521                 goto exit;
1522         }
1523  
1524  #ifdef DEBUG
1525         if (count) {
1526 -               printk (KERN_DEBUG __FILE__ ": " __FUNCTION__ "- length = %d, data = ", count);
1527 +               printk (KERN_DEBUG __FILE__ ": %s- length = %d, data = ", __FUNCTION__, count);
1528                 for (i = 0; i < count; ++i) {
1529                         printk ("%.2x ", data[i]);
1530                 }
1531 @@ -909,7 +923,7 @@
1532                               bluetooth_read_bulk_callback, bluetooth);
1533                 result = usb_submit_urb(bluetooth->read_urb);
1534                 if (result)
1535 -                       err (__FUNCTION__ " - failed resubmitting read urb, error %d", result);
1536 +                       err ("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
1537  
1538                 return;
1539         }
1540 @@ -926,7 +940,7 @@
1541         }
1542  
1543         if (bluetooth->bulk_packet_pos + count > ACL_BUFFER_SIZE) {
1544 -               err(__FUNCTION__ " - exceeded ACL_BUFFER_SIZE");
1545 +               err("%s - exceeded ACL_BUFFER_SIZE", __FUNCTION__);
1546                 bluetooth->bulk_packet_pos = 0;
1547                 goto exit;
1548         }
1549 @@ -943,7 +957,7 @@
1550         }
1551  
1552         if (packet_size + ACL_HDR_SIZE < bluetooth->bulk_packet_pos) {
1553 -               err(__FUNCTION__ " - packet was too long");
1554 +               err("%s - packet was too long", __FUNCTION__);
1555                 bluetooth->bulk_packet_pos = 0;
1556                 goto exit;
1557         }
1558 @@ -961,7 +975,7 @@
1559         }       
1560  
1561  exit:
1562 -       if (!bluetooth || !bluetooth->active)
1563 +       if (!bluetooth || !bluetooth->open_count)
1564                 return;
1565  
1566         FILL_BULK_URB(bluetooth->read_urb, bluetooth->dev, 
1567 @@ -970,7 +984,7 @@
1568                       bluetooth_read_bulk_callback, bluetooth);
1569         result = usb_submit_urb(bluetooth->read_urb);
1570         if (result)
1571 -               err (__FUNCTION__ " - failed resubmitting read urb, error %d", result);
1572 +               err ("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
1573  
1574         return;
1575  }
1576 @@ -980,15 +994,15 @@
1577  {
1578         struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__);
1579  
1580 -       dbg(__FUNCTION__);
1581 +       dbg("%s", __FUNCTION__);
1582  
1583         if (!bluetooth) {
1584 -               dbg(__FUNCTION__ " - bad bluetooth pointer, exiting");
1585 +               dbg("%s - bad bluetooth pointer, exiting", __FUNCTION__);
1586                 return;
1587         }
1588  
1589         if (urb->status) {
1590 -               dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
1591 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
1592                 return;
1593         }
1594  
1595 @@ -1004,7 +1018,7 @@
1596         struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)private, __FUNCTION__);
1597         struct tty_struct *tty;
1598  
1599 -       dbg(__FUNCTION__);
1600 +       dbg("%s", __FUNCTION__);
1601  
1602         if (!bluetooth) {
1603                 return;
1604 @@ -1012,7 +1026,7 @@
1605  
1606         tty = bluetooth->tty;
1607         if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
1608 -               dbg(__FUNCTION__ " - write wakeup call.");
1609 +               dbg("%s - write wakeup call.", __FUNCTION__);
1610                 (tty->ldisc.write_wakeup)(tty);
1611         }
1612  
1613 @@ -1074,7 +1088,7 @@
1614         if ((num_bulk_in != 1) ||
1615             (num_bulk_out != 1) ||
1616             (num_interrupt_in != 1)) {
1617 -               dbg (__FUNCTION__ " - improper number of endpoints. Bluetooth driver not bound.");
1618 +               dbg ("%s - improper number of endpoints. Bluetooth driver not bound.", __FUNCTION__);
1619                 return NULL;
1620         }
1621  
1622 @@ -1102,6 +1116,7 @@
1623         bluetooth->minor = minor;
1624         bluetooth->tqueue.routine = bluetooth_softint;
1625         bluetooth->tqueue.data = bluetooth;
1626 +       init_MUTEX(&bluetooth->lock);
1627  
1628         /* record the interface number for the control out */
1629         bluetooth->control_out_bInterfaceNum = control_out_endpoint;
1630 @@ -1136,7 +1151,8 @@
1631  
1632         endpoint = bulk_out_endpoint[0];
1633         bluetooth->bulk_out_endpointAddress = endpoint->bEndpointAddress;
1634 -       
1635 +       bluetooth->bulk_out_buffer_size = endpoint->wMaxPacketSize * 2;
1636 +
1637         /* create our write urb pool */ 
1638         for (i = 0; i < NUM_BULK_URBS; ++i) {
1639                 struct urb  *urb = usb_alloc_urb(0);
1640 @@ -1151,8 +1167,6 @@
1641                 }
1642                 bluetooth->write_urb_pool[i] = urb;
1643         }
1644 -       
1645 -       bluetooth->bulk_out_buffer_size = endpoint->wMaxPacketSize * 2;
1646  
1647         endpoint = interrupt_in_endpoint[0];
1648         bluetooth->interrupt_in_urb = usb_alloc_urb(0);
1649 @@ -1217,10 +1231,10 @@
1650         int i;
1651  
1652         if (bluetooth) {
1653 -               if ((bluetooth->active) && (bluetooth->tty))
1654 +               if ((bluetooth->open_count) && (bluetooth->tty))
1655                         tty_hangup(bluetooth->tty);
1656  
1657 -               bluetooth->active = 0;
1658 +               bluetooth->open_count = 0;
1659  
1660                 if (bluetooth->read_urb) {
1661                         usb_unlink_urb (bluetooth->read_urb);
1662 @@ -1271,30 +1285,30 @@
1663  
1664  
1665  static struct tty_driver bluetooth_tty_driver = {
1666 -       magic:                  TTY_DRIVER_MAGIC,
1667 -       driver_name:            "usb-bluetooth",
1668 -       name:                   "usb/ttub/%d",
1669 -       major:                  BLUETOOTH_TTY_MAJOR,
1670 -       minor_start:            0,
1671 -       num:                    BLUETOOTH_TTY_MINORS,
1672 -       type:                   TTY_DRIVER_TYPE_SERIAL,
1673 -       subtype:                SERIAL_TYPE_NORMAL,
1674 -       flags:                  TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS,
1675 -
1676 -       refcount:               &bluetooth_refcount,
1677 -       table:                  bluetooth_tty,
1678 -       termios:                bluetooth_termios,
1679 -       termios_locked:         bluetooth_termios_locked,
1680 -
1681 -       open:                   bluetooth_open,
1682 -       close:                  bluetooth_close,
1683 -       write:                  bluetooth_write,
1684 -       write_room:             bluetooth_write_room,
1685 -       ioctl:                  bluetooth_ioctl,
1686 -       set_termios:            bluetooth_set_termios,
1687 -       throttle:               bluetooth_throttle,
1688 -       unthrottle:             bluetooth_unthrottle,
1689 -       chars_in_buffer:        bluetooth_chars_in_buffer,
1690 +       .magic =                TTY_DRIVER_MAGIC,
1691 +       .driver_name =          "usb-bluetooth",
1692 +       .name =                 "usb/ttub/%d",
1693 +       .major =                BLUETOOTH_TTY_MAJOR,
1694 +       .minor_start =          0,
1695 +       .num =                  BLUETOOTH_TTY_MINORS,
1696 +       .type =                 TTY_DRIVER_TYPE_SERIAL,
1697 +       .subtype =              SERIAL_TYPE_NORMAL,
1698 +       .flags =                TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS,
1699 +
1700 +       .refcount =             &bluetooth_refcount,
1701 +       .table =                bluetooth_tty,
1702 +       .termios =              bluetooth_termios,
1703 +       .termios_locked =       bluetooth_termios_locked,
1704 +
1705 +       .open =                 bluetooth_open,
1706 +       .close =                bluetooth_close,
1707 +       .write =                bluetooth_write,
1708 +       .write_room =           bluetooth_write_room,
1709 +       .ioctl =                bluetooth_ioctl,
1710 +       .set_termios =          bluetooth_set_termios,
1711 +       .throttle =             bluetooth_throttle,
1712 +       .unthrottle =           bluetooth_unthrottle,
1713 +       .chars_in_buffer =      bluetooth_chars_in_buffer,
1714  };
1715  
1716  
1717 @@ -1314,7 +1328,7 @@
1718         bluetooth_tty_driver.init_termios          = tty_std_termios;
1719         bluetooth_tty_driver.init_termios.c_cflag  = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
1720         if (tty_register_driver (&bluetooth_tty_driver)) {
1721 -               err(__FUNCTION__ " - failed to register tty driver");
1722 +               err("%s - failed to register tty driver", __FUNCTION__);
1723                 return -1;
1724         }
1725  
1726 diff -Nur linux-2.4.19.old/drivers/usb/brlvger.c linux-2.4.19/drivers/usb/brlvger.c
1727 --- linux-2.4.19.old/drivers/usb/brlvger.c      Sat Aug  3 02:39:44 2002
1728 +++ linux-2.4.19/drivers/usb/brlvger.c  Mon Nov 25 12:26:54 2002
1729 @@ -208,8 +208,8 @@
1730  #define err(args...) \
1731      ({ printk(KERN_ERR "Voyager: " args); \
1732         printk("\n"); })
1733 -#define dbgprint(args...) \
1734 -    ({ printk(KERN_DEBUG "Voyager: " __FUNCTION__ ": " args); \
1735 +#define dbgprint(fmt, args...) \
1736 +    ({ printk(KERN_DEBUG "Voyager: %s: " fmt, __FUNCTION__ , ##args); \
1737         printk("\n"); })
1738  #define dbg(args...) \
1739      ({ if(debug >= 1) dbgprint(args); })
1740 @@ -586,7 +586,9 @@
1741         struct brlvger_priv *priv = file->private_data;
1742         char buf[MAX_BRLVGER_CELLS];
1743         int ret;
1744 -       int rs, off;
1745 +       size_t rs;
1746 +       loff_t off;
1747 +
1748         __u16 written;
1749  
1750         if(!priv->dev)
1751 diff -Nur linux-2.4.19.old/drivers/usb/catc.c linux-2.4.19/drivers/usb/catc.c
1752 --- linux-2.4.19.old/drivers/usb/catc.c Sat Aug  3 02:39:44 2002
1753 +++ linux-2.4.19/drivers/usb/catc.c     Mon Nov 25 12:26:55 2002
1754 @@ -7,6 +7,9 @@
1755   *
1756   *  Based on the work of
1757   *             Donald Becker
1758 + * 
1759 + *  Old chipset support added by Simon Evans <spse@secret.org.uk> 2002
1760 + *    - adds support for Belkin F5U011
1761   */
1762  
1763  /*
1764 @@ -69,6 +72,7 @@
1765  #define RX_MAX_BURST           15      /* Max packets per rx buffer (> 0, < 16) */
1766  #define TX_MAX_BURST           15      /* Max full sized packets per tx buffer (> 0) */
1767  #define CTRL_QUEUE             16      /* Max control requests in flight (power of two) */
1768 +#define RX_PKT_SZ              1600    /* Max size of receive packet for F5U011 */
1769  
1770  /*
1771   * Control requests.
1772 @@ -79,6 +83,7 @@
1773         GetMac =        0xf2,
1774         Reset =         0xf4,
1775         SetMac =        0xf5,
1776 +       SetRxMode =     0xf5,  /* F5U011 only */
1777         WriteROM =      0xf8,
1778         SetReg =        0xfa,
1779         GetReg =        0xfb,
1780 @@ -126,6 +131,7 @@
1781         RxForceOK =     0x04,
1782         RxMultiCast =   0x08,
1783         RxPromisc =     0x10,
1784 +       AltRxPromisc =  0x20, /* F5U011 uses different bit */
1785  };
1786  
1787  enum led_values {
1788 @@ -136,6 +142,12 @@
1789         LEDLink =       0x08,
1790  };
1791  
1792 +enum link_status {
1793 +       LinkNoChange = 0,
1794 +       LinkGood     = 1,
1795 +       LinkBad      = 2
1796 +};
1797 +
1798  /*
1799   * The catc struct.
1800   */
1801 @@ -159,7 +171,7 @@
1802         u8 rx_buf[RX_MAX_BURST * (PKT_SZ + 2)];
1803         u8 irq_buf[2];
1804         u8 ctrl_buf[64];
1805 -       devrequest ctrl_dr;
1806 +       struct usb_ctrlrequest ctrl_dr;
1807  
1808         struct timer_list timer;
1809         u8 stats_buf[8];
1810 @@ -179,6 +191,10 @@
1811         } ctrl_queue[CTRL_QUEUE];
1812  
1813         struct urb tx_urb, rx_urb, irq_urb, ctrl_urb;
1814 +
1815 +       u8 is_f5u011;   /* Set if device is an F5U011 */
1816 +       u8 rxmode[2];   /* Used for F5U011 */
1817 +       atomic_t recq_sz; /* Used for F5U011 - counter of waiting rx packets */
1818  };
1819  
1820  /*
1821 @@ -192,6 +208,10 @@
1822  #define catc_write_mem(catc, addr, buf, size)          catc_ctrl_msg(catc, USB_DIR_OUT, WriteMem, 0, addr, buf, size)
1823  #define catc_read_mem(catc, addr, buf, size)           catc_ctrl_msg(catc, USB_DIR_IN,  ReadMem, 0, addr, buf, size)
1824  
1825 +#define f5u011_rxmode(catc, rxmode)                    catc_ctrl_msg(catc, USB_DIR_OUT, SetRxMode, 0, 1, rxmode, 2)
1826 +#define f5u011_rxmode_async(catc, rxmode)              catc_ctrl_async(catc, USB_DIR_OUT, SetRxMode, 0, 1, &rxmode, 2, NULL)
1827 +#define f5u011_mchash_async(catc, hash)                        catc_ctrl_async(catc, USB_DIR_OUT, SetRxMode, 0, 2, &hash, 8, NULL)
1828 +
1829  #define catc_set_reg_async(catc, reg, val)             catc_ctrl_async(catc, USB_DIR_OUT, SetReg, val, reg, NULL, 0, NULL)
1830  #define catc_get_reg_async(catc, reg, cb)              catc_ctrl_async(catc, USB_DIR_IN, GetReg, 0, reg, NULL, 1, cb)
1831  #define catc_write_mem_async(catc, addr, buf, size)    catc_ctrl_async(catc, USB_DIR_OUT, WriteMem, 0, addr, buf, size, NULL)
1832 @@ -205,9 +225,12 @@
1833         struct catc *catc = urb->context;
1834         u8 *pkt_start = urb->transfer_buffer;
1835         struct sk_buff *skb;
1836 -       int pkt_len;
1837 +       int pkt_len, pkt_offset = 0;
1838  
1839 -       clear_bit(RX_RUNNING, &catc->flags);
1840 +       if (!catc->is_f5u011) {
1841 +               clear_bit(RX_RUNNING, &catc->flags);
1842 +               pkt_offset = 2;
1843 +       }
1844  
1845         if (urb->status) {
1846                 dbg("rx_done, status %d, length %d", urb->status, urb->actual_length);
1847 @@ -215,19 +238,22 @@
1848         }
1849  
1850         do {
1851 -               pkt_len = le16_to_cpup((u16*)pkt_start);
1852 -
1853 -               if (pkt_len > urb->actual_length) {
1854 -                       catc->stats.rx_length_errors++;
1855 -                       catc->stats.rx_errors++;
1856 -                       break;
1857 +               if(!catc->is_f5u011) {
1858 +                       pkt_len = le16_to_cpup((u16*)pkt_start);
1859 +                       if (pkt_len > urb->actual_length) {
1860 +                               catc->stats.rx_length_errors++;
1861 +                               catc->stats.rx_errors++;
1862 +                               break;
1863 +                       }
1864 +               } else {
1865 +                       pkt_len = urb->actual_length;
1866                 }
1867  
1868                 if (!(skb = dev_alloc_skb(pkt_len)))
1869                         return;
1870  
1871                 skb->dev = catc->netdev;
1872 -               eth_copy_and_sum(skb, pkt_start + 2, pkt_len, 0);
1873 +               eth_copy_and_sum(skb, pkt_start + pkt_offset, pkt_len, 0);
1874                 skb_put(skb, pkt_len);
1875  
1876                 skb->protocol = eth_type_trans(skb, catc->netdev);
1877 @@ -236,11 +262,28 @@
1878                 catc->stats.rx_packets++;
1879                 catc->stats.rx_bytes += pkt_len;
1880  
1881 +               /* F5U011 only does one packet per RX */
1882 +               if (catc->is_f5u011)
1883 +                       break;
1884                 pkt_start += (((pkt_len + 1) >> 6) + 1) << 6;
1885  
1886         } while (pkt_start - (u8 *) urb->transfer_buffer < urb->actual_length);
1887  
1888         catc->netdev->last_rx = jiffies;
1889 +
1890 +       if (catc->is_f5u011) {
1891 +               if (atomic_read(&catc->recq_sz)) {
1892 +                       int status;
1893 +                       atomic_dec(&catc->recq_sz);
1894 +                       dbg("getting extra packet");
1895 +                       urb->dev = catc->usbdev;
1896 +                       if ((status = usb_submit_urb(urb)) < 0) {
1897 +                               dbg("submit(rx_urb) status %d", status);
1898 +                       }
1899 +               } else {
1900 +                       clear_bit(RX_RUNNING, &catc->flags);
1901 +               }
1902 +       }
1903  }
1904  
1905  static void catc_irq_done(struct urb *urb)
1906 @@ -248,29 +291,48 @@
1907         struct catc *catc = urb->context;
1908         u8 *data = urb->transfer_buffer;
1909         int status;
1910 +       unsigned int hasdata = 0, linksts = LinkNoChange;
1911 +
1912 +       if (!catc->is_f5u011) {
1913 +               hasdata = data[1] & 0x80;
1914 +               if (data[1] & 0x40)
1915 +                       linksts = LinkGood;
1916 +               else if (data[1] & 0x20)
1917 +                       linksts = LinkBad;
1918 +       } else {
1919 +               hasdata = (unsigned int)(be16_to_cpup((u16*)data) & 0x0fff);
1920 +               if (data[0] == 0x90)
1921 +                       linksts = LinkGood;
1922 +               else if (data[0] == 0xA0)
1923 +                       linksts = LinkBad;
1924 +       }
1925  
1926         if (urb->status) {
1927                 dbg("irq_done, status %d, data %02x %02x.", urb->status, data[0], data[1]);
1928                 return;
1929         }
1930  
1931 -       if ((data[1] & 0x80) && !test_and_set_bit(RX_RUNNING, &catc->flags)) {
1932 -               catc->rx_urb.dev = catc->usbdev;
1933 -               if ((status = usb_submit_urb(&catc->rx_urb)) < 0) {
1934 -                       err("submit(rx_urb) status %d", status);
1935 -                       return;
1936 -               } 
1937 -       }
1938 -
1939 -       if (data[1] & 0x40) {
1940 +       if (linksts == LinkGood) {
1941                 netif_carrier_on(catc->netdev);
1942                 dbg("link ok");
1943         }
1944  
1945 -       if (data[1] & 0x20) {
1946 +       if (linksts == LinkBad) {
1947                 netif_carrier_off(catc->netdev);
1948                 dbg("link bad");
1949         }
1950 +
1951 +       if (hasdata) {
1952 +               if (test_and_set_bit(RX_RUNNING, &catc->flags)) {
1953 +                       if (catc->is_f5u011)
1954 +                               atomic_inc(&catc->recq_sz);
1955 +               } else {
1956 +                       catc->rx_urb.dev = catc->usbdev;
1957 +                       if ((status = usb_submit_urb(&catc->rx_urb)) < 0) {
1958 +                               err("submit(rx_urb) status %d", status);
1959 +                       }
1960 +               } 
1961 +       }
1962  }
1963  
1964  /*
1965 @@ -281,6 +343,9 @@
1966  {
1967         int status;
1968  
1969 +       if (catc->is_f5u011)
1970 +               catc->tx_ptr = (catc->tx_ptr + 63) & ~63;
1971 +
1972         catc->tx_urb.transfer_buffer_length = catc->tx_ptr;
1973         catc->tx_urb.transfer_buffer = catc->tx_buf[catc->tx_idx];
1974         catc->tx_urb.dev = catc->usbdev;
1975 @@ -337,14 +402,16 @@
1976  
1977         catc->tx_ptr = (((catc->tx_ptr - 1) >> 6) + 1) << 6;
1978         tx_buf = catc->tx_buf[catc->tx_idx] + catc->tx_ptr;
1979 -       *((u16*)tx_buf) = cpu_to_le16((u16)skb->len);
1980 +       *((u16*)tx_buf) = (catc->is_f5u011) ? 
1981 +               cpu_to_be16((u16)skb->len) : cpu_to_le16((u16)skb->len);
1982         memcpy(tx_buf + 2, skb->data, skb->len);
1983         catc->tx_ptr += skb->len + 2;
1984  
1985         if (!test_and_set_bit(TX_RUNNING, &catc->flags))
1986                 catc_tx_run(catc);
1987  
1988 -       if (catc->tx_ptr >= ((TX_MAX_BURST - 1) * (PKT_SZ + 2)))
1989 +       if ((catc->is_f5u011 && catc->tx_ptr)
1990 +            || (catc->tx_ptr >= ((TX_MAX_BURST - 1) * (PKT_SZ + 2))))
1991                 netif_stop_queue(netdev);
1992  
1993         spin_unlock_irqrestore(&catc->tx_lock, flags);
1994 @@ -383,14 +450,14 @@
1995         struct ctrl_queue *q = catc->ctrl_queue + catc->ctrl_tail;
1996         struct usb_device *usbdev = catc->usbdev;
1997         struct urb *urb = &catc->ctrl_urb;
1998 -       devrequest *dr = &catc->ctrl_dr;
1999 +       struct usb_ctrlrequest *dr = &catc->ctrl_dr;
2000         int status;
2001  
2002 -       dr->request = q->request;
2003 -       dr->requesttype = 0x40 | q->dir;
2004 -       dr->value = cpu_to_le16(q->value);
2005 -       dr->index = cpu_to_le16(q->index);
2006 -       dr->length = cpu_to_le16(q->len);
2007 +       dr->bRequest = q->request;
2008 +       dr->bRequestType = 0x40 | q->dir;
2009 +       dr->wValue = cpu_to_le16(q->value);
2010 +       dr->wIndex = cpu_to_le16(q->index);
2011 +       dr->wLength = cpu_to_le16(q->len);
2012  
2013          urb->pipe = q->dir ? usb_rcvctrlpipe(usbdev, 0) : usb_sndctrlpipe(usbdev, 0);
2014         urb->transfer_buffer_length = q->len;
2015 @@ -529,15 +596,20 @@
2016   * Receive modes. Broadcast, Multicast, Promisc.
2017   */
2018  
2019 -static void catc_multicast(unsigned char *addr, u8 *multicast)
2020 +static inline u32 ether_crc_le(int cnt, unsigned char *addr)
2021  {
2022         unsigned int crc = 0xffffffff;
2023         u8 byte, idx, bit;
2024 -
2025 -        for (idx = 0; idx < 6; idx++)
2026 +       
2027 +        for (idx = 0; idx < cnt; idx++)
2028                  for (byte = *addr++, bit = 0; bit < 8; bit++, byte >>= 1)
2029                          crc = (crc >> 1) ^ (((crc ^ byte) & 1) ? 0xedb88320U : 0);
2030 +       return crc;
2031 +}
2032  
2033 +static void catc_multicast(unsigned char *addr, u8 *multicast)
2034 +{
2035 +       unsigned int crc = ether_crc_le(6, addr);
2036         multicast[(crc >> 3) & 0x3f] |= 1 << (crc & 7);
2037  }
2038  
2039 @@ -557,17 +629,33 @@
2040  
2041         if (netdev->flags & IFF_PROMISC) {
2042                 memset(catc->multicast, 0xff, 64);
2043 -               rx |= RxPromisc;
2044 +               rx |= (!catc->is_f5u011) ? RxPromisc : AltRxPromisc;
2045         } 
2046  
2047 -       if (netdev->flags & IFF_ALLMULTI)
2048 +       if (netdev->flags & IFF_ALLMULTI) {
2049                 memset(catc->multicast, 0xff, 64);
2050 -
2051 -       for (i = 0, mc = netdev->mc_list; mc && i < netdev->mc_count; i++, mc = mc->next)
2052 -               catc_multicast(mc->dmi_addr, catc->multicast);
2053 -
2054 -       catc_set_reg_async(catc, RxUnit, rx);
2055 -       catc_write_mem_async(catc, 0xfa80, catc->multicast, 64);
2056 +       } else {
2057 +               for (i = 0, mc = netdev->mc_list; mc && i < netdev->mc_count; i++, mc = mc->next) {
2058 +                       u32 crc = ether_crc_le(6, mc->dmi_addr);
2059 +                       if (!catc->is_f5u011) {
2060 +                               catc->multicast[(crc >> 3) & 0x3f] |= 1 << (crc & 7);
2061 +                       } else {
2062 +                               catc->multicast[7-(crc >> 29)] |= 1 << ((crc >> 26) & 7);
2063 +                       }
2064 +               }
2065 +       }
2066 +       if (!catc->is_f5u011) {
2067 +               catc_set_reg_async(catc, RxUnit, rx);
2068 +               catc_write_mem_async(catc, 0xfa80, catc->multicast, 64);
2069 +       } else {
2070 +               f5u011_mchash_async(catc, catc->multicast);
2071 +               if (catc->rxmode[0] != rx) {
2072 +                       catc->rxmode[0] = rx;
2073 +                       dbg("Setting RX mode to %2.2X %2.2X", catc->rxmode[0],
2074 +                           catc->rxmode[1]);
2075 +                       f5u011_rxmode_async(catc, catc->rxmode);
2076 +               }
2077 +       }
2078  }
2079  
2080  /*
2081 @@ -594,6 +682,30 @@
2082                          return -EFAULT;
2083                  return 0;
2084          }
2085 +
2086 +       /* get settings */
2087 +       case ETHTOOL_GSET:
2088 +               if (catc->is_f5u011) {
2089 +                       struct ethtool_cmd ecmd = { 
2090 +                               ETHTOOL_GSET, 
2091 +                               SUPPORTED_10baseT_Half | SUPPORTED_TP, 
2092 +                               ADVERTISED_10baseT_Half | ADVERTISED_TP, 
2093 +                               SPEED_10, 
2094 +                               DUPLEX_HALF, 
2095 +                               PORT_TP, 
2096 +                               0, 
2097 +                               XCVR_INTERNAL, 
2098 +                               AUTONEG_DISABLE, 
2099 +                               1, 
2100 +                               1 
2101 +                       };
2102 +                       if (copy_to_user(useraddr, &ecmd, sizeof(ecmd)))
2103 +                               return -EFAULT;
2104 +                       return 0;
2105 +               } else {
2106 +                       return -EOPNOTSUPP;
2107 +               }
2108 +
2109          /* get link status */
2110          case ETHTOOL_GLINK: {
2111                  struct ethtool_value edata = {ETHTOOL_GLINK};
2112 @@ -635,7 +747,8 @@
2113  
2114         netif_start_queue(netdev);
2115  
2116 -       mod_timer(&catc->timer, jiffies + STATS_UPDATE);
2117 +       if (!catc->is_f5u011)
2118 +               mod_timer(&catc->timer, jiffies + STATS_UPDATE);
2119  
2120         return 0;
2121  }
2122 @@ -646,7 +759,8 @@
2123  
2124         netif_stop_queue(netdev);
2125  
2126 -       del_timer_sync(&catc->timer);
2127 +       if (!catc->is_f5u011)
2128 +               del_timer_sync(&catc->timer);
2129  
2130         usb_unlink_urb(&catc->rx_urb);
2131         usb_unlink_urb(&catc->tx_urb);
2132 @@ -665,7 +779,7 @@
2133         struct net_device *netdev;
2134         struct catc *catc;
2135         u8 broadcast[6];
2136 -       int i;
2137 +       int i, pktsz;
2138  
2139         if (usb_set_interface(usbdev, ifnum, 1)) {
2140                  err("Can't set altsetting 1.");
2141 @@ -704,6 +818,20 @@
2142         catc->timer.data = (long) catc;
2143         catc->timer.function = catc_stats_timer;
2144  
2145 +       /* The F5U011 has the same vendor/product as the netmate 
2146 +        *  but a device version of 0x130
2147 +        */
2148 +       if (usbdev->descriptor.idVendor == 0x0423 && 
2149 +           usbdev->descriptor.idProduct == 0xa &&
2150 +           catc->usbdev->descriptor.bcdDevice == 0x0130) {
2151 +               dbg("Testing for f5u011");
2152 +               catc->is_f5u011 = 1;
2153 +               atomic_set(&catc->recq_sz, 0);
2154 +               pktsz = RX_PKT_SZ;
2155 +       } else {
2156 +               pktsz = RX_MAX_BURST * (PKT_SZ + 2);
2157 +       }
2158 +
2159         FILL_CONTROL_URB(&catc->ctrl_urb, usbdev, usb_sndctrlpipe(usbdev, 0),
2160                 NULL, NULL, 0, catc_ctrl_done, catc);
2161  
2162 @@ -711,20 +839,21 @@
2163                 NULL, 0, catc_tx_done, catc);
2164  
2165         FILL_BULK_URB(&catc->rx_urb, usbdev, usb_rcvbulkpipe(usbdev, 1),
2166 -               catc->rx_buf, RX_MAX_BURST * (PKT_SZ + 2), catc_rx_done, catc);
2167 +               catc->rx_buf, pktsz, catc_rx_done, catc);
2168  
2169         FILL_INT_URB(&catc->irq_urb, usbdev, usb_rcvintpipe(usbdev, 2),
2170                  catc->irq_buf, 2, catc_irq_done, catc, 1);
2171  
2172 -       dbg("Checking memory size\n");
2173 -
2174 -       i = 0x12345678;
2175 -       catc_write_mem(catc, 0x7a80, &i, 4);
2176 -       i = 0x87654321; 
2177 -       catc_write_mem(catc, 0xfa80, &i, 4);
2178 -       catc_read_mem(catc, 0x7a80, &i, 4);
2179 +       if (!catc->is_f5u011) {
2180 +               dbg("Checking memory size\n");
2181  
2182 -       switch (i) {
2183 +               i = 0x12345678;
2184 +               catc_write_mem(catc, 0x7a80, &i, 4);
2185 +               i = 0x87654321; 
2186 +               catc_write_mem(catc, 0xfa80, &i, 4);
2187 +               catc_read_mem(catc, 0x7a80, &i, 4);
2188 +         
2189 +               switch (i) {
2190                 case 0x12345678:
2191                         catc_set_reg(catc, TxBufCount, 8);
2192                         catc_set_reg(catc, RxBufCount, 32);
2193 @@ -737,44 +866,52 @@
2194                         catc_set_reg(catc, RxBufCount, 16);
2195                         dbg("32k Memory\n");
2196                         break;
2197 +               }
2198 +         
2199 +               dbg("Getting MAC from SEEROM.");
2200 +         
2201 +               catc_get_mac(catc, netdev->dev_addr);
2202 +               
2203 +               dbg("Setting MAC into registers.");
2204 +         
2205 +               for (i = 0; i < 6; i++)
2206 +                       catc_set_reg(catc, StationAddr0 - i, netdev->dev_addr[i]);
2207 +               
2208 +               dbg("Filling the multicast list.");
2209 +         
2210 +               memset(broadcast, 0xff, 6);
2211 +               catc_multicast(broadcast, catc->multicast);
2212 +               catc_multicast(netdev->dev_addr, catc->multicast);
2213 +               catc_write_mem(catc, 0xfa80, catc->multicast, 64);
2214 +               
2215 +               dbg("Clearing error counters.");
2216 +               
2217 +               for (i = 0; i < 8; i++)
2218 +                       catc_set_reg(catc, EthStats + i, 0);
2219 +               catc->last_stats = jiffies;
2220 +               
2221 +               dbg("Enabling.");
2222 +               
2223 +               catc_set_reg(catc, MaxBurst, RX_MAX_BURST);
2224 +               catc_set_reg(catc, OpModes, OpTxMerge | OpRxMerge | OpLenInclude | Op3MemWaits);
2225 +               catc_set_reg(catc, LEDCtrl, LEDLink);
2226 +               catc_set_reg(catc, RxUnit, RxEnable | RxPolarity | RxMultiCast);
2227 +       } else {
2228 +               dbg("Performing reset\n");
2229 +               catc_reset(catc);
2230 +               catc_get_mac(catc, netdev->dev_addr);
2231 +               
2232 +               dbg("Setting RX Mode");
2233 +               catc->rxmode[0] = RxEnable | RxPolarity | RxMultiCast;
2234 +               catc->rxmode[1] = 0;
2235 +               f5u011_rxmode(catc, catc->rxmode);
2236         }
2237 -
2238 -       dbg("Getting MAC from SEEROM.");
2239 -
2240 -       catc_get_mac(catc, netdev->dev_addr);
2241 -
2242 -       dbg("Setting MAC into registers.");
2243 -
2244 -       for (i = 0; i < 6; i++)
2245 -               catc_set_reg(catc, StationAddr0 - i, netdev->dev_addr[i]);
2246 -
2247 -       dbg("Filling the multicast list.");
2248 -
2249 -       memset(broadcast, 0xff, 8);
2250 -       catc_multicast(broadcast, catc->multicast);
2251 -       catc_multicast(netdev->dev_addr, catc->multicast);
2252 -       catc_write_mem(catc, 0xfa80, catc->multicast, 64);
2253 -
2254 -       dbg("Clearing error counters.");
2255 -
2256 -       for (i = 0; i < 8; i++)
2257 -               catc_set_reg(catc, EthStats + i, 0);
2258 -       catc->last_stats = jiffies;
2259 -
2260 -       dbg("Enabling.");
2261 -
2262 -       catc_set_reg(catc, MaxBurst, RX_MAX_BURST);
2263 -       catc_set_reg(catc, OpModes, OpTxMerge | OpRxMerge | OpLenInclude | Op3MemWaits);
2264 -       catc_set_reg(catc, LEDCtrl, LEDLink);
2265 -       catc_set_reg(catc, RxUnit, RxEnable | RxPolarity | RxMultiCast);
2266 -
2267         dbg("Init done.");
2268 -
2269 -       printk(KERN_INFO "%s: CATC EL1210A NetMate USB Ethernet at usb%d:%d.%d, ",
2270 -               netdev->name, usbdev->bus->busnum, usbdev->devnum, ifnum);
2271 +       printk(KERN_INFO "%s: %s USB Ethernet at usb%d:%d.%d, ",
2272 +              netdev->name, (catc->is_f5u011) ? "Belkin F5U011" : "CATC EL1210A NetMate",
2273 +              usbdev->bus->busnum, usbdev->devnum, ifnum);
2274         for (i = 0; i < 5; i++) printk("%2.2x:", netdev->dev_addr[i]);
2275         printk("%2.2x.\n", netdev->dev_addr[i]);
2276 -
2277         return catc;
2278  }
2279  
2280 @@ -791,7 +928,7 @@
2281   */
2282  
2283  static struct usb_device_id catc_id_table [] = {
2284 -       { USB_DEVICE(0x0423, 0xa) },    /* CATC Netmate */
2285 +       { USB_DEVICE(0x0423, 0xa) },    /* CATC Netmate, Belkin F5U011 */
2286         { USB_DEVICE(0x0423, 0xc) },    /* CATC Netmate II, Belkin F5U111 */
2287         { USB_DEVICE(0x08d1, 0x1) },    /* smartBridges smartNIC */
2288         { }
2289 diff -Nur linux-2.4.19.old/drivers/usb/dabusb.c linux-2.4.19/drivers/usb/dabusb.c
2290 --- linux-2.4.19.old/drivers/usb/dabusb.c       Fri Dec 21 18:41:55 2001
2291 +++ linux-2.4.19/drivers/usb/dabusb.c   Mon Nov 25 12:26:55 2002
2292 @@ -83,7 +83,7 @@
2293  }
2294  /*-------------------------------------------------------------------*/
2295  #ifdef DEBUG 
2296 -static void dump_urb (purb_t purb)
2297 +static void dump_urb (struct urb *purb)
2298  {
2299         dbg("urb                   :%p", purb);
2300         dbg("next                  :%p", purb->next);
2301 @@ -167,7 +167,7 @@
2302         return 0;
2303  }
2304  /*-------------------------------------------------------------------*/
2305 -static void dabusb_iso_complete (purb_t purb)
2306 +static void dabusb_iso_complete (struct urb *purb)
2307  {
2308         pbuff_t b = purb->context;
2309         pdabusb_t s = b->s;
2310 @@ -482,7 +482,7 @@
2311         int rem;
2312         int cnt;
2313         pbuff_t b;
2314 -       purb_t purb = NULL;
2315 +       struct urb *purb = NULL;
2316  
2317         dbg("dabusb_read");
2318  
2319 @@ -605,6 +605,7 @@
2320         }
2321         if (usb_set_interface (s->usbdev, _DABUSB_IF, 1) < 0) {
2322                 err("set_interface failed");
2323 +               up(&s->mutex);
2324                 return -EINVAL;
2325         }
2326         s->opened = 1;
2327 diff -Nur linux-2.4.19.old/drivers/usb/dabusb.h linux-2.4.19/drivers/usb/dabusb.h
2328 --- linux-2.4.19.old/drivers/usb/dabusb.h       Tue Oct  3 18:24:40 2000
2329 +++ linux-2.4.19/drivers/usb/dabusb.h   Mon Nov 25 12:26:55 2002
2330 @@ -38,7 +38,7 @@
2331  typedef struct 
2332  {
2333         pdabusb_t s;
2334 -       purb_t purb;
2335 +       struct urb *purb;
2336         struct list_head buff_list;
2337  } buff_t,*pbuff_t;
2338  
2339 diff -Nur linux-2.4.19.old/drivers/usb/devices.c linux-2.4.19/drivers/usb/devices.c
2340 --- linux-2.4.19.old/drivers/usb/devices.c      Sat Aug  3 02:39:44 2002
2341 +++ linux-2.4.19/drivers/usb/devices.c  Mon Nov 25 12:26:55 2002
2342 @@ -61,6 +61,8 @@
2343  #include <linux/usbdevice_fs.h>
2344  #include <asm/uaccess.h>
2345  
2346 +#include "hcd.h"
2347 +
2348  #define MAX_TOPO_LEVEL         6
2349  
2350  /* Define ALLOW_SERIAL_NUMBER if you want to see the serial number of devices */
2351 diff -Nur linux-2.4.19.old/drivers/usb/devio.c linux-2.4.19/drivers/usb/devio.c
2352 --- linux-2.4.19.old/drivers/usb/devio.c        Sat Aug  3 02:39:44 2002
2353 +++ linux-2.4.19/drivers/usb/devio.c    Mon Nov 25 12:26:55 2002
2354 @@ -52,7 +52,7 @@
2355         unsigned int signr;
2356         void *userbuffer;
2357          void *userurb;
2358 -        urb_t urb;
2359 +        struct urb urb;
2360  };
2361  
2362  static loff_t usbdev_lseek(struct file *file, loff_t offset, int orig)
2363 @@ -138,7 +138,7 @@
2364         return ret;
2365  }
2366  
2367 -extern inline unsigned int ld2(unsigned int x)
2368 +static inline unsigned int ld2(unsigned int x)
2369  {
2370          unsigned int r = 0;
2371          
2372 @@ -169,7 +169,7 @@
2373  
2374  static struct async *alloc_async(unsigned int numisoframes)
2375  {
2376 -        unsigned int assize = sizeof(struct async) + numisoframes * sizeof(iso_packet_descriptor_t);
2377 +        unsigned int assize = sizeof(struct async) + numisoframes * sizeof(struct iso_packet_descriptor);
2378          struct async *as = kmalloc(assize, GFP_KERNEL);
2379          if (!as)
2380                  return NULL;
2381 @@ -188,7 +188,7 @@
2382          kfree(as);
2383  }
2384  
2385 -extern __inline__ void async_newpending(struct async *as)
2386 +static inline void async_newpending(struct async *as)
2387  {
2388          struct dev_state *ps = as->ps;
2389          unsigned long flags;
2390 @@ -198,7 +198,7 @@
2391          spin_unlock_irqrestore(&ps->lock, flags);
2392  }
2393  
2394 -extern __inline__ void async_removepending(struct async *as)
2395 +static inline void async_removepending(struct async *as)
2396  {
2397          struct dev_state *ps = as->ps;
2398          unsigned long flags;
2399 @@ -209,7 +209,7 @@
2400          spin_unlock_irqrestore(&ps->lock, flags);
2401  }
2402  
2403 -extern __inline__ struct async *async_getcompleted(struct dev_state *ps)
2404 +static inline struct async *async_getcompleted(struct dev_state *ps)
2405  {
2406          unsigned long flags;
2407          struct async *as = NULL;
2408 @@ -224,7 +224,7 @@
2409          return as;
2410  }
2411  
2412 -extern __inline__ struct async *async_getpending(struct dev_state *ps, void *userurb)
2413 +static inline struct async *async_getpending(struct dev_state *ps, void *userurb)
2414  {
2415          unsigned long flags;
2416          struct async *as;
2417 @@ -245,7 +245,7 @@
2418          return NULL;
2419  }
2420  
2421 -static void async_completed(purb_t urb)
2422 +static void async_completed(struct urb *urb)
2423  {
2424          struct async *as = (struct async *)urb->context;
2425          struct dev_state *ps = as->ps;
2426 @@ -772,7 +772,7 @@
2427         struct usbdevfs_iso_packet_desc *isopkt = NULL;
2428         struct usb_endpoint_descriptor *ep_desc;
2429         struct async *as;
2430 -       devrequest *dr = NULL;
2431 +       struct usb_ctrlrequest *dr = NULL;
2432         unsigned int u, totlen, isofrmlen;
2433         int ret;
2434  
2435 @@ -802,23 +802,23 @@
2436                 /* min 8 byte setup packet, max arbitrary */
2437                 if (uurb.buffer_length < 8 || uurb.buffer_length > PAGE_SIZE)
2438                         return -EINVAL;
2439 -               if (!(dr = kmalloc(sizeof(devrequest), GFP_KERNEL)))
2440 +               if (!(dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL)))
2441                         return -ENOMEM;
2442                 if (copy_from_user(dr, (unsigned char*)uurb.buffer, 8)) {
2443                         kfree(dr);
2444                         return -EFAULT;
2445                 }
2446 -               if (uurb.buffer_length < (le16_to_cpup(&dr->length) + 8)) {
2447 +               if (uurb.buffer_length < (le16_to_cpup(&dr->wLength) + 8)) {
2448                         kfree(dr);
2449                         return -EINVAL;
2450                 }
2451 -               if ((ret = check_ctrlrecip(ps, dr->requesttype, le16_to_cpup(&dr->index)))) {
2452 +               if ((ret = check_ctrlrecip(ps, dr->bRequestType, le16_to_cpup(&dr->wIndex)))) {
2453                         kfree(dr);
2454                         return ret;
2455                 }
2456 -               uurb.endpoint = (uurb.endpoint & ~USB_ENDPOINT_DIR_MASK) | (dr->requesttype & USB_ENDPOINT_DIR_MASK);
2457 +               uurb.endpoint = (uurb.endpoint & ~USB_ENDPOINT_DIR_MASK) | (dr->bRequestType & USB_ENDPOINT_DIR_MASK);
2458                 uurb.number_of_packets = 0;
2459 -               uurb.buffer_length = le16_to_cpup(&dr->length);
2460 +               uurb.buffer_length = le16_to_cpup(&dr->wLength);
2461                 uurb.buffer += 8;
2462                 if (!access_ok((uurb.endpoint & USB_DIR_IN) ?  VERIFY_WRITE : VERIFY_READ, uurb.buffer, uurb.buffer_length)) {
2463                         kfree(dr);
2464 diff -Nur linux-2.4.19.old/drivers/usb/hc_simple.c linux-2.4.19/drivers/usb/hc_simple.c
2465 --- linux-2.4.19.old/drivers/usb/hc_simple.c    Thu Jan  1 01:00:00 1970
2466 +++ linux-2.4.19/drivers/usb/hc_simple.c        Mon Nov 25 12:26:55 2002
2467 @@ -0,0 +1,1072 @@
2468 +/*-------------------------------------------------------------------------*/
2469 +/*-------------------------------------------------------------------------*
2470 + * simple generic USB HCD frontend Version 0.9.5 (10/28/2001)
2471 + * for embedded HCs (SL811HS)
2472 + * 
2473 + * USB URB handling, hci_ hcs_
2474 + * URB queueing, qu_
2475 + * Transfer scheduling, sh_
2476 + * 
2477 + *
2478 + *-------------------------------------------------------------------------*
2479 + * This program is free software; you can redistribute it and/or modify
2480 + * it under the terms of the GNU General Public License as published by
2481 + * the Free Software Foundation; either version 2 of the License, or
2482 + * (at your option) any later version.
2483 + *
2484 + * This program is distributed in the hope that it will be useful,
2485 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2486 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2487 + * GNU General Public License for more details.
2488 + *
2489 + * You should have received a copy of the GNU General Public License
2490 + * along with this program; if not, write to the Free Software
2491 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2492 + *
2493 + *-------------------------------------------------------------------------*/
2494 +
2495 +/* main lock for urb access */
2496 +static spinlock_t usb_urb_lock = SPIN_LOCK_UNLOCKED;
2497 +
2498 +/*-------------------------------------------------------------------------*/
2499 +/*-------------------------------------------------------------------------*/
2500 +/* URB HCD API function layer
2501 + * * * */
2502 +
2503 +/***************************************************************************
2504 + * Function Name : hcs_urb_queue
2505 + *
2506 + * This function initializes the urb status and length before queueing the 
2507 + * urb. 
2508 + *
2509 + * Input:  hci = data structure for the host controller
2510 + *         urb = USB request block data structure 
2511 + *
2512 + * Return: 0 
2513 + **************************************************************************/
2514 +static inline int hcs_urb_queue (hci_t * hci, struct urb * urb)
2515 +{
2516 +       int i;
2517 +
2518 +       DBGFUNC ("enter hcs_urb_queue\n");
2519 +       if (usb_pipeisoc (urb->pipe)) {
2520 +               DBGVERBOSE ("hcs_urb_queue: isoc pipe\n");
2521 +               for (i = 0; i < urb->number_of_packets; i++) {
2522 +                       urb->iso_frame_desc[i].actual_length = 0;
2523 +                       urb->iso_frame_desc[i].status = -EXDEV;
2524 +               }
2525 +
2526 +               /* urb->next hack : 1 .. resub, 0 .. single shot */
2527 +               /* urb->interval = urb->next ? 1 : 0; */
2528 +       }
2529 +
2530 +       urb->status = -EINPROGRESS;
2531 +       urb->actual_length = 0;
2532 +       urb->error_count = 0;
2533 +
2534 +       if (usb_pipecontrol (urb->pipe))
2535 +               hc_flush_data_cache (hci, urb->setup_packet, 8);
2536 +       if (usb_pipeout (urb->pipe))
2537 +               hc_flush_data_cache (hci, urb->transfer_buffer,
2538 +                                    urb->transfer_buffer_length);
2539 +
2540 +       qu_queue_urb (hci, urb);
2541 +
2542 +       return 0;
2543 +}
2544 +
2545 +/***************************************************************************
2546 + * Function Name : hcs_return_urb
2547 + *
2548 + * This function the return path of URB back to the USB core. It calls the
2549 + * the urb complete function if exist, and also handles the resubmition of
2550 + * interrupt URBs.
2551 + *
2552 + * Input:  hci = data structure for the host controller
2553 + *         urb = USB request block data structure 
2554 + *         resub_ok = resubmit flag: 1 = submit urb again, 0 = not submit 
2555 + *
2556 + * Return: 0 
2557 + **************************************************************************/
2558 +static int hcs_return_urb (hci_t * hci, struct urb * urb, int resub_ok)
2559 +{
2560 +       struct usb_device *dev = urb->dev;
2561 +       int resubmit = 0;
2562 +
2563 +       DBGFUNC ("enter hcs_return_urb, urb pointer = 0x%x, "
2564 +                "transferbuffer point = 0x%x, "
2565 +                " setup packet pointer = 0x%x, context pointer = 0x%x \n",
2566 +                (__u32 *) urb, (__u32 *) urb->transfer_buffer,
2567 +                (__u32 *) urb->setup_packet, (__u32 *) urb->context);
2568 +       if (urb_debug)
2569 +               urb_print (urb, "RET", usb_pipeout (urb->pipe));
2570 +
2571 +       resubmit = urb->interval && resub_ok;
2572 +
2573 +       urb->dev = urb->hcpriv = NULL;
2574 +
2575 +       if (urb->complete) {
2576 +               urb->complete (urb);    /* call complete */
2577 +       }
2578 +
2579 +       if (resubmit) {
2580 +               /* requeue the URB */
2581 +               urb->dev = dev;
2582 +               hcs_urb_queue (hci, urb);
2583 +       }
2584 +
2585 +       return 0;
2586 +}
2587 +
2588 +/***************************************************************************
2589 + * Function Name : hci_submit_urb
2590 + *
2591 + * This function is called by the USB core API when an URB is available to
2592 + * process.  This function does the following
2593 + *
2594 + * 1) Check the validity of the URB
2595 + * 2) Parse the device number from the URB
2596 + * 3) Pass the URB to the root hub routine if its intended for the hub, else
2597 + *    queue the urb for the attached device. 
2598 + *
2599 + * Input: urb = USB request block data structure 
2600 + *
2601 + * Return: 0 if success or error code 
2602 + **************************************************************************/
2603 +static int hci_submit_urb (struct urb * urb)
2604 +{
2605 +       hci_t *hci;
2606 +       unsigned int pipe = urb->pipe;
2607 +       unsigned long flags;
2608 +       int ret;
2609 +
2610 +       DBGFUNC ("enter hci_submit_urb, pipe = 0x%x\n", urb->pipe);
2611 +       if (!urb->dev || !urb->dev->bus || urb->hcpriv)
2612 +               return -EINVAL;
2613 +
2614 +       if (usb_endpoint_halted
2615 +           (urb->dev, usb_pipeendpoint (pipe), usb_pipeout (pipe))) {
2616 +               printk ("hci_submit_urb: endpoint_halted\n");
2617 +               return -EPIPE;
2618 +       }
2619 +       hci = (hci_t *) urb->dev->bus->hcpriv;
2620 +
2621 +       /* a request to the virtual root hub */
2622 +
2623 +       if (usb_pipedevice (pipe) == hci->rh.devnum) {
2624 +               if (urb_debug > 1)
2625 +                       urb_print (urb, "SUB-RH", usb_pipein (pipe));
2626 +
2627 +               return rh_submit_urb (urb);
2628 +       }
2629 +
2630 +       /* queue the URB to its endpoint-queue */
2631 +
2632 +       spin_lock_irqsave (&usb_urb_lock, flags);
2633 +       ret = hcs_urb_queue (hci, urb);
2634 +       if (ret != 0) {
2635 +               /* error on return */
2636 +               DBGERR
2637 +                   ("hci_submit_urb: return err, ret = 0x%x, urb->status = 0x%x\n",
2638 +                    ret, urb->status);
2639 +       }
2640 +
2641 +       spin_unlock_irqrestore (&usb_urb_lock, flags);
2642 +
2643 +       return ret;
2644 +
2645 +}
2646 +
2647 +/***************************************************************************
2648 + * Function Name : hci_unlink_urb
2649 + *
2650 + * This function mark the URB to unlink
2651 + *
2652 + * Input: urb = USB request block data structure 
2653 + *
2654 + * Return: 0 if success or error code 
2655 + **************************************************************************/
2656 +static int hci_unlink_urb (struct urb * urb)
2657 +{
2658 +       unsigned long flags;
2659 +       hci_t *hci;
2660 +       DECLARE_WAITQUEUE (wait, current);
2661 +       void *comp = NULL;
2662 +
2663 +       DBGFUNC ("enter hci_unlink_urb\n");
2664 +
2665 +       if (!urb)               /* just to be sure */
2666 +               return -EINVAL;
2667 +
2668 +       if (!urb->dev || !urb->dev->bus)
2669 +               return -ENODEV;
2670 +
2671 +       hci = (hci_t *) urb->dev->bus->hcpriv;
2672 +
2673 +       /* a request to the virtual root hub */
2674 +       if (usb_pipedevice (urb->pipe) == hci->rh.devnum) {
2675 +               return rh_unlink_urb (urb);
2676 +       }
2677 +
2678 +       if (urb_debug)
2679 +               urb_print (urb, "UNLINK", 1);
2680 +
2681 +       spin_lock_irqsave (&usb_urb_lock, flags);
2682 +
2683 +       if (!list_empty (&urb->urb_list) && urb->status == -EINPROGRESS) {
2684 +               /* URB active? */
2685 +
2686 +               if (urb->
2687 +                   transfer_flags & (USB_ASYNC_UNLINK | USB_TIMEOUT_KILLED)) {
2688 +                       /* asynchron with callback */
2689 +
2690 +                       list_del (&urb->urb_list);      /* relink the urb to the del list */
2691 +                       list_add (&urb->urb_list, &hci->del_list);
2692 +                       spin_unlock_irqrestore (&usb_urb_lock, flags);
2693 +
2694 +               } else {
2695 +                       /* synchron without callback */
2696 +
2697 +                       add_wait_queue (&hci->waitq, &wait);
2698 +
2699 +                       set_current_state (TASK_UNINTERRUPTIBLE);
2700 +                       comp = urb->complete;
2701 +                       urb->complete = NULL;
2702 +
2703 +                       list_del (&urb->urb_list);      /* relink the urb to the del list */
2704 +                       list_add (&urb->urb_list, &hci->del_list);
2705 +
2706 +                       spin_unlock_irqrestore (&usb_urb_lock, flags);
2707 +
2708 +                       schedule_timeout (HZ / 50);
2709 +
2710 +                       if (!list_empty (&urb->urb_list))
2711 +                               list_del (&urb->urb_list);
2712 +
2713 +                       urb->complete = comp;
2714 +                       urb->hcpriv = NULL;
2715 +                       remove_wait_queue (&hci->waitq, &wait);
2716 +               }
2717 +       } else {
2718 +               /* hcd does not own URB but we keep the driver happy anyway */
2719 +               spin_unlock_irqrestore (&usb_urb_lock, flags);
2720 +
2721 +               if (urb->complete && (urb->transfer_flags & USB_ASYNC_UNLINK)) {
2722 +                       urb->status = -ENOENT;
2723 +                       urb->actual_length = 0;
2724 +                       urb->complete (urb);
2725 +                       urb->status = 0;
2726 +               } else {
2727 +                       urb->status = -ENOENT;
2728 +               }
2729 +       }
2730 +
2731 +       return 0;
2732 +}
2733 +
2734 +/***************************************************************************
2735 + * Function Name : hci_alloc_dev
2736 + *
2737 + * This function allocates private data space for the usb device and 
2738 + * initialize the endpoint descriptor heads.
2739 + *
2740 + * Input: usb_dev = pointer to the usb device 
2741 + *
2742 + * Return: 0 if success or error code 
2743 + **************************************************************************/
2744 +static int hci_alloc_dev (struct usb_device *usb_dev)
2745 +{
2746 +       struct hci_device *dev;
2747 +       int i;
2748 +
2749 +       DBGFUNC ("enter hci_alloc_dev\n");
2750 +       dev = kmalloc (sizeof (*dev), GFP_KERNEL);
2751 +       if (!dev)
2752 +               return -ENOMEM;
2753 +
2754 +       memset (dev, 0, sizeof (*dev));
2755 +
2756 +       for (i = 0; i < 32; i++) {
2757 +               INIT_LIST_HEAD (&(dev->ed[i].urb_queue));
2758 +               dev->ed[i].pipe_head = NULL;
2759 +       }
2760 +
2761 +       usb_dev->hcpriv = dev;
2762 +
2763 +       DBGVERBOSE ("USB HC dev alloc %d bytes\n", sizeof (*dev));
2764 +
2765 +       return 0;
2766 +
2767 +}
2768 +
2769 +/***************************************************************************
2770 + * Function Name : hci_free_dev
2771 + *
2772 + * This function de-allocates private data space for the usb devic
2773 + *
2774 + * Input: usb_dev = pointer to the usb device 
2775 + *
2776 + * Return: 0  
2777 + **************************************************************************/
2778 +static int hci_free_dev (struct usb_device *usb_dev)
2779 +{
2780 +       DBGFUNC ("enter hci_free_dev\n");
2781 +
2782 +       if (usb_dev->hcpriv)
2783 +               kfree (usb_dev->hcpriv);
2784 +
2785 +       usb_dev->hcpriv = NULL;
2786 +
2787 +       return 0;
2788 +}
2789 +
2790 +/***************************************************************************
2791 + * Function Name : hci_get_current_frame_number
2792 + *
2793 + * This function get the current USB frame number
2794 + *
2795 + * Input: usb_dev = pointer to the usb device 
2796 + *
2797 + * Return: frame number  
2798 + **************************************************************************/
2799 +static int hci_get_current_frame_number (struct usb_device *usb_dev)
2800 +{
2801 +       hci_t *hci = usb_dev->bus->hcpriv;
2802 +       DBGFUNC ("enter hci_get_current_frame_number, frame = 0x%x \r\n",
2803 +                hci->frame_number);
2804 +
2805 +       return (hci->frame_number);
2806 +}
2807 +
2808 +/***************************************************************************
2809 + * List of all io-functions 
2810 + **************************************************************************/
2811 +
2812 +static struct usb_operations hci_device_operations = {
2813 +       allocate:               hci_alloc_dev,
2814 +       deallocate:             hci_free_dev,
2815 +       get_frame_number:       hci_get_current_frame_number,
2816 +       submit_urb:             hci_submit_urb,
2817 +       unlink_urb:             hci_unlink_urb,
2818 +};
2819 +
2820 +/***************************************************************************
2821 + * URB queueing:
2822 + * 
2823 + * For each type of transfer (INTR, BULK, ISO, CTRL) there is a list of 
2824 + * active URBs.
2825 + * (hci->intr_list, hci->bulk_list, hci->iso_list, hci->ctrl_list)
2826 + * For every endpoint the head URB of the queued URBs is linked to one of 
2827 + * those lists.
2828 + * 
2829 + * The rest of the queued URBs of an endpoint are linked into a 
2830 + * private URB list for each endpoint. (hci_dev->ed [endpoint_io].urb_queue)
2831 + * hci_dev->ed [endpoint_io].pipe_head .. points to the head URB which is 
2832 + * in one of the active URB lists.
2833 + * 
2834 + * The index of an endpoint consists of its number and its direction.
2835 + * 
2836 + * The state of an intr and iso URB is 0. 
2837 + * For ctrl URBs the states are US_CTRL_SETUP, US_CTRL_DATA, US_CTRL_ACK
2838 + * Bulk URBs states are US_BULK and US_BULK0 (with 0-len packet)
2839 + * 
2840 + **************************************************************************/
2841 +
2842 +/***************************************************************************
2843 + * Function Name : qu_urb_timeout
2844 + *
2845 + * This function is called when the URB timeout. The function unlinks the 
2846 + * URB. 
2847 + *
2848 + * Input: lurb: URB 
2849 + *
2850 + * Return: none  
2851 + **************************************************************************/
2852 +#ifdef HC_URB_TIMEOUT
2853 +static void qu_urb_timeout (unsigned long lurb)
2854 +{
2855 +       struct urb *urb = (struct urb *) lurb;
2856 +
2857 +       DBGFUNC ("enter qu_urb_timeout\n");
2858 +       urb->transfer_flags |= USB_TIMEOUT_KILLED;
2859 +       hci_unlink_urb (urb);
2860 +}
2861 +#endif
2862 +
2863 +/***************************************************************************
2864 + * Function Name : qu_pipeindex
2865 + *
2866 + * This function gets the index of the pipe.   
2867 + *
2868 + * Input: pipe: the urb pipe 
2869 + *
2870 + * Return: index  
2871 + **************************************************************************/
2872 +static inline int qu_pipeindex (__u32 pipe)
2873 +{
2874 +       DBGFUNC ("enter qu_pipeindex\n");
2875 +       return (usb_pipeendpoint (pipe) << 1) | (usb_pipecontrol (pipe) ? 0 : usb_pipeout (pipe));
2876 +}
2877 +
2878 +/***************************************************************************
2879 + * Function Name : qu_seturbstate
2880 + *
2881 + * This function set the state of the URB.  
2882 + * 
2883 + * control pipe: 3 states -- Setup, data, status
2884 + * interrupt and bulk pipe: 1 state -- data    
2885 + *
2886 + * Input: urb = USB request block data structure 
2887 + *        state = the urb state
2888 + *
2889 + * Return: none  
2890 + **************************************************************************/
2891 +static inline void qu_seturbstate (struct urb * urb, int state)
2892 +{
2893 +       DBGFUNC ("enter qu_seturbstate\n");
2894 +       urb->pipe &= ~0x1f;
2895 +       urb->pipe |= state & 0x1f;
2896 +}
2897 +
2898 +/***************************************************************************
2899 + * Function Name : qu_urbstate
2900 + *
2901 + * This function get the current state of the URB.  
2902 + * 
2903 + * Input: urb = USB request block data structure 
2904 + *
2905 + * Return: none  
2906 + **************************************************************************/
2907 +static inline int qu_urbstate (struct urb * urb)
2908 +{
2909 +
2910 +       DBGFUNC ("enter qu_urbstate\n");
2911 +
2912 +       return urb->pipe & 0x1f;
2913 +}
2914 +
2915 +/***************************************************************************
2916 + * Function Name : qu_queue_active_urb
2917 + *
2918 + * This function adds the urb to the appropriate active urb list and set
2919 + * the urb state.
2920 + * 
2921 + * There are four active lists: isochoronous list, interrupt list, 
2922 + * control list, and bulk list.
2923 + * 
2924 + * Input: hci = data structure for the host controller 
2925 + *        urb = USB request block data structure 
2926 + *        ed = endpoint descriptor
2927 + *
2928 + * Return: none  
2929 + **************************************************************************/
2930 +static inline void qu_queue_active_urb (hci_t * hci, struct urb * urb, epd_t * ed)
2931 +{
2932 +       int urb_state = 0;
2933 +       DBGFUNC ("enter qu_queue_active_urb\n");
2934 +       switch (usb_pipetype (urb->pipe)) {
2935 +       case PIPE_CONTROL:
2936 +               list_add (&urb->urb_list, &hci->ctrl_list);
2937 +               urb_state = US_CTRL_SETUP;
2938 +               break;
2939 +
2940 +       case PIPE_BULK:
2941 +               list_add (&urb->urb_list, &hci->bulk_list);
2942 +               if ((urb->transfer_flags & USB_ZERO_PACKET)
2943 +                   && urb->transfer_buffer_length > 0
2944 +                   &&
2945 +                   ((urb->transfer_buffer_length %
2946 +                     usb_maxpacket (urb->dev, urb->pipe,
2947 +                                    usb_pipeout (urb->pipe))) == 0)) {
2948 +                       urb_state = US_BULK0;
2949 +               }
2950 +               break;
2951 +
2952 +       case PIPE_INTERRUPT:
2953 +               urb->start_frame = hci->frame_number;
2954 +               list_add (&urb->urb_list, &hci->intr_list);
2955 +               break;
2956 +
2957 +       case PIPE_ISOCHRONOUS:
2958 +               list_add (&urb->urb_list, &hci->iso_list);
2959 +               break;
2960 +       }
2961 +
2962 +#ifdef HC_URB_TIMEOUT
2963 +       if (urb->timeout) {
2964 +               ed->timeout.data = (unsigned long) urb;
2965 +               ed->timeout.expires = urb->timeout + jiffies;
2966 +               ed->timeout.function = qu_urb_timeout;
2967 +               add_timer (&ed->timeout);
2968 +       }
2969 +#endif
2970 +
2971 +       qu_seturbstate (urb, urb_state);
2972 +}
2973 +
2974 +/***************************************************************************
2975 + * Function Name : qu_queue_urb
2976 + *
2977 + * This function adds the urb to the endpoint descriptor list 
2978 + * 
2979 + * Input: hci = data structure for the host controller 
2980 + *        urb = USB request block data structure 
2981 + *
2982 + * Return: none  
2983 + **************************************************************************/
2984 +static int qu_queue_urb (hci_t * hci, struct urb * urb)
2985 +{
2986 +       struct hci_device *hci_dev = usb_to_hci (urb->dev);
2987 +       epd_t *ed = &hci_dev->ed[qu_pipeindex (urb->pipe)];
2988 +
2989 +       DBGFUNC ("Enter qu_queue_urb\n");
2990 +
2991 +       /* for ISOC transfers calculate start frame index */
2992 +
2993 +       if (usb_pipeisoc (urb->pipe) && urb->transfer_flags & USB_ISO_ASAP) {
2994 +               urb->start_frame = ((ed->pipe_head) ? (ed->last_iso + 1) : hci_get_current_frame_number (urb-> dev) + 1) & 0xffff;
2995 +       }
2996 +
2997 +       if (ed->pipe_head) {
2998 +               __list_add (&urb->urb_list, ed->urb_queue.prev,
2999 +                           &(ed->urb_queue));
3000 +       } else {
3001 +               ed->pipe_head = urb;
3002 +               qu_queue_active_urb (hci, urb, ed);
3003 +               if (++hci->active_urbs == 1)
3004 +                       hc_start_int (hci);
3005 +       }
3006 +
3007 +       return 0;
3008 +}
3009 +
3010 +/***************************************************************************
3011 + * Function Name : qu_next_urb
3012 + *
3013 + * This function removes the URB from the queue and add the next URB to 
3014 + * active list. 
3015 + * 
3016 + * Input: hci = data structure for the host controller 
3017 + *        urb = USB request block data structure 
3018 + *        resub_ok = resubmit flag
3019 + *
3020 + * Return: pointer to the next urb  
3021 + **************************************************************************/
3022 +static struct urb *qu_next_urb (hci_t * hci, struct urb * urb, int resub_ok)
3023 +{
3024 +       struct hci_device *hci_dev = usb_to_hci (urb->dev);
3025 +       epd_t *ed = &hci_dev->ed[qu_pipeindex (urb->pipe)];
3026 +
3027 +       DBGFUNC ("enter qu_next_urb\n");
3028 +       list_del (&urb->urb_list);
3029 +       INIT_LIST_HEAD (&urb->urb_list);
3030 +       if (ed->pipe_head == urb) {
3031 +
3032 +#ifdef HC_URB_TIMEOUT
3033 +               if (urb->timeout)
3034 +                       del_timer (&ed->timeout);
3035 +#endif
3036 +
3037 +               if (!--hci->active_urbs)
3038 +                       hc_stop_int (hci);
3039 +
3040 +               if (!list_empty (&ed->urb_queue)) {
3041 +                       urb = list_entry (ed->urb_queue.next, struct urb, urb_list);
3042 +                       list_del (&urb->urb_list);
3043 +                       INIT_LIST_HEAD (&urb->urb_list);
3044 +                       ed->pipe_head = urb;
3045 +                       qu_queue_active_urb (hci, urb, ed);
3046 +               } else {
3047 +                       ed->pipe_head = NULL;
3048 +                       urb = NULL;
3049 +               }
3050 +       }
3051 +       return urb;
3052 +}
3053 +
3054 +/***************************************************************************
3055 + * Function Name : qu_return_urb
3056 + *
3057 + * This function is part of the return path.   
3058 + * 
3059 + * Input: hci = data structure for the host controller 
3060 + *        urb = USB request block data structure 
3061 + *        resub_ok = resubmit flag
3062 + *
3063 + * Return: pointer to the next urb  
3064 + **************************************************************************/
3065 +static struct urb *qu_return_urb (hci_t * hci, struct urb * urb, int resub_ok)
3066 +{
3067 +       struct urb *next_urb;
3068 +
3069 +       DBGFUNC ("enter qu_return_rub\n");
3070 +       next_urb = qu_next_urb (hci, urb, resub_ok);
3071 +       hcs_return_urb (hci, urb, resub_ok);
3072 +       return next_urb;
3073 +}
3074 +
3075 +/***************************************************************************
3076 + * Function Name : sh_scan_iso_urb_list
3077 + *
3078 + * This function goes throught the isochronous urb list and schedule the 
3079 + * the transfer.   
3080 + *
3081 + * Note: This function has not tested yet
3082 + * 
3083 + * Input: hci = data structure for the host controller 
3084 + *        list_lh = pointer to the isochronous list 
3085 + *        frame_number = the frame number 
3086 + *
3087 + * Return: 0 = unsuccessful; 1 = successful  
3088 + **************************************************************************/
3089 +static int sh_scan_iso_urb_list (hci_t * hci, struct list_head *list_lh,
3090 +                                int frame_number)
3091 +{
3092 +       struct list_head *lh = list_lh->next;
3093 +       struct urb *urb;
3094 +
3095 +       DBGFUNC ("enter sh_scan_iso_urb_list\n");
3096 +       hci->td_array->len = 0;
3097 +
3098 +       while (lh != list_lh) {
3099 +               urb = list_entry (lh, struct urb, urb_list);
3100 +               lh = lh->next;
3101 +               if (((frame_number - urb->start_frame) & 0x7ff) <
3102 +                   urb->number_of_packets) {
3103 +                       if (!sh_add_packet (hci, urb)) {
3104 +                               return 0;
3105 +                       } else {
3106 +                               if (((frame_number -
3107 +                                     urb->start_frame) & 0x7ff) > 0x400) {
3108 +                                       if (qu_urbstate (urb) > 0)
3109 +                                               urb = qu_return_urb (hci, urb, 1);
3110 +                                       else
3111 +                                               urb = qu_next_urb (hci, urb, 1);
3112 +
3113 +                                       if (lh == list_lh && urb)
3114 +                                               lh = &urb->urb_list;
3115 +                               }
3116 +                       }
3117 +               }
3118 +       }
3119 +       return 1;
3120 +}
3121 +
3122 +/***************************************************************************
3123 + * Function Name : sh_scan_urb_list
3124 + *
3125 + * This function goes through the urb list and schedule the 
3126 + * the transaction.   
3127 + * 
3128 + * Input: hci = data structure for the host controller 
3129 + *        list_lh = pointer to the isochronous list 
3130 + *
3131 + * Return: 0 = unsuccessful; 1 = successful  
3132 + **************************************************************************/
3133 +static int sh_scan_urb_list (hci_t * hci, struct list_head *list_lh)
3134 +{
3135 +       struct list_head *lh = NULL;
3136 +       struct urb *urb;
3137 +
3138 +       if (list_lh == NULL) {
3139 +               DBGERR ("sh_scan_urb_list: error, list_lh == NULL\n");
3140 +       }
3141 +
3142 +       DBGFUNC ("enter sh_scan_urb_list: frame# \n");
3143 +
3144 +       list_for_each (lh, list_lh) {
3145 +               urb = list_entry (lh, struct urb, urb_list);
3146 +               if (urb == NULL)
3147 +                       return 1;
3148 +               if (!usb_pipeint (urb->pipe)
3149 +                   || (((hci->frame_number - urb->start_frame)
3150 +                        & 0x7ff) >= urb->interval)) {
3151 +                       DBGVERBOSE ("sh_scan_urb_list !INT: %d fr_no: %d int: %d pint: %d\n",
3152 +                                   urb->start_frame, hci->frame_number, urb->interval,
3153 +                                   usb_pipeint (urb->pipe));
3154 +                       if (!sh_add_packet (hci, urb)) {
3155 +                               return 0;
3156 +                       } else {
3157 +                               DBGVERBOSE ("INT: start: %d fr_no: %d int: %d pint: %d\n",
3158 +                                           urb->start_frame, hci->frame_number,
3159 +                                           urb->interval, usb_pipeint (urb->pipe));
3160 +                               urb->start_frame = hci->frame_number;
3161 +                               return 0;
3162 +
3163 +                       }
3164 +               }
3165 +       }
3166 +       return 1;
3167 +}
3168 +
3169 +/***************************************************************************
3170 + * Function Name : sh_shedule_trans
3171 + *
3172 + * This function schedule the USB transaction.
3173 + * This function will process the endpoint in the following order: 
3174 + * interrupt, control, and bulk.    
3175 + * 
3176 + * Input: hci = data structure for the host controller 
3177 + *        isSOF = flag indicate if Start Of Frame has occurred 
3178 + *
3179 + * Return: 0   
3180 + **************************************************************************/
3181 +static int sh_schedule_trans (hci_t * hci, int isSOF)
3182 +{
3183 +       int units_left = 1;
3184 +       struct list_head *lh;
3185 +
3186 +       if (hci == NULL) {
3187 +               DBGERR ("sh_schedule_trans: hci == NULL\n");
3188 +               return 0;
3189 +       }
3190 +       if (hci->td_array == NULL) {
3191 +               DBGERR ("sh_schedule_trans: hci->td_array == NULL\n");
3192 +               return 0;
3193 +       }
3194 +
3195 +       if (hci->td_array->len != 0) {
3196 +               DBGERR ("ERROR: schedule, hci->td_array->len = 0x%x, s/b: 0\n",
3197 +                       hci->td_array->len);
3198 +       }
3199 +
3200 +       /* schedule the next available interrupt transfer or the next
3201 +        * stage of the interrupt transfer */
3202 +
3203 +       if (hci->td_array->len == 0 && !list_empty (&hci->intr_list)) {
3204 +               units_left = sh_scan_urb_list (hci, &hci->intr_list);
3205 +       }
3206 +
3207 +       /* schedule the next available control transfer or the next
3208 +        * stage of the control transfer */
3209 +
3210 +       if (hci->td_array->len == 0 && !list_empty (&hci->ctrl_list) && units_left > 0) {
3211 +               units_left = sh_scan_urb_list (hci, &hci->ctrl_list);
3212 +       }
3213 +
3214 +       /* schedule the next available bulk transfer or the next
3215 +        * stage of the bulk transfer */
3216 +
3217 +       if (hci->td_array->len == 0 && !list_empty (&hci->bulk_list) && units_left > 0) {
3218 +               sh_scan_urb_list (hci, &hci->bulk_list);
3219 +
3220 +               /* be fair to each BULK URB (move list head around) 
3221 +                * only when the new SOF happens */
3222 +
3223 +               lh = hci->bulk_list.next;
3224 +               list_del (&hci->bulk_list);
3225 +               list_add (&hci->bulk_list, lh);
3226 +       }
3227 +       return 0;
3228 +}
3229 +
3230 +/***************************************************************************
3231 + * Function Name : sh_add_packet
3232 + *
3233 + * This function forms the packet and transmit the packet. This function
3234 + * will handle all endpoint type: isochoronus, interrupt, control, and 
3235 + * bulk.
3236 + * 
3237 + * Input: hci = data structure for the host controller 
3238 + *        urb = USB request block data structure 
3239 + *
3240 + * Return: 0 = unsucessful; 1 = successful   
3241 + **************************************************************************/
3242 +static int sh_add_packet (hci_t * hci, struct urb * urb)
3243 +{
3244 +       __u8 *data = NULL;
3245 +       int len = 0;
3246 +       int toggle = 0;
3247 +       int maxps = usb_maxpacket (urb->dev, urb->pipe, usb_pipeout (urb->pipe));
3248 +       int endpoint = usb_pipeendpoint (urb->pipe);
3249 +       int address = usb_pipedevice (urb->pipe);
3250 +       int slow = (((urb->pipe) >> 26) & 1);
3251 +       int out = usb_pipeout (urb->pipe);
3252 +       int pid = 0;
3253 +       int ret;
3254 +       int i = 0;
3255 +       int iso = 0;
3256 +
3257 +       DBGFUNC ("enter sh_add_packet\n");
3258 +       if (maxps == 0)
3259 +               maxps = 8;
3260 +
3261 +       /* calculate len, toggle bit and add the transaction */
3262 +       switch (usb_pipetype (urb->pipe)) {
3263 +       case PIPE_ISOCHRONOUS:
3264 +               pid = out ? PID_OUT : PID_IN;
3265 +               iso = 1;
3266 +               i = hci->frame_number - urb->start_frame;
3267 +               data = urb->transfer_buffer + urb->iso_frame_desc[i].offset;
3268 +               len = urb->iso_frame_desc[i].length;
3269 +               break;
3270 +
3271 +       case PIPE_BULK: /* BULK and BULK0 */
3272 +       case PIPE_INTERRUPT:
3273 +               pid = out ? PID_OUT : PID_IN;
3274 +               len = urb->transfer_buffer_length - urb->actual_length;
3275 +               data = urb->transfer_buffer + urb->actual_length;
3276 +               toggle = usb_gettoggle (urb->dev, endpoint, out);
3277 +               break;
3278 +
3279 +       case PIPE_CONTROL:
3280 +               switch (qu_urbstate (urb)) {
3281 +               case US_CTRL_SETUP:
3282 +                       len = 8;
3283 +                       pid = PID_SETUP;
3284 +                       data = urb->setup_packet;
3285 +                       toggle = 0;
3286 +                       break;
3287 +
3288 +               case US_CTRL_DATA:
3289 +                       if (!hci->last_packet_nak) {
3290 +                               /* The last packet received is not a nak:
3291 +                                * reset the nak count
3292 +                                */
3293 +
3294 +                               hci->nakCnt = 0;
3295 +                       }
3296 +                       if (urb->transfer_buffer_length != 0) {
3297 +                               pid = out ? PID_OUT : PID_IN;
3298 +                               len = urb->transfer_buffer_length - urb->actual_length;
3299 +                               data = urb->transfer_buffer + urb->actual_length;
3300 +                               toggle = (urb->actual_length & maxps) ? 0 : 1;
3301 +                               usb_settoggle (urb->dev,
3302 +                                              usb_pipeendpoint (urb->pipe),
3303 +                                              usb_pipeout (urb->pipe), toggle);
3304 +                               break;
3305 +                       } else {
3306 +                               /* correct state and fall through */
3307 +                               qu_seturbstate (urb, US_CTRL_ACK);
3308 +                       }
3309 +
3310 +               case US_CTRL_ACK:
3311 +                       len = 0;
3312 +
3313 +                       /* reply in opposite direction */
3314 +                       pid = !out ? PID_OUT : PID_IN;
3315 +                       toggle = 1;
3316 +                       usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe),
3317 +                                      usb_pipeout (urb->pipe), toggle);
3318 +                       break;
3319 +               }
3320 +       }
3321 +
3322 +       ret =
3323 +           hc_add_trans (hci, len, data, toggle, maxps, slow, endpoint,
3324 +                         address, pid, iso, qu_urbstate (urb));
3325 +
3326 +       DBGVERBOSE ("transfer_pa: addr:%d ep:%d pid:%x tog:%x iso:%x sl:%x "
3327 +                   "max:%d\n len:%d ret:%d data:%p left:%d\n",
3328 +                   address, endpoint, pid, toggle, iso, slow,
3329 +                   maxps, len, ret, data, hci->hp.units_left);
3330 +
3331 +       if (ret >= 0) {
3332 +               hci->td_array->td[hci->td_array->len].urb = urb;
3333 +               hci->td_array->td[hci->td_array->len].len = ret;
3334 +               hci->td_array->td[hci->td_array->len].iso_index = i;
3335 +               hci->td_array->len++;
3336 +               hci->active_trans = 1;
3337 +               return 1;
3338 +       }
3339 +       return 0;
3340 +}
3341 +
3342 +/***************************************************************************
3343 + * Function Name : cc_to_error
3344 + *
3345 + * This function maps the SL811HS hardware error code to the linux USB error
3346 + * code.
3347 + * 
3348 + * Input: cc = hardware error code 
3349 + *
3350 + * Return: USB error code   
3351 + **************************************************************************/
3352 +static int cc_to_error (int cc)
3353 +{
3354 +       int errCode = 0;
3355 +       if (cc & SL11H_STATMASK_ERROR) {
3356 +               errCode |= -EILSEQ;
3357 +       } else if (cc & SL11H_STATMASK_OVF) {
3358 +               errCode |= -EOVERFLOW;
3359 +       } else if (cc & SL11H_STATMASK_STALL) {
3360 +               errCode |= -EPIPE;
3361 +       }
3362 +       return errCode;
3363 +}
3364 +
3365 +/***************************************************************************
3366 + * Function Name : sh_done_list
3367 + *
3368 + * This function process the packet when it has done finish transfer.
3369 + * 
3370 + * 1) It handles hardware error
3371 + * 2) It updates the URB state
3372 + * 3) If the USB transaction is complete, it start the return stack path.
3373 + * 
3374 + * Input: hci = data structure for the host controller 
3375 + *        isExcessNak = flag tells if there excess NAK condition occurred 
3376 + *
3377 + * Return:  urb_state or -1 if the transaction has complete   
3378 + **************************************************************************/
3379 +static int sh_done_list (hci_t * hci, int *isExcessNak)
3380 +{
3381 +       int actbytes = 0;
3382 +       int active = 0;
3383 +       void *data = NULL;
3384 +       int cc;
3385 +       int maxps;
3386 +       int toggle;
3387 +       struct urb *urb;
3388 +       int urb_state = 0;
3389 +       int ret = 1;            /* -1 parse abbort, 1 parse ok, 0 last element */
3390 +       int trans = 0;
3391 +       int len;
3392 +       int iso_index = 0;
3393 +       int out;
3394 +       int pid = 0;
3395 +       int debugLen = 0;
3396 +
3397 +       *isExcessNak = 0;
3398 +
3399 +       DBGFUNC ("enter sh_done_list: td_array->len = 0x%x\n",
3400 +                hci->td_array->len);
3401 +
3402 +       debugLen = hci->td_array->len;
3403 +       if (debugLen > 1)
3404 +               DBGERR ("sh_done_list: td_array->len = 0x%x > 1\n",
3405 +                       hci->td_array->len);
3406 +
3407 +       for (trans = 0; ret && trans < hci->td_array->len && trans < MAX_TRANS;
3408 +            trans++) {
3409 +               urb = hci->td_array->td[trans].urb;
3410 +               len = hci->td_array->td[trans].len;
3411 +               out = usb_pipeout (urb->pipe);
3412 +
3413 +               if (usb_pipeisoc (urb->pipe)) {
3414 +                       iso_index = hci->td_array->td[trans].iso_index;
3415 +                       data = urb->transfer_buffer + urb->iso_frame_desc[iso_index].offset;
3416 +                       toggle = 0;
3417 +               } else {
3418 +                       data = urb->transfer_buffer + urb->actual_length;
3419 +                       toggle = usb_gettoggle (urb->dev,
3420 +                                               usb_pipeendpoint (urb->pipe),
3421 +                                               usb_pipeout (urb->pipe));
3422 +
3423 +               }
3424 +               urb_state = qu_urbstate (urb);
3425 +               pid = out ? PID_OUT : PID_IN;
3426 +               ret = hc_parse_trans (hci, &actbytes, data, &cc, &toggle, len,
3427 +                                     pid, urb_state);
3428 +               maxps = usb_maxpacket (urb->dev, urb->pipe, usb_pipeout (urb->pipe));
3429 +
3430 +               if (maxps == 0)
3431 +                       maxps = 8;
3432 +
3433 +               active = (urb_state != US_CTRL_SETUP) && (actbytes && !(actbytes & (maxps - 1)));
3434 +
3435 +               /* If the transfer is not bulk in, then it is necessary to get all
3436 +                * data specify by the urb->transfer_len.
3437 +                */
3438 +
3439 +               if (!(usb_pipebulk (urb->pipe) && usb_pipein (urb->pipe)))
3440 +                       active = active && (urb->transfer_buffer_length != urb->actual_length + actbytes);
3441 +
3442 +               if (urb->transfer_buffer_length == urb->actual_length + actbytes)
3443 +                       active = 0;
3444 +
3445 +               if ((cc &
3446 +                    (SL11H_STATMASK_ERROR | SL11H_STATMASK_TMOUT |
3447 +                     SL11H_STATMASK_OVF | SL11H_STATMASK_STALL))
3448 +                   && !(cc & SL11H_STATMASK_NAK)) {
3449 +                       if (++urb->error_count > 3) {
3450 +                               DBGERR ("done_list: excessive error: errcount = 0x%x, cc = 0x%x\n",
3451 +                                       urb->error_count, cc);
3452 +                               urb_state = 0;
3453 +                               active = 0;
3454 +                       } else {
3455 +                               DBGERR ("done_list: packet err, cc = 0x%x, "
3456 +                                       " urb->length = 0x%x, actual_len = 0x%x,"
3457 +                                       " urb_state =0x%x\n",
3458 +                                       cc, urb->transfer_buffer_length,
3459 +                                       urb->actual_length, urb_state);
3460 +//                     if (cc & SL11H_STATMASK_STALL) {
3461 +                               /* The USB function is STALLED on a control pipe (0), 
3462 +                                * then it needs to send the SETUP command again to 
3463 +                                * clear the STALL condition
3464 +                                */
3465 +
3466 +//                             if (usb_pipeendpoint (urb->pipe) == 0) {
3467 +//                                     urb_state = 2;  
3468 +//                                     active = 0;
3469 +//                             }
3470 +//                     } else   
3471 +                               active = 1;
3472 +                       }
3473 +               } else {
3474 +                       if (cc & SL11H_STATMASK_NAK) {
3475 +                               if (hci->nakCnt < 0x10000) {
3476 +                                       hci->nakCnt++;
3477 +                                       hci->last_packet_nak = 1;
3478 +                                       active = 1;
3479 +                                       *isExcessNak = 0;
3480 +                               } else {
3481 +                                       DBGERR ("done_list: nak count exceed limit\n");
3482 +                                       active = 0;
3483 +                                       *isExcessNak = 1;
3484 +                                       hci->nakCnt = 0;
3485 +                               }
3486 +                       } else {
3487 +                               hci->nakCnt = 0;
3488 +                               hci->last_packet_nak = 0;
3489 +                       }
3490 +
3491 +                       if (urb_state != US_CTRL_SETUP) {
3492 +                               /* no error */
3493 +                               urb->actual_length += actbytes;
3494 +                               usb_settoggle (urb->dev,
3495 +                                              usb_pipeendpoint (urb->pipe),
3496 +                                              usb_pipeout (urb->pipe), toggle);
3497 +                       }
3498 +                       if (usb_pipeisoc (urb->pipe)) {
3499 +                               urb->iso_frame_desc[iso_index].actual_length = actbytes;
3500 +                               urb->iso_frame_desc[iso_index].status = cc_to_error (cc);
3501 +                               active = (iso_index < urb->number_of_packets);
3502 +                       }
3503 +               }
3504 +               if (!active) {
3505 +                       if (!urb_state) {
3506 +                               urb->status = cc_to_error (cc);
3507 +                               if (urb->status) {
3508 +                                       DBGERR ("error on received packet: urb->status = 0x%x\n",
3509 +                                               urb->status);
3510 +                               }
3511 +                               hci->td_array->len = 0;
3512 +                               qu_return_urb (hci, urb, 1);
3513 +                               return -1;
3514 +                       } else {
3515 +                               /* We do not want to decrement the urb_state if exceeded nak,
3516 +                                * because we need to finish the data stage of the control 
3517 +                                * packet 
3518 +                                */
3519 +
3520 +                               if (!(*isExcessNak))
3521 +                                       urb_state--;
3522 +                               qu_seturbstate (urb, urb_state);
3523 +                       }
3524 +               }
3525 +       }
3526 +
3527 +       if (urb_state < 0)
3528 +               DBGERR ("ERROR: done_list, urb_state = %d, suppose > 0\n",
3529 +                       urb_state);
3530 +       if (debugLen != hci->td_array->len) {
3531 +               DBGERR ("ERROR: done_list, debugLen!= td_array->len,"
3532 +                       "debugLen = 0x%x, hci->td_array->len = 0x%x\n",
3533 +                       debugLen, hci->td_array->len);
3534 +       }
3535 +
3536 +       hci->td_array->len = 0;
3537 +
3538 +       return urb_state;
3539 +}
3540 diff -Nur linux-2.4.19.old/drivers/usb/hc_simple.h linux-2.4.19/drivers/usb/hc_simple.h
3541 --- linux-2.4.19.old/drivers/usb/hc_simple.h    Thu Jan  1 01:00:00 1970
3542 +++ linux-2.4.19/drivers/usb/hc_simple.h        Mon Nov 25 12:26:55 2002
3543 @@ -0,0 +1,231 @@
3544 +/*-------------------------------------------------------------------------*/
3545 +/* list of all controllers using this driver 
3546 + * */
3547 +
3548 +static LIST_HEAD (hci_hcd_list);
3549 +
3550 +/* URB states (urb_state) */
3551 +/* isoc, interrupt single state */
3552 +
3553 +/* bulk transfer main state and 0-length packet */
3554 +#define US_BULK                0
3555 +#define US_BULK0       1
3556 +/* three setup states */
3557 +#define US_CTRL_SETUP  2
3558 +#define US_CTRL_DATA   1
3559 +#define US_CTRL_ACK    0
3560 +
3561 +/*-------------------------------------------------------------------------*/
3562 +/* HC private part of a device descriptor
3563 + * */
3564 +
3565 +#define NUM_EDS 32
3566 +
3567 +typedef struct epd {
3568 +       struct urb *pipe_head;
3569 +       struct list_head urb_queue;
3570 +//     int urb_state;
3571 +       struct timer_list timeout;
3572 +       int last_iso;           /* timestamp of last queued ISOC transfer */
3573 +
3574 +} epd_t;
3575 +
3576 +struct hci_device {
3577 +       epd_t ed[NUM_EDS];
3578 +};
3579 +
3580 +/*-------------------------------------------------------------------------*/
3581 +/* Virtual Root HUB 
3582 + */
3583 +
3584 +#define usb_to_hci(usb)        ((struct hci_device *)(usb)->hcpriv)
3585 +
3586 +struct virt_root_hub {
3587 +       int devnum;             /* Address of Root Hub endpoint */
3588 +       void *urb;              /* interrupt URB of root hub */
3589 +       int send;               /* active flag */
3590 +       int interval;           /* intervall of roothub interrupt transfers */
3591 +       struct timer_list rh_int_timer; /* intervall timer for rh interrupt EP */
3592 +};
3593 +
3594 +#if 1
3595 +/* USB HUB CONSTANTS (not OHCI-specific; see hub.h and USB spec) */
3596 +
3597 +/* destination of request */
3598 +#define RH_INTERFACE           0x01
3599 +#define RH_ENDPOINT            0x02
3600 +#define RH_OTHER               0x03
3601 +
3602 +#define RH_CLASS               0x20
3603 +#define RH_VENDOR              0x40
3604 +
3605 +/* Requests: bRequest << 8 | bmRequestType */
3606 +#define RH_GET_STATUS          0x0080
3607 +#define RH_CLEAR_FEATURE       0x0100
3608 +#define RH_SET_FEATURE         0x0300
3609 +#define RH_SET_ADDRESS         0x0500
3610 +#define RH_GET_DESCRIPTOR      0x0680
3611 +#define RH_SET_DESCRIPTOR      0x0700
3612 +#define RH_GET_CONFIGURATION   0x0880
3613 +#define RH_SET_CONFIGURATION   0x0900
3614 +#define RH_GET_STATE           0x0280
3615 +#define RH_GET_INTERFACE       0x0A80
3616 +#define RH_SET_INTERFACE       0x0B00
3617 +#define RH_SYNC_FRAME          0x0C80
3618 +/* Our Vendor Specific Request */
3619 +#define RH_SET_EP              0x2000
3620 +
3621 +/* Hub port features */
3622 +#define RH_PORT_CONNECTION     0x00
3623 +#define RH_PORT_ENABLE         0x01
3624 +#define RH_PORT_SUSPEND                0x02
3625 +#define RH_PORT_OVER_CURRENT   0x03
3626 +#define RH_PORT_RESET          0x04
3627 +#define RH_PORT_POWER          0x08
3628 +#define RH_PORT_LOW_SPEED      0x09
3629 +
3630 +#define RH_C_PORT_CONNECTION   0x10
3631 +#define RH_C_PORT_ENABLE       0x11
3632 +#define RH_C_PORT_SUSPEND      0x12
3633 +#define RH_C_PORT_OVER_CURRENT 0x13
3634 +#define RH_C_PORT_RESET                0x14
3635 +
3636 +/* Hub features */
3637 +#define RH_C_HUB_LOCAL_POWER   0x00
3638 +#define RH_C_HUB_OVER_CURRENT  0x01
3639 +
3640 +#define RH_DEVICE_REMOTE_WAKEUP        0x00
3641 +#define RH_ENDPOINT_STALL      0x01
3642 +
3643 +#endif
3644 +
3645 +/*-------------------------------------------------------------------------*/
3646 +/* struct for each HC 
3647 + */
3648 +
3649 +#define MAX_TRANS      32
3650 +
3651 +typedef struct td {
3652 +       struct urb *urb;
3653 +       __u16 len;
3654 +       __u16 iso_index;
3655 +} td_t;
3656 +
3657 +typedef struct td_array {
3658 +       int len;
3659 +       td_t td[MAX_TRANS];
3660 +} td_array_t;
3661 +
3662 +typedef struct hci {
3663 +       struct virt_root_hub rh;        /* roothub */
3664 +       wait_queue_head_t waitq;        /* deletion of URBs and devices needs a waitqueue */
3665 +       int active;                     /* HC is operating */
3666 +
3667 +       struct list_head ctrl_list;     /* set of ctrl endpoints */
3668 +       struct list_head bulk_list;     /* set of bulk endpoints */
3669 +       struct list_head iso_list;      /* set of isoc endpoints */
3670 +       struct list_head intr_list;     /* ordered (tree) set of int endpoints */
3671 +       struct list_head del_list;      /* set of entpoints to be deleted */
3672 +
3673 +       td_array_t *td_array;
3674 +       td_array_t a_td_array;
3675 +       td_array_t i_td_array[2];
3676 +
3677 +       struct list_head hci_hcd_list;  /* list of all hci_hcd */
3678 +       struct usb_bus *bus;            /* our bus */
3679 +
3680 +//     int trans;                      /* number of transactions pending */
3681 +       int active_urbs;
3682 +       int active_trans;
3683 +       int frame_number;               /* frame number */
3684 +       hcipriv_t hp;                   /* individual part of hc type */
3685 +       int nakCnt;
3686 +       int last_packet_nak;
3687 +
3688 +} hci_t;
3689 +
3690 +/*-------------------------------------------------------------------------*/
3691 +/* condition (error) CC codes and mapping OHCI like
3692 + */
3693 +
3694 +#define TD_CC_NOERROR          0x00
3695 +#define TD_CC_CRC              0x01
3696 +#define TD_CC_BITSTUFFING      0x02
3697 +#define TD_CC_DATATOGGLEM      0x03
3698 +#define TD_CC_STALL            0x04
3699 +#define TD_DEVNOTRESP          0x05
3700 +#define TD_PIDCHECKFAIL                0x06
3701 +#define TD_UNEXPECTEDPID       0x07
3702 +#define TD_DATAOVERRUN         0x08
3703 +#define TD_DATAUNDERRUN                0x09
3704 +#define TD_BUFFEROVERRUN       0x0C
3705 +#define TD_BUFFERUNDERRUN      0x0D
3706 +#define TD_NOTACCESSED         0x0F
3707 +
3708 +
3709 +/* urb interface functions */
3710 +static int hci_get_current_frame_number (struct usb_device *usb_dev);
3711 +static int hci_unlink_urb (struct urb * urb);
3712 +
3713 +static int qu_queue_urb (hci_t * hci, struct urb * urb);
3714 +
3715 +/* root hub */
3716 +static int rh_init_int_timer (struct urb * urb);
3717 +static int rh_submit_urb (struct urb * urb);
3718 +static int rh_unlink_urb (struct urb * urb);
3719 +
3720 +/* schedule functions */
3721 +static int sh_add_packet (hci_t * hci, struct urb * urb);
3722 +
3723 +/* hc specific functions */
3724 +static inline void hc_flush_data_cache (hci_t * hci, void *data, int len);
3725 +static inline int hc_parse_trans (hci_t * hci, int *actbytes, __u8 * data,
3726 +                                 int *cc, int *toggle, int length, int pid,
3727 +                                 int urb_state);
3728 +static inline int hc_add_trans (hci_t * hci, int len, void *data, int toggle,
3729 +                               int maxps, int slow, int endpoint, int address,
3730 +                               int pid, int format, int urb_state);
3731 +
3732 +static void hc_start_int (hci_t * hci);
3733 +static void hc_stop_int (hci_t * hci);
3734 +static void SL811Write (hci_t * hci, char offset, char data);
3735 +
3736 +/* debug| print the main components of an URB     
3737 + * small: 0) header + data packets 1) just header */
3738 +
3739 +static void urb_print (struct urb * urb, char *str, int small)
3740 +{
3741 +       unsigned int pipe = urb->pipe;
3742 +       int i, len;
3743 +
3744 +       if (!urb->dev || !urb->dev->bus) {
3745 +               dbg ("%s URB: no dev", str);
3746 +               return;
3747 +       }
3748 +
3749 +       printk ("%s URB:[%4x] dev:%2d,ep:%2d-%c,type:%s,flags:%4x,len:%d/%d,stat:%d(%x)\n",
3750 +               str, hci_get_current_frame_number (urb->dev),
3751 +               usb_pipedevice (pipe), usb_pipeendpoint (pipe),
3752 +               usb_pipeout (pipe) ? 'O' : 'I',
3753 +               usb_pipetype (pipe) < 2 ? (usb_pipeint (pipe) ? "INTR" : "ISOC")
3754 +               : (usb_pipecontrol (pipe) ? "CTRL" : "BULK"), urb->transfer_flags,
3755 +               urb->actual_length, urb->transfer_buffer_length, urb->status,
3756 +               urb->status);
3757 +       if (!small) {
3758 +               if (usb_pipecontrol (pipe)) {
3759 +                       printk (__FILE__ ": cmd(8):");
3760 +                       for (i = 0; i < 8; i++)
3761 +                               printk (" %02x", ((__u8 *) urb->setup_packet)[i]);
3762 +                       printk ("\n");
3763 +               }
3764 +               if (urb->transfer_buffer_length > 0 && urb->transfer_buffer) {
3765 +                       printk (__FILE__ ": data(%d/%d):", urb->actual_length,
3766 +                               urb->transfer_buffer_length);
3767 +                       len = usb_pipeout (pipe) ? urb-> transfer_buffer_length : urb->actual_length;
3768 +                       for (i = 0; i < 2096 && i < len; i++)
3769 +                               printk (" %02x", ((__u8 *) urb->transfer_buffer)[i]);
3770 +                       printk ("%s stat:%d\n", i < len ? "..." : "",
3771 +                               urb->status);
3772 +               }
3773 +       }
3774 +}
3775 diff -Nur linux-2.4.19.old/drivers/usb/hc_sl811.c linux-2.4.19/drivers/usb/hc_sl811.c
3776 --- linux-2.4.19.old/drivers/usb/hc_sl811.c     Thu Jan  1 01:00:00 1970
3777 +++ linux-2.4.19/drivers/usb/hc_sl811.c Mon Nov 25 12:26:55 2002
3778 @@ -0,0 +1,1359 @@
3779 +/*-------------------------------------------------------------------------*/
3780 +/*-------------------------------------------------------------------------*
3781 + * SL811HS USB HCD for Linux Version 0.1 (10/28/2001)
3782 + * 
3783 + * requires (includes) hc_simple.[hc] simple generic HCD frontend
3784 + *  
3785 + * COPYRIGHT(C) 2001 by CYPRESS SEMICONDUCTOR INC.
3786 + *
3787 + *-------------------------------------------------------------------------*
3788 + * This program is free software; you can redistribute it and/or modify
3789 + * it under the terms of the GNU General Public License as published by
3790 + * the Free Software Foundation; either version 2 of the License, or
3791 + * (at your option) any later version.
3792 + *
3793 + * This program is distributed in the hope that it will be useful,
3794 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3795 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3796 + * GNU General Public License for more details.
3797 + *
3798 + * You should have received a copy of the GNU General Public License
3799 + * along with this program; if not, write to the Free Software
3800 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
3801 + *
3802 + *-------------------------------------------------------------------------*/
3803 +
3804 +#include <linux/config.h>
3805 +#include <linux/module.h>
3806 +#include <linux/kernel.h>
3807 +#include <linux/delay.h>
3808 +#include <linux/sched.h>
3809 +#include <linux/malloc.h>
3810 +#include <linux/errno.h>
3811 +#include <linux/init.h>
3812 +#include <linux/smp_lock.h>
3813 +#include <linux/list.h>
3814 +#include <linux/ioport.h>
3815 +#include <asm/io.h>
3816 +#include <asm/irq.h>
3817 +
3818 +#include <linux/usb.h>
3819 +#include "../core/hcd.h"
3820 +
3821 +#undef HC_URB_TIMEOUT
3822 +#undef HC_SWITCH_INT
3823 +#undef HC_ENABLE_ISOC
3824 +
3825 +#define SL811_DEBUG_ERR
3826 +
3827 +#ifdef SL811_DEBUG_ERR
3828 +#define DBGERR(fmt, args...) printk(fmt,## args)
3829 +#else
3830 +#define DBGERR(fmt, args...)
3831 +#endif
3832 +
3833 +#ifdef SL811_DEBUG
3834 +#define DBG(fmt, args...) printk(fmt,## args)
3835 +#else
3836 +#define DBG(fmt, args...)
3837 +#endif
3838 +
3839 +#ifdef SL811_DEBUG_FUNC
3840 +#define DBGFUNC(fmt, args...) printk(fmt,## args)
3841 +#else
3842 +#define DBGFUNC(fmt, args...)
3843 +#endif
3844 +
3845 +#ifdef SL811_DEBUG_DATA
3846 +#define DBGDATAR(fmt, args...) printk(fmt,## args)
3847 +#define DBGDATAW(fmt, args...) printk(fmt,## args)
3848 +#else
3849 +#define DBGDATAR(fmt, args...)
3850 +#define DBGDATAW(fmt, args...)
3851 +#endif
3852 +
3853 +#ifdef SL811_DEBUG_VERBOSE
3854 +#define DBGVERBOSE(fmt, args...) printk(fmt,## args)
3855 +#else
3856 +#define DBGVERBOSE(fmt, args...)
3857 +#endif
3858 +
3859 +#define TRUE 1
3860 +#define FALSE 0
3861 +
3862 +#define HC_SWITCH_INT
3863 +#include "hc_sl811.h"
3864 +#include "hc_simple.h"
3865 +
3866 +static int urb_debug = 0;
3867 +
3868 +#include "hc_simple.c"
3869 +#include "hc_sl811_rh.c"
3870 +
3871 +/* The base_addr, data_reg_addr, and irq number are board specific.
3872 + * The current values are design to run on the Accelent SA1110 IDP
3873 + * NOTE: values need to modify for different development boards 
3874 + */
3875 +
3876 +static int base_addr = 0xd3800000;
3877 +static int data_reg_addr = 0xd3810000;
3878 +static int irq = 34;
3879 +
3880 +/* forware declaration */
3881 +
3882 +int SL11StartXaction (hci_t * hci, __u8 addr, __u8 epaddr, int pid, int len,
3883 +                     int toggle, int slow, int urb_state);
3884 +
3885 +static int sofWaitCnt = 0;
3886 +
3887 +MODULE_PARM (urb_debug, "i");
3888 +MODULE_PARM_DESC (urb_debug, "debug urb messages, default is 0 (no)");
3889 +
3890 +MODULE_PARM (base_addr, "i");
3891 +MODULE_PARM_DESC (base_addr, "sl811 base address 0xd3800000");
3892 +MODULE_PARM (data_reg_addr, "i");
3893 +MODULE_PARM_DESC (data_reg_addr, "sl811 data register address 0xd3810000");
3894 +MODULE_PARM (irq, "i");
3895 +MODULE_PARM_DESC (irq, "IRQ 34 (default)");
3896 +
3897 +static int hc_reset (hci_t * hci);
3898 +
3899 +/***************************************************************************
3900 + * Function Name : SL811Read
3901 + *
3902 + * Read a byte of data from the SL811H/SL11H
3903 + *
3904 + * Input:  hci = data structure for the host controller
3905 + *         offset = address of SL811/SL11H register or memory
3906 + *
3907 + * Return: data 
3908 + **************************************************************************/
3909 +char SL811Read (hci_t * hci, char offset)
3910 +{
3911 +       hcipriv_t *hp = &hci->hp;
3912 +       char data;
3913 +       writeb (offset, hp->hcport);
3914 +       wmb ();
3915 +       data = readb (hp->hcport2);
3916 +       rmb ();
3917 +       return (data);
3918 +}
3919 +
3920 +/***************************************************************************
3921 + * Function Name : SL811Write
3922 + *
3923 + * Write a byte of data to the SL811H/SL11H
3924 + *
3925 + * Input:  hci = data structure for the host controller
3926 + *         offset = address of SL811/SL11H register or memory
3927 + *         data  = the data going to write to SL811H
3928 + *
3929 + * Return: none 
3930 + **************************************************************************/
3931 +void SL811Write (hci_t * hci, char offset, char data)
3932 +{
3933 +       hcipriv_t *hp = &hci->hp;
3934 +       writeb (offset, hp->hcport);
3935 +       writeb (data, hp->hcport2);
3936 +       wmb ();
3937 +}
3938 +
3939 +/***************************************************************************
3940 + * Function Name : SL811BufRead
3941 + *
3942 + * Read consecutive bytes of data from the SL811H/SL11H buffer
3943 + *
3944 + * Input:  hci = data structure for the host controller
3945 + *         offset = SL811/SL11H register offset
3946 + *         buf = the buffer where the data will store
3947 + *         size = number of bytes to read
3948 + *
3949 + * Return: none 
3950 + **************************************************************************/
3951 +void SL811BufRead (hci_t * hci, short offset, char *buf, short size)
3952 +{
3953 +       hcipriv_t *hp = &hci->hp;
3954 +       if (size <= 0)
3955 +               return;
3956 +       writeb ((char) offset, hp->hcport);
3957 +       wmb ();
3958 +       DBGDATAR ("SL811BufRead: offset = 0x%x, data = ", offset);
3959 +       while (size--) {
3960 +               *buf++ = (char) readb (hp->hcport2);
3961 +               DBGDATAR ("0x%x ", *(buf - 1));
3962 +               rmb ();
3963 +       }
3964 +       DBGDATAR ("\n");
3965 +}
3966 +
3967 +/***************************************************************************
3968 + * Function Name : SL811BufWrite
3969 + *
3970 + * Write consecutive bytes of data to the SL811H/SL11H buffer
3971 + *
3972 + * Input:  hci = data structure for the host controller
3973 + *         offset = SL811/SL11H register offset
3974 + *         buf = the data buffer 
3975 + *         size = number of bytes to write
3976 + *
3977 + * Return: none 
3978 + **************************************************************************/
3979 +void SL811BufWrite (hci_t * hci, short offset, char *buf, short size)
3980 +{
3981 +       hcipriv_t *hp = &hci->hp;
3982 +       if (size <= 0)
3983 +               return;
3984 +       writeb ((char) offset, hp->hcport);
3985 +       wmb ();
3986 +       DBGDATAW ("SL811BufWrite: offset = 0x%x, data = ", offset);
3987 +       while (size--) {
3988 +               DBGDATAW ("0x%x ", *buf);
3989 +               writeb (*buf, hp->hcport2);
3990 +               wmb ();
3991 +               buf++;
3992 +       }
3993 +       DBGDATAW ("\n");
3994 +}
3995 +
3996 +/***************************************************************************
3997 + * Function Name : regTest
3998 + *
3999 + * This routine test the Read/Write functionality of SL811HS registers  
4000 + *
4001 + * 1) Store original register value into a buffer
4002 + * 2) Write to registers with a RAMP pattern. (10, 11, 12, ..., 255)
4003 + * 3) Read from register
4004 + * 4) Compare the written value with the read value and make sure they are 
4005 + *    equivalent
4006 + * 5) Restore the original register value 
4007 + *
4008 + * Input:  hci = data structure for the host controller
4009 + *   
4010 + *
4011 + * Return: TRUE = passed; FALSE = failed 
4012 + **************************************************************************/
4013 +int regTest (hci_t * hci)
4014 +{
4015 +       int i, data, result = TRUE;
4016 +       char buf[256];
4017 +
4018 +       DBGFUNC ("Enter regTest\n");
4019 +       for (i = 0x10; i < 256; i++) {
4020 +               /* save the original buffer */
4021 +               buf[i] = (char) SL811Read (hci, i);
4022 +
4023 +               /* Write the new data to the buffer */
4024 +               SL811Write (hci, i, i);
4025 +       }
4026 +
4027 +       /* compare the written data */
4028 +       for (i = 0x10; i < 256; i++) {
4029 +               data = SL811Read (hci, i);
4030 +               if (data != i) {
4031 +                       DBGERR ("Pattern test failed!! value = 0x%x, s/b 0x%x\n",
4032 +                               data, i);
4033 +                       result = FALSE;
4034 +               }
4035 +       }
4036 +
4037 +       /* restore the data */
4038 +       for (i = 0x10; i < 256; i++) {
4039 +               SL811Write (hci, i, buf[i]);
4040 +       }
4041 +
4042 +       return (result);
4043 +}
4044 +
4045 +/***************************************************************************
4046 + * Function Name : regShow
4047 + *
4048 + * Display all SL811HS register values
4049 + *
4050 + * Input:  hci = data structure for the host controller
4051 + *
4052 + * Return: none 
4053 + **************************************************************************/
4054 +void regShow (hci_t * hci)
4055 +{
4056 +       int i;
4057 +       for (i = 0; i < 256; i++) {
4058 +               printk ("offset %d: 0x%x\n", i, SL811Read (hci, i));
4059 +       }
4060 +}
4061 +
4062 +/************************************************************************
4063 + * Function Name : USBReset
4064 + *  
4065 + * This function resets SL811HS controller and detects the speed of
4066 + * the connecting device                                 
4067 + *
4068 + * Input:  hci = data structure for the host controller
4069 + *                
4070 + * Return: 0 = no device attached; 1 = USB device attached
4071 + *                
4072 + ***********************************************************************/
4073 +static int USBReset (hci_t * hci)
4074 +{
4075 +       int status;
4076 +       hcipriv_t *hp = &hci->hp;
4077 +
4078 +       DBGFUNC ("enter USBReset\n");
4079 +
4080 +       SL811Write (hci, SL11H_CTLREG2, 0xae);
4081 +
4082 +       // setup master and full speed
4083 +
4084 +       SL811Write (hci, SL11H_CTLREG1, 0x08);  // reset USB
4085 +       mdelay (20);            // 20ms                             
4086 +       SL811Write (hci, SL11H_CTLREG1, 0);     // remove SE0        
4087 +
4088 +       for (status = 0; status < 100; status++)
4089 +               SL811Write (hci, SL11H_INTSTATREG, 0xff);       // clear all interrupt bits
4090 +
4091 +       status = SL811Read (hci, SL11H_INTSTATREG);
4092 +
4093 +       if (status & 0x40)      // Check if device is removed
4094 +       {
4095 +               DBG ("USBReset: Device removed\n");
4096 +               SL811Write (hci, SL11H_INTENBLREG,
4097 +                           SL11H_INTMASK_XFERDONE | SL11H_INTMASK_SOFINTR |
4098 +                           SL11H_INTMASK_INSRMV);
4099 +               hp->RHportStatus->portStatus &=
4100 +                   ~(PORT_CONNECT_STAT | PORT_ENABLE_STAT);
4101 +
4102 +               return 0;
4103 +       }
4104 +
4105 +       SL811Write (hci, SL11H_BUFLNTHREG_B, 0);        //zero lenth
4106 +       SL811Write (hci, SL11H_PIDEPREG_B, 0x50);       //send SOF to EP0       
4107 +       SL811Write (hci, SL11H_DEVADDRREG_B, 0x01);     //address0
4108 +       SL811Write (hci, SL11H_SOFLOWREG, 0xe0);
4109 +
4110 +       if (!(status & 0x80)) {
4111 +               /* slow speed device connect directly to root-hub */
4112 +
4113 +               DBG ("USBReset: low speed Device attached\n");
4114 +               SL811Write (hci, SL11H_CTLREG1, 0x8);
4115 +               mdelay (20);
4116 +               SL811Write (hci, SL11H_SOFTMRREG, 0xee);
4117 +               SL811Write (hci, SL11H_CTLREG1, 0x21);
4118 +
4119 +               /* start the SOF or EOP */
4120 +
4121 +               SL811Write (hci, SL11H_HOSTCTLREG_B, 0x01);
4122 +               hp->RHportStatus->portStatus |=
4123 +                   (PORT_CONNECT_STAT | PORT_LOW_SPEED_DEV_ATTACH_STAT);
4124 +
4125 +               /* clear all interrupt bits */
4126 +
4127 +               for (status = 0; status < 20; status++)
4128 +                       SL811Write (hci, SL11H_INTSTATREG, 0xff);
4129 +       } else {
4130 +               /* full speed device connect directly to root hub */
4131 +
4132 +               DBG ("USBReset: full speed Device attached\n");
4133 +               SL811Write (hci, SL11H_CTLREG1, 0x8);
4134 +               mdelay (20);
4135 +               SL811Write (hci, SL11H_SOFTMRREG, 0xae);
4136 +               SL811Write (hci, SL11H_CTLREG1, 0x01);
4137 +
4138 +               /* start the SOF or EOP */
4139 +
4140 +               SL811Write (hci, SL11H_HOSTCTLREG_B, 0x01);
4141 +               hp->RHportStatus->portStatus |= (PORT_CONNECT_STAT);
4142 +               hp->RHportStatus->portStatus &= ~PORT_LOW_SPEED_DEV_ATTACH_STAT;
4143 +
4144 +               /* clear all interrupt bits */
4145 +
4146 +               SL811Write (hci, SL11H_INTSTATREG, 0xff);
4147 +
4148 +       }
4149 +
4150 +       /* enable all interrupts */
4151 +       SL811Write (hci, SL11H_INTENBLREG,
4152 +                   SL11H_INTMASK_XFERDONE | SL11H_INTMASK_SOFINTR |
4153 +                   SL11H_INTMASK_INSRMV);
4154 +
4155 +       return 1;
4156 +}
4157 +
4158 +/*-------------------------------------------------------------------------*/
4159 +/* tl functions */
4160 +static inline void hc_mark_last_trans (hci_t * hci)
4161 +{
4162 +       hcipriv_t *hp = &hci->hp;
4163 +       __u8 *ptd = hp->tl;
4164 +
4165 +       dbg ("enter hc_mark_last_trans\n");
4166 +       if (ptd == NULL) {
4167 +               printk ("hc_mark_last_trans: ptd = null\n");
4168 +               return;
4169 +       }
4170 +       if (hp->xferPktLen > 0)
4171 +               *(ptd + hp->tl_last) |= (1 << 3);
4172 +}
4173 +
4174 +static inline void hc_flush_data_cache (hci_t * hci, void *data, int len)
4175 +{
4176 +}
4177 +
4178 +/************************************************************************
4179 + * Function Name : hc_add_trans
4180 + *  
4181 + * This function sets up the SL811HS register and transmit the USB packets.
4182 + * 
4183 + * 1) Determine if enough time within the current frame to send the packet
4184 + * 2) Load the data into the SL811HS register
4185 + * 3) Set the appropriate command to the register and trigger the transmit
4186 + *
4187 + * Input:  hci = data structure for the host controller
4188 + *         len = data length
4189 + *         data = transmitting data
4190 + *         toggle = USB toggle bit, either 0 or 1
4191 + *         maxps = maximum packet size for this endpoint
4192 + *         slow = speed of the device
4193 + *         endpoint = endpoint number
4194 + *         address = USB address of the device
4195 + *         pid = packet ID
4196 + *         format = 
4197 + *         urb_state = the current stage of USB transaction
4198 + *       
4199 + * Return: 0 = no time left to schedule the transfer
4200 + *         1 = success 
4201 + *                
4202 + ***********************************************************************/
4203 +static inline int hc_add_trans (hci_t * hci, int len, void *data, int toggle,
4204 +                               int maxps, int slow, int endpoint, int address,
4205 +                               int pid, int format, int urb_state)
4206 +{
4207 +       hcipriv_t *hp = &hci->hp;
4208 +       __u16 speed;
4209 +       int ii, jj, kk;
4210 +
4211 +       DBGFUNC ("enter hc_addr_trans: len =0x%x, toggle:0x%x, endpoing:0x%x,"
4212 +                " addr:0x%x, pid:0x%x,format:0x%x\n", len, toggle, endpoint,
4213 +                i address, pid, format);
4214 +
4215 +       if (len > maxps) {
4216 +               len = maxps;
4217 +       }
4218 +
4219 +       speed = hp->RHportStatus->portStatus;
4220 +       if (speed & PORT_LOW_SPEED_DEV_ATTACH_STAT) {
4221 +//      ii = (8*7*8 + 6*3) * len + 800; 
4222 +               ii = 8 * 8 * len + 1024;
4223 +       } else {
4224 +               if (slow) {
4225 +//          ii = (8*7*8 + 6*3) * len + 800; 
4226 +                       ii = 8 * 8 * len + 2048;
4227 +               } else
4228 +//          ii = (8*7 + 6*3)*len + 110;
4229 +                       ii = 8 * len + 256;
4230 +       }
4231 +
4232 +       ii += 2 * 10 * len;
4233 +
4234 +       jj = SL811Read (hci, SL11H_SOFTMRREG);
4235 +       kk = (jj & 0xFF) * 64 - ii;
4236 +
4237 +       if (kk < 0) {
4238 +               DBGVERBOSE
4239 +                   ("hc_add_trans: no bandwidth for schedule, ii = 0x%x,"
4240 +                    "jj = 0x%x, len =0x%x, active_trans = 0x%x\n", ii, jj, len,
4241 +                    hci->active_trans);
4242 +               return (-1);
4243 +       }
4244 +
4245 +       if (pid != PID_IN) {
4246 +               /* Load data into hc */
4247 +
4248 +               SL811BufWrite (hci, SL11H_DATA_START, (__u8 *) data, len);
4249 +       }
4250 +
4251 +       /* transmit */
4252 +
4253 +       SL11StartXaction (hci, (__u8) address, (__u8) endpoint, (__u8) pid, len,
4254 +                         toggle, slow, urb_state);
4255 +
4256 +       return len;
4257 +}
4258 +
4259 +/************************************************************************
4260 + * Function Name : hc_parse_trans
4261 + *  
4262 + * This function checks the status of the transmitted or received packet
4263 + * and copy the data from the SL811HS register into a buffer.
4264 + *
4265 + * 1) Check the status of the packet 
4266 + * 2) If successful, and IN packet then copy the data from the SL811HS register
4267 + *    into a buffer
4268 + *
4269 + * Input:  hci = data structure for the host controller
4270 + *         actbytes = pointer to actual number of bytes
4271 + *         data = data buffer
4272 + *         cc = packet status
4273 + *         length = the urb transmit length
4274 + *         pid = packet ID
4275 + *         urb_state = the current stage of USB transaction
4276 + *       
4277 + * Return: 0 
4278 + ***********************************************************************/
4279 +static inline int hc_parse_trans (hci_t * hci, int *actbytes, __u8 * data,
4280 +                                 int *cc, int *toggle, int length, int pid,
4281 +                                 int urb_state)
4282 +{
4283 +       __u8 addr;
4284 +       __u8 len;
4285 +
4286 +       DBGFUNC ("enter hc_parse_trans\n");
4287 +
4288 +       /* get packet status; convert ack rcvd to ack-not-rcvd */
4289 +
4290 +       *cc = (int) SL811Read (hci, SL11H_PKTSTATREG);
4291 +
4292 +       if (*cc &
4293 +           (SL11H_STATMASK_ERROR | SL11H_STATMASK_TMOUT | SL11H_STATMASK_OVF |
4294 +            SL11H_STATMASK_NAK | SL11H_STATMASK_STALL)) {
4295 +               if (*cc & SL11H_STATMASK_OVF)
4296 +                       DBGERR ("parse trans: error recv ack, cc = 0x%x, TX_BASE_Len = "
4297 +                               "0x%x, TX_count=0x%x\n", *cc,
4298 +                               SL811Read (hci, SL11H_BUFLNTHREG),
4299 +                               SL811Read (hci, SL11H_XFERCNTREG));
4300 +
4301 +       } else {
4302 +               DBGVERBOSE ("parse trans: recv ack, cc = 0x%x, len = 0x%x, \n",
4303 +                           *cc, length);
4304 +
4305 +               /* Successful data */
4306 +               if ((pid == PID_IN) && (urb_state != US_CTRL_SETUP)) {
4307 +
4308 +                       /* Find the base address */
4309 +                       addr = SL811Read (hci, SL11H_BUFADDRREG);
4310 +
4311 +                       /* Find the Transmit Length */
4312 +                       len = SL811Read (hci, SL11H_BUFLNTHREG);
4313 +
4314 +                       /* The actual data length = xmit length reg - xfer count reg */
4315 +                       *actbytes = len - SL811Read (hci, SL11H_XFERCNTREG);
4316 +
4317 +                       if ((data != NULL) && (*actbytes > 0)) {
4318 +                               SL811BufRead (hci, addr, data, *actbytes);
4319 +
4320 +                       } else if ((data == NULL) && (*actbytes <= 0)) {
4321 +                               DBGERR ("hc_parse_trans: data = NULL or actbyte = 0x%x\n",
4322 +                                       *actbytes);
4323 +                               return 0;
4324 +                       }
4325 +               } else if (pid == PID_OUT) {
4326 +                       *actbytes = length;
4327 +               } else {
4328 +                       // printk ("ERR:parse_trans, pid != IN or OUT, pid = 0x%x\n", pid);
4329 +               }
4330 +               *toggle = !*toggle;
4331 +       }
4332 +
4333 +       return 0;
4334 +}
4335 +
4336 +/************************************************************************
4337 + * Function Name : hc_start_int
4338 + *  
4339 + * This function enables SL811HS interrupts
4340 + *
4341 + * Input:  hci = data structure for the host controller
4342 + *       
4343 + * Return: none 
4344 + ***********************************************************************/
4345 +static void hc_start_int (hci_t * hci)
4346 +{
4347 +#ifdef HC_SWITCH_INT
4348 +       int mask =
4349 +           SL11H_INTMASK_XFERDONE | SL11H_INTMASK_SOFINTR |
4350 +           SL11H_INTMASK_INSRMV | SL11H_INTMASK_USBRESET;
4351 +       SL811Write (hci, IntEna, mask);
4352 +#endif
4353 +}
4354 +
4355 +/************************************************************************
4356 + * Function Name : hc_stop_int
4357 + *  
4358 + * This function disables SL811HS interrupts
4359 + *
4360 + * Input:  hci = data structure for the host controller
4361 + *       
4362 + * Return: none 
4363 + ***********************************************************************/
4364 +static void hc_stop_int (hci_t * hci)
4365 +{
4366 +#ifdef HC_SWITCH_INT
4367 +       SL811Write (hci, SL11H_INTSTATREG, 0xff);
4368 +//  SL811Write(hci, SL11H_INTENBLREG, SL11H_INTMASK_INSRMV);
4369 +
4370 +#endif
4371 +}
4372 +
4373 +/************************************************************************
4374 + * Function Name : handleInsRmvIntr
4375 + *  
4376 + * This function handles the insertion or removal of device on  SL811HS. 
4377 + * It resets the controller and updates the port status
4378 + *
4379 + * Input:  hci = data structure for the host controller
4380 + *       
4381 + * Return: none 
4382 + ***********************************************************************/
4383 +void handleInsRmvIntr (hci_t * hci)
4384 +{
4385 +       hcipriv_t *hp = &hci->hp;
4386 +
4387 +       USBReset (hci);
4388 +
4389 +       /* Changes in connection status */
4390 +
4391 +       hp->RHportStatus->portChange |= PORT_CONNECT_CHANGE;
4392 +
4393 +       /* Port Enable or Disable */
4394 +
4395 +       if (hp->RHportStatus->portStatus & PORT_CONNECT_STAT) {
4396 +               /* device is connected to the port:
4397 +                *    1) Enable port 
4398 +                *    2) Resume ?? 
4399 +                */
4400 +//               hp->RHportStatus->portChange |= PORT_ENABLE_CHANGE;
4401 +
4402 +               /* Over Current is not supported by the SL811 HW ?? */
4403 +
4404 +               /* How about the Port Power ?? */
4405 +
4406 +       } else {
4407 +               /* Device has disconnect:
4408 +                *    1) Disable port
4409 +                */
4410 +
4411 +               hp->RHportStatus->portStatus &= ~(PORT_ENABLE_STAT);
4412 +               hp->RHportStatus->portChange |= PORT_ENABLE_CHANGE;
4413 +
4414 +       }
4415 +}
4416 +
4417 +/*****************************************************************
4418 + *
4419 + * Function Name: SL11StartXaction
4420 + *  
4421 + * This functions load the registers with appropriate value and 
4422 + * transmit the packet.                                  
4423 + *
4424 + * Input:  hci = data structure for the host controller
4425 + *         addr = USB address of the device
4426 + *         epaddr = endpoint number
4427 + *         pid = packet ID
4428 + *         len = data length
4429 + *         toggle = USB toggle bit, either 0 or 1
4430 + *         slow = speed of the device
4431 + *         urb_state = the current stage of USB transaction
4432 + *
4433 + * Return: 0 = error; 1 = successful
4434 + *                
4435 + *****************************************************************/
4436 +int SL11StartXaction (hci_t * hci, __u8 addr, __u8 epaddr, int pid, int len,
4437 +                     int toggle, int slow, int urb_state)
4438 +{
4439 +
4440 +       hcipriv_t *hp = &hci->hp;
4441 +       __u8 cmd = 0;
4442 +       __u8 setup_data[4];
4443 +       __u16 speed;
4444 +
4445 +       speed = hp->RHportStatus->portStatus;
4446 +       if (!(speed & PORT_LOW_SPEED_DEV_ATTACH_STAT) && slow) {
4447 +               cmd |= SL11H_HCTLMASK_PREAMBLE;
4448 +       }
4449 +       switch (pid) {
4450 +       case PID_SETUP:
4451 +               cmd &= SL11H_HCTLMASK_PREAMBLE;
4452 +               cmd |=
4453 +                   (SL11H_HCTLMASK_ARM | SL11H_HCTLMASK_ENBLEP |
4454 +                    SL11H_HCTLMASK_WRITE);
4455 +               break;
4456 +
4457 +       case PID_OUT:
4458 +               cmd &= (SL11H_HCTLMASK_SEQ | SL11H_HCTLMASK_PREAMBLE);
4459 +               cmd |=
4460 +                   (SL11H_HCTLMASK_ARM | SL11H_HCTLMASK_ENBLEP |
4461 +                    SL11H_HCTLMASK_WRITE);
4462 +               if (toggle) {
4463 +                       cmd |= SL11H_HCTLMASK_SEQ;
4464 +               }
4465 +               break;
4466 +
4467 +       case PID_IN:
4468 +               cmd &= (SL11H_HCTLMASK_SEQ | SL11H_HCTLMASK_PREAMBLE);
4469 +               cmd |= (SL11H_HCTLMASK_ARM | SL11H_HCTLMASK_ENBLEP);
4470 +               break;
4471 +
4472 +       default:
4473 +               DBGERR ("ERR: SL11StartXaction: unknow pid = 0x%x\n", pid);
4474 +               return 0;
4475 +       }
4476 +       setup_data[0] = SL11H_DATA_START;
4477 +       setup_data[1] = len;
4478 +       setup_data[2] = (((pid & 0x0F) << 4) | (epaddr & 0xF));
4479 +       setup_data[3] = addr & 0x7F;
4480 +
4481 +       SL811BufWrite (hci, SL11H_BUFADDRREG, (__u8 *) & setup_data[0], 4);
4482 +
4483 +       SL811Write (hci, SL11H_HOSTCTLREG, cmd);
4484 +
4485 +#if 0
4486 +       /* The SL811 has a hardware flaw when hub devices sends out
4487 +        * SE0 between packets. It has been found in a TI chipset and
4488 +        * cypress hub chipset. It causes the SL811 to hang
4489 +        * The workaround is to re-issue the preample again.
4490 +        */
4491 +
4492 +       if ((cmd & SL11H_HCTLMASK_PREAMBLE)) {
4493 +               SL811Write (hci, SL11H_PIDEPREG_B, 0xc0);
4494 +               SL811Write (hci, SL11H_HOSTCTLREG_B, 0x1);      // send the premable
4495 +       }
4496 +#endif
4497 +       return 1;
4498 +}
4499 +
4500 +/*****************************************************************
4501 + *
4502 + * Function Name: hc_interrupt
4503 + *
4504 + * Interrupt service routine. 
4505 + *
4506 + * 1) determine the causes of interrupt
4507 + * 2) clears all interrupts
4508 + * 3) calls appropriate function to service the interrupt
4509 + *
4510 + * Input:  irq = interrupt line associated with the controller 
4511 + *         hci = data structure for the host controller
4512 + *         r = holds the snapshot of the processor's context before 
4513 + *             the processor entered interrupt code. (not used here) 
4514 + *
4515 + * Return value  : None.
4516 + *                
4517 + *****************************************************************/
4518 +static void hc_interrupt (int irq, void *__hci, struct pt_regs *r)
4519 +{
4520 +       char ii;
4521 +       hci_t *hci = __hci;
4522 +       int isExcessNak = 0;
4523 +       int urb_state = 0;
4524 +       char tmpIrq = 0;
4525 +
4526 +       /* Get value from interrupt status register */
4527 +
4528 +       ii = SL811Read (hci, SL11H_INTSTATREG);
4529 +
4530 +       if (ii & SL11H_INTMASK_INSRMV) {
4531 +               /* Device insertion or removal detected for the USB port */
4532 +
4533 +               SL811Write (hci, SL11H_INTENBLREG, 0);
4534 +               SL811Write (hci, SL11H_CTLREG1, 0);
4535 +               mdelay (100);   // wait for device stable 
4536 +               handleInsRmvIntr (hci);
4537 +               return;
4538 +       }
4539 +
4540 +       /* Clear all interrupts */
4541 +
4542 +       SL811Write (hci, SL11H_INTSTATREG, 0xff);
4543 +
4544 +       if (ii & SL11H_INTMASK_XFERDONE) {
4545 +               /* USB Done interrupt occurred */
4546 +
4547 +               urb_state = sh_done_list (hci, &isExcessNak);
4548 +#ifdef WARNING
4549 +               if (hci->td_array->len > 0)
4550 +                       printk ("WARNING: IRQ, td_array->len = 0x%x, s/b:0\n",
4551 +                               hci->td_array->len);
4552 +#endif
4553 +               if (hci->td_array->len == 0 && !isExcessNak
4554 +                   && !(ii & SL11H_INTMASK_SOFINTR) && (urb_state == 0)) {
4555 +                       if (urb_state == 0) {
4556 +                               /* All urb_state has not been finished yet! 
4557 +                                * continue with the current urb transaction 
4558 +                                */
4559 +
4560 +                               if (hci->last_packet_nak == 0) {
4561 +                                       if (!usb_pipecontrol
4562 +                                           (hci->td_array->td[0].urb->pipe))
4563 +                                               sh_add_packet (hci, hci->td_array-> td[0].urb);
4564 +                               }
4565 +                       } else {
4566 +                               /* The last transaction has completed:
4567 +                                * schedule the next transaction 
4568 +                                */
4569 +
4570 +                               sh_schedule_trans (hci, 0);
4571 +                       }
4572 +               }
4573 +               SL811Write (hci, SL11H_INTSTATREG, 0xff);
4574 +               return;
4575 +       }
4576 +
4577 +       if (ii & SL11H_INTMASK_SOFINTR) {
4578 +               hci->frame_number = (hci->frame_number + 1) % 2048;
4579 +               if (hci->td_array->len == 0)
4580 +                       sh_schedule_trans (hci, 1);
4581 +               else {
4582 +                       if (sofWaitCnt++ > 100) {
4583 +                               /* The last transaction has not completed.
4584 +                                * Need to retire the current td, and let
4585 +                                * it transmit again later on.
4586 +                                * (THIS NEEDS TO BE WORK ON MORE, IT SHOULD NEVER 
4587 +                                *  GET TO THIS POINT)
4588 +                                */
4589 +
4590 +                               DBGERR ("SOF interrupt: td_array->len = 0x%x, s/b: 0\n",
4591 +                                       hci->td_array->len);
4592 +                               urb_print (hci->td_array->td[hci->td_array->len - 1].urb,
4593 +                                          "INTERRUPT", 0);
4594 +                               sh_done_list (hci, &isExcessNak);
4595 +                               SL811Write (hci, SL11H_INTSTATREG, 0xff);
4596 +                               hci->td_array->len = 0;
4597 +                               sofWaitCnt = 0;
4598 +                       }
4599 +               }
4600 +               tmpIrq = SL811Read (hci, SL11H_INTSTATREG) & SL811Read (hci, SL11H_INTENBLREG);
4601 +               if (tmpIrq) {
4602 +                       DBG ("IRQ occurred while service SOF: irq = 0x%x\n",
4603 +                            tmpIrq);
4604 +
4605 +                       /* If we receive a DONE IRQ after schedule, need to 
4606 +                        * handle DONE IRQ again 
4607 +                        */
4608 +
4609 +                       if (tmpIrq & SL11H_INTMASK_XFERDONE) {
4610 +                               DBGERR ("IRQ occurred while service SOF: irq = 0x%x\n",
4611 +                                       tmpIrq);
4612 +                               urb_state = sh_done_list (hci, &isExcessNak);
4613 +                       }
4614 +                       SL811Write (hci, SL11H_INTSTATREG, 0xff);
4615 +               }
4616 +       } else {
4617 +               DBG ("SL811 ISR: unknown, int = 0x%x \n", ii);
4618 +       }
4619 +
4620 +       SL811Write (hci, SL11H_INTSTATREG, 0xff);
4621 +       return;
4622 +}
4623 +
4624 +/*****************************************************************
4625 + *
4626 + * Function Name: hc_reset
4627 + *
4628 + * This function does register test and resets the SL811HS 
4629 + * controller.
4630 + *
4631 + * Input:  hci = data structure for the host controller
4632 + *
4633 + * Return value  : 0
4634 + *                
4635 + *****************************************************************/
4636 +static int hc_reset (hci_t * hci)
4637 +{
4638 +       int attachFlag = 0;
4639 +
4640 +       DBGFUNC ("Enter hc_reset\n");
4641 +       regTest (hci);
4642 +       attachFlag = USBReset (hci);
4643 +       if (attachFlag) {
4644 +               setPortChange (hci, PORT_CONNECT_CHANGE);
4645 +       }
4646 +       return (0);
4647 +}
4648 +
4649 +/*****************************************************************
4650 + *
4651 + * Function Name: hc_alloc_trans_buffer
4652 + *
4653 + * This function allocates all transfer buffer  
4654 + *
4655 + * Input:  hci = data structure for the host controller
4656 + *
4657 + * Return value  : 0
4658 + *                
4659 + *****************************************************************/
4660 +static int hc_alloc_trans_buffer (hci_t * hci)
4661 +{
4662 +       hcipriv_t *hp = &hci->hp;
4663 +       int maxlen;
4664 +
4665 +       hp->itl0_len = 0;
4666 +       hp->itl1_len = 0;
4667 +       hp->atl_len = 0;
4668 +
4669 +       hp->itl_buffer_len = 1024;
4670 +       hp->atl_buffer_len = 4096 - 2 * hp->itl_buffer_len;     /* 2048 */
4671 +
4672 +       maxlen = (hp->itl_buffer_len > hp->atl_buffer_len) ? hp->itl_buffer_len : hp->atl_buffer_len;
4673 +
4674 +       hp->tl = kmalloc (maxlen, GFP_KERNEL);
4675 +
4676 +       if (!hp->tl)
4677 +               return -ENOMEM;
4678 +
4679 +       memset (hp->tl, 0, maxlen);
4680 +       return 0;
4681 +}
4682 +
4683 +/*****************************************************************
4684 + *
4685 + * Function Name: getPortStatusAndChange
4686 + *
4687 + * This function gets the ports status from SL811 and format it 
4688 + * to a USB request format
4689 + *
4690 + * Input:  hci = data structure for the host controller
4691 + *
4692 + * Return value  : port status and change
4693 + *                
4694 + *****************************************************************/
4695 +static __u32 getPortStatusAndChange (hci_t * hci)
4696 +{
4697 +       hcipriv_t *hp = &hci->hp;
4698 +       __u32 portstatus;
4699 +
4700 +       DBGFUNC ("enter getPorStatusAndChange\n");
4701 +
4702 +       portstatus = hp->RHportStatus->portChange << 16 | hp->RHportStatus->portStatus;
4703 +
4704 +       return (portstatus);
4705 +}
4706 +
4707 +/*****************************************************************
4708 + *
4709 + * Function Name: setPortChange
4710 + *
4711 + * This function set the bit position of portChange.
4712 + *
4713 + * Input:  hci = data structure for the host controller
4714 + *         bitPos = the bit position
4715 + *
4716 + * Return value  : none 
4717 + *                
4718 + *****************************************************************/
4719 +static void setPortChange (hci_t * hci, __u16 bitPos)
4720 +{
4721 +       hcipriv_t *hp = &hci->hp;
4722 +
4723 +       switch (bitPos) {
4724 +       case PORT_CONNECT_STAT:
4725 +               hp->RHportStatus->portChange |= bitPos;
4726 +               break;
4727 +
4728 +       case PORT_ENABLE_STAT:
4729 +               hp->RHportStatus->portChange |= bitPos;
4730 +               break;
4731 +
4732 +       case PORT_RESET_STAT:
4733 +               hp->RHportStatus->portChange |= bitPos;
4734 +               break;
4735 +
4736 +       case PORT_POWER_STAT:
4737 +               hp->RHportStatus->portChange |= bitPos;
4738 +               break;
4739 +
4740 +       case PORT_SUSPEND_STAT:
4741 +               hp->RHportStatus->portChange |= bitPos;
4742 +               break;
4743 +
4744 +       case PORT_OVER_CURRENT_STAT:
4745 +               hp->RHportStatus->portChange |= bitPos;
4746 +               break;
4747 +       }
4748 +}
4749 +
4750 +/*****************************************************************
4751 + *
4752 + * Function Name: clrPortChange
4753 + *
4754 + * This function clear the bit position of portChange.
4755 + *
4756 + * Input:  hci = data structure for the host controller
4757 + *         bitPos = the bit position
4758 + *
4759 + * Return value  : none 
4760 + *                
4761 + *****************************************************************/
4762 +static void clrPortChange (hci_t * hci, __u16 bitPos)
4763 +{
4764 +       hcipriv_t *hp = &hci->hp;
4765 +       switch (bitPos) {
4766 +       case PORT_CONNECT_CHANGE:
4767 +               hp->RHportStatus->portChange &= ~bitPos;
4768 +               break;
4769 +
4770 +       case PORT_ENABLE_CHANGE:
4771 +               hp->RHportStatus->portChange &= ~bitPos;
4772 +               break;
4773 +
4774 +       case PORT_RESET_CHANGE:
4775 +               hp->RHportStatus->portChange &= ~bitPos;
4776 +               break;
4777 +
4778 +       case PORT_SUSPEND_CHANGE:
4779 +               hp->RHportStatus->portChange &= ~bitPos;
4780 +               break;
4781 +
4782 +       case PORT_OVER_CURRENT_CHANGE:
4783 +               hp->RHportStatus->portChange &= ~bitPos;
4784 +               break;
4785 +       }
4786 +}
4787 +
4788 +/*****************************************************************
4789 + *
4790 + * Function Name: clrPortStatus
4791 + *
4792 + * This function clear the bit position of portStatus.
4793 + *
4794 + * Input:  hci = data structure for the host controller
4795 + *         bitPos = the bit position
4796 + *
4797 + * Return value  : none 
4798 + *                
4799 + *****************************************************************/
4800 +static void clrPortStatus (hci_t * hci, __u16 bitPos)
4801 +{
4802 +       hcipriv_t *hp = &hci->hp;
4803 +       switch (bitPos) {
4804 +       case PORT_ENABLE_STAT:
4805 +               hp->RHportStatus->portStatus &= ~bitPos;
4806 +               break;
4807 +
4808 +       case PORT_RESET_STAT:
4809 +               hp->RHportStatus->portStatus &= ~bitPos;
4810 +               break;
4811 +
4812 +       case PORT_POWER_STAT:
4813 +               hp->RHportStatus->portStatus &= ~bitPos;
4814 +               break;
4815 +
4816 +       case PORT_SUSPEND_STAT:
4817 +               hp->RHportStatus->portStatus &= ~bitPos;
4818 +               break;
4819 +       }
4820 +}
4821 +
4822 +/*****************************************************************
4823 + *
4824 + * Function Name: setPortStatus
4825 + *
4826 + * This function set the bit position of portStatus.
4827 + *
4828 + * Input:  hci = data structure for the host controller
4829 + *         bitPos = the bit position
4830 + *
4831 + * Return value  : none 
4832 + *                
4833 + *****************************************************************/
4834 +static void setPortStatus (hci_t * hci, __u16 bitPos)
4835 +{
4836 +       hcipriv_t *hp = &hci->hp;
4837 +       switch (bitPos) {
4838 +       case PORT_ENABLE_STAT:
4839 +               hp->RHportStatus->portStatus |= bitPos;
4840 +               break;
4841 +
4842 +       case PORT_RESET_STAT:
4843 +               hp->RHportStatus->portStatus |= bitPos;
4844 +               break;
4845 +
4846 +       case PORT_POWER_STAT:
4847 +               hp->RHportStatus->portStatus |= bitPos;
4848 +               break;
4849 +
4850 +       case PORT_SUSPEND_STAT:
4851 +               hp->RHportStatus->portStatus |= bitPos;
4852 +               break;
4853 +       }
4854 +}
4855 +
4856 +/*****************************************************************
4857 + *
4858 + * Function Name: hc_start
4859 + *
4860 + * This function starts the root hub functionality. 
4861 + *
4862 + * Input:  hci = data structure for the host controller
4863 + *
4864 + * Return value  : 0 
4865 + *                
4866 + *****************************************************************/
4867 +static int hc_start (hci_t * hci)
4868 +{
4869 +       DBGFUNC ("Enter hc_start\n");
4870 +
4871 +       rh_connect_rh (hci);
4872 +
4873 +       return 0;
4874 +}
4875 +
4876 +/*****************************************************************
4877 + *
4878 + * Function Name: hc_alloc_hci
4879 + *
4880 + * This function allocates all data structure and store in the 
4881 + * private data structure. 
4882 + *
4883 + * Input:  hci = data structure for the host controller
4884 + *
4885 + * Return value  : 0 
4886 + *                
4887 + *****************************************************************/
4888 +static hci_t *__devinit hc_alloc_hci (void)
4889 +{
4890 +       hci_t *hci;
4891 +       hcipriv_t *hp;
4892 +       portstat_t *ps;
4893 +       struct usb_bus *bus;
4894 +
4895 +       DBGFUNC ("Enter hc_alloc_hci\n");
4896 +       hci = (hci_t *) kmalloc (sizeof (hci_t), GFP_KERNEL);
4897 +       if (!hci)
4898 +               return NULL;
4899 +
4900 +       memset (hci, 0, sizeof (hci_t));
4901 +
4902 +       hp = &hci->hp;
4903 +
4904 +       hp->irq = -1;
4905 +       hp->hcport = -1;
4906 +
4907 +       /* setup root hub port status */
4908 +
4909 +       ps = (portstat_t *) kmalloc (sizeof (portstat_t), GFP_KERNEL);
4910 +
4911 +       if (!ps)
4912 +               return NULL;
4913 +       ps->portStatus = PORT_STAT_DEFAULT;
4914 +       ps->portChange = PORT_CHANGE_DEFAULT;
4915 +       hp->RHportStatus = ps;
4916 +
4917 +       hci->nakCnt = 0;
4918 +       hci->last_packet_nak = 0;
4919 +
4920 +       hci->a_td_array.len = 0;
4921 +       hci->i_td_array[0].len = 0;
4922 +       hci->i_td_array[1].len = 0;
4923 +       hci->td_array = &hci->a_td_array;
4924 +       hci->active_urbs = 0;
4925 +       hci->active_trans = 0;
4926 +       INIT_LIST_HEAD (&hci->hci_hcd_list);
4927 +       list_add (&hci->hci_hcd_list, &hci_hcd_list);
4928 +       init_waitqueue_head (&hci->waitq);
4929 +
4930 +       INIT_LIST_HEAD (&hci->ctrl_list);
4931 +       INIT_LIST_HEAD (&hci->bulk_list);
4932 +       INIT_LIST_HEAD (&hci->iso_list);
4933 +       INIT_LIST_HEAD (&hci->intr_list);
4934 +       INIT_LIST_HEAD (&hci->del_list);
4935 +
4936 +       bus = usb_alloc_bus (&hci_device_operations);
4937 +       if (!bus) {
4938 +               kfree (hci);
4939 +               return NULL;
4940 +       }
4941 +
4942 +       hci->bus = bus;
4943 +       bus->bus_name = "sl811";
4944 +       bus->hcpriv = (void *) hci;
4945 +
4946 +       return hci;
4947 +}
4948 +
4949 +/*****************************************************************
4950 + *
4951 + * Function Name: hc_release_hci
4952 + *
4953 + * This function De-allocate all resources  
4954 + *
4955 + * Input:  hci = data structure for the host controller
4956 + *
4957 + * Return value  : 0 
4958 + *                
4959 + *****************************************************************/
4960 +static void hc_release_hci (hci_t * hci)
4961 +{
4962 +       hcipriv_t *hp = &hci->hp;
4963 +
4964 +       DBGFUNC ("Enter hc_release_hci\n");
4965 +
4966 +       /* disconnect all devices */
4967 +       if (hci->bus->root_hub)
4968 +               usb_disconnect (&hci->bus->root_hub);
4969 +
4970 +       hc_reset (hci);
4971 +
4972 +       if (hp->tl)
4973 +               kfree (hp->tl);
4974 +
4975 +       if (hp->hcport > 0) {
4976 +               release_region (hp->hcport, 2);
4977 +               hp->hcport = 0;
4978 +       }
4979 +
4980 +       if (hp->irq >= 0) {
4981 +               free_irq (hp->irq, hci);
4982 +               hp->irq = -1;
4983 +       }
4984 +
4985 +       usb_deregister_bus (hci->bus);
4986 +       usb_free_bus (hci->bus);
4987 +
4988 +       list_del (&hci->hci_hcd_list);
4989 +       INIT_LIST_HEAD (&hci->hci_hcd_list);
4990 +
4991 +       kfree (hci);
4992 +}
4993 +
4994 +/*****************************************************************
4995 + *
4996 + * Function Name: init_irq
4997 + *
4998 + * This function is board specific.  It sets up the interrupt to 
4999 + * be an edge trigger and trigger on the rising edge  
5000 + *
5001 + * Input: none 
5002 + *
5003 + * Return value  : none 
5004 + *                
5005 + *****************************************************************/
5006 +void init_irq (void)
5007 +{
5008 +       GPDR &= ~(1 << 13);
5009 +       set_GPIO_IRQ_edge (1 << 13, GPIO_RISING_EDGE);
5010 +}
5011 +
5012 +/*****************************************************************
5013 + *
5014 + * Function Name: hc_found_hci
5015 + *
5016 + * This function request IO memory regions, request IRQ, and
5017 + * allocate all other resources. 
5018 + *
5019 + * Input: addr = first IO address
5020 + *        addr2 = second IO address
5021 + *        irq = interrupt number 
5022 + *
5023 + * Return: 0 = success or error condition 
5024 + *                
5025 + *****************************************************************/
5026 +static int __devinit hc_found_hci (int addr, int addr2, int irq)
5027 +{
5028 +       hci_t *hci;
5029 +       hcipriv_t *hp;
5030 +
5031 +       DBGFUNC ("Enter hc_found_hci\n");
5032 +       hci = hc_alloc_hci ();
5033 +       if (!hci) {
5034 +               return -ENOMEM;
5035 +       }
5036 +
5037 +       init_irq ();
5038 +       hp = &hci->hp;
5039 +
5040 +       if (!request_region (addr, 256, "SL811 USB HOST")) {
5041 +               DBGERR ("request address %d failed", addr);
5042 +               hc_release_hci (hci);
5043 +               return -EBUSY;
5044 +       }
5045 +       hp->hcport = addr;
5046 +       if (!hp->hcport) {
5047 +               DBGERR ("Error mapping SL811 Memory 0x%x", hp->hcport);
5048 +       }
5049 +
5050 +       if (!request_region (addr2, 256, "SL811 USB HOST")) {
5051 +               DBGERR ("request address %d failed", addr2);
5052 +               hc_release_hci (hci);
5053 +               return -EBUSY;
5054 +       }
5055 +       hp->hcport2 = addr2;
5056 +       if (!hp->hcport2) {
5057 +               DBGERR ("Error mapping SL811 Memory 0x%x", hp->hcport2);
5058 +       }
5059 +
5060 +       if (hc_alloc_trans_buffer (hci)) {
5061 +               hc_release_hci (hci);
5062 +               return -ENOMEM;
5063 +       }
5064 +
5065 +       usb_register_bus (hci->bus);
5066 +
5067 +       if (request_irq (irq, hc_interrupt, 0, "SL811", hci) != 0) {
5068 +               DBGERR ("request interrupt %d failed", irq);
5069 +               hc_release_hci (hci);
5070 +               return -EBUSY;
5071 +       }
5072 +       hp->irq = irq;
5073 +
5074 +       printk (KERN_INFO __FILE__ ": USB SL811 at %x, addr2 = %x, IRQ %d\n",
5075 +               addr, addr2, irq);
5076 +       hc_reset (hci);
5077 +
5078 +       if (hc_start (hci) < 0) {
5079 +               DBGERR ("can't start usb-%x", addr);
5080 +               hc_release_hci (hci);
5081 +               return -EBUSY;
5082 +       }
5083 +
5084 +       return 0;
5085 +}
5086 +
5087 +/*****************************************************************
5088 + *
5089 + * Function Name: hci_hcd_init
5090 + *
5091 + * This is an init function, and it is the first function being called
5092 + *
5093 + * Input: none 
5094 + *
5095 + * Return: 0 = success or error condition 
5096 + *                
5097 + *****************************************************************/
5098 +static int __init hci_hcd_init (void)
5099 +{
5100 +       int ret;
5101 +
5102 +       DBGFUNC ("Enter hci_hcd_init\n");
5103 +       ret = hc_found_hci (base_addr, data_reg_addr, irq);
5104 +
5105 +       return ret;
5106 +}
5107 +
5108 +/*****************************************************************
5109 + *
5110 + * Function Name: hci_hcd_cleanup
5111 + *
5112 + * This is a cleanup function, and it is called when module is 
5113 + * unloaded. 
5114 + *
5115 + * Input: none 
5116 + *
5117 + * Return: none 
5118 + *                
5119 + *****************************************************************/
5120 +static void __exit hci_hcd_cleanup (void)
5121 +{
5122 +       struct list_head *hci_l;
5123 +       hci_t *hci;
5124 +
5125 +       DBGFUNC ("Enter hci_hcd_cleanup\n");
5126 +       for (hci_l = hci_hcd_list.next; hci_l != &hci_hcd_list;) {
5127 +               hci = list_entry (hci_l, hci_t, hci_hcd_list);
5128 +               hci_l = hci_l->next;
5129 +               hc_release_hci (hci);
5130 +       }
5131 +}
5132 +
5133 +module_init (hci_hcd_init);
5134 +module_exit (hci_hcd_cleanup);
5135 +
5136 +MODULE_AUTHOR ("Pei Liu <pbl@cypress.com>");
5137 +MODULE_DESCRIPTION ("USB SL811HS Host Controller Driver");
5138 diff -Nur linux-2.4.19.old/drivers/usb/hc_sl811.h linux-2.4.19/drivers/usb/hc_sl811.h
5139 --- linux-2.4.19.old/drivers/usb/hc_sl811.h     Thu Jan  1 01:00:00 1970
5140 +++ linux-2.4.19/drivers/usb/hc_sl811.h Mon Nov 25 12:26:55 2002
5141 @@ -0,0 +1,385 @@
5142 +/*
5143 + * SL811HS HCD (Host Controller Driver) for USB.
5144 + * 
5145 + * COPYRIGHT (C) by CYPRESS SEMICONDUCTOR INC 
5146 + * 
5147 + *
5148 + */
5149 +
5150 +#define GET_FRAME_NUMBER(hci)  READ_REG32 (hci, HcFmNumber)
5151 +
5152 +/*
5153 + * Maximum number of root hub ports
5154 + */
5155 +#define MAX_ROOT_PORTS         15      /* maximum OHCI root hub ports */
5156 +
5157 +/* control and status registers */
5158 +#define HcRevision             0x00
5159 +#define HcControl              0x01
5160 +#define HcCommandStatus                0x02
5161 +#define HcInterruptStatus      0x03
5162 +#define HcInterruptEnable      0x04
5163 +#define HcInterruptDisable     0x05
5164 +#define HcFmInterval           0x0D
5165 +#define HcFmRemaining          0x0E
5166 +#define HcFmNumber             0x0F
5167 +#define HcLSThreshold          0x11
5168 +#define HcRhDescriptorA                0x12
5169 +#define HcRhDescriptorB                0x13
5170 +#define HcRhStatus             0x14
5171 +#define HcRhPortStatus         0x15
5172 +
5173 +#define HcHardwareConfiguration 0x20
5174 +#define HcDMAConfiguration     0x21
5175 +#define HcTransferCounter      0x22
5176 +#define HcuPInterrupt          0x24
5177 +#define HcuPInterruptEnable    0x25
5178 +#define HcChipID               0x27
5179 +#define HcScratch              0x28
5180 +#define HcSoftwareReset                0x29
5181 +#define HcITLBufferLength      0x2A
5182 +#define HcATLBufferLength      0x2B
5183 +#define HcBufferStatus         0x2C
5184 +#define HcReadBackITL0Length   0x2D
5185 +#define HcReadBackITL1Length   0x2E
5186 +#define HcITLBufferPort                0x40
5187 +#define HcATLBufferPort                0x41
5188 +
5189 +/* OHCI CONTROL AND STATUS REGISTER MASKS */
5190 +
5191 +/*
5192 + * HcControl (control) register masks
5193 + */
5194 +#define OHCI_CTRL_HCFS         (3 << 6)        /* BUS state mask */
5195 +#define OHCI_CTRL_RWC          (1 << 9)        /* remote wakeup connected */
5196 +#define OHCI_CTRL_RWE          (1 << 10)       /* remote wakeup enable */
5197 +
5198 +/* pre-shifted values for HCFS */
5199 +#define OHCI_USB_RESET         (0 << 6)
5200 +#define OHCI_USB_RESUME                (1 << 6)
5201 +#define OHCI_USB_OPER          (2 << 6)
5202 +#define OHCI_USB_SUSPEND       (3 << 6)
5203 +
5204 +/*
5205 + * HcCommandStatus (cmdstatus) register masks
5206 + */
5207 +#define OHCI_HCR       (1 << 0)        /* host controller reset */
5208 +#define OHCI_SO                (3 << 16)       /* scheduling overrun count */
5209 +
5210 +/*
5211 + * masks used with interrupt registers:
5212 + * HcInterruptStatus (intrstatus)
5213 + * HcInterruptEnable (intrenable)
5214 + * HcInterruptDisable (intrdisable)
5215 + */
5216 +#define OHCI_INTR_SO   (1 << 0)        /* scheduling overrun */
5217 +
5218 +#define OHCI_INTR_SF   (1 << 2)        /* start frame */
5219 +#define OHCI_INTR_RD   (1 << 3)        /* resume detect */
5220 +#define OHCI_INTR_UE   (1 << 4)        /* unrecoverable error */
5221 +#define OHCI_INTR_FNO  (1 << 5)        /* frame number overflow */
5222 +#define OHCI_INTR_RHSC (1 << 6)        /* root hub status change */
5223 +#define OHCI_INTR_ATD  (1 << 7)        /* scheduling overrun */
5224 +
5225 +#define OHCI_INTR_MIE  (1 << 31)       /* master interrupt enable */
5226 +
5227 +/*
5228 + * HcHardwareConfiguration
5229 + */
5230 +#define InterruptPinEnable     (1 << 0)
5231 +#define InterruptPinTrigger    (1 << 1)
5232 +#define InterruptOutputPolarity        (1 << 2)
5233 +#define DataBusWidth16         (1 << 3)
5234 +#define DREQOutputPolarity     (1 << 5)
5235 +#define DACKInputPolarity      (1 << 6)
5236 +#define EOTInputPolarity       (1 << 7)
5237 +#define DACKMode               (1 << 8)
5238 +#define AnalogOCEnable         (1 << 10)
5239 +#define SuspendClkNotStop      (1 << 11)
5240 +#define DownstreamPort15KRSel  (1 << 12)
5241 +
5242 +/* 
5243 + * HcDMAConfiguration
5244 + */
5245 +#define DMAReadWriteSelect     (1 << 0)
5246 +#define ITL_ATL_DataSelect     (1 << 1)
5247 +#define DMACounterSelect       (1 << 2)
5248 +#define DMAEnable              (1 << 4)
5249 +#define BurstLen_1             0
5250 +#define BurstLen_4             (1 << 5)
5251 +#define BurstLen_8             (2 << 5)
5252 +
5253 +/*
5254 + * HcuPInterrupt
5255 + */
5256 +#define SOFITLInt              (1 << 0)
5257 +#define ATLInt                 (1 << 1)
5258 +#define AllEOTInterrupt                (1 << 2)
5259 +#define OPR_Reg                        (1 << 4)
5260 +#define HCSuspended            (1 << 5)
5261 +#define ClkReady               (1 << 6)
5262 +
5263 +/*
5264 + * HcBufferStatus
5265 + */
5266 +#define ITL0BufferFull         (1 << 0)
5267 +#define ITL1BufferFull         (1 << 1)
5268 +#define ATLBufferFull          (1 << 2)
5269 +#define ITL0BufferDone         (1 << 3)
5270 +#define ITL1BufferDone         (1 << 4)
5271 +#define ATLBufferDone          (1 << 5)
5272 +
5273 +/* OHCI ROOT HUB REGISTER MASKS */
5274 +
5275 +/* roothub.portstatus [i] bits */
5276 +#define RH_PS_CCS            0x00000001        /* current connect status */
5277 +#define RH_PS_PES            0x00000002        /* port enable status */
5278 +#define RH_PS_PSS            0x00000004        /* port suspend status */
5279 +#define RH_PS_POCI           0x00000008        /* port over current indicator */
5280 +#define RH_PS_PRS            0x00000010        /* port reset status */
5281 +#define RH_PS_PPS            0x00000100        /* port power status */
5282 +#define RH_PS_LSDA           0x00000200        /* low speed device attached */
5283 +#define RH_PS_CSC            0x00010000        /* connect status change */
5284 +#define RH_PS_PESC           0x00020000        /* port enable status change */
5285 +#define RH_PS_PSSC           0x00040000        /* port suspend status change */
5286 +#define RH_PS_OCIC           0x00080000        /* over current indicator change */
5287 +#define RH_PS_PRSC           0x00100000        /* port reset status change */
5288 +
5289 +/* roothub.status bits */
5290 +#define RH_HS_LPS              0x00000001      /* local power status */
5291 +#define RH_HS_OCI              0x00000002      /* over current indicator */
5292 +#define RH_HS_DRWE             0x00008000      /* device remote wakeup enable */
5293 +#define RH_HS_LPSC             0x00010000      /* local power status change */
5294 +#define RH_HS_OCIC             0x00020000      /* over current indicator change */
5295 +#define RH_HS_CRWE             0x80000000      /* clear remote wakeup enable */
5296 +
5297 +/* roothub.b masks */
5298 +#define RH_B_DR                        0x0000ffff      /* device removable flags */
5299 +#define RH_B_PPCM              0xffff0000      /* port power control mask */
5300 +
5301 +/* roothub.a masks */
5302 +#define        RH_A_NDP                (0xff << 0)     /* number of downstream ports */
5303 +#define        RH_A_PSM                (1 << 8)        /* power switching mode */
5304 +#define        RH_A_NPS                (1 << 9)        /* no power switching */
5305 +#define        RH_A_DT                 (1 << 10)       /* device type (mbz) */
5306 +#define        RH_A_OCPM               (1 << 11)       /* over current protection mode */
5307 +#define        RH_A_NOCP               (1 << 12)       /* no over current protection */
5308 +#define        RH_A_POTPGT             (0xff << 24)    /* power on to power good time */
5309 +
5310 +#define URB_DEL 1
5311 +
5312 +#define PORT_STAT_DEFAULT              0x0100
5313 +#define PORT_CONNECT_STAT              0x1
5314 +#define PORT_ENABLE_STAT               0x2
5315 +#define PORT_SUSPEND_STAT              0x4
5316 +#define PORT_OVER_CURRENT_STAT         0x8
5317 +#define PORT_RESET_STAT                        0x10
5318 +#define PORT_POWER_STAT                        0x100
5319 +#define PORT_LOW_SPEED_DEV_ATTACH_STAT 0x200
5320 +
5321 +#define PORT_CHANGE_DEFAULT            0x0
5322 +#define PORT_CONNECT_CHANGE            0x1
5323 +#define PORT_ENABLE_CHANGE             0x2
5324 +#define PORT_SUSPEND_CHANGE            0x4
5325 +#define PORT_OVER_CURRENT_CHANGE       0x8
5326 +#define PORT_RESET_CHANGE              0x10
5327 +
5328 +/* Port Status Request info */
5329 +
5330 +typedef struct portstat {
5331 +       __u16 portChange;
5332 +       __u16 portStatus;
5333 +} portstat_t;
5334 +
5335 +typedef struct hcipriv {
5336 +       int irq;
5337 +       int disabled;           /* e.g. got a UE, we're hung */
5338 +       atomic_t resume_count;  /* defending against multiple resumes */
5339 +       struct ohci_regs *regs; /* OHCI controller's memory */
5340 +       int hcport;             /* I/O base address */
5341 +       int hcport2;            /* I/O data reg addr */
5342 +
5343 +       struct portstat *RHportStatus;  /* root hub port status */
5344 +
5345 +       int intrstatus;
5346 +       __u32 hc_control;       /* copy of the hc control reg */
5347 +
5348 +       int frame;
5349 +
5350 +       __u8 *tl;
5351 +       int xferPktLen;
5352 +       int atl_len;
5353 +       int atl_buffer_len;
5354 +       int itl0_len;
5355 +       int itl1_len;
5356 +       int itl_buffer_len;
5357 +       int itl_index;
5358 +       int tl_last;
5359 +       int units_left;
5360 +
5361 +} hcipriv_t;
5362 +struct hci;
5363 +
5364 +#define cClt        0          // Control
5365 +#define cISO        1          // ISO
5366 +#define cBULK       2          // BULK
5367 +#define cInt        3          // Interrupt
5368 +#define ISO_BIT     0x10
5369 +
5370 +/*-------------------------------------------------------------------------
5371 + * EP0 use for configuration and Vendor Specific command interface
5372 + *------------------------------------------------------------------------*/
5373 +#define cMemStart       0x10
5374 +#define EP0Buf          0x40   /* SL11H/SL811H memory start at 0x40 */
5375 +#define EP0Len          0x40   /* Length of config buffer EP0Buf */
5376 +#define EP1Buf          0x60
5377 +#define EP1Len          0x40
5378 +
5379 +/*-------------------------------------------------------------------------
5380 + * SL11H/SL811H memory from 80h-ffh use as ping-pong buffer.
5381 + *------------------------------------------------------------------------*/
5382 +#define uBufA           0x80   /* buffer A address for DATA0 */
5383 +#define uBufB           0xc0   /* buffer B address for DATA1 */
5384 +#define uXferLen        0x40   /* xfer length */
5385 +#define sMemSize        0xc0   /* Total SL11 memory size */
5386 +#define cMemEnd         256
5387 +
5388 +/*-------------------------------------------------------------------------
5389 + * SL811H Register Control memory map
5390 + * --Note: 
5391 + *      --SL11H only has one control register set from 0x00-0x04
5392 + *      --SL811H has two control register set from 0x00-0x04 and 0x08-0x0c
5393 + *------------------------------------------------------------------------*/
5394 +
5395 +#define EP0Control      0x00
5396 +#define EP0Address      0x01
5397 +#define EP0XferLen      0x02
5398 +#define EP0Status       0x03
5399 +#define EP0Counter      0x04
5400 +
5401 +#define EP1Control      0x08
5402 +#define EP1Address      0x09
5403 +#define EP1XferLen      0x0a
5404 +#define EP1Status       0x0b
5405 +#define EP1Counter      0x0c
5406 +
5407 +#define CtrlReg         0x05
5408 +#define IntEna          0x06
5409 +                        // 0x07 is reserved
5410 +#define IntStatus       0x0d
5411 +#define cDATASet        0x0e
5412 +#define cSOFcnt         0x0f
5413 +#define IntMask         0x57   /* Reset|DMA|EP0|EP2|EP1 for IntEna */
5414 +#define HostMask        0x47   /* Host request command  for IntStatus */
5415 +#define ReadMask        0xd7   /* Read mask interrupt   for IntStatus */
5416 +
5417 +/*-------------------------------------------------------------------------
5418 + * Standard Chapter 9 definition
5419 + *-------------------------------------------------------------------------
5420 + */
5421 +#define GET_STATUS      0x00
5422 +#define CLEAR_FEATURE   0x01
5423 +#define SET_FEATURE     0x03
5424 +#define SET_ADDRESS     0x05
5425 +#define GET_DESCRIPTOR  0x06
5426 +#define SET_DESCRIPTOR  0x07
5427 +#define GET_CONFIG      0x08
5428 +#define SET_CONFIG      0x09
5429 +#define GET_INTERFACE   0x0a
5430 +#define SET_INTERFACE   0x0b
5431 +#define SYNCH_FRAME     0x0c
5432 +
5433 +#define DEVICE          0x01
5434 +#define CONFIGURATION   0x02
5435 +#define STRING          0x03
5436 +#define INTERFACE       0x04
5437 +#define ENDPOINT        0x05
5438 +
5439 +/*-------------------------------------------------------------------------
5440 + * SL11H/SL811H definition
5441 + *-------------------------------------------------------------------------
5442 + */
5443 +#define DATA0_WR       0x07    // (Arm+Enable+tranmist to Host+DATA0)
5444 +#define DATA1_WR       0x47    // (Arm+Enable+tranmist to Host on DATA1)
5445 +#define ZDATA0_WR      0x05    // (Arm+Transaction Ignored+tranmist to Host+DATA0)
5446 +#define ZDATA1_WR      0x45    // (Arm+Transaction Ignored+tranmist to Host+DATA1)
5447 +#define DATA0_RD       0x03    // (Arm+Enable+received from Host+DATA0)
5448 +#define DATA1_RD       0x43    // (Arm+Enable+received from Host+DATA1)
5449 +
5450 +#define PID_SETUP      0x2d    // USB Specification 1.1 Standard Definition
5451 +#define PID_SOF                0xA5
5452 +#define PID_IN         0x69
5453 +#define PID_OUT                0xe1
5454 +
5455 +#define MAX_RETRY      0xffff
5456 +#define TIMEOUT                5               /* 2 mseconds */
5457 +
5458 +#define SL11H_HOSTCTLREG       0
5459 +#define SL11H_BUFADDRREG       1
5460 +#define SL11H_BUFLNTHREG       2
5461 +#define SL11H_PKTSTATREG       3       /* read */
5462 +#define SL11H_PIDEPREG         3       /* write */
5463 +#define SL11H_XFERCNTREG       4       /* read */
5464 +#define SL11H_DEVADDRREG       4       /* write */
5465 +#define SL11H_CTLREG1          5
5466 +#define SL11H_INTENBLREG       6
5467 +
5468 +#define SL11H_HOSTCTLREG_B     8
5469 +#define SL11H_BUFADDRREG_B     9
5470 +#define SL11H_BUFLNTHREG_B     0x0A
5471 +#define SL11H_PKTSTATREG_B     0x0B    /* read */
5472 +#define SL11H_PIDEPREG_B       0x0B    /* write */
5473 +#define SL11H_XFERCNTREG_B     0x0C    /* read */
5474 +#define SL11H_DEVADDRREG_B     0x0C    /* write */
5475 +
5476 +#define SL11H_INTSTATREG       0x0D    /* write clears bitwise */
5477 +#define SL11H_HWREVREG         0x0E    /* read */
5478 +#define SL11H_SOFLOWREG                0x0E    /* write */
5479 +#define SL11H_SOFTMRREG                0x0F    /* read */
5480 +#define SL11H_CTLREG2          0x0F    /* write */
5481 +#define SL11H_DATA_START       0x10
5482 +
5483 +/* Host control register bits (addr 0) */
5484 +#define SL11H_HCTLMASK_ARM     1
5485 +#define SL11H_HCTLMASK_ENBLEP  2
5486 +#define SL11H_HCTLMASK_WRITE   4
5487 +#define SL11H_HCTLMASK_ISOCH   0x10
5488 +#define SL11H_HCTLMASK_AFTERSOF        0x20
5489 +#define SL11H_HCTLMASK_SEQ     0x40
5490 +#define SL11H_HCTLMASK_PREAMBLE        0x80
5491 +
5492 +/* Packet status register bits (addr 3) */
5493 +#define SL11H_STATMASK_ACK     1
5494 +#define SL11H_STATMASK_ERROR   2
5495 +#define SL11H_STATMASK_TMOUT   4
5496 +#define SL11H_STATMASK_SEQ     8
5497 +#define SL11H_STATMASK_SETUP   0x10
5498 +#define SL11H_STATMASK_OVF     0x20
5499 +#define SL11H_STATMASK_NAK     0x40
5500 +#define SL11H_STATMASK_STALL   0x80
5501 +
5502 +/* Control register 1 bits (addr 5) */
5503 +#define SL11H_CTL1MASK_DSBLSOF 1
5504 +#define SL11H_CTL1MASK_NOTXEOF2        4
5505 +#define SL11H_CTL1MASK_DSTATE  0x18
5506 +#define SL11H_CTL1MASK_NSPD    0x20
5507 +#define SL11H_CTL1MASK_SUSPEND 0x40
5508 +#define SL11H_CTL1MASK_CLK12   0x80
5509 +
5510 +#define SL11H_CTL1VAL_RESET    8
5511 +
5512 +/* Interrut enable (addr 6) and interrupt status register bits (addr 0xD) */
5513 +#define SL11H_INTMASK_XFERDONE 1
5514 +#define SL11H_INTMASK_SOFINTR  0x10
5515 +#define SL11H_INTMASK_INSRMV   0x20
5516 +#define SL11H_INTMASK_USBRESET 0x40
5517 +#define SL11H_INTMASK_DSTATE   0x80    /* only in status reg */
5518 +
5519 +/* HW rev and SOF lo register bits (addr 0xE) */
5520 +#define SL11H_HWRMASK_HWREV    0xF0
5521 +
5522 +/* SOF counter and control reg 2 (addr 0xF) */
5523 +#define SL11H_CTL2MASK_SOFHI   0x3F
5524 +#define SL11H_CTL2MASK_DSWAP   0x40
5525 +#define SL11H_CTL2MASK_HOSTMODE        0xae
5526 +
5527 diff -Nur linux-2.4.19.old/drivers/usb/hc_sl811_rh.c linux-2.4.19/drivers/usb/hc_sl811_rh.c
5528 --- linux-2.4.19.old/drivers/usb/hc_sl811_rh.c  Thu Jan  1 01:00:00 1970
5529 +++ linux-2.4.19/drivers/usb/hc_sl811_rh.c      Mon Nov 25 12:26:55 2002
5530 @@ -0,0 +1,526 @@
5531 +
5532 +/*-------------------------------------------------------------------------*/
5533 +/*-------------------------------------------------------------------------*
5534 + * SL811HS virtual root hub
5535 + *  
5536 + * based on usb-ohci.c by R. Weissgaerber et al.
5537 + *-------------------------------------------------------------------------*
5538 + * This program is free software; you can redistribute it and/or modify
5539 + * it under the terms of the GNU General Public License as published by
5540 + * the Free Software Foundation; either version 2 of the License, or
5541 + * (at your option) any later version.
5542 + *
5543 + * This program is distributed in the hope that it will be useful,
5544 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
5545 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5546 + * GNU General Public License for more details.
5547 + *
5548 + * You should have received a copy of the GNU General Public License
5549 + * along with this program; if not, write to the Free Software
5550 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
5551 + *
5552 + *-------------------------------------------------------------------------*/
5553 +
5554 +#ifdef DEBUG
5555 +#undef DEBUG
5556 +#endif
5557 +static __u32 getPortStatusAndChange (hci_t * hci);
5558 +static void setPortStatus (hci_t * hci, __u16 bitPos);
5559 +static void setPortChange (hci_t * hci, __u16 bitPos);
5560 +static void clrPortStatus (hci_t * hci, __u16 bitPos);
5561 +static void clrPortChange (hci_t * hci, __u16 bitPos);
5562 +static int USBReset (hci_t * hci);
5563 +static int cc_to_error (int cc);
5564 +
5565 +/*-------------------------------------------------------------------------*
5566 + * Virtual Root Hub 
5567 + *-------------------------------------------------------------------------*/
5568 +
5569 +/* Device descriptor */
5570 +static __u8 root_hub_dev_des[] = {
5571 +       0x12,                   /*  __u8  bLength; */
5572 +       0x01,                   /*  __u8  bDescriptorType; Device */
5573 +       0x10,                   /*  __u16 bcdUSB; v1.1 */
5574 +       0x01,
5575 +       0x09,                   /*  __u8  bDeviceClass; HUB_CLASSCODE */
5576 +       0x00,                   /*  __u8  bDeviceSubClass; */
5577 +       0x00,                   /*  __u8  bDeviceProtocol; */
5578 +       0x08,                   /*  __u8  bMaxPacketSize0; 8 Bytes */
5579 +       0x00,                   /*  __u16 idVendor; */
5580 +       0x00,
5581 +       0x00,                   /*  __u16 idProduct; */
5582 +       0x00,
5583 +       0x00,                   /*  __u16 bcdDevice; */
5584 +       0x00,
5585 +       0x00,                   /*  __u8  iManufacturer; */
5586 +       0x02,                   /*  __u8  iProduct; */
5587 +       0x01,                   /*  __u8  iSerialNumber; */
5588 +       0x01                    /*  __u8  bNumConfigurations; */
5589 +};
5590 +
5591 +/* Configuration descriptor */
5592 +static __u8 root_hub_config_des[] = {
5593 +       0x09,                   /*  __u8  bLength; */
5594 +       0x02,                   /*  __u8  bDescriptorType; Configuration */
5595 +       0x19,                   /*  __u16 wTotalLength; */
5596 +       0x00,
5597 +       0x01,                   /*  __u8  bNumInterfaces; */
5598 +       0x01,                   /*  __u8  bConfigurationValue; */
5599 +       0x00,                   /*  __u8  iConfiguration; */
5600 +       0x40,                   /*  __u8  bmAttributes; 
5601 +                                  Bit 7: Bus-powered, 6: Self-powered, 5 Remote-wakwup, 
5602 +                                  4..0: resvd */
5603 +       0x00,                   /*  __u8  MaxPower; */
5604 +
5605 +       /* interface */
5606 +       0x09,                   /*  __u8  if_bLength; */
5607 +       0x04,                   /*  __u8  if_bDescriptorType; Interface */
5608 +       0x00,                   /*  __u8  if_bInterfaceNumber; */
5609 +       0x00,                   /*  __u8  if_bAlternateSetting; */
5610 +       0x01,                   /*  __u8  if_bNumEndpoints; */
5611 +       0x09,                   /*  __u8  if_bInterfaceClass; HUB_CLASSCODE */
5612 +       0x00,                   /*  __u8  if_bInterfaceSubClass; */
5613 +       0x00,                   /*  __u8  if_bInterfaceProtocol; */
5614 +       0x00,                   /*  __u8  if_iInterface; */
5615 +
5616 +       /* endpoint */
5617 +       0x07,                   /*  __u8  ep_bLength; */
5618 +       0x05,                   /*  __u8  ep_bDescriptorType; Endpoint */
5619 +       0x81,                   /*  __u8  ep_bEndpointAddress; IN Endpoint 1 */
5620 +       0x03,                   /*  __u8  ep_bmAttributes; Interrupt */
5621 +       0x02,                   /*  __u16 ep_wMaxPacketSize; ((MAX_ROOT_PORTS + 1) / 8 */
5622 +       0x00,
5623 +       0xff                    /*  __u8  ep_bInterval; 255 ms */
5624 +};
5625 +
5626 +/* Hub class-specific descriptor is constructed dynamically */
5627 +
5628 +/***************************************************************************
5629 + * Function Name : rh_send_irq
5630 + * 
5631 + * This function examine the port change in the virtual root hub.
5632 + * 
5633 + * Note: This function assumes only one port exist in the root hub.
5634 + *
5635 + * Input:  hci = data structure for the host controller
5636 + *         rh_data = The pointer to port change data
5637 + *         rh_len = length of the data in bytes
5638 + *
5639 + * Return: length of data  
5640 + **************************************************************************/
5641 +static int rh_send_irq (hci_t * hci, void *rh_data, int rh_len)
5642 +{
5643 +       int num_ports;
5644 +       int i;
5645 +       int ret;
5646 +       int len;
5647 +       __u8 data[8];
5648 +
5649 +       DBGFUNC ("enter rh_send_irq: \n");
5650 +
5651 +       /* Assuming the root hub has one port.  This value need to change if
5652 +        * there are more than one port for the root hub
5653 +        */
5654 +
5655 +       num_ports = 1;
5656 +
5657 +       /* The root hub status is not implemented, it basically has two fields:
5658 +        *     -- Local Power Status
5659 +        *     -- Over Current Indicator
5660 +        *     -- Local Power Change
5661 +        *     -- Over Current Indicator
5662 +        *
5663 +        * Right now, It is assume the power is good and no changes 
5664 +        */
5665 +
5666 +       *(__u8 *) data = 0;
5667 +
5668 +       ret = *(__u8 *) data;
5669 +
5670 +       /* Has the port status change within the root hub: It checks for
5671 +        *      -- Port Connect Status change
5672 +        *      -- Port Enable Change
5673 +        */
5674 +
5675 +       for (i = 0; i < num_ports; i++) {
5676 +               *(__u8 *) (data + (i + 1) / 8) |=
5677 +                   (((getPortStatusAndChange (hci) >> 16) & (PORT_CONNECT_STAT | PORT_ENABLE_STAT)) ? 1 : 0) << ((i + 1) % 8);
5678 +               ret += *(__u8 *) (data + (i + 1) / 8);
5679 +
5680 +               /* After the port change is read, it should be reset so the next time 
5681 +                * is it doesn't trigger a change again */
5682 +
5683 +       }
5684 +       len = i / 8 + 1;
5685 +
5686 +       if (ret > 0) {
5687 +               memcpy (rh_data, data, min (len, min (rh_len, (int)sizeof (data))));
5688 +               return len;
5689 +       }
5690 +       return 0;
5691 +}
5692 +
5693 +/***************************************************************************
5694 + * Function Name : rh_int_timer_do
5695 + * 
5696 + * This function is called when the timer expires.  It gets the the port 
5697 + * change data and pass along to the upper protocol.
5698 + * 
5699 + * Note:  The virtual root hub interrupt pipe are polled by the timer
5700 + *        every "interval" ms
5701 + *
5702 + * Input:  ptr = ptr to the urb
5703 + *
5704 + * Return: none  
5705 + **************************************************************************/
5706 +static void rh_int_timer_do (unsigned long ptr)
5707 +{
5708 +       int len;
5709 +       struct urb *urb = (struct urb *) ptr;
5710 +       hci_t *hci = urb->dev->bus->hcpriv;
5711 +
5712 +       DBGFUNC ("enter rh_int_timer_do\n");
5713 +
5714 +       if (hci->rh.send) {
5715 +               len = rh_send_irq (hci, urb->transfer_buffer,
5716 +                                  urb->transfer_buffer_length);
5717 +               if (len > 0) {
5718 +                       urb->actual_length = len;
5719 +                       if (urb_debug == 2)
5720 +                               urb_print (urb, "RET-t(rh)",
5721 +                                          usb_pipeout (urb->pipe));
5722 +
5723 +                       if (urb->complete) {
5724 +                               urb->complete (urb);
5725 +                       }
5726 +               }
5727 +       }
5728 +
5729 +       /* re-activate the timer */
5730 +       rh_init_int_timer (urb);
5731 +}
5732 +
5733 +/***************************************************************************
5734 + * Function Name : rh_init_int_timer
5735 + * 
5736 + * This function creates a timer that act as interrupt pipe in the
5737 + * virtual hub.   
5738 + * 
5739 + * Note:  The virtual root hub's interrupt pipe are polled by the timer
5740 + *        every "interval" ms
5741 + *
5742 + * Input: urb = USB request block 
5743 + *
5744 + * Return: 0  
5745 + **************************************************************************/
5746 +static int rh_init_int_timer (struct urb * urb)
5747 +{
5748 +       hci_t *hci = urb->dev->bus->hcpriv;
5749 +       hci->rh.interval = urb->interval;
5750 +
5751 +       init_timer (&hci->rh.rh_int_timer);
5752 +       hci->rh.rh_int_timer.function = rh_int_timer_do;
5753 +       hci->rh.rh_int_timer.data = (unsigned long) urb;
5754 +       hci->rh.rh_int_timer.expires = jiffies + (HZ * (urb->interval < 30 ? 30 : urb->interval)) / 1000;
5755 +       add_timer (&hci->rh.rh_int_timer);
5756 +
5757 +       return 0;
5758 +}
5759 +
5760 +/*-------------------------------------------------------------------------*/
5761 +
5762 +/* helper macro */
5763 +#define OK(x)                  len = (x); break
5764 +
5765 +/***************************************************************************
5766 + * Function Name : rh_submit_urb
5767 + * 
5768 + * This function handles all USB request to the the virtual root hub
5769 + * 
5770 + * Input: urb = USB request block 
5771 + *
5772 + * Return: 0  
5773 + **************************************************************************/
5774 +static int rh_submit_urb (struct urb * urb)
5775 +{
5776 +       struct usb_device *usb_dev = urb->dev;
5777 +       hci_t *hci = usb_dev->bus->hcpriv;
5778 +       unsigned int pipe = urb->pipe;
5779 +       struct usb_ctrlrequest *cmd = (struct usb_ctrlrequest *) urb->setup_packet;
5780 +       void *data = urb->transfer_buffer;
5781 +       int leni = urb->transfer_buffer_length;
5782 +       int len = 0;
5783 +       int status = TD_CC_NOERROR;
5784 +       __u32 datab[4];
5785 +       __u8 *data_buf = (__u8 *) datab;
5786 +
5787 +       __u16 bmRType_bReq;
5788 +       __u16 wValue;
5789 +       __u16 wIndex;
5790 +       __u16 wLength;
5791 +
5792 +       DBGFUNC ("enter rh_submit_urb\n");
5793 +       if (usb_pipeint (pipe)) {
5794 +               hci->rh.urb = urb;
5795 +               hci->rh.send = 1;
5796 +               hci->rh.interval = urb->interval;
5797 +               rh_init_int_timer (urb);
5798 +               urb->status = cc_to_error (TD_CC_NOERROR);
5799 +
5800 +               return 0;
5801 +       }
5802 +
5803 +       bmRType_bReq = cmd->bRequestType | (cmd->bRequest << 8);
5804 +       wValue = le16_to_cpu (cmd->wValue);
5805 +       wIndex = le16_to_cpu (cmd->wIndex);
5806 +       wLength = le16_to_cpu (cmd->wLength);
5807 +
5808 +       DBG ("rh_submit_urb, req = %d(%x) len=%d",
5809 +            bmRType_bReq, bmRType_bReq, wLength);
5810 +
5811 +       switch (bmRType_bReq) {
5812 +               /* Request Destination:
5813 +                  without flags: Device, 
5814 +                  RH_INTERFACE: interface, 
5815 +                  RH_ENDPOINT: endpoint,
5816 +                  RH_CLASS means HUB here, 
5817 +                  RH_OTHER | RH_CLASS  almost ever means HUB_PORT here 
5818 +                */
5819 +
5820 +       case RH_GET_STATUS:
5821 +               *(__u16 *) data_buf = cpu_to_le16 (1);
5822 +               OK (2);
5823 +
5824 +       case RH_GET_STATUS | RH_INTERFACE:
5825 +               *(__u16 *) data_buf = cpu_to_le16 (0);
5826 +               OK (2);
5827 +
5828 +       case RH_GET_STATUS | RH_ENDPOINT:
5829 +               *(__u16 *) data_buf = cpu_to_le16 (0);
5830 +               OK (2);
5831 +
5832 +       case RH_GET_STATUS | RH_CLASS:
5833 +               *(__u32 *) data_buf = cpu_to_le32 (0);
5834 +               OK (4);
5835 +
5836 +       case RH_GET_STATUS | RH_OTHER | RH_CLASS:
5837 +               *(__u32 *) data_buf =
5838 +                   cpu_to_le32 (getPortStatusAndChange (hci));
5839 +               OK (4);
5840 +
5841 +       case RH_CLEAR_FEATURE | RH_ENDPOINT:
5842 +               switch (wValue) {
5843 +               case (RH_ENDPOINT_STALL):
5844 +                       OK (0);
5845 +               }
5846 +               break;
5847 +
5848 +       case RH_CLEAR_FEATURE | RH_CLASS:
5849 +               switch (wValue) {
5850 +               case RH_C_HUB_LOCAL_POWER:
5851 +                       OK (0);
5852 +
5853 +               case (RH_C_HUB_OVER_CURRENT):
5854 +                       /* Over Current Not Implemented */
5855 +                       OK (0);
5856 +               }
5857 +               break;
5858 +
5859 +       case RH_CLEAR_FEATURE | RH_OTHER | RH_CLASS:
5860 +               switch (wValue) {
5861 +               case (RH_PORT_ENABLE):
5862 +                       clrPortStatus (hci, PORT_ENABLE_STAT);
5863 +                       OK (0);
5864 +
5865 +               case (RH_PORT_SUSPEND):
5866 +                       clrPortStatus (hci, PORT_SUSPEND_STAT);
5867 +                       OK (0);
5868 +
5869 +               case (RH_PORT_POWER):
5870 +                       clrPortStatus (hci, PORT_POWER_STAT);
5871 +                       OK (0);
5872 +
5873 +               case (RH_C_PORT_CONNECTION):
5874 +                       clrPortChange (hci, PORT_CONNECT_STAT);
5875 +                       OK (0);
5876 +
5877 +               case (RH_C_PORT_ENABLE):
5878 +                       clrPortChange (hci, PORT_ENABLE_STAT);
5879 +                       OK (0);
5880 +
5881 +               case (RH_C_PORT_SUSPEND):
5882 +                       clrPortChange (hci, PORT_SUSPEND_STAT);
5883 +                       OK (0);
5884 +
5885 +               case (RH_C_PORT_OVER_CURRENT):
5886 +                       clrPortChange (hci, PORT_OVER_CURRENT_STAT);
5887 +                       OK (0);
5888 +
5889 +               case (RH_C_PORT_RESET):
5890 +                       clrPortChange (hci, PORT_RESET_STAT);
5891 +                       OK (0);
5892 +               }
5893 +               break;
5894 +
5895 +       case RH_SET_FEATURE | RH_OTHER | RH_CLASS:
5896 +               switch (wValue) {
5897 +               case (RH_PORT_SUSPEND):
5898 +                       setPortStatus (hci, PORT_SUSPEND_STAT);
5899 +                       OK (0);
5900 +
5901 +               case (RH_PORT_RESET):
5902 +                       setPortStatus (hci, PORT_RESET_STAT);
5903 +                       // USBReset(hci);
5904 +                       clrPortChange (hci,
5905 +                                      PORT_CONNECT_CHANGE | PORT_ENABLE_CHANGE
5906 +                                      | PORT_SUSPEND_CHANGE |
5907 +                                      PORT_OVER_CURRENT_CHANGE);
5908 +                       setPortChange (hci, PORT_RESET_CHANGE);
5909 +                       clrPortStatus (hci, PORT_RESET_STAT);
5910 +                       setPortStatus (hci, PORT_ENABLE_STAT);
5911 +
5912 +                       OK (0);
5913 +
5914 +               case (RH_PORT_POWER):
5915 +                       setPortStatus (hci, PORT_POWER_STAT);
5916 +                       OK (0);
5917 +
5918 +               case (RH_PORT_ENABLE):
5919 +                       setPortStatus (hci, PORT_ENABLE_STAT);
5920 +                       OK (0);
5921 +               }
5922 +               break;
5923 +
5924 +       case RH_SET_ADDRESS:
5925 +               hci->rh.devnum = wValue;
5926 +               OK (0);
5927 +
5928 +       case RH_GET_DESCRIPTOR:
5929 +               DBGVERBOSE ("rh_submit_urb: RH_GET_DESCRIPTOR, wValue = 0x%x\n", wValue);
5930 +               switch ((wValue & 0xff00) >> 8) {
5931 +               case (0x01):    /* device descriptor */
5932 +                       len = min (leni, min ((__u16)sizeof (root_hub_dev_des), wLength));
5933 +                       data_buf = root_hub_dev_des;
5934 +                       OK (len);
5935 +
5936 +               case (0x02):    /* configuration descriptor */
5937 +                       len = min (leni, min ((__u16)sizeof (root_hub_config_des), wLength));
5938 +                       data_buf = root_hub_config_des;
5939 +                       OK (len);
5940 +
5941 +               case (0x03):    /* string descriptors */
5942 +                       len = usb_root_hub_string (wValue & 0xff, (int) (long) 0,
5943 +                                                  "SL811HS", data, wLength);
5944 +                       if (len > 0) {
5945 +                               data_buf = data;
5946 +                               OK (min (leni, len));
5947 +                       }
5948 +
5949 +               default:
5950 +                       status = SL11H_STATMASK_STALL;
5951 +               }
5952 +               break;
5953 +
5954 +       case RH_GET_DESCRIPTOR | RH_CLASS:
5955 +               data_buf[0] = 9;        // min length;
5956 +               data_buf[1] = 0x29;
5957 +               data_buf[2] = 1;        // # of downstream port
5958 +               data_buf[3] = 0;
5959 +               datab[1] = 0;
5960 +               data_buf[5] = 50;       // 100 ms for port reset
5961 +               data_buf[7] = 0xfc;     // which port is attachable
5962 +               if (data_buf[2] < 7) {
5963 +                       data_buf[8] = 0xff;
5964 +               } else {
5965 +               }
5966 +
5967 +               len = min (leni, min ((__u16)data_buf[0], wLength));
5968 +               OK (len);
5969 +
5970 +       case RH_GET_CONFIGURATION:
5971 +               *(__u8 *) data_buf = 0x01;
5972 +               OK (1);
5973 +
5974 +       case RH_SET_CONFIGURATION:
5975 +               OK (0);
5976 +
5977 +       default:
5978 +               DBGERR ("unsupported root hub command");
5979 +               status = SL11H_STATMASK_STALL;
5980 +       }
5981 +
5982 +       len = min (len, leni);
5983 +       if (data != data_buf)
5984 +               memcpy (data, data_buf, len);
5985 +       urb->actual_length = len;
5986 +       urb->status = cc_to_error (status);
5987 +
5988 +       urb->hcpriv = NULL;
5989 +       urb->dev = NULL;
5990 +       if (urb->complete) {
5991 +               urb->complete (urb);
5992 +       }
5993 +
5994 +       return 0;
5995 +}
5996 +
5997 +/***************************************************************************
5998 + * Function Name : rh_unlink_urb
5999 + * 
6000 + * This function unlinks the URB 
6001 + * 
6002 + * Input: urb = USB request block 
6003 + *
6004 + * Return: 0  
6005 + **************************************************************************/
6006 +static int rh_unlink_urb (struct urb * urb)
6007 +{
6008 +       hci_t *hci = urb->dev->bus->hcpriv;
6009 +
6010 +       DBGFUNC ("enter rh_unlink_urb\n");
6011 +       if (hci->rh.urb == urb) {
6012 +               hci->rh.send = 0;
6013 +               del_timer (&hci->rh.rh_int_timer);
6014 +               hci->rh.urb = NULL;
6015 +
6016 +               urb->hcpriv = NULL;
6017 +               usb_put_dev (urb->dev);
6018 +               urb->dev = NULL;
6019 +               if (urb->transfer_flags & USB_ASYNC_UNLINK) {
6020 +                       urb->status = -ECONNRESET;
6021 +                       if (urb->complete) {
6022 +                               urb->complete (urb);
6023 +                       }
6024 +               } else
6025 +                       urb->status = -ENOENT;
6026 +       }
6027 +       return 0;
6028 +}
6029 +
6030 +/***************************************************************************
6031 + * Function Name : rh_connect_rh
6032 + * 
6033 + * This function connect the virtual root hub to the USB stack 
6034 + * 
6035 + * Input: urb = USB request block 
6036 + *
6037 + * Return: 0  
6038 + **************************************************************************/
6039 +static int rh_connect_rh (hci_t * hci)
6040 +{
6041 +       struct usb_device *usb_dev;
6042 +
6043 +       hci->rh.devnum = 0;
6044 +       usb_dev = usb_alloc_dev (NULL, hci->bus);
6045 +       if (!usb_dev)
6046 +               return -ENOMEM;
6047 +
6048 +       hci->bus->root_hub = usb_dev;
6049 +       usb_connect (usb_dev);
6050 +       if (usb_new_device (usb_dev) != 0) {
6051 +               usb_free_dev (usb_dev);
6052 +               return -ENODEV;
6053 +       }
6054 +
6055 +       return 0;
6056 +}
6057 diff -Nur linux-2.4.19.old/drivers/usb/hcd/ehci-hcd.c linux-2.4.19/drivers/usb/hcd/ehci-hcd.c
6058 --- linux-2.4.19.old/drivers/usb/hcd/ehci-hcd.c Sat Aug  3 02:39:44 2002
6059 +++ linux-2.4.19/drivers/usb/hcd/ehci-hcd.c     Mon Nov 25 12:26:55 2002
6060 @@ -434,10 +434,6 @@
6061         scan_async (ehci);
6062         if (ehci->next_uframe != -1)
6063                 scan_periodic (ehci);
6064 -
6065 -       // FIXME:  when nothing is connected to the root hub,
6066 -       // turn off the RUN bit so the host can enter C3 "sleep" power
6067 -       // saving mode; make root hub code scan memory less often.
6068  }
6069  
6070  /*-------------------------------------------------------------------------*/
6071 @@ -582,7 +578,10 @@
6072                 return 0;
6073  
6074         case PIPE_INTERRUPT:
6075 -               intr_deschedule (ehci, urb->start_frame, qh, urb->interval);
6076 +               intr_deschedule (ehci, urb->start_frame, qh,
6077 +                       (urb->dev->speed == USB_SPEED_HIGH)
6078 +                           ? urb->interval
6079 +                           : (urb->interval << 3));
6080                 if (ehci->hcd.state == USB_STATE_HALT)
6081                         urb->status = -ESHUTDOWN;
6082                 qh_completions (ehci, qh, 1);
6083 diff -Nur linux-2.4.19.old/drivers/usb/hcd/ehci-q.c linux-2.4.19/drivers/usb/hcd/ehci-q.c
6084 --- linux-2.4.19.old/drivers/usb/hcd/ehci-q.c   Sat Aug  3 02:39:44 2002
6085 +++ linux-2.4.19/drivers/usb/hcd/ehci-q.c       Mon Nov 25 12:26:55 2002
6086 @@ -368,7 +368,7 @@
6087                 /* SETUP for control urb? */
6088                 if (unlikely (QTD_PID (token) == 2))
6089                         pci_unmap_single (ehci->hcd.pdev,
6090 -                               qtd->buf_dma, sizeof (devrequest),
6091 +                               qtd->buf_dma, sizeof (struct usb_ctrlrequest),
6092                                 PCI_DMA_TODEVICE);
6093         }
6094  
6095 @@ -419,7 +419,7 @@
6096                          */
6097                         if (!unmapped++ && usb_pipecontrol (urb->pipe)) {
6098                                 direction = PCI_DMA_TODEVICE;
6099 -                               size = sizeof (devrequest);
6100 +                               size = sizeof (struct usb_ctrlrequest);
6101                         } else {
6102                                 direction = usb_pipein (urb->pipe)
6103                                         ? PCI_DMA_FROMDEVICE
6104 @@ -470,13 +470,13 @@
6105                 qtd->buf_dma = pci_map_single (
6106                                         ehci->hcd.pdev,
6107                                         urb->setup_packet,
6108 -                                       sizeof (devrequest),
6109 +                                       sizeof (struct usb_ctrlrequest),
6110                                         PCI_DMA_TODEVICE);
6111                 if (unlikely (!qtd->buf_dma))
6112                         goto cleanup;
6113  
6114                 /* SETUP pid */
6115 -               qtd_fill (qtd, qtd->buf_dma, sizeof (devrequest),
6116 +               qtd_fill (qtd, qtd->buf_dma, sizeof (struct usb_ctrlrequest),
6117                         token | (2 /* "setup" */ << 8));
6118  
6119                 /* ... and always at least one more pid */
6120 @@ -681,6 +681,8 @@
6121         default:
6122  #ifdef DEBUG
6123                 BUG ();
6124 +#else
6125 +               ;
6126  #endif
6127         }
6128  
6129 @@ -817,9 +819,9 @@
6130                 } else {
6131                         // dbg_qh ("empty qh", ehci, qh);
6132  
6133 -// FIXME:  how handle usb_clear_halt() for an EP with queued URBs?
6134 -// usbcore may not let us handle that cleanly...
6135 -// likely must cancel them all first!
6136 +                       /* NOTE: we already canceled any queued URBs
6137 +                        * when the endpoint halted.
6138 +                        */
6139  
6140                         /* usb_clear_halt() means qh data toggle gets reset */
6141                         if (usb_pipebulk (urb->pipe)
6142 diff -Nur linux-2.4.19.old/drivers/usb/hcd/ehci-sched.c linux-2.4.19/drivers/usb/hcd/ehci-sched.c
6143 --- linux-2.4.19.old/drivers/usb/hcd/ehci-sched.c       Sat Aug  3 02:39:44 2002
6144 +++ linux-2.4.19/drivers/usb/hcd/ehci-sched.c   Mon Nov 25 12:26:55 2002
6145 @@ -881,7 +881,7 @@
6146         unsigned long   flags
6147  ) {
6148         struct urb                              *urb = itd->urb;
6149 -       iso_packet_descriptor_t                 *desc;
6150 +       struct iso_packet_descriptor            *desc;
6151         u32                                     t;
6152  
6153         /* update status for this uframe's transfers */
6154 @@ -919,17 +919,9 @@
6155                 return flags;
6156  
6157         /*
6158 -        * For now, always give the urb back to the driver ... expect it
6159 -        * to submit a new urb (or resubmit this), and to have another
6160 -        * already queued when un-interrupted transfers are needed.
6161 -        * No, that's not what OHCI or UHCI are now doing.
6162 -        *
6163 -        * FIXME Revisit the ISO URB model.  It's cleaner not to have all
6164 -        * the special case magic, but it'd be faster to reuse existing
6165 -        * ITD/DMA setup and schedule state.  Easy to dma_sync/complete(),
6166 -        * then either reschedule or, if unlinking, free and giveback().
6167 -        * But we can't overcommit like the full and low speed HCs do, and
6168 -        * there's no clean way to report an error when rescheduling...
6169 +        * Always give the urb back to the driver ... expect it to submit
6170 +        * a new urb (or resubmit this), and to have another already queued
6171 +        * when un-interrupted transfers are needed.
6172          *
6173          * NOTE that for now we don't accelerate ISO unlinks; they just
6174          * happen according to the current schedule.  Means a delay of
6175 @@ -964,15 +956,6 @@
6176         if (urb->iso_frame_desc [0].offset != 0)
6177                 return -EINVAL;
6178         
6179 -       /*
6180 -        * NOTE doing this for now, anticipating periodic URB models
6181 -        * get updated to be "explicit resubmit".
6182 -        */
6183 -       if (urb->next) {
6184 -               dbg ("use explicit resubmit for ISO");
6185 -               return -EINVAL;
6186 -       }
6187 -
6188         /* allocate ITDs w/o locking anything */
6189         status = itd_urb_transaction (ehci, urb, mem_flags);
6190         if (status < 0)
6191 diff -Nur linux-2.4.19.old/drivers/usb/hcd.c linux-2.4.19/drivers/usb/hcd.c
6192 --- linux-2.4.19.old/drivers/usb/hcd.c  Sat Aug  3 02:39:44 2002
6193 +++ linux-2.4.19/drivers/usb/hcd.c      Mon Nov 25 12:26:55 2002
6194 @@ -56,7 +56,8 @@
6195   * USB Host Controller Driver framework
6196   *
6197   * Plugs into usbcore (usb_bus) and lets HCDs share code, minimizing
6198 - * HCD-specific behaviors/bugs.
6199 + * HCD-specific behaviors/bugs.  Think of it as the "upper level" of
6200 + * some drivers, where the "lower level" is hardware-specific.
6201   *
6202   * This does error checks, tracks devices and urbs, and delegates to a
6203   * "hc_driver" only for code (and data) that really needs to know about
6204 @@ -78,6 +79,9 @@
6205   * Roman Weissgaerber, Rory Bolt, ...
6206   *
6207   * HISTORY:
6208 + * 2002-sept   Merge some 2.5 updates so we can share hardware level HCD
6209 + *     code between the 2.4.20+ and 2.5 trees.
6210 + * 2002-feb    merge to 2.4.19
6211   * 2001-12-12  Initial patch version for Linux 2.5.1 kernel.
6212   */
6213  
6214 @@ -316,16 +320,16 @@
6215  /* Root hub control transfers execute synchronously */
6216  static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
6217  {
6218 -       devrequest      *cmd = (devrequest *) urb->setup_packet;
6219 +       struct usb_ctrlrequest *cmd = (struct usb_ctrlrequest *) urb->setup_packet;
6220         u16             typeReq, wValue, wIndex, wLength;
6221         const u8        *bufp = 0;
6222         u8              *ubuf = urb->transfer_buffer;
6223         int             len = 0;
6224  
6225 -       typeReq  = (cmd->requesttype << 8) | cmd->request;
6226 -       wValue   = le16_to_cpu (cmd->value);
6227 -       wIndex   = le16_to_cpu (cmd->index);
6228 -       wLength  = le16_to_cpu (cmd->length);
6229 +       typeReq  = (cmd->bRequestType << 8) | cmd->bRequest;
6230 +       wValue   = le16_to_cpu (cmd->wValue);
6231 +       wIndex   = le16_to_cpu (cmd->wIndex);
6232 +       wLength  = le16_to_cpu (cmd->wLength);
6233  
6234         if (wLength > urb->transfer_buffer_length)
6235                 goto error;
6236 @@ -583,7 +587,6 @@
6237         struct hc_driver        *driver;
6238         unsigned long           resource, len;
6239         void                    *base;
6240 -       u8                      latency, limit;
6241         struct usb_bus          *bus;
6242         struct usb_hcd          *hcd;
6243         int                     retval, region;
6244 @@ -662,15 +665,6 @@
6245         hcd->pdev = dev;
6246         info ("%s @ %s, %s", hcd->description,  dev->slot_name, dev->name);
6247  
6248 -       pci_read_config_byte (dev, PCI_LATENCY_TIMER, &latency);
6249 -       if (latency) {
6250 -               pci_read_config_byte (dev, PCI_MAX_LAT, &limit);
6251 -               if (limit && limit < latency) {
6252 -                       dbg ("PCI latency reduced to max %d", limit);
6253 -                       pci_write_config_byte (dev, PCI_LATENCY_TIMER, limit);
6254 -               }
6255 -       }
6256 -
6257  #ifndef __sparc__
6258         sprintf (buf, "%d", dev->irq);
6259  #else
6260 @@ -701,7 +695,8 @@
6261                 goto clean_3;
6262         }
6263         hcd->bus = bus;
6264 -       hcd->bus_name = dev->slot_name;
6265 +       hcd->bus_name = dev->slot_name;         /* prefer bus->bus_name */
6266 +       bus->bus_name = dev->slot_name;
6267         hcd->product_desc = dev->name;
6268         bus->hcpriv = (void *) hcd;
6269  
6270 @@ -1072,6 +1067,8 @@
6271         if (urb->transfer_buffer_length < 0)
6272                 return -EINVAL;
6273  
6274 +       // FIXME set urb->transfer_dma and/or setup_dma 
6275 +
6276         if (urb->next) {
6277                 warn ("use explicit queuing not urb->next");
6278                 return -EINVAL;
6279 @@ -1463,6 +1460,8 @@
6280                 dbg ("giveback urb %p status %d len %d",
6281                         urb, urb->status, urb->actual_length);
6282  
6283 +       // FIXME unmap urb->transfer_dma and/or setup_dma 
6284 +
6285         /* pass ownership to the completion handler */
6286         urb->complete (urb);
6287  }
6288 diff -Nur linux-2.4.19.old/drivers/usb/hcd.h linux-2.4.19/drivers/usb/hcd.h
6289 --- linux-2.4.19.old/drivers/usb/hcd.h  Sat Aug  3 02:39:44 2002
6290 +++ linux-2.4.19/drivers/usb/hcd.h      Mon Nov 25 12:26:55 2002
6291 @@ -153,6 +153,7 @@
6292  
6293  #ifdef CONFIG_PCI
6294  
6295 +struct pci_device_id;
6296  extern int usb_hcd_pci_probe (struct pci_dev *dev,
6297                                 const struct pci_device_id *id);
6298  extern void usb_hcd_pci_remove (struct pci_dev *dev);
6299 @@ -206,6 +207,54 @@
6300  
6301  /*-------------------------------------------------------------------------*/
6302  
6303 +/*
6304 + * Generic bandwidth allocation constants/support
6305 + */
6306 +#define FRAME_TIME_USECS       1000L
6307 +#define BitTime(bytecount)  (7 * 8 * bytecount / 6)  /* with integer truncation */
6308 +               /* Trying not to use worst-case bit-stuffing
6309 +                   of (7/6 * 8 * bytecount) = 9.33 * bytecount */
6310 +               /* bytecount = data payload byte count */
6311 +
6312 +#define NS_TO_US(ns)   ((ns + 500L) / 1000L)
6313 +                       /* convert & round nanoseconds to microseconds */
6314 +
6315 +extern void usb_claim_bandwidth (struct usb_device *dev, struct urb *urb,
6316 +               int bustime, int isoc);
6317 +extern void usb_release_bandwidth (struct usb_device *dev, struct urb *urb,
6318 +               int isoc);
6319 +
6320 +/*
6321 + * Full/low speed bandwidth allocation constants/support.
6322 + */
6323 +#define BW_HOST_DELAY  1000L           /* nanoseconds */
6324 +#define BW_HUB_LS_SETUP        333L            /* nanoseconds */
6325 +                        /* 4 full-speed bit times (est.) */
6326 +
6327 +#define FRAME_TIME_BITS         12000L         /* frame = 1 millisecond */
6328 +#define FRAME_TIME_MAX_BITS_ALLOC      (90L * FRAME_TIME_BITS / 100L)
6329 +#define FRAME_TIME_MAX_USECS_ALLOC     (90L * FRAME_TIME_USECS / 100L)
6330 +
6331 +extern int usb_check_bandwidth (struct usb_device *dev, struct urb *urb);
6332 +
6333 +/*
6334 + * Ceiling microseconds (typical) for that many bytes at high speed
6335 + * ISO is a bit less, no ACK ... from USB 2.0 spec, 5.11.3 (and needed
6336 + * to preallocate bandwidth)
6337 + */
6338 +#define USB2_HOST_DELAY        5       /* nsec, guess */
6339 +#define HS_USECS(bytes) NS_TO_US ( ((55 * 8 * 2083)/1000) \
6340 +       + ((2083UL * (3167 + BitTime (bytes)))/1000) \
6341 +       + USB2_HOST_DELAY)
6342 +#define HS_USECS_ISO(bytes) NS_TO_US ( ((long)(38 * 8 * 2.083)) \
6343 +       + ((2083UL * (3167 + BitTime (bytes)))/1000) \
6344 +       + USB2_HOST_DELAY)
6345 +
6346 +extern long usb_calc_bus_time (int speed, int is_input,
6347 +                       int isoc, int bytecount);
6348 +
6349 +/*-------------------------------------------------------------------------*/
6350 +
6351  /* hub.h ... DeviceRemovable in 2.4.2-ac11, gone in 2.4.10 */
6352  // bleech -- resurfaced in 2.4.11 or 2.4.12
6353  #define bitmap         DeviceRemovable
6354 @@ -217,3 +266,20 @@
6355  
6356  #define        RUN_CONTEXT (in_irq () ? "in_irq" \
6357                 : (in_interrupt () ? "in_interrupt" : "can sleep"))
6358 +
6359 +/* 2.5 changes ... */
6360 +
6361 +#ifndef container_of
6362 +#define        container_of    list_entry
6363 +#endif
6364 +
6365 +#define usb_get_urb(x) (x)
6366 +#define usb_put_urb(x)
6367 +
6368 +static inline struct usb_bus *hcd_to_bus (struct usb_hcd *hcd)
6369 +       { return hcd->bus; }
6370 +
6371 +static inline void
6372 +usb_hub_tt_clear_buffer (struct usb_device *dev, int pipe)
6373 +       { }
6374 +
6375 diff -Nur linux-2.4.19.old/drivers/usb/hid-core.c linux-2.4.19/drivers/usb/hid-core.c
6376 --- linux-2.4.19.old/drivers/usb/hid-core.c     Sat Aug  3 02:39:44 2002
6377 +++ linux-2.4.19/drivers/usb/hid-core.c Mon Nov 25 12:26:55 2002
6378 @@ -988,7 +988,7 @@
6379  
6380  static int hid_submit_out(struct hid_device *hid)
6381  {
6382 -       hid->urbout.transfer_buffer_length = le16_to_cpup(&hid->out[hid->outtail].dr.length);
6383 +       hid->urbout.transfer_buffer_length = le16_to_cpup(&hid->out[hid->outtail].dr.wLength);
6384         hid->urbout.transfer_buffer = hid->out[hid->outtail].buffer;
6385         hid->urbout.setup_packet = (void *) &(hid->out[hid->outtail].dr);
6386         hid->urbout.dev = hid->dev;
6387 @@ -1018,8 +1018,8 @@
6388  {
6389         hid_output_report(report, hid->out[hid->outhead].buffer);
6390  
6391 -       hid->out[hid->outhead].dr.value = cpu_to_le16(0x200 | report->id);
6392 -       hid->out[hid->outhead].dr.length = cpu_to_le16((report->size + 7) >> 3);
6393 +       hid->out[hid->outhead].dr.wValue = cpu_to_le16(0x200 | report->id);
6394 +       hid->out[hid->outhead].dr.wLength = cpu_to_le16((report->size + 7) >> 3);
6395  
6396         hid->outhead = (hid->outhead + 1) & (HID_CONTROL_FIFO_SIZE - 1);
6397  
6398 @@ -1065,8 +1065,8 @@
6399                         list = report_enum->report_list.next;
6400                         while (list != &report_enum->report_list) {
6401                                 report = (struct hid_report *) list;
6402 -                               usb_set_idle(hid->dev, hid->ifnum, 0, report->id);
6403                                 hid_read_report(hid, report);
6404 +                               usb_set_idle(hid->dev, hid->ifnum, 0, report->id);
6405                                 list = list->next;
6406                         }
6407                 }
6408 @@ -1204,9 +1204,9 @@
6409         hid->ifnum = interface->bInterfaceNumber;
6410  
6411         for (n = 0; n < HID_CONTROL_FIFO_SIZE; n++) {
6412 -               hid->out[n].dr.requesttype = USB_TYPE_CLASS | USB_RECIP_INTERFACE;
6413 -               hid->out[n].dr.request = USB_REQ_SET_REPORT;
6414 -               hid->out[n].dr.index = cpu_to_le16(hid->ifnum);
6415 +               hid->out[n].dr.bRequestType = USB_TYPE_CLASS | USB_RECIP_INTERFACE;
6416 +               hid->out[n].dr.bRequest = USB_REQ_SET_REPORT;
6417 +               hid->out[n].dr.wIndex = cpu_to_le16(hid->ifnum);
6418         }
6419  
6420         hid->name[0] = 0;
6421 diff -Nur linux-2.4.19.old/drivers/usb/hid.h linux-2.4.19/drivers/usb/hid.h
6422 --- linux-2.4.19.old/drivers/usb/hid.h  Sat Aug  3 02:39:44 2002
6423 +++ linux-2.4.19/drivers/usb/hid.h      Mon Nov 25 12:26:55 2002
6424 @@ -287,7 +287,7 @@
6425  #define HID_CONTROL_FIFO_SIZE  8
6426  
6427  struct hid_control_fifo {
6428 -       devrequest dr;
6429 +       struct usb_ctrlrequest dr;
6430         char buffer[HID_BUFFER_SIZE];
6431  };
6432  
6433 diff -Nur linux-2.4.19.old/drivers/usb/hpusbscsi.c linux-2.4.19/drivers/usb/hpusbscsi.c
6434 --- linux-2.4.19.old/drivers/usb/hpusbscsi.c    Sat Aug  3 02:39:44 2002
6435 +++ linux-2.4.19/drivers/usb/hpusbscsi.c        Mon Nov 25 12:26:55 2002
6436 @@ -1,3 +1,51 @@
6437 +/*
6438 + * hpusbscsi
6439 + * (C) Copyright 2001 Oliver Neukum 
6440 + * Sponsored by the Linux Usb Project
6441 + * Large parts based on or taken from code by John Fremlin and Matt Dharm
6442 + * 
6443 + * This driver is known to work with the following scanners (VID, PID)
6444 + *    (0x03f0, 0x0701)  HP 53xx 
6445 + *    (0x03f0, 0x0801)  HP 7400 
6446 + *    (0x0638, 0x026a)  Minolta Scan Dual II
6447 + *    (0x0686, 0x4004)  Minolta Elite II
6448 + * To load with full debugging load with "insmod hpusbscsi debug=2"
6449 + * 
6450 + * This program is free software; you can redistribute it and/or modify it
6451 + * under the terms of the GNU General Public License as published by the
6452 + * Free Software Foundation; either version 2 of the License, or (at your
6453 + * option) any later version.
6454 + *
6455 + * This program is distributed in the hope that it will be useful, but
6456 + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
6457 + * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
6458 + * for more details.
6459 + *
6460 + * You should have received a copy of the GNU General Public License
6461 + * along with this program; if not, write to the Free Software Foundation,
6462 + * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
6463 + *
6464 + * Contributors:
6465 + *   Oliver Neukum
6466 + *   John Fremlin
6467 + *   Matt Dharm
6468 + *   .
6469 + *   .
6470 + *   Timothy Jedlicka <bonzo@lucent.com>
6471 + *
6472 + * History
6473 + *
6474 + * 22-Apr-2002
6475 + *
6476 + * - Added Elite II scanner - bonzo
6477 + * - Cleaned up the debug statements and made them optional at load time - bonzo
6478 + *
6479 + * 20020618
6480 + *
6481 + * - Confirm to stupid 2.4 rules on io_request_lock
6482 + *
6483 + */
6484 +
6485  #include <linux/module.h>
6486  #include <linux/kernel.h>
6487  #include <linux/sched.h>
6488 @@ -16,12 +64,28 @@
6489  
6490  #include "hpusbscsi.h"
6491  
6492 -#define DEBUG(x...) \
6493 -       printk( KERN_DEBUG x )
6494 -
6495  static char *states[]={"FREE", "BEGINNING", "WORKING", "ERROR", "WAIT", "PREMATURE"};
6496  
6497 -#define TRACE_STATE printk(KERN_DEBUG"hpusbscsi->state = %s at line %d\n", states[hpusbscsi->state], __LINE__)
6498 +/* DEBUG related parts */
6499 +#define HPUSBSCSI_DEBUG
6500 +
6501 +#ifdef HPUSBSCSI_DEBUG
6502 +#  define PDEBUG(level, fmt, args...) \
6503 +          if (debug >= (level)) info("[" __PRETTY_FUNCTION__ ":%d] " fmt, __LINE__ , \
6504 +                 ## args)
6505 +#else
6506 +#  define PDEBUG(level, fmt, args...) do {} while(0)
6507 +#endif
6508 +
6509 +
6510 +/* 0=no debug messages
6511 + * 1=everything but trace states
6512 + * 2=trace states
6513 + */
6514 +static int debug; /* = 0 */
6515 +
6516 +MODULE_PARM(debug, "i");
6517 +MODULE_PARM_DESC(debug, "Debug level: 0=none, 1=no trace states, 2=trace states");
6518  
6519  /* global variables */
6520  
6521 @@ -54,7 +118,7 @@
6522                                               GFP_KERNEL);
6523         if (new == NULL)
6524                 return NULL;
6525 -       DEBUG ("Allocated memory\n");
6526 +       PDEBUG (1, "Allocated memory");
6527         memset (new, 0, sizeof (struct hpusbscsi));
6528         spin_lock_init (&new->dataurb.lock);
6529         spin_lock_init (&new->controlurb.lock);
6530 @@ -136,14 +200,26 @@
6531  static void
6532  hpusbscsi_usb_disconnect (struct usb_device *dev, void *ptr)
6533  {
6534 -                 usb_unlink_urb(&(((struct hpusbscsi *) ptr)->controlurb));
6535 -       ((struct hpusbscsi *) ptr)->dev = NULL;
6536 +       struct hpusbscsi *hp = (struct hpusbscsi *)ptr;
6537 +
6538 +       usb_unlink_urb(&hp->controlurb);
6539 +       usb_unlink_urb(&hp->dataurb);
6540 +
6541 +       spin_lock_irq(&io_request_lock);
6542 +       hp->dev = NULL;
6543 +       spin_unlock_irq(&io_request_lock);
6544  }
6545  
6546  static struct usb_device_id hpusbscsi_usb_ids[] = {
6547         {USB_DEVICE (0x03f0, 0x0701)},  /* HP 53xx */
6548         {USB_DEVICE (0x03f0, 0x0801)},  /* HP 7400 */
6549 +       {USB_DEVICE (0x0638, 0x0268)},  /*iVina 1200U */
6550         {USB_DEVICE (0x0638, 0x026a)},  /*Scan Dual II */
6551 +       {USB_DEVICE (0x0638, 0x0A13)},  /*Avision AV600U */
6552 +       {USB_DEVICE (0x0638, 0x0A16)},  /*Avision DS610CU Scancopier */
6553 +       {USB_DEVICE (0x0638, 0x0A18)},  /*Avision AV600U Plus */
6554 +       {USB_DEVICE (0x0638, 0x0A23)},  /*Avision AV220 */
6555 +       {USB_DEVICE (0x0638, 0x0A24)},  /*Avision AV210 */
6556         {USB_DEVICE (0x0686, 0x4004)},  /*Minolta Elite II */
6557         {}                      /* Terminating entry */
6558  };
6559 @@ -167,7 +243,8 @@
6560         int result;
6561  
6562         INIT_LIST_HEAD (&hpusbscsi_devices);
6563 -
6564 +       PDEBUG(0, "driver loaded, DebugLvel=%d", debug);
6565
6566         if ((result = usb_register (&hpusbscsi_usb_driver)) < 0) {
6567                 printk (KERN_ERR "hpusbscsi: driver registration failed\n");
6568                 return -1;
6569 @@ -210,6 +287,7 @@
6570         /* What a hideous hack! */
6571  
6572         char local_name[48];
6573 +       spin_unlock_irq(&io_request_lock);
6574  
6575  
6576         /* set up the name of our subdirectory under /proc/scsi/ */
6577 @@ -218,6 +296,7 @@
6578         /* FIXME: where is this freed ? */
6579  
6580         if (!sht->proc_name) {
6581 +               spin_lock_irq(&io_request_lock);
6582                 return 0;
6583         }
6584  
6585 @@ -238,6 +317,7 @@
6586  
6587         if ( 0  >  usb_submit_urb(&desc->controlurb)) {
6588                 kfree(sht->proc_name);
6589 +               spin_lock_irq(&io_request_lock);
6590                 return 0;
6591         }
6592  
6593 @@ -246,10 +326,11 @@
6594         if (desc->host == NULL) {
6595                 kfree (sht->proc_name);
6596                 usb_unlink_urb(&desc->controlurb);
6597 +               spin_lock_irq(&io_request_lock);
6598                 return 0;
6599         }
6600         desc->host->hostdata[0] = (unsigned long) desc;
6601 -
6602 +       spin_lock_irq(&io_request_lock);
6603  
6604         return 1;
6605  }
6606 @@ -260,15 +341,13 @@
6607         usb_urb_callback usb_callback;
6608         int res;
6609  
6610 -       hpusbscsi->use_count++;
6611 +       spin_unlock_irq(&io_request_lock);
6612  
6613         /* we don't answer for anything but our single device on any faked host controller */
6614         if ( srb->device->lun || srb->device->id || srb->device->channel ) {
6615 -               if (callback) {
6616 -                       srb->result = DID_BAD_TARGET;
6617 -                       callback(srb);
6618 -               }
6619 -                       goto out;
6620 +               srb->result = DID_BAD_TARGET;
6621 +               callback(srb);
6622 +               goto out;
6623         }
6624  
6625         /* Now we need to decide which callback to give to the urb we send the command with */
6626 @@ -297,7 +376,7 @@
6627         }
6628  
6629  
6630 -       TRACE_STATE;
6631 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
6632         if (hpusbscsi->state != HP_STATE_FREE) {
6633                 printk(KERN_CRIT"hpusbscsi - Ouch: queueing violation!\n");
6634                 return 1; /* This must not happen */
6635 @@ -307,7 +386,7 @@
6636          memset(srb->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
6637  
6638         hpusbscsi->state = HP_STATE_BEGINNING;
6639 -       TRACE_STATE;
6640 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
6641  
6642         /* We prepare the urb for writing out the scsi command */
6643         FILL_BULK_URB(
6644 @@ -321,19 +400,24 @@
6645         );
6646         hpusbscsi->scallback = callback;
6647         hpusbscsi->srb = srb;
6648 +       
6649 +       if (hpusbscsi->dev == NULL) {
6650 +               srb->result = DID_ERROR;
6651 +               callback(srb);
6652 +               goto out;
6653 +       }
6654  
6655         res = usb_submit_urb(&hpusbscsi->dataurb);
6656         if (res) {
6657                 hpusbscsi->state = HP_STATE_FREE;
6658 -               TRACE_STATE;
6659 -               if (callback) {
6660 -                       srb->result = DID_ERROR;
6661 -                       callback(srb);
6662 -               }
6663 +               PDEBUG(2, "state= %s", states[hpusbscsi->state]);
6664 +               srb->result = DID_ERROR;
6665 +               callback(srb);
6666 +
6667         }
6668  
6669  out:
6670 -       hpusbscsi->use_count--;
6671 +       spin_lock_irq(&io_request_lock);
6672         return 0;
6673  }
6674  
6675 @@ -341,9 +425,9 @@
6676  {
6677         struct hpusbscsi* hpusbscsi = (struct hpusbscsi*)(srb->host->hostdata[0]);
6678  
6679 -       printk(KERN_DEBUG"SCSI reset requested.\n");
6680 +       PDEBUG(1, "SCSI reset requested");
6681         //usb_reset_device(hpusbscsi->dev);
6682 -       //printk(KERN_DEBUG"SCSI reset completed.\n");
6683 +       //PDEBUG(1, "SCSI reset completed");
6684         hpusbscsi->state = HP_STATE_FREE;
6685  
6686         return 0;
6687 @@ -352,11 +436,14 @@
6688  static int hpusbscsi_scsi_abort (Scsi_Cmnd *srb)
6689  {
6690         struct hpusbscsi* hpusbscsi = (struct hpusbscsi*)(srb->host->hostdata[0]);
6691 -       printk(KERN_DEBUG"Request is canceled.\n");
6692 +       PDEBUG(1, "Request is canceled");
6693  
6694 +       spin_unlock_irq(&io_request_lock);
6695         usb_unlink_urb(&hpusbscsi->dataurb);
6696         hpusbscsi->state = HP_STATE_FREE;
6697  
6698 +       spin_lock_irq(&io_request_lock);
6699 +
6700         return SCSI_ABORT_PENDING;
6701  }
6702  
6703 @@ -376,7 +463,7 @@
6704         struct hpusbscsi * hpusbscsi = (struct hpusbscsi *)u->context;
6705         u8 scsi_state;
6706  
6707 -DEBUG("Getting status byte %d \n",hpusbscsi->scsi_state_byte);
6708 +       PDEBUG(1, "Getting status byte %d",hpusbscsi->scsi_state_byte);
6709         if(u->status < 0) {
6710                  if (hpusbscsi->state != HP_STATE_FREE)
6711                          handle_usb_error(hpusbscsi);
6712 @@ -402,24 +489,24 @@
6713                 /* we do a callback to the scsi layer if and only if all data has been transfered */
6714                 hpusbscsi->scallback(hpusbscsi->srb);
6715  
6716 -       TRACE_STATE;
6717 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
6718         switch (hpusbscsi->state) {
6719         case HP_STATE_WAIT:
6720                 hpusbscsi->state = HP_STATE_FREE;
6721 -       TRACE_STATE;
6722 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
6723                 break;
6724         case HP_STATE_WORKING:
6725         case HP_STATE_BEGINNING:
6726                 hpusbscsi->state = HP_STATE_PREMATURE;
6727 -       TRACE_STATE;
6728 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
6729                 break;
6730         case HP_STATE_ERROR:
6731                 break;
6732         default:
6733                 printk(KERN_ERR"hpusbscsi: Unexpected status report.\n");
6734 -       TRACE_STATE;
6735 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
6736                 hpusbscsi->state = HP_STATE_FREE;
6737 -       TRACE_STATE;
6738 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
6739                 break;
6740         }
6741  }
6742 @@ -431,15 +518,15 @@
6743                 handle_usb_error(hpusbscsi);
6744                 return;
6745          }
6746 -       TRACE_STATE;
6747 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
6748         if (hpusbscsi->state != HP_STATE_PREMATURE) {
6749 -               TRACE_STATE;
6750 +               PDEBUG(2, "state= %s", states[hpusbscsi->state]);
6751                 hpusbscsi->state = HP_STATE_WAIT;
6752         } else {
6753                 if (hpusbscsi->scallback != NULL)
6754                         hpusbscsi->scallback(hpusbscsi->srb);
6755                 hpusbscsi->state = HP_STATE_FREE;
6756 -       TRACE_STATE;
6757 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
6758         }
6759  }
6760  
6761 @@ -450,7 +537,7 @@
6762          usb_urb_callback callback;
6763          int res;
6764  
6765 -        DEBUG("Going through scatter/gather\n");
6766 +        PDEBUG(1, "Going through scatter/gather"); // bonzo - this gets hit a lot - maybe make it a 2
6767          if (u->status < 0) {
6768                  handle_usb_error(hpusbscsi);
6769                  return;
6770 @@ -461,10 +548,10 @@
6771          else
6772                  callback = simple_done;
6773  
6774 -       TRACE_STATE;
6775 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
6776          if (hpusbscsi->state != HP_STATE_PREMATURE)
6777                 hpusbscsi->state = HP_STATE_WORKING;
6778 -       TRACE_STATE;
6779 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
6780  
6781          FILL_BULK_URB(
6782                  u,
6783 @@ -479,7 +566,7 @@
6784          res = usb_submit_urb(u);
6785          if (res)
6786                 handle_usb_error(hpusbscsi);
6787 -       TRACE_STATE;
6788 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
6789  }
6790  
6791  static void simple_done (struct urb *u)
6792 @@ -490,8 +577,8 @@
6793                  handle_usb_error(hpusbscsi);
6794                  return;
6795          }
6796 -        DEBUG("Data transfer done\n");
6797 -       TRACE_STATE;
6798 +       PDEBUG(1, "Data transfer done");
6799 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
6800         if (hpusbscsi->state != HP_STATE_PREMATURE) {
6801                 if (u->status < 0) {
6802                         handle_usb_error(hpusbscsi);
6803 @@ -501,7 +588,7 @@
6804                         } else {
6805                                 issue_request_sense(hpusbscsi);
6806                         }
6807 -               TRACE_STATE;
6808 +               PDEBUG(2, "state= %s", states[hpusbscsi->state]);
6809                 }
6810         } else {
6811                 if (hpusbscsi->scallback != NULL)
6812 @@ -535,10 +622,10 @@
6813                  handle_usb_error(hpusbscsi);
6814                 return;
6815          }
6816 -       TRACE_STATE;
6817 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
6818         if (hpusbscsi->state != HP_STATE_PREMATURE) {
6819                 hpusbscsi->state = HP_STATE_WORKING;
6820 -       TRACE_STATE;
6821 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
6822         }
6823  }
6824  
6825 diff -Nur linux-2.4.19.old/drivers/usb/hub.c linux-2.4.19/drivers/usb/hub.c
6826 --- linux-2.4.19.old/drivers/usb/hub.c  Sat Aug  3 02:39:44 2002
6827 +++ linux-2.4.19/drivers/usb/hub.c      Mon Nov 25 12:26:55 2002
6828 @@ -155,7 +155,7 @@
6829  static int usb_hub_configure(struct usb_hub *hub, struct usb_endpoint_descriptor *endpoint)
6830  {
6831         struct usb_device *dev = hub->dev;
6832 -       struct usb_hub_status hubstatus;
6833 +       struct usb_hub_status *hubstatus;
6834         char portstr[USB_MAXCHILDREN + 1];
6835         unsigned int pipe;
6836         int i, maxp, ret;
6837 @@ -258,20 +258,29 @@
6838  
6839         dbg("port removable status: %s", portstr);
6840  
6841 -       ret = usb_get_hub_status(dev, &hubstatus);
6842 +       hubstatus = kmalloc(sizeof *hubstatus, GFP_KERNEL);
6843 +       if (!hubstatus) {
6844 +               err("Unable to allocate hubstatus");
6845 +               kfree(hub->descriptor);
6846 +               return -1;
6847 +       }
6848 +       ret = usb_get_hub_status(dev, hubstatus);
6849         if (ret < 0) {
6850                 err("Unable to get hub status (err = %d)", ret);
6851 +               kfree(hubstatus);
6852                 kfree(hub->descriptor);
6853                 return -1;
6854         }
6855  
6856 -       le16_to_cpus(&hubstatus.wHubStatus);
6857 +       le16_to_cpus(&hubstatus->wHubStatus);
6858  
6859         dbg("local power source is %s",
6860 -               (hubstatus.wHubStatus & HUB_STATUS_LOCAL_POWER) ? "lost (inactive)" : "good");
6861 +               (hubstatus->wHubStatus & HUB_STATUS_LOCAL_POWER) ? "lost (inactive)" : "good");
6862  
6863         dbg("%sover-current condition exists",
6864 -               (hubstatus.wHubStatus & HUB_STATUS_OVERCURRENT) ? "" : "no ");
6865 +               (hubstatus->wHubStatus & HUB_STATUS_OVERCURRENT) ? "" : "no ");
6866 +
6867 +       kfree(hubstatus);
6868  
6869         /* Start the interrupt endpoint */
6870         pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
6871 @@ -287,8 +296,11 @@
6872                 return -1;
6873         }
6874  
6875 -       FILL_INT_URB(hub->urb, dev, pipe, hub->buffer, maxp, hub_irq,
6876 -               hub, endpoint->bInterval);
6877 +       FILL_INT_URB(hub->urb, dev, pipe, hub->buffer, maxp, hub_irq, hub,
6878 +               /* NOTE:  in 2.5 fill_int_urb() converts the encoding */
6879 +               (dev->speed == USB_SPEED_HIGH)
6880 +                       ? 1 << (endpoint->bInterval - 1)
6881 +                       : endpoint->bInterval);
6882         ret = usb_submit_urb(hub->urb);
6883         if (ret) {
6884                 err("usb_submit_urb failed (%d)", ret);
6885 @@ -666,7 +678,6 @@
6886         struct usb_device *dev;
6887         unsigned int delay = HUB_SHORT_RESET_TIME;
6888         int i;
6889 -       char *portstr, *tempstr;
6890  
6891         dbg("port %d, portstatus %x, change %x, %s",
6892                 port + 1, portstatus, portchange, portspeed (portstatus));
6893 @@ -694,11 +705,9 @@
6894  
6895         down(&usb_address0_sem);
6896  
6897 -       tempstr = kmalloc(1024, GFP_KERNEL);
6898 -       portstr = kmalloc(1024, GFP_KERNEL);
6899 -
6900         for (i = 0; i < HUB_PROBE_TRIES; i++) {
6901 -               struct usb_device *pdev, *cdev;
6902 +               struct usb_device *pdev;
6903 +               int len;
6904  
6905                 /* Allocate a new device struct */
6906                 dev = usb_alloc_dev(hub, hub->bus);
6907 @@ -728,32 +737,28 @@
6908                         dev->ttport = port + 1;
6909                 }
6910  
6911 -               /* Create a readable topology string */
6912 -               cdev = dev;
6913 +               /* Save readable and stable topology id, distinguishing
6914 +                * devices by location for diagnostics, tools, etc.  The
6915 +                * string is a path along hub ports, from the root.  Each
6916 +                * device's id will be stable until USB is re-cabled, and
6917 +                * hubs are often labeled with these port numbers.
6918 +                *
6919 +                * Initial size: ".NN" times five hubs + NUL = 16 bytes max
6920 +                * (quite rare, since most hubs have 4-6 ports).
6921 +                */
6922                 pdev = dev->parent;
6923 -               if (portstr && tempstr) {
6924 -                       portstr[0] = 0;
6925 -                       while (pdev) {
6926 -                               int port;
6927 -
6928 -                               for (port = 0; port < pdev->maxchild; port++)
6929 -                                       if (pdev->children[port] == cdev)
6930 -                                               break;
6931 -
6932 -                               strcpy(tempstr, portstr);
6933 -                               if (!strlen(tempstr))
6934 -                                       sprintf(portstr, "%d", port + 1);
6935 -                               else
6936 -                                       sprintf(portstr, "%d/%s", port + 1, tempstr);
6937 -
6938 -                               cdev = pdev;
6939 -                               pdev = pdev->parent;
6940 -                       }
6941 -                       info("USB new device connect on bus%d/%s, assigned device number %d",
6942 -                               dev->bus->busnum, portstr, dev->devnum);
6943 -               } else
6944 -                       info("USB new device connect on bus%d, assigned device number %d",
6945 -                               dev->bus->busnum, dev->devnum);
6946 +               if (pdev->devpath [0] != '0')   /* parent not root? */
6947 +                       len = snprintf (dev->devpath, sizeof dev->devpath,
6948 +                               "%s.%d", pdev->devpath, port + 1);
6949 +               /* root == "0", root port 2 == "2", port 3 that hub "2.3" */
6950 +               else
6951 +                       len = snprintf (dev->devpath, sizeof dev->devpath,
6952 +                               "%d", port + 1);
6953 +               if (len == sizeof dev->devpath)
6954 +                       warn ("devpath size! usb/%03d/%03d path %s",
6955 +                               dev->bus->busnum, dev->devnum, dev->devpath);
6956 +               info("new USB device %s-%s, assigned address %d",
6957 +                       dev->bus->bus_name, dev->devpath, dev->devnum);
6958  
6959                 /* Run it through the hoops (find a driver, etc) */
6960                 if (!usb_new_device(dev))
6961 @@ -770,10 +775,6 @@
6962         usb_hub_port_disable(hub, port);
6963  done:
6964         up(&usb_address0_sem);
6965 -       if (portstr)
6966 -               kfree(portstr);
6967 -       if (tempstr)
6968 -               kfree(tempstr);
6969  }
6970  
6971  static void usb_hub_events(void)
6972 @@ -782,7 +783,7 @@
6973         struct list_head *tmp;
6974         struct usb_device *dev;
6975         struct usb_hub *hub;
6976 -       struct usb_hub_status hubsts;
6977 +       struct usb_hub_status *hubsts;
6978         u16 hubstatus;
6979         u16 hubchange;
6980         u16 portstatus;
6981 @@ -872,21 +873,27 @@
6982                 } /* end for i */
6983  
6984                 /* deal with hub status changes */
6985 -               if (usb_get_hub_status(dev, &hubsts) < 0)
6986 -                       err("get_hub_status failed");
6987 -               else {
6988 -                       hubstatus = le16_to_cpup(&hubsts.wHubStatus);
6989 -                       hubchange = le16_to_cpup(&hubsts.wHubChange);
6990 -                       if (hubchange & HUB_CHANGE_LOCAL_POWER) {
6991 -                               dbg("hub power change");
6992 -                               usb_clear_hub_feature(dev, C_HUB_LOCAL_POWER);
6993 -                       }
6994 -                       if (hubchange & HUB_CHANGE_OVERCURRENT) {
6995 -                               dbg("hub overcurrent change");
6996 -                               wait_ms(500);   /* Cool down */
6997 -                               usb_clear_hub_feature(dev, C_HUB_OVER_CURRENT);
6998 -                               usb_hub_power_on(hub);
6999 +               hubsts = kmalloc(sizeof *hubsts, GFP_KERNEL);
7000 +               if (!hubsts) {
7001 +                       err("couldn't allocate hubsts");
7002 +               } else {
7003 +                       if (usb_get_hub_status(dev, hubsts) < 0)
7004 +                               err("get_hub_status failed");
7005 +                       else {
7006 +                               hubstatus = le16_to_cpup(&hubsts->wHubStatus);
7007 +                               hubchange = le16_to_cpup(&hubsts->wHubChange);
7008 +                               if (hubchange & HUB_CHANGE_LOCAL_POWER) {
7009 +                                       dbg("hub power change");
7010 +                                       usb_clear_hub_feature(dev, C_HUB_LOCAL_POWER);
7011 +                               }
7012 +                               if (hubchange & HUB_CHANGE_OVERCURRENT) {
7013 +                                       dbg("hub overcurrent change");
7014 +                                       wait_ms(500);   /* Cool down */
7015 +                                       usb_clear_hub_feature(dev, C_HUB_OVER_CURRENT);
7016 +                                       usb_hub_power_on(hub);
7017 +                               }
7018                         }
7019 +                       kfree(hubsts);
7020                 }
7021                 up(&hub->khubd_sem);
7022          } /* end while (1) */
7023 @@ -995,7 +1002,7 @@
7024  int usb_reset_device(struct usb_device *dev)
7025  {
7026         struct usb_device *parent = dev->parent;
7027 -       struct usb_device_descriptor descriptor;
7028 +       struct usb_device_descriptor *descriptor;
7029         int i, ret, port = -1;
7030  
7031         if (!parent) {
7032 @@ -1044,17 +1051,22 @@
7033          * If nothing changed, we reprogram the configuration and then
7034          * the alternate settings.
7035          */
7036 -       ret = usb_get_descriptor(dev, USB_DT_DEVICE, 0, &descriptor,
7037 -                       sizeof(descriptor));
7038 +       descriptor = kmalloc(sizeof *descriptor, GFP_NOIO);
7039 +       if (!descriptor) {
7040 +               return -ENOMEM;
7041 +       }
7042 +       ret = usb_get_descriptor(dev, USB_DT_DEVICE, 0, descriptor,
7043 +                       sizeof(*descriptor));
7044         if (ret < 0)
7045                 return ret;
7046  
7047 -       le16_to_cpus(&descriptor.bcdUSB);
7048 -       le16_to_cpus(&descriptor.idVendor);
7049 -       le16_to_cpus(&descriptor.idProduct);
7050 -       le16_to_cpus(&descriptor.bcdDevice);
7051 +       le16_to_cpus(&descriptor->bcdUSB);
7052 +       le16_to_cpus(&descriptor->idVendor);
7053 +       le16_to_cpus(&descriptor->idProduct);
7054 +       le16_to_cpus(&descriptor->bcdDevice);
7055  
7056 -       if (memcmp(&dev->descriptor, &descriptor, sizeof(descriptor))) {
7057 +       if (memcmp(&dev->descriptor, descriptor, sizeof(*descriptor))) {
7058 +               kfree(descriptor);
7059                 usb_destroy_configuration(dev);
7060  
7061                 ret = usb_get_device_descriptor(dev);
7062 @@ -1084,6 +1096,8 @@
7063                 return 1;
7064         }
7065  
7066 +       kfree(descriptor);
7067 +
7068         ret = usb_set_configuration(dev, dev->actconfig->bConfigurationValue);
7069         if (ret < 0) {
7070                 err("failed to set active configuration (error=%d)", ret);
7071 diff -Nur linux-2.4.19.old/drivers/usb/inode.c linux-2.4.19/drivers/usb/inode.c
7072 --- linux-2.4.19.old/drivers/usb/inode.c        Sat Aug  3 02:39:45 2002
7073 +++ linux-2.4.19/drivers/usb/inode.c    Mon Nov 25 12:26:55 2002
7074 @@ -628,6 +628,7 @@
7075          s->s_root = d_alloc_root(root_inode);
7076          if (!s->s_root)
7077                  goto out_no_root;
7078 +       lock_kernel();
7079         list_add_tail(&s->u.usbdevfs_sb.slist, &superlist);
7080         for (i = 0; i < NRSPECIAL; i++) {
7081                 if (!(inode = iget(s, IROOT+1+i)))
7082 @@ -646,6 +647,7 @@
7083                 recurse_new_dev_inode(bus->root_hub, s);
7084         }
7085         up (&usb_bus_list_lock);
7086 +       unlock_kernel();
7087          return s;
7088  
7089   out_no_root:
7090 diff -Nur linux-2.4.19.old/drivers/usb/kaweth.c linux-2.4.19/drivers/usb/kaweth.c
7091 --- linux-2.4.19.old/drivers/usb/kaweth.c       Sat Aug  3 02:39:45 2002
7092 +++ linux-2.4.19/drivers/usb/kaweth.c   Mon Nov 25 12:26:55 2002
7093 @@ -5,17 +5,18 @@
7094   *     (c) 2000 Interlan Communications
7095   *     (c) 2000 Stephane Alnet
7096   *     (C) 2001 Brad Hards
7097 + *     (C) 2002 Oliver Neukum
7098   *
7099   *     Original author: The Zapman <zapman@interlan.net>
7100 - *     Inspired by, and much credit goes to Michael Rothwell 
7101 + *     Inspired by, and much credit goes to Michael Rothwell
7102   *     <rothwell@interlan.net> for the test equipment, help, and patience
7103   *     Based off of (and with thanks to) Petko Manolov's pegaus.c driver.
7104 - *     Also many thanks to Joel Silverman and Ed Surprenant at Kawasaki 
7105 + *     Also many thanks to Joel Silverman and Ed Surprenant at Kawasaki
7106   *     for providing the firmware and driver resources.
7107   *
7108   *     This program is free software; you can redistribute it and/or
7109   *     modify it under the terms of the GNU General Public License as
7110 - *     published by the Free Software Foundation; either version 2, or 
7111 + *     published by the Free Software Foundation; either version 2, or
7112   *     (at your option) any later version.
7113   *
7114   *     This program is distributed in the hope that it will be useful,
7115 @@ -25,7 +26,7 @@
7116   *
7117   *     You should have received a copy of the GNU General Public License
7118   *     along with this program; if not, write to the Free Software Foundation,
7119 - *     Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
7120 + *     Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7121   *
7122   ****************************************************************/
7123  
7124 @@ -36,8 +37,8 @@
7125   * Fix bugs from previous two steps
7126   * Snoop other OSs for any tricks we're not doing
7127   * SMP locking
7128 - * Reduce arbitrary timeouts 
7129 - * Smart multicast support 
7130 + * Reduce arbitrary timeouts
7131 + * Smart multicast support
7132   * Temporary MAC change support
7133   * Tunable SOFs parameter - ioctl()?
7134   * Ethernet stats collection
7135 @@ -54,7 +55,10 @@
7136  #include <linux/etherdevice.h>
7137  #include <linux/usb.h>
7138  #include <linux/types.h>
7139 +#include <linux/ethtool.h>
7140 +#include <asm/uaccess.h>
7141  #include <asm/semaphore.h>
7142 +#include <asm/byteorder.h>
7143  
7144  #define DEBUG
7145  
7146 @@ -73,6 +77,7 @@
7147  #define KAWETH_MTU                     1514
7148  #define KAWETH_BUF_SIZE                        1664
7149  #define KAWETH_TX_TIMEOUT              (5 * HZ)
7150 +#define KAWETH_SCRATCH_SIZE            32
7151  #define KAWETH_FIRMWARE_BUF_SIZE       4096
7152  #define KAWETH_CONTROL_TIMEOUT         (30 * HZ)
7153  
7154 @@ -98,8 +103,14 @@
7155  
7156  #define KAWETH_SOFS_TO_WAIT                    0x05
7157  
7158 +#define INTBUFFERSIZE                          4
7159  
7160 -MODULE_AUTHOR("Michael Zappe <zapman@interlan.net>, Stephane Alnet <stephane@u-picardie.fr> and Brad Hards <bhards@bigpond.net.au>");
7161 +#define STATE_OFFSET                           0
7162 +#define STATE_MASK                             0x40
7163 +#define        STATE_SHIFT                             5
7164 +
7165 +
7166 +MODULE_AUTHOR("Michael Zappe <zapman@interlan.net>, Stephane Alnet <stephane@u-picardie.fr>, Brad Hards <bhards@bigpond.net.au> and Oliver Neukum <oliver@neukum.org>");
7167  MODULE_DESCRIPTION("KL5USB101 USB Ethernet driver");
7168  MODULE_LICENSE("GPL");
7169  
7170 @@ -110,28 +121,28 @@
7171         );
7172  static void kaweth_disconnect(struct usb_device *dev, void *ptr);
7173  int kaweth_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe,
7174 -                               devrequest *cmd, void *data, int len,
7175 -                               int timeout);
7176 +                               struct usb_ctrlrequest *cmd, void *data,
7177 +                               int len, int timeout);
7178  
7179  /****************************************************************
7180   *     usb_device_id
7181   ****************************************************************/
7182  static struct usb_device_id usb_klsi_table[] = {
7183 -       { USB_DEVICE(0x03e8, 0x0008) }, /* AOX Endpoints USB Ethernet */ 
7184 +       { USB_DEVICE(0x03e8, 0x0008) }, /* AOX Endpoints USB Ethernet */
7185         { USB_DEVICE(0x04bb, 0x0901) }, /* I-O DATA USB-ET/T */
7186 -       { USB_DEVICE(0x0506, 0x03e8) }, /* 3Com 3C19250 */ 
7187 -       { USB_DEVICE(0x0557, 0x2002) }, /* ATEN USB Ethernet */ 
7188 -       { USB_DEVICE(0x0557, 0x4000) }, /* D-Link DSB-650C */ 
7189 +       { USB_DEVICE(0x0506, 0x03e8) }, /* 3Com 3C19250 */
7190 +       { USB_DEVICE(0x0557, 0x2002) }, /* ATEN USB Ethernet */
7191 +       { USB_DEVICE(0x0557, 0x4000) }, /* D-Link DSB-650C */
7192         { USB_DEVICE(0x0565, 0x0002) }, /* Peracom Enet */
7193         { USB_DEVICE(0x0565, 0x0003) }, /* Optus@Home UEP1045A */
7194 -       { USB_DEVICE(0x0565, 0x0005) }, /* Peracom Enet2 */ 
7195 +       { USB_DEVICE(0x0565, 0x0005) }, /* Peracom Enet2 */
7196         { USB_DEVICE(0x05e9, 0x0008) }, /* KLSI KL5KUSB101B */
7197         { USB_DEVICE(0x05e9, 0x0009) }, /* KLSI KL5KUSB101B (Board change) */
7198 -       { USB_DEVICE(0x066b, 0x2202) }, /* Linksys USB10T */ 
7199 -       { USB_DEVICE(0x06e1, 0x0008) }, /* ADS USB-10BT */ 
7200 -       { USB_DEVICE(0x06e1, 0x0009) }, /* ADS USB-10BT */ 
7201 -       { USB_DEVICE(0x0707, 0x0100) }, /* SMC 2202USB */ 
7202 -       { USB_DEVICE(0x07aa, 0x0001) }, /* Correga K.K. */ 
7203 +       { USB_DEVICE(0x066b, 0x2202) }, /* Linksys USB10T */
7204 +       { USB_DEVICE(0x06e1, 0x0008) }, /* ADS USB-10BT */
7205 +       { USB_DEVICE(0x06e1, 0x0009) }, /* ADS USB-10BT */
7206 +       { USB_DEVICE(0x0707, 0x0100) }, /* SMC 2202USB */
7207 +       { USB_DEVICE(0x07aa, 0x0001) }, /* Correga K.K. */
7208         { USB_DEVICE(0x07b8, 0x4000) }, /* D-Link DU-E10 */
7209         { USB_DEVICE(0x0846, 0x1001) }, /* NetGear EA-101 */
7210         { USB_DEVICE(0x0846, 0x1002) }, /* NetGear EA-101 */
7211 @@ -143,9 +154,10 @@
7212         { USB_DEVICE(0x10bd, 0x1427) }, /* ASANTE USB To Ethernet Adapter */
7213         { USB_DEVICE(0x1342, 0x0204) }, /* Mobility USB-Ethernet Adapter */
7214         { USB_DEVICE(0x13d2, 0x0400) }, /* Shark Pocket Adapter */
7215 -       { USB_DEVICE(0x1645, 0x0005) }, /* Entrega E45 */ 
7216 -       { USB_DEVICE(0x1645, 0x0008) }, /* Entrega USB Ethernet Adapter */ 
7217 -       { USB_DEVICE(0x1645, 0x8005) }, /* PortGear Ethernet Adapter */ 
7218 +       { USB_DEVICE(0x1485, 0x0001) }, /* Silicom U2E */
7219 +       { USB_DEVICE(0x1645, 0x0005) }, /* Entrega E45 */
7220 +       { USB_DEVICE(0x1645, 0x0008) }, /* Entrega USB Ethernet Adapter */
7221 +       { USB_DEVICE(0x1645, 0x8005) }, /* PortGear Ethernet Adapter */
7222         { USB_DEVICE(0x2001, 0x4000) }, /* D-link DSB-650C */
7223         {} /* Null terminator */
7224  };
7225 @@ -156,10 +168,10 @@
7226   *     kaweth_driver
7227   ****************************************************************/
7228  static struct usb_driver kaweth_driver = {
7229 -       name:           "kaweth",
7230 -       probe:          kaweth_probe,
7231 -       disconnect:     kaweth_disconnect,
7232 -       id_table:       usb_klsi_table,
7233 +       .name =         "kaweth",
7234 +       .probe =        kaweth_probe,
7235 +       .disconnect =   kaweth_disconnect,
7236 +       .id_table =     usb_klsi_table,
7237  };
7238  
7239  typedef __u8 eth_addr_t[6];
7240 @@ -198,17 +210,25 @@
7241         spinlock_t device_lock;
7242  
7243         __u32 status;
7244 +       int end;
7245 +       int removed;
7246 +       int suspend_lowmem;
7247 +       int linkstate;
7248  
7249         struct usb_device *dev;
7250         struct net_device *net;
7251 -       wait_queue_head_t control_wait;
7252 +       wait_queue_head_t term_wait;
7253  
7254         struct urb *rx_urb;
7255         struct urb *tx_urb;
7256 +       struct urb *irq_urb;
7257         
7258 -       __u8 firmware_buf[KAWETH_FIRMWARE_BUF_SIZE];
7259 -       __u8 tx_buf[KAWETH_BUF_SIZE];
7260 +       struct sk_buff *tx_skb;
7261 +
7262 +       __u8 *firmware_buf;
7263 +       __u8 scratch[KAWETH_SCRATCH_SIZE];
7264         __u8 rx_buf[KAWETH_BUF_SIZE];
7265 +       __u8 intbuffer[INTBUFFERSIZE];
7266         __u16 packet_filter_bitmap;
7267  
7268         struct kaweth_ethernet_configuration configuration;
7269 @@ -221,16 +241,16 @@
7270   *     kaweth_control
7271   ****************************************************************/
7272  static int kaweth_control(struct kaweth_device *kaweth,
7273 -                         unsigned int pipe, 
7274 -                         __u8 request, 
7275 -                         __u8 requesttype, 
7276 -                         __u16 value, 
7277 +                         unsigned int pipe,
7278 +                         __u8 request,
7279 +                         __u8 requesttype,
7280 +                         __u16 value,
7281                           __u16 index,
7282 -                         void *data, 
7283 -                         __u16 size, 
7284 +                         void *data,
7285 +                         __u16 size,
7286                           int timeout)
7287  {
7288 -       devrequest *dr;
7289 +       struct usb_ctrlrequest *dr;
7290  
7291         kaweth_dbg("kaweth_control()");
7292  
7293 @@ -239,19 +259,18 @@
7294                 return -EBUSY;
7295         }
7296  
7297 -       dr = kmalloc(sizeof(devrequest), GFP_ATOMIC);
7298 +       dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_ATOMIC);
7299  
7300 -       if(!dr)
7301 -       {
7302 +       if (!dr) {
7303                 kaweth_dbg("kmalloc() failed");
7304                 return -ENOMEM;
7305         }
7306 -       
7307 -       dr->requesttype = requesttype;
7308 -       dr->request = request;
7309 -       dr->value = cpu_to_le16p(&value);
7310 -       dr->index = cpu_to_le16p(&index);
7311 -       dr->length = cpu_to_le16p(&size);
7312 +
7313 +       dr->bRequestType= requesttype;
7314 +       dr->bRequest = request;
7315 +       dr->wValue = cpu_to_le16p(&value);
7316 +       dr->wIndex = cpu_to_le16p(&index);
7317 +       dr->wLength = cpu_to_le16p(&size);
7318  
7319         return kaweth_internal_control_msg(kaweth->dev,
7320                                         pipe,
7321 @@ -298,7 +317,7 @@
7322                                 USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
7323                                 urb_size,
7324                                 0,
7325 -                               (void *)&kaweth->firmware_buf,
7326 +                               (void *)&kaweth->scratch,
7327                                 0,
7328                                 KAWETH_CONTROL_TIMEOUT);
7329  
7330 @@ -320,7 +339,7 @@
7331                                 USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
7332                                 sofs_wait,
7333                                 0,
7334 -                               (void *)&kaweth->firmware_buf,
7335 +                               (void *)&kaweth->scratch,
7336                                 0,
7337                                 KAWETH_CONTROL_TIMEOUT);
7338  
7339 @@ -343,7 +362,7 @@
7340                                 USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
7341                                 receive_filter,
7342                                 0,
7343 -                               (void *)&kaweth->firmware_buf,
7344 +                               (void *)&kaweth->scratch,
7345                                 0,
7346                                 KAWETH_CONTROL_TIMEOUT);
7347  
7348 @@ -353,19 +372,19 @@
7349  /****************************************************************
7350   *     kaweth_download_firmware
7351   ****************************************************************/
7352 -static int kaweth_download_firmware(struct kaweth_device *kaweth, 
7353 -                                   __u8 *data, 
7354 +static int kaweth_download_firmware(struct kaweth_device *kaweth,
7355 +                                   __u8 *data,
7356                                     __u16 data_len,
7357                                     __u8 interrupt,
7358                                     __u8 type)
7359 -{      
7360 +{
7361         if(data_len > KAWETH_FIRMWARE_BUF_SIZE) {
7362                 kaweth_err("Firmware too big: %d", data_len);
7363                 return -ENOSPC;
7364         }
7365 -       
7366 +
7367         memcpy(kaweth->firmware_buf, data, data_len);
7368 -       
7369 +
7370         kaweth->firmware_buf[2] = (data_len & 0xFF) - 7;
7371         kaweth->firmware_buf[3] = data_len >> 8;
7372         kaweth->firmware_buf[4] = type;
7373 @@ -374,8 +393,8 @@
7374         kaweth_dbg("High: %i, Low:%i", kaweth->firmware_buf[3],
7375                    kaweth->firmware_buf[2]);
7376  
7377 -       kaweth_dbg("Downloading firmware at %p to kaweth device at %p", 
7378 -           data, 
7379 +       kaweth_dbg("Downloading firmware at %p to kaweth device at %p",
7380 +           data,
7381             kaweth);
7382         kaweth_dbg("Firmware length: %d", data_len);
7383  
7384 @@ -385,7 +404,7 @@
7385                               USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
7386                               0,
7387                               0,
7388 -                             (void *)&kaweth->firmware_buf,
7389 +                             (void *)kaweth->firmware_buf,
7390                               data_len,
7391                               KAWETH_CONTROL_TIMEOUT);
7392  }
7393 @@ -404,7 +423,7 @@
7394         kaweth->firmware_buf[5] = interrupt;
7395         kaweth->firmware_buf[6] = 0x00;
7396         kaweth->firmware_buf[7] = 0x00;
7397 -       
7398 +
7399         kaweth_dbg("Triggering firmware");
7400  
7401         return kaweth_control(kaweth,
7402 @@ -413,7 +432,7 @@
7403                               USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
7404                               0,
7405                               0,
7406 -                             (void *)&kaweth->firmware_buf,
7407 +                             (void *)kaweth->firmware_buf,
7408                               8,
7409                               KAWETH_CONTROL_TIMEOUT);
7410  }
7411 @@ -428,12 +447,12 @@
7412         kaweth_dbg("kaweth_reset(%p)", kaweth);
7413         result = kaweth_control(kaweth,
7414                                 usb_sndctrlpipe(kaweth->dev, 0),
7415 -                               USB_REQ_SET_CONFIGURATION, 
7416 -                               0, 
7417 +                               USB_REQ_SET_CONFIGURATION,
7418 +                               0,
7419                                 kaweth->dev->config[0].bConfigurationValue,
7420 -                               0, 
7421 -                               NULL, 
7422 -                               0, 
7423 +                               0,
7424 +                               NULL,
7425 +                               0,
7426                                 KAWETH_CONTROL_TIMEOUT);
7427  
7428         udelay(10000);
7429 @@ -444,15 +463,39 @@
7430  }
7431  
7432  static void kaweth_usb_receive(struct urb *);
7433 +static void kaweth_resubmit_rx_urb(struct kaweth_device *);
7434 +
7435 +/****************************************************************
7436 +       int_callback
7437 +*****************************************************************/
7438 +static void int_callback(struct urb *u)
7439 +{
7440 +       struct kaweth_device *kaweth = u->context;
7441 +       int act_state;
7442 +
7443 +       /* we abuse the interrupt urb for rebsubmitting under low memory saving a timer */
7444 +       if (kaweth->suspend_lowmem)
7445 +               kaweth_resubmit_rx_urb(kaweth);
7446 +
7447 +       /* we check the link state to report changes */
7448 +       if (kaweth->linkstate != (act_state = ( kaweth->intbuffer[STATE_OFFSET] | STATE_MASK) >> STATE_SHIFT)) {
7449 +               if (!act_state)
7450 +                       netif_carrier_on(kaweth->net);
7451 +               else
7452 +                       netif_carrier_off(kaweth->net);
7453 +
7454 +               kaweth->linkstate = act_state;
7455 +       }
7456 +
7457 +}
7458  
7459  /****************************************************************
7460   *     kaweth_resubmit_rx_urb
7461   ****************************************************************/
7462 -static inline void kaweth_resubmit_rx_urb(struct kaweth_device *kaweth)
7463 +static void kaweth_resubmit_rx_urb(struct kaweth_device *kaweth)
7464  {
7465         int result;
7466 -
7467 -       memset(kaweth->rx_urb, 0, sizeof(*kaweth->rx_urb));
7468 +       long flags;
7469  
7470         FILL_BULK_URB(kaweth->rx_urb,
7471                       kaweth->dev,
7472 @@ -462,9 +505,17 @@
7473                       kaweth_usb_receive,
7474                       kaweth);
7475  
7476 -       if((result = usb_submit_urb(kaweth->rx_urb))) {
7477 -               kaweth_err("resubmitting rx_urb %d failed", result);
7478 +       spin_lock_irqsave(&kaweth->device_lock, flags);
7479 +       if (!kaweth->removed) { /* no resubmit if disconnecting */
7480 +               if((result = usb_submit_urb(kaweth->rx_urb))) {
7481 +                       if (result == -ENOMEM)
7482 +                               kaweth->suspend_lowmem = 1;
7483 +                       kaweth_err("resubmitting rx_urb %d failed", result);
7484 +               } else {
7485 +                       kaweth->suspend_lowmem = 0;
7486 +               }
7487         }
7488 +       spin_unlock_irqrestore(&kaweth->device_lock, flags);
7489  }
7490  
7491  static void kaweth_async_set_rx_mode(struct kaweth_device *kaweth);
7492 @@ -476,23 +527,30 @@
7493  {
7494         struct kaweth_device *kaweth = urb->context;
7495         struct net_device *net = kaweth->net;
7496 -       
7497 +
7498         int count = urb->actual_length;
7499         int count2 = urb->transfer_buffer_length;
7500 -                       
7501 +
7502         __u16 pkt_len = le16_to_cpup((u16 *)kaweth->rx_buf);
7503  
7504         struct sk_buff *skb;
7505  
7506 -       if(kaweth->status & KAWETH_STATUS_CLOSING) {
7507 +       if(urb->status == -ECONNRESET || urb->status == -ECONNABORTED)
7508 +       /* we are killed - set a flag and wake the disconnect handler */
7509 +       {
7510 +               kaweth->end = 1;
7511 +               wake_up(&kaweth->term_wait);
7512                 return;
7513         }
7514 -       
7515 -       if(urb->status && urb->status != -EREMOTEIO && count != 1) { 
7516 +
7517 +       if (kaweth->status & KAWETH_STATUS_CLOSING)
7518 +               return;
7519 +
7520 +       if(urb->status && urb->status != -EREMOTEIO && count != 1) {
7521                 kaweth_err("%s RX status: %d count: %d packet_len: %d",
7522 -                           net->name, 
7523 +                           net->name,
7524                            urb->status,
7525 -                          count, 
7526 +                          count,
7527                            (int)pkt_len);
7528                 kaweth_resubmit_rx_urb(kaweth);
7529                  return;
7530 @@ -506,22 +564,24 @@
7531                         kaweth_resubmit_rx_urb(kaweth);
7532                          return;
7533                  }
7534 -               
7535 +
7536                 if(!(skb = dev_alloc_skb(pkt_len+2))) {
7537                         kaweth_resubmit_rx_urb(kaweth);
7538                          return;
7539                 }
7540  
7541 +               skb_reserve(skb, 2);    /* Align IP on 16 byte boundaries */
7542 +
7543                 skb->dev = net;
7544  
7545                 eth_copy_and_sum(skb, kaweth->rx_buf + 2, pkt_len, 0);
7546 -               
7547 +
7548                 skb_put(skb, pkt_len);
7549  
7550                 skb->protocol = eth_type_trans(skb, net);
7551 -               
7552 +
7553                 netif_rx(skb);
7554 -               
7555 +
7556                 kaweth->stats.rx_packets++;
7557                 kaweth->stats.rx_bytes += pkt_len;
7558         }
7559 @@ -540,11 +600,23 @@
7560  
7561         kaweth_dbg("Opening network device.");
7562  
7563 +       MOD_INC_USE_COUNT;
7564 +
7565         kaweth_resubmit_rx_urb(kaweth);
7566  
7567 -       netif_start_queue(net);
7568 +       FILL_INT_URB(
7569 +               kaweth->irq_urb,
7570 +               kaweth->dev,
7571 +               usb_rcvintpipe(kaweth->dev, 3),
7572 +               kaweth->intbuffer,
7573 +               INTBUFFERSIZE,
7574 +               int_callback,
7575 +               kaweth,
7576 +               HZ/4);
7577  
7578 -       MOD_INC_USE_COUNT;
7579 +       usb_submit_urb(kaweth->irq_urb);
7580 +
7581 +       netif_start_queue(net);
7582  
7583         kaweth_async_set_rx_mode(kaweth);
7584         return 0;
7585 @@ -558,9 +630,12 @@
7586         struct kaweth_device *kaweth = net->priv;
7587  
7588         netif_stop_queue(net);
7589 -
7590 +       
7591 +       spin_lock_irq(&kaweth->device_lock);
7592         kaweth->status |= KAWETH_STATUS_CLOSING;
7593 +       spin_unlock_irq(&kaweth->device_lock);
7594  
7595 +       usb_unlink_urb(kaweth->irq_urb);
7596         usb_unlink_urb(kaweth->rx_urb);
7597  
7598         kaweth->status &= ~KAWETH_STATUS_CLOSING;
7599 @@ -572,11 +647,35 @@
7600         return 0;
7601  }
7602  
7603 +static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
7604 +{
7605 +       u32 ethcmd;
7606 +       
7607 +       if (copy_from_user(&ethcmd, useraddr, sizeof(ethcmd)))
7608 +               return -EFAULT;
7609 +       
7610 +       switch (ethcmd) {
7611 +       case ETHTOOL_GDRVINFO: {
7612 +               struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
7613 +               strncpy(info.driver, "kaweth", sizeof(info.driver)-1);
7614 +               if (copy_to_user(useraddr, &info, sizeof(info)))
7615 +                       return -EFAULT;
7616 +               return 0;
7617 +       }
7618 +       }
7619 +       
7620 +       return -EOPNOTSUPP;
7621 +}
7622 +
7623  /****************************************************************
7624   *     kaweth_ioctl
7625   ****************************************************************/
7626  static int kaweth_ioctl(struct net_device *net, struct ifreq *rq, int cmd)
7627  {
7628 +       switch (cmd) {
7629 +       case SIOCETHTOOL:
7630 +               return netdev_ethtool_ioctl(net, (void *) rq->ifr_data);
7631 +       }
7632         return -EOPNOTSUPP;
7633  }
7634  
7635 @@ -586,11 +685,13 @@
7636  static void kaweth_usb_transmit_complete(struct urb *urb)
7637  {
7638         struct kaweth_device *kaweth = urb->context;
7639 +       struct sk_buff *skb = kaweth->tx_skb;
7640  
7641 -       if (urb->status)
7642 +       if (urb->status != 0)
7643                 kaweth_dbg("%s: TX status %d.", kaweth->net->name, urb->status);
7644  
7645         netif_wake_queue(kaweth->net);
7646 +       dev_kfree_skb(skb);
7647  }
7648  
7649  /****************************************************************
7650 @@ -599,45 +700,66 @@
7651  static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net)
7652  {
7653         struct kaweth_device *kaweth = net->priv;
7654 -       int count = skb->len;
7655 -       
7656 +       char *private_header;
7657 +
7658         int res;
7659  
7660         spin_lock(&kaweth->device_lock);
7661  
7662 +       if (kaweth->removed) {
7663 +       /* our device is undergoing disconnection - we bail out */
7664 +               spin_unlock(&kaweth->device_lock);
7665 +               dev_kfree_skb(skb);
7666 +               return 0;
7667 +       }
7668 +
7669         kaweth_async_set_rx_mode(kaweth);
7670         netif_stop_queue(net);
7671  
7672 -       *((__u16 *)kaweth->tx_buf) = cpu_to_le16(skb->len);
7673 -
7674 -       memcpy(kaweth->tx_buf + 2, skb->data, skb->len);
7675 +       /* We now decide whether we can put our special header into the sk_buff */
7676 +       if (skb_cloned(skb) || skb_headroom(skb) < 2) {
7677 +               /* no such luck - we make our own */
7678 +               struct sk_buff *copied_skb;
7679 +               copied_skb = skb_copy_expand(skb, 2, 0, GFP_ATOMIC);
7680 +               dev_kfree_skb_any(skb);
7681 +               skb = copied_skb;
7682 +               if (!copied_skb) {
7683 +                       kaweth->stats.tx_errors++;
7684 +                       netif_start_queue(net);
7685 +                       spin_unlock(&kaweth->device_lock);
7686 +                       return 0;
7687 +               }
7688 +       }
7689  
7690 -       memset(kaweth->tx_urb, 0, sizeof(*kaweth->tx_urb));
7691 +       private_header = __skb_push(skb, 2);
7692 +       *private_header = cpu_to_le16(skb->len);
7693 +       kaweth->tx_skb = skb;
7694  
7695         FILL_BULK_URB(kaweth->tx_urb,
7696                       kaweth->dev,
7697                       usb_sndbulkpipe(kaweth->dev, 2),
7698 -                     kaweth->tx_buf,
7699 -                     count + 2,
7700 +                     private_header,
7701 +                     skb->len,
7702                       kaweth_usb_transmit_complete,
7703                       kaweth);
7704 +       kaweth->end = 0;
7705 +       kaweth->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
7706  
7707         if((res = usb_submit_urb(kaweth->tx_urb)))
7708         {
7709                 kaweth_warn("kaweth failed tx_urb %d", res);
7710                 kaweth->stats.tx_errors++;
7711 -               
7712 +
7713                 netif_start_queue(net);
7714 -       } 
7715 -       else 
7716 +               dev_kfree_skb(skb);
7717 +       }
7718 +       else
7719         {
7720                 kaweth->stats.tx_packets++;
7721                 kaweth->stats.tx_bytes += skb->len;
7722                 net->trans_start = jiffies;
7723         }
7724  
7725 -       dev_kfree_skb(skb);
7726 -
7727         spin_unlock(&kaweth->device_lock);
7728  
7729         return 0;
7730 @@ -649,7 +771,7 @@
7731  static void kaweth_set_rx_mode(struct net_device *net)
7732  {
7733         struct kaweth_device *kaweth = net->priv;
7734 -       
7735 +
7736         __u16 packet_filter_bitmap = KAWETH_PACKET_FILTER_DIRECTED |
7737                                       KAWETH_PACKET_FILTER_BROADCAST |
7738                                      KAWETH_PACKET_FILTER_MULTICAST;
7739 @@ -660,7 +782,7 @@
7740  
7741         if (net->flags & IFF_PROMISC) {
7742                 packet_filter_bitmap |= KAWETH_PACKET_FILTER_PROMISCUOUS;
7743 -       } 
7744 +       }
7745         else if ((net->mc_count) || (net->flags & IFF_ALLMULTI)) {
7746                 packet_filter_bitmap |= KAWETH_PACKET_FILTER_ALL_MULTICAST;
7747         }
7748 @@ -675,7 +797,7 @@
7749  static void kaweth_async_set_rx_mode(struct kaweth_device *kaweth)
7750  {
7751         __u16 packet_filter_bitmap = kaweth->packet_filter_bitmap;
7752 -       kaweth->packet_filter_bitmap = 0;       
7753 +       kaweth->packet_filter_bitmap = 0;
7754         if(packet_filter_bitmap == 0) return;
7755  
7756         {
7757 @@ -686,7 +808,7 @@
7758                                 USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
7759                                 packet_filter_bitmap,
7760                                 0,
7761 -                               (void *)&kaweth->firmware_buf,
7762 +                               (void *)&kaweth->scratch,
7763                                 0,
7764                                 KAWETH_CONTROL_TIMEOUT);
7765  
7766 @@ -718,7 +840,6 @@
7767         kaweth->stats.tx_errors++;
7768         net->trans_start = jiffies;
7769  
7770 -       kaweth->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
7771         usb_unlink_urb(kaweth->tx_urb);
7772  }
7773  
7774 @@ -736,14 +857,14 @@
7775         int result = 0;
7776  
7777         kaweth_dbg("Kawasaki Device Probe (Device number:%d): 0x%4.4x:0x%4.4x:0x%4.4x",
7778 -                dev->devnum, 
7779 -                (int)dev->descriptor.idVendor, 
7780 +                dev->devnum,
7781 +                (int)dev->descriptor.idVendor,
7782                  (int)dev->descriptor.idProduct,
7783                  (int)dev->descriptor.bcdDevice);
7784  
7785         kaweth_dbg("Device at %p", dev);
7786  
7787 -       kaweth_dbg("Descriptor length: %x type: %x", 
7788 +       kaweth_dbg("Descriptor length: %x type: %x",
7789                  (int)dev->descriptor.bLength,
7790                  (int)dev->descriptor.bDescriptorType);
7791  
7792 @@ -755,10 +876,9 @@
7793         memset(kaweth, 0, sizeof(struct kaweth_device));
7794  
7795         kaweth->dev = dev;
7796 -       kaweth->status = 0;
7797 -       kaweth->net = NULL;
7798 -       kaweth->device_lock = SPIN_LOCK_UNLOCKED;
7799 -               
7800 +       spin_lock_init(&kaweth->device_lock);
7801 +       init_waitqueue_head(&kaweth->term_wait);
7802 +
7803         kaweth_dbg("Resetting.");
7804  
7805         kaweth_reset(kaweth);
7806 @@ -773,22 +893,25 @@
7807         } else {
7808                 /* Download the firmware */
7809                 kaweth_info("Downloading firmware...");
7810 -               if ((result = kaweth_download_firmware(kaweth, 
7811 -                                                     kaweth_new_code, 
7812 -                                                     len_kaweth_new_code, 
7813 -                                                     100, 
7814 +               kaweth->firmware_buf = (__u8 *)__get_free_page(GFP_KERNEL);
7815 +               if ((result = kaweth_download_firmware(kaweth,
7816 +                                                     kaweth_new_code,
7817 +                                                     len_kaweth_new_code,
7818 +                                                     100,
7819                                                       2)) < 0) {
7820                         kaweth_err("Error downloading firmware (%d)", result);
7821 +                       free_page((unsigned long)kaweth->firmware_buf);
7822                         kfree(kaweth);
7823                         return NULL;
7824                 }
7825  
7826 -               if ((result = kaweth_download_firmware(kaweth, 
7827 -                                                     kaweth_new_code_fix, 
7828 -                                                     len_kaweth_new_code_fix, 
7829 -                                                     100, 
7830 +               if ((result = kaweth_download_firmware(kaweth,
7831 +                                                     kaweth_new_code_fix,
7832 +                                                     len_kaweth_new_code_fix,
7833 +                                                     100,
7834                                                       3)) < 0) {
7835                         kaweth_err("Error downloading firmware fix (%d)", result);
7836 +                       free_page((unsigned long)kaweth->firmware_buf);
7837                         kfree(kaweth);
7838                         return NULL;
7839                 }
7840 @@ -799,6 +922,7 @@
7841                                                       126,
7842                                                       2)) < 0) {
7843                         kaweth_err("Error downloading trigger code (%d)", result);
7844 +                       free_page((unsigned long)kaweth->firmware_buf);
7845                         kfree(kaweth);
7846                         return NULL;
7847                 }
7848 @@ -809,6 +933,7 @@
7849                                                       126,
7850                                                       3)) < 0) {
7851                         kaweth_err("Error downloading trigger code fix (%d)", result);
7852 +                       free_page((unsigned long)kaweth->firmware_buf);
7853                         kfree(kaweth);
7854                         return NULL;
7855                 }
7856 @@ -816,12 +941,14 @@
7857  
7858                 if ((result = kaweth_trigger_firmware(kaweth, 126)) < 0) {
7859                         kaweth_err("Error triggering firmware (%d)", result);
7860 +                       free_page((unsigned long)kaweth->firmware_buf);
7861                         kfree(kaweth);
7862                         return NULL;
7863                 }
7864  
7865                 /* Device will now disappear for a moment...  */
7866                 kaweth_info("Firmware loaded.  I'll be back...");
7867 +               free_page((unsigned long)kaweth->firmware_buf);
7868                 kfree(kaweth);
7869                 return NULL;
7870         }
7871 @@ -846,7 +973,7 @@
7872                  (int)kaweth->configuration.hw_addr[5]);
7873  
7874         if(!memcmp(&kaweth->configuration.hw_addr,
7875 -                   &bcast_addr, 
7876 +                   &bcast_addr,
7877                    sizeof(bcast_addr))) {
7878                 kaweth_err("Firmware not functioning properly, no net device created");
7879                 kfree(kaweth);
7880 @@ -857,13 +984,13 @@
7881                 kaweth_dbg("Error setting URB size");
7882                 return kaweth;
7883         }
7884 -       
7885 +
7886         if(kaweth_set_sofs_wait(kaweth, KAWETH_SOFS_TO_WAIT) < 0) {
7887                 kaweth_err("Error setting SOFS wait");
7888                 return kaweth;
7889         }
7890  
7891 -       result = kaweth_set_receive_filter(kaweth, 
7892 +       result = kaweth_set_receive_filter(kaweth,
7893                                             KAWETH_PACKET_FILTER_DIRECTED |
7894                                             KAWETH_PACKET_FILTER_BROADCAST |
7895                                             KAWETH_PACKET_FILTER_MULTICAST);
7896 @@ -872,11 +999,18 @@
7897                 kaweth_err("Error setting receive filter");
7898                 return kaweth;
7899         }
7900 -       
7901 +
7902         kaweth_dbg("Initializing net device.");
7903  
7904         kaweth->tx_urb = usb_alloc_urb(0);
7905 +       if (!kaweth->tx_urb)
7906 +               goto err_no_urb;
7907         kaweth->rx_urb = usb_alloc_urb(0);
7908 +       if (!kaweth->rx_urb)
7909 +               goto err_only_tx;
7910 +       kaweth->irq_urb = usb_alloc_urb(0);
7911 +       if (!kaweth->irq_urb)
7912 +               goto err_tx_and_rx;
7913  
7914         kaweth->net = init_etherdev(0, 0);
7915         if (!kaweth->net) {
7916 @@ -885,17 +1019,17 @@
7917         }
7918  
7919         memcpy(kaweth->net->broadcast, &bcast_addr, sizeof(bcast_addr));
7920 -       memcpy(kaweth->net->dev_addr, 
7921 +       memcpy(kaweth->net->dev_addr,
7922                 &kaweth->configuration.hw_addr,
7923                 sizeof(kaweth->configuration.hw_addr));
7924 -        
7925 +
7926         kaweth->net->priv = kaweth;
7927         kaweth->net->open = kaweth_open;
7928         kaweth->net->stop = kaweth_close;
7929  
7930         kaweth->net->watchdog_timeo = KAWETH_TX_TIMEOUT;
7931         kaweth->net->tx_timeout = kaweth_tx_timeout;
7932 -       
7933 +
7934         kaweth->net->do_ioctl = kaweth_ioctl;
7935         kaweth->net->hard_start_xmit = kaweth_start_xmit;
7936         kaweth->net->set_multicast_list = kaweth_set_rx_mode;
7937 @@ -905,10 +1039,18 @@
7938         memset(&kaweth->stats, 0, sizeof(kaweth->stats));
7939  
7940         kaweth_info("kaweth interface created at %s", kaweth->net->name);
7941 -                                                               
7942 +
7943         kaweth_dbg("Kaweth probe returning.");
7944  
7945         return kaweth;
7946 +
7947 +err_tx_and_rx:
7948 +       usb_free_urb(kaweth->rx_urb);
7949 +err_only_tx:
7950 +       usb_free_urb(kaweth->tx_urb);
7951 +err_no_urb:
7952 +       kfree(kaweth);
7953 +       return NULL;
7954  }
7955  
7956  /****************************************************************
7957 @@ -925,8 +1067,18 @@
7958                 return;
7959         }
7960  
7961 +       kaweth->removed = 1;
7962 +       usb_unlink_urb(kaweth->irq_urb);
7963         usb_unlink_urb(kaweth->rx_urb);
7964 -       usb_unlink_urb(kaweth->tx_urb);
7965 +
7966 +       /* we need to wait for the urb to be cancelled, if it is active */
7967 +       spin_lock_irq(&kaweth->device_lock);
7968 +       if (usb_unlink_urb(kaweth->tx_urb) == -EINPROGRESS) {
7969 +               spin_unlock_irq(&kaweth->device_lock);
7970 +               wait_event(kaweth->term_wait, kaweth->end);
7971 +       } else {
7972 +               spin_unlock_irq(&kaweth->device_lock);
7973 +       }
7974  
7975         if(kaweth->net) {
7976                 if(kaweth->net->flags & IFF_UP) {
7977 @@ -945,12 +1097,19 @@
7978  }
7979  
7980  
7981 +// FIXME this completion stuff is a modified clone of
7982 +// an OLD version of some stuff in usb.c ...
7983 +struct kw_api_data {
7984 +       wait_queue_head_t wqh;
7985 +       int done;
7986 +};
7987 +
7988  /*-------------------------------------------------------------------*
7989   * completion handler for compatibility wrappers (sync control/bulk) *
7990   *-------------------------------------------------------------------*/
7991 -static void usb_api_blocking_completion(urb_t *urb)
7992 +static void usb_api_blocking_completion(struct urb *urb)
7993  {
7994 -        struct usb_api_data *awd = (struct usb_api_data *)urb->context;
7995 +        struct kw_api_data *awd = (struct kw_api_data *)urb->context;
7996  
7997         awd->done=1;
7998         wake_up(&awd->wqh);
7999 @@ -961,15 +1120,15 @@
8000   *-------------------------------------------------------------------*/
8001  
8002  // Starts urb and waits for completion or timeout
8003 -static int usb_start_wait_urb(urb_t *urb, int timeout, int* actual_length)
8004 +static int usb_start_wait_urb(struct urb *urb, int timeout, int* actual_length)
8005  {
8006          DECLARE_WAITQUEUE(wait, current);
8007 -       struct usb_api_data awd;
8008 +       struct kw_api_data awd;
8009          int status;
8010  
8011          init_waitqueue_head(&awd.wqh);
8012          awd.done = 0;
8013 -        
8014 +
8015          set_current_state(TASK_INTERRUPTIBLE);
8016          add_wait_queue(&awd.wqh, &wait);
8017          urb->context = &awd;
8018 @@ -1009,9 +1168,10 @@
8019  /*-------------------------------------------------------------------*/
8020  // returns status (negative) or length (positive)
8021  int kaweth_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe,
8022 -                            devrequest *cmd,  void *data, int len, int timeout)
8023 +                            struct usb_ctrlrequest *cmd, void *data, int len,
8024 +                           int timeout)
8025  {
8026 -        urb_t *urb;
8027 +        struct urb *urb;
8028          int retv;
8029          int length;
8030  
8031 @@ -1054,6 +1214,7 @@
8032  
8033  
8034  
8035 +
8036  
8037  
8038  
8039 diff -Nur linux-2.4.19.old/drivers/usb/mdc800.c linux-2.4.19/drivers/usb/mdc800.c
8040 --- linux-2.4.19.old/drivers/usb/mdc800.c       Mon Feb 25 20:38:07 2002
8041 +++ linux-2.4.19/drivers/usb/mdc800.c   Mon Nov 25 12:26:55 2002
8042 @@ -140,7 +140,7 @@
8043  
8044         unsigned int            endpoint [4];
8045  
8046 -       purb_t                  irq_urb;
8047 +       struct urb *            irq_urb;
8048         wait_queue_head_t       irq_wait;
8049         int                     irq_woken;
8050         char*                   irq_urb_buffer;
8051 @@ -149,13 +149,13 @@
8052         int                     camera_request_ready; // Status to synchronize with irq
8053         char                    camera_response [8];  // last Bytes send after busy
8054  
8055 -       purb_t                  write_urb;
8056 +       struct urb *            write_urb;
8057         char*                   write_urb_buffer;
8058         wait_queue_head_t       write_wait;
8059         int                     written;
8060  
8061  
8062 -       purb_t                  download_urb;
8063 +       struct urb *            download_urb;
8064         char*                   download_urb_buffer;
8065         wait_queue_head_t       download_wait;
8066         int                     downloaded;
8067 @@ -652,7 +652,7 @@
8068   */
8069  static ssize_t mdc800_device_read (struct file *file, char *buf, size_t len, loff_t *pos)
8070  {
8071 -       int   left=len, sts=len; /* single transfer size */
8072 +       size_t left=len, sts=len; /* single transfer size */
8073         char* ptr=buf;
8074         DECLARE_WAITQUEUE(wait, current);
8075  
8076 @@ -746,7 +746,7 @@
8077   */
8078  static ssize_t mdc800_device_write (struct file *file, const char *buf, size_t len, loff_t *pos)
8079  {
8080 -       int i=0;
8081 +       size_t i=0;
8082         DECLARE_WAITQUEUE(wait, current);
8083  
8084         down (&mdc800->io_lock);
8085 diff -Nur linux-2.4.19.old/drivers/usb/microtek.c linux-2.4.19/drivers/usb/microtek.c
8086 --- linux-2.4.19.old/drivers/usb/microtek.c     Fri Oct  5 21:04:51 2001
8087 +++ linux-2.4.19/drivers/usb/microtek.c Mon Nov 25 12:26:55 2002
8088 @@ -117,6 +117,8 @@
8089   *     20010320 Version 0.4.3
8090   *     20010408 Identify version on module load.
8091   *     20011003 Fix multiple requests
8092 + *     20020618 Version 0.4.4
8093 + *     20020618 Confirm to utterly stupid rules about io_request_lock
8094   */
8095  
8096  #include <linux/module.h>
8097 @@ -144,7 +146,7 @@
8098  /*
8099   * Version Information
8100   */
8101 -#define DRIVER_VERSION "v0.4.3"
8102 +#define DRIVER_VERSION "v0.4.4"
8103  #define DRIVER_AUTHOR "John Fremlin <vii@penguinpowered.com>, Oliver Neukum <Oliver.Neukum@lrz.uni-muenchen.de>"
8104  #define DRIVER_DESC "Microtek Scanmaker X6 USB scanner driver"
8105  
8106 @@ -326,10 +328,12 @@
8107  }  */
8108  
8109  static inline void mts_urb_abort(struct mts_desc* desc) {
8110 +       spin_unlock_irq(&io_request_lock);
8111         MTS_DEBUG_GOT_HERE();
8112         mts_debug_dump(desc);
8113  
8114         usb_unlink_urb( &desc->urb );
8115 +       spin_lock_irq(&io_request_lock);
8116  }
8117  
8118  static struct mts_desc * mts_list; /* list of active scanners */
8119 @@ -414,12 +418,14 @@
8120  
8121  static int mts_scsi_host_reset (Scsi_Cmnd *srb)
8122  {
8123 -       struct mts_desc* desc = (struct mts_desc*)(srb->host->hostdata[0]);
8124  
8125 +       struct mts_desc* desc = (struct mts_desc*)(srb->host->hostdata[0]);
8126 +       spin_unlock_irq(&io_request_lock);
8127         MTS_DEBUG_GOT_HERE();
8128         mts_debug_dump(desc);
8129  
8130         usb_reset_device(desc->usb_dev); /*FIXME: untested on new reset code */
8131 +       spin_lock_irq(&io_request_lock);
8132         return 0;  /* RANT why here 0 and not SUCCESS */
8133  }
8134  
8135 @@ -435,6 +441,7 @@
8136         /* What a hideous hack! */
8137  
8138         char local_name[48];
8139 +       spin_unlock_irq(&io_request_lock);
8140  
8141         MTS_DEBUG_GOT_HERE();
8142  
8143 @@ -445,6 +452,7 @@
8144  
8145         if (!sht->proc_name) {
8146                 MTS_ERROR( "unable to allocate memory for proc interface!!\n" );
8147 +               spin_lock_irq(&io_request_lock);
8148                 return 0;
8149         }
8150  
8151 @@ -457,11 +465,12 @@
8152         if (desc->host == NULL) {
8153                 MTS_ERROR("Cannot register due to low memory");
8154                 kfree(sht->proc_name);
8155 +               spin_lock_irq(&io_request_lock);
8156                 return 0;
8157         }
8158         desc->host->hostdata[0] = (unsigned long)desc;
8159  /* FIXME: what if sizeof(void*) != sizeof(unsigned long)? */
8160 -
8161 +       spin_lock_irq(&io_request_lock);
8162         return 1;
8163  }
8164  
8165 diff -Nur linux-2.4.19.old/drivers/usb/ov511.c linux-2.4.19/drivers/usb/ov511.c
8166 --- linux-2.4.19.old/drivers/usb/ov511.c        Sat Aug  3 02:39:45 2002
8167 +++ linux-2.4.19/drivers/usb/ov511.c    Mon Nov 25 12:26:55 2002
8168 @@ -9,7 +9,8 @@
8169   * OV7620 fixes by Charl P. Botha <cpbotha@ieee.org>
8170   * Changes by Claudio Matsuoka <claudio@conectiva.com>
8171   * Original SAA7111A code by Dave Perks <dperks@ibm.net>
8172 - * Kernel I2C interface adapted from nt1003 driver
8173 + * URB error messages from pwc driver by Nemosoft
8174 + * generic_ioctl() code from videodev.c by Gerd Knorr and Alan Cox
8175   *
8176   * Based on the Linux CPiA driver written by Peter Pregler,
8177   * Scott J. Bertin and Johannes Erdfelt.
8178 @@ -57,19 +58,22 @@
8179  /*
8180   * Version Information
8181   */
8182 -#define DRIVER_VERSION "v1.50 for Linux 2.4"
8183 -#define EMAIL "mmcclell@bigfoot.com"
8184 +#define DRIVER_VERSION "v1.61 for Linux 2.4"
8185 +#define EMAIL "mark@alpha.dyndns.org"
8186  #define DRIVER_AUTHOR "Mark McClelland <mmcclell@bigfoot.com> & Bret Wallach \
8187         & Orion Sky Lawlor <olawlor@acm.org> & Kevin Moore & Charl P. Botha \
8188         <cpbotha@ieee.org> & Claudio Matsuoka <claudio@conectiva.com>"
8189 -#define DRIVER_DESC "OV511 USB Camera Driver"
8190 +#define DRIVER_DESC "ov511 USB Camera Driver"
8191  
8192  #define OV511_I2C_RETRIES 3
8193  #define ENABLE_Y_QUANTABLE 1
8194  #define ENABLE_UV_QUANTABLE 1
8195  
8196 +#define OV511_MAX_UNIT_VIDEO 16
8197 +
8198  /* Pixel count * 3 bytes for RGB */
8199  #define MAX_FRAME_SIZE(w, h) ((w) * (h) * 3)
8200 +
8201  #define MAX_DATA_SIZE(w, h) (MAX_FRAME_SIZE(w, h) + sizeof(struct timeval))
8202  
8203  /* Max size * bytes per YUV420 pixel (1.5) + one extra isoc frame for safety */
8204 @@ -77,128 +81,47 @@
8205  
8206  #define FATAL_ERROR(rc) ((rc) < 0 && (rc) != -EPERM)
8207  
8208 -/* PARAMETER VARIABLES: */
8209 -/* (See ov511.txt for detailed descriptions of these.) */
8210 -
8211 -/* Sensor automatically changes brightness */
8212 -static int autobright = 1;
8213 -
8214 -/* Sensor automatically changes gain */
8215 -static int autogain = 1;
8216 -
8217 -/* Sensor automatically changes exposure */
8218 -static int autoexp = 1;
8219 -
8220 -/* 0=no debug messages
8221 - * 1=init/detection/unload and other significant messages,
8222 - * 2=some warning messages
8223 - * 3=config/control function calls
8224 - * 4=most function calls and data parsing messages
8225 - * 5=highly repetitive mesgs
8226 - * NOTE: This should be changed to 0, 1, or 2 for production kernels
8227 - */
8228 -static int debug; /* = 0 */
8229 -
8230 -/* Fix vertical misalignment of red and blue at 640x480 */
8231 -static int fix_rgb_offset; /* = 0 */
8232 -
8233 -/* Snapshot mode enabled flag */
8234 -static int snapshot; /* = 0 */
8235 -
8236 -/* Force image to be read in RGB instead of BGR. This option allow
8237 - * programs that expect RGB data (e.g. gqcam) to work with this driver. */
8238 -static int force_rgb; /* = 0 */
8239 -
8240 -/* Number of seconds before inactive buffers are deallocated */
8241 -static int buf_timeout = 5;
8242 -
8243 -/* Number of cameras to stream from simultaneously */
8244 -static int cams = 1;
8245 -
8246 -/* Enable compression. Needs a fast (>300 MHz) CPU. */
8247 -static int compress; /* = 0 */
8248 -
8249 -/* Display test pattern - doesn't work yet either */
8250 -static int testpat; /* = 0 */
8251 -
8252 -/* Setting this to 1 will make the sensor output GBR422 instead of YUV420. Only
8253 - * affects RGB24 mode. */
8254 -static int sensor_gbr; /* = 0 */
8255 -
8256 -/* Dump raw pixel data. */
8257 -static int dumppix; /* = 0 */
8258 -
8259 -/* LED policy. Only works on some OV511+ cameras. 0=off, 1=on (default), 2=auto
8260 - * (on when open) */
8261 -static int led = 1;
8262 -
8263 -/* Set this to 1 to dump the bridge register contents after initialization */
8264 -static int dump_bridge; /* = 0 */
8265 -
8266 -/* Set this to 1 to dump the sensor register contents after initialization */
8267 -static int dump_sensor; /* = 0 */
8268 -
8269 -/* Temporary option for debugging "works, but no image" problem. Prints the
8270 - * first 12 bytes of data (potentially a packet header) in each isochronous
8271 - * data frame. */
8272 -static int printph; /* = 0 */
8273 -
8274 -/* Compression parameters - I'm not exactly sure what these do yet */
8275 -static int phy = 0x1f;
8276 -static int phuv = 0x05;
8277 -static int pvy = 0x06;
8278 -static int pvuv = 0x06;
8279 -static int qhy = 0x14;
8280 -static int qhuv = 0x03;
8281 -static int qvy = 0x04;
8282 -static int qvuv = 0x04;
8283 -
8284 -/* Light frequency. Set to 50 or 60 (Hz), or zero for default settings */
8285 -static int lightfreq; /* = 0 */
8286 -
8287 -/* Set this to 1 to enable banding filter by default. Compensates for
8288 - * alternating horizontal light/dark bands caused by (usually fluorescent)
8289 - * lights */
8290 -static int bandingfilter; /* = 0 */
8291 -
8292 -/* Pixel clock divisor */
8293 -static int clockdiv = -1;
8294 -
8295 -/* Isoc packet size */
8296 -static int packetsize = -1;
8297 -
8298 -/* Frame drop register (16h) */
8299 -static int framedrop = -1;
8300 -
8301 -/* Allows picture settings (brightness, hue, etc...) to take effect immediately,
8302 - * even in the middle of a frame. This reduces the time to change settings, but
8303 - * can ruin frames during the change. Only affects OmniVision sensors. */
8304 -static int fastset; /* = 0 */
8305 -
8306 -/* Forces the palette to a specific value. If an application requests a
8307 - * different palette, it will be rejected. */
8308 -static int force_palette; /* = 0 */
8309 -
8310 -/* Set tuner type, if not autodetected */
8311 -static int tuner = -1;
8312 -
8313 -/* Allows proper exposure of objects that are illuminated from behind. Only
8314 - * affects OmniVision sensors. */
8315 -static int backlight; /* = 0 */
8316 -
8317 -/* If you change this, you must also change the MODULE_PARM definition */
8318 -#define OV511_MAX_UNIT_VIDEO 16
8319 +/**********************************************************************
8320 + * Module Parameters
8321 + * (See ov511.txt for detailed descriptions of these)
8322 + **********************************************************************/
8323  
8324 -/* Allows specified minor numbers to be forced. They will be assigned in the
8325 - * order that devices are detected. Note that you cannot specify 0 as a minor
8326 - * number. If you do not specify any, the next available one will be used. This
8327 - * requires kernel 2.4.5 or later. */
8328 +/* These variables (and all static globals) default to zero */
8329 +static int autobright          = 1;
8330 +static int autogain            = 1;
8331 +static int autoexp             = 1;
8332 +static int debug;
8333 +static int snapshot;
8334 +static int fix_rgb_offset;
8335 +static int force_rgb;
8336 +static int cams                        = 1;
8337 +static int compress;
8338 +static int testpat;
8339 +static int sensor_gbr;
8340 +static int dumppix;
8341 +static int led                         = 1;
8342 +static int dump_bridge;
8343 +static int dump_sensor;
8344 +static int printph;
8345 +static int phy                 = 0x1f;
8346 +static int phuv                        = 0x05;
8347 +static int pvy                 = 0x06;
8348 +static int pvuv                        = 0x06;
8349 +static int qhy                 = 0x14;
8350 +static int qhuv                        = 0x03;
8351 +static int qvy                 = 0x04;
8352 +static int qvuv                        = 0x04;
8353 +static int lightfreq;
8354 +static int bandingfilter;
8355 +static int clockdiv            = -1;
8356 +static int packetsize          = -1;
8357 +static int framedrop           = -1;
8358 +static int fastset;
8359 +static int force_palette;
8360 +static int backlight;
8361  static int unit_video[OV511_MAX_UNIT_VIDEO];
8362 -
8363 -/* Remove zero-padding from uncompressed incoming data. This will compensate for
8364 - * the blocks of corruption that appear when the camera cannot keep up with the
8365 - * speed of the USB bus (eg. at low frame resolutions) */
8366 -static int remove_zeros; /* = 0 */
8367 +static int remove_zeros;
8368 +static int mirror;
8369  
8370  MODULE_PARM(autobright, "i");
8371  MODULE_PARM_DESC(autobright, "Sensor automatically changes brightness");
8372 @@ -209,15 +132,13 @@
8373  MODULE_PARM(debug, "i");
8374  MODULE_PARM_DESC(debug,
8375    "Debug level: 0=none, 1=inits, 2=warning, 3=config, 4=functions, 5=max");
8376 +MODULE_PARM(snapshot, "i");
8377 +MODULE_PARM_DESC(snapshot, "Enable snapshot mode");
8378  MODULE_PARM(fix_rgb_offset, "i");
8379  MODULE_PARM_DESC(fix_rgb_offset,
8380    "Fix vertical misalignment of red and blue at 640x480");
8381 -MODULE_PARM(snapshot, "i");
8382 -MODULE_PARM_DESC(snapshot, "Enable snapshot mode");
8383  MODULE_PARM(force_rgb, "i");
8384  MODULE_PARM_DESC(force_rgb, "Read RGB instead of BGR");
8385 -MODULE_PARM(buf_timeout, "i");
8386 -MODULE_PARM_DESC(buf_timeout, "Number of seconds before buffer deallocation");
8387  MODULE_PARM(cams, "i");
8388  MODULE_PARM_DESC(cams, "Number of simultaneous cameras");
8389  MODULE_PARM(compress, "i");
8390 @@ -225,11 +146,6 @@
8391  MODULE_PARM(testpat, "i");
8392  MODULE_PARM_DESC(testpat,
8393    "Replace image with vertical bar testpattern (only partially working)");
8394 -
8395 -// Temporarily removed (needs to be rewritten for new format conversion code)
8396 -// MODULE_PARM(sensor_gbr, "i");
8397 -// MODULE_PARM_DESC(sensor_gbr, "Make sensor output GBR422 rather than YUV420");
8398 -
8399  MODULE_PARM(dumppix, "i");
8400  MODULE_PARM_DESC(dumppix, "Dump raw pixel data");
8401  MODULE_PARM(led, "i");
8402 @@ -273,21 +189,25 @@
8403  MODULE_PARM_DESC(fastset, "Allows picture settings to take effect immediately");
8404  MODULE_PARM(force_palette, "i");
8405  MODULE_PARM_DESC(force_palette, "Force the palette to a specific value");
8406 -MODULE_PARM(tuner, "i");
8407 -MODULE_PARM_DESC(tuner, "Set tuner type, if not autodetected");
8408  MODULE_PARM(backlight, "i");
8409  MODULE_PARM_DESC(backlight, "For objects that are lit from behind");
8410 -MODULE_PARM(unit_video, "0-16i");
8411 +MODULE_PARM(unit_video, "1-" __MODULE_STRING(OV511_MAX_UNIT_VIDEO) "i");
8412  MODULE_PARM_DESC(unit_video,
8413    "Force use of specific minor number(s). 0 is not allowed.");
8414  MODULE_PARM(remove_zeros, "i");
8415  MODULE_PARM_DESC(remove_zeros,
8416    "Remove zero-padding from uncompressed incoming data");
8417 +MODULE_PARM(mirror, "i");
8418 +MODULE_PARM_DESC(mirror, "Reverse image horizontally");
8419  
8420  MODULE_AUTHOR(DRIVER_AUTHOR);
8421  MODULE_DESCRIPTION(DRIVER_DESC);
8422  MODULE_LICENSE("GPL");
8423  
8424 +/**********************************************************************
8425 + * Miscellaneous Globals
8426 + **********************************************************************/
8427 +
8428  static struct usb_driver ov511_driver;
8429  
8430  static struct ov51x_decomp_ops *ov511_decomp_ops;
8431 @@ -302,20 +222,28 @@
8432  /* MMX support is present in kernel and CPU. Checked upon decomp module load. */
8433  static int ov51x_mmx_available;
8434  
8435 -/* Function prototypes */
8436 -static void ov51x_clear_snapshot(struct usb_ov511 *);
8437 -static int ov51x_check_snapshot(struct usb_ov511 *);
8438 -static inline int sensor_get_picture(struct usb_ov511 *, 
8439 -                                    struct video_picture *);
8440 -static int sensor_get_exposure(struct usb_ov511 *, unsigned char *);
8441 -static int ov51x_control_ioctl(struct inode *, struct file *, unsigned int,
8442 -                              unsigned long);
8443 +static __devinitdata struct usb_device_id device_table [] = {
8444 +       { USB_DEVICE(VEND_OMNIVISION, PROD_OV511) },
8445 +       { USB_DEVICE(VEND_OMNIVISION, PROD_OV511PLUS) },
8446 +       { USB_DEVICE(VEND_OMNIVISION, PROD_OV518) },
8447 +       { USB_DEVICE(VEND_OMNIVISION, PROD_OV518PLUS) },
8448 +       { USB_DEVICE(VEND_MATTEL, PROD_ME2CAM) },
8449 +       { }  /* Terminating entry */
8450 +};
8451 +
8452 +MODULE_DEVICE_TABLE (usb, device_table);
8453 +
8454 +static unsigned char yQuanTable511[] = OV511_YQUANTABLE;
8455 +static unsigned char uvQuanTable511[] = OV511_UVQUANTABLE;
8456 +static unsigned char yQuanTable518[] = OV518_YQUANTABLE;
8457 +static unsigned char uvQuanTable518[] = OV518_UVQUANTABLE;
8458  
8459  /**********************************************************************
8460 - * List of known OV511-based cameras
8461 + * Symbolic Names
8462   **********************************************************************/
8463  
8464 -static struct cam_list clist[] = {
8465 +/* Known OV511-based cameras */
8466 +static struct symbolic_list camlist[] = {
8467         {   0, "Generic Camera (no ID)" },
8468         {   1, "Mustek WCam 3X" },
8469         {   3, "D-Link DSB-C300" },
8470 @@ -323,11 +251,13 @@
8471         {   5, "Puretek PT-6007" },
8472         {   6, "Lifeview USB Life TV (NTSC)" },
8473         {  21, "Creative Labs WebCam 3" },
8474 +       {  22, "Lifeview USB Life TV (PAL D/K+B/G)" },
8475         {  36, "Koala-Cam" },
8476 -       {  38, "Lifeview USB Life TV" },
8477 +       {  38, "Lifeview USB Life TV (PAL)" },
8478         {  41, "Samsung Anycam MPC-M10" },
8479         {  43, "Mtekvision Zeca MV402" },
8480         {  46, "Suma eON" },
8481 +       {  70, "Lifeview USB Life TV (PAL/SECAM)" },
8482         { 100, "Lifeview RoboCam" },
8483         { 102, "AverMedia InterCam Elite" },
8484         { 112, "MediaForte MV300" },    /* or OV7110 evaluation kit */
8485 @@ -335,97 +265,90 @@
8486         {  -1, NULL }
8487  };
8488  
8489 -static __devinitdata struct usb_device_id device_table [] = {
8490 -       { USB_DEVICE(VEND_OMNIVISION, PROD_OV511) },
8491 -       { USB_DEVICE(VEND_OMNIVISION, PROD_OV511PLUS) },
8492 -       { USB_DEVICE(VEND_OMNIVISION, PROD_OV518) },
8493 -       { USB_DEVICE(VEND_OMNIVISION, PROD_OV518PLUS) },
8494 -       { USB_DEVICE(VEND_MATTEL, PROD_ME2CAM) },
8495 -       { }  /* Terminating entry */
8496 -};
8497 -
8498 -MODULE_DEVICE_TABLE (usb, device_table);
8499 -
8500 -#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
8501 -static struct palette_list plist[] = {
8502 +/* Video4Linux1 Palettes */
8503 +static struct symbolic_list v4l1_plist[] = {
8504         { VIDEO_PALETTE_GREY,   "GREY" },
8505 -       { VIDEO_PALETTE_HI240,  "HI240" },
8506 -       { VIDEO_PALETTE_RGB565, "RGB565" },
8507 +       { VIDEO_PALETTE_HI240,  "HI240" },
8508 +       { VIDEO_PALETTE_RGB565, "RGB565" },
8509         { VIDEO_PALETTE_RGB24,  "RGB24" },
8510         { VIDEO_PALETTE_RGB32,  "RGB32" },
8511 -       { VIDEO_PALETTE_RGB555, "RGB555" },
8512 -       { VIDEO_PALETTE_YUV422, "YUV422" },
8513 -       { VIDEO_PALETTE_YUYV,   "YUYV" },
8514 -       { VIDEO_PALETTE_UYVY,   "UYVY" },
8515 -       { VIDEO_PALETTE_YUV420, "YUV420" },
8516 -       { VIDEO_PALETTE_YUV411, "YUV411" },
8517 -       { VIDEO_PALETTE_RAW,    "RAW" },
8518 +       { VIDEO_PALETTE_RGB555, "RGB555" },
8519 +       { VIDEO_PALETTE_YUV422, "YUV422" },
8520 +       { VIDEO_PALETTE_YUYV,   "YUYV" },
8521 +       { VIDEO_PALETTE_UYVY,   "UYVY" },
8522 +       { VIDEO_PALETTE_YUV420, "YUV420" },
8523 +       { VIDEO_PALETTE_YUV411, "YUV411" },
8524 +       { VIDEO_PALETTE_RAW,    "RAW" },
8525         { VIDEO_PALETTE_YUV422P,"YUV422P" },
8526         { VIDEO_PALETTE_YUV411P,"YUV411P" },
8527         { VIDEO_PALETTE_YUV420P,"YUV420P" },
8528         { VIDEO_PALETTE_YUV410P,"YUV410P" },
8529         { -1, NULL }
8530  };
8531 -#endif
8532  
8533 -static unsigned char yQuanTable511[] = OV511_YQUANTABLE;
8534 -static unsigned char uvQuanTable511[] = OV511_UVQUANTABLE;
8535 -static unsigned char yQuanTable518[] = OV518_YQUANTABLE;
8536 -static unsigned char uvQuanTable518[] = OV518_UVQUANTABLE;
8537 +static struct symbolic_list brglist[] = {
8538 +       { BRG_OV511,            "OV511" },
8539 +       { BRG_OV511PLUS,        "OV511+" },
8540 +       { BRG_OV518,            "OV518" },
8541 +       { BRG_OV518PLUS,        "OV518+" },
8542 +       { -1, NULL }
8543 +};
8544 +
8545 +static struct symbolic_list senlist[] = {
8546 +       { SEN_OV76BE,   "OV76BE" },
8547 +       { SEN_OV7610,   "OV7610" },
8548 +       { SEN_OV7620,   "OV7620" },
8549 +       { SEN_OV7620AE, "OV7620AE" },
8550 +       { SEN_OV6620,   "OV6620" },
8551 +       { SEN_OV6630,   "OV6630" },
8552 +       { SEN_OV6630AE, "OV6630AE" },
8553 +       { SEN_OV6630AF, "OV6630AF" },
8554 +       { SEN_OV8600,   "OV8600" },
8555 +       { SEN_KS0127,   "KS0127" },
8556 +       { SEN_KS0127B,  "KS0127B" },
8557 +       { SEN_SAA7111A, "SAA7111A" },
8558 +       { -1, NULL }
8559 +};
8560 +
8561 +/* URB error codes: */
8562 +static struct symbolic_list urb_errlist[] = {
8563 +       { -ENOSR,       "Buffer error (overrun)" },
8564 +       { -EPIPE,       "Stalled (device not responding)" },
8565 +       { -EOVERFLOW,   "Babble (bad cable?)" },
8566 +       { -EPROTO,      "Bit-stuff error (bad cable?)" },
8567 +       { -EILSEQ,      "CRC/Timeout" },
8568 +       { -ETIMEDOUT,   "NAK (device does not respond)" },
8569 +       { -1, NULL }
8570 +};
8571  
8572  /**********************************************************************
8573 - *
8574 - * Memory management
8575 - *
8576 - * This is a shameless copy from the USB-cpia driver (linux kernel
8577 - * version 2.3.29 or so, I have no idea what this code actually does ;).
8578 - * Actually it seems to be a copy of a shameless copy of the bttv-driver.
8579 - * Or that is a copy of a shameless copy of ... (To the powers: is there
8580 - * no generic kernel-function to do this sort of stuff?)
8581 - *
8582 - * Yes, it was a shameless copy from the bttv-driver. IIRC, Alan says
8583 - * there will be one, but apparentely not yet -jerdfelt
8584 - *
8585 - * So I copied it again for the OV511 driver -claudio
8586 + * Prototypes
8587   **********************************************************************/
8588  
8589 -/* Given PGD from the address space's page table, return the kernel
8590 - * virtual mapping of the physical memory mapped at ADR.
8591 - */
8592 -static inline unsigned long 
8593 -uvirt_to_kva(pgd_t *pgd, unsigned long adr)
8594 -{
8595 -       unsigned long ret = 0UL;
8596 -       pmd_t *pmd;
8597 -       pte_t *ptep, pte;
8598 -
8599 -       if (!pgd_none(*pgd)) {
8600 -               pmd = pmd_offset(pgd, adr);
8601 -               if (!pmd_none(*pmd)) {
8602 -                       ptep = pte_offset(pmd, adr);
8603 -                       pte = *ptep;
8604 -                       if (pte_present(pte)) {
8605 -                               ret = (unsigned long) 
8606 -                                     page_address(pte_page(pte));
8607 -                               ret |= (adr & (PAGE_SIZE - 1));
8608 -                       }
8609 -               }
8610 -       }
8611 +static void ov51x_clear_snapshot(struct usb_ov511 *);
8612 +static inline int sensor_get_picture(struct usb_ov511 *,
8613 +                                    struct video_picture *);
8614 +#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
8615 +static int sensor_get_exposure(struct usb_ov511 *, unsigned char *);
8616 +static int ov51x_control_ioctl(struct inode *, struct file *, unsigned int,
8617 +                              unsigned long);
8618 +static int ov51x_check_snapshot(struct usb_ov511 *);
8619 +#endif
8620  
8621 -       return ret;
8622 -}
8623 +/**********************************************************************
8624 + * Memory management
8625 + **********************************************************************/
8626  
8627  /* Here we want the physical address of the memory.
8628 - * This is used when initializing the contents of the
8629 - * area and marking the pages as reserved.
8630 + * This is used when initializing the contents of the area.
8631   */
8632 -static inline unsigned long 
8633 +static inline unsigned long
8634  kvirt_to_pa(unsigned long adr)
8635  {
8636 -       unsigned long va, kva, ret;
8637 +       unsigned long kva, ret;
8638  
8639 -       va = VMALLOC_VMADDR(adr);
8640 -       kva = uvirt_to_kva(pgd_offset_k(va), va);
8641 +       kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
8642 +       kva |= adr & (PAGE_SIZE-1); /* restore the offset */
8643         ret = __pa(kva);
8644         return ret;
8645  }
8646 @@ -434,12 +357,9 @@
8647  rvmalloc(unsigned long size)
8648  {
8649         void *mem;
8650 -       unsigned long adr, page;
8651 -
8652 -       /* Round it off to PAGE_SIZE */
8653 -       size += (PAGE_SIZE - 1);
8654 -       size &= ~(PAGE_SIZE - 1);
8655 +       unsigned long adr;
8656  
8657 +       size = PAGE_ALIGN(size);
8658         mem = vmalloc_32(size);
8659         if (!mem)
8660                 return NULL;
8661 @@ -447,38 +367,27 @@
8662         memset(mem, 0, size); /* Clear the ram out, no junk to the user */
8663         adr = (unsigned long) mem;
8664         while (size > 0) {
8665 -               page = kvirt_to_pa(adr);
8666 -               mem_map_reserve(virt_to_page(__va(page)));
8667 +               mem_map_reserve(vmalloc_to_page((void *)adr));
8668                 adr += PAGE_SIZE;
8669 -               if (size > PAGE_SIZE)
8670 -                       size -= PAGE_SIZE;
8671 -               else
8672 -                       size = 0;
8673 +               size -= PAGE_SIZE;
8674         }
8675  
8676         return mem;
8677  }
8678  
8679 -static void 
8680 +static void
8681  rvfree(void *mem, unsigned long size)
8682  {
8683 -       unsigned long adr, page;
8684 +       unsigned long adr;
8685  
8686         if (!mem)
8687                 return;
8688  
8689 -       size += (PAGE_SIZE - 1);
8690 -       size &= ~(PAGE_SIZE - 1);
8691 -
8692 -       adr=(unsigned long) mem;
8693 -       while (size > 0) {
8694 -               page = kvirt_to_pa(adr);
8695 -               mem_map_unreserve(virt_to_page(__va(page)));
8696 +       adr = (unsigned long) mem;
8697 +       while ((long) size > 0) {
8698 +               mem_map_unreserve(vmalloc_to_page((void *)adr));
8699                 adr += PAGE_SIZE;
8700 -               if (size > PAGE_SIZE)
8701 -                       size -= PAGE_SIZE;
8702 -               else
8703 -                       size = 0;
8704 +               size -= PAGE_SIZE;
8705         }
8706         vfree(mem);
8707  }
8708 @@ -500,12 +409,12 @@
8709  #define YES_NO(x) ((x) ? "yes" : "no")
8710  
8711  /* /proc/video/ov511/<minor#>/info */
8712 -static int 
8713 +static int
8714  ov511_read_proc_info(char *page, char **start, off_t off, int count, int *eof,
8715                      void *data)
8716  {
8717         char *out = page;
8718 -       int i, j, len;
8719 +       int i, len;
8720         struct usb_ov511 *ov = data;
8721         struct video_picture p;
8722         unsigned char exp;
8723 @@ -521,8 +430,7 @@
8724  
8725         out += sprintf(out, "driver_version  : %s\n", DRIVER_VERSION);
8726         out += sprintf(out, "custom_id       : %d\n", ov->customid);
8727 -       out += sprintf(out, "model           : %s\n", ov->desc ?
8728 -                      clist[ov->desc].description : "unknown");
8729 +       out += sprintf(out, "model           : %s\n", ov->desc);
8730         out += sprintf(out, "streaming       : %s\n", YES_NO(ov->streaming));
8731         out += sprintf(out, "grabbing        : %s\n", YES_NO(ov->grabbing));
8732         out += sprintf(out, "compress        : %s\n", YES_NO(ov->compress));
8733 @@ -543,36 +451,16 @@
8734                                ov->frame[i].depth);
8735                 out += sprintf(out, "  size          : %d %d\n",
8736                                ov->frame[i].width, ov->frame[i].height);
8737 -               out += sprintf(out, "  format        : ");
8738 -               for (j = 0; plist[j].num >= 0; j++) {
8739 -                       if (plist[j].num == ov->frame[i].format) {
8740 -                               out += sprintf(out, "%s\n", plist[j].name);
8741 -                               break;
8742 -                       }
8743 -               }
8744 -               if (plist[j].num < 0)
8745 -                       out += sprintf(out, "unknown\n");
8746 +               out += sprintf(out, "  format        : %s\n",
8747 +                              symbolic(v4l1_plist, ov->frame[i].format));
8748                 out += sprintf(out, "  data_buffer   : 0x%p\n",
8749                                ov->frame[i].data);
8750         }
8751         out += sprintf(out, "snap_enabled    : %s\n", YES_NO(ov->snap_enabled));
8752         out += sprintf(out, "bridge          : %s\n",
8753 -                      ov->bridge == BRG_OV511 ? "OV511" :
8754 -                       ov->bridge == BRG_OV511PLUS ? "OV511+" :
8755 -                       ov->bridge == BRG_OV518 ? "OV518" :
8756 -                       ov->bridge == BRG_OV518PLUS ? "OV518+" :
8757 -                       "unknown");
8758 +                      symbolic(brglist, ov->bridge));
8759         out += sprintf(out, "sensor          : %s\n",
8760 -                      ov->sensor == SEN_OV6620 ? "OV6620" :
8761 -                       ov->sensor == SEN_OV6630 ? "OV6630" :
8762 -                       ov->sensor == SEN_OV7610 ? "OV7610" :
8763 -                       ov->sensor == SEN_OV7620 ? "OV7620" :
8764 -                       ov->sensor == SEN_OV7620AE ? "OV7620AE" :
8765 -                       ov->sensor == SEN_OV8600 ? "OV8600" :
8766 -                       ov->sensor == SEN_KS0127 ? "KS0127" :
8767 -                       ov->sensor == SEN_KS0127B ? "KS0127B" :
8768 -                       ov->sensor == SEN_SAA7111A ? "SAA7111A" :
8769 -                       "unknown");
8770 +                      symbolic(senlist, ov->sensor));
8771         out += sprintf(out, "packet_size     : %d\n", ov->packet_size);
8772         out += sprintf(out, "framebuffer     : 0x%p\n", ov->fbuf);
8773  
8774 @@ -595,13 +483,13 @@
8775   * When the camera's button is pressed, the output of this will change from a
8776   * 0 to a 1 (ASCII). It will retain this value until it is read, after which
8777   * it will reset to zero.
8778 - * 
8779 + *
8780   * SECURITY NOTE: Since reading this file can change the state of the snapshot
8781   * status, it is important for applications that open it to keep it locked
8782   * against access by other processes, using flock() or a similar mechanism. No
8783   * locking is provided by this driver.
8784   */
8785 -static int 
8786 +static int
8787  ov511_read_proc_button(char *page, char **start, off_t off, int count, int *eof,
8788                        void *data)
8789  {
8790 @@ -633,97 +521,95 @@
8791         return len;
8792  }
8793  
8794 -static void 
8795 -create_proc_ov511_cam(struct usb_ov511 *ov511)
8796 +static void
8797 +create_proc_ov511_cam(struct usb_ov511 *ov)
8798  {
8799         char dirname[10];
8800  
8801 -       if (!ov511_proc_entry || !ov511)
8802 +       if (!ov511_proc_entry || !ov)
8803                 return;
8804  
8805         /* Create per-device directory */
8806 -       snprintf(dirname, 10, "%d", ov511->vdev.minor);
8807 +       snprintf(dirname, 10, "%d", ov->vdev.minor);
8808         PDEBUG(4, "creating /proc/video/ov511/%s/", dirname);
8809 -       ov511->proc_devdir = create_proc_entry(dirname, S_IFDIR,
8810 -               ov511_proc_entry);
8811 -       if (!ov511->proc_devdir)
8812 +       ov->proc_devdir = create_proc_entry(dirname, S_IFDIR, ov511_proc_entry);
8813 +       if (!ov->proc_devdir)
8814                 return;
8815 -       ov511->proc_devdir->owner = THIS_MODULE;
8816 +       ov->proc_devdir->owner = THIS_MODULE;
8817  
8818         /* Create "info" entry (human readable device information) */
8819         PDEBUG(4, "creating /proc/video/ov511/%s/info", dirname);
8820 -       ov511->proc_info = create_proc_read_entry("info",
8821 -               S_IFREG|S_IRUGO|S_IWUSR, ov511->proc_devdir,
8822 -               ov511_read_proc_info, ov511);
8823 -       if (!ov511->proc_info)
8824 +       ov->proc_info = create_proc_read_entry("info", S_IFREG|S_IRUGO|S_IWUSR,
8825 +               ov->proc_devdir, ov511_read_proc_info, ov);
8826 +       if (!ov->proc_info)
8827                 return;
8828 -       ov511->proc_info->owner = THIS_MODULE;
8829 +       ov->proc_info->owner = THIS_MODULE;
8830  
8831         /* Don't create it if old snapshot mode on (would cause race cond.) */
8832         if (!snapshot) {
8833                 /* Create "button" entry (snapshot button status) */
8834                 PDEBUG(4, "creating /proc/video/ov511/%s/button", dirname);
8835 -               ov511->proc_button = create_proc_read_entry("button",
8836 -                       S_IFREG|S_IRUGO|S_IWUSR, ov511->proc_devdir,
8837 -                       ov511_read_proc_button, ov511);
8838 -               if (!ov511->proc_button)
8839 +               ov->proc_button = create_proc_read_entry("button",
8840 +                       S_IFREG|S_IRUGO|S_IWUSR, ov->proc_devdir,
8841 +                       ov511_read_proc_button, ov);
8842 +               if (!ov->proc_button)
8843                         return;
8844         }
8845 -       ov511->proc_button->owner = THIS_MODULE;
8846 +       ov->proc_button->owner = THIS_MODULE;
8847  
8848         /* Create "control" entry (ioctl() interface) */
8849         PDEBUG(4, "creating /proc/video/ov511/%s/control", dirname);
8850         lock_kernel();
8851 -       ov511->proc_control = create_proc_entry("control",
8852 -               S_IFREG|S_IRUGO|S_IWUSR, ov511->proc_devdir);
8853 -       if (!ov511->proc_control) {
8854 +       ov->proc_control = create_proc_entry("control", S_IFREG|S_IRUGO|S_IWUSR,
8855 +               ov->proc_devdir);
8856 +       if (!ov->proc_control) {
8857                 unlock_kernel();
8858                 return;
8859         }
8860 -       ov511->proc_control->owner = THIS_MODULE;
8861 -       ov511->proc_control->data = ov511;
8862 -       ov511->proc_control->proc_fops = &ov511_control_fops;
8863 +       ov->proc_control->owner = THIS_MODULE;
8864 +       ov->proc_control->data = ov;
8865 +       ov->proc_control->proc_fops = &ov511_control_fops;
8866         unlock_kernel();
8867  }
8868  
8869 -static void 
8870 -destroy_proc_ov511_cam(struct usb_ov511 *ov511)
8871 +static void
8872 +destroy_proc_ov511_cam(struct usb_ov511 *ov)
8873  {
8874         char dirname[10];
8875 -       
8876 -       if (!ov511 || !ov511->proc_devdir)
8877 +
8878 +       if (!ov || !ov->proc_devdir)
8879                 return;
8880  
8881 -       snprintf(dirname, 10, "%d", ov511->vdev.minor);
8882 +       snprintf(dirname, 10, "%d", ov->vdev.minor);
8883  
8884         /* Destroy "control" entry */
8885 -       if (ov511->proc_control) {
8886 +       if (ov->proc_control) {
8887                 PDEBUG(4, "destroying /proc/video/ov511/%s/control", dirname);
8888 -               remove_proc_entry("control", ov511->proc_devdir);
8889 -               ov511->proc_control = NULL;
8890 +               remove_proc_entry("control", ov->proc_devdir);
8891 +               ov->proc_control = NULL;
8892         }
8893  
8894         /* Destroy "button" entry */
8895 -       if (ov511->proc_button) {
8896 +       if (ov->proc_button) {
8897                 PDEBUG(4, "destroying /proc/video/ov511/%s/button", dirname);
8898 -               remove_proc_entry("button", ov511->proc_devdir);
8899 -               ov511->proc_button = NULL;
8900 +               remove_proc_entry("button", ov->proc_devdir);
8901 +               ov->proc_button = NULL;
8902         }
8903  
8904         /* Destroy "info" entry */
8905 -       if (ov511->proc_info) {
8906 +       if (ov->proc_info) {
8907                 PDEBUG(4, "destroying /proc/video/ov511/%s/info", dirname);
8908 -               remove_proc_entry("info", ov511->proc_devdir);
8909 -               ov511->proc_info = NULL;
8910 +               remove_proc_entry("info", ov->proc_devdir);
8911 +               ov->proc_info = NULL;
8912         }
8913  
8914         /* Destroy per-device directory */
8915         PDEBUG(4, "destroying /proc/video/ov511/%s/", dirname);
8916         remove_proc_entry(dirname, ov511_proc_entry);
8917 -       ov511->proc_devdir = NULL;
8918 +       ov->proc_devdir = NULL;
8919  }
8920  
8921 -static void 
8922 +static void
8923  proc_ov511_create(void)
8924  {
8925         /* No current standard here. Alan prefers /proc/video/ as it keeps
8926 @@ -744,7 +630,7 @@
8927                 err("Unable to create /proc/video/ov511");
8928  }
8929  
8930 -static void 
8931 +static void
8932  proc_ov511_destroy(void)
8933  {
8934         PDEBUG(3, "removing /proc/video/ov511");
8935 @@ -763,7 +649,7 @@
8936   **********************************************************************/
8937  
8938  /* Write an OV51x register */
8939 -static int 
8940 +static int
8941  reg_w(struct usb_ov511 *ov, unsigned char reg, unsigned char value)
8942  {
8943         int rc;
8944 @@ -774,20 +660,20 @@
8945         ov->cbuf[0] = value;
8946         rc = usb_control_msg(ov->dev,
8947                              usb_sndctrlpipe(ov->dev, 0),
8948 -                            2 /* REG_IO */,
8949 -                            USB_TYPE_CLASS | USB_RECIP_DEVICE,
8950 -                            0, (__u16)reg, &ov->cbuf[0], 1, HZ);       
8951 +                            (ov->bclass == BCL_OV518)?1:2 /* REG_IO */,
8952 +                            USB_TYPE_VENDOR | USB_RECIP_DEVICE,
8953 +                            0, (__u16)reg, &ov->cbuf[0], 1, HZ);
8954         up(&ov->cbuf_lock);
8955  
8956         if (rc < 0)
8957 -               err("reg write: error %d", rc);
8958 +               err("reg write: error %d: %s", rc, symbolic(urb_errlist, rc));
8959  
8960         return rc;
8961  }
8962  
8963  /* Read from an OV51x register */
8964  /* returns: negative is error, pos or zero is data */
8965 -static int 
8966 +static int
8967  reg_r(struct usb_ov511 *ov, unsigned char reg)
8968  {
8969         int rc;
8970 @@ -795,16 +681,16 @@
8971         down(&ov->cbuf_lock);
8972         rc = usb_control_msg(ov->dev,
8973                              usb_rcvctrlpipe(ov->dev, 0),
8974 -                            2 /* REG_IO */,
8975 -                            USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_DEVICE,
8976 +                            (ov->bclass == BCL_OV518)?1:3 /* REG_IO */,
8977 +                            USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
8978                              0, (__u16)reg, &ov->cbuf[0], 1, HZ);
8979 -                               
8980 -       PDEBUG(5, "0x%02X:0x%02X", reg, ov->cbuf[0]);
8981 -       
8982 -       if (rc < 0)
8983 -               err("reg read: error %d", rc);
8984 -       else
8985 -               rc = ov->cbuf[0];       
8986 +
8987 +       if (rc < 0) {
8988 +               err("reg read: error %d: %s", rc, symbolic(urb_errlist, rc));
8989 +       } else {
8990 +               rc = ov->cbuf[0];
8991 +               PDEBUG(5, "0x%02X:0x%02X", reg, ov->cbuf[0]);
8992 +       }
8993  
8994         up(&ov->cbuf_lock);
8995  
8996 @@ -814,10 +700,10 @@
8997  /*
8998   * Writes bits at positions specified by mask to an OV51x reg. Bits that are in
8999   * the same position as 1's in "mask" are cleared and set to "value". Bits
9000 - * that are in the same position as 0's in "mask" are preserved, regardless 
9001 + * that are in the same position as 0's in "mask" are preserved, regardless
9002   * of their respective state in "value".
9003   */
9004 -static int 
9005 +static int
9006  reg_w_mask(struct usb_ov511 *ov,
9007            unsigned char reg,
9008            unsigned char value,
9009 @@ -842,7 +728,7 @@
9010   * Writes multiple (n) byte value to a single register. Only valid with certain
9011   * registers (0x30 and 0xc4 - 0xce).
9012   */
9013 -static int 
9014 +static int
9015  ov518_reg_w32(struct usb_ov511 *ov, unsigned char reg, u32 val, int n)
9016  {
9017         int rc;
9018 @@ -855,18 +741,19 @@
9019  
9020         rc = usb_control_msg(ov->dev,
9021                              usb_sndctrlpipe(ov->dev, 0),
9022 -                            2 /* REG_IO */,
9023 -                            USB_TYPE_CLASS | USB_RECIP_DEVICE,
9024 +                            1 /* REG_IO */,
9025 +                            USB_TYPE_VENDOR | USB_RECIP_DEVICE,
9026                              0, (__u16)reg, ov->cbuf, n, HZ);
9027         up(&ov->cbuf_lock);
9028  
9029         if (rc < 0)
9030 -               err("reg write multiple: error %d", rc);
9031 +               err("reg write multiple: error %d: %s", rc,
9032 +                   symbolic(urb_errlist, rc));
9033  
9034         return rc;
9035  }
9036  
9037 -static int 
9038 +static int
9039  ov511_upload_quan_tables(struct usb_ov511 *ov)
9040  {
9041         unsigned char *pYTable = yQuanTable511;
9042 @@ -876,10 +763,8 @@
9043  
9044         PDEBUG(4, "Uploading quantization tables");
9045  
9046 -       for (i = 0; i < OV511_QUANTABLESIZE / 2; i++)
9047 -       {
9048 -               if (ENABLE_Y_QUANTABLE)
9049 -               {
9050 +       for (i = 0; i < OV511_QUANTABLESIZE / 2; i++) {
9051 +               if (ENABLE_Y_QUANTABLE) {
9052                         val0 = *pYTable++;
9053                         val1 = *pYTable++;
9054                         val0 &= 0x0f;
9055 @@ -890,8 +775,7 @@
9056                                 return rc;
9057                 }
9058  
9059 -               if (ENABLE_UV_QUANTABLE)
9060 -               {
9061 +               if (ENABLE_UV_QUANTABLE) {
9062                         val0 = *pUVTable++;
9063                         val1 = *pUVTable++;
9064                         val0 &= 0x0f;
9065 @@ -909,7 +793,7 @@
9066  }
9067  
9068  /* OV518 quantization tables are 8x4 (instead of 8x8) */
9069 -static int 
9070 +static int
9071  ov518_upload_quan_tables(struct usb_ov511 *ov)
9072  {
9073         unsigned char *pYTable = yQuanTable518;
9074 @@ -919,10 +803,8 @@
9075  
9076         PDEBUG(4, "Uploading quantization tables");
9077  
9078 -       for (i = 0; i < OV518_QUANTABLESIZE / 2; i++)
9079 -       {
9080 -               if (ENABLE_Y_QUANTABLE)
9081 -               {
9082 +       for (i = 0; i < OV518_QUANTABLESIZE / 2; i++) {
9083 +               if (ENABLE_Y_QUANTABLE) {
9084                         val0 = *pYTable++;
9085                         val1 = *pYTable++;
9086                         val0 &= 0x0f;
9087 @@ -933,8 +815,7 @@
9088                                 return rc;
9089                 }
9090  
9091 -               if (ENABLE_UV_QUANTABLE)
9092 -               {
9093 +               if (ENABLE_UV_QUANTABLE) {
9094                         val0 = *pUVTable++;
9095                         val1 = *pUVTable++;
9096                         val0 &= 0x0f;
9097 @@ -951,16 +832,16 @@
9098         return 0;
9099  }
9100  
9101 -static int 
9102 +static int
9103  ov51x_reset(struct usb_ov511 *ov, unsigned char reset_type)
9104  {
9105         int rc;
9106 -               
9107 +
9108         /* Setting bit 0 not allowed on 518/518Plus */
9109         if (ov->bclass == BCL_OV518)
9110                 reset_type &= 0xfe;
9111  
9112 -       PDEBUG(4, "Reset: type=0x%X", reset_type);
9113 +       PDEBUG(4, "Reset: type=0x%02X", reset_type);
9114  
9115         rc = reg_w(ov, R51x_SYS_RESET, reset_type);
9116         rc = reg_w(ov, R51x_SYS_RESET, 0);
9117 @@ -973,7 +854,7 @@
9118  
9119  /**********************************************************************
9120   *
9121 - * I2C (sensor) I/O
9122 + * Low-level I2C I/O functions
9123   *
9124   **********************************************************************/
9125  
9126 @@ -982,7 +863,7 @@
9127   * This is normally only called from i2c_w(). Note that this function
9128   * always succeeds regardless of whether the sensor is present and working.
9129   */
9130 -static int 
9131 +static int
9132  ov518_i2c_write_internal(struct usb_ov511 *ov,
9133                          unsigned char reg,
9134                          unsigned char value)
9135 @@ -993,25 +874,21 @@
9136  
9137         /* Select camera register */
9138         rc = reg_w(ov, R51x_I2C_SADDR_3, reg);
9139 -       if (rc < 0) goto error;
9140 +       if (rc < 0) return rc;
9141  
9142         /* Write "value" to I2C data port of OV511 */
9143         rc = reg_w(ov, R51x_I2C_DATA, value);
9144 -       if (rc < 0) goto error;
9145 +       if (rc < 0) return rc;
9146  
9147         /* Initiate 3-byte write cycle */
9148         rc = reg_w(ov, R518_I2C_CTL, 0x01);
9149 -       if (rc < 0) goto error;
9150 +       if (rc < 0) return rc;
9151  
9152         return 0;
9153 -
9154 -error:
9155 -       err("ov518 i2c write: error %d", rc);
9156 -       return rc;
9157  }
9158  
9159  /* NOTE: Do not call this function directly! */
9160 -static int 
9161 +static int
9162  ov511_i2c_write_internal(struct usb_ov511 *ov,
9163                          unsigned char reg,
9164                          unsigned char value)
9165 @@ -1024,38 +901,33 @@
9166         for (retries = OV511_I2C_RETRIES; ; ) {
9167                 /* Select camera register */
9168                 rc = reg_w(ov, R51x_I2C_SADDR_3, reg);
9169 -               if (rc < 0) goto error;
9170 +               if (rc < 0) return rc;
9171  
9172                 /* Write "value" to I2C data port of OV511 */
9173 -               rc = reg_w(ov, R51x_I2C_DATA, value);   
9174 -               if (rc < 0) goto error;
9175 +               rc = reg_w(ov, R51x_I2C_DATA, value);
9176 +               if (rc < 0) return rc;
9177  
9178                 /* Initiate 3-byte write cycle */
9179                 rc = reg_w(ov, R511_I2C_CTL, 0x01);
9180 -               if (rc < 0) goto error;
9181 +               if (rc < 0) return rc;
9182  
9183                 do rc = reg_r(ov, R511_I2C_CTL);
9184                 while (rc > 0 && ((rc&1) == 0)); /* Retry until idle */
9185 -               if (rc < 0) goto error;
9186 +               if (rc < 0) return rc;
9187  
9188                 if ((rc&2) == 0) /* Ack? */
9189                         break;
9190  #if 0
9191 -               /* I2C abort */ 
9192 +               /* I2C abort */
9193                 reg_w(ov, R511_I2C_CTL, 0x10);
9194  #endif
9195                 if (--retries < 0) {
9196                         err("i2c write retries exhausted");
9197 -                       rc = -1;
9198 -                       goto error;
9199 +                       return -1;
9200                 }
9201         }
9202  
9203         return 0;
9204 -
9205 -error:
9206 -       err("i2c write: error %d", rc);
9207 -       return rc;
9208  }
9209  
9210  /* NOTE: Do not call this function directly!
9211 @@ -1063,37 +935,33 @@
9212   * This is normally only called from i2c_r(). Note that this function
9213   * always succeeds regardless of whether the sensor is present and working.
9214   */
9215 -static int 
9216 +static int
9217  ov518_i2c_read_internal(struct usb_ov511 *ov, unsigned char reg)
9218  {
9219         int rc, value;
9220  
9221         /* Select camera register */
9222         rc = reg_w(ov, R51x_I2C_SADDR_2, reg);
9223 -       if (rc < 0) goto error;
9224 +       if (rc < 0) return rc;
9225  
9226         /* Initiate 2-byte write cycle */
9227         rc = reg_w(ov, R518_I2C_CTL, 0x03);
9228 -       if (rc < 0) goto error;
9229 +       if (rc < 0) return rc;
9230  
9231         /* Initiate 2-byte read cycle */
9232         rc = reg_w(ov, R518_I2C_CTL, 0x05);
9233 -       if (rc < 0) goto error;
9234 +       if (rc < 0) return rc;
9235  
9236         value = reg_r(ov, R51x_I2C_DATA);
9237  
9238         PDEBUG(5, "0x%02X:0x%02X", reg, value);
9239  
9240         return value;
9241 -
9242 -error:
9243 -       err("ov518 i2c read: error %d", rc);
9244 -       return rc;
9245  }
9246  
9247  /* NOTE: Do not call this function directly!
9248   * returns: negative is error, pos or zero is data */
9249 -static int 
9250 +static int
9251  ov511_i2c_read_internal(struct usb_ov511 *ov, unsigned char reg)
9252  {
9253         int rc, value, retries;
9254 @@ -1102,26 +970,25 @@
9255         for (retries = OV511_I2C_RETRIES; ; ) {
9256                 /* Select camera register */
9257                 rc = reg_w(ov, R51x_I2C_SADDR_2, reg);
9258 -               if (rc < 0) goto error;
9259 +               if (rc < 0) return rc;
9260  
9261                 /* Initiate 2-byte write cycle */
9262                 rc = reg_w(ov, R511_I2C_CTL, 0x03);
9263 -               if (rc < 0) goto error;
9264 +               if (rc < 0) return rc;
9265  
9266                 do rc = reg_r(ov, R511_I2C_CTL);
9267                 while (rc > 0 && ((rc&1) == 0)); /* Retry until idle */
9268 -               if (rc < 0) goto error;
9269 +               if (rc < 0) return rc;
9270  
9271                 if ((rc&2) == 0) /* Ack? */
9272                         break;
9273  
9274 -               /* I2C abort */ 
9275 +               /* I2C abort */
9276                 reg_w(ov, R511_I2C_CTL, 0x10);
9277  
9278                 if (--retries < 0) {
9279                         err("i2c write retries exhausted");
9280 -                       rc = -1;
9281 -                       goto error;
9282 +                       return -1;
9283                 }
9284         }
9285  
9286 @@ -1129,44 +996,39 @@
9287         for (retries = OV511_I2C_RETRIES; ; ) {
9288                 /* Initiate 2-byte read cycle */
9289                 rc = reg_w(ov, R511_I2C_CTL, 0x05);
9290 -               if (rc < 0) goto error;
9291 +               if (rc < 0) return rc;
9292  
9293                 do rc = reg_r(ov, R511_I2C_CTL);
9294                 while (rc > 0 && ((rc&1) == 0)); /* Retry until idle */
9295 -               if (rc < 0) goto error;
9296 +               if (rc < 0) return rc;
9297  
9298                 if ((rc&2) == 0) /* Ack? */
9299                         break;
9300  
9301 -               /* I2C abort */ 
9302 +               /* I2C abort */
9303                 rc = reg_w(ov, R511_I2C_CTL, 0x10);
9304 -               if (rc < 0) goto error;
9305 +               if (rc < 0) return rc;
9306  
9307                 if (--retries < 0) {
9308                         err("i2c read retries exhausted");
9309 -                       rc = -1;
9310 -                       goto error;
9311 +                       return -1;
9312                 }
9313         }
9314  
9315         value = reg_r(ov, R51x_I2C_DATA);
9316  
9317         PDEBUG(5, "0x%02X:0x%02X", reg, value);
9318 -               
9319 +
9320         /* This is needed to make i2c_w() work */
9321         rc = reg_w(ov, R511_I2C_CTL, 0x05);
9322         if (rc < 0)
9323 -               goto error;
9324 -       
9325 -       return value;
9326 +               return rc;
9327  
9328 -error:
9329 -       err("i2c read: error %d", rc);
9330 -       return rc;
9331 +       return value;
9332  }
9333  
9334  /* returns: negative is error, pos or zero is data */
9335 -static int 
9336 +static int
9337  i2c_r(struct usb_ov511 *ov, unsigned char reg)
9338  {
9339         int rc;
9340 @@ -1183,7 +1045,7 @@
9341         return rc;
9342  }
9343  
9344 -static int 
9345 +static int
9346  i2c_w(struct usb_ov511 *ov, unsigned char reg, unsigned char value)
9347  {
9348         int rc;
9349 @@ -1201,7 +1063,7 @@
9350  }
9351  
9352  /* Do not call this function directly! */
9353 -static int 
9354 +static int
9355  ov51x_i2c_write_mask_internal(struct usb_ov511 *ov,
9356                               unsigned char reg,
9357                               unsigned char value,
9358 @@ -1234,10 +1096,10 @@
9359  
9360  /* Writes bits at positions specified by mask to an I2C reg. Bits that are in
9361   * the same position as 1's in "mask" are cleared and set to "value". Bits
9362 - * that are in the same position as 0's in "mask" are preserved, regardless 
9363 + * that are in the same position as 0's in "mask" are preserved, regardless
9364   * of their respective state in "value".
9365   */
9366 -static int 
9367 +static int
9368  i2c_w_mask(struct usb_ov511 *ov,
9369            unsigned char reg,
9370            unsigned char value,
9371 @@ -1252,8 +1114,29 @@
9372         return rc;
9373  }
9374  
9375 +/* Set the read and write slave IDs. The "slave" argument is the write slave,
9376 + * and the read slave will be set to (slave + 1). ov->i2c_lock should be held
9377 + * when calling this. This should not be called from outside the i2c I/O
9378 + * functions.
9379 + */
9380 +static inline int
9381 +i2c_set_slave_internal(struct usb_ov511 *ov, unsigned char slave)
9382 +{
9383 +       int rc;
9384 +
9385 +       rc = reg_w(ov, R51x_I2C_W_SID, slave);
9386 +       if (rc < 0) return rc;
9387 +
9388 +       rc = reg_w(ov, R51x_I2C_R_SID, slave + 1);
9389 +       if (rc < 0) return rc;
9390 +
9391 +       return 0;
9392 +}
9393 +
9394 +#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
9395 +
9396  /* Write to a specific I2C slave ID and register, using the specified mask */
9397 -static int 
9398 +static int
9399  i2c_w_slave(struct usb_ov511 *ov,
9400             unsigned char slave,
9401             unsigned char reg,
9402 @@ -1265,38 +1148,22 @@
9403         down(&ov->i2c_lock);
9404  
9405         /* Set new slave IDs */
9406 -       if (reg_w(ov, R51x_I2C_W_SID, slave) < 0) {
9407 -               rc = -EIO;
9408 -               goto out;
9409 -       }
9410 -
9411 -       if (reg_w(ov, R51x_I2C_R_SID, slave + 1) < 0) {
9412 -               rc = -EIO;
9413 -               goto out;
9414 -       }
9415 +       rc = i2c_set_slave_internal(ov, slave);
9416 +       if (rc < 0) goto out;
9417  
9418         rc = ov51x_i2c_write_mask_internal(ov, reg, value, mask);
9419 -       /* Don't bail out yet if error; IDs must be restored */
9420  
9421 +out:
9422         /* Restore primary IDs */
9423 -       slave = ov->primary_i2c_slave;
9424 -       if (reg_w(ov, R51x_I2C_W_SID, slave) < 0) {
9425 -               rc = -EIO;
9426 -               goto out;
9427 -       }
9428 -
9429 -       if (reg_w(ov, R51x_I2C_R_SID, slave + 1) < 0) {
9430 -               rc = -EIO;
9431 -               goto out;
9432 -       }
9433 +       if (i2c_set_slave_internal(ov, ov->primary_i2c_slave) < 0)
9434 +               err("Couldn't restore primary I2C slave");
9435  
9436 -out:
9437         up(&ov->i2c_lock);
9438         return rc;
9439  }
9440  
9441  /* Read from a specific I2C slave ID and register */
9442 -static int 
9443 +static int
9444  i2c_r_slave(struct usb_ov511 *ov,
9445             unsigned char slave,
9446             unsigned char reg)
9447 @@ -1306,60 +1173,46 @@
9448         down(&ov->i2c_lock);
9449  
9450         /* Set new slave IDs */
9451 -       if (reg_w(ov, R51x_I2C_W_SID, slave) < 0) {
9452 -               rc = -EIO;
9453 -               goto out;
9454 -       }
9455 -
9456 -       if (reg_w(ov, R51x_I2C_R_SID, slave + 1) < 0) {
9457 -               rc = -EIO;
9458 -               goto out;
9459 -       }
9460 +       rc = i2c_set_slave_internal(ov, slave);
9461 +       if (rc < 0) goto out;
9462  
9463         if (ov->bclass == BCL_OV518)
9464                 rc = ov518_i2c_read_internal(ov, reg);
9465         else
9466                 rc = ov511_i2c_read_internal(ov, reg);
9467 -       /* Don't bail out yet if error; IDs must be restored */
9468  
9469 +out:
9470         /* Restore primary IDs */
9471 -       slave = ov->primary_i2c_slave;
9472 -       if (reg_w(ov, R51x_I2C_W_SID, slave) < 0) {
9473 -               rc = -EIO;
9474 -               goto out;
9475 -       }
9476 -
9477 -       if (reg_w(ov, R51x_I2C_R_SID, slave + 1) < 0) {
9478 -               rc = -EIO;
9479 -               goto out;
9480 -       }
9481 +       if (i2c_set_slave_internal(ov, ov->primary_i2c_slave) < 0)
9482 +               err("Couldn't restore primary I2C slave");
9483  
9484 -out:
9485         up(&ov->i2c_lock);
9486         return rc;
9487  }
9488  
9489 +#endif /* defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS) */
9490 +
9491  /* Sets I2C read and write slave IDs. Returns <0 for error */
9492 -static int 
9493 +static int
9494  ov51x_set_slave_ids(struct usb_ov511 *ov, unsigned char sid)
9495  {
9496 +       int rc;
9497 +
9498         down(&ov->i2c_lock);
9499  
9500 -       if (reg_w(ov, R51x_I2C_W_SID, sid) < 0)
9501 -               return -EIO;
9502 +       rc = i2c_set_slave_internal(ov, sid);
9503 +       if (rc < 0) goto out;
9504  
9505 -       if (reg_w(ov, R51x_I2C_R_SID, sid + 1) < 0)
9506 -               return -EIO;
9507 -
9508 -       if (ov51x_reset(ov, OV511_RESET_NOREGS) < 0)
9509 -               return -EIO;
9510 +       // FIXME: Is this actually necessary?
9511 +       rc = ov51x_reset(ov, OV511_RESET_NOREGS);
9512 +       if (rc < 0) goto out;
9513  
9514 +out:
9515         up(&ov->i2c_lock);
9516 -
9517 -       return 0;
9518 +       return rc;
9519  }
9520  
9521 -static int 
9522 +static int
9523  write_regvals(struct usb_ov511 *ov, struct ov511_regvals * pRegvals)
9524  {
9525         int rc;
9526 @@ -1367,26 +1220,21 @@
9527         while (pRegvals->bus != OV511_DONE_BUS) {
9528                 if (pRegvals->bus == OV511_REG_BUS) {
9529                         if ((rc = reg_w(ov, pRegvals->reg, pRegvals->val)) < 0)
9530 -                               goto error;
9531 +                               return rc;
9532                 } else if (pRegvals->bus == OV511_I2C_BUS) {
9533                         if ((rc = i2c_w(ov, pRegvals->reg, pRegvals->val)) < 0)
9534 -                               goto error;
9535 +                               return rc;
9536                 } else {
9537                         err("Bad regval array");
9538 -                       rc = -1;
9539 -                       goto error;
9540 +                       return -1;
9541                 }
9542                 pRegvals++;
9543         }
9544         return 0;
9545 -
9546 -error:
9547 -       err("write regvals: error %d", rc);
9548 -       return rc;
9549  }
9550  
9551 -#ifdef OV511_DEBUG 
9552 -static void 
9553 +#ifdef OV511_DEBUG
9554 +static void
9555  dump_i2c_range(struct usb_ov511 *ov, int reg1, int regn)
9556  {
9557         int i;
9558 @@ -1394,18 +1242,18 @@
9559  
9560         for (i = reg1; i <= regn; i++) {
9561                 rc = i2c_r(ov, i);
9562 -               info("OV7610[0x%X] = 0x%X", i, rc);
9563 +               info("Sensor[0x%02X] = 0x%02X", i, rc);
9564         }
9565  }
9566  
9567 -static void 
9568 +static void
9569  dump_i2c_regs(struct usb_ov511 *ov)
9570  {
9571         info("I2C REGS");
9572         dump_i2c_range(ov, 0x00, 0x7C);
9573  }
9574  
9575 -static void 
9576 +static void
9577  dump_reg_range(struct usb_ov511 *ov, int reg1, int regn)
9578  {
9579         int i;
9580 @@ -1413,12 +1261,12 @@
9581  
9582         for (i = reg1; i <= regn; i++) {
9583                 rc = reg_r(ov, i);
9584 -               info("OV511[0x%X] = 0x%X", i, rc);
9585 +               info("OV511[0x%02X] = 0x%02X", i, rc);
9586         }
9587  }
9588  
9589  /* FIXME: Should there be an OV518 version of this? */
9590 -static void 
9591 +static void
9592  ov511_dump_regs(struct usb_ov511 *ov)
9593  {
9594         info("CAMERA INTERFACE REGS");
9595 @@ -1445,43 +1293,29 @@
9596  }
9597  #endif
9598  
9599 -/**********************************************************************
9600 - *
9601 - * Kernel I2C Interface
9602 - *
9603 - **********************************************************************/
9604 -
9605 -/* For as-yet unimplemented I2C interface */
9606 -static void 
9607 -call_i2c_clients(struct usb_ov511 *ov, unsigned int cmd,
9608 -                void *arg)
9609 -{
9610 -       /* Do nothing */
9611 -}
9612 -
9613  /*****************************************************************************/
9614  
9615  /* Temporarily stops OV511 from functioning. Must do this before changing
9616   * registers while the camera is streaming */
9617 -static inline int 
9618 +static inline int
9619  ov51x_stop(struct usb_ov511 *ov)
9620  {
9621         PDEBUG(4, "stopping");
9622 -       ov->stopped = 1;        
9623 +       ov->stopped = 1;
9624         if (ov->bclass == BCL_OV518)
9625 -               return (reg_w(ov, R51x_SYS_RESET, 0x3a));
9626 +               return (reg_w_mask(ov, R51x_SYS_RESET, 0x3a, 0x3a));
9627         else
9628                 return (reg_w(ov, R51x_SYS_RESET, 0x3d));
9629  }
9630  
9631  /* Restarts OV511 after ov511_stop() is called. Has no effect if it is not
9632   * actually stopped (for performance). */
9633 -static inline int 
9634 +static inline int
9635  ov51x_restart(struct usb_ov511 *ov)
9636  {
9637         if (ov->stopped) {
9638                 PDEBUG(4, "restarting");
9639 -               ov->stopped = 0;        
9640 +               ov->stopped = 0;
9641  
9642                 /* Reinitialize the stream */
9643                 if (ov->bclass == BCL_OV518)
9644 @@ -1494,7 +1328,7 @@
9645  }
9646  
9647  /* Resets the hardware snapshot button */
9648 -static void 
9649 +static void
9650  ov51x_clear_snapshot(struct usb_ov511 *ov)
9651  {
9652         if (ov->bclass == BCL_OV511) {
9653 @@ -1506,12 +1340,12 @@
9654         } else {
9655                 err("clear snap: invalid bridge type");
9656         }
9657 -       
9658  }
9659  
9660 +#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
9661  /* Checks the status of the snapshot button. Returns 1 if it was pressed since
9662   * it was last cleared, and zero in all other cases (including errors) */
9663 -static int 
9664 +static int
9665  ov51x_check_snapshot(struct usb_ov511 *ov)
9666  {
9667         int ret, status = 0;
9668 @@ -1531,19 +1365,20 @@
9669  
9670         return status;
9671  }
9672 +#endif
9673  
9674  /* This does an initial reset of an OmniVision sensor and ensures that I2C
9675   * is synchronized. Returns <0 for failure.
9676   */
9677 -static int 
9678 +static int
9679  init_ov_sensor(struct usb_ov511 *ov)
9680  {
9681         int i, success;
9682  
9683 -       /* Reset the sensor */ 
9684 +       /* Reset the sensor */
9685         if (i2c_w(ov, 0x12, 0x80) < 0) return -EIO;
9686  
9687 -       /* Wait for it to initialize */ 
9688 +       /* Wait for it to initialize */
9689         schedule_timeout (1 + 150 * HZ / 1000);
9690  
9691         for (i = 0, success = 0; i < i2c_detect_tries && !success; i++) {
9692 @@ -1553,9 +1388,9 @@
9693                         continue;
9694                 }
9695  
9696 -               /* Reset the sensor */ 
9697 +               /* Reset the sensor */
9698                 if (i2c_w(ov, 0x12, 0x80) < 0) return -EIO;
9699 -               /* Wait for it to initialize */ 
9700 +               /* Wait for it to initialize */
9701                 schedule_timeout(1 + 150 * HZ / 1000);
9702                 /* Dummy read to sync I2C */
9703                 if (i2c_r(ov, 0x00) < 0) return -EIO;
9704 @@ -1563,14 +1398,14 @@
9705  
9706         if (!success)
9707                 return -EIO;
9708 -       
9709 +
9710         PDEBUG(1, "I2C synced in %d attempt(s)", i);
9711  
9712         return 0;
9713  }
9714  
9715 -static int 
9716 -ov51x_set_packet_size(struct usb_ov511 *ov, int size)
9717 +static int
9718 +ov511_set_packet_size(struct usb_ov511 *ov, int size)
9719  {
9720         int alt, mult;
9721  
9722 @@ -1602,7 +1437,44 @@
9723                         err("Set packet size: invalid size (%d)", size);
9724                         return -EINVAL;
9725                 }
9726 -       } else if (ov->bclass == BCL_OV518) {
9727 +       } else {
9728 +               err("Set packet size: Invalid bridge type");
9729 +               return -EINVAL;
9730 +       }
9731 +
9732 +       PDEBUG(3, "%d, mult=%d, alt=%d", size, mult, alt);
9733 +
9734 +       if (reg_w(ov, R51x_FIFO_PSIZE, mult) < 0)
9735 +               return -EIO;
9736 +
9737 +       if (usb_set_interface(ov->dev, ov->iface, alt) < 0) {
9738 +               err("Set packet size: set interface error");
9739 +               return -EBUSY;
9740 +       }
9741 +
9742 +       if (ov51x_reset(ov, OV511_RESET_NOREGS) < 0)
9743 +               return -EIO;
9744 +
9745 +       ov->packet_size = size;
9746 +
9747 +       if (ov51x_restart(ov) < 0)
9748 +               return -EIO;
9749 +
9750 +       return 0;
9751 +}
9752 +
9753 +/* Note: Unlike the OV511/OV511+, the size argument does NOT include the
9754 + * optional packet number byte. The actual size *is* stored in ov->packet_size,
9755 + * though. */
9756 +static int
9757 +ov518_set_packet_size(struct usb_ov511 *ov, int size)
9758 +{
9759 +       int alt;
9760 +
9761 +       if (ov51x_stop(ov) < 0)
9762 +               return -EIO;
9763 +
9764 +       if (ov->bclass == BCL_OV518) {
9765                 if (size == 0) alt = OV518_ALT_SIZE_0;
9766                 else if (size == 128) alt = OV518_ALT_SIZE_128;
9767                 else if (size == 256) alt = OV518_ALT_SIZE_256;
9768 @@ -1620,35 +1492,32 @@
9769                 return -EINVAL;
9770         }
9771  
9772 -       PDEBUG(3, "set packet size: %d, mult=%d, alt=%d", size, mult, alt);
9773 +       PDEBUG(3, "%d, alt=%d", size, alt);
9774  
9775 -       // FIXME: Don't know how to do this on OV518 yet
9776 -       if (ov->bclass == BCL_OV511) {
9777 -               if (reg_w(ov, R51x_FIFO_PSIZE,
9778 -                                   mult) < 0) {
9779 -                       return -EIO;
9780 -               }
9781 +       ov->packet_size = size;
9782 +       if (size > 0) {
9783 +               /* Program ISO FIFO size reg (packet number isn't included) */
9784 +               ov518_reg_w32(ov, 0x30, size, 2);
9785 +
9786 +               if (ov->packet_numbering)
9787 +                       ++ov->packet_size;
9788         }
9789 -       
9790 +
9791         if (usb_set_interface(ov->dev, ov->iface, alt) < 0) {
9792                 err("Set packet size: set interface error");
9793                 return -EBUSY;
9794         }
9795  
9796         /* Initialize the stream */
9797 -       if (ov->bclass == BCL_OV518)
9798 -               if (reg_w(ov, 0x2f, 0x80) < 0)
9799 -                       return -EIO;
9800 -
9801 -       // FIXME - Should we only reset the FIFO?
9802 -       if (ov51x_reset(ov, OV511_RESET_NOREGS) < 0)
9803 +       if (reg_w(ov, 0x2f, 0x80) < 0)
9804                 return -EIO;
9805  
9806 -       ov->packet_size = size;
9807 -
9808         if (ov51x_restart(ov) < 0)
9809                 return -EIO;
9810  
9811 +       if (ov51x_reset(ov, OV511_RESET_NOREGS) < 0)
9812 +               return -EIO;
9813 +
9814         return 0;
9815  }
9816  
9817 @@ -1659,7 +1528,6 @@
9818         int rc = 0;
9819  
9820         if (!ov->compress_inited) {
9821 -
9822                 reg_w(ov, 0x70, phy);
9823                 reg_w(ov, 0x71, phuv);
9824                 reg_w(ov, 0x72, pvy);
9825 @@ -1677,7 +1545,7 @@
9826         }
9827  
9828         ov->compress_inited = 1;
9829 -out:   
9830 +out:
9831         return rc;
9832  }
9833  
9834 @@ -1688,7 +1556,6 @@
9835         int rc = 0;
9836  
9837         if (!ov->compress_inited) {
9838 -
9839                 if (ov518_upload_quan_tables(ov) < 0) {
9840                         err("Error uploading quantization tables");
9841                         rc = -EIO;
9842 @@ -1697,7 +1564,7 @@
9843         }
9844  
9845         ov->compress_inited = 1;
9846 -out:   
9847 +out:
9848         return rc;
9849  }
9850  
9851 @@ -1718,13 +1585,19 @@
9852         switch (ov->sensor) {
9853         case SEN_OV7610:
9854         case SEN_OV6620:
9855 -       case SEN_OV6630:
9856         {
9857                 rc = i2c_w(ov, OV7610_REG_CNT, val >> 8);
9858                 if (rc < 0)
9859                         goto out;
9860                 break;
9861         }
9862 +       case SEN_OV6630:
9863 +       {
9864 +               rc = i2c_w_mask(ov, OV7610_REG_CNT, val >> 12, 0x0f);
9865 +               if (rc < 0)
9866 +                       goto out;
9867 +               break;
9868 +       }
9869         case SEN_OV7620:
9870         {
9871                 unsigned char ctab[] = {
9872 @@ -1771,13 +1644,19 @@
9873         switch (ov->sensor) {
9874         case SEN_OV7610:
9875         case SEN_OV6620:
9876 -       case SEN_OV6630:
9877                 rc = i2c_r(ov, OV7610_REG_CNT);
9878                 if (rc < 0)
9879                         return rc;
9880                 else
9881                         *val = rc << 8;
9882                 break;
9883 +       case SEN_OV6630:
9884 +               rc = i2c_r(ov, OV7610_REG_CNT);
9885 +               if (rc < 0)
9886 +                       return rc;
9887 +               else
9888 +                       *val = rc << 12;
9889 +               break;
9890         case SEN_OV7620:
9891                 /* Use Y gamma reg instead. Bit 0 is the enable bit. */
9892                 rc = i2c_r(ov, 0x64);
9893 @@ -1816,7 +1695,7 @@
9894  
9895         switch (ov->sensor) {
9896         case SEN_OV7610:
9897 -       case SEN_OV7620AE:
9898 +       case SEN_OV76BE:
9899         case SEN_OV6620:
9900         case SEN_OV6630:
9901                 rc = i2c_w(ov, OV7610_REG_BRT, val >> 8);
9902 @@ -1859,7 +1738,7 @@
9903  
9904         switch (ov->sensor) {
9905         case SEN_OV7610:
9906 -       case SEN_OV7620AE:
9907 +       case SEN_OV76BE:
9908         case SEN_OV7620:
9909         case SEN_OV6620:
9910         case SEN_OV6630:
9911 @@ -1899,7 +1778,7 @@
9912  
9913         switch (ov->sensor) {
9914         case SEN_OV7610:
9915 -       case SEN_OV7620AE:
9916 +       case SEN_OV76BE:
9917         case SEN_OV6620:
9918         case SEN_OV6630:
9919                 rc = i2c_w(ov, OV7610_REG_SAT, val >> 8);
9920 @@ -1943,7 +1822,7 @@
9921  
9922         switch (ov->sensor) {
9923         case SEN_OV7610:
9924 -       case SEN_OV7620AE:
9925 +       case SEN_OV76BE:
9926         case SEN_OV6620:
9927         case SEN_OV6630:
9928                 rc = i2c_r(ov, OV7610_REG_SAT);
9929 @@ -2142,6 +2021,7 @@
9930         return 0;
9931  }
9932  
9933 +#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
9934  // FIXME: Exposure range is only 0x00-0x7f in interlace mode
9935  /* Sets current exposure for sensor. This only has an effect if auto-exposure
9936   * is off */
9937 @@ -2161,7 +2041,7 @@
9938         case SEN_OV6630:
9939         case SEN_OV7610:
9940         case SEN_OV7620:
9941 -       case SEN_OV7620AE:
9942 +       case SEN_OV76BE:
9943         case SEN_OV8600:
9944                 rc = i2c_w(ov, 0x10, val);
9945                 if (rc < 0)
9946 @@ -2199,7 +2079,7 @@
9947         case SEN_OV6620:
9948         case SEN_OV6630:
9949         case SEN_OV7620:
9950 -       case SEN_OV7620AE:
9951 +       case SEN_OV76BE:
9952         case SEN_OV8600:
9953                 rc = i2c_r(ov, 0x10);
9954                 if (rc < 0)
9955 @@ -2223,9 +2103,10 @@
9956  
9957         return 0;
9958  }
9959 +#endif /* CONFIG_PROC_FS && CONFIG_VIDEO_PROC_FS */
9960  
9961  /* Turns on or off the LED. Only has an effect with OV511+/OV518(+) */
9962 -static inline void 
9963 +static inline void
9964  ov51x_led_control(struct usb_ov511 *ov, int enable)
9965  {
9966         PDEBUG(4, " (%s)", enable ? "turn on" : "turn off");
9967 @@ -2243,7 +2124,7 @@
9968   *     50 - 50Hz, for European and Asian lighting
9969   *     60 - 60Hz, for American lighting
9970   *
9971 - * Tested with: OV7610, OV7620, OV7620AE, OV6620
9972 + * Tested with: OV7610, OV7620, OV76BE, OV6620
9973   * Unsupported: KS0127, KS0127B, SAA7111A
9974   * Returns: 0 for success
9975   */
9976 @@ -2271,12 +2152,12 @@
9977                 i2c_w_mask(ov, 0x13, 0x00, 0x10);
9978                 break;
9979         case SEN_OV7620:
9980 -       case SEN_OV7620AE:
9981 +       case SEN_OV76BE:
9982         case SEN_OV8600:
9983                 i2c_w_mask(ov, 0x2a, sixty?0x00:0x80, 0x80);
9984                 i2c_w(ov, 0x2b, sixty?0x00:0xac);
9985                 i2c_w_mask(ov, 0x76, 0x01, 0x01);
9986 -               break;          
9987 +               break;
9988         case SEN_OV6620:
9989         case SEN_OV6630:
9990                 i2c_w(ov, 0x2b, sixty?0xa8:0x28);
9991 @@ -2302,7 +2183,7 @@
9992   * caused by some (usually fluorescent) lighting. The light frequency must be
9993   * set either before or after enabling it with ov51x_set_light_freq().
9994   *
9995 - * Tested with: OV7610, OV7620, OV7620AE, OV6620.
9996 + * Tested with: OV7610, OV7620, OV76BE, OV6620.
9997   * Unsupported: KS0127, KS0127B, SAA7111A
9998   * Returns: 0 for success
9999   */
10000 @@ -2364,7 +2245,7 @@
10001   */
10002  static inline int
10003  sensor_set_auto_exposure(struct usb_ov511 *ov, int enable)
10004 -{      
10005 +{
10006         PDEBUG(4, " (%s)", enable ? "turn on" : "turn off");
10007  
10008         switch (ov->sensor) {
10009 @@ -2373,10 +2254,10 @@
10010                 break;
10011         case SEN_OV6620:
10012         case SEN_OV7620:
10013 -       case SEN_OV7620AE:
10014 +       case SEN_OV76BE:
10015         case SEN_OV8600:
10016                 i2c_w_mask(ov, 0x13, enable?0x01:0x00, 0x01);
10017 -               break;          
10018 +               break;
10019         case SEN_OV6630:
10020                 i2c_w_mask(ov, 0x28, enable?0x00:0x10, 0x10);
10021                 break;
10022 @@ -2399,13 +2280,12 @@
10023   * that are illuminated from behind.
10024   *
10025   * Tested with: OV6620, OV7620
10026 - * Unsupported: OV7610, OV7620AE, KS0127, KS0127B, SAA7111A
10027 + * Unsupported: OV7610, OV76BE, KS0127, KS0127B, SAA7111A
10028   * Returns: 0 for success
10029   */
10030  static int
10031  sensor_set_backlight(struct usb_ov511 *ov, int enable)
10032  {
10033 -
10034         PDEBUG(4, " (%s)", enable ? "turn on" : "turn off");
10035  
10036         switch (ov->sensor) {
10037 @@ -2414,7 +2294,7 @@
10038                 i2c_w_mask(ov, 0x68, enable?0xe0:0xc0, 0xe0);
10039                 i2c_w_mask(ov, 0x29, enable?0x08:0x00, 0x08);
10040                 i2c_w_mask(ov, 0x28, enable?0x02:0x00, 0x02);
10041 -               break;          
10042 +               break;
10043         case SEN_OV6620:
10044                 i2c_w_mask(ov, 0x4e, enable?0xe0:0xc0, 0xe0);
10045                 i2c_w_mask(ov, 0x29, enable?0x08:0x00, 0x08);
10046 @@ -2426,7 +2306,7 @@
10047                 i2c_w_mask(ov, 0x28, enable?0x02:0x00, 0x02);
10048                 break;
10049         case SEN_OV7610:
10050 -       case SEN_OV7620AE:
10051 +       case SEN_OV76BE:
10052         case SEN_KS0127:
10053         case SEN_KS0127B:
10054         case SEN_SAA7111A:
10055 @@ -2442,27 +2322,56 @@
10056         return 0;
10057  }
10058  
10059 +static inline int
10060 +sensor_set_mirror(struct usb_ov511 *ov, int enable)
10061 +{
10062 +       PDEBUG(4, " (%s)", enable ? "turn on" : "turn off");
10063 +
10064 +       switch (ov->sensor) {
10065 +       case SEN_OV6620:
10066 +       case SEN_OV6630:
10067 +       case SEN_OV7610:
10068 +       case SEN_OV7620:
10069 +       case SEN_OV76BE:
10070 +       case SEN_OV8600:
10071 +               i2c_w_mask(ov, 0x12, enable?0x40:0x00, 0x40);
10072 +               break;
10073 +       case SEN_KS0127:
10074 +       case SEN_KS0127B:
10075 +       case SEN_SAA7111A:
10076 +               PDEBUG(5, "Unsupported with this sensor");
10077 +               return -EPERM;
10078 +       default:
10079 +               err("Sensor not supported for set_mirror");
10080 +               return -EINVAL;
10081 +       }
10082 +
10083 +       ov->mirror = enable;
10084 +
10085 +       return 0;
10086 +}
10087 +
10088  /* Returns number of bits per pixel (regardless of where they are located;
10089   * planar or not), or zero for unsupported format.
10090   */
10091 -static inline int 
10092 +static inline int
10093  get_depth(int palette)
10094  {
10095         switch (palette) {
10096         case VIDEO_PALETTE_GREY:    return 8;
10097 +       case VIDEO_PALETTE_YUV420:  return 12;
10098 +       case VIDEO_PALETTE_YUV420P: return 12; /* Planar */
10099         case VIDEO_PALETTE_RGB565:  return 16;
10100 -       case VIDEO_PALETTE_RGB24:   return 24;  
10101 +       case VIDEO_PALETTE_RGB24:   return 24;
10102         case VIDEO_PALETTE_YUV422:  return 16;
10103         case VIDEO_PALETTE_YUYV:    return 16;
10104 -       case VIDEO_PALETTE_YUV420:  return 12;
10105         case VIDEO_PALETTE_YUV422P: return 16; /* Planar */
10106 -       case VIDEO_PALETTE_YUV420P: return 12; /* Planar */
10107         default:                    return 0;  /* Invalid format */
10108         }
10109  }
10110  
10111  /* Bytes per frame. Used by read(). Return of 0 indicates error */
10112 -static inline long int 
10113 +static inline long int
10114  get_frame_length(struct ov511_frame *frame)
10115  {
10116         if (!frame)
10117 @@ -2502,7 +2411,7 @@
10118                 i2c_w_mask(ov, 0x67, qvga?0xf0:0x90, 0xf0);
10119                 i2c_w_mask(ov, 0x74, qvga?0x20:0x00, 0x20);
10120                 break;
10121 -       case SEN_OV7620AE:
10122 +       case SEN_OV76BE:
10123  //             i2c_w(ov, 0x2b, 0x00);
10124                 i2c_w(ov, 0x14, qvga?0xa4:0x84);
10125  // FIXME: Enable this once 7620AE uses 7620 initial settings
10126 @@ -2528,13 +2437,13 @@
10127         /******** Palette-specific regs ********/
10128  
10129         if (mode == VIDEO_PALETTE_GREY) {
10130 -               if (ov->sensor == SEN_OV7610 || ov->sensor == SEN_OV7620AE) {
10131 +               if (ov->sensor == SEN_OV7610 || ov->sensor == SEN_OV76BE) {
10132                         /* these aren't valid on the OV6620/OV7620/6630? */
10133                         i2c_w_mask(ov, 0x0e, 0x40, 0x40);
10134                 }
10135                 i2c_w_mask(ov, 0x13, 0x20, 0x20);
10136         } else {
10137 -               if (ov->sensor == SEN_OV7610 || ov->sensor == SEN_OV7620AE) {
10138 +               if (ov->sensor == SEN_OV7610 || ov->sensor == SEN_OV76BE) {
10139                         /* not valid on the OV6620/OV7620/6630? */
10140                         i2c_w_mask(ov, 0x0e, 0x00, 0x40);
10141                 }
10142 @@ -2596,8 +2505,7 @@
10143         if (framedrop >= 0)
10144                 i2c_w(ov, 0x16, framedrop);
10145  
10146 -       /* We only have code to convert GBR -> RGB24 */
10147 -       if ((mode == VIDEO_PALETTE_RGB24) && sensor_gbr)
10148 +       if (sensor_gbr)
10149                 i2c_w_mask(ov, 0x12, 0x08, 0x08);
10150         else
10151                 i2c_w_mask(ov, 0x12, 0x00, 0x08);
10152 @@ -2614,7 +2522,7 @@
10153         // This will go away as soon as ov51x_mode_init_sensor_regs()
10154         // is fully tested.
10155         /* 7620/6620/6630? don't have register 0x35, so play it safe */
10156 -       if (ov->sensor == SEN_OV7610 || ov->sensor == SEN_OV7620AE) {
10157 +       if (ov->sensor == SEN_OV7610 || ov->sensor == SEN_OV76BE) {
10158                 if (width == 640 && height == 480)
10159                         i2c_w(ov, 0x35, 0x9e);
10160                 else
10161 @@ -2636,13 +2544,13 @@
10162          * IF YOU SET IT WRONG, YOU WILL GET ALL ZERO ISOC DATA FROM OV51x!!! */
10163         switch (ov->sensor) {
10164         case SEN_OV7610:
10165 -       case SEN_OV7620AE:
10166 +       case SEN_OV76BE:
10167                 hwsbase = 0x38;
10168                 hwebase = 0x3a;
10169                 vwsbase = vwebase = 0x05;
10170                 break;
10171         case SEN_OV6620:
10172 -       case SEN_OV6630:        // FIXME: Is this right?
10173 +       case SEN_OV6630:
10174                 hwsbase = 0x38;
10175                 hwebase = 0x3a;
10176                 vwsbase = 0x05;
10177 @@ -2659,7 +2567,9 @@
10178         }
10179  
10180         if (ov->sensor == SEN_OV6620 || ov->sensor == SEN_OV6630) {
10181 -               if (width > 176 && height > 144) {  /* CIF */
10182 +               /* Note: OV518(+) does downsample on its own) */
10183 +               if ((width > 176 && height > 144)
10184 +                   || ov->bclass == BCL_OV518) {  /* CIF */
10185                         ret = mode_init_ov_sensor_regs(ov, width, height,
10186                                 mode, sub_flag, 0);
10187                         if (ret < 0)
10188 @@ -2736,7 +2646,7 @@
10189  ov511_mode_init_regs(struct usb_ov511 *ov,
10190                      int width, int height, int mode, int sub_flag)
10191  {
10192 -       int lncnt, pxcnt, rc = 0;
10193 +       int hsegs, vsegs;
10194  
10195         if (sub_flag) {
10196                 width = ov->subw;
10197 @@ -2752,11 +2662,11 @@
10198                 if (width == 320 && height == 240) {
10199                         /* No need to do anything special */
10200                 } else if (width == 640 && height == 480) {
10201 -                       /* Set the OV511 up as 320x480, but keep the V4L
10202 -                        * resolution as 640x480 */
10203 +                       /* Set the OV511 up as 320x480, but keep the
10204 +                        * V4L resolution as 640x480 */
10205                         width = 320;
10206                 } else {
10207 -                       err("SAA7111A only supports 320x240 or 640x480");
10208 +                       err("SAA7111A only allows 320x240 or 640x480");
10209                         return -EINVAL;
10210                 }
10211         }
10212 @@ -2788,11 +2698,11 @@
10213         /* Here I'm assuming that snapshot size == image size.
10214          * I hope that's always true. --claudio
10215          */
10216 -       pxcnt = (width >> 3) - 1;
10217 -       lncnt = (height >> 3) - 1;
10218 +       hsegs = (width >> 3) - 1;
10219 +       vsegs = (height >> 3) - 1;
10220  
10221 -       reg_w(ov, R511_CAM_PXCNT, pxcnt);
10222 -       reg_w(ov, R511_CAM_LNCNT, lncnt);
10223 +       reg_w(ov, R511_CAM_PXCNT, hsegs);
10224 +       reg_w(ov, R511_CAM_LNCNT, vsegs);
10225         reg_w(ov, R511_CAM_PXDIV, 0x00);
10226         reg_w(ov, R511_CAM_LNDIV, 0x00);
10227  
10228 @@ -2800,8 +2710,8 @@
10229         reg_w(ov, R511_CAM_OPTS, 0x03);
10230  
10231         /* Snapshot additions */
10232 -       reg_w(ov, R511_SNAP_PXCNT, pxcnt);
10233 -       reg_w(ov, R511_SNAP_LNCNT, lncnt);
10234 +       reg_w(ov, R511_SNAP_PXCNT, hsegs);
10235 +       reg_w(ov, R511_SNAP_LNCNT, vsegs);
10236         reg_w(ov, R511_SNAP_PXDIV, 0x00);
10237         reg_w(ov, R511_SNAP_LNDIV, 0x00);
10238  
10239 @@ -2811,27 +2721,17 @@
10240                 reg_w(ov, R511_COMP_LUT_EN, 0x03);
10241                 ov51x_reset(ov, OV511_RESET_OMNICE);
10242         }
10243 -//out:
10244 +
10245         if (ov51x_restart(ov) < 0)
10246                 return -EIO;
10247  
10248 -       return rc;
10249 +       return 0;
10250  }
10251  
10252 -static struct mode_list_518 mlist518[] = {
10253 -       /* W    H   reg28 reg29 reg2a reg2c reg2e reg24 reg25 */
10254 -       { 352, 288, 0x00, 0x16, 0x48, 0x00, 0x00, 0x9f, 0x90 },
10255 -       { 320, 240, 0x00, 0x14, 0x3c, 0x10, 0x18, 0x9f, 0x90 },
10256 -       { 176, 144, 0x05, 0x0b, 0x24, 0x00, 0x00, 0xff, 0xf0 },
10257 -       { 160, 120, 0x05, 0x0a, 0x1e, 0x08, 0x0c, 0xff, 0xf0 },
10258 -       { 0, 0 }
10259 -};
10260 -
10261  /* Sets up the OV518/OV518+ with the given image parameters
10262   *
10263   * OV518 needs a completely different approach, until we can figure out what
10264 - * the individual registers do. Many register ops are commented out until we
10265 - * can find out if they are still valid. Also, only 15 FPS is supported now.
10266 + * the individual registers do. Also, only 15 FPS is supported now.
10267   *
10268   * Do not put any sensor-specific code in here (including I2C I/O functions)
10269   */
10270 @@ -2839,112 +2739,110 @@
10271  ov518_mode_init_regs(struct usb_ov511 *ov,
10272                      int width, int height, int mode, int sub_flag)
10273  {
10274 -       int i;
10275 +       int hsegs, vsegs, hi_res;
10276 +
10277 +       if (sub_flag) {
10278 +               width = ov->subw;
10279 +               height = ov->subh;
10280 +       }
10281  
10282         PDEBUG(3, "width:%d, height:%d, mode:%d, sub:%d",
10283                width, height, mode, sub_flag);
10284  
10285 +       if (width % 16 || height % 8) {
10286 +               err("Invalid size (%d, %d)", width, height);
10287 +               return -EINVAL;
10288 +       }
10289 +
10290 +       if (width < ov->minwidth || height < ov->minheight) {
10291 +               err("Requested dimensions are too small");
10292 +               return -EINVAL;
10293 +       }
10294 +
10295 +       if (width >= 320 && height >= 240) {
10296 +               hi_res = 1;
10297 +       } else if (width >= 320 || height >= 240) {
10298 +               err("Invalid width/height combination (%d, %d)", width, height);
10299 +               return -EINVAL;
10300 +       } else {
10301 +               hi_res = 0;
10302 +       }
10303 +
10304         if (ov51x_stop(ov) < 0)
10305                 return -EIO;
10306  
10307 -       for (i = 0; mlist518[i].width; i++) {
10308 -//             int lncnt, pxcnt;
10309 +       /******** Set the mode ********/
10310  
10311 -               if (width != mlist518[i].width || height != mlist518[i].height)
10312 -                       continue;
10313 +       reg_w(ov, 0x2b, 0);
10314 +       reg_w(ov, 0x2c, 0);
10315 +       reg_w(ov, 0x2d, 0);
10316 +       reg_w(ov, 0x2e, 0);
10317 +       reg_w(ov, 0x3b, 0);
10318 +       reg_w(ov, 0x3c, 0);
10319 +       reg_w(ov, 0x3d, 0);
10320 +       reg_w(ov, 0x3e, 0);
10321  
10322 -// FIXME: Subcapture won't be possible until we know what the registers do
10323 -// FIXME: We can't handle anything but YUV420 so far
10324 +       reg_w(ov, 0x28, (mode == VIDEO_PALETTE_GREY) ? 0x00:0x80);
10325 +       reg_w(ov, 0x38, (mode == VIDEO_PALETTE_GREY) ? 0x00:0x80);
10326  
10327 -//             /* Here I'm assuming that snapshot size == image size.
10328 -//              * I hope that's always true. --claudio
10329 -//              */
10330 -//             pxcnt = sub_flag ? (ov511->subw >> 3) - 1 : mlist[i].pxcnt;
10331 -//             lncnt = sub_flag ? (ov511->subh >> 3) - 1 : mlist[i].lncnt;
10332 -//
10333 -//             reg_w(ov511, 0x12, pxcnt);
10334 -//             reg_w(ov511, 0x13, lncnt);
10335 -
10336 -               /******** Set the mode ********/                
10337 -
10338 -               /* Mode independent regs */
10339 -               reg_w(ov, 0x2b, 0x00);
10340 -               reg_w(ov, 0x2d, 0x00);
10341 -               reg_w(ov, 0x3b, 0x00);
10342 -               reg_w(ov, 0x3d, 0x00);
10343 -
10344 -               /* Mode dependent regs. Regs 38 - 3e are always the same as
10345 -                * regs 28 - 2e */
10346 -               reg_w_mask(ov, 0x28, mlist518[i].reg28
10347 -                       | (mode == VIDEO_PALETTE_GREY) ? 0x80:0x00, 0x8f);
10348 -               reg_w(ov, 0x29, mlist518[i].reg29);
10349 -               reg_w(ov, 0x2a, mlist518[i].reg2a);
10350 -               reg_w(ov, 0x2c, mlist518[i].reg2c);
10351 -               reg_w(ov, 0x2e, mlist518[i].reg2e);
10352 -               reg_w_mask(ov, 0x38, mlist518[i].reg28 
10353 -                       | (mode == VIDEO_PALETTE_GREY) ? 0x80:0x00, 0x8f);
10354 -               reg_w(ov, 0x39, mlist518[i].reg29);
10355 -               reg_w(ov, 0x3a, mlist518[i].reg2a);
10356 -               reg_w(ov, 0x3c, mlist518[i].reg2c);
10357 -               reg_w(ov, 0x3e, mlist518[i].reg2e);
10358 -               reg_w(ov, 0x24, mlist518[i].reg24);
10359 -               reg_w(ov, 0x25, mlist518[i].reg25);
10360 -
10361 -               /* Windows driver does this here; who knows why */
10362 -               reg_w(ov, 0x2f, 0x80);
10363 -
10364 -               /******** Set the framerate (to 15 FPS) ********/               
10365 -
10366 -               /* Mode independent, but framerate dependent, regs */
10367 -               /* These are for 15 FPS only */
10368 -               reg_w(ov, 0x51, 0x08);
10369 -               reg_w(ov, 0x22, 0x18);
10370 -               reg_w(ov, 0x23, 0xff);
10371 -               reg_w(ov, 0x71, 0x19);  /* Compression-related? */
10372 -
10373 -               // FIXME: Sensor-specific
10374 -               /* Bit 5 is what matters here. Of course, it is "reserved" */
10375 -               i2c_w(ov, 0x54, 0x23);
10376 -
10377 -               reg_w(ov, 0x2f, 0x80);
10378 -
10379 -               /* Mode dependent regs */
10380 -               if ((width == 352 && height == 288) ||
10381 -                   (width == 320 && height == 240)) {
10382 -                       /*  640 (280h) byte iso packets */
10383 -                       ov518_reg_w32(ov, 0x30,    640, 2);     /* 280h   */
10384 -                       ov518_reg_w32(ov, 0xc4,    400, 2);     /* 190h   */
10385 -                       ov518_reg_w32(ov, 0xc6,    500, 2);     /* 1f4h   */
10386 -                       ov518_reg_w32(ov, 0xc7,    500, 2);     /* 1f4h   */
10387 -                       ov518_reg_w32(ov, 0xc8,    142, 2);     /* 8eh    */
10388 -                       ov518_reg_w32(ov, 0xca, 131098, 3);     /* 2001ah */
10389 -                       ov518_reg_w32(ov, 0xcb,    532, 2);     /* 214h   */
10390 -                       ov518_reg_w32(ov, 0xcc,   2000, 2);     /* 7d0h   */
10391 -                       ov518_reg_w32(ov, 0xcd,     32, 2);     /* 20h    */
10392 -                       ov518_reg_w32(ov, 0xce,    608, 2);     /* 260h   */
10393 -               } else if ((width == 176 && height == 144) ||
10394 -                          (width == 160 && height == 120)) {
10395 -                       /*  384 (180h) byte iso packets */
10396 -                       ov518_reg_w32(ov, 0x30,    384, 2);     /* 180h   */
10397 -                       ov518_reg_w32(ov, 0xc4,    200, 2);     /* c8h    */
10398 -                       ov518_reg_w32(ov, 0xc6,    320, 2);     /* 140h   */
10399 -                       ov518_reg_w32(ov, 0xc7,    320, 2);     /* 140h   */
10400 -                       ov518_reg_w32(ov, 0xc8,     96, 2);     /* 60h    */
10401 -                       ov518_reg_w32(ov, 0xca,  78607, 3);     /* 1330fh */
10402 -                       ov518_reg_w32(ov, 0xcb,    320, 2);     /* 140h   */
10403 -                       ov518_reg_w32(ov, 0xcc,   1260, 2);     /* 4ech   */
10404 -                       ov518_reg_w32(ov, 0xcd,     19, 2);     /* 13h    */
10405 -                       ov518_reg_w32(ov, 0xce,    365, 2);     /* 16dh   */
10406 -               } else {
10407 -                       /* Can't happen, since we already handled this case */
10408 -                       err("ov518_mode_init_regs(): **** logic error ****");
10409 -               }
10410 +       hsegs = width / 16;
10411 +       vsegs = height / 4;
10412  
10413 -               reg_w(ov, 0x2f, 0x80);
10414 +       reg_w(ov, 0x29, hsegs);
10415 +       reg_w(ov, 0x2a, vsegs);
10416  
10417 -               break;
10418 +       reg_w(ov, 0x39, hsegs);
10419 +       reg_w(ov, 0x3a, vsegs);
10420 +
10421 +       /* Windows driver does this here; who knows why */
10422 +       reg_w(ov, 0x2f, 0x80);
10423 +
10424 +       /******** Set the framerate (to 15 FPS) ********/
10425 +
10426 +       /* Mode independent, but framerate dependent, regs */
10427 +       reg_w(ov, 0x51, 0x02);  /* Clock divider; lower==faster */
10428 +       reg_w(ov, 0x22, 0x18);
10429 +       reg_w(ov, 0x23, 0xff);
10430 +
10431 +       if (ov->bridge == BRG_OV518PLUS)
10432 +               reg_w(ov, 0x21, 0x19);
10433 +       else
10434 +               reg_w(ov, 0x71, 0x19);  /* Compression-related? */
10435 +
10436 +       // FIXME: Sensor-specific
10437 +       /* Bit 5 is what matters here. Of course, it is "reserved" */
10438 +       i2c_w(ov, 0x54, 0x23);
10439 +
10440 +       reg_w(ov, 0x2f, 0x80);
10441 +
10442 +       if (ov->bridge == BRG_OV518PLUS) {
10443 +               reg_w(ov, 0x24, 0x94);
10444 +               reg_w(ov, 0x25, 0x90);
10445 +               ov518_reg_w32(ov, 0xc4,    400, 2);     /* 190h   */
10446 +               ov518_reg_w32(ov, 0xc6,    540, 2);     /* 21ch   */
10447 +               ov518_reg_w32(ov, 0xc7,    540, 2);     /* 21ch   */
10448 +               ov518_reg_w32(ov, 0xc8,    108, 2);     /* 6ch    */
10449 +               ov518_reg_w32(ov, 0xca, 131098, 3);     /* 2001ah */
10450 +               ov518_reg_w32(ov, 0xcb,    532, 2);     /* 214h   */
10451 +               ov518_reg_w32(ov, 0xcc,   2400, 2);     /* 960h   */
10452 +               ov518_reg_w32(ov, 0xcd,     32, 2);     /* 20h    */
10453 +               ov518_reg_w32(ov, 0xce,    608, 2);     /* 260h   */
10454 +       } else {
10455 +               reg_w(ov, 0x24, 0x9f);
10456 +               reg_w(ov, 0x25, 0x90);
10457 +               ov518_reg_w32(ov, 0xc4,    400, 2);     /* 190h   */
10458 +               ov518_reg_w32(ov, 0xc6,    500, 2);     /* 1f4h   */
10459 +               ov518_reg_w32(ov, 0xc7,    500, 2);     /* 1f4h   */
10460 +               ov518_reg_w32(ov, 0xc8,    142, 2);     /* 8eh    */
10461 +               ov518_reg_w32(ov, 0xca, 131098, 3);     /* 2001ah */
10462 +               ov518_reg_w32(ov, 0xcb,    532, 2);     /* 214h   */
10463 +               ov518_reg_w32(ov, 0xcc,   2000, 2);     /* 7d0h   */
10464 +               ov518_reg_w32(ov, 0xcd,     32, 2);     /* 20h    */
10465 +               ov518_reg_w32(ov, 0xce,    608, 2);     /* 260h   */
10466         }
10467  
10468 +       reg_w(ov, 0x2f, 0x80);
10469 +
10470         if (ov51x_restart(ov) < 0)
10471                 return -EIO;
10472  
10473 @@ -2952,11 +2850,6 @@
10474         if (ov51x_reset(ov, OV511_RESET_NOREGS) < 0)
10475                 return -EIO;
10476  
10477 -       if (mlist518[i].width == 0) {
10478 -               err("Unknown mode (%d, %d): %d", width, height, mode);
10479 -               return -EINVAL;
10480 -       }
10481 -
10482         return 0;
10483  }
10484  
10485 @@ -2982,7 +2875,7 @@
10486         switch (ov->sensor) {
10487         case SEN_OV7610:
10488         case SEN_OV7620:
10489 -       case SEN_OV7620AE:
10490 +       case SEN_OV76BE:
10491         case SEN_OV8600:
10492         case SEN_OV6620:
10493         case SEN_OV6630:
10494 @@ -2994,10 +2887,10 @@
10495                 rc = -EINVAL;
10496                 break;
10497         case SEN_SAA7111A:
10498 -//             rc = mode_init_saa_sensor_regs(ov, width, height, mode, 
10499 +//             rc = mode_init_saa_sensor_regs(ov, width, height, mode,
10500  //                                            sub_flag);
10501  
10502 -               PDEBUG(1, "SAA status = 0X%x", i2c_r(ov, 0x1f));
10503 +               PDEBUG(1, "SAA status = 0x%02X", i2c_r(ov, 0x1f));
10504                 break;
10505         default:
10506                 err("Unknown sensor");
10507 @@ -3030,19 +2923,21 @@
10508         if (FATAL_ERROR(rc))
10509                 return rc;
10510  
10511 +       rc = sensor_set_mirror(ov, ov->mirror);
10512 +       if (FATAL_ERROR(rc))
10513 +               return rc;
10514 +
10515         return 0;
10516  }
10517  
10518 -/* This sets the default image parameters (Size = max, RGB24). This is
10519 - * useful for apps that use read() and do not set these.
10520 +/* This sets the default image parameters. This is useful for apps that use
10521 + * read() and do not set these.
10522   */
10523 -static int 
10524 +static int
10525  ov51x_set_default_params(struct usb_ov511 *ov)
10526  {
10527         int i;
10528  
10529 -       PDEBUG(3, "%dx%d, RGB24", ov->maxwidth, ov->maxheight);
10530 -
10531         /* Set default sizes in case IOCTL (VIDIOCMCAPTURE) is not used
10532          * (using read() instead). */
10533         for (i = 0; i < OV511_NUMFRAMES; i++) {
10534 @@ -3053,10 +2948,14 @@
10535                         ov->frame[i].format = force_palette;
10536                 else
10537                         ov->frame[i].format = VIDEO_PALETTE_RGB24;
10538 +
10539                 ov->frame[i].depth = get_depth(ov->frame[i].format);
10540         }
10541  
10542 -       /* Initialize to max width/height, RGB24 */
10543 +       PDEBUG(3, "%dx%d, %s", ov->maxwidth, ov->maxheight,
10544 +              symbolic(v4l1_plist, ov->frame[0].format));
10545 +
10546 +       /* Initialize to max width/height, YUV420 or RGB24 (if supported) */
10547         if (mode_init_regs(ov, ov->maxwidth, ov->maxheight,
10548                            ov->frame[0].format, 0) < 0)
10549                 return -EINVAL;
10550 @@ -3071,7 +2970,7 @@
10551   **********************************************************************/
10552  
10553  /* Set analog input port of decoder */
10554 -static int 
10555 +static int
10556  decoder_set_input(struct usb_ov511 *ov, int input)
10557  {
10558         PDEBUG(4, "port %d", input);
10559 @@ -3093,7 +2992,7 @@
10560  }
10561  
10562  /* Get ASCII name of video input */
10563 -static int 
10564 +static int
10565  decoder_get_input_name(struct usb_ov511 *ov, int input, char *name)
10566  {
10567         switch (ov->sensor) {
10568 @@ -3105,7 +3004,6 @@
10569                         sprintf(name, "CVBS-%d", input);
10570                 else // if (input < 8)
10571                         sprintf(name, "S-Video-%d", input - 4);
10572 -
10573                 break;
10574         }
10575         default:
10576 @@ -3116,7 +3014,7 @@
10577  }
10578  
10579  /* Set norm (NTSC, PAL, SECAM, AUTO) */
10580 -static int 
10581 +static int
10582  decoder_set_norm(struct usb_ov511 *ov, int norm)
10583  {
10584         PDEBUG(4, "%d", norm);
10585 @@ -3131,7 +3029,7 @@
10586                         reg_e = 0x00;   /* NTSC M / PAL BGHI */
10587                 } else if (norm == VIDEO_MODE_PAL) {
10588                         reg_8 = 0x00;   /* 50 Hz */
10589 -                       reg_e = 0x00;   /* NTSC M / PAL BGHI */ 
10590 +                       reg_e = 0x00;   /* NTSC M / PAL BGHI */
10591                 } else if (norm == VIDEO_MODE_AUTO) {
10592                         reg_8 = 0x80;   /* Auto field detect */
10593                         reg_e = 0x00;   /* NTSC M / PAL BGHI */
10594 @@ -3153,7 +3051,6 @@
10595         return 0;
10596  }
10597  
10598 -
10599  /**********************************************************************
10600   *
10601   * Color correction functions
10602 @@ -3176,21 +3073,21 @@
10603   * coefficients are scaled into 16.16 fixed-point integers.
10604   * They were determined as follows:
10605   *
10606 - *     double brightness = 1.0;  (0->black; 1->full scale) 
10607 + *     double brightness = 1.0;  (0->black; 1->full scale)
10608   *     double saturation = 1.0;  (0->greyscale; 1->full color)
10609   *     double fixScale = brightness * 256 * 256;
10610   *     int rvScale = (int)(1.402 * saturation * fixScale);
10611   *     int guScale = (int)(-0.344136 * saturation * fixScale);
10612   *     int gvScale = (int)(-0.714136 * saturation * fixScale);
10613   *     int buScale = (int)(1.772 * saturation * fixScale);
10614 - *     int yScale = (int)(fixScale);   
10615 + *     int yScale = (int)(fixScale);
10616   */
10617  
10618  /* LIMIT: convert a 16.16 fixed-point value to a byte, with clipping. */
10619  #define LIMIT(x) ((x)>0xffffff?0xff: ((x)<=0xffff?0:((x)>>16)))
10620  
10621  static inline void
10622 -move_420_block(int yTL, int yTR, int yBL, int yBR, int u, int v, 
10623 +move_420_block(int yTL, int yTR, int yBL, int yBR, int u, int v,
10624                int rowPixels, unsigned char * rgb, int bits)
10625  {
10626         const int rvScale = 91881;
10627 @@ -3229,14 +3126,14 @@
10628                 rgb[5] = LIMIT(r+yBR);
10629         } else if (bits == 16) {
10630                 /* Write out top two pixels */
10631 -               rgb[0] = ((LIMIT(b+yTL) >> 3) & 0x1F) 
10632 +               rgb[0] = ((LIMIT(b+yTL) >> 3) & 0x1F)
10633                         | ((LIMIT(g+yTL) << 3) & 0xE0);
10634                 rgb[1] = ((LIMIT(g+yTL) >> 5) & 0x07)
10635                         | (LIMIT(r+yTL) & 0xF8);
10636  
10637 -               rgb[2] = ((LIMIT(b+yTR) >> 3) & 0x1F) 
10638 +               rgb[2] = ((LIMIT(b+yTR) >> 3) & 0x1F)
10639                         | ((LIMIT(g+yTR) << 3) & 0xE0);
10640 -               rgb[3] = ((LIMIT(g+yTR) >> 5) & 0x07) 
10641 +               rgb[3] = ((LIMIT(g+yTR) >> 5) & 0x07)
10642                         | (LIMIT(r+yTR) & 0xF8);
10643  
10644                 /* Skip down to next line to write out bottom two pixels */
10645 @@ -3263,7 +3160,7 @@
10646  /* Copies a 64-byte segment at pIn to an 8x8 block at pOut. The width of the
10647   * image at pOut is specified by w.
10648   */
10649 -static inline void 
10650 +static inline void
10651  make_8x8(unsigned char *pIn, unsigned char *pOut, int w)
10652  {
10653         unsigned char *pOut1 = pOut;
10654 @@ -3276,7 +3173,6 @@
10655                 }
10656                 pOut += w;
10657         }
10658 -               
10659  }
10660  
10661  /*
10662 @@ -3394,7 +3290,7 @@
10663   * low, and the blue channel about 1 pixel high. After YUV->RGB
10664   * conversion, we can correct this easily. OSL 2/24/2000.
10665   */
10666 -static void 
10667 +static void
10668  fixFrameRGBoffset(struct ov511_frame *frame)
10669  {
10670         int x, y;
10671 @@ -3403,7 +3299,7 @@
10672         const int shift = 1;  /* Distance to shift pixels by, vertically */
10673  
10674         /* Don't bother with little images */
10675 -       if (frame->width < 400) 
10676 +       if (frame->width < 400)
10677                 return;
10678  
10679         /* This only works with RGB24 */
10680 @@ -3437,7 +3333,7 @@
10681   * accordingly. Returns -ENXIO if decompressor is not available, otherwise
10682   * returns 0 if no other error.
10683   */
10684 -static int 
10685 +static int
10686  request_decompressor(struct usb_ov511 *ov)
10687  {
10688         if (!ov)
10689 @@ -3476,24 +3372,24 @@
10690         }
10691  
10692         if (ov->decomp_ops) {
10693 -               if (!ov->decomp_ops->decomp_lock) {
10694 +               if (!ov->decomp_ops->owner) {
10695                         ov->decomp_ops = NULL;
10696                         unlock_kernel();
10697                         return -ENOSYS;
10698                 }
10699 -               ov->decomp_ops->decomp_lock();
10700 +               __MOD_INC_USE_COUNT(ov->decomp_ops->owner);
10701                 unlock_kernel();
10702                 return 0;
10703         } else {
10704                 unlock_kernel();
10705 -               return -ENXIO;
10706 +               return -ENOSYS;
10707         }
10708  }
10709  
10710  /* Unlocks decompression module and nulls ov->decomp_ops. Safe to call even
10711   * if ov->decomp_ops is NULL.
10712   */
10713 -static void 
10714 +static void
10715  release_decompressor(struct usb_ov511 *ov)
10716  {
10717         int released = 0;       /* Did we actually do anything? */
10718 @@ -3503,20 +3399,20 @@
10719  
10720         lock_kernel();
10721  
10722 -       if (ov->decomp_ops && ov->decomp_ops->decomp_unlock) {
10723 -               ov->decomp_ops->decomp_unlock();
10724 +       if (ov->decomp_ops && ov->decomp_ops->owner) {
10725 +               __MOD_DEC_USE_COUNT(ov->decomp_ops->owner);
10726                 released = 1;
10727         }
10728  
10729         ov->decomp_ops = NULL;
10730 -       
10731 +
10732         unlock_kernel();
10733  
10734         if (released)
10735                 PDEBUG(3, "Decompressor released");
10736  }
10737  
10738 -static void 
10739 +static void
10740  decompress(struct usb_ov511 *ov, struct ov511_frame *frame,
10741            unsigned char *pIn0, unsigned char *pOut0)
10742  {
10743 @@ -3526,19 +3422,22 @@
10744  
10745         PDEBUG(4, "Decompressing %d bytes", frame->bytes_recvd);
10746  
10747 -       if (frame->format == VIDEO_PALETTE_GREY 
10748 +       if (frame->format == VIDEO_PALETTE_GREY
10749             && ov->decomp_ops->decomp_400) {
10750                 int ret = ov->decomp_ops->decomp_400(
10751                         pIn0,
10752                         pOut0,
10753 +                       frame->compbuf,
10754                         frame->rawwidth,
10755                         frame->rawheight,
10756                         frame->bytes_recvd);
10757                 PDEBUG(4, "DEBUG: decomp_400 returned %d", ret);
10758 -       } else if (ov->decomp_ops->decomp_420) {
10759 +       } else if (frame->format != VIDEO_PALETTE_GREY
10760 +                  && ov->decomp_ops->decomp_420) {
10761                 int ret = ov->decomp_ops->decomp_420(
10762                         pIn0,
10763                         pOut0,
10764 +                       frame->compbuf,
10765                         frame->rawwidth,
10766                         frame->rawheight,
10767                         frame->bytes_recvd);
10768 @@ -3555,7 +3454,7 @@
10769   **********************************************************************/
10770  
10771  /* Converts from planar YUV420 to RGB24. */
10772 -static void 
10773 +static void
10774  yuv420p_to_rgb(struct ov511_frame *frame,
10775                unsigned char *pIn0, unsigned char *pOut0, int bits)
10776  {
10777 @@ -3578,10 +3477,9 @@
10778  
10779                         move_420_block(y00, y01, y10, y11, u, v,
10780                                        frame->width, pOut, bits);
10781 -       
10782 +
10783                         pY += 2;
10784                         pOut += 2 * bytes;
10785 -
10786                 }
10787                 pY += frame->width;
10788                 pOut += frame->width * bytes;
10789 @@ -3610,7 +3508,7 @@
10790                 for (i = 0; i <= frame->width - 2; i += 2) {
10791                         int u = *pU++;
10792                         int v = *pV++;
10793 -                       
10794 +
10795                         *pOut = u;
10796                         *(pOut+2) = v;
10797                         *(pOut+frame->width*2) = u;
10798 @@ -3725,27 +3623,11 @@
10799         }
10800  }
10801  
10802 -/* Post-processes the specified frame. This consists of:
10803 - *     1. Decompress frame, if necessary
10804 - *     2. Deinterlace frame and scale to proper size, if necessary
10805 - *     3. Convert from YUV planar to destination format, if necessary
10806 - *     4. Fix the RGB offset, if necessary
10807 - */
10808 -static void 
10809 -ov51x_postprocess(struct usb_ov511 *ov, struct ov511_frame *frame)
10810 +static void
10811 +ov51x_postprocess_grey(struct usb_ov511 *ov, struct ov511_frame *frame)
10812  {
10813 -       if (dumppix) {
10814 -               memset(frame->data, 0, 
10815 -                       MAX_DATA_SIZE(ov->maxwidth, ov->maxheight));
10816 -               PDEBUG(4, "Dumping %d bytes", frame->bytes_recvd);
10817 -               memmove(frame->data, frame->rawdata, frame->bytes_recvd);
10818 -               return;
10819 -       }
10820 -
10821 -       /* YUV400 must be handled separately */
10822 -       if (frame->format == VIDEO_PALETTE_GREY) {
10823                 /* Deinterlace frame, if necessary */
10824 -               if (ov->sensor == SEN_SAA7111A && frame->rawheight == 480) {
10825 +               if (ov->sensor == SEN_SAA7111A && frame->rawheight >= 480) {
10826                         if (frame->compressed)
10827                                 decompress(ov, frame, frame->rawdata,
10828                                                  frame->tempdata);
10829 @@ -3763,19 +3645,23 @@
10830                                 yuv400raw_to_yuv400p(frame, frame->rawdata,
10831                                                      frame->data);
10832                 }
10833 +}
10834  
10835 -               return;
10836 -       }
10837 -
10838 -       /* Process frame->data to frame->rawdata */
10839 +/* Process raw YUV420 data into the format requested by the app. Conversion
10840 + * between V4L formats is allowed.
10841 + */
10842 +static void
10843 +ov51x_postprocess_yuv420(struct usb_ov511 *ov, struct ov511_frame *frame)
10844 +{
10845 +       /* Process frame->rawdata to frame->tempdata */
10846         if (frame->compressed)
10847                 decompress(ov, frame, frame->rawdata, frame->tempdata);
10848         else
10849                 yuv420raw_to_yuv420p(frame, frame->rawdata, frame->tempdata);
10850  
10851         /* Deinterlace frame, if necessary */
10852 -       if (ov->sensor == SEN_SAA7111A && frame->rawheight == 480) {
10853 -               memmove(frame->rawdata, frame->tempdata,
10854 +       if (ov->sensor == SEN_SAA7111A && frame->rawheight >= 480) {
10855 +               memcpy(frame->rawdata, frame->tempdata,
10856                         MAX_RAW_DATA_SIZE(frame->width, frame->height));
10857                 deinterlace(frame, RAWFMT_YUV420, frame->rawdata,
10858                             frame->tempdata);
10859 @@ -3784,11 +3670,6 @@
10860         /* Frame should be (width x height) and not (rawwidth x rawheight) at
10861           * this point. */
10862  
10863 -#if 0
10864 -       /* Clear output buffer for testing purposes */
10865 -       memset(frame->data, 0, MAX_DATA_SIZE(frame->width, frame->height));
10866 -#endif
10867 -
10868         /* Process frame->tempdata to frame->data */
10869         switch (frame->format) {
10870         case VIDEO_PALETTE_RGB565:
10871 @@ -3803,348 +3684,124 @@
10872                 break;
10873         case VIDEO_PALETTE_YUV420:
10874         case VIDEO_PALETTE_YUV420P:
10875 -               memmove(frame->data, frame->tempdata,
10876 +               memcpy(frame->data, frame->tempdata,
10877                         MAX_RAW_DATA_SIZE(frame->width, frame->height));
10878                 break;
10879         case VIDEO_PALETTE_YUV422P:
10880                 /* Data is converted in place, so copy it in advance */
10881 -               memmove(frame->data, frame->tempdata,
10882 +               memcpy(frame->data, frame->tempdata,
10883                         MAX_RAW_DATA_SIZE(frame->width, frame->height));
10884  
10885                 yuv420p_to_yuv422p(frame, frame->data);
10886                 break;
10887         default:
10888 -               err("Cannot convert data to this format");
10889 +               err("Cannot convert YUV420 to %s",
10890 +                   symbolic(v4l1_plist, frame->format));
10891         }
10892  
10893         if (fix_rgb_offset)
10894                 fixFrameRGBoffset(frame);
10895  }
10896  
10897 -/**********************************************************************
10898 - *
10899 - * OV51x data transfer, IRQ handler
10900 - *
10901 - **********************************************************************/
10902 -
10903 -static int 
10904 -ov511_move_data(struct usb_ov511 *ov, struct urb *urb)
10905 +/* Post-processes the specified frame. This consists of:
10906 + *     1. Decompress frame, if necessary
10907 + *     2. Deinterlace frame and scale to proper size, if necessary
10908 + *     3. Convert from YUV planar to destination format, if necessary
10909 + *     4. Fix the RGB offset, if necessary
10910 + */
10911 +static void
10912 +ov51x_postprocess(struct usb_ov511 *ov, struct ov511_frame *frame)
10913  {
10914 -       unsigned char *cdata;
10915 -       int data_size, num, offset, i, totlen = 0;
10916 -       int aPackNum[FRAMES_PER_DESC];
10917 -       struct ov511_frame *frame;
10918 -       struct timeval *ts;
10919 -
10920 -       PDEBUG(5, "Moving %d packets", urb->number_of_packets);
10921 -
10922 -       data_size = ov->packet_size - 1;
10923 -
10924 -       for (i = 0; i < urb->number_of_packets; i++) {
10925 -               int n = urb->iso_frame_desc[i].actual_length;
10926 -               int st = urb->iso_frame_desc[i].status;
10927 -
10928 -               urb->iso_frame_desc[i].actual_length = 0;
10929 -               urb->iso_frame_desc[i].status = 0;
10930 -
10931 -               cdata = urb->transfer_buffer + urb->iso_frame_desc[i].offset;
10932 -
10933 -               aPackNum[i] = n ? cdata[ov->packet_size - 1] : -1;
10934 -
10935 -               if (!n || ov->curframe == -1)
10936 -                       continue;
10937 -
10938 -               if (st)
10939 -                       PDEBUG(2, "data error: [%d] len=%d, status=%d", i, n, st);
10940 -
10941 -               frame = &ov->frame[ov->curframe];
10942 -
10943 -               /* SOF/EOF packets have 1st to 8th bytes zeroed and the 9th
10944 -                * byte non-zero. The EOF packet has image width/height in the
10945 -                * 10th and 11th bytes. The 9th byte is given as follows:
10946 -                *
10947 -                * bit 7: EOF
10948 -                *     6: compression enabled
10949 -                *     5: 422/420/400 modes
10950 -                *     4: 422/420/400 modes
10951 -                *     3: 1
10952 -                *     2: snapshot button on
10953 -                *     1: snapshot frame
10954 -                *     0: even/odd field
10955 -                */
10956 -
10957 -               if (printph) {
10958 -                       info("packet header (%3d): %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x",
10959 -                               cdata[ov->packet_size - 1],
10960 -                               cdata[0], cdata[1], cdata[2], cdata[3], cdata[4], cdata[5],
10961 -                               cdata[6], cdata[7], cdata[8], cdata[9], cdata[10], cdata[11]);
10962 -               }
10963 -
10964 -               /* Check for SOF/EOF packet */
10965 -               if ((cdata[0] | cdata[1] | cdata[2] | cdata[3] |
10966 -                    cdata[4] | cdata[5] | cdata[6] | cdata[7]) ||
10967 -                    (~cdata[8] & 0x08))
10968 -                       goto check_middle;
10969 -
10970 -               /* Frame end */
10971 -               if (cdata[8] & 0x80) {
10972 -                       ts = (struct timeval *)(frame->data 
10973 -                             + MAX_FRAME_SIZE(ov->maxwidth, ov->maxheight));
10974 -                       do_gettimeofday(ts);
10975 -
10976 -                       /* Get the actual frame size from the EOF header */
10977 -                       frame->rawwidth = ((int)(cdata[9]) + 1) * 8;
10978 -                       frame->rawheight = ((int)(cdata[10]) + 1) * 8;
10979 -
10980 -                       PDEBUG(4, "Frame end, curframe = %d, packnum=%d, hw=%d, vw=%d, recvd=%d",
10981 -                               ov->curframe,
10982 -                               (int)(cdata[ov->packet_size - 1]),
10983 -                               frame->rawwidth,
10984 -                               frame->rawheight,
10985 -                               frame->bytes_recvd);
10986 -
10987 -                       /* Validate the header data */
10988 -                       RESTRICT_TO_RANGE(frame->rawwidth, ov->minwidth, ov->maxwidth);
10989 -                       RESTRICT_TO_RANGE(frame->rawheight, ov->minheight, ov->maxheight);
10990 -
10991 -                       /* Don't allow byte count to exceed buffer size */
10992 -                       RESTRICT_TO_RANGE(frame->bytes_recvd,
10993 -                                         8, 
10994 -                                         MAX_RAW_DATA_SIZE(ov->maxwidth,
10995 -                                                           ov->maxheight));
10996 -
10997 -                       if (frame->scanstate == STATE_LINES) {
10998 -                               int iFrameNext;
10999 -
11000 -                               frame->grabstate = FRAME_DONE;  // FIXME: Is this right?
11001 -
11002 -                               if (waitqueue_active(&frame->wq)) {
11003 -                                       frame->grabstate = FRAME_DONE;
11004 -                                       wake_up_interruptible(&frame->wq);
11005 -                               }
11006 -
11007 -                               /* If next frame is ready or grabbing,
11008 -                                 * point to it */
11009 -                               iFrameNext = (ov->curframe + 1) % OV511_NUMFRAMES;
11010 -                               if (ov->frame[iFrameNext].grabstate == FRAME_READY
11011 -                                   || ov->frame[iFrameNext].grabstate == FRAME_GRABBING) {
11012 -                                       ov->curframe = iFrameNext;
11013 -                                       ov->frame[iFrameNext].scanstate = STATE_SCANNING;
11014 -                               } else {
11015 -                                       if (frame->grabstate == FRAME_DONE) {
11016 -                                               PDEBUG(4, "Frame done! congratulations");
11017 -                                       } else {
11018 -                                               PDEBUG(4, "Frame not ready? state = %d",
11019 -                                                       ov->frame[iFrameNext].grabstate);
11020 -                                       }
11021 -
11022 -                                       ov->curframe = -1;
11023 -                               }
11024 -                       } else {
11025 -                               PDEBUG(5, "Frame done, but not scanning");
11026 -                       }
11027 -                       /* Image corruption caused by misplaced frame->segment = 0
11028 -                        * fixed by carlosf@conectiva.com.br
11029 -                        */
11030 -               } else {
11031 -                       /* Frame start */
11032 -                       PDEBUG(4, "Frame start, framenum = %d", ov->curframe);
11033 -
11034 -                       /* Check to see if it's a snapshot frame */
11035 -                       /* FIXME?? Should the snapshot reset go here? Performance? */
11036 -                       if (cdata[8] & 0x02) {
11037 -                               frame->snapshot = 1;
11038 -                               PDEBUG(3, "snapshot detected");
11039 -                       }
11040 -
11041 -                       frame->scanstate = STATE_LINES;
11042 -                       frame->bytes_recvd = 0;
11043 -                       frame->compressed = cdata[8] & 0x40;
11044 -               }
11045 -
11046 -check_middle:
11047 -               /* Are we in a frame? */
11048 -               if (frame->scanstate != STATE_LINES) {
11049 -                       PDEBUG(5, "Not in a frame; packet skipped");
11050 -                       continue;
11051 -               }
11052 -
11053 -#if 0
11054 -               /* Skip packet if first 9 bytes are zero. These are common, so
11055 -                * we use a less expensive test here instead of later */
11056 -               if (frame->compressed) {
11057 -                       int b, skip = 1;
11058 -
11059 -                       for (b = 0; b < 9; b++) { 
11060 -                               if (cdata[b])
11061 -                                       skip=0;
11062 -                       }
11063 -
11064 -                       if (skip) {
11065 -                               PDEBUG(5, "Skipping packet (all zero)");
11066 -                               continue;
11067 -                       }
11068 -               }
11069 -#endif
11070 -               /* If frame start, skip header */
11071 -               if (frame->bytes_recvd == 0)
11072 -                       offset = 9;
11073 -               else
11074 -                       offset = 0;
11075 -
11076 -               num = n - offset - 1;
11077 -
11078 -               /* Dump all data exactly as received */
11079 -               if (dumppix == 2) {
11080 -                       frame->bytes_recvd += n - 1;
11081 -                       if (frame->bytes_recvd <= MAX_RAW_DATA_SIZE(ov->maxwidth, ov->maxheight))
11082 -                               memmove(frame->rawdata + frame->bytes_recvd - (n - 1),
11083 -                                       &cdata[0], n - 1);
11084 -                       else
11085 -                               PDEBUG(3, "Raw data buffer overrun!! (%d)",
11086 -                                       frame->bytes_recvd
11087 -                                       - MAX_RAW_DATA_SIZE(ov->maxwidth,
11088 -                                                           ov->maxheight));
11089 -               } else if (!frame->compressed && !remove_zeros) {
11090 -                       frame->bytes_recvd += num;
11091 -                       if (frame->bytes_recvd <= MAX_RAW_DATA_SIZE(ov->maxwidth, ov->maxheight))
11092 -                               memmove(frame->rawdata + frame->bytes_recvd - num,
11093 -                                       &cdata[offset], num);
11094 -                       else
11095 -                               PDEBUG(3, "Raw data buffer overrun!! (%d)",
11096 -                                       frame->bytes_recvd
11097 -                                       - MAX_RAW_DATA_SIZE(ov->maxwidth,
11098 -                                                           ov->maxheight));
11099 -               } else { /* Remove all-zero FIFO lines (aligned 32-byte blocks) */
11100 -                       int b, in = 0, allzero, copied=0;
11101 -                       if (offset) {
11102 -                               frame->bytes_recvd += 32 - offset;      // Bytes out
11103 -                               memmove(frame->rawdata,
11104 -                                       &cdata[offset], 32 - offset);
11105 -                               in += 32;
11106 -                       }
11107 -
11108 -                       while (in < n - 1) {
11109 -                               allzero = 1;
11110 -                               for (b = 0; b < 32; b++) {
11111 -                                       if (cdata[in + b]) {
11112 -                                               allzero = 0;
11113 -                                               break;
11114 -                                       }
11115 -                               }
11116 -
11117 -                               if (allzero) {
11118 -                                       /* Don't copy it */
11119 -                               } else {
11120 -                                       if (frame->bytes_recvd + copied + 32
11121 -                                           <= MAX_RAW_DATA_SIZE(ov->maxwidth, ov->maxheight)) {
11122 -                                               memmove(frame->rawdata + frame->bytes_recvd + copied,
11123 -                                                       &cdata[in], 32);
11124 -                                               copied += 32;
11125 -                                       } else {
11126 -                                               PDEBUG(3, "Raw data buffer overrun!!");
11127 -                                       }
11128 -                               }
11129 -                               in += 32;
11130 -                       }
11131 -
11132 -                       frame->bytes_recvd += copied;
11133 +       if (dumppix) {
11134 +               memset(frame->data, 0,
11135 +                       MAX_DATA_SIZE(ov->maxwidth, ov->maxheight));
11136 +               PDEBUG(4, "Dumping %d bytes", frame->bytes_recvd);
11137 +               memcpy(frame->data, frame->rawdata, frame->bytes_recvd);
11138 +       } else {
11139 +               switch (frame->format) {
11140 +               case VIDEO_PALETTE_GREY:
11141 +                       ov51x_postprocess_grey(ov, frame);
11142 +                       break;
11143 +               case VIDEO_PALETTE_YUV420:
11144 +               case VIDEO_PALETTE_YUV420P:
11145 +               case VIDEO_PALETTE_RGB565:
11146 +               case VIDEO_PALETTE_RGB24:
11147 +               case VIDEO_PALETTE_YUV422:
11148 +               case VIDEO_PALETTE_YUYV:
11149 +               case VIDEO_PALETTE_YUV422P:
11150 +                       ov51x_postprocess_yuv420(ov, frame);
11151 +                       break;
11152 +               default:
11153 +                       err("Cannot convert data to %s",
11154 +                           symbolic(v4l1_plist, frame->format));
11155                 }
11156 -
11157         }
11158 -
11159 -       PDEBUG(5, "pn: %d %d %d %d %d %d %d %d %d %d",
11160 -               aPackNum[0], aPackNum[1], aPackNum[2], aPackNum[3], aPackNum[4],
11161 -               aPackNum[5],aPackNum[6], aPackNum[7], aPackNum[8], aPackNum[9]);
11162 -
11163 -       return totlen;
11164  }
11165  
11166 -static int 
11167 -ov518_move_data(struct usb_ov511 *ov, struct urb *urb)
11168 +/**********************************************************************
11169 + *
11170 + * OV51x data transfer, IRQ handler
11171 + *
11172 + **********************************************************************/
11173 +
11174 +static inline void
11175 +ov511_move_data(struct usb_ov511 *ov, unsigned char *in, int n)
11176  {
11177 -       unsigned char *cdata;
11178 -       int i, data_size, totlen = 0;
11179 -       struct ov511_frame *frame;
11180 +       int num, offset;
11181 +       int pnum = in[ov->packet_size - 1];             /* Get packet number */
11182 +       int max_raw = MAX_RAW_DATA_SIZE(ov->maxwidth, ov->maxheight);
11183 +       struct ov511_frame *frame = &ov->frame[ov->curframe];
11184         struct timeval *ts;
11185  
11186 -       PDEBUG(5, "Moving %d packets", urb->number_of_packets);
11187 -
11188 -       /* OV518(+) has no packet numbering */
11189 -       data_size = ov->packet_size;
11190 -
11191 -       for (i = 0; i < urb->number_of_packets; i++) {
11192 -               int n = urb->iso_frame_desc[i].actual_length;
11193 -               int st = urb->iso_frame_desc[i].status;
11194 -
11195 -               urb->iso_frame_desc[i].actual_length = 0;
11196 -               urb->iso_frame_desc[i].status = 0;
11197 -
11198 -               cdata = urb->transfer_buffer + urb->iso_frame_desc[i].offset;
11199 -
11200 -               if (!n) {
11201 -                       PDEBUG(4, "Zero-length packet");
11202 -                       continue;
11203 -               }
11204 -
11205 -               if (ov->curframe == -1) {
11206 -                       PDEBUG(4, "No frame currently active");
11207 -                       continue;
11208 -               }
11209 +       /* SOF/EOF packets have 1st to 8th bytes zeroed and the 9th
11210 +        * byte non-zero. The EOF packet has image width/height in the
11211 +        * 10th and 11th bytes. The 9th byte is given as follows:
11212 +        *
11213 +        * bit 7: EOF
11214 +        *     6: compression enabled
11215 +        *     5: 422/420/400 modes
11216 +        *     4: 422/420/400 modes
11217 +        *     3: 1
11218 +        *     2: snapshot button on
11219 +        *     1: snapshot frame
11220 +        *     0: even/odd field
11221 +        */
11222  
11223 -               if (st)
11224 -                       PDEBUG(2, "data error: [%d] len=%d, status=%d", i, n, st);
11225 +       if (printph) {
11226 +               info("ph(%3d): %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x",
11227 +                    pnum, in[0], in[1], in[2], in[3], in[4], in[5], in[6],
11228 +                    in[7], in[8], in[9], in[10], in[11]);
11229 +       }
11230  
11231 -               frame = &ov->frame[ov->curframe];
11232 +       /* Check for SOF/EOF packet */
11233 +       if ((in[0] | in[1] | in[2] | in[3] | in[4] | in[5] | in[6] | in[7]) ||
11234 +           (~in[8] & 0x08))
11235 +               goto check_middle;
11236  
11237 -               if (printph) {
11238 -                       info("packet header: %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x",
11239 -                               cdata[0], cdata[1], cdata[2], cdata[3], cdata[4], cdata[5],
11240 -                               cdata[6], cdata[7], cdata[8], cdata[9], cdata[10], cdata[11]);
11241 -               }
11242 -
11243 -               /* A false positive here is likely, until OVT gives me
11244 -                * the definitive SOF/EOF format */
11245 -               if ((!(cdata[0] | cdata[1] | cdata[2] | cdata[3] |
11246 -                     cdata[5])) && cdata[6]) {
11247 -                       
11248 -                       if (frame->scanstate == STATE_LINES) {
11249 -                               PDEBUG(4, "Detected frame end/start");
11250 -                               goto eof;
11251 -                       } else { //scanstate == STATE_SCANNING
11252 -                               /* Frame start */
11253 -                               PDEBUG(4, "Frame start, framenum = %d", ov->curframe);
11254 -                               goto sof;
11255 -                       }
11256 -               } else {
11257 -                       goto check_middle;
11258 -               }
11259 -       
11260 -eof:
11261 +       /* Frame end */
11262 +       if (in[8] & 0x80) {
11263                 ts = (struct timeval *)(frame->data
11264                       + MAX_FRAME_SIZE(ov->maxwidth, ov->maxheight));
11265                 do_gettimeofday(ts);
11266  
11267 -               PDEBUG(4, "Frame end, curframe = %d, hw=%d, vw=%d, recvd=%d",
11268 -                       ov->curframe,
11269 -                       (int)(cdata[9]), (int)(cdata[10]), frame->bytes_recvd);
11270 -
11271 -               // FIXME: Since we don't know the header formats yet,
11272 -               // there is no way to know what the actual image size is
11273 -               frame->rawwidth = frame->width;
11274 -               frame->rawheight = frame->height;
11275 +               /* Get the actual frame size from the EOF header */
11276 +               frame->rawwidth = ((int)(in[9]) + 1) * 8;
11277 +               frame->rawheight = ((int)(in[10]) + 1) * 8;
11278 +
11279 +               PDEBUG(4, "Frame end, frame=%d, pnum=%d, w=%d, h=%d, recvd=%d",
11280 +                       ov->curframe, pnum, frame->rawwidth, frame->rawheight,
11281 +                       frame->bytes_recvd);
11282  
11283                 /* Validate the header data */
11284                 RESTRICT_TO_RANGE(frame->rawwidth, ov->minwidth, ov->maxwidth);
11285 -               RESTRICT_TO_RANGE(frame->rawheight, ov->minheight, ov->maxheight);
11286 +               RESTRICT_TO_RANGE(frame->rawheight, ov->minheight,
11287 +                                 ov->maxheight);
11288  
11289                 /* Don't allow byte count to exceed buffer size */
11290 -               RESTRICT_TO_RANGE(frame->bytes_recvd,
11291 -                                 8, 
11292 -                                 MAX_RAW_DATA_SIZE(ov->maxwidth, ov->maxheight));
11293 +               RESTRICT_TO_RANGE(frame->bytes_recvd, 8, max_raw);
11294  
11295                 if (frame->scanstate == STATE_LINES) {
11296 -                       int iFrameNext;
11297 +                       int nextf;
11298  
11299                         frame->grabstate = FRAME_DONE;  // FIXME: Is this right?
11300  
11301 @@ -4155,115 +3812,280 @@
11302  
11303                         /* If next frame is ready or grabbing,
11304                          * point to it */
11305 -                       iFrameNext = (ov->curframe + 1) % OV511_NUMFRAMES;
11306 -                       if (ov->frame[iFrameNext].grabstate == FRAME_READY
11307 -                           || ov->frame[iFrameNext].grabstate == FRAME_GRABBING) {
11308 -                               ov->curframe = iFrameNext;
11309 -                               ov->frame[iFrameNext].scanstate = STATE_SCANNING;
11310 -                               frame = &ov->frame[iFrameNext];
11311 +                       nextf = (ov->curframe + 1) % OV511_NUMFRAMES;
11312 +                       if (ov->frame[nextf].grabstate == FRAME_READY
11313 +                           || ov->frame[nextf].grabstate == FRAME_GRABBING) {
11314 +                               ov->curframe = nextf;
11315 +                               ov->frame[nextf].scanstate = STATE_SCANNING;
11316                         } else {
11317                                 if (frame->grabstate == FRAME_DONE) {
11318 -                                       PDEBUG(4, "Frame done! congratulations");
11319 +                                       PDEBUG(4, "** Frame done **");
11320                                 } else {
11321                                         PDEBUG(4, "Frame not ready? state = %d",
11322 -                                               ov->frame[iFrameNext].grabstate);
11323 +                                               ov->frame[nextf].grabstate);
11324                                 }
11325  
11326                                 ov->curframe = -1;
11327 -                               PDEBUG(4, "SOF dropped (no active frame)");
11328 -                               continue;  /* Nowhere to store this frame */
11329                         }
11330 +               } else {
11331 +                       PDEBUG(5, "Frame done, but not scanning");
11332                 }
11333                 /* Image corruption caused by misplaced frame->segment = 0
11334                  * fixed by carlosf@conectiva.com.br
11335                  */
11336 -sof:
11337 -               PDEBUG(4, "Starting capture on frame %d", frame->framenum);
11338 -// Snapshot not reverse-engineered yet.
11339 -#if 0
11340 +       } else {
11341 +               /* Frame start */
11342 +               PDEBUG(4, "Frame start, framenum = %d", ov->curframe);
11343 +
11344                 /* Check to see if it's a snapshot frame */
11345                 /* FIXME?? Should the snapshot reset go here? Performance? */
11346 -               if (cdata[8] & 0x02) {
11347 +               if (in[8] & 0x02) {
11348                         frame->snapshot = 1;
11349                         PDEBUG(3, "snapshot detected");
11350                 }
11351 -#endif
11352 +
11353                 frame->scanstate = STATE_LINES;
11354                 frame->bytes_recvd = 0;
11355 -//             frame->compressed = 1;
11356 +               frame->compressed = in[8] & 0x40;
11357 +       }
11358  
11359  check_middle:
11360 -               /* Are we in a frame? */
11361 -               if (frame->scanstate != STATE_LINES) {
11362 -                       PDEBUG(4, "scanstate: no SOF yet");
11363 -                       continue;
11364 -               }
11365 +       /* Are we in a frame? */
11366 +       if (frame->scanstate != STATE_LINES) {
11367 +               PDEBUG(5, "Not in a frame; packet skipped");
11368 +               return;
11369 +       }
11370  
11371 -               /* Dump all data exactly as received */
11372 -               if (dumppix == 2) {
11373 -                       frame->bytes_recvd += n;
11374 -                       if (frame->bytes_recvd <= MAX_RAW_DATA_SIZE(ov->maxwidth, ov->maxheight))
11375 -                               memmove(frame->rawdata + frame->bytes_recvd - n,
11376 -                                       &cdata[0], n);
11377 -                       else
11378 -                               PDEBUG(3, "Raw data buffer overrun!! (%d)",
11379 -                                       frame->bytes_recvd
11380 -                                       - MAX_RAW_DATA_SIZE(ov->maxwidth,
11381 -                                                           ov->maxheight));
11382 -               } else {
11383 -                       /* All incoming data are divided into 8-byte segments. If the
11384 -                        * segment contains all zero bytes, it must be skipped. These
11385 -                        * zero-segments allow the OV518 to mainain a constant data rate
11386 -                        * regardless of the effectiveness of the compression. Segments
11387 -                        * are aligned relative to the beginning of each isochronous
11388 -                        * packet. The first segment is a header (the decompressor
11389 -                        * skips it later).
11390 -                        */
11391 -
11392 -                       int b, in = 0, allzero, copied=0;
11393 -
11394 -                       while (in < n) {
11395 -                               allzero = 1;
11396 -                               for (b = 0; b < 8; b++) {
11397 -                                       if (cdata[in + b]) {
11398 -                                               allzero = 0;
11399 -                                               break;
11400 -                                       }
11401 +       /* If frame start, skip header */
11402 +       if (frame->bytes_recvd == 0)
11403 +               offset = 9;
11404 +       else
11405 +               offset = 0;
11406 +
11407 +       num = n - offset - 1;
11408 +
11409 +       /* Dump all data exactly as received */
11410 +       if (dumppix == 2) {
11411 +               frame->bytes_recvd += n - 1;
11412 +               if (frame->bytes_recvd <= max_raw)
11413 +                       memcpy(frame->rawdata + frame->bytes_recvd - (n - 1),
11414 +                               in, n - 1);
11415 +               else
11416 +                       PDEBUG(3, "Raw data buffer overrun!! (%d)",
11417 +                               frame->bytes_recvd - max_raw);
11418 +       } else if (!frame->compressed && !remove_zeros) {
11419 +               frame->bytes_recvd += num;
11420 +               if (frame->bytes_recvd <= max_raw)
11421 +                       memcpy(frame->rawdata + frame->bytes_recvd - num,
11422 +                               in + offset, num);
11423 +               else
11424 +                       PDEBUG(3, "Raw data buffer overrun!! (%d)",
11425 +                               frame->bytes_recvd - max_raw);
11426 +       } else { /* Remove all-zero FIFO lines (aligned 32-byte blocks) */
11427 +               int b, read = 0, allzero, copied = 0;
11428 +               if (offset) {
11429 +                       frame->bytes_recvd += 32 - offset;      // Bytes out
11430 +                       memcpy(frame->rawdata,  in + offset, 32 - offset);
11431 +                       read += 32;
11432 +               }
11433 +
11434 +               while (read < n - 1) {
11435 +                       allzero = 1;
11436 +                       for (b = 0; b < 32; b++) {
11437 +                               if (in[read + b]) {
11438 +                                       allzero = 0;
11439 +                                       break;
11440                                 }
11441 +                       }
11442  
11443 -                               if (allzero) {
11444 +                       if (allzero) {
11445                                 /* Don't copy it */
11446 +                       } else {
11447 +                               if (frame->bytes_recvd + copied + 32 <= max_raw)
11448 +                               {
11449 +                                       memcpy(frame->rawdata
11450 +                                               + frame->bytes_recvd + copied,
11451 +                                               in + read, 32);
11452 +                                       copied += 32;
11453                                 } else {
11454 -                                       if (frame->bytes_recvd + copied + 8
11455 -                                           <= MAX_RAW_DATA_SIZE(ov->maxwidth, ov->maxheight)) {
11456 -                                               memmove(frame->rawdata + frame->bytes_recvd + copied,
11457 -                                                       &cdata[in], 8);
11458 -                                               copied += 8;
11459 -                                       } else {
11460 -                                               PDEBUG(3, "Raw data buffer overrun!!");
11461 -                                       }
11462 +                                       PDEBUG(3, "Raw data buffer overrun!!");
11463                                 }
11464 -                               in += 8;
11465                         }
11466 -                       frame->bytes_recvd += copied;
11467 +                       read += 32;
11468                 }
11469 +
11470 +               frame->bytes_recvd += copied;
11471         }
11472 +}
11473  
11474 -       return totlen;
11475 +static inline void
11476 +ov518_move_data(struct usb_ov511 *ov, unsigned char *in, int n)
11477 +{
11478 +       int max_raw = MAX_RAW_DATA_SIZE(ov->maxwidth, ov->maxheight);
11479 +       struct ov511_frame *frame = &ov->frame[ov->curframe];
11480 +       struct timeval *ts;
11481 +
11482 +       /* Don't copy the packet number byte */
11483 +       if (ov->packet_numbering)
11484 +               --n;
11485 +
11486 +       /* A false positive here is likely, until OVT gives me
11487 +        * the definitive SOF/EOF format */
11488 +       if ((!(in[0] | in[1] | in[2] | in[3] | in[5])) && in[6]) {
11489 +               if (printph) {
11490 +                       info("ph: %2x %2x %2x %2x %2x %2x %2x %2x", in[0],
11491 +                            in[1], in[2], in[3], in[4], in[5], in[6], in[7]);
11492 +               }
11493 +
11494 +               if (frame->scanstate == STATE_LINES) {
11495 +                       PDEBUG(4, "Detected frame end/start");
11496 +                       goto eof;
11497 +               } else { //scanstate == STATE_SCANNING
11498 +                       /* Frame start */
11499 +                       PDEBUG(4, "Frame start, framenum = %d", ov->curframe);
11500 +                       goto sof;
11501 +               }
11502 +       } else {
11503 +               goto check_middle;
11504 +       }
11505 +
11506 +eof:
11507 +       ts = (struct timeval *)(frame->data
11508 +             + MAX_FRAME_SIZE(ov->maxwidth, ov->maxheight));
11509 +       do_gettimeofday(ts);
11510 +
11511 +       PDEBUG(4, "Frame end, curframe = %d, hw=%d, vw=%d, recvd=%d",
11512 +               ov->curframe,
11513 +               (int)(in[9]), (int)(in[10]), frame->bytes_recvd);
11514 +
11515 +       // FIXME: Since we don't know the header formats yet,
11516 +       // there is no way to know what the actual image size is
11517 +       frame->rawwidth = frame->width;
11518 +       frame->rawheight = frame->height;
11519 +
11520 +       /* Validate the header data */
11521 +       RESTRICT_TO_RANGE(frame->rawwidth, ov->minwidth, ov->maxwidth);
11522 +       RESTRICT_TO_RANGE(frame->rawheight, ov->minheight, ov->maxheight);
11523 +
11524 +       /* Don't allow byte count to exceed buffer size */
11525 +       RESTRICT_TO_RANGE(frame->bytes_recvd, 8, max_raw);
11526 +
11527 +       if (frame->scanstate == STATE_LINES) {
11528 +               int nextf;
11529 +
11530 +               frame->grabstate = FRAME_DONE;  // FIXME: Is this right?
11531 +
11532 +               if (waitqueue_active(&frame->wq)) {
11533 +                       frame->grabstate = FRAME_DONE;
11534 +                       wake_up_interruptible(&frame->wq);
11535 +               }
11536 +
11537 +               /* If next frame is ready or grabbing,
11538 +                * point to it */
11539 +               nextf = (ov->curframe + 1) % OV511_NUMFRAMES;
11540 +               if (ov->frame[nextf].grabstate == FRAME_READY
11541 +                   || ov->frame[nextf].grabstate == FRAME_GRABBING) {
11542 +                       ov->curframe = nextf;
11543 +                       ov->frame[nextf].scanstate = STATE_SCANNING;
11544 +                       frame = &ov->frame[nextf];
11545 +               } else {
11546 +                       if (frame->grabstate == FRAME_DONE) {
11547 +                               PDEBUG(4, "** Frame done **");
11548 +                       } else {
11549 +                               PDEBUG(4, "Frame not ready? state = %d",
11550 +                                      ov->frame[nextf].grabstate);
11551 +                       }
11552 +
11553 +                       ov->curframe = -1;
11554 +                       PDEBUG(4, "SOF dropped (no active frame)");
11555 +                       return;  /* Nowhere to store this frame */
11556 +               }
11557 +       }
11558 +sof:
11559 +       PDEBUG(4, "Starting capture on frame %d", frame->framenum);
11560 +
11561 +// Snapshot not reverse-engineered yet.
11562 +#if 0
11563 +       /* Check to see if it's a snapshot frame */
11564 +       /* FIXME?? Should the snapshot reset go here? Performance? */
11565 +       if (in[8] & 0x02) {
11566 +               frame->snapshot = 1;
11567 +               PDEBUG(3, "snapshot detected");
11568 +       }
11569 +#endif
11570 +       frame->scanstate = STATE_LINES;
11571 +       frame->bytes_recvd = 0;
11572 +       frame->compressed = 1;
11573 +
11574 +check_middle:
11575 +       /* Are we in a frame? */
11576 +       if (frame->scanstate != STATE_LINES) {
11577 +               PDEBUG(4, "scanstate: no SOF yet");
11578 +               return;
11579 +       }
11580 +
11581 +       /* Dump all data exactly as received */
11582 +       if (dumppix == 2) {
11583 +               frame->bytes_recvd += n;
11584 +               if (frame->bytes_recvd <= max_raw)
11585 +                       memcpy(frame->rawdata + frame->bytes_recvd - n, in, n);
11586 +               else
11587 +                       PDEBUG(3, "Raw data buffer overrun!! (%d)",
11588 +                               frame->bytes_recvd - max_raw);
11589 +       } else {
11590 +               /* All incoming data are divided into 8-byte segments. If the
11591 +                * segment contains all zero bytes, it must be skipped. These
11592 +                * zero-segments allow the OV518 to mainain a constant data rate
11593 +                * regardless of the effectiveness of the compression. Segments
11594 +                * are aligned relative to the beginning of each isochronous
11595 +                * packet. The first segment in each image is a header (the
11596 +                * decompressor skips it later).
11597 +                */
11598 +
11599 +               int b, read = 0, allzero, copied = 0;
11600 +
11601 +               while (read < n) {
11602 +                       allzero = 1;
11603 +                       for (b = 0; b < 8; b++) {
11604 +                               if (in[read + b]) {
11605 +                                       allzero = 0;
11606 +                                       break;
11607 +                               }
11608 +                       }
11609 +
11610 +                       if (allzero) {
11611 +                       /* Don't copy it */
11612 +                       } else {
11613 +                               if (frame->bytes_recvd + copied + 8 <= max_raw)
11614 +                               {
11615 +                                       memcpy(frame->rawdata
11616 +                                               + frame->bytes_recvd + copied,
11617 +                                               in + read, 8);
11618 +                                       copied += 8;
11619 +                               } else {
11620 +                                       PDEBUG(3, "Raw data buffer overrun!!");
11621 +                               }
11622 +                       }
11623 +                       read += 8;
11624 +               }
11625 +               frame->bytes_recvd += copied;
11626 +       }
11627  }
11628  
11629 -static void 
11630 +static void
11631  ov51x_isoc_irq(struct urb *urb)
11632  {
11633 -       int len;
11634 +       int i;
11635         struct usb_ov511 *ov;
11636 +       struct ov511_sbuf *sbuf;
11637  
11638         if (!urb->context) {
11639                 PDEBUG(4, "no context");
11640                 return;
11641         }
11642  
11643 -       ov = (struct usb_ov511 *) urb->context;
11644 +       sbuf = urb->context;
11645 +       ov = sbuf->ov;
11646  
11647         if (!ov || !ov->dev || !ov->user) {
11648                 PDEBUG(4, "no device, or not open");
11649 @@ -4275,16 +4097,51 @@
11650                 return;
11651         }
11652  
11653 +        if (urb->status == -ENOENT || urb->status == -ECONNRESET) {
11654 +                PDEBUG(4, "URB unlinked");
11655 +                return;
11656 +        }
11657 +
11658 +       if (urb->status != -EINPROGRESS && urb->status != 0) {
11659 +               err("ERROR: urb->status=%d: %s", urb->status,
11660 +                   symbolic(urb_errlist, urb->status));
11661 +       }
11662 +
11663         /* Copy the data received into our frame buffer */
11664 -       if (ov->curframe >= 0) {
11665 -               if (ov->bclass == BCL_OV511)
11666 -                       len = ov511_move_data(ov, urb);
11667 -               else if (ov->bclass == BCL_OV518)
11668 -                       len = ov518_move_data(ov, urb);
11669 -               else
11670 -                       err("Unknown bridge device (%d)", ov->bridge);
11671 -       } else if (waitqueue_active(&ov->wq)) {
11672 -               wake_up_interruptible(&ov->wq);
11673 +       PDEBUG(5, "sbuf[%d]: Moving %d packets", sbuf->n,
11674 +              urb->number_of_packets);
11675 +       for (i = 0; i < urb->number_of_packets; i++) {
11676 +               /* Warning: Don't call *_move_data() if no frame active! */
11677 +               if (ov->curframe >= 0) {
11678 +                       int n = urb->iso_frame_desc[i].actual_length;
11679 +                       int st = urb->iso_frame_desc[i].status;
11680 +                       unsigned char *cdata;
11681 +
11682 +                       urb->iso_frame_desc[i].actual_length = 0;
11683 +                       urb->iso_frame_desc[i].status = 0;
11684 +
11685 +                       cdata = urb->transfer_buffer
11686 +                               + urb->iso_frame_desc[i].offset;
11687 +
11688 +                       if (!n) {
11689 +                               PDEBUG(4, "Zero-length packet");
11690 +                               continue;
11691 +                       }
11692 +
11693 +                       if (st)
11694 +                               PDEBUG(2, "data error: [%d] len=%d, status=%d",
11695 +                                      i, n, st);
11696 +
11697 +                       if (ov->bclass == BCL_OV511)
11698 +                               ov511_move_data(ov, cdata, n);
11699 +                       else if (ov->bclass == BCL_OV518)
11700 +                               ov518_move_data(ov, cdata, n);
11701 +                       else
11702 +                               err("Unknown bridge device (%d)", ov->bridge);
11703 +
11704 +               } else if (waitqueue_active(&ov->wq)) {
11705 +                       wake_up_interruptible(&ov->wq);
11706 +               }
11707         }
11708  
11709         urb->dev = ov->dev;
11710 @@ -4298,7 +4155,7 @@
11711   *
11712   ***************************************************************************/
11713  
11714 -static int 
11715 +static int
11716  ov51x_init_isoc(struct usb_ov511 *ov)
11717  {
11718         struct urb *urb;
11719 @@ -4340,27 +4197,32 @@
11720                 return -1;
11721         }
11722  
11723 -       if (packetsize == -1) {
11724 -               // FIXME: OV518 is hardcoded to 15 FPS (alternate 5) for now
11725 -               if (ov->bclass == BCL_OV518)
11726 -                       ov51x_set_packet_size(ov, 640);
11727 -               else
11728 -                       ov51x_set_packet_size(ov, size);
11729 +       // FIXME: OV518 is hardcoded to 15 FPS (alternate 5) for now
11730 +       if (ov->bclass == BCL_OV518) {
11731 +               if (packetsize == -1) {
11732 +                       ov518_set_packet_size(ov, 640);
11733 +               } else {
11734 +                       info("Forcing packet size to %d", packetsize);
11735 +                       ov518_set_packet_size(ov, packetsize);
11736 +               }
11737         } else {
11738 +               if (packetsize == -1) {
11739 +                       ov511_set_packet_size(ov, size);
11740 +               } else {
11741                         info("Forcing packet size to %d", packetsize);
11742 -                       ov51x_set_packet_size(ov, packetsize);
11743 +                       ov511_set_packet_size(ov, packetsize);
11744 +               }
11745         }
11746  
11747         for (n = 0; n < OV511_NUMSBUF; n++) {
11748                 urb = usb_alloc_urb(FRAMES_PER_DESC);
11749 -       
11750                 if (!urb) {
11751                         err("init isoc: usb_alloc_urb ret. NULL");
11752                         return -ENOMEM;
11753                 }
11754                 ov->sbuf[n].urb = urb;
11755                 urb->dev = ov->dev;
11756 -               urb->context = ov;
11757 +               urb->context = &ov->sbuf[n];
11758                 urb->pipe = usb_rcvisocpipe(ov->dev, OV511_ENDPOINT_ADDRESS);
11759                 urb->transfer_flags = USB_ISO_ASAP;
11760                 urb->transfer_buffer = ov->sbuf[n].data;
11761 @@ -4382,31 +4244,23 @@
11762         for (n = 0; n < OV511_NUMSBUF; n++) {
11763                 ov->sbuf[n].urb->dev = ov->dev;
11764                 err = usb_submit_urb(ov->sbuf[n].urb);
11765 -               if (err)
11766 +               if (err) {
11767                         err("init isoc: usb_submit_urb(%d) ret %d", n, err);
11768 +                       return err;
11769 +               }
11770         }
11771  
11772         return 0;
11773  }
11774  
11775 -static void 
11776 -ov51x_stop_isoc(struct usb_ov511 *ov)
11777 +static void
11778 +ov51x_unlink_isoc(struct usb_ov511 *ov)
11779  {
11780         int n;
11781  
11782 -       if (!ov->streaming || !ov->dev)
11783 -               return;
11784 -
11785 -       PDEBUG(3, "*** Stopping capture ***");
11786 -
11787 -       ov51x_set_packet_size(ov, 0);
11788 -
11789 -       ov->streaming = 0;
11790 -
11791         /* Unschedule all of the iso td's */
11792         for (n = OV511_NUMSBUF - 1; n >= 0; n--) {
11793                 if (ov->sbuf[n].urb) {
11794 -                       ov->sbuf[n].urb->next = NULL;
11795                         usb_unlink_urb(ov->sbuf[n].urb);
11796                         usb_free_urb(ov->sbuf[n].urb);
11797                         ov->sbuf[n].urb = NULL;
11798 @@ -4414,7 +4268,25 @@
11799         }
11800  }
11801  
11802 -static int 
11803 +static void
11804 +ov51x_stop_isoc(struct usb_ov511 *ov)
11805 +{
11806 +       if (!ov->streaming || !ov->dev)
11807 +               return;
11808 +
11809 +       PDEBUG(3, "*** Stopping capture ***");
11810 +
11811 +       if (ov->bclass == BCL_OV518)
11812 +               ov518_set_packet_size(ov, 0);
11813 +       else
11814 +               ov511_set_packet_size(ov, 0);
11815 +
11816 +       ov->streaming = 0;
11817 +
11818 +       ov51x_unlink_isoc(ov);
11819 +}
11820 +
11821 +static int
11822  ov51x_new_frame(struct usb_ov511 *ov, int framenum)
11823  {
11824         struct ov511_frame *frame;
11825 @@ -4436,7 +4308,7 @@
11826  
11827         frame = &ov->frame[framenum];
11828  
11829 -       PDEBUG(4, "framenum = %d, width = %d, height = %d", framenum, 
11830 +       PDEBUG(4, "framenum = %d, width = %d, height = %d", framenum,
11831                frame->width, frame->height);
11832  
11833         frame->grabstate = FRAME_GRABBING;
11834 @@ -4465,172 +4337,133 @@
11835   *
11836   ***************************************************************************/
11837  
11838 -static int 
11839 -ov51x_alloc(struct usb_ov511 *ov)
11840 +/*
11841 + * - You must acquire buf_lock before entering this function.
11842 + * - Because this code will free any non-null pointer, you must be sure to null
11843 + *   them if you explicitly free them somewhere else!
11844 + */
11845 +static void
11846 +ov51x_do_dealloc(struct usb_ov511 *ov)
11847  {
11848         int i;
11849 -       const int w = ov->maxwidth;
11850 -       const int h = ov->maxheight;
11851 -       const int data_bufsize = OV511_NUMFRAMES * MAX_DATA_SIZE(w, h);
11852 -       const int raw_bufsize = OV511_NUMFRAMES * MAX_RAW_DATA_SIZE(w, h);
11853 -
11854         PDEBUG(4, "entered");
11855 -       down(&ov->buf_lock);
11856 -
11857 -       if (ov->buf_state == BUF_PEND_DEALLOC) {
11858 -               ov->buf_state = BUF_ALLOCATED;
11859 -               del_timer(&ov->buf_timer);
11860 -       }
11861 -
11862 -       if (ov->buf_state == BUF_ALLOCATED)
11863 -               goto out;
11864  
11865 -       ov->fbuf = rvmalloc(data_bufsize);
11866 -       if (!ov->fbuf)
11867 -               goto error;
11868 -
11869 -       ov->rawfbuf = vmalloc(raw_bufsize);
11870 -       if (!ov->rawfbuf) {
11871 -               rvfree(ov->fbuf, data_bufsize);
11872 +       if (ov->fbuf) {
11873 +               rvfree(ov->fbuf, OV511_NUMFRAMES
11874 +                      * MAX_DATA_SIZE(ov->maxwidth, ov->maxheight));
11875                 ov->fbuf = NULL;
11876 -               goto error;
11877         }
11878 -       memset(ov->rawfbuf, 0, raw_bufsize);
11879  
11880 -       ov->tempfbuf = vmalloc(raw_bufsize);
11881 -       if (!ov->tempfbuf) {
11882 +       if (ov->rawfbuf) {
11883                 vfree(ov->rawfbuf);
11884                 ov->rawfbuf = NULL;
11885 -               rvfree(ov->fbuf, data_bufsize);
11886 -               ov->fbuf = NULL;
11887 -               goto error;
11888         }
11889 -       memset(ov->tempfbuf, 0, raw_bufsize);
11890  
11891 -       for (i = 0; i < OV511_NUMSBUF; i++) {
11892 -               ov->sbuf[i].data = kmalloc(FRAMES_PER_DESC *
11893 -                       MAX_FRAME_SIZE_PER_DESC, GFP_KERNEL);
11894 -               if (!ov->sbuf[i].data) {
11895 -                       while (--i) {
11896 -                               kfree(ov->sbuf[i].data);
11897 -                               ov->sbuf[i].data = NULL;
11898 -                       }
11899 -                       vfree(ov->tempfbuf);
11900 -                       ov->tempfbuf = NULL;
11901 -                       vfree(ov->rawfbuf);
11902 -                       ov->rawfbuf = NULL;
11903 -                       rvfree(ov->fbuf, data_bufsize);
11904 -                       ov->fbuf = NULL;
11905 +       if (ov->tempfbuf) {
11906 +               vfree(ov->tempfbuf);
11907 +               ov->tempfbuf = NULL;
11908 +       }
11909  
11910 -                       goto error;
11911 +       for (i = 0; i < OV511_NUMSBUF; i++) {
11912 +               if (ov->sbuf[i].data) {
11913 +                       kfree(ov->sbuf[i].data);
11914 +                       ov->sbuf[i].data = NULL;
11915                 }
11916 -               PDEBUG(4, "sbuf[%d] @ %p", i, ov->sbuf[i].data);
11917         }
11918  
11919         for (i = 0; i < OV511_NUMFRAMES; i++) {
11920 -               ov->frame[i].data = ov->fbuf + i * MAX_DATA_SIZE(w, h);
11921 -               ov->frame[i].rawdata = ov->rawfbuf 
11922 -                + i * MAX_RAW_DATA_SIZE(w, h);
11923 -               ov->frame[i].tempdata = ov->tempfbuf 
11924 -                + i * MAX_RAW_DATA_SIZE(w, h);
11925 -               PDEBUG(4, "frame[%d] @ %p", i, ov->frame[i].data);
11926 +               ov->frame[i].data = NULL;
11927 +               ov->frame[i].rawdata = NULL;
11928 +               ov->frame[i].tempdata = NULL;
11929 +               if (ov->frame[i].compbuf) {
11930 +                       free_page((unsigned long) ov->frame[i].compbuf);
11931 +                       ov->frame[i].compbuf = NULL;
11932 +               }
11933         }
11934  
11935 -       ov->buf_state = BUF_ALLOCATED;
11936 -out:
11937 -       up(&ov->buf_lock);
11938 -       PDEBUG(4, "leaving");
11939 -       return 0;
11940 -error:
11941 +       PDEBUG(4, "buffer memory deallocated");
11942         ov->buf_state = BUF_NOT_ALLOCATED;
11943 -       up(&ov->buf_lock);
11944 -       PDEBUG(4, "errored");
11945 -       return -ENOMEM;
11946 +       PDEBUG(4, "leaving");
11947  }
11948  
11949 -/* 
11950 - * - You must acquire buf_lock before entering this function.
11951 - * - Because this code will free any non-null pointer, you must be sure to null
11952 - *   them if you explicitly free them somewhere else!
11953 - */
11954 -static void 
11955 -ov51x_do_dealloc(struct usb_ov511 *ov)
11956 +static int
11957 +ov51x_alloc(struct usb_ov511 *ov)
11958  {
11959         int i;
11960 +       const int w = ov->maxwidth;
11961 +       const int h = ov->maxheight;
11962 +       const int data_bufsize = OV511_NUMFRAMES * MAX_DATA_SIZE(w, h);
11963 +       const int raw_bufsize = OV511_NUMFRAMES * MAX_RAW_DATA_SIZE(w, h);
11964 +
11965         PDEBUG(4, "entered");
11966 +       down(&ov->buf_lock);
11967  
11968 -       if (ov->fbuf) {
11969 -               rvfree(ov->fbuf, OV511_NUMFRAMES
11970 -                      * MAX_DATA_SIZE(ov->maxwidth, ov->maxheight));
11971 -               ov->fbuf = NULL;
11972 +       if (ov->buf_state == BUF_PEND_DEALLOC) {
11973 +               ov->buf_state = BUF_ALLOCATED;
11974 +               del_timer(&ov->buf_timer);
11975         }
11976  
11977 -       if (ov->rawfbuf) {
11978 -               vfree(ov->rawfbuf);
11979 -               ov->rawfbuf = NULL;
11980 -       }
11981 +       if (ov->buf_state == BUF_ALLOCATED)
11982 +               goto out;
11983 +
11984 +       ov->fbuf = rvmalloc(data_bufsize);
11985 +       if (!ov->fbuf)
11986 +               goto error;
11987 +
11988 +       ov->rawfbuf = vmalloc(raw_bufsize);
11989 +       if (!ov->rawfbuf)
11990 +               goto error;
11991 +
11992 +       memset(ov->rawfbuf, 0, raw_bufsize);
11993  
11994 -       if (ov->tempfbuf) {
11995 -               vfree(ov->tempfbuf);
11996 -               ov->tempfbuf = NULL;
11997 -       }
11998 +       ov->tempfbuf = vmalloc(raw_bufsize);
11999 +       if (!ov->tempfbuf)
12000 +               goto error;
12001 +
12002 +       memset(ov->tempfbuf, 0, raw_bufsize);
12003  
12004         for (i = 0; i < OV511_NUMSBUF; i++) {
12005 -               if (ov->sbuf[i].data) {
12006 -                       kfree(ov->sbuf[i].data);
12007 -                       ov->sbuf[i].data = NULL;
12008 -               }
12009 -       }
12010 +               ov->sbuf[i].data = kmalloc(FRAMES_PER_DESC *
12011 +                       MAX_FRAME_SIZE_PER_DESC, GFP_KERNEL);
12012 +               if (!ov->sbuf[i].data)
12013 +                       goto error;
12014  
12015 -       for (i = 0; i < OV511_NUMFRAMES; i++) {
12016 -               ov->frame[i].data = NULL;
12017 -               ov->frame[i].rawdata = NULL;
12018 -               ov->frame[i].tempdata = NULL;
12019 +               PDEBUG(4, "sbuf[%d] @ %p", i, ov->sbuf[i].data);
12020         }
12021  
12022 -       PDEBUG(4, "buffer memory deallocated");
12023 -       ov->buf_state = BUF_NOT_ALLOCATED;
12024 -       PDEBUG(4, "leaving");
12025 -}
12026 +       for (i = 0; i < OV511_NUMFRAMES; i++) {
12027 +               ov->frame[i].data = ov->fbuf + i * MAX_DATA_SIZE(w, h);
12028 +               ov->frame[i].rawdata = ov->rawfbuf
12029 +                + i * MAX_RAW_DATA_SIZE(w, h);
12030 +               ov->frame[i].tempdata = ov->tempfbuf
12031 +                + i * MAX_RAW_DATA_SIZE(w, h);
12032  
12033 -static void 
12034 -ov51x_buf_callback(unsigned long data)
12035 -{
12036 -       struct usb_ov511 *ov = (struct usb_ov511 *)data;
12037 -       PDEBUG(4, "entered");
12038 -       down(&ov->buf_lock);
12039 +               ov->frame[i].compbuf =
12040 +                (unsigned char *) __get_free_page(GFP_KERNEL);
12041 +               if (!ov->frame[i].compbuf)
12042 +                       goto error;
12043  
12044 -       if (ov->buf_state == BUF_PEND_DEALLOC)
12045 -               ov51x_do_dealloc(ov);
12046 +               PDEBUG(4, "frame[%d] @ %p", i, ov->frame[i].data);
12047 +       }
12048  
12049 +       ov->buf_state = BUF_ALLOCATED;
12050 +out:
12051         up(&ov->buf_lock);
12052         PDEBUG(4, "leaving");
12053 +       return 0;
12054 +error:
12055 +       ov51x_do_dealloc(ov);
12056 +       up(&ov->buf_lock);
12057 +       PDEBUG(4, "errored");
12058 +       return -ENOMEM;
12059  }
12060  
12061 -static void 
12062 +static void
12063  ov51x_dealloc(struct usb_ov511 *ov, int now)
12064  {
12065 -       struct timer_list *bt = &(ov->buf_timer);
12066         PDEBUG(4, "entered");
12067         down(&ov->buf_lock);
12068 -
12069 -       PDEBUG(4, "deallocating buffer memory %s", now ? "now" : "later");
12070 -
12071 -       if (ov->buf_state == BUF_PEND_DEALLOC) {
12072 -               ov->buf_state = BUF_ALLOCATED;
12073 -               del_timer(bt);
12074 -       }
12075 -
12076 -       if (now)
12077 -               ov51x_do_dealloc(ov);
12078 -       else {
12079 -               ov->buf_state = BUF_PEND_DEALLOC;
12080 -               init_timer(bt);
12081 -               bt->function = ov51x_buf_callback;
12082 -               bt->data = (unsigned long)ov;
12083 -               bt->expires = jiffies + buf_timeout * HZ;
12084 -               add_timer(bt);
12085 -       }
12086 +       ov51x_do_dealloc(ov);
12087         up(&ov->buf_lock);
12088         PDEBUG(4, "leaving");
12089  }
12090 @@ -4641,7 +4474,7 @@
12091   *
12092   ***************************************************************************/
12093  
12094 -static int 
12095 +static int
12096  ov51x_v4l1_open(struct video_device *vdev, int flags)
12097  {
12098         struct usb_ov511 *ov = vdev->priv;
12099 @@ -4652,17 +4485,18 @@
12100         down(&ov->lock);
12101  
12102         err = -EBUSY;
12103 -       if (ov->user) 
12104 +       if (ov->user)
12105                 goto out;
12106  
12107 -       err = -ENOMEM;
12108 -       if (ov51x_alloc(ov))
12109 +       err = ov51x_alloc(ov);
12110 +       if (err < 0)
12111                 goto out;
12112  
12113         ov->sub_flag = 0;
12114  
12115         /* In case app doesn't set them... */
12116 -       if (ov51x_set_default_params(ov) < 0)
12117 +       err = ov51x_set_default_params(ov);
12118 +       if (err < 0)
12119                 goto out;
12120  
12121         /* Make sure frames are reset */
12122 @@ -4671,7 +4505,7 @@
12123                 ov->frame[i].bytes_read = 0;
12124         }
12125  
12126 -       /* If compression is on, make sure now that a 
12127 +       /* If compression is on, make sure now that a
12128          * decompressor can be loaded */
12129         if (ov->compress && !ov->decomp_ops) {
12130                 err = request_decompressor(ov);
12131 @@ -4686,23 +4520,22 @@
12132         }
12133  
12134         ov->user++;
12135 -       
12136 +
12137         if (ov->led_policy == LED_AUTO)
12138                 ov51x_led_control(ov, 1);
12139  
12140  out:
12141         up(&ov->lock);
12142 -
12143         return err;
12144  }
12145  
12146 -static void 
12147 +static void
12148  ov51x_v4l1_close(struct video_device *vdev)
12149  {
12150         struct usb_ov511 *ov = vdev->priv;
12151  
12152         PDEBUG(4, "ov511_close");
12153 -       
12154 +
12155         down(&ov->lock);
12156  
12157         ov->user--;
12158 @@ -4731,129 +4564,93 @@
12159                 kfree(ov);
12160                 ov = NULL;
12161         }
12162 -}
12163 -
12164 -static int 
12165 -ov51x_v4l1_init_done(struct video_device *vdev)
12166 -{
12167 -#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
12168 -       create_proc_ov511_cam(vdev->priv);
12169 -#endif
12170 -
12171 -       return 0;
12172 -}
12173  
12174 -static long 
12175 -ov51x_v4l1_write(struct video_device *vdev, const char *buf,
12176 -                unsigned long count, int noblock)
12177 -{
12178 -       return -EINVAL;
12179 +       return;
12180  }
12181  
12182  /* Do not call this function directly! */
12183 -static int 
12184 -ov51x_v4l1_ioctl_internal(struct video_device *vdev, unsigned int cmd,
12185 +static int
12186 +ov51x_v4l1_ioctl_internal(struct usb_ov511 *ov, unsigned int cmd,
12187                           void *arg)
12188  {
12189 -       struct usb_ov511 *ov = vdev->priv;
12190 -
12191         PDEBUG(5, "IOCtl: 0x%X", cmd);
12192  
12193         if (!ov->dev)
12194 -               return -EIO;    
12195 +               return -EIO;
12196  
12197         switch (cmd) {
12198         case VIDIOCGCAP:
12199         {
12200 -               struct video_capability b;
12201 +               struct video_capability *b = arg;
12202  
12203                 PDEBUG(4, "VIDIOCGCAP");
12204  
12205 -               memset(&b, 0, sizeof(b));
12206 -               sprintf(b.name, "%s USB Camera",
12207 -                       ov->bridge == BRG_OV511 ? "OV511" :
12208 -                       ov->bridge == BRG_OV511PLUS ? "OV511+" :
12209 -                       ov->bridge == BRG_OV518 ? "OV518" :
12210 -                       ov->bridge == BRG_OV518PLUS ? "OV518+" :
12211 -                       "unknown");
12212 -               b.type = VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE;
12213 -               if (ov->has_tuner)
12214 -                       b.type |= VID_TYPE_TUNER;
12215 -               b.channels = ov->num_inputs;
12216 -               b.audios = ov->has_audio_proc ? 1:0;
12217 -               b.maxwidth = ov->maxwidth;
12218 -               b.maxheight = ov->maxheight;
12219 -               b.minwidth = ov->minwidth;
12220 -               b.minheight = ov->minheight;
12221 +               memset(b, 0, sizeof(struct video_capability));
12222 +               sprintf(b->name, "%s USB Camera",
12223 +                       symbolic(brglist, ov->bridge));
12224 +               b->type = VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE;
12225 +               b->channels = ov->num_inputs;
12226 +               b->audios = 0;
12227 +               b->maxwidth = ov->maxwidth;
12228 +               b->maxheight = ov->maxheight;
12229 +               b->minwidth = ov->minwidth;
12230 +               b->minheight = ov->minheight;
12231  
12232 -               if (copy_to_user(arg, &b, sizeof(b)))
12233 -                       return -EFAULT;
12234 -                               
12235                 return 0;
12236         }
12237         case VIDIOCGCHAN:
12238         {
12239 -               struct video_channel v;
12240 +               struct video_channel *v = arg;
12241  
12242                 PDEBUG(4, "VIDIOCGCHAN");
12243  
12244 -               if (copy_from_user(&v, arg, sizeof(v)))
12245 -                       return -EFAULT;
12246 -
12247 -               if ((unsigned)(v.channel) >= ov->num_inputs) {
12248 -                       err("Invalid channel (%d)", v.channel);
12249 +               if ((unsigned)(v->channel) >= ov->num_inputs) {
12250 +                       err("Invalid channel (%d)", v->channel);
12251                         return -EINVAL;
12252                 }
12253  
12254 -               v.norm = ov->norm;
12255 -               v.type = (ov->has_tuner) ? VIDEO_TYPE_TV : VIDEO_TYPE_CAMERA;
12256 -               v.flags = (ov->has_tuner) ? VIDEO_VC_TUNER : 0;
12257 -               v.flags |= (ov->has_audio_proc) ? VIDEO_VC_AUDIO : 0;
12258 -//             v.flags |= (ov->has_decoder) ? VIDEO_VC_NORM : 0;
12259 -               v.tuners = (ov->has_tuner) ? 1:0;
12260 -               decoder_get_input_name(ov, v.channel, v.name);
12261 +               v->norm = ov->norm;
12262 +               v->type = VIDEO_TYPE_CAMERA;
12263 +               v->flags = 0;
12264 +//             v->flags |= (ov->has_decoder) ? VIDEO_VC_NORM : 0;
12265 +               v->tuners = 0;
12266 +               decoder_get_input_name(ov, v->channel, v->name);
12267  
12268 -               if (copy_to_user(arg, &v, sizeof(v)))
12269 -                       return -EFAULT;
12270 -                               
12271                 return 0;
12272         }
12273         case VIDIOCSCHAN:
12274         {
12275 -               struct video_channel v;
12276 +               struct video_channel *v = arg;
12277                 int err;
12278  
12279                 PDEBUG(4, "VIDIOCSCHAN");
12280  
12281 -               if (copy_from_user(&v, arg, sizeof(v)))
12282 -                       return -EFAULT;
12283 -
12284                 /* Make sure it's not a camera */
12285                 if (!ov->has_decoder) {
12286 -                       if (v.channel == 0)
12287 +                       if (v->channel == 0)
12288                                 return 0;
12289                         else
12290                                 return -EINVAL;
12291                 }
12292  
12293 -               if (v.norm != VIDEO_MODE_PAL &&
12294 -                   v.norm != VIDEO_MODE_NTSC &&
12295 -                   v.norm != VIDEO_MODE_SECAM &&
12296 -                   v.norm != VIDEO_MODE_AUTO) {
12297 -                       err("Invalid norm (%d)", v.norm);
12298 +               if (v->norm != VIDEO_MODE_PAL &&
12299 +                   v->norm != VIDEO_MODE_NTSC &&
12300 +                   v->norm != VIDEO_MODE_SECAM &&
12301 +                   v->norm != VIDEO_MODE_AUTO) {
12302 +                       err("Invalid norm (%d)", v->norm);
12303                         return -EINVAL;
12304                 }
12305  
12306 -               if ((unsigned)(v.channel) >= ov->num_inputs) {
12307 -                       err("Invalid channel (%d)", v.channel);
12308 +               if ((unsigned)(v->channel) >= ov->num_inputs) {
12309 +                       err("Invalid channel (%d)", v->channel);
12310                         return -EINVAL;
12311                 }
12312  
12313 -               err = decoder_set_input(ov, v.channel);
12314 +               err = decoder_set_input(ov, v->channel);
12315                 if (err)
12316                         return err;
12317  
12318 -               err = decoder_set_norm(ov, v.norm);
12319 +               err = decoder_set_norm(ov, v->norm);
12320                 if (err)
12321                         return err;
12322  
12323 @@ -4861,43 +4658,37 @@
12324         }
12325         case VIDIOCGPICT:
12326         {
12327 -               struct video_picture p;
12328 +               struct video_picture *p = arg;
12329  
12330                 PDEBUG(4, "VIDIOCGPICT");
12331  
12332 -               memset(&p, 0, sizeof(p));
12333 -
12334 -               if (sensor_get_picture(ov, &p))
12335 +               memset(p, 0, sizeof(struct video_picture));
12336 +               if (sensor_get_picture(ov, p))
12337                         return -EIO;
12338  
12339 -               if (copy_to_user(arg, &p, sizeof(p)))
12340 -                       return -EFAULT;
12341 -
12342                 return 0;
12343         }
12344         case VIDIOCSPICT:
12345         {
12346 -               struct video_picture p;
12347 +               struct video_picture *p = arg;
12348                 int i;
12349  
12350                 PDEBUG(4, "VIDIOCSPICT");
12351  
12352 -               if (copy_from_user(&p, arg, sizeof(p)))
12353 -                       return -EFAULT;
12354 -
12355 -               if (!get_depth(p.palette))
12356 +               if (!get_depth(p->palette))
12357                         return -EINVAL;
12358  
12359 -               if (sensor_set_picture(ov, &p))
12360 +               if (sensor_set_picture(ov, p))
12361                         return -EIO;
12362  
12363 -               if (force_palette && p.palette != force_palette) {
12364 -                       info("Palette rejected (%d)", p.palette);
12365 +               if (force_palette && p->palette != force_palette) {
12366 +                       info("Palette rejected (%s)",
12367 +                            symbolic(v4l1_plist, p->palette));
12368                         return -EINVAL;
12369                 }
12370  
12371                 // FIXME: Format should be independent of frames
12372 -               if (p.palette != ov->frame[0].format) {
12373 +               if (p->palette != ov->frame[0].format) {
12374                         PDEBUG(4, "Detected format change");
12375  
12376                         /* If we're collecting previous frame wait
12377 @@ -4906,79 +4697,73 @@
12378                         if (signal_pending(current)) return -EINTR;
12379  
12380                         mode_init_regs(ov, ov->frame[0].width,
12381 -                               ov->frame[0].height, p.palette, ov->sub_flag);
12382 +                               ov->frame[0].height, p->palette, ov->sub_flag);
12383                 }
12384  
12385 -               PDEBUG(4, "Setting depth=%d, palette=%d", p.depth, p.palette);
12386 +               PDEBUG(4, "Setting depth=%d, palette=%s",
12387 +                      p->depth, symbolic(v4l1_plist, p->palette));
12388 +
12389                 for (i = 0; i < OV511_NUMFRAMES; i++) {
12390 -                       ov->frame[i].depth = p.depth;
12391 -                       ov->frame[i].format = p.palette;
12392 +                       ov->frame[i].depth = p->depth;
12393 +                       ov->frame[i].format = p->palette;
12394                 }
12395  
12396                 return 0;
12397         }
12398         case VIDIOCGCAPTURE:
12399         {
12400 -               int vf;
12401 +               int *vf = arg;
12402  
12403                 PDEBUG(4, "VIDIOCGCAPTURE");
12404  
12405 -               if (copy_from_user(&vf, arg, sizeof(vf)))
12406 -                       return -EFAULT;
12407 -               ov->sub_flag = vf;
12408 +               ov->sub_flag = *vf;
12409                 return 0;
12410         }
12411         case VIDIOCSCAPTURE:
12412         {
12413 -               struct video_capture vc;
12414 +               struct video_capture *vc = arg;
12415  
12416                 PDEBUG(4, "VIDIOCSCAPTURE");
12417  
12418 -               if (copy_from_user(&vc, arg, sizeof(vc)))
12419 -                       return -EFAULT;
12420 -               if (vc.flags)
12421 +               if (vc->flags)
12422                         return -EINVAL;
12423 -               if (vc.decimation)
12424 +               if (vc->decimation)
12425                         return -EINVAL;
12426  
12427 -               vc.x &= ~3L;
12428 -               vc.y &= ~1L;
12429 -               vc.y &= ~31L;
12430 -
12431 -               if (vc.width == 0)
12432 -                       vc.width = 32;
12433 -
12434 -               vc.height /= 16;
12435 -               vc.height *= 16;
12436 -               if (vc.height == 0)
12437 -                       vc.height = 16;
12438 -
12439 -               ov->subx = vc.x;
12440 -               ov->suby = vc.y;
12441 -               ov->subw = vc.width;
12442 -               ov->subh = vc.height;
12443 +               vc->x &= ~3L;
12444 +               vc->y &= ~1L;
12445 +               vc->y &= ~31L;
12446 +
12447 +               if (vc->width == 0)
12448 +                       vc->width = 32;
12449 +
12450 +               vc->height /= 16;
12451 +               vc->height *= 16;
12452 +               if (vc->height == 0)
12453 +                       vc->height = 16;
12454 +
12455 +               ov->subx = vc->x;
12456 +               ov->suby = vc->y;
12457 +               ov->subw = vc->width;
12458 +               ov->subh = vc->height;
12459  
12460                 return 0;
12461         }
12462         case VIDIOCSWIN:
12463         {
12464 -               struct video_window vw;
12465 +               struct video_window *vw = arg;
12466                 int i, result;
12467  
12468 -               if (copy_from_user(&vw, arg, sizeof(vw)))
12469 -                       return -EFAULT;
12470 -
12471 -               PDEBUG(4, "VIDIOCSWIN: width=%d, height=%d",
12472 -                       vw.width, vw.height);
12473 +               PDEBUG(4, "VIDIOCSWIN: %dx%d", vw->width, vw->height);
12474  
12475  #if 0
12476 -               if (vw.flags)
12477 +               if (vw->flags)
12478                         return -EINVAL;
12479 -               if (vw.clipcount)
12480 +               if (vw->clipcount)
12481                         return -EINVAL;
12482 -               if (vw.height != ov->maxheight)
12483 +               if (vw->height != ov->maxheight)
12484                         return -EINVAL;
12485 -               if (vw.width != ov->maxwidth)
12486 +               if (vw->width != ov->maxwidth)
12487                         return -EINVAL;
12488  #endif
12489  
12490 @@ -4987,140 +4772,131 @@
12491                 interruptible_sleep_on(&ov->wq);
12492                 if (signal_pending(current)) return -EINTR;
12493  
12494 -               result = mode_init_regs(ov, vw.width, vw.height,
12495 +               result = mode_init_regs(ov, vw->width, vw->height,
12496                         ov->frame[0].format, ov->sub_flag);
12497                 if (result < 0)
12498                         return result;
12499  
12500                 for (i = 0; i < OV511_NUMFRAMES; i++) {
12501 -                       ov->frame[i].width = vw.width;
12502 -                       ov->frame[i].height = vw.height;
12503 +                       ov->frame[i].width = vw->width;
12504 +                       ov->frame[i].height = vw->height;
12505                 }
12506  
12507                 return 0;
12508         }
12509         case VIDIOCGWIN:
12510         {
12511 -               struct video_window vw;
12512 -
12513 -               memset(&vw, 0, sizeof(vw));
12514 -               vw.x = 0;               /* FIXME */
12515 -               vw.y = 0;
12516 -               vw.width = ov->frame[0].width;
12517 -               vw.height = ov->frame[0].height;
12518 -               vw.flags = 30;
12519 +               struct video_window *vw = arg;
12520  
12521 -               PDEBUG(4, "VIDIOCGWIN: %dx%d", vw.width, vw.height);
12522 +               memset(vw, 0, sizeof(struct video_window));
12523 +               vw->x = 0;              /* FIXME */
12524 +               vw->y = 0;
12525 +               vw->width = ov->frame[0].width;
12526 +               vw->height = ov->frame[0].height;
12527 +               vw->flags = 30;
12528  
12529 -               if (copy_to_user(arg, &vw, sizeof(vw)))
12530 -                       return -EFAULT;
12531 +               PDEBUG(4, "VIDIOCGWIN: %dx%d", vw->width, vw->height);
12532  
12533                 return 0;
12534         }
12535         case VIDIOCGMBUF:
12536         {
12537 -               struct video_mbuf vm;
12538 +               struct video_mbuf *vm = arg;
12539                 int i;
12540  
12541                 PDEBUG(4, "VIDIOCGMBUF");
12542  
12543 -               memset(&vm, 0, sizeof(vm));
12544 -               vm.size = OV511_NUMFRAMES
12545 -                       * MAX_DATA_SIZE(ov->maxwidth, ov->maxheight);
12546 -               vm.frames = OV511_NUMFRAMES;
12547 +               memset(vm, 0, sizeof(struct video_mbuf));
12548 +               vm->size = OV511_NUMFRAMES
12549 +                          * MAX_DATA_SIZE(ov->maxwidth, ov->maxheight);
12550 +               vm->frames = OV511_NUMFRAMES;
12551  
12552 -               vm.offsets[0] = 0;
12553 +               vm->offsets[0] = 0;
12554                 for (i = 1; i < OV511_NUMFRAMES; i++) {
12555 -                       vm.offsets[i] = vm.offsets[i-1]
12556 +                       vm->offsets[i] = vm->offsets[i-1]
12557                            + MAX_DATA_SIZE(ov->maxwidth, ov->maxheight);
12558                 }
12559  
12560 -               if (copy_to_user((void *)arg, (void *)&vm, sizeof(vm)))
12561 -                       return -EFAULT;
12562 -
12563                 return 0;
12564         }
12565         case VIDIOCMCAPTURE:
12566         {
12567 -               struct video_mmap vm;
12568 +               struct video_mmap *vm = arg;
12569                 int ret, depth;
12570 +               unsigned int f = vm->frame;
12571  
12572 -               if (copy_from_user((void *)&vm, (void *)arg, sizeof(vm)))
12573 -                       return -EFAULT;
12574 -
12575 -               PDEBUG(4, "CMCAPTURE");
12576 -               PDEBUG(4, "frame: %d, size: %dx%d, format: %d",
12577 -                       vm.frame, vm.width, vm.height, vm.format);
12578 +               PDEBUG(4, "VIDIOCMCAPTURE: frame: %d, %dx%d, %s", f, vm->width,
12579 +                       vm->height, symbolic(v4l1_plist, vm->format));
12580  
12581 -               depth = get_depth(vm.format);
12582 +               depth = get_depth(vm->format);
12583                 if (!depth) {
12584 -                       err("VIDIOCMCAPTURE: invalid format (%d)", vm.format);
12585 +                       err("VIDIOCMCAPTURE: invalid format (%s)",
12586 +                           symbolic(v4l1_plist, vm->format));
12587                         return -EINVAL;
12588                 }
12589  
12590 -               if ((unsigned)vm.frame >= OV511_NUMFRAMES) {
12591 -                       err("VIDIOCMCAPTURE: invalid frame (%d)", vm.frame);
12592 +               if (f >= OV511_NUMFRAMES) {
12593 +                       err("VIDIOCMCAPTURE: invalid frame (%d)", f);
12594                         return -EINVAL;
12595                 }
12596  
12597 -               if (vm.width > ov->maxwidth 
12598 -                   || vm.height > ov->maxheight) {
12599 +               if (vm->width > ov->maxwidth
12600 +                   || vm->height > ov->maxheight) {
12601                         err("VIDIOCMCAPTURE: requested dimensions too big");
12602                         return -EINVAL;
12603                 }
12604  
12605 -               if (ov->frame[vm.frame].grabstate == FRAME_GRABBING) {
12606 +               if (ov->frame[f].grabstate == FRAME_GRABBING) {
12607                         PDEBUG(4, "VIDIOCMCAPTURE: already grabbing");
12608                         return -EBUSY;
12609                 }
12610  
12611 -               if (force_palette && vm.format != force_palette) {
12612 -                       info("palette rejected (%d)", vm.format);
12613 +               if (force_palette && (vm->format != force_palette)) {
12614 +                       info("palette rejected (%s)",
12615 +                            symbolic(v4l1_plist, vm->format));
12616                         return -EINVAL;
12617                 }
12618  
12619 -               if ((ov->frame[vm.frame].width != vm.width) ||
12620 -                   (ov->frame[vm.frame].height != vm.height) ||
12621 -                   (ov->frame[vm.frame].format != vm.format) ||
12622 -                   (ov->frame[vm.frame].sub_flag != ov->sub_flag) ||
12623 -                   (ov->frame[vm.frame].depth != depth)) {
12624 +               if ((ov->frame[f].width != vm->width) ||
12625 +                   (ov->frame[f].height != vm->height) ||
12626 +                   (ov->frame[f].format != vm->format) ||
12627 +                   (ov->frame[f].sub_flag != ov->sub_flag) ||
12628 +                   (ov->frame[f].depth != depth)) {
12629                         PDEBUG(4, "VIDIOCMCAPTURE: change in image parameters");
12630  
12631                         /* If we're collecting previous frame wait
12632                            before changing modes */
12633                         interruptible_sleep_on(&ov->wq);
12634                         if (signal_pending(current)) return -EINTR;
12635 -                       ret = mode_init_regs(ov, vm.width, vm.height,
12636 -                               vm.format, ov->sub_flag);
12637 +                       ret = mode_init_regs(ov, vm->width, vm->height,
12638 +                               vm->format, ov->sub_flag);
12639  #if 0
12640                         if (ret < 0) {
12641                                 PDEBUG(1, "Got error while initializing regs ");
12642                                 return ret;
12643                         }
12644  #endif
12645 -                       ov->frame[vm.frame].width = vm.width;
12646 -                       ov->frame[vm.frame].height = vm.height;
12647 -                       ov->frame[vm.frame].format = vm.format;
12648 -                       ov->frame[vm.frame].sub_flag = ov->sub_flag;
12649 -                       ov->frame[vm.frame].depth = depth;
12650 +                       ov->frame[f].width = vm->width;
12651 +                       ov->frame[f].height = vm->height;
12652 +                       ov->frame[f].format = vm->format;
12653 +                       ov->frame[f].sub_flag = ov->sub_flag;
12654 +                       ov->frame[f].depth = depth;
12655                 }
12656  
12657                 /* Mark it as ready */
12658 -               ov->frame[vm.frame].grabstate = FRAME_READY;
12659 +               ov->frame[f].grabstate = FRAME_READY;
12660  
12661 -               PDEBUG(4, "VIDIOCMCAPTURE: renewing frame %d", vm.frame);
12662 +               PDEBUG(4, "VIDIOCMCAPTURE: renewing frame %d", f);
12663  
12664 -               return ov51x_new_frame(ov, vm.frame);
12665 +               return ov51x_new_frame(ov, f);
12666         }
12667         case VIDIOCSYNC:
12668         {
12669 -               int fnum, rc;
12670 +               unsigned int fnum = *((unsigned int *) arg);
12671                 struct ov511_frame *frame;
12672 +               int rc;
12673  
12674 -               if (copy_from_user((void *)&fnum, arg, sizeof(int)))
12675 -                       return -EFAULT;
12676 -
12677 -               if ((unsigned)fnum >= OV511_NUMFRAMES) {
12678 +               if (fnum >= OV511_NUMFRAMES) {
12679                         err("VIDIOCSYNC: invalid frame (%d)", fnum);
12680                         return -EINVAL;
12681                 }
12682 @@ -5154,7 +4930,7 @@
12683                                         return ret;
12684                                 goto redo;
12685                         }
12686 -                       /* Fall through */                      
12687 +                       /* Fall through */
12688                 case FRAME_DONE:
12689                         if (ov->snap_enabled && !frame->snapshot) {
12690                                 int ret;
12691 @@ -5182,159 +4958,109 @@
12692         }
12693         case VIDIOCGFBUF:
12694         {
12695 -               struct video_buffer vb;
12696 -
12697 -               PDEBUG(4, "VIDIOCSCHAN");
12698 +               struct video_buffer *vb = arg;
12699  
12700 -               memset(&vb, 0, sizeof(vb));
12701 -               vb.base = NULL; /* frame buffer not supported, not used */
12702 +               PDEBUG(4, "VIDIOCGFBUF");
12703  
12704 -               if (copy_to_user((void *)arg, (void *)&vb, sizeof(vb)))
12705 -                       return -EFAULT;
12706 +               memset(vb, 0, sizeof(struct video_buffer));
12707  
12708                 return 0;
12709         }
12710         case VIDIOCGUNIT:
12711         {
12712 -               struct video_unit vu;
12713 +               struct video_unit *vu = arg;
12714  
12715                 PDEBUG(4, "VIDIOCGUNIT");
12716  
12717 -               memset(&vu, 0, sizeof(vu));
12718 -
12719 -               vu.video = ov->vdev.minor;      /* Video minor */
12720 -               vu.vbi = VIDEO_NO_UNIT;         /* VBI minor */
12721 -               vu.radio = VIDEO_NO_UNIT;       /* Radio minor */
12722 -               vu.audio = VIDEO_NO_UNIT;       /* Audio minor */
12723 -               vu.teletext = VIDEO_NO_UNIT;    /* Teletext minor */
12724 -
12725 -               if (copy_to_user((void *)arg, (void *)&vu, sizeof(vu)))
12726 -                       return -EFAULT;
12727 -
12728 -               return 0;
12729 -       }
12730 -       case VIDIOCGTUNER:
12731 -       {
12732 -               struct video_tuner v;
12733 -
12734 -               PDEBUG(4, "VIDIOCGTUNER");
12735 -
12736 -               if (copy_from_user(&v, arg, sizeof(v)))
12737 -                       return -EFAULT;
12738 -
12739 -               if (!ov->has_tuner || v.tuner)  // Only tuner 0
12740 -                       return -EINVAL;
12741 -
12742 -               strcpy(v.name, "Television");
12743 -
12744 -               // FIXME: Need a way to get the real values
12745 -               v.rangelow = 0;
12746 -               v.rangehigh = ~0;
12747 -
12748 -               v.flags = VIDEO_TUNER_PAL | VIDEO_TUNER_NTSC |
12749 -                   VIDEO_TUNER_SECAM;
12750 -               v.mode = 0;             /* FIXME:  Not sure what this is yet */
12751 -               v.signal = 0xFFFF;      /* unknown */
12752 -
12753 -               call_i2c_clients(ov, cmd, &v);
12754 -
12755 -               if (copy_to_user(arg, &v, sizeof(v)))
12756 -                       return -EFAULT;
12757 -
12758 -               return 0;
12759 -       }
12760 -       case VIDIOCSTUNER:
12761 -       {
12762 -               struct video_tuner v;
12763 -               int err;
12764 -
12765 -               PDEBUG(4, "VIDIOCSTUNER");
12766 -
12767 -               if (copy_from_user(&v, arg, sizeof(v)))
12768 -                       return -EFAULT;
12769 -
12770 -               /* Only no or one tuner for now */
12771 -               if (!ov->has_tuner || v.tuner)
12772 -                       return -EINVAL;
12773 -
12774 -               /* and it only has certain valid modes */
12775 -               if (v.mode != VIDEO_MODE_PAL &&
12776 -                   v.mode != VIDEO_MODE_NTSC &&
12777 -                   v.mode != VIDEO_MODE_SECAM) return -EOPNOTSUPP;
12778 -
12779 -               /* Is this right/necessary? */
12780 -               err = decoder_set_norm(ov, v.mode);
12781 -               if (err)
12782 -                       return err;
12783 +               memset(vu, 0, sizeof(struct video_unit));
12784  
12785 -               call_i2c_clients(ov, cmd, &v);
12786 +               vu->video = ov->vdev.minor;
12787 +               vu->vbi = VIDEO_NO_UNIT;
12788 +               vu->radio = VIDEO_NO_UNIT;
12789 +               vu->audio = VIDEO_NO_UNIT;
12790 +               vu->teletext = VIDEO_NO_UNIT;
12791  
12792                 return 0;
12793         }
12794 -       case VIDIOCGFREQ:
12795 -       {
12796 -               unsigned long v = ov->freq;
12797 +       default:
12798 +               PDEBUG(3, "Unsupported IOCtl: 0x%X", cmd);
12799 +               return -ENOIOCTLCMD;
12800 +       } /* end switch */
12801  
12802 -               PDEBUG(4, "VIDIOCGFREQ");
12803 +       return 0;
12804 +}
12805  
12806 -               if (!ov->has_tuner)
12807 -                       return -EINVAL;
12808 -#if 0
12809 -               /* FIXME: this is necessary for testing */
12810 -               v = 46*16;
12811 -#endif
12812 -               if (copy_to_user(arg, &v, sizeof(v)))
12813 -                       return -EFAULT;
12814 +/* This is implemented as video_generic_ioctl() in the new V4L's videodev.c */
12815 +static int
12816 +ov51x_v4l1_generic_ioctl(struct video_device *vdev, unsigned int cmd, void *arg)
12817 +{
12818 +       char    sbuf[128];
12819 +       void    *mbuf = NULL;
12820 +       void    *parg = NULL;
12821 +       int     err  = -EINVAL;
12822 +
12823 +       /*  Copy arguments into temp kernel buffer  */
12824 +       switch (_IOC_DIR(cmd)) {
12825 +       case _IOC_NONE:
12826 +               parg = arg;
12827 +               break;
12828 +       case _IOC_READ: /* some v4l ioctls are marked wrong ... */
12829 +       case _IOC_WRITE:
12830 +       case (_IOC_WRITE | _IOC_READ):
12831 +               if (_IOC_SIZE(cmd) <= sizeof(sbuf)) {
12832 +                       parg = sbuf;
12833 +               } else {
12834 +                       /* too big to allocate from stack */
12835 +                       mbuf = kmalloc(_IOC_SIZE(cmd), GFP_KERNEL);
12836 +                       if (NULL == mbuf)
12837 +                               return -ENOMEM;
12838 +                       parg = mbuf;
12839 +               }
12840  
12841 -               return 0;
12842 +               err = -EFAULT;
12843 +               if (copy_from_user(parg, arg, _IOC_SIZE(cmd)))
12844 +                       goto out;
12845 +               break;
12846         }
12847 -       case VIDIOCSFREQ:
12848 -       {
12849 -               unsigned long v;
12850 -
12851 -               if (!ov->has_tuner)
12852 -                       return -EINVAL;
12853 -
12854 -               if (copy_from_user(&v, arg, sizeof(v)))
12855 -                       return -EFAULT;
12856 -
12857 -               PDEBUG(4, "VIDIOCSFREQ: %lx", v);
12858  
12859 -               ov->freq = v;
12860 -               call_i2c_clients(ov, cmd, &v);
12861 +       err = ov51x_v4l1_ioctl_internal(vdev->priv, cmd, parg);
12862 +       if (err == -ENOIOCTLCMD)
12863 +               err = -EINVAL;
12864 +       if (err < 0)
12865 +               goto out;
12866  
12867 -               return 0;
12868 -       }
12869 -       case VIDIOCGAUDIO:
12870 -       case VIDIOCSAUDIO:
12871 +       /*  Copy results into user buffer  */
12872 +       switch (_IOC_DIR(cmd))
12873         {
12874 -               /* FIXME: Implement this... */
12875 -               return 0;
12876 +       case _IOC_READ:
12877 +       case (_IOC_WRITE | _IOC_READ):
12878 +               if (copy_to_user(arg, parg, _IOC_SIZE(cmd)))
12879 +                       err = -EFAULT;
12880 +               break;
12881         }
12882 -       default:
12883 -               PDEBUG(3, "Unsupported IOCtl: 0x%X", cmd);
12884 -               return -ENOIOCTLCMD;
12885 -       } /* end switch */
12886  
12887 -       return 0;
12888 +out:
12889 +       if (mbuf)
12890 +               kfree(mbuf);
12891 +       return err;
12892  }
12893  
12894 -static int 
12895 +static int
12896  ov51x_v4l1_ioctl(struct video_device *vdev, unsigned int cmd, void *arg)
12897  {
12898 -       int rc;
12899         struct usb_ov511 *ov = vdev->priv;
12900 +       int rc;
12901  
12902         if (down_interruptible(&ov->lock))
12903                 return -EINTR;
12904  
12905 -       rc = ov51x_v4l1_ioctl_internal(vdev, cmd, arg);
12906 +       rc = ov51x_v4l1_generic_ioctl(vdev, cmd, arg);
12907  
12908         up(&ov->lock);
12909         return rc;
12910  }
12911  
12912 -static inline long 
12913 +static inline long
12914  ov51x_v4l1_read(struct video_device *vdev, char *buf, unsigned long count,
12915                 int noblock)
12916  {
12917 @@ -5397,7 +5123,7 @@
12918  
12919         /* Wait while we're grabbing the image */
12920         PDEBUG(4, "Waiting image grabbing");
12921 -       rc = wait_event_interruptible(frame->wq, 
12922 +       rc = wait_event_interruptible(frame->wq,
12923                 (frame->grabstate == FRAME_DONE)
12924                 || (frame->grabstate == FRAME_ERROR));
12925  
12926 @@ -5444,7 +5170,7 @@
12927                 get_frame_length(frame));
12928  
12929         /* copy bytes to user space; we allow for partials reads */
12930 -//     if ((count + frame->bytes_read) 
12931 +//     if ((count + frame->bytes_read)
12932  //         > get_frame_length((struct ov511_frame *)frame))
12933  //             count = frame->scanlength - frame->bytes_read;
12934  
12935 @@ -5486,11 +5212,11 @@
12936         return rc;
12937  }
12938  
12939 -static int 
12940 +static int
12941  ov51x_v4l1_mmap(struct video_device *vdev, const char *adr, unsigned long size)
12942  {
12943 -       struct usb_ov511 *ov = vdev->priv;
12944         unsigned long start = (unsigned long)adr;
12945 +       struct usb_ov511 *ov = vdev->priv;
12946         unsigned long page, pos;
12947  
12948         if (ov->dev == NULL)
12949 @@ -5533,14 +5259,12 @@
12950         open:           ov51x_v4l1_open,
12951         close:          ov51x_v4l1_close,
12952         read:           ov51x_v4l1_read,
12953 -       write:          ov51x_v4l1_write,
12954         ioctl:          ov51x_v4l1_ioctl,
12955         mmap:           ov51x_v4l1_mmap,
12956 -       initialize:     ov51x_v4l1_init_done,
12957  };
12958  
12959  #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
12960 -static int 
12961 +static int
12962  ov51x_control_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
12963                     unsigned long ularg)
12964  {
12965 @@ -5761,10 +5485,10 @@
12966   *
12967   ***************************************************************************/
12968  
12969 -/* This initializes the OV7610, OV7620, or OV7620AE sensor. The OV7620AE uses
12970 +/* This initializes the OV7610, OV7620, or OV76BE sensor. The OV76BE uses
12971   * the same register settings as the OV7610, since they are very similar.
12972   */
12973 -static int 
12974 +static int
12975  ov7xx0_configure(struct usb_ov511 *ov)
12976  {
12977         int i, success;
12978 @@ -5915,7 +5639,7 @@
12979                         err("this to " EMAIL);
12980                         err("This is only a warning. You can attempt to use");
12981                         err("your camera anyway");
12982 -// Only issue a warning for now  
12983 +// Only issue a warning for now
12984  //                     return -1;
12985                 } else {
12986                         PDEBUG(1, "OV7xx0 initialized (method 2, %dx)", i+1);
12987 @@ -5932,20 +5656,23 @@
12988                 info("Sensor is an OV7610");
12989                 ov->sensor = SEN_OV7610;
12990         } else if ((rc & 3) == 1) {
12991 -               /* I don't know what's different about the 76BE yet */
12992 -               if (i2c_r(ov, 0x15) & 1)
12993 +               /* I don't know what's different about the 76BE yet. */
12994 +               if (i2c_r(ov, 0x15) & 1) {
12995                         info("Sensor is an OV7620AE");
12996 -               else
12997 +                       info("PLEASE REPORT THE EXISTENCE OF THIS SENSOR TO");
12998 +                       info("THE DRIVER AUTHOR");
12999 +               } else {
13000                         info("Sensor is an OV76BE");
13001 +               }
13002  
13003                 /* OV511+ will return all zero isoc data unless we
13004                  * configure the sensor as a 7620. Someone needs to
13005                  * find the exact reg. setting that causes this. */
13006                 if (ov->bridge == BRG_OV511PLUS) {
13007 -                       info("Enabling 511+/7620AE workaround");
13008 +                       info("Enabling 511+/76BE workaround");
13009                         ov->sensor = SEN_OV7620;
13010                 } else {
13011 -                       ov->sensor = SEN_OV7620AE;
13012 +                       ov->sensor = SEN_OV76BE;
13013                 }
13014         } else if ((rc & 3) == 0) {
13015                 info("Sensor is an OV7620");
13016 @@ -5981,7 +5708,7 @@
13017  }
13018  
13019  /* This initializes the OV6620, OV6630, OV6630AE, or OV6630AF sensor. */
13020 -static int 
13021 +static int
13022  ov6xx0_configure(struct usb_ov511 *ov)
13023  {
13024         int rc;
13025 @@ -5995,6 +5722,8 @@
13026                 /* The ratio of 0x0c and 0x0d  controls the white point */
13027                 { OV511_I2C_BUS, 0x0c, 0x24 },
13028                 { OV511_I2C_BUS, 0x0d, 0x24 },
13029 +               { OV511_I2C_BUS, 0x0f, 0x15 }, /* COMS */
13030 +               { OV511_I2C_BUS, 0x10, 0x75 }, /* AEC Exposure time */
13031                 { OV511_I2C_BUS, 0x12, 0x24 }, /* Enable AGC */
13032                 { OV511_I2C_BUS, 0x14, 0x04 },
13033                 /* 0x16: 0x06 helps frame stability with moving objects */
13034 @@ -6006,10 +5735,11 @@
13035                 { OV511_I2C_BUS, 0x2a, 0x04 }, /* Disable framerate adjust */
13036  //             { OV511_I2C_BUS, 0x2b, 0xac }, /* Framerate; Set 2a[7] first */
13037                 { OV511_I2C_BUS, 0x2d, 0x99 },
13038 +               { OV511_I2C_BUS, 0x33, 0xa0 }, /* Color Procesing Parameter */
13039                 { OV511_I2C_BUS, 0x34, 0xd2 }, /* Max A/D range */
13040                 { OV511_I2C_BUS, 0x38, 0x8b },
13041                 { OV511_I2C_BUS, 0x39, 0x40 },
13042 -               
13043 +
13044                 { OV511_I2C_BUS, 0x3c, 0x39 }, /* Enable AEC mode changing */
13045                 { OV511_I2C_BUS, 0x3c, 0x3c }, /* Change AEC mode */
13046                 { OV511_I2C_BUS, 0x3c, 0x24 }, /* Disable AEC mode changing */
13047 @@ -6089,7 +5819,7 @@
13048                  * control the color balance */
13049  //     /*OK?*/ { OV511_I2C_BUS, 0x4a, 0x80 }, // Check these
13050  //     /*OK?*/ { OV511_I2C_BUS, 0x4b, 0x80 },
13051 -//     /*U*/   { OV511_I2C_BUS, 0x4c, 0xd0 }, 
13052 +//     /*U*/   { OV511_I2C_BUS, 0x4c, 0xd0 },
13053         /*d2?*/ { OV511_I2C_BUS, 0x4d, 0x10 }, /* This reduces noise a bit */
13054         /*c1?*/ { OV511_I2C_BUS, 0x4e, 0x40 },
13055         /*04?*/ { OV511_I2C_BUS, 0x4f, 0x07 },
13056 @@ -6107,7 +5837,7 @@
13057         };
13058  
13059         PDEBUG(4, "starting sensor configuration");
13060 -       
13061 +
13062         if (init_ov_sensor(ov) < 0) {
13063                 err("Failed to read sensor ID. You might not have an OV6xx0,");
13064                 err("or it may be not responding. Report this to " EMAIL);
13065 @@ -6122,19 +5852,18 @@
13066         if (rc < 0) {
13067                 err("Error detecting sensor type");
13068                 return -1;
13069 -       } else if ((rc & 3) == 0) {
13070 -               info("Sensor is an OV6630");
13071 +       }
13072 +
13073 +       if ((rc & 3) == 0)
13074                 ov->sensor = SEN_OV6630;
13075 -       } else if ((rc & 3) == 1) {
13076 -               info("Sensor is an OV6620");
13077 +       else if ((rc & 3) == 1)
13078                 ov->sensor = SEN_OV6620;
13079 -       } else if ((rc & 3) == 2) {
13080 -               info("Sensor is an OV6630AE");
13081 +       else if ((rc & 3) == 2)
13082                 ov->sensor = SEN_OV6630;
13083 -       } else if ((rc & 3) == 3) {
13084 -               info("Sensor is an OV6630AF");
13085 +       else if ((rc & 3) == 3)
13086                 ov->sensor = SEN_OV6630;
13087 -       } 
13088 +
13089 +       info("Sensor is an %s", symbolic(senlist, ov->sensor));
13090  
13091         /* Set sensor-specific vars */
13092         ov->maxwidth = 352;
13093 @@ -6157,7 +5886,7 @@
13094                 if (write_regvals(ov, aRegvalsNorm6x30))
13095                         return -1;
13096         }
13097 -       
13098 +
13099         return 0;
13100  }
13101  
13102 @@ -6219,8 +5948,8 @@
13103  }
13104  
13105  /* This initializes the SAA7111A video decoder. */
13106 -static int 
13107 -saa7111a_configure(struct usb_ov511 *ov511)
13108 +static int
13109 +saa7111a_configure(struct usb_ov511 *ov)
13110  {
13111         int rc;
13112  
13113 @@ -6264,45 +5993,51 @@
13114         }
13115  #endif
13116  
13117 -       /* Set sensor-specific vars */
13118 -       ov511->maxwidth = 640;
13119 -       ov511->maxheight = 480;         /* Even/Odd fields */
13120 -       ov511->minwidth = 320;
13121 -       ov511->minheight = 240;         /* Even field only */
13122 -
13123 -       ov511->has_decoder = 1;
13124 -       ov511->num_inputs = 8;
13125 -       ov511->norm = VIDEO_MODE_AUTO;
13126 -       ov511->stop_during_set = 0;     /* Decoder guarantees stable image */
13127 +       /* 640x480 not supported with PAL */
13128 +       if (ov->pal) {
13129 +               ov->maxwidth = 320;
13130 +               ov->maxheight = 240;            /* Even field only */
13131 +       } else {
13132 +               ov->maxwidth = 640;
13133 +               ov->maxheight = 480;            /* Even/Odd fields */
13134 +       }
13135 +
13136 +       ov->minwidth = 320;
13137 +       ov->minheight = 240;            /* Even field only */
13138 +
13139 +       ov->has_decoder = 1;
13140 +       ov->num_inputs = 8;
13141 +       ov->norm = VIDEO_MODE_AUTO;
13142 +       ov->stop_during_set = 0;        /* Decoder guarantees stable image */
13143  
13144         /* Decoder doesn't change these values, so we use these instead of
13145          * acutally reading the registers (which doesn't work) */
13146 -       ov511->brightness = 0x80 << 8;
13147 -       ov511->contrast = 0x40 << 9;
13148 -       ov511->colour = 0x40 << 9;
13149 -       ov511->hue = 32768;
13150 +       ov->brightness = 0x80 << 8;
13151 +       ov->contrast = 0x40 << 9;
13152 +       ov->colour = 0x40 << 9;
13153 +       ov->hue = 32768;
13154  
13155         PDEBUG(4, "Writing SAA7111A registers");
13156 -       if (write_regvals(ov511, aRegvalsNormSAA7111A))
13157 +       if (write_regvals(ov, aRegvalsNormSAA7111A))
13158                 return -1;
13159  
13160         /* Detect version of decoder. This must be done after writing the
13161           * initial regs or the decoder will lock up. */
13162 -       rc = i2c_r(ov511, 0x00);
13163 +       rc = i2c_r(ov, 0x00);
13164  
13165         if (rc < 0) {
13166                 err("Error detecting sensor version");
13167                 return -1;
13168         } else {
13169                 info("Sensor is an SAA7111A (version 0x%x)", rc);
13170 -               ov511->sensor = SEN_SAA7111A;
13171 +               ov->sensor = SEN_SAA7111A;
13172         }
13173  
13174         // FIXME: Fix this for OV518(+)
13175         /* Latch to negative edge of clock. Otherwise, we get incorrect
13176          * colors and jitter in the digital signal. */
13177 -       if (ov511->bclass == BCL_OV511)
13178 -               reg_w(ov511, 0x11, 0x00);
13179 +       if (ov->bclass == BCL_OV511)
13180 +               reg_w(ov, 0x11, 0x00);
13181         else
13182                 warn("SAA7111A not yet supported with OV518/OV518+");
13183  
13184 @@ -6313,8 +6048,6 @@
13185  static int 
13186  ov511_configure(struct usb_ov511 *ov)
13187  {
13188 -       int i;
13189 -
13190         static struct ov511_regvals aRegvalsInit511[] = {
13191                 { OV511_REG_BUS, R51x_SYS_RESET,        0x7f },
13192                 { OV511_REG_BUS, R51x_SYS_INIT,         0x01 },
13193 @@ -6356,26 +6089,19 @@
13194                 goto error;
13195         }
13196  
13197 -       ov->desc = -1;
13198         PDEBUG (1, "CustomID = %d", ov->customid);
13199 -       for (i = 0; clist[i].id >= 0; i++) {
13200 -               if (ov->customid == clist[i].id) {
13201 -                       info("model: %s", clist[i].description);
13202 -                       ov->desc = i;
13203 -                       break;
13204 -               }
13205 -       }
13206 +       ov->desc = symbolic(camlist, ov->customid);
13207 +       info("model: %s", ov->desc);
13208  
13209 -       if (clist[i].id == -1) {
13210 +       if (0 == strcmp(ov->desc, NOT_DEFINED_STR)) {
13211                 err("Camera type (%d) not recognized", ov->customid);
13212                 err("Please notify " EMAIL " of the name,");
13213                 err("manufacturer, model, and this number of your camera.");
13214                 err("Also include the output of the detection process.");
13215         } 
13216  
13217 -       if (clist[i].id == 6) { /* USB Life TV (NTSC) */
13218 -               ov->tuner_type = 8;             /* Temic 4036FY5 3X 1981 */
13219 -       }
13220 +       if (ov->customid == 70)         /* USB Life TV (PAL/SECAM) */
13221 +               ov->pal = 1;
13222  
13223         if (write_regvals(ov, aRegvalsInit511)) goto error;
13224  
13225 @@ -6394,9 +6120,10 @@
13226  
13227         if (ov511_init_compression(ov)) goto error;
13228  
13229 -       ov51x_set_packet_size(ov, 0);
13230 +       ov->packet_numbering = 1;
13231 +       ov511_set_packet_size(ov, 0);
13232  
13233 -       ov->snap_enabled = snapshot;    
13234 +       ov->snap_enabled = snapshot;
13235  
13236         /* Test for 7xx0 */
13237         PDEBUG(3, "Testing for 0V7xx0");
13238 @@ -6415,21 +6142,21 @@
13239                         /* Test for 8xx0 */
13240                         PDEBUG(3, "Testing for 0V8xx0");
13241                         ov->primary_i2c_slave = OV8xx0_SID;
13242 -                       if (ov51x_set_slave_ids(ov, OV8xx0_SID))
13243 +                       if (ov51x_set_slave_ids(ov, OV8xx0_SID) < 0)
13244                                 goto error;
13245  
13246                         if (i2c_w(ov, 0x12, 0x80) < 0) {
13247                                 /* Test for SAA7111A */
13248                                 PDEBUG(3, "Testing for SAA7111A");
13249                                 ov->primary_i2c_slave = SAA7111A_SID;
13250 -                               if (ov51x_set_slave_ids(ov, SAA7111A_SID))
13251 +                               if (ov51x_set_slave_ids(ov, SAA7111A_SID) < 0)
13252                                         goto error;
13253  
13254                                 if (i2c_w(ov, 0x0d, 0x00) < 0) {
13255                                         /* Test for KS0127 */
13256                                         PDEBUG(3, "Testing for KS0127");
13257                                         ov->primary_i2c_slave = KS0127_SID;
13258 -                                       if (ov51x_set_slave_ids(ov, KS0127_SID))
13259 +                                       if (ov51x_set_slave_ids(ov, KS0127_SID) < 0)
13260                                                 goto error;
13261  
13262                                         if (i2c_w(ov, 0x10, 0x00) < 0) {
13263 @@ -6473,9 +6200,10 @@
13264  }
13265  
13266  /* This initializes the OV518/OV518+ and the sensor */
13267 -static int 
13268 +static int
13269  ov518_configure(struct usb_ov511 *ov)
13270  {
13271 +       /* For 518 and 518+ */
13272         static struct ov511_regvals aRegvalsInit518[] = {
13273                 { OV511_REG_BUS, R51x_SYS_RESET,        0x40 },
13274                 { OV511_REG_BUS, R51x_SYS_INIT,         0xe1 },
13275 @@ -6488,8 +6216,6 @@
13276                 { OV511_DONE_BUS, 0x0, 0x00},
13277         };
13278  
13279 -       /* New values, based on Windows driver. Since what they do is not
13280 -        * known yet, this may be incorrect. */
13281         static struct ov511_regvals aRegvalsNorm518[] = {
13282                 { OV511_REG_BUS, R51x_SYS_SNAP,         0x02 }, /* Reset */
13283                 { OV511_REG_BUS, R51x_SYS_SNAP,         0x01 }, /* Enable */
13284 @@ -6503,11 +6229,33 @@
13285                 { OV511_DONE_BUS, 0x0, 0x00 },
13286         };
13287  
13288 +       static struct ov511_regvals aRegvalsNorm518Plus[] = {
13289 +               { OV511_REG_BUS, R51x_SYS_SNAP,         0x02 }, /* Reset */
13290 +               { OV511_REG_BUS, R51x_SYS_SNAP,         0x01 }, /* Enable */
13291 +               { OV511_REG_BUS, 0x31,                  0x0f },
13292 +               { OV511_REG_BUS, 0x5d,                  0x03 },
13293 +               { OV511_REG_BUS, 0x24,                  0x9f },
13294 +               { OV511_REG_BUS, 0x25,                  0x90 },
13295 +               { OV511_REG_BUS, 0x20,                  0x60 }, /* Was 0x08 */
13296 +               { OV511_REG_BUS, 0x51,                  0x02 },
13297 +               { OV511_REG_BUS, 0x71,                  0x19 },
13298 +               { OV511_REG_BUS, 0x40,                  0xff },
13299 +               { OV511_REG_BUS, 0x41,                  0x42 },
13300 +               { OV511_REG_BUS, 0x46,                  0x00 },
13301 +               { OV511_REG_BUS, 0x33,                  0x04 },
13302 +               { OV511_REG_BUS, 0x21,                  0x19 },
13303 +               { OV511_REG_BUS, 0x3f,                  0x10 },
13304 +               { OV511_DONE_BUS, 0x0, 0x00 },
13305 +       };
13306 +
13307         PDEBUG(4, "");
13308  
13309         /* First 5 bits of custom ID reg are a revision ID on OV518 */
13310         info("Device revision %d", 0x1F & reg_r(ov, R511_SYS_CUST_ID));
13311  
13312 +       /* Give it the default description */
13313 +       ov->desc = symbolic(camlist, 0);
13314 +
13315         if (write_regvals(ov, aRegvalsInit518)) goto error;
13316  
13317         /* Set LED GPIO pin to output mode */
13318 @@ -6526,13 +6274,25 @@
13319                 warn("Compression required with OV518...enabling");
13320         }
13321  
13322 -       if (write_regvals(ov, aRegvalsNorm518)) goto error;
13323 +       if (ov->bridge == BRG_OV518) {
13324 +               if (write_regvals(ov, aRegvalsNorm518)) goto error;
13325 +       } else if (ov->bridge == BRG_OV518PLUS) {
13326 +               if (write_regvals(ov, aRegvalsNorm518Plus)) goto error;
13327 +       } else {
13328 +               err("Invalid bridge");
13329 +       }
13330  
13331         if (reg_w(ov, 0x2f, 0x80) < 0) goto error;
13332  
13333         if (ov518_init_compression(ov)) goto error;
13334  
13335 -       ov51x_set_packet_size(ov, 0);
13336 +       /* OV518+ has packet numbering turned on by default */
13337 +       if (ov->bridge == BRG_OV518)
13338 +               ov->packet_numbering = 0;
13339 +       else
13340 +               ov->packet_numbering = 1;
13341 +
13342 +       ov518_set_packet_size(ov, 0);
13343  
13344         ov->snap_enabled = snapshot;
13345  
13346 @@ -6577,9 +6337,8 @@
13347                 }
13348         }
13349  
13350 -       // FIXME: Sizes > 320x240 are not working yet
13351 -       ov->maxwidth = 320;
13352 -       ov->maxheight = 240;
13353 +       ov->maxwidth = 352;
13354 +       ov->maxheight = 288;
13355  
13356         // The OV518 cannot go as low as the sensor can
13357         ov->minwidth = 160;
13358 @@ -6640,46 +6399,42 @@
13359         ov->lightfreq = lightfreq;
13360         ov->num_inputs = 1;        /* Video decoder init functs. change this */
13361         ov->stop_during_set = !fastset;
13362 -       ov->tuner_type = tuner;
13363         ov->backlight = backlight;
13364 -
13365 +       ov->mirror = mirror;
13366         ov->auto_brt = autobright;
13367         ov->auto_gain = autogain;
13368         ov->auto_exp = autoexp;
13369  
13370         switch (dev->descriptor.idProduct) {
13371         case PROD_OV511:
13372 -               info("USB OV511 camera found");
13373                 ov->bridge = BRG_OV511;
13374                 ov->bclass = BCL_OV511;
13375                 break;
13376         case PROD_OV511PLUS:
13377 -               info("USB OV511+ camera found");
13378                 ov->bridge = BRG_OV511PLUS;
13379                 ov->bclass = BCL_OV511;
13380                 break;
13381         case PROD_OV518:
13382 -               info("USB OV518 camera found");
13383                 ov->bridge = BRG_OV518;
13384                 ov->bclass = BCL_OV518;
13385                 break;
13386         case PROD_OV518PLUS:
13387 -               info("USB OV518+ camera found");
13388                 ov->bridge = BRG_OV518PLUS;
13389                 ov->bclass = BCL_OV518;
13390                 break;
13391         case PROD_ME2CAM:
13392                 if (dev->descriptor.idVendor != VEND_MATTEL)
13393                         goto error;
13394 -               info("Intel Play Me2Cam (OV511+) found");
13395                 ov->bridge = BRG_OV511PLUS;
13396                 ov->bclass = BCL_OV511;
13397                 break;
13398         default:
13399 -               err("Unknown product ID 0x%x", dev->descriptor.idProduct);
13400 +               err("Unknown product ID 0x%04x", dev->descriptor.idProduct);
13401                 goto error_dealloc;
13402         }
13403  
13404 +       info("USB %s video device found", symbolic(brglist, ov->bridge));
13405 +
13406         /* Workaround for some applications that want data in RGB
13407          * instead of BGR. */
13408         if (force_rgb)
13409 @@ -6713,6 +6468,12 @@
13410                 init_waitqueue_head(&ov->frame[i].wq);
13411         }
13412  
13413 +       for (i = 0; i < OV511_NUMSBUF; i++) {
13414 +               ov->sbuf[i].ov = ov;
13415 +               spin_lock_init(&ov->sbuf[i].lock);
13416 +               ov->sbuf[i].n = i;
13417 +       }
13418 +
13419         /* Unnecessary? (This is done on open(). Need to make sure variables
13420          * are properly initialized without this before removing it, though). */
13421         if (ov51x_set_default_params(ov) < 0)
13422 @@ -6747,12 +6508,14 @@
13423  
13424         info("Device registered on minor %d", ov->vdev.minor);
13425  
13426 +#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
13427 +       create_proc_ov511_cam(ov);
13428 +#endif
13429 +
13430         MOD_DEC_USE_COUNT;
13431         return ov;
13432  
13433  error:
13434 -       err("Camera initialization failed");
13435 -
13436  #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
13437         /* Safe to call even if entry doesn't exist */
13438         destroy_proc_ov511_cam(ov);
13439 @@ -6765,9 +6528,6 @@
13440                 up(&ov->cbuf_lock);
13441         }
13442  
13443 -       usb_driver_release_interface(&ov511_driver,
13444 -               &dev->actconfig->interface[ov->iface]);
13445 -
13446  error_dealloc:
13447         if (ov) {
13448                 kfree(ov);
13449 @@ -6776,6 +6536,7 @@
13450  
13451  error_out:
13452         MOD_DEC_USE_COUNT;
13453 +       err("Camera initialization failed");
13454         return NULL;
13455  }
13456  
13457 @@ -6810,22 +6571,12 @@
13458  
13459         ov->streaming = 0;
13460  
13461 -       /* Unschedule all of the iso td's */
13462 -       for (n = OV511_NUMSBUF - 1; n >= 0; n--) {
13463 -               if (ov->sbuf[n].urb) {
13464 -                       ov->sbuf[n].urb->next = NULL;
13465 -                       usb_unlink_urb(ov->sbuf[n].urb);
13466 -                       usb_free_urb(ov->sbuf[n].urb);
13467 -                       ov->sbuf[n].urb = NULL;
13468 -               }
13469 -       }
13470 +       ov51x_unlink_isoc(ov);
13471  
13472  #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
13473          destroy_proc_ov511_cam(ov);
13474  #endif
13475  
13476 -       usb_driver_release_interface(&ov511_driver,
13477 -               &ov->dev->actconfig->interface[ov->iface]);
13478         ov->dev = NULL;
13479  
13480         /* Free the memory */
13481 @@ -6858,7 +6609,7 @@
13482   ***************************************************************************/
13483  
13484  /* Returns 0 for success */
13485 -int 
13486 +int
13487  ov511_register_decomp_module(int ver, struct ov51x_decomp_ops *ops, int ov518,
13488                              int mmx)
13489  {
13490 @@ -6915,7 +6666,7 @@
13491         return -EBUSY;
13492  }
13493  
13494 -void 
13495 +void
13496  ov511_deregister_decomp_module(int ov518, int mmx)
13497  {
13498         lock_kernel();
13499 @@ -6931,13 +6682,13 @@
13500                 else
13501                         ov511_decomp_ops = NULL;
13502         }
13503 -       
13504 +
13505         MOD_DEC_USE_COUNT;
13506  
13507         unlock_kernel();
13508  }
13509  
13510 -static int __init 
13511 +static int __init
13512  usb_ov511_init(void)
13513  {
13514  #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
13515 @@ -6947,11 +6698,8 @@
13516         if (usb_register(&ov511_driver) < 0)
13517                 return -1;
13518  
13519 -       // FIXME: Don't know how to determine this yet
13520 -       ov51x_mmx_available = 0;
13521 -
13522  #if defined (__i386__)
13523 -       if (test_bit(X86_FEATURE_MMX, &boot_cpu_data.x86_capability))
13524 +       if (test_bit(X86_FEATURE_MMX, boot_cpu_data.x86_capability))
13525                 ov51x_mmx_available = 1;
13526  #endif
13527  
13528 @@ -6960,7 +6708,7 @@
13529         return 0;
13530  }
13531  
13532 -static void __exit 
13533 +static void __exit
13534  usb_ov511_exit(void)
13535  {
13536         usb_deregister(&ov511_driver);
13537 @@ -6974,6 +6722,5 @@
13538  module_init(usb_ov511_init);
13539  module_exit(usb_ov511_exit);
13540  
13541 -/* No version, for compatibility with binary-only modules */
13542 -EXPORT_SYMBOL_NOVERS(ov511_register_decomp_module);
13543 -EXPORT_SYMBOL_NOVERS(ov511_deregister_decomp_module);
13544 +EXPORT_SYMBOL(ov511_register_decomp_module);
13545 +EXPORT_SYMBOL(ov511_deregister_decomp_module);
13546 diff -Nur linux-2.4.19.old/drivers/usb/ov511.h linux-2.4.19/drivers/usb/ov511.h
13547 --- linux-2.4.19.old/drivers/usb/ov511.h        Sat Aug  3 02:39:45 2002
13548 +++ linux-2.4.19/drivers/usb/ov511.h    Mon Nov 25 12:26:55 2002
13549 @@ -10,8 +10,8 @@
13550  
13551  #ifdef OV511_DEBUG
13552         #define PDEBUG(level, fmt, args...) \
13553 -               if (debug >= (level)) info("[" __PRETTY_FUNCTION__ ":%d] " fmt,\
13554 -               __LINE__ , ## args)
13555 +               if (debug >= (level)) info("[%s:%d] " fmt, \
13556 +               __PRETTY_FUNCTION__, __LINE__ , ## args)
13557  #else
13558         #define PDEBUG(level, fmt, args...) do {} while(0)
13559  #endif
13560 @@ -243,6 +243,16 @@
13561  
13562  #define OV511_ENDPOINT_ADDRESS 1       /* Isoc endpoint number */
13563  
13564 +#define OV511_NUMFRAMES        2
13565 +#if OV511_NUMFRAMES > VIDEO_MAX_FRAME
13566 +       #error "OV511_NUMFRAMES is too high"
13567 +#endif
13568 +
13569 +#define OV511_NUMSBUF          2
13570 +
13571 +/* Control transfers use up to 4 bytes */
13572 +#define OV511_CBUF_SIZE                4
13573 +
13574  /* Bridge types */
13575  enum {
13576         BRG_UNKNOWN,
13577 @@ -376,9 +386,14 @@
13578                                struct ov511_i2c_struct)
13579  /* ------------- End IOCTL interface -------------- */
13580  
13581 +struct usb_ov511;              /* Forward declaration */
13582 +
13583  struct ov511_sbuf {
13584 -       char *data;
13585 +       struct usb_ov511 *ov;
13586 +       unsigned char *data;
13587         struct urb *urb;
13588 +       spinlock_t lock;
13589 +       int n;
13590  };
13591  
13592  enum {
13593 @@ -401,9 +416,10 @@
13594  
13595  struct ov511_frame {
13596         int framenum;           /* Index of this frame */
13597 -       char *data;             /* Frame buffer */
13598 -       char *tempdata;         /* Temp buffer for multi-stage conversions */
13599 -       char *rawdata;          /* Raw camera data buffer */
13600 +       unsigned char *data;    /* Frame buffer */
13601 +       unsigned char *tempdata; /* Temp buffer for multi-stage conversions */
13602 +       unsigned char *rawdata; /* Raw camera data buffer */
13603 +       unsigned char *compbuf; /* Temp buffer for decompressor */
13604  
13605         int depth;              /* Bytes per pixel */
13606         int width;              /* Width application is expecting */
13607 @@ -428,27 +444,19 @@
13608         int snapshot;           /* True if frame was a snapshot */
13609  };
13610  
13611 -#define DECOMP_INTERFACE_VER 2
13612 +#define DECOMP_INTERFACE_VER 4
13613  
13614  /* Compression module operations */
13615  struct ov51x_decomp_ops {
13616 -       int (*decomp_400)(unsigned char *, unsigned char *, int, int, int);
13617 -       int (*decomp_420)(unsigned char *, unsigned char *, int, int, int);
13618 -       int (*decomp_422)(unsigned char *, unsigned char *, int, int, int);
13619 -       void (*decomp_lock)(void);
13620 -       void (*decomp_unlock)(void);
13621 +       int (*decomp_400)(unsigned char *, unsigned char *, unsigned char *,
13622 +                         int, int, int);
13623 +       int (*decomp_420)(unsigned char *, unsigned char *, unsigned char *,
13624 +                         int, int, int);
13625 +       int (*decomp_422)(unsigned char *, unsigned char *, unsigned char *,
13626 +                         int, int, int);
13627 +       struct module *owner;
13628  };
13629  
13630 -#define OV511_NUMFRAMES        2
13631 -#if OV511_NUMFRAMES > VIDEO_MAX_FRAME
13632 -       #error "OV511_NUMFRAMES is too high"
13633 -#endif
13634 -
13635 -#define OV511_NUMSBUF          2
13636 -
13637 -/* Control transfers use up to 4 bytes */
13638 -#define OV511_CBUF_SIZE                4
13639 -
13640  struct usb_ov511 {
13641         struct video_device vdev;
13642  
13643 @@ -456,7 +464,7 @@
13644         struct usb_device *dev;
13645  
13646         int customid;
13647 -       int desc;
13648 +       char *desc;
13649         unsigned char iface;
13650  
13651         /* Determined by sensor type */
13652 @@ -475,6 +483,7 @@
13653         int auto_gain;          /* Auto gain control enabled flag */
13654         int auto_exp;           /* Auto exposure enabled flag */
13655         int backlight;          /* Backlight exposure algorithm flag */
13656 +       int mirror;             /* Image is reversed horizontally */
13657  
13658         int led_policy;         /* LED: off|on|auto; OV511+ only */
13659  
13660 @@ -490,9 +499,9 @@
13661         int lightfreq;          /* Power (lighting) frequency */
13662         int bandfilt;           /* Banding filter enabled flag */
13663  
13664 -       char *fbuf;             /* Videodev buffer area */
13665 -       char *tempfbuf;         /* Temporary (intermediate) buffer area */
13666 -       char *rawfbuf;          /* Raw camera data buffer area */
13667 +       unsigned char *fbuf;    /* Videodev buffer area */
13668 +       unsigned char *tempfbuf; /* Temporary (intermediate) buffer area */
13669 +       unsigned char *rawfbuf; /* Raw camera data buffer area */
13670  
13671         int sub_flag;           /* Pix Array subcapture on flag */
13672         int subx;               /* Pix Array subcapture x offset */
13673 @@ -513,9 +522,9 @@
13674         int bclass;             /* Class of bridge (BCL_*) */
13675         int sensor;             /* Type of image sensor chip (SEN_*) */
13676         int sclass;             /* Type of image sensor chip (SCL_*) */
13677 -       int tuner;              /* Type of TV tuner */
13678  
13679         int packet_size;        /* Frame size per isoc desc */
13680 +       int packet_numbering;   /* Is ISO frame numbering enabled? */
13681  
13682         struct semaphore param_lock;    /* params lock for this camera */
13683  
13684 @@ -542,12 +551,9 @@
13685         int num_inputs;         /* Number of inputs */
13686         int norm;               /* NTSC / PAL / SECAM */
13687         int has_decoder;        /* Device has a video decoder */
13688 -       int has_tuner;          /* Device has a TV tuner */
13689 -       int has_audio_proc;     /* Device has an audio processor */
13690 -       int freq;               /* Current tuner frequency */
13691 -       int tuner_type;         /* Specific tuner model */
13692 +       int pal;                /* Device is designed for PAL resolution */
13693  
13694 -       /* I2C interface to kernel */
13695 +       /* I2C interface */
13696         struct semaphore i2c_lock;        /* Protect I2C controller regs */
13697         unsigned char primary_i2c_slave;  /* I2C write id of sensor */
13698  
13699 @@ -556,27 +562,28 @@
13700         struct semaphore cbuf_lock;
13701  };
13702  
13703 -struct cam_list {
13704 -       int id;
13705 -       char *description;
13706 -};
13707 -
13708 -struct palette_list {
13709 +/* Used to represent a list of values and their respective symbolic names */
13710 +struct symbolic_list {
13711         int num;
13712         char *name;
13713  };
13714  
13715 -struct mode_list_518 {
13716 -       int width;
13717 -       int height;
13718 -       u8 reg28;
13719 -       u8 reg29;
13720 -       u8 reg2a;
13721 -       u8 reg2c;
13722 -       u8 reg2e;
13723 -       u8 reg24;
13724 -       u8 reg25;
13725 -};
13726 +#define NOT_DEFINED_STR "Unknown"
13727 +
13728 +/* Returns the name of the matching element in the symbolic_list array. The
13729 + * end of the list must be marked with an element that has a NULL name.
13730 + */
13731 +static inline char * 
13732 +symbolic(struct symbolic_list list[], int num)
13733 +{
13734 +       int i;
13735 +
13736 +       for (i = 0; list[i].name != NULL; i++)
13737 +                       if (list[i].num == num)
13738 +                               return (list[i].name);
13739 +
13740 +       return (NOT_DEFINED_STR);
13741 +}
13742  
13743  /* Compression stuff */
13744  
13745 diff -Nur linux-2.4.19.old/drivers/usb/pegasus.c linux-2.4.19/drivers/usb/pegasus.c
13746 --- linux-2.4.19.old/drivers/usb/pegasus.c      Sat Aug  3 02:39:45 2002
13747 +++ linux-2.4.19/drivers/usb/pegasus.c  Mon Nov 25 12:26:55 2002
13748 @@ -1,46 +1,31 @@
13749  /*
13750 -**     Pegasus: USB 10/100Mbps/HomePNA (1Mbps) Controller
13751 -**
13752 -**     Copyright (c) 1999-2002 Petko Manolov (petkan@users.sourceforge.net)
13753 -**     
13754 -**
13755 -**     ChangeLog:
13756 -**             ....    Most of the time spend reading sources & docs.
13757 -**             v0.2.x  First official release for the Linux kernel.
13758 -**             v0.3.0  Beutified and structured, some bugs fixed.
13759 -**             v0.3.x  URBifying bulk requests and bugfixing. First relatively
13760 -**                     stable release. Still can touch device's registers only
13761 -**                     from top-halves.
13762 -**             v0.4.0  Control messages remained unurbified are now URBs.
13763 -**                     Now we can touch the HW at any time.
13764 -**             v0.4.9  Control urbs again use process context to wait. Argh...
13765 -**                     Some long standing bugs (enable_net_traffic) fixed.
13766 -**                     Also nasty trick about resubmiting control urb from
13767 -**                     interrupt context used. Please let me know how it
13768 -**                     behaves. Pegasus II support added since this version.
13769 -**                     TODO: suppressing HCD warnings spewage on disconnect.
13770 -**             v0.4.13 Ethernet address is now set at probe(), not at open()
13771 -**                     time as this seems to break dhcpd. 
13772 -**             v0.4.25 ethtool support added.
13773 -*/
13774 -
13775 -/*
13776 - * This program is free software; you can redistribute it and/or modify
13777 - * it under the terms of the GNU General Public License as published by
13778 - * the Free Software Foundation; either version 2 of the License, or
13779 - * (at your option) any later version.
13780 + *  Copyright (c) 1999-2002 Petko Manolov (petkan@users.sourceforge.net)
13781   *
13782 - * This program is distributed in the hope that it will be useful,
13783 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
13784 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13785 - * GNU General Public License for more details.
13786 + * This program is free software; you can redistribute it and/or modify
13787 + * it under the terms of the GNU General Public License version 2 as
13788 + * published by the Free Software Foundation.
13789 + *     
13790   *
13791 - * You should have received a copy of the GNU General Public License
13792 - * along with this program; if not, write to the Free Software
13793 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
13794 + *     ChangeLog:
13795 + *             ....    Most of the time spend reading sources & docs.
13796 + *             v0.2.x  First official release for the Linux kernel.
13797 + *             v0.3.0  Beutified and structured, some bugs fixed.
13798 + *             v0.3.x  URBifying bulk requests and bugfixing. First relatively
13799 + *                     stable release. Still can touch device's registers only
13800 + *                     from top-halves.
13801 + *             v0.4.0  Control messages remained unurbified are now URBs.
13802 + *                     Now we can touch the HW at any time.
13803 + *             v0.4.9  Control urbs again use process context to wait. Argh...
13804 + *                     Some long standing bugs (enable_net_traffic) fixed.
13805 + *                     Also nasty trick about resubmiting control urb from
13806 + *                     interrupt context used. Please let me know how it
13807 + *                     behaves. Pegasus II support added since this version.
13808 + *                     TODO: suppressing HCD warnings spewage on disconnect.
13809 + *             v0.4.13 Ethernet address is now set at probe(), not at open()
13810 + *                     time as this seems to break dhcpd. 
13811 + *             v0.4.25 ethtool support added.
13812   */
13813  
13814 -
13815  #include <linux/sched.h>
13816  #include <linux/slab.h>
13817  #include <linux/init.h>
13818 @@ -69,7 +54,6 @@
13819  static int loopback = 0;
13820  static int mii_mode = 1;
13821  static int multicast_filter_limit = 32;
13822 -static DECLARE_MUTEX(gsem);
13823  
13824  static struct usb_eth_dev usb_dev_id[] = {
13825  #define        PEGASUS_DEV(pn, vid, pid, flags)        \
13826 @@ -84,104 +68,102 @@
13827         {match_flags: USB_DEVICE_ID_MATCH_DEVICE, idVendor:vid, idProduct:pid},
13828  #include "pegasus.h"
13829  #undef PEGASUS_DEV
13830 -       { }
13831 +       {}
13832  };
13833  
13834 -
13835 -MODULE_AUTHOR( DRIVER_AUTHOR );
13836 -MODULE_DESCRIPTION( DRIVER_DESC );
13837 +MODULE_AUTHOR(DRIVER_AUTHOR);
13838 +MODULE_DESCRIPTION(DRIVER_DESC);
13839  MODULE_LICENSE("GPL");
13840  MODULE_PARM(loopback, "i");
13841  MODULE_PARM(mii_mode, "i");
13842  MODULE_PARM_DESC(loopback, "Enable MAC loopback mode (bit 0)");
13843  MODULE_PARM_DESC(mii_mode, "Enable HomePNA mode (bit 0),default=MII mode = 0");
13844  
13845 -MODULE_DEVICE_TABLE (usb, pegasus_ids);
13846 -
13847 +MODULE_DEVICE_TABLE(usb, pegasus_ids);
13848  
13849 -static int update_eth_regs_async( pegasus_t * );
13850 +static int update_eth_regs_async(pegasus_t *);
13851  /* Aargh!!! I _really_ hate such tweaks */
13852 -static void ctrl_callback( struct urb *urb )
13853 +static void ctrl_callback(struct urb *urb)
13854  {
13855 -       pegasus_t       *pegasus = urb->context;
13856 +       pegasus_t *pegasus = urb->context;
13857  
13858 -       if ( !pegasus )
13859 +       if (!pegasus)
13860                 return;
13861  
13862 -       switch ( urb->status ) {
13863 -               case 0:
13864 -                       if ( pegasus->flags & ETH_REGS_CHANGE ) {
13865 -                               pegasus->flags &= ~ETH_REGS_CHANGE;
13866 -                               pegasus->flags |= ETH_REGS_CHANGED;
13867 -                               update_eth_regs_async( pegasus );
13868 -                               return;
13869 -                       }
13870 -                       break;
13871 -               case -EINPROGRESS:
13872 +       switch (urb->status) {
13873 +       case 0:
13874 +               if (pegasus->flags & ETH_REGS_CHANGE) {
13875 +                       pegasus->flags &= ~ETH_REGS_CHANGE;
13876 +                       pegasus->flags |= ETH_REGS_CHANGED;
13877 +                       update_eth_regs_async(pegasus);
13878                         return;
13879 -               case -ENOENT:
13880 -                       break;
13881 -               default:
13882 -                       warn("%s: status %d", __FUNCTION__, urb->status);
13883 +               }
13884 +               break;
13885 +       case -EINPROGRESS:
13886 +               return;
13887 +       case -ENOENT:
13888 +               break;
13889 +       default:
13890 +               warn("%s: status %d", __FUNCTION__, urb->status);
13891         }
13892         pegasus->flags &= ~ETH_REGS_CHANGED;
13893 -       wake_up(&pegasus->ctrl_wait );
13894 +       wake_up(&pegasus->ctrl_wait);
13895  }
13896  
13897 -
13898 -static int get_registers(pegasus_t *pegasus, __u16 indx, __u16 size, void *data)
13899 +static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
13900 +                        void *data)
13901  {
13902 -       int     ret;
13903 +       int ret;
13904         unsigned char *buffer;
13905         DECLARE_WAITQUEUE(wait, current);
13906  
13907 -       buffer = kmalloc(size,GFP_KERNEL);
13908 +       buffer = kmalloc(size, GFP_KERNEL);
13909         if (!buffer) {
13910                 err("unable to allocate memory for configuration descriptors");
13911                 return 0;
13912         }
13913 -       memcpy(buffer,data,size);
13914 +       memcpy(buffer, data, size);
13915  
13916         add_wait_queue(&pegasus->ctrl_wait, &wait);
13917         set_current_state(TASK_UNINTERRUPTIBLE);
13918 -       while ( pegasus->flags & ETH_REGS_CHANGED )
13919 +       while (pegasus->flags & ETH_REGS_CHANGED)
13920                 schedule();
13921         remove_wait_queue(&pegasus->ctrl_wait, &wait);
13922         set_current_state(TASK_RUNNING);
13923  
13924 -       pegasus->dr.requesttype = PEGASUS_REQT_READ;
13925 -       pegasus->dr.request = PEGASUS_REQ_GET_REGS;
13926 -       pegasus->dr.value = cpu_to_le16 (0);
13927 -       pegasus->dr.index = cpu_to_le16p(&indx);
13928 -       pegasus->dr.length = cpu_to_le16p(&size);
13929 +       pegasus->dr.bRequestType = PEGASUS_REQT_READ;
13930 +       pegasus->dr.bRequest = PEGASUS_REQ_GET_REGS;
13931 +       pegasus->dr.wValue = cpu_to_le16(0);
13932 +       pegasus->dr.wIndex = cpu_to_le16p(&indx);
13933 +       pegasus->dr.wLength = cpu_to_le16p(&size);
13934         pegasus->ctrl_urb->transfer_buffer_length = size;
13935  
13936 -       FILL_CONTROL_URB( pegasus->ctrl_urb, pegasus->usb,
13937 -                         usb_rcvctrlpipe(pegasus->usb,0),
13938 -                         (char *)&pegasus->dr,
13939 -                         buffer, size, ctrl_callback, pegasus );
13940 +       FILL_CONTROL_URB(pegasus->ctrl_urb, pegasus->usb,
13941 +                        usb_rcvctrlpipe(pegasus->usb, 0),
13942 +                        (char *) &pegasus->dr,
13943 +                        buffer, size, ctrl_callback, pegasus);
13944  
13945 -       add_wait_queue( &pegasus->ctrl_wait, &wait );
13946 -       set_current_state( TASK_UNINTERRUPTIBLE );
13947 +       add_wait_queue(&pegasus->ctrl_wait, &wait);
13948 +       set_current_state(TASK_UNINTERRUPTIBLE);
13949  
13950 -       if ( (ret = usb_submit_urb( pegasus->ctrl_urb )) ) {
13951 +       if ((ret = usb_submit_urb(pegasus->ctrl_urb))) {
13952                 err("%s: BAD CTRLs %d", __FUNCTION__, ret);
13953                 goto out;
13954         }
13955  
13956         schedule();
13957  out:
13958 -       remove_wait_queue( &pegasus->ctrl_wait, &wait );
13959 -       memcpy(data,buffer,size);
13960 +       remove_wait_queue(&pegasus->ctrl_wait, &wait);
13961 +       memcpy(data, buffer, size);
13962         kfree(buffer);
13963  
13964         return ret;
13965  }
13966  
13967 -
13968 -static int set_registers(pegasus_t *pegasus, __u16 indx, __u16 size, void *data)
13969 +static int set_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
13970 +                        void *data)
13971  {
13972 -       int     ret;
13973 +       int ret;
13974         unsigned char *buffer;
13975         DECLARE_WAITQUEUE(wait, current);
13976  
13977 @@ -194,47 +176,46 @@
13978  
13979         add_wait_queue(&pegasus->ctrl_wait, &wait);
13980         set_current_state(TASK_UNINTERRUPTIBLE);
13981 -       while ( pegasus->flags & ETH_REGS_CHANGED )
13982 +       while (pegasus->flags & ETH_REGS_CHANGED)
13983                 schedule();
13984         remove_wait_queue(&pegasus->ctrl_wait, &wait);
13985         set_current_state(TASK_RUNNING);
13986  
13987 -       pegasus->dr.requesttype = PEGASUS_REQT_WRITE;
13988 -       pegasus->dr.request = PEGASUS_REQ_SET_REGS;
13989 -       pegasus->dr.value = cpu_to_le16 (0);
13990 -       pegasus->dr.index = cpu_to_le16p( &indx );
13991 -       pegasus->dr.length = cpu_to_le16p( &size );
13992 +       pegasus->dr.bRequestType = PEGASUS_REQT_WRITE;
13993 +       pegasus->dr.bRequest = PEGASUS_REQ_SET_REGS;
13994 +       pegasus->dr.wValue = cpu_to_le16(0);
13995 +       pegasus->dr.wIndex = cpu_to_le16p(&indx);
13996 +       pegasus->dr.wLength = cpu_to_le16p(&size);
13997         pegasus->ctrl_urb->transfer_buffer_length = size;
13998  
13999 -       FILL_CONTROL_URB( pegasus->ctrl_urb, pegasus->usb,
14000 -                         usb_sndctrlpipe(pegasus->usb,0),
14001 -                         (char *)&pegasus->dr,
14002 -                         buffer, size, ctrl_callback, pegasus );
14003 -                         
14004 -       add_wait_queue( &pegasus->ctrl_wait, &wait );
14005 -       set_current_state( TASK_UNINTERRUPTIBLE );
14006 +       FILL_CONTROL_URB(pegasus->ctrl_urb, pegasus->usb,
14007 +                        usb_sndctrlpipe(pegasus->usb, 0),
14008 +                        (char *) &pegasus->dr,
14009 +                        buffer, size, ctrl_callback, pegasus);
14010  
14011 -       if ( (ret = usb_submit_urb( pegasus->ctrl_urb )) ) {
14012 +       add_wait_queue(&pegasus->ctrl_wait, &wait);
14013 +       set_current_state(TASK_UNINTERRUPTIBLE);
14014 +
14015 +       if ((ret = usb_submit_urb(pegasus->ctrl_urb))) {
14016                 err("%s: BAD CTRL %d", __FUNCTION__, ret);
14017                 goto out;
14018         }
14019 -       
14020 +
14021         schedule();
14022  out:
14023 -       remove_wait_queue( &pegasus->ctrl_wait, &wait );
14024 +       remove_wait_queue(&pegasus->ctrl_wait, &wait);
14025         kfree(buffer);
14026 -       
14027 +
14028         return ret;
14029  }
14030  
14031 -
14032 -static int set_register( pegasus_t *pegasus, __u16 indx, __u8 data )
14033 +static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data)
14034  {
14035 -       int     ret;
14036 +       int ret;
14037         unsigned char *buffer;
14038         __u16 dat = data;
14039         DECLARE_WAITQUEUE(wait, current);
14040 -       
14041 +
14042         buffer = kmalloc(1, GFP_KERNEL);
14043         if (!buffer) {
14044                 err("unable to allocate memory for configuration descriptors");
14045 @@ -244,129 +225,126 @@
14046  
14047         add_wait_queue(&pegasus->ctrl_wait, &wait);
14048         set_current_state(TASK_UNINTERRUPTIBLE);
14049 -       while ( pegasus->flags & ETH_REGS_CHANGED )
14050 +       while (pegasus->flags & ETH_REGS_CHANGED)
14051                 schedule();
14052         remove_wait_queue(&pegasus->ctrl_wait, &wait);
14053         set_current_state(TASK_RUNNING);
14054  
14055 -       pegasus->dr.requesttype = PEGASUS_REQT_WRITE;
14056 -       pegasus->dr.request = PEGASUS_REQ_SET_REG;
14057 -       pegasus->dr.value = cpu_to_le16p( &dat);
14058 -       pegasus->dr.index = cpu_to_le16p( &indx );
14059 -       pegasus->dr.length = cpu_to_le16( 1 );
14060 +       pegasus->dr.bRequestType = PEGASUS_REQT_WRITE;
14061 +       pegasus->dr.bRequest = PEGASUS_REQ_SET_REG;
14062 +       pegasus->dr.wValue = cpu_to_le16p(&dat);
14063 +       pegasus->dr.wIndex = cpu_to_le16p(&indx);
14064 +       pegasus->dr.wLength = cpu_to_le16(1);
14065         pegasus->ctrl_urb->transfer_buffer_length = 1;
14066  
14067 -       FILL_CONTROL_URB( pegasus->ctrl_urb, pegasus->usb,
14068 -                         usb_sndctrlpipe(pegasus->usb,0),
14069 -                         (char *)&pegasus->dr,
14070 -                         buffer, 1, ctrl_callback, pegasus );
14071 +       FILL_CONTROL_URB(pegasus->ctrl_urb, pegasus->usb,
14072 +                        usb_sndctrlpipe(pegasus->usb, 0),
14073 +                        (char *) &pegasus->dr,
14074 +                        buffer, 1, ctrl_callback, pegasus);
14075  
14076 -       add_wait_queue( &pegasus->ctrl_wait, &wait );
14077 -       set_current_state( TASK_UNINTERRUPTIBLE );
14078 +       add_wait_queue(&pegasus->ctrl_wait, &wait);
14079 +       set_current_state(TASK_UNINTERRUPTIBLE);
14080  
14081 -       if ( (ret = usb_submit_urb( pegasus->ctrl_urb )) ) {
14082 +       if ((ret = usb_submit_urb(pegasus->ctrl_urb))) {
14083                 err("%s: BAD CTRL %d", __FUNCTION__, ret);
14084                 goto out;
14085         }
14086  
14087         schedule();
14088  out:
14089 -       remove_wait_queue( &pegasus->ctrl_wait, &wait );
14090 +       remove_wait_queue(&pegasus->ctrl_wait, &wait);
14091         kfree(buffer);
14092  
14093         return ret;
14094  }
14095  
14096 -
14097 -static int update_eth_regs_async( pegasus_t *pegasus )
14098 +static int update_eth_regs_async(pegasus_t * pegasus)
14099  {
14100 -       int     ret;
14101 +       int ret;
14102  
14103 -       pegasus->dr.requesttype = PEGASUS_REQT_WRITE;
14104 -       pegasus->dr.request = PEGASUS_REQ_SET_REGS;
14105 -       pegasus->dr.value = 0;
14106 -       pegasus->dr.index =  cpu_to_le16(EthCtrl0);
14107 -       pegasus->dr.length = cpu_to_le16(3);
14108 +       pegasus->dr.bRequestType = PEGASUS_REQT_WRITE;
14109 +       pegasus->dr.bRequest = PEGASUS_REQ_SET_REGS;
14110 +       pegasus->dr.wValue = 0;
14111 +       pegasus->dr.wIndex = cpu_to_le16(EthCtrl0);
14112 +       pegasus->dr.wLength = cpu_to_le16(3);
14113         pegasus->ctrl_urb->transfer_buffer_length = 3;
14114  
14115 -       FILL_CONTROL_URB( pegasus->ctrl_urb, pegasus->usb,
14116 -                         usb_sndctrlpipe(pegasus->usb,0),
14117 -                         (char *)&pegasus->dr,
14118 -                         pegasus->eth_regs, 3, ctrl_callback, pegasus );
14119 +       FILL_CONTROL_URB(pegasus->ctrl_urb, pegasus->usb,
14120 +                        usb_sndctrlpipe(pegasus->usb, 0),
14121 +                        (char *) &pegasus->dr,
14122 +                        pegasus->eth_regs, 3, ctrl_callback, pegasus);
14123 +
14124 +       if ((ret = usb_submit_urb(pegasus->ctrl_urb)))
14125 +               err("%s: BAD CTRL %d, flgs %x", __FUNCTION__, ret,
14126 +                   pegasus->flags);
14127  
14128 -       if ( (ret = usb_submit_urb( pegasus->ctrl_urb )) )
14129 -               err("%s: BAD CTRL %d, flgs %x",__FUNCTION__,ret,pegasus->flags);
14130 -
14131 -       return  ret;
14132 +       return ret;
14133  }
14134  
14135 -
14136 -static int read_mii_word( pegasus_t *pegasus, __u8 phy, __u8 indx, __u16 *regd )
14137 +static int read_mii_word(pegasus_t * pegasus, __u8 phy, __u8 indx, __u16 * regd)
14138  {
14139 -       int     i;
14140 -       __u8    data[4] = { phy, 0, 0, indx };
14141 -       __u16  regdi;
14142 -       
14143 -       set_register( pegasus, PhyCtrl, 0 );
14144 -       set_registers( pegasus, PhyAddr, sizeof(data), data );
14145 -       set_register( pegasus, PhyCtrl, (indx | PHY_READ) );
14146 +       int i;
14147 +       __u8 data[4] = { phy, 0, 0, indx };
14148 +       __u16 regdi;
14149 +
14150 +       set_register(pegasus, PhyCtrl, 0);
14151 +       set_registers(pegasus, PhyAddr, sizeof(data), data);
14152 +       set_register(pegasus, PhyCtrl, (indx | PHY_READ));
14153         for (i = 0; i < REG_TIMEOUT; i++) {
14154                 get_registers(pegasus, PhyCtrl, 1, data);
14155 -               if ( data[0] & PHY_DONE ) 
14156 +               if (data[0] & PHY_DONE)
14157                         break;
14158         }
14159 -       if ( i < REG_TIMEOUT ) {
14160 -               get_registers( pegasus, PhyData, 2, &regdi );
14161 +       if (i < REG_TIMEOUT) {
14162 +               get_registers(pegasus, PhyData, 2, &regdi);
14163                 *regd = le16_to_cpu(regdi);
14164 -               return  0;
14165 +               return 0;
14166         }
14167         warn("%s: failed", __FUNCTION__);
14168 -       
14169 +
14170         return 1;
14171  }
14172  
14173 -
14174 -static int write_mii_word( pegasus_t *pegasus, __u8 phy, __u8 indx, __u16 regd )
14175 +static int write_mii_word(pegasus_t * pegasus, __u8 phy, __u8 indx, __u16 regd)
14176  {
14177 -       int     i;
14178 -       __u8    data[4] = { phy, 0, 0, indx };
14179 -       
14180 -       *(data + 1) = cpu_to_le16p( &regd );
14181 -       set_register( pegasus, PhyCtrl, 0 );
14182 -       set_registers( pegasus, PhyAddr, 4, data );
14183 -       set_register( pegasus, PhyCtrl, (indx | PHY_WRITE) );
14184 +       int i;
14185 +       __u8 data[4] = { phy, 0, 0, indx };
14186 +
14187 +       *(data + 1) = cpu_to_le16p(&regd);
14188 +       set_register(pegasus, PhyCtrl, 0);
14189 +       set_registers(pegasus, PhyAddr, 4, data);
14190 +       set_register(pegasus, PhyCtrl, (indx | PHY_WRITE));
14191         for (i = 0; i < REG_TIMEOUT; i++) {
14192                 get_registers(pegasus, PhyCtrl, 1, data);
14193 -               if ( data[0] & PHY_DONE ) 
14194 +               if (data[0] & PHY_DONE)
14195                         break;
14196         }
14197 -       if ( i < REG_TIMEOUT )
14198 -               return  0;
14199 +       if (i < REG_TIMEOUT)
14200 +               return 0;
14201         warn("%s: failed", __FUNCTION__);
14202  
14203         return 1;
14204  }
14205  
14206 -
14207 -static int read_eprom_word( pegasus_t *pegasus, __u8 index, __u16 *retdata )
14208 +static int read_eprom_word(pegasus_t * pegasus, __u8 index, __u16 * retdata)
14209  {
14210 -       int     i;
14211 +       int i;
14212         __u8 tmp;
14213         __u16 retdatai;
14214 -       
14215 -       set_register( pegasus, EpromCtrl, 0 );
14216 -       set_register( pegasus, EpromOffset, index );
14217 -       set_register( pegasus, EpromCtrl, EPROM_READ); 
14218 -
14219 -       for ( i=0; i < REG_TIMEOUT; i++ ) {
14220 -               get_registers( pegasus, EpromCtrl, 1, &tmp );
14221 -               if ( tmp & EPROM_DONE )
14222 +
14223 +       set_register(pegasus, EpromCtrl, 0);
14224 +       set_register(pegasus, EpromOffset, index);
14225 +       set_register(pegasus, EpromCtrl, EPROM_READ);
14226 +
14227 +       for (i = 0; i < REG_TIMEOUT; i++) {
14228 +               get_registers(pegasus, EpromCtrl, 1, &tmp);
14229 +               if (tmp & EPROM_DONE)
14230                         break;
14231         }
14232 -       if ( i < REG_TIMEOUT ) {
14233 -               get_registers( pegasus, EpromData, 2, &retdatai );
14234 -               *retdata = le16_to_cpu (retdatai);
14235 -               return  0;
14236 +       if (i < REG_TIMEOUT) {
14237 +               get_registers(pegasus, EpromData, 2, &retdatai);
14238 +               *retdata = le16_to_cpu(retdatai);
14239 +               return 0;
14240         }
14241         warn("%s: failed", __FUNCTION__);
14242  
14243 @@ -374,199 +352,188 @@
14244  }
14245  
14246  #ifdef PEGASUS_WRITE_EEPROM
14247 -static inline void enable_eprom_write( pegasus_t *pegasus )
14248 +static inline void enable_eprom_write(pegasus_t * pegasus)
14249  {
14250 -       __u8    tmp;
14251 +       __u8 tmp;
14252  
14253 -       get_registers( pegasus, EthCtrl2, 1, &tmp );
14254 -       set_register( pegasus, EthCtrl2, tmp | EPROM_WR_ENABLE );
14255 +       get_registers(pegasus, EthCtrl2, 1, &tmp);
14256 +       set_register(pegasus, EthCtrl2, tmp | EPROM_WR_ENABLE);
14257  }
14258  
14259 -
14260 -static inline void disable_eprom_write( pegasus_t *pegasus )
14261 +static inline void disable_eprom_write(pegasus_t * pegasus)
14262  {
14263 -       __u8    tmp;
14264 +       __u8 tmp;
14265  
14266 -       get_registers( pegasus, EthCtrl2, 1, &tmp );
14267 -       set_register( pegasus, EpromCtrl, 0 );
14268 -       set_register( pegasus, EthCtrl2, tmp & ~EPROM_WR_ENABLE );
14269 +       get_registers(pegasus, EthCtrl2, 1, &tmp);
14270 +       set_register(pegasus, EpromCtrl, 0);
14271 +       set_register(pegasus, EthCtrl2, tmp & ~EPROM_WR_ENABLE);
14272  }
14273  
14274 -
14275 -static int write_eprom_word( pegasus_t *pegasus, __u8 index, __u16 data )
14276 +static int write_eprom_word(pegasus_t * pegasus, __u8 index, __u16 data)
14277  {
14278 -       int     i, tmp;
14279 -       __u8    d[4] = {0x3f, 0, 0, EPROM_WRITE};
14280 +       int i, tmp;
14281 +       __u8 d[4] = { 0x3f, 0, 0, EPROM_WRITE };
14282  
14283 -       set_registers( pegasus, EpromOffset, 4, d );
14284 -       enable_eprom_write( pegasus );
14285 -       set_register( pegasus, EpromOffset, index );
14286 -       set_registers( pegasus, EpromData, 2, &data );
14287 -       set_register( pegasus, EpromCtrl, EPROM_WRITE );
14288 +       set_registers(pegasus, EpromOffset, 4, d);
14289 +       enable_eprom_write(pegasus);
14290 +       set_register(pegasus, EpromOffset, index);
14291 +       set_registers(pegasus, EpromData, 2, &data);
14292 +       set_register(pegasus, EpromCtrl, EPROM_WRITE);
14293  
14294 -       for ( i=0; i < REG_TIMEOUT; i++ ) {
14295 -               get_registers( pegasus, EpromCtrl, 1, &tmp );
14296 -               if ( tmp & EPROM_DONE )
14297 +       for (i = 0; i < REG_TIMEOUT; i++) {
14298 +               get_registers(pegasus, EpromCtrl, 1, &tmp);
14299 +               if (tmp & EPROM_DONE)
14300                         break;
14301         }
14302 -       disable_eprom_write( pegasus );
14303 -       if ( i < REG_TIMEOUT )
14304 -               return  0;
14305 +       disable_eprom_write(pegasus);
14306 +       if (i < REG_TIMEOUT)
14307 +               return 0;
14308         warn("%s: failed", __FUNCTION__);
14309 -       return  -1;
14310 +       return -1;
14311  }
14312 -#endif /* PEGASUS_WRITE_EEPROM */
14313 +#endif                         /* PEGASUS_WRITE_EEPROM */
14314  
14315 -static inline void get_node_id( pegasus_t *pegasus, __u8 *id )
14316 +static inline void get_node_id(pegasus_t * pegasus, __u8 * id)
14317  {
14318 -       int     i;
14319 +       int i;
14320         __u16 w16;
14321 -       
14322 +
14323         for (i = 0; i < 3; i++) {
14324 -               read_eprom_word( pegasus, i, &w16);
14325 -               ((__u16 *) id)[i] = cpu_to_le16p (&w16);
14326 +               read_eprom_word(pegasus, i, &w16);
14327 +               ((__u16 *) id)[i] = cpu_to_le16p(&w16);
14328         }
14329  }
14330  
14331 -
14332 -static void set_ethernet_addr( pegasus_t *pegasus )
14333 +static void set_ethernet_addr(pegasus_t * pegasus)
14334  {
14335 -       __u8    node_id[6];
14336 +       __u8 node_id[6];
14337  
14338         get_node_id(pegasus, node_id);
14339 -       set_registers( pegasus, EthID, sizeof(node_id), node_id );
14340 -       memcpy( pegasus->net->dev_addr, node_id, sizeof(node_id) );
14341 +       set_registers(pegasus, EthID, sizeof(node_id), node_id);
14342 +       memcpy(pegasus->net->dev_addr, node_id, sizeof(node_id));
14343  }
14344  
14345 -
14346 -static inline int reset_mac( pegasus_t *pegasus )
14347 +static inline int reset_mac(pegasus_t * pegasus)
14348  {
14349 -       __u8    data = 0x8;
14350 -       int     i;
14351 +       __u8 data = 0x8;
14352 +       int i;
14353  
14354         set_register(pegasus, EthCtrl1, data);
14355         for (i = 0; i < REG_TIMEOUT; i++) {
14356                 get_registers(pegasus, EthCtrl1, 1, &data);
14357                 if (~data & 0x08) {
14358 -                       if (loopback & 1) 
14359 +                       if (loopback & 1)
14360                                 break;
14361 -                       if ( mii_mode && (pegasus->features & HAS_HOME_PNA) )
14362 -                               set_register( pegasus, Gpio1, 0x34 );
14363 +                       if (mii_mode && (pegasus->features & HAS_HOME_PNA))
14364 +                               set_register(pegasus, Gpio1, 0x34);
14365                         else
14366 -                               set_register( pegasus, Gpio1, 0x26 );
14367 -                       set_register( pegasus, Gpio0, pegasus->features );
14368 -                       set_register( pegasus, Gpio0, DEFAULT_GPIO_SET );
14369 +                               set_register(pegasus, Gpio1, 0x26);
14370 +                       set_register(pegasus, Gpio0, pegasus->features);
14371 +                       set_register(pegasus, Gpio0, DEFAULT_GPIO_SET);
14372                         break;
14373                 }
14374         }
14375 -       if ( i == REG_TIMEOUT )
14376 +       if (i == REG_TIMEOUT)
14377                 return 1;
14378  
14379         if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS ||
14380             usb_dev_id[pegasus->dev_index].vendor == VENDOR_DLINK) {
14381 -               __u16   auxmode;
14382 +               __u16 auxmode;
14383  
14384                 read_mii_word(pegasus, 1, 0x1b, &auxmode);
14385                 write_mii_word(pegasus, 1, 0x1b, auxmode | 4);
14386         }
14387         if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_ELCON) {
14388 -               __u16   auxmode;
14389 +               __u16 auxmode;
14390                 read_mii_word(pegasus, 3, 0x1b, &auxmode);
14391                 write_mii_word(pegasus, 3, 0x1b, auxmode | 4);
14392         }
14393 -       return  0;
14394 +       return 0;
14395  }
14396  
14397 -
14398 -static int enable_net_traffic( struct net_device *dev, struct usb_device *usb )
14399 +static int enable_net_traffic(struct net_device *dev, struct usb_device *usb)
14400  {
14401 -       __u16   linkpart, bmsr;
14402 -       __u8    data[4];
14403 +       __u16 linkpart, bmsr;
14404 +       __u8 data[4];
14405         pegasus_t *pegasus = dev->priv;
14406  
14407         /* read twice 'cos this is a latch bit */
14408         read_mii_word(pegasus, pegasus->phy, MII_BMSR, &bmsr);
14409         read_mii_word(pegasus, pegasus->phy, MII_BMSR, &bmsr);
14410 -       if ( !(bmsr & 4) && !loopback ) 
14411 -               warn( "%s: link NOT established (0x%x) - check the cable.",
14412 -                       dev->name, bmsr );
14413 -       if ( read_mii_word(pegasus, pegasus->phy, MII_LPA, &linkpart) )
14414 +       if (read_mii_word(pegasus, pegasus->phy, MII_LPA, &linkpart))
14415                 return 2;
14416 -       if ( !(linkpart & 1) )
14417 -               warn( "link partner stat %x", linkpart );
14418 +       if (!(linkpart & 1))
14419 +               warn("link partner stat %x", linkpart);
14420  
14421         data[0] = 0xc9;
14422         data[1] = 0;
14423 -       if ( linkpart & (ADVERTISE_100FULL | ADVERTISE_10FULL) )
14424 -               data[1] |= 0x20; /* set full duplex */
14425 -       if ( linkpart & (ADVERTISE_100FULL | ADVERTISE_100HALF) )
14426 -               data[1] |= 0x10; /* set 100 Mbps */
14427 -       if ( mii_mode )
14428 +       if (linkpart & (ADVERTISE_100FULL | ADVERTISE_10FULL))
14429 +               data[1] |= 0x20;        /* set full duplex */
14430 +       if (linkpart & (ADVERTISE_100FULL | ADVERTISE_100HALF))
14431 +               data[1] |= 0x10;        /* set 100 Mbps */
14432 +       if (mii_mode)
14433                 data[1] = 0;
14434         data[2] = (loopback & 1) ? 0x09 : 0x01;
14435 -
14436 -       memcpy( pegasus->eth_regs, data, sizeof(data) );
14437 -
14438 -       set_registers( pegasus, EthCtrl0, 3, data );
14439 +       memcpy(pegasus->eth_regs, data, sizeof(data));
14440 +       set_registers(pegasus, EthCtrl0, 3, data);
14441  
14442         return 0;
14443  }
14444  
14445 -
14446 -static void read_bulk_callback( struct urb *urb )
14447 +static void read_bulk_callback(struct urb *urb)
14448  {
14449         pegasus_t *pegasus = urb->context;
14450         struct net_device *net;
14451         int count = urb->actual_length, res;
14452         int rx_status;
14453 -       struct sk_buff  *skb;
14454 +       struct sk_buff *skb;
14455         __u16 pkt_len;
14456  
14457 -       if ( !pegasus || !(pegasus->flags & PEGASUS_RUNNING) )
14458 +       if (!pegasus || !(pegasus->flags & PEGASUS_RUNNING))
14459                 return;
14460  
14461         net = pegasus->net;
14462 -       if ( !netif_device_present(net) )
14463 +       if (!netif_device_present(net))
14464                 return;
14465  
14466 -       if ( pegasus->flags & PEGASUS_RX_BUSY ) {
14467 +       if (pegasus->flags & PEGASUS_RX_BUSY) {
14468                 pegasus->stats.rx_errors++;
14469                 dbg("pegasus Rx busy");
14470                 return;
14471         }
14472         pegasus->flags |= PEGASUS_RX_BUSY;
14473  
14474 -       switch ( urb->status ) {
14475 -               case 0:
14476 -                       break;
14477 -               case -ETIMEDOUT:
14478 -                       dbg( "reset MAC" );
14479 -                       pegasus->flags &= ~PEGASUS_RX_BUSY;
14480 -                       break;
14481 -               default:
14482 -                       dbg( "%s: RX status %d", net->name, urb->status );
14483 -                       goto goon;
14484 +       switch (urb->status) {
14485 +       case 0:
14486 +               break;
14487 +       case -ETIMEDOUT:
14488 +               dbg("reset MAC");
14489 +               pegasus->flags &= ~PEGASUS_RX_BUSY;
14490 +               break;
14491 +       default:
14492 +               dbg("%s: RX status %d", net->name, urb->status);
14493 +               goto goon;
14494         }
14495  
14496 -       if ( !count )
14497 +       if (!count)
14498                 goto goon;
14499  
14500 -       rx_status = le32_to_cpu(*(int *)(pegasus->rx_buff + count - 4));
14501 -       if ( rx_status & 0x000e0000 ) {
14502 +       rx_status = le32_to_cpu(*(int *) (pegasus->rx_buff + count - 4));
14503 +       if (rx_status & 0x000e0000) {
14504                 dbg("%s: RX packet error %x", net->name, rx_status & 0xe0000);
14505                 pegasus->stats.rx_errors++;
14506 -               if ( rx_status & 0x060000 )
14507 +               if (rx_status & 0x060000)
14508                         pegasus->stats.rx_length_errors++;
14509 -               if ( rx_status & 0x080000 )
14510 +               if (rx_status & 0x080000)
14511                         pegasus->stats.rx_crc_errors++;
14512 -               if ( rx_status & 0x100000 )
14513 +               if (rx_status & 0x100000)
14514                         pegasus->stats.rx_frame_errors++;
14515                 goto goon;
14516         }
14517  
14518         pkt_len = (rx_status & 0xfff) - 8;
14519  
14520 -       if ( !(skb = dev_alloc_skb(pkt_len+2)) )
14521 +       if (!(skb = dev_alloc_skb(pkt_len + 2)))
14522                 goto goon;
14523  
14524         skb->dev = net;
14525 @@ -580,102 +547,100 @@
14526         pegasus->stats.rx_bytes += pkt_len;
14527  
14528  goon:
14529 -       FILL_BULK_URB( pegasus->rx_urb, pegasus->usb,
14530 -                       usb_rcvbulkpipe(pegasus->usb, 1),
14531 -                       pegasus->rx_buff, PEGASUS_MAX_MTU, 
14532 -                       read_bulk_callback, pegasus );
14533 -       if ( (res = usb_submit_urb(pegasus->rx_urb)) )
14534 +       FILL_BULK_URB(pegasus->rx_urb, pegasus->usb,
14535 +                     usb_rcvbulkpipe(pegasus->usb, 1),
14536 +                     pegasus->rx_buff, PEGASUS_MAX_MTU,
14537 +                     read_bulk_callback, pegasus);
14538 +       if ((res = usb_submit_urb(pegasus->rx_urb)))
14539                 warn("%s: failed submint rx_urb %d", __FUNCTION__, res);
14540         pegasus->flags &= ~PEGASUS_RX_BUSY;
14541  }
14542  
14543 -
14544 -static void write_bulk_callback( struct urb *urb )
14545 +static void write_bulk_callback(struct urb *urb)
14546  {
14547         pegasus_t *pegasus = urb->context;
14548  
14549 -       if ( !pegasus || !(pegasus->flags & PEGASUS_RUNNING) )
14550 +       if (!pegasus || !(pegasus->flags & PEGASUS_RUNNING))
14551                 return;
14552  
14553 -       if ( !netif_device_present(pegasus->net) )
14554 +       if (!netif_device_present(pegasus->net))
14555                 return;
14556 -               
14557 -       if ( urb->status )
14558 +
14559 +       if (urb->status)
14560                 info("%s: TX status %d", pegasus->net->name, urb->status);
14561  
14562         pegasus->net->trans_start = jiffies;
14563 -       netif_wake_queue( pegasus->net );
14564 +       netif_wake_queue(pegasus->net);
14565  }
14566  
14567  #ifdef PEGASUS_USE_INTR
14568 -static void intr_callback( struct urb *urb )
14569 +static void intr_callback(struct urb *urb)
14570  {
14571         pegasus_t *pegasus = urb->context;
14572         struct net_device *net;
14573 -       __u8    *d;
14574 +       __u8 *d;
14575  
14576 -       if ( !pegasus )
14577 +       if (!pegasus)
14578                 return;
14579 -               
14580 -       switch ( urb->status ) {
14581 -               case 0:
14582 -                       break;
14583 -               case -ENOENT:
14584 -                       return;
14585 -               default:
14586 -                       info("intr status %d", urb->status);
14587 +
14588 +       switch (urb->status) {
14589 +       case 0:
14590 +               break;
14591 +       case -ENOENT:
14592 +               return;
14593 +       default:
14594 +               info("intr status %d", urb->status);
14595         }
14596  
14597         d = urb->transfer_buffer;
14598         net = pegasus->net;
14599 -       if ( d[0] & 0xfc ) {
14600 +       if (d[0] & 0xfc) {
14601                 pegasus->stats.tx_errors++;
14602 -               if ( d[0] & TX_UNDERRUN )
14603 +               if (d[0] & TX_UNDERRUN)
14604                         pegasus->stats.tx_fifo_errors++;
14605 -               if ( d[0] & (EXCESSIVE_COL | JABBER_TIMEOUT) )
14606 +               if (d[0] & (EXCESSIVE_COL | JABBER_TIMEOUT))
14607                         pegasus->stats.tx_aborted_errors++;
14608 -               if ( d[0] & LATE_COL )
14609 +               if (d[0] & LATE_COL)
14610                         pegasus->stats.tx_window_errors++;
14611 -               if ( d[0] & (NO_CARRIER | LOSS_CARRIER) )
14612 +               if (d[0] & (NO_CARRIER | LOSS_CARRIER))
14613                         pegasus->stats.tx_carrier_errors++;
14614         }
14615  }
14616  #endif
14617  
14618 -static void pegasus_tx_timeout( struct net_device *net )
14619 +static void pegasus_tx_timeout(struct net_device *net)
14620  {
14621         pegasus_t *pegasus = net->priv;
14622  
14623 -       if ( !pegasus )
14624 +       if (!pegasus)
14625                 return;
14626 -               
14627 +
14628         warn("%s: Tx timed out.", net->name);
14629         pegasus->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
14630 -       usb_unlink_urb( pegasus->tx_urb );
14631 +       usb_unlink_urb(pegasus->tx_urb);
14632         pegasus->stats.tx_errors++;
14633  }
14634  
14635 -
14636 -static int pegasus_start_xmit( struct sk_buff *skb, struct net_device *net )
14637 +static int pegasus_start_xmit(struct sk_buff *skb, struct net_device *net)
14638  {
14639 -       pegasus_t       *pegasus = net->priv;
14640 -       int     count = ((skb->len+2) & 0x3f) ? skb->len+2 : skb->len+3;
14641 -       int     res;
14642 +       pegasus_t *pegasus = net->priv;
14643 +       int count = ((skb->len + 2) & 0x3f) ? skb->len + 2 : skb->len + 3;
14644 +       int res;
14645         __u16 l16 = skb->len;
14646 -       
14647 -       netif_stop_queue( net );
14648 -               
14649 -       ((__u16 *)pegasus->tx_buff)[0] = cpu_to_le16( l16 );
14650 -       memcpy(pegasus->tx_buff+2, skb->data, skb->len);
14651 -       FILL_BULK_URB( pegasus->tx_urb, pegasus->usb,
14652 -                       usb_sndbulkpipe(pegasus->usb, 2),
14653 -                       pegasus->tx_buff, PEGASUS_MAX_MTU, 
14654 -                       write_bulk_callback, pegasus );
14655 +
14656 +       netif_stop_queue(net);
14657 +
14658 +       ((__u16 *) pegasus->tx_buff)[0] = cpu_to_le16(l16);
14659 +       memcpy(pegasus->tx_buff + 2, skb->data, skb->len);
14660 +       FILL_BULK_URB(pegasus->tx_urb, pegasus->usb,
14661 +                     usb_sndbulkpipe(pegasus->usb, 2),
14662 +                     pegasus->tx_buff, PEGASUS_MAX_MTU,
14663 +                     write_bulk_callback, pegasus);
14664         pegasus->tx_urb->transfer_buffer_length = count;
14665         if ((res = usb_submit_urb(pegasus->tx_urb))) {
14666                 warn("failed tx_urb %d", res);
14667                 pegasus->stats.tx_errors++;
14668 -               netif_start_queue( net );
14669 +               netif_start_queue(net);
14670         } else {
14671                 pegasus->stats.tx_packets++;
14672                 pegasus->stats.tx_bytes += skb->len;
14673 @@ -687,42 +652,38 @@
14674         return 0;
14675  }
14676  
14677 -
14678 -static struct net_device_stats *pegasus_netdev_stats( struct net_device *dev )
14679 +static struct net_device_stats *pegasus_netdev_stats(struct net_device *dev)
14680  {
14681 -       return &((pegasus_t *)dev->priv)->stats;
14682 +       return &((pegasus_t *) dev->priv)->stats;
14683  }
14684  
14685 -
14686 -static inline void disable_net_traffic( pegasus_t *pegasus )
14687 +static inline void disable_net_traffic(pegasus_t * pegasus)
14688  {
14689 -       int     tmp=0;
14690 +       int tmp = 0;
14691  
14692 -       set_registers( pegasus, EthCtrl0, 2, &tmp );
14693 +       set_registers(pegasus, EthCtrl0, 2, &tmp);
14694  }
14695  
14696 -
14697 -static inline void get_interrupt_interval( pegasus_t *pegasus )
14698 +static inline void get_interrupt_interval(pegasus_t * pegasus)
14699  {
14700 -       __u8    data[2];
14701 +       __u8 data[2];
14702  
14703 -       read_eprom_word( pegasus, 4, (__u16 *)data );
14704 -       if ( data[1] < 0x80 ) {
14705 -               info( "intr interval will be changed from %ums to %ums",
14706 -                    data[1], 0x80 );
14707 +       read_eprom_word(pegasus, 4, (__u16 *) data);
14708 +       if (data[1] < 0x80) {
14709 +               info("intr interval will be changed from %ums to %ums",
14710 +                    data[1], 0x80);
14711                 data[1] = 0x80;
14712  #ifdef PEGASUS_WRITE_EEPROM
14713 -               write_eprom_word( pegasus, 4, *(__u16 *)data );
14714 +               write_eprom_word(pegasus, 4, *(__u16 *) data);
14715  #endif
14716         }
14717         pegasus->intr_interval = data[1];
14718  }
14719  
14720 -
14721  static void set_carrier(struct net_device *net)
14722  {
14723 -       pegasus_t       *pegasus;
14724 -       short           tmp;
14725 +       pegasus_t *pegasus;
14726 +       short tmp;
14727  
14728         pegasus = net->priv;
14729         read_mii_word(pegasus, pegasus->phy, MII_BMSR, &tmp);
14730 @@ -730,34 +691,32 @@
14731                 netif_carrier_on(net);
14732         else
14733                 netif_carrier_off(net);
14734 -       
14735 -}
14736  
14737 +}
14738  
14739  static int pegasus_open(struct net_device *net)
14740  {
14741 -       pegasus_t *pegasus = (pegasus_t *)net->priv;
14742 -       int     res;
14743 -
14744 +       pegasus_t *pegasus = (pegasus_t *) net->priv;
14745 +       int res;
14746  
14747         down(&pegasus->sem);
14748 -       FILL_BULK_URB( pegasus->rx_urb, pegasus->usb,
14749 -                       usb_rcvbulkpipe(pegasus->usb, 1),
14750 -                       pegasus->rx_buff, PEGASUS_MAX_MTU, 
14751 -                       read_bulk_callback, pegasus );
14752 -       if ( (res = usb_submit_urb(pegasus->rx_urb)) )
14753 +       FILL_BULK_URB(pegasus->rx_urb, pegasus->usb,
14754 +                     usb_rcvbulkpipe(pegasus->usb, 1),
14755 +                     pegasus->rx_buff, PEGASUS_MAX_MTU,
14756 +                     read_bulk_callback, pegasus);
14757 +       if ((res = usb_submit_urb(pegasus->rx_urb)))
14758                 warn("%s: failed rx_urb %d", __FUNCTION__, res);
14759  #ifdef PEGASUS_USE_INTR
14760 -       FILL_INT_URB( pegasus->intr_urb, pegasus->usb,
14761 -                       usb_rcvintpipe(pegasus->usb, 3),
14762 -                       pegasus->intr_buff, sizeof(pegasus->intr_buff),
14763 -                       intr_callback, pegasus, pegasus->intr_interval );
14764 -       if ( (res = usb_submit_urb(pegasus->intr_urb)) )
14765 +       FILL_INT_URB(pegasus->intr_urb, pegasus->usb,
14766 +                    usb_rcvintpipe(pegasus->usb, 3),
14767 +                    pegasus->intr_buff, sizeof(pegasus->intr_buff),
14768 +                    intr_callback, pegasus, pegasus->intr_interval);
14769 +       if ((res = usb_submit_urb(pegasus->intr_urb)))
14770                 warn("%s: failed intr_urb %d", __FUNCTION__, res);
14771  #endif
14772 -       netif_start_queue( net );
14773 +       netif_start_queue(net);
14774         pegasus->flags |= PEGASUS_RUNNING;
14775 -       if ( (res = enable_net_traffic(net, pegasus->usb)) ) {
14776 +       if ((res = enable_net_traffic(net, pegasus->usb))) {
14777                 err("can't enable_net_traffic() - %d", res);
14778                 res = -EIO;
14779                 goto exit;
14780 @@ -767,129 +726,126 @@
14781         res = 0;
14782  exit:
14783         up(&pegasus->sem);
14784 -       
14785 +
14786         return res;
14787  }
14788  
14789 -
14790 -static int pegasus_close( struct net_device *net )
14791 +static int pegasus_close(struct net_device *net)
14792  {
14793 -       pegasus_t       *pegasus = net->priv;
14794 +       pegasus_t *pegasus = net->priv;
14795  
14796         down(&pegasus->sem);
14797         pegasus->flags &= ~PEGASUS_RUNNING;
14798 -       netif_stop_queue( net );
14799 -       if ( !(pegasus->flags & PEGASUS_UNPLUG) )
14800 -               disable_net_traffic( pegasus );
14801 -
14802 -       usb_unlink_urb( pegasus->rx_urb );
14803 -       usb_unlink_urb( pegasus->tx_urb );
14804 -       usb_unlink_urb( pegasus->ctrl_urb );
14805 +       netif_stop_queue(net);
14806 +       if (!(pegasus->flags & PEGASUS_UNPLUG))
14807 +               disable_net_traffic(pegasus);
14808 +
14809 +       usb_unlink_urb(pegasus->rx_urb);
14810 +       usb_unlink_urb(pegasus->tx_urb);
14811 +       usb_unlink_urb(pegasus->ctrl_urb);
14812  #ifdef PEGASUS_USE_INTR
14813 -       usb_unlink_urb( pegasus->intr_urb );
14814 +       usb_unlink_urb(pegasus->intr_urb);
14815  #endif
14816         up(&pegasus->sem);
14817 -       
14818 +
14819         return 0;
14820  }
14821  
14822 -
14823  static int pegasus_ethtool_ioctl(struct net_device *net, void *uaddr)
14824  {
14825 -       pegasus_t       *pegasus;
14826 -       int             cmd;
14827 -       char            tmp[128];
14828 +       pegasus_t *pegasus;
14829 +       int cmd;
14830 +       char tmp[128];
14831  
14832         pegasus = net->priv;
14833 -       if (get_user(cmd, (int *)uaddr))
14834 +       if (get_user(cmd, (int *) uaddr))
14835                 return -EFAULT;
14836         switch (cmd) {
14837 -       case ETHTOOL_GDRVINFO: {
14838 -               struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
14839 -               strncpy(info.driver, DRIVER_DESC, ETHTOOL_BUSINFO_LEN);
14840 -               strncpy(info.version, DRIVER_VERSION, ETHTOOL_BUSINFO_LEN);
14841 -               sprintf(tmp, "usb%d:%d", pegasus->usb->bus->busnum,
14842 -                       pegasus->usb->devnum);
14843 -               strncpy(info.bus_info, tmp, ETHTOOL_BUSINFO_LEN);
14844 -               if (copy_to_user(uaddr, &info, sizeof(info)))
14845 -                       return -EFAULT;
14846 -               return 0;
14847 -       }
14848 -       case ETHTOOL_GSET: {
14849 -               struct ethtool_cmd ecmd;
14850 -               short   lpa, bmcr;
14851 -
14852 -               if (copy_from_user(&ecmd, uaddr, sizeof(ecmd)))
14853 -                       return -EFAULT;
14854 -               ecmd.supported = (SUPPORTED_10baseT_Half |
14855 -                                SUPPORTED_10baseT_Full |
14856 -                                SUPPORTED_100baseT_Half |
14857 -                                SUPPORTED_100baseT_Full |
14858 -                                SUPPORTED_Autoneg |
14859 -                                SUPPORTED_TP |
14860 -                                SUPPORTED_MII);
14861 -               ecmd.port = PORT_TP;
14862 -               ecmd.transceiver = XCVR_INTERNAL;
14863 -               ecmd.phy_address = pegasus->phy;
14864 -               read_mii_word(pegasus, pegasus->phy, MII_BMCR, &bmcr);
14865 -               read_mii_word(pegasus, pegasus->phy, MII_LPA, &lpa);
14866 -               if (bmcr & BMCR_ANENABLE) {
14867 -                       ecmd.autoneg = AUTONEG_ENABLE;
14868 -                       ecmd.speed = lpa & (LPA_100HALF|LPA_100FULL) ?
14869 -                                    SPEED_100 : SPEED_10;
14870 -                       if (ecmd.speed == SPEED_100)
14871 -                               ecmd.duplex = lpa & LPA_100FULL ?
14872 -                                             DUPLEX_FULL : DUPLEX_HALF;
14873 -                       else
14874 -                               ecmd.duplex = lpa & LPA_10FULL ?
14875 -                                             DUPLEX_FULL : DUPLEX_HALF;
14876 -               } else {
14877 -                       ecmd.autoneg = AUTONEG_DISABLE;
14878 -                       ecmd.speed = bmcr & BMCR_SPEED100 ? 
14879 -                                    SPEED_100 : SPEED_10;
14880 -                       ecmd.duplex = bmcr & BMCR_FULLDPLX ?
14881 -                                     DUPLEX_FULL : DUPLEX_HALF;
14882 +       case ETHTOOL_GDRVINFO:{
14883 +                       struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
14884 +                       strncpy(info.driver, DRIVER_DESC, ETHTOOL_BUSINFO_LEN);
14885 +                       strncpy(info.version, DRIVER_VERSION,
14886 +                               ETHTOOL_BUSINFO_LEN);
14887 +                       sprintf(tmp, "usb%d:%d", pegasus->usb->bus->busnum,
14888 +                               pegasus->usb->devnum);
14889 +                       strncpy(info.bus_info, tmp, ETHTOOL_BUSINFO_LEN);
14890 +                       if (copy_to_user(uaddr, &info, sizeof(info)))
14891 +                               return -EFAULT;
14892 +                       return 0;
14893 +               }
14894 +       case ETHTOOL_GSET:{
14895 +                       struct ethtool_cmd ecmd;
14896 +                       short lpa, bmcr;
14897 +
14898 +                       if (copy_from_user(&ecmd, uaddr, sizeof(ecmd)))
14899 +                               return -EFAULT;
14900 +                       ecmd.supported = (SUPPORTED_10baseT_Half |
14901 +                                         SUPPORTED_10baseT_Full |
14902 +                                         SUPPORTED_100baseT_Half |
14903 +                                         SUPPORTED_100baseT_Full |
14904 +                                         SUPPORTED_Autoneg |
14905 +                                         SUPPORTED_TP | SUPPORTED_MII);
14906 +                       ecmd.port = PORT_TP;
14907 +                       ecmd.transceiver = XCVR_INTERNAL;
14908 +                       ecmd.phy_address = pegasus->phy;
14909 +                       read_mii_word(pegasus, pegasus->phy, MII_BMCR, &bmcr);
14910 +                       read_mii_word(pegasus, pegasus->phy, MII_LPA, &lpa);
14911 +                       if (bmcr & BMCR_ANENABLE) {
14912 +                               ecmd.autoneg = AUTONEG_ENABLE;
14913 +                               ecmd.speed = lpa & (LPA_100HALF | LPA_100FULL) ?
14914 +                                   SPEED_100 : SPEED_10;
14915 +                               if (ecmd.speed == SPEED_100)
14916 +                                       ecmd.duplex = lpa & LPA_100FULL ?
14917 +                                           DUPLEX_FULL : DUPLEX_HALF;
14918 +                               else
14919 +                                       ecmd.duplex = lpa & LPA_10FULL ?
14920 +                                           DUPLEX_FULL : DUPLEX_HALF;
14921 +                       } else {
14922 +                               ecmd.autoneg = AUTONEG_DISABLE;
14923 +                               ecmd.speed = bmcr & BMCR_SPEED100 ?
14924 +                                   SPEED_100 : SPEED_10;
14925 +                               ecmd.duplex = bmcr & BMCR_FULLDPLX ?
14926 +                                   DUPLEX_FULL : DUPLEX_HALF;
14927 +                       }
14928 +                       if (copy_to_user(uaddr, &ecmd, sizeof(ecmd)))
14929 +                               return -EFAULT;
14930 +
14931 +                       return 0;
14932 +               }
14933 +       case ETHTOOL_SSET:{
14934 +                       return -EOPNOTSUPP;
14935 +               }
14936 +       case ETHTOOL_GLINK:{
14937 +                       struct ethtool_value edata = { ETHTOOL_GLINK };
14938 +                       edata.data = netif_carrier_ok(net);
14939 +                       if (copy_to_user(uaddr, &edata, sizeof(edata)))
14940 +                               return -EFAULT;
14941 +                       return 0;
14942                 }
14943 -               if (copy_to_user(uaddr, &ecmd, sizeof(ecmd)))
14944 -                       return -EFAULT;
14945 -               
14946 -               return 0;
14947 -       }
14948 -       case ETHTOOL_SSET: {
14949 -               return -EOPNOTSUPP;
14950 -       }
14951 -       case ETHTOOL_GLINK: {
14952 -               struct ethtool_value edata = {ETHTOOL_GLINK};
14953 -               edata.data = netif_carrier_ok(net);
14954 -               if (copy_to_user(uaddr, &edata, sizeof(edata)))
14955 -                       return -EFAULT;
14956 -               return 0;
14957 -       }
14958         default:
14959                 return -EOPNOTSUPP;
14960         }
14961  }
14962  
14963 -
14964 -static int pegasus_ioctl( struct net_device *net, struct ifreq *rq, int cmd )
14965 +static int pegasus_ioctl(struct net_device *net, struct ifreq *rq, int cmd)
14966  {
14967 -       __u16 *data = (__u16 *)&rq->ifr_data;
14968 -       pegasus_t       *pegasus = net->priv;
14969 -       int     res;
14970 +       __u16 *data = (__u16 *) & rq->ifr_data;
14971 +       pegasus_t *pegasus = net->priv;
14972 +       int res;
14973  
14974         down(&pegasus->sem);
14975 -       switch(cmd) {
14976 +       switch (cmd) {
14977         case SIOCETHTOOL:
14978                 res = pegasus_ethtool_ioctl(net, rq->ifr_data);
14979                 break;
14980         case SIOCDEVPRIVATE:
14981                 data[0] = pegasus->phy;
14982 -       case SIOCDEVPRIVATE+1:
14983 -               read_mii_word(pegasus, data[0], data[1]&0x1f, &data[3]);
14984 +       case SIOCDEVPRIVATE + 1:
14985 +               read_mii_word(pegasus, data[0], data[1] & 0x1f, &data[3]);
14986                 res = 0;
14987                 break;
14988 -       case SIOCDEVPRIVATE+2:
14989 -               if ( !capable(CAP_NET_ADMIN) ) {
14990 +       case SIOCDEVPRIVATE + 2:
14991 +               if (!capable(CAP_NET_ADMIN)) {
14992                         up(&pegasus->sem);
14993                         return -EPERM;
14994                 }
14995 @@ -904,8 +860,7 @@
14996         return res;
14997  }
14998  
14999 -
15000 -static void pegasus_set_multicast( struct net_device *net )
15001 +static void pegasus_set_multicast(struct net_device *net)
15002  {
15003         pegasus_t *pegasus = net->priv;
15004  
15005 @@ -915,7 +870,7 @@
15006                 pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS;
15007                 info("%s: Promiscuous mode enabled", net->name);
15008         } else if ((net->mc_count > multicast_filter_limit) ||
15009 -                       (net->flags & IFF_ALLMULTI)) {
15010 +                  (net->flags & IFF_ALLMULTI)) {
15011                 pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST;
15012                 pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS;
15013                 info("%s set allmulti", net->name);
15014 @@ -925,100 +880,92 @@
15015         }
15016  
15017         pegasus->flags |= ETH_REGS_CHANGE;
15018 -       ctrl_callback( pegasus->ctrl_urb );
15019 +       ctrl_callback(pegasus->ctrl_urb);
15020  
15021         netif_wake_queue(net);
15022  }
15023  
15024 -
15025 -static __u8 mii_phy_probe( pegasus_t *pegasus )
15026 +static __u8 mii_phy_probe(pegasus_t * pegasus)
15027  {
15028 -       int     i;
15029 -       __u16   tmp;
15030 +       int i;
15031 +       __u16 tmp;
15032  
15033 -       for ( i=0; i < 32; i++ ) {
15034 -               read_mii_word( pegasus, i, MII_BMSR, &tmp );
15035 -               if ( tmp == 0 || tmp == 0xffff || (tmp & BMSR_MEDIA) == 0 )
15036 +       for (i = 0; i < 32; i++) {
15037 +               read_mii_word(pegasus, i, MII_BMSR, &tmp);
15038 +               if (tmp == 0 || tmp == 0xffff || (tmp & BMSR_MEDIA) == 0)
15039                         continue;
15040                 else
15041 -                       return  i;
15042 +                       return i;
15043         }
15044  
15045 -       return  0xff;
15046 +       return 0xff;
15047  }
15048  
15049 -
15050 -static inline void setup_pegasus_II( pegasus_t *pegasus )
15051 +static inline void setup_pegasus_II(pegasus_t * pegasus)
15052  {
15053 -       set_register( pegasus, Reg1d, 0 );
15054 -       set_register( pegasus, Reg7b, 2 );
15055 -       if ( pegasus->features & HAS_HOME_PNA  && mii_mode )
15056 -               set_register( pegasus, Reg81, 6 );
15057 +       set_register(pegasus, Reg1d, 0);
15058 +       set_register(pegasus, Reg7b, 2);
15059 +       if (pegasus->features & HAS_HOME_PNA && mii_mode)
15060 +               set_register(pegasus, Reg81, 6);
15061         else
15062 -               set_register( pegasus, Reg81, 2 );
15063 +               set_register(pegasus, Reg81, 2);
15064  }
15065  
15066 -
15067 -static void * pegasus_probe( struct usb_device *dev, unsigned int ifnum,
15068 -                            const struct usb_device_id *id)
15069 +static void *pegasus_probe(struct usb_device *dev, unsigned int ifnum,
15070 +                          const struct usb_device_id *id)
15071  {
15072 -       struct net_device       *net;
15073 -       pegasus_t               *pegasus;
15074 -       int                     dev_index = id - pegasus_ids;
15075 +       struct net_device *net;
15076 +       pegasus_t *pegasus;
15077 +       int dev_index = id - pegasus_ids;
15078  
15079         if (usb_set_configuration(dev, dev->config[0].bConfigurationValue)) {
15080                 err("usb_set_configuration() failed");
15081                 return NULL;
15082         }
15083  
15084 -       down(&gsem);
15085 -       if(!(pegasus = kmalloc(sizeof(struct pegasus), GFP_KERNEL))) {
15086 +       if (!(pegasus = kmalloc(sizeof(struct pegasus), GFP_KERNEL))) {
15087                 err("out of memory allocating device structure");
15088 -               goto exit;
15089 +               return NULL;
15090         }
15091  
15092 -       usb_inc_dev_use( dev );
15093 +       usb_inc_dev_use(dev);
15094         memset(pegasus, 0, sizeof(struct pegasus));
15095         pegasus->dev_index = dev_index;
15096 -       init_waitqueue_head( &pegasus->ctrl_wait );
15097 +       init_waitqueue_head(&pegasus->ctrl_wait);
15098  
15099         pegasus->ctrl_urb = usb_alloc_urb(0);
15100         if (!pegasus->ctrl_urb) {
15101 -               kfree (pegasus);
15102 -               pegasus = NULL;
15103 -               goto exit;
15104 +               kfree(pegasus);
15105 +               return NULL;
15106         }
15107         pegasus->rx_urb = usb_alloc_urb(0);
15108         if (!pegasus->rx_urb) {
15109 -               usb_free_urb (pegasus->ctrl_urb);
15110 -               kfree (pegasus);
15111 -               pegasus = NULL;
15112 -               goto exit;
15113 +               usb_free_urb(pegasus->ctrl_urb);
15114 +               kfree(pegasus);
15115 +               return NULL;
15116         }
15117         pegasus->tx_urb = usb_alloc_urb(0);
15118         if (!pegasus->tx_urb) {
15119 -               usb_free_urb (pegasus->rx_urb);
15120 -               usb_free_urb (pegasus->ctrl_urb);
15121 -               kfree (pegasus);
15122 -               pegasus = NULL;
15123 -               goto exit;
15124 +               usb_free_urb(pegasus->rx_urb);
15125 +               usb_free_urb(pegasus->ctrl_urb);
15126 +               kfree(pegasus);
15127 +               return NULL;
15128         }
15129         pegasus->intr_urb = usb_alloc_urb(0);
15130         if (!pegasus->intr_urb) {
15131 -               usb_free_urb (pegasus->tx_urb);
15132 -               usb_free_urb (pegasus->rx_urb);
15133 -               usb_free_urb (pegasus->ctrl_urb);
15134 -               kfree (pegasus);
15135 -               pegasus = NULL;
15136 -               goto exit;
15137 +               usb_free_urb(pegasus->tx_urb);
15138 +               usb_free_urb(pegasus->rx_urb);
15139 +               usb_free_urb(pegasus->ctrl_urb);
15140 +               kfree(pegasus);
15141 +               return NULL;
15142         }
15143  
15144 -       net = init_etherdev( NULL, 0 );
15145 -       if ( !net ) {
15146 -               usb_free_urb (pegasus->tx_urb);
15147 -               usb_free_urb (pegasus->rx_urb);
15148 -               usb_free_urb (pegasus->ctrl_urb);
15149 -               kfree( pegasus );
15150 +       net = init_etherdev(NULL, 0);
15151 +       if (!net) {
15152 +               usb_free_urb(pegasus->tx_urb);
15153 +               usb_free_urb(pegasus->rx_urb);
15154 +               usb_free_urb(pegasus->ctrl_urb);
15155 +               kfree(pegasus);
15156                 return NULL;
15157         }
15158  
15159 @@ -1040,32 +987,32 @@
15160  
15161         pegasus->features = usb_dev_id[dev_index].private;
15162  #ifdef PEGASUS_USE_INTR
15163 -       get_interrupt_interval( pegasus );
15164 +       get_interrupt_interval(pegasus);
15165  #endif
15166 -       if ( reset_mac(pegasus) ) {
15167 +       if (reset_mac(pegasus)) {
15168                 err("can't reset MAC");
15169 -               unregister_netdev( pegasus->net );
15170 -               usb_free_urb (pegasus->tx_urb);
15171 -               usb_free_urb (pegasus->rx_urb);
15172 -               usb_free_urb (pegasus->ctrl_urb);
15173 +               unregister_netdev(pegasus->net);
15174 +               usb_free_urb(pegasus->tx_urb);
15175 +               usb_free_urb(pegasus->rx_urb);
15176 +               usb_free_urb(pegasus->ctrl_urb);
15177                 kfree(pegasus->net);
15178                 kfree(pegasus);
15179                 pegasus = NULL;
15180                 goto exit;
15181         }
15182  
15183 -       info( "%s: %s", net->name, usb_dev_id[dev_index].name );
15184 +       info("%s: %s", net->name, usb_dev_id[dev_index].name);
15185  
15186 -       set_ethernet_addr( pegasus );
15187 +       set_ethernet_addr(pegasus);
15188  
15189 -       if ( pegasus->features & PEGASUS_II ) {
15190 -               info( "setup Pegasus II specific registers" );
15191 -               setup_pegasus_II( pegasus );
15192 -       }
15193 -       
15194 -       pegasus->phy = mii_phy_probe( pegasus );
15195 -       if ( pegasus->phy == 0xff ) {
15196 -               warn( "can't locate MII phy, using default" );
15197 +       if (pegasus->features & PEGASUS_II) {
15198 +               info("setup Pegasus II specific registers");
15199 +               setup_pegasus_II(pegasus);
15200 +       }
15201 +
15202 +       pegasus->phy = mii_phy_probe(pegasus);
15203 +       if (pegasus->phy == 0xff) {
15204 +               warn("can't locate MII phy, using default");
15205                 pegasus->phy = 1;
15206         }
15207  
15208 @@ -1074,19 +1021,18 @@
15209         return pegasus;
15210  }
15211  
15212 -
15213 -static void pegasus_disconnect( struct usb_device *dev, void *ptr )
15214 +static void pegasus_disconnect(struct usb_device *dev, void *ptr)
15215  {
15216         struct pegasus *pegasus = ptr;
15217  
15218 -       if ( !pegasus ) {
15219 +       if (!pegasus) {
15220                 warn("unregistering non-existant device");
15221                 return;
15222         }
15223  
15224         pegasus->flags |= PEGASUS_UNPLUG;
15225 -       unregister_netdev( pegasus->net );
15226 -       usb_dec_dev_use( dev );
15227 +       unregister_netdev(pegasus->net);
15228 +       usb_dec_dev_use(dev);
15229         usb_unlink_urb(pegasus->intr_urb);
15230         usb_unlink_urb(pegasus->tx_urb);
15231         usb_unlink_urb(pegasus->rx_urb);
15232 @@ -1095,12 +1041,11 @@
15233         usb_free_urb(pegasus->tx_urb);
15234         usb_free_urb(pegasus->rx_urb);
15235         usb_free_urb(pegasus->ctrl_urb);
15236 -       kfree( pegasus->net );
15237 -       kfree( pegasus );
15238 +       kfree(pegasus->net);
15239 +       kfree(pegasus);
15240         pegasus = NULL;
15241  }
15242  
15243 -
15244  static struct usb_driver pegasus_driver = {
15245         name:           "pegasus",
15246         probe:          pegasus_probe,
15247 @@ -1111,13 +1056,13 @@
15248  int __init pegasus_init(void)
15249  {
15250         info(DRIVER_VERSION ":" DRIVER_DESC);
15251 -       return usb_register( &pegasus_driver );
15252 +       return usb_register(&pegasus_driver);
15253  }
15254  
15255  void __exit pegasus_exit(void)
15256  {
15257 -       usb_deregister( &pegasus_driver );
15258 +       usb_deregister(&pegasus_driver);
15259  }
15260  
15261 -module_init( pegasus_init );
15262 -module_exit( pegasus_exit );
15263 +module_init(pegasus_init);
15264 +module_exit(pegasus_exit);
15265 diff -Nur linux-2.4.19.old/drivers/usb/pegasus.h linux-2.4.19/drivers/usb/pegasus.h
15266 --- linux-2.4.19.old/drivers/usb/pegasus.h      Sat Aug  3 02:39:45 2002
15267 +++ linux-2.4.19/drivers/usb/pegasus.h  Mon Nov 25 12:26:55 2002
15268 @@ -2,18 +2,9 @@
15269   * Copyright (c) 1999-2002 Petko Manolov - Petkan (petkan@users.sourceforge.net)
15270   *
15271   * This program is free software; you can redistribute it and/or modify
15272 - * it under the terms of the GNU General Public License as published by
15273 - * the Free Software Foundation; either version 2 of the License, or
15274 - * (at your option) any later version.
15275 + * it under the terms of the GNU General Public License version 2 as published
15276 + * by the Free Software Foundation.
15277   *
15278 - * This program is distributed in the hope that it will be useful,
15279 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
15280 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15281 - * GNU General Public License for more details.
15282 - *
15283 - * You should have received a copy of the GNU General Public License
15284 - * along with this program; if not, write to the Free Software
15285 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15286   */
15287  
15288  
15289 @@ -99,7 +90,7 @@
15290         int                     dev_index;
15291         int                     intr_interval;
15292         struct urb              *ctrl_urb, *rx_urb, *tx_urb, *intr_urb;
15293 -       devrequest              dr;
15294 +       struct usb_ctrlrequest  dr;
15295         wait_queue_head_t       ctrl_wait;
15296         struct semaphore        sem;
15297         unsigned char           rx_buff[PEGASUS_MAX_MTU];
15298 @@ -122,6 +113,7 @@
15299  #define        VENDOR_ABOCOM           0x07b8
15300  #define        VENDOR_ACCTON           0x083a
15301  #define        VENDOR_ADMTEK           0x07a6
15302 +#define        VENDOR_AEILAB           0x3334
15303  #define        VENDOR_ALLIEDTEL        0x07c9
15304  #define        VENDOR_BELKIN           0x050d
15305  #define        VENDOR_BILLIONTON       0x08dd
15306 @@ -177,6 +169,8 @@
15307                 DEFAULT_GPIO_RESET | HAS_HOME_PNA )
15308  PEGASUS_DEV( "ADMtek AN986A USB MAC", VENDOR_ADMTEK, 0x1986,
15309                 DEFAULT_GPIO_RESET | PEGASUS_II )
15310 +PEGASUS_DEV( "AEI USB Fast Ethernet Adapter", VENDOR_AEILAB, 0x1701,
15311 +               DEFAULT_GPIO_RESET | PEGASUS_II )
15312  PEGASUS_DEV( "Allied Telesyn Int. AT-USB100", VENDOR_ALLIEDTEL, 0xb100,
15313                 DEFAULT_GPIO_RESET | PEGASUS_II )
15314  PEGASUS_DEV( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121,
15315 @@ -193,6 +187,8 @@
15316                 DEFAULT_GPIO_RESET | PEGASUS_II )
15317  PEGASUS_DEV( "Corega FEter USB-TX", VENDOR_COREGA, 0x0004,
15318                 DEFAULT_GPIO_RESET )
15319 +PEGASUS_DEV( "Corega FEter", VENDOR_COREGA, 0x000d,
15320 +               DEFAULT_GPIO_RESET | PEGASUS_II )
15321  PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x4001,
15322                 LINKSYS_GPIO_RESET )
15323  PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x4002,
15324 @@ -207,7 +203,7 @@
15325                 DEFAULT_GPIO_RESET | HAS_HOME_PNA )
15326  PEGASUS_DEV( "D-Link DSB-650", VENDOR_DLINK, 0xabc1,
15327                 DEFAULT_GPIO_RESET )
15328 -PEGASUS_DEV( "ELCON EPLC10Mi USB to Powerline Adapter", VENDOR_ELCON, 0x0002,
15329 +PEGASUS_DEV( "GOLDPFEIL USB Adapter", VENDOR_ELCON, 0x0002,
15330                 DEFAULT_GPIO_RESET | PEGASUS_II | HAS_HOME_PNA )
15331  PEGASUS_DEV( "Elsa Micolink USB2Ethernet", VENDOR_ELSA, 0x3000,
15332                 DEFAULT_GPIO_RESET )
15333 @@ -256,6 +252,6 @@
15334  PEGASUS_DEV( "SOHOware NUB110 Ethernet", VENDOR_SOHOWARE, 0x9110,
15335                 DEFAULT_GPIO_RESET | PEGASUS_II )
15336  PEGASUS_DEV( "SpeedStream USB 10/100 Ethernet", VENDOR_SIEMENS, 0x1001,
15337 -               DEFAULT_GPIO_RESET )
15338 +               DEFAULT_GPIO_RESET | PEGASUS_II )
15339  
15340  #endif /* PEGASUS_DEV */
15341 diff -Nur linux-2.4.19.old/drivers/usb/printer.c linux-2.4.19/drivers/usb/printer.c
15342 --- linux-2.4.19.old/drivers/usb/printer.c      Sat Aug  3 02:39:45 2002
15343 +++ linux-2.4.19/drivers/usb/printer.c  Mon Nov 25 12:26:55 2002
15344 @@ -257,7 +257,7 @@
15345   * Get and print printer errors.
15346   */
15347  
15348 -static char *usblp_messages[] = { "ok", "out of paper", "off-line", "on fire" };
15349 +static char *usblp_messages[] = { "ok", "out of paper", "off-line", "unknown error" };
15350  
15351  static int usblp_check_status(struct usblp *usblp, int err)
15352  {
15353 @@ -388,7 +388,8 @@
15354  {
15355         struct usblp *usblp = file->private_data;
15356         int length, err, i;
15357 -       unsigned char status, newChannel;
15358 +       unsigned char lpstatus, newChannel;
15359 +       int status;
15360         int twoints[2];
15361         int retval = 0;
15362  
15363 @@ -539,12 +540,13 @@
15364                 switch (cmd) {
15365  
15366                         case LPGETSTATUS:
15367 -                               if (usblp_read_status(usblp, &status)) {
15368 +                               if (usblp_read_status(usblp, &lpstatus)) {
15369                                         err("usblp%d: failed reading printer status", usblp->minor);
15370                                         retval = -EIO;
15371                                         goto done;
15372                                 }
15373 -                               if (copy_to_user ((unsigned char *)arg, &status, 1))
15374 +                               status = lpstatus;
15375 +                               if (copy_to_user ((int *)arg, &status, sizeof(int)))
15376                                         retval = -EFAULT;
15377                                 break;
15378  
15379 @@ -560,7 +562,8 @@
15380  static ssize_t usblp_write(struct file *file, const char *buffer, size_t count, loff_t *ppos)
15381  {
15382         struct usblp *usblp = file->private_data;
15383 -       int timeout, err = 0, writecount = 0;
15384 +       int timeout, err = 0;
15385 +       size_t writecount = 0;
15386  
15387         while (writecount < count) {
15388  
15389 @@ -616,10 +619,9 @@
15390                                                          (count - writecount) : USBLP_BUF_SIZE;
15391  
15392                 if (copy_from_user(usblp->writeurb.transfer_buffer, buffer + writecount,
15393 -                               usblp->writeurb.transfer_buffer_length))
15394 -               {
15395 +                               usblp->writeurb.transfer_buffer_length)) {
15396                         up(&usblp->sem);
15397 -                       return writecount?writecount:-EFAULT;
15398 +                       return writecount ? writecount : -EFAULT;
15399                 }
15400  
15401                 usblp->writeurb.dev = usblp->dev;
15402 diff -Nur linux-2.4.19.old/drivers/usb/pwc-if.c linux-2.4.19/drivers/usb/pwc-if.c
15403 --- linux-2.4.19.old/drivers/usb/pwc-if.c       Sat Aug  3 02:39:45 2002
15404 +++ linux-2.4.19/drivers/usb/pwc-if.c   Mon Nov 25 12:26:55 2002
15405 @@ -65,7 +65,7 @@
15406  /* Function prototypes and driver templates */
15407  
15408  /* hotplug device table support */
15409 -static __devinitdata struct usb_device_id pwc_device_table [] = {
15410 +static struct usb_device_id pwc_device_table [] = {
15411         { USB_DEVICE(0x0471, 0x0302) }, /* Philips models */
15412         { USB_DEVICE(0x0471, 0x0303) },
15413         { USB_DEVICE(0x0471, 0x0304) },
15414 @@ -179,60 +179,25 @@
15415  /***************************************************************************/
15416  /* Private functions */
15417  
15418 -/* Memory management functions, nicked from cpia.c, which nicked them from
15419 -   bttv.c. So far, I've counted duplication of this code 6 times 
15420 -   (bttv, cpia, ibmcam, ov511, pwc, ieee1394).
15421 - */
15422 -
15423 -/* Given PGD from the address space's page table, return the kernel
15424 - * virtual mapping of the physical memory mapped at ADR.
15425 - */
15426 -static inline unsigned long uvirt_to_kva(pgd_t *pgd, unsigned long adr)
15427 -{
15428 -        unsigned long ret = 0UL;
15429 -       pmd_t *pmd;
15430 -       pte_t *ptep, pte;
15431 -  
15432 -       if (!pgd_none(*pgd)) {
15433 -                pmd = pmd_offset(pgd, adr);
15434 -                if (!pmd_none(*pmd)) {
15435 -                        ptep = pte_offset(pmd, adr);
15436 -                        pte = *ptep;
15437 -                        if(pte_present(pte)) {
15438 -                               ret  = (unsigned long) page_address(pte_page(pte));
15439 -                               ret |= (adr & (PAGE_SIZE - 1));
15440 -                               
15441 -                       }
15442 -                }
15443 -        }
15444 -       return ret;
15445 -}
15446 -
15447 -
15448 -
15449  /* Here we want the physical address of the memory.
15450 - * This is used when initializing the contents of the
15451 - * area and marking the pages as reserved.
15452 + * This is used when initializing the contents of the area.
15453   */
15454  static inline unsigned long kvirt_to_pa(unsigned long adr) 
15455  {
15456 -        unsigned long va, kva, ret;
15457 +        unsigned long kva, ret;
15458  
15459 -        va = VMALLOC_VMADDR(adr);
15460 -        kva = uvirt_to_kva(pgd_offset_k(va), va);
15461 +       kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
15462 +       kva |= adr & (PAGE_SIZE-1); /* restore the offset */
15463         ret = __pa(kva);
15464          return ret;
15465  }
15466  
15467 -static void * rvmalloc(signed long size)
15468 +static void * rvmalloc(unsigned long size)
15469  {
15470         void * mem;
15471 -       unsigned long adr, page;
15472 +       unsigned long adr;
15473  
15474 -        /* Round it off to PAGE_SIZE */
15475 -        size += (PAGE_SIZE - 1);
15476 -        size &= ~(PAGE_SIZE - 1);      
15477 -        
15478 +       size=PAGE_ALIGN(size);
15479          mem=vmalloc_32(size);
15480         if (mem) 
15481         {
15482 @@ -240,8 +205,7 @@
15483                 adr=(unsigned long) mem;
15484                 while (size > 0) 
15485                  {
15486 -                       page = kvirt_to_pa(adr);
15487 -                       mem_map_reserve(virt_to_page(__va(page)));
15488 +                       mem_map_reserve(vmalloc_to_page((void *)adr));
15489                         adr+=PAGE_SIZE;
15490                         size-=PAGE_SIZE;
15491                 }
15492 @@ -249,20 +213,16 @@
15493         return mem;
15494  }
15495  
15496 -static void rvfree(void * mem, signed long size)
15497 +static void rvfree(void * mem, unsigned long size)
15498  {
15499 -        unsigned long adr, page;
15500 -        
15501 -        /* Round it off to PAGE_SIZE */
15502 -        size += (PAGE_SIZE - 1);
15503 -        size &= ~(PAGE_SIZE - 1);      
15504 +        unsigned long adr;
15505 +
15506         if (mem) 
15507         {
15508                 adr=(unsigned long) mem;
15509 -               while (size > 0) 
15510 +               while ((long) size > 0) 
15511                  {
15512 -                       page = kvirt_to_pa(adr);
15513 -                       mem_map_unreserve(virt_to_page(__va(page)));
15514 +                       mem_map_unreserve(vmalloc_to_page((void *)adr));
15515                         adr+=PAGE_SIZE;
15516                         size-=PAGE_SIZE;
15517                 }
15518 diff -Nur linux-2.4.19.old/drivers/usb/rtl8150.c linux-2.4.19/drivers/usb/rtl8150.c
15519 --- linux-2.4.19.old/drivers/usb/rtl8150.c      Sat Aug  3 02:39:45 2002
15520 +++ linux-2.4.19/drivers/usb/rtl8150.c  Mon Nov 25 12:26:56 2002
15521 @@ -1,11 +1,9 @@
15522  /*
15523 - * Copyright (c) 2002 Petko Manolov (petkan@users.sourceforge.net)
15524 - *
15525 - *     This program is free software; you can redistribute it and/or
15526 - *     modify it under the terms of the GNU General Public License as
15527 - *     published by the Free Software Foundation; either version 2 of
15528 - *     the License, or (at your option) any later version.
15529 + *  Copyright (c) 2002 Petko Manolov (petkan@users.sourceforge.net)
15530   *
15531 + * This program is free software; you can redistribute it and/or
15532 + * modify it under the terms of the GNU General Public License 
15533 + * version 2 as published by the Free Software Foundation.
15534   */
15535  
15536  #include <linux/config.h>
15537 @@ -22,14 +20,11 @@
15538  #include <linux/init.h>
15539  #include <asm/uaccess.h>
15540  
15541 -
15542 -
15543  /* Version Information */
15544 -#define DRIVER_VERSION "v0.4.0 (2002/03/28)"
15545 +#define DRIVER_VERSION "v0.4.1 (2002/07/22)"
15546  #define DRIVER_AUTHOR "Petko Manolov <petkan@users.sourceforge.net>"
15547  #define DRIVER_DESC "rtl8150 based usb-ethernet driver"
15548  
15549 -
15550  #define        IRD                     0x0120
15551  #define        MAR                     0x0126
15552  #define        CR                      0x012e
15553 @@ -69,49 +64,48 @@
15554  #define        RX_REG_SET              1
15555  #define        RTL8150_UNPLUG          2
15556  
15557 -
15558  /* Define these values to match your device */
15559  #define VENDOR_ID_REALTEK              0x0bda
15560 +#define        VENDOR_ID_MELCO                 0x0411
15561 +
15562  #define PRODUCT_ID_RTL8150             0x8150
15563 +#define        PRODUCT_ID_LUAKTX               0x0012
15564  
15565  /* table of devices that work with this driver */
15566 -static struct usb_device_id rtl8150_table [] = {
15567 -       { USB_DEVICE(VENDOR_ID_REALTEK, PRODUCT_ID_RTL8150) },
15568 -       { }                             
15569 +static struct usb_device_id rtl8150_table[] = {
15570 +       {USB_DEVICE(VENDOR_ID_REALTEK, PRODUCT_ID_RTL8150)},
15571 +       {USB_DEVICE(VENDOR_ID_MELCO, PRODUCT_ID_LUAKTX)},
15572 +       {}
15573  };
15574  
15575 -MODULE_DEVICE_TABLE (usb, rtl8150_table);
15576 -
15577 +MODULE_DEVICE_TABLE(usb, rtl8150_table);
15578  
15579  struct rtl8150 {
15580 -       unsigned long           flags;
15581 -       struct usb_device       *udev;
15582 -       struct usb_interface    *interface;
15583 -       struct semaphore        sem;
15584 -       struct net_device_stats stats;
15585 -       struct net_device       *netdev;
15586 -       struct urb              *rx_urb, *tx_urb, *intr_urb, *ctrl_urb;
15587 -       devrequest              dr;
15588 -       int                     intr_interval;
15589 -       u16                     rx_creg;
15590 -       u8                      rx_buff[RTL8150_MAX_MTU];
15591 -       u8                      tx_buff[RTL8150_MAX_MTU];
15592 -       u8                      intr_buff[8];
15593 -       u8                      phy;
15594 +       unsigned int flags;
15595 +       struct usb_device *udev;
15596 +       struct usb_interface *interface;
15597 +       struct semaphore sem;
15598 +       struct net_device_stats stats;
15599 +       struct net_device *netdev;
15600 +       struct urb *rx_urb, *tx_urb, *intr_urb, *ctrl_urb;
15601 +       struct usb_ctrlrequest dr;
15602 +       int intr_interval;
15603 +       u16 rx_creg;
15604 +       u8 rx_buff[RTL8150_MAX_MTU];
15605 +       u8 tx_buff[RTL8150_MAX_MTU];
15606 +       u8 intr_buff[8];
15607 +       u8 phy;
15608  };
15609  
15610 -typedef        struct rtl8150  rtl8150_t;
15611 -
15612 +typedef struct rtl8150 rtl8150_t;
15613  
15614  /* the global usb devfs handle */
15615  extern devfs_handle_t usb_devfs_handle;
15616  unsigned long multicast_filter_limit = 32;
15617  
15618 -
15619  static void rtl8150_disconnect(struct usb_device *dev, void *ptr);
15620 -static void * rtl8150_probe(struct usb_device *dev, unsigned int ifnum,
15621 -                           const struct usb_device_id *id);
15622 -
15623 +static void *rtl8150_probe(struct usb_device *dev, unsigned int ifnum,
15624 +                          const struct usb_device_id *id);
15625  
15626  static struct usb_driver rtl8150_driver = {
15627         name:           "rtl8150",
15628 @@ -120,33 +114,29 @@
15629         id_table:       rtl8150_table,
15630  };
15631  
15632 -
15633 -
15634  /*
15635  **
15636  **     device related part of the code
15637  **
15638  */
15639 -static int get_registers(rtl8150_t *dev, u16 indx, u16 size, void *data)
15640 +static int get_registers(rtl8150_t * dev, u16 indx, u16 size, void *data)
15641  {
15642 -       return usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev,0),
15643 -                               RTL8150_REQ_GET_REGS, RTL8150_REQT_READ,
15644 -                               indx, 0, data, size, HZ/2);
15645 +       return usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0),
15646 +                              RTL8150_REQ_GET_REGS, RTL8150_REQT_READ,
15647 +                              indx, 0, data, size, HZ / 2);
15648  }
15649  
15650 -
15651 -static int set_registers(rtl8150_t *dev, u16 indx, u16 size, void *data)
15652 +static int set_registers(rtl8150_t * dev, u16 indx, u16 size, void *data)
15653  {
15654 -       return usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev,0),
15655 -                               RTL8150_REQ_SET_REGS, RTL8150_REQT_WRITE,
15656 -                               indx, 0, data, size, HZ/2);
15657 +       return usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0),
15658 +                              RTL8150_REQ_SET_REGS, RTL8150_REQT_WRITE,
15659 +                              indx, 0, data, size, HZ / 2);
15660  }
15661  
15662 -
15663  static void ctrl_callback(struct urb *urb)
15664  {
15665 -       rtl8150_t       *dev;
15666 -       
15667 +       rtl8150_t *dev;
15668 +
15669         switch (urb->status) {
15670         case 0:
15671                 break;
15672 @@ -161,22 +151,22 @@
15673         clear_bit(RX_REG_SET, &dev->flags);
15674  }
15675  
15676 -
15677 -static int async_set_registers(rtl8150_t *dev, u16 indx, u16 size, void *data)
15678 +static int async_set_registers(rtl8150_t * dev, u16 indx, u16 size, void *data)
15679  {
15680 -       int     ret;
15681 +       int ret;
15682  
15683         if (test_bit(RX_REG_SET, &dev->flags))
15684                 return -EAGAIN;
15685 -       
15686 -       dev->dr.requesttype = RTL8150_REQT_WRITE;
15687 -       dev->dr.request = RTL8150_REQ_SET_REGS;
15688 -       dev->dr.value = cpu_to_le16(indx);
15689 -       dev->dr.index = 0;
15690 -       dev->dr.length = cpu_to_le16(2);
15691 +
15692 +       dev->dr.bRequestType = RTL8150_REQT_WRITE;
15693 +       dev->dr.bRequest = RTL8150_REQ_SET_REGS;
15694 +       dev->dr.wValue = cpu_to_le16(indx);
15695 +       dev->dr.wIndex = 0;
15696 +       dev->dr.wLength = cpu_to_le16(2);
15697         dev->ctrl_urb->transfer_buffer_length = 2;
15698 -       FILL_CONTROL_URB(dev->ctrl_urb, dev->udev, usb_sndctrlpipe(dev->udev,0),
15699 -                        (char*)&dev->dr, &dev->rx_creg, 2, ctrl_callback, dev);
15700 +       FILL_CONTROL_URB(dev->ctrl_urb, dev->udev,
15701 +                        usb_sndctrlpipe(dev->udev, 0), (char *) &dev->dr,
15702 +                        &dev->rx_creg, 2, ctrl_callback, dev);
15703         if ((ret = usb_submit_urb(dev->ctrl_urb)))
15704                 err("control request submission failed: %d", ret);
15705         else
15706 @@ -185,11 +175,10 @@
15707         return ret;
15708  }
15709  
15710 -
15711 -static int read_mii_word(rtl8150_t *dev, u8 phy, __u8 indx, u16 *reg)
15712 +static int read_mii_word(rtl8150_t * dev, u8 phy, __u8 indx, u16 * reg)
15713  {
15714 -       int     i;
15715 -       u8      data[3], tmp;
15716 +       int i;
15717 +       u8 data[3], tmp;
15718  
15719         data[0] = phy;
15720         data[1] = data[2] = 0;
15721 @@ -204,17 +193,16 @@
15722  
15723         if (i < HZ) {
15724                 get_registers(dev, PHYDAT, 2, data);
15725 -               *reg = le16_to_cpup(data);
15726 +               *reg = le16_to_cpup((u16 *)data);
15727                 return 0;
15728         } else
15729                 return 1;
15730  }
15731  
15732 -
15733 -static int write_mii_word(rtl8150_t *dev, u8 phy, __u8 indx, u16 reg)
15734 +static int write_mii_word(rtl8150_t * dev, u8 phy, __u8 indx, u16 reg)
15735  {
15736 -       int     i;
15737 -       u8      data[3], tmp;
15738 +       int i;
15739 +       u8 data[3], tmp;
15740  
15741         data[0] = phy;
15742         *(data + 1) = cpu_to_le16p(&reg);
15743 @@ -225,7 +213,7 @@
15744         set_registers(dev, PHYCNT, 1, &tmp);
15745         do {
15746                 get_registers(dev, PHYCNT, 1, data);
15747 -       } while((data[0] & PHY_GO) && (i++ < HZ));
15748 +       } while ((data[0] & PHY_GO) && (i++ < HZ));
15749  
15750         if (i < HZ)
15751                 return 0;
15752 @@ -233,31 +221,28 @@
15753                 return 1;
15754  }
15755  
15756 -
15757 -static inline void set_ethernet_addr(rtl8150_t *dev)
15758 +static inline void set_ethernet_addr(rtl8150_t * dev)
15759  {
15760 -       u8      node_id[6];
15761 +       u8 node_id[6];
15762  
15763         get_registers(dev, IRD, sizeof(node_id), node_id);
15764         memcpy(dev->netdev->dev_addr, node_id, sizeof(node_id));
15765  }
15766  
15767 -
15768 -static int rtl8150_reset(rtl8150_t *dev)
15769 +static int rtl8150_reset(rtl8150_t * dev)
15770  {
15771 -       u8      data=0x10;
15772 -       int     i=HZ;
15773 +       u8 data = 0x10;
15774 +       int i = HZ;
15775  
15776         set_registers(dev, CR, 1, &data);
15777         do {
15778                 get_registers(dev, CR, 1, &data);
15779         } while ((data & 0x10) && --i);
15780 -       
15781 +
15782         return (i > 0) ? 0 : -1;
15783  }
15784  
15785 -
15786 -static int alloc_all_urbs(rtl8150_t *dev)
15787 +static int alloc_all_urbs(rtl8150_t * dev)
15788  {
15789         dev->rx_urb = usb_alloc_urb(0);
15790         if (!dev->rx_urb)
15791 @@ -284,8 +269,7 @@
15792         return 1;
15793  }
15794  
15795 -
15796 -static void free_all_urbs(rtl8150_t *dev)
15797 +static void free_all_urbs(rtl8150_t * dev)
15798  {
15799         usb_free_urb(dev->rx_urb);
15800         usb_free_urb(dev->tx_urb);
15801 @@ -293,8 +277,7 @@
15802         usb_free_urb(dev->ctrl_urb);
15803  }
15804  
15805 -
15806 -static void unlink_all_urbs(rtl8150_t *dev)
15807 +static void unlink_all_urbs(rtl8150_t * dev)
15808  {
15809         usb_unlink_urb(dev->rx_urb);
15810         usb_unlink_urb(dev->tx_urb);
15811 @@ -302,14 +285,13 @@
15812         usb_unlink_urb(dev->ctrl_urb);
15813  }
15814  
15815 -
15816  static void read_bulk_callback(struct urb *urb)
15817  {
15818 -       rtl8150_t       *dev;
15819 -       int             pkt_len, res;
15820 -       struct sk_buff  *skb;
15821 +       rtl8150_t *dev;
15822 +       int pkt_len, res;
15823 +       struct sk_buff *skb;
15824         struct net_device *netdev;
15825 -       u16             rx_stat;
15826 +       u16 rx_stat;
15827  
15828         dev = urb->context;
15829         if (!dev) {
15830 @@ -333,11 +315,11 @@
15831                 warn("Rx status %d", urb->status);
15832                 goto goon;
15833         }
15834 -       
15835 +
15836         pkt_len = urb->actual_length - 4;
15837 -       rx_stat = le16_to_cpu(*(u16 *)(dev->rx_buff + pkt_len));
15838 +       rx_stat = le16_to_cpu(*(u16 *) (dev->rx_buff + pkt_len));
15839  
15840 -       if (!(skb = dev_alloc_skb(pkt_len + 2))) 
15841 +       if (!(skb = dev_alloc_skb(pkt_len + 2)))
15842                 goto goon;
15843         skb->dev = netdev;
15844         skb_reserve(skb, 2);
15845 @@ -348,16 +330,15 @@
15846         dev->stats.rx_packets++;
15847         dev->stats.rx_bytes += pkt_len;
15848  goon:
15849 -       FILL_BULK_URB(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev,1),
15850 -                     dev->rx_buff, RTL8150_MAX_MTU, read_bulk_callback, dev);
15851 -       if ((res=usb_submit_urb(dev->rx_urb)))
15852 +       FILL_BULK_URB(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1),
15853 +                     dev->rx_buff, RTL8150_MAX_MTU, read_bulk_callback, dev);
15854 +       if ((res = usb_submit_urb(dev->rx_urb)))
15855                 warn("%s: Rx urb submission failed %d", netdev->name, res);
15856  }
15857  
15858 -
15859  static void write_bulk_callback(struct urb *urb)
15860  {
15861 -       rtl8150_t       *dev;
15862 +       rtl8150_t *dev;
15863  
15864         dev = urb->context;
15865         if (!dev)
15866 @@ -370,36 +351,32 @@
15867         netif_wake_queue(dev->netdev);
15868  }
15869  
15870 -
15871  void intr_callback(struct urb *urb)
15872  {
15873 -       rtl8150_t       *dev;
15874 +       rtl8150_t *dev;
15875  
15876         dev = urb->context;
15877         if (!dev)
15878                 return;
15879         switch (urb->status) {
15880 -               case 0:
15881 -                       break;
15882 -               case -ENOENT:
15883 -                       return;
15884 -               default:
15885 -                       info("%s: intr status %d", dev->netdev->name,
15886 -                            urb->status);
15887 +       case 0:
15888 +               break;
15889 +       case -ENOENT:
15890 +               return;
15891 +       default:
15892 +               info("%s: intr status %d", dev->netdev->name, urb->status);
15893         }
15894  }
15895  
15896 -
15897  /*
15898  **
15899  **     network related part of the code
15900  **
15901  */
15902  
15903 -
15904 -static int enable_net_traffic(rtl8150_t *dev)
15905 +static int enable_net_traffic(rtl8150_t * dev)
15906  {
15907 -       u8      cr, tcr, rcr, msr;
15908 +       u8 cr, tcr, rcr, msr;
15909  
15910         if (rtl8150_reset(dev)) {
15911                 warn("%s - device reset failed", __FUNCTION__);
15912 @@ -415,26 +392,23 @@
15913         return 0;
15914  }
15915  
15916 -
15917 -static void disable_net_traffic(rtl8150_t *dev)
15918 +static void disable_net_traffic(rtl8150_t * dev)
15919  {
15920 -       u8      cr;
15921 +       u8 cr;
15922  
15923         get_registers(dev, CR, 1, &cr);
15924         cr &= 0xf3;
15925         set_registers(dev, CR, 1, &cr);
15926  }
15927  
15928 -
15929  static struct net_device_stats *rtl8150_netdev_stats(struct net_device *dev)
15930  {
15931 -       return &((rtl8150_t *)dev->priv)->stats;
15932 +       return &((rtl8150_t *) dev->priv)->stats;
15933  }
15934  
15935 -
15936  static void rtl8150_tx_timeout(struct net_device *netdev)
15937  {
15938 -       rtl8150_t       *dev;
15939 +       rtl8150_t *dev;
15940  
15941         dev = netdev->priv;
15942         if (!dev)
15943 @@ -445,10 +419,9 @@
15944         dev->stats.tx_errors++;
15945  }
15946  
15947 -
15948  static void rtl8150_set_multicast(struct net_device *netdev)
15949  {
15950 -       rtl8150_t       *dev;
15951 +       rtl8150_t *dev;
15952  
15953         dev = netdev->priv;
15954         netif_stop_queue(netdev);
15955 @@ -456,7 +429,7 @@
15956                 dev->rx_creg |= 0x0001;
15957                 info("%s: promiscuous mode", netdev->name);
15958         } else if ((netdev->mc_count > multicast_filter_limit) ||
15959 -                  (netdev->flags & IFF_ALLMULTI)) {
15960 +                  (netdev->flags & IFF_ALLMULTI)) {
15961                 dev->rx_creg &= 0xfffe;
15962                 dev->rx_creg |= 0x0002;
15963                 info("%s: allmulti set", netdev->name);
15964 @@ -468,18 +441,17 @@
15965         netif_wake_queue(netdev);
15966  }
15967  
15968 -
15969  static int rtl8150_start_xmit(struct sk_buff *skb, struct net_device *netdev)
15970  {
15971 -       rtl8150_t       *dev;
15972 -       int             count, res;
15973 +       rtl8150_t *dev;
15974 +       int count, res;
15975  
15976         netif_stop_queue(netdev);
15977         dev = netdev->priv;
15978         count = (skb->len < 60) ? 60 : skb->len;
15979         count = (count & 0x3f) ? count : count + 1;
15980         memcpy(dev->tx_buff, skb->data, skb->len);
15981 -       FILL_BULK_URB(dev->tx_urb, dev->udev, usb_sndbulkpipe(dev->udev,2),
15982 +       FILL_BULK_URB(dev->tx_urb, dev->udev, usb_sndbulkpipe(dev->udev, 2),
15983                       dev->tx_buff, RTL8150_MAX_MTU, write_bulk_callback, dev);
15984         dev->tx_urb->transfer_buffer_length = count;
15985  
15986 @@ -497,26 +469,25 @@
15987         return 0;
15988  }
15989  
15990 -
15991  static int rtl8150_open(struct net_device *netdev)
15992  {
15993 -       rtl8150_t       *dev;
15994 -       int             res;
15995 -       
15996 +       rtl8150_t *dev;
15997 +       int res;
15998 +
15999         dev = netdev->priv;
16000         if (dev == NULL) {
16001                 return -ENODEV;
16002         }
16003  
16004         down(&dev->sem);
16005 -       FILL_BULK_URB(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev,1),
16006 -                       dev->rx_buff, RTL8150_MAX_MTU, read_bulk_callback, dev);
16007 -       if ((res=usb_submit_urb(dev->rx_urb)))
16008 +       FILL_BULK_URB(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1),
16009 +                     dev->rx_buff, RTL8150_MAX_MTU, read_bulk_callback, dev);
16010 +       if ((res = usb_submit_urb(dev->rx_urb)))
16011                 warn("%s: rx_urb submit failed: %d", __FUNCTION__, res);
16012 -       FILL_INT_URB(dev->intr_urb, dev->udev, usb_rcvintpipe(dev->udev,3),
16013 -                       dev->intr_buff, sizeof(dev->intr_buff), intr_callback,
16014 -                       dev, dev->intr_interval);
16015 -       if ((res=usb_submit_urb(dev->intr_urb)))
16016 +       FILL_INT_URB(dev->intr_urb, dev->udev, usb_rcvintpipe(dev->udev, 3),
16017 +                    dev->intr_buff, sizeof(dev->intr_buff), intr_callback,
16018 +                    dev, dev->intr_interval);
16019 +       if ((res = usb_submit_urb(dev->intr_urb)))
16020                 warn("%s: intr_urb submit failed: %d", __FUNCTION__, res);
16021         netif_start_queue(netdev);
16022         enable_net_traffic(dev);
16023 @@ -525,7 +496,6 @@
16024         return res;
16025  }
16026  
16027 -
16028  static int rtl8150_close(struct net_device *netdev)
16029  {
16030         rtl8150_t *dev;
16031 @@ -545,93 +515,92 @@
16032         return res;
16033  }
16034  
16035 -
16036  static int rtl8150_ethtool_ioctl(struct net_device *netdev, void *uaddr)
16037  {
16038 -       rtl8150_t       *dev;
16039 -       int             cmd;
16040 -       char            tmp[128];
16041 +       rtl8150_t *dev;
16042 +       int cmd;
16043 +       char tmp[128];
16044  
16045         dev = netdev->priv;
16046 -       if (get_user(cmd, (int *)uaddr))
16047 +       if (get_user(cmd, (int *) uaddr))
16048                 return -EFAULT;
16049  
16050         switch (cmd) {
16051 -       case ETHTOOL_GDRVINFO: {
16052 -               struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
16053 -               
16054 -               strncpy(info.driver, DRIVER_DESC, ETHTOOL_BUSINFO_LEN);
16055 -               strncpy(info.version, DRIVER_VERSION, ETHTOOL_BUSINFO_LEN);
16056 -               sprintf(tmp, "usb%d:%d", dev->udev->bus->busnum,
16057 -                       dev->udev->devnum);
16058 -               strncpy(info.bus_info, tmp, ETHTOOL_BUSINFO_LEN);
16059 -               if (copy_to_user(uaddr, &info, sizeof(info)))
16060 -                       return -EFAULT;
16061 -               return 0;
16062 -       }
16063 -       case ETHTOOL_GSET: {
16064 -               struct ethtool_cmd ecmd;
16065 -               short   lpa, bmcr;
16066 -
16067 -               if (copy_from_user(&ecmd, uaddr, sizeof(ecmd)))
16068 -                       return -EFAULT;
16069 -               ecmd.supported = (SUPPORTED_10baseT_Half |
16070 -                                 SUPPORTED_10baseT_Full |
16071 -                                 SUPPORTED_100baseT_Half |
16072 -                                 SUPPORTED_100baseT_Full |
16073 -                                 SUPPORTED_Autoneg |
16074 -                                 SUPPORTED_TP |
16075 -                                 SUPPORTED_MII);
16076 -               ecmd.port = PORT_TP;
16077 -               ecmd.transceiver = XCVR_INTERNAL;
16078 -               ecmd.phy_address = dev->phy;
16079 -               get_registers(dev, BMCR, 2, &bmcr);
16080 -               get_registers(dev, ANLP, 2, &lpa);
16081 -               if (bmcr & BMCR_ANENABLE) {
16082 -                       ecmd.autoneg = AUTONEG_ENABLE;
16083 -                       ecmd.speed = (lpa & (LPA_100HALF | LPA_100FULL)) ?
16084 -                                    SPEED_100 : SPEED_10;
16085 -                       if (ecmd.speed == SPEED_100)
16086 -                               ecmd.duplex = (lpa & LPA_100FULL) ?
16087 -                                             DUPLEX_FULL : DUPLEX_HALF;
16088 -                       else
16089 -                               ecmd.duplex = (lpa & LPA_10FULL) ?
16090 -                                             DUPLEX_FULL : DUPLEX_HALF;
16091 -               } else {
16092 -                       ecmd.autoneg = AUTONEG_DISABLE;
16093 -                       ecmd.speed = (bmcr & BMCR_SPEED100) ?
16094 -                                    SPEED_100 : SPEED_10;
16095 -                       ecmd.duplex = (bmcr & BMCR_FULLDPLX) ?
16096 -                                     DUPLEX_FULL : DUPLEX_HALF;
16097 +       case ETHTOOL_GDRVINFO:{
16098 +                       struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
16099 +
16100 +                       strncpy(info.driver, DRIVER_DESC, ETHTOOL_BUSINFO_LEN);
16101 +                       strncpy(info.version, DRIVER_VERSION,
16102 +                               ETHTOOL_BUSINFO_LEN);
16103 +                       sprintf(tmp, "usb%d:%d", dev->udev->bus->busnum,
16104 +                               dev->udev->devnum);
16105 +                       strncpy(info.bus_info, tmp, ETHTOOL_BUSINFO_LEN);
16106 +                       if (copy_to_user(uaddr, &info, sizeof(info)))
16107 +                               return -EFAULT;
16108 +                       return 0;
16109 +               }
16110 +       case ETHTOOL_GSET:{
16111 +                       struct ethtool_cmd ecmd;
16112 +                       short lpa, bmcr;
16113 +
16114 +                       if (copy_from_user(&ecmd, uaddr, sizeof(ecmd)))
16115 +                               return -EFAULT;
16116 +                       ecmd.supported = (SUPPORTED_10baseT_Half |
16117 +                                         SUPPORTED_10baseT_Full |
16118 +                                         SUPPORTED_100baseT_Half |
16119 +                                         SUPPORTED_100baseT_Full |
16120 +                                         SUPPORTED_Autoneg |
16121 +                                         SUPPORTED_TP | SUPPORTED_MII);
16122 +                       ecmd.port = PORT_TP;
16123 +                       ecmd.transceiver = XCVR_INTERNAL;
16124 +                       ecmd.phy_address = dev->phy;
16125 +                       get_registers(dev, BMCR, 2, &bmcr);
16126 +                       get_registers(dev, ANLP, 2, &lpa);
16127 +                       if (bmcr & BMCR_ANENABLE) {
16128 +                               ecmd.autoneg = AUTONEG_ENABLE;
16129 +                               ecmd.speed =
16130 +                                   (lpa & (LPA_100HALF | LPA_100FULL)) ?
16131 +                                   SPEED_100 : SPEED_10;
16132 +                               if (ecmd.speed == SPEED_100)
16133 +                                       ecmd.duplex = (lpa & LPA_100FULL) ?
16134 +                                           DUPLEX_FULL : DUPLEX_HALF;
16135 +                               else
16136 +                                       ecmd.duplex = (lpa & LPA_10FULL) ?
16137 +                                           DUPLEX_FULL : DUPLEX_HALF;
16138 +                       } else {
16139 +                               ecmd.autoneg = AUTONEG_DISABLE;
16140 +                               ecmd.speed = (bmcr & BMCR_SPEED100) ?
16141 +                                   SPEED_100 : SPEED_10;
16142 +                               ecmd.duplex = (bmcr & BMCR_FULLDPLX) ?
16143 +                                   DUPLEX_FULL : DUPLEX_HALF;
16144 +                       }
16145 +                       if (copy_to_user(uaddr, &ecmd, sizeof(ecmd)))
16146 +                               return -EFAULT;
16147 +                       return 0;
16148                 }
16149 -               if (copy_to_user(uaddr, &ecmd, sizeof(ecmd)))
16150 -                       return -EFAULT;
16151 -               return 0;
16152 -       }
16153         case ETHTOOL_SSET:
16154                 return -ENOTSUPP;
16155 -       case ETHTOOL_GLINK: {
16156 -               struct ethtool_value edata = {ETHTOOL_GLINK};
16157 +       case ETHTOOL_GLINK:{
16158 +                       struct ethtool_value edata = { ETHTOOL_GLINK };
16159  
16160 -               edata.data = netif_carrier_ok(netdev);
16161 -               if (copy_to_user(uaddr, &edata, sizeof(edata)))
16162 -                       return -EFAULT;
16163 -               return 0;
16164 -       }
16165 +                       edata.data = netif_carrier_ok(netdev);
16166 +                       if (copy_to_user(uaddr, &edata, sizeof(edata)))
16167 +                               return -EFAULT;
16168 +                       return 0;
16169 +               }
16170         default:
16171                 return -EOPNOTSUPP;
16172         }
16173  }
16174  
16175 -
16176 -static int rtl8150_ioctl (struct net_device *netdev, struct ifreq *rq, int cmd)
16177 +static int rtl8150_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
16178  {
16179         rtl8150_t *dev;
16180 -       u16     *data;
16181 -       int     res;
16182 +       u16 *data;
16183 +       int res;
16184  
16185         dev = netdev->priv;
16186 -       data = (u16 *)&rq->ifr_data;
16187 +       data = (u16 *) & rq->ifr_data;
16188         res = 0;
16189  
16190         down(&dev->sem);
16191 @@ -641,10 +610,10 @@
16192                 break;
16193         case SIOCDEVPRIVATE:
16194                 data[0] = dev->phy;
16195 -       case SIOCDEVPRIVATE+1:
16196 +       case SIOCDEVPRIVATE + 1:
16197                 read_mii_word(dev, dev->phy, (data[1] & 0x1f), &data[3]);
16198                 break;
16199 -       case SIOCDEVPRIVATE+2:
16200 +       case SIOCDEVPRIVATE + 2:
16201                 if (!capable(CAP_NET_ADMIN)) {
16202                         up(&dev->sem);
16203                         return -EPERM;
16204 @@ -659,9 +628,8 @@
16205         return res;
16206  }
16207  
16208 -
16209 -static void * rtl8150_probe(struct usb_device *udev, unsigned int ifnum,
16210 -                           const struct usb_device_id *id)
16211 +static void *rtl8150_probe(struct usb_device *udev, unsigned int ifnum,
16212 +                          const struct usb_device_id *id)
16213  {
16214         rtl8150_t *dev;
16215         struct net_device *netdev;
16216 @@ -671,14 +639,9 @@
16217                 err("usb_set_configuration() failed");
16218                 return NULL;
16219         }
16220 -       if ((udev->descriptor.idVendor != VENDOR_ID_REALTEK) ||
16221 -           (udev->descriptor.idProduct != PRODUCT_ID_RTL8150)) {
16222 -               err("Not the one we are interested about");
16223 -               return NULL;
16224 -       }
16225         dev = kmalloc(sizeof(rtl8150_t), GFP_KERNEL);
16226         if (!dev) {
16227 -               err ("Out of memory");
16228 +               err("Out of memory");
16229                 goto exit;
16230         } else
16231                 memset(dev, 0, sizeof(rtl8150_t));
16232 @@ -690,7 +653,7 @@
16233                 dev = NULL;
16234                 goto exit;
16235         }
16236 -               
16237 +
16238         init_MUTEX(&dev->sem);
16239         dev->udev = udev;
16240         dev->netdev = netdev;
16241 @@ -724,7 +687,6 @@
16242         return dev;
16243  }
16244  
16245 -
16246  static void rtl8150_disconnect(struct usb_device *udev, void *ptr)
16247  {
16248         rtl8150_t *dev;
16249 @@ -740,21 +702,17 @@
16250         dev = NULL;
16251  }
16252  
16253 -
16254 -
16255  static int __init usb_rtl8150_init(void)
16256  {
16257         info(DRIVER_DESC " " DRIVER_VERSION);
16258         return usb_register(&rtl8150_driver);
16259  }
16260  
16261 -
16262  static void __exit usb_rtl8150_exit(void)
16263  {
16264         usb_deregister(&rtl8150_driver);
16265  }
16266  
16267 -
16268  module_init(usb_rtl8150_init);
16269  module_exit(usb_rtl8150_exit);
16270  
16271 diff -Nur linux-2.4.19.old/drivers/usb/scanner.c linux-2.4.19/drivers/usb/scanner.c
16272 --- linux-2.4.19.old/drivers/usb/scanner.c      Fri Dec 21 18:41:55 2001
16273 +++ linux-2.4.19/drivers/usb/scanner.c  Mon Nov 25 12:26:56 2002
16274 @@ -1,13 +1,13 @@
16275  /* -*- linux-c -*- */
16276  
16277  /* 
16278 - * Driver for USB Scanners (linux-2.4.12)
16279 + * Driver for USB Scanners (linux-2.4.18)
16280   *
16281 - * Copyright (C) 1999, 2000, 2001 David E. Nelson
16282 + * Copyright (C) 1999, 2000, 2001, 2002 David E. Nelson
16283   *
16284   * Portions may be copyright Brad Keryan and Michael Gee.
16285   *
16286 - * David E. Nelson (dnelson@jump.net)
16287 + * Brian Beattie <beattie@beattie-home.net>
16288   * 
16289   * This program is free software; you can redistribute it and/or
16290   * modify it under the terms of the GNU General Public License as
16291 @@ -300,11 +300,24 @@
16292   *      Frank Zago <fzago@greshamstorage.com> and
16293   *      Oliver Neukum <520047054719-0001@t-online.de> for reviewing/testing.
16294   *
16295 + * 0.4.8  5/30/2002
16296 + *    - Added Mustek BearPaw 2400 TA.  Thanks to Sergey
16297 + *      Vlasov <vsu@mivlgu.murom.ru>.
16298 + *    - Added Mustek 1200UB Plus and Mustek BearPaw 1200 CU ID's.  These use
16299 + *      the Grandtech GT-6801 chip. Thanks to Henning
16300 + *      Meier-Geinitz <henning@meier-geinitz.de>.
16301 + *    - Increased Epson timeout to 60 secs as requested from 
16302 + *      Karl Heinz Kremer <khk@khk.net>.
16303 + *    - Changed maintainership from David E. Nelson to Brian
16304 + *      Beattie <beattie@beattie-home.net>.
16305 + *
16306   * TODO
16307 + *    - Remove the 2/3 endpoint limitation
16308   *    - Performance
16309   *    - Select/poll methods
16310   *    - More testing
16311   *    - Proper registry/assignment for LM9830 ioctl's
16312 + *    - More general usage ioctl's
16313   *
16314   *
16315   *  Thanks to:
16316 @@ -320,6 +333,8 @@
16317   *    - All the folks who chimed in with reports and suggestions.
16318   *    - All the developers that are working on USB SANE backends or other
16319   *      applications to use USB scanners.
16320 + *    - Thanks to Greg KH <greg@kroah.com> for setting up Brian Beattie
16321 + *      to be the new USB Scanner maintainer.
16322   *
16323   *  Performance:
16324   *
16325 @@ -747,7 +762,7 @@
16326         case SCANNER_IOCTL_CTRLMSG:
16327         {
16328                 struct ctrlmsg_ioctl {
16329 -                       devrequest      req;
16330 +                       struct usb_ctrlrequest  req;
16331                         void            *data;
16332                 } cmsg;
16333                 int pipe, nb, ret;
16334 @@ -756,12 +771,12 @@
16335                 if (copy_from_user(&cmsg, (void *)arg, sizeof(cmsg)))
16336                         return -EFAULT;
16337  
16338 -               nb = le16_to_cpup(&cmsg.req.length);
16339 +               nb = cmsg.req.wLength;
16340  
16341                 if (nb > sizeof(buf))
16342                         return -EINVAL;
16343  
16344 -               if ((cmsg.req.requesttype & 0x80) == 0) {
16345 +               if ((cmsg.req.bRequestType & 0x80) == 0) {
16346                         pipe = usb_sndctrlpipe(dev, 0);
16347                         if (nb > 0 && copy_from_user(buf, cmsg.data, nb))
16348                                 return -EFAULT;
16349 @@ -769,10 +784,10 @@
16350                         pipe = usb_rcvctrlpipe(dev, 0);
16351                 }
16352  
16353 -               ret = usb_control_msg(dev, pipe, cmsg.req.request,
16354 -                                     cmsg.req.requesttype,
16355 -                                     le16_to_cpup(&cmsg.req.value),
16356 -                                     le16_to_cpup(&cmsg.req.index),
16357 +               ret = usb_control_msg(dev, pipe, cmsg.req.bRequest,
16358 +                                     cmsg.req.bRequestType,
16359 +                                     cmsg.req.wValue,
16360 +                                     cmsg.req.wIndex,
16361                                       buf, nb, HZ);
16362  
16363                 if (ret < 0) {
16364 @@ -780,7 +795,7 @@
16365                         return -EIO;
16366                 }
16367  
16368 -               if (nb > 0 && (cmsg.req.requesttype & 0x80) && copy_to_user(cmsg.data, buf, nb))
16369 +               if (nb > 0 && (cmsg.req.bRequestType & 0x80) && copy_to_user(cmsg.data, buf, nb))
16370                         return -EFAULT;
16371  
16372                 return 0;
16373 @@ -1017,7 +1032,7 @@
16374  
16375         switch (dev->descriptor.idVendor) { /* Scanner specific read timeout parameters */
16376         case 0x04b8:            /* Seiko/Epson */
16377 -               scn->rd_nak_timeout = HZ * 40;
16378 +               scn->rd_nak_timeout = HZ * 60;
16379                 break;
16380         case 0x055f:            /* Mustek */
16381         case 0x0400:            /* Another Mustek */
16382 diff -Nur linux-2.4.19.old/drivers/usb/scanner.h linux-2.4.19/drivers/usb/scanner.h
16383 --- linux-2.4.19.old/drivers/usb/scanner.h      Fri Dec 21 18:41:55 2001
16384 +++ linux-2.4.19/drivers/usb/scanner.h  Mon Nov 25 12:26:56 2002
16385 @@ -1,9 +1,9 @@
16386  /*
16387 - * Driver for USB Scanners (linux-2.4.12)
16388 + * Driver for USB Scanners (linux-2.4.18)
16389   *
16390 - * Copyright (C) 1999, 2000, 2001 David E. Nelson
16391 + * Copyright (C) 1999, 2000, 2001, 2002 David E. Nelson
16392   *
16393 - * David E. Nelson (dnelson@jump.net)
16394 + * Brian Beattie <beattie@beattie-home.net>
16395   *
16396   * This program is free software; you can redistribute it and/or
16397   * modify it under the terms of the GNU General Public License as
16398 @@ -48,7 +48,7 @@
16399  
16400  static __s32 vendor=-1, product=-1, read_timeout=0;
16401  
16402 -MODULE_AUTHOR("David E. Nelson, dnelson@jump.net, http://www.jump.net/~dnelson");
16403 +MODULE_AUTHOR("Brian Beattie, beattie@beattie-home.net");
16404  MODULE_DESCRIPTION(DRIVER_DESC" "DRIVER_VERSION);
16405  MODULE_LICENSE("GPL");
16406  
16407 @@ -90,9 +90,12 @@
16408         { USB_DEVICE(0x06bd, 0x2097) }, /* SnapScan e26 */
16409         { USB_DEVICE(0x06bd, 0x208d) }, /* Snapscan e40 */
16410         /* Canon */
16411 -       { USB_DEVICE(0x04a9, 0x2202) }, /* FB620U */
16412 +       { USB_DEVICE(0x04a9, 0x2202) }, /* CanoScan FB620U */
16413 +       { USB_DEVICE(0x04a9, 0x2204) }, /* CanoScan FB630U/FB636U */
16414 +       { USB_DEVICE(0x04a9, 0x2206) }, /* CanoScan N650U/N656U */
16415 +       { USB_DEVICE(0x04a9, 0x2207) }, /* CanoScan N1220U */
16416 +       { USB_DEVICE(0x04a9, 0x2208) }, /* CanoScan D660U */ 
16417         { USB_DEVICE(0x04a9, 0x220b) }, /* D646U */
16418 -       { USB_DEVICE(0x04a9, 0x2207) }, /* 1220U */
16419         /* Colorado -- See Primax/Colorado below */
16420         /* Epson -- See Seiko/Epson below */
16421         /* Genius */
16422 @@ -110,6 +113,7 @@
16423         { USB_DEVICE(0x03f0, 0x0105) }, /* 4200C */
16424         { USB_DEVICE(0x03f0, 0x0305) }, /* 4300C */
16425         { USB_DEVICE(0x03f0, 0x0102) }, /* PhotoSmart S20 */
16426 +       { USB_DEVICE(0x03f0, 0x0705) }, /* 4400C */
16427         { USB_DEVICE(0x03f0, 0x0401) }, /* 5200C */
16428         //      { USB_DEVICE(0x03f0, 0x0701) }, /* 5300C - NOT SUPPORTED - see http://www.neatech.nl/oss/HP5300C/ */
16429         { USB_DEVICE(0x03f0, 0x0201) }, /* 6200C */
16430 @@ -141,6 +145,8 @@
16431         { USB_DEVICE(0x0400, 0x1001) }, /* BearPaw 2400 */
16432         { USB_DEVICE(0x055f, 0x0008) }, /* 1200 CU Plus */
16433         { USB_DEVICE(0x0ff5, 0x0010) }, /* BearPaw 1200F */
16434 +       { USB_DEVICE(0x055f, 0x0218) }, /* BearPaw 2400 TA */
16435 +       { USB_DEVICE(0x05d8, 0x4002) }, /* 1200 CU and 1200 UB Plus */
16436         /* Plustek */
16437         { USB_DEVICE(0x07b3, 0x0017) }, /* OpticPro UT12 */
16438         { USB_DEVICE(0x07b3, 0x0011) }, /* OpticPro UT24 */
16439 @@ -179,8 +185,12 @@
16440         { USB_DEVICE(0x04b8, 0x010b) }, /* Perfection 1240U */
16441         { USB_DEVICE(0x04b8, 0x010c) }, /* Perfection 640U */
16442         { USB_DEVICE(0x04b8, 0x010e) }, /* Expression 1680 */
16443 +       { USB_DEVICE(0x04b8, 0x010f) }, /* Perfection 1250U */
16444         { USB_DEVICE(0x04b8, 0x0110) }, /* Perfection 1650 */
16445         { USB_DEVICE(0x04b8, 0x0112) }, /* Perfection 2450 - GT-9700 for the Japanese mkt */
16446 +       { USB_DEVICE(0x04b8, 0x0114) }, /* Perfection 660 */
16447 +       { USB_DEVICE(0x04b8, 0x011b) }, /* Perfection 2400 Photo */
16448 +       { USB_DEVICE(0x04b8, 0x011e) }, /* Perfection 1660 Photo */
16449         /* Umax */
16450         { USB_DEVICE(0x1606, 0x0010) }, /* Astra 1220U */
16451         { USB_DEVICE(0x1606, 0x0030) }, /* Astra 2000U */
16452 @@ -230,7 +240,7 @@
16453  #define SCANNER_IOCTL_VENDOR _IOR('U', 0x20, int)
16454  #define SCANNER_IOCTL_PRODUCT _IOR('U', 0x21, int)
16455  /* send/recv a control message to the scanner */
16456 -#define SCANNER_IOCTL_CTRLMSG _IOWR('U', 0x22, devrequest )
16457 +#define SCANNER_IOCTL_CTRLMSG _IOWR('U', 0x22, struct usb_ctrlrequest )
16458  
16459  
16460  #define SCN_MAX_MNR 16         /* We're allocated 16 minors */
16461 diff -Nur linux-2.4.19.old/drivers/usb/se401.c linux-2.4.19/drivers/usb/se401.c
16462 --- linux-2.4.19.old/drivers/usb/se401.c        Sat Aug  3 02:39:45 2002
16463 +++ linux-2.4.19/drivers/usb/se401.c    Mon Nov 25 12:27:01 2002
16464 @@ -41,18 +41,12 @@
16465  #include <asm/semaphore.h>
16466  #include <linux/wrapper.h>
16467  
16468 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0)
16469 -#define virt_to_page(arg)      MAP_NR(arg)
16470 -#define vmalloc_32             vmalloc
16471 -#endif
16472 -
16473  #include "se401.h"
16474  
16475  static int flickerless=0;
16476  static int video_nr = -1;
16477  
16478 -#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 3, 0)
16479 -static __devinitdata struct usb_device_id device_table [] = {
16480 +static struct usb_device_id device_table [] = {
16481         { USB_DEVICE(0x03e8, 0x0004) },/* Endpoints/Aox SE401 */
16482         { USB_DEVICE(0x0471, 0x030b) },/* Philips PCVC665K */
16483         { USB_DEVICE(0x047d, 0x5001) },/* Kensington 67014 */
16484 @@ -62,7 +56,6 @@
16485  };
16486  
16487  MODULE_DEVICE_TABLE(usb, device_table);
16488 -#endif
16489  
16490  MODULE_AUTHOR("Jeroen Vreeken <pe1rxq@amsat.org>");
16491  MODULE_DESCRIPTION("SE401 USB Camera Driver");
16492 @@ -80,54 +73,17 @@
16493   *
16494   * Memory management
16495   *
16496 - * This is a shameless copy from the USB-cpia driver (linux kernel
16497 - * version 2.3.29 or so, I have no idea what this code actually does ;).
16498 - * Actually it seems to be a copy of a shameless copy of the bttv-driver.
16499 - * Or that is a copy of a shameless copy of ... (To the powers: is there
16500 - * no generic kernel-function to do this sort of stuff?)
16501 - *
16502 - * Yes, it was a shameless copy from the bttv-driver. IIRC, Alan says
16503 - * there will be one, but apparentely not yet -jerdfelt
16504 - *
16505 - * So I copied it again for the ov511 driver -claudio
16506 - *
16507 - * Same for the se401 driver -Jeroen
16508   **********************************************************************/
16509  
16510 -/* Given PGD from the address space's page table, return the kernel
16511 - * virtual mapping of the physical memory mapped at ADR.
16512 - */
16513 -static inline unsigned long uvirt_to_kva(pgd_t *pgd, unsigned long adr)
16514 -{
16515 -       unsigned long ret = 0UL;
16516 -       pmd_t *pmd;
16517 -       pte_t *ptep, pte;
16518 -
16519 -       if (!pgd_none(*pgd)) {
16520 -               pmd = pmd_offset(pgd, adr);
16521 -               if (!pmd_none(*pmd)) {
16522 -                       ptep = pte_offset(pmd, adr);
16523 -                       pte = *ptep;
16524 -                       if (pte_present(pte)) {
16525 -                               ret = (unsigned long) page_address(pte_page(pte));
16526 -                               ret |= (adr & (PAGE_SIZE - 1));
16527 -                       }
16528 -               }
16529 -       }
16530 -
16531 -       return ret;
16532 -}
16533 -
16534  /* Here we want the physical address of the memory.
16535 - * This is used when initializing the contents of the
16536 - * area and marking the pages as reserved.
16537 + * This is used when initializing the contents of the area.
16538   */
16539  static inline unsigned long kvirt_to_pa(unsigned long adr)
16540  {
16541 -       unsigned long va, kva, ret;
16542 +       unsigned long kva, ret;
16543  
16544 -       va = VMALLOC_VMADDR(adr);
16545 -       kva = uvirt_to_kva(pgd_offset_k(va), va);
16546 +       kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
16547 +       kva |= adr & (PAGE_SIZE-1); /* restore the offset */
16548         ret = __pa(kva);
16549         return ret;
16550  }
16551 @@ -135,12 +91,9 @@
16552  static void *rvmalloc(unsigned long size)
16553  {
16554         void *mem;
16555 -       unsigned long adr, page;
16556 -
16557 -       /* Round it off to PAGE_SIZE */
16558 -       size += (PAGE_SIZE - 1);
16559 -       size &= ~(PAGE_SIZE - 1);
16560 +       unsigned long adr;
16561  
16562 +       size = PAGE_ALIGN(size);
16563         mem = vmalloc_32(size);
16564         if (!mem)
16565                 return NULL;
16566 @@ -148,13 +101,9 @@
16567         memset(mem, 0, size); /* Clear the ram out, no junk to the user */
16568         adr = (unsigned long) mem;
16569         while (size > 0) {
16570 -               page = kvirt_to_pa(adr);
16571 -               mem_map_reserve(virt_to_page(__va(page)));
16572 +               mem_map_reserve(vmalloc_to_page((void *)adr));
16573                 adr += PAGE_SIZE;
16574 -               if (size > PAGE_SIZE)
16575 -                       size -= PAGE_SIZE;
16576 -               else
16577 -                       size = 0;
16578 +               size -= PAGE_SIZE;
16579         }
16580  
16581         return mem;
16582 @@ -162,23 +111,16 @@
16583  
16584  static void rvfree(void *mem, unsigned long size)
16585  {
16586 -       unsigned long adr, page;
16587 +       unsigned long adr;
16588  
16589         if (!mem)
16590                 return;
16591  
16592 -       size += (PAGE_SIZE - 1);
16593 -       size &= ~(PAGE_SIZE - 1);
16594 -
16595 -       adr=(unsigned long) mem;
16596 -       while (size > 0) {
16597 -               page = kvirt_to_pa(adr);
16598 -               mem_map_unreserve(virt_to_page(__va(page)));
16599 +       adr = (unsigned long) mem;
16600 +       while ((long) size > 0) {
16601 +               mem_map_unreserve(vmalloc_to_page((void *)adr));
16602                 adr += PAGE_SIZE;
16603 -               if (size > PAGE_SIZE)
16604 -                       size -= PAGE_SIZE;
16605 -               else
16606 -                       size = 0;
16607 +               size -= PAGE_SIZE;
16608         }
16609         vfree(mem);
16610  }
16611 @@ -610,7 +552,7 @@
16612  */
16613  static int se401_start_stream(struct usb_se401 *se401)
16614  {
16615 -       urb_t *urb;
16616 +       struct urb *urb;
16617         int err=0, i;
16618         se401->streaming=1;
16619  
16620 @@ -704,7 +646,7 @@
16621                 return 0;
16622  
16623         /* Check for a valid mode */
16624 -       if (!width || !height)
16625 +       if (width <= 0 || height <= 0)
16626                 return 1;
16627         if ((width & 1) || (height & 1))
16628                 return 1;
16629 @@ -738,7 +680,8 @@
16630  static inline void enhance_picture(unsigned char *frame, int len)
16631  {
16632         while (len--) {
16633 -               *frame++=(((*frame^255)*(*frame^255))/255)^255;
16634 +               *frame=(((*frame^255)*(*frame^255))/255)^255;
16635 +               frame++;
16636         }
16637  }
16638  
16639 @@ -972,7 +915,8 @@
16640                 /* Fix the top line */
16641                 framedata+=linelength;
16642                 for (i=0; i<linelength; i++) {
16643 -                       *--framedata=*(framedata+linelength);
16644 +                       framedata--;
16645 +                       *framedata=*(framedata+linelength);
16646                 }
16647                 /* Fix the left side (green is already present) */
16648                 for (i=0; i<se401->cheight; i++) {
16649 @@ -1425,7 +1369,13 @@
16650  
16651         se401->sizes=cp[4]+cp[5]*256;
16652         se401->width=kmalloc(se401->sizes*sizeof(int), GFP_KERNEL);
16653 +       if (!se401->width)
16654 +               return 1;
16655         se401->height=kmalloc(se401->sizes*sizeof(int), GFP_KERNEL);
16656 +       if (!se401->height) {
16657 +               kfree(se401->width);
16658 +               return 1;
16659 +       }
16660         for (i=0; i<se401->sizes; i++) {
16661                     se401->width[i]=cp[6+i*4+0]+cp[6+i*4+1]*256;
16662                     se401->height[i]=cp[6+i*4+2]+cp[6+i*4+3]*256;
16663 @@ -1491,12 +1441,8 @@
16664          return 0;
16665  }
16666  
16667 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0)
16668 -static void* se401_probe(struct usb_device *dev, unsigned int ifnum)
16669 -#else
16670 -static void* __devinit se401_probe(struct usb_device *dev, unsigned int ifnum,
16671 +static void* se401_probe(struct usb_device *dev, unsigned int ifnum,
16672         const struct usb_device_id *id)
16673 -#endif
16674  {
16675          struct usb_interface_descriptor *interface;
16676          struct usb_se401 *se401;
16677 @@ -1625,9 +1571,7 @@
16678  
16679  static struct usb_driver se401_driver = {
16680          name:          "se401",
16681 -#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 3, 0)
16682          id_table:      device_table,
16683 -#endif
16684         probe:          se401_probe,
16685          disconnect:    se401_disconnect
16686  };
16687 diff -Nur linux-2.4.19.old/drivers/usb/se401.h linux-2.4.19/drivers/usb/se401.h
16688 --- linux-2.4.19.old/drivers/usb/se401.h        Fri Sep  7 19:59:04 2001
16689 +++ linux-2.4.19/drivers/usb/se401.h    Mon Nov 25 12:27:07 2002
16690 @@ -10,7 +10,7 @@
16691  
16692  #ifdef se401_DEBUG
16693  #  define PDEBUG(level, fmt, args...) \
16694 -if (debug >= level) info("[" __PRETTY_FUNCTION__ ":%d] " fmt, __LINE__ , ## args)
16695 +if (debug >= level) info("[%s:%d] " fmt, __PRETTY_FUNCTION__, __LINE__ , ## args)
16696  #else
16697  #  define PDEBUG(level, fmt, args...) do {} while(0)
16698  #endif
16699 @@ -197,8 +197,8 @@
16700  
16701         char *fbuf;             /* Videodev buffer area */
16702  
16703 -       urb_t *urb[SE401_NUMSBUF];
16704 -       urb_t *inturb;
16705 +       struct urb *urb[SE401_NUMSBUF];
16706 +       struct urb *inturb;
16707         
16708         int button;
16709         int buttonpressed;
16710 diff -Nur linux-2.4.19.old/drivers/usb/serial/Config.in linux-2.4.19/drivers/usb/serial/Config.in
16711 --- linux-2.4.19.old/drivers/usb/serial/Config.in       Sat Aug  3 02:39:45 2002
16712 +++ linux-2.4.19/drivers/usb/serial/Config.in   Mon Nov 25 12:27:07 2002
16713 @@ -5,34 +5,39 @@
16714  comment 'USB Serial Converter support'
16715  
16716  dep_tristate 'USB Serial Converter support' CONFIG_USB_SERIAL $CONFIG_USB
16717 -if [ "$CONFIG_USB_SERIAL" = "y" ]; then
16718 -  dep_mbool '  USB Serial Converter verbose debug' CONFIG_USB_SERIAL_DEBUG $CONFIG_USB_SERIAL
16719 +if [ "$CONFIG_USB_SERIAL" != "n" ]; then
16720 +   dep_bool '  USB Serial Converter verbose debug' CONFIG_USB_SERIAL_DEBUG $CONFIG_USB_SERIAL
16721 +   dep_mbool '  USB Generic Serial Driver' CONFIG_USB_SERIAL_GENERIC $CONFIG_USB_SERIAL
16722 +   dep_tristate '  USB Belkin and Peracom Single Port Serial Driver' CONFIG_USB_SERIAL_BELKIN $CONFIG_USB_SERIAL
16723 +   dep_tristate '  USB ConnectTech WhiteHEAT Serial Driver' CONFIG_USB_SERIAL_WHITEHEAT $CONFIG_USB_SERIAL
16724 +   dep_tristate '  USB Digi International AccelePort USB Serial Driver' CONFIG_USB_SERIAL_DIGI_ACCELEPORT $CONFIG_USB_SERIAL
16725 +   dep_tristate '  USB Empeg empeg-car Mark I/II Driver' CONFIG_USB_SERIAL_EMPEG $CONFIG_USB_SERIAL
16726 +   dep_tristate '  USB FTDI Single Port Serial Driver' CONFIG_USB_SERIAL_FTDI_SIO $CONFIG_USB_SERIAL
16727 +   dep_tristate '  USB Handspring Visor / Palm m50x / Sony Clie Driver' CONFIG_USB_SERIAL_VISOR $CONFIG_USB_SERIAL
16728 +   dep_tristate '  USB Compaq iPAQ / HP Jornada / Casio EM500 Driver' CONFIG_USB_SERIAL_IPAQ $CONFIG_USB_SERIAL
16729 +   dep_tristate '  USB IR Dongle Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_IR $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
16730 +   dep_tristate '  USB Inside Out Edgeport Serial Driver' CONFIG_USB_SERIAL_EDGEPORT $CONFIG_USB_SERIAL
16731 +   dep_tristate '  USB Inside Out Edgeport Serial Driver (TI devices)' CONFIG_USB_SERIAL_EDGEPORT_TI $CONFIG_USB_SERIAL
16732 +   dep_tristate '  USB Keyspan PDA Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_KEYSPAN_PDA $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
16733 +   dep_tristate '  USB Keyspan USA-xxx Serial Driver' CONFIG_USB_SERIAL_KEYSPAN $CONFIG_USB_SERIAL
16734 +   if [ "$CONFIG_USB_SERIAL_KEYSPAN" != "n" ]; then
16735 +      bool '    USB Keyspan USA-28 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28
16736 +      bool '    USB Keyspan USA-28X Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28X
16737 +      bool '    USB Keyspan USA-28XA Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28XA
16738 +      bool '    USB Keyspan USA-28XB Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28XB
16739 +      bool '    USB Keyspan USA-19 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19
16740 +      bool '    USB Keyspan USA-18X Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA18X
16741 +      bool '    USB Keyspan USA-19W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19W
16742 +      bool '    USB Keyspan USA-19QW Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19QW
16743 +      bool '    USB Keyspan USA-19QI Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19QI
16744 +      bool '    USB Keyspan USA-49W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA49W
16745 +   fi
16746 +   dep_tristate '  USB MCT Single Port Serial Driver' CONFIG_USB_SERIAL_MCT_U232 $CONFIG_USB_SERIAL
16747 +   dep_tristate '  USB KL5KUSB105 (Palmconnect) Driver' CONFIG_USB_SERIAL_KLSI $CONFIG_USB_SERIAL
16748 +   dep_tristate '  USB Prolific 2303 Single Port Serial Driver' CONFIG_USB_SERIAL_PL2303 $CONFIG_USB_SERIAL
16749 +   dep_tristate '  USB REINER SCT cyberJack pinpad/e-com chipcard reader (EXPERIMENTAL)' CONFIG_USB_SERIAL_CYBERJACK $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
16750 +   dep_tristate '  USB Xircom / Entregra Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_XIRCOM $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
16751 +   dep_tristate '  USB ZyXEL omni.net LCD Plus Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_OMNINET $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
16752  fi
16753 -dep_mbool '  USB Generic Serial Driver' CONFIG_USB_SERIAL_GENERIC $CONFIG_USB_SERIAL
16754 -dep_tristate '  USB Belkin and Peracom Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_BELKIN $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
16755 -dep_tristate '  USB ConnectTech WhiteHEAT Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_WHITEHEAT $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
16756 -dep_tristate '  USB Digi International AccelePort USB Serial Driver' CONFIG_USB_SERIAL_DIGI_ACCELEPORT $CONFIG_USB_SERIAL
16757 -dep_tristate '  USB Empeg empeg-car Mark I/II Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_EMPEG $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
16758 -dep_tristate '  USB FTDI Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_FTDI_SIO $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
16759 -dep_tristate '  USB Handspring Visor / Palm m50x / Sony Clie Driver' CONFIG_USB_SERIAL_VISOR $CONFIG_USB_SERIAL
16760 -dep_tristate '  USB Compaq iPAQ / HP Jornada / Casio EM500 Driver' CONFIG_USB_SERIAL_IPAQ $CONFIG_USB_SERIAL
16761 -dep_tristate '  USB IR Dongle Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_IR $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
16762 -dep_tristate '  USB Inside Out Edgeport Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_EDGEPORT $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
16763 -dep_tristate '  USB Keyspan PDA Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_KEYSPAN_PDA $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
16764 -dep_tristate '  USB Keyspan USA-xxx Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_KEYSPAN $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
16765 -   dep_mbool '    USB Keyspan USA-28 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28 $CONFIG_USB_SERIAL_KEYSPAN
16766 -   dep_mbool '    USB Keyspan USA-28X Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28X $CONFIG_USB_SERIAL_KEYSPAN
16767 -   dep_mbool '    USB Keyspan USA-28XA Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28XA $CONFIG_USB_SERIAL_KEYSPAN
16768 -   dep_mbool '    USB Keyspan USA-28XB Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28XB $CONFIG_USB_SERIAL_KEYSPAN
16769 -   dep_mbool '    USB Keyspan USA-19 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19 $CONFIG_USB_SERIAL_KEYSPAN
16770 -   dep_mbool '    USB Keyspan USA-18X Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA18X $CONFIG_USB_SERIAL_KEYSPAN
16771 -   dep_mbool '    USB Keyspan USA-19W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19W $CONFIG_USB_SERIAL_KEYSPAN
16772 -   dep_mbool '    USB Keyspan USA-49W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA49W $CONFIG_USB_SERIAL_KEYSPAN
16773 -dep_tristate '  USB MCT Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_MCT_U232 $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
16774 -dep_tristate '  USB KL5KUSB105 (Palmconnect) Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_KLSI $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
16775 -dep_tristate '  USB Prolific 2303 Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_PL2303 $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
16776 -dep_tristate '  USB REINER SCT cyberJack pinpad/e-com chipcard reader (EXPERIMENTAL)' CONFIG_USB_SERIAL_CYBERJACK $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
16777 -dep_tristate '  USB Xircom / Entregra Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_XIRCOM $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
16778 -dep_tristate '  USB ZyXEL omni.net LCD Plus Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_OMNINET $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
16779  
16780  endmenu
16781 diff -Nur linux-2.4.19.old/drivers/usb/serial/Makefile linux-2.4.19/drivers/usb/serial/Makefile
16782 --- linux-2.4.19.old/drivers/usb/serial/Makefile        Mon Feb 25 20:38:07 2002
16783 +++ linux-2.4.19/drivers/usb/serial/Makefile    Mon Nov 25 12:27:07 2002
16784 @@ -20,6 +20,7 @@
16785  obj-$(CONFIG_USB_SERIAL_EMPEG)                 += empeg.o
16786  obj-$(CONFIG_USB_SERIAL_MCT_U232)              += mct_u232.o
16787  obj-$(CONFIG_USB_SERIAL_EDGEPORT)              += io_edgeport.o
16788 +obj-$(CONFIG_USB_SERIAL_EDGEPORT_TI)           += io_ti.o
16789  obj-$(CONFIG_USB_SERIAL_PL2303)                        += pl2303.o
16790  obj-$(CONFIG_USB_SERIAL_CYBERJACK)             += cyberjack.o
16791  obj-$(CONFIG_USB_SERIAL_IR)                    += ir-usb.o
16792 diff -Nur linux-2.4.19.old/drivers/usb/serial/belkin_sa.c linux-2.4.19/drivers/usb/serial/belkin_sa.c
16793 --- linux-2.4.19.old/drivers/usb/serial/belkin_sa.c     Fri Dec 21 18:41:55 2001
16794 +++ linux-2.4.19/drivers/usb/serial/belkin_sa.c Mon Nov 25 12:27:08 2002
16795 @@ -1,8 +1,8 @@
16796  /*
16797   * Belkin USB Serial Adapter Driver
16798   *
16799 - *  Copyright (C) 2000
16800 - *      William Greathouse (wgreathouse@smva.com)
16801 + *  Copyright (C) 2000         William Greathouse (wgreathouse@smva.com)
16802 + *  Copyright (C) 2000-2001    Greg Kroah-Hartman (greg@kroah.com)
16803   *
16804   *  This program is largely derived from work by the linux-usb group
16805   *  and associated source files.  Please see the usb/serial files for
16806 @@ -24,6 +24,9 @@
16807   * -- Add support for flush commands
16808   * -- Add everything that is missing :)
16809   *
16810 + * 27-Nov-2001 gkh
16811 + *     compressed all the differnent device entries into 1.
16812 + *
16813   * 30-May-2001 gkh
16814   *     switched from using spinlock to a semaphore, which fixes lots of problems.
16815   *
16816 @@ -62,18 +65,15 @@
16817  
16818  #include <linux/config.h>
16819  #include <linux/kernel.h>
16820 -#include <linux/sched.h>
16821 -#include <linux/signal.h>
16822  #include <linux/errno.h>
16823 -#include <linux/poll.h>
16824  #include <linux/init.h>
16825  #include <linux/slab.h>
16826 -#include <linux/fcntl.h>
16827  #include <linux/tty.h>
16828  #include <linux/tty_driver.h>
16829  #include <linux/tty_flip.h>
16830  #include <linux/module.h>
16831  #include <linux/spinlock.h>
16832 +#include <asm/uaccess.h>
16833  #include <linux/usb.h>
16834  
16835  #ifdef CONFIG_USB_SERIAL_DEBUG
16836 @@ -88,7 +88,7 @@
16837  /*
16838   * Version Information
16839   */
16840 -#define DRIVER_VERSION "v1.1"
16841 +#define DRIVER_VERSION "v1.2"
16842  #define DRIVER_AUTHOR "William Greathouse <wgreathouse@smva.com>"
16843  #define DRIVER_DESC "USB Belkin Serial converter driver"
16844  
16845 @@ -103,146 +103,35 @@
16846  static void belkin_sa_break_ctl                (struct usb_serial_port *port, int break_state );
16847  
16848  
16849 -static __devinitdata struct usb_device_id id_table_combined [] = {
16850 +static struct usb_device_id id_table_combined [] = {
16851         { USB_DEVICE(BELKIN_SA_VID, BELKIN_SA_PID) },
16852         { USB_DEVICE(BELKIN_OLD_VID, BELKIN_OLD_PID) },
16853         { USB_DEVICE(PERACOM_VID, PERACOM_PID) },
16854         { USB_DEVICE(GOHUBS_VID, GOHUBS_PID) },
16855 +       { USB_DEVICE(GOHUBS_VID, HANDYLINK_PID) },
16856         { USB_DEVICE(BELKIN_DOCKSTATION_VID, BELKIN_DOCKSTATION_PID) },
16857         { }                                                     /* Terminating entry */
16858  };
16859  
16860 -static __devinitdata struct usb_device_id belkin_dockstation_table [] = {
16861 -       { USB_DEVICE(BELKIN_DOCKSTATION_VID, BELKIN_DOCKSTATION_PID) },
16862 -       { }                                                     /* Terminating entry */
16863 -};
16864 -
16865 -static __devinitdata struct usb_device_id belkin_sa_table [] = {
16866 -       { USB_DEVICE(BELKIN_SA_VID, BELKIN_SA_PID) },
16867 -       { }                                                     /* Terminating entry */
16868 -};
16869 -
16870 -static __devinitdata struct usb_device_id belkin_old_table [] = {
16871 -       { USB_DEVICE(BELKIN_OLD_VID, BELKIN_OLD_PID) },
16872 -       { }                                                     /* Terminating entry */
16873 -};
16874 -
16875 -static __devinitdata struct usb_device_id peracom_table [] = {
16876 -       { USB_DEVICE(PERACOM_VID, PERACOM_PID) },
16877 -       { }                                                     /* Terminating entry */
16878 -};
16879 -
16880 -static __devinitdata struct usb_device_id gocom232_table [] = {
16881 -       { USB_DEVICE(GOHUBS_VID, GOHUBS_PID) },
16882 -       { }                                                     /* Terminating entry */
16883 -};
16884 -
16885  MODULE_DEVICE_TABLE (usb, id_table_combined);
16886  
16887 -/* All of the device info needed for the Belkin dockstation serial converter */
16888 -static struct usb_serial_device_type belkin_dockstation_device = {
16889 -       name:                   "Belkin F5U120-PC USB Serial Adapter",
16890 -       id_table:               belkin_dockstation_table,               /* the Belkin F5U103 device */
16891 -       needs_interrupt_in:     MUST_HAVE,                      /* this device must have an interrupt in endpoint */
16892 -       needs_bulk_in:          MUST_HAVE,                      /* this device must have a bulk in endpoint */
16893 -       needs_bulk_out:         MUST_HAVE,                      /* this device must have a bulk out endpoint */
16894 -       num_interrupt_in:       1,
16895 -       num_bulk_in:            1,
16896 -       num_bulk_out:           1,
16897 -       num_ports:              1,
16898 -       open:                   belkin_sa_open,
16899 -       close:                  belkin_sa_close,
16900 -       read_int_callback:      belkin_sa_read_int_callback,    /* How we get the status info */
16901 -       ioctl:                  belkin_sa_ioctl,
16902 -       set_termios:            belkin_sa_set_termios,
16903 -       break_ctl:              belkin_sa_break_ctl,
16904 -       startup:                belkin_sa_startup,
16905 -       shutdown:               belkin_sa_shutdown,
16906 -};
16907 -
16908 -/* All of the device info needed for the Belkin serial converter */
16909 -static struct usb_serial_device_type belkin_sa_device = {
16910 -       name:                   "Belkin F5U103 USB Serial Adapter",
16911 -       id_table:               belkin_sa_table,                /* the Belkin F5U103 device */
16912 -       needs_interrupt_in:     MUST_HAVE,                      /* this device must have an interrupt in endpoint */
16913 -       needs_bulk_in:          MUST_HAVE,                      /* this device must have a bulk in endpoint */
16914 -       needs_bulk_out:         MUST_HAVE,                      /* this device must have a bulk out endpoint */
16915 -       num_interrupt_in:       1,
16916 -       num_bulk_in:            1,
16917 -       num_bulk_out:           1,
16918 -       num_ports:              1,
16919 -       open:                   belkin_sa_open,
16920 -       close:                  belkin_sa_close,
16921 -       read_int_callback:      belkin_sa_read_int_callback,    /* How we get the status info */
16922 -       ioctl:                  belkin_sa_ioctl,
16923 -       set_termios:            belkin_sa_set_termios,
16924 -       break_ctl:              belkin_sa_break_ctl,
16925 -       startup:                belkin_sa_startup,
16926 -       shutdown:               belkin_sa_shutdown,
16927 -};
16928 -
16929 -
16930 -/* This driver also supports the "old" school Belkin single port adaptor */
16931 -static struct usb_serial_device_type belkin_old_device = {
16932 -       name:                   "Belkin USB Serial Adapter",
16933 -       id_table:               belkin_old_table,               /* the old Belkin device */
16934 -       needs_interrupt_in:     MUST_HAVE,                      /* this device must have an interrupt in endpoint */
16935 -       needs_bulk_in:          MUST_HAVE,                      /* this device must have a bulk in endpoint */
16936 -       needs_bulk_out:         MUST_HAVE,                      /* this device must have a bulk out endpoint */
16937 -       num_interrupt_in:       1,
16938 -       num_bulk_in:            1,
16939 -       num_bulk_out:           1,
16940 -       num_ports:              1,
16941 -       open:                   belkin_sa_open,
16942 -       close:                  belkin_sa_close,
16943 -       read_int_callback:      belkin_sa_read_int_callback,    /* How we get the status info */
16944 -       ioctl:                  belkin_sa_ioctl,
16945 -       set_termios:            belkin_sa_set_termios,
16946 -       break_ctl:              belkin_sa_break_ctl,
16947 -       startup:                belkin_sa_startup,
16948 -       shutdown:               belkin_sa_shutdown,
16949 -};
16950 -
16951 -/* this driver also works for the Peracom single port adapter */
16952 -static struct usb_serial_device_type peracom_device = {
16953 -       name:                   "Peracom single port USB Serial Adapter",
16954 -       id_table:               peracom_table,                  /* the Peracom device */
16955 -       needs_interrupt_in:     MUST_HAVE,                      /* this device must have an interrupt in endpoint */
16956 -       needs_bulk_in:          MUST_HAVE,                      /* this device must have a bulk in endpoint */
16957 -       needs_bulk_out:         MUST_HAVE,                      /* this device must have a bulk out endpoint */
16958 -       num_interrupt_in:       1,
16959 -       num_bulk_in:            1,
16960 -       num_bulk_out:           1,
16961 -       num_ports:              1,
16962 -       open:                   belkin_sa_open,
16963 -       close:                  belkin_sa_close,
16964 -       read_int_callback:      belkin_sa_read_int_callback,    /* How we get the status info */
16965 -       ioctl:                  belkin_sa_ioctl,
16966 -       set_termios:            belkin_sa_set_termios,
16967 -       break_ctl:              belkin_sa_break_ctl,
16968 -       startup:                belkin_sa_startup,
16969 -       shutdown:               belkin_sa_shutdown,
16970 -};
16971 -
16972 -/* the GoHubs Go-COM232 device is the same as the Peracom single port adapter */
16973 -static struct usb_serial_device_type gocom232_device = {
16974 -       name:                   "GO-COM232 USB Serial Converter",
16975 -       id_table:               gocom232_table,                 /* the GO-COM232 device */
16976 -       needs_interrupt_in:     MUST_HAVE,                      /* this device must have an interrupt in endpoint */
16977 -       needs_bulk_in:          MUST_HAVE,                      /* this device must have a bulk in endpoint */
16978 -       needs_bulk_out:         MUST_HAVE,                      /* this device must have a bulk out endpoint */
16979 -       num_interrupt_in:       1,
16980 -       num_bulk_in:            1,
16981 -       num_bulk_out:           1,
16982 -       num_ports:              1,
16983 -       open:                   belkin_sa_open,
16984 -       close:                  belkin_sa_close,
16985 -       read_int_callback:      belkin_sa_read_int_callback,    /* How we get the status info */
16986 -       ioctl:                  belkin_sa_ioctl,
16987 -       set_termios:            belkin_sa_set_termios,
16988 -       break_ctl:              belkin_sa_break_ctl,
16989 -       startup:                belkin_sa_startup,
16990 -       shutdown:               belkin_sa_shutdown,
16991 +/* All of the device info needed for the serial converters */
16992 +static struct usb_serial_device_type belkin_device = {
16993 +       .owner =                THIS_MODULE,
16994 +       .name =                 "Belkin / Peracom / GoHubs USB Serial Adapter",
16995 +       .id_table =             id_table_combined,
16996 +       .num_interrupt_in =     1,
16997 +       .num_bulk_in =          1,
16998 +       .num_bulk_out =         1,
16999 +       .num_ports =            1,
17000 +       .open =                 belkin_sa_open,
17001 +       .close =                belkin_sa_close,
17002 +       .read_int_callback =    belkin_sa_read_int_callback,    /* How we get the status info */
17003 +       .ioctl =                belkin_sa_ioctl,
17004 +       .set_termios =          belkin_sa_set_termios,
17005 +       .break_ctl =            belkin_sa_break_ctl,
17006 +       .startup =              belkin_sa_startup,
17007 +       .shutdown =             belkin_sa_shutdown,
17008  };
17009  
17010  
17011 @@ -296,13 +185,10 @@
17012  {
17013         int i;
17014         
17015 -       dbg (__FUNCTION__);
17016 +       dbg ("%s", __FUNCTION__);
17017  
17018         /* stop reads and writes on all ports */
17019         for (i=0; i < serial->num_ports; ++i) {
17020 -               while (serial->port[i].open_count > 0) {
17021 -                       belkin_sa_close (&serial->port[i], NULL);
17022 -               }
17023                 /* My special items, the standard routines free my urbs */
17024                 if (serial->port[i].private)
17025                         kfree(serial->port[i].private);
17026 @@ -314,36 +200,25 @@
17027  {
17028         int retval = 0;
17029  
17030 -       dbg(__FUNCTION__" port %d", port->number);
17031 +       dbg("%s port %d", __FUNCTION__, port->number);
17032  
17033 -       down (&port->sem);
17034 -       
17035 -       ++port->open_count;
17036 -       MOD_INC_USE_COUNT;
17037 -       
17038 -       if (!port->active) {
17039 -               port->active = 1;
17040 -
17041 -               /*Start reading from the device*/
17042 -               /* TODO: Look at possibility of submitting mulitple URBs to device to
17043 -                *       enhance buffering.  Win trace shows 16 initial read URBs.
17044 -                */
17045 -               port->read_urb->dev = port->serial->dev;
17046 -               retval = usb_submit_urb(port->read_urb);
17047 -               if (retval) {
17048 -                       err("usb_submit_urb(read bulk) failed");
17049 -                       goto exit;
17050 -               }
17051 -
17052 -               port->interrupt_in_urb->dev = port->serial->dev;
17053 -               retval = usb_submit_urb(port->interrupt_in_urb);
17054 -               if (retval)
17055 -                       err(" usb_submit_urb(read int) failed");
17056 +       /*Start reading from the device*/
17057 +       /* TODO: Look at possibility of submitting mulitple URBs to device to
17058 +        *       enhance buffering.  Win trace shows 16 initial read URBs.
17059 +        */
17060 +       port->read_urb->dev = port->serial->dev;
17061 +       retval = usb_submit_urb(port->read_urb);
17062 +       if (retval) {
17063 +               err("usb_submit_urb(read bulk) failed");
17064 +               goto exit;
17065         }
17066 -       
17067 -exit:
17068 -       up (&port->sem);
17069  
17070 +       port->interrupt_in_urb->dev = port->serial->dev;
17071 +       retval = usb_submit_urb(port->interrupt_in_urb);
17072 +       if (retval)
17073 +               err(" usb_submit_urb(read int) failed");
17074 +
17075 +exit:
17076         return retval;
17077  } /* belkin_sa_open */
17078  
17079 @@ -359,24 +234,14 @@
17080         if (!serial)
17081                 return;
17082  
17083 -       dbg(__FUNCTION__" port %d", port->number);
17084 -
17085 -       down (&port->sem);
17086 -
17087 -       --port->open_count;
17088 +       dbg("%s port %d", __FUNCTION__, port->number);
17089  
17090 -       if (port->open_count <= 0) {
17091 -               if (serial->dev) {
17092 -                       /* shutdown our bulk reads and writes */
17093 -                       usb_unlink_urb (port->write_urb);
17094 -                       usb_unlink_urb (port->read_urb);
17095 -                       usb_unlink_urb (port->interrupt_in_urb);
17096 -               }
17097 -               port->active = 0;
17098 +       if (serial->dev) {
17099 +               /* shutdown our bulk reads and writes */
17100 +               usb_unlink_urb (port->write_urb);
17101 +               usb_unlink_urb (port->read_urb);
17102 +               usb_unlink_urb (port->interrupt_in_urb);
17103         }
17104 -       
17105 -       up (&port->sem);
17106 -       MOD_DEC_USE_COUNT;
17107  } /* belkin_sa_close */
17108  
17109  
17110 @@ -457,12 +322,31 @@
17111  {
17112         struct usb_serial *serial = port->serial;
17113         struct belkin_sa_private *priv = (struct belkin_sa_private *)port->private;
17114 -       unsigned int iflag = port->tty->termios->c_iflag;
17115 -       unsigned int cflag = port->tty->termios->c_cflag;
17116 -       unsigned int old_iflag = old_termios->c_iflag;
17117 -       unsigned int old_cflag = old_termios->c_cflag;
17118 +       unsigned int iflag;
17119 +       unsigned int cflag;
17120 +       unsigned int old_iflag = 0;
17121 +       unsigned int old_cflag = 0;
17122         __u16 urb_value = 0; /* Will hold the new flags */
17123         
17124 +       if ((!port->tty) || (!port->tty->termios)) {
17125 +               dbg ("%s - no tty or termios structure", __FUNCTION__);
17126 +               return;
17127 +       }
17128 +
17129 +       iflag = port->tty->termios->c_iflag;
17130 +       cflag = port->tty->termios->c_cflag;
17131 +
17132 +       /* check that they really want us to change something */
17133 +       if (old_termios) {
17134 +               if ((cflag == old_termios->c_cflag) &&
17135 +                   (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
17136 +                       dbg("%s - nothing to change...", __FUNCTION__);
17137 +                       return;
17138 +               }
17139 +               old_iflag = old_termios->c_iflag;
17140 +               old_cflag = old_termios->c_cflag;
17141 +       }
17142 +
17143         /* Set the baud rate */
17144         if( (cflag&CBAUD) != (old_cflag&CBAUD) ) {
17145                 /* reassert DTR and (maybe) RTS on transition from B0 */
17146 @@ -642,11 +526,7 @@
17147  
17148  static int __init belkin_sa_init (void)
17149  {
17150 -       usb_serial_register (&belkin_dockstation_device);
17151 -       usb_serial_register (&belkin_sa_device);
17152 -       usb_serial_register (&belkin_old_device);
17153 -       usb_serial_register (&peracom_device);
17154 -       usb_serial_register (&gocom232_device);
17155 +       usb_serial_register (&belkin_device);
17156         info(DRIVER_DESC " " DRIVER_VERSION);
17157         return 0;
17158  }
17159 @@ -654,11 +534,7 @@
17160  
17161  static void __exit belkin_sa_exit (void)
17162  {
17163 -       usb_serial_deregister (&belkin_dockstation_device);
17164 -       usb_serial_deregister (&belkin_sa_device);
17165 -       usb_serial_deregister (&belkin_old_device);
17166 -       usb_serial_deregister (&peracom_device);
17167 -       usb_serial_deregister (&gocom232_device);
17168 +       usb_serial_deregister (&belkin_device);
17169  }
17170  
17171  
17172 diff -Nur linux-2.4.19.old/drivers/usb/serial/belkin_sa.h linux-2.4.19/drivers/usb/serial/belkin_sa.h
17173 --- linux-2.4.19.old/drivers/usb/serial/belkin_sa.h     Mon Oct  1 22:45:43 2001
17174 +++ linux-2.4.19/drivers/usb/serial/belkin_sa.h Mon Nov 25 12:27:08 2002
17175 @@ -47,6 +47,7 @@
17176  
17177  #define GOHUBS_VID     0x0921  /* GoHubs vendor id */
17178  #define GOHUBS_PID     0x1000  /* GoHubs single port serial converter's id (identical to the Peracom device) */
17179 +#define HANDYLINK_PID  0x1200  /* HandyLink USB's id (identical to the Peracom device) */
17180  
17181  /* Vendor Request Interface */
17182  #define BELKIN_SA_SET_BAUDRATE_REQUEST 0  /* Set baud rate */
17183 diff -Nur linux-2.4.19.old/drivers/usb/serial/cyberjack.c linux-2.4.19/drivers/usb/serial/cyberjack.c
17184 --- linux-2.4.19.old/drivers/usb/serial/cyberjack.c     Sat Aug  3 02:39:45 2002
17185 +++ linux-2.4.19/drivers/usb/serial/cyberjack.c Mon Nov 25 12:27:08 2002
17186 @@ -25,18 +25,15 @@
17187  
17188  #include <linux/config.h>
17189  #include <linux/kernel.h>
17190 -#include <linux/sched.h>
17191 -#include <linux/signal.h>
17192  #include <linux/errno.h>
17193 -#include <linux/poll.h>
17194  #include <linux/init.h>
17195  #include <linux/slab.h>
17196 -#include <linux/fcntl.h>
17197  #include <linux/tty.h>
17198  #include <linux/tty_driver.h>
17199  #include <linux/tty_flip.h>
17200  #include <linux/module.h>
17201  #include <linux/spinlock.h>
17202 +#include <asm/uaccess.h>
17203  #include <linux/usb.h>
17204  
17205  #ifdef CONFIG_USB_SERIAL_DEBUG
17206 @@ -69,7 +66,7 @@
17207  static void cyberjack_read_bulk_callback (struct urb *urb);
17208  static void cyberjack_write_bulk_callback (struct urb *urb);
17209  
17210 -static __devinitdata struct usb_device_id id_table [] = {
17211 +static struct usb_device_id id_table [] = {
17212         { USB_DEVICE(CYBERJACK_VENDOR_ID, CYBERJACK_PRODUCT_ID) },
17213         { }                     /* Terminating entry */
17214  };
17215 @@ -77,23 +74,21 @@
17216  MODULE_DEVICE_TABLE (usb, id_table);
17217  
17218  static struct usb_serial_device_type cyberjack_device = {
17219 -       name:                   "Reiner SCT Cyberjack USB card reader",
17220 -       id_table:               id_table,
17221 -       needs_interrupt_in:     MUST_HAVE,
17222 -       needs_bulk_in:          MUST_HAVE,
17223 -       needs_bulk_out:         MUST_HAVE,
17224 -       num_interrupt_in:       1,
17225 -       num_bulk_in:            1,
17226 -       num_bulk_out:           1,
17227 -       num_ports:              1,
17228 -       startup:                cyberjack_startup,
17229 -       shutdown:               cyberjack_shutdown,
17230 -       open:                   cyberjack_open,
17231 -       close:                  cyberjack_close,
17232 -       write:                  cyberjack_write,
17233 -       read_int_callback:      cyberjack_read_int_callback,
17234 -       read_bulk_callback:     cyberjack_read_bulk_callback,
17235 -       write_bulk_callback:    cyberjack_write_bulk_callback,
17236 +       .owner =                THIS_MODULE,
17237 +       .name =                 "Reiner SCT Cyberjack USB card reader",
17238 +       .id_table =             id_table,
17239 +       .num_interrupt_in =     1,
17240 +       .num_bulk_in =          1,
17241 +       .num_bulk_out =         1,
17242 +       .num_ports =            1,
17243 +       .startup =              cyberjack_startup,
17244 +       .shutdown =             cyberjack_shutdown,
17245 +       .open =                 cyberjack_open,
17246 +       .close =                cyberjack_close,
17247 +       .write =                cyberjack_write,
17248 +       .read_int_callback =    cyberjack_read_int_callback,
17249 +       .read_bulk_callback =   cyberjack_read_bulk_callback,
17250 +       .write_bulk_callback =  cyberjack_write_bulk_callback,
17251  };
17252  
17253  struct cyberjack_private {
17254 @@ -108,7 +103,7 @@
17255  {
17256         struct cyberjack_private *priv;
17257  
17258 -       dbg (__FUNCTION__);
17259 +       dbg("%s", __FUNCTION__);
17260  
17261         /* allocate the private data structure */
17262         serial->port->private = kmalloc(sizeof(struct cyberjack_private), GFP_KERNEL);
17263 @@ -130,13 +125,9 @@
17264  {
17265         int i;
17266         
17267 -       dbg (__FUNCTION__);
17268 +       dbg("%s", __FUNCTION__);
17269  
17270 -       /* stop reads and writes on all ports */
17271         for (i=0; i < serial->num_ports; ++i) {
17272 -               while (serial->port[i].open_count > 0) {
17273 -                       cyberjack_close (&serial->port[i], NULL);
17274 -               }
17275                 /* My special items, the standard routines free my urbs */
17276                 if (serial->port[i].private)
17277                         kfree(serial->port[i].private);
17278 @@ -151,66 +142,43 @@
17279         if (port_paranoia_check (port, __FUNCTION__))
17280                 return -ENODEV;
17281  
17282 -       MOD_INC_USE_COUNT;
17283 -
17284 -       dbg(__FUNCTION__ " - port %d", port->number);
17285 -
17286 -       down (&port->sem);
17287 -
17288 -       ++port->open_count;
17289 +       dbg("%s - port %d", __FUNCTION__, port->number);
17290  
17291 -       if (!port->active) {
17292 -               port->active = 1;
17293 -               /* force low_latency on so that our tty_push actually forces
17294 -                * the data through, otherwise it is scheduled, and with high
17295 -                * data rates (like with OHCI) data can get lost.
17296 -                */
17297 -               port->tty->low_latency = 1;
17298 -
17299 -               priv = (struct cyberjack_private *)port->private;
17300 -               priv->rdtodo = 0;
17301 -               priv->wrfilled = 0;
17302 -               priv->wrsent = 0;
17303 +       /* force low_latency on so that our tty_push actually forces
17304 +        * the data through, otherwise it is scheduled, and with high
17305 +        * data rates (like with OHCI) data can get lost.
17306 +        */
17307 +       port->tty->low_latency = 1;
17308  
17309 -               /* shutdown any bulk reads that might be going on */
17310 -               usb_unlink_urb (port->write_urb);
17311 -               usb_unlink_urb (port->read_urb);
17312 -               usb_unlink_urb (port->interrupt_in_urb);
17313 -
17314 -               port->interrupt_in_urb->dev = port->serial->dev;
17315 -               result = usb_submit_urb(port->interrupt_in_urb);
17316 -               if (result)
17317 -                       err(" usb_submit_urb(read int) failed");
17318 -               dbg(__FUNCTION__ " - usb_submit_urb(int urb)");
17319 -       }
17320 +       priv = (struct cyberjack_private *)port->private;
17321 +       priv->rdtodo = 0;
17322 +       priv->wrfilled = 0;
17323 +       priv->wrsent = 0;
17324  
17325 -       up (&port->sem);
17326 +       /* shutdown any bulk reads that might be going on */
17327 +       usb_unlink_urb (port->write_urb);
17328 +       usb_unlink_urb (port->read_urb);
17329 +       usb_unlink_urb (port->interrupt_in_urb);
17330 +
17331 +       port->interrupt_in_urb->dev = port->serial->dev;
17332 +       result = usb_submit_urb(port->interrupt_in_urb);
17333 +       if (result)
17334 +               err(" usb_submit_urb(read int) failed");
17335 +       dbg("%s - usb_submit_urb(int urb)", __FUNCTION__);
17336  
17337         return result;
17338  }
17339  
17340  static void cyberjack_close (struct usb_serial_port *port, struct file *filp)
17341  {
17342 -       dbg(__FUNCTION__ " - port %d", port->number);
17343 -
17344 -       down (&port->sem);
17345 -
17346 -       --port->open_count;
17347 +       dbg("%s - port %d", __FUNCTION__, port->number);
17348  
17349 -       if (port->open_count <= 0) {
17350 -               if (port->serial->dev) {
17351 -                       /* shutdown any bulk reads that might be going on */
17352 -                       usb_unlink_urb (port->write_urb);
17353 -                       usb_unlink_urb (port->read_urb);
17354 -                       usb_unlink_urb (port->interrupt_in_urb);
17355 -               }
17356 -
17357 -               port->active = 0;
17358 -               port->open_count = 0;
17359 +       if (port->serial->dev) {
17360 +               /* shutdown any bulk reads that might be going on */
17361 +               usb_unlink_urb (port->write_urb);
17362 +               usb_unlink_urb (port->read_urb);
17363 +               usb_unlink_urb (port->interrupt_in_urb);
17364         }
17365 -
17366 -       up (&port->sem);
17367 -       MOD_DEC_USE_COUNT;
17368  }
17369  
17370  static int cyberjack_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count)
17371 @@ -220,32 +188,28 @@
17372         int result;
17373         int wrexpected;
17374  
17375 -       dbg(__FUNCTION__ " - port %d", port->number);
17376 -       dbg(__FUNCTION__ " - from_user %d", from_user);
17377 +       dbg("%s - port %d", __FUNCTION__, port->number);
17378 +       dbg("%s - from_user %d", __FUNCTION__, from_user);
17379  
17380         if (count == 0) {
17381 -               dbg(__FUNCTION__ " - write request of 0 bytes");
17382 +               dbg("%s - write request of 0 bytes", __FUNCTION__);
17383                 return (0);
17384         }
17385  
17386         if (port->write_urb->status == -EINPROGRESS) {
17387 -               dbg (__FUNCTION__ " - already writing");
17388 +               dbg("%s - already writing", __FUNCTION__);
17389                 return (0);
17390         }
17391  
17392 -       down (&port->sem);
17393 -
17394         if( (count+priv->wrfilled)>sizeof(priv->wrbuf) ) {
17395                 /* To much data  for buffer. Reset buffer. */
17396                 priv->wrfilled=0;
17397 -               up (&port->sem);
17398                 return (0);
17399         }
17400  
17401         /* Copy data */
17402         if (from_user) {
17403                 if (copy_from_user(priv->wrbuf+priv->wrfilled, buf, count)) {
17404 -                       up (&port->sem);
17405                         return -EFAULT;
17406                 }
17407         } else {
17408 @@ -257,7 +221,7 @@
17409  
17410         if( priv->wrfilled >= 3 ) {
17411                 wrexpected = ((int)priv->wrbuf[2]<<8)+priv->wrbuf[1]+3;
17412 -               dbg(__FUNCTION__ " - expected data: %d", wrexpected);
17413 +               dbg("%s - expected data: %d", __FUNCTION__, wrexpected);
17414         } else {
17415                 wrexpected = sizeof(priv->wrbuf);
17416         }
17417 @@ -266,7 +230,7 @@
17418                 /* We have enough data to begin transmission */
17419                 int length;
17420  
17421 -               dbg(__FUNCTION__ " - transmitting data (frame 1)");
17422 +               dbg("%s - transmitting data (frame 1)", __FUNCTION__);
17423                 length = (wrexpected > port->bulk_out_size) ? port->bulk_out_size : wrexpected;
17424  
17425                 memcpy (port->write_urb->transfer_buffer, priv->wrbuf, length );
17426 @@ -284,26 +248,24 @@
17427                 /* send the data out the bulk port */
17428                 result = usb_submit_urb(port->write_urb);
17429                 if (result) {
17430 -                       err(__FUNCTION__ " - failed submitting write urb, error %d", result);
17431 +                       err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
17432                         /* Throw away data. No better idea what to do with it. */
17433                         priv->wrfilled=0;
17434                         priv->wrsent=0;
17435 -                       up (&port->sem);
17436                         return 0;
17437                 }
17438  
17439 -               dbg(__FUNCTION__ " - priv->wrsent=%d",priv->wrsent);
17440 -               dbg(__FUNCTION__ " - priv->wrfilled=%d",priv->wrfilled);
17441 +               dbg("%s - priv->wrsent=%d", __FUNCTION__,priv->wrsent);
17442 +               dbg("%s - priv->wrfilled=%d", __FUNCTION__,priv->wrfilled);
17443  
17444                 if( priv->wrsent>=priv->wrfilled ) {
17445 -                       dbg(__FUNCTION__ " - buffer cleaned");
17446 +                       dbg("%s - buffer cleaned", __FUNCTION__);
17447                         memset( priv->wrbuf, 0, sizeof(priv->wrbuf) );
17448                         priv->wrfilled=0;
17449                         priv->wrsent=0;
17450                 }
17451         }
17452  
17453 -       up (&port->sem);
17454         return (count);
17455  } 
17456  
17457 @@ -316,7 +278,7 @@
17458  
17459         if (port_paranoia_check (port, __FUNCTION__)) return;
17460  
17461 -       dbg(__FUNCTION__ " - port %d", port->number);
17462 +       dbg("%s - port %d", __FUNCTION__, port->number);
17463  
17464         /* the urb might have been killed. */
17465         if (urb->status)
17466 @@ -349,14 +311,14 @@
17467                 /* "+=" is probably more fault tollerant than "=" */
17468                 priv->rdtodo += size;
17469  
17470 -               dbg(__FUNCTION__ " - rdtodo: %d", priv->rdtodo);
17471 +               dbg("%s - rdtodo: %d", __FUNCTION__, priv->rdtodo);
17472  
17473                 if( !old_rdtodo ) {
17474                         port->read_urb->dev = port->serial->dev;
17475                         result = usb_submit_urb(port->read_urb);
17476                         if( result )
17477 -                               err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
17478 -                       dbg(__FUNCTION__ " - usb_submit_urb(read urb)");
17479 +                               err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
17480 +                       dbg("%s - usb_submit_urb(read urb)", __FUNCTION__);
17481                 }
17482         }
17483  }
17484 @@ -371,16 +333,16 @@
17485         int i;
17486         int result;
17487  
17488 -       dbg(__FUNCTION__ " - port %d", port->number);
17489 +       dbg("%s - port %d", __FUNCTION__, port->number);
17490         
17491         if (!serial) {
17492 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
17493 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
17494                 return;
17495         }
17496  
17497         if (urb->status) {
17498                 usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
17499 -               dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
17500 +               dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
17501                 return;
17502         }
17503  
17504 @@ -404,15 +366,15 @@
17505         /* Just to be sure */
17506         if( priv->rdtodo<0 ) priv->rdtodo=0;
17507  
17508 -       dbg(__FUNCTION__ " - rdtodo: %d", priv->rdtodo);
17509 +       dbg("%s - rdtodo: %d", __FUNCTION__, priv->rdtodo);
17510  
17511         /* Continue to read if we have still urbs to do. */
17512         if( priv->rdtodo /* || (urb->actual_length==port->bulk_in_endpointAddress)*/ ) {
17513                 port->read_urb->dev = port->serial->dev;
17514                 result = usb_submit_urb(port->read_urb);
17515                 if (result)
17516 -                       err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
17517 -               dbg(__FUNCTION__ " - usb_submit_urb(read urb)");
17518 +                       err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
17519 +               dbg("%s - usb_submit_urb(read urb)", __FUNCTION__);
17520         }
17521  }
17522  
17523 @@ -422,15 +384,15 @@
17524         struct cyberjack_private *priv = (struct cyberjack_private *)port->private;
17525         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
17526  
17527 -       dbg(__FUNCTION__ " - port %d", port->number);
17528 +       dbg("%s - port %d", __FUNCTION__, port->number);
17529         
17530         if (!serial) {
17531 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
17532 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
17533                 return;
17534         }
17535  
17536         if (urb->status) {
17537 -               dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
17538 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
17539                 return;
17540         }
17541  
17542 @@ -439,13 +401,11 @@
17543                 int length, blksize, result;
17544  
17545                 if (port->write_urb->status == -EINPROGRESS) {
17546 -                       dbg (__FUNCTION__ " - already writing");
17547 +                       dbg("%s - already writing", __FUNCTION__);
17548                         return;
17549                 }
17550  
17551 -               down (&port->sem);
17552 -
17553 -               dbg(__FUNCTION__ " - transmitting data (frame n)");
17554 +               dbg("%s - transmitting data (frame n)", __FUNCTION__);
17555  
17556                 length = ((priv->wrfilled - priv->wrsent) > port->bulk_out_size) ?
17557                         port->bulk_out_size : (priv->wrfilled - priv->wrsent);
17558 @@ -466,29 +426,27 @@
17559                 /* send the data out the bulk port */
17560                 result = usb_submit_urb(port->write_urb);
17561                 if (result) {
17562 -                       err(__FUNCTION__ " - failed submitting write urb, error %d", result);
17563 +                       err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
17564                         /* Throw away data. No better idea what to do with it. */
17565                         priv->wrfilled=0;
17566                         priv->wrsent=0;
17567 -                       up (&port->sem);
17568                         queue_task(&port->tqueue, &tq_immediate);
17569                         mark_bh(IMMEDIATE_BH);
17570                         return;
17571                 }
17572  
17573 -               dbg(__FUNCTION__ " - priv->wrsent=%d",priv->wrsent);
17574 -               dbg(__FUNCTION__ " - priv->wrfilled=%d",priv->wrfilled);
17575 +               dbg("%s - priv->wrsent=%d", __FUNCTION__,priv->wrsent);
17576 +               dbg("%s - priv->wrfilled=%d", __FUNCTION__,priv->wrfilled);
17577  
17578                 blksize = ((int)priv->wrbuf[2]<<8)+priv->wrbuf[1]+3;
17579  
17580                 if( (priv->wrsent>=priv->wrfilled) || (priv->wrsent>=blksize) ) {
17581 -                       dbg(__FUNCTION__ " - buffer cleaned");
17582 +                       dbg("%s - buffer cleaned", __FUNCTION__);
17583                         memset( priv->wrbuf, 0, sizeof(priv->wrbuf) );
17584                         priv->wrfilled=0;
17585                         priv->wrsent=0;
17586                 }
17587  
17588 -               up (&port->sem);
17589                 queue_task(&port->tqueue, &tq_immediate);
17590                 mark_bh(IMMEDIATE_BH);
17591                 return;
17592 diff -Nur linux-2.4.19.old/drivers/usb/serial/digi_acceleport.c linux-2.4.19/drivers/usb/serial/digi_acceleport.c
17593 --- linux-2.4.19.old/drivers/usb/serial/digi_acceleport.c       Sat Aug  3 02:39:45 2002
17594 +++ linux-2.4.19/drivers/usb/serial/digi_acceleport.c   Mon Nov 25 12:27:08 2002
17595 @@ -14,6 +14,10 @@
17596  *  Peter Berger (pberger@brimson.com)
17597  *  Al Borchers (borchers@steinerpoint.com)
17598  * 
17599 +* (12/03/2001) gkh
17600 +*      switched to using port->open_count instead of private version.
17601 +*      Removed port->active
17602 +*
17603  * (04/08/2001) gb
17604  *      Identify version on module load.
17605  *
17606 @@ -231,19 +235,16 @@
17607  
17608  #include <linux/config.h>
17609  #include <linux/kernel.h>
17610 -#include <linux/sched.h>
17611 -#include <linux/signal.h>
17612  #include <linux/errno.h>
17613 -#include <linux/poll.h>
17614  #include <linux/init.h>
17615  #include <linux/slab.h>
17616 -#include <linux/fcntl.h>
17617  #include <linux/tty.h>
17618  #include <linux/tty_driver.h>
17619  #include <linux/tty_flip.h>
17620  #include <linux/module.h>
17621  #include <linux/spinlock.h>
17622  #include <linux/tqueue.h>
17623 +#include <asm/uaccess.h>
17624  #include <linux/usb.h>
17625  
17626  #ifdef CONFIG_USB_SERIAL_DEBUG
17627 @@ -411,14 +412,14 @@
17628  
17629  /* Structures */
17630  
17631 -typedef struct digi_serial {
17632 +struct digi_serial {
17633         spinlock_t ds_serial_lock;
17634         struct usb_serial_port *ds_oob_port;    /* out-of-band port */
17635         int ds_oob_port_num;                    /* index of out-of-band port */
17636         int ds_device_started;
17637 -} digi_serial_t;
17638 +};
17639  
17640 -typedef struct digi_port {
17641 +struct digi_port {
17642         spinlock_t dp_port_lock;
17643         int dp_port_num;
17644         int dp_out_buf_len;
17645 @@ -429,7 +430,6 @@
17646         int dp_write_urb_in_use;
17647         unsigned int dp_modem_signals;
17648         wait_queue_head_t dp_modem_change_wait;
17649 -       int dp_open_count;                      /* inc on open, dec on close */
17650         int dp_transmit_idle;
17651         wait_queue_head_t dp_transmit_idle_wait;
17652         int dp_throttled;
17653 @@ -438,7 +438,7 @@
17654         int dp_in_close;                        /* close in progress */
17655         wait_queue_head_t dp_close_wait;        /* wait queue for close */
17656         struct tq_struct dp_wakeup_task;
17657 -} digi_port_t;
17658 +};
17659  
17660  
17661  /* Local Function Declarations */
17662 @@ -483,12 +483,12 @@
17663         { }                                             /* Terminating entry */
17664  };
17665  
17666 -static __devinitdata struct usb_device_id id_table_2 [] = {
17667 +static struct usb_device_id id_table_2 [] = {
17668         { USB_DEVICE(DIGI_VENDOR_ID, DIGI_2_ID) },
17669         { }                                             /* Terminating entry */
17670  };
17671  
17672 -static __devinitdata struct usb_device_id id_table_4 [] = {
17673 +static struct usb_device_id id_table_4 [] = {
17674         { USB_DEVICE(DIGI_VENDOR_ID, DIGI_4_ID) },
17675         { }                                             /* Terminating entry */
17676  };
17677 @@ -498,55 +498,51 @@
17678  /* device info needed for the Digi serial converter */
17679  
17680  static struct usb_serial_device_type digi_acceleport_2_device = {
17681 -       name:                           "Digi USB",
17682 -       id_table:                       id_table_2,
17683 -       needs_interrupt_in:             DONT_CARE,
17684 -       needs_bulk_in:                  MUST_HAVE,
17685 -       needs_bulk_out:                 MUST_HAVE,
17686 -       num_interrupt_in:               0,
17687 -       num_bulk_in:                    4,
17688 -       num_bulk_out:                   4,
17689 -       num_ports:                      3,
17690 -       open:                           digi_open,
17691 -       close:                          digi_close,
17692 -       write:                          digi_write,
17693 -       write_room:                     digi_write_room,
17694 -       write_bulk_callback:            digi_write_bulk_callback,
17695 -       read_bulk_callback:             digi_read_bulk_callback,
17696 -       chars_in_buffer:                digi_chars_in_buffer,
17697 -       throttle:                       digi_rx_throttle,
17698 -       unthrottle:                     digi_rx_unthrottle,
17699 -       ioctl:                          digi_ioctl,
17700 -       set_termios:                    digi_set_termios,
17701 -       break_ctl:                      digi_break_ctl,
17702 -       startup:                        digi_startup,
17703 -       shutdown:                       digi_shutdown,
17704 +       .owner =                        THIS_MODULE,
17705 +       .name =                         "Digi USB",
17706 +       .id_table =                     id_table_2,
17707 +       .num_interrupt_in =             0,
17708 +       .num_bulk_in =                  4,
17709 +       .num_bulk_out =                 4,
17710 +       .num_ports =                    3,
17711 +       .open =                         digi_open,
17712 +       .close =                        digi_close,
17713 +       .write =                        digi_write,
17714 +       .write_room =                   digi_write_room,
17715 +       .write_bulk_callback =          digi_write_bulk_callback,
17716 +       .read_bulk_callback =           digi_read_bulk_callback,
17717 +       .chars_in_buffer =              digi_chars_in_buffer,
17718 +       .throttle =                     digi_rx_throttle,
17719 +       .unthrottle =                   digi_rx_unthrottle,
17720 +       .ioctl =                        digi_ioctl,
17721 +       .set_termios =                  digi_set_termios,
17722 +       .break_ctl =                    digi_break_ctl,
17723 +       .startup =                      digi_startup,
17724 +       .shutdown =                     digi_shutdown,
17725  };
17726  
17727  static struct usb_serial_device_type digi_acceleport_4_device = {
17728 -       name:                           "Digi USB",
17729 -       id_table:                       id_table_4,
17730 -       needs_interrupt_in:             DONT_CARE,
17731 -       needs_bulk_in:                  MUST_HAVE,
17732 -       needs_bulk_out:                 MUST_HAVE,
17733 -       num_interrupt_in:               0,
17734 -       num_bulk_in:                    5,
17735 -       num_bulk_out:                   5,
17736 -       num_ports:                      4,
17737 -       open:                           digi_open,
17738 -       close:                          digi_close,
17739 -       write:                          digi_write,
17740 -       write_room:                     digi_write_room,
17741 -       write_bulk_callback:            digi_write_bulk_callback,
17742 -       read_bulk_callback:             digi_read_bulk_callback,
17743 -       chars_in_buffer:                digi_chars_in_buffer,
17744 -       throttle:                       digi_rx_throttle,
17745 -       unthrottle:                     digi_rx_unthrottle,
17746 -       ioctl:                          digi_ioctl,
17747 -       set_termios:                    digi_set_termios,
17748 -       break_ctl:                      digi_break_ctl,
17749 -       startup:                        digi_startup,
17750 -       shutdown:                       digi_shutdown,
17751 +       .owner =                        THIS_MODULE,
17752 +       .name =                         "Digi USB",
17753 +       .id_table =                     id_table_4,
17754 +       .num_interrupt_in =             0,
17755 +       .num_bulk_in =                  5,
17756 +       .num_bulk_out =                 5,
17757 +       .num_ports =                    4,
17758 +       .open =                         digi_open,
17759 +       .close =                        digi_close,
17760 +       .write =                        digi_write,
17761 +       .write_room =                   digi_write_room,
17762 +       .write_bulk_callback =          digi_write_bulk_callback,
17763 +       .read_bulk_callback =           digi_read_bulk_callback,
17764 +       .chars_in_buffer =              digi_chars_in_buffer,
17765 +       .throttle =                     digi_rx_throttle,
17766 +       .unthrottle =                   digi_rx_unthrottle,
17767 +       .ioctl =                        digi_ioctl,
17768 +       .set_termios =                  digi_set_termios,
17769 +       .break_ctl =                    digi_break_ctl,
17770 +       .startup =                      digi_startup,
17771 +       .shutdown =                     digi_shutdown,
17772  };
17773  
17774  
17775 @@ -600,13 +596,12 @@
17776  {
17777  
17778         unsigned long flags;
17779 -       digi_port_t *priv = (digi_port_t *)(port->private);
17780 +       struct digi_port *priv = (struct digi_port *)(port->private);
17781  
17782  
17783         spin_lock_irqsave( &priv->dp_port_lock, flags );
17784         digi_wakeup_write( port );
17785         spin_unlock_irqrestore( &priv->dp_port_lock, flags );
17786 -       MOD_DEC_USE_COUNT;
17787  }
17788  
17789  static void digi_wakeup_write( struct usb_serial_port *port )
17790 @@ -647,8 +642,8 @@
17791  
17792         int ret = 0;
17793         int len;
17794 -       struct usb_serial_port *oob_port = (struct usb_serial_port *)((digi_serial_t *)port->serial->private)->ds_oob_port;
17795 -       digi_port_t *oob_priv = (digi_port_t *)oob_port->private;
17796 +       struct usb_serial_port *oob_port = (struct usb_serial_port *)((struct digi_serial *)port->serial->private)->ds_oob_port;
17797 +       struct digi_port *oob_priv = (struct digi_port *)oob_port->private;
17798         unsigned long flags = 0;
17799  
17800  
17801 @@ -689,7 +684,7 @@
17802         spin_unlock_irqrestore( &oob_priv->dp_port_lock, flags );
17803  
17804         if( ret ) {
17805 -               err( __FUNCTION__ ": usb_submit_urb failed, ret=%d",
17806 +               err("%s: usb_submit_urb failed, ret=%d", __FUNCTION__,
17807                         ret );
17808         }
17809  
17810 @@ -716,7 +711,7 @@
17811  
17812         int ret = 0;
17813         int len;
17814 -       digi_port_t *priv = (digi_port_t *)(port->private);
17815 +       struct digi_port *priv = (struct digi_port *)(port->private);
17816         unsigned char *data = port->write_urb->transfer_buffer;
17817         unsigned long flags = 0;
17818  
17819 @@ -778,7 +773,7 @@
17820         spin_unlock_irqrestore( &priv->dp_port_lock, flags );
17821  
17822         if( ret ) {
17823 -               err( __FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d",
17824 +               err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__,
17825                 ret, priv->dp_port_num );
17826         }
17827  
17828 @@ -802,9 +797,9 @@
17829  {
17830  
17831         int ret;
17832 -       digi_port_t *port_priv = (digi_port_t *)port->private;
17833 -       struct usb_serial_port *oob_port = (struct usb_serial_port *)((digi_serial_t *)port->serial->private)->ds_oob_port;
17834 -       digi_port_t *oob_priv = (digi_port_t *)oob_port->private;
17835 +       struct digi_port *port_priv = (struct digi_port *)port->private;
17836 +       struct usb_serial_port *oob_port = (struct usb_serial_port *)((struct digi_serial *)port->serial->private)->ds_oob_port;
17837 +       struct digi_port *oob_priv = (struct digi_port *)oob_port->private;
17838         unsigned char *data = oob_port->write_urb->transfer_buffer;
17839         unsigned long flags = 0;
17840  
17841 @@ -854,7 +849,7 @@
17842         spin_unlock_irqrestore( &oob_priv->dp_port_lock, flags );
17843  
17844         if( ret ) {
17845 -               err( __FUNCTION__ ": usb_submit_urb failed, ret=%d",
17846 +               err("%s: usb_submit_urb failed, ret=%d", __FUNCTION__,
17847                 ret );
17848         }
17849  
17850 @@ -881,7 +876,7 @@
17851  
17852         int ret;
17853         unsigned char buf[2];
17854 -       digi_port_t *priv = (digi_port_t *)(port->private);
17855 +       struct digi_port *priv = (struct digi_port *)(port->private);
17856         unsigned long flags = 0;
17857  
17858  
17859 @@ -921,7 +916,7 @@
17860  {
17861  
17862         unsigned long flags;
17863 -       digi_port_t *priv = (digi_port_t *)(port->private);
17864 +       struct digi_port *priv = (struct digi_port *)(port->private);
17865  
17866  
17867  dbg( "digi_rx_throttle: TOP: port=%d", priv->dp_port_num );
17868 @@ -942,7 +937,7 @@
17869         int ret = 0;
17870         int len;
17871         unsigned long flags;
17872 -       digi_port_t *priv = (digi_port_t *)(port->private);
17873 +       struct digi_port *priv = (struct digi_port *)(port->private);
17874         struct tty_struct *tty = port->tty;
17875  
17876  
17877 @@ -975,7 +970,7 @@
17878         spin_unlock_irqrestore( &priv->dp_port_lock, flags );
17879  
17880         if( ret ) {
17881 -               err( __FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d",
17882 +               err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__,
17883                         ret, priv->dp_port_num );
17884         }
17885  
17886 @@ -986,7 +981,7 @@
17887         struct termios *old_termios )
17888  {
17889  
17890 -       digi_port_t *priv = (digi_port_t *)(port->private);
17891 +       struct digi_port *priv = (struct digi_port *)(port->private);
17892         unsigned int iflag = port->tty->termios->c_iflag;
17893         unsigned int cflag = port->tty->termios->c_cflag;
17894         unsigned int old_iflag = old_termios->c_iflag;
17895 @@ -1210,7 +1205,7 @@
17896         unsigned int cmd, unsigned long arg )
17897  {
17898  
17899 -       digi_port_t *priv = (digi_port_t *)(port->private);
17900 +       struct digi_port *priv = (struct digi_port *)(port->private);
17901         unsigned int val;
17902         unsigned long flags = 0;
17903  
17904 @@ -1262,7 +1257,7 @@
17905  {
17906  
17907         int ret,data_len,new_len;
17908 -       digi_port_t *priv = (digi_port_t *)(port->private);
17909 +       struct digi_port *priv = (struct digi_port *)(port->private);
17910         unsigned char *data = port->write_urb->transfer_buffer;
17911         unsigned char user_buf[64];     /* 64 bytes is max USB bulk packet */
17912         unsigned long flags = 0;
17913 @@ -1334,7 +1329,7 @@
17914         /* return length of new data written, or error */
17915         spin_unlock_irqrestore( &priv->dp_port_lock, flags );
17916         if( ret < 0 ) {
17917 -               err( __FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d",
17918 +               err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__,
17919                         ret, priv->dp_port_num );
17920         }
17921  
17922 @@ -1349,27 +1344,27 @@
17923  
17924         struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
17925         struct usb_serial *serial;
17926 -       digi_port_t *priv;
17927 +       struct digi_port *priv;
17928         int ret = 0;
17929  
17930  
17931  dbg( "digi_write_bulk_callback: TOP, urb->status=%d", urb->status );
17932  
17933         /* port and serial sanity check */
17934 -       if( port == NULL || (priv=(digi_port_t *)(port->private)) == NULL ) {
17935 -               err( __FUNCTION__ ": port or port->private is NULL, status=%d",
17936 +       if( port == NULL || (priv=(struct digi_port *)(port->private)) == NULL ) {
17937 +               err("%s: port or port->private is NULL, status=%d", __FUNCTION__,
17938                         urb->status );
17939                 return;
17940         }
17941         serial = port->serial;
17942         if( serial == NULL || serial->private == NULL ) {
17943 -               err( __FUNCTION__ ": serial or serial->private is NULL, status=%d", urb->status );
17944 +               err("%s: serial or serial->private is NULL, status=%d", __FUNCTION__, urb->status );
17945                 return;
17946         }
17947  
17948         /* handle oob callback */
17949         if( priv->dp_port_num
17950 -       == ((digi_serial_t *)(serial->private))->ds_oob_port_num ) {
17951 +       == ((struct digi_serial *)(serial->private))->ds_oob_port_num ) {
17952                 dbg( "digi_write_bulk_callback: oob callback" );
17953                 spin_lock( &priv->dp_port_lock );
17954                 priv->dp_write_urb_in_use = 0;
17955 @@ -1386,7 +1381,7 @@
17956         /* try to send any buffered data on this port, if it is open */
17957         spin_lock( &priv->dp_port_lock );
17958         priv->dp_write_urb_in_use = 0;
17959 -       if( priv->dp_open_count && port->write_urb->status != -EINPROGRESS
17960 +       if( port->open_count && port->write_urb->status != -EINPROGRESS
17961         && priv->dp_out_buf_len > 0 ) {
17962  
17963                 *((unsigned char *)(port->write_urb->transfer_buffer))
17964 @@ -1413,14 +1408,12 @@
17965  
17966         /* also queue up a wakeup at scheduler time, in case we */
17967         /* lost the race in write_chan(). */
17968 -       MOD_INC_USE_COUNT;
17969 -       if (schedule_task(&priv->dp_wakeup_task) == 0)
17970 -               MOD_DEC_USE_COUNT;
17971 +       schedule_task(&priv->dp_wakeup_task);
17972  
17973         spin_unlock( &priv->dp_port_lock );
17974  
17975         if( ret ) {
17976 -               err( __FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d",
17977 +               err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__,
17978                         ret, priv->dp_port_num );
17979         }
17980  
17981 @@ -1431,7 +1424,7 @@
17982  {
17983  
17984         int room;
17985 -       digi_port_t *priv = (digi_port_t *)(port->private);
17986 +       struct digi_port *priv = (struct digi_port *)(port->private);
17987         unsigned long flags = 0;
17988  
17989  
17990 @@ -1454,7 +1447,7 @@
17991  static int digi_chars_in_buffer( struct usb_serial_port *port )
17992  {
17993  
17994 -       digi_port_t *priv = (digi_port_t *)(port->private);
17995 +       struct digi_port *priv = (struct digi_port *)(port->private);
17996  
17997  
17998         if( port->write_urb->status == -EINPROGRESS
17999 @@ -1475,12 +1468,12 @@
18000  
18001         int ret;
18002         unsigned char buf[32];
18003 -       digi_port_t *priv = (digi_port_t *)(port->private);
18004 +       struct digi_port *priv = (struct digi_port *)(port->private);
18005         struct termios not_termios;
18006         unsigned long flags = 0;
18007  
18008  
18009 -dbg( "digi_open: TOP: port=%d, active=%d, open_count=%d", priv->dp_port_num, port->active, priv->dp_open_count );
18010 +dbg( "digi_open: TOP: port=%d, open_count=%d", priv->dp_port_num, port->open_count );
18011  
18012         /* be sure the device is started up */
18013         if( digi_startup_device( port->serial ) != 0 )
18014 @@ -1494,32 +1487,17 @@
18015                 return( -EAGAIN );
18016         }
18017  
18018 -       /* inc module use count before sleeping to wait for closes */
18019 -       ++priv->dp_open_count;
18020 -       MOD_INC_USE_COUNT;
18021 -
18022         /* wait for a close in progress to finish */
18023         while( priv->dp_in_close ) {
18024                 cond_wait_interruptible_timeout_irqrestore(
18025                         &priv->dp_close_wait, DIGI_RETRY_TIMEOUT,
18026                         &priv->dp_port_lock, flags );
18027                 if( signal_pending(current) ) {
18028 -                       --priv->dp_open_count;
18029 -                       MOD_DEC_USE_COUNT;
18030                         return( -EINTR );
18031                 }
18032                 spin_lock_irqsave( &priv->dp_port_lock, flags );
18033         }
18034  
18035 -       /* if port is already open, just return */
18036 -       /* be sure exactly one open proceeds */
18037 -       if( port->active ) {
18038 -               spin_unlock_irqrestore( &priv->dp_port_lock, flags );
18039 -               return( 0 );
18040 -       }
18041 -
18042 -       /* first open, mark port as active */
18043 -       port->active = 1;
18044         spin_unlock_irqrestore( &priv->dp_port_lock, flags );
18045   
18046         /* read modem signals automatically whenever they change */
18047 @@ -1556,24 +1534,15 @@
18048         int ret;
18049         unsigned char buf[32];
18050         struct tty_struct *tty = port->tty;
18051 -       digi_port_t *priv = (digi_port_t *)port->private;
18052 +       struct digi_port *priv = (struct digi_port *)port->private;
18053         unsigned long flags = 0;
18054  
18055  
18056 -dbg( "digi_close: TOP: port=%d, active=%d, open_count=%d", priv->dp_port_num, port->active, priv->dp_open_count );
18057 +dbg( "digi_close: TOP: port=%d, open_count=%d", priv->dp_port_num, port->open_count );
18058  
18059  
18060         /* do cleanup only after final close on this port */
18061         spin_lock_irqsave( &priv->dp_port_lock, flags );
18062 -       if( priv->dp_open_count > 1 ) {
18063 -               --priv->dp_open_count;
18064 -               MOD_DEC_USE_COUNT;
18065 -               spin_unlock_irqrestore( &priv->dp_port_lock, flags );
18066 -               return;
18067 -       } else if( priv->dp_open_count <= 0 ) {
18068 -               spin_unlock_irqrestore( &priv->dp_port_lock, flags );
18069 -               return;
18070 -       }
18071         priv->dp_in_close = 1;
18072         spin_unlock_irqrestore( &priv->dp_port_lock, flags );
18073  
18074 @@ -1644,11 +1613,8 @@
18075         tty->closing = 0;
18076  
18077         spin_lock_irqsave( &priv->dp_port_lock, flags );
18078 -       port->active = 0;
18079         priv->dp_write_urb_in_use = 0;
18080         priv->dp_in_close = 0;
18081 -       --priv->dp_open_count;
18082 -       MOD_DEC_USE_COUNT;
18083         wake_up_interruptible( &priv->dp_close_wait );
18084         spin_unlock_irqrestore( &priv->dp_port_lock, flags );
18085  
18086 @@ -1667,7 +1633,7 @@
18087  {
18088  
18089         int i,ret = 0;
18090 -       digi_serial_t *serial_priv = (digi_serial_t *)serial->private;
18091 +       struct digi_serial *serial_priv = (struct digi_serial *)serial->private;
18092         struct usb_serial_port *port;
18093  
18094  
18095 @@ -1689,8 +1655,7 @@
18096                 port->write_urb->dev = port->serial->dev;
18097  
18098                 if( (ret=usb_submit_urb(port->read_urb)) != 0 ) {
18099 -                       err(
18100 -                       __FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d",
18101 +                       err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__,
18102                         ret, i );
18103                         break;
18104                 }
18105 @@ -1706,8 +1671,8 @@
18106  {
18107  
18108         int i;
18109 -       digi_port_t *priv;
18110 -       digi_serial_t *serial_priv;
18111 +       struct digi_port *priv;
18112 +       struct digi_serial *serial_priv;
18113  
18114  
18115  dbg( "digi_startup: TOP" );
18116 @@ -1716,13 +1681,11 @@
18117         /* number of regular ports + 1 for the out-of-band port */
18118         for( i=0; i<serial->type->num_ports+1; i++ ) {
18119  
18120 -               serial->port[i].active = 0;
18121 -
18122                 /* allocate port private structure */
18123                 priv = serial->port[i].private =
18124 -                       (digi_port_t *)kmalloc( sizeof(digi_port_t),
18125 +                       (struct digi_port *)kmalloc( sizeof(struct digi_port),
18126                         GFP_KERNEL );
18127 -               if( priv == (digi_port_t *)0 ) {
18128 +               if( priv == (struct digi_port *)0 ) {
18129                         while( --i >= 0 )
18130                                 kfree( serial->port[i].private );
18131                         return( 1 );                    /* error */
18132 @@ -1736,7 +1699,6 @@
18133                 priv->dp_write_urb_in_use = 0;
18134                 priv->dp_modem_signals = 0;
18135                 init_waitqueue_head( &priv->dp_modem_change_wait );
18136 -               priv->dp_open_count = 0;
18137                 priv->dp_transmit_idle = 0;
18138                 init_waitqueue_head( &priv->dp_transmit_idle_wait );
18139                 priv->dp_throttled = 0;
18140 @@ -1756,9 +1718,9 @@
18141  
18142         /* allocate serial private structure */
18143         serial_priv = serial->private =
18144 -               (digi_serial_t *)kmalloc( sizeof(digi_serial_t),
18145 +               (struct digi_serial *)kmalloc( sizeof(struct digi_serial),
18146                 GFP_KERNEL );
18147 -       if( serial_priv == (digi_serial_t *)0 ) {
18148 +       if( serial_priv == (struct digi_serial *)0 ) {
18149                 for( i=0; i<serial->type->num_ports+1; i++ )
18150                         kfree( serial->port[i].private );
18151                 return( 1 );                    /* error */
18152 @@ -1779,8 +1741,6 @@
18153  {
18154  
18155         int i;
18156 -       digi_port_t *priv;
18157 -       unsigned long flags;
18158  
18159  
18160  dbg( "digi_shutdown: TOP, in_interrupt()=%d", in_interrupt() );
18161 @@ -1791,17 +1751,6 @@
18162                 usb_unlink_urb( serial->port[i].write_urb );
18163         }
18164  
18165 -       /* dec module use count */
18166 -       for( i=0; i<serial->type->num_ports; i++ ) {
18167 -               priv = serial->port[i].private;
18168 -               spin_lock_irqsave( &priv->dp_port_lock, flags );
18169 -               while( priv->dp_open_count > 0 ) {
18170 -                       MOD_DEC_USE_COUNT;
18171 -                       --priv->dp_open_count;
18172 -               }
18173 -               spin_unlock_irqrestore( &priv->dp_port_lock, flags );
18174 -       }
18175 -
18176         /* free the private data structures for all ports */
18177         /* number of regular ports + 1 for the out-of-band port */
18178         for( i=0; i<serial->type->num_ports+1; i++ )
18179 @@ -1815,34 +1764,34 @@
18180  {
18181  
18182         struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
18183 -       digi_port_t *priv;
18184 +       struct digi_port *priv;
18185         int ret;
18186  
18187  
18188  dbg( "digi_read_bulk_callback: TOP" );
18189  
18190         /* port sanity check, do not resubmit if port is not valid */
18191 -       if( port == NULL || (priv=(digi_port_t *)(port->private)) == NULL ) {
18192 -               err( __FUNCTION__ ": port or port->private is NULL, status=%d",
18193 +       if( port == NULL || (priv=(struct digi_port *)(port->private)) == NULL ) {
18194 +               err("%s: port or port->private is NULL, status=%d", __FUNCTION__,
18195                         urb->status );
18196                 return;
18197         }
18198         if( port->serial == NULL
18199         || serial_paranoia_check( port->serial, __FUNCTION__ )
18200         || port->serial->private == NULL ) {
18201 -               err( __FUNCTION__ ": serial is bad or serial->private is NULL, status=%d", urb->status );
18202 +               err("%s: serial is bad or serial->private is NULL, status=%d", __FUNCTION__, urb->status );
18203                 return;
18204         }
18205  
18206         /* do not resubmit urb if it has any status error */
18207         if( urb->status ) {
18208 -               err( __FUNCTION__ ": nonzero read bulk status: status=%d, port=%d", urb->status, priv->dp_port_num );
18209 +               err("%s: nonzero read bulk status: status=%d, port=%d", __FUNCTION__, urb->status, priv->dp_port_num );
18210                 return;
18211         }
18212  
18213         /* handle oob or inb callback, do not resubmit if error */
18214         if( priv->dp_port_num
18215 -       == ((digi_serial_t *)(port->serial->private))->ds_oob_port_num ) {
18216 +       == ((struct digi_serial *)(port->serial->private))->ds_oob_port_num ) {
18217                 if( digi_read_oob_callback( urb ) != 0 )
18218                         return;
18219         } else {
18220 @@ -1853,7 +1802,7 @@
18221         /* continue read */
18222         urb->dev = port->serial->dev;
18223         if( (ret=usb_submit_urb(urb)) != 0 ) {
18224 -               err( __FUNCTION__ ": failed resubmitting urb, ret=%d, port=%d",
18225 +               err("%s: failed resubmitting urb, ret=%d, port=%d", __FUNCTION__,
18226                         ret, priv->dp_port_num );
18227         }
18228  
18229 @@ -1875,7 +1824,7 @@
18230  
18231         struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
18232         struct tty_struct *tty = port->tty;
18233 -       digi_port_t *priv = (digi_port_t *)(port->private);
18234 +       struct digi_port *priv = (struct digi_port *)(port->private);
18235         int opcode = ((unsigned char *)urb->transfer_buffer)[0];
18236         int len = ((unsigned char *)urb->transfer_buffer)[1];
18237         int status = ((unsigned char *)urb->transfer_buffer)[2];
18238 @@ -1889,12 +1838,12 @@
18239  
18240         /* do not process callbacks on closed ports */
18241         /* but do continue the read chain */
18242 -       if( priv->dp_open_count == 0 )
18243 +       if( port->open_count == 0 )
18244                 return( 0 );
18245  
18246         /* short/multiple packet check */
18247         if( urb->actual_length != len + 2 ) {
18248 -               err( __FUNCTION__ ": INCOMPLETE OR MULTIPLE PACKET, urb->status=%d, port=%d, opcode=%d, len=%d, actual_length=%d, status=%d", urb->status, priv->dp_port_num, opcode, len, urb->actual_length, status );
18249 +               err("%s: INCOMPLETE OR MULTIPLE PACKET, urb->status=%d, port=%d, opcode=%d, len=%d, actual_length=%d, status=%d", __FUNCTION__, urb->status, priv->dp_port_num, opcode, len, urb->actual_length, status );
18250                 return( -1 );
18251         }
18252  
18253 @@ -1963,9 +1912,9 @@
18254         spin_unlock( &priv->dp_port_lock );
18255  
18256         if( opcode == DIGI_CMD_RECEIVE_DISABLE ) {
18257 -               dbg( __FUNCTION__ ": got RECEIVE_DISABLE" );
18258 +               dbg("%s: got RECEIVE_DISABLE", __FUNCTION__ );
18259         } else if( opcode != DIGI_CMD_RECEIVE_DATA ) {
18260 -               dbg( __FUNCTION__ ": unknown opcode: %d", opcode );
18261 +               dbg("%s: unknown opcode: %d", __FUNCTION__, opcode );
18262         }
18263  
18264         return( throttled ? 1 : 0 );
18265 @@ -1987,7 +1936,7 @@
18266  
18267         struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
18268         struct usb_serial *serial = port->serial;
18269 -       digi_port_t *priv = (digi_port_t *)(port->private);
18270 +       struct digi_port *priv = (struct digi_port *)(port->private);
18271         int opcode, line, status, val;
18272         int i;
18273  
18274 @@ -2023,7 +1972,7 @@
18275                         if( val & DIGI_READ_INPUT_SIGNALS_CTS ) {
18276                                 priv->dp_modem_signals |= TIOCM_CTS;
18277                                 /* port must be open to use tty struct */
18278 -                               if( priv->dp_open_count
18279 +                               if( port->open_count
18280                                 && port->tty->termios->c_cflag & CRTSCTS ) {
18281                                         port->tty->hw_stopped = 0;
18282                                         digi_wakeup_write( port );
18283 @@ -2031,7 +1980,7 @@
18284                         } else {
18285                                 priv->dp_modem_signals &= ~TIOCM_CTS;
18286                                 /* port must be open to use tty struct */
18287 -                               if( priv->dp_open_count
18288 +                               if( port->open_count
18289                                 && port->tty->termios->c_cflag & CRTSCTS ) {
18290                                         port->tty->hw_stopped = 1;
18291                                 }
18292 diff -Nur linux-2.4.19.old/drivers/usb/serial/empeg.c linux-2.4.19/drivers/usb/serial/empeg.c
18293 --- linux-2.4.19.old/drivers/usb/serial/empeg.c Fri Dec 21 18:41:55 2001
18294 +++ linux-2.4.19/drivers/usb/serial/empeg.c     Mon Nov 25 12:27:08 2002
18295 @@ -53,18 +53,15 @@
18296  
18297  #include <linux/config.h>
18298  #include <linux/kernel.h>
18299 -#include <linux/sched.h>
18300 -#include <linux/signal.h>
18301  #include <linux/errno.h>
18302 -#include <linux/poll.h>
18303  #include <linux/init.h>
18304  #include <linux/slab.h>
18305 -#include <linux/fcntl.h>
18306  #include <linux/tty.h>
18307  #include <linux/tty_driver.h>
18308  #include <linux/tty_flip.h>
18309  #include <linux/module.h>
18310  #include <linux/spinlock.h>
18311 +#include <asm/uaccess.h>
18312  #include <linux/usb.h>
18313  
18314  #ifdef CONFIG_USB_SERIAL_DEBUG
18315 @@ -106,7 +103,7 @@
18316  static void empeg_write_bulk_callback  (struct urb *urb);
18317  static void empeg_read_bulk_callback   (struct urb *urb);
18318  
18319 -static __devinitdata struct usb_device_id id_table [] = {
18320 +static struct usb_device_id id_table [] = {
18321         { USB_DEVICE(EMPEG_VENDOR_ID, EMPEG_PRODUCT_ID) },
18322         { }                                     /* Terminating entry */
18323  };
18324 @@ -114,28 +111,26 @@
18325  MODULE_DEVICE_TABLE (usb, id_table);
18326  
18327  static struct usb_serial_device_type empeg_device = {
18328 -       name:                   "Empeg",
18329 -       id_table:               id_table,
18330 -       needs_interrupt_in:     MUST_HAVE_NOT,  /* must not have an interrupt in endpoint */
18331 -       needs_bulk_in:          MUST_HAVE,      /* must have a bulk in endpoint */
18332 -       needs_bulk_out:         MUST_HAVE,      /* must have a bulk out endpoint */
18333 -       num_interrupt_in:       0,
18334 -       num_bulk_in:            1,
18335 -       num_bulk_out:           1,
18336 -       num_ports:              1,
18337 -       open:                   empeg_open,
18338 -       close:                  empeg_close,
18339 -       throttle:               empeg_throttle,
18340 -       unthrottle:             empeg_unthrottle,
18341 -       startup:                empeg_startup,
18342 -       shutdown:               empeg_shutdown,
18343 -       ioctl:                  empeg_ioctl,
18344 -       set_termios:            empeg_set_termios,
18345 -       write:                  empeg_write,
18346 -       write_room:             empeg_write_room,
18347 -       chars_in_buffer:        empeg_chars_in_buffer,
18348 -       write_bulk_callback:    empeg_write_bulk_callback,
18349 -       read_bulk_callback:     empeg_read_bulk_callback,
18350 +       .owner =                THIS_MODULE,
18351 +       .name =                 "Empeg",
18352 +       .id_table =             id_table,
18353 +       .num_interrupt_in =     0,
18354 +       .num_bulk_in =          1,
18355 +       .num_bulk_out =         1,
18356 +       .num_ports =            1,
18357 +       .open =                 empeg_open,
18358 +       .close =                empeg_close,
18359 +       .throttle =             empeg_throttle,
18360 +       .unthrottle =           empeg_unthrottle,
18361 +       .startup =              empeg_startup,
18362 +       .shutdown =             empeg_shutdown,
18363 +       .ioctl =                empeg_ioctl,
18364 +       .set_termios =          empeg_set_termios,
18365 +       .write =                empeg_write,
18366 +       .write_room =           empeg_write_room,
18367 +       .chars_in_buffer =      empeg_chars_in_buffer,
18368 +       .write_bulk_callback =  empeg_write_bulk_callback,
18369 +       .read_bulk_callback =   empeg_read_bulk_callback,
18370  };
18371  
18372  #define NUM_URBS                       16
18373 @@ -157,43 +152,31 @@
18374         if (port_paranoia_check (port, __FUNCTION__))
18375                 return -ENODEV;
18376  
18377 -       dbg(__FUNCTION__ " - port %d", port->number);
18378 +       dbg("%s - port %d", __FUNCTION__, port->number);
18379  
18380 -       down (&port->sem);
18381 +       /* Force default termio settings */
18382 +       empeg_set_termios (port, NULL) ;
18383  
18384 -       ++port->open_count;
18385 -       MOD_INC_USE_COUNT;
18386 +       bytes_in = 0;
18387 +       bytes_out = 0;
18388  
18389 -       if (!port->active) {
18390 -
18391 -               /* Force default termio settings */
18392 -               empeg_set_termios (port, NULL) ;
18393 -
18394 -               port->active = 1;
18395 -               bytes_in = 0;
18396 -               bytes_out = 0;
18397 -
18398 -               /* Start reading from the device */
18399 -               FILL_BULK_URB(
18400 -                       port->read_urb,
18401 -                       serial->dev, 
18402 -                       usb_rcvbulkpipe(serial->dev,
18403 -                               port->bulk_in_endpointAddress),
18404 -                       port->read_urb->transfer_buffer,
18405 -                       port->read_urb->transfer_buffer_length,
18406 -                       empeg_read_bulk_callback,
18407 -                       port);
18408 -
18409 -               port->read_urb->transfer_flags |= USB_QUEUE_BULK;
18410 -
18411 -               result = usb_submit_urb(port->read_urb);
18412 +       /* Start reading from the device */
18413 +       FILL_BULK_URB(
18414 +               port->read_urb,
18415 +               serial->dev, 
18416 +               usb_rcvbulkpipe(serial->dev,
18417 +                       port->bulk_in_endpointAddress),
18418 +               port->read_urb->transfer_buffer,
18419 +               port->read_urb->transfer_buffer_length,
18420 +               empeg_read_bulk_callback,
18421 +               port);
18422  
18423 -               if (result)
18424 -                       err(__FUNCTION__ " - failed submitting read urb, error %d", result);
18425 +       port->read_urb->transfer_flags |= USB_QUEUE_BULK;
18426  
18427 -       }
18428 +       result = usb_submit_urb(port->read_urb);
18429  
18430 -       up (&port->sem);
18431 +       if (result)
18432 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
18433  
18434         return result;
18435  }
18436 @@ -206,31 +189,18 @@
18437         if (port_paranoia_check (port, __FUNCTION__))
18438                 return;
18439  
18440 -       dbg(__FUNCTION__ " - port %d", port->number);
18441 +       dbg("%s - port %d", __FUNCTION__, port->number);
18442  
18443         serial = get_usb_serial (port, __FUNCTION__);
18444         if (!serial)
18445                 return;
18446  
18447 -       down (&port->sem);
18448 -
18449 -       --port->open_count;
18450 -
18451 -       if (port->open_count <= 0) {
18452 -               if (serial->dev) {
18453 -                       /* shutdown our bulk read */
18454 -                       usb_unlink_urb (port->read_urb);
18455 -               }
18456 -               port->active = 0;
18457 -               port->open_count = 0;
18458 +       if (serial->dev) {
18459 +               /* shutdown our bulk read */
18460 +               usb_unlink_urb (port->read_urb);
18461         }
18462 -
18463 -       up (&port->sem);
18464 -
18465         /* Uncomment the following line if you want to see some statistics in your syslog */
18466         /* info ("Bytes In = %d  Bytes Out = %d", bytes_in, bytes_out); */
18467 -
18468 -       MOD_DEC_USE_COUNT;
18469  }
18470  
18471  
18472 @@ -245,7 +215,7 @@
18473         int bytes_sent = 0;
18474         int transfer_size;
18475  
18476 -       dbg(__FUNCTION__ " - port %d", port->number);
18477 +       dbg("%s - port %d", __FUNCTION__, port->number);
18478  
18479         usb_serial_debug_data (__FILE__, __FUNCTION__, count, buf);
18480  
18481 @@ -266,14 +236,14 @@
18482                 spin_unlock_irqrestore (&write_urb_pool_lock, flags);
18483  
18484                 if (urb == NULL) {
18485 -                       dbg (__FUNCTION__ " - no more free urbs");
18486 +                       dbg("%s - no more free urbs", __FUNCTION__);
18487                         goto exit;
18488                 }
18489  
18490                 if (urb->transfer_buffer == NULL) {
18491 -                       urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
18492 +                       urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);
18493                         if (urb->transfer_buffer == NULL) {
18494 -                               err(__FUNCTION__" no more kernel memory...");
18495 +                               err("%s no more kernel memory...", __FUNCTION__);
18496                                 goto exit;
18497                         }
18498                 }
18499 @@ -305,7 +275,7 @@
18500                 /* send it down the pipe */
18501                 status = usb_submit_urb(urb);
18502                 if (status) {
18503 -                       err(__FUNCTION__ " - usb_submit_urb(write bulk) failed with status = %d", status);
18504 +                       err("%s - usb_submit_urb(write bulk) failed with status = %d", __FUNCTION__, status);
18505                         bytes_sent = status;
18506                         break;
18507                 }
18508 @@ -329,7 +299,7 @@
18509         int i;
18510         int room = 0;
18511  
18512 -       dbg(__FUNCTION__ " - port %d", port->number);
18513 +       dbg("%s - port %d", __FUNCTION__, port->number);
18514  
18515         spin_lock_irqsave (&write_urb_pool_lock, flags);
18516  
18517 @@ -342,7 +312,7 @@
18518  
18519         spin_unlock_irqrestore (&write_urb_pool_lock, flags);
18520  
18521 -       dbg(__FUNCTION__ " - returns %d", room);
18522 +       dbg("%s - returns %d", __FUNCTION__, room);
18523  
18524         return (room);
18525  
18526 @@ -355,7 +325,7 @@
18527         int i;
18528         int chars = 0;
18529  
18530 -       dbg(__FUNCTION__ " - port %d", port->number);
18531 +       dbg("%s - port %d", __FUNCTION__, port->number);
18532  
18533         spin_lock_irqsave (&write_urb_pool_lock, flags);
18534  
18535 @@ -368,7 +338,7 @@
18536  
18537         spin_unlock_irqrestore (&write_urb_pool_lock, flags);
18538  
18539 -       dbg (__FUNCTION__ " - returns %d", chars);
18540 +       dbg("%s - returns %d", __FUNCTION__, chars);
18541  
18542         return (chars);
18543  
18544 @@ -382,10 +352,10 @@
18545         if (port_paranoia_check (port, __FUNCTION__))
18546                 return;
18547  
18548 -       dbg(__FUNCTION__ " - port %d", port->number);
18549 +       dbg("%s - port %d", __FUNCTION__, port->number);
18550  
18551         if (urb->status) {
18552 -               dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
18553 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
18554                 return;
18555         }
18556  
18557 @@ -409,15 +379,15 @@
18558         if (port_paranoia_check (port, __FUNCTION__))
18559                 return;
18560  
18561 -       dbg(__FUNCTION__ " - port %d", port->number);
18562 +       dbg("%s - port %d", __FUNCTION__, port->number);
18563  
18564         if (!serial) {
18565 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
18566 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
18567                 return;
18568         }
18569  
18570         if (urb->status) {
18571 -               dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
18572 +               dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
18573                 return;
18574         }
18575  
18576 @@ -459,7 +429,7 @@
18577         result = usb_submit_urb(port->read_urb);
18578  
18579         if (result)
18580 -               err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
18581 +               err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
18582  
18583         return;
18584  
18585 @@ -468,16 +438,8 @@
18586  
18587  static void empeg_throttle (struct usb_serial_port *port)
18588  {
18589 -       dbg(__FUNCTION__ " - port %d", port->number);
18590 -
18591 -       down (&port->sem);
18592 -
18593 +       dbg("%s - port %d", __FUNCTION__, port->number);
18594         usb_unlink_urb (port->read_urb);
18595 -
18596 -       up (&port->sem);
18597 -
18598 -       return;
18599 -
18600  }
18601  
18602  
18603 @@ -485,30 +447,25 @@
18604  {
18605         int result;
18606  
18607 -       dbg(__FUNCTION__ " - port %d", port->number);
18608 -
18609 -       down (&port->sem);
18610 +       dbg("%s - port %d", __FUNCTION__, port->number);
18611  
18612         port->read_urb->dev = port->serial->dev;
18613  
18614         result = usb_submit_urb(port->read_urb);
18615  
18616         if (result)
18617 -               err(__FUNCTION__ " - failed submitting read urb, error %d", result);
18618 -
18619 -       up (&port->sem);
18620 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
18621  
18622         return;
18623 -
18624  }
18625  
18626  
18627  static int  empeg_startup (struct usb_serial *serial)
18628  {
18629  
18630 -       dbg(__FUNCTION__);
18631 +       dbg("%s", __FUNCTION__);
18632  
18633 -       dbg(__FUNCTION__ " - Set config to 1");
18634 +       dbg("%s - Set config to 1", __FUNCTION__);
18635         usb_set_configuration (serial->dev, 1);
18636  
18637         /* continue on with initialization */
18638 @@ -519,23 +476,13 @@
18639  
18640  static void empeg_shutdown (struct usb_serial *serial)
18641  {
18642 -       int i;
18643 -
18644 -       dbg (__FUNCTION__);
18645 -
18646 -       /* stop reads and writes on all ports */
18647 -       for (i=0; i < serial->num_ports; ++i) {
18648 -               while (serial->port[i].open_count > 0) {
18649 -                       empeg_close (&serial->port[i], NULL);
18650 -               }
18651 -       }
18652 -
18653 +       dbg ("%s", __FUNCTION__);
18654  }
18655  
18656  
18657  static int empeg_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
18658  {
18659 -       dbg(__FUNCTION__ " - port %d, cmd 0x%.4x", port->number, cmd);
18660 +       dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
18661  
18662         return -ENOIOCTLCMD;
18663  }
18664 @@ -544,10 +491,10 @@
18665  static void empeg_set_termios (struct usb_serial_port *port, struct termios *old_termios)
18666  {
18667  
18668 -       dbg(__FUNCTION__ " - port %d", port->number);
18669 +       dbg("%s - port %d", __FUNCTION__, port->number);
18670  
18671         if ((!port->tty) || (!port->tty->termios)) {
18672 -               dbg(__FUNCTION__" - no tty structures");
18673 +               dbg("%s - no tty structures", __FUNCTION__);
18674                 return;
18675         }
18676  
18677 @@ -624,7 +571,8 @@
18678                 urb->transfer_buffer = NULL;
18679                 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
18680                 if (!urb->transfer_buffer) {
18681 -                       err (__FUNCTION__ " - out of memory for urb buffers.");
18682 +                       err("%s - out of memory for urb buffers.", 
18683 +                           __FUNCTION__);
18684                         continue;
18685                 }
18686         }
18687 diff -Nur linux-2.4.19.old/drivers/usb/serial/ftdi_sio.c linux-2.4.19/drivers/usb/serial/ftdi_sio.c
18688 --- linux-2.4.19.old/drivers/usb/serial/ftdi_sio.c      Sat Aug  3 02:39:45 2002
18689 +++ linux-2.4.19/drivers/usb/serial/ftdi_sio.c  Mon Nov 25 12:27:08 2002
18690 @@ -4,6 +4,8 @@
18691   *     Copyright (C) 1999 - 2001
18692   *         Greg Kroah-Hartman (greg@kroah.com)
18693   *          Bill Ryder (bryder@sgi.com)
18694 + *     Copyright (C) 2002
18695 + *         Kuba Ober (kuba@mareimbrium.org)
18696   *
18697   *     This program is free software; you can redistribute it and/or modify
18698   *     it under the terms of the GNU General Public License as published by
18699 @@ -13,49 +15,63 @@
18700   * See Documentation/usb/usb-serial.txt for more information on using this driver
18701   *
18702   * See http://ftdi-usb-sio.sourceforge.net for upto date testing info
18703 - *     and extra documentation
18704 + *     and extra documentation
18705 + *
18706 + * (25/Jul/2002) Bill Ryder inserted Dmitri's TIOCMIWAIT patch
18707 + *      Not tested by me but it doesn't break anything I use.
18708   * 
18709 + * (04/Jan/2002) Kuba Ober
18710 + *     Implemented 38400 baudrate kludge, where it can be substituted with other
18711 + *       values. That's the only way to set custom baudrates.
18712 + *     Implemented TIOCSSERIAL, TIOCGSERIAL ioctl's so that setserial is happy.
18713 + *     FIXME: both baudrate things should eventually go to usbserial.c as other
18714 + *       devices may need that functionality too. Actually, it can probably be
18715 + *       merged in serial.c somehow - too many drivers repeat this code over
18716 + *       and over.
18717 + *     Fixed baudrate forgetfulness - open() used to reset baudrate to 9600 every time.
18718 + *     Divisors for baudrates are calculated by a macro.
18719 + *     Small code cleanups. Ugly whitespace changes for Plato's sake only ;-].
18720 + *
18721   * (04/Nov/2001) Bill Ryder
18722 - *     Fixed bug in read_bulk_callback where incorrect urb buffer was used.
18723 - *     cleaned up write offset calculation
18724 - *     added write_room since default values can be incorrect for sio
18725 - *     changed write_bulk_callback to use same queue_task as other drivers
18726 - *       (the previous version caused panics)
18727 - *     Removed port iteration code since the device only has one I/O port and it 
18728 - *       was wrong anyway.
18729 + *     Fixed bug in read_bulk_callback where incorrect urb buffer was used.
18730 + *     Cleaned up write offset calculation
18731 + *     Added write_room since default values can be incorrect for sio
18732 + *     Changed write_bulk_callback to use same queue_task as other drivers
18733 + *        (the previous version caused panics)
18734 + *     Removed port iteration code since the device only has one I/O port and it
18735 + *       was wrong anyway.
18736   * 
18737   * (31/May/2001) gkh
18738 - *     switched from using spinlock to a semaphore, which fixes lots of problems.
18739 + *     Switched from using spinlock to a semaphore, which fixes lots of problems.
18740   *
18741   * (23/May/2001)   Bill Ryder
18742 - *     Added runtime debug patch (thanx Tyson D Sawyer).
18743 - *     Cleaned up comments for 8U232
18744 - *     Added parity, framing and overrun error handling
18745 - *     Added receive break handling.
18746 + *     Added runtime debug patch (thanx Tyson D Sawyer).
18747 + *     Cleaned up comments for 8U232
18748 + *     Added parity, framing and overrun error handling
18749 + *     Added receive break handling.
18750   * 
18751   * (04/08/2001) gb
18752   *     Identify version on module load.
18753   *       
18754   * (18/March/2001) Bill Ryder
18755 - *     (Not released)
18756 - *     Added send break handling. (requires kernel patch too)
18757 - *     Fixed 8U232AM hardware RTS/CTS etc status reporting.
18758 - *     Added flipbuf fix copied from generic device
18759 + *     (Not released)
18760 + *     Added send break handling. (requires kernel patch too)
18761 + *     Fixed 8U232AM hardware RTS/CTS etc status reporting.
18762 + *     Added flipbuf fix copied from generic device
18763   * 
18764   * (12/3/2000) Bill Ryder
18765 - *     Added support for 8U232AM device.
18766 - *     Moved PID and VIDs into header file only.
18767 - *     Turned on low-latency for the tty (device will do high baudrates)
18768 - *     Added shutdown routine to close files when device removed.
18769 - *     More debug and error message cleanups.
18770 - *     
18771 + *     Added support for 8U232AM device.
18772 + *     Moved PID and VIDs into header file only.
18773 + *     Turned on low-latency for the tty (device will do high baudrates)
18774 + *     Added shutdown routine to close files when device removed.
18775 + *     More debug and error message cleanups.
18776   *
18777   * (11/13/2000) Bill Ryder
18778 - *     Added spinlock protected open code and close code.
18779 - *     Multiple opens work (sort of - see webpage mentioned above).
18780 - *     Cleaned up comments. Removed multiple PID/VID definitions.
18781 - *     Factorised cts/dtr code
18782 - *     Made use of __FUNCTION__ in dbg's
18783 + *     Added spinlock protected open code and close code.
18784 + *     Multiple opens work (sort of - see webpage mentioned above).
18785 + *     Cleaned up comments. Removed multiple PID/VID definitions.
18786 + *     Factorised cts/dtr code
18787 + *     Made use of __FUNCTION__ in dbg's
18788   *      
18789   * (11/01/2000) Adam J. Richter
18790   *     usb_device_id table support
18791 @@ -72,16 +88,16 @@
18792   *     driver is a loadable module now.
18793   *
18794   * (04/04/2000) Bill Ryder 
18795 - *      Fixed bugs in TCGET/TCSET ioctls (by removing them - they are 
18796 + *     Fixed bugs in TCGET/TCSET ioctls (by removing them - they are
18797   *        handled elsewhere in the tty io driver chain).
18798   *
18799   * (03/30/2000) Bill Ryder 
18800 - *      Implemented lots of ioctls
18801 - *     Fixed a race condition in write
18802 - *     Changed some dbg's to errs
18803 + *     Implemented lots of ioctls
18804 + *     Fixed a race condition in write
18805 + *     Changed some dbg's to errs
18806   *
18807   * (03/26/2000) gkh
18808 - *     Split driver up into device specific pieces.
18809 + *     Split driver up into device specific pieces.
18810   *
18811   */
18812  
18813 @@ -90,22 +106,19 @@
18814  /*   to talk to the device */
18815  /* Thanx to gkh and the rest of the usb dev group for all code I have assimilated :-) */
18816  
18817 -
18818  #include <linux/config.h>
18819  #include <linux/kernel.h>
18820 -#include <linux/sched.h>
18821 -#include <linux/signal.h>
18822  #include <linux/errno.h>
18823 -#include <linux/poll.h>
18824  #include <linux/init.h>
18825  #include <linux/slab.h>
18826 -#include <linux/fcntl.h>
18827  #include <linux/tty.h>
18828  #include <linux/tty_driver.h>
18829  #include <linux/tty_flip.h>
18830  #include <linux/module.h>
18831  #include <linux/spinlock.h>
18832 +#include <asm/uaccess.h>
18833  #include <linux/usb.h>
18834 +#include <linux/serial.h>
18835  #ifdef CONFIG_USB_SERIAL_DEBUG
18836         static int debug = 1;
18837  #else
18838 @@ -115,28 +128,30 @@
18839  #include "usb-serial.h"
18840  #include "ftdi_sio.h"
18841  
18842 -
18843  /*
18844   * Version Information
18845   */
18846 -#define DRIVER_VERSION "v1.2.0"
18847 -#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>, Bill Ryder <bryder@sgi.com>"
18848 -#define DRIVER_DESC "USB FTDI RS232 Converters Driver"
18849 +#define DRIVER_VERSION "v1.2.1"
18850 +#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>, Bill Ryder <bryder@sgi.com>, Kuba Ober <kuba@mareimbrium.org>"
18851 +#define DRIVER_DESC "USB FTDI Serial Converters Driver"
18852  
18853 -static __devinitdata struct usb_device_id id_table_sio [] = {
18854 +static struct usb_device_id id_table_sio [] = {
18855         { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
18856         { }                                             /* Terminating entry */
18857  };
18858  
18859 -/* THe 8U232AM has the same API as the sio except for:
18860 -   - it can support MUCH higher baudrates (921600 at 48MHz/230400 
18861 -     at 12MHz so .. it's baudrate setting codes are different 
18862 -   - it has a two byte status code.
18863 -   - it returns characters very 16ms (the FTDI does it every 40ms)
18864 -  */
18865 +/*
18866 + * The 8U232AM has the same API as the sio except for:
18867 + * - it can support MUCH higher baudrates; up to:
18868 + *   o 921600 for RS232 and 2000000 for RS422/485 at 48MHz
18869 + *   o 230400 at 12MHz
18870 + *   so .. 8U232AM's baudrate setting codes are different
18871 + * - it has a two byte status code.
18872 + * - it returns characters every 16ms (the FTDI does it every 40ms)
18873 + */
18874  
18875 -   
18876 -static __devinitdata struct usb_device_id id_table_8U232AM [] = {
18877 +
18878 +static struct usb_device_id id_table_8U232AM [] = {
18879         { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
18880         { USB_DEVICE(FTDI_NF_RIC_VID, FTDI_NF_RIC_PID) },
18881         { }                                             /* Terminating entry */
18882 @@ -152,88 +167,98 @@
18883  
18884  MODULE_DEVICE_TABLE (usb, id_table_combined);
18885  
18886 -
18887  struct ftdi_private {
18888 -       ftdi_type_t ftdi_type;
18889 -       __u16 last_set_data_urb_value ; /* the last data state set - needed for doing a break */
18890 -        int write_offset;
18891 +       ftdi_chip_type_t chip_type;
18892 +                               /* type of the device, either SIO or FT8U232AM */
18893 +       int baud_base;          /* baud base clock for divisor setting */
18894 +       int custom_divisor;     /* custom_divisor kludge, this is for baud_base (different from what goes to the chip!) */
18895 +       __u16 last_set_data_urb_value ;
18896 +                               /* the last data state set - needed for doing a break */
18897 +        int write_offset;       /* This is the offset in the usb data block to write the serial data - 
18898 +                                * it is different between devices
18899 +                                */
18900 +       int flags;              /* some ASYNC_xxxx flags are supported */
18901 +        wait_queue_head_t delta_msr_wait; /* Used for TIOCMIWAIT */
18902 +       char prev_status, diff_status;        /* Used for TIOCMIWAIT */
18903  };
18904 +
18905 +/* Used for TIOCMIWAIT */
18906 +#define FTDI_STATUS_B0_MASK    (FTDI_RS0_CTS | FTDI_RS0_DSR | FTDI_RS0_RI | FTDI_RS0_RLSD)
18907 +#define FTDI_STATUS_B1_MASK    (FTDI_RS_BI)
18908 +/* End TIOCMIWAIT */
18909 +
18910 +#define FTDI_IMPL_ASYNC_FLAGS = ( ASYNC_SPD_HI | ASYNC_SPD_VHI \
18911 + ASYNC_SPD_CUST | ASYNC_SPD_SHI | ASYNC_SPD_WARP )
18912 +
18913  /* function prototypes for a FTDI serial converter */
18914 -static int  ftdi_sio_startup           (struct usb_serial *serial);
18915 +static int  ftdi_SIO_startup           (struct usb_serial *serial);
18916  static int  ftdi_8U232AM_startup       (struct usb_serial *serial);
18917 -static void ftdi_sio_shutdown          (struct usb_serial *serial);
18918 -static int  ftdi_sio_open              (struct usb_serial_port *port, struct file *filp);
18919 -static void ftdi_sio_close             (struct usb_serial_port *port, struct file *filp);
18920 -static int  ftdi_sio_write             (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count);
18921 -static int  ftdi_sio_write_room                (struct usb_serial_port *port);
18922 -static void ftdi_sio_write_bulk_callback (struct urb *urb);
18923 -static void ftdi_sio_read_bulk_callback        (struct urb *urb);
18924 -static void ftdi_sio_set_termios       (struct usb_serial_port *port, struct termios * old);
18925 -static int  ftdi_sio_ioctl             (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
18926 -static void ftdi_sio_break_ctl         (struct usb_serial_port *port, int break_state );
18927 -
18928 -/* Should rename most ftdi_sio's to ftdi_ now since there are two devices 
18929 -   which share common code */ 
18930 -
18931 -static struct usb_serial_device_type ftdi_sio_device = {
18932 -       name:                   "FTDI SIO",
18933 -       id_table:               id_table_sio,
18934 -       needs_interrupt_in:     MUST_HAVE_NOT,
18935 -       needs_bulk_in:          MUST_HAVE,
18936 -       needs_bulk_out:         MUST_HAVE,
18937 -       num_interrupt_in:       0,
18938 -       num_bulk_in:            1,
18939 -       num_bulk_out:           1,
18940 -       num_ports:              1,
18941 -       open:                   ftdi_sio_open,
18942 -       close:                  ftdi_sio_close,
18943 -       write:                  ftdi_sio_write,
18944 -       write_room:             ftdi_sio_write_room,
18945 -       read_bulk_callback:     ftdi_sio_read_bulk_callback,
18946 -       write_bulk_callback:    ftdi_sio_write_bulk_callback,
18947 -       ioctl:                  ftdi_sio_ioctl,
18948 -       set_termios:            ftdi_sio_set_termios,
18949 -       break_ctl:              ftdi_sio_break_ctl,
18950 -       startup:                ftdi_sio_startup,
18951 -        shutdown:               ftdi_sio_shutdown,
18952 +static void ftdi_shutdown              (struct usb_serial *serial);
18953 +static int  ftdi_open                  (struct usb_serial_port *port, struct file *filp);
18954 +static void ftdi_close                 (struct usb_serial_port *port, struct file *filp);
18955 +static int  ftdi_write                 (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count);
18956 +static int  ftdi_write_room            (struct usb_serial_port *port);
18957 +static void ftdi_write_bulk_callback   (struct urb *urb);
18958 +static void ftdi_read_bulk_callback    (struct urb *urb);
18959 +static void ftdi_set_termios           (struct usb_serial_port *port, struct termios * old);
18960 +static int  ftdi_ioctl                 (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
18961 +static void ftdi_break_ctl             (struct usb_serial_port *port, int break_state );
18962 +
18963 +static struct usb_serial_device_type ftdi_SIO_device = {
18964 +       .owner =                THIS_MODULE,
18965 +       .name =                 "FTDI SIO",
18966 +       .id_table =             id_table_sio,
18967 +       .num_interrupt_in =     0,
18968 +       .num_bulk_in =          1,
18969 +       .num_bulk_out =         1,
18970 +       .num_ports =            1,
18971 +       .open =                 ftdi_open,
18972 +       .close =                ftdi_close,
18973 +       .write =                ftdi_write,
18974 +       .write_room =           ftdi_write_room,
18975 +       .read_bulk_callback =   ftdi_read_bulk_callback,
18976 +       .write_bulk_callback =  ftdi_write_bulk_callback,
18977 +       .ioctl =                ftdi_ioctl,
18978 +       .set_termios =          ftdi_set_termios,
18979 +       .break_ctl =            ftdi_break_ctl,
18980 +       .startup =              ftdi_SIO_startup,
18981 +       .shutdown =             ftdi_shutdown,
18982  };
18983  
18984  static struct usb_serial_device_type ftdi_8U232AM_device = {
18985 -       name:                   "FTDI 8U232AM",
18986 -       id_table:               id_table_8U232AM,
18987 -       needs_interrupt_in:     DONT_CARE,
18988 -       needs_bulk_in:          MUST_HAVE,
18989 -       needs_bulk_out:         MUST_HAVE,
18990 -       num_interrupt_in:       0,
18991 -       num_bulk_in:            1,
18992 -       num_bulk_out:           1,
18993 -       num_ports:              1,
18994 -       open:                   ftdi_sio_open,
18995 -       close:                  ftdi_sio_close,
18996 -       write:                  ftdi_sio_write,
18997 -       write_room:             ftdi_sio_write_room,
18998 -       read_bulk_callback:     ftdi_sio_read_bulk_callback,
18999 -       write_bulk_callback:    ftdi_sio_write_bulk_callback,
19000 -       ioctl:                  ftdi_sio_ioctl,
19001 -       set_termios:            ftdi_sio_set_termios,
19002 -       break_ctl:              ftdi_sio_break_ctl,
19003 -       startup:                ftdi_8U232AM_startup,
19004 -        shutdown:               ftdi_sio_shutdown,
19005 +       .owner =                THIS_MODULE,
19006 +       .name =                 "FTDI 8U232AM",
19007 +       .id_table =             id_table_8U232AM,
19008 +       .num_interrupt_in =     0,
19009 +       .num_bulk_in =          1,
19010 +       .num_bulk_out =         1,
19011 +       .num_ports =            1,
19012 +       .open =                 ftdi_open,
19013 +       .close =                ftdi_close,
19014 +       .write =                ftdi_write,
19015 +       .write_room =           ftdi_write_room,
19016 +       .read_bulk_callback =   ftdi_read_bulk_callback,
19017 +       .write_bulk_callback =  ftdi_write_bulk_callback,
19018 +       .ioctl =                ftdi_ioctl,
19019 +       .set_termios =          ftdi_set_termios,
19020 +       .break_ctl =            ftdi_break_ctl,
19021 +       .startup =              ftdi_8U232AM_startup,
19022 +       .shutdown =             ftdi_shutdown,
19023  };
19024  
19025 +#define WDR_TIMEOUT (HZ * 5 ) /* default urb timeout */
19026 +
19027 +#define HIGH 1
19028 +#define LOW 0
19029  
19030  /*
19031   * ***************************************************************************
19032 - * FTDI SIO Serial Converter specific driver functions
19033 + * Utlity functions
19034   * ***************************************************************************
19035   */
19036  
19037 -#define WDR_TIMEOUT (HZ * 5 ) /* default urb timeout */
19038  
19039 -/* utility functions to set and unset dtr and rts */
19040 -#define HIGH 1
19041 -#define LOW 0
19042 -static int set_rts(struct usb_device *dev, 
19043 +static int set_rts(struct usb_device *dev,
19044                    unsigned int pipe,
19045                    int high_or_low)
19046  {
19047 @@ -246,9 +271,11 @@
19048                                ftdi_high_or_low, 0, 
19049                                buf, 0, WDR_TIMEOUT));
19050  }
19051 -static int set_dtr(struct usb_device *dev, 
19052 -                  unsigned int pipe,
19053 -                  int high_or_low)
19054 +
19055 +
19056 +static int set_dtr(struct usb_device *dev,
19057 +                   unsigned int pipe,
19058 +                   int high_or_low)
19059  {
19060         static char buf[1];
19061         unsigned ftdi_high_or_low = (high_or_low? FTDI_SIO_SET_DTR_HIGH : 
19062 @@ -261,51 +288,238 @@
19063  }
19064  
19065  
19066 +static __u16 get_ftdi_divisor(struct usb_serial_port * port);
19067 +
19068  
19069 -static int ftdi_sio_startup (struct usb_serial *serial)
19070 +static int change_speed(struct usb_serial_port *port)
19071  {
19072 -       struct ftdi_private *priv;
19073 +       char buf[1];
19074 +        __u16 urb_value;
19075 +
19076 +       urb_value = get_ftdi_divisor(port);
19077         
19078 +       return (usb_control_msg(port->serial->dev,
19079 +                           usb_sndctrlpipe(port->serial->dev, 0),
19080 +                           FTDI_SIO_SET_BAUDRATE_REQUEST,
19081 +                           FTDI_SIO_SET_BAUDRATE_REQUEST_TYPE,
19082 +                           urb_value, 0,
19083 +                           buf, 0, 100) < 0);
19084 +}
19085 +
19086 +
19087 +static __u16 get_ftdi_divisor(struct usb_serial_port * port)
19088 +{ /* get_ftdi_divisor */
19089         
19090 +       struct ftdi_private * priv = (struct ftdi_private *)port->private;
19091 +       __u16 urb_value = 0;
19092 +       int baud;
19093 +
19094 +       /*
19095 +        * The logic involved in setting the baudrate can be cleanly split in 3 steps.
19096 +        * Obtaining the actual baud rate is a little tricky since unix traditionally
19097 +        * somehow ignored the possibility to set non-standard baud rates.
19098 +        * 1. Standard baud rates are set in tty->termios->c_cflag
19099 +        * 2. If these are not enough, you can set any speed using alt_speed as follows:
19100 +        *    - set tty->termios->c_cflag speed to B38400
19101 +        *    - set your real speed in tty->alt_speed; it gets ignored when
19102 +        *      alt_speed==0, (or)
19103 +        *    - call TIOCSSERIAL ioctl with (struct serial_struct) set as follows:
19104 +        *      flags & ASYNC_SPD_MASK == ASYNC_SPD_[HI, VHI, SHI, WARP], this just
19105 +        *      sets alt_speed to (HI: 57600, VHI: 115200, SHI: 230400, WARP: 460800)
19106 +        * ** Steps 1, 2 are done courtesy of tty_get_baud_rate
19107 +        * 3. You can also set baud rate by setting custom divisor as follows
19108 +        *    - set tty->termios->c_cflag speed to B38400
19109 +        *    - call TIOCSSERIAL ioctl with (struct serial_struct) set as follows:
19110 +        *      o flags & ASYNC_SPD_MASK == ASYNC_SPD_CUST
19111 +        *      o custom_divisor set to baud_base / your_new_baudrate
19112 +        * ** Step 3 is done courtesy of code borrowed from serial.c - I should really
19113 +        *    spend some time and separate+move this common code to serial.c, it is
19114 +        *    replicated in nearly every serial driver you see.
19115 +        */
19116 +
19117 +       /* 1. Get the baud rate from the tty settings, this observes alt_speed hack */
19118 +
19119 +       baud = tty_get_baud_rate(port->tty);
19120 +       dbg("%s - tty_get_baud_rate reports speed %d", __FUNCTION__, baud);
19121 +
19122 +       /* 2. Observe async-compatible custom_divisor hack, update baudrate if needed */
19123 +
19124 +       if (baud == 38400 &&
19125 +           ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST) &&
19126 +            (priv->custom_divisor)) {
19127 +               baud = priv->baud_base / priv->custom_divisor;
19128 +               dbg("%s - custom divisor %d sets baud rate to %d", __FUNCTION__, priv->custom_divisor, baud);
19129 +       }
19130 +
19131 +       /* 3. Convert baudrate to device-specific divisor */
19132 +
19133 +       if (!baud) baud = 9600; 
19134 +       switch(priv->chip_type) {
19135 +       case SIO: /* SIO chip */
19136 +               switch(baud) {
19137 +               case 300: urb_value = ftdi_sio_b300; break;
19138 +               case 600: urb_value = ftdi_sio_b600; break;
19139 +               case 1200: urb_value = ftdi_sio_b1200; break;
19140 +               case 2400: urb_value = ftdi_sio_b2400; break;
19141 +               case 4800: urb_value = ftdi_sio_b4800; break;
19142 +               case 9600: urb_value = ftdi_sio_b9600; break;
19143 +               case 19200: urb_value = ftdi_sio_b19200; break;
19144 +               case 38400: urb_value = ftdi_sio_b38400; break;
19145 +               case 57600: urb_value = ftdi_sio_b57600;  break;
19146 +               case 115200: urb_value = ftdi_sio_b115200; break;
19147 +               } /* baud */
19148 +               if (urb_value == 0)
19149 +                       dbg("%s - Baudrate (%d) requested is not supported", __FUNCTION__,  baud);
19150 +               break;
19151 +       case FT8U232AM: /* 8U232AM chip */
19152 +               if (baud <= 3000000) {
19153 +                       urb_value = FTDI_SIO_BAUD_TO_DIVISOR(baud);
19154 +               } else {
19155 +                       dbg("%s - Baud rate too high!", __FUNCTION__);
19156 +               }
19157 +               break;
19158 +       } /* priv->chip_type */
19159 +
19160 +       if (urb_value == 0) {
19161 +               urb_value = ftdi_sio_b9600;
19162 +       } else {
19163 +               dbg("%s - Baud rate set to %d (divisor %d) on chip %s", __FUNCTION__, baud, urb_value, (priv->chip_type == SIO) ? "SIO" : "FT8U232AM" );
19164 +       }
19165 +
19166 +       return(urb_value);
19167 +}
19168 +
19169 +
19170 +static int get_serial_info(struct usb_serial_port * port, struct serial_struct * retinfo)
19171 +{
19172 +       struct ftdi_private * priv = (struct ftdi_private*) port->private;
19173 +       struct serial_struct tmp;
19174 +
19175 +       if (!retinfo)
19176 +               return -EFAULT;
19177 +       memset(&tmp, 0, sizeof(tmp));
19178 +       tmp.flags = priv->flags;
19179 +       tmp.baud_base = priv->baud_base;
19180 +       tmp.custom_divisor = priv->custom_divisor;
19181 +       if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
19182 +               return -EFAULT;
19183 +       return 0;
19184 +} /* get_serial_info */
19185 +
19186 +
19187 +static int set_serial_info(struct usb_serial_port * port, struct serial_struct * newinfo)
19188 +{ /* set_serial_info */
19189 +       struct ftdi_private * priv = (struct ftdi_private *) port->private;
19190 +       struct serial_struct new_serial;
19191 +       struct ftdi_private old_priv;
19192 +
19193 +       if (copy_from_user(&new_serial, newinfo, sizeof(new_serial)))
19194 +               return -EFAULT;
19195 +       old_priv = * priv;
19196 +
19197 +       /* Do error checking and permission checking */
19198 +
19199 +       if (!capable(CAP_SYS_ADMIN)) {
19200 +               if (((new_serial.flags & ~ASYNC_USR_MASK) !=
19201 +                    (priv->flags & ~ASYNC_USR_MASK)))
19202 +                       return -EPERM;
19203 +               priv->flags = ((priv->flags & ~ASYNC_USR_MASK) |
19204 +                              (new_serial.flags & ASYNC_USR_MASK));
19205 +               priv->custom_divisor = new_serial.custom_divisor;
19206 +               goto check_and_exit;
19207 +       }
19208 +
19209 +       if ((new_serial.baud_base != priv->baud_base) ||
19210 +           (new_serial.baud_base < 9600))
19211 +               return -EINVAL;
19212 +
19213 +       /* Make the changes - these are privileged changes! */
19214 +
19215 +       priv->flags = ((priv->flags & ~ASYNC_FLAGS) |
19216 +                      (new_serial.flags & ASYNC_FLAGS));       
19217 +       priv->custom_divisor = new_serial.custom_divisor;
19218 +
19219 +       port->tty->low_latency = (priv->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
19220 +
19221 +check_and_exit:
19222 +       if (((old_priv.flags & ASYNC_SPD_MASK) !=
19223 +            (priv->flags & ASYNC_SPD_MASK)) ||
19224 +           (old_priv.custom_divisor != priv->custom_divisor)) {
19225 +               if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
19226 +                       port->tty->alt_speed = 57600;
19227 +               if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
19228 +                       port->tty->alt_speed = 115200;
19229 +               if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_SHI)
19230 +                       port->tty->alt_speed = 230400;
19231 +               if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP)
19232 +                       port->tty->alt_speed = 460800;
19233 +               change_speed(port);
19234 +       }
19235 +       
19236 +       return (0);
19237 +
19238 +} /* set_serial_info */
19239 +
19240 +/*
19241 + * ***************************************************************************
19242 + * FTDI driver specific functions
19243 + * ***************************************************************************
19244 + */
19245 +
19246 +/* Startup for the SIO chip */
19247 +static int ftdi_SIO_startup (struct usb_serial *serial)
19248 +{
19249 +       struct ftdi_private *priv;
19250 +
19251         priv = serial->port->private = kmalloc(sizeof(struct ftdi_private), GFP_KERNEL);
19252         if (!priv){
19253 -               err(__FUNCTION__"- kmalloc(%Zd) failed.", sizeof(struct ftdi_private));
19254 +               err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct ftdi_private));
19255                 return -ENOMEM;
19256         }
19257  
19258 -       priv->ftdi_type = sio;
19259 +       priv->chip_type = SIO;
19260 +       priv->baud_base = 12000000 / 16;
19261 +       priv->custom_divisor = 0;
19262         priv->write_offset = 1;
19263 +       priv->prev_status = priv->diff_status = 0;
19264 +       /* This will push the characters through immediately rather
19265 +          than queue a task to deliver them */
19266 +       priv->flags = ASYNC_LOW_LATENCY;
19267         
19268         return (0);
19269  }
19270  
19271 -
19272 +/* Startup for the 8U232AM chip */
19273  static int ftdi_8U232AM_startup (struct usb_serial *serial)
19274  {
19275         struct ftdi_private *priv;
19276
19277  
19278         priv = serial->port->private = kmalloc(sizeof(struct ftdi_private), GFP_KERNEL);
19279         if (!priv){
19280 -               err(__FUNCTION__"- kmalloc(%Zd) failed.", sizeof(struct ftdi_private));
19281 +               err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct ftdi_private));
19282                 return -ENOMEM;
19283         }
19284  
19285 -       priv->ftdi_type = F8U232AM;
19286 +       priv->chip_type = FT8U232AM;
19287 +       priv->baud_base = 48000000 / 2; /* Would be / 16, but FTDI supports 0.125, 0.25 and 0.5 divisor fractions! */
19288 +       priv->custom_divisor = 0;
19289         priv->write_offset = 0;
19290 +        init_waitqueue_head(&priv->delta_msr_wait);
19291 +       /* This will push the characters through immediately rather
19292 +          than queue a task to deliver them */
19293 +       priv->flags = ASYNC_LOW_LATENCY;
19294         
19295         return (0);
19296  }
19297  
19298 -static void ftdi_sio_shutdown (struct usb_serial *serial)
19299 -{
19300 -       
19301 -       dbg (__FUNCTION__);
19302  
19303 +static void ftdi_shutdown (struct usb_serial *serial)
19304 +{
19305 +       dbg("%s", __FUNCTION__);
19306  
19307         /* stop reads and writes on all ports */
19308         while (serial->port[0].open_count > 0) {
19309 -               ftdi_sio_close (&serial->port[0], NULL);
19310 +               ftdi_close (&serial->port[0], NULL);
19311         }
19312         if (serial->port[0].private){
19313                 kfree(serial->port[0].private);
19314 @@ -314,117 +528,92 @@
19315  }
19316  
19317  
19318 -
19319 -static int  ftdi_sio_open (struct usb_serial_port *port, struct file *filp)
19320 -{ /* ftdi_sio_open */
19321 +static int  ftdi_open (struct usb_serial_port *port, struct file *filp)
19322 +{ /* ftdi_open */
19323         struct termios tmp_termios;
19324         struct usb_serial *serial = port->serial;
19325 +       struct ftdi_private *priv = port->private;
19326 +       
19327         int result = 0;
19328         char buf[1]; /* Needed for the usb_control_msg I think */
19329  
19330 -       dbg(__FUNCTION__);
19331 -
19332 -       down (&port->sem);
19333 -       
19334 -       MOD_INC_USE_COUNT;
19335 -       ++port->open_count;
19336 +       dbg("%s", __FUNCTION__);
19337  
19338 -       if (!port->active){
19339 -               port->active = 1;
19340  
19341 -               /* This will push the characters through immediately rather 
19342 -                  than queue a task to deliver them */
19343 -               port->tty->low_latency = 1;
19344 +       port->tty->low_latency = (priv->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
19345  
19346 -               /* No error checking for this (will get errors later anyway) */
19347 -               /* See ftdi_sio.h for description of what is reset */
19348 -               usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
19349 -                               FTDI_SIO_RESET_REQUEST, FTDI_SIO_RESET_REQUEST_TYPE, 
19350 -                               FTDI_SIO_RESET_SIO, 
19351 -                               0, buf, 0, WDR_TIMEOUT);
19352 +       /* No error checking for this (will get errors later anyway) */
19353 +       /* See ftdi_sio.h for description of what is reset */
19354 +       usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
19355 +                       FTDI_SIO_RESET_REQUEST, FTDI_SIO_RESET_REQUEST_TYPE, 
19356 +                       FTDI_SIO_RESET_SIO, 
19357 +                       0, buf, 0, WDR_TIMEOUT);
19358  
19359 -               /* Setup termios defaults. According to tty_io.c the 
19360 -                  settings are driver specific */
19361 -               port->tty->termios->c_cflag =
19362 -                       B9600 | CS8 | CREAD | HUPCL | CLOCAL;
19363 +       /* Termios defaults are set by usb_serial_init. We don't change
19364 +          port->tty->termios - this would loose speed settings, etc.
19365 +          This is same behaviour as serial.c/rs_open() - Kuba */
19366  
19367 -               /* ftdi_sio_set_termios  will send usb control messages */
19368 -               ftdi_sio_set_termios(port, &tmp_termios);       
19369 +       /* ftdi_set_termios  will send usb control messages */
19370 +       ftdi_set_termios(port, &tmp_termios);
19371  
19372 -               /* Turn on RTS and DTR since we are not flow controlling by default */
19373 -               if (set_dtr(serial->dev, usb_sndctrlpipe(serial->dev, 0),HIGH) < 0) {
19374 -                       err(__FUNCTION__ " Error from DTR HIGH urb");
19375 -               }
19376 -               if (set_rts(serial->dev, usb_sndctrlpipe(serial->dev, 0),HIGH) < 0){
19377 -                       err(__FUNCTION__ " Error from RTS HIGH urb");
19378 -               }
19379 -       
19380 -               /* Start reading from the device */
19381 -               FILL_BULK_URB(port->read_urb, serial->dev, 
19382 -                             usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
19383 -                             port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
19384 -                             ftdi_sio_read_bulk_callback, port);
19385 -               result = usb_submit_urb(port->read_urb);
19386 -               if (result)
19387 -                       err(__FUNCTION__ " - failed submitting read urb, error %d", result);
19388 +       /* FIXME: Flow control might be enabled, so it should be checked -
19389 +          we have no control of defaults! */
19390 +       /* Turn on RTS and DTR since we are not flow controlling by default */
19391 +       if (set_dtr(serial->dev, usb_sndctrlpipe(serial->dev, 0),HIGH) < 0) {
19392 +               err("%s Error from DTR HIGH urb", __FUNCTION__);
19393 +       }
19394 +       if (set_rts(serial->dev, usb_sndctrlpipe(serial->dev, 0),HIGH) < 0){
19395 +               err("%s Error from RTS HIGH urb", __FUNCTION__);
19396         }
19397  
19398 -       up (&port->sem);
19399 +       /* Start reading from the device */
19400 +       FILL_BULK_URB(port->read_urb, serial->dev, 
19401 +                     usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
19402 +                     port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
19403 +                     ftdi_read_bulk_callback, port);
19404 +       result = usb_submit_urb(port->read_urb);
19405 +       if (result)
19406 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
19407 +
19408         return result;
19409 -} /* ftdi_sio_open */
19410 +} /* ftdi_open */
19411  
19412  
19413 -static void ftdi_sio_close (struct usb_serial_port *port, struct file *filp)
19414 -{ /* ftdi_sio_close */
19415 +static void ftdi_close (struct usb_serial_port *port, struct file *filp)
19416 +{ /* ftdi_close */
19417         struct usb_serial *serial = port->serial; /* Checked in usbserial.c */
19418         unsigned int c_cflag = port->tty->termios->c_cflag;
19419         char buf[1];
19420  
19421 -       dbg( __FUNCTION__);
19422 -
19423 -       down (&port->sem);
19424 -       --port->open_count;
19425 +       dbg("%s", __FUNCTION__);
19426  
19427 -       if (port->open_count <= 0) {
19428 -               if (serial->dev) {
19429 -                       if (c_cflag & HUPCL){
19430 -                               /* Disable flow control */
19431 -                               if (usb_control_msg(serial->dev, 
19432 -                                                   usb_sndctrlpipe(serial->dev, 0),
19433 -                                                   FTDI_SIO_SET_FLOW_CTRL_REQUEST,
19434 -                                                   FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
19435 -                                                   0, 0, buf, 0, WDR_TIMEOUT) < 0) {
19436 -                                       err("error from flowcontrol urb");
19437 -                               }           
19438 -
19439 -                               /* drop DTR */
19440 -                               if (set_dtr(serial->dev, usb_sndctrlpipe(serial->dev, 0), LOW) < 0){
19441 -                                       err("Error from DTR LOW urb");
19442 -                               }
19443 -                               /* drop RTS */
19444 -                               if (set_rts(serial->dev, usb_sndctrlpipe(serial->dev, 0),LOW) < 0) {
19445 -                                       err("Error from RTS LOW urb");
19446 -                               }       
19447 -                       } /* Note change no line is hupcl is off */
19448 -
19449 -                       /* shutdown our bulk reads and writes */
19450 -                       /* ***CHECK*** behaviour when there is nothing queued */
19451 -                       usb_unlink_urb (port->write_urb);
19452 -                       usb_unlink_urb (port->read_urb);
19453 -               }
19454 -               port->active = 0;
19455 -               port->open_count = 0;
19456 -       } else {  
19457 -               /* Send a HUP if necessary */
19458 -               if (!(port->tty->termios->c_cflag & CLOCAL)){
19459 -                       tty_hangup(port->tty);
19460 -               }
19461 +       if (serial->dev) {
19462 +               if (c_cflag & HUPCL){
19463 +                       /* Disable flow control */
19464 +                       if (usb_control_msg(serial->dev, 
19465 +                                           usb_sndctrlpipe(serial->dev, 0),
19466 +                                           FTDI_SIO_SET_FLOW_CTRL_REQUEST,
19467 +                                           FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
19468 +                                           0, 0, buf, 0, WDR_TIMEOUT) < 0) {
19469 +                               err("error from flowcontrol urb");
19470 +                       }           
19471 +
19472 +                       /* drop DTR */
19473 +                       if (set_dtr(serial->dev, usb_sndctrlpipe(serial->dev, 0), LOW) < 0){
19474 +                               err("Error from DTR LOW urb");
19475 +                       }
19476 +                       /* drop RTS */
19477 +                       if (set_rts(serial->dev, usb_sndctrlpipe(serial->dev, 0),LOW) < 0) {
19478 +                               err("Error from RTS LOW urb");
19479 +                       }       
19480 +               } /* Note change no line is hupcl is off */
19481 +
19482 +               /* shutdown our bulk reads and writes */
19483 +               /* ***CHECK*** behaviour when there is nothing queued */
19484 +               usb_unlink_urb (port->write_urb);
19485 +               usb_unlink_urb (port->read_urb);
19486         }
19487 -
19488 -       up (&port->sem);
19489 -       MOD_DEC_USE_COUNT;
19490 -
19491 -} /* ftdi_sio_close */
19492 +} /* ftdi_close */
19493  
19494  
19495    
19496 @@ -433,16 +622,16 @@
19497   *  B1 0
19498   *  B2..7 length of message excluding byte 0
19499   */
19500 -static int ftdi_sio_write (struct usb_serial_port *port, int from_user, 
19501 +static int ftdi_write (struct usb_serial_port *port, int from_user,
19502                            const unsigned char *buf, int count)
19503 -{ /* ftdi_sio_write */
19504 +{ /* ftdi_write */
19505         struct usb_serial *serial = port->serial;
19506         struct ftdi_private *priv = (struct ftdi_private *)port->private;
19507         unsigned char *first_byte = port->write_urb->transfer_buffer;
19508         int data_offset ;
19509         int result;
19510         
19511 -       dbg(__FUNCTION__ " port %d, %d bytes", port->number, count);
19512 +       dbg("%s port %d, %d bytes", __FUNCTION__, port->number, count);
19513  
19514         if (count == 0) {
19515                 err("write request of 0 bytes");
19516 @@ -453,20 +642,17 @@
19517          dbg("data_offset set to %d",data_offset);
19518  
19519         if (port->write_urb->status == -EINPROGRESS) {
19520 -               dbg (__FUNCTION__ " - already writing");
19521 +               dbg("%s - already writing", __FUNCTION__);
19522                 return (0);
19523         }               
19524  
19525 -       down(&port->sem);
19526 -
19527         count += data_offset;
19528         count = (count > port->bulk_out_size) ? port->bulk_out_size : count;
19529  
19530 -               /* Copy in the data to send */
19531 +       /* Copy in the data to send */
19532         if (from_user) {
19533                 if (copy_from_user(port->write_urb->transfer_buffer + data_offset,
19534                                    buf, count - data_offset )){
19535 -                       up (&port->sem);
19536                         return -EFAULT;
19537                 }
19538         } else {
19539 @@ -480,41 +666,39 @@
19540                 *first_byte = 1 | ((count-data_offset) << 2) ; 
19541         }
19542  
19543 -       dbg(__FUNCTION__ " Bytes: %d, First Byte: 0x%02x",count, first_byte[0]);
19544 +       dbg("%s Bytes: %d, First Byte: 0x%02x", __FUNCTION__,count, first_byte[0]);
19545         usb_serial_debug_data (__FILE__, __FUNCTION__, count, first_byte);
19546                 
19547         /* send the data out the bulk port */
19548         FILL_BULK_URB(port->write_urb, serial->dev, 
19549                       usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress),
19550                       port->write_urb->transfer_buffer, count,
19551 -                     ftdi_sio_write_bulk_callback, port);
19552 +                     ftdi_write_bulk_callback, port);
19553                 
19554         result = usb_submit_urb(port->write_urb);
19555         if (result) {
19556 -               err(__FUNCTION__ " - failed submitting write urb, error %d", result);
19557 -               up (&port->sem);
19558 +               err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
19559                 return 0;
19560         }
19561 -       up (&port->sem);
19562  
19563 -       dbg(__FUNCTION__ " write returning: %d", count - data_offset);
19564 +       dbg("%s write returning: %d", __FUNCTION__, count - data_offset);
19565         return (count - data_offset);
19566 +} /* ftdi_write */
19567  
19568 -} /* ftdi_sio_write */
19569  
19570 -static void ftdi_sio_write_bulk_callback (struct urb *urb)
19571 +static void ftdi_write_bulk_callback (struct urb *urb)
19572  {
19573         struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
19574         struct usb_serial *serial;
19575  
19576 -       dbg("ftdi_sio_write_bulk_callback");
19577 +       dbg("%s", __FUNCTION__);
19578  
19579 -       if (port_paranoia_check (port, "ftdi_sio_write_bulk_callback")) {
19580 +       if (port_paranoia_check (port, "ftdi_write_bulk_callback")) {
19581                 return;
19582         }
19583         
19584         serial = port->serial;
19585 -       if (serial_paranoia_check (serial, "ftdi_sio_write_bulk_callback")) {
19586 +       if (serial_paranoia_check (serial, "ftdi_write_bulk_callback")) {
19587                 return;
19588         }
19589         
19590 @@ -526,13 +710,14 @@
19591         mark_bh(IMMEDIATE_BH);
19592  
19593         return;
19594 -} /* ftdi_sio_write_bulk_callback */
19595 +} /* ftdi_write_bulk_callback */
19596  
19597  
19598 -static int ftdi_sio_write_room( struct usb_serial_port *port )
19599 +static int ftdi_write_room( struct usb_serial_port *port )
19600  {
19601         struct ftdi_private *priv = (struct ftdi_private *)port->private;
19602         int room;
19603 +
19604         if ( port->write_urb->status == -EINPROGRESS) {
19605                 /* There is a race here with the _write routines but it won't hurt */
19606                 room = 0;
19607 @@ -540,16 +725,15 @@
19608                 room = port->bulk_out_size - priv->write_offset;
19609         }
19610         return(room);
19611 +} /* ftdi_write_room */
19612  
19613  
19614 -} /* ftdi_sio_write_room */
19615 -
19616 -
19617 -static void ftdi_sio_read_bulk_callback (struct urb *urb)
19618 -{ /* ftdi_sio_serial_buld_callback */
19619 +static void ftdi_read_bulk_callback (struct urb *urb)
19620 +{ /* ftdi_read_bulk_callback */
19621         struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
19622         struct usb_serial *serial;
19623                 struct tty_struct *tty = port->tty ;
19624 +       struct ftdi_private *priv = (struct ftdi_private *) port->private;
19625         char error_flag;
19626                 unsigned char *data = urb->transfer_buffer;
19627  
19628 @@ -557,7 +741,7 @@
19629         int i;
19630         int result;
19631  
19632 -       dbg(__FUNCTION__ " - port %d", port->number);
19633 +       dbg("%s - port %d", __FUNCTION__, port->number);
19634  
19635         if (port_paranoia_check (port, "ftdi_sio_read_bulk_callback")) {
19636                 return;
19637 @@ -586,6 +770,16 @@
19638         /* See acm.c - you do a tty_hangup  - eg tty_hangup(tty) */
19639         /* if CD is dropped and the line is not CLOCAL then we should hangup */
19640  
19641 +       /* Compare new line status to the old one, signal if different */
19642 +       if (priv != NULL) {
19643 +               char new_status = data[0] & FTDI_STATUS_B0_MASK;
19644 +               if (new_status != priv->prev_status) {
19645 +                       priv->diff_status |= new_status ^ priv->prev_status;
19646 +                       wake_up_interruptible(&priv->delta_msr_wait);
19647 +                       priv->prev_status = new_status;
19648 +               }
19649 +       }
19650 +
19651         /* Handle errors and break */
19652         error_flag = TTY_NORMAL;
19653          /* Although the device uses a bitmask and hence can have multiple */
19654 @@ -652,63 +846,17 @@
19655         FILL_BULK_URB(port->read_urb, serial->dev, 
19656                       usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
19657                       port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
19658 -                     ftdi_sio_read_bulk_callback, port);
19659 +                     ftdi_read_bulk_callback, port);
19660  
19661         result = usb_submit_urb(port->read_urb);
19662         if (result)
19663 -               err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
19664 +               err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
19665  
19666         return;
19667 -} /* ftdi_sio_serial_read_bulk_callback */
19668 -
19669 -
19670 -static __u16 translate_baudrate_to_ftdi(unsigned int cflag, ftdi_type_t ftdi_type) 
19671 -{ /* translate_baudrate_to_ftdi */
19672 -       
19673 -       __u16 urb_value = ftdi_sio_b9600;
19674 +} /* ftdi_read_bulk_callback */
19675  
19676 -       if (ftdi_type == sio){
19677 -               switch(cflag & CBAUD){
19678 -               case B0: break; /* ignored by this */
19679 -               case B300: urb_value = ftdi_sio_b300; dbg("Set to 300"); break;
19680 -               case B600: urb_value = ftdi_sio_b600; dbg("Set to 600") ; break;
19681 -               case B1200: urb_value = ftdi_sio_b1200; dbg("Set to 1200") ; break;
19682 -               case B2400: urb_value = ftdi_sio_b2400; dbg("Set to 2400") ; break;
19683 -               case B4800: urb_value = ftdi_sio_b4800; dbg("Set to 4800") ; break;
19684 -               case B9600: urb_value = ftdi_sio_b9600; dbg("Set to 9600") ; break;
19685 -               case B19200: urb_value = ftdi_sio_b19200; dbg("Set to 19200") ; break;
19686 -               case B38400: urb_value = ftdi_sio_b38400; dbg("Set to 38400") ; break;
19687 -               case B57600: urb_value = ftdi_sio_b57600; dbg("Set to 57600") ; break;
19688 -               case B115200: urb_value = ftdi_sio_b115200; dbg("Set to 115200") ; break;
19689 -               default: dbg(__FUNCTION__ " FTDI_SIO does not support the baudrate (%d) requested",
19690 -                            (cflag & CBAUD)); 
19691 -                  break;
19692 -               }
19693 -       } else { /* it is 8U232AM */
19694 -               switch(cflag & CBAUD){
19695 -               case B0: break; /* ignored by this */
19696 -               case B300: urb_value = ftdi_8U232AM_48MHz_b300; dbg("Set to 300"); break;
19697 -               case B600: urb_value = ftdi_8U232AM_48MHz_b600; dbg("Set to 600") ; break;
19698 -               case B1200: urb_value = ftdi_8U232AM_48MHz_b1200; dbg("Set to 1200") ; break;
19699 -               case B2400: urb_value = ftdi_8U232AM_48MHz_b2400; dbg("Set to 2400") ; break;
19700 -               case B4800: urb_value = ftdi_8U232AM_48MHz_b4800; dbg("Set to 4800") ; break;
19701 -               case B9600: urb_value = ftdi_8U232AM_48MHz_b9600; dbg("Set to 9600") ; break;
19702 -               case B19200: urb_value = ftdi_8U232AM_48MHz_b19200; dbg("Set to 19200") ; break;
19703 -               case B38400: urb_value = ftdi_8U232AM_48MHz_b38400; dbg("Set to 38400") ; break;
19704 -               case B57600: urb_value = ftdi_8U232AM_48MHz_b57600; dbg("Set to 57600") ; break;
19705 -               case B115200: urb_value = ftdi_8U232AM_48MHz_b115200; dbg("Set to 115200") ; break;
19706 -               case B230400: urb_value = ftdi_8U232AM_48MHz_b230400; dbg("Set to 230400") ; break;
19707 -               case B460800: urb_value = ftdi_8U232AM_48MHz_b460800; dbg("Set to 460800") ; break;
19708 -               case B921600: urb_value = ftdi_8U232AM_48MHz_b921600; dbg("Set to 921600") ; break;
19709 -               default: dbg(__FUNCTION__ " The baudrate (%d) requested is not implemented",
19710 -                            (cflag & CBAUD)); 
19711 -                  break;
19712 -               }
19713 -       }
19714 -       return(urb_value);
19715 -}
19716  
19717 -static void ftdi_sio_break_ctl( struct usb_serial_port *port, int break_state )
19718 +static void ftdi_break_ctl( struct usb_serial_port *port, int break_state )
19719  {
19720         struct usb_serial *serial = port->serial;
19721         struct ftdi_private *priv = (struct ftdi_private *)port->private;
19722 @@ -731,22 +879,21 @@
19723                             FTDI_SIO_SET_DATA_REQUEST_TYPE,
19724                             urb_value , 0,
19725                             buf, 0, WDR_TIMEOUT) < 0) {
19726 -               err(__FUNCTION__ " FAILED to enable/disable break state (state was %d)",break_state);
19727 +               err("%s FAILED to enable/disable break state (state was %d)", __FUNCTION__,break_state);
19728         }          
19729  
19730 -       dbg(__FUNCTION__ " break state is %d - urb is %d",break_state, urb_value);
19731 +       dbg("%s break state is %d - urb is %d", __FUNCTION__,break_state, urb_value);
19732         
19733  }
19734  
19735  
19736 +/* old_termios contains the original termios settings and tty->termios contains
19737 + * the new setting to be used
19738 + * WARNING: set_termios calls this with old_termios in kernel space
19739 + */
19740  
19741 -/* As I understand this - old_termios contains the original termios settings */
19742 -/*  and tty->termios contains the new setting to be used */
19743 -/* */
19744 -/*   WARNING: set_termios calls this with old_termios in kernel space */
19745 -
19746 -static void ftdi_sio_set_termios (struct usb_serial_port *port, struct termios *old_termios)
19747 -{ /* ftdi_sio_set_termios */
19748 +static void ftdi_set_termios (struct usb_serial_port *port, struct termios *old_termios)
19749 +{ /* ftdi_termios */
19750         struct usb_serial *serial = port->serial;
19751         unsigned int cflag = port->tty->termios->c_cflag;
19752         struct ftdi_private *priv = (struct ftdi_private *)port->private;       
19753 @@ -754,7 +901,7 @@
19754         char buf[1]; /* Perhaps I should dynamically alloc this? */
19755         
19756         
19757 -       dbg(__FUNCTION__);
19758 +       dbg("%s", __FUNCTION__);
19759  
19760  
19761         /* FIXME -For this cut I don't care if the line is really changing or 
19762 @@ -793,12 +940,10 @@
19763                             FTDI_SIO_SET_DATA_REQUEST_TYPE,
19764                             urb_value , 0,
19765                             buf, 0, 100) < 0) {
19766 -               err(__FUNCTION__ " FAILED to set databits/stopbits/parity");
19767 +               err("%s FAILED to set databits/stopbits/parity", __FUNCTION__);
19768         }          
19769  
19770         /* Now do the baudrate */
19771 -       urb_value = translate_baudrate_to_ftdi((cflag & CBAUD), priv->ftdi_type);
19772 -       
19773         if ((cflag & CBAUD) == B0 ) {
19774                 /* Disable flow control */
19775                 if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
19776 @@ -806,31 +951,27 @@
19777                                     FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
19778                                     0, 0, 
19779                                     buf, 0, WDR_TIMEOUT) < 0) {
19780 -                       err(__FUNCTION__ " error from disable flowcontrol urb");
19781 +                       err("%s error from disable flowcontrol urb", __FUNCTION__);
19782                 }           
19783                 /* Drop RTS and DTR */
19784                 if (set_dtr(serial->dev, usb_sndctrlpipe(serial->dev, 0),LOW) < 0){
19785 -                       err(__FUNCTION__ " Error from DTR LOW urb");
19786 +                       err("%s Error from DTR LOW urb", __FUNCTION__);
19787                 }
19788                 if (set_rts(serial->dev, usb_sndctrlpipe(serial->dev, 0),LOW) < 0){
19789 -                       err(__FUNCTION__ " Error from RTS LOW urb");
19790 +                       err("%s Error from RTS LOW urb", __FUNCTION__);
19791                 }       
19792                 
19793         } else {
19794                 /* set the baudrate determined before */
19795 -               if (usb_control_msg(serial->dev, 
19796 -                                   usb_sndctrlpipe(serial->dev, 0),
19797 -                                   FTDI_SIO_SET_BAUDRATE_REQUEST, 
19798 -                                   FTDI_SIO_SET_BAUDRATE_REQUEST_TYPE,
19799 -                                   urb_value, 0, 
19800 -                                   buf, 0, 100) < 0) {
19801 -                       err(__FUNCTION__ " urb failed to set baurdrate");
19802 +               if (change_speed(port)) {
19803 +                       err("%s urb failed to set baurdrate", __FUNCTION__);
19804                 }
19805         }
19806 +
19807         /* Set flow control */
19808         /* Note device also supports DTR/CD (ugh) and Xon/Xoff in hardware */
19809         if (cflag & CRTSCTS) {
19810 -               dbg(__FUNCTION__ " Setting to CRTSCTS flow control");
19811 +               dbg("%s Setting to CRTSCTS flow control", __FUNCTION__);
19812                 if (usb_control_msg(serial->dev, 
19813                                     usb_sndctrlpipe(serial->dev, 0),
19814                                     FTDI_SIO_SET_FLOW_CTRL_REQUEST, 
19815 @@ -842,7 +983,7 @@
19816                 
19817         } else { 
19818                 /* CHECKME Assuming XON/XOFF handled by tty stack - not by device */
19819 -               dbg(__FUNCTION__ " Turning off hardware flow control");
19820 +               dbg("%s Turning off hardware flow control", __FUNCTION__);
19821                 if (usb_control_msg(serial->dev, 
19822                                     usb_sndctrlpipe(serial->dev, 0),
19823                                     FTDI_SIO_SET_FLOW_CTRL_REQUEST, 
19824 @@ -854,24 +995,27 @@
19825                 
19826         }
19827         return;
19828 -} /* ftdi_sio_set_termios */
19829 +} /* ftdi_termios */
19830 +
19831  
19832 -static int ftdi_sio_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
19833 +static int ftdi_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
19834  {
19835         struct usb_serial *serial = port->serial;
19836         struct ftdi_private *priv = (struct ftdi_private *)port->private;
19837 +
19838         __u16 urb_value=0; /* Will hold the new flags */
19839         char buf[2];
19840         int  ret, mask;
19841         
19842 -       dbg(__FUNCTION__ " cmd 0x%04x", cmd);
19843 +       dbg("%s cmd 0x%04x", __FUNCTION__, cmd);
19844  
19845         /* Based on code from acm.c and others */
19846         switch (cmd) {
19847  
19848         case TIOCMGET:
19849 -               dbg(__FUNCTION__ " TIOCMGET");
19850 -               if (priv->ftdi_type == sio){
19851 +               dbg("%s TIOCMGET", __FUNCTION__);
19852 +               switch (priv->chip_type) {
19853 +               case SIO:
19854                         /* Request the status from the device */
19855                         if ((ret = usb_control_msg(serial->dev, 
19856                                                    usb_rcvctrlpipe(serial->dev, 0),
19857 @@ -879,12 +1023,13 @@
19858                                                    FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
19859                                                    0, 0, 
19860                                                    buf, 1, WDR_TIMEOUT)) < 0 ) {
19861 -                               err(__FUNCTION__ " Could not get modem status of device - err: %d",
19862 +                               err("%s Could not get modem status of device - err: %d", __FUNCTION__,
19863                                     ret);
19864                                 return(ret);
19865                         }
19866 -               } else {
19867 -                       /* the 8U232AM returns a two byte value (the sio is a 1 byte value) - in the same 
19868 +                       break;
19869 +               case FT8U232AM:
19870 +                       /* the 8U232AM returns a two byte value (the sio is a 1 byte value) - in the same
19871                            format as the data returned from the in point */
19872                         if ((ret = usb_control_msg(serial->dev, 
19873                                                    usb_rcvctrlpipe(serial->dev, 0),
19874 @@ -892,10 +1037,14 @@
19875                                                    FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
19876                                                    0, 0, 
19877                                                    buf, 2, WDR_TIMEOUT)) < 0 ) {
19878 -                               err(__FUNCTION__ " Could not get modem status of device - err: %d",
19879 +                               err("%s Could not get modem status of device - err: %d", __FUNCTION__,
19880                                     ret);
19881                                 return(ret);
19882                         }
19883 +                       break;
19884 +               default:
19885 +                       return -EFAULT;
19886 +                       break;
19887                 }
19888  
19889                 return put_user((buf[0] & FTDI_SIO_DSR_MASK ? TIOCM_DSR : 0) |
19890 @@ -906,7 +1055,7 @@
19891                 break;
19892  
19893         case TIOCMSET: /* Turns on and off the lines as specified by the mask */
19894 -               dbg(__FUNCTION__ " TIOCMSET");
19895 +               dbg("%s TIOCMSET", __FUNCTION__);
19896                 if (get_user(mask, (unsigned long *) arg))
19897                         return -EFAULT;
19898                 urb_value = ((mask & TIOCM_DTR) ? HIGH : LOW);
19899 @@ -920,7 +1069,7 @@
19900                 break;
19901                                         
19902         case TIOCMBIS: /* turns on (Sets) the lines as specified by the mask */
19903 -               dbg(__FUNCTION__ " TIOCMBIS");
19904 +               dbg("%s TIOCMBIS", __FUNCTION__);
19905                 if (get_user(mask, (unsigned long *) arg))
19906                         return -EFAULT;
19907                 if (mask & TIOCM_DTR){
19908 @@ -942,7 +1091,7 @@
19909                                         break;
19910  
19911         case TIOCMBIC: /* turns off (Clears) the lines as specified by the mask */
19912 -               dbg(__FUNCTION__ " TIOCMBIC");
19913 +               dbg("%s TIOCMBIC", __FUNCTION__);
19914                 if (get_user(mask, (unsigned long *) arg))
19915                         return -EFAULT;
19916                 if (mask & TIOCM_DTR){
19917 @@ -972,38 +1121,83 @@
19918                  *
19919                  */
19920  
19921 +       case TIOCGSERIAL: /* gets serial port data */
19922 +               return get_serial_info(port, (struct serial_struct *) arg);
19923 +
19924 +       case TIOCSSERIAL: /* sets serial port data */
19925 +               return set_serial_info(port, (struct serial_struct *) arg);
19926 +
19927 +       /*
19928 +        * Wait for any of the 4 modem inputs (DCD,RI,DSR,CTS) to change
19929 +        * - mask passed in arg for lines of interest
19930 +        *   (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
19931 +        * Caller should use TIOCGICOUNT to see which one it was.
19932 +        *
19933 +        * This code is borrowed from linux/drivers/char/serial.c
19934 +        */
19935 +       case TIOCMIWAIT:
19936 +               while (priv != NULL) {
19937 +                       interruptible_sleep_on(&priv->delta_msr_wait);
19938 +                       /* see if a signal did it */
19939 +                       if (signal_pending(current))
19940 +                               return -ERESTARTSYS;
19941 +                       else {
19942 +                               char diff = priv->diff_status;
19943 +
19944 +                               if (diff == 0) {
19945 +                                       return -EIO; /* no change => error */
19946 +                               }
19947 +
19948 +                               /* Consume all events */
19949 +                               priv->diff_status = 0;
19950 +
19951 +                               /* Return 0 if caller wanted to know about these bits */
19952 +                               if ( ((arg & TIOCM_RNG) && (diff & FTDI_RS0_RI)) ||
19953 +                                    ((arg & TIOCM_DSR) && (diff & FTDI_RS0_DSR)) ||
19954 +                                    ((arg & TIOCM_CD)  && (diff & FTDI_RS0_RLSD)) ||
19955 +                                    ((arg & TIOCM_CTS) && (diff & FTDI_RS0_CTS)) ) {
19956 +                                       return 0;
19957 +                               }
19958 +                               /*
19959 +                                * Otherwise caller can't care less about what happened,
19960 +                                * and so we continue to wait for more events.
19961 +                                */
19962 +                       }
19963 +               }
19964 +               /* NOTREACHED */
19965 +
19966         default:
19967           /* This is not an error - turns out the higher layers will do 
19968            *  some ioctls itself (see comment above)
19969            */
19970 -               dbg(__FUNCTION__ " arg not supported - it was 0x%04x",cmd);
19971 +               dbg("%s arg not supported - it was 0x%04x", __FUNCTION__,cmd);
19972                 return(-ENOIOCTLCMD);
19973                 break;
19974         }
19975         return 0;
19976 -} /* ftdi_sio_ioctl */
19977 +} /* ftdi_ioctl */
19978  
19979  
19980 -static int __init ftdi_sio_init (void)
19981 +static int __init ftdi_init (void)
19982  {
19983 -       dbg(__FUNCTION__);
19984 -       usb_serial_register (&ftdi_sio_device);
19985 +       dbg("%s", __FUNCTION__);
19986 +       usb_serial_register (&ftdi_SIO_device);
19987         usb_serial_register (&ftdi_8U232AM_device);
19988         info(DRIVER_VERSION ":" DRIVER_DESC);
19989         return 0;
19990  }
19991  
19992  
19993 -static void __exit ftdi_sio_exit (void)
19994 +static void __exit ftdi_exit (void)
19995  {
19996 -       dbg(__FUNCTION__);
19997 -       usb_serial_deregister (&ftdi_sio_device);
19998 +       dbg("%s", __FUNCTION__);
19999 +       usb_serial_deregister (&ftdi_SIO_device);
20000         usb_serial_deregister (&ftdi_8U232AM_device);
20001  }
20002  
20003  
20004 -module_init(ftdi_sio_init);
20005 -module_exit(ftdi_sio_exit);
20006 +module_init(ftdi_init);
20007 +module_exit(ftdi_exit);
20008  
20009  MODULE_AUTHOR( DRIVER_AUTHOR );
20010  MODULE_DESCRIPTION( DRIVER_DESC );
20011 diff -Nur linux-2.4.19.old/drivers/usb/serial/ftdi_sio.h linux-2.4.19/drivers/usb/serial/ftdi_sio.h
20012 --- linux-2.4.19.old/drivers/usb/serial/ftdi_sio.h      Sat Aug  3 02:39:45 2002
20013 +++ linux-2.4.19/drivers/usb/serial/ftdi_sio.h  Mon Nov 25 12:27:08 2002
20014 @@ -81,17 +81,36 @@
20015  /*
20016   * BmRequestType:  0100 0000B
20017   * bRequest:       FTDI_SIO_SET_BAUDRATE
20018 - * wValue:         BaudRate value - see below
20019 + * wValue:         BaudDivisor value - see below
20020   * wIndex:         Port
20021   * wLength:        0
20022   * Data:           None
20023 + * The BaudDivisor values are calculated as follows:
20024 + * - BaseClock is either 12000000 or 48000000 depending on the device. FIXME: I wish
20025 + *   I knew how to detect old chips to select proper base clock!
20026 + * - BaudDivisor is a fixed point number encoded in a funny way.
20027 + *   (--WRONG WAY OF THINKING--)
20028 + *   BaudDivisor is a fixed point number encoded with following bit weighs:
20029 + *   (-2)(-1)(13..0). It is a radical with a denominator of 4, so values
20030 + *   end with 0.0 (00...), 0.25 (10...), 0.5 (01...), and 0.75 (11...).
20031 + *   (--THE REALITY--)
20032 + *   The both-bits-set has quite different meaning from 0.75 - the chip designers
20033 + *   have decided it to mean 0.125 instead of 0.75.
20034 + *   This info looked up in FTDI application note "FT8U232 DEVICES \ Data Rates
20035 + *   and Flow Control Consideration for USB to RS232".
20036 + * - BaudDivisor = (BaseClock / 16) / BaudRate, where the (=) operation should
20037 + *   automagically re-encode the resulting value to take fractions into consideration.
20038 + * As all values are integers, some bit twiddling is in order:
20039 + *   BaudDivisor = (BaseClock / 16 / BaudRate) |
20040 + *   (((BaseClock / 2 / BaudRate) & 2) ? 0x8000 : 0) | // 0.25
20041 + *   (((BaseClock / 2 / BaudRate) & 4) ? 0x4000 : 0) | // 0.5
20042 + *   (((BaseClock / 2 / BaudRate) & 0x7) == 1 ? 0xc000) // 0.125 - this line due to funny encoding only
20043   */
20044  
20045  typedef enum {
20046 -       sio = 1,
20047 -       F8U232AM = 2,
20048 -} ftdi_type_t;
20049 -
20050 +       SIO = 1,
20051 +       FT8U232AM = 2,
20052 +} ftdi_chip_type_t;
20053  
20054  typedef enum {
20055   ftdi_sio_b300 = 0, 
20056 @@ -106,37 +125,18 @@
20057   ftdi_sio_b115200 = 9
20058  } FTDI_SIO_baudrate_t ;
20059  
20060 +#define FTDI_SIO_BASE_BAUD_TO_DIVISOR(base, baud) ( \
20061 +((base/2/baud) >> 3) | \
20062 +(((base/2/baud) & 2) ? 0x8000 : 0) | \
20063 +(((base/2/baud) & 4) ? 0x4000 : 0) | \
20064 +((((base/2/baud) & 0x7) == 1) ? 0xc000 : 0) )
20065  
20066 -typedef enum {
20067 -  ftdi_8U232AM_12MHz_b300 = 0x09c4,
20068 -  ftdi_8U232AM_12MHz_b600 = 0x04E2,
20069 -  ftdi_8U232AM_12MHz_b1200 = 0x0271,
20070 -  ftdi_8U232AM_12MHz_b2400 = 0x4138,
20071 -  ftdi_8U232AM_12MHz_b4800 = 0x809c,
20072 -  ftdi_8U232AM_12MHz_b9600 = 0xc04e,
20073 -  ftdi_8U232AM_12MHz_b19200 = 0x0027,
20074 -  ftdi_8U232AM_12MHz_b38400 = 0x4013,
20075 -  ftdi_8U232AM_12MHz_b57600 = 0x000d,
20076 -  ftdi_8U232AM_12MHz_b115200 = 0x4006,
20077 -  ftdi_8U232AM_12MHz_b230400 = 0x8003,
20078 -} FTDI_8U232AM_12MHz_baudrate_t;
20079 -/* Apparently all devices are 48MHz */
20080 -typedef enum {
20081 -  ftdi_8U232AM_48MHz_b300 = 0x2710,
20082 -  ftdi_8U232AM_48MHz_b600 = 0x1388,
20083 -  ftdi_8U232AM_48MHz_b1200 = 0x09c4,
20084 -  ftdi_8U232AM_48MHz_b2400 = 0x04e2,
20085 -  ftdi_8U232AM_48MHz_b4800 = 0x0271,
20086 -  ftdi_8U232AM_48MHz_b9600 = 0x4138,
20087 -  ftdi_8U232AM_48MHz_b19200 = 0x809c,
20088 -  ftdi_8U232AM_48MHz_b38400 = 0xc04e,
20089 -  ftdi_8U232AM_48MHz_b57600 = 0x0034,
20090 -  ftdi_8U232AM_48MHz_b115200 = 0x001a,
20091 -  ftdi_8U232AM_48MHz_b230400 = 0x000d,
20092 -  ftdi_8U232AM_48MHz_b460800 = 0x4006,
20093 -  ftdi_8U232AM_48MHz_b921600 = 0x8003,
20094 +#define FTDI_SIO_BAUD_TO_DIVISOR(baud) FTDI_SIO_BASE_BAUD_TO_DIVISOR(48000000, baud)
20095  
20096 -} FTDI_8U232AM_48MHz_baudrate_t;
20097 +/*
20098 + * The ftdi_8U232AM_xxMHz_byyy constans have been removed. Their values can
20099 + * be calculated as follows: FTDI_SIO_BAUD_TO_DIVISOR(xx000000, yyy)
20100 + */
20101  
20102  #define FTDI_SIO_SET_DATA_REQUEST FTDI_SIO_SET_DATA
20103  #define FTDI_SIO_SET_DATA_REQUEST_TYPE 0x40
20104 @@ -440,6 +440,11 @@
20105   * B7  Error in RCVR FIFO
20106   * 
20107   */
20108 +#define FTDI_RS0_CTS   (1 << 4)
20109 +#define FTDI_RS0_DSR   (1 << 5)
20110 +#define FTDI_RS0_RI    (1 << 6)
20111 +#define FTDI_RS0_RLSD  (1 << 7)
20112 +
20113  #define FTDI_RS_DR  1
20114  #define FTDI_RS_OE (1<<1)
20115  #define FTDI_RS_PE (1<<2)
20116 diff -Nur linux-2.4.19.old/drivers/usb/serial/io_edgeport.c linux-2.4.19/drivers/usb/serial/io_edgeport.c
20117 --- linux-2.4.19.old/drivers/usb/serial/io_edgeport.c   Sat Aug  3 02:39:45 2002
20118 +++ linux-2.4.19/drivers/usb/serial/io_edgeport.c       Mon Nov 25 12:27:08 2002
20119 @@ -242,13 +242,9 @@
20120  
20121  #include <linux/config.h>
20122  #include <linux/kernel.h>
20123 -#include <linux/sched.h>
20124 -#include <linux/signal.h>
20125  #include <linux/errno.h>
20126 -#include <linux/poll.h>
20127  #include <linux/init.h>
20128  #include <linux/slab.h>
20129 -#include <linux/fcntl.h>
20130  #include <linux/tty.h>
20131  #include <linux/tty_driver.h>
20132  #include <linux/tty_flip.h>
20133 @@ -256,7 +252,7 @@
20134  #include <linux/spinlock.h>
20135  #include <linux/serial.h>
20136  #include <linux/ioctl.h>
20137 -#include <linux/proc_fs.h>
20138 +#include <asm/uaccess.h>
20139  #include <linux/usb.h>
20140  
20141  #ifdef CONFIG_USB_SERIAL_DEBUG
20142 @@ -274,7 +270,7 @@
20143  /*
20144   * Version Information
20145   */
20146 -#define DRIVER_VERSION "v2.2"
20147 +#define DRIVER_VERSION "v2.3"
20148  #define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com> and David Iacovelli"
20149  #define DRIVER_DESC "Edgeport USB Serial Driver"
20150  
20151 @@ -372,8 +368,8 @@
20152  struct edgeport_serial {
20153         char                    name[MAX_NAME_LEN+1];           /* string name of this device */
20154  
20155 -       EDGE_MANUF_DESCRIPTOR           manuf_descriptor;       /* the manufacturer descriptor */
20156 -       EDGE_BOOT_DESCRIPTOR            boot_descriptor;        /* the boot firmware descriptor */
20157 +       struct edge_manuf_descriptor    manuf_descriptor;       /* the manufacturer descriptor */
20158 +       struct edge_boot_descriptor     boot_descriptor;        /* the boot firmware descriptor */
20159         struct edgeport_product_info    product_info;           /* Product Info */
20160  
20161         __u8                    interrupt_in_endpoint;          /* the interrupt endpoint handle */
20162 @@ -400,17 +396,17 @@
20163  };
20164  
20165  /* baud rate information */
20166 -typedef struct _DIVISOR_TABLE_ENTRY {
20167 +struct divisor_table_entry {
20168         __u32   BaudRate;
20169         __u16  Divisor;
20170 -} DIVISOR_TABLE_ENTRY, *PDIVISOR_TABLE_ENTRY;
20171 +};
20172  
20173  //
20174  // Define table of divisors for Rev A EdgePort/4 hardware
20175  // These assume a 3.6864MHz crystal, the standard /16, and
20176  // MCR.7 = 0.
20177  //
20178 -static DIVISOR_TABLE_ENTRY  DivisorTable[] = {
20179 +static struct divisor_table_entry divisor_table[] = {
20180         {   75,         3072},  
20181         {   110,        2095},          /* 2094.545455 => 230450   => .0217 % over */
20182         {   134,        1713},          /* 1713.011152 => 230398.5 => .00065% under */
20183 @@ -510,7 +506,7 @@
20184         __u16 BootBuildNumber;
20185         __u8 *BootImage;      
20186         __u32 BootSize;
20187 -       PEDGE_FIRMWARE_IMAGE_RECORD record;
20188 +       struct edge_firmware_image_record *record;
20189         unsigned char *firmware;
20190         int response;
20191  
20192 @@ -566,13 +562,13 @@
20193                 firmware = BootImage;
20194  
20195                 for (;;) {
20196 -                       record = (PEDGE_FIRMWARE_IMAGE_RECORD)firmware;
20197 +                       record = (struct edge_firmware_image_record *)firmware;
20198                         response = rom_write (edge_serial->serial, record->ExtAddr, record->Addr, record->Len, &record->Data[0]);
20199                         if (response < 0) {
20200                                 err("sram_write failed (%x, %x, %d)", record->ExtAddr, record->Addr, record->Len);
20201                                 break;
20202                         }
20203 -                       firmware += sizeof (EDGE_FIRMWARE_IMAGE_RECORD) + record->Len;
20204 +                       firmware += sizeof (struct edge_firmware_image_record) + record->Len;
20205                         if (firmware >= &BootImage[BootSize]) {
20206                                 break;
20207                         }
20208 @@ -593,7 +589,7 @@
20209         struct usb_string_descriptor StringDesc;
20210         struct usb_string_descriptor *pStringDesc;
20211  
20212 -       dbg(__FUNCTION__ " - USB String ID = %d", Id );
20213 +       dbg("%s - USB String ID = %d", __FUNCTION__, Id );
20214  
20215         if (!usb_get_descriptor(dev, USB_DT_STRING, Id, &StringDesc, sizeof(StringDesc))) {
20216                 return 0;
20217 @@ -628,7 +624,7 @@
20218         struct usb_string_descriptor StringDesc;
20219         struct usb_string_descriptor *pStringDesc;
20220  
20221 -       dbg(__FUNCTION__ " - USB String ID = %d", Id );
20222 +       dbg("%s - USB String ID = %d", __FUNCTION__, Id );
20223  
20224         if (!usb_get_descriptor(dev, USB_DT_STRING, Id, &StringDesc, sizeof(StringDesc))) {
20225                 return 0;
20226 @@ -763,14 +759,14 @@
20227         int portNumber;
20228         int result;
20229  
20230 -       dbg(__FUNCTION__);
20231 +       dbg("%s", __FUNCTION__);
20232  
20233         if (serial_paranoia_check (edge_serial->serial, __FUNCTION__)) {
20234                 return;
20235         }
20236  
20237         if (urb->status) {
20238 -               dbg(__FUNCTION__" - nonzero control read status received: %d", urb->status);
20239 +               dbg("%s - nonzero control read status received: %d", __FUNCTION__, urb->status);
20240                 return;
20241         }
20242  
20243 @@ -782,7 +778,7 @@
20244                         bytes_avail = data[0] | (data[1] << 8);
20245                         if (bytes_avail) {
20246                                 edge_serial->rxBytesAvail += bytes_avail;
20247 -                               dbg(__FUNCTION__" - bytes_avail = %d, rxBytesAvail %d", bytes_avail, edge_serial->rxBytesAvail);
20248 +                               dbg("%s - bytes_avail = %d, rxBytesAvail %d", __FUNCTION__, bytes_avail, edge_serial->rxBytesAvail);
20249  
20250                                 if ((edge_serial->rxBytesAvail > 0) &&
20251                                     (edge_serial->read_urb->status != -EINPROGRESS)) {
20252 @@ -792,7 +788,7 @@
20253                                         edge_serial->read_urb->dev = edge_serial->serial->dev;
20254                                         result = usb_submit_urb(edge_serial->read_urb);
20255                                         if (result) {
20256 -                                               dbg(__FUNCTION__" - usb_submit_urb(read bulk) failed with result = %d", result);
20257 +                                               dbg("%s - usb_submit_urb(read bulk) failed with result = %d", __FUNCTION__, result);
20258                                         }
20259                                 }
20260                         }
20261 @@ -808,10 +804,11 @@
20262                                         edge_port = (struct edgeport_port *)port->private;
20263                                         if (edge_port->open) {
20264                                                 edge_port->txCredits += txCredits;
20265 -                                               dbg(__FUNCTION__" - txcredits for port%d = %d", portNumber, edge_port->txCredits);
20266 +                                               dbg("%s - txcredits for port%d = %d", __FUNCTION__, portNumber, edge_port->txCredits);
20267  
20268                                                 /* tell the tty driver that something has changed */
20269 -                                               wake_up_interruptible(&edge_port->port->tty->write_wait);
20270 +                                               if (edge_port->port->tty)
20271 +                                                       wake_up_interruptible(&edge_port->port->tty->write_wait);
20272  
20273                                                 // Since we have more credit, check if more data can be sent
20274                                                 send_more_port_data(edge_serial, edge_port);
20275 @@ -837,14 +834,14 @@
20276         int                     status;
20277         __u16                   raw_data_length;
20278  
20279 -       dbg(__FUNCTION__);
20280 +       dbg("%s", __FUNCTION__);
20281  
20282         if (serial_paranoia_check (edge_serial->serial, __FUNCTION__)) {
20283                 return;
20284         }
20285  
20286         if (urb->status) {
20287 -               dbg(__FUNCTION__" - nonzero read bulk status received: %d", urb->status);
20288 +               dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
20289                 return;
20290         }
20291  
20292 @@ -856,7 +853,7 @@
20293                 /* decrement our rxBytes available by the number that we just got */
20294                 edge_serial->rxBytesAvail -= raw_data_length;
20295  
20296 -               dbg(__FUNCTION__" - Received = %d, rxBytesAvail %d", raw_data_length, edge_serial->rxBytesAvail);
20297 +               dbg("%s - Received = %d, rxBytesAvail %d", __FUNCTION__, raw_data_length, edge_serial->rxBytesAvail);
20298  
20299                 process_rcvd_data (edge_serial, data, urb->actual_length);
20300  
20301 @@ -869,7 +866,7 @@
20302                         edge_serial->read_urb->dev = edge_serial->serial->dev;
20303                         status = usb_submit_urb(edge_serial->read_urb);
20304                         if (status) {
20305 -                               err(__FUNCTION__" - usb_submit_urb(read bulk) failed, status = %d", status);
20306 +                               err("%s - usb_submit_urb(read bulk) failed, status = %d", __FUNCTION__, status);
20307                         }
20308                 }
20309         }
20310 @@ -886,25 +883,27 @@
20311         struct edgeport_port *edge_port = (struct edgeport_port *)urb->context;
20312         struct tty_struct *tty;
20313  
20314 -       dbg(__FUNCTION__);
20315 +       dbg("%s", __FUNCTION__);
20316  
20317         if (port_paranoia_check (edge_port->port, __FUNCTION__)) {
20318                 return;
20319         }
20320  
20321         if (urb->status) {
20322 -               dbg(__FUNCTION__" - nonzero write bulk status received: %d", urb->status);
20323 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
20324         }
20325  
20326         tty = edge_port->port->tty;
20327  
20328 -       /* let the tty driver wakeup if it has a special write_wakeup function */
20329 -       if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
20330 -               (tty->ldisc.write_wakeup)(tty);
20331 -       }
20332 +       if (tty) {
20333 +               /* let the tty driver wakeup if it has a special write_wakeup function */
20334 +               if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
20335 +                       (tty->ldisc.write_wakeup)(tty);
20336 +               }
20337  
20338 -       /* tell the tty driver that something has changed */
20339 -       wake_up_interruptible(&tty->write_wait);
20340 +               /* tell the tty driver that something has changed */
20341 +               wake_up_interruptible(&tty->write_wait);
20342 +       }
20343  
20344         // Release the Write URB
20345         edge_port->write_in_progress = FALSE;
20346 @@ -925,10 +924,10 @@
20347         struct tty_struct *tty;
20348         int status = urb->status;
20349  
20350 -       dbg(__FUNCTION__);
20351 +       dbg("%s", __FUNCTION__);
20352  
20353         CmdUrbs--;
20354 -       dbg(__FUNCTION__" - FREE URB %p (outstanding %d)", urb, CmdUrbs);
20355 +       dbg("%s - FREE URB %p (outstanding %d)", __FUNCTION__, urb, CmdUrbs);
20356  
20357  
20358         /* clean up the transfer buffer */
20359 @@ -945,7 +944,7 @@
20360         }
20361  
20362         if (status) {
20363 -               dbg(__FUNCTION__" - nonzero write bulk status received: %d", status);
20364 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, status);
20365                 return;
20366         }
20367  
20368 @@ -953,7 +952,8 @@
20369         tty = edge_port->port->tty;
20370  
20371         /* tell the tty driver that something has changed */
20372 -       wake_up_interruptible(&tty->write_wait);
20373 +       if (tty)
20374 +               wake_up_interruptible(&tty->write_wait);
20375  
20376         /* we have completed the command */
20377         edge_port->commandPending = FALSE;
20378 @@ -982,139 +982,124 @@
20379         if (port_paranoia_check (port, __FUNCTION__))
20380                 return -ENODEV;
20381         
20382 -       dbg(__FUNCTION__ " - port %d", port->number);
20383 +       dbg("%s - port %d", __FUNCTION__, port->number);
20384  
20385         if (edge_port == NULL)
20386                 return -ENODEV;
20387  
20388 -       ++port->open_count;
20389 -       MOD_INC_USE_COUNT;
20390 -       
20391 -       if (!port->active) {
20392 -               port->active = 1;
20393 -
20394 -               /* force low_latency on so that our tty_push actually forces the data through, 
20395 -                  otherwise it is scheduled, and with high data rates (like with OHCI) data
20396 -                  can get lost. */
20397 +       /* force low_latency on so that our tty_push actually forces the data through, 
20398 +          otherwise it is scheduled, and with high data rates (like with OHCI) data
20399 +          can get lost. */
20400 +       if (port->tty)
20401                 port->tty->low_latency = 1;
20402 +
20403 +       /* see if we've set up our endpoint info yet (can't set it up in edge_startup
20404 +          as the structures were not set up at that time.) */
20405 +       serial = port->serial;
20406 +       edge_serial = (struct edgeport_serial *)serial->private;
20407 +       if (edge_serial == NULL) {
20408 +               return -ENODEV;
20409 +       }
20410 +       if (edge_serial->interrupt_in_buffer == NULL) {
20411 +               struct usb_serial_port *port0 = &serial->port[0];
20412 +               
20413 +               /* not set up yet, so do it now */
20414 +               edge_serial->interrupt_in_buffer = port0->interrupt_in_buffer;
20415 +               edge_serial->interrupt_in_endpoint = port0->interrupt_in_endpointAddress;
20416 +               edge_serial->interrupt_read_urb = port0->interrupt_in_urb;
20417 +               edge_serial->bulk_in_buffer = port0->bulk_in_buffer;
20418 +               edge_serial->bulk_in_endpoint = port0->bulk_in_endpointAddress;
20419 +               edge_serial->read_urb = port0->read_urb;
20420 +               edge_serial->bulk_out_endpoint = port0->bulk_out_endpointAddress;
20421         
20422 -               /* see if we've set up our endpoint info yet (can't set it up in edge_startup
20423 -                  as the structures were not set up at that time.) */
20424 -               serial = port->serial;
20425 -               edge_serial = (struct edgeport_serial *)serial->private;
20426 -               if (edge_serial == NULL) {
20427 -                       port->active = 0;
20428 -                       port->open_count = 0;
20429 -                       MOD_DEC_USE_COUNT;
20430 -                       return -ENODEV;
20431 -               }
20432 -               if (edge_serial->interrupt_in_buffer == NULL) {
20433 -                       struct usb_serial_port *port0 = &serial->port[0];
20434 -                       
20435 -                       /* not set up yet, so do it now */
20436 -                       edge_serial->interrupt_in_buffer = port0->interrupt_in_buffer;
20437 -                       edge_serial->interrupt_in_endpoint = port0->interrupt_in_endpointAddress;
20438 -                       edge_serial->interrupt_read_urb = port0->interrupt_in_urb;
20439 -                       edge_serial->bulk_in_buffer = port0->bulk_in_buffer;
20440 -                       edge_serial->bulk_in_endpoint = port0->bulk_in_endpointAddress;
20441 -                       edge_serial->read_urb = port0->read_urb;
20442 -                       edge_serial->bulk_out_endpoint = port0->bulk_out_endpointAddress;
20443 +               /* set up our interrupt urb */
20444 +               FILL_INT_URB(edge_serial->interrupt_read_urb,
20445 +                            serial->dev,
20446 +                            usb_rcvintpipe(serial->dev,
20447 +                                           port0->interrupt_in_endpointAddress),
20448 +                            port0->interrupt_in_buffer,
20449 +                            edge_serial->interrupt_read_urb->transfer_buffer_length,
20450 +                            edge_interrupt_callback, edge_serial,
20451 +                            edge_serial->interrupt_read_urb->interval);
20452                 
20453 -                       /* set up our interrupt urb */
20454 -                       FILL_INT_URB(edge_serial->interrupt_read_urb,
20455 -                                    serial->dev,
20456 -                                    usb_rcvintpipe(serial->dev,
20457 -                                                   port0->interrupt_in_endpointAddress),
20458 -                                    port0->interrupt_in_buffer,
20459 -                                    edge_serial->interrupt_read_urb->transfer_buffer_length,
20460 -                                    edge_interrupt_callback, edge_serial,
20461 -                                    edge_serial->interrupt_read_urb->interval);
20462 -                       
20463 -                       /* set up our bulk in urb */
20464 -                       FILL_BULK_URB(edge_serial->read_urb, serial->dev,
20465 -                                     usb_rcvbulkpipe(serial->dev, port0->bulk_in_endpointAddress),
20466 -                                     port0->bulk_in_buffer,
20467 -                                     edge_serial->read_urb->transfer_buffer_length,
20468 -                                     edge_bulk_in_callback, edge_serial);
20469 -
20470 -                       /* start interrupt read for this edgeport
20471 -                        * this interrupt will continue as long as the edgeport is connected */
20472 -                       response = usb_submit_urb (edge_serial->interrupt_read_urb);
20473 -                       if (response) {
20474 -                               err(__FUNCTION__" - Error %d submitting control urb", response);
20475 -                       }
20476 +               /* set up our bulk in urb */
20477 +               FILL_BULK_URB(edge_serial->read_urb, serial->dev,
20478 +                             usb_rcvbulkpipe(serial->dev, port0->bulk_in_endpointAddress),
20479 +                             port0->bulk_in_buffer,
20480 +                             edge_serial->read_urb->transfer_buffer_length,
20481 +                             edge_bulk_in_callback, edge_serial);
20482 +
20483 +               /* start interrupt read for this edgeport
20484 +                * this interrupt will continue as long as the edgeport is connected */
20485 +               response = usb_submit_urb (edge_serial->interrupt_read_urb);
20486 +               if (response) {
20487 +                       err("%s - Error %d submitting control urb", __FUNCTION__, response);
20488                 }
20489 -               
20490 -               /* initialize our wait queues */
20491 -               init_waitqueue_head(&edge_port->wait_open);
20492 -               init_waitqueue_head(&edge_port->wait_chase);
20493 -               init_waitqueue_head(&edge_port->delta_msr_wait);
20494 -               init_waitqueue_head(&edge_port->wait_command);
20495 -
20496 -               /* initialize our icount structure */
20497 -               memset (&(edge_port->icount), 0x00, sizeof(edge_port->icount));
20498 -
20499 -               /* initialize our port settings */
20500 -               edge_port->txCredits            = 0;                    /* Can't send any data yet */
20501 -               edge_port->shadowMCR            = MCR_MASTER_IE;        /* Must always set this bit to enable ints! */
20502 -               edge_port->chaseResponsePending = FALSE;
20503 +       }
20504 +       
20505 +       /* initialize our wait queues */
20506 +       init_waitqueue_head(&edge_port->wait_open);
20507 +       init_waitqueue_head(&edge_port->wait_chase);
20508 +       init_waitqueue_head(&edge_port->delta_msr_wait);
20509 +       init_waitqueue_head(&edge_port->wait_command);
20510 +
20511 +       /* initialize our icount structure */
20512 +       memset (&(edge_port->icount), 0x00, sizeof(edge_port->icount));
20513 +
20514 +       /* initialize our port settings */
20515 +       edge_port->txCredits            = 0;                    /* Can't send any data yet */
20516 +       edge_port->shadowMCR            = MCR_MASTER_IE;        /* Must always set this bit to enable ints! */
20517 +       edge_port->chaseResponsePending = FALSE;
20518 +
20519 +       /* send a open port command */
20520 +       edge_port->openPending = TRUE;
20521 +       edge_port->open        = FALSE;
20522 +       response = send_iosp_ext_cmd (edge_port, IOSP_CMD_OPEN_PORT, 0);
20523  
20524 -               /* send a open port command */
20525 -               edge_port->openPending = TRUE;
20526 -               edge_port->open        = FALSE;
20527 -               response = send_iosp_ext_cmd (edge_port, IOSP_CMD_OPEN_PORT, 0);
20528 +       if (response < 0) {
20529 +               err("%s - error sending open port command", __FUNCTION__);
20530 +               edge_port->openPending = FALSE;
20531 +               return -ENODEV;
20532 +       }
20533  
20534 -               if (response < 0) {
20535 -                       err(__FUNCTION__" - error sending open port command");
20536 -                       edge_port->openPending = FALSE;
20537 -                       port->active = 0;
20538 -                       port->open_count = 0;
20539 -                       MOD_DEC_USE_COUNT;
20540 -                       return -ENODEV;
20541 -               }
20542 -
20543 -               /* now wait for the port to be completly opened */
20544 -               timeout = OPEN_TIMEOUT;
20545 -               while (timeout && edge_port->openPending == TRUE) {
20546 -                       timeout = interruptible_sleep_on_timeout (&edge_port->wait_open, timeout);
20547 -               }
20548 -
20549 -               if (edge_port->open == FALSE) {
20550 -                       /* open timed out */
20551 -                       dbg(__FUNCTION__" - open timedout");
20552 -                       edge_port->openPending = FALSE;
20553 -                       port->active = 0;
20554 -                       port->open_count = 0;
20555 -                       MOD_DEC_USE_COUNT;
20556 -                       return -ENODEV;
20557 -               }
20558 -
20559 -               /* create the txfifo */
20560 -               edge_port->txfifo.head  = 0;
20561 -               edge_port->txfifo.tail  = 0;
20562 -               edge_port->txfifo.count = 0;
20563 -               edge_port->txfifo.size  = edge_port->maxTxCredits;
20564 -               edge_port->txfifo.fifo  = kmalloc (edge_port->maxTxCredits, GFP_KERNEL);
20565 -
20566 -               if (!edge_port->txfifo.fifo) {
20567 -                       dbg(__FUNCTION__" - no memory");
20568 -                       edge_close (port, filp);
20569 -                       return -ENOMEM;
20570 -               }
20571 +       /* now wait for the port to be completly opened */
20572 +       timeout = OPEN_TIMEOUT;
20573 +       while (timeout && edge_port->openPending == TRUE) {
20574 +               timeout = interruptible_sleep_on_timeout (&edge_port->wait_open, timeout);
20575 +       }
20576  
20577 -               /* Allocate a URB for the write */
20578 -               edge_port->write_urb = usb_alloc_urb (0);
20579 +       if (edge_port->open == FALSE) {
20580 +               /* open timed out */
20581 +               dbg("%s - open timedout", __FUNCTION__);
20582 +               edge_port->openPending = FALSE;
20583 +               return -ENODEV;
20584 +       }
20585  
20586 -               if (!edge_port->write_urb) {
20587 -                       dbg(__FUNCTION__" - no memory");
20588 -                       edge_close (port, filp);
20589 -                       return -ENOMEM;
20590 -               }
20591 +       /* create the txfifo */
20592 +       edge_port->txfifo.head  = 0;
20593 +       edge_port->txfifo.tail  = 0;
20594 +       edge_port->txfifo.count = 0;
20595 +       edge_port->txfifo.size  = edge_port->maxTxCredits;
20596 +       edge_port->txfifo.fifo  = kmalloc (edge_port->maxTxCredits, GFP_KERNEL);
20597 +
20598 +       if (!edge_port->txfifo.fifo) {
20599 +               dbg("%s - no memory", __FUNCTION__);
20600 +               edge_close (port, filp);
20601 +               return -ENOMEM;
20602 +       }
20603 +
20604 +       /* Allocate a URB for the write */
20605 +       edge_port->write_urb = usb_alloc_urb (0);
20606  
20607 -               dbg(__FUNCTION__"(%d) - Initialize TX fifo to %d bytes", port->number, edge_port->maxTxCredits);
20608 +       if (!edge_port->write_urb) {
20609 +               dbg("%s - no memory", __FUNCTION__);
20610 +               edge_close (port, filp);
20611 +               return -ENOMEM;
20612         }
20613  
20614 -       dbg(__FUNCTION__" exited");
20615 +       dbg("%s(%d) - Initialize TX fifo to %d bytes", __FUNCTION__, port->number, edge_port->maxTxCredits);
20616 +
20617 +       dbg("%s exited", __FUNCTION__);
20618  
20619         return 0;
20620  }
20621 @@ -1142,11 +1127,11 @@
20622  
20623                 // Did we get our Chase response
20624                 if (edge_port->chaseResponsePending == FALSE) {
20625 -                       dbg(__FUNCTION__" - Got Chase Response");
20626 +                       dbg("%s - Got Chase Response", __FUNCTION__);
20627  
20628                         // did we get all of our credit back?
20629                         if (edge_port->txCredits == edge_port->maxTxCredits ) {
20630 -                               dbg(__FUNCTION__" - Got all credits");
20631 +                               dbg("%s - Got all credits", __FUNCTION__);
20632                                 return;
20633                         }
20634                 }
20635 @@ -1159,12 +1144,12 @@
20636                         wait--;
20637                         if (wait == 0) {
20638                                 edge_port->chaseResponsePending = FALSE;
20639 -                               dbg(__FUNCTION__" - Chase TIMEOUT");
20640 +                               dbg("%s - Chase TIMEOUT", __FUNCTION__);
20641                                 return;
20642                         }
20643                 } else {
20644                         // Reset timout value back to 10 seconds
20645 -                       dbg(__FUNCTION__" - Last %d, Current %d", lastCredits, edge_port->txCredits);
20646 +                       dbg("%s - Last %d, Current %d", __FUNCTION__, lastCredits, edge_port->txCredits);
20647                         wait = 10;
20648                 }
20649         }
20650 @@ -1194,20 +1179,20 @@
20651  
20652                 // Is the Edgeport Buffer empty?
20653                 if (lastCount == 0) {
20654 -                       dbg(__FUNCTION__" - TX Buffer Empty");
20655 +                       dbg("%s - TX Buffer Empty", __FUNCTION__);
20656                         return;
20657                 }
20658  
20659                 // Block the thread for a while
20660                 interruptible_sleep_on_timeout (&edge_port->wait_chase, timeout);
20661  
20662 -               dbg(__FUNCTION__ " wait");
20663 +               dbg("%s wait", __FUNCTION__);
20664  
20665                 if (lastCount == fifo->count) {
20666                         // No activity.. count down.
20667                         wait--;
20668                         if (wait == 0) {
20669 -                               dbg(__FUNCTION__" - TIMEOUT");
20670 +                               dbg("%s - TIMEOUT", __FUNCTION__);
20671                                 return;
20672                         }
20673                 } else {
20674 @@ -1232,7 +1217,7 @@
20675         if (port_paranoia_check (port, __FUNCTION__))
20676                 return;
20677         
20678 -       dbg(__FUNCTION__ " - port %d", port->number);
20679 +       dbg("%s - port %d", __FUNCTION__, port->number);
20680                          
20681         serial = get_usb_serial (port, __FUNCTION__);
20682         if (!serial)
20683 @@ -1243,57 +1228,50 @@
20684         if ((edge_serial == NULL) || (edge_port == NULL))
20685                 return;
20686         
20687 -       --port->open_count;
20688 +       if (serial->dev) {
20689 +               // block until tx is empty
20690 +               block_until_tx_empty(edge_port);
20691 +
20692 +               edge_port->closePending = TRUE;
20693 +
20694 +               /* flush and chase */
20695 +               edge_port->chaseResponsePending = TRUE;
20696 +
20697 +               dbg("%s - Sending IOSP_CMD_CHASE_PORT", __FUNCTION__);
20698 +               status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0);
20699 +               if (status == 0) {
20700 +                       // block until chase finished
20701 +                       block_until_chase_response(edge_port);
20702 +               } else {
20703 +                       edge_port->chaseResponsePending = FALSE;
20704 +               }
20705  
20706 -       if (port->open_count <= 0) {
20707 -               if (serial->dev) {
20708 -                       // block until tx is empty
20709 -                       block_until_tx_empty(edge_port);
20710 -
20711 -                       edge_port->closePending = TRUE;
20712 -
20713 -                       /* flush and chase */
20714 -                       edge_port->chaseResponsePending = TRUE;
20715 -
20716 -                       dbg(__FUNCTION__" - Sending IOSP_CMD_CHASE_PORT");
20717 -                       status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0);
20718 -                       if (status == 0) {
20719 -                               // block until chase finished
20720 -                               block_until_chase_response(edge_port);
20721 -                       } else {
20722 -                               edge_port->chaseResponsePending = FALSE;
20723 -                       }
20724 +               /* close the port */
20725 +               dbg("%s - Sending IOSP_CMD_CLOSE_PORT", __FUNCTION__);
20726 +               send_iosp_ext_cmd (edge_port, IOSP_CMD_CLOSE_PORT, 0);
20727  
20728 -                       /* close the port */
20729 -                       dbg(__FUNCTION__" - Sending IOSP_CMD_CLOSE_PORT");
20730 -                       send_iosp_ext_cmd (edge_port, IOSP_CMD_CLOSE_PORT, 0);
20731 -
20732 -                       //port->close = TRUE;
20733 -                       edge_port->closePending = FALSE;
20734 -                       edge_port->open = FALSE;
20735 -                       edge_port->openPending = FALSE;
20736 +               //port->close = TRUE;
20737 +               edge_port->closePending = FALSE;
20738 +               edge_port->open = FALSE;
20739 +               edge_port->openPending = FALSE;
20740  
20741 -                       if (edge_port->write_urb) {
20742 -                               usb_unlink_urb (edge_port->write_urb);
20743 -                       }
20744 -               }
20745 -       
20746                 if (edge_port->write_urb) {
20747 -                       /* if this urb had a transfer buffer already (old transfer) free it */
20748 -                       if (edge_port->write_urb->transfer_buffer != NULL) {
20749 -                               kfree(edge_port->write_urb->transfer_buffer);
20750 -                       }
20751 -                       usb_free_urb   (edge_port->write_urb);
20752 +                       usb_unlink_urb (edge_port->write_urb);
20753                 }
20754 -               if (edge_port->txfifo.fifo) {
20755 -                       kfree(edge_port->txfifo.fifo);
20756 +       }
20757 +
20758 +       if (edge_port->write_urb) {
20759 +               /* if this urb had a transfer buffer already (old transfer) free it */
20760 +               if (edge_port->write_urb->transfer_buffer != NULL) {
20761 +                       kfree(edge_port->write_urb->transfer_buffer);
20762                 }
20763 -               port->active = 0;
20764 -               port->open_count = 0;
20765 +               usb_free_urb   (edge_port->write_urb);
20766 +       }
20767 +       if (edge_port->txfifo.fifo) {
20768 +               kfree(edge_port->txfifo.fifo);
20769         }
20770  
20771 -       MOD_DEC_USE_COUNT;
20772 -       dbg(__FUNCTION__" exited");
20773 +       dbg("%s exited", __FUNCTION__);
20774  }   
20775  
20776  /*****************************************************************************
20777 @@ -1312,7 +1290,7 @@
20778         int firsthalf;
20779         int secondhalf;
20780  
20781 -       dbg(__FUNCTION__ " - port %d", port->number);
20782 +       dbg("%s - port %d", __FUNCTION__, port->number);
20783  
20784         if (edge_port == NULL)
20785                 return -ENODEV;
20786 @@ -1323,12 +1301,12 @@
20787         // calculate number of bytes to put in fifo
20788         copySize = min ((unsigned int)count, (edge_port->txCredits - fifo->count));
20789  
20790 -       dbg(__FUNCTION__"(%d) of %d byte(s) Fifo room  %d -- will copy %d bytes", 
20791 +       dbg("%s(%d) of %d byte(s) Fifo room  %d -- will copy %d bytes", __FUNCTION__, 
20792             port->number, count, edge_port->txCredits - fifo->count, copySize);
20793  
20794         /* catch writes of 0 bytes which the tty driver likes to give us, and when txCredits is empty */
20795         if (copySize == 0) {
20796 -               dbg (__FUNCTION__" - copySize = Zero");
20797 +               dbg("%s - copySize = Zero", __FUNCTION__);
20798                 return 0;
20799         }
20800  
20801 @@ -1340,7 +1318,7 @@
20802  
20803         bytesleft = fifo->size - fifo->head;
20804         firsthalf = min (bytesleft, copySize);
20805 -       dbg (__FUNCTION__" - copy %d bytes of %d into fifo ", firsthalf, bytesleft);
20806 +       dbg("%s - copy %d bytes of %d into fifo ", __FUNCTION__, firsthalf, bytesleft);
20807  
20808         /* now copy our data */
20809         if (from_user) {
20810 @@ -1362,7 +1340,7 @@
20811         secondhalf = copySize-firsthalf;
20812  
20813         if (secondhalf) {
20814 -               dbg (__FUNCTION__" - copy rest of data %d", secondhalf);
20815 +               dbg("%s - copy rest of data %d", __FUNCTION__, secondhalf);
20816                 if (from_user) {
20817                         if (copy_from_user(&fifo->fifo[fifo->head], &data[firsthalf], secondhalf))
20818                                 return -EFAULT;
20819 @@ -1381,7 +1359,7 @@
20820  
20821         send_more_port_data((struct edgeport_serial *)port->serial->private, edge_port);
20822  
20823 -       dbg(__FUNCTION__" wrote %d byte(s) TxCredits %d, Fifo %d", copySize, edge_port->txCredits, fifo->count);
20824 +       dbg("%s wrote %d byte(s) TxCredits %d, Fifo %d", __FUNCTION__, copySize, edge_port->txCredits, fifo->count);
20825  
20826         return copySize;   
20827  }
20828 @@ -1411,12 +1389,12 @@
20829         int             firsthalf;
20830         int             secondhalf;
20831  
20832 -       dbg(__FUNCTION__"(%d)", edge_port->port->number);
20833 +       dbg("%s(%d)", __FUNCTION__, edge_port->port->number);
20834  
20835         if (edge_port->write_in_progress ||
20836             !edge_port->open             ||
20837             (fifo->count == 0)) {
20838 -               dbg(__FUNCTION__"(%d) EXIT - fifo %d, PendingWrite = %d", edge_port->port->number, fifo->count, edge_port->write_in_progress);
20839 +               dbg("%s(%d) EXIT - fifo %d, PendingWrite = %d", __FUNCTION__, edge_port->port->number, fifo->count, edge_port->write_in_progress);
20840                 return;
20841         }
20842  
20843 @@ -1428,7 +1406,7 @@
20844         //      it's better to wait for more credits so we can do a larger
20845         //      write.
20846         if (edge_port->txCredits < EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(edge_port->maxTxCredits)) {
20847 -               dbg(__FUNCTION__"(%d) Not enough credit - fifo %d TxCredit %d", edge_port->port->number, fifo->count, edge_port->txCredits );
20848 +               dbg("%s(%d) Not enough credit - fifo %d TxCredit %d", __FUNCTION__, edge_port->port->number, fifo->count, edge_port->txCredits );
20849                 return;
20850         }
20851  
20852 @@ -1446,9 +1424,9 @@
20853  
20854         /* build the data header for the buffer and port that we are about to send out */
20855         count = fifo->count;
20856 -       buffer = kmalloc (count+2, GFP_KERNEL);
20857 +       buffer = kmalloc (count+2, GFP_ATOMIC);
20858         if (buffer == NULL) {
20859 -               err(__FUNCTION__" - no more kernel memory...");
20860 +               err("%s - no more kernel memory...", __FUNCTION__);
20861                 edge_port->write_in_progress = FALSE;
20862                 return;
20863         }
20864 @@ -1488,14 +1466,14 @@
20865         status = usb_submit_urb(urb);
20866         if (status) {
20867                 /* something went wrong */
20868 -               dbg(__FUNCTION__" - usb_submit_urb(write bulk) failed");
20869 +               dbg("%s - usb_submit_urb(write bulk) failed", __FUNCTION__);
20870                 edge_port->write_in_progress = FALSE;
20871         } else {
20872                 /* decrement the number of credits we have by the number we just sent */
20873                 edge_port->txCredits -= count;
20874                 edge_port->icount.tx += count;
20875         }
20876 -       dbg(__FUNCTION__" wrote %d byte(s) TxCredit %d, Fifo %d", count, edge_port->txCredits, fifo->count);
20877 +       dbg("%s wrote %d byte(s) TxCredit %d, Fifo %d", __FUNCTION__, count, edge_port->txCredits, fifo->count);
20878  }
20879  
20880  
20881 @@ -1512,24 +1490,24 @@
20882         struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
20883         int room;
20884  
20885 -       dbg(__FUNCTION__);
20886 +       dbg("%s", __FUNCTION__);
20887  
20888         if (edge_port == NULL)
20889                 return -ENODEV;
20890         if (edge_port->closePending == TRUE)
20891                 return -ENODEV;
20892  
20893 -       dbg(__FUNCTION__" - port %d", port->number);
20894 +       dbg("%s - port %d", __FUNCTION__, port->number);
20895  
20896         if (!edge_port->open) {
20897 -               dbg (__FUNCTION__" - port not opened");
20898 +               dbg("%s - port not opened", __FUNCTION__);
20899                 return -EINVAL;
20900         }
20901  
20902         // total of both buffers is still txCredit
20903         room = edge_port->txCredits - edge_port->txfifo.count;
20904  
20905 -       dbg(__FUNCTION__" - returns %d", room);
20906 +       dbg("%s - returns %d", __FUNCTION__, room);
20907         return room;
20908  }
20909  
20910 @@ -1548,7 +1526,7 @@
20911         struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
20912         int num_chars;
20913  
20914 -       dbg(__FUNCTION__);
20915 +       dbg("%s", __FUNCTION__);
20916  
20917         if (edge_port == NULL)
20918                 return -ENODEV;
20919 @@ -1556,13 +1534,13 @@
20920                 return -ENODEV;
20921  
20922         if (!edge_port->open) {
20923 -               dbg (__FUNCTION__" - port not opened");
20924 +               dbg("%s - port not opened", __FUNCTION__);
20925                 return -EINVAL;
20926         }
20927  
20928         num_chars = edge_port->maxTxCredits - edge_port->txCredits + edge_port->txfifo.count;
20929         if (num_chars) {
20930 -               dbg(__FUNCTION__"(port %d) - returns %d", port->number, num_chars);
20931 +               dbg("%s(port %d) - returns %d", __FUNCTION__, port->number, num_chars);
20932         }
20933  
20934         return num_chars;
20935 @@ -1580,17 +1558,21 @@
20936         struct tty_struct *tty;
20937         int status;
20938  
20939 -       dbg(__FUNCTION__" - port %d", port->number);
20940 +       dbg("%s - port %d", __FUNCTION__, port->number);
20941  
20942         if (edge_port == NULL)
20943                 return;
20944  
20945         if (!edge_port->open) {
20946 -               dbg (__FUNCTION__" - port not opened");
20947 +               dbg("%s - port not opened", __FUNCTION__);
20948                 return;
20949         }
20950  
20951         tty = port->tty;
20952 +       if (!tty) {
20953 +               dbg ("%s - no tty available", __FUNCTION__);
20954 +               return;
20955 +       }
20956  
20957         /* if we are implementing XON/XOFF, send the stop character */
20958         if (I_IXOFF(tty)) {
20959 @@ -1625,17 +1607,21 @@
20960         struct tty_struct *tty;
20961         int status;
20962  
20963 -       dbg(__FUNCTION__" - port %d", port->number);
20964 +       dbg("%s - port %d", __FUNCTION__, port->number);
20965  
20966         if (edge_port == NULL)
20967                 return;
20968  
20969         if (!edge_port->open) {
20970 -               dbg (__FUNCTION__" - port not opened");
20971 +               dbg("%s - port not opened", __FUNCTION__);
20972                 return;
20973         }
20974  
20975         tty = port->tty;
20976 +       if (!tty) {
20977 +               dbg ("%s - no tty available", __FUNCTION__);
20978 +               return;
20979 +       }
20980  
20981         /* if we are implementing XON/XOFF, send the start character */
20982         if (I_IXOFF(tty)) {
20983 @@ -1667,31 +1653,39 @@
20984  {
20985         struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
20986         struct tty_struct *tty = port->tty;
20987 -       unsigned int cflag = tty->termios->c_cflag;
20988 +       unsigned int cflag;
20989  
20990 -       dbg(__FUNCTION__" - clfag %08x %08x iflag %08x %08x", 
20991 -           tty->termios->c_cflag,
20992 -           old_termios->c_cflag,
20993 -           RELEVANT_IFLAG(tty->termios->c_iflag),
20994 -           RELEVANT_IFLAG(old_termios->c_iflag)
20995 -          );
20996 +       if (!port->tty || !port->tty->termios) {
20997 +               dbg ("%s - no tty or termios", __FUNCTION__);
20998 +               return;
20999 +       }
21000  
21001 +       cflag = tty->termios->c_cflag;
21002         /* check that they really want us to change something */
21003         if (old_termios) {
21004                 if ((cflag == old_termios->c_cflag) &&
21005                     (RELEVANT_IFLAG(tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
21006 -                       dbg(__FUNCTION__" - nothing to change");
21007 +                       dbg("%s - nothing to change", __FUNCTION__);
21008                         return;
21009                 }
21010         }
21011  
21012 -       dbg(__FUNCTION__" - port %d", port->number);
21013 +       dbg("%s - clfag %08x iflag %08x", __FUNCTION__, 
21014 +           tty->termios->c_cflag,
21015 +           RELEVANT_IFLAG(tty->termios->c_iflag));
21016 +       if (old_termios) {
21017 +               dbg("%s - old clfag %08x old iflag %08x", __FUNCTION__,
21018 +                   old_termios->c_cflag,
21019 +                   RELEVANT_IFLAG(old_termios->c_iflag));
21020 +       }
21021 +
21022 +       dbg("%s - port %d", __FUNCTION__, port->number);
21023  
21024         if (edge_port == NULL)
21025                 return;
21026  
21027         if (!edge_port->open) {
21028 -               dbg (__FUNCTION__" - port not opened");
21029 +               dbg("%s - port not opened", __FUNCTION__);
21030                 return;
21031         }
21032  
21033 @@ -1718,7 +1712,7 @@
21034  
21035         if (edge_port->maxTxCredits == edge_port->txCredits &&
21036             edge_port->txfifo.count == 0) {
21037 -               dbg(__FUNCTION__" -- Empty");
21038 +               dbg("%s -- Empty", __FUNCTION__);
21039                 result = TIOCSER_TEMT;
21040         }
21041  
21042 @@ -1732,9 +1726,12 @@
21043         unsigned int result = 0;
21044         struct tty_struct *tty = edge_port->port->tty;
21045  
21046 +       if (!tty)
21047 +               return -ENOIOCTLCMD;
21048 +
21049         result = tty->read_cnt;
21050  
21051 -       dbg(__FUNCTION__"(%d) = %d",  edge_port->port->number, result);
21052 +       dbg("%s(%d) = %d", __FUNCTION__,  edge_port->port->number, result);
21053         if (copy_to_user(value, &result, sizeof(int)))
21054                 return -EFAULT;
21055         //return 0;
21056 @@ -1799,7 +1796,7 @@
21057                   | ((msr & MSR_DSR)    ? TIOCM_DSR: 0);  /* 0x100 */
21058  
21059  
21060 -       dbg(__FUNCTION__" -- %x", result);
21061 +       dbg("%s -- %x", __FUNCTION__, result);
21062  
21063         if (copy_to_user(value, &result, sizeof(int)))
21064                 return -EFAULT;
21065 @@ -1850,40 +1847,40 @@
21066         struct serial_icounter_struct icount;
21067  
21068  
21069 -       dbg(__FUNCTION__" - port %d, cmd = 0x%x", port->number, cmd);
21070 +       dbg("%s - port %d, cmd = 0x%x", __FUNCTION__, port->number, cmd);
21071  
21072         switch (cmd) {
21073                 // return number of bytes available
21074                 case TIOCINQ:
21075 -                       dbg(__FUNCTION__" (%d) TIOCINQ",  port->number);
21076 +                       dbg("%s (%d) TIOCINQ", __FUNCTION__,  port->number);
21077                         return get_number_bytes_avail(edge_port, (unsigned int *) arg);
21078                         break;
21079  
21080                 case TIOCSERGETLSR:
21081 -                       dbg(__FUNCTION__" (%d) TIOCSERGETLSR",  port->number);
21082 +                       dbg("%s (%d) TIOCSERGETLSR", __FUNCTION__,  port->number);
21083                         return get_lsr_info(edge_port, (unsigned int *) arg);
21084                         return 0;
21085  
21086                 case TIOCMBIS:
21087                 case TIOCMBIC:
21088                 case TIOCMSET:
21089 -                       dbg(__FUNCTION__" (%d) TIOCMSET/TIOCMBIC/TIOCMSET",  port->number);
21090 +                       dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __FUNCTION__,  port->number);
21091                         return set_modem_info(edge_port, cmd, (unsigned int *) arg);
21092  
21093                 case TIOCMGET:  
21094 -                       dbg(__FUNCTION__" (%d) TIOCMGET",  port->number);
21095 +                       dbg("%s (%d) TIOCMGET", __FUNCTION__,  port->number);
21096                         return get_modem_info(edge_port, (unsigned int *) arg);
21097  
21098                 case TIOCGSERIAL:
21099 -                       dbg(__FUNCTION__" (%d) TIOCGSERIAL",  port->number);
21100 +                       dbg("%s (%d) TIOCGSERIAL", __FUNCTION__,  port->number);
21101                         return get_serial_info(edge_port, (struct serial_struct *) arg);
21102  
21103                 case TIOCSSERIAL:
21104 -                       dbg(__FUNCTION__" (%d) TIOCSSERIAL",  port->number);
21105 +                       dbg("%s (%d) TIOCSSERIAL", __FUNCTION__,  port->number);
21106                         break;
21107  
21108                 case TIOCMIWAIT:
21109 -                       dbg(__FUNCTION__" (%d) TIOCMIWAIT",  port->number);
21110 +                       dbg("%s (%d) TIOCMIWAIT", __FUNCTION__,  port->number);
21111                         cprev = edge_port->icount;
21112                         while (1) {
21113                                 interruptible_sleep_on(&edge_port->delta_msr_wait);
21114 @@ -1919,7 +1916,7 @@
21115                         icount.brk = cnow.brk;
21116                         icount.buf_overrun = cnow.buf_overrun;
21117  
21118 -                       dbg(__FUNCTION__" (%d) TIOCGICOUNT RX=%d, TX=%d",  port->number, icount.rx, icount.tx );
21119 +                       dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__,  port->number, icount.rx, icount.tx );
21120                         if (copy_to_user((void *)arg, &icount, sizeof(icount)))
21121                                 return -EFAULT;
21122                         return 0;
21123 @@ -1941,7 +1938,7 @@
21124         /* flush and chase */
21125         edge_port->chaseResponsePending = TRUE;
21126  
21127 -       dbg(__FUNCTION__" - Sending IOSP_CMD_CHASE_PORT");
21128 +       dbg("%s - Sending IOSP_CMD_CHASE_PORT", __FUNCTION__);
21129         status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0);
21130         if (status == 0) {
21131                 // block until chase finished
21132 @@ -1951,14 +1948,14 @@
21133         }
21134  
21135         if (break_state == -1) {
21136 -               dbg(__FUNCTION__" - Sending IOSP_CMD_SET_BREAK");
21137 +               dbg("%s - Sending IOSP_CMD_SET_BREAK", __FUNCTION__);
21138                 status = send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_BREAK, 0);
21139         } else {
21140 -               dbg(__FUNCTION__" - Sending IOSP_CMD_CLEAR_BREAK");
21141 +               dbg("%s - Sending IOSP_CMD_CLEAR_BREAK", __FUNCTION__);
21142                 status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CLEAR_BREAK, 0);
21143         }
21144         if (status) {
21145 -               dbg(__FUNCTION__" - error sending break set/clear command.");
21146 +               dbg("%s - error sending break set/clear command.", __FUNCTION__);
21147         }
21148  
21149         return;
21150 @@ -1978,14 +1975,14 @@
21151         __u16 rxLen;
21152         int i;
21153  
21154 -       dbg(__FUNCTION__);
21155 +       dbg("%s", __FUNCTION__);
21156  
21157         lastBufferLength = bufferLength + 1;
21158  
21159         while (bufferLength > 0) {
21160                 /* failsafe incase we get a message that we don't understand */
21161                 if (lastBufferLength == bufferLength) {
21162 -                       dbg(__FUNCTION__" - stuck in loop, exiting it.");
21163 +                       dbg("%s - stuck in loop, exiting it.", __FUNCTION__);
21164                         break;
21165                 }
21166                 lastBufferLength = bufferLength;
21167 @@ -2007,7 +2004,7 @@
21168                                 ++buffer;
21169                                 --bufferLength;
21170  
21171 -                               dbg(__FUNCTION__" - Hdr1=%02X Hdr2=%02X", edge_serial->rxHeader1, edge_serial->rxHeader2);
21172 +                               dbg("%s - Hdr1=%02X Hdr2=%02X", __FUNCTION__, edge_serial->rxHeader1, edge_serial->rxHeader2);
21173  
21174                                 // Process depending on whether this header is
21175                                 // data or status
21176 @@ -2038,7 +2035,7 @@
21177                                         edge_serial->rxPort = IOSP_GET_HDR_PORT(edge_serial->rxHeader1);
21178                                         edge_serial->rxBytesRemaining = IOSP_GET_HDR_DATA_LEN(edge_serial->rxHeader1, edge_serial->rxHeader2);
21179  
21180 -                                       dbg(__FUNCTION__" - Data for Port %u Len %u", edge_serial->rxPort, edge_serial->rxBytesRemaining);
21181 +                                       dbg("%s - Data for Port %u Len %u", __FUNCTION__, edge_serial->rxPort, edge_serial->rxBytesRemaining);
21182  
21183                                         //ASSERT( DevExt->RxPort < DevExt->NumPorts );
21184                                         //ASSERT( DevExt->RxBytesRemaining < IOSP_MAX_DATA_LENGTH );
21185 @@ -2072,7 +2069,7 @@
21186                                                 if (edge_port->open) {
21187                                                         tty = edge_port->port->tty;
21188                                                         if (tty) {
21189 -                                                               dbg (__FUNCTION__" - Sending %d bytes to TTY for port %d", rxLen, edge_serial->rxPort);
21190 +                                                               dbg("%s - Sending %d bytes to TTY for port %d", __FUNCTION__, rxLen, edge_serial->rxPort);
21191                                                                 for (i = 0; i < rxLen ; ++i) {
21192                                                                         /* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */
21193                                                                         if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
21194 @@ -2125,17 +2122,17 @@
21195         }
21196         edge_port = (struct edgeport_port *)port->private;
21197         if (edge_port == NULL) {
21198 -               err (__FUNCTION__ " - edge_port == NULL for port %d", edge_serial->rxPort);
21199 +               err("%s - edge_port == NULL for port %d", __FUNCTION__, edge_serial->rxPort);
21200                 return;
21201         }
21202  
21203 -       dbg(__FUNCTION__" - port %d", edge_serial->rxPort);
21204 +       dbg("%s - port %d", __FUNCTION__, edge_serial->rxPort);
21205  
21206         if (code == IOSP_EXT_STATUS) {
21207                 switch (byte2) {
21208                         case IOSP_EXT_STATUS_CHASE_RSP:
21209                                 // we want to do EXT status regardless of port open/closed 
21210 -                               dbg(__FUNCTION__" - Port %u EXT CHASE_RSP Data = %02x", edge_serial->rxPort, byte3 );
21211 +                               dbg("%s - Port %u EXT CHASE_RSP Data = %02x", __FUNCTION__, edge_serial->rxPort, byte3 );
21212                                 // Currently, the only EXT_STATUS is Chase, so process here instead of one more call
21213                                 // to one more subroutine. If/when more EXT_STATUS, there'll be more work to do.
21214                                 // Also, we currently clear flag and close the port regardless of content of above's Byte3.
21215 @@ -2146,7 +2143,7 @@
21216                                 return;
21217  
21218                         case IOSP_EXT_STATUS_RX_CHECK_RSP:
21219 -                               dbg( __FUNCTION__" ========== Port %u CHECK_RSP Sequence = %02x =============\n", edge_serial->rxPort, byte3 );
21220 +                               dbg("%s ========== Port %u CHECK_RSP Sequence = %02x =============\n", __FUNCTION__, edge_serial->rxPort, byte3 );
21221                                 //Port->RxCheckRsp = TRUE;
21222                                 return;
21223                 }
21224 @@ -2155,11 +2152,12 @@
21225         if (code == IOSP_STATUS_OPEN_RSP) {
21226                 edge_port->txCredits = GET_TX_BUFFER_SIZE(byte3);
21227                 edge_port->maxTxCredits = edge_port->txCredits;
21228 -               dbg (__FUNCTION__" - Port %u Open Response Inital MSR = %02x TxBufferSize = %d", edge_serial->rxPort, byte2, edge_port->txCredits);
21229 +               dbg("%s - Port %u Open Response Inital MSR = %02x TxBufferSize = %d", __FUNCTION__, edge_serial->rxPort, byte2, edge_port->txCredits);
21230                 handle_new_msr (edge_port, byte2);
21231  
21232                 /* send the current line settings to the port so we are in sync with any further termios calls */
21233 -               change_port_settings (edge_port, edge_port->port->tty->termios);
21234 +               if (edge_port->port->tty)
21235 +                       change_port_settings (edge_port, edge_port->port->tty->termios);
21236  
21237                 /* we have completed the open */
21238                 edge_port->openPending = FALSE;
21239 @@ -2178,23 +2176,23 @@
21240         switch (code) {
21241                 // Not currently sent by Edgeport
21242                 case IOSP_STATUS_LSR:
21243 -                       dbg(__FUNCTION__" - Port %u LSR Status = %02x", edge_serial->rxPort, byte2);
21244 +                       dbg("%s - Port %u LSR Status = %02x", __FUNCTION__, edge_serial->rxPort, byte2);
21245                         handle_new_lsr (edge_port, FALSE, byte2, 0);
21246                         break;
21247  
21248                 case IOSP_STATUS_LSR_DATA:
21249 -                       dbg(__FUNCTION__" - Port %u LSR Status = %02x, Data = %02x", edge_serial->rxPort, byte2, byte3);
21250 +                       dbg("%s - Port %u LSR Status = %02x, Data = %02x", __FUNCTION__, edge_serial->rxPort, byte2, byte3);
21251                         // byte2 is LSR Register
21252                         // byte3 is broken data byte
21253                         handle_new_lsr (edge_port, TRUE, byte2, byte3);
21254                         break;
21255                         //
21256                         //      case IOSP_EXT_4_STATUS:
21257 -                       //              dbg(__FUNCTION__" - Port %u LSR Status = %02x Data = %02x", edge_serial->rxPort, byte2, byte3);
21258 +                       //              dbg("%s - Port %u LSR Status = %02x Data = %02x", __FUNCTION__, edge_serial->rxPort, byte2, byte3);
21259                         //              break;
21260                         //
21261                 case IOSP_STATUS_MSR:
21262 -                       dbg(__FUNCTION__" - Port %u MSR Status = %02x", edge_serial->rxPort, byte2);
21263 +                       dbg("%s - Port %u MSR Status = %02x", __FUNCTION__, edge_serial->rxPort, byte2);
21264  
21265                         // Process this new modem status and generate appropriate
21266                         // events, etc, based on the new status. This routine
21267 @@ -2203,7 +2201,7 @@
21268                         break;
21269  
21270                 default:
21271 -                       dbg(__FUNCTION__" - Unrecognized IOSP status code %u\n", code);
21272 +                       dbg("%s - Unrecognized IOSP status code %u\n", __FUNCTION__, code);
21273                         break;
21274         }
21275  
21276 @@ -2219,7 +2217,7 @@
21277  {
21278         struct  async_icount *icount;
21279  
21280 -       dbg(__FUNCTION__" %02x", newMsr);
21281 +       dbg("%s %02x", __FUNCTION__, newMsr);
21282  
21283         if (newMsr & (MSR_DELTA_CTS | MSR_DELTA_DSR | MSR_DELTA_RI | MSR_DELTA_CD)) {
21284                 icount = &edge_port->icount;
21285 @@ -2256,7 +2254,7 @@
21286         __u8    newLsr = (__u8)(lsr & (__u8)(LSR_OVER_ERR | LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK));
21287         struct  async_icount *icount;
21288  
21289 -       dbg(__FUNCTION__" - %02x", newLsr);
21290 +       dbg("%s - %02x", __FUNCTION__, newLsr);
21291  
21292         edge_port->shadowLSR = lsr;
21293  
21294 @@ -2270,7 +2268,7 @@
21295         }
21296  
21297         /* Place LSR data byte into Rx buffer */
21298 -       if (lsrData) {
21299 +       if (lsrData && edge_port->port->tty) {
21300                 tty_insert_flip_char(edge_port->port->tty, data, 0);
21301                 tty_flip_buffer_push(edge_port->port->tty);
21302         }
21303 @@ -2307,11 +2305,11 @@
21304         __u16 current_length;
21305         unsigned char *transfer_buffer;
21306  
21307 -//     dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, length);
21308 +//     dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, length);
21309  
21310         transfer_buffer =  kmalloc (64, GFP_KERNEL);
21311         if (!transfer_buffer) {
21312 -               err(__FUNCTION__" - kmalloc(%d) failed.\n", 64);
21313 +               err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
21314                 return -ENOMEM;
21315         }
21316  
21317 @@ -2323,7 +2321,7 @@
21318                 } else {
21319                         current_length = length;
21320                 }
21321 -//             dbg (__FUNCTION__" - writing %x, %x, %d", extAddr, addr, current_length);
21322 +//             dbg("%s - writing %x, %x, %d", __FUNCTION__, extAddr, addr, current_length);
21323                 memcpy (transfer_buffer, data, current_length);
21324                 result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), USB_REQUEST_ION_WRITE_RAM, 
21325                                           0x40, addr, extAddr, transfer_buffer, current_length, 300);
21326 @@ -2352,11 +2350,11 @@
21327         __u16 current_length;
21328         unsigned char *transfer_buffer;
21329  
21330 -//     dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, length);
21331 +//     dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, length);
21332  
21333         transfer_buffer =  kmalloc (64, GFP_KERNEL);
21334         if (!transfer_buffer) {
21335 -               err(__FUNCTION__" - kmalloc(%d) failed.\n", 64);
21336 +               err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
21337                 return -ENOMEM;
21338         }
21339  
21340 @@ -2368,7 +2366,7 @@
21341                 } else {
21342                         current_length = length;
21343                 }
21344 -//             dbg (__FUNCTION__" - writing %x, %x, %d", extAddr, addr, current_length);
21345 +//             dbg("%s - writing %x, %x, %d", __FUNCTION__, extAddr, addr, current_length);
21346                 memcpy (transfer_buffer, data, current_length);
21347                 result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), USB_REQUEST_ION_WRITE_ROM, 
21348                                           0x40, addr, extAddr, transfer_buffer, current_length, 300);
21349 @@ -2397,11 +2395,11 @@
21350         __u16 current_length;
21351         unsigned char *transfer_buffer;
21352  
21353 -       dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, length);
21354 +       dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, length);
21355  
21356         transfer_buffer =  kmalloc (64, GFP_KERNEL);
21357         if (!transfer_buffer) {
21358 -               err(__FUNCTION__" - kmalloc(%d) failed.\n", 64);
21359 +               err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
21360                 return -ENOMEM;
21361         }
21362  
21363 @@ -2413,7 +2411,7 @@
21364                 } else {
21365                         current_length = length;
21366                 }
21367 -//             dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, current_length);
21368 +//             dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, current_length);
21369                 result = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), USB_REQUEST_ION_READ_ROM, 
21370                                           0xC0, addr, extAddr, transfer_buffer, current_length, 300);
21371                 if (result < 0)
21372 @@ -2440,11 +2438,11 @@
21373         int             length = 0;
21374         int             status = 0;
21375  
21376 -       dbg(__FUNCTION__" - %d, %d", command, param);
21377 +       dbg("%s - %d, %d", __FUNCTION__, command, param);
21378  
21379 -       buffer =  kmalloc (10, GFP_KERNEL);
21380 +       buffer =  kmalloc (10, GFP_ATOMIC);
21381         if (!buffer) {
21382 -               err(__FUNCTION__" - kmalloc(%d) failed.\n", 10);
21383 +               err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 10);
21384                 return -ENOMEM;
21385         }
21386  
21387 @@ -2472,7 +2470,7 @@
21388  {
21389         struct edgeport_serial *edge_serial = (struct edgeport_serial *)edge_port->port->serial->private;
21390         int status = 0;
21391 -       urb_t *urb;
21392 +       struct urb *urb;
21393         int timeout;
21394  
21395         usb_serial_debug_data (__FILE__, __FUNCTION__, length, buffer);
21396 @@ -2483,7 +2481,7 @@
21397                 return -ENOMEM;
21398  
21399         CmdUrbs++;
21400 -       dbg(__FUNCTION__" - ALLOCATE URB %p (outstanding %d)", urb, CmdUrbs);
21401 +       dbg("%s - ALLOCATE URB %p (outstanding %d)", __FUNCTION__, urb, CmdUrbs);
21402  
21403         FILL_BULK_URB (urb, edge_serial->serial->dev, 
21404                        usb_sndbulkpipe(edge_serial->serial->dev, edge_serial->bulk_out_endpoint),
21405 @@ -2497,7 +2495,7 @@
21406  
21407         if (status) {
21408                 /* something went wrong */
21409 -               dbg(__FUNCTION__" - usb_submit_urb(write bulk) failed");
21410 +               dbg("%s - usb_submit_urb(write bulk) failed", __FUNCTION__);
21411                 usb_unlink_urb (urb);
21412                 usb_free_urb   (urb);
21413                 return status;
21414 @@ -2512,7 +2510,7 @@
21415  
21416         if (edge_port->commandPending == TRUE) {
21417                 /* command timed out */
21418 -               dbg(__FUNCTION__" - command timed out");
21419 +               dbg("%s - command timed out", __FUNCTION__);
21420                 status = -EINVAL;
21421         }
21422  #endif
21423 @@ -2534,18 +2532,18 @@
21424         int status;
21425         unsigned char number = edge_port->port->number - edge_port->port->serial->minor;
21426  
21427 -       dbg(__FUNCTION__" - port = %d, baud = %d", edge_port->port->number, baudRate);
21428 +       dbg("%s - port = %d, baud = %d", __FUNCTION__, edge_port->port->number, baudRate);
21429  
21430         status = calc_baud_rate_divisor (baudRate, &divisor);
21431         if (status) {
21432 -               err(__FUNCTION__" - bad baud rate");
21433 +               err("%s - bad baud rate", __FUNCTION__);
21434                 return status;
21435         }
21436  
21437         // Alloc memory for the string of commands.
21438 -       cmdBuffer =  kmalloc (0x100, GFP_KERNEL);
21439 +       cmdBuffer =  kmalloc (0x100, GFP_ATOMIC);
21440         if (!cmdBuffer) {
21441 -               err(__FUNCTION__" - kmalloc(%d) failed.\n", 0x100);
21442 +               err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 0x100);
21443                 return -ENOMEM;
21444         }
21445         currCmd = cmdBuffer;
21446 @@ -2583,11 +2581,11 @@
21447         __u16 round;
21448  
21449  
21450 -       dbg(__FUNCTION__" - %d", baudrate);
21451 +       dbg("%s - %d", __FUNCTION__, baudrate);
21452  
21453 -       for (i = 0; i < NUM_ENTRIES(DivisorTable); i++) {
21454 -               if ( DivisorTable[i].BaudRate == baudrate ) {
21455 -                       *divisor = DivisorTable[i].Divisor;
21456 +       for (i = 0; i < NUM_ENTRIES(divisor_table); i++) {
21457 +               if ( divisor_table[i].BaudRate == baudrate ) {
21458 +                       *divisor = divisor_table[i].Divisor;
21459                         return 0;
21460                 }
21461         }
21462 @@ -2607,7 +2605,7 @@
21463                 }
21464                 *divisor = custom;
21465  
21466 -               dbg(__FUNCTION__" - Baud %d = %d\n", baudrate, custom);
21467 +               dbg("%s - Baud %d = %d\n", __FUNCTION__, baudrate, custom);
21468                 return 0;
21469         }
21470  
21471 @@ -2626,10 +2624,10 @@
21472         unsigned long cmdLen = 0;
21473         int status;
21474  
21475 -       dbg (__FUNCTION__" - write to %s register 0x%02x", (regNum == MCR) ? "MCR" : "LCR", regValue);
21476 +       dbg("%s - write to %s register 0x%02x", (regNum == MCR) ? "MCR" : "LCR", __FUNCTION__, regValue);
21477  
21478         // Alloc memory for the string of commands.
21479 -       cmdBuffer = kmalloc (0x10, GFP_KERNEL);
21480 +       cmdBuffer = kmalloc (0x10, GFP_ATOMIC);
21481         if (cmdBuffer == NULL ) {
21482                 return -ENOMEM;
21483         }
21484 @@ -2669,50 +2667,50 @@
21485         __u8 txFlow;
21486         int status;
21487  
21488 -       dbg(__FUNCTION__" - port %d", edge_port->port->number);
21489 +       dbg("%s - port %d", __FUNCTION__, edge_port->port->number);
21490  
21491         if ((!edge_port->open) &&
21492             (!edge_port->openPending)) {
21493 -               dbg(__FUNCTION__" - port not opened");
21494 +               dbg("%s - port not opened", __FUNCTION__);
21495                 return;
21496         }
21497  
21498         tty = edge_port->port->tty;
21499         if ((!tty) ||
21500             (!tty->termios)) {
21501 -               dbg(__FUNCTION__" - no tty structures");
21502 +               dbg("%s - no tty structures", __FUNCTION__);
21503                 return;
21504         }
21505  
21506         cflag = tty->termios->c_cflag;
21507  
21508         switch (cflag & CSIZE) {
21509 -               case CS5:   lData = LCR_BITS_5; mask = 0x1f;    dbg(__FUNCTION__" - data bits = 5");   break;
21510 -               case CS6:   lData = LCR_BITS_6; mask = 0x3f;    dbg(__FUNCTION__" - data bits = 6");   break;
21511 -               case CS7:   lData = LCR_BITS_7; mask = 0x7f;    dbg(__FUNCTION__" - data bits = 7");   break;
21512 +               case CS5:   lData = LCR_BITS_5; mask = 0x1f;    dbg("%s - data bits = 5", __FUNCTION__);   break;
21513 +               case CS6:   lData = LCR_BITS_6; mask = 0x3f;    dbg("%s - data bits = 6", __FUNCTION__);   break;
21514 +               case CS7:   lData = LCR_BITS_7; mask = 0x7f;    dbg("%s - data bits = 7", __FUNCTION__);   break;
21515                 default:
21516 -               case CS8:   lData = LCR_BITS_8;                 dbg(__FUNCTION__" - data bits = 8");   break;
21517 +               case CS8:   lData = LCR_BITS_8;                 dbg("%s - data bits = 8", __FUNCTION__);   break;
21518         }
21519  
21520         lParity = LCR_PAR_NONE;
21521         if (cflag & PARENB) {
21522                 if (cflag & PARODD) {
21523                         lParity = LCR_PAR_ODD;
21524 -                       dbg(__FUNCTION__" - parity = odd");
21525 +                       dbg("%s - parity = odd", __FUNCTION__);
21526                 } else {
21527                         lParity = LCR_PAR_EVEN;
21528 -                       dbg(__FUNCTION__" - parity = even");
21529 +                       dbg("%s - parity = even", __FUNCTION__);
21530                 }
21531         } else {
21532 -               dbg(__FUNCTION__" - parity = none");
21533 +               dbg("%s - parity = none", __FUNCTION__);
21534         }
21535  
21536         if (cflag & CSTOPB) {
21537                 lStop = LCR_STOP_2;
21538 -               dbg(__FUNCTION__" - stop bits = 2");
21539 +               dbg("%s - stop bits = 2", __FUNCTION__);
21540         } else {
21541                 lStop = LCR_STOP_1;
21542 -               dbg(__FUNCTION__" - stop bits = 1");
21543 +               dbg("%s - stop bits = 1", __FUNCTION__);
21544         }
21545  
21546         /* figure out the flow control settings */
21547 @@ -2720,9 +2718,9 @@
21548         if (cflag & CRTSCTS) {
21549                 rxFlow |= IOSP_RX_FLOW_RTS;
21550                 txFlow |= IOSP_TX_FLOW_CTS;
21551 -               dbg(__FUNCTION__" - RTS/CTS is enabled");
21552 +               dbg("%s - RTS/CTS is enabled", __FUNCTION__);
21553         } else {
21554 -               dbg(__FUNCTION__" - RTS/CTS is disabled");
21555 +               dbg("%s - RTS/CTS is disabled", __FUNCTION__);
21556         }
21557  
21558         /* if we are implementing XON/XOFF, set the start and stop character in the device */
21559 @@ -2736,17 +2734,17 @@
21560                 /* if we are implementing INBOUND XON/XOFF */
21561                 if (I_IXOFF(tty)) {
21562                         rxFlow |= IOSP_RX_FLOW_XON_XOFF;
21563 -                       dbg(__FUNCTION__" - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", start_char, stop_char);
21564 +                       dbg("%s - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", __FUNCTION__, start_char, stop_char);
21565                 } else {
21566 -                       dbg(__FUNCTION__" - INBOUND XON/XOFF is disabled");
21567 +                       dbg("%s - INBOUND XON/XOFF is disabled", __FUNCTION__);
21568                 }
21569  
21570                 /* if we are implementing OUTBOUND XON/XOFF */
21571                 if (I_IXON(tty)) {
21572                         txFlow |= IOSP_TX_FLOW_XON_XOFF;
21573 -                       dbg(__FUNCTION__" - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", start_char, stop_char);
21574 +                       dbg("%s - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", __FUNCTION__, start_char, stop_char);
21575                 } else {
21576 -                       dbg(__FUNCTION__" - OUTBOUND XON/XOFF is disabled");
21577 +                       dbg("%s - OUTBOUND XON/XOFF is disabled", __FUNCTION__);
21578                 }
21579         }
21580  
21581 @@ -2783,7 +2781,7 @@
21582                 baud = 9600;
21583         }
21584  
21585 -       dbg(__FUNCTION__ " - baud rate = %d", baud);
21586 +       dbg("%s - baud rate = %d", __FUNCTION__, baud);
21587         status = send_cmd_write_baud_rate (edge_port, baud);
21588  
21589         return;
21590 @@ -2881,7 +2879,7 @@
21591   ****************************************************************************/
21592  static void load_application_firmware (struct edgeport_serial *edge_serial)
21593  {
21594 -       PEDGE_FIRMWARE_IMAGE_RECORD record;
21595 +       struct edge_firmware_image_record *record;
21596         unsigned char *firmware;
21597         unsigned char *FirmwareImage;
21598         int ImageSize;
21599 @@ -2919,13 +2917,13 @@
21600  
21601  
21602         for (;;) {
21603 -               record = (PEDGE_FIRMWARE_IMAGE_RECORD)firmware;
21604 +               record = (struct edge_firmware_image_record *)firmware;
21605                 response = sram_write (edge_serial->serial, record->ExtAddr, record->Addr, record->Len, &record->Data[0]);
21606                 if (response < 0) {
21607                         err("sram_write failed (%x, %x, %d)", record->ExtAddr, record->Addr, record->Len);
21608                         break;
21609                 }
21610 -               firmware += sizeof (EDGE_FIRMWARE_IMAGE_RECORD) + record->Len;
21611 +               firmware += sizeof (struct edge_firmware_image_record) + record->Len;
21612                 if (firmware >= &FirmwareImage[ImageSize]) {
21613                         break;
21614                 }
21615 @@ -2958,7 +2956,7 @@
21616         /* create our private serial structure */
21617         edge_serial = kmalloc (sizeof(struct edgeport_serial), GFP_KERNEL);
21618         if (edge_serial == NULL) {
21619 -               err(__FUNCTION__" - Out of memory");
21620 +               err("%s - Out of memory", __FUNCTION__);
21621                 return -ENOMEM;
21622         }
21623         memset (edge_serial, 0, sizeof(struct edgeport_serial));
21624 @@ -2985,22 +2983,23 @@
21625         /* set the number of ports from the manufacturing description */
21626         /* serial->num_ports = serial->product_info.NumPorts; */
21627         if (edge_serial->product_info.NumPorts != serial->num_ports) {
21628 -               warn(__FUNCTION__ " - Device Reported %d serial ports vs core "
21629 +               warn("%s - Device Reported %d serial ports vs core "
21630                      "thinking we have %d ports, email greg@kroah.com this info.",
21631 -                    edge_serial->product_info.NumPorts, serial->num_ports);
21632 +                    __FUNCTION__, edge_serial->product_info.NumPorts, 
21633 +                    serial->num_ports);
21634         }
21635  
21636 -       dbg(__FUNCTION__ " - time 1 %ld", jiffies);
21637 +       dbg("%s - time 1 %ld", __FUNCTION__, jiffies);
21638  
21639         /* now load the application firmware into this device */
21640         load_application_firmware (edge_serial);
21641  
21642 -       dbg(__FUNCTION__ " - time 2 %ld", jiffies);
21643 +       dbg("%s - time 2 %ld", __FUNCTION__, jiffies);
21644  
21645         /* Check current Edgeport EEPROM and update if necessary */
21646         update_edgeport_E2PROM (edge_serial);
21647         
21648 -       dbg(__FUNCTION__ " - time 3 %ld", jiffies);
21649 +       dbg("%s - time 3 %ld", __FUNCTION__, jiffies);
21650  
21651         /* set the configuration to use #1 */
21652  //     dbg("set_configuration 1");
21653 @@ -3013,7 +3012,7 @@
21654         for (i = 0; i < serial->num_ports; ++i) {
21655                 edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL);
21656                 if (edge_port == NULL) {
21657 -                       err(__FUNCTION__" - Out of memory");
21658 +                       err("%s - Out of memory", __FUNCTION__);
21659                         return -ENOMEM;
21660                 }
21661                 memset (edge_port, 0, sizeof(struct edgeport_port));
21662 @@ -3034,13 +3033,10 @@
21663  {
21664         int i;
21665  
21666 -       dbg (__FUNCTION__);
21667 +       dbg("%s", __FUNCTION__);
21668  
21669         /* stop reads and writes on all ports */
21670         for (i=0; i < serial->num_ports; ++i) {
21671 -               while (serial->port[i].open_count > 0) {
21672 -                       edge_close (&serial->port[i], NULL);
21673 -               }
21674                 kfree (serial->port[i].private);
21675                 serial->port[i].private = NULL;
21676         }
21677 diff -Nur linux-2.4.19.old/drivers/usb/serial/io_edgeport.h linux-2.4.19/drivers/usb/serial/io_edgeport.h
21678 --- linux-2.4.19.old/drivers/usb/serial/io_edgeport.h   Tue Aug 28 20:21:02 2001
21679 +++ linux-2.4.19/drivers/usb/serial/io_edgeport.h       Mon Nov 25 12:27:08 2002
21680 @@ -136,7 +136,6 @@
21681         __u16   Strings[1];                     /* Start of string block */
21682  };
21683  
21684 -typedef struct string_block STRING_BLOCK, *PSTRING_BLOCK;
21685  
21686  
21687  #endif
21688 diff -Nur linux-2.4.19.old/drivers/usb/serial/io_fw_boot.h linux-2.4.19/drivers/usb/serial/io_fw_boot.h
21689 --- linux-2.4.19.old/drivers/usb/serial/io_fw_boot.h    Tue Mar 20 02:21:54 2001
21690 +++ linux-2.4.19/drivers/usb/serial/io_fw_boot.h        Mon Nov 25 12:27:08 2002
21691 @@ -12,20 +12,18 @@
21692  //Image structure definition
21693  #if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
21694  #define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
21695 -       typedef struct _EDGE_FIRMWARE_IMAGE_RECORD
21696 -       {
21697 +       struct edge_firmware_image_record {
21698                 unsigned short ExtAddr;
21699                 unsigned short Addr;
21700                 unsigned short Len;
21701                 unsigned char  Data[0];
21702 -       } EDGE_FIRMWARE_IMAGE_RECORD, *PEDGE_FIRMWARE_IMAGE_RECORD;
21703 +       };
21704  
21705 -       typedef struct _EDGE_FIRMWARE_VERSION_INFO
21706 -       {
21707 +       struct edge_firmware_version_info {
21708                 unsigned char    MajorVersion;
21709                 unsigned char  MinorVersion;
21710                 unsigned short BuildNumber;
21711 -       } EDGE_FIRMWARE_VERSION_INFO, *PEDGE_FIRMWARE_VERSION_INFO;
21712 +       };
21713  
21714  #endif
21715  
21716 @@ -549,7 +547,7 @@
21717      0x7e, 0x74, 0x00, 0x01, 0x02, 0x08, 0xd6, 
21718  };
21719  
21720 -static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = {
21721 +static struct edge_firmware_version_info IMAGE_VERSION_NAME = {
21722         1, 12, 2 };             // Major, Minor, Build
21723  
21724  #undef IMAGE_VERSION_NAME
21725 diff -Nur linux-2.4.19.old/drivers/usb/serial/io_fw_boot2.h linux-2.4.19/drivers/usb/serial/io_fw_boot2.h
21726 --- linux-2.4.19.old/drivers/usb/serial/io_fw_boot2.h   Tue Mar 20 02:21:54 2001
21727 +++ linux-2.4.19/drivers/usb/serial/io_fw_boot2.h       Mon Nov 25 12:27:08 2002
21728 @@ -12,20 +12,18 @@
21729  //Image structure definition
21730  #if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
21731  #define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
21732 -       typedef struct _EDGE_FIRMWARE_IMAGE_RECORD
21733 -       {
21734 +       struct edge_firmware_image_record {
21735                 unsigned short ExtAddr;
21736                 unsigned short Addr;
21737                 unsigned short Len;
21738                 unsigned char  Data[0];
21739 -       } EDGE_FIRMWARE_IMAGE_RECORD, *PEDGE_FIRMWARE_IMAGE_RECORD;
21740 +       };
21741  
21742 -       typedef struct _EDGE_FIRMWARE_VERSION_INFO
21743 -       {
21744 +       struct edge_firmware_version_info {
21745                 unsigned char    MajorVersion;
21746                 unsigned char  MinorVersion;
21747                 unsigned short BuildNumber;
21748 -       } EDGE_FIRMWARE_VERSION_INFO, *PEDGE_FIRMWARE_VERSION_INFO;
21749 +       };
21750  
21751  #endif
21752  
21753 @@ -539,7 +537,7 @@
21754  
21755  };
21756  
21757 -static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = {
21758 +static struct edge_firmware_version_info IMAGE_VERSION_NAME = {
21759         2, 0, 3 };              // Major, Minor, Build
21760  
21761  #undef IMAGE_VERSION_NAME
21762 diff -Nur linux-2.4.19.old/drivers/usb/serial/io_fw_down.h linux-2.4.19/drivers/usb/serial/io_fw_down.h
21763 --- linux-2.4.19.old/drivers/usb/serial/io_fw_down.h    Tue Mar 20 02:21:54 2001
21764 +++ linux-2.4.19/drivers/usb/serial/io_fw_down.h        Mon Nov 25 12:27:08 2002
21765 @@ -12,20 +12,18 @@
21766  //Image structure definition
21767  #if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
21768         #define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
21769 -       typedef struct _EDGE_FIRMWARE_IMAGE_RECORD
21770 -       {
21771 +       struct edge_firmware_image_record {
21772                 unsigned short  ExtAddr;
21773                 unsigned short  Addr;
21774                 unsigned short  Len;
21775                 unsigned char   Data[0];
21776 -       } EDGE_FIRMWARE_IMAGE_RECORD, *PEDGE_FIRMWARE_IMAGE_RECORD;
21777 +       };
21778  
21779 -       typedef struct _EDGE_FIRMWARE_VERSION_INFO
21780 -       {
21781 +       struct edge_firmware_version_info {
21782                 unsigned char   MajorVersion;
21783                 unsigned char   MinorVersion;
21784                 unsigned short  BuildNumber;
21785 -       } EDGE_FIRMWARE_VERSION_INFO, *PEDGE_FIRMWARE_VERSION_INFO;
21786 +       };
21787  
21788  #endif
21789  
21790 @@ -1114,7 +1112,7 @@
21791      0x08, 0xa5, 0xb8, 0x02, 0x03, 0x4e, 0xa0, 0x08, 0x22, 0x80, 0xfe, 
21792  };
21793  
21794 -static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = {
21795 +static struct edge_firmware_version_info IMAGE_VERSION_NAME = {
21796         1, 12, 3 };             // Major, Minor, Build
21797  
21798  #undef IMAGE_VERSION_NAME
21799 diff -Nur linux-2.4.19.old/drivers/usb/serial/io_fw_down2.h linux-2.4.19/drivers/usb/serial/io_fw_down2.h
21800 --- linux-2.4.19.old/drivers/usb/serial/io_fw_down2.h   Tue Mar 20 02:21:54 2001
21801 +++ linux-2.4.19/drivers/usb/serial/io_fw_down2.h       Mon Nov 25 12:27:08 2002
21802 @@ -12,20 +12,18 @@
21803  //Image structure definition
21804  #if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
21805         #define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
21806 -       typedef struct _EDGE_FIRMWARE_IMAGE_RECORD
21807 -       {
21808 +       struct edge_firmware_image_record {
21809                 unsigned short ExtAddr;
21810                 unsigned short Addr;
21811                 unsigned short Len;
21812                 unsigned char  Data[0];
21813 -       } EDGE_FIRMWARE_IMAGE_RECORD, *PEDGE_FIRMWARE_IMAGE_RECORD;
21814 +       };
21815  
21816 -       typedef struct _EDGE_FIRMWARE_VERSION_INFO
21817 -       {
21818 -               unsigned char    MajorVersion;
21819 +       struct edge_firmware_version_info {
21820 +               unsigned char  MajorVersion;
21821                 unsigned char  MinorVersion;
21822                 unsigned short BuildNumber;
21823 -       } EDGE_FIRMWARE_VERSION_INFO, *PEDGE_FIRMWARE_VERSION_INFO;
21824 +       };
21825  
21826  #endif
21827  
21828 @@ -1126,7 +1124,7 @@
21829      0x02, 0x03, 0x4e, 0xa0, 0x08, 0x22, 0x80, 0xfe, 
21830  };
21831  
21832 -static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = {
21833 +static struct edge_firmware_version_info IMAGE_VERSION_NAME = {
21834         2, 0, 3 };              // Major, Minor, Build
21835  
21836  #undef IMAGE_VERSION_NAME
21837 diff -Nur linux-2.4.19.old/drivers/usb/serial/io_fw_down3.h linux-2.4.19/drivers/usb/serial/io_fw_down3.h
21838 --- linux-2.4.19.old/drivers/usb/serial/io_fw_down3.h   Thu Jan  1 01:00:00 1970
21839 +++ linux-2.4.19/drivers/usb/serial/io_fw_down3.h       Mon Nov 25 12:27:08 2002
21840 @@ -0,0 +1,799 @@
21841 +//**************************************************************
21842 +//* Edgeport Binary Image (for TI based products)
21843 +//* Generated by TIBin2C v1.00
21844 +//* Copyright(c) 2001 Inside Out Networks, All rights reserved.
21845 +//**************************************************************
21846 +
21847 +
21848 +static int IMAGE_SIZE = 12166;
21849 +
21850 +struct EDGE_FIRMWARE_VERSION_INFO
21851 +{
21852 +       unsigned char   MajorVersion;
21853 +       unsigned char   MinorVersion;
21854 +       unsigned short  BuildNumber;
21855 +};
21856 +
21857 +static struct EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME =
21858 +{
21859 +       4, 1, 0         // Major, Minor, Build
21860 +
21861 +};
21862 +
21863 +static unsigned char IMAGE_ARRAY_NAME[] = 
21864 +{
21865 +//  struct ImageHdr
21866 +//  {
21867 +//      WORD    Length;
21868 +//      BYTE    CheckSum;
21869 +//  };
21870 +0x83, 0x2f, 
21871 +0x33, 
21872 +
21873 +0x02, 0x24, 0x84, 0x02, 0x1f, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x1e, 0x00, 0x00, 
21874 +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x1a, 0x85, 0x45, 
21875 +0x8c, 0x85, 0x46, 0x8a, 0xc0, 0xe0, 0xc0, 0xd0, 0xc0, 0xf0, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x00, 
21876 +0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, 0x07, 0xe5, 0x44, 
21877 +0x24, 0x08, 0xf8, 0xe6, 0x60, 0x2b, 0xe5, 0x44, 0x24, 0x10, 0xf8, 0xa6, 0x81, 0xe5, 0x44, 0x75, 
21878 +0xf0, 0x21, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0xf8, 0xf5, 0x83, 0x78, 0x92, 0xe5, 0x81, 
21879 +0x04, 0xc3, 0x98, 0xf9, 0x94, 0x22, 0x40, 0x03, 0x02, 0x11, 0x1a, 0xe6, 0xf0, 0x08, 0xa3, 0xd9, 
21880 +0xfa, 0x74, 0x08, 0x25, 0x44, 0xf8, 0x05, 0x44, 0x08, 0xe6, 0x54, 0x80, 0x70, 0x0c, 0xe5, 0x44, 
21881 +0xb4, 0x07, 0xf3, 0x78, 0x08, 0x75, 0x44, 0x00, 0x80, 0xef, 0xe5, 0x44, 0x24, 0x10, 0xf8, 0x86, 
21882 +0x81, 0xe5, 0x44, 0x75, 0xf0, 0x21, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0xf8, 0xf5, 0x83, 
21883 +0x78, 0x92, 0xe5, 0x81, 0x04, 0xc3, 0x98, 0xf9, 0xe0, 0xf6, 0x08, 0xa3, 0xd9, 0xfa, 0xd0, 0x07, 
21884 +0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04, 0xd0, 0x03, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0xd0, 0x83, 
21885 +0xd0, 0x82, 0xd0, 0xf0, 0xd0, 0xd0, 0xd0, 0xe0, 0x32, 0x30, 0x01, 0x4d, 0x30, 0xb4, 0x48, 0x10, 
21886 +0x00, 0x45, 0x90, 0xff, 0x08, 0xe0, 0x54, 0x20, 0xf8, 0x90, 0xff, 0x48, 0xe0, 0x54, 0x20, 0xf9, 
21887 +0x90, 0xff, 0x10, 0xe0, 0x54, 0x20, 0xfa, 0x90, 0xff, 0x50, 0xe0, 0x54, 0x20, 0xfb, 0x74, 0x00, 
21888 +0xf5, 0x82, 0x74, 0xf8, 0xf5, 0x83, 0xe0, 0xc8, 0xf0, 0x68, 0x60, 0x02, 0x7e, 0x04, 0xa3, 0xe0, 
21889 +0xc9, 0xf0, 0x69, 0x60, 0x02, 0x7e, 0x04, 0xa3, 0xe0, 0xca, 0xf0, 0x6a, 0x60, 0x02, 0x7e, 0x04, 
21890 +0xa3, 0xe0, 0xcb, 0xf0, 0x6b, 0x60, 0x02, 0x7e, 0x04, 0x22, 0xc0, 0xe0, 0xc0, 0xd0, 0xc0, 0xf0, 
21891 +0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x04, 0xc0, 0x05, 
21892 +0xc0, 0x06, 0xc0, 0x07, 0x90, 0xff, 0x93, 0x74, 0x01, 0xf0, 0xe5, 0x81, 0x94, 0xfd, 0x40, 0x03, 
21893 +0x02, 0x11, 0x1a, 0x85, 0x47, 0x8d, 0x85, 0x48, 0x8b, 0x74, 0xae, 0xf5, 0x82, 0x74, 0xfa, 0xf5, 
21894 +0x83, 0xe0, 0xb4, 0x01, 0x1b, 0xc0, 0x82, 0xc0, 0x83, 0x90, 0xff, 0x4a, 0xe0, 0x30, 0xe7, 0x2c, 
21895 +0x90, 0xff, 0x4e, 0xe0, 0x30, 0xe7, 0x25, 0xd0, 0x83, 0xd0, 0x82, 0x74, 0x02, 0xf0, 0x80, 0x20, 
21896 +0xb4, 0x02, 0x1d, 0xc0, 0x82, 0xc0, 0x83, 0x90, 0xff, 0x7a, 0xe0, 0x30, 0xe7, 0x05, 0x12, 0x25, 
21897 +0x13, 0x80, 0x09, 0xd0, 0x83, 0xd0, 0x82, 0x74, 0x03, 0xf0, 0x80, 0x04, 0xd0, 0x83, 0xd0, 0x82, 
21898 +0xa3, 0xe0, 0xb4, 0x01, 0x1b, 0xc0, 0x82, 0xc0, 0x83, 0x90, 0xff, 0x52, 0xe0, 0x30, 0xe7, 0x2c, 
21899 +0x90, 0xff, 0x56, 0xe0, 0x30, 0xe7, 0x25, 0xd0, 0x83, 0xd0, 0x82, 0x74, 0x02, 0xf0, 0x80, 0x20, 
21900 +0xb4, 0x02, 0x1d, 0xc0, 0x82, 0xc0, 0x83, 0x90, 0xff, 0x7a, 0xe0, 0x30, 0xe7, 0x05, 0x12, 0x25, 
21901 +0x13, 0x80, 0x09, 0xd0, 0x83, 0xd0, 0x82, 0x74, 0x03, 0xf0, 0x80, 0x04, 0xd0, 0x83, 0xd0, 0x82, 
21902 +0x20, 0x02, 0x03, 0x30, 0x01, 0x7b, 0x74, 0x16, 0xf5, 0x82, 0x74, 0xf9, 0xf5, 0x83, 0xe0, 0x14, 
21903 +0xfc, 0xf0, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0x64, 0x04, 0x70, 0x0f, 0xec, 0x70, 0x62, 0x7e, 
21904 +0x01, 0x12, 0x00, 0xc9, 0x7c, 0x0a, 0x7d, 0xfa, 0x02, 0x02, 0x22, 0x12, 0x00, 0xc9, 0xee, 0x64, 
21905 +0x04, 0x60, 0x1d, 0xec, 0x70, 0x4b, 0x7c, 0x0a, 0xed, 0x14, 0xfd, 0x70, 0x15, 0xee, 0x64, 0x02, 
21906 +0x60, 0x07, 0x7e, 0x02, 0x7d, 0x32, 0x02, 0x02, 0x22, 0x7e, 0x01, 0x7d, 0xfa, 0x02, 0x02, 0x22, 
21907 +0x7c, 0x0a, 0x74, 0x16, 0xf5, 0x82, 0x74, 0xf9, 0xf5, 0x83, 0xec, 0xf0, 0xa3, 0xed, 0xf0, 0xa3, 
21908 +0xee, 0xf0, 0x14, 0x60, 0x18, 0x20, 0xe1, 0x0f, 0x20, 0x01, 0x06, 0xd2, 0xb1, 0xc2, 0xb0, 0x80, 
21909 +0x10, 0xc2, 0xb1, 0xd2, 0xb0, 0x80, 0x0a, 0xc2, 0xb1, 0xc2, 0xb0, 0x80, 0x04, 0xd2, 0xb0, 0xd2, 
21910 +0xb1, 0x78, 0x19, 0x79, 0x09, 0x7a, 0x07, 0xe7, 0x70, 0x04, 0xa6, 0x00, 0x80, 0x0b, 0xe6, 0x60, 
21911 +0x08, 0x16, 0xe6, 0x70, 0x04, 0xe7, 0x44, 0x80, 0xf7, 0x08, 0x09, 0xda, 0xea, 0xe5, 0x43, 0x60, 
21912 +0x13, 0x14, 0xf5, 0x43, 0x70, 0x0e, 0xe5, 0x44, 0x24, 0x08, 0xf8, 0x76, 0x00, 0x12, 0x10, 0x95, 
21913 +0xd2, 0x8c, 0xd2, 0x8d, 0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04, 0xd0, 0x03, 0xd0, 0x02, 
21914 +0xd0, 0x01, 0xd0, 0x00, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0xf0, 0xd0, 0xd0, 0xd0, 0xe0, 0x32, 0x90, 
21915 +0xff, 0x04, 0xe0, 0x90, 0xfa, 0xb5, 0xf0, 0x90, 0xff, 0x06, 0xe0, 0xfc, 0xa3, 0xe0, 0xfa, 0xec, 
21916 +0xff, 0xea, 0xfe, 0xef, 0xc3, 0x94, 0x08, 0xee, 0x94, 0x01, 0x50, 0x02, 0x80, 0x04, 0x7e, 0x01, 
21917 +0x7f, 0x08, 0x8e, 0x34, 0x8f, 0x35, 0x90, 0xff, 0x02, 0xe0, 0xfc, 0xa3, 0xe0, 0xfa, 0xec, 0xff, 
21918 +0xea, 0x90, 0xfa, 0xb9, 0xf0, 0xef, 0xa3, 0xf0, 0x12, 0x18, 0x49, 0x78, 0x24, 0x7c, 0x00, 0x7d, 
21919 +0x00, 0x12, 0x19, 0x6c, 0x7e, 0x00, 0x7f, 0x05, 0x12, 0x13, 0x8f, 0xe4, 0xf5, 0x53, 0xe5, 0x53, 
21920 +0xc3, 0x94, 0x02, 0x50, 0x0f, 0x12, 0x18, 0x2a, 0xe4, 0x12, 0x13, 0xfb, 0x05, 0x53, 0x04, 0x12, 
21921 +0x18, 0x1b, 0x80, 0xea, 0x12, 0x18, 0x49, 0x90, 0xff, 0x00, 0xe0, 0xff, 0x54, 0x60, 0x24, 0xc0, 
21922 +0x70, 0x03, 0x02, 0x08, 0xb8, 0x24, 0x40, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 0xe0, 
21923 +0xfe, 0x54, 0x0f, 0xf5, 0x53, 0xee, 0x30, 0xe7, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x0a, 0x90, 
21924 +0xff, 0x01, 0xe0, 0x12, 0x15, 0x0f, 0x03, 0x55, 0x00, 0x04, 0x28, 0x01, 0x05, 0x2f, 0x03, 0x05, 
21925 +0xf6, 0x05, 0x06, 0x38, 0x06, 0x07, 0x9a, 0x08, 0x07, 0xe2, 0x09, 0x08, 0x3e, 0x0a, 0x08, 0x7e, 
21926 +0x0b, 0x00, 0x00, 0x0e, 0xac, 0xe5, 0x2c, 0x20, 0xe7, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb9, 
21927 +0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x35, 0x64, 0x02, 0x45, 0x34, 
21928 +0x60, 0x03, 0x02, 0x0e, 0xac, 0xef, 0x54, 0x1f, 0x14, 0x60, 0x2b, 0x14, 0x60, 0x47, 0x24, 0x02, 
21929 +0x60, 0x03, 0x02, 0x0e, 0xac, 0xee, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x18, 0x2a, 0x74, 0x01, 
21930 +0x12, 0x13, 0xfb, 0x78, 0x6d, 0xe6, 0x30, 0xe0, 0x08, 0x12, 0x18, 0x2a, 0x74, 0x02, 0x12, 0x13, 
21931 +0xfb, 0x7f, 0x02, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x20, 0xe1, 0x09, 0x90, 0xfa, 0xb5, 0xe0, 0x60, 
21932 +0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 0xe0, 0xd3, 0x94, 0x01, 0x40, 0x03, 0x02, 0x0e, 0xac, 
21933 +0x7f, 0x02, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x20, 0xe1, 0x0e, 0x90, 0xfa, 0xb5, 0xe0, 0xff, 0x60, 
21934 +0x07, 0x64, 0x80, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x0f, 0x38, 0x40, 0x03, 0x02, 0x0e, 0xac, 
21935 +0xe5, 0x53, 0x70, 0x19, 0x30, 0x0a, 0x0b, 0x90, 0xff, 0x80, 0x12, 0x18, 0x27, 0x12, 0x13, 0xfb, 
21936 +0x80, 0x24, 0x90, 0xff, 0x82, 0x12, 0x18, 0x27, 0x12, 0x13, 0xfb, 0x80, 0x19, 0x15, 0x53, 0x30, 
21937 +0x0a, 0x0b, 0x12, 0x18, 0xbd, 0x12, 0x18, 0x25, 0x12, 0x13, 0xfb, 0x80, 0x09, 0x12, 0x18, 0xcb, 
21938 +0x12, 0x18, 0x25, 0x12, 0x13, 0xfb, 0x12, 0x18, 0x2a, 0x12, 0x13, 0xb5, 0x60, 0x05, 0x74, 0x01, 
21939 +0x12, 0x13, 0xfb, 0x7f, 0x02, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xac, 
21940 +0xe5, 0x35, 0x45, 0x34, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x18, 0xd9, 0x14, 0x60, 0x2d, 0x14, 
21941 +0x60, 0x59, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb9, 0xe0, 0x70, 0x04, 0xa3, 
21942 +0xe0, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 0xe0, 0x60, 0x03, 0x02, 0x0e, 
21943 +0xac, 0x78, 0x6d, 0xe6, 0x54, 0xfe, 0xf6, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x20, 0xe1, 
21944 +0x06, 0x20, 0xe0, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x30, 0xe0, 0x09, 0x90, 0xfa, 0xb5, 0xe0, 
21945 +0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x30, 0xe1, 0x0c, 0x90, 0xfa, 0xb5, 0xe0, 0xd3, 0x94, 
21946 +0x01, 0x40, 0x03, 0x02, 0x0e, 0xac, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0x90, 0xfa, 0xb9, 0xe0, 0x70, 
21947 +0x02, 0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x0f, 0x38, 0x40, 0x03, 0x02, 0x0e, 0xac, 
21948 +0xe5, 0x2c, 0x20, 0xe1, 0x06, 0x20, 0xe0, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x30, 0xe0, 0x07, 
21949 +0xe5, 0x53, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x53, 0x70, 0x0f, 0x90, 0xff, 0x82, 0xe0, 0x54, 
21950 +0xf7, 0xf0, 0x90, 0xff, 0x80, 0xe0, 0x54, 0xf7, 0xf0, 0x22, 0xe5, 0x53, 0x24, 0xfe, 0x60, 0x1b, 
21951 +0x04, 0x70, 0x2e, 0x30, 0x0a, 0x0c, 0xa2, 0x0a, 0xe4, 0x33, 0xfd, 0x7f, 0x03, 0x12, 0x2a, 0xce, 
21952 +0x80, 0x1f, 0xe4, 0xfd, 0x7f, 0x03, 0x12, 0x2a, 0xce, 0x80, 0x16, 0x30, 0x0a, 0x0c, 0xa2, 0x0a, 
21953 +0xe4, 0x33, 0xfd, 0x7f, 0x04, 0x12, 0x2a, 0xce, 0x80, 0x07, 0xe4, 0xfd, 0x7f, 0x04, 0x12, 0x2a, 
21954 +0xce, 0x15, 0x53, 0x30, 0x0a, 0x0b, 0x12, 0x18, 0xbd, 0xf5, 0x83, 0xe0, 0x54, 0xf7, 0xf0, 0x80, 
21955 +0x09, 0x12, 0x18, 0xcb, 0xf5, 0x83, 0xe0, 0x54, 0xf7, 0xf0, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0xe5, 
21956 +0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x35, 0x45, 0x34, 0x60, 0x03, 0x02, 0x0e, 0xac, 
21957 +0x12, 0x18, 0xd9, 0x14, 0x60, 0x2d, 0x14, 0x60, 0x55, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0e, 0xac, 
21958 +0x90, 0xfa, 0xb9, 0xe0, 0x70, 0x04, 0xa3, 0xe0, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 
21959 +0xfa, 0xb5, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x78, 0x6d, 0xe6, 0x44, 0x01, 0xf6, 0xe4, 0xff, 
21960 +0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x20, 0xe1, 0x06, 0x20, 0xe0, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 
21961 +0x30, 0xe0, 0x07, 0xe5, 0x53, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x30, 0xe1, 0x0a, 0xe5, 
21962 +0x53, 0xd3, 0x94, 0x01, 0x40, 0x03, 0x02, 0x0e, 0xac, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0x90, 0xfa, 
21963 +0xb9, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 0xe0, 0xff, 
21964 +0x12, 0x2f, 0x3b, 0x40, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x20, 0xe1, 0x06, 0x20, 0xe0, 0x03, 
21965 +0x02, 0x0e, 0xac, 0xe5, 0x53, 0x70, 0x09, 0x30, 0x0a, 0x03, 0x02, 0x19, 0x7a, 0x02, 0x19, 0x3e, 
21966 +0xe5, 0x2c, 0x20, 0xe1, 0x03, 0x02, 0x0e, 0xac, 0x15, 0x53, 0x30, 0x0a, 0x0b, 0x12, 0x18, 0xbd, 
21967 +0xf5, 0x83, 0xe0, 0x44, 0x08, 0xf0, 0x80, 0x09, 0x12, 0x18, 0xcb, 0xf5, 0x83, 0xe0, 0x44, 0x08, 
21968 +0xf0, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x35, 
21969 +0x45, 0x34, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 
21970 +0x12, 0x18, 0xd9, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x30, 0xe1, 0x03, 0x02, 0x0e, 0xac, 
21971 +0x90, 0xfa, 0xba, 0xe0, 0x90, 0xff, 0xff, 0xf0, 0xe0, 0x60, 0x05, 0x43, 0x2c, 0x01, 0x80, 0x03, 
21972 +0x53, 0x2c, 0xfe, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x20, 0xe7, 0x03, 0x02, 0x0e, 0xac, 
21973 +0xe5, 0x35, 0x45, 0x34, 0x70, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x18, 0xd9, 0x60, 0x03, 0x02, 0x0e, 
21974 +0xac, 0x90, 0xfa, 0xb9, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xec, 0x24, 0xfe, 0x60, 0x3a, 0x14, 0x60, 
21975 +0x75, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xed, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x18, 
21976 +0x49, 0x12, 0x19, 0x73, 0x7d, 0x03, 0x12, 0x0e, 0xf3, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x0e, 
21977 +0xb0, 0x90, 0xfa, 0xb2, 0xe0, 0xfd, 0xa3, 0x12, 0x18, 0x93, 0x12, 0x0f, 0x0f, 0x50, 0x02, 0x80, 
21978 +0x04, 0xae, 0x34, 0xaf, 0x35, 0x02, 0x0f, 0x40, 0x12, 0x18, 0x49, 0x90, 0xf9, 0x65, 0xe0, 0x30, 
21979 +0xe4, 0x0d, 0x12, 0x19, 0x73, 0x7d, 0x14, 0x12, 0x0e, 0xf3, 0x60, 0x10, 0x02, 0x0e, 0xac, 0x12, 
21980 +0x19, 0x73, 0x7d, 0x04, 0x12, 0x0f, 0x47, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x0e, 0xb0, 0x90, 
21981 +0xfa, 0xb2, 0xe0, 0xfd, 0xa3, 0x12, 0x18, 0x93, 0x12, 0x0f, 0x0f, 0x50, 0x02, 0x80, 0x04, 0xae, 
21982 +0x34, 0xaf, 0x35, 0x02, 0x0f, 0x40, 0x12, 0x19, 0x73, 0x7d, 0x05, 0x12, 0x0f, 0x47, 0x60, 0x03, 
21983 +0x02, 0x0e, 0xac, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xb2, 0x12, 0x18, 0x90, 0x7d, 0x01, 0x12, 0x23, 
21984 +0xee, 0x90, 0xfa, 0xb3, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x14, 0x2f, 0x90, 0xfa, 0xba, 0xe0, 0x90, 
21985 +0xfa, 0xb1, 0xf0, 0xe4, 0xf5, 0x52, 0x90, 0xfa, 0xb1, 0xe0, 0xff, 0xe5, 0x52, 0xc3, 0x9f, 0x50, 
21986 +0x24, 0x12, 0x18, 0x8a, 0x12, 0x0f, 0x52, 0xff, 0xfd, 0x90, 0xfa, 0xb3, 0xe4, 0x8d, 0xf0, 0x12, 
21987 +0x14, 0x2f, 0x90, 0xfa, 0xb2, 0xe0, 0xc3, 0x9f, 0xf0, 0xd3, 0x94, 0x00, 0x50, 0x03, 0x02, 0x0e, 
21988 +0xac, 0x05, 0x52, 0x80, 0xd1, 0x12, 0x18, 0x8a, 0x12, 0x0f, 0x52, 0x24, 0xfe, 0xff, 0x90, 0xfa, 
21989 +0xb2, 0xf0, 0xfd, 0xa3, 0xe4, 0x75, 0xf0, 0x02, 0x12, 0x14, 0x2f, 0x7a, 0xf9, 0x79, 0x6e, 0x7b, 
21990 +0x01, 0x8b, 0x2d, 0x8a, 0x2e, 0x89, 0x2f, 0xe9, 0x24, 0x02, 0xf9, 0xe4, 0x3a, 0xfa, 0x12, 0x18, 
21991 +0x90, 0x12, 0x23, 0xee, 0x8f, 0x52, 0x05, 0x52, 0x05, 0x52, 0x12, 0x18, 0x2a, 0xe5, 0x52, 0x12, 
21992 +0x13, 0xfb, 0x12, 0x18, 0x2a, 0x90, 0x00, 0x01, 0x74, 0x03, 0x12, 0x14, 0x0d, 0xaf, 0x52, 0x7e, 
21993 +0x00, 0xc3, 0xef, 0x95, 0x35, 0xee, 0x95, 0x34, 0x50, 0x02, 0x80, 0x04, 0xae, 0x34, 0xaf, 0x35, 
21994 +0x8e, 0x30, 0x8f, 0x31, 0x02, 0x29, 0x2d, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x20, 0xe7, 0x03, 0x02, 
21995 +0x0e, 0xac, 0xe5, 0x35, 0x64, 0x01, 0x45, 0x34, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 
21996 +0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb9, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x03, 
21997 +0x02, 0x0e, 0xac, 0x12, 0x18, 0xd9, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x20, 0xe0, 0x06, 
21998 +0x20, 0xe1, 0x03, 0x02, 0x0e, 0xac, 0x75, 0x2d, 0x00, 0x75, 0x2e, 0x00, 0x75, 0x2f, 0x29, 0x02, 
21999 +0x0f, 0x2f, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x35, 0x45, 0x34, 0x60, 0x03, 
22000 +0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xd3, 0x90, 0xfa, 0xba, 
22001 +0xe0, 0x94, 0x01, 0x90, 0xfa, 0xb9, 0xe0, 0x94, 0x00, 0x40, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x18, 
22002 +0xd9, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x20, 0xe0, 0x06, 0x20, 0xe1, 0x03, 0x02, 0x0e, 
22003 +0xac, 0x90, 0xfa, 0xba, 0xe0, 0xf5, 0x29, 0xe5, 0x29, 0x70, 0x08, 0x43, 0x2c, 0x01, 0x53, 0x2c, 
22004 +0xfd, 0x80, 0x06, 0x53, 0x2c, 0xfe, 0x43, 0x2c, 0x02, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 
22005 +0x20, 0xe7, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x35, 0x64, 0x01, 0x45, 0x34, 0x60, 0x03, 0x02, 0x0e, 
22006 +0xac, 0x90, 0xfa, 0xb5, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb9, 0xe0, 0x70, 0x02, 
22007 +0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x18, 0xd9, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0e, 
22008 +0xac, 0xe5, 0x2c, 0x20, 0xe1, 0x03, 0x02, 0x0e, 0xac, 0x7f, 0x01, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 
22009 +0x30, 0xe7, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x35, 0x45, 0x34, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xd3, 
22010 +0x90, 0xfa, 0xba, 0xe0, 0x94, 0x00, 0x90, 0xfa, 0xb9, 0xe0, 0x94, 0x00, 0x40, 0x03, 0x02, 0x0e, 
22011 +0xac, 0x12, 0x18, 0xd9, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x20, 0xe1, 0x03, 
22012 +0x02, 0x0e, 0xac, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0x90, 0xff, 0x01, 0x12, 0x19, 0x8a, 0xef, 0x12, 
22013 +0x13, 0xfb, 0x90, 0xfa, 0xb5, 0x12, 0x19, 0x8a, 0x90, 0x00, 0x01, 0xef, 0x12, 0x14, 0x0d, 0x90, 
22014 +0x00, 0x02, 0xe4, 0x12, 0x14, 0x0d, 0x74, 0x03, 0x12, 0x18, 0x1b, 0x90, 0xfa, 0xb9, 0xe0, 0xff, 
22015 +0xa3, 0xe0, 0x85, 0x2f, 0x82, 0x85, 0x2e, 0x83, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0xff, 0x01, 
22016 +0xe0, 0x12, 0x15, 0x0f, 0x09, 0x3d, 0x02, 0x09, 0x5f, 0x04, 0x09, 0x81, 0x05, 0x09, 0xad, 0x06, 
22017 +0x09, 0xcb, 0x07, 0x09, 0xe9, 0x08, 0x0a, 0x07, 0x09, 0x0a, 0x25, 0x0b, 0x0a, 0xda, 0x80, 0x0c, 
22018 +0xfa, 0x81, 0x0d, 0x1c, 0x82, 0x0b, 0x21, 0x83, 0x0b, 0x6a, 0x84, 0x0b, 0x89, 0x85, 0x0b, 0xc5, 
22019 +0x86, 0x0c, 0x07, 0x87, 0x0c, 0x95, 0x88, 0x0c, 0xd0, 0x89, 0x0a, 0x43, 0x92, 0x0a, 0x43, 0x93, 
22020 +0x0d, 0xcf, 0xc0, 0x0e, 0x00, 0xc1, 0x0e, 0x11, 0xc2, 0x00, 0x00, 0x0e, 0x9b, 0xe5, 0x2c, 0x20, 
22021 +0xe7, 0x05, 0x7f, 0x05, 0x02, 0x2e, 0xa5, 0x12, 0x18, 0xe0, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 
22022 +0xfd, 0x7c, 0x00, 0x7f, 0x07, 0x02, 0x10, 0x9c, 0xe4, 0xfd, 0x7f, 0x07, 0x02, 0x2c, 0xc0, 0xe5, 
22023 +0x2c, 0x20, 0xe7, 0x05, 0x7f, 0x05, 0x02, 0x2e, 0xa5, 0x12, 0x18, 0xe0, 0x60, 0x03, 0x04, 0x70, 
22024 +0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0c, 0x02, 0x10, 0x9c, 0xe4, 0xfd, 0x7f, 0x07, 0x02, 0x2c, 
22025 +0xc0, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xaf, 0x12, 0x19, 0x99, 0x50, 0x06, 0xe5, 0x35, 
22026 +0x45, 0x34, 0x70, 0x05, 0x7f, 0x02, 0x02, 0x2e, 0xa5, 0x90, 0xfa, 0xb5, 0xe0, 0x24, 0xfe, 0x24, 
22027 +0xfd, 0x50, 0x02, 0x80, 0x03, 0x02, 0x2f, 0x28, 0x7f, 0x07, 0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 
22028 +0xe7, 0x03, 0x02, 0x0e, 0xaf, 0x12, 0x18, 0xe0, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 
22029 +0x00, 0x7f, 0x08, 0x02, 0x10, 0x9c, 0x7f, 0x07, 0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 
22030 +0x02, 0x0e, 0xaf, 0x12, 0x18, 0xe0, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 
22031 +0x09, 0x02, 0x10, 0x9c, 0x7f, 0x07, 0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 
22032 +0xaf, 0x12, 0x18, 0xe0, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0a, 0x02, 
22033 +0x10, 0x9c, 0x7f, 0x07, 0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xaf, 0x12, 
22034 +0x18, 0xe0, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0b, 0x02, 0x10, 0x9c, 
22035 +0x7f, 0x07, 0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xaf, 0x12, 0x18, 0xe0, 
22036 +0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0e, 0x02, 0x10, 0x9c, 0x7f, 0x07, 
22037 +0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 0xe7, 0x56, 0x12, 0x18, 0xd9, 0x70, 0x4a, 0x90, 0xff, 0x02, 
22038 +0xe0, 0xf5, 0x52, 0xe5, 0x52, 0xb4, 0x82, 0x05, 0x75, 0x52, 0x61, 0x80, 0x12, 0xe5, 0x52, 0xb4, 
22039 +0x83, 0x05, 0x75, 0x52, 0x62, 0x80, 0x08, 0xe5, 0x52, 0xc4, 0x54, 0xf0, 0x04, 0xf5, 0x52, 0x12, 
22040 +0x17, 0x8b, 0x12, 0x19, 0x6c, 0x12, 0x22, 0xb8, 0x12, 0x18, 0xe8, 0x12, 0x13, 0xce, 0x60, 0x05, 
22041 +0x12, 0x2f, 0x76, 0x80, 0x06, 0x85, 0x2a, 0x30, 0x85, 0x2b, 0x31, 0x75, 0x2d, 0x01, 0x75, 0x2e, 
22042 +0xf9, 0x75, 0x2f, 0x71, 0x02, 0x29, 0x2d, 0xe4, 0xfd, 0x7f, 0x05, 0x02, 0x2c, 0xc0, 0x12, 0x18, 
22043 +0xd9, 0x60, 0x05, 0x7f, 0x05, 0x02, 0x2e, 0xa5, 0x12, 0x19, 0x99, 0x40, 0x05, 0x7f, 0x03, 0x02, 
22044 +0x2e, 0xa5, 0x90, 0xff, 0x02, 0xe0, 0xf5, 0x52, 0xe5, 0x52, 0xb4, 0x82, 0x05, 0x75, 0x52, 0x61, 
22045 +0x80, 0x12, 0xe5, 0x52, 0xb4, 0x83, 0x05, 0x75, 0x52, 0x62, 0x80, 0x08, 0xe5, 0x52, 0xc4, 0x54, 
22046 +0xf0, 0x04, 0xf5, 0x52, 0x12, 0x17, 0x8b, 0x02, 0x2f, 0x28, 0x12, 0x19, 0xa3, 0x12, 0x27, 0x19, 
22047 +0x12, 0x18, 0x9b, 0xe0, 0x54, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0xe0, 0x90, 0xfa, 0xb6, 0xf0, 0x78, 
22048 +0x6e, 0x12, 0x14, 0xeb, 0x90, 0x00, 0x02, 0x12, 0x13, 0xce, 0x30, 0xe7, 0xf2, 0x90, 0x00, 0x02, 
22049 +0xe4, 0x12, 0x14, 0x0d, 0x90, 0xfa, 0xb6, 0xe0, 0x44, 0x80, 0xff, 0xf0, 0x78, 0x82, 0xe6, 0xfc, 
22050 +0x08, 0xe6, 0x8c, 0x83, 0x12, 0x18, 0xa3, 0xef, 0xf0, 0x12, 0x2f, 0x80, 0xe4, 0xff, 0x02, 0x2e, 
22051 +0xa5, 0x90, 0xfa, 0xb5, 0xe0, 0x64, 0x01, 0x70, 0x1f, 0x90, 0xfa, 0xb9, 0xe0, 0xff, 0x7e, 0x00, 
22052 +0x70, 0x06, 0xa3, 0xe0, 0xf5, 0x90, 0x80, 0x2d, 0xc2, 0xaf, 0xef, 0xf4, 0x52, 0x90, 0x90, 0xfa, 
22053 +0xba, 0xe0, 0x42, 0x90, 0xd2, 0xaf, 0x80, 0x1d, 0x90, 0xfa, 0xb9, 0xe0, 0xff, 0x7e, 0x00, 0x70, 
22054 +0x06, 0xa3, 0xe0, 0xf5, 0xb0, 0x80, 0x0e, 0xc2, 0xaf, 0xef, 0xf4, 0x52, 0xb0, 0x90, 0xfa, 0xba, 
22055 +0xe0, 0x42, 0xb0, 0xd2, 0xaf, 0xe4, 0xff, 0x02, 0x2e, 0xa5, 0x12, 0x18, 0x49, 0x90, 0xfa, 0xb5, 
22056 +0xe0, 0xb4, 0x01, 0x0a, 0x12, 0x18, 0x2a, 0xe5, 0x90, 0x12, 0x13, 0xfb, 0x80, 0x08, 0x12, 0x18, 
22057 +0x2a, 0xe5, 0xb0, 0x12, 0x13, 0xfb, 0x02, 0x0f, 0x2f, 0x90, 0xf9, 0x65, 0xe0, 0x20, 0xe1, 0x30, 
22058 +0x12, 0x18, 0x53, 0x60, 0x18, 0x04, 0x70, 0x28, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x09, 0x90, 0xff, 
22059 +0xa4, 0xe0, 0x44, 0x10, 0xf0, 0x80, 0x19, 0x12, 0x19, 0xad, 0xf0, 0x80, 0x13, 0x90, 0xfa, 0xb6, 
22060 +0xe0, 0x60, 0x09, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x10, 0xf0, 0x80, 0x04, 0x12, 0x19, 0xb4, 0xf0, 
22061 +0xe4, 0xff, 0x02, 0x2e, 0xa5, 0x90, 0xf9, 0x65, 0xe0, 0x20, 0xe1, 0x36, 0x12, 0x18, 0x53, 0x60, 
22062 +0x1b, 0x04, 0x70, 0x2e, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x09, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x20, 
22063 +0xf0, 0x80, 0x1f, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xdf, 0xf0, 0x80, 0x16, 0x90, 0xfa, 0xb6, 0xe0, 
22064 +0x60, 0x09, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x07, 0x90, 0xff, 0xb4, 0xe0, 0x54, 
22065 +0xdf, 0xf0, 0xe4, 0xff, 0x02, 0x2e, 0xa5, 0x12, 0x18, 0x53, 0x60, 0x46, 0x04, 0x60, 0x03, 0x02, 
22066 +0x0c, 0x90, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x17, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x04, 0xf0, 0x90, 
22067 +0xf9, 0x65, 0xe0, 0x30, 0xe1, 0x6a, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x61, 0x90, 
22068 +0xff, 0xa4, 0xe0, 0x54, 0xfb, 0xf0, 0x90, 0xf9, 0x65, 0xe0, 0x30, 0xe1, 0x53, 0x30, 0x95, 0x09, 
22069 +0x90, 0xff, 0xa4, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x47, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xfd, 0xf0, 
22070 +0x80, 0x3e, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x17, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x04, 0xf0, 0x90, 
22071 +0xf9, 0x65, 0xe0, 0x30, 0xe1, 0x2a, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x21, 0x90, 
22072 +0xff, 0xb4, 0xe0, 0x54, 0xfb, 0xf0, 0x90, 0xf9, 0x65, 0xe0, 0x30, 0xe1, 0x13, 0x30, 0x93, 0x09, 
22073 +0x90, 0xff, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x07, 0x90, 0xff, 0xb4, 0xe0, 0x54, 0xfd, 0xf0, 
22074 +0xe4, 0xff, 0x02, 0x2e, 0xa5, 0x12, 0x18, 0x53, 0x60, 0x1b, 0x04, 0x70, 0x2e, 0x90, 0xfa, 0xb6, 
22075 +0xe0, 0x60, 0x09, 0x90, 0xff, 0xa2, 0xe0, 0x44, 0x40, 0xf0, 0x80, 0x1f, 0x90, 0xff, 0xa2, 0xe0, 
22076 +0x54, 0xbf, 0xf0, 0x80, 0x16, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x09, 0x90, 0xff, 0xb2, 0xe0, 0x44, 
22077 +0x40, 0xf0, 0x80, 0x07, 0x90, 0xff, 0xb2, 0xe0, 0x54, 0xbf, 0xf0, 0xe4, 0xff, 0x02, 0x2e, 0xa5, 
22078 +0x12, 0x18, 0x49, 0x12, 0x18, 0x5b, 0x60, 0x0f, 0x04, 0x70, 0x16, 0x90, 0xff, 0xa4, 0xe0, 0x12, 
22079 +0x18, 0x2a, 0x12, 0x13, 0xfb, 0x80, 0x0a, 0x90, 0xff, 0xb4, 0xe0, 0x12, 0x18, 0x2a, 0x12, 0x13, 
22080 +0xfb, 0x75, 0x30, 0x00, 0x75, 0x31, 0x01, 0x02, 0x29, 0x2d, 0xe4, 0xff, 0x12, 0x2e, 0xa5, 0x12, 
22081 +0x19, 0x46, 0x7f, 0x03, 0x12, 0x11, 0x9f, 0x90, 0xff, 0xfc, 0xe0, 0x54, 0x7f, 0xf0, 0x7f, 0xff, 
22082 +0x7e, 0x00, 0x12, 0x2d, 0xee, 0xc2, 0x90, 0xc2, 0xaf, 0x00, 0x80, 0xfd, 0xe4, 0xf5, 0x54, 0xf5, 
22083 +0x55, 0x90, 0xfa, 0xbb, 0x74, 0x3e, 0xf0, 0xa3, 0xe4, 0xf0, 0x90, 0xfa, 0xb3, 0xf0, 0xa3, 0x74, 
22084 +0x15, 0xf0, 0xe0, 0x54, 0x3f, 0xff, 0xc3, 0x74, 0x40, 0x9f, 0x90, 0xfa, 0xb8, 0xf0, 0xd3, 0x94, 
22085 +0x00, 0xe4, 0x94, 0x3e, 0x40, 0x08, 0x90, 0xfa, 0xbc, 0xe0, 0x90, 0xfa, 0xb8, 0xf0, 0x12, 0x0e, 
22086 +0xd6, 0xe5, 0x23, 0x45, 0x22, 0x70, 0x73, 0x12, 0x18, 0x62, 0x90, 0xfa, 0xbb, 0x12, 0x19, 0x65, 
22087 +0x60, 0x27, 0xd3, 0xef, 0x94, 0x40, 0xee, 0x94, 0x00, 0x40, 0x08, 0x90, 0xfa, 0xb8, 0x74, 0x40, 
22088 +0xf0, 0x80, 0x08, 0x90, 0xfa, 0xbc, 0xe0, 0x90, 0xfa, 0xb8, 0xf0, 0x12, 0x0e, 0xd6, 0xe5, 0x23, 
22089 +0x45, 0x22, 0x70, 0x46, 0x12, 0x18, 0x62, 0x80, 0xd1, 0x75, 0x52, 0x02, 0x90, 0xfa, 0xbb, 0xe4, 
22090 +0xf0, 0xa3, 0x04, 0xf0, 0x90, 0xfa, 0xb3, 0xe4, 0xf0, 0xa3, 0x74, 0x0f, 0xf0, 0x7b, 0x00, 0x7a, 
22091 +0x00, 0x79, 0x52, 0x90, 0xfa, 0xbc, 0xe0, 0xf5, 0x50, 0x7d, 0x0f, 0x7c, 0x00, 0x12, 0x26, 0x25, 
22092 +0x75, 0x22, 0x00, 0x8f, 0x23, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x52, 0xe4, 0xf5, 0x40, 0xf5, 0x41, 
22093 +0x7d, 0x01, 0x12, 0x23, 0xee, 0xe4, 0xf5, 0x22, 0xf5, 0x23, 0xaf, 0x23, 0x02, 0x2e, 0xa5, 0x90, 
22094 +0xfa, 0xba, 0xe0, 0x90, 0xfa, 0xb6, 0xf0, 0x30, 0xe7, 0x10, 0xe0, 0x54, 0x0f, 0x90, 0xf9, 0x62, 
22095 +0xf0, 0xd3, 0x94, 0x00, 0x40, 0x15, 0xc2, 0x95, 0x80, 0x11, 0x90, 0xfa, 0xb6, 0xe0, 0x54, 0x0f, 
22096 +0x90, 0xf9, 0x61, 0xf0, 0xd3, 0x94, 0x00, 0x40, 0x02, 0xc2, 0x94, 0xe4, 0xff, 0x02, 0x2e, 0xa5, 
22097 +0x12, 0x19, 0xa3, 0xbf, 0x01, 0x04, 0xd2, 0x93, 0x80, 0x02, 0xc2, 0x93, 0xe4, 0xff, 0x02, 0x2e, 
22098 +0xa5, 0x90, 0xfa, 0xba, 0xe0, 0x90, 0xfa, 0xb6, 0xf0, 0x54, 0x03, 0x14, 0x60, 0x0a, 0x14, 0x60, 
22099 +0x0f, 0x14, 0x60, 0x08, 0x24, 0x03, 0x70, 0x2b, 0xd2, 0x91, 0x80, 0x27, 0xc2, 0x91, 0x80, 0x23, 
22100 +0x12, 0x19, 0xad, 0x12, 0x0e, 0xfe, 0x60, 0x04, 0xd2, 0x91, 0x80, 0x17, 0x90, 0xff, 0xa4, 0xe0, 
22101 +0x44, 0x10, 0x12, 0x0e, 0xfe, 0xff, 0xbf, 0xa0, 0x04, 0xc2, 0x91, 0x80, 0x02, 0xd2, 0x91, 0x12, 
22102 +0x19, 0xad, 0xf0, 0x90, 0xfa, 0xb6, 0xe0, 0x54, 0x0c, 0xff, 0x13, 0x13, 0x54, 0x3f, 0x14, 0x60, 
22103 +0x0a, 0x14, 0x60, 0x0f, 0x14, 0x60, 0x08, 0x24, 0x03, 0x70, 0x2b, 0xd2, 0x92, 0x80, 0x27, 0xc2, 
22104 +0x92, 0x80, 0x23, 0x12, 0x19, 0xb4, 0x12, 0x0f, 0x1e, 0x60, 0x04, 0xd2, 0x92, 0x80, 0x17, 0x90, 
22105 +0xff, 0xb4, 0xe0, 0x44, 0x10, 0x12, 0x0f, 0x1e, 0xff, 0xbf, 0xa0, 0x04, 0xc2, 0x92, 0x80, 0x02, 
22106 +0xd2, 0x92, 0x12, 0x19, 0xb4, 0xf0, 0xe4, 0xff, 0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 0xe7, 0x07, 
22107 +0xe4, 0xfd, 0x7f, 0x05, 0x02, 0x2c, 0xc0, 0x7f, 0x05, 0x02, 0x2e, 0xa5, 0x12, 0x2f, 0x76, 0x22, 
22108 +0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xb2, 0x90, 0xfa, 0xb3, 0xe0, 0xf5, 0x40, 0xa3, 0xe0, 0xf5, 0x41, 
22109 +0x7d, 0x01, 0x12, 0x23, 0xee, 0x90, 0xfa, 0xb3, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x14, 0x2f, 0xab, 
22110 +0x2d, 0xaa, 0x2e, 0xa9, 0x2f, 0x22, 0xaa, 0x54, 0xa9, 0x55, 0x7b, 0xff, 0x90, 0xfa, 0xb3, 0xe0, 
22111 +0xfc, 0xa3, 0xe0, 0xfd, 0x90, 0xfa, 0xb8, 0xe0, 0xf5, 0x50, 0x12, 0x26, 0x25, 0x75, 0x22, 0x00, 
22112 +0x8f, 0x23, 0x22, 0x12, 0x20, 0xc5, 0x7e, 0x00, 0x8e, 0x22, 0x8f, 0x23, 0xef, 0x22, 0xf0, 0x7f, 
22113 +0x01, 0x12, 0x11, 0x9f, 0x90, 0xff, 0xa6, 0xe0, 0x90, 0xfa, 0xb7, 0xf0, 0x54, 0xa0, 0x22, 0x12, 
22114 +0x23, 0xee, 0x8f, 0x52, 0x7e, 0x00, 0xc3, 0xef, 0x95, 0x35, 0xee, 0x95, 0x34, 0x22, 0xf0, 0x7f, 
22115 +0x01, 0x12, 0x11, 0x9f, 0x90, 0xff, 0xb6, 0xe0, 0x90, 0xfa, 0xb7, 0xf0, 0x54, 0xa0, 0x22, 0x75, 
22116 +0x30, 0x00, 0x75, 0x31, 0x01, 0x02, 0x29, 0x2d, 0x90, 0xfa, 0xb5, 0xe0, 0xff, 0x02, 0x2f, 0x3b, 
22117 +0x8e, 0x30, 0x8f, 0x31, 0x02, 0x29, 0x2d, 0x12, 0x20, 0xc5, 0x7e, 0x00, 0x8e, 0x22, 0x8f, 0x23, 
22118 +0xef, 0x22, 0x7d, 0x01, 0x12, 0x23, 0xee, 0x90, 0xfa, 0xb0, 0xe0, 0x22, 0xef, 0x90, 0xf8, 0x04, 
22119 +0xf0, 0x22, 0xc0, 0xa8, 0xc2, 0xaf, 0xee, 0x60, 0x0a, 0xc0, 0x05, 0x7d, 0x7f, 0xdd, 0xfe, 0xde, 
22120 +0xfa, 0xd0, 0x05, 0xef, 0xc3, 0x94, 0x15, 0x50, 0x03, 0xd0, 0xa8, 0x22, 0x13, 0x70, 0x03, 0xd0, 
22121 +0xa8, 0x22, 0xff, 0xd5, 0x07, 0xfd, 0xd0, 0xa8, 0x22, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 
22122 +0x04, 0xc0, 0x05, 0xe5, 0x44, 0x24, 0x08, 0xf8, 0x86, 0x05, 0x53, 0x05, 0x7f, 0x7c, 0xff, 0x12, 
22123 +0x0f, 0xfe, 0x7f, 0x00, 0x7e, 0x00, 0xe5, 0x49, 0x60, 0x46, 0xfc, 0x90, 0xf9, 0x19, 0xe0, 0x54, 
22124 +0x7f, 0x6d, 0x70, 0x0f, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xa3, 0x15, 
22125 +0x49, 0x80, 0x07, 0xa3, 0xa3, 0xa3, 0xdc, 0xe6, 0x80, 0x26, 0xdc, 0x06, 0xd0, 0x82, 0xd0, 0x83, 
22126 +0x80, 0x1e, 0xe0, 0xf8, 0xa3, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa, 0xd0, 0x82, 0xd0, 0x83, 0xe8, 0xf0, 
22127 +0xa3, 0xe9, 0xf0, 0xa3, 0xea, 0xf0, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0x80, 0xda, 
22128 +0x12, 0x10, 0x95, 0xd0, 0x05, 0xd0, 0x04, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0x22, 0x85, 0xa8, 
22129 +0x4a, 0x75, 0xa8, 0x88, 0xec, 0x70, 0x02, 0x7c, 0x3f, 0x8c, 0x43, 0x22, 0xe5, 0x44, 0x24, 0x08, 
22130 +0xf8, 0x76, 0x00, 0x12, 0x10, 0xec, 0x80, 0xfb, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x04, 
22131 +0xc0, 0x06, 0x7c, 0xff, 0x12, 0x0f, 0xfe, 0xe5, 0x49, 0x60, 0x42, 0xfe, 0x90, 0xf9, 0x19, 0xe0, 
22132 +0x54, 0x7f, 0x6f, 0x70, 0x0b, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0x15, 0x49, 0x80, 0x07, 
22133 +0xa3, 0xa3, 0xa3, 0xde, 0xea, 0x80, 0x26, 0xde, 0x06, 0xd0, 0x82, 0xd0, 0x83, 0x80, 0xd8, 0xe0, 
22134 +0xf8, 0xa3, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa, 0xd0, 0x82, 0xd0, 0x83, 0xe8, 0xf0, 0xa3, 0xe9, 0xf0, 
22135 +0xa3, 0xea, 0xf0, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0x80, 0xda, 0x78, 0x08, 0x08, 
22136 +0x79, 0x18, 0x09, 0x7c, 0x01, 0xe6, 0x54, 0x7f, 0x6f, 0x70, 0x06, 0x76, 0x00, 0x77, 0x00, 0x80, 
22137 +0x06, 0x08, 0x09, 0x0c, 0xbc, 0x08, 0xee, 0x12, 0x10, 0x95, 0xd0, 0x06, 0xd0, 0x04, 0xd0, 0x02, 
22138 +0xd0, 0x01, 0xd0, 0x00, 0x22, 0x75, 0x43, 0x00, 0x85, 0x4a, 0xa8, 0x22, 0xc0, 0xf0, 0xc0, 0x82, 
22139 +0xc0, 0x83, 0xc3, 0xe5, 0x49, 0x24, 0xe8, 0x50, 0x05, 0x12, 0x10, 0xec, 0x80, 0xf4, 0xef, 0x60, 
22140 +0x31, 0x90, 0x2e, 0x2c, 0xe4, 0x93, 0xc3, 0x9f, 0x40, 0x2f, 0xc0, 0x04, 0x7c, 0xff, 0x12, 0x0f, 
22141 +0xfe, 0xd0, 0x04, 0x43, 0x07, 0x80, 0xe5, 0x49, 0x75, 0xf0, 0x03, 0xa4, 0x24, 0x19, 0xf5, 0x82, 
22142 +0xe4, 0x34, 0xf9, 0xf5, 0x83, 0xef, 0xf0, 0xec, 0xa3, 0xf0, 0xed, 0xa3, 0xf0, 0x05, 0x49, 0x12, 
22143 +0x10, 0x95, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0xf0, 0x22, 0x02, 0x11, 0x1a, 0xc0, 0x04, 0x7c, 0x20, 
22144 +0xd2, 0x8c, 0xd2, 0x8d, 0xd5, 0x04, 0xfd, 0xd0, 0x04, 0x22, 0x75, 0xa8, 0x00, 0x75, 0x88, 0x00, 
22145 +0x75, 0xb8, 0x00, 0x75, 0xf0, 0x00, 0x75, 0xd0, 0x00, 0xe4, 0xf8, 0x90, 0xf8, 0x04, 0xf0, 0x90, 
22146 +0x00, 0x00, 0xf6, 0x08, 0xb8, 0x00, 0xfb, 0x02, 0x00, 0x00, 0xc2, 0xaf, 0xe4, 0x90, 0xff, 0x48, 
22147 +0xf0, 0x90, 0xff, 0x50, 0xf0, 0x90, 0xff, 0x08, 0xf0, 0x90, 0xff, 0x10, 0xf0, 0x90, 0xff, 0x80, 
22148 +0xf0, 0xa3, 0xa3, 0xf0, 0xd2, 0xb1, 0xc2, 0xb0, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0x62, 0x7e, 
22149 +0xff, 0x7f, 0xff, 0x12, 0x0f, 0x62, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0x62, 0xd2, 0xb0, 0xd2, 
22150 +0xb1, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0x62, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0x62, 0x7e, 
22151 +0xff, 0x7f, 0xff, 0x12, 0x0f, 0x62, 0x80, 0xcc, 0xc3, 0xee, 0x94, 0x02, 0x50, 0x04, 0x7e, 0x03, 
22152 +0x7f, 0xe8, 0xef, 0xf4, 0xff, 0xee, 0xf4, 0xfe, 0x0f, 0xbf, 0x00, 0x01, 0x0e, 0x8f, 0x48, 0x8e, 
22153 +0x47, 0x22, 0xc3, 0xef, 0x94, 0xbc, 0xee, 0x94, 0x02, 0x50, 0x04, 0x7e, 0x07, 0x7f, 0xd0, 0xef, 
22154 +0xf4, 0xff, 0xee, 0xf4, 0xfe, 0x0f, 0xbf, 0x00, 0x01, 0x0e, 0x8f, 0x46, 0x8e, 0x45, 0x22, 0xef, 
22155 +0x70, 0x01, 0x22, 0xc0, 0x00, 0xe5, 0x44, 0x24, 0x18, 0xf8, 0xa6, 0x07, 0xe5, 0x44, 0x24, 0x08, 
22156 +0xf8, 0xc6, 0x54, 0x7f, 0xf6, 0xe6, 0x30, 0xe7, 0x03, 0xd0, 0x00, 0x22, 0x12, 0x10, 0xec, 0x80, 
22157 +0xf4, 0xc0, 0x00, 0x7f, 0x01, 0xef, 0x24, 0x08, 0xf8, 0xe6, 0x60, 0x09, 0x0f, 0xbf, 0x08, 0xf5, 
22158 +0x12, 0x10, 0xec, 0x80, 0xee, 0xd0, 0x00, 0x22, 0xc0, 0xf0, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x00, 
22159 +0xc0, 0x06, 0xc0, 0x04, 0xed, 0x24, 0x10, 0xf8, 0x76, 0xa0, 0xed, 0x75, 0xf0, 0x21, 0xa4, 0x24, 
22160 +0x05, 0xf5, 0x82, 0xe4, 0x34, 0xf8, 0xf5, 0x83, 0xc0, 0x82, 0xc0, 0x83, 0xa3, 0xa3, 0xe4, 0x78, 
22161 +0x0d, 0xf0, 0xa3, 0xd8, 0xfc, 0xef, 0x54, 0x7f, 0x75, 0xf0, 0x02, 0xa4, 0x24, 0x0e, 0xf5, 0x82, 
22162 +0xe5, 0xf0, 0x34, 0x2e, 0xf5, 0x83, 0xe4, 0x93, 0xfe, 0x74, 0x01, 0x93, 0xfc, 0xd0, 0x83, 0xd0, 
22163 +0x82, 0xec, 0xf0, 0xa3, 0xee, 0xf0, 0xed, 0x24, 0x08, 0xf8, 0xef, 0x44, 0x80, 0xf6, 0xd0, 0x04, 
22164 +0xd0, 0x06, 0xd0, 0x00, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0xf0, 0x22, 0x75, 0x44, 0x00, 0x75, 0x49, 
22165 +0x00, 0x7a, 0x08, 0x79, 0x18, 0x78, 0x08, 0x76, 0x00, 0x77, 0x00, 0x08, 0x09, 0xda, 0xf8, 0x90, 
22166 +0xf8, 0x04, 0xe0, 0xfc, 0x90, 0x2e, 0x2c, 0xe4, 0x93, 0xc3, 0x9c, 0x50, 0x05, 0xe4, 0x90, 0xf8, 
22167 +0x04, 0xf0, 0x78, 0x08, 0x74, 0x80, 0x44, 0x7f, 0xf6, 0x74, 0x01, 0x44, 0x10, 0xf5, 0x89, 0x75, 
22168 +0xb8, 0x00, 0xd2, 0xab, 0xd2, 0xa9, 0x22, 0x75, 0x81, 0x91, 0xd2, 0x8e, 0xd2, 0x8c, 0xd2, 0xaf, 
22169 +0xe5, 0x49, 0x60, 0x36, 0xff, 0x90, 0xf9, 0x19, 0xe0, 0x54, 0x80, 0x60, 0x28, 0x78, 0x08, 0x79, 
22170 +0x08, 0xe0, 0x54, 0x7f, 0xfa, 0x7b, 0x00, 0xe6, 0x54, 0x7f, 0xb5, 0x02, 0x02, 0x7b, 0xff, 0x08, 
22171 +0xd9, 0xf5, 0xeb, 0x70, 0x10, 0xea, 0xf0, 0xc0, 0x07, 0x12, 0x11, 0xc1, 0xad, 0x07, 0xaf, 0x02, 
22172 +0x12, 0x11, 0xd8, 0xd0, 0x07, 0xa3, 0xa3, 0xa3, 0xdf, 0xce, 0x12, 0x10, 0xec, 0x80, 0xc1, 0xe7, 
22173 +0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e, 0x88, 
22174 +0x82, 0x8c, 0x83, 0xe7, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x32, 0xe3, 0x09, 0xf6, 0x08, 0xdf, 
22175 +0xfa, 0x80, 0x78, 0xe3, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x70, 0x88, 0x82, 0x8c, 0x83, 0xe3, 
22176 +0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x64, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf6, 0x08, 0xdf, 
22177 +0xfa, 0x80, 0x58, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x4c, 0x80, 
22178 +0xd2, 0x80, 0xfa, 0x80, 0xc6, 0x80, 0xd4, 0x80, 0x69, 0x80, 0xf2, 0x80, 0x33, 0x80, 0x10, 0x80, 
22179 +0xa6, 0x80, 0xea, 0x80, 0x9a, 0x80, 0xa8, 0x80, 0xda, 0x80, 0xe2, 0x80, 0xca, 0x80, 0x33, 0x89, 
22180 +0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 
22181 +0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0x0d, 
22182 +0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf6, 0x08, 0xdf, 0xf9, 0xec, 0xfa, 0xa9, 0xf0, 0xed, 
22183 +0xfb, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 
22184 +0x83, 0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xea, 0xde, 0xe8, 
22185 +0x80, 0xdb, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf2, 0x08, 0xdf, 0xf9, 0x80, 0xcc, 0x88, 
22186 +0xf0, 0xef, 0x60, 0x01, 0x0e, 0x4e, 0x60, 0xc3, 0x88, 0xf0, 0xed, 0x24, 0x02, 0xb4, 0x04, 0x00, 
22187 +0x50, 0xb9, 0xf5, 0x82, 0xeb, 0x24, 0x02, 0xb4, 0x04, 0x00, 0x50, 0xaf, 0x23, 0x23, 0x45, 0x82, 
22188 +0x23, 0x90, 0x13, 0x0f, 0x73, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 
22189 +0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 
22190 +0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 
22191 +0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 
22192 +0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 
22193 +0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xf8, 0xbb, 0x01, 
22194 +0x0d, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe8, 0xf0, 0x22, 0x50, 0x06, 
22195 +0xe9, 0x25, 0x82, 0xc8, 0xf6, 0x22, 0xbb, 0xfe, 0x05, 0xe9, 0x25, 0x82, 0xc8, 0xf2, 0x22, 0xc5, 
22196 +0xf0, 0xf8, 0xa3, 0xe0, 0x28, 0xf0, 0xc5, 0xf0, 0xf8, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02, 0x15, 
22197 +0x83, 0xe0, 0x38, 0xf0, 0x22, 0xa3, 0xf8, 0xe0, 0xc5, 0xf0, 0x25, 0xf0, 0xf0, 0xe5, 0x82, 0x15, 
22198 +0x82, 0x70, 0x02, 0x15, 0x83, 0xe0, 0xc8, 0x38, 0xf0, 0xe8, 0x22, 0xbb, 0x01, 0x10, 0xe5, 0x82, 
22199 +0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0, 0xa3, 0xe0, 0x22, 0x50, 0x09, 
22200 +0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe, 0x0a, 0xe9, 0x25, 0x82, 0xf8, 
22201 +0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83, 0xe9, 0x93, 0xf5, 0xf0, 0xa3, 
22202 +0xe9, 0x93, 0x22, 0xbb, 0x01, 0x0a, 0x89, 0x82, 0x8a, 0x83, 0xf0, 0xe5, 0xf0, 0xa3, 0xf0, 0x22, 
22203 +0x50, 0x06, 0xf7, 0x09, 0xa7, 0xf0, 0x19, 0x22, 0xbb, 0xfe, 0x06, 0xf3, 0xe5, 0xf0, 0x09, 0xf3, 
22204 +0x19, 0x22, 0xf8, 0xbb, 0x01, 0x11, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 
22205 +0xe8, 0xf0, 0xe5, 0xf0, 0xa3, 0xf0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xc8, 0xf6, 0x08, 0xa6, 
22206 +0xf0, 0x22, 0xbb, 0xfe, 0x09, 0xe9, 0x25, 0x82, 0xc8, 0xf2, 0xe5, 0xf0, 0x08, 0xf2, 0x22, 0xa4, 
22207 +0x25, 0x82, 0xf5, 0x82, 0xe5, 0xf0, 0x35, 0x83, 0xf5, 0x83, 0x22, 0xe6, 0xfb, 0x08, 0xe6, 0xfa, 
22208 +0x08, 0xe6, 0xf9, 0x22, 0xeb, 0xf6, 0x08, 0xea, 0xf6, 0x08, 0xe9, 0xf6, 0x22, 0xe0, 0xfb, 0xa3, 
22209 +0xe0, 0xfa, 0xa3, 0xe0, 0xf9, 0x22, 0xeb, 0xf0, 0xa3, 0xea, 0xf0, 0xa3, 0xe9, 0xf0, 0x22, 0xd0, 
22210 +0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 
22211 +0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 
22212 +0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0x90, 0xff, 0xfa, 0x74, 0x08, 0xf0, 0xa3, 0x74, 0x16, 0xf0, 0x90, 
22213 +0xff, 0xf9, 0x74, 0x02, 0xf0, 0x90, 0xfa, 0xcb, 0xe4, 0xf0, 0xa3, 0x74, 0x0b, 0xf0, 0x7b, 0x00, 
22214 +0x7a, 0x00, 0x79, 0x37, 0x75, 0x40, 0x00, 0xf5, 0x41, 0x7d, 0x01, 0x12, 0x23, 0xee, 0xe5, 0x37, 
22215 +0x24, 0x80, 0x90, 0xff, 0xf8, 0xf0, 0xe5, 0x37, 0x64, 0x07, 0x60, 0x0b, 0xe5, 0x37, 0x64, 0x06, 
22216 +0x60, 0x05, 0xe5, 0x37, 0xb4, 0x14, 0x1b, 0xd2, 0x94, 0xd2, 0x95, 0xd2, 0x92, 0xd2, 0x93, 0xe5, 
22217 +0x37, 0xb4, 0x07, 0x08, 0x90, 0xf9, 0x65, 0x74, 0x02, 0xf0, 0x80, 0x06, 0x90, 0xf9, 0x65, 0x74, 
22218 +0x01, 0xf0, 0x90, 0xfa, 0xcb, 0xe4, 0xf0, 0xa3, 0x74, 0x0d, 0xf0, 0x12, 0x17, 0x71, 0x90, 0xff, 
22219 +0xf5, 0xe5, 0x37, 0xf0, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xcb, 0xe4, 0xfd, 0x12, 0x20, 0xc5, 0x90, 
22220 +0xfa, 0xcb, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x14, 0x2f, 0x12, 0x17, 0x71, 0xe5, 0x37, 0x30, 0xe7, 
22221 +0x02, 0xd2, 0x02, 0xe4, 0xf5, 0x2c, 0xf5, 0x2a, 0xf5, 0x2b, 0xf5, 0x29, 0x12, 0x19, 0x92, 0x12, 
22222 +0x18, 0x49, 0x12, 0x19, 0x6c, 0x90, 0xf9, 0x66, 0x12, 0x15, 0x06, 0x90, 0xf9, 0x6b, 0x12, 0x15, 
22223 +0x06, 0x90, 0xff, 0xff, 0xe4, 0xf0, 0x90, 0xff, 0x83, 0xe0, 0xe4, 0xf0, 0x90, 0xff, 0x81, 0x74, 
22224 +0x80, 0xf0, 0xa3, 0x74, 0x84, 0xf0, 0x90, 0xff, 0x80, 0xf0, 0xe4, 0xf5, 0x37, 0xe5, 0x37, 0x12, 
22225 +0x18, 0xbf, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x37, 0x12, 0x18, 0xcd, 0xf5, 0x83, 0xe4, 0xf0, 0x05, 
22226 +0x37, 0xe5, 0x37, 0xb4, 0x07, 0xe7, 0x78, 0x80, 0x76, 0xfe, 0x08, 0x76, 0xf0, 0x90, 0x2f, 0x06, 
22227 +0xe4, 0x93, 0xff, 0x78, 0x7e, 0xf6, 0xfd, 0xad, 0x07, 0x90, 0x2f, 0x13, 0xe4, 0x93, 0xff, 0x08, 
22228 +0xf6, 0xff, 0xed, 0x54, 0x0f, 0xfd, 0x12, 0x18, 0xaf, 0x74, 0x84, 0xf0, 0xed, 0x75, 0xf0, 0x08, 
22229 +0xa4, 0x24, 0x47, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0xc3, 0x74, 0xf0, 0x9f, 
22230 +0x78, 0x81, 0xf6, 0x74, 0xfe, 0x94, 0x00, 0x18, 0x12, 0x18, 0x41, 0xce, 0xc3, 0x13, 0xce, 0x13, 
22231 +0xd8, 0xf9, 0xff, 0xed, 0x12, 0x19, 0x07, 0xef, 0xf0, 0xed, 0x12, 0x19, 0x2d, 0xe4, 0xf5, 0x37, 
22232 +0xe5, 0x37, 0x90, 0x2f, 0x00, 0x93, 0xff, 0x78, 0x7e, 0xf6, 0xfd, 0xe5, 0x37, 0x25, 0xe0, 0x24, 
22233 +0x07, 0xf5, 0x82, 0xe4, 0x34, 0x2f, 0xf5, 0x83, 0xe4, 0x93, 0x08, 0xf6, 0xed, 0x30, 0xe7, 0x53, 
22234 +0x18, 0xe6, 0x54, 0x0f, 0xf9, 0x12, 0x18, 0xaf, 0x12, 0x19, 0x15, 0x24, 0x47, 0xf5, 0x82, 0xe4, 
22235 +0x34, 0xff, 0x12, 0x18, 0x31, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0xe9, 0x12, 0x19, 
22236 +0x07, 0xef, 0xf0, 0x12, 0x18, 0x38, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0x12, 0x19, 0x1a, 
22237 +0x24, 0x45, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0xe9, 0x12, 0x19, 0x2d, 0xe9, 
22238 +0x75, 0xf0, 0x08, 0xa4, 0x24, 0x46, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0x74, 0x80, 0xf0, 
22239 +0x02, 0x17, 0x46, 0x78, 0x7e, 0xe6, 0x54, 0x0f, 0xf9, 0x12, 0x18, 0xf9, 0x12, 0x19, 0x15, 0x24, 
22240 +0x07, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0x12, 0x18, 0x31, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 
22241 +0x12, 0x19, 0x1a, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0x12, 0x18, 
22242 +0x38, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0x12, 0x19, 0x1a, 0x24, 0x05, 0xf5, 0x82, 0xe4, 
22243 +0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0xe9, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 
22244 +0x34, 0xff, 0xf5, 0x83, 0xe4, 0xf0, 0xe9, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4, 
22245 +0x34, 0xff, 0xf5, 0x83, 0xe4, 0xf0, 0x05, 0x37, 0xe5, 0x37, 0x64, 0x04, 0x60, 0x03, 0x02, 0x16, 
22246 +0x70, 0x90, 0x2f, 0x05, 0xe4, 0x93, 0xff, 0x78, 0x7e, 0xf6, 0x12, 0x18, 0xf7, 0xe4, 0xf0, 0x90, 
22247 +0x2f, 0x04, 0x93, 0xff, 0xf6, 0x12, 0x18, 0xad, 0xe4, 0xf0, 0x90, 0xff, 0xfd, 0x74, 0x05, 0xf0, 
22248 +0x22, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x37, 0x90, 0xfa, 0xcb, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x14, 
22249 +0x45, 0x85, 0xf0, 0x41, 0xf5, 0x40, 0x7d, 0x01, 0x02, 0x23, 0xee, 0xab, 0x2d, 0xaa, 0x2e, 0xa9, 
22250 +0x2f, 0xe5, 0x52, 0x12, 0x13, 0xfb, 0x74, 0x01, 0x25, 0x2f, 0xf5, 0x2f, 0xe4, 0x35, 0x2e, 0xf5, 
22251 +0x2e, 0xab, 0x2d, 0xfa, 0xa9, 0x2f, 0x74, 0x11, 0x12, 0x13, 0xfb, 0x74, 0x01, 0x25, 0x2f, 0xf5, 
22252 +0x2f, 0xe4, 0x35, 0x2e, 0xf5, 0x2e, 0x90, 0xff, 0x06, 0xe0, 0xab, 0x2d, 0xaa, 0x2e, 0xa9, 0x2f, 
22253 +0x12, 0x13, 0xfb, 0x74, 0x01, 0x25, 0x2f, 0xf5, 0x2f, 0xe4, 0x35, 0x2e, 0xf5, 0x2e, 0xab, 0x2d, 
22254 +0xfa, 0xa9, 0x2f, 0xe4, 0x12, 0x13, 0xfb, 0x04, 0x25, 0x2f, 0xf5, 0x2f, 0xe4, 0x35, 0x2e, 0xf5, 
22255 +0x2e, 0xab, 0x2d, 0xfa, 0xa9, 0x2f, 0xe4, 0x12, 0x13, 0xfb, 0x04, 0x25, 0x2f, 0xf5, 0x2f, 0xe4, 
22256 +0x35, 0x2e, 0xf5, 0x2e, 0x90, 0xff, 0x04, 0xe0, 0xab, 0x2d, 0xaa, 0x2e, 0xa9, 0x2f, 0x12, 0x13, 
22257 +0xfb, 0x74, 0x01, 0x25, 0x2f, 0xf5, 0x2f, 0xe4, 0x35, 0x2e, 0xf5, 0x2e, 0x90, 0xff, 0x05, 0xe0, 
22258 +0xab, 0x2d, 0xaa, 0x2e, 0xa9, 0x2f, 0x12, 0x13, 0xfb, 0x74, 0x01, 0x25, 0x2f, 0xf5, 0x2f, 0xe4, 
22259 +0x35, 0x2e, 0xf5, 0x2e, 0x22, 0xf5, 0x83, 0xe0, 0x54, 0x08, 0xab, 0x2d, 0xaa, 0x2e, 0xa9, 0x2f, 
22260 +0x22, 0xf5, 0x83, 0xef, 0xf0, 0xfd, 0x7c, 0x00, 0xc3, 0x78, 0x81, 0xe6, 0x9d, 0xf6, 0x18, 0xe6, 
22261 +0x9c, 0xf6, 0xe6, 0xfe, 0x08, 0xe6, 0x78, 0x03, 0x22, 0x75, 0x2d, 0x01, 0x75, 0x2e, 0xf9, 0x75, 
22262 +0x2f, 0x6e, 0x22, 0x90, 0xfa, 0xba, 0xe0, 0x90, 0xfa, 0xb6, 0xf0, 0x90, 0xfa, 0xb5, 0xe0, 0x24, 
22263 +0xfc, 0x22, 0x90, 0xfa, 0xb8, 0xe0, 0xff, 0x7e, 0x00, 0xc3, 0x90, 0xfa, 0xbc, 0xe0, 0x9f, 0xf0, 
22264 +0x90, 0xfa, 0xbb, 0xe0, 0x9e, 0xf0, 0x90, 0xfa, 0xb3, 0xee, 0x8f, 0xf0, 0x12, 0x14, 0x2f, 0xef, 
22265 +0x25, 0x55, 0xf5, 0x55, 0xee, 0x35, 0x54, 0xf5, 0x54, 0x22, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xb0, 
22266 +0x90, 0xfa, 0xb3, 0xe0, 0xf5, 0x40, 0xa3, 0xe0, 0xf5, 0x41, 0x22, 0x78, 0x82, 0xe6, 0xfe, 0x08, 
22267 +0xe6, 0x8e, 0x83, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0x22, 0x54, 0x0f, 0x75, 
22268 +0xf0, 0x08, 0xa4, 0x24, 0x40, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0x22, 0xe5, 0x53, 0x75, 
22269 +0xf0, 0x08, 0xa4, 0x24, 0x48, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0x22, 0xe5, 0x53, 0x75, 0xf0, 0x08, 
22270 +0xa4, 0x24, 0x08, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0x22, 0x90, 0xff, 0x00, 0xe0, 0x54, 0x1f, 0x22, 
22271 +0x90, 0xfa, 0xb5, 0xe0, 0xff, 0x24, 0xfc, 0x22, 0x75, 0x2a, 0x00, 0x8f, 0x2b, 0x90, 0xf9, 0x6b, 
22272 +0x12, 0x14, 0xfd, 0x90, 0x00, 0x02, 0x22, 0x54, 0x0f, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 
22273 +0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0x22, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x41, 0xf5, 0x82, 0xe4, 
22274 +0x34, 0xff, 0xf5, 0x83, 0x22, 0x74, 0x80, 0xf0, 0x08, 0xe6, 0xff, 0xe9, 0x75, 0xf0, 0x08, 0xa4, 
22275 +0x22, 0x74, 0xae, 0x25, 0x36, 0xf5, 0x82, 0xe4, 0x34, 0xfa, 0xf5, 0x83, 0x22, 0x75, 0xf0, 0x08, 
22276 +0xa4, 0x24, 0x42, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0x74, 0x80, 0xf0, 0x22, 0x90, 0xff, 
22277 +0x82, 0xe0, 0x44, 0x08, 0xf0, 0x22, 0x90, 0xff, 0xfe, 0xe0, 0x44, 0x03, 0xf0, 0x90, 0xff, 0xfc, 
22278 +0xe0, 0x54, 0xfd, 0xf0, 0x22, 0x78, 0x6d, 0xe6, 0x54, 0xfd, 0xf6, 0x90, 0xff, 0xfd, 0x74, 0x65, 
22279 +0xf0, 0x22, 0x12, 0x14, 0xdf, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x4e, 0x22, 0x7b, 0x01, 0x7a, 0xf9, 
22280 +0x79, 0x6e, 0x22, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xb3, 0x22, 0x90, 0xff, 0x80, 0xe0, 0x44, 0x08, 
22281 +0xf0, 0x22, 0x90, 0xff, 0x83, 0xe0, 0x54, 0x7f, 0xf0, 0x22, 0xe0, 0xff, 0x90, 0xf9, 0x66, 0x02, 
22282 +0x14, 0xfd, 0x75, 0x30, 0x01, 0x75, 0x31, 0x09, 0x22, 0xd3, 0xe5, 0x35, 0x94, 0x08, 0xe5, 0x34, 
22283 +0x94, 0x01, 0x22, 0x90, 0xfa, 0xba, 0xe0, 0xff, 0x90, 0xfa, 0xb6, 0xf0, 0x22, 0x90, 0xff, 0xa4, 
22284 +0xe0, 0x54, 0xef, 0x22, 0x90, 0xff, 0xb4, 0xe0, 0x54, 0xef, 0x22, 0x8f, 0x38, 0x12, 0x27, 0x19, 
22285 +0x78, 0x86, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x8e, 0x83, 0x24, 0x08, 0x12, 0x20, 0x25, 0xe0, 0xfd, 
22286 +0x12, 0x20, 0xa6, 0x8a, 0x83, 0x24, 0x0a, 0x12, 0x20, 0x25, 0xed, 0xf0, 0x12, 0x20, 0x7c, 0x24, 
22287 +0x07, 0x12, 0x20, 0x25, 0xe0, 0xff, 0x12, 0x20, 0xbe, 0x24, 0x09, 0x12, 0x20, 0x25, 0xef, 0xf0, 
22288 +0x90, 0xf9, 0x65, 0xe0, 0x30, 0xe4, 0x20, 0x08, 0x12, 0x20, 0x2f, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 
22289 +0xe0, 0x25, 0xe0, 0xff, 0x05, 0x82, 0xd5, 0x82, 0x02, 0x15, 0x83, 0x15, 0x82, 0xe0, 0x33, 0xd0, 
22290 +0x82, 0xd0, 0x83, 0xf0, 0xa3, 0xef, 0xf0, 0x78, 0x86, 0x12, 0x20, 0x2f, 0xe0, 0xfc, 0xa3, 0xe0, 
22291 +0xfd, 0xec, 0xff, 0x12, 0x20, 0xa6, 0x8a, 0x83, 0x24, 0x08, 0x12, 0x20, 0x25, 0xef, 0xf0, 0xed, 
22292 +0x12, 0x20, 0xbe, 0x24, 0x07, 0x12, 0x20, 0x25, 0xed, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 
22293 +0xe0, 0xff, 0x53, 0x07, 0xc7, 0x08, 0xe6, 0xfc, 0x08, 0xe6, 0xfd, 0x12, 0x20, 0x69, 0xa3, 0xe0, 
22294 +0x30, 0xe3, 0x12, 0x8d, 0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, 0x05, 0x12, 0x20, 0x25, 0xe0, 0x90, 
22295 +0x2f, 0x4d, 0x93, 0x42, 0x07, 0x53, 0x07, 0xfb, 0x12, 0x20, 0xae, 0x24, 0x06, 0x12, 0x20, 0x25, 
22296 +0xe0, 0x60, 0x03, 0x43, 0x07, 0x04, 0x53, 0x07, 0xfc, 0x78, 0x86, 0x12, 0x20, 0x96, 0x24, 0x04, 
22297 +0x12, 0x20, 0x25, 0xe0, 0x42, 0x07, 0x43, 0x07, 0x80, 0x12, 0x20, 0xa6, 0xf5, 0x82, 0x8a, 0x83, 
22298 +0xa3, 0xa3, 0xef, 0xf0, 0x12, 0x20, 0xbe, 0x24, 0x04, 0x12, 0x20, 0x25, 0xe0, 0xff, 0x8d, 0x82, 
22299 +0x8c, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0x30, 0xe1, 0x05, 0x53, 0x07, 0xdf, 0x80, 
22300 +0x03, 0x43, 0x07, 0x20, 0xec, 0x30, 0xe4, 0x05, 0x53, 0x07, 0xef, 0x80, 0x03, 0x43, 0x07, 0x10, 
22301 +0x90, 0xf9, 0x65, 0xe0, 0xfe, 0x54, 0x03, 0x60, 0x4c, 0x53, 0x07, 0xdf, 0xee, 0x30, 0xe1, 0x42, 
22302 +0x12, 0x20, 0xae, 0x24, 0x09, 0x12, 0x20, 0x25, 0xe0, 0x14, 0x60, 0x31, 0x14, 0x60, 0x29, 0x14, 
22303 +0x60, 0x26, 0x14, 0x60, 0x28, 0x24, 0x04, 0x70, 0x2c, 0xe5, 0x38, 0xb4, 0x03, 0x0d, 0x30, 0x95, 
22304 +0x05, 0x43, 0x07, 0x02, 0x80, 0x1f, 0x53, 0x07, 0xfd, 0x80, 0x1a, 0x30, 0x93, 0x05, 0x43, 0x07, 
22305 +0x02, 0x80, 0x12, 0x53, 0x07, 0xfd, 0x80, 0x0d, 0x43, 0x07, 0x02, 0x80, 0x08, 0x53, 0x07, 0xfd, 
22306 +0x80, 0x03, 0x53, 0x07, 0xfd, 0x12, 0x20, 0x94, 0x24, 0x04, 0x12, 0x20, 0x25, 0xef, 0xf0, 0x8d, 
22307 +0x82, 0x8c, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xff, 0x90, 0xf9, 0x65, 0xe0, 0xfe, 0x54, 0x03, 0x60, 
22308 +0x4a, 0xee, 0x30, 0xe1, 0x43, 0x08, 0x12, 0x20, 0xb0, 0x24, 0x09, 0x12, 0x20, 0x25, 0xe0, 0x14, 
22309 +0x60, 0x2c, 0x14, 0x60, 0x2e, 0x14, 0x60, 0x26, 0x14, 0x60, 0x28, 0x24, 0x04, 0x70, 0x2c, 0xe5, 
22310 +0x38, 0xb4, 0x03, 0x0d, 0x30, 0x94, 0x05, 0x53, 0x07, 0x7f, 0x80, 0x1f, 0x43, 0x07, 0x80, 0x80, 
22311 +0x1a, 0x30, 0x92, 0x05, 0x53, 0x07, 0x7f, 0x80, 0x12, 0x43, 0x07, 0x80, 0x80, 0x0d, 0x53, 0x07, 
22312 +0x7f, 0x80, 0x08, 0x43, 0x07, 0x80, 0x80, 0x03, 0x53, 0x07, 0x7f, 0x78, 0x86, 0x12, 0x20, 0x65, 
22313 +0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0x30, 0xe0, 0x05, 0x43, 0x07, 0x20, 0x80, 0x03, 0x53, 0x07, 0xdf, 
22314 +0xec, 0x30, 0xe3, 0x05, 0x43, 0x07, 0x40, 0x80, 0x03, 0x53, 0x07, 0xbf, 0xec, 0x30, 0xe0, 0x05, 
22315 +0x43, 0x07, 0x10, 0x80, 0x03, 0x53, 0x07, 0xef, 0xed, 0x30, 0xe4, 0x05, 0x43, 0x07, 0x08, 0x80, 
22316 +0x03, 0x53, 0x07, 0xf7, 0xed, 0x30, 0xe5, 0x05, 0x43, 0x07, 0x04, 0x80, 0x03, 0x53, 0x07, 0xfb, 
22317 +0xed, 0x30, 0xe6, 0x05, 0x43, 0x07, 0x01, 0x80, 0x03, 0x53, 0x07, 0xfe, 0xed, 0x30, 0xe7, 0x05, 
22318 +0x43, 0x07, 0x02, 0x80, 0x03, 0x53, 0x07, 0xfd, 0x78, 0x84, 0x12, 0x20, 0x65, 0xa3, 0xef, 0xf0, 
22319 +0x12, 0x2f, 0x80, 0x7f, 0x00, 0x22, 0x12, 0x0f, 0x89, 0x78, 0x8e, 0xef, 0xf6, 0x12, 0x27, 0x19, 
22320 +0x12, 0x20, 0x70, 0x8e, 0x83, 0x24, 0x09, 0x12, 0x20, 0x25, 0xe0, 0xfd, 0x12, 0x20, 0x53, 0x90, 
22321 +0x00, 0x0a, 0x12, 0x20, 0x78, 0x24, 0x0a, 0x12, 0x20, 0x25, 0xe0, 0x90, 0x00, 0x0b, 0x12, 0x14, 
22322 +0x0d, 0x12, 0x20, 0x70, 0xf5, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xf5, 0x59, 0x12, 0x20, 
22323 +0x7c, 0x24, 0x04, 0x12, 0x20, 0x25, 0xe0, 0xf5, 0x5a, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 
22324 +0xf5, 0x5b, 0xe5, 0x59, 0xc4, 0x13, 0x13, 0x13, 0x54, 0x01, 0x78, 0x8e, 0xf6, 0xd3, 0x94, 0x00, 
22325 +0x40, 0x06, 0xe5, 0x5a, 0x30, 0xe1, 0x01, 0x06, 0x78, 0x8e, 0xe6, 0x12, 0x20, 0x52, 0x90, 0x00, 
22326 +0x0c, 0xef, 0x12, 0x14, 0x0d, 0x78, 0x86, 0x12, 0x20, 0x2f, 0xa3, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 
22327 +0xff, 0x53, 0x07, 0x0c, 0x53, 0x06, 0xe6, 0xe5, 0x59, 0x30, 0xe5, 0x03, 0x43, 0x07, 0x01, 0xe5, 
22328 +0x5a, 0x20, 0xe5, 0x0e, 0xe5, 0x59, 0x54, 0x7f, 0x70, 0x08, 0xe5, 0x59, 0x20, 0xe7, 0x03, 0x43, 
22329 +0x07, 0x02, 0xe5, 0x59, 0x30, 0xe3, 0x03, 0x43, 0x07, 0x10, 0xe5, 0x59, 0x30, 0xe2, 0x03, 0x43, 
22330 +0x07, 0x20, 0xe5, 0x59, 0x54, 0x03, 0x60, 0x03, 0x43, 0x07, 0x40, 0xe5, 0x59, 0x30, 0xe1, 0x03, 
22331 +0x43, 0x07, 0x80, 0xe5, 0x59, 0x30, 0xe4, 0x03, 0x43, 0x06, 0x01, 0xe5, 0x59, 0x30, 0xe6, 0x03, 
22332 +0x43, 0x06, 0x08, 0xe5, 0x5a, 0x20, 0xe4, 0x0e, 0xe5, 0x59, 0x54, 0x7f, 0x70, 0x08, 0xe5, 0x59, 
22333 +0x20, 0xe7, 0x03, 0x43, 0x06, 0x10, 0x53, 0x07, 0xfb, 0x53, 0x06, 0x79, 0x90, 0x00, 0x05, 0xee, 
22334 +0x8f, 0xf0, 0x12, 0x14, 0xb2, 0xe5, 0x5b, 0x30, 0xe3, 0x12, 0x54, 0x30, 0xff, 0xc4, 0x54, 0x0f, 
22335 +0x12, 0x20, 0x52, 0x90, 0x00, 0x08, 0xef, 0x12, 0x14, 0x0d, 0x80, 0x0a, 0x12, 0x20, 0x53, 0x90, 
22336 +0x00, 0x08, 0xe4, 0x12, 0x14, 0x0d, 0xe5, 0x5b, 0x54, 0x03, 0x12, 0x20, 0x52, 0x90, 0x00, 0x07, 
22337 +0xef, 0x12, 0x14, 0x0d, 0xe5, 0x5b, 0x54, 0x04, 0xff, 0xc3, 0x13, 0x90, 0x00, 0x09, 0x12, 0x14, 
22338 +0x0d, 0x90, 0x00, 0x07, 0x12, 0x13, 0xce, 0x70, 0x13, 0x12, 0x20, 0x53, 0xe9, 0x24, 0x09, 0xf9, 
22339 +0xe4, 0x3a, 0xfa, 0x12, 0x13, 0xb5, 0xff, 0xc3, 0x13, 0x12, 0x13, 0xfb, 0x12, 0x20, 0x94, 0x24, 
22340 +0x08, 0x12, 0x20, 0x25, 0xe0, 0xfe, 0x8d, 0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, 0x07, 0x12, 0x20, 
22341 +0x25, 0xe0, 0xfd, 0xee, 0xed, 0x12, 0x20, 0x52, 0x90, 0x00, 0x03, 0xee, 0x8f, 0xf0, 0x12, 0x14, 
22342 +0xb2, 0x12, 0x2f, 0x80, 0x7d, 0x0a, 0xe4, 0xff, 0x12, 0x2c, 0xc0, 0x02, 0x10, 0x0c, 0x90, 0xfa, 
22343 +0xe2, 0xe0, 0xb4, 0x03, 0x06, 0x7e, 0x00, 0x7f, 0x40, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x08, 0x90, 
22344 +0xfa, 0xd6, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x00, 0x05, 0x12, 0x13, 0xce, 0xff, 0x7e, 0x00, 
22345 +0x90, 0xfa, 0xd2, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x70, 0x03, 0x7f, 0x08, 0x22, 0x90, 0x00, 0x08, 
22346 +0x12, 0x14, 0x5b, 0xff, 0x90, 0xfa, 0xd4, 0xe5, 0xf0, 0xf0, 0xa3, 0xef, 0xf0, 0xae, 0x02, 0xaf, 
22347 +0x01, 0x8e, 0x56, 0x8f, 0x57, 0x74, 0x0a, 0x25, 0x57, 0xf5, 0x57, 0xe4, 0x35, 0x56, 0xf5, 0x56, 
22348 +0x90, 0xfa, 0xd7, 0xe0, 0xff, 0x14, 0xfe, 0x90, 0xfa, 0xd5, 0xe0, 0x5e, 0xfe, 0xc3, 0xef, 0x9e, 
22349 +0xff, 0x90, 0xfa, 0xd9, 0xf0, 0xc3, 0x90, 0xfa, 0xd3, 0xe0, 0x9f, 0x90, 0xfa, 0xd2, 0xe0, 0x94, 
22350 +0x00, 0x50, 0x06, 0xa3, 0xe0, 0x90, 0xfa, 0xd9, 0xf0, 0x12, 0x1e, 0x2d, 0x60, 0x03, 0xe0, 0xff, 
22351 +0x22, 0x12, 0x2a, 0x80, 0x90, 0xfa, 0xd2, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x4e, 0x60, 0x2b, 0x90, 
22352 +0xfa, 0xd6, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xd3, 0xef, 0x9d, 0xee, 0x9c, 0x40, 0x07, 0xe0, 0x90, 
22353 +0xfa, 0xd9, 0xf0, 0x80, 0x08, 0x90, 0xfa, 0xd3, 0xe0, 0x90, 0xfa, 0xd9, 0xf0, 0x12, 0x1e, 0x2d, 
22354 +0x60, 0x03, 0xe0, 0xff, 0x22, 0x12, 0x2a, 0x80, 0x80, 0xca, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x58, 
22355 +0xe4, 0xf5, 0x40, 0xf5, 0x41, 0x7d, 0x01, 0x12, 0x23, 0xee, 0x7f, 0x00, 0x22, 0xaa, 0x56, 0xa9, 
22356 +0x57, 0x7b, 0x01, 0x90, 0xfa, 0xd4, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0x90, 0xfa, 0xd9, 0xe0, 0xf5, 
22357 +0x50, 0x12, 0x26, 0x25, 0x90, 0xfa, 0xd8, 0xef, 0xf0, 0x22, 0xef, 0x24, 0xae, 0x60, 0x52, 0x24, 
22358 +0xfe, 0x60, 0x2e, 0x24, 0xfe, 0x70, 0x03, 0x02, 0x1e, 0xed, 0x24, 0x06, 0x60, 0x03, 0x02, 0x1f, 
22359 +0x35, 0x78, 0x77, 0xe6, 0x54, 0xfb, 0xf6, 0x90, 0xff, 0xa5, 0xe0, 0xf5, 0x36, 0x44, 0x0f, 0xf0, 
22360 +0x74, 0x33, 0x90, 0xfa, 0x90, 0xf0, 0xe5, 0x36, 0xa3, 0xf0, 0x90, 0xfa, 0xae, 0x74, 0x01, 0xf0, 
22361 +0x22, 0x78, 0x78, 0xe6, 0x54, 0xfb, 0xf6, 0x90, 0xff, 0xb5, 0xe0, 0xf5, 0x36, 0x44, 0x0f, 0xf0, 
22362 +0x74, 0x43, 0x90, 0xfa, 0x92, 0xf0, 0xe5, 0x36, 0xa3, 0xf0, 0x90, 0xfa, 0xaf, 0x74, 0x01, 0xf0, 
22363 +0x22, 0x90, 0xfa, 0x9c, 0xe0, 0xa3, 0x20, 0xe5, 0x03, 0x02, 0x1f, 0x35, 0x90, 0xff, 0xa6, 0xe0, 
22364 +0x90, 0xfa, 0xc9, 0xf0, 0xa3, 0xf0, 0x90, 0xfa, 0xc9, 0xe0, 0xff, 0x54, 0x0f, 0xfe, 0x60, 0x10, 
22365 +0x90, 0xff, 0xa6, 0x12, 0x20, 0x83, 0x90, 0xff, 0xa6, 0xe0, 0x90, 0xfa, 0xc9, 0xf0, 0x80, 0xe6, 
22366 +0x90, 0xfa, 0xca, 0xe0, 0xff, 0x74, 0x34, 0xfe, 0x12, 0x29, 0xda, 0xef, 0x70, 0x57, 0x90, 0xfa, 
22367 +0xca, 0xe0, 0xff, 0x74, 0x34, 0x90, 0xfa, 0x94, 0xf0, 0xef, 0xa3, 0xf0, 0x22, 0x90, 0xfa, 0xa6, 
22368 +0xe0, 0xa3, 0x30, 0xe5, 0x40, 0x90, 0xff, 0xb6, 0xe0, 0x90, 0xfa, 0xc9, 0xf0, 0xa3, 0xf0, 0x90, 
22369 +0xfa, 0xc9, 0xe0, 0xff, 0x54, 0x0f, 0xfe, 0x60, 0x10, 0x90, 0xff, 0xb6, 0x12, 0x20, 0x83, 0x90, 
22370 +0xff, 0xb6, 0xe0, 0x90, 0xfa, 0xc9, 0xf0, 0x80, 0xe6, 0x90, 0xfa, 0xca, 0xe0, 0xff, 0x74, 0x44, 
22371 +0xfe, 0x12, 0x29, 0xda, 0xef, 0x70, 0x0e, 0x90, 0xfa, 0xca, 0xe0, 0xff, 0x74, 0x44, 0x90, 0xfa, 
22372 +0x96, 0xf0, 0xef, 0xa3, 0xf0, 0x22, 0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 
22373 +0x75, 0xd0, 0x00, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 
22374 +0x06, 0xc0, 0x07, 0x90, 0xff, 0x92, 0xe0, 0xff, 0x90, 0xfa, 0xc8, 0xf0, 0x90, 0xff, 0x92, 0xe4, 
22375 +0xf0, 0xef, 0x12, 0x15, 0x0f, 0x1f, 0xed, 0x26, 0x1f, 0xed, 0x2e, 0x1f, 0x90, 0x30, 0x1f, 0x90, 
22376 +0x32, 0x1f, 0x9e, 0x38, 0x1f, 0xb0, 0x3a, 0x1f, 0xe2, 0x3e, 0x1f, 0xcd, 0x44, 0x1f, 0xc2, 0x46, 
22377 +0x1f, 0xd8, 0x50, 0x1f, 0xd8, 0x52, 0x1f, 0xd8, 0x54, 0x1f, 0xd8, 0x56, 0x00, 0x00, 0x1f, 0xf2, 
22378 +0x90, 0xfa, 0xc8, 0xe0, 0xfd, 0x7c, 0x00, 0x7f, 0x01, 0x12, 0x10, 0x9c, 0x80, 0x62, 0x7c, 0x00, 
22379 +0x7d, 0x01, 0x7f, 0x03, 0x12, 0x10, 0x9c, 0x90, 0xff, 0xfe, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x50, 
22380 +0x7c, 0x00, 0x7d, 0x01, 0x7f, 0x02, 0x12, 0x10, 0x9c, 0x90, 0xff, 0xfe, 0xe0, 0x44, 0x40, 0xf0, 
22381 +0x80, 0x3e, 0x7c, 0x00, 0x7d, 0x01, 0x7f, 0x05, 0x12, 0x10, 0x9c, 0x80, 0x33, 0x7c, 0x00, 0x7d, 
22382 +0x01, 0x7f, 0x06, 0x12, 0x10, 0x9c, 0x80, 0x28, 0x90, 0xfa, 0xc8, 0xe0, 0xff, 0x12, 0x1e, 0x4a, 
22383 +0x80, 0x1e, 0x7c, 0x00, 0x7d, 0x01, 0x7f, 0x04, 0x12, 0x10, 0x9c, 0x80, 0x13, 0x12, 0x25, 0x13, 
22384 +0x80, 0x0e, 0x90, 0xfa, 0xc8, 0xe0, 0x24, 0x00, 0xff, 0xe4, 0x34, 0xff, 0xfe, 0x12, 0x29, 0xda, 
22385 +0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04, 0xd0, 0x03, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 
22386 +0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0, 0x32, 0x78, 0x82, 0xe6, 0xfe, 0x08, 
22387 +0xe6, 0x24, 0x04, 0x8e, 0x83, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0x22, 0x78, 0x82, 0xe6, 
22388 +0xfe, 0x08, 0xe6, 0xf5, 0x82, 0x8e, 0x83, 0x22, 0x78, 0x86, 0xe6, 0xfe, 0x08, 0xe6, 0xaa, 0x06, 
22389 +0xf8, 0xac, 0x02, 0x7d, 0x01, 0x7b, 0xff, 0x7a, 0x2f, 0x79, 0x52, 0x7e, 0x00, 0x7f, 0x0a, 0x02, 
22390 +0x13, 0x8f, 0xff, 0x90, 0xf9, 0x6b, 0x02, 0x14, 0xfd, 0x90, 0xf9, 0x66, 0x12, 0x14, 0xfd, 0x90, 
22391 +0x00, 0x04, 0x02, 0x13, 0xce, 0xe6, 0xfc, 0x08, 0xe6, 0xf5, 0x82, 0x8c, 0x83, 0xa3, 0xa3, 0x22, 
22392 +0x78, 0x84, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x22, 0xed, 0x12, 0x14, 0x0d, 0x8f, 0x82, 0x8e, 0x83, 
22393 +0xe5, 0x82, 0x22, 0xef, 0xf0, 0x90, 0xfa, 0xca, 0xe0, 0x54, 0x0f, 0x4e, 0xfe, 0xf0, 0xef, 0x54, 
22394 +0xf0, 0x4e, 0xf0, 0x22, 0x78, 0x84, 0xe6, 0xfc, 0x08, 0xe6, 0xfd, 0x8c, 0x83, 0x22, 0xa6, 0x07, 
22395 +0xe6, 0x24, 0x74, 0xf8, 0xe6, 0x22, 0x78, 0x84, 0xe6, 0xfa, 0x08, 0xe6, 0xfb, 0x22, 0x78, 0x86, 
22396 +0xe6, 0xfc, 0x08, 0xe6, 0x8c, 0x83, 0x22, 0x26, 0xf6, 0x18, 0xee, 0x36, 0xf6, 0x22, 0x8b, 0x82, 
22397 +0x8a, 0x83, 0xe5, 0x82, 0x22, 0x8b, 0x38, 0x8a, 0x39, 0x89, 0x3a, 0x8d, 0x3b, 0x90, 0xfa, 0xce, 
22398 +0xe4, 0xf0, 0xa3, 0x74, 0x02, 0xf0, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xcd, 0x90, 0xfa, 0xce, 0xe0, 
22399 +0xf5, 0x40, 0xa3, 0xe0, 0xf5, 0x41, 0x7d, 0x01, 0x12, 0x23, 0xee, 0x90, 0xfa, 0xcd, 0xe0, 0x65, 
22400 +0x3b, 0x60, 0x46, 0xa3, 0xe0, 0xff, 0xa3, 0xe0, 0xa3, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x12, 0x21, 
22401 +0x54, 0x90, 0xfa, 0xcd, 0xe0, 0xff, 0x90, 0xfa, 0xd0, 0xe4, 0x8f, 0xf0, 0x12, 0x14, 0x2f, 0x12, 
22402 +0x21, 0x54, 0x90, 0xfa, 0xd0, 0xe0, 0xff, 0xa3, 0xe0, 0x90, 0xfa, 0xce, 0xcf, 0xf0, 0xa3, 0xef, 
22403 +0xf0, 0x90, 0xfa, 0xcd, 0xe0, 0xa3, 0x75, 0xf0, 0x00, 0x12, 0x14, 0x2f, 0x90, 0xfa, 0xce, 0xe4, 
22404 +0x75, 0xf0, 0x04, 0x12, 0x14, 0x2f, 0x02, 0x20, 0xd6, 0x90, 0xfa, 0xcf, 0xe0, 0x24, 0x01, 0xff, 
22405 +0x90, 0xfa, 0xce, 0xe0, 0x34, 0x00, 0xab, 0x38, 0xaa, 0x39, 0xa9, 0x3a, 0x8f, 0xf0, 0x12, 0x14, 
22406 +0x93, 0x7f, 0x00, 0x22, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xcd, 0x90, 0xfa, 0xce, 0xe4, 0x75, 0xf0, 
22407 +0x01, 0x12, 0x14, 0x2f, 0x85, 0xf0, 0x41, 0xf5, 0x40, 0x7d, 0x01, 0x02, 0x23, 0xee, 0x8f, 0x68, 
22408 +0x12, 0x27, 0x19, 0x12, 0x20, 0x70, 0x8e, 0x83, 0x24, 0x0b, 0x12, 0x20, 0x25, 0xe0, 0x54, 0xfb, 
22409 +0xf0, 0x44, 0x02, 0xf0, 0x08, 0x12, 0x20, 0x65, 0xe0, 0xa3, 0x30, 0xe5, 0x0c, 0x12, 0x20, 0x7c, 
22410 +0x24, 0x0b, 0x12, 0x20, 0x25, 0xe0, 0x44, 0x01, 0xf0, 0x78, 0x82, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 
22411 +0xf5, 0x82, 0x8e, 0x83, 0xe0, 0x54, 0xb8, 0xfd, 0xf0, 0xe5, 0x68, 0x24, 0xfe, 0x44, 0x20, 0xfc, 
22412 +0x4d, 0xf0, 0xe5, 0x82, 0x24, 0x04, 0x12, 0x20, 0x25, 0xe0, 0x54, 0xb8, 0xf0, 0x4c, 0xf0, 0x8f, 
22413 +0x82, 0x8e, 0x83, 0xa3, 0x74, 0x03, 0xf0, 0x18, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x8e, 0x83, 0x24, 
22414 +0x05, 0x12, 0x20, 0x25, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x74, 0x95, 0x25, 0x68, 0xf5, 0x82, 
22415 +0xe4, 0x34, 0xfa, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0x44, 0x03, 0xfc, 0xed, 0x4c, 0xd0, 0x82, 0xd0, 
22416 +0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x82, 0x24, 0x04, 0x12, 0x20, 
22417 +0x25, 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x2f, 0x80, 0x74, 0x74, 0x25, 0x68, 0xf8, 0x74, 0x04, 0x46, 
22418 +0xf6, 0x7f, 0x00, 0x22, 0x8b, 0x62, 0x8a, 0x63, 0x89, 0x64, 0x12, 0x2a, 0x62, 0x90, 0xfa, 0xbf, 
22419 +0x12, 0x15, 0x06, 0xaa, 0x63, 0xa9, 0x64, 0x90, 0xfa, 0xc2, 0x12, 0x15, 0x06, 0x90, 0xfa, 0xc3, 
22420 +0xe4, 0x75, 0xf0, 0x0a, 0x12, 0x14, 0x2f, 0x90, 0xfa, 0xc2, 0x12, 0x14, 0xfd, 0xe9, 0x24, 0x01, 
22421 +0xf9, 0xe4, 0x3a, 0xfa, 0x90, 0xfa, 0xc5, 0x12, 0x15, 0x06, 0xab, 0x62, 0xaa, 0x63, 0xa9, 0x64, 
22422 +0x12, 0x2a, 0x6e, 0xe0, 0xff, 0xc3, 0x13, 0xf0, 0xe4, 0x78, 0x88, 0xf6, 0x90, 0xfa, 0xbd, 0xe0, 
22423 +0xff, 0x78, 0x88, 0xe6, 0xc3, 0x9f, 0x50, 0x4a, 0x90, 0xfa, 0xbf, 0x12, 0x2a, 0x43, 0xff, 0x78, 
22424 +0x89, 0xf6, 0x90, 0xfa, 0xc2, 0x12, 0x2a, 0x43, 0xfe, 0xf4, 0x5f, 0xff, 0x78, 0x89, 0xf6, 0x12, 
22425 +0x2a, 0x40, 0x5e, 0x4f, 0xff, 0x78, 0x89, 0xf6, 0x12, 0x2a, 0x49, 0x75, 0xf0, 0x02, 0x12, 0x14, 
22426 +0x2f, 0x90, 0xfa, 0xc3, 0xe4, 0x75, 0xf0, 0x02, 0x12, 0x14, 0x2f, 0xab, 0x62, 0xaa, 0x63, 0xa9, 
22427 +0x64, 0x90, 0x00, 0x04, 0x12, 0x13, 0xce, 0x30, 0xe4, 0x03, 0x12, 0x2a, 0x58, 0x78, 0x88, 0x06, 
22428 +0x80, 0xaa, 0xe4, 0x90, 0xfa, 0xbe, 0xf0, 0x22, 0x8b, 0x5c, 0x8a, 0x5d, 0x89, 0x5e, 0x90, 0xfa, 
22429 +0xbe, 0x74, 0x06, 0xf0, 0xe4, 0x90, 0xfa, 0xbd, 0xf0, 0x12, 0x13, 0xb5, 0x24, 0x6e, 0x60, 0x26, 
22430 +0x14, 0x70, 0x70, 0x12, 0x2a, 0x2f, 0x60, 0x09, 0x24, 0x30, 0x70, 0x12, 0x12, 0x22, 0x14, 0x80, 
22431 +0x62, 0x12, 0x2a, 0x79, 0x12, 0x1d, 0x5e, 0x90, 0xfa, 0xbe, 0xef, 0xf0, 0x80, 0x55, 0x90, 0xfa, 
22432 +0xbe, 0x74, 0x81, 0xf0, 0x80, 0x4d, 0x12, 0x2a, 0x2f, 0x60, 0x09, 0x24, 0x30, 0x70, 0x3e, 0x12, 
22433 +0x29, 0x85, 0x80, 0x3f, 0xe5, 0x5e, 0x24, 0x03, 0xf9, 0xe4, 0x35, 0x5d, 0xfa, 0x7b, 0x01, 0xc0, 
22434 +0x03, 0xc0, 0x02, 0xc0, 0x01, 0x12, 0x2a, 0x79, 0x90, 0x00, 0x05, 0x12, 0x13, 0xce, 0xfd, 0x90, 
22435 +0x00, 0x08, 0x12, 0x14, 0x5b, 0xf5, 0x41, 0x85, 0xf0, 0x40, 0xd0, 0x01, 0xd0, 0x02, 0xd0, 0x03, 
22436 +0x12, 0x23, 0xee, 0x90, 0xfa, 0xbd, 0xef, 0xf0, 0xe4, 0xa3, 0xf0, 0x80, 0x06, 0x90, 0xfa, 0xbe, 
22437 +0x74, 0x81, 0xf0, 0x90, 0xfa, 0xbe, 0xe0, 0x12, 0x2a, 0x79, 0x90, 0x00, 0x02, 0x12, 0x14, 0x0d, 
22438 +0x90, 0xfa, 0xbd, 0xe0, 0xff, 0x22, 0x12, 0x0f, 0x89, 0x7f, 0x02, 0x12, 0x11, 0x9f, 0x78, 0x6d, 
22439 +0xe6, 0x44, 0x02, 0xf6, 0xd2, 0xb0, 0xd2, 0xb1, 0xd2, 0xb3, 0x90, 0xff, 0xa4, 0xe0, 0x90, 0xfa, 
22440 +0x7a, 0xf0, 0x90, 0xff, 0xb4, 0xe0, 0x90, 0xfa, 0x7b, 0xf0, 0x90, 0xff, 0xa2, 0xe0, 0x90, 0xfa, 
22441 +0x78, 0xf0, 0x90, 0xff, 0xb2, 0xe0, 0x90, 0xfa, 0x79, 0xf0, 0x90, 0xff, 0xa4, 0x74, 0x30, 0xf0, 
22442 +0x90, 0xff, 0xb4, 0xf0, 0x90, 0xff, 0xa2, 0x74, 0x40, 0xf0, 0x90, 0xff, 0xb2, 0xf0, 0x90, 0xfa, 
22443 +0xe3, 0xe5, 0xa8, 0xf0, 0x75, 0xa8, 0x81, 0x90, 0xff, 0x92, 0xe0, 0x60, 0x04, 0xe4, 0xf0, 0x80, 
22444 +0xf6, 0x90, 0xff, 0xfd, 0x74, 0x3a, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x90, 0xfa, 0x7a, 
22445 +0xe0, 0x90, 0xff, 0xa4, 0xf0, 0x90, 0xfa, 0x7b, 0xe0, 0x90, 0xff, 0xb4, 0xf0, 0x90, 0xfa, 0x78, 
22446 +0xe0, 0x90, 0xff, 0xa2, 0xf0, 0x90, 0xfa, 0x79, 0xe0, 0x90, 0xff, 0xb2, 0xf0, 0x90, 0xf9, 0x15, 
22447 +0xe0, 0x60, 0x02, 0xc2, 0xb3, 0x90, 0xfa, 0xe3, 0xe0, 0xf5, 0xa8, 0x02, 0x10, 0x0c, 0x8b, 0x3c, 
22448 +0x8a, 0x3d, 0x89, 0x3e, 0x8d, 0x3f, 0xe5, 0x3f, 0x70, 0x03, 0xaf, 0x3f, 0x22, 0x12, 0x2a, 0xa8, 
22449 +0x70, 0x16, 0x12, 0x2a, 0xc7, 0xe5, 0x40, 0x90, 0xff, 0xf1, 0xf0, 0x12, 0x2e, 0xd4, 0x50, 0xf2, 
22450 +0x12, 0x24, 0x7b, 0x40, 0x0b, 0x7f, 0x00, 0x22, 0x12, 0x2a, 0xc7, 0x12, 0x24, 0x7b, 0x50, 0xf8, 
22451 +0x90, 0xff, 0xf3, 0x74, 0xa1, 0xf0, 0xe5, 0x3f, 0xb4, 0x01, 0x07, 0x90, 0xff, 0xf0, 0xe0, 0x44, 
22452 +0x02, 0xf0, 0x90, 0xff, 0xf1, 0xe4, 0xf0, 0xf5, 0x42, 0xe5, 0x3f, 0x14, 0xff, 0xe5, 0x42, 0xc3, 
22453 +0x9f, 0x50, 0x2a, 0x12, 0x2e, 0xbd, 0x40, 0x03, 0xaf, 0x42, 0x22, 0xc3, 0xe5, 0x3f, 0x95, 0x42, 
22454 +0xff, 0xbf, 0x02, 0x07, 0x90, 0xff, 0xf0, 0xe0, 0x44, 0x02, 0xf0, 0x12, 0x2a, 0xba, 0x05, 0x42, 
22455 +0x74, 0x01, 0x25, 0x3e, 0xf5, 0x3e, 0xe4, 0x35, 0x3d, 0xf5, 0x3d, 0x80, 0xcc, 0x12, 0x2e, 0xbd, 
22456 +0x40, 0x03, 0x7f, 0x18, 0x22, 0x12, 0x2a, 0xba, 0xaf, 0x3f, 0x22, 0x90, 0xff, 0xf1, 0xe5, 0x41, 
22457 +0xf0, 0x02, 0x2e, 0xd4, 0x75, 0xa8, 0x40, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x91, 
22458 +0x02, 0x24, 0xce, 0x02, 0x2e, 0x88, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 
22459 +0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 
22460 +0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 
22461 +0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x28, 
22462 +0xcb, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 
22463 +0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 
22464 +0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 
22465 +0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 
22466 +0xe7, 0x80, 0xbe, 0xe4, 0xf5, 0x36, 0x12, 0x19, 0x21, 0xe0, 0xb4, 0x04, 0x0d, 0xe5, 0x36, 0x24, 
22467 +0x03, 0xff, 0x12, 0x2d, 0x4f, 0x12, 0x19, 0x21, 0xe4, 0xf0, 0x05, 0x36, 0xe5, 0x36, 0xc3, 0x94, 
22468 +0x02, 0x40, 0xe3, 0xe4, 0xf5, 0x36, 0x75, 0xf0, 0x02, 0xe5, 0x36, 0x90, 0xfa, 0x90, 0x12, 0x19, 
22469 +0x62, 0x60, 0x2c, 0x12, 0x29, 0xda, 0xef, 0x60, 0x52, 0x75, 0xf0, 0x02, 0xe5, 0x36, 0x90, 0xfa, 
22470 +0x90, 0x12, 0x14, 0xdf, 0xe4, 0xf0, 0xa3, 0xf0, 0x75, 0xf0, 0x0a, 0xe5, 0x36, 0x90, 0xfa, 0x9c, 
22471 +0x12, 0x14, 0xdf, 0xe0, 0xa3, 0x30, 0xe6, 0x33, 0x12, 0x19, 0x21, 0x74, 0x04, 0xf0, 0x22, 0x75, 
22472 +0xf0, 0x02, 0xe5, 0x36, 0x90, 0xfa, 0x94, 0x12, 0x19, 0x62, 0x60, 0x16, 0x12, 0x29, 0xda, 0xef, 
22473 +0x60, 0x19, 0x75, 0xf0, 0x02, 0xe5, 0x36, 0x90, 0xfa, 0x94, 0x12, 0x14, 0xdf, 0xe4, 0xf0, 0xa3, 
22474 +0xf0, 0x22, 0x05, 0x36, 0xe5, 0x36, 0xc3, 0x94, 0x02, 0x40, 0x9b, 0x22, 0xe4, 0xff, 0x90, 0xff, 
22475 +0x83, 0xe0, 0x54, 0x0f, 0xfe, 0xef, 0xc3, 0x9e, 0x50, 0x17, 0x74, 0xf0, 0x2f, 0xf5, 0x82, 0xe4, 
22476 +0x34, 0xfe, 0xf5, 0x83, 0xe0, 0x12, 0x18, 0x2a, 0x12, 0x13, 0xfb, 0x0f, 0x12, 0x18, 0x19, 0x80, 
22477 +0xdd, 0xef, 0xfd, 0xc3, 0xe5, 0x31, 0x9d, 0xf5, 0x31, 0xe5, 0x30, 0x94, 0x00, 0xf5, 0x30, 0xd3, 
22478 +0xe5, 0x31, 0x94, 0x00, 0xe5, 0x30, 0x94, 0x00, 0x40, 0x06, 0xe4, 0x90, 0xff, 0x83, 0xf0, 0x22, 
22479 +0x12, 0x19, 0x3e, 0x12, 0x19, 0x92, 0x12, 0x19, 0x8c, 0x12, 0x13, 0xb5, 0x24, 0x6e, 0x60, 0x1e, 
22480 +0x14, 0x60, 0x1b, 0x24, 0x8e, 0x70, 0x2d, 0x90, 0x00, 0x01, 0x12, 0x13, 0xce, 0xff, 0x24, 0xfc, 
22481 +0x60, 0x03, 0x04, 0x70, 0x1f, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0d, 0x02, 0x10, 0x9c, 0x12, 0x19, 
22482 +0x6c, 0x12, 0x22, 0xb8, 0x12, 0x18, 0xe8, 0x12, 0x13, 0xce, 0x60, 0x03, 0x02, 0x2f, 0x76, 0xe4, 
22483 +0xff, 0x12, 0x2f, 0x6a, 0x22, 0x8b, 0x4b, 0x8a, 0x4c, 0x89, 0x4d, 0x8c, 0x4e, 0x8d, 0x4f, 0xd2, 
22484 +0x00, 0x12, 0x2a, 0xa8, 0x70, 0x16, 0x12, 0x2a, 0xc7, 0xe5, 0x4e, 0x90, 0xff, 0xf1, 0xf0, 0x12, 
22485 +0x2e, 0xd4, 0x50, 0xf2, 0x12, 0x26, 0x9a, 0x40, 0x0b, 0x7f, 0x18, 0x22, 0x12, 0x2a, 0xc7, 0x12, 
22486 +0x26, 0x9a, 0x50, 0xf8, 0xe4, 0xf5, 0x51, 0xe5, 0x50, 0x14, 0xff, 0xe5, 0x51, 0xc3, 0x9f, 0x50, 
22487 +0x17, 0x12, 0x26, 0x8a, 0x40, 0x03, 0x7f, 0x18, 0x22, 0x05, 0x51, 0x74, 0x01, 0x25, 0x4d, 0xf5, 
22488 +0x4d, 0xe4, 0x35, 0x4c, 0xf5, 0x4c, 0x80, 0xdf, 0x90, 0xff, 0xf0, 0xe0, 0x44, 0x01, 0xf0, 0x12, 
22489 +0x26, 0x8a, 0x40, 0x03, 0x7f, 0x18, 0x22, 0x7f, 0x00, 0x22, 0xab, 0x4b, 0xaa, 0x4c, 0xa9, 0x4d, 
22490 +0x12, 0x13, 0xb5, 0x90, 0xff, 0xf1, 0xf0, 0x02, 0x2e, 0xd4, 0x90, 0xff, 0xf1, 0xe5, 0x4f, 0xf0, 
22491 +0x02, 0x2e, 0xd4, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xcb, 0xe4, 0xfd, 0x12, 0x20, 0xc5, 0x90, 0xfa, 
22492 +0xcb, 0xe4, 0x75, 0xf0, 0x09, 0x12, 0x14, 0x2f, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x37, 0x90, 0xfa, 
22493 +0xcb, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x14, 0x45, 0x85, 0xf0, 0x41, 0xf5, 0x40, 0x7d, 0x01, 0x12, 
22494 +0x23, 0xee, 0x90, 0xff, 0xf7, 0xe5, 0x37, 0x12, 0x26, 0xfe, 0x90, 0xff, 0xf6, 0xe5, 0x37, 0xf0, 
22495 +0x90, 0xfa, 0xcb, 0xe4, 0xf0, 0xa3, 0x74, 0x06, 0x12, 0x26, 0xfe, 0xe5, 0x37, 0x30, 0xe0, 0x07, 
22496 +0x90, 0xff, 0xfc, 0x74, 0x94, 0xf0, 0x22, 0x90, 0xff, 0xfc, 0x74, 0x90, 0xf0, 0x22, 0xf0, 0x7b, 
22497 +0x00, 0x7a, 0x00, 0x79, 0x37, 0x90, 0xfa, 0xcb, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x14, 0x45, 0x85, 
22498 +0xf0, 0x41, 0xf5, 0x40, 0x7d, 0x01, 0x02, 0x23, 0xee, 0x15, 0x6b, 0xa8, 0x6b, 0xa6, 0x07, 0x30, 
22499 +0x08, 0x05, 0x12, 0x10, 0xec, 0x80, 0xf8, 0xd2, 0x08, 0xa8, 0x6b, 0xe6, 0xff, 0xb4, 0x03, 0x0f, 
22500 +0x78, 0x82, 0x76, 0xff, 0x08, 0x76, 0xe0, 0x08, 0x76, 0xff, 0x08, 0x76, 0xa0, 0x80, 0x0d, 0x78, 
22501 +0x82, 0x76, 0xff, 0x08, 0x76, 0xe2, 0x08, 0x76, 0xff, 0x08, 0x76, 0xb0, 0x78, 0x86, 0x76, 0xfa, 
22502 +0x08, 0x76, 0x9a, 0xef, 0x24, 0xfd, 0x75, 0xf0, 0x0a, 0xa4, 0xae, 0xf0, 0x12, 0x20, 0xb7, 0x7b, 
22503 +0x01, 0x7a, 0xff, 0x79, 0x48, 0x78, 0x6e, 0x12, 0x14, 0xf4, 0xa8, 0x6b, 0xe6, 0x24, 0xfd, 0x75, 
22504 +0xf0, 0x08, 0xa4, 0xff, 0xae, 0xf0, 0x78, 0x70, 0x12, 0x20, 0xb7, 0x79, 0x08, 0x78, 0x71, 0x12, 
22505 +0x14, 0xf4, 0x78, 0x73, 0xef, 0x12, 0x20, 0xb7, 0x05, 0x6b, 0x22, 0x90, 0xff, 0xf0, 0xe0, 0x54, 
22506 +0xab, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x90, 0xfa, 0xe2, 0x74, 0x02, 0xf0, 0x7b, 0x01, 0x7a, 0xfa, 
22507 +0x79, 0xcb, 0xe4, 0xf5, 0x40, 0xf5, 0x41, 0x7d, 0x01, 0x12, 0x23, 0xee, 0x7e, 0x00, 0x90, 0xfa, 
22508 +0xe0, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x64, 0x01, 0x70, 0x10, 0x90, 0xfa, 0xcb, 0xe0, 0xb4, 0x52, 
22509 +0x09, 0x90, 0xf9, 0x65, 0xe0, 0x54, 0xef, 0xf0, 0x80, 0x29, 0x90, 0xfa, 0xe0, 0xe0, 0x70, 0x04, 
22510 +0xa3, 0xe0, 0x64, 0x01, 0x70, 0x10, 0x90, 0xfa, 0xcb, 0xe0, 0xb4, 0x10, 0x09, 0x90, 0xf9, 0x65, 
22511 +0xe0, 0x44, 0x10, 0xf0, 0x80, 0x0d, 0x90, 0xfa, 0xe2, 0x74, 0x03, 0xf0, 0x90, 0xf9, 0x65, 0xe0, 
22512 +0x54, 0xef, 0xf0, 0x90, 0xff, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x22, 0x90, 0xff, 0x93, 0x74, 0x2a, 
22513 +0xf0, 0x90, 0xff, 0xff, 0xe0, 0x60, 0x06, 0x90, 0xff, 0xfc, 0x74, 0x10, 0xf0, 0x90, 0xff, 0x91, 
22514 +0xe0, 0x44, 0x90, 0xf0, 0x12, 0x27, 0x8b, 0x12, 0x15, 0x35, 0x12, 0x2d, 0xa5, 0x7e, 0x07, 0x7f, 
22515 +0xd0, 0x12, 0x11, 0x68, 0x7e, 0x0f, 0x7f, 0xa0, 0x12, 0x11, 0x82, 0xe4, 0x78, 0x7d, 0xf6, 0x78, 
22516 +0x7d, 0xe6, 0xff, 0xc3, 0x94, 0x06, 0x50, 0x0b, 0x74, 0x74, 0x2f, 0xf8, 0xe4, 0xf6, 0x78, 0x7d, 
22517 +0x06, 0x80, 0xec, 0x7f, 0x03, 0x12, 0x2c, 0x5b, 0x90, 0xf9, 0x65, 0xe0, 0x20, 0xe4, 0x05, 0x7f, 
22518 +0x04, 0x12, 0x2c, 0x5b, 0x90, 0xff, 0x9b, 0xe4, 0xf0, 0x90, 0xff, 0x9a, 0xf0, 0x90, 0xff, 0xe8, 
22519 +0xe0, 0x54, 0x1f, 0xf0, 0xd2, 0xa8, 0x22, 0x12, 0x0f, 0x89, 0x78, 0x90, 0xef, 0xf6, 0x12, 0x27, 
22520 +0x19, 0x12, 0x20, 0x59, 0x30, 0xe0, 0x25, 0x12, 0x20, 0x2d, 0xe0, 0x54, 0x7f, 0xf0, 0x78, 0x71, 
22521 +0x12, 0x14, 0xeb, 0x90, 0x00, 0x02, 0x12, 0x13, 0xce, 0x30, 0xe7, 0x09, 0x90, 0x00, 0x02, 0xe4, 
22522 +0x12, 0x14, 0x0d, 0x80, 0xe9, 0x12, 0x20, 0x2d, 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x20, 0x59, 0x30, 
22523 +0xe1, 0x1e, 0x12, 0x20, 0x1b, 0xe0, 0x54, 0x7f, 0xf0, 0x12, 0x2f, 0x15, 0x78, 0x6e, 0x12, 0x14, 
22524 +0xeb, 0x90, 0x00, 0x02, 0x74, 0x80, 0x12, 0x14, 0x0d, 0x12, 0x20, 0x1b, 0xe0, 0x44, 0x80, 0xf0, 
22525 +0x12, 0x2f, 0x80, 0xe4, 0xff, 0x12, 0x2e, 0xa5, 0x02, 0x10, 0x0c, 0x03, 0x6e, 0x01, 0xff, 0x48, 
22526 +0x03, 0x71, 0x01, 0xff, 0x08, 0x02, 0x6c, 0x00, 0x00, 0x44, 0xfa, 0x94, 0x00, 0x00, 0x00, 0x00, 
22527 +0x44, 0xfa, 0x90, 0x00, 0x00, 0x00, 0x00, 0x42, 0xfa, 0xae, 0x00, 0x00, 0x42, 0xfa, 0x7a, 0x00, 
22528 +0x00, 0x42, 0xfa, 0x78, 0x00, 0x00, 0x42, 0xf9, 0x69, 0xff, 0xff, 0x42, 0xfa, 0x76, 0x00, 0x00, 
22529 +0x43, 0xf9, 0x16, 0x0a, 0x32, 0x02, 0x41, 0xf9, 0x63, 0x20, 0x41, 0xf9, 0x64, 0x20, 0x41, 0xf9, 
22530 +0x61, 0x00, 0x41, 0xf9, 0x62, 0x00, 0x44, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xf9, 0x65, 
22531 +0x00, 0x41, 0xf9, 0x15, 0x00, 0x01, 0x20, 0x00, 0x41, 0xf8, 0x04, 0x00, 0x00, 0x12, 0x19, 0x82, 
22532 +0xe5, 0x31, 0x64, 0x09, 0x70, 0x04, 0xe5, 0x30, 0x64, 0x01, 0x60, 0x48, 0xc3, 0xe5, 0x31, 0x94, 
22533 +0x08, 0xe5, 0x30, 0x94, 0x00, 0x40, 0x11, 0x7f, 0x08, 0xef, 0xe5, 0x31, 0x94, 0x08, 0xf5, 0x31, 
22534 +0xe5, 0x30, 0x94, 0x00, 0xf5, 0x30, 0x80, 0x05, 0xaf, 0x31, 0x12, 0x19, 0x92, 0xe4, 0xfe, 0xee, 
22535 +0xc3, 0x9f, 0x50, 0x19, 0x12, 0x18, 0x2a, 0x12, 0x13, 0xb5, 0xfd, 0x74, 0xf8, 0x2e, 0xf5, 0x82, 
22536 +0xe4, 0x34, 0xfe, 0xf5, 0x83, 0xed, 0xf0, 0x0e, 0x12, 0x18, 0x19, 0x80, 0xe2, 0xef, 0x54, 0x7f, 
22537 +0x90, 0xff, 0x81, 0xf0, 0x22, 0x8b, 0x5f, 0x8a, 0x60, 0x89, 0x61, 0x12, 0x2a, 0x6e, 0x70, 0x05, 
22538 +0xa3, 0x74, 0x08, 0xf0, 0x22, 0xab, 0x5f, 0xaa, 0x60, 0xa9, 0x61, 0x12, 0x2a, 0x62, 0x90, 0xfa, 
22539 +0xc5, 0x12, 0x15, 0x06, 0xe5, 0x61, 0x24, 0x03, 0xf9, 0xe4, 0x35, 0x60, 0xfa, 0x90, 0xfa, 0xbf, 
22540 +0x12, 0x15, 0x06, 0xe4, 0x90, 0xfa, 0xbe, 0xf0, 0x78, 0x91, 0xf6, 0x90, 0xfa, 0xbd, 0xe0, 0xff, 
22541 +0x78, 0x91, 0xe6, 0xc3, 0x9f, 0x50, 0x12, 0x12, 0x2a, 0x40, 0xff, 0x12, 0x2a, 0x49, 0x12, 0x2a, 
22542 +0x5c, 0x78, 0x91, 0x06, 0x12, 0x2a, 0x58, 0x80, 0xe2, 0x22, 0xad, 0x07, 0xac, 0x06, 0x90, 0x2f, 
22543 +0x06, 0xe4, 0x93, 0xff, 0x78, 0x7a, 0xf6, 0x54, 0x0f, 0x12, 0x19, 0x07, 0xe0, 0x08, 0x76, 0x00, 
22544 +0x08, 0xf6, 0x18, 0x12, 0x18, 0x42, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff, 0x78, 0x7b, 
22545 +0xee, 0xf6, 0x08, 0xef, 0xf6, 0xee, 0x44, 0xf8, 0x18, 0xf6, 0xef, 0x08, 0xf6, 0x90, 0xff, 0x7a, 
22546 +0xe0, 0x20, 0xe7, 0x03, 0x7f, 0x00, 0x22, 0x78, 0x7b, 0xe6, 0xfe, 0x08, 0xe6, 0xf5, 0x82, 0x8e, 
22547 +0x83, 0xec, 0xf0, 0xa3, 0xed, 0xf0, 0x90, 0xff, 0x7a, 0x74, 0x02, 0xf0, 0x7f, 0x01, 0x22, 0xab, 
22548 +0x5c, 0xaa, 0x5d, 0xa9, 0x5e, 0x90, 0x00, 0x03, 0x12, 0x13, 0xce, 0x54, 0xf0, 0x24, 0xa0, 0x22, 
22549 +0x90, 0xfa, 0xc5, 0x12, 0x14, 0xfd, 0x02, 0x13, 0xb5, 0x90, 0xfa, 0xbf, 0x12, 0x14, 0xfd, 0xef, 
22550 +0x12, 0x13, 0xfb, 0x90, 0xfa, 0xc6, 0xe4, 0x22, 0x90, 0xfa, 0xc0, 0xe4, 0x75, 0xf0, 0x01, 0x02, 
22551 +0x14, 0x2f, 0x90, 0x00, 0x08, 0x12, 0x14, 0x5b, 0xaa, 0xf0, 0xf9, 0x7b, 0x01, 0x22, 0x90, 0x00, 
22552 +0x05, 0x12, 0x13, 0xce, 0x90, 0xfa, 0xbd, 0xf0, 0x22, 0xab, 0x5c, 0xaa, 0x5d, 0xa9, 0x5e, 0x22, 
22553 +0x90, 0xfa, 0xd9, 0xe0, 0xff, 0x7e, 0x00, 0xc3, 0x90, 0xfa, 0xd3, 0xe0, 0x9f, 0xf0, 0x90, 0xfa, 
22554 +0xd2, 0xe0, 0x9e, 0xf0, 0x90, 0xfa, 0xd4, 0xee, 0x8f, 0xf0, 0x12, 0x14, 0x2f, 0xef, 0x25, 0x57, 
22555 +0xf5, 0x57, 0xee, 0x35, 0x56, 0xf5, 0x56, 0x22, 0x90, 0xff, 0xf0, 0xe0, 0x54, 0xfe, 0xf0, 0xe0, 
22556 +0x54, 0xfd, 0xf0, 0x90, 0xfa, 0xe2, 0xe0, 0x64, 0x03, 0x22, 0x90, 0xff, 0xf2, 0xe0, 0xab, 0x3c, 
22557 +0xaa, 0x3d, 0xa9, 0x3e, 0x02, 0x13, 0xfb, 0x90, 0xff, 0xf3, 0x74, 0xa0, 0xf0, 0x22, 0x8f, 0x6a, 
22558 +0xed, 0x70, 0x0f, 0xe5, 0x6a, 0xb4, 0x03, 0x05, 0x7f, 0x01, 0x02, 0x2e, 0xeb, 0x7f, 0x02, 0x02, 
22559 +0x2e, 0xeb, 0xaf, 0x6a, 0x12, 0x27, 0x19, 0x74, 0x74, 0x25, 0x6a, 0xf8, 0xe6, 0x30, 0xe2, 0x0b, 
22560 +0xd2, 0x09, 0x12, 0x18, 0x9b, 0xe0, 0x54, 0x7f, 0xf0, 0x80, 0x02, 0xc2, 0x09, 0xe5, 0x6a, 0xb4, 
22561 +0x03, 0x07, 0x7f, 0x81, 0x12, 0x2e, 0xeb, 0x80, 0x05, 0x7f, 0x82, 0x12, 0x2e, 0xeb, 0x30, 0x09, 
22562 +0x07, 0x12, 0x18, 0x9b, 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x2f, 0x80, 0x22, 0x12, 0x0f, 0x89, 0x90, 
22563 +0xff, 0xfd, 0xe0, 0x44, 0x60, 0xf0, 0xd2, 0x01, 0x90, 0xff, 0xfc, 0xe0, 0x44, 0x02, 0xf0, 0x90, 
22564 +0xff, 0x00, 0xe0, 0x30, 0xe7, 0x13, 0x90, 0xff, 0x83, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x2c, 0x80, 
22565 +0x90, 0xff, 0xfc, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x0d, 0x12, 0x19, 0x3e, 0x53, 0x2c, 0x7f, 0x90, 
22566 +0xff, 0xfc, 0xe0, 0x54, 0xfe, 0xf0, 0x90, 0xff, 0x81, 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x02, 0x9f, 
22567 +0x12, 0x19, 0x46, 0x02, 0x10, 0x0c, 0x12, 0x0f, 0x89, 0x78, 0x8a, 0x12, 0x20, 0x9e, 0x30, 0xe1, 
22568 +0x07, 0x7f, 0x13, 0x12, 0x2e, 0xa5, 0x80, 0x34, 0x90, 0xf9, 0x65, 0xe0, 0x54, 0x03, 0x60, 0x16, 
22569 +0x78, 0x8a, 0xe6, 0xb4, 0x03, 0x09, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xdf, 0xf0, 0x80, 0x07, 0x90, 
22570 +0xff, 0xb4, 0xe0, 0x54, 0xdf, 0xf0, 0xc2, 0xb3, 0x90, 0xf9, 0x15, 0xe0, 0x04, 0xf0, 0x78, 0x8a, 
22571 +0xe6, 0xff, 0x12, 0x20, 0x59, 0xfd, 0x12, 0x2d, 0x21, 0x12, 0x2e, 0xa5, 0x02, 0x10, 0x0c, 0x12, 
22572 +0x0f, 0x89, 0x78, 0x8f, 0xef, 0xf6, 0xd2, 0x00, 0x12, 0x27, 0x19, 0x90, 0xf9, 0x66, 0x12, 0x14, 
22573 +0xfd, 0xe9, 0x24, 0x03, 0xf9, 0xe4, 0x3a, 0xfa, 0xc0, 0x02, 0x78, 0x86, 0xe6, 0xfe, 0x08, 0xe6, 
22574 +0xaa, 0x06, 0xf8, 0xac, 0x02, 0x7d, 0x01, 0xd0, 0x02, 0x12, 0x20, 0x4b, 0x12, 0x2f, 0x80, 0x78, 
22575 +0x8f, 0xe6, 0xff, 0x12, 0x19, 0xbb, 0x12, 0x2e, 0xa5, 0x02, 0x10, 0x0c, 0x12, 0x0f, 0x89, 0x78, 
22576 +0x8b, 0xef, 0xf6, 0x12, 0x2e, 0x4c, 0x12, 0x2e, 0xa5, 0x90, 0xf9, 0x65, 0xe0, 0x54, 0x03, 0x60, 
22577 +0x16, 0x78, 0x8b, 0xe6, 0xb4, 0x03, 0x09, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x07, 
22578 +0x90, 0xff, 0xb4, 0xe0, 0x44, 0x20, 0xf0, 0x90, 0xf9, 0x15, 0xe0, 0x14, 0xf0, 0xe0, 0x70, 0x02, 
22579 +0xd2, 0xb3, 0x02, 0x10, 0x0c, 0x8f, 0x69, 0x12, 0x27, 0x19, 0x12, 0x20, 0x2d, 0xe0, 0x54, 0x3f, 
22580 +0xf0, 0xe5, 0x82, 0x24, 0x04, 0x12, 0x20, 0x25, 0xe0, 0x54, 0x3f, 0xf0, 0x08, 0xe6, 0xfe, 0x08, 
22581 +0xe6, 0x8e, 0x83, 0x24, 0x0b, 0x12, 0x20, 0x25, 0xe0, 0x54, 0xf8, 0xf0, 0x12, 0x2f, 0x80, 0x74, 
22582 +0x74, 0x25, 0x69, 0xf8, 0x74, 0xfb, 0x56, 0xf6, 0x7f, 0x00, 0x22, 0x8f, 0x37, 0xc2, 0x08, 0x12, 
22583 +0x27, 0x19, 0x12, 0x20, 0x38, 0x78, 0x84, 0x12, 0x20, 0x1d, 0xe0, 0x44, 0x01, 0xf0, 0x12, 0x20, 
22584 +0x70, 0x12, 0x20, 0x21, 0xe0, 0x20, 0xe0, 0xf6, 0xef, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 
22585 +0x83, 0xe0, 0x54, 0xf8, 0xf0, 0x12, 0x2f, 0x80, 0xaf, 0x37, 0x12, 0x19, 0xbb, 0x22, 0x12, 0x0f, 
22586 +0x89, 0x12, 0x27, 0x19, 0x12, 0x20, 0x70, 0x24, 0x06, 0x12, 0x20, 0x23, 0xe0, 0xfd, 0x12, 0x20, 
22587 +0x53, 0x90, 0x00, 0x03, 0x12, 0x20, 0x78, 0x24, 0x05, 0x12, 0x20, 0x25, 0xe0, 0x90, 0x00, 0x04, 
22588 +0x12, 0x14, 0x0d, 0x12, 0x2f, 0x80, 0x7d, 0x02, 0xe4, 0xff, 0x12, 0x2c, 0xc0, 0x02, 0x10, 0x0c, 
22589 +0xae, 0x05, 0x12, 0x18, 0xed, 0xef, 0x12, 0x14, 0x0d, 0x0e, 0x0e, 0x0e, 0xee, 0xd3, 0x95, 0x35, 
22590 +0xe4, 0x95, 0x34, 0x40, 0x02, 0xae, 0x35, 0xee, 0xd3, 0x94, 0x08, 0x74, 0x80, 0x94, 0x81, 0x40, 
22591 +0x0a, 0x7e, 0x03, 0x90, 0x00, 0x02, 0x74, 0x02, 0x12, 0x14, 0x0d, 0xaf, 0x06, 0x12, 0x2f, 0x6a, 
22592 +0x22, 0x12, 0x0f, 0x89, 0x78, 0x8c, 0x12, 0x20, 0x9e, 0x30, 0xe2, 0x07, 0x7f, 0x13, 0x12, 0x2e, 
22593 +0xa5, 0x80, 0x1b, 0x78, 0x8c, 0xe6, 0x24, 0x74, 0xf8, 0xe6, 0x20, 0xe1, 0x07, 0x7f, 0x12, 0x12, 
22594 +0x2e, 0xa5, 0x80, 0x0a, 0x78, 0x8c, 0xe6, 0xff, 0x12, 0x21, 0x6e, 0x12, 0x2e, 0xa5, 0x02, 0x10, 
22595 +0x0c, 0xae, 0x07, 0xed, 0x54, 0x03, 0x64, 0x01, 0x60, 0x03, 0x7f, 0x10, 0x22, 0xed, 0x54, 0x7c, 
22596 +0xc3, 0x94, 0x04, 0x50, 0x03, 0x7f, 0x0b, 0x22, 0x74, 0x74, 0x2e, 0xf8, 0x74, 0x02, 0x46, 0xf6, 
22597 +0x74, 0x95, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0xfa, 0xf5, 0x83, 0xed, 0xf0, 0x7f, 0x00, 0x22, 0xbf, 
22598 +0x03, 0x06, 0x7c, 0xff, 0x7d, 0xe0, 0x80, 0x04, 0x7c, 0xff, 0x7d, 0xe2, 0x8d, 0x82, 0x8c, 0x83, 
22599 +0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x82, 0x24, 0x04, 0x12, 0x20, 0x25, 0xe0, 0x44, 0x80, 0xf0, 0x74, 
22600 +0x74, 0x2f, 0xf8, 0x74, 0x04, 0x46, 0xf6, 0x7f, 0x00, 0x22, 0x12, 0x0f, 0x89, 0xe5, 0x31, 0x64, 
22601 +0x09, 0x70, 0x04, 0xe5, 0x30, 0x64, 0x01, 0x60, 0x16, 0x90, 0xff, 0x83, 0xe0, 0x54, 0x0f, 0xff, 
22602 +0xc3, 0xe5, 0x31, 0x9f, 0xe5, 0x30, 0x94, 0x00, 0x40, 0x05, 0x12, 0x25, 0x9c, 0x80, 0x03, 0x12, 
22603 +0x2f, 0x76, 0x02, 0x10, 0x0c, 0x90, 0xff, 0xfc, 0xe0, 0x20, 0xe7, 0x1f, 0xc2, 0xaf, 0x7d, 0xff, 
22604 +0xac, 0x05, 0x1d, 0xec, 0x60, 0x15, 0x7e, 0x04, 0x7f, 0x00, 0xef, 0x1f, 0xaa, 0x06, 0x70, 0x01, 
22605 +0x1e, 0x4a, 0x60, 0xec, 0x90, 0xff, 0x92, 0xe4, 0xf0, 0x80, 0xef, 0x22, 0x12, 0x0f, 0x89, 0x78, 
22606 +0x6c, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x30, 0xe0, 0x12, 0x30, 0xe1, 0x0f, 0x90, 0xff, 0xfc, 0xe0, 
22607 +0x44, 0x20, 0xf0, 0x7f, 0x04, 0x12, 0x11, 0x9f, 0x12, 0x19, 0x55, 0x02, 0x10, 0x0c, 0x8e, 0x65, 
22608 +0x8f, 0x66, 0xe5, 0x66, 0x15, 0x66, 0xae, 0x65, 0x70, 0x02, 0x15, 0x65, 0xd3, 0x94, 0x00, 0xee, 
22609 +0x94, 0x00, 0x40, 0x09, 0x7e, 0x07, 0x7f, 0xd0, 0x12, 0x0f, 0x62, 0x80, 0xe5, 0x22, 0x11, 0x1a, 
22610 +0x2b, 0x1c, 0x23, 0x56, 0x2f, 0x5c, 0x2d, 0xcc, 0x2d, 0x7a, 0x2e, 0x6b, 0x2c, 0x8e, 0x2b, 0x66, 
22611 +0x2b, 0xec, 0x2c, 0xf1, 0x2e, 0x2d, 0x1b, 0xe6, 0x2b, 0xaf, 0x28, 0x67, 0x0e, 0x12, 0x0f, 0x89, 
22612 +0x78, 0x8d, 0x12, 0x20, 0x9e, 0x20, 0xe2, 0x07, 0x7f, 0x11, 0x12, 0x2e, 0xa5, 0x80, 0x0a, 0x78, 
22613 +0x8d, 0xe6, 0xff, 0x12, 0x2c, 0x25, 0x12, 0x2e, 0xa5, 0x02, 0x10, 0x0c, 0x8f, 0x67, 0x12, 0x2c, 
22614 +0x25, 0xaf, 0x67, 0x12, 0x27, 0x19, 0x12, 0x20, 0x38, 0x12, 0x2f, 0x80, 0x74, 0x74, 0x25, 0x67, 
22615 +0xf8, 0x74, 0xfd, 0x56, 0xf6, 0xaf, 0x67, 0x12, 0x19, 0xbb, 0x22, 0x12, 0x0f, 0x89, 0xe5, 0x31, 
22616 +0x64, 0x09, 0x70, 0x04, 0xe5, 0x30, 0x64, 0x01, 0x60, 0x05, 0x12, 0x29, 0x2d, 0x80, 0x06, 0x12, 
22617 +0x19, 0x7a, 0x12, 0x19, 0x82, 0x02, 0x10, 0x0c, 0x12, 0x27, 0xfb, 0x12, 0x12, 0x3b, 0x90, 0xf8, 
22618 +0x04, 0xe0, 0xff, 0x60, 0x05, 0x7d, 0x01, 0x12, 0x11, 0xd8, 0x12, 0x26, 0xa3, 0x12, 0x12, 0x77, 
22619 +0x12, 0x10, 0xfa, 0x80, 0xe3, 0x12, 0x18, 0xed, 0xef, 0x12, 0x14, 0x0d, 0xe4, 0xf5, 0x2a, 0xf5, 
22620 +0x2b, 0xef, 0x60, 0x03, 0x02, 0x2f, 0x76, 0xe4, 0xff, 0x12, 0x2f, 0x6a, 0x22, 0x90, 0xff, 0xf0, 
22621 +0xe0, 0xff, 0x54, 0xa0, 0x60, 0xf7, 0xef, 0x30, 0xe5, 0x08, 0x90, 0xff, 0xf0, 0x44, 0x20, 0xf0, 
22622 +0xc3, 0x22, 0xd3, 0x22, 0x90, 0xff, 0xf0, 0xe0, 0xff, 0x54, 0x28, 0x60, 0xf7, 0xef, 0x30, 0xe5, 
22623 +0x08, 0x90, 0xff, 0xf0, 0x44, 0x20, 0xf0, 0xc3, 0x22, 0xd3, 0x22, 0xef, 0x30, 0xe7, 0x08, 0x12, 
22624 +0x18, 0xad, 0xe0, 0x54, 0xdf, 0xf0, 0x22, 0xef, 0x12, 0x18, 0xf7, 0xe0, 0x54, 0xdf, 0xf0, 0x22, 
22625 +0x81, 0x01, 0x82, 0x02, 0x83, 0x03, 0x87, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 
22626 +0x00, 0x40, 0x00, 0x08, 0x00, 0x78, 0x84, 0x12, 0x20, 0x2f, 0xa3, 0xa3, 0xe0, 0xff, 0x30, 0xe7, 
22627 +0x06, 0x54, 0x7f, 0xf0, 0x44, 0x80, 0xf0, 0x22, 0x85, 0x34, 0x30, 0x85, 0x35, 0x31, 0x90, 0xff, 
22628 +0x82, 0xe0, 0x54, 0xf7, 0xf0, 0xa3, 0xe0, 0x54, 0x7f, 0xf0, 0x22, 0xe4, 0xfe, 0xee, 0x90, 0x2f, 
22629 +0x00, 0x93, 0xb5, 0x07, 0x02, 0xd3, 0x22, 0x0e, 0xbe, 0x07, 0xf2, 0xc3, 0x22, 0x00, 0x08, 0x18, 
22630 +0x38, 0x28, 0x01, 0x81, 0x10, 0x0a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x0f, 0x89, 0x7f, 
22631 +0x02, 0x12, 0x10, 0x18, 0x12, 0x19, 0x55, 0x02, 0x10, 0x0c, 0x75, 0x30, 0x00, 0x8f, 0x31, 0x12, 
22632 +0x18, 0x49, 0x12, 0x29, 0x2d, 0x22, 0x12, 0x19, 0x82, 0x12, 0x19, 0x3e, 0x12, 0x19, 0x7a, 0x22, 
22633 +0xc2, 0x08, 0x22, 
22634 +};
22635 +
22636 +#undef IMAGE_VERSION_NAME
22637 +
22638 +#undef IMAGE_ARRAY_NAME
22639 +
22640 diff -Nur linux-2.4.19.old/drivers/usb/serial/io_ionsp.h linux-2.4.19/drivers/usb/serial/io_ionsp.h
22641 --- linux-2.4.19.old/drivers/usb/serial/io_ionsp.h      Tue Mar 20 02:21:54 2001
22642 +++ linux-2.4.19/drivers/usb/serial/io_ionsp.h  Mon Nov 25 12:27:08 2002
22643 @@ -88,12 +88,12 @@
22644  // Interrupt pipe
22645  //
22646  
22647 -typedef struct _INT_STATUS_PKT {
22648 +struct int_status_pkt {
22649         __u16      RxBytesAvail;                    // Additional bytes available to
22650                                                     // be read from Bulk IN pipe
22651         __u16      TxCredits[ MAX_RS232_PORTS ];   // Additional space available in
22652                                                     // given port's TxBuffer
22653 -} INT_STATUS_PKT, *PINT_STATUS_PKT;
22654 +};
22655  
22656  
22657  #define GET_INT_STATUS_SIZE(NumPorts) (sizeof(__u16) + (sizeof(__u16) * (NumPorts)))
22658 diff -Nur linux-2.4.19.old/drivers/usb/serial/io_tables.h linux-2.4.19/drivers/usb/serial/io_tables.h
22659 --- linux-2.4.19.old/drivers/usb/serial/io_tables.h     Sat Aug  3 02:39:45 2002
22660 +++ linux-2.4.19/drivers/usb/serial/io_tables.h Mon Nov 25 12:27:08 2002
22661 @@ -14,12 +14,12 @@
22662  #ifndef IO_TABLES_H
22663  #define IO_TABLES_H
22664  
22665 -static __devinitdata struct usb_device_id edgeport_1port_id_table [] = {
22666 +static struct usb_device_id edgeport_1port_id_table [] = {
22667         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT) },
22668         { }
22669  };
22670  
22671 -static __devinitdata struct usb_device_id edgeport_2port_id_table [] = {
22672 +static struct usb_device_id edgeport_2port_id_table [] = {
22673         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2) },
22674         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2I) },
22675         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_421) },
22676 @@ -33,7 +33,7 @@
22677         { }
22678  };
22679  
22680 -static __devinitdata struct usb_device_id edgeport_4port_id_table [] = {
22681 +static struct usb_device_id edgeport_4port_id_table [] = {
22682         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4) },
22683         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_RAPIDPORT_4) },
22684         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4T) },
22685 @@ -50,7 +50,7 @@
22686         { }
22687  };
22688  
22689 -static __devinitdata struct usb_device_id edgeport_8port_id_table [] = {
22690 +static struct usb_device_id edgeport_8port_id_table [] = {
22691         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8) },
22692         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) },
22693         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8I) },
22694 @@ -98,11 +98,9 @@
22695  MODULE_DEVICE_TABLE (usb, id_table_combined);
22696  
22697  static struct usb_serial_device_type edgeport_1port_device = {
22698 +       owner:                  THIS_MODULE,
22699         name:                   "Edgeport 1 port adapter",
22700         id_table:               edgeport_1port_id_table,
22701 -       needs_interrupt_in:     MUST_HAVE,
22702 -       needs_bulk_in:          MUST_HAVE,
22703 -       needs_bulk_out:         MUST_HAVE,
22704         num_interrupt_in:       1,
22705         num_bulk_in:            1,
22706         num_bulk_out:           1,
22707 @@ -122,11 +120,9 @@
22708  };
22709  
22710  static struct usb_serial_device_type edgeport_2port_device = {
22711 +       owner:                  THIS_MODULE,
22712         name:                   "Edgeport 2 port adapter",
22713         id_table:               edgeport_2port_id_table,
22714 -       needs_interrupt_in:     MUST_HAVE,
22715 -       needs_bulk_in:          MUST_HAVE,
22716 -       needs_bulk_out:         MUST_HAVE,
22717         num_interrupt_in:       1,
22718         num_bulk_in:            1,
22719         num_bulk_out:           1,
22720 @@ -146,11 +142,9 @@
22721  };
22722  
22723  static struct usb_serial_device_type edgeport_4port_device = {
22724 +       owner:                  THIS_MODULE,
22725         name:                   "Edgeport 4 port adapter",
22726         id_table:               edgeport_4port_id_table,
22727 -       needs_interrupt_in:     MUST_HAVE,
22728 -       needs_bulk_in:          MUST_HAVE,
22729 -       needs_bulk_out:         MUST_HAVE,
22730         num_interrupt_in:       1,
22731         num_bulk_in:            1,
22732         num_bulk_out:           1,
22733 @@ -170,11 +164,9 @@
22734  };
22735  
22736  static struct usb_serial_device_type edgeport_8port_device = {
22737 +       owner:                  THIS_MODULE,
22738         name:                   "Edgeport 8 port adapter",
22739         id_table:               edgeport_8port_id_table,
22740 -       needs_interrupt_in:     MUST_HAVE,
22741 -       needs_bulk_in:          MUST_HAVE,
22742 -       needs_bulk_out:         MUST_HAVE,
22743         num_interrupt_in:       1,
22744         num_bulk_in:            1,
22745         num_bulk_out:           1,
22746 diff -Nur linux-2.4.19.old/drivers/usb/serial/io_ti.c linux-2.4.19/drivers/usb/serial/io_ti.c
22747 --- linux-2.4.19.old/drivers/usb/serial/io_ti.c Thu Jan  1 01:00:00 1970
22748 +++ linux-2.4.19/drivers/usb/serial/io_ti.c     Mon Nov 25 12:27:08 2002
22749 @@ -0,0 +1,2684 @@
22750 +/*
22751 + * Edgeport USB Serial Converter driver
22752 + *
22753 + * Copyright(c) 2000-2002 Inside Out Networks, All rights reserved.
22754 + * Copyright(c) 2001-2002 Greg Kroah-Hartman <greg@kroah.com>
22755 + *
22756 + *     This program is free software; you can redistribute it and/or modify
22757 + *     it under the terms of the GNU General Public License as published by
22758 + *     the Free Software Foundation; either version 2 of the License, or
22759 + *     (at your option) any later version.
22760 + *
22761 + * Supports the following devices:
22762 + *     EP/1 EP/2 EP/4
22763 + *
22764 + * Version history:
22765 + *
22766 + *     July 11, 2002   Removed 4 port device structure since all TI UMP 
22767 + *                     chips have only 2 ports 
22768 + *                     David Iacovelli (davidi@ionetworks.com)
22769 + *
22770 + */
22771 +
22772 +#include <linux/config.h>
22773 +#include <linux/kernel.h>
22774 +#include <linux/errno.h>
22775 +#include <linux/init.h>
22776 +#include <linux/slab.h>
22777 +#include <linux/tty.h>
22778 +#include <linux/tty_driver.h>
22779 +#include <linux/tty_flip.h>
22780 +#include <linux/module.h>
22781 +#include <linux/spinlock.h>
22782 +#include <linux/serial.h>
22783 +#include <linux/ioctl.h>
22784 +#include <asm/uaccess.h>
22785 +#include <linux/usb.h>
22786 +
22787 +#ifdef CONFIG_USB_SERIAL_DEBUG
22788 +       static int debug = 1;
22789 +#else
22790 +       static int debug;
22791 +#endif
22792 +
22793 +#include "usb-serial.h"
22794 +
22795 +#include "io_16654.h"
22796 +#include "io_usbvend.h"
22797 +#include "io_ti.h"
22798 +
22799 +/*
22800 + * Version Information
22801 + */
22802 +#define DRIVER_VERSION "v0.2"
22803 +#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com> and David Iacovelli"
22804 +#define DRIVER_DESC "Edgeport USB Serial Driver"
22805 +
22806 +
22807 +/* firmware image code */
22808 +#define IMAGE_VERSION_NAME     PagableOperationalCodeImageVersion
22809 +#define IMAGE_ARRAY_NAME       PagableOperationalCodeImage
22810 +#define IMAGE_SIZE             PagableOperationalCodeSize
22811 +#include "io_fw_down3.h"       /* Define array OperationalCodeImage[] */
22812 +
22813 +#define EPROM_PAGE_SIZE                64
22814 +
22815 +
22816 +struct edgeport_uart_buf_desc {
22817 +       __u32 count;            // Number of bytes currently in buffer
22818 +};
22819 +
22820 +/* different hardware types */
22821 +#define HARDWARE_TYPE_930      0
22822 +#define HARDWARE_TYPE_TIUMP    1
22823 +
22824 +// IOCTL_PRIVATE_TI_GET_MODE Definitions
22825 +#define        TI_MODE_CONFIGURING     0   // Device has not entered start device 
22826 +#define        TI_MODE_BOOT            1   // Staying in boot mode
22827 +#define TI_MODE_DOWNLOAD       2   // Made it to download mode
22828 +#define TI_MODE_TRANSITIONING  3   // Currently in boot mode but transitioning to download mode
22829 +
22830 +
22831 +/* Product information read from the Edgeport */
22832 +struct product_info
22833 +{
22834 +       int     TiMode;                 // Current TI Mode
22835 +       __u8    hardware_type;          // Type of hardware
22836 +} __attribute__((packed));
22837 +
22838 +
22839 +struct edgeport_port {
22840 +       __u16 uart_base;
22841 +       __u16 dma_address;
22842 +       __u8 shadow_msr;
22843 +       __u8 shadow_mcr;
22844 +       __u8 shadow_lsr;
22845 +       __u8 lsr_mask;
22846 +       __u32 ump_read_timeout;         /* Number of miliseconds the UMP will
22847 +                                          wait without data before completing
22848 +                                          a read short */
22849 +       int baud_rate;
22850 +       int close_pending;
22851 +       int lsr_event;
22852 +       struct edgeport_uart_buf_desc tx;
22853 +       struct async_icount     icount;
22854 +       wait_queue_head_t       delta_msr_wait; /* for handling sleeping while
22855 +                                                  waiting for msr change to
22856 +                                                  happen */
22857 +       struct edgeport_serial  *edge_serial;
22858 +       struct usb_serial_port  *port;
22859 +};
22860 +
22861 +struct edgeport_serial {
22862 +       struct product_info product_info;
22863 +       u8 TI_I2C_Type;                 // Type of I2C in UMP
22864 +       u8 TiReadI2C;                   // Set to TRUE if we have read the I2c in Boot Mode
22865 +       int num_ports_open;
22866 +       struct usb_serial *serial;
22867 +};
22868 +
22869 +
22870 +/* Devices that this driver supports */
22871 +static struct usb_device_id edgeport_1port_id_table [] = {
22872 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_1) },
22873 +       { }
22874 +};
22875 +
22876 +static struct usb_device_id edgeport_2port_id_table [] = {
22877 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2) },
22878 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2I) },
22879 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421) },
22880 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421_BOOT) },
22881 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421_DOWN) },
22882 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21) },
22883 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21_BOOT) },
22884 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21_DOWN) },
22885 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_42) },
22886 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4) },
22887 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4I) },
22888 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_22) },
22889 +       { }
22890 +};
22891 +
22892 +/* Devices that this driver supports */
22893 +static __devinitdata struct usb_device_id id_table_combined [] = {
22894 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_1) },
22895 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2) },
22896 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2I) },
22897 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421) },
22898 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421_BOOT) },
22899 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421_DOWN) },
22900 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21) },
22901 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21_BOOT) },
22902 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21_DOWN) },
22903 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_42) },
22904 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4) },
22905 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4I) },
22906 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_22) },
22907 +       { }
22908 +};
22909 +
22910 +MODULE_DEVICE_TABLE (usb, id_table_combined);
22911 +
22912 +
22913 +static struct EDGE_FIRMWARE_VERSION_INFO OperationalCodeImageVersion;
22914 +
22915 +static int TIStayInBootMode = 0;
22916 +static int ignore_cpu_rev = 0;
22917 +
22918 +
22919 +
22920 +static void edge_set_termios (struct usb_serial_port *port, struct termios *old_termios);
22921 +
22922 +static int TIReadVendorRequestSync (struct usb_device *dev,
22923 +                               __u8            request,
22924 +                               __u16           value,
22925 +                               __u16           index,
22926 +                               u8              *data,
22927 +                               int             size)
22928 +{
22929 +       int status;
22930 +
22931 +       status = usb_control_msg (dev,
22932 +                               usb_rcvctrlpipe(dev, 0),
22933 +                               request,
22934 +                               (USB_TYPE_VENDOR | 
22935 +                                USB_RECIP_DEVICE | 
22936 +                                USB_DIR_IN),
22937 +                               value,
22938 +                               index,
22939 +                               data,
22940 +                               size,
22941 +                               HZ);
22942 +       if (status < 0)
22943 +               return status;
22944 +       if (status != size) {
22945 +               dbg ("%s - wanted to write %d, but only wrote %d",
22946 +                    __FUNCTION__, size, status);
22947 +               return -ECOMM;
22948 +       }
22949 +       return 0;
22950 +}
22951 +
22952 +static int TISendVendorRequestSync (struct usb_device *dev,
22953 +                               __u8            request,
22954 +                               __u16           value,
22955 +                               __u16           index,
22956 +                               u8              *data,
22957 +                               int             size)
22958 +{
22959 +       int status;
22960 +
22961 +       status = usb_control_msg (dev,
22962 +                               usb_sndctrlpipe(dev, 0),
22963 +                               request,
22964 +                               (USB_TYPE_VENDOR | 
22965 +                                USB_RECIP_DEVICE | 
22966 +                                USB_DIR_OUT),
22967 +                               value,
22968 +                               index,
22969 +                               data,
22970 +                               size,
22971 +                               HZ);
22972 +
22973 +       if (status < 0)
22974 +               return status;
22975 +       if (status != size) {
22976 +               dbg ("%s - wanted to write %d, but only wrote %d",
22977 +                    __FUNCTION__, size, status);
22978 +               return -ECOMM;
22979 +       }
22980 +       return 0;
22981 +}
22982 +
22983 +static int TIWriteCommandSync (struct usb_device *dev, __u8 command,
22984 +                               __u8 moduleid, __u16 value, u8 *data,
22985 +                               int size)
22986 +{
22987 +       return TISendVendorRequestSync (dev,
22988 +                                         command,                      // Request
22989 +                                         value,                        // wValue 
22990 +                                         moduleid,                     // wIndex
22991 +                                         data,                         // TransferBuffer
22992 +                                         size);                        // TransferBufferLength
22993 +
22994 +}
22995 +
22996 +
22997 +/* clear tx/rx buffers and fifo in TI UMP */
22998 +static int TIPurgeDataSync (struct usb_serial_port *port, __u16 mask)
22999 +{
23000 +       int port_number = port->number - port->serial->minor;
23001 +
23002 +       dbg ("%s - port %d, mask %x", __FUNCTION__, port_number, mask);
23003 +
23004 +       return TIWriteCommandSync (port->serial->dev,
23005 +                                       UMPC_PURGE_PORT,
23006 +                                       (__u8)(UMPM_UART1_PORT + port_number),
23007 +                                       mask,
23008 +                                       NULL,
23009 +                                       0);
23010 +}
23011 +
23012 +/**
23013 + * TIReadDownloadMemory - Read edgeport memory from TI chip
23014 + * @dev: usb device pointer
23015 + * @address: Device CPU address at which to read
23016 + * @length: Length of above data
23017 + * @address_type: Can read both XDATA and I2C
23018 + * @buffer: pointer to input data buffer
23019 + */
23020 +int TIReadDownloadMemory (struct usb_device *dev, int start_address, int length,
23021 +                         __u8 address_type, __u8 *buffer)
23022 +{
23023 +       int status = 0;
23024 +       __u8 read_length;
23025 +       __u16 be_start_address;
23026 +       
23027 +       dbg ("%s - @ %x for %d", __FUNCTION__, start_address, length);
23028 +
23029 +       /* Read in blocks of 64 bytes
23030 +        * (TI firmware can't handle more than 64 byte reads)
23031 +        */
23032 +       while (length) {
23033 +               if (length > 64)
23034 +                       read_length= 64;
23035 +               else
23036 +                       read_length = (__u8)length;
23037 +
23038 +               if (read_length > 1) {
23039 +                       dbg ("%s - @ %x for %d", __FUNCTION__, 
23040 +                            start_address, read_length);
23041 +               }
23042 +               be_start_address = cpu_to_be16 (start_address);
23043 +               status = TIReadVendorRequestSync (dev,
23044 +                                                 UMPC_MEMORY_READ,     // Request
23045 +                                                 (__u16)address_type,  // wValue (Address type)
23046 +                                                 be_start_address,     // wIndex (Address to read)
23047 +                                                 buffer,               // TransferBuffer
23048 +                                                 read_length); // TransferBufferLength
23049 +
23050 +               if (status) {
23051 +                       dbg ("%s - ERROR %x", __FUNCTION__, status);
23052 +                       return status;
23053 +               }
23054 +
23055 +               if (read_length > 1) {
23056 +                       usb_serial_debug_data (__FILE__, __FUNCTION__,
23057 +                                              read_length, buffer);
23058 +               }
23059 +
23060 +               /* Update pointers/length */
23061 +               start_address += read_length;
23062 +               buffer += read_length;
23063 +               length -= read_length;
23064 +       }
23065 +       
23066 +       return status;
23067 +}
23068 +
23069 +int TIReadRam (struct usb_device *dev, int start_address, int length, __u8 *buffer)
23070 +{
23071 +       return TIReadDownloadMemory (dev,
23072 +                                    start_address,
23073 +                                    length,
23074 +                                    DTK_ADDR_SPACE_XDATA,
23075 +                                    buffer);
23076 +}
23077 +
23078 +/* Read edgeport memory to a given block */
23079 +static int TIReadBootMemory (struct edgeport_serial *serial, int start_address, int length, __u8 * buffer)
23080 +{
23081 +       int status = 0;
23082 +       int i;
23083 +
23084 +       for (i=0; i< length; i++) {
23085 +               status = TIReadVendorRequestSync (serial->serial->dev,
23086 +                                       UMPC_MEMORY_READ,               // Request
23087 +                                       serial->TI_I2C_Type,            // wValue (Address type)
23088 +                                       (__u16)(start_address+i),       // wIndex
23089 +                                       &buffer[i],                     // TransferBuffer
23090 +                                       0x01);                          // TransferBufferLength
23091 +               if (status) {
23092 +                       dbg ("%s - ERROR %x", __FUNCTION__, status);
23093 +                       return status;
23094 +               }
23095 +       }
23096 +
23097 +       dbg ("%s - start_address = %x, length = %d", __FUNCTION__, start_address, length);
23098 +       usb_serial_debug_data (__FILE__, __FUNCTION__, length, buffer);
23099 +
23100 +       serial->TiReadI2C = 1;
23101 +
23102 +       return status;
23103 +}
23104 +
23105 +/* Write given block to TI EPROM memory */
23106 +static int TIWriteBootMemory (struct edgeport_serial *serial, int start_address, int length, __u8 *buffer)
23107 +{
23108 +       int status = 0;
23109 +       int i;
23110 +       __u8 temp;
23111 +
23112 +       /* Must do a read before write */
23113 +       if (!serial->TiReadI2C) {
23114 +               status = TIReadBootMemory(serial, 0, 1, &temp);
23115 +               if (status)
23116 +                       return status;
23117 +       }
23118 +
23119 +       for (i=0; i < length; ++i) {
23120 +               status = TISendVendorRequestSync (serial->serial->dev,
23121 +                                               UMPC_MEMORY_WRITE,              // Request
23122 +                                               buffer[i],                      // wValue
23123 +                                               (__u16)(i+start_address),       // wIndex
23124 +                                               NULL,                           // TransferBuffer
23125 +                                               0);                             // TransferBufferLength
23126 +               if (status)
23127 +                       return status;
23128 +       }
23129 +
23130 +       dbg ("%s - start_sddr = %x, length = %d", __FUNCTION__, start_address, length);
23131 +       usb_serial_debug_data (__FILE__, __FUNCTION__, length, buffer);
23132 +
23133 +       return status;
23134 +}
23135 +
23136 +
23137 +/* Write edgeport I2C memory to TI chip        */
23138 +static int TIWriteDownloadI2C (struct edgeport_serial *serial, int start_address, int length, __u8 address_type, __u8 *buffer)
23139 +{
23140 +       int status = 0;
23141 +       int write_length;
23142 +       __u16 be_start_address;
23143 +
23144 +       /* We can only send a maximum of 1 aligned byte page at a time */
23145 +       
23146 +       /* calulate the number of bytes left in the first page */
23147 +       write_length = EPROM_PAGE_SIZE - (start_address & (EPROM_PAGE_SIZE - 1));
23148 +
23149 +       if (write_length > length)
23150 +               write_length = length;
23151 +
23152 +       dbg ("%s - BytesInFirstPage Addr = %x, length = %d", __FUNCTION__, start_address, write_length);
23153 +       usb_serial_debug_data (__FILE__, __FUNCTION__, write_length, buffer);
23154 +
23155 +       /* Write first page */
23156 +       be_start_address = cpu_to_be16 (start_address);
23157 +       status = TISendVendorRequestSync (serial->serial->dev,
23158 +                                       UMPC_MEMORY_WRITE,      // Request
23159 +                                       (__u16)address_type,    // wValue
23160 +                                       be_start_address,       // wIndex
23161 +                                       buffer,                 // TransferBuffer
23162 +                                       write_length);
23163 +       if (status) {
23164 +               dbg ("%s - ERROR %d", __FUNCTION__, status);
23165 +               return status;
23166 +       }
23167 +
23168 +       length          -= write_length;
23169 +       start_address   += write_length;
23170 +       buffer          += write_length;
23171 +
23172 +       /* We should be aligned now -- can write max page size bytes at a time */
23173 +       while (length) {
23174 +               if (length > EPROM_PAGE_SIZE)
23175 +                       write_length = EPROM_PAGE_SIZE;
23176 +               else
23177 +                       write_length = length;
23178 +
23179 +               dbg ("%s - Page Write Addr = %x, length = %d", __FUNCTION__, start_address, write_length);
23180 +               usb_serial_debug_data (__FILE__, __FUNCTION__, write_length, buffer);
23181 +
23182 +               /* Write next page */
23183 +               be_start_address = cpu_to_be16 (start_address);
23184 +               status = TISendVendorRequestSync (serial->serial->dev,
23185 +                                               UMPC_MEMORY_WRITE,      // Request
23186 +                                               (__u16)address_type,    // wValue
23187 +                                               be_start_address,       // wIndex
23188 +                                               buffer,                 // TransferBuffer
23189 +                                               write_length);          // TransferBufferLength
23190 +               if (status) {
23191 +                       dbg ("%s - ERROR %d", __FUNCTION__, status);
23192 +                       return status;
23193 +               }
23194 +               
23195 +               length          -= write_length;
23196 +               start_address   += write_length;
23197 +               buffer          += write_length;
23198 +       }
23199 +       return status;
23200 +}
23201 +
23202 +/* Examine the UMP DMA registers and LSR
23203 + * 
23204 + * Check the MSBit of the X and Y DMA byte count registers.
23205 + * A zero in this bit indicates that the TX DMA buffers are empty
23206 + * then check the TX Empty bit in the UART.
23207 + */
23208 +static int TIIsTxActive (struct edgeport_port *port)
23209 +{
23210 +       int status;
23211 +       struct out_endpoint_desc_block *oedb;
23212 +       __u8 lsr;
23213 +       int bytes_left = 0;
23214 +
23215 +       oedb = kmalloc (sizeof (* oedb), GFP_KERNEL);
23216 +       if (!oedb) {
23217 +               err ("%s - out of memory", __FUNCTION__);
23218 +               return -ENOMEM;
23219 +       }
23220 +
23221 +       /* Read the DMA Count Registers */
23222 +       status = TIReadRam (port->port->serial->dev,
23223 +                           port->dma_address,
23224 +                           sizeof( *oedb),
23225 +                           (void *)oedb);
23226 +
23227 +       if (status)
23228 +               goto exit_is_tx_active;
23229 +
23230 +       dbg ("%s - XByteCount    0x%X", __FUNCTION__, oedb->XByteCount);
23231 +
23232 +       /* and the LSR */
23233 +       status = TIReadRam (port->port->serial->dev, 
23234 +                           port->uart_base + UMPMEM_OFFS_UART_LSR,
23235 +                           1,
23236 +                           &lsr);
23237 +
23238 +       if (status)
23239 +               goto exit_is_tx_active;
23240 +       dbg ("%s - LSR = 0x%X", __FUNCTION__, lsr);
23241 +       
23242 +       /* If either buffer has data or we are transmitting then return TRUE */
23243 +       if ((oedb->XByteCount & 0x80 ) != 0 )
23244 +               bytes_left += 64;
23245 +
23246 +       if ((lsr & UMP_UART_LSR_TX_MASK ) == 0 )
23247 +               bytes_left += 1;
23248 +
23249 +       /* We return Not Active if we get any kind of error */
23250 +exit_is_tx_active:
23251 +       dbg ("%s - return %d", __FUNCTION__, bytes_left );
23252 +       return bytes_left;
23253 +}
23254 +
23255 +static void TIChasePort(struct edgeport_port *port)
23256 +{
23257 +       int loops;
23258 +       int last_count;
23259 +       int write_size;
23260 +
23261 +restart_tx_loop:
23262 +       // Base the LoopTime on the baud rate
23263 +       if (port->baud_rate == 0)
23264 +               port->baud_rate = 1200;
23265 +
23266 +       write_size = port->tx.count;
23267 +       loops = max(100, (100*write_size)/(port->baud_rate/10));
23268 +       dbg ("%s - write_size %d, baud %d loop = %d", __FUNCTION__,
23269 +            write_size, port->baud_rate, loops);
23270 +
23271 +       while (1) {
23272 +               // Save Last count
23273 +               last_count = port->tx.count;
23274 +
23275 +               dbg ("%s - Tx Buffer Size = %d loops = %d", __FUNCTION__,
23276 +                    last_count, loops);
23277 +
23278 +               /* Is the Edgeport Buffer empty? */
23279 +               if (port->tx.count == 0)
23280 +                       break;
23281 +
23282 +               /* Block the thread for 10ms */
23283 +               wait_ms (10);
23284 +
23285 +               if (last_count == port->tx.count) {
23286 +                       /* No activity.. count down. */
23287 +                       --loops;
23288 +                       if (loops == 0) {
23289 +                               dbg ("%s - Wait for TxEmpty - TIMEOUT",
23290 +                                    __FUNCTION__);
23291 +                               return;
23292 +                       }
23293 +               } else {
23294 +                       /* Reset timeout value back to a minimum of 1 second */
23295 +                       dbg ("%s - Wait for TxEmpty  Reset Count", __FUNCTION__);
23296 +                       goto restart_tx_loop;
23297 +               }
23298 +       }
23299 +
23300 +       dbg ("%s - Local Tx Buffer Empty -- Waiting for TI UMP to EMPTY X/Y and FIFO",
23301 +            __FUNCTION__);
23302 +
23303 +       write_size = TIIsTxActive (port);
23304 +       loops = max(50, (100*write_size)/(port->baud_rate/10));
23305 +       dbg ("%s - write_size %d, baud %d loop = %d", __FUNCTION__, 
23306 +            write_size, port->baud_rate, loops);
23307 +
23308 +       while (1) {
23309 +               /* This function takes 4 ms; */
23310 +               if (!TIIsTxActive (port)) {
23311 +                       /* Delay a few char times */
23312 +                       wait_ms (50);
23313 +                       dbg ("%s - Empty", __FUNCTION__);
23314 +                       return;
23315 +               }
23316 +
23317 +               --loops;
23318 +               if (loops == 0) {
23319 +                       dbg ("%s - TIMEOUT", __FUNCTION__);
23320 +                       return;
23321 +               }
23322 +       }
23323 +}
23324 +
23325 +static int TIChooseConfiguration (struct usb_device *dev)
23326 +{
23327 +       // There may be multiple configurations on this device, in which case
23328 +       // we would need to read and parse all of them to find out which one
23329 +       // we want. However, we just support one config at this point,
23330 +       // configuration # 1, which is Config Descriptor 0.
23331 +
23332 +       dbg ("%s - Number of Interfaces = %d", __FUNCTION__, dev->config->bNumInterfaces);
23333 +       dbg ("%s - MAX Power            = %d", __FUNCTION__, dev->config->MaxPower*2);
23334 +
23335 +       if (dev->config->bNumInterfaces != 1) {
23336 +               err ("%s - bNumInterfaces is not 1, ERROR!", __FUNCTION__);
23337 +               return -ENODEV;
23338 +       }
23339 +
23340 +       return 0;
23341 +}
23342 +
23343 +int TIReadRom (struct edgeport_serial *serial, int start_address, int length, __u8 *buffer)
23344 +{
23345 +       int status;
23346 +
23347 +       if (serial->product_info.TiMode == TI_MODE_DOWNLOAD) {
23348 +               status = TIReadDownloadMemory (serial->serial->dev,
23349 +                                              start_address,
23350 +                                              length,
23351 +                                              serial->TI_I2C_Type,
23352 +                                              buffer);
23353 +       } else {
23354 +               status = TIReadBootMemory (serial,
23355 +                                          start_address,
23356 +                                          length,
23357 +                                          buffer);
23358 +       }
23359 +
23360 +       return status;
23361 +}
23362 +
23363 +int TIWriteRom (struct edgeport_serial *serial, int start_address, int length, __u8 *buffer)
23364 +{
23365 +       if (serial->product_info.TiMode == TI_MODE_BOOT)
23366 +               return TIWriteBootMemory (serial,
23367 +                                         start_address,
23368 +                                         length,
23369 +                                         buffer);
23370 +
23371 +       if (serial->product_info.TiMode == TI_MODE_DOWNLOAD)
23372 +               return TIWriteDownloadI2C (serial,
23373 +                                          start_address,
23374 +                                          length,
23375 +                                          serial->TI_I2C_Type,
23376 +                                          buffer);
23377 +
23378 +       return -EINVAL;
23379 +}
23380 +
23381 +
23382 +
23383 +/* Read a descriptor header from I2C based on type */
23384 +static int TIGetDescriptorAddress (struct edgeport_serial *serial, int desc_type, struct ti_i2c_desc *rom_desc)
23385 +{
23386 +       int start_address;
23387 +       int status;
23388 +
23389 +       /* Search for requested descriptor in I2C */
23390 +       start_address = 2;
23391 +       do {
23392 +               status = TIReadRom (serial,
23393 +                                  start_address,
23394 +                                  sizeof(struct ti_i2c_desc),
23395 +                                  (__u8 *)rom_desc );
23396 +               if (status)
23397 +                       return 0;
23398 +
23399 +               if (rom_desc->Type == desc_type)
23400 +                       return start_address;
23401 +
23402 +               start_address = start_address + sizeof(struct ti_i2c_desc) +  rom_desc->Size;
23403 +
23404 +       } while ((start_address < TI_MAX_I2C_SIZE) && rom_desc->Type);
23405 +       
23406 +       return 0;
23407 +}
23408 +
23409 +/* Validate descriptor checksum */
23410 +static int ValidChecksum(struct ti_i2c_desc *rom_desc, __u8 *buffer)
23411 +{
23412 +       __u16 i;
23413 +       __u8 cs = 0;
23414 +
23415 +       for (i=0; i < rom_desc->Size; i++) {
23416 +               cs = (__u8)(cs + buffer[i]);
23417 +       }
23418 +       if (cs != rom_desc->CheckSum) {
23419 +               dbg ("%s - Mismatch %x - %x", __FUNCTION__, rom_desc->CheckSum, cs);
23420 +               return -EINVAL;
23421 +       }
23422 +       return 0;
23423 +}
23424 +
23425 +/* Make sure that the I2C image is good */
23426 +static int TiValidateI2cImage (struct edgeport_serial *serial)
23427 +{
23428 +       int status = 0;
23429 +       struct ti_i2c_desc *rom_desc;
23430 +       int start_address = 2;
23431 +       __u8 *buffer;
23432 +
23433 +       rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL);
23434 +       if (!rom_desc) {
23435 +               err ("%s - out of memory", __FUNCTION__);
23436 +               return -ENOMEM;
23437 +       }
23438 +       buffer = kmalloc (TI_MAX_I2C_SIZE, GFP_KERNEL);
23439 +       if (!buffer) {
23440 +               err ("%s - out of memory when allocating buffer", __FUNCTION__);
23441 +               kfree (rom_desc);
23442 +               return -ENOMEM;
23443 +       }
23444 +
23445 +       // Read the first byte (Signature0) must be 0x52
23446 +       status = TIReadRom (serial, 0, 1, buffer);
23447 +       if (status)
23448 +               goto ExitTiValidateI2cImage; 
23449 +
23450 +       if (*buffer != 0x52) {
23451 +               err ("%s - invalid buffer signature", __FUNCTION__);
23452 +               status = -ENODEV;
23453 +               goto ExitTiValidateI2cImage;
23454 +       }
23455 +
23456 +       do {
23457 +               // Validate the I2C
23458 +               status = TIReadRom (serial,
23459 +                               start_address,
23460 +                               sizeof(struct ti_i2c_desc),
23461 +                               (__u8 *)rom_desc);
23462 +               if (status)
23463 +                       break;
23464 +
23465 +               if ((start_address + sizeof(struct ti_i2c_desc) + rom_desc->Size) > TI_MAX_I2C_SIZE) {
23466 +                       status = -ENODEV;
23467 +                       dbg ("%s - structure too big, erroring out.", __FUNCTION__);
23468 +                       break;
23469 +               }
23470 +
23471 +               dbg ("%s Type = 0x%x", __FUNCTION__, rom_desc->Type);
23472 +
23473 +               // Skip type 2 record
23474 +               if ((rom_desc->Type & 0x0f) != I2C_DESC_TYPE_FIRMWARE_BASIC) {
23475 +                       // Read the descriptor data
23476 +                       status = TIReadRom(serial,
23477 +                                               start_address+sizeof(struct ti_i2c_desc),
23478 +                                               rom_desc->Size,
23479 +                                               buffer);
23480 +                       if (status)
23481 +                               break;
23482 +
23483 +                       status = ValidChecksum(rom_desc, buffer);
23484 +                       if (status)
23485 +                               break;
23486 +               }
23487 +               start_address = start_address + sizeof(struct ti_i2c_desc) + rom_desc->Size;
23488 +
23489 +       } while ((rom_desc->Type != I2C_DESC_TYPE_ION) && (start_address < TI_MAX_I2C_SIZE));
23490 +
23491 +       if ((rom_desc->Type != I2C_DESC_TYPE_ION) || (start_address > TI_MAX_I2C_SIZE))
23492 +               status = -ENODEV;
23493 +
23494 +ExitTiValidateI2cImage:        
23495 +       kfree (buffer);
23496 +       kfree (rom_desc);
23497 +       return status;
23498 +}
23499 +
23500 +static int TIReadManufDescriptor (struct edgeport_serial *serial, __u8 *buffer)
23501 +{
23502 +       int status;
23503 +       int start_address;
23504 +       struct ti_i2c_desc *rom_desc;
23505 +       struct edge_ti_manuf_descriptor *desc;
23506 +
23507 +       rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL);
23508 +       if (!rom_desc) {
23509 +               err ("%s - out of memory", __FUNCTION__);
23510 +               return -ENOMEM;
23511 +       }
23512 +       start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_ION, rom_desc);
23513 +
23514 +       if (!start_address) {
23515 +               dbg ("%s - Edge Descriptor not found in I2C", __FUNCTION__);
23516 +               status = -ENODEV;
23517 +               goto exit;
23518 +       }
23519 +
23520 +       // Read the descriptor data
23521 +       status = TIReadRom (serial,
23522 +                               start_address+sizeof(struct ti_i2c_desc),
23523 +                               rom_desc->Size,
23524 +                               buffer);
23525 +       if (status)
23526 +               goto exit;
23527 +       
23528 +       status = ValidChecksum(rom_desc, buffer);
23529 +       
23530 +       desc = (struct edge_ti_manuf_descriptor *)buffer;
23531 +       dbg ( "%s - IonConfig      0x%x", __FUNCTION__, desc->IonConfig         );
23532 +       dbg ( "%s - Version          %d", __FUNCTION__, desc->Version           );
23533 +       dbg ( "%s - Cpu/Board      0x%x", __FUNCTION__, desc->CpuRev_BoardRev   );
23534 +       dbg ( "%s - NumPorts         %d", __FUNCTION__, desc->NumPorts          );      
23535 +       dbg ( "%s - NumVirtualPorts  %d", __FUNCTION__, desc->NumVirtualPorts   );      
23536 +       dbg ( "%s - TotalPorts       %d", __FUNCTION__, desc->TotalPorts        );      
23537 +
23538 +exit:
23539 +       kfree (rom_desc);
23540 +       return status;
23541 +}
23542 +
23543 +/* Build firmware header used for firmware update */
23544 +static int BuildI2CFirmwareHeader (__u8 *header)
23545 +{
23546 +       __u8 *buffer;
23547 +       int buffer_size;
23548 +       int i;
23549 +       __u8 cs = 0;
23550 +       struct ti_i2c_desc *i2c_header;
23551 +       struct ti_i2c_image_header *img_header;
23552 +       struct ti_i2c_firmware_rec *firmware_rec;
23553 +
23554 +       // In order to update the I2C firmware we must change the type 2 record to type 0xF2.
23555 +       // This will force the UMP to come up in Boot Mode.  Then while in boot mode, the driver 
23556 +       // will download the latest firmware (padded to 15.5k) into the UMP ram. 
23557 +       // And finally when the device comes back up in download mode the driver will cause 
23558 +       // the new firmware to be copied from the UMP Ram to I2C and the firmware will update
23559 +       // the record type from 0xf2 to 0x02.
23560 +       
23561 +       // Allocate a 15.5k buffer + 2 bytes for version number (Firmware Record)
23562 +       buffer_size = (((1024 * 16) - 512 )+ sizeof(struct ti_i2c_firmware_rec));
23563 +
23564 +       buffer = kmalloc (buffer_size, GFP_KERNEL);
23565 +       if (!buffer) {
23566 +               err ("%s - out of memory", __FUNCTION__);
23567 +               return -ENOMEM;
23568 +       }
23569 +       
23570 +       // Set entire image of 0xffs
23571 +       memset (buffer, 0xff, buffer_size);
23572 +
23573 +       // Copy version number into firmware record
23574 +       firmware_rec = (struct ti_i2c_firmware_rec *)buffer;
23575 +
23576 +       firmware_rec->Ver_Major = OperationalCodeImageVersion.MajorVersion;
23577 +       firmware_rec->Ver_Minor = OperationalCodeImageVersion.MinorVersion;
23578 +
23579 +       // Pointer to fw_down memory image
23580 +       img_header = (struct ti_i2c_image_header *)&PagableOperationalCodeImage[0];
23581 +
23582 +       memcpy (buffer + sizeof(struct ti_i2c_firmware_rec),
23583 +               &PagableOperationalCodeImage[sizeof(struct ti_i2c_image_header)],
23584 +               img_header->Length);
23585 +
23586 +       for (i=0; i < buffer_size; i++) {
23587 +               cs = (__u8)(cs + buffer[i]);
23588 +       }
23589 +
23590 +       kfree (buffer);
23591 +
23592 +       // Build new header
23593 +       i2c_header =  (struct ti_i2c_desc *)header;
23594 +       firmware_rec =  (struct ti_i2c_firmware_rec*)i2c_header->Data;
23595 +       
23596 +       i2c_header->Type        = I2C_DESC_TYPE_FIRMWARE_BLANK;
23597 +       i2c_header->Size        = (__u16)buffer_size;
23598 +       i2c_header->CheckSum    = cs;
23599 +       firmware_rec->Ver_Major = OperationalCodeImageVersion.MajorVersion;
23600 +       firmware_rec->Ver_Minor = OperationalCodeImageVersion.MinorVersion;
23601 +
23602 +       return 0;
23603 +}
23604 +
23605 +/* Try to figure out what type of I2c we have */
23606 +static int TIGetI2cTypeInBootMode (struct edgeport_serial *serial)
23607 +{
23608 +       int status;
23609 +       __u8 data;
23610 +               
23611 +       // Try to read type 2
23612 +       status = TIReadVendorRequestSync (serial->serial->dev,
23613 +                                       UMPC_MEMORY_READ,               // Request
23614 +                                       DTK_ADDR_SPACE_I2C_TYPE_II,     // wValue (Address type)
23615 +                                       0,                              // wIndex
23616 +                                       &data,                          // TransferBuffer
23617 +                                       0x01);                          // TransferBufferLength
23618 +       if (status)
23619 +               dbg ("%s - read 2 status error = %d", __FUNCTION__, status);
23620 +       else
23621 +               dbg ("%s - read 2 data = 0x%x", __FUNCTION__, data);
23622 +       if ((!status) && data == 0x52) {
23623 +               dbg ("%s - ROM_TYPE_II", __FUNCTION__);
23624 +               serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
23625 +               return 0;
23626 +       }
23627 +
23628 +       // Try to read type 3
23629 +       status = TIReadVendorRequestSync (serial->serial->dev,
23630 +                                       UMPC_MEMORY_READ,               // Request
23631 +                                       DTK_ADDR_SPACE_I2C_TYPE_III,    // wValue (Address type)
23632 +                                       0,                              // wIndex
23633 +                                       &data,                          // TransferBuffer
23634 +                                       0x01);                          // TransferBufferLength
23635 +       if (status)
23636 +               dbg ("%s - read 3 status error = %d", __FUNCTION__, status);
23637 +       else
23638 +               dbg ("%s - read 2 data = 0x%x", __FUNCTION__, data);
23639 +       if ((!status) && data == 0x52) {
23640 +               dbg ("%s - ROM_TYPE_III", __FUNCTION__);
23641 +               serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_III;
23642 +               return 0;
23643 +       }
23644 +
23645 +       dbg ("%s - Unknown", __FUNCTION__);
23646 +       serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
23647 +       return -ENODEV;
23648 +}
23649 +
23650 +static int TISendBulkTransferSync (struct usb_serial *serial, void *buffer, int length, int *num_sent)
23651 +{
23652 +       int status;
23653 +
23654 +       status = usb_bulk_msg (serial->dev,
23655 +                               usb_sndbulkpipe(serial->dev,
23656 +                                               serial->port[0].bulk_out_endpointAddress),
23657 +                               buffer,
23658 +                               length,
23659 +                               num_sent,
23660 +                               HZ);
23661 +       return status;
23662 +}
23663 +
23664 +/* Download given firmware image to the device (IN BOOT MODE) */
23665 +static int TIDownloadCodeImage (struct edgeport_serial *serial, __u8 *image, int image_length)
23666 +{
23667 +       int status = 0;
23668 +       int pos;
23669 +       int transfer;
23670 +       int done;
23671 +
23672 +       // Transfer firmware image
23673 +       for (pos = 0; pos < image_length; ) {
23674 +               // Read the next buffer from file
23675 +               transfer = image_length - pos;
23676 +               if (transfer > EDGE_FW_BULK_MAX_PACKET_SIZE)
23677 +                       transfer = EDGE_FW_BULK_MAX_PACKET_SIZE;
23678 +
23679 +               // Transfer data
23680 +               status = TISendBulkTransferSync (serial->serial, &image[pos], transfer, &done);
23681 +               if (status)
23682 +                       break;
23683 +               // Advance buffer pointer
23684 +               pos += done;
23685 +       }
23686 +
23687 +       return status;
23688 +}
23689 +
23690 +// FIXME!!!
23691 +static int TIConfigureBootDevice (struct usb_device *dev)
23692 +{
23693 +       return 0;
23694 +}
23695 +
23696 +/**
23697 + * DownloadTIFirmware - Download run-time operating firmware to the TI5052
23698 + * 
23699 + * This routine downloads the main operating code into the TI5052, using the
23700 + * boot code already burned into E2PROM or ROM.
23701 + */
23702 +static int TIDownloadFirmware (struct edgeport_serial *serial)
23703 +{
23704 +       int status = 0;
23705 +       int start_address;
23706 +       struct edge_ti_manuf_descriptor *ti_manuf_desc;
23707 +       struct usb_interface_descriptor *interface;
23708 +       int download_cur_ver;
23709 +       int download_new_ver;
23710 +
23711 +       /* This routine is entered by both the BOOT mode and the Download mode
23712 +        * We can determine which code is running by the reading the config
23713 +        * descriptor and if we have only one bulk pipe it is in boot mode
23714 +        */
23715 +       serial->product_info.hardware_type = HARDWARE_TYPE_TIUMP;
23716 +
23717 +       /* Default to type 2 i2c */
23718 +       serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
23719 +
23720 +       status = TIChooseConfiguration (serial->serial->dev);
23721 +       if (status)
23722 +               return status;
23723 +
23724 +       interface = serial->serial->dev->config->interface->altsetting;
23725 +       if (!interface) {
23726 +               err ("%s - no interface set, error!", __FUNCTION__);
23727 +               return -ENODEV;
23728 +       }
23729 +
23730 +       // Setup initial mode -- the default mode 0 is TI_MODE_CONFIGURING
23731 +       // if we have more than one endpoint we are definitely in download mode
23732 +       if (interface->bNumEndpoints > 1)
23733 +               serial->product_info.TiMode = TI_MODE_DOWNLOAD;
23734 +       else
23735 +               // Otherwise we will remain in configuring mode
23736 +               serial->product_info.TiMode = TI_MODE_CONFIGURING;
23737 +
23738 +       // Save Download Version Number
23739 +       OperationalCodeImageVersion.MajorVersion = PagableOperationalCodeImageVersion.MajorVersion;
23740 +       OperationalCodeImageVersion.MinorVersion = PagableOperationalCodeImageVersion.MinorVersion;
23741 +       OperationalCodeImageVersion.BuildNumber  = PagableOperationalCodeImageVersion.BuildNumber;
23742 +
23743 +       /********************************************************************/
23744 +       /* Download Mode */
23745 +       /********************************************************************/
23746 +       if (serial->product_info.TiMode == TI_MODE_DOWNLOAD) {
23747 +               struct ti_i2c_desc *rom_desc;
23748 +
23749 +               dbg ("%s - <<<<<<<<<<<<<<<RUNNING IN DOWNLOAD MODE>>>>>>>>>>", __FUNCTION__);
23750 +
23751 +               status = TiValidateI2cImage (serial);
23752 +               if (status) {
23753 +                       dbg ("%s - <<<<<<<<<<<<<<<DOWNLOAD MODE -- BAD I2C >>>>>>>>>>",
23754 +                            __FUNCTION__);
23755 +                       return status;
23756 +               }
23757 +               
23758 +               /* Validate Hardware version number
23759 +                * Read Manufacturing Descriptor from TI Based Edgeport
23760 +                */
23761 +               ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL);
23762 +               if (!ti_manuf_desc) {
23763 +                       err ("%s - out of memory.", __FUNCTION__);
23764 +                       return -ENOMEM;
23765 +               }
23766 +               status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc);
23767 +               if (status) {
23768 +                       kfree (ti_manuf_desc);
23769 +                       return status;
23770 +               }
23771 +
23772 +               // Check version number of ION descriptor
23773 +               if (!ignore_cpu_rev && TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev) < 2) {
23774 +                       dbg ( "%s - Wrong CPU Rev %d (Must be 2)", __FUNCTION__, 
23775 +                            TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev));
23776 +                       kfree (ti_manuf_desc);
23777 +                       return -EINVAL;
23778 +               }
23779 +
23780 +               rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL);
23781 +               if (!rom_desc) {
23782 +                       err ("%s - out of memory.", __FUNCTION__);
23783 +                       kfree (ti_manuf_desc);
23784 +                       return -ENOMEM;
23785 +               }
23786 +
23787 +               // Search for type 2 record (firmware record)
23788 +               if ((start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_FIRMWARE_BASIC, rom_desc)) != 0) {
23789 +                       struct ti_i2c_firmware_rec *firmware_version;
23790 +                       __u8 record;
23791 +
23792 +                       dbg ("%s - Found Type FIRMWARE (Type 2) record", __FUNCTION__);
23793 +
23794 +                       firmware_version = kmalloc (sizeof (*firmware_version), GFP_KERNEL);
23795 +                       if (!firmware_version) {
23796 +                               err ("%s - out of memory.", __FUNCTION__);
23797 +                               kfree (rom_desc);
23798 +                               kfree (ti_manuf_desc);
23799 +                               return -ENOMEM;
23800 +                       }
23801 +
23802 +                       // Validate version number                              
23803 +                       // Read the descriptor data
23804 +                       status = TIReadRom (serial,
23805 +                                       start_address+sizeof(struct ti_i2c_desc),
23806 +                                       sizeof(struct ti_i2c_firmware_rec),
23807 +                                       (__u8 *)firmware_version);
23808 +                       if (status) {
23809 +                               kfree (firmware_version);
23810 +                               kfree (rom_desc);
23811 +                               kfree (ti_manuf_desc);
23812 +                               return status;
23813 +                       }
23814 +
23815 +                       // Check version number of download with current version in I2c
23816 +                       download_cur_ver = (firmware_version->Ver_Major << 8) + 
23817 +                                          (firmware_version->Ver_Minor);
23818 +                       download_new_ver = (OperationalCodeImageVersion.MajorVersion << 8) +
23819 +                                          (OperationalCodeImageVersion.MinorVersion);
23820 +
23821 +                       dbg ("%s - >>>Firmware Versions Device %d.%d  Driver %d.%d",
23822 +                            __FUNCTION__,
23823 +                            firmware_version->Ver_Major,
23824 +                            firmware_version->Ver_Minor,
23825 +                            OperationalCodeImageVersion.MajorVersion,
23826 +                            OperationalCodeImageVersion.MinorVersion);
23827 +
23828 +                       // Check if we have an old version in the I2C and update if necessary
23829 +                       if (download_cur_ver != download_new_ver) {
23830 +                               dbg ("%s - Update I2C Download from %d.%d to %d.%d",
23831 +                                    __FUNCTION__,
23832 +                                    firmware_version->Ver_Major,
23833 +                                    firmware_version->Ver_Minor,
23834 +                                    OperationalCodeImageVersion.MajorVersion,
23835 +                                    OperationalCodeImageVersion.MinorVersion);
23836 +
23837 +                               // In order to update the I2C firmware we must change the type 2 record to type 0xF2.
23838 +                               // This will force the UMP to come up in Boot Mode.  Then while in boot mode, the driver 
23839 +                               // will download the latest firmware (padded to 15.5k) into the UMP ram. 
23840 +                               // And finally when the device comes back up in download mode the driver will cause 
23841 +                               // the new firmware to be copied from the UMP Ram to I2C and the firmware will update
23842 +                               // the record type from 0xf2 to 0x02.
23843 +
23844 +                               record = I2C_DESC_TYPE_FIRMWARE_BLANK;
23845 +
23846 +                               // Change the I2C Firmware record type to 0xf2 to trigger an update
23847 +                               status = TIWriteRom (serial,
23848 +                                                       start_address,
23849 +                                                       sizeof(record),
23850 +                                                       &record);
23851 +                               if (status) {
23852 +                                       kfree (firmware_version);
23853 +                                       kfree (rom_desc);
23854 +                                       kfree (ti_manuf_desc);
23855 +                                       return status;
23856 +                               }
23857 +
23858 +                               // verify the write -- must do this in order for write to 
23859 +                               // complete before we do the hardware reset
23860 +                               status = TIReadRom (serial,
23861 +                                                       start_address,
23862 +                                                       sizeof(record),
23863 +                                                       &record);
23864 +
23865 +                               if (status) {
23866 +                                       kfree (firmware_version);
23867 +                                       kfree (rom_desc);
23868 +                                       kfree (ti_manuf_desc);
23869 +                                       return status;
23870 +                               }
23871 +
23872 +                               if (record != I2C_DESC_TYPE_FIRMWARE_BLANK) {
23873 +                                       err ("%s - error resetting device", __FUNCTION__);
23874 +                                       kfree (firmware_version);
23875 +                                       kfree (rom_desc);
23876 +                                       kfree (ti_manuf_desc);
23877 +                                       return -ENODEV;
23878 +                               }
23879 +
23880 +                               dbg ("%s - HARDWARE RESET", __FUNCTION__);
23881 +
23882 +                               // Reset UMP -- Back to BOOT MODE
23883 +                               status = TISendVendorRequestSync (serial->serial->dev,
23884 +                                                               UMPC_HARDWARE_RESET,    // Request
23885 +                                                               0,                      // wValue
23886 +                                                               0,                      // wIndex
23887 +                                                               NULL,                   // TransferBuffer
23888 +                                                               0);                     // TransferBufferLength
23889 +
23890 +                               dbg ( "%s - HARDWARE RESET return %d", __FUNCTION__, status);
23891 +
23892 +                               /* return an error on purpose. */
23893 +                               return -ENODEV;
23894 +                       }
23895 +               }
23896 +               // Search for type 0xF2 record (firmware blank record)
23897 +               else if ((start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_FIRMWARE_BLANK, rom_desc)) != 0) {
23898 +                       #define HEADER_SIZE     (sizeof(struct ti_i2c_desc) + sizeof(struct ti_i2c_firmware_rec))
23899 +                       __u8 *header;
23900 +                       __u8 *vheader;
23901 +
23902 +                       header  = kmalloc (HEADER_SIZE, GFP_KERNEL);
23903 +                       if (!header) {
23904 +                               err ("%s - out of memory.", __FUNCTION__);
23905 +                               kfree (rom_desc);
23906 +                               kfree (ti_manuf_desc);
23907 +                               return -ENOMEM;
23908 +                       }
23909 +                               
23910 +                       vheader = kmalloc (HEADER_SIZE, GFP_KERNEL);
23911 +                       if (!vheader) {
23912 +                               err ("%s - out of memory.", __FUNCTION__);
23913 +                               kfree (header);
23914 +                               kfree (rom_desc);
23915 +                               kfree (ti_manuf_desc);
23916 +                               return -ENOMEM;
23917 +                       }
23918 +                       
23919 +                       dbg ("%s - Found Type BLANK FIRMWARE (Type F2) record", __FUNCTION__);
23920 +
23921 +                       // In order to update the I2C firmware we must change the type 2 record to type 0xF2.
23922 +                       // This will force the UMP to come up in Boot Mode.  Then while in boot mode, the driver 
23923 +                       // will download the latest firmware (padded to 15.5k) into the UMP ram. 
23924 +                       // And finally when the device comes back up in download mode the driver will cause 
23925 +                       // the new firmware to be copied from the UMP Ram to I2C and the firmware will update
23926 +                       // the record type from 0xf2 to 0x02.
23927 +                       status = BuildI2CFirmwareHeader(header);
23928 +                       if (status) {
23929 +                               kfree (vheader);
23930 +                               kfree (header);
23931 +                               kfree (rom_desc);
23932 +                               kfree (ti_manuf_desc);
23933 +                               return status;
23934 +                       }
23935 +
23936 +                       // Update I2C with type 0xf2 record with correct size and checksum
23937 +                       status = TIWriteRom (serial,
23938 +                                               start_address,
23939 +                                               HEADER_SIZE,
23940 +                                               header);
23941 +                       if (status) {
23942 +                               kfree (vheader);
23943 +                               kfree (header);
23944 +                               kfree (rom_desc);
23945 +                               kfree (ti_manuf_desc);
23946 +                               return status;
23947 +                       }
23948 +
23949 +                       // verify the write -- must do this in order for write to 
23950 +                       // complete before we do the hardware reset
23951 +                       status = TIReadRom (serial,
23952 +                                               start_address,
23953 +                                               HEADER_SIZE,
23954 +                                               vheader);
23955 +
23956 +                       if (status) {
23957 +                               dbg ("%s - can't read header back", __FUNCTION__);
23958 +                               kfree (vheader);
23959 +                               kfree (header);
23960 +                               kfree (rom_desc);
23961 +                               kfree (ti_manuf_desc);
23962 +                               return status;
23963 +                       }
23964 +                       if (memcmp(vheader, header, HEADER_SIZE)) {
23965 +                               dbg ("%s - write download record failed", __FUNCTION__);
23966 +                               kfree (vheader);
23967 +                               kfree (header);
23968 +                               kfree (rom_desc);
23969 +                               kfree (ti_manuf_desc);
23970 +                               return status;
23971 +                       }
23972 +
23973 +                       kfree (vheader);
23974 +                       kfree (header);
23975 +
23976 +                       dbg ("%s - Start firmware update", __FUNCTION__);
23977 +
23978 +                       // Tell firmware to copy download image into I2C 
23979 +                       status = TISendVendorRequestSync (serial->serial->dev,
23980 +                                               UMPC_COPY_DNLD_TO_I2C,  // Request
23981 +                                               0,                      // wValue 
23982 +                                               0,                      // wIndex
23983 +                                               NULL,                   // TransferBuffer
23984 +                                               0);                     // TransferBufferLength
23985 +
23986 +                       dbg ("%s - Update complete 0x%x", __FUNCTION__, status);
23987 +                       if (status) {
23988 +                               dbg ("%s - UMPC_COPY_DNLD_TO_I2C failed", __FUNCTION__);
23989 +                               kfree (rom_desc);
23990 +                               kfree (ti_manuf_desc);
23991 +                               return status;
23992 +                       }
23993 +               }
23994 +
23995 +               // The device is running the download code
23996 +               kfree (rom_desc);
23997 +               kfree (ti_manuf_desc);
23998 +               return 0;
23999 +       }
24000 +
24001 +       /********************************************************************/
24002 +       /* Boot Mode */
24003 +       /********************************************************************/
24004 +       dbg ("%s - <<<<<<<<<<<<<<<RUNNING IN BOOT MODE>>>>>>>>>>>>>>>",
24005 +            __FUNCTION__);
24006 +
24007 +       // Configure the TI device so we can use the BULK pipes for download
24008 +       status = TIConfigureBootDevice (serial->serial->dev);
24009 +       if (status)
24010 +               return status;
24011 +
24012 +       if (serial->serial->dev->descriptor.idVendor != USB_VENDOR_ID_ION) {
24013 +               dbg ("%s - VID = 0x%x", __FUNCTION__,
24014 +                    serial->serial->dev->descriptor.idVendor);
24015 +               serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
24016 +               goto StayInBootMode;
24017 +       }
24018 +
24019 +       // We have an ION device (I2c Must be programmed)
24020 +       // Determine I2C image type
24021 +       if (TIGetI2cTypeInBootMode(serial)) {
24022 +               goto StayInBootMode;
24023 +       }
24024 +
24025 +       // Registry variable set?
24026 +       if (TIStayInBootMode) {
24027 +               dbg ("%s - TIStayInBootMode", __FUNCTION__);
24028 +               goto StayInBootMode;
24029 +       }
24030 +
24031 +       // Check for ION Vendor ID and that the I2C is valid
24032 +       if (!TiValidateI2cImage(serial)) {
24033 +               struct ti_i2c_image_header *header;
24034 +               int i;
24035 +               __u8 cs = 0;
24036 +               __u8 *buffer;
24037 +               int buffer_size;
24038 +
24039 +               /* Validate Hardware version number
24040 +                * Read Manufacturing Descriptor from TI Based Edgeport
24041 +                */
24042 +               ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL);
24043 +               if (!ti_manuf_desc) {
24044 +                       err ("%s - out of memory.", __FUNCTION__);
24045 +                       return -ENOMEM;
24046 +               }
24047 +               status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc);
24048 +               if (status) {
24049 +                       kfree (ti_manuf_desc);
24050 +                       goto StayInBootMode;
24051 +               }
24052 +
24053 +               // Check for version 2
24054 +               if (!ignore_cpu_rev && TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev) < 2) {
24055 +                       dbg ("%s - Wrong CPU Rev %d (Must be 2)", __FUNCTION__,
24056 +                            TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev));
24057 +                       kfree (ti_manuf_desc);
24058 +                       goto StayInBootMode;
24059 +               }
24060 +
24061 +               kfree (ti_manuf_desc);
24062 +
24063 +               // In order to update the I2C firmware we must change the type 2 record to type 0xF2.
24064 +               // This will force the UMP to come up in Boot Mode.  Then while in boot mode, the driver 
24065 +               // will download the latest firmware (padded to 15.5k) into the UMP ram. 
24066 +               // And finally when the device comes back up in download mode the driver will cause 
24067 +               // the new firmware to be copied from the UMP Ram to I2C and the firmware will update
24068 +               // the record type from 0xf2 to 0x02.
24069 +               
24070 +               /*
24071 +                * Do we really have to copy the whole firmware image,
24072 +                * or could we do this in place!
24073 +                */
24074 +
24075 +               // Allocate a 15.5k buffer + 3 byte header
24076 +               buffer_size = (((1024 * 16) - 512) + sizeof(struct ti_i2c_image_header));
24077 +               buffer = kmalloc (buffer_size, GFP_KERNEL);
24078 +               if (!buffer) {
24079 +                       err ("%s - out of memory", __FUNCTION__);
24080 +                       return -ENOMEM;
24081 +               }
24082 +               
24083 +               // Initialize the buffer to 0xff (pad the buffer)
24084 +               memset (buffer, 0xff, buffer_size);
24085 +
24086 +               memcpy (buffer, &PagableOperationalCodeImage[0], PagableOperationalCodeSize);
24087 +
24088 +               for(i = sizeof(struct ti_i2c_image_header); i < buffer_size; i++) {
24089 +                       cs = (__u8)(cs + buffer[i]);
24090 +               }
24091 +               
24092 +               header = (struct ti_i2c_image_header *)buffer;
24093 +               
24094 +               // update length and checksum after padding
24095 +               header->Length   = (__u16)(buffer_size - sizeof(struct ti_i2c_image_header));
24096 +               header->CheckSum = cs;
24097 +
24098 +               // Download the operational code 
24099 +               dbg ("%s - Downloading operational code image (TI UMP)", __FUNCTION__);
24100 +               status = TIDownloadCodeImage (serial, buffer, buffer_size);
24101 +
24102 +               kfree (buffer);
24103 +
24104 +               if (status) {
24105 +                       dbg ("%s - Error downloading operational code image", __FUNCTION__);
24106 +                       return status;
24107 +               }
24108 +
24109 +               // Device will reboot
24110 +               serial->product_info.TiMode = TI_MODE_TRANSITIONING;
24111 +
24112 +               dbg ("%s - Download successful -- Device rebooting...", __FUNCTION__);
24113 +
24114 +               /* return an error on purpose */
24115 +               return -ENODEV;
24116 +       }
24117 +
24118 +StayInBootMode:
24119 +       // Eprom is invalid or blank stay in boot mode
24120 +       dbg ("%s - <<<<<<<<<<<<<<<STAYING IN BOOT MODE>>>>>>>>>>>>", __FUNCTION__);
24121 +       serial->product_info.TiMode = TI_MODE_BOOT;
24122 +
24123 +       return 0;
24124 +}
24125 +
24126 +
24127 +static int TISetDtr (struct edgeport_port *port)
24128 +{
24129 +       int port_number = port->port->number - port->port->serial->minor;
24130 +
24131 +       dbg ("%s", __FUNCTION__);
24132 +       port->shadow_mcr |= MCR_DTR;
24133 +
24134 +       return TIWriteCommandSync (port->port->serial->dev,
24135 +                               UMPC_SET_CLR_DTR,
24136 +                               (__u8)(UMPM_UART1_PORT + port_number),
24137 +                               1,      /* set */
24138 +                               NULL,
24139 +                               0);
24140 +}
24141 +
24142 +static int TIClearDtr (struct edgeport_port *port)
24143 +{
24144 +       int port_number = port->port->number - port->port->serial->minor;
24145 +
24146 +       dbg ("%s", __FUNCTION__);
24147 +       port->shadow_mcr &= ~MCR_DTR;
24148 +
24149 +       return TIWriteCommandSync (port->port->serial->dev,
24150 +                               UMPC_SET_CLR_DTR,
24151 +                               (__u8)(UMPM_UART1_PORT + port_number),
24152 +                               0,      /* clear */
24153 +                               NULL,
24154 +                               0);
24155 +}
24156 +
24157 +static int TISetRts (struct edgeport_port *port)
24158 +{
24159 +       int port_number = port->port->number - port->port->serial->minor;
24160 +
24161 +       dbg ("%s", __FUNCTION__);
24162 +       port->shadow_mcr |= MCR_RTS;
24163 +
24164 +       return TIWriteCommandSync (port->port->serial->dev,
24165 +                               UMPC_SET_CLR_RTS,
24166 +                               (__u8)(UMPM_UART1_PORT + port_number),
24167 +                               1,      /* set */
24168 +                               NULL,
24169 +                               0);
24170 +}
24171 +
24172 +static int TIClearRts (struct edgeport_port *port)
24173 +{
24174 +       int port_number = port->port->number - port->port->serial->minor;
24175 +
24176 +       dbg ("%s", __FUNCTION__);
24177 +       port->shadow_mcr &= ~MCR_RTS;
24178 +
24179 +       return TIWriteCommandSync (port->port->serial->dev,
24180 +                               UMPC_SET_CLR_RTS,
24181 +                               (__u8)(UMPM_UART1_PORT + port_number),
24182 +                               0,      /* clear */
24183 +                               NULL,
24184 +                               0);
24185 +}
24186 +
24187 +static int TISetLoopBack (struct edgeport_port *port)
24188 +{
24189 +       int port_number = port->port->number - port->port->serial->minor;
24190 +
24191 +       dbg ("%s", __FUNCTION__);
24192 +
24193 +       return TIWriteCommandSync (port->port->serial->dev,
24194 +                               UMPC_SET_CLR_LOOPBACK,
24195 +                               (__u8)(UMPM_UART1_PORT + port_number),
24196 +                               1,      /* set */
24197 +                               NULL,
24198 +                               0);
24199 +}
24200 +
24201 +static int TIClearLoopBack (struct edgeport_port *port)
24202 +{
24203 +       int port_number = port->port->number - port->port->serial->minor;
24204 +
24205 +       dbg ("%s", __FUNCTION__);
24206 +
24207 +       return TIWriteCommandSync (port->port->serial->dev,
24208 +                               UMPC_SET_CLR_LOOPBACK,
24209 +                               (__u8)(UMPM_UART1_PORT + port_number),
24210 +                               0,      /* clear */
24211 +                               NULL,
24212 +                               0);
24213 +}
24214 +
24215 +static int TISetBreak (struct edgeport_port *port)
24216 +{
24217 +       int port_number = port->port->number - port->port->serial->minor;
24218 +
24219 +       dbg ("%s", __FUNCTION__);
24220 +
24221 +       return TIWriteCommandSync (port->port->serial->dev,
24222 +                               UMPC_SET_CLR_BREAK,
24223 +                               (__u8)(UMPM_UART1_PORT + port_number),
24224 +                               1,      /* set */
24225 +                               NULL,
24226 +                               0);
24227 +}
24228 +
24229 +static int TIClearBreak (struct edgeport_port *port)
24230 +{
24231 +       int port_number = port->port->number - port->port->serial->minor;
24232 +
24233 +       dbg ("%s", __FUNCTION__);
24234 +
24235 +       return TIWriteCommandSync (port->port->serial->dev,
24236 +                               UMPC_SET_CLR_BREAK,
24237 +                               (__u8)(UMPM_UART1_PORT + port_number),
24238 +                               0,      /* clear */
24239 +                               NULL,
24240 +                               0);
24241 +}
24242 +
24243 +static int TIRestoreMCR (struct edgeport_port *port, __u8 mcr)
24244 +{
24245 +       int status = 0;
24246 +
24247 +       dbg ("%s - %x", __FUNCTION__, mcr);
24248 +
24249 +       if (mcr & MCR_DTR)
24250 +               status = TISetDtr (port);
24251 +       else
24252 +               status = TIClearDtr (port);
24253 +
24254 +       if (status)
24255 +               return status;
24256 +
24257 +       if (mcr & MCR_RTS)
24258 +               status = TISetRts (port);
24259 +       else
24260 +               status = TIClearRts (port);
24261 +
24262 +       if (status)
24263 +               return status;
24264 +
24265 +       if (mcr & MCR_LOOPBACK)
24266 +               status = TISetLoopBack (port);
24267 +       else
24268 +               status = TIClearLoopBack (port);
24269 +
24270 +       return status;
24271 +}
24272 +
24273 +
24274 +
24275 +/* Convert TI LSR to standard UART flags */
24276 +static __u8 MapLineStatus (__u8 ti_lsr)
24277 +{
24278 +       __u8 lsr = 0;
24279 +
24280 +#define MAP_FLAG(flagUmp, flagUart)    \
24281 +       if (ti_lsr & flagUmp) lsr |= flagUart;
24282 +
24283 +       MAP_FLAG(UMP_UART_LSR_OV_MASK, LSR_OVER_ERR)    /* overrun */
24284 +       MAP_FLAG(UMP_UART_LSR_PE_MASK, LSR_PAR_ERR)     /* parity error */
24285 +       MAP_FLAG(UMP_UART_LSR_FE_MASK, LSR_FRM_ERR)     /* framing error */
24286 +       MAP_FLAG(UMP_UART_LSR_BR_MASK, LSR_BREAK)       /* break detected */
24287 +       MAP_FLAG(UMP_UART_LSR_RX_MASK, LSR_RX_AVAIL)    /* receive data available */
24288 +       MAP_FLAG(UMP_UART_LSR_TX_MASK, LSR_TX_EMPTY)    /* transmit holding register empty */
24289 +
24290 +#undef MAP_FLAG
24291 +
24292 +       return lsr;
24293 +}
24294 +
24295 +static void handle_new_msr (struct edgeport_port *edge_port, __u8 msr)
24296 +{
24297 +       struct async_icount *icount;
24298 +
24299 +       dbg ("%s - %02x", __FUNCTION__, msr);
24300 +
24301 +       if (msr & (MSR_DELTA_CTS | MSR_DELTA_DSR | MSR_DELTA_RI | MSR_DELTA_CD)) {
24302 +               icount = &edge_port->icount;
24303 +
24304 +               /* update input line counters */
24305 +               if (msr & MSR_DELTA_CTS)
24306 +                       icount->cts++;
24307 +               if (msr & MSR_DELTA_DSR)
24308 +                       icount->dsr++;
24309 +               if (msr & MSR_DELTA_CD)
24310 +                       icount->dcd++;
24311 +               if (msr & MSR_DELTA_RI)
24312 +                       icount->rng++;
24313 +               wake_up_interruptible (&edge_port->delta_msr_wait);
24314 +       }
24315 +
24316 +       /* Save the new modem status */
24317 +       edge_port->shadow_msr = msr & 0xf0;
24318 +
24319 +       return;
24320 +}
24321 +
24322 +static void handle_new_lsr (struct edgeport_port *edge_port, int lsr_data, __u8 lsr, __u8 data)
24323 +{
24324 +       struct async_icount *icount;
24325 +       __u8 new_lsr = (__u8)(lsr & (__u8)(LSR_OVER_ERR | LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK));
24326 +
24327 +       dbg ("%s - %02x", __FUNCTION__, new_lsr);
24328 +
24329 +       edge_port->shadow_lsr = lsr;
24330 +
24331 +       if (new_lsr & LSR_BREAK) {
24332 +               /*
24333 +                * Parity and Framing errors only count if they
24334 +                * occur exclusive of a break being received.
24335 +                */
24336 +               new_lsr &= (__u8)(LSR_OVER_ERR | LSR_BREAK);
24337 +       }
24338 +
24339 +       /* Place LSR data byte into Rx buffer */
24340 +       if (lsr_data && edge_port->port->tty) {
24341 +               tty_insert_flip_char(edge_port->port->tty, data, 0);
24342 +               tty_flip_buffer_push(edge_port->port->tty);
24343 +       }
24344 +
24345 +       /* update input line counters */
24346 +       icount = &edge_port->icount;
24347 +       if (new_lsr & LSR_BREAK)
24348 +               icount->brk++;
24349 +       if (new_lsr & LSR_OVER_ERR)
24350 +               icount->overrun++;
24351 +       if (new_lsr & LSR_PAR_ERR)
24352 +               icount->parity++;
24353 +       if (new_lsr & LSR_FRM_ERR)
24354 +               icount->frame++;
24355 +}
24356 +
24357 +
24358 +static void edge_interrupt_callback (struct urb *urb)
24359 +{
24360 +       struct edgeport_serial  *edge_serial = (struct edgeport_serial *)urb->context;
24361 +       struct usb_serial_port *port;
24362 +       struct edgeport_port *edge_port;
24363 +       unsigned char *data = urb->transfer_buffer;
24364 +       int length = urb->actual_length;
24365 +       int port_number;
24366 +       int function;
24367 +       __u8 lsr;
24368 +       __u8 msr;
24369 +
24370 +       dbg("%s", __FUNCTION__);
24371 +
24372 +       if (serial_paranoia_check (edge_serial->serial, __FUNCTION__)) {
24373 +               return;
24374 +       }
24375 +
24376 +       if (urb->status) {
24377 +               dbg("%s - nonzero control read status received: %d", __FUNCTION__, urb->status);
24378 +               return;
24379 +       }
24380 +
24381 +       if (!length) {
24382 +               dbg ("%s - no data in urb", __FUNCTION__);
24383 +               return;
24384 +       }
24385 +               
24386 +       usb_serial_debug_data (__FILE__, __FUNCTION__, length, data);
24387 +               
24388 +       if (length != 2) {
24389 +               dbg ("%s - expecting packet of size 2, got %d", __FUNCTION__, length);
24390 +               return;
24391 +       }
24392 +
24393 +       port_number = TIUMP_GET_PORT_FROM_CODE (data[0]);
24394 +       function    = TIUMP_GET_FUNC_FROM_CODE (data[0]);
24395 +       dbg ("%s - port_number %d, function %d, info 0x%x",
24396 +            __FUNCTION__, port_number, function, data[1]);
24397 +       port = &edge_serial->serial->port[port_number];
24398 +       if (port_paranoia_check (port, __FUNCTION__)) {
24399 +               dbg ("%s - change found for port that is not present",
24400 +                    __FUNCTION__);
24401 +               return;
24402 +       }
24403 +       edge_port = port->private;
24404 +       if (!edge_port) {
24405 +               dbg ("%s - edge_port not found", __FUNCTION__);
24406 +               return;
24407 +       }
24408 +       switch (function) {
24409 +       case TIUMP_INTERRUPT_CODE_LSR:
24410 +               lsr = MapLineStatus(data[1]);
24411 +               if (lsr & UMP_UART_LSR_DATA_MASK) {
24412 +                       /* Save the LSR event for bulk read completion routine */
24413 +                       dbg ("%s - LSR Event Port %u LSR Status = %02x",
24414 +                            __FUNCTION__, port_number, lsr);
24415 +                       edge_port->lsr_event = 1;
24416 +                       edge_port->lsr_mask = lsr;
24417 +               } else {
24418 +                       dbg ("%s - ===== Port %d LSR Status = %02x ======",
24419 +                            __FUNCTION__, port_number, lsr);
24420 +                       handle_new_lsr (edge_port, 0, lsr, 0);
24421 +               }
24422 +               break;
24423 +
24424 +       case TIUMP_INTERRUPT_CODE_MSR:  // MSR
24425 +               /* Copy MSR from UMP */
24426 +               msr = data[1];
24427 +               dbg ("%s - ===== Port %u MSR Status = %02x ======\n",
24428 +                    __FUNCTION__, port_number, msr);
24429 +               handle_new_msr (edge_port, msr);
24430 +               break;
24431 +
24432 +       default:
24433 +               err ("%s - Unknown Interrupt code from UMP %x\n",
24434 +                    __FUNCTION__, data[1]);
24435 +               break;
24436 +               
24437 +       }
24438 +}
24439 +
24440 +static void edge_bulk_in_callback (struct urb *urb)
24441 +{
24442 +       struct edgeport_port *edge_port = (struct edgeport_port *)urb->context;
24443 +       unsigned char *data = urb->transfer_buffer;
24444 +       struct tty_struct *tty;
24445 +       int status;
24446 +       int i;
24447 +       int port_number;
24448 +
24449 +       dbg("%s", __FUNCTION__);
24450 +
24451 +       if (port_paranoia_check (edge_port->port, __FUNCTION__))
24452 +               return;
24453 +
24454 +       if (urb->status) {
24455 +               dbg ("%s - nonzero read bulk status received: %d",
24456 +                    __FUNCTION__, urb->status);
24457 +
24458 +               if (urb->status == -EPIPE) {
24459 +                       /* clear any problem that might have happened on this pipe */
24460 +                       usb_clear_halt (edge_port->port->serial->dev, urb->pipe);
24461 +                       goto exit;
24462 +               }
24463 +               return;
24464 +       }
24465 +
24466 +       port_number = edge_port->port->number - edge_port->port->serial->minor;
24467 +
24468 +       if (edge_port->lsr_event) {
24469 +               edge_port->lsr_event = 0;
24470 +               dbg ("%s ===== Port %u LSR Status = %02x, Data = %02x ======",
24471 +                    __FUNCTION__, port_number, edge_port->lsr_mask, *data);
24472 +               handle_new_lsr (edge_port, 1, edge_port->lsr_mask, *data);
24473 +               /* Adjust buffer length/pointer */
24474 +               --urb->actual_length;
24475 +               ++data;
24476 +       }
24477 +
24478 +       tty = edge_port->port->tty;
24479 +       if (tty && urb->actual_length) {
24480 +               usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
24481 +
24482 +               if (edge_port->close_pending) {
24483 +                       dbg ("%s - close is pending, dropping data on the floor.", __FUNCTION__);
24484 +               } else {
24485 +                       for (i = 0; i < urb->actual_length ; ++i) {
24486 +                               /* if we insert more than TTY_FLIPBUF_SIZE characters,
24487 +                                * we drop them. */
24488 +                               if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
24489 +                                       tty_flip_buffer_push(tty);
24490 +                               }
24491 +                               /* this doesn't actually push the data through unless
24492 +                                * tty->low_latency is set */
24493 +                               tty_insert_flip_char(tty, data[i], 0);
24494 +                       }
24495 +                       tty_flip_buffer_push(tty);
24496 +               }
24497 +               edge_port->icount.rx += urb->actual_length;
24498 +       }
24499 +
24500 +exit:
24501 +       /* continue always trying to read */
24502 +       urb->dev = edge_port->port->serial->dev;
24503 +       status = usb_submit_urb (urb);
24504 +       if (status)
24505 +               err ("%s - usb_submit_urb failed with result %d",
24506 +                    __FUNCTION__, status);
24507 +}
24508 +
24509 +static void edge_bulk_out_callback (struct urb *urb)
24510 +{
24511 +       struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
24512 +       struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
24513 +       struct tty_struct *tty;
24514 +
24515 +       dbg ("%s - port %d", __FUNCTION__, port->number);
24516 +
24517 +       if (!serial) {
24518 +               dbg ("%s - bad serial pointer, exiting", __FUNCTION__);
24519 +               return;
24520 +       }
24521 +
24522 +       if (urb->status) {
24523 +               dbg ("%s - nonzero write bulk status received: %d",
24524 +                    __FUNCTION__, urb->status);
24525 +
24526 +               if (urb->status == -EPIPE) {
24527 +                       /* clear any problem that might have happened on this pipe */
24528 +                       usb_clear_halt (serial->dev, urb->pipe);
24529 +               }
24530 +               return;
24531 +       }
24532 +
24533 +       tty = port->tty;
24534 +       if (tty) {
24535 +               /* let the tty driver wakeup if it has a special write_wakeup function */
24536 +               if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
24537 +                       (tty->ldisc.write_wakeup)(tty);
24538 +               }
24539 +
24540 +               /* tell the tty driver that something has changed */
24541 +               wake_up_interruptible(&tty->write_wait);
24542 +       }
24543 +}
24544 +
24545 +static int edge_open (struct usb_serial_port *port, struct file * filp)
24546 +{
24547 +       struct edgeport_port *edge_port = (struct edgeport_port *)port->private;
24548 +       struct edgeport_serial *edge_serial;
24549 +       struct usb_device *dev;
24550 +       struct urb *urb;
24551 +       int port_number;
24552 +       int status;
24553 +       u16 open_settings;
24554 +       u8 transaction_timeout;
24555 +
24556 +       if (port_paranoia_check (port, __FUNCTION__))
24557 +               return -ENODEV;
24558 +       
24559 +       dbg("%s - port %d", __FUNCTION__, port->number);
24560 +
24561 +       if (edge_port == NULL)
24562 +               return -ENODEV;
24563 +
24564 +       /* force low_latency on so that our tty_push actually forces the data through, 
24565 +          otherwise it is scheduled, and with high data rates (like with OHCI) data
24566 +          can get lost. */
24567 +       if (port->tty)
24568 +               port->tty->low_latency = 1;
24569 +
24570 +       port_number = port->number - port->serial->minor;
24571 +       switch (port_number) {
24572 +               case 0:
24573 +                       edge_port->uart_base = UMPMEM_BASE_UART1;
24574 +                       edge_port->dma_address = UMPD_OEDB1_ADDRESS;
24575 +                       break;
24576 +               case 1:
24577 +                       edge_port->uart_base = UMPMEM_BASE_UART2;
24578 +                       edge_port->dma_address = UMPD_OEDB2_ADDRESS;
24579 +                       break;
24580 +               default:
24581 +                       err ("Unknown port number!!!");
24582 +                       return -ENODEV;
24583 +       }
24584 +
24585 +       dbg ("%s - port_number = %d, uart_base = %04x, dma_address = %04x",
24586 +            __FUNCTION__, port_number, edge_port->uart_base, edge_port->dma_address);
24587 +
24588 +       dev = port->serial->dev;
24589 +
24590 +       memset (&(edge_port->icount), 0x00, sizeof(edge_port->icount));
24591 +       init_waitqueue_head (&edge_port->delta_msr_wait);
24592 +
24593 +       /* turn off loopback */
24594 +       status = TIClearLoopBack (edge_port);
24595 +       if (status)
24596 +               return status;
24597 +       
24598 +       /* set up the port settings */
24599 +       edge_set_termios (port, NULL);
24600 +
24601 +       /* open up the port */
24602 +
24603 +       /* milliseconds to timeout for DMA transfer */
24604 +       transaction_timeout = 2;
24605 +
24606 +       edge_port->ump_read_timeout = max (20, ((transaction_timeout * 3) / 2) );
24607 +
24608 +       // milliseconds to timeout for DMA transfer
24609 +       open_settings = (u8)(UMP_DMA_MODE_CONTINOUS | 
24610 +                            UMP_PIPE_TRANS_TIMEOUT_ENA | 
24611 +                            (transaction_timeout << 2));
24612 +
24613 +       dbg ("%s - Sending UMPC_OPEN_PORT", __FUNCTION__);
24614 +
24615 +       /* Tell TI to open and start the port */
24616 +       status = TIWriteCommandSync (dev,
24617 +                                       UMPC_OPEN_PORT,
24618 +                                       (u8)(UMPM_UART1_PORT + port_number),
24619 +                                       open_settings,
24620 +                                       NULL,
24621 +                                       0);
24622 +       if (status)
24623 +               return status;
24624 +
24625 +       /* Start the DMA? */
24626 +       status = TIWriteCommandSync (dev,
24627 +                                       UMPC_START_PORT,
24628 +                                       (u8)(UMPM_UART1_PORT + port_number),
24629 +                                       0,
24630 +                                       NULL,
24631 +                                       0);
24632 +       if (status)
24633 +               return status;
24634 +
24635 +       /* Clear TX and RX buffers in UMP */
24636 +       status = TIPurgeDataSync (port, UMP_PORT_DIR_OUT | UMP_PORT_DIR_IN);
24637 +       if (status)
24638 +               return status;
24639 +
24640 +       /* Read Initial MSR */
24641 +       status = TIReadVendorRequestSync (dev,
24642 +                                       UMPC_READ_MSR,  // Request
24643 +                                       0,              // wValue
24644 +                                       (__u16)(UMPM_UART1_PORT + port_number), // wIndex (Address)
24645 +                                       &edge_port->shadow_msr,                 // TransferBuffer
24646 +                                       1);                                     // TransferBufferLength
24647 +       if (status)
24648 +               return status;
24649 +
24650 +       dbg ("ShadowMSR 0x%X", edge_port->shadow_msr);
24651
24652 +       edge_serial = edge_port->edge_serial;
24653 +       if (edge_serial->num_ports_open == 0) {
24654 +               dbg ("%s - setting up bulk in urb", __FUNCTION__);
24655 +               /* we are the first port to be opened, let's post the interrupt urb */
24656 +               urb = edge_serial->serial->port[0].interrupt_in_urb;
24657 +               if (!urb) {
24658 +                       err ("%s - no interrupt urb present, exiting", __FUNCTION__);
24659 +                       return -EINVAL;
24660 +               }
24661 +               urb->complete = edge_interrupt_callback;
24662 +               urb->context = edge_serial;
24663 +               urb->dev = dev;
24664 +               status = usb_submit_urb (urb);
24665 +               if (status) {
24666 +                       err ("%s - usb_submit_urb failed with value %d", __FUNCTION__, status);
24667 +                       return status;
24668 +               }
24669 +       }
24670 +
24671 +       /*
24672 +        * reset the data toggle on the bulk endpoints to work around bug in
24673 +        * host controllers where things get out of sync some times
24674 +        */
24675 +       usb_clear_halt (dev, port->write_urb->pipe);
24676 +       usb_clear_halt (dev, port->read_urb->pipe);
24677 +
24678 +       /* start up our bulk read urb */
24679 +       urb = port->read_urb;
24680 +       if (!urb) {
24681 +               err ("%s - no read urb present, exiting", __FUNCTION__);
24682 +               return -EINVAL;
24683 +       }
24684 +       urb->complete = edge_bulk_in_callback;
24685 +       urb->context = edge_port;
24686 +       urb->dev = dev;
24687 +       status = usb_submit_urb (urb);
24688 +       if (status) {
24689 +               err ("%s - read bulk usb_submit_urb failed with value %d", __FUNCTION__, status);
24690 +               return status;
24691 +       }
24692 +
24693 +       ++edge_serial->num_ports_open;
24694 +
24695 +       dbg("%s - exited", __FUNCTION__);
24696 +
24697 +       return 0;
24698 +}
24699 +
24700 +static void edge_close (struct usb_serial_port *port, struct file * filp)
24701 +{
24702 +       struct usb_serial *serial;
24703 +       struct edgeport_serial *edge_serial;
24704 +       struct edgeport_port *edge_port;
24705 +       int port_number;
24706 +       int status;
24707 +
24708 +       if (port_paranoia_check (port, __FUNCTION__))
24709 +               return;
24710 +       
24711 +       dbg("%s - port %d", __FUNCTION__, port->number);
24712 +                        
24713 +       serial = get_usb_serial (port, __FUNCTION__);
24714 +       if (!serial)
24715 +               return;
24716 +       
24717 +       edge_serial = (struct edgeport_serial *)serial->private;
24718 +       edge_port = (struct edgeport_port *)port->private;
24719 +       if ((edge_serial == NULL) || (edge_port == NULL))
24720 +               return;
24721 +       
24722 +       if (serial->dev) {
24723 +               /* The bulkreadcompletion routine will check 
24724 +                * this flag and dump add read data */
24725 +               edge_port->close_pending = 1;
24726 +
24727 +               /* chase the port close */
24728 +               TIChasePort (edge_port);
24729 +
24730 +               usb_unlink_urb (port->read_urb);
24731 +
24732 +               /* assuming we can still talk to the device,
24733 +                * send a close port command to it */
24734 +               dbg("%s - send umpc_close_port", __FUNCTION__);
24735 +               port_number = port->number - port->serial->minor;
24736 +               status = TIWriteCommandSync (port->serial->dev,
24737 +                                            UMPC_CLOSE_PORT,
24738 +                                            (__u8)(UMPM_UART1_PORT + port_number),
24739 +                                            0,
24740 +                                            NULL,
24741 +                                            0);
24742 +               --edge_port->edge_serial->num_ports_open;
24743 +               if (edge_port->edge_serial->num_ports_open <= 0) {
24744 +                       /* last port is now closed, let's shut down our interrupt urb */
24745 +                       usb_unlink_urb (serial->port[0].interrupt_in_urb);
24746 +                       edge_port->edge_serial->num_ports_open = 0;
24747 +               }
24748 +       edge_port->close_pending = 0;
24749 +       }
24750 +
24751 +       dbg("%s - exited", __FUNCTION__);
24752 +}
24753 +
24754 +static int edge_write (struct usb_serial_port *port, int from_user, const unsigned char *data, int count)
24755 +{
24756 +       struct usb_serial *serial = port->serial;
24757 +       struct edgeport_port *edge_port = port->private;
24758 +       int result;
24759 +
24760 +       dbg("%s - port %d", __FUNCTION__, port->number);
24761 +
24762 +       if (count == 0) {
24763 +               dbg("%s - write request of 0 bytes", __FUNCTION__);
24764 +               return 0;
24765 +       }
24766 +
24767 +       if (edge_port == NULL)
24768 +               return -ENODEV;
24769 +       if (edge_port->close_pending == 1)
24770 +               return -ENODEV;
24771 +       
24772 +       if (port->write_urb->status == -EINPROGRESS) {
24773 +               dbg ("%s - already writing", __FUNCTION__);
24774 +               return 0;
24775 +       }
24776 +
24777 +       count = min (count, port->bulk_out_size);
24778 +
24779 +       if (from_user) {
24780 +               if (copy_from_user(port->write_urb->transfer_buffer, data, count))
24781 +                       return -EFAULT;
24782 +       } else {
24783 +               memcpy (port->write_urb->transfer_buffer, data, count);
24784 +       }
24785 +
24786 +       usb_serial_debug_data (__FILE__, __FUNCTION__, count, port->write_urb->transfer_buffer);
24787 +
24788 +       /* set up our urb */
24789 +       usb_fill_bulk_urb (port->write_urb, serial->dev,
24790 +                          usb_sndbulkpipe (serial->dev,
24791 +                                           port->bulk_out_endpointAddress),
24792 +                          port->write_urb->transfer_buffer, count,
24793 +                          edge_bulk_out_callback,
24794 +                          port);
24795 +
24796 +       /* send the data out the bulk port */
24797 +       result = usb_submit_urb(port->write_urb);
24798 +       if (result)
24799 +               err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
24800 +       else
24801 +               result = count;
24802 +
24803 +       if (result > 0)
24804 +               edge_port->icount.tx += count;
24805 +
24806 +       return result;
24807 +}
24808 +
24809 +static int edge_write_room (struct usb_serial_port *port)
24810 +{
24811 +       struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
24812 +       int room = 0;
24813 +
24814 +       dbg("%s", __FUNCTION__);
24815 +
24816 +       if (edge_port == NULL)
24817 +               return -ENODEV;
24818 +       if (edge_port->close_pending == 1)
24819 +               return -ENODEV;
24820 +       
24821 +       dbg("%s - port %d", __FUNCTION__, port->number);
24822 +
24823 +       if (port->write_urb->status != -EINPROGRESS)
24824 +               room = port->bulk_out_size;
24825 +
24826 +       dbg("%s - returns %d", __FUNCTION__, room);
24827 +       return room;
24828 +}
24829 +
24830 +static int edge_chars_in_buffer (struct usb_serial_port *port)
24831 +{
24832 +       struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
24833 +       int chars = 0;
24834 +
24835 +       dbg("%s", __FUNCTION__);
24836 +
24837 +       if (edge_port == NULL)
24838 +               return -ENODEV;
24839 +       if (edge_port->close_pending == 1)
24840 +               return -ENODEV;
24841 +
24842 +       dbg("%s - port %d", __FUNCTION__, port->number);
24843 +
24844 +       if (port->write_urb->status == -EINPROGRESS)
24845 +               chars = port->write_urb->transfer_buffer_length;
24846 +
24847 +       dbg ("%s - returns %d", __FUNCTION__, chars);
24848 +       return chars;
24849 +}
24850 +
24851 +static void edge_throttle (struct usb_serial_port *port)
24852 +{
24853 +       struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
24854 +       struct tty_struct *tty;
24855 +       int status;
24856 +
24857 +       dbg("%s - port %d", __FUNCTION__, port->number);
24858 +
24859 +       if (edge_port == NULL)
24860 +               return;
24861 +
24862 +       tty = port->tty;
24863 +       if (!tty) {
24864 +               dbg ("%s - no tty available", __FUNCTION__);
24865 +               return;
24866 +       }
24867 +       /* if we are implementing XON/XOFF, send the stop character */
24868 +       if (I_IXOFF(tty)) {
24869 +               unsigned char stop_char = STOP_CHAR(tty);
24870 +               status = edge_write (port, 0, &stop_char, 1);
24871 +               if (status <= 0) {
24872 +                       return;
24873 +               }
24874 +       }
24875 +
24876 +       /* if we are implementing RTS/CTS, toggle that line */
24877 +       if (tty->termios->c_cflag & CRTSCTS) {
24878 +               status = TIClearRts (edge_port);
24879 +       }
24880 +
24881 +       usb_unlink_urb (port->read_urb);
24882 +}
24883 +
24884 +static void edge_unthrottle (struct usb_serial_port *port)
24885 +{
24886 +       struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
24887 +       struct tty_struct *tty;
24888 +       int status;
24889 +
24890 +       dbg("%s - port %d", __FUNCTION__, port->number);
24891 +
24892 +       if (edge_port == NULL)
24893 +               return;
24894 +
24895 +       tty = port->tty;
24896 +       if (!tty) {
24897 +               dbg ("%s - no tty available", __FUNCTION__);
24898 +               return;
24899 +       }
24900 +
24901 +       /* if we are implementing XON/XOFF, send the start character */
24902 +       if (I_IXOFF(tty)) {
24903 +               unsigned char start_char = START_CHAR(tty);
24904 +               status = edge_write (port, 0, &start_char, 1);
24905 +               if (status <= 0) {
24906 +                       return;
24907 +               }
24908 +       }
24909 +
24910 +       /* if we are implementing RTS/CTS, toggle that line */
24911 +       if (tty->termios->c_cflag & CRTSCTS) {
24912 +               status = TISetRts (edge_port);
24913 +       }
24914 +
24915 +       port->read_urb->dev = port->serial->dev;
24916 +       status = usb_submit_urb (port->read_urb);
24917 +       if (status) {
24918 +               err ("%s - usb_submit_urb failed with value %d", __FUNCTION__, status);
24919 +       }
24920 +}
24921 +
24922 +
24923 +static void change_port_settings (struct edgeport_port *edge_port, struct termios *old_termios)
24924 +{
24925 +       struct ump_uart_config *config;
24926 +       struct tty_struct *tty;
24927 +       int baud;
24928 +       int round;
24929 +       unsigned cflag;
24930 +       int status;
24931 +       int port_number = edge_port->port->number - edge_port->port->serial->minor;
24932 +
24933 +       dbg("%s - port %d", __FUNCTION__, edge_port->port->number);
24934 +
24935 +       tty = edge_port->port->tty;
24936 +       if ((!tty) ||
24937 +           (!tty->termios)) {
24938 +               dbg("%s - no tty structures", __FUNCTION__);
24939 +               return;
24940 +       }
24941 +
24942 +       config = kmalloc (sizeof (*config), GFP_KERNEL);
24943 +       if (!config) {
24944 +               err ("%s - out of memory", __FUNCTION__);
24945 +               return;
24946 +       }
24947 +
24948 +       cflag = tty->termios->c_cflag;
24949 +
24950 +       config->wFlags = 0;
24951 +
24952 +       /* These flags must be set */
24953 +       config->wFlags |= UMP_MASK_UART_FLAGS_RECEIVE_MS_INT;
24954 +       config->wFlags |= UMP_MASK_UART_FLAGS_AUTO_START_ON_ERR;
24955 +       config->bUartMode = 0;
24956 +
24957 +       switch (cflag & CSIZE) {
24958 +               case CS5:
24959 +                           config->bDataBits = UMP_UART_CHAR5BITS;
24960 +                           dbg ("%s - data bits = 5", __FUNCTION__);
24961 +                           break;
24962 +               case CS6:
24963 +                           config->bDataBits = UMP_UART_CHAR6BITS;
24964 +                           dbg ("%s - data bits = 6", __FUNCTION__);
24965 +                           break;
24966 +               case CS7:
24967 +                           config->bDataBits = UMP_UART_CHAR7BITS;
24968 +                           dbg ("%s - data bits = 7", __FUNCTION__);
24969 +                           break;
24970 +               default:
24971 +               case CS8:
24972 +                           config->bDataBits = UMP_UART_CHAR8BITS;
24973 +                           dbg ("%s - data bits = 8", __FUNCTION__);
24974 +                           break;
24975 +       }
24976 +
24977 +       if (cflag & PARENB) {
24978 +               if (cflag & PARODD) {
24979 +                       config->wFlags |= UMP_MASK_UART_FLAGS_PARITY;
24980 +                       config->bParity = UMP_UART_ODDPARITY;
24981 +                       dbg("%s - parity = odd", __FUNCTION__);
24982 +               } else {
24983 +                       config->wFlags |= UMP_MASK_UART_FLAGS_PARITY;
24984 +                       config->bParity = UMP_UART_EVENPARITY;
24985 +                       dbg("%s - parity = even", __FUNCTION__);
24986 +               }
24987 +       } else {
24988 +               config->bParity = UMP_UART_NOPARITY;    
24989 +               dbg("%s - parity = none", __FUNCTION__);
24990 +       }
24991 +
24992 +       if (cflag & CSTOPB) {
24993 +               config->bStopBits = UMP_UART_STOPBIT2;
24994 +               dbg("%s - stop bits = 2", __FUNCTION__);
24995 +       } else {
24996 +               config->bStopBits = UMP_UART_STOPBIT1;
24997 +               dbg("%s - stop bits = 1", __FUNCTION__);
24998 +       }
24999 +
25000 +       /* figure out the flow control settings */
25001 +       if (cflag & CRTSCTS) {
25002 +               config->wFlags |= UMP_MASK_UART_FLAGS_OUT_X_CTS_FLOW;
25003 +               config->wFlags |= UMP_MASK_UART_FLAGS_RTS_FLOW;
25004 +               dbg("%s - RTS/CTS is enabled", __FUNCTION__);
25005 +       } else {
25006 +               dbg("%s - RTS/CTS is disabled", __FUNCTION__);
25007 +       }
25008 +
25009 +       /* if we are implementing XON/XOFF, set the start and stop character in the device */
25010 +       if (I_IXOFF(tty) || I_IXON(tty)) {
25011 +               config->cXon  = START_CHAR(tty);
25012 +               config->cXoff = STOP_CHAR(tty);
25013 +
25014 +               /* if we are implementing INBOUND XON/XOFF */
25015 +               if (I_IXOFF(tty)) {
25016 +                       config->wFlags |= UMP_MASK_UART_FLAGS_IN_X;
25017 +                       dbg ("%s - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x",
25018 +                            __FUNCTION__, config->cXon, config->cXoff);
25019 +               } else {
25020 +                       dbg ("%s - INBOUND XON/XOFF is disabled", __FUNCTION__);
25021 +               }
25022 +
25023 +               /* if we are implementing OUTBOUND XON/XOFF */
25024 +               if (I_IXON(tty)) {
25025 +                       config->wFlags |= UMP_MASK_UART_FLAGS_OUT_X;
25026 +                       dbg ("%s - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x",
25027 +                            __FUNCTION__, config->cXon, config->cXoff);
25028 +               } else {
25029 +                       dbg ("%s - OUTBOUND XON/XOFF is disabled", __FUNCTION__);
25030 +               }
25031 +       }
25032 +
25033 +       /* Round the baud rate */
25034 +       baud = tty_get_baud_rate(tty);
25035 +       if (!baud) {
25036 +               /* pick a default, any default... */
25037 +               baud = 9600;
25038 +       }
25039 +       config->wBaudRate = (__u16)(461550L / baud);
25040 +       round = 4615500L / baud;
25041 +       if ((round - (config->wBaudRate * 10)) >= 5)
25042 +               config->wBaudRate++;
25043 +
25044 +       dbg ("%s - baud rate = %d, wBaudRate = %d", __FUNCTION__, baud, config->wBaudRate);
25045 +
25046 +       dbg ("wBaudRate:   %d", (int)(461550L / config->wBaudRate));
25047 +       dbg ("wFlags:    0x%x", config->wFlags);
25048 +       dbg ("bDataBits:   %d", config->bDataBits);
25049 +       dbg ("bParity:     %d", config->bParity);
25050 +       dbg ("bStopBits:   %d", config->bStopBits);
25051 +       dbg ("cXon:        %d", config->cXon);
25052 +       dbg ("cXoff:       %d", config->cXoff);
25053 +       dbg ("bUartMode:   %d", config->bUartMode);
25054 +
25055 +       /* move the word values into big endian mode */
25056 +       cpu_to_be16s (&config->wFlags);
25057 +       cpu_to_be16s (&config->wBaudRate);
25058 +
25059 +       status = TIWriteCommandSync (edge_port->port->serial->dev,
25060 +                               UMPC_SET_CONFIG,
25061 +                               (__u8)(UMPM_UART1_PORT + port_number),
25062 +                               0,
25063 +                               (__u8 *)config,
25064 +                               sizeof(*config));
25065 +       if (status) {
25066 +               dbg ("%s - error %d when trying to write config to device",
25067 +                    __FUNCTION__, status);
25068 +       }
25069 +
25070 +       kfree (config);
25071 +       
25072 +       return;
25073 +}
25074 +
25075 +static void edge_set_termios (struct usb_serial_port *port, struct termios *old_termios)
25076 +{
25077 +       struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
25078 +       struct tty_struct *tty = port->tty;
25079 +       unsigned int cflag;
25080 +
25081 +       if (!port->tty || !port->tty->termios) {
25082 +               dbg ("%s - no tty or termios", __FUNCTION__);
25083 +               return;
25084 +       }
25085 +
25086 +       cflag = tty->termios->c_cflag;
25087 +       /* check that they really want us to change something */
25088 +       if (old_termios) {
25089 +               if ((cflag == old_termios->c_cflag) &&
25090 +                   (RELEVANT_IFLAG(tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
25091 +                       dbg ("%s - nothing to change", __FUNCTION__);
25092 +                       return;
25093 +               }
25094 +       }
25095 +
25096 +       dbg("%s - clfag %08x iflag %08x", __FUNCTION__, 
25097 +           tty->termios->c_cflag,
25098 +           RELEVANT_IFLAG(tty->termios->c_iflag));
25099 +       if (old_termios) {
25100 +               dbg("%s - old clfag %08x old iflag %08x", __FUNCTION__,
25101 +                   old_termios->c_cflag,
25102 +                   RELEVANT_IFLAG(old_termios->c_iflag));
25103 +       }
25104 +
25105 +       dbg("%s - port %d", __FUNCTION__, port->number);
25106 +
25107 +       if (edge_port == NULL)
25108 +               return;
25109 +
25110 +       /* change the port settings to the new ones specified */
25111 +       change_port_settings (edge_port, old_termios);
25112 +
25113 +       return;
25114 +}
25115 +
25116 +static int set_modem_info (struct edgeport_port *edge_port, unsigned int cmd, unsigned int *value)
25117 +{
25118 +       unsigned int mcr = edge_port->shadow_mcr;
25119 +       unsigned int arg;
25120 +
25121 +       if (copy_from_user(&arg, value, sizeof(int)))
25122 +               return -EFAULT;
25123 +
25124 +       switch (cmd) {
25125 +               case TIOCMBIS:
25126 +                       if (arg & TIOCM_RTS)
25127 +                               mcr |= MCR_RTS;
25128 +                       if (arg & TIOCM_DTR)
25129 +                               mcr |= MCR_RTS;
25130 +                       if (arg & TIOCM_LOOP)
25131 +                               mcr |= MCR_LOOPBACK;
25132 +                       break;
25133 +
25134 +               case TIOCMBIC:
25135 +                       if (arg & TIOCM_RTS)
25136 +                               mcr &= ~MCR_RTS;
25137 +                       if (arg & TIOCM_DTR)
25138 +                               mcr &= ~MCR_RTS;
25139 +                       if (arg & TIOCM_LOOP)
25140 +                               mcr &= ~MCR_LOOPBACK;
25141 +                       break;
25142 +
25143 +               case TIOCMSET:
25144 +                       /* turn off the RTS and DTR and LOOPBACK 
25145 +                        * and then only turn on what was asked to */
25146 +                       mcr &=  ~(MCR_RTS | MCR_DTR | MCR_LOOPBACK);
25147 +                       mcr |= ((arg & TIOCM_RTS) ? MCR_RTS : 0);
25148 +                       mcr |= ((arg & TIOCM_DTR) ? MCR_DTR : 0);
25149 +                       mcr |= ((arg & TIOCM_LOOP) ? MCR_LOOPBACK : 0);
25150 +                       break;
25151 +       }
25152 +
25153 +       edge_port->shadow_mcr = mcr;
25154 +
25155 +       TIRestoreMCR (edge_port, mcr);
25156 +
25157 +       return 0;
25158 +}
25159 +
25160 +static int get_modem_info (struct edgeport_port *edge_port, unsigned int *value)
25161 +{
25162 +       unsigned int result = 0;
25163 +       unsigned int msr = edge_port->shadow_msr;
25164 +       unsigned int mcr = edge_port->shadow_mcr;
25165 +
25166 +       result = ((mcr & MCR_DTR)       ? TIOCM_DTR: 0)   /* 0x002 */
25167 +                 | ((mcr & MCR_RTS)    ? TIOCM_RTS: 0)   /* 0x004 */
25168 +                 | ((msr & MSR_CTS)    ? TIOCM_CTS: 0)   /* 0x020 */
25169 +                 | ((msr & MSR_CD)     ? TIOCM_CAR: 0)   /* 0x040 */
25170 +                 | ((msr & MSR_RI)     ? TIOCM_RI:  0)   /* 0x080 */
25171 +                 | ((msr & MSR_DSR)    ? TIOCM_DSR: 0);  /* 0x100 */
25172 +
25173 +
25174 +       dbg("%s -- %x", __FUNCTION__, result);
25175 +
25176 +       if (copy_to_user(value, &result, sizeof(int)))
25177 +               return -EFAULT;
25178 +       return 0;
25179 +}
25180 +
25181 +static int get_serial_info (struct edgeport_port *edge_port, struct serial_struct * retinfo)
25182 +{
25183 +       struct serial_struct tmp;
25184 +
25185 +       if (!retinfo)
25186 +               return -EFAULT;
25187 +
25188 +       memset(&tmp, 0, sizeof(tmp));
25189 +
25190 +       tmp.type                = PORT_16550A;
25191 +       tmp.line                = edge_port->port->serial->minor;
25192 +       tmp.port                = edge_port->port->number;
25193 +       tmp.irq                 = 0;
25194 +       tmp.flags               = ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ;
25195 +       tmp.xmit_fifo_size      = edge_port->port->bulk_out_size;
25196 +       tmp.baud_base           = 9600;
25197 +       tmp.close_delay         = 5*HZ;
25198 +       tmp.closing_wait        = 30*HZ;
25199 +//     tmp.custom_divisor      = state->custom_divisor;
25200 +//     tmp.hub6                = state->hub6;
25201 +//     tmp.io_type             = state->io_type;
25202 +
25203 +
25204 +       if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
25205 +               return -EFAULT;
25206 +       return 0;
25207 +}
25208 +
25209 +static int edge_ioctl (struct usb_serial_port *port, struct file *file, unsigned int cmd, unsigned long arg)
25210 +{
25211 +       struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
25212 +       struct async_icount cnow;
25213 +       struct async_icount cprev;
25214 +
25215 +       dbg("%s - port %d, cmd = 0x%x", __FUNCTION__, port->number, cmd);
25216 +
25217 +       switch (cmd) {
25218 +               case TIOCINQ:
25219 +                       dbg("%s - (%d) TIOCINQ", __FUNCTION__, port->number);
25220 +//                     return get_number_bytes_avail(edge_port, (unsigned int *) arg);
25221 +                       break;
25222 +
25223 +               case TIOCSERGETLSR:
25224 +                       dbg("%s - (%d) TIOCSERGETLSR", __FUNCTION__, port->number);
25225 +//                     return get_lsr_info(edge_port, (unsigned int *) arg);
25226 +                       break;
25227 +
25228 +               case TIOCMBIS:
25229 +               case TIOCMBIC:
25230 +               case TIOCMSET:
25231 +                       dbg("%s - (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __FUNCTION__, port->number);
25232 +                       return set_modem_info(edge_port, cmd, (unsigned int *) arg);
25233 +                       break;
25234 +
25235 +               case TIOCMGET:  
25236 +                       dbg("%s - (%d) TIOCMGET", __FUNCTION__, port->number);
25237 +                       return get_modem_info(edge_port, (unsigned int *) arg);
25238 +                       break;
25239 +
25240 +               case TIOCGSERIAL:
25241 +                       dbg("%s - (%d) TIOCGSERIAL", __FUNCTION__, port->number);
25242 +                       return get_serial_info(edge_port, (struct serial_struct *) arg);
25243 +                       break;
25244 +
25245 +               case TIOCSSERIAL:
25246 +                       dbg("%s - (%d) TIOCSSERIAL", __FUNCTION__, port->number);
25247 +                       break;
25248 +
25249 +               case TIOCMIWAIT:
25250 +                       dbg("%s - (%d) TIOCMIWAIT", __FUNCTION__, port->number);
25251 +                       cprev = edge_port->icount;
25252 +                       while (1) {
25253 +                               interruptible_sleep_on(&edge_port->delta_msr_wait);
25254 +                               /* see if a signal did it */
25255 +                               if (signal_pending(current))
25256 +                                       return -ERESTARTSYS;
25257 +                               cnow = edge_port->icount;
25258 +                               if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr &&
25259 +                                   cnow.dcd == cprev.dcd && cnow.cts == cprev.cts)
25260 +                                       return -EIO; /* no change => error */
25261 +                               if (((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
25262 +                                   ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
25263 +                                   ((arg & TIOCM_CD)  && (cnow.dcd != cprev.dcd)) ||
25264 +                                   ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts)) ) {
25265 +                                       return 0;
25266 +                               }
25267 +                               cprev = cnow;
25268 +                       }
25269 +                       /* not reached */
25270 +                       break;
25271 +
25272 +               case TIOCGICOUNT:
25273 +                       dbg ("%s - (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__,
25274 +                            port->number, edge_port->icount.rx, edge_port->icount.tx);
25275 +                       if (copy_to_user((void *)arg, &edge_port->icount, sizeof(edge_port->icount)))
25276 +                               return -EFAULT;
25277 +                       return 0;
25278 +       }
25279 +
25280 +       return -ENOIOCTLCMD;
25281 +}
25282 +
25283 +static void edge_break (struct usb_serial_port *port, int break_state)
25284 +{
25285 +       struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
25286 +       int status;
25287 +
25288 +       dbg ("%s - state = %d", __FUNCTION__, break_state);
25289 +
25290 +       /* chase the port close */
25291 +       TIChasePort (edge_port);
25292 +
25293 +       if (break_state == -1) {
25294 +               status = TISetBreak (edge_port);
25295 +       } else {
25296 +               status = TIClearBreak (edge_port);
25297 +       }
25298 +       if (status) {
25299 +               dbg ("%s - error %d sending break set/clear command.",
25300 +                    __FUNCTION__, status);
25301 +       }
25302 +}
25303 +
25304 +static int edge_startup (struct usb_serial *serial)
25305 +{
25306 +       struct edgeport_serial *edge_serial;
25307 +       struct edgeport_port *edge_port;
25308 +       struct usb_device *dev;
25309 +       int status;
25310 +       int i;
25311 +
25312 +       dev = serial->dev;
25313 +
25314 +       /* create our private serial structure */
25315 +       edge_serial = kmalloc (sizeof(struct edgeport_serial), GFP_KERNEL);
25316 +       if (edge_serial == NULL) {
25317 +               err("%s - Out of memory", __FUNCTION__);
25318 +               return -ENOMEM;
25319 +       }
25320 +       memset (edge_serial, 0, sizeof(struct edgeport_serial));
25321 +       edge_serial->serial = serial;
25322 +       serial->private = edge_serial;
25323 +
25324 +       status = TIDownloadFirmware (edge_serial);
25325 +       if (status) {
25326 +               kfree (edge_serial);
25327 +               return status;
25328 +       }
25329 +
25330 +       /* set up our port private structures */
25331 +       for (i = 0; i < serial->num_ports; ++i) {
25332 +               edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL);
25333 +               if (edge_port == NULL) {
25334 +                       err("%s - Out of memory", __FUNCTION__);
25335 +                       return -ENOMEM;
25336 +               }
25337 +               memset (edge_port, 0, sizeof(struct edgeport_port));
25338 +               edge_port->port = &serial->port[i];
25339 +               edge_port->edge_serial = edge_serial;
25340 +               serial->port[i].private = edge_port;
25341 +       }
25342 +       
25343 +       return 0;
25344 +}
25345 +
25346 +static void edge_shutdown (struct usb_serial *serial)
25347 +{
25348 +       int i;
25349 +
25350 +       dbg ("%s", __FUNCTION__);
25351 +
25352 +       for (i=0; i < serial->num_ports; ++i) {
25353 +               kfree (serial->port[i].private);
25354 +               serial->port[i].private = NULL;
25355 +       }
25356 +       kfree (serial->private);
25357 +       serial->private = NULL;
25358 +}
25359 +
25360 +
25361 +static struct usb_serial_device_type edgeport_1port_device = {
25362 +       owner:                  THIS_MODULE,
25363 +       name:                   "Edgeport TI 1 port adapter",
25364 +       id_table:               edgeport_1port_id_table,
25365 +       num_interrupt_in:       1,
25366 +       num_bulk_in:            1,
25367 +       num_bulk_out:           1,
25368 +       num_ports:              1,
25369 +       open:                   edge_open,
25370 +       close:                  edge_close,
25371 +       throttle:               edge_throttle,
25372 +       unthrottle:             edge_unthrottle,
25373 +       startup:                edge_startup,
25374 +       shutdown:               edge_shutdown,
25375 +       ioctl:                  edge_ioctl,
25376 +       set_termios:            edge_set_termios,
25377 +       write:                  edge_write,
25378 +       write_room:             edge_write_room,
25379 +       chars_in_buffer:        edge_chars_in_buffer,
25380 +       break_ctl:              edge_break,
25381 +};
25382 +
25383 +static struct usb_serial_device_type edgeport_2port_device = {
25384 +       owner:                  THIS_MODULE,
25385 +       name:                   "Edgeport TI 2 port adapter",
25386 +       id_table:               edgeport_2port_id_table,
25387 +       num_interrupt_in:       1,
25388 +       num_bulk_in:            2,
25389 +       num_bulk_out:           2,
25390 +       num_ports:              2,
25391 +       open:                   edge_open,
25392 +       close:                  edge_close,
25393 +       throttle:               edge_throttle,
25394 +       unthrottle:             edge_unthrottle,
25395 +       startup:                edge_startup,
25396 +       shutdown:               edge_shutdown,
25397 +       ioctl:                  edge_ioctl,
25398 +       set_termios:            edge_set_termios,
25399 +       write:                  edge_write,
25400 +       write_room:             edge_write_room,
25401 +       chars_in_buffer:        edge_chars_in_buffer,
25402 +       break_ctl:              edge_break,
25403 +};
25404 +
25405 +
25406 +static int __init edgeport_init(void)
25407 +{
25408 +       usb_serial_register (&edgeport_1port_device);
25409 +       usb_serial_register (&edgeport_2port_device);
25410 +       info(DRIVER_DESC " " DRIVER_VERSION);
25411 +       return 0;
25412 +}
25413 +
25414 +static void __exit edgeport_exit (void)
25415 +{
25416 +       usb_serial_deregister (&edgeport_1port_device);
25417 +       usb_serial_deregister (&edgeport_2port_device);
25418 +}
25419 +
25420 +module_init(edgeport_init);
25421 +module_exit(edgeport_exit);
25422 +
25423 +/* Module information */
25424 +MODULE_AUTHOR(DRIVER_AUTHOR);
25425 +MODULE_DESCRIPTION(DRIVER_DESC);
25426 +MODULE_LICENSE("GPL");
25427 +
25428 +MODULE_PARM(debug, "i");
25429 +MODULE_PARM_DESC(debug, "Debug enabled or not");
25430 +
25431 +MODULE_PARM(ignore_cpu_rev, "i");
25432 +MODULE_PARM_DESC(ignore_cpu_rev, "Ignore the cpu revision when connecting to a device");
25433 +
25434 diff -Nur linux-2.4.19.old/drivers/usb/serial/io_ti.h linux-2.4.19/drivers/usb/serial/io_ti.h
25435 --- linux-2.4.19.old/drivers/usb/serial/io_ti.h Thu Jan  1 01:00:00 1970
25436 +++ linux-2.4.19/drivers/usb/serial/io_ti.h     Mon Nov 25 12:27:08 2002
25437 @@ -0,0 +1,180 @@
25438 +/*****************************************************************************  
25439 + *
25440 + *     Copyright (c) 1997-2002 Inside Out Networks, Inc.
25441 + *
25442 + *     This program is free software; you can redistribute it and/or modify
25443 + *     it under the terms of the GNU General Public License as published by
25444 + *     the Free Software Foundation; either version 2 of the License, or
25445 + *     (at your option) any later version.
25446 + *
25447 + *
25448 + *     Feb-16-2001     DMI     Added I2C structure definitions
25449 + *     May-29-2002     gkh     Ported to Linux
25450 + *
25451 + *
25452 + ******************************************************************************/
25453 +
25454 +#ifndef _IO_TI_H_
25455 +#define _IO_TI_H_
25456 +
25457 +/* Address Space */
25458 +#define DTK_ADDR_SPACE_XDATA           0x03    /* Addr is placed in XDATA space */
25459 +#define DTK_ADDR_SPACE_I2C_TYPE_II     0x82    /* Addr is placed in I2C area */
25460 +#define DTK_ADDR_SPACE_I2C_TYPE_III    0x83    /* Addr is placed in I2C area */
25461 +
25462 +// UART Defines
25463 +#define UMPMEM_BASE_UART1              0xFFA0  /* UMP UART1 base address          */
25464 +#define UMPMEM_BASE_UART2              0xFFB0  /* UMP UART2 base address          */
25465 +#define UMPMEM_OFFS_UART_LSR           0x05    /* UMP UART LSR register offset    */
25466 +
25467 +/* Bits per character */
25468 +#define UMP_UART_CHAR5BITS             0x00
25469 +#define UMP_UART_CHAR6BITS             0x01
25470 +#define UMP_UART_CHAR7BITS             0x02
25471 +#define UMP_UART_CHAR8BITS             0x03
25472 +
25473 +/* Parity */
25474 +#define UMP_UART_NOPARITY              0x00
25475 +#define UMP_UART_ODDPARITY             0x01
25476 +#define UMP_UART_EVENPARITY            0x02
25477 +#define UMP_UART_MARKPARITY            0x03
25478 +#define UMP_UART_SPACEPARITY           0x04
25479 +
25480 +/* Stop bits */
25481 +#define UMP_UART_STOPBIT1              0x00
25482 +#define UMP_UART_STOPBIT15             0x01
25483 +#define UMP_UART_STOPBIT2              0x02
25484 +
25485 +/* Line status register masks */
25486 +#define UMP_UART_LSR_OV_MASK           0x01
25487 +#define UMP_UART_LSR_PE_MASK           0x02
25488 +#define UMP_UART_LSR_FE_MASK           0x04
25489 +#define UMP_UART_LSR_BR_MASK           0x08
25490 +#define UMP_UART_LSR_ER_MASK           0x0F
25491 +#define UMP_UART_LSR_RX_MASK           0x10
25492 +#define UMP_UART_LSR_TX_MASK           0x20
25493 +
25494 +#define UMP_UART_LSR_DATA_MASK         ( LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK )
25495 +
25496 +/* Port Settings Constants) */
25497 +#define UMP_MASK_UART_FLAGS_RTS_FLOW           0x0001
25498 +#define UMP_MASK_UART_FLAGS_RTS_DISABLE                0x0002
25499 +#define UMP_MASK_UART_FLAGS_PARITY             0x0008
25500 +#define UMP_MASK_UART_FLAGS_OUT_X_DSR_FLOW     0x0010
25501 +#define UMP_MASK_UART_FLAGS_OUT_X_CTS_FLOW     0x0020
25502 +#define UMP_MASK_UART_FLAGS_OUT_X              0x0040
25503 +#define UMP_MASK_UART_FLAGS_OUT_XA             0x0080
25504 +#define UMP_MASK_UART_FLAGS_IN_X               0x0100
25505 +#define UMP_MASK_UART_FLAGS_DTR_FLOW           0x0800
25506 +#define UMP_MASK_UART_FLAGS_DTR_DISABLE                0x1000
25507 +#define UMP_MASK_UART_FLAGS_RECEIVE_MS_INT     0x2000
25508 +#define UMP_MASK_UART_FLAGS_AUTO_START_ON_ERR  0x4000
25509 +
25510 +#define UMP_DMA_MODE_CONTINOUS                 0x01
25511 +#define UMP_PIPE_TRANS_TIMEOUT_ENA             0x80
25512 +#define UMP_PIPE_TRANSFER_MODE_MASK            0x03
25513 +#define UMP_PIPE_TRANS_TIMEOUT_MASK            0x7C
25514 +
25515 +/* Purge port Direction Mask Bits */
25516 +#define UMP_PORT_DIR_OUT                       0x01
25517 +#define UMP_PORT_DIR_IN                                0x02
25518 +
25519 +// Address of Port 0
25520 +#define UMPM_UART1_PORT                        0x03
25521 +
25522 +// Commands
25523 +#define        UMPC_SET_CONFIG                 0x05
25524 +#define        UMPC_OPEN_PORT                  0x06
25525 +#define        UMPC_CLOSE_PORT                 0x07
25526 +#define        UMPC_START_PORT                 0x08
25527 +#define        UMPC_STOP_PORT                  0x09
25528 +#define        UMPC_TEST_PORT                  0x0A
25529 +#define        UMPC_PURGE_PORT                 0x0B
25530 +
25531 +#define        UMPC_COMPLETE_READ              0x80    // Force the Firmware to complete the current Read
25532 +#define        UMPC_HARDWARE_RESET             0x81    // Force UMP back into BOOT Mode
25533 +#define        UMPC_COPY_DNLD_TO_I2C           0x82    // Copy current download image to type 0xf2 record in 16k I2C
25534 +                                               // firmware will change 0xff record to type 2 record when complete
25535 +
25536 +       // Special function register commands
25537 +       // wIndex is register address
25538 +       // wValue is MSB/LSB mask/data
25539 +#define        UMPC_WRITE_SFR                  0x83    // Write SFR Register
25540 +
25541 +       // wIndex is register address
25542 +#define        UMPC_READ_SFR                   0x84    // Read SRF Register
25543 +
25544 +       // Set or Clear DTR (wValue bit 0 Set/Clear)            wIndex ModuleID (port)
25545 +#define        UMPC_SET_CLR_DTR                0x85
25546 +
25547 +       // Set or Clear RTS (wValue bit 0 Set/Clear)            wIndex ModuleID (port)
25548 +#define        UMPC_SET_CLR_RTS                0x86
25549 +
25550 +       // Set or Clear LOOPBACK (wValue bit 0 Set/Clear)       wIndex ModuleID (port)
25551 +#define        UMPC_SET_CLR_LOOPBACK           0x87
25552 +
25553 +       // Set or Clear BREAK (wValue bit 0 Set/Clear)          wIndex ModuleID (port)
25554 +#define        UMPC_SET_CLR_BREAK              0x88
25555 +
25556 +       // Read MSR wIndex ModuleID (port)
25557 +#define        UMPC_READ_MSR                   0x89
25558 +
25559 +       /* Toolkit commands */
25560 +       /* Read-write group */
25561 +#define        UMPC_MEMORY_READ                0x92
25562 +#define        UMPC_MEMORY_WRITE               0x93
25563 +
25564 +/*
25565 + *     UMP DMA Definitions
25566 + */
25567 +#define UMPD_OEDB1_ADDRESS             0xFF08
25568 +#define UMPD_OEDB2_ADDRESS             0xFF10
25569 +
25570 +struct out_endpoint_desc_block
25571 +{
25572 +       __u8 Configuration;
25573 +       __u8 XBufAddr;
25574 +       __u8 XByteCount;
25575 +       __u8 Unused1;
25576 +       __u8 Unused2;
25577 +       __u8 YBufAddr;
25578 +       __u8 YByteCount;
25579 +       __u8 BufferSize;
25580 +} __attribute__((packed));
25581 +
25582 +
25583 +/*
25584 + * TYPE DEFINITIONS
25585 + * Structures for Firmware commands
25586 + */
25587 +struct ump_uart_config         /* UART settings                    */
25588 +{
25589 +       __u16 wBaudRate;        /* Baud rate                        */
25590 +       __u16 wFlags;           /* Bitmap mask of flags             */
25591 +       __u8 bDataBits;         /* 5..8 - data bits per character   */
25592 +       __u8 bParity;           /* Parity settings                  */
25593 +       __u8 bStopBits;         /* Stop bits settings               */
25594 +       char cXon;              /* XON character                    */
25595 +       char cXoff;             /* XOFF character                   */
25596 +       __u8 bUartMode;         /* Will be updated when a user      */
25597 +                               /* interface is defined             */
25598 +} __attribute__((packed));
25599 +
25600 +
25601 +/*
25602 + * TYPE DEFINITIONS
25603 + * Structures for USB interrupts
25604 + */
25605 +struct ump_interrupt                   /* Interrupt packet structure       */
25606 +{
25607 +       __u8 bICode;                    /* Interrupt code (interrupt num)   */
25608 +       __u8 bIInfo;                    /* Interrupt information            */
25609 +}  __attribute__((packed));
25610 +
25611 +
25612 +#define TIUMP_GET_PORT_FROM_CODE(c)    (((c) >> 4) - 3)
25613 +#define TIUMP_GET_FUNC_FROM_CODE(c)    ((c) & 0x0f)
25614 +#define TIUMP_INTERRUPT_CODE_LSR       0x03
25615 +#define TIUMP_INTERRUPT_CODE_MSR       0x04
25616 +
25617 +#endif
25618 diff -Nur linux-2.4.19.old/drivers/usb/serial/io_usbvend.h linux-2.4.19/drivers/usb/serial/io_usbvend.h
25619 --- linux-2.4.19.old/drivers/usb/serial/io_usbvend.h    Sat Aug  3 02:39:45 2002
25620 +++ linux-2.4.19/drivers/usb/serial/io_usbvend.h        Mon Nov 25 12:27:08 2002
25621 @@ -106,11 +106,23 @@
25622  #define ION_DEVICE_ID_BB_EDGEPORT_4_DIN                0x011   // Edgeport/4 RS232 with Apple DIN connector
25623  #define ION_DEVICE_ID_BB_EDGEPORT_16_DUAL_CPU  0x012   // Half of an Edgeport/16 (the kind with 2 EP/8s)
25624  #define ION_DEVICE_ID_BB_EDGEPORT_8I           0x014   // Edgeport/8 RS422 (single-CPU)
25625 -// These IDs are used by the Edgeport.exe program for uninstalling.
25626 -// 
25627 -#define EDGEPORT_DEVICE_IDS    {0x001, 0x003, 0x004, 0x005, 0x006, 0x007, 0x00B, \
25628 -                                0x00C, 0x00D, 0x00E, 0x00F, 0x010, 0x011, 0x012, \
25629 -                                0x013, 0x014 }
25630 +
25631 +
25632 +/* Edgeport TI based devices */
25633 +#define ION_DEVICE_ID_TI_EDGEPORT_4            0x0201  /* Edgeport/4 RS232 */
25634 +#define ION_DEVICE_ID_TI_EDGEPORT_2            0x0205  /* Edgeport/2 RS232 */
25635 +#define ION_DEVICE_ID_TI_EDGEPORT_4I           0x0206  /* Edgeport/4i RS422 */
25636 +#define ION_DEVICE_ID_TI_EDGEPORT_2I           0x0207  /* Edgeport/2i RS422/RS485 */
25637 +#define ION_DEVICE_ID_TI_EDGEPORT_421          0x020C  /* Edgeport/421 4 hub 2 RS232 + Parallel (lucent on a different hub port) */
25638 +#define ION_DEVICE_ID_TI_EDGEPORT_21           0x020D  /* Edgeport/21 2 RS232 + Parallel (lucent on a different hub port) */
25639 +#define ION_DEVICE_ID_TI_EDGEPORT_1            0x0215  /* Edgeport/1 RS232 */
25640 +#define ION_DEVICE_ID_TI_EDGEPORT_42           0x0217  /* Edgeport/42 4 hub 2 RS232 */
25641 +#define ION_DEVICE_ID_TI_EDGEPORT_22           0x021A  /* Edgeport/22  Edgeport/22I is an Edgeport/4 with ports 1&2 RS422 and ports 3&4 RS232 */
25642 +
25643 +#define ION_DEVICE_ID_TI_EDGEPORT_421_BOOT     0x0240  /* Edgeport/421 in boot mode */
25644 +#define ION_DEVICE_ID_TI_EDGEPORT_421_DOWN     0x0241  /* Edgeport/421 in download mode first interface is 2 RS232 (Note that the second interface of this multi interface device should be a standard USB class 7 printer port) */
25645 +#define ION_DEVICE_ID_TI_EDGEPORT_21_BOOT      0x0242  /* Edgeport/21 in boot mode */
25646 +#define ION_DEVICE_ID_TI_EDGEPORT_21_DOWN      0x0243  /*Edgeport/42 in download mode: first interface is 2 RS232 (Note that the second interface of this multi interface device should be a standard USB class 7 printer port) */
25647  
25648  
25649  #define        MAKE_USB_PRODUCT_ID( OemId, DeviceId )                                  \
25650 @@ -196,11 +208,11 @@
25651  // Version 2 format of DeviceParams. This format is longer (3C0h)
25652  // and starts lower in memory, at the uppermost 1K in ROM.
25653  #define        EDGE_MANUF_DESC_ADDR            0x00FF7C00
25654 -#define        EDGE_MANUF_DESC_LEN             sizeof(EDGE_MANUF_DESCRIPTOR)
25655 +#define        EDGE_MANUF_DESC_LEN             sizeof(struct edge_manuf_descriptor)
25656  
25657  // Boot params descriptor
25658  #define        EDGE_BOOT_DESC_ADDR             0x00FF7FC0
25659 -#define        EDGE_BOOT_DESC_LEN              sizeof(EDGE_BOOT_DESCRIPTOR)
25660 +#define        EDGE_BOOT_DESC_LEN              sizeof(struct edge_boot_descriptor)
25661  
25662  // Define the max block size that may be read or written
25663  // in a read/write RAM/ROM command.
25664 @@ -217,7 +229,7 @@
25665  //             descriptor format, so that they may be separately retrieved,
25666  //             if necessary, with a minimum of work on the 930. This also
25667  //             requires them to be in UNICODE format, which, for English at
25668 -//             least, simply means extending each UCHAR into a USHORT.
25669 +//             least, simply means extending each __u8 into a __u16.
25670  //     3.      For all fields, 00 means 'uninitialized'.
25671  //     4.      All unused areas should be set to 00 for future expansion.
25672  //
25673 @@ -241,7 +253,7 @@
25674  #define MAX_SERIALNUMBER_LEN   12
25675  #define MAX_ASSEMBLYNUMBER_LEN 14
25676  
25677 -typedef struct _EDGE_MANUF_DESCRIPTOR {
25678 +struct edge_manuf_descriptor {
25679  
25680         __u16   RootDescTable[0x10];                    // C00 Root of descriptor tables (just a placeholder)
25681         __u8    DescriptorArea[0x2E0];                  // C20 Descriptors go here, up to 2E0h (just a placeholder)
25682 @@ -286,7 +298,7 @@
25683         __u8    IonConfig;                              // FBF Config byte for ION manufacturing use
25684                                                         // FBF end of structure, total len = 3C0h
25685  
25686 -} EDGE_MANUF_DESCRIPTOR, *PEDGE_MANUF_DESCRIPTOR;
25687 +};
25688  
25689  
25690  #define MANUF_DESC_VER_1       1       // Original definition of MANUF_DESC
25691 @@ -331,10 +343,10 @@
25692  
25693  
25694  
25695 -#define        MANUF_SERNUM_LENGTH             sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->SerialNumber)
25696 -#define        MANUF_ASSYNUM_LENGTH            sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->AssemblyNumber)
25697 -#define        MANUF_OEMASSYNUM_LENGTH         sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->OemAssyNumber)
25698 -#define        MANUF_MANUFDATE_LENGTH          sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->ManufDate)
25699 +#define        MANUF_SERNUM_LENGTH             sizeof(((struct edge_manuf_descriptor *)0)->SerialNumber)
25700 +#define        MANUF_ASSYNUM_LENGTH            sizeof(((struct edge_manuf_descriptor *)0)->AssemblyNumber)
25701 +#define        MANUF_OEMASSYNUM_LENGTH         sizeof(((struct edge_manuf_descriptor *)0)->OemAssyNumber)
25702 +#define        MANUF_MANUFDATE_LENGTH          sizeof(((struct edge_manuf_descriptor *)0)->ManufDate)
25703  
25704  #define        MANUF_ION_CONFIG_MASTER         0x80    // 1=Master mode, 0=Normal
25705  #define        MANUF_ION_CONFIG_DIAG           0x40    // 1=Run h/w diags, 0=norm
25706 @@ -349,7 +361,7 @@
25707  // - FF:xFFF. Note that the 930-mandated UCONFIG bytes are
25708  // included in this structure.
25709  //
25710 -typedef struct _EDGE_BOOT_DESCRIPTOR {
25711 +struct edge_boot_descriptor {
25712         __u8            Length;                 // C0 Desc length, per USB (= 40h)
25713         __u8            DescType;               // C1 Desc type, per USB (= DEVICE type)
25714         __u8            DescVer;                // C2 Desc version/format
25715 @@ -373,8 +385,7 @@
25716         __u8            UConfig1;               // F9 930-defined CPU configuration byte 1
25717         __u8            Reserved3[6];           // FA -- unused, set to 0 --
25718                                                 // FF end of structure, total len = 80
25719 -
25720 -} EDGE_BOOT_DESCRIPTOR, *PEDGE_BOOT_DESCRIPTOR;
25721 +};
25722  
25723  
25724  #define BOOT_DESC_VER_1                1       // Original definition of BOOT_PARAMS
25725 @@ -385,5 +396,92 @@
25726  
25727  #define        BOOT_CAP_RESET_CMD      0x0001  // If set, boot correctly supports ION_RESET_DEVICE
25728  
25729 -#endif // if !defined()
25730  
25731 +
25732 +/************************************************************************
25733 +                 T I   U M P   D E F I N I T I O N S
25734 + ***********************************************************************/
25735 +
25736 +//************************************************************************
25737 +//     TI I2C Format Definitions
25738 +//************************************************************************
25739 +#define I2C_DESC_TYPE_INFO_BASIC       1
25740 +#define I2C_DESC_TYPE_FIRMWARE_BASIC   2
25741 +#define I2C_DESC_TYPE_DEVICE           3
25742 +#define I2C_DESC_TYPE_CONFIG           4
25743 +#define I2C_DESC_TYPE_STRING           5
25744 +#define I2C_DESC_TYPE_FIRMWARE_BLANK   0xf2
25745 +
25746 +#define I2C_DESC_TYPE_MAX              5
25747 +// 3410 may define types 6, 7 for other firmware downloads
25748 +
25749 +// Special section defined by ION
25750 +#define I2C_DESC_TYPE_ION              0       // Not defined by TI
25751 +
25752 +
25753 +struct ti_i2c_desc
25754 +{
25755 +       __u8    Type;                   // Type of descriptor
25756 +       __u16   Size;                   // Size of data only not including header
25757 +       __u8    CheckSum;               // Checksum (8 bit sum of data only)
25758 +       __u8    Data[0];                // Data starts here
25759 +}__attribute__((packed));
25760 +
25761 +struct ti_i2c_firmware_rec 
25762 +{
25763 +       __u8    Ver_Major;              // Firmware Major version number
25764 +       __u8    Ver_Minor;              // Firmware Minor version number
25765 +       __u8    Data[0];                // Download starts here
25766 +}__attribute__((packed));
25767 +
25768 +
25769 +// Structure of header of download image in fw_down.h
25770 +struct ti_i2c_image_header
25771 +{
25772 +       __u16   Length;
25773 +       __u8    CheckSum;
25774 +}__attribute__((packed));
25775 +
25776 +struct ti_basic_descriptor
25777 +{
25778 +       __u8    Power;          // Self powered
25779 +                               // bit 7: 1 - power switching supported
25780 +                               //        0 - power switching not supported
25781 +                               //
25782 +                               // bit 0: 1 - self powered
25783 +                               //        0 - bus powered
25784 +                               //
25785 +                               //
25786 +       __u16   HubVid;         // VID HUB
25787 +       __u16   HubPid;         // PID HUB
25788 +       __u16   DevPid;         // PID Edgeport
25789 +       __u8    HubTime;        // Time for power on to power good
25790 +       __u8    HubCurrent;     // HUB Current = 100ma
25791 +} __attribute__((packed));
25792 +
25793 +
25794 +#define TI_GET_CPU_REVISION(x)         (__u8)((((x)>>4)&0x0f))
25795 +#define TI_GET_BOARD_REVISION(x)       (__u8)(((x)&0x0f))
25796 +
25797 +#define TI_I2C_SIZE_MASK               0x1f  // 5 bits
25798 +#define TI_GET_I2C_SIZE(x)             ((((x) & TI_I2C_SIZE_MASK)+1)*256)
25799 +
25800 +#define TI_MAX_I2C_SIZE                        ( 16 * 1024 )
25801 +
25802 +/* TI USB 5052 definitions */
25803 +struct edge_ti_manuf_descriptor
25804 +{
25805 +       __u8 IonConfig;         //  Config byte for ION manufacturing use
25806 +       __u8 IonConfig2;        //  Expansion
25807 +       __u8 Version;           //  Verqsion
25808 +       __u8 CpuRev_BoardRev;   //  CPU revision level (0xF0) and Board Rev Level (0x0F)
25809 +       __u8 NumPorts;          //  Number of ports     for this UMP
25810 +       __u8 NumVirtualPorts;   //  Number of Virtual ports
25811 +       __u8 HubConfig1;        //  Used to configure the Hub
25812 +       __u8 HubConfig2;        //  Used to configure the Hub
25813 +       __u8 TotalPorts;        //  Total Number of Com Ports for the entire device (All UMPs)
25814 +       __u8 Reserved;
25815 +}__attribute__((packed));
25816 +
25817 +
25818 +#endif         // if !defined()
25819 diff -Nur linux-2.4.19.old/drivers/usb/serial/ipaq.c linux-2.4.19/drivers/usb/serial/ipaq.c
25820 --- linux-2.4.19.old/drivers/usb/serial/ipaq.c  Sat Aug  3 02:39:45 2002
25821 +++ linux-2.4.19/drivers/usb/serial/ipaq.c      Mon Nov 25 12:27:08 2002
25822 @@ -9,6 +9,10 @@
25823   *     the Free Software Foundation; either version 2 of the License, or
25824   *     (at your option) any later version.
25825   *
25826 + * (26/7/2002) ganesh
25827 + *     Fixed up broken error handling in ipaq_open. Retry the "kickstart"
25828 + *     packet much harder - this drastically reduces connection failures.
25829 + *
25830   * (30/4/2002) ganesh
25831   *     Added support for the Casio EM500. Completely untested. Thanks
25832   *     to info from Nathan <wfilardo@fuse.net>
25833 @@ -34,18 +38,15 @@
25834  
25835  #include <linux/config.h>
25836  #include <linux/kernel.h>
25837 -#include <linux/sched.h>
25838 -#include <linux/signal.h>
25839  #include <linux/errno.h>
25840 -#include <linux/poll.h>
25841  #include <linux/init.h>
25842  #include <linux/slab.h>
25843 -#include <linux/fcntl.h>
25844  #include <linux/tty.h>
25845  #include <linux/tty_driver.h>
25846  #include <linux/tty_flip.h>
25847  #include <linux/module.h>
25848  #include <linux/spinlock.h>
25849 +#include <asm/uaccess.h>
25850  #include <linux/usb.h>
25851  
25852  #ifdef CONFIG_USB_SERIAL_DEBUG
25853 @@ -57,6 +58,8 @@
25854  #include "usb-serial.h"
25855  #include "ipaq.h"
25856  
25857 +#define KP_RETRIES     100
25858 +
25859  /*
25860   * Version Information
25861   */
25862 @@ -81,7 +84,7 @@
25863  static void ipaq_destroy_lists(struct usb_serial_port *port);
25864  
25865  
25866 -static __devinitdata struct usb_device_id ipaq_id_table [] = {
25867 +static struct usb_device_id ipaq_id_table [] = {
25868         { USB_DEVICE(COMPAQ_VENDOR_ID, COMPAQ_IPAQ_ID) },
25869         { USB_DEVICE(HP_VENDOR_ID, HP_JORNADA_548_ID) },
25870         { USB_DEVICE(HP_VENDOR_ID, HP_JORNADA_568_ID) },
25871 @@ -93,24 +96,22 @@
25872  
25873  /* All of the device info needed for the Compaq iPAQ */
25874  struct usb_serial_device_type ipaq_device = {
25875 -       name:                   "Compaq iPAQ",
25876 -       id_table:               ipaq_id_table,
25877 -       needs_interrupt_in:     DONT_CARE,
25878 -       needs_bulk_in:          MUST_HAVE,
25879 -       needs_bulk_out:         MUST_HAVE,
25880 -       num_interrupt_in:       NUM_DONT_CARE,
25881 -       num_bulk_in:            1,
25882 -       num_bulk_out:           1,
25883 -       num_ports:              1,
25884 -       open:                   ipaq_open,
25885 -       close:                  ipaq_close,
25886 -       startup:                ipaq_startup,
25887 -       shutdown:               ipaq_shutdown,
25888 -       write:                  ipaq_write,
25889 -       write_room:             ipaq_write_room,
25890 -       chars_in_buffer:        ipaq_chars_in_buffer,
25891 -       read_bulk_callback:     ipaq_read_bulk_callback,
25892 -       write_bulk_callback:    ipaq_write_bulk_callback,
25893 +       .owner =                THIS_MODULE,
25894 +       .name =                 "Compaq iPAQ",
25895 +       .id_table =             ipaq_id_table,
25896 +       .num_interrupt_in =     NUM_DONT_CARE,
25897 +       .num_bulk_in =          1,
25898 +       .num_bulk_out =         1,
25899 +       .num_ports =            1,
25900 +       .open =                 ipaq_open,
25901 +       .close =                ipaq_close,
25902 +       .startup =              ipaq_startup,
25903 +       .shutdown =             ipaq_shutdown,
25904 +       .write =                ipaq_write,
25905 +       .write_room =           ipaq_write_room,
25906 +       .chars_in_buffer =      ipaq_chars_in_buffer,
25907 +       .read_bulk_callback =   ipaq_read_bulk_callback,
25908 +       .write_bulk_callback =  ipaq_write_bulk_callback,
25909  };
25910  
25911  static spinlock_t      write_list_lock;
25912 @@ -123,115 +124,110 @@
25913         struct ipaq_private     *priv;
25914         struct ipaq_packet      *pkt;
25915         int                     i, result = 0;
25916 +       int                     retries = KP_RETRIES;
25917  
25918         if (port_paranoia_check(port, __FUNCTION__)) {
25919                 return -ENODEV;
25920         }
25921         
25922 -       dbg(__FUNCTION__ " - port %d", port->number);
25923 -
25924 -       down(&port->sem);
25925 -       
25926 -       ++port->open_count;
25927 -       MOD_INC_USE_COUNT;
25928 -       
25929 -       if (!port->active) {
25930 -               port->active = 1;
25931 -               bytes_in = 0;
25932 -               bytes_out = 0;
25933 -               priv = (struct ipaq_private *)kmalloc(sizeof(struct ipaq_private), GFP_KERNEL);
25934 -               if (priv == NULL) {
25935 -                       err(__FUNCTION__ " - Out of memory");
25936 -                       return -ENOMEM;
25937 -               }
25938 -               port->private = (void *)priv;
25939 -               priv->active = 0;
25940 -               priv->queue_len = 0;
25941 -               INIT_LIST_HEAD(&priv->queue);
25942 -               INIT_LIST_HEAD(&priv->freelist);
25943 -
25944 -               for (i = 0; i < URBDATA_QUEUE_MAX / PACKET_SIZE; i++) {
25945 -                       pkt = kmalloc(sizeof(struct ipaq_packet), GFP_KERNEL);
25946 -                       if (pkt == NULL) {
25947 -                               goto enomem;
25948 -                       }
25949 -                       pkt->data = kmalloc(PACKET_SIZE, GFP_KERNEL);
25950 -                       if (pkt->data == NULL) {
25951 -                               kfree(pkt);
25952 -                               goto enomem;
25953 -                       }
25954 -                       pkt->len = 0;
25955 -                       pkt->written = 0;
25956 -                       INIT_LIST_HEAD(&pkt->list);
25957 -                       list_add(&pkt->list, &priv->freelist);
25958 -                       priv->free_len += PACKET_SIZE;
25959 -               }
25960 -
25961 -               /*
25962 -                * Force low latency on. This will immediately push data to the line
25963 -                * discipline instead of queueing.
25964 -                */
25965 -
25966 -               port->tty->low_latency = 1;
25967 -               port->tty->raw = 1;
25968 -               port->tty->real_raw = 1;
25969 -
25970 -               /*
25971 -                * Lose the small buffers usbserial provides. Make larger ones.
25972 -                */
25973 +       dbg("%s - port %d", __FUNCTION__, port->number);
25974  
25975 -               kfree(port->bulk_in_buffer);
25976 -               kfree(port->bulk_out_buffer);
25977 -               port->bulk_in_buffer = kmalloc(URBDATA_SIZE, GFP_KERNEL);
25978 -               if (port->bulk_in_buffer == NULL) {
25979 +       bytes_in = 0;
25980 +       bytes_out = 0;
25981 +       priv = (struct ipaq_private *)kmalloc(sizeof(struct ipaq_private), GFP_KERNEL);
25982 +       if (priv == NULL) {
25983 +               err("%s - Out of memory", __FUNCTION__);
25984 +               return -ENOMEM;
25985 +       }
25986 +       port->private = (void *)priv;
25987 +       priv->active = 0;
25988 +       priv->queue_len = 0;
25989 +       INIT_LIST_HEAD(&priv->queue);
25990 +       INIT_LIST_HEAD(&priv->freelist);
25991 +
25992 +       for (i = 0; i < URBDATA_QUEUE_MAX / PACKET_SIZE; i++) {
25993 +               pkt = kmalloc(sizeof(struct ipaq_packet), GFP_KERNEL);
25994 +               if (pkt == NULL) {
25995                         goto enomem;
25996                 }
25997 -               port->bulk_out_buffer = kmalloc(URBDATA_SIZE, GFP_KERNEL);
25998 -               if (port->bulk_out_buffer == NULL) {
25999 -                       kfree(port->bulk_in_buffer);
26000 +               pkt->data = kmalloc(PACKET_SIZE, GFP_KERNEL);
26001 +               if (pkt->data == NULL) {
26002 +                       kfree(pkt);
26003                         goto enomem;
26004                 }
26005 -               port->read_urb->transfer_buffer = port->bulk_in_buffer;
26006 -               port->write_urb->transfer_buffer = port->bulk_out_buffer;
26007 -               port->read_urb->transfer_buffer_length = URBDATA_SIZE;
26008 -               port->bulk_out_size = port->write_urb->transfer_buffer_length = URBDATA_SIZE;
26009 -               
26010 -               /* Start reading from the device */
26011 -               FILL_BULK_URB(port->read_urb, serial->dev, 
26012 -                             usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
26013 -                             port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
26014 -                             ipaq_read_bulk_callback, port);
26015 -               result = usb_submit_urb(port->read_urb);
26016 -               if (result) {
26017 -                       err(__FUNCTION__ " - failed submitting read urb, error %d", result);
26018 -               }
26019 -
26020 -               /*
26021 -                * Send out two control messages observed in win98 sniffs. Not sure what
26022 -                * they do.
26023 -                */
26024 -
26025 -               result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), 0x22, 0x21,
26026 -                               0x1, 0, NULL, 0, 5 * HZ);
26027 -               if (result < 0) {
26028 -                       err(__FUNCTION__ " - failed doing control urb, error %d", result);
26029 -               }
26030 -               result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), 0x22, 0x21,
26031 -                               0x1, 0, NULL, 0, 5 * HZ);
26032 -               if (result < 0) {
26033 -                       err(__FUNCTION__ " - failed doing control urb, error %d", result);
26034 -               }
26035 +               pkt->len = 0;
26036 +               pkt->written = 0;
26037 +               INIT_LIST_HEAD(&pkt->list);
26038 +               list_add(&pkt->list, &priv->freelist);
26039 +               priv->free_len += PACKET_SIZE;
26040 +       }
26041 +
26042 +       /*
26043 +        * Force low latency on. This will immediately push data to the line
26044 +        * discipline instead of queueing.
26045 +        */
26046 +
26047 +       port->tty->low_latency = 1;
26048 +       port->tty->raw = 1;
26049 +       port->tty->real_raw = 1;
26050 +
26051 +       /*
26052 +        * Lose the small buffers usbserial provides. Make larger ones.
26053 +        */
26054 +
26055 +       kfree(port->bulk_in_buffer);
26056 +       kfree(port->bulk_out_buffer);
26057 +       port->bulk_in_buffer = kmalloc(URBDATA_SIZE, GFP_KERNEL);
26058 +       if (port->bulk_in_buffer == NULL) {
26059 +               goto enomem;
26060         }
26061 +       port->bulk_out_buffer = kmalloc(URBDATA_SIZE, GFP_KERNEL);
26062 +       if (port->bulk_out_buffer == NULL) {
26063 +               kfree(port->bulk_in_buffer);
26064 +               goto enomem;
26065 +       }
26066 +       port->read_urb->transfer_buffer = port->bulk_in_buffer;
26067 +       port->write_urb->transfer_buffer = port->bulk_out_buffer;
26068 +       port->read_urb->transfer_buffer_length = URBDATA_SIZE;
26069 +       port->bulk_out_size = port->write_urb->transfer_buffer_length = URBDATA_SIZE;
26070         
26071 -       up(&port->sem);
26072 -       
26073 -       return result;
26074 +       /* Start reading from the device */
26075 +       FILL_BULK_URB(port->read_urb, serial->dev, 
26076 +                     usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
26077 +                     port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
26078 +                     ipaq_read_bulk_callback, port);
26079 +       result = usb_submit_urb(port->read_urb);
26080 +       if (result) {
26081 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
26082 +               goto error;
26083 +       }
26084 +
26085 +       /*
26086 +        * Send out control message observed in win98 sniffs. Not sure what
26087 +        * it does, but from empirical observations, it seems that the device
26088 +        * will start the chat sequence once one of these messages gets
26089 +        * through. Since this has a reasonably high failure rate, we retry
26090 +        * several times.
26091 +        */
26092 +
26093 +       while (retries--) {
26094 +               result = usb_control_msg(serial->dev,
26095 +                               usb_sndctrlpipe(serial->dev, 0), 0x22, 0x21,
26096 +                               0x1, 0, NULL, 0, HZ / 10 + 1);
26097 +               if (result == 0) {
26098 +                       return 0;
26099 +               }
26100 +       }
26101 +       err("%s - failed doing control urb, error %d", __FUNCTION__, result);
26102 +       goto error;
26103  
26104  enomem:
26105 +       result = -ENOMEM;
26106 +       err("%s - Out of memory", __FUNCTION__);
26107 +error:
26108         ipaq_destroy_lists(port);
26109         kfree(priv);
26110 -       err(__FUNCTION__ " - Out of memory");
26111 -       return -ENOMEM;
26112 +       return result;
26113  }
26114  
26115  
26116 @@ -244,37 +240,24 @@
26117                 return; 
26118         }
26119         
26120 -       dbg(__FUNCTION__ " - port %d", port->number);
26121 +       dbg("%s - port %d", __FUNCTION__, port->number);
26122                          
26123         serial = get_usb_serial(port, __FUNCTION__);
26124         if (!serial)
26125                 return;
26126 -       
26127 -       down (&port->sem);
26128 -
26129 -       --port->open_count;
26130  
26131 -       if (port->open_count <= 0) {
26132 +       /*
26133 +        * shut down bulk read and write
26134 +        */
26135  
26136 -               /*
26137 -                * shut down bulk read and write
26138 -                */
26139 -
26140 -               usb_unlink_urb(port->write_urb);
26141 -               usb_unlink_urb(port->read_urb);
26142 -               ipaq_destroy_lists(port);
26143 -               kfree(priv);
26144 -               port->private = NULL;
26145 -               port->active = 0;
26146 -               port->open_count = 0;
26147 -
26148 -       }
26149 -       up (&port->sem);
26150 +       usb_unlink_urb(port->write_urb);
26151 +       usb_unlink_urb(port->read_urb);
26152 +       ipaq_destroy_lists(port);
26153 +       kfree(priv);
26154 +       port->private = NULL;
26155  
26156         /* Uncomment the following line if you want to see some statistics in your syslog */
26157         /* info ("Bytes In = %d  Bytes Out = %d", bytes_in, bytes_out); */
26158 -
26159 -       MOD_DEC_USE_COUNT;
26160  }
26161  
26162  static void ipaq_read_bulk_callback(struct urb *urb)
26163 @@ -288,15 +271,15 @@
26164         if (port_paranoia_check(port, __FUNCTION__))
26165                 return;
26166  
26167 -       dbg(__FUNCTION__ " - port %d", port->number);
26168 +       dbg("%s - port %d", __FUNCTION__, port->number);
26169  
26170         if (!serial) {
26171 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
26172 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
26173                 return;
26174         }
26175  
26176         if (urb->status) {
26177 -               dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
26178 +               dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
26179                 return;
26180         }
26181  
26182 @@ -323,7 +306,7 @@
26183                       ipaq_read_bulk_callback, port);
26184         result = usb_submit_urb(port->read_urb);
26185         if (result)
26186 -               err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
26187 +               err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
26188         return;
26189  }
26190  
26191 @@ -334,7 +317,7 @@
26192         int                     bytes_sent = 0;
26193         int                     transfer_size;
26194  
26195 -       dbg(__FUNCTION__ " - port %d", port->number);
26196 +       dbg("%s - port %d", __FUNCTION__, port->number);
26197  
26198         usb_serial_debug_data(__FILE__, __FUNCTION__, count, buf);
26199         
26200 @@ -361,7 +344,7 @@
26201         unsigned long           flags;
26202  
26203         if (priv->free_len <= 0) {
26204 -               dbg(__FUNCTION__ " - we're stuffed");
26205 +               dbg("%s - we're stuffed", __FUNCTION__);
26206                 return -EAGAIN;
26207         }
26208  
26209 @@ -373,12 +356,13 @@
26210         }
26211         spin_unlock_irqrestore(&write_list_lock, flags);
26212         if (pkt == NULL) {
26213 -               dbg(__FUNCTION__ " - we're stuffed");
26214 +               dbg("%s - we're stuffed", __FUNCTION__);
26215                 return -EAGAIN;
26216         }
26217  
26218         if (from_user) {
26219 -               copy_from_user(pkt->data, buf, count);
26220 +               if (copy_from_user(pkt->data, buf, count))
26221 +                       return -EFAULT;
26222         } else {
26223                 memcpy(pkt->data, buf, count);
26224         }
26225 @@ -395,7 +379,7 @@
26226                 spin_unlock_irqrestore(&write_list_lock, flags);
26227                 result = usb_submit_urb(port->write_urb);
26228                 if (result) {
26229 -                       err(__FUNCTION__ " - failed submitting write urb, error %d", result);
26230 +                       err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
26231                 }
26232         } else {
26233                 spin_unlock_irqrestore(&write_list_lock, flags);
26234 @@ -414,7 +398,7 @@
26235  
26236         if (urb->status == -EINPROGRESS) {
26237                 /* Should never happen */
26238 -               err(__FUNCTION__ " - flushing while urb is active !");
26239 +               err("%s - flushing while urb is active !", __FUNCTION__);
26240                 return;
26241         }
26242         room = URBDATA_SIZE;
26243 @@ -456,10 +440,10 @@
26244                 return;
26245         }
26246         
26247 -       dbg(__FUNCTION__ " - port %d", port->number);
26248 +       dbg("%s - port %d", __FUNCTION__, port->number);
26249         
26250         if (urb->status) {
26251 -               dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
26252 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
26253         }
26254  
26255         spin_lock_irqsave(&write_list_lock, flags);
26256 @@ -468,7 +452,7 @@
26257                 spin_unlock_irqrestore(&write_list_lock, flags);
26258                 result = usb_submit_urb(port->write_urb);
26259                 if (result) {
26260 -                       err(__FUNCTION__ " - failed submitting write urb, error %d", result);
26261 +                       err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
26262                 }
26263         } else {
26264                 priv->active = 0;
26265 @@ -484,7 +468,7 @@
26266  {
26267         struct ipaq_private     *priv = (struct ipaq_private *)port->private;
26268  
26269 -       dbg(__FUNCTION__ " - freelen %d", priv->free_len);
26270 +       dbg("%s - freelen %d", __FUNCTION__, priv->free_len);
26271         return priv->free_len;
26272  }
26273  
26274 @@ -492,7 +476,7 @@
26275  {
26276         struct ipaq_private     *priv = (struct ipaq_private *)port->private;
26277  
26278 -       dbg(__FUNCTION__ " - queuelen %d", priv->queue_len);
26279 +       dbg("%s - queuelen %d", __FUNCTION__, priv->queue_len);
26280         return priv->queue_len;
26281  }
26282  
26283 @@ -520,23 +504,14 @@
26284  
26285  static int ipaq_startup(struct usb_serial *serial)
26286  {
26287 -       dbg(__FUNCTION__);
26288 +       dbg("%s", __FUNCTION__);
26289         usb_set_configuration(serial->dev, 1);
26290         return 0;
26291  }
26292  
26293  static void ipaq_shutdown(struct usb_serial *serial)
26294  {
26295 -       int i;
26296 -
26297 -       dbg (__FUNCTION__);
26298 -
26299 -       /* stop reads and writes on all ports */
26300 -       for (i=0; i < serial->num_ports; ++i) {
26301 -               while (serial->port[i].open_count > 0) {
26302 -                       ipaq_close(&serial->port[i], NULL);
26303 -               }
26304 -       }
26305 +       dbg("%s", __FUNCTION__);
26306  }
26307  
26308  static int __init ipaq_init(void)
26309 diff -Nur linux-2.4.19.old/drivers/usb/serial/ipaq.h linux-2.4.19/drivers/usb/serial/ipaq.h
26310 --- linux-2.4.19.old/drivers/usb/serial/ipaq.h  Sat Aug  3 02:39:45 2002
26311 +++ linux-2.4.19/drivers/usb/serial/ipaq.h      Mon Nov 25 12:27:08 2002
26312 @@ -19,7 +19,7 @@
26313  #define COMPAQ_VENDOR_ID       0x049f
26314  #define COMPAQ_IPAQ_ID         0x0003
26315  
26316 -#define HP_VENDOR_ID           0x003f
26317 +#define HP_VENDOR_ID           0x03f0
26318  #define HP_JORNADA_548_ID      0x1016
26319  #define HP_JORNADA_568_ID      0x1116
26320  
26321 diff -Nur linux-2.4.19.old/drivers/usb/serial/ir-usb.c linux-2.4.19/drivers/usb/serial/ir-usb.c
26322 --- linux-2.4.19.old/drivers/usb/serial/ir-usb.c        Mon Feb 25 20:38:07 2002
26323 +++ linux-2.4.19/drivers/usb/serial/ir-usb.c    Mon Nov 25 12:27:08 2002
26324 @@ -1,8 +1,8 @@
26325  /*
26326   * USB IR Dongle driver
26327   *
26328 - *     Copyright (C) 2001 Greg Kroah-Hartman (greg@kroah.com)
26329 - *     Copyright (C) 2002 Gary Brubaker (xavyer@ix.netcom.com)
26330 + *     Copyright (C) 2001-2002 Greg Kroah-Hartman (greg@kroah.com)
26331 + *     Copyright (C) 2002      Gary Brubaker (xavyer@ix.netcom.com)
26332   *
26333   *     This program is free software; you can redistribute it and/or modify
26334   *     it under the terms of the GNU General Public License as published by
26335 @@ -21,6 +21,11 @@
26336   *
26337   * See Documentation/usb/usb-serial.txt for more information on using this driver
26338   *
26339 + * 2002_Mar_07 greg kh
26340 + *     moved some needed structures and #define values from the
26341 + *     net/irda/irda-usb.h file into our file, as we don't want to depend on
26342 + *     that codebase compiling correctly :)
26343 + *
26344   * 2002_Jan_14  gb
26345   *     Added module parameter to force specific number of XBOFs.
26346   *     Added ir_xbof_change().
26347 @@ -43,20 +48,16 @@
26348  
26349  #include <linux/config.h>
26350  #include <linux/kernel.h>
26351 -#include <linux/sched.h>
26352 -#include <linux/signal.h>
26353  #include <linux/errno.h>
26354 -#include <linux/poll.h>
26355  #include <linux/init.h>
26356  #include <linux/slab.h>
26357 -#include <linux/fcntl.h>
26358  #include <linux/tty.h>
26359  #include <linux/tty_driver.h>
26360  #include <linux/tty_flip.h>
26361  #include <linux/module.h>
26362  #include <linux/spinlock.h>
26363 +#include <asm/uaccess.h>
26364  #include <linux/usb.h>
26365 -#include <net/irda/irda-usb.h>
26366  
26367  #ifdef CONFIG_USB_SERIAL_DEBUG
26368         static int debug = 1;
26369 @@ -73,6 +74,33 @@
26370  #define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>"
26371  #define DRIVER_DESC "USB IR Dongle driver"
26372  
26373 +/* USB IrDA class spec information */
26374 +#define USB_CLASS_IRDA         0x02
26375 +#define USB_DT_IRDA            0x21
26376 +#define IU_REQ_GET_CLASS_DESC  0x06
26377 +#define SPEED_2400             0x01
26378 +#define SPEED_9600             0x02
26379 +#define SPEED_19200            0x03
26380 +#define SPEED_38400            0x04
26381 +#define SPEED_57600            0x05
26382 +#define SPEED_115200           0x06
26383 +#define SPEED_576000           0x07
26384 +#define SPEED_1152000          0x08
26385 +#define SPEED_4000000          0x09
26386 +
26387 +struct irda_class_desc {
26388 +       u8      bLength;
26389 +       u8      bDescriptorType;
26390 +       u16     bcdSpecRevision;
26391 +       u8      bmDataSize;
26392 +       u8      bmWindowSize;
26393 +       u8      bmMinTurnaroundTime;
26394 +       u16     wBaudRate;
26395 +       u8      bmAdditionalBOFs;
26396 +       u8      bIrdaRateSniff;
26397 +       u8      bMaxUnicastList;
26398 +} __attribute__ ((packed));
26399 +
26400  /* if overridden by the user, then use their value for the size of the read and
26401   * write urbs */
26402  static int buffer_size = 0;
26403 @@ -91,7 +119,7 @@
26404  static u8 ir_xbof = 0;
26405  static u8 ir_add_bof = 0;
26406  
26407 -static __devinitdata struct usb_device_id id_table [] = {
26408 +static struct usb_device_id id_table [] = {
26409         { USB_DEVICE(0x050f, 0x0180) },         /* KC Technology, KC-180 */
26410         { USB_DEVICE(0x08e9, 0x0100) },         /* XTNDAccess */
26411         { USB_DEVICE(0x09c4, 0x0011) },         /* ACTiSys ACT-IR2000U */
26412 @@ -103,22 +131,20 @@
26413  
26414  
26415  struct usb_serial_device_type ir_device = {
26416 -       name:                   "IR Dongle",
26417 -       id_table:               id_table,
26418 -       needs_interrupt_in:     MUST_HAVE,
26419 -       needs_bulk_in:          MUST_HAVE,
26420 -       needs_bulk_out:         MUST_HAVE,
26421 -       num_interrupt_in:       1,
26422 -       num_bulk_in:            1,
26423 -       num_bulk_out:           1,
26424 -       num_ports:              1,
26425 -       set_termios:            ir_set_termios,
26426 -       startup:                ir_startup,
26427 -       open:                   ir_open,
26428 -       close:                  ir_close,
26429 -       write:                  ir_write,
26430 -       write_bulk_callback:    ir_write_bulk_callback,
26431 -       read_bulk_callback:     ir_read_bulk_callback,
26432 +       .owner =                THIS_MODULE,
26433 +       .name =                 "IR Dongle",
26434 +       .id_table =             id_table,
26435 +       .num_interrupt_in =     1,
26436 +       .num_bulk_in =          1,
26437 +       .num_bulk_out =         1,
26438 +       .num_ports =            1,
26439 +       .set_termios =          ir_set_termios,
26440 +       .startup =              ir_startup,
26441 +       .open =                 ir_open,
26442 +       .close =                ir_close,
26443 +       .write =                ir_write,
26444 +       .write_bulk_callback =  ir_write_bulk_callback,
26445 +       .read_bulk_callback =   ir_read_bulk_callback,
26446  };
26447  
26448  static inline void irda_usb_dump_class_desc(struct irda_class_desc *desc)
26449 @@ -160,7 +186,7 @@
26450         ret = usb_control_msg(dev, usb_rcvctrlpipe(dev,0),
26451                         IU_REQ_GET_CLASS_DESC,
26452                         USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
26453 -                       0, ifnum, desc, sizeof(*desc), MSECS_TO_JIFFIES(500));
26454 +                       0, ifnum, desc, sizeof(*desc), HZ);
26455         
26456         dbg("%s -  ret=%d", __FUNCTION__, ret);
26457         if (ret < sizeof(*desc)) {
26458 @@ -235,7 +261,7 @@
26459                 case 0x20: ir_add_bof =  2; break;
26460                 case 0x40: ir_add_bof =  1; break;
26461                 case 0x80: ir_add_bof =  0; break;
26462 -               default:
26463 +               default:;
26464         }
26465  
26466         kfree (irda_desc);
26467 @@ -254,53 +280,42 @@
26468         
26469         dbg("%s - port %d", __FUNCTION__, port->number);
26470  
26471 -       down (&port->sem);
26472 -       
26473 -       ++port->open_count;
26474 -       MOD_INC_USE_COUNT;
26475 -       
26476 -       if (!port->active) {
26477 -               port->active = 1;
26478 -
26479 -               if (buffer_size) {
26480 -                       /* override the default buffer sizes */
26481 -                       buffer = kmalloc (buffer_size, GFP_KERNEL);
26482 -                       if (!buffer) {
26483 -                               err ("%s - out of memory.", __FUNCTION__);
26484 -                               return -ENOMEM;
26485 -                       }
26486 -                       kfree (port->read_urb->transfer_buffer);
26487 -                       port->read_urb->transfer_buffer = buffer;
26488 -                       port->read_urb->transfer_buffer_length = buffer_size;
26489 -
26490 -                       buffer = kmalloc (buffer_size, GFP_KERNEL);
26491 -                       if (!buffer) {
26492 -                               err ("%s - out of memory.", __FUNCTION__);
26493 -                               return -ENOMEM;
26494 -                       }
26495 -                       kfree (port->write_urb->transfer_buffer);
26496 -                       port->write_urb->transfer_buffer = buffer;
26497 -                       port->write_urb->transfer_buffer_length = buffer_size;
26498 -                       port->bulk_out_size = buffer_size;
26499 +       if (buffer_size) {
26500 +               /* override the default buffer sizes */
26501 +               buffer = kmalloc (buffer_size, GFP_KERNEL);
26502 +               if (!buffer) {
26503 +                       err ("%s - out of memory.", __FUNCTION__);
26504 +                       return -ENOMEM;
26505                 }
26506 -
26507 -               /* Start reading from the device */
26508 -               usb_fill_bulk_urb (
26509 -                       port->read_urb,
26510 -                       serial->dev, 
26511 -                       usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
26512 -                       port->read_urb->transfer_buffer,
26513 -                       port->read_urb->transfer_buffer_length,
26514 -                       ir_read_bulk_callback,
26515 -                       port);
26516 -               port->read_urb->transfer_flags = USB_QUEUE_BULK;
26517 -               result = usb_submit_urb(port->read_urb);
26518 -               if (result)
26519 -                       err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
26520 +               kfree (port->read_urb->transfer_buffer);
26521 +               port->read_urb->transfer_buffer = buffer;
26522 +               port->read_urb->transfer_buffer_length = buffer_size;
26523 +
26524 +               buffer = kmalloc (buffer_size, GFP_KERNEL);
26525 +               if (!buffer) {
26526 +                       err ("%s - out of memory.", __FUNCTION__);
26527 +                       return -ENOMEM;
26528 +               }
26529 +               kfree (port->write_urb->transfer_buffer);
26530 +               port->write_urb->transfer_buffer = buffer;
26531 +               port->write_urb->transfer_buffer_length = buffer_size;
26532 +               port->bulk_out_size = buffer_size;
26533         }
26534 -       
26535 -       up (&port->sem);
26536 -       
26537 +
26538 +       /* Start reading from the device */
26539 +       usb_fill_bulk_urb (
26540 +               port->read_urb,
26541 +               serial->dev, 
26542 +               usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
26543 +               port->read_urb->transfer_buffer,
26544 +               port->read_urb->transfer_buffer_length,
26545 +               ir_read_bulk_callback,
26546 +               port);
26547 +       port->read_urb->transfer_flags = USB_QUEUE_BULK;
26548 +       result = usb_submit_urb(port->read_urb);
26549 +       if (result)
26550 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
26551 +
26552         return result;
26553  }
26554  
26555 @@ -317,21 +332,10 @@
26556         if (!serial)
26557                 return;
26558         
26559 -       down (&port->sem);
26560 -
26561 -       --port->open_count;
26562 -
26563 -       if (port->open_count <= 0) {
26564 -               if (serial->dev) {
26565 -                       /* shutdown our bulk read */
26566 -                       usb_unlink_urb (port->read_urb);
26567 -               }
26568 -               port->active = 0;
26569 -               port->open_count = 0;
26570 -
26571 +       if (serial->dev) {
26572 +               /* shutdown our bulk read */
26573 +               usb_unlink_urb (port->read_urb);
26574         }
26575 -       up (&port->sem);
26576 -       MOD_DEC_USE_COUNT;
26577  }
26578  
26579  static int ir_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count)
26580 @@ -442,7 +446,7 @@
26581                 return;
26582         }
26583  
26584 -       if (!port->active) {
26585 +       if (!port->open_count) {
26586                 dbg("%s - port closed.", __FUNCTION__);
26587                 return;
26588         }
26589 diff -Nur linux-2.4.19.old/drivers/usb/serial/keyspan.c linux-2.4.19/drivers/usb/serial/keyspan.c
26590 --- linux-2.4.19.old/drivers/usb/serial/keyspan.c       Fri Dec 21 18:41:55 2001
26591 +++ linux-2.4.19/drivers/usb/serial/keyspan.c   Mon Nov 25 12:27:08 2002
26592 @@ -1,8 +1,8 @@
26593  /*
26594    Keyspan USB to Serial Converter driver
26595   
26596 -  (C) Copyright (C) 2000-2001
26597 -      Hugh Blemings <hugh@misc.nu>
26598 +  (C) Copyright (C) 2000-2001  Hugh Blemings <hugh@blemings.org>
26599 +  (C) Copyright (C) 2002       Greg Kroah-Hartman <greg@kroah.com>
26600     
26601    This program is free software; you can redistribute it and/or modify
26602    it under the terms of the GNU General Public License as published by
26603 @@ -28,6 +28,17 @@
26604  
26605    Change History
26606  
26607 +    Wed Apr 25 12:00:00 PST 2002 (Keyspan)
26608 +      Started with Hugh Blemings' code dated Jan 17, 2002.  All adapters
26609 +      now supported (including QI and QW).  Modified port open, port
26610 +      close, and send setup() logic to fix various data and endpoint
26611 +      synchronization bugs and device LED status bugs.  Changed keyspan_
26612 +      write_room() to accurately return transmit buffer availability.
26613 +      Changed forwardingLength from 1 to 16 for all adapters.
26614 +
26615 +    Fri Oct 12 16:45:00 EST 2001
26616 +      Preliminary USA-19QI and USA-28 support (both test OK for me, YMMV)
26617 +
26618      Mon Oct  8 14:29:00 EST 2001 hugh
26619        Fixed bug that prevented mulitport devices operating correctly
26620        if they weren't the first unit attached.
26621 @@ -65,19 +76,15 @@
26622  
26623  #include <linux/config.h>
26624  #include <linux/kernel.h>
26625 -#include <linux/sched.h>
26626 -#include <linux/signal.h>
26627  #include <linux/errno.h>
26628 -#include <linux/poll.h>
26629  #include <linux/init.h>
26630  #include <linux/slab.h>
26631 -#include <linux/fcntl.h>
26632  #include <linux/tty.h>
26633  #include <linux/tty_driver.h>
26634  #include <linux/tty_flip.h>
26635  #include <linux/module.h>
26636  #include <linux/spinlock.h>
26637 -#include <linux/usb.h>
26638 +#include <asm/uaccess.h>
26639  
26640  #ifdef CONFIG_USB_SERIAL_DEBUG
26641         static int debug = 1;
26642 @@ -95,7 +102,7 @@
26643  /*
26644   * Version Information
26645   */
26646 -#define DRIVER_VERSION "v1.1.1"
26647 +#define DRIVER_VERSION "v1.1.3"
26648  #define DRIVER_AUTHOR "Hugh Blemings <hugh@misc.nu"
26649  #define DRIVER_DESC "Keyspan USB to Serial Converter Driver"
26650  
26651 @@ -107,13 +114,13 @@
26652         /* number of active ports */
26653         atomic_t        active_count;
26654  
26655 -       const keyspan_device_details    *device_details;
26656 +       const struct keyspan_device_details     *device_details;
26657  
26658 -       urb_t           *instat_urb;
26659 +       struct urb      *instat_urb;
26660         char            instat_buf[INSTAT_BUFLEN];
26661  
26662         /* XXX this one probably will need a lock */
26663 -       urb_t           *glocont_urb;
26664 +       struct urb      *glocont_urb;
26665         char            glocont_buf[GLOCONT_BUFLEN];
26666  };
26667  
26668 @@ -125,21 +132,21 @@
26669         /* Keep duplicate of device details in each port
26670            structure as well - simplifies some of the
26671            callback functions etc. */
26672 -       const keyspan_device_details    *device_details;
26673 +       const struct keyspan_device_details     *device_details;
26674  
26675         /* Input endpoints and buffer for this port */
26676 -       urb_t           *in_urbs[2];
26677 +       struct urb      *in_urbs[2];
26678         char            in_buffer[2][64];
26679         /* Output endpoints and buffer for this port */
26680 -       urb_t           *out_urbs[2];
26681 +       struct urb      *out_urbs[2];
26682         char            out_buffer[2][64];
26683  
26684         /* Input ack endpoint */
26685 -       urb_t           *inack_urb;
26686 +       struct urb      *inack_urb;
26687         char            inack_buffer[1];
26688  
26689         /* Output control endpoint */
26690 -       urb_t           *outcont_urb;
26691 +       struct urb      *outcont_urb;
26692         char            outcont_buffer[64];
26693  
26694         /* Settings for the port */
26695 @@ -167,34 +174,14 @@
26696  #include "keyspan_usa28msg.h"
26697  #include "keyspan_usa49msg.h"
26698         
26699 -/* If you don't get debugging output, uncomment the following
26700 -   two lines to enable cheat. */
26701 -#if 0
26702 -  #undef       dbg 
26703 -  #define      dbg     printk 
26704 -#endif
26705 -
26706  
26707  /* Functions used by new usb-serial code. */
26708  static int __init keyspan_init (void)
26709  {
26710 -       usb_serial_register (&keyspan_usa18x_pre_device);
26711 -       usb_serial_register (&keyspan_usa19_pre_device);
26712 -       usb_serial_register (&keyspan_usa19w_pre_device);
26713 -       usb_serial_register (&keyspan_usa28_pre_device);
26714 -       usb_serial_register (&keyspan_usa28x_pre_device);
26715 -       usb_serial_register (&keyspan_usa28xa_pre_device);
26716 -       usb_serial_register (&keyspan_usa28xb_pre_device);
26717 -       usb_serial_register (&keyspan_usa49w_pre_device);
26718 -
26719 -       usb_serial_register (&keyspan_usa18x_device);
26720 -       usb_serial_register (&keyspan_usa19_device);
26721 -       usb_serial_register (&keyspan_usa19w_device);
26722 -       usb_serial_register (&keyspan_usa28_device);
26723 -       usb_serial_register (&keyspan_usa28x_device);
26724 -       usb_serial_register (&keyspan_usa28xa_device);
26725 -       /* We don't need a separate entry for the usa28xb as it appears as a 28x anyway */
26726 -       usb_serial_register (&keyspan_usa49w_device);
26727 +       usb_serial_register (&keyspan_pre_device);
26728 +       usb_serial_register (&keyspan_1port_device);
26729 +       usb_serial_register (&keyspan_2port_device);
26730 +       usb_serial_register (&keyspan_4port_device);
26731  
26732         info(DRIVER_VERSION ":" DRIVER_DESC);
26733  
26734 @@ -203,23 +190,10 @@
26735  
26736  static void __exit keyspan_exit (void)
26737  {
26738 -       usb_serial_deregister (&keyspan_usa18x_pre_device);
26739 -       usb_serial_deregister (&keyspan_usa19_pre_device);
26740 -       usb_serial_deregister (&keyspan_usa19w_pre_device);
26741 -       usb_serial_deregister (&keyspan_usa28_pre_device);
26742 -       usb_serial_deregister (&keyspan_usa28x_pre_device);
26743 -       usb_serial_deregister (&keyspan_usa28xa_pre_device);
26744 -       usb_serial_deregister (&keyspan_usa28xb_pre_device);
26745 -       usb_serial_deregister (&keyspan_usa49w_pre_device);
26746 -
26747 -       usb_serial_deregister (&keyspan_usa18x_device);
26748 -       usb_serial_deregister (&keyspan_usa19_device);
26749 -       usb_serial_deregister (&keyspan_usa19w_device);
26750 -       usb_serial_deregister (&keyspan_usa28_device);
26751 -       usb_serial_deregister (&keyspan_usa28x_device);
26752 -       usb_serial_deregister (&keyspan_usa28xa_device);
26753 -       /* We don't need a separate entry for the usa28xb as it appears as a 28x anyway */
26754 -       usb_serial_deregister (&keyspan_usa49w_device);
26755 +       usb_serial_deregister (&keyspan_pre_device);
26756 +       usb_serial_deregister (&keyspan_1port_device);
26757 +       usb_serial_deregister (&keyspan_2port_device);
26758 +       usb_serial_deregister (&keyspan_4port_device);
26759  }
26760  
26761  module_init(keyspan_init);
26762 @@ -227,13 +201,13 @@
26763  
26764  static void keyspan_rx_throttle (struct usb_serial_port *port)
26765  {
26766 -       dbg("keyspan_rx_throttle port %d\n", port->number);
26767 +       dbg("%s - port %d", __FUNCTION__, port->number);
26768  }
26769  
26770  
26771  static void keyspan_rx_unthrottle (struct usb_serial_port *port)
26772  {
26773 -       dbg("keyspan_rx_unthrottle port %d\n", port->number);
26774 +       dbg("%s - port %d", __FUNCTION__, port->number);
26775  }
26776  
26777  
26778 @@ -241,7 +215,7 @@
26779  {
26780         struct keyspan_port_private     *p_priv;
26781  
26782 -       dbg("keyspan_break_ctl\n");
26783 +       dbg("%s", __FUNCTION__);
26784  
26785         p_priv = (struct keyspan_port_private *)port->private;
26786  
26787 @@ -257,16 +231,17 @@
26788  static void keyspan_set_termios (struct usb_serial_port *port, 
26789                                      struct termios *old_termios)
26790  {
26791 -       int                             baud_rate;
26792 +       int                             baud_rate, device_port;
26793         struct keyspan_port_private     *p_priv;
26794 -       const keyspan_device_details    *d_details;
26795 +       const struct keyspan_device_details     *d_details;
26796         unsigned int                    cflag;
26797  
26798 -       dbg(__FUNCTION__ ".\n"); 
26799 +       dbg("%s", __FUNCTION__); 
26800  
26801         p_priv = (struct keyspan_port_private *)(port->private);
26802         d_details = p_priv->device_details;
26803         cflag = port->tty->termios->c_cflag;
26804 +       device_port = port->number - port->serial->minor;
26805  
26806         /* Baud rate calculation takes baud rate as an integer
26807            so other rates can be generated if desired. */
26808 @@ -274,7 +249,7 @@
26809         /* If no match or invalid, don't change */              
26810         if (baud_rate >= 0
26811             && d_details->calculate_baud_rate(baud_rate, d_details->baudclk,
26812 -                               NULL, NULL, NULL) == KEYSPAN_BAUD_RATE_OK) {
26813 +                               NULL, NULL, NULL, device_port) == KEYSPAN_BAUD_RATE_OK) {
26814                 /* FIXME - more to do here to ensure rate changes cleanly */
26815                 p_priv->baud = baud_rate;
26816         }
26817 @@ -337,19 +312,17 @@
26818                          const unsigned char *buf, int count)
26819  {
26820         struct keyspan_port_private     *p_priv;
26821 -       const keyspan_device_details    *d_details;
26822 +       const struct keyspan_device_details     *d_details;
26823         int                             flip;
26824         int                             left, todo;
26825 -       urb_t                           *this_urb;
26826 +       struct urb                      *this_urb;
26827         int                             err;
26828  
26829         p_priv = (struct keyspan_port_private *)(port->private);
26830         d_details = p_priv->device_details;
26831  
26832 -#if 0
26833 -       dbg(__FUNCTION__ " for port %d (%d chars [%x]), flip=%d\n",
26834 -           port->number, count, buf[0], p_priv->out_flip);
26835 -#endif
26836 +       dbg("%s - for port %d (%d chars [%x]), flip=%d",
26837 +           __FUNCTION__, port->number, count, buf[0], p_priv->out_flip);
26838  
26839         for (left = count; left > 0; left -= todo) {
26840                 todo = left;
26841 @@ -361,11 +334,11 @@
26842                 /* Check we have a valid urb/endpoint before we use it... */
26843                 if ((this_urb = p_priv->out_urbs[flip]) == 0) {
26844                         /* no bulk out, so return 0 bytes written */
26845 -                       dbg(__FUNCTION__ " no output urb :(\n");
26846 +                       dbg("%s - no output urb :(", __FUNCTION__);
26847                         return count;
26848                 }
26849  
26850 -               dbg(__FUNCTION__ " endpoint %d\n", usb_pipeendpoint(this_urb->pipe));
26851 +               dbg("%s - endpoint %d flip %d", __FUNCTION__, usb_pipeendpoint(this_urb->pipe), flip);
26852  
26853                 if (this_urb->status == -EINPROGRESS) {
26854                         if (this_urb->transfer_flags & USB_ASYNC_UNLINK)
26855 @@ -395,7 +368,7 @@
26856                 this_urb->transfer_flags &= ~USB_ASYNC_UNLINK;
26857                 this_urb->dev = port->serial->dev;
26858                 if ((err = usb_submit_urb(this_urb)) != 0) {
26859 -                       dbg("usb_submit_urb(write bulk) failed (%d)\n", err);
26860 +                       dbg("usb_submit_urb(write bulk) failed (%d)", err);
26861                 }
26862                 p_priv->tx_start_time[flip] = jiffies;
26863  
26864 @@ -415,26 +388,28 @@
26865         struct tty_struct       *tty;
26866         unsigned char           *data = urb->transfer_buffer;
26867  
26868 -       dbg ("%s\n", __FUNCTION__); 
26869 +       dbg ("%s", __FUNCTION__); 
26870  
26871         endpoint = usb_pipeendpoint(urb->pipe);
26872  
26873         if (urb->status) {
26874 -               dbg(__FUNCTION__ "nonzero status: %x on endpoint %d.\n",
26875 -                                       urb->status, endpoint);
26876 +               dbg("%s - nonzero status: %x on endpoint %d.",
26877 +                   __FUNCTION__, urb->status, endpoint);
26878                 return;
26879         }
26880  
26881         port = (struct usb_serial_port *) urb->context;
26882         tty = port->tty;
26883         if (urb->actual_length) {
26884 -               if (data[0] == 0) {
26885 +               /* 0x80 bit is error flag */
26886 +               if ((data[0] & 0x80) == 0) {
26887                         /* no error on any byte */
26888                         for (i = 1; i < urb->actual_length ; ++i) {
26889                                 tty_insert_flip_char(tty, data[i], 0);
26890                         }
26891                 } else {
26892                         /* some bytes had errors, every byte has status */
26893 +                       dbg("%s - RX error!!!!", __FUNCTION__);
26894                         for (i = 0; i + 1 < urb->actual_length; i += 2) {
26895                                 int stat = data[i], flag = 0;
26896                                 if (stat & RXERROR_OVERRUN)
26897 @@ -452,9 +427,10 @@
26898                                 
26899                 /* Resubmit urb so we continue receiving */
26900         urb->dev = port->serial->dev;
26901 -       if ((err = usb_submit_urb(urb)) != 0) {
26902 -               dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
26903 -       }
26904 +       if (port->open_count)
26905 +               if ((err = usb_submit_urb(urb)) != 0) {
26906 +                       dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
26907 +               }
26908         return;
26909  }
26910  
26911 @@ -466,9 +442,9 @@
26912  
26913         port = (struct usb_serial_port *) urb->context;
26914         p_priv = (struct keyspan_port_private *)(port->private);
26915 -       dbg (__FUNCTION__ " urb %d\n", urb == p_priv->out_urbs[1]); 
26916 +       dbg ("%s - urb %d", __FUNCTION__, urb == p_priv->out_urbs[1]); 
26917  
26918 -       if (port->active) {
26919 +       if (port->open_count) {
26920                 queue_task(&port->tqueue, &tq_immediate);
26921                 mark_bh(IMMEDIATE_BH);
26922         }
26923 @@ -476,7 +452,7 @@
26924  
26925  static void    usa26_inack_callback(struct urb *urb)
26926  {
26927 -       dbg ("%s\n", __FUNCTION__); 
26928 +       dbg ("%s", __FUNCTION__); 
26929         
26930  }
26931  
26932 @@ -489,15 +465,15 @@
26933         p_priv = (struct keyspan_port_private *)(port->private);
26934  
26935         if (p_priv->resend_cont) {
26936 -               dbg (__FUNCTION__ " sending setup\n"); 
26937 -               keyspan_usa26_send_setup(port->serial, port, 0);
26938 +               dbg ("%s - sending setup", __FUNCTION__); 
26939 +               keyspan_usa26_send_setup(port->serial, port, p_priv->resend_cont - 1);
26940         }
26941  }
26942  
26943  static void    usa26_instat_callback(struct urb *urb)
26944  {
26945         unsigned char                           *data = urb->transfer_buffer;
26946 -       keyspan_usa26_portStatusMessage         *msg;
26947 +       struct keyspan_usa26_portStatusMessage  *msg;
26948         struct usb_serial                       *serial;
26949         struct usb_serial_port                  *port;
26950         struct keyspan_port_private             *p_priv;
26951 @@ -506,19 +482,19 @@
26952         serial = (struct usb_serial *) urb->context;
26953  
26954         if (urb->status) {
26955 -               dbg(__FUNCTION__ " nonzero status: %x\n", urb->status);
26956 +               dbg("%s - nonzero status: %x", __FUNCTION__, urb->status);
26957                 return;
26958         }
26959         if (urb->actual_length != 9) {
26960 -               dbg(__FUNCTION__ " %d byte report??\n", urb->actual_length);
26961 +               dbg("%s - %d byte report??", __FUNCTION__, urb->actual_length);
26962                 goto exit;
26963         }
26964  
26965 -       msg = (keyspan_usa26_portStatusMessage *)data;
26966 +       msg = (struct keyspan_usa26_portStatusMessage *)data;
26967  
26968  #if 0
26969 -       dbg(__FUNCTION__ " port status: port %d cts %d dcd %d dsr %d ri %d toff %d txoff %d rxen %d cr %d\n",
26970 -           msg->port, msg->hskia_cts, msg->gpia_dcd, msg->dsr, msg->ri, msg->_txOff,
26971 +       dbg("%s - port status: port %d cts %d dcd %d dsr %d ri %d toff %d txoff %d rxen %d cr %d",
26972 +           __FUNCTION__, msg->port, msg->hskia_cts, msg->gpia_dcd, msg->dsr, msg->ri, msg->_txOff,
26973             msg->_txXoff, msg->rxEnabled, msg->controlResponse);
26974  #endif
26975  
26976 @@ -527,7 +503,7 @@
26977  
26978         /* Check port number from message and retrieve private data */  
26979         if (msg->port >= serial->num_ports) {
26980 -               dbg ("Unexpected port number %d\n", msg->port);
26981 +               dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->port);
26982                 goto exit;
26983         }
26984         port = &serial->port[msg->port];
26985 @@ -548,17 +524,17 @@
26986                 /*      wake_up_interruptible(&p_priv->open_wait); */
26987         }
26988         
26989 -exit:
26990         /* Resubmit urb so we continue receiving */
26991         urb->dev = serial->dev;
26992         if ((err = usb_submit_urb(urb)) != 0) {
26993 -               dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
26994 +               dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
26995         }
26996 +exit:
26997  }
26998  
26999  static void    usa26_glocont_callback(struct urb *urb)
27000  {
27001 -       dbg ("%s\n", __FUNCTION__);
27002 +       dbg ("%s", __FUNCTION__);
27003         
27004  }
27005  
27006 @@ -571,7 +547,7 @@
27007         unsigned char           *data;
27008         struct keyspan_port_private             *p_priv;
27009  
27010 -       dbg ("%s\n", __FUNCTION__);
27011 +       dbg ("%s", __FUNCTION__);
27012  
27013         port = (struct usb_serial_port *) urb->context;
27014         p_priv = (struct keyspan_port_private *)(port->private);
27015 @@ -582,9 +558,8 @@
27016  
27017         do {
27018                 if (urb->status) {
27019 -                       dbg(__FUNCTION__ "nonzero status: %x on endpoint
27020 -%d.\n",
27021 -                           urb->status, usb_pipeendpoint(urb->pipe));
27022 +                       dbg("%s - nonzero status: %x on endpoint %d.",
27023 +                           __FUNCTION__, urb->status, usb_pipeendpoint(urb->pipe));
27024                         return;
27025                 }
27026  
27027 @@ -602,10 +577,10 @@
27028  
27029                 /* Resubmit urb so we continue receiving */
27030                 urb->dev = port->serial->dev;
27031 -               if ((err = usb_submit_urb(urb)) != 0) {
27032 -                       dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n",
27033 -err);
27034 -               }
27035 +               if (port->open_count)
27036 +                       if ((err = usb_submit_urb(urb)) != 0) {
27037 +                               dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
27038 +                       }
27039                 p_priv->in_flip ^= 1;
27040  
27041                 urb = p_priv->in_urbs[p_priv->in_flip];
27042 @@ -614,7 +589,7 @@
27043  
27044  static void    usa28_inack_callback(struct urb *urb)
27045  {
27046 -       dbg ("%s\n", __FUNCTION__);
27047 +       dbg ("%s", __FUNCTION__);
27048  }
27049  
27050  static void    usa28_outcont_callback(struct urb *urb)
27051 @@ -626,8 +601,8 @@
27052         p_priv = (struct keyspan_port_private *)(port->private);
27053  
27054         if (p_priv->resend_cont) {
27055 -               dbg (__FUNCTION__ " sending setup\n");
27056 -               keyspan_usa28_send_setup(port->serial, port, 0);
27057 +               dbg ("%s - sending setup", __FUNCTION__);
27058 +               keyspan_usa28_send_setup(port->serial, port, p_priv->resend_cont - 1);
27059         }
27060  }
27061  
27062 @@ -635,7 +610,7 @@
27063  {
27064         int                                     err;
27065         unsigned char                           *data = urb->transfer_buffer;
27066 -       keyspan_usa28_portStatusMessage         *msg;
27067 +       struct keyspan_usa28_portStatusMessage  *msg;
27068         struct usb_serial                       *serial;
27069         struct usb_serial_port                  *port;
27070         struct keyspan_port_private             *p_priv;
27071 @@ -644,26 +619,26 @@
27072         serial = (struct usb_serial *) urb->context;
27073  
27074         if (urb->status) {
27075 -               dbg(__FUNCTION__ " nonzero status: %x\n", urb->status);
27076 +               dbg("%s - nonzero status: %x", __FUNCTION__, urb->status);
27077                 return;
27078         }
27079  
27080         if (urb->actual_length != sizeof(struct keyspan_usa28_portStatusMessage)) {
27081 -               dbg(__FUNCTION__ " bad length %d\n", urb->actual_length);
27082 +               dbg("%s - bad length %d", __FUNCTION__, urb->actual_length);
27083                 goto exit;
27084         }
27085  
27086 -       /*dbg(__FUNCTION__ " %x %x %x %x %x %x %x %x %x %x %x %x\n",
27087 +       /*dbg("%s %x %x %x %x %x %x %x %x %x %x %x %x", __FUNCTION__
27088             data[0], data[1], data[2], data[3], data[4], data[5],
27089             data[6], data[7], data[8], data[9], data[10], data[11]);*/
27090         
27091                 /* Now do something useful with the data */
27092 -       msg = (keyspan_usa28_portStatusMessage *)data;
27093 +       msg = (struct keyspan_usa28_portStatusMessage *)data;
27094  
27095  
27096                 /* Check port number from message and retrieve private data */  
27097         if (msg->port >= serial->num_ports) {
27098 -               dbg ("Unexpected port number %d\n", msg->port);
27099 +               dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->port);
27100                 goto exit;
27101         }
27102         port = &serial->port[msg->port];
27103 @@ -684,17 +659,17 @@
27104                 /*      wake_up_interruptible(&p_priv->open_wait); */
27105         }
27106  
27107 -exit:  
27108                 /* Resubmit urb so we continue receiving */
27109         urb->dev = serial->dev;
27110         if ((err = usb_submit_urb(urb)) != 0) {
27111 -               dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
27112 +               dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
27113         }
27114 +exit:  
27115  }
27116  
27117  static void    usa28_glocont_callback(struct urb *urb)
27118  {
27119 -       dbg ("%s\n", __FUNCTION__);
27120 +       dbg ("%s", __FUNCTION__);
27121  }
27122  
27123  
27124 @@ -705,7 +680,7 @@
27125         struct keyspan_port_private *p_priv;
27126         int i;
27127  
27128 -       dbg ("%s\n", __FUNCTION__);
27129 +       dbg ("%s", __FUNCTION__);
27130  
27131         serial = (struct usb_serial *) urb->context;
27132         for (i = 0; i < serial->num_ports; ++i) {
27133 @@ -713,8 +688,8 @@
27134                 p_priv = (struct keyspan_port_private *)(port->private);
27135  
27136                 if (p_priv->resend_cont) {
27137 -                       dbg (__FUNCTION__ " sending setup\n"); 
27138 -                       keyspan_usa49_send_setup(serial, port, 0);
27139 +                       dbg ("%s - sending setup", __FUNCTION__); 
27140 +                       keyspan_usa49_send_setup(serial, port, p_priv->resend_cont - 1);
27141                         break;
27142                 }
27143         }
27144 @@ -726,36 +701,36 @@
27145  {
27146         int                                     err;
27147         unsigned char                           *data = urb->transfer_buffer;
27148 -       keyspan_usa49_portStatusMessage         *msg;
27149 +       struct keyspan_usa49_portStatusMessage  *msg;
27150         struct usb_serial                       *serial;
27151         struct usb_serial_port                  *port;
27152         struct keyspan_port_private             *p_priv;
27153         int old_dcd_state;
27154  
27155 -       dbg ("%s\n", __FUNCTION__);
27156 +       dbg ("%s", __FUNCTION__);
27157  
27158         serial = (struct usb_serial *) urb->context;
27159  
27160         if (urb->status) {
27161 -               dbg(__FUNCTION__ " nonzero status: %x\n", urb->status);
27162 +               dbg("%s - nonzero status: %x", __FUNCTION__, urb->status);
27163                 return;
27164         }
27165  
27166         if (urb->actual_length != sizeof(struct keyspan_usa49_portStatusMessage)) {
27167 -               dbg(__FUNCTION__ " bad length %d\n", urb->actual_length);
27168 +               dbg("%s - bad length %d", __FUNCTION__, urb->actual_length);
27169                 goto exit;
27170         }
27171  
27172 -       /*dbg(__FUNCTION__ " %x %x %x %x %x %x %x %x %x %x %x\n",
27173 +       /*dbg(" %x %x %x %x %x %x %x %x %x %x %x", __FUNCTION__, 
27174             data[0], data[1], data[2], data[3], data[4], data[5],
27175             data[6], data[7], data[8], data[9], data[10]);*/
27176         
27177                 /* Now do something useful with the data */
27178 -       msg = (keyspan_usa49_portStatusMessage *)data;
27179 +       msg = (struct keyspan_usa49_portStatusMessage *)data;
27180  
27181                 /* Check port number from message and retrieve private data */  
27182         if (msg->portNumber >= serial->num_ports) {
27183 -               dbg ("Unexpected port number %d\n", msg->portNumber);
27184 +               dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->portNumber);
27185                 goto exit;
27186         }
27187         port = &serial->port[msg->portNumber];
27188 @@ -776,18 +751,18 @@
27189                 /*      wake_up_interruptible(&p_priv->open_wait); */
27190         }
27191  
27192 -exit:  
27193                 /* Resubmit urb so we continue receiving */
27194         urb->dev = serial->dev;
27195  
27196         if ((err = usb_submit_urb(urb)) != 0) {
27197 -               dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
27198 +               dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
27199         }
27200 +exit:  
27201  }
27202  
27203  static void    usa49_inack_callback(struct urb *urb)
27204  {
27205 -       dbg ("%s\n", __FUNCTION__);
27206 +       dbg ("%s", __FUNCTION__);
27207  }
27208  
27209  static void    usa49_indat_callback(struct urb *urb)
27210 @@ -798,20 +773,21 @@
27211         struct tty_struct       *tty;
27212         unsigned char           *data = urb->transfer_buffer;
27213  
27214 -       dbg ("%s\n", __FUNCTION__);
27215 +       dbg ("%s", __FUNCTION__);
27216  
27217         endpoint = usb_pipeendpoint(urb->pipe);
27218  
27219         if (urb->status) {
27220 -               dbg(__FUNCTION__ "nonzero status: %x on endpoint %d.\n",
27221 -                                       urb->status, endpoint);
27222 +               dbg("%s - nonzero status: %x on endpoint %d.", __FUNCTION__,
27223 +                   urb->status, endpoint);
27224                 return;
27225         }
27226  
27227         port = (struct usb_serial_port *) urb->context;
27228         tty = port->tty;
27229         if (urb->actual_length) {
27230 -               if (data[0] == 0) {
27231 +               /* 0x80 bit is error flag */
27232 +               if ((data[0] & 0x80) == 0) {
27233                         /* no error on any byte */
27234                         for (i = 1; i < urb->actual_length ; ++i) {
27235                                 tty_insert_flip_char(tty, data[i], 0);
27236 @@ -835,24 +811,43 @@
27237                                 
27238                 /* Resubmit urb so we continue receiving */
27239         urb->dev = port->serial->dev;
27240 -       if ((err = usb_submit_urb(urb)) != 0) {
27241 -               dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
27242 -       }
27243 +       if (port->open_count)
27244 +               if ((err = usb_submit_urb(urb)) != 0) {
27245 +                       dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
27246 +               }
27247  }
27248  
27249  /* not used, usa-49 doesn't have per-port control endpoints */
27250  static void    usa49_outcont_callback(struct urb *urb)
27251  {
27252 -       dbg ("%s\n", __FUNCTION__);
27253 +       dbg ("%s", __FUNCTION__);
27254  }
27255  
27256  
27257  
27258  static int keyspan_write_room (struct usb_serial_port *port)
27259  {
27260 -       dbg("keyspan_write_room called\n");
27261 -       return (32);
27262 +       struct keyspan_port_private     *p_priv;
27263 +       const struct keyspan_device_details     *d_details;
27264 +       int                             flip;
27265 +       struct urb                      *this_urb;
27266  
27267 +       dbg("%s", __FUNCTION__);
27268 +       p_priv = (struct keyspan_port_private *)(port->private);
27269 +       d_details = p_priv->device_details;
27270 +
27271 +       flip = p_priv->out_flip;
27272 +
27273 +       /* Check both endpoints to see if any are available. */
27274 +       if ((this_urb = p_priv->out_urbs[flip]) != 0) {
27275 +               if (this_urb->status != -EINPROGRESS)
27276 +                       return (63);
27277 +               flip = (flip + 1) & d_details->outdat_endp_flip;        
27278 +               if ((this_urb = p_priv->out_urbs[flip]) != 0) 
27279 +                       if (this_urb->status != -EINPROGRESS)
27280 +                               return (63);
27281 +       }
27282 +       return (0);
27283  }
27284  
27285  
27286 @@ -867,26 +862,15 @@
27287         struct keyspan_port_private     *p_priv;
27288         struct keyspan_serial_private   *s_priv;
27289         struct usb_serial               *serial = port->serial;
27290 -       const keyspan_device_details    *d_details;
27291 -       int                             i, already_active, err;
27292 -       urb_t *urb;
27293 +       const struct keyspan_device_details     *d_details;
27294 +       int                             i, err;
27295 +       struct urb                      *urb;
27296  
27297         s_priv = (struct keyspan_serial_private *)(serial->private);
27298         p_priv = (struct keyspan_port_private *)(port->private);
27299         d_details = s_priv->device_details;
27300         
27301 -       dbg("keyspan_open called for port%d.\n", port->number); 
27302 -
27303 -       MOD_INC_USE_COUNT;
27304 -
27305 -       down (&port->sem);
27306 -       ++port->open_count;
27307 -       already_active = port->active;
27308 -       port->active = 1;
27309 -       up (&port->sem);
27310 -
27311 -       if (already_active)
27312 -               return 0;
27313 +       dbg("%s - port%d.", __FUNCTION__, port->number); 
27314  
27315         p_priv = (struct keyspan_port_private *)(port->private);
27316         
27317 @@ -894,22 +878,37 @@
27318         p_priv->rts_state = 1;
27319         p_priv->dtr_state = 1;
27320  
27321 -       /* Start reading from endpoints */
27322 +       p_priv->out_flip = 0;
27323 +       p_priv->in_flip = 0;
27324 +
27325 +       /* Reset low level data toggle and start reading from endpoints */
27326         for (i = 0; i < 2; i++) {
27327                 if ((urb = p_priv->in_urbs[i]) == NULL)
27328                         continue;
27329                 urb->dev = serial->dev;
27330 +               usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe), 0);
27331 +
27332                 if ((err = usb_submit_urb(urb)) != 0) {
27333 -                       dbg(__FUNCTION__ " submit urb %d failed (%d)\n", i, err);
27334 +                       dbg("%s - submit urb %d failed (%d)", __FUNCTION__, i, err);
27335                 }
27336         }
27337  
27338 +       /* Reset low level data toggle on out endpoints */
27339 +       for (i = 0; i < 2; i++) {
27340 +               if ((urb = p_priv->out_urbs[i]) == NULL)
27341 +                       continue;
27342 +               urb->dev = serial->dev;
27343 +               /* usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe), 0); */
27344 +       }
27345 +
27346 +       keyspan_send_setup(port, 1);
27347 +       //mdelay(100);
27348         keyspan_set_termios(port, NULL);
27349  
27350         return (0);
27351  }
27352  
27353 -static inline void stop_urb(urb_t *urb)
27354 +static inline void stop_urb(struct urb *urb)
27355  {
27356         if (urb && urb->status == -EINPROGRESS) {
27357                 urb->transfer_flags &= ~USB_ASYNC_UNLINK;
27358 @@ -928,44 +927,37 @@
27359         if (!serial)
27360                 return;
27361  
27362 -       dbg("keyspan_close called\n");
27363 +       dbg("%s", __FUNCTION__);
27364         s_priv = (struct keyspan_serial_private *)(serial->private);
27365         p_priv = (struct keyspan_port_private *)(port->private);
27366         
27367         p_priv->rts_state = 0;
27368         p_priv->dtr_state = 0;
27369         
27370 -       if (serial->dev)
27371 -               keyspan_send_setup(port, 1);
27372 +       if (serial->dev) {
27373 +               keyspan_send_setup(port, 2);
27374 +               /* pilot-xfer seems to work best with this delay */
27375 +               mdelay(100);
27376 +               keyspan_set_termios(port, NULL);
27377 +       }
27378  
27379         /*while (p_priv->outcont_urb->status == -EINPROGRESS) {
27380 -               dbg("close - urb in progress\n");
27381 +               dbg("%s - urb in progress", __FUNCTION__);
27382         }*/
27383  
27384         p_priv->out_flip = 0;
27385         p_priv->in_flip = 0;
27386  
27387 -       down (&port->sem);
27388 -
27389 -       if (--port->open_count <= 0) {
27390 -               if (port->active) {
27391 -                       if (serial->dev) {
27392 -                               /* Stop reading/writing urbs */
27393 -                               stop_urb(p_priv->inack_urb);
27394 -                               stop_urb(p_priv->outcont_urb);
27395 -                               for (i = 0; i < 2; i++) {
27396 -                                       stop_urb(p_priv->in_urbs[i]);
27397 -                                       stop_urb(p_priv->out_urbs[i]);
27398 -                               }
27399 -                       }
27400 +       if (serial->dev) {
27401 +               /* Stop reading/writing urbs */
27402 +               stop_urb(p_priv->inack_urb);
27403 +               /* stop_urb(p_priv->outcont_urb); */
27404 +               for (i = 0; i < 2; i++) {
27405 +                       stop_urb(p_priv->in_urbs[i]);
27406 +                       stop_urb(p_priv->out_urbs[i]);
27407                 }
27408 -               port->active = 0;
27409 -               port->open_count = 0;
27410 -               port->tty = 0;
27411         }
27412 -       up (&port->sem);
27413 -
27414 -       MOD_DEC_USE_COUNT;
27415 +       port->tty = 0;
27416  }
27417  
27418  
27419 @@ -976,12 +968,12 @@
27420         const struct ezusb_hex_record   *record;
27421         char                            *fw_name;
27422  
27423 -       dbg("Keyspan startup version %04x product %04x\n",
27424 +       dbg("Keyspan startup version %04x product %04x",
27425             serial->dev->descriptor.bcdDevice,
27426             serial->dev->descriptor.idProduct); 
27427         
27428         if ((serial->dev->descriptor.bcdDevice & 0x8000) != 0x8000) {
27429 -               dbg("Firmware already loaded.  Quitting.\n");
27430 +               dbg("Firmware already loaded.  Quitting.");
27431                 return(1);
27432         }
27433  
27434 @@ -1012,6 +1004,16 @@
27435                 fw_name = "USA19";
27436                 break;
27437                              
27438 +       case keyspan_usa19qi_pre_product_id:
27439 +               record = &keyspan_usa19qi_firmware[0];
27440 +               fw_name = "USA19QI";
27441 +               break;
27442 +                            
27443 +       case keyspan_usa19qw_pre_product_id:
27444 +               record = &keyspan_usa19qw_firmware[0];
27445 +               fw_name = "USA19QI";
27446 +               break;
27447 +                            
27448         case keyspan_usa18x_pre_product_id:
27449                 record = &keyspan_usa18x_firmware[0];
27450                 fw_name = "USA18X";
27451 @@ -1038,7 +1040,7 @@
27452                 return(1);
27453         }
27454  
27455 -       dbg("Uploading Keyspan %s firmware.\n", fw_name);
27456 +       dbg("Uploading Keyspan %s firmware.", fw_name);
27457  
27458                 /* download the firmware image */
27459         response = ezusb_set_reset(serial, 1);
27460 @@ -1065,19 +1067,19 @@
27461  }
27462  
27463  /* Helper functions used by keyspan_setup_urbs */
27464 -static urb_t *keyspan_setup_urb(struct usb_serial *serial, int endpoint,
27465 -                               int dir, void *ctx, char *buf, int len,
27466 -                               void (*callback)(urb_t *))
27467 +static struct urb *keyspan_setup_urb (struct usb_serial *serial, int endpoint,
27468 +                                     int dir, void *ctx, char *buf, int len,
27469 +                                     void (*callback)(struct urb *))
27470  {
27471 -       urb_t *urb;
27472 +       struct urb *urb;
27473  
27474         if (endpoint == -1)
27475                 return NULL;            /* endpoint not needed */
27476  
27477 -       dbg (__FUNCTION__ " alloc for endpoint %d.\n", endpoint);
27478 +       dbg ("%s - alloc for endpoint %d.", __FUNCTION__, endpoint);
27479         urb = usb_alloc_urb(0);         /* No ISO */
27480         if (urb == NULL) {
27481 -               dbg (__FUNCTION__ " alloc for endpoint %d failed.\n", endpoint);
27482 +               dbg ("%s - alloc for endpoint %d failed.", __FUNCTION__, endpoint);
27483                 return NULL;
27484         }
27485  
27486 @@ -1090,37 +1092,37 @@
27487  }
27488  
27489  static struct callbacks {
27490 -       void    (*instat_callback)(urb_t *);
27491 -       void    (*glocont_callback)(urb_t *);
27492 -       void    (*indat_callback)(urb_t *);
27493 -       void    (*outdat_callback)(urb_t *);
27494 -       void    (*inack_callback)(urb_t *);
27495 -       void    (*outcont_callback)(urb_t *);
27496 +       void    (*instat_callback)(struct urb *);
27497 +       void    (*glocont_callback)(struct urb *);
27498 +       void    (*indat_callback)(struct urb *);
27499 +       void    (*outdat_callback)(struct urb *);
27500 +       void    (*inack_callback)(struct urb *);
27501 +       void    (*outcont_callback)(struct urb *);
27502  } keyspan_callbacks[] = {
27503         {
27504                 /* msg_usa26 callbacks */
27505 -               instat_callback: usa26_instat_callback,
27506 -               glocont_callback: usa26_glocont_callback,
27507 -               indat_callback: usa26_indat_callback,
27508 -               outdat_callback: usa2x_outdat_callback,
27509 -               inack_callback: usa26_inack_callback,
27510 -               outcont_callback: usa26_outcont_callback,
27511 +               .instat_callback =      usa26_instat_callback,
27512 +               .glocont_callback =     usa26_glocont_callback,
27513 +               .indat_callback =       usa26_indat_callback,
27514 +               .outdat_callback =      usa2x_outdat_callback,
27515 +               .inack_callback =       usa26_inack_callback,
27516 +               .outcont_callback =     usa26_outcont_callback,
27517         }, {
27518                 /* msg_usa28 callbacks */
27519 -               instat_callback: usa28_instat_callback,
27520 -               glocont_callback: usa28_glocont_callback,
27521 -               indat_callback: usa28_indat_callback,
27522 -               outdat_callback: usa2x_outdat_callback,
27523 -               inack_callback: usa28_inack_callback,
27524 -               outcont_callback: usa28_outcont_callback,
27525 +               .instat_callback =      usa28_instat_callback,
27526 +               .glocont_callback =     usa28_glocont_callback,
27527 +               .indat_callback =       usa28_indat_callback,
27528 +               .outdat_callback =      usa2x_outdat_callback,
27529 +               .inack_callback =       usa28_inack_callback,
27530 +               .outcont_callback =     usa28_outcont_callback,
27531         }, {
27532                 /* msg_usa49 callbacks */
27533 -               instat_callback: usa49_instat_callback,
27534 -               glocont_callback: usa49_glocont_callback,
27535 -               indat_callback: usa49_indat_callback,
27536 -               outdat_callback: usa2x_outdat_callback,
27537 -               inack_callback: usa49_inack_callback,
27538 -               outcont_callback: usa49_outcont_callback,
27539 +               .instat_callback =      usa49_instat_callback,
27540 +               .glocont_callback =     usa49_glocont_callback,
27541 +               .indat_callback =       usa49_indat_callback,
27542 +               .outdat_callback =      usa2x_outdat_callback,
27543 +               .inack_callback =       usa49_inack_callback,
27544 +               .outcont_callback =     usa49_outcont_callback,
27545         }
27546  };
27547  
27548 @@ -1130,13 +1132,13 @@
27549  {
27550         int                             i, j;
27551         struct keyspan_serial_private   *s_priv;
27552 -       const keyspan_device_details    *d_details;
27553 +       const struct keyspan_device_details     *d_details;
27554         struct usb_serial_port          *port;
27555         struct keyspan_port_private     *p_priv;
27556         struct callbacks                *cback;
27557         int                             endp;
27558  
27559 -       dbg ("%s\n", __FUNCTION__);
27560 +       dbg ("%s", __FUNCTION__);
27561  
27562         s_priv = (struct keyspan_serial_private *)(serial->private);
27563         d_details = s_priv->device_details;
27564 @@ -1198,13 +1200,14 @@
27565  }
27566  
27567  /* usa19 function doesn't require prescaler */
27568 -static int keyspan_usa19_calc_baud(u32 baud_rate, u32 baudclk,
27569 -                                  u8 *rate_hi, u8 *rate_low, u8 *prescaler)
27570 +static int keyspan_usa19_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
27571 +                                  u8 *rate_low, u8 *prescaler, int portnum)
27572  {
27573         u32     b16,    /* baud rate times 16 (actual rate used internally) */
27574                 div,    /* divisor */   
27575                 cnt;    /* inverse of divisor (programmed into 8051) */
27576                 
27577 +       dbg ("%s - %d.", __FUNCTION__, baud_rate);
27578  
27579                 /* prevent divide by zero...  */
27580         if( (b16 = (baud_rate * 16L)) == 0) {
27581 @@ -1237,14 +1240,14 @@
27582                 *rate_hi = (u8) ((cnt >> 8) & 0xff);
27583         }
27584         if (rate_low && rate_hi) {
27585 -               dbg (__FUNCTION__ " %d %02x %02x.", baud_rate, *rate_hi, *rate_low);
27586 +               dbg ("%s - %d %02x %02x.", __FUNCTION__, baud_rate, *rate_hi, *rate_low);
27587         }
27588         
27589         return (KEYSPAN_BAUD_RATE_OK);
27590  }
27591  
27592 -static int keyspan_usa19w_calc_baud(u32 baud_rate, u32 baudclk,
27593 -                                   u8 *rate_hi, u8 *rate_low, u8 *prescaler)
27594 +static int keyspan_usa19w_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
27595 +                                   u8 *rate_low, u8 *prescaler, int portnum)
27596  {
27597         u32     b16,    /* baud rate times 16 (actual rate used internally) */
27598                 clk,    /* clock with 13/8 prescaler */
27599 @@ -1255,7 +1258,7 @@
27600         u8      best_prescaler;
27601         int     i;
27602  
27603 -       dbg (__FUNCTION__ " %d.\n", baud_rate);
27604 +       dbg ("%s - %d.", __FUNCTION__, baud_rate);
27605  
27606                 /* prevent divide by zero */
27607         if( (b16 = baud_rate * 16L) == 0) {
27608 @@ -1271,8 +1274,7 @@
27609                 /* 0 is an invalid prescaler, used as a flag */
27610         best_prescaler = 0;
27611  
27612 -       for(i = 8; i <= 0xff; ++i)
27613 -       {
27614 +       for(i = 8; i <= 0xff; ++i) {
27615                 clk = (baudclk * 8) / (u32) i;
27616                 
27617                 if( (div = clk / b16) == 0) {
27618 @@ -1282,8 +1284,7 @@
27619                 res = clk / div;
27620                 diff= (res > b16) ? (res-b16) : (b16-res);
27621  
27622 -               if(diff < smallest_diff)
27623 -               {
27624 +               if(diff < smallest_diff) {
27625                         best_prescaler = i;
27626                         smallest_diff = diff;
27627                 }
27628 @@ -1305,8 +1306,59 @@
27629         }
27630         if (prescaler) {
27631                 *prescaler = best_prescaler;
27632 -               /*  dbg(__FUNCTION__ " %d %d", *prescaler, div); */
27633 +               /*  dbg("%s - %d %d", __FUNCTION__, *prescaler, div); */
27634 +       }
27635 +       return (KEYSPAN_BAUD_RATE_OK);
27636 +}
27637 +
27638 +       /* USA-28 supports different maximum baud rates on each port */
27639 +static int keyspan_usa28_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
27640 +                                   u8 *rate_low, u8 *prescaler, int portnum)
27641 +{
27642 +       u32     b16,    /* baud rate times 16 (actual rate used internally) */
27643 +               div,    /* divisor */   
27644 +               cnt;    /* inverse of divisor (programmed into 8051) */
27645 +
27646 +       dbg ("%s - %d.", __FUNCTION__, baud_rate);
27647 +
27648 +               /* prevent divide by zero */
27649 +       if ((b16 = baud_rate * 16L) == 0)
27650 +               return (KEYSPAN_INVALID_BAUD_RATE);
27651 +
27652 +               /* calculate the divisor and the counter (its inverse) */
27653 +       if ((div = (KEYSPAN_USA28_BAUDCLK / b16)) == 0) {
27654 +               return (KEYSPAN_INVALID_BAUD_RATE);
27655 +       }
27656 +       else {
27657 +               cnt = 0 - div;
27658 +       }
27659 +
27660 +               /* check for out of range, based on portnum, 
27661 +                  and return result */
27662 +       if(portnum == 0) {
27663 +               if(div > 0xffff)
27664 +                       return (KEYSPAN_INVALID_BAUD_RATE);
27665 +       }
27666 +       else {
27667 +               if(portnum == 1) {
27668 +                       if(div > 0xff) {
27669 +                               return (KEYSPAN_INVALID_BAUD_RATE);
27670 +                       }
27671 +               }
27672 +               else {
27673 +                       return (KEYSPAN_INVALID_BAUD_RATE);
27674 +               }
27675 +       }
27676 +
27677 +               /* return the counter values if not NULL
27678 +                  (port 1 will ignore retHi) */
27679 +       if (rate_low) {
27680 +               *rate_low = (u8) (cnt & 0xff);
27681 +       }
27682 +       if (rate_hi) {
27683 +               *rate_hi = (u8) ((cnt >> 8) & 0xff);
27684         }
27685 +       dbg ("%s - %d OK.", __FUNCTION__, baud_rate);
27686         return (KEYSPAN_BAUD_RATE_OK);
27687  }
27688  
27689 @@ -1317,31 +1369,35 @@
27690         struct keyspan_usa26_portControlMessage msg;            
27691         struct keyspan_serial_private           *s_priv;
27692         struct keyspan_port_private             *p_priv;
27693 -       const  keyspan_device_details           *d_details;
27694 +       const struct keyspan_device_details     *d_details;
27695         int                                     outcont_urb;
27696 -       urb_t *this_urb;
27697 -       int err;
27698 +       struct urb                              *this_urb;
27699 +       int                                     device_port, err;
27700  
27701 -       dbg ("%s reset=%d\n", __FUNCTION__, reset_port); 
27702 +       dbg ("%s reset=%d", __FUNCTION__, reset_port); 
27703  
27704         s_priv = (struct keyspan_serial_private *)(serial->private);
27705         p_priv = (struct keyspan_port_private *)(port->private);
27706         d_details = s_priv->device_details;
27707 +       device_port = port->number - port->serial->minor;
27708  
27709         outcont_urb = d_details->outcont_endpoints[port->number];
27710         this_urb = p_priv->outcont_urb;
27711  
27712 -       dbg(__FUNCTION__ " endpoint %d\n", usb_pipeendpoint(this_urb->pipe));
27713 +       dbg("%s - endpoint %d", __FUNCTION__, usb_pipeendpoint(this_urb->pipe));
27714  
27715                 /* Make sure we have an urb then send the message */
27716         if (this_urb == NULL) {
27717 -               dbg(__FUNCTION__ " oops no urb.\n");
27718 +               dbg("%s - oops no urb.", __FUNCTION__);
27719                 return -1;
27720         }
27721  
27722 -       p_priv->resend_cont = 1;
27723 +       /* Save reset port val for resend.
27724 +       Don't overwrite resend for close condition. */
27725 +       if (p_priv->resend_cont != 3)
27726 +               p_priv->resend_cont = reset_port + 1;
27727         if (this_urb->status == -EINPROGRESS) {
27728 -               /*  dbg (__FUNCTION__ " already writing"); */
27729 +               /*  dbg ("%s - already writing", __FUNCTION__); */
27730                 return(-1);
27731         }
27732  
27733 @@ -1353,8 +1409,8 @@
27734                 msg.setClocking = 0xff;
27735                 if (d_details->calculate_baud_rate
27736                     (p_priv->baud, d_details->baudclk, &msg.baudHi,
27737 -                    &msg.baudLo, &msg.prescaler) == KEYSPAN_INVALID_BAUD_RATE ) {
27738 -                       dbg(__FUNCTION__ "Invalid baud rate %d requested, using 9600.\n",
27739 +                    &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
27740 +                       dbg("%s - Invalid baud rate %d requested, using 9600.", __FUNCTION__,
27741                             p_priv->baud);
27742                         msg.baudLo = 0;
27743                         msg.baudHi = 125;       /* Values for 9600 baud */
27744 @@ -1388,12 +1444,26 @@
27745         msg.ctsFlowControl = (p_priv->flow_control == flow_cts);
27746         msg.xonFlowControl = 0;
27747         msg.setFlowControl = 0xff;
27748 -       
27749 -       msg.forwardingLength = 1;
27750 +       msg.forwardingLength = 16;
27751         msg.xonChar = 17;
27752         msg.xoffChar = 19;
27753  
27754 -       if (reset_port) {
27755 +       /* Opening port */
27756 +       if (reset_port == 1) {
27757 +               msg._txOn = 1;
27758 +               msg._txOff = 0;
27759 +               msg.txFlush = 0;
27760 +               msg.txBreak = 0;
27761 +               msg.rxOn = 1;
27762 +               msg.rxOff = 0;
27763 +               msg.rxFlush = 1;
27764 +               msg.rxForward = 0;
27765 +               msg.returnStatus = 0;
27766 +               msg.resetDataToggle = 0xff;
27767 +       }
27768 +
27769 +       /* Closing port */
27770 +       else if (reset_port == 2) {
27771                 msg._txOn = 0;
27772                 msg._txOff = 1;
27773                 msg.txFlush = 0;
27774 @@ -1403,14 +1473,16 @@
27775                 msg.rxFlush = 1;
27776                 msg.rxForward = 0;
27777                 msg.returnStatus = 0;
27778 -               msg.resetDataToggle = 0xff;
27779 +               msg.resetDataToggle = 0;
27780         }
27781 +
27782 +       /* Sending intermediate configs */
27783         else {
27784                 msg._txOn = (! p_priv->break_on);
27785                 msg._txOff = 0;
27786                 msg.txFlush = 0;
27787                 msg.txBreak = (p_priv->break_on);
27788 -               msg.rxOn = 1;
27789 +               msg.rxOn = 0;
27790                 msg.rxOff = 0;
27791                 msg.rxFlush = 0;
27792                 msg.rxForward = 0;
27793 @@ -1433,11 +1505,11 @@
27794  
27795         this_urb->dev = serial->dev;
27796         if ((err = usb_submit_urb(this_urb)) != 0) {
27797 -               dbg(__FUNCTION__ " usb_submit_urb(setup) failed (%d)\n", err);
27798 +               dbg("%s - usb_submit_urb(setup) failed (%d)", __FUNCTION__, err);
27799         }
27800  #if 0
27801         else {
27802 -               dbg(__FUNCTION__ " usb_submit_urb(%d) OK %d bytes (end %d)",
27803 +               dbg("%s - usb_submit_urb(%d) OK %d bytes (end %d)", __FUNCTION__
27804                     outcont_urb, this_urb->transfer_buffer_length,
27805                     usb_pipeendpoint(this_urb->pipe));
27806         }
27807 @@ -1453,32 +1525,38 @@
27808         struct keyspan_usa28_portControlMessage msg;            
27809         struct keyspan_serial_private           *s_priv;
27810         struct keyspan_port_private             *p_priv;
27811 -       const  keyspan_device_details           *d_details;
27812 -       urb_t *this_urb;
27813 -       int err;
27814 +       const struct keyspan_device_details     *d_details;
27815 +       struct urb                              *this_urb;
27816 +       int                                     device_port, err;
27817 +
27818 +       dbg ("%s", __FUNCTION__);
27819  
27820         s_priv = (struct keyspan_serial_private *)(serial->private);
27821         p_priv = (struct keyspan_port_private *)(port->private);
27822         d_details = s_priv->device_details;
27823 +       device_port = port->number - port->serial->minor;
27824  
27825         /* only do something if we have a bulk out endpoint */
27826         if ((this_urb = p_priv->outcont_urb) == NULL) {
27827 -               dbg(__FUNCTION__ " oops no urb.\n");
27828 +               dbg("%s - oops no urb.", __FUNCTION__);
27829                 return -1;
27830         }
27831  
27832 -       p_priv->resend_cont = 1;
27833 +       /* Save reset port val for resend.
27834 +          Don't overwrite resend for close condition. */
27835 +       if (p_priv->resend_cont != 3)
27836 +               p_priv->resend_cont = reset_port + 1;
27837         if (this_urb->status == -EINPROGRESS) {
27838 -               dbg (__FUNCTION__ " already writing\n");
27839 +               dbg ("%s already writing", __FUNCTION__);
27840                 return(-1);
27841         }
27842  
27843         memset(&msg, 0, sizeof (struct keyspan_usa28_portControlMessage));
27844  
27845         msg.setBaudRate = 1;
27846 -       if (keyspan_usa19_calc_baud(p_priv->baud, d_details->baudclk,
27847 -               &msg.baudHi, &msg.baudLo, NULL) == KEYSPAN_INVALID_BAUD_RATE ) {
27848 -               dbg(__FUNCTION__ "Invalid baud rate requested %d.", p_priv->baud);
27849 +       if (d_details->calculate_baud_rate(p_priv->baud, d_details->baudclk,
27850 +               &msg.baudHi, &msg.baudLo, NULL, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
27851 +               dbg("%s - Invalid baud rate requested %d.", __FUNCTION__, p_priv->baud);
27852                 msg.baudLo = 0xff;
27853                 msg.baudHi = 0xb2;      /* Values for 9600 baud */
27854         }
27855 @@ -1493,23 +1571,56 @@
27856         msg.rts = p_priv->rts_state;
27857         msg.dtr = p_priv->dtr_state;
27858  
27859 -       msg.forwardingLength = 1;
27860 +       msg.forwardingLength = 16;
27861         msg.forwardMs = 10;
27862         msg.breakThreshold = 45;
27863         msg.xonChar = 17;
27864         msg.xoffChar = 19;
27865  
27866 -       msg._txOn = 1;
27867 -       msg._txOff = 0;
27868 -       msg.txFlush = 0;
27869 -       msg.txForceXoff = 0;
27870 -       msg.txBreak = 0;
27871 -       msg.rxOn = 1;
27872 -       msg.rxOff = 0;
27873 -       msg.rxFlush = 0;
27874 -       msg.rxForward = 0;
27875         /*msg.returnStatus = 1;
27876         msg.resetDataToggle = 0xff;*/
27877 +       /* Opening port */
27878 +       if (reset_port == 1) {
27879 +               msg._txOn = 1;
27880 +               msg._txOff = 0;
27881 +               msg.txFlush = 0;
27882 +               msg.txForceXoff = 0;
27883 +               msg.txBreak = 0;
27884 +               msg.rxOn = 1;
27885 +               msg.rxOff = 0;
27886 +               msg.rxFlush = 1;
27887 +               msg.rxForward = 0;
27888 +               msg.returnStatus = 0;
27889 +               msg.resetDataToggle = 0xff;
27890 +       }
27891 +       /* Closing port */
27892 +       else if (reset_port == 2) {
27893 +               msg._txOn = 0;
27894 +               msg._txOff = 1;
27895 +               msg.txFlush = 0;
27896 +               msg.txForceXoff = 0;
27897 +               msg.txBreak = 0;
27898 +               msg.rxOn = 0;
27899 +               msg.rxOff = 1;
27900 +               msg.rxFlush = 1;
27901 +               msg.rxForward = 0;
27902 +               msg.returnStatus = 0;
27903 +               msg.resetDataToggle = 0;
27904 +       }
27905 +       /* Sending intermediate configs */
27906 +       else {
27907 +               msg._txOn = (! p_priv->break_on);
27908 +               msg._txOff = 0;
27909 +               msg.txFlush = 0;
27910 +               msg.txForceXoff = 0;
27911 +               msg.txBreak = (p_priv->break_on);
27912 +               msg.rxOn = 0;
27913 +               msg.rxOff = 0;
27914 +               msg.rxFlush = 0;
27915 +               msg.rxForward = 0;
27916 +               msg.returnStatus = 0;
27917 +               msg.resetDataToggle = 0x0;
27918 +       }
27919  
27920         p_priv->resend_cont = 0;
27921         memcpy (this_urb->transfer_buffer, &msg, sizeof(msg));
27922 @@ -1519,11 +1630,11 @@
27923  
27924         this_urb->dev = serial->dev;
27925         if ((err = usb_submit_urb(this_urb)) != 0) {
27926 -               dbg(__FUNCTION__ " usb_submit_urb(setup) failed\n");
27927 +               dbg("%s - usb_submit_urb(setup) failed", __FUNCTION__);
27928         }
27929  #if 0
27930         else {
27931 -               dbg(__FUNCTION__ " usb_submit_urb(setup) OK %d bytes",
27932 +               dbg("%s - usb_submit_urb(setup) OK %d bytes", __FUNCTION__,
27933                     this_urb->transfer_buffer_length);
27934         }
27935  #endif
27936 @@ -1538,13 +1649,12 @@
27937         struct keyspan_usa49_portControlMessage msg;            
27938         struct keyspan_serial_private           *s_priv;
27939         struct keyspan_port_private             *p_priv;
27940 -       const  keyspan_device_details           *d_details;
27941 +       const struct keyspan_device_details     *d_details;
27942         int                                     glocont_urb;
27943 -       urb_t                                   *this_urb;
27944 -       int                                     err;
27945 -       int                                     device_port;
27946 +       struct urb                              *this_urb;
27947 +       int                                     err, device_port;
27948  
27949 -       dbg ("%s\n", __FUNCTION__);
27950 +       dbg ("%s", __FUNCTION__);
27951  
27952         s_priv = (struct keyspan_serial_private *)(serial->private);
27953         p_priv = (struct keyspan_port_private *)(port->private);
27954 @@ -1556,17 +1666,20 @@
27955                 /* Work out which port within the device is being setup */
27956         device_port = port->number - port->serial->minor;
27957  
27958 -       dbg(__FUNCTION__ " endpoint %d port %d (%d)\n", usb_pipeendpoint(this_urb->pipe), port->number, device_port);
27959 +       dbg("%s - endpoint %d port %d (%d)",__FUNCTION__, usb_pipeendpoint(this_urb->pipe), port->number, device_port);
27960  
27961                 /* Make sure we have an urb then send the message */
27962         if (this_urb == NULL) {
27963 -               dbg(__FUNCTION__ " oops no urb for port %d.\n", port->number);
27964 +               dbg("%s - oops no urb for port %d.", __FUNCTION__, port->number);
27965                 return -1;
27966         }
27967  
27968 -       p_priv->resend_cont = 1;
27969 +       /* Save reset port val for resend.
27970 +          Don't overwrite resend for close condition. */
27971 +       if (p_priv->resend_cont != 3)
27972 +               p_priv->resend_cont = reset_port + 1;
27973         if (this_urb->status == -EINPROGRESS) {
27974 -               /*  dbg (__FUNCTION__ " already writing"); */
27975 +               /*  dbg ("%s - already writing", __FUNCTION__); */
27976                 return(-1);
27977         }
27978  
27979 @@ -1581,8 +1694,8 @@
27980                 msg.setClocking = 0xff;
27981                 if (d_details->calculate_baud_rate
27982                     (p_priv->baud, d_details->baudclk, &msg.baudHi,
27983 -                    &msg.baudLo, &msg.prescaler) == KEYSPAN_INVALID_BAUD_RATE ) {
27984 -                       dbg(__FUNCTION__ "Invalid baud rate %d requested, using 9600.\n",
27985 +                    &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
27986 +                       dbg("%s - Invalid baud rate %d requested, using 9600.", __FUNCTION__,
27987                             p_priv->baud);
27988                         msg.baudLo = 0;
27989                         msg.baudHi = 125;       /* Values for 9600 baud */
27990 @@ -1617,20 +1730,55 @@
27991         msg.xonFlowControl = 0;
27992         msg.setFlowControl = 0xff;
27993         
27994 -       msg.forwardingLength = 1;
27995 +       msg.forwardingLength = 16;
27996         msg.xonChar = 17;
27997         msg.xoffChar = 19;
27998 -       
27999 -       msg._txOn = 1;
28000 -       msg._txOff = 0;
28001 -       msg.txFlush = 0;
28002 -       msg.txBreak = 0;
28003 -       msg.rxOn = 1;
28004 -       msg.rxOff = 0;
28005 -       msg.rxFlush = 0;
28006 -       msg.rxForward = 0;
28007 -       msg.enablePort = 0xff;
28008 -       msg.disablePort = 0;
28009 +
28010 +       /* Opening port */ 
28011 +       if (reset_port == 1) {
28012 +               msg._txOn = 1;
28013 +               msg._txOff = 0;
28014 +               msg.txFlush = 0;
28015 +               msg.txBreak = 0;
28016 +               msg.rxOn = 1;
28017 +               msg.rxOff = 0;
28018 +               msg.rxFlush = 1;
28019 +               msg.rxForward = 0;
28020 +               msg.returnStatus = 0;
28021 +               msg.resetDataToggle = 0xff;
28022 +               msg.enablePort = 1;
28023 +               msg.disablePort = 0;
28024 +       }
28025 +       /* Closing port */
28026 +       else if (reset_port == 2) {
28027 +               msg._txOn = 0;
28028 +               msg._txOff = 1;
28029 +               msg.txFlush = 0;
28030 +               msg.txBreak = 0;
28031 +               msg.rxOn = 0;
28032 +               msg.rxOff = 1;
28033 +               msg.rxFlush = 1;
28034 +               msg.rxForward = 0;
28035 +               msg.returnStatus = 0;
28036 +               msg.resetDataToggle = 0;
28037 +               msg.enablePort = 0;
28038 +               msg.disablePort = 1;
28039 +       }
28040 +       /* Sending intermediate configs */
28041 +       else {
28042 +               msg._txOn = (! p_priv->break_on);
28043 +               msg._txOff = 0;
28044 +               msg.txFlush = 0;
28045 +               msg.txBreak = (p_priv->break_on);
28046 +               msg.rxOn = 0;
28047 +               msg.rxOff = 0;
28048 +               msg.rxFlush = 0;
28049 +               msg.rxForward = 0;
28050 +               msg.returnStatus = 0;
28051 +               msg.resetDataToggle = 0x0;
28052 +               msg.enablePort = 0;
28053 +               msg.disablePort = 0;
28054 +       }
28055  
28056                 /* Do handshaking outputs */    
28057         msg.setRts = 0xff;
28058 @@ -1647,11 +1795,11 @@
28059  
28060         this_urb->dev = serial->dev;
28061         if ((err = usb_submit_urb(this_urb)) != 0) {
28062 -               dbg(__FUNCTION__ " usb_submit_urb(setup) failed (%d)\n", err);
28063 +               dbg("%s - usb_submit_urb(setup) failed (%d)", __FUNCTION__, err);
28064         }
28065  #if 0
28066         else {
28067 -               dbg(__FUNCTION__ " usb_submit_urb(%d) OK %d bytes (end %d)",
28068 +               dbg("%s - usb_submit_urb(%d) OK %d bytes (end %d)", __FUNCTION__,
28069                     outcont_urb, this_urb->transfer_buffer_length,
28070                     usb_pipeendpoint(this_urb->pipe));
28071         }
28072 @@ -1663,8 +1811,10 @@
28073  static void keyspan_send_setup(struct usb_serial_port *port, int reset_port)
28074  {
28075         struct usb_serial *serial = port->serial;
28076 -       struct keyspan_serial_private   *s_priv;
28077 -       const keyspan_device_details    *d_details;
28078 +       struct keyspan_serial_private *s_priv;
28079 +       const struct keyspan_device_details *d_details;
28080 +
28081 +       dbg ("%s", __FUNCTION__);
28082  
28083         s_priv = (struct keyspan_serial_private *)(serial->private);
28084         d_details = s_priv->device_details;
28085 @@ -1690,16 +1840,15 @@
28086         struct usb_serial_port          *port;
28087         struct keyspan_serial_private   *s_priv;
28088         struct keyspan_port_private     *p_priv;
28089 -       const keyspan_device_details    *d_details;
28090 +       const struct keyspan_device_details     *d_details;
28091  
28092 -       dbg("keyspan_startup called.\n");
28093 +       dbg("%s", __FUNCTION__);
28094  
28095         for (i = 0; (d_details = keyspan_devices[i]) != NULL; ++i)
28096                 if (d_details->product_id == serial->dev->descriptor.idProduct)
28097                         break;
28098         if (d_details == NULL) {
28099 -               printk(KERN_ERR __FUNCTION__ ": unknown product id %x\n",
28100 -                      serial->dev->descriptor.idProduct);
28101 +               err("%s - unknown product id %x", __FUNCTION__, serial->dev->descriptor.idProduct);
28102                 return 1;
28103         }
28104  
28105 @@ -1707,7 +1856,7 @@
28106         serial->private = kmalloc(sizeof(struct keyspan_serial_private),
28107                                   GFP_KERNEL);
28108         if (!serial->private) {
28109 -               dbg(__FUNCTION__ "kmalloc for keyspan_serial_private failed.\n");
28110 +               dbg("%s - kmalloc for keyspan_serial_private failed.", __FUNCTION__);
28111                 return (1);
28112         }
28113         memset(serial->private, 0, sizeof(struct keyspan_serial_private));
28114 @@ -1721,7 +1870,7 @@
28115                 port->private = kmalloc(sizeof(struct keyspan_port_private),
28116                                         GFP_KERNEL);
28117                 if (!port->private) {
28118 -                       dbg(__FUNCTION__ "kmalloc for keyspan_port_private (%d) failed!.\n", i);
28119 +                       dbg("%s - kmalloc for keyspan_port_private (%d) failed!.", __FUNCTION__, i);
28120                         return (1);
28121                 }
28122                 memset(port->private, 0, sizeof(struct keyspan_port_private));
28123 @@ -1733,7 +1882,7 @@
28124  
28125         s_priv->instat_urb->dev = serial->dev;
28126         if ((err = usb_submit_urb(s_priv->instat_urb)) != 0) {
28127 -               dbg(__FUNCTION__ " submit instat urb failed %d\n", err);
28128 +               dbg("%s - submit instat urb failed %d", __FUNCTION__, err);
28129         }
28130                         
28131         return (0);
28132 @@ -1746,7 +1895,7 @@
28133         struct keyspan_serial_private   *s_priv;
28134         struct keyspan_port_private     *p_priv;
28135  
28136 -       dbg("keyspan_shutdown called\n");
28137 +       dbg("%s", __FUNCTION__);
28138  
28139         s_priv = (struct keyspan_serial_private *)(serial->private);
28140  
28141 @@ -1791,10 +1940,6 @@
28142         /* Now free per port private data */
28143         for (i = 0; i < serial->num_ports; i++) {
28144                 port = &serial->port[i];
28145 -               while (port->open_count > 0) {
28146 -                       --port->open_count;
28147 -                       MOD_DEC_USE_COUNT;
28148 -               }
28149                 kfree(port->private);
28150         }
28151  }
28152 diff -Nur linux-2.4.19.old/drivers/usb/serial/keyspan.h linux-2.4.19/drivers/usb/serial/keyspan.h
28153 --- linux-2.4.19.old/drivers/usb/serial/keyspan.h       Fri Dec 21 18:41:55 2001
28154 +++ linux-2.4.19/drivers/usb/serial/keyspan.h   Mon Nov 25 12:27:09 2002
28155 @@ -2,7 +2,7 @@
28156    Keyspan USB to Serial Converter driver
28157   
28158    (C) Copyright (C) 2000-2001
28159 -      Hugh Blemings <hugh@misc.nu>
28160 +      Hugh Blemings <hugh@blemings.org>
28161     
28162    This program is free software; you can redistribute it and/or modify
28163    it under the terms of the GNU General Public License as published by
28164 @@ -33,9 +33,8 @@
28165  #ifndef __LINUX_USB_SERIAL_KEYSPAN_H
28166  #define __LINUX_USB_SERIAL_KEYSPAN_H
28167  
28168 -#include <linux/config.h>
28169  
28170 -       /* Function prototypes for Keyspan serial converter */
28171 +/* Function prototypes for Keyspan serial converter */
28172  static int  keyspan_open               (struct usb_serial_port *port,
28173                                          struct file *filp);
28174  static void keyspan_close              (struct usb_serial_port *port,
28175 @@ -54,12 +53,7 @@
28176  static void keyspan_send_setup         (struct usb_serial_port *port,
28177                                          int reset_port);
28178  
28179 -#if 0
28180 -static void keyspan_write_bulk_callback (struct urb *urb);
28181 -#endif
28182  
28183 -//static void keyspan_usa26_read_int_callback  (struct urb *urb);
28184 -//static void keyspan_usa28_read_int_callback  (struct urb *urb);
28185  static int  keyspan_chars_in_buffer    (struct usb_serial_port *port);
28186  static int  keyspan_ioctl              (struct usb_serial_port *port,
28187                                          struct file *file,
28188 @@ -72,12 +66,16 @@
28189  static int  keyspan_fake_startup       (struct usb_serial *serial);
28190  
28191  static int  keyspan_usa19_calc_baud    (u32 baud_rate, u32 baudclk, 
28192 -                                        u8 *rate_hi, u8 *rate_low, u8 *prescaler);
28193 +                                        u8 *rate_hi, u8 *rate_low,
28194 +                                        u8 *prescaler, int portnum);
28195  
28196  static int  keyspan_usa19w_calc_baud   (u32 baud_rate, u32 baudclk,
28197 -                                        u8 *rate_hi, u8 *rate_low, u8 *prescaler);
28198 +                                        u8 *rate_hi, u8 *rate_low,
28199 +                                        u8 *prescaler, int portnum);
28200  
28201 -//static void keyspan_usa19_setup_urbs (struct usb_serial *serial);
28202 +static int  keyspan_usa28_calc_baud    (u32 baud_rate, u32 baudclk,
28203 +                                        u8 *rate_hi, u8 *rate_low,
28204 +                                        u8 *prescaler, int portnum);
28205  
28206  static int  keyspan_usa28_send_setup   (struct usb_serial *serial,
28207                                          struct usb_serial_port *port,
28208 @@ -89,91 +87,102 @@
28209                                          struct usb_serial_port *port,
28210                                          int reset_port);
28211  
28212 -       /* Functions from usbserial.c for ezusb firmware handling */
28213 -extern int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit);
28214 -extern int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *data, int length, __u8 bRequest);
28215  
28216 -       /* Struct used for firmware - increased size of data section
28217 -          to allow Keyspan's 'C' firmware struct to be used unmodified */
28218 +/* Struct used for firmware - increased size of data section
28219 +   to allow Keyspan's 'C' firmware struct to be used unmodified */
28220  struct ezusb_hex_record {
28221         __u16 address;
28222         __u8 data_size;
28223         __u8 data[64];
28224  };
28225 -       /* Conditionally include firmware images, if they aren't
28226 -          included create a null pointer instead.  Current 
28227 -          firmware images aren't optimised to remove duplicate
28228 -          addresses in the image itself. */
28229 +
28230 +/* Conditionally include firmware images, if they aren't
28231 +   included create a null pointer instead.  Current 
28232 +   firmware images aren't optimised to remove duplicate
28233 +   addresses in the image itself. */
28234  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA28
28235 -        #include "keyspan_usa28_fw.h"
28236 +       #include "keyspan_usa28_fw.h"
28237  #else
28238         static const struct ezusb_hex_record *keyspan_usa28_firmware = NULL;
28239  #endif
28240  
28241  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA28X
28242 -        #include "keyspan_usa28x_fw.h"
28243 +       #include "keyspan_usa28x_fw.h"
28244  #else
28245         static const struct ezusb_hex_record *keyspan_usa28x_firmware = NULL;
28246  #endif
28247  
28248  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA28XA
28249 -        #include "keyspan_usa28xa_fw.h"
28250 +       #include "keyspan_usa28xa_fw.h"
28251  #else
28252         static const struct ezusb_hex_record *keyspan_usa28xa_firmware = NULL;
28253  #endif
28254  
28255  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA28XB
28256 -        #include "keyspan_usa28xb_fw.h"
28257 +       #include "keyspan_usa28xb_fw.h"
28258  #else
28259         static const struct ezusb_hex_record *keyspan_usa28xb_firmware = NULL;
28260  #endif
28261  
28262  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA19
28263 -        #include "keyspan_usa19_fw.h"
28264 +       #include "keyspan_usa19_fw.h"
28265  #else
28266         static const struct ezusb_hex_record *keyspan_usa19_firmware = NULL;
28267  #endif
28268  
28269 +#ifdef CONFIG_USB_SERIAL_KEYSPAN_USA19QI
28270 +       #include "keyspan_usa19qi_fw.h"
28271 +#else
28272 +       static const struct ezusb_hex_record *keyspan_usa19qi_firmware = NULL;
28273 +#endif
28274 +
28275 +#ifdef CONFIG_USB_SERIAL_KEYSPAN_USA19QW
28276 +       #include "keyspan_usa19qw_fw.h"
28277 +#else
28278 +       static const struct ezusb_hex_record *keyspan_usa19qw_firmware = NULL;
28279 +#endif
28280 +
28281  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA18X
28282 -        #include "keyspan_usa18x_fw.h"
28283 +       #include "keyspan_usa18x_fw.h"
28284  #else
28285         static const struct ezusb_hex_record *keyspan_usa18x_firmware = NULL;
28286  #endif
28287  
28288  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA19W
28289 -        #include "keyspan_usa19w_fw.h"
28290 +       #include "keyspan_usa19w_fw.h"
28291  #else
28292         static const struct ezusb_hex_record *keyspan_usa19w_firmware = NULL;
28293  #endif
28294  
28295  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA49W
28296 -        #include "keyspan_usa49w_fw.h"
28297 +       #include "keyspan_usa49w_fw.h"
28298  #else
28299         static const struct ezusb_hex_record *keyspan_usa49w_firmware = NULL;
28300  #endif
28301 -       
28302 -       /* Values used for baud rate calculation - device specific */
28303 +
28304 +/* Values used for baud rate calculation - device specific */
28305  #define        KEYSPAN_INVALID_BAUD_RATE               (-1)
28306  #define        KEYSPAN_BAUD_RATE_OK                    (0)
28307  #define        KEYSPAN_USA18X_BAUDCLK                  (12000000L)     /* a guess */
28308  #define        KEYSPAN_USA19_BAUDCLK                   (12000000L)
28309  #define        KEYSPAN_USA19W_BAUDCLK                  (24000000L)
28310 +#define        KEYSPAN_USA28_BAUDCLK                   (1843200L)
28311  #define        KEYSPAN_USA28X_BAUDCLK                  (12000000L)
28312  #define        KEYSPAN_USA49W_BAUDCLK                  (48000000L)
28313  
28314 -       /* Some constants used to characterise each device. 
28315 -          There is a four port device due later in the year,
28316 -          we allow for it now in the following */
28317 +/* Some constants used to characterise each device.  */
28318  #define                KEYSPAN_MAX_NUM_PORTS           (4)
28319  #define                KEYSPAN_MAX_FLIPS               (2)
28320 -       
28321 -       /* Device info for the Keyspan serial converter, used
28322 -          by the overall usb-serial probe function */
28323 +
28324 +/* Device info for the Keyspan serial converter, used
28325 +   by the overall usb-serial probe function */
28326  #define KEYSPAN_VENDOR_ID                      (0x06cd)
28327  
28328 -       /* Product IDs for the eight products supported, pre-renumeration */
28329 +/* Product IDs for the products supported, pre-renumeration */
28330  #define        keyspan_usa18x_pre_product_id           0x0105
28331  #define        keyspan_usa19_pre_product_id            0x0103
28332 +#define        keyspan_usa19qi_pre_product_id          0x010b
28333 +#define        keyspan_usa19qw_pre_product_id          0x0118
28334  #define        keyspan_usa19w_pre_product_id           0x0106
28335  #define        keyspan_usa28_pre_product_id            0x0101
28336  #define        keyspan_usa28x_pre_product_id           0x0102
28337 @@ -181,11 +190,13 @@
28338  #define        keyspan_usa28xb_pre_product_id          0x0113
28339  #define        keyspan_usa49w_pre_product_id           0x0109
28340  
28341 -       /* Product IDs post-renumeration.  Note that the 28x and 28xb
28342 -          have the same id's post-renumeration but behave identically
28343 -          so it's not an issue. */
28344 +/* Product IDs post-renumeration.  Note that the 28x and 28xb
28345 +   have the same id's post-renumeration but behave identically
28346 +   so it's not an issue. */
28347  #define        keyspan_usa18x_product_id               0x0112
28348  #define        keyspan_usa19_product_id                0x0107
28349 +#define        keyspan_usa19qi_product_id              0x010c
28350 +#define        keyspan_usa19qw_product_id              0x0119
28351  #define        keyspan_usa19w_product_id               0x0108
28352  #define        keyspan_usa28_product_id                0x010f
28353  #define        keyspan_usa28x_product_id               0x0110
28354 @@ -194,10 +205,10 @@
28355  #define        keyspan_usa49w_product_id               0x010a
28356  
28357  
28358 -typedef struct {
28359 +struct keyspan_device_details {
28360         /* product ID value */
28361         int     product_id;
28362 -       
28363 +
28364         enum    {msg_usa26, msg_usa28, msg_usa49} msg_format;
28365  
28366                 /* Number of physical ports */
28367 @@ -219,137 +230,190 @@
28368                 /* Input acknowledge endpoints */
28369         int     inack_endpoints[KEYSPAN_MAX_NUM_PORTS];
28370  
28371 -               /* Output control endpoints */  
28372 +               /* Output control endpoints */
28373         int     outcont_endpoints[KEYSPAN_MAX_NUM_PORTS];
28374  
28375                 /* Endpoint used for input status */
28376         int     instat_endpoint;
28377  
28378                 /* Endpoint used for global control functions */
28379 -       int     glocont_endpoint;       
28380 -       
28381 +       int     glocont_endpoint;
28382 +
28383         int     (*calculate_baud_rate) (u32 baud_rate, u32 baudclk,
28384 -                       u8 *rate_hi, u8 *rate_low, u8 *prescaler);
28385 +                       u8 *rate_hi, u8 *rate_low, u8 *prescaler, int portnum);
28386         u32     baudclk;
28387 +}; 
28388 +
28389 +/* Now for each device type we setup the device detail
28390 +   structure with the appropriate information (provided
28391 +   in Keyspan's documentation) */
28392 +
28393 +static const struct keyspan_device_details usa18x_device_details = {
28394 +       product_id:             keyspan_usa18x_product_id,
28395 +       msg_format:             msg_usa26,
28396 +       num_ports:              1,
28397 +       indat_endp_flip:        0,
28398 +       outdat_endp_flip:       1,
28399 +       indat_endpoints:        {0x81},
28400 +       outdat_endpoints:       {0x01},
28401 +       inack_endpoints:        {0x85},
28402 +       outcont_endpoints:      {0x05},
28403 +       instat_endpoint:        0x87,
28404 +       glocont_endpoint:       0x07,
28405 +       calculate_baud_rate:    keyspan_usa19w_calc_baud,
28406 +       baudclk:                KEYSPAN_USA18X_BAUDCLK,
28407 +};
28408 +
28409 +static const struct keyspan_device_details usa19_device_details = {
28410 +       product_id:             keyspan_usa19_product_id,
28411 +       msg_format:             msg_usa28,
28412 +       num_ports:              1,
28413 +       indat_endp_flip:        1,
28414 +       outdat_endp_flip:       1,
28415 +       indat_endpoints:        {0x81},
28416 +       outdat_endpoints:       {0x01},
28417 +       inack_endpoints:        {0x83},
28418 +       outcont_endpoints:      {0x03},
28419 +       instat_endpoint:        0x84,
28420 +       glocont_endpoint:       -1,
28421 +       calculate_baud_rate:    keyspan_usa19_calc_baud,
28422 +       baudclk:                KEYSPAN_USA19_BAUDCLK,
28423 +};
28424 +
28425 +static const struct keyspan_device_details usa19qi_device_details = {
28426 +       product_id:             keyspan_usa19qi_product_id,
28427 +       msg_format:             msg_usa28,
28428 +       num_ports:              1,
28429 +       indat_endp_flip:        1,
28430 +       outdat_endp_flip:       1,
28431 +       indat_endpoints:        {0x81},
28432 +       outdat_endpoints:       {0x01},
28433 +       inack_endpoints:        {0x83},
28434 +       outcont_endpoints:      {0x03},
28435 +       instat_endpoint:        0x84,
28436 +       glocont_endpoint:       -1,
28437 +       calculate_baud_rate:    keyspan_usa28_calc_baud,
28438 +       baudclk:                KEYSPAN_USA19_BAUDCLK,
28439 +};
28440 +
28441 +static const struct keyspan_device_details usa19qw_device_details = {
28442 +       product_id:             keyspan_usa19qw_product_id,
28443 +       msg_format:             msg_usa26,
28444 +       num_ports:              1,
28445 +       indat_endp_flip:        0,
28446 +       outdat_endp_flip:       1,
28447 +       indat_endpoints:        {0x81},
28448 +       outdat_endpoints:       {0x01},
28449 +       inack_endpoints:        {0x85},
28450 +       outcont_endpoints:      {0x05},
28451 +       instat_endpoint:        0x87,
28452 +       glocont_endpoint:       0x07,
28453 +       calculate_baud_rate:    keyspan_usa19w_calc_baud,
28454 +       baudclk:                KEYSPAN_USA19W_BAUDCLK,
28455 +};
28456 +
28457 +static const struct keyspan_device_details usa19w_device_details = {
28458 +       product_id:             keyspan_usa19w_product_id,
28459 +       msg_format:             msg_usa26,
28460 +       num_ports:              1,
28461 +       indat_endp_flip:        0,
28462 +       outdat_endp_flip:       1,
28463 +       indat_endpoints:        {0x81},
28464 +       outdat_endpoints:       {0x01},
28465 +       inack_endpoints:        {0x85},
28466 +       outcont_endpoints:      {0x05},
28467 +       instat_endpoint:        0x87,
28468 +       glocont_endpoint:       0x07,
28469 +       calculate_baud_rate:    keyspan_usa19w_calc_baud,
28470 +       baudclk:                KEYSPAN_USA19W_BAUDCLK,
28471 +};
28472 +
28473 +static const struct keyspan_device_details usa28_device_details = {
28474 +       product_id:             keyspan_usa28_product_id,
28475 +       msg_format:             msg_usa28,
28476 +       num_ports:              2,
28477 +       indat_endp_flip:        1,
28478 +       outdat_endp_flip:       1,
28479 +       indat_endpoints:        {0x81, 0x83},
28480 +       outdat_endpoints:       {0x01, 0x03},
28481 +       inack_endpoints:        {0x85, 0x86},
28482 +       outcont_endpoints:      {0x05, 0x06},
28483 +       instat_endpoint:        0x87,
28484 +       glocont_endpoint:       0x07,
28485 +       calculate_baud_rate:    keyspan_usa28_calc_baud,
28486 +       baudclk:                KEYSPAN_USA28_BAUDCLK,          
28487 +};
28488  
28489 -} keyspan_device_details; 
28490 +static const struct keyspan_device_details usa28x_device_details = {
28491 +       product_id:             keyspan_usa28x_product_id,
28492 +       msg_format:             msg_usa26,
28493 +       num_ports:              2,
28494 +       indat_endp_flip:        0,
28495 +       outdat_endp_flip:       1,
28496 +       indat_endpoints:        {0x81, 0x83},
28497 +       outdat_endpoints:       {0x01, 0x03},
28498 +       inack_endpoints:        {0x85, 0x86},
28499 +       outcont_endpoints:      {0x05, 0x06},
28500 +       instat_endpoint:        0x87,
28501 +       glocont_endpoint:       0x07,
28502 +       calculate_baud_rate:    keyspan_usa19w_calc_baud,
28503 +       baudclk:                KEYSPAN_USA28X_BAUDCLK,
28504 +};
28505  
28506 -       /* Now for each device type we setup the device detail
28507 -          structure with the appropriate information (provided
28508 -          in Keyspan's documentation) */
28509 -
28510 -static const keyspan_device_details usa18x_device_details = {
28511 -       keyspan_usa18x_product_id,      /* product ID */
28512 -               msg_usa26,                      /* msg type*/
28513 -       1,                              /* num ports */
28514 -       0,                              /* indat endpoint flip */
28515 -       1,                              /* outdat endpoint flip */
28516 -       {0x81},                         /* per port indat */
28517 -       {0x01},                         /* per port outdat */
28518 -       {0x85},                         /* per port inack */
28519 -       {0x05},                         /* per port outcont */
28520 -       0x87,                           /* instat endpoint */
28521 -       0x07,                           /* glocont endpoint */
28522 -       keyspan_usa19w_calc_baud,       /* calc baud rate */
28523 -       KEYSPAN_USA18X_BAUDCLK          /* base baud clock */
28524 -};
28525 -
28526 -static const keyspan_device_details usa19_device_details = {
28527 -       keyspan_usa19_product_id,       /* product ID */
28528 -               msg_usa28,                      /* msg type*/
28529 -       1,                              /* num ports */
28530 -       1,                              /* indat endpoint flip */
28531 -       1,                              /* outdat endpoint flip */
28532 -       {0x81},                         /* per port indat */
28533 -       {0x01},                         /* per port outdat */
28534 -       {0x83},                         /* per port inack */
28535 -       {0x03},                         /* per port outcont */
28536 -       0x84,                           /* instat endpoint */
28537 -       -1,                             /* glocont endpoint */
28538 -       keyspan_usa19_calc_baud,        /* calc baud rate */
28539 -       KEYSPAN_USA19_BAUDCLK           /* base baud clock */
28540 -};
28541 -
28542 -static const keyspan_device_details usa19w_device_details = {
28543 -       keyspan_usa19w_product_id,      /* product ID */
28544 -               msg_usa26,                      /* msg type*/
28545 -       1,                              /* num ports */
28546 -       0,                              /* indat endpoint flip */
28547 -       1,                              /* outdat endpoint flip */
28548 -       {0x81},                         /* per port indat */
28549 -       {0x01},                         /* per port outdat */
28550 -       {0x85},                         /* per port inack */
28551 -       {0x05},                         /* per port outcont */
28552 -       0x87,                           /* instat endpoint */
28553 -       0x07,                           /* glocont endpoint */
28554 -       keyspan_usa19w_calc_baud,       /* calc baud rate */
28555 -       KEYSPAN_USA19W_BAUDCLK          /* base baud clock */
28556 -};
28557 -
28558 -static const keyspan_device_details usa28x_device_details = {
28559 -       keyspan_usa28x_product_id,      /* product ID */
28560 -               msg_usa26,                      /* msg type*/
28561 -       2,                              /* num ports */
28562 -       0,                              /* indat endpoint flip */
28563 -       1,                              /* outdat endpoint flip */
28564 -       {0x81, 0x83},                   /* per port indat */
28565 -       {0x01, 0x03},                   /* per port outdat */
28566 -       {0x85, 0x86},                   /* per port inack */
28567 -       {0x05, 0x06},                   /* per port outcont */
28568 -       0x87,                           /* instat endpoint */
28569 -       0x07,                           /* glocont endpoint */
28570 -       keyspan_usa19w_calc_baud,       /* calc baud rate */
28571 -       KEYSPAN_USA28X_BAUDCLK
28572 -};
28573 -
28574 -static const keyspan_device_details usa28xa_device_details = {
28575 -       keyspan_usa28xa_product_id,     /* product ID */
28576 -               msg_usa26,                      /* msg type*/
28577 -       2,                              /* num ports */
28578 -       0,                              /* indat endpoint flip */
28579 -       1,                              /* outdat endpoint flip */
28580 -       {0x81, 0x83},                   /* per port indat */
28581 -       {0x01, 0x03},                   /* per port outdat */
28582 -       {0x85, 0x86},                   /* per port inack */
28583 -       {0x05, 0x06},                   /* per port outcont */
28584 -       0x87,                           /* instat endpoint */
28585 -       0x07,                           /* glocont endpoint */
28586 -       keyspan_usa19w_calc_baud,       /* calc baud rate */
28587 -       KEYSPAN_USA28X_BAUDCLK
28588 -};
28589 -
28590 -       /* We don't need a separate entry for the usa28xb as it appears as a 28x anyway */
28591 -
28592 -static const keyspan_device_details usa49w_device_details = {
28593 -       keyspan_usa49w_product_id,      /* product ID */
28594 -               msg_usa49,                      /* msg type*/
28595 -       4,                              /* num ports */
28596 -       0,                              /* indat endpoint flip */
28597 -       0,                              /* outdat endpoint flip */
28598 -       { 0x81, 0x82, 0x83, 0x84},      /* per port indat */
28599 -       { 0x01, 0x02, 0x03, 0x04},      /* per port outdat */
28600 -       {-1, -1, -1, -1},               /* per port inack */
28601 -       {-1, -1, -1, -1},               /* per port outcont */
28602 -       0x87,                           /* instat endpoint */
28603 -       0x07,                           /* glocont endpoint */
28604 -       keyspan_usa19w_calc_baud,       /* calc baud rate */
28605 -       KEYSPAN_USA49W_BAUDCLK
28606 +static const struct keyspan_device_details usa28xa_device_details = {
28607 +       product_id:             keyspan_usa28xa_product_id,
28608 +       msg_format:             msg_usa26,
28609 +       num_ports:              2,
28610 +       indat_endp_flip:        0,
28611 +       outdat_endp_flip:       1,
28612 +       indat_endpoints:        {0x81, 0x83},
28613 +       outdat_endpoints:       {0x01, 0x03},
28614 +       inack_endpoints:        {0x85, 0x86},
28615 +       outcont_endpoints:      {0x05, 0x06},
28616 +       instat_endpoint:        0x87,
28617 +       glocont_endpoint:       0x07,
28618 +       calculate_baud_rate:    keyspan_usa19w_calc_baud,
28619 +       baudclk:                KEYSPAN_USA28X_BAUDCLK,
28620 +};
28621 +
28622 +/* We don't need a separate entry for the usa28xb as it appears as a 28x anyway */
28623 +
28624 +static const struct keyspan_device_details usa49w_device_details = {
28625 +       product_id:             keyspan_usa49w_product_id,
28626 +       msg_format:             msg_usa49,
28627 +       num_ports:              4,
28628 +       indat_endp_flip:        0,
28629 +       outdat_endp_flip:       0,
28630 +       indat_endpoints:        {0x81, 0x82, 0x83, 0x84},
28631 +       outdat_endpoints:       {0x01, 0x02, 0x03, 0x04},
28632 +       inack_endpoints:        {-1, -1, -1, -1},
28633 +       outcont_endpoints:      {-1, -1, -1, -1},
28634 +       instat_endpoint:        0x87,
28635 +       glocont_endpoint:       0x07,
28636 +       calculate_baud_rate:    keyspan_usa19w_calc_baud,
28637 +       baudclk:                KEYSPAN_USA49W_BAUDCLK,
28638  };
28639  
28640 -static const keyspan_device_details *keyspan_devices[] = {
28641 +static const struct keyspan_device_details *keyspan_devices[] = {
28642         &usa18x_device_details,
28643         &usa19_device_details,
28644 +       &usa19qi_device_details,
28645 +       &usa19qw_device_details,
28646         &usa19w_device_details,
28647 +       &usa28_device_details,
28648         &usa28x_device_details,
28649         &usa28xa_device_details,
28650 +       /* 28xb not required as it renumerates as a 28x */
28651         &usa49w_device_details,
28652 -       NULL
28653 +       NULL,
28654  };
28655  
28656  static __devinitdata struct usb_device_id keyspan_ids_combined[] = {
28657         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_pre_product_id) },
28658         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_pre_product_id) },
28659         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_pre_product_id) },
28660 +       { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_pre_product_id) },
28661 +       { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qw_pre_product_id) },
28662         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_pre_product_id) },
28663         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_pre_product_id) },
28664         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_pre_product_id) },
28665 @@ -358,6 +422,8 @@
28666         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_product_id) },
28667         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_product_id) },
28668         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_product_id) },
28669 +       { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_product_id) },
28670 +       { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qw_product_id) },
28671         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_product_id) },
28672         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_product_id) },
28673         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_product_id) },
28674 @@ -368,224 +434,58 @@
28675  
28676  MODULE_DEVICE_TABLE(usb, keyspan_ids_combined);
28677  
28678 -/* Eventually, we will not need separate id tables for each USB
28679 -   ID pattern.  But, for now, it looks like we need slightly different
28680 -   behavior for each match. */
28681 -
28682 -static __devinitdata struct usb_device_id keyspan_usa18x_pre_ids[] = {
28683 +/* usb_device_id table for the pre-firmware download keyspan devices */
28684 +static struct usb_device_id keyspan_pre_ids[] = {
28685         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_pre_product_id) },
28686 -       { }     /* Terminating entry */
28687 -};
28688 -
28689 -static __devinitdata struct usb_device_id keyspan_usa19_pre_ids[] = {
28690         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_pre_product_id) },
28691 -       { } /* Terminating entry */
28692 -};
28693 -
28694 -static __devinitdata struct usb_device_id keyspan_usa19w_pre_ids[] = {
28695 +       { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_pre_product_id) },
28696 +       { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qw_pre_product_id) },
28697         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_pre_product_id) },
28698 -       { } /* Terminating entry */
28699 -};
28700 -
28701 -static __devinitdata struct usb_device_id keyspan_usa28_pre_ids[] = {
28702         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_pre_product_id) },
28703 -       { } /* Terminating entry */
28704 -};
28705 -
28706 -static __devinitdata struct usb_device_id keyspan_usa28x_pre_ids[] = {
28707         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_pre_product_id) },
28708 -       { } /* Terminating entry */
28709 -};
28710 -
28711 -static __devinitdata struct usb_device_id keyspan_usa28xa_pre_ids[] = {
28712         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_pre_product_id) },
28713 -       { } /* Terminating entry */
28714 -};
28715 -
28716 -static __devinitdata struct usb_device_id keyspan_usa28xb_pre_ids[] = {
28717         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xb_pre_product_id) },
28718 -       { } /* Terminating entry */
28719 -};
28720 -
28721 -static __devinitdata struct usb_device_id keyspan_usa49w_pre_ids[] = {
28722         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_pre_product_id) },
28723         { } /* Terminating entry */
28724  };
28725  
28726 -static __devinitdata struct usb_device_id keyspan_usa18x_ids[] = {
28727 +static struct usb_device_id keyspan_1port_ids[] = {
28728         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_product_id) },
28729 -       { } /* Terminating entry */
28730 -};
28731 -
28732 -static __devinitdata struct usb_device_id keyspan_usa19_ids[] = {
28733         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_product_id) },
28734 -       { } /* Terminating entry */
28735 -};
28736 -
28737 -static __devinitdata struct usb_device_id keyspan_usa19w_ids[] = {
28738 +       { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_product_id) },
28739 +       { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qw_product_id) },
28740         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_product_id) },
28741         { } /* Terminating entry */
28742  };
28743  
28744 -static __devinitdata struct usb_device_id keyspan_usa28_ids[] = {
28745 +static struct usb_device_id keyspan_2port_ids[] = {
28746         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_product_id) },
28747 -       { } /* Terminating entry */
28748 -};
28749 -
28750 -static __devinitdata struct usb_device_id keyspan_usa28x_ids[] = {
28751         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_product_id) },
28752 -       { } /* Terminating entry */
28753 -};
28754 -
28755 -static __devinitdata struct usb_device_id keyspan_usa28xa_ids[] = {
28756         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_product_id) },
28757         { } /* Terminating entry */
28758  };
28759  
28760 -static __devinitdata struct usb_device_id keyspan_usa49w_ids[] = {
28761 +static struct usb_device_id keyspan_4port_ids[] = {
28762         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_product_id) },
28763         { } /* Terminating entry */
28764  };
28765  
28766 -    /* Structs for the devices, pre and post renumeration. */
28767 -static struct usb_serial_device_type keyspan_usa18x_pre_device = {
28768 -       name:                   "Keyspan USA18X - (without firmware)",
28769 -       id_table:               keyspan_usa18x_pre_ids,
28770 -       needs_interrupt_in:     DONT_CARE,
28771 -       needs_bulk_in:          DONT_CARE,
28772 -       needs_bulk_out:         DONT_CARE,
28773 -       num_interrupt_in:       NUM_DONT_CARE,
28774 -       num_bulk_in:            NUM_DONT_CARE,
28775 -       num_bulk_out:           NUM_DONT_CARE,
28776 -       num_ports:              1,
28777 -       startup:                keyspan_fake_startup    
28778 -};
28779 -
28780 -static struct usb_serial_device_type keyspan_usa19_pre_device = {
28781 -       name:                   "Keyspan USA19 - (without firmware)",
28782 -       id_table:               keyspan_usa19_pre_ids,
28783 -       needs_interrupt_in:     DONT_CARE,
28784 -       needs_bulk_in:          DONT_CARE,
28785 -       needs_bulk_out:         DONT_CARE,
28786 -       num_interrupt_in:       NUM_DONT_CARE,
28787 -       num_bulk_in:            NUM_DONT_CARE,
28788 -       num_bulk_out:           NUM_DONT_CARE,
28789 -       num_ports:              1,
28790 -       startup:                keyspan_fake_startup    
28791 -};
28792 -
28793 -
28794 -static struct usb_serial_device_type keyspan_usa19w_pre_device = {
28795 -       name:                   "Keyspan USA19W - (without firmware)",
28796 -       id_table:               keyspan_usa19w_pre_ids,
28797 -       needs_interrupt_in:     DONT_CARE,
28798 -       needs_bulk_in:          DONT_CARE,
28799 -       needs_bulk_out:         DONT_CARE,
28800 -       num_interrupt_in:       NUM_DONT_CARE,
28801 -       num_bulk_in:            NUM_DONT_CARE,
28802 -       num_bulk_out:           NUM_DONT_CARE,
28803 -       num_ports:              1,
28804 -       startup:                keyspan_fake_startup    
28805 -};
28806 -
28807 -
28808 -static struct usb_serial_device_type keyspan_usa28_pre_device = {
28809 -       name:                   "Keyspan USA28 - (without firmware)",
28810 -       id_table:               keyspan_usa28_pre_ids,
28811 -       needs_interrupt_in:     DONT_CARE,
28812 -       needs_bulk_in:          DONT_CARE,
28813 -       needs_bulk_out:         DONT_CARE,
28814 -       num_interrupt_in:       NUM_DONT_CARE,
28815 -       num_bulk_in:            NUM_DONT_CARE,
28816 -       num_bulk_out:           NUM_DONT_CARE,
28817 -       num_ports:              2,
28818 -       startup:                keyspan_fake_startup    
28819 -};
28820 -
28821 -static struct usb_serial_device_type keyspan_usa28x_pre_device = {
28822 -       name:                   "Keyspan USA28X - (without firmware)",
28823 -       id_table:               keyspan_usa28x_pre_ids,
28824 -       needs_interrupt_in:     DONT_CARE,
28825 -       needs_bulk_in:          DONT_CARE,
28826 -       needs_bulk_out:         DONT_CARE,
28827 -       num_interrupt_in:       NUM_DONT_CARE,
28828 -       num_bulk_in:            NUM_DONT_CARE,
28829 -       num_bulk_out:           NUM_DONT_CARE,
28830 -       num_ports:              2,
28831 -       startup:                keyspan_fake_startup    
28832 -};
28833 -
28834 -static struct usb_serial_device_type keyspan_usa28xa_pre_device = {
28835 -       name:                   "Keyspan USA28XA - (without firmware)",
28836 -       id_table:               keyspan_usa28xa_pre_ids,
28837 -       needs_interrupt_in:     DONT_CARE,
28838 -       needs_bulk_in:          DONT_CARE,
28839 -       needs_bulk_out:         DONT_CARE,
28840 +/* Structs for the devices, pre and post renumeration. */
28841 +static struct usb_serial_device_type keyspan_pre_device = {
28842 +       owner:                  THIS_MODULE,
28843 +       name:                   "Keyspan - (without firmware)",
28844 +       id_table:               keyspan_pre_ids,
28845         num_interrupt_in:       NUM_DONT_CARE,
28846         num_bulk_in:            NUM_DONT_CARE,
28847         num_bulk_out:           NUM_DONT_CARE,
28848 -       num_ports:              2,
28849 -       startup:                keyspan_fake_startup    
28850 -};
28851 -
28852 -static struct usb_serial_device_type keyspan_usa28xb_pre_device = {
28853 -       name:                   "Keyspan USA28XB - (without firmware)",
28854 -       id_table:               keyspan_usa28xb_pre_ids,
28855 -       needs_interrupt_in:     DONT_CARE,
28856 -       needs_bulk_in:          DONT_CARE,
28857 -       needs_bulk_out:         DONT_CARE,
28858 -       num_interrupt_in:       NUM_DONT_CARE,
28859 -       num_bulk_in:            NUM_DONT_CARE,
28860 -       num_bulk_out:           NUM_DONT_CARE,
28861 -       num_ports:              2,
28862 -       startup:                keyspan_fake_startup    
28863 -};
28864 -
28865 -static struct usb_serial_device_type keyspan_usa49w_pre_device = {
28866 -       name:                   "Keyspan USA49W - (without firmware)",
28867 -       id_table:               keyspan_usa49w_pre_ids,
28868 -       needs_interrupt_in:     DONT_CARE,
28869 -       needs_bulk_in:          DONT_CARE,
28870 -       needs_bulk_out:         DONT_CARE,
28871 -       num_interrupt_in:       NUM_DONT_CARE,
28872 -       num_bulk_in:            NUM_DONT_CARE,
28873 -       num_bulk_out:           NUM_DONT_CARE,
28874 -       num_ports:              4,
28875 -       startup:                keyspan_fake_startup    
28876 -};
28877 -
28878 -static struct usb_serial_device_type keyspan_usa18x_device = {
28879 -       name:                   "Keyspan USA18X",
28880 -       id_table:               keyspan_usa18x_ids,
28881 -       needs_interrupt_in:     DONT_CARE,      
28882 -       needs_bulk_in:          MUST_HAVE,
28883 -       needs_bulk_out:         MUST_HAVE,
28884 -       num_interrupt_in:       NUM_DONT_CARE,
28885 -       num_bulk_in:            3,
28886 -       num_bulk_out:           4,
28887         num_ports:              1,
28888 -       open:                   keyspan_open,
28889 -       close:                  keyspan_close,
28890 -       write:                  keyspan_write,
28891 -       write_room:             keyspan_write_room,
28892 -       //write_bulk_callback:  Not used - we define our own herbs
28893 -       //read_int_callback:    keyspan_usa26_read_int_callback,
28894 -       chars_in_buffer:        keyspan_chars_in_buffer,
28895 -       throttle:               keyspan_rx_throttle,
28896 -       unthrottle:             keyspan_rx_unthrottle,
28897 -       ioctl:                  keyspan_ioctl,
28898 -       set_termios:            keyspan_set_termios,
28899 -       break_ctl:              keyspan_break_ctl,
28900 -       startup:                keyspan_startup,
28901 -       shutdown:               keyspan_shutdown,
28902 +       startup:                keyspan_fake_startup,
28903  };
28904  
28905 -static struct usb_serial_device_type keyspan_usa19_device = {
28906 -       name:                   "Keyspan USA19",
28907 -       id_table:               keyspan_usa19_ids,
28908 -       needs_interrupt_in:     DONT_CARE,      
28909 -       needs_bulk_in:          MUST_HAVE,
28910 -       needs_bulk_out:         MUST_HAVE,
28911 +static struct usb_serial_device_type keyspan_1port_device = {
28912 +       owner:                  THIS_MODULE,
28913 +       name:                   "Keyspan 1 port adapter",
28914 +       id_table:               keyspan_1port_ids,
28915         num_interrupt_in:       NUM_DONT_CARE,
28916         num_bulk_in:            3,
28917         num_bulk_out:           4,
28918 @@ -594,8 +494,6 @@
28919         close:                  keyspan_close,
28920         write:                  keyspan_write,
28921         write_room:             keyspan_write_room,
28922 -//     write_bulk_callback:    keyspan_write_bulk_callback,
28923 -//     read_int_callback:      keyspan_usa28_read_int_callback,
28924         chars_in_buffer:        keyspan_chars_in_buffer,
28925         throttle:               keyspan_rx_throttle,
28926         unthrottle:             keyspan_rx_unthrottle,
28927 @@ -606,85 +504,10 @@
28928         shutdown:               keyspan_shutdown,
28929  };
28930  
28931 -
28932 -static struct usb_serial_device_type keyspan_usa19w_device = {
28933 -       name:                   "Keyspan USA19W",
28934 -       id_table:               keyspan_usa19w_ids,
28935 -       needs_interrupt_in:     DONT_CARE,      
28936 -       needs_bulk_in:          MUST_HAVE,
28937 -       needs_bulk_out:         MUST_HAVE,
28938 -       num_interrupt_in:       NUM_DONT_CARE,
28939 -       num_bulk_in:            3,
28940 -       num_bulk_out:           4,
28941 -       num_ports:              1,
28942 -       open:                   keyspan_open,
28943 -       close:                  keyspan_close,
28944 -       write:                  keyspan_write,
28945 -       write_room:             keyspan_write_room,
28946 -       //write_bulk_callback:  Not used - we define our own herbs
28947 -       //read_int_callback:    keyspan_usa26_read_int_callback,
28948 -       chars_in_buffer:        keyspan_chars_in_buffer,
28949 -       throttle:               keyspan_rx_throttle,
28950 -       unthrottle:             keyspan_rx_unthrottle,
28951 -       ioctl:                  keyspan_ioctl,
28952 -       set_termios:            keyspan_set_termios,
28953 -       break_ctl:              keyspan_break_ctl,
28954 -       startup:                keyspan_startup,
28955 -       shutdown:               keyspan_shutdown,
28956 -};
28957 -
28958 -
28959 -static struct usb_serial_device_type keyspan_usa28_device = {
28960 -       name:                   "Keyspan USA28",
28961 -       id_table:               keyspan_usa28_ids,
28962 -       needs_interrupt_in:     DONT_CARE,      
28963 -       needs_bulk_in:          DONT_CARE,
28964 -       needs_bulk_out:         DONT_CARE,
28965 -       num_interrupt_in:       NUM_DONT_CARE,
28966 -       num_bulk_in:            NUM_DONT_CARE,
28967 -       num_bulk_out:           NUM_DONT_CARE,
28968 -       num_ports:              2,
28969 -       open:                   keyspan_open,
28970 -       close:                  keyspan_close,
28971 -       throttle:               keyspan_rx_throttle,
28972 -       unthrottle:             keyspan_rx_unthrottle,
28973 -       set_termios:            keyspan_set_termios,
28974 -};
28975 -
28976 -
28977 -static struct usb_serial_device_type keyspan_usa28x_device = {
28978 -       name:                   "Keyspan USA28X/XB",
28979 -       id_table:               keyspan_usa28x_ids,
28980 -       needs_interrupt_in:     DONT_CARE,      
28981 -       needs_bulk_in:          DONT_CARE,
28982 -       needs_bulk_out:         DONT_CARE,
28983 -       num_interrupt_in:       NUM_DONT_CARE,
28984 -       num_bulk_in:            NUM_DONT_CARE,
28985 -       num_bulk_out:           NUM_DONT_CARE,
28986 -       num_ports:              2,
28987 -       open:                   keyspan_open,
28988 -       close:                  keyspan_close,
28989 -       write:                  keyspan_write,
28990 -       write_room:             keyspan_write_room,
28991 -//     write_bulk_callback:    keyspan_write_bulk_callback,
28992 -//     read_int_callback:      keyspan_usa26_read_int_callback,
28993 -       chars_in_buffer:        keyspan_chars_in_buffer,
28994 -       throttle:               keyspan_rx_throttle,
28995 -       unthrottle:             keyspan_rx_unthrottle,
28996 -       ioctl:                  keyspan_ioctl,
28997 -       set_termios:            keyspan_set_termios,
28998 -       break_ctl:              keyspan_break_ctl,
28999 -       startup:                keyspan_startup,
29000 -       shutdown:               keyspan_shutdown,
29001 -
29002 -};
29003 -
29004 -static struct usb_serial_device_type keyspan_usa28xa_device = {
29005 -       name:                   "Keyspan USA28XA",
29006 -       id_table:               keyspan_usa28xa_ids,
29007 -       needs_interrupt_in:     DONT_CARE,      
29008 -       needs_bulk_in:          DONT_CARE,
29009 -       needs_bulk_out:         DONT_CARE,
29010 +static struct usb_serial_device_type keyspan_2port_device = {
29011 +       owner:                  THIS_MODULE,
29012 +       name:                   "Keyspan 2 port adapter",
29013 +       id_table:               keyspan_2port_ids,
29014         num_interrupt_in:       NUM_DONT_CARE,
29015         num_bulk_in:            NUM_DONT_CARE,
29016         num_bulk_out:           NUM_DONT_CARE,
29017 @@ -693,8 +516,6 @@
29018         close:                  keyspan_close,
29019         write:                  keyspan_write,
29020         write_room:             keyspan_write_room,
29021 -//     write_bulk_callback:    keyspan_write_bulk_callback,
29022 -//     read_int_callback:      keyspan_usa26_read_int_callback,
29023         chars_in_buffer:        keyspan_chars_in_buffer,
29024         throttle:               keyspan_rx_throttle,
29025         unthrottle:             keyspan_rx_unthrottle,
29026 @@ -703,15 +524,12 @@
29027         break_ctl:              keyspan_break_ctl,
29028         startup:                keyspan_startup,
29029         shutdown:               keyspan_shutdown,
29030 -
29031  };
29032  
29033 -static struct usb_serial_device_type keyspan_usa49w_device = {
29034 -       name:                   "Keyspan USA49W",
29035 -       id_table:               keyspan_usa49w_ids,
29036 -       needs_interrupt_in:     DONT_CARE,      
29037 -       needs_bulk_in:          MUST_HAVE,
29038 -       needs_bulk_out:         MUST_HAVE,
29039 +static struct usb_serial_device_type keyspan_4port_device = {
29040 +       owner:                  THIS_MODULE,
29041 +       name:                   "Keyspan 4 port adapter",
29042 +       id_table:               keyspan_4port_ids,
29043         num_interrupt_in:       NUM_DONT_CARE,
29044         num_bulk_in:            5,
29045         num_bulk_out:           5,
29046 @@ -720,8 +538,6 @@
29047         close:                  keyspan_close,
29048         write:                  keyspan_write,
29049         write_room:             keyspan_write_room,
29050 -       //write_bulk_callback:  Not used - we define our own herbs
29051 -       //read_int_callback:    keyspan_usa26_read_int_callback,
29052         chars_in_buffer:        keyspan_chars_in_buffer,
29053         throttle:               keyspan_rx_throttle,
29054         unthrottle:             keyspan_rx_unthrottle,
29055 @@ -732,5 +548,4 @@
29056         shutdown:               keyspan_shutdown,
29057  };
29058  
29059 -
29060  #endif
29061 diff -Nur linux-2.4.19.old/drivers/usb/serial/keyspan_pda.c linux-2.4.19/drivers/usb/serial/keyspan_pda.c
29062 --- linux-2.4.19.old/drivers/usb/serial/keyspan_pda.c   Thu Oct 11 08:42:47 2001
29063 +++ linux-2.4.19/drivers/usb/serial/keyspan_pda.c       Mon Nov 25 12:27:09 2002
29064 @@ -68,19 +68,16 @@
29065  
29066  #include <linux/config.h>
29067  #include <linux/kernel.h>
29068 -#include <linux/sched.h>
29069 -#include <linux/signal.h>
29070  #include <linux/errno.h>
29071 -#include <linux/poll.h>
29072  #include <linux/init.h>
29073  #include <linux/slab.h>
29074 -#include <linux/fcntl.h>
29075  #include <linux/tty.h>
29076  #include <linux/tty_driver.h>
29077  #include <linux/tty_flip.h>
29078  #include <linux/module.h>
29079  #include <linux/spinlock.h>
29080  #include <linux/tqueue.h>
29081 +#include <asm/uaccess.h>
29082  #include <linux/usb.h>
29083  
29084  #ifdef CONFIG_USB_SERIAL_DEBUG
29085 @@ -157,25 +154,21 @@
29086  
29087  MODULE_DEVICE_TABLE (usb, id_table_combined);
29088  
29089 -static __devinitdata struct usb_device_id id_table_std [] = {
29090 +static struct usb_device_id id_table_std [] = {
29091         { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_ID) },
29092         { }                                             /* Terminating entry */
29093  };
29094  
29095  #ifdef KEYSPAN
29096 -static __devinitdata struct usb_device_id id_table_fake [] = {
29097 +static struct usb_device_id id_table_fake [] = {
29098         { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_FAKE_ID) },
29099         { }                                             /* Terminating entry */
29100  };
29101  #endif
29102  
29103  #ifdef XIRCOM
29104 -static __devinitdata struct usb_device_id id_table_fake_xircom [] = {
29105 +static struct usb_device_id id_table_fake_xircom [] = {
29106          { USB_DEVICE(XIRCOM_VENDOR_ID, XIRCOM_FAKE_ID) },
29107 -        { }                                             
29108 -};
29109 -
29110 -static __devinitdata struct usb_device_id id_table_fake_entregra [] = {
29111          { USB_DEVICE(ENTREGRA_VENDOR_ID, ENTREGRA_FAKE_ID) },
29112          { }                                             
29113  };
29114 @@ -197,26 +190,28 @@
29115         /* wake up other tty processes */
29116         wake_up_interruptible( &tty->write_wait );
29117         /* For 2.2.16 backport -- wake_up_interruptible( &tty->poll_wait ); */
29118 -       MOD_DEC_USE_COUNT;
29119  }
29120  
29121  static void keyspan_pda_request_unthrottle( struct usb_serial *serial )
29122  {
29123 +       int result;
29124  
29125         dbg(" request_unthrottle");
29126         /* ask the device to tell us when the tx buffer becomes
29127            sufficiently empty */
29128 -       usb_control_msg(serial->dev, 
29129 -                            usb_sndctrlpipe(serial->dev, 0),
29130 -                            7, /* request_unthrottle */
29131 -                            USB_TYPE_VENDOR | USB_RECIP_INTERFACE
29132 -                            | USB_DIR_OUT,
29133 -                            16, /* value: threshold */
29134 -                            0, /* index */
29135 -                            NULL,
29136 -                            0,
29137 -                            2*HZ);
29138 -       MOD_DEC_USE_COUNT;
29139 +       result = usb_control_msg(serial->dev, 
29140 +                                usb_sndctrlpipe(serial->dev, 0),
29141 +                                7, /* request_unthrottle */
29142 +                                USB_TYPE_VENDOR | USB_RECIP_INTERFACE
29143 +                                | USB_DIR_OUT,
29144 +                                16, /* value: threshold */
29145 +                                0, /* index */
29146 +                                NULL,
29147 +                                0,
29148 +                                2*HZ);
29149 +       if (result < 0)
29150 +               dbg("%s - error %d from usb_control_msg", 
29151 +                   __FUNCTION__, result);
29152  }
29153  
29154  
29155 @@ -265,9 +260,7 @@
29156                         tty = serial->port[0].tty;
29157                         priv->tx_throttled = 0;
29158                         /* queue up a wakeup at scheduler time */
29159 -                       MOD_INC_USE_COUNT;
29160 -                       if (schedule_task(&priv->wakeup_task) == 0)
29161 -                               MOD_DEC_USE_COUNT;
29162 +                       schedule_task(&priv->wakeup_task);
29163                         break;
29164                 default:
29165                         break;
29166 @@ -345,14 +338,19 @@
29167  {
29168         struct usb_serial *serial = port->serial;
29169         int value;
29170 +       int result;
29171 +
29172         if (break_state == -1)
29173                 value = 1; /* start break */
29174         else
29175                 value = 0; /* clear break */
29176 -       usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
29177 -                       4, /* set break */
29178 -                       USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
29179 -                       value, 0, NULL, 0, 2*HZ);
29180 +       result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
29181 +                               4, /* set break */
29182 +                               USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
29183 +                               value, 0, NULL, 0, 2*HZ);
29184 +       if (result < 0)
29185 +               dbg("%s - error %d from usb_control_msg", 
29186 +                   __FUNCTION__, result);
29187         /* there is something funky about this.. the TCSBRK that 'cu' performs
29188            ought to translate into a break_ctl(-1),break_ctl(0) pair HZ/4
29189            seconds apart, but it feels like the break sent isn't as long as it
29190 @@ -606,9 +604,7 @@
29191  
29192         if (request_unthrottle) {
29193                 priv->tx_throttled = 1; /* block writers */
29194 -               MOD_INC_USE_COUNT;
29195 -               if (schedule_task(&priv->unthrottle_task) == 0)
29196 -                       MOD_DEC_USE_COUNT;
29197 +               schedule_task(&priv->unthrottle_task);
29198         }
29199  
29200         rc = count;
29201 @@ -635,9 +631,7 @@
29202         }
29203         
29204         /* queue up a wakeup at scheduler time */
29205 -       MOD_INC_USE_COUNT;
29206 -       if (schedule_task(&priv->wakeup_task) == 0)
29207 -               MOD_DEC_USE_COUNT;
29208 +       schedule_task(&priv->wakeup_task);
29209  }
29210  
29211  
29212 @@ -674,62 +668,45 @@
29213         int rc = 0;
29214         struct keyspan_pda_private *priv;
29215  
29216 -       down (&port->sem);
29217 -
29218 -       MOD_INC_USE_COUNT;
29219 -       ++port->open_count;
29220 -
29221 -       if (!port->active) {
29222 -               port->active = 1;
29223
29224 -               /* find out how much room is in the Tx ring */
29225 -               rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
29226 -                                    6, /* write_room */
29227 -                                    USB_TYPE_VENDOR | USB_RECIP_INTERFACE
29228 -                                    | USB_DIR_IN,
29229 -                                    0, /* value */
29230 -                                    0, /* index */
29231 -                                    &room,
29232 -                                    1,
29233 -                                    2*HZ);
29234 -               if (rc < 0) {
29235 -                       dbg(__FUNCTION__" - roomquery failed");
29236 -                       goto error;
29237 -               }
29238 -               if (rc == 0) {
29239 -                       dbg(__FUNCTION__" - roomquery returned 0 bytes");
29240 -                       rc = -EIO;
29241 -                       goto error;
29242 -               }
29243 -               priv = (struct keyspan_pda_private *)(port->private);
29244 -               priv->tx_room = room;
29245 -               priv->tx_throttled = room ? 0 : 1;
29246 -
29247 -               /* the normal serial device seems to always turn on DTR and RTS here,
29248 -                  so do the same */
29249 -               if (port->tty->termios->c_cflag & CBAUD)
29250 -                       keyspan_pda_set_modem_info(serial, (1<<7) | (1<<2) );
29251 -               else
29252 -                       keyspan_pda_set_modem_info(serial, 0);
29253 +       /* find out how much room is in the Tx ring */
29254 +       rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
29255 +                            6, /* write_room */
29256 +                            USB_TYPE_VENDOR | USB_RECIP_INTERFACE
29257 +                            | USB_DIR_IN,
29258 +                            0, /* value */
29259 +                            0, /* index */
29260 +                            &room,
29261 +                            1,
29262 +                            2*HZ);
29263 +       if (rc < 0) {
29264 +               dbg("%s - roomquery failed", __FUNCTION__);
29265 +               goto error;
29266 +       }
29267 +       if (rc == 0) {
29268 +               dbg("%s - roomquery returned 0 bytes", __FUNCTION__);
29269 +               rc = -EIO;
29270 +               goto error;
29271 +       }
29272 +       priv = (struct keyspan_pda_private *)(port->private);
29273 +       priv->tx_room = room;
29274 +       priv->tx_throttled = room ? 0 : 1;
29275  
29276 -               /*Start reading from the device*/
29277 -               port->interrupt_in_urb->dev = serial->dev;
29278 -               rc = usb_submit_urb(port->interrupt_in_urb);
29279 -               if (rc) {
29280 -                       dbg(__FUNCTION__" - usb_submit_urb(read int) failed");
29281 -                       goto error;
29282 -               }
29283 +       /* the normal serial device seems to always turn on DTR and RTS here,
29284 +          so do the same */
29285 +       if (port->tty->termios->c_cflag & CBAUD)
29286 +               keyspan_pda_set_modem_info(serial, (1<<7) | (1<<2) );
29287 +       else
29288 +               keyspan_pda_set_modem_info(serial, 0);
29289  
29290 +       /*Start reading from the device*/
29291 +       port->interrupt_in_urb->dev = serial->dev;
29292 +       rc = usb_submit_urb(port->interrupt_in_urb);
29293 +       if (rc) {
29294 +               dbg("%s - usb_submit_urb(read int) failed", __FUNCTION__);
29295 +               goto error;
29296         }
29297  
29298 -
29299 -       up (&port->sem);
29300 -       return rc;
29301  error:
29302 -       --port->open_count;
29303 -       port->active = 0;
29304 -       MOD_DEC_USE_COUNT;
29305 -       up (&port->sem);
29306         return rc;
29307  }
29308  
29309 @@ -738,26 +715,15 @@
29310  {
29311         struct usb_serial *serial = port->serial;
29312  
29313 -       down (&port->sem);
29314 -
29315 -       --port->open_count;
29316 +       if (serial->dev) {
29317 +               /* the normal serial device seems to always shut off DTR and RTS now */
29318 +               if (port->tty->termios->c_cflag & HUPCL)
29319 +                       keyspan_pda_set_modem_info(serial, 0);
29320  
29321 -       if (port->open_count <= 0) {
29322 -               if (serial->dev) {
29323 -                       /* the normal serial device seems to always shut off DTR and RTS now */
29324 -                       if (port->tty->termios->c_cflag & HUPCL)
29325 -                               keyspan_pda_set_modem_info(serial, 0);
29326 -
29327 -                       /* shutdown our bulk reads and writes */
29328 -                       usb_unlink_urb (port->write_urb);
29329 -                       usb_unlink_urb (port->interrupt_in_urb);
29330 -               }
29331 -               port->active = 0;
29332 -               port->open_count = 0;
29333 +               /* shutdown our bulk reads and writes */
29334 +               usb_unlink_urb (port->write_urb);
29335 +               usb_unlink_urb (port->interrupt_in_urb);
29336         }
29337 -
29338 -       up (&port->sem);
29339 -       MOD_DEC_USE_COUNT;
29340  }
29341  
29342  
29343 @@ -780,7 +746,7 @@
29344                 record = &xircom_pgs_firmware[0];
29345  #endif
29346         if (record == NULL) {
29347 -               err(__FUNCTION__": unknown vendor, aborting.");
29348 +               err("%s: unknown vendor, aborting.", __FUNCTION__);
29349                 return -ENODEV;
29350         }
29351  
29352 @@ -831,81 +797,59 @@
29353  
29354  static void keyspan_pda_shutdown (struct usb_serial *serial)
29355  {
29356 -       dbg (__FUNCTION__);
29357 +       dbg("%s", __FUNCTION__);
29358         
29359 -       while (serial->port[0].open_count > 0) {
29360 -               keyspan_pda_close (&serial->port[0], NULL);
29361 -       }
29362         kfree(serial->port[0].private);
29363  }
29364  
29365  #ifdef KEYSPAN
29366  static struct usb_serial_device_type keyspan_pda_fake_device = {
29367 -       name:                   "Keyspan PDA - (prerenumeration)",
29368 -       id_table:               id_table_fake,
29369 -       needs_interrupt_in:     DONT_CARE,
29370 -       needs_bulk_in:          DONT_CARE,
29371 -       needs_bulk_out:         DONT_CARE,
29372 -       num_interrupt_in:       NUM_DONT_CARE,
29373 -       num_bulk_in:            NUM_DONT_CARE,
29374 -       num_bulk_out:           NUM_DONT_CARE,
29375 -       num_ports:              1,
29376 -       startup:                keyspan_pda_fake_startup,
29377 +       .owner =                THIS_MODULE,
29378 +       .name =                 "Keyspan PDA - (prerenumeration)",
29379 +       .id_table =             id_table_fake,
29380 +       .num_interrupt_in =     NUM_DONT_CARE,
29381 +       .num_bulk_in =          NUM_DONT_CARE,
29382 +       .num_bulk_out =         NUM_DONT_CARE,
29383 +       .num_ports =            1,
29384 +       .startup =              keyspan_pda_fake_startup,
29385  };
29386  #endif
29387  
29388  #ifdef XIRCOM
29389  static struct usb_serial_device_type xircom_pgs_fake_device = {
29390 -        name:                   "Xircom PGS - (prerenumeration)",
29391 -        id_table:               id_table_fake_xircom,
29392 -        needs_interrupt_in:     DONT_CARE,
29393 -        needs_bulk_in:          DONT_CARE,
29394 -        needs_bulk_out:         DONT_CARE,
29395 -        num_interrupt_in:       NUM_DONT_CARE,
29396 -        num_bulk_in:            NUM_DONT_CARE,
29397 -        num_bulk_out:           NUM_DONT_CARE,
29398 -        num_ports:              1,
29399 -        startup:                keyspan_pda_fake_startup,
29400 -};
29401 -
29402 -static struct usb_serial_device_type entregra_pgs_fake_device = {
29403 -        name:                   "Entregra PGS - (prerenumeration)",
29404 -        id_table:               id_table_fake_entregra,
29405 -        needs_interrupt_in:     DONT_CARE,
29406 -        needs_bulk_in:          DONT_CARE,
29407 -        needs_bulk_out:         DONT_CARE,
29408 -        num_interrupt_in:       NUM_DONT_CARE,
29409 -        num_bulk_in:            NUM_DONT_CARE,
29410 -        num_bulk_out:           NUM_DONT_CARE,
29411 -        num_ports:              1,
29412 -        startup:                keyspan_pda_fake_startup,
29413 +       .owner =                THIS_MODULE,
29414 +       .name =                 "Xircom / Entregra PGS - (prerenumeration)",
29415 +       .id_table =             id_table_fake_xircom,
29416 +       .num_interrupt_in =     NUM_DONT_CARE,
29417 +       .num_bulk_in =          NUM_DONT_CARE,
29418 +       .num_bulk_out =         NUM_DONT_CARE,
29419 +       .num_ports =            1,
29420 +       .startup =              keyspan_pda_fake_startup,
29421  };
29422  #endif
29423  
29424  static struct usb_serial_device_type keyspan_pda_device = {
29425 -       name:                   "Keyspan PDA",
29426 -       id_table:               id_table_std,
29427 -       needs_interrupt_in:     MUST_HAVE,
29428 -       needs_bulk_in:          DONT_CARE,
29429 -       needs_bulk_out:         MUST_HAVE,
29430 -       num_interrupt_in:       1,
29431 -       num_bulk_in:            0,
29432 -       num_bulk_out:           1,
29433 -       num_ports:              1,
29434 -       open:                   keyspan_pda_open,
29435 -       close:                  keyspan_pda_close,
29436 -       write:                  keyspan_pda_write,
29437 -       write_room:             keyspan_pda_write_room,
29438 -       write_bulk_callback:    keyspan_pda_write_bulk_callback,
29439 -       read_int_callback:      keyspan_pda_rx_interrupt,
29440 -       chars_in_buffer:        keyspan_pda_chars_in_buffer,
29441 -       throttle:               keyspan_pda_rx_throttle,
29442 -       unthrottle:             keyspan_pda_rx_unthrottle,
29443 -       ioctl:                  keyspan_pda_ioctl,
29444 -       set_termios:            keyspan_pda_set_termios,
29445 -       break_ctl:              keyspan_pda_break_ctl,
29446 -       startup:                keyspan_pda_startup,
29447 -       shutdown:               keyspan_pda_shutdown,
29448 +       .owner =                THIS_MODULE,
29449 +       .name =                 "Keyspan PDA",
29450 +       .id_table =             id_table_std,
29451 +       .num_interrupt_in =     1,
29452 +       .num_bulk_in =          0,
29453 +       .num_bulk_out =         1,
29454 +       .num_ports =            1,
29455 +       .open =                 keyspan_pda_open,
29456 +       .close =                keyspan_pda_close,
29457 +       .write =                keyspan_pda_write,
29458 +       .write_room =           keyspan_pda_write_room,
29459 +       .write_bulk_callback =  keyspan_pda_write_bulk_callback,
29460 +       .read_int_callback =    keyspan_pda_rx_interrupt,
29461 +       .chars_in_buffer =      keyspan_pda_chars_in_buffer,
29462 +       .throttle =             keyspan_pda_rx_throttle,
29463 +       .unthrottle =           keyspan_pda_rx_unthrottle,
29464 +       .ioctl =                keyspan_pda_ioctl,
29465 +       .set_termios =          keyspan_pda_set_termios,
29466 +       .break_ctl =            keyspan_pda_break_ctl,
29467 +       .startup =              keyspan_pda_startup,
29468 +       .shutdown =             keyspan_pda_shutdown,
29469  };
29470  
29471  
29472 @@ -917,7 +861,6 @@
29473  #endif
29474  #ifdef XIRCOM
29475         usb_serial_register (&xircom_pgs_fake_device);
29476 -       usb_serial_register (&entregra_pgs_fake_device);
29477  #endif
29478         info(DRIVER_DESC " " DRIVER_VERSION);
29479         return 0;
29480 @@ -931,7 +874,6 @@
29481         usb_serial_deregister (&keyspan_pda_fake_device);
29482  #endif
29483  #ifdef XIRCOM
29484 -       usb_serial_deregister (&entregra_pgs_fake_device);
29485         usb_serial_deregister (&xircom_pgs_fake_device);
29486  #endif
29487  }
29488 diff -Nur linux-2.4.19.old/drivers/usb/serial/keyspan_usa18x_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa18x_fw.h
29489 --- linux-2.4.19.old/drivers/usb/serial/keyspan_usa18x_fw.h     Wed Oct 10 00:15:02 2001
29490 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa18x_fw.h Mon Nov 25 12:27:09 2002
29491 @@ -1,341 +1,345 @@
29492  /* keyspan_usa18x_fw.h
29493 -  
29494 -   Generated from Keyspan firmware image usa16code.h Sat Oct  6 12:16:35 EST 2001
29495 -   This firmware is for the Keyspan USA-18X Serial Adaptor
29496  
29497 -   "The firmware contained herein as keyspan_usa18x_fw.h is
29498 -   Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
29499 -   ("Keyspan"), as an unpublished work.  This notice does not imply
29500 -   unrestricted or public access to this firmware which is a trade secret of
29501 -   Keyspan, and which may not be reproduced, used, sold or transferred to any
29502 -   third party without Keyspan's prior written consent.  All Rights Reserved.
29503 +       The firmware contained herein as keyspan_usa18x_fw.h is
29504  
29505 -   This firmware may not be modified and may only be used with the Keyspan 
29506 -   USA-18X Serial Adapter.  Distribution and/or Modification of the
29507 -   keyspan.c driver which includes this firmware, in whole or in part,
29508 -   requires the inclusion of this statement."
29509 +               Copyright (C) 1999-2001
29510 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
29511 +               
29512 +       as an unpublished work. This notice does not imply unrestricted or
29513 +       public access to the source code from which this firmware image is
29514 +       derived.  Except as noted below this firmware image may not be 
29515 +       reproduced, used, sold or transferred to any third party without 
29516 +       Keyspan's prior written consent.  All Rights Reserved.
29517  
29518 +       Permission is hereby granted for the distribution of this firmware 
29519 +       image as part of a Linux or other Open Source operating system kernel 
29520 +       in text or binary form as required. 
29521 +
29522 +       This firmware may not be modified and may only be used with  
29523 +       Keyspan hardware.  Distribution and/or Modification of the 
29524 +       keyspan.c driver which includes this firmware, in whole or in 
29525 +       part, requires the inclusion of this statement."
29526  */
29527  
29528  static const struct ezusb_hex_record keyspan_usa18x_firmware[] = {
29529 - {0x0033,  3, { 0x02, 0x13, 0xab}},
29530 + {0x0033,  3, { 0x02, 0x12, 0xf7}},
29531   {0x0003, 16, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0}},
29532   {0x0013, 16, { 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90}},
29533   {0x0023, 15, { 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x07, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22}},
29534 - {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x33, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
29535 + {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x1b, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
29536   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x09, 0xc2, 0x00, 0x80, 0x77, 0x30, 0x03, 0x3b, 0x90, 0x7f}},
29537 - {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x33, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
29538 + {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x1b, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
29539   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x09, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60}},
29540 - {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xca}},
29541 + {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xba}},
29542   {0x0096, 16, { 0xc2, 0x03, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
29543 - {0x00a6, 16, { 0x12, 0x13, 0x33, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
29544 + {0x00a6, 16, { 0x12, 0x13, 0x1b, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
29545   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d}},
29546 - {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xca, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
29547 - {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x66, 0x53, 0x36, 0x80, 0x12}},
29548 - {0x00e6, 16, { 0x13, 0x3f, 0xef, 0x42, 0x36, 0x12, 0x11, 0xed, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3a, 0x50, 0x0f}},
29549 - {0x00f6, 16, { 0x12, 0x13, 0x1b, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x61, 0xc2}},
29550 + {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xba, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
29551 + {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x60, 0x12, 0x11, 0xd6, 0x8f}},
29552 + {0x00e6, 16, { 0x19, 0x12, 0x13, 0x27, 0x8f, 0x36, 0xe5, 0x19, 0xc3, 0x95, 0x3a, 0x50, 0x0f, 0x12, 0x12, 0xeb}},
29553 + {0x00f6, 16, { 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x5e, 0xc2, 0x0b, 0xe5, 0x19}},
29554   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
29555   {0x0043,  3, { 0x02, 0x13, 0x00}},
29556 - {0x0000,  3, { 0x02, 0x0e, 0x10}},
29557 - {0x0106, 64, { 0x0b, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x36, 0x80, 0x57, 0x12, 0x13, 0x3f, 0xef, 0x42, 0x36, 0xe5, 0x36,
29558 -  0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08,
29559 -  0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x5b, 0xe5,
29560 -  0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40}},
29561 - {0x0146, 64, { 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08, 0xe4, 0x90, 0x7e, 0x80, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75,
29562 -  0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12, 0x0c, 0xef, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90,
29563 -  0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x05, 0x03, 0x02, 0x03, 0xc5, 0xc2, 0x05, 0xe4, 0xf5,
29564 -  0x18, 0x74, 0x40, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5}},
29565 - {0x0186, 64, { 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
29566 -  0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68,
29567 -  0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xc8, 0x7f, 0x03, 0x7d,
29568 -  0xcd, 0x12, 0x11, 0xc8, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0}},
29569 - {0x01c6, 64, { 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12,
29570 -  0x10, 0x4c, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12, 0x10, 0x72, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0,
29571 -  0xfd, 0x12, 0x11, 0xc8, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xc8, 0x43, 0x46, 0x80, 0x90, 0x7f,
29572 -  0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12}},
29573 - {0x0206, 64, { 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e,
29574 -  0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0,
29575 -  0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0,
29576 -  0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e, 0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43}},
29577 - {0x0246, 64, { 0x42, 0x80, 0x80, 0x03, 0x53, 0x42, 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43,
29578 -  0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x10, 0xbe, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xe4,
29579 -  0xaf, 0x42, 0x12, 0x10, 0x98, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42,
29580 -  0x12, 0x10, 0x98, 0x90, 0x7e, 0x0c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46}},
29581 - {0x0286, 64, { 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46,
29582 -  0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03,
29583 -  0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90,
29584 -  0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3, 0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3}},
29585 - {0x02c6, 64, { 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10, 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
29586 -  0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90,
29587 -  0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98,
29588 -  0x74, 0x11, 0xf0, 0x12, 0x13, 0x0f, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e}},
29589 - {0x0306, 64, { 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xc8, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e,
29590 -  0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xc8, 0x75, 0x29,
29591 -  0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5,
29592 -  0x40, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11}},
29593 - {0x0346, 64, { 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
29594 -  0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xc8,
29595 -  0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff,
29596 -  0xad, 0x3e, 0x12, 0x11, 0xc8, 0xe4, 0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60}},
29597 - {0x0386, 64, { 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
29598 -  0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4,
29599 -  0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e, 0x1f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0,
29600 -  0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35, 0xf0, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30}},
29601 - {0x03c6, 64, { 0x1a, 0x52, 0xe5, 0x38, 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40,
29602 -  0x04, 0x15, 0x13, 0x80, 0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x13, 0x0f,
29603 -  0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13,
29604 -  0x4b, 0xef, 0x54, 0x80, 0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07}},
29605 - {0x0406, 64, { 0x30, 0x0d, 0x11, 0x12, 0x13, 0x4b, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19,
29606 -  0x25, 0xd2, 0x07, 0x20, 0x1b, 0x03, 0x02, 0x07, 0xf4, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x87, 0xef,
29607 -  0xc3, 0x95, 0x3d, 0x40, 0x03, 0x02, 0x04, 0xb2, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a,
29608 -  0xc2, 0x00, 0x80, 0x77, 0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12}},
29609 - {0x0446, 64, { 0x13, 0x87, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f,
29610 -  0xcb, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41,
29611 -  0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x41, 0x12, 0x0d, 0x14, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0,
29612 -  0x80, 0x39, 0x90, 0x7f, 0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x87, 0xef, 0xc3, 0x94}},
29613 - {0x0486, 64, { 0x40, 0x50, 0x29, 0x90, 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19,
29614 -  0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d,
29615 -  0xc1, 0x12, 0x0d, 0x14, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30,
29616 -  0xe1, 0x03, 0x02, 0x05, 0x40, 0x53, 0x37, 0x80, 0x12, 0x13, 0x93, 0xef, 0x42, 0x37, 0x12}},
29617 - {0x04c6, 64, { 0x12, 0x37, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x6f, 0xef, 0x30, 0xe0, 0x08,
29618 -  0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c, 0x61, 0xc2, 0x0c, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x37,
29619 -  0x80, 0x57, 0x12, 0x13, 0x93, 0xef, 0x42, 0x37, 0xe5, 0x37, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3,
29620 -  0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7d, 0x7f, 0x80, 0x75}},
29621 - {0x0506, 64, { 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0x94, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb,
29622 -  0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08,
29623 -  0xe4, 0x90, 0x7d, 0x80, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12,
29624 -  0x0d, 0x39, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90, 0x7f, 0xd0, 0xe0, 0x30, 0xe1}},
29625 - {0x0546, 64, { 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x9f, 0xc2, 0x06, 0xe4, 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5,
29626 -  0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e,
29627 -  0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5,
29628 -  0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x23, 0xe0, 0x60}},
29629 - {0x0586, 64, { 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x12, 0x12, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x12, 0x12, 0x43, 0x47,
29630 -  0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e,
29631 -  0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12, 0x11, 0x30, 0x90, 0x7e, 0x22, 0xe0,
29632 -  0xff, 0x12, 0x11, 0x56, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0, 0xfd, 0x12, 0x12, 0x12, 0x7f}},
29633 - {0x05c6, 64, { 0x03, 0x7d, 0x07, 0x12, 0x12, 0x12, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0,
29634 -  0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0,
29635 -  0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90,
29636 -  0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54}},
29637 - {0x0606, 64, { 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e,
29638 -  0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43, 0x80, 0x80, 0x03, 0x53, 0x43, 0x7f,
29639 -  0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43, 0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12,
29640 -  0x11, 0x7c, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0xa2, 0xaf, 0x43, 0x12, 0x11, 0x0a}},
29641 - {0x0646, 64, { 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf, 0x43, 0x12, 0x11, 0x0a, 0x90, 0x7e, 0x2c,
29642 -  0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02, 0x80, 0x03, 0x53, 0x47, 0xfd, 0x90,
29643 -  0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60,
29644 -  0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03, 0x53, 0x47, 0xfe, 0x90, 0x7f}},
29645 - {0x0686, 64, { 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3,
29646 -  0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x10, 0x80,
29647 -  0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0,
29648 -  0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0}},
29649 - {0x06c6, 64, { 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x63,
29650 -  0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12,
29651 -  0x12, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e, 0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f,
29652 -  0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x12, 0x75, 0x32, 0x01, 0xd2, 0x08, 0x90, 0x7e}},
29653 - {0x0706, 64, { 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00,
29654 -  0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43, 0x45, 0x40, 0x90, 0x7f, 0x98, 0x74,
29655 -  0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f,
29656 -  0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x12, 0x75, 0x34, 0x01, 0xd2, 0x08}},
29657 - {0x0746, 64, { 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x12, 0xe4,
29658 -  0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
29659 -  0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c,
29660 -  0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4, 0xf5, 0x39, 0xd2, 0x08, 0x90}},
29661 - {0x0786, 64, { 0x7e, 0x3f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x13, 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0,
29662 -  0x74, 0x36, 0xf0, 0xe4, 0x90, 0x7f, 0xd1, 0xf0, 0x30, 0x1a, 0x52, 0xe5, 0x39, 0x60, 0x02, 0x15,
29663 -  0x39, 0x30, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x3e, 0x75,
29664 -  0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12, 0x13, 0x63, 0xef, 0x54, 0x01, 0xf5, 0x19}},
29665 - {0x07c6, 64, { 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2, 0x08, 0x12, 0x13, 0x9f, 0xef, 0x54, 0x80, 0xf5, 0x19,
29666 -  0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2, 0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x9f, 0xef,
29667 -  0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05, 0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a,
29668 -  0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5}},
29669 - {0x0806, 64, { 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74,
29670 -  0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1,
29671 -  0x03, 0x02, 0x09, 0x28, 0xe5, 0x0a, 0x70, 0x40, 0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2,
29672 -  0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
29673 - {0x0846, 64, { 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
29674 -  0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38,
29675 -  0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22, 0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08,
29676 -  0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d}},
29677 - {0x0886, 64, { 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82,
29678 -  0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f,
29679 -  0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4, 0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a,
29680 -  0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2, 0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00}},
29681 - {0x08c6, 64, { 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18,
29682 -  0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb,
29683 -  0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a, 0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15,
29684 -  0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
29685 - {0x0906, 64, { 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
29686 -  0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5,
29687 -  0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0e, 0xf4, 0x0a, 0x10, 0x00, 0x0a, 0x84, 0x01, 0x0a,
29688 -  0xf0, 0x03, 0x09, 0x4c, 0x06, 0x0a, 0x03, 0x08, 0x09, 0xfd, 0x09, 0x09, 0xe5, 0x0a, 0x09}},
29689 - {0x0946, 64, { 0xf4, 0x0b, 0x00, 0x00, 0x0b, 0x3f, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61,
29690 -  0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xdb, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90,
29691 -  0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02,
29692 -  0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83}},
29693 - {0x0986, 64, { 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75,
29694 -  0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83,
29695 -  0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b,
29696 -  0x46, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f, 0x1a, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90}},
29697 - {0x09c6, 64, { 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01,
29698 -  0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f,
29699 -  0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea,
29700 -  0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x46, 0x12, 0x0b, 0x4e, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0x00}},
29701 - {0x0a06, 64, { 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60,
29702 -  0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff,
29703 -  0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
29704 -  0x02, 0xf0, 0x02, 0x0b, 0x46, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5}},
29705 - {0x0a46, 64, { 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f,
29706 -  0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83,
29707 -  0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0,
29708 -  0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f}},
29709 - {0x0a86, 64, { 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0,
29710 -  0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02,
29711 -  0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff,
29712 -  0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4}},
29713 - {0x0ac6, 64, { 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54,
29714 -  0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f,
29715 -  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60,
29716 -  0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80}},
29717 - {0x0b06, 64, { 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90,
29718 -  0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25,
29719 -  0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90,
29720 -  0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0}},
29721 - {0x0b46, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74,
29722 -  0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e,
29723 -  0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18, 0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74,
29724 -  0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5, 0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74}},
29725 - {0x0b86, 64, { 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5, 0x18, 0xb4,
29726 -  0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38, 0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b,
29727 -  0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13, 0xd2, 0x03, 0xd2, 0x01, 0x90, 0x7f, 0x98, 0x74,
29728 -  0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd}},
29729 - {0x0bc6, 64, { 0x12, 0x11, 0xc8, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0x98, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x7f,
29730 -  0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
29731 -  0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x11, 0xc8, 0xe4,
29732 -  0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xc8, 0x90, 0x7f, 0x98, 0x74, 0x11}},
29733 - {0x0c06, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11, 0xc8, 0x7f, 0x01, 0x12, 0x12,
29734 -  0x81, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xc8, 0x20, 0x1b, 0x03, 0x02, 0x0c, 0xc7, 0x75, 0x2d,
29735 -  0x01, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4,
29736 -  0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b, 0x01, 0xe4, 0xf5}},
29737 - {0x0c46, 64, { 0x39, 0xf5, 0x13, 0xf5, 0x37, 0xc2, 0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2, 0x00, 0xc2, 0x0a, 0xc2, 0x13,
29738 -  0xd2, 0x04, 0xd2, 0x02, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00,
29739 -  0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x12, 0x12, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x11,
29740 -  0x0a, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x7f, 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90}},
29741 - {0x0c86, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80,
29742 -  0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x12, 0x12, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12,
29743 -  0x12, 0x12, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d,
29744 -  0x7f, 0x12, 0x12, 0x12, 0x7f, 0x01, 0x12, 0x12, 0xa2, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12}},
29745 - {0x0cc6, 64, { 0x12, 0xd2, 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5,
29746 -  0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86,
29747 + {0x0000,  3, { 0x02, 0x0e, 0x00}},
29748 + {0x0106, 64, { 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x36, 0x02, 0xe5, 0x36, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94,
29749 +  0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e,
29750 +  0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x4b, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0,
29751 +  0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08}},
29752 + {0x0146, 64, { 0x90, 0x7e, 0x80, 0xe5, 0x36, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12,
29753 +  0x0c, 0xdf, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06,
29754 +  0x20, 0x05, 0x03, 0x02, 0x03, 0xc1, 0xc2, 0x05, 0xe4, 0xf5, 0x18, 0x74, 0x40, 0x25, 0x18, 0xf5,
29755 +  0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a}},
29756 + {0x0186, 64, { 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5,
29757 +  0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24,
29758 +  0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xb1, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x11, 0xb1, 0x43, 0x46,
29759 +  0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90}},
29760 + {0x01c6, 64, { 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x10, 0x35, 0x90, 0x7e, 0x02, 0xe0,
29761 +  0xff, 0x12, 0x10, 0x5b, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12, 0x11, 0xb1, 0x7f, 0x03,
29762 +  0x7d, 0x07, 0x12, 0x11, 0xb1, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0,
29763 +  0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90}},
29764 + {0x0206, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90,
29765 +  0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f,
29766 +  0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e,
29767 +  0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x42, 0x80, 0x80, 0x03, 0x53, 0x42}},
29768 + {0x0246, 64, { 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12,
29769 +  0x10, 0xa7, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xcd, 0xaf, 0x42, 0x12, 0x10, 0x81, 0x90,
29770 +  0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42, 0x12, 0x10, 0x81, 0x90, 0x7e, 0x0c,
29771 +  0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd}},
29772 + {0x0286, 64, { 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60,
29773 +  0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03, 0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98,
29774 +  0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3,
29775 +  0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10}},
29776 + {0x02c6, 64, { 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0,
29777 +  0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5,
29778 +  0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x12, 0x12, 0xdf,
29779 +  0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e, 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12}},
29780 + {0x0306, 64, { 0x11, 0xb1, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e,
29781 +  0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xb1, 0x75, 0x29, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18,
29782 +  0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x04, 0x90, 0xc0, 0x00,
29783 +  0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11, 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98}},
29784 + {0x0346, 64, { 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f,
29785 +  0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xb1, 0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90,
29786 +  0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xb1, 0xe4,
29787 +  0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12}},
29788 + {0x0386, 64, { 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b,
29789 +  0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4, 0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e,
29790 +  0x1f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0,
29791 +  0x74, 0x35, 0xf0, 0xd2, 0x03, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30, 0x1a, 0x52, 0xe5, 0x38}},
29792 + {0x03c6, 64, { 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80,
29793 +  0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x12, 0xdf, 0xef, 0x54, 0x01, 0xf5,
29794 +  0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13, 0x33, 0xef, 0x54, 0x80,
29795 +  0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07, 0x30, 0x0d, 0x11, 0x12}},
29796 + {0x0406, 64, { 0x13, 0x33, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19, 0x25, 0xd2, 0x07, 0x20,
29797 +  0x1b, 0x03, 0x02, 0x07, 0xec, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x6f, 0xef, 0xc3, 0x95, 0x3d, 0x40,
29798 +  0x03, 0x02, 0x04, 0xae, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a, 0xc2, 0x00, 0x80, 0x77,
29799 +  0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x6f, 0xef, 0xc3}},
29800 + {0x0446, 64, { 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcb, 0xe0, 0x14, 0xf5,
29801 +  0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41, 0x75, 0x0c, 0x7d, 0x75,
29802 +  0x0d, 0x41, 0x12, 0x0d, 0x04, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0x80, 0x39, 0x90, 0x7f,
29803 +  0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x6f, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90}},
29804 + {0x0486, 64, { 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60,
29805 +  0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d, 0xc1, 0x12, 0x0d, 0x04,
29806 +  0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x05,
29807 +  0x36, 0x12, 0x12, 0x20, 0x8f, 0x19, 0x12, 0x13, 0x7b, 0x8f, 0x37, 0xe5, 0x19, 0xc3, 0x95}},
29808 + {0x04c6, 64, { 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x57, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c,
29809 +  0x5e, 0xc2, 0x0c, 0xe5, 0x19, 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x37, 0x02, 0xe5, 0x37, 0x30,
29810 +  0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e,
29811 +  0x7d, 0x7f, 0x80, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0x84, 0xe5}},
29812 + {0x0506, 64, { 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb, 0xf0, 0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75,
29813 +  0x19, 0x3f, 0x85, 0x19, 0x08, 0x90, 0x7d, 0x80, 0xe5, 0x37, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75,
29814 +  0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12, 0x0d, 0x29, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90,
29815 +  0x7f, 0xd0, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x97, 0xc2, 0x06, 0xe4}},
29816 + {0x0546, 64, { 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18,
29817 +  0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
29818 +  0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68,
29819 +  0x90, 0x7e, 0x23, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xfb, 0x7f, 0x03}},
29820 + {0x0586, 64, { 0x7d, 0xcd, 0x12, 0x11, 0xfb, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00,
29821 +  0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12,
29822 +  0x11, 0x19, 0x90, 0x7e, 0x22, 0xe0, 0xff, 0x12, 0x11, 0x3f, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0,
29823 +  0xfd, 0x12, 0x11, 0xfb, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xfb, 0x43, 0x47, 0x80, 0x90}},
29824 + {0x05c6, 64, { 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
29825 +  0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e,
29826 +  0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0,
29827 +  0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90}},
29828 + {0x0606, 64, { 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e, 0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43,
29829 +  0x80, 0x80, 0x03, 0x53, 0x43, 0x7f, 0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43,
29830 +  0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x11, 0x65, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0x8b,
29831 +  0xaf, 0x43, 0x12, 0x10, 0xf3, 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf}},
29832 + {0x0646, 64, { 0x43, 0x12, 0x10, 0xf3, 0x90, 0x7e, 0x2c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02,
29833 +  0x80, 0x03, 0x53, 0x47, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47,
29834 +  0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03,
29835 +  0x53, 0x47, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0}},
29836 + {0x0686, 64, { 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3, 0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0,
29837 +  0x60, 0x05, 0x43, 0x47, 0x10, 0x80, 0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0,
29838 +  0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90,
29839 +  0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f}},
29840 + {0x06c6, 64, { 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x4b, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd,
29841 +  0xe4, 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e,
29842 +  0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb, 0x75, 0x32,
29843 +  0x01, 0xd2, 0x08, 0x90, 0x7e, 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0}},
29844 + {0x0706, 64, { 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43,
29845 +  0x45, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
29846 +  0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f, 0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb,
29847 +  0x75, 0x34, 0x01, 0xd2, 0x08, 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4}},
29848 + {0x0746, 64, { 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb, 0xe4, 0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e,
29849 +  0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
29850 +  0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c, 0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4,
29851 +  0xf5, 0x39, 0xd2, 0x08, 0x90, 0x7e, 0x3f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x13}},
29852 + {0x0786, 64, { 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0, 0x74, 0x36, 0xf0, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xd1, 0xf0,
29853 +  0x30, 0x1a, 0x52, 0xe5, 0x39, 0x60, 0x02, 0x15, 0x39, 0x30, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94,
29854 +  0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12,
29855 +  0x13, 0x4b, 0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2}},
29856 + {0x07c6, 64, { 0x08, 0x12, 0x13, 0x87, 0xef, 0x54, 0x80, 0xf5, 0x19, 0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2,
29857 +  0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x87, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05,
29858 +  0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90,
29859 +  0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5, 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90}},
29860 + {0x0806, 64, { 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f,
29861 +  0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x09, 0x20, 0xe5, 0x0a, 0x70, 0x40,
29862 +  0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2, 0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74,
29863 +  0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25}},
29864 + {0x0846, 64, { 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb,
29865 +  0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38, 0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22,
29866 +  0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08, 0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5,
29867 +  0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12}},
29868 + {0x0886, 64, { 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05,
29869 +  0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4,
29870 +  0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a, 0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2,
29871 +  0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
29872 + {0x08c6, 64, { 0xfa, 0x12, 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
29873 +  0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a,
29874 +  0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15, 0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74,
29875 +  0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25}},
29876 + {0x0906, 64, { 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb,
29877 +  0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0e,
29878 +  0xe4, 0x0a, 0x08, 0x00, 0x0a, 0x7c, 0x01, 0x0a, 0xe8, 0x03, 0x09, 0x44, 0x06, 0x09, 0xfb, 0x08,
29879 +  0x09, 0xf5, 0x09, 0x09, 0xdd, 0x0a, 0x09, 0xec, 0x0b, 0x00, 0x00, 0x0b, 0x37, 0x90, 0x7f}},
29880 + {0x0946, 64, { 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61, 0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xd3, 0x74,
29881 +  0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f,
29882 +  0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19,
29883 +  0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19}},
29884 + {0x0986, 64, { 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f,
29885 +  0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0,
29886 +  0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f,
29887 +  0x0a, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0}},
29888 + {0x09c6, 64, { 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0,
29889 +  0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
29890 +  0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x3e, 0x12, 0x0b,
29891 +  0x46, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02}},
29892 + {0x0a06, 64, { 0x0b, 0x3e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b,
29893 +  0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00,
29894 +  0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0xe4, 0x90, 0x7f,
29895 +  0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f}},
29896 + {0x0a46, 64, { 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24,
29897 +  0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4,
29898 +  0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
29899 +  0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02}},
29900 + {0x0a86, 64, { 0x60, 0x03, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x3e,
29901 +  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38,
29902 +  0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f,
29903 +  0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f}},
29904 + {0x0ac6, 64, { 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f,
29905 +  0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
29906 +  0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea,
29907 +  0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0}},
29908 + {0x0b06, 64, { 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4,
29909 +  0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f,
29910 +  0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07,
29911 +  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22}},
29912 + {0x0b46, 64, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90,
29913 +  0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18,
29914 +  0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5,
29915 +  0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa}},
29916 + {0x0b86, 64, { 0xe4, 0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38,
29917 +  0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b, 0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13,
29918 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f,
29919 +  0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xb1, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0x81, 0x90, 0x7f}},
29920 + {0x0bc6, 64, { 0x98, 0x74, 0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f,
29921 +  0x98, 0x74, 0x14, 0xf0, 0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd,
29922 +  0x12, 0x11, 0xb1, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xb1, 0x90, 0x7f,
29923 +  0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11}},
29924 + {0x0c06, 64, { 0xb1, 0x7f, 0x01, 0x12, 0x12, 0x6a, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xb1, 0x20, 0x1b, 0x03, 0x02,
29925 +  0x0c, 0xb7, 0x75, 0x2d, 0x01, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4,
29926 +  0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b,
29927 +  0x01, 0xe4, 0xf5, 0x39, 0xf5, 0x13, 0xf5, 0x37, 0xc2, 0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2}},
29928 + {0x0c46, 64, { 0x00, 0xc2, 0x0a, 0xc2, 0x13, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00,
29929 +  0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xfb, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x10,
29930 +  0xf3, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x7f, 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90, 0xc0,
29931 +  0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74}},
29932 + {0x0c86, 64, { 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x11, 0xfb, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12,
29933 +  0x11, 0xfb, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d,
29934 +  0x7f, 0x12, 0x11, 0xfb, 0x7f, 0x01, 0x12, 0x12, 0x8b, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xfb,
29935 +  0xd2, 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82}},
29936 + {0x0cc6, 64, { 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86,
29937    0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08,
29938 -  0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00}},
29939 - {0x0d06, 64, { 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98,
29940 -  0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05,
29941 +  0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0,
29942 +  0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f}},
29943 + {0x0d06, 64, { 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05,
29944    0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2,
29945 -  0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5}},
29946 - {0x0d46, 64, { 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86,
29947 -  0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05,
29948 +  0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c,
29949 +  0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05}},
29950 + {0x0d46, 64, { 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05,
29951    0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43,
29952 -  0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0, 0x44}},
29953 - {0x0d86, 64, { 0x02, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0, 0xd2,
29954 -  0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f,
29955 +  0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02,
29956 +  0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0}},
29957 + {0x0d86, 64, { 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f,
29958    0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90,
29959 -  0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf}},
29960 - {0x0dc6, 64, { 0xd2, 0x1a, 0x12, 0x12, 0x5c, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2, 0x12, 0x90,
29961 -  0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12, 0x05, 0xd2,
29962 +  0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2,
29963 +  0x1a, 0x12, 0x12, 0x45, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2, 0x12}},
29964 + {0x0dc6, 64, { 0x90, 0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12, 0x05, 0xd2,
29965    0x1a, 0x12, 0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30, 0x12, 0x05, 0xc2,
29966 -  0x1a, 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x29, 0x80, 0xd6, 0x30}},
29967 - {0x0e06, 64, { 0x18, 0xd3, 0xc2, 0x18, 0x12, 0x12, 0xf6, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75,
29968 -  0x81, 0x47, 0x02, 0x0e, 0x57, 0x02, 0x0d, 0x7f, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40,
29969 +  0x1a, 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x21, 0x80, 0xd6, 0x30, 0x18,
29970 +  0xd3, 0xc2, 0x18, 0x12, 0x13, 0x93, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd}},
29971 + {0x0e06, 64, { 0x75, 0x81, 0x47, 0x02, 0x0e, 0x47, 0x02, 0x0d, 0x6f, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40,
29972    0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07,
29973 -  0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4}},
29974 - {0x0e46, 64, { 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
29975 -  0x90, 0x12, 0xc3, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09,
29976 +  0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56,
29977 +  0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40}},
29978 + {0x0e46, 64, { 0x80, 0x90, 0x12, 0xac, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09,
29979    0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8,
29980 -  0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5}},
29981 - {0x0e86, 64, { 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf,
29982 -  0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02,
29983 +  0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82,
29984 +  0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca}},
29985 + {0x0e86, 64, { 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02,
29986    0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01,
29987 -  0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06}},
29988 - {0x0ec6, 64, { 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82,
29989 -  0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82,
29990 +  0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9,
29991 +  0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5}},
29992 + {0x0ec6, 64, { 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82,
29993    0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0,
29994 -  0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8}},
29995 - {0x0f06, 64, { 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3,
29996 -  0xa3, 0x80, 0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19, 0x75, 0x1c,
29997 -  0x86, 0xab, 0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xb5, 0xb4, 0x03, 0x1d,
29998 -  0xaf, 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0x9c, 0x7e, 0x00, 0x29}},
29999 - {0x0f46, 64, { 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b, 0x00, 0x7a,
30000 -  0x00, 0x79, 0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c,
30001 +  0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74,
30002 +  0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3}},
30003 + {0x0f06, 64, { 0xa3, 0xa3, 0x80, 0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19, 0x75, 0x1c,
30004 +  0x86, 0xab, 0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xa5, 0xb4, 0x03, 0x1d,
30005 +  0xaf, 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0x8c, 0x7e, 0x00, 0x29, 0xff,
30006 +  0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b, 0x00}},
30007 + {0x0f46, 64, { 0x7a, 0x00, 0x79, 0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c,
30008    0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d, 0xe5, 0x0d, 0xac,
30009 -  0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5}},
30010 - {0x0f86, 64, { 0x08, 0x60, 0x0a, 0x12, 0x13, 0x3f, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f, 0x1a, 0x05,
30011 -  0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a,
30012 -  0xf0, 0x12, 0x13, 0x57, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5,
30013 -  0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x93, 0x8f}},
30014 - {0x0fc6, 64, { 0x1a, 0xef, 0x42, 0x37, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84,
30015 -  0xc0, 0x86, 0x75, 0x86, 0x00, 0x30, 0x15, 0x04, 0xc2, 0x15, 0x80, 0x02, 0xd2, 0x18, 0x53, 0x91,
30016 -  0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0,
30017 -  0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0}},
30018 - {0x1006, 64, { 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04,
30019 -  0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0,
30020 -  0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x11, 0x53,
30021 -  0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0}},
30022 - {0x1046, 64, { 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
30023 -  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
30024 -  0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13,
30025 -  0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0}},
30026 - {0x1086, 64, { 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
30027 -  0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98,
30028 -  0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44,
30029 -  0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0}},
30030 - {0x10c6, 64, { 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
30031 -  0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98,
30032 -  0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90,
30033 -  0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90}},
30034 - {0x1106, 64, { 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90,
30035 -  0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0,
30036 -  0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90,
30037 -  0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef}},
30038 - {0x1146, 64, { 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90,
30039 -  0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09,
30040 -  0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f,
30041 -  0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74}},
30042 - {0x1186, 64, { 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
30043 -  0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b,
30044 -  0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00,
30045 -  0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00}},
30046 - {0x11c6, 64, { 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90,
30047 -  0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0,
30048 -  0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x27, 0x8f, 0x1a, 0x12, 0x13, 0x27, 0x8f, 0x1b,
30049 -  0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x27, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b}},
30050 - {0x1206, 64, { 0x60, 0x07, 0x12, 0x13, 0x27, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b,
30051 -  0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90,
30052 -  0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22,
30053 -  0x12, 0x13, 0x7b, 0x8f, 0x1a, 0x12, 0x13, 0x7b, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60}},
30054 - {0x1246, 64, { 0x12, 0x12, 0x13, 0x7b, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x7b, 0x8f, 0x1b,
30055 -  0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0,
30056 -  0x30, 0x1a, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x12, 0xdf, 0x90, 0x7f,
30057 -  0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5}},
30058 - {0x1286, 64, { 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xc8, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee,
30059 -  0xf0, 0xe4, 0xe5, 0x3e, 0x44, 0x80, 0xfd, 0x12, 0x11, 0xc8, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5,
30060 -  0x3f, 0x54, 0x7f, 0xfd, 0x12, 0x12, 0x12, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00,
30061 -  0xee, 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80, 0xfd, 0x12, 0x12, 0x12, 0x22, 0x05, 0x0e, 0x02}},
30062 - {0x12c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x03, 0x14, 0x03, 0x00, 0x00, 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10,
30063 -  0xc1, 0x16, 0x01, 0x0a, 0x00, 0xc1, 0x1b, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19,
30064 -  0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e, 0x60, 0x05, 0x12, 0x0d, 0x5e, 0x80, 0xee, 0x22, 0x12,
30065 -  0x00, 0x03, 0x12, 0x0d, 0x6f, 0x12, 0x0b, 0x4e, 0x22, 0x02, 0x10, 0x25, 0x00, 0x02, 0x13}},
30066 - {0x1306, 64, { 0x04, 0x00, 0x02, 0x0f, 0xfb, 0x00, 0x02, 0x0f, 0xcd, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0,
30067 +  0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08,
30068 +  0x60, 0x0a, 0x12, 0x13, 0x27, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f, 0x1a}},
30069 + {0x0f86, 64, { 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a,
30070 +  0xf0, 0x12, 0x13, 0x3f, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5,
30071 +  0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x7b, 0x8f, 0x1a,
30072 +  0xef, 0x42, 0x37, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0}},
30073 + {0x0fc6, 64, { 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab,
30074 +  0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32,
30075 +  0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2,
30076 +  0x11, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0}},
30077 + {0x1006, 64, { 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0,
30078 +  0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08,
30079 +  0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f,
30080 +  0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10}},
30081 + {0x1046, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90,
30082 +  0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
30083 +  0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13,
30084 +  0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13}},
30085 + {0x1086, 64, { 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef,
30086 +  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22,
30087 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74,
30088 +  0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44}},
30089 + {0x10c6, 64, { 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74,
30090 +  0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
30091 +  0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74,
30092 +  0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90}},
30093 + {0x1106, 64, { 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00,
30094 +  0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f,
30095 +  0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5,
30096 +  0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90}},
30097 + {0x1146, 64, { 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90,
30098 +  0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f,
30099 +  0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0,
30100 +  0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f}},
30101 + {0x1186, 64, { 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
30102 +  0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b,
30103 +  0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
30104 +  0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90}},
30105 + {0x11c6, 64, { 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12,
30106 +  0x13, 0x0f, 0x8f, 0x1a, 0x12, 0x13, 0x0f, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12,
30107 +  0x13, 0x0f, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x0f, 0x8f, 0x1b, 0x80,
30108 +  0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90}},
30109 + {0x1206, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
30110 +  0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x63, 0x8f, 0x1a, 0x12, 0x13,
30111 +  0x63, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x63, 0x8f, 0x1a, 0xe5, 0x1a,
30112 +  0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x63, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90}},
30113 + {0x1246, 64, { 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x1a, 0x04, 0xe0, 0x44, 0x02, 0xf0,
30114 +  0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x12, 0xc8, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44,
30115 +  0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xb1, 0x90,
30116 +  0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3e, 0x44, 0x80}},
30117 + {0x1286, 64, { 0xfd, 0x12, 0x11, 0xb1, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3f, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xfb,
30118 +  0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80,
30119 +  0xfd, 0x12, 0x11, 0xfb, 0x22, 0x05, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x14, 0x03, 0x00,
30120 +  0x00, 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10, 0xc1, 0x16, 0x01, 0x0a, 0x00, 0xc1}},
30121 + {0x12c6, 64, { 0x1b, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e,
30122 +  0x60, 0x05, 0x12, 0x0d, 0x4e, 0x80, 0xee, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0,
30123    0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
30124 -  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
30125 -  0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90}},
30126 - {0x1346, 64, { 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
30127 -  0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
30128 -  0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0,
30129 -  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff}},
30130 - {0x1386, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
30131 -  0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0,
30132 -  0x00, 0xe0, 0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30133 +  0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0f, 0xe7, 0x00, 0x02, 0x13}},
30134 + {0x1306, 64, { 0x04, 0x00, 0x02, 0x0f, 0xbd, 0x00, 0x02, 0x10, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0,
30135 +  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
30136 +  0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
30137 +  0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90}},
30138 + {0x1346, 64, { 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
30139 +  0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
30140 +  0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0,
30141 +  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff}},
30142 + {0x1386, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x12, 0x00, 0x03, 0x12,
30143 +  0x0d, 0x5f, 0x12, 0x0b, 0x46, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30144 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30145    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
30146   {0x13c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30147    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30148 @@ -420,13 +424,13 @@
30149   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30150    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30151    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30152 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
30153 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
30154   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x12, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
30155    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
30156    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
30157    0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x05, 0x02, 0x40, 0x00}},
30158   {0x1946, 64, { 0x00, 0x07, 0x05, 0x06, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05,
30159 -  0x81, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x83, 0x02,
30160 +  0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x83, 0x02,
30161    0x40, 0x00, 0x01, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
30162    0x01, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x01}},
30163   {0x1986, 64, { 0x04, 0x03, 0x09, 0x04, 0x48, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61,
30164 @@ -439,5 +443,5 @@
30165    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
30166   {0x1a06, 20, { 0x72, 0x00, 0x10, 0x03, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30,
30167    0x00, 0x00, 0x00}},
30168 - { 0xffff,     0,      {0x00} }
30169 + {0xffff,      0,      {0x00} }
30170  };
30171 diff -Nur linux-2.4.19.old/drivers/usb/serial/keyspan_usa19_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa19_fw.h
30172 --- linux-2.4.19.old/drivers/usb/serial/keyspan_usa19_fw.h      Wed Oct 10 00:15:02 2001
30173 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa19_fw.h  Mon Nov 25 12:27:09 2002
30174 @@ -1,28 +1,33 @@
30175  /* keyspan_usa19_fw.h
30176 -  
30177 -   Generated from Keyspan firmware image usa19code.h Sat Oct  6 12:14:44 EST 2001
30178 -   This firmware is for the Keyspan USA-19 Serial Adaptor
30179
30180 +       The firmware contained herein as keyspan_usa19_fw.h is
30181  
30182 -   "The firmware contained herein as keyspan_usa19_fw.h is
30183 -   Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
30184 -   ("Keyspan"), as an unpublished work.  This notice does not imply
30185 -   unrestricted or public access to this firmware which is a trade secret of
30186 -   Keyspan, and which may not be reproduced, used, sold or transferred to any
30187 -   third party without Keyspan's prior written consent.  All Rights Reserved.
30188 +               Copyright (C) 1999-2001
30189 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
30190 +               
30191 +       as an unpublished work. This notice does not imply unrestricted or
30192 +       public access to the source code from which this firmware image is
30193 +       derived.  Except as noted below this firmware image may not be 
30194 +       reproduced, used, sold or transferred to any third party without 
30195 +       Keyspan's prior written consent.  All Rights Reserved.
30196  
30197 -   This firmware may not be modified and may only be used with the Keyspan 
30198 -   USA-19 Serial Adapter.  Distribution and/or Modification of the
30199 -   keyspan.c driver which includes this firmware, in whole or in part,
30200 -   requires the inclusion of this statement."
30201 +       Permission is hereby granted for the distribution of this firmware 
30202 +       image as part of a Linux or other Open Source operating system kernel 
30203 +       in text or binary form as required. 
30204  
30205 +       This firmware may not be modified and may only be used with  
30206 +       Keyspan hardware.  Distribution and/or Modification of the 
30207 +       keyspan.c driver which includes this firmware, in whole or in 
30208 +       part, requires the inclusion of this statement."
30209  */
30210  
30211 +
30212  static const struct ezusb_hex_record keyspan_usa19_firmware[] = {
30213 - {0x0026, 10, { 0x12, 0x0d, 0xbb, 0x12, 0x0e, 0xee, 0x12, 0x0d, 0x67, 0x22}},
30214 + {0x0026, 10, { 0x12, 0x0d, 0xbf, 0x12, 0x0f, 0x47, 0x12, 0x0d, 0x6b, 0x22}},
30215   {0x0033,  3, { 0x02, 0x00, 0x1a}},
30216   {0x001a,  4, { 0x53, 0xd8, 0xef, 0x32}},
30217   {0x0003, 16, { 0x8e, 0x13, 0x8f, 0x14, 0xe5, 0x14, 0x15, 0x14, 0xae, 0x13, 0x70, 0x02, 0x15, 0x13, 0x4e, 0x60}},
30218 - {0x0013,  7, { 0x05, 0x12, 0x0e, 0xdd, 0x80, 0xee, 0x22}},
30219 + {0x0013,  7, { 0x05, 0x12, 0x0f, 0x36, 0x80, 0xee, 0x22}},
30220   {0x0023,  3, { 0x02, 0x00, 0x46}},
30221   {0x0046, 16, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0, 0xd0, 0x75, 0xd0, 0x08}},
30222   {0x0056, 16, { 0x30, 0x99, 0x0e, 0x30, 0x08, 0x07, 0xa2, 0x0b, 0x92, 0x9b, 0x85, 0x35, 0x99, 0xc2, 0x99, 0xd2}},
30223 @@ -37,7 +42,7 @@
30224   {0x00e6, 16, { 0xf5, 0x50, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x20, 0x09, 0x2d, 0x20, 0x06, 0x2a, 0x90}},
30225   {0x00f6, 16, { 0x7f, 0x9b, 0xe0, 0x30, 0xe3, 0x03, 0x20, 0x0e, 0x20, 0x30, 0x0d, 0x11, 0x90, 0x7d, 0xc1, 0xe0}},
30226   {0x0043,  3, { 0x02, 0x0f, 0x00}},
30227 - {0x0000,  3, { 0x02, 0x0c, 0x5d}},
30228 + {0x0000,  3, { 0x02, 0x0c, 0x61}},
30229   {0x0106, 64, { 0x13, 0x92, 0x0b, 0xa3, 0xe0, 0xf5, 0x35, 0x75, 0x37, 0x03, 0x02, 0x04, 0x2f, 0x75, 0x37, 0x02, 0x90,
30230    0x7d, 0xc1, 0xe0, 0xf5, 0x35, 0x02, 0x04, 0x2f, 0x75, 0x37, 0x01, 0xc2, 0x08, 0x02, 0x04, 0x2f,
30231    0xe5, 0x37, 0xc3, 0x95, 0x50, 0x50, 0x03, 0x02, 0x01, 0xcf, 0x90, 0x7f, 0xc6, 0xe0, 0x30, 0xe1,
30232 @@ -110,9 +115,9 @@
30233    0x15, 0x36, 0x05, 0x2b, 0x43, 0x33, 0x01, 0x80, 0x0b, 0x90, 0x7f, 0xb9, 0xe5, 0x36, 0xf0, 0x75,
30234    0x36, 0x00, 0xd2, 0x01, 0xd2, 0x12, 0x30, 0x12, 0x05, 0xc2, 0x12, 0x02, 0x00, 0x56, 0xd0, 0xd0,
30235    0xd0, 0x86, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xca, 0xe0, 0x30, 0xe1}},
30236 - {0x0586, 64, { 0x03, 0x02, 0x06, 0xa7, 0xe4, 0xf5, 0x13, 0x74, 0x40, 0x25, 0x13, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5,
30237 + {0x0586, 64, { 0x03, 0x02, 0x06, 0xab, 0xe4, 0xf5, 0x13, 0x74, 0x40, 0x25, 0x13, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5,
30238    0x83, 0xe0, 0xff, 0xe5, 0x13, 0x7c, 0x00, 0x7b, 0x00, 0x24, 0x38, 0xf9, 0xec, 0x34, 0x00, 0xfa,
30239 -  0xef, 0x12, 0x0d, 0x2f, 0x05, 0x13, 0xe5, 0x13, 0xb4, 0x18, 0xdb, 0xe5, 0x38, 0x60, 0x0c, 0x75,
30240 +  0xef, 0x12, 0x0d, 0x33, 0x05, 0x13, 0xe5, 0x13, 0xb4, 0x18, 0xdb, 0xe5, 0x38, 0x60, 0x0c, 0x75,
30241    0xc9, 0x20, 0x75, 0xc8, 0x34, 0x85, 0x39, 0xca, 0x85, 0x3a, 0xcb, 0xe5, 0x3b, 0x13, 0x92}},
30242   {0x05c6, 64, { 0x0d, 0x92, 0x9f, 0xe5, 0x3c, 0x13, 0x92, 0x0e, 0xe5, 0x3d, 0x13, 0x92, 0x11, 0xe5, 0x3e, 0x60, 0x09,
30243    0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfb, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0x98, 0xe0, 0x44, 0x04, 0xf0,
30244 @@ -125,149 +130,149 @@
30245   {0x0646, 64, { 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x4a, 0x60, 0x0a, 0xd2, 0x9c, 0xc2, 0x98, 0x75, 0x2c,
30246    0x01, 0x75, 0x31, 0x1e, 0xe5, 0x4b, 0x60, 0x07, 0xc2, 0x9c, 0xe4, 0xf5, 0x36, 0xf5, 0x2c, 0xe5,
30247    0x4c, 0x60, 0x03, 0xe4, 0xf5, 0x36, 0xe5, 0x4d, 0x60, 0x02, 0xd2, 0x04, 0xe5, 0x4e, 0x60, 0x0a,
30248 -  0xe5, 0x4a, 0x70, 0x02, 0xf5, 0x31, 0xe5, 0x4e, 0x42, 0x33, 0xe5, 0x4f, 0x60, 0x1b, 0x90}},
30249 +  0xe5, 0x4a, 0x70, 0x02, 0xf5, 0x31, 0xe5, 0x4e, 0x42, 0x33, 0xe5, 0x4f, 0x60, 0x1f, 0x90}},
30250   {0x0686, 64, { 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x12, 0xf0, 0x74, 0x32, 0xf0, 0x74, 0x13, 0xf0,
30251 -  0x74, 0x33, 0xf0, 0x74, 0x14, 0xf0, 0x74, 0x34, 0xf0, 0xd2, 0x05, 0xe4, 0x90, 0x7f, 0xcb, 0xf0,
30252 -  0xa2, 0x09, 0xe4, 0x33, 0xff, 0x65, 0x29, 0x60, 0x05, 0x8f, 0x29, 0x43, 0x33, 0x01, 0xa2, 0x06,
30253 -  0xe4, 0x33, 0xff, 0x65, 0x2a, 0x60, 0x05, 0x8f, 0x2a, 0x43, 0x33, 0x01, 0x90, 0x7f, 0x9b}},
30254 - {0x06c6, 64, { 0xe0, 0x54, 0x08, 0xb5, 0x25, 0x0a, 0xe0, 0x54, 0x08, 0x64, 0x08, 0xf5, 0x25, 0x43, 0x33, 0x01, 0x90,
30255 -  0x7f, 0x9b, 0xe0, 0x54, 0x10, 0xb5, 0x26, 0x0a, 0xe0, 0x54, 0x10, 0x64, 0x10, 0xf5, 0x26, 0x43,
30256 -  0x33, 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x40, 0xb5, 0x27, 0x0a, 0xe0, 0x54, 0x40, 0x64, 0x40,
30257 -  0xf5, 0x27, 0x43, 0x33, 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x20, 0xb5, 0x28, 0x0a, 0xe0}},
30258 - {0x0706, 64, { 0x54, 0x20, 0x64, 0x20, 0xf5, 0x28, 0x43, 0x33, 0x01, 0x30, 0x04, 0x35, 0xc2, 0xaf, 0x30, 0x01, 0x18,
30259 -  0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0xe5, 0x36, 0x60, 0x09, 0x90, 0x7f, 0xb7, 0xf0, 0xe4,
30260 -  0xf5, 0x36, 0xc2, 0x01, 0xc2, 0x04, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1, 0x0f, 0xe5,
30261 -  0x36, 0x60, 0x09, 0x90, 0x7f, 0xb9, 0xf0, 0xe4, 0xf5, 0x36, 0xd2, 0x01, 0xc2, 0x04, 0xd2}},
30262 - {0x0746, 64, { 0xaf, 0x20, 0x03, 0x37, 0x30, 0x02, 0x1b, 0x90, 0x7f, 0xc6, 0xe0, 0x20, 0xe1, 0x2d, 0x90, 0x7e, 0x40,
30263 -  0xe0, 0x13, 0x92, 0x0a, 0x75, 0x37, 0x01, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x50, 0xd2, 0x03, 0x80,
30264 -  0x19, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x75,
30265 -  0x37, 0x01, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x50, 0xd2, 0x03, 0x20, 0x10, 0x33, 0x20, 0x00}},
30266 - {0x0786, 64, { 0x06, 0xe5, 0x37, 0x65, 0x50, 0x70, 0x2a, 0x30, 0x03, 0x1a, 0x30, 0x02, 0x09, 0xe4, 0x90, 0x7f, 0xc7,
30267 -  0xf0, 0xc2, 0x02, 0x80, 0x07, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x02, 0xc2, 0x03, 0xe4, 0xf5,
30268 -  0x50, 0xf5, 0x37, 0x30, 0x0a, 0x0a, 0xc2, 0x0a, 0xc2, 0x00, 0x90, 0x7f, 0xbb, 0x74, 0x01, 0xf0,
30269 -  0x30, 0x10, 0x03, 0x02, 0x08, 0xc1, 0x20, 0x03, 0x03, 0x02, 0x08, 0xc1, 0x30, 0x0e, 0x0a}},
30270 - {0x07c6, 64, { 0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe3, 0x03, 0x02, 0x08, 0xc1, 0x30, 0x06, 0x03, 0x02, 0x08, 0xc1, 0x30,
30271 -  0x09, 0x03, 0x02, 0x08, 0xc1, 0x30, 0x02, 0x62, 0x30, 0x0d, 0x12, 0xaf, 0x37, 0x05, 0x37, 0x74,
30272 -  0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x19, 0xaf, 0x37, 0x05,
30273 -  0x37, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x14, 0xe5}},
30274 - {0x0806, 64, { 0x37, 0xc3, 0x95, 0x50, 0x50, 0x2a, 0x30, 0x0d, 0x12, 0xaf, 0x37, 0x05, 0x37, 0x74, 0x40, 0x2f, 0xf5,
30275 -  0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0b, 0xaf, 0x37, 0x05, 0x37, 0x74, 0x40,
30276 -  0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x35, 0xd2, 0x08, 0x80, 0x6b, 0xc2,
30277 -  0x08, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x02, 0x80, 0x60, 0x30, 0x0d, 0x12, 0xaf, 0x37}},
30278 - {0x0846, 64, { 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x19, 0xaf,
30279 -  0x37, 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x14,
30280 -  0xe5, 0x37, 0xc3, 0x95, 0x50, 0x50, 0x2a, 0x30, 0x0d, 0x12, 0xaf, 0x37, 0x05, 0x37, 0x74, 0xc0,
30281 -  0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0b, 0xaf, 0x37, 0x05}},
30282 - {0x0886, 64, { 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x35, 0xd2, 0x08, 0x80,
30283 -  0x09, 0xc2, 0x08, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x02, 0x30, 0x0d, 0x04, 0xa2, 0x19, 0x92,
30284 -  0x9b, 0xd2, 0x10, 0xc2, 0xaf, 0x85, 0x14, 0x99, 0x20, 0x08, 0x0d, 0x30, 0x0a, 0x0a, 0xc2, 0x0a,
30285 -  0xc2, 0x00, 0x90, 0x7f, 0xbb, 0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x90, 0x7f, 0xbc, 0xe0, 0x20}},
30286 - {0x08c6, 64, { 0xe1, 0x51, 0xe5, 0x33, 0x60, 0x4d, 0xe5, 0x31, 0x70, 0x49, 0xe5, 0x33, 0x30, 0xe1, 0x08, 0xe4, 0xf5,
30287 -  0x2f, 0x75, 0x33, 0x01, 0x80, 0x0b, 0xa2, 0x05, 0xe4, 0x33, 0xf5, 0x2f, 0xc2, 0x05, 0xe4, 0xf5,
30288 -  0x33, 0xe4, 0xf5, 0x13, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x13, 0xf9, 0xee, 0x34, 0x00,
30289 -  0xfa, 0x12, 0x0c, 0xe9, 0xff, 0x74, 0x00, 0x25, 0x13, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5}},
30290 - {0x0906, 64, { 0x83, 0xef, 0xf0, 0x05, 0x13, 0xe5, 0x13, 0xb4, 0x0c, 0xdb, 0x90, 0x7f, 0xbd, 0x74, 0x0c, 0xf0, 0x75,
30291 -  0x31, 0x10, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0d, 0x41, 0x09, 0xff, 0x00, 0x0a, 0x73, 0x01,
30292 -  0x0a, 0xdf, 0x03, 0x09, 0x3d, 0x06, 0x09, 0xf0, 0x08, 0x09, 0xe4, 0x09, 0x09, 0xcc, 0x0a, 0x09,
30293 -  0xdb, 0x0b, 0x00, 0x00, 0x0b, 0x2e, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14}},
30294 - {0x0946, 64, { 0x60, 0x57, 0x24, 0x02, 0x70, 0x76, 0x74, 0x0f, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x64, 0x90, 0x7f, 0xd5,
30295 -  0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03,
30296 -  0x75, 0x82, 0xb5, 0x75, 0x83, 0x0f, 0xef, 0xf0, 0x75, 0x82, 0xae, 0x75, 0x83, 0x0f, 0xf0, 0x75,
30297 -  0x82, 0xa7, 0x75, 0x83, 0x0f, 0xf0, 0x75, 0x82, 0xa0, 0x75, 0x83, 0x0f, 0xf0, 0x90, 0x7f}},
30298 - {0x0986, 64, { 0xea, 0xe0, 0x04, 0x75, 0x82, 0x7b, 0x75, 0x83, 0x0f, 0xf0, 0x74, 0x0f, 0x90, 0x7f, 0xd4, 0xf0, 0x74,
30299 -  0x76, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0e, 0x44,
30300 -  0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b,
30301 -  0x35, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xb4, 0xe0}},
30302 - {0x09c6, 64, { 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01,
30303 -  0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x19, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xea,
30304 -  0xe0, 0xf5, 0x18, 0x12, 0x0d, 0x67, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0x00, 0xe5, 0x18, 0xf0, 0x90,
30305 -  0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60}},
30306 - {0x0a06, 64, { 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x13, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2,
30307 -  0x17, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02,
30308 -  0xf0, 0x02, 0x0b, 0x35, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02,
30309 -  0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f}},
30310 - {0x0a46, 64, { 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0,
30311 -  0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02,
30312 -  0x0b, 0x35, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xe8, 0xe0,
30313 -  0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xea, 0xe0}},
30314 - {0x0a86, 64, { 0xb4, 0x01, 0x05, 0xc2, 0x13, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b,
30315 -  0x35, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4,
30316 -  0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f,
30317 -  0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54}},
30318 - {0x0ac6, 64, { 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90,
30319 -  0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18,
30320 -  0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x13, 0x80, 0x3f, 0x90,
30321 -  0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90}},
30322 - {0x0b06, 64, { 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0,
30323 -  0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f,
30324 -  0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f,
30325 -  0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0x20, 0x15, 0x03, 0x02, 0x0b, 0xcf, 0xe5, 0x31, 0x60}},
30326 - {0x0b46, 64, { 0x02, 0x15, 0x31, 0xe5, 0x36, 0x60, 0x4f, 0x65, 0x34, 0x70, 0x45, 0xe5, 0x32, 0xf4, 0x60, 0x02, 0x05,
30327 -  0x32, 0xe5, 0x32, 0xc3, 0x95, 0x41, 0x40, 0x3d, 0xc2, 0xaf, 0x30, 0x01, 0x18, 0x90, 0x7f, 0xb8,
30328 -  0xe0, 0x20, 0xe1, 0x27, 0x90, 0x7f, 0xb7, 0xe5, 0x36, 0xf0, 0xc2, 0x01, 0xe4, 0xf5, 0x36, 0xf5,
30329 -  0x32, 0xf5, 0x34, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1, 0x0f, 0x90, 0x7f, 0xb9}},
30330 - {0x0b86, 64, { 0xe5, 0x36, 0xf0, 0xd2, 0x01, 0xe4, 0xf5, 0x36, 0xf5, 0x32, 0xf5, 0x34, 0xd2, 0xaf, 0x80, 0x06, 0x85,
30331 -  0x36, 0x34, 0xe4, 0xf5, 0x32, 0xe5, 0x2c, 0x60, 0x2f, 0x20, 0x0c, 0x07, 0x90, 0x7f, 0x9b, 0xe0,
30332 -  0x30, 0xe0, 0x0f, 0xe5, 0x2d, 0x60, 0x06, 0xe4, 0xf5, 0x2d, 0x43, 0x33, 0x01, 0xe4, 0xf5, 0x30,
30333 -  0x80, 0x14, 0xe5, 0x30, 0xd3, 0x95, 0x42, 0x50, 0x0d, 0xe5, 0x30, 0xb5, 0x42, 0x06, 0x75}},
30334 - {0x0bc6, 64, { 0x2d, 0x01, 0x43, 0x33, 0x01, 0x05, 0x30, 0xc2, 0x0c, 0x22, 0x75, 0x12, 0x01, 0xc2, 0x14, 0xc2, 0x18,
30335 -  0xc2, 0x13, 0xc2, 0x17, 0xc2, 0x15, 0xc2, 0x12, 0xd2, 0x16, 0xe4, 0xf5, 0x18, 0x90, 0x7f, 0x92,
30336 -  0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x13, 0xe4, 0x33, 0xfe, 0xef,
30337 -  0x4e, 0xf0, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f}},
30338 - {0x0c06, 64, { 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53,
30339 -  0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0,
30340 -  0xd2, 0xaf, 0xd2, 0xbc, 0xd2, 0x19, 0x12, 0x0f, 0x36, 0xc2, 0x14, 0x30, 0x15, 0x03, 0x12, 0x05,
30341 -  0x80, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x11, 0x60, 0x08, 0xe0, 0xf5, 0x11, 0x12, 0x0b, 0x3d}},
30342 - {0x0c46, 64, { 0x80, 0xea, 0x30, 0x14, 0x07, 0xc2, 0x14, 0x12, 0x09, 0x1a, 0x80, 0xe0, 0x30, 0x18, 0xdd, 0xc2, 0x18,
30343 -  0x12, 0x00, 0x26, 0x80, 0xd6, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x50, 0x02,
30344 -  0x0c, 0xa4, 0x02, 0x0b, 0xd0, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80,
30345 -  0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c}},
30346 - {0x0c86, 64, { 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46,
30347 -  0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x0e, 0x00,
30348 -  0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe,
30349 -  0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8}},
30350 - {0x0cc6, 64, { 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5,
30351 -  0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7,
30352 -  0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb,
30353 -  0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c, 0xe5}},
30354 - {0x0d06, 64, { 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25, 0x82, 0xf8,
30355 -  0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 0x29, 0xf5, 0x82,
30356 -  0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xf0,
30357 -  0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8}},
30358 - {0x0d46, 64, { 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5,
30359 -  0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80, 0xdf,
30360 -  0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x96, 0x74, 0x10,
30361 -  0xf0, 0x90, 0x7f, 0x94, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0x9d, 0x04, 0xf0, 0x90, 0x7f, 0x97}},
30362 - {0x0d86, 64, { 0x74, 0x20, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0x03, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x84, 0xf0, 0xe4, 0x90,
30363 -  0x7f, 0x98, 0xf0, 0x90, 0x7f, 0xc7, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x90, 0x7f, 0xcb, 0xf0, 0x75,
30364 -  0x98, 0x40, 0x43, 0xa8, 0x10, 0x90, 0x7f, 0xde, 0x74, 0x1f, 0xf0, 0x90, 0x7f, 0xdf, 0x74, 0x0f,
30365 -  0xf0, 0xd2, 0x15, 0x22, 0xe4, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f}},
30366 - {0x0dc6, 64, { 0x93, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0x7f, 0x97, 0xe0, 0x44, 0x02, 0xf0, 0x90,
30367 -  0x7f, 0x9d, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x20, 0xf0, 0xe4, 0x90, 0x7f, 0x96,
30368 -  0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0xfd, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90, 0x7f, 0x9e,
30369 -  0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22, 0x0c, 0x24, 0x00, 0x00, 0x00, 0x00}},
30370 - {0x0e06, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x30, 0x00, 0x01, 0x33, 0x01, 0x01, 0x32, 0x00,
30371 -  0x01, 0x37, 0x00, 0x01, 0x50, 0x00, 0x01, 0x36, 0x00, 0x01, 0x34, 0x00, 0xc1, 0x05, 0xc1, 0x0c,
30372 -  0xc1, 0x03, 0xc1, 0x0f, 0xc1, 0x04, 0xc1, 0x0e, 0xc1, 0x11, 0xc1, 0x0a, 0xc1, 0x10, 0xc1, 0x08,
30373 -  0xc1, 0x09, 0xc1, 0x06, 0xc1, 0x00, 0xc1, 0x0d, 0xc1, 0x81, 0xc1, 0x82, 0x00, 0x8f, 0x13}},
30374 - {0x0e46, 64, { 0xe4, 0xf5, 0x14, 0x75, 0x15, 0xff, 0x75, 0x16, 0x0f, 0x75, 0x17, 0xb9, 0xab, 0x15, 0xaa, 0x16, 0xa9,
30375 -  0x17, 0x90, 0x00, 0x01, 0x12, 0x0d, 0x02, 0xb4, 0x03, 0x1d, 0xaf, 0x14, 0x05, 0x14, 0xef, 0xb5,
30376 -  0x13, 0x01, 0x22, 0x12, 0x0c, 0xe9, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x15,
30377 -  0xff, 0xf5, 0x16, 0x89, 0x17, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x22, 0xc0}},
30378 - {0x0e86, 64, { 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x30, 0x16, 0x04,
30379 -  0xc2, 0x16, 0x80, 0x02, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0,
30380 +  0x74, 0x33, 0xf0, 0x74, 0x14, 0xf0, 0x74, 0x34, 0xf0, 0xd2, 0x02, 0xd2, 0x01, 0xd2, 0x05, 0xe4,
30381 +  0x90, 0x7f, 0xcb, 0xf0, 0xa2, 0x09, 0xe4, 0x33, 0xff, 0x65, 0x29, 0x60, 0x05, 0x8f, 0x29, 0x43,
30382 +  0x33, 0x01, 0xa2, 0x06, 0xe4, 0x33, 0xff, 0x65, 0x2a, 0x60, 0x05, 0x8f, 0x2a, 0x43, 0x33}},
30383 + {0x06c6, 64, { 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x08, 0xb5, 0x25, 0x0a, 0xe0, 0x54, 0x08, 0x64, 0x08, 0xf5, 0x25,
30384 +  0x43, 0x33, 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x10, 0xb5, 0x26, 0x0a, 0xe0, 0x54, 0x10, 0x64,
30385 +  0x10, 0xf5, 0x26, 0x43, 0x33, 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x40, 0xb5, 0x27, 0x0a, 0xe0,
30386 +  0x54, 0x40, 0x64, 0x40, 0xf5, 0x27, 0x43, 0x33, 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x20}},
30387 + {0x0706, 64, { 0xb5, 0x28, 0x0a, 0xe0, 0x54, 0x20, 0x64, 0x20, 0xf5, 0x28, 0x43, 0x33, 0x01, 0x30, 0x04, 0x35, 0xc2,
30388 +  0xaf, 0x30, 0x01, 0x18, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0xe5, 0x36, 0x60, 0x09, 0x90,
30389 +  0x7f, 0xb7, 0xf0, 0xe4, 0xf5, 0x36, 0xc2, 0x01, 0xc2, 0x04, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0,
30390 +  0x20, 0xe1, 0x0f, 0xe5, 0x36, 0x60, 0x09, 0x90, 0x7f, 0xb9, 0xf0, 0xe4, 0xf5, 0x36, 0xd2}},
30391 + {0x0746, 64, { 0x01, 0xc2, 0x04, 0xd2, 0xaf, 0x20, 0x03, 0x37, 0x30, 0x02, 0x1b, 0x90, 0x7f, 0xc6, 0xe0, 0x20, 0xe1,
30392 +  0x2d, 0x90, 0x7e, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x75, 0x37, 0x01, 0x90, 0x7f, 0xc7, 0xe0, 0xf5,
30393 +  0x50, 0xd2, 0x03, 0x80, 0x19, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7d, 0xc0, 0xe0,
30394 +  0x13, 0x92, 0x0a, 0x75, 0x37, 0x01, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x50, 0xd2, 0x03, 0x20}},
30395 + {0x0786, 64, { 0x10, 0x33, 0x20, 0x00, 0x06, 0xe5, 0x37, 0x65, 0x50, 0x70, 0x2a, 0x30, 0x03, 0x1a, 0x30, 0x02, 0x09,
30396 +  0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x02, 0x80, 0x07, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x02,
30397 +  0xc2, 0x03, 0xe4, 0xf5, 0x50, 0xf5, 0x37, 0x30, 0x0a, 0x0a, 0xc2, 0x0a, 0xc2, 0x00, 0x90, 0x7f,
30398 +  0xbb, 0x74, 0x01, 0xf0, 0x30, 0x10, 0x03, 0x02, 0x08, 0xc5, 0x20, 0x03, 0x03, 0x02, 0x08}},
30399 + {0x07c6, 64, { 0xc5, 0x30, 0x0e, 0x0a, 0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe3, 0x03, 0x02, 0x08, 0xc5, 0x30, 0x06, 0x03,
30400 +  0x02, 0x08, 0xc5, 0x30, 0x09, 0x03, 0x02, 0x08, 0xc5, 0x30, 0x02, 0x62, 0x30, 0x0d, 0x12, 0xaf,
30401 +  0x37, 0x05, 0x37, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92,
30402 +  0x19, 0xaf, 0x37, 0x05, 0x37, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83}},
30403 + {0x0806, 64, { 0xe0, 0xf5, 0x14, 0xe5, 0x37, 0xc3, 0x95, 0x50, 0x50, 0x2a, 0x30, 0x0d, 0x12, 0xaf, 0x37, 0x05, 0x37,
30404 +  0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0b, 0xaf, 0x37,
30405 +  0x05, 0x37, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x35, 0xd2,
30406 +  0x08, 0x80, 0x6b, 0xc2, 0x08, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x02, 0x80, 0x60, 0x30}},
30407 + {0x0846, 64, { 0x0d, 0x12, 0xaf, 0x37, 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0,
30408 +  0x13, 0x92, 0x19, 0xaf, 0x37, 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5,
30409 +  0x83, 0xe0, 0xf5, 0x14, 0xe5, 0x37, 0xc3, 0x95, 0x50, 0x50, 0x2a, 0x30, 0x0d, 0x12, 0xaf, 0x37,
30410 +  0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92}},
30411 + {0x0886, 64, { 0x0b, 0xaf, 0x37, 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5,
30412 +  0x35, 0xd2, 0x08, 0x80, 0x09, 0xc2, 0x08, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x02, 0x30, 0x0d,
30413 +  0x04, 0xa2, 0x19, 0x92, 0x9b, 0xd2, 0x10, 0xc2, 0xaf, 0x85, 0x14, 0x99, 0x20, 0x08, 0x0d, 0x30,
30414 +  0x0a, 0x0a, 0xc2, 0x0a, 0xc2, 0x00, 0x90, 0x7f, 0xbb, 0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x90}},
30415 + {0x08c6, 64, { 0x7f, 0xbc, 0xe0, 0x20, 0xe1, 0x51, 0xe5, 0x33, 0x60, 0x4d, 0xe5, 0x31, 0x70, 0x49, 0xe5, 0x33, 0x30,
30416 +  0xe1, 0x08, 0xe4, 0xf5, 0x2f, 0x75, 0x33, 0x01, 0x80, 0x0b, 0xa2, 0x05, 0xe4, 0x33, 0xf5, 0x2f,
30417 +  0xc2, 0x05, 0xe4, 0xf5, 0x33, 0xe4, 0xf5, 0x13, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x13,
30418 +  0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0c, 0xed, 0xff, 0x74, 0x00, 0x25, 0x13, 0xf5, 0x82}},
30419 + {0x0906, 64, { 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x13, 0xe5, 0x13, 0xb4, 0x0c, 0xdb, 0x90, 0x7f, 0xbd,
30420 +  0x74, 0x0c, 0xf0, 0x75, 0x31, 0x10, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0d, 0x45, 0x0a, 0x03,
30421 +  0x00, 0x0a, 0x77, 0x01, 0x0a, 0xe3, 0x03, 0x09, 0x41, 0x06, 0x09, 0xf4, 0x08, 0x09, 0xe8, 0x09,
30422 +  0x09, 0xd0, 0x0a, 0x09, 0xdf, 0x0b, 0x00, 0x00, 0x0b, 0x32, 0x90, 0x7f, 0xeb, 0xe0, 0x24}},
30423 + {0x0946, 64, { 0xfe, 0x60, 0x16, 0x14, 0x60, 0x57, 0x24, 0x02, 0x70, 0x76, 0x74, 0x0f, 0x90, 0x7f, 0xd4, 0xf0, 0x74,
30424 +  0x64, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02,
30425 +  0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0xb5, 0x75, 0x83, 0x0f, 0xef, 0xf0, 0x75, 0x82, 0xae, 0x75,
30426 +  0x83, 0x0f, 0xf0, 0x75, 0x82, 0xa7, 0x75, 0x83, 0x0f, 0xf0, 0x75, 0x82, 0xa0, 0x75, 0x83}},
30427 + {0x0986, 64, { 0x0f, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75, 0x82, 0x7b, 0x75, 0x83, 0x0f, 0xf0, 0x74, 0x0f, 0x90,
30428 +  0x7f, 0xd4, 0xf0, 0x74, 0x76, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xea, 0xe0,
30429 +  0xff, 0x12, 0x0e, 0x48, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f,
30430 +  0xd5, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x39}},
30431 + {0x09c6, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0x00, 0xe5, 0x19, 0xf0, 0x90,
30432 +  0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x19, 0x02, 0x0b,
30433 +  0x39, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x18, 0x12, 0x0d, 0x6b, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0x00,
30434 +  0xe5, 0x18, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xe8}},
30435 + {0x0a06, 64, { 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x13, 0xe4, 0x33, 0xff,
30436 +  0x25, 0xe0, 0xff, 0xa2, 0x17, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90,
30437 +  0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x39, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90,
30438 +  0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80}},
30439 + {0x0a46, 64, { 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34,
30440 +  0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5,
30441 +  0x74, 0x02, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x39,
30442 +  0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x39}},
30443 + {0x0a86, 64, { 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x13, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
30444 +  0x01, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4,
30445 +  0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5,
30446 +  0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff}},
30447 + {0x0ac6, 64, { 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20,
30448 +  0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0,
30449 +  0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2,
30450 +  0x13, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea}},
30451 + {0x0b06, 64, { 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54,
30452 +  0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0,
30453 +  0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
30454 +  0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0x20, 0x15, 0x03, 0x02, 0x0b}},
30455 + {0x0b46, 64, { 0xd3, 0xe5, 0x31, 0x60, 0x02, 0x15, 0x31, 0xe5, 0x36, 0x60, 0x4f, 0x65, 0x34, 0x70, 0x45, 0xe5, 0x32,
30456 +  0xf4, 0x60, 0x02, 0x05, 0x32, 0xe5, 0x32, 0xc3, 0x95, 0x41, 0x40, 0x3d, 0xc2, 0xaf, 0x30, 0x01,
30457 +  0x18, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0x90, 0x7f, 0xb7, 0xe5, 0x36, 0xf0, 0xc2, 0x01,
30458 +  0xe4, 0xf5, 0x36, 0xf5, 0x32, 0xf5, 0x34, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1}},
30459 + {0x0b86, 64, { 0x0f, 0x90, 0x7f, 0xb9, 0xe5, 0x36, 0xf0, 0xd2, 0x01, 0xe4, 0xf5, 0x36, 0xf5, 0x32, 0xf5, 0x34, 0xd2,
30460 +  0xaf, 0x80, 0x06, 0x85, 0x36, 0x34, 0xe4, 0xf5, 0x32, 0xe5, 0x2c, 0x60, 0x2f, 0x20, 0x0c, 0x07,
30461 +  0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe0, 0x0f, 0xe5, 0x2d, 0x60, 0x06, 0xe4, 0xf5, 0x2d, 0x43, 0x33,
30462 +  0x01, 0xe4, 0xf5, 0x30, 0x80, 0x14, 0xe5, 0x30, 0xd3, 0x95, 0x42, 0x50, 0x0d, 0xe5, 0x30}},
30463 + {0x0bc6, 64, { 0xb5, 0x42, 0x06, 0x75, 0x2d, 0x01, 0x43, 0x33, 0x01, 0x05, 0x30, 0xc2, 0x0c, 0x22, 0x75, 0x12, 0x01,
30464 +  0xc2, 0x14, 0xc2, 0x18, 0xc2, 0x13, 0xc2, 0x17, 0xc2, 0x15, 0xc2, 0x12, 0xd2, 0x16, 0xe4, 0xf5,
30465 +  0x18, 0x90, 0x7f, 0x92, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x13,
30466 +  0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74}},
30467 + {0x0c06, 64, { 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90,
30468 +  0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae,
30469 +  0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0xbc, 0xd2, 0x19, 0x12, 0x0e, 0xda, 0xc2, 0x14, 0x30,
30470 +  0x15, 0x03, 0x12, 0x05, 0x80, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x11, 0x60, 0x08, 0xe0, 0xf5}},
30471 + {0x0c46, 64, { 0x11, 0x12, 0x0b, 0x41, 0x80, 0xea, 0x30, 0x14, 0x07, 0xc2, 0x14, 0x12, 0x09, 0x1e, 0x80, 0xe0, 0x30,
30472 +  0x18, 0xdd, 0xc2, 0x18, 0x12, 0x00, 0x26, 0x80, 0xd6, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd,
30473 +  0x75, 0x81, 0x50, 0x02, 0x0c, 0xa8, 0x02, 0x0b, 0xd4, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3,
30474 +  0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8}},
30475 + {0x0c86, 64, { 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4,
30476 +  0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40,
30477 +  0x80, 0x90, 0x0e, 0x04, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5,
30478 +  0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0}},
30479 + {0x0cc6, 64, { 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5,
30480 +  0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca,
30481 +  0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50,
30482 +  0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22}},
30483 + {0x0d06, 64, { 0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06,
30484 +  0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5,
30485 +  0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89,
30486 +  0x82, 0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0}},
30487 + {0x0d46, 64, { 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8,
30488 +  0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3,
30489 +  0xa3, 0xa3, 0x80, 0xdf, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0x90,
30490 +  0x7f, 0x96, 0x74, 0x10, 0xf0, 0x90, 0x7f, 0x94, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0x9d, 0x04}},
30491 + {0x0d86, 64, { 0xf0, 0x90, 0x7f, 0x97, 0x74, 0x20, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0x03, 0xf0, 0x90, 0x7f, 0x9e, 0x74,
30492 +  0x84, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x90, 0x7f, 0xc7, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x90,
30493 +  0x7f, 0xcb, 0xf0, 0x75, 0x98, 0x40, 0x43, 0xa8, 0x10, 0x90, 0x7f, 0xde, 0x74, 0x1f, 0xf0, 0x90,
30494 +  0x7f, 0xdf, 0x74, 0x0f, 0xf0, 0xd2, 0x15, 0x22, 0xe4, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f}},
30495 + {0x0dc6, 64, { 0x94, 0xf0, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0x7f, 0x97, 0xe0,
30496 +  0x44, 0x02, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x20, 0xf0,
30497 +  0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0xfd, 0xf0, 0xe4, 0x90, 0x7f, 0x97,
30498 +  0xf0, 0x90, 0x7f, 0x9e, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22, 0x0c, 0x24}},
30499 + {0x0e06, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x30, 0x00, 0x01, 0x33,
30500 +  0x01, 0x01, 0x32, 0x00, 0x01, 0x37, 0x00, 0x01, 0x50, 0x00, 0x01, 0x36, 0x00, 0x01, 0x34, 0x00,
30501 +  0xc1, 0x05, 0xc1, 0x0c, 0xc1, 0x03, 0xc1, 0x0f, 0xc1, 0x04, 0xc1, 0x0e, 0xc1, 0x11, 0xc1, 0x0a,
30502 +  0xc1, 0x10, 0xc1, 0x08, 0xc1, 0x09, 0xc1, 0x06, 0xc1, 0x00, 0xc1, 0x0d, 0xc1, 0x81, 0xc1}},
30503 + {0x0e46, 64, { 0x82, 0x00, 0x8f, 0x13, 0xe4, 0xf5, 0x14, 0x75, 0x15, 0xff, 0x75, 0x16, 0x0f, 0x75, 0x17, 0xb9, 0xab,
30504 +  0x15, 0xaa, 0x16, 0xa9, 0x17, 0x90, 0x00, 0x01, 0x12, 0x0d, 0x06, 0xb4, 0x03, 0x1d, 0xaf, 0x14,
30505 +  0x05, 0x14, 0xef, 0xb5, 0x13, 0x01, 0x22, 0x12, 0x0c, 0xed, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a,
30506 +  0xa9, 0x07, 0x75, 0x15, 0xff, 0xf5, 0x16, 0x89, 0x17, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00}},
30507 + {0x0e86, 64, { 0x79, 0x00, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86,
30508 +  0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0,
30509    0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83,
30510 -  0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4}},
30511 - {0x0ec6, 64, { 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0,
30512 -  0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3,
30513 -  0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87,
30514 -  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x02, 0x0f, 0x0f, 0x00, 0x02, 0x0f}},
30515 - {0x0f06, 64, { 0x04, 0x00, 0x02, 0x0e, 0xb3, 0x00, 0x02, 0x0e, 0x85, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85,
30516 -  0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x14, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74,
30517 -  0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90,
30518 -  0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x19, 0x04, 0xe0, 0x44}},
30519 - {0x0f46, 64, { 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x00, 0x03, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0,
30520 -  0x44, 0x04, 0xf0, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00,
30521 +  0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x14, 0x53, 0x91}},
30522 + {0x0ec6, 64, { 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83,
30523 +  0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x19,
30524 +  0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x00, 0x03, 0x90, 0x7f, 0xd6, 0xe0,
30525 +  0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0, 0x22, 0x00, 0x02, 0x0e, 0xb3, 0x00, 0x02, 0x0f}},
30526 + {0x0f06, 64, { 0x04, 0x00, 0x02, 0x0e, 0x89, 0x00, 0x02, 0x0f, 0x0f, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85,
30527 +  0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74,
30528 +  0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x74,
30529 +  0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9}},
30530 + {0x0f46, 64, { 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22,
30531 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10,
30532    0x01, 0xff, 0x00, 0x00, 0x40, 0xcd, 0x06, 0x07, 0x01, 0x01, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09,
30533    0x02, 0x43, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00, 0x00, 0x07, 0xff, 0x00}},
30534   {0x0f86, 64, { 0x00, 0x00, 0x07, 0x05, 0x01, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07,
30535 @@ -276,5 +281,5 @@
30536    0x00, 0x01, 0x04, 0x03, 0x09, 0x04, 0x10, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73}},
30537   {0x0fc6, 23, { 0x00, 0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x0e, 0x03, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00,
30538    0x61, 0x00, 0x6c, 0x00, 0x00, 0x00}},
30539 -{ 0xffff,      0,      {0x00} }
30540 + {0xffff,      0,      {0x00} }
30541  };
30542 diff -Nur linux-2.4.19.old/drivers/usb/serial/keyspan_usa19qi_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa19qi_fw.h
30543 --- linux-2.4.19.old/drivers/usb/serial/keyspan_usa19qi_fw.h    Thu Jan  1 01:00:00 1970
30544 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa19qi_fw.h        Mon Nov 25 12:27:09 2002
30545 @@ -0,0 +1,284 @@
30546 +/* keyspan_usa19qi_fw.h
30547
30548 +       The firmware contained herein as keyspn_usa19qi_fw.h is
30549 +
30550 +               Copyright (C) 1999-2001
30551 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
30552 +               
30553 +       as an unpublished work. This notice does not imply unrestricted or
30554 +       public access to the source code from which this firmware image is
30555 +       derived.  Except as noted below this firmware image may not be 
30556 +       reproduced, used, sold or transferred to any third party without 
30557 +       Keyspan's prior written consent.  All Rights Reserved.
30558 +
30559 +       Permission is hereby granted for the distribution of this firmware 
30560 +       image as part of a Linux or other Open Source operating system kernel 
30561 +       in text or binary form as required. 
30562 +
30563 +       This firmware may not be modified and may only be used with  
30564 +       Keyspan hardware.  Distribution and/or Modification of the 
30565 +       keyspan.c driver which includes this firmware, in whole or in 
30566 +       part, requires the inclusion of this statement."
30567 +
30568 +*/
30569 +
30570 +static const struct ezusb_hex_record keyspan_usa19qi_firmware[] = {
30571 + {0x0033,  3, { 0x02, 0x00, 0x1a}},
30572 + {0x001a,  4, { 0x53, 0xd8, 0xef, 0x32}},
30573 + {0x0003, 16, { 0x8e, 0x11, 0x8f, 0x12, 0xe5, 0x12, 0x15, 0x12, 0xae, 0x11, 0x70, 0x02, 0x15, 0x11, 0x4e, 0x60}},
30574 + {0x0013,  7, { 0x05, 0x12, 0x0f, 0x84, 0x80, 0xee, 0x22}},
30575 + {0x0023,  3, { 0x02, 0x00, 0x46}},
30576 + {0x0046, 16, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0, 0xd0, 0x75, 0xd0, 0x08}},
30577 + {0x0056, 16, { 0x30, 0x99, 0x0e, 0x30, 0x0b, 0x07, 0xa2, 0x0e, 0x92, 0x9b, 0x85, 0x36, 0x99, 0xc2, 0x99, 0xd2}},
30578 + {0x0066, 16, { 0x12, 0x20, 0x12, 0x03, 0x02, 0x04, 0x1e, 0xc2, 0x12, 0x20, 0x03, 0x03, 0x02, 0x02, 0x4e, 0x20}},
30579 + {0x0076, 16, { 0x0b, 0x03, 0x02, 0x01, 0x26, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x50, 0x3c, 0x20, 0x0c, 0x34, 0x20}},
30580 + {0x0086, 16, { 0x09, 0x31, 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x70, 0x29, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05}},
30581 + {0x0096, 16, { 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf}},
30582 + {0x00a6, 16, { 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x36}},
30583 + {0x00b6, 16, { 0x02, 0x04, 0x1c, 0xc2, 0x0b, 0x02, 0x04, 0x1c, 0x90, 0x7f, 0xc7, 0xe4, 0xf0, 0xc2, 0x03, 0x30}},
30584 + {0x00c6, 16, { 0x0d, 0x0c, 0xc2, 0x0d, 0x90, 0x7f, 0xbb, 0x04, 0xf0, 0xc2, 0x0b, 0x02, 0x04, 0x1c, 0x90, 0x7f}},
30585 + {0x00d6, 16, { 0xc8, 0xe0, 0x30, 0xe1, 0x05, 0xc2, 0x0b, 0x02, 0x04, 0x1c, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x53}},
30586 + {0x00e6, 16, { 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0d, 0x75, 0x16, 0xff, 0x20, 0x0c, 0x2b, 0x20, 0x09, 0x28}},
30587 + {0x00f6, 16, { 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x70, 0x20, 0x30, 0x10, 0x11, 0x90, 0x7d, 0xc1, 0xe0, 0x13}},
30588 + {0x0043,  3, { 0x02, 0x0e, 0x00}},
30589 + {0x0000,  3, { 0x02, 0x00, 0x26}},
30590 + {0x0026, 12, { 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x54, 0x02, 0x0b, 0x28}},
30591 + {0x0106, 64, { 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x36, 0x75, 0x3a, 0x03, 0x02, 0x04, 0x1c, 0x75, 0x3a, 0x02, 0x90, 0x7d,
30592 +  0xc1, 0xe0, 0xf5, 0x36, 0x02, 0x04, 0x1c, 0x75, 0x3a, 0x01, 0xc2, 0x0b, 0x02, 0x04, 0x1c, 0xe5,
30593 +  0x3a, 0xc3, 0x95, 0x53, 0x50, 0x03, 0x02, 0x01, 0xc9, 0x90, 0x7f, 0xc6, 0xe0, 0x30, 0xe1, 0x07,
30594 +  0xc2, 0x14, 0xc2, 0x05, 0x02, 0x04, 0x1c, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x53, 0x90, 0x7e}},
30595 + {0x0146, 64, { 0x40, 0xe0, 0x13, 0x92, 0x0d, 0x75, 0x16, 0xff, 0x20, 0x0c, 0x70, 0x20, 0x09, 0x6d, 0x90, 0x7f, 0x9b,
30596 +  0xe0, 0x55, 0x38, 0x70, 0x65, 0x30, 0x10, 0x10, 0x90, 0x7e, 0x41, 0xe0, 0x13, 0x92, 0x9b, 0xa3,
30597 +  0xe0, 0xf5, 0x99, 0x75, 0x3a, 0x03, 0x80, 0x09, 0x90, 0x7e, 0x41, 0xe0, 0xf5, 0x99, 0x75, 0x3a,
30598 +  0x02, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x40, 0x17, 0x90, 0x7f, 0xc7, 0xe4, 0xf0, 0xc2, 0x03}},
30599 + {0x0186, 64, { 0x20, 0x0d, 0x03, 0x02, 0x04, 0x1c, 0xc2, 0x0d, 0x90, 0x7f, 0xbb, 0x04, 0xf0, 0x02, 0x04, 0x1c, 0x30,
30600 +  0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83,
30601 +  0xe0, 0x13, 0x92, 0x0e, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e,
30602 +  0xf5, 0x83, 0xe0, 0xf5, 0x36, 0xd2, 0x0b, 0x02, 0x04, 0x1c, 0x75, 0x3a, 0x01, 0xc2, 0x14}},
30603 + {0x01c6, 64, { 0x02, 0x04, 0x1c, 0x30, 0x0c, 0x03, 0x02, 0x02, 0x49, 0x20, 0x09, 0x77, 0x90, 0x7f, 0x9b, 0xe0, 0x55,
30604 +  0x38, 0x70, 0x6f, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4,
30605 +  0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x9b, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5,
30606 +  0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x99, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x40}},
30607 + {0x0206, 64, { 0x17, 0x90, 0x7f, 0xc7, 0xe4, 0xf0, 0xc2, 0x03, 0x20, 0x0d, 0x03, 0x02, 0x04, 0x1c, 0xc2, 0x0d, 0x90,
30608 +  0x7f, 0xbb, 0x04, 0xf0, 0x02, 0x04, 0x1c, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40,
30609 +  0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf, 0x3a, 0x05, 0x3a,
30610 +  0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x36, 0xd2, 0x0b}},
30611 + {0x0246, 64, { 0x02, 0x04, 0x1c, 0xc2, 0x14, 0x02, 0x04, 0x1c, 0x20, 0x0b, 0x03, 0x02, 0x02, 0xff, 0xe5, 0x3a, 0xc3,
30612 +  0x95, 0x53, 0x50, 0x3c, 0x20, 0x0c, 0x34, 0x20, 0x09, 0x31, 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38,
30613 +  0x70, 0x29, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34,
30614 +  0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5}},
30615 + {0x0286, 64, { 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x36, 0x02, 0x04, 0x1c, 0xc2, 0x0b, 0x02, 0x04, 0x1c,
30616 +  0x90, 0x7f, 0xc9, 0xe4, 0xf0, 0xd2, 0x03, 0x30, 0x0d, 0x0c, 0xc2, 0x0d, 0x90, 0x7f, 0xbb, 0x04,
30617 +  0xf0, 0xc2, 0x0b, 0x02, 0x04, 0x1c, 0x90, 0x7f, 0xc6, 0xe0, 0x30, 0xe1, 0x05, 0xc2, 0x0b, 0x02,
30618 +  0x04, 0x1c, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x53, 0x90, 0x7e, 0x40, 0xe0, 0x13, 0x92, 0x0d}},
30619 + {0x02c6, 64, { 0x75, 0x16, 0xff, 0x20, 0x0c, 0x2b, 0x20, 0x09, 0x28, 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x70, 0x20,
30620 +  0x30, 0x10, 0x11, 0x90, 0x7e, 0x41, 0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x36, 0x75, 0x3a,
30621 +  0x03, 0x02, 0x04, 0x1c, 0x75, 0x3a, 0x02, 0x90, 0x7e, 0x41, 0xe0, 0xf5, 0x36, 0x02, 0x04, 0x1c,
30622 +  0x75, 0x3a, 0x01, 0xc2, 0x0b, 0x02, 0x04, 0x1c, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x50, 0x03}},
30623 + {0x0306, 64, { 0x02, 0x03, 0xa2, 0x90, 0x7f, 0xc8, 0xe0, 0x30, 0xe1, 0x07, 0xc2, 0x14, 0xc2, 0x05, 0x02, 0x04, 0x1c,
30624 +  0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x53, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0d, 0x75, 0x16, 0xff,
30625 +  0x20, 0x0c, 0x70, 0x20, 0x09, 0x6d, 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x70, 0x65, 0x30, 0x10,
30626 +  0x10, 0x90, 0x7d, 0xc1, 0xe0, 0x13, 0x92, 0x9b, 0xa3, 0xe0, 0xf5, 0x99, 0x75, 0x3a, 0x03}},
30627 + {0x0346, 64, { 0x80, 0x09, 0x90, 0x7d, 0xc1, 0xe0, 0xf5, 0x99, 0x75, 0x3a, 0x02, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x40,
30628 +  0x17, 0x90, 0x7f, 0xc9, 0xe4, 0xf0, 0xd2, 0x03, 0x20, 0x0d, 0x03, 0x02, 0x04, 0x1c, 0xc2, 0x0d,
30629 +  0x90, 0x7f, 0xbb, 0x04, 0xf0, 0x02, 0x04, 0x1c, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74,
30630 +  0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf, 0x3a}},
30631 + {0x0386, 64, { 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x36, 0xd2, 0x0b,
30632 +  0x02, 0x04, 0x1c, 0x75, 0x3a, 0x01, 0xc2, 0x14, 0x02, 0x04, 0x1c, 0x20, 0x0c, 0x75, 0x20, 0x09,
30633 +  0x72, 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x70, 0x6a, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a,
30634 +  0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x9b, 0xaf}},
30635 + {0x03c6, 64, { 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x99, 0xe5,
30636 +  0x3a, 0xc3, 0x95, 0x53, 0x40, 0x13, 0x90, 0x7f, 0xc9, 0xe4, 0xf0, 0xd2, 0x03, 0x30, 0x0d, 0x35,
30637 +  0xc2, 0x0d, 0x90, 0x7f, 0xbb, 0x04, 0xf0, 0x80, 0x2c, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a,
30638 +  0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf}},
30639 + {0x0406, 64, { 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x36, 0xd2,
30640 +  0x0b, 0x80, 0x02, 0xc2, 0x14, 0xd2, 0x01, 0x20, 0x98, 0x03, 0x02, 0x05, 0x5a, 0xc2, 0x98, 0x20,
30641 +  0x02, 0x03, 0x02, 0x04, 0xc7, 0x20, 0x16, 0x27, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x80, 0x2f, 0xf5,
30642 +  0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x99, 0xf0, 0x30, 0x10, 0x4d, 0xaf, 0x39, 0x05}},
30643 + {0x0446, 64, { 0x39, 0x74, 0x80, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x98, 0xf0, 0x80, 0x3a, 0x85,
30644 +  0x99, 0x10, 0xe5, 0x10, 0xb5, 0x47, 0x04, 0xd2, 0x09, 0x80, 0x2e, 0xe5, 0x10, 0xb5, 0x46, 0x04,
30645 +  0xc2, 0x09, 0x80, 0x25, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x80, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e,
30646 +  0xf5, 0x83, 0xe5, 0x10, 0xf0, 0x30, 0x10, 0x11, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x80, 0x2f}},
30647 + {0x0486, 64, { 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x98, 0xf0, 0xd2, 0x0f, 0xe5, 0x39, 0xc3, 0x95, 0x43,
30648 +  0x50, 0x03, 0x02, 0x05, 0x58, 0x90, 0x7f, 0xb8, 0xe0, 0x30, 0xe1, 0x16, 0xe5, 0x39, 0xc3, 0x94,
30649 +  0x40, 0x50, 0x03, 0x02, 0x05, 0x58, 0x15, 0x39, 0x15, 0x39, 0x05, 0x2b, 0x43, 0x34, 0x01, 0x02,
30650 +  0x05, 0x58, 0x90, 0x7f, 0xb7, 0xe5, 0x39, 0xf0, 0x75, 0x39, 0x00, 0xc2, 0x02, 0x02, 0x05}},
30651 + {0x04c6, 64, { 0x58, 0x20, 0x16, 0x27, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x00, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5,
30652 +  0x83, 0xe5, 0x99, 0xf0, 0x30, 0x10, 0x4d, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x00, 0x2f, 0xf5, 0x82,
30653 +  0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x98, 0xf0, 0x80, 0x3a, 0x85, 0x99, 0x10, 0xe5, 0x10, 0xb5,
30654 +  0x47, 0x04, 0xd2, 0x09, 0x80, 0x2e, 0xe5, 0x10, 0xb5, 0x46, 0x04, 0xc2, 0x09, 0x80, 0x25}},
30655 + {0x0506, 64, { 0xaf, 0x39, 0x05, 0x39, 0x74, 0x00, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x10, 0xf0,
30656 +  0x30, 0x10, 0x11, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x00, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5,
30657 +  0x83, 0xe5, 0x98, 0xf0, 0xd2, 0x0f, 0xe5, 0x39, 0xc3, 0x95, 0x43, 0x40, 0x24, 0x90, 0x7f, 0xb6,
30658 +  0xe0, 0x30, 0xe1, 0x12, 0xe5, 0x39, 0xc3, 0x94, 0x40, 0x40, 0x16, 0x15, 0x39, 0x15, 0x39}},
30659 + {0x0546, 64, { 0x05, 0x2b, 0x43, 0x34, 0x01, 0x80, 0x0b, 0x90, 0x7f, 0xb9, 0xe5, 0x39, 0xf0, 0x75, 0x39, 0x00, 0xd2,
30660 +  0x02, 0xd2, 0x01, 0x30, 0x01, 0x05, 0xc2, 0x01, 0x02, 0x00, 0x56, 0xd0, 0xd0, 0xd0, 0x86, 0xd0,
30661 +  0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xbc, 0xe0, 0x20, 0xe1, 0x51, 0xe5, 0x34, 0x60,
30662 +  0x4d, 0xe5, 0x31, 0x70, 0x49, 0xe5, 0x34, 0x30, 0xe1, 0x08, 0xe4, 0xf5, 0x2f, 0x75, 0x34}},
30663 + {0x0586, 64, { 0x01, 0x80, 0x0b, 0xa2, 0x08, 0xe4, 0x33, 0xf5, 0x2f, 0xc2, 0x08, 0xe4, 0xf5, 0x34, 0xe4, 0xf5, 0x11,
30664 +  0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x11, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0d, 0x06,
30665 +  0xff, 0x74, 0x00, 0x25, 0x11, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x11,
30666 +  0xe5, 0x11, 0xb4, 0x0c, 0xdb, 0x90, 0x7f, 0xbd, 0x74, 0x0c, 0xf0, 0x75, 0x31, 0x10, 0x90}},
30667 + {0x05c6, 64, { 0x7f, 0xca, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x06, 0xf3, 0xe4, 0xf5, 0x11, 0x74, 0x40, 0x25, 0x11, 0xf5,
30668 +  0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x11, 0x7c, 0x00, 0x7b, 0x00, 0x24, 0x3b,
30669 +  0xf9, 0xec, 0x34, 0x00, 0xfa, 0xef, 0x12, 0x0d, 0x1f, 0x05, 0x11, 0xe5, 0x11, 0xb4, 0x18, 0xdb,
30670 +  0xe5, 0x3b, 0x60, 0x11, 0x75, 0xc9, 0x20, 0x75, 0xc8, 0x36, 0x85, 0x3c, 0xca, 0x85, 0x3d}},
30671 + {0x0606, 64, { 0xcb, 0xe4, 0x90, 0x7f, 0x9f, 0xf0, 0xe5, 0x3e, 0x13, 0x92, 0x10, 0x92, 0x9f, 0x85, 0x3f, 0x38, 0xe5,
30672 +  0x40, 0x13, 0x92, 0x16, 0xe5, 0x41, 0x60, 0x09, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfb, 0xf0, 0x80,
30673 +  0x07, 0x90, 0x7f, 0x98, 0xe0, 0x44, 0x04, 0xf0, 0xe5, 0x42, 0x60, 0x09, 0x90, 0x7f, 0x98, 0xe0,
30674 +  0x54, 0x7f, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0x98, 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x48, 0x60}},
30675 + {0x0646, 64, { 0x0b, 0xc2, 0x0c, 0xc2, 0x09, 0x90, 0x7f, 0x95, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x49, 0x60, 0x0c, 0xd2,
30676 +  0x09, 0x43, 0x34, 0x01, 0x90, 0x7f, 0x95, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x4a, 0x60, 0x0d, 0xc2,
30677 +  0xaf, 0xc2, 0x0b, 0xd2, 0x00, 0xe4, 0xf5, 0x53, 0xf5, 0x3a, 0xd2, 0xaf, 0xe5, 0x4b, 0x60, 0x05,
30678 +  0x30, 0x16, 0x02, 0xd2, 0x09, 0xe5, 0x4c, 0x60, 0x15, 0x90, 0x7f, 0x95, 0xe0, 0x54, 0xfd}},
30679 + {0x0686, 64, { 0xf0, 0x90, 0x7f, 0x9e, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x4d,
30680 +  0x60, 0x0a, 0xd2, 0x9c, 0xc2, 0x98, 0x75, 0x2c, 0x01, 0x75, 0x31, 0x1e, 0xe5, 0x4e, 0x60, 0x07,
30681 +  0xc2, 0x9c, 0xe4, 0xf5, 0x39, 0xf5, 0x2c, 0xe5, 0x4f, 0x60, 0x03, 0xe4, 0xf5, 0x39, 0xe5, 0x50,
30682 +  0x60, 0x02, 0xd2, 0x07, 0xe5, 0x51, 0x60, 0x0a, 0xe5, 0x4d, 0x70, 0x02, 0xf5, 0x31, 0xe5}},
30683 + {0x06c6, 64, { 0x51, 0x42, 0x34, 0xe5, 0x52, 0x60, 0x1f, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74,
30684 +  0x12, 0xf0, 0x74, 0x32, 0xf0, 0x74, 0x13, 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x14, 0xf0, 0x74, 0x34,
30685 +  0xf0, 0xd2, 0x03, 0xd2, 0x02, 0xd2, 0x08, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0xa2, 0x0c, 0xe4, 0x33,
30686 +  0xff, 0x65, 0x29, 0x60, 0x05, 0x8f, 0x29, 0x43, 0x34, 0x01, 0xa2, 0x09, 0xe4, 0x33, 0xff}},
30687 + {0x0706, 64, { 0x65, 0x2a, 0x60, 0x05, 0x8f, 0x2a, 0x43, 0x34, 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0xff, 0x54, 0x08, 0x64,
30688 +  0x08, 0xfe, 0x65, 0x25, 0x60, 0x05, 0x8e, 0x25, 0x43, 0x34, 0x01, 0xef, 0x54, 0x10, 0x64, 0x10,
30689 +  0xfe, 0x65, 0x26, 0x60, 0x05, 0x8e, 0x26, 0x43, 0x34, 0x01, 0xef, 0x54, 0x40, 0x64, 0x40, 0xfe,
30690 +  0x65, 0x27, 0x60, 0x05, 0x8e, 0x27, 0x43, 0x34, 0x01, 0xef, 0x54, 0x20, 0x64, 0x20, 0xfe}},
30691 + {0x0746, 64, { 0x65, 0x28, 0x60, 0x05, 0x8e, 0x28, 0x43, 0x34, 0x01, 0x90, 0x7f, 0x9a, 0xe0, 0x54, 0x40, 0x64, 0x40,
30692 +  0xfe, 0x65, 0x2e, 0x60, 0x05, 0x8e, 0x2e, 0x43, 0x34, 0x01, 0x30, 0x07, 0x35, 0xc2, 0xaf, 0x30,
30693 +  0x02, 0x18, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0xe5, 0x39, 0x60, 0x09, 0x90, 0x7f, 0xb7,
30694 +  0xf0, 0xe4, 0xf5, 0x39, 0xc2, 0x02, 0xc2, 0x07, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0, 0x20}},
30695 + {0x0786, 64, { 0xe1, 0x0f, 0xe5, 0x39, 0x60, 0x09, 0x90, 0x7f, 0xb9, 0xf0, 0xe4, 0xf5, 0x39, 0xd2, 0x02, 0xc2, 0x07,
30696 +  0xd2, 0xaf, 0x20, 0x05, 0x3d, 0x30, 0x03, 0x1e, 0x90, 0x7f, 0xc6, 0xe0, 0x20, 0xe1, 0x33, 0x90,
30697 +  0x7e, 0x40, 0xe0, 0x13, 0x92, 0x0d, 0x75, 0x3a, 0x01, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x53, 0xd2,
30698 +  0x05, 0x75, 0x16, 0xff, 0x80, 0x1c, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x15, 0x90, 0x7d}},
30699 + {0x07c6, 64, { 0xc0, 0xe0, 0x13, 0x92, 0x0d, 0x75, 0x3a, 0x01, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x53, 0xd2, 0x05, 0x75,
30700 +  0x16, 0xff, 0x20, 0x14, 0x33, 0x20, 0x00, 0x06, 0xe5, 0x3a, 0x65, 0x53, 0x70, 0x2a, 0x30, 0x05,
30701 +  0x1a, 0x30, 0x03, 0x09, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x03, 0x80, 0x07, 0xe4, 0x90, 0x7f,
30702 +  0xc9, 0xf0, 0xd2, 0x03, 0xc2, 0x05, 0xe4, 0xf5, 0x53, 0xf5, 0x3a, 0x30, 0x0d, 0x0a, 0xc2}},
30703 + {0x0806, 64, { 0x0d, 0xc2, 0x00, 0x90, 0x7f, 0xbb, 0x74, 0x01, 0xf0, 0x30, 0x14, 0x03, 0x02, 0x09, 0x14, 0x20, 0x05,
30704 +  0x03, 0x02, 0x09, 0x14, 0x30, 0x0c, 0x03, 0x02, 0x09, 0x14, 0x30, 0x09, 0x03, 0x02, 0x09, 0x14,
30705 +  0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x60, 0x03, 0x02, 0x09, 0x14, 0x30, 0x03, 0x61, 0x30, 0x10,
30706 +  0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83}},
30707 + {0x0846, 64, { 0xe0, 0x13, 0x92, 0x1b, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5,
30708 +  0x83, 0xe0, 0xfe, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x50, 0x2a, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05,
30709 +  0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf,
30710 +  0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5}},
30711 + {0x0886, 64, { 0x36, 0xd2, 0x0b, 0x80, 0x6a, 0xc2, 0x0b, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x03, 0x80, 0x5f, 0x30,
30712 +  0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83,
30713 +  0xe0, 0x13, 0x92, 0x1b, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d,
30714 +  0xf5, 0x83, 0xe0, 0xfe, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x50, 0x2a, 0x30, 0x10, 0x12, 0xaf}},
30715 + {0x08c6, 64, { 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e,
30716 +  0xaf, 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5,
30717 +  0x36, 0xd2, 0x0b, 0x80, 0x09, 0xc2, 0x0b, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x03, 0x30, 0x10,
30718 +  0x04, 0xa2, 0x1b, 0x92, 0x9b, 0xd2, 0x14, 0xc2, 0xaf, 0x8e, 0x99, 0x20, 0x0b, 0x0d, 0x30}},
30719 + {0x0906, 64, { 0x0d, 0x0a, 0xc2, 0x0d, 0xc2, 0x00, 0x90, 0x7f, 0xbb, 0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x22, 0x90, 0x7f,
30720 +  0xe9, 0xe0, 0x12, 0x0d, 0x31, 0x0a, 0x11, 0x00, 0x0a, 0x7e, 0x01, 0x0a, 0xdb, 0x03, 0x09, 0x38,
30721 +  0x06, 0x0a, 0x02, 0x08, 0x09, 0xf6, 0x09, 0x09, 0xde, 0x0a, 0x09, 0xed, 0x0b, 0x00, 0x00, 0x0b,
30722 +  0x19, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x5a, 0x24, 0x02, 0x60}},
30723 + {0x0946, 64, { 0x03, 0x02, 0x0b, 0x19, 0x74, 0x0d, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x87, 0x90, 0x7f, 0xd5, 0xf0, 0x02,
30724 +  0x0b, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82,
30725 +  0xd8, 0x75, 0x83, 0x0d, 0xef, 0xf0, 0x75, 0x82, 0xd1, 0x75, 0x83, 0x0d, 0xf0, 0x75, 0x82, 0xca,
30726 +  0x75, 0x83, 0x0d, 0xf0, 0x75, 0x82, 0xc3, 0x75, 0x83, 0x0d, 0xf0, 0x90, 0x7f, 0xea, 0xe0}},
30727 + {0x0986, 64, { 0x04, 0x75, 0x82, 0x9e, 0x75, 0x83, 0x0d, 0xf0, 0x74, 0x0d, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x99, 0x90,
30728 +  0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x0b, 0x75, 0x11, 0xff, 0x75,
30729 +  0x12, 0x0d, 0x75, 0x13, 0xdc, 0x80, 0x1b, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x0b, 0x75, 0x11,
30730 +  0xff, 0x75, 0x12, 0x0d, 0x75, 0x13, 0xe0, 0x80, 0x09, 0x75, 0x11, 0xff, 0x75, 0x12, 0x0d}},
30731 + {0x09c6, 64, { 0x75, 0x13, 0xf0, 0xaa, 0x12, 0xa9, 0x13, 0xae, 0x02, 0xee, 0x90, 0x7f, 0xd4, 0xf0, 0xaf, 0x01, 0xef,
30732 +  0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0x00, 0xe5, 0x15, 0xf0, 0x90, 0x7f, 0xb5,
30733 +  0x74, 0x01, 0xf0, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x15, 0x02, 0x0b, 0x20, 0x12,
30734 +  0x0c, 0xb1, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x14, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0x00, 0xe5}},
30735 + {0x0a06, 64, { 0x14, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f,
30736 +  0x60, 0x27, 0x14, 0x60, 0x34, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x19, 0xa2, 0x17, 0xe4, 0x33,
30737 +  0xff, 0x25, 0xe0, 0xff, 0xa2, 0x19, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0,
30738 +  0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x20, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3}},
30739 + {0x0a46, 64, { 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80,
30740 +  0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4,
30741 +  0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f,
30742 +  0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x17}},
30743 + {0x0a86, 64, { 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0b,
30744 +  0x19, 0xc2, 0x17, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x76, 0x90, 0x7f, 0xec, 0xe0,
30745 +  0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4,
30746 +  0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80}},
30747 + {0x0ac6, 64, { 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44,
30748 +  0x20, 0xf0, 0x80, 0x45, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x10, 0x24, 0x02, 0x70, 0x39,
30749 +  0x90, 0x7f, 0xea, 0xe0, 0x64, 0x01, 0x70, 0x2a, 0xd2, 0x17, 0x80, 0x2d, 0x90, 0x7f, 0xea, 0xe0,
30750 +  0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0}},
30751 + {0x0b06, 64, { 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0,
30752 +  0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0,
30753 +  0x22, 0xc2, 0x10, 0xe4, 0xf5, 0x14, 0xf5, 0x34, 0xc2, 0x09, 0xc2, 0x0c, 0xc2, 0x0b, 0xc2, 0x14,
30754 +  0xc2, 0x0d, 0xc2, 0x16, 0xc2, 0x11, 0xc2, 0x07, 0xc2, 0x12, 0xc2, 0x0f, 0xc2, 0x08, 0xf5}},
30755 + {0x0b46, 64, { 0x35, 0xf5, 0x39, 0xf5, 0x53, 0xf5, 0x3a, 0xf5, 0x33, 0xf5, 0x30, 0xf5, 0x2f, 0xf5, 0x2e, 0xf5, 0x2d,
30756 +  0xf5, 0x2c, 0xf5, 0x2b, 0xf5, 0x2a, 0xf5, 0x29, 0xf5, 0x28, 0xf5, 0x27, 0xf5, 0x26, 0xf5, 0x25,
30757 +  0xf5, 0x24, 0xc2, 0x05, 0xc2, 0x18, 0xc2, 0x1a, 0xc2, 0x17, 0xc2, 0x19, 0xc2, 0x15, 0xc2, 0x04,
30758 +  0xd2, 0x13, 0xc2, 0x06, 0xc2, 0x01, 0x90, 0x7f, 0x92, 0xe0, 0x54, 0xfd, 0xf0, 0xd2, 0xe8}},
30759 + {0x0b86, 64, { 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74,
30760 +  0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf,
30761 +  0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0f, 0xf0, 0x90, 0x7f, 0xac, 0x74, 0x0e,
30762 +  0xf0, 0xd2, 0xaf, 0xd2, 0xbc, 0xd2, 0x1b, 0x12, 0x0f, 0x5f, 0xc2, 0x18, 0x30, 0x04, 0x03}},
30763 + {0x0bc6, 64, { 0x12, 0x05, 0x6d, 0x30, 0x04, 0x2a, 0x30, 0x06, 0x27, 0xc2, 0x06, 0xe5, 0x16, 0x60, 0x16, 0x15, 0x16,
30764 +  0x90, 0x7f, 0xd8, 0xe0, 0x30, 0xe6, 0x04, 0x7f, 0x00, 0x80, 0x02, 0x7f, 0x20, 0x90, 0x7f, 0x96,
30765 +  0xef, 0xf0, 0x80, 0x06, 0x90, 0x7f, 0x96, 0x74, 0x20, 0xf0, 0x12, 0x0c, 0x0b, 0x80, 0xcd, 0x30,
30766 +  0x18, 0x07, 0xc2, 0x18, 0x12, 0x09, 0x15, 0x80, 0xc3, 0x30, 0x1a, 0xc0, 0xc2, 0x1a, 0x12}},
30767 + {0x0c06, 64, { 0x0f, 0xbb, 0x80, 0xb9, 0x22, 0xe5, 0x31, 0x60, 0x02, 0x15, 0x31, 0xe5, 0x39, 0x60, 0x55, 0x65, 0x35,
30768 +  0x70, 0x4b, 0xe5, 0x33, 0xf4, 0x60, 0x02, 0x05, 0x33, 0xe5, 0x33, 0xc3, 0x95, 0x44, 0x40, 0x43,
30769 +  0xc2, 0xaf, 0x30, 0x02, 0x1b, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x2d, 0x90, 0x7f, 0xb7, 0xe5,
30770 +  0x39, 0xf0, 0xc2, 0x02, 0xe4, 0xf5, 0x39, 0xf5, 0x33, 0xf5, 0x35, 0x75, 0x16, 0xff, 0x80}},
30771 + {0x0c46, 64, { 0x19, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7f, 0xb9, 0xe5, 0x39, 0xf0, 0xd2, 0x02, 0xe4,
30772 +  0xf5, 0x39, 0xf5, 0x33, 0xf5, 0x35, 0x75, 0x16, 0xff, 0xd2, 0xaf, 0x80, 0x06, 0x85, 0x39, 0x35,
30773 +  0xe4, 0xf5, 0x33, 0xe5, 0x2c, 0x60, 0x30, 0x20, 0x0f, 0x07, 0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe0,
30774 +  0x0f, 0xe5, 0x2d, 0x60, 0x06, 0xe4, 0xf5, 0x2d, 0x43, 0x34, 0x01, 0xe4, 0xf5, 0x30, 0x80}},
30775 + {0x0c86, 64, { 0x14, 0xe5, 0x30, 0xd3, 0x95, 0x45, 0x50, 0x0d, 0xe5, 0x30, 0xb5, 0x45, 0x06, 0x75, 0x2d, 0x01, 0x43,
30776 +  0x34, 0x01, 0x05, 0x30, 0xc2, 0x0f, 0x22, 0x90, 0x7f, 0xd9, 0xe0, 0x30, 0xe2, 0x04, 0x7f, 0x00,
30777 +  0x80, 0x02, 0x7f, 0x20, 0x90, 0x7f, 0x96, 0xef, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90,
30778 +  0x7f, 0x9c, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x96, 0x74, 0x20, 0xf0, 0x90, 0x7f, 0x94, 0x74}},
30779 + {0x0cc6, 64, { 0x01, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x97, 0x74, 0x86, 0xf0, 0x90, 0x7f, 0x95,
30780 +  0x74, 0x03, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x84, 0xf0, 0x90, 0x7f, 0x98, 0xf0, 0xe4, 0x90, 0x7f,
30781 +  0xc7, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x90, 0x7f, 0xcb, 0xf0, 0x75, 0x98, 0x40, 0x43, 0xa8, 0x10,
30782 +  0x90, 0x7f, 0xde, 0x74, 0x1f, 0xf0, 0x90, 0x7f, 0xdf, 0x74, 0x0f, 0xf0, 0xd2, 0x04, 0x22}},
30783 + {0x0d06, 64, { 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3,
30784 +  0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xf0,
30785 +  0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8, 0xe4,
30786 +  0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93}},
30787 + {0x0d46, 64, { 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80, 0xdf,
30788 +  0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90,
30789 +  0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0,
30790 +  0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00}},
30791 + {0x0d86, 64, { 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00, 0x00, 0x40, 0xcd, 0x06, 0x0c, 0x01, 0x01, 0x00, 0x01, 0x02,
30792 +  0x00, 0x02, 0x09, 0x02, 0x43, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00, 0x00, 0x07,
30793 +  0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40,
30794 +  0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x81, 0x02, 0x40, 0x00}},
30795 + {0x0dc6, 64, { 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x83, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05,
30796 +  0x84, 0x02, 0x40, 0x00, 0x01, 0x04, 0x03, 0x09, 0x04, 0x10, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79,
30797 +  0x00, 0x73, 0x00, 0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x0e, 0x03, 0x53, 0x00, 0x65, 0x00, 0x72,
30798 +  0x00, 0x69, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x02, 0x0e, 0xa2, 0x00, 0x02, 0x0e}},
30799 + {0x0e06, 64, { 0x7b, 0x00, 0x02, 0x0d, 0x57, 0x00, 0x02, 0x0e, 0xc9, 0x00, 0x02, 0x0e, 0x10, 0x00, 0x02, 0x0e, 0x14,
30800 +  0x00, 0x02, 0x0e, 0x18, 0x00, 0x02, 0x0e, 0x1c, 0x00, 0x02, 0x0e, 0xf0, 0x00, 0x02, 0x0e, 0x24,
30801 +  0x00, 0x02, 0x0f, 0x15, 0x00, 0x02, 0x0e, 0x2c, 0x00, 0x02, 0x0f, 0x3a, 0xe4, 0x90, 0x7f, 0x95,
30802 +  0xf0, 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0x02}},
30803 + {0x0e46, 64, { 0xf0, 0x90, 0x7f, 0x97, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x10, 0xf0, 0xe4, 0x90, 0x7f,
30804 +  0x96, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xfe, 0xf0, 0x30, 0x17, 0x04, 0x7f, 0x80, 0x80, 0x02, 0x7f,
30805 +  0x00, 0x90, 0x7f, 0x97, 0xef, 0xf0, 0xe4, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0xf0, 0x90,
30806 +  0x7f, 0x98, 0xf0, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0}},
30807 + {0x0e86, 64, { 0x86, 0x75, 0x86, 0x00, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x02, 0xf0, 0xd2, 0x06, 0xd0, 0x86,
30808 +  0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0,
30809 +  0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90,
30810 +  0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83}},
30811 + {0x0ec6, 64, { 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86,
30812 +  0x00, 0xd2, 0x1a, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84,
30813 +  0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0,
30814 +  0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74}},
30815 + {0x0f06, 64, { 0x02, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0,
30816 +  0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x53, 0x91, 0xef,
30817 +  0x90, 0x7f, 0xa9, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83,
30818 +  0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86}},
30819 + {0x0f46, 64, { 0x75, 0x86, 0x00, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0,
30820 +  0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0,
30821 +  0x44, 0x08, 0xf0, 0x30, 0x1b, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x00,
30822 +  0x03, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0, 0x22, 0x74, 0x00}},
30823 + {0x0f86, 64, { 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f,
30824 +  0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x90, 0x7f,
30825 +  0xd6, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x0d, 0x7e, 0x00, 0x12, 0x00, 0x03, 0x90, 0x7f, 0xd6, 0xe0,
30826 +  0x54, 0xfe, 0xf0, 0x22, 0x12, 0x0e, 0x33, 0x12, 0x0f, 0x95, 0x90, 0x7f, 0xd6, 0xe0, 0x30}},
30827 + {0x0fc6,  9, { 0xe7, 0x03, 0x12, 0x0f, 0xa5, 0x12, 0x0c, 0xb1, 0x22}},
30828 + {0xffff,      0,      {0x00}}
30829 +};
30830 diff -Nur linux-2.4.19.old/drivers/usb/serial/keyspan_usa19qw_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa19qw_fw.h
30831 --- linux-2.4.19.old/drivers/usb/serial/keyspan_usa19qw_fw.h    Thu Jan  1 01:00:00 1970
30832 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa19qw_fw.h        Mon Nov 25 12:27:09 2002
30833 @@ -0,0 +1,448 @@
30834 +/* keyspan_usa19qw_fw.h
30835 +
30836 +       The firmware contained herein as keyspan_usa19wq_fw.h is
30837 +
30838 +               Copyright (C) 1999-2001
30839 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
30840 +               
30841 +       as an unpublished work. This notice does not imply unrestricted or
30842 +       public access to the source code from which this firmware image is
30843 +       derived.  Except as noted below this firmware image may not be 
30844 +       reproduced, used, sold or transferred to any third party without 
30845 +       Keyspan's prior written consent.  All Rights Reserved.
30846 +
30847 +       Permission is hereby granted for the distribution of this firmware 
30848 +       image as part of a Linux or other Open Source operating system kernel 
30849 +       in text or binary form as required. 
30850 +
30851 +       This firmware may not be modified and may only be used with  
30852 +       Keyspan hardware.  Distribution and/or Modification of the 
30853 +       keyspan.c driver which includes this firmware, in whole or in 
30854 +       part, requires the inclusion of this statement."
30855 +
30856 +*/
30857 +
30858 +static const struct ezusb_hex_record keyspan_usa19qw_firmware[] = {
30859 + {0x0033,  3, { 0x02, 0x00, 0x2d}},
30860 + {0x002d,  4, { 0x53, 0xd8, 0xef, 0x32}},
30861 + {0x0046, 16, { 0x30, 0x10, 0x19, 0x12, 0x0e, 0x0f, 0xef, 0xc3, 0x95, 0x14, 0x40, 0x03, 0x02, 0x00, 0xdf, 0x90}},
30862 + {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x10, 0xc2, 0x0b, 0x02, 0x00, 0xdf, 0x30, 0x0d, 0x3e, 0x90}},
30863 + {0x0066, 16, { 0x7f, 0xc6, 0xe0, 0x20, 0xe1, 0x73, 0x12, 0x0e, 0x0f, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x6a, 0x90}},
30864 + {0x0076, 16, { 0x7e, 0x40, 0xe0, 0x13, 0x92, 0x10, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x36, 0x20, 0x0b, 0x11}},
30865 + {0x0086, 16, { 0x60, 0x0f, 0xf5, 0x24, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x29, 0x7e, 0x75, 0x2a, 0x41, 0x12, 0x09}},
30866 + {0x0096, 16, { 0x10, 0xc2, 0x0d, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x75, 0x26, 0xff, 0x80, 0x3c, 0x90, 0x7f, 0xc8}},
30867 + {0x00a6, 16, { 0xe0, 0x20, 0xe1, 0x35, 0x12, 0x0e, 0x0f, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x2c, 0x90, 0x7d, 0xc0}},
30868 + {0x00b6, 16, { 0xe0, 0x13, 0x92, 0x10, 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x36, 0x20, 0x0b, 0x11, 0x60, 0x0f}},
30869 + {0x00c6, 16, { 0xf5, 0x24, 0x7e, 0x7d, 0x7f, 0xc1, 0x75, 0x29, 0x7d, 0x75, 0x2a, 0xc1, 0x12, 0x09, 0x10, 0xd2}},
30870 + {0x00d6, 16, { 0x0d, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0x75, 0x26, 0xff, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03}},
30871 + {0x00e6, 16, { 0x02, 0x01, 0x68, 0x12, 0x0c, 0xff, 0x8f, 0x36, 0x12, 0x0e, 0x1b, 0x8f, 0x11, 0xe5, 0x36, 0xc3}},
30872 + {0x00f6, 16, { 0x95, 0x13, 0x50, 0x0f, 0x12, 0x0d, 0xde, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x11, 0x20, 0xe7, 0x03}},
30873 + {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
30874 + {0x0043,  3, { 0x02, 0x0e, 0x00}},
30875 + {0x0003, 16, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90}},
30876 + {0x0013, 16, { 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0}},
30877 + {0x0023, 10, { 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32}},
30878 + {0x0000,  3, { 0x02, 0x09, 0xc5}},
30879 + {0x0106, 64, { 0x30, 0x13, 0x5f, 0xc2, 0x13, 0xe5, 0x36, 0x60, 0x59, 0xb4, 0x80, 0x03, 0x43, 0x11, 0x02, 0xe5, 0x11,
30880 +  0x30, 0xe7, 0x24, 0xe5, 0x36, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x36, 0x20, 0x85, 0x36, 0x24,
30881 +  0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x29, 0x7e, 0x75, 0x2a, 0x80, 0x12, 0x0b, 0x9a, 0xe5, 0x36, 0x25,
30882 +  0xe0, 0x90, 0x7f, 0xb7, 0xf0, 0x80, 0x2a, 0xe5, 0x36, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75}},
30883 + {0x0146, 64, { 0x36, 0x3f, 0x85, 0x36, 0x24, 0x90, 0x7e, 0x80, 0xe5, 0x11, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x29,
30884 +  0x7e, 0x75, 0x2a, 0x81, 0x12, 0x09, 0x35, 0xe5, 0x36, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x75, 0x26,
30885 +  0xff, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x0e, 0x03, 0x02, 0x03, 0xc4, 0xe4, 0xf5,
30886 +  0x35, 0x74, 0x40, 0x25, 0x35, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5}},
30887 + {0x0186, 64, { 0x35, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
30888 +  0x12, 0x0a, 0x97, 0x05, 0x35, 0xe5, 0x35, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x6e,
30889 +  0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12, 0x0c, 0xda, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12,
30890 +  0x0c, 0x1c, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12, 0x0c, 0x42, 0xd2, 0x11, 0xd2, 0x12, 0x75}},
30891 + {0x01c6, 64, { 0x36, 0x04, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x05, 0xc2, 0x12, 0x43, 0x36, 0xc0, 0x90, 0x7e, 0x04, 0xe0,
30892 +  0xb4, 0x01, 0x07, 0xc2, 0x12, 0x43, 0x36, 0x0b, 0x80, 0x10, 0x90, 0x7e, 0x04, 0xe0, 0x60, 0x07,
30893 +  0xc2, 0x11, 0x43, 0x36, 0x09, 0x80, 0x03, 0x43, 0x36, 0x02, 0x7f, 0x03, 0xad, 0x36, 0x12, 0x0c,
30894 +  0xda, 0x43, 0x1a, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x1a}},
30895 + {0x0206, 64, { 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x17, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
30896 +  0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x19, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
30897 +  0x90, 0xc0, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7e, 0x07, 0xe0, 0x60, 0x42, 0x90, 0x7e, 0x13, 0xe0,
30898 +  0x60, 0x05, 0x43, 0x16, 0x04, 0x80, 0x03, 0x53, 0x16, 0xfb, 0xe4, 0xff, 0xad, 0x16, 0x12}},
30899 + {0x0246, 64, { 0x0c, 0xda, 0x90, 0x7e, 0x08, 0xe0, 0x60, 0x05, 0x43, 0x18, 0x80, 0x80, 0x03, 0x53, 0x18, 0x7f, 0x53,
30900 +  0x18, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x18, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x0c,
30901 +  0x8e, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x0c, 0xb4, 0xaf, 0x18, 0x12, 0x0c, 0x68, 0x90, 0x7e,
30902 +  0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x1a, 0x01, 0x80, 0x03, 0x53, 0x1a}},
30903 + {0x0286, 64, { 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x1a, 0xf0, 0x90, 0x7e, 0x0c, 0xe0,
30904 +  0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x1a, 0x02, 0x80, 0x03, 0x53, 0x1a, 0xfd, 0x90, 0x7f,
30905 +  0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x1a, 0xf0, 0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x13,
30906 +  0xa3, 0xe0, 0x13, 0x92, 0x14, 0xa3, 0xe0, 0xf5, 0x14, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x1a}},
30907 + {0x02c6, 64, { 0x10, 0x80, 0x03, 0x53, 0x1a, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x1a,
30908 +  0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x19, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
30909 +  0xe5, 0x19, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x12, 0x0d,
30910 +  0xd2, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x16, 0xfd, 0xe4, 0xff, 0xad, 0x16}},
30911 + {0x0306, 64, { 0x12, 0x0c, 0xda, 0xe4, 0xf5, 0x0e, 0xf5, 0x0d, 0xd2, 0x0f, 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43,
30912 +  0x16, 0x02, 0xe4, 0xff, 0xad, 0x16, 0x12, 0x0c, 0xda, 0x75, 0x0d, 0x01, 0xd2, 0x0f, 0x90, 0x7e,
30913 +  0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x17, 0x44, 0x04, 0x90, 0xc0,
30914 +  0x00, 0xf0, 0xd2, 0x0b, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11, 0x43, 0x19, 0x40, 0x90, 0x7f}},
30915 + {0x0346, 64, { 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x19, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60,
30916 +  0x0f, 0x53, 0x16, 0xfe, 0xe4, 0xff, 0xad, 0x16, 0x12, 0x0c, 0xda, 0x75, 0x0f, 0x01, 0xd2, 0x0f,
30917 +  0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x16, 0x01, 0xe4, 0xff, 0xad, 0x16, 0x12, 0x0c, 0xda,
30918 +  0xe4, 0xf5, 0x0f, 0xd2, 0x0f, 0x90, 0x7e, 0x1c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74}},
30919 + {0x0386, 64, { 0x12, 0xf0, 0xe5, 0x17, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2,
30920 +  0x13, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x10, 0x01, 0xe4, 0xf5, 0x12, 0xd2, 0x0f, 0x90,
30921 +  0x7e, 0x1f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15,
30922 +  0xf0, 0x74, 0x35, 0xf0, 0xd2, 0x0d, 0xc2, 0x0e, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30, 0x16}},
30923 + {0x03c6, 64, { 0x71, 0xe5, 0x12, 0x60, 0x02, 0x15, 0x12, 0xe5, 0x30, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x30, 0x80,
30924 +  0x60, 0x75, 0x30, 0x0a, 0x12, 0x0d, 0xd2, 0xef, 0x54, 0x01, 0xf5, 0x36, 0x65, 0x0e, 0x60, 0x07,
30925 +  0x85, 0x36, 0x0e, 0xd2, 0x0f, 0x80, 0x11, 0x12, 0x0e, 0x27, 0xef, 0x54, 0x10, 0xf5, 0x36, 0x65,
30926 +  0x09, 0x60, 0x05, 0x85, 0x36, 0x09, 0xd2, 0x0f, 0x12, 0x0e, 0x27, 0xef, 0x54, 0x80, 0xf5}},
30927 + {0x0406, 64, { 0x36, 0x65, 0x0a, 0x60, 0x05, 0x85, 0x36, 0x0a, 0xd2, 0x0f, 0x12, 0x0e, 0x27, 0xef, 0x54, 0x20, 0xf5,
30928 +  0x36, 0x65, 0x0b, 0x60, 0x08, 0x85, 0x36, 0x0b, 0x30, 0x11, 0x02, 0xd2, 0x0f, 0x12, 0x0e, 0x27,
30929 +  0xef, 0x54, 0x40, 0xf5, 0x36, 0x65, 0x0c, 0x60, 0x08, 0x85, 0x36, 0x0c, 0x30, 0x12, 0x02, 0xd2,
30930 +  0x0f, 0x30, 0x16, 0x2a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0}},
30931 + {0x0446, 64, { 0x60, 0x09, 0xe0, 0xf5, 0x32, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x33, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09,
30932 +  0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f,
30933 +  0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x05, 0x29, 0xe5, 0x27, 0x70, 0x40, 0x30, 0x0f, 0x39, 0xe5,
30934 +  0x12, 0x70, 0x35, 0xc2, 0x0f, 0xf5, 0x35, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x08, 0x25, 0x35}},
30935 + {0x0486, 64, { 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0a, 0x51, 0xff, 0x74, 0x80, 0x25, 0x35, 0xf5, 0x82, 0xe4, 0x34,
30936 +  0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x35, 0xe5, 0x35, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74,
30937 +  0x09, 0xf0, 0x75, 0x12, 0x10, 0xe4, 0xf5, 0x10, 0x75, 0x27, 0x02, 0x22, 0xe5, 0x27, 0x64, 0x02,
30938 +  0x70, 0x36, 0x30, 0x05, 0x2f, 0xc2, 0x05, 0xf5, 0x35, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2b}},
30939 + {0x04c6, 64, { 0x25, 0x35, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0a, 0x51, 0xff, 0x74, 0x80, 0x25, 0x35, 0xf5, 0x82,
30940 +  0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x35, 0xe5, 0x35, 0xb4, 0x05, 0xdb, 0x90, 0x7f,
30941 +  0xc3, 0x74, 0x05, 0xf0, 0x75, 0x27, 0x03, 0x22, 0xe5, 0x32, 0x60, 0x33, 0x75, 0x31, 0x03, 0x15,
30942 +  0x32, 0xe4, 0xf5, 0x35, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x31, 0x25, 0x35, 0xf9, 0xee, 0x34}},
30943 + {0x0506, 64, { 0x00, 0xfa, 0x12, 0x0a, 0x51, 0xff, 0x74, 0x80, 0x25, 0x35, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83,
30944 +  0xef, 0xf0, 0x05, 0x35, 0xe5, 0x35, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4,
30945 +  0xf5, 0x27, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0a, 0xa9, 0x06, 0x08, 0x00, 0x06, 0x7c, 0x01,
30946 +  0x06, 0xe9, 0x03, 0x05, 0x4d, 0x06, 0x05, 0xf9, 0x08, 0x05, 0xed, 0x09, 0x05, 0xd5, 0x0a}},
30947 + {0x0546, 64, { 0x05, 0xe4, 0x0b, 0x00, 0x00, 0x07, 0x39, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60,
30948 +  0x50, 0x24, 0x02, 0x70, 0x6f, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5,
30949 +  0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03,
30950 +  0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19, 0xf0}},
30951 + {0x0586, 64, { 0x75, 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83,
30952 +  0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x07,
30953 +  0x40, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0b, 0x1c, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f,
30954 +  0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xb4, 0xe0, 0x44}},
30955 + {0x05c6, 64, { 0x01, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f,
30956 +  0x00, 0xe5, 0x25, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xea,
30957 +  0xe0, 0xf5, 0x25, 0x02, 0x07, 0x40, 0x12, 0x07, 0x48, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x23, 0x02,
30958 +  0x07, 0x40, 0x90, 0x7f, 0x00, 0xe5, 0x23, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02}},
30959 + {0x0606, 64, { 0x07, 0x40, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b,
30960 +  0xa2, 0x01, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x07, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00,
30961 +  0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x07, 0x40, 0xe4, 0x90, 0x7f,
30962 +  0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f}},
30963 + {0x0646, 64, { 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24,
30964 +  0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4,
30965 +  0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
30966 +  0x01, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1e, 0x24, 0x02}},
30967 + {0x0686, 64, { 0x60, 0x03, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x06, 0x12, 0x0d, 0xf9, 0x02, 0x07,
30968 +  0x40, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xea, 0xe0, 0x70,
30969 +  0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07,
30970 +  0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90}},
30971 + {0x06c6, 64, { 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90,
30972 +  0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x60, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0,
30973 +  0x80, 0x57, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x24, 0x02, 0x70, 0x4b, 0x90, 0x7f,
30974 +  0xea, 0xe0, 0xb4, 0x01, 0x05, 0x12, 0x0d, 0xf6, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44}},
30975 + {0x0706, 64, { 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80,
30976 +  0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4,
30977 +  0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0,
30978 +  0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02}},
30979 + {0x0746, 64, { 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x96, 0x74,
30980 +  0x20, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f,
30981 +  0x98, 0x74, 0x10, 0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde,
30982 +  0xf0, 0xe4, 0xf5, 0x08, 0x7f, 0x01, 0x7b, 0x00, 0x74, 0x08, 0x2f, 0xf9, 0xe4, 0x34, 0x00}},
30983 + {0x0786, 64, { 0xfa, 0xe4, 0x12, 0x0a, 0x97, 0x0f, 0xbf, 0x09, 0xee, 0x75, 0x13, 0x01, 0xe4, 0xf5, 0x12, 0xf5, 0x30,
30984 +  0xf5, 0x11, 0xc2, 0x0f, 0xc2, 0x13, 0xc2, 0x0e, 0xc2, 0x0b, 0xc2, 0x10, 0xc2, 0x04, 0x90, 0x7f,
30985 +  0x98, 0x74, 0x13, 0xf0, 0x75, 0x19, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4,
30986 +  0xfd, 0x12, 0x0c, 0xda, 0x7f, 0x10, 0x8f, 0x18, 0x12, 0x0c, 0x68, 0x90, 0x7f, 0x98, 0x74}},
30987 + {0x07c6, 64, { 0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x17, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x0f, 0xe4, 0xfd, 0x12,
30988 +  0x0c, 0xda, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x16, 0x12, 0x0c, 0xda, 0x90, 0x7f, 0x98,
30989 +  0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x0c, 0xda, 0x7f,
30990 +  0x01, 0x12, 0x0d, 0x6a, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x0c, 0xda, 0xe4, 0xff, 0xe5, 0x16}},
30991 + {0x0806, 64, { 0x54, 0x7f, 0xfd, 0x12, 0x0c, 0xda, 0x12, 0x0e, 0x0f, 0x8f, 0x15, 0xe4, 0xff, 0xe5, 0x16, 0x44, 0x80,
30992 +  0xfd, 0x12, 0x0c, 0xda, 0xe5, 0x15, 0x30, 0xe7, 0x04, 0xc2, 0x08, 0x80, 0x02, 0xd2, 0x08, 0x90,
30993 +  0x7f, 0x98, 0x74, 0x14, 0xf0, 0x75, 0x1a, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0xd2, 0x03,
30994 +  0x22, 0xd2, 0x15, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0, 0x12, 0x0d, 0xf9, 0xd2, 0xe8}},
30995 + {0x0846, 64, { 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74,
30996 +  0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf,
30997 +  0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0x74, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0x16, 0x12, 0x0d,
30998 +  0x24, 0xc2, 0x02, 0xe4, 0xf5, 0x28, 0xf5, 0x30, 0xc2, 0x09, 0xf5, 0x23, 0xc2, 0x03, 0x90}},
30999 + {0x0886, 64, { 0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x34, 0x60, 0x48, 0x30, 0x03, 0x05, 0xd2, 0x16,
31000 +  0x12, 0x00, 0x46, 0xe5, 0x0f, 0x60, 0x22, 0xe5, 0x26, 0x60, 0x16, 0x15, 0x26, 0x90, 0x7f, 0xd8,
31001 +  0xe0, 0x30, 0xe6, 0x04, 0x7f, 0x20, 0x80, 0x02, 0x7f, 0x30, 0x90, 0x7f, 0x96, 0xef, 0xf0, 0x80,
31002 +  0x1a, 0x90, 0x7f, 0x96, 0x74, 0x30, 0xf0, 0x80, 0x12, 0x90, 0x7f, 0xd9, 0xe0, 0x30, 0xe2}},
31003 + {0x08c6, 64, { 0x04, 0x7f, 0x30, 0x80, 0x02, 0x7f, 0x20, 0x90, 0x7f, 0x96, 0xef, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0xf5,
31004 +  0x34, 0x80, 0x20, 0x30, 0x03, 0x07, 0xc2, 0x16, 0x12, 0x00, 0x46, 0x80, 0x16, 0xe5, 0x0f, 0x70,
31005 +  0x12, 0x90, 0x7f, 0xd9, 0xe0, 0x30, 0xe2, 0x04, 0x7f, 0x30, 0x80, 0x02, 0x7f, 0x20, 0x90, 0x7f,
31006 +  0x96, 0xef, 0xf0, 0x30, 0x02, 0x07, 0xc2, 0x02, 0x12, 0x05, 0x2a, 0x80, 0x86, 0x30, 0x0a}},
31007 + {0x0906, 64, { 0x83, 0xc2, 0x0a, 0x12, 0x0b, 0x5d, 0x02, 0x08, 0x8a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf,
31008 +  0x24, 0xe5, 0x2a, 0xf5, 0x82, 0xe5, 0x29, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00,
31009 +  0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f,
31010 +  0x98, 0x74, 0x10, 0xf0, 0xaf, 0x24, 0xe5, 0x2a, 0xf5, 0x82, 0xe5, 0x29, 0xf5, 0x83, 0xc2}},
31011 + {0x0946, 64, { 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86,
31012 +  0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x24, 0xe5, 0x2a, 0xf5, 0x82, 0xe5,
31013 +  0x29, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86,
31014 +  0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf}},
31015 + {0x0986, 64, { 0x24, 0xe5, 0x2a, 0xf5, 0x82, 0xe5, 0x29, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0,
31016 +  0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5,
31017 +  0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f,
31018 +  0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x78}},
31019 + {0x09c6, 64, { 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x39, 0x02, 0x0a, 0x0c, 0x02, 0x08, 0x38, 0xe4, 0x93, 0xa3,
31020 +  0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4,
31021 +  0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8,
31022 +  0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02}},
31023 + {0x0a06, 64, { 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x0d, 0x8b, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff,
31024 +  0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54,
31025 +  0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4,
31026 +  0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82}},
31027 + {0x0a46, 64, { 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a,
31028 +  0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83,
31029 +  0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83,
31030 +  0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25}},
31031 + {0x0a86, 64, { 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22,
31032 +  0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01,
31033 +  0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d,
31034 +  0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02}},
31035 + {0x0ac6, 64, { 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c,
31036 +  0x74, 0x20, 0xf0, 0x30, 0x01, 0x03, 0xff, 0x80, 0x02, 0x7f, 0x00, 0x90, 0x7f, 0x96, 0xef, 0xf0,
31037 +  0xe4, 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0,
31038 +  0x30, 0x08, 0x11, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0xff, 0xf0, 0x90, 0x7f}},
31039 + {0x0b06, 64, { 0x98, 0x74, 0x20, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0xdf, 0xf0, 0xe4,
31040 +  0x90, 0x7f, 0x98, 0xf0, 0x22, 0x8f, 0x35, 0xe4, 0xf5, 0x36, 0x75, 0x37, 0xff, 0x75, 0x38, 0x19,
31041 +  0x75, 0x39, 0x86, 0xab, 0x37, 0xaa, 0x38, 0xa9, 0x39, 0x90, 0x00, 0x01, 0x12, 0x0a, 0x6a, 0xb4,
31042 +  0x03, 0x1d, 0xaf, 0x36, 0x05, 0x36, 0xef, 0xb5, 0x35, 0x01, 0x22, 0x12, 0x0a, 0x51, 0x7e}},
31043 + {0x0b46, 64, { 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x37, 0xff, 0xf5, 0x38, 0x89, 0x39, 0x80, 0xd4, 0x7b,
31044 +  0x00, 0x7a, 0x00, 0x79, 0x00, 0x22, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x35, 0x12, 0x0a, 0xcf, 0x20,
31045 +  0x08, 0x07, 0x90, 0x7f, 0x92, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0,
31046 +  0x12, 0x09, 0xb5, 0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0x0e, 0x30, 0x01, 0x05, 0x12, 0x0d}},
31047 + {0x0b86, 64, { 0xbc, 0x80, 0x06, 0x12, 0x0d, 0x49, 0xef, 0x60, 0xe1, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0, 0x12,
31048 +  0x07, 0x48, 0x22, 0x05, 0x2a, 0xe5, 0x2a, 0xae, 0x29, 0x70, 0x02, 0x05, 0x29, 0x14, 0xf5, 0x82,
31049 +  0x8e, 0x83, 0xe5, 0x11, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x2a, 0xe5, 0x2a, 0xac, 0x29, 0x70, 0x02,
31050 +  0x05, 0x29, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x24, 0xe5, 0x24, 0x60, 0x07}},
31051 + {0x0bc6, 64, { 0x12, 0x0e, 0x1b, 0x8f, 0x11, 0x80, 0xcd, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0,
31052 +  0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x02, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01,
31053 +  0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0,
31054 +  0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x0a}},
31055 + {0x0c06, 64, { 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82,
31056 +  0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
31057 +  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
31058 +  0x13, 0xf0, 0xe5, 0x19, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74}},
31059 + {0x0c46, 64, { 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00,
31060 +  0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x19, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
31061 +  0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98,
31062 +  0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5}},
31063 + {0x0c86, 64, { 0x19, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00,
31064 +  0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
31065 +  0x98, 0x74, 0x13, 0xf0, 0xe5, 0x19, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98,
31066 +  0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0}},
31067 + {0x0cc6, 64, { 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x19, 0x54, 0x7f, 0x90, 0xc0,
31068 +  0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x19, 0x54, 0x7f, 0x90, 0xc0, 0x00,
31069 +  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
31070 +  0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x0d, 0xea, 0x8f, 0x37, 0x12, 0x0d}},
31071 + {0x0d06, 64, { 0xea, 0x8f, 0x38, 0xe5, 0x37, 0x65, 0x38, 0x60, 0x12, 0x12, 0x0d, 0xea, 0x8f, 0x37, 0xe5, 0x37, 0x65,
31072 +  0x38, 0x60, 0x07, 0x12, 0x0d, 0xea, 0x8f, 0x38, 0x80, 0xe8, 0xaf, 0x37, 0x22, 0x90, 0x7f, 0xd6,
31073 +  0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x16, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f,
31074 +  0xf4, 0x7e, 0x01, 0x12, 0x0d, 0xa5, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44}},
31075 + {0x0d46, 64, { 0x04, 0xf0, 0x22, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x36, 0x12, 0x07, 0x48, 0x12, 0x0e, 0x27, 0xef, 0x30,
31076 +  0xe6, 0x0b, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x36, 0x60, 0xf1, 0x7f, 0x01, 0x22, 0x12, 0x0a, 0xcf,
31077 +  0x7f, 0x00, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x16, 0x54, 0x7f, 0xfd, 0x12, 0x0c, 0xda, 0x90,
31078 +  0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x16, 0x44, 0x80}},
31079 + {0x0d86, 64, { 0xfd, 0x12, 0x0c, 0xda, 0x22, 0x05, 0x2b, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x31, 0x03, 0x00, 0x00,
31080 +  0xc1, 0x86, 0xc1, 0x02, 0xc1, 0x0a, 0xc1, 0x01, 0xc1, 0x07, 0x01, 0x27, 0x00, 0x00, 0x8e, 0x36,
31081 +  0x8f, 0x37, 0xe5, 0x37, 0x15, 0x37, 0xae, 0x36, 0x70, 0x02, 0x15, 0x36, 0x4e, 0x60, 0x05, 0x12,
31082 +  0x09, 0xa4, 0x80, 0xee, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x0d, 0x7e}},
31083 + {0x0dc6, 64, { 0x00, 0x12, 0x0d, 0xa5, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x11,
31084 +  0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00,
31085 +  0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0xd2,
31086 +  0x01, 0x22, 0xc2, 0x01, 0x22, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0b, 0xce, 0x00, 0x02, 0x0e}},
31087 + {0x0e06, 64, { 0x04, 0x00, 0x02, 0x00, 0x03, 0x00, 0x02, 0x0b, 0xf5, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0,
31088 +  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
31089 +  0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x00, 0x00, 0x00, 0x00,
31090 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31091 + {0x0e46, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31092 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31093 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31094 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31095 + {0x0e86, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31096 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31097 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31098 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31099 + {0x0ec6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31100 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31101 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31102 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31103 + {0x0f06, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31104 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31105 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31106 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31107 + {0x0f46, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31108 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31109 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31110 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31111 + {0x0f86, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31112 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31113 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31114 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31115 + {0x0fc6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31116 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31117 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31118 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31119 + {0x1006, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31120 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31121 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31122 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31123 + {0x1046, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31124 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31125 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31126 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31127 + {0x1086, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31128 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31129 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31130 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31131 + {0x10c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31132 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31133 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31134 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31135 + {0x1106, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31136 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31137 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31138 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31139 + {0x1146, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31140 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31141 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31142 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31143 + {0x1186, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31144 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31145 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31146 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31147 + {0x11c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31148 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31149 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31150 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31151 + {0x1206, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31152 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31153 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31154 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31155 + {0x1246, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31156 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31157 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31158 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31159 + {0x1286, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31160 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31161 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31162 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31163 + {0x12c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31164 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31165 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31166 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31167 + {0x1306, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31168 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31169 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31170 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31171 + {0x1346, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31172 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31173 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31174 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31175 + {0x1386, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31176 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31177 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31178 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31179 + {0x13c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31180 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31181 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31182 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31183 + {0x1406, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31184 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31185 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31186 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31187 + {0x1446, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31188 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31189 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31190 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31191 + {0x1486, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31192 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31193 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31194 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31195 + {0x14c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31196 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31197 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31198 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31199 + {0x1506, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31200 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31201 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31202 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31203 + {0x1546, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31204 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31205 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31206 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31207 + {0x1586, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31208 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31209 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31210 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31211 + {0x15c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31212 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31213 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31214 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31215 + {0x1606, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31216 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31217 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31218 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31219 + {0x1646, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31220 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31221 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31222 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31223 + {0x1686, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31224 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31225 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31226 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31227 + {0x16c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31228 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31229 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31230 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31231 + {0x1706, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31232 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31233 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31234 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31235 + {0x1746, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31236 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31237 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31238 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31239 + {0x1786, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31240 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31241 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31242 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31243 + {0x17c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31244 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31245 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31246 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31247 + {0x1806, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31248 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31249 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31250 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31251 + {0x1846, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31252 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31253 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31254 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31255 + {0x1886, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31256 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31257 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31258 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31259 + {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31260 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31261 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31262 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
31263 + {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x19, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
31264 +  0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
31265 +  0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
31266 +  0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x05, 0x02, 0x40, 0x00}},
31267 + {0x1946, 64, { 0x00, 0x07, 0x05, 0x06, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05,
31268 +  0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x83, 0x02,
31269 +  0x40, 0x00, 0x01, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
31270 +  0x01, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x01}},
31271 + {0x1986, 64, { 0x04, 0x03, 0x09, 0x04, 0x48, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61,
31272 +  0x00, 0x6e, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x61, 0x00, 0x20, 0x00, 0x64, 0x00, 0x69, 0x00, 0x76,
31273 +  0x00, 0x69, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x6f, 0x00, 0x66,
31274 +  0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x53, 0x00, 0x79, 0x00}},
31275 + {0x19c6, 64, { 0x73, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x2e, 0x00, 0x36, 0x03, 0x4b, 0x00, 0x65,
31276 +  0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x55, 0x00, 0x53,
31277 +  0x00, 0x42, 0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c,
31278 +  0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
31279 + {0x1a06,  4, { 0x72, 0x00, 0x00, 0x00}},
31280 + {0xffff, 0,   {0x00}}
31281 +};
31282 diff -Nur linux-2.4.19.old/drivers/usb/serial/keyspan_usa19w_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa19w_fw.h
31283 --- linux-2.4.19.old/drivers/usb/serial/keyspan_usa19w_fw.h     Wed Oct 10 00:15:02 2001
31284 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa19w_fw.h Mon Nov 25 12:27:09 2002
31285 @@ -1,108 +1,112 @@
31286  /* keyspan_usa19w_fw.h
31287 -  
31288 -   Generated from Keyspan firmware image usa17code.h Sat Oct  6 12:13:03 EST 2001
31289 -   This firmware is for the Keyspan USA-19W Serial Adaptor
31290  
31291 -   "The firmware contained herein as keyspan_usa19w_fw.h is
31292 -   Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
31293 -   ("Keyspan"), as an unpublished work.  This notice does not imply
31294 -   unrestricted or public access to this firmware which is a trade secret of
31295 -   Keyspan, and which may not be reproduced, used, sold or transferred to any
31296 -   third party without Keyspan's prior written consent.  All Rights Reserved.
31297 +       The firmware contained herein as keyspan_usa19w_fw.h is
31298  
31299 -   This firmware may not be modified and may only be used with the Keyspan 
31300 -   USA-19W Serial Adapter.  Distribution and/or Modification of the
31301 -   keyspan.c driver which includes this firmware, in whole or in part,
31302 -   requires the inclusion of this statement."
31303 +               Copyright (C) 1999-2001
31304 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
31305 +               
31306 +       as an unpublished work. This notice does not imply unrestricted or
31307 +       public access to the source code from which this firmware image is
31308 +       derived.  Except as noted below this firmware image may not be 
31309 +       reproduced, used, sold or transferred to any third party without 
31310 +       Keyspan's prior written consent.  All Rights Reserved.
31311  
31312 +       Permission is hereby granted for the distribution of this firmware 
31313 +       image as part of a Linux or other Open Source operating system kernel 
31314 +       in text or binary form as required. 
31315 +
31316 +       This firmware may not be modified and may only be used with  
31317 +       Keyspan hardware.  Distribution and/or Modification of the 
31318 +       keyspan.c driver which includes this firmware, in whole or in 
31319 +       part, requires the inclusion of this statement."
31320  */
31321  
31322  static const struct ezusb_hex_record keyspan_usa19w_firmware[] = {
31323 - {0x0033,  3, { 0x02, 0x0d, 0x6c}},
31324 + {0x0033,  3, { 0x02, 0x0d, 0x5c}},
31325   {0x0003, 16, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0}},
31326   {0x0013, 16, { 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90}},
31327   {0x0023, 15, { 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x17, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22}},
31328 - {0x0046, 16, { 0x30, 0x0f, 0x18, 0x12, 0x0d, 0x48, 0xef, 0xc3, 0x95, 0x14, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
31329 + {0x0046, 16, { 0x30, 0x0f, 0x18, 0x12, 0x0d, 0x38, 0xef, 0xc3, 0x95, 0x14, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
31330   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x0f, 0xc2, 0x0a, 0x80, 0x77, 0x30, 0x0c, 0x3b, 0x90, 0x7f}},
31331 - {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x0d, 0x48, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
31332 + {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x0d, 0x38, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
31333   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x0f, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x1c, 0x20, 0x0a, 0x11, 0x60}},
31334 - {0x0086, 16, { 0x0f, 0xf5, 0x23, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x27, 0x7e, 0x75, 0x28, 0x41, 0x12, 0x08, 0x05}},
31335 + {0x0086, 16, { 0x0f, 0xf5, 0x23, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x27, 0x7e, 0x75, 0x28, 0x41, 0x12, 0x08, 0x01}},
31336   {0x0096, 16, { 0xc2, 0x0c, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
31337 - {0x00a6, 16, { 0x12, 0x0d, 0x48, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0f}},
31338 + {0x00a6, 16, { 0x12, 0x0d, 0x38, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0f}},
31339   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x1c, 0x20, 0x0a, 0x11, 0x60, 0x0f, 0xf5, 0x23, 0x7e, 0x7d}},
31340 - {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x27, 0x7d, 0x75, 0x28, 0xc1, 0x12, 0x08, 0x05, 0xd2, 0x0c, 0xe4, 0x90, 0x7f}},
31341 - {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x60, 0x53, 0x11, 0x80, 0x12}},
31342 - {0x00e6, 16, { 0x0d, 0x54, 0xef, 0x42, 0x11, 0x12, 0x0c, 0x51, 0x8f, 0x1c, 0xef, 0xc3, 0x95, 0x13, 0x50, 0x0f}},
31343 - {0x00f6, 16, { 0x12, 0x0d, 0x30, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x11, 0x20, 0xe7, 0x03, 0x30, 0x12, 0x5b, 0xc2}},
31344 + {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x27, 0x7d, 0x75, 0x28, 0xc1, 0x12, 0x08, 0x01, 0xd2, 0x0c, 0xe4, 0x90, 0x7f}},
31345 + {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x5e, 0x12, 0x0c, 0x41, 0x8f}},
31346 + {0x00e6, 16, { 0x1c, 0x12, 0x0d, 0x44, 0x8f, 0x11, 0xe5, 0x1c, 0xc3, 0x95, 0x13, 0x50, 0x0f, 0x12, 0x0d, 0x20}},
31347 + {0x00f6, 16, { 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x11, 0x20, 0xe7, 0x03, 0x30, 0x12, 0x5c, 0xc2, 0x12, 0xe5, 0x1c}},
31348   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
31349   {0x0043,  3, { 0x02, 0x0e, 0x00}},
31350 - {0x0000,  3, { 0x02, 0x08, 0xba}},
31351 - {0x0106, 64, { 0x12, 0xe5, 0x1c, 0x70, 0x04, 0xf5, 0x11, 0x80, 0x51, 0xe5, 0x11, 0x30, 0xe7, 0x26, 0xe5, 0x1c, 0xd3,
31352 -  0x94, 0x20, 0x40, 0x03, 0x75, 0x1c, 0x20, 0x85, 0x1c, 0x23, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x27,
31353 -  0x7e, 0x75, 0x28, 0x80, 0xaf, 0x11, 0x12, 0x0a, 0x8a, 0xe5, 0x1c, 0x25, 0xe0, 0x90, 0x7f, 0xb7,
31354 -  0xf0, 0x80, 0x26, 0xe5, 0x1c, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x1c, 0x3f, 0x85, 0x1c}},
31355 - {0x0146, 64, { 0x23, 0xe4, 0x90, 0x7e, 0x80, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x27, 0x7e, 0x75, 0x28, 0x81, 0x12,
31356 -  0x08, 0x2a, 0xe5, 0x1c, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06,
31357 -  0x20, 0x0d, 0x03, 0x02, 0x03, 0xba, 0xe4, 0xf5, 0x1b, 0x74, 0x40, 0x25, 0x1b, 0xf5, 0x82, 0xe4,
31358 -  0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x1b, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79}},
31359 - {0x0186, 64, { 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0a, 0x11, 0x05, 0x1b, 0xe5, 0x1b, 0xb4,
31360 -  0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x6e, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12,
31361 -  0x0c, 0x2c, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x0b, 0x6e, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12,
31362 -  0x0b, 0x94, 0xd2, 0x10, 0xd2, 0x11, 0x75, 0x1c, 0x04, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x05}},
31363 - {0x01c6, 64, { 0xc2, 0x11, 0x43, 0x1c, 0xc0, 0x90, 0x7e, 0x04, 0xe0, 0xb4, 0x01, 0x07, 0xc2, 0x11, 0x43, 0x1c, 0x0b,
31364 -  0x80, 0x10, 0x90, 0x7e, 0x04, 0xe0, 0x60, 0x07, 0xc2, 0x10, 0x43, 0x1c, 0x09, 0x80, 0x03, 0x43,
31365 -  0x1c, 0x02, 0x7f, 0x03, 0xad, 0x1c, 0x12, 0x0c, 0x2c, 0x43, 0x19, 0x80, 0x90, 0x7f, 0x98, 0x74,
31366 -  0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5}},
31367 - {0x0206, 64, { 0x16, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f,
31368 -  0xf5, 0x18, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x18, 0xf0, 0x90, 0x7e,
31369 -  0x07, 0xe0, 0x60, 0x42, 0x90, 0x7e, 0x13, 0xe0, 0x60, 0x05, 0x43, 0x15, 0x04, 0x80, 0x03, 0x53,
31370 -  0x15, 0xfb, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c, 0x2c, 0x90, 0x7e, 0x08, 0xe0, 0x60, 0x05}},
31371 - {0x0246, 64, { 0x43, 0x17, 0x80, 0x80, 0x03, 0x53, 0x17, 0x7f, 0x53, 0x17, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11,
31372 -  0x43, 0x17, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x0b, 0xe0, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x0c,
31373 -  0x06, 0xaf, 0x17, 0x12, 0x0b, 0xba, 0x90, 0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05,
31374 -  0x43, 0x19, 0x01, 0x80, 0x03, 0x53, 0x19, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90}},
31375 - {0x0286, 64, { 0xc0, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7e, 0x0c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x19,
31376 -  0x02, 0x80, 0x03, 0x53, 0x19, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5,
31377 -  0x19, 0xf0, 0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x13, 0xa3, 0xe0, 0x13, 0x92, 0x13, 0xa3, 0xe0, 0xf5,
31378 -  0x14, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x19, 0x10, 0x80, 0x03, 0x53, 0x19, 0xef, 0x90, 0x7f}},
31379 - {0x02c6, 64, { 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53,
31380 -  0x18, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
31381 -  0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x12, 0x0d, 0x24, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0,
31382 -  0x53, 0x15, 0xfd, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c, 0x2c, 0xe4, 0xf5, 0x0e, 0xf5, 0x0d}},
31383 - {0x0306, 64, { 0xd2, 0x0e, 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43, 0x15, 0x02, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c,
31384 -  0x2c, 0x75, 0x0d, 0x01, 0xd2, 0x0e, 0x90, 0x7e, 0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74,
31385 -  0x12, 0xf0, 0xe5, 0x16, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x0a, 0x90, 0x7e, 0x19, 0xe0,
31386 -  0x60, 0x11, 0x43, 0x18, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f}},
31387 - {0x0346, 64, { 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x15, 0xfe, 0xe4, 0xff, 0xad, 0x15,
31388 -  0x12, 0x0c, 0x2c, 0x75, 0x0f, 0x01, 0xd2, 0x0e, 0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x15,
31389 -  0x01, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c, 0x2c, 0xe4, 0xf5, 0x0f, 0xd2, 0x0e, 0x90, 0x7e, 0x1c,
31390 -  0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x16, 0x44, 0x02, 0x90, 0xc0}},
31391 - {0x0386, 64, { 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x12, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75,
31392 -  0x10, 0x01, 0xe4, 0xf5, 0x12, 0xd2, 0x0e, 0x90, 0x7e, 0x1f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7,
31393 -  0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35, 0xf0, 0xc2, 0x0d, 0xe4, 0x90,
31394 + {0x0000,  3, { 0x02, 0x08, 0xb6}},
31395 + {0x0106, 64, { 0x60, 0x56, 0xb4, 0x80, 0x03, 0x43, 0x11, 0x02, 0xe5, 0x11, 0x30, 0xe7, 0x24, 0xe5, 0x1c, 0xd3, 0x94,
31396 +  0x20, 0x40, 0x03, 0x75, 0x1c, 0x20, 0x85, 0x1c, 0x23, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x27, 0x7e,
31397 +  0x75, 0x28, 0x80, 0x12, 0x0a, 0x86, 0xe5, 0x1c, 0x25, 0x1c, 0x90, 0x7f, 0xb7, 0xf0, 0x80, 0x27,
31398 +  0xe5, 0x1c, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x1c, 0x3f, 0x85, 0x1c, 0x23, 0x90, 0x7e}},
31399 + {0x0146, 64, { 0x80, 0xe5, 0x11, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x27, 0x7e, 0x75, 0x28, 0x81, 0x12, 0x08, 0x26,
31400 +  0xe5, 0x1c, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x0d,
31401 +  0x03, 0x02, 0x03, 0xba, 0xe4, 0xf5, 0x1b, 0x74, 0x40, 0x25, 0x1b, 0xf5, 0x82, 0xe4, 0x34, 0x7c,
31402 +  0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x1b, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x00, 0x24}},
31403 + {0x0186, 64, { 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0a, 0x0d, 0x05, 0x1b, 0xe5, 0x1b, 0xb4, 0x20, 0xd7,
31404 +  0x90, 0x7e, 0x00, 0xe0, 0x60, 0x6e, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12, 0x0c, 0x1c,
31405 +  0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x0b, 0x5e, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12, 0x0b, 0x84,
31406 +  0xd2, 0x10, 0xd2, 0x11, 0x75, 0x1c, 0x04, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x05, 0xc2, 0x11}},
31407 + {0x01c6, 64, { 0x43, 0x1c, 0xc0, 0x90, 0x7e, 0x04, 0xe0, 0xb4, 0x01, 0x07, 0xc2, 0x11, 0x43, 0x1c, 0x0b, 0x80, 0x10,
31408 +  0x90, 0x7e, 0x04, 0xe0, 0x60, 0x07, 0xc2, 0x10, 0x43, 0x1c, 0x09, 0x80, 0x03, 0x43, 0x1c, 0x02,
31409 +  0x7f, 0x03, 0xad, 0x1c, 0x12, 0x0c, 0x1c, 0x43, 0x19, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
31410 +  0x90, 0xc0, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x16, 0x44}},
31411 + {0x0206, 64, { 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x18,
31412 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x18, 0xf0, 0x90, 0x7e, 0x07, 0xe0,
31413 +  0x60, 0x42, 0x90, 0x7e, 0x13, 0xe0, 0x60, 0x05, 0x43, 0x15, 0x04, 0x80, 0x03, 0x53, 0x15, 0xfb,
31414 +  0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c, 0x1c, 0x90, 0x7e, 0x08, 0xe0, 0x60, 0x05, 0x43, 0x17}},
31415 + {0x0246, 64, { 0x80, 0x80, 0x03, 0x53, 0x17, 0x7f, 0x53, 0x17, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x17,
31416 +  0x02, 0xa3, 0xe0, 0xff, 0x12, 0x0b, 0xd0, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x0b, 0xf6, 0xaf,
31417 +  0x17, 0x12, 0x0b, 0xaa, 0x90, 0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x19,
31418 +  0x01, 0x80, 0x03, 0x53, 0x19, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00}},
31419 + {0x0286, 64, { 0xe5, 0x19, 0xf0, 0x90, 0x7e, 0x0c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x19, 0x02, 0x80,
31420 +  0x03, 0x53, 0x19, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x19, 0xf0,
31421 +  0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x13, 0xa3, 0xe0, 0x13, 0x92, 0x13, 0xa3, 0xe0, 0xf5, 0x14, 0xa3,
31422 +  0xe0, 0x60, 0x05, 0x43, 0x19, 0x10, 0x80, 0x03, 0x53, 0x19, 0xef, 0x90, 0x7f, 0x98, 0x74}},
31423 + {0x02c6, 64, { 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x18, 0xbf,
31424 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f,
31425 +  0x98, 0x74, 0x11, 0xf0, 0x12, 0x0d, 0x14, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x15,
31426 +  0xfd, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c, 0x1c, 0xe4, 0xf5, 0x0e, 0xf5, 0x0d, 0xd2, 0x0e}},
31427 + {0x0306, 64, { 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43, 0x15, 0x02, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c, 0x1c, 0x75,
31428 +  0x0d, 0x01, 0xd2, 0x0e, 0x90, 0x7e, 0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0,
31429 +  0xe5, 0x16, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x0a, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11,
31430 +  0x43, 0x18, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0}},
31431 + {0x0346, 64, { 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x15, 0xfe, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c,
31432 +  0x1c, 0x75, 0x0f, 0x01, 0xd2, 0x0e, 0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x15, 0x01, 0xe4,
31433 +  0xff, 0xad, 0x15, 0x12, 0x0c, 0x1c, 0xe4, 0xf5, 0x0f, 0xd2, 0x0e, 0x90, 0x7e, 0x1c, 0xe0, 0x60,
31434 +  0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x16, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0}},
31435 + {0x0386, 64, { 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x12, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x10, 0x01,
31436 +  0xe4, 0xf5, 0x12, 0xd2, 0x0e, 0x90, 0x7e, 0x1f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x11,
31437 +  0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35, 0xf0, 0xd2, 0x0c, 0xc2, 0x0d, 0xe4, 0x90,
31438    0x7f, 0xcf, 0xf0, 0x30, 0x15, 0x71, 0xe5, 0x12, 0x60, 0x02, 0x15, 0x12, 0xe5, 0x2e, 0xd3}},
31439 - {0x03c6, 64, { 0x94, 0x00, 0x40, 0x04, 0x15, 0x2e, 0x80, 0x60, 0x75, 0x2e, 0x0a, 0x12, 0x0d, 0x24, 0xef, 0x54, 0x01,
31440 -  0xf5, 0x1c, 0x65, 0x0e, 0x60, 0x07, 0x85, 0x1c, 0x0e, 0xd2, 0x0e, 0x80, 0x11, 0x12, 0x0d, 0x60,
31441 + {0x03c6, 64, { 0x94, 0x00, 0x40, 0x04, 0x15, 0x2e, 0x80, 0x60, 0x75, 0x2e, 0x0a, 0x12, 0x0d, 0x14, 0xef, 0x54, 0x01,
31442 +  0xf5, 0x1c, 0x65, 0x0e, 0x60, 0x07, 0x85, 0x1c, 0x0e, 0xd2, 0x0e, 0x80, 0x11, 0x12, 0x0d, 0x50,
31443    0xef, 0x54, 0x10, 0xf5, 0x1c, 0x65, 0x09, 0x60, 0x05, 0x85, 0x1c, 0x09, 0xd2, 0x0e, 0x12, 0x0d,
31444 -  0x60, 0xef, 0x54, 0x80, 0xf5, 0x1c, 0x65, 0x0a, 0x60, 0x05, 0x85, 0x1c, 0x0a, 0xd2, 0x0e}},
31445 - {0x0406, 64, { 0x12, 0x0d, 0x60, 0xef, 0x54, 0x20, 0xf5, 0x1c, 0x65, 0x0b, 0x60, 0x08, 0x85, 0x1c, 0x0b, 0x30, 0x10,
31446 -  0x02, 0xd2, 0x0e, 0x12, 0x0d, 0x60, 0xef, 0x54, 0x40, 0xf5, 0x1c, 0x65, 0x0c, 0x60, 0x08, 0x85,
31447 +  0x50, 0xef, 0x54, 0x80, 0xf5, 0x1c, 0x65, 0x0a, 0x60, 0x05, 0x85, 0x1c, 0x0a, 0xd2, 0x0e}},
31448 + {0x0406, 64, { 0x12, 0x0d, 0x50, 0xef, 0x54, 0x20, 0xf5, 0x1c, 0x65, 0x0b, 0x60, 0x08, 0x85, 0x1c, 0x0b, 0x30, 0x10,
31449 +  0x02, 0xd2, 0x0e, 0x12, 0x0d, 0x50, 0xef, 0x54, 0x40, 0xf5, 0x1c, 0x65, 0x0c, 0x60, 0x08, 0x85,
31450    0x1c, 0x0c, 0x30, 0x11, 0x02, 0xd2, 0x0e, 0x30, 0x15, 0x2a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1,
31451    0x23, 0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5, 0x30, 0x90, 0x7b, 0x42, 0xe0, 0xf5}},
31452   {0x0446, 64, { 0x31, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4,
31453    0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x05, 0x1f, 0xe5, 0x25,
31454    0x70, 0x40, 0x30, 0x0e, 0x39, 0xe5, 0x12, 0x70, 0x35, 0xc2, 0x0e, 0xf5, 0x1b, 0x7e, 0x00, 0x7b,
31455 -  0x00, 0x74, 0x08, 0x25, 0x1b, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x09, 0xcb, 0xff, 0x74}},
31456 +  0x00, 0x74, 0x08, 0x25, 0x1b, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x09, 0xc7, 0xff, 0x74}},
31457   {0x0486, 64, { 0x80, 0x25, 0x1b, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x1b, 0xe5, 0x1b, 0xb4,
31458    0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x12, 0x10, 0xe4, 0xf5, 0x10, 0x75, 0x25,
31459    0x02, 0x22, 0xe5, 0x25, 0x64, 0x02, 0x70, 0x36, 0x30, 0x05, 0x2f, 0xc2, 0x05, 0xf5, 0x1b, 0x7e,
31460 -  0x00, 0x7b, 0x00, 0x74, 0x29, 0x25, 0x1b, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x09, 0xcb}},
31461 +  0x00, 0x7b, 0x00, 0x74, 0x29, 0x25, 0x1b, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x09, 0xc7}},
31462   {0x04c6, 64, { 0xff, 0x74, 0x80, 0x25, 0x1b, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x1b, 0xe5,
31463    0x1b, 0xb4, 0x05, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x25, 0x03, 0x22, 0xe5, 0x30,
31464    0x60, 0x33, 0x75, 0x2f, 0x03, 0x15, 0x30, 0xe4, 0xf5, 0x1b, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2f,
31465 -  0x25, 0x1b, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x09, 0xcb, 0xff, 0x74, 0x80, 0x25, 0x1b}},
31466 +  0x25, 0x1b, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x09, 0xc7, 0xff, 0x74, 0x80, 0x25, 0x1b}},
31467   {0x0506, 64, { 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x1b, 0xe5, 0x1b, 0xb4, 0x03, 0xdb, 0x90,
31468 -  0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x25, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0a, 0x23,
31469 +  0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x25, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0a, 0x1f,
31470    0x05, 0xf6, 0x00, 0x06, 0x6a, 0x01, 0x06, 0xd7, 0x03, 0x05, 0x43, 0x06, 0x05, 0xe9, 0x08, 0x05,
31471    0xe3, 0x09, 0x05, 0xcb, 0x0a, 0x05, 0xda, 0x0b, 0x00, 0x00, 0x07, 0x27, 0x90, 0x7f, 0xeb}},
31472   {0x0546, 64, { 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x50, 0x24, 0x02, 0x70, 0x6f, 0x74, 0x19, 0x90, 0x7f, 0xd4,
31473 @@ -110,7 +114,7 @@
31474    0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82,
31475    0x74, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea}},
31476   {0x0586, 64, { 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12,
31477 -  0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0a, 0x49, 0xea,
31478 +  0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0a, 0x45, 0xea,
31479    0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x07, 0x2e,
31480    0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xb4, 0xe0, 0x44}},
31481   {0x05c6, 64, { 0x01, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0x00, 0xe5, 0x24, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0,
31482 @@ -124,14 +128,14 @@
31483   {0x0646, 64, { 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0,
31484    0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0,
31485    0x02, 0x07, 0x2e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1e, 0x24, 0x02, 0x60, 0x03, 0x02,
31486 -  0x07, 0x2e, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x06, 0x12, 0x0d, 0x73, 0x02, 0x07, 0x2e}},
31487 +  0x07, 0x2e, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x06, 0x12, 0x0d, 0x63, 0x02, 0x07, 0x2e}},
31488   {0x0686, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90,
31489    0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25,
31490    0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0,
31491    0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f}},
31492   {0x06c6, 64, { 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x60, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x57,
31493    0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x24, 0x02, 0x70, 0x4b, 0x90, 0x7f, 0xea, 0xe0,
31494 -  0xb4, 0x01, 0x05, 0x12, 0x0d, 0x70, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
31495 +  0xb4, 0x01, 0x05, 0x12, 0x0d, 0x60, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
31496    0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff}},
31497   {0x0706, 64, { 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f,
31498    0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07,
31499 @@ -140,102 +144,102 @@
31500   {0x0746, 64, { 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18,
31501    0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5,
31502    0x08, 0x7f, 0x01, 0x7b, 0x00, 0x74, 0x08, 0x2f, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0a,
31503 -  0x11, 0x0f, 0xbf, 0x09, 0xee, 0x75, 0x13, 0x01, 0xe4, 0xf5, 0x12, 0xf5, 0x2e, 0xf5, 0x11}},
31504 - {0x0786, 64, { 0xc2, 0x0e, 0xc2, 0x12, 0xc2, 0x0d, 0xc2, 0x0a, 0xc2, 0x0f, 0xc2, 0x04, 0xd2, 0x0c, 0xd2, 0x0b, 0x90,
31505 -  0x7f, 0x98, 0x74, 0x13, 0xf0, 0x75, 0x18, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c,
31506 -  0xe4, 0xfd, 0x12, 0x0c, 0x2c, 0x7f, 0x10, 0x8f, 0x17, 0x12, 0x0b, 0xba, 0x90, 0x7f, 0x98, 0x74,
31507 -  0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x16, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f}},
31508 - {0x07c6, 64, { 0x98, 0x74, 0x14, 0xf0, 0x75, 0x19, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12,
31509 -  0x0c, 0x2c, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x15, 0x12, 0x0c, 0x2c, 0x90, 0x7f, 0x98,
31510 -  0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x0c, 0x2c, 0x7f,
31511 -  0x01, 0x12, 0x0c, 0xbc, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x0c, 0x2c, 0xd2, 0x03, 0x22, 0x90}},
31512 - {0x0806, 64, { 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x23, 0xe5, 0x28, 0xf5, 0x82, 0xe5, 0x27, 0xf5, 0x83, 0xc2, 0xaf,
31513 -  0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7,
31514 -  0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x23, 0xe5, 0x28, 0xf5, 0x82, 0xe5,
31515 -  0x27, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3}},
31516 - {0x0846, 64, { 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x23,
31517 -  0xe5, 0x28, 0xf5, 0x82, 0xe5, 0x27, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05,
31518 -  0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98,
31519 -  0x74, 0x08, 0xf0, 0xaf, 0x23, 0xe5, 0x28, 0xf5, 0x82, 0xe5, 0x27, 0xf5, 0x83, 0xc2, 0xaf}},
31520 - {0x0886, 64, { 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2,
31521 -  0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83,
31522 -  0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00,
31523 -  0x00, 0x00, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x31, 0x02, 0x09, 0x01}},
31524 - {0x08c6, 64, { 0x02, 0x09, 0x46, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08,
31525 -  0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4,
31526 -  0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4,
31527 -  0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x0c, 0xdd, 0xe4, 0x7e}},
31528 - {0x0906, 64, { 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3,
31529 -  0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa,
31530 -  0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0,
31531 -  0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe}},
31532 - {0x0946, 64, { 0xd2, 0x14, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0, 0x12, 0x0d, 0x73, 0xd2, 0xe8, 0x43, 0xd8, 0x20,
31533 -  0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0,
31534 -  0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44,
31535 -  0x01, 0xf0, 0x90, 0x7f, 0xae, 0x74, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0x15, 0x12, 0x0c, 0x76}},
31536 - {0x0986, 64, { 0xc2, 0x02, 0xe4, 0xf5, 0x26, 0xf5, 0x2e, 0xc2, 0x08, 0xc2, 0x03, 0x90, 0x7f, 0xa1, 0x04, 0xf0, 0x90,
31537 -  0x7f, 0xd8, 0xe0, 0x65, 0x1a, 0x60, 0x10, 0x30, 0x03, 0x05, 0xd2, 0x15, 0x12, 0x00, 0x46, 0x90,
31538 -  0x7f, 0xd8, 0xe0, 0xf5, 0x1a, 0x80, 0x08, 0x30, 0x03, 0x05, 0xc2, 0x15, 0x12, 0x00, 0x46, 0x30,
31539 -  0x02, 0x07, 0xc2, 0x02, 0x12, 0x05, 0x20, 0x80, 0xd6, 0x30, 0x09, 0xd3, 0xc2, 0x09, 0x12}},
31540 - {0x09c6, 64, { 0x0a, 0xf1, 0x80, 0xcc, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7,
31541 -  0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c,
31542 -  0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25,
31543 -  0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82}},
31544 - {0x0a06, 64, { 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a,
31545 -  0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82,
31546 -  0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01,
31547 -  0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3}},
31548 - {0x0a46, 64, { 0xa3, 0x80, 0xdf, 0x8f, 0x1b, 0xe4, 0xf5, 0x1c, 0x75, 0x1d, 0xff, 0x75, 0x1e, 0x19, 0x75, 0x1f, 0x86,
31549 -  0xab, 0x1d, 0xaa, 0x1e, 0xa9, 0x1f, 0x90, 0x00, 0x01, 0x12, 0x09, 0xe4, 0xb4, 0x03, 0x1d, 0xaf,
31550 -  0x1c, 0x05, 0x1c, 0xef, 0xb5, 0x1b, 0x01, 0x22, 0x12, 0x09, 0xcb, 0x7e, 0x00, 0x29, 0xff, 0xee,
31551 -  0x3a, 0xa9, 0x07, 0x75, 0x1d, 0xff, 0xf5, 0x1e, 0x89, 0x1f, 0x80, 0xd4, 0x7b, 0x00, 0x7a}},
31552 - {0x0a86, 64, { 0x00, 0x79, 0x00, 0x22, 0x8f, 0x1d, 0x05, 0x28, 0xe5, 0x28, 0xae, 0x27, 0x70, 0x02, 0x05, 0x27, 0x14,
31553 -  0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1d, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x28, 0xe5, 0x28, 0xac, 0x27,
31554 -  0x70, 0x02, 0x05, 0x27, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x23, 0xe5, 0x23, 0x60,
31555 -  0x0a, 0x12, 0x0d, 0x54, 0x8f, 0x1d, 0xef, 0x42, 0x11, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0}},
31556 - {0x0ac6, 64, { 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x30, 0x06, 0x04, 0xc2, 0x06,
31557 -  0x80, 0x02, 0xd2, 0x09, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0,
31558 -  0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x1b,
31559 -  0x12, 0x00, 0x03, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x08, 0xaa, 0x90, 0x7f}},
31560 - {0x0b06, 64, { 0xd6, 0xe0, 0x30, 0xe7, 0x0e, 0x30, 0x01, 0x05, 0x12, 0x0d, 0x0e, 0x80, 0x06, 0x12, 0x0c, 0x9b, 0xef,
31561 -  0x60, 0xe1, 0x12, 0x07, 0x36, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84,
31562 -  0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab,
31563 -  0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0}},
31564 - {0x0b46, 64, { 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2,
31565 -  0x02, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85,
31566 +  0x0d, 0x0f, 0xbf, 0x09, 0xee, 0x75, 0x13, 0x01, 0xe4, 0xf5, 0x12, 0xf5, 0x2e, 0xf5, 0x11}},
31567 + {0x0786, 64, { 0xc2, 0x0e, 0xc2, 0x12, 0xc2, 0x0d, 0xc2, 0x0a, 0xc2, 0x0f, 0xc2, 0x04, 0x90, 0x7f, 0x98, 0x74, 0x13,
31568 +  0xf0, 0x75, 0x18, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x0c,
31569 +  0x1c, 0x7f, 0x10, 0x8f, 0x17, 0x12, 0x0b, 0xaa, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x7f, 0x01,
31570 +  0x8f, 0x16, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x0c, 0x1c}},
31571 + {0x07c6, 64, { 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x15, 0x12, 0x0c, 0x1c, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0,
31572 +  0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x0c, 0x1c, 0x7f, 0x01, 0x12, 0x0c,
31573 +  0xac, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x0c, 0x1c, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x75, 0x19,
31574 +  0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0xd2, 0x03, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10}},
31575 + {0x0806, 64, { 0xf0, 0xaf, 0x23, 0xe5, 0x28, 0xf5, 0x82, 0xe5, 0x27, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0,
31576 +  0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90,
31577 +  0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x23, 0xe5, 0x28, 0xf5, 0x82, 0xe5, 0x27, 0xf5, 0x83, 0xc2,
31578 +  0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7}},
31579 + {0x0846, 64, { 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x23, 0xe5, 0x28, 0xf5, 0x82,
31580 +  0xe5, 0x27, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05,
31581 +  0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf,
31582 +  0x23, 0xe5, 0x28, 0xf5, 0x82, 0xe5, 0x27, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0}},
31583 + {0x0886, 64, { 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00,
31584 +  0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90,
31585 +  0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x78,
31586 +  0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x31, 0x02, 0x08, 0xfd, 0x02, 0x09, 0x42, 0xe4}},
31587 + {0x08c6, 64, { 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29,
31588 +  0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20,
31589 +  0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02,
31590 +  0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x0c, 0xcd, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc}},
31591 + {0x0906, 64, { 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf,
31592 +  0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8,
31593 +  0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82,
31594 +  0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xd2, 0x14, 0x90, 0x7f}},
31595 + {0x0946, 64, { 0x92, 0xe0, 0x44, 0x02, 0xf0, 0x12, 0x0d, 0x63, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74,
31596 +  0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0,
31597 +  0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f,
31598 +  0xae, 0x74, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0x15, 0x12, 0x0c, 0x66, 0xc2, 0x02, 0xe4, 0xf5}},
31599 + {0x0986, 64, { 0x26, 0xf5, 0x2e, 0xc2, 0x08, 0xc2, 0x03, 0x90, 0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65,
31600 +  0x1a, 0x60, 0x10, 0x30, 0x03, 0x05, 0xd2, 0x15, 0x12, 0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5,
31601 +  0x1a, 0x80, 0x08, 0x30, 0x03, 0x05, 0xc2, 0x15, 0x12, 0x00, 0x46, 0x30, 0x02, 0x07, 0xc2, 0x02,
31602 +  0x12, 0x05, 0x20, 0x80, 0xd6, 0x30, 0x09, 0xd3, 0xc2, 0x09, 0x12, 0x0a, 0xba, 0x80, 0xcc}},
31603 + {0x09c6, 64, { 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02,
31604 +  0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5,
31605 +  0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22,
31606 +  0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5}},
31607 + {0x0a06, 64, { 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xf0, 0x22, 0x50,
31608 +  0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70,
31609 +  0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88,
31610 +  0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0x8f}},
31611 + {0x0a46, 64, { 0x1b, 0xe4, 0xf5, 0x1c, 0x75, 0x1d, 0xff, 0x75, 0x1e, 0x19, 0x75, 0x1f, 0x86, 0xab, 0x1d, 0xaa, 0x1e,
31612 +  0xa9, 0x1f, 0x90, 0x00, 0x01, 0x12, 0x09, 0xe0, 0xb4, 0x03, 0x1d, 0xaf, 0x1c, 0x05, 0x1c, 0xef,
31613 +  0xb5, 0x1b, 0x01, 0x22, 0x12, 0x09, 0xc7, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75,
31614 +  0x1d, 0xff, 0xf5, 0x1e, 0x89, 0x1f, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x22}},
31615 + {0x0a86, 64, { 0x05, 0x28, 0xe5, 0x28, 0xae, 0x27, 0x70, 0x02, 0x05, 0x27, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x11,
31616 +  0xf0, 0x12, 0x00, 0x36, 0x05, 0x28, 0xe5, 0x28, 0xac, 0x27, 0x70, 0x02, 0x05, 0x27, 0x14, 0xf5,
31617 +  0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x23, 0xe5, 0x23, 0x60, 0x07, 0x12, 0x0d, 0x44, 0x8f, 0x11,
31618 +  0x80, 0xcd, 0x22, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x1b, 0x12, 0x00, 0x03, 0x90, 0x7f, 0xd6}},
31619 + {0x0ac6, 64, { 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x08, 0xa6, 0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0x0e, 0x30, 0x01, 0x05,
31620 +  0x12, 0x0c, 0xfe, 0x80, 0x06, 0x12, 0x0c, 0x8b, 0xef, 0x60, 0xe1, 0x12, 0x07, 0x36, 0x22, 0xc0,
31621 +  0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f,
31622 +  0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0}},
31623 + {0x0b06, 64, { 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0,
31624 +  0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x02, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab,
31625 +  0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32,
31626 +  0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00}},
31627 + {0x0b46, 64, { 0xd2, 0x09, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85,
31628    0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00,
31629 -  0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90}},
31630 - {0x0b86, 64, { 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98,
31631 -  0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90,
31632 +  0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
31633 +  0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f}},
31634 + {0x0b86, 64, { 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90,
31635    0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0,
31636 -  0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0}},
31637 - {0x0bc6, 64, { 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
31638 -  0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90,
31639 +  0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90,
31640 +  0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13}},
31641 + {0x0bc6, 64, { 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90,
31642    0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0,
31643 -  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22}},
31644 - {0x0c06, 64, { 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16,
31645 -  0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f,
31646 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90,
31647 +  0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74}},
31648 + {0x0c06, 64, { 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f,
31649    0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90,
31650 -  0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90}},
31651 - {0x0c46, 64, { 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x0d, 0x3c, 0x8f, 0x1d, 0x12,
31652 -  0x0d, 0x3c, 0x8f, 0x1e, 0xe5, 0x1d, 0x65, 0x1e, 0x60, 0x12, 0x12, 0x0d, 0x3c, 0x8f, 0x1d, 0xe5,
31653 -  0x1d, 0x65, 0x1e, 0x60, 0x07, 0x12, 0x0d, 0x3c, 0x8f, 0x1e, 0x80, 0xe8, 0xaf, 0x1d, 0x22, 0x90,
31654 -  0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x15, 0x04, 0xe0, 0x44}},
31655 - {0x0c86, 64, { 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x0c, 0xf7, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0,
31656 -  0x44, 0x04, 0xf0, 0x22, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x1c, 0x12, 0x07, 0x36, 0x12, 0x0d, 0x60,
31657 +  0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
31658 +  0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x0d, 0x2c, 0x8f, 0x1d}},
31659 + {0x0c46, 64, { 0x12, 0x0d, 0x2c, 0x8f, 0x1e, 0xe5, 0x1d, 0x65, 0x1e, 0x60, 0x12, 0x12, 0x0d, 0x2c, 0x8f, 0x1d, 0xe5,
31660 +  0x1d, 0x65, 0x1e, 0x60, 0x07, 0x12, 0x0d, 0x2c, 0x8f, 0x1e, 0x80, 0xe8, 0xaf, 0x1d, 0x22, 0x90,
31661 +  0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x15, 0x04, 0xe0, 0x44, 0x02,
31662 +  0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x0c, 0xe7, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0}},
31663 + {0x0c86, 64, { 0xe0, 0x44, 0x04, 0xf0, 0x22, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x1c, 0x12, 0x07, 0x36, 0x12, 0x0d, 0x50,
31664    0xef, 0x30, 0xe6, 0x0b, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x1c, 0x60, 0xf1, 0x7f, 0x01, 0x22, 0x12,
31665 -  0x00, 0x03, 0x7f, 0x00, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x15, 0x54, 0x7f, 0xfd, 0x12}},
31666 - {0x0cc6, 64, { 0x0c, 0x2c, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x15, 0x44,
31667 -  0x80, 0xfd, 0x12, 0x0c, 0x2c, 0x22, 0x05, 0x29, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x2f, 0x03,
31668 +  0x00, 0x03, 0x7f, 0x00, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x15, 0x54, 0x7f, 0xfd, 0x12, 0x0c,
31669 +  0x1c, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x15}},
31670 + {0x0cc6, 64, { 0x44, 0x80, 0xfd, 0x12, 0x0c, 0x1c, 0x22, 0x05, 0x29, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x2f, 0x03,
31671    0x00, 0x00, 0xc1, 0x86, 0xc1, 0x02, 0xc1, 0x09, 0xc1, 0x01, 0xc1, 0x07, 0x01, 0x25, 0x00, 0x00,
31672 -  0x8e, 0x1c, 0x8f, 0x1d, 0xe5, 0x1d, 0x15, 0x1d, 0xae, 0x1c, 0x70, 0x02, 0x15, 0x1c, 0x4e}},
31673 - {0x0d06, 64, { 0x60, 0x05, 0x12, 0x08, 0x99, 0x80, 0xee, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x0d,
31674 -  0x7e, 0x00, 0x12, 0x0c, 0xf7, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22, 0x90, 0x7f, 0x98,
31675 +  0x8e, 0x1c, 0x8f, 0x1d, 0xe5, 0x1d, 0x15, 0x1d, 0xae, 0x1c, 0x70, 0x02, 0x15, 0x1c, 0x4e, 0x60,
31676 +  0x05, 0x12, 0x08, 0x95, 0x80, 0xee, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x01, 0xf0, 0x7f}},
31677 + {0x0d06, 64, { 0x0d, 0x7e, 0x00, 0x12, 0x0c, 0xe7, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22, 0x90, 0x7f, 0x98,
31678    0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90,
31679 -  0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0}},
31680 - {0x0d46, 64, { 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98,
31681 -  0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90,
31682 +  0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff,
31683 +  0x22, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f}},
31684 + {0x0d46, 64, { 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90,
31685    0xc0, 0x00, 0xe0, 0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0xd2, 0x01, 0x22, 0xc2, 0x01, 0x22, 0x00,
31686 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31687    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31688   {0x0d86, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31689    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31690 @@ -244,8 +248,8 @@
31691   {0x0dc6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31692    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31693    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31694 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0b, 0x47, 0x00, 0x02, 0x0e}},
31695 - {0x0e06, 64, { 0x04, 0x00, 0x02, 0x0b, 0x1d, 0x00, 0x02, 0x0a, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31696 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0b, 0x10, 0x00, 0x02, 0x0e}},
31697 + {0x0e06, 64, { 0x04, 0x00, 0x02, 0x0a, 0xe6, 0x00, 0x02, 0x0b, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31698    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31699    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31700    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31701 @@ -420,15 +424,15 @@
31702   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31703    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31704    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31705 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
31706 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
31707   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x08, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
31708    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
31709    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
31710    0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x05, 0x02, 0x40, 0x00}},
31711   {0x1946, 64, { 0x00, 0x07, 0x05, 0x06, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05,
31712 -  0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x83, 0x02,
31713 -  0x40, 0x00, 0x00, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
31714 -  0x01, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x01}},
31715 +  0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x83, 0x02,
31716 +  0x40, 0x00, 0x01, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
31717 +  0x01, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x01}},
31718   {0x1986, 64, { 0x04, 0x03, 0x09, 0x04, 0x48, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61,
31719    0x00, 0x6e, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x61, 0x00, 0x20, 0x00, 0x64, 0x00, 0x69, 0x00, 0x76,
31720    0x00, 0x69, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x6f, 0x00, 0x66,
31721 @@ -438,5 +442,5 @@
31722    0x00, 0x42, 0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c,
31723    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
31724   {0x1a06,  4, { 0x72, 0x00, 0x00, 0x00}},
31725 -{ 0xffff,      0,      {0x00} }
31726 + {0xffff,      0,      {0x00} }
31727  };
31728 diff -Nur linux-2.4.19.old/drivers/usb/serial/keyspan_usa26msg.h linux-2.4.19/drivers/usb/serial/keyspan_usa26msg.h
31729 --- linux-2.4.19.old/drivers/usb/serial/keyspan_usa26msg.h      Wed Oct 10 00:15:02 2001
31730 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa26msg.h  Mon Nov 25 12:27:09 2002
31731 @@ -44,7 +44,7 @@
31732         Buffer formats for RX/TX data messages are not defined by
31733         a structure, but are described here:
31734  
31735 -       USB OUT (host -> USA26, transmit) messages contain a 
31736 +       USB OUT (host -> USAxx, transmit) messages contain a 
31737         REQUEST_ACK indicator (set to 0xff to request an ACK at the 
31738         completion of transmit; 0x00 otherwise), followed by data:
31739  
31740 @@ -52,25 +52,48 @@
31741  
31742         with a total data length of 63.
31743  
31744 -       USB IN (USA26 -> host, receive) messages contain either a zero
31745 -       flag (indicating no error in any data bytes):
31746 +       USB IN (USAxx -> host, receive) messages begin with a status
31747 +       byte in which the 0x80 bit is either:
31748  
31749 -               00 DAT DAT DAT ...
31750 +               (a)     0x80 bit clear
31751 +                       indicates that the bytes following it are all data
31752 +                       bytes:
31753  
31754 -       for a total of 63 data bytes, or a non-zero status flag (indicating 
31755 -       that all data bytes will be preceded by status flag):
31756 +                               STAT DATA DATA DATA DATA DATA ...
31757  
31758 -               STAT DAT STAT DAT STAT DAT ...
31759 +                       for a total of up to 63 DATA bytes,
31760  
31761 -       for a total of 32 data bytes.  The valid bits in the STAT bytes are:
31762 +       or:
31763 +
31764 +               (b)     0x80 bit set
31765 +                       indiates that the bytes following alternate data and
31766 +                       status bytes:
31767 +
31768 +                               STAT DATA STAT DATA STAT DATA STAT DATA ...
31769 +
31770 +                       for a total of up to 32 DATA bytes.
31771 +
31772 +       The valid bits in the STAT bytes are:
31773  
31774                 OVERRUN 0x02
31775                 PARITY  0x04
31776                 FRAMING 0x08
31777                 BREAK   0x10
31778  
31779 -       Note: a "no status" RX data message (first byte zero) can serve as
31780 -       a "break off" indicator.
31781 +       Notes:
31782 +
31783 +       (1) The OVERRUN bit can appear in either (a) or (b) format
31784 +               messages, but the but the PARITY/FRAMING/BREAK bits
31785 +               only appear in (b) format messages.
31786 +       (2) For the host to determine the exact point at which the
31787 +               overrun occurred (to identify the point in the data
31788 +               stream at which the data was lost), it needs to count
31789 +               128 characters, starting at the first character of the
31790 +               message in which OVERRUN was reported; the lost character(s)
31791 +               would have been received between the 128th and 129th
31792 +               characters.
31793 +       (3)     An RX data message in which the first byte has 0x80 clear
31794 +               serves as a "break off" indicator.
31795  
31796         revision history:
31797  
31798 @@ -80,6 +103,7 @@
31799         1999apr14       add resetDataToggle to control message
31800         2000jan04       merge with usa17msg.h
31801         2000jun01       add extended BSD-style copyright text
31802 +       2001jul05       change message format to improve OVERRUN case
31803  
31804         Note on shared names:
31805  
31806 @@ -93,7 +117,7 @@
31807  #define        __USA26MSG__
31808  
31809  
31810 -typedef struct keyspan_usa26_portControlMessage
31811 +struct keyspan_usa26_portControlMessage
31812  {
31813         /*
31814                 there are three types of "commands" sent in the control message:
31815 @@ -164,7 +188,7 @@
31816                 returnStatus,   // BOTH: return current status (even if it hasn't changed)
31817                 resetDataToggle;// BOTH: reset data toggle state to DATA0
31818         
31819 -} keyspan_usa26_portControlMessage;
31820 +};
31821  
31822  // defines for bits in lcr
31823  #define        USA_DATABITS_5          0x00
31824 @@ -182,7 +206,7 @@
31825  
31826  // all things called "StatusMessage" are sent on the status endpoint
31827  
31828 -typedef struct keyspan_usa26_portStatusMessage // one for each port
31829 +struct keyspan_usa26_portStatusMessage // one for each port
31830  {
31831         u8      port,                   // BOTH: 0=first, 1=second, other=see below
31832                 hskia_cts,              // USA26: reports HSKIA pin
31833 @@ -195,7 +219,7 @@
31834                 _txXoff,                // port is in XOFF state (either host or RX XOFF)
31835                 rxEnabled,              // as configured by rxOn/rxOff 1=on, 0=off
31836                 controlResponse;// 1=a control message has been processed
31837 -} keyspan_usa26_portStatusMessage;
31838 +};
31839  
31840  // bits in RX data message when STAT byte is included
31841  #define        RXERROR_OVERRUN 0x02
31842 @@ -203,28 +227,28 @@
31843  #define        RXERROR_FRAMING 0x08
31844  #define        RXERROR_BREAK   0x10
31845  
31846 -typedef struct keyspan_usa26_globalControlMessage
31847 +struct keyspan_usa26_globalControlMessage
31848  {
31849         u8      sendGlobalStatus,       // 2=request for two status responses
31850                 resetStatusToggle,      // 1=reset global status toggle
31851                 resetStatusCount;       // a cycling value
31852 -} keyspan_usa26_globalControlMessage;
31853 +};
31854  
31855 -typedef struct keyspan_usa26_globalStatusMessage
31856 +struct keyspan_usa26_globalStatusMessage
31857  {
31858         u8      port,                           // 3
31859                 sendGlobalStatus,       // from request, decremented
31860                 resetStatusCount;       // as in request
31861 -} keyspan_usa26_globalStatusMessage;
31862 +};
31863  
31864 -typedef struct keyspan_usa26_globalDebugMessage
31865 +struct keyspan_usa26_globalDebugMessage
31866  {
31867         u8      port,                           // 2
31868                 a,
31869                 b,
31870                 c,
31871                 d;
31872 -} keyspan_usa26_globalDebugMessage;
31873 +};
31874  
31875  // ie: the maximum length of an EZUSB endpoint buffer
31876  #define        MAX_DATA_LEN                    64
31877 diff -Nur linux-2.4.19.old/drivers/usb/serial/keyspan_usa28_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa28_fw.h
31878 --- linux-2.4.19.old/drivers/usb/serial/keyspan_usa28_fw.h      Wed Oct 10 00:15:02 2001
31879 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa28_fw.h  Mon Nov 25 12:27:09 2002
31880 @@ -1,28 +1,33 @@
31881  /* keyspan_usa28_fw.h
31882 -  
31883 -   Generated from Keyspan firmware image usa28code.h Sat Oct  6 12:11:26 EST 2001
31884 -   This firmware is for the Keyspan USA-28 Serial Adaptor
31885  
31886 -   "The firmware contained herein as keyspan_usa28_fw.h is
31887 -   Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
31888 -   ("Keyspan"), as an unpublished work.  This notice does not imply
31889 -   unrestricted or public access to this firmware which is a trade secret of
31890 -   Keyspan, and which may not be reproduced, used, sold or transferred to any
31891 -   third party without Keyspan's prior written consent.  All Rights Reserved.
31892 +       The firmware contained herein as keyspan_usa28_fw.h is
31893  
31894 -   This firmware may not be modified and may only be used with the Keyspan 
31895 -   USA-28 Serial Adapter.  Distribution and/or Modification of the
31896 -   keyspan.c driver which includes this firmware, in whole or in part,
31897 -   requires the inclusion of this statement."
31898 +               Copyright (C) 1999-2001
31899 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
31900 +               
31901 +       as an unpublished work. This notice does not imply unrestricted or
31902 +       public access to the source code from which this firmware image is
31903 +       derived.  Except as noted below this firmware image may not be 
31904 +       reproduced, used, sold or transferred to any third party without 
31905 +       Keyspan's prior written consent.  All Rights Reserved.
31906 +
31907 +       Permission is hereby granted for the distribution of this firmware 
31908 +       image as part of a Linux or other Open Source operating system kernel 
31909 +       in text or binary form as required. 
31910 +
31911 +       This firmware may not be modified and may only be used with  
31912 +       Keyspan hardware.  Distribution and/or Modification of the 
31913 +       keyspan.c driver which includes this firmware, in whole or in 
31914 +       part, requires the inclusion of this statement."
31915  
31916  */
31917  
31918  static const struct ezusb_hex_record keyspan_usa28_firmware[] = {
31919 - {0x0026, 10, { 0x12, 0x18, 0x09, 0x12, 0x18, 0xbc, 0x12, 0x14, 0xbb, 0x22}},
31920 + {0x0026, 10, { 0x12, 0x17, 0xdb, 0x12, 0x18, 0xb5, 0x12, 0x14, 0xc3, 0x22}},
31921   {0x0033,  3, { 0x02, 0x00, 0x1d}},
31922   {0x001d,  4, { 0x53, 0xd8, 0xef, 0x32}},
31923   {0x0006, 16, { 0x8e, 0x12, 0x8f, 0x13, 0xe5, 0x13, 0x15, 0x13, 0xae, 0x12, 0x70, 0x02, 0x15, 0x12, 0x4e, 0x60}},
31924 - {0x0016,  7, { 0x05, 0x12, 0x18, 0xab, 0x80, 0xee, 0x22}},
31925 + {0x0016,  7, { 0x05, 0x12, 0x18, 0xa4, 0x80, 0xee, 0x22}},
31926   {0x0003,  3, { 0x02, 0x00, 0x46}},
31927   {0x0046, 16, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0, 0xd0, 0x75, 0xd0, 0x08}},
31928   {0x0056, 16, { 0x30, 0x99, 0x0e, 0x30, 0x11, 0x07, 0xa2, 0x17, 0x92, 0x9b, 0x85, 0x46, 0x99, 0xc2, 0x99, 0xd2}},
31929 @@ -192,7 +197,7 @@
31930    0x40, 0x15, 0x15, 0x49, 0x15, 0x49, 0x05, 0x39, 0xd2, 0x0e, 0x80, 0x0b, 0x90, 0x7f, 0xbd, 0xe5,
31931    0x49, 0xf0, 0x75, 0x49, 0x00, 0xd2, 0x02, 0xd2, 0x25, 0x30, 0x25, 0x05, 0xc2, 0x25, 0x02, 0x00,
31932    0x56, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xce}},
31933 - {0x0a86, 64, { 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x0b, 0xa1, 0xe4, 0xf5, 0x12, 0x74, 0x40, 0x25, 0x12, 0xf5, 0x82, 0xe4,
31934 + {0x0a86, 64, { 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x0b, 0xa5, 0xe4, 0xf5, 0x12, 0x74, 0x40, 0x25, 0x12, 0xf5, 0x82, 0xe4,
31935    0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x12, 0x7c, 0x00, 0x7b, 0x00, 0x24, 0x4c, 0xf9, 0xec,
31936    0x34, 0x00, 0xfa, 0xef, 0x12, 0x15, 0xcd, 0x05, 0x12, 0xe5, 0x12, 0xb4, 0x18, 0xdb, 0xe5, 0x4c,
31937    0x60, 0x0c, 0x75, 0xc9, 0x20, 0x75, 0xc8, 0x36, 0x85, 0x4d, 0xca, 0x85, 0x4e, 0xcb, 0xe5}},
31938 @@ -207,166 +212,166 @@
31939   {0x0b46, 64, { 0x02, 0xf0, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x5e, 0x60, 0x0a, 0xd2, 0x9c, 0xc2, 0x98,
31940    0x75, 0x2e, 0x01, 0x75, 0x40, 0x28, 0xe5, 0x5f, 0x60, 0x07, 0xc2, 0x9c, 0xe4, 0xf5, 0x48, 0xf5,
31941    0x2e, 0xe5, 0x60, 0x60, 0x03, 0xe4, 0xf5, 0x48, 0xe5, 0x61, 0x60, 0x02, 0xd2, 0x07, 0xe5, 0x62,
31942 -  0x60, 0x08, 0xe5, 0x5e, 0x70, 0x02, 0xf5, 0x40, 0xd2, 0x0c, 0xe5, 0x63, 0x60, 0x15, 0x90}},
31943 +  0x60, 0x08, 0xe5, 0x5e, 0x70, 0x02, 0xf5, 0x40, 0xd2, 0x0c, 0xe5, 0x63, 0x60, 0x19, 0x90}},
31944   {0x0b86, 64, { 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x12, 0xf0, 0x74, 0x32, 0xf0, 0x74, 0x15, 0xf0,
31945 -  0x74, 0x35, 0xf0, 0xd2, 0x09, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0xa2, 0x13, 0xe4, 0x33, 0xff, 0x65,
31946 -  0x2b, 0x60, 0x04, 0x8f, 0x2b, 0xd2, 0x0c, 0xa2, 0x0b, 0xe4, 0x33, 0xff, 0x65, 0x2c, 0x60, 0x04,
31947 -  0x8f, 0x2c, 0xd2, 0x0c, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x08, 0x65, 0x27, 0x60, 0x07, 0xe0}},
31948 - {0x0bc6, 64, { 0x54, 0x08, 0xf5, 0x27, 0xd2, 0x0c, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x40, 0xb5, 0x29, 0x09, 0xe0, 0x54,
31949 -  0x40, 0x64, 0x40, 0xf5, 0x29, 0xd2, 0x0c, 0x30, 0x07, 0x35, 0xc2, 0xaf, 0x30, 0x01, 0x18, 0x90,
31950 -  0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0xe5, 0x48, 0x60, 0x09, 0x90, 0x7f, 0xb7, 0xf0, 0xe4, 0xf5,
31951 -  0x48, 0xc2, 0x01, 0xc2, 0x07, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1, 0x0f, 0xe5}},
31952 - {0x0c06, 64, { 0x48, 0x60, 0x09, 0x90, 0x7f, 0xb9, 0xf0, 0xe4, 0xf5, 0x48, 0xd2, 0x01, 0xc2, 0x07, 0xd2, 0xaf, 0x20,
31953 -  0x05, 0x37, 0x30, 0x03, 0x1b, 0x90, 0x7f, 0xc6, 0xe0, 0x20, 0xe1, 0x2d, 0x90, 0x7e, 0x40, 0xe0,
31954 -  0x13, 0x92, 0x15, 0x75, 0x4a, 0x01, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x7c, 0xd2, 0x05, 0x80, 0x19,
31955 -  0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x15, 0x75}},
31956 - {0x0c46, 64, { 0x4a, 0x01, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x7c, 0xd2, 0x05, 0x20, 0x21, 0x33, 0x20, 0x00, 0x06, 0xe5,
31957 -  0x4a, 0x65, 0x7c, 0x70, 0x2a, 0x30, 0x05, 0x1a, 0x30, 0x03, 0x09, 0xe4, 0x90, 0x7f, 0xc7, 0xf0,
31958 -  0xc2, 0x03, 0x80, 0x07, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x03, 0xc2, 0x05, 0xe4, 0xf5, 0x7c,
31959 -  0xf5, 0x4a, 0x30, 0x15, 0x0a, 0xc2, 0x15, 0xc2, 0x00, 0x90, 0x7f, 0xbf, 0x74, 0x01, 0xf0}},
31960 - {0x0c86, 64, { 0x30, 0x21, 0x03, 0x02, 0x0d, 0x90, 0x20, 0x05, 0x03, 0x02, 0x0d, 0x90, 0x30, 0x1c, 0x0a, 0x90, 0x7f,
31961 -  0x9b, 0xe0, 0x20, 0xe3, 0x03, 0x02, 0x0d, 0x90, 0x30, 0x0b, 0x03, 0x02, 0x0d, 0x90, 0x30, 0x13,
31962 -  0x03, 0x02, 0x0d, 0x90, 0x30, 0x03, 0x62, 0x30, 0x1b, 0x12, 0xaf, 0x4a, 0x05, 0x4a, 0x74, 0x40,
31963 -  0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x2d, 0xaf, 0x4a, 0x05}},
31964 - {0x0cc6, 64, { 0x4a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x13, 0xe5, 0x4a, 0xc3,
31965 -  0x95, 0x7c, 0x50, 0x2a, 0x30, 0x1b, 0x12, 0xaf, 0x4a, 0x05, 0x4a, 0x74, 0x40, 0x2f, 0xf5, 0x82,
31966 -  0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x17, 0xaf, 0x4a, 0x05, 0x4a, 0x74, 0x40, 0x2f,
31967 -  0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x46, 0xd2, 0x11, 0x80, 0x6b, 0xc2}},
31968 - {0x0d06, 64, { 0x11, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x03, 0x80, 0x60, 0x30, 0x1b, 0x12, 0xaf, 0x4a, 0x05, 0x4a,
31969 -  0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x2d, 0xaf, 0x4a,
31970 -  0x05, 0x4a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x13, 0xe5,
31971 -  0x4a, 0xc3, 0x95, 0x7c, 0x50, 0x2a, 0x30, 0x1b, 0x12, 0xaf, 0x4a, 0x05, 0x4a, 0x74, 0xc0}},
31972 - {0x0d46, 64, { 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x17, 0xaf, 0x4a, 0x05, 0x4a, 0x74,
31973 -  0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x46, 0xd2, 0x11, 0x80, 0x09,
31974 -  0xc2, 0x11, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x03, 0x30, 0x1b, 0x04, 0xa2, 0x2d, 0x92, 0x9b,
31975 -  0xd2, 0x21, 0xc2, 0xaf, 0x85, 0x13, 0x99, 0x20, 0x11, 0x0d, 0x30, 0x15, 0x0a, 0xc2, 0x15}},
31976 - {0x0d86, 64, { 0xc2, 0x00, 0x90, 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x90, 0x7f, 0xd0, 0xe0, 0x30, 0xe1, 0x03,
31977 -  0x02, 0x0e, 0xad, 0xe4, 0xf5, 0x12, 0x74, 0xc0, 0x25, 0x12, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5,
31978 -  0x83, 0xe0, 0xff, 0xe5, 0x12, 0x7c, 0x00, 0x7b, 0x00, 0x24, 0x64, 0xf9, 0xec, 0x34, 0x00, 0xfa,
31979 -  0xef, 0x12, 0x15, 0xcd, 0x05, 0x12, 0xe5, 0x12, 0xb4, 0x18, 0xdb, 0xe5, 0x64, 0x60, 0x0b}},
31980 - {0x0dc6, 64, { 0x75, 0x89, 0x60, 0x75, 0x88, 0x40, 0xd2, 0xdf, 0x85, 0x65, 0x8d, 0xe5, 0x67, 0x13, 0x92, 0x1d, 0x92,
31981 -  0xc7, 0xe5, 0x68, 0x13, 0x92, 0x1e, 0xe5, 0x69, 0x13, 0x92, 0x24, 0xe5, 0x6a, 0x60, 0x09, 0x90,
31982 -  0x7f, 0x97, 0xe0, 0x54, 0xef, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0x97, 0xe0, 0x44, 0x10, 0xf0, 0xe5,
31983 -  0x6b, 0x60, 0x09, 0x90, 0x7f, 0x97, 0xe0, 0x54, 0x7f, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0x97}},
31984 - {0x0e06, 64, { 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x71, 0x60, 0x0b, 0xc2, 0x14, 0xc2, 0x0d, 0x90, 0x7f, 0x94, 0xe0, 0x44,
31985 -  0x08, 0xf0, 0xe5, 0x72, 0x60, 0x0b, 0xd2, 0x0d, 0xd2, 0x0e, 0x90, 0x7f, 0x94, 0xe0, 0x44, 0x08,
31986 -  0xf0, 0xe5, 0x73, 0x60, 0x0d, 0xc2, 0xaf, 0xc2, 0x12, 0xd2, 0x00, 0xe4, 0xf5, 0x7d, 0xf5, 0x4b,
31987 -  0xd2, 0xaf, 0xe5, 0x74, 0x60, 0x05, 0x30, 0x24, 0x02, 0xd2, 0x0d, 0xe5, 0x75, 0x60, 0x15}},
31988 - {0x0e46, 64, { 0x90, 0x7f, 0x94, 0xe0, 0x54, 0xf7, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0x08, 0xf0, 0x90, 0x7f, 0x97,
31989 -  0xe0, 0x54, 0xf7, 0xf0, 0xe5, 0x76, 0x60, 0x0a, 0xd2, 0xc4, 0xc2, 0xc0, 0x75, 0x3a, 0x01, 0x75,
31990 -  0x41, 0x28, 0xe5, 0x77, 0x60, 0x07, 0xc2, 0xc4, 0xe4, 0xf5, 0x49, 0xf5, 0x3a, 0xe5, 0x78, 0x60,
31991 -  0x03, 0xe4, 0xf5, 0x49, 0xe5, 0x79, 0x60, 0x02, 0xd2, 0x08, 0xe5, 0x7a, 0x60, 0x08, 0xe5}},
31992 - {0x0e86, 64, { 0x76, 0x70, 0x02, 0xf5, 0x41, 0xd2, 0x0e, 0xe5, 0x7b, 0x60, 0x15, 0x90, 0x7f, 0xd7, 0x74, 0x13, 0xf0,
31993 -  0x74, 0x33, 0xf0, 0x74, 0x14, 0xf0, 0x74, 0x34, 0xf0, 0x74, 0x16, 0xf0, 0x74, 0x36, 0xf0, 0xd2,
31994 -  0x0a, 0xe4, 0x90, 0x7f, 0xd1, 0xf0, 0xa2, 0x14, 0xe4, 0x33, 0xff, 0x65, 0x37, 0x60, 0x04, 0x8f,
31995 -  0x37, 0xd2, 0x0e, 0xa2, 0x0d, 0xe4, 0x33, 0xff, 0x65, 0x38, 0x60, 0x04, 0x8f, 0x38, 0xd2}},
31996 - {0x0ec6, 64, { 0x0e, 0x90, 0x7f, 0x9a, 0xe0, 0x54, 0x20, 0x65, 0x33, 0x60, 0x07, 0xe0, 0x54, 0x20, 0xf5, 0x33, 0xd2,
31997 -  0x0e, 0x90, 0x7f, 0x9a, 0xe0, 0x54, 0x40, 0xb5, 0x35, 0x09, 0xe0, 0x54, 0x40, 0x64, 0x40, 0xf5,
31998 -  0x35, 0xd2, 0x0e, 0x30, 0x08, 0x35, 0xc2, 0xaf, 0x30, 0x02, 0x18, 0x90, 0x7f, 0xbc, 0xe0, 0x20,
31999 -  0xe1, 0x27, 0xe5, 0x49, 0x60, 0x09, 0x90, 0x7f, 0xbb, 0xf0, 0xe4, 0xf5, 0x49, 0xc2, 0x02}},
32000 - {0x0f06, 64, { 0xc2, 0x08, 0x80, 0x16, 0x90, 0x7f, 0xba, 0xe0, 0x20, 0xe1, 0x0f, 0xe5, 0x49, 0x60, 0x09, 0x90, 0x7f,
32001 -  0xbd, 0xf0, 0xe4, 0xf5, 0x49, 0xd2, 0x02, 0xc2, 0x08, 0xd2, 0xaf, 0x20, 0x06, 0x37, 0x30, 0x04,
32002 -  0x1b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x2d, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x16, 0x75,
32003 -  0x4b, 0x01, 0x90, 0x7f, 0xcb, 0xe0, 0xf5, 0x7d, 0xd2, 0x06, 0x80, 0x19, 0x90, 0x7f, 0xcc}},
32004 - {0x0f46, 64, { 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x16, 0x75, 0x4b, 0x01, 0x90, 0x7f, 0xcd,
32005 -  0xe0, 0xf5, 0x7d, 0xd2, 0x06, 0x20, 0x22, 0x33, 0x20, 0x00, 0x06, 0xe5, 0x4b, 0x65, 0x7d, 0x70,
32006 -  0x2a, 0x30, 0x06, 0x1a, 0x30, 0x04, 0x09, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0xc2, 0x04, 0x80, 0x07,
32007 -  0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0xd2, 0x04, 0xc2, 0x06, 0xe4, 0xf5, 0x7d, 0xf5, 0x4b, 0x30}},
32008 - {0x0f86, 64, { 0x16, 0x0a, 0xc2, 0x16, 0xc2, 0x00, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0x30, 0x22, 0x03, 0x02, 0x10,
32009 -  0x9c, 0x20, 0x06, 0x03, 0x02, 0x10, 0x9c, 0x30, 0x1e, 0x0a, 0x90, 0x7f, 0x9a, 0xe0, 0x20, 0xe5,
32010 -  0x03, 0x02, 0x10, 0x9c, 0x30, 0x0d, 0x03, 0x02, 0x10, 0x9c, 0x30, 0x14, 0x03, 0x02, 0x10, 0x9c,
32011 -  0x30, 0x04, 0x62, 0x30, 0x1d, 0x12, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5, 0x82}},
32012 - {0x0fc6, 64, { 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x2d, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5,
32013 -  0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x13, 0xe5, 0x4b, 0xc3, 0x95, 0x7d, 0x50, 0x2a,
32014 -  0x30, 0x1d, 0x12, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5,
32015 -  0x83, 0xe0, 0x13, 0x92, 0x18, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4}},
32016 - {0x1006, 64, { 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x47, 0xd2, 0x12, 0x80, 0x6b, 0xc2, 0x12, 0xe4, 0x90, 0x7f, 0xcb,
32017 -  0xf0, 0xc2, 0x04, 0x80, 0x60, 0x30, 0x1d, 0x12, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2f, 0xf5,
32018 -  0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x2d, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0xc0,
32019 -  0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xf5, 0x13, 0xe5, 0x4b, 0xc3, 0x95}},
32020 - {0x1046, 64, { 0x7d, 0x50, 0x2a, 0x30, 0x1d, 0x12, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34,
32021 -  0x7c, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x18, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2f, 0xf5, 0x82,
32022 -  0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xf5, 0x47, 0xd2, 0x12, 0x80, 0x09, 0xc2, 0x12, 0xe4, 0x90,
32023 -  0x7f, 0xcd, 0xf0, 0xd2, 0x04, 0x30, 0x1d, 0x04, 0xa2, 0x2d, 0x92, 0xc3, 0xd2, 0x22, 0xc2}},
32024 - {0x1086, 64, { 0xaf, 0x85, 0x13, 0xc1, 0x20, 0x12, 0x0d, 0x30, 0x16, 0x0a, 0xc2, 0x16, 0xc2, 0x00, 0x90, 0x7f, 0xc1,
32025 -  0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x11, 0x72, 0xe5,
32026 -  0x1a, 0x70, 0x46, 0x30, 0x0c, 0x3f, 0xe5, 0x40, 0x70, 0x3b, 0xa2, 0x09, 0x33, 0xf5, 0x31, 0xc2,
32027 -  0x09, 0xc2, 0x0c, 0xe4, 0xf5, 0x12, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x26, 0x25, 0x12, 0xf9}},
32028 - {0x10c6, 64, { 0xee, 0x34, 0x00, 0xfa, 0x12, 0x15, 0x87, 0xff, 0x74, 0x80, 0x25, 0x12, 0xf5, 0x82, 0xe4, 0x34, 0x7b,
32029 -  0xf5, 0x83, 0xef, 0xf0, 0x05, 0x12, 0xe5, 0x12, 0xb4, 0x0c, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x0c,
32030 -  0xf0, 0x75, 0x40, 0x10, 0x22, 0x75, 0x1a, 0x01, 0x22, 0xe5, 0x1a, 0x64, 0x01, 0x70, 0x45, 0x30,
32031 -  0x0e, 0x3e, 0xe5, 0x41, 0x70, 0x3a, 0xa2, 0x0a, 0x33, 0xf5, 0x3d, 0xc2, 0x0a, 0xc2, 0x0e}},
32032 - {0x1106, 64, { 0xe4, 0xf5, 0x12, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x32, 0x25, 0x12, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12,
32033 -  0x15, 0x87, 0xff, 0x74, 0x80, 0x25, 0x12, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0,
32034 -  0x05, 0x12, 0xe5, 0x12, 0xb4, 0x0c, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x0c, 0xf0, 0x75, 0x41, 0x10,
32035 -  0x75, 0x1a, 0x02, 0x22, 0xe5, 0x1c, 0x60, 0x30, 0x15, 0x1c, 0xe4, 0xf5, 0x12, 0x7e, 0x00}},
32036 - {0x1146, 64, { 0x7b, 0x00, 0x74, 0x1b, 0x25, 0x12, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x15, 0x87, 0xff, 0x74, 0x80,
32037 -  0x25, 0x12, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x12, 0xe5, 0x12, 0xb4,
32038 -  0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x1a, 0x22, 0x90, 0x7f, 0xe9, 0xe0,
32039 -  0x12, 0x16, 0x17, 0x12, 0x38, 0x00, 0x12, 0xac, 0x01, 0x13, 0x18, 0x03, 0x11, 0x96, 0x06}},
32040 - {0x1186, 64, { 0x12, 0x2b, 0x08, 0x12, 0x25, 0x09, 0x12, 0x18, 0x0a, 0x13, 0x6e, 0x0b, 0x00, 0x00, 0x13, 0x67, 0x90,
32041 -  0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x40, 0x24, 0x02, 0x70, 0x69, 0x74, 0x19,
32042 -  0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xea,
32043 -  0xe0, 0xff, 0x12, 0x17, 0x4b, 0x8b, 0x12, 0x8a, 0x13, 0x89, 0x14, 0xea, 0x49, 0x60, 0x11}},
32044 - {0x11c6, 64, { 0xae, 0x02, 0xee, 0x90, 0x7f, 0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x13, 0x6e,
32045 -  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12,
32046 -  0x17, 0x9a, 0x8b, 0x12, 0x8a, 0x13, 0x89, 0x14, 0xea, 0x49, 0x60, 0x11, 0xae, 0x02, 0xee, 0x90,
32047 -  0x7f, 0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f}},
32048 - {0x1206, 64, { 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13,
32049 -  0x6e, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x13, 0x6e, 0x12, 0x14,
32050 -  0xbb, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x13,
32051 -  0x6e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70}},
32052 - {0x1246, 64, { 0x5b, 0xa2, 0x26, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x2b, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00,
32053 -  0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x13, 0x6e, 0xe4, 0x90, 0x7f,
32054 -  0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xec,
32055 -  0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0}},
32056 - {0x1286, 64, { 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4,
32057 -  0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
32058 -  0x01, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60,
32059 -  0x03, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x26, 0x02, 0x13}},
32060 - {0x12c6, 64, { 0x6e, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38,
32061 -  0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f,
32062 -  0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec,
32063 -  0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90}},
32064 - {0x1306, 64, { 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
32065 -  0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea,
32066 -  0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x26, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
32067 -  0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff}},
32068 - {0x1346, 64, { 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f,
32069 -  0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07,
32070 -  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0x20,
32071 -  0x28, 0x03, 0x02, 0x14, 0xba, 0xe5, 0x40, 0x60, 0x02, 0x15, 0x40, 0xe5, 0x48, 0x60, 0x4f}},
32072 - {0x1386, 64, { 0x65, 0x44, 0x70, 0x45, 0xe5, 0x42, 0xf4, 0x60, 0x02, 0x05, 0x42, 0xe5, 0x42, 0xc3, 0x95, 0x55, 0x40,
32073 -  0x3d, 0xc2, 0xaf, 0x30, 0x01, 0x18, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0x90, 0x7f, 0xb7,
32074 -  0xe5, 0x48, 0xf0, 0xc2, 0x01, 0xe4, 0xf5, 0x48, 0xf5, 0x42, 0xf5, 0x44, 0x80, 0x16, 0x90, 0x7f,
32075 -  0xb6, 0xe0, 0x20, 0xe1, 0x0f, 0x90, 0x7f, 0xb9, 0xe5, 0x48, 0xf0, 0xd2, 0x01, 0xe4, 0xf5}},
32076 - {0x13c6, 64, { 0x48, 0xf5, 0x42, 0xf5, 0x44, 0xd2, 0xaf, 0x80, 0x06, 0x85, 0x48, 0x44, 0xe4, 0xf5, 0x42, 0xe5, 0x2e,
32077 -  0x60, 0x2d, 0x20, 0x19, 0x07, 0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe0, 0x0e, 0xe5, 0x2f, 0x60, 0x05,
32078 -  0xe4, 0xf5, 0x2f, 0xd2, 0x0c, 0xe4, 0xf5, 0x3e, 0x80, 0x13, 0xe5, 0x3e, 0xd3, 0x95, 0x56, 0x50,
32079 -  0x0c, 0xe5, 0x3e, 0xb5, 0x56, 0x05, 0x75, 0x2f, 0x01, 0xd2, 0x0c, 0x05, 0x3e, 0xc2, 0x19}},
32080 - {0x1406, 64, { 0xe5, 0x41, 0x60, 0x02, 0x15, 0x41, 0xe5, 0x49, 0x60, 0x4f, 0x65, 0x45, 0x70, 0x45, 0xe5, 0x43, 0xf4,
32081 -  0x60, 0x02, 0x05, 0x43, 0xe5, 0x43, 0xc3, 0x95, 0x6d, 0x40, 0x3d, 0xc2, 0xaf, 0x30, 0x02, 0x18,
32082 -  0x90, 0x7f, 0xbc, 0xe0, 0x20, 0xe1, 0x27, 0x90, 0x7f, 0xbb, 0xe5, 0x49, 0xf0, 0xc2, 0x02, 0xe4,
32083 -  0xf5, 0x49, 0xf5, 0x43, 0xf5, 0x45, 0x80, 0x16, 0x90, 0x7f, 0xba, 0xe0, 0x20, 0xe1, 0x0f}},
32084 - {0x1446, 64, { 0x90, 0x7f, 0xbd, 0xe5, 0x49, 0xf0, 0xd2, 0x02, 0xe4, 0xf5, 0x49, 0xf5, 0x43, 0xf5, 0x45, 0xd2, 0xaf,
32085 -  0x80, 0x06, 0x85, 0x49, 0x45, 0xe4, 0xf5, 0x43, 0xe5, 0x3a, 0x60, 0x2d, 0x20, 0x1a, 0x07, 0x90,
32086 -  0x7f, 0x9a, 0xe0, 0x30, 0xe2, 0x0e, 0xe5, 0x3b, 0x60, 0x05, 0xe4, 0xf5, 0x3b, 0xd2, 0x0e, 0xe4,
32087 -  0xf5, 0x3f, 0x80, 0x13, 0xe5, 0x3f, 0xd3, 0x95, 0x6e, 0x50, 0x0c, 0xe5, 0x3f, 0xb5, 0x6e}},
32088 - {0x1486, 64, { 0x05, 0x75, 0x3b, 0x01, 0xd2, 0x0e, 0x05, 0x3f, 0xc2, 0x1a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23,
32089 -  0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5, 0x1c, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x1d, 0x90,
32090 -  0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90,
32091 -  0x7f, 0xd3, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0}},
32092 - {0x14c6, 64, { 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x10, 0xf0, 0x90, 0x7f, 0x94, 0x74, 0x0d, 0xf0, 0x90, 0x7f, 0x9d, 0x74,
32093 -  0x9a, 0xf0, 0x90, 0x7f, 0x97, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0x23, 0xf0, 0x90,
32094 -  0x7f, 0x9e, 0x74, 0x84, 0xf0, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x90, 0x7f,
32095 -  0xcf, 0xf0, 0x75, 0x98, 0x40, 0x43, 0xa8, 0x10, 0xc2, 0x1b, 0xc2, 0x05, 0xc2, 0x21, 0xc2}},
32096 - {0x1506, 64, { 0x0b, 0xc2, 0x13, 0xf5, 0x7c, 0xf5, 0x4a, 0xc2, 0x11, 0xc2, 0x15, 0xf5, 0x42, 0xc2, 0x19, 0xf5, 0x44,
32097 -  0xf5, 0x48, 0xc2, 0x23, 0xc2, 0x1c, 0xf5, 0x2d, 0xf5, 0x2f, 0xc2, 0x07, 0xc2, 0x00, 0xc2, 0x1f,
32098 -  0xf5, 0x3e, 0xc2, 0x09, 0xd2, 0x01, 0xd2, 0x03, 0xd2, 0x0c, 0xf5, 0x26, 0x90, 0x7f, 0xcb, 0xf0,
32099 -  0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xd1, 0xf0, 0x75, 0xc0, 0x40, 0x43, 0xa8, 0x40, 0xc2}},
32100 - {0x1546, 64, { 0x1d, 0xc2, 0x06, 0xc2, 0x22, 0xc2, 0x0d, 0xc2, 0x14, 0xf5, 0x7d, 0xf5, 0x4b, 0xc2, 0x12, 0xc2, 0x16,
32101 -  0xf5, 0x43, 0xc2, 0x1a, 0xf5, 0x45, 0xf5, 0x49, 0xc2, 0x24, 0xc2, 0x1e, 0xf5, 0x39, 0xf5, 0x3b,
32102 -  0xc2, 0x08, 0xc2, 0x00, 0xc2, 0x20, 0xf5, 0x3f, 0xc2, 0x0a, 0xd2, 0x02, 0xd2, 0x04, 0xd2, 0x0e,
32103 +  0x74, 0x35, 0xf0, 0xd2, 0x03, 0xd2, 0x01, 0xd2, 0x09, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0xa2, 0x13,
32104 +  0xe4, 0x33, 0xff, 0x65, 0x2b, 0x60, 0x04, 0x8f, 0x2b, 0xd2, 0x0c, 0xa2, 0x0b, 0xe4, 0x33, 0xff,
32105 +  0x65, 0x2c, 0x60, 0x04, 0x8f, 0x2c, 0xd2, 0x0c, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x08, 0x65}},
32106 + {0x0bc6, 64, { 0x27, 0x60, 0x07, 0xe0, 0x54, 0x08, 0xf5, 0x27, 0xd2, 0x0c, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x40, 0xb5,
32107 +  0x29, 0x09, 0xe0, 0x54, 0x40, 0x64, 0x40, 0xf5, 0x29, 0xd2, 0x0c, 0x30, 0x07, 0x35, 0xc2, 0xaf,
32108 +  0x30, 0x01, 0x18, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0xe5, 0x48, 0x60, 0x09, 0x90, 0x7f,
32109 +  0xb7, 0xf0, 0xe4, 0xf5, 0x48, 0xc2, 0x01, 0xc2, 0x07, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0}},
32110 + {0x0c06, 64, { 0x20, 0xe1, 0x0f, 0xe5, 0x48, 0x60, 0x09, 0x90, 0x7f, 0xb9, 0xf0, 0xe4, 0xf5, 0x48, 0xd2, 0x01, 0xc2,
32111 +  0x07, 0xd2, 0xaf, 0x20, 0x05, 0x37, 0x30, 0x03, 0x1b, 0x90, 0x7f, 0xc6, 0xe0, 0x20, 0xe1, 0x2d,
32112 +  0x90, 0x7e, 0x40, 0xe0, 0x13, 0x92, 0x15, 0x75, 0x4a, 0x01, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x7c,
32113 +  0xd2, 0x05, 0x80, 0x19, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7d, 0xc0, 0xe0}},
32114 + {0x0c46, 64, { 0x13, 0x92, 0x15, 0x75, 0x4a, 0x01, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x7c, 0xd2, 0x05, 0x20, 0x21, 0x33,
32115 +  0x20, 0x00, 0x06, 0xe5, 0x4a, 0x65, 0x7c, 0x70, 0x2a, 0x30, 0x05, 0x1a, 0x30, 0x03, 0x09, 0xe4,
32116 +  0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x03, 0x80, 0x07, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x03, 0xc2,
32117 +  0x05, 0xe4, 0xf5, 0x7c, 0xf5, 0x4a, 0x30, 0x15, 0x0a, 0xc2, 0x15, 0xc2, 0x00, 0x90, 0x7f}},
32118 + {0x0c86, 64, { 0xbf, 0x74, 0x01, 0xf0, 0x30, 0x21, 0x03, 0x02, 0x0d, 0x94, 0x20, 0x05, 0x03, 0x02, 0x0d, 0x94, 0x30,
32119 +  0x1c, 0x0a, 0x90, 0x7f, 0x9b, 0xe0, 0x20, 0xe3, 0x03, 0x02, 0x0d, 0x94, 0x30, 0x0b, 0x03, 0x02,
32120 +  0x0d, 0x94, 0x30, 0x13, 0x03, 0x02, 0x0d, 0x94, 0x30, 0x03, 0x62, 0x30, 0x1b, 0x12, 0xaf, 0x4a,
32121 +  0x05, 0x4a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92}},
32122 + {0x0cc6, 64, { 0x2d, 0xaf, 0x4a, 0x05, 0x4a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5,
32123 +  0x13, 0xe5, 0x4a, 0xc3, 0x95, 0x7c, 0x50, 0x2a, 0x30, 0x1b, 0x12, 0xaf, 0x4a, 0x05, 0x4a, 0x74,
32124 +  0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x17, 0xaf, 0x4a, 0x05,
32125 +  0x4a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x46, 0xd2}},
32126 + {0x0d06, 64, { 0x11, 0x80, 0x6b, 0xc2, 0x11, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x03, 0x80, 0x60, 0x30, 0x1b, 0x12,
32127 +  0xaf, 0x4a, 0x05, 0x4a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13,
32128 +  0x92, 0x2d, 0xaf, 0x4a, 0x05, 0x4a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83,
32129 +  0xe0, 0xf5, 0x13, 0xe5, 0x4a, 0xc3, 0x95, 0x7c, 0x50, 0x2a, 0x30, 0x1b, 0x12, 0xaf, 0x4a}},
32130 + {0x0d46, 64, { 0x05, 0x4a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x17, 0xaf,
32131 +  0x4a, 0x05, 0x4a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x46,
32132 +  0xd2, 0x11, 0x80, 0x09, 0xc2, 0x11, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x03, 0x30, 0x1b, 0x04,
32133 +  0xa2, 0x2d, 0x92, 0x9b, 0xd2, 0x21, 0xc2, 0xaf, 0x85, 0x13, 0x99, 0x20, 0x11, 0x0d, 0x30}},
32134 + {0x0d86, 64, { 0x15, 0x0a, 0xc2, 0x15, 0xc2, 0x00, 0x90, 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x90, 0x7f, 0xd0,
32135 +  0xe0, 0x30, 0xe1, 0x03, 0x02, 0x0e, 0xb5, 0xe4, 0xf5, 0x12, 0x74, 0xc0, 0x25, 0x12, 0xf5, 0x82,
32136 +  0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x12, 0x7c, 0x00, 0x7b, 0x00, 0x24, 0x64, 0xf9,
32137 +  0xec, 0x34, 0x00, 0xfa, 0xef, 0x12, 0x15, 0xcd, 0x05, 0x12, 0xe5, 0x12, 0xb4, 0x18, 0xdb}},
32138 + {0x0dc6, 64, { 0xe5, 0x64, 0x60, 0x0b, 0x75, 0x89, 0x60, 0x75, 0x88, 0x40, 0xd2, 0xdf, 0x85, 0x65, 0x8d, 0xe5, 0x67,
32139 +  0x13, 0x92, 0x1d, 0x92, 0xc7, 0xe5, 0x68, 0x13, 0x92, 0x1e, 0xe5, 0x69, 0x13, 0x92, 0x24, 0xe5,
32140 +  0x6a, 0x60, 0x09, 0x90, 0x7f, 0x97, 0xe0, 0x54, 0xef, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0x97, 0xe0,
32141 +  0x44, 0x10, 0xf0, 0xe5, 0x6b, 0x60, 0x09, 0x90, 0x7f, 0x97, 0xe0, 0x54, 0x7f, 0xf0, 0x80}},
32142 + {0x0e06, 64, { 0x07, 0x90, 0x7f, 0x97, 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x71, 0x60, 0x0b, 0xc2, 0x14, 0xc2, 0x0d, 0x90,
32143 +  0x7f, 0x94, 0xe0, 0x44, 0x08, 0xf0, 0xe5, 0x72, 0x60, 0x0b, 0xd2, 0x0d, 0xd2, 0x0e, 0x90, 0x7f,
32144 +  0x94, 0xe0, 0x44, 0x08, 0xf0, 0xe5, 0x73, 0x60, 0x0d, 0xc2, 0xaf, 0xc2, 0x12, 0xd2, 0x00, 0xe4,
32145 +  0xf5, 0x7d, 0xf5, 0x4b, 0xd2, 0xaf, 0xe5, 0x74, 0x60, 0x05, 0x30, 0x24, 0x02, 0xd2, 0x0d}},
32146 + {0x0e46, 64, { 0xe5, 0x75, 0x60, 0x15, 0x90, 0x7f, 0x94, 0xe0, 0x54, 0xf7, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0x08,
32147 +  0xf0, 0x90, 0x7f, 0x97, 0xe0, 0x54, 0xf7, 0xf0, 0xe5, 0x76, 0x60, 0x0a, 0xd2, 0xc4, 0xc2, 0xc0,
32148 +  0x75, 0x3a, 0x01, 0x75, 0x41, 0x28, 0xe5, 0x77, 0x60, 0x07, 0xc2, 0xc4, 0xe4, 0xf5, 0x49, 0xf5,
32149 +  0x3a, 0xe5, 0x78, 0x60, 0x03, 0xe4, 0xf5, 0x49, 0xe5, 0x79, 0x60, 0x02, 0xd2, 0x08, 0xe5}},
32150 + {0x0e86, 64, { 0x7a, 0x60, 0x08, 0xe5, 0x76, 0x70, 0x02, 0xf5, 0x41, 0xd2, 0x0e, 0xe5, 0x7b, 0x60, 0x19, 0x90, 0x7f,
32151 +  0xd7, 0x74, 0x13, 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x14, 0xf0, 0x74, 0x34, 0xf0, 0x74, 0x16, 0xf0,
32152 +  0x74, 0x36, 0xf0, 0xd2, 0x04, 0xd2, 0x02, 0xd2, 0x0a, 0xe4, 0x90, 0x7f, 0xd1, 0xf0, 0xa2, 0x14,
32153 +  0xe4, 0x33, 0xff, 0x65, 0x37, 0x60, 0x04, 0x8f, 0x37, 0xd2, 0x0e, 0xa2, 0x0d, 0xe4, 0x33}},
32154 + {0x0ec6, 64, { 0xff, 0x65, 0x38, 0x60, 0x04, 0x8f, 0x38, 0xd2, 0x0e, 0x90, 0x7f, 0x9a, 0xe0, 0x54, 0x20, 0x65, 0x33,
32155 +  0x60, 0x07, 0xe0, 0x54, 0x20, 0xf5, 0x33, 0xd2, 0x0e, 0x90, 0x7f, 0x9a, 0xe0, 0x54, 0x40, 0xb5,
32156 +  0x35, 0x09, 0xe0, 0x54, 0x40, 0x64, 0x40, 0xf5, 0x35, 0xd2, 0x0e, 0x30, 0x08, 0x35, 0xc2, 0xaf,
32157 +  0x30, 0x02, 0x18, 0x90, 0x7f, 0xbc, 0xe0, 0x20, 0xe1, 0x27, 0xe5, 0x49, 0x60, 0x09, 0x90}},
32158 + {0x0f06, 64, { 0x7f, 0xbb, 0xf0, 0xe4, 0xf5, 0x49, 0xc2, 0x02, 0xc2, 0x08, 0x80, 0x16, 0x90, 0x7f, 0xba, 0xe0, 0x20,
32159 +  0xe1, 0x0f, 0xe5, 0x49, 0x60, 0x09, 0x90, 0x7f, 0xbd, 0xf0, 0xe4, 0xf5, 0x49, 0xd2, 0x02, 0xc2,
32160 +  0x08, 0xd2, 0xaf, 0x20, 0x06, 0x37, 0x30, 0x04, 0x1b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x2d,
32161 +  0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x16, 0x75, 0x4b, 0x01, 0x90, 0x7f, 0xcb, 0xe0, 0xf5}},
32162 + {0x0f46, 64, { 0x7d, 0xd2, 0x06, 0x80, 0x19, 0x90, 0x7f, 0xcc, 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7c, 0xc0, 0xe0, 0x13,
32163 +  0x92, 0x16, 0x75, 0x4b, 0x01, 0x90, 0x7f, 0xcd, 0xe0, 0xf5, 0x7d, 0xd2, 0x06, 0x20, 0x22, 0x33,
32164 +  0x20, 0x00, 0x06, 0xe5, 0x4b, 0x65, 0x7d, 0x70, 0x2a, 0x30, 0x06, 0x1a, 0x30, 0x04, 0x09, 0xe4,
32165 +  0x90, 0x7f, 0xcb, 0xf0, 0xc2, 0x04, 0x80, 0x07, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0xd2, 0x04}},
32166 + {0x0f86, 64, { 0xc2, 0x06, 0xe4, 0xf5, 0x7d, 0xf5, 0x4b, 0x30, 0x16, 0x0a, 0xc2, 0x16, 0xc2, 0x00, 0x90, 0x7f, 0xc1,
32167 +  0x74, 0x01, 0xf0, 0x30, 0x22, 0x03, 0x02, 0x10, 0xa4, 0x20, 0x06, 0x03, 0x02, 0x10, 0xa4, 0x30,
32168 +  0x1e, 0x0a, 0x90, 0x7f, 0x9a, 0xe0, 0x20, 0xe5, 0x03, 0x02, 0x10, 0xa4, 0x30, 0x0d, 0x03, 0x02,
32169 +  0x10, 0xa4, 0x30, 0x14, 0x03, 0x02, 0x10, 0xa4, 0x30, 0x04, 0x62, 0x30, 0x1d, 0x12, 0xaf}},
32170 + {0x0fc6, 64, { 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x2d,
32171 +  0xaf, 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5,
32172 +  0x13, 0xe5, 0x4b, 0xc3, 0x95, 0x7d, 0x50, 0x2a, 0x30, 0x1d, 0x12, 0xaf, 0x4b, 0x05, 0x4b, 0x74,
32173 +  0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x18, 0xaf, 0x4b}},
32174 + {0x1006, 64, { 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x47, 0xd2, 0x12,
32175 +  0x80, 0x6b, 0xc2, 0x12, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0xc2, 0x04, 0x80, 0x60, 0x30, 0x1d, 0x12,
32176 +  0xaf, 0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0x13,
32177 +  0x92, 0x2d, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5}},
32178 + {0x1046, 64, { 0x83, 0xe0, 0xf5, 0x13, 0xe5, 0x4b, 0xc3, 0x95, 0x7d, 0x50, 0x2a, 0x30, 0x1d, 0x12, 0xaf, 0x4b, 0x05,
32179 +  0x4b, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x18, 0xaf,
32180 +  0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xf5, 0x47,
32181 +  0xd2, 0x12, 0x80, 0x09, 0xc2, 0x12, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0xd2, 0x04, 0x30, 0x1d}},
32182 + {0x1086, 64, { 0x04, 0xa2, 0x2d, 0x92, 0xc3, 0xd2, 0x22, 0xc2, 0xaf, 0x85, 0x13, 0xc1, 0x20, 0x12, 0x0d, 0x30, 0x16,
32183 +  0x0a, 0xc2, 0x16, 0xc2, 0x00, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x90, 0x7f, 0xc2,
32184 +  0xe0, 0x30, 0xe1, 0x03, 0x02, 0x11, 0x7a, 0xe5, 0x1a, 0x70, 0x46, 0x30, 0x0c, 0x3f, 0xe5, 0x40,
32185 +  0x70, 0x3b, 0xa2, 0x09, 0x33, 0xf5, 0x31, 0xc2, 0x09, 0xc2, 0x0c, 0xe4, 0xf5, 0x12, 0x7e}},
32186 + {0x10c6, 64, { 0x00, 0x7b, 0x00, 0x74, 0x26, 0x25, 0x12, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x15, 0x87, 0xff, 0x74,
32187 +  0x80, 0x25, 0x12, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x12, 0xe5, 0x12,
32188 +  0xb4, 0x0c, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x0c, 0xf0, 0x75, 0x40, 0x10, 0x22, 0x75, 0x1a, 0x01,
32189 +  0x22, 0xe5, 0x1a, 0x64, 0x01, 0x70, 0x45, 0x30, 0x0e, 0x3e, 0xe5, 0x41, 0x70, 0x3a, 0xa2}},
32190 + {0x1106, 64, { 0x0a, 0x33, 0xf5, 0x3d, 0xc2, 0x0a, 0xc2, 0x0e, 0xe4, 0xf5, 0x12, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x32,
32191 +  0x25, 0x12, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x15, 0x87, 0xff, 0x74, 0x80, 0x25, 0x12, 0xf5,
32192 +  0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x12, 0xe5, 0x12, 0xb4, 0x0c, 0xdb, 0x90,
32193 +  0x7f, 0xc3, 0x74, 0x0c, 0xf0, 0x75, 0x41, 0x10, 0x75, 0x1a, 0x02, 0x22, 0xe5, 0x1c, 0x60}},
32194 + {0x1146, 64, { 0x30, 0x15, 0x1c, 0xe4, 0xf5, 0x12, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x1b, 0x25, 0x12, 0xf9, 0xee, 0x34,
32195 +  0x00, 0xfa, 0x12, 0x15, 0x87, 0xff, 0x74, 0x80, 0x25, 0x12, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5,
32196 +  0x83, 0xef, 0xf0, 0x05, 0x12, 0xe5, 0x12, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0,
32197 +  0xe4, 0xf5, 0x1a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x16, 0x17, 0x12, 0x40, 0x00, 0x12}},
32198 + {0x1186, 64, { 0xb4, 0x01, 0x13, 0x20, 0x03, 0x11, 0x9e, 0x06, 0x12, 0x33, 0x08, 0x12, 0x2d, 0x09, 0x12, 0x20, 0x0a,
32199 +  0x13, 0x76, 0x0b, 0x00, 0x00, 0x13, 0x6f, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14,
32200 +  0x60, 0x40, 0x24, 0x02, 0x70, 0x69, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f,
32201 +  0xd5, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x17, 0x4b, 0x8b, 0x12}},
32202 + {0x11c6, 64, { 0x8a, 0x13, 0x89, 0x14, 0xea, 0x49, 0x60, 0x11, 0xae, 0x02, 0xee, 0x90, 0x7f, 0xd4, 0xf0, 0xaf, 0x01,
32203 +  0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02,
32204 +  0x13, 0x76, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x17, 0x9a, 0x8b, 0x12, 0x8a, 0x13, 0x89, 0x14,
32205 +  0xea, 0x49, 0x60, 0x11, 0xae, 0x02, 0xee, 0x90, 0x7f, 0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90}},
32206 + {0x1206, 64, { 0x7f, 0xd5, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13, 0x76, 0x90,
32207 +  0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90,
32208 +  0x7f, 0xb5, 0xf0, 0x02, 0x13, 0x76, 0x12, 0x14, 0xc3, 0x02, 0x13, 0x76, 0x90, 0x7f, 0x00, 0x74,
32209 +  0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f}},
32210 + {0x1246, 64, { 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x26, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff,
32211 +  0xa2, 0x2b, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
32212 +  0x02, 0xf0, 0x02, 0x13, 0x76, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
32213 +  0x02, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54}},
32214 + {0x1286, 64, { 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83,
32215 +  0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0,
32216 +  0x02, 0x13, 0x76, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xe8,
32217 +  0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xea}},
32218 + {0x12c6, 64, { 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x26, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02,
32219 +  0x13, 0x76, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff,
32220 +  0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34,
32221 +  0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13}},
32222 + {0x1306, 64, { 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f,
32223 +  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60,
32224 +  0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x26, 0x80, 0x3f,
32225 +  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20}},
32226 + {0x1346, 64, { 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25,
32227 +  0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90,
32228 +  0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90,
32229 +  0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0x20, 0x28, 0x03, 0x02, 0x14, 0xc2, 0xe5, 0x40}},
32230 + {0x1386, 64, { 0x60, 0x02, 0x15, 0x40, 0xe5, 0x48, 0x60, 0x4f, 0x65, 0x44, 0x70, 0x45, 0xe5, 0x42, 0xf4, 0x60, 0x02,
32231 +  0x05, 0x42, 0xe5, 0x42, 0xc3, 0x95, 0x55, 0x40, 0x3d, 0xc2, 0xaf, 0x30, 0x01, 0x18, 0x90, 0x7f,
32232 +  0xb8, 0xe0, 0x20, 0xe1, 0x27, 0x90, 0x7f, 0xb7, 0xe5, 0x48, 0xf0, 0xc2, 0x01, 0xe4, 0xf5, 0x48,
32233 +  0xf5, 0x42, 0xf5, 0x44, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1, 0x0f, 0x90, 0x7f}},
32234 + {0x13c6, 64, { 0xb9, 0xe5, 0x48, 0xf0, 0xd2, 0x01, 0xe4, 0xf5, 0x48, 0xf5, 0x42, 0xf5, 0x44, 0xd2, 0xaf, 0x80, 0x06,
32235 +  0x85, 0x48, 0x44, 0xe4, 0xf5, 0x42, 0xe5, 0x2e, 0x60, 0x2d, 0x20, 0x19, 0x07, 0x90, 0x7f, 0x9b,
32236 +  0xe0, 0x30, 0xe0, 0x0e, 0xe5, 0x2f, 0x60, 0x05, 0xe4, 0xf5, 0x2f, 0xd2, 0x0c, 0xe4, 0xf5, 0x3e,
32237 +  0x80, 0x13, 0xe5, 0x3e, 0xd3, 0x95, 0x56, 0x50, 0x0c, 0xe5, 0x3e, 0xb5, 0x56, 0x05, 0x75}},
32238 + {0x1406, 64, { 0x2f, 0x01, 0xd2, 0x0c, 0x05, 0x3e, 0xc2, 0x19, 0xe5, 0x41, 0x60, 0x02, 0x15, 0x41, 0xe5, 0x49, 0x60,
32239 +  0x4f, 0x65, 0x45, 0x70, 0x45, 0xe5, 0x43, 0xf4, 0x60, 0x02, 0x05, 0x43, 0xe5, 0x43, 0xc3, 0x95,
32240 +  0x6d, 0x40, 0x3d, 0xc2, 0xaf, 0x30, 0x02, 0x18, 0x90, 0x7f, 0xbc, 0xe0, 0x20, 0xe1, 0x27, 0x90,
32241 +  0x7f, 0xbb, 0xe5, 0x49, 0xf0, 0xc2, 0x02, 0xe4, 0xf5, 0x49, 0xf5, 0x43, 0xf5, 0x45, 0x80}},
32242 + {0x1446, 64, { 0x16, 0x90, 0x7f, 0xba, 0xe0, 0x20, 0xe1, 0x0f, 0x90, 0x7f, 0xbd, 0xe5, 0x49, 0xf0, 0xd2, 0x02, 0xe4,
32243 +  0xf5, 0x49, 0xf5, 0x43, 0xf5, 0x45, 0xd2, 0xaf, 0x80, 0x06, 0x85, 0x49, 0x45, 0xe4, 0xf5, 0x43,
32244 +  0xe5, 0x3a, 0x60, 0x2d, 0x20, 0x1a, 0x07, 0x90, 0x7f, 0x9a, 0xe0, 0x30, 0xe2, 0x0e, 0xe5, 0x3b,
32245 +  0x60, 0x05, 0xe4, 0xf5, 0x3b, 0xd2, 0x0e, 0xe4, 0xf5, 0x3f, 0x80, 0x13, 0xe5, 0x3f, 0xd3}},
32246 + {0x1486, 64, { 0x95, 0x6e, 0x50, 0x0c, 0xe5, 0x3f, 0xb5, 0x6e, 0x05, 0x75, 0x3b, 0x01, 0xd2, 0x0e, 0x05, 0x3f, 0xc2,
32247 +  0x1a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5,
32248 +  0x1c, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x1d, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7,
32249 +  0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x22, 0xe4, 0x90, 0x7f}},
32250 + {0x14c6, 64, { 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x10, 0xf0, 0x90, 0x7f,
32251 +  0x94, 0x74, 0x0d, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0x9a, 0xf0, 0x90, 0x7f, 0x97, 0xe0, 0x54, 0xfd,
32252 +  0xf0, 0x90, 0x7f, 0x95, 0x74, 0x23, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x84, 0xf0, 0xe4, 0x90, 0x7f,
32253 +  0xc7, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x90, 0x7f, 0xcf, 0xf0, 0x75, 0x98, 0x40, 0x43, 0xa8}},
32254 + {0x1506, 64, { 0x10, 0xc2, 0x1b, 0xc2, 0x05, 0xc2, 0x21, 0xc2, 0x0b, 0xc2, 0x13, 0xf5, 0x7c, 0xf5, 0x4a, 0xc2, 0x11,
32255 +  0xc2, 0x15, 0xf5, 0x42, 0xc2, 0x19, 0xf5, 0x44, 0xf5, 0x48, 0xc2, 0x23, 0xc2, 0x1c, 0xf5, 0x2d,
32256 +  0xf5, 0x2f, 0xc2, 0x07, 0xc2, 0x00, 0xc2, 0x1f, 0xf5, 0x3e, 0xc2, 0x09, 0xd2, 0x0c, 0xf5, 0x26,
32257 +  0x90, 0x7f, 0xcb, 0xf0, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xd1, 0xf0, 0x75, 0xc0, 0x40}},
32258 + {0x1546, 64, { 0x43, 0xa8, 0x40, 0xc2, 0x1d, 0xc2, 0x06, 0xc2, 0x22, 0xc2, 0x0d, 0xc2, 0x14, 0xf5, 0x7d, 0xf5, 0x4b,
32259 +  0xc2, 0x12, 0xc2, 0x16, 0xf5, 0x43, 0xc2, 0x1a, 0xf5, 0x45, 0xf5, 0x49, 0xc2, 0x24, 0xc2, 0x1e,
32260 +  0xf5, 0x39, 0xf5, 0x3b, 0xc2, 0x08, 0xc2, 0x00, 0xc2, 0x20, 0xf5, 0x3f, 0xc2, 0x0a, 0xd2, 0x0e,
32261    0x75, 0x32, 0x01, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xd2, 0x28}},
32262   {0x1586, 64, { 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02,
32263    0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5,
32264 @@ -384,7 +389,7 @@
32265    0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8,
32266    0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46,
32267    0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x18}},
32268 - {0x1686, 64, { 0xcc, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe,
32269 + {0x1686, 64, { 0xc5, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe,
32270    0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4,
32271    0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5,
32272    0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde}},
32273 @@ -393,9 +398,9 @@
32274    0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90,
32275    0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44}},
32276   {0x1706, 64, { 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0xbc, 0xd2, 0xbe, 0xd2, 0x2d,
32277 -  0x12, 0x18, 0x86, 0xc2, 0x27, 0xc2, 0x25, 0xc2, 0x28, 0x30, 0x28, 0x03, 0x12, 0x0a, 0x83, 0x90,
32278 -  0x7f, 0xd8, 0xe0, 0x65, 0x10, 0x60, 0x08, 0xe0, 0xf5, 0x10, 0x12, 0x13, 0x76, 0x80, 0xea, 0x30,
32279 -  0x27, 0x07, 0xc2, 0x27, 0x12, 0x11, 0x73, 0x80, 0xe0, 0x30, 0x2c, 0xdd, 0xc2, 0x2c, 0x12}},
32280 +  0x12, 0x18, 0x7f, 0xc2, 0x27, 0xc2, 0x25, 0xc2, 0x28, 0x30, 0x28, 0x03, 0x12, 0x0a, 0x83, 0x90,
32281 +  0x7f, 0xd8, 0xe0, 0x65, 0x10, 0x60, 0x08, 0xe0, 0xf5, 0x10, 0x12, 0x13, 0x7e, 0x80, 0xea, 0x30,
32282 +  0x27, 0x07, 0xc2, 0x27, 0x12, 0x11, 0x7b, 0x80, 0xe0, 0x30, 0x2c, 0xdd, 0xc2, 0x2c, 0x12}},
32283   {0x1746, 64, { 0x00, 0x26, 0x80, 0xd6, 0x22, 0xe4, 0xfe, 0x75, 0x17, 0xff, 0x75, 0x18, 0x19, 0x75, 0x19, 0x12, 0xab,
32284    0x17, 0xaa, 0x18, 0xa9, 0x19, 0x90, 0x00, 0x01, 0x12, 0x15, 0xa0, 0x64, 0x02, 0x70, 0x2d, 0xad,
32285    0x06, 0x0e, 0xed, 0xb5, 0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0x15, 0xdf, 0x85, 0xf0, 0x15,
32286 @@ -405,33 +410,33 @@
32287    0x86, 0xab, 0x17, 0xaa, 0x18, 0xa9, 0x19, 0x90, 0x00, 0x01, 0x12, 0x15, 0xa0, 0xb4, 0x03, 0x1d,
32288    0xaf, 0x16, 0x05, 0x16, 0xef, 0xb5, 0x15, 0x01, 0x22, 0x12, 0x15, 0x87, 0x7e, 0x00, 0x29}},
32289   {0x17c6, 64, { 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x17, 0xff, 0xf5, 0x18, 0x89, 0x19, 0x80, 0xd4, 0x7b, 0x00, 0x7a,
32290 -  0x00, 0x79, 0x00, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86,
32291 -  0x75, 0x86, 0x00, 0x30, 0x2a, 0x04, 0xc2, 0x2a, 0x80, 0x02, 0xd2, 0x2c, 0x53, 0x91, 0xef, 0x90,
32292 -  0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83}},
32293 - {0x1806, 64, { 0xd0, 0xe0, 0x32, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0xf0, 0x90, 0x7f, 0x94, 0xf0, 0x90,
32294 -  0x7f, 0x9d, 0x74, 0x02, 0xf0, 0x90, 0x7f, 0x97, 0xf0, 0xe4, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f,
32295 -  0x9e, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x90, 0x7f, 0x9d, 0xf0, 0x22, 0xc0, 0xe0,
32296 -  0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f}},
32297 - {0x1846, 64, { 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0,
32298 -  0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85,
32299 -  0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x27, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74,
32300 -  0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32}},
32301 - {0x1886, 64, { 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x2d, 0x04, 0xe0, 0x44, 0x02,
32302 -  0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x00, 0x06, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0,
32303 -  0x44, 0x04, 0xf0, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82,
32304 -  0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01}},
32305 - {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xc1, 0xaa, 0x01, 0x1a, 0x00, 0x03, 0x1b, 0x03, 0x00, 0x00, 0xc1,
32306 -  0x27, 0xc1, 0x2c, 0xc1, 0x26, 0xc1, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32307 +  0x00, 0x79, 0x00, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0xf0, 0x90, 0x7f, 0x94,
32308 +  0xf0, 0x90, 0x7f, 0x9d, 0x74, 0x02, 0xf0, 0x90, 0x7f, 0x97, 0xf0, 0xe4, 0x90, 0x7f, 0x95, 0xf0,
32309 +  0x90, 0x7f, 0x9e, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x90, 0x7f, 0x9d, 0xf0}},
32310 + {0x1806, 64, { 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90,
32311 +  0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0,
32312 +  0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82,
32313 +  0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x27, 0x53, 0x91, 0xef, 0x90}},
32314 + {0x1846, 64, { 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0,
32315 +  0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00,
32316 +  0xd2, 0x2c, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0,
32317 +  0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0}},
32318 + {0x1886, 64, { 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x2d, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x00,
32319 +  0x06, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0, 0x22, 0x74, 0x00, 0xf5,
32320 +  0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f,
32321 +  0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xc1}},
32322 + {0x18c6, 64, { 0xaa, 0x01, 0x1a, 0x00, 0x03, 0x1b, 0x03, 0x00, 0x00, 0xc1, 0x27, 0xc1, 0x2c, 0xc1, 0x26, 0xc1, 0x2b,
32323 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32324    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32325 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
32326 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
32327   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x0f, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x01, 0x09, 0x02, 0x74, 0x00, 0x01,
32328    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
32329    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
32330    0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x05, 0x02, 0x40, 0x00}},
32331   {0x1946, 64, { 0x00, 0x07, 0x05, 0x06, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05,
32332 -  0x81, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x83, 0x02,
32333 -  0x40, 0x00, 0x00, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
32334 -  0x00, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x00}},
32335 +  0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x83, 0x02,
32336 +  0x40, 0x00, 0x01, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
32337 +  0x01, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x01}},
32338   {0x1986, 64, { 0x04, 0x03, 0x09, 0x04, 0x48, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61,
32339    0x00, 0x6e, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x61, 0x00, 0x20, 0x00, 0x64, 0x00, 0x69, 0x00, 0x76,
32340    0x00, 0x69, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x6f, 0x00, 0x66,
32341 @@ -455,7 +460,7 @@
32342   {0x1ac6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32343    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32344    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32345 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x18, 0x5f, 0x00, 0x02, 0x1b}},
32346 - {0x1b06,  9, { 0x04, 0x00, 0x02, 0x18, 0x35, 0x00, 0x02, 0x17, 0xdb}},
32347 -{ 0xffff,      0,      {0x00} }
32348 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x18, 0x31, 0x00, 0x02, 0x1b}},
32349 + {0x1b06,  9, { 0x04, 0x00, 0x02, 0x18, 0x07, 0x00, 0x02, 0x18, 0x58}},
32350 + {0xffff,  0, {0x00}}
32351  };
32352 diff -Nur linux-2.4.19.old/drivers/usb/serial/keyspan_usa28msg.h linux-2.4.19/drivers/usb/serial/keyspan_usa28msg.h
32353 --- linux-2.4.19.old/drivers/usb/serial/keyspan_usa28msg.h      Wed Oct 10 00:15:02 2001
32354 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa28msg.h  Mon Nov 25 12:27:09 2002
32355 @@ -95,7 +95,7 @@
32356  #define        __USA28MSG__
32357  
32358  
32359 -typedef struct keyspan_usa28_portControlMessage
32360 +struct keyspan_usa28_portControlMessage
32361  {
32362         /*
32363                 there are four types of "commands" sent in the control message:
32364 @@ -146,9 +146,9 @@
32365                 returnStatus,   // return current status n times (1 or 2)
32366                 resetDataToggle;// reset data toggle state to DATA0
32367         
32368 -} keyspan_usa28_portControlMessage;
32369 +};
32370  
32371 -typedef struct keyspan_usa28_portStatusMessage
32372 +struct keyspan_usa28_portStatusMessage
32373  {
32374         u8      port,                   // 0=first, 1=second, 2=global (see below)
32375                 cts,
32376 @@ -164,32 +164,32 @@
32377                 rxBreak,                // 1=we're in break state
32378                 rs232invalid,   // 1=no valid signals on rs-232 inputs
32379                 controlResponse;// 1=a control messages has been processed
32380 -} keyspan_usa28_portStatusMessage;
32381 +};
32382  
32383  // bit defines in txState
32384  #define        TX_OFF                  0x01    // requested by host txOff command
32385  #define        TX_XOFF                 0x02    // either real, or simulated by host
32386  
32387 -typedef struct keyspan_usa28_globalControlMessage
32388 +struct keyspan_usa28_globalControlMessage
32389  {
32390         u8      sendGlobalStatus,       // 2=request for two status responses
32391                 resetStatusToggle,      // 1=reset global status toggle
32392                 resetStatusCount;       // a cycling value
32393 -} keyspan_usa28_globalControlMessage;
32394 +};
32395  
32396 -typedef struct keyspan_usa28_globalStatusMessage
32397 +struct keyspan_usa28_globalStatusMessage
32398  {
32399         u8      port,                           // 3
32400                 sendGlobalStatus,       // from request, decremented
32401                 resetStatusCount;       // as in request
32402 -} keyspan_usa28_globalStatusMessage;
32403 +};
32404  
32405 -typedef struct keyspan_usa28_globalDebugMessage
32406 +struct keyspan_usa28_globalDebugMessage
32407  {
32408         u8      port,                           // 2
32409                 n,                                      // typically a count/status byte
32410                 b;                                      // typically a data byte
32411 -} keyspan_usa28_globalDebugMessage;
32412 +};
32413  
32414  // ie: the maximum length of an EZUSB endpoint buffer
32415  #define        MAX_DATA_LEN                    64
32416 diff -Nur linux-2.4.19.old/drivers/usb/serial/keyspan_usa28x_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa28x_fw.h
32417 --- linux-2.4.19.old/drivers/usb/serial/keyspan_usa28x_fw.h     Wed Oct 10 00:15:02 2001
32418 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa28x_fw.h Mon Nov 25 12:27:09 2002
32419 @@ -1,341 +1,346 @@
32420  /* keyspan_usa28x_fw.h
32421 -  
32422 -   Generated from Keyspan firmware image usa26code.h Sat Oct  6 12:08:55 EST 2001
32423 -   This firmware is for the Keyspan USA-28X Serial Adaptor
32424  
32425 -   "The firmware contained herein as keyspan_usa28x_fw.h is
32426 -   Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
32427 -   ("Keyspan"), as an unpublished work.  This notice does not imply
32428 -   unrestricted or public access to this firmware which is a trade secret of
32429 -   Keyspan, and which may not be reproduced, used, sold or transferred to any
32430 -   third party without Keyspan's prior written consent.  All Rights Reserved.
32431 +       The firmware contained herein as keyspan_usa28x_fw.h is
32432  
32433 -   This firmware may not be modified and may only be used with the Keyspan 
32434 -   USA-28X Serial Adapter.  Distribution and/or Modification of the
32435 -   keyspan.c driver which includes this firmware, in whole or in part,
32436 -   requires the inclusion of this statement."
32437 +               Copyright (C) 1999-2001
32438 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
32439 +               
32440 +       as an unpublished work. This notice does not imply unrestricted or
32441 +       public access to the source code from which this firmware image is
32442 +       derived.  Except as noted below this firmware image may not be 
32443 +       reproduced, used, sold or transferred to any third party without 
32444 +       Keyspan's prior written consent.  All Rights Reserved.
32445 +
32446 +       Permission is hereby granted for the distribution of this firmware 
32447 +       image as part of a Linux or other Open Source operating system kernel 
32448 +       in text or binary form as required. 
32449 +
32450 +       This firmware may not be modified and may only be used with  
32451 +       Keyspan hardware.  Distribution and/or Modification of the 
32452 +       keyspan.c driver which includes this firmware, in whole or in 
32453 +       part, requires the inclusion of this statement."
32454  
32455  */
32456  
32457  static const struct ezusb_hex_record keyspan_usa28x_firmware[] = {
32458 - {0x0033,  3, { 0x02, 0x13, 0xab}},
32459 + {0x0033,  3, { 0x02, 0x12, 0xf7}},
32460   {0x0003, 16, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0}},
32461   {0x0013, 16, { 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90}},
32462   {0x0023, 15, { 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x07, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22}},
32463 - {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x33, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
32464 + {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x1b, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
32465   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x09, 0xc2, 0x00, 0x80, 0x77, 0x30, 0x03, 0x3b, 0x90, 0x7f}},
32466 - {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x33, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
32467 + {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x1b, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
32468   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x09, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60}},
32469 - {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xca}},
32470 + {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xba}},
32471   {0x0096, 16, { 0xc2, 0x03, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
32472 - {0x00a6, 16, { 0x12, 0x13, 0x33, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
32473 + {0x00a6, 16, { 0x12, 0x13, 0x1b, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
32474   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d}},
32475 - {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xca, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
32476 - {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x66, 0x53, 0x36, 0x80, 0x12}},
32477 - {0x00e6, 16, { 0x13, 0x3f, 0xef, 0x42, 0x36, 0x12, 0x11, 0xed, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3a, 0x50, 0x0f}},
32478 - {0x00f6, 16, { 0x12, 0x13, 0x1b, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x61, 0xc2}},
32479 + {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xba, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
32480 + {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x60, 0x12, 0x11, 0xd6, 0x8f}},
32481 + {0x00e6, 16, { 0x19, 0x12, 0x13, 0x27, 0x8f, 0x36, 0xe5, 0x19, 0xc3, 0x95, 0x3a, 0x50, 0x0f, 0x12, 0x12, 0xeb}},
32482 + {0x00f6, 16, { 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x5e, 0xc2, 0x0b, 0xe5, 0x19}},
32483   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
32484   {0x0043,  3, { 0x02, 0x13, 0x00}},
32485 - {0x0000,  3, { 0x02, 0x0e, 0x10}},
32486 - {0x0106, 64, { 0x0b, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x36, 0x80, 0x57, 0x12, 0x13, 0x3f, 0xef, 0x42, 0x36, 0xe5, 0x36,
32487 -  0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08,
32488 -  0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x5b, 0xe5,
32489 -  0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40}},
32490 - {0x0146, 64, { 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08, 0xe4, 0x90, 0x7e, 0x80, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75,
32491 -  0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12, 0x0c, 0xef, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90,
32492 -  0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x05, 0x03, 0x02, 0x03, 0xc5, 0xc2, 0x05, 0xe4, 0xf5,
32493 -  0x18, 0x74, 0x40, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5}},
32494 - {0x0186, 64, { 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
32495 -  0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68,
32496 -  0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xc8, 0x7f, 0x03, 0x7d,
32497 -  0xcd, 0x12, 0x11, 0xc8, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0}},
32498 - {0x01c6, 64, { 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12,
32499 -  0x10, 0x4c, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12, 0x10, 0x72, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0,
32500 -  0xfd, 0x12, 0x11, 0xc8, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xc8, 0x43, 0x46, 0x80, 0x90, 0x7f,
32501 -  0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12}},
32502 - {0x0206, 64, { 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e,
32503 -  0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0,
32504 -  0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0,
32505 -  0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e, 0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43}},
32506 - {0x0246, 64, { 0x42, 0x80, 0x80, 0x03, 0x53, 0x42, 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43,
32507 -  0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x10, 0xbe, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xe4,
32508 -  0xaf, 0x42, 0x12, 0x10, 0x98, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42,
32509 -  0x12, 0x10, 0x98, 0x90, 0x7e, 0x0c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46}},
32510 - {0x0286, 64, { 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46,
32511 -  0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03,
32512 -  0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90,
32513 -  0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3, 0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3}},
32514 - {0x02c6, 64, { 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10, 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
32515 -  0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90,
32516 -  0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98,
32517 -  0x74, 0x11, 0xf0, 0x12, 0x13, 0x0f, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e}},
32518 - {0x0306, 64, { 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xc8, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e,
32519 -  0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xc8, 0x75, 0x29,
32520 -  0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5,
32521 -  0x40, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11}},
32522 - {0x0346, 64, { 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
32523 -  0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xc8,
32524 -  0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff,
32525 -  0xad, 0x3e, 0x12, 0x11, 0xc8, 0xe4, 0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60}},
32526 - {0x0386, 64, { 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
32527 -  0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4,
32528 -  0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e, 0x1f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0,
32529 -  0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35, 0xf0, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30}},
32530 - {0x03c6, 64, { 0x1a, 0x52, 0xe5, 0x38, 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40,
32531 -  0x04, 0x15, 0x13, 0x80, 0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x13, 0x0f,
32532 -  0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13,
32533 -  0x4b, 0xef, 0x54, 0x80, 0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07}},
32534 - {0x0406, 64, { 0x30, 0x0d, 0x11, 0x12, 0x13, 0x4b, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19,
32535 -  0x25, 0xd2, 0x07, 0x20, 0x1b, 0x03, 0x02, 0x07, 0xf4, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x87, 0xef,
32536 -  0xc3, 0x95, 0x3d, 0x40, 0x03, 0x02, 0x04, 0xb2, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a,
32537 -  0xc2, 0x00, 0x80, 0x77, 0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12}},
32538 - {0x0446, 64, { 0x13, 0x87, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f,
32539 -  0xcb, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41,
32540 -  0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x41, 0x12, 0x0d, 0x14, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0,
32541 -  0x80, 0x39, 0x90, 0x7f, 0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x87, 0xef, 0xc3, 0x94}},
32542 - {0x0486, 64, { 0x40, 0x50, 0x29, 0x90, 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19,
32543 -  0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d,
32544 -  0xc1, 0x12, 0x0d, 0x14, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30,
32545 -  0xe1, 0x03, 0x02, 0x05, 0x40, 0x53, 0x37, 0x80, 0x12, 0x13, 0x93, 0xef, 0x42, 0x37, 0x12}},
32546 - {0x04c6, 64, { 0x12, 0x37, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x6f, 0xef, 0x30, 0xe0, 0x08,
32547 -  0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c, 0x61, 0xc2, 0x0c, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x37,
32548 -  0x80, 0x57, 0x12, 0x13, 0x93, 0xef, 0x42, 0x37, 0xe5, 0x37, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3,
32549 -  0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7d, 0x7f, 0x80, 0x75}},
32550 - {0x0506, 64, { 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0x94, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb,
32551 -  0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08,
32552 -  0xe4, 0x90, 0x7d, 0x80, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12,
32553 -  0x0d, 0x39, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90, 0x7f, 0xd0, 0xe0, 0x30, 0xe1}},
32554 - {0x0546, 64, { 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x9f, 0xc2, 0x06, 0xe4, 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5,
32555 -  0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e,
32556 -  0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5,
32557 -  0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x23, 0xe0, 0x60}},
32558 - {0x0586, 64, { 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x12, 0x12, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x12, 0x12, 0x43, 0x47,
32559 -  0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e,
32560 -  0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12, 0x11, 0x30, 0x90, 0x7e, 0x22, 0xe0,
32561 -  0xff, 0x12, 0x11, 0x56, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0, 0xfd, 0x12, 0x12, 0x12, 0x7f}},
32562 - {0x05c6, 64, { 0x03, 0x7d, 0x07, 0x12, 0x12, 0x12, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0,
32563 -  0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0,
32564 -  0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90,
32565 -  0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54}},
32566 - {0x0606, 64, { 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e,
32567 -  0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43, 0x80, 0x80, 0x03, 0x53, 0x43, 0x7f,
32568 -  0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43, 0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12,
32569 -  0x11, 0x7c, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0xa2, 0xaf, 0x43, 0x12, 0x11, 0x0a}},
32570 - {0x0646, 64, { 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf, 0x43, 0x12, 0x11, 0x0a, 0x90, 0x7e, 0x2c,
32571 -  0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02, 0x80, 0x03, 0x53, 0x47, 0xfd, 0x90,
32572 -  0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60,
32573 -  0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03, 0x53, 0x47, 0xfe, 0x90, 0x7f}},
32574 - {0x0686, 64, { 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3,
32575 -  0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x10, 0x80,
32576 -  0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0,
32577 -  0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0}},
32578 - {0x06c6, 64, { 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x63,
32579 -  0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12,
32580 -  0x12, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e, 0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f,
32581 -  0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x12, 0x75, 0x32, 0x01, 0xd2, 0x08, 0x90, 0x7e}},
32582 - {0x0706, 64, { 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00,
32583 -  0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43, 0x45, 0x40, 0x90, 0x7f, 0x98, 0x74,
32584 -  0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f,
32585 -  0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x12, 0x75, 0x34, 0x01, 0xd2, 0x08}},
32586 - {0x0746, 64, { 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x12, 0xe4,
32587 -  0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
32588 -  0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c,
32589 -  0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4, 0xf5, 0x39, 0xd2, 0x08, 0x90}},
32590 - {0x0786, 64, { 0x7e, 0x3f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x13, 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0,
32591 -  0x74, 0x36, 0xf0, 0xe4, 0x90, 0x7f, 0xd1, 0xf0, 0x30, 0x1a, 0x52, 0xe5, 0x39, 0x60, 0x02, 0x15,
32592 -  0x39, 0x30, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x3e, 0x75,
32593 -  0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12, 0x13, 0x63, 0xef, 0x54, 0x01, 0xf5, 0x19}},
32594 - {0x07c6, 64, { 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2, 0x08, 0x12, 0x13, 0x9f, 0xef, 0x54, 0x80, 0xf5, 0x19,
32595 -  0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2, 0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x9f, 0xef,
32596 -  0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05, 0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a,
32597 -  0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5}},
32598 - {0x0806, 64, { 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74,
32599 -  0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1,
32600 -  0x03, 0x02, 0x09, 0x28, 0xe5, 0x0a, 0x70, 0x40, 0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2,
32601 -  0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
32602 - {0x0846, 64, { 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
32603 -  0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38,
32604 -  0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22, 0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08,
32605 -  0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d}},
32606 - {0x0886, 64, { 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82,
32607 -  0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f,
32608 -  0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4, 0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a,
32609 -  0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2, 0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00}},
32610 - {0x08c6, 64, { 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18,
32611 -  0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb,
32612 -  0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a, 0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15,
32613 -  0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
32614 - {0x0906, 64, { 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
32615 -  0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5,
32616 -  0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0e, 0xf4, 0x0a, 0x10, 0x00, 0x0a, 0x84, 0x01, 0x0a,
32617 -  0xf0, 0x03, 0x09, 0x4c, 0x06, 0x0a, 0x03, 0x08, 0x09, 0xfd, 0x09, 0x09, 0xe5, 0x0a, 0x09}},
32618 - {0x0946, 64, { 0xf4, 0x0b, 0x00, 0x00, 0x0b, 0x3f, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61,
32619 -  0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xdb, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90,
32620 -  0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02,
32621 -  0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83}},
32622 - {0x0986, 64, { 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75,
32623 -  0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83,
32624 -  0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b,
32625 -  0x46, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f, 0x1a, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90}},
32626 - {0x09c6, 64, { 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01,
32627 -  0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f,
32628 -  0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea,
32629 -  0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x46, 0x12, 0x0b, 0x4e, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0x00}},
32630 - {0x0a06, 64, { 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60,
32631 -  0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff,
32632 -  0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
32633 -  0x02, 0xf0, 0x02, 0x0b, 0x46, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5}},
32634 - {0x0a46, 64, { 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f,
32635 -  0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83,
32636 -  0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0,
32637 -  0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f}},
32638 - {0x0a86, 64, { 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0,
32639 -  0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02,
32640 -  0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff,
32641 -  0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4}},
32642 - {0x0ac6, 64, { 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54,
32643 -  0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f,
32644 -  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60,
32645 -  0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80}},
32646 - {0x0b06, 64, { 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90,
32647 -  0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25,
32648 -  0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90,
32649 -  0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0}},
32650 - {0x0b46, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74,
32651 -  0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e,
32652 -  0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18, 0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74,
32653 -  0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5, 0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74}},
32654 - {0x0b86, 64, { 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5, 0x18, 0xb4,
32655 -  0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38, 0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b,
32656 -  0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13, 0xd2, 0x03, 0xd2, 0x01, 0x90, 0x7f, 0x98, 0x74,
32657 -  0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd}},
32658 - {0x0bc6, 64, { 0x12, 0x11, 0xc8, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0x98, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x7f,
32659 -  0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
32660 -  0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x11, 0xc8, 0xe4,
32661 -  0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xc8, 0x90, 0x7f, 0x98, 0x74, 0x11}},
32662 - {0x0c06, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11, 0xc8, 0x7f, 0x01, 0x12, 0x12,
32663 -  0x81, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xc8, 0x20, 0x1b, 0x03, 0x02, 0x0c, 0xc7, 0x75, 0x2d,
32664 -  0x01, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4,
32665 -  0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b, 0x01, 0xe4, 0xf5}},
32666 - {0x0c46, 64, { 0x39, 0xf5, 0x13, 0xf5, 0x37, 0xc2, 0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2, 0x00, 0xc2, 0x0a, 0xc2, 0x13,
32667 -  0xd2, 0x04, 0xd2, 0x02, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00,
32668 -  0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x12, 0x12, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x11,
32669 -  0x0a, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x7f, 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90}},
32670 - {0x0c86, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80,
32671 -  0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x12, 0x12, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12,
32672 -  0x12, 0x12, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d,
32673 -  0x7f, 0x12, 0x12, 0x12, 0x7f, 0x01, 0x12, 0x12, 0xa2, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12}},
32674 - {0x0cc6, 64, { 0x12, 0xd2, 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5,
32675 -  0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86,
32676 + {0x0000,  3, { 0x02, 0x0e, 0x00}},
32677 + {0x0106, 64, { 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x36, 0x02, 0xe5, 0x36, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94,
32678 +  0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e,
32679 +  0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x4b, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0,
32680 +  0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08}},
32681 + {0x0146, 64, { 0x90, 0x7e, 0x80, 0xe5, 0x36, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12,
32682 +  0x0c, 0xdf, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06,
32683 +  0x20, 0x05, 0x03, 0x02, 0x03, 0xc1, 0xc2, 0x05, 0xe4, 0xf5, 0x18, 0x74, 0x40, 0x25, 0x18, 0xf5,
32684 +  0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a}},
32685 + {0x0186, 64, { 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5,
32686 +  0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24,
32687 +  0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xb1, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x11, 0xb1, 0x43, 0x46,
32688 +  0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90}},
32689 + {0x01c6, 64, { 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x10, 0x35, 0x90, 0x7e, 0x02, 0xe0,
32690 +  0xff, 0x12, 0x10, 0x5b, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12, 0x11, 0xb1, 0x7f, 0x03,
32691 +  0x7d, 0x07, 0x12, 0x11, 0xb1, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0,
32692 +  0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90}},
32693 + {0x0206, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90,
32694 +  0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f,
32695 +  0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e,
32696 +  0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x42, 0x80, 0x80, 0x03, 0x53, 0x42}},
32697 + {0x0246, 64, { 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12,
32698 +  0x10, 0xa7, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xcd, 0xaf, 0x42, 0x12, 0x10, 0x81, 0x90,
32699 +  0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42, 0x12, 0x10, 0x81, 0x90, 0x7e, 0x0c,
32700 +  0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd}},
32701 + {0x0286, 64, { 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60,
32702 +  0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03, 0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98,
32703 +  0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3,
32704 +  0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10}},
32705 + {0x02c6, 64, { 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0,
32706 +  0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5,
32707 +  0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x12, 0x12, 0xdf,
32708 +  0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e, 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12}},
32709 + {0x0306, 64, { 0x11, 0xb1, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e,
32710 +  0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xb1, 0x75, 0x29, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18,
32711 +  0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x04, 0x90, 0xc0, 0x00,
32712 +  0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11, 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98}},
32713 + {0x0346, 64, { 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f,
32714 +  0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xb1, 0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90,
32715 +  0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xb1, 0xe4,
32716 +  0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12}},
32717 + {0x0386, 64, { 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b,
32718 +  0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4, 0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e,
32719 +  0x1f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0,
32720 +  0x74, 0x35, 0xf0, 0xd2, 0x03, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30, 0x1a, 0x52, 0xe5, 0x38}},
32721 + {0x03c6, 64, { 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80,
32722 +  0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x12, 0xdf, 0xef, 0x54, 0x01, 0xf5,
32723 +  0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13, 0x33, 0xef, 0x54, 0x80,
32724 +  0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07, 0x30, 0x0d, 0x11, 0x12}},
32725 + {0x0406, 64, { 0x13, 0x33, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19, 0x25, 0xd2, 0x07, 0x20,
32726 +  0x1b, 0x03, 0x02, 0x07, 0xec, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x6f, 0xef, 0xc3, 0x95, 0x3d, 0x40,
32727 +  0x03, 0x02, 0x04, 0xae, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a, 0xc2, 0x00, 0x80, 0x77,
32728 +  0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x6f, 0xef, 0xc3}},
32729 + {0x0446, 64, { 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcb, 0xe0, 0x14, 0xf5,
32730 +  0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41, 0x75, 0x0c, 0x7d, 0x75,
32731 +  0x0d, 0x41, 0x12, 0x0d, 0x04, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0x80, 0x39, 0x90, 0x7f,
32732 +  0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x6f, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90}},
32733 + {0x0486, 64, { 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60,
32734 +  0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d, 0xc1, 0x12, 0x0d, 0x04,
32735 +  0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x05,
32736 +  0x36, 0x12, 0x12, 0x20, 0x8f, 0x19, 0x12, 0x13, 0x7b, 0x8f, 0x37, 0xe5, 0x19, 0xc3, 0x95}},
32737 + {0x04c6, 64, { 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x57, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c,
32738 +  0x5e, 0xc2, 0x0c, 0xe5, 0x19, 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x37, 0x02, 0xe5, 0x37, 0x30,
32739 +  0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e,
32740 +  0x7d, 0x7f, 0x80, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0x84, 0xe5}},
32741 + {0x0506, 64, { 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb, 0xf0, 0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75,
32742 +  0x19, 0x3f, 0x85, 0x19, 0x08, 0x90, 0x7d, 0x80, 0xe5, 0x37, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75,
32743 +  0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12, 0x0d, 0x29, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90,
32744 +  0x7f, 0xd0, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x97, 0xc2, 0x06, 0xe4}},
32745 + {0x0546, 64, { 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18,
32746 +  0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
32747 +  0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68,
32748 +  0x90, 0x7e, 0x23, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xfb, 0x7f, 0x03}},
32749 + {0x0586, 64, { 0x7d, 0xcd, 0x12, 0x11, 0xfb, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00,
32750 +  0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12,
32751 +  0x11, 0x19, 0x90, 0x7e, 0x22, 0xe0, 0xff, 0x12, 0x11, 0x3f, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0,
32752 +  0xfd, 0x12, 0x11, 0xfb, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xfb, 0x43, 0x47, 0x80, 0x90}},
32753 + {0x05c6, 64, { 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
32754 +  0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e,
32755 +  0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0,
32756 +  0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90}},
32757 + {0x0606, 64, { 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e, 0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43,
32758 +  0x80, 0x80, 0x03, 0x53, 0x43, 0x7f, 0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43,
32759 +  0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x11, 0x65, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0x8b,
32760 +  0xaf, 0x43, 0x12, 0x10, 0xf3, 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf}},
32761 + {0x0646, 64, { 0x43, 0x12, 0x10, 0xf3, 0x90, 0x7e, 0x2c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02,
32762 +  0x80, 0x03, 0x53, 0x47, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47,
32763 +  0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03,
32764 +  0x53, 0x47, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0}},
32765 + {0x0686, 64, { 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3, 0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0,
32766 +  0x60, 0x05, 0x43, 0x47, 0x10, 0x80, 0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0,
32767 +  0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90,
32768 +  0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f}},
32769 + {0x06c6, 64, { 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x4b, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd,
32770 +  0xe4, 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e,
32771 +  0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb, 0x75, 0x32,
32772 +  0x01, 0xd2, 0x08, 0x90, 0x7e, 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0}},
32773 + {0x0706, 64, { 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43,
32774 +  0x45, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
32775 +  0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f, 0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb,
32776 +  0x75, 0x34, 0x01, 0xd2, 0x08, 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4}},
32777 + {0x0746, 64, { 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb, 0xe4, 0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e,
32778 +  0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
32779 +  0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c, 0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4,
32780 +  0xf5, 0x39, 0xd2, 0x08, 0x90, 0x7e, 0x3f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x13}},
32781 + {0x0786, 64, { 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0, 0x74, 0x36, 0xf0, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xd1, 0xf0,
32782 +  0x30, 0x1a, 0x52, 0xe5, 0x39, 0x60, 0x02, 0x15, 0x39, 0x30, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94,
32783 +  0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12,
32784 +  0x13, 0x4b, 0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2}},
32785 + {0x07c6, 64, { 0x08, 0x12, 0x13, 0x87, 0xef, 0x54, 0x80, 0xf5, 0x19, 0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2,
32786 +  0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x87, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05,
32787 +  0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90,
32788 +  0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5, 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90}},
32789 + {0x0806, 64, { 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f,
32790 +  0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x09, 0x20, 0xe5, 0x0a, 0x70, 0x40,
32791 +  0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2, 0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74,
32792 +  0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25}},
32793 + {0x0846, 64, { 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb,
32794 +  0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38, 0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22,
32795 +  0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08, 0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5,
32796 +  0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12}},
32797 + {0x0886, 64, { 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05,
32798 +  0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4,
32799 +  0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a, 0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2,
32800 +  0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
32801 + {0x08c6, 64, { 0xfa, 0x12, 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
32802 +  0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a,
32803 +  0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15, 0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74,
32804 +  0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25}},
32805 + {0x0906, 64, { 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb,
32806 +  0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0e,
32807 +  0xe4, 0x0a, 0x08, 0x00, 0x0a, 0x7c, 0x01, 0x0a, 0xe8, 0x03, 0x09, 0x44, 0x06, 0x09, 0xfb, 0x08,
32808 +  0x09, 0xf5, 0x09, 0x09, 0xdd, 0x0a, 0x09, 0xec, 0x0b, 0x00, 0x00, 0x0b, 0x37, 0x90, 0x7f}},
32809 + {0x0946, 64, { 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61, 0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xd3, 0x74,
32810 +  0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f,
32811 +  0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19,
32812 +  0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19}},
32813 + {0x0986, 64, { 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f,
32814 +  0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0,
32815 +  0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f,
32816 +  0x0a, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0}},
32817 + {0x09c6, 64, { 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0,
32818 +  0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
32819 +  0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x3e, 0x12, 0x0b,
32820 +  0x46, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02}},
32821 + {0x0a06, 64, { 0x0b, 0x3e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b,
32822 +  0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00,
32823 +  0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0xe4, 0x90, 0x7f,
32824 +  0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f}},
32825 + {0x0a46, 64, { 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24,
32826 +  0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4,
32827 +  0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
32828 +  0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02}},
32829 + {0x0a86, 64, { 0x60, 0x03, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x3e,
32830 +  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38,
32831 +  0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f,
32832 +  0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f}},
32833 + {0x0ac6, 64, { 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f,
32834 +  0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
32835 +  0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea,
32836 +  0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0}},
32837 + {0x0b06, 64, { 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4,
32838 +  0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f,
32839 +  0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07,
32840 +  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22}},
32841 + {0x0b46, 64, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90,
32842 +  0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18,
32843 +  0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5,
32844 +  0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa}},
32845 + {0x0b86, 64, { 0xe4, 0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38,
32846 +  0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b, 0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13,
32847 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f,
32848 +  0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xb1, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0x81, 0x90, 0x7f}},
32849 + {0x0bc6, 64, { 0x98, 0x74, 0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f,
32850 +  0x98, 0x74, 0x14, 0xf0, 0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd,
32851 +  0x12, 0x11, 0xb1, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xb1, 0x90, 0x7f,
32852 +  0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11}},
32853 + {0x0c06, 64, { 0xb1, 0x7f, 0x01, 0x12, 0x12, 0x6a, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xb1, 0x20, 0x1b, 0x03, 0x02,
32854 +  0x0c, 0xb7, 0x75, 0x2d, 0x01, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4,
32855 +  0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b,
32856 +  0x01, 0xe4, 0xf5, 0x39, 0xf5, 0x13, 0xf5, 0x37, 0xc2, 0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2}},
32857 + {0x0c46, 64, { 0x00, 0xc2, 0x0a, 0xc2, 0x13, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00,
32858 +  0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xfb, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x10,
32859 +  0xf3, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x7f, 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90, 0xc0,
32860 +  0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74}},
32861 + {0x0c86, 64, { 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x11, 0xfb, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12,
32862 +  0x11, 0xfb, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d,
32863 +  0x7f, 0x12, 0x11, 0xfb, 0x7f, 0x01, 0x12, 0x12, 0x8b, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xfb,
32864 +  0xd2, 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82}},
32865 + {0x0cc6, 64, { 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86,
32866    0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08,
32867 -  0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00}},
32868 - {0x0d06, 64, { 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98,
32869 -  0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05,
32870 +  0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0,
32871 +  0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f}},
32872 + {0x0d06, 64, { 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05,
32873    0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2,
32874 -  0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5}},
32875 - {0x0d46, 64, { 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86,
32876 -  0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05,
32877 +  0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c,
32878 +  0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05}},
32879 + {0x0d46, 64, { 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05,
32880    0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43,
32881 -  0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0, 0x44}},
32882 - {0x0d86, 64, { 0x02, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0, 0xd2,
32883 -  0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f,
32884 +  0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02,
32885 +  0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0}},
32886 + {0x0d86, 64, { 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f,
32887    0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90,
32888 -  0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf}},
32889 - {0x0dc6, 64, { 0xd2, 0x1a, 0x12, 0x12, 0x5c, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2, 0x12, 0x90,
32890 -  0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12, 0x05, 0xd2,
32891 +  0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2,
32892 +  0x1a, 0x12, 0x12, 0x45, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2, 0x12}},
32893 + {0x0dc6, 64, { 0x90, 0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12, 0x05, 0xd2,
32894    0x1a, 0x12, 0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30, 0x12, 0x05, 0xc2,
32895 -  0x1a, 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x29, 0x80, 0xd6, 0x30}},
32896 - {0x0e06, 64, { 0x18, 0xd3, 0xc2, 0x18, 0x12, 0x12, 0xf6, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75,
32897 -  0x81, 0x47, 0x02, 0x0e, 0x57, 0x02, 0x0d, 0x7f, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40,
32898 +  0x1a, 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x21, 0x80, 0xd6, 0x30, 0x18,
32899 +  0xd3, 0xc2, 0x18, 0x12, 0x13, 0x93, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd}},
32900 + {0x0e06, 64, { 0x75, 0x81, 0x47, 0x02, 0x0e, 0x47, 0x02, 0x0d, 0x6f, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40,
32901    0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07,
32902 -  0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4}},
32903 - {0x0e46, 64, { 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
32904 -  0x90, 0x12, 0xc3, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09,
32905 +  0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56,
32906 +  0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40}},
32907 + {0x0e46, 64, { 0x80, 0x90, 0x12, 0xac, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09,
32908    0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8,
32909 -  0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5}},
32910 - {0x0e86, 64, { 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf,
32911 -  0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02,
32912 +  0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82,
32913 +  0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca}},
32914 + {0x0e86, 64, { 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02,
32915    0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01,
32916 -  0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06}},
32917 - {0x0ec6, 64, { 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82,
32918 -  0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82,
32919 +  0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9,
32920 +  0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5}},
32921 + {0x0ec6, 64, { 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82,
32922    0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0,
32923 -  0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8}},
32924 - {0x0f06, 64, { 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3,
32925 -  0xa3, 0x80, 0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19, 0x75, 0x1c,
32926 -  0x86, 0xab, 0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xb5, 0xb4, 0x03, 0x1d,
32927 -  0xaf, 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0x9c, 0x7e, 0x00, 0x29}},
32928 - {0x0f46, 64, { 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b, 0x00, 0x7a,
32929 -  0x00, 0x79, 0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c,
32930 +  0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74,
32931 +  0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3}},
32932 + {0x0f06, 64, { 0xa3, 0xa3, 0x80, 0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19, 0x75, 0x1c,
32933 +  0x86, 0xab, 0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xa5, 0xb4, 0x03, 0x1d,
32934 +  0xaf, 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0x8c, 0x7e, 0x00, 0x29, 0xff,
32935 +  0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b, 0x00}},
32936 + {0x0f46, 64, { 0x7a, 0x00, 0x79, 0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c,
32937    0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d, 0xe5, 0x0d, 0xac,
32938 -  0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5}},
32939 - {0x0f86, 64, { 0x08, 0x60, 0x0a, 0x12, 0x13, 0x3f, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f, 0x1a, 0x05,
32940 -  0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a,
32941 -  0xf0, 0x12, 0x13, 0x57, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5,
32942 -  0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x93, 0x8f}},
32943 - {0x0fc6, 64, { 0x1a, 0xef, 0x42, 0x37, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84,
32944 -  0xc0, 0x86, 0x75, 0x86, 0x00, 0x30, 0x15, 0x04, 0xc2, 0x15, 0x80, 0x02, 0xd2, 0x18, 0x53, 0x91,
32945 -  0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0,
32946 -  0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0}},
32947 - {0x1006, 64, { 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04,
32948 -  0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0,
32949 -  0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x11, 0x53,
32950 -  0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0}},
32951 - {0x1046, 64, { 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
32952 -  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
32953 -  0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13,
32954 -  0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0}},
32955 - {0x1086, 64, { 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
32956 -  0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98,
32957 -  0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44,
32958 -  0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0}},
32959 - {0x10c6, 64, { 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
32960 -  0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98,
32961 -  0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90,
32962 -  0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90}},
32963 - {0x1106, 64, { 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90,
32964 -  0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0,
32965 -  0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90,
32966 -  0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef}},
32967 - {0x1146, 64, { 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90,
32968 -  0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09,
32969 -  0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f,
32970 -  0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74}},
32971 - {0x1186, 64, { 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
32972 -  0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b,
32973 -  0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00,
32974 -  0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00}},
32975 - {0x11c6, 64, { 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90,
32976 -  0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0,
32977 -  0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x27, 0x8f, 0x1a, 0x12, 0x13, 0x27, 0x8f, 0x1b,
32978 -  0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x27, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b}},
32979 - {0x1206, 64, { 0x60, 0x07, 0x12, 0x13, 0x27, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b,
32980 -  0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90,
32981 -  0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22,
32982 -  0x12, 0x13, 0x7b, 0x8f, 0x1a, 0x12, 0x13, 0x7b, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60}},
32983 - {0x1246, 64, { 0x12, 0x12, 0x13, 0x7b, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x7b, 0x8f, 0x1b,
32984 -  0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0,
32985 -  0x30, 0x1a, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x12, 0xdf, 0x90, 0x7f,
32986 -  0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5}},
32987 - {0x1286, 64, { 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xc8, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee,
32988 -  0xf0, 0xe4, 0xe5, 0x3e, 0x44, 0x80, 0xfd, 0x12, 0x11, 0xc8, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5,
32989 -  0x3f, 0x54, 0x7f, 0xfd, 0x12, 0x12, 0x12, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00,
32990 -  0xee, 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80, 0xfd, 0x12, 0x12, 0x12, 0x22, 0x05, 0x0e, 0x02}},
32991 - {0x12c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x03, 0x14, 0x03, 0x00, 0x00, 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10,
32992 -  0xc1, 0x16, 0x01, 0x0a, 0x00, 0xc1, 0x9b, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19,
32993 -  0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e, 0x60, 0x05, 0x12, 0x0d, 0x5e, 0x80, 0xee, 0x22, 0x12,
32994 -  0x00, 0x03, 0x12, 0x0d, 0x6f, 0x12, 0x0b, 0x4e, 0x22, 0x02, 0x10, 0x25, 0x00, 0x02, 0x13}},
32995 - {0x1306, 64, { 0x04, 0x00, 0x02, 0x0f, 0xfb, 0x00, 0x02, 0x0f, 0xcd, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0,
32996 +  0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08,
32997 +  0x60, 0x0a, 0x12, 0x13, 0x27, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f, 0x1a}},
32998 + {0x0f86, 64, { 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a,
32999 +  0xf0, 0x12, 0x13, 0x3f, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5,
33000 +  0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x7b, 0x8f, 0x1a,
33001 +  0xef, 0x42, 0x37, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0}},
33002 + {0x0fc6, 64, { 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab,
33003 +  0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32,
33004 +  0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2,
33005 +  0x11, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0}},
33006 + {0x1006, 64, { 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0,
33007 +  0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08,
33008 +  0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f,
33009 +  0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10}},
33010 + {0x1046, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90,
33011 +  0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
33012 +  0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13,
33013 +  0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13}},
33014 + {0x1086, 64, { 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef,
33015 +  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22,
33016 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74,
33017 +  0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44}},
33018 + {0x10c6, 64, { 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74,
33019 +  0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
33020 +  0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74,
33021 +  0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90}},
33022 + {0x1106, 64, { 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00,
33023 +  0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f,
33024 +  0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5,
33025 +  0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90}},
33026 + {0x1146, 64, { 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90,
33027 +  0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f,
33028 +  0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0,
33029 +  0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f}},
33030 + {0x1186, 64, { 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
33031 +  0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b,
33032 +  0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
33033 +  0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90}},
33034 + {0x11c6, 64, { 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12,
33035 +  0x13, 0x0f, 0x8f, 0x1a, 0x12, 0x13, 0x0f, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12,
33036 +  0x13, 0x0f, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x0f, 0x8f, 0x1b, 0x80,
33037 +  0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90}},
33038 + {0x1206, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
33039 +  0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x63, 0x8f, 0x1a, 0x12, 0x13,
33040 +  0x63, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x63, 0x8f, 0x1a, 0xe5, 0x1a,
33041 +  0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x63, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90}},
33042 + {0x1246, 64, { 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x1a, 0x04, 0xe0, 0x44, 0x02, 0xf0,
33043 +  0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x12, 0xc8, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44,
33044 +  0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xb1, 0x90,
33045 +  0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3e, 0x44, 0x80}},
33046 + {0x1286, 64, { 0xfd, 0x12, 0x11, 0xb1, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3f, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xfb,
33047 +  0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80,
33048 +  0xfd, 0x12, 0x11, 0xfb, 0x22, 0x05, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x14, 0x03, 0x00,
33049 +  0x00, 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10, 0xc1, 0x16, 0x01, 0x0a, 0x00, 0xc1}},
33050 + {0x12c6, 64, { 0x9b, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e,
33051 +  0x60, 0x05, 0x12, 0x0d, 0x4e, 0x80, 0xee, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0,
33052    0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
33053 -  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
33054 -  0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90}},
33055 - {0x1346, 64, { 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
33056 -  0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
33057 -  0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0,
33058 -  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff}},
33059 - {0x1386, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
33060 -  0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0,
33061 -  0x00, 0xe0, 0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33062 +  0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0f, 0xe7, 0x00, 0x02, 0x13}},
33063 + {0x1306, 64, { 0x04, 0x00, 0x02, 0x0f, 0xbd, 0x00, 0x02, 0x10, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0,
33064 +  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
33065 +  0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
33066 +  0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90}},
33067 + {0x1346, 64, { 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
33068 +  0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
33069 +  0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0,
33070 +  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff}},
33071 + {0x1386, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x12, 0x00, 0x03, 0x12,
33072 +  0x0d, 0x5f, 0x12, 0x0b, 0x46, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33073 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33074    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
33075   {0x13c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33076    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33077 @@ -420,7 +425,7 @@
33078   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33079    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33080    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33081 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
33082 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
33083   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x10, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
33084    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
33085    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
33086 @@ -438,5 +443,5 @@
33087    0x00, 0x42, 0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c,
33088    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
33089   {0x1a06,  4, { 0x72, 0x00, 0x00, 0x00}},
33090 -{ 0xffff,      0,      {0x00} }
33091 + {0xffff,  0,  {0x00}}
33092  };
33093 diff -Nur linux-2.4.19.old/drivers/usb/serial/keyspan_usa28xa_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa28xa_fw.h
33094 --- linux-2.4.19.old/drivers/usb/serial/keyspan_usa28xa_fw.h    Wed Oct 10 00:15:03 2001
33095 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa28xa_fw.h        Mon Nov 25 12:27:09 2002
33096 @@ -1,351 +1,354 @@
33097  /* keyspan_usa28xa_fw.h
33098  
33099 -   Generated from Keyspan firmware image usa44code.h Sat Oct  6 12:08:02 EST 2001
33100 -   This firmware is for the Keyspan USA-28XA Serial Adaptor
33101 +       The firmware contained herein as keyspan_usa28xa.h is
33102  
33103 -   "The firmware contained herein as keyspan_usa28xa_fw.h is
33104 -   Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
33105 -   ("Keyspan"), as an unpublished work.  This notice does not imply
33106 -   unrestricted or public access to this firmware which is a trade secret of
33107 -   Keyspan, and which may not be reproduced, used, sold or transferred to any
33108 -   third party without Keyspan's prior written consent.  All Rights Reserved.
33109 +               Copyright (C) 1999-2001
33110 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
33111 +               
33112 +       as an unpublished work. This notice does not imply unrestricted or
33113 +       public access to the source code from which this firmware image is
33114 +       derived.  Except as noted below this firmware image may not be 
33115 +       reproduced, used, sold or transferred to any third party without 
33116 +       Keyspan's prior written consent.  All Rights Reserved.
33117 +
33118 +       Permission is hereby granted for the distribution of this firmware 
33119 +       image as part of a Linux or other Open Source operating system kernel 
33120 +       in text or binary form as required. 
33121 +
33122 +       This firmware may not be modified and may only be used with  
33123 +       Keyspan hardware.  Distribution and/or Modification of the 
33124 +       keyspan.c driver which includes this firmware, in whole or in 
33125 +       part, requires the inclusion of this statement."
33126  
33127 -   Permission is hereby granted for the distribution of this firmware image
33128 -   as part of a Linux or other Open Source operating system kernel in 
33129 -   text or binary form as required.
33130  
33131 -   This firmware may not be modified and may only be used with the Keyspan 
33132 -   USA-28XA Serial Adapter.  Distribution and/or Modification of the
33133 -   keyspan.c driver which includes this firmware, in whole or in part,
33134 -   requires the inclusion of this statement."
33135  
33136  */
33137  
33138  static const struct ezusb_hex_record keyspan_usa28xa_firmware[] = {
33139 - {0x0033,  3, { 0x02, 0x13, 0xaa}},
33140 + {0x0033,  3, { 0x02, 0x12, 0xf9}},
33141   {0x0003, 16, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0}},
33142   {0x0013, 16, { 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90}},
33143   {0x0023, 15, { 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x07, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22}},
33144 - {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x28, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
33145 + {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x27, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
33146   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x09, 0xc2, 0x00, 0x80, 0x77, 0x30, 0x03, 0x3b, 0x90, 0x7f}},
33147 - {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x28, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
33148 + {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x27, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
33149   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x09, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60}},
33150 - {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xd8}},
33151 + {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xc8}},
33152   {0x0096, 16, { 0xc2, 0x03, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
33153 - {0x00a6, 16, { 0x12, 0x13, 0x28, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
33154 + {0x00a6, 16, { 0x12, 0x13, 0x27, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
33155   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d}},
33156 - {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xd8, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
33157 - {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x66, 0x53, 0x36, 0x80, 0x12}},
33158 - {0x00e6, 16, { 0x13, 0x34, 0xef, 0x42, 0x36, 0x12, 0x11, 0xfb, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3a, 0x50, 0x0f}},
33159 - {0x00f6, 16, { 0x12, 0x13, 0x10, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x61, 0xc2}},
33160 + {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xc8, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
33161 + {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x60, 0x12, 0x11, 0xe4, 0x8f}},
33162 + {0x00e6, 16, { 0x19, 0x12, 0x13, 0x33, 0x8f, 0x36, 0xe5, 0x19, 0xc3, 0x95, 0x3a, 0x50, 0x0f, 0x12, 0x13, 0x0f}},
33163 + {0x00f6, 16, { 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x5e, 0xc2, 0x0b, 0xe5, 0x19}},
33164   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
33165 - {0x0043,  3, { 0x02, 0x14, 0x00}},
33166 - {0x0000,  3, { 0x02, 0x0e, 0x1e}},
33167 - {0x0106, 64, { 0x0b, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x36, 0x80, 0x57, 0x12, 0x13, 0x34, 0xef, 0x42, 0x36, 0xe5, 0x36,
33168 -  0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08,
33169 -  0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x69, 0xe5,
33170 -  0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40}},
33171 - {0x0146, 64, { 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08, 0xe4, 0x90, 0x7e, 0x80, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75,
33172 -  0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12, 0x0c, 0xfd, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90,
33173 -  0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x05, 0x03, 0x02, 0x03, 0xc5, 0xc2, 0x05, 0xe4, 0xf5,
33174 -  0x18, 0x74, 0x40, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5}},
33175 - {0x0186, 64, { 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
33176 -  0x12, 0x0e, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68,
33177 -  0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xd6, 0x7f, 0x03, 0x7d,
33178 -  0xcd, 0x12, 0x11, 0xd6, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0}},
33179 - {0x01c6, 64, { 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12,
33180 -  0x10, 0x5a, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12, 0x10, 0x80, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0,
33181 -  0xfd, 0x12, 0x11, 0xd6, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xd6, 0x43, 0x46, 0x80, 0x90, 0x7f,
33182 -  0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12}},
33183 - {0x0206, 64, { 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e,
33184 -  0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0,
33185 -  0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0,
33186 -  0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e, 0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43}},
33187 - {0x0246, 64, { 0x42, 0x80, 0x80, 0x03, 0x53, 0x42, 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43,
33188 -  0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x10, 0xcc, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xf2,
33189 -  0xaf, 0x42, 0x12, 0x10, 0xa6, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42,
33190 -  0x12, 0x10, 0xa6, 0x90, 0x7e, 0x0c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46}},
33191 - {0x0286, 64, { 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46,
33192 -  0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03,
33193 -  0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90,
33194 -  0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3, 0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3}},
33195 - {0x02c6, 64, { 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10, 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
33196 -  0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90,
33197 -  0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98,
33198 -  0x74, 0x11, 0xf0, 0x12, 0x13, 0x04, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e}},
33199 - {0x0306, 64, { 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xd6, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e,
33200 -  0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xd6, 0x75, 0x29,
33201 -  0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5,
33202 -  0x40, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11}},
33203 - {0x0346, 64, { 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
33204 -  0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xd6,
33205 -  0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff,
33206 -  0xad, 0x3e, 0x12, 0x11, 0xd6, 0xe4, 0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60}},
33207 - {0x0386, 64, { 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
33208 -  0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4,
33209 -  0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e, 0x1f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0,
33210 -  0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35, 0xf0, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30}},
33211 - {0x03c6, 64, { 0x1a, 0x52, 0xe5, 0x38, 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40,
33212 -  0x04, 0x15, 0x13, 0x80, 0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x13, 0x04,
33213 -  0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13,
33214 -  0x40, 0xef, 0x54, 0x80, 0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07}},
33215 - {0x0406, 64, { 0x30, 0x0d, 0x11, 0x12, 0x13, 0x40, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19,
33216 -  0x25, 0xd2, 0x07, 0x20, 0x1b, 0x03, 0x02, 0x07, 0xf4, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x7c, 0xef,
33217 -  0xc3, 0x95, 0x3d, 0x40, 0x03, 0x02, 0x04, 0xb2, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a,
33218 -  0xc2, 0x00, 0x80, 0x77, 0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12}},
33219 - {0x0446, 64, { 0x13, 0x7c, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f,
33220 -  0xcb, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41,
33221 -  0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x41, 0x12, 0x0d, 0x22, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0,
33222 -  0x80, 0x39, 0x90, 0x7f, 0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x7c, 0xef, 0xc3, 0x94}},
33223 - {0x0486, 64, { 0x40, 0x50, 0x29, 0x90, 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19,
33224 -  0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d,
33225 -  0xc1, 0x12, 0x0d, 0x22, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30,
33226 -  0xe1, 0x03, 0x02, 0x05, 0x40, 0x53, 0x37, 0x80, 0x12, 0x13, 0x88, 0xef, 0x42, 0x37, 0x12}},
33227 - {0x04c6, 64, { 0x12, 0x45, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x64, 0xef, 0x30, 0xe0, 0x08,
33228 -  0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c, 0x61, 0xc2, 0x0c, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x37,
33229 -  0x80, 0x57, 0x12, 0x13, 0x88, 0xef, 0x42, 0x37, 0xe5, 0x37, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3,
33230 -  0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7d, 0x7f, 0x80, 0x75}},
33231 - {0x0506, 64, { 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0xa2, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb,
33232 -  0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08,
33233 -  0xe4, 0x90, 0x7d, 0x80, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12,
33234 -  0x0d, 0x47, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90, 0x7f, 0xd0, 0xe0, 0x30, 0xe1}},
33235 - {0x0546, 64, { 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x9f, 0xc2, 0x06, 0xe4, 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5,
33236 -  0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e,
33237 -  0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xf0, 0x05, 0x18, 0xe5,
33238 -  0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x23, 0xe0, 0x60}},
33239 - {0x0586, 64, { 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x12, 0x20, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x12, 0x20, 0x43, 0x47,
33240 -  0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e,
33241 -  0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12, 0x11, 0x3e, 0x90, 0x7e, 0x22, 0xe0,
33242 -  0xff, 0x12, 0x11, 0x64, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0, 0xfd, 0x12, 0x12, 0x20, 0x7f}},
33243 - {0x05c6, 64, { 0x03, 0x7d, 0x07, 0x12, 0x12, 0x20, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0,
33244 -  0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0,
33245 -  0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90,
33246 -  0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54}},
33247 - {0x0606, 64, { 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e,
33248 -  0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43, 0x80, 0x80, 0x03, 0x53, 0x43, 0x7f,
33249 -  0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43, 0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12,
33250 -  0x11, 0x8a, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0xb0, 0xaf, 0x43, 0x12, 0x11, 0x18}},
33251 - {0x0646, 64, { 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf, 0x43, 0x12, 0x11, 0x18, 0x90, 0x7e, 0x2c,
33252 -  0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02, 0x80, 0x03, 0x53, 0x47, 0xfd, 0x90,
33253 -  0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60,
33254 -  0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03, 0x53, 0x47, 0xfe, 0x90, 0x7f}},
33255 - {0x0686, 64, { 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3,
33256 -  0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x10, 0x80,
33257 -  0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0,
33258 -  0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0}},
33259 - {0x06c6, 64, { 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x58,
33260 -  0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12,
33261 -  0x20, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e, 0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f,
33262 -  0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x20, 0x75, 0x32, 0x01, 0xd2, 0x08, 0x90, 0x7e}},
33263 - {0x0706, 64, { 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00,
33264 -  0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43, 0x45, 0x40, 0x90, 0x7f, 0x98, 0x74,
33265 -  0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f,
33266 -  0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x20, 0x75, 0x34, 0x01, 0xd2, 0x08}},
33267 - {0x0746, 64, { 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x20, 0xe4,
33268 -  0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
33269 -  0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c,
33270 -  0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4, 0xf5, 0x39, 0xd2, 0x08, 0x90}},
33271 - {0x0786, 64, { 0x7e, 0x3f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x13, 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0,
33272 -  0x74, 0x36, 0xf0, 0xe4, 0x90, 0x7f, 0xd1, 0xf0, 0x30, 0x1a, 0x52, 0xe5, 0x39, 0x60, 0x02, 0x15,
33273 -  0x39, 0x30, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x3e, 0x75,
33274 -  0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12, 0x13, 0x58, 0xef, 0x54, 0x01, 0xf5, 0x19}},
33275 - {0x07c6, 64, { 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2, 0x08, 0x12, 0x13, 0x94, 0xef, 0x54, 0x80, 0xf5, 0x19,
33276 -  0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2, 0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x94, 0xef,
33277 -  0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05, 0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a,
33278 -  0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5}},
33279 - {0x0806, 64, { 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74,
33280 -  0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1,
33281 -  0x03, 0x02, 0x09, 0x28, 0xe5, 0x0a, 0x70, 0x40, 0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2,
33282 -  0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
33283 - {0x0846, 64, { 0xfa, 0x12, 0x0e, 0xaa, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
33284 -  0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38,
33285 -  0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22, 0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08,
33286 -  0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d}},
33287 - {0x0886, 64, { 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0xaa, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82,
33288 -  0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f,
33289 -  0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4, 0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a,
33290 -  0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2, 0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00}},
33291 - {0x08c6, 64, { 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0xaa, 0xff, 0x74, 0x80, 0x25, 0x18,
33292 -  0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb,
33293 -  0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a, 0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15,
33294 -  0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
33295 - {0x0906, 64, { 0xfa, 0x12, 0x0e, 0xaa, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
33296 -  0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5,
33297 -  0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0f, 0x02, 0x0a, 0x10, 0x00, 0x0a, 0x84, 0x01, 0x0a,
33298 -  0xf0, 0x03, 0x09, 0x4c, 0x06, 0x0a, 0x03, 0x08, 0x09, 0xfd, 0x09, 0x09, 0xe5, 0x0a, 0x09}},
33299 - {0x0946, 64, { 0xf4, 0x0b, 0x00, 0x00, 0x0b, 0x3f, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61,
33300 -  0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xdb, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90,
33301 -  0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02,
33302 -  0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83}},
33303 - {0x0986, 64, { 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75,
33304 -  0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83,
33305 -  0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b,
33306 -  0x46, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f, 0x28, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90}},
33307 - {0x09c6, 64, { 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01,
33308 -  0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f,
33309 -  0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea,
33310 -  0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x46, 0x12, 0x0b, 0x4e, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0x00}},
33311 - {0x0a06, 64, { 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60,
33312 -  0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff,
33313 -  0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
33314 -  0x02, 0xf0, 0x02, 0x0b, 0x46, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5}},
33315 - {0x0a46, 64, { 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f,
33316 -  0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83,
33317 -  0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0,
33318 -  0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f}},
33319 - {0x0a86, 64, { 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0,
33320 -  0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02,
33321 -  0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff,
33322 -  0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4}},
33323 - {0x0ac6, 64, { 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54,
33324 -  0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f,
33325 -  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60,
33326 -  0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80}},
33327 - {0x0b06, 64, { 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90,
33328 -  0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25,
33329 -  0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90,
33330 -  0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0}},
33331 - {0x0b46, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74,
33332 -  0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e,
33333 -  0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18, 0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74,
33334 -  0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5, 0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74}},
33335 - {0x0b86, 64, { 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4,
33336 -  0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38, 0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b,
33337 -  0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13, 0xd2, 0x03, 0xd2, 0x01, 0x90, 0x7f, 0x98, 0x74,
33338 -  0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd}},
33339 - {0x0bc6, 64, { 0x12, 0x11, 0xd6, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0xa6, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x7f,
33340 -  0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
33341 -  0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x11, 0xd6, 0xe4,
33342 -  0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xd6, 0x90, 0x7f, 0x98, 0x74, 0x11}},
33343 - {0x0c06, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11, 0xd6, 0x7f, 0x01, 0x12, 0x12,
33344 -  0x8f, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xd6, 0x7f, 0x13, 0x7d, 0x01, 0x12, 0x11, 0xd6, 0x20,
33345 -  0x1b, 0x03, 0x02, 0x0c, 0xd5, 0x75, 0x2d, 0x01, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x2d, 0x25,
33346 -  0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4}},
33347 - {0x0c46, 64, { 0x09, 0xea, 0x75, 0x3b, 0x01, 0xe4, 0xf5, 0x39, 0xf5, 0x13, 0xf5, 0x37, 0xc2, 0x08, 0xc2, 0x0c, 0xc2,
33348 -  0x06, 0xc2, 0x00, 0xc2, 0x0a, 0xc2, 0x13, 0xd2, 0x04, 0xd2, 0x02, 0x90, 0x7f, 0x98, 0x74, 0x0b,
33349 + {0x0043,  3, { 0x02, 0x13, 0x00}},
33350 + {0x0000,  3, { 0x02, 0x0e, 0x0e}},
33351 + {0x0106, 64, { 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x36, 0x02, 0xe5, 0x36, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94,
33352 +  0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e,
33353 +  0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x59, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0,
33354 +  0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08}},
33355 + {0x0146, 64, { 0x90, 0x7e, 0x80, 0xe5, 0x36, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12,
33356 +  0x0c, 0xed, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06,
33357 +  0x20, 0x05, 0x03, 0x02, 0x03, 0xc1, 0xc2, 0x05, 0xe4, 0xf5, 0x18, 0x74, 0x40, 0x25, 0x18, 0xf5,
33358 +  0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a}},
33359 + {0x0186, 64, { 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xe0, 0x05, 0x18, 0xe5,
33360 +  0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24,
33361 +  0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xbf, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x11, 0xbf, 0x43, 0x46,
33362 +  0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90}},
33363 + {0x01c6, 64, { 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x10, 0x43, 0x90, 0x7e, 0x02, 0xe0,
33364 +  0xff, 0x12, 0x10, 0x69, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12, 0x11, 0xbf, 0x7f, 0x03,
33365 +  0x7d, 0x07, 0x12, 0x11, 0xbf, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0,
33366 +  0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90}},
33367 + {0x0206, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90,
33368 +  0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f,
33369 +  0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e,
33370 +  0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x42, 0x80, 0x80, 0x03, 0x53, 0x42}},
33371 + {0x0246, 64, { 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12,
33372 +  0x10, 0xb5, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xdb, 0xaf, 0x42, 0x12, 0x10, 0x8f, 0x90,
33373 +  0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42, 0x12, 0x10, 0x8f, 0x90, 0x7e, 0x0c,
33374 +  0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd}},
33375 + {0x0286, 64, { 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60,
33376 +  0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03, 0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98,
33377 +  0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3,
33378 +  0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10}},
33379 + {0x02c6, 64, { 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0,
33380 +  0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5,
33381 +  0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x12, 0x12, 0xed,
33382 +  0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e, 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12}},
33383 + {0x0306, 64, { 0x11, 0xbf, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e,
33384 +  0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xbf, 0x75, 0x29, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18,
33385 +  0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x04, 0x90, 0xc0, 0x00,
33386 +  0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11, 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98}},
33387 + {0x0346, 64, { 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f,
33388 +  0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xbf, 0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90,
33389 +  0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xbf, 0xe4,
33390 +  0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12}},
33391 + {0x0386, 64, { 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b,
33392 +  0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4, 0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e,
33393 +  0x1f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0,
33394 +  0x74, 0x35, 0xf0, 0xd2, 0x03, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30, 0x1a, 0x52, 0xe5, 0x38}},
33395 + {0x03c6, 64, { 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80,
33396 +  0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x12, 0xed, 0xef, 0x54, 0x01, 0xf5,
33397 +  0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13, 0x3f, 0xef, 0x54, 0x80,
33398 +  0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07, 0x30, 0x0d, 0x11, 0x12}},
33399 + {0x0406, 64, { 0x13, 0x3f, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19, 0x25, 0xd2, 0x07, 0x20,
33400 +  0x1b, 0x03, 0x02, 0x07, 0xec, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x7b, 0xef, 0xc3, 0x95, 0x3d, 0x40,
33401 +  0x03, 0x02, 0x04, 0xae, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a, 0xc2, 0x00, 0x80, 0x77,
33402 +  0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x7b, 0xef, 0xc3}},
33403 + {0x0446, 64, { 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcb, 0xe0, 0x14, 0xf5,
33404 +  0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41, 0x75, 0x0c, 0x7d, 0x75,
33405 +  0x0d, 0x41, 0x12, 0x0d, 0x12, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0x80, 0x39, 0x90, 0x7f,
33406 +  0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x7b, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90}},
33407 + {0x0486, 64, { 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60,
33408 +  0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d, 0xc1, 0x12, 0x0d, 0x12,
33409 +  0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x05,
33410 +  0x36, 0x12, 0x12, 0x2e, 0x8f, 0x19, 0x12, 0x13, 0x87, 0x8f, 0x37, 0xe5, 0x19, 0xc3, 0x95}},
33411 + {0x04c6, 64, { 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x63, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c,
33412 +  0x5e, 0xc2, 0x0c, 0xe5, 0x19, 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x37, 0x02, 0xe5, 0x37, 0x30,
33413 +  0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e,
33414 +  0x7d, 0x7f, 0x80, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0x92, 0xe5}},
33415 + {0x0506, 64, { 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb, 0xf0, 0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75,
33416 +  0x19, 0x3f, 0x85, 0x19, 0x08, 0x90, 0x7d, 0x80, 0xe5, 0x37, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75,
33417 +  0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12, 0x0d, 0x37, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90,
33418 +  0x7f, 0xd0, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x97, 0xc2, 0x06, 0xe4}},
33419 + {0x0546, 64, { 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18,
33420 +  0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
33421 +  0x12, 0x0e, 0xe0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68,
33422 +  0x90, 0x7e, 0x23, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x12, 0x09, 0x7f, 0x03}},
33423 + {0x0586, 64, { 0x7d, 0xcd, 0x12, 0x12, 0x09, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00,
33424 +  0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12,
33425 +  0x11, 0x27, 0x90, 0x7e, 0x22, 0xe0, 0xff, 0x12, 0x11, 0x4d, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0,
33426 +  0xfd, 0x12, 0x12, 0x09, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12, 0x09, 0x43, 0x47, 0x80, 0x90}},
33427 + {0x05c6, 64, { 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
33428 +  0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e,
33429 +  0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0,
33430 +  0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90}},
33431 + {0x0606, 64, { 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e, 0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43,
33432 +  0x80, 0x80, 0x03, 0x53, 0x43, 0x7f, 0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43,
33433 +  0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x11, 0x73, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0x99,
33434 +  0xaf, 0x43, 0x12, 0x11, 0x01, 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf}},
33435 + {0x0646, 64, { 0x43, 0x12, 0x11, 0x01, 0x90, 0x7e, 0x2c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02,
33436 +  0x80, 0x03, 0x53, 0x47, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47,
33437 +  0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03,
33438 +  0x53, 0x47, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0}},
33439 + {0x0686, 64, { 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3, 0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0,
33440 +  0x60, 0x05, 0x43, 0x47, 0x10, 0x80, 0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0,
33441 +  0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90,
33442 +  0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f}},
33443 + {0x06c6, 64, { 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x57, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd,
33444 +  0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x09, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e,
33445 +  0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x09, 0x75, 0x32,
33446 +  0x01, 0xd2, 0x08, 0x90, 0x7e, 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0}},
33447 + {0x0706, 64, { 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43,
33448 +  0x45, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
33449 +  0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f, 0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x09,
33450 +  0x75, 0x34, 0x01, 0xd2, 0x08, 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4}},
33451 + {0x0746, 64, { 0xff, 0xad, 0x3f, 0x12, 0x12, 0x09, 0xe4, 0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e,
33452 +  0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
33453 +  0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c, 0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4,
33454 +  0xf5, 0x39, 0xd2, 0x08, 0x90, 0x7e, 0x3f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x13}},
33455 + {0x0786, 64, { 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0, 0x74, 0x36, 0xf0, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xd1, 0xf0,
33456 +  0x30, 0x1a, 0x52, 0xe5, 0x39, 0x60, 0x02, 0x15, 0x39, 0x30, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94,
33457 +  0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12,
33458 +  0x13, 0x57, 0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2}},
33459 + {0x07c6, 64, { 0x08, 0x12, 0x13, 0x93, 0xef, 0x54, 0x80, 0xf5, 0x19, 0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2,
33460 +  0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x93, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05,
33461 +  0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90,
33462 +  0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5, 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90}},
33463 + {0x0806, 64, { 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f,
33464 +  0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x09, 0x20, 0xe5, 0x0a, 0x70, 0x40,
33465 +  0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2, 0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74,
33466 +  0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9a, 0xff, 0x74, 0x80, 0x25}},
33467 + {0x0846, 64, { 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb,
33468 +  0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38, 0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22,
33469 +  0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08, 0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5,
33470 +  0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12}},
33471 + {0x0886, 64, { 0x0e, 0x9a, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05,
33472 +  0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4,
33473 +  0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a, 0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2,
33474 +  0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
33475 + {0x08c6, 64, { 0xfa, 0x12, 0x0e, 0x9a, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
33476 +  0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a,
33477 +  0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15, 0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74,
33478 +  0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9a, 0xff, 0x74, 0x80, 0x25}},
33479 + {0x0906, 64, { 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb,
33480 +  0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0e,
33481 +  0xf2, 0x0a, 0x08, 0x00, 0x0a, 0x7c, 0x01, 0x0a, 0xe8, 0x03, 0x09, 0x44, 0x06, 0x09, 0xfb, 0x08,
33482 +  0x09, 0xf5, 0x09, 0x09, 0xdd, 0x0a, 0x09, 0xec, 0x0b, 0x00, 0x00, 0x0b, 0x37, 0x90, 0x7f}},
33483 + {0x0946, 64, { 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61, 0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xd3, 0x74,
33484 +  0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f,
33485 +  0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19,
33486 +  0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19}},
33487 + {0x0986, 64, { 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f,
33488 +  0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0,
33489 +  0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f,
33490 +  0x18, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0}},
33491 + {0x09c6, 64, { 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0,
33492 +  0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
33493 +  0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x3e, 0x12, 0x0b,
33494 +  0x46, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02}},
33495 + {0x0a06, 64, { 0x0b, 0x3e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b,
33496 +  0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00,
33497 +  0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0xe4, 0x90, 0x7f,
33498 +  0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f}},
33499 + {0x0a46, 64, { 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24,
33500 +  0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4,
33501 +  0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
33502 +  0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02}},
33503 + {0x0a86, 64, { 0x60, 0x03, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x3e,
33504 +  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38,
33505 +  0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f,
33506 +  0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f}},
33507 + {0x0ac6, 64, { 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f,
33508 +  0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
33509 +  0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea,
33510 +  0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0}},
33511 + {0x0b06, 64, { 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4,
33512 +  0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f,
33513 +  0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07,
33514 +  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22}},
33515 + {0x0b46, 64, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90,
33516 +  0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18,
33517 +  0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5,
33518 +  0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa}},
33519 + {0x0b86, 64, { 0xe4, 0x12, 0x0e, 0xe0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38,
33520 +  0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b, 0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13,
33521 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f,
33522 +  0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xbf, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0x8f, 0x90, 0x7f}},
33523 + {0x0bc6, 64, { 0x98, 0x74, 0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f,
33524 +  0x98, 0x74, 0x14, 0xf0, 0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd,
33525 +  0x12, 0x11, 0xbf, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xbf, 0x90, 0x7f,
33526 +  0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11}},
33527 + {0x0c06, 64, { 0xbf, 0x7f, 0x01, 0x12, 0x12, 0x78, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xbf, 0x7f, 0x13, 0x7d, 0x01,
33528 +  0x12, 0x11, 0xbf, 0x20, 0x1b, 0x03, 0x02, 0x0c, 0xc5, 0x75, 0x2d, 0x01, 0x75, 0x18, 0x01, 0x7b,
33529 +  0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xe0, 0x05, 0x18,
33530 +  0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b, 0x01, 0xe4, 0xf5, 0x39, 0xf5, 0x13, 0xf5, 0x37}},
33531 + {0x0c46, 64, { 0xc2, 0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2, 0x00, 0xc2, 0x0a, 0xc2, 0x13, 0x90, 0x7f, 0x98, 0x74, 0x0b,
33532    0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x12,
33533 -  0x20, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x11, 0x18, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x7f}},
33534 - {0x0c86, 64, { 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x75,
33535 -  0x47, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x12, 0x20, 0xe4, 0xff,
33536 -  0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12, 0x12, 0x20, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90,
33537 -  0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x12, 0x20, 0x7f, 0x01, 0x12, 0x12}},
33538 - {0x0cc6, 64, { 0xb0, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12, 0x20, 0x7f, 0x13, 0x7d, 0x01, 0x12, 0x12, 0x20, 0xd2, 0x12,
33539 -  0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5,
33540 +  0x09, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x11, 0x01, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x7f, 0x01,
33541 +  0x8f, 0x41, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0}},
33542 + {0x0c86, 64, { 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x12, 0x09, 0xe4, 0xff,
33543 +  0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12, 0x12, 0x09, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90,
33544 +  0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x12, 0x09, 0x7f, 0x01, 0x12, 0x12, 0x99,
33545 +  0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12, 0x09, 0x7f, 0x13, 0x7d, 0x01, 0x12, 0x12, 0x09, 0xd2}},
33546 + {0x0cc6, 64, { 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5,
33547    0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05,
33548 -  0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5}},
33549 - {0x0d06, 64, { 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86,
33550 -  0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08,
33551 +  0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d,
33552 +  0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05}},
33553 + {0x0d06, 64, { 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08,
33554    0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90,
33555 -  0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf}},
33556 - {0x0d46, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83,
33557 -  0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7,
33558 +  0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22,
33559 +  0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5}},
33560 + {0x0d46, 64, { 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7,
33561    0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5,
33562 -  0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87}},
33563 - {0x0d86, 64, { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0, 0x90,
33564 -  0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0, 0xd2, 0xe8, 0x43,
33565 +  0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01,
33566 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0}},
33567 + {0x0d86, 64, { 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0, 0xd2, 0xe8, 0x43,
33568    0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74,
33569 -  0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f}},
33570 - {0x0dc6, 64, { 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0x1a, 0x12,
33571 -  0x12, 0x6a, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2, 0x12, 0x90, 0x7f, 0xa1,
33572 +  0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf,
33573 +  0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0x1a}},
33574 + {0x0dc6, 64, { 0x12, 0x12, 0x53, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2, 0x12, 0x90, 0x7f, 0xa1,
33575    0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12, 0x05, 0xd2, 0x1a, 0x12,
33576 -  0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30, 0x12, 0x05, 0xc2, 0x1a}},
33577 - {0x0e06, 64, { 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x29, 0x80, 0xd6, 0x30, 0x18, 0xd3, 0xc2,
33578 -  0x18, 0x12, 0x13, 0xa0, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x47,
33579 -  0x02, 0x0e, 0x65, 0x02, 0x0d, 0x8d, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6,
33580 -  0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24}},
33581 - {0x0e46, 64, { 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01,
33582 -  0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x12,
33583 -  0xd1, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f,
33584 -  0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40}},
33585 - {0x0e86, 64, { 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca,
33586 -  0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde,
33587 +  0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30, 0x12, 0x05, 0xc2, 0x1a, 0x12,
33588 +  0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x21, 0x80, 0xd6, 0x30, 0x18, 0xd3}},
33589 + {0x0e06, 64, { 0xc2, 0x18, 0x12, 0x13, 0x9f, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x47,
33590 +  0x02, 0x0e, 0x55, 0x02, 0x0d, 0x7d, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6,
33591 +  0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c,
33592 +  0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80}},
33593 + {0x0e46, 64, { 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x12,
33594 +  0xba, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f,
33595 +  0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8,
33596 +  0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8}},
33597 + {0x0e86, 64, { 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde,
33598    0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22,
33599 -  0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c}},
33600 - {0x0ec6, 64, { 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25, 0x82,
33601 -  0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 0x29, 0xf5,
33602 +  0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c, 0xe5,
33603 +  0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25}},
33604 + {0x0ec6, 64, { 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 0x29, 0xf5,
33605    0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83,
33606 -  0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82}},
33607 - {0x0f06, 64, { 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93,
33608 -  0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80,
33609 +  0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8,
33610 +  0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01}},
33611 + {0x0f06, 64, { 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80,
33612    0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19, 0x75, 0x1c, 0x86, 0xab,
33613 -  0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xc3, 0xb4, 0x03, 0x1d, 0xaf}},
33614 - {0x0f46, 64, { 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0xaa, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a,
33615 -  0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79,
33616 +  0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xb3, 0xb4, 0x03, 0x1d, 0xaf, 0x19,
33617 +  0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0x9a, 0x7e, 0x00, 0x29, 0xff, 0xee}},
33618 + {0x0f46, 64, { 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79,
33619    0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5,
33620 -  0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c}},
33621 - {0x0f86, 64, { 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a,
33622 -  0x12, 0x13, 0x34, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5,
33623 +  0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70,
33624 +  0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60}},
33625 + {0x0f86, 64, { 0x0a, 0x12, 0x13, 0x33, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5,
33626    0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12,
33627 -  0x13, 0x4c, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82}},
33628 - {0x0fc6, 64, { 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x88, 0x8f, 0x1a, 0xef, 0x42,
33629 -  0x37, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86,
33630 -  0x75, 0x86, 0x00, 0x30, 0x15, 0x04, 0xc2, 0x15, 0x80, 0x02, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90,
33631 -  0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83}},
33632 - {0x1006, 64, { 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86,
33633 -  0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0,
33634 -  0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83,
33635 -  0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x11, 0x53, 0x91}},
33636 - {0x1046, 64, { 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83,
33637 -  0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90,
33638 -  0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
33639 -  0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0}},
33640 - {0x1086, 64, { 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0,
33641 -  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90,
33642 -  0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12,
33643 -  0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54}},
33644 - {0x10c6, 64, { 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
33645 -  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
33646 -  0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13,
33647 -  0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0}},
33648 - {0x1106, 64, { 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
33649 -  0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98,
33650 -  0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45,
33651 -  0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0}},
33652 - {0x1146, 64, { 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
33653 -  0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98,
33654 -  0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90,
33655 -  0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90}},
33656 - {0x1186, 64, { 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90,
33657 -  0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0,
33658 -  0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90,
33659 -  0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xef}},
33660 - {0x11c6, 64, { 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90,
33661 -  0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98,
33662 -  0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0,
33663 -  0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x1c, 0x8f, 0x1a, 0x12, 0x13, 0x1c, 0x8f, 0x1b, 0xe5}},
33664 - {0x1206, 64, { 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x1c, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12,
33665 -  0x13, 0x1c, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5,
33666 -  0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90, 0xc0, 0x00,
33667 -  0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12}},
33668 - {0x1246, 64, { 0x13, 0x70, 0x8f, 0x1a, 0x12, 0x13, 0x70, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13,
33669 -  0x70, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x70, 0x8f, 0x1b, 0x80, 0xe8,
33670 -  0xaf, 0x1a, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x1a,
33671 -  0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x12, 0xed, 0x90, 0x7f, 0xd6}},
33672 - {0x1286, 64, { 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3e, 0x54, 0x7f,
33673 -  0xfd, 0x12, 0x11, 0xd6, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4,
33674 -  0xe5, 0x3e, 0x44, 0x80, 0xfd, 0x12, 0x11, 0xd6, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3f, 0x54,
33675 -  0x7f, 0xfd, 0x12, 0x12, 0x20, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xee}},
33676 - {0x12c6, 64, { 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80, 0xfd, 0x12, 0x12, 0x20, 0x22, 0x05, 0x0e, 0x02, 0x00, 0x00, 0x00,
33677 -  0x00, 0x03, 0x14, 0x03, 0x00, 0x00, 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10, 0xc1, 0x16,
33678 -  0x01, 0x0a, 0x00, 0xc1, 0x9b, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18,
33679 -  0x70, 0x02, 0x15, 0x18, 0x4e, 0x60, 0x05, 0x12, 0x0d, 0x6c, 0x80, 0xee, 0x22, 0x90, 0x7f}},
33680 - {0x1306, 64, { 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90,
33681 -  0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff,
33682 -  0x22, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98,
33683 -  0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0}},
33684 - {0x1346, 64, { 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff,
33685 -  0x22, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98,
33686 -  0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90,
33687 -  0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe0}},
33688 - {0x1386, 64, { 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98,
33689 -  0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x12, 0x00, 0x03, 0x12, 0x0d, 0x7d, 0x12,
33690 -  0x0b, 0x4e, 0x22, 0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33691 +  0x13, 0x4b, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c,
33692 +  0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x87, 0x8f, 0x1a, 0xef}},
33693 + {0x0fc6, 64, { 0x42, 0x37, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86,
33694 +  0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04,
33695 +  0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0,
33696 +  0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x11}},
33697 + {0x1006, 64, { 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82,
33698 +  0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0,
33699 +  0x86, 0x75, 0x86, 0x00, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0,
33700 +  0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98}},
33701 + {0x1046, 64, { 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0,
33702 +  0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00,
33703 +  0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f,
33704 +  0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0}},
33705 + {0x1086, 64, { 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0,
33706 +  0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90,
33707 +  0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f,
33708 +  0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14}},
33709 + {0x10c6, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90,
33710 +  0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
33711 +  0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13,
33712 +  0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b}},
33713 + {0x1106, 64, { 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xef,
33714 +  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22,
33715 +  0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74,
33716 +  0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45}},
33717 + {0x1146, 64, { 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74,
33718 +  0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
33719 +  0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74,
33720 +  0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90}},
33721 + {0x1186, 64, { 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00,
33722 +  0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f,
33723 +  0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5,
33724 +  0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5}},
33725 + {0x11c6, 64, { 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef,
33726 +  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x1b,
33727 +  0x8f, 0x1a, 0x12, 0x13, 0x1b, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x1b,
33728 +  0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x1b, 0x8f, 0x1b, 0x80, 0xe8}},
33729 + {0x1206, 64, { 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
33730 +  0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0d,
33731 +  0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x6f, 0x8f, 0x1a, 0x12, 0x13, 0x6f, 0x8f,
33732 +  0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x6f, 0x8f, 0x1a, 0xe5, 0x1a, 0x65}},
33733 + {0x1246, 64, { 0x1b, 0x60, 0x07, 0x12, 0x13, 0x6f, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0xd6, 0xe0,
33734 +  0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x1a, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4,
33735 +  0x7e, 0x01, 0x12, 0x12, 0xd6, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0,
33736 +  0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xbf, 0x90, 0x7f}},
33737 + {0x1286, 64, { 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3e, 0x44, 0x80, 0xfd, 0x12, 0x11,
33738 +  0xbf, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3f, 0x54, 0x7f, 0xfd, 0x12, 0x12, 0x09, 0x90, 0x7f,
33739 +  0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80, 0xfd, 0x12,
33740 +  0x12, 0x09, 0x22, 0x05, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x14, 0x03, 0x00, 0x00}},
33741 + {0x12c6, 64, { 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10, 0xc1, 0x16, 0x01, 0x0a, 0x00, 0xc1, 0x9b, 0x00, 0x8e,
33742 +  0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e, 0x60, 0x05,
33743 +  0x12, 0x0d, 0x5c, 0x80, 0xee, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe0,
33744 +  0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x02, 0x0f, 0xf5, 0x00, 0x02, 0x13}},
33745 + {0x1306, 64, { 0x04, 0x00, 0x02, 0x0f, 0xcb, 0x00, 0x02, 0x10, 0x1c, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0,
33746 +  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
33747 +  0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
33748 +  0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90}},
33749 + {0x1346, 64, { 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
33750 +  0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
33751 +  0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0,
33752 +  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff}},
33753 + {0x1386, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
33754 +  0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x12, 0x00, 0x03, 0x12, 0x0d, 0x6d, 0x12, 0x0b,
33755 +  0x46, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33756    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
33757   {0x13c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33758    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33759    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33760 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x33, 0x00, 0x02, 0x14}},
33761 - {0x1406, 64, { 0x04, 0x00, 0x02, 0x10, 0x09, 0x00, 0x02, 0x0f, 0xdb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33762 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
33763 + {0x1406, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33764    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33765    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33766    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
33767 @@ -424,13 +427,13 @@
33768   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33769    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33770    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33771 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
33772 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
33773   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x15, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
33774    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
33775    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
33776    0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x05, 0x02, 0x40, 0x00}},
33777   {0x1946, 64, { 0x00, 0x07, 0x05, 0x06, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05,
33778 -  0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x83, 0x02,
33779 +  0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x83, 0x02,
33780    0x40, 0x00, 0x01, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
33781    0x01, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x01}},
33782   {0x1986, 64, { 0x04, 0x03, 0x09, 0x04, 0x48, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61,
33783 @@ -442,5 +445,5 @@
33784    0x00, 0x42, 0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c,
33785    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
33786   {0x1a06,  4, { 0x72, 0x00, 0x00, 0x00}},
33787 - { 0xffff,     0,      {0x00} }
33788 + {0xffff,  0, {0x00}}
33789  };
33790 diff -Nur linux-2.4.19.old/drivers/usb/serial/keyspan_usa28xb_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa28xb_fw.h
33791 --- linux-2.4.19.old/drivers/usb/serial/keyspan_usa28xb_fw.h    Wed Oct 10 00:15:03 2001
33792 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa28xb_fw.h        Mon Nov 25 12:27:09 2002
33793 @@ -1,352 +1,353 @@
33794  /* keyspan_usa28xb_fw.h
33795  
33796 -   Generated from Keyspan firmware image usacode36.h Sat Oct  6 12:07:38 EST 2001
33797 -   This firmware is for the Keyspan USA-28XA Serial Adaptor
33798 +       The firmware contained herein as keyspan_usa29xb_fw.h is
33799  
33800 -   "The firmware contained herein as keyspan_usa28xb_fw.h is
33801 -   Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
33802 -   ("Keyspan"), as an unpublished work.  This notice does not imply
33803 -   unrestricted or public access to the source code from which this 
33804 -   firmware image is derived.  Except as noted below this firmware image
33805 -   may not be reproduced, used, sold or transferred to any third party
33806 -   without Keyspan's prior written consent.  All Rights Reserved.
33807 +               Copyright (C) 1999-2001
33808 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
33809 +               
33810 +       as an unpublished work. This notice does not imply unrestricted or
33811 +       public access to the source code from which this firmware image is
33812 +       derived.  Except as noted below this firmware image may not be 
33813 +       reproduced, used, sold or transferred to any third party without 
33814 +       Keyspan's prior written consent.  All Rights Reserved.
33815  
33816 -   Permission is hereby granted for the distribution of this firmware image
33817 -   as part of a Linux or other Open Source operating system kernel in 
33818 -   text or binary form as required.
33819 +       Permission is hereby granted for the distribution of this firmware 
33820 +       image as part of a Linux or other Open Source operating system kernel 
33821 +       in text or binary form as required. 
33822  
33823 -   This firmware may not be modified and may only be used with the Keyspan 
33824 -   USA-28 Serial Adapter.  Distribution and/or Modification of the
33825 -   keyspan.c driver which includes this firmware, in whole or in part,
33826 -   requires the inclusion of this statement."
33827 +       This firmware may not be modified and may only be used with  
33828 +       Keyspan hardware.  Distribution and/or Modification of the 
33829 +       keyspan.c driver which includes this firmware, in whole or in 
33830 +       part, requires the inclusion of this statement."
33831  
33832  */
33833  
33834  static const struct ezusb_hex_record keyspan_usa28xb_firmware[] = {
33835 - {0x0033,  3, { 0x02, 0x13, 0xb7}},
33836 - {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x35, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
33837 + {0x0033,  3, { 0x02, 0x00, 0x2d}},
33838 + {0x002d,  4, { 0x53, 0xd8, 0xef, 0x32}},
33839 + {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x33, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
33840   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x09, 0xc2, 0x00, 0x80, 0x77, 0x30, 0x03, 0x3b, 0x90, 0x7f}},
33841 - {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x35, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
33842 + {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x33, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
33843   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x09, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60}},
33844 - {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xdc}},
33845 + {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xcc}},
33846   {0x0096, 16, { 0xc2, 0x03, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
33847 - {0x00a6, 16, { 0x12, 0x13, 0x35, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
33848 + {0x00a6, 16, { 0x12, 0x13, 0x33, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
33849   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d}},
33850 - {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xdc, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
33851 - {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x66, 0x53, 0x36, 0x80, 0x12}},
33852 - {0x00e6, 16, { 0x13, 0x41, 0xef, 0x42, 0x36, 0x12, 0x12, 0x08, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3a, 0x50, 0x0f}},
33853 - {0x00f6, 16, { 0x12, 0x13, 0x1d, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x61, 0xc2}},
33854 + {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xcc, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
33855 + {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x60, 0x12, 0x11, 0xf5, 0x8f}},
33856 + {0x00e6, 16, { 0x19, 0x12, 0x13, 0x3f, 0x8f, 0x36, 0xe5, 0x19, 0xc3, 0x95, 0x3a, 0x50, 0x0f, 0x12, 0x13, 0x1b}},
33857 + {0x00f6, 16, { 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x5e, 0xc2, 0x0b, 0xe5, 0x19}},
33858   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
33859 - {0x0043,  3, { 0x02, 0x14, 0x00}},
33860 - {0x0003, 16, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x30}},
33861 - {0x0013, 16, { 0x15, 0x04, 0xc2, 0x15, 0x80, 0x02, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08}},
33862 - {0x0023, 14, { 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32}},
33863 - {0x0000,  3, { 0x02, 0x0e, 0x22}},
33864 - {0x0106, 64, { 0x0b, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x36, 0x80, 0x57, 0x12, 0x13, 0x41, 0xef, 0x42, 0x36, 0xe5, 0x36,
33865 -  0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08,
33866 -  0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x6d, 0xe5,
33867 -  0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40}},
33868 - {0x0146, 64, { 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08, 0xe4, 0x90, 0x7e, 0x80, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75,
33869 -  0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12, 0x0d, 0x01, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90,
33870 -  0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x05, 0x03, 0x02, 0x03, 0xc5, 0xe4, 0xf5, 0x18, 0x74,
33871 -  0x40, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c}},
33872 - {0x0186, 64, { 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e,
33873 -  0xf4, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68, 0x90, 0x7e,
33874 -  0x03, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xe3, 0x7f, 0x03, 0x7d, 0xcd, 0x12,
33875 -  0x11, 0xe3, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5}},
33876 - {0x01c6, 64, { 0x46, 0xf0, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x10, 0x67,
33877 -  0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12, 0x10, 0x8d, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12,
33878 -  0x11, 0xe3, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xe3, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74,
33879 -  0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5}},
33880 - {0x0206, 64, { 0x40, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x13, 0xe0,
33881 -  0x70, 0x08, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12,
33882 -  0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5,
33883 -  0x44, 0xf0, 0x90, 0x7e, 0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x42, 0x80}},
33884 - {0x0246, 64, { 0x80, 0x03, 0x53, 0x42, 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x42, 0x02,
33885 -  0xa3, 0xe0, 0xff, 0x12, 0x10, 0xd9, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xff, 0xaf, 0x42,
33886 -  0x12, 0x10, 0xb3, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42, 0x12, 0x10,
33887 -  0xb3, 0x90, 0x7e, 0x0c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x02, 0x80}},
33888 - {0x0286, 64, { 0x03, 0x53, 0x46, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90,
33889 -  0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03, 0x53, 0x46,
33890 -  0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x12,
33891 -  0xe0, 0xf5, 0x3a, 0xa3, 0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3, 0xe0, 0x60}},
33892 - {0x02c6, 64, { 0x05, 0x43, 0x46, 0x10, 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0,
33893 -  0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90, 0x7f, 0x98,
33894 -  0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11,
33895 -  0xf0, 0x12, 0x13, 0x11, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e, 0xfd, 0xe4}},
33896 - {0x0306, 64, { 0xff, 0xad, 0x3e, 0x12, 0x11, 0xe3, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e, 0x17, 0xe0,
33897 -  0x60, 0x0f, 0x43, 0x3e, 0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xe3, 0x75, 0x29, 0x01, 0xd2,
33898 -  0x07, 0x90, 0x7e, 0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44,
33899 -  0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11, 0x43, 0x44}},
33900 - {0x0346, 64, { 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
33901 -  0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xe3, 0x75, 0x2b,
33902 -  0x01, 0xd2, 0x07, 0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff, 0xad, 0x3e,
33903 -  0x12, 0x11, 0xe3, 0xe4, 0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60, 0x0e, 0x90}},
33904 - {0x0386, 64, { 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0,
33905 -  0x60, 0x02, 0xd2, 0x0b, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4, 0xf5, 0x38,
33906 -  0xd2, 0x07, 0x90, 0x7e, 0x1f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31,
33907 -  0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35, 0xf0, 0xc2, 0x05, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30}},
33908 - {0x03c6, 64, { 0x1a, 0x54, 0xe5, 0x38, 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x4b, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40,
33909 -  0x04, 0x15, 0x13, 0x80, 0x40, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x13, 0x11,
33910 -  0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13,
33911 -  0x4d, 0xef, 0x54, 0x80, 0x64, 0x80, 0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26}},
33912 - {0x0406, 64, { 0xd2, 0x07, 0x30, 0x0d, 0x11, 0x12, 0x13, 0x4d, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05,
33913 -  0x85, 0x19, 0x25, 0xd2, 0x07, 0x20, 0x1b, 0x03, 0x02, 0x07, 0xf8, 0x30, 0x0a, 0x18, 0x12, 0x13,
33914 -  0x89, 0xef, 0xc3, 0x95, 0x3d, 0x40, 0x03, 0x02, 0x04, 0xb4, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0,
33915 -  0xc2, 0x0a, 0xc2, 0x00, 0x80, 0x77, 0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1}},
33916 - {0x0446, 64, { 0x6d, 0x12, 0x13, 0x89, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a,
33917 -  0x90, 0x7f, 0xcb, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d,
33918 -  0x7f, 0x41, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x41, 0x12, 0x0d, 0x26, 0xc2, 0x04, 0xe4, 0x90, 0x7f,
33919 -  0xcb, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x89, 0xef}},
33920 - {0x0486, 64, { 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14,
33921 -  0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c,
33922 -  0x75, 0x0d, 0xc1, 0x12, 0x0d, 0x26, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba,
33923 -  0xe0, 0x30, 0xe1, 0x03, 0x02, 0x05, 0x42, 0x53, 0x37, 0x80, 0x12, 0x13, 0x95, 0xef, 0x42}},
33924 - {0x04c6, 64, { 0x37, 0x12, 0x12, 0x52, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x71, 0xef, 0x30,
33925 -  0xe0, 0x08, 0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c, 0x61, 0xc2, 0x0c, 0xe5, 0x19, 0x70, 0x04,
33926 -  0xf5, 0x37, 0x80, 0x57, 0x12, 0x13, 0x95, 0xef, 0x42, 0x37, 0xe5, 0x37, 0x30, 0xe7, 0x26, 0xe5,
33927 -  0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7d, 0x7f}},
33928 - {0x0506, 64, { 0x80, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0xa6, 0xe5, 0x19, 0x25, 0xe0, 0x90,
33929 -  0x7f, 0xbb, 0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85,
33930 -  0x19, 0x08, 0xe4, 0x90, 0x7d, 0x80, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75, 0x0c, 0x7d, 0x75, 0x0d,
33931 -  0x81, 0x12, 0x0d, 0x4b, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90, 0x7f, 0xd0, 0xe0}},
33932 - {0x0546, 64, { 0x30, 0xe1, 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0xa1, 0xe4, 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5,
33933 -  0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e,
33934 -  0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xf4, 0x05, 0x18, 0xe5,
33935 -  0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x23, 0xe0, 0x60}},
33936 - {0x0586, 64, { 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x12, 0x2d, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x12, 0x2d, 0x43, 0x47,
33937 -  0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e,
33938 -  0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12, 0x11, 0x4b, 0x90, 0x7e, 0x22, 0xe0,
33939 -  0xff, 0x12, 0x11, 0x71, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0, 0xfd, 0x12, 0x12, 0x2d, 0x7f}},
33940 - {0x05c6, 64, { 0x03, 0x7d, 0x07, 0x12, 0x12, 0x2d, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0,
33941 -  0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0,
33942 -  0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90,
33943 -  0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54}},
33944 - {0x0606, 64, { 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e,
33945 -  0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43, 0x80, 0x80, 0x03, 0x53, 0x43, 0x7f,
33946 -  0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43, 0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12,
33947 -  0x11, 0x97, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0xbd, 0xaf, 0x43, 0x12, 0x11, 0x25}},
33948 - {0x0646, 64, { 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf, 0x43, 0x12, 0x11, 0x25, 0x90, 0x7e, 0x2c,
33949 -  0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02, 0x80, 0x03, 0x53, 0x47, 0xfd, 0x90,
33950 -  0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60,
33951 -  0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03, 0x53, 0x47, 0xfe, 0x90, 0x7f}},
33952 - {0x0686, 64, { 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3,
33953 -  0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x10, 0x80,
33954 -  0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0,
33955 -  0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0}},
33956 - {0x06c6, 64, { 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x65,
33957 -  0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12,
33958 -  0x2d, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e, 0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f,
33959 -  0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x2d, 0x75, 0x32, 0x01, 0xd2, 0x08, 0x90, 0x7e}},
33960 - {0x0706, 64, { 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00,
33961 -  0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43, 0x45, 0x40, 0x90, 0x7f, 0x98, 0x74,
33962 -  0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f,
33963 -  0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x2d, 0x75, 0x34, 0x01, 0xd2, 0x08}},
33964 - {0x0746, 64, { 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x2d, 0xe4,
33965 -  0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
33966 -  0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c,
33967 -  0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4, 0xf5, 0x39, 0xd2, 0x08, 0x90}},
33968 - {0x0786, 64, { 0x7e, 0x3f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x13, 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0,
33969 -  0x74, 0x36, 0xf0, 0xc2, 0x06, 0xe4, 0x90, 0x7f, 0xd1, 0xf0, 0x30, 0x1a, 0x54, 0xe5, 0x39, 0x60,
33970 -  0x02, 0x15, 0x39, 0x30, 0x13, 0x4b, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80,
33971 -  0x40, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12, 0x13, 0x65, 0xef, 0x54, 0x01}},
33972 - {0x07c6, 64, { 0xf5, 0x19, 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2, 0x08, 0x12, 0x13, 0xa1, 0xef, 0x54, 0x80,
33973 -  0x64, 0x80, 0xf5, 0x19, 0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2, 0x08, 0x30, 0x0e, 0x11,
33974 -  0x12, 0x13, 0xa1, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05, 0x85, 0x19, 0x2e, 0xd2,
33975 -  0x08, 0x30, 0x1a, 0x2a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0}},
33976 - {0x0806, 64, { 0x60, 0x09, 0xe0, 0xf5, 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09,
33977 -  0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f,
33978 -  0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x09, 0x2c, 0xe5, 0x0a, 0x70, 0x40, 0x30, 0x07, 0x39, 0xe5,
33979 -  0x38, 0x70, 0x35, 0xc2, 0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18}},
33980 - {0x0846, 64, { 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0xae, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34,
33981 -  0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74,
33982 -  0x09, 0xf0, 0x75, 0x38, 0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22, 0xe5, 0x0a, 0x64, 0x01,
33983 -  0x70, 0x40, 0x30, 0x08, 0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5, 0x18, 0x7e, 0x00}},
33984 - {0x0886, 64, { 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0xae, 0xff, 0x74, 0x80,
33985 -  0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4,
33986 -  0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4, 0xf5, 0x35, 0x75, 0x0a,
33987 -  0x02, 0x22, 0xe5, 0x0a, 0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2, 0x14, 0xf5, 0x18}},
33988 - {0x08c6, 64, { 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0xae, 0xff,
33989 -  0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5,
33990 -  0x18, 0xb4, 0x05, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a, 0x03, 0x22, 0xe5, 0x15,
33991 -  0x60, 0x30, 0x15, 0x15, 0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x14, 0x25, 0x18}},
33992 - {0x0906, 64, { 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0xae, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34,
33993 -  0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74,
33994 -  0x03, 0xf0, 0xe4, 0xf5, 0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0f, 0x06, 0x0a, 0x14, 0x00,
33995 -  0x0a, 0x88, 0x01, 0x0a, 0xf4, 0x03, 0x09, 0x50, 0x06, 0x0a, 0x07, 0x08, 0x0a, 0x01, 0x09}},
33996 - {0x0946, 64, { 0x09, 0xe9, 0x0a, 0x09, 0xf8, 0x0b, 0x00, 0x00, 0x0b, 0x43, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60,
33997 -  0x19, 0x14, 0x60, 0x61, 0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xdf, 0x74, 0x19, 0x90, 0x7f, 0xd4,
33998 -  0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04,
33999 -  0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75}},
34000 - {0x0986, 64, { 0x82, 0x7b, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x66, 0x75,
34001 -  0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75,
34002 -  0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12, 0x90, 0x7f,
34003 -  0xd5, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f, 0x2c, 0xea, 0x49}},
34004 - {0x09c6, 64, { 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f,
34005 -  0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02,
34006 -  0x0b, 0x4a, 0x90, 0x7f, 0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b,
34007 -  0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x4a, 0x12, 0x0b, 0x52, 0x02, 0x0b}},
34008 - {0x0a06, 64, { 0x4a, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xe8,
34009 -  0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x10, 0xe4, 0x33,
34010 -  0xff, 0x25, 0xe0, 0xff, 0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0,
34011 -  0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x4a, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3}},
34012 - {0x0a46, 64, { 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80,
34013 -  0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4,
34014 -  0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f,
34015 -  0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02}},
34016 - {0x0a86, 64, { 0x0b, 0x4a, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x4a,
34017 -  0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xb4, 0xe0,
34018 -  0x44, 0x01, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0,
34019 -  0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24}},
34020 - {0x0ac6, 64, { 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff,
34021 -  0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44,
34022 -  0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8,
34023 -  0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01}},
34024 - {0x0b06, 64, { 0x04, 0xd2, 0x10, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea,
34025 -  0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0,
34026 -  0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01,
34027 -  0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4}},
34028 - {0x0b46, 64, { 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0,
34029 -  0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc0,
34030 -  0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18, 0xf0, 0xe4, 0xf5, 0x8e,
34031 -  0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5, 0x24, 0x75, 0x18}},
34032 - {0x0b86, 64, { 0x01, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xf4, 0x05,
34033 -  0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38, 0xf5, 0x13, 0xf5, 0x36,
34034 -  0xc2, 0x07, 0xc2, 0x0b, 0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13, 0xd2, 0x03, 0xd2, 0x01,
34035 -  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0}},
34036 - {0x0bc6, 64, { 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xe3, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0xb3, 0x90, 0x7f, 0x98,
34037 -  0x74, 0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f,
34038 -  0x98, 0x74, 0x14, 0xf0, 0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd,
34039 -  0x12, 0x11, 0xe3, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xe3, 0x90}},
34040 - {0x0c06, 64, { 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11, 0xe3,
34041 -  0x7f, 0x01, 0x12, 0x12, 0x9c, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xe3, 0x7f, 0x13, 0x7d, 0x09,
34042 -  0x12, 0x11, 0xe3, 0x20, 0x1b, 0x03, 0x02, 0x0c, 0xd9, 0x75, 0x2d, 0x01, 0x75, 0x18, 0x01, 0x7b,
34043 -  0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xf4, 0x05}},
34044 - {0x0c46, 64, { 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b, 0x01, 0xe4, 0xf5, 0x39, 0xf5, 0x13, 0xf5, 0x37, 0xc2,
34045 -  0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2, 0x00, 0xc2, 0x0a, 0xc2, 0x13, 0xd2, 0x04, 0xd2, 0x02, 0x90,
34046 + {0x0043,  3, { 0x02, 0x13, 0x00}},
34047 + {0x0003, 16, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90}},
34048 + {0x0013, 16, { 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0}},
34049 + {0x0023, 10, { 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32}},
34050 + {0x0000,  3, { 0x02, 0x0e, 0x12}},
34051 + {0x0106, 64, { 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x36, 0x02, 0xe5, 0x36, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94,
34052 +  0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e,
34053 +  0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x5d, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0,
34054 +  0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08}},
34055 + {0x0146, 64, { 0x90, 0x7e, 0x80, 0xe5, 0x36, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12,
34056 +  0x0c, 0xf1, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06,
34057 +  0x20, 0x05, 0x03, 0x02, 0x03, 0xc1, 0xe4, 0xf5, 0x18, 0x74, 0x40, 0x25, 0x18, 0xf5, 0x82, 0xe4,
34058 +  0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79}},
34059 + {0x0186, 64, { 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xe4, 0x05, 0x18, 0xe5, 0x18, 0xb4,
34060 +  0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24, 0x7f, 0x01,
34061 +  0xe4, 0xfd, 0x12, 0x11, 0xd0, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x11, 0xd0, 0x43, 0x46, 0x80, 0x90,
34062 +  0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90, 0x7e, 0x13}},
34063 + {0x01c6, 64, { 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x10, 0x54, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12,
34064 +  0x10, 0x7a, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12, 0x11, 0xd0, 0x7f, 0x03, 0x7d, 0x07,
34065 +  0x12, 0x11, 0xd0, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5,
34066 +  0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90, 0xc0, 0x00}},
34067 + {0x0206, 64, { 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x13,
34068 +  0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x44,
34069 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e, 0x07, 0xe0,
34070 +  0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x42, 0x80, 0x80, 0x03, 0x53, 0x42, 0x7f, 0x53}},
34071 + {0x0246, 64, { 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x10, 0xc6,
34072 +  0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xec, 0xaf, 0x42, 0x12, 0x10, 0xa0, 0x90, 0x7e, 0x03,
34073 +  0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42, 0x12, 0x10, 0xa0, 0x90, 0x7e, 0x0c, 0xe0, 0x60,
34074 +  0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd, 0x90, 0x7f}},
34075 + {0x0286, 64, { 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3,
34076 +  0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03, 0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14,
34077 +  0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3, 0xe0, 0x13,
34078 +  0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10, 0x80, 0x03}},
34079 + {0x02c6, 64, { 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e,
34080 +  0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54,
34081 +  0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x12, 0x13, 0x0f, 0xef, 0x54,
34082 +  0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e, 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xd0}},
34083 + {0x0306, 64, { 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x02, 0xe4,
34084 +  0xff, 0xad, 0x3e, 0x12, 0x11, 0xd0, 0x75, 0x29, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18, 0xe0, 0x60,
34085 +  0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2,
34086 +  0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11, 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13}},
34087 + {0x0346, 64, { 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x3e,
34088 +  0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xd0, 0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x1b,
34089 +  0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xd0, 0xe4, 0xf5, 0x2b,
34090 +  0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5}},
34091 + {0x0386, 64, { 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b, 0x90, 0x7e,
34092 +  0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4, 0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e, 0x1f, 0xe0,
34093 +  0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35,
34094 +  0xf0, 0xd2, 0x03, 0xc2, 0x05, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30, 0x1a, 0x54, 0xe5, 0x38}},
34095 + {0x03c6, 64, { 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x4b, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80,
34096 +  0x40, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x13, 0x0f, 0xef, 0x54, 0x01, 0xf5,
34097 +  0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13, 0x4b, 0xef, 0x54, 0x80,
34098 +  0x64, 0x80, 0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07, 0x30, 0x0d}},
34099 + {0x0406, 64, { 0x11, 0x12, 0x13, 0x4b, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19, 0x25, 0xd2,
34100 +  0x07, 0x20, 0x1b, 0x03, 0x02, 0x07, 0xf0, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x87, 0xef, 0xc3, 0x95,
34101 +  0x3d, 0x40, 0x03, 0x02, 0x04, 0xb0, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a, 0xc2, 0x00,
34102 +  0x80, 0x77, 0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x87}},
34103 + {0x0446, 64, { 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcb, 0xe0,
34104 +  0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41, 0x75, 0x0c,
34105 +  0x7d, 0x75, 0x0d, 0x41, 0x12, 0x0d, 0x16, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0x80, 0x39,
34106 +  0x90, 0x7f, 0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x87, 0xef, 0xc3, 0x94, 0x40, 0x50}},
34107 + {0x0486, 64, { 0x29, 0x90, 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00,
34108 +  0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d, 0xc1, 0x12,
34109 +  0x0d, 0x16, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30, 0xe1, 0x03,
34110 +  0x02, 0x05, 0x38, 0x12, 0x12, 0x3f, 0x8f, 0x19, 0x12, 0x13, 0x93, 0x8f, 0x37, 0xe5, 0x19}},
34111 + {0x04c6, 64, { 0xc3, 0x95, 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x6f, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x37, 0x20, 0xe7, 0x03,
34112 +  0x30, 0x0c, 0x5e, 0xc2, 0x0c, 0xe5, 0x19, 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x37, 0x02, 0xe5,
34113 +  0x37, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19,
34114 +  0x08, 0x7e, 0x7d, 0x7f, 0x80, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f}},
34115 + {0x0506, 64, { 0x96, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb, 0xf0, 0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40,
34116 +  0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08, 0x90, 0x7d, 0x80, 0xe5, 0x37, 0xf0, 0x7e, 0x7d, 0x7f,
34117 +  0x81, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12, 0x0d, 0x3b, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb,
34118 +  0xf0, 0x90, 0x7f, 0xd0, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x99, 0xe4}},
34119 + {0x0546, 64, { 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18,
34120 +  0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
34121 +  0x12, 0x0e, 0xe4, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68,
34122 +  0x90, 0x7e, 0x23, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x12, 0x1a, 0x7f, 0x03}},
34123 + {0x0586, 64, { 0x7d, 0xcd, 0x12, 0x12, 0x1a, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00,
34124 +  0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12,
34125 +  0x11, 0x38, 0x90, 0x7e, 0x22, 0xe0, 0xff, 0x12, 0x11, 0x5e, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0,
34126 +  0xfd, 0x12, 0x12, 0x1a, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12, 0x1a, 0x43, 0x47, 0x80, 0x90}},
34127 + {0x05c6, 64, { 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
34128 +  0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e,
34129 +  0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0,
34130 +  0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90}},
34131 + {0x0606, 64, { 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e, 0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43,
34132 +  0x80, 0x80, 0x03, 0x53, 0x43, 0x7f, 0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43,
34133 +  0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x11, 0x84, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0xaa,
34134 +  0xaf, 0x43, 0x12, 0x11, 0x12, 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf}},
34135 + {0x0646, 64, { 0x43, 0x12, 0x11, 0x12, 0x90, 0x7e, 0x2c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02,
34136 +  0x80, 0x03, 0x53, 0x47, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47,
34137 +  0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03,
34138 +  0x53, 0x47, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0}},
34139 + {0x0686, 64, { 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3, 0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0,
34140 +  0x60, 0x05, 0x43, 0x47, 0x10, 0x80, 0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0,
34141 +  0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90,
34142 +  0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f}},
34143 + {0x06c6, 64, { 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x63, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd,
34144 +  0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x1a, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e,
34145 +  0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x1a, 0x75, 0x32,
34146 +  0x01, 0xd2, 0x08, 0x90, 0x7e, 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0}},
34147 + {0x0706, 64, { 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43,
34148 +  0x45, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
34149 +  0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f, 0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x1a,
34150 +  0x75, 0x34, 0x01, 0xd2, 0x08, 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4}},
34151 + {0x0746, 64, { 0xff, 0xad, 0x3f, 0x12, 0x12, 0x1a, 0xe4, 0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e,
34152 +  0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
34153 +  0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c, 0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4,
34154 +  0xf5, 0x39, 0xd2, 0x08, 0x90, 0x7e, 0x3f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x13}},
34155 + {0x0786, 64, { 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0, 0x74, 0x36, 0xf0, 0xd2, 0x04, 0xc2, 0x06, 0xe4, 0x90, 0x7f,
34156 +  0xd1, 0xf0, 0x30, 0x1a, 0x54, 0xe5, 0x39, 0x60, 0x02, 0x15, 0x39, 0x30, 0x13, 0x4b, 0xe5, 0x13,
34157 +  0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x40, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2,
34158 +  0x13, 0x12, 0x13, 0x63, 0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x33, 0x60, 0x05, 0x85, 0x19}},
34159 + {0x07c6, 64, { 0x33, 0xd2, 0x08, 0x12, 0x13, 0x9f, 0xef, 0x54, 0x80, 0x64, 0x80, 0xf5, 0x19, 0x65, 0x2f, 0x60, 0x05,
34160 +  0x85, 0x19, 0x2f, 0xd2, 0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x9f, 0xef, 0x54, 0x10, 0xf5, 0x19,
34161 +  0x65, 0x2e, 0x60, 0x05, 0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a, 0x90, 0x7f, 0xd2, 0xe0,
34162 +  0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5, 0x15, 0x90, 0x7b, 0x42}},
34163 + {0x0806, 64, { 0xe0, 0xf5, 0x16, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37,
34164 +  0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x09, 0x24,
34165 +  0xe5, 0x0a, 0x70, 0x40, 0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2, 0x07, 0xf5, 0x18, 0x7e,
34166 +  0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9e}},
34167 + {0x0846, 64, { 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5,
34168 +  0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38, 0x10, 0xe4, 0xf5, 0x2c,
34169 +  0x75, 0x0a, 0x01, 0x22, 0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08, 0x39, 0xe5, 0x39, 0x70,
34170 +  0x35, 0xc2, 0x08, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xee}},
34171 + {0x0886, 64, { 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9e, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5,
34172 +  0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0,
34173 +  0x75, 0x39, 0x10, 0xe4, 0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a, 0x64, 0x02, 0x70, 0x36,
34174 +  0x30, 0x14, 0x2f, 0xc2, 0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x0e, 0x25, 0x18}},
34175 + {0x08c6, 64, { 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9e, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34,
34176 +  0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb, 0x90, 0x7f, 0xc3, 0x74,
34177 +  0x05, 0xf0, 0x75, 0x0a, 0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15, 0xe4, 0xf5, 0x18, 0x7e,
34178 +  0x00, 0x7b, 0x00, 0x74, 0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9e}},
34179 + {0x0906, 64, { 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5,
34180 +  0x18, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x0a, 0x22, 0x90, 0x7f,
34181 +  0xe9, 0xe0, 0x12, 0x0e, 0xf6, 0x0a, 0x0c, 0x00, 0x0a, 0x80, 0x01, 0x0a, 0xec, 0x03, 0x09, 0x48,
34182 +  0x06, 0x09, 0xff, 0x08, 0x09, 0xf9, 0x09, 0x09, 0xe1, 0x0a, 0x09, 0xf0, 0x0b, 0x00, 0x00}},
34183 + {0x0946, 64, { 0x0b, 0x3b, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61, 0x24, 0x02, 0x60, 0x03,
34184 +  0x02, 0x09, 0xd7, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02,
34185 +  0x0b, 0x42, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82,
34186 +  0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82}},
34187 + {0x0986, 64, { 0x74, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83,
34188 +  0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x74, 0x19,
34189 +  0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xea,
34190 +  0xe0, 0xff, 0x12, 0x0f, 0x1c, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9}},
34191 + {0x09c6, 64, { 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x42,
34192 +  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0x00, 0xe5, 0x09, 0xf0,
34193 +  0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x09, 0x02,
34194 +  0x0b, 0x42, 0x12, 0x0b, 0x4a, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90}},
34195 + {0x0a06, 64, { 0x7f, 0xb5, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31,
34196 +  0x24, 0x02, 0x70, 0x5b, 0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x16, 0xe4, 0x33,
34197 +  0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b,
34198 +  0x42, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02}},
34199 + {0x0a46, 64, { 0x0b, 0x42, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07,
34200 +  0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90,
34201 +  0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x42, 0x90,
34202 +  0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe}},
34203 + {0x0a86, 64, { 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2,
34204 +  0x10, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f,
34205 +  0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff,
34206 +  0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83}},
34207 + {0x0ac6, 64, { 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54,
34208 +  0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0,
34209 +  0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70,
34210 +  0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80, 0x3f, 0x90, 0x7f, 0xb4}},
34211 + {0x0b06, 64, { 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4,
34212 +  0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5,
34213 +  0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
34214 +  0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0}},
34215 + {0x0b46, 64, { 0x44, 0x02, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90,
34216 +  0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90,
34217 +  0x7f, 0x98, 0x74, 0x18, 0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f,
34218 +  0xde, 0xf0, 0xe4, 0xf5, 0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9}},
34219 + {0x0b86, 64, { 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xe4, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3a,
34220 +  0x01, 0xe4, 0xf5, 0x38, 0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b, 0xc2, 0x05, 0xc2, 0x00,
34221 +  0xc2, 0x09, 0xc2, 0x13, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00,
34222 +  0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xd0, 0x7f, 0x10, 0x8f, 0x42, 0x12}},
34223 + {0x0bc6, 64, { 0x10, 0xa0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0,
34224 +  0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80,
34225 +  0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x11, 0xd0, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12,
34226 +  0x11, 0xd0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05}},
34227 + {0x0c06, 64, { 0x7d, 0x7f, 0x12, 0x11, 0xd0, 0x7f, 0x01, 0x12, 0x12, 0x89, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xd0,
34228 +  0x7f, 0x13, 0x7d, 0x09, 0x12, 0x11, 0xd0, 0x20, 0x1b, 0x03, 0x02, 0x0c, 0xc9, 0x75, 0x2d, 0x01,
34229 +  0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12,
34230 +  0x0e, 0xe4, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b, 0x01, 0xe4, 0xf5, 0x39}},
34231 + {0x0c46, 64, { 0xf5, 0x13, 0xf5, 0x37, 0xc2, 0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2, 0x00, 0xc2, 0x0a, 0xc2, 0x13, 0x90,
34232    0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c,
34233 -  0xe4, 0xfd, 0x12, 0x12, 0x2d, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x11, 0x25, 0x90, 0x7f, 0x98}},
34234 - {0x0c86, 64, { 0x74, 0x0a, 0xf0, 0x7f, 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98,
34235 -  0x74, 0x0c, 0xf0, 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12,
34236 -  0x12, 0x2d, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12, 0x12, 0x2d, 0x90, 0x7f, 0x98,
34237 -  0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x12, 0x2d}},
34238 - {0x0cc6, 64, { 0x7f, 0x01, 0x12, 0x12, 0xbd, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12, 0x2d, 0x7f, 0x13, 0x7d, 0x09, 0x12,
34239 -  0x12, 0x2d, 0xd2, 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5,
34240 +  0xe4, 0xfd, 0x12, 0x12, 0x1a, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x11, 0x12, 0x90, 0x7f, 0x98, 0x74,
34241 +  0x0a, 0xf0, 0x7f, 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f}},
34242 + {0x0c86, 64, { 0x98, 0x74, 0x0c, 0xf0, 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12,
34243 +  0x12, 0x1a, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12, 0x12, 0x1a, 0x90, 0x7f, 0x98,
34244 +  0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x12, 0x1a, 0x7f,
34245 +  0x01, 0x12, 0x12, 0xaa, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12, 0x1a, 0x7f, 0x13, 0x7d, 0x09}},
34246 + {0x0cc6, 64, { 0x12, 0x12, 0x1a, 0xd2, 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5,
34247    0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3,
34248 -  0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10}},
34249 - {0x0d06, 64, { 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0,
34250 -  0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90,
34251 +  0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0,
34252 +  0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90}},
34253 + {0x0d06, 64, { 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90,
34254    0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2,
34255 -  0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86}},
34256 - {0x0d46, 64, { 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82,
34257 -  0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3,
34258 +  0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf,
34259 +  0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5}},
34260 + {0x0d46, 64, { 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3,
34261    0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5,
34262 -  0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44}},
34263 - {0x0d86, 64, { 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0,
34264 -  0x44, 0x02, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e,
34265 +  0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80,
34266 +  0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92}},
34267 + {0x0d86, 64, { 0xe0, 0x44, 0x02, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e,
34268    0xf0, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0,
34269 -  0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53}},
34270 - {0x0dc6, 64, { 0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2,
34271 -  0xaf, 0xd2, 0x1a, 0x12, 0x12, 0x77, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2,
34272 +  0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91,
34273 +  0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0}},
34274 + {0x0dc6, 64, { 0xd2, 0xaf, 0xd2, 0x1a, 0x12, 0x12, 0x64, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2,
34275    0x12, 0x90, 0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12,
34276 -  0x05, 0xd2, 0x1a, 0x12, 0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30}},
34277 - {0x0e06, 64, { 0x12, 0x05, 0xc2, 0x1a, 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x2d, 0x80, 0xd6,
34278 -  0x30, 0x18, 0xd3, 0xc2, 0x18, 0x12, 0x13, 0xad, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8,
34279 -  0xfd, 0x75, 0x81, 0x47, 0x02, 0x0e, 0x69, 0x02, 0x0d, 0x91, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93,
34280 -  0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3}},
34281 - {0x0e46, 64, { 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04,
34282 -  0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20,
34283 -  0x40, 0x80, 0x90, 0x12, 0xde, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30,
34284 -  0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25}},
34285 - {0x0e86, 64, { 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8,
34286 -  0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83,
34287 +  0x05, 0xd2, 0x1a, 0x12, 0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30, 0x12,
34288 +  0x05, 0xc2, 0x1a, 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x25, 0x80}},
34289 + {0x0e06, 64, { 0xd6, 0x30, 0x18, 0xd3, 0xc2, 0x18, 0x12, 0x13, 0xab, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8,
34290 +  0xfd, 0x75, 0x81, 0x47, 0x02, 0x0e, 0x59, 0x02, 0x0d, 0x81, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93,
34291 +  0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8,
34292 +  0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40}},
34293 + {0x0e46, 64, { 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20,
34294 +  0x40, 0x80, 0x90, 0x12, 0xcb, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30,
34295 +  0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0,
34296 +  0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3}},
34297 + {0x0e86, 64, { 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83,
34298    0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22,
34299 -  0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93}},
34300 - {0x0ec6, 64, { 0x22, 0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50,
34301 -  0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22,
34302 +  0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22,
34303 +  0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22}},
34304 + {0x0ec6, 64, { 0x50, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22,
34305    0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06,
34306 -  0x89, 0x82, 0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22}},
34307 - {0x0f06, 64, { 0xd0, 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93,
34308 -  0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef,
34309 +  0x89, 0x82, 0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0,
34310 +  0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3}},
34311 + {0x0f06, 64, { 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef,
34312    0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19,
34313 -  0x75, 0x1c, 0x86, 0xab, 0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xc7}},
34314 - {0x0f46, 64, { 0xb4, 0x03, 0x1d, 0xaf, 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0xae, 0x7e, 0x00,
34315 -  0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b,
34316 +  0x75, 0x1c, 0x86, 0xab, 0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xb7, 0xb4,
34317 +  0x03, 0x1d, 0xaf, 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0x9e, 0x7e}},
34318 + {0x0f46, 64, { 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b,
34319    0x00, 0x7a, 0x00, 0x79, 0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02,
34320 -  0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d}},
34321 - {0x0f86, 64, { 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08,
34322 -  0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x41, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f,
34323 +  0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d, 0xe5,
34324 +  0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15}},
34325 + {0x0f86, 64, { 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x3f, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f,
34326    0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83,
34327 -  0xe5, 0x1a, 0xf0, 0x12, 0x13, 0x59, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05}},
34328 - {0x0fc6, 64, { 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x95,
34329 -  0x8f, 0x1a, 0xef, 0x42, 0x37, 0x80, 0xca, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c,
34330 +  0xe5, 0x1a, 0xf0, 0x12, 0x13, 0x57, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c,
34331 +  0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13}},
34332 + {0x0fc6, 64, { 0x93, 0x8f, 0x1a, 0xef, 0x42, 0x37, 0x80, 0xca, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c,
34333    0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74,
34334 -  0x27, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x20, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x07, 0xf0, 0xe4}},
34335 - {0x1006, 64, { 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x22, 0xc0,
34336 -  0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f,
34337 -  0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84,
34338 -  0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82}},
34339 - {0x1046, 64, { 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x11, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab,
34340 -  0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32,
34341 -  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74,
34342 -  0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44}},
34343 - {0x1086, 64, { 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74,
34344 -  0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
34345 -  0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74,
34346 -  0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90}},
34347 - {0x10c6, 64, { 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00,
34348 -  0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f,
34349 -  0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5,
34350 -  0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90}},
34351 - {0x1106, 64, { 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90,
34352 -  0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f,
34353 -  0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
34354 -  0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f}},
34355 - {0x1146, 64, { 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
34356 -  0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b,
34357 -  0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0,
34358 -  0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00}},
34359 - {0x1186, 64, { 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22,
34360 -  0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74,
34361 -  0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54,
34362 -  0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00}},
34363 - {0x11c6, 64, { 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
34364 -  0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74,
34365 -  0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0,
34366 -  0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed}},
34367 - {0x1206, 64, { 0xf0, 0x22, 0x12, 0x13, 0x29, 0x8f, 0x1a, 0x12, 0x13, 0x29, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60,
34368 -  0x12, 0x12, 0x13, 0x29, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x29, 0x8f,
34369 -  0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f,
34370 -  0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0}},
34371 - {0x1246, 64, { 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x7d, 0x8f, 0x1a,
34372 -  0x12, 0x13, 0x7d, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x7d, 0x8f, 0x1a,
34373 -  0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x7d, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22,
34374 -  0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x1a, 0x04, 0xe0}},
34375 - {0x1286, 64, { 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x12, 0xfa, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0,
34376 -  0xe0, 0x44, 0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11,
34377 -  0xe3, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3e, 0x44,
34378 -  0x80, 0xfd, 0x12, 0x11, 0xe3, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3f, 0x54, 0x7f, 0xfd}},
34379 - {0x12c6, 64, { 0x12, 0x12, 0x2d, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3f,
34380 -  0x44, 0x80, 0xfd, 0x12, 0x12, 0x2d, 0x22, 0x05, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x14,
34381 -  0x03, 0x00, 0x00, 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10, 0xc1, 0x16, 0x01, 0x0a, 0x00,
34382 -  0xc1, 0x9b, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02}},
34383 - {0x1306, 64, { 0x15, 0x18, 0x4e, 0x60, 0x05, 0x12, 0x0d, 0x70, 0x80, 0xee, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0,
34384 -  0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xe0,
34385 -  0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f,
34386 -  0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x15}},
34387 - {0x1346, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0,
34388 -  0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f,
34389 -  0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
34390 -  0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00}},
34391 - {0x1386, 64, { 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f,
34392 -  0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0,
34393 -  0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x12, 0x0f, 0xdf, 0x12, 0x0d, 0x81, 0x12, 0x0b, 0x52, 0x22,
34394 -  0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
34395 +  0x27, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x20, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x07, 0xf0, 0xe4, 0x90,
34396 +  0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x22}},
34397 + {0x1006, 64, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x11,
34398 +  0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0,
34399 +  0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84,
34400 +  0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08}},
34401 + {0x1046, 64, { 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98,
34402 +  0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90,
34403 +  0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0,
34404 +  0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0}},
34405 + {0x1086, 64, { 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
34406 +  0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90,
34407 +  0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0,
34408 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22}},
34409 + {0x10c6, 64, { 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14,
34410 +  0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f,
34411 +  0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
34412 +  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98}},
34413 + {0x1106, 64, { 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b,
34414 +  0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00,
34415 +  0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
34416 +  0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f}},
34417 + {0x1146, 64, { 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45,
34418 +  0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00,
34419 +  0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
34420 +  0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f}},
34421 + {0x1186, 64, { 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90,
34422 +  0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0,
34423 +  0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90,
34424 +  0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b}},
34425 + {0x11c6, 64, { 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5,
34426 +  0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00,
34427 +  0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13,
34428 +  0x27, 0x8f, 0x1a, 0x12, 0x13, 0x27, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12}},
34429 + {0x1206, 64, { 0x13, 0x27, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x27, 0x8f, 0x1b, 0x80, 0xe8,
34430 +  0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00,
34431 +  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
34432 +  0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x7b, 0x8f, 0x1a, 0x12, 0x13}},
34433 + {0x1246, 64, { 0x7b, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x7b, 0x8f, 0x1a, 0xe5, 0x1a, 0x65,
34434 +  0x1b, 0x60, 0x07, 0x12, 0x13, 0x7b, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0xd6,
34435 +  0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x1a, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f,
34436 +  0xf4, 0x7e, 0x01, 0x12, 0x12, 0xe7, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44}},
34437 + {0x1286, 64, { 0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xd0, 0x90, 0x7f,
34438 +  0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3e, 0x44, 0x80, 0xfd, 0x12,
34439 +  0x11, 0xd0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3f, 0x54, 0x7f, 0xfd, 0x12, 0x12, 0x1a, 0x90,
34440 +  0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80}},
34441 + {0x12c6, 64, { 0xfd, 0x12, 0x12, 0x1a, 0x22, 0x05, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x14, 0x03, 0x00, 0x00,
34442 +  0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10, 0xc1, 0x16, 0x01, 0x0a, 0x00, 0xc1, 0x9b, 0x00,
34443 +  0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e, 0x60,
34444 +  0x05, 0x12, 0x0d, 0x60, 0x80, 0xee, 0x22, 0x00, 0x00, 0x02, 0x10, 0x06, 0x00, 0x02, 0x13}},
34445 + {0x1306, 64, { 0x04, 0x00, 0x02, 0x00, 0x03, 0x00, 0x02, 0x10, 0x2d, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0,
34446 +  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
34447 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
34448 +  0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90}},
34449 + {0x1346, 64, { 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
34450 +  0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
34451 +  0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0,
34452 +  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff}},
34453 + {0x1386, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
34454 +  0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0,
34455 +  0x00, 0xe0, 0xff, 0x22, 0x12, 0x0f, 0xcf, 0x12, 0x0d, 0x71, 0x12, 0x0b, 0x4a, 0x22, 0x00, 0x00,
34456 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
34457   {0x13c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34458    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34459    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34460 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x40, 0x00, 0x02, 0x14}},
34461 - {0x1406, 64, { 0x04, 0x00, 0x02, 0x10, 0x16, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34462 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
34463 + {0x1406, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34464    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34465    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34466    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
34467 @@ -425,7 +426,7 @@
34468   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34469    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34470    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34471 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
34472 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
34473   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x10, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
34474    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
34475    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
34476 @@ -443,5 +444,5 @@
34477    0x00, 0x42, 0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c,
34478    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
34479   {0x1a06,  4, { 0x72, 0x00, 0x00, 0x00}},
34480 - {0xffff,      0,      {0x00} }
34481 + {0xffff,  0, {0x00}}
34482  };
34483 diff -Nur linux-2.4.19.old/drivers/usb/serial/keyspan_usa49msg.h linux-2.4.19/drivers/usb/serial/keyspan_usa49msg.h
34484 --- linux-2.4.19.old/drivers/usb/serial/keyspan_usa49msg.h      Wed Oct 10 00:15:03 2001
34485 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa49msg.h  Mon Nov 25 12:27:09 2002
34486 @@ -41,14 +41,10 @@
34487  
34488         4th revision: USA49W version
34489  
34490 -       See usa26msg.h for description of message formats
34491 -
34492 -       Third revision: USA28X version (aka USA26)
34493 -
34494         Buffer formats for RX/TX data messages are not defined by
34495         a structure, but are described here:
34496  
34497 -       USB OUT (host -> USA26, transmit) messages contain a 
34498 +       USB OUT (host -> USAxx, transmit) messages contain a 
34499         REQUEST_ACK indicator (set to 0xff to request an ACK at the 
34500         completion of transmit; 0x00 otherwise), followed by data:
34501  
34502 @@ -56,17 +52,28 @@
34503  
34504         with a total data length of 63.
34505  
34506 -       USB IN (USA26 -> host, receive) messages contain either a zero
34507 -       flag (indicating no error in any data bytes):
34508 +       USB IN (USAxx -> host, receive) messages begin with a status
34509 +       byte in which the 0x80 bit is either:
34510 +                                       
34511 +               (a)     0x80 bit clear
34512 +                       indicates that the bytes following it are all data
34513 +                       bytes:
34514 +
34515 +                               STAT DATA DATA DATA DATA DATA ...
34516 +
34517 +                       for a total of up to 63 DATA bytes,
34518 +
34519 +       or:
34520  
34521 -               00 DAT DAT DAT ...
34522 +               (b)     0x80 bit set
34523 +                       indiates that the bytes following alternate data and
34524 +                       status bytes:
34525  
34526 -       for a total of 63 data bytes, or a non-zero status flag (indicating 
34527 -       that all data bytes will be preceded by status flag):
34528 +                               STAT DATA STAT DATA STAT DATA STAT DATA ...
34529  
34530 -               STAT DAT STAT DAT STAT DAT ...
34531 +                       for a total of up to 32 DATA bytes.
34532  
34533 -       for a total of 32 data bytes.  The valid bits in the STAT bytes are:
34534 +       The valid bits in the STAT bytes are:
34535  
34536                 OVERRUN 0x02
34537                 PARITY  0x04
34538 @@ -75,9 +82,19 @@
34539  
34540         Notes:
34541         
34542 -       1.      a "no status" RX data message (first byte zero) can serve as
34543 -               a "break off" indicator.
34544 -       2.      a control message specifying disablePort will be answered
34545 +       (1) The OVERRUN bit can appear in either (a) or (b) format
34546 +               messages, but the but the PARITY/FRAMING/BREAK bits
34547 +               only appear in (b) format messages.
34548 +       (2) For the host to determine the exact point at which the
34549 +               overrun occurred (to identify the point in the data
34550 +               stream at which the data was lost), it needs to count
34551 +               128 characters, starting at the first character of the
34552 +               message in which OVERRUN was reported; the lost character(s)
34553 +               would have been received between the 128th and 129th
34554 +               characters.
34555 +       (3)     An RX data message in which the first byte has 0x80 clear
34556 +               serves as a "break off" indicator.
34557 +       (4)     a control message specifying disablePort will be answered
34558                 with a status message, but no further status will be sent
34559                 until a control messages with enablePort is sent
34560  
34561 @@ -92,6 +109,7 @@
34562         2000mar09       change to support 4 ports
34563         2000may03       change external clocking to match USA-49W hardware
34564         2000jun01       add extended BSD-style copyright text
34565 +       2001jul05       change message format to improve OVERRUN case
34566  */
34567  
34568  #ifndef        __USA49MSG__
34569 @@ -107,7 +125,7 @@
34570         0x80            globalControlMessage
34571  */
34572  
34573 -typedef struct keyspan_usa49_portControlMessage
34574 +struct keyspan_usa49_portControlMessage
34575  {
34576         /*
34577                 0.      0/1/2/3         port control message follows
34578 @@ -173,7 +191,7 @@
34579                 enablePort,             // start servicing port (move data, check status)
34580                 disablePort;    // stop servicing port (does implicit tx/rx flush/off)
34581         
34582 -} keyspan_usa49_portControlMessage;
34583 +};
34584  
34585  // defines for bits in lcr
34586  #define        USA_DATABITS_5          0x00
34587 @@ -201,7 +219,7 @@
34588         sends any control message (either global or port-specific).
34589  */
34590  
34591 -typedef struct keyspan_usa49_globalControlMessage
34592 +struct keyspan_usa49_globalControlMessage
34593  {
34594         u8      portNumber,                     // 0x80
34595                 sendGlobalStatus,       // 1/2=number of status responses requested
34596 @@ -209,7 +227,7 @@
34597                 resetStatusCount,       // a cycling value
34598                 remoteWakeupEnable,             // 0x10=P1, 0x20=P2, 0x40=P3, 0x80=P4
34599                 disableStatusMessages;  // 1=send no status until host talks
34600 -} keyspan_usa49_globalControlMessage;
34601 +};
34602  
34603  /*
34604         Device->host messages send on the global status endpoint
34605 @@ -221,7 +239,7 @@
34606         0x81                            globalDebugMessage
34607  */
34608  
34609 -typedef struct keyspan_usa49_portStatusMessage // one for each port
34610 +struct keyspan_usa49_portStatusMessage // one for each port
34611  {
34612         u8      portNumber,             // 0,1,2,3
34613                 cts,                    // reports CTS pin
34614 @@ -234,7 +252,7 @@
34615                 controlResponse,// 1=a control message has been processed
34616                 txAck,                  // ACK (data TX complete)
34617                 rs232valid;             // RS-232 signal valid
34618 -} keyspan_usa49_portStatusMessage;
34619 +};
34620  
34621  // bits in RX data message when STAT byte is included
34622  #define        RXERROR_OVERRUN 0x02
34623 @@ -242,19 +260,19 @@
34624  #define        RXERROR_FRAMING 0x08
34625  #define        RXERROR_BREAK   0x10
34626  
34627 -typedef struct keyspan_usa49_globalStatusMessage
34628 +struct keyspan_usa49_globalStatusMessage
34629  {
34630         u8      portNumber,                     // 0x80=globalStatusMessage
34631                 sendGlobalStatus,       // from request, decremented
34632                 resetStatusCount;       // as in request
34633 -} keyspan_usa49_globalStatusMessage;
34634 +};
34635  
34636 -typedef struct keyspan_usa49_globalDebugMessage
34637 +struct keyspan_usa49_globalDebugMessage
34638  {
34639         u8      portNumber,                     // 0x81=globalDebugMessage
34640                 n,                                      // typically a count/status byte
34641                 b;                                      // typically a data byte
34642 -} keyspan_usa49_globalDebugMessage;
34643 +};
34644  
34645  // ie: the maximum length of an EZUSB endpoint buffer
34646  #define        MAX_DATA_LEN                    64
34647 diff -Nur linux-2.4.19.old/drivers/usb/serial/keyspan_usa49w_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa49w_fw.h
34648 --- linux-2.4.19.old/drivers/usb/serial/keyspan_usa49w_fw.h     Wed Oct 10 00:15:03 2001
34649 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa49w_fw.h Mon Nov 25 12:27:09 2002
34650 @@ -1,43 +1,47 @@
34651  /* keyspan_usa49w_fw.h
34652 -  
34653 -   Generated from Keyspan firmware image usa49code.h Sat Oct  6 12:06:59 EST 2001
34654 -   This firmware is for the Keyspan USA-49W Serial Adaptor
34655  
34656 -   "The firmware contained herein as keyspan_usa49w_fw.h is
34657 -   Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
34658 -   ("Keyspan"), as an unpublished work.  This notice does not imply
34659 -   unrestricted or public access to this firmware which is a trade secret of
34660 -   Keyspan, and which may not be reproduced, used, sold or transferred to any
34661 -   third party without Keyspan's prior written consent.  All Rights Reserved.
34662 +       The firmware contained herein as keyspan_usa49w_fw.h is
34663  
34664 -   This firmware may not be modified and may only be used with the Keyspan 
34665 -   USA-49W Serial Adapter.  Distribution and/or Modification of the
34666 -   keyspan.c driver which includes this firmware, in whole or in part,
34667 -   requires the inclusion of this statement."
34668 +               Copyright (C) 1999-2001
34669 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
34670 +               
34671 +       as an unpublished work. This notice does not imply unrestricted or
34672 +       public access to the source code from which this firmware image is
34673 +       derived.  Except as noted below this firmware image may not be 
34674 +       reproduced, used, sold or transferred to any third party without 
34675 +       Keyspan's prior written consent.  All Rights Reserved.
34676 +
34677 +       Permission is hereby granted for the distribution of this firmware 
34678 +       image as part of a Linux or other Open Source operating system kernel 
34679 +       in text or binary form as required. 
34680 +
34681 +       This firmware may not be modified and may only be used with  
34682 +       Keyspan hardware.  Distribution and/or Modification of the 
34683 +       keyspan.c driver which includes this firmware, in whole or in 
34684 +       part, requires the inclusion of this statement."
34685  
34686  */
34687  
34688  static const struct ezusb_hex_record keyspan_usa49w_firmware[] = {
34689 - {0x7f92,  1, { 0x01}},
34690 - {0x0033,  3, { 0x02, 0x18, 0xfc}},
34691 + {0x0033,  3, { 0x02, 0x18, 0xfb}},
34692   {0x0036, 12, { 0x90, 0x78, 0x41, 0x74, 0x01, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
34693   {0x0046, 16, { 0xe4, 0xff, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xfe, 0xe5, 0x15}},
34694   {0x0056, 16, { 0x24, 0x04, 0xfd, 0xe4, 0x35, 0x14, 0xfa, 0xa9, 0x05, 0x7b, 0x01, 0xef, 0x7c, 0x00, 0x29, 0xf9}},
34695 - {0x0066, 16, { 0xec, 0x3a, 0xfa, 0xee, 0x12, 0x11, 0xf6, 0x0f, 0xbf, 0x22, 0xd7, 0xe5, 0x15, 0x24, 0x05, 0xf5}},
34696 + {0x0066, 16, { 0xec, 0x3a, 0xfa, 0xee, 0x12, 0x11, 0xf1, 0x0f, 0xbf, 0x22, 0xd7, 0xe5, 0x15, 0x24, 0x05, 0xf5}},
34697   {0x0076, 16, { 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x03, 0x02, 0x01, 0x34, 0xe5, 0x15, 0x24, 0x09}},
34698   {0x0086, 16, { 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x0e, 0xe5, 0x15, 0x24, 0x0a, 0xf5, 0x82}},
34699 - {0x0096, 16, { 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x18, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x16, 0x4c, 0xe5}},
34700 + {0x0096, 16, { 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x18, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x16, 0x47, 0xe5}},
34701   {0x00a6, 16, { 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xcf, 0xf0, 0x80, 0x41}},
34702 - {0x00b6, 16, { 0xe5, 0x15, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x16, 0x7b}},
34703 + {0x00b6, 16, { 0xe5, 0x15, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x16, 0x76}},
34704   {0x00c6, 16, { 0xe5, 0x15, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x00, 0x03}},
34705   {0x00d6, 16, { 0x7f, 0x01, 0xe5, 0x15, 0x24, 0x08, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xfd, 0x12}},
34706 - {0x00e6, 16, { 0x16, 0x4c, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x30}},
34707 + {0x00e6, 16, { 0x16, 0x47, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x30}},
34708   {0x00f6, 16, { 0xf0, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x80, 0xf0}},
34709   {0x0003, 16, { 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x78, 0x41, 0x74}},
34710   {0x0013, 16, { 0x01, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24}},
34711   {0x0023, 16, { 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22}},
34712   {0x0043,  3, { 0x02, 0x1b, 0x00}},
34713 - {0x0000,  3, { 0x02, 0x10, 0x9a}},
34714 + {0x0000,  3, { 0x02, 0x10, 0x95}},
34715   {0x0106, 64, { 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
34716    0xe0, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0, 0xe5, 0x15, 0x24, 0x36, 0xf5,
34717    0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24,
34718 @@ -49,16 +53,16 @@
34719   {0x0186, 64, { 0x15, 0x24, 0x17, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x11, 0xe5, 0x15, 0x24, 0x32,
34720    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x04, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24,
34721    0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfb, 0xf0, 0xe4, 0xff, 0xe5, 0x15,
34722 -  0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xfd, 0x12, 0x16, 0x4c, 0xe5}},
34723 +  0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xfd, 0x12, 0x16, 0x47, 0xe5}},
34724   {0x01c6, 64, { 0x15, 0x24, 0x0e, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x11, 0xe5, 0x15, 0x24, 0x33,
34725    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24,
34726    0x33, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0xf0, 0xe5, 0x15, 0x24, 0x33,
34727    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xe5, 0x15, 0x24, 0x0f}},
34728   {0x0206, 64, { 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x2f, 0xe5, 0x15, 0x24, 0x33, 0xf5, 0x82, 0xe4,
34729    0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x15, 0x24, 0x10, 0xf5, 0x82, 0xe4, 0x35,
34730 -  0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x15, 0xec, 0xe5, 0x15, 0x24, 0x11, 0xf5, 0x82, 0xe4, 0x35,
34731 -  0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x16, 0x1c, 0xe5, 0x15, 0x24, 0x33, 0xf5, 0x82, 0xe4}},
34732 - {0x0246, 64, { 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x15, 0xbc, 0xe5, 0x15, 0x24, 0x14, 0xf5, 0x82, 0xe4, 0x35,
34733 +  0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x15, 0xe7, 0xe5, 0x15, 0x24, 0x11, 0xf5, 0x82, 0xe4, 0x35,
34734 +  0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x16, 0x17, 0xe5, 0x15, 0x24, 0x33, 0xf5, 0x82, 0xe4}},
34735 + {0x0246, 64, { 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x15, 0xb7, 0xe5, 0x15, 0x24, 0x14, 0xf5, 0x82, 0xe4, 0x35,
34736    0x14, 0xf5, 0x83, 0xe0, 0x60, 0x44, 0xe5, 0x15, 0x24, 0x15, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
34737    0x83, 0xe0, 0x60, 0x11, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0,
34738    0x44, 0x01, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5}},
34739 @@ -84,12 +88,12 @@
34740    0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14}},
34741   {0x03c6, 64, { 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x01, 0xf0, 0x12, 0x00,
34742    0x36, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35,
34743 -  0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0xff, 0xf0, 0xfd, 0xe4, 0xff, 0x12, 0x16, 0x4c, 0xe5, 0x15,
34744 +  0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0xff, 0xf0, 0xfd, 0xe4, 0xff, 0x12, 0x16, 0x47, 0xe5, 0x15,
34745    0x24, 0x2c, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x15, 0x24, 0x2b}},
34746   {0x0406, 64, { 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x1b,
34747    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x0e, 0xe5, 0x15, 0x24, 0x25, 0xf5, 0x82,
34748    0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x28, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35,
34749 -  0x14, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xff, 0xf0, 0xfd, 0xe4, 0xff, 0x12, 0x16, 0x4c, 0xe5}},
34750 +  0x14, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xff, 0xf0, 0xfd, 0xe4, 0xff, 0x12, 0x16, 0x47, 0xe5}},
34751   {0x0446, 64, { 0x15, 0x24, 0x2b, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0xe5, 0x16, 0x42, 0x13,
34752    0xe5, 0x15, 0x24, 0x1c, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x70, 0x0e, 0xe5,
34753    0x15, 0x24, 0x25, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x2a, 0x90, 0x78, 0x41,
34754 @@ -100,12 +104,12 @@
34755    0xe0, 0x44, 0x40, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5}},
34756   {0x04c6, 64, { 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24, 0x1e,
34757    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x28, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82,
34758 -  0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfe, 0xff, 0xf0, 0xfd, 0xe4, 0xff, 0x12, 0x16, 0x4c,
34759 +  0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfe, 0xff, 0xf0, 0xfd, 0xe4, 0xff, 0x12, 0x16, 0x47,
34760    0xe5, 0x15, 0x24, 0x2d, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0xe5}},
34761   {0x0506, 64, { 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x1f, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x0e,
34762    0xe5, 0x15, 0x24, 0x25, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x27, 0xe5, 0x15,
34763    0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x01, 0xff, 0xf0, 0xfd, 0xe4,
34764 -  0xff, 0x12, 0x16, 0x4c, 0xe5, 0x15, 0x24, 0x2d, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83}},
34765 +  0xff, 0x12, 0x16, 0x47, 0xe5, 0x15, 0x24, 0x2d, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83}},
34766   {0x0546, 64, { 0xe4, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x20, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
34767    0xe0, 0x70, 0x0e, 0xe5, 0x15, 0x24, 0x25, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60,
34768    0x18, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0, 0xe5, 0x15, 0x24, 0x36, 0xf5, 0x82, 0xe4, 0x35, 0x14,
34769 @@ -115,12 +119,12 @@
34770    0x83, 0xe0, 0x60, 0x1f, 0xe5, 0x15, 0x24, 0x2e, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74,
34771    0x01, 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0}},
34772   {0x05c6, 64, { 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x23, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60,
34773 -  0x03, 0x12, 0x18, 0x91, 0xe5, 0x15, 0x24, 0x24, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0,
34774 +  0x03, 0x12, 0x18, 0x85, 0xe5, 0x15, 0x24, 0x24, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0,
34775    0x60, 0x1b, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x08,
34776    0xf0, 0x90, 0x7f, 0x98, 0xe0, 0xff, 0xe5, 0x16, 0xf4, 0xfe, 0xef, 0x5e, 0xf0, 0xe5, 0x15}},
34777   {0x0606, 64, { 0x24, 0x25, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x16, 0xe5, 0x15, 0x24, 0x31, 0xf5,
34778    0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xf7, 0xf0, 0x90, 0x7f, 0x98, 0xe0, 0x45, 0x16,
34779 -  0xf0, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x12, 0x08, 0x07, 0x83, 0x00, 0x07, 0xf7, 0x01, 0x08,
34780 +  0xf0, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x12, 0x03, 0x07, 0x83, 0x00, 0x07, 0xf7, 0x01, 0x08,
34781    0x63, 0x03, 0x06, 0x4c, 0x06, 0x07, 0x74, 0x08, 0x07, 0x68, 0x09, 0x07, 0x50, 0x0a, 0x07}},
34782   {0x0646, 64, { 0x5f, 0x0b, 0x00, 0x00, 0x08, 0xb2, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x1c, 0x14, 0x70, 0x03,
34783    0x02, 0x06, 0xfe, 0x24, 0x02, 0x60, 0x03, 0x02, 0x07, 0x46, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0,
34784 @@ -133,14 +137,14 @@
34785   {0x06c6, 64, { 0xfe, 0x90, 0x7f, 0xee, 0xe0, 0x7c, 0x00, 0x24, 0x00, 0xf5, 0x19, 0xec, 0x3e, 0xf5, 0x18, 0x75, 0x33,
34786    0x19, 0x75, 0x34, 0x12, 0x75, 0x82, 0x14, 0x75, 0x83, 0x19, 0xe0, 0x75, 0x27, 0x00, 0xf5, 0x28,
34787    0xd3, 0xe5, 0x28, 0x95, 0x19, 0xe5, 0x27, 0x95, 0x18, 0x40, 0x06, 0x85, 0x18, 0x27, 0x85, 0x19,
34788 -  0x28, 0x12, 0x13, 0x17, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x14, 0x30}},
34789 +  0x28, 0x12, 0x13, 0x12, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x14, 0x2b}},
34790   {0x0706, 64, { 0xea, 0x49, 0x60, 0x32, 0x90, 0x7f, 0xee, 0xe0, 0x75, 0x18, 0x00, 0xf5, 0x19, 0xae, 0x02, 0xaf, 0x01,
34791    0x8e, 0x33, 0x8f, 0x34, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xfe, 0xa3, 0xe0, 0x8e, 0x27, 0xf5, 0x28,
34792    0xd3, 0x95, 0x19, 0xe5, 0x27, 0x95, 0x18, 0x40, 0x06, 0x85, 0x18, 0x27, 0x85, 0x19, 0x28, 0x12,
34793 -  0x13, 0x17, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x08, 0xb9}},
34794 +  0x13, 0x12, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x08, 0xb9}},
34795   {0x0746, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0x00, 0xe5, 0x25, 0xf0, 0x90,
34796    0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x25, 0x02, 0x08,
34797 -  0xb9, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x22, 0x12, 0x0a, 0xbd, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0x00,
34798 +  0xb9, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x22, 0x12, 0x0a, 0xb8, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0x00,
34799    0xe5, 0x22, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xe8}},
34800   {0x0786, 64, { 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x00, 0xe4, 0x33, 0xff,
34801    0x25, 0xe0, 0xff, 0xa2, 0x06, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90,
34802 @@ -162,266 +166,266 @@
34803    0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0,
34804    0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
34805    0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0xe5, 0x11, 0x54, 0x0f, 0x70}},
34806 - {0x08c6, 64, { 0x03, 0x02, 0x09, 0xb2, 0x12, 0x16, 0xaa, 0xef, 0x20, 0xe1, 0x75, 0x12, 0x17, 0x08, 0xef, 0x14, 0xf5,
34807 -  0x19, 0x12, 0x18, 0xd8, 0xef, 0x25, 0x19, 0xff, 0xe4, 0x33, 0xfe, 0xc3, 0xef, 0x94, 0x80, 0xee,
34808 + {0x08c6, 64, { 0x03, 0x02, 0x09, 0xb2, 0x12, 0x16, 0xa5, 0xef, 0x20, 0xe1, 0x75, 0x12, 0x17, 0x03, 0xef, 0x14, 0xf5,
34809 +  0x19, 0x12, 0x18, 0xcc, 0xef, 0x25, 0x19, 0xff, 0xe4, 0x33, 0xfe, 0xc3, 0xef, 0x94, 0x80, 0xee,
34810    0x64, 0x80, 0x94, 0x80, 0x50, 0x59, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xe0, 0xfe, 0xa3, 0xe0,
34811    0xff, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0x30, 0xe0, 0x11, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82}},
34812   {0x0906, 64, { 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82,
34813    0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0xf0, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4,
34814    0x35, 0x14, 0xf5, 0x83, 0xe0, 0x20, 0xe2, 0x12, 0xe5, 0x19, 0x60, 0x0e, 0xf5, 0x23, 0xef, 0x24,
34815 -  0x01, 0xf5, 0x2d, 0xe4, 0x3e, 0xf5, 0x2c, 0x12, 0x14, 0xb2, 0xe4, 0xff, 0x12, 0x14, 0xe8}},
34816 +  0x01, 0xf5, 0x2d, 0xe4, 0x3e, 0xf5, 0x2c, 0x12, 0x14, 0xad, 0xe4, 0xff, 0x12, 0x14, 0xe3}},
34817   {0x0946, 64, { 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe7, 0x5d, 0x12, 0x18,
34818 -  0xd8, 0xe5, 0x15, 0x24, 0x3b, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xfe, 0xef, 0xc3,
34819 +  0xcc, 0xe5, 0x15, 0x24, 0x3b, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xfe, 0xef, 0xc3,
34820    0x9e, 0x50, 0x48, 0xe5, 0x15, 0x24, 0x2f, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01,
34821    0xf0, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7b}},
34822   {0x0986, 64, { 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x16, 0x42,
34823    0x13, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x10, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35,
34824 -  0x14, 0xf5, 0x83, 0xe0, 0xf5, 0x24, 0x80, 0x03, 0x12, 0x12, 0xa6, 0x12, 0x16, 0xd9, 0xef, 0x30,
34825 -  0xe1, 0x03, 0x02, 0x0a, 0xbc, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5}},
34826 - {0x09c6, 64, { 0x83, 0xe0, 0x54, 0x80, 0xf0, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xc0,
34827 -  0x83, 0xc0, 0x82, 0xe0, 0xfe, 0x12, 0x18, 0xe4, 0xee, 0x4f, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x12,
34828 -  0x17, 0xde, 0x8f, 0x19, 0xe5, 0x15, 0x24, 0x35, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0,
34829 -  0xfe, 0xef, 0xc3, 0x9e, 0x50, 0x28, 0x12, 0x18, 0xc0, 0xef, 0x30, 0xe0, 0x21, 0xe5, 0x15}},
34830 - {0x0a06, 64, { 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x20, 0xe7, 0x12, 0xe5, 0x15, 0x24, 0x31,
34831 -  0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x20, 0xe1, 0x03, 0x02, 0x0a, 0xbc, 0xe5, 0x15,
34832 -  0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x19, 0x70,
34833 -  0x0e, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0x22}},
34834 - {0x0a46, 64, { 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x30, 0xe7, 0x29, 0xe5,
34835 -  0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x23, 0x85, 0x15, 0x82, 0x85,
34836 -  0x14, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0x8c, 0x2c, 0xf5, 0x2d, 0x12, 0x13, 0xe2, 0xe5,
34837 -  0x19, 0x25, 0xe0, 0xff, 0x12, 0x15, 0x1e, 0x22, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03}},
34838 - {0x0a86, 64, { 0x75, 0x19, 0x3f, 0x85, 0x19, 0x23, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0xe0, 0xfe, 0xa3,
34839 -  0xe0, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0xe0,
34840 -  0xfe, 0xa3, 0xe0, 0x24, 0x01, 0xf5, 0x2d, 0xe4, 0x3e, 0xf5, 0x2c, 0x12, 0x14, 0x71, 0xe5, 0x19,
34841 -  0x04, 0xff, 0x12, 0x15, 0x1e, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74}},
34842 - {0x0ac6, 64, { 0xf0, 0xf0, 0x90, 0x7f, 0x96, 0xf0, 0xe4, 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x78, 0x4a, 0x04, 0xf0, 0xf5,
34843 -  0x8e, 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98,
34844 -  0x74, 0x1f, 0xf0, 0x90, 0x78, 0x43, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90, 0x7f,
34845 -  0xdf, 0x74, 0x9f, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0}},
34846 - {0x0b06, 64, { 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75,
34847 -  0x16, 0x01, 0x12, 0x0f, 0x17, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90,
34848 -  0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35,
34849 -  0x14, 0xf5, 0x83, 0xe4, 0xf0, 0x7e, 0x7e, 0x7f, 0x40, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83}},
34850 - {0x0b46, 64, { 0x74, 0x7e, 0xf0, 0xa3, 0x74, 0x40, 0xf0, 0x7e, 0x7e, 0x7f, 0x80, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83,
34851 -  0xa3, 0xa3, 0x74, 0x7e, 0xf0, 0xa3, 0x74, 0x80, 0xf0, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c,
34852 -  0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x0f, 0x17, 0x7e,
34853 -  0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0}},
34854 - {0x0b86, 64, { 0x75, 0x16, 0x02, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01, 0xf0,
34855 -  0x7e, 0x7d, 0x7f, 0xc0, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0x74, 0x7d, 0xf0, 0xa3, 0x74, 0xc0,
34856 -  0xf0, 0x7e, 0x7e, 0x7f, 0x00, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0x74, 0x7e, 0xf0,
34857 -  0xa3, 0x74, 0x00, 0xf0, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90}},
34858 - {0x0bc6, 64, { 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0x12, 0x0f, 0x17, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14,
34859 -  0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0xe5, 0x15, 0x24,
34860 -  0x26, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x02, 0xf0, 0x7e, 0x7d, 0x7f, 0x40, 0x85,
34861 -  0x15, 0x82, 0x85, 0x14, 0x83, 0x74, 0x7d, 0xf0, 0xa3, 0x74, 0x40, 0xf0, 0x7e, 0x7d, 0x7f}},
34862 - {0x0c06, 64, { 0x80, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0x74, 0x7d, 0xf0, 0xa3, 0x74, 0x80, 0xf0, 0x7e,
34863 -  0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75,
34864 -  0x16, 0x08, 0x12, 0x0f, 0x17, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90,
34865 -  0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4}},
34866 - {0x0c46, 64, { 0x35, 0x14, 0xf5, 0x83, 0x74, 0x03, 0xf0, 0x7e, 0x7c, 0x7f, 0xc0, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83,
34867 -  0x74, 0x7c, 0xf0, 0xa3, 0x74, 0xc0, 0xf0, 0x7e, 0x7d, 0x7f, 0x00, 0x85, 0x15, 0x82, 0x85, 0x14,
34868 -  0x83, 0xa3, 0xa3, 0x74, 0x7d, 0xf0, 0xa3, 0x74, 0x00, 0xf0, 0xc2, 0x0a, 0xc2, 0x09, 0xd2, 0x02,
34869 -  0x22, 0xe5, 0x10, 0x04, 0x54, 0x03, 0xf5, 0x10, 0x14, 0x60, 0x1f, 0x14, 0x60, 0x31, 0x14}},
34870 - {0x0c86, 64, { 0x60, 0x43, 0x24, 0x03, 0x70, 0x52, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90,
34871 -  0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0x80, 0x3d, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14,
34872 -  0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x80, 0x28, 0x7e,
34873 +  0x14, 0xf5, 0x83, 0xe0, 0xf5, 0x24, 0x80, 0x03, 0x12, 0x12, 0xa1, 0x12, 0x16, 0xd4, 0xef, 0x30,
34874 +  0xe1, 0x03, 0x02, 0x0a, 0xb7, 0x12, 0x17, 0xd2, 0x8f, 0x19, 0x12, 0x18, 0xd8, 0xe5, 0x15}},
34875 + {0x09c6, 64, { 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x15, 0x24, 0x35, 0xf5, 0x82,
34876 +  0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x19, 0xc3, 0x9f, 0x50, 0x28, 0x12, 0x18, 0xb4,
34877 +  0xef, 0x30, 0xe0, 0x21, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0,
34878 +  0x20, 0xe7, 0x12, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0}},
34879 + {0x0a06, 64, { 0x20, 0xe1, 0x03, 0x02, 0x0a, 0xb7, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
34880 +  0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x19, 0x70, 0x03, 0x02, 0x0a, 0xb7, 0xb4, 0x80, 0x0f, 0xe5, 0x15,
34881 +  0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x15, 0x24,
34882 +  0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x30, 0xe7, 0x29, 0xe5, 0x19}},
34883 + {0x0a46, 64, { 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x23, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83,
34884 +  0xa3, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0x8c, 0x2c, 0xf5, 0x2d, 0x12, 0x13, 0xdd, 0xe5, 0x19, 0x25,
34885 +  0xe0, 0xff, 0x12, 0x15, 0x19, 0x22, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f,
34886 +  0x85, 0x19, 0x23, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0}},
34887 + {0x0a86, 64, { 0xff, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xf5, 0x82, 0x8c, 0x83,
34888 +  0xef, 0xf0, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0x24, 0x01,
34889 +  0xf5, 0x2d, 0xe4, 0x3e, 0xf5, 0x2c, 0x12, 0x14, 0x6c, 0xe5, 0x19, 0x04, 0xff, 0x12, 0x15, 0x19,
34890 +  0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xf0, 0xf0, 0x90, 0x7f, 0x96}},
34891 + {0x0ac6, 64, { 0xf0, 0xe4, 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x78, 0x4a, 0x04, 0xf0, 0xf5, 0x8e, 0x90, 0x7f, 0x95, 0x74,
34892 +  0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x1f, 0xf0, 0x90, 0x78,
34893 +  0x43, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90, 0x7f, 0xdf, 0x74, 0x9f, 0xf0, 0x90,
34894 +  0x7f, 0xde, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0, 0x7e, 0x7b, 0x7f, 0xc0, 0x75}},
34895 + {0x0b06, 64, { 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0x12, 0x0f, 0x12,
34896 +  0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0,
34897 +  0x75, 0x16, 0x01, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0,
34898 +  0x7e, 0x7e, 0x7f, 0x40, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0x74, 0x7e, 0xf0, 0xa3, 0x74}},
34899 + {0x0b46, 64, { 0x40, 0xf0, 0x7e, 0x7e, 0x7f, 0x80, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0x74, 0x7e, 0xf0,
34900 +  0xa3, 0x74, 0x80, 0xf0, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f,
34901 +  0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x0f, 0x12, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14,
34902 +  0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0xe5, 0x15}},
34903 + {0x0b86, 64, { 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x7e, 0x7d, 0x7f, 0xc0, 0x85,
34904 +  0x15, 0x82, 0x85, 0x14, 0x83, 0x74, 0x7d, 0xf0, 0xa3, 0x74, 0xc0, 0xf0, 0x7e, 0x7e, 0x7f, 0x00,
34905 +  0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0x74, 0x7e, 0xf0, 0xa3, 0x74, 0x00, 0xf0, 0x7e,
34906    0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0}},
34907 - {0x0cc6, 64, { 0x75, 0x16, 0x04, 0x80, 0x13, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f,
34908 -  0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0xe5, 0x32, 0x55, 0x16, 0x70, 0x03, 0x02, 0x0e, 0x16,
34909 -  0xe5, 0x16, 0xf4, 0xff, 0x52, 0x32, 0xe5, 0x26, 0x54, 0x7f, 0xfe, 0x70, 0x0f, 0xe5, 0x2a, 0x55,
34910 -  0x16, 0x60, 0x24, 0x90, 0x7f, 0x98, 0xe0, 0x45, 0x16, 0xf0, 0x80, 0x1b, 0xbe, 0x20, 0x18}},
34911 - {0x0d06, 64, { 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe3, 0x09, 0xe4, 0xf5,
34912 -  0x2a, 0x90, 0x7f, 0x98, 0xe0, 0x5f, 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14,
34913 -  0xf5, 0x83, 0xe0, 0x60, 0x03, 0xe0, 0x14, 0xf0, 0xe5, 0x15, 0x24, 0x34, 0xf5, 0x82, 0xe4, 0x35,
34914 -  0x14, 0xf5, 0x83, 0xe0, 0x60, 0x03, 0xe0, 0x14, 0xf0, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0x16}},
34915 - {0x0d46, 64, { 0x74, 0x0a, 0xf0, 0x12, 0x00, 0x36, 0xef, 0x54, 0x01, 0xff, 0xf5, 0x19, 0xe5, 0x15, 0x24, 0x2c, 0xf5,
34916 -  0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x6f, 0x60, 0x07, 0xe5, 0x19, 0xf0, 0xe5, 0x16, 0x42,
34917 -  0x13, 0x12, 0x18, 0xf0, 0x8f, 0x19, 0xe5, 0x15, 0x24, 0x27, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
34918 -  0x83, 0xe0, 0xff, 0xe5, 0x19, 0x54, 0x10, 0xfe, 0x6f, 0x60, 0x06, 0xee, 0xf0, 0xe5, 0x16}},
34919 - {0x0d86, 64, { 0x42, 0x13, 0xe5, 0x15, 0x24, 0x28, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x19,
34920 -  0x54, 0x80, 0xfe, 0x6f, 0x60, 0x06, 0xee, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x29,
34921 -  0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x19, 0x54, 0x20, 0xfe, 0x6f, 0x60,
34922 -  0x15, 0xee, 0xf0, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0}},
34923 - {0x0dc6, 64, { 0x30, 0xe4, 0x04, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x12, 0x55, 0x16, 0xff, 0xf5, 0x19, 0xe5, 0x15, 0x24,
34924 -  0x2a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x6f, 0x60, 0x16, 0xe5, 0x19, 0xf0, 0xe5,
34925 -  0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe5, 0x04, 0xe5, 0x16,
34926 -  0x42, 0x13, 0xe5, 0x17, 0x55, 0x16, 0xff, 0xf5, 0x19, 0xe5, 0x15, 0x24, 0x30, 0xf5, 0x82}},
34927 - {0x0e06, 64, { 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x6f, 0x60, 0x07, 0xe5, 0x19, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0x22,
34928 -  0x30, 0x09, 0x03, 0x02, 0x0f, 0x16, 0xe5, 0x24, 0x14, 0x60, 0x2a, 0x14, 0x60, 0x41, 0x14, 0x60,
34929 -  0x58, 0x14, 0x60, 0x6f, 0x24, 0x04, 0x60, 0x03, 0x02, 0x0e, 0xd4, 0x7e, 0x7b, 0x7f, 0xc0, 0x75,
34930 -  0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0x12}},
34931 - {0x0e46, 64, { 0x12, 0xa6, 0x75, 0x24, 0x01, 0x22, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90,
34932 -  0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x12, 0xa6, 0x75, 0x24, 0x02, 0x22, 0x7e,
34933 -  0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75,
34934 -  0x16, 0x04, 0x12, 0x12, 0xa6, 0x75, 0x24, 0x03, 0x22, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14}},
34935 - {0x0e86, 64, { 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x12, 0xa6, 0x75,
34936 -  0x24, 0x04, 0x22, 0x30, 0x04, 0x33, 0xc2, 0x04, 0x53, 0x13, 0xdf, 0xe4, 0xf5, 0x19, 0x7e, 0x00,
34937 -  0x7b, 0x00, 0x74, 0x2e, 0x25, 0x19, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x11, 0xb0, 0xff, 0x74,
34938 -  0x80, 0x25, 0x19, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x19, 0xe5}},
34939 - {0x0ec6, 64, { 0x19, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0x75, 0x24, 0x05, 0x22, 0xe5, 0x36, 0x60,
34940 -  0x3b, 0xd5, 0x36, 0x0a, 0x53, 0x13, 0xef, 0x30, 0x0a, 0x04, 0xd2, 0x09, 0xc2, 0x0a, 0xe4, 0xf5,
34941 -  0x19, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x35, 0x25, 0x19, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x11,
34942 -  0xb0, 0xff, 0x74, 0x80, 0x25, 0x19, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0}},
34943 - {0x0f06, 64, { 0x05, 0x19, 0xe5, 0x19, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x24, 0x22,
34944 -  0xe4, 0xf5, 0x1a, 0x7e, 0x00, 0x7b, 0x01, 0xe5, 0x15, 0x25, 0x1a, 0xf9, 0xee, 0x35, 0x14, 0xfa,
34945 -  0xe4, 0x12, 0x11, 0xf6, 0x05, 0x1a, 0xe5, 0x1a, 0xb4, 0x3c, 0xe8, 0xe5, 0x15, 0x24, 0x35, 0xf5,
34946 -  0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0}},
34947 - {0x0f46, 64, { 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00,
34948 -  0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x16, 0x4c, 0x7f, 0x10, 0xe5, 0x15, 0x24, 0x33, 0xf5, 0x82,
34949 -  0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0, 0x12, 0x15, 0xbc, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0,
34950 -  0x7f, 0x01, 0xe5, 0x15, 0x24, 0x36, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0}},
34951 - {0x0f86, 64, { 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0xe5, 0x15, 0x24, 0x39, 0xf5,
34952 -  0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x80, 0xf0, 0x90, 0xc0, 0x00, 0xf0, 0x0f, 0xe4, 0xfd,
34953 -  0x12, 0x16, 0x4c, 0xe4, 0xff, 0x7e, 0xa3, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14,
34954 -  0xf5, 0x83, 0xee, 0xf0, 0xfd, 0x12, 0x16, 0x4c, 0x90, 0x78, 0x41, 0x74, 0x01, 0xf0, 0x90}},
34955 - {0x0fc6, 64, { 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x16, 0x4c, 0x7f, 0x01, 0x12, 0x15, 0x54, 0x7f,
34956 -  0x03, 0x7d, 0x07, 0x12, 0x16, 0x4c, 0x22, 0x53, 0x13, 0x3f, 0x90, 0x7b, 0xf1, 0xe0, 0x30, 0xe3,
34957 -  0x16, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef,
34958 -  0xf0, 0x75, 0x16, 0x01, 0x12, 0x08, 0xc1, 0x90, 0x7c, 0x31, 0xe0, 0x30, 0xe3, 0x16, 0x7e}},
34959 - {0x1006, 64, { 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16,
34960 -  0x02, 0x12, 0x08, 0xc1, 0x90, 0x7c, 0x71, 0xe0, 0x30, 0xe3, 0x16, 0x7e, 0x7c, 0x7f, 0x40, 0x75,
34961 -  0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0x12, 0x08,
34962 -  0xc1, 0x90, 0x7c, 0xb1, 0xe0, 0x30, 0xe3, 0x16, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c}},
34963 - {0x1046, 64, { 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x08, 0xc1, 0x05, 0x11,
34964 -  0xe5, 0x11, 0x54, 0x0f, 0xf5, 0x18, 0x70, 0x1f, 0x90, 0x78, 0x41, 0xe0, 0x54, 0xf7, 0xf0, 0x90,
34965 -  0x7f, 0x99, 0xe0, 0xf5, 0x17, 0x90, 0x78, 0x41, 0xe0, 0x44, 0x08, 0xf0, 0x90, 0x7f, 0x99, 0xe0,
34966 -  0xf4, 0xf5, 0x12, 0x12, 0x11, 0x26, 0x22, 0xe5, 0x18, 0xb4, 0x01, 0x04, 0x12, 0x0c, 0x78}},
34967 - {0x1086, 64, { 0x22, 0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x08, 0xe5, 0x13, 0x60, 0x04, 0x12, 0x0e, 0x17, 0x22, 0x12,
34968 -  0x0c, 0x78, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x37, 0x02, 0x10, 0xe1, 0x02,
34969 -  0x12, 0x2e, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08,
34970 -  0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33}},
34971 - {0x10c6, 64, { 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4,
34972 -  0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x18, 0x5c, 0xe4, 0x7e, 0x01,
34973 -  0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3,
34974 -  0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3}},
34975 - {0x1106, 64, { 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0,
34976 -  0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0x90,
34977 -  0x7f, 0xd2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x11, 0xaf, 0xc2, 0x09, 0x90, 0x7b, 0x40, 0xe0, 0x14,
34978 -  0x60, 0x26, 0x14, 0x60, 0x3b, 0x14, 0x60, 0x50, 0x24, 0x83, 0x60, 0x64, 0x24, 0x80, 0x70}},
34979 - {0x1146, 64, { 0x63, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0,
34980 -  0x75, 0x16, 0x01, 0x12, 0x00, 0x46, 0x80, 0x4b, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75,
34981 -  0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x00, 0x46, 0x80, 0x33,
34982 -  0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf}},
34983 - {0x1186, 64, { 0xf0, 0x75, 0x16, 0x04, 0x12, 0x00, 0x46, 0x80, 0x1b, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75,
34984 -  0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x00, 0x46, 0x80, 0x03,
34985 -  0x12, 0x17, 0x8f, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83,
34986 -  0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83}},
34987 - {0x11c6, 64, { 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0,
34988 -  0x22, 0x50, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8,
34989 -  0xe2, 0x22, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb,
34990 -  0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01}},
34991 - {0x1206, 64, { 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3,
34992 -  0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68,
34993 -  0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x00, 0xe4,
34994 -  0x33, 0xfe, 0xef, 0x4e, 0xf0, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01}},
34995 - {0x1246, 64, { 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f,
34996 -  0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0x74, 0x0d,
34997 -  0xf0, 0xd2, 0xaf, 0xd2, 0x0b, 0x12, 0x18, 0x20, 0xc2, 0x01, 0xe4, 0xf5, 0x2b, 0xf5, 0x31, 0xc2,
34998 -  0x07, 0xc2, 0x02, 0x75, 0x29, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x26, 0x60, 0x06, 0x75}},
34999 - {0x1286, 64, { 0x32, 0x0f, 0xe0, 0xf5, 0x26, 0x30, 0x02, 0x03, 0x12, 0x0f, 0xde, 0x30, 0x01, 0x07, 0xc2, 0x01, 0x12,
35000 -  0x06, 0x29, 0x80, 0xe2, 0x30, 0x08, 0xdf, 0xc2, 0x08, 0x12, 0x18, 0x41, 0x80, 0xd8, 0x22, 0xe5,
35001 -  0x13, 0x55, 0x16, 0x60, 0x6a, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
35002 -  0xe0, 0x70, 0x5c, 0xe5, 0x16, 0xf4, 0x52, 0x13, 0xe5, 0x15, 0x24, 0x26, 0xff, 0xe4, 0x35}},
35003 - {0x12c6, 64, { 0x14, 0xfe, 0xe4, 0xfd, 0x0f, 0xef, 0xaa, 0x06, 0x70, 0x01, 0x0e, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xe0,
35004 -  0xfc, 0x74, 0x80, 0x2d, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xec, 0xf0, 0x0d, 0xbd, 0x0b,
35005 -  0xe2, 0x90, 0x7f, 0xc3, 0x74, 0x0b, 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14,
35006 -  0xf5, 0x83, 0x74, 0x10, 0xf0, 0xe5, 0x15, 0x24, 0x2e, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5}},
35007 - {0x1306, 64, { 0x83, 0xe4, 0xf0, 0xe5, 0x15, 0x24, 0x2f, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0x22,
35008 -  0xe5, 0x28, 0x45, 0x27, 0x60, 0x57, 0xae, 0x27, 0xaf, 0x28, 0xd3, 0xef, 0x94, 0x40, 0xee, 0x94,
35009 -  0x00, 0x40, 0x04, 0x7e, 0x00, 0x7f, 0x40, 0xc3, 0xe5, 0x28, 0x9f, 0xf5, 0x28, 0xe5, 0x27, 0x9e,
35010 -  0xf5, 0x27, 0xe4, 0xfd, 0xed, 0xc3, 0x9f, 0xe4, 0x9e, 0x50, 0x1f, 0x85, 0x34, 0x82, 0x85}},
35011 - {0x1346, 64, { 0x33, 0x83, 0xe0, 0xfc, 0x74, 0x00, 0x2d, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xec, 0xf0, 0x0d,
35012 -  0x05, 0x34, 0xe5, 0x34, 0x70, 0x02, 0x05, 0x33, 0x80, 0xda, 0x90, 0x7f, 0xa9, 0x74, 0x01, 0xf0,
35013 -  0x90, 0x7f, 0xac, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xef, 0xf0, 0x22, 0x90, 0x7f, 0xac,
35014 -  0xe0, 0x54, 0xfe, 0xf0, 0xe4, 0x90, 0x7f, 0xb5, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0}},
35015 - {0x1386, 64, { 0x90, 0x7f, 0x9c, 0x74, 0xf0, 0xf0, 0x90, 0x7f, 0x96, 0xf0, 0xe4, 0x90, 0x78, 0x4a, 0xf0, 0x90, 0x7f,
35016 -  0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x30, 0x00, 0x07,
35017 -  0xe5, 0x29, 0x54, 0xf0, 0xff, 0x80, 0x02, 0x7f, 0x00, 0xef, 0x44, 0x08, 0x90, 0x78, 0x41, 0xf0,
35018 -  0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0xff, 0xf0}},
35019 - {0x13c6, 64, { 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xf0, 0xf0, 0xe4, 0x90,
35020 -  0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0x54, 0xfd, 0xf0, 0x22, 0x8f, 0x1a, 0x05, 0x2d, 0xe5,
35021 -  0x2d, 0xae, 0x2c, 0x70, 0x02, 0x05, 0x2c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12,
35022 -  0x1a, 0x08, 0x05, 0x2d, 0xe5, 0x2d, 0xac, 0x2c, 0x70, 0x02, 0x05, 0x2c, 0x14, 0xf5, 0x82}},
35023 - {0x1406, 64, { 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x23, 0xe5, 0x23, 0x60, 0x1f, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4,
35024 -  0x35, 0x14, 0xf5, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfe, 0x12, 0x18, 0xe4, 0x8f, 0x1a, 0xee,
35025 -  0x4f, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x80, 0xb5, 0x22, 0x8f, 0x1a, 0xe4, 0xf5, 0x1b, 0x75, 0x1c,
35026 -  0xff, 0x75, 0x1d, 0x19, 0x75, 0x1e, 0x86, 0xab, 0x1c, 0xaa, 0x1d, 0xa9, 0x1e, 0x90, 0x00}},
35027 - {0x1446, 64, { 0x01, 0x12, 0x11, 0xc9, 0xb4, 0x03, 0x1d, 0xaf, 0x1b, 0x05, 0x1b, 0xef, 0xb5, 0x1a, 0x01, 0x22, 0x12,
35028 -  0x11, 0xb0, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1c, 0xff, 0xf5, 0x1d, 0x89,
35029 -  0x1e, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x22, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90,
35030 -  0x78, 0x4f, 0x74, 0xc0, 0xf0, 0xe4, 0x90, 0x78, 0x50, 0xf0, 0xe5, 0x2c, 0x90, 0x78, 0x51}},
35031 - {0x1486, 64, { 0xf0, 0xae, 0x2c, 0xe5, 0x2d, 0x90, 0x78, 0x52, 0xf0, 0x90, 0x78, 0x54, 0xe5, 0x23, 0xf0, 0x90, 0x78,
35032 -  0x57, 0x74, 0x04, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x10, 0xf0, 0xe0, 0x54, 0xf7, 0xf0, 0xe4,
35033 -  0x90, 0x78, 0x55, 0xf0, 0x90, 0x78, 0x55, 0xe0, 0x60, 0xfa, 0x22, 0xe4, 0x90, 0x78, 0x41, 0xf0,
35034 -  0xe5, 0x2c, 0x90, 0x78, 0x4f, 0xf0, 0xae, 0x2c, 0xe5, 0x2d, 0x90, 0x78, 0x50, 0xf0, 0x90}},
35035 - {0x14c6, 64, { 0x78, 0x51, 0x74, 0xc0, 0xf0, 0xe4, 0x90, 0x78, 0x52, 0xf0, 0x90, 0x78, 0x54, 0xe5, 0x23, 0xf0, 0x90,
35036 -  0x78, 0x57, 0x74, 0x04, 0xf0, 0xe4, 0x90, 0x78, 0x55, 0xf0, 0x90, 0x78, 0x55, 0xe0, 0x60, 0xfa,
35037 -  0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0f,
35038 -  0x14, 0x60, 0x13, 0x14, 0x60, 0x17, 0x80, 0x00, 0x90, 0x7f, 0xc7, 0xef, 0xf0, 0x80, 0x13}},
35039 - {0x1506, 64, { 0x90, 0x7f, 0xc9, 0xef, 0xf0, 0x80, 0x0c, 0x90, 0x7f, 0xcb, 0xef, 0xf0, 0x80, 0x05, 0x90, 0x7f, 0xcd,
35040 -  0xef, 0xf0, 0xe5, 0x16, 0x42, 0x2a, 0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14,
35041 -  0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0f, 0x14, 0x60, 0x13, 0x14, 0x60, 0x17, 0x80, 0x00, 0x90, 0x7f,
35042 -  0xb7, 0xef, 0xf0, 0x80, 0x13, 0x90, 0x7f, 0xb9, 0xef, 0xf0, 0x80, 0x0c, 0x90, 0x7f, 0xbb}},
35043 - {0x1546, 64, { 0xef, 0xf0, 0x80, 0x05, 0x90, 0x7f, 0xbd, 0xef, 0xf0, 0xe5, 0x16, 0x42, 0x2a, 0x22, 0xae, 0x07, 0xe4,
35044 -  0xff, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0xfd,
35045 -  0x12, 0x16, 0x4c, 0x90, 0x78, 0x41, 0x74, 0x01, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5,
35046 -  0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x80, 0xfd, 0x12}},
35047 - {0x1586, 64, { 0x16, 0x4c, 0x22, 0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86,
35048 -  0x75, 0x86, 0x00, 0xc0, 0xd0, 0x75, 0xd0, 0x08, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x01,
35049 -  0xf0, 0x12, 0x13, 0x17, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83,
35050 -  0xd0, 0xf0, 0xd0, 0xe0, 0x32, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74}},
35051 - {0x15c6, 64, { 0xbf, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74,
35052 -  0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f,
35053 -  0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
35054 -  0xf0, 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41}},
35055 - {0x1606, 64, { 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f,
35056 -  0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
35057 -  0xf0, 0x90, 0x78, 0x41, 0x74, 0x06, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74,
35058 -  0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54}},
35059 - {0x1646, 64, { 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5,
35060 -  0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41,
35061 -  0x74, 0x07, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x05, 0xf0, 0x90, 0xc0,
35062 -  0x00, 0xed, 0xf0, 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf}},
35063 - {0x1686, 64, { 0xf0, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0,
35064 -  0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0,
35065 -  0x00, 0xf0, 0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14,
35066 -  0x60, 0x0e, 0x14, 0x60, 0x11, 0x14, 0x60, 0x14, 0x80, 0x00, 0x90, 0x7f, 0xc6, 0xe0, 0xff}},
35067 - {0x16c6, 64, { 0x22, 0x90, 0x7f, 0xc8, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xca, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xcc, 0xe0,
35068 -  0xff, 0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60,
35069 -  0x0e, 0x14, 0x60, 0x11, 0x14, 0x60, 0x14, 0x80, 0x00, 0x90, 0x7f, 0xb6, 0xe0, 0xff, 0x22, 0x90,
35070 -  0x7f, 0xb8, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xba, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xbc, 0xe0}},
35071 - {0x1706, 64, { 0xff, 0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0e,
35072 -  0x14, 0x60, 0x11, 0x14, 0x60, 0x14, 0x80, 0x00, 0x90, 0x7f, 0xc7, 0xe0, 0xff, 0x22, 0x90, 0x7f,
35073 -  0xc9, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xcb, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xcd, 0xe0, 0xff, 0x22,
35074 -  0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00}},
35075 - {0x1746, 64, { 0x30, 0x05, 0x04, 0xc2, 0x05, 0x80, 0x02, 0xd2, 0x08, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08,
35076 -  0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0,
35077 -  0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4,
35078 -  0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84}},
35079 - {0x1786, 64, { 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7b, 0x41, 0xe0, 0xf5, 0x36, 0x43, 0x13,
35080 -  0x10, 0xa3, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0x90, 0x7b,
35081 -  0x43, 0xe0, 0xf5, 0x37, 0xa3, 0xe0, 0x54, 0xf0, 0xf5, 0x29, 0xe0, 0x60, 0x02, 0xd2, 0x0a, 0x22,
35082 -  0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00}},
35083 - {0x17c6, 64, { 0xd2, 0x01, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85,
35084 -  0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x12, 0x18, 0xcc, 0xae, 0x07, 0x12, 0x18, 0xcc, 0xad,
35085 -  0x07, 0xee, 0x6d, 0x60, 0x10, 0x12, 0x18, 0xcc, 0xae, 0x07, 0xee, 0x6d, 0x60, 0x07, 0x12, 0x18,
35086 -  0xcc, 0xad, 0x07, 0x80, 0xec, 0xaf, 0x06, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5}},
35087 - {0x1806, 64, { 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0,
35088 -  0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x04, 0xf0,
35089 -  0xe0, 0x44, 0x08, 0xf0, 0x30, 0x0b, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12,
35090 -  0x18, 0x77, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0x22, 0x12, 0x13, 0x81, 0x12, 0x18}},
35091 - {0x1846, 64, { 0x10, 0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0x0a, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x18, 0x77, 0x12, 0x18,
35092 -  0xaa, 0x12, 0x0a, 0xbd, 0x22, 0x03, 0x35, 0x80, 0x00, 0x00, 0x03, 0x2e, 0x81, 0x00, 0x00, 0xc1,
35093 -  0x85, 0xc1, 0x81, 0xc1, 0x08, 0xc1, 0x00, 0xc1, 0x06, 0x01, 0x22, 0x00, 0x01, 0x24, 0x00, 0x00,
35094 -  0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e}},
35095 - {0x1886, 64, { 0x60, 0x08, 0x12, 0x17, 0xff, 0x12, 0x17, 0xff, 0x80, 0xeb, 0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82,
35096 -  0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x04, 0xff, 0x44, 0x10, 0x90, 0x7f, 0xd7, 0xf0, 0xef, 0x44,
35097 -  0x30, 0xf0, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x0d, 0x7e, 0x00, 0x12, 0x18,
35098 -  0x77, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0}},
35099 - {0x18c6, 64, { 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff,
35100 -  0x22, 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x78, 0x41,
35101 -  0x74, 0x05, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x78, 0x41, 0x74, 0x06, 0xf0, 0x90,
35102 -  0xc0, 0x00, 0xe0, 0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
35103 + {0x0bc6, 64, { 0x75, 0x16, 0x04, 0x12, 0x0f, 0x12, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90,
35104 +  0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35,
35105 +  0x14, 0xf5, 0x83, 0x74, 0x02, 0xf0, 0x7e, 0x7d, 0x7f, 0x40, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83,
35106 +  0x74, 0x7d, 0xf0, 0xa3, 0x74, 0x40, 0xf0, 0x7e, 0x7d, 0x7f, 0x80, 0x85, 0x15, 0x82, 0x85}},
35107 + {0x0c06, 64, { 0x14, 0x83, 0xa3, 0xa3, 0x74, 0x7d, 0xf0, 0xa3, 0x74, 0x80, 0xf0, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14,
35108 +  0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x0f, 0x12,
35109 +  0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0,
35110 +  0x75, 0x16, 0x08, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74}},
35111 + {0x0c46, 64, { 0x03, 0xf0, 0x7e, 0x7c, 0x7f, 0xc0, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0x74, 0x7c, 0xf0, 0xa3, 0x74,
35112 +  0xc0, 0xf0, 0x7e, 0x7d, 0x7f, 0x00, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0x74, 0x7d,
35113 +  0xf0, 0xa3, 0x74, 0x00, 0xf0, 0xc2, 0x0a, 0xc2, 0x09, 0xd2, 0x02, 0x22, 0xe5, 0x10, 0x04, 0x54,
35114 +  0x03, 0xf5, 0x10, 0x14, 0x60, 0x1f, 0x14, 0x60, 0x31, 0x14, 0x60, 0x43, 0x24, 0x03, 0x70}},
35115 + {0x0c86, 64, { 0x52, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0,
35116 +  0x75, 0x16, 0x01, 0x80, 0x3d, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90,
35117 +  0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x80, 0x28, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14,
35118 +  0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0x80, 0x13}},
35119 + {0x0cc6, 64, { 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75,
35120 +  0x16, 0x08, 0xe5, 0x32, 0x55, 0x16, 0x70, 0x03, 0x02, 0x0e, 0x11, 0xe5, 0x16, 0xf4, 0xff, 0x52,
35121 +  0x32, 0xe5, 0x26, 0x54, 0x7f, 0xfe, 0x70, 0x0f, 0xe5, 0x2a, 0x55, 0x16, 0x60, 0x24, 0x90, 0x7f,
35122 +  0x98, 0xe0, 0x45, 0x16, 0xf0, 0x80, 0x1b, 0xbe, 0x20, 0x18, 0xe5, 0x15, 0x24, 0x31, 0xf5}},
35123 + {0x0d06, 64, { 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe3, 0x09, 0xe4, 0xf5, 0x2a, 0x90, 0x7f, 0x98, 0xe0,
35124 +  0x5f, 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x03,
35125 +  0xe0, 0x14, 0xf0, 0xe5, 0x15, 0x24, 0x34, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60,
35126 +  0x03, 0xe0, 0x14, 0xf0, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0x11, 0x74, 0x0a, 0xf0, 0x12, 0x00}},
35127 + {0x0d46, 64, { 0x36, 0xef, 0x54, 0x01, 0xff, 0xf5, 0x19, 0xe5, 0x15, 0x24, 0x2c, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
35128 +  0x83, 0xe0, 0x6f, 0x60, 0x07, 0xe5, 0x19, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0x12, 0x18, 0xe4, 0x8f,
35129 +  0x19, 0xe5, 0x15, 0x24, 0x27, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x19,
35130 +  0x54, 0x10, 0xfe, 0x6f, 0x60, 0x06, 0xee, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24}},
35131 + {0x0d86, 64, { 0x28, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x19, 0x54, 0x80, 0xfe, 0x6f, 0x60,
35132 +  0x06, 0xee, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x29, 0xf5, 0x82, 0xe4, 0x35, 0x14,
35133 +  0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x19, 0x54, 0x20, 0xfe, 0x6f, 0x60, 0x15, 0xee, 0xf0, 0xe5, 0x15,
35134 +  0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe4, 0x04, 0xe5, 0x16}},
35135 + {0x0dc6, 64, { 0x42, 0x13, 0xe5, 0x12, 0x55, 0x16, 0xff, 0xf5, 0x19, 0xe5, 0x15, 0x24, 0x2a, 0xf5, 0x82, 0xe4, 0x35,
35136 +  0x14, 0xf5, 0x83, 0xe0, 0x6f, 0x60, 0x16, 0xe5, 0x19, 0xf0, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82,
35137 +  0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe5, 0x04, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x17, 0x55,
35138 +  0x16, 0xff, 0xf5, 0x19, 0xe5, 0x15, 0x24, 0x30, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83}},
35139 + {0x0e06, 64, { 0xe0, 0x6f, 0x60, 0x07, 0xe5, 0x19, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0x22, 0x30, 0x09, 0x03, 0x02, 0x0f,
35140 +  0x11, 0xe5, 0x24, 0x14, 0x60, 0x2a, 0x14, 0x60, 0x41, 0x14, 0x60, 0x58, 0x14, 0x60, 0x6f, 0x24,
35141 +  0x04, 0x60, 0x03, 0x02, 0x0e, 0xcf, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0,
35142 +  0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0x12, 0x12, 0xa1, 0x75, 0x24, 0x01}},
35143 + {0x0e46, 64, { 0x22, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0,
35144 +  0x75, 0x16, 0x02, 0x12, 0x12, 0xa1, 0x75, 0x24, 0x02, 0x22, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14,
35145 +  0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0x12, 0x12, 0xa1,
35146 +  0x75, 0x24, 0x03, 0x22, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90}},
35147 + {0x0e86, 64, { 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x12, 0xa1, 0x75, 0x24, 0x04, 0x22, 0x30, 0x04,
35148 +  0x33, 0xc2, 0x04, 0x53, 0x13, 0xdf, 0xe4, 0xf5, 0x19, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2e, 0x25,
35149 +  0x19, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x11, 0xab, 0xff, 0x74, 0x80, 0x25, 0x19, 0xf5, 0x82,
35150 +  0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x19, 0xe5, 0x19, 0xb4, 0x03, 0xdb, 0x90}},
35151 + {0x0ec6, 64, { 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0x75, 0x24, 0x05, 0x22, 0xe5, 0x36, 0x60, 0x3b, 0xd5, 0x36, 0x0a, 0x53,
35152 +  0x13, 0xef, 0x30, 0x0a, 0x04, 0xd2, 0x09, 0xc2, 0x0a, 0xe4, 0xf5, 0x19, 0x7e, 0x00, 0x7b, 0x00,
35153 +  0x74, 0x35, 0x25, 0x19, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x11, 0xab, 0xff, 0x74, 0x80, 0x25,
35154 +  0x19, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x19, 0xe5, 0x19, 0xb4}},
35155 + {0x0f06, 64, { 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x24, 0x22, 0xe4, 0xf5, 0x1a, 0x7e, 0x00,
35156 +  0x7b, 0x01, 0xe5, 0x15, 0x25, 0x1a, 0xf9, 0xee, 0x35, 0x14, 0xfa, 0xe4, 0x12, 0x11, 0xf1, 0x05,
35157 +  0x1a, 0xe5, 0x1a, 0xb4, 0x3c, 0xe8, 0xe5, 0x15, 0x24, 0x35, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
35158 +  0x83, 0x74, 0x01, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5}},
35159 + {0x0f46, 64, { 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd,
35160 +  0x12, 0x16, 0x47, 0x7f, 0x10, 0xe5, 0x15, 0x24, 0x33, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
35161 +  0xef, 0xf0, 0x12, 0x15, 0xb7, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0, 0x7f, 0x01, 0xe5, 0x15, 0x24,
35162 +  0x36, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0, 0x44, 0x06, 0x90, 0xc0, 0x00}},
35163 + {0x0f86, 64, { 0xf0, 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
35164 +  0x83, 0x74, 0x80, 0xf0, 0x90, 0xc0, 0x00, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x16, 0x47, 0xe4, 0xff,
35165 +  0x7e, 0xa3, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xee, 0xf0, 0xfd,
35166 +  0x12, 0x16, 0x47, 0x90, 0x78, 0x41, 0x74, 0x01, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f}},
35167 + {0x0fc6, 64, { 0x05, 0x7d, 0x7f, 0x12, 0x16, 0x47, 0x7f, 0x01, 0x12, 0x15, 0x4f, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x16,
35168 +  0x47, 0x22, 0x53, 0x13, 0x3f, 0x90, 0x7b, 0xf1, 0xe0, 0x30, 0xe3, 0x16, 0x7e, 0x7b, 0x7f, 0xc0,
35169 +  0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0x12,
35170 +  0x08, 0xc1, 0x90, 0x7c, 0x31, 0xe0, 0x30, 0xe3, 0x16, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14}},
35171 + {0x1006, 64, { 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x08, 0xc1, 0x90,
35172 +  0x7c, 0x71, 0xe0, 0x30, 0xe3, 0x16, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40,
35173 +  0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0x12, 0x08, 0xc1, 0x90, 0x7c, 0xb1, 0xe0,
35174 +  0x30, 0xe3, 0x16, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f}},
35175 + {0x1046, 64, { 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x08, 0xc1, 0x05, 0x11, 0xe5, 0x11, 0x54, 0x0f, 0xf5,
35176 +  0x18, 0x70, 0x1f, 0x90, 0x78, 0x41, 0xe0, 0x54, 0xf7, 0xf0, 0x90, 0x7f, 0x99, 0xe0, 0xf5, 0x17,
35177 +  0x90, 0x78, 0x41, 0xe0, 0x44, 0x08, 0xf0, 0x90, 0x7f, 0x99, 0xe0, 0xf4, 0xf5, 0x12, 0x12, 0x11,
35178 +  0x21, 0x22, 0xe5, 0x18, 0xb4, 0x01, 0x04, 0x12, 0x0c, 0x73, 0x22, 0x90, 0x7f, 0xc2, 0xe0}},
35179 + {0x1086, 64, { 0x20, 0xe1, 0x08, 0xe5, 0x13, 0x60, 0x04, 0x12, 0x0e, 0x12, 0x22, 0x12, 0x0c, 0x73, 0x22, 0x78, 0x7f,
35180 +  0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x37, 0x02, 0x10, 0xdc, 0x02, 0x12, 0x29, 0xe4, 0x93, 0xa3,
35181 +  0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4,
35182 +  0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20}},
35183 + {0x10c6, 64, { 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04,
35184 +  0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x18, 0x50, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff,
35185 +  0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54,
35186 +  0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8}},
35187 + {0x1106, 64, { 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8,
35188 +  0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0x90, 0x7f, 0xd2, 0xe0, 0x30, 0xe1,
35189 +  0x03, 0x02, 0x11, 0xaa, 0xc2, 0x09, 0x90, 0x7b, 0x40, 0xe0, 0x14, 0x60, 0x26, 0x14, 0x60, 0x3b,
35190 +  0x14, 0x60, 0x50, 0x24, 0x83, 0x60, 0x64, 0x24, 0x80, 0x70, 0x63, 0x7e, 0x7b, 0x7f, 0xc0}},
35191 + {0x1146, 64, { 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0x12, 0x00,
35192 +  0x46, 0x80, 0x4b, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96,
35193 +  0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x00, 0x46, 0x80, 0x33, 0x7e, 0x7c, 0x7f, 0x40, 0x75,
35194 +  0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0x12}},
35195 + {0x1186, 64, { 0x00, 0x46, 0x80, 0x1b, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96,
35196 +  0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x00, 0x46, 0x80, 0x03, 0x12, 0x17, 0x5c, 0xe4, 0x90,
35197 +  0x7f, 0xd3, 0xf0, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7,
35198 +  0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01}},
35199 + {0x11c6, 64, { 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25,
35200 +  0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 0x29,
35201 +  0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a,
35202 +  0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0}},
35203 + {0x1206, 64, { 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01,
35204 +  0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3,
35205 +  0x80, 0xdf, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x00, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0,
35206 +  0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0}},
35207 + {0x1246, 64, { 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef,
35208 +  0x90, 0x7f, 0xaf, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0x74, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0x0b,
35209 +  0x12, 0x18, 0x14, 0xc2, 0x01, 0xe4, 0xf5, 0x2b, 0xf5, 0x31, 0xc2, 0x07, 0xc2, 0x02, 0x75, 0x29,
35210 +  0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x26, 0x60, 0x06, 0x75, 0x32, 0x0f, 0xe0, 0xf5, 0x26}},
35211 + {0x1286, 64, { 0x30, 0x02, 0x03, 0x12, 0x0f, 0xd9, 0x30, 0x01, 0x07, 0xc2, 0x01, 0x12, 0x06, 0x29, 0x80, 0xe2, 0x30,
35212 +  0x08, 0xdf, 0xc2, 0x08, 0x12, 0x18, 0x35, 0x80, 0xd8, 0x22, 0xe5, 0x13, 0x55, 0x16, 0x60, 0x6a,
35213 +  0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x5c, 0xe5, 0x16,
35214 +  0xf4, 0x52, 0x13, 0xe5, 0x15, 0x24, 0x26, 0xff, 0xe4, 0x35, 0x14, 0xfe, 0xe4, 0xfd, 0x0f}},
35215 + {0x12c6, 64, { 0xef, 0xaa, 0x06, 0x70, 0x01, 0x0e, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xe0, 0xfc, 0x74, 0x80, 0x2d, 0xf5,
35216 +  0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xec, 0xf0, 0x0d, 0xbd, 0x0b, 0xe2, 0x90, 0x7f, 0xc3, 0x74,
35217 +  0x0b, 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x10, 0xf0,
35218 +  0xe5, 0x15, 0x24, 0x2e, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x15}},
35219 + {0x1306, 64, { 0x24, 0x2f, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0x22, 0xe5, 0x28, 0x45, 0x27, 0x60,
35220 +  0x57, 0xae, 0x27, 0xaf, 0x28, 0xd3, 0xef, 0x94, 0x40, 0xee, 0x94, 0x00, 0x40, 0x04, 0x7e, 0x00,
35221 +  0x7f, 0x40, 0xc3, 0xe5, 0x28, 0x9f, 0xf5, 0x28, 0xe5, 0x27, 0x9e, 0xf5, 0x27, 0xe4, 0xfd, 0xed,
35222 +  0xc3, 0x9f, 0xe4, 0x9e, 0x50, 0x1f, 0x85, 0x34, 0x82, 0x85, 0x33, 0x83, 0xe0, 0xfc, 0x74}},
35223 + {0x1346, 64, { 0x00, 0x2d, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xec, 0xf0, 0x0d, 0x05, 0x34, 0xe5, 0x34, 0x70,
35224 +  0x02, 0x05, 0x33, 0x80, 0xda, 0x90, 0x7f, 0xa9, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xac, 0xe0, 0x44,
35225 +  0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xef, 0xf0, 0x22, 0x90, 0x7f, 0xac, 0xe0, 0x54, 0xfe, 0xf0, 0xe4,
35226 +  0x90, 0x7f, 0xb5, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xf0}},
35227 + {0x1386, 64, { 0xf0, 0x90, 0x7f, 0x96, 0xf0, 0xe4, 0x90, 0x78, 0x4a, 0xf0, 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d,
35228 +  0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x30, 0x00, 0x07, 0xe5, 0x29, 0x54, 0xf0, 0xff,
35229 +  0x80, 0x02, 0x7f, 0x00, 0xef, 0x44, 0x08, 0x90, 0x78, 0x41, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0,
35230 +  0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0}},
35231 + {0x13c6, 64, { 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xf0, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f,
35232 +  0x92, 0xe0, 0x54, 0xfd, 0xf0, 0x22, 0x8f, 0x1a, 0x05, 0x2d, 0xe5, 0x2d, 0xae, 0x2c, 0x70, 0x02,
35233 +  0x05, 0x2c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x18, 0xf0, 0x05, 0x2d, 0xe5,
35234 +  0x2d, 0xac, 0x2c, 0x70, 0x02, 0x05, 0x2c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15}},
35235 + {0x1406, 64, { 0x23, 0xe5, 0x23, 0x60, 0x1f, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xc0,
35236 +  0x83, 0xc0, 0x82, 0xe0, 0xfe, 0x12, 0x18, 0xd8, 0x8f, 0x1a, 0xee, 0x4f, 0xd0, 0x82, 0xd0, 0x83,
35237 +  0xf0, 0x80, 0xb5, 0x22, 0x8f, 0x1a, 0xe4, 0xf5, 0x1b, 0x75, 0x1c, 0xff, 0x75, 0x1d, 0x19, 0x75,
35238 +  0x1e, 0x86, 0xab, 0x1c, 0xaa, 0x1d, 0xa9, 0x1e, 0x90, 0x00, 0x01, 0x12, 0x11, 0xc4, 0xb4}},
35239 + {0x1446, 64, { 0x03, 0x1d, 0xaf, 0x1b, 0x05, 0x1b, 0xef, 0xb5, 0x1a, 0x01, 0x22, 0x12, 0x11, 0xab, 0x7e, 0x00, 0x29,
35240 +  0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1c, 0xff, 0xf5, 0x1d, 0x89, 0x1e, 0x80, 0xd4, 0x7b, 0x00,
35241 +  0x7a, 0x00, 0x79, 0x00, 0x22, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90, 0x78, 0x4f, 0x74, 0xc0, 0xf0,
35242 +  0xe4, 0x90, 0x78, 0x50, 0xf0, 0xe5, 0x2c, 0x90, 0x78, 0x51, 0xf0, 0xae, 0x2c, 0xe5, 0x2d}},
35243 + {0x1486, 64, { 0x90, 0x78, 0x52, 0xf0, 0x90, 0x78, 0x54, 0xe5, 0x23, 0xf0, 0x90, 0x78, 0x57, 0x74, 0x04, 0xf0, 0x90,
35244 +  0x7f, 0xe2, 0xe0, 0x44, 0x10, 0xf0, 0xe0, 0x54, 0xf7, 0xf0, 0xe4, 0x90, 0x78, 0x55, 0xf0, 0x90,
35245 +  0x78, 0x55, 0xe0, 0x60, 0xfa, 0x22, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0xe5, 0x2c, 0x90, 0x78, 0x4f,
35246 +  0xf0, 0xae, 0x2c, 0xe5, 0x2d, 0x90, 0x78, 0x50, 0xf0, 0x90, 0x78, 0x51, 0x74, 0xc0, 0xf0}},
35247 + {0x14c6, 64, { 0xe4, 0x90, 0x78, 0x52, 0xf0, 0x90, 0x78, 0x54, 0xe5, 0x23, 0xf0, 0x90, 0x78, 0x57, 0x74, 0x04, 0xf0,
35248 +  0xe4, 0x90, 0x78, 0x55, 0xf0, 0x90, 0x78, 0x55, 0xe0, 0x60, 0xfa, 0x22, 0xe5, 0x15, 0x24, 0x04,
35249 +  0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0f, 0x14, 0x60, 0x13, 0x14, 0x60,
35250 +  0x17, 0x80, 0x00, 0x90, 0x7f, 0xc7, 0xef, 0xf0, 0x80, 0x13, 0x90, 0x7f, 0xc9, 0xef, 0xf0}},
35251 + {0x1506, 64, { 0x80, 0x0c, 0x90, 0x7f, 0xcb, 0xef, 0xf0, 0x80, 0x05, 0x90, 0x7f, 0xcd, 0xef, 0xf0, 0xe5, 0x16, 0x42,
35252 +  0x2a, 0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60,
35253 +  0x0f, 0x14, 0x60, 0x13, 0x14, 0x60, 0x17, 0x80, 0x00, 0x90, 0x7f, 0xb7, 0xef, 0xf0, 0x80, 0x13,
35254 +  0x90, 0x7f, 0xb9, 0xef, 0xf0, 0x80, 0x0c, 0x90, 0x7f, 0xbb, 0xef, 0xf0, 0x80, 0x05, 0x90}},
35255 + {0x1546, 64, { 0x7f, 0xbd, 0xef, 0xf0, 0xe5, 0x16, 0x42, 0x2a, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x15, 0x24, 0x32,
35256 +  0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0xfd, 0x12, 0x16, 0x47, 0x90, 0x78,
35257 +  0x41, 0x74, 0x01, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82,
35258 +  0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x80, 0xfd, 0x12, 0x16, 0x47, 0x22, 0xc0, 0xe0}},
35259 + {0x1586, 64, { 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0, 0xd0,
35260 +  0x75, 0xd0, 0x08, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x01, 0xf0, 0x12, 0x13, 0x12, 0xd0,
35261 +  0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0, 0x32,
35262 +  0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x78, 0x41}},
35263 + {0x15c6, 64, { 0x74, 0x02, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24,
35264 +  0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22,
35265 +  0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x78, 0x41, 0x74,
35266 +  0x04, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15}},
35267 + {0x1606, 64, { 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22,
35268 +  0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x78, 0x41, 0x74,
35269 +  0x06, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24,
35270 +  0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0}},
35271 + {0x1646, 64, { 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
35272 +  0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x07, 0xf0, 0x90, 0xc0,
35273 +  0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x05, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x90,
35274 +  0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0xe4, 0x90, 0x78, 0x41}},
35275 + {0x1686, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5,
35276 +  0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0xe5, 0x15,
35277 +  0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0e, 0x14, 0x60, 0x11,
35278 +  0x14, 0x60, 0x14, 0x80, 0x00, 0x90, 0x7f, 0xc6, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xc8, 0xe0}},
35279 + {0x16c6, 64, { 0xff, 0x22, 0x90, 0x7f, 0xca, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xcc, 0xe0, 0xff, 0x22, 0xe5, 0x15, 0x24,
35280 +  0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0e, 0x14, 0x60, 0x11, 0x14,
35281 +  0x60, 0x14, 0x80, 0x00, 0x90, 0x7f, 0xb6, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xb8, 0xe0, 0xff, 0x22,
35282 +  0x90, 0x7f, 0xba, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xbc, 0xe0, 0xff, 0x22, 0xe5, 0x15, 0x24}},
35283 + {0x1706, 64, { 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0e, 0x14, 0x60, 0x11, 0x14, 0x60,
35284 +  0x14, 0x80, 0x00, 0x90, 0x7f, 0xc7, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xc9, 0xe0, 0xff, 0x22, 0x90,
35285 +  0x7f, 0xcb, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xcd, 0xe0, 0xff, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0,
35286 +  0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0}},
35287 + {0x1746, 64, { 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82,
35288 +  0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7b, 0x41, 0xe0, 0xf5, 0x36, 0x43, 0x13, 0x10, 0xa3, 0xe0,
35289 +  0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0x90, 0x7b, 0x43, 0xe0, 0xf5,
35290 +  0x37, 0xa3, 0xe0, 0x54, 0xf0, 0xf5, 0x29, 0xe0, 0x60, 0x02, 0xd2, 0x0a, 0x22, 0xc0, 0xe0}},
35291 + {0x1786, 64, { 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x01, 0x53, 0x91,
35292 +  0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0,
35293 +  0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86,
35294 +  0x75, 0x86, 0x00, 0xd2, 0x08, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0}},
35295 + {0x17c6, 64, { 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x12, 0x18, 0xc0, 0xae, 0x07,
35296 +  0x12, 0x18, 0xc0, 0xad, 0x07, 0xee, 0x6d, 0x60, 0x10, 0x12, 0x18, 0xc0, 0xae, 0x07, 0xee, 0x6d,
35297 +  0x60, 0x07, 0x12, 0x18, 0xc0, 0xad, 0x07, 0x80, 0xec, 0xaf, 0x06, 0x22, 0x74, 0x00, 0xf5, 0x86,
35298 +  0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f}},
35299 + {0x1806, 64, { 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x90, 0x7f, 0xd6,
35300 +  0xe0, 0x44, 0x04, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x0b, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f,
35301 +  0xf4, 0x7e, 0x01, 0x12, 0x18, 0x6b, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0x22, 0x12, 0x13,
35302 +  0x7c, 0x12, 0x18, 0x04, 0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0x0a, 0x7f, 0x05, 0x7e, 0x00}},
35303 + {0x1846, 64, { 0x12, 0x18, 0x6b, 0x12, 0x18, 0x9e, 0x12, 0x0a, 0xb8, 0x22, 0x03, 0x35, 0x80, 0x00, 0x00, 0x03, 0x2e,
35304 +  0x81, 0x00, 0x00, 0xc1, 0x85, 0xc1, 0x81, 0xc1, 0x08, 0xc1, 0x00, 0xc1, 0x06, 0x01, 0x22, 0x00,
35305 +  0x01, 0x24, 0x00, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02,
35306 +  0x15, 0x18, 0x4e, 0x60, 0x08, 0x12, 0x17, 0xf3, 0x12, 0x17, 0xf3, 0x80, 0xeb, 0x22, 0xe5}},
35307 + {0x1886, 64, { 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x04, 0xff, 0x44, 0x10, 0x90, 0x7f,
35308 +  0xd7, 0xf0, 0xef, 0x44, 0x30, 0xf0, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x0d,
35309 +  0x7e, 0x00, 0x12, 0x18, 0x6b, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22, 0x90, 0x78, 0x41,
35310 +  0x74, 0x02, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0}},
35311 + {0x18c6, 64, { 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff,
35312 +  0x22, 0x90, 0x78, 0x41, 0x74, 0x05, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x78, 0x41,
35313 +  0x74, 0x06, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90, 0xc0,
35314 +  0x00, 0xe0, 0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
35315   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x0a, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x04, 0x09, 0x02, 0x74, 0x00, 0x01,
35316    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
35317    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
35318 @@ -438,7 +442,7 @@
35319    0x00, 0x42, 0x00, 0x20, 0x00, 0x34, 0x00, 0x2d, 0x00, 0x70, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x74,
35320    0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x20,
35321    0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00}},
35322 - {0x1a06, 64, { 0x00, 0x00, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x00, 0x00, 0x00, 0x00,
35323 + {0x1a06, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
35324    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
35325    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
35326    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
35327 @@ -453,8 +457,8 @@
35328   {0x1ac6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
35329    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
35330    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
35331 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x17, 0xb7, 0x00, 0x02, 0x1b}},
35332 - {0x1b06, 21, { 0x04, 0x00, 0x02, 0x17, 0x65, 0x00, 0x02, 0x17, 0x37, 0x00, 0x02, 0x1b, 0x10, 0x00, 0x02, 0x1b, 0x14,
35333 -  0x00, 0x02, 0x15, 0x89}},
35334 -{ 0xffff,      0,      {0x00} }
35335 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x17, 0x84, 0x00, 0x02, 0x1b}},
35336 + {0x1b06, 21, { 0x04, 0x00, 0x02, 0x17, 0x32, 0x00, 0x02, 0x17, 0xab, 0x00, 0x02, 0x1b, 0x10, 0x00, 0x02, 0x1b, 0x14,
35337 +  0x00, 0x02, 0x15, 0x84}},
35338 + {0xffff, 0, {0x00}}
35339  };
35340 diff -Nur linux-2.4.19.old/drivers/usb/serial/kl5kusb105.c linux-2.4.19/drivers/usb/serial/kl5kusb105.c
35341 --- linux-2.4.19.old/drivers/usb/serial/kl5kusb105.c    Mon Feb 25 20:38:07 2002
35342 +++ linux-2.4.19/drivers/usb/serial/kl5kusb105.c        Mon Nov 25 12:27:09 2002
35343 @@ -47,18 +47,14 @@
35344  
35345  #include <linux/config.h>
35346  #include <linux/kernel.h>
35347 -#include <linux/sched.h>
35348 -#include <linux/signal.h>
35349  #include <linux/errno.h>
35350 -#include <linux/poll.h>
35351  #include <linux/init.h>
35352  #include <linux/slab.h>
35353 -/*#include <linux/fcntl.h>*/
35354  #include <linux/tty.h>
35355  #include <linux/tty_driver.h>
35356  #include <linux/tty_flip.h>
35357  #include <linux/module.h>
35358 -/*#include <linux/spinlock.h>*/
35359 +#include <asm/uaccess.h>
35360  #include <linux/usb.h>
35361  
35362  #ifdef CONFIG_USB_SERIAL_DEBUG
35363 @@ -111,81 +107,41 @@
35364   */
35365  
35366  /*
35367 - * All of the device info needed for the MCT USB-RS232 converter.
35368 + * All of the device info needed for the KLSI converters.
35369   */
35370 -static __devinitdata struct usb_device_id id_table_combined [] = {
35371 +static struct usb_device_id id_table [] = {
35372         { USB_DEVICE(PALMCONNECT_VID, PALMCONNECT_PID) },
35373         { USB_DEVICE(KLSI_VID, KLSI_KL5KUSB105D_PID) },
35374         { }             /* Terminating entry */
35375  };
35376  
35377 -static __devinitdata struct usb_device_id palmconnect_table [] = {
35378 -        { USB_DEVICE(PALMCONNECT_VID, PALMCONNECT_PID) },
35379 -        { }                        /* Terminating entry */
35380 -};
35381 -
35382 -static __devinitdata struct usb_device_id kl5kusb105d_table [] = {
35383 -        { USB_DEVICE(KLSI_VID, KLSI_KL5KUSB105D_PID) },
35384 -        { }                        /* Terminating entry */
35385 -};
35386 -
35387 +MODULE_DEVICE_TABLE (usb, id_table);
35388  
35389 -MODULE_DEVICE_TABLE (usb, id_table_combined);
35390 -
35391 -
35392 -static struct usb_serial_device_type palmconnect_device = {
35393 -       name:                "PalmConnect USB Serial",
35394 -       id_table:            palmconnect_table,
35395 -       needs_interrupt_in:  MUST_HAVE,   /* 1 interrupt-in endpoints */
35396 -       needs_bulk_in:       MUST_HAVE,   /* 1 bulk-in endpoint */
35397 -       needs_bulk_out:      MUST_HAVE,   /* 1 bulk-out endpoint */
35398 -       num_interrupt_in:    1,
35399 -       num_bulk_in:         1,
35400 -       num_bulk_out:        1,
35401 -       num_ports:           1,
35402 -       open:                klsi_105_open,
35403 -       close:               klsi_105_close,
35404 -       write:               klsi_105_write,
35405 -       write_bulk_callback: klsi_105_write_bulk_callback,
35406 -       chars_in_buffer:     klsi_105_chars_in_buffer,
35407 -       write_room:          klsi_105_write_room,
35408 -       read_bulk_callback:  klsi_105_read_bulk_callback,
35409 -       ioctl:               klsi_105_ioctl,
35410 -       set_termios:         klsi_105_set_termios,
35411 -       /*break_ctl:         klsi_105_break_ctl,*/
35412 -       startup:             klsi_105_startup,
35413 -       shutdown:            klsi_105_shutdown,
35414 -       throttle:            klsi_105_throttle,
35415 -       unthrottle:          klsi_105_unthrottle,
35416 -};
35417  
35418  static struct usb_serial_device_type kl5kusb105d_device = {
35419 -       name:                "generic KL5KUSB105D USB->Serial",
35420 -       id_table:            kl5kusb105d_table,
35421 -       needs_interrupt_in:  MUST_HAVE,  /* 1 interrupt-in endpoints */
35422 -       needs_bulk_in:       MUST_HAVE,  /* 1 bulk-in endpoint */
35423 -       needs_bulk_out:      MUST_HAVE,  /* 1 bulk-out endpoint */
35424 -       num_interrupt_in:    1,
35425 -       num_bulk_in:         1,
35426 -       num_bulk_out:        1,
35427 -       num_ports:           1,
35428 -       open:                klsi_105_open,
35429 -       close:               klsi_105_close,
35430 -       write:               klsi_105_write,
35431 -       write_bulk_callback: klsi_105_write_bulk_callback,
35432 -       chars_in_buffer:     klsi_105_chars_in_buffer,
35433 -       write_room:          klsi_105_write_room,
35434 -       read_bulk_callback:  klsi_105_read_bulk_callback,
35435 -       ioctl:               klsi_105_ioctl,
35436 -       set_termios:         klsi_105_set_termios,
35437 -       /*break_ctl:         klsi_105_break_ctl,*/
35438 -       startup:             klsi_105_startup,
35439 -       shutdown:            klsi_105_shutdown,
35440 -       throttle:            klsi_105_throttle,
35441 -       unthrottle:          klsi_105_unthrottle,
35442 +       .owner =             THIS_MODULE,
35443 +       .name =              "KL5KUSB105D / PalmConnect",
35444 +       .id_table =          id_table,
35445 +       .num_interrupt_in =  1,
35446 +       .num_bulk_in =       1,
35447 +       .num_bulk_out =      1,
35448 +       .num_ports =         1,
35449 +       .open =              klsi_105_open,
35450 +       .close =             klsi_105_close,
35451 +       .write =             klsi_105_write,
35452 +       .write_bulk_callback = klsi_105_write_bulk_callback,
35453 +       .chars_in_buffer =   klsi_105_chars_in_buffer,
35454 +       .write_room =        klsi_105_write_room,
35455 +       .read_bulk_callback =klsi_105_read_bulk_callback,
35456 +       .ioctl =             klsi_105_ioctl,
35457 +       .set_termios =       klsi_105_set_termios,
35458 +       /*.break_ctl =       klsi_105_break_ctl,*/
35459 +       .startup =           klsi_105_startup,
35460 +       .shutdown =          klsi_105_shutdown,
35461 +       .throttle =          klsi_105_throttle,
35462 +       .unthrottle =        klsi_105_unthrottle,
35463  };
35464  
35465 -
35466  struct klsi_105_port_settings {
35467         __u8    pktlen;         /* always 5, it seems */
35468         __u8    baudrate;
35469 @@ -231,7 +187,8 @@
35470                              KLSI_TIMEOUT);
35471         if (rc < 0)
35472                 err("Change port settings failed (error = %d)", rc);
35473 -       info(__FUNCTION__ " - %d byte block, baudrate %x, databits %d, u1 %d, u2 %d",
35474 +       info("%s - %d byte block, baudrate %x, databits %d, u1 %d, u2 %d",
35475 +           __FUNCTION__,
35476             settings->pktlen,
35477             settings->baudrate, settings->databits,
35478             settings->unknown1, settings->unknown2);
35479 @@ -262,7 +219,7 @@
35480         __u8 status_buf[KLSI_STATUSBUF_LEN] = { -1,-1};
35481         __u16 status;
35482  
35483 -       info(__FUNCTION__ " - sending SIO Poll request");
35484 +       info("%s - sending SIO Poll request", __FUNCTION__);
35485          rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
35486                              KL5KUSB105A_SIO_POLL,
35487                               USB_TYPE_VENDOR | USB_DIR_IN,
35488 @@ -276,7 +233,7 @@
35489         else {
35490                 status = status_buf[0] + (status_buf[1]<<8);
35491  
35492 -               info(__FUNCTION__ " - read status %x %x",
35493 +               info("%s - read status %x %x", __FUNCTION__,
35494                      status_buf[0], status_buf[1]);
35495  
35496                 *line_state_p = klsi_105_status2linestate(status);
35497 @@ -304,7 +261,7 @@
35498                 serial->port[i].private = kmalloc(sizeof(struct klsi_105_private),
35499                                                    GFP_KERNEL);
35500                 if (!serial->port[i].private) {
35501 -                       dbg(__FUNCTION__ "kmalloc for klsi_105_private failed.");
35502 +                       dbg("%skmalloc for klsi_105_private failed.", __FUNCTION__);
35503                         return (-1); /* error */
35504                 }
35505                 priv = (struct klsi_105_private *)serial->port[i].private;
35506 @@ -334,8 +291,7 @@
35507                         urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE,
35508                                                         GFP_KERNEL);
35509                         if (!urb->transfer_buffer) {
35510 -                               err (__FUNCTION__ 
35511 -                                    " - out of memory for urb buffers.");
35512 +                               err("%s - out of memory for urb buffers.", __FUNCTION__);
35513                                 continue;
35514                         }
35515                 }
35516 @@ -352,16 +308,13 @@
35517  {
35518         int i;
35519         
35520 -       dbg (__FUNCTION__);
35521 +       dbg("%s", __FUNCTION__);
35522  
35523         /* stop reads and writes on all ports */
35524         for (i=0; i < serial->num_ports; ++i) {
35525                 struct klsi_105_private *priv = 
35526                         (struct klsi_105_private*) serial->port[i].private;
35527                 unsigned long flags;
35528 -               while (serial->port[i].open_count > 0) {
35529 -                       klsi_105_close (&serial->port[i], NULL);
35530 -               }
35531  
35532                 if (priv) {
35533                         /* kill our write urb pool */
35534 @@ -397,92 +350,79 @@
35535         struct usb_serial *serial = port->serial;
35536         struct klsi_105_private *priv = (struct klsi_105_private *)port->private;
35537         int retval = 0;
35538 +       int rc;
35539 +       int i;
35540 +       unsigned long line_state;
35541  
35542 -       dbg(__FUNCTION__" port %d", port->number);
35543 +       dbg("%s port %d", __FUNCTION__, port->number);
35544  
35545 -       down (&port->sem);
35546 +       /* force low_latency on so that our tty_push actually forces
35547 +        * the data through
35548 +        * port->tty->low_latency = 1; */
35549 +
35550 +       /* Do a defined restart:
35551 +        * Set up sane default baud rate and send the 'READ_ON'
35552 +        * vendor command. 
35553 +        * FIXME: set modem line control (how?)
35554 +        * Then read the modem line control and store values in
35555 +        * priv->line_state.
35556 +        */
35557 +       priv->cfg.pktlen   = 5;
35558 +       priv->cfg.baudrate = kl5kusb105a_sio_b9600;
35559 +       priv->cfg.databits = kl5kusb105a_dtb_8;
35560 +       priv->cfg.unknown1 = 0;
35561 +       priv->cfg.unknown2 = 1;
35562 +       klsi_105_chg_port_settings(serial, &(priv->cfg));
35563         
35564 -       ++port->open_count;
35565 -       MOD_INC_USE_COUNT;
35566 +       /* set up termios structure */
35567 +       priv->termios.c_iflag = port->tty->termios->c_iflag;
35568 +       priv->termios.c_oflag = port->tty->termios->c_oflag;
35569 +       priv->termios.c_cflag = port->tty->termios->c_cflag;
35570 +       priv->termios.c_lflag = port->tty->termios->c_lflag;
35571 +       for (i=0; i<NCCS; i++)
35572 +               priv->termios.c_cc[i] = port->tty->termios->c_cc[i];
35573  
35574 -       if (!port->active) {
35575 -               int rc;
35576 -               int i;
35577 -               unsigned long line_state;
35578 -               port->active = 1;
35579 -
35580 -               /* force low_latency on so that our tty_push actually forces
35581 -                * the data through
35582 -                * port->tty->low_latency = 1; */
35583 -
35584 -               /* Do a defined restart:
35585 -                * Set up sane default baud rate and send the 'READ_ON'
35586 -                * vendor command. 
35587 -                * FIXME: set modem line control (how?)
35588 -                * Then read the modem line control and store values in
35589 -                * priv->line_state.
35590 -                */
35591 -               priv->cfg.pktlen   = 5;
35592 -               priv->cfg.baudrate = kl5kusb105a_sio_b9600;
35593 -               priv->cfg.databits = kl5kusb105a_dtb_8;
35594 -               priv->cfg.unknown1 = 0;
35595 -               priv->cfg.unknown2 = 1;
35596 -               klsi_105_chg_port_settings(serial, &(priv->cfg));
35597 -               
35598 -               /* set up termios structure */
35599 -               priv->termios.c_iflag = port->tty->termios->c_iflag;
35600 -               priv->termios.c_oflag = port->tty->termios->c_oflag;
35601 -               priv->termios.c_cflag = port->tty->termios->c_cflag;
35602 -               priv->termios.c_lflag = port->tty->termios->c_lflag;
35603 -               for (i=0; i<NCCS; i++)
35604 -                       priv->termios.c_cc[i] = port->tty->termios->c_cc[i];
35605 -
35606 -
35607 -               /* READ_ON and urb submission */
35608 -               FILL_BULK_URB(port->read_urb, serial->dev, 
35609 -                             usb_rcvbulkpipe(serial->dev,
35610 -                                             port->bulk_in_endpointAddress),
35611 -                             port->read_urb->transfer_buffer,
35612 -                             port->read_urb->transfer_buffer_length,
35613 -                             klsi_105_read_bulk_callback,
35614 -                             port);
35615 -               port->read_urb->transfer_flags |= USB_QUEUE_BULK;
35616 -
35617 -               rc = usb_submit_urb(port->read_urb);
35618 -               if (rc) {
35619 -                       err(__FUNCTION__ 
35620 -                           " - failed submitting read urb, error %d", rc);
35621 -                       retval = rc;
35622 -                       goto exit;
35623 -               }
35624  
35625 -               rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev,0),
35626 -                                    KL5KUSB105A_SIO_CONFIGURE,
35627 -                                    USB_TYPE_VENDOR|USB_DIR_OUT|USB_RECIP_INTERFACE,
35628 -                                    KL5KUSB105A_SIO_CONFIGURE_READ_ON,
35629 -                                    0, /* index */
35630 -                                    NULL,
35631 -                                    0,
35632 -                                    KLSI_TIMEOUT);
35633 -               if (rc < 0) {
35634 -                       err("Enabling read failed (error = %d)", rc);
35635 -                       retval = rc;
35636 -               } else 
35637 -                       dbg(__FUNCTION__ " - enabled reading");
35638 +       /* READ_ON and urb submission */
35639 +       FILL_BULK_URB(port->read_urb, serial->dev, 
35640 +                     usb_rcvbulkpipe(serial->dev,
35641 +                                     port->bulk_in_endpointAddress),
35642 +                     port->read_urb->transfer_buffer,
35643 +                     port->read_urb->transfer_buffer_length,
35644 +                     klsi_105_read_bulk_callback,
35645 +                     port);
35646 +       port->read_urb->transfer_flags |= USB_QUEUE_BULK;
35647  
35648 -               rc = klsi_105_get_line_state(serial, &line_state);
35649 -               if (rc >= 0) {
35650 -                       priv->line_state = line_state;
35651 -                       dbg(__FUNCTION__ 
35652 -                           " - read line state 0x%lx", line_state);
35653 -                       retval = 0;
35654 -               } else
35655 -                       retval = rc;
35656 +       rc = usb_submit_urb(port->read_urb);
35657 +       if (rc) {
35658 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, rc);
35659 +               retval = rc;
35660 +               goto exit;
35661         }
35662  
35663 +       rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev,0),
35664 +                            KL5KUSB105A_SIO_CONFIGURE,
35665 +                            USB_TYPE_VENDOR|USB_DIR_OUT|USB_RECIP_INTERFACE,
35666 +                            KL5KUSB105A_SIO_CONFIGURE_READ_ON,
35667 +                            0, /* index */
35668 +                            NULL,
35669 +                            0,
35670 +                            KLSI_TIMEOUT);
35671 +       if (rc < 0) {
35672 +               err("Enabling read failed (error = %d)", rc);
35673 +               retval = rc;
35674 +       } else 
35675 +               dbg("%s - enabled reading", __FUNCTION__);
35676 +
35677 +       rc = klsi_105_get_line_state(serial, &line_state);
35678 +       if (rc >= 0) {
35679 +               priv->line_state = line_state;
35680 +               dbg("%s - read line state 0x%lx", __FUNCTION__, line_state);
35681 +               retval = 0;
35682 +       } else
35683 +               retval = rc;
35684 +
35685  exit:
35686 -       up (&port->sem);
35687 -       
35688         return retval;
35689  } /* klsi_105_open */
35690  
35691 @@ -492,43 +432,35 @@
35692         struct usb_serial *serial;
35693         struct klsi_105_private *priv 
35694                 = (struct klsi_105_private *)port->private;
35695 -       dbg(__FUNCTION__" port %d", port->number);
35696 +       int rc;
35697 +
35698 +       dbg("%s port %d", __FUNCTION__, port->number);
35699  
35700         serial = get_usb_serial (port, __FUNCTION__);
35701  
35702         if(!serial)
35703                 return;
35704  
35705 -       down (&port->sem);
35706 -
35707 -       --port->open_count;
35708 +       /* send READ_OFF */
35709 +       rc = usb_control_msg (serial->dev,
35710 +                             usb_sndctrlpipe(serial->dev, 0),
35711 +                             KL5KUSB105A_SIO_CONFIGURE,
35712 +                             USB_TYPE_VENDOR | USB_DIR_OUT,
35713 +                             KL5KUSB105A_SIO_CONFIGURE_READ_OFF,
35714 +                             0, /* index */
35715 +                             NULL, 0,
35716 +                             KLSI_TIMEOUT);
35717 +       if (rc < 0)
35718 +                   err("Disabling read failed (error = %d)", rc);
35719  
35720 -       if (port->open_count <= 0) {
35721 -               /* send READ_OFF */
35722 -               int rc = usb_control_msg(serial->dev,
35723 -                                        usb_sndctrlpipe(serial->dev, 0),
35724 -                                        KL5KUSB105A_SIO_CONFIGURE,
35725 -                                        USB_TYPE_VENDOR | USB_DIR_OUT,
35726 -                                        KL5KUSB105A_SIO_CONFIGURE_READ_OFF,
35727 -                                        0, /* index */
35728 -                                        NULL, 0,
35729 -                                        KLSI_TIMEOUT);
35730 -               if (rc < 0)
35731 -                           err("Disabling read failed (error = %d)", rc);
35732 -
35733 -               /* shutdown our bulk reads and writes */
35734 -               usb_unlink_urb (port->write_urb);
35735 -               usb_unlink_urb (port->read_urb);
35736 -               /* unlink our write pool */
35737 -               /* FIXME */
35738 -               /* wgg - do I need this? I think so. */
35739 -               usb_unlink_urb (port->interrupt_in_urb);
35740 -               port->active = 0;
35741 -               info("kl5kusb105 port stats: %ld bytes in, %ld bytes out", priv->bytes_in, priv->bytes_out);
35742 -       }
35743 -       
35744 -       up (&port->sem);
35745 -       MOD_DEC_USE_COUNT;
35746 +       /* shutdown our bulk reads and writes */
35747 +       usb_unlink_urb (port->write_urb);
35748 +       usb_unlink_urb (port->read_urb);
35749 +       /* unlink our write pool */
35750 +       /* FIXME */
35751 +       /* wgg - do I need this? I think so. */
35752 +       usb_unlink_urb (port->interrupt_in_urb);
35753 +       info("kl5kusb105 port stats: %ld bytes in, %ld bytes out", priv->bytes_in, priv->bytes_out);
35754  } /* klsi_105_close */
35755  
35756  
35757 @@ -538,6 +470,7 @@
35758   */
35759  #define KLSI_105_DATA_OFFSET   2   /* in the bulk urb data block */
35760  
35761 +
35762  static int klsi_105_write (struct usb_serial_port *port, int from_user,
35763                            const unsigned char *buf, int count)
35764  {
35765 @@ -547,10 +480,7 @@
35766         int result, size;
35767         int bytes_sent=0;
35768  
35769 -       dbg(__FUNCTION__ " - port %d", port->number);
35770 -
35771 -       down (&port->sem);      /* to lock against someone else trying to
35772 -                                  take an URB we just selected from the pool */
35773 +       dbg("%s - port %d", __FUNCTION__, port->number);
35774  
35775         while (count > 0) {
35776                 /* try to find a free urb (write 0 bytes if none) */
35777 @@ -562,21 +492,21 @@
35778                 for (i=0; i<NUM_URBS; i++) {
35779                         if (priv->write_urb_pool[i]->status != -EINPROGRESS) {
35780                                 urb = priv->write_urb_pool[i];
35781 -                               dbg(__FUNCTION__ " - using pool URB %d", i);
35782 +                               dbg("%s - using pool URB %d", __FUNCTION__, i);
35783                                 break;
35784                         }
35785                 }
35786                 spin_unlock_irqrestore (&priv->write_urb_pool_lock, flags);
35787  
35788                 if (urb==NULL) {
35789 -                       dbg (__FUNCTION__ " - no more free urbs");
35790 +                       dbg("%s - no more free urbs", __FUNCTION__);
35791                         goto exit;
35792                 }
35793  
35794                 if (urb->transfer_buffer == NULL) {
35795                         urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
35796                         if (urb->transfer_buffer == NULL) {
35797 -                               err(__FUNCTION__ " - no more kernel memory...");
35798 +                               err("%s - no more kernel memory...", __FUNCTION__);
35799                                 goto exit;
35800                         }
35801                 }
35802 @@ -587,7 +517,6 @@
35803                 if (from_user) {
35804                         if (copy_from_user(urb->transfer_buffer
35805                                            + KLSI_105_DATA_OFFSET, buf, size)) {
35806 -                               up (&port->sem);
35807                                 return -EFAULT;
35808                         }
35809                 } else {
35810 @@ -613,8 +542,7 @@
35811                 /* send the data out the bulk port */
35812                 result = usb_submit_urb(urb);
35813                 if (result) {
35814 -                       err(__FUNCTION__
35815 -                           " - failed submitting write urb, error %d", result);
35816 +                       err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
35817                         goto exit;
35818                 }
35819                 buf += size;
35820 @@ -622,7 +550,6 @@
35821                 count -= size;
35822         }
35823  exit:
35824 -       up (&port->sem);
35825         priv->bytes_out+=bytes_sent;
35826  
35827         return bytes_sent;      /* that's how much we wrote */
35828 @@ -633,15 +560,15 @@
35829         struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
35830         struct usb_serial *serial = port->serial;
35831  
35832 -       dbg(__FUNCTION__ " - port %d", port->number);
35833 +       dbg("%s - port %d", __FUNCTION__, port->number);
35834         
35835         if (!serial) {
35836 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
35837 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
35838                 return;
35839         }
35840  
35841         if (urb->status) {
35842 -               dbg(__FUNCTION__ " - nonzero write bulk status received: %d",
35843 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__,
35844                     urb->status);
35845                 return;
35846         }
35847 @@ -673,7 +600,7 @@
35848  
35849         spin_unlock_irqrestore (&priv->write_urb_pool_lock, flags);
35850  
35851 -       dbg (__FUNCTION__ " - returns %d", chars);
35852 +       dbg("%s - returns %d", __FUNCTION__, chars);
35853         return (chars);
35854  }
35855  
35856 @@ -694,7 +621,7 @@
35857  
35858         spin_unlock_irqrestore (&priv->write_urb_pool_lock, flags);
35859  
35860 -       dbg(__FUNCTION__ " - returns %d", room);
35861 +       dbg("%s - returns %d", __FUNCTION__, room);
35862         return (room);
35863  }
35864  
35865 @@ -710,16 +637,16 @@
35866         unsigned char *data = urb->transfer_buffer;
35867         int rc;
35868  
35869 -        dbg(__FUNCTION__ " - port %d", port->number);
35870 +        dbg("%s - port %d", __FUNCTION__, port->number);
35871  
35872         /* The urb might have been killed. */
35873          if (urb->status) {
35874 -                dbg(__FUNCTION__ " - nonzero read bulk status received: %d",
35875 +                dbg("%s - nonzero read bulk status received: %d", __FUNCTION__,
35876                     urb->status);
35877                  return;
35878          }
35879         if (!serial) {
35880 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
35881 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
35882                 return;
35883         }
35884         
35885 @@ -728,10 +655,10 @@
35886          */
35887         if (urb->actual_length == 0) {
35888                 /* empty urbs seem to happen, we ignore them */
35889 -               /* dbg(__FUNCTION__ " - emtpy URB"); */
35890 +               /* dbg("%s - emtpy URB", __FUNCTION__); */
35891                ;
35892         } else if (urb->actual_length <= 2) {
35893 -               dbg(__FUNCTION__ " - size %d URB not understood",
35894 +               dbg("%s - size %d URB not understood", __FUNCTION__,
35895                     urb->actual_length);
35896                 usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
35897         } else {
35898 @@ -749,9 +676,8 @@
35899                                        urb->actual_length, data);
35900  
35901                 if (bytes_sent + 2 > urb->actual_length) {
35902 -                       dbg(__FUNCTION__ 
35903 -                           " - trying to read more data than available"
35904 -                           " (%d vs. %d)",
35905 +                       dbg("%s - trying to read more data than available"
35906 +                           " (%d vs. %d)", __FUNCTION__,
35907                             bytes_sent+2, urb->actual_length);
35908                         /* cap at implied limit */
35909                         bytes_sent = urb->actual_length - 2;
35910 @@ -780,8 +706,7 @@
35911                       port);
35912         rc = usb_submit_urb(port->read_urb);
35913         if (rc)
35914 -               err(__FUNCTION__ 
35915 -                   " - failed resubmitting read urb, error %d", rc);
35916 +               err("%s - failed resubmitting read urb, error %d", __FUNCTION__, rc);
35917  } /* klsi_105_read_bulk_callback */
35918  
35919  
35920 @@ -801,7 +726,7 @@
35921         if( (cflag & CBAUD) != (old_cflag & CBAUD) ) {
35922                 /* reassert DTR and (maybe) RTS on transition from B0 */
35923                 if( (old_cflag & CBAUD) == B0 ) {
35924 -                       dbg(__FUNCTION__ ": baud was B0");
35925 +                       dbg("%s: baud was B0", __FUNCTION__);
35926  #if 0
35927                         priv->control_state |= TIOCM_DTR;
35928                         /* don't set RTS if using hardware flow control */
35929 @@ -839,7 +764,7 @@
35930                         break;
35931                 }
35932                 if ((cflag & CBAUD) == B0 ) {
35933 -                       dbg(__FUNCTION__ ": baud is B0");
35934 +                       dbg("%s: baud is B0", __FUNCTION__);
35935                         /* Drop RTS and DTR */
35936                         /* maybe this should be simulated by sending read
35937                          * disable and read enable messages?
35938 @@ -856,10 +781,10 @@
35939                 /* set the number of data bits */
35940                 switch (cflag & CSIZE) {
35941                 case CS5:
35942 -                       dbg(__FUNCTION__ " - 5 bits/byte not supported");
35943 +                       dbg("%s - 5 bits/byte not supported", __FUNCTION__);
35944                         return ;
35945                 case CS6:
35946 -                       dbg(__FUNCTION__ " - 6 bits/byte not supported");
35947 +                       dbg("%s - 6 bits/byte not supported", __FUNCTION__);
35948                         return ;
35949                 case CS7:
35950                         priv->cfg.databits = kl5kusb105a_dtb_7;
35951 @@ -930,7 +855,7 @@
35952         struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
35953         unsigned char lcr = priv->last_lcr;
35954  
35955 -       dbg (__FUNCTION__ "state=%d", break_state);
35956 +       dbg("%sstate=%d", __FUNCTION__, break_state);
35957  
35958         if (break_state)
35959                 lcr |= MCT_U232_SET_BREAK;
35960 @@ -946,14 +871,14 @@
35961         struct klsi_105_private *priv = (struct klsi_105_private *)port->private;
35962         int mask;
35963         
35964 -       dbg (__FUNCTION__ "cmd=0x%x", cmd);
35965 +       dbg("%scmd=0x%x", __FUNCTION__, cmd);
35966  
35967         /* Based on code from acm.c and others */
35968         switch (cmd) {
35969         case TIOCMGET: {
35970                 int rc;
35971                 unsigned long line_state;
35972 -               dbg (__FUNCTION__ " - TIOCMGET request, just guessing");
35973 +               dbg("%s - TIOCMGET request, just guessing", __FUNCTION__);
35974  
35975                 rc = klsi_105_get_line_state(serial, &line_state);
35976                 if (rc < 0) {
35977 @@ -962,7 +887,7 @@
35978                         return -ENOIOCTLCMD;
35979                 } else {
35980                         priv->line_state = line_state;
35981 -                       dbg(__FUNCTION__ " - read line state 0x%lx", line_state);
35982 +                       dbg("%s - read line state 0x%lx", __FUNCTION__, line_state);
35983                 }
35984                 return put_user(priv->line_state, (unsigned long *) arg); 
35985                };
35986 @@ -977,10 +902,10 @@
35987                         /* RTS needs set */
35988                         if( ((cmd == TIOCMSET) && (mask & TIOCM_RTS)) ||
35989                             (cmd == TIOCMBIS) )
35990 -                               dbg (__FUNCTION__ " - set RTS not handled");
35991 +                               dbg("%s - set RTS not handled", __FUNCTION__);
35992                                 /* priv->control_state |=  TIOCM_RTS; */
35993                         else
35994 -                               dbg (__FUNCTION__ " - clear RTS not handled");
35995 +                               dbg("%s - clear RTS not handled", __FUNCTION__);
35996                                 /* priv->control_state &= ~TIOCM_RTS; */
35997                 }
35998  
35999 @@ -988,10 +913,10 @@
36000                         /* DTR needs set */
36001                         if( ((cmd == TIOCMSET) && (mask & TIOCM_DTR)) ||
36002                             (cmd == TIOCMBIS) )
36003 -                               dbg (__FUNCTION__ " - set DTR not handled");
36004 +                               dbg("%s - set DTR not handled", __FUNCTION__);
36005                         /*      priv->control_state |=  TIOCM_DTR; */
36006                         else
36007 -                               dbg (__FUNCTION__ " - clear DTR not handled");
36008 +                               dbg("%s - clear DTR not handled", __FUNCTION__);
36009                                 /* priv->control_state &= ~TIOCM_DTR; */
36010                 }
36011                 /*
36012 @@ -1002,19 +927,19 @@
36013         case TIOCMIWAIT:
36014                 /* wait for any of the 4 modem inputs (DCD,RI,DSR,CTS)*/
36015                 /* TODO */
36016 -               dbg (__FUNCTION__ " - TIOCMIWAIT not handled");
36017 +               dbg("%s - TIOCMIWAIT not handled", __FUNCTION__);
36018                 return -ENOIOCTLCMD;
36019  
36020         case TIOCGICOUNT:
36021                 /* return count of modemline transitions */
36022                 /* TODO */
36023 -               dbg (__FUNCTION__ " - TIOCGICOUNT not handled");
36024 +               dbg("%s - TIOCGICOUNT not handled", __FUNCTION__);
36025                 return -ENOIOCTLCMD;
36026         case TCGETS: {
36027              /* return current info to caller */
36028              int retval;
36029  
36030 -            dbg (__FUNCTION__ " - TCGETS data faked/incomplete");
36031 +            dbg("%s - TCGETS data faked/incomplete", __FUNCTION__);
36032  
36033              retval = verify_area(VERIFY_WRITE, (void *)arg,
36034                                   sizeof(struct termios));
36035 @@ -1030,7 +955,7 @@
36036                 /* set port termios to the one given by the user */
36037                 int retval;
36038  
36039 -               dbg (__FUNCTION__ " - TCSETS not handled");
36040 +               dbg("%s - TCSETS not handled", __FUNCTION__);
36041  
36042                 retval = verify_area(VERIFY_READ, (void *)arg,
36043                                      sizeof(struct termios));
36044 @@ -1056,7 +981,7 @@
36045                 return -ENOIOCTLCMD;
36046                       }
36047         default:
36048 -               dbg(__FUNCTION__ ": arg not supported - 0x%04x",cmd);
36049 +               dbg("%s: arg not supported - 0x%04x", __FUNCTION__,cmd);
36050                 return(-ENOIOCTLCMD);
36051                 break;
36052         }
36053 @@ -1065,41 +990,27 @@
36054  
36055  static void klsi_105_throttle (struct usb_serial_port *port)
36056  {
36057 -
36058 -       dbg(__FUNCTION__ " - port %d", port->number);
36059 -
36060 -       down (&port->sem);
36061 -
36062 +       dbg("%s - port %d", __FUNCTION__, port->number);
36063         usb_unlink_urb (port->read_urb);
36064 -
36065 -       up (&port->sem);
36066 -
36067 -       return;
36068  }
36069 +
36070  static void klsi_105_unthrottle (struct usb_serial_port *port)
36071  {
36072         int result;
36073  
36074 -       dbg(__FUNCTION__ " - port %d", port->number);
36075 -
36076 -       down (&port->sem);
36077 +       dbg("%s - port %d", __FUNCTION__, port->number);
36078  
36079         port->read_urb->dev = port->serial->dev;
36080         result = usb_submit_urb(port->read_urb);
36081         if (result)
36082 -               err(__FUNCTION__ " - failed submitting read urb, error %d",
36083 +               err("%s - failed submitting read urb, error %d", __FUNCTION__,
36084                     result);
36085 -
36086 -       up (&port->sem);
36087 -
36088 -       return;
36089  }
36090  
36091  
36092  
36093  static int __init klsi_105_init (void)
36094  {
36095 -       usb_serial_register (&palmconnect_device);
36096         usb_serial_register (&kl5kusb105d_device);
36097  
36098         info(DRIVER_DESC " " DRIVER_VERSION);
36099 @@ -1109,7 +1020,6 @@
36100  
36101  static void __exit klsi_105_exit (void)
36102  {
36103 -       usb_serial_deregister (&palmconnect_device);
36104         usb_serial_deregister (&kl5kusb105d_device);
36105  }
36106  
36107 diff -Nur linux-2.4.19.old/drivers/usb/serial/kl5kusb105.h linux-2.4.19/drivers/usb/serial/kl5kusb105.h
36108 --- linux-2.4.19.old/drivers/usb/serial/kl5kusb105.h    Mon Feb 25 20:38:07 2002
36109 +++ linux-2.4.19/drivers/usb/serial/kl5kusb105.h        Mon Nov 25 12:27:09 2002
36110 @@ -16,7 +16,7 @@
36111  
36112  /* baud rates */
36113  
36114 -typedef enum {
36115 +enum {
36116    kl5kusb105a_sio_b115200 = 0,
36117    kl5kusb105a_sio_b57600  = 1,
36118    kl5kusb105a_sio_b38400  = 2,
36119 @@ -27,7 +27,7 @@
36120    kl5kusb105a_sio_b2400   = 9,   /* unchecked */
36121    kl5kusb105a_sio_b1200   = 0xa,  /* unchecked */
36122    kl5kusb105a_sio_b600    = 0xb   /* unchecked */
36123 -} KL5KUSB105A_SIO_baudrate_t;
36124 +};
36125  
36126  /* data bits */
36127  #define kl5kusb105a_dtb_7   7
36128 diff -Nur linux-2.4.19.old/drivers/usb/serial/mct_u232.c linux-2.4.19/drivers/usb/serial/mct_u232.c
36129 --- linux-2.4.19.old/drivers/usb/serial/mct_u232.c      Fri Dec 21 18:41:55 2001
36130 +++ linux-2.4.19/drivers/usb/serial/mct_u232.c  Mon Nov 25 12:27:09 2002
36131 @@ -61,18 +61,15 @@
36132  
36133  #include <linux/config.h>
36134  #include <linux/kernel.h>
36135 -#include <linux/sched.h>
36136 -#include <linux/signal.h>
36137  #include <linux/errno.h>
36138 -#include <linux/poll.h>
36139  #include <linux/init.h>
36140  #include <linux/slab.h>
36141 -#include <linux/fcntl.h>
36142  #include <linux/tty.h>
36143  #include <linux/tty_driver.h>
36144  #include <linux/tty_flip.h>
36145  #include <linux/module.h>
36146  #include <linux/spinlock.h>
36147 +#include <asm/uaccess.h>
36148  #include <linux/usb.h>
36149  
36150  #ifdef CONFIG_USB_SERIAL_DEBUG
36151 @@ -132,7 +129,7 @@
36152  /*
36153   * All of the device info needed for the MCT USB-RS232 converter.
36154   */
36155 -static __devinitdata struct usb_device_id id_table_combined [] = {
36156 +static struct usb_device_id id_table_combined [] = {
36157         { USB_DEVICE(MCT_U232_VID, MCT_U232_PID) },
36158         { USB_DEVICE(MCT_U232_VID, MCT_U232_SITECOM_PID) },
36159         { USB_DEVICE(MCT_U232_VID, MCT_U232_DU_H3SP_PID) },
36160 @@ -140,99 +137,31 @@
36161         { }             /* Terminating entry */
36162  };
36163  
36164 -static __devinitdata struct usb_device_id mct_u232_table [] = {
36165 -        { USB_DEVICE(MCT_U232_VID, MCT_U232_PID) },
36166 -       { USB_DEVICE(MCT_U232_BELKIN_F5U109_VID, MCT_U232_BELKIN_F5U109_PID) },
36167 -        { }                        /* Terminating entry */
36168 -};
36169 -
36170 -static __devinitdata struct usb_device_id mct_u232_sitecom_table [] = {
36171 -        { USB_DEVICE(MCT_U232_VID, MCT_U232_SITECOM_PID) },
36172 -        { }                        /* Terminating entry */
36173 -};
36174 -
36175 -static __devinitdata struct usb_device_id mct_u232_du_h3sp_table [] = {
36176 -        { USB_DEVICE(MCT_U232_VID, MCT_U232_DU_H3SP_PID) },
36177 -        { }                        /* Terminating entry */
36178 -};
36179 -
36180  MODULE_DEVICE_TABLE (usb, id_table_combined);
36181  
36182  
36183  static struct usb_serial_device_type mct_u232_device = {
36184 -       name:                "Magic Control Technology USB-RS232",
36185 -       id_table:            mct_u232_table,
36186 -       needs_interrupt_in:  MUST_HAVE,  /* 2 interrupt-in endpoints */
36187 -       needs_bulk_in:       MUST_HAVE_NOT,   /* no bulk-in endpoint */
36188 -       needs_bulk_out:      MUST_HAVE,       /* 1 bulk-out endpoint */
36189 -       num_interrupt_in:    2,
36190 -       num_bulk_in:         0,
36191 -       num_bulk_out:        1,
36192 -       num_ports:           1,
36193 -       open:                mct_u232_open,
36194 -       close:               mct_u232_close,
36195 +       .owner =             THIS_MODULE,
36196 +       .name =              "Magic Control Technology USB-RS232",
36197 +       .id_table =          id_table_combined,
36198 +       .num_interrupt_in =  2,
36199 +       .num_bulk_in =       0,
36200 +       .num_bulk_out =      1,
36201 +       .num_ports =         1,
36202 +       .open =              mct_u232_open,
36203 +       .close =             mct_u232_close,
36204  #ifdef FIX_WRITE_RETURN_CODE_PROBLEM
36205 -       write:               mct_u232_write,
36206 -       write_bulk_callback: mct_u232_write_bulk_callback,
36207 +       .write =             mct_u232_write,
36208 +       .write_bulk_callback = mct_u232_write_bulk_callback,
36209  #endif
36210 -       read_int_callback:   mct_u232_read_int_callback,
36211 -       ioctl:               mct_u232_ioctl,
36212 -       set_termios:         mct_u232_set_termios,
36213 -       break_ctl:           mct_u232_break_ctl,
36214 -       startup:             mct_u232_startup,
36215 -       shutdown:            mct_u232_shutdown,
36216 +       .read_int_callback = mct_u232_read_int_callback,
36217 +       .ioctl =             mct_u232_ioctl,
36218 +       .set_termios =       mct_u232_set_termios,
36219 +       .break_ctl =         mct_u232_break_ctl,
36220 +       .startup =           mct_u232_startup,
36221 +       .shutdown =          mct_u232_shutdown,
36222  };
36223  
36224 -static struct usb_serial_device_type mct_u232_sitecom_device = {
36225 -       name:                "MCT/Sitecom USB-RS232",
36226 -       id_table:            mct_u232_sitecom_table,
36227 -       needs_interrupt_in:  MUST_HAVE,  /* 2 interrupt-in endpoints */
36228 -       needs_bulk_in:       MUST_HAVE_NOT,   /* no bulk-in endpoint */
36229 -       needs_bulk_out:      MUST_HAVE,       /* 1 bulk-out endpoint */
36230 -       num_interrupt_in:    2,
36231 -       num_bulk_in:         0,
36232 -       num_bulk_out:        1,
36233 -       num_ports:           1,
36234 -       open:                mct_u232_open,
36235 -       close:               mct_u232_close,
36236 -#ifdef FIX_WRITE_RETURN_CODE_PROBLEM
36237 -       write:               mct_u232_write,
36238 -       write_bulk_callback: mct_u232_write_bulk_callback,
36239 -#endif
36240 -       read_int_callback:   mct_u232_read_int_callback,
36241 -       ioctl:               mct_u232_ioctl,
36242 -       set_termios:         mct_u232_set_termios,
36243 -       break_ctl:           mct_u232_break_ctl,
36244 -       startup:             mct_u232_startup,
36245 -       shutdown:            mct_u232_shutdown,
36246 -};
36247 -
36248 -static struct usb_serial_device_type mct_u232_du_h3sp_device = {
36249 -        name:                "MCT/D-Link DU-H3SP USB BAY",
36250 -        id_table:            mct_u232_du_h3sp_table,
36251 -        needs_interrupt_in:  MUST_HAVE,  /* 2 interrupt-in endpoints */
36252 -        needs_bulk_in:       MUST_HAVE_NOT,   /* no bulk-in endpoint */
36253 -        needs_bulk_out:      MUST_HAVE,       /* 1 bulk-out endpoint */
36254 -        num_interrupt_in:    2,
36255 -        num_bulk_in:         0,
36256 -        num_bulk_out:        1,
36257 -        num_ports:           1,
36258 -        open:                mct_u232_open,
36259 -        close:               mct_u232_close,
36260 -#ifdef FIX_WRITE_RETURN_CODE_PROBLEM
36261 -        write:               mct_u232_write,
36262 -        write_bulk_callback: mct_u232_write_bulk_callback,
36263 -#endif
36264 -        read_int_callback:   mct_u232_read_int_callback,
36265 -        ioctl:               mct_u232_ioctl,
36266 -        set_termios:         mct_u232_set_termios,
36267 -        break_ctl:           mct_u232_break_ctl,
36268 -        startup:             mct_u232_startup,
36269 -        shutdown:            mct_u232_shutdown,
36270 -};
36271 -
36272 -
36273 -
36274  
36275  struct mct_u232_private {
36276         unsigned long        control_state; /* Modem Line Setting (TIOCM) */
36277 @@ -388,13 +317,10 @@
36278  {
36279         int i;
36280         
36281 -       dbg (__FUNCTION__);
36282 +       dbg("%s", __FUNCTION__);
36283  
36284         /* stop reads and writes on all ports */
36285         for (i=0; i < serial->num_ports; ++i) {
36286 -               while (serial->port[i].open_count > 0) {
36287 -                       mct_u232_close (&serial->port[i], NULL);
36288 -               }
36289                 /* My special items, the standard routines free my urbs */
36290                 if (serial->port[i].private)
36291                         kfree(serial->port[i].private);
36292 @@ -407,94 +333,72 @@
36293         struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
36294         int retval = 0;
36295  
36296 -       dbg(__FUNCTION__" port %d", port->number);
36297 +       dbg("%s port %d", __FUNCTION__, port->number);
36298  
36299 -       down (&port->sem);
36300 -       
36301 -       ++port->open_count;
36302 -       MOD_INC_USE_COUNT;
36303 +       /* Compensate for a hardware bug: although the Sitecom U232-P25
36304 +        * device reports a maximum output packet size of 32 bytes,
36305 +        * it seems to be able to accept only 16 bytes (and that's what
36306 +        * SniffUSB says too...)
36307 +        */
36308 +       if (serial->dev->descriptor.idProduct == MCT_U232_SITECOM_PID)
36309 +               port->bulk_out_size = 16;
36310  
36311 -       if (!port->active) {
36312 -               port->active = 1;
36313 -
36314 -               /* Compensate for a hardware bug: although the Sitecom U232-P25
36315 -                * device reports a maximum output packet size of 32 bytes,
36316 -                * it seems to be able to accept only 16 bytes (and that's what
36317 -                * SniffUSB says too...)
36318 -                */
36319 -               if (serial->dev->descriptor.idProduct == MCT_U232_SITECOM_PID)
36320 -                       port->bulk_out_size = 16;
36321 -
36322 -               /* Do a defined restart: the normal serial device seems to 
36323 -                * always turn on DTR and RTS here, so do the same. I'm not
36324 -                * sure if this is really necessary. But it should not harm
36325 -                * either.
36326 -                */
36327 -               if (port->tty->termios->c_cflag & CBAUD)
36328 -                       priv->control_state = TIOCM_DTR | TIOCM_RTS;
36329 -               else
36330 -                       priv->control_state = 0;
36331 -               mct_u232_set_modem_ctrl(serial, priv->control_state);
36332 -               
36333 -               priv->last_lcr = (MCT_U232_DATA_BITS_8 | 
36334 -                                 MCT_U232_PARITY_NONE |
36335 -                                 MCT_U232_STOP_BITS_1);
36336 -               mct_u232_set_line_ctrl(serial, priv->last_lcr);
36337 +       /* Do a defined restart: the normal serial device seems to 
36338 +        * always turn on DTR and RTS here, so do the same. I'm not
36339 +        * sure if this is really necessary. But it should not harm
36340 +        * either.
36341 +        */
36342 +       if (port->tty->termios->c_cflag & CBAUD)
36343 +               priv->control_state = TIOCM_DTR | TIOCM_RTS;
36344 +       else
36345 +               priv->control_state = 0;
36346 +       mct_u232_set_modem_ctrl(serial, priv->control_state);
36347 +       
36348 +       priv->last_lcr = (MCT_U232_DATA_BITS_8 | 
36349 +                         MCT_U232_PARITY_NONE |
36350 +                         MCT_U232_STOP_BITS_1);
36351 +       mct_u232_set_line_ctrl(serial, priv->last_lcr);
36352  
36353 -               /* Read modem status and update control state */
36354 -               mct_u232_get_modem_stat(serial, &priv->last_msr);
36355 -               mct_u232_msr_to_state(&priv->control_state, priv->last_msr);
36356 -
36357 -               {
36358 -                       /* Puh, that's dirty */
36359 -                       struct usb_serial_port *rport;  
36360 -                       rport = &serial->port[1];
36361 -                       rport->tty = port->tty;
36362 -                       rport->private = port->private;
36363 -                       port->read_urb = rport->interrupt_in_urb;
36364 -               }
36365 -
36366 -               port->read_urb->dev = port->serial->dev;
36367 -               retval = usb_submit_urb(port->read_urb);
36368 -               if (retval) {
36369 -                       err("usb_submit_urb(read bulk) failed");
36370 -                       goto exit;
36371 -               }
36372 -
36373 -               port->interrupt_in_urb->dev = port->serial->dev;
36374 -               retval = usb_submit_urb(port->interrupt_in_urb);
36375 -               if (retval)
36376 -                       err(" usb_submit_urb(read int) failed");
36377 +       /* Read modem status and update control state */
36378 +       mct_u232_get_modem_stat(serial, &priv->last_msr);
36379 +       mct_u232_msr_to_state(&priv->control_state, priv->last_msr);
36380  
36381 -       }
36382 +       {
36383 +               /* Puh, that's dirty */
36384 +               struct usb_serial_port *rport;  
36385 +               rport = &serial->port[1];
36386 +               rport->tty = port->tty;
36387 +               rport->private = port->private;
36388 +               port->read_urb = rport->interrupt_in_urb;
36389 +       }
36390 +
36391 +       port->read_urb->dev = port->serial->dev;
36392 +       retval = usb_submit_urb(port->read_urb);
36393 +       if (retval) {
36394 +               err("usb_submit_urb(read bulk) failed");
36395 +               goto exit;
36396 +       }
36397 +
36398 +       port->interrupt_in_urb->dev = port->serial->dev;
36399 +       retval = usb_submit_urb(port->interrupt_in_urb);
36400 +       if (retval)
36401 +               err(" usb_submit_urb(read int) failed");
36402  
36403  exit:
36404 -       up (&port->sem);
36405 -       
36406         return 0;
36407  } /* mct_u232_open */
36408  
36409  
36410  static void mct_u232_close (struct usb_serial_port *port, struct file *filp)
36411  {
36412 -       dbg(__FUNCTION__" port %d", port->number);
36413 -
36414 -       down (&port->sem);
36415 +       dbg("%s port %d", __FUNCTION__, port->number);
36416  
36417 -       --port->open_count;
36418 -
36419 -       if (port->open_count <= 0) {
36420 -               if (port->serial->dev) {
36421 -                       /* shutdown our urbs */
36422 -                       usb_unlink_urb (port->write_urb);
36423 -                       usb_unlink_urb (port->read_urb);
36424 -                       usb_unlink_urb (port->interrupt_in_urb);
36425 -               }
36426 -               port->active = 0;
36427 +       if (port->serial->dev) {
36428 +               /* shutdown our urbs */
36429 +               usb_unlink_urb (port->write_urb);
36430 +               usb_unlink_urb (port->read_urb);
36431 +               usb_unlink_urb (port->interrupt_in_urb);
36432         }
36433 -       
36434 -       up (&port->sem);
36435 -       MOD_DEC_USE_COUNT;
36436  } /* mct_u232_close */
36437  
36438  
36439 @@ -507,10 +411,10 @@
36440         struct usb_serial *serial = port->serial;
36441         int result, bytes_sent, size;
36442  
36443 -       dbg(__FUNCTION__ " - port %d", port->number);
36444 +       dbg("%s - port %d", __FUNCTION__, port->number);
36445  
36446         if (count == 0) {
36447 -               dbg(__FUNCTION__ " - write request of 0 bytes");
36448 +               dbg("%s - write request of 0 bytes", __FUNCTION__);
36449                 return (0);
36450         }
36451  
36452 @@ -520,22 +424,18 @@
36453         
36454         /* another write is still pending? */
36455         if (port->write_urb->status == -EINPROGRESS) {
36456 -               dbg (__FUNCTION__ " - already writing");
36457 +               dbg("%s - already writing", __FUNCTION__);
36458                 return (0);
36459         }
36460                 
36461         bytes_sent = 0;
36462         while (count > 0) {
36463 -               
36464 -               down (&port->sem);
36465 -               
36466                 size = (count > port->bulk_out_size) ? port->bulk_out_size : count;
36467                 
36468                 usb_serial_debug_data (__FILE__, __FUNCTION__, size, buf);
36469                 
36470                 if (from_user) {
36471                         if (copy_from_user(port->write_urb->transfer_buffer, buf, size)) {
36472 -                               up (&port->sem);
36473                                 return -EFAULT;
36474                         }
36475                 }
36476 @@ -556,14 +456,10 @@
36477                 /* send the data out the bulk port */
36478                 result = usb_submit_urb(port->write_urb);
36479                 if (result) {
36480 -                       err(__FUNCTION__
36481 -                           " - failed submitting write urb, error %d", result);
36482 -                       up (&port->sem);
36483 +                       err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
36484                         return result;
36485                 }
36486  
36487 -               up (&port->sem);
36488 -
36489                 bytes_sent += size;
36490                 if (write_blocking)
36491                         interruptible_sleep_on(&port->write_wait);
36492 @@ -583,15 +479,15 @@
36493         struct usb_serial *serial = port->serial;
36494                 struct tty_struct *tty = port->tty;
36495  
36496 -       dbg(__FUNCTION__ " - port %d", port->number);
36497 +       dbg("%s - port %d", __FUNCTION__, port->number);
36498         
36499         if (!serial) {
36500 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
36501 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
36502                 return;
36503         }
36504  
36505         if (urb->status) {
36506 -               dbg(__FUNCTION__ " - nonzero write bulk status received: %d",
36507 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__,
36508                     urb->status);
36509                 return;
36510         }
36511 @@ -621,16 +517,16 @@
36512         struct tty_struct *tty;
36513         unsigned char *data = urb->transfer_buffer;
36514  
36515 -        dbg(__FUNCTION__ " - port %d", port->number);
36516 +        dbg("%s - port %d", __FUNCTION__, port->number);
36517  
36518         /* The urb might have been killed. */
36519          if (urb->status) {
36520 -                dbg(__FUNCTION__ " - nonzero read bulk status received: %d",
36521 +                dbg("%s - nonzero read bulk status received: %d", __FUNCTION__,
36522                     urb->status);
36523                  return;
36524          }
36525         if (!serial) {
36526 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
36527 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
36528                 return;
36529         }
36530         
36531 @@ -707,7 +603,7 @@
36532         if( (cflag & CBAUD) != (old_cflag & CBAUD) ) {
36533                 /* reassert DTR and (maybe) RTS on transition from B0 */
36534                 if( (old_cflag & CBAUD) == B0 ) {
36535 -                       dbg(__FUNCTION__ ": baud was B0");
36536 +                       dbg("%s: baud was B0", __FUNCTION__);
36537                         priv->control_state |= TIOCM_DTR;
36538                         /* don't set RTS if using hardware flow control */
36539                         if (!(old_cflag & CRTSCTS)) {
36540 @@ -743,7 +639,7 @@
36541                         mct_u232_set_baud_rate(serial, 9600); break;
36542                 }
36543                 if ((cflag & CBAUD) == B0 ) {
36544 -                       dbg(__FUNCTION__ ": baud is B0");
36545 +                       dbg("%s: baud is B0", __FUNCTION__);
36546                         /* Drop RTS and DTR */
36547                         priv->control_state &= ~(TIOCM_DTR | TIOCM_RTS);
36548                         mct_u232_set_modem_ctrl(serial, priv->control_state);
36549 @@ -814,7 +710,7 @@
36550         struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
36551         unsigned char lcr = priv->last_lcr;
36552  
36553 -       dbg (__FUNCTION__ "state=%d", break_state);
36554 +       dbg("%sstate=%d", __FUNCTION__, break_state);
36555  
36556         if (break_state)
36557                 lcr |= MCT_U232_SET_BREAK;
36558 @@ -830,7 +726,7 @@
36559         struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
36560         int mask;
36561         
36562 -       dbg (__FUNCTION__ "cmd=0x%x", cmd);
36563 +       dbg("%scmd=0x%x", __FUNCTION__, cmd);
36564  
36565         /* Based on code from acm.c and others */
36566         switch (cmd) {
36567 @@ -875,7 +771,7 @@
36568                 return 0;
36569  
36570         default:
36571 -               dbg(__FUNCTION__ ": arg not supported - 0x%04x",cmd);
36572 +               dbg("%s: arg not supported - 0x%04x", __FUNCTION__,cmd);
36573                 return(-ENOIOCTLCMD);
36574                 break;
36575         }
36576 @@ -886,9 +782,7 @@
36577  static int __init mct_u232_init (void)
36578  {
36579         usb_serial_register (&mct_u232_device);
36580 -       usb_serial_register (&mct_u232_sitecom_device);
36581 -       usb_serial_register (&mct_u232_du_h3sp_device);
36582 -       info(DRIVER_VERSION ":" DRIVER_DESC);
36583 +       info(DRIVER_DESC " " DRIVER_VERSION);
36584         return 0;
36585  }
36586  
36587 @@ -896,8 +790,6 @@
36588  static void __exit mct_u232_exit (void)
36589  {
36590         usb_serial_deregister (&mct_u232_device);
36591 -       usb_serial_deregister (&mct_u232_sitecom_device);
36592 -       usb_serial_deregister (&mct_u232_du_h3sp_device);
36593  }
36594  
36595  
36596 diff -Nur linux-2.4.19.old/drivers/usb/serial/omninet.c linux-2.4.19/drivers/usb/serial/omninet.c
36597 --- linux-2.4.19.old/drivers/usb/serial/omninet.c       Fri Dec 21 18:41:55 2001
36598 +++ linux-2.4.19/drivers/usb/serial/omninet.c   Mon Nov 25 12:27:11 2002
36599 @@ -37,18 +37,15 @@
36600  
36601  #include <linux/config.h>
36602  #include <linux/kernel.h>
36603 -#include <linux/sched.h>
36604 -#include <linux/signal.h>
36605  #include <linux/errno.h>
36606 -#include <linux/poll.h>
36607  #include <linux/init.h>
36608  #include <linux/slab.h>
36609 -#include <linux/fcntl.h>
36610  #include <linux/tty.h>
36611  #include <linux/tty_driver.h>
36612  #include <linux/tty_flip.h>
36613  #include <linux/module.h>
36614  #include <linux/spinlock.h>
36615 +#include <asm/uaccess.h>
36616  #include <linux/usb.h>
36617  
36618  #ifdef CONFIG_USB_SERIAL_DEBUG
36619 @@ -79,7 +76,7 @@
36620  static int  omninet_write_room         (struct usb_serial_port *port);
36621  static void omninet_shutdown           (struct usb_serial *serial);
36622  
36623 -static __devinitdata struct usb_device_id id_table [] = {
36624 +static struct usb_device_id id_table [] = {
36625         { USB_DEVICE(ZYXEL_VENDOR_ID, ZYXEL_OMNINET_ID) },
36626         { }                                             /* Terminating entry */
36627  };
36628 @@ -88,22 +85,20 @@
36629  
36630  
36631  static struct usb_serial_device_type zyxel_omninet_device = {
36632 -       name:                   "ZyXEL - omni.net lcd plus usb",
36633 -       id_table:               id_table,
36634 -       needs_interrupt_in:     MUST_HAVE,
36635 -       needs_bulk_in:          MUST_HAVE,
36636 -       needs_bulk_out:         MUST_HAVE,
36637 -       num_interrupt_in:       1,
36638 -       num_bulk_in:            1,
36639 -       num_bulk_out:           2,
36640 -       num_ports:              1,
36641 -       open:                   omninet_open,
36642 -       close:                  omninet_close,
36643 -       write:                  omninet_write,
36644 -       write_room:             omninet_write_room,
36645 -       read_bulk_callback:     omninet_read_bulk_callback,
36646 -       write_bulk_callback:    omninet_write_bulk_callback,
36647 -       shutdown:               omninet_shutdown,
36648 +       .owner =                THIS_MODULE,
36649 +       .name =                 "ZyXEL - omni.net lcd plus usb",
36650 +       .id_table =             id_table,
36651 +       .num_interrupt_in =     1,
36652 +       .num_bulk_in =          1,
36653 +       .num_bulk_out =         2,
36654 +       .num_ports =            1,
36655 +       .open =                 omninet_open,
36656 +       .close =                omninet_close,
36657 +       .write =                omninet_write,
36658 +       .write_room =           omninet_write_room,
36659 +       .read_bulk_callback =   omninet_read_bulk_callback,
36660 +       .write_bulk_callback =  omninet_write_bulk_callback,
36661 +       .shutdown =             omninet_shutdown,
36662  };
36663  
36664  
36665 @@ -153,45 +148,30 @@
36666         if (port_paranoia_check (port, __FUNCTION__))
36667                 return -ENODEV;
36668  
36669 -       dbg(__FUNCTION__ " - port %d", port->number);
36670 +       dbg("%s - port %d", __FUNCTION__, port->number);
36671  
36672         serial = get_usb_serial (port, __FUNCTION__);
36673         if (!serial)
36674                 return -ENODEV;
36675  
36676 -       down (&port->sem);
36677 -
36678 -       MOD_INC_USE_COUNT;
36679 -       ++port->open_count;
36680 -
36681 -       if (!port->active) {
36682 -               port->active = 1;
36683 -
36684 -               od = kmalloc( sizeof(struct omninet_data), GFP_KERNEL );
36685 -               if( !od ) {
36686 -                       err(__FUNCTION__"- kmalloc(%Zd) failed.", sizeof(struct omninet_data));
36687 -                       --port->open_count;
36688 -                       port->active = 0;
36689 -                       up (&port->sem);
36690 -                       MOD_DEC_USE_COUNT;
36691 -                       return -ENOMEM;
36692 -               }
36693 -
36694 -               port->private = od;
36695 -               wport = &serial->port[1];
36696 -               wport->tty = port->tty;
36697 -
36698 -               /* Start reading from the device */
36699 -               FILL_BULK_URB(port->read_urb, serial->dev, 
36700 -                             usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
36701 -                             port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
36702 -                             omninet_read_bulk_callback, port);
36703 -               result = usb_submit_urb(port->read_urb);
36704 -               if (result)
36705 -                       err(__FUNCTION__ " - failed submitting read urb, error %d", result);
36706 +       od = kmalloc( sizeof(struct omninet_data), GFP_KERNEL );
36707 +       if( !od ) {
36708 +               err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct omninet_data));
36709 +               return -ENOMEM;
36710         }
36711  
36712 -       up (&port->sem);
36713 +       port->private = od;
36714 +       wport = &serial->port[1];
36715 +       wport->tty = port->tty;
36716 +
36717 +       /* Start reading from the device */
36718 +       FILL_BULK_URB(port->read_urb, serial->dev, 
36719 +                     usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
36720 +                     port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
36721 +                     omninet_read_bulk_callback, port);
36722 +       result = usb_submit_urb(port->read_urb);
36723 +       if (result)
36724 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
36725  
36726         return result;
36727  }
36728 @@ -205,32 +185,21 @@
36729         if (port_paranoia_check (port, __FUNCTION__))
36730                 return;
36731  
36732 -       dbg(__FUNCTION__ " - port %d", port->number);
36733 +       dbg("%s - port %d", __FUNCTION__, port->number);
36734  
36735         serial = get_usb_serial (port, __FUNCTION__);
36736         if (!serial)
36737                 return;
36738  
36739 -       down (&port->sem);
36740 -
36741 -       --port->open_count;
36742 -
36743 -       if (port->open_count <= 0) {
36744 -               if (serial->dev) {
36745 -                       wport = &serial->port[1];
36746 -                       usb_unlink_urb (wport->write_urb);
36747 -                       usb_unlink_urb (port->read_urb);
36748 -               }
36749 -
36750 -               port->active = 0;
36751 -               port->open_count = 0;
36752 -               od = (struct omninet_data *)port->private;
36753 -               if (od)
36754 -                       kfree(od);
36755 +       if (serial->dev) {
36756 +               wport = &serial->port[1];
36757 +               usb_unlink_urb (wport->write_urb);
36758 +               usb_unlink_urb (port->read_urb);
36759         }
36760  
36761 -       up (&port->sem);
36762 -       MOD_DEC_USE_COUNT;
36763 +       od = (struct omninet_data *)port->private;
36764 +       if (od)
36765 +               kfree(od);
36766  }
36767  
36768  
36769 @@ -252,12 +221,12 @@
36770  //     dbg("omninet_read_bulk_callback");
36771  
36772         if (!serial) {
36773 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
36774 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
36775                 return;
36776         }
36777  
36778         if (urb->status) {
36779 -               dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
36780 +               dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
36781                 return;
36782         }
36783  
36784 @@ -285,7 +254,7 @@
36785                       omninet_read_bulk_callback, port);
36786         result = usb_submit_urb(urb);
36787         if (result)
36788 -               err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
36789 +               err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
36790  
36791         return;
36792  }
36793 @@ -303,11 +272,11 @@
36794  //     dbg("omninet_write port %d", port->number);
36795  
36796         if (count == 0) {
36797 -               dbg(__FUNCTION__" - write request of 0 bytes");
36798 +               dbg("%s - write request of 0 bytes", __FUNCTION__);
36799                 return (0);
36800         }
36801         if (wport->write_urb->status == -EINPROGRESS) {
36802 -               dbg (__FUNCTION__" - already writing");
36803 +               dbg("%s - already writing", __FUNCTION__);
36804                 return (0);
36805         }
36806  
36807 @@ -336,7 +305,7 @@
36808         wport->write_urb->dev = serial->dev;
36809         result = usb_submit_urb(wport->write_urb);
36810         if (result)
36811 -               err(__FUNCTION__ " - failed submitting write urb, error %d", result);
36812 +               err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
36813         else
36814                 result = count;
36815  
36816 @@ -379,7 +348,7 @@
36817         }
36818  
36819         if (urb->status) {
36820 -               dbg(__FUNCTION__" - nonzero write bulk status received: %d", urb->status);
36821 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
36822                 return;
36823         }
36824  
36825 @@ -394,11 +363,7 @@
36826  
36827  static void omninet_shutdown (struct usb_serial *serial)
36828  {
36829 -       dbg (__FUNCTION__);
36830 -
36831 -       while (serial->port[0].open_count > 0) {
36832 -               omninet_close (&serial->port[0], NULL);
36833 -       }
36834 +       dbg ("%s", __FUNCTION__);
36835  }
36836  
36837  
36838 diff -Nur linux-2.4.19.old/drivers/usb/serial/pl2303.c linux-2.4.19/drivers/usb/serial/pl2303.c
36839 --- linux-2.4.19.old/drivers/usb/serial/pl2303.c        Sat Aug  3 02:39:45 2002
36840 +++ linux-2.4.19/drivers/usb/serial/pl2303.c    Mon Nov 25 12:27:11 2002
36841 @@ -1,7 +1,7 @@
36842  /*
36843   * Prolific PL2303 USB to serial adaptor driver
36844   *
36845 - * Copyright (C) 2001 Greg Kroah-Hartman (greg@kroah.com)
36846 + * Copyright (C) 2001-2002 Greg Kroah-Hartman (greg@kroah.com)
36847   *
36848   * Original driver for 2.2.x by anonymous
36849   *
36850 @@ -32,19 +32,16 @@
36851  
36852  #include <linux/config.h>
36853  #include <linux/kernel.h>
36854 -#include <linux/sched.h>
36855 -#include <linux/signal.h>
36856  #include <linux/errno.h>
36857 -#include <linux/poll.h>
36858  #include <linux/init.h>
36859  #include <linux/slab.h>
36860 -#include <linux/fcntl.h>
36861  #include <linux/tty.h>
36862  #include <linux/tty_driver.h>
36863  #include <linux/tty_flip.h>
36864  #include <linux/serial.h>
36865  #include <linux/module.h>
36866  #include <linux/spinlock.h>
36867 +#include <asm/uaccess.h>
36868  #include <linux/usb.h>
36869  
36870  #ifdef CONFIG_USB_SERIAL_DEBUG
36871 @@ -64,11 +61,14 @@
36872  
36873  
36874  
36875 -static __devinitdata struct usb_device_id id_table [] = {
36876 +static struct usb_device_id id_table [] = {
36877         { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID) },
36878         { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ2) },
36879         { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
36880         { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) },
36881 +       { USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID) },
36882 +       { USB_DEVICE(ITEGNO_VENDOR_ID, ITEGNO_PRODUCT_ID) },
36883 +       { USB_DEVICE(MA620_VENDOR_ID, MA620_PRODUCT_ID) },
36884         { }                                     /* Terminating entry */
36885  };
36886  
36887 @@ -116,26 +116,24 @@
36888  
36889  /* All of the device info needed for the PL2303 SIO serial converter */
36890  static struct usb_serial_device_type pl2303_device = {
36891 -       name:                   "PL-2303",
36892 -       id_table:               id_table,
36893 -       needs_interrupt_in:     DONT_CARE,              /* this device must have an interrupt in endpoint */
36894 -       needs_bulk_in:          MUST_HAVE,              /* this device must have a bulk in endpoint */
36895 -       needs_bulk_out:         MUST_HAVE,              /* this device must have a bulk out endpoint */
36896 -       num_interrupt_in:       NUM_DONT_CARE,
36897 -       num_bulk_in:            1,
36898 -       num_bulk_out:           1,
36899 -       num_ports:              1,
36900 -       open:                   pl2303_open,
36901 -       close:                  pl2303_close,
36902 -       write:                  pl2303_write,
36903 -       ioctl:                  pl2303_ioctl,
36904 -       break_ctl:              pl2303_break_ctl,
36905 -       set_termios:            pl2303_set_termios,
36906 -       read_bulk_callback:     pl2303_read_bulk_callback,
36907 -       read_int_callback:      pl2303_read_int_callback,
36908 -       write_bulk_callback:    pl2303_write_bulk_callback,
36909 -       startup:                pl2303_startup,
36910 -       shutdown:               pl2303_shutdown,
36911 +       .owner =                THIS_MODULE,
36912 +       .name =                 "PL-2303",
36913 +       .id_table =             id_table,
36914 +       .num_interrupt_in =     NUM_DONT_CARE,
36915 +       .num_bulk_in =          1,
36916 +       .num_bulk_out =         1,
36917 +       .num_ports =            1,
36918 +       .open =                 pl2303_open,
36919 +       .close =                pl2303_close,
36920 +       .write =                pl2303_write,
36921 +       .ioctl =                pl2303_ioctl,
36922 +       .break_ctl =            pl2303_break_ctl,
36923 +       .set_termios =          pl2303_set_termios,
36924 +       .read_bulk_callback =   pl2303_read_bulk_callback,
36925 +       .read_int_callback =    pl2303_read_int_callback,
36926 +       .write_bulk_callback =  pl2303_write_bulk_callback,
36927 +       .startup =              pl2303_startup,
36928 +       .shutdown =             pl2303_shutdown,
36929  };
36930  
36931  struct pl2303_private { 
36932 @@ -166,7 +164,7 @@
36933         retval = usb_control_msg (dev, usb_sndctrlpipe (dev, 0),
36934                                   SET_CONTROL_REQUEST, SET_CONTROL_REQUEST_TYPE,
36935                                   value, 0, NULL, 0, 100);
36936 -       dbg (__FUNCTION__" - value = %d, retval = %d", value, retval);
36937 +       dbg("%s - value = %d, retval = %d", __FUNCTION__, value, retval);
36938         return retval;
36939  }
36940  
36941 @@ -174,15 +172,10 @@
36942  {
36943         int result;
36944  
36945 -       dbg (__FUNCTION__ " - port %d, %d bytes", port->number, count);
36946 -
36947 -       if (!port->tty) {
36948 -               err (__FUNCTION__ " - no tty???");
36949 -               return 0;
36950 -       }
36951 +       dbg("%s - port %d, %d bytes", __FUNCTION__, port->number, count);
36952  
36953         if (port->write_urb->status == -EINPROGRESS) {
36954 -               dbg (__FUNCTION__ " - already writing");
36955 +               dbg("%s - already writing", __FUNCTION__);
36956                 return 0;
36957         }
36958  
36959 @@ -200,7 +193,7 @@
36960         port->write_urb->dev = port->serial->dev;
36961         result = usb_submit_urb (port->write_urb);
36962         if (result)
36963 -               err(__FUNCTION__ " - failed submitting write urb, error %d", result);
36964 +               err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
36965         else
36966                 result = count;
36967  
36968 @@ -218,15 +211,15 @@
36969         int baud;
36970         int i;
36971  
36972 -       dbg (__FUNCTION__ " -  port %d, initialized = %d", port->number, 
36973 +       dbg("%s -  port %d, initialized = %d", __FUNCTION__, port->number, 
36974              ((struct pl2303_private *) port->private)->termios_initialized);
36975  
36976         if ((!port->tty) || (!port->tty->termios)) {
36977 -               dbg(__FUNCTION__" - no tty structures");
36978 +               dbg("%s - no tty structures", __FUNCTION__);
36979                 return;
36980         }
36981  
36982 -       if (!(((struct pl2303_private *)port->private)->termios_initialized)) {
36983 +       if (!(((struct pl2303_private *) port->private)->termios_initialized)) {
36984                 *(port->tty->termios) = tty_std_termios;
36985                 port->tty->termios->c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
36986                 ((struct pl2303_private *) port->private)->termios_initialized = 1;
36987 @@ -236,14 +229,14 @@
36988         if (old_termios) {
36989                 if ((cflag == old_termios->c_cflag) &&
36990                     (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
36991 -                   dbg(__FUNCTION__ " - nothing to change...");
36992 +                   dbg("%s - nothing to change...", __FUNCTION__);
36993                     return;
36994                 }
36995         }
36996  
36997         buf = kmalloc (7, GFP_KERNEL);
36998         if (!buf) {
36999 -               err(__FUNCTION__ " - out of memory.");
37000 +               err("%s - out of memory.", __FUNCTION__);
37001                 return;
37002         }
37003         memset (buf, 0x00, 0x07);
37004 @@ -269,7 +262,7 @@
37005                         default:
37006                         case CS8:       buf[6] = 8;     break;
37007                 }
37008 -               dbg (__FUNCTION__ " - data bits = %d", buf[6]);
37009 +               dbg("%s - data bits = %d", __FUNCTION__, buf[6]);
37010         }
37011  
37012         baud = 0;
37013 @@ -294,7 +287,7 @@
37014                         err ("pl2303 driver does not support the baudrate requested (fix it)");
37015                         break;
37016         }
37017 -       dbg (__FUNCTION__ " - baud = %d", baud);
37018 +       dbg("%s - baud = %d", __FUNCTION__, baud);
37019         if (baud) {
37020                 buf[0] = baud & 0xff;
37021                 buf[1] = (baud >> 8) & 0xff;
37022 @@ -307,10 +300,10 @@
37023         /* For reference buf[4]=2 is 2 stop bits */
37024         if (cflag & CSTOPB) {
37025                 buf[4] = 2;
37026 -               dbg(__FUNCTION__ " - stop bits = 2");
37027 +               dbg("%s - stop bits = 2", __FUNCTION__);
37028         } else {
37029                 buf[4] = 0;
37030 -               dbg(__FUNCTION__ " - stop bits = 1");
37031 +               dbg("%s - stop bits = 1", __FUNCTION__);
37032         }
37033  
37034         if (cflag & PARENB) {
37035 @@ -321,14 +314,14 @@
37036                 /* For reference buf[5]=4 is space parity */
37037                 if (cflag & PARODD) {
37038                         buf[5] = 1;
37039 -                       dbg(__FUNCTION__ " - parity = odd");
37040 +                       dbg("%s - parity = odd", __FUNCTION__);
37041                 } else {
37042                         buf[5] = 2;
37043 -                       dbg(__FUNCTION__ " - parity = even");
37044 +                       dbg("%s - parity = even", __FUNCTION__);
37045                 }
37046         } else {
37047                 buf[5] = 0;
37048 -               dbg(__FUNCTION__ " - parity = none");
37049 +               dbg("%s - parity = none", __FUNCTION__);
37050         }
37051  
37052         i = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 0),
37053 @@ -355,7 +348,7 @@
37054  
37055         if (cflag & CRTSCTS) {
37056                 i = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 0),
37057 -                                    VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST_TYPE,
37058 +                                    VENDOR_WRITE_REQUEST, VENDOR_WRITE_REQUEST_TYPE,
37059                                      0x0, 0x41, NULL, 0, 100);
37060                 dbg ("0x40:0x1:0x0:0x41  %d", i);
37061         }
37062 @@ -374,64 +367,54 @@
37063         if (port_paranoia_check (port, __FUNCTION__))
37064                 return -ENODEV;
37065                 
37066 -       dbg (__FUNCTION__ " -  port %d", port->number);
37067 +       dbg("%s -  port %d", __FUNCTION__, port->number);
37068  
37069 -       down (&port->sem);
37070 +#define FISH(a,b,c,d)                                                          \
37071 +       result=usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev,0),     \
37072 +                              b, a, c, d, buf, 1, 100);                        \
37073 +       dbg("0x%x:0x%x:0x%x:0x%x  %d - %x",a,b,c,d,result,buf[0]);
37074 +
37075 +#define SOUP(a,b,c,d)                                                          \
37076 +       result=usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev,0),     \
37077 +                              b, a, c, d, NULL, 0, 100);                       \
37078 +       dbg("0x%x:0x%x:0x%x:0x%x  %d",a,b,c,d,result);
37079 +
37080 +       FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
37081 +       SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0x0404, 0);
37082 +       FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
37083 +       FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8383, 0);
37084 +       FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
37085 +       SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0x0404, 1);
37086 +       FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
37087 +       FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8383, 0);
37088 +       SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0, 1);
37089 +       SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 1, 0xc0);
37090 +       SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 2, 4);
37091  
37092 -       ++port->open_count;
37093 -       MOD_INC_USE_COUNT;
37094 -
37095 -       if (!port->active) {
37096 -               port->active = 1;
37097 -
37098 -#define FISH(a,b,c,d)                                                                  \
37099 -               result=usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev,0),     \
37100 -                                      b, a, c, d, buf, 1, 100);                        \
37101 -               dbg("0x%x:0x%x:0x%x:0x%x  %d - %x",a,b,c,d,result,buf[0]);
37102 -
37103 -#define SOUP(a,b,c,d)                                                                  \
37104 -               result=usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev,0),     \
37105 -                                      b, a, c, d, NULL, 0, 100);                       \
37106 -               dbg("0x%x:0x%x:0x%x:0x%x  %d",a,b,c,d,result);
37107 -
37108 -               FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
37109 -               SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0x0404, 0);
37110 -               FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
37111 -               FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8383, 0);
37112 -               FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
37113 -               SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0x0404, 1);
37114 -               FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
37115 -               FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8383, 0);
37116 -               SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0, 1);
37117 -               SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 1, 0xc0);
37118 -               SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 2, 4);
37119 -
37120 -               /* Setup termios */
37121 +       /* Setup termios */
37122 +       if (port->tty) {
37123                 pl2303_set_termios (port, &tmp_termios);
37124 +       }
37125  
37126 -               //FIXME: need to assert RTS and DTR if CRTSCTS off
37127 -
37128 -               dbg (__FUNCTION__ " - submitting read urb");
37129 -               port->read_urb->dev = serial->dev;
37130 -               result = usb_submit_urb (port->read_urb);
37131 -               if (result) {
37132 -                       err(__FUNCTION__ " - failed submitting read urb, error %d", result);
37133 -                       up (&port->sem);
37134 -                       pl2303_close (port, NULL);
37135 -                       return -EPROTO;
37136 -               }
37137 +       //FIXME: need to assert RTS and DTR if CRTSCTS off
37138  
37139 -               dbg (__FUNCTION__ " - submitting interrupt urb");
37140 -               port->interrupt_in_urb->dev = serial->dev;
37141 -               result = usb_submit_urb (port->interrupt_in_urb);
37142 -               if (result) {
37143 -                       err(__FUNCTION__ " - failed submitting interrupt urb, error %d", result);
37144 -                       up (&port->sem);
37145 -                       pl2303_close (port, NULL);
37146 -                       return -EPROTO;
37147 -               }
37148 +       dbg("%s - submitting read urb", __FUNCTION__);
37149 +       port->read_urb->dev = serial->dev;
37150 +       result = usb_submit_urb (port->read_urb);
37151 +       if (result) {
37152 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
37153 +               pl2303_close (port, NULL);
37154 +               return -EPROTO;
37155 +       }
37156 +
37157 +       dbg("%s - submitting interrupt urb", __FUNCTION__);
37158 +       port->interrupt_in_urb->dev = serial->dev;
37159 +       result = usb_submit_urb (port->interrupt_in_urb);
37160 +       if (result) {
37161 +               err("%s - failed submitting interrupt urb, error %d", __FUNCTION__, result);
37162 +               pl2303_close (port, NULL);
37163 +               return -EPROTO;
37164         }
37165 -       up (&port->sem);
37166         return 0;
37167  }
37168  
37169 @@ -449,13 +432,10 @@
37170         if (!serial)
37171                 return;
37172         
37173 -       dbg (__FUNCTION__ " - port %d", port->number);
37174 +       dbg("%s - port %d", __FUNCTION__, port->number);
37175  
37176 -       down (&port->sem);
37177 -
37178 -       --port->open_count;
37179 -       if (port->open_count <= 0) {
37180 -               if (serial->dev) {
37181 +       if (serial->dev) {
37182 +               if (port->tty) {
37183                         c_cflag = port->tty->termios->c_cflag;
37184                         if (c_cflag & HUPCL) {
37185                                 /* drop DTR and RTS */
37186 @@ -464,34 +444,28 @@
37187                                 set_control_lines (port->serial->dev,
37188                                                    priv->line_control);
37189                         }
37190 +               }
37191  
37192 -                       /* shutdown our urbs */
37193 -                       dbg (__FUNCTION__ " - shutting down urbs");
37194 -                       result = usb_unlink_urb (port->write_urb);
37195 -                       if (result)
37196 -                               dbg (__FUNCTION__ " - usb_unlink_urb "
37197 -                                    "(write_urb) failed with reason: %d",
37198 -                                    result);
37199 -
37200 -                       result = usb_unlink_urb (port->read_urb);
37201 -                       if (result)
37202 -                               dbg (__FUNCTION__ " - usb_unlink_urb "
37203 -                                    "(read_urb) failed with reason: %d",
37204 -                                    result);
37205 +               /* shutdown our urbs */
37206 +               dbg("%s - shutting down urbs", __FUNCTION__);
37207 +               result = usb_unlink_urb (port->write_urb);
37208 +               if (result)
37209 +                       dbg("%s - usb_unlink_urb (write_urb)"
37210 +                           " failed with reason: %d", __FUNCTION__,
37211 +                            result);
37212  
37213 -                       result = usb_unlink_urb (port->interrupt_in_urb);
37214 -                       if (result)
37215 -                               dbg (__FUNCTION__ " - usb_unlink_urb "
37216 -                                    "(interrupt_in_urb) failed with reason: %d",
37217 -                                    result);
37218 -               }
37219 +               result = usb_unlink_urb (port->read_urb);
37220 +               if (result)
37221 +                       dbg("%s - usb_unlink_urb (read_urb) "
37222 +                           "failed with reason: %d", __FUNCTION__,
37223 +                            result);
37224  
37225 -               port->active = 0;
37226 -               port->open_count = 0;
37227 +               result = usb_unlink_urb (port->interrupt_in_urb);
37228 +               if (result)
37229 +                       dbg("%s - usb_unlink_urb (interrupt_in_urb)"
37230 +                           " failed with reason: %d", __FUNCTION__,
37231 +                            result);
37232         }
37233 -
37234 -       up (&port->sem);
37235 -       MOD_DEC_USE_COUNT;
37236  }
37237  
37238  static int set_modem_info (struct usb_serial_port *port, unsigned int cmd, unsigned int *value)
37239 @@ -538,7 +512,7 @@
37240         result = ((mcr & CONTROL_DTR)           ? TIOCM_DTR : 0)
37241                   | ((mcr & CONTROL_RTS)        ? TIOCM_RTS : 0);
37242  
37243 -       dbg (__FUNCTION__ " - result = %x", result);
37244 +       dbg("%s - result = %x", __FUNCTION__, result);
37245  
37246         if (copy_to_user(value, &result, sizeof(int)))
37247                 return -EFAULT;
37248 @@ -547,22 +521,22 @@
37249  
37250  static int pl2303_ioctl (struct usb_serial_port *port, struct file *file, unsigned int cmd, unsigned long arg)
37251  {
37252 -       dbg (__FUNCTION__" (%d) cmd = 0x%04x", port->number, cmd);
37253 +       dbg("%s (%d) cmd = 0x%04x", __FUNCTION__, port->number, cmd);
37254  
37255         switch (cmd) {
37256                 
37257                 case TIOCMGET:
37258 -                       dbg (__FUNCTION__" (%d) TIOCMGET", port->number);
37259 +                       dbg("%s (%d) TIOCMGET", __FUNCTION__, port->number);
37260                         return get_modem_info (port, (unsigned int *)arg);
37261  
37262                 case TIOCMBIS:
37263                 case TIOCMBIC:
37264                 case TIOCMSET:
37265 -                       dbg(__FUNCTION__" (%d) TIOCMSET/TIOCMBIC/TIOCMSET",  port->number);
37266 +                       dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __FUNCTION__,  port->number);
37267                         return set_modem_info(port, cmd, (unsigned int *) arg);
37268  
37269                 default:
37270 -                       dbg (__FUNCTION__" not supported = 0x%04x", cmd);
37271 +                       dbg("%s not supported = 0x%04x", __FUNCTION__, cmd);
37272                         break;
37273         }
37274  
37275 @@ -576,19 +550,19 @@
37276         u16 state;
37277         int result;
37278  
37279 -       dbg (__FUNCTION__ " - port %d", port->number);
37280 +       dbg("%s - port %d", __FUNCTION__, port->number);
37281  
37282         if (break_state == 0)
37283                 state = BREAK_OFF;
37284         else
37285                 state = BREAK_ON;
37286 -       dbg (__FUNCTION__" - turning break %s", state==BREAK_OFF ? "off" : "on");
37287 +       dbg("%s - turning break %s", state==BREAK_OFF ? "off" : "on", __FUNCTION__);
37288  
37289         result = usb_control_msg (serial->dev, usb_rcvctrlpipe (serial->dev, 0),
37290                                   BREAK_REQUEST, BREAK_REQUEST_TYPE, state, 
37291                                   0, NULL, 0, 100);
37292         if (result)
37293 -               dbg (__FUNCTION__" - error sending break = %d", result);
37294 +               dbg("%s - error sending break = %d", __FUNCTION__, result);
37295  }
37296  
37297  
37298 @@ -596,14 +570,10 @@
37299  {
37300         int i;
37301  
37302 -       dbg (__FUNCTION__);
37303 +       dbg("%s", __FUNCTION__);
37304  
37305 -       /* stop everything on all ports */
37306         for (i = 0; i < serial->num_ports; ++i)
37307 -               while (serial->port[i].open_count > 0) {
37308 -                       pl2303_close (&serial->port[i], NULL);
37309 -                       kfree (serial->port[i].private);
37310 -               }
37311 +               kfree (serial->port[i].private);
37312  }
37313  
37314  
37315 @@ -646,37 +616,37 @@
37316         if (port_paranoia_check (port, __FUNCTION__))
37317                 return;
37318  
37319 -       dbg(__FUNCTION__ " - port %d", port->number);
37320 +       dbg("%s - port %d", __FUNCTION__, port->number);
37321  
37322         if (!serial) {
37323 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
37324 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
37325                 return;
37326         }
37327  
37328         if (urb->status) {
37329 -               dbg (__FUNCTION__ " - urb->status = %d", urb->status);
37330 -               if (!port->active) {
37331 -                       dbg (__FUNCTION__ " - port is closed, exiting.");
37332 +               dbg("%s - urb->status = %d", __FUNCTION__, urb->status);
37333 +               if (!port->open_count) {
37334 +                       dbg("%s - port is closed, exiting.", __FUNCTION__);
37335                         return;
37336                 }
37337                 if (urb->status == -EPROTO) {
37338                         /* PL2303 mysteriously fails with -EPROTO reschedule the read */
37339 -                       dbg (__FUNCTION__ " - caught -EPROTO, resubmitting the urb");
37340 +                       dbg("%s - caught -EPROTO, resubmitting the urb", __FUNCTION__);
37341                         urb->status = 0;
37342                         urb->dev = serial->dev;
37343                         result = usb_submit_urb(urb);
37344                         if (result)
37345 -                               err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
37346 +                               err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
37347                         return;
37348                 }
37349 -               dbg (__FUNCTION__ " - unable to handle the error, exiting.");
37350 +               dbg("%s - unable to handle the error, exiting.", __FUNCTION__);
37351                 return;
37352         }
37353  
37354         usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
37355  
37356         tty = port->tty;
37357 -       if (urb->actual_length) {
37358 +       if (tty && urb->actual_length) {
37359                 for (i = 0; i < urb->actual_length; ++i) {
37360                         if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
37361                                 tty_flip_buffer_push(tty);
37362 @@ -687,11 +657,11 @@
37363         }
37364  
37365         /* Schedule the next read _if_ we are still open */
37366 -       if (port->active) {
37367 +       if (port->open_count) {
37368                 urb->dev = serial->dev;
37369                 result = usb_submit_urb(urb);
37370                 if (result)
37371 -                       err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
37372 +                       err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
37373         }
37374  
37375         return;
37376 @@ -707,20 +677,20 @@
37377         if (port_paranoia_check (port, __FUNCTION__))
37378                 return;
37379         
37380 -       dbg(__FUNCTION__ " - port %d", port->number);
37381 +       dbg("%s - port %d", __FUNCTION__, port->number);
37382         
37383         if (urb->status) {
37384                 /* error in the urb, so we have to resubmit it */
37385                 if (serial_paranoia_check (port->serial, __FUNCTION__)) {
37386                         return;
37387                 }
37388 -               dbg (__FUNCTION__ " - Overflow in write");
37389 -               dbg (__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
37390 +               dbg("%s - Overflow in write", __FUNCTION__);
37391 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
37392                 port->write_urb->transfer_buffer_length = 1;
37393                 port->write_urb->dev = port->serial->dev;
37394                 result = usb_submit_urb (port->write_urb);
37395                 if (result)
37396 -                       err(__FUNCTION__ " - failed resubmitting write urb, error %d", result);
37397 +                       err("%s - failed resubmitting write urb, error %d", __FUNCTION__, result);
37398  
37399                 return;
37400         }
37401 diff -Nur linux-2.4.19.old/drivers/usb/serial/pl2303.h linux-2.4.19/drivers/usb/serial/pl2303.h
37402 --- linux-2.4.19.old/drivers/usb/serial/pl2303.h        Wed Oct 10 00:15:02 2001
37403 +++ linux-2.4.19/drivers/usb/serial/pl2303.h    Mon Nov 25 12:27:11 2002
37404 @@ -16,3 +16,12 @@
37405  
37406  #define IODATA_VENDOR_ID       0x04bb
37407  #define IODATA_PRODUCT_ID      0x0a03
37408 +
37409 +#define ELCOM_VENDOR_ID                0x056e
37410 +#define ELCOM_PRODUCT_ID       0x5003
37411 +
37412 +#define ITEGNO_VENDOR_ID       0x0eba
37413 +#define ITEGNO_PRODUCT_ID      0x1080
37414 +
37415 +#define MA620_VENDOR_ID                0x0df7
37416 +#define MA620_PRODUCT_ID       0x0620
37417 diff -Nur linux-2.4.19.old/drivers/usb/serial/usb-serial.h linux-2.4.19/drivers/usb/serial/usb-serial.h
37418 --- linux-2.4.19.old/drivers/usb/serial/usb-serial.h    Mon Feb 25 20:38:07 2002
37419 +++ linux-2.4.19/drivers/usb/serial/usb-serial.h        Mon Nov 25 12:27:12 2002
37420 @@ -1,7 +1,7 @@
37421  /*
37422   * USB Serial Converter driver
37423   *
37424 - *     Copyright (C) 1999 - 2001
37425 + *     Copyright (C) 1999 - 2002
37426   *         Greg Kroah-Hartman (greg@kroah.com)
37427   *
37428   *     This program is free software; you can redistribute it and/or modify
37429 @@ -11,6 +11,10 @@
37430   *
37431   * See Documentation/usb/usb-serial.txt for more information on using this driver
37432   *
37433 + * (12/03/2001) gkh
37434 + *     removed active from the port structure.
37435 + *     added documentation to the usb_serial_device_type structure
37436 + *
37437   * (10/10/2001) gkh
37438   *     added vendor and product to serial structure.  Needed to determine device
37439   *     owner when the device is disconnected.
37440 @@ -59,13 +63,41 @@
37441  /* parity check flag */
37442  #define RELEVANT_IFLAG(iflag)  (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
37443  
37444 -
37445 +/**
37446 + * usb_serial_port: structure for the specific ports of a device.
37447 + * @magic: magic number for internal validity of this pointer.
37448 + * @serial: pointer back to the struct usb_serial owner of this port.
37449 + * @tty: pointer to the coresponding tty for this port.
37450 + * @number: the number of the port (the minor number).
37451 + * @interrupt_in_buffer: pointer to the interrupt in buffer for this port.
37452 + * @interrupt_in_urb: pointer to the interrupt in struct urb for this port.
37453 + * @interrupt_in_endpointAddress: endpoint address for the interrupt in pipe
37454 + *     for this port.
37455 + * @bulk_in_buffer: pointer to the bulk in buffer for this port.
37456 + * @read_urb: pointer to the bulk in struct urb for this port.
37457 + * @bulk_in_endpointAddress: endpoint address for the bulk in pipe for this
37458 + *     port.
37459 + * @bulk_out_buffer: pointer to the bulk out buffer for this port.
37460 + * @bulk_out_size: the size of the bulk_out_buffer, in bytes.
37461 + * @write_urb: pointer to the bulk out struct urb for this port.
37462 + * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this
37463 + *     port.
37464 + * @write_wait: a wait_queue_head_t used by the port.
37465 + * @tqueue: task queue for the line discipline waking up.
37466 + * @open_count: number of times this port has been opened.
37467 + * @sem: struct semaphore used to lock this structure.
37468 + * @private: place to put any driver specific information that is needed.  The
37469 + *     usb-serial driver is required to manage this data, the usb-serial core
37470 + *     will not touch this.
37471 + *
37472 + * This structure is used by the usb-serial core and drivers for the specific
37473 + * ports of a device.
37474 + */
37475  struct usb_serial_port {
37476         int                     magic;
37477 -       struct usb_serial       *serial;        /* pointer back to the owner of this port */
37478 -       struct tty_struct *     tty;            /* the coresponding tty for this port */
37479 +       struct usb_serial       *serial;
37480 +       struct tty_struct *     tty;
37481         unsigned char           number;
37482 -       char                    active;         /* someone has this device open */
37483  
37484         unsigned char *         interrupt_in_buffer;
37485         struct urb *            interrupt_in_urb;
37486 @@ -81,63 +113,92 @@
37487         __u8                    bulk_out_endpointAddress;
37488  
37489         wait_queue_head_t       write_wait;
37490 -
37491 -       struct tq_struct        tqueue;         /* task queue for line discipline waking up */
37492 -       int                     open_count;     /* number of times this port has been opened */
37493 -       struct semaphore        sem;            /* locks this structure */
37494 -       
37495 -       void *                  private;        /* data private to the specific port */
37496 +       struct tq_struct        tqueue;
37497 +       int                     open_count;
37498 +       struct semaphore        sem;
37499 +       void *                  private;
37500  };
37501  
37502 +/**
37503 + * usb_serial - structure used by the usb-serial core for a device
37504 + * @magic: magic number for internal validity of this pointer.
37505 + * @dev: pointer to the struct usb_device for this device
37506 + * @type: pointer to the struct usb_serial_device_type for this device
37507 + * @interface: pointer to the struct usb_interface for this device
37508 + * @minor: the starting minor number for this device
37509 + * @num_ports: the number of ports this device has
37510 + * @num_interrupt_in: number of interrupt in endpoints we have
37511 + * @num_bulk_in: number of bulk in endpoints we have
37512 + * @num_bulk_out: number of bulk out endpoints we have
37513 + * @vendor: vendor id of this device
37514 + * @product: product id of this device
37515 + * @port: array of struct usb_serial_port structures for the different ports.
37516 + * @private: place to put any driver specific information that is needed.  The
37517 + *     usb-serial driver is required to manage this data, the usb-serial core
37518 + *     will not touch this.
37519 + */
37520  struct usb_serial {
37521         int                             magic;
37522         struct usb_device *             dev;
37523 -       struct usb_serial_device_type * type;                   /* the type of usb serial device this is */
37524 -       struct usb_interface *          interface;              /* the interface for this device */
37525 -       struct tty_driver *             tty_driver;             /* the tty_driver for this device */
37526 -       unsigned char                   minor;                  /* the starting minor number for this device */
37527 -       unsigned char                   num_ports;              /* the number of ports this device has */
37528 -       char                            num_interrupt_in;       /* number of interrupt in endpoints we have */
37529 -       char                            num_bulk_in;            /* number of bulk in endpoints we have */
37530 -       char                            num_bulk_out;           /* number of bulk out endpoints we have */
37531 -       __u16                           vendor;                 /* vendor id of this device */
37532 -       __u16                           product;                /* product id of this device */
37533 +       struct usb_serial_device_type * type;
37534 +       struct usb_interface *          interface;
37535 +       unsigned char                   minor;
37536 +       unsigned char                   num_ports;
37537 +       char                            num_interrupt_in;
37538 +       char                            num_bulk_in;
37539 +       char                            num_bulk_out;
37540 +       __u16                           vendor;
37541 +       __u16                           product;
37542         struct usb_serial_port          port[MAX_NUM_PORTS];
37543 -
37544 -       void *                  private;                /* data private to the specific driver */
37545 +       void *                          private;
37546  };
37547  
37548  
37549 -#define MUST_HAVE_NOT  0x01
37550 -#define MUST_HAVE      0x02
37551 -#define DONT_CARE      0x03
37552 -
37553 -#define        HAS             0x02
37554 -#define HAS_NOT                0x01
37555 -
37556  #define NUM_DONT_CARE  (-1)
37557  
37558  
37559 -/* This structure defines the individual serial converter. */
37560 +/**
37561 + * usb_serial_device_type - a structure that defines a usb serial device
37562 + * @owner: pointer to the module that owns this device.
37563 + * @name: pointer to a string that describes this device.  This string used
37564 + *     in the syslog messages when a device is inserted or removed.
37565 + * @id_table: pointer to a list of usb_device_id structures that define all
37566 + *     of the devices this structure can support.
37567 + * @num_interrupt_in: the number of interrupt in endpoints this device will
37568 + *     have.
37569 + * @num_bulk_in: the number of bulk in endpoints this device will have.
37570 + * @num_bulk_out: the number of bulk out endpoints this device will have.
37571 + * @num_ports: the number of different ports this device will have.
37572 + * @calc_num_ports: pointer to a function to determine how many ports this
37573 + *     device has dynamically.  It will be called after the probe()
37574 + *     callback is called, but before attach()
37575 + * @startup: pointer to the driver's startup function.
37576 + *     This will be called when the device is inserted into the system,
37577 + *     but before the device has been fully initialized by the usb_serial
37578 + *     subsystem.  Use this function to download any firmware to the device,
37579 + *     or any other early initialization that might be needed.
37580 + *     Return 0 to continue on with the initialization sequence.  Anything 
37581 + *     else will abort it.
37582 + * @shutdown: pointer to the driver's shutdown function.  This will be
37583 + *     called when the device is removed from the system.
37584 + *
37585 + * This structure is defines a USB Serial device.  It provides all of
37586 + * the information that the USB serial core code needs.  If the function
37587 + * pointers are defined, then the USB serial core code will call them when
37588 + * the corresponding tty port functions are called.  If they are not
37589 + * called, the generic serial function will be used instead.
37590 + */
37591  struct usb_serial_device_type {
37592 +       struct module *owner;
37593         char    *name;
37594         const struct usb_device_id *id_table;
37595 -       char    needs_interrupt_in;
37596 -       char    needs_bulk_in;
37597 -       char    needs_bulk_out;
37598         char    num_interrupt_in;
37599         char    num_bulk_in;
37600         char    num_bulk_out;
37601 -       char    num_ports;              /* number of serial ports this device has */
37602 +       char    num_ports;
37603  
37604         struct list_head        driver_list;
37605         
37606 -       /* function call to make before accepting driver
37607 -        * return 0 to continue initialization,
37608 -        * < 0 aborts startup,
37609 -        * > 0 does not set up anything else and is useful for devices that have
37610 -        * downloaded firmware, and will reset themselves shortly.
37611 -        */
37612         int (*startup) (struct usb_serial *serial);
37613         
37614         void (*shutdown) (struct usb_serial *serial);
37615 diff -Nur linux-2.4.19.old/drivers/usb/serial/usbserial.c linux-2.4.19/drivers/usb/serial/usbserial.c
37616 --- linux-2.4.19.old/drivers/usb/serial/usbserial.c     Mon Feb 25 20:38:07 2002
37617 +++ linux-2.4.19/drivers/usb/serial/usbserial.c Mon Nov 25 12:27:12 2002
37618 @@ -1,14 +1,13 @@
37619  /*
37620   * USB Serial Converter driver
37621   *
37622 - * Copyright (C) 1999 - 2001 Greg Kroah-Hartman (greg@kroah.com)
37623 + * Copyright (C) 1999 - 2002 Greg Kroah-Hartman (greg@kroah.com)
37624   * Copyright (c) 2000 Peter Berger (pberger@brimson.com)
37625   * Copyright (c) 2000 Al Borchers (borchers@steinerpoint.com)
37626   *
37627 - *     This program is free software; you can redistribute it and/or modify
37628 - *     it under the terms of the GNU General Public License as published by
37629 - *     the Free Software Foundation; either version 2 of the License, or
37630 - *     (at your option) any later version.
37631 + *     This program is free software; you can redistribute it and/or
37632 + *     modify it under the terms of the GNU General Public License version
37633 + *     2 as published by the Free Software Foundation.
37634   *
37635   * This driver was originally based on the ACM driver by Armin Fuerst (which was 
37636   * based on a driver by Brad Keryan)
37637 @@ -337,24 +336,15 @@
37638  
37639  /* All of the device info needed for the Generic Serial Converter */
37640  static struct usb_serial_device_type generic_device = {
37641 -       name:                   "Generic",
37642 -       id_table:               generic_device_ids,
37643 -       needs_interrupt_in:     DONT_CARE,              /* don't have to have an interrupt in endpoint */
37644 -       needs_bulk_in:          DONT_CARE,              /* don't have to have a bulk in endpoint */
37645 -       needs_bulk_out:         DONT_CARE,              /* don't have to have a bulk out endpoint */
37646 -       num_interrupt_in:       NUM_DONT_CARE,
37647 -       num_bulk_in:            NUM_DONT_CARE,
37648 -       num_bulk_out:           NUM_DONT_CARE,
37649 -       num_ports:              1,
37650 -       shutdown:               generic_shutdown,
37651 +       .owner =                THIS_MODULE,
37652 +       .name =                 "Generic",
37653 +       .id_table =             generic_device_ids,
37654 +       .num_interrupt_in =     NUM_DONT_CARE,
37655 +       .num_bulk_in =          NUM_DONT_CARE,
37656 +       .num_bulk_out =         NUM_DONT_CARE,
37657 +       .num_ports =            1,
37658 +       .shutdown =             generic_shutdown,
37659  };
37660 -
37661 -#define if_generic_do(x)                       \
37662 -       if ((serial->vendor == vendor) &&       \
37663 -           (serial->product == product))       \
37664 -                       x
37665 -#else
37666 -#define if_generic_do(x)
37667  #endif
37668  
37669  
37670 @@ -375,10 +365,10 @@
37671  static void usb_serial_disconnect(struct usb_device *dev, void *ptr);
37672  
37673  static struct usb_driver usb_serial_driver = {
37674 -       name:           "serial",
37675 -       probe:          usb_serial_probe,
37676 -       disconnect:     usb_serial_disconnect,
37677 -       id_table:       NULL,                   /* check all devices */
37678 +       .name =         "serial",
37679 +       .probe =        usb_serial_probe,
37680 +       .disconnect =   usb_serial_disconnect,
37681 +       .id_table =     NULL,                   /* check all devices */
37682  };
37683  
37684  /* There is no MODULE_DEVICE_TABLE for usbserial.c.  Instead
37685 @@ -387,7 +377,7 @@
37686     via modprobe, and modprobe will load usbserial because the serial
37687     drivers depend on it.
37688  */
37689 -   
37690 +
37691  
37692  static int                     serial_refcount;
37693  static struct tty_driver       serial_tty_driver;
37694 @@ -400,7 +390,7 @@
37695  static LIST_HEAD(usb_serial_driver_list);
37696  
37697  
37698 -static struct usb_serial *get_serial_by_minor (int minor)
37699 +static struct usb_serial *get_serial_by_minor (unsigned int minor)
37700  {
37701         return serial_table[minor];
37702  }
37703 @@ -412,7 +402,7 @@
37704         int i, j;
37705         int good_spot;
37706  
37707 -       dbg(__FUNCTION__ " %d", num_ports);
37708 +       dbg("%s %d", __FUNCTION__, num_ports);
37709  
37710         *minor = 0;
37711         for (i = 0; i < SERIAL_TTY_MINORS; ++i) {
37712 @@ -427,14 +417,14 @@
37713                         continue;
37714                         
37715                 if (!(serial = kmalloc(sizeof(struct usb_serial), GFP_KERNEL))) {
37716 -                       err(__FUNCTION__ " - Out of memory");
37717 +                       err("%s - Out of memory", __FUNCTION__);
37718                         return NULL;
37719                 }
37720                 memset(serial, 0, sizeof(struct usb_serial));
37721                 serial->magic = USB_SERIAL_MAGIC;
37722                 serial_table[i] = serial;
37723                 *minor = i;
37724 -               dbg(__FUNCTION__ " - minor base = %d", *minor);
37725 +               dbg("%s - minor base = %d", __FUNCTION__, *minor);
37726                 for (i = *minor+1; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i)
37727                         serial_table[i] = serial;
37728                 return serial;
37729 @@ -442,12 +432,11 @@
37730         return NULL;
37731  }
37732  
37733 -
37734  static void return_serial (struct usb_serial *serial)
37735  {
37736         int i;
37737  
37738 -       dbg(__FUNCTION__);
37739 +       dbg("%s", __FUNCTION__);
37740  
37741         if (serial == NULL)
37742                 return;
37743 @@ -459,7 +448,6 @@
37744         return;
37745  }
37746  
37747 -
37748  #ifdef USES_EZUSB_FUNCTIONS
37749  /* EZ-USB Control and Status Register.  Bit 0 controls 8051 reset */
37750  #define CPUCS_REG    0x7F92
37751 @@ -471,36 +459,34 @@
37752  
37753         /* dbg("ezusb_writememory %x, %d", address, length); */
37754         if (!serial->dev) {
37755 -               dbg(__FUNCTION__ " - no physical device present, failing.");
37756 +               dbg("%s - no physical device present, failing.", __FUNCTION__);
37757                 return -ENODEV;
37758         }
37759  
37760         transfer_buffer =  kmalloc (length, GFP_KERNEL);
37761         if (!transfer_buffer) {
37762 -               err(__FUNCTION__ " - kmalloc(%d) failed.", length);
37763 +               err("%s - kmalloc(%d) failed.", __FUNCTION__, length);
37764                 return -ENOMEM;
37765         }
37766         memcpy (transfer_buffer, data, length);
37767 -       result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), bRequest, 0x40, address, 0, transfer_buffer, length, 300);
37768 +       result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), bRequest, 0x40, address, 0, transfer_buffer, length, 3*HZ);
37769         kfree (transfer_buffer);
37770         return result;
37771  }
37772  
37773 -
37774  int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit)
37775  {
37776         int     response;
37777 -       dbg(__FUNCTION__ " - %d", reset_bit);
37778 +       dbg("%s - %d", __FUNCTION__, reset_bit);
37779         response = ezusb_writememory (serial, CPUCS_REG, &reset_bit, 1, 0xa0);
37780         if (response < 0) {
37781 -               err(__FUNCTION__ "- %d failed", reset_bit);
37782 +               err("%s- %d failed", __FUNCTION__, reset_bit);
37783         }
37784         return response;
37785  }
37786  
37787  #endif /* USES_EZUSB_FUNCTIONS */
37788  
37789 -
37790  /*****************************************************************************
37791   * Driver tty interface functions
37792   *****************************************************************************/
37793 @@ -508,9 +494,10 @@
37794  {
37795         struct usb_serial *serial;
37796         struct usb_serial_port *port;
37797 -       int portNumber;
37798 +       unsigned int portNumber;
37799 +       int retval = 0;
37800         
37801 -       dbg(__FUNCTION__);
37802 +       dbg("%s", __FUNCTION__);
37803  
37804         /* initialize the pointer incase something fails */
37805         tty->driver_data = NULL;
37806 @@ -518,257 +505,350 @@
37807         /* get the serial object associated with this tty pointer */
37808         serial = get_serial_by_minor (MINOR(tty->device));
37809  
37810 -       if (serial_paranoia_check (serial, __FUNCTION__)) {
37811 +       if (serial_paranoia_check (serial, __FUNCTION__))
37812                 return -ENODEV;
37813 -       }
37814  
37815         /* set up our port structure making the tty driver remember our port object, and us it */
37816         portNumber = MINOR(tty->device) - serial->minor;
37817         port = &serial->port[portNumber];
37818         tty->driver_data = port;
37819 +
37820 +       down (&port->sem);
37821         port->tty = tty;
37822          
37823 -       /* pass on to the driver specific version of this function if it is available */
37824 -       if (serial->type->open) {
37825 -               return (serial->type->open(port, filp));
37826 -       } else {
37827 -               return (generic_open(port, filp));
37828 +       /* lock this module before we call it */
37829 +       if (serial->type->owner)
37830 +               __MOD_INC_USE_COUNT(serial->type->owner);
37831 +
37832 +       ++port->open_count;
37833 +       if (port->open_count == 1) {
37834 +               /* only call the device specific open if this 
37835 +                * is the first time the port is opened */
37836 +               if (serial->type->open)
37837 +                       retval = serial->type->open(port, filp);
37838 +               else
37839 +                       retval = generic_open(port, filp);
37840         }
37841 +
37842 +       if (retval) {
37843 +               port->open_count = 0;
37844 +               if (serial->type->owner)
37845 +                       __MOD_DEC_USE_COUNT(serial->type->owner);
37846 +       }
37847 +
37848 +       up (&port->sem);
37849 +       return retval;
37850  }
37851  
37852 +static void __serial_close(struct usb_serial_port *port, struct file *filp)
37853 +{
37854 +       if (!port->open_count) {
37855 +               dbg ("%s - port not opened", __FUNCTION__);
37856 +               return;
37857 +       }
37858 +
37859 +       --port->open_count;
37860 +       if (port->open_count <= 0) {
37861 +               /* only call the device specific close if this 
37862 +                * port is being closed by the last owner */
37863 +               if (port->serial->type->close)
37864 +                       port->serial->type->close(port, filp);
37865 +               else
37866 +                       generic_close(port, filp);
37867 +               port->open_count = 0;
37868 +       }
37869 +
37870 +       if (port->serial->type->owner)
37871 +               __MOD_DEC_USE_COUNT(port->serial->type->owner);
37872 +}
37873  
37874  static void serial_close(struct tty_struct *tty, struct file * filp)
37875  {
37876         struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
37877         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
37878  
37879 -       if (!serial) {
37880 +       if (!serial)
37881                 return;
37882 -       }
37883  
37884 -       dbg(__FUNCTION__ " - port %d", port->number);
37885 -       
37886 -       if (!port->active) {
37887 -               dbg (__FUNCTION__ " - port not opened");
37888 -               return;
37889 -       }
37890 +       down (&port->sem);
37891  
37892 -       /* pass on to the driver specific version of this function if it is available */
37893 -       if (serial->type->close) {
37894 -               serial->type->close(port, filp);
37895 -       } else {
37896 -               generic_close(port, filp);
37897 +       dbg("%s - port %d", __FUNCTION__, port->number);
37898 +
37899 +       /* if disconnect beat us to the punch here, there's nothing to do */
37900 +       if (tty->driver_data) {
37901 +               __serial_close(port, filp);
37902         }
37903 -}      
37904  
37905 +       up (&port->sem);
37906 +}
37907  
37908  static int serial_write (struct tty_struct * tty, int from_user, const unsigned char *buf, int count)
37909  {
37910         struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
37911         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
37912 -       
37913 -       if (!serial) {
37914 +       int retval = -EINVAL;
37915 +
37916 +       if (!serial)
37917                 return -ENODEV;
37918 -       }
37919 -       
37920 -       dbg(__FUNCTION__ " - port %d, %d byte(s)", port->number, count);
37921  
37922 -       if (!port->active) {
37923 -               dbg (__FUNCTION__ " - port not opened");
37924 -               return -EINVAL;
37925 +       down (&port->sem);
37926 +
37927 +       dbg("%s - port %d, %d byte(s)", __FUNCTION__, port->number, count);
37928 +
37929 +       if (!port->open_count) {
37930 +               dbg("%s - port not opened", __FUNCTION__);
37931 +               goto exit;
37932         }
37933 -       
37934 +
37935         /* pass on to the driver specific version of this function if it is available */
37936 -       if (serial->type->write) {
37937 -               return (serial->type->write(port, from_user, buf, count));
37938 -       } else {
37939 -               return (generic_write(port, from_user, buf, count));
37940 -       }
37941 -}
37942 +       if (serial->type->write)
37943 +               retval = serial->type->write(port, from_user, buf, count);
37944 +       else
37945 +               retval = generic_write(port, from_user, buf, count);
37946  
37947 +exit:
37948 +       up (&port->sem);
37949 +       return retval;
37950 +}
37951  
37952  static int serial_write_room (struct tty_struct *tty) 
37953  {
37954         struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
37955         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
37956 +       int retval = -EINVAL;
37957  
37958 -       if (!serial) {
37959 +       if (!serial)
37960                 return -ENODEV;
37961 -       }
37962  
37963 -       dbg(__FUNCTION__ " - port %d", port->number);
37964 -       
37965 -       if (!port->active) {
37966 -               dbg (__FUNCTION__ " - port not open");
37967 -               return -EINVAL;
37968 +       down (&port->sem);
37969 +
37970 +       dbg("%s - port %d", __FUNCTION__, port->number);
37971 +
37972 +       if (!port->open_count) {
37973 +               dbg("%s - port not open", __FUNCTION__);
37974 +               goto exit;
37975         }
37976  
37977         /* pass on to the driver specific version of this function if it is available */
37978 -       if (serial->type->write_room) {
37979 -               return (serial->type->write_room(port));
37980 -       } else {
37981 -               return (generic_write_room(port));
37982 -       }
37983 -}
37984 +       if (serial->type->write_room)
37985 +               retval = serial->type->write_room(port);
37986 +       else
37987 +               retval = generic_write_room(port);
37988  
37989 +exit:
37990 +       up (&port->sem);
37991 +       return retval;
37992 +}
37993  
37994  static int serial_chars_in_buffer (struct tty_struct *tty) 
37995  {
37996         struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
37997         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
37998 +       int retval = -EINVAL;
37999  
38000 -       if (!serial) {
38001 +       if (!serial)
38002                 return -ENODEV;
38003 -       }
38004  
38005 -       if (!port->active) {
38006 -               dbg (__FUNCTION__ " - port not open");
38007 -               return -EINVAL;
38008 +       down (&port->sem);
38009 +
38010 +       dbg("%s = port %d", __FUNCTION__, port->number);
38011 +
38012 +       if (!port->open_count) {
38013 +               dbg("%s - port not open", __FUNCTION__);
38014 +               goto exit;
38015         }
38016  
38017         /* pass on to the driver specific version of this function if it is available */
38018 -       if (serial->type->chars_in_buffer) {
38019 -               return (serial->type->chars_in_buffer(port));
38020 -       } else {
38021 -               return (generic_chars_in_buffer(port));
38022 -       }
38023 -}
38024 +       if (serial->type->chars_in_buffer)
38025 +               retval = serial->type->chars_in_buffer(port);
38026 +       else
38027 +               retval = generic_chars_in_buffer(port);
38028  
38029 +exit:
38030 +       up (&port->sem);
38031 +       return retval;
38032 +}
38033  
38034  static void serial_throttle (struct tty_struct * tty)
38035  {
38036         struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
38037         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
38038  
38039 -       if (!serial) {
38040 +       if (!serial)
38041                 return;
38042 -       }
38043  
38044 -       dbg(__FUNCTION__ " - port %d", port->number);
38045 +       down (&port->sem);
38046 +
38047 +       dbg("%s - port %d", __FUNCTION__, port->number);
38048  
38049 -       if (!port->active) {
38050 -               dbg (__FUNCTION__ " - port not open");
38051 -               return;
38052 +       if (!port->open_count) {
38053 +               dbg ("%s - port not open", __FUNCTION__);
38054 +               goto exit;
38055         }
38056  
38057         /* pass on to the driver specific version of this function */
38058 -       if (serial->type->throttle) {
38059 +       if (serial->type->throttle)
38060                 serial->type->throttle(port);
38061 -       }
38062  
38063 -       return;
38064 +exit:
38065 +       up (&port->sem);
38066  }
38067  
38068 -
38069  static void serial_unthrottle (struct tty_struct * tty)
38070  {
38071         struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
38072         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
38073  
38074 -       if (!serial) {
38075 +       if (!serial)
38076                 return;
38077 -       }
38078  
38079 -       dbg(__FUNCTION__ " - port %d", port->number);
38080 +       down (&port->sem);
38081  
38082 -       if (!port->active) {
38083 -               dbg (__FUNCTION__ " - port not open");
38084 -               return;
38085 +       dbg("%s - port %d", __FUNCTION__, port->number);
38086 +
38087 +       if (!port->open_count) {
38088 +               dbg("%s - port not open", __FUNCTION__);
38089 +               goto exit;
38090         }
38091  
38092         /* pass on to the driver specific version of this function */
38093 -       if (serial->type->unthrottle) {
38094 +       if (serial->type->unthrottle)
38095                 serial->type->unthrottle(port);
38096 -       }
38097  
38098 -       return;
38099 +exit:
38100 +       up (&port->sem);
38101  }
38102  
38103 -
38104  static int serial_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg)
38105  {
38106         struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
38107         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
38108 +       int retval = -ENODEV;
38109  
38110 -       if (!serial) {
38111 +       if (!serial)
38112                 return -ENODEV;
38113 -       }
38114  
38115 -       dbg(__FUNCTION__ " - port %d, cmd 0x%.4x", port->number, cmd);
38116 +       down (&port->sem);
38117  
38118 -       if (!port->active) {
38119 -               dbg (__FUNCTION__ " - port not open");
38120 -               return -ENODEV;
38121 +       dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
38122 +
38123 +       if (!port->open_count) {
38124 +               dbg ("%s - port not open", __FUNCTION__);
38125 +               goto exit;
38126         }
38127  
38128         /* pass on to the driver specific version of this function if it is available */
38129 -       if (serial->type->ioctl) {
38130 -               return (serial->type->ioctl(port, file, cmd, arg));
38131 -       } else {
38132 -               return -ENOIOCTLCMD;
38133 -       }
38134 -}
38135 +       if (serial->type->ioctl)
38136 +               retval = serial->type->ioctl(port, file, cmd, arg);
38137 +       else
38138 +               retval = -ENOIOCTLCMD;
38139  
38140 +exit:
38141 +       up (&port->sem);
38142 +       return retval;
38143 +}
38144  
38145  static void serial_set_termios (struct tty_struct *tty, struct termios * old)
38146  {
38147         struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
38148         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
38149  
38150 -       if (!serial) {
38151 +       if (!serial)
38152                 return;
38153 -       }
38154  
38155 -       dbg(__FUNCTION__ " - port %d", port->number);
38156 +       down (&port->sem);
38157 +
38158 +       dbg("%s - port %d", __FUNCTION__, port->number);
38159  
38160 -       if (!port->active) {
38161 -               dbg (__FUNCTION__ " - port not open");
38162 -               return;
38163 +       if (!port->open_count) {
38164 +               dbg("%s - port not open", __FUNCTION__);
38165 +               goto exit;
38166         }
38167  
38168         /* pass on to the driver specific version of this function if it is available */
38169 -       if (serial->type->set_termios) {
38170 +       if (serial->type->set_termios)
38171                 serial->type->set_termios(port, old);
38172 -       }
38173 -       
38174 -       return;
38175 -}
38176  
38177 +exit:
38178 +       up (&port->sem);
38179 +}
38180  
38181  static void serial_break (struct tty_struct *tty, int break_state)
38182  {
38183         struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
38184         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
38185  
38186 -       if (!serial) {
38187 +       if (!serial)
38188                 return;
38189 -       }
38190  
38191 -       dbg(__FUNCTION__ " - port %d", port->number);
38192 +       down (&port->sem);
38193  
38194 -       if (!port->active) {
38195 -               dbg (__FUNCTION__ " - port not open");
38196 -               return;
38197 +       dbg("%s - port %d", __FUNCTION__, port->number);
38198 +
38199 +       if (!port->open_count) {
38200 +               dbg("%s - port not open", __FUNCTION__);
38201 +               goto exit;
38202         }
38203  
38204 -       /* pass on to the driver specific version of this function if it is
38205 -           available */
38206 -       if (serial->type->break_ctl) {
38207 +       /* pass on to the driver specific version of this function if it is available */
38208 +       if (serial->type->break_ctl)
38209                 serial->type->break_ctl(port, break_state);
38210 -       }
38211 -}
38212  
38213 +exit:
38214 +       up (&port->sem);
38215 +}
38216  
38217  static void serial_shutdown (struct usb_serial *serial)
38218  {
38219 -       if (serial->type->shutdown) {
38220 +       dbg ("%s", __FUNCTION__);
38221 +
38222 +       if (serial->type->shutdown)
38223                 serial->type->shutdown(serial);
38224 -       } else {
38225 +       else
38226                 generic_shutdown(serial);
38227 -       }
38228  }
38229  
38230 +static int serial_read_proc (char *page, char **start, off_t off, int count, int *eof, void *data)
38231 +{
38232 +       struct usb_serial *serial;
38233 +       int length = 0;
38234 +       int i;
38235 +       off_t begin = 0;
38236 +       char tmp[40];
38237 +
38238 +       dbg("%s", __FUNCTION__);
38239 +       length += sprintf (page, "usbserinfo:1.0 driver:%s\n", DRIVER_VERSION);
38240 +       for (i = 0; i < SERIAL_TTY_MINORS && length < PAGE_SIZE; ++i) {
38241 +               serial = get_serial_by_minor(i);
38242 +               if (serial == NULL)
38243 +                       continue;
38244  
38245 +               length += sprintf (page+length, "%d:", i);
38246 +               if (serial->type->owner)
38247 +                       length += sprintf (page+length, " module:%s", serial->type->owner->name);
38248 +               length += sprintf (page+length, " name:\"%s\"", serial->type->name);
38249 +               length += sprintf (page+length, " vendor:%04x product:%04x", serial->vendor, serial->product);
38250 +               length += sprintf (page+length, " num_ports:%d", serial->num_ports);
38251 +               length += sprintf (page+length, " port:%d", i - serial->minor + 1);
38252 +
38253 +               usb_make_path(serial->dev, tmp, sizeof(tmp));
38254 +               length += sprintf (page+length, " path:%s", tmp);
38255 +                       
38256 +               length += sprintf (page+length, "\n");
38257 +               if ((length + begin) > (off + count))
38258 +                       goto done;
38259 +               if ((length + begin) < off) {
38260 +                       begin += length;
38261 +                       length = 0;
38262 +               }
38263 +       }
38264 +       *eof = 1;
38265 +done:
38266 +       if (off >= (length + begin))
38267 +               return 0;
38268 +       *start = page + (off-begin);
38269 +       return ((count < begin+length-off) ? count : begin+length-off);
38270 +}
38271  
38272  /*****************************************************************************
38273   * generic devices specific driver functions
38274 @@ -781,91 +861,70 @@
38275         if (port_paranoia_check (port, __FUNCTION__))
38276                 return -ENODEV;
38277  
38278 -       /* only increment our usage count, if this device is _really_ a generic device */
38279 -       if_generic_do(MOD_INC_USE_COUNT);
38280 -
38281 -       dbg(__FUNCTION__ " - port %d", port->number);
38282 -
38283 -       down (&port->sem);
38284 -       
38285 -       ++port->open_count;
38286 -       
38287 -       if (!port->active) {
38288 -               port->active = 1;
38289 +       dbg("%s - port %d", __FUNCTION__, port->number);
38290  
38291 -               /* force low_latency on so that our tty_push actually forces the data through, 
38292 -                  otherwise it is scheduled, and with high data rates (like with OHCI) data
38293 -                  can get lost. */
38294 +       /* force low_latency on so that our tty_push actually forces the data through, 
38295 +          otherwise it is scheduled, and with high data rates (like with OHCI) data
38296 +          can get lost. */
38297 +       if (port->tty)
38298                 port->tty->low_latency = 1;
38299 -               
38300 -               /* if we have a bulk interrupt, start reading from it */
38301 -               if (serial->num_bulk_in) {
38302 -                       /* Start reading from the device */
38303 -                       FILL_BULK_URB(port->read_urb, serial->dev, 
38304 -                                     usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
38305 -                                     port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
38306 -                                     ((serial->type->read_bulk_callback) ?
38307 -                                      serial->type->read_bulk_callback :
38308 -                                      generic_read_bulk_callback), 
38309 -                                     port);
38310 -                       result = usb_submit_urb(port->read_urb);
38311 -                       if (result)
38312 -                               err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
38313 -               }
38314 +
38315 +       /* if we have a bulk interrupt, start reading from it */
38316 +       if (serial->num_bulk_in) {
38317 +               /* Start reading from the device */
38318 +               usb_fill_bulk_urb (port->read_urb, serial->dev,
38319 +                                  usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
38320 +                                  port->read_urb->transfer_buffer,
38321 +                                  port->read_urb->transfer_buffer_length,
38322 +                                  ((serial->type->read_bulk_callback) ?
38323 +                                    serial->type->read_bulk_callback :
38324 +                                    generic_read_bulk_callback),
38325 +                                  port);
38326 +               result = usb_submit_urb(port->read_urb);
38327 +               if (result)
38328 +                       err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
38329         }
38330 -       
38331 -       up (&port->sem);
38332 -       
38333 +
38334         return result;
38335  }
38336  
38337 -
38338 -static void generic_close (struct usb_serial_port *port, struct file * filp)
38339 +static void generic_cleanup (struct usb_serial_port *port)
38340  {
38341         struct usb_serial *serial = port->serial;
38342  
38343 -       dbg(__FUNCTION__ " - port %d", port->number);
38344 -
38345 -       down (&port->sem);
38346 -
38347 -       --port->open_count;
38348 +       dbg("%s - port %d", __FUNCTION__, port->number);
38349  
38350 -       if (port->open_count <= 0) {
38351 -               if (serial->dev) {
38352 -                       /* shutdown any bulk reads that might be going on */
38353 -                       if (serial->num_bulk_out)
38354 -                               usb_unlink_urb (port->write_urb);
38355 -                       if (serial->num_bulk_in)
38356 -                               usb_unlink_urb (port->read_urb);
38357 -               }
38358 -               
38359 -               port->active = 0;
38360 -               port->open_count = 0;
38361 +       if (serial->dev) {
38362 +               /* shutdown any bulk reads that might be going on */
38363 +               if (serial->num_bulk_out)
38364 +                       usb_unlink_urb (port->write_urb);
38365 +               if (serial->num_bulk_in)
38366 +                       usb_unlink_urb (port->read_urb);
38367         }
38368 -
38369 -       up (&port->sem);
38370 -
38371 -       /* only decrement our usage count, if this device is _really_ a generic device */
38372 -       if_generic_do(MOD_DEC_USE_COUNT);
38373  }
38374  
38375 +static void generic_close (struct usb_serial_port *port, struct file * filp)
38376 +{
38377 +       dbg("%s - port %d", __FUNCTION__, port->number);
38378 +       generic_cleanup (port);
38379 +}
38380  
38381  static int generic_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count)
38382  {
38383         struct usb_serial *serial = port->serial;
38384         int result;
38385  
38386 -       dbg(__FUNCTION__ " - port %d", port->number);
38387 +       dbg("%s - port %d", __FUNCTION__, port->number);
38388  
38389         if (count == 0) {
38390 -               dbg(__FUNCTION__ " - write request of 0 bytes");
38391 +               dbg("%s - write request of 0 bytes", __FUNCTION__);
38392                 return (0);
38393         }
38394  
38395         /* only do something if we have a bulk out endpoint */
38396         if (serial->num_bulk_out) {
38397                 if (port->write_urb->status == -EINPROGRESS) {
38398 -                       dbg (__FUNCTION__ " - already writing");
38399 +                       dbg("%s - already writing", __FUNCTION__);
38400                         return (0);
38401                 }
38402  
38403 @@ -877,68 +936,65 @@
38404                 }
38405                 else {
38406                         memcpy (port->write_urb->transfer_buffer, buf, count);
38407 -               }  
38408 +               }
38409  
38410                 usb_serial_debug_data (__FILE__, __FUNCTION__, count, port->write_urb->transfer_buffer);
38411  
38412                 /* set up our urb */
38413 -               FILL_BULK_URB(port->write_urb, serial->dev, 
38414 -                             usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress),
38415 -                             port->write_urb->transfer_buffer, count,
38416 -                             ((serial->type->write_bulk_callback) ? 
38417 -                              serial->type->write_bulk_callback : 
38418 -                              generic_write_bulk_callback), 
38419 -                             port);
38420 +               usb_fill_bulk_urb (port->write_urb, serial->dev,
38421 +                                  usb_sndbulkpipe (serial->dev,
38422 +                                                   port->bulk_out_endpointAddress),
38423 +                                  port->write_urb->transfer_buffer, count,
38424 +                                  ((serial->type->write_bulk_callback) ? 
38425 +                                    serial->type->write_bulk_callback :
38426 +                                    generic_write_bulk_callback), port);
38427  
38428                 /* send the data out the bulk port */
38429                 result = usb_submit_urb(port->write_urb);
38430                 if (result)
38431 -                       err(__FUNCTION__ " - failed submitting write urb, error %d", result);
38432 +                       err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
38433                 else
38434                         result = count;
38435  
38436                 return result;
38437         }
38438 -       
38439 +
38440         /* no bulk out, so return 0 bytes written */
38441         return (0);
38442 -} 
38443 -
38444 +}
38445  
38446  static int generic_write_room (struct usb_serial_port *port)
38447  {
38448         struct usb_serial *serial = port->serial;
38449         int room = 0;
38450  
38451 -       dbg(__FUNCTION__ " - port %d", port->number);
38452 +       dbg("%s - port %d", __FUNCTION__, port->number);
38453         
38454         if (serial->num_bulk_out) {
38455                 if (port->write_urb->status != -EINPROGRESS)
38456                         room = port->bulk_out_size;
38457         }
38458 -       
38459 -       dbg(__FUNCTION__ " - returns %d", room);
38460 +
38461 +       dbg("%s - returns %d", __FUNCTION__, room);
38462         return (room);
38463  }
38464  
38465 -
38466  static int generic_chars_in_buffer (struct usb_serial_port *port)
38467  {
38468         struct usb_serial *serial = port->serial;
38469         int chars = 0;
38470  
38471 -       dbg(__FUNCTION__ " - port %d", port->number);
38472 -       
38473 +       dbg("%s - port %d", __FUNCTION__, port->number);
38474 +
38475         if (serial->num_bulk_out) {
38476                 if (port->write_urb->status == -EINPROGRESS)
38477                         chars = port->write_urb->transfer_buffer_length;
38478         }
38479  
38480 -       dbg (__FUNCTION__ " - returns %d", chars);
38481 +       dbg("%s - returns %d", __FUNCTION__, chars);
38482         return (chars);
38483  }
38484  
38485 -
38486  static void generic_read_bulk_callback (struct urb *urb)
38487  {
38488         struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
38489 @@ -948,22 +1004,22 @@
38490         int i;
38491         int result;
38492  
38493 -       dbg(__FUNCTION__ " - port %d", port->number);
38494 -       
38495 +       dbg("%s - port %d", __FUNCTION__, port->number);
38496 +
38497         if (!serial) {
38498 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
38499 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
38500                 return;
38501         }
38502  
38503         if (urb->status) {
38504 -               dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
38505 +               dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
38506                 return;
38507         }
38508  
38509         usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
38510  
38511         tty = port->tty;
38512 -       if (urb->actual_length) {
38513 +       if (tty && urb->actual_length) {
38514                 for (i = 0; i < urb->actual_length ; ++i) {
38515                         /* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */
38516                         if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
38517 @@ -976,73 +1032,71 @@
38518         }
38519  
38520         /* Continue trying to always read  */
38521 -       FILL_BULK_URB(port->read_urb, serial->dev, 
38522 -                     usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
38523 -                     port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
38524 -                     ((serial->type->read_bulk_callback) ?
38525 -                      serial->type->read_bulk_callback :
38526 -                      generic_read_bulk_callback), 
38527 -                     port);
38528 +       usb_fill_bulk_urb (port->read_urb, serial->dev,
38529 +                          usb_rcvbulkpipe (serial->dev,
38530 +                                           port->bulk_in_endpointAddress),
38531 +                          port->read_urb->transfer_buffer,
38532 +                          port->read_urb->transfer_buffer_length,
38533 +                          ((serial->type->read_bulk_callback) ? 
38534 +                            serial->type->read_bulk_callback : 
38535 +                            generic_read_bulk_callback), port);
38536         result = usb_submit_urb(port->read_urb);
38537         if (result)
38538 -               err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
38539 +               err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
38540  }
38541  
38542 -
38543  static void generic_write_bulk_callback (struct urb *urb)
38544  {
38545         struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
38546         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
38547  
38548 -       dbg(__FUNCTION__ " - port %d", port->number);
38549 -       
38550 +       dbg("%s - port %d", __FUNCTION__, port->number);
38551 +
38552         if (!serial) {
38553 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
38554 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
38555                 return;
38556         }
38557  
38558         if (urb->status) {
38559 -               dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
38560 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
38561                 return;
38562         }
38563  
38564         queue_task(&port->tqueue, &tq_immediate);
38565         mark_bh(IMMEDIATE_BH);
38566 -       
38567 +
38568         return;
38569  }
38570  
38571 -
38572  static void generic_shutdown (struct usb_serial *serial)
38573  {
38574         int i;
38575  
38576 -       dbg (__FUNCTION__);
38577 +       dbg("%s", __FUNCTION__);
38578  
38579         /* stop reads and writes on all ports */
38580         for (i=0; i < serial->num_ports; ++i) {
38581 -               while (serial->port[i].open_count > 0) {
38582 -                       generic_close (&serial->port[i], NULL);
38583 -               }
38584 +               generic_cleanup (&serial->port[i]);
38585         }
38586  }
38587  
38588 -
38589  static void port_softint(void *private)
38590  {
38591         struct usb_serial_port *port = (struct usb_serial_port *)private;
38592         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
38593         struct tty_struct *tty;
38594  
38595 -       dbg(__FUNCTION__ " - port %d", port->number);
38596 +       dbg("%s - port %d", __FUNCTION__, port->number);
38597         
38598 -       if (!serial) {
38599 +       if (!serial)
38600                 return;
38601 -       }
38602 -       
38603 +
38604         tty = port->tty;
38605 +       if (!tty)
38606 +               return;
38607 +
38608         if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
38609 -               dbg(__FUNCTION__ " - write wakeup call.");
38610 +               dbg("%s - write wakeup call.", __FUNCTION__);
38611                 (tty->ldisc.write_wakeup)(tty);
38612         }
38613  
38614 @@ -1068,9 +1122,6 @@
38615         int minor;
38616         int buffer_size;
38617         int i;
38618 -       char interrupt_pipe;
38619 -       char bulk_in_pipe;
38620 -       char bulk_out_pipe;
38621         int num_interrupt_in = 0;
38622         int num_bulk_in = 0;
38623         int num_bulk_out = 0;
38624 @@ -1078,7 +1129,6 @@
38625         int max_endpoints;
38626         const struct usb_device_id *id_pattern = NULL;
38627  
38628 -       
38629         /* loop through our list of known serial converters, and see if this
38630            device matches. */
38631         found = 0;
38632 @@ -1099,8 +1149,6 @@
38633         }
38634         
38635         /* descriptor matches, let's find the endpoints needed */
38636 -       interrupt_pipe = bulk_in_pipe = bulk_out_pipe = HAS_NOT;
38637 -                       
38638         /* check out the endpoints */
38639         iface_desc = &interface->altsetting[0];
38640         for (i = 0; i < iface_desc->bNumEndpoints; ++i) {
38641 @@ -1110,7 +1158,6 @@
38642                     ((endpoint->bmAttributes & 3) == 0x02)) {
38643                         /* we found a bulk in endpoint */
38644                         dbg("found bulk in");
38645 -                       bulk_in_pipe = HAS;
38646                         bulk_in_endpoint[num_bulk_in] = endpoint;
38647                         ++num_bulk_in;
38648                 }
38649 @@ -1119,7 +1166,6 @@
38650                     ((endpoint->bmAttributes & 3) == 0x02)) {
38651                         /* we found a bulk out endpoint */
38652                         dbg("found bulk out");
38653 -                       bulk_out_pipe = HAS;
38654                         bulk_out_endpoint[num_bulk_out] = endpoint;
38655                         ++num_bulk_out;
38656                 }
38657 @@ -1128,20 +1174,19 @@
38658                     ((endpoint->bmAttributes & 3) == 0x03)) {
38659                         /* we found a interrupt in endpoint */
38660                         dbg("found interrupt in");
38661 -                       interrupt_pipe = HAS;
38662                         interrupt_in_endpoint[num_interrupt_in] = endpoint;
38663                         ++num_interrupt_in;
38664                 }
38665         }
38666 -       
38667 +
38668  #if defined(CONFIG_USB_SERIAL_PL2303) || defined(CONFIG_USB_SERIAL_PL2303_MODULE)
38669         /* BEGIN HORRIBLE HACK FOR PL2303 */ 
38670         /* this is needed due to the looney way its endpoints are set up */
38671 -       if (ifnum == 1) {
38672 -               if (((dev->descriptor.idVendor == PL2303_VENDOR_ID) &&
38673 -                    (dev->descriptor.idProduct == PL2303_PRODUCT_ID)) ||
38674 -                   ((dev->descriptor.idVendor == ATEN_VENDOR_ID) &&
38675 -                    (dev->descriptor.idProduct == ATEN_PRODUCT_ID))) {
38676 +       if (((dev->descriptor.idVendor == PL2303_VENDOR_ID) &&
38677 +            (dev->descriptor.idProduct == PL2303_PRODUCT_ID)) ||
38678 +           ((dev->descriptor.idVendor == ATEN_VENDOR_ID) &&
38679 +            (dev->descriptor.idProduct == ATEN_PRODUCT_ID))) {
38680 +               if (ifnum == 1) {
38681                         /* check out the endpoints of the other interface*/
38682                         interface = &dev->actconfig->interface[ifnum ^ 1];
38683                         iface_desc = &interface->altsetting[0];
38684 @@ -1151,24 +1196,23 @@
38685                                     ((endpoint->bmAttributes & 3) == 0x03)) {
38686                                         /* we found a interrupt in endpoint */
38687                                         dbg("found interrupt in for Prolific device on separate interface");
38688 -                                       interrupt_pipe = HAS;
38689                                         interrupt_in_endpoint[num_interrupt_in] = endpoint;
38690                                         ++num_interrupt_in;
38691                                 }
38692                         }
38693                 }
38694 +
38695 +               /* Now make sure the PL-2303 is configured correctly.
38696 +                * If not, give up now and hope this hack will work
38697 +                * properly during a later invocation of usb_serial_probe
38698 +                */
38699 +               if (num_bulk_in == 0 || num_bulk_out == 0) {
38700 +                       info("PL-2303 hack: descriptors matched but endpoints did not");
38701 +                       return NULL;
38702 +               }
38703         }
38704         /* END HORRIBLE HACK FOR PL2303 */
38705  #endif
38706 -       
38707 -       /* verify that we found all of the endpoints that we need */
38708 -       if (!((interrupt_pipe & type->needs_interrupt_in) &&
38709 -             (bulk_in_pipe & type->needs_bulk_in) &&
38710 -             (bulk_out_pipe & type->needs_bulk_out))) {
38711 -               /* nope, they don't match what we expected */
38712 -               info("descriptors matched, but endpoints did not");
38713 -               return NULL;
38714 -       }
38715  
38716         /* found all that we need */
38717         info("%s converter detected", type->name);
38718 @@ -1189,7 +1233,7 @@
38719                 err("No more free serial devices");
38720                 return NULL;
38721         }
38722 -       
38723 +
38724         serial->dev = dev;
38725         serial->type = type;
38726         serial->interface = interface;
38727 @@ -1201,15 +1245,6 @@
38728         serial->vendor = dev->descriptor.idVendor;
38729         serial->product = dev->descriptor.idProduct;
38730  
38731 -       /* if this device type has a startup function, call it */
38732 -       if (type->startup) {
38733 -               i = type->startup (serial);
38734 -               if (i < 0)
38735 -                       goto probe_error;
38736 -               if (i > 0)
38737 -                       return serial;
38738 -       }
38739 -
38740         /* set up the endpoint information */
38741         for (i = 0; i < num_bulk_in; ++i) {
38742                 endpoint = bulk_in_endpoint[i];
38743 @@ -1226,13 +1261,14 @@
38744                         err("Couldn't allocate bulk_in_buffer");
38745                         goto probe_error;
38746                 }
38747 -               FILL_BULK_URB(port->read_urb, dev, 
38748 -                             usb_rcvbulkpipe(dev, endpoint->bEndpointAddress),
38749 -                             port->bulk_in_buffer, buffer_size, 
38750 -                             ((serial->type->read_bulk_callback) ?
38751 -                              serial->type->read_bulk_callback :
38752 -                              generic_read_bulk_callback), 
38753 -                             port);
38754 +               usb_fill_bulk_urb (port->read_urb, dev,
38755 +                                  usb_rcvbulkpipe (dev,
38756 +                                                   endpoint->bEndpointAddress),
38757 +                                  port->bulk_in_buffer, buffer_size,
38758 +                                  ((serial->type->read_bulk_callback) ? 
38759 +                                    serial->type->read_bulk_callback : 
38760 +                                    generic_read_bulk_callback),
38761 +                                  port);
38762         }
38763  
38764         for (i = 0; i < num_bulk_out; ++i) {
38765 @@ -1251,13 +1287,14 @@
38766                         err("Couldn't allocate bulk_out_buffer");
38767                         goto probe_error;
38768                 }
38769 -               FILL_BULK_URB(port->write_urb, dev, 
38770 -                             usb_sndbulkpipe(dev, endpoint->bEndpointAddress),
38771 -                             port->bulk_out_buffer, buffer_size,
38772 -                             ((serial->type->write_bulk_callback) ? 
38773 -                              serial->type->write_bulk_callback : 
38774 -                              generic_write_bulk_callback), 
38775 -                             port);
38776 +               usb_fill_bulk_urb (port->write_urb, dev,
38777 +                                  usb_sndbulkpipe (dev,
38778 +                                                   endpoint->bEndpointAddress),
38779 +                                  port->bulk_out_buffer, buffer_size, 
38780 +                                  ((serial->type->write_bulk_callback) ? 
38781 +                                    serial->type->write_bulk_callback : 
38782 +                                    generic_write_bulk_callback),
38783 +                                  port);
38784         }
38785  
38786         for (i = 0; i < num_interrupt_in; ++i) {
38787 @@ -1275,12 +1312,12 @@
38788                         err("Couldn't allocate interrupt_in_buffer");
38789                         goto probe_error;
38790                 }
38791 -               FILL_INT_URB(port->interrupt_in_urb, dev, 
38792 -                            usb_rcvintpipe(dev, endpoint->bEndpointAddress),
38793 -                            port->interrupt_in_buffer, buffer_size, 
38794 -                            serial->type->read_int_callback,
38795 -                            port, 
38796 -                            endpoint->bInterval);
38797 +               usb_fill_int_urb (port->interrupt_in_urb, dev, 
38798 +                                 usb_rcvintpipe (dev,
38799 +                                                 endpoint->bEndpointAddress),
38800 +                                 port->interrupt_in_buffer, buffer_size, 
38801 +                                 serial->type->read_int_callback, port, 
38802 +                                 endpoint->bInterval);
38803         }
38804  
38805         /* initialize some parts of the port structures */
38806 @@ -1288,7 +1325,7 @@
38807         max_endpoints = max(num_bulk_in, num_bulk_out);
38808         max_endpoints = max(max_endpoints, num_interrupt_in);
38809         max_endpoints = max(max_endpoints, (int)serial->num_ports);
38810 -       dbg (__FUNCTION__ " - setting up %d port structures for this device", max_endpoints);
38811 +       dbg("%s - setting up %d port structures for this device", __FUNCTION__, max_endpoints);
38812         for (i = 0; i < max_endpoints; ++i) {
38813                 port = &serial->port[i];
38814                 port->number = i + serial->minor;
38815 @@ -1298,14 +1335,23 @@
38816                 port->tqueue.data = port;
38817                 init_MUTEX (&port->sem);
38818         }
38819 -       
38820 +
38821 +       /* if this device type has a startup function, call it */
38822 +       if (type->startup) {
38823 +               i = type->startup (serial);
38824 +               if (i < 0)
38825 +                       goto probe_error;
38826 +               if (i > 0)
38827 +                       return serial;
38828 +       }
38829 +
38830         /* initialize the devfs nodes for this device and let the user know what ports we are bound to */
38831         for (i = 0; i < serial->num_ports; ++i) {
38832                 tty_register_devfs (&serial_tty_driver, 0, serial->port[i].number);
38833                 info("%s converter now attached to ttyUSB%d (or usb/tts/%d for devfs)", 
38834                      type->name, serial->port[i].number, serial->port[i].number);
38835         }
38836 -       
38837 +
38838         return serial; /* success */
38839  
38840  
38841 @@ -1331,7 +1377,7 @@
38842                 if (port->interrupt_in_buffer)
38843                         kfree (port->interrupt_in_buffer);
38844         }
38845 -               
38846 +
38847         /* return the minor range that this device had */
38848         return_serial (serial);
38849  
38850 @@ -1340,25 +1386,32 @@
38851         return NULL;
38852  }
38853  
38854 -
38855  static void usb_serial_disconnect(struct usb_device *dev, void *ptr)
38856  {
38857         struct usb_serial *serial = (struct usb_serial *) ptr;
38858         struct usb_serial_port *port;
38859         int i;
38860  
38861 +       dbg ("%s", __FUNCTION__);
38862         if (serial) {
38863                 /* fail all future close/read/write/ioctl/etc calls */
38864                 for (i = 0; i < serial->num_ports; ++i) {
38865 -                       if (serial->port[i].tty != NULL)
38866 -                               serial->port[i].tty->driver_data = NULL;
38867 +                       port = &serial->port[i];
38868 +                       down (&port->sem);
38869 +                       if (port->tty != NULL) {
38870 +                               while (port->open_count > 0) {
38871 +                                       __serial_close(port, NULL);
38872 +                               }
38873 +                               port->tty->driver_data = NULL;
38874 +                       }
38875 +                       up (&port->sem);
38876                 }
38877  
38878                 serial->dev = NULL;
38879                 serial_shutdown (serial);
38880  
38881                 for (i = 0; i < serial->num_ports; ++i)
38882 -                       serial->port[i].active = 0;
38883 +                       serial->port[i].open_count = 0;
38884  
38885                 for (i = 0; i < serial->num_bulk_in; ++i) {
38886                         port = &serial->port[i];
38887 @@ -1402,36 +1455,41 @@
38888         } else {
38889                 info("device disconnected");
38890         }
38891 -       
38892 +
38893  }
38894  
38895  
38896  static struct tty_driver serial_tty_driver = {
38897 -       magic:                  TTY_DRIVER_MAGIC,
38898 -       driver_name:            "usb-serial",
38899 -       name:                   "usb/tts/%d",
38900 -       major:                  SERIAL_TTY_MAJOR,
38901 -       minor_start:            0,
38902 -       num:                    SERIAL_TTY_MINORS,
38903 -       type:                   TTY_DRIVER_TYPE_SERIAL,
38904 -       subtype:                SERIAL_TYPE_NORMAL,
38905 -       flags:                  TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS,
38906 -       
38907 -       refcount:               &serial_refcount,
38908 -       table:                  serial_tty,
38909 -       termios:                serial_termios,
38910 -       termios_locked:         serial_termios_locked,
38911 -       
38912 -       open:                   serial_open,
38913 -       close:                  serial_close,
38914 -       write:                  serial_write,
38915 -       write_room:             serial_write_room,
38916 -       ioctl:                  serial_ioctl,
38917 -       set_termios:            serial_set_termios,
38918 -       throttle:               serial_throttle,
38919 -       unthrottle:             serial_unthrottle,
38920 -       break_ctl:              serial_break,
38921 -       chars_in_buffer:        serial_chars_in_buffer,
38922 +       .magic =                TTY_DRIVER_MAGIC,
38923 +       .driver_name =          "usb-serial",
38924 +#ifndef CONFIG_DEVFS_FS
38925 +       .name =                 "ttyUSB",
38926 +#else
38927 +       .name =                 "usb/tts/%d",
38928 +#endif
38929 +       .major =                SERIAL_TTY_MAJOR,
38930 +       .minor_start =          0,
38931 +       .num =                  SERIAL_TTY_MINORS,
38932 +       .type =                 TTY_DRIVER_TYPE_SERIAL,
38933 +       .subtype =              SERIAL_TYPE_NORMAL,
38934 +       .flags =                TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS,
38935 +
38936 +       .refcount =             &serial_refcount,
38937 +       .table =                serial_tty,
38938 +       .termios =              serial_termios,
38939 +       .termios_locked =       serial_termios_locked,
38940 +
38941 +       .open =                 serial_open,
38942 +       .close =                serial_close,
38943 +       .write =                serial_write,
38944 +       .write_room =           serial_write_room,
38945 +       .ioctl =                serial_ioctl,
38946 +       .set_termios =          serial_set_termios,
38947 +       .throttle =             serial_throttle,
38948 +       .unthrottle =           serial_unthrottle,
38949 +       .break_ctl =            serial_break,
38950 +       .chars_in_buffer =      serial_chars_in_buffer,
38951 +       .read_proc =            serial_read_proc,
38952  };
38953  
38954  
38955 @@ -1449,7 +1507,7 @@
38956         serial_tty_driver.init_termios          = tty_std_termios;
38957         serial_tty_driver.init_termios.c_cflag  = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
38958         if (tty_register_driver (&serial_tty_driver)) {
38959 -               err(__FUNCTION__ " - failed to register tty driver");
38960 +               err("%s - failed to register tty driver", __FUNCTION__);
38961                 return -1;
38962         }
38963  
38964 @@ -1526,7 +1584,7 @@
38965  
38966  
38967  
38968 -/* If the usb-serial core is build into the core, the usb-serial drivers
38969 +/* If the usb-serial core is built into the core, the usb-serial drivers
38970     need these symbols to load properly as modules. */
38971  EXPORT_SYMBOL(usb_serial_register);
38972  EXPORT_SYMBOL(usb_serial_deregister);
38973 diff -Nur linux-2.4.19.old/drivers/usb/serial/visor.c linux-2.4.19/drivers/usb/serial/visor.c
38974 --- linux-2.4.19.old/drivers/usb/serial/visor.c Sat Aug  3 02:39:45 2002
38975 +++ linux-2.4.19/drivers/usb/serial/visor.c     Mon Nov 25 12:27:12 2002
38976 @@ -123,18 +123,15 @@
38977  
38978  #include <linux/config.h>
38979  #include <linux/kernel.h>
38980 -#include <linux/sched.h>
38981 -#include <linux/signal.h>
38982  #include <linux/errno.h>
38983 -#include <linux/poll.h>
38984  #include <linux/init.h>
38985  #include <linux/slab.h>
38986 -#include <linux/fcntl.h>
38987  #include <linux/tty.h>
38988  #include <linux/tty_driver.h>
38989  #include <linux/tty_flip.h>
38990  #include <linux/module.h>
38991  #include <linux/spinlock.h>
38992 +#include <asm/uaccess.h>
38993  #include <linux/usb.h>
38994  
38995  #ifdef CONFIG_USB_SERIAL_DEBUG
38996 @@ -149,7 +146,7 @@
38997  /*
38998   * Version Information
38999   */
39000 -#define DRIVER_VERSION "v1.5"
39001 +#define DRIVER_VERSION "v1.6"
39002  #define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>"
39003  #define DRIVER_DESC "USB HandSpring Visor, Palm m50x, Sony Clié driver"
39004  
39005 @@ -170,41 +167,35 @@
39006  static int  clie_3_5_startup   (struct usb_serial *serial);
39007  
39008  
39009 -static __devinitdata struct usb_device_id visor_id_table [] = {
39010 -       { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) },
39011 -       { }                                     /* Terminating entry */
39012 -};
39013 -
39014 -static __devinitdata struct usb_device_id palm_4_0_id_table [] = {
39015 +static struct usb_device_id id_table [] = {
39016         { USB_DEVICE(PALM_VENDOR_ID, PALM_M500_ID) },
39017         { USB_DEVICE(PALM_VENDOR_ID, PALM_M505_ID) },
39018         { USB_DEVICE(PALM_VENDOR_ID, PALM_M515_ID) },
39019 +       { USB_DEVICE(PALM_VENDOR_ID, PALM_I705_ID) },
39020         { USB_DEVICE(PALM_VENDOR_ID, PALM_M125_ID) },
39021         { USB_DEVICE(PALM_VENDOR_ID, PALM_M130_ID) },
39022 -       { USB_DEVICE(PALM_VENDOR_ID, PALM_I705_ID) },
39023 +       { USB_DEVICE(PALM_VENDOR_ID, PALM_ZIRE_ID) },
39024 +       { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) },
39025 +       { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_0_ID) },
39026 +       { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_S360_ID) },
39027 +       { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_1_ID) },
39028         { }                                     /* Terminating entry */
39029  };
39030  
39031 -static __devinitdata struct usb_device_id clie_id_3_5_table [] = {
39032 +static struct usb_device_id clie_id_3_5_table [] = {
39033         { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_3_5_ID) },
39034         { }                                     /* Terminating entry */
39035  };
39036  
39037 -static __devinitdata struct usb_device_id clie_id_4_0_table [] = {
39038 -       { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_0_ID) },
39039 -       { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_S360_ID) },
39040 -       { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_1_ID) },
39041 -       { }                                     /* Terminating entry */
39042 -};
39043 -
39044 -static __devinitdata struct usb_device_id id_table [] = {
39045 +static __devinitdata struct usb_device_id id_table_combined [] = {
39046         { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) },
39047         { USB_DEVICE(PALM_VENDOR_ID, PALM_M500_ID) },
39048         { USB_DEVICE(PALM_VENDOR_ID, PALM_M505_ID) },
39049         { USB_DEVICE(PALM_VENDOR_ID, PALM_M515_ID) },
39050 +       { USB_DEVICE(PALM_VENDOR_ID, PALM_I705_ID) },
39051         { USB_DEVICE(PALM_VENDOR_ID, PALM_M125_ID) },
39052         { USB_DEVICE(PALM_VENDOR_ID, PALM_M130_ID) },
39053 -       { USB_DEVICE(PALM_VENDOR_ID, PALM_I705_ID) },
39054 +       { USB_DEVICE(PALM_VENDOR_ID, PALM_ZIRE_ID) },
39055         { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_3_5_ID) },
39056         { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_0_ID) },
39057         { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_S360_ID) },
39058 @@ -212,113 +203,57 @@
39059         { }                                     /* Terminating entry */
39060  };
39061  
39062 -MODULE_DEVICE_TABLE (usb, id_table);
39063 +MODULE_DEVICE_TABLE (usb, id_table_combined);
39064  
39065  
39066  
39067 -/* All of the device info needed for the Handspring Visor */
39068 +/* All of the device info needed for the Handspring Visor, and Palm 4.0 devices */
39069  static struct usb_serial_device_type handspring_device = {
39070 -       name:                   "Handspring Visor",
39071 -       id_table:               visor_id_table,
39072 -       needs_interrupt_in:     MUST_HAVE_NOT,          /* this device must not have an interrupt in endpoint */
39073 -       needs_bulk_in:          MUST_HAVE,              /* this device must have a bulk in endpoint */
39074 -       needs_bulk_out:         MUST_HAVE,              /* this device must have a bulk out endpoint */
39075 -       num_interrupt_in:       0,
39076 -       num_bulk_in:            2,
39077 -       num_bulk_out:           2,
39078 -       num_ports:              2,
39079 -       open:                   visor_open,
39080 -       close:                  visor_close,
39081 -       throttle:               visor_throttle,
39082 -       unthrottle:             visor_unthrottle,
39083 -       startup:                visor_startup,
39084 -       shutdown:               visor_shutdown,
39085 -       ioctl:                  visor_ioctl,
39086 -       set_termios:            visor_set_termios,
39087 -       write:                  visor_write,
39088 -       write_room:             visor_write_room,
39089 -       chars_in_buffer:        visor_chars_in_buffer,
39090 -       write_bulk_callback:    visor_write_bulk_callback,
39091 -       read_bulk_callback:     visor_read_bulk_callback,
39092 +       .owner =                THIS_MODULE,
39093 +       .name =                 "Handspring Visor / Palm 4.0 / Clié 4.x",
39094 +       .id_table =             id_table,
39095 +       .num_interrupt_in =     0,
39096 +       .num_bulk_in =          2,
39097 +       .num_bulk_out =         2,
39098 +       .num_ports =            2,
39099 +       .open =                 visor_open,
39100 +       .close =                visor_close,
39101 +       .throttle =             visor_throttle,
39102 +       .unthrottle =           visor_unthrottle,
39103 +       .startup =              visor_startup,
39104 +       .shutdown =             visor_shutdown,
39105 +       .ioctl =                visor_ioctl,
39106 +       .set_termios =          visor_set_termios,
39107 +       .write =                visor_write,
39108 +       .write_room =           visor_write_room,
39109 +       .chars_in_buffer =      visor_chars_in_buffer,
39110 +       .write_bulk_callback =  visor_write_bulk_callback,
39111 +       .read_bulk_callback =   visor_read_bulk_callback,
39112  };
39113  
39114 -/* device info for the Palm 4.0 devices */
39115 -static struct usb_serial_device_type palm_4_0_device = {
39116 -       name:                   "Palm 4.0",
39117 -       id_table:               palm_4_0_id_table,
39118 -       needs_interrupt_in:     MUST_HAVE_NOT,          /* this device must not have an interrupt in endpoint */
39119 -       needs_bulk_in:          MUST_HAVE,              /* this device must have a bulk in endpoint */
39120 -       needs_bulk_out:         MUST_HAVE,              /* this device must have a bulk out endpoint */
39121 -       num_interrupt_in:       0,
39122 -       num_bulk_in:            2,
39123 -       num_bulk_out:           2,
39124 -       num_ports:              2,
39125 -       open:                   visor_open,
39126 -       close:                  visor_close,
39127 -       throttle:               visor_throttle,
39128 -       unthrottle:             visor_unthrottle,
39129 -       startup:                visor_startup,
39130 -       shutdown:               visor_shutdown,
39131 -       ioctl:                  visor_ioctl,
39132 -       set_termios:            visor_set_termios,
39133 -       write:                  visor_write,
39134 -       write_room:             visor_write_room,
39135 -       chars_in_buffer:        visor_chars_in_buffer,
39136 -       write_bulk_callback:    visor_write_bulk_callback,
39137 -       read_bulk_callback:     visor_read_bulk_callback,
39138 -};
39139 -
39140 -
39141  /* device info for the Sony Clie OS version 3.5 */
39142  static struct usb_serial_device_type clie_3_5_device = {
39143 -       name:                   "Sony Clié 3.5",
39144 -       id_table:               clie_id_3_5_table,
39145 -       needs_interrupt_in:     MUST_HAVE_NOT,          /* this device must not have an interrupt in endpoint */
39146 -       needs_bulk_in:          MUST_HAVE,              /* this device must have a bulk in endpoint */
39147 -       needs_bulk_out:         MUST_HAVE,              /* this device must have a bulk out endpoint */
39148 -       num_interrupt_in:       0,
39149 -       num_bulk_in:            1,
39150 -       num_bulk_out:           1,
39151 -       num_ports:              1,
39152 -       open:                   visor_open,
39153 -       close:                  visor_close,
39154 -       throttle:               visor_throttle,
39155 -       unthrottle:             visor_unthrottle,
39156 -       startup:                clie_3_5_startup,
39157 -       ioctl:                  visor_ioctl,
39158 -       set_termios:            visor_set_termios,
39159 -       write:                  visor_write,
39160 -       write_room:             visor_write_room,
39161 -       chars_in_buffer:        visor_chars_in_buffer,
39162 -       write_bulk_callback:    visor_write_bulk_callback,
39163 -       read_bulk_callback:     visor_read_bulk_callback,
39164 +       .owner =                THIS_MODULE,
39165 +       .name =                 "Sony Clié 3.5",
39166 +       .id_table =             clie_id_3_5_table,
39167 +       .num_interrupt_in =     0,
39168 +       .num_bulk_in =          1,
39169 +       .num_bulk_out =         1,
39170 +       .num_ports =            1,
39171 +       .open =                 visor_open,
39172 +       .close =                visor_close,
39173 +       .throttle =             visor_throttle,
39174 +       .unthrottle =           visor_unthrottle,
39175 +       .startup =              clie_3_5_startup,
39176 +       .ioctl =                visor_ioctl,
39177 +       .set_termios =          visor_set_termios,
39178 +       .write =                visor_write,
39179 +       .write_room =           visor_write_room,
39180 +       .chars_in_buffer =      visor_chars_in_buffer,
39181 +       .write_bulk_callback =  visor_write_bulk_callback,
39182 +       .read_bulk_callback =   visor_read_bulk_callback,
39183  };
39184  
39185 -/* device info for the Sony Clie OS version 4.0 */
39186 -static struct usb_serial_device_type clie_4_0_device = {
39187 -       name:                   "Sony Clié 4.x",
39188 -       id_table:               clie_id_4_0_table,
39189 -       needs_interrupt_in:     MUST_HAVE_NOT,          /* this device must not have an interrupt in endpoint */
39190 -       needs_bulk_in:          MUST_HAVE,              /* this device must have a bulk in endpoint */
39191 -       needs_bulk_out:         MUST_HAVE,              /* this device must have a bulk out endpoint */
39192 -       num_interrupt_in:       0,
39193 -       num_bulk_in:            2,
39194 -       num_bulk_out:           2,
39195 -       num_ports:              2,
39196 -       open:                   visor_open,
39197 -       close:                  visor_close,
39198 -       throttle:               visor_throttle,
39199 -       unthrottle:             visor_unthrottle,
39200 -       startup:                visor_startup,
39201 -       shutdown:               visor_shutdown,
39202 -       ioctl:                  visor_ioctl,
39203 -       set_termios:            visor_set_termios,
39204 -       write:                  visor_write,
39205 -       write_room:             visor_write_room,
39206 -       chars_in_buffer:        visor_chars_in_buffer,
39207 -       write_bulk_callback:    visor_write_bulk_callback,
39208 -       read_bulk_callback:     visor_read_bulk_callback,
39209 -};
39210  
39211  #define NUM_URBS                       24
39212  #define URB_TRANSFER_BUFFER_SIZE       768
39213 @@ -339,39 +274,35 @@
39214         if (port_paranoia_check (port, __FUNCTION__))
39215                 return -ENODEV;
39216         
39217 -       dbg(__FUNCTION__ " - port %d", port->number);
39218 +       dbg("%s - port %d", __FUNCTION__, port->number);
39219  
39220         if (!port->read_urb) {
39221 +               /* this is needed for some brain dead Sony devices */
39222                 err ("Device lied about number of ports, please use a lower one.");
39223                 return -ENODEV;
39224         }
39225  
39226 -       down (&port->sem);
39227 -       
39228 -       ++port->open_count;
39229 -       MOD_INC_USE_COUNT;
39230 -       
39231 -       if (!port->active) {
39232 -               port->active = 1;
39233 -               bytes_in = 0;
39234 -               bytes_out = 0;
39235 -
39236 -               /* force low_latency on so that our tty_push actually forces the data through, 
39237 -                  otherwise it is scheduled, and with high data rates (like with OHCI) data
39238 -                  can get lost. */
39239 +       bytes_in = 0;
39240 +       bytes_out = 0;
39241 +
39242 +       /*
39243 +        * Force low_latency on so that our tty_push actually forces the data
39244 +        * through, otherwise it is scheduled, and with high data rates (like
39245 +        * with OHCI) data can get lost.
39246 +        */
39247 +       if (port->tty)
39248                 port->tty->low_latency = 1;
39249 -               
39250 -               /* Start reading from the device */
39251 -               FILL_BULK_URB(port->read_urb, serial->dev, 
39252 -                             usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
39253 -                             port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
39254 -                             visor_read_bulk_callback, port);
39255 -               result = usb_submit_urb(port->read_urb);
39256 -               if (result)
39257 -                       err(__FUNCTION__ " - failed submitting read urb, error %d", result);
39258 -       }
39259 -       
39260 -       up (&port->sem);
39261 +
39262 +       /* Start reading from the device */
39263 +       usb_fill_bulk_urb (port->read_urb, serial->dev,
39264 +                          usb_rcvbulkpipe (serial->dev, 
39265 +                                           port->bulk_in_endpointAddress),
39266 +                          port->read_urb->transfer_buffer,
39267 +                          port->read_urb->transfer_buffer_length,
39268 +                          visor_read_bulk_callback, port);
39269 +       result = usb_submit_urb(port->read_urb);
39270 +       if (result)
39271 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
39272         
39273         return result;
39274  }
39275 @@ -385,44 +316,32 @@
39276         if (port_paranoia_check (port, __FUNCTION__))
39277                 return;
39278         
39279 -       dbg(__FUNCTION__ " - port %d", port->number);
39280 +       dbg("%s - port %d", __FUNCTION__, port->number);
39281                          
39282         serial = get_usb_serial (port, __FUNCTION__);
39283         if (!serial)
39284                 return;
39285         
39286 -       down (&port->sem);
39287 -
39288 -       --port->open_count;
39289 -
39290 -       if (port->open_count <= 0) {
39291 -               if (serial->dev) {
39292 -                       /* only send a shutdown message if the 
39293 -                        * device is still here */
39294 -                       transfer_buffer =  kmalloc (0x12, GFP_KERNEL);
39295 -                       if (!transfer_buffer) {
39296 -                               err(__FUNCTION__ " - kmalloc(%d) failed.", 0x12);
39297 -                       } else {
39298 -                               /* send a shutdown message to the device */
39299 -                               usb_control_msg (serial->dev,
39300 -                                                usb_rcvctrlpipe(serial->dev, 0),
39301 -                                                VISOR_CLOSE_NOTIFICATION, 0xc2,
39302 -                                                0x0000, 0x0000, 
39303 -                                                transfer_buffer, 0x12, 300);
39304 -                               kfree (transfer_buffer);
39305 -                       }
39306 -                       /* shutdown our bulk read */
39307 -                       usb_unlink_urb (port->read_urb);
39308 +       if (serial->dev) {
39309 +               /* only send a shutdown message if the 
39310 +                * device is still here */
39311 +               transfer_buffer =  kmalloc (0x12, GFP_KERNEL);
39312 +               if (!transfer_buffer) {
39313 +                       err("%s - kmalloc(%d) failed.", __FUNCTION__, 0x12);
39314 +               } else {
39315 +                       /* send a shutdown message to the device */
39316 +                       usb_control_msg (serial->dev,
39317 +                                        usb_rcvctrlpipe(serial->dev, 0),
39318 +                                        VISOR_CLOSE_NOTIFICATION, 0xc2,
39319 +                                        0x0000, 0x0000, 
39320 +                                        transfer_buffer, 0x12, 300);
39321 +                       kfree (transfer_buffer);
39322                 }
39323 -               port->active = 0;
39324 -               port->open_count = 0;
39325 +               /* shutdown our bulk read */
39326 +               usb_unlink_urb (port->read_urb);
39327         }
39328 -       up (&port->sem);
39329 -
39330         /* Uncomment the following line if you want to see some statistics in your syslog */
39331         /* info ("Bytes In = %d  Bytes Out = %d", bytes_in, bytes_out); */
39332 -
39333 -       MOD_DEC_USE_COUNT;
39334  }
39335  
39336  
39337 @@ -437,7 +356,7 @@
39338         int bytes_sent = 0;
39339         int transfer_size;
39340  
39341 -       dbg(__FUNCTION__ " - port %d", port->number);
39342 +       dbg("%s - port %d", __FUNCTION__, port->number);
39343  
39344         while (count > 0) {
39345                 /* try to find a free urb in our list of them */
39346 @@ -451,13 +370,13 @@
39347                 }
39348                 spin_unlock_irqrestore (&write_urb_pool_lock, flags);
39349                 if (urb == NULL) {
39350 -                       dbg (__FUNCTION__ " - no more free urbs");
39351 +                       dbg("%s - no more free urbs", __FUNCTION__);
39352                         goto exit;
39353                 }
39354                 if (urb->transfer_buffer == NULL) {
39355                         urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
39356                         if (urb->transfer_buffer == NULL) {
39357 -                               err(__FUNCTION__" no more kernel memory...");
39358 +                               err("%s no more kernel memory...", __FUNCTION__);
39359                                 goto exit;
39360                         }
39361                 }
39362 @@ -482,7 +401,7 @@
39363                 /* send it down the pipe */
39364                 status = usb_submit_urb(urb);
39365                 if (status) {
39366 -                       err(__FUNCTION__ " - usb_submit_urb(write bulk) failed with status = %d", status);
39367 +                       err("%s - usb_submit_urb(write bulk) failed with status = %d", __FUNCTION__, status);
39368                         bytes_sent = status;
39369                         break;
39370                 }
39371 @@ -504,7 +423,7 @@
39372         int i;
39373         int room = 0;
39374  
39375 -       dbg(__FUNCTION__ " - port %d", port->number);
39376 +       dbg("%s - port %d", __FUNCTION__, port->number);
39377         
39378         spin_lock_irqsave (&write_urb_pool_lock, flags);
39379  
39380 @@ -516,7 +435,7 @@
39381         
39382         spin_unlock_irqrestore (&write_urb_pool_lock, flags);
39383         
39384 -       dbg(__FUNCTION__ " - returns %d", room);
39385 +       dbg("%s - returns %d", __FUNCTION__, room);
39386         return (room);
39387  }
39388  
39389 @@ -527,7 +446,7 @@
39390         int i;
39391         int chars = 0;
39392  
39393 -       dbg(__FUNCTION__ " - port %d", port->number);
39394 +       dbg("%s - port %d", __FUNCTION__, port->number);
39395         
39396         spin_lock_irqsave (&write_urb_pool_lock, flags);
39397  
39398 @@ -539,7 +458,7 @@
39399         
39400         spin_unlock_irqrestore (&write_urb_pool_lock, flags);
39401  
39402 -       dbg (__FUNCTION__ " - returns %d", chars);
39403 +       dbg("%s - returns %d", __FUNCTION__, chars);
39404         return (chars);
39405  }
39406  
39407 @@ -551,16 +470,16 @@
39408         if (port_paranoia_check (port, __FUNCTION__))
39409                 return;
39410         
39411 -       dbg(__FUNCTION__ " - port %d", port->number);
39412 +       dbg("%s - port %d", __FUNCTION__, port->number);
39413         
39414         if (urb->status) {
39415 -               dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
39416 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
39417                 return;
39418         }
39419  
39420         queue_task(&port->tqueue, &tq_immediate);
39421         mark_bh(IMMEDIATE_BH);
39422 -       
39423 +
39424         return;
39425  }
39426  
39427 @@ -577,22 +496,22 @@
39428         if (port_paranoia_check (port, __FUNCTION__))
39429                 return;
39430  
39431 -       dbg(__FUNCTION__ " - port %d", port->number);
39432 +       dbg("%s - port %d", __FUNCTION__, port->number);
39433  
39434         if (!serial) {
39435 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
39436 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
39437                 return;
39438         }
39439  
39440         if (urb->status) {
39441 -               dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
39442 +               dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
39443                 return;
39444         }
39445  
39446         usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
39447  
39448         tty = port->tty;
39449 -       if (urb->actual_length) {
39450 +       if (tty && urb->actual_length) {
39451                 for (i = 0; i < urb->actual_length ; ++i) {
39452                         /* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */
39453                         if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
39454 @@ -606,29 +525,23 @@
39455         }
39456  
39457         /* Continue trying to always read  */
39458 -       FILL_BULK_URB(port->read_urb, serial->dev, 
39459 -                     usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
39460 -                     port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
39461 -                     visor_read_bulk_callback, port);
39462 +       usb_fill_bulk_urb (port->read_urb, serial->dev,
39463 +                          usb_rcvbulkpipe (serial->dev,
39464 +                                           port->bulk_in_endpointAddress),
39465 +                          port->read_urb->transfer_buffer,
39466 +                          port->read_urb->transfer_buffer_length,
39467 +                          visor_read_bulk_callback, port);
39468         result = usb_submit_urb(port->read_urb);
39469         if (result)
39470 -               err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
39471 +               err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
39472         return;
39473  }
39474  
39475  
39476  static void visor_throttle (struct usb_serial_port *port)
39477  {
39478 -
39479 -       dbg(__FUNCTION__ " - port %d", port->number);
39480 -
39481 -       down (&port->sem);
39482 -
39483 +       dbg("%s - port %d", __FUNCTION__, port->number);
39484         usb_unlink_urb (port->read_urb);
39485 -
39486 -       up (&port->sem);
39487 -
39488 -       return;
39489  }
39490  
39491  
39492 @@ -636,42 +549,35 @@
39493  {
39494         int result;
39495  
39496 -       dbg(__FUNCTION__ " - port %d", port->number);
39497 -
39498 -       down (&port->sem);
39499 +       dbg("%s - port %d", __FUNCTION__, port->number);
39500  
39501         port->read_urb->dev = port->serial->dev;
39502         result = usb_submit_urb(port->read_urb);
39503         if (result)
39504 -               err(__FUNCTION__ " - failed submitting read urb, error %d", result);
39505 -
39506 -       up (&port->sem);
39507 -
39508 -       return;
39509 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
39510  }
39511  
39512 -
39513 -static int  visor_startup (struct usb_serial *serial)
39514 +static int visor_startup (struct usb_serial *serial)
39515  {
39516         int response;
39517         int i;
39518         unsigned char *transfer_buffer =  kmalloc (256, GFP_KERNEL);
39519  
39520         if (!transfer_buffer) {
39521 -               err(__FUNCTION__ " - kmalloc(%d) failed.", 256);
39522 +               err("%s - kmalloc(%d) failed.", __FUNCTION__, 256);
39523                 return -ENOMEM;
39524         }
39525  
39526 -       dbg(__FUNCTION__);
39527 +       dbg("%s", __FUNCTION__);
39528  
39529 -       dbg(__FUNCTION__ " - Set config to 1");
39530 +       dbg("%s - Set config to 1", __FUNCTION__);
39531         usb_set_configuration (serial->dev, 1);
39532  
39533         /* send a get connection info request */
39534         response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_GET_CONNECTION_INFORMATION,
39535                                         0xc2, 0x0000, 0x0000, transfer_buffer, 0x12, 300);
39536         if (response < 0) {
39537 -               err(__FUNCTION__ " - error getting connection information");
39538 +               err("%s - error getting connection information", __FUNCTION__);
39539         } else {
39540                 struct visor_connection_info *connection_info = (struct visor_connection_info *)transfer_buffer;
39541                 char *string;
39542 @@ -699,7 +605,8 @@
39543                                         string = "unknown";
39544                                         break;  
39545                         }
39546 -                       info("%s: port %d, is for %s use and is bound to ttyUSB%d", serial->type->name, connection_info->connections[i].port, string, serial->minor + i);
39547 +                       info("%s: port %d, is for %s use and is bound to ttyUSB%d", serial->type->name,
39548 +                            connection_info->connections[i].port, string, serial->minor + i);
39549                 }
39550         }
39551  
39552 @@ -712,7 +619,7 @@
39553                                             0xc2, 0x0000, 0x0000, transfer_buffer, 
39554                                             0x14, 300);
39555                 if (response < 0) {
39556 -                       err(__FUNCTION__ " - error getting first unknown palm command");
39557 +                       err("%s - error getting first unknown palm command", __FUNCTION__);
39558                 } else {
39559                         usb_serial_debug_data (__FILE__, __FUNCTION__, 0x14, transfer_buffer);
39560                 }
39561 @@ -721,7 +628,7 @@
39562                                             0xc2, 0x0000, 0x0000, transfer_buffer, 
39563                                             0x14, 300);
39564                 if (response < 0) {
39565 -                       err(__FUNCTION__ " - error getting second unknown palm command");
39566 +                       err("%s - error getting second unknown palm command", __FUNCTION__);
39567                 } else {
39568                         usb_serial_debug_data (__FILE__, __FUNCTION__, 0x14, transfer_buffer);
39569                 }
39570 @@ -731,7 +638,7 @@
39571         response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_REQUEST_BYTES_AVAILABLE,
39572                                         0xc2, 0x0000, 0x0005, transfer_buffer, 0x02, 300);
39573         if (response < 0) {
39574 -               err(__FUNCTION__ " - error getting bytes available request");
39575 +               err("%s - error getting bytes available request", __FUNCTION__);
39576         }
39577  
39578         kfree (transfer_buffer);
39579 @@ -745,7 +652,7 @@
39580         int result;
39581         u8 data;
39582  
39583 -       dbg(__FUNCTION__);
39584 +       dbg("%s", __FUNCTION__);
39585  
39586         /*
39587          * Note that PEG-300 series devices expect the following two calls.
39588 @@ -756,11 +663,11 @@
39589                                   USB_REQ_GET_CONFIGURATION, USB_DIR_IN,
39590                                   0, 0, &data, 1, HZ * 3);
39591         if (result < 0) {
39592 -               err(__FUNCTION__ ": get config number failed: %d", result);
39593 +               err("%s: get config number failed: %d", __FUNCTION__, result);
39594                 return result;
39595         }
39596         if (result != 1) {
39597 -               err(__FUNCTION__ ": get config number bad return length: %d", result);
39598 +               err("%s: get config number bad return length: %d", __FUNCTION__, result);
39599                 return -EIO;
39600         }
39601  
39602 @@ -770,11 +677,11 @@
39603                                   USB_DIR_IN | USB_DT_DEVICE,
39604                                   0, 0, &data, 1, HZ * 3);
39605         if (result < 0) {
39606 -               err(__FUNCTION__ ": get interface number failed: %d", result);
39607 +               err("%s: get interface number failed: %d", __FUNCTION__, result);
39608                 return result;
39609         }
39610         if (result != 1) {
39611 -               err(__FUNCTION__ ": get interface number bad return length: %d", result);
39612 +               err("%s: get interface number bad return length: %d", __FUNCTION__, result);
39613                 return -EIO;
39614         }
39615  
39616 @@ -783,21 +690,12 @@
39617  
39618  static void visor_shutdown (struct usb_serial *serial)
39619  {
39620 -       int i;
39621 -
39622 -       dbg (__FUNCTION__);
39623 -
39624 -       /* stop reads and writes on all ports */
39625 -       for (i=0; i < serial->num_ports; ++i) {
39626 -               serial->port[i].active = 0;
39627 -               serial->port[i].open_count = 0;
39628 -       }
39629 +       dbg("%s", __FUNCTION__);
39630  }
39631  
39632 -
39633  static int visor_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
39634  {
39635 -       dbg(__FUNCTION__ " - port %d, cmd 0x%.4x", port->number, cmd);
39636 +       dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
39637  
39638         return -ENOIOCTLCMD;
39639  }
39640 @@ -808,10 +706,10 @@
39641  {
39642         unsigned int cflag;
39643  
39644 -       dbg(__FUNCTION__ " - port %d", port->number);
39645 +       dbg("%s - port %d", __FUNCTION__, port->number);
39646  
39647         if ((!port->tty) || (!port->tty->termios)) {
39648 -               dbg(__FUNCTION__" - no tty structures");
39649 +               dbg("%s - no tty structures", __FUNCTION__);
39650                 return;
39651         }
39652  
39653 @@ -820,50 +718,51 @@
39654         if (old_termios) {
39655                 if ((cflag == old_termios->c_cflag) &&
39656                     (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
39657 -                       dbg(__FUNCTION__ " - nothing to change...");
39658 +                       dbg("%s - nothing to change...", __FUNCTION__);
39659                         return;
39660                 }
39661         }
39662  
39663         /* get the byte size */
39664         switch (cflag & CSIZE) {
39665 -               case CS5:       dbg(__FUNCTION__ " - data bits = 5");   break;
39666 -               case CS6:       dbg(__FUNCTION__ " - data bits = 6");   break;
39667 -               case CS7:       dbg(__FUNCTION__ " - data bits = 7");   break;
39668 +               case CS5:       dbg("%s - data bits = 5", __FUNCTION__);   break;
39669 +               case CS6:       dbg("%s - data bits = 6", __FUNCTION__);   break;
39670 +               case CS7:       dbg("%s - data bits = 7", __FUNCTION__);   break;
39671                 default:
39672 -               case CS8:       dbg(__FUNCTION__ " - data bits = 8");   break;
39673 +               case CS8:       dbg("%s - data bits = 8", __FUNCTION__);   break;
39674         }
39675         
39676         /* determine the parity */
39677         if (cflag & PARENB)
39678                 if (cflag & PARODD)
39679 -                       dbg(__FUNCTION__ " - parity = odd");
39680 +                       dbg("%s - parity = odd", __FUNCTION__);
39681                 else
39682 -                       dbg(__FUNCTION__ " - parity = even");
39683 +                       dbg("%s - parity = even", __FUNCTION__);
39684         else
39685 -               dbg(__FUNCTION__ " - parity = none");
39686 +               dbg("%s - parity = none", __FUNCTION__);
39687  
39688         /* figure out the stop bits requested */
39689         if (cflag & CSTOPB)
39690 -               dbg(__FUNCTION__ " - stop bits = 2");
39691 +               dbg("%s - stop bits = 2", __FUNCTION__);
39692         else
39693 -               dbg(__FUNCTION__ " - stop bits = 1");
39694 +               dbg("%s - stop bits = 1", __FUNCTION__);
39695  
39696         
39697         /* figure out the flow control settings */
39698         if (cflag & CRTSCTS)
39699 -               dbg(__FUNCTION__ " - RTS/CTS is enabled");
39700 +               dbg("%s - RTS/CTS is enabled", __FUNCTION__);
39701         else
39702 -               dbg(__FUNCTION__ " - RTS/CTS is disabled");
39703 +               dbg("%s - RTS/CTS is disabled", __FUNCTION__);
39704         
39705         /* determine software flow control */
39706         if (I_IXOFF(port->tty))
39707 -               dbg(__FUNCTION__ " - XON/XOFF is enabled, XON = %2x, XOFF = %2x", START_CHAR(port->tty), STOP_CHAR(port->tty));
39708 +               dbg("%s - XON/XOFF is enabled, XON = %2x, XOFF = %2x",
39709 +                   __FUNCTION__, START_CHAR(port->tty), STOP_CHAR(port->tty));
39710         else
39711 -               dbg(__FUNCTION__ " - XON/XOFF is disabled");
39712 +               dbg("%s - XON/XOFF is disabled", __FUNCTION__);
39713  
39714         /* get the baud rate wanted */
39715 -       dbg(__FUNCTION__ " - baud rate = %d", tty_get_baud_rate(port->tty));
39716 +       dbg("%s - baud rate = %d", __FUNCTION__, tty_get_baud_rate(port->tty));
39717  
39718         return;
39719  }
39720 @@ -875,9 +774,7 @@
39721         int i;
39722  
39723         usb_serial_register (&handspring_device);
39724 -       usb_serial_register (&palm_4_0_device);
39725         usb_serial_register (&clie_3_5_device);
39726 -       usb_serial_register (&clie_4_0_device);
39727         
39728         /* create our write urb pool and transfer buffers */ 
39729         spin_lock_init (&write_urb_pool_lock);
39730 @@ -892,7 +789,7 @@
39731                 urb->transfer_buffer = NULL;
39732                 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
39733                 if (!urb->transfer_buffer) {
39734 -                       err (__FUNCTION__ " - out of memory for urb buffers.");
39735 +                       err("%s - out of memory for urb buffers.", __FUNCTION__);
39736                         continue;
39737                 }
39738         }
39739 @@ -909,9 +806,7 @@
39740         unsigned long flags;
39741  
39742         usb_serial_deregister (&handspring_device);
39743 -       usb_serial_deregister (&palm_4_0_device);
39744         usb_serial_deregister (&clie_3_5_device);
39745 -       usb_serial_deregister (&clie_4_0_device);
39746  
39747         spin_lock_irqsave (&write_urb_pool_lock, flags);
39748  
39749 diff -Nur linux-2.4.19.old/drivers/usb/serial/visor.h linux-2.4.19/drivers/usb/serial/visor.h
39750 --- linux-2.4.19.old/drivers/usb/serial/visor.h Sat Aug  3 02:39:45 2002
39751 +++ linux-2.4.19/drivers/usb/serial/visor.h     Mon Nov 25 12:27:12 2002
39752 @@ -27,6 +27,7 @@
39753  #define PALM_I705_ID                   0x0020
39754  #define PALM_M125_ID                   0x0040
39755  #define PALM_M130_ID                   0x0050
39756 +#define PALM_ZIRE_ID                   0x0070
39757  
39758  #define SONY_VENDOR_ID                 0x054C
39759  #define SONY_CLIE_3_5_ID               0x0038
39760 diff -Nur linux-2.4.19.old/drivers/usb/serial/whiteheat.c linux-2.4.19/drivers/usb/serial/whiteheat.c
39761 --- linux-2.4.19.old/drivers/usb/serial/whiteheat.c     Sat Aug  3 02:39:45 2002
39762 +++ linux-2.4.19/drivers/usb/serial/whiteheat.c Mon Nov 25 12:27:12 2002
39763 @@ -61,18 +61,15 @@
39764  
39765  #include <linux/config.h>
39766  #include <linux/kernel.h>
39767 -#include <linux/sched.h>
39768 -#include <linux/signal.h>
39769  #include <linux/errno.h>
39770 -#include <linux/poll.h>
39771  #include <linux/init.h>
39772  #include <linux/slab.h>
39773 -#include <linux/fcntl.h>
39774  #include <linux/tty.h>
39775  #include <linux/tty_driver.h>
39776  #include <linux/tty_flip.h>
39777  #include <linux/module.h>
39778  #include <linux/spinlock.h>
39779 +#include <asm/uaccess.h>
39780  #include <linux/usb.h>
39781  
39782  #ifdef CONFIG_USB_SERIAL_DEBUG
39783 @@ -103,12 +100,12 @@
39784     separate ID tables, and then a third table that combines them
39785     just for the purpose of exporting the autoloading information.
39786  */
39787 -static __devinitdata struct usb_device_id id_table_std [] = {
39788 +static struct usb_device_id id_table_std [] = {
39789         { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_WHITE_HEAT_ID) },
39790         { }                                             /* Terminating entry */
39791  };
39792  
39793 -static __devinitdata struct usb_device_id id_table_prerenumeration [] = {
39794 +static struct usb_device_id id_table_prerenumeration [] = {
39795         { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_FAKE_WHITE_HEAT_ID) },
39796         { }                                             /* Terminating entry */
39797  };
39798 @@ -133,36 +130,32 @@
39799  static void whiteheat_real_shutdown    (struct usb_serial *serial);
39800  
39801  static struct usb_serial_device_type whiteheat_fake_device = {
39802 -       name:                   "Connect Tech - WhiteHEAT - (prerenumeration)",
39803 -       id_table:               id_table_prerenumeration,
39804 -       needs_interrupt_in:     DONT_CARE,                              /* don't have to have an interrupt in endpoint */
39805 -       needs_bulk_in:          DONT_CARE,                              /* don't have to have a bulk in endpoint */
39806 -       needs_bulk_out:         DONT_CARE,                              /* don't have to have a bulk out endpoint */
39807 -       num_interrupt_in:       NUM_DONT_CARE,
39808 -       num_bulk_in:            NUM_DONT_CARE,
39809 -       num_bulk_out:           NUM_DONT_CARE,
39810 -       num_ports:              1,
39811 -       startup:                whiteheat_fake_startup,
39812 +       .owner =                THIS_MODULE,
39813 +       .name =                 "Connect Tech - WhiteHEAT - (prerenumeration)",
39814 +       .id_table =             id_table_prerenumeration,
39815 +       .num_interrupt_in =     NUM_DONT_CARE,
39816 +       .num_bulk_in =          NUM_DONT_CARE,
39817 +       .num_bulk_out =         NUM_DONT_CARE,
39818 +       .num_ports =            1,
39819 +       .startup =              whiteheat_fake_startup,
39820  };
39821  
39822  static struct usb_serial_device_type whiteheat_device = {
39823 -       name:                   "Connect Tech - WhiteHEAT",
39824 -       id_table:               id_table_std,
39825 -       needs_interrupt_in:     DONT_CARE,                              /* don't have to have an interrupt in endpoint */
39826 -       needs_bulk_in:          DONT_CARE,                              /* don't have to have a bulk in endpoint */
39827 -       needs_bulk_out:         DONT_CARE,                              /* don't have to have a bulk out endpoint */
39828 -       num_interrupt_in:       NUM_DONT_CARE,
39829 -       num_bulk_in:            NUM_DONT_CARE,
39830 -       num_bulk_out:           NUM_DONT_CARE,
39831 -       num_ports:              4,
39832 -       open:                   whiteheat_open,
39833 -       close:                  whiteheat_close,
39834 -       throttle:               whiteheat_throttle,
39835 -       unthrottle:             whiteheat_unthrottle,
39836 -       ioctl:                  whiteheat_ioctl,
39837 -       set_termios:            whiteheat_set_termios,
39838 -       startup:                whiteheat_real_startup,
39839 -       shutdown:               whiteheat_real_shutdown,
39840 +       .owner =                THIS_MODULE,
39841 +       .name =                 "Connect Tech - WhiteHEAT",
39842 +       .id_table =             id_table_std,
39843 +       .num_interrupt_in =     NUM_DONT_CARE,
39844 +       .num_bulk_in =          NUM_DONT_CARE,
39845 +       .num_bulk_out =         NUM_DONT_CARE,
39846 +       .num_ports =            4,
39847 +       .open =                 whiteheat_open,
39848 +       .close =                whiteheat_close,
39849 +       .throttle =             whiteheat_throttle,
39850 +       .unthrottle =           whiteheat_unthrottle,
39851 +       .ioctl =                whiteheat_ioctl,
39852 +       .set_termios =          whiteheat_set_termios,
39853 +       .startup =              whiteheat_real_startup,
39854 +       .shutdown =             whiteheat_real_shutdown,
39855  };
39856  
39857  struct whiteheat_private {
39858 @@ -186,7 +179,7 @@
39859   *****************************************************************************/
39860  static void command_port_write_callback (struct urb *urb)
39861  {
39862 -       dbg (__FUNCTION__);
39863 +       dbg("%s", __FUNCTION__);
39864  
39865         if (urb->status) {
39866                 dbg ("nonzero urb status: %d", urb->status);
39867 @@ -207,15 +200,15 @@
39868         unsigned char *data = urb->transfer_buffer;
39869         int result;
39870  
39871 -       dbg (__FUNCTION__);
39872 +       dbg("%s", __FUNCTION__);
39873  
39874         if (urb->status) {
39875 -               dbg (__FUNCTION__ " - nonzero urb status: %d", urb->status);
39876 +               dbg("%s - nonzero urb status: %d", __FUNCTION__, urb->status);
39877                 return;
39878         }
39879  
39880         if (!serial) {
39881 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
39882 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
39883                 return;
39884         }
39885         
39886 @@ -223,7 +216,7 @@
39887  
39888         info = (struct whiteheat_private *)port->private;
39889         if (!info) {
39890 -               dbg (__FUNCTION__ " - info is NULL, exiting.");
39891 +               dbg("%s - info is NULL, exiting.", __FUNCTION__);
39892                 return;
39893         }
39894  
39895 @@ -246,7 +239,7 @@
39896                       command_port_read_callback, port);
39897         result = usb_submit_urb(port->read_urb);
39898         if (result)
39899 -               dbg(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
39900 +               dbg("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
39901  }
39902  
39903  
39904 @@ -258,7 +251,7 @@
39905         __u8 *transfer_buffer;
39906         int retval = 0;
39907  
39908 -       dbg(__FUNCTION__" - command %d", command);
39909 +       dbg("%s - command %d", __FUNCTION__, command);
39910  
39911         port = &serial->port[COMMAND_PORT];
39912         info = (struct whiteheat_private *)port->private;
39913 @@ -271,7 +264,7 @@
39914         port->write_urb->dev = serial->dev;
39915         retval = usb_submit_urb (port->write_urb);
39916         if (retval) {
39917 -               dbg (__FUNCTION__" - submit urb failed");
39918 +               dbg("%s - submit urb failed", __FUNCTION__);
39919                 goto exit;
39920         }
39921  
39922 @@ -282,19 +275,19 @@
39923         }
39924  
39925         if (info->command_finished == FALSE) {
39926 -               dbg (__FUNCTION__ " - command timed out.");
39927 +               dbg("%s - command timed out.", __FUNCTION__);
39928                 retval = -ETIMEDOUT;
39929                 goto exit;
39930         }
39931  
39932         if (info->command_finished == WHITEHEAT_CMD_FAILURE) {
39933 -               dbg (__FUNCTION__ " - command failed.");
39934 +               dbg("%s - command failed.", __FUNCTION__);
39935                 retval = -EIO;
39936                 goto exit;
39937         }
39938  
39939         if (info->command_finished == WHITEHEAT_CMD_COMPLETE)
39940 -               dbg (__FUNCTION__ " - command completed.");
39941 +               dbg("%s - command completed.", __FUNCTION__);
39942  
39943  exit:
39944         return retval;
39945 @@ -308,70 +301,51 @@
39946         struct whiteheat_private        *info;
39947         int                             retval = 0;
39948  
39949 -       dbg(__FUNCTION__" - port %d", port->number);
39950 +       dbg("%s - port %d", __FUNCTION__, port->number);
39951  
39952 -       down (&port->sem);
39953 -
39954 -       ++port->open_count;
39955 -       MOD_INC_USE_COUNT;
39956 -       
39957 -       if (!port->active) {
39958 -               port->active = 1;
39959 -
39960 -               /* set up some stuff for our command port */
39961 -               command_port = &port->serial->port[COMMAND_PORT];
39962 -               if (command_port->private == NULL) {
39963 -                       info = (struct whiteheat_private *)kmalloc (sizeof(struct whiteheat_private), GFP_KERNEL);
39964 -                       if (info == NULL) {
39965 -                               err(__FUNCTION__ " - out of memory");
39966 -                               retval = -ENOMEM;
39967 -                               goto error_exit;
39968 -                       }
39969 -                       
39970 -                       init_waitqueue_head(&info->wait_command);
39971 -                       command_port->private = info;
39972 -                       command_port->write_urb->complete = command_port_write_callback;
39973 -                       command_port->read_urb->complete = command_port_read_callback;
39974 -                       command_port->read_urb->dev = port->serial->dev;
39975 -                       command_port->tty = port->tty;          /* need this to "fake" our our sanity check macros */
39976 -                       retval = usb_submit_urb (command_port->read_urb);
39977 -                       if (retval) {
39978 -                               err(__FUNCTION__ " - failed submitting read urb, error %d", retval);
39979 -                               goto error_exit;
39980 -                       }
39981 +       /* set up some stuff for our command port */
39982 +       command_port = &port->serial->port[COMMAND_PORT];
39983 +       if (command_port->private == NULL) {
39984 +               info = (struct whiteheat_private *)kmalloc (sizeof(struct whiteheat_private), GFP_KERNEL);
39985 +               if (info == NULL) {
39986 +                       err("%s - out of memory", __FUNCTION__);
39987 +                       retval = -ENOMEM;
39988 +                       goto exit;
39989                 }
39990                 
39991 -               /* Start reading from the device */
39992 -               port->read_urb->dev = port->serial->dev;
39993 -               retval = usb_submit_urb(port->read_urb);
39994 +               init_waitqueue_head(&info->wait_command);
39995 +               command_port->private = info;
39996 +               command_port->write_urb->complete = command_port_write_callback;
39997 +               command_port->read_urb->complete = command_port_read_callback;
39998 +               command_port->read_urb->dev = port->serial->dev;
39999 +               command_port->tty = port->tty;          /* need this to "fake" our our sanity check macros */
40000 +               retval = usb_submit_urb (command_port->read_urb);
40001                 if (retval) {
40002 -                       err(__FUNCTION__ " - failed submitting read urb, error %d", retval);
40003 -                       goto error_exit;
40004 +                       err("%s - failed submitting read urb, error %d", __FUNCTION__, retval);
40005 +                       goto exit;
40006                 }
40007 +       }
40008         
40009 -               /* send an open port command */
40010 -               /* firmware uses 1 based port numbering */
40011 -               open_command.port = port->number - port->serial->minor + 1;
40012 -               retval = whiteheat_send_cmd (port->serial, WHITEHEAT_OPEN, (__u8 *)&open_command, sizeof(open_command));
40013 -               if (retval)
40014 -                       goto error_exit;
40015 -       
40016 -               /* Need to do device specific setup here (control lines, baud rate, etc.) */
40017 -               /* FIXME!!! */
40018 +       /* Start reading from the device */
40019 +       port->read_urb->dev = port->serial->dev;
40020 +       retval = usb_submit_urb(port->read_urb);
40021 +       if (retval) {
40022 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, retval);
40023 +               goto exit;
40024         }
40025  
40026 -       dbg(__FUNCTION__ " - exit");
40027 -       up (&port->sem);
40028 -       
40029 -       return retval;
40030 +       /* send an open port command */
40031 +       /* firmware uses 1 based port numbering */
40032 +       open_command.port = port->number - port->serial->minor + 1;
40033 +       retval = whiteheat_send_cmd (port->serial, WHITEHEAT_OPEN, (__u8 *)&open_command, sizeof(open_command));
40034 +       if (retval)
40035 +               goto exit;
40036  
40037 -error_exit:
40038 -       --port->open_count;
40039 -       MOD_DEC_USE_COUNT;
40040 +       /* Need to do device specific setup here (control lines, baud rate, etc.) */
40041 +       /* FIXME!!! */
40042  
40043 -       dbg(__FUNCTION__ " - error_exit");
40044 -       up (&port->sem);
40045 -       
40046 +exit:
40047 +       dbg("%s - exit, retval = %d", __FUNCTION__, retval);
40048         return retval;
40049  }
40050  
40051 @@ -380,33 +354,25 @@
40052  {
40053         struct whiteheat_min_set        close_command;
40054         
40055 -       dbg(__FUNCTION__ " - port %d", port->number);
40056 +       dbg("%s - port %d", __FUNCTION__, port->number);
40057         
40058 -       down (&port->sem);
40059 -       --port->open_count;
40060 +       /* send a close command to the port */
40061 +       /* firmware uses 1 based port numbering */
40062 +       close_command.port = port->number - port->serial->minor + 1;
40063 +       whiteheat_send_cmd (port->serial, WHITEHEAT_CLOSE, (__u8 *)&close_command, sizeof(close_command));
40064  
40065 -       if (port->open_count <= 0) {
40066 -               /* send a close command to the port */
40067 -               /* firmware uses 1 based port numbering */
40068 -               close_command.port = port->number - port->serial->minor + 1;
40069 -               whiteheat_send_cmd (port->serial, WHITEHEAT_CLOSE, (__u8 *)&close_command, sizeof(close_command));
40070 +       /* Need to change the control lines here */
40071 +       /* FIXME */
40072         
40073 -               /* Need to change the control lines here */
40074 -               /* FIXME */
40075 -               
40076 -               /* shutdown our bulk reads and writes */
40077 -               usb_unlink_urb (port->write_urb);
40078 -               usb_unlink_urb (port->read_urb);
40079 -               port->active = 0;
40080 -       }
40081 -       MOD_DEC_USE_COUNT;
40082 -       up (&port->sem);
40083 +       /* shutdown our bulk reads and writes */
40084 +       usb_unlink_urb (port->write_urb);
40085 +       usb_unlink_urb (port->read_urb);
40086  }
40087  
40088  
40089  static int whiteheat_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
40090  {
40091 -       dbg(__FUNCTION__ " - port %d, cmd 0x%.4x", port->number, cmd);
40092 +       dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
40093  
40094         return -ENOIOCTLCMD;
40095  }
40096 @@ -417,12 +383,10 @@
40097         unsigned int cflag;
40098         struct whiteheat_port_settings port_settings;
40099  
40100 -       dbg(__FUNCTION__ " -port %d", port->number);
40101 -
40102 -       down (&port->sem);
40103 +       dbg("%s -port %d", __FUNCTION__, port->number);
40104  
40105         if ((!port->tty) || (!port->tty->termios)) {
40106 -               dbg(__FUNCTION__" - no tty structures");
40107 +               dbg("%s - no tty structures", __FUNCTION__);
40108                 goto exit;
40109         }
40110         
40111 @@ -431,7 +395,7 @@
40112         if (old_termios) {
40113                 if ((cflag == old_termios->c_cflag) &&
40114                     (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
40115 -                       dbg(__FUNCTION__ " - nothing to change...");
40116 +                       dbg("%s - nothing to change...", __FUNCTION__);
40117                         goto exit;
40118                 }
40119         }
40120 @@ -448,7 +412,7 @@
40121                 default:
40122                 case CS8:       port_settings.bits = 8;   break;
40123         }
40124 -       dbg(__FUNCTION__ " - data bits = %d", port_settings.bits);
40125 +       dbg("%s - data bits = %d", __FUNCTION__, port_settings.bits);
40126         
40127         /* determine the parity */
40128         if (cflag & PARENB)
40129 @@ -458,14 +422,14 @@
40130                         port_settings.parity = 'e';
40131         else
40132                 port_settings.parity = 'n';
40133 -       dbg(__FUNCTION__ " - parity = %c", port_settings.parity);
40134 +       dbg("%s - parity = %c", __FUNCTION__, port_settings.parity);
40135  
40136         /* figure out the stop bits requested */
40137         if (cflag & CSTOPB)
40138                 port_settings.stop = 2;
40139         else
40140                 port_settings.stop = 1;
40141 -       dbg(__FUNCTION__ " - stop bits = %d", port_settings.stop);
40142 +       dbg("%s - stop bits = %d", __FUNCTION__, port_settings.stop);
40143  
40144         
40145         /* figure out the flow control settings */
40146 @@ -473,7 +437,7 @@
40147                 port_settings.hflow = (WHITEHEAT_CTS_FLOW | WHITEHEAT_RTS_FLOW);
40148         else
40149                 port_settings.hflow = 0;
40150 -       dbg(__FUNCTION__ " - hardware flow control = %s %s %s %s",
40151 +       dbg("%s - hardware flow control = %s %s %s %s", __FUNCTION__,
40152             (port_settings.hflow & WHITEHEAT_CTS_FLOW) ? "CTS" : "",
40153             (port_settings.hflow & WHITEHEAT_RTS_FLOW) ? "RTS" : "",
40154             (port_settings.hflow & WHITEHEAT_DSR_FLOW) ? "DSR" : "",
40155 @@ -484,15 +448,15 @@
40156                 port_settings.sflow = 'b';
40157         else
40158                 port_settings.sflow = 'n';
40159 -       dbg(__FUNCTION__ " - software flow control = %c", port_settings.sflow);
40160 +       dbg("%s - software flow control = %c", __FUNCTION__, port_settings.sflow);
40161         
40162         port_settings.xon = START_CHAR(port->tty);
40163         port_settings.xoff = STOP_CHAR(port->tty);
40164 -       dbg(__FUNCTION__ " - XON = %2x, XOFF = %2x", port_settings.xon, port_settings.xoff);
40165 +       dbg("%s - XON = %2x, XOFF = %2x", __FUNCTION__, port_settings.xon, port_settings.xoff);
40166  
40167         /* get the baud rate wanted */
40168         port_settings.baud = tty_get_baud_rate(port->tty);
40169 -       dbg(__FUNCTION__ " - baud rate = %d", port_settings.baud);
40170 +       dbg("%s - baud rate = %d", __FUNCTION__, port_settings.baud);
40171  
40172         /* handle any settings that aren't specified in the tty structure */
40173         port_settings.lloop = 0;
40174 @@ -501,14 +465,13 @@
40175         whiteheat_send_cmd (port->serial, WHITEHEAT_SETUP_PORT, (__u8 *)&port_settings, sizeof(port_settings));
40176         
40177  exit:
40178 -       up (&port->sem);
40179         return;
40180  }
40181  
40182  
40183  static void whiteheat_throttle (struct usb_serial_port *port)
40184  {
40185 -       dbg(__FUNCTION__" - port %d", port->number);
40186 +       dbg("%s - port %d", __FUNCTION__, port->number);
40187  
40188         /* Change the control signals */
40189         /* FIXME!!! */
40190 @@ -519,7 +482,7 @@
40191  
40192  static void whiteheat_unthrottle (struct usb_serial_port *port)
40193  {
40194 -       dbg(__FUNCTION__" - port %d", port->number);
40195 +       dbg("%s - port %d", __FUNCTION__, port->number);
40196  
40197         /* Change the control signals */
40198         /* FIXME!!! */
40199 @@ -541,12 +504,12 @@
40200   - device renumerated itself and comes up as new device id with all
40201     firmware download completed.
40202  */
40203 -static int  whiteheat_fake_startup (struct usb_serial *serial)
40204 +static int whiteheat_fake_startup (struct usb_serial *serial)
40205  {
40206         int response;
40207         const struct whiteheat_hex_record *record;
40208         
40209 -       dbg(__FUNCTION__);
40210 +       dbg("%s", __FUNCTION__);
40211         
40212         response = ezusb_set_reset (serial, 1);
40213  
40214 @@ -555,8 +518,8 @@
40215                 response = ezusb_writememory (serial, record->address, 
40216                                 (unsigned char *)record->data, record->data_size, 0xa0);
40217                 if (response < 0) {
40218 -                       err(__FUNCTION__ " - ezusb_writememory failed for loader (%d %04X %p %d)", 
40219 -                               response, record->address, record->data, record->data_size);
40220 +                       err("%s - ezusb_writememory failed for loader (%d %04X %p %d)",
40221 +                               __FUNCTION__, response, record->address, record->data, record->data_size);
40222                         break;
40223                 }
40224                 ++record;
40225 @@ -572,8 +535,8 @@
40226                 response = ezusb_writememory (serial, record->address, 
40227                                 (unsigned char *)record->data, record->data_size, 0xa3);
40228                 if (response < 0) {
40229 -                       err(__FUNCTION__ " - ezusb_writememory failed for first firmware step (%d %04X %p %d)", 
40230 -                               response, record->address, record->data, record->data_size);
40231 +                       err("%s - ezusb_writememory failed for first firmware step (%d %04X %p %d)", 
40232 +                               __FUNCTION__, response, record->address, record->data, record->data_size);
40233                         break;
40234                 }
40235                 ++record;
40236 @@ -586,8 +549,8 @@
40237                 response = ezusb_writememory (serial, record->address, 
40238                                 (unsigned char *)record->data, record->data_size, 0xa0);
40239                 if (response < 0) {
40240 -                       err(__FUNCTION__" - ezusb_writememory failed for second firmware step (%d %04X %p %d)", 
40241 -                               response, record->address, record->data, record->data_size);
40242 +                       err("%s - ezusb_writememory failed for second firmware step (%d %04X %p %d)", 
40243 +                               __FUNCTION__, response, record->address, record->data, record->data_size);
40244                         break;
40245                 }
40246                 ++record;
40247 @@ -662,16 +625,8 @@
40248  static void whiteheat_real_shutdown (struct usb_serial *serial)
40249  {
40250         struct usb_serial_port *command_port;
40251 -       int i;
40252 -
40253 -       dbg(__FUNCTION__);
40254  
40255 -       /* stop reads and writes on all ports */
40256 -       for (i=0; i < serial->num_ports; ++i) {
40257 -               while (serial->port[i].open_count > 0) {
40258 -                       whiteheat_close (&serial->port[i], NULL);
40259 -               }
40260 -       }
40261 +       dbg("%s", __FUNCTION__);
40262  
40263         /* free up our private data for our command port */
40264         command_port = &serial->port[COMMAND_PORT];
40265 diff -Nur linux-2.4.19.old/drivers/usb/storage/Makefile linux-2.4.19/drivers/usb/storage/Makefile
40266 --- linux-2.4.19.old/drivers/usb/storage/Makefile       Sat Aug  3 02:39:45 2002
40267 +++ linux-2.4.19/drivers/usb/storage/Makefile   Mon Nov 25 12:27:12 2002
40268 @@ -15,6 +15,7 @@
40269  usb-storage-obj-$(CONFIG_USB_STORAGE_DEBUG)    += debug.o
40270  usb-storage-obj-$(CONFIG_USB_STORAGE_HP8200e)  += shuttle_usbat.o
40271  usb-storage-obj-$(CONFIG_USB_STORAGE_SDDR09)   += sddr09.o
40272 +usb-storage-obj-$(CONFIG_USB_STORAGE_SDDR55)   += sddr55.o
40273  usb-storage-obj-$(CONFIG_USB_STORAGE_FREECOM)  += freecom.o
40274  usb-storage-obj-$(CONFIG_USB_STORAGE_DPCM)     += dpcm.o
40275  usb-storage-obj-$(CONFIG_USB_STORAGE_ISD200)   += isd200.o
40276 diff -Nur linux-2.4.19.old/drivers/usb/storage/freecom.c linux-2.4.19/drivers/usb/storage/freecom.c
40277 --- linux-2.4.19.old/drivers/usb/storage/freecom.c      Mon Feb 25 20:38:07 2002
40278 +++ linux-2.4.19/drivers/usb/storage/freecom.c  Mon Nov 25 12:27:12 2002
40279 @@ -34,7 +34,7 @@
40280  #include "usb.h"
40281  #include "debug.h"
40282  #include "freecom.h"
40283 -#include "linux/hdreg.h"
40284 +#include <linux/hdreg.h>
40285  
40286  #ifdef CONFIG_USB_STORAGE_DEBUG
40287  static void pdump (void *, int);
40288 diff -Nur linux-2.4.19.old/drivers/usb/storage/scsiglue.c linux-2.4.19/drivers/usb/storage/scsiglue.c
40289 --- linux-2.4.19.old/drivers/usb/storage/scsiglue.c     Sun Nov 11 19:01:32 2001
40290 +++ linux-2.4.19/drivers/usb/storage/scsiglue.c Mon Nov 25 12:27:12 2002
40291 @@ -190,7 +190,7 @@
40292         }
40293  
40294         /* if we have an urb pending, let's wake the control thread up */
40295 -       if (us->current_urb->status == -EINPROGRESS) {
40296 +       if (!us->current_done.done) {
40297                 /* cancel the URB -- this will automatically wake the thread */
40298                 usb_unlink_urb(us->current_urb);
40299  
40300 diff -Nur linux-2.4.19.old/drivers/usb/storage/sddr55.c linux-2.4.19/drivers/usb/storage/sddr55.c
40301 --- linux-2.4.19.old/drivers/usb/storage/sddr55.c       Thu Jan  1 01:00:00 1970
40302 +++ linux-2.4.19/drivers/usb/storage/sddr55.c   Mon Nov 25 12:27:12 2002
40303 @@ -0,0 +1,1134 @@
40304 +/* Driver for SanDisk SDDR-55 SmartMedia reader
40305 + *
40306 + * $Id$
40307 + *
40308 + * SDDR55 driver v0.1:
40309 + *
40310 + * First release
40311 + *
40312 + * Current development and maintenance by:
40313 + *   (c) 2002 Simon Munton
40314 + *
40315 + * This program is free software; you can redistribute it and/or modify it
40316 + * under the terms of the GNU General Public License as published by the
40317 + * Free Software Foundation; either version 2, or (at your option) any
40318 + * later version.
40319 + *
40320 + * This program is distributed in the hope that it will be useful, but
40321 + * WITHOUT ANY WARRANTY; without even the implied warranty of
40322 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
40323 + * General Public License for more details.
40324 + *
40325 + * You should have received a copy of the GNU General Public License along
40326 + * with this program; if not, write to the Free Software Foundation, Inc.,
40327 + * 675 Mass Ave, Cambridge, MA 02139, USA.
40328 + */
40329 +
40330 +#include "transport.h"
40331 +#include "protocol.h"
40332 +#include "usb.h"
40333 +#include "debug.h"
40334 +#include "sddr55.h"
40335 +
40336 +#include <linux/sched.h>
40337 +#include <linux/errno.h>
40338 +#include <linux/slab.h>
40339 +
40340 +#define short_pack(lsb,msb) ( ((u16)(lsb)) | ( ((u16)(msb))<<8 ) )
40341 +#define LSB_of(s) ((s)&0xFF)
40342 +#define MSB_of(s) ((s)>>8)
40343 +#define PAGESIZE  512
40344 +
40345 +#define set_sense_info(sk, asc, ascq)  \
40346 +    do {                               \
40347 +       info->sense_data[2] = sk;       \
40348 +       info->sense_data[12] = asc;     \
40349 +       info->sense_data[13] = ascq;    \
40350 +       } while (0)
40351 +
40352 +
40353 +struct sddr55_card_info {
40354 +       unsigned long   capacity;       /* Size of card in bytes */
40355 +       int             max_log_blks;   /* maximum number of logical blocks */
40356 +       int             pageshift;      /* log2 of pagesize */
40357 +       int             smallpageshift; /* 1 if pagesize == 256 */
40358 +       int             blocksize;      /* Size of block in pages */
40359 +       int             blockshift;     /* log2 of blocksize */
40360 +       int             blockmask;      /* 2^blockshift - 1 */
40361 +       int             read_only;      /* non zero if card is write protected */
40362 +       int             force_read_only;        /* non zero if we find a map error*/
40363 +       int             *lba_to_pba;    /* logical to physical map */
40364 +       int             *pba_to_lba;    /* physical to logical map */
40365 +       int             fatal_error;    /* set if we detect something nasty */
40366 +       unsigned long   last_access;    /* number of jiffies since we last talked to device */
40367 +       unsigned char   sense_data[18];
40368 +};
40369 +
40370 +
40371 +#define NOT_ALLOCATED          0xffffffff
40372 +#define BAD_BLOCK              0xffff
40373 +#define CIS_BLOCK              0x400
40374 +#define UNUSED_BLOCK           0x3ff
40375 +
40376 +
40377 +
40378 +static int sddr55_raw_bulk(struct us_data *us, 
40379 +               int direction,
40380 +               unsigned char *data,
40381 +               unsigned int len) {
40382 +
40383 +       int result;
40384 +       int act_len;
40385 +       int pipe;
40386 +
40387 +       if (direction == SCSI_DATA_READ)
40388 +               pipe = usb_rcvbulkpipe(us->pusb_dev, us->ep_in);
40389 +       else
40390 +               pipe = usb_sndbulkpipe(us->pusb_dev, us->ep_out);
40391 +
40392 +       result = usb_stor_bulk_msg(us, data, pipe, len, &act_len);
40393 +
40394 +       /* if we stall, we need to clear it before we go on */
40395 +       if (result == -EPIPE) {
40396 +               US_DEBUGP("EPIPE: clearing endpoint halt for"
40397 +                       " pipe 0x%x, stalled at %d bytes\n",
40398 +                       pipe, act_len);
40399 +               usb_clear_halt(us->pusb_dev, pipe);
40400 +       }
40401 +
40402 +       if (result) {
40403 +
40404 +               /* NAK - that means we've retried a few times already */
40405 +               if (result == -ETIMEDOUT) {
40406 +                       US_DEBUGP("usbat_raw_bulk():"
40407 +                               " device NAKed\n");
40408 +
40409 +                       return US_BULK_TRANSFER_FAILED;
40410 +               }
40411 +
40412 +               /* -ENOENT -- we canceled this transfer */
40413 +               if (result == -ENOENT) {
40414 +                       US_DEBUGP("usbat_raw_bulk():"
40415 +                               " transfer aborted\n");
40416 +                       return US_BULK_TRANSFER_ABORTED;
40417 +               }
40418 +
40419 +               if (result == -EPIPE) {
40420 +                       US_DEBUGP("usbat_raw_bulk():"
40421 +                               " output pipe stalled\n");
40422 +                       return US_BULK_TRANSFER_FAILED;
40423 +               }
40424 +
40425 +               /* the catch-all case */
40426 +               US_DEBUGP("us_transfer_partial(): unknown error\n");
40427 +               return US_BULK_TRANSFER_FAILED;
40428 +       }
40429 +
40430 +       if (act_len != len) {
40431 +               US_DEBUGP("Warning: Transferred only %d bytes\n",
40432 +                       act_len);
40433 +               return US_BULK_TRANSFER_SHORT;
40434 +       }
40435 +
40436 +       US_DEBUGP("Transferred %d of %d bytes\n", act_len, len);
40437 +
40438 +       return US_BULK_TRANSFER_GOOD;
40439 +}
40440 +
40441 +/*
40442 + * Note: direction must be set if command_len == 0.
40443 + */
40444 +
40445 +static int sddr55_bulk_transport(struct us_data *us,
40446 +                         int direction,
40447 +                         unsigned char *data,
40448 +                         unsigned int len) {
40449 +
40450 +       int result = USB_STOR_TRANSPORT_GOOD;
40451 +       struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
40452 +
40453 +       if (len==0)
40454 +               return USB_STOR_TRANSPORT_GOOD;
40455 +
40456 +       info->last_access = jiffies;
40457 +
40458 +#ifdef CONFIG_USB_STORAGE_DEBUG
40459 +       if (direction == SCSI_DATA_WRITE) {
40460 +               int i;
40461 +               char string[64];
40462 +
40463 +               /* Debug-print the first 48 bytes of the write transfer */
40464 +
40465 +               strcpy(string, "wr: ");
40466 +               for (i=0; i<len && i<48; i++) {
40467 +                       sprintf(string+strlen(string), "%02X ",
40468 +                         data[i]);
40469 +                       if ((i%16)==15) {
40470 +                               US_DEBUGP("%s\n", string);
40471 +                               strcpy(string, "wr: ");
40472 +                       }
40473 +               }
40474 +               if ((i%16)!=0)
40475 +                       US_DEBUGP("%s\n", string);
40476 +       }
40477 +#endif
40478 +
40479 +       /* transfer the data */
40480 +
40481 +       US_DEBUGP("SCM data %s transfer %d\n",
40482 +                 ( direction==SCSI_DATA_READ ? "in" : "out"),
40483 +                 len);
40484 +
40485 +       result = sddr55_raw_bulk(us, direction, data, len);
40486 +
40487 +#ifdef CONFIG_USB_STORAGE_DEBUG
40488 +       if (direction == SCSI_DATA_READ) {
40489 +               int i;
40490 +               char string[64];
40491 +
40492 +               /* Debug-print the first 48 bytes of the read transfer */
40493 +
40494 +               strcpy(string, "rd: ");
40495 +               for (i=0; i<len && i<48; i++) {
40496 +                       sprintf(string+strlen(string), "%02X ",
40497 +                         data[i]);
40498 +                       if ((i%16)==15) {
40499 +                               US_DEBUGP("%s\n", string);
40500 +                               strcpy(string, "rd: ");
40501 +                       }
40502 +               }
40503 +               if ((i%16)!=0)
40504 +                       US_DEBUGP("%s\n", string);
40505 +       }
40506 +#endif
40507 +
40508 +       return result;
40509 +}
40510 +
40511 +
40512 +/* check if card inserted, if there is, update read_only status
40513 + * return non zero if no card
40514 + */
40515 +
40516 +static int sddr55_status(struct us_data *us)
40517 +{
40518 +       int result;
40519 +       unsigned char command[8] = {
40520 +               0, 0, 0, 0, 0, 0xb0, 0, 0x80
40521 +       };
40522 +       unsigned char status[8];
40523 +       struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
40524 +
40525 +       /* send command */
40526 +       result = sddr55_bulk_transport(us,
40527 +               SCSI_DATA_WRITE, command, 8);
40528 +
40529 +       US_DEBUGP("Result for send_command in status %d\n",
40530 +               result);
40531 +
40532 +       if (result != US_BULK_TRANSFER_GOOD) {
40533 +               set_sense_info (4, 0, 0);       /* hardware error */
40534 +               return result;
40535 +       }
40536 +
40537 +       result = sddr55_bulk_transport(us,
40538 +               SCSI_DATA_READ, status, 4);
40539 +
40540 +       /* expect to get short transfer if no card fitted */
40541 +       if (result == US_BULK_TRANSFER_SHORT) {
40542 +               /* had a short transfer, no card inserted, free map memory */
40543 +               if (info->lba_to_pba)
40544 +                       kfree(info->lba_to_pba);
40545 +               if (info->pba_to_lba)
40546 +                       kfree(info->pba_to_lba);
40547 +               info->lba_to_pba = NULL;
40548 +               info->pba_to_lba = NULL;
40549 +
40550 +               info->fatal_error = 0;
40551 +               info->force_read_only = 0;
40552 +
40553 +               set_sense_info (2, 0x3a, 0);    /* not ready, medium not present */
40554 +               return result;
40555 +       }
40556 +
40557 +       if (result != US_BULK_TRANSFER_GOOD) {
40558 +               set_sense_info (4, 0, 0);       /* hardware error */
40559 +               return result;
40560 +       }
40561 +       
40562 +       /* check write protect status */
40563 +       info->read_only = (status[0] & 0x20);
40564 +
40565 +       /* now read status */
40566 +       result = sddr55_bulk_transport(us,
40567 +               SCSI_DATA_READ, status, 2);
40568 +
40569 +       if (result != US_BULK_TRANSFER_GOOD) {
40570 +               set_sense_info (4, 0, 0);       /* hardware error */
40571 +       }
40572 +
40573 +       return result;
40574 +}
40575 +
40576 +
40577 +static int sddr55_read_data(struct us_data *us,
40578 +               unsigned int lba,
40579 +               unsigned int page,
40580 +               unsigned short sectors,
40581 +               unsigned char *content,
40582 +               int use_sg) {
40583 +
40584 +       int result;
40585 +       unsigned char command[8] = {
40586 +               0, 0, 0, 0, 0, 0xb0, 0, 0x85
40587 +       };
40588 +       unsigned char status[8];
40589 +       struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
40590 +
40591 +       unsigned int pba;
40592 +       unsigned long address;
40593 +
40594 +       unsigned short pages;
40595 +       unsigned char *buffer = NULL;
40596 +       unsigned char *ptr;
40597 +       struct scatterlist *sg = NULL;
40598 +       int i;
40599 +       int len;
40600 +       int transferred;
40601 +
40602 +       // If we're using scatter-gather, we have to create a new
40603 +       // buffer to read all of the data in first, since a
40604 +       // scatter-gather buffer could in theory start in the middle
40605 +       // of a page, which would be bad. A developer who wants a
40606 +       // challenge might want to write a limited-buffer
40607 +       // version of this code.
40608 +
40609 +       len = sectors * PAGESIZE;
40610 +
40611 +       if (use_sg) {
40612 +               sg = (struct scatterlist *)content;
40613 +               buffer = kmalloc(len, GFP_NOIO);
40614 +               if (buffer == NULL)
40615 +                       return USB_STOR_TRANSPORT_ERROR;
40616 +               ptr = buffer;
40617 +       } else
40618 +               ptr = content;
40619 +
40620 +       // This could be made much more efficient by checking for
40621 +       // contiguous LBA's. Another exercise left to the student.
40622 +
40623 +       while (sectors>0) {
40624 +
40625 +               /* have we got to end? */
40626 +               if (lba >= info->max_log_blks)
40627 +                       break;
40628 +
40629 +               pba = info->lba_to_pba[lba];
40630 +
40631 +               // Read as many sectors as possible in this block
40632 +
40633 +               pages = info->blocksize - page;
40634 +               if (pages > (sectors << info->smallpageshift))
40635 +                       pages = (sectors << info->smallpageshift);
40636 +
40637 +               US_DEBUGP("Read %02X pages, from PBA %04X"
40638 +                       " (LBA %04X) page %02X\n",
40639 +                       pages, pba, lba, page);
40640 +
40641 +               if (pba == NOT_ALLOCATED) {
40642 +                       /* no pba for this lba, fill with zeroes */
40643 +                       memset (ptr, 0, pages << info->pageshift);
40644 +               } else {
40645 +
40646 +                       address = (pba << info->blockshift) + page;
40647 +
40648 +                       command[1] = LSB_of(address>>16);
40649 +                       command[2] = LSB_of(address>>8);
40650 +                       command[3] = LSB_of(address);
40651 +
40652 +                       command[6] = LSB_of(pages << (1 - info->smallpageshift));
40653 +
40654 +                       /* send command */
40655 +                       result = sddr55_bulk_transport(us,
40656 +                               SCSI_DATA_WRITE, command, 8);
40657 +
40658 +                       US_DEBUGP("Result for send_command in read_data %d\n",
40659 +                               result);
40660 +
40661 +                       if (result != US_BULK_TRANSFER_GOOD) {
40662 +                               if (use_sg)
40663 +                                       kfree(buffer);
40664 +                               return result;
40665 +                       }
40666 +
40667 +                       /* read data */
40668 +                       result = sddr55_bulk_transport(us,
40669 +                               SCSI_DATA_READ, ptr,
40670 +                               pages<<info->pageshift);
40671 +
40672 +                       if (result != US_BULK_TRANSFER_GOOD) {
40673 +                               if (use_sg)
40674 +                                       kfree(buffer);
40675 +                               return result;
40676 +                       }
40677 +
40678 +                       /* now read status */
40679 +                       result = sddr55_bulk_transport(us,
40680 +                               SCSI_DATA_READ, status, 2);
40681 +
40682 +                       if (result != US_BULK_TRANSFER_GOOD) {
40683 +                               if (use_sg)
40684 +                                       kfree(buffer);
40685 +                               return result;
40686 +                       }
40687 +
40688 +                       /* check status for error */
40689 +                       if (status[0] == 0xff && status[1] == 0x4) {
40690 +                               set_sense_info (3, 0x11, 0);
40691 +                               if (use_sg)
40692 +                                       kfree(buffer);
40693 +
40694 +                               return USB_STOR_TRANSPORT_FAILED;
40695 +                       }
40696 +
40697 +               }
40698 +
40699 +               page = 0;
40700 +               lba++;
40701 +               sectors -= pages >> info->smallpageshift;
40702 +               ptr += (pages << info->pageshift);
40703 +       }
40704 +
40705 +       if (use_sg) {
40706 +               transferred = 0;
40707 +               for (i=0; i<use_sg && transferred<len; i++) {
40708 +                       memcpy(sg[i].address, buffer+transferred,
40709 +                               len-transferred > sg[i].length ?
40710 +                                       sg[i].length : len-transferred);
40711 +                       transferred += sg[i].length;
40712 +               }
40713 +               kfree(buffer);
40714 +       }
40715 +
40716 +       return USB_STOR_TRANSPORT_GOOD;
40717 +}
40718 +
40719 +static int sddr55_write_data(struct us_data *us,
40720 +               unsigned int lba,
40721 +               unsigned int page,
40722 +               unsigned short sectors,
40723 +               unsigned char *content,
40724 +               int use_sg) {
40725 +
40726 +       int result;
40727 +       unsigned char command[8] = {
40728 +               0, 0, 0, 0, 0, 0xb0, 0, 0x86
40729 +       };
40730 +       unsigned char status[8];
40731 +       struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
40732 +
40733 +       unsigned int pba;
40734 +       unsigned int new_pba;
40735 +       unsigned long address;
40736 +
40737 +       unsigned short pages;
40738 +       unsigned char *buffer = NULL;
40739 +       unsigned char *ptr;
40740 +       struct scatterlist *sg = NULL;
40741 +       int i;
40742 +       int len;
40743 +       int transferred;
40744 +
40745 +       /* check if we are allowed to write */
40746 +       if (info->read_only || info->force_read_only) {
40747 +               set_sense_info (7, 0x27, 0);    /* read only */
40748 +               return USB_STOR_TRANSPORT_FAILED;
40749 +       }
40750 +
40751 +       // If we're using scatter-gather, we have to create a new
40752 +       // buffer to write all of the data in first, since a
40753 +       // scatter-gather buffer could in theory start in the middle
40754 +       // of a page, which would be bad. A developer who wants a
40755 +       // challenge might want to write a limited-buffer
40756 +       // version of this code.
40757 +
40758 +       len = sectors * PAGESIZE;
40759 +
40760 +       if (use_sg) {
40761 +               sg = (struct scatterlist *)content;
40762 +               buffer = kmalloc(len, GFP_NOIO);
40763 +               if (buffer == NULL)
40764 +                       return USB_STOR_TRANSPORT_ERROR;
40765 +
40766 +               transferred = 0;
40767 +               for (i=0; i<use_sg && transferred<len; i++) {
40768 +                       memcpy(buffer+transferred, sg[i].address,
40769 +                               len-transferred > sg[i].length ?
40770 +                                       sg[i].length : len-transferred);
40771 +                       transferred += sg[i].length;
40772 +               }
40773 +
40774 +               ptr = buffer;
40775 +       } else
40776 +               ptr = content;
40777 +
40778 +       while (sectors > 0) {
40779 +
40780 +               /* have we got to end? */
40781 +               if (lba >= info->max_log_blks)
40782 +                       break;
40783 +
40784 +               pba = info->lba_to_pba[lba];
40785 +
40786 +               // Write as many sectors as possible in this block
40787 +
40788 +               pages = info->blocksize - page;
40789 +               if (pages > (sectors << info->smallpageshift))
40790 +                       pages = (sectors << info->smallpageshift);
40791 +
40792 +               US_DEBUGP("Write %02X pages, to PBA %04X"
40793 +                       " (LBA %04X) page %02X\n",
40794 +                       pages, pba, lba, page);
40795 +                       
40796 +               command[4] = 0;
40797 +
40798 +               if (pba == NOT_ALLOCATED) {
40799 +                       /* no pba allocated for this lba, find a free pba to use */
40800 +
40801 +                       int max_pba = (info->max_log_blks / 250 ) * 256;
40802 +                       int found_count = 0;
40803 +                       int found_pba = -1;
40804 +
40805 +                       /* set pba to first block in zone lba is in */
40806 +                       pba = (lba / 1000) * 1024;
40807 +
40808 +                       US_DEBUGP("No PBA for LBA %04X\n",lba);
40809 +
40810 +                       if (max_pba > 1024)
40811 +                               max_pba = 1024;
40812 +
40813 +                       /* scan through the map lookiong for an unused block
40814 +                        * leave 16 unused blocks at start (or as many as possible)
40815 +                        * since the sddr55 seems to reuse a used block when it shouldn't
40816 +                        * if we don't leave space */
40817 +                       for (i = 0; i < max_pba; i++, pba++) {
40818 +                               if (info->pba_to_lba[pba] == UNUSED_BLOCK) {
40819 +                                       found_pba = pba;
40820 +                                       if (found_count++ > 16)
40821 +                                               break;
40822 +                               }
40823 +                       }
40824 +
40825 +                       pba = found_pba;
40826 +
40827 +                       if (pba == -1) {
40828 +                               /* oh dear, couldn't find an unallocated block */
40829 +                               US_DEBUGP("Couldn't find unallocated block\n");
40830 +
40831 +                               set_sense_info (3, 0x31, 0);    /* medium error */
40832 +
40833 +                               if (use_sg)
40834 +                                       kfree(buffer);
40835 +
40836 +                               return USB_STOR_TRANSPORT_FAILED;
40837 +                       }
40838 +
40839 +                       US_DEBUGP("Allocating PBA %04X for LBA %04X\n", pba, lba);
40840 +
40841 +                       /* set writing to unallocated block flag */
40842 +                       command[4] = 0x40;
40843 +               }
40844 +
40845 +               address = (pba << info->blockshift) + page;
40846 +
40847 +               command[1] = LSB_of(address>>16);
40848 +               command[2] = LSB_of(address>>8); 
40849 +               command[3] = LSB_of(address);
40850 +
40851 +               /* set the lba into the command, modulo 1000 */
40852 +               command[0] = LSB_of(lba % 1000);
40853 +               command[6] = MSB_of(lba % 1000);
40854 +
40855 +               command[4] |= LSB_of(pages >> info->smallpageshift);
40856 +
40857 +               /* send command */
40858 +               result = sddr55_bulk_transport(us,
40859 +                       SCSI_DATA_WRITE, command, 8);
40860 +
40861 +               if (result != US_BULK_TRANSFER_GOOD) {
40862 +                       US_DEBUGP("Result for send_command in write_data %d\n",
40863 +                       result);
40864 +
40865 +                       set_sense_info (3, 0x3, 0);     /* peripheral write error */
40866 +                       
40867 +                       if (use_sg)
40868 +                               kfree(buffer);
40869 +                       return result;
40870 +               }
40871 +
40872 +               /* send the data */
40873 +               result = sddr55_bulk_transport(us,
40874 +                       SCSI_DATA_WRITE, ptr,
40875 +                       pages<<info->pageshift);
40876 +
40877 +               if (result != US_BULK_TRANSFER_GOOD) {
40878 +                       US_DEBUGP("Result for send_data in write_data %d\n",
40879 +                       result);
40880 +
40881 +                       set_sense_info (3, 0x3, 0);     /* peripheral write error */
40882 +
40883 +                       if (use_sg)
40884 +                               kfree(buffer);
40885 +                       return result;
40886 +               }
40887 +
40888 +               /* now read status */
40889 +               result = sddr55_bulk_transport(us,
40890 +                       SCSI_DATA_READ, status, 6);
40891 +
40892 +               if (result != US_BULK_TRANSFER_GOOD) {
40893 +                       US_DEBUGP("Result for get_status in write_data %d\n",
40894 +                       result);
40895 +
40896 +                       set_sense_info (3, 0x3, 0);     /* peripheral write error */
40897 +
40898 +                       if (use_sg)
40899 +                               kfree(buffer);
40900 +                       return result;
40901 +               }
40902 +
40903 +               new_pba = (status[3] + (status[4] << 8) + (status[5] << 16)) >> info->blockshift;
40904 +
40905 +               /* check status for error */
40906 +               if (status[0] == 0xff && status[1] == 0x4) {
40907 +                       set_sense_info (3, 0x0c, 0);
40908 +                       if (use_sg)
40909 +                               kfree(buffer);
40910 +
40911 +                       info->pba_to_lba[new_pba] = BAD_BLOCK;
40912 +
40913 +                       return USB_STOR_TRANSPORT_FAILED;
40914 +               }
40915 +
40916 +               US_DEBUGP("Updating maps for LBA %04X: old PBA %04X, new PBA %04X\n",
40917 +                       lba, pba, new_pba);
40918 +
40919 +               /* update the lba<->pba maps, note new_pba might be the same as pba */
40920 +               info->lba_to_pba[lba] = new_pba;
40921 +               info->pba_to_lba[pba] = UNUSED_BLOCK;
40922 +
40923 +               /* check that new_pba wasn't already being used */
40924 +               if (info->pba_to_lba[new_pba] != UNUSED_BLOCK) {
40925 +                       printk(KERN_ERR "sddr55 error: new PBA %04X already in use for LBA %04X\n",
40926 +                               new_pba, info->pba_to_lba[new_pba]);
40927 +                       info->fatal_error = 1;
40928 +                       set_sense_info (3, 0x31, 0);
40929 +                       if (use_sg)
40930 +                               kfree(buffer);
40931 +
40932 +                       return USB_STOR_TRANSPORT_FAILED;
40933 +               }
40934 +
40935 +               /* update the pba<->lba maps for new_pba */
40936 +               info->pba_to_lba[new_pba] = lba % 1000;
40937 +
40938 +               page = 0;
40939 +               lba++;
40940 +               sectors -= pages >> info->smallpageshift;
40941 +               ptr += (pages << info->pageshift);
40942 +       }
40943 +
40944 +       if (use_sg) {
40945 +               kfree(buffer);
40946 +       }
40947 +
40948 +       return USB_STOR_TRANSPORT_GOOD;
40949 +}
40950 +
40951 +static int sddr55_read_deviceID(struct us_data *us,
40952 +               unsigned char *manufacturerID,
40953 +               unsigned char *deviceID) {
40954 +
40955 +       int result;
40956 +       unsigned char command[8] = {
40957 +               0, 0, 0, 0, 0, 0xb0, 0, 0x84
40958 +       };
40959 +       unsigned char content[64];
40960 +
40961 +       result = sddr55_bulk_transport(us, SCSI_DATA_WRITE, command, 8);
40962 +
40963 +       US_DEBUGP("Result of send_control for device ID is %d\n",
40964 +               result);
40965 +
40966 +       if (result != US_BULK_TRANSFER_GOOD)
40967 +               return result;
40968 +
40969 +       result = sddr55_bulk_transport(us,
40970 +               SCSI_DATA_READ, content, 4);
40971 +
40972 +       if (result != US_BULK_TRANSFER_GOOD)
40973 +               return result;
40974 +
40975 +       *manufacturerID = content[0];
40976 +       *deviceID = content[1];
40977 +
40978 +       if (content[0] != 0xff) {
40979 +               result = sddr55_bulk_transport(us,
40980 +                       SCSI_DATA_READ, content, 2);
40981 +       }
40982 +
40983 +       return result;
40984 +}
40985 +
40986 +
40987 +int sddr55_reset(struct us_data *us) {
40988 +       return 0;
40989 +}
40990 +
40991 +
40992 +static unsigned long sddr55_get_capacity(struct us_data *us) {
40993 +
40994 +       unsigned char manufacturerID;
40995 +       unsigned char deviceID;
40996 +       int result;
40997 +       struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
40998 +
40999 +       US_DEBUGP("Reading capacity...\n");
41000 +
41001 +       result = sddr55_read_deviceID(us,
41002 +               &manufacturerID,
41003 +               &deviceID);
41004 +
41005 +       US_DEBUGP("Result of read_deviceID is %d\n",
41006 +               result);
41007 +
41008 +       if (result != US_BULK_TRANSFER_GOOD)
41009 +               return 0;
41010 +
41011 +       US_DEBUGP("Device ID = %02X\n", deviceID);
41012 +       US_DEBUGP("Manuf  ID = %02X\n", manufacturerID);
41013 +
41014 +       info->pageshift = 9;
41015 +       info->smallpageshift = 0;
41016 +       info->blocksize = 16;
41017 +       info->blockshift = 4;
41018 +       info->blockmask = 15;
41019 +
41020 +       switch (deviceID) {
41021 +
41022 +       case 0x6e: // 1MB
41023 +       case 0xe8:
41024 +       case 0xec:
41025 +               info->pageshift = 8;
41026 +               info->smallpageshift = 1;
41027 +               return 0x00100000;
41028 +
41029 +       case 0xea: // 2MB
41030 +       case 0x64:
41031 +               info->pageshift = 8;
41032 +               info->smallpageshift = 1;
41033 +       case 0x5d: // 5d is a ROM card with pagesize 512.
41034 +               return 0x00200000;
41035 +
41036 +       case 0xe3: // 4MB
41037 +       case 0xe5:
41038 +       case 0x6b:
41039 +       case 0xd5:
41040 +               return 0x00400000;
41041 +
41042 +       case 0xe6: // 8MB
41043 +       case 0xd6:
41044 +               return 0x00800000;
41045 +
41046 +       case 0x73: // 16MB
41047 +               info->blocksize = 32;
41048 +               info->blockshift = 5;
41049 +               info->blockmask = 31;
41050 +               return 0x01000000;
41051 +
41052 +       case 0x75: // 32MB
41053 +               info->blocksize = 32;
41054 +               info->blockshift = 5;
41055 +               info->blockmask = 31;
41056 +               return 0x02000000;
41057 +
41058 +       case 0x76: // 64MB
41059 +               info->blocksize = 32;
41060 +               info->blockshift = 5;
41061 +               info->blockmask = 31;
41062 +               return 0x04000000;
41063 +
41064 +       case 0x79: // 128MB
41065 +               info->blocksize = 32;
41066 +               info->blockshift = 5;
41067 +               info->blockmask = 31;
41068 +               return 0x08000000;
41069 +
41070 +       default: // unknown
41071 +               return 0;
41072 +
41073 +       }
41074 +}
41075 +
41076 +static int sddr55_read_map(struct us_data *us) {
41077 +
41078 +       struct sddr55_card_info *info = (struct sddr55_card_info *)(us->extra);
41079 +       int numblocks;
41080 +       unsigned char *buffer;
41081 +       unsigned char command[8] = { 0, 0, 0, 0, 0, 0xb0, 0, 0x8a};     
41082 +       int i;
41083 +       unsigned short lba;
41084 +       unsigned short max_lba;
41085 +       int result;
41086 +
41087 +       if (!info->capacity)
41088 +               return -1;
41089 +
41090 +       numblocks = info->capacity >> (info->blockshift + info->pageshift);
41091 +       
41092 +       buffer = kmalloc( numblocks * 2, GFP_NOIO );
41093 +       
41094 +       if (!buffer)
41095 +               return -1;
41096 +
41097 +       command[6] = numblocks * 2 / 256;
41098 +
41099 +       result = sddr55_bulk_transport(us, SCSI_DATA_WRITE, command, 8);
41100 +
41101 +       if ( result != US_BULK_TRANSFER_GOOD) {
41102 +               kfree (buffer);
41103 +               return -1;
41104 +       }
41105 +
41106 +       result = sddr55_bulk_transport(us, SCSI_DATA_READ, buffer, numblocks * 2);
41107 +
41108 +       if ( result != US_BULK_TRANSFER_GOOD) {
41109 +               kfree (buffer);
41110 +               return -1;
41111 +       }
41112 +
41113 +       result = sddr55_bulk_transport(us, SCSI_DATA_READ, command, 2);
41114 +
41115 +       if ( result != US_BULK_TRANSFER_GOOD) {
41116 +               kfree (buffer);
41117 +               return -1;
41118 +       }
41119 +
41120 +       if (info->lba_to_pba)
41121 +               kfree(info->lba_to_pba);
41122 +       if (info->pba_to_lba)
41123 +               kfree(info->pba_to_lba);
41124 +       info->lba_to_pba = kmalloc(numblocks*sizeof(int), GFP_NOIO);
41125 +       info->pba_to_lba = kmalloc(numblocks*sizeof(int), GFP_NOIO);
41126 +
41127 +       if (info->lba_to_pba == NULL || info->pba_to_lba == NULL) {
41128 +               if (info->lba_to_pba != NULL)
41129 +                       kfree(info->lba_to_pba);
41130 +               if (info->pba_to_lba != NULL)
41131 +                       kfree(info->pba_to_lba);
41132 +               info->lba_to_pba = NULL;
41133 +               info->pba_to_lba = NULL;
41134 +               kfree(buffer);
41135 +               return -1;
41136 +       }
41137 +
41138 +       memset(info->lba_to_pba, 0xff, numblocks*sizeof(int));
41139 +       memset(info->pba_to_lba, 0xff, numblocks*sizeof(int));
41140 +
41141 +       /* set maximum lba */
41142 +       max_lba = info->max_log_blks;
41143 +       if (max_lba > 1000)
41144 +               max_lba = 1000;
41145 +
41146 +       // Each block is 64 bytes of control data, so block i is located in
41147 +       // scatterlist block i*64/128k = i*(2^6)*(2^-17) = i*(2^-11)
41148 +
41149 +       for (i=0; i<numblocks; i++) {
41150 +               int zone = i / 1024;
41151 +
41152 +               lba = short_pack(buffer[i * 2], buffer[i * 2 + 1]);
41153 +
41154 +                       /* Every 1024 physical blocks ("zone"), the LBA numbers
41155 +                        * go back to zero, but are within a higher
41156 +                        * block of LBA's. Also, there is a maximum of
41157 +                        * 1000 LBA's per zone. In other words, in PBA
41158 +                        * 1024-2047 you will find LBA 0-999 which are
41159 +                        * really LBA 1000-1999. Yes, this wastes 24
41160 +                        * physical blocks per zone. Go figure. 
41161 +                        * These devices can have blocks go bad, so there
41162 +                        * are 24 spare blocks to use when blocks do go bad.
41163 +                        */
41164 +
41165 +                       /* SDDR55 returns 0xffff for a bad block, and 0x400 for the 
41166 +                        * CIS block. (Is this true for cards 8MB or less??)
41167 +                        * Record these in the physical to logical map
41168 +                        */ 
41169 +
41170 +               info->pba_to_lba[i] = lba;
41171 +
41172 +               if (lba >= max_lba) {
41173 +                       continue;
41174 +               }
41175 +               
41176 +               if (info->lba_to_pba[lba + zone * 1000] != NOT_ALLOCATED &&
41177 +                   !info->force_read_only) {
41178 +                       printk("sddr55: map inconsistency at LBA %04X\n", lba + zone * 1000);
41179 +                       info->force_read_only = 1;
41180 +               }
41181 +
41182 +               if (lba<0x10 || (lba>=0x3E0 && lba<0x3EF))
41183 +                       US_DEBUGP("LBA %04X <-> PBA %04X\n", lba, i);
41184 +
41185 +               info->lba_to_pba[lba + zone * 1000] = i;
41186 +       }
41187 +
41188 +       kfree(buffer);
41189 +       return 0;
41190 +}
41191 +
41192 +
41193 +static void sddr55_card_info_destructor(void *extra) {
41194 +       struct sddr55_card_info *info = (struct sddr55_card_info *)extra;
41195 +
41196 +       if (!extra)
41197 +               return;
41198 +
41199 +       if (info->lba_to_pba)
41200 +               kfree(info->lba_to_pba);
41201 +       if (info->pba_to_lba)
41202 +               kfree(info->pba_to_lba);
41203 +}
41204 +
41205 +
41206 +/*
41207 + * Transport for the Sandisk SDDR-55
41208 + */
41209 +int sddr55_transport(Scsi_Cmnd *srb, struct us_data *us)
41210 +{
41211 +       int result;
41212 +       int i;
41213 +       unsigned char inquiry_response[36] = {
41214 +               0x00, 0x80, 0x00, 0x02, 0x1F, 0x00, 0x00, 0x00
41215 +       };
41216 +       unsigned char mode_page_01[16] = { // write-protected for now
41217 +               0x03, 0x00, 0x80, 0x00,
41218 +               0x01, 0x0A,
41219 +               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
41220 +       };
41221 +       unsigned char *ptr;
41222 +       unsigned long capacity;
41223 +       unsigned int lba;
41224 +       unsigned int pba;
41225 +       unsigned int page;
41226 +       unsigned short pages;
41227 +       struct sddr55_card_info *info;
41228 +
41229 +       if (!us->extra) {
41230 +               us->extra = kmalloc(
41231 +                       sizeof(struct sddr55_card_info), GFP_NOIO);
41232 +               if (!us->extra)
41233 +                       return USB_STOR_TRANSPORT_ERROR;
41234 +               memset(us->extra, 0, sizeof(struct sddr55_card_info));
41235 +               us->extra_destructor = sddr55_card_info_destructor;
41236 +       }
41237 +
41238 +       info = (struct sddr55_card_info *)(us->extra);
41239 +
41240 +       ptr = (unsigned char *)srb->request_buffer;
41241 +
41242 +       if (srb->cmnd[0] == REQUEST_SENSE) {
41243 +               i = srb->cmnd[4];
41244 +
41245 +               if (i > sizeof info->sense_data)
41246 +                       i = sizeof info->sense_data;
41247 +
41248 +
41249 +               US_DEBUGP("SDDR55: request sense %02x/%02x/%02x\n", info->sense_data[2], info->sense_data[12], info->sense_data[13]);
41250 +
41251 +               info->sense_data[0] = 0x70;
41252 +               info->sense_data[7] = 10;
41253 +
41254 +               memcpy (ptr, info->sense_data, i);
41255 +               memset (info->sense_data, 0, sizeof info->sense_data);
41256 +
41257 +               return USB_STOR_TRANSPORT_GOOD;
41258 +       }
41259 +
41260 +       memset (info->sense_data, 0, sizeof info->sense_data);
41261 +
41262 +       /* Dummy up a response for INQUIRY since SDDR55 doesn't
41263 +          respond to INQUIRY commands */
41264 +
41265 +       if (srb->cmnd[0] == INQUIRY) {
41266 +               memset(inquiry_response+8, 0, 28);
41267 +               fill_inquiry_response(us, inquiry_response, 36);
41268 +               return USB_STOR_TRANSPORT_GOOD;
41269 +       }
41270 +
41271 +       /* only check card status if the map isn't allocated, ie no card seen yet
41272 +        * or if it's been over half a second since we last accessed it
41273 +        */
41274 +       if (info->lba_to_pba == NULL || time_after(jiffies, info->last_access + HZ/2)) {
41275 +
41276 +               /* check to see if a card is fitted */
41277 +               result = sddr55_status (us);
41278 +               if (result) {
41279 +                       result = sddr55_status (us);
41280 +                       if (!result) {
41281 +                       set_sense_info (6, 0x28, 0);    /* new media, set unit attention, not ready to ready */
41282 +                       }
41283 +                       return USB_STOR_TRANSPORT_FAILED;
41284 +               }
41285 +       }
41286 +
41287 +       /* if we detected a problem with the map when writing, don't allow any more access */
41288 +       if (info->fatal_error) {
41289 +
41290 +               set_sense_info (3, 0x31, 0);
41291 +               return USB_STOR_TRANSPORT_FAILED;
41292 +       }
41293 +
41294 +       if (srb->cmnd[0] == READ_CAPACITY) {
41295 +
41296 +               capacity = sddr55_get_capacity(us);
41297 +
41298 +               if (!capacity) {
41299 +                       set_sense_info (3, 0x30, 0);    /* incompatible medium */
41300 +                       return USB_STOR_TRANSPORT_FAILED;
41301 +               }
41302 +
41303 +               info->capacity = capacity;
41304 +
41305 +                /* figure out the maximum logical block number, allowing for the fact
41306 +                 * that only 250 out of every 256 are used */
41307 +               info->max_log_blks = ((info->capacity >> (info->pageshift + info->blockshift)) / 256) * 250;
41308 +
41309 +               /* Last page in the card, adjust as we only use 250 out of every 256 pages */
41310 +               capacity = (capacity / 256) * 250;
41311 +
41312 +               capacity /= PAGESIZE;
41313 +               capacity--;
41314 +
41315 +               ptr[0] = MSB_of(capacity>>16);
41316 +               ptr[1] = LSB_of(capacity>>16);
41317 +               ptr[2] = MSB_of(capacity&0xFFFF);
41318 +               ptr[3] = LSB_of(capacity&0xFFFF);
41319 +
41320 +               // The page size
41321 +
41322 +               ptr[4] = MSB_of(PAGESIZE>>16);
41323 +               ptr[5] = LSB_of(PAGESIZE>>16);
41324 +               ptr[6] = MSB_of(PAGESIZE&0xFFFF);
41325 +               ptr[7] = LSB_of(PAGESIZE&0xFFFF);
41326 +
41327 +               sddr55_read_map(us);
41328 +
41329 +               return USB_STOR_TRANSPORT_GOOD;
41330 +       }
41331 +
41332 +       if (srb->cmnd[0] == MODE_SENSE) {
41333 +
41334 +               mode_page_01[2] = (info->read_only || info->force_read_only) ? 0x80 : 0;
41335 +
41336 +               if ( (srb->cmnd[2] & 0x3F) == 0x01 ) {
41337 +
41338 +                       US_DEBUGP(
41339 +                         "SDDR55: Dummy up request for mode page 1\n");
41340 +
41341 +                       if (ptr==NULL || 
41342 +                         srb->request_bufflen<sizeof(mode_page_01)) {
41343 +                               set_sense_info (5, 0x24, 0);    /* invalid field in command */
41344 +                               return USB_STOR_TRANSPORT_FAILED;
41345 +                       }
41346 +
41347 +                       memcpy(ptr, mode_page_01, sizeof(mode_page_01));
41348 +                       return USB_STOR_TRANSPORT_GOOD;
41349 +
41350 +               } else if ( (srb->cmnd[2] & 0x3F) == 0x3F ) {
41351 +
41352 +                       US_DEBUGP(
41353 +                         "SDDR55: Dummy up request for all mode pages\n");
41354 +
41355 +                       if (ptr==NULL || 
41356 +                         srb->request_bufflen<sizeof(mode_page_01)) {
41357 +                               set_sense_info (5, 0x24, 0);    /* invalid field in command */
41358 +                               return USB_STOR_TRANSPORT_FAILED;
41359 +                       }
41360 +
41361 +                       memcpy(ptr, mode_page_01, sizeof(mode_page_01));
41362 +                       return USB_STOR_TRANSPORT_GOOD;
41363 +               }
41364 +
41365 +               set_sense_info (5, 0x24, 0);    /* invalid field in command */
41366 +
41367 +               return USB_STOR_TRANSPORT_FAILED;
41368 +       }
41369 +
41370 +       if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) {
41371 +
41372 +               US_DEBUGP(
41373 +                 "SDDR55: %s medium removal. Not that I can do"
41374 +                 " anything about it...\n",
41375 +                 (srb->cmnd[4]&0x03) ? "Prevent" : "Allow");
41376 +
41377 +               return USB_STOR_TRANSPORT_GOOD;
41378 +
41379 +       }
41380 +
41381 +       if (srb->cmnd[0] == READ_10 || srb->cmnd[0] == WRITE_10) {
41382 +
41383 +               page = short_pack(srb->cmnd[3], srb->cmnd[2]);
41384 +               page <<= 16;
41385 +               page |= short_pack(srb->cmnd[5], srb->cmnd[4]);
41386 +               pages = short_pack(srb->cmnd[8], srb->cmnd[7]);
41387 +
41388 +               page <<= info->smallpageshift;
41389 +
41390 +               // convert page to block and page-within-block
41391 +
41392 +               lba = page >> info->blockshift;
41393 +               page = page & info->blockmask;
41394 +
41395 +               // locate physical block corresponding to logical block
41396 +
41397 +               if (lba >= info->max_log_blks) {
41398 +
41399 +                       US_DEBUGP("Error: Requested LBA %04X exceeds maximum "
41400 +                         "block %04X\n", lba, info->max_log_blks-1);
41401 +
41402 +                       set_sense_info (5, 0x24, 0);    /* invalid field in command */
41403 +
41404 +                       return USB_STOR_TRANSPORT_FAILED;
41405 +               }
41406 +
41407 +               pba = info->lba_to_pba[lba];
41408 +
41409 +               if (srb->cmnd[0] == WRITE_10) {
41410 +                       US_DEBUGP("WRITE_10: write block %04X (LBA %04X) page %01X"
41411 +                               " pages %d\n",
41412 +                               pba, lba, page, pages);
41413 +
41414 +                       return sddr55_write_data(us, lba, page, pages, ptr, srb->use_sg);
41415 +               } else {
41416 +                       US_DEBUGP("READ_10: read block %04X (LBA %04X) page %01X"
41417 +                               " pages %d\n",
41418 +                               pba, lba, page, pages);
41419 +
41420 +                       return sddr55_read_data(us, lba, page, pages, ptr, srb->use_sg);
41421 +               }
41422 +       }
41423 +
41424 +
41425 +       if (srb->cmnd[0] == TEST_UNIT_READY) {
41426 +               return USB_STOR_TRANSPORT_GOOD;
41427 +       }
41428 +
41429 +       if (srb->cmnd[0] == START_STOP) {
41430 +               return USB_STOR_TRANSPORT_GOOD;
41431 +       }
41432 +
41433 +       set_sense_info (5, 0x20, 0);    /* illegal command */
41434 +
41435 +       return USB_STOR_TRANSPORT_FAILED; // FIXME: sense buffer?
41436 +}
41437 +
41438 diff -Nur linux-2.4.19.old/drivers/usb/storage/sddr55.h linux-2.4.19/drivers/usb/storage/sddr55.h
41439 --- linux-2.4.19.old/drivers/usb/storage/sddr55.h       Thu Jan  1 01:00:00 1970
41440 +++ linux-2.4.19/drivers/usb/storage/sddr55.h   Mon Nov 25 12:27:12 2002
41441 @@ -0,0 +1,34 @@
41442 +/* Driver for SanDisk SDDR-55 SmartMedia reader
41443 + * Header File
41444 + *
41445 + * $Id$
41446 + *
41447 + * Current development and maintenance by:
41448 + *   (c) 2002 Simon Munton
41449 + *
41450 + * See sddr55.c for more explanation
41451 + *
41452 + * This program is free software; you can redistribute it and/or modify it
41453 + * under the terms of the GNU General Public License as published by the
41454 + * Free Software Foundation; either version 2, or (at your option) any
41455 + * later version.
41456 + *
41457 + * This program is distributed in the hope that it will be useful, but
41458 + * WITHOUT ANY WARRANTY; without even the implied warranty of
41459 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
41460 + * General Public License for more details.
41461 + *
41462 + * You should have received a copy of the GNU General Public License along
41463 + * with this program; if not, write to the Free Software Foundation, Inc.,
41464 + * 675 Mass Ave, Cambridge, MA 02139, USA.
41465 + */
41466 +
41467 +#ifndef _USB_SHUTTLE_EUSB_SDDR55_H
41468 +#define _USB_SHUTTLE_EUSB_SDDR55_H
41469 +
41470 +/* Sandisk SDDR-55 stuff */
41471 +
41472 +extern int sddr55_transport(Scsi_Cmnd *srb, struct us_data *us);
41473 +extern int sddr55_reset(struct us_data *us);
41474 +
41475 +#endif
41476 diff -Nur linux-2.4.19.old/drivers/usb/storage/transport.c linux-2.4.19/drivers/usb/storage/transport.c
41477 --- linux-2.4.19.old/drivers/usb/storage/transport.c    Sat Aug  3 02:39:45 2002
41478 +++ linux-2.4.19/drivers/usb/storage/transport.c        Mon Nov 25 12:27:12 2002
41479 @@ -346,7 +346,7 @@
41480  /* This is the completion handler which will wake us up when an URB
41481   * completes.
41482   */
41483 -static void usb_stor_blocking_completion(urb_t *urb)
41484 +static void usb_stor_blocking_completion(struct urb *urb)
41485  {
41486         struct completion *urb_done_ptr = (struct completion *)urb->context;
41487  
41488 @@ -360,24 +360,23 @@
41489                          u8 request, u8 requesttype, u16 value, u16 index, 
41490                          void *data, u16 size)
41491  {
41492 -       struct completion urb_done;
41493         int status;
41494 -       devrequest *dr;
41495 +       struct usb_ctrlrequest *dr;
41496  
41497         /* allocate the device request structure */
41498 -       dr = kmalloc(sizeof(devrequest), GFP_NOIO);
41499 +       dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_NOIO);
41500         if (!dr)
41501                 return -ENOMEM;
41502  
41503         /* fill in the structure */
41504 -       dr->requesttype = requesttype;
41505 -       dr->request = request;
41506 -       dr->value = cpu_to_le16(value);
41507 -       dr->index = cpu_to_le16(index);
41508 -       dr->length = cpu_to_le16(size);
41509 +       dr->bRequestType = requesttype;
41510 +       dr->bRequest = request;
41511 +       dr->wValue = cpu_to_le16(value);
41512 +       dr->wIndex = cpu_to_le16(index);
41513 +       dr->wLength = cpu_to_le16(size);
41514  
41515         /* set up data structures for the wakeup system */
41516 -       init_completion(&urb_done);
41517 +       init_completion(&us->current_done);
41518  
41519         /* lock the URB */
41520         down(&(us->current_urb_sem));
41521 @@ -385,7 +384,7 @@
41522         /* fill the URB */
41523         FILL_CONTROL_URB(us->current_urb, us->pusb_dev, pipe, 
41524                          (unsigned char*) dr, data, size, 
41525 -                        usb_stor_blocking_completion, &urb_done);
41526 +                        usb_stor_blocking_completion, &us->current_done);
41527         us->current_urb->actual_length = 0;
41528         us->current_urb->error_count = 0;
41529         us->current_urb->transfer_flags = USB_ASYNC_UNLINK;
41530 @@ -401,7 +400,7 @@
41531  
41532         /* wait for the completion of the URB */
41533         up(&(us->current_urb_sem));
41534 -       wait_for_completion(&urb_done);
41535 +       wait_for_completion(&us->current_done);
41536         down(&(us->current_urb_sem));
41537  
41538         /* return the actual length of the data transferred if no error*/
41539 @@ -421,18 +420,17 @@
41540  int usb_stor_bulk_msg(struct us_data *us, void *data, int pipe,
41541                       unsigned int len, unsigned int *act_len)
41542  {
41543 -       struct completion urb_done;
41544         int status;
41545  
41546         /* set up data structures for the wakeup system */
41547 -       init_completion(&urb_done);
41548 +       init_completion(&us->current_done);
41549  
41550         /* lock the URB */
41551         down(&(us->current_urb_sem));
41552  
41553         /* fill the URB */
41554         FILL_BULK_URB(us->current_urb, us->pusb_dev, pipe, data, len,
41555 -                     usb_stor_blocking_completion, &urb_done);
41556 +                     usb_stor_blocking_completion, &us->current_done);
41557         us->current_urb->actual_length = 0;
41558         us->current_urb->error_count = 0;
41559         us->current_urb->transfer_flags = USB_ASYNC_UNLINK;
41560 @@ -447,7 +445,7 @@
41561  
41562         /* wait for the completion of the URB */
41563         up(&(us->current_urb_sem));
41564 -       wait_for_completion(&urb_done);
41565 +       wait_for_completion(&us->current_done);
41566         down(&(us->current_urb_sem));
41567  
41568         /* return the actual length of the data transferred */
41569 @@ -1040,10 +1038,15 @@
41570  /* Determine what the maximum LUN supported is */
41571  int usb_stor_Bulk_max_lun(struct us_data *us)
41572  {
41573 -       unsigned char data;
41574 +       unsigned char *data;
41575         int result;
41576         int pipe;
41577  
41578 +       data = kmalloc(sizeof *data, GFP_KERNEL);
41579 +       if (!data) {
41580 +               return 0;
41581 +       }
41582 +
41583         /* issue the command -- use usb_control_msg() because
41584          *  the state machine is not yet alive */
41585         pipe = usb_rcvctrlpipe(us->pusb_dev, 0);
41586 @@ -1051,14 +1054,19 @@
41587                                  US_BULK_GET_MAX_LUN, 
41588                                  USB_DIR_IN | USB_TYPE_CLASS | 
41589                                  USB_RECIP_INTERFACE,
41590 -                                0, us->ifnum, &data, sizeof(data), HZ);
41591 +                                0, us->ifnum, data, sizeof(data), HZ);
41592  
41593         US_DEBUGP("GetMaxLUN command result is %d, data is %d\n", 
41594 -                 result, data);
41595 +                 result, *data);
41596  
41597         /* if we have a successful request, return the result */
41598 -       if (result == 1)
41599 -               return data;
41600 +       if (result == 1) {
41601 +               result = *data;
41602 +               kfree(data);
41603 +               return result;
41604 +       } else {
41605 +               kfree(data);
41606 +       }
41607  
41608         /* if we get a STALL, clear the stall */
41609         if (result == -EPIPE) {
41610 @@ -1077,41 +1085,54 @@
41611  
41612  int usb_stor_Bulk_transport(Scsi_Cmnd *srb, struct us_data *us)
41613  {
41614 -       struct bulk_cb_wrap bcb;
41615 -       struct bulk_cs_wrap bcs;
41616 +       struct bulk_cb_wrap *bcb;
41617 +       struct bulk_cs_wrap *bcs;
41618         int result;
41619         int pipe;
41620         int partial;
41621 +       int ret = USB_STOR_TRANSPORT_ERROR;
41622 +
41623 +       bcb = kmalloc(sizeof *bcb, in_interrupt() ? GFP_ATOMIC : GFP_NOIO);
41624 +       if (!bcb) {
41625 +               return USB_STOR_TRANSPORT_ERROR;
41626 +       }
41627 +       bcs = kmalloc(sizeof *bcs, in_interrupt() ? GFP_ATOMIC : GFP_NOIO);
41628 +       if (!bcs) {
41629 +               kfree(bcb);
41630 +               return USB_STOR_TRANSPORT_ERROR;
41631 +       }
41632  
41633         /* set up the command wrapper */
41634 -       bcb.Signature = cpu_to_le32(US_BULK_CB_SIGN);
41635 -       bcb.DataTransferLength = cpu_to_le32(usb_stor_transfer_length(srb));
41636 -       bcb.Flags = srb->sc_data_direction == SCSI_DATA_READ ? 1 << 7 : 0;
41637 -       bcb.Tag = srb->serial_number;
41638 -       bcb.Lun = srb->cmnd[1] >> 5;
41639 +       bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN);
41640 +       bcb->DataTransferLength = cpu_to_le32(usb_stor_transfer_length(srb));
41641 +       bcb->Flags = srb->sc_data_direction == SCSI_DATA_READ ? 1 << 7 : 0;
41642 +       bcb->Tag = srb->serial_number;
41643 +       bcb->Lun = srb->cmnd[1] >> 5;
41644         if (us->flags & US_FL_SCM_MULT_TARG)
41645 -               bcb.Lun |= srb->target << 4;
41646 -       bcb.Length = srb->cmd_len;
41647 +               bcb->Lun |= srb->target << 4;
41648 +       bcb->Length = srb->cmd_len;
41649  
41650         /* construct the pipe handle */
41651         pipe = usb_sndbulkpipe(us->pusb_dev, us->ep_out);
41652  
41653         /* copy the command payload */
41654 -       memset(bcb.CDB, 0, sizeof(bcb.CDB));
41655 -       memcpy(bcb.CDB, srb->cmnd, bcb.Length);
41656 +       memset(bcb->CDB, 0, sizeof(bcb->CDB));
41657 +       memcpy(bcb->CDB, srb->cmnd, bcb->Length);
41658  
41659         /* send it to out endpoint */
41660         US_DEBUGP("Bulk command S 0x%x T 0x%x Trg %d LUN %d L %d F %d CL %d\n",
41661 -                 le32_to_cpu(bcb.Signature), bcb.Tag,
41662 -                 (bcb.Lun >> 4), (bcb.Lun & 0x0F), 
41663 -                 bcb.DataTransferLength, bcb.Flags, bcb.Length);
41664 -       result = usb_stor_bulk_msg(us, &bcb, pipe, US_BULK_CB_WRAP_LEN, 
41665 +                 le32_to_cpu(bcb->Signature), bcb->Tag,
41666 +                 (bcb->Lun >> 4), (bcb->Lun & 0x0F), 
41667 +                 bcb->DataTransferLength, bcb->Flags, bcb->Length);
41668 +       result = usb_stor_bulk_msg(us, bcb, pipe, US_BULK_CB_WRAP_LEN, 
41669                                    &partial);
41670         US_DEBUGP("Bulk command transfer result=%d\n", result);
41671  
41672         /* if the command was aborted, indicate that */
41673 -       if (result == -ENOENT)
41674 -               return USB_STOR_TRANSPORT_ABORTED;
41675 +       if (result == -ENOENT) {
41676 +               ret = USB_STOR_TRANSPORT_ABORTED;
41677 +               goto out;
41678 +       }
41679  
41680         /* if we stall, we need to clear it before we go on */
41681         if (result == -EPIPE) {
41682 @@ -1119,25 +1140,30 @@
41683                 result = usb_stor_clear_halt(us, pipe);
41684  
41685                 /* if the command was aborted, indicate that */
41686 -               if (result == -ENOENT)
41687 -                       return USB_STOR_TRANSPORT_ABORTED;
41688 +               if (result == -ENOENT) {
41689 +                       ret = USB_STOR_TRANSPORT_ABORTED;
41690 +                       goto out;
41691 +               }
41692                 result = -EPIPE;
41693         } else if (result) {
41694                 /* unknown error -- we've got a problem */
41695 -               return USB_STOR_TRANSPORT_ERROR;
41696 +               ret = USB_STOR_TRANSPORT_ERROR;
41697 +               goto out;
41698         }
41699  
41700         /* if the command transfered well, then we go to the data stage */
41701         if (result == 0) {
41702                 /* send/receive data payload, if there is any */
41703 -               if (bcb.DataTransferLength) {
41704 +               if (bcb->DataTransferLength) {
41705                         usb_stor_transfer(srb, us);
41706                         result = srb->result;
41707                         US_DEBUGP("Bulk data transfer result 0x%x\n", result);
41708  
41709                         /* if it was aborted, we need to indicate that */
41710 -                       if (result == US_BULK_TRANSFER_ABORTED)
41711 -                               return USB_STOR_TRANSPORT_ABORTED;
41712 +                       if (result == US_BULK_TRANSFER_ABORTED) {
41713 +                               ret = USB_STOR_TRANSPORT_ABORTED;
41714 +                               goto out;
41715 +                       }
41716                 }
41717         }
41718  
41719 @@ -1150,12 +1176,14 @@
41720  
41721         /* get CSW for device status */
41722         US_DEBUGP("Attempting to get CSW...\n");
41723 -       result = usb_stor_bulk_msg(us, &bcs, pipe, US_BULK_CS_WRAP_LEN, 
41724 +       result = usb_stor_bulk_msg(us, bcs, pipe, US_BULK_CS_WRAP_LEN, 
41725                                    &partial);
41726  
41727         /* if the command was aborted, indicate that */
41728 -       if (result == -ENOENT)
41729 -               return USB_STOR_TRANSPORT_ABORTED;
41730 +       if (result == -ENOENT) {
41731 +               ret = USB_STOR_TRANSPORT_ABORTED;
41732 +               goto out;
41733 +       }
41734  
41735         /* did the attempt to read the CSW fail? */
41736         if (result == -EPIPE) {
41737 @@ -1163,17 +1191,21 @@
41738                 result = usb_stor_clear_halt(us, pipe);
41739  
41740                 /* if the command was aborted, indicate that */
41741 -               if (result == -ENOENT)
41742 -                       return USB_STOR_TRANSPORT_ABORTED;
41743 +               if (result == -ENOENT) {
41744 +                       ret = USB_STOR_TRANSPORT_ABORTED;
41745 +                       goto out;
41746 +               }
41747  
41748                 /* get the status again */
41749                 US_DEBUGP("Attempting to get CSW (2nd try)...\n");
41750 -               result = usb_stor_bulk_msg(us, &bcs, pipe,
41751 +               result = usb_stor_bulk_msg(us, bcs, pipe,
41752                                            US_BULK_CS_WRAP_LEN, &partial);
41753  
41754                 /* if the command was aborted, indicate that */
41755 -               if (result == -ENOENT)
41756 -                       return USB_STOR_TRANSPORT_ABORTED;
41757 +               if (result == -ENOENT) {
41758 +                       ret = USB_STOR_TRANSPORT_ABORTED;
41759 +                       goto out;
41760 +               }
41761  
41762                 /* if it fails again, we need a reset and return an error*/
41763                 if (result == -EPIPE) {
41764 @@ -1181,48 +1213,60 @@
41765                         result = usb_stor_clear_halt(us, pipe);
41766  
41767                         /* if the command was aborted, indicate that */
41768 -                       if (result == -ENOENT)
41769 -                               return USB_STOR_TRANSPORT_ABORTED;
41770 -                       return USB_STOR_TRANSPORT_ERROR;
41771 +                       if (result == -ENOENT) {
41772 +                               ret = USB_STOR_TRANSPORT_ABORTED;
41773 +                       } else {
41774 +                               ret = USB_STOR_TRANSPORT_ERROR;
41775 +                       }
41776 +                       goto out;
41777                 }
41778         }
41779  
41780         /* if we still have a failure at this point, we're in trouble */
41781         US_DEBUGP("Bulk status result = %d\n", result);
41782         if (result) {
41783 -               return USB_STOR_TRANSPORT_ERROR;
41784 +               ret = USB_STOR_TRANSPORT_ERROR;
41785 +               goto out;
41786         }
41787  
41788         /* check bulk status */
41789         US_DEBUGP("Bulk status Sig 0x%x T 0x%x R %d Stat 0x%x\n",
41790 -                 le32_to_cpu(bcs.Signature), bcs.Tag, 
41791 -                 bcs.Residue, bcs.Status);
41792 -       if (bcs.Signature != cpu_to_le32(US_BULK_CS_SIGN) || 
41793 -           bcs.Tag != bcb.Tag || 
41794 -           bcs.Status > US_BULK_STAT_PHASE || partial != 13) {
41795 +                 le32_to_cpu(bcs->Signature), bcs->Tag, 
41796 +                 bcs->Residue, bcs->Status);
41797 +       if (bcs->Signature != cpu_to_le32(US_BULK_CS_SIGN) || 
41798 +           bcs->Tag != bcb->Tag || 
41799 +           bcs->Status > US_BULK_STAT_PHASE || partial != 13) {
41800                 US_DEBUGP("Bulk logical error\n");
41801 -               return USB_STOR_TRANSPORT_ERROR;
41802 +               ret = USB_STOR_TRANSPORT_ERROR;
41803 +               goto out;
41804         }
41805  
41806         /* based on the status code, we report good or bad */
41807 -       switch (bcs.Status) {
41808 +       switch (bcs->Status) {
41809                 case US_BULK_STAT_OK:
41810                         /* command good -- note that data could be short */
41811 -                       return USB_STOR_TRANSPORT_GOOD;
41812 +                       ret = USB_STOR_TRANSPORT_GOOD;
41813 +                       goto out;
41814  
41815                 case US_BULK_STAT_FAIL:
41816                         /* command failed */
41817 -                       return USB_STOR_TRANSPORT_FAILED;
41818 +                       ret = USB_STOR_TRANSPORT_FAILED;
41819 +                       goto out;
41820  
41821                 case US_BULK_STAT_PHASE:
41822                         /* phase error -- note that a transport reset will be
41823                          * invoked by the invoke_transport() function
41824                          */
41825 -                       return USB_STOR_TRANSPORT_ERROR;
41826 +                       ret = USB_STOR_TRANSPORT_ERROR;
41827 +                       goto out;
41828         }
41829  
41830         /* we should never get here, but if we do, we're in trouble */
41831 -       return USB_STOR_TRANSPORT_ERROR;
41832 +
41833 + out:
41834 +       kfree(bcb);
41835 +       kfree(bcs);
41836 +       return ret;
41837  }
41838  
41839  /***********************************************************************
41840 diff -Nur linux-2.4.19.old/drivers/usb/storage/transport.h linux-2.4.19/drivers/usb/storage/transport.h
41841 --- linux-2.4.19.old/drivers/usb/storage/transport.h    Sat Aug  3 02:39:45 2002
41842 +++ linux-2.4.19/drivers/usb/storage/transport.h        Mon Nov 25 12:27:12 2002
41843 @@ -58,6 +58,9 @@
41844  #define US_PR_EUSB_SDDR09      0x81    /* SCM-SCSI bridge for
41845                                                 SDDR-09 */
41846  #endif
41847 +#ifdef CONFIG_USB_STORAGE_SDDR55
41848 +#define US_PR_SDDR55   0x82            /* SDDR-55 (made up) */
41849 +#endif
41850  #define US_PR_DPCM_USB  0xf0           /* Combination CB/SDDR09 */
41851  
41852  #ifdef CONFIG_USB_STORAGE_FREECOM
41853 diff -Nur linux-2.4.19.old/drivers/usb/storage/unusual_devs.h linux-2.4.19/drivers/usb/storage/unusual_devs.h
41854 --- linux-2.4.19.old/drivers/usb/storage/unusual_devs.h Sat Aug  3 02:39:45 2002
41855 +++ linux-2.4.19/drivers/usb/storage/unusual_devs.h     Mon Nov 25 12:27:12 2002
41856 @@ -65,6 +65,17 @@
41857                 US_SC_8070, US_PR_SCM_ATAPI, init_8200e, 0), 
41858  #endif
41859  
41860 +/* Deduced by Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
41861 + * Entry needed for flags: US_FL_FIX_INQUIRY because initial inquiry message
41862 + * always fails and confuses drive; without US_FL_START_STOP, drive accesses
41863 + * (read or write) all fail.
41864 + */
41865 +UNUSUAL_DEV(  0x0411, 0x001c, 0x0113, 0x0113,
41866 +               "Buffalo",
41867 +               "DUB-P40G HDD",
41868 +               US_SC_SCSI, US_PR_BULK, NULL,
41869 +               US_FL_FIX_INQUIRY | US_FL_START_STOP),
41870 +
41871  #ifdef CONFIG_USB_STORAGE_DPCM
41872  UNUSUAL_DEV(  0x0436, 0x0005, 0x0100, 0x0100,
41873                 "Microtech",
41874 @@ -292,6 +303,13 @@
41875                 US_FL_MODE_XLATE ),
41876  #endif
41877  
41878 +/* Reported by Blake Matheny <bmatheny@purdue.edu> */
41879 +UNUSUAL_DEV(  0x05dc, 0xb002, 0x0000, 0x0113,
41880 +               "Lexar",
41881 +               "USB CF Reader",
41882 +               US_SC_SCSI, US_PR_BULK, NULL,
41883 +               US_FL_FIX_INQUIRY ),
41884 +
41885  /* Reported by Carlos Villegas <cav@uniscope.co.jp>
41886   * This device needs an INQUIRY of exactly 36-bytes to function.
41887   * That is the only reason this entry is needed.
41888 @@ -306,8 +324,10 @@
41889   * Like the SIIG unit above, this unit needs an INQUIRY to ask for exactly
41890   * 36 bytes of data.  No more, no less. That is the only reason this entry
41891   * is needed.
41892 - */
41893 -UNUSUAL_DEV(  0x05e3, 0x0702, 0x0000, 0xffff,
41894 + *
41895 + * ST818 slim drives (rev 0.02) don't need special care.
41896 +*/
41897 +UNUSUAL_DEV(  0x05e3, 0x0702, 0x0000, 0x0001,
41898                 "EagleTec",
41899                 "External Hard Disk",
41900                 US_SC_SCSI, US_PR_BULK, NULL,
41901 @@ -342,6 +362,12 @@
41902                  US_SC_SCSI, US_PR_BULK, NULL,
41903                  US_FL_START_STOP ),
41904  
41905 +UNUSUAL_DEV( 0x0686, 0x400b, 0x0001, 0x0001, 
41906 +               "Minolta", 
41907 +               "Dimage 7i", 
41908 +               US_SC_SCSI, US_PR_BULK, NULL, 
41909 +               US_FL_START_STOP ),
41910 +
41911  UNUSUAL_DEV(  0x0693, 0x0002, 0x0100, 0x0100, 
41912                 "Hagiwara",
41913                 "FlashGate SmartMedia",
41914 @@ -488,17 +514,22 @@
41915                  0 ),
41916  #endif
41917  
41918 -/* Submitted by Brian Hall <brihall@bigfoot.com>
41919 +/* Submitted by Brian Hall <brihall@pcisys.net>
41920   * Needed for START_STOP flag */
41921  UNUSUAL_DEV(  0x0c76, 0x0003, 0x0100, 0x0100,
41922                 "JMTek",
41923                 "USBDrive",
41924                 US_SC_SCSI, US_PR_BULK, NULL,
41925                 US_FL_START_STOP ),
41926 +UNUSUAL_DEV(  0x0c76, 0x0005, 0x0100, 0x0100,
41927 +               "JMTek",
41928 +               "USBDrive",
41929 +               US_SC_SCSI, US_PR_BULK, NULL,
41930 +               US_FL_START_STOP ),
41931  
41932  /* Reported by Dan Pilone <pilone@slac.com>
41933   * The device needs the flags only.
41934 - * Also reported by Brian Hall <brihall@bigfoot.com>, again for flags.
41935 + * Also reported by Brian Hall <brihall@pcisys.net>, again for flags.
41936   * I also suspect this device may have a broken serial number.
41937   */
41938  UNUSUAL_DEV(  0x1065, 0x2136, 0x0000, 0x9999,
41939 @@ -506,3 +537,11 @@
41940                 "EasyDisk Portable Device",
41941                 US_SC_SCSI, US_PR_BULK, NULL,
41942                 US_FL_MODE_XLATE | US_FL_START_STOP),
41943 +
41944 +#ifdef CONFIG_USB_STORAGE_SDDR55
41945 +UNUSUAL_DEV(  0x55aa, 0xa103, 0x0000, 0x9999, 
41946 +               "Sandisk",
41947 +               "ImageMate SDDR55",
41948 +               US_SC_SCSI, US_PR_SDDR55, NULL,
41949 +               US_FL_SINGLE_LUN),
41950 +#endif
41951 diff -Nur linux-2.4.19.old/drivers/usb/storage/usb.c linux-2.4.19/drivers/usb/storage/usb.c
41952 --- linux-2.4.19.old/drivers/usb/storage/usb.c  Sat Aug  3 02:39:45 2002
41953 +++ linux-2.4.19/drivers/usb/storage/usb.c      Mon Nov 25 12:27:12 2002
41954 @@ -60,6 +60,9 @@
41955  #ifdef CONFIG_USB_STORAGE_SDDR09
41956  #include "sddr09.h"
41957  #endif
41958 +#ifdef CONFIG_USB_STORAGE_SDDR55
41959 +#include "sddr55.h"
41960 +#endif
41961  #ifdef CONFIG_USB_STORAGE_DPCM
41962  #include "dpcm.h"
41963  #endif
41964 @@ -863,6 +866,15 @@
41965                         ss->max_lun = 0;
41966                         break;
41967  #endif
41968 +
41969 +#ifdef CONFIG_USB_STORAGE_SDDR55
41970 +               case US_PR_SDDR55:
41971 +                       ss->transport_name = "SDDR55";
41972 +                       ss->transport = sddr55_transport;
41973 +                       ss->transport_reset = sddr55_reset;
41974 +                       ss->max_lun = 0;
41975 +                       break;
41976 +#endif
41977  
41978  #ifdef CONFIG_USB_STORAGE_DPCM
41979                 case US_PR_DPCM_USB:
41980 diff -Nur linux-2.4.19.old/drivers/usb/storage/usb.h linux-2.4.19/drivers/usb/storage/usb.h
41981 --- linux-2.4.19.old/drivers/usb/storage/usb.h  Thu Nov 22 20:49:34 2001
41982 +++ linux-2.4.19/drivers/usb/storage/usb.h      Mon Nov 25 12:27:12 2002
41983 @@ -166,6 +166,7 @@
41984         /* control and bulk communications data */
41985         struct semaphore        current_urb_sem; /* to protect irq_urb   */
41986         struct urb              *current_urb;    /* non-int USB requests */
41987 +       struct completion       current_done;    /* the done flag        */
41988  
41989         /* the semaphore for sleeping the control thread */
41990         struct semaphore        sema;            /* to sleep thread on   */
41991 diff -Nur linux-2.4.19.old/drivers/usb/stv680.c linux-2.4.19/drivers/usb/stv680.c
41992 --- linux-2.4.19.old/drivers/usb/stv680.c       Sat Aug  3 02:39:45 2002
41993 +++ linux-2.4.19/drivers/usb/stv680.c   Mon Nov 25 12:27:12 2002
41994 @@ -86,7 +86,7 @@
41995  #define PDEBUG(level, fmt, args...) \
41996         do { \
41997         if (debug >= level)     \
41998 -               info("[" __PRETTY_FUNCTION__ ":%d] " fmt, __LINE__ , ## args);  \
41999 +               info("[%s:%d] " fmt, __PRETTY_FUNCTION__, __LINE__ , ## args);  \
42000         } while (0)
42001  
42002  
42003 @@ -111,67 +111,27 @@
42004   *
42005   * Memory management
42006   *
42007 - * This is a shameless copy from the USB-cpia driver (linux kernel
42008 - * version 2.3.29 or so, I have no idea what this code actually does ;).
42009 - * Actually it seems to be a copy of a shameless copy of the bttv-driver.
42010 - * Or that is a copy of a shameless copy of ... (To the powers: is there
42011 - * no generic kernel-function to do this sort of stuff?)
42012 - *
42013 - * Yes, it was a shameless copy from the bttv-driver. IIRC, Alan says
42014 - * there will be one, but apparentely not yet -jerdfelt
42015 - *
42016 - * So I copied it again for the ov511 driver -claudio
42017 - *
42018 - * Same for the se401 driver -Jeroen
42019 - *
42020 - * And the STV0680 driver - Kevin
42021   ********************************************************************/
42022  
42023 -/* Given PGD from the address space's page table, return the kernel
42024 - * virtual mapping of the physical memory mapped at ADR.
42025 - */
42026 -static inline unsigned long uvirt_to_kva (pgd_t * pgd, unsigned long adr)
42027 -{
42028 -       unsigned long ret = 0UL;
42029 -       pmd_t *pmd;
42030 -       pte_t *ptep, pte;
42031 -
42032 -       if (!pgd_none (*pgd)) {
42033 -               pmd = pmd_offset (pgd, adr);
42034 -               if (!pmd_none (*pmd)) {
42035 -                       ptep = pte_offset (pmd, adr);
42036 -                       pte = *ptep;
42037 -                       if (pte_present (pte)) {
42038 -                               ret = (unsigned long) page_address (pte_page (pte));
42039 -                               ret |= (adr & (PAGE_SIZE - 1));
42040 -                       }
42041 -               }
42042 -       }
42043 -       return ret;
42044 -}
42045 -
42046 -/* Here we want the physical address of the memory. This is used when 
42047 - * initializing the contents of the area and marking the pages as reserved.
42048 +/* Here we want the physical address of the memory.
42049 + * This is used when initializing the contents of the area.
42050   */
42051  static inline unsigned long kvirt_to_pa (unsigned long adr)
42052  {
42053 -       unsigned long va, kva, ret;
42054 +       unsigned long kva, ret;
42055  
42056 -       va = VMALLOC_VMADDR (adr);
42057 -       kva = uvirt_to_kva (pgd_offset_k (va), va);
42058 -       ret = __pa (kva);
42059 +       kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
42060 +       kva |= adr & (PAGE_SIZE-1); /* restore the offset */
42061 +       ret = __pa(kva);
42062         return ret;
42063  }
42064  
42065  static void *rvmalloc (unsigned long size)
42066  {
42067         void *mem;
42068 -       unsigned long adr, page;
42069 -
42070 -       /* Round it off to PAGE_SIZE */
42071 -       size += (PAGE_SIZE - 1);
42072 -       size &= ~(PAGE_SIZE - 1);
42073 +       unsigned long adr;
42074  
42075 +       size = PAGE_ALIGN(size);
42076         mem = vmalloc_32 (size);
42077         if (!mem)
42078                 return NULL;
42079 @@ -179,36 +139,25 @@
42080         memset (mem, 0, size);  /* Clear the ram out, no junk to the user */
42081         adr = (unsigned long) mem;
42082         while (size > 0) {
42083 -               page = kvirt_to_pa (adr);
42084 -               mem_map_reserve (virt_to_page (__va (page)));
42085 +               mem_map_reserve(vmalloc_to_page((void *)adr));
42086                 adr += PAGE_SIZE;
42087 -               if (size > PAGE_SIZE)
42088 -                       size -= PAGE_SIZE;
42089 -               else
42090 -                       size = 0;
42091 +               size -= PAGE_SIZE;
42092         }
42093         return mem;
42094  }
42095  
42096  static void rvfree (void *mem, unsigned long size)
42097  {
42098 -       unsigned long adr, page;
42099 +       unsigned long adr;
42100  
42101         if (!mem)
42102                 return;
42103  
42104 -       size += (PAGE_SIZE - 1);
42105 -       size &= ~(PAGE_SIZE - 1);
42106 -
42107         adr = (unsigned long) mem;
42108 -       while (size > 0) {
42109 -               page = kvirt_to_pa (adr);
42110 -               mem_map_unreserve (virt_to_page (__va (page)));
42111 +       while ((long) size > 0) {
42112 +               mem_map_unreserve(vmalloc_to_page((void *)adr));
42113                 adr += PAGE_SIZE;
42114 -               if (size > PAGE_SIZE)
42115 -                       size -= PAGE_SIZE;
42116 -               else
42117 -                       size = 0;
42118 +               size -= PAGE_SIZE;
42119         }
42120         vfree (mem);
42121  }
42122 @@ -772,7 +721,7 @@
42123  
42124  static int stv680_start_stream (struct usb_stv *stv680)
42125  {
42126 -       urb_t *urb;
42127 +       struct urb *urb;
42128         int err = 0, i;
42129  
42130         stv680->streaming = 1;
42131 @@ -1123,6 +1072,9 @@
42132                         errors++;
42133                 }
42134                 wait_event_interruptible (stv680->wq, (stv680->scratch[stv680->scratch_use].state == BUFFER_READY));
42135 +               
42136 +               if (stv680->removed)
42137 +                       return -ENODEV;
42138  
42139                 if (stv680->nullpackets > STV680_MAX_NULLPACKETS) {
42140                         stv680->nullpackets = 0;
42141 @@ -1191,10 +1143,10 @@
42142  
42143         for (i = 0; i < STV680_NUMFRAMES; i++)
42144                 stv680->frame[i].grabstate = FRAME_UNUSED;
42145 -       if (stv680->streaming)
42146 +       if (stv680->streaming && !stv680->removed)
42147                 stv680_stop_stream (stv680);
42148  
42149 -       if ((i = stv_stop_video (stv680)) < 0)
42150 +       if ((!stv680->removed) && (i = stv_stop_video (stv680)) < 0)
42151                 PDEBUG (1, "STV(e): stop_video failed in stv_close");
42152  
42153         rvfree (stv680->fbuf, stv680->maxframesize * STV680_NUMFRAMES);
42154 @@ -1220,6 +1172,9 @@
42155  
42156         if (!stv680->udev)
42157                 return -EIO;
42158 +               
42159 +       if (stv680->removed)
42160 +               return -ENODEV;
42161  
42162         switch (cmd) {
42163         case VIDIOCGCAP:{
42164 @@ -1545,7 +1500,7 @@
42165         initialize:     stv_init_done,
42166  };
42167  
42168 -static void *__devinit stv680_probe (struct usb_device *dev, unsigned int ifnum, const struct usb_device_id *id)
42169 +static void *stv680_probe (struct usb_device *dev, unsigned int ifnum, const struct usb_device_id *id)
42170  {
42171         struct usb_interface_descriptor *interface;
42172         struct usb_stv *stv680;
42173 @@ -1629,6 +1584,7 @@
42174  static void stv680_disconnect (struct usb_device *dev, void *ptr)
42175  {
42176         struct usb_stv *stv680 = (struct usb_stv *) ptr;
42177 +       int i;
42178  
42179         lock_kernel ();
42180         /* We don't want people trying to open up the device */
42181 @@ -1637,6 +1593,9 @@
42182                 usb_stv680_remove_disconnected (stv680);
42183         } else {
42184                 stv680->removed = 1;
42185 +               for( i = 0; i < STV680_NUMSBUF; i++)
42186 +                       usb_unlink_urb(stv680->urb[i]);
42187 +               wake_up_interruptible (&stv680->wq);
42188         }
42189         unlock_kernel ();
42190  }
42191 diff -Nur linux-2.4.19.old/drivers/usb/stv680.h linux-2.4.19/drivers/usb/stv680.h
42192 --- linux-2.4.19.old/drivers/usb/stv680.h       Mon Feb 25 20:38:07 2002
42193 +++ linux-2.4.19/drivers/usb/stv680.h   Mon Nov 25 12:27:12 2002
42194 @@ -45,7 +45,7 @@
42195  /* fmt 4 */
42196  #define STV_VIDEO_PALETTE       VIDEO_PALETTE_RGB24
42197  
42198 -static __devinitdata struct usb_device_id device_table[] = {
42199 +static struct usb_device_id device_table[] = {
42200         {USB_DEVICE (USB_PENCAM_VENDOR_ID, USB_PENCAM_PRODUCT_ID)},
42201         {}
42202  };
42203 @@ -118,7 +118,7 @@
42204         int removed;            /* device disconnected */
42205         int streaming;          /* Are we streaming video? */
42206         char *fbuf;             /* Videodev buffer area */
42207 -       urb_t *urb[STV680_NUMSBUF];     /* # of queued bulk transfers */
42208 +       struct urb *urb[STV680_NUMSBUF];        /* # of queued bulk transfers */
42209         int curframe;           /* Current receiving frame */
42210         struct stv680_frame frame[STV680_NUMFRAMES];    /* # frames supported by v4l part */
42211         int readcount;
42212 diff -Nur linux-2.4.19.old/drivers/usb/tiglusb.c linux-2.4.19/drivers/usb/tiglusb.c
42213 --- linux-2.4.19.old/drivers/usb/tiglusb.c      Thu Jan  1 01:00:00 1970
42214 +++ linux-2.4.19/drivers/usb/tiglusb.c  Mon Nov 25 12:27:12 2002
42215 @@ -0,0 +1,514 @@
42216 +/* Hey EMACS -*- linux-c -*-
42217 + *
42218 + * tiglusb -- Texas Instruments' USB GraphLink (aka SilverLink) driver.
42219 + * Target: Texas Instruments graphing calculators (http://lpg.ticalc.org).
42220 + *
42221 + * Copyright (C) 2001-2002:
42222 + *   Romain Lievin <roms@lpg.ticalc.org>
42223 + *   Julien BLACHE <jb@technologeek.org>
42224 + * under the terms of the GNU General Public License.
42225 + *
42226 + * Based on dabusb.c, printer.c & scanner.c
42227 + *
42228 + * Please see the file: linux/Documentation/usb/SilverLink.txt
42229 + * and the website at:  http://lpg.ticalc.org/prj_usb/
42230 + * for more info.
42231 + *
42232 + * History :
42233 + *  16/07/2002 : v1.04 -- Julien BLACHE <jb@jblache.org>
42234 + *    + removed useless usblp_cleanup()
42235 + *    + removed {un,}lock_kernel() as suggested on lkml
42236 + *    + inlined clear_pipes() (used once)
42237 + *    + inlined clear_device() (small, used twice)
42238 + *    + removed tiglusb_find_struct() (used once, simple code)
42239 + *    + replaced down() with down_interruptible() wherever possible
42240 + *    + fixed double unregistering wrt devfs, causing devfs
42241 + *      to force an oops when the device is deconnected
42242 + *    + removed unused fields from struct tiglusb_t
42243 + */
42244 +
42245 +#include <linux/module.h>
42246 +#include <linux/socket.h>
42247 +#include <linux/miscdevice.h>
42248 +#include <linux/slab.h>
42249 +#include <linux/init.h>
42250 +#include <asm/uaccess.h>
42251 +#include <linux/delay.h>
42252 +#include <linux/usb.h>
42253 +#include <linux/smp_lock.h>
42254 +#include <linux/devfs_fs_kernel.h>
42255 +
42256 +#include <linux/ticable.h>
42257 +#include "tiglusb.h"
42258 +
42259 +/*
42260 + * Version Information
42261 + */
42262 +#define DRIVER_VERSION "1.04"
42263 +#define DRIVER_AUTHOR  "Romain Lievin <roms@lpg.ticalc.org> & Julien Blache <jb@jblache.org>"
42264 +#define DRIVER_DESC    "TI-GRAPH LINK USB (aka SilverLink) driver"
42265 +#define DRIVER_LICENSE "GPL"
42266 +
42267 +/* ----- global variables --------------------------------------------- */
42268 +
42269 +static tiglusb_t tiglusb[MAXTIGL];
42270 +static int timeout = TIMAXTIME;        /* timeout in tenth of seconds     */
42271 +
42272 +static devfs_handle_t devfs_handle;
42273 +
42274 +/*---------- misc functions ------------------------------------------- */
42275 +
42276 +/*
42277 + * Re-initialize device
42278 + */
42279 +static inline int
42280 +clear_device (struct usb_device *dev)
42281 +{
42282 +       if (usb_set_configuration (dev, dev->config[0].bConfigurationValue) < 0) {
42283 +               err ("clear_device failed");
42284 +               return -1;
42285 +       }
42286 +
42287 +       return 0;
42288 +}
42289 +
42290 +/* 
42291 + * Clear input & output pipes (endpoints)
42292 + */
42293 +static inline int
42294 +clear_pipes (struct usb_device *dev)
42295 +{
42296 +       unsigned int pipe;
42297 +
42298 +       pipe = usb_sndbulkpipe (dev, 1);
42299 +       if (usb_clear_halt (dev, usb_pipeendpoint (pipe))) {
42300 +               err ("clear_pipe (r), request failed");
42301 +               return -1;
42302 +       }
42303 +
42304 +       pipe = usb_sndbulkpipe (dev, 2);
42305 +       if (usb_clear_halt (dev, usb_pipeendpoint (pipe))) {
42306 +               err ("clear_pipe (w), request failed");
42307 +               return -1;
42308 +       }
42309 +
42310 +       return 0;
42311 +}
42312 +
42313 +/* ----- file operations functions--------------------------------------- */
42314 +
42315 +static int
42316 +tiglusb_open (struct inode *inode, struct file *filp)
42317 +{
42318 +       int devnum = minor (inode->i_rdev);
42319 +       ptiglusb_t s;
42320 +
42321 +       if (devnum < TIUSB_MINOR || devnum >= (TIUSB_MINOR + MAXTIGL))
42322 +               return -EIO;
42323 +
42324 +       s = &tiglusb[devnum - TIUSB_MINOR];
42325 +
42326 +       if (down_interruptible (&s->mutex)) {
42327 +               return -ERESTARTSYS;
42328 +       }
42329 +
42330 +       while (!s->dev || s->opened) {
42331 +               up (&s->mutex);
42332 +
42333 +               if (filp->f_flags & O_NONBLOCK) {
42334 +                       return -EBUSY;
42335 +               }
42336 +
42337 +               schedule_timeout (HZ / 2);
42338 +
42339 +               if (signal_pending (current)) {
42340 +                       return -EAGAIN;
42341 +               }
42342 +
42343 +               if (down_interruptible (&s->mutex)) {
42344 +                       return -ERESTARTSYS;
42345 +               }
42346 +       }
42347 +
42348 +       s->opened = 1;
42349 +       up (&s->mutex);
42350 +
42351 +       filp->f_pos = 0;
42352 +       filp->private_data = s;
42353 +
42354 +       return 0;
42355 +}
42356 +
42357 +static int
42358 +tiglusb_release (struct inode *inode, struct file *filp)
42359 +{
42360 +       ptiglusb_t s = (ptiglusb_t) filp->private_data;
42361 +
42362 +       if (down_interruptible (&s->mutex)) {
42363 +               return -ERESTARTSYS;
42364 +       }
42365 +
42366 +       s->state = _stopped;
42367 +       up (&s->mutex);
42368 +
42369 +       if (!s->remove_pending)
42370 +               clear_device (s->dev);
42371 +       else
42372 +               wake_up (&s->remove_ok);
42373 +
42374 +       s->opened = 0;
42375 +
42376 +       return 0;
42377 +}
42378 +
42379 +static ssize_t
42380 +tiglusb_read (struct file *filp, char *buf, size_t count, loff_t * f_pos)
42381 +{
42382 +       ptiglusb_t s = (ptiglusb_t) filp->private_data;
42383 +       ssize_t ret = 0;
42384 +       int bytes_to_read = 0;
42385 +       int bytes_read = 0;
42386 +       int result = 0;
42387 +       char buffer[BULK_RCV_MAX];
42388 +       unsigned int pipe;
42389 +
42390 +       if (*f_pos)
42391 +               return -ESPIPE;
42392 +
42393 +       if (s->remove_pending)
42394 +               return -EIO;
42395 +
42396 +       if (!s->dev)
42397 +               return -EIO;
42398 +
42399 +       bytes_to_read = (count >= BULK_RCV_MAX) ? BULK_RCV_MAX : count;
42400 +
42401 +       pipe = usb_rcvbulkpipe (s->dev, 1);
42402 +       result = usb_bulk_msg (s->dev, pipe, buffer, bytes_to_read,
42403 +                              &bytes_read, HZ / (timeout / 10));
42404 +       if (result == -ETIMEDOUT) {     /* NAK */
42405 +               ret = result;
42406 +               if (!bytes_read) {
42407 +                       dbg ("quirk !");
42408 +               }
42409 +               warn ("tiglusb_read, NAK received.");
42410 +               goto out;
42411 +       } else if (result == -EPIPE) {  /* STALL -- shouldn't happen */
42412 +               warn ("clear_halt request to remove STALL condition.");
42413 +               if (usb_clear_halt (s->dev, usb_pipeendpoint (pipe)))
42414 +                       err ("clear_halt, request failed");
42415 +               clear_device (s->dev);
42416 +               ret = result;
42417 +               goto out;
42418 +       } else if (result < 0) {        /* We should not get any I/O errors */
42419 +               err ("funky result: %d. Please notify maintainer.", result);
42420 +               ret = -EIO;
42421 +               goto out;
42422 +       }
42423 +
42424 +       if (copy_to_user (buf, buffer, bytes_read)) {
42425 +               ret = -EFAULT;
42426 +       }
42427 +
42428 +      out:
42429 +       return ret ? ret : bytes_read;
42430 +}
42431 +
42432 +static ssize_t
42433 +tiglusb_write (struct file *filp, const char *buf, size_t count, loff_t * f_pos)
42434 +{
42435 +       ptiglusb_t s = (ptiglusb_t) filp->private_data;
42436 +       ssize_t ret = 0;
42437 +       int bytes_to_write = 0;
42438 +       int bytes_written = 0;
42439 +       int result = 0;
42440 +       char buffer[BULK_SND_MAX];
42441 +       unsigned int pipe;
42442 +
42443 +       if (*f_pos)
42444 +               return -ESPIPE;
42445 +
42446 +       if (s->remove_pending)
42447 +               return -EIO;
42448 +
42449 +       if (!s->dev)
42450 +               return -EIO;
42451 +
42452 +       bytes_to_write = (count >= BULK_SND_MAX) ? BULK_SND_MAX : count;
42453 +       if (copy_from_user (buffer, buf, bytes_to_write)) {
42454 +               ret = -EFAULT;
42455 +               goto out;
42456 +       }
42457 +
42458 +       pipe = usb_sndbulkpipe (s->dev, 2);
42459 +       result = usb_bulk_msg (s->dev, pipe, buffer, bytes_to_write,
42460 +                              &bytes_written, HZ / (timeout / 10));
42461 +
42462 +       if (result == -ETIMEDOUT) {     /* NAK */
42463 +               warn ("tiglusb_write, NAK received.");
42464 +               ret = result;
42465 +               goto out;
42466 +       } else if (result == -EPIPE) {  /* STALL -- shouldn't happen */
42467 +               warn ("clear_halt request to remove STALL condition.");
42468 +               if (usb_clear_halt (s->dev, usb_pipeendpoint (pipe)))
42469 +                       err ("clear_halt, request failed");
42470 +               clear_device (s->dev);
42471 +               ret = result;
42472 +               goto out;
42473 +       } else if (result < 0) {        /* We should not get any I/O errors */
42474 +               warn ("funky result: %d. Please notify maintainer.", result);
42475 +               ret = -EIO;
42476 +               goto out;
42477 +       }
42478 +
42479 +       if (bytes_written != bytes_to_write) {
42480 +               ret = -EIO;
42481 +       }
42482 +
42483 +      out:
42484 +       return ret ? ret : bytes_written;
42485 +}
42486 +
42487 +static int
42488 +tiglusb_ioctl (struct inode *inode, struct file *filp,
42489 +              unsigned int cmd, unsigned long arg)
42490 +{
42491 +       ptiglusb_t s = (ptiglusb_t) filp->private_data;
42492 +       int ret = 0;
42493 +
42494 +       if (s->remove_pending)
42495 +               return -EIO;
42496 +
42497 +       if (down_interruptible (&s->mutex)) {
42498 +               return -ERESTARTSYS;
42499 +       }
42500 +
42501 +       if (!s->dev) {
42502 +               up (&s->mutex);
42503 +               return -EIO;
42504 +       }
42505 +
42506 +       switch (cmd) {
42507 +       case IOCTL_TIUSB_TIMEOUT:
42508 +               timeout = arg;  // timeout value in tenth of seconds
42509 +               break;
42510 +       case IOCTL_TIUSB_RESET_DEVICE:
42511 +               dbg ("IOCTL_TIGLUSB_RESET_DEVICE");
42512 +               if (clear_device (s->dev))
42513 +                       ret = -EIO;
42514 +               break;
42515 +       case IOCTL_TIUSB_RESET_PIPES:
42516 +               dbg ("IOCTL_TIGLUSB_RESET_PIPES");
42517 +               if (clear_pipes (s->dev))
42518 +                       ret = -EIO;
42519 +               break;
42520 +       default:
42521 +               ret = -ENOTTY;
42522 +               break;
42523 +       }
42524 +
42525 +       up (&s->mutex);
42526 +
42527 +       return ret;
42528 +}
42529 +
42530 +/* ----- kernel module registering ------------------------------------ */
42531 +
42532 +static struct file_operations tiglusb_fops = {
42533 +       .llseek =       no_llseek,
42534 +       .read =         tiglusb_read,
42535 +       .write =        tiglusb_write,
42536 +       .ioctl =        tiglusb_ioctl,
42537 +       .open =         tiglusb_open,
42538 +       .release =      tiglusb_release,
42539 +};
42540 +
42541 +/* --- initialisation code ------------------------------------- */
42542 +
42543 +static void *
42544 +tiglusb_probe (struct usb_device *dev, unsigned int ifnum,
42545 +              const struct usb_device_id *id)
42546 +{
42547 +       int minor = -1;
42548 +       int i;
42549 +       ptiglusb_t s;
42550 +       char name[8];
42551 +
42552 +       dbg ("probing vendor id 0x%x, device id 0x%x ifnum:%d",
42553 +            dev->descriptor.idVendor, dev->descriptor.idProduct, ifnum);
42554 +
42555 +       /*
42556 +        * We don't handle multiple configurations. As of version 0x0103 of
42557 +        * the TIGL hardware, there's only 1 configuration.
42558 +        */
42559 +
42560 +       if (dev->descriptor.bNumConfigurations != 1)
42561 +               return NULL;
42562 +
42563 +       if ((dev->descriptor.idProduct != 0xe001)
42564 +           && (dev->descriptor.idVendor != 0x451))
42565 +               return NULL;
42566 +
42567 +       if (usb_set_configuration (dev, dev->config[0].bConfigurationValue) < 0) {
42568 +               err ("tiglusb_probe: set_configuration failed");
42569 +               return NULL;
42570 +       }
42571 +
42572 +       /*
42573 +        * Find a tiglusb struct
42574 +        */
42575 +       for (i = 0; i < MAXTIGL; i++) {
42576 +               ptiglusb_t s = &tiglusb[i];
42577 +               if (!s->dev) {
42578 +                       minor = i;
42579 +                       break;
42580 +               }
42581 +       }
42582 +
42583 +       if (minor == -1)
42584 +               return NULL;
42585 +
42586 +       s = &tiglusb[minor];
42587 +
42588 +       down (&s->mutex);
42589 +       s->remove_pending = 0;
42590 +       s->dev = dev;
42591 +       up (&s->mutex);
42592 +       dbg ("bound to interface: %d", ifnum);
42593 +
42594 +       sprintf (name, "%d", s->minor);
42595 +       dbg ("registering to devfs : major = %d, minor = %d, node = %s",
42596 +            TIUSB_MAJOR, (TIUSB_MINOR + s->minor), name);
42597 +       s->devfs =
42598 +           devfs_register (devfs_handle, name, DEVFS_FL_DEFAULT, TIUSB_MAJOR,
42599 +                           TIUSB_MINOR + s->minor, S_IFCHR | S_IRUGO | S_IWUGO,
42600 +                           &tiglusb_fops, NULL);
42601 +
42602 +       /* Display firmware version */
42603 +       info ("link cable version %i.%02x",
42604 +               dev->descriptor.bcdDevice >> 8,
42605 +               dev->descriptor.bcdDevice & 0xff);
42606 +
42607 +       return s;
42608 +}
42609 +
42610 +static void
42611 +tiglusb_disconnect (struct usb_device *dev, void *drv_context)
42612 +{
42613 +       ptiglusb_t s = (ptiglusb_t) drv_context;
42614 +
42615 +       if (!s || !s->dev)
42616 +               info ("bogus disconnect");
42617 +
42618 +       s->remove_pending = 1;
42619 +       wake_up (&s->wait);
42620 +       if (s->state == _started)
42621 +               sleep_on (&s->remove_ok);
42622 +       down (&s->mutex);
42623 +       s->dev = NULL;
42624 +       s->opened = 0;
42625 +
42626 +       devfs_unregister (s->devfs);
42627 +       s->devfs = NULL;
42628 +
42629 +       info ("device %d removed", s->minor);
42630 +
42631 +       up (&s->mutex);
42632 +}
42633 +
42634 +static struct usb_device_id tiglusb_ids[] = {
42635 +       {USB_DEVICE (0x0451, 0xe001)},
42636 +       {}
42637 +};
42638 +
42639 +MODULE_DEVICE_TABLE (usb, tiglusb_ids);
42640 +
42641 +static struct usb_driver tiglusb_driver = {
42642 +       .name =         "tiglusb",
42643 +       .probe =        tiglusb_probe,
42644 +       .disconnect =   tiglusb_disconnect,
42645 +       .id_table =     tiglusb_ids,
42646 +};
42647 +
42648 +/* --- initialisation code ------------------------------------- */
42649 +
42650 +#ifndef MODULE
42651 +/*
42652 + * You can use 'tiusb=timeout'
42653 + */
42654 +static int __init
42655 +tiglusb_setup (char *str)
42656 +{
42657 +       int ints[2];
42658 +
42659 +       str = get_options (str, ARRAY_SIZE (ints), ints);
42660 +
42661 +       if (ints[0] > 0) {
42662 +               timeout = ints[1];
42663 +       }
42664 +
42665 +       return 1;
42666 +}
42667 +#endif
42668 +
42669 +static int __init
42670 +tiglusb_init (void)
42671 +{
42672 +       unsigned u;
42673 +       int result;
42674 +
42675 +       /* initialize struct */
42676 +       for (u = 0; u < MAXTIGL; u++) {
42677 +               ptiglusb_t s = &tiglusb[u];
42678 +               memset (s, 0, sizeof (tiglusb_t));
42679 +               init_MUTEX (&s->mutex);
42680 +               s->dev = NULL;
42681 +               s->minor = u;
42682 +               s->opened = 0;
42683 +               init_waitqueue_head (&s->wait);
42684 +               init_waitqueue_head (&s->remove_ok);
42685 +       }
42686 +
42687 +       /* register device */
42688 +       if (devfs_register_chrdev (TIUSB_MAJOR, "tiglusb", &tiglusb_fops)) {
42689 +               err ("unable to get major %d", TIUSB_MAJOR);
42690 +               return -EIO;
42691 +       }
42692 +
42693 +       /* Use devfs, tree: /dev/ticables/usb/[0..3] */
42694 +       devfs_handle = devfs_mk_dir (NULL, "ticables/usb", NULL);
42695 +
42696 +       /* register USB module */
42697 +       result = usb_register (&tiglusb_driver);
42698 +       if (result < 0) {
42699 +               devfs_unregister_chrdev (TIUSB_MAJOR, "tiglusb");
42700 +               return -1;
42701 +       }
42702 +
42703 +       info (DRIVER_DESC ", " DRIVER_VERSION);
42704 +
42705 +       return 0;
42706 +}
42707 +
42708 +static void __exit
42709 +tiglusb_cleanup (void)
42710 +{
42711 +       usb_deregister (&tiglusb_driver);
42712 +       devfs_unregister (devfs_handle);
42713 +       devfs_unregister_chrdev (TIUSB_MAJOR, "tiglusb");
42714 +}
42715 +
42716 +/* --------------------------------------------------------------------- */
42717 +
42718 +__setup ("tiusb=", tiglusb_setup);
42719 +module_init (tiglusb_init);
42720 +module_exit (tiglusb_cleanup);
42721 +
42722 +MODULE_AUTHOR (DRIVER_AUTHOR);
42723 +MODULE_DESCRIPTION (DRIVER_DESC);
42724 +MODULE_LICENSE (DRIVER_LICENSE);
42725 +
42726 +MODULE_PARM (timeout, "i");
42727 +MODULE_PARM_DESC (timeout, "Timeout (default=1.5 seconds)");
42728 +
42729 +/* --------------------------------------------------------------------- */
42730 diff -Nur linux-2.4.19.old/drivers/usb/tiglusb.h linux-2.4.19/drivers/usb/tiglusb.h
42731 --- linux-2.4.19.old/drivers/usb/tiglusb.h      Thu Jan  1 01:00:00 1970
42732 +++ linux-2.4.19/drivers/usb/tiglusb.h  Mon Nov 25 12:27:12 2002
42733 @@ -0,0 +1,48 @@
42734 +/* Hey EMACS -*- linux-c -*-
42735 + *
42736 + * tiglusb - low level driver for SilverLink cable
42737 + *
42738 + * Copyright (C) 2000-2002, Romain Lievin <roms@lpg.ticalc.org>
42739 + * under the terms of the GNU General Public License.
42740 + *
42741 + * Redistribution of this file is permitted under the terms of the GNU
42742 + * Public License (GPL)
42743 + */
42744 +
42745 +#ifndef _TIGLUSB_H
42746 +#define _TIGLUSB_H
42747 +
42748 +/*
42749 + * Max. number of devices supported
42750 + */
42751 +#define MAXTIGL                16
42752 +
42753 +/*
42754 + * Max. packetsize for IN and OUT pipes
42755 + */
42756 +#define BULK_RCV_MAX   32
42757 +#define BULK_SND_MAX   32
42758 +
42759 +/*
42760 + * The driver context...
42761 + */
42762 +
42763 +typedef enum { _stopped=0, _started } driver_state_t;
42764 +
42765 +typedef struct
42766 +{
42767 +       struct usb_device       *dev;           /* USB device handle */
42768 +       struct semaphore        mutex;          /* locks this struct */
42769 +
42770 +       wait_queue_head_t       wait;           /* for timed waits */
42771 +       wait_queue_head_t       remove_ok;
42772 +
42773 +       int             minor;                  /* which minor dev #? */
42774 +       devfs_handle_t  devfs;                  /* devfs device */
42775 +
42776 +       driver_state_t  state;                  /* started/stopped */
42777 +       int             opened;                 /* tru if open */
42778 +       int     remove_pending;
42779 +} tiglusb_t, *ptiglusb_t;
42780 +
42781 +#endif
42782 diff -Nur linux-2.4.19.old/drivers/usb/uhci.c linux-2.4.19/drivers/usb/uhci.c
42783 --- linux-2.4.19.old/drivers/usb/uhci.c Sat Aug  3 02:39:45 2002
42784 +++ linux-2.4.19/drivers/usb/uhci.c     Mon Nov 25 12:27:12 2002
42785 @@ -57,6 +57,8 @@
42786  
42787  #include <linux/pm.h>
42788  
42789 +#include "hcd.h"
42790 +
42791  /*
42792   * Version Information
42793   */
42794 @@ -100,6 +102,11 @@
42795  #define IDLE_TIMEOUT   (HZ / 20)       /* 50 ms */
42796  #define FSBR_DELAY     (HZ / 20)       /* 50 ms */
42797  
42798 +/* When we timeout an idle transfer for FSBR, we'll switch it over to */
42799 +/* depth first traversal. We'll do it in groups of this number of TD's */
42800 +/* to make sure it doesn't hog all of the bandwidth */
42801 +#define DEPTH_INTERVAL 5
42802 +
42803  #define MAX_URB_LOOP   2048            /* Maximum number of linked URB's */
42804  
42805  /*
42806 @@ -115,12 +122,20 @@
42807         return 0;
42808  }
42809  
42810 +/*
42811 + * Technically, updating td->status here is a race, but it's not really a
42812 + * problem. The worst that can happen is that we set the IOC bit again
42813 + * generating a spurios interrupt. We could fix this by creating another
42814 + * QH and leaving the IOC bit always set, but then we would have to play
42815 + * games with the FSBR code to make sure we get the correct order in all
42816 + * the cases. I don't think it's worth the effort
42817 + */
42818  static inline void uhci_set_next_interrupt(struct uhci *uhci)
42819  {
42820         unsigned long flags;
42821  
42822         spin_lock_irqsave(&uhci->frame_list_lock, flags);
42823 -       set_bit(TD_CTRL_IOC_BIT, &uhci->skel_term_td->status);
42824 +       uhci->skel_term_td->status |= TD_CTRL_IOC;
42825         spin_unlock_irqrestore(&uhci->frame_list_lock, flags);
42826  }
42827  
42828 @@ -129,7 +144,7 @@
42829         unsigned long flags;
42830  
42831         spin_lock_irqsave(&uhci->frame_list_lock, flags);
42832 -       clear_bit(TD_CTRL_IOC_BIT, &uhci->skel_term_td->status);
42833 +       uhci->skel_term_td->status &= ~TD_CTRL_IOC;
42834         spin_unlock_irqrestore(&uhci->frame_list_lock, flags);
42835  }
42836  
42837 @@ -474,9 +489,9 @@
42838                 tmp = tmp->next;
42839  
42840                 if (toggle)
42841 -                       set_bit(TD_TOKEN_TOGGLE, &td->info);
42842 +                       td->info |= TD_TOKEN_TOGGLE;
42843                 else
42844 -                       clear_bit(TD_TOKEN_TOGGLE, &td->info);
42845 +                       td->info &= ~TD_TOKEN_TOGGLE;
42846  
42847                 toggle ^= 1;
42848         }
42849 @@ -649,7 +664,7 @@
42850  
42851                 if (usb_pipetype(urb->pipe) == PIPE_CONTROL && urb->setup_packet) {
42852                         urbp->setup_packet_dma_handle = pci_map_single(uhci->dev,
42853 -                               urb->setup_packet, sizeof(devrequest),
42854 +                               urb->setup_packet, sizeof(struct usb_ctrlrequest),
42855                                 PCI_DMA_TODEVICE);
42856                         if (!urbp->setup_packet_dma_handle)
42857                                 return NULL;
42858 @@ -724,7 +739,7 @@
42859  
42860         if (urbp->setup_packet_dma_handle) {
42861                 pci_unmap_single(uhci->dev, urbp->setup_packet_dma_handle,
42862 -                       sizeof(devrequest), PCI_DMA_TODEVICE);
42863 +                       sizeof(struct usb_ctrlrequest), PCI_DMA_TODEVICE);
42864                 urbp->setup_packet_dma_handle = 0;
42865         }
42866  
42867 @@ -857,7 +872,7 @@
42868                         return -ENOMEM;
42869  
42870                 /* Alternate Data0/1 (start with Data1) */
42871 -               destination ^= 1 << TD_TOKEN_TOGGLE;
42872 +               destination ^= TD_TOKEN_TOGGLE;
42873         
42874                 uhci_add_td_to_urb(urb, td);
42875                 uhci_fill_td(td, status, destination | ((pktsze - 1) << 21),
42876 @@ -884,7 +899,7 @@
42877         else
42878                 destination |= USB_PID_OUT;
42879  
42880 -       destination |= 1 << TD_TOKEN_TOGGLE;            /* End in Data1 */
42881 +       destination |= TD_TOKEN_TOGGLE;         /* End in Data1 */
42882  
42883         status &= ~TD_CTRL_SPD;
42884  
42885 @@ -953,14 +968,6 @@
42886  
42887                 tmp = tmp->next;
42888  
42889 -               if (urbp->fsbr_timeout && (td->status & TD_CTRL_IOC) &&
42890 -                   !(td->status & TD_CTRL_ACTIVE)) {
42891 -                       uhci_inc_fsbr(urb->dev->bus->hcpriv, urb);
42892 -                       urbp->fsbr_timeout = 0;
42893 -                       urbp->fsbrtime = jiffies;
42894 -                       clear_bit(TD_CTRL_IOC_BIT, &td->status);
42895 -               }
42896 -
42897                 status = uhci_status_bits(td->status);
42898                 if (status & TD_CTRL_ACTIVE)
42899                         return -EINPROGRESS;
42900 @@ -1097,7 +1104,7 @@
42901         if (!td)
42902                 return -ENOMEM;
42903  
42904 -       destination |= (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE);
42905 +       destination |= (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE_SHIFT);
42906         destination |= ((urb->transfer_buffer_length - 1) << 21);
42907  
42908         usb_dotoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe));
42909 @@ -1127,14 +1134,6 @@
42910  
42911                 tmp = tmp->next;
42912  
42913 -               if (urbp->fsbr_timeout && (td->status & TD_CTRL_IOC) &&
42914 -                   !(td->status & TD_CTRL_ACTIVE)) {
42915 -                       uhci_inc_fsbr(urb->dev->bus->hcpriv, urb);
42916 -                       urbp->fsbr_timeout = 0;
42917 -                       urbp->fsbrtime = jiffies;
42918 -                       clear_bit(TD_CTRL_IOC_BIT, &td->status);
42919 -               }
42920 -
42921                 status = uhci_status_bits(td->status);
42922                 if (status & TD_CTRL_ACTIVE)
42923                         return -EINPROGRESS;
42924 @@ -1198,8 +1197,8 @@
42925         td = list_entry(urbp->td_list.next, struct uhci_td, list);
42926  
42927         td->status = (td->status & 0x2F000000) | TD_CTRL_ACTIVE | TD_CTRL_IOC;
42928 -       td->info &= ~(1 << TD_TOKEN_TOGGLE);
42929 -       td->info |= (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE);
42930 +       td->info &= ~TD_TOKEN_TOGGLE;
42931 +       td->info |= (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE_SHIFT);
42932         usb_dotoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe));
42933  
42934  out:
42935 @@ -1255,7 +1254,7 @@
42936                 uhci_fill_td(td, status, destination |
42937                         (((pktsze - 1) & UHCI_NULL_DATA_SIZE) << 21) |
42938                         (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe),
42939 -                        usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE),
42940 +                        usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE_SHIFT),
42941                         data);
42942  
42943                 data += pktsze;
42944 @@ -1283,7 +1282,7 @@
42945                 uhci_fill_td(td, status, destination |
42946                         (UHCI_NULL_DATA_SIZE << 21) |
42947                         (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe),
42948 -                        usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE),
42949 +                        usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE_SHIFT),
42950                         data);
42951  
42952                 usb_dotoggle(urb->dev, usb_pipeendpoint(urb->pipe),
42953 @@ -1830,11 +1829,18 @@
42954  {
42955         struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
42956         struct list_head *head, *tmp;
42957 +       int count = 0;
42958  
42959         uhci_dec_fsbr(uhci, urb);
42960  
42961         urbp->fsbr_timeout = 1;
42962  
42963 +       /*
42964 +        * Ideally we would want to fix qh->element as well, but it's
42965 +        * read/write by the HC, so that can introduce a race. It's not
42966 +        * really worth the hassle
42967 +        */
42968 +
42969         head = &urbp->td_list;
42970         tmp = head->next;
42971         while (tmp != head) {
42972 @@ -1842,10 +1848,15 @@
42973  
42974                 tmp = tmp->next;
42975  
42976 -               if (td->status & TD_CTRL_ACTIVE) {
42977 -                       set_bit(TD_CTRL_IOC_BIT, &td->status);
42978 -                       break;
42979 -               }
42980 +               /*
42981 +                * Make sure we don't do the last one (since it'll have the
42982 +                * TERM bit set) as well as we skip every so many TD's to
42983 +                * make sure it doesn't hog the bandwidth
42984 +                */
42985 +               if (tmp != head && (count % DEPTH_INTERVAL) == (DEPTH_INTERVAL - 1))
42986 +                       td->link |= UHCI_PTR_DEPTH;
42987 +
42988 +               count++;
42989         }
42990  
42991         return 0;
42992 @@ -2073,7 +2084,7 @@
42993  {
42994         struct uhci *uhci = (struct uhci *)urb->dev->bus->hcpriv;
42995         unsigned int pipe = urb->pipe;
42996 -       devrequest *cmd = (devrequest *)urb->setup_packet;
42997 +       struct usb_ctrlrequest *cmd = (struct usb_ctrlrequest *)urb->setup_packet;
42998         void *data = urb->transfer_buffer;
42999         int leni = urb->transfer_buffer_length;
43000         int len = 0;
43001 @@ -2096,10 +2107,10 @@
43002                 return -EINPROGRESS;
43003         }
43004  
43005 -       bmRType_bReq = cmd->requesttype | cmd->request << 8;
43006 -       wValue = le16_to_cpu(cmd->value);
43007 -       wIndex = le16_to_cpu(cmd->index);
43008 -       wLength = le16_to_cpu(cmd->length);
43009 +       bmRType_bReq = cmd->bRequestType | cmd->bRequest << 8;
43010 +       wValue = le16_to_cpu(cmd->wValue);
43011 +       wIndex = le16_to_cpu(cmd->wIndex);
43012 +       wLength = le16_to_cpu(cmd->wLength);
43013  
43014         for (i = 0; i < 8; i++)
43015                 uhci->rh.c_p_r[i] = 0;
43016 @@ -2340,7 +2351,7 @@
43017  
43018         if (urbp->setup_packet_dma_handle)
43019                 pci_dma_sync_single(uhci->dev, urbp->setup_packet_dma_handle,
43020 -                       sizeof(devrequest), PCI_DMA_TODEVICE);
43021 +                       sizeof(struct usb_ctrlrequest), PCI_DMA_TODEVICE);
43022  
43023         status = urbp->status;
43024         if (!resubmit_interrupt || killed)
43025 @@ -2788,6 +2799,7 @@
43026         }
43027  
43028         uhci->bus = bus;
43029 +       bus->bus_name = dev->slot_name;
43030         bus->hcpriv = uhci;
43031  
43032         usb_register_bus(uhci->bus);
43033 diff -Nur linux-2.4.19.old/drivers/usb/uhci.h linux-2.4.19/drivers/usb/uhci.h
43034 --- linux-2.4.19.old/drivers/usb/uhci.h Sat Aug  3 02:39:45 2002
43035 +++ linux-2.4.19/drivers/usb/uhci.h     Mon Nov 25 12:27:12 2002
43036 @@ -100,7 +100,6 @@
43037  #define TD_CTRL_C_ERR_SHIFT    27
43038  #define TD_CTRL_LS             (1 << 26)       /* Low Speed Device */
43039  #define TD_CTRL_IOS            (1 << 25)       /* Isochronous Select */
43040 -#define TD_CTRL_IOC_BIT                24
43041  #define TD_CTRL_IOC            (1 << 24)       /* Interrupt on Complete */
43042  #define TD_CTRL_ACTIVE         (1 << 23)       /* TD Active */
43043  #define TD_CTRL_STALLED                (1 << 22)       /* TD Stalled */
43044 @@ -120,13 +119,14 @@
43045  /*
43046   * for TD <info>: (a.k.a. Token)
43047   */
43048 -#define TD_TOKEN_TOGGLE                19
43049 +#define TD_TOKEN_TOGGLE_SHIFT  19
43050 +#define TD_TOKEN_TOGGLE                (1 << 19)
43051  #define TD_TOKEN_PID_MASK      0xFF
43052  #define TD_TOKEN_EXPLEN_MASK   0x7FF           /* expected length, encoded as n - 1 */
43053  
43054  #define uhci_maxlen(token)     ((token) >> 21)
43055  #define uhci_expected_length(info) (((info >> 21) + 1) & TD_TOKEN_EXPLEN_MASK) /* 1-based */
43056 -#define uhci_toggle(token)     (((token) >> TD_TOKEN_TOGGLE) & 1)
43057 +#define uhci_toggle(token)     (((token) >> TD_TOKEN_TOGGLE_SHIFT) & 1)
43058  #define uhci_endpoint(token)   (((token) >> 15) & 0xf)
43059  #define uhci_devaddr(token)    (((token) >> 8) & 0x7f)
43060  #define uhci_devep(token)      (((token) >> 8) & 0x7ff)
43061 diff -Nur linux-2.4.19.old/drivers/usb/usb-debug.c linux-2.4.19/drivers/usb/usb-debug.c
43062 --- linux-2.4.19.old/drivers/usb/usb-debug.c    Fri Feb  9 20:30:23 2001
43063 +++ linux-2.4.19/drivers/usb/usb-debug.c        Mon Nov 25 12:27:12 2002
43064 @@ -181,23 +181,23 @@
43065         kfree(buf);
43066  }
43067  
43068 -void usb_dump_urb (purb_t purb)
43069 +void usb_dump_urb (struct urb *urb)
43070  {
43071 -       printk ("urb                   :%p\n", purb);
43072 -       printk ("next                  :%p\n", purb->next);
43073 -       printk ("dev                   :%p\n", purb->dev);
43074 -       printk ("pipe                  :%08X\n", purb->pipe);
43075 -       printk ("status                :%d\n", purb->status);
43076 -       printk ("transfer_flags        :%08X\n", purb->transfer_flags);
43077 -       printk ("transfer_buffer       :%p\n", purb->transfer_buffer);
43078 -       printk ("transfer_buffer_length:%d\n", purb->transfer_buffer_length);
43079 -       printk ("actual_length         :%d\n", purb->actual_length);
43080 -       printk ("setup_packet          :%p\n", purb->setup_packet);
43081 -       printk ("start_frame           :%d\n", purb->start_frame);
43082 -       printk ("number_of_packets     :%d\n", purb->number_of_packets);
43083 -       printk ("interval              :%d\n", purb->interval);
43084 -       printk ("error_count           :%d\n", purb->error_count);
43085 -       printk ("context               :%p\n", purb->context);
43086 -       printk ("complete              :%p\n", purb->complete);
43087 +       printk ("urb                   :%p\n", urb);
43088 +       printk ("next                  :%p\n", urb->next);
43089 +       printk ("dev                   :%p\n", urb->dev);
43090 +       printk ("pipe                  :%08X\n", urb->pipe);
43091 +       printk ("status                :%d\n", urb->status);
43092 +       printk ("transfer_flags        :%08X\n", urb->transfer_flags);
43093 +       printk ("transfer_buffer       :%p\n", urb->transfer_buffer);
43094 +       printk ("transfer_buffer_length:%d\n", urb->transfer_buffer_length);
43095 +       printk ("actual_length         :%d\n", urb->actual_length);
43096 +       printk ("setup_packet          :%p\n", urb->setup_packet);
43097 +       printk ("start_frame           :%d\n", urb->start_frame);
43098 +       printk ("number_of_packets     :%d\n", urb->number_of_packets);
43099 +       printk ("interval              :%d\n", urb->interval);
43100 +       printk ("error_count           :%d\n", urb->error_count);
43101 +       printk ("context               :%p\n", urb->context);
43102 +       printk ("complete              :%p\n", urb->complete);
43103  }
43104  
43105 diff -Nur linux-2.4.19.old/drivers/usb/usb-midi.c linux-2.4.19/drivers/usb/usb-midi.c
43106 --- linux-2.4.19.old/drivers/usb/usb-midi.c     Thu Jan  1 01:00:00 1970
43107 +++ linux-2.4.19/drivers/usb/usb-midi.c Mon Nov 25 12:27:12 2002
43108 @@ -0,0 +1,2228 @@
43109 +/*
43110 +  usb-midi.c  --  USB-MIDI driver
43111 +
43112 +  Copyright (C) 2001 
43113 +      NAGANO Daisuke <breeze.nagano@nifty.ne.jp>
43114 +
43115 +  This program is free software; you can redistribute it and/or modify
43116 +  it under the terms of the GNU General Public License as published by
43117 +  the Free Software Foundation; either version 2, or (at your option)
43118 +  any later version.
43119 +
43120 +  This program is distributed in the hope that it will be useful,
43121 +  but WITHOUT ANY WARRANTY; without even the implied warranty of
43122 +  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
43123 +  GNU General Public License for more details.
43124 +
43125 +  You should have received a copy of the GNU General Public License
43126 +  along with this program; if not, write to the Free Software
43127 +  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
43128 +
43129 +  This driver is based on:
43130 +    - 'Universal Serial Bus Device Class Definition for MIDI Device'
43131 +    - linux/drivers/sound/es1371.c, linux/drivers/usb/audio.c
43132 +    - alsa/lowlevel/pci/cs64xx.c
43133 +    - umidi.c for NetBSD
43134 + */
43135 +
43136 +/* ------------------------------------------------------------------------- */
43137 +
43138 +
43139 +#include <linux/module.h>
43140 +#include <linux/kernel.h>
43141 +#include <linux/sched.h>
43142 +#include <linux/list.h>
43143 +#include <linux/slab.h>
43144 +#include <linux/wrapper.h>
43145 +#include <linux/usb.h>
43146 +#include <linux/poll.h>
43147 +#include <linux/sound.h>
43148 +#include <linux/init.h>
43149 +#include <asm/semaphore.h>
43150 +
43151 +/** This declaration is missing from linux/usb.h **/
43152 +extern int usb_get_string(struct usb_device *dev, unsigned short langid, unsigned char index, void *buf, int size);
43153 +
43154 +#include "usb-midi.h"
43155 +
43156 +/* ------------------------------------------------------------------------- */
43157 +
43158 +/* More verbose on syslog */
43159 +#undef MIDI_DEBUG
43160 +
43161 +#define MIDI_IN_BUFSIZ 1024
43162 +
43163 +#define HAVE_SUPPORT_USB_MIDI_CLASS
43164 +
43165 +#undef HAVE_SUPPORT_ALSA
43166 +
43167 +#undef MOD_INC_EACH_PROBE
43168 +
43169 +/* ------------------------------------------------------------------------- */
43170 +
43171 +static int singlebyte = 0;
43172 +MODULE_PARM(singlebyte,"i");
43173 +MODULE_PARM_DESC(singlebyte,"Enable sending MIDI messages with single message packet");
43174 +
43175 +static int maxdevices = 4;
43176 +MODULE_PARM(maxdevices,"i");
43177 +MODULE_PARM_DESC(maxdevices,"Max number of allocatable MIDI device");
43178 +
43179 +static int uvendor     = -1;
43180 +MODULE_PARM(uvendor,"i");
43181 +MODULE_PARM_DESC(uvendor, "The USB Vendor ID of a semi-compliant interface");
43182 +
43183 +static int uproduct    = -1;
43184 +MODULE_PARM(uproduct,"i");
43185 +MODULE_PARM_DESC(uproduct, "The USB Product ID of a semi-compliant interface");
43186 +
43187 +static int uinterface  = -1;
43188 +MODULE_PARM(uinterface,"i");
43189 +MODULE_PARM_DESC(uinterface, "The Interface number of a semi-compliant interface");
43190 +
43191 +static int ualt        = -1;
43192 +MODULE_PARM(ualt,"i");
43193 +MODULE_PARM_DESC(ualt, "The optional alternative setting of a semi-compliant interface");
43194 +
43195 +static int umin        = -1;
43196 +MODULE_PARM(umin,"i");
43197 +MODULE_PARM_DESC(umin, "The input endpoint of a semi-compliant interface");
43198 +
43199 +static int umout       = -1;
43200 +MODULE_PARM(umout,"i");
43201 +MODULE_PARM_DESC(umout, "The output endpoint of a semi-compliant interface");
43202 +
43203 +static int ucable      = -1;
43204 +MODULE_PARM(ucable,"i");
43205 +MODULE_PARM_DESC(ucable, "The cable number used for a semi-compliant interface");
43206 +
43207 +/** Note -- the usb_string() returns only Latin-1 characters.
43208 + * (unicode chars <= 255). To support Japanese, a unicode16LE-to-EUC or
43209 + * unicode16LE-to-JIS routine is needed to wrap around usb_get_string().
43210 + **/
43211 +static unsigned short ulangid      = 0x0409; /** 0x0411 for Japanese **/
43212 +MODULE_PARM(ulangid,"h");
43213 +MODULE_PARM_DESC(ulangid, "The optional preferred USB Language ID for all devices");
43214 +
43215 +MODULE_AUTHOR("NAGANO Daisuke <breeze.nagano@nifty.ne.jp>");
43216 +MODULE_DESCRIPTION("USB-MIDI driver");
43217 +#if LINUX_VERSION_CODE  >= KERNEL_VERSION(2,4,14)
43218 +MODULE_LICENSE("GPL");
43219 +#endif
43220 +
43221 +/* ------------------------------------------------------------------------- */
43222 +
43223 +/** MIDIStreaming Class-Specific Interface Descriptor Subtypes **/
43224 +
43225 +#define MS_DESCRIPTOR_UNDEFINED        0
43226 +#define MS_HEADER              1
43227 +#define MIDI_IN_JACK           2
43228 +#define MIDI_OUT_JACK          3
43229 +/* Spec reads: ELEMENT */
43230 +#define ELEMENT_DESCRIPTOR     4
43231 +
43232 +#define MS_HEADER_LENGTH       7
43233 +
43234 +/** MIDIStreaming Class-Specific Endpoint Descriptor Subtypes **/
43235 +
43236 +#define DESCRIPTOR_UNDEFINED   0
43237 +/* Spec reads: MS_GENERAL */
43238 +#define MS_GENERAL_ENDPOINT    1
43239 +
43240 +/** MIDIStreaming MIDI IN and OUT Jack Types **/
43241 +
43242 +#define JACK_TYPE_UNDEFINED    0
43243 +/* Spec reads: EMBEDDED */
43244 +#define EMBEDDED_JACK          1
43245 +/* Spec reads: EXTERNAL */
43246 +#define EXTERNAL_JACK          2
43247 +
43248 +
43249 +/* structure summary
43250 +  
43251 +      usb_midi_state     usb_device
43252 +       |         |
43253 +      *|        *|       per ep
43254 +     in_ep     out_ep
43255 +       |         |
43256 +      *|        *|       per cable
43257 +      min       mout
43258 +       |         |       (cable to device pairing magic)
43259 +       |         |
43260 +       usb_midi_dev      dev_id (major,minor) == file->private_data
43261 +
43262 +*/
43263 +
43264 +/* usb_midi_state: corresponds to a USB-MIDI module */
43265 +struct usb_midi_state {
43266 +       struct list_head   mididev;
43267 +       
43268 +       struct usb_device *usbdev;
43269 +       
43270 +       struct list_head   midiDevList;
43271 +       struct list_head   inEndpointList;
43272 +       struct list_head   outEndpointList;
43273 +       
43274 +       spinlock_t         lock;
43275 +       
43276 +       unsigned int       count; /* usage counter */
43277 +};
43278 +
43279 +/* midi_out_endpoint: corresponds to an output endpoint */
43280 +struct midi_out_endpoint {
43281 +       struct list_head  list;
43282 +       
43283 +       struct usb_device *usbdev;
43284 +       int                endpoint;
43285 +       spinlock_t         lock;
43286 +       wait_queue_head_t  wait;
43287 +       
43288 +       unsigned char     *buf;
43289 +       int                bufWrPtr;
43290 +       int                bufSize;
43291 +       
43292 +       struct urb       *urb;
43293 +};
43294 +
43295 +/* midi_in_endpoint: corresponds to an input endpoint */
43296 +struct midi_in_endpoint {
43297 +       struct list_head   list;
43298 +
43299 +       struct usb_device *usbdev;
43300 +       int                endpoint;
43301 +       spinlock_t         lock;
43302 +       wait_queue_head_t  wait;
43303 +
43304 +       struct usb_mididev *cables[16]; // cables open for read
43305 +       int                 readers;    // number of cables open for read
43306 +
43307 +       struct urb        *urb;
43308 +       unsigned char     *recvBuf;
43309 +       int                recvBufSize;
43310 +       int                urbSubmitted;        //FIXME: == readers > 0
43311 +};
43312 +
43313 +/* usb_mididev: corresponds to a logical device */
43314 +struct usb_mididev {
43315 +       struct list_head       list;
43316 +
43317 +       struct usb_midi_state *midi;
43318 +       int                    dev_midi;
43319 +       mode_t                 open_mode;
43320 +
43321 +       struct {
43322 +               struct midi_in_endpoint *ep;
43323 +               int              cableId;
43324 +               
43325 +// as we are pushing data from usb_bulk_read to usb_midi_read,
43326 +// we need a larger, cyclic buffer here.
43327 +               unsigned char    buf[MIDI_IN_BUFSIZ];
43328 +               int              bufRdPtr;
43329 +               int              bufWrPtr;
43330 +               int              bufRemains;
43331 +       } min;
43332 +
43333 +       struct {
43334 +               struct midi_out_endpoint *ep;
43335 +               int              cableId;
43336 +               
43337 +               unsigned char    buf[3];
43338 +               int              bufPtr;
43339 +               int              bufRemains;
43340 +               
43341 +               int              isInExclusive;
43342 +               unsigned char    lastEvent;
43343 +       } mout;
43344 +
43345 +       int singlebyte;
43346 +};
43347 +
43348 +/** Map the high nybble of MIDI voice messages to number of Message bytes.
43349 + * High nyble ranges from 0x8 to 0xe
43350 + */
43351 +
43352 +static int remains_80e0[] = {
43353 +       3,      /** 0x8X Note Off **/
43354 +       3,      /** 0x9X Note On **/
43355 +       3,      /** 0xAX Poly-key pressure **/
43356 +       3,      /** 0xBX Control Change **/
43357 +       2,      /** 0xCX Program Change **/
43358 +       2,      /** 0xDX Channel pressure **/
43359 +       3       /** 0xEX PitchBend Change **/
43360 +};
43361 +
43362 +/** Map the messages to a number of Message bytes.
43363 + *
43364 + **/
43365 +static int remains_f0f6[] = {
43366 +       0,      /** 0xF0 **/
43367 +       2,      /** 0XF1 **/
43368 +       3,      /** 0XF2 **/
43369 +       2,      /** 0XF3 **/
43370 +       2,      /** 0XF4 (Undefined by MIDI Spec, and subject to change) **/
43371 +       2,      /** 0XF5 (Undefined by MIDI Spec, and subject to change) **/
43372 +       1       /** 0XF6 **/
43373 +};
43374 +
43375 +/** Map the messages to a CIN (Code Index Number).
43376 + *
43377 + **/
43378 +static int cin_f0ff[] = {
43379 +       4,      /** 0xF0 System Exclusive Message Start (special cases may be 6 or 7) */
43380 +       2,      /** 0xF1 **/
43381 +       3,      /** 0xF2 **/
43382 +       2,      /** 0xF3 **/
43383 +       2,      /** 0xF4 **/
43384 +       2,      /** 0xF5 **/
43385 +       5,      /** 0xF6 **/
43386 +       5,      /** 0xF7 End of System Exclusive Message (May be 6 or 7) **/
43387 +       5,      /** 0xF8 **/
43388 +       5,      /** 0xF9 **/
43389 +       5,      /** 0xFA **/
43390 +       5,      /** 0xFB **/
43391 +       5,      /** 0xFC **/
43392 +       5,      /** 0xFD **/
43393 +       5,      /** 0xFE **/
43394 +       5       /** 0xFF **/
43395 +};
43396 +
43397 +/** Map MIDIStreaming Event packet Code Index Number (low nybble of byte 0)
43398 + * to the number of bytes of valid MIDI data.
43399 + *
43400 + * CIN of 0 and 1 are NOT USED in MIDIStreaming 1.0.
43401 + *
43402 + **/
43403 +static int cin_to_len[] = {
43404 +       0, 0, 2, 3,
43405 +       3, 1, 2, 3,
43406 +       3, 3, 3, 3,
43407 +       2, 2, 3, 1
43408 +};
43409 +
43410 +
43411 +/* ------------------------------------------------------------------------- */
43412 +
43413 +static struct list_head mididevs = LIST_HEAD_INIT(mididevs);
43414 +
43415 +static DECLARE_MUTEX(open_sem);
43416 +static DECLARE_WAIT_QUEUE_HEAD(open_wait);
43417 +
43418 +
43419 +/* ------------------------------------------------------------------------- */
43420 +
43421 +static void usb_write_callback(struct urb *urb)
43422 +{
43423 +       struct midi_out_endpoint *ep = (struct midi_out_endpoint *)urb->context;
43424 +
43425 +       if ( waitqueue_active( &ep->wait ) )
43426 +               wake_up_interruptible( &ep->wait );
43427 +}
43428 +
43429 +
43430 +static int usb_write( struct midi_out_endpoint *ep, unsigned char *buf, int len )
43431 +{
43432 +       struct usb_device *d;
43433 +       int pipe;
43434 +       int ret = 0;
43435 +       int status;
43436 +       int maxretry = 50;
43437 +       
43438 +       DECLARE_WAITQUEUE(wait,current);
43439 +       init_waitqueue_head(&ep->wait);
43440 +
43441 +       d = ep->usbdev;
43442 +       pipe = usb_sndbulkpipe(d, ep->endpoint);
43443 +       FILL_BULK_URB( ep->urb, d, pipe, (unsigned char*)buf, len,
43444 +                      (usb_complete_t)usb_write_callback, ep );
43445 +
43446 +       status = usb_submit_urb(ep->urb);
43447 +    
43448 +       if (status) {
43449 +               printk(KERN_ERR "usbmidi: Cannot submit urb (%d)\n",status);
43450 +               ret = -EFAULT;
43451 +       }
43452 +
43453 +       add_wait_queue( &ep->wait, &wait );
43454 +       set_current_state( TASK_INTERRUPTIBLE );
43455 +
43456 +       while( ep->urb->status == -EINPROGRESS ) {
43457 +               if ( maxretry-- < 0 ) {
43458 +                       printk(KERN_ERR "usbmidi: usb_bulk_msg timed out\n");
43459 +                       ret = -ETIME;
43460 +                       break;
43461 +               }
43462 +               interruptible_sleep_on_timeout( &ep->wait, 10 );
43463 +       }
43464 +       set_current_state( TASK_RUNNING );
43465 +       remove_wait_queue( &ep->wait, &wait );
43466 +
43467 +       return ret;
43468 +}
43469 +
43470 +
43471 +/** Copy data from URB to In endpoint buf.
43472 + * Discard if CIN == 0 or CIN = 1.
43473 + *
43474 + *
43475 + **/
43476 +
43477 +static void usb_bulk_read(struct urb *urb)
43478 +{
43479 +       struct midi_in_endpoint *ep = (struct midi_in_endpoint *)(urb->context);
43480 +       unsigned char *data = urb->transfer_buffer;
43481 +       int i, l, wake;
43482 +       unsigned long int flags;
43483 +
43484 +       if ( !ep->urbSubmitted ) {
43485 +               return;
43486 +       }
43487 +
43488 +       if ( (urb->status == 0) && (urb->actual_length > 0) ) {
43489 +               wake = 0;
43490 +               spin_lock_irqsave( &ep->lock, flags );
43491 +
43492 +               for(l = 0; l < urb->actual_length; l += 4) {
43493 +                       int cin = (data[l]>>0)&0xf;
43494 +                       int cab = (data[l]>>4)&0xf;
43495 +                       struct usb_mididev *cable = ep->cables[cab];
43496 +                       if ( cable ) {
43497 +                               int len = cin_to_len[cin]; /** length of MIDI data **/
43498 +                               for (i = 0; i < len; i++) {
43499 +                                       cable->min.buf[cable->min.bufWrPtr] = data[1+i];
43500 +                                       cable->min.bufWrPtr = (cable->min.bufWrPtr+1)%MIDI_IN_BUFSIZ;
43501 +                                       if (cable->min.bufRemains < MIDI_IN_BUFSIZ)
43502 +                                               cable->min.bufRemains += 1;
43503 +                                       else /** need to drop data **/
43504 +                                               cable->min.bufRdPtr += (cable->min.bufRdPtr+1)%MIDI_IN_BUFSIZ;
43505 +                                       wake = 1;
43506 +                               }
43507 +                       }
43508 +               }
43509 +
43510 +               spin_unlock_irqrestore( &ep->lock, flags );
43511 +               if ( wake ) {
43512 +                       wake_up( &ep->wait );
43513 +               }
43514 +       }
43515 +
43516 +       /* urb->dev must be reinitialized on 2.4.x kernels */
43517 +       urb->dev = ep->usbdev;
43518 +
43519 +       urb->actual_length = 0;
43520 +       usb_submit_urb(urb);
43521 +}
43522 +
43523 +
43524 +
43525 +/* ------------------------------------------------------------------------- */
43526 +
43527 +/* This routine must be called with spin_lock */
43528 +
43529 +/** Wrapper around usb_write().
43530 + *  This routine must be called with spin_lock held on ep.
43531 + *  Called by midiWrite(), putOneMidiEvent(), and  usb_midi_write();
43532 + **/
43533 +static int flush_midi_buffer( struct midi_out_endpoint *ep )
43534 +{
43535 +       int ret=0;
43536 +
43537 +       if ( ep->bufWrPtr > 0 ) {
43538 +               ret = usb_write( ep, ep->buf, ep->bufWrPtr );
43539 +               ep->bufWrPtr = 0;
43540 +       }
43541 +
43542 +       return ret;
43543 +}
43544 +
43545 +
43546 +/* ------------------------------------------------------------------------- */
43547 +
43548 +
43549 +/** Given a MIDI Event, determine size of data to be attached to 
43550 + * USB-MIDI packet.
43551 + * Returns 1, 2 or 3.
43552 + * Called by midiWrite();
43553 + * Uses remains_80e0 and remains_f0f6;
43554 + **/
43555 +static int get_remains(int event)
43556 +{
43557 +       int ret;
43558 +
43559 +       if ( event  < 0x80 ) {
43560 +               ret = 1;
43561 +       } else if ( event < 0xf0 ) {
43562 +               ret = remains_80e0[((event-0x80)>>4)&0x0f];
43563 +       } else if ( event < 0xf7 ) {
43564 +               ret = remains_f0f6[event-0xf0];
43565 +       } else {
43566 +               ret = 1;
43567 +       }
43568 +
43569 +       return ret;
43570 +}
43571 +
43572 +/** Given the output MIDI data in the output buffer, computes a reasonable 
43573 + * CIN.
43574 + * Called by putOneMidiEvent().
43575 + **/
43576 +static int get_CIN( struct usb_mididev *m )
43577 +{
43578 +       int cin;
43579 +
43580 +       if ( m->mout.buf[0] == 0xf7 ) {
43581 +               cin = 5;
43582 +       }
43583 +       else if ( m->mout.buf[1] == 0xf7 ) {
43584 +               cin = 6;
43585 +       }
43586 +       else if ( m->mout.buf[2] == 0xf7 ) {
43587 +               cin = 7;
43588 +       }
43589 +       else {
43590 +               if ( m->mout.isInExclusive == 1 ) {
43591 +                       cin = 4;
43592 +               } else if ( m->mout.buf[0] < 0x80 ) {
43593 +                       /** One byte that we know nothing about. **/
43594 +                       cin = 0xF; 
43595 +               } else if ( m->mout.buf[0] < 0xf0 ) {
43596 +                       /** MIDI Voice messages 0x8X to 0xEX map to cin 0x8 to 0xE. **/
43597 +                       cin = (m->mout.buf[0]>>4)&0x0f; 
43598 +               }
43599 +               else {
43600 +                       /** Special lookup table exists for real-time events. **/
43601 +                       cin = cin_f0ff[m->mout.buf[0]-0xf0];
43602 +               }
43603 +       }
43604 +
43605 +       return cin;
43606 +}
43607 +
43608 +
43609 +/* ------------------------------------------------------------------------- */
43610 +
43611 +
43612 +
43613 +/** Move data to USB endpoint buffer.
43614 + *
43615 + **/
43616 +static int put_one_midi_event(struct usb_mididev *m)
43617 +{
43618 +       int cin;
43619 +       unsigned long flags;
43620 +       struct midi_out_endpoint *ep = m->mout.ep;
43621 +       int ret=0;
43622 +
43623 +       cin = get_CIN( m );
43624 +       if ( cin > 0x0f || cin < 0 ) {
43625 +               return -EINVAL;
43626 +       }
43627 +
43628 +       spin_lock_irqsave( &ep->lock, flags );
43629 +       ep->buf[ep->bufWrPtr++] = (m->mout.cableId<<4) | cin;
43630 +       ep->buf[ep->bufWrPtr++] = m->mout.buf[0];
43631 +       ep->buf[ep->bufWrPtr++] = m->mout.buf[1];
43632 +       ep->buf[ep->bufWrPtr++] = m->mout.buf[2];
43633 +       if ( ep->bufWrPtr >= ep->bufSize ) {
43634 +               ret = flush_midi_buffer( ep );
43635 +       }
43636 +       spin_unlock_irqrestore( &ep->lock, flags);
43637 +
43638 +       m->mout.buf[0] = m->mout.buf[1] = m->mout.buf[2] = 0;
43639 +       m->mout.bufPtr = 0;
43640 +
43641 +       return ret;
43642 +}
43643 +
43644 +/** Write the MIDI message v on the midi device.
43645 + *  Called by usb_midi_write();
43646 + *  Responsible for packaging a MIDI data stream into USB-MIDI packets.
43647 + **/
43648 +
43649 +static int midi_write( struct usb_mididev *m, int v )
43650 +{
43651 +       unsigned long flags;
43652 +       struct midi_out_endpoint *ep = m->mout.ep;
43653 +       int ret=0;
43654 +       unsigned char c = (unsigned char)v;
43655 +       unsigned char sysrt_buf[4];
43656 +
43657 +       if ( m->singlebyte != 0 ) {
43658 +               /** Simple code to handle the single-byte USB-MIDI protocol. */
43659 +               spin_lock_irqsave( &ep->lock, flags );
43660 +               if ( ep->bufWrPtr+4 > ep->bufSize ) {
43661 +                       ret = flush_midi_buffer( ep );
43662 +                       if ( !ret ) {
43663 +                               spin_unlock_irqrestore( &ep->lock, flags );
43664 +                               return ret;
43665 +                       }
43666 +               }
43667 +               ep->buf[ep->bufWrPtr++] = (m->mout.cableId<<4) |  0x0f; /* single byte */
43668 +               ep->buf[ep->bufWrPtr++] = c;
43669 +               ep->buf[ep->bufWrPtr++] = 0;
43670 +               ep->buf[ep->bufWrPtr++] = 0;
43671 +               if ( ep->bufWrPtr >= ep->bufSize ) {
43672 +                       ret = flush_midi_buffer( ep );
43673 +               }
43674 +               spin_unlock_irqrestore( &ep->lock, flags );
43675 +
43676 +               return ret;
43677 +       }
43678 +       /** Normal USB-MIDI protocol begins here. */
43679 +
43680 +       if ( c > 0xf7 ) {       /* system: Realtime messages */
43681 +               /** Realtime messages are written IMMEDIATELY. */
43682 +               sysrt_buf[0] = (m->mout.cableId<<4) | 0x0f;
43683 +               sysrt_buf[1] = c;
43684 +               sysrt_buf[2] = 0;
43685 +               sysrt_buf[3] = 0;
43686 +               spin_lock_irqsave( &ep->lock, flags );
43687 +               ret = usb_write( ep, sysrt_buf, 4 );
43688 +               spin_unlock_irqrestore( &ep->lock, flags );
43689 +               /* m->mout.lastEvent = 0; */
43690 +
43691 +               return ret;
43692 +       }
43693 +
43694 +       if ( c >= 0x80 ) {
43695 +               if ( c < 0xf0 ) {
43696 +                       m->mout.lastEvent = c;
43697 +                       m->mout.isInExclusive = 0;
43698 +                       m->mout.bufRemains = get_remains(c);
43699 +               } else if ( c == 0xf0 ) {
43700 +                       /* m->mout.lastEvent = 0; */
43701 +                       m->mout.isInExclusive = 1;
43702 +                       m->mout.bufRemains = get_remains(c);
43703 +               } else if ( c == 0xf7 && m->mout.isInExclusive == 1 ) {
43704 +                       /* m->mout.lastEvent = 0; */
43705 +                       m->mout.isInExclusive = 0;
43706 +                       m->mout.bufRemains = 1;
43707 +               } else if ( c > 0xf0 ) {
43708 +                       /* m->mout.lastEvent = 0; */
43709 +                       m->mout.isInExclusive = 0;
43710 +                       m->mout.bufRemains = get_remains(c);
43711 +               }
43712 +    
43713 +       } else if ( m->mout.bufRemains == 0 && m->mout.isInExclusive == 0 ) {
43714 +               if ( m->mout.lastEvent == 0 ) {
43715 +                       return 0; /* discard, waiting for the first event */
43716 +               }
43717 +               /** track status **/
43718 +               m->mout.buf[0] = m->mout.lastEvent;
43719 +               m->mout.bufPtr = 1;
43720 +               m->mout.bufRemains = get_remains(m->mout.lastEvent)-1;
43721 +       }
43722 +  
43723 +       m->mout.buf[m->mout.bufPtr++] = c;
43724 +       m->mout.bufRemains--;
43725 +       if ( m->mout.bufRemains == 0 || m->mout.bufPtr >= 3) {
43726 +               ret = put_one_midi_event(m);
43727 +       }
43728 +
43729 +       return ret;
43730 +}
43731 +
43732 +
43733 +/* ------------------------------------------------------------------------- */
43734 +
43735 +/** Basic operation on /dev/midiXX as registered through struct file_operations.
43736 + *
43737 + *  Basic contract: Used to change the current read/write position in a file.
43738 + *  On success, the non-negative position is reported.
43739 + *  On failure, the negative of an error code is reported.
43740 + *
43741 + *  Because a MIDIStream is not a file, all seek operations are doomed to fail.
43742 + *
43743 + **/
43744 +static loff_t usb_midi_llseek(struct file *file, loff_t offset, int origin)
43745 +{
43746 +       /** Tell user you cannot seek on a PIPE-like device. **/
43747 +       return -ESPIPE;
43748 +}
43749 +
43750 +
43751 +/** Basic operation on /dev/midiXX as registered through struct file_operations.
43752 + *
43753 + * Basic contract: Block until count bytes have been read or an error occurs.
43754 + *
43755 + **/
43756 +
43757 +static ssize_t usb_midi_read(struct file *file, char *buffer, size_t count, loff_t *ppos)
43758 +{
43759 +       struct usb_mididev *m = (struct usb_mididev *)file->private_data;
43760 +       struct midi_in_endpoint *ep = m->min.ep;
43761 +       ssize_t ret;
43762 +       DECLARE_WAITQUEUE(wait, current);
43763 +
43764 +       if ( ppos != &file->f_pos ) {
43765 +               return -ESPIPE;
43766 +       }
43767 +       if ( !access_ok(VERIFY_READ, buffer, count) ) {
43768 +               return -EFAULT;
43769 +       }
43770 +       if ( count == 0 ) {
43771 +               return 0;
43772 +       }
43773 +
43774 +       add_wait_queue( &ep->wait, &wait );
43775 +       ret = 0;
43776 +       while( count > 0 ) {
43777 +               int cnt;
43778 +               int d = (int)count;
43779 +
43780 +               cnt = m->min.bufRemains;
43781 +               if ( cnt > d ) {
43782 +                       cnt = d;
43783 +               }
43784 +
43785 +               if ( cnt <= 0 ) {
43786 +                       if ( file->f_flags & O_NONBLOCK ) {
43787 +                               if (!ret) 
43788 +                                       ret = -EAGAIN;
43789 +                               break;
43790 +                       }
43791 +                       __set_current_state(TASK_INTERRUPTIBLE);
43792 +                       schedule();
43793 +                       if (signal_pending(current)) {
43794 +                               if(!ret)
43795 +                                       ret=-ERESTARTSYS;
43796 +                               break;
43797 +                       }
43798 +                       continue;
43799 +               }
43800 +
43801 +               {
43802 +                       int i;
43803 +                       unsigned long flags; /* used to synchronize access to the endpoint */
43804 +                       spin_lock_irqsave( &ep->lock, flags );
43805 +                       for (i = 0; i < cnt; i++) {
43806 +                               if ( copy_to_user( buffer+i, m->min.buf+m->min.bufRdPtr, 1 ) ) {
43807 +                                       if ( !ret )
43808 +                                               ret = -EFAULT;
43809 +                                       break;
43810 +                               }
43811 +                               m->min.bufRdPtr = (m->min.bufRdPtr+1)%MIDI_IN_BUFSIZ;
43812 +                               m->min.bufRemains -= 1;
43813 +                       }
43814 +                       spin_unlock_irqrestore( &ep->lock, flags );
43815 +               }
43816 +
43817 +               count-=cnt;
43818 +               buffer+=cnt;
43819 +               ret+=cnt;
43820 +
43821 +               break;
43822 +       }
43823 +
43824 +       remove_wait_queue( &ep->wait, &wait );
43825 +       set_current_state(TASK_RUNNING);
43826 +
43827 +       return ret;
43828 +}
43829 +
43830 +
43831 +/** Basic operation on /dev/midiXX as registered through struct file_operations.
43832 + *
43833 + *  Basic Contract: Take MIDI data byte-by-byte and pass it to
43834 + *  writeMidi() which packages MIDI data into USB-MIDI stream.
43835 + *  Then flushMidiData() is called to ensure all bytes have been written
43836 + *  in a timely fashion.
43837 + *
43838 + **/
43839 +
43840 +static ssize_t usb_midi_write(struct file *file, const char *buffer, size_t count, loff_t *ppos)
43841 +{
43842 +       struct usb_mididev *m = (struct usb_mididev *)file->private_data;
43843 +       ssize_t ret;
43844 +       unsigned long int flags;
43845 +
43846 +       if ( ppos != &file->f_pos ) {
43847 +               return -ESPIPE;
43848 +       }
43849 +       if ( !access_ok(VERIFY_READ, buffer, count) ) {
43850 +               return -EFAULT;
43851 +       }
43852 +       if ( count == 0 ) {
43853 +               return 0;
43854 +       }
43855 +
43856 +       ret = 0;
43857 +       while( count > 0 ) {
43858 +               unsigned char c;
43859 +
43860 +               if (copy_from_user((unsigned char *)&c, buffer, 1)) {
43861 +                       if ( ret == 0 )
43862 +                               ret = -EFAULT;
43863 +                       break;
43864 +               }
43865 +               if( midi_write(m, (int)c) ) {
43866 +                       if ( ret == 0 )
43867 +                               ret = -EFAULT;
43868 +                       break;
43869 +               }
43870 +               count--;
43871 +               buffer++;
43872 +               ret++;
43873 +       }
43874 +
43875 +       spin_lock_irqsave( &m->mout.ep->lock, flags );
43876 +       if ( flush_midi_buffer(m->mout.ep) < 0 ) {
43877 +               ret = -EFAULT;
43878 +       }
43879 +       spin_unlock_irqrestore( &m->mout.ep->lock, flags );
43880 +
43881 +       return ret;
43882 +}
43883 +
43884 +/** Basic operation on /dev/midiXX as registered through struct file_operations.
43885 + *
43886 + * Basic contract:  Wait (spin) until ready to read or write on the file.
43887 + *
43888 + **/
43889 +static unsigned int usb_midi_poll(struct file *file, struct poll_table_struct *wait)
43890 +{
43891 +       struct usb_mididev *m = (struct usb_mididev *)file->private_data;
43892 +       struct midi_in_endpoint *iep = m->min.ep;
43893 +       struct midi_out_endpoint *oep = m->mout.ep;
43894 +       unsigned long flags;
43895 +       unsigned int mask = 0;
43896 +  
43897 +       if ( file->f_mode & FMODE_READ ) {
43898 +               poll_wait( file, &iep->wait, wait );
43899 +               spin_lock_irqsave( &iep->lock, flags );
43900 +               if ( m->min.bufRemains > 0 )
43901 +                       mask |= POLLIN | POLLRDNORM;
43902 +               spin_unlock_irqrestore( &iep->lock, flags );
43903 +       }
43904 +
43905 +       if ( file->f_mode & FMODE_WRITE ) {
43906 +               poll_wait( file, &oep->wait, wait );
43907 +               spin_lock_irqsave( &oep->lock, flags );
43908 +               if ( oep->bufWrPtr < oep->bufSize )
43909 +                       mask |= POLLOUT | POLLWRNORM;
43910 +               spin_unlock_irqrestore( &oep->lock, flags );
43911 +       }
43912 +
43913 +       return mask;
43914 +}
43915 +
43916 +
43917 +/** Basic operation on /dev/midiXX as registered through struct file_operations.
43918 + *
43919 + * Basic contract: This is always the first operation performed on the
43920 + * device node. If no method is defined, the open succeeds without any
43921 + * notification given to the module.
43922 + *
43923 + **/
43924 +
43925 +static int usb_midi_open(struct inode *inode, struct file *file)
43926 +{
43927 +       int minor = MINOR(inode->i_rdev);
43928 +       DECLARE_WAITQUEUE(wait, current);
43929 +       struct list_head      *devs, *mdevs;
43930 +       struct usb_midi_state *s;
43931 +       struct usb_mididev    *m;
43932 +       int flags;
43933 +       int succeed = 0;
43934 +
43935 +#if 0
43936 +       printk(KERN_INFO "usb-midi: Open minor= %d.\n", minor);
43937 +#endif
43938 +
43939 +       for(;;) {
43940 +               down(&open_sem);
43941 +               for (devs = mididevs.next; devs != &mididevs; devs = devs->next) {
43942 +                       s = list_entry(devs, struct usb_midi_state, mididev);
43943 +                       for (mdevs = s->midiDevList.next; mdevs != &s->midiDevList; mdevs = mdevs->next) {
43944 +                               m = list_entry(mdevs, struct usb_mididev, list);
43945 +                               if ( !((m->dev_midi ^ minor) & ~0xf) )
43946 +                                       goto device_found;
43947 +                       }
43948 +               }
43949 +               up(&open_sem);
43950 +               return -ENODEV;
43951 +
43952 +       device_found:
43953 +               if ( !s->usbdev ) {
43954 +                       up(&open_sem);
43955 +                       return -EIO;
43956 +               }
43957 +               if ( !(m->open_mode & file->f_mode) ) {
43958 +                       break;
43959 +               }
43960 +               if ( file->f_flags & O_NONBLOCK ) {
43961 +                       up(&open_sem);
43962 +                       return -EBUSY;
43963 +               }
43964 +               __set_current_state(TASK_INTERRUPTIBLE);
43965 +               add_wait_queue( &open_wait, &wait );
43966 +               up(&open_sem);
43967 +               schedule();
43968 +               __set_current_state(TASK_RUNNING);
43969 +               remove_wait_queue( &open_wait, &wait );
43970 +               if ( signal_pending(current) ) {
43971 +                       return -ERESTARTSYS;
43972 +               }
43973 +       }
43974 +
43975 +       file->private_data = m;
43976 +       spin_lock_irqsave( &s->lock, flags );
43977 +
43978 +       if ( !(m->open_mode & (FMODE_READ | FMODE_WRITE)) ) {
43979 +               //FIXME: intented semantics unclear here
43980 +               m->min.bufRdPtr       = 0;
43981 +               m->min.bufWrPtr       = 0;
43982 +               m->min.bufRemains     = 0;
43983 +               spin_lock_init(&m->min.ep->lock);
43984 +
43985 +               m->mout.bufPtr        = 0;
43986 +               m->mout.bufRemains    = 0;
43987 +               m->mout.isInExclusive = 0;
43988 +               m->mout.lastEvent     = 0;
43989 +               spin_lock_init(&m->mout.ep->lock);
43990 +       }
43991 +
43992 +       if ( (file->f_mode & FMODE_READ) && m->min.ep != NULL ) {
43993 +               unsigned long int flagsep;
43994 +               spin_lock_irqsave( &m->min.ep->lock, flagsep );
43995 +               m->min.ep->cables[m->min.cableId] = m;
43996 +               m->min.ep->readers += 1;
43997 +               m->min.bufRdPtr       = 0;
43998 +               m->min.bufWrPtr       = 0;
43999 +               m->min.bufRemains     = 0;
44000 +               spin_unlock_irqrestore( &m->min.ep->lock, flagsep );
44001 +
44002 +               if ( !(m->min.ep->urbSubmitted)) {
44003 +
44004 +                       /* urb->dev must be reinitialized on 2.4.x kernels */
44005 +                       m->min.ep->urb->dev = m->min.ep->usbdev;
44006 +
44007 +                       if ( usb_submit_urb(m->min.ep->urb) ) {
44008 +                               printk(KERN_ERR "usbmidi: Cannot submit urb for MIDI-IN\n");
44009 +                       }
44010 +                       m->min.ep->urbSubmitted = 1;
44011 +               }
44012 +               m->open_mode |= FMODE_READ;
44013 +               succeed = 1;
44014 +       }
44015 +
44016 +       if ( (file->f_mode & FMODE_WRITE) && m->mout.ep != NULL ) {
44017 +               m->mout.bufPtr        = 0;
44018 +               m->mout.bufRemains    = 0;
44019 +               m->mout.isInExclusive = 0;
44020 +               m->mout.lastEvent     = 0;
44021 +               m->open_mode |= FMODE_WRITE;
44022 +               succeed = 1;
44023 +       }
44024 +
44025 +       spin_unlock_irqrestore( &s->lock, flags );
44026 +
44027 +       s->count++;
44028 +       up(&open_sem);
44029 +
44030 +       /** Changed to prevent extra increments to USE_COUNT. **/
44031 +       if (!succeed) {
44032 +               return -EBUSY;
44033 +       }
44034 +
44035 +#if 0
44036 +       printk(KERN_INFO "usb-midi: Open Succeeded. minor= %d.\n", minor);
44037 +#endif
44038 +
44039 +       /** Side-effect: module cannot be removed until USE_COUNT is 0. **/
44040 +#ifndef MOD_INC_EACH_PROBE
44041 +       MOD_INC_USE_COUNT;
44042 +#endif
44043 +
44044 +       return 0; /** Success. **/
44045 +}
44046 +
44047 +
44048 +/** Basic operation on /dev/midiXX as registered through struct file_operations.
44049 + *
44050 + *  Basic contract: Close an opened file and deallocate anything we allocated.
44051 + *  Like open(), this can be missing. If open set file->private_data,
44052 + *  release() must clear it.
44053 + *
44054 + **/
44055 +
44056 +static int usb_midi_release(struct inode *inode, struct file *file)
44057 +{
44058 +       struct usb_mididev *m = (struct usb_mididev *)file->private_data;
44059 +       struct usb_midi_state *s = (struct usb_midi_state *)m->midi;
44060 +
44061 +#if 0
44062 +       printk(KERN_INFO "usb-midi: Close.\n");
44063 +#endif
44064 +
44065 +       down(&open_sem);
44066 +
44067 +       if ( m->open_mode & FMODE_WRITE ) {
44068 +               m->open_mode &= ~FMODE_WRITE;
44069 +               usb_unlink_urb( m->mout.ep->urb );
44070 +       }
44071 +
44072 +       if ( m->open_mode & FMODE_READ ) {
44073 +               unsigned long int flagsep;
44074 +               spin_lock_irqsave( &m->min.ep->lock, flagsep );
44075 +                m->min.ep->cables[m->min.cableId] = 0; // discard cable
44076 +                m->min.ep->readers -= 1;
44077 +               m->open_mode &= ~FMODE_READ;
44078 +               if ( m->min.ep->readers == 0 &&
44079 +                     m->min.ep->urbSubmitted ) {
44080 +                       m->min.ep->urbSubmitted = 0;
44081 +                       usb_unlink_urb(m->min.ep->urb);
44082 +               }
44083 +               spin_unlock_irqrestore( &m->min.ep->lock, flagsep );
44084 +       }
44085 +
44086 +       s->count--;
44087 +
44088 +       up(&open_sem);
44089 +       wake_up(&open_wait);
44090 +
44091 +       file->private_data = 0;
44092 +       /** Sideeffect: Module cannot be removed until usecount is 0. */
44093 +#ifndef MOD_INC_EACH_PROBE
44094 +       MOD_DEC_USE_COUNT;
44095 +#endif
44096 +
44097 +       return 0;
44098 +}
44099 +
44100 +static struct file_operations usb_midi_fops = {
44101 +       llseek:         usb_midi_llseek,
44102 +       read:           usb_midi_read,
44103 +       write:          usb_midi_write,
44104 +       poll:           usb_midi_poll,
44105 +       open:           usb_midi_open,
44106 +       release:        usb_midi_release,
44107 +};
44108 +
44109 +/* ------------------------------------------------------------------------- */
44110 +
44111 +/** Returns filled midi_in_endpoint structure or null on failure.
44112 + *
44113 + * Parameters:
44114 + *     d        - a usb_device
44115 + *     endPoint - An usb endpoint in the range 0 to 15.
44116 + * Called by allocUsbMidiDev();
44117 + *
44118 + **/
44119 +
44120 +static struct midi_in_endpoint *alloc_midi_in_endpoint( struct usb_device *d, int endPoint )
44121 +{
44122 +       struct midi_in_endpoint *ep;
44123 +       int bufSize;
44124 +       int pipe;
44125 +
44126 +       endPoint &= 0x0f; /* Silently force endPoint to lie in range 0 to 15. */
44127 +
44128 +       pipe =  usb_rcvbulkpipe( d, endPoint );
44129 +       bufSize = usb_maxpacket( d, pipe, usb_pipein(pipe) );
44130 +       /* usb_pipein() = ! usb_pipeout() = true for an in Endpoint */
44131 +
44132 +       ep = (struct midi_in_endpoint *)kmalloc(sizeof(struct midi_in_endpoint), GFP_KERNEL);
44133 +       if ( !ep ) {
44134 +               printk(KERN_ERR "usbmidi: no memory for midi in-endpoint\n");
44135 +               return NULL;
44136 +       }
44137 +       memset( ep, 0, sizeof(struct midi_in_endpoint) );
44138 +//      this sets cables[] and readers to 0, too.
44139 +//      for (i=0; i<16; i++) ep->cables[i] = 0; // discard cable
44140 +//      ep->readers = 0;
44141 +
44142 +       ep->endpoint = endPoint;
44143 +
44144 +       ep->recvBuf = (unsigned char *)kmalloc(sizeof(unsigned char)*(bufSize), GFP_KERNEL);
44145 +       if ( !ep->recvBuf ) {
44146 +               printk(KERN_ERR "usbmidi: no memory for midi in-endpoint buffer\n");
44147 +               kfree(ep);
44148 +               return NULL;
44149 +       }
44150 +
44151 +       ep->urb = usb_alloc_urb(0); /* no ISO */
44152 +       if ( !ep->urb ) {
44153 +               printk(KERN_ERR "usbmidi: no memory for midi in-endpoint urb\n");
44154 +               kfree(ep->recvBuf);
44155 +               kfree(ep);
44156 +               return NULL;
44157 +       }
44158 +       FILL_BULK_URB( ep->urb, d, 
44159 +                      usb_rcvbulkpipe(d, endPoint),
44160 +                      (unsigned char *)ep->recvBuf, bufSize,
44161 +                      (usb_complete_t)usb_bulk_read, ep );
44162 +
44163 +       /* ep->bufRdPtr     = 0; */
44164 +       /* ep->bufWrPtr     = 0; */
44165 +       /* ep->bufRemains   = 0; */
44166 +       /* ep->urbSubmitted = 0; */
44167 +       ep->recvBufSize  = bufSize;
44168 +
44169 +       init_waitqueue_head(&ep->wait);
44170 +
44171 +       return ep;
44172 +}
44173 +
44174 +static int remove_midi_in_endpoint( struct midi_in_endpoint *min )
44175 +{
44176 +       usb_unlink_urb( min->urb );
44177 +       usb_free_urb( min->urb );
44178 +       kfree( min->recvBuf );
44179 +       kfree( min );
44180 +
44181 +       return 0;
44182 +}
44183 +
44184 +/** Returns filled midi_out_endpoint structure or null on failure.
44185 + *
44186 + * Parameters:
44187 + *     d        - a usb_device
44188 + *     endPoint - An usb endpoint in the range 0 to 15.
44189 + * Called by allocUsbMidiDev();
44190 + *
44191 + **/
44192 +static struct midi_out_endpoint *alloc_midi_out_endpoint( struct usb_device *d, int endPoint )
44193 +{
44194 +       struct midi_out_endpoint *ep = NULL;
44195 +       int pipe;
44196 +       int bufSize;
44197 +
44198 +       endPoint &= 0x0f;
44199 +       pipe =  usb_sndbulkpipe( d, endPoint );
44200 +       bufSize = usb_maxpacket( d, pipe, usb_pipeout(pipe) );
44201 +
44202 +       ep = (struct midi_out_endpoint *)kmalloc(sizeof(struct midi_out_endpoint), GFP_KERNEL);
44203 +       if ( !ep ) {
44204 +               printk(KERN_ERR "usbmidi: no memory for midi out-endpoint\n");
44205 +               return NULL;
44206 +       }
44207 +       memset( ep, 0, sizeof(struct midi_out_endpoint) );
44208 +
44209 +       ep->endpoint = endPoint;
44210 +       ep->buf = (unsigned char *)kmalloc(sizeof(unsigned char)*bufSize, GFP_KERNEL);
44211 +       if ( !ep->buf ) {
44212 +               printk(KERN_ERR "usbmidi: no memory for midi out-endpoint buffer\n");
44213 +               kfree(ep);
44214 +               return NULL;
44215 +       }
44216 +
44217 +       ep->urb = usb_alloc_urb(0); /* no ISO */
44218 +       if ( !ep->urb ) {
44219 +               printk(KERN_ERR "usbmidi: no memory for midi out-endpoint urb\n");
44220 +               kfree(ep->buf);
44221 +               kfree(ep);
44222 +               return NULL;
44223 +       }
44224 +
44225 +       ep->bufSize       = bufSize;
44226 +       /* ep->bufWrPtr      = 0; */
44227 +
44228 +       init_waitqueue_head(&ep->wait);
44229 +
44230 +       return ep;
44231 +}
44232 +
44233 +
44234 +static int remove_midi_out_endpoint( struct midi_out_endpoint *mout )
44235 +{
44236 +       usb_unlink_urb( mout->urb );
44237 +       usb_free_urb( mout->urb );
44238 +       kfree( mout->buf );
44239 +       kfree( mout );
44240 +
44241 +       return 0;
44242 +}
44243 +
44244 +
44245 +/** Returns a filled usb_mididev structure, registered as a Linux MIDI device.
44246 + *
44247 + * Returns null if memory is not available or the device cannot be registered.
44248 + * Called by allocUsbMidiDev();
44249 + *
44250 + **/
44251 +static struct usb_mididev *allocMidiDev(
44252 +       struct usb_midi_state *s,
44253 +       struct midi_in_endpoint *min,
44254 +       struct midi_out_endpoint *mout,
44255 +       int inCableId,
44256 +       int outCableId )
44257 +{
44258 +       struct usb_mididev *m;
44259 +
44260 +       m = (struct usb_mididev *)kmalloc(sizeof(struct usb_mididev), GFP_KERNEL);
44261 +       if (!m) {
44262 +               printk(KERN_ERR "usbmidi: no memory for midi device\n");
44263 +               return NULL;
44264 +       }
44265 +
44266 +       memset(m, 0, sizeof(struct usb_mididev));
44267 +
44268 +       if ((m->dev_midi = register_sound_midi(&usb_midi_fops, -1)) < 0) {
44269 +               printk(KERN_ERR "usbmidi: cannot register midi device\n");
44270 +               kfree(m);
44271 +               return NULL;
44272 +       }
44273 +
44274 +       m->midi               = s;
44275 +       /* m->open_mode          = 0; */
44276 +
44277 +       if ( min ) {
44278 +               m->min.ep             = min;
44279 +               m->min.ep->usbdev     = s->usbdev;
44280 +               m->min.cableId        = inCableId;
44281 +       }
44282 +       /* m->min.bufPtr         = 0; */
44283 +       /* m->min.bufRemains     = 0; */
44284 +
44285 +       if ( mout ) {
44286 +               m->mout.ep            = mout;
44287 +               m->mout.ep->usbdev    = s->usbdev;
44288 +               m->mout.cableId       = outCableId;
44289 +       }
44290 +       /* m->mout.bufPtr        = 0; */
44291 +       /* m->mout.bufRemains    = 0; */
44292 +       /* m->mout.isInExclusive = 0; */
44293 +       /* m->mout.lastEvent     = 0; */
44294 +
44295 +       m->singlebyte         = singlebyte;
44296 +
44297 +       return m;
44298 +}
44299 +
44300 +
44301 +static void release_midi_device( struct usb_midi_state *s )
44302 +{
44303 +       struct usb_mididev *m;
44304 +       struct midi_in_endpoint *min;
44305 +       struct midi_out_endpoint *mout;
44306 +
44307 +       if ( s->count > 0 ) {
44308 +               up(&open_sem);
44309 +               return;
44310 +       }
44311 +       up( &open_sem );
44312 +       wake_up( &open_wait );
44313 +
44314 +       while(!list_empty(&s->inEndpointList)) {
44315 +               min = list_entry(s->inEndpointList.next, struct midi_in_endpoint, list);
44316 +               list_del(&min->list);
44317 +               remove_midi_in_endpoint(min);
44318 +       }
44319 +
44320 +       while(!list_empty(&s->outEndpointList)) {
44321 +               mout = list_entry(s->outEndpointList.next, struct midi_out_endpoint, list);
44322 +               list_del(&mout->list);
44323 +               remove_midi_out_endpoint(mout);
44324 +       }
44325 +
44326 +       while(!list_empty(&s->midiDevList)) {
44327 +               m = list_entry(s->midiDevList.next, struct usb_mididev, list);
44328 +               list_del(&m->list);
44329 +               kfree(m);
44330 +       }
44331 +
44332 +       kfree(s);
44333 +
44334 +       return;
44335 +}
44336 +
44337 +
44338 +/* ------------------------------------------------------------------------- */
44339 +
44340 +/** Utility routine to find a descriptor in a dump of many descriptors.
44341 + * Returns start of descriptor or NULL if not found. 
44342 + * descStart pointer to list of interfaces.
44343 + * descLength length (in bytes) of dump
44344 + * after (ignored if NULL) this routine returns only descriptors after "after"
44345 + * dtype (mandatory) The descriptor type.
44346 + * iface (ignored if -1) returns descriptor at/following given interface
44347 + * altSetting (ignored if -1) returns descriptor at/following given altSetting
44348 + *
44349 + *
44350 + *  Called by parseDescriptor(), find_csinterface_descriptor();
44351 + *
44352 + */
44353 +static void *find_descriptor( void *descStart, unsigned int descLength, void *after, unsigned char dtype, int iface, int altSetting )
44354 +{
44355 +       unsigned char *p, *end, *next;
44356 +       int interfaceNumber = -1, altSet = -1;
44357 +
44358 +       p = descStart;
44359 +       end = p + descLength;
44360 +       for( ; p < end; ) {
44361 +               if ( p[0] < 2 )
44362 +                       return NULL;
44363 +               next = p + p[0];
44364 +               if ( next > end )
44365 +                       return NULL;
44366 +               if ( p[1] == USB_DT_INTERFACE ) {
44367 +                       if ( p[0] < USB_DT_INTERFACE_SIZE )
44368 +                               return NULL;
44369 +                       interfaceNumber = p[2];
44370 +                       altSet = p[3];
44371 +               }
44372 +               if ( p[1] == dtype &&
44373 +                    ( !after || ( p > (unsigned char *)after) ) &&
44374 +                    ( ( iface == -1) || (iface == interfaceNumber) ) &&
44375 +                    ( (altSetting == -1) || (altSetting == altSet) )) {
44376 +                       return p;
44377 +               }
44378 +               p = next;
44379 +       }
44380 +       return NULL;
44381 +}
44382 +
44383 +/** Utility to find a class-specfic interface descriptor.
44384 + *  dsubtype is a descriptor subtype
44385 + *  Called by parseDescriptor();
44386 + **/
44387 +static void *find_csinterface_descriptor(void *descStart, unsigned int descLength, void *after, u8 dsubtype, int iface, int altSetting)
44388 +{
44389 +       unsigned char *p;
44390 +  
44391 +       p = find_descriptor( descStart, descLength, after, USB_DT_CS_INTERFACE, iface, altSetting );
44392 +       while ( p ) {
44393 +               if ( p[0] >= 3 && p[2] == dsubtype )
44394 +                       return p;
44395 +               p = find_descriptor( descStart, descLength, p, USB_DT_CS_INTERFACE, 
44396 +                                    iface, altSetting );
44397 +       }
44398 +       return NULL;
44399 +}
44400 +
44401 +
44402 +/** The magic of making a new usb_midi_device from config happens here.
44403 + *
44404 + * The caller is responsible for free-ing this return value (if not NULL).
44405 + *
44406 + **/
44407 +static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned char *buffer, int bufSize, unsigned int ifnum , unsigned int altSetting, int quirks)
44408 +{
44409 +       struct usb_midi_device *u;
44410 +       unsigned char *p1;
44411 +       unsigned char *p2;
44412 +       unsigned char *next;
44413 +       int iep, oep;
44414 +       int length;
44415 +       unsigned long longBits;
44416 +       int pins, nbytes, offset, shift, jack;
44417 +#ifdef HAVE_JACK_STRINGS
44418 +       /** Jacks can have associated names.  **/
44419 +       unsigned char jack2string[256];
44420 +#endif
44421 +
44422 +       u = 0;
44423 +       /* find audiocontrol interface */
44424 +       p1 = find_csinterface_descriptor( buffer, bufSize, NULL,
44425 +                                         MS_HEADER, ifnum, altSetting);
44426 +
44427 +       if ( !p1 ) {
44428 +               goto error_end;
44429 +       }
44430 +
44431 +       if ( p1[0] < MS_HEADER_LENGTH ) {
44432 +               goto error_end;
44433 +       }
44434 +
44435 +       /* Assume success. Since the device corresponds to USB-MIDI spec, we assume
44436 +          that the rest of the USB 2.0 spec is obeyed. */
44437 +
44438 +       u = (struct usb_midi_device *)kmalloc( sizeof(struct usb_midi_device), GFP_KERNEL );
44439 +       if ( !u ) {
44440 +               return NULL;
44441 +       }
44442 +       u->deviceName = 0;
44443 +       u->idVendor = d->descriptor.idVendor;
44444 +       u->idProduct = d->descriptor.idProduct;
44445 +       u->interface = ifnum;
44446 +       u->altSetting = altSetting;
44447 +       u->in[0].endpoint = -1;
44448 +       u->in[0].cableId = -1;
44449 +       u->out[0].endpoint = -1;
44450 +       u->out[0].cableId = -1;
44451 +
44452 +
44453 +       printk(KERN_INFO "usb-midi: Found MIDIStreaming device corresponding to Release %d.%02d of spec.\n",
44454 +              (p1[4] >> 4) * 10 + (p1[4] & 0x0f ),
44455 +              (p1[3] >> 4) * 10 + (p1[3] & 0x0f )
44456 +               );
44457 +
44458 +       length = p1[5] | (p1[6] << 8);
44459 +
44460 +#ifdef HAVE_JACK_STRINGS
44461 +       memset(jack2string, 0, sizeof(unsigned char) * 256);
44462 +#endif
44463 +
44464 +       length -= p1[0];
44465 +       for (p2 = p1 + p1[0]; length > 0; p2 = next) {
44466 +               next = p2 + p2[0];
44467 +               length -= p2[0];
44468 +
44469 +               if (p2[0] < 2 ) break;
44470 +               if (p2[1] != USB_DT_CS_INTERFACE) break;
44471 +               if (p2[2] == MIDI_IN_JACK && p2[0] >= 6 ) {
44472 +                       jack = p2[4];
44473 +#ifdef HAVE_JACK_STRINGS
44474 +                       jack2string[jack] = p2[5];
44475 +#endif
44476 +                       printk(KERN_INFO "usb-midi: Found IN Jack 0x%02x %s\n",
44477 +                              jack, (p2[3] == EMBEDDED_JACK)?"EMBEDDED":"EXTERNAL" );
44478 +               } else if ( p2[2] == MIDI_OUT_JACK && p2[0] >= 6) {
44479 +                       pins = p2[5];
44480 +                       if ( p2[0] < (6 + 2 * pins) ) continue;
44481 +                       jack = p2[4];
44482 +#ifdef HAVE_JACK_STRINGS
44483 +                       jack2string[jack] = p2[5 + 2 * pins];
44484 +#endif
44485 +                       printk(KERN_INFO "usb-midi: Found OUT Jack 0x%02x %s, %d pins\n",
44486 +                              jack, (p2[3] == EMBEDDED_JACK)?"EMBEDDED":"EXTERNAL", pins );
44487 +               } else if ( p2[2] == ELEMENT_DESCRIPTOR  && p2[0]  >= 10) {
44488 +                       pins = p2[4];
44489 +                       if ( p2[0] < (9 + 2 * pins ) ) continue;
44490 +                       nbytes = p2[8 + 2 * pins ];
44491 +                       if ( p2[0] < (10 + 2 * pins + nbytes) ) continue;
44492 +                       longBits = 0L;
44493 +                       for ( offset = 0, shift = 0; offset < nbytes && offset < 8; offset ++, shift += 8) {
44494 +                               longBits |= ((long)(p2[9 + 2 * pins + offset])) << shift;
44495 +                       }
44496 +                       jack = p2[3];
44497 +#ifdef HAVE_JACK_STRINGS
44498 +                       jack2string[jack] = p2[9 + 2 * pins + nbytes];
44499 +#endif
44500 +                       printk(KERN_INFO "usb-midi: Found ELEMENT 0x%02x, %d/%d pins in/out, bits: 0x%016lx\n",
44501 +                              jack, pins, (int)(p2[5 + 2 * pins]), (long)longBits );
44502 +               } else {
44503 +               }
44504 +       }
44505 +
44506 +       iep=0;
44507 +       oep=0;
44508 +
44509 +       if (quirks==0) {
44510 +               /* MIDISTREAM */
44511 +               p2 = 0;
44512 +               for (p1 = find_descriptor(buffer, bufSize, NULL, USB_DT_ENDPOINT,
44513 +                                         ifnum, altSetting ); p1; p1 = next ) {
44514 +                       next = find_descriptor(buffer, bufSize, p1, USB_DT_ENDPOINT,
44515 +                                              ifnum, altSetting ); 
44516 +                       p2 = find_descriptor(buffer, bufSize, p1, USB_DT_CS_ENDPOINT,
44517 +                                            ifnum, altSetting ); 
44518 +
44519 +                       if ( p2 && next && ( p2 > next ) )
44520 +                               p2 = 0;
44521 +
44522 +                       if ( p1[0] < 9 || !p2 || p2[0] < 4 ) continue;
44523 +
44524 +                       if ( (p1[2] & 0x80) == 0x80 ) {
44525 +                               if ( iep < 15 ) {
44526 +                                       pins = p2[3]; /* not pins -- actually "cables" */
44527 +                                       if ( pins > 16 )
44528 +                                               pins = 16;
44529 +                                       u->in[iep].endpoint = p1[2];
44530 +                                       u->in[iep].cableId = ( 1 << pins ) - 1;
44531 +                                       if ( u->in[iep].cableId ) iep ++;
44532 +                                       if ( iep < 15 ) {
44533 +                                               u->in[iep].endpoint = -1;
44534 +                                               u->in[iep].cableId = -1;
44535 +                                       }
44536 +                               }
44537 +                       } else {
44538 +                               if ( oep < 15 ) {
44539 +                                       pins = p2[3]; /* not pins -- actually "cables" */
44540 +                                       if ( pins > 16 )
44541 +                                               pins = 16;
44542 +                                       u->out[oep].endpoint = p1[2];
44543 +                                       u->out[oep].cableId = ( 1 << pins ) - 1;
44544 +                                       if ( u->out[oep].cableId ) oep ++;
44545 +                                       if ( oep < 15 ) {
44546 +                                               u->out[oep].endpoint = -1;
44547 +                                               u->out[oep].cableId = -1;
44548 +                                       }
44549 +                               }
44550 +                       }
44551 +       
44552 +               }
44553 +       } else if (quirks==1) {
44554 +               /* YAMAHA quirks */
44555 +               for (p1 = find_descriptor(buffer, bufSize, NULL, USB_DT_ENDPOINT,
44556 +                                         ifnum, altSetting ); p1; p1 = next ) {
44557 +                       next = find_descriptor(buffer, bufSize, p1, USB_DT_ENDPOINT,
44558 +                                              ifnum, altSetting ); 
44559 +       
44560 +                       if ( p1[0] < 7 ) continue;
44561 +
44562 +                       if ( (p1[2] & 0x80) == 0x80 ) {
44563 +                               if ( iep < 15 ) {
44564 +                                       pins = iep+1;
44565 +                                       if ( pins > 16 )
44566 +                                               pins = 16;
44567 +                                       u->in[iep].endpoint = p1[2];
44568 +                                       u->in[iep].cableId = ( 1 << pins ) - 1;
44569 +                                       if ( u->in[iep].cableId ) iep ++;
44570 +                                       if ( iep < 15 ) {
44571 +                                               u->in[iep].endpoint = -1;
44572 +                                               u->in[iep].cableId = -1;
44573 +                                       }
44574 +                               }
44575 +                       } else {
44576 +                               if ( oep < 15 ) {
44577 +                                       pins = oep+1;
44578 +                                       if ( pins > 16 )
44579 +                                               pins = 16;
44580 +                                       u->out[oep].endpoint = p1[2];
44581 +                                       u->out[oep].cableId = ( 1 << pins ) - 1;
44582 +                                       if ( u->out[oep].cableId ) oep ++;
44583 +                                       if ( oep < 15 ) {
44584 +                                               u->out[oep].endpoint = -1;
44585 +                                               u->out[oep].cableId = -1;
44586 +                                       }
44587 +                               }
44588 +                       }
44589 +       
44590 +               }
44591 +       }
44592 +
44593 +       if ( !iep && ! oep ) {
44594 +               goto error_end;
44595 +       }
44596 +
44597 +       return u;
44598 +
44599 +error_end:
44600 +       if ( u ) kfree(u);
44601 +       return NULL;
44602 +}
44603 +
44604 +/* ------------------------------------------------------------------------- */
44605 +
44606 +/** Returns number between 0 and 16.
44607 + *
44608 + **/
44609 +static int on_bits( unsigned short v )
44610 +{
44611 +       int i;
44612 +       int ret=0;
44613 +
44614 +       for ( i=0 ; i<16 ; i++ ) {
44615 +               if ( v & (1<<i) ) ret++;
44616 +       }
44617 +
44618 +       return ret;
44619 +}
44620 +
44621 +
44622 +/** USB-device will be interrogated for altSetting.
44623 + *
44624 + * Returns negative on error.
44625 + * Called by allocUsbMidiDev();
44626 + *
44627 + **/
44628 +
44629 +static int get_alt_setting( struct usb_device *d, int ifnum )
44630 +{
44631 +       int alts, alt=0;
44632 +       struct usb_interface_descriptor *interface;
44633 +       struct usb_endpoint_descriptor *ep;
44634 +       int epin, epout;
44635 +       int i;
44636 +
44637 +       alts = d->actconfig->interface[ifnum].num_altsetting;
44638 +
44639 +       for ( alt=0 ; alt<alts ; alt++ ) {
44640 +               interface = &d->actconfig->interface[ifnum].altsetting[alt];
44641 +               epin = -1;
44642 +               epout = -1;
44643 +
44644 +               for ( i=0 ; i<interface->bNumEndpoints ; i++ ) {
44645 +                       ep = &interface->endpoint[i];
44646 +                       if ( (ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK ) {
44647 +                               continue;
44648 +                       }
44649 +                       if ( (ep->bEndpointAddress & USB_DIR_IN) && epin < 0 ) {
44650 +                               epin = i;
44651 +                       } else if ( epout < 0 ) {
44652 +                               epout = i;
44653 +                       }
44654 +                       if ( epin >= 0 && epout >= 0 ) {
44655 +                               return alt;
44656 +                       }
44657 +               }
44658 +       }
44659 +
44660 +       return -ENODEV;
44661 +}
44662 +
44663 +
44664 +/* ------------------------------------------------------------------------- */
44665 +
44666 +
44667 +/** Returns 0 if successful in allocating and registering internal structures.
44668 + * Returns negative on failure.
44669 + * Calls allocMidiDev which additionally registers /dev/midiXX devices.
44670 + * Writes messages on success to indicate which /dev/midiXX is which physical
44671 + * endpoint.
44672 + *
44673 + **/
44674 +static int alloc_usb_midi_device( struct usb_device *d, struct usb_midi_state *s, struct usb_midi_device *u )
44675 +{
44676 +       struct usb_mididev **mdevs=NULL;
44677 +       struct midi_in_endpoint *mins[15], *min;
44678 +       struct midi_out_endpoint *mouts[15], *mout;
44679 +       int inDevs=0, outDevs=0;
44680 +       int inEndpoints=0, outEndpoints=0;
44681 +       int inEndpoint, outEndpoint;
44682 +       int inCableId, outCableId;
44683 +       int i;
44684 +       int devices = 0;
44685 +       int alt = 0;
44686 +
44687 +       /* Obtain altSetting or die.. */
44688 +       alt = u->altSetting;
44689 +       if ( alt < 0 ) {
44690 +               alt = get_alt_setting( d, u->interface );
44691 +       }
44692 +       if ( alt < 0 ) { return -ENXIO; }
44693 +
44694 +       /* Configure interface */
44695 +       if ( usb_set_interface( d, u->interface, alt ) < 0 ) {
44696 +               return -ENXIO;
44697 +       }
44698 +
44699 +       for ( i = 0 ; i < 15 ; i++ ) {
44700 +               mins[i] = NULL;
44701 +               mouts[i] = NULL;
44702 +       }
44703 +
44704 +       /* Begin Allocation */
44705 +       while( inEndpoints < 15
44706 +              && inDevs < maxdevices
44707 +              && u->in[inEndpoints].cableId >= 0 ) {
44708 +               inDevs += on_bits((unsigned short)u->in[inEndpoints].cableId);
44709 +               mins[inEndpoints] = alloc_midi_in_endpoint( d, u->in[inEndpoints].endpoint );
44710 +               if ( mins[inEndpoints] == NULL ) { goto error_end; }
44711 +               inEndpoints++;
44712 +       }
44713 +
44714 +       while( outEndpoints < 15
44715 +              && outDevs < maxdevices
44716 +              && u->out[outEndpoints].cableId >= 0 ) {
44717 +               outDevs += on_bits((unsigned short)u->out[outEndpoints].cableId);
44718 +               mouts[outEndpoints] = alloc_midi_out_endpoint( d, u->out[outEndpoints].endpoint );
44719 +               if ( mouts[outEndpoints] == NULL ) { goto error_end; }
44720 +               outEndpoints++;
44721 +       }
44722 +
44723 +       devices = inDevs > outDevs ? inDevs : outDevs;
44724 +       devices = maxdevices > devices ? devices : maxdevices;
44725 +
44726 +       /* obtain space for device name (iProduct) if not known. */
44727 +       if ( ! u->deviceName ) {
44728 +               mdevs = (struct usb_mididev **)
44729 +                       kmalloc(sizeof(struct usb_mididevs *)*devices
44730 +                               + sizeof(char) * 256, GFP_KERNEL);
44731 +       } else {
44732 +               mdevs = (struct usb_mididev **)
44733 +                       kmalloc(sizeof(struct usb_mididevs *)*devices, GFP_KERNEL);
44734 +       }
44735 +
44736 +       if ( !mdevs ) {
44737 +               /* devices = 0; */
44738 +               /* mdevs = NULL; */
44739 +               goto error_end;
44740 +       }
44741 +       for ( i=0 ; i<devices ; i++ ) {
44742 +               mdevs[i] = NULL;
44743 +       }
44744 +
44745 +       /* obtain device name (iProduct) if not known. */
44746 +       if ( ! u->deviceName ) {
44747 +               u->deviceName = (char *) (mdevs + devices);
44748 +               if ( ! d->have_langid && d->descriptor.iProduct) {
44749 +                       alt = usb_get_string(d, 0, 0, u->deviceName, 250);
44750 +                       if (alt < 0) {
44751 +                               printk(KERN_INFO "error getting string descriptor 0 (error=%d)\n", alt);
44752 +                       } else if (u->deviceName[0] < 4) {
44753 +                               printk(KERN_INFO "string descriptor 0 too short (length = %d)\n", alt);
44754 +                       } else {
44755 +                               printk(KERN_INFO "string descriptor 0 found (length = %d)\n", alt);
44756 +                               for(; alt >= 4; alt -= 2) {
44757 +                                       i = u->deviceName[alt-2] | (u->deviceName[alt-1]<< 8);
44758 +                                       printk(KERN_INFO "usb-midi: langid(%d) 0x%04x\n",
44759 +                                              (alt-4) >> 1, i);
44760 +                                       if ( ( ( i ^ ulangid ) & 0xff ) == 0 ) {
44761 +                                               d->have_langid = 1;
44762 +                                               d->string_langid = i;
44763 +                                               printk(KERN_INFO "usb-midi: langid(match) 0x%04x\n", i);
44764 +                                               if ( i == ulangid )
44765 +                                                       break;
44766 +                                       }
44767 +                               }
44768 +                       }
44769 +               }
44770 +               u->deviceName[0] = (char) 0;
44771 +               if (d->descriptor.iProduct) {
44772 +                       printk(KERN_INFO "usb-midi: fetchString(%d)\n", d->descriptor.iProduct);
44773 +                       alt = usb_string(d, d->descriptor.iProduct, u->deviceName, 255);
44774 +                       if( alt < 0 ) {
44775 +                               u->deviceName[0] = (char) 0;
44776 +                       }
44777 +                       printk(KERN_INFO "usb-midi: fetchString = %d\n", alt);
44778 +               } 
44779 +               /* Failsafe */
44780 +               if ( !u->deviceName[0] ) {
44781 +                       if ( d->descriptor.idVendor == USB_VENDOR_ID_ROLAND ) {
44782 +                               strcpy(u->deviceName, "Unknown Roland");
44783 +                       } else if ( d->descriptor.idVendor == USB_VENDOR_ID_STEINBERG  ) {
44784 +                               strcpy(u->deviceName, "Unknown Steinberg");
44785 +                       } else if ( d->descriptor.idVendor == USB_VENDOR_ID_YAMAHA ) {
44786 +                               strcpy(u->deviceName, "Unknown Yamaha");
44787 +                       } else {
44788 +                               strcpy(u->deviceName, "Unknown");
44789 +                       }
44790 +               }
44791 +       }
44792 +
44793 +       inEndpoint  = 0; inCableId  = -1;
44794 +       outEndpoint = 0; outCableId = -1;
44795 +
44796 +       for ( i=0 ; i<devices ; i++ ) {
44797 +               for ( inCableId ++ ;
44798 +                     inEndpoint <15
44799 +                             && mins[inEndpoint] 
44800 +                             && !(u->in[inEndpoint].cableId & (1<<inCableId)) ;
44801 +                     inCableId++ ) {
44802 +                       if ( inCableId >= 16 ) {
44803 +                               inEndpoint  ++;
44804 +                               inCableId  = 0;
44805 +                       }
44806 +               }
44807 +               min  = mins[inEndpoint];
44808 +               for ( outCableId ++ ;
44809 +                     outEndpoint <15
44810 +                             && mouts[outEndpoint] 
44811 +                             && !(u->out[outEndpoint].cableId & (1<<outCableId)) ;
44812 +                     outCableId++ ) {
44813 +                       if ( outCableId >= 16 ) {
44814 +                               outEndpoint  ++;
44815 +                               outCableId  = 0;
44816 +                       }
44817 +               }
44818 +               mout = mouts[outEndpoint];
44819 +
44820 +               mdevs[i] = allocMidiDev( s, min, mout, inCableId, outCableId );
44821 +               if ( mdevs[i] == NULL ) { goto error_end; }
44822 +
44823 +       }
44824 +
44825 +       /* Success! */
44826 +       for ( i=0 ; i<devices ; i++ ) {
44827 +               list_add_tail( &mdevs[i]->list, &s->midiDevList );
44828 +       }
44829 +       for ( i=0 ; i<inEndpoints ; i++ ) {
44830 +               list_add_tail( &mins[i]->list, &s->inEndpointList );
44831 +       }
44832 +       for ( i=0 ; i<outEndpoints ; i++ ) {
44833 +               list_add_tail( &mouts[i]->list, &s->outEndpointList );
44834 +       }
44835 +
44836 +       printk(KERN_INFO "usbmidi: found [ %s ] (0x%04x:0x%04x), attached:\n", u->deviceName, u->idVendor, u->idProduct );
44837 +       for ( i=0 ; i<devices ; i++ ) {
44838 +               int dm = (mdevs[i]->dev_midi-2)>>4;
44839 +               if ( mdevs[i]->mout.ep != NULL && mdevs[i]->min.ep != NULL ) {
44840 +                       printk(KERN_INFO "usbmidi: /dev/midi%02d: in (ep:%02x cid:%2d bufsiz:%2d) out (ep:%02x cid:%2d bufsiz:%2d)\n", 
44841 +                              dm,
44842 +                              mdevs[i]->min.ep->endpoint|USB_DIR_IN, mdevs[i]->min.cableId, mdevs[i]->min.ep->recvBufSize,
44843 +                              mdevs[i]->mout.ep->endpoint, mdevs[i]->mout.cableId, mdevs[i]->mout.ep->bufSize);
44844 +               } else if ( mdevs[i]->min.ep != NULL ) {
44845 +                       printk(KERN_INFO "usbmidi: /dev/midi%02d: in (ep:%02x cid:%2d bufsiz:%02d)\n", 
44846 +                              dm,
44847 +                              mdevs[i]->min.ep->endpoint|USB_DIR_IN, mdevs[i]->min.cableId, mdevs[i]->min.ep->recvBufSize);
44848 +               } else if ( mdevs[i]->mout.ep != NULL ) {
44849 +                       printk(KERN_INFO "usbmidi: /dev/midi%02d: out (ep:%02x cid:%2d bufsiz:%02d)\n", 
44850 +                              dm,
44851 +                              mdevs[i]->mout.ep->endpoint, mdevs[i]->mout.cableId, mdevs[i]->mout.ep->bufSize);
44852 +               }
44853 +       }
44854 +
44855 +       kfree(mdevs);
44856 +       return 0;
44857 +
44858 + error_end:
44859 +       if ( mdevs != NULL && devices > 0 ) {
44860 +               for ( i=0 ; i<devices ; i++ ) {
44861 +                       if ( mdevs[i] != NULL ) {
44862 +                               unregister_sound_midi( mdevs[i]->dev_midi );
44863 +                               kfree(mdevs[i]);
44864 +                       }
44865 +               }
44866 +               kfree(mdevs);
44867 +       }
44868 +
44869 +       for ( i=0 ; i<15 ; i++ ) {
44870 +               if ( mins[i] != NULL ) {
44871 +                       remove_midi_in_endpoint( mins[i] );
44872 +               }
44873 +               if ( mouts[i] != NULL ) {
44874 +                       remove_midi_out_endpoint( mouts[i] );
44875 +               }
44876 +       }
44877 +
44878 +       return -ENOMEM;
44879 +}
44880 +
44881 +/* ------------------------------------------------------------------------- */
44882 +
44883 +/** Attempt to scan YAMAHA's device descriptor and detect correct values of
44884 + *  them.
44885 + *  Return 0 on succes, negative on failure.
44886 + *  Called by usb_midi_probe();
44887 + **/
44888 +
44889 +static int detect_yamaha_device( struct usb_device *d, unsigned int ifnum, struct usb_midi_state *s)
44890 +{
44891 +       struct usb_config_descriptor    *c = d->actconfig;
44892 +       struct usb_interface_descriptor *interface;
44893 +       struct usb_midi_device *u;
44894 +       unsigned char buf[USB_DT_CONFIG_SIZE], *buffer;
44895 +       int bufSize;
44896 +       int i;
44897 +       int alts=-1;
44898 +       int ret;
44899 +
44900 +       if (d->descriptor.idVendor != USB_VENDOR_ID_YAMAHA) {
44901 +               return -EINVAL;
44902 +       }
44903 +
44904 +       for ( i=0 ; i < c->interface[ifnum].num_altsetting; i++ ) {
44905 +               interface = c->interface[ifnum].altsetting + i;
44906 +
44907 +               if ( interface->bInterfaceClass != 255 ||
44908 +                    interface->bInterfaceSubClass != 0 )
44909 +                       continue;
44910 +               alts = i;
44911 +       }
44912 +       if ( alts == -1 ) {
44913 +               return -EINVAL;
44914 +       }
44915 +
44916 +       printk(KERN_INFO "usb-midi: Found YAMAHA USB-MIDI device on dev %04x:%04x, iface %d\n",
44917 +              d->descriptor.idVendor, d->descriptor.idProduct, ifnum);
44918 +
44919 +       for ( i=0 ; i < d->descriptor.bNumConfigurations ; i++ ) {
44920 +               if ( d->config+i == c ) goto configfound;
44921 +       }
44922 +
44923 +       printk(KERN_INFO "usb-midi: Config not found.\n");
44924 +
44925 +       return -EINVAL;
44926 +
44927 + configfound:
44928 +
44929 +       /* this may not be necessary. */
44930 +       if ( usb_set_configuration( d, c->bConfigurationValue ) < 0 ) {
44931 +               printk(KERN_INFO "usb-midi: Could not set config.\n");
44932 +               return -EINVAL;
44933 +       }
44934 +
44935 +       ret = usb_get_descriptor( d, USB_DT_CONFIG, i, buf, USB_DT_CONFIG_SIZE );
44936 +       if ( ret < 0 ) {
44937 +               printk(KERN_INFO "usb-midi: Could not get config (error=%d).\n", ret);
44938 +               return -EINVAL;
44939 +       }
44940 +       if ( buf[1] != USB_DT_CONFIG || buf[0] < USB_DT_CONFIG_SIZE ) {
44941 +               printk(KERN_INFO "usb-midi: config not as expected.\n");
44942 +               return -EINVAL;
44943 +       }
44944 +       bufSize = buf[2] | buf[3]<<8;
44945 +       buffer = (unsigned char *)kmalloc(sizeof(unsigned char)*bufSize, GFP_KERNEL);
44946 +       if ( !buffer ) {
44947 +               printk(KERN_INFO "usb-midi: Could not allocate memory.\n");
44948 +               return -EINVAL;
44949 +       }
44950 +       ret = usb_get_descriptor( d, USB_DT_CONFIG, i, buffer, bufSize );
44951 +       if ( ret < 0 ) {
44952 +               printk(KERN_INFO "usb-midi: Could not get full config (error=%d).\n", ret);
44953 +               kfree(buffer);
44954 +               return -EINVAL;
44955 +       }
44956 +
44957 +       u = parse_descriptor( d, buffer, bufSize, ifnum, alts, 1);
44958 +       kfree(buffer);
44959 +       if ( u == NULL ) {
44960 +               return -EINVAL;
44961 +       }
44962 +
44963 +       ret = alloc_usb_midi_device( d, s, u );
44964 +
44965 +       kfree(u);
44966 +
44967 +       return ret;
44968 +}
44969 +
44970 +
44971 +/** Scan table of known devices which are only partially compliant with 
44972 + * the MIDIStreaming specification.
44973 + * Called by usb_midi_probe();
44974 + *
44975 + **/
44976 +
44977 +static int detect_vendor_specific_device( struct usb_device *d, unsigned int ifnum, struct usb_midi_state *s )
44978 +{
44979 +       struct usb_midi_device *u;
44980 +       int i;
44981 +       int ret = -ENXIO;
44982 +
44983 +       for ( i=0; i<VENDOR_SPECIFIC_USB_MIDI_DEVICES ; i++ ) {
44984 +               u=&(usb_midi_devices[i]);
44985 +    
44986 +               if ( d->descriptor.idVendor != u->idVendor ||
44987 +                    d->descriptor.idProduct != u->idProduct ||
44988 +                    ifnum != u->interface )
44989 +                       continue;
44990 +
44991 +               ret = alloc_usb_midi_device( d, s, u );
44992 +               break;
44993 +       }
44994 +
44995 +       return ret;
44996 +}
44997 +
44998 +
44999 +/** Attempt to match any config of an interface to a MIDISTREAMING interface.
45000 + *  Returns 0 on success, negative on failure.
45001 + * Called by usb_midi_probe();
45002 + **/
45003 +static int detect_midi_subclass(struct usb_device *d, unsigned int ifnum, struct usb_midi_state *s)
45004 +{
45005 +       struct usb_config_descriptor    *c = d->actconfig;
45006 +       struct usb_interface_descriptor *interface;
45007 +       struct usb_midi_device *u;
45008 +       unsigned char buf[USB_DT_CONFIG_SIZE], *buffer;
45009 +       int bufSize;
45010 +       int i;
45011 +       int alts=-1;
45012 +       int ret;
45013 +
45014 +       for ( i=0 ; i < c->interface[ifnum].num_altsetting; i++ ) {
45015 +               interface = c->interface[ifnum].altsetting + i;
45016 +
45017 +               if ( interface->bInterfaceClass != USB_CLASS_AUDIO ||
45018 +                    interface->bInterfaceSubClass != USB_SUBCLASS_MIDISTREAMING )
45019 +                       continue;
45020 +               alts = i;
45021 +       }
45022 +       if ( alts == -1 ) {
45023 +               return -EINVAL;
45024 +       }
45025 +
45026 +       printk(KERN_INFO "usb-midi: Found MIDISTREAMING on dev %04x:%04x, iface %d\n",
45027 +              d->descriptor.idVendor, d->descriptor.idProduct, ifnum);
45028 +
45029 +       for ( i=0 ; i < d->descriptor.bNumConfigurations ; i++ ) {
45030 +               if ( d->config+i == c ) goto configfound;
45031 +       }
45032 +
45033 +       printk(KERN_INFO "usb-midi: Config not found.\n");
45034 +
45035 +       return -EINVAL;
45036 +
45037 + configfound:
45038 +
45039 +       /* this may not be necessary. */
45040 +       if ( usb_set_configuration( d, c->bConfigurationValue ) < 0 ) {
45041 +               printk(KERN_INFO "usb-midi: Could not set config.\n");
45042 +               return -EINVAL;
45043 +       }
45044 +
45045 +       /* From USB Spec v2.0, Section 9.5.
45046 +          If the class or vendor specific descriptors use the same format
45047 +          as standard descriptors (e.g., start with a length byte and
45048 +          followed by a type byte), they must be returned interleaved with
45049 +          standard descriptors in the configuration information returned by
45050 +          a GetDescriptor(Configuration) request. In this case, the class
45051 +          or vendor-specific descriptors must follow a related standard
45052 +          descriptor they modify or extend.
45053 +       */
45054 +
45055 +       ret = usb_get_descriptor( d, USB_DT_CONFIG, i, buf, USB_DT_CONFIG_SIZE );
45056 +       if ( ret < 0 ) {
45057 +               printk(KERN_INFO "usb-midi: Could not get config (error=%d).\n", ret);
45058 +               return -EINVAL;
45059 +       }
45060 +       if ( buf[1] != USB_DT_CONFIG || buf[0] < USB_DT_CONFIG_SIZE ) {
45061 +               printk(KERN_INFO "usb-midi: config not as expected.\n");
45062 +               return -EINVAL;
45063 +       }
45064 +       bufSize = buf[2] | buf[3]<<8;
45065 +       buffer = (unsigned char *)kmalloc(sizeof(unsigned char)*bufSize, GFP_KERNEL);
45066 +       if ( !buffer ) {
45067 +               printk(KERN_INFO "usb-midi: Could not allocate memory.\n");
45068 +               return -EINVAL;
45069 +       }
45070 +       ret = usb_get_descriptor( d, USB_DT_CONFIG, i, buffer, bufSize );
45071 +       if ( ret < 0 ) {
45072 +               printk(KERN_INFO "usb-midi: Could not get full config (error=%d).\n", ret);
45073 +               kfree(buffer);
45074 +               return -EINVAL;
45075 +       }
45076 +
45077 +       u = parse_descriptor( d, buffer, bufSize, ifnum, alts, 0);
45078 +       kfree(buffer);
45079 +       if ( u == NULL ) {
45080 +               return -EINVAL;
45081 +       }
45082 +
45083 +       ret = alloc_usb_midi_device( d, s, u );
45084 +
45085 +       kfree(u);
45086 +
45087 +       return ret;
45088 +}
45089 +
45090 +
45091 +/** When user has requested a specific device, match it exactly.
45092 + *
45093 + * Uses uvendor, uproduct, uinterface, ualt, umin, umout and ucable.
45094 + * Called by usb_midi_probe();
45095 + *
45096 + **/
45097 +static int detect_by_hand(struct usb_device *d, unsigned int ifnum, struct usb_midi_state *s)
45098 +{
45099 +       struct usb_midi_device u;
45100 +
45101 +       if ( d->descriptor.idVendor != uvendor ||
45102 +            d->descriptor.idProduct != uproduct ||
45103 +            ifnum != uinterface ) {
45104 +               return -EINVAL;
45105 +       }
45106 +
45107 +       if ( ualt < 0 ) { ualt = -1; }
45108 +
45109 +       if ( umin   < 0 || umin   > 15 ) { umin   = 0x01 | USB_DIR_IN; }
45110 +       if ( umout  < 0 || umout  > 15 ) { umout  = 0x01; }
45111 +       if ( ucable < 0 || ucable > 15 ) { ucable = 0; }
45112 +
45113 +       u.deviceName = 0; /* A flag for alloc_usb_midi_device to get device name
45114 +                            from device. */
45115 +       u.idVendor   = uvendor;
45116 +       u.idProduct  = uproduct;
45117 +       u.interface  = uinterface;
45118 +       u.altSetting = ualt;
45119 +
45120 +       u.in[0].endpoint    = umin;
45121 +       u.in[0].cableId     = (1<<ucable);
45122 +
45123 +       u.out[0].endpoint   = umout;
45124 +       u.out[0].cableId    = (1<<ucable);
45125 +
45126 +       return alloc_usb_midi_device( d, s, &u );
45127 +}
45128 +
45129 +
45130 +
45131 +/* ------------------------------------------------------------------------- */
45132 +
45133 +static void *usb_midi_probe(struct usb_device *dev, unsigned int ifnum,
45134 +                           const struct usb_device_id *id)
45135 +{
45136 +       struct usb_midi_state *s;
45137 +
45138 +       s = (struct usb_midi_state *)kmalloc(sizeof(struct usb_midi_state), GFP_KERNEL);
45139 +       if ( !s ) { return NULL; }
45140 +
45141 +       memset( s, 0, sizeof(struct usb_midi_state) );
45142 +       INIT_LIST_HEAD(&s->midiDevList);
45143 +       INIT_LIST_HEAD(&s->inEndpointList);
45144 +       INIT_LIST_HEAD(&s->outEndpointList);
45145 +       s->usbdev = dev;
45146 +       s->count  = 0;
45147 +       spin_lock_init(&s->lock);
45148 +
45149 +       if (
45150 +               detect_by_hand( dev, ifnum, s ) &&
45151 +               detect_midi_subclass( dev, ifnum, s ) &&
45152 +               detect_vendor_specific_device( dev, ifnum, s ) &&
45153 +               detect_yamaha_device( dev, ifnum, s) ) {
45154 +               kfree(s);
45155 +               return NULL;
45156 +       }
45157 +
45158 +       down(&open_sem);
45159 +       list_add_tail(&s->mididev, &mididevs);
45160 +       up(&open_sem);
45161 +
45162 +#ifdef MOD_INC_EACH_PROBE
45163 +       MOD_INC_USE_COUNT;
45164 +#endif
45165 +
45166 +       return s;
45167 +}
45168 +
45169 +
45170 +static void usb_midi_disconnect(struct usb_device *dev, void *ptr)
45171 +{
45172 +       struct usb_midi_state *s = (struct usb_midi_state *)ptr;
45173 +       struct list_head      *list;
45174 +       struct usb_mididev    *m;
45175 +
45176 +       if ( s == (struct usb_midi_state *)-1 ) {
45177 +               return;
45178 +       }
45179 +       if ( !s->usbdev ) {
45180 +               return;
45181 +       }
45182 +       down(&open_sem);
45183 +       list_del(&s->mididev);
45184 +       INIT_LIST_HEAD(&s->mididev);
45185 +       s->usbdev = NULL;
45186 +
45187 +       for ( list = s->midiDevList.next; list != &s->midiDevList; list = list->next ) {
45188 +               m = list_entry(list, struct usb_mididev, list);
45189 +               wake_up(&(m->min.ep->wait));
45190 +               wake_up(&(m->mout.ep->wait));
45191 +               if ( m->dev_midi >= 0 ) {
45192 +                       unregister_sound_midi(m->dev_midi);
45193 +               }
45194 +               m->dev_midi = -1;
45195 +       }
45196 +       release_midi_device(s);
45197 +       wake_up(&open_wait);
45198 +#ifdef MOD_INC_EACH_PROBE
45199 +       MOD_DEC_USE_COUNT;
45200 +#endif
45201 +
45202 +       return;
45203 +}
45204 +
45205 +
45206 +
45207 +static struct usb_driver usb_midi_driver = {
45208 +       name: "midi",
45209 +       probe: usb_midi_probe,
45210 +       disconnect: usb_midi_disconnect,
45211 +       id_table:       NULL,                   /* check all devices */
45212 +       driver_list: LIST_HEAD_INIT(usb_midi_driver.driver_list)
45213 +};
45214 +
45215 +/* ------------------------------------------------------------------------- */
45216 +
45217 +int __init usb_midi_init(void)
45218 +{
45219 +       if ( usb_register(&usb_midi_driver) < 0 )
45220 +               return -1;
45221 +
45222 +       return 0;
45223 +
45224 +}
45225 +
45226 +void __exit usb_midi_exit(void)
45227 +{
45228 +       usb_deregister(&usb_midi_driver);
45229 +}
45230 +
45231 +module_init(usb_midi_init) ;
45232 +module_exit(usb_midi_exit) ;
45233 +
45234 +#ifdef HAVE_ALSA_SUPPORT
45235 +#define SNDRV_MAIN_OBJECT_FILE
45236 +#include "../../include/driver.h"
45237 +#include "../../include/control.h"
45238 +#include "../../include/info.h"
45239 +#include "../../include/cs46xx.h"
45240 +
45241 +/* ------------------------------------------------------------------------- */
45242 +
45243 +static int snd_usbmidi_input_close(snd_rawmidi_substream_t * substream)
45244 +{
45245 +       return 0;
45246 +}
45247 +
45248 +static int snd_usbmidi_input_open(snd_rawmidi_substream_t * substream )
45249 +{
45250 +       return 0;
45251 +}
45252 +
45253 +static void snd_usbmidi_input_trigger(snd_rawmidi_substream_t * substream, int up)
45254 +{
45255 +       return 0;
45256 +}
45257 +
45258 +
45259 +/* ------------------------------------------------------------------------- */
45260 +
45261 +static int snd_usbmidi_output_close(snd_rawmidi_substream_t * substream)
45262 +{
45263 +       return 0;
45264 +}
45265 +
45266 +static int snd_usbmidi_output_open(snd_rawmidi_substream_t * substream)
45267 +{
45268 +       return 0;
45269 +}
45270 +
45271 +static void snd_usb_midi_output_trigger(snd_rawmidi_substream_t * substream,
45272 +                                       int up)
45273 +{
45274 +       return 0;
45275 +}
45276 +
45277 +/* ------------------------------------------------------------------------- */
45278 +
45279 +static snd_rawmidi_ops_t snd_usbmidi_output =
45280 +{
45281 +        open:           snd_usbmidi_output_open,
45282 +        close:          snd_usbmidi_output_close,
45283 +        trigger:        snd_usbmidi_output_trigger,
45284 +};
45285 +static snd_rawmidi_ops_t snd_usbmidi_input =
45286 +{
45287 +        open:           snd_usbmidi_input_open,
45288 +        close:          snd_usbmidi_input_close,
45289 +        trigger:        snd_usbmidi_input_trigger,
45290 +};
45291 +
45292 +int snd_usbmidi_midi(cs46xx_t *chip, int device, snd_rawmidi_t **rrawmidi)
45293 +{
45294 +       snd_rawmidi_t *rmidi;
45295 +       int err;
45296 +
45297 +       if (rrawmidi)
45298 +               *rrawmidi = NULL;
45299 +       if ((err = snd_rawmidi_new(chip->card, "USB-MIDI", device, 1, 1, &rmidi)) < 0)
45300 +               return err;
45301 +       strcpy(rmidi->name, "USB-MIDI");
45302 +
45303 +       snd_rawmidi_set_ops( rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, &snd_usbmidi_output );
45304 +       snd_rawmidi_set_ops( rmidi, SNDRV_RAWMIDI_STREAM_INPUT, &snd_usbmidi_input );
45305 +
45306 +       rmidi->info_flags |= SNDRV_RAWMIDI_INFO_OUTPUT | SNDRV_RAWMIDI_INFO_INPUT | SNDRV_RAWMIDI_INFO_DUPLEX;
45307 +
45308 +       rmidi->private_data = chip;
45309 +       chip->rmidi = rmidi;
45310 +       if (rrawmidi)
45311 +               *rrawmidi = NULL;
45312 +
45313 +       return 0;
45314 +}
45315 +
45316 +int snd_usbmidi_create( snd_card_t * card,
45317 +                       struct pci_dev * pci,
45318 +                       usbmidi_t ** rchip )
45319 +{
45320 +       usbmidi_t *chip;
45321 +       int err, idx;
45322 +       snd_region_t *region;
45323 +       static snd_device_opt_t ops = {
45324 +               dev_free: snd_usbmidi_dev_free,
45325 +       };
45326 +
45327 +       *rchip = NULL;
45328 +       chip = snd_magic_kcalloc( usbmidi_t, 0, GFP_KERNEL );
45329 +       if ( chip == NULL )
45330 +               return -ENOMEM;
45331 +}
45332 +
45333 +EXPORT_SYMBOL(snd_usbmidi_create);
45334 +EXPORT_SYMBOL(snd_usbmidi_midi);
45335 +#endif /* HAVE_ALSA_SUPPORT */
45336 +
45337 diff -Nur linux-2.4.19.old/drivers/usb/usb-midi.h linux-2.4.19/drivers/usb/usb-midi.h
45338 --- linux-2.4.19.old/drivers/usb/usb-midi.h     Thu Jan  1 01:00:00 1970
45339 +++ linux-2.4.19/drivers/usb/usb-midi.h Mon Nov 25 12:27:12 2002
45340 @@ -0,0 +1,143 @@
45341 +/*
45342 +  usb-midi.h  --  USB-MIDI driver
45343 +
45344 +  Copyright (C) 2001
45345 +      NAGANO Daisuke <breeze.nagano@nifty.ne.jp>
45346 +
45347 +  This program is free software; you can redistribute it and/or modify
45348 +  it under the terms of the GNU General Public License as published by
45349 +  the Free Software Foundation; either version 2, or (at your option)
45350 +  any later version.
45351 +
45352 +  This program is distributed in the hope that it will be useful,
45353 +  but WITHOUT ANY WARRANTY; without even the implied warranty of
45354 +  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
45355 +  GNU General Public License for more details.
45356 +
45357 +  You should have received a copy of the GNU General Public License
45358 +  along with this program; if not, write to the Free Software
45359 +  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
45360 + */
45361 +
45362 +/* ------------------------------------------------------------------------- */
45363 +
45364 +#ifndef _USB_MIDI_H_
45365 +#define _USB_MIDI_H_
45366 +
45367 +#ifndef USB_SUBCLASS_MIDISTREAMING
45368 +#define USB_SUBCLASS_MIDISTREAMING     3
45369 +#endif
45370 +
45371 +#define USB_DT_CS_DEVICE               0x21
45372 +#define USB_DT_CS_CONFIG               0x22
45373 +#define USB_DT_CS_STRING               0x23
45374 +#define USB_DT_CS_INTERFACE            0x24
45375 +#define USB_DT_CS_ENDPOINT             0x25
45376 +
45377 +/* ------------------------------------------------------------------------- */
45378 +/* Roland MIDI Devices */
45379 +
45380 +#define USB_VENDOR_ID_ROLAND           0x0582
45381 +#define USBMIDI_ROLAND_UA100G          0x0000
45382 +#define USBMIDI_ROLAND_MPU64           0x0002
45383 +#define USBMIDI_ROLAND_SC8850          0x0003
45384 +#define USBMIDI_ROLAND_UM2             0x0005
45385 +#define USBMIDI_ROLAND_UM1             0x0009
45386 +#define USBMIDI_ROLAND_PC300           0x0008
45387 +
45388 +/* YAMAHA MIDI Devices */
45389 +#define USB_VENDOR_ID_YAMAHA           0x0499
45390 +#define USBMIDI_YAMAHA_MU1000          0x1001
45391 +
45392 +/* Steinberg MIDI Devices */
45393 +#define USB_VENDOR_ID_STEINBERG                0x0763
45394 +#define USBMIDI_STEINBERG_USB2MIDI     0x1001
45395 +
45396 +/* ------------------------------------------------------------------------- */
45397 +/* Supported devices */
45398 +
45399 +struct usb_midi_endpoint {
45400 +       int  endpoint;
45401 +       int  cableId; /* if bit-n == 1 then cableId-n is enabled (n: 0 - 15) */
45402 +};
45403 +
45404 +struct usb_midi_device {
45405 +       char  *deviceName;
45406 +
45407 +       int    idVendor;
45408 +       int    idProduct;
45409 +       int    interface;
45410 +       int    altSetting; /* -1: auto detect */
45411 +
45412 +       struct usb_midi_endpoint in[15];
45413 +       struct usb_midi_endpoint out[15];
45414 +};
45415 +
45416 +static struct usb_midi_device usb_midi_devices[] = {
45417 +  { /* Roland UM-1 */
45418 +    "Roland UM-1",
45419 +    USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM1, 2, -1,
45420 +    { { 0x81, 1 }, {-1, -1} },
45421 +    { { 0x01, 1,}, {-1, -1} },
45422 +  },
45423 +
45424 +  { /* Roland UM-2 */
45425 +    "Roland UM-2" ,
45426 +    USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM2, 2, -1,
45427 +    { { 0x81, 3 }, {-1, -1} },
45428 +    { { 0x01, 3,}, {-1, -1} },
45429 +  },
45430 +
45431 +/** Next entry courtesy research by Michael Minn <michael@michaelminn.com> **/
45432 +  { /* Roland UA-100 */
45433 +    "Roland UA-100",
45434 +    USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UA100G, 2, -1,
45435 +    { { 0x82, 7 }, {-1, -1} }, /** cables 0,1 and 2 for SYSEX **/
45436 +    { { 0x02, 7 }, {-1, -1} },
45437 +  },
45438 +
45439 +/** Next entry courtesy research by Michael Minn <michael@michaelminn.com> **/
45440 +  { /* Roland SC8850 */
45441 +    "Roland SC8850",
45442 +    USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8850, 2, -1,
45443 +    { { 0x81, 15 }, {-1, -1} }, /** cables 0,1,2, and 3 **/
45444 +    { { 0x01, 15 }, {-1, -1} },
45445 +  },
45446 +
45447 +  { /* YAMAHA MU1000 */
45448 +    "YAMAHA MU1000",
45449 +    USB_VENDOR_ID_YAMAHA, USBMIDI_YAMAHA_MU1000, 0, -1, 
45450 +    { { 0x81, 1 }, {-1, -1} },
45451 +    { { 0x01, 15 }, {-1, -1} },
45452 +  },
45453 +  { /* Roland PC-300 */
45454 +    "Roland PC-300",
45455 +    USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_PC300, 2, -1, 
45456 +    { { 0x81, 1 }, {-1, -1} },
45457 +    { { 0x01, 1 }, {-1, -1} },
45458 +  }
45459 +};
45460 +
45461 +#define VENDOR_SPECIFIC_USB_MIDI_DEVICES (sizeof(usb_midi_devices)/sizeof(struct usb_midi_device))
45462 +
45463 +/* for Hot-Plugging */
45464 +
45465 +static struct usb_device_id usb_midi_ids [] = {
45466 +       { match_flags: (USB_DEVICE_ID_MATCH_INT_CLASS | USB_DEVICE_ID_MATCH_INT_SUBCLASS),
45467 +         bInterfaceClass: USB_CLASS_AUDIO, bInterfaceSubClass: USB_SUBCLASS_MIDISTREAMING},
45468 +       { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM1    ) },
45469 +       { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM2    ) },
45470 +       { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UA100G ) },
45471 +       { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_PC300 ) },
45472 +       { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8850 ) },
45473 +       { USB_DEVICE( USB_VENDOR_ID_YAMAHA, USBMIDI_YAMAHA_MU1000 ) },
45474 +/*     { USB_DEVICE( USB_VENDOR_ID_STEINBERG, USBMIDI_STEINBERG_USB2MIDI ) },*/
45475 +       { } /* Terminating entry */
45476 +};
45477 +
45478 +MODULE_DEVICE_TABLE (usb, usb_midi_ids);
45479 +
45480 +/* ------------------------------------------------------------------------- */
45481 +#endif /* _USB_MIDI_H_ */
45482 +
45483 +
45484 diff -Nur linux-2.4.19.old/drivers/usb/usb-ohci.c linux-2.4.19/drivers/usb/usb-ohci.c
45485 --- linux-2.4.19.old/drivers/usb/usb-ohci.c     Sat Aug  3 02:39:45 2002
45486 +++ linux-2.4.19/drivers/usb/usb-ohci.c Mon Nov 25 12:27:12 2002
45487 @@ -78,6 +78,7 @@
45488  
45489  #include "usb-ohci.h"
45490  
45491 +#include "hcd.h"
45492  
45493  #ifdef CONFIG_PMAC_PBOOK
45494  #include <asm/machdep.h>
45495 @@ -178,7 +179,7 @@
45496         kfree (urb_priv);
45497  }
45498   
45499 -static void urb_rm_priv_locked (urb_t * urb) 
45500 +static void urb_rm_priv_locked (struct urb * urb) 
45501  {
45502         urb_priv_t * urb_priv = urb->hcpriv;
45503         
45504 @@ -212,7 +213,7 @@
45505         }
45506  }
45507  
45508 -static void urb_rm_priv (urb_t * urb)
45509 +static void urb_rm_priv (struct urb * urb)
45510  {
45511         unsigned long flags;
45512  
45513 @@ -229,7 +230,7 @@
45514  /* debug| print the main components of an URB     
45515   * small: 0) header + data packets 1) just header */
45516   
45517 -static void urb_print (urb_t * urb, char * str, int small)
45518 +static void urb_print (struct urb * urb, char * str, int small)
45519  {
45520         unsigned int pipe= urb->pipe;
45521         
45522 @@ -384,6 +385,8 @@
45523         __u32                   temp, ndp, i;
45524  
45525         temp = roothub_a (controller);
45526 +       if (temp == ~(u32)0)
45527 +               return;
45528         ndp = (temp & RH_A_NDP);
45529  
45530         if (verbose) {
45531 @@ -458,10 +461,10 @@
45532  
45533  /* return a request to the completion handler */
45534   
45535 -static int sohci_return_urb (struct ohci *hc, urb_t * urb)
45536 +static int sohci_return_urb (struct ohci *hc, struct urb * urb)
45537  {
45538         urb_priv_t * urb_priv = urb->hcpriv;
45539 -       urb_t * urbt;
45540 +       struct urb * urbt;
45541         unsigned long flags;
45542         int i;
45543         
45544 @@ -536,7 +539,7 @@
45545  
45546  /* get a transfer request */
45547   
45548 -static int sohci_submit_urb (urb_t * urb)
45549 +static int sohci_submit_urb (struct urb * urb)
45550  {
45551         ohci_t * ohci;
45552         ed_t * ed;
45553 @@ -720,7 +723,7 @@
45554  /* deactivate all TDs and remove the private part of the URB */
45555  /* interrupt callers must use async unlink mode */
45556  
45557 -static int sohci_unlink_urb (urb_t * urb)
45558 +static int sohci_unlink_urb (struct urb * urb)
45559  {
45560         unsigned long flags;
45561         ohci_t * ohci;
45562 @@ -1295,7 +1298,7 @@
45563  static void
45564  td_fill (ohci_t * ohci, unsigned int info,
45565         dma_addr_t data, int len,
45566 -       urb_t * urb, int index)
45567 +       struct urb * urb, int index)
45568  {
45569         volatile td_t  * td, * td_pt;
45570         urb_priv_t * urb_priv = urb->hcpriv;
45571 @@ -1344,7 +1347,7 @@
45572   
45573  /* prepare all TDs of a transfer */
45574  
45575 -static void td_submit_urb (urb_t * urb)
45576 +static void td_submit_urb (struct urb * urb)
45577  { 
45578         urb_priv_t * urb_priv = urb->hcpriv;
45579         ohci_t * ohci = (ohci_t *) urb->dev->bus->hcpriv;
45580 @@ -1457,7 +1460,7 @@
45581  {
45582         __u32 tdINFO, tdBE, tdCBP;
45583         __u16 tdPSW;
45584 -       urb_t * urb = td->urb;
45585 +       struct urb * urb = td->urb;
45586         urb_priv_t * urb_priv = urb->hcpriv;
45587         int dlen = 0;
45588         int cc = 0;
45589 @@ -1498,7 +1501,7 @@
45590  
45591  /* handle an urb that is being unlinked */
45592  
45593 -static void dl_del_urb (urb_t * urb)
45594 +static void dl_del_urb (struct urb * urb)
45595  {
45596         wait_queue_head_t * wait_head = ((urb_priv_t *)(urb->hcpriv))->wait;
45597  
45598 @@ -1510,6 +1513,8 @@
45599                         urb->complete (urb);
45600         } else {
45601                 urb->status = -ENOENT;
45602 +               if (urb->complete)
45603 +                       urb->complete (urb);
45604  
45605                 /* unblock sohci_unlink_urb */
45606                 if (wait_head)
45607 @@ -1587,7 +1592,7 @@
45608                 td_p = &ed->hwHeadP;
45609  
45610                 for (td = tdHeadP; td != tdTailP; td = td_next) { 
45611 -                       urb_t * urb = td->urb;
45612 +                       struct urb * urb = td->urb;
45613                         urb_priv_t * urb_priv = td->urb->hcpriv;
45614                         
45615                         td_next = dma_to_td (ohci, le32_to_cpup (&td->hwNextTD) & 0xfffffff0);
45616 @@ -1626,11 +1631,6 @@
45617                         if (tdHeadP == tdTailP) {
45618                                 if (ed->state == ED_OPER)
45619                                         ep_unlink(ohci, ed);
45620 -                               td_free (ohci, tdTailP);
45621 -                               ed->hwINFO = cpu_to_le32 (OHCI_ED_SKIP);
45622 -                               ed->state = ED_NEW;
45623 -                               hash_free_ed(ohci, ed);
45624 -                               --(usb_to_ohci (ohci->dev[edINFO & 0x7F]))->ed_cnt;
45625                         } else
45626                                 ed->hwINFO &= ~cpu_to_le32 (OHCI_ED_SKIP);
45627                 }
45628 @@ -1675,7 +1675,7 @@
45629         td_t * td_list_next = NULL;
45630         ed_t * ed;
45631         int cc = 0;
45632 -       urb_t * urb;
45633 +       struct urb * urb;
45634         urb_priv_t * urb_priv;
45635         __u32 tdINFO, edHeadP, edTailP;
45636         
45637 @@ -1851,7 +1851,7 @@
45638  {
45639         int len; 
45640  
45641 -       urb_t * urb = (urb_t *) ptr;
45642 +       struct urb * urb = (struct urb *) ptr;
45643         ohci_t * ohci = urb->dev->bus->hcpriv;
45644  
45645         if (ohci->disabled)
45646 @@ -1880,7 +1880,7 @@
45647  
45648  /* Root Hub INTs are polled by this timer */
45649  
45650 -static int rh_init_int_timer (urb_t * urb) 
45651 +static int rh_init_int_timer (struct urb * urb) 
45652  {
45653         ohci_t * ohci = urb->dev->bus->hcpriv;
45654  
45655 @@ -1905,12 +1905,12 @@
45656  
45657  /* request to virtual root hub */
45658  
45659 -static int rh_submit_urb (urb_t * urb)
45660 +static int rh_submit_urb (struct urb * urb)
45661  {
45662         struct usb_device * usb_dev = urb->dev;
45663         ohci_t * ohci = usb_dev->bus->hcpriv;
45664         unsigned int pipe = urb->pipe;
45665 -       devrequest * cmd = (devrequest *) urb->setup_packet;
45666 +       struct usb_ctrlrequest * cmd = (struct usb_ctrlrequest *) urb->setup_packet;
45667         void * data = urb->transfer_buffer;
45668         int leni = urb->transfer_buffer_length;
45669         int len = 0;
45670 @@ -1934,10 +1934,10 @@
45671                 return 0;
45672         }
45673  
45674 -       bmRType_bReq  = cmd->requesttype | (cmd->request << 8);
45675 -       wValue        = le16_to_cpu (cmd->value);
45676 -       wIndex        = le16_to_cpu (cmd->index);
45677 -       wLength       = le16_to_cpu (cmd->length);
45678 +       bmRType_bReq  = cmd->bRequestType | (cmd->bRequest << 8);
45679 +       wValue        = le16_to_cpu (cmd->wValue);
45680 +       wIndex        = le16_to_cpu (cmd->wIndex);
45681 +       wLength       = le16_to_cpu (cmd->wLength);
45682  
45683         switch (bmRType_bReq) {
45684         /* Request Destination:
45685 @@ -2111,7 +2111,7 @@
45686  
45687  /*-------------------------------------------------------------------------*/
45688  
45689 -static int rh_unlink_urb (urb_t * urb)
45690 +static int rh_unlink_urb (struct urb * urb)
45691  {
45692         ohci_t * ohci = urb->dev->bus->hcpriv;
45693   
45694 @@ -2144,6 +2144,8 @@
45695         int timeout = 30;
45696         int smm_timeout = 50; /* 0,5 sec */
45697                 
45698 +#ifndef __hppa__
45699 +       /* PA-RISC doesn't have SMM, but PDC might leave IR set */
45700         if (readl (&ohci->regs->control) & OHCI_CTRL_IR) { /* SMM owns the HC */
45701                 writel (OHCI_OCR, &ohci->regs->cmdstatus); /* request ownership */
45702                 dbg("USB HC TakeOver from SMM");
45703 @@ -2154,7 +2156,8 @@
45704                                 return -1;
45705                         }
45706                 }
45707 -       }       
45708 +       }
45709 +#endif 
45710                 
45711         /* Disable HC interrupts */
45712         writel (OHCI_INTR_MIE, &ohci->regs->intrdisable);
45713 @@ -2218,9 +2221,19 @@
45714         writel (mask, &ohci->regs->intrstatus);
45715  
45716  #ifdef OHCI_USE_NPS
45717 -       /* required for AMD-756 and some Mac platforms */
45718 -       writel ((roothub_a (ohci) | RH_A_NPS) & ~RH_A_PSM,
45719 -               &ohci->regs->roothub.a);
45720 +       if(ohci->flags & OHCI_QUIRK_SUCKYIO)
45721 +       {
45722 +               /* NSC 87560 at least requires different setup .. */
45723 +               writel ((roothub_a (ohci) | RH_A_NOCP) &
45724 +                       ~(RH_A_OCPM | RH_A_POTPGT | RH_A_PSM | RH_A_NPS),
45725 +                       &ohci->regs->roothub.a);
45726 +       }
45727 +       else
45728 +       {
45729 +               /* required for AMD-756 and some Mac platforms */
45730 +               writel ((roothub_a (ohci) | RH_A_NPS) & ~RH_A_PSM,
45731 +                       &ohci->regs->roothub.a);
45732 +       }
45733         writel (RH_HS_LPSC, &ohci->regs->roothub.status);
45734  #endif /* OHCI_USE_NPS */
45735  
45736 @@ -2288,9 +2301,19 @@
45737         struct ohci_regs * regs = ohci->regs;
45738         int ints; 
45739  
45740 -       if ((ohci->hcca->done_head != 0) && !(le32_to_cpup (&ohci->hcca->done_head) & 0x01)) {
45741 +       /* avoid (slow) readl if only WDH happened */
45742 +       if ((ohci->hcca->done_head != 0)
45743 +                       && !(le32_to_cpup (&ohci->hcca->done_head) & 0x01)) {
45744                 ints =  OHCI_INTR_WDH;
45745 -       } else if ((ints = (readl (&regs->intrstatus) & readl (&regs->intrenable))) == 0) {
45746 +
45747 +       /* cardbus/... hardware gone before remove() */
45748 +       } else if ((ints = readl (&regs->intrstatus)) == ~(u32)0) {
45749 +               ohci->disabled++;
45750 +               err ("%s device removed!", ohci->ohci_dev->slot_name);
45751 +               return;
45752 +
45753 +       /* interrupt for some other device? */
45754 +       } else if ((ints &= readl (&regs->intrenable)) == 0) {
45755                 return;
45756         } 
45757  
45758 @@ -2391,6 +2414,7 @@
45759                 kfree (ohci);
45760                 return NULL;
45761         }
45762 +       ohci->bus->bus_name = dev->slot_name;
45763         ohci->bus->hcpriv = (void *) ohci;
45764  
45765         return ohci;
45766 @@ -2418,8 +2442,9 @@
45767         }
45768         pci_set_drvdata(ohci->ohci_dev, NULL);
45769         if (ohci->bus) {
45770 -               if (ohci->bus->busnum)
45771 +               if (ohci->bus->busnum != -1)
45772                         usb_deregister_bus (ohci->bus);
45773 +
45774                 usb_free_bus (ohci->bus);
45775         }
45776  
45777 @@ -2448,7 +2473,6 @@
45778         void *mem_base, const struct pci_device_id *id)
45779  {
45780         ohci_t * ohci;
45781 -       u8 latency, limit;
45782         char buf[8], *bufp = buf;
45783         int ret;
45784  
45785 @@ -2470,23 +2494,24 @@
45786                 return ret;
45787         }
45788         ohci->flags = id->driver_data;
45789 +       
45790 +       /* Check for NSC87560. We have to look at the bridge (fn1) to identify
45791 +          the USB (fn2). This quirk might apply to more or even all NSC stuff
45792 +          I don't know.. */
45793 +          
45794 +       if(dev->vendor == PCI_VENDOR_ID_NS)
45795 +       {
45796 +               struct pci_dev *fn1  = pci_find_slot(dev->bus->number, PCI_DEVFN(PCI_SLOT(dev->devfn), 1));
45797 +               if(fn1 && fn1->vendor == PCI_VENDOR_ID_NS && fn1->device == PCI_DEVICE_ID_NS_87560_LIO)
45798 +                       ohci->flags |= OHCI_QUIRK_SUCKYIO;
45799 +               
45800 +       }
45801 +       
45802 +       if (ohci->flags & OHCI_QUIRK_SUCKYIO)
45803 +               printk (KERN_INFO __FILE__ ": Using NSC SuperIO setup\n");
45804         if (ohci->flags & OHCI_QUIRK_AMD756)
45805                 printk (KERN_INFO __FILE__ ": AMD756 erratum 4 workaround\n");
45806  
45807 -       /* bad pci latencies can contribute to overruns */ 
45808 -       pci_read_config_byte (dev, PCI_LATENCY_TIMER, &latency);
45809 -       if (latency) {
45810 -               pci_read_config_byte (dev, PCI_MAX_LAT, &limit);
45811 -               if (limit && limit < latency) {
45812 -                       dbg ("PCI latency reduced to max %d", limit);
45813 -                       pci_write_config_byte (dev, PCI_LATENCY_TIMER, limit);
45814 -                       ohci->pci_latency = limit;
45815 -               } else {
45816 -                       /* it might already have been reduced */
45817 -                       ohci->pci_latency = latency;
45818 -               }
45819 -       }
45820 -
45821         if (hc_reset (ohci) < 0) {
45822                 hc_release_ohci (ohci);
45823                 return -ENODEV;
45824 diff -Nur linux-2.4.19.old/drivers/usb/usb-ohci.h linux-2.4.19/drivers/usb/usb-ohci.h
45825 --- linux-2.4.19.old/drivers/usb/usb-ohci.h     Sat Aug  3 02:39:45 2002
45826 +++ linux-2.4.19/drivers/usb/usb-ohci.h Mon Nov 25 12:27:12 2002
45827 @@ -111,7 +111,7 @@
45828         __u8 index;
45829         struct ed * ed;
45830         struct td * next_dl_td;
45831 -       urb_t * urb;
45832 +       struct urb * urb;
45833  
45834         dma_addr_t td_dma;
45835         dma_addr_t data_dma;
45836 @@ -381,6 +381,7 @@
45837         atomic_t resume_count;          /* defending against multiple resumes */
45838         unsigned long flags;            /* for HC bugs */
45839  #define        OHCI_QUIRK_AMD756       0x01            /* erratum #4 */
45840 +#define OHCI_QUIRK_SUCKYIO     0x02            /* NSC superio */
45841  
45842         struct ohci_regs * regs;        /* OHCI controller's memory */
45843         struct list_head ohci_hcd_list; /* list of all ohci_hcd */
45844 @@ -430,12 +431,12 @@
45845  static ed_t * ep_add_ed(struct usb_device * usb_dev, unsigned int pipe, int interval, int load, int mem_flags);
45846  static void ep_rm_ed(struct usb_device * usb_dev, ed_t * ed);
45847  /* td */
45848 -static void td_fill(ohci_t * ohci, unsigned int info, dma_addr_t data, int len, urb_t * urb, int index);
45849 -static void td_submit_urb(urb_t * urb);
45850 +static void td_fill(ohci_t * ohci, unsigned int info, dma_addr_t data, int len, struct urb * urb, int index);
45851 +static void td_submit_urb(struct urb * urb);
45852  /* root hub */
45853 -static int rh_submit_urb(urb_t * urb);
45854 -static int rh_unlink_urb(urb_t * urb);
45855 -static int rh_init_int_timer(urb_t * urb);
45856 +static int rh_submit_urb(struct urb * urb);
45857 +static int rh_unlink_urb(struct urb * urb);
45858 +static int rh_init_int_timer(struct urb * urb);
45859  
45860  /*-------------------------------------------------------------------------*/
45861  
45862 diff -Nur linux-2.4.19.old/drivers/usb/usb-uhci.c linux-2.4.19/drivers/usb/usb-uhci.c
45863 --- linux-2.4.19.old/drivers/usb/usb-uhci.c     Sat Aug  3 02:39:45 2002
45864 +++ linux-2.4.19/drivers/usb/usb-uhci.c Mon Nov 25 12:27:12 2002
45865 @@ -59,6 +59,8 @@
45866  #include "usb-uhci.h"
45867  #include "usb-uhci-debug.h"
45868  
45869 +#include "hcd.h"
45870 +
45871  /*
45872   * Version Information
45873   */
45874 @@ -117,12 +119,12 @@
45875  // Suppress HC interrupt error messages for 5s
45876  #define ERROR_SUPPRESSION_TIME (HZ*5)
45877  
45878 -_static int rh_submit_urb (urb_t *urb);
45879 -_static int rh_unlink_urb (urb_t *urb);
45880 +_static int rh_submit_urb (struct urb *urb);
45881 +_static int rh_unlink_urb (struct urb *urb);
45882  _static int delete_qh (uhci_t *s, uhci_desc_t *qh);
45883 -_static int process_transfer (uhci_t *s, urb_t *urb, int mode);
45884 -_static int process_interrupt (uhci_t *s, urb_t *urb);
45885 -_static int process_iso (uhci_t *s, urb_t *urb, int force);
45886 +_static int process_transfer (uhci_t *s, struct urb *urb, int mode);
45887 +_static int process_interrupt (uhci_t *s, struct urb *urb);
45888 +_static int process_iso (uhci_t *s, struct urb *urb, int force);
45889  
45890  // How much URBs with ->next are walked
45891  #define MAX_NEXT_COUNT 2048
45892 @@ -168,7 +170,7 @@
45893  }
45894  /*-------------------------------------------------------------------*/
45895  #ifdef CONFIG_USB_UHCI_HIGH_BANDWIDTH
45896 -_static void enable_desc_loop(uhci_t *s, urb_t *urb)
45897 +_static void enable_desc_loop(uhci_t *s, struct urb *urb)
45898  {
45899         unsigned long flags;
45900  
45901 @@ -183,7 +185,7 @@
45902         spin_unlock_irqrestore (&s->qh_lock, flags);
45903  }
45904  /*-------------------------------------------------------------------*/
45905 -_static void disable_desc_loop(uhci_t *s, urb_t *urb)
45906 +_static void disable_desc_loop(uhci_t *s, struct urb *urb)
45907  {
45908         unsigned long flags;
45909  
45910 @@ -204,7 +206,7 @@
45911  }
45912  #endif
45913  /*-------------------------------------------------------------------*/
45914 -_static void queue_urb_unlocked (uhci_t *s, urb_t *urb)
45915 +_static void queue_urb_unlocked (uhci_t *s, struct urb *urb)
45916  {
45917         struct list_head *p=&urb->urb_list;
45918  #ifdef CONFIG_USB_UHCI_HIGH_BANDWIDTH
45919 @@ -224,7 +226,7 @@
45920         uhci_switch_timer_int(s);
45921  }
45922  /*-------------------------------------------------------------------*/
45923 -_static void queue_urb (uhci_t *s, urb_t *urb)
45924 +_static void queue_urb (uhci_t *s, struct urb *urb)
45925  {
45926         unsigned long flags=0;
45927  
45928 @@ -233,7 +235,7 @@
45929         spin_unlock_irqrestore (&s->urb_list_lock, flags);
45930  }
45931  /*-------------------------------------------------------------------*/
45932 -_static void dequeue_urb (uhci_t *s, urb_t *urb)
45933 +_static void dequeue_urb (uhci_t *s, struct urb *urb)
45934  {
45935  #ifdef CONFIG_USB_UHCI_HIGH_BANDWIDTH
45936         int type;
45937 @@ -698,7 +700,7 @@
45938  //                         LOW LEVEL STUFF
45939  //          assembles QHs und TDs for control, bulk and iso
45940  /*-------------------------------------------------------------------*/
45941 -_static int uhci_submit_control_urb (urb_t *urb)
45942 +_static int uhci_submit_control_urb (struct urb *urb)
45943  {
45944         uhci_desc_t *qh, *td;
45945         uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
45946 @@ -815,7 +817,7 @@
45947  // For queued bulk transfers, two additional QH helpers are allocated (nqh, bqh)
45948  // Due to the linking with other bulk urbs, it has to be locked with urb_list_lock!
45949  
45950 -_static int uhci_submit_bulk_urb (urb_t *urb, urb_t *bulk_urb)
45951 +_static int uhci_submit_bulk_urb (struct urb *urb, struct urb *bulk_urb)
45952  {
45953         uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
45954         urb_priv_t *urb_priv = urb->hcpriv, *upriv, *bpriv=NULL;
45955 @@ -977,7 +979,7 @@
45956   looks a bit complicated because of all the bulk queueing goodies
45957  */
45958  
45959 -_static void uhci_clean_transfer (uhci_t *s, urb_t *urb, uhci_desc_t *qh, int mode)
45960 +_static void uhci_clean_transfer (uhci_t *s, struct urb *urb, uhci_desc_t *qh, int mode)
45961  {
45962         uhci_desc_t *bqh, *nqh, *prevqh, *prevtd;
45963         int now;
45964 @@ -1031,7 +1033,7 @@
45965                        urb, priv->prev_queued_urb,  priv->next_queued_urb, qh, bqh, priv->next_qh);     
45966                 
45967                 if (mode != CLEAN_TRANSFER_DELETION_MARK) {     // no work for cleanup at unlink-completion
45968 -                       urb_t *nurb;
45969 +                       struct urb *nurb;
45970                         unsigned long flags;
45971  
45972                         nurb = priv->next_queued_urb;
45973 @@ -1069,7 +1071,7 @@
45974  }
45975  /*-------------------------------------------------------------------*/
45976  // Release bandwidth for Interrupt or Isoc. transfers 
45977 -_static void uhci_release_bandwidth(urb_t *urb)
45978 +_static void uhci_release_bandwidth(struct urb *urb)
45979  {       
45980         if (urb->bandwidth) {
45981                 switch (usb_pipetype(urb->pipe)) {
45982 @@ -1085,11 +1087,11 @@
45983         }       
45984  }
45985  
45986 -_static void uhci_urb_dma_sync(uhci_t *s, urb_t *urb, urb_priv_t *urb_priv)
45987 +_static void uhci_urb_dma_sync(uhci_t *s, struct urb *urb, urb_priv_t *urb_priv)
45988  {
45989         if (urb_priv->setup_packet_dma)
45990                 pci_dma_sync_single(s->uhci_pci, urb_priv->setup_packet_dma,
45991 -                                   sizeof(devrequest), PCI_DMA_TODEVICE);
45992 +                                   sizeof(struct usb_ctrlrequest), PCI_DMA_TODEVICE);
45993  
45994         if (urb_priv->transfer_buffer_dma)
45995                 pci_dma_sync_single(s->uhci_pci, urb_priv->transfer_buffer_dma,
45996 @@ -1099,11 +1101,11 @@
45997                                     PCI_DMA_TODEVICE);
45998  }
45999  
46000 -_static void uhci_urb_dma_unmap(uhci_t *s, urb_t *urb, urb_priv_t *urb_priv)
46001 +_static void uhci_urb_dma_unmap(uhci_t *s, struct urb *urb, urb_priv_t *urb_priv)
46002  {
46003         if (urb_priv->setup_packet_dma) {
46004                 pci_unmap_single(s->uhci_pci, urb_priv->setup_packet_dma,
46005 -                                sizeof(devrequest), PCI_DMA_TODEVICE);
46006 +                                sizeof(struct usb_ctrlrequest), PCI_DMA_TODEVICE);
46007                 urb_priv->setup_packet_dma = 0;
46008         }
46009         if (urb_priv->transfer_buffer_dma) {
46010 @@ -1120,7 +1122,7 @@
46011     mode: UNLINK_ASYNC_STORE_URB: unlink and move URB into unlinked list
46012           UNLINK_ASYNC_DONT_STORE: unlink, don't move URB into unlinked list
46013  */
46014 -_static int uhci_unlink_urb_async (uhci_t *s,urb_t *urb, int mode)
46015 +_static int uhci_unlink_urb_async (uhci_t *s,struct urb *urb, int mode)
46016  {
46017         uhci_desc_t *qh;
46018         urb_priv_t *urb_priv;
46019 @@ -1165,7 +1167,7 @@
46020  }
46021  /*-------------------------------------------------------------------*/
46022  // kills an urb by unlinking descriptors and waiting for at least one frame
46023 -_static int uhci_unlink_urb_sync (uhci_t *s, urb_t *urb)
46024 +_static int uhci_unlink_urb_sync (uhci_t *s, struct urb *urb)
46025  {
46026         uhci_desc_t *qh;
46027         urb_priv_t *urb_priv;
46028 @@ -1176,7 +1178,7 @@
46029  
46030         if (urb->status == -EINPROGRESS) {
46031  
46032 -               // move descriptors out the the running chains, dequeue urb
46033 +               // move descriptors out of the running chains, dequeue urb
46034                 uhci_unlink_urb_async(s, urb, UNLINK_ASYNC_DONT_STORE);
46035  
46036                 urb_priv = urb->hcpriv;
46037 @@ -1229,7 +1231,7 @@
46038  _static void uhci_cleanup_unlink(uhci_t *s, int force)
46039  {
46040         struct list_head *q;
46041 -       urb_t *urb;
46042 +       struct urb *urb;
46043         struct usb_device *dev;
46044         int now, type;
46045         urb_priv_t *urb_priv;
46046 @@ -1239,7 +1241,7 @@
46047  
46048         while (q != &s->urb_unlinked) {
46049  
46050 -               urb = list_entry (q, urb_t, urb_list);
46051 +               urb = list_entry (q, struct urb, urb_list);
46052  
46053                 urb_priv = (urb_priv_t*)urb->hcpriv;
46054                 q = urb->urb_list.next;
46055 @@ -1308,7 +1310,7 @@
46056  }
46057   
46058  /*-------------------------------------------------------------------*/
46059 -_static int uhci_unlink_urb (urb_t *urb)
46060 +_static int uhci_unlink_urb (struct urb *urb)
46061  {
46062         uhci_t *s;
46063         unsigned long flags=0;
46064 @@ -1341,9 +1343,9 @@
46065  // In case of ASAP iso transfer, search the URB-list for already queued URBs
46066  // for this EP and calculate the earliest start frame for the new
46067  // URB (easy seamless URB continuation!)
46068 -_static int find_iso_limits (urb_t *urb, unsigned int *start, unsigned int *end)
46069 +_static int find_iso_limits (struct urb *urb, unsigned int *start, unsigned int *end)
46070  {
46071 -       urb_t *u, *last_urb = NULL;
46072 +       struct urb *u, *last_urb = NULL;
46073         uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
46074         struct list_head *p;
46075         int ret=-1;
46076 @@ -1353,7 +1355,7 @@
46077         p=s->urb_list.prev;
46078  
46079         for (; p != &s->urb_list; p = p->prev) {
46080 -               u = list_entry (p, urb_t, urb_list);
46081 +               u = list_entry (p, struct urb, urb_list);
46082                 // look for pending URBs with identical pipe handle
46083                 // works only because iso doesn't toggle the data bit!
46084                 if ((urb->pipe == u->pipe) && (urb->dev == u->dev) && (u->status == -EINPROGRESS)) {
46085 @@ -1375,7 +1377,7 @@
46086  /*-------------------------------------------------------------------*/
46087  // adjust start_frame according to scheduling constraints (ASAP etc)
46088  
46089 -_static int iso_find_start (urb_t *urb)
46090 +_static int iso_find_start (struct urb *urb)
46091  {
46092         uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
46093         unsigned int now;
46094 @@ -1433,7 +1435,7 @@
46095  // ASAP-flag set implicitely
46096  // if period==0, the transfer is only done once
46097  
46098 -_static int uhci_submit_int_urb (urb_t *urb)
46099 +_static int uhci_submit_int_urb (struct urb *urb)
46100  {
46101         uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
46102         urb_priv_t *urb_priv = urb->hcpriv;
46103 @@ -1493,7 +1495,7 @@
46104         return 0;
46105  }
46106  /*-------------------------------------------------------------------*/
46107 -_static int uhci_submit_iso_urb (urb_t *urb)
46108 +_static int uhci_submit_iso_urb (struct urb *urb)
46109  {
46110         uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
46111         urb_priv_t *urb_priv = urb->hcpriv;
46112 @@ -1586,10 +1588,10 @@
46113  /*-------------------------------------------------------------------*/
46114  // returns: 0 (no transfer queued), urb* (this urb already queued)
46115   
46116 -_static urb_t* search_dev_ep (uhci_t *s, urb_t *urb)
46117 +_static struct urb* search_dev_ep (uhci_t *s, struct urb *urb)
46118  {
46119         struct list_head *p;
46120 -       urb_t *tmp;
46121 +       struct urb *tmp;
46122         unsigned int mask = usb_pipecontrol(urb->pipe) ? (~USB_DIR_IN) : (~0);
46123  
46124         dbg("search_dev_ep:");
46125 @@ -1597,7 +1599,7 @@
46126         p=s->urb_list.next;
46127  
46128         for (; p != &s->urb_list; p = p->next) {
46129 -               tmp = list_entry (p, urb_t, urb_list);
46130 +               tmp = list_entry (p, struct urb, urb_list);
46131                 dbg("urb: %p", tmp);
46132                 // we can accept this urb if it is not queued at this time 
46133                 // or if non-iso transfer requests should be scheduled for the same device and pipe
46134 @@ -1610,13 +1612,13 @@
46135         return 0;
46136  }
46137  /*-------------------------------------------------------------------*/
46138 -_static int uhci_submit_urb (urb_t *urb)
46139 +_static int uhci_submit_urb (struct urb *urb)
46140  {
46141         uhci_t *s;
46142         urb_priv_t *urb_priv;
46143         int ret = 0, type;
46144         unsigned long flags;
46145 -       urb_t *queued_urb=NULL;
46146 +       struct urb *queued_urb=NULL;
46147         int bustime;
46148                 
46149         if (!urb->dev || !urb->dev->bus)
46150 @@ -1683,7 +1685,7 @@
46151         
46152         if (type == PIPE_CONTROL)
46153                 urb_priv->setup_packet_dma = pci_map_single(s->uhci_pci, urb->setup_packet,
46154 -                                                           sizeof(devrequest), PCI_DMA_TODEVICE);
46155 +                                                           sizeof(struct usb_ctrlrequest), PCI_DMA_TODEVICE);
46156  
46157         if (urb->transfer_buffer_length)
46158                 urb_priv->transfer_buffer_dma = pci_map_single(s->uhci_pci,
46159 @@ -1770,7 +1772,7 @@
46160  _static void uhci_check_timeouts(uhci_t *s)
46161  {
46162         struct list_head *p,*p2;
46163 -       urb_t *urb;
46164 +       struct urb *urb;
46165         int type;       
46166  
46167         p = s->urb_list.prev;   
46168 @@ -1780,7 +1782,7 @@
46169  
46170                 p2 = p;
46171                 p = p->prev;
46172 -               urb = list_entry (p2, urb_t, urb_list);
46173 +               urb = list_entry (p2, struct urb, urb_list);
46174                 type = usb_pipetype (urb->pipe);
46175  
46176                 hcpriv = (urb_priv_t*)urb->hcpriv;
46177 @@ -1878,7 +1880,7 @@
46178  
46179  /*-------------------------------------------------------------------------*/
46180  /* prepare Interrupt pipe transaction data; HUB INTERRUPT ENDPOINT */
46181 -_static int rh_send_irq (urb_t *urb)
46182 +_static int rh_send_irq (struct urb *urb)
46183  {
46184         int len = 1;
46185         int i;
46186 @@ -1905,12 +1907,12 @@
46187  
46188  /*-------------------------------------------------------------------------*/
46189  /* Virtual Root Hub INTs are polled by this timer every "intervall" ms */
46190 -_static int rh_init_int_timer (urb_t *urb);
46191 +_static int rh_init_int_timer (struct urb *urb);
46192  
46193  _static void rh_int_timer_do (unsigned long ptr)
46194  {
46195         int len;
46196 -       urb_t *urb = (urb_t*) ptr;
46197 +       struct urb *urb = (struct urb*) ptr;
46198         uhci_t *uhci = urb->dev->bus->hcpriv;
46199  
46200         if (uhci->rh.send) {
46201 @@ -1927,7 +1929,7 @@
46202  /*-------------------------------------------------------------------------*/
46203  /* Root Hub INTs are polled by this timer, polling interval 20ms */
46204  
46205 -_static int rh_init_int_timer (urb_t *urb)
46206 +_static int rh_init_int_timer (struct urb *urb)
46207  {
46208         uhci_t *uhci = urb->dev->bus->hcpriv;
46209  
46210 @@ -1961,12 +1963,12 @@
46211   *************************/
46212  
46213  
46214 -_static int rh_submit_urb (urb_t *urb)
46215 +_static int rh_submit_urb (struct urb *urb)
46216  {
46217         struct usb_device *usb_dev = urb->dev;
46218         uhci_t *uhci = usb_dev->bus->hcpriv;
46219         unsigned int pipe = urb->pipe;
46220 -       devrequest *cmd = (devrequest *) urb->setup_packet;
46221 +       struct usb_ctrlrequest *cmd = (struct usb_ctrlrequest *) urb->setup_packet;
46222         void *data = urb->transfer_buffer;
46223         int leni = urb->transfer_buffer_length;
46224         int len = 0;
46225 @@ -1992,10 +1994,10 @@
46226         }
46227  
46228  
46229 -       bmRType_bReq = cmd->requesttype | cmd->request << 8;
46230 -       wValue = le16_to_cpu (cmd->value);
46231 -       wIndex = le16_to_cpu (cmd->index);
46232 -       wLength = le16_to_cpu (cmd->length);
46233 +       bmRType_bReq = cmd->bRequestType | cmd->bRequest << 8;
46234 +       wValue = le16_to_cpu (cmd->wValue);
46235 +       wIndex = le16_to_cpu (cmd->wIndex);
46236 +       wLength = le16_to_cpu (cmd->wLength);
46237  
46238         for (i = 0; i < 8; i++)
46239                 uhci->rh.c_p_r[i] = 0;
46240 @@ -2162,7 +2164,7 @@
46241  }
46242  /*-------------------------------------------------------------------------*/
46243  
46244 -_static int rh_unlink_urb (urb_t *urb)
46245 +_static int rh_unlink_urb (struct urb *urb)
46246  {
46247         uhci_t *uhci = urb->dev->bus->hcpriv;
46248  
46249 @@ -2220,14 +2222,14 @@
46250         unsigned long flags;
46251         struct list_head *p;
46252         struct list_head *p2;
46253 -       urb_t *urb;
46254 +       struct urb *urb;
46255  
46256         spin_lock_irqsave (&s->urb_list_lock, flags);
46257         p = s->urb_list.prev;   
46258         while (p != &s->urb_list) {
46259                 p2 = p;
46260                 p = p->prev ;
46261 -               urb = list_entry (p2, urb_t, urb_list);
46262 +               urb = list_entry (p2, struct urb, urb_list);
46263                 dbg("urb: %p, dev %p, %p", urb, usb_dev,urb->dev);
46264                 
46265                 //urb->transfer_flags |=USB_ASYNC_UNLINK; 
46266 @@ -2277,7 +2279,7 @@
46267         uhci_unlink_urb
46268  };
46269  
46270 -_static void correct_data_toggles(urb_t *urb)
46271 +_static void correct_data_toggles(struct urb *urb)
46272  {
46273         usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe), usb_pipeout (urb->pipe), 
46274                        !usb_gettoggle (urb->dev, usb_pipeendpoint (urb->pipe), usb_pipeout (urb->pipe)));
46275 @@ -2307,7 +2309,7 @@
46276   *       PROCESS_TRANSFER_DONT_UNLINK: QHs already unlinked (for async unlink_urb)
46277   */
46278  
46279 -_static int process_transfer (uhci_t *s, urb_t *urb, int mode)
46280 +_static int process_transfer (uhci_t *s, struct urb *urb, int mode)
46281  {
46282         int ret = 0;
46283         urb_priv_t *urb_priv = urb->hcpriv;
46284 @@ -2395,7 +2397,7 @@
46285         if (usb_pipetype (urb->pipe) == PIPE_BULK ) {  /* toggle correction for short bulk transfers (nonqueued/queued) */
46286  
46287                 urb_priv_t *priv=(urb_priv_t*)urb->hcpriv;
46288 -               urb_t *next_queued_urb=priv->next_queued_urb;
46289 +               struct urb *next_queued_urb=priv->next_queued_urb;
46290  
46291                 if (next_queued_urb) {
46292                         urb_priv_t *next_priv=(urb_priv_t*)next_queued_urb->hcpriv;
46293 @@ -2426,7 +2428,7 @@
46294         return ret;
46295  }
46296  
46297 -_static int process_interrupt (uhci_t *s, urb_t *urb)
46298 +_static int process_interrupt (uhci_t *s, struct urb *urb)
46299  {
46300         int i, ret = -EINPROGRESS;
46301         urb_priv_t *urb_priv = urb->hcpriv;
46302 @@ -2525,7 +2527,7 @@
46303  // mode: PROCESS_ISO_REGULAR: processing only for done TDs, unlink TDs
46304  // mode: PROCESS_ISO_FORCE: force processing, don't unlink TDs (already unlinked)
46305  
46306 -_static int process_iso (uhci_t *s, urb_t *urb, int mode)
46307 +_static int process_iso (uhci_t *s, struct urb *urb, int mode)
46308  {
46309         int i;
46310         int ret = 0;
46311 @@ -2594,9 +2596,9 @@
46312  _static int process_urb (uhci_t *s, struct list_head *p)
46313  {
46314         int ret = 0;
46315 -       urb_t *urb;
46316 +       struct urb *urb;
46317  
46318 -       urb=list_entry (p, urb_t, urb_list);
46319 +       urb=list_entry (p, struct urb, urb_list);
46320         //dbg("process_urb: found queued urb: %p", urb);
46321  
46322         switch (usb_pipetype (urb->pipe)) {
46323 @@ -2645,7 +2647,7 @@
46324  #endif
46325  
46326                 if ((usb_pipetype (urb->pipe) != PIPE_INTERRUPT)) {  // process_interrupt does completion on its own            
46327 -                       urb_t *next_urb = urb->next;
46328 +                       struct urb *next_urb = urb->next;
46329                         int is_ring = 0;
46330                         int contains_killed = 0;
46331                         int loop_count=0;
46332 @@ -2952,6 +2954,7 @@
46333         }
46334  
46335         s->bus = bus;
46336 +       bus->bus_name = dev->slot_name;
46337         bus->hcpriv = s;
46338  
46339         /* UHCI specs says devices must have 2 ports, but goes on to say */
46340 diff -Nur linux-2.4.19.old/drivers/usb/usb-uhci.h linux-2.4.19/drivers/usb/usb-uhci.h
46341 --- linux-2.4.19.old/drivers/usb/usb-uhci.h     Sat Aug  3 02:39:45 2002
46342 +++ linux-2.4.19/drivers/usb/usb-uhci.h Mon Nov 25 12:27:12 2002
46343 @@ -158,8 +158,8 @@
46344         dma_addr_t setup_packet_dma;
46345         dma_addr_t transfer_buffer_dma;
46346         unsigned long started;
46347 -       urb_t *next_queued_urb;         // next queued urb for this EP
46348 -       urb_t *prev_queued_urb;
46349 +       struct urb *next_queued_urb;    // next queued urb for this EP
46350 +       struct urb *prev_queued_urb;
46351         uhci_desc_t *bottom_qh;
46352         uhci_desc_t *next_qh;           // next helper QH
46353         char use_loop;
46354 diff -Nur linux-2.4.19.old/drivers/usb/usb.c linux-2.4.19/drivers/usb/usb.c
46355 --- linux-2.4.19.old/drivers/usb/usb.c  Sat Aug  3 02:39:45 2002
46356 +++ linux-2.4.19/drivers/usb/usb.c      Mon Nov 25 12:27:12 2002
46357 @@ -38,6 +38,8 @@
46358  #endif
46359  #include <linux/usb.h>
46360  
46361 +#include "hcd.h"
46362 +
46363  static const int usb_bandwidth_option =
46364  #ifdef CONFIG_USB_BANDWIDTH
46365                                 1;
46366 @@ -218,42 +220,51 @@
46367  }
46368  
46369  /*
46370 - * usb_calc_bus_time:
46371 - *
46372 - * returns (approximate) USB bus time in nanoseconds for a USB transaction.
46373 + * usb_calc_bus_time - approximate periodic transaction time in nanoseconds
46374 + * @speed: from dev->speed; USB_SPEED_{LOW,FULL,HIGH}
46375 + * @is_input: true iff the transaction sends data to the host
46376 + * @isoc: true for isochronous transactions, false for interrupt ones
46377 + * @bytecount: how many bytes in the transaction.
46378 + *
46379 + * Returns approximate bus time in nanoseconds for a periodic transaction.
46380 + * See USB 2.0 spec section 5.11.3; only periodic transfers need to be
46381 + * scheduled in software, this function is only used for such scheduling.
46382   */
46383 -static long usb_calc_bus_time (int low_speed, int input_dir, int isoc, int bytecount)
46384 +long usb_calc_bus_time (int speed, int is_input, int isoc, int bytecount)
46385  {
46386         unsigned long   tmp;
46387  
46388 -       if (low_speed)          /* no isoc. here */
46389 -       {
46390 -               if (input_dir)
46391 -               {
46392 +       switch (speed) {
46393 +       case USB_SPEED_LOW:     /* INTR only */
46394 +               if (is_input) {
46395                         tmp = (67667L * (31L + 10L * BitTime (bytecount))) / 1000L;
46396                         return (64060L + (2 * BW_HUB_LS_SETUP) + BW_HOST_DELAY + tmp);
46397 -               }
46398 -               else
46399 -               {
46400 +               } else {
46401                         tmp = (66700L * (31L + 10L * BitTime (bytecount))) / 1000L;
46402                         return (64107L + (2 * BW_HUB_LS_SETUP) + BW_HOST_DELAY + tmp);
46403                 }
46404 +       case USB_SPEED_FULL:    /* ISOC or INTR */
46405 +               if (isoc) {
46406 +                       tmp = (8354L * (31L + 10L * BitTime (bytecount))) / 1000L;
46407 +                       return (((is_input) ? 7268L : 6265L) + BW_HOST_DELAY + tmp);
46408 +               } else {
46409 +                       tmp = (8354L * (31L + 10L * BitTime (bytecount))) / 1000L;
46410 +                       return (9107L + BW_HOST_DELAY + tmp);
46411 +               }
46412 +       case USB_SPEED_HIGH:    /* ISOC or INTR */
46413 +               // FIXME adjust for input vs output
46414 +               if (isoc)
46415 +                       tmp = HS_USECS (bytecount);
46416 +               else
46417 +                       tmp = HS_USECS_ISO (bytecount);
46418 +               return tmp;
46419 +       default:
46420 +               dbg ("bogus device speed!");
46421 +               return -1;
46422         }
46423 -
46424 -       /* for full-speed: */
46425 -
46426 -       if (!isoc)              /* Input or Output */
46427 -       {
46428 -               tmp = (8354L * (31L + 10L * BitTime (bytecount))) / 1000L;
46429 -               return (9107L + BW_HOST_DELAY + tmp);
46430 -       } /* end not Isoc */
46431 -
46432 -       /* for isoc: */
46433 -
46434 -       tmp = (8354L * (31L + 10L * BitTime (bytecount))) / 1000L;
46435 -       return (((input_dir) ? 7268L : 6265L) + BW_HOST_DELAY + tmp);
46436  }
46437  
46438 +
46439  /*
46440   * usb_check_bandwidth():
46441   *
46442 @@ -285,7 +296,7 @@
46443         unsigned int    pipe = urb->pipe;
46444         long            bustime;
46445  
46446 -       bustime = usb_calc_bus_time (usb_pipeslow(pipe), usb_pipein(pipe),
46447 +       bustime = usb_calc_bus_time (dev->speed, usb_pipein(pipe),
46448                         usb_pipeisoc(pipe), usb_maxpacket(dev, pipe, usb_pipeout(pipe)));
46449         if (usb_pipeisoc(pipe))
46450                 bustime = NS_TO_US(bustime) / urb->number_of_packets;
46451 @@ -457,12 +468,11 @@
46452          */
46453         down (&usb_bus_list_lock);
46454         list_del(&bus->bus_list);
46455 +       clear_bit(bus->busnum, busmap.busmap);
46456         up (&usb_bus_list_lock);
46457  
46458         usbdevfs_remove_bus(bus);
46459  
46460 -       clear_bit(bus->busnum, busmap.busmap);
46461 -
46462         usb_bus_put(bus);
46463  }
46464  
46465 @@ -939,6 +949,9 @@
46466  
46467         usb_bus_get(bus);
46468  
46469 +       if (!parent)
46470 +               dev->devpath [0] = '0';
46471 +
46472         dev->bus = bus;
46473         dev->parent = parent;
46474         atomic_set(&dev->refcnt, 1);
46475 @@ -985,11 +998,11 @@
46476   *
46477   *     The driver should call usb_free_urb() when it is finished with the urb.
46478   */
46479 -urb_t *usb_alloc_urb(int iso_packets)
46480 +struct urb *usb_alloc_urb(int iso_packets)
46481  {
46482 -       urb_t *urb;
46483 +       struct urb *urb;
46484  
46485 -       urb = (urb_t *)kmalloc(sizeof(urb_t) + iso_packets * sizeof(iso_packet_descriptor_t),
46486 +       urb = (struct urb *)kmalloc(sizeof(struct urb) + iso_packets * sizeof(struct iso_packet_descriptor),
46487               in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
46488         if (!urb) {
46489                 err("alloc_urb: kmalloc failed");
46490 @@ -1011,13 +1024,13 @@
46491   *     cleaned up with a call to usb_free_urb() when the driver is finished
46492   *     with it.
46493   */
46494 -void usb_free_urb(urb_t* urb)
46495 +void usb_free_urb(struct urb* urb)
46496  {
46497         if (urb)
46498                 kfree(urb);
46499  }
46500  /*-------------------------------------------------------------------*/
46501 -int usb_submit_urb(urb_t *urb)
46502 +int usb_submit_urb(struct urb *urb)
46503  {
46504         if (urb && urb->dev && urb->dev->bus && urb->dev->bus->op)
46505                 return urb->dev->bus->op->submit_urb(urb);
46506 @@ -1026,7 +1039,7 @@
46507  }
46508  
46509  /*-------------------------------------------------------------------*/
46510 -int usb_unlink_urb(urb_t *urb)
46511 +int usb_unlink_urb(struct urb *urb)
46512  {
46513         if (urb && urb->dev && urb->dev->bus && urb->dev->bus->op)
46514                 return urb->dev->bus->op->unlink_urb(urb);
46515 @@ -1040,7 +1053,7 @@
46516  /*-------------------------------------------------------------------*
46517   * completion handler for compatibility wrappers (sync control/bulk) *
46518   *-------------------------------------------------------------------*/
46519 -static void usb_api_blocking_completion(urb_t *urb)
46520 +static void usb_api_blocking_completion(struct urb *urb)
46521  {
46522         struct usb_api_data *awd = (struct usb_api_data *)urb->context;
46523  
46524 @@ -1054,7 +1067,7 @@
46525   *-------------------------------------------------------------------*/
46526  
46527  // Starts urb and waits for completion or timeout
46528 -static int usb_start_wait_urb(urb_t *urb, int timeout, int* actual_length)
46529 +static int usb_start_wait_urb(struct urb *urb, int timeout, int* actual_length)
46530  { 
46531         DECLARE_WAITQUEUE(wait, current);
46532         struct usb_api_data awd;
46533 @@ -1110,9 +1123,9 @@
46534  /*-------------------------------------------------------------------*/
46535  // returns status (negative) or length (positive)
46536  int usb_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe, 
46537 -                           devrequest *cmd,  void *data, int len, int timeout)
46538 +                           struct usb_ctrlrequest *cmd,  void *data, int len, int timeout)
46539  {
46540 -       urb_t *urb;
46541 +       struct urb *urb;
46542         int retv;
46543         int length;
46544  
46545 @@ -1145,7 +1158,8 @@
46546   *     This function sends a simple control message to a specified endpoint
46547   *     and waits for the message to complete, or timeout.
46548   *     
46549 - *     If successful, it returns 0, othwise a negative error number.
46550 + *     If successful, it returns the number of bytes transferred; 
46551 + *     otherwise, it returns a negative error number.
46552   *
46553   *     Don't use this function from within an interrupt context, like a
46554   *     bottom half handler.  If you need a asyncronous message, or need to send
46555 @@ -1154,17 +1168,17 @@
46556  int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype,
46557                          __u16 value, __u16 index, void *data, __u16 size, int timeout)
46558  {
46559 -       devrequest *dr = kmalloc(sizeof(devrequest), GFP_KERNEL);
46560 +       struct usb_ctrlrequest *dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL);
46561         int ret;
46562         
46563         if (!dr)
46564                 return -ENOMEM;
46565  
46566 -       dr->requesttype = requesttype;
46567 -       dr->request = request;
46568 -       dr->value = cpu_to_le16p(&value);
46569 -       dr->index = cpu_to_le16p(&index);
46570 -       dr->length = cpu_to_le16p(&size);
46571 +       dr->bRequestType = requesttype;
46572 +       dr->bRequest = request;
46573 +       dr->wValue = cpu_to_le16p(&value);
46574 +       dr->wIndex = cpu_to_le16p(&index);
46575 +       dr->wLength = cpu_to_le16p(&size);
46576  
46577         //dbg("usb_control_msg");       
46578  
46579 @@ -1188,9 +1202,9 @@
46580   *     This function sends a simple bulk message to a specified endpoint
46581   *     and waits for the message to complete, or timeout.
46582   *     
46583 - *     If successful, it returns 0, othwise a negative error number.
46584 - *     The number of actual bytes transferred will be plaed in the 
46585 - *     actual_timeout paramater.
46586 + *     If successful, it returns 0, otherwise a negative error number.
46587 + *     The number of actual bytes transferred will be stored in the 
46588 + *     actual_length paramater.
46589   *
46590   *     Don't use this function from within an interrupt context, like a
46591   *     bottom half handler.  If you need a asyncronous message, or need to
46592 @@ -1199,7 +1213,7 @@
46593  int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, 
46594                         void *data, int len, int *actual_length, int timeout)
46595  {
46596 -       urb_t *urb;
46597 +       struct urb *urb;
46598  
46599         if (len < 0)
46600                 return -EINVAL;
46601 @@ -1698,7 +1712,8 @@
46602  
46603         *pdev = NULL;
46604  
46605 -       info("USB disconnect on device %d", dev->devnum);
46606 +       info("USB disconnect on device %s-%s address %d",
46607 +                       dev->bus->bus_name, dev->devpath, dev->devnum);
46608  
46609         if (dev->actconfig) {
46610                 for (i = 0; i < dev->actconfig->bNumInterfaces; i++) {
46611 @@ -2392,6 +2407,7 @@
46612  EXPORT_SYMBOL(usb_connect);
46613  EXPORT_SYMBOL(usb_disconnect);
46614  
46615 +EXPORT_SYMBOL(usb_calc_bus_time);
46616  EXPORT_SYMBOL(usb_check_bandwidth);
46617  EXPORT_SYMBOL(usb_claim_bandwidth);
46618  EXPORT_SYMBOL(usb_release_bandwidth);
46619 diff -Nur linux-2.4.19.old/drivers/usb/usbkbd.c linux-2.4.19/drivers/usb/usbkbd.c
46620 --- linux-2.4.19.old/drivers/usb/usbkbd.c       Fri Sep 14 23:04:07 2001
46621 +++ linux-2.4.19/drivers/usb/usbkbd.c   Mon Nov 25 12:27:12 2002
46622 @@ -71,7 +71,7 @@
46623         unsigned char new[8];
46624         unsigned char old[8];
46625         struct urb irq, led;
46626 -       devrequest dr;
46627 +       struct usb_ctrlrequest dr;
46628         unsigned char leds, newleds;
46629         char name[128];
46630         int open;
46631 @@ -215,11 +215,11 @@
46632         FILL_INT_URB(&kbd->irq, dev, pipe, kbd->new, maxp > 8 ? 8 : maxp,
46633                 usb_kbd_irq, kbd, endpoint->bInterval);
46634  
46635 -       kbd->dr.requesttype = USB_TYPE_CLASS | USB_RECIP_INTERFACE;
46636 -       kbd->dr.request = USB_REQ_SET_REPORT;
46637 -       kbd->dr.value = 0x200;
46638 -       kbd->dr.index = interface->bInterfaceNumber;
46639 -       kbd->dr.length = 1;
46640 +       kbd->dr.bRequestType = USB_TYPE_CLASS | USB_RECIP_INTERFACE;
46641 +       kbd->dr.bRequest = USB_REQ_SET_REPORT;
46642 +       kbd->dr.wValue = 0x200;
46643 +       kbd->dr.wIndex = interface->bInterfaceNumber;
46644 +       kbd->dr.wLength = 1;
46645  
46646         kbd->dev.name = kbd->name;
46647         kbd->dev.idbus = BUS_USB;
46648 diff -Nur linux-2.4.19.old/drivers/usb/usblcd.c linux-2.4.19/drivers/usb/usblcd.c
46649 --- linux-2.4.19.old/drivers/usb/usblcd.c       Thu Jan  1 01:00:00 1970
46650 +++ linux-2.4.19/drivers/usb/usblcd.c   Mon Nov 25 12:27:12 2002
46651 @@ -0,0 +1,347 @@
46652 +/***************************************************************************** 
46653 + *                          USBLCD Kernel Driver                             *
46654 + *        See http://www.usblcd.de for Hardware and Documentation.           *
46655 + *                            Version 1.03                                   *
46656 + *             (C) 2002 Adams IT Services <info@usblcd.de>                   *
46657 + *                                                                           *
46658 + *     This file is licensed under the GPL. See COPYING in the package.      *
46659 + * Based on rio500.c by Cesar Miquel (miquel@df.uba.ar) which is based on    *
46660 + * hp_scanner.c by David E. Nelson (dnelson@jump.net)                        *
46661 + *                                                                           *
46662 + * 23.7.02 RA changed minor device number to the official assigned one       *
46663 + * 18.9.02 RA Vendor ID change, longer timeouts                              *
46664 + *****************************************************************************/
46665 +#include <linux/module.h>
46666 +#include <linux/kernel.h>
46667 +#include <linux/init.h>
46668 +#include <linux/slab.h>
46669 +#include <linux/errno.h>
46670 +#include <asm/uaccess.h>
46671 +#include <linux/usb.h>
46672 +
46673 +#define DRIVER_VERSION "USBLCD Driver Version 1.03"
46674 +
46675 +#define USBLCD_MINOR           144
46676 +
46677 +#define IOCTL_GET_HARD_VERSION 1
46678 +#define IOCTL_GET_DRV_VERSION  2
46679 +
46680 +/* stall/wait timeout for USBLCD */
46681 +#define NAK_TIMEOUT    (10*HZ)
46682 +
46683 +#define IBUF_SIZE      0x1000
46684 +#define OBUF_SIZE      0x10000
46685 +
46686 +struct lcd_usb_data {
46687 +       struct usb_device *lcd_dev;     /* init: probe_lcd */
46688 +       unsigned int ifnum;             /* Interface number of the USB device */
46689 +       int isopen;                     /* nz if open */
46690 +       int present;                    /* Device is present on the bus */
46691 +       char *obuf, *ibuf;              /* transfer buffers */
46692 +       char bulk_in_ep, bulk_out_ep;   /* Endpoint assignments */
46693 +       wait_queue_head_t wait_q;       /* for timeouts */
46694 +};
46695 +
46696 +static struct lcd_usb_data lcd_instance;
46697 +
46698 +static int open_lcd(struct inode *inode, struct file *file)
46699 +{
46700 +       struct lcd_usb_data *lcd = &lcd_instance;
46701 +
46702 +       if (lcd->isopen || !lcd->present) {
46703 +               return -EBUSY;
46704 +       }
46705 +       lcd->isopen = 1;
46706 +
46707 +       init_waitqueue_head(&lcd->wait_q);
46708 +
46709 +       info("USBLCD opened.");
46710 +
46711 +       return 0;
46712 +}
46713 +
46714 +static int close_lcd(struct inode *inode, struct file *file)
46715 +{
46716 +       struct lcd_usb_data *lcd = &lcd_instance;
46717 +
46718 +       lcd->isopen = 0;
46719 +
46720 +       info("USBLCD closed.");
46721 +       return 0;
46722 +}
46723 +
46724 +static int
46725 +ioctl_lcd(struct inode *inode, struct file *file, unsigned int cmd,
46726 +         unsigned long arg)
46727 +{
46728 +       struct lcd_usb_data *lcd = &lcd_instance;
46729 +       int i;
46730 +       char buf[30];
46731 +
46732 +       /* Sanity check to make sure lcd is connected, powered, etc */
46733 +       if (lcd == NULL ||
46734 +           lcd->present == 0 ||
46735 +           lcd->lcd_dev == NULL)
46736 +               return -1;
46737 +
46738 +       switch (cmd) {
46739 +       case IOCTL_GET_HARD_VERSION:
46740 +               i = (lcd->lcd_dev)->descriptor.bcdDevice;
46741 +               sprintf(buf,"%1d%1d.%1d%1d",(i & 0xF000)>>12,(i & 0xF00)>>8,
46742 +                       (i & 0xF0)>>4,(i & 0xF));
46743 +               if (copy_to_user((void *)arg,buf,strlen(buf))!=0)
46744 +                       return -EFAULT;
46745 +               break;
46746 +       case IOCTL_GET_DRV_VERSION:
46747 +               sprintf(buf,DRIVER_VERSION);
46748 +               if (copy_to_user((void *)arg,buf,strlen(buf))!=0)
46749 +                       return -EFAULT;
46750 +               break;
46751 +       default:
46752 +               return -ENOIOCTLCMD;
46753 +               break;
46754 +       }
46755 +
46756 +       return 0;
46757 +}
46758 +
46759 +static ssize_t
46760 +write_lcd(struct file *file, const char *buffer,
46761 +         size_t count, loff_t * ppos)
46762 +{
46763 +       struct lcd_usb_data *lcd = &lcd_instance;
46764 +
46765 +       unsigned long copy_size;
46766 +       unsigned long bytes_written = 0;
46767 +       unsigned int partial;
46768 +
46769 +       int result = 0;
46770 +       int maxretry;
46771 +
46772 +       /* Sanity check to make sure lcd is connected, powered, etc */
46773 +       if (lcd == NULL ||
46774 +           lcd->present == 0 ||
46775 +           lcd->lcd_dev == NULL)
46776 +               return -1;
46777 +
46778 +       do {
46779 +               unsigned long thistime;
46780 +               char *obuf = lcd->obuf;
46781 +
46782 +               thistime = copy_size =
46783 +                   (count >= OBUF_SIZE) ? OBUF_SIZE : count;
46784 +               if (copy_from_user(lcd->obuf, buffer, copy_size))
46785 +                       return -EFAULT;
46786 +               maxretry = 5;
46787 +               while (thistime) {
46788 +                       if (!lcd->lcd_dev)
46789 +                               return -ENODEV;
46790 +                       if (signal_pending(current)) {
46791 +                               return bytes_written ? bytes_written : -EINTR;
46792 +                       }
46793 +
46794 +                       result = usb_bulk_msg(lcd->lcd_dev,
46795 +                                        usb_sndbulkpipe(lcd->lcd_dev, 1),
46796 +                                        obuf, thistime, &partial, 10 * HZ);
46797 +
46798 +                       dbg("write stats: result:%d thistime:%lu partial:%u",
46799 +                            result, thistime, partial);
46800 +
46801 +                       if (result == USB_ST_TIMEOUT) { /* NAK - so hold for a while */
46802 +                               if (!maxretry--) {
46803 +                                       return -ETIME;
46804 +                               }
46805 +                               interruptible_sleep_on_timeout(&lcd-> wait_q, NAK_TIMEOUT);
46806 +                               continue;
46807 +                       } else if (!result & partial) {
46808 +                               obuf += partial;
46809 +                               thistime -= partial;
46810 +                       } else
46811 +                               break;
46812 +               };
46813 +               if (result) {
46814 +                       err("Write Whoops - %x", result);
46815 +                       return -EIO;
46816 +               }
46817 +               bytes_written += copy_size;
46818 +               count -= copy_size;
46819 +               buffer += copy_size;
46820 +       } while (count > 0);
46821 +
46822 +       return bytes_written ? bytes_written : -EIO;
46823 +}
46824 +
46825 +static ssize_t
46826 +read_lcd(struct file *file, char *buffer, size_t count, loff_t * ppos)
46827 +{
46828 +       struct lcd_usb_data *lcd = &lcd_instance;
46829 +       ssize_t read_count;
46830 +       unsigned int partial;
46831 +       int this_read;
46832 +       int result;
46833 +       int maxretry = 10;
46834 +       char *ibuf = lcd->ibuf;
46835 +
46836 +       /* Sanity check to make sure lcd is connected, powered, etc */
46837 +       if (lcd == NULL ||
46838 +           lcd->present == 0 ||
46839 +           lcd->lcd_dev == NULL)
46840 +               return -1;
46841 +
46842 +       read_count = 0;
46843 +
46844 +       while (count > 0) {
46845 +               if (signal_pending(current)) {
46846 +                       return read_count ? read_count : -EINTR;
46847 +               }
46848 +               if (!lcd->lcd_dev)
46849 +                       return -ENODEV;
46850 +               this_read = (count >= IBUF_SIZE) ? IBUF_SIZE : count;
46851 +
46852 +               result = usb_bulk_msg(lcd->lcd_dev,
46853 +                                     usb_rcvbulkpipe(lcd->lcd_dev, 0),
46854 +                                     ibuf, this_read, &partial,
46855 +                                     (int) (HZ * 8));
46856 +
46857 +               dbg(KERN_DEBUG "read stats: result:%d this_read:%u partial:%u",
46858 +                      result, this_read, partial);
46859 +
46860 +               if (partial) {
46861 +                       count = this_read = partial;
46862 +               } else if (result == USB_ST_TIMEOUT || result == 15) {  /* FIXME: 15 ??? */
46863 +                       if (!maxretry--) {
46864 +                               err("read_lcd: maxretry timeout");
46865 +                               return -ETIME;
46866 +                       }
46867 +                       interruptible_sleep_on_timeout(&lcd->wait_q,
46868 +                                                      NAK_TIMEOUT);
46869 +                       continue;
46870 +               } else if (result != USB_ST_DATAUNDERRUN) {
46871 +                       err("Read Whoops - result:%u partial:%u this_read:%u",
46872 +                            result, partial, this_read);
46873 +                       return -EIO;
46874 +               } else {
46875 +                       return (0);
46876 +               }
46877 +
46878 +               if (this_read) {
46879 +                       if (copy_to_user(buffer, ibuf, this_read))
46880 +                               return -EFAULT;
46881 +                       count -= this_read;
46882 +                       read_count += this_read;
46883 +                       buffer += this_read;
46884 +               }
46885 +       }
46886 +       return read_count;
46887 +}
46888 +
46889 +static void *probe_lcd(struct usb_device *dev, unsigned int ifnum)
46890 +{
46891 +       struct lcd_usb_data *lcd = &lcd_instance;
46892 +       int i;
46893 +       
46894 +       if (dev->descriptor.idProduct != 0x0001  ) {
46895 +               warn(KERN_INFO "USBLCD model not supported.");
46896 +               return NULL;
46897 +       }
46898 +
46899 +       if (lcd->present == 1) {
46900 +               warn(KERN_INFO "Multiple USBLCDs are not supported!");
46901 +               return NULL;
46902 +       }
46903 +
46904 +       i = dev->descriptor.bcdDevice;
46905 +
46906 +       info("USBLCD Version %1d%1d.%1d%1d found at address %d",
46907 +               (i & 0xF000)>>12,(i & 0xF00)>>8,(i & 0xF0)>>4,(i & 0xF),
46908 +               dev->devnum);
46909 +
46910 +       lcd->present = 1;
46911 +       lcd->lcd_dev = dev;
46912 +
46913 +       if (!(lcd->obuf = (char *) kmalloc(OBUF_SIZE, GFP_KERNEL))) {
46914 +               err("probe_lcd: Not enough memory for the output buffer");
46915 +               return NULL;
46916 +       }
46917 +       dbg("probe_lcd: obuf address:%p", lcd->obuf);
46918 +
46919 +       if (!(lcd->ibuf = (char *) kmalloc(IBUF_SIZE, GFP_KERNEL))) {
46920 +               err("probe_lcd: Not enough memory for the input buffer");
46921 +               kfree(lcd->obuf);
46922 +               return NULL;
46923 +       }
46924 +       dbg("probe_lcd: ibuf address:%p", lcd->ibuf);
46925 +
46926 +       return lcd;
46927 +}
46928 +
46929 +static void disconnect_lcd(struct usb_device *dev, void *ptr)
46930 +{
46931 +       struct lcd_usb_data *lcd = (struct lcd_usb_data *) ptr;
46932 +
46933 +       if (lcd->isopen) {
46934 +               lcd->isopen = 0;
46935 +               /* better let it finish - the release will do whats needed */
46936 +               lcd->lcd_dev = NULL;
46937 +               return;
46938 +       }
46939 +       kfree(lcd->ibuf);
46940 +       kfree(lcd->obuf);
46941 +
46942 +       info("USBLCD disconnected.");
46943 +
46944 +       lcd->present = 0;
46945 +}
46946 +
46947 +static struct usb_device_id id_table [] = {
46948 +       { .idVendor = 0x10D2, .match_flags = USB_DEVICE_ID_MATCH_VENDOR, },
46949 +       {},
46950 +};
46951 +
46952 +MODULE_DEVICE_TABLE (usb, id_table);
46953 +
46954 +static struct
46955 +file_operations usb_lcd_fops = {
46956 +       .owner =        THIS_MODULE,
46957 +       .read =         read_lcd,
46958 +       .write =        write_lcd,
46959 +       .ioctl =        ioctl_lcd,
46960 +       .open =         open_lcd,
46961 +       .release =      close_lcd,
46962 +};
46963 +
46964 +static struct
46965 +usb_driver lcd_driver = {
46966 +       .name =         "usblcd",
46967 +       .probe =        (void *)probe_lcd,
46968 +       .disconnect =   disconnect_lcd,
46969 +       .id_table =     id_table,
46970 +       .fops =         &usb_lcd_fops,
46971 +       .minor =        USBLCD_MINOR,
46972 +};
46973 +
46974 +int usb_lcd_init(void)
46975 +{
46976 +       if (usb_register(&lcd_driver) < 0)
46977 +               return -1;
46978 +
46979 +       info("%s (C) Adams IT Services http://www.usblcd.de", DRIVER_VERSION);
46980 +       info("USBLCD support registered.");
46981 +       return 0;
46982 +}
46983 +
46984 +
46985 +void usb_lcd_cleanup(void)
46986 +{
46987 +       struct lcd_usb_data *lcd = &lcd_instance;
46988 +
46989 +       lcd->present = 0;
46990 +       usb_deregister(&lcd_driver);
46991 +}
46992 +
46993 +module_init(usb_lcd_init);
46994 +module_exit(usb_lcd_cleanup);
46995 +
46996 +MODULE_AUTHOR("Adams IT Services <info@usblcd.de>");
46997 +MODULE_DESCRIPTION(DRIVER_VERSION);
46998 +MODULE_LICENSE("GPL");
46999 diff -Nur linux-2.4.19.old/drivers/usb/usbnet.c linux-2.4.19/drivers/usb/usbnet.c
47000 --- linux-2.4.19.old/drivers/usb/usbnet.c       Sat Aug  3 02:39:45 2002
47001 +++ linux-2.4.19/drivers/usb/usbnet.c   Mon Nov 25 12:27:12 2002
47002 @@ -1,6 +1,6 @@
47003  /*
47004   * USB Host-to-Host Links
47005 - * Copyright (C) 2000-2001 by David Brownell <dbrownell@users.sourceforge.net>
47006 + * Copyright (C) 2000-2002 by David Brownell <dbrownell@users.sourceforge.net>
47007   */
47008  
47009  /*
47010 @@ -16,6 +16,7 @@
47011   *
47012   *     - AnchorChip 2720
47013   *     - Belkin, eTEK (interops with Win32 drivers)
47014 + *     - EPSON USB clients
47015   *     - GeneSys GL620USB-A
47016   *     - "Linux Devices" (like iPaq and similar SA-1100 based PDAs)
47017   *     - NetChip 1080 (interoperates with NetChip Win32 drivers)
47018 @@ -23,33 +24,41 @@
47019   *
47020   * USB devices can implement their side of this protocol at the cost
47021   * of two bulk endpoints; it's not restricted to "cable" applications.
47022 - * See the LINUXDEV support.
47023 + * See the LINUXDEV or EPSON device/client support.
47024   *
47025   * 
47026 - * TODO:
47027 + * Status:
47028   *
47029 - * This needs to be retested for bulk queuing problems ... earlier versions
47030 - * seemed to find different types of problems in each HCD.  Once they're fixed,
47031 - * re-enable queues to get higher bandwidth utilization (without needing
47032 - * to tweak MTU for larger packets).
47033 - *
47034 - * Add support for more "network cable" chips; interop with their Win32
47035 - * drivers may be a good thing.  Test the AnchorChip 2720 support..
47036 - * Figure out the initialization protocol used by the Prolific chips,
47037 - * for better robustness ... there's some powerup/reset handshake that's
47038 - * needed when only one end reboots.
47039 - *
47040 - * Use interrupt on PL230x to detect peer connect/disconnect, and call
47041 - * netif_carrier_{on,off} (?) appropriately.  For Net1080, detect peer
47042 - * connect/disconnect with async control messages.
47043 - *
47044 - * Find some way to report "peer connected" network hotplug events; it'll
47045 - * likely mean updating the networking layer.  (This has been discussed
47046 - * on the netdev list...)
47047 + * - AN2720 ... not widely available, but reportedly works well
47048   *
47049 - * Craft smarter hotplug policy scripts ... ones that know how to arrange
47050 + * - Belkin/eTEK ... no known issues
47051 + *
47052 + * - Both GeneSys and PL-230x use interrupt transfers for driver-to-driver
47053 + *   handshaking; it'd be worth implementing those as "carrier detect".
47054 + *   Prefer generic hooks, not minidriver-specific hacks.
47055 + *
47056 + * - Linux devices ... the www.handhelds.org SA-1100 support works nicely,
47057 + *   but the Sharp Zaurus uses an incompatible protocol (extra checksums).
47058 + *   No reason not to merge the Zaurus protocol here too (got patch? :)
47059 + *
47060 + * - For Netchip, should use keventd to poll via control requests to detect
47061 + *   hardware level "carrier detect". 
47062 + *
47063 + * - PL-230x ... the initialization protocol doesn't seem to match chip data
47064 + *   sheets, sometimes it's not needed and sometimes it hangs.  Prolific has
47065 + *   not responded to repeated support/information requests.
47066 + *
47067 + * Interop with more Win32 drivers may be a good thing.
47068 + *
47069 + * Seems like reporting "peer connected" (carrier present) events may end
47070 + * up going through the netlink event system, not hotplug ... that may be
47071 + * awkward in terms of automatic configuration though.
47072 + *
47073 + * There are reports that bridging gives lower-than-usual throughput.
47074 + *
47075 + * Need smarter hotplug policy scripts ... ones that know how to arrange
47076   * bridging with "brctl", and can handle static and dynamic ("pump") setups.
47077 - * Use those "peer connected" events.
47078 + * Use those eventual "peer connected" events, and zeroconf.
47079   *
47080   *
47081   * CHANGELOG:
47082 @@ -62,6 +71,7 @@
47083   * 18-dec-2000 (db) tx watchdog, "net1080" renaming to "usbnet", device_info
47084   *             and prolific support, isolate net1080-specific bits, cleanup.
47085   *             fix unlink_urbs oops in D3 PM resume code path.
47086 + *
47087   * 02-feb-2001 (db) fix tx skb sharing, packet length, match_flags, ...
47088   * 08-feb-2001 stubbed in "linuxdev", maybe the SA-1100 folk can use it;
47089   *             AnchorChips 2720 support (from spec) for testing;
47090 @@ -83,6 +93,14 @@
47091   *             tie mostly to (sub)driver info.  Workaround some PL-2302
47092   *             chips that seem to reject SET_INTERFACE requests.
47093   *
47094 + * 06-apr-2002 Added ethtool support, based on a patch from Brad Hards.
47095 + *             Level of diagnostics is more configurable; they use device
47096 + *             location (usb_device->devpath) instead of address (2.5).
47097 + *             For tx_fixup, memflags can't be NOIO.
47098 + * 07-may-2002 Generalize/cleanup keventd support, handling rx stalls (mostly
47099 + *             for USB 2.0 TTs) and memory shortages (potential) too. (db)
47100 + *             Use "locally assigned" IEEE802 address space. (Brad Hards)
47101 + *
47102   *-------------------------------------------------------------------------*/
47103  
47104  #include <linux/config.h>
47105 @@ -93,6 +111,9 @@
47106  #include <linux/netdevice.h>
47107  #include <linux/etherdevice.h>
47108  #include <linux/random.h>
47109 +#include <linux/ethtool.h>
47110 +#include <linux/tqueue.h>
47111 +#include <asm/uaccess.h>
47112  #include <asm/unaligned.h>
47113  
47114  // #define     DEBUG                   // error path messages, extra info
47115 @@ -104,15 +125,27 @@
47116  #endif
47117  #include <linux/usb.h>
47118  
47119 +/* in 2.5 these standard usb ops take mem_flags */
47120 +#define ALLOC_URB(n,flags)     usb_alloc_urb(n)
47121 +#define SUBMIT_URB(u,flags)    usb_submit_urb(u)
47122 +
47123 +/* and these got renamed (may move to usb.h) */
47124 +#define usb_get_dev            usb_inc_dev_use
47125 +#define usb_put_dev            usb_dec_dev_use
47126  
47127 +
47128 +/* minidrivers _could_ be individually configured */
47129  #define        CONFIG_USB_AN2720
47130  #define        CONFIG_USB_BELKIN
47131 +#define        CONFIG_USB_EPSON2888
47132  #define        CONFIG_USB_GENESYS
47133  #define        CONFIG_USB_LINUXDEV
47134  #define        CONFIG_USB_NET1080
47135  #define        CONFIG_USB_PL2301
47136  
47137  
47138 +#define DRIVER_VERSION         "17-Jul-2002"
47139 +
47140  /*-------------------------------------------------------------------------*/
47141  
47142  /*
47143 @@ -164,6 +197,7 @@
47144         // protocol/interface state
47145         struct net_device       net;
47146         struct net_device_stats stats;
47147 +       int                     msg_level;
47148  
47149  #ifdef CONFIG_USB_NET1080
47150         u16                     packet_id;
47151 @@ -174,7 +208,12 @@
47152         struct sk_buff_head     txq;
47153         struct sk_buff_head     done;
47154         struct tasklet_struct   bh;
47155 -       struct tq_struct        ctrl_task;
47156 +
47157 +       struct tq_struct        kevent;
47158 +       unsigned long           flags;
47159 +#              define EVENT_TX_HALT    0
47160 +#              define EVENT_RX_HALT    1
47161 +#              define EVENT_RX_MEMORY  2
47162  };
47163  
47164  // device-specific info used by the driver
47165 @@ -224,6 +263,13 @@
47166         size_t                  length;
47167  };
47168  
47169 +static const char driver_name [] = "usbnet";
47170 +
47171 +/* use ethtool to change the level for any given device */
47172 +static int msg_level = 1;
47173 +MODULE_PARM (msg_level, "i");
47174 +MODULE_PARM_DESC (msg_level, "Initial message level (default = 1)");
47175 +
47176  
47177  #define        mutex_lock(x)   down(x)
47178  #define        mutex_unlock(x) up(x)
47179 @@ -241,7 +287,9 @@
47180  #endif
47181  
47182  #define devinfo(usbnet, fmt, arg...) \
47183 -       printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net.name, ## arg)
47184 +       do { if ((usbnet)->msg_level >= 1) \
47185 +       printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net.name, ## arg); \
47186 +       } while (0)
47187  
47188  \f
47189  #ifdef CONFIG_USB_AN2720
47190 @@ -258,12 +306,12 @@
47191   *-------------------------------------------------------------------------*/
47192  
47193  static const struct driver_info        an2720_info = {
47194 -       description:    "AnchorChips/Cypress 2720",
47195 +       .description =  "AnchorChips/Cypress 2720",
47196         // no reset available!
47197         // no check_connect available!
47198  
47199 -       in: 2, out: 2,          // direction distinguishes these
47200 -       epsize: 64,
47201 +       .in = 2, .out = 2,              // direction distinguishes these
47202 +       .epsize =64,
47203  };
47204  
47205  #endif /* CONFIG_USB_AN2720 */
47206 @@ -281,16 +329,39 @@
47207   *-------------------------------------------------------------------------*/
47208  
47209  static const struct driver_info        belkin_info = {
47210 -       description:    "Belkin, eTEK, or compatible",
47211 +       .description =  "Belkin, eTEK, or compatible",
47212  
47213 -       in: 1, out: 1,          // direction distinguishes these
47214 -       epsize: 64,
47215 +       .in = 1, .out = 1,              // direction distinguishes these
47216 +       .epsize =64,
47217  };
47218  
47219  #endif /* CONFIG_USB_BELKIN */
47220  
47221  
47222  \f
47223 +#ifdef CONFIG_USB_EPSON2888
47224 +
47225 +/*-------------------------------------------------------------------------
47226 + *
47227 + * EPSON USB clients
47228 + *
47229 + * This is the same idea as "linuxdev" (below) except the firmware in the
47230 + * device might not be Tux-powered.  Epson provides reference firmware that
47231 + * implements this interface.  Product developers can reuse or modify that
47232 + * code, such as by using their own product and vendor codes.
47233 + *
47234 + *-------------------------------------------------------------------------*/
47235 +
47236 +static const struct driver_info        epson2888_info = {
47237 +       .description =  "Epson USB Device",
47238 +
47239 +       .in = 4, .out = 3,
47240 +       .epsize = 64,
47241 +};
47242 +
47243 +#endif /* CONFIG_USB_EPSON2888 */
47244 +
47245 +\f
47246  #ifdef CONFIG_USB_GENESYS
47247  
47248  /*-------------------------------------------------------------------------
47249 @@ -300,6 +371,15 @@
47250   * ... should partially interop with the Win32 driver for this hardware
47251   * The GeneSys docs imply there's some NDIS issue motivating this framing.
47252   *
47253 + * Some info from GeneSys:
47254 + *  - GL620USB-A is full duplex; GL620USB is only half duplex for bulk.
47255 + *    (Some cables, like the BAFO-100c, use the half duplex version.)
47256 + *  - For the full duplex model, the low bit of the version code says
47257 + *    which side is which ("left/right").
47258 + *  - For the half duplex type, a control/interrupt handshake settles
47259 + *    the transfer direction.  (That's disabled here, partially coded.)
47260 + *    A control URB would block until other side writes an interrupt.
47261 + *
47262   *-------------------------------------------------------------------------*/
47263  
47264  // control msg write command
47265 @@ -373,7 +453,7 @@
47266         // issue usb interrupt read
47267         if (priv && priv->irq_urb) {
47268                 // submit urb
47269 -               if ((retval = usb_submit_urb (priv->irq_urb)) != 0)
47270 +               if ((retval = SUBMIT_URB (priv->irq_urb, GFP_KERNEL)) != 0)
47271                         dbg ("gl_interrupt_read: submit fail - %X...", retval);
47272                 else
47273                         dbg ("gl_interrupt_read: submit success...");
47274 @@ -420,7 +500,7 @@
47275         }
47276  
47277         // allocate irq urb
47278 -       if ((priv->irq_urb = usb_alloc_urb (0)) == 0) {
47279 +       if ((priv->irq_urb = ALLOC_URB (0, GFP_KERNEL)) == 0) {
47280                 dbg ("%s: cannot allocate private irq urb per device",
47281                         dev->net.name);
47282                 kfree (priv);
47283 @@ -464,23 +544,8 @@
47284         return 0;
47285  }
47286  
47287 -#else
47288 -
47289 -static int genelink_check_connect (struct usbnet *dev)
47290 -{
47291 -       dbg ("%s: assuming peer is connected", dev->net.name);
47292 -       return 0;
47293 -}
47294 -
47295  #endif
47296  
47297 -// reset the device status
47298 -static int genelink_reset (struct usbnet *dev)
47299 -{
47300 -       // we don't need to reset, just return 0
47301 -       return 0;
47302 -}
47303 -
47304  static int genelink_rx_fixup (struct usbnet *dev, struct sk_buff *skb)
47305  {
47306         struct gl_header        *header;
47307 @@ -600,15 +665,17 @@
47308  }
47309  
47310  static const struct driver_info        genelink_info = {
47311 -       description:    "Genesys GeneLink",
47312 -       flags:          FLAG_FRAMING_GL | FLAG_NO_SETINT,
47313 -       reset:          genelink_reset,
47314 -       check_connect:  genelink_check_connect,
47315 -       rx_fixup:       genelink_rx_fixup,
47316 -       tx_fixup:       genelink_tx_fixup,
47317 +       .description =  "Genesys GeneLink",
47318 +       .flags =        FLAG_FRAMING_GL | FLAG_NO_SETINT,
47319 +       .rx_fixup =     genelink_rx_fixup,
47320 +       .tx_fixup =     genelink_tx_fixup,
47321 +
47322 +       .in = 1, .out = 2,
47323 +       .epsize =64,
47324  
47325 -       in: 1, out: 2,
47326 -       epsize: 64,
47327 +#ifdef GENELINK_ACK
47328 +       .check_connect =genelink_check_connect,
47329 +#endif
47330  };
47331  
47332  #endif /* CONFIG_USB_GENESYS */
47333 @@ -629,21 +696,19 @@
47334   *
47335   * One example is Intel's SA-1100 chip, which integrates basic USB
47336   * support (arch/arm/sa1100/usb-eth.c); it's used in the iPaq PDA.
47337 + * And others too, like the Yopy.
47338   *
47339   *-------------------------------------------------------------------------*/
47340  
47341 -
47342  static const struct driver_info        linuxdev_info = {
47343 -       description:    "Linux Device",
47344 -       // no reset defined (yet?)
47345 -       // no check_connect needed!
47346 -       in: 2, out: 1,
47347 -       epsize: 64,
47348 +       .description =  "Linux Device",
47349 +
47350 +       .in = 2, .out = 1,
47351 +       .epsize = 64,
47352  };
47353  
47354  #endif /* CONFIG_USB_LINUXDEV */
47355  
47356 -
47357  \f
47358  #ifdef CONFIG_USB_NET1080
47359  
47360 @@ -814,10 +879,10 @@
47361  static inline void nc_dump_usbctl (struct usbnet *dev, u16 usbctl)
47362  {
47363  #ifdef DEBUG
47364 -       devdbg (dev, "net1080 %03d/%03d usbctl 0x%x:%s%s%s%s%s;"
47365 +       devdbg (dev, "net1080 %s-%s usbctl 0x%x:%s%s%s%s%s;"
47366                         " this%s%s;"
47367                         " other%s%s; r/o 0x%x",
47368 -               dev->udev->bus->busnum, dev->udev->devnum,
47369 +               dev->udev->bus->bus_name, dev->udev->devpath,
47370                 usbctl,
47371                 (usbctl & USBCTL_ENABLE_LANG) ? " lang" : "",
47372                 (usbctl & USBCTL_ENABLE_MFGR) ? " mfgr" : "",
47373 @@ -859,10 +924,10 @@
47374  static inline void nc_dump_status (struct usbnet *dev, u16 status)
47375  {
47376  #ifdef DEBUG
47377 -       devdbg (dev, "net1080 %03d/%03d status 0x%x:"
47378 +       devdbg (dev, "net1080 %s-%s status 0x%x:"
47379                         " this (%c) PKT=%d%s%s%s;"
47380                         " other PKT=%d%s%s%s; unspec 0x%x",
47381 -               dev->udev->bus->busnum, dev->udev->devnum,
47382 +               dev->udev->bus->bus_name, dev->udev->devpath,
47383                 status,
47384  
47385                 // XXX the packet counts don't seem right
47386 @@ -897,8 +962,8 @@
47387  static inline void nc_dump_ttl (struct usbnet *dev, u16 ttl)
47388  {
47389  #ifdef DEBUG
47390 -       devdbg (dev, "net1080 %03d/%03d ttl 0x%x this = %d, other = %d",
47391 -               dev->udev->bus->busnum, dev->udev->devnum,
47392 +       devdbg (dev, "net1080 %s-%s ttl 0x%x this = %d, other = %d",
47393 +               dev->udev->bus->bus_name, dev->udev->devpath,
47394                 ttl,
47395  
47396                 TTL_THIS (ttl),
47397 @@ -921,7 +986,8 @@
47398         // nc_dump_registers (dev);
47399  
47400         if ((retval = nc_register_read (dev, REG_STATUS, vp)) < 0) {
47401 -               dbg ("can't read dev %d status: %d", dev->udev->devnum, retval);
47402 +               dbg ("can't read %s-%s status: %d",
47403 +                       dev->udev->bus->bus_name, dev->udev->devpath, retval);
47404                 goto done;
47405         }
47406         status = *vp;
47407 @@ -948,10 +1014,11 @@
47408                         MK_TTL (NC_READ_TTL_MS, TTL_OTHER (ttl)) );
47409         dbg ("%s: assigned TTL, %d ms", dev->net.name, NC_READ_TTL_MS);
47410  
47411 -       devdbg (dev, "port %c, peer %sconnected",
47412 -               (status & STATUS_PORT_A) ? 'A' : 'B',
47413 -               (status & STATUS_CONN_OTHER) ? "" : "dis"
47414 -               );
47415 +       if (dev->msg_level >= 2)
47416 +               devinfo (dev, "port %c, peer %sconnected",
47417 +                       (status & STATUS_PORT_A) ? 'A' : 'B',
47418 +                       (status & STATUS_CONN_OTHER) ? "" : "dis"
47419 +                       );
47420         retval = 0;
47421  
47422  done:
47423 @@ -1079,15 +1146,15 @@
47424  }
47425  
47426  static const struct driver_info        net1080_info = {
47427 -       description:    "NetChip TurboCONNECT",
47428 -       flags:          FLAG_FRAMING_NC,
47429 -       reset:          net1080_reset,
47430 -       check_connect:  net1080_check_connect,
47431 -       rx_fixup:       net1080_rx_fixup,
47432 -       tx_fixup:       net1080_tx_fixup,
47433 +       .description =  "NetChip TurboCONNECT",
47434 +       .flags =        FLAG_FRAMING_NC,
47435 +       .reset =        net1080_reset,
47436 +       .check_connect =net1080_check_connect,
47437 +       .rx_fixup =     net1080_rx_fixup,
47438 +       .tx_fixup =     net1080_tx_fixup,
47439  
47440 -       in: 1, out: 1,          // direction distinguishes these
47441 -       epsize: 64,
47442 +       .in = 1, .out = 1,              // direction distinguishes these
47443 +       .epsize =64,
47444  };
47445  
47446  #endif /* CONFIG_USB_NET1080 */
47447 @@ -1147,24 +1214,14 @@
47448                 PL_S_EN|PL_RESET_OUT|PL_RESET_IN|PL_PEER_E);
47449  }
47450  
47451 -static int pl_check_connect (struct usbnet *dev)
47452 -{
47453 -       // FIXME test interrupt data PL_PEER_E bit
47454 -       // plus, there's some handshake done by
47455 -       // the prolific win32 driver... 
47456 -       dbg ("%s: assuming peer is connected", dev->net.name);
47457 -       return 0;
47458 -}
47459 -
47460  static const struct driver_info        prolific_info = {
47461 -       description:    "Prolific PL-2301/PL-2302",
47462 -       flags:          FLAG_NO_SETINT,
47463 +       .description =  "Prolific PL-2301/PL-2302",
47464 +       .flags =        FLAG_NO_SETINT,
47465                 /* some PL-2302 versions seem to fail usb_set_interface() */
47466 -       reset:          pl_reset,
47467 -       check_connect:  pl_check_connect,
47468 +       .reset =        pl_reset,
47469  
47470 -       in: 3, out: 2,
47471 -       epsize: 64,
47472 +       .in = 3, .out = 2,
47473 +       .epsize =64,
47474  };
47475  
47476  #endif /* CONFIG_USB_PL2301 */
47477 @@ -1227,6 +1284,21 @@
47478         spin_unlock_irqrestore (&dev->done.lock, flags);
47479  }
47480  
47481 +/* some work can't be done in tasklets, so we use keventd
47482 + *
47483 + * NOTE:  annoying asymmetry:  if it's active, schedule_task() fails,
47484 + * but tasklet_schedule() doesn't.  hope the failure is rare.
47485 + */
47486 +static void defer_kevent (struct usbnet *dev, int work)
47487 +{
47488 +       set_bit (work, &dev->flags);
47489 +       if (!schedule_task (&dev->kevent))
47490 +               err ("%s: kevent %d may have been dropped",
47491 +                       dev->net.name, work);
47492 +       else
47493 +               dbg ("%s: kevent %d scheduled", dev->net.name, work);
47494 +}
47495 +
47496  /*-------------------------------------------------------------------------*/
47497  
47498  static void rx_complete (struct urb *urb);
47499 @@ -1253,7 +1325,7 @@
47500  
47501         if ((skb = alloc_skb (size, flags)) == 0) {
47502                 dbg ("no rx skb");
47503 -               tasklet_schedule (&dev->bh);
47504 +               defer_kevent (dev, EVENT_RX_MEMORY);
47505                 usb_free_urb (urb);
47506                 return;
47507         }
47508 @@ -1268,9 +1340,6 @@
47509                 usb_rcvbulkpipe (dev->udev, dev->driver_info->in),
47510                 skb->data, size, rx_complete, skb);
47511         urb->transfer_flags |= USB_ASYNC_UNLINK;
47512 -#ifdef REALLY_QUEUE
47513 -       urb->transfer_flags |= USB_QUEUE_BULK;
47514 -#endif
47515  #if 0
47516         // Idle-but-posted reads with UHCI really chew up
47517         // PCI bandwidth unless FSBR is disabled
47518 @@ -1279,11 +1348,20 @@
47519  
47520         spin_lock_irqsave (&dev->rxq.lock, lockflags);
47521  
47522 -       if (netif_running (&dev->net)) {
47523 -               if ((retval = usb_submit_urb (urb)) != 0) {
47524 +       if (netif_running (&dev->net)
47525 +                       && !test_bit (EVENT_RX_HALT, &dev->flags)) {
47526 +               switch (retval = SUBMIT_URB (urb, GFP_ATOMIC)){ 
47527 +               case -EPIPE:
47528 +                       defer_kevent (dev, EVENT_RX_HALT);
47529 +                       break;
47530 +               case -ENOMEM:
47531 +                       defer_kevent (dev, EVENT_RX_MEMORY);
47532 +                       break;
47533 +               default:
47534                         dbg ("%s rx submit, %d", dev->net.name, retval);
47535                         tasklet_schedule (&dev->bh);
47536 -               } else {
47537 +                       break;
47538 +               case 0:
47539                         __skb_queue_tail (&dev->rxq, skb);
47540                 }
47541         } else {
47542 @@ -1357,12 +1435,20 @@
47543                 }
47544                 break;
47545  
47546 +           // stalls need manual reset. this is rare ... except that
47547 +           // when going through USB 2.0 TTs, unplug appears this way.
47548 +           // we avoid the highspeed version of the ETIMEOUT/EILSEQ
47549 +           // storm, recovering as needed.
47550 +           case -EPIPE:
47551 +               defer_kevent (dev, EVENT_RX_HALT);
47552 +               // FALLTHROUGH
47553 +
47554             // software-driven interface shutdown
47555 -           case -ECONNRESET:           // usb-ohci, usb-uhci
47556 -           case -ECONNABORTED:         // uhci ... for usb-uhci, INTR
47557 -               dbg ("%s shutdown, code %d", dev->net.name, urb_status);
47558 +           case -ECONNRESET:           // according to API spec
47559 +           case -ECONNABORTED:         // some (now fixed?) UHCI bugs
47560 +               dbg ("%s rx shutdown, code %d", dev->net.name, urb_status);
47561                 entry->state = rx_cleanup;
47562 -               // do urb frees only in the tasklet
47563 +               // do urb frees only in the tasklet (UHCI has oopsed ...)
47564                 entry->urb = urb;
47565                 urb = 0;
47566                 break;
47567 @@ -1373,8 +1459,9 @@
47568                 // FALLTHROUGH
47569             
47570             default:
47571 -               // on unplug we'll get a burst of ETIMEDOUT/EILSEQ
47572 -               // till the khubd gets and handles its interrupt.
47573 +               // on unplug we get ETIMEDOUT (ohci) or EILSEQ (uhci)
47574 +               // until khubd sees its interrupt and disconnects us.
47575 +               // that can easily be hundreds of passes through here.
47576                 entry->state = rx_cleanup;
47577                 dev->stats.rx_errors++;
47578                 dbg ("%s rx: status %d", dev->net.name, urb_status);
47579 @@ -1384,10 +1471,12 @@
47580         defer_bh (dev, skb);
47581  
47582         if (urb) {
47583 -               if (netif_running (&dev->net)) {
47584 +               if (netif_running (&dev->net)
47585 +                               && !test_bit (EVENT_RX_HALT, &dev->flags)) {
47586                         rx_submit (dev, urb, GFP_ATOMIC);
47587                         return;
47588                 }
47589 +               usb_free_urb (urb);
47590         }
47591  #ifdef VERBOSE
47592         dbg ("no read resubmitted");
47593 @@ -1417,7 +1506,7 @@
47594                 // during some PM-driven resume scenarios,
47595                 // these (async) unlinks complete immediately
47596                 retval = usb_unlink_urb (urb);
47597 -               if (retval < 0)
47598 +               if (retval != -EINPROGRESS && retval != 0)
47599                         dbg ("unlink urb err, %d", retval);
47600                 else
47601                         count++;
47602 @@ -1441,10 +1530,11 @@
47603         mutex_lock (&dev->mutex);
47604         netif_stop_queue (net);
47605  
47606 -       devdbg (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld",
47607 -               dev->stats.rx_packets, dev->stats.tx_packets, 
47608 -               dev->stats.rx_errors, dev->stats.tx_errors
47609 -               );
47610 +       if (dev->msg_level >= 2)
47611 +               devinfo (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld",
47612 +                       dev->stats.rx_packets, dev->stats.tx_packets, 
47613 +                       dev->stats.rx_errors, dev->stats.tx_errors
47614 +                       );
47615  
47616         // ensure there are no more active urbs
47617         add_wait_queue (&unlink_wakeup, &wait);
47618 @@ -1482,9 +1572,9 @@
47619  
47620         // put into "known safe" state
47621         if (info->reset && (retval = info->reset (dev)) < 0) {
47622 -               devinfo (dev, "open reset fail (%d) usbnet %03d/%03d, %s",
47623 +               devinfo (dev, "open reset fail (%d) usbnet usb-%s-%s, %s",
47624                         retval,
47625 -                       dev->udev->bus->busnum, dev->udev->devnum,
47626 +                       dev->udev->bus->bus_name, dev->udev->devpath,
47627                         info->description);
47628                 goto done;
47629         }
47630 @@ -1496,14 +1586,16 @@
47631         }
47632  
47633         netif_start_queue (net);
47634 -       devdbg (dev, "open: enable queueing (rx %d, tx %d) mtu %d %s framing",
47635 -               RX_QLEN, TX_QLEN, dev->net.mtu,
47636 -               (info->flags & (FLAG_FRAMING_NC | FLAG_FRAMING_GL))
47637 -                   ? ((info->flags & FLAG_FRAMING_NC)
47638 -                       ? "NetChip"
47639 -                       : "GeneSys")
47640 -                   : "raw"
47641 -               );
47642 +       if (dev->msg_level >= 2)
47643 +               devinfo (dev, "open: enable queueing "
47644 +                               "(rx %d, tx %d) mtu %d %s framing",
47645 +                       RX_QLEN, TX_QLEN, dev->net.mtu,
47646 +                       (info->flags & (FLAG_FRAMING_NC | FLAG_FRAMING_GL))
47647 +                           ? ((info->flags & FLAG_FRAMING_NC)
47648 +                               ? "NetChip"
47649 +                               : "GeneSys")
47650 +                           : "raw"
47651 +                       );
47652  
47653         // delay posting reads until we're fully open
47654         tasklet_schedule (&dev->bh);
47655 @@ -1514,16 +1606,134 @@
47656  
47657  /*-------------------------------------------------------------------------*/
47658  
47659 -/* usb_clear_halt cannot be called in interrupt context */
47660 +static int usbnet_ethtool_ioctl (struct net_device *net, void *useraddr)
47661 +{
47662 +       struct usbnet   *dev = (struct usbnet *) net->priv;
47663 +       u32             cmd;
47664 +
47665 +       if (get_user (cmd, (u32 *)useraddr))
47666 +               return -EFAULT;
47667 +       switch (cmd) {
47668 +
47669 +       case ETHTOOL_GDRVINFO: {        /* get driver info */
47670 +               struct ethtool_drvinfo          info;
47671 +
47672 +               memset (&info, 0, sizeof info);
47673 +               info.cmd = ETHTOOL_GDRVINFO;
47674 +               strncpy (info.driver, driver_name, sizeof info.driver);
47675 +               strncpy (info.version, DRIVER_VERSION, sizeof info.version);
47676 +               strncpy (info.fw_version, dev->driver_info->description,
47677 +                       sizeof info.fw_version);
47678 +               usb_make_path (dev->udev, info.bus_info, sizeof info.bus_info);
47679 +               if (copy_to_user (useraddr, &info, sizeof (info)))
47680 +                       return -EFAULT;
47681 +               return 0;
47682 +               }
47683 +
47684 +       case ETHTOOL_GLINK:             /* get link status */
47685 +               if (dev->driver_info->check_connect) {
47686 +                       struct ethtool_value    edata = { ETHTOOL_GLINK };
47687 +
47688 +                       edata.data = dev->driver_info->check_connect (dev) == 0;
47689 +                       if (copy_to_user (useraddr, &edata, sizeof (edata)))
47690 +                               return -EFAULT;
47691 +                       return 0;
47692 +               }
47693 +               break;
47694  
47695 +       case ETHTOOL_GMSGLVL: {         /* get message-level */
47696 +               struct ethtool_value    edata = {ETHTOOL_GMSGLVL};
47697 +
47698 +               edata.data = dev->msg_level;
47699 +               if (copy_to_user (useraddr, &edata, sizeof (edata)))
47700 +                       return -EFAULT;
47701 +               return 0;
47702 +               }
47703 +
47704 +       case ETHTOOL_SMSGLVL: {         /* set message-level */
47705 +               struct ethtool_value    edata;
47706 +
47707 +               if (copy_from_user (&edata, useraddr, sizeof (edata)))
47708 +                       return -EFAULT;
47709 +               dev->msg_level = edata.data;
47710 +               return 0;
47711 +               }
47712 +       
47713 +       /* could also map RINGPARAM to RX/TX QLEN */
47714 +
47715 +       }
47716 +        /* Note that the ethtool user space code requires EOPNOTSUPP */
47717 +       return -EOPNOTSUPP;
47718 +}
47719 +
47720 +static int usbnet_ioctl (struct net_device *net, struct ifreq *rq, int cmd)
47721 +{
47722 +       switch (cmd) {
47723 +       case SIOCETHTOOL:
47724 +               return usbnet_ethtool_ioctl (net, (void *)rq->ifr_data);
47725 +       default:
47726 +               return -EOPNOTSUPP;
47727 +       }
47728 +}
47729 +
47730 +/*-------------------------------------------------------------------------*/
47731 +
47732 +/* work that cannot be done in interrupt context uses keventd.
47733 + *
47734 + * NOTE:  "uhci" and "usb-uhci" may have trouble with this since they don't
47735 + * queue control transfers to individual devices, and other threads could
47736 + * trigger control requests concurrently.  hope that's rare.
47737 + */
47738  static void
47739 -tx_clear_halt (void *data)
47740 +kevent (void *data)
47741  {
47742         struct usbnet           *dev = data;
47743 +       int                     status;
47744  
47745 -       usb_clear_halt (dev->udev,
47746 -               usb_sndbulkpipe (dev->udev, dev->driver_info->out));
47747 -       netif_wake_queue (&dev->net);
47748 +       /* usb_clear_halt() needs a thread context */
47749 +       if (test_bit (EVENT_TX_HALT, &dev->flags)) {
47750 +               unlink_urbs (&dev->txq);
47751 +               status = usb_clear_halt (dev->udev,
47752 +                       usb_sndbulkpipe (dev->udev, dev->driver_info->out));
47753 +               if (status < 0)
47754 +                       err ("%s: can't clear tx halt, status %d",
47755 +                               dev->net.name, status);
47756 +               else {
47757 +                       clear_bit (EVENT_TX_HALT, &dev->flags);
47758 +                       netif_wake_queue (&dev->net);
47759 +               }
47760 +       }
47761 +       if (test_bit (EVENT_RX_HALT, &dev->flags)) {
47762 +               unlink_urbs (&dev->rxq);
47763 +               status = usb_clear_halt (dev->udev,
47764 +                       usb_rcvbulkpipe (dev->udev, dev->driver_info->in));
47765 +               if (status < 0)
47766 +                       err ("%s: can't clear rx halt, status %d",
47767 +                               dev->net.name, status);
47768 +               else {
47769 +                       clear_bit (EVENT_RX_HALT, &dev->flags);
47770 +                       tasklet_schedule (&dev->bh);
47771 +               }
47772 +       }
47773 +
47774 +       /* tasklet could resubmit itself forever if memory is tight */
47775 +       if (test_bit (EVENT_RX_MEMORY, &dev->flags)) {
47776 +               struct urb      *urb = 0;
47777 +
47778 +               if (netif_running (&dev->net))
47779 +                       urb = ALLOC_URB (0, GFP_KERNEL);
47780 +               else
47781 +                       clear_bit (EVENT_RX_MEMORY, &dev->flags);
47782 +               if (urb != 0) {
47783 +                       clear_bit (EVENT_RX_MEMORY, &dev->flags);
47784 +                       rx_submit (dev, urb, GFP_KERNEL);
47785 +                       tasklet_schedule (&dev->bh);
47786 +               }
47787 +       }
47788 +
47789 +       if (dev->flags)
47790 +               dbg ("%s: kevent done, flags = 0x%lx",
47791 +                       dev->net.name, dev->flags);
47792  }
47793  
47794  /*-------------------------------------------------------------------------*/
47795 @@ -1534,15 +1744,8 @@
47796         struct skb_data         *entry = (struct skb_data *) skb->cb;
47797         struct usbnet           *dev = entry->dev;
47798  
47799 -       if (urb->status == USB_ST_STALL) {
47800 -               if (dev->ctrl_task.sync == 0) {
47801 -                       dev->ctrl_task.routine = tx_clear_halt;
47802 -                       dev->ctrl_task.data = dev;
47803 -                       schedule_task (&dev->ctrl_task);
47804 -               } else {
47805 -                       dbg ("Cannot clear TX stall");
47806 -               }
47807 -       }
47808 +       if (urb->status == -EPIPE)
47809 +               defer_kevent (dev, EVENT_TX_HALT);
47810         urb->dev = 0;
47811         entry->state = tx_done;
47812         defer_bh (dev, skb);
47813 @@ -1576,19 +1779,17 @@
47814         struct nc_trailer       *trailer = 0;
47815  #endif /* CONFIG_USB_NET1080 */
47816  
47817 -       flags = in_interrupt () ? GFP_ATOMIC : GFP_NOIO; /* might be used for nfs */
47818 -
47819         // some devices want funky USB-level framing, for
47820         // win32 driver (usually) and/or hardware quirks
47821         if (info->tx_fixup) {
47822 -               skb = info->tx_fixup (dev, skb, flags);
47823 +               skb = info->tx_fixup (dev, skb, GFP_ATOMIC);
47824                 if (!skb) {
47825                         dbg ("can't tx_fixup skb");
47826                         goto drop;
47827                 }
47828         }
47829  
47830 -       if (!(urb = usb_alloc_urb (0))) {
47831 +       if (!(urb = ALLOC_URB (0, GFP_ATOMIC))) {
47832                 dbg ("no urb");
47833                 goto drop;
47834         }
47835 @@ -1621,9 +1822,6 @@
47836                         usb_sndbulkpipe (dev->udev, info->out),
47837                         skb->data, skb->len, tx_complete, skb);
47838         urb->transfer_flags |= USB_ASYNC_UNLINK;
47839 -#ifdef REALLY_QUEUE
47840 -       urb->transfer_flags |= USB_QUEUE_BULK;
47841 -#endif
47842         // FIXME urb->timeout = ... jiffies ... ;
47843  
47844         spin_lock_irqsave (&dev->txq.lock, flags);
47845 @@ -1640,15 +1838,19 @@
47846         }
47847  #endif /* CONFIG_USB_NET1080 */
47848  
47849 -       netif_stop_queue (net);
47850 -       if ((retval = usb_submit_urb (urb)) != 0) {
47851 -               netif_start_queue (net);
47852 +       switch ((retval = SUBMIT_URB (urb, GFP_ATOMIC))) {
47853 +       case -EPIPE:
47854 +               netif_stop_queue (net);
47855 +               defer_kevent (dev, EVENT_TX_HALT);
47856 +               break;
47857 +       default:
47858                 dbg ("%s tx: submit urb err %d", net->name, retval);
47859 -       } else {
47860 +               break;
47861 +       case 0:
47862                 net->trans_start = jiffies;
47863                 __skb_queue_tail (&dev->txq, skb);
47864 -               if (dev->txq.qlen < TX_QLEN)
47865 -                       netif_start_queue (net);
47866 +               if (dev->txq.qlen >= TX_QLEN)
47867 +                       netif_stop_queue (net);
47868         }
47869         spin_unlock_irqrestore (&dev->txq.lock, flags);
47870  
47871 @@ -1715,14 +1917,15 @@
47872                 }
47873  
47874         // or are we maybe short a few urbs?
47875 -       } else if (netif_running (&dev->net)) {
47876 +       } else if (netif_running (&dev->net)
47877 +                       && !test_bit (EVENT_RX_HALT, &dev->flags)) {
47878                 int     temp = dev->rxq.qlen;
47879  
47880                 if (temp < RX_QLEN) {
47881                         struct urb      *urb;
47882                         int             i;
47883                         for (i = 0; i < 3 && dev->rxq.qlen < RX_QLEN; i++) {
47884 -                               if ((urb = usb_alloc_urb (0)) != 0)
47885 +                               if ((urb = ALLOC_URB (0, GFP_ATOMIC)) != 0)
47886                                         rx_submit (dev, urb, GFP_ATOMIC);
47887                         }
47888                         if (temp != dev->rxq.qlen)
47889 @@ -1750,8 +1953,8 @@
47890  {
47891         struct usbnet   *dev = (struct usbnet *) ptr;
47892  
47893 -       devinfo (dev, "unregister usbnet %03d/%03d, %s",
47894 -               udev->bus->busnum, udev->devnum,
47895 +       devinfo (dev, "unregister usbnet usb-%s-%s, %s",
47896 +               udev->bus->bus_name, udev->devpath,
47897                 dev->driver_info->description);
47898         
47899         unregister_netdev (&dev->net);
47900 @@ -1761,8 +1964,11 @@
47901         list_del (&dev->dev_list);
47902         mutex_unlock (&usbnet_mutex);
47903  
47904 +       // assuming we used keventd, it must quiesce too
47905 +       flush_scheduled_tasks ();
47906 +
47907         kfree (dev);
47908 -       usb_dec_dev_use (udev);
47909 +       usb_put_dev (udev);
47910  }
47911  
47912  
47913 @@ -1808,15 +2014,17 @@
47914         memset (dev, 0, sizeof *dev);
47915  
47916         init_MUTEX_LOCKED (&dev->mutex);
47917 -       usb_inc_dev_use (udev);
47918 +       usb_get_dev (udev);
47919         dev->udev = udev;
47920         dev->driver_info = info;
47921 +       dev->msg_level = msg_level;
47922         INIT_LIST_HEAD (&dev->dev_list);
47923         skb_queue_head_init (&dev->rxq);
47924         skb_queue_head_init (&dev->txq);
47925         skb_queue_head_init (&dev->done);
47926         dev->bh.func = usbnet_bh;
47927         dev->bh.data = (unsigned long) dev;
47928 +       INIT_TQUEUE (&dev->kevent, kevent, dev);
47929  
47930         // set up network interface records
47931         net = &dev->net;
47932 @@ -1836,10 +2044,11 @@
47933         net->stop = usbnet_stop;
47934         net->watchdog_timeo = TX_TIMEOUT_JIFFIES;
47935         net->tx_timeout = usbnet_tx_timeout;
47936 +       net->do_ioctl = usbnet_ioctl;
47937  
47938         register_netdev (&dev->net);
47939 -       devinfo (dev, "register usbnet %03d/%03d, %s",
47940 -               udev->bus->busnum, udev->devnum,
47941 +       devinfo (dev, "register usbnet usb-%s-%s, %s",
47942 +               udev->bus->bus_name, udev->devpath,
47943                 dev->driver_info->description);
47944  
47945         // ok, it's ready to go.
47946 @@ -1867,33 +2076,41 @@
47947  #ifdef CONFIG_USB_AN2720
47948  {
47949         USB_DEVICE (0x0547, 0x2720),    // AnchorChips defaults
47950 -       driver_info:    (unsigned long) &an2720_info,
47951 -},
47952 -
47953 -{
47954 +       .driver_info =  (unsigned long) &an2720_info,
47955 +}, {
47956         USB_DEVICE (0x0547, 0x2727),    // Xircom PGUNET
47957 -       driver_info:    (unsigned long) &an2720_info,
47958 +       .driver_info =  (unsigned long) &an2720_info,
47959  },
47960  #endif
47961  
47962  #ifdef CONFIG_USB_BELKIN
47963  {
47964         USB_DEVICE (0x050d, 0x0004),    // Belkin
47965 -       driver_info:    (unsigned long) &belkin_info,
47966 +       .driver_info =  (unsigned long) &belkin_info,
47967  }, {
47968         USB_DEVICE (0x056c, 0x8100),    // eTEK
47969 -       driver_info:    (unsigned long) &belkin_info,
47970 +       .driver_info =  (unsigned long) &belkin_info,
47971  }, {
47972         USB_DEVICE (0x0525, 0x9901),    // Advance USBNET (eTEK)
47973 -       driver_info:    (unsigned long) &belkin_info,
47974 +       .driver_info =  (unsigned long) &belkin_info,
47975 +},
47976 +#endif
47977 +
47978 +#ifdef CONFIG_USB_EPSON2888
47979 +{
47980 +       USB_DEVICE (0x0525, 0x2888),    // EPSON USB client
47981 +       driver_info:    (unsigned long) &epson2888_info,
47982  },
47983  #endif
47984  
47985  #ifdef CONFIG_USB_GENESYS
47986  {
47987         USB_DEVICE (0x05e3, 0x0502),    // GL620USB-A
47988 -       driver_info:    (unsigned long) &genelink_info,
47989 +       .driver_info =  (unsigned long) &genelink_info,
47990  },
47991 +       /* NOT: USB_DEVICE (0x05e3, 0x0501),    // GL620USB
47992 +        * that's half duplex, not currently supported
47993 +        */
47994  #endif
47995  
47996  #ifdef CONFIG_USB_LINUXDEV
47997 @@ -1904,28 +2121,32 @@
47998  {
47999         // 1183 = 0x049F, both used as hex values?
48000         USB_DEVICE (0x049F, 0x505A),    // Compaq "Itsy"
48001 -       driver_info:    (unsigned long) &linuxdev_info,
48002 +       .driver_info =  (unsigned long) &linuxdev_info,
48003 +}, {
48004 +       USB_DEVICE (0x0E7E, 0x1001),    // G.Mate "Yopy"
48005 +       .driver_info =  (unsigned long) &linuxdev_info,
48006  },
48007 +       // NOTE:  the Sharp Zaurus uses a modified version of
48008 +       // this driver, which is not interoperable with this.
48009  #endif
48010  
48011  #ifdef CONFIG_USB_NET1080
48012  {
48013         USB_DEVICE (0x0525, 0x1080),    // NetChip ref design
48014 -       driver_info:    (unsigned long) &net1080_info,
48015 -},
48016 -{
48017 +       .driver_info =  (unsigned long) &net1080_info,
48018 +}, {
48019         USB_DEVICE (0x06D0, 0x0622),    // Laplink Gold
48020 -       driver_info:    (unsigned long) &net1080_info,
48021 +       .driver_info =  (unsigned long) &net1080_info,
48022  },
48023  #endif
48024  
48025  #ifdef CONFIG_USB_PL2301
48026  {
48027         USB_DEVICE (0x067b, 0x0000),    // PL-2301
48028 -       driver_info:    (unsigned long) &prolific_info,
48029 +       .driver_info =  (unsigned long) &prolific_info,
48030  }, {
48031         USB_DEVICE (0x067b, 0x0001),    // PL-2302
48032 -       driver_info:    (unsigned long) &prolific_info,
48033 +       .driver_info =  (unsigned long) &prolific_info,
48034  },
48035  #endif
48036  
48037 @@ -1936,10 +2157,10 @@
48038  MODULE_DEVICE_TABLE (usb, products);
48039  
48040  static struct usb_driver usbnet_driver = {
48041 -       name:           "usbnet",
48042 -       id_table:       products,
48043 -       probe:          usbnet_probe,
48044 -       disconnect:     usbnet_disconnect,
48045 +       .name =         driver_name,
48046 +       .id_table =     products,
48047 +       .probe =        usbnet_probe,
48048 +       .disconnect =   usbnet_disconnect,
48049  };
48050  
48051  /*-------------------------------------------------------------------------*/
48052 @@ -1952,6 +2173,7 @@
48053  
48054         get_random_bytes (node_id, sizeof node_id);
48055         node_id [0] &= 0xfe;    // clear multicast bit
48056 +       node_id [0] |= 0x02;    // set local assignment bit (IEEE802)
48057  
48058         if (usb_register (&usbnet_driver) < 0)
48059                 return -1;
48060 diff -Nur linux-2.4.19.old/drivers/usb/usbvideo.c linux-2.4.19/drivers/usb/usbvideo.c
48061 --- linux-2.4.19.old/drivers/usb/usbvideo.c     Sat Aug  3 02:39:45 2002
48062 +++ linux-2.4.19/drivers/usb/usbvideo.c Mon Nov 25 12:27:13 2002
48063 @@ -58,57 +58,26 @@
48064  /* Memory management functions */
48065  /*******************************/
48066  
48067 -#define MDEBUG(x)      do { } while(0)         /* Debug memory management */
48068 -
48069 -/* Given PGD from the address space's page table, return the kernel
48070 - * virtual mapping of the physical memory mapped at ADR.
48071 - */
48072 -unsigned long usbvideo_uvirt_to_kva(pgd_t *pgd, unsigned long adr)
48073 -{
48074 -       unsigned long ret = 0UL;
48075 -       pmd_t *pmd;
48076 -       pte_t *ptep, pte;
48077 -
48078 -       if (!pgd_none(*pgd)) {
48079 -               pmd = pmd_offset(pgd, adr);
48080 -               if (!pmd_none(*pmd)) {
48081 -                       ptep = pte_offset(pmd, adr);
48082 -                       pte = *ptep;
48083 -                       if (pte_present(pte)) {
48084 -                               ret = (unsigned long) page_address(pte_page(pte));
48085 -                               ret |= (adr & (PAGE_SIZE-1));
48086 -                       }
48087 -               }
48088 -       }
48089 -       MDEBUG(printk("uv2kva(%lx-->%lx)", adr, ret));
48090 -       return ret;
48091 -}
48092 -
48093  /*
48094   * Here we want the physical address of the memory.
48095 - * This is used when initializing the contents of the
48096 - * area and marking the pages as reserved.
48097 + * This is used when initializing the contents of the area.
48098   */
48099  unsigned long usbvideo_kvirt_to_pa(unsigned long adr)
48100  {
48101 -       unsigned long va, kva, ret;
48102 +       unsigned long kva, ret;
48103  
48104 -       va = VMALLOC_VMADDR(adr);
48105 -       kva = usbvideo_uvirt_to_kva(pgd_offset_k(va), va);
48106 +       kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
48107 +       kva |= adr & (PAGE_SIZE-1); /* restore the offset */
48108         ret = __pa(kva);
48109 -       MDEBUG(printk("kv2pa(%lx-->%lx)", adr, ret));
48110         return ret;
48111  }
48112  
48113  void *usbvideo_rvmalloc(unsigned long size)
48114  {
48115         void *mem;
48116 -       unsigned long adr, page;
48117 -
48118 -       /* Round it off to PAGE_SIZE */
48119 -       size += (PAGE_SIZE - 1);
48120 -       size &= ~(PAGE_SIZE - 1);
48121 +       unsigned long adr;
48122  
48123 +       size = PAGE_ALIGN(size);
48124         mem = vmalloc_32(size);
48125         if (!mem)
48126                 return NULL;
48127 @@ -116,13 +85,9 @@
48128         memset(mem, 0, size); /* Clear the ram out, no junk to the user */
48129         adr = (unsigned long) mem;
48130         while (size > 0) {
48131 -               page = usbvideo_kvirt_to_pa(adr);
48132 -               mem_map_reserve(virt_to_page(__va(page)));
48133 +               mem_map_reserve(vmalloc_to_page((void *)adr));
48134                 adr += PAGE_SIZE;
48135 -               if (size > PAGE_SIZE)
48136 -                       size -= PAGE_SIZE;
48137 -               else
48138 -                       size = 0;
48139 +               size -= PAGE_SIZE;
48140         }
48141  
48142         return mem;
48143 @@ -130,23 +95,16 @@
48144  
48145  void usbvideo_rvfree(void *mem, unsigned long size)
48146  {
48147 -       unsigned long adr, page;
48148 +       unsigned long adr;
48149  
48150         if (!mem)
48151                 return;
48152  
48153 -       size += (PAGE_SIZE - 1);
48154 -       size &= ~(PAGE_SIZE - 1);
48155 -
48156 -       adr=(unsigned long) mem;
48157 -       while (size > 0) {
48158 -               page = usbvideo_kvirt_to_pa(adr);
48159 -               mem_map_unreserve(virt_to_page(__va(page)));
48160 +       adr = (unsigned long) mem;
48161 +       while ((long) size > 0) {
48162 +               mem_map_unreserve(vmalloc_to_page((void *)adr));
48163                 adr += PAGE_SIZE;
48164 -               if (size > PAGE_SIZE)
48165 -                       size -= PAGE_SIZE;
48166 -               else
48167 -                       size = 0;
48168 +               size -= PAGE_SIZE;
48169         }
48170         vfree(mem);
48171  }
48172 @@ -1782,7 +1740,7 @@
48173  /*
48174   * Make all of the blocks of data contiguous
48175   */
48176 -static int usbvideo_CompressIsochronous(uvd_t *uvd, urb_t *urb)
48177 +static int usbvideo_CompressIsochronous(uvd_t *uvd, struct urb *urb)
48178  {
48179         char *cdata;
48180         int i, totlen = 0;
48181 @@ -1897,7 +1855,7 @@
48182         /* We double buffer the Iso lists */
48183         for (i=0; i < USBVIDEO_NUMSBUF; i++) {
48184                 int j, k;
48185 -               urb_t *urb = uvd->sbuf[i].urb;
48186 +               struct urb *urb = uvd->sbuf[i].urb;
48187                 urb->dev = dev;
48188                 urb->context = uvd;
48189                 urb->pipe = usb_rcvisocpipe(dev, uvd->video_endp);
48190 diff -Nur linux-2.4.19.old/drivers/usb/usbvideo.h linux-2.4.19/drivers/usb/usbvideo.h
48191 --- linux-2.4.19.old/drivers/usb/usbvideo.h     Thu Oct 11 08:42:46 2001
48192 +++ linux-2.4.19/drivers/usb/usbvideo.h Mon Nov 25 12:27:13 2002
48193 @@ -165,7 +165,7 @@
48194  /* This structure represents one Isoc request - URB and buffer */
48195  typedef struct {
48196         char *data;
48197 -       urb_t *urb;
48198 +       struct urb *urb;
48199  } usbvideo_sbuf_t;
48200  
48201  typedef struct {
48202 diff -Nur linux-2.4.19.old/drivers/usb/vicam.c linux-2.4.19/drivers/usb/vicam.c
48203 --- linux-2.4.19.old/drivers/usb/vicam.c        Sat Aug  3 02:39:45 2002
48204 +++ linux-2.4.19/drivers/usb/vicam.c    Mon Nov 25 12:27:13 2002
48205 @@ -91,80 +91,25 @@
48206   *
48207   ******************************************************************************/
48208  
48209 -/* [DaveM] I've recoded most of this so that:
48210 - * 1) It's easier to tell what is happening
48211 - * 2) It's more portable, especially for translating things
48212 - *    out of vmalloc mapped areas in the kernel.
48213 - * 3) Less unnecessary translations happen.
48214 - *
48215 - * The code used to assume that the kernel vmalloc mappings
48216 - * existed in the page tables of every process, this is simply
48217 - * not guarenteed.  We now use pgd_offset_k which is the
48218 - * defined way to get at the kernel page tables.
48219 - */
48220 -
48221 -/* Given PGD from the address space's page table, return the kernel
48222 - * virtual mapping of the physical memory mapped at ADR.
48223 - */
48224 -static inline unsigned long uvirt_to_kva(pgd_t *pgd, unsigned long adr)
48225 -{
48226 -       unsigned long ret = 0UL;
48227 -       pmd_t *pmd;
48228 -       pte_t *ptep, pte;
48229 -
48230 -       if (!pgd_none(*pgd)) {
48231 -               pmd = pmd_offset(pgd, adr);
48232 -               if (!pmd_none(*pmd)) {
48233 -                       ptep = pte_offset(pmd, adr);
48234 -                       pte = *ptep;
48235 -                       if(pte_present(pte)) {
48236 -                               ret  = (unsigned long) page_address(pte_page(pte));
48237 -                               ret |= (adr & (PAGE_SIZE - 1));
48238 -
48239 -                       }
48240 -               }
48241 -       }
48242 -       return ret;
48243 -}
48244 -
48245 -static inline unsigned long uvirt_to_bus(unsigned long adr)
48246 -{
48247 -       unsigned long kva, ret;
48248 -
48249 -       kva = uvirt_to_kva(pgd_offset(current->mm, adr), adr);
48250 -       ret = virt_to_bus((void *)kva);
48251 -       return ret;
48252 -}
48253 -
48254 -static inline unsigned long kvirt_to_bus(unsigned long adr)
48255 -{
48256 -       unsigned long va, kva, ret;
48257 -
48258 -       va = VMALLOC_VMADDR(adr);
48259 -       kva = uvirt_to_kva(pgd_offset_k(va), va);
48260 -       ret = virt_to_bus((void *)kva);
48261 -       return ret;
48262 -}
48263 -
48264  /* Here we want the physical address of the memory.
48265 - * This is used when initializing the contents of the
48266 - * area and marking the pages as reserved.
48267 + * This is used when initializing the contents of the area.
48268   */
48269  static inline unsigned long kvirt_to_pa(unsigned long adr)
48270  {
48271 -       unsigned long va, kva, ret;
48272 +       unsigned long kva, ret;
48273  
48274 -       va = VMALLOC_VMADDR(adr);
48275 -       kva = uvirt_to_kva(pgd_offset_k(va), va);
48276 +       kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
48277 +       kva |= adr & (PAGE_SIZE-1); /* restore the offset */
48278         ret = __pa(kva);
48279         return ret;
48280  }
48281  
48282 -static void * rvmalloc(signed long size)
48283 +static void * rvmalloc(unsigned long size)
48284  {
48285         void * mem;
48286 -       unsigned long adr, page;
48287 +       unsigned long adr;
48288  
48289 +       size=PAGE_ALIGN(size);
48290         mem=vmalloc_32(size);
48291         if (mem)
48292         {
48293 @@ -172,8 +117,7 @@
48294                 adr=(unsigned long) mem;
48295                 while (size > 0)
48296                 {
48297 -                       page = kvirt_to_pa(adr);
48298 -                       mem_map_reserve(virt_to_page(__va(page)));
48299 +                       mem_map_reserve(vmalloc_to_page((void *)adr));
48300                         adr+=PAGE_SIZE;
48301                         size-=PAGE_SIZE;
48302                 }
48303 @@ -181,17 +125,16 @@
48304         return mem;
48305  }
48306  
48307 -static void rvfree(void * mem, signed long size)
48308 +static void rvfree(void * mem, unsigned long size)
48309  {
48310 -       unsigned long adr, page;
48311 +       unsigned long adr;
48312  
48313         if (mem)
48314         {
48315                 adr=(unsigned long) mem;
48316 -               while (size > 0)
48317 +               while ((long) size > 0)
48318                 {
48319 -                       page = kvirt_to_pa(adr);
48320 -                       mem_map_unreserve(virt_to_page(__va(page)));
48321 +                       mem_map_unreserve(vmalloc_to_page((void *)adr));
48322                         adr+=PAGE_SIZE;
48323                         size-=PAGE_SIZE;
48324                 }
48325 @@ -532,7 +475,9 @@
48326  
48327         if (!vdev || !buf)
48328                 return -EFAULT;
48329 -
48330 +       
48331 +       if(buflen > 0x1e480)
48332 +               buflen = 0x1e480;
48333         if (copy_to_user(user_buf, buf2, buflen))
48334                 return -EFAULT;
48335         return buflen;
48336 @@ -866,7 +811,7 @@
48337         return 1;
48338  }
48339  
48340 -static void * __devinit vicam_probe(struct usb_device *udev, unsigned int ifnum,
48341 +static void * vicam_probe(struct usb_device *udev, unsigned int ifnum,
48342         const struct usb_device_id *id)
48343  {
48344         struct usb_vicam *vicam;
48345 diff -Nur linux-2.4.19.old/drivers/usb/vicam.h linux-2.4.19/drivers/usb/vicam.h
48346 --- linux-2.4.19.old/drivers/usb/vicam.h        Mon Feb 25 20:38:07 2002
48347 +++ linux-2.4.19/drivers/usb/vicam.h    Mon Nov 25 12:27:13 2002
48348 @@ -68,7 +68,7 @@
48349         /* v4l stuff */
48350         char *camera_name;
48351         char *fbuf;
48352 -       urb_t *urb[VICAM_NUMSBUF];
48353 +       struct urb *urb[VICAM_NUMSBUF];
48354         int sizes;
48355         int *width;
48356         int *height;
48357 diff -Nur linux-2.4.19.old/drivers/usb/vicamurbs.h linux-2.4.19/drivers/usb/vicamurbs.h
48358 --- linux-2.4.19.old/drivers/usb/vicamurbs.h    Mon Feb 25 20:38:07 2002
48359 +++ linux-2.4.19/drivers/usb/vicamurbs.h        Mon Nov 25 12:27:13 2002
48360 @@ -17,12 +17,6 @@
48361  
48362  /* Request 0x51 Image Setup */
48363  
48364 -/* 128x98 ? 0x3180 size */
48365 -static unsigned char s128x98bw[] = {
48366 -  0,    0x34, 0xC4, 0x00, 0x00, 0x00, 0,    0,
48367 -  0x18, 0x02, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00
48368 -};
48369 -
48370  /* 128x122 3D80 size */
48371  static unsigned char s128x122bw[] = {
48372    0,    0x34, 0xF4, 0x00, 0x00, 0x00, 0,    0,
48373 diff -Nur linux-2.4.19.old/drivers/usb/wacom.c linux-2.4.19/drivers/usb/wacom.c
48374 --- linux-2.4.19.old/drivers/usb/wacom.c        Sat Aug  3 02:39:45 2002
48375 +++ linux-2.4.19/drivers/usb/wacom.c    Mon Nov 25 12:27:13 2002
48376 @@ -111,7 +111,6 @@
48377         struct wacom_features *features;
48378         int tool[2];
48379         int open;
48380 -       int x, y;
48381         __u32 serial[2];
48382  };
48383  
48384 @@ -209,16 +208,16 @@
48385                         input_report_abs(dev, ABS_DISTANCE, data[7]);
48386                         input_report_rel(dev, REL_WHEEL, (signed char) data[6]);
48387  
48388 -                       input_report_abs(dev, ABS_X, wacom->x = x);
48389 -                       input_report_abs(dev, ABS_Y, wacom->y = y);
48390 +                       input_report_abs(dev, ABS_X, x);
48391 +                       input_report_abs(dev, ABS_Y, y);
48392  
48393                         input_event(dev, EV_MSC, MSC_SERIAL, data[1] & 0x01);
48394                         return;
48395         }
48396  
48397         if (data[1] & 0x80) {
48398 -               input_report_abs(dev, ABS_X, wacom->x = x);
48399 -               input_report_abs(dev, ABS_Y, wacom->y = y);
48400 +               input_report_abs(dev, ABS_X, x);
48401 +               input_report_abs(dev, ABS_Y, y);
48402         }
48403  
48404         input_report_abs(dev, ABS_PRESSURE, data[6] | ((__u32)data[7] << 8));
48405 @@ -236,7 +235,6 @@
48406         struct input_dev *dev = &wacom->dev;
48407         unsigned int t;
48408         int idx;
48409 -       int x, y; 
48410  
48411         if (urb->status) return;
48412  
48413 @@ -285,11 +283,8 @@
48414                 return;
48415         }
48416  
48417 -       x = ((__u32)data[2] << 8) | data[3];
48418 -       y = ((__u32)data[4] << 8) | data[5];
48419 -       
48420 -       input_report_abs(dev, ABS_X, wacom->x);
48421 -       input_report_abs(dev, ABS_Y, wacom->y);
48422 +       input_report_abs(dev, ABS_X, ((__u32)data[2] << 8) | data[3]);
48423 +       input_report_abs(dev, ABS_Y, ((__u32)data[4] << 8) | data[5]);
48424         input_report_abs(dev, ABS_DISTANCE, data[9] >> 4);
48425         
48426         if ((data[1] & 0xb8) == 0xa0) {                                         /* general pen packet */
48427 --- linux-2.4.19.old/include/linux/usb.h        Sat Aug  3 02:39:46 2002
48428 +++ linux-2.4.19/include/linux/usb.h    Mon Nov 25 12:27:33 2002
48429 @@ -16,8 +16,8 @@
48430  #define USB_CLASS_MASS_STORAGE         8
48431  #define USB_CLASS_HUB                  9
48432  #define USB_CLASS_CDC_DATA             0x0a
48433 -#define USB_CLASS_CSCID                0x0b /* chip+ smart card */
48434 -#define USB_CLASS_CONTENT_SEC          0x0d /* content security */
48435 +#define USB_CLASS_CSCID                        0x0b    /* chip+ smart card */
48436 +#define USB_CLASS_CONTENT_SEC          0x0d    /* content security */
48437  #define USB_CLASS_APP_SPEC             0xfe
48438  #define USB_CLASS_VENDOR_SPEC          0xff
48439  
48440 @@ -42,8 +42,8 @@
48441  /*
48442   * USB directions
48443   */
48444 -#define USB_DIR_OUT                    0
48445 -#define USB_DIR_IN                     0x80
48446 +#define USB_DIR_OUT                    0               /* to device */
48447 +#define USB_DIR_IN                     0x80            /* to host */
48448  
48449  /*
48450   * Descriptor types
48451 @@ -85,23 +85,23 @@
48452  /*
48453   * USB Packet IDs (PIDs)
48454   */
48455 -#define USB_PID_UNDEF_0                        0xf0
48456 -#define USB_PID_OUT                            0xe1
48457 -#define USB_PID_ACK                            0xd2
48458 -#define USB_PID_DATA0                          0xc3
48459 -#define USB_PID_PING                           0xb4    /* USB 2.0 */
48460 -#define USB_PID_SOF                            0xa5
48461 -#define USB_PID_NYET                           0x96    /* USB 2.0 */
48462 -#define USB_PID_DATA2                          0x87    /* USB 2.0 */
48463 -#define USB_PID_SPLIT                          0x78    /* USB 2.0 */
48464 -#define USB_PID_IN                             0x69
48465 -#define USB_PID_NAK                            0x5a
48466 -#define USB_PID_DATA1                          0x4b
48467 -#define USB_PID_PREAMBLE                       0x3c    /* Token mode */
48468 -#define USB_PID_ERR                            0x3c    /* USB 2.0: handshake mode */
48469 -#define USB_PID_SETUP                          0x2d
48470 -#define USB_PID_STALL                          0x1e
48471 -#define USB_PID_MDATA                          0x0f    /* USB 2.0 */
48472 +#define USB_PID_UNDEF_0                        0xf0
48473 +#define USB_PID_OUT                    0xe1
48474 +#define USB_PID_ACK                    0xd2
48475 +#define USB_PID_DATA0                  0xc3
48476 +#define USB_PID_PING                   0xb4    /* USB 2.0 */
48477 +#define USB_PID_SOF                    0xa5
48478 +#define USB_PID_NYET                   0x96    /* USB 2.0 */
48479 +#define USB_PID_DATA2                  0x87    /* USB 2.0 */
48480 +#define USB_PID_SPLIT                  0x78    /* USB 2.0 */
48481 +#define USB_PID_IN                     0x69
48482 +#define USB_PID_NAK                    0x5a
48483 +#define USB_PID_DATA1                  0x4b
48484 +#define USB_PID_PREAMBLE               0x3c    /* Token mode */
48485 +#define USB_PID_ERR                    0x3c    /* USB 2.0: handshake mode */
48486 +#define USB_PID_SETUP                  0x2d
48487 +#define USB_PID_STALL                  0x1e
48488 +#define USB_PID_MDATA                  0x0f    /* USB 2.0 */
48489  
48490  /*
48491   * Standard requests
48492 @@ -152,13 +152,26 @@
48493                 mdelay(ms);
48494  }
48495  
48496 -typedef struct {
48497 -       __u8 requesttype;
48498 -       __u8 request;
48499 -       __u16 value;
48500 -       __u16 index;
48501 -       __u16 length;
48502 -} devrequest __attribute__ ((packed));
48503 +/**
48504 + * struct usb_ctrlrequest - structure used to make USB device control requests easier to create and decode
48505 + * @bRequestType: matches the USB bmRequestType field
48506 + * @bRequest: matches the USB bRequest field
48507 + * @wValue: matches the USB wValue field
48508 + * @wIndex: matches the USB wIndex field
48509 + * @wLength: matches the USB wLength field
48510 + *
48511 + * This structure is used to send control requests to a USB device.  It matches
48512 + * the different fields of the USB 2.0 Spec section 9.3, table 9-2.  See the
48513 + * USB spec for a fuller description of the different fields, and what they are
48514 + * used for.
48515 + */
48516 +struct usb_ctrlrequest {
48517 +       __u8 bRequestType;
48518 +       __u8 bRequest;
48519 +       __u16 wValue;
48520 +       __u16 wIndex;
48521 +       __u16 wLength;
48522 +} __attribute__ ((packed));
48523  
48524  /*
48525   * USB-status codes:
48526 @@ -174,10 +187,10 @@
48527  #define USB_ST_BUFFEROVERRUN   (-ECOMM)
48528  #define USB_ST_BUFFERUNDERRUN  (-ENOSR)
48529  #define USB_ST_INTERNALERROR   (-EPROTO)                       /* unknown error */
48530 -#define USB_ST_SHORT_PACKET            (-EREMOTEIO)
48531 -#define USB_ST_PARTIAL_ERROR   (-EXDEV)                        /* ISO transfer only partially completed */
48532 -#define USB_ST_URB_KILLED      (-ENOENT)                       /* URB canceled by user */
48533 -#define USB_ST_URB_PENDING       (-EINPROGRESS)
48534 +#define USB_ST_SHORT_PACKET    (-EREMOTEIO)
48535 +#define USB_ST_PARTIAL_ERROR   (-EXDEV)                        /* ISO transfer only partially completed */
48536 +#define USB_ST_URB_KILLED      (-ENOENT)                       /* URB canceled by user */
48537 +#define USB_ST_URB_PENDING     (-EINPROGRESS)
48538  #define USB_ST_REMOVED         (-ENODEV)                       /* device not existing or removed */
48539  #define USB_ST_TIMEOUT         (-ETIMEDOUT)                    /* communication timed out, also in urb->status**/
48540  #define USB_ST_NOTSUPPORTED    (-ENOSYS)                       
48541 @@ -385,7 +398,53 @@
48542         unsigned long   driver_info;
48543  };
48544  
48545 +/**
48546 + * struct usb_driver - identifies USB driver to usbcore
48547 + * @owner: Pointer to the module owner of this driver; initialize
48548 + *      it using THIS_MODULE.
48549 + * @name: The driver name should be unique among USB drivers,
48550 + *      and should normally be the same as the module name.
48551 + * @probe: Called to see if the driver is willing to manage a particular
48552 + *      interface on a device.  The probe routine returns a handle that 
48553 + *      will later be provided to disconnect(), or a null pointer to
48554 + *      indicate that the driver will not handle the interface.
48555 + *      The handle is normally a pointer to driver-specific data.
48556 + *      If the probe() routine needs to access the interface
48557 + *      structure itself, use usb_ifnum_to_if() to make sure it's using
48558 + *      the right one.
48559 + * @disconnect: Called when the interface is no longer accessible, usually
48560 + *      because its device has been (or is being) disconnected.  The
48561 + *      handle passed is what was returned by probe(), or was provided
48562 + *      to usb_driver_claim_interface().
48563 + * @ioctl: Used for drivers that want to talk to userspace through
48564 + *      the "usbfs" filesystem.  This lets devices provide ways to
48565 + *      expose information to user space regardless of where they
48566 + *      do (or don't) show up otherwise in the filesystem.
48567 + * @fops: pointer to a fops structure if the driver wants to use the USB
48568 + *     major number.
48569 + * @minor: the starting minor number for this driver, if the fops
48570 + *     pointer is set.
48571 + * @id_table: USB drivers use ID table to support hotplugging.
48572 + *      Export this with MODULE_DEVICE_TABLE(usb,...), or use NULL to
48573 + *      say that probe() should be called for any unclaimed interface.
48574 + *
48575 + * USB drivers must provide a name, probe() and disconnect() methods,
48576 + * and an id_table.  Other driver fields are optional.
48577 + *
48578 + * The id_table is used in hotplugging.  It holds a set of descriptors,
48579 + * and specialized data may be associated with each entry.  That table
48580 + * is used by both user and kernel mode hotplugging support.
48581 + * The probe() and disconnect() methods are called in a context where
48582 + * they can sleep, but they should avoid abusing the privilege.  Most
48583 + * work to connect to a device should be done when the device is opened,
48584 + * and undone at the last close.  The disconnect code needs to address
48585 + * concurrency issues with respect to open() and close() methods, as
48586 + * well as forcing all pending I/O requests to complete (by unlinking
48587 + * them as necessary, and blocking until the unlinks complete).
48588 + */
48589  struct usb_driver {
48590 +       struct module *owner;
48591 +
48592         const char *name;
48593  
48594         void *(*probe)(
48595 @@ -402,18 +461,9 @@
48596  
48597         struct semaphore serialize;
48598  
48599 -       /* ioctl -- userspace apps can talk to drivers through usbdevfs */
48600         int (*ioctl)(struct usb_device *dev, unsigned int code, void *buf);
48601  
48602 -       /* support for "new-style" USB hotplugging
48603 -        * binding policy can be driven from user mode too
48604 -        */
48605         const struct usb_device_id *id_table;
48606 -
48607 -       /* suspend before the bus suspends;
48608 -        * disconnect or resume when the bus resumes */
48609 -       // void (*suspend)(struct usb_device *dev);
48610 -       // void (*resume)(struct usb_device *dev);
48611  };
48612         
48613  /*----------------------------------------------------------------------------* 
48614 @@ -423,28 +473,31 @@
48615  /*
48616   * urb->transfer_flags:
48617   */
48618 -#define USB_DISABLE_SPD         0x0001
48619 -#define USB_ISO_ASAP            0x0002
48620 -#define USB_ASYNC_UNLINK        0x0008
48621 -#define USB_QUEUE_BULK          0x0010
48622 +#define USB_DISABLE_SPD                0x0001
48623 +#define URB_SHORT_NOT_OK       USB_DISABLE_SPD
48624 +#define USB_ISO_ASAP           0x0002
48625 +#define USB_ASYNC_UNLINK       0x0008
48626 +#define USB_QUEUE_BULK         0x0010
48627  #define USB_NO_FSBR            0x0020
48628 -#define USB_ZERO_PACKET         0x0040  // Finish bulk OUTs always with zero length packet
48629 +#define USB_ZERO_PACKET                0x0040  // Finish bulk OUTs always with zero length packet
48630  #define URB_NO_INTERRUPT       0x0080  /* HINT: no non-error interrupt needed */
48631                                         /* ... less overhead for QUEUE_BULK */
48632  #define USB_TIMEOUT_KILLED     0x1000  // only set by HCD!
48633  
48634 -typedef struct
48635 +struct iso_packet_descriptor
48636  {
48637         unsigned int offset;
48638         unsigned int length;            // expected length
48639         unsigned int actual_length;
48640         unsigned int status;
48641 -} iso_packet_descriptor_t, *piso_packet_descriptor_t;
48642 +};
48643 +
48644 +#define usb_iso_packet_descriptor      iso_packet_descriptor
48645  
48646  struct urb;
48647  typedef void (*usb_complete_t)(struct urb *);
48648  
48649 -typedef struct urb
48650 +struct urb
48651  {
48652         spinlock_t lock;                // lock for the URB
48653         void *hcpriv;                   // private data for host controller
48654 @@ -455,10 +508,12 @@
48655         int status;                     // returned status
48656         unsigned int transfer_flags;    // USB_DISABLE_SPD | USB_ISO_ASAP | etc.
48657         void *transfer_buffer;          // associated data buffer
48658 +       dma_addr_t transfer_dma;        // dma addr for transfer_buffer
48659         int transfer_buffer_length;     // data buffer length
48660         int actual_length;              // actual data buffer length    
48661         int bandwidth;                  // bandwidth for this transfer request (INT or ISO)
48662         unsigned char *setup_packet;    // setup packet (control only)
48663 +       dma_addr_t setup_dma;           // dma addr for setup_packet
48664         //
48665         int start_frame;                // start frame (iso/irq only)
48666         int number_of_packets;          // number of packets in this request (iso)
48667 @@ -469,8 +524,8 @@
48668         void *context;                  // context for completion routine
48669         usb_complete_t complete;        // pointer to completion routine
48670         //
48671 -       iso_packet_descriptor_t iso_frame_desc[0];
48672 -} urb_t, *purb_t;
48673 +       struct iso_packet_descriptor iso_frame_desc[0];
48674 +};
48675  
48676  /**
48677   * FILL_CONTROL_URB - macro to help initialize a control urb
48678 @@ -675,11 +730,11 @@
48679         urb->start_frame = -1;
48680  }
48681  
48682 -purb_t usb_alloc_urb(int iso_packets);
48683 -void usb_free_urb (purb_t purb);
48684 -int usb_submit_urb(purb_t purb);
48685 -int usb_unlink_urb(purb_t purb);
48686 -int usb_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe, devrequest *cmd,  void *data, int len, int timeout);
48687 +struct urb *usb_alloc_urb(int iso_packets);
48688 +void usb_free_urb (struct urb *urb);
48689 +int usb_submit_urb(struct urb *urb);
48690 +int usb_unlink_urb(struct urb *urb);
48691 +int usb_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe, struct usb_ctrlrequest *cmd,  void *data, int len, int timeout);
48692  int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, void *data, int len, int *actual_length, int timeout);
48693  
48694  /*-------------------------------------------------------------------*
48695 @@ -710,6 +765,7 @@
48696   */
48697  struct usb_bus {
48698         int busnum;                     /* Bus number (in order of reg) */
48699 +       char *bus_name;                 /* stable id (PCI slot_name etc) */
48700  
48701  #ifdef DEVNUM_ROUND_ROBIN
48702         int devnum_next;                /* Next open device number in round-robin allocation */
48703 @@ -758,7 +814,8 @@
48704  #define USB_MAXCHILDREN                (16)
48705  
48706  struct usb_device {
48707 -       int devnum;                     /* Device number on USB bus */
48708 +       int             devnum;         /* Address on USB bus */
48709 +       char            devpath [16];   /* Use in messages: /port/port/... */
48710  
48711         enum {
48712                 USB_SPEED_UNKNOWN = 0,                  /* enumerating */
48713 @@ -833,10 +890,6 @@
48714  extern void usb_inc_dev_use(struct usb_device *);
48715  #define usb_dec_dev_use usb_free_dev
48716  
48717 -extern int usb_check_bandwidth (struct usb_device *dev, struct urb *urb);
48718 -extern void usb_claim_bandwidth (struct usb_device *dev, struct urb *urb, int bustime, int isoc);
48719 -extern void usb_release_bandwidth(struct usb_device *dev, struct urb *urb, int isoc);
48720 -
48721  extern int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype, __u16 value, __u16 index, void *data, __u16 size, int timeout);
48722  
48723  extern int usb_root_hub_string(int id, int serial, char *type, __u8 *data, int len);
48724 @@ -847,6 +900,42 @@
48725  
48726  int usb_get_current_frame_number (struct usb_device *usb_dev);
48727  
48728 +
48729 +/**
48730 + * usb_make_path - returns stable device path in the usb tree
48731 + * @dev: the device whose path is being constructed
48732 + * @buf: where to put the string
48733 + * @size: how big is "buf"?
48734 + *
48735 + * Returns length of the string (> 0) or negative if size was too small.
48736 + *
48737 + * This identifier is intended to be "stable", reflecting physical paths in
48738 + * hardware such as physical bus addresses for host controllers or ports on
48739 + * USB hubs.  That makes it stay the same until systems are physically
48740 + * reconfigured, by re-cabling a tree of USB devices or by moving USB host
48741 + * controllers.  Adding and removing devices, including virtual root hubs
48742 + * in host controller driver modules, does not change these path identifers;
48743 + * neither does rebooting or re-enumerating.  These are more useful identifiers
48744 + * than changeable ("unstable") ones like bus numbers or device addresses.
48745 + * (The stability of the id depends on stability of the bus_name associated
48746 + * with the bus the device uses; that is normally stable.)
48747 + *
48748 + * With a partial exception for devices connected to USB 2.0 root hubs, these
48749 + * identifiers are also predictable.  So long as the device tree isn't changed,
48750 + * plugging any USB device into a given hub port always gives it the same path.
48751 + * Because of the use of "companion" controllers, devices connected to ports on
48752 + * USB 2.0 root hubs (EHCI host controllers) will get one path ID if they are
48753 + * high speed, and a different one if they are full or low speed.
48754 + */
48755 +static inline int usb_make_path (struct usb_device *dev, char *buf, size_t size)
48756 +{
48757 +       int actual;
48758 +       actual = snprintf (buf, size, "usb-%s-%s",
48759 +               dev->bus->bus_name, dev->devpath);
48760 +       return (actual >= size) ? -1 : actual;
48761 +}
48762 +
48763 +
48764  /*
48765   * Calling this entity a "pipe" is glorifying it. A USB pipe
48766   * is something embarrassingly simple: it basically consists
48767 @@ -973,26 +1062,6 @@
48768         __usb_get_extra_descriptor((ifpoint)->extra,(ifpoint)->extralen,type,(void**)ptr)
48769  
48770  /*
48771 - * Some USB bandwidth allocation constants.
48772 - */
48773 -#define BW_HOST_DELAY  1000L           /* nanoseconds */
48774 -#define BW_HUB_LS_SETUP        333L            /* nanoseconds */
48775 -                        /* 4 full-speed bit times (est.) */
48776 -
48777 -#define FRAME_TIME_BITS         12000L         /* frame = 1 millisecond */
48778 -#define FRAME_TIME_MAX_BITS_ALLOC      (90L * FRAME_TIME_BITS / 100L)
48779 -#define FRAME_TIME_USECS       1000L
48780 -#define FRAME_TIME_MAX_USECS_ALLOC     (90L * FRAME_TIME_USECS / 100L)
48781 -
48782 -#define BitTime(bytecount)  (7 * 8 * bytecount / 6)  /* with integer truncation */
48783 -               /* Trying not to use worst-case bit-stuffing
48784 -                   of (7/6 * 8 * bytecount) = 9.33 * bytecount */
48785 -               /* bytecount = data payload byte count */
48786 -
48787 -#define NS_TO_US(ns)   ((ns + 500L) / 1000L)
48788 -                       /* convert & round nanoseconds to microseconds */
48789 -
48790 -/*
48791   * Debugging helpers..
48792   */
48793  void usb_show_device_descriptor(struct usb_device_descriptor *);
This page took 3.873424 seconds and 3 git commands to generate.