]> git.pld-linux.org Git - packages/kernel.git/blob - linux-2.4.20-rc1-USB.patch
- obsolete
[packages/kernel.git] / linux-2.4.20-rc1-USB.patch
1 --- linux-2.4.19.org/include/linux/usb.h        Sat Aug  3 02:39:46 2002
2 +++ linux-2.4.19/include/linux/usb.h    Thu Oct 31 08:11:53 2002
3 @@ -16,8 +16,8 @@
4  #define USB_CLASS_MASS_STORAGE         8
5  #define USB_CLASS_HUB                  9
6  #define USB_CLASS_CDC_DATA             0x0a
7 -#define USB_CLASS_CSCID                0x0b /* chip+ smart card */
8 -#define USB_CLASS_CONTENT_SEC          0x0d /* content security */
9 +#define USB_CLASS_CSCID                        0x0b    /* chip+ smart card */
10 +#define USB_CLASS_CONTENT_SEC          0x0d    /* content security */
11  #define USB_CLASS_APP_SPEC             0xfe
12  #define USB_CLASS_VENDOR_SPEC          0xff
13  
14 @@ -42,8 +42,8 @@
15  /*
16   * USB directions
17   */
18 -#define USB_DIR_OUT                    0
19 -#define USB_DIR_IN                     0x80
20 +#define USB_DIR_OUT                    0               /* to device */
21 +#define USB_DIR_IN                     0x80            /* to host */
22  
23  /*
24   * Descriptor types
25 @@ -85,23 +85,23 @@
26  /*
27   * USB Packet IDs (PIDs)
28   */
29 -#define USB_PID_UNDEF_0                        0xf0
30 -#define USB_PID_OUT                            0xe1
31 -#define USB_PID_ACK                            0xd2
32 -#define USB_PID_DATA0                          0xc3
33 -#define USB_PID_PING                           0xb4    /* USB 2.0 */
34 -#define USB_PID_SOF                            0xa5
35 -#define USB_PID_NYET                           0x96    /* USB 2.0 */
36 -#define USB_PID_DATA2                          0x87    /* USB 2.0 */
37 -#define USB_PID_SPLIT                          0x78    /* USB 2.0 */
38 -#define USB_PID_IN                             0x69
39 -#define USB_PID_NAK                            0x5a
40 -#define USB_PID_DATA1                          0x4b
41 -#define USB_PID_PREAMBLE                       0x3c    /* Token mode */
42 -#define USB_PID_ERR                            0x3c    /* USB 2.0: handshake mode */
43 -#define USB_PID_SETUP                          0x2d
44 -#define USB_PID_STALL                          0x1e
45 -#define USB_PID_MDATA                          0x0f    /* USB 2.0 */
46 +#define USB_PID_UNDEF_0                        0xf0
47 +#define USB_PID_OUT                    0xe1
48 +#define USB_PID_ACK                    0xd2
49 +#define USB_PID_DATA0                  0xc3
50 +#define USB_PID_PING                   0xb4    /* USB 2.0 */
51 +#define USB_PID_SOF                    0xa5
52 +#define USB_PID_NYET                   0x96    /* USB 2.0 */
53 +#define USB_PID_DATA2                  0x87    /* USB 2.0 */
54 +#define USB_PID_SPLIT                  0x78    /* USB 2.0 */
55 +#define USB_PID_IN                     0x69
56 +#define USB_PID_NAK                    0x5a
57 +#define USB_PID_DATA1                  0x4b
58 +#define USB_PID_PREAMBLE               0x3c    /* Token mode */
59 +#define USB_PID_ERR                    0x3c    /* USB 2.0: handshake mode */
60 +#define USB_PID_SETUP                  0x2d
61 +#define USB_PID_STALL                  0x1e
62 +#define USB_PID_MDATA                  0x0f    /* USB 2.0 */
63  
64  /*
65   * Standard requests
66 @@ -152,13 +152,26 @@
67                 mdelay(ms);
68  }
69  
70 -typedef struct {
71 -       __u8 requesttype;
72 -       __u8 request;
73 -       __u16 value;
74 -       __u16 index;
75 -       __u16 length;
76 -} devrequest __attribute__ ((packed));
77 +/**
78 + * struct usb_ctrlrequest - structure used to make USB device control requests easier to create and decode
79 + * @bRequestType: matches the USB bmRequestType field
80 + * @bRequest: matches the USB bRequest field
81 + * @wValue: matches the USB wValue field
82 + * @wIndex: matches the USB wIndex field
83 + * @wLength: matches the USB wLength field
84 + *
85 + * This structure is used to send control requests to a USB device.  It matches
86 + * the different fields of the USB 2.0 Spec section 9.3, table 9-2.  See the
87 + * USB spec for a fuller description of the different fields, and what they are
88 + * used for.
89 + */
90 +struct usb_ctrlrequest {
91 +       __u8 bRequestType;
92 +       __u8 bRequest;
93 +       __u16 wValue;
94 +       __u16 wIndex;
95 +       __u16 wLength;
96 +} __attribute__ ((packed));
97  
98  /*
99   * USB-status codes:
100 @@ -174,10 +187,10 @@
101  #define USB_ST_BUFFEROVERRUN   (-ECOMM)
102  #define USB_ST_BUFFERUNDERRUN  (-ENOSR)
103  #define USB_ST_INTERNALERROR   (-EPROTO)                       /* unknown error */
104 -#define USB_ST_SHORT_PACKET            (-EREMOTEIO)
105 -#define USB_ST_PARTIAL_ERROR   (-EXDEV)                        /* ISO transfer only partially completed */
106 -#define USB_ST_URB_KILLED      (-ENOENT)                       /* URB canceled by user */
107 -#define USB_ST_URB_PENDING       (-EINPROGRESS)
108 +#define USB_ST_SHORT_PACKET    (-EREMOTEIO)
109 +#define USB_ST_PARTIAL_ERROR   (-EXDEV)                        /* ISO transfer only partially completed */
110 +#define USB_ST_URB_KILLED      (-ENOENT)                       /* URB canceled by user */
111 +#define USB_ST_URB_PENDING     (-EINPROGRESS)
112  #define USB_ST_REMOVED         (-ENODEV)                       /* device not existing or removed */
113  #define USB_ST_TIMEOUT         (-ETIMEDOUT)                    /* communication timed out, also in urb->status**/
114  #define USB_ST_NOTSUPPORTED    (-ENOSYS)                       
115 @@ -385,7 +398,53 @@
116         unsigned long   driver_info;
117  };
118  
119 +/**
120 + * struct usb_driver - identifies USB driver to usbcore
121 + * @owner: Pointer to the module owner of this driver; initialize
122 + *      it using THIS_MODULE.
123 + * @name: The driver name should be unique among USB drivers,
124 + *      and should normally be the same as the module name.
125 + * @probe: Called to see if the driver is willing to manage a particular
126 + *      interface on a device.  The probe routine returns a handle that 
127 + *      will later be provided to disconnect(), or a null pointer to
128 + *      indicate that the driver will not handle the interface.
129 + *      The handle is normally a pointer to driver-specific data.
130 + *      If the probe() routine needs to access the interface
131 + *      structure itself, use usb_ifnum_to_if() to make sure it's using
132 + *      the right one.
133 + * @disconnect: Called when the interface is no longer accessible, usually
134 + *      because its device has been (or is being) disconnected.  The
135 + *      handle passed is what was returned by probe(), or was provided
136 + *      to usb_driver_claim_interface().
137 + * @ioctl: Used for drivers that want to talk to userspace through
138 + *      the "usbfs" filesystem.  This lets devices provide ways to
139 + *      expose information to user space regardless of where they
140 + *      do (or don't) show up otherwise in the filesystem.
141 + * @fops: pointer to a fops structure if the driver wants to use the USB
142 + *     major number.
143 + * @minor: the starting minor number for this driver, if the fops
144 + *     pointer is set.
145 + * @id_table: USB drivers use ID table to support hotplugging.
146 + *      Export this with MODULE_DEVICE_TABLE(usb,...), or use NULL to
147 + *      say that probe() should be called for any unclaimed interface.
148 + *
149 + * USB drivers must provide a name, probe() and disconnect() methods,
150 + * and an id_table.  Other driver fields are optional.
151 + *
152 + * The id_table is used in hotplugging.  It holds a set of descriptors,
153 + * and specialized data may be associated with each entry.  That table
154 + * is used by both user and kernel mode hotplugging support.
155 + * The probe() and disconnect() methods are called in a context where
156 + * they can sleep, but they should avoid abusing the privilege.  Most
157 + * work to connect to a device should be done when the device is opened,
158 + * and undone at the last close.  The disconnect code needs to address
159 + * concurrency issues with respect to open() and close() methods, as
160 + * well as forcing all pending I/O requests to complete (by unlinking
161 + * them as necessary, and blocking until the unlinks complete).
162 + */
163  struct usb_driver {
164 +       struct module *owner;
165 +
166         const char *name;
167  
168         void *(*probe)(
169 @@ -402,18 +461,9 @@
170  
171         struct semaphore serialize;
172  
173 -       /* ioctl -- userspace apps can talk to drivers through usbdevfs */
174         int (*ioctl)(struct usb_device *dev, unsigned int code, void *buf);
175  
176 -       /* support for "new-style" USB hotplugging
177 -        * binding policy can be driven from user mode too
178 -        */
179         const struct usb_device_id *id_table;
180 -
181 -       /* suspend before the bus suspends;
182 -        * disconnect or resume when the bus resumes */
183 -       // void (*suspend)(struct usb_device *dev);
184 -       // void (*resume)(struct usb_device *dev);
185  };
186         
187  /*----------------------------------------------------------------------------* 
188 @@ -423,28 +473,31 @@
189  /*
190   * urb->transfer_flags:
191   */
192 -#define USB_DISABLE_SPD         0x0001
193 -#define USB_ISO_ASAP            0x0002
194 -#define USB_ASYNC_UNLINK        0x0008
195 -#define USB_QUEUE_BULK          0x0010
196 +#define USB_DISABLE_SPD                0x0001
197 +#define URB_SHORT_NOT_OK       USB_DISABLE_SPD
198 +#define USB_ISO_ASAP           0x0002
199 +#define USB_ASYNC_UNLINK       0x0008
200 +#define USB_QUEUE_BULK         0x0010
201  #define USB_NO_FSBR            0x0020
202 -#define USB_ZERO_PACKET         0x0040  // Finish bulk OUTs always with zero length packet
203 +#define USB_ZERO_PACKET                0x0040  // Finish bulk OUTs always with zero length packet
204  #define URB_NO_INTERRUPT       0x0080  /* HINT: no non-error interrupt needed */
205                                         /* ... less overhead for QUEUE_BULK */
206  #define USB_TIMEOUT_KILLED     0x1000  // only set by HCD!
207  
208 -typedef struct
209 +struct iso_packet_descriptor
210  {
211         unsigned int offset;
212         unsigned int length;            // expected length
213         unsigned int actual_length;
214         unsigned int status;
215 -} iso_packet_descriptor_t, *piso_packet_descriptor_t;
216 +};
217 +
218 +#define usb_iso_packet_descriptor      iso_packet_descriptor
219  
220  struct urb;
221  typedef void (*usb_complete_t)(struct urb *);
222  
223 -typedef struct urb
224 +struct urb
225  {
226         spinlock_t lock;                // lock for the URB
227         void *hcpriv;                   // private data for host controller
228 @@ -455,10 +508,12 @@
229         int status;                     // returned status
230         unsigned int transfer_flags;    // USB_DISABLE_SPD | USB_ISO_ASAP | etc.
231         void *transfer_buffer;          // associated data buffer
232 +       dma_addr_t transfer_dma;        // dma addr for transfer_buffer
233         int transfer_buffer_length;     // data buffer length
234         int actual_length;              // actual data buffer length    
235         int bandwidth;                  // bandwidth for this transfer request (INT or ISO)
236         unsigned char *setup_packet;    // setup packet (control only)
237 +       dma_addr_t setup_dma;           // dma addr for setup_packet
238         //
239         int start_frame;                // start frame (iso/irq only)
240         int number_of_packets;          // number of packets in this request (iso)
241 @@ -469,8 +524,8 @@
242         void *context;                  // context for completion routine
243         usb_complete_t complete;        // pointer to completion routine
244         //
245 -       iso_packet_descriptor_t iso_frame_desc[0];
246 -} urb_t, *purb_t;
247 +       struct iso_packet_descriptor iso_frame_desc[0];
248 +};
249  
250  /**
251   * FILL_CONTROL_URB - macro to help initialize a control urb
252 @@ -675,11 +730,11 @@
253         urb->start_frame = -1;
254  }
255  
256 -purb_t usb_alloc_urb(int iso_packets);
257 -void usb_free_urb (purb_t purb);
258 -int usb_submit_urb(purb_t purb);
259 -int usb_unlink_urb(purb_t purb);
260 -int usb_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe, devrequest *cmd,  void *data, int len, int timeout);
261 +struct urb *usb_alloc_urb(int iso_packets);
262 +void usb_free_urb (struct urb *urb);
263 +int usb_submit_urb(struct urb *urb);
264 +int usb_unlink_urb(struct urb *urb);
265 +int usb_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe, struct usb_ctrlrequest *cmd,  void *data, int len, int timeout);
266  int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, void *data, int len, int *actual_length, int timeout);
267  
268  /*-------------------------------------------------------------------*
269 @@ -710,6 +765,7 @@
270   */
271  struct usb_bus {
272         int busnum;                     /* Bus number (in order of reg) */
273 +       char *bus_name;                 /* stable id (PCI slot_name etc) */
274  
275  #ifdef DEVNUM_ROUND_ROBIN
276         int devnum_next;                /* Next open device number in round-robin allocation */
277 @@ -758,7 +814,8 @@
278  #define USB_MAXCHILDREN                (16)
279  
280  struct usb_device {
281 -       int devnum;                     /* Device number on USB bus */
282 +       int             devnum;         /* Address on USB bus */
283 +       char            devpath [16];   /* Use in messages: /port/port/... */
284  
285         enum {
286                 USB_SPEED_UNKNOWN = 0,                  /* enumerating */
287 @@ -833,10 +890,6 @@
288  extern void usb_inc_dev_use(struct usb_device *);
289  #define usb_dec_dev_use usb_free_dev
290  
291 -extern int usb_check_bandwidth (struct usb_device *dev, struct urb *urb);
292 -extern void usb_claim_bandwidth (struct usb_device *dev, struct urb *urb, int bustime, int isoc);
293 -extern void usb_release_bandwidth(struct usb_device *dev, struct urb *urb, int isoc);
294 -
295  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);
296  
297  extern int usb_root_hub_string(int id, int serial, char *type, __u8 *data, int len);
298 @@ -847,6 +900,42 @@
299  
300  int usb_get_current_frame_number (struct usb_device *usb_dev);
301  
302 +
303 +/**
304 + * usb_make_path - returns stable device path in the usb tree
305 + * @dev: the device whose path is being constructed
306 + * @buf: where to put the string
307 + * @size: how big is "buf"?
308 + *
309 + * Returns length of the string (> 0) or negative if size was too small.
310 + *
311 + * This identifier is intended to be "stable", reflecting physical paths in
312 + * hardware such as physical bus addresses for host controllers or ports on
313 + * USB hubs.  That makes it stay the same until systems are physically
314 + * reconfigured, by re-cabling a tree of USB devices or by moving USB host
315 + * controllers.  Adding and removing devices, including virtual root hubs
316 + * in host controller driver modules, does not change these path identifers;
317 + * neither does rebooting or re-enumerating.  These are more useful identifiers
318 + * than changeable ("unstable") ones like bus numbers or device addresses.
319 + * (The stability of the id depends on stability of the bus_name associated
320 + * with the bus the device uses; that is normally stable.)
321 + *
322 + * With a partial exception for devices connected to USB 2.0 root hubs, these
323 + * identifiers are also predictable.  So long as the device tree isn't changed,
324 + * plugging any USB device into a given hub port always gives it the same path.
325 + * Because of the use of "companion" controllers, devices connected to ports on
326 + * USB 2.0 root hubs (EHCI host controllers) will get one path ID if they are
327 + * high speed, and a different one if they are full or low speed.
328 + */
329 +static inline int usb_make_path (struct usb_device *dev, char *buf, size_t size)
330 +{
331 +       int actual;
332 +       actual = snprintf (buf, size, "usb-%s-%s",
333 +               dev->bus->bus_name, dev->devpath);
334 +       return (actual >= size) ? -1 : actual;
335 +}
336 +
337 +
338  /*
339   * Calling this entity a "pipe" is glorifying it. A USB pipe
340   * is something embarrassingly simple: it basically consists
341 @@ -973,26 +1062,6 @@
342         __usb_get_extra_descriptor((ifpoint)->extra,(ifpoint)->extralen,type,(void**)ptr)
343  
344  /*
345 - * Some USB bandwidth allocation constants.
346 - */
347 -#define BW_HOST_DELAY  1000L           /* nanoseconds */
348 -#define BW_HUB_LS_SETUP        333L            /* nanoseconds */
349 -                        /* 4 full-speed bit times (est.) */
350 -
351 -#define FRAME_TIME_BITS         12000L         /* frame = 1 millisecond */
352 -#define FRAME_TIME_MAX_BITS_ALLOC      (90L * FRAME_TIME_BITS / 100L)
353 -#define FRAME_TIME_USECS       1000L
354 -#define FRAME_TIME_MAX_USECS_ALLOC     (90L * FRAME_TIME_USECS / 100L)
355 -
356 -#define BitTime(bytecount)  (7 * 8 * bytecount / 6)  /* with integer truncation */
357 -               /* Trying not to use worst-case bit-stuffing
358 -                   of (7/6 * 8 * bytecount) = 9.33 * bytecount */
359 -               /* bytecount = data payload byte count */
360 -
361 -#define NS_TO_US(ns)   ((ns + 500L) / 1000L)
362 -                       /* convert & round nanoseconds to microseconds */
363 -
364 -/*
365   * Debugging helpers..
366   */
367  void usb_show_device_descriptor(struct usb_device_descriptor *);
368 diff -Nur linux-2.4.19.org/drivers/usb/CDCEther.c linux-2.4.19/drivers/usb/CDCEther.c
369 --- linux-2.4.19.org/drivers/usb/CDCEther.c     Sat Aug  3 02:39:44 2002
370 +++ linux-2.4.19/drivers/usb/CDCEther.c Thu Oct 31 08:11:20 2002
371 @@ -148,7 +148,7 @@
372         // Give this to the USB subsystem so it can tell us 
373         // when more data arrives.
374         if ( (res = usb_submit_urb(&ether_dev->rx_urb)) ) {
375 -               warn( __FUNCTION__ " failed submit rx_urb %d", res);
376 +               warn("%s failed submit rx_urb %d", __FUNCTION__, res);
377         }
378         
379         // We are no longer busy, show us the frames!!!
380 @@ -379,7 +379,7 @@
381  
382         // Turn on the USB and let the packets flow!!!
383         if ( (res = enable_net_traffic( ether_dev )) ) {
384 -               err( __FUNCTION__ "can't enable_net_traffic() - %d", res );
385 +               err("%s can't enable_net_traffic() - %d", __FUNCTION__, res );
386                 return -EIO;
387         }
388  
389 @@ -392,7 +392,7 @@
390         /* Put it out there so the device can send us stuff */
391         if ( (res = usb_submit_urb(&ether_dev->rx_urb)) ) {
392                 /* Hmm...  Okay... */
393 -               warn( __FUNCTION__ " failed rx_urb %d", res );
394 +               warn( "%s failed rx_urb %d", __FUNCTION__, res );
395         }
396  
397         if (ether_dev->properties & HAVE_NOTIFICATION_ELEMENT) {
398 @@ -406,7 +406,7 @@
399                         ether_dev,
400                         ether_dev->intr_interval);
401                 if ( (res = usb_submit_urb(&ether_dev->intr_urb)) ) {
402 -                       warn( __FUNCTION__ " failed intr_urb %d", res );
403 +                       warn("%s failed intr_urb %d", __FUNCTION__, res );
404                 }
405         }
406  
407 @@ -497,14 +497,14 @@
408  static void CDC_SetEthernetPacketFilter (ether_dev_t *ether_dev)
409  {
410  #if 0
411 -       devrequest *dr = &ether_dev->ctrl_dr;
412 +       struct usb_ctrlrequest *dr = &ether_dev->ctrl_dr;
413         int res;
414  
415 -       dr->requesttype = USB_TYPE_CLASS | USB_DIR_OUT | USB_RECIP_INTERFACE;
416 -       dr->request = SET_ETHERNET_PACKET_FILTER;
417 -       dr->value = cpu_to_le16(ether_dev->mode_flags);
418 -       dr->index = cpu_to_le16((u16)ether_dev->comm_interface);
419 -       dr->length = 0;
420 +       dr->bRequestType = USB_TYPE_CLASS | USB_DIR_OUT | USB_RECIP_INTERFACE;
421 +       dr->bRequest = SET_ETHERNET_PACKET_FILTER;
422 +       dr->wValue = cpu_to_le16(ether_dev->mode_flags);
423 +       dr->wIndex = cpu_to_le16((u16)ether_dev->comm_interface);
424 +       dr->wLength = 0;
425  
426         FILL_CONTROL_URB(&ether_dev->ctrl_urb,
427                         ether_dev->usb,
428 @@ -515,7 +515,7 @@
429                         setpktfilter_done,
430                         ether_dev);
431         if ( (res = usb_submit_urb(&ether_dev->ctrl_urb)) ) {
432 -               warn( __FUNCTION__ " failed submit ctrl_urb %d", res);
433 +               warn("%s failed submit ctrl_urb %d", __FUNCTION__, res);
434         }
435  #endif
436  
437 diff -Nur linux-2.4.19.org/drivers/usb/CDCEther.h linux-2.4.19/drivers/usb/CDCEther.h
438 --- linux-2.4.19.org/drivers/usb/CDCEther.h     Sat Aug  3 02:39:44 2002
439 +++ linux-2.4.19/drivers/usb/CDCEther.h Thu Oct 31 08:11:20 2002
440 @@ -75,7 +75,7 @@
441         __u8                    bNumberPowerFilters;
442         __u16                   mode_flags;
443         int                     intr_interval;
444 -       devrequest              ctrl_dr;
445 +       struct usb_ctrlrequest  ctrl_dr;
446         struct urb              rx_urb, tx_urb, intr_urb, ctrl_urb;
447         unsigned char           rx_buff[CDC_ETHER_MAX_MTU] __attribute__((aligned(L1_CACHE_BYTES)));
448         unsigned char           tx_buff[CDC_ETHER_MAX_MTU] __attribute__((aligned(L1_CACHE_BYTES)));
449 diff -Nur linux-2.4.19.org/drivers/usb/Config.in linux-2.4.19/drivers/usb/Config.in
450 --- linux-2.4.19.org/drivers/usb/Config.in      Sat Aug  3 02:39:44 2002
451 +++ linux-2.4.19/drivers/usb/Config.in  Thu Oct 31 08:11:20 2002
452 @@ -33,6 +33,7 @@
453     dep_tristate '  USB Audio support' CONFIG_USB_AUDIO $CONFIG_USB $CONFIG_SOUND
454     dep_tristate '    EMI 2|6 USB Audio interface support' CONFIG_USB_EMI26 $CONFIG_USB_AUDIO
455     dep_tristate '  USB Bluetooth support (EXPERIMENTAL)' CONFIG_USB_BLUETOOTH $CONFIG_USB $CONFIG_EXPERIMENTAL
456 +   dep_tristate '  USB MIDI support' CONFIG_USB_MIDI $CONFIG_USB
457     if [ "$CONFIG_SCSI" = "n" ]; then
458        comment '  SCSI support is needed for USB Storage'
459     fi
460 @@ -44,6 +45,7 @@
461        dep_mbool '    Microtech CompactFlash/SmartMedia support' CONFIG_USB_STORAGE_DPCM $CONFIG_USB_STORAGE
462        dep_mbool '    HP CD-Writer 82xx support' CONFIG_USB_STORAGE_HP8200e $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
463        dep_mbool '    SanDisk SDDR-09 (and other SmartMedia) support' CONFIG_USB_STORAGE_SDDR09 $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
464 +      dep_mbool '    SanDisk SDDR-55 SmartMedia support' CONFIG_USB_STORAGE_SDDR55 $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
465        dep_mbool '    Lexar Jumpshot Compact Flash Reader' CONFIG_USB_STORAGE_JUMPSHOT $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
466     dep_tristate '  USB Modem (CDC ACM) support' CONFIG_USB_ACM $CONFIG_USB
467     dep_tristate '  USB Printer support' CONFIG_USB_PRINTER $CONFIG_USB
468 @@ -59,6 +61,7 @@
469        dep_tristate '  USB HIDBP Keyboard (basic) support' CONFIG_USB_KBD $CONFIG_USB $CONFIG_INPUT
470        dep_tristate '  USB HIDBP Mouse (basic) support' CONFIG_USB_MOUSE $CONFIG_USB $CONFIG_INPUT
471     fi
472 +   dep_tristate '  Aiptek 6000U/8000U tablet support' CONFIG_USB_AIPTEK $CONFIG_USB $CONFIG_INPUT
473     dep_tristate '  Wacom Intuos/Graphire tablet support' CONFIG_USB_WACOM $CONFIG_USB $CONFIG_INPUT
474  
475     comment 'USB Imaging devices'
476 @@ -101,6 +104,8 @@
477     comment 'USB Miscellaneous drivers'
478     dep_tristate '  USB Diamond Rio500 support (EXPERIMENTAL)' CONFIG_USB_RIO500 $CONFIG_USB $CONFIG_EXPERIMENTAL
479     dep_tristate '  USB Auerswald ISDN support (EXPERIMENTAL)' CONFIG_USB_AUERSWALD $CONFIG_USB $CONFIG_EXPERIMENTAL
480 +   dep_tristate '  Texas Instruments Graph Link USB (aka SilverLink) cable support' CONFIG_USB_TIGL $CONFIG_USB
481     dep_tristate '  Tieman Voyager USB Braille display support (EXPERIMENTAL)' CONFIG_USB_BRLVGER $CONFIG_USB $CONFIG_EXPERIMENTAL
482 +   dep_tristate '  USB LCD device support' CONFIG_USB_LCD $CONFIG_USB
483  fi
484  endmenu
485 diff -Nur linux-2.4.19.org/drivers/usb/Makefile linux-2.4.19/drivers/usb/Makefile
486 --- linux-2.4.19.org/drivers/usb/Makefile       Sat Aug  3 02:39:44 2002
487 +++ linux-2.4.19/drivers/usb/Makefile   Thu Oct 31 08:11:20 2002
488 @@ -62,6 +62,7 @@
489  obj-$(CONFIG_USB_MOUSE)                += usbmouse.o
490  obj-$(CONFIG_USB_HID)          += hid.o
491  obj-$(CONFIG_USB_KBD)          += usbkbd.o
492 +obj-$(CONFIG_USB_AIPTEK)       += aiptek.o
493  obj-$(CONFIG_USB_WACOM)                += wacom.o
494  
495  obj-$(CONFIG_USB_SCANNER)      += scanner.o
496 @@ -69,6 +70,7 @@
497  obj-$(CONFIG_USB_PRINTER)      += printer.o
498  obj-$(CONFIG_USB_AUDIO)                += audio.o
499  obj-$(CONFIG_USB_EMI26)                += emi26.o
500 +obj-$(CONFIG_USB_MIDI)         += usb-midi.o
501  obj-$(CONFIG_USB_IBMCAM)       += ibmcam.o usbvideo.o ultracam.o
502  obj-$(CONFIG_USB_PWC)          += pwc.o
503  obj-$(CONFIG_USB_DC2XX)                += dc2xx.o
504 @@ -85,6 +87,7 @@
505  obj-$(CONFIG_USB_KAWETH)        += kaweth.o
506  obj-$(CONFIG_USB_CDCETHER)     += CDCEther.o
507  obj-$(CONFIG_USB_RIO500)       += rio500.o
508 +obj-$(CONFIG_USB_TIGL)          += tiglusb.o
509  obj-$(CONFIG_USB_DSBR)         += dsbr100.o
510  obj-$(CONFIG_USB_MICROTEK)     += microtek.o
511  obj-$(CONFIG_USB_HPUSBSCSI)    += hpusbscsi.o
512 @@ -92,6 +95,7 @@
513  obj-$(CONFIG_USB_USBNET)       += usbnet.o
514  obj-$(CONFIG_USB_AUERSWALD)    += auerswald.o
515  obj-$(CONFIG_USB_BRLVGER)      += brlvger.o
516 +obj-$(CONFIG_USB_LCD)          += usblcd.o
517  
518  # Object files in subdirectories
519  mod-subdirs    := serial hcd
520 diff -Nur linux-2.4.19.org/drivers/usb/acm.c linux-2.4.19/drivers/usb/acm.c
521 --- linux-2.4.19.org/drivers/usb/acm.c  Fri Oct  5 21:06:08 2001
522 +++ linux-2.4.19/drivers/usb/acm.c      Thu Oct 31 08:11:20 2002
523 @@ -184,7 +184,7 @@
524  static void acm_ctrl_irq(struct urb *urb)
525  {
526         struct acm *acm = urb->context;
527 -       devrequest *dr = urb->transfer_buffer;
528 +       struct usb_ctrlrequest *dr = urb->transfer_buffer;
529         unsigned char *data = (unsigned char *)(dr + 1);
530         int newctrl;
531  
532 @@ -195,7 +195,7 @@
533                 return;
534         }
535  
536 -       switch (dr->request) {
537 +       switch (dr->bRequest) {
538  
539                 case ACM_IRQ_NETWORK:
540  
541 @@ -223,7 +223,7 @@
542  
543                 default:
544                         dbg("unknown control event received: request %d index %d len %d data0 %d data1 %d",
545 -                               dr->request, dr->index, dr->length, data[0], data[1]);
546 +                               dr->bRequest, dr->wIndex, dr->wLength, data[0], data[1]);
547                         return;
548         }
549  }
550 diff -Nur linux-2.4.19.org/drivers/usb/aiptek.c linux-2.4.19/drivers/usb/aiptek.c
551 --- linux-2.4.19.org/drivers/usb/aiptek.c       Thu Jan  1 01:00:00 1970
552 +++ linux-2.4.19/drivers/usb/aiptek.c   Thu Oct 31 08:11:20 2002
553 @@ -0,0 +1,332 @@
554 +/*
555 + *  Native support for the Aiptek 8000U
556 + *
557 + *  Copyright (c) 2001 Chris Atenasio          <chris@crud.net>
558 + *
559 + *  based on wacom.c by
560 + *     Vojtech Pavlik      <vojtech@suse.cz>
561 + *     Andreas Bach Aaen   <abach@stofanet.dk>
562 + *     Clifford Wolf       <clifford@clifford.at>
563 + *     Sam Mosel           <sam.mosel@computer.org>
564 + *     James E. Blair      <corvus@gnu.org>
565 + *     Daniel Egger        <egger@suse.de>
566 + *
567 + *
568 + *  Many thanks to Oliver Kuechemann for his support.
569 + *
570 + *  ChangeLog:
571 + *      v0.1 - Initial release
572 + *      v0.2 - Hack to get around fake event 28's.
573 + *      v0.3 - Make URB dynamic (Bryan W. Headley, Jun-8-2002)
574 + */
575 +
576 +/*
577 + * This program is free software; you can redistribute it and/or modify
578 + * it under the terms of the GNU General Public License as published by
579 + * the Free Software Foundation; either version 2 of the License, or
580 + * (at your option) any later version.
581 + *
582 + * This program is distributed in the hope that it will be useful,
583 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
584 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
585 + * GNU General Public License for more details.
586 + *
587 + * You should have received a copy of the GNU General Public License
588 + * along with this program; if not, write to the Free Software
589 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
590 + */
591 +
592 +#include <linux/kernel.h>
593 +#include <linux/slab.h>
594 +#include <linux/input.h>
595 +#include <linux/module.h>
596 +#include <linux/init.h>
597 +#include <linux/usb.h>
598 +
599 +/*
600 + * Version Information
601 + */
602 +#define DRIVER_VERSION "v0.3"
603 +#define DRIVER_AUTHOR "Chris Atenasio <chris@crud.net>"
604 +#define DRIVER_DESC "USB Aiptek 6000U/8000U tablet driver (Linux 2.4.x)"
605 +
606 +MODULE_AUTHOR(DRIVER_AUTHOR);
607 +MODULE_DESCRIPTION(DRIVER_DESC);
608 +MODULE_LICENSE("GPL");
609 +
610 +/*
611 + * Aiptek status packet:
612 + *
613 + *        bit7  bit6  bit5  bit4  bit3  bit2  bit1  bit0
614 + * byte0   0     0     0     0     0     0     1     0
615 + * byte1  X7    X6    X5    X4    X3    X2    X1    X0
616 + * byte2  X15   X14   X13   X12   X11   X10   X9    X8
617 + * byte3  Y7    Y6    Y5    Y4    Y3    Y2    Y1    Y0
618 + * byte4  Y15   Y14   Y13   Y12   Y11   Y10   Y9    Y8
619 + * byte5   *     *     *    BS2   BS1   Tip   DV    IR
620 + * byte6  P7    P6    P5    P4    P3    P2    P1    P0
621 + * byte7  P15   P14   P13   P12   P11   P10   P9    P8
622 + *
623 + * IR: In Range = Proximity on
624 + * DV = Data Valid
625 + *
626 + * 
627 + * Command Summary:
628 + *
629 + * Command/Data    Description     Return Bytes    Return Value
630 + * 0x10/0x00       SwitchToMouse       0
631 + * 0x10/0x01       SwitchToTablet      0
632 + * 0x18/0x04       Resolution500LPI    0
633 + * 0x17/0x00       FilterOn            0
634 + * 0x12/0xFF       AutoGainOn          0
635 + * 0x01/0x00       GetXExtension       2           MaxX
636 + * 0x01/0x01       GetYExtension       2           MaxY
637 + * 0x02/0x00       GetModelCode        2           ModelCode = LOBYTE
638 + * 0x03/0x00       GetODMCode          2           ODMCode
639 + * 0x08/0x00       GetPressureLevels   2           =512
640 + * 0x04/0x00       GetFirmwareVersion  2           Firmware Version
641 + *
642 + *
643 + * To initialize the tablet:
644 + *
645 + * (1) Send command Resolution500LPI
646 + * (2) Option Commands (GetXExtension, GetYExtension)
647 + * (3) Send command SwitchToTablet
648 + */
649 +
650 +#define USB_VENDOR_ID_AIPTEK   0x08ca
651 +
652 +struct aiptek_features {
653 +       char *name;
654 +       int pktlen;
655 +       int x_max;
656 +       int y_max;
657 +       int pressure_min;
658 +       int pressure_max;
659 +       void (*irq) (struct urb * urb);
660 +       unsigned long evbit;
661 +       unsigned long absbit;
662 +       unsigned long relbit;
663 +       unsigned long btnbit;
664 +       unsigned long digibit;
665 +};
666 +
667 +struct aiptek {
668 +       signed char data[10];
669 +       struct input_dev dev;
670 +       struct usb_device *usbdev;
671 +       struct urb *irq;
672 +       struct aiptek_features *features;
673 +       int tool;
674 +       int open;
675 +};
676 +
677 +static void
678 +aiptek_irq(struct urb *urb)
679 +{
680 +       struct aiptek *aiptek = urb->context;
681 +       unsigned char *data = aiptek->data;
682 +       struct input_dev *dev = &aiptek->dev;
683 +       int x;
684 +       int y;
685 +       int pressure;
686 +       int proximity;
687 +
688 +       if (urb->status)
689 +               return;
690 +
691 +       if ((data[0] & 2) == 0) {
692 +               dbg("received unknown report #%d", data[0]);
693 +       }
694 +
695 +       proximity = data[5] & 0x01;
696 +       input_report_key(dev, BTN_TOOL_PEN, proximity);
697 +
698 +       x = ((__u32) data[1]) | ((__u32) data[2] << 8);
699 +       y = ((__u32) data[3]) | ((__u32) data[4] << 8);
700 +       pressure = ((__u32) data[6]) | ((__u32) data[7] << 8);
701 +       pressure -= aiptek->features->pressure_min;
702 +
703 +       if (pressure < 0) {
704 +               pressure = 0;
705 +       }
706 +
707 +       if (proximity) {
708 +               input_report_abs(dev, ABS_X, x);
709 +               input_report_abs(dev, ABS_Y, y);
710 +               input_report_abs(dev, ABS_PRESSURE, pressure);
711 +               input_report_key(dev, BTN_TOUCH, data[5] & 0x04);
712 +               input_report_key(dev, BTN_STYLUS, data[5] & 0x08);
713 +               input_report_key(dev, BTN_STYLUS2, data[5] & 0x10);
714 +       }
715 +
716 +}
717 +
718 +struct aiptek_features aiptek_features[] = {
719 +       {"Aiptek 6000U/8000U", 
720 +        8, 3000, 2250, 26, 511, aiptek_irq, 0, 0, 0, 0},
721 +       {NULL, 0}
722 +};
723 +
724 +struct usb_device_id aiptek_ids[] = {
725 +       {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x20), driver_info:0},
726 +       {}
727 +};
728 +
729 +MODULE_DEVICE_TABLE(usb, aiptek_ids);
730 +
731 +static int
732 +aiptek_open(struct input_dev *dev)
733 +{
734 +       struct aiptek *aiptek = dev->private;
735 +
736 +       if (aiptek->open++)
737 +               return 0;
738 +
739 +       aiptek->irq->dev = aiptek->usbdev;
740 +       if (usb_submit_urb(aiptek->irq))
741 +               return -EIO;
742 +
743 +       return 0;
744 +}
745 +
746 +static void
747 +aiptek_close(struct input_dev *dev)
748 +{
749 +       struct aiptek *aiptek = dev->private;
750 +
751 +       if (!--aiptek->open)
752 +               usb_unlink_urb(aiptek->irq);
753 +}
754 +
755 +static void
756 +aiptek_command(struct usb_device *dev, unsigned int ifnum,
757 +              unsigned char command, unsigned char data)
758 +{
759 +       __u8 buf[3];
760 +
761 +       buf[0] = 4;
762 +       buf[1] = command;
763 +       buf[2] = data;
764 +
765 +       if (usb_set_report(dev, ifnum, 3, 2, buf, 3) != 3) {
766 +               dbg("aiptek_command: 0x%x 0x%x\n", command, data);
767 +       }
768 +}
769 +
770 +static void*
771 +aiptek_probe(struct usb_device *dev, unsigned int ifnum,
772 +            const struct usb_device_id *id)
773 +{
774 +       struct usb_endpoint_descriptor *endpoint;
775 +       struct aiptek *aiptek;
776 +
777 +       if (!(aiptek = kmalloc(sizeof (struct aiptek), GFP_KERNEL)))
778 +               return NULL;
779 +
780 +       memset(aiptek, 0, sizeof (struct aiptek));
781 +
782 +       aiptek->irq = usb_alloc_urb(0);
783 +       if (!aiptek->irq) {
784 +               kfree(aiptek);
785 +               return NULL;
786 +       }
787 +
788 +       // Resolution500LPI
789 +       aiptek_command(dev, ifnum, 0x18, 0x04);
790 +
791 +       // SwitchToTablet
792 +       aiptek_command(dev, ifnum, 0x10, 0x01);
793 +
794 +       aiptek->features = aiptek_features + id->driver_info;
795 +
796 +       aiptek->dev.evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_MSC) |
797 +           aiptek->features->evbit;
798 +
799 +       aiptek->dev.absbit[0] |= BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE) |
800 +           BIT(ABS_MISC) | aiptek->features->absbit;
801 +
802 +       aiptek->dev.relbit[0] |= aiptek->features->relbit;
803 +
804 +       aiptek->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) |
805 +           BIT(BTN_MIDDLE) | aiptek->features->btnbit;
806 +
807 +       aiptek->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) |
808 +           BIT(BTN_TOOL_MOUSE) | BIT(BTN_TOUCH) |
809 +           BIT(BTN_STYLUS) | BIT(BTN_STYLUS2) | aiptek->features->digibit;
810 +
811 +       aiptek->dev.mscbit[0] = BIT(MSC_SERIAL);
812 +
813 +       aiptek->dev.absmax[ABS_X] = aiptek->features->x_max;
814 +       aiptek->dev.absmax[ABS_Y] = aiptek->features->y_max;
815 +       aiptek->dev.absmax[ABS_PRESSURE] = aiptek->features->pressure_max -
816 +           aiptek->features->pressure_min;
817 +
818 +       aiptek->dev.absfuzz[ABS_X] = 0;
819 +       aiptek->dev.absfuzz[ABS_Y] = 0;
820 +
821 +       aiptek->dev.private = aiptek;
822 +       aiptek->dev.open = aiptek_open;
823 +       aiptek->dev.close = aiptek_close;
824 +
825 +       aiptek->dev.name = aiptek->features->name;
826 +       aiptek->dev.idbus = BUS_USB;
827 +       aiptek->dev.idvendor = dev->descriptor.idVendor;
828 +       aiptek->dev.idproduct = dev->descriptor.idProduct;
829 +       aiptek->dev.idversion = dev->descriptor.bcdDevice;
830 +       aiptek->usbdev = dev;
831 +
832 +       endpoint = dev->config[0].interface[ifnum].altsetting[0].endpoint + 0;
833 +
834 +       FILL_INT_URB(aiptek->irq,
835 +                 dev,
836 +                 usb_rcvintpipe(dev, endpoint->bEndpointAddress),
837 +                        aiptek->data,
838 +                 aiptek->features->pktlen,
839 +                        aiptek->features->irq,
840 +                 aiptek,
841 +                 endpoint->bInterval);
842 +
843 +       input_register_device(&aiptek->dev);
844 +
845 +       printk(KERN_INFO "input%d: %s on usb%d:%d.%d\n",
846 +              aiptek->dev.number, aiptek->features->name, dev->bus->busnum,
847 +              dev->devnum, ifnum);
848 +
849 +       return aiptek;
850 +}
851 +
852 +static void
853 +aiptek_disconnect(struct usb_device *dev, void *ptr)
854 +{
855 +       struct aiptek *aiptek = ptr;
856 +       usb_unlink_urb(aiptek->irq);
857 +       input_unregister_device(&aiptek->dev);
858 +       usb_free_urb(aiptek->irq);
859 +       kfree(aiptek);
860 +}
861 +
862 +static struct usb_driver aiptek_driver = {
863 +       name:"aiptek",
864 +       probe:aiptek_probe,
865 +       disconnect:aiptek_disconnect,
866 +       id_table:aiptek_ids,
867 +};
868 +
869 +static int __init
870 +aiptek_init(void)
871 +{
872 +       usb_register(&aiptek_driver);
873 +       info(DRIVER_VERSION " " DRIVER_AUTHOR);
874 +       info(DRIVER_DESC);
875 +       return 0;
876 +}
877 +
878 +static void __exit
879 +aiptek_exit(void)
880 +{
881 +       usb_deregister(&aiptek_driver);
882 +}
883 +
884 +module_init(aiptek_init);
885 +module_exit(aiptek_exit);
886 diff -Nur linux-2.4.19.org/drivers/usb/audio.c linux-2.4.19/drivers/usb/audio.c
887 --- linux-2.4.19.org/drivers/usb/audio.c        Sat Aug  3 02:39:44 2002
888 +++ linux-2.4.19/drivers/usb/audio.c    Thu Oct 31 08:11:20 2002
889 @@ -297,13 +297,13 @@
890  #define FLG_CONNECTED    32
891  
892  struct my_data_urb {
893 -       urb_t urb;
894 -       iso_packet_descriptor_t isoframe[DESCFRAMES];
895 +       struct urb urb;
896 +       struct iso_packet_descriptor isoframe[DESCFRAMES];
897  };
898  
899  struct my_sync_urb {
900 -       urb_t urb;
901 -       iso_packet_descriptor_t isoframe[SYNCFRAMES];
902 +       struct urb urb;
903 +       struct iso_packet_descriptor isoframe[SYNCFRAMES];
904  };
905  
906  
907 @@ -833,7 +833,7 @@
908         }
909  }              
910  
911 -static int usbin_prepare_desc(struct usbin *u, purb_t urb)
912 +static int usbin_prepare_desc(struct usbin *u, struct urb *urb)
913  {
914         unsigned int i, maxsize, offs;
915  
916 @@ -850,7 +850,7 @@
917   * return value: 0 if descriptor should be restarted, -1 otherwise
918   * convert sample format on the fly if necessary
919   */
920 -static int usbin_retire_desc(struct usbin *u, purb_t urb)
921 +static int usbin_retire_desc(struct usbin *u, struct urb *urb)
922  {
923         unsigned int i, ufmtsh, dfmtsh, err = 0, cnt, scnt, dmafree;
924         unsigned char *cp;
925 @@ -930,7 +930,7 @@
926  /*
927   * we output sync data
928   */
929 -static int usbin_sync_prepare_desc(struct usbin *u, purb_t urb)
930 +static int usbin_sync_prepare_desc(struct usbin *u, struct urb *urb)
931  {
932         unsigned char *cp = urb->transfer_buffer;
933         unsigned int i, offs;
934 @@ -948,7 +948,7 @@
935  /*
936   * return value: 0 if descriptor should be restarted, -1 otherwise
937   */
938 -static int usbin_sync_retire_desc(struct usbin *u, purb_t urb)
939 +static int usbin_sync_retire_desc(struct usbin *u, struct urb *urb)
940  {
941         unsigned int i;
942         
943 @@ -996,7 +996,7 @@
944  {
945         struct usb_device *dev = as->state->usbdev;
946         struct usbin *u = &as->usbin;
947 -       purb_t urb;
948 +       struct urb *urb;
949         unsigned long flags;
950         unsigned int maxsze, bufsz;
951  
952 @@ -1186,7 +1186,7 @@
953         }
954  }              
955  
956 -static int usbout_prepare_desc(struct usbout *u, purb_t urb)
957 +static int usbout_prepare_desc(struct usbout *u, struct urb *urb)
958  {
959         unsigned int i, ufmtsh, dfmtsh, err = 0, cnt, scnt, offs;
960         unsigned char *cp = urb->transfer_buffer;
961 @@ -1238,7 +1238,7 @@
962  /*
963   * return value: 0 if descriptor should be restarted, -1 otherwise
964   */
965 -static int usbout_retire_desc(struct usbout *u, purb_t urb)
966 +static int usbout_retire_desc(struct usbout *u, struct urb *urb)
967  {
968         unsigned int i;
969  
970 @@ -1285,7 +1285,7 @@
971         spin_unlock_irqrestore(&as->lock, flags);
972  }
973  
974 -static int usbout_sync_prepare_desc(struct usbout *u, purb_t urb)
975 +static int usbout_sync_prepare_desc(struct usbout *u, struct urb *urb)
976  {
977         unsigned int i, offs;
978  
979 @@ -1299,7 +1299,7 @@
980  /*
981   * return value: 0 if descriptor should be restarted, -1 otherwise
982   */
983 -static int usbout_sync_retire_desc(struct usbout *u, purb_t urb)
984 +static int usbout_sync_retire_desc(struct usbout *u, struct urb *urb)
985  {
986         unsigned char *cp = urb->transfer_buffer;
987         unsigned int f, i;
988 @@ -1361,7 +1361,7 @@
989  {
990         struct usb_device *dev = as->state->usbdev;
991         struct usbout *u = &as->usbout;
992 -       purb_t urb;
993 +       struct urb *urb;
994         unsigned long flags;
995         unsigned int maxsze, bufsz;
996  
997 diff -Nur linux-2.4.19.org/drivers/usb/auerswald.c linux-2.4.19/drivers/usb/auerswald.c
998 --- linux-2.4.19.org/drivers/usb/auerswald.c    Sat Aug  3 02:39:44 2002
999 +++ linux-2.4.19/drivers/usb/auerswald.c        Thu Oct 31 08:11:20 2002
1000 @@ -2,7 +2,7 @@
1001  /*
1002   *      auerswald.c  --  Auerswald PBX/System Telephone usb driver.
1003   *
1004 - *      Copyright (C) 2001  Wolfgang Mües (wmues@nexgo.de)
1005 + *      Copyright (C) 2001  Wolfgang Mües (wolfgang@iksw-muees.de)
1006   *
1007   *      Very much code of this driver is borrowed from dabusb.c (Deti Fliegl)
1008   *      and from the USB Skeleton driver (Greg Kroah-Hartman). Thank you.
1009 @@ -50,7 +50,7 @@
1010  /*-------------------------------------------------------------------*/
1011  /* Version Information */
1012  #define DRIVER_VERSION "0.9.11"
1013 -#define DRIVER_AUTHOR  "Wolfgang Mües <wmues@nexgo.de>"
1014 +#define DRIVER_AUTHOR  "Wolfgang Mües <wolfgang@iksw-muees.de>"
1015  #define DRIVER_DESC    "Auerswald PBX/System Telephone usb driver"
1016  
1017  /*-------------------------------------------------------------------*/
1018 @@ -176,7 +176,7 @@
1019  typedef struct
1020  {
1021          struct auerchain *chain;        /* pointer to the chain to which this element belongs */
1022 -        urb_t * urbp;                   /* pointer to attached urb */
1023 +        struct urb * urbp;                   /* pointer to attached urb */
1024          void *context;                  /* saved URB context */
1025          usb_complete_t complete;        /* saved URB completion function */
1026          struct list_head list;          /* to include element into a list */
1027 @@ -206,8 +206,8 @@
1028          char *bufp;                     /* reference to allocated data buffer */
1029          unsigned int len;               /* number of characters in data buffer */
1030         unsigned int retries;           /* for urb retries */
1031 -        devrequest *dr;                 /* for setup data in control messages */
1032 -        urb_t * urbp;                   /* USB urb */
1033 +        struct usb_ctrlrequest *dr;                 /* for setup data in control messages */
1034 +        struct urb * urbp;                   /* USB urb */
1035          struct auerbufctl *list;        /* pointer to list */
1036          struct list_head buff_list;     /* reference to next buffer in list */
1037  } auerbuf_t,*pauerbuf_t;
1038 @@ -244,7 +244,7 @@
1039         int                     open_count;         /* count the number of open character channels */
1040          char                   dev_desc[AUSI_DLEN];/* for storing a textual description */
1041          unsigned int           maxControlLength;   /* max. Length of control paket (without header) */
1042 -        urb_t *                inturbp;            /* interrupt urb */
1043 +        struct urb *           inturbp;            /* interrupt urb */
1044          char *                 intbufp;            /* data buffer for interrupt urb */
1045         unsigned int            irqsize;            /* size of interrupt endpoint 1 */
1046          struct auerchain       controlchain;       /* for chaining of control messages */
1047 @@ -281,7 +281,7 @@
1048  
1049  /*-------------------------------------------------------------------*/
1050  /* Forwards */
1051 -static void auerswald_ctrlread_complete (urb_t * urb);
1052 +static void auerswald_ctrlread_complete (struct urb * urb);
1053  static void auerswald_removeservice (pauerswald_t cp, pauerscon_t scp);
1054  
1055  
1056 @@ -290,7 +290,7 @@
1057  /* --------------------------                                        */
1058  
1059  /* completion function for chained urbs */
1060 -static void auerchain_complete (urb_t * urb)
1061 +static void auerchain_complete (struct urb * urb)
1062  {
1063         unsigned long flags;
1064          int result;
1065 @@ -357,7 +357,7 @@
1066     this function may be called from completion context or from user space!
1067     early = 1 -> submit in front of chain
1068  */
1069 -static int auerchain_submit_urb_list (pauerchain_t acp, urb_t * urb, int early)
1070 +static int auerchain_submit_urb_list (pauerchain_t acp, struct urb * urb, int early)
1071  {
1072          int result;
1073          unsigned long flags;
1074 @@ -431,7 +431,7 @@
1075  /* submit function for chained urbs
1076     this function may be called from completion context or from user space!
1077  */
1078 -static int auerchain_submit_urb (pauerchain_t acp, urb_t * urb)
1079 +static int auerchain_submit_urb (pauerchain_t acp, struct urb * urb)
1080  {
1081         return auerchain_submit_urb_list (acp, urb, 0);
1082  }
1083 @@ -440,10 +440,10 @@
1084     the result is 0 if the urb is cancelled, or -EINPROGRESS if
1085     USB_ASYNC_UNLINK is set and the function is successfully started.
1086  */
1087 -static int auerchain_unlink_urb (pauerchain_t acp, urb_t * urb)
1088 +static int auerchain_unlink_urb (pauerchain_t acp, struct urb * urb)
1089  {
1090         unsigned long flags;
1091 -        urb_t * urbp;
1092 +        struct urb * urbp;
1093          pauerchainelement_t acep;
1094          struct list_head *tmp;
1095  
1096 @@ -499,7 +499,7 @@
1097  static void auerchain_unlink_all (pauerchain_t acp)
1098  {
1099         unsigned long flags;
1100 -        urb_t * urbp;
1101 +        struct urb * urbp;
1102          pauerchainelement_t acep;
1103  
1104          dbg ("auerchain_unlink_all called");
1105 @@ -605,7 +605,7 @@
1106  
1107  
1108  /* completion handler for synchronous chained URBs */
1109 -static void auerchain_blocking_completion (urb_t *urb)
1110 +static void auerchain_blocking_completion (struct urb *urb)
1111  {
1112         pauerchain_chs_t pchs = (pauerchain_chs_t)urb->context;
1113         pchs->done = 1;
1114 @@ -615,7 +615,7 @@
1115  
1116  
1117  /* Starts chained urb and waits for completion or timeout */
1118 -static int auerchain_start_wait_urb (pauerchain_t acp, urb_t *urb, int timeout, int* actual_length)
1119 +static int auerchain_start_wait_urb (pauerchain_t acp, struct urb *urb, int timeout, int* actual_length)
1120  {
1121         DECLARE_WAITQUEUE (wait, current);
1122         auerchain_chs_t chs;
1123 @@ -690,12 +690,12 @@
1124                                   __u16 value, __u16 index, void *data, __u16 size, int timeout)
1125  {
1126         int ret;
1127 -       devrequest *dr;
1128 -       urb_t *urb;
1129 +       struct usb_ctrlrequest *dr;
1130 +       struct urb *urb;
1131          int length;
1132  
1133          dbg ("auerchain_control_msg");
1134 -        dr = kmalloc (sizeof (devrequest), GFP_KERNEL);
1135 +        dr = kmalloc (sizeof (struct usb_ctrlrequest), GFP_KERNEL);
1136         if (!dr)
1137                 return -ENOMEM;
1138         urb = usb_alloc_urb (0);
1139 @@ -704,11 +704,11 @@
1140                 return -ENOMEM;
1141          }
1142  
1143 -       dr->requesttype = requesttype;
1144 -       dr->request = request;
1145 -       dr->value  = cpu_to_le16 (value);
1146 -       dr->index  = cpu_to_le16 (index);
1147 -       dr->length = cpu_to_le16 (size);
1148 +       dr->bRequestType = requesttype;
1149 +       dr->bRequest = request;
1150 +       dr->wValue  = cpu_to_le16 (value);
1151 +       dr->wIndex  = cpu_to_le16 (index);
1152 +       dr->wLength = cpu_to_le16 (size);
1153  
1154         FILL_CONTROL_URB (urb, dev, pipe, (unsigned char*)dr, data, size,    /* build urb */
1155                           (usb_complete_t)auerchain_blocking_completion,0);
1156 @@ -799,7 +799,7 @@
1157                  INIT_LIST_HEAD (&bep->buff_list);
1158                  bep->bufp = (char *) kmalloc (bufsize, GFP_KERNEL);
1159                  if (!bep->bufp) goto bl_fail;
1160 -                bep->dr = (devrequest *) kmalloc (sizeof (devrequest), GFP_KERNEL);
1161 +                bep->dr = (struct usb_ctrlrequest *) kmalloc (sizeof (struct usb_ctrlrequest), GFP_KERNEL);
1162                  if (!bep->dr) goto bl_fail;
1163                  bep->urbp = usb_alloc_urb (0);
1164                  if (!bep->urbp) goto bl_fail;
1165 @@ -874,7 +874,7 @@
1166  }
1167  
1168  /* Completion of asynchronous write block */
1169 -static void auerchar_ctrlwrite_complete (urb_t * urb)
1170 +static void auerchar_ctrlwrite_complete (struct urb * urb)
1171  {
1172         pauerbuf_t bp = (pauerbuf_t) urb->context;
1173         pauerswald_t cp = ((pauerswald_t)((char *)(bp->list)-(unsigned long)(&((pauerswald_t)0)->bufctl)));
1174 @@ -887,7 +887,7 @@
1175  }
1176  
1177  /* Completion handler for dummy retry packet */
1178 -static void auerswald_ctrlread_wretcomplete (urb_t * urb)
1179 +static void auerswald_ctrlread_wretcomplete (struct urb * urb)
1180  {
1181          pauerbuf_t bp = (pauerbuf_t) urb->context;
1182          pauerswald_t cp;
1183 @@ -907,13 +907,13 @@
1184         }
1185  
1186         /* fill the control message */
1187 -       bp->dr->requesttype = AUT_RREQ;
1188 -       bp->dr->request     = AUV_RBLOCK;
1189 -       bp->dr->length      = bp->dr->value;    /* temporary stored */
1190 -       bp->dr->value       = cpu_to_le16 (1);  /* Retry Flag */
1191 +       bp->dr->bRequestType = AUT_RREQ;
1192 +       bp->dr->bRequest     = AUV_RBLOCK;
1193 +       bp->dr->wLength      = bp->dr->wValue;  /* temporary stored */
1194 +       bp->dr->wValue       = cpu_to_le16 (1); /* Retry Flag */
1195         /* bp->dr->index    = channel id;          remains */
1196         FILL_CONTROL_URB (bp->urbp, cp->usbdev, usb_rcvctrlpipe (cp->usbdev, 0),
1197 -                          (unsigned char*)bp->dr, bp->bufp, le16_to_cpu (bp->dr->length),
1198 +                          (unsigned char*)bp->dr, bp->bufp, le16_to_cpu (bp->dr->wLength),
1199                           (usb_complete_t)auerswald_ctrlread_complete,bp);
1200  
1201         /* submit the control msg as next paket */
1202 @@ -926,7 +926,7 @@
1203  }
1204  
1205  /* completion handler for receiving of control messages */
1206 -static void auerswald_ctrlread_complete (urb_t * urb)
1207 +static void auerswald_ctrlread_complete (struct urb * urb)
1208  {
1209          unsigned int  serviceid;
1210          pauerswald_t  cp;
1211 @@ -955,11 +955,11 @@
1212                 bp->retries++;
1213                 dbg ("Retry count = %d", bp->retries);
1214                 /* send a long dummy control-write-message to allow device firmware to react */
1215 -               bp->dr->requesttype = AUT_WREQ;
1216 -               bp->dr->request     = AUV_DUMMY;
1217 -               bp->dr->value       = bp->dr->length; /* temporary storage */
1218 +               bp->dr->bRequestType = AUT_WREQ;
1219 +               bp->dr->bRequest     = AUV_DUMMY;
1220 +               bp->dr->wValue       = bp->dr->wLength; /* temporary storage */
1221                 // bp->dr->index    channel ID remains
1222 -               bp->dr->length      = cpu_to_le16 (32); /* >= 8 bytes */
1223 +               bp->dr->wLength      = cpu_to_le16 (32); /* >= 8 bytes */
1224                 FILL_CONTROL_URB (bp->urbp, cp->usbdev, usb_sndctrlpipe (cp->usbdev, 0),
1225                         (unsigned char*)bp->dr, bp->bufp, 32,
1226                         (usb_complete_t)auerswald_ctrlread_wretcomplete,bp);
1227 @@ -972,7 +972,7 @@
1228                                 auerswald_ctrlread_wretcomplete (bp->urbp);
1229                 }
1230                  return;
1231 -        }
1232 +       } 
1233  
1234          /* get the actual bytecount (incl. headerbyte) */
1235          bp->len = urb->actual_length;
1236 @@ -998,7 +998,7 @@
1237     messages from the USB device.
1238  */
1239  /* int completion handler. */
1240 -static void auerswald_int_complete (urb_t * urb)
1241 +static void auerswald_int_complete (struct urb * urb)
1242  {
1243          unsigned long flags;
1244          unsigned  int channelid;
1245 @@ -1074,11 +1074,11 @@
1246          }
1247  
1248         /* fill the control message */
1249 -        bp->dr->requesttype = AUT_RREQ;
1250 -       bp->dr->request     = AUV_RBLOCK;
1251 -       bp->dr->value       = cpu_to_le16 (0);
1252 -       bp->dr->index       = cpu_to_le16 (channelid | AUH_DIRECT | AUH_UNSPLIT);
1253 -       bp->dr->length      = cpu_to_le16 (bytecount);
1254 +        bp->dr->bRequestType = AUT_RREQ;
1255 +       bp->dr->bRequest     = AUV_RBLOCK;
1256 +       bp->dr->wValue       = cpu_to_le16 (0);
1257 +       bp->dr->wIndex       = cpu_to_le16 (channelid | AUH_DIRECT | AUH_UNSPLIT);
1258 +       bp->dr->wLength      = cpu_to_le16 (bytecount);
1259         FILL_CONTROL_URB (bp->urbp, cp->usbdev, usb_rcvctrlpipe (cp->usbdev, 0),
1260                            (unsigned char*)bp->dr, bp->bufp, bytecount,
1261                           (usb_complete_t)auerswald_ctrlread_complete,bp);
1262 @@ -1327,7 +1327,7 @@
1263  }
1264  
1265  
1266 -/* remove a service from the the device
1267 +/* remove a service from the device
1268     scp->id must be set! */
1269  static void auerswald_removeservice (pauerswald_t cp, pauerscon_t scp)
1270  {
1271 @@ -1813,11 +1813,11 @@
1272  
1273         /* Set the transfer Parameters */
1274         bp->len = len+AUH_SIZE;
1275 -        bp->dr->requesttype = AUT_WREQ;
1276 -       bp->dr->request     = AUV_WBLOCK;
1277 -       bp->dr->value       = cpu_to_le16 (0);
1278 -       bp->dr->index       = cpu_to_le16 (ccp->scontext.id | AUH_DIRECT | AUH_UNSPLIT);
1279 -       bp->dr->length      = cpu_to_le16 (len+AUH_SIZE);
1280 +        bp->dr->bRequestType = AUT_WREQ;
1281 +       bp->dr->bRequest     = AUV_WBLOCK;
1282 +       bp->dr->wValue       = cpu_to_le16 (0);
1283 +       bp->dr->wIndex       = cpu_to_le16 (ccp->scontext.id | AUH_DIRECT | AUH_UNSPLIT);
1284 +       bp->dr->wLength      = cpu_to_le16 (len+AUH_SIZE);
1285         FILL_CONTROL_URB (bp->urbp, cp->usbdev, usb_sndctrlpipe (cp->usbdev, 0),
1286                     (unsigned char*)bp->dr, bp->bufp, len+AUH_SIZE,
1287                     auerchar_ctrlwrite_complete, bp);
1288 diff -Nur linux-2.4.19.org/drivers/usb/bluetooth.c linux-2.4.19/drivers/usb/bluetooth.c
1289 --- linux-2.4.19.org/drivers/usb/bluetooth.c    Tue Nov 13 18:19:41 2001
1290 +++ linux-2.4.19/drivers/usb/bluetooth.c        Thu Oct 31 08:11:20 2002
1291 @@ -4,8 +4,12 @@
1292   * Copyright (c) 2000, 2001 Greg Kroah-Hartman <greg@kroah.com>
1293   * Copyright (c) 2000 Mark Douglas Corner      <mcorner@umich.edu>
1294   *
1295 - * USB Bluetooth driver, based on the Bluetooth Spec version 1.0B
1296 + * USB Bluetooth TTY driver, based on the Bluetooth Spec version 1.0B
1297   * 
1298 + * (2001/11/30) Version 0.13 gkh
1299 + *     - added locking patch from Masoodur Rahman <rmasoodu@in.ibm.com>
1300 + *     - removed active variable, as open_count will do.
1301 + *
1302   * (2001/07/09) Version 0.12 gkh
1303   *     - removed in_interrupt() call, as it doesn't make sense to do 
1304   *       that anymore.
1305 @@ -100,17 +104,14 @@
1306  
1307  
1308  #include <linux/kernel.h>
1309 -#include <linux/sched.h>
1310 -#include <linux/signal.h>
1311  #include <linux/errno.h>
1312 -#include <linux/poll.h>
1313  #include <linux/init.h>
1314  #include <linux/slab.h>
1315 -#include <linux/fcntl.h>
1316  #include <linux/tty.h>
1317  #include <linux/tty_driver.h>
1318  #include <linux/tty_flip.h>
1319  #include <linux/module.h>
1320 +#include <asm/uaccess.h>
1321  
1322  #define DEBUG
1323  #include <linux/usb.h>
1324 @@ -118,7 +119,7 @@
1325  /*
1326   * Version Information
1327   */
1328 -#define DRIVER_VERSION "v0.12"
1329 +#define DRIVER_VERSION "v0.13"
1330  #define DRIVER_AUTHOR "Greg Kroah-Hartman, Mark Douglas Corner"
1331  #define DRIVER_DESC "USB Bluetooth tty driver"
1332  
1333 @@ -170,12 +171,12 @@
1334         struct tty_struct *     tty;            /* the coresponding tty for this port */
1335  
1336         unsigned char           minor;          /* the starting minor number for this device */
1337 -       char                    active;         /* someone has this device open */
1338         int                     throttle;       /* throttled by tty layer */
1339 +       int                     open_count;
1340         
1341         __u8                    control_out_bInterfaceNum;
1342         struct urb *            control_urb_pool[NUM_CONTROL_URBS];
1343 -       devrequest              dr[NUM_CONTROL_URBS];
1344 +       struct usb_ctrlrequest  dr[NUM_CONTROL_URBS];
1345  
1346         unsigned char *         interrupt_in_buffer;
1347         struct urb *            interrupt_in_urb;
1348 @@ -200,6 +201,7 @@
1349         unsigned char           int_buffer[EVENT_BUFFER_SIZE];
1350         unsigned int            bulk_packet_pos;
1351         unsigned char           bulk_buffer[ACL_BUFFER_SIZE];   /* 64k preallocated, fix? */
1352 +       struct semaphore        lock;
1353  };
1354  
1355  
1356 @@ -232,10 +234,10 @@
1357  MODULE_DEVICE_TABLE (usb, usb_bluetooth_ids);
1358  
1359  static struct usb_driver usb_bluetooth_driver = {
1360 -       name:           "bluetooth",
1361 -       probe:          usb_bluetooth_probe,
1362 -       disconnect:     usb_bluetooth_disconnect,
1363 -       id_table:       usb_bluetooth_ids,
1364 +       .name =         "bluetty",
1365 +       .probe =        usb_bluetooth_probe,
1366 +       .disconnect =   usb_bluetooth_disconnect,
1367 +       .id_table =     usb_bluetooth_ids,
1368  };
1369  
1370  static int                     bluetooth_refcount;
1371 @@ -283,11 +285,11 @@
1372  static int bluetooth_ctrl_msg (struct usb_bluetooth *bluetooth, int request, int value, const unsigned char *buf, int len)
1373  {
1374         struct urb *urb = NULL;
1375 -       devrequest *dr = NULL;
1376 +       struct usb_ctrlrequest *dr = NULL;
1377         int i;
1378         int status;
1379  
1380 -       dbg (__FUNCTION__);
1381 +       dbg ("%s", __FUNCTION__);
1382  
1383         /* try to find a free urb in our list */
1384         for (i = 0; i < NUM_CONTROL_URBS; ++i) {
1385 @@ -298,7 +300,7 @@
1386                 }
1387         }
1388         if (urb == NULL) {
1389 -               dbg (__FUNCTION__ " - no free urbs");
1390 +               dbg ("%s - no free urbs", __FUNCTION__);
1391                 return -ENOMEM;
1392         }
1393  
1394 @@ -306,7 +308,7 @@
1395         if (urb->transfer_buffer == NULL) {
1396                 urb->transfer_buffer = kmalloc (len, GFP_KERNEL);
1397                 if (urb->transfer_buffer == NULL) {
1398 -                       err (__FUNCTION__" - out of memory");
1399 +                       err ("%s - out of memory", __FUNCTION__);
1400                         return -ENOMEM;
1401                 }
1402         }
1403 @@ -314,17 +316,17 @@
1404                 kfree (urb->transfer_buffer);
1405                 urb->transfer_buffer = kmalloc (len, GFP_KERNEL);
1406                 if (urb->transfer_buffer == NULL) {
1407 -                       err (__FUNCTION__" - out of memory");
1408 +                       err ("%s - out of memory", __FUNCTION__);
1409                         return -ENOMEM;
1410                 }
1411         }
1412         memcpy (urb->transfer_buffer, buf, len);
1413  
1414 -       dr->requesttype = BLUETOOTH_CONTROL_REQUEST_TYPE;
1415 -       dr->request = request;
1416 -       dr->value = cpu_to_le16((u16) value);
1417 -       dr->index = cpu_to_le16((u16) bluetooth->control_out_bInterfaceNum);
1418 -       dr->length = cpu_to_le16((u16) len);
1419 +       dr->bRequestType= BLUETOOTH_CONTROL_REQUEST_TYPE;
1420 +       dr->bRequest = request;
1421 +       dr->wValue = cpu_to_le16((u16) value);
1422 +       dr->wIndex = cpu_to_le16((u16) bluetooth->control_out_bInterfaceNum);
1423 +       dr->wLength = cpu_to_le16((u16) len);
1424         
1425         FILL_CONTROL_URB (urb, bluetooth->dev, usb_sndctrlpipe(bluetooth->dev, 0),
1426                           (unsigned char*)dr, urb->transfer_buffer, len, bluetooth_ctrl_callback, bluetooth);
1427 @@ -332,7 +334,7 @@
1428         /* send it down the pipe */
1429         status = usb_submit_urb(urb);
1430         if (status)
1431 -               dbg(__FUNCTION__ " - usb_submit_urb(control) failed with status = %d", status);
1432 +               dbg("%s - usb_submit_urb(control) failed with status = %d", __FUNCTION__, status);
1433         
1434         return status;
1435  }
1436 @@ -349,7 +351,7 @@
1437         struct usb_bluetooth *bluetooth;
1438         int result;
1439  
1440 -       dbg(__FUNCTION__);
1441 +       dbg("%s", __FUNCTION__);
1442  
1443         /* initialize the pointer incase something fails */
1444         tty->driver_data = NULL;
1445 @@ -361,43 +363,46 @@
1446                 return -ENODEV;
1447         }
1448  
1449 -       if (bluetooth->active) {
1450 -               dbg (__FUNCTION__ " - device already open");
1451 -               return -EINVAL;
1452 -       }
1453 -
1454 -       /* set up our structure making the tty driver remember our object, and us it */
1455 -       tty->driver_data = bluetooth;
1456 -       bluetooth->tty = tty;
1457 -
1458 -       /* force low_latency on so that our tty_push actually forces the data through, 
1459 -        * otherwise it is scheduled, and with high data rates (like with OHCI) data
1460 -        * can get lost. */
1461 -       bluetooth->tty->low_latency = 1;
1462 +       down (&bluetooth->lock);
1463
1464 +       ++bluetooth->open_count;
1465 +       if (bluetooth->open_count == 1) {
1466 +               /* set up our structure making the tty driver remember our object, and us it */
1467 +               tty->driver_data = bluetooth;
1468 +               bluetooth->tty = tty;
1469 +
1470 +               /* force low_latency on so that our tty_push actually forces the data through, 
1471 +                * otherwise it is scheduled, and with high data rates (like with OHCI) data
1472 +                * can get lost. */
1473 +               bluetooth->tty->low_latency = 1;
1474         
1475 -       bluetooth->active = 1;
1476 -
1477 -       /* Reset the packet position counters */
1478 -       bluetooth->int_packet_pos = 0;
1479 -       bluetooth->bulk_packet_pos = 0;
1480 +               /* Reset the packet position counters */
1481 +               bluetooth->int_packet_pos = 0;
1482 +               bluetooth->bulk_packet_pos = 0;
1483  
1484  #ifndef BTBUGGYHARDWARE
1485 -       /* Start reading from the device */
1486 -       FILL_BULK_URB(bluetooth->read_urb, bluetooth->dev, 
1487 -                     usb_rcvbulkpipe(bluetooth->dev, bluetooth->bulk_in_endpointAddress),
1488 -                     bluetooth->bulk_in_buffer, bluetooth->bulk_in_buffer_size, 
1489 -                     bluetooth_read_bulk_callback, bluetooth);
1490 -       result = usb_submit_urb(bluetooth->read_urb);
1491 -       if (result)
1492 -               dbg(__FUNCTION__ " - usb_submit_urb(read bulk) failed with status %d", result);
1493 +               /* Start reading from the device */
1494 +               FILL_BULK_URB (bluetooth->read_urb, bluetooth->dev, 
1495 +                              usb_rcvbulkpipe(bluetooth->dev, bluetooth->bulk_in_endpointAddress),
1496 +                              bluetooth->bulk_in_buffer,
1497 +                              bluetooth->bulk_in_buffer_size,
1498 +                              bluetooth_read_bulk_callback, bluetooth);
1499 +               result = usb_submit_urb(bluetooth->read_urb);
1500 +               if (result)
1501 +                       dbg("%s - usb_submit_urb(read bulk) failed with status %d", __FUNCTION__, result);
1502  #endif
1503 -       FILL_INT_URB(bluetooth->interrupt_in_urb, bluetooth->dev, 
1504 -                    usb_rcvintpipe(bluetooth->dev, bluetooth->interrupt_in_endpointAddress),
1505 -                    bluetooth->interrupt_in_buffer, bluetooth->interrupt_in_buffer_size, 
1506 -                    bluetooth_int_callback, bluetooth, bluetooth->interrupt_in_interval);
1507 -       result = usb_submit_urb(bluetooth->interrupt_in_urb);
1508 -       if (result)
1509 -               dbg(__FUNCTION__ " - usb_submit_urb(interrupt in) failed with status %d", result);
1510 +               FILL_INT_URB (bluetooth->interrupt_in_urb, bluetooth->dev, 
1511 +                             usb_rcvintpipe(bluetooth->dev, bluetooth->interrupt_in_endpointAddress),
1512 +                             bluetooth->interrupt_in_buffer,
1513 +                             bluetooth->interrupt_in_buffer_size,
1514 +                             bluetooth_int_callback, bluetooth,
1515 +                             bluetooth->interrupt_in_interval);
1516 +               result = usb_submit_urb(bluetooth->interrupt_in_urb);
1517 +               if (result)
1518 +                       dbg("%s - usb_submit_urb(interrupt in) failed with status %d", __FUNCTION__, result);
1519 +       }
1520 +       
1521 +       up(&bluetooth->lock);
1522  
1523         return 0;
1524  }
1525 @@ -412,20 +417,26 @@
1526                 return;
1527         }
1528  
1529 -       dbg(__FUNCTION__);
1530 +       dbg("%s", __FUNCTION__);
1531  
1532 -       if (!bluetooth->active) {
1533 -               dbg (__FUNCTION__ " - device not opened");
1534 +       if (!bluetooth->open_count) {
1535 +               dbg ("%s - device not opened", __FUNCTION__);
1536                 return;
1537         }
1538  
1539 -       /* shutdown any bulk reads and writes that might be going on */
1540 -       for (i = 0; i < NUM_BULK_URBS; ++i)
1541 -               usb_unlink_urb (bluetooth->write_urb_pool[i]);
1542 -       usb_unlink_urb (bluetooth->read_urb);
1543 -       usb_unlink_urb (bluetooth->interrupt_in_urb);
1544 +       down (&bluetooth->lock);
1545
1546 +       --bluetooth->open_count;
1547 +       if (bluetooth->open_count <= 0) {
1548 +               bluetooth->open_count = 0;
1549  
1550 -       bluetooth->active = 0;
1551 +               /* shutdown any bulk reads and writes that might be going on */
1552 +               for (i = 0; i < NUM_BULK_URBS; ++i)
1553 +                       usb_unlink_urb (bluetooth->write_urb_pool[i]);
1554 +               usb_unlink_urb (bluetooth->read_urb);
1555 +               usb_unlink_urb (bluetooth->interrupt_in_urb);
1556 +       }
1557 +       up(&bluetooth->lock);
1558  }
1559  
1560  
1561 @@ -445,24 +456,24 @@
1562                 return -ENODEV;
1563         }
1564  
1565 -       dbg(__FUNCTION__ " - %d byte(s)", count);
1566 +       dbg("%s - %d byte(s)", __FUNCTION__, count);
1567  
1568 -       if (!bluetooth->active) {
1569 -               dbg (__FUNCTION__ " - device not opened");
1570 +       if (!bluetooth->open_count) {
1571 +               dbg ("%s - device not opened", __FUNCTION__);
1572                 return -EINVAL;
1573         }
1574  
1575         if (count == 0) {
1576 -               dbg(__FUNCTION__ " - write request of 0 bytes");
1577 +               dbg("%s - write request of 0 bytes", __FUNCTION__);
1578                 return 0;
1579         }
1580         if (count == 1) {
1581 -               dbg(__FUNCTION__ " - write request only included type %d", buf[0]);
1582 +               dbg("%s - write request only included type %d", __FUNCTION__, buf[0]);
1583                 return 1;
1584         }
1585  
1586  #ifdef DEBUG
1587 -       printk (KERN_DEBUG __FILE__ ": " __FUNCTION__ " - length = %d, data = ", count);
1588 +       printk (KERN_DEBUG __FILE__ ": %s - length = %d, data = ", __FUNCTION__, count);
1589         for (i = 0; i < count; ++i) {
1590                 printk ("%.2x ", buf[i]);
1591         }
1592 @@ -472,11 +483,14 @@
1593         if (from_user) {
1594                 temp_buffer = kmalloc (count, GFP_KERNEL);
1595                 if (temp_buffer == NULL) {
1596 -                       err (__FUNCTION__ "- out of memory.");
1597 +                       err ("%s - out of memory.", __FUNCTION__);
1598                         retval = -ENOMEM;
1599                         goto exit;
1600                 }
1601 -               copy_from_user (temp_buffer, buf, count);
1602 +               if (copy_from_user (temp_buffer, buf, count)) {
1603 +                       retval = -EFAULT;
1604 +                       goto exit;
1605 +               }
1606                 current_buffer = temp_buffer;
1607         } else {
1608                 current_buffer = buf;
1609 @@ -485,7 +499,7 @@
1610         switch (*current_buffer) {
1611                 /* First byte indicates the type of packet */
1612                 case CMD_PKT:
1613 -                       /* dbg(__FUNCTION__ "- Send cmd_pkt len:%d", count);*/
1614 +                       /* dbg("%s- Send cmd_pkt len:%d", __FUNCTION__, count);*/
1615  
1616                         retval = bluetooth_ctrl_msg (bluetooth, 0x00, 0x00, &current_buffer[1], count-1);
1617                         if (retval) {
1618 @@ -511,7 +525,7 @@
1619                                         }
1620                                 }
1621                                 if (urb == NULL) {
1622 -                                       dbg (__FUNCTION__ " - no free urbs");
1623 +                                       dbg ("%s - no free urbs", __FUNCTION__);
1624                                         retval = bytes_sent;
1625                                         goto exit;
1626                                 }
1627 @@ -528,7 +542,7 @@
1628                                 /* send it down the pipe */
1629                                 retval = usb_submit_urb(urb);
1630                                 if (retval) {
1631 -                                       dbg(__FUNCTION__ " - usb_submit_urb(write bulk) failed with error = %d", retval);
1632 +                                       dbg("%s - usb_submit_urb(write bulk) failed with error = %d", __FUNCTION__, retval);
1633                                         goto exit;
1634                                 }
1635  #ifdef BTBUGGYHARDWARE
1636 @@ -547,7 +561,7 @@
1637                         break;
1638                 
1639                 default :
1640 -                       dbg(__FUNCTION__" - unsupported (at this time) write type");
1641 +                       dbg("%s - unsupported (at this time) write type", __FUNCTION__);
1642                         retval = -EINVAL;
1643                         break;
1644         }
1645 @@ -570,10 +584,10 @@
1646                 return -ENODEV;
1647         }
1648  
1649 -       dbg(__FUNCTION__);
1650 +       dbg("%s", __FUNCTION__);
1651  
1652 -       if (!bluetooth->active) {
1653 -               dbg (__FUNCTION__ " - device not open");
1654 +       if (!bluetooth->open_count) {
1655 +               dbg ("%s - device not open", __FUNCTION__);
1656                 return -EINVAL;
1657         }
1658  
1659 @@ -583,7 +597,7 @@
1660                 }
1661         }
1662  
1663 -       dbg(__FUNCTION__ " - returns %d", room);
1664 +       dbg("%s - returns %d", __FUNCTION__, room);
1665         return room;
1666  }
1667  
1668 @@ -598,8 +612,8 @@
1669                 return -ENODEV;
1670         }
1671  
1672 -       if (!bluetooth->active) {
1673 -               dbg (__FUNCTION__ " - device not open");
1674 +       if (!bluetooth->open_count) {
1675 +               dbg ("%s - device not open", __FUNCTION__);
1676                 return -EINVAL;
1677         }
1678  
1679 @@ -609,7 +623,7 @@
1680                 }
1681         }
1682  
1683 -       dbg (__FUNCTION__ " - returns %d", chars);
1684 +       dbg ("%s - returns %d", __FUNCTION__, chars);
1685         return chars;
1686  }
1687  
1688 @@ -622,14 +636,14 @@
1689                 return;
1690         }
1691  
1692 -       dbg(__FUNCTION__);
1693 +       dbg("%s", __FUNCTION__);
1694  
1695 -       if (!bluetooth->active) {
1696 -               dbg (__FUNCTION__ " - device not open");
1697 +       if (!bluetooth->open_count) {
1698 +               dbg ("%s - device not open", __FUNCTION__);
1699                 return;
1700         }
1701         
1702 -       dbg(__FUNCTION__ " unsupported (at this time)");
1703 +       dbg("%s unsupported (at this time)", __FUNCTION__);
1704  
1705         return;
1706  }
1707 @@ -643,14 +657,14 @@
1708                 return;
1709         }
1710  
1711 -       dbg(__FUNCTION__);
1712 +       dbg("%s", __FUNCTION__);
1713  
1714 -       if (!bluetooth->active) {
1715 -               dbg (__FUNCTION__ " - device not open");
1716 +       if (!bluetooth->open_count) {
1717 +               dbg ("%s - device not open", __FUNCTION__);
1718                 return;
1719         }
1720  
1721 -       dbg(__FUNCTION__ " unsupported (at this time)");
1722 +       dbg("%s unsupported (at this time)", __FUNCTION__);
1723  }
1724  
1725  
1726 @@ -662,10 +676,10 @@
1727                 return -ENODEV;
1728         }
1729  
1730 -       dbg(__FUNCTION__ " - cmd 0x%.4x", cmd);
1731 +       dbg("%s - cmd 0x%.4x", __FUNCTION__, cmd);
1732  
1733 -       if (!bluetooth->active) {
1734 -               dbg (__FUNCTION__ " - device not open");
1735 +       if (!bluetooth->open_count) {
1736 +               dbg ("%s - device not open", __FUNCTION__);
1737                 return -ENODEV;
1738         }
1739  
1740 @@ -682,10 +696,10 @@
1741                 return;
1742         }
1743  
1744 -       dbg(__FUNCTION__);
1745 +       dbg("%s", __FUNCTION__);
1746  
1747 -       if (!bluetooth->active) {
1748 -               dbg (__FUNCTION__ " - device not open");
1749 +       if (!bluetooth->open_count) {
1750 +               dbg ("%s - device not open", __FUNCTION__);
1751                 return;
1752         }
1753  
1754 @@ -704,10 +718,10 @@
1755                 return;
1756         }
1757  
1758 -       dbg(__FUNCTION__);
1759 +       dbg("%s", __FUNCTION__);
1760  
1761 -       if (!bluetooth->active) {
1762 -               dbg (__FUNCTION__ " - device not open");
1763 +       if (!bluetooth->open_count) {
1764 +               dbg ("%s - device not open", __FUNCTION__);
1765                 return;
1766         }
1767  
1768 @@ -718,7 +732,7 @@
1769                               bluetooth_read_bulk_callback, bluetooth);
1770                 result = usb_submit_urb(bluetooth->read_urb);
1771                 if (result)
1772 -                       err (__FUNCTION__ " - failed submitting read urb, error %d", result);
1773 +                       err ("%s - failed submitting read urb, error %d", __FUNCTION__, result);
1774         }
1775  }
1776  
1777 @@ -729,10 +743,10 @@
1778                 return;
1779         }
1780  
1781 -       dbg(__FUNCTION__);
1782 +       dbg("%s", __FUNCTION__);
1783  
1784 -       if (!bluetooth->active) {
1785 -               dbg (__FUNCTION__ " - device not open");
1786 +       if (!bluetooth->open_count) {
1787 +               dbg ("%s - device not open", __FUNCTION__);
1788                 return;
1789         }
1790  
1791 @@ -755,27 +769,27 @@
1792         unsigned int count = urb->actual_length;
1793         unsigned int packet_size;
1794  
1795 -       dbg(__FUNCTION__);
1796 +       dbg("%s", __FUNCTION__);
1797  
1798         if (!bluetooth) {
1799 -               dbg(__FUNCTION__ " - bad bluetooth pointer, exiting");
1800 +               dbg("%s - bad bluetooth pointer, exiting", __FUNCTION__);
1801                 return;
1802         }
1803  
1804         if (urb->status) {
1805 -               dbg(__FUNCTION__ " - nonzero int status received: %d", urb->status);
1806 +               dbg("%s - nonzero int status received: %d", __FUNCTION__, urb->status);
1807                 return;
1808         }
1809  
1810         if (!count) {
1811 -               dbg(__FUNCTION__ " - zero length int");
1812 +               dbg("%s - zero length int", __FUNCTION__);
1813                 return;
1814         }
1815  
1816  
1817  #ifdef DEBUG
1818         if (count) {
1819 -               printk (KERN_DEBUG __FILE__ ": " __FUNCTION__ "- length = %d, data = ", count);
1820 +               printk (KERN_DEBUG __FILE__ ": %s- length = %d, data = ", __FUNCTION__, count);
1821                 for (i = 0; i < count; ++i) {
1822                         printk ("%.2x ", data[i]);
1823                 }
1824 @@ -805,7 +819,7 @@
1825         }
1826         
1827         if (bluetooth->int_packet_pos + count > EVENT_BUFFER_SIZE) {
1828 -               err(__FUNCTION__ " - exceeded EVENT_BUFFER_SIZE");
1829 +               err("%s - exceeded EVENT_BUFFER_SIZE", __FUNCTION__);
1830                 bluetooth->int_packet_pos = 0;
1831                 return;
1832         }
1833 @@ -821,7 +835,7 @@
1834                 return;
1835  
1836         if (packet_size + EVENT_HDR_SIZE < bluetooth->int_packet_pos) {
1837 -               err(__FUNCTION__ " - packet was too long");
1838 +               err("%s - packet was too long", __FUNCTION__);
1839                 bluetooth->int_packet_pos = 0;
1840                 return;
1841         }
1842 @@ -845,15 +859,15 @@
1843  {
1844         struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__);
1845  
1846 -       dbg(__FUNCTION__);
1847 +       dbg("%s", __FUNCTION__);
1848  
1849         if (!bluetooth) {
1850 -               dbg(__FUNCTION__ " - bad bluetooth pointer, exiting");
1851 +               dbg("%s - bad bluetooth pointer, exiting", __FUNCTION__);
1852                 return;
1853         }
1854  
1855         if (urb->status) {
1856 -               dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
1857 +               dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
1858                 return;
1859         }
1860  }
1861 @@ -869,30 +883,30 @@
1862         int result;
1863  
1864  
1865 -       dbg(__FUNCTION__);
1866 +       dbg("%s", __FUNCTION__);
1867  
1868         if (!bluetooth) {
1869 -               dbg(__FUNCTION__ " - bad bluetooth pointer, exiting");
1870 +               dbg("%s - bad bluetooth pointer, exiting", __FUNCTION__);
1871                 return;
1872         }
1873  
1874         if (urb->status) {
1875 -               dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
1876 +               dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
1877                 if (urb->status == -ENOENT) {                   
1878 -                       dbg(__FUNCTION__ " - URB canceled, won't reschedule");
1879 +                       dbg("%s - URB canceled, won't reschedule", __FUNCTION__);
1880                         return;
1881                 }
1882                 goto exit;
1883         }
1884  
1885         if (!count) {
1886 -               dbg(__FUNCTION__ " - zero length read bulk");
1887 +               dbg("%s - zero length read bulk", __FUNCTION__);
1888                 goto exit;
1889         }
1890  
1891  #ifdef DEBUG
1892         if (count) {
1893 -               printk (KERN_DEBUG __FILE__ ": " __FUNCTION__ "- length = %d, data = ", count);
1894 +               printk (KERN_DEBUG __FILE__ ": %s- length = %d, data = ", __FUNCTION__, count);
1895                 for (i = 0; i < count; ++i) {
1896                         printk ("%.2x ", data[i]);
1897                 }
1898 @@ -909,7 +923,7 @@
1899                               bluetooth_read_bulk_callback, bluetooth);
1900                 result = usb_submit_urb(bluetooth->read_urb);
1901                 if (result)
1902 -                       err (__FUNCTION__ " - failed resubmitting read urb, error %d", result);
1903 +                       err ("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
1904  
1905                 return;
1906         }
1907 @@ -926,7 +940,7 @@
1908         }
1909  
1910         if (bluetooth->bulk_packet_pos + count > ACL_BUFFER_SIZE) {
1911 -               err(__FUNCTION__ " - exceeded ACL_BUFFER_SIZE");
1912 +               err("%s - exceeded ACL_BUFFER_SIZE", __FUNCTION__);
1913                 bluetooth->bulk_packet_pos = 0;
1914                 goto exit;
1915         }
1916 @@ -943,7 +957,7 @@
1917         }
1918  
1919         if (packet_size + ACL_HDR_SIZE < bluetooth->bulk_packet_pos) {
1920 -               err(__FUNCTION__ " - packet was too long");
1921 +               err("%s - packet was too long", __FUNCTION__);
1922                 bluetooth->bulk_packet_pos = 0;
1923                 goto exit;
1924         }
1925 @@ -961,7 +975,7 @@
1926         }       
1927  
1928  exit:
1929 -       if (!bluetooth || !bluetooth->active)
1930 +       if (!bluetooth || !bluetooth->open_count)
1931                 return;
1932  
1933         FILL_BULK_URB(bluetooth->read_urb, bluetooth->dev, 
1934 @@ -970,7 +984,7 @@
1935                       bluetooth_read_bulk_callback, bluetooth);
1936         result = usb_submit_urb(bluetooth->read_urb);
1937         if (result)
1938 -               err (__FUNCTION__ " - failed resubmitting read urb, error %d", result);
1939 +               err ("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
1940  
1941         return;
1942  }
1943 @@ -980,15 +994,15 @@
1944  {
1945         struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__);
1946  
1947 -       dbg(__FUNCTION__);
1948 +       dbg("%s", __FUNCTION__);
1949  
1950         if (!bluetooth) {
1951 -               dbg(__FUNCTION__ " - bad bluetooth pointer, exiting");
1952 +               dbg("%s - bad bluetooth pointer, exiting", __FUNCTION__);
1953                 return;
1954         }
1955  
1956         if (urb->status) {
1957 -               dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
1958 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
1959                 return;
1960         }
1961  
1962 @@ -1004,7 +1018,7 @@
1963         struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)private, __FUNCTION__);
1964         struct tty_struct *tty;
1965  
1966 -       dbg(__FUNCTION__);
1967 +       dbg("%s", __FUNCTION__);
1968  
1969         if (!bluetooth) {
1970                 return;
1971 @@ -1012,7 +1026,7 @@
1972  
1973         tty = bluetooth->tty;
1974         if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
1975 -               dbg(__FUNCTION__ " - write wakeup call.");
1976 +               dbg("%s - write wakeup call.", __FUNCTION__);
1977                 (tty->ldisc.write_wakeup)(tty);
1978         }
1979  
1980 @@ -1074,7 +1088,7 @@
1981         if ((num_bulk_in != 1) ||
1982             (num_bulk_out != 1) ||
1983             (num_interrupt_in != 1)) {
1984 -               dbg (__FUNCTION__ " - improper number of endpoints. Bluetooth driver not bound.");
1985 +               dbg ("%s - improper number of endpoints. Bluetooth driver not bound.", __FUNCTION__);
1986                 return NULL;
1987         }
1988  
1989 @@ -1102,6 +1116,7 @@
1990         bluetooth->minor = minor;
1991         bluetooth->tqueue.routine = bluetooth_softint;
1992         bluetooth->tqueue.data = bluetooth;
1993 +       init_MUTEX(&bluetooth->lock);
1994  
1995         /* record the interface number for the control out */
1996         bluetooth->control_out_bInterfaceNum = control_out_endpoint;
1997 @@ -1136,7 +1151,8 @@
1998  
1999         endpoint = bulk_out_endpoint[0];
2000         bluetooth->bulk_out_endpointAddress = endpoint->bEndpointAddress;
2001 -       
2002 +       bluetooth->bulk_out_buffer_size = endpoint->wMaxPacketSize * 2;
2003 +
2004         /* create our write urb pool */ 
2005         for (i = 0; i < NUM_BULK_URBS; ++i) {
2006                 struct urb  *urb = usb_alloc_urb(0);
2007 @@ -1151,8 +1167,6 @@
2008                 }
2009                 bluetooth->write_urb_pool[i] = urb;
2010         }
2011 -       
2012 -       bluetooth->bulk_out_buffer_size = endpoint->wMaxPacketSize * 2;
2013  
2014         endpoint = interrupt_in_endpoint[0];
2015         bluetooth->interrupt_in_urb = usb_alloc_urb(0);
2016 @@ -1217,10 +1231,10 @@
2017         int i;
2018  
2019         if (bluetooth) {
2020 -               if ((bluetooth->active) && (bluetooth->tty))
2021 +               if ((bluetooth->open_count) && (bluetooth->tty))
2022                         tty_hangup(bluetooth->tty);
2023  
2024 -               bluetooth->active = 0;
2025 +               bluetooth->open_count = 0;
2026  
2027                 if (bluetooth->read_urb) {
2028                         usb_unlink_urb (bluetooth->read_urb);
2029 @@ -1271,30 +1285,30 @@
2030  
2031  
2032  static struct tty_driver bluetooth_tty_driver = {
2033 -       magic:                  TTY_DRIVER_MAGIC,
2034 -       driver_name:            "usb-bluetooth",
2035 -       name:                   "usb/ttub/%d",
2036 -       major:                  BLUETOOTH_TTY_MAJOR,
2037 -       minor_start:            0,
2038 -       num:                    BLUETOOTH_TTY_MINORS,
2039 -       type:                   TTY_DRIVER_TYPE_SERIAL,
2040 -       subtype:                SERIAL_TYPE_NORMAL,
2041 -       flags:                  TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS,
2042 -
2043 -       refcount:               &bluetooth_refcount,
2044 -       table:                  bluetooth_tty,
2045 -       termios:                bluetooth_termios,
2046 -       termios_locked:         bluetooth_termios_locked,
2047 -
2048 -       open:                   bluetooth_open,
2049 -       close:                  bluetooth_close,
2050 -       write:                  bluetooth_write,
2051 -       write_room:             bluetooth_write_room,
2052 -       ioctl:                  bluetooth_ioctl,
2053 -       set_termios:            bluetooth_set_termios,
2054 -       throttle:               bluetooth_throttle,
2055 -       unthrottle:             bluetooth_unthrottle,
2056 -       chars_in_buffer:        bluetooth_chars_in_buffer,
2057 +       .magic =                TTY_DRIVER_MAGIC,
2058 +       .driver_name =          "usb-bluetooth",
2059 +       .name =                 "usb/ttub/%d",
2060 +       .major =                BLUETOOTH_TTY_MAJOR,
2061 +       .minor_start =          0,
2062 +       .num =                  BLUETOOTH_TTY_MINORS,
2063 +       .type =                 TTY_DRIVER_TYPE_SERIAL,
2064 +       .subtype =              SERIAL_TYPE_NORMAL,
2065 +       .flags =                TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS,
2066 +
2067 +       .refcount =             &bluetooth_refcount,
2068 +       .table =                bluetooth_tty,
2069 +       .termios =              bluetooth_termios,
2070 +       .termios_locked =       bluetooth_termios_locked,
2071 +
2072 +       .open =                 bluetooth_open,
2073 +       .close =                bluetooth_close,
2074 +       .write =                bluetooth_write,
2075 +       .write_room =           bluetooth_write_room,
2076 +       .ioctl =                bluetooth_ioctl,
2077 +       .set_termios =          bluetooth_set_termios,
2078 +       .throttle =             bluetooth_throttle,
2079 +       .unthrottle =           bluetooth_unthrottle,
2080 +       .chars_in_buffer =      bluetooth_chars_in_buffer,
2081  };
2082  
2083  
2084 @@ -1314,7 +1328,7 @@
2085         bluetooth_tty_driver.init_termios          = tty_std_termios;
2086         bluetooth_tty_driver.init_termios.c_cflag  = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
2087         if (tty_register_driver (&bluetooth_tty_driver)) {
2088 -               err(__FUNCTION__ " - failed to register tty driver");
2089 +               err("%s - failed to register tty driver", __FUNCTION__);
2090                 return -1;
2091         }
2092  
2093 diff -Nur linux-2.4.19.org/drivers/usb/brlvger.c linux-2.4.19/drivers/usb/brlvger.c
2094 --- linux-2.4.19.org/drivers/usb/brlvger.c      Sat Aug  3 02:39:44 2002
2095 +++ linux-2.4.19/drivers/usb/brlvger.c  Thu Oct 31 08:11:20 2002
2096 @@ -208,8 +208,8 @@
2097  #define err(args...) \
2098      ({ printk(KERN_ERR "Voyager: " args); \
2099         printk("\n"); })
2100 -#define dbgprint(args...) \
2101 -    ({ printk(KERN_DEBUG "Voyager: " __FUNCTION__ ": " args); \
2102 +#define dbgprint(fmt, args...) \
2103 +    ({ printk(KERN_DEBUG "Voyager: %s: " fmt, __FUNCTION__ , ##args); \
2104         printk("\n"); })
2105  #define dbg(args...) \
2106      ({ if(debug >= 1) dbgprint(args); })
2107 @@ -586,7 +586,9 @@
2108         struct brlvger_priv *priv = file->private_data;
2109         char buf[MAX_BRLVGER_CELLS];
2110         int ret;
2111 -       int rs, off;
2112 +       size_t rs;
2113 +       loff_t off;
2114 +
2115         __u16 written;
2116  
2117         if(!priv->dev)
2118 diff -Nur linux-2.4.19.org/drivers/usb/catc.c linux-2.4.19/drivers/usb/catc.c
2119 --- linux-2.4.19.org/drivers/usb/catc.c Sat Aug  3 02:39:44 2002
2120 +++ linux-2.4.19/drivers/usb/catc.c     Thu Oct 31 08:11:20 2002
2121 @@ -7,6 +7,9 @@
2122   *
2123   *  Based on the work of
2124   *             Donald Becker
2125 + * 
2126 + *  Old chipset support added by Simon Evans <spse@secret.org.uk> 2002
2127 + *    - adds support for Belkin F5U011
2128   */
2129  
2130  /*
2131 @@ -69,6 +72,7 @@
2132  #define RX_MAX_BURST           15      /* Max packets per rx buffer (> 0, < 16) */
2133  #define TX_MAX_BURST           15      /* Max full sized packets per tx buffer (> 0) */
2134  #define CTRL_QUEUE             16      /* Max control requests in flight (power of two) */
2135 +#define RX_PKT_SZ              1600    /* Max size of receive packet for F5U011 */
2136  
2137  /*
2138   * Control requests.
2139 @@ -79,6 +83,7 @@
2140         GetMac =        0xf2,
2141         Reset =         0xf4,
2142         SetMac =        0xf5,
2143 +       SetRxMode =     0xf5,  /* F5U011 only */
2144         WriteROM =      0xf8,
2145         SetReg =        0xfa,
2146         GetReg =        0xfb,
2147 @@ -126,6 +131,7 @@
2148         RxForceOK =     0x04,
2149         RxMultiCast =   0x08,
2150         RxPromisc =     0x10,
2151 +       AltRxPromisc =  0x20, /* F5U011 uses different bit */
2152  };
2153  
2154  enum led_values {
2155 @@ -136,6 +142,12 @@
2156         LEDLink =       0x08,
2157  };
2158  
2159 +enum link_status {
2160 +       LinkNoChange = 0,
2161 +       LinkGood     = 1,
2162 +       LinkBad      = 2
2163 +};
2164 +
2165  /*
2166   * The catc struct.
2167   */
2168 @@ -159,7 +171,7 @@
2169         u8 rx_buf[RX_MAX_BURST * (PKT_SZ + 2)];
2170         u8 irq_buf[2];
2171         u8 ctrl_buf[64];
2172 -       devrequest ctrl_dr;
2173 +       struct usb_ctrlrequest ctrl_dr;
2174  
2175         struct timer_list timer;
2176         u8 stats_buf[8];
2177 @@ -179,6 +191,10 @@
2178         } ctrl_queue[CTRL_QUEUE];
2179  
2180         struct urb tx_urb, rx_urb, irq_urb, ctrl_urb;
2181 +
2182 +       u8 is_f5u011;   /* Set if device is an F5U011 */
2183 +       u8 rxmode[2];   /* Used for F5U011 */
2184 +       atomic_t recq_sz; /* Used for F5U011 - counter of waiting rx packets */
2185  };
2186  
2187  /*
2188 @@ -192,6 +208,10 @@
2189  #define catc_write_mem(catc, addr, buf, size)          catc_ctrl_msg(catc, USB_DIR_OUT, WriteMem, 0, addr, buf, size)
2190  #define catc_read_mem(catc, addr, buf, size)           catc_ctrl_msg(catc, USB_DIR_IN,  ReadMem, 0, addr, buf, size)
2191  
2192 +#define f5u011_rxmode(catc, rxmode)                    catc_ctrl_msg(catc, USB_DIR_OUT, SetRxMode, 0, 1, rxmode, 2)
2193 +#define f5u011_rxmode_async(catc, rxmode)              catc_ctrl_async(catc, USB_DIR_OUT, SetRxMode, 0, 1, &rxmode, 2, NULL)
2194 +#define f5u011_mchash_async(catc, hash)                        catc_ctrl_async(catc, USB_DIR_OUT, SetRxMode, 0, 2, &hash, 8, NULL)
2195 +
2196  #define catc_set_reg_async(catc, reg, val)             catc_ctrl_async(catc, USB_DIR_OUT, SetReg, val, reg, NULL, 0, NULL)
2197  #define catc_get_reg_async(catc, reg, cb)              catc_ctrl_async(catc, USB_DIR_IN, GetReg, 0, reg, NULL, 1, cb)
2198  #define catc_write_mem_async(catc, addr, buf, size)    catc_ctrl_async(catc, USB_DIR_OUT, WriteMem, 0, addr, buf, size, NULL)
2199 @@ -205,9 +225,12 @@
2200         struct catc *catc = urb->context;
2201         u8 *pkt_start = urb->transfer_buffer;
2202         struct sk_buff *skb;
2203 -       int pkt_len;
2204 +       int pkt_len, pkt_offset = 0;
2205  
2206 -       clear_bit(RX_RUNNING, &catc->flags);
2207 +       if (!catc->is_f5u011) {
2208 +               clear_bit(RX_RUNNING, &catc->flags);
2209 +               pkt_offset = 2;
2210 +       }
2211  
2212         if (urb->status) {
2213                 dbg("rx_done, status %d, length %d", urb->status, urb->actual_length);
2214 @@ -215,19 +238,22 @@
2215         }
2216  
2217         do {
2218 -               pkt_len = le16_to_cpup((u16*)pkt_start);
2219 -
2220 -               if (pkt_len > urb->actual_length) {
2221 -                       catc->stats.rx_length_errors++;
2222 -                       catc->stats.rx_errors++;
2223 -                       break;
2224 +               if(!catc->is_f5u011) {
2225 +                       pkt_len = le16_to_cpup((u16*)pkt_start);
2226 +                       if (pkt_len > urb->actual_length) {
2227 +                               catc->stats.rx_length_errors++;
2228 +                               catc->stats.rx_errors++;
2229 +                               break;
2230 +                       }
2231 +               } else {
2232 +                       pkt_len = urb->actual_length;
2233                 }
2234  
2235                 if (!(skb = dev_alloc_skb(pkt_len)))
2236                         return;
2237  
2238                 skb->dev = catc->netdev;
2239 -               eth_copy_and_sum(skb, pkt_start + 2, pkt_len, 0);
2240 +               eth_copy_and_sum(skb, pkt_start + pkt_offset, pkt_len, 0);
2241                 skb_put(skb, pkt_len);
2242  
2243                 skb->protocol = eth_type_trans(skb, catc->netdev);
2244 @@ -236,11 +262,28 @@
2245                 catc->stats.rx_packets++;
2246                 catc->stats.rx_bytes += pkt_len;
2247  
2248 +               /* F5U011 only does one packet per RX */
2249 +               if (catc->is_f5u011)
2250 +                       break;
2251                 pkt_start += (((pkt_len + 1) >> 6) + 1) << 6;
2252  
2253         } while (pkt_start - (u8 *) urb->transfer_buffer < urb->actual_length);
2254  
2255         catc->netdev->last_rx = jiffies;
2256 +
2257 +       if (catc->is_f5u011) {
2258 +               if (atomic_read(&catc->recq_sz)) {
2259 +                       int status;
2260 +                       atomic_dec(&catc->recq_sz);
2261 +                       dbg("getting extra packet");
2262 +                       urb->dev = catc->usbdev;
2263 +                       if ((status = usb_submit_urb(urb)) < 0) {
2264 +                               dbg("submit(rx_urb) status %d", status);
2265 +                       }
2266 +               } else {
2267 +                       clear_bit(RX_RUNNING, &catc->flags);
2268 +               }
2269 +       }
2270  }
2271  
2272  static void catc_irq_done(struct urb *urb)
2273 @@ -248,29 +291,48 @@
2274         struct catc *catc = urb->context;
2275         u8 *data = urb->transfer_buffer;
2276         int status;
2277 +       unsigned int hasdata = 0, linksts = LinkNoChange;
2278 +
2279 +       if (!catc->is_f5u011) {
2280 +               hasdata = data[1] & 0x80;
2281 +               if (data[1] & 0x40)
2282 +                       linksts = LinkGood;
2283 +               else if (data[1] & 0x20)
2284 +                       linksts = LinkBad;
2285 +       } else {
2286 +               hasdata = (unsigned int)(be16_to_cpup((u16*)data) & 0x0fff);
2287 +               if (data[0] == 0x90)
2288 +                       linksts = LinkGood;
2289 +               else if (data[0] == 0xA0)
2290 +                       linksts = LinkBad;
2291 +       }
2292  
2293         if (urb->status) {
2294                 dbg("irq_done, status %d, data %02x %02x.", urb->status, data[0], data[1]);
2295                 return;
2296         }
2297  
2298 -       if ((data[1] & 0x80) && !test_and_set_bit(RX_RUNNING, &catc->flags)) {
2299 -               catc->rx_urb.dev = catc->usbdev;
2300 -               if ((status = usb_submit_urb(&catc->rx_urb)) < 0) {
2301 -                       err("submit(rx_urb) status %d", status);
2302 -                       return;
2303 -               } 
2304 -       }
2305 -
2306 -       if (data[1] & 0x40) {
2307 +       if (linksts == LinkGood) {
2308                 netif_carrier_on(catc->netdev);
2309                 dbg("link ok");
2310         }
2311  
2312 -       if (data[1] & 0x20) {
2313 +       if (linksts == LinkBad) {
2314                 netif_carrier_off(catc->netdev);
2315                 dbg("link bad");
2316         }
2317 +
2318 +       if (hasdata) {
2319 +               if (test_and_set_bit(RX_RUNNING, &catc->flags)) {
2320 +                       if (catc->is_f5u011)
2321 +                               atomic_inc(&catc->recq_sz);
2322 +               } else {
2323 +                       catc->rx_urb.dev = catc->usbdev;
2324 +                       if ((status = usb_submit_urb(&catc->rx_urb)) < 0) {
2325 +                               err("submit(rx_urb) status %d", status);
2326 +                       }
2327 +               } 
2328 +       }
2329  }
2330  
2331  /*
2332 @@ -281,6 +343,9 @@
2333  {
2334         int status;
2335  
2336 +       if (catc->is_f5u011)
2337 +               catc->tx_ptr = (catc->tx_ptr + 63) & ~63;
2338 +
2339         catc->tx_urb.transfer_buffer_length = catc->tx_ptr;
2340         catc->tx_urb.transfer_buffer = catc->tx_buf[catc->tx_idx];
2341         catc->tx_urb.dev = catc->usbdev;
2342 @@ -337,14 +402,16 @@
2343  
2344         catc->tx_ptr = (((catc->tx_ptr - 1) >> 6) + 1) << 6;
2345         tx_buf = catc->tx_buf[catc->tx_idx] + catc->tx_ptr;
2346 -       *((u16*)tx_buf) = cpu_to_le16((u16)skb->len);
2347 +       *((u16*)tx_buf) = (catc->is_f5u011) ? 
2348 +               cpu_to_be16((u16)skb->len) : cpu_to_le16((u16)skb->len);
2349         memcpy(tx_buf + 2, skb->data, skb->len);
2350         catc->tx_ptr += skb->len + 2;
2351  
2352         if (!test_and_set_bit(TX_RUNNING, &catc->flags))
2353                 catc_tx_run(catc);
2354  
2355 -       if (catc->tx_ptr >= ((TX_MAX_BURST - 1) * (PKT_SZ + 2)))
2356 +       if ((catc->is_f5u011 && catc->tx_ptr)
2357 +            || (catc->tx_ptr >= ((TX_MAX_BURST - 1) * (PKT_SZ + 2))))
2358                 netif_stop_queue(netdev);
2359  
2360         spin_unlock_irqrestore(&catc->tx_lock, flags);
2361 @@ -383,14 +450,14 @@
2362         struct ctrl_queue *q = catc->ctrl_queue + catc->ctrl_tail;
2363         struct usb_device *usbdev = catc->usbdev;
2364         struct urb *urb = &catc->ctrl_urb;
2365 -       devrequest *dr = &catc->ctrl_dr;
2366 +       struct usb_ctrlrequest *dr = &catc->ctrl_dr;
2367         int status;
2368  
2369 -       dr->request = q->request;
2370 -       dr->requesttype = 0x40 | q->dir;
2371 -       dr->value = cpu_to_le16(q->value);
2372 -       dr->index = cpu_to_le16(q->index);
2373 -       dr->length = cpu_to_le16(q->len);
2374 +       dr->bRequest = q->request;
2375 +       dr->bRequestType = 0x40 | q->dir;
2376 +       dr->wValue = cpu_to_le16(q->value);
2377 +       dr->wIndex = cpu_to_le16(q->index);
2378 +       dr->wLength = cpu_to_le16(q->len);
2379  
2380          urb->pipe = q->dir ? usb_rcvctrlpipe(usbdev, 0) : usb_sndctrlpipe(usbdev, 0);
2381         urb->transfer_buffer_length = q->len;
2382 @@ -529,15 +596,20 @@
2383   * Receive modes. Broadcast, Multicast, Promisc.
2384   */
2385  
2386 -static void catc_multicast(unsigned char *addr, u8 *multicast)
2387 +static inline u32 ether_crc_le(int cnt, unsigned char *addr)
2388  {
2389         unsigned int crc = 0xffffffff;
2390         u8 byte, idx, bit;
2391 -
2392 -        for (idx = 0; idx < 6; idx++)
2393 +       
2394 +        for (idx = 0; idx < cnt; idx++)
2395                  for (byte = *addr++, bit = 0; bit < 8; bit++, byte >>= 1)
2396                          crc = (crc >> 1) ^ (((crc ^ byte) & 1) ? 0xedb88320U : 0);
2397 +       return crc;
2398 +}
2399  
2400 +static void catc_multicast(unsigned char *addr, u8 *multicast)
2401 +{
2402 +       unsigned int crc = ether_crc_le(6, addr);
2403         multicast[(crc >> 3) & 0x3f] |= 1 << (crc & 7);
2404  }
2405  
2406 @@ -557,17 +629,33 @@
2407  
2408         if (netdev->flags & IFF_PROMISC) {
2409                 memset(catc->multicast, 0xff, 64);
2410 -               rx |= RxPromisc;
2411 +               rx |= (!catc->is_f5u011) ? RxPromisc : AltRxPromisc;
2412         } 
2413  
2414 -       if (netdev->flags & IFF_ALLMULTI)
2415 +       if (netdev->flags & IFF_ALLMULTI) {
2416                 memset(catc->multicast, 0xff, 64);
2417 -
2418 -       for (i = 0, mc = netdev->mc_list; mc && i < netdev->mc_count; i++, mc = mc->next)
2419 -               catc_multicast(mc->dmi_addr, catc->multicast);
2420 -
2421 -       catc_set_reg_async(catc, RxUnit, rx);
2422 -       catc_write_mem_async(catc, 0xfa80, catc->multicast, 64);
2423 +       } else {
2424 +               for (i = 0, mc = netdev->mc_list; mc && i < netdev->mc_count; i++, mc = mc->next) {
2425 +                       u32 crc = ether_crc_le(6, mc->dmi_addr);
2426 +                       if (!catc->is_f5u011) {
2427 +                               catc->multicast[(crc >> 3) & 0x3f] |= 1 << (crc & 7);
2428 +                       } else {
2429 +                               catc->multicast[7-(crc >> 29)] |= 1 << ((crc >> 26) & 7);
2430 +                       }
2431 +               }
2432 +       }
2433 +       if (!catc->is_f5u011) {
2434 +               catc_set_reg_async(catc, RxUnit, rx);
2435 +               catc_write_mem_async(catc, 0xfa80, catc->multicast, 64);
2436 +       } else {
2437 +               f5u011_mchash_async(catc, catc->multicast);
2438 +               if (catc->rxmode[0] != rx) {
2439 +                       catc->rxmode[0] = rx;
2440 +                       dbg("Setting RX mode to %2.2X %2.2X", catc->rxmode[0],
2441 +                           catc->rxmode[1]);
2442 +                       f5u011_rxmode_async(catc, catc->rxmode);
2443 +               }
2444 +       }
2445  }
2446  
2447  /*
2448 @@ -594,6 +682,30 @@
2449                          return -EFAULT;
2450                  return 0;
2451          }
2452 +
2453 +       /* get settings */
2454 +       case ETHTOOL_GSET:
2455 +               if (catc->is_f5u011) {
2456 +                       struct ethtool_cmd ecmd = { 
2457 +                               ETHTOOL_GSET, 
2458 +                               SUPPORTED_10baseT_Half | SUPPORTED_TP, 
2459 +                               ADVERTISED_10baseT_Half | ADVERTISED_TP, 
2460 +                               SPEED_10, 
2461 +                               DUPLEX_HALF, 
2462 +                               PORT_TP, 
2463 +                               0, 
2464 +                               XCVR_INTERNAL, 
2465 +                               AUTONEG_DISABLE, 
2466 +                               1, 
2467 +                               1 
2468 +                       };
2469 +                       if (copy_to_user(useraddr, &ecmd, sizeof(ecmd)))
2470 +                               return -EFAULT;
2471 +                       return 0;
2472 +               } else {
2473 +                       return -EOPNOTSUPP;
2474 +               }
2475 +
2476          /* get link status */
2477          case ETHTOOL_GLINK: {
2478                  struct ethtool_value edata = {ETHTOOL_GLINK};
2479 @@ -635,7 +747,8 @@
2480  
2481         netif_start_queue(netdev);
2482  
2483 -       mod_timer(&catc->timer, jiffies + STATS_UPDATE);
2484 +       if (!catc->is_f5u011)
2485 +               mod_timer(&catc->timer, jiffies + STATS_UPDATE);
2486  
2487         return 0;
2488  }
2489 @@ -646,7 +759,8 @@
2490  
2491         netif_stop_queue(netdev);
2492  
2493 -       del_timer_sync(&catc->timer);
2494 +       if (!catc->is_f5u011)
2495 +               del_timer_sync(&catc->timer);
2496  
2497         usb_unlink_urb(&catc->rx_urb);
2498         usb_unlink_urb(&catc->tx_urb);
2499 @@ -665,7 +779,7 @@
2500         struct net_device *netdev;
2501         struct catc *catc;
2502         u8 broadcast[6];
2503 -       int i;
2504 +       int i, pktsz;
2505  
2506         if (usb_set_interface(usbdev, ifnum, 1)) {
2507                  err("Can't set altsetting 1.");
2508 @@ -704,6 +818,20 @@
2509         catc->timer.data = (long) catc;
2510         catc->timer.function = catc_stats_timer;
2511  
2512 +       /* The F5U011 has the same vendor/product as the netmate 
2513 +        *  but a device version of 0x130
2514 +        */
2515 +       if (usbdev->descriptor.idVendor == 0x0423 && 
2516 +           usbdev->descriptor.idProduct == 0xa &&
2517 +           catc->usbdev->descriptor.bcdDevice == 0x0130) {
2518 +               dbg("Testing for f5u011");
2519 +               catc->is_f5u011 = 1;
2520 +               atomic_set(&catc->recq_sz, 0);
2521 +               pktsz = RX_PKT_SZ;
2522 +       } else {
2523 +               pktsz = RX_MAX_BURST * (PKT_SZ + 2);
2524 +       }
2525 +
2526         FILL_CONTROL_URB(&catc->ctrl_urb, usbdev, usb_sndctrlpipe(usbdev, 0),
2527                 NULL, NULL, 0, catc_ctrl_done, catc);
2528  
2529 @@ -711,20 +839,21 @@
2530                 NULL, 0, catc_tx_done, catc);
2531  
2532         FILL_BULK_URB(&catc->rx_urb, usbdev, usb_rcvbulkpipe(usbdev, 1),
2533 -               catc->rx_buf, RX_MAX_BURST * (PKT_SZ + 2), catc_rx_done, catc);
2534 +               catc->rx_buf, pktsz, catc_rx_done, catc);
2535  
2536         FILL_INT_URB(&catc->irq_urb, usbdev, usb_rcvintpipe(usbdev, 2),
2537                  catc->irq_buf, 2, catc_irq_done, catc, 1);
2538  
2539 -       dbg("Checking memory size\n");
2540 -
2541 -       i = 0x12345678;
2542 -       catc_write_mem(catc, 0x7a80, &i, 4);
2543 -       i = 0x87654321; 
2544 -       catc_write_mem(catc, 0xfa80, &i, 4);
2545 -       catc_read_mem(catc, 0x7a80, &i, 4);
2546 +       if (!catc->is_f5u011) {
2547 +               dbg("Checking memory size\n");
2548  
2549 -       switch (i) {
2550 +               i = 0x12345678;
2551 +               catc_write_mem(catc, 0x7a80, &i, 4);
2552 +               i = 0x87654321; 
2553 +               catc_write_mem(catc, 0xfa80, &i, 4);
2554 +               catc_read_mem(catc, 0x7a80, &i, 4);
2555 +         
2556 +               switch (i) {
2557                 case 0x12345678:
2558                         catc_set_reg(catc, TxBufCount, 8);
2559                         catc_set_reg(catc, RxBufCount, 32);
2560 @@ -737,44 +866,52 @@
2561                         catc_set_reg(catc, RxBufCount, 16);
2562                         dbg("32k Memory\n");
2563                         break;
2564 +               }
2565 +         
2566 +               dbg("Getting MAC from SEEROM.");
2567 +         
2568 +               catc_get_mac(catc, netdev->dev_addr);
2569 +               
2570 +               dbg("Setting MAC into registers.");
2571 +         
2572 +               for (i = 0; i < 6; i++)
2573 +                       catc_set_reg(catc, StationAddr0 - i, netdev->dev_addr[i]);
2574 +               
2575 +               dbg("Filling the multicast list.");
2576 +         
2577 +               memset(broadcast, 0xff, 6);
2578 +               catc_multicast(broadcast, catc->multicast);
2579 +               catc_multicast(netdev->dev_addr, catc->multicast);
2580 +               catc_write_mem(catc, 0xfa80, catc->multicast, 64);
2581 +               
2582 +               dbg("Clearing error counters.");
2583 +               
2584 +               for (i = 0; i < 8; i++)
2585 +                       catc_set_reg(catc, EthStats + i, 0);
2586 +               catc->last_stats = jiffies;
2587 +               
2588 +               dbg("Enabling.");
2589 +               
2590 +               catc_set_reg(catc, MaxBurst, RX_MAX_BURST);
2591 +               catc_set_reg(catc, OpModes, OpTxMerge | OpRxMerge | OpLenInclude | Op3MemWaits);
2592 +               catc_set_reg(catc, LEDCtrl, LEDLink);
2593 +               catc_set_reg(catc, RxUnit, RxEnable | RxPolarity | RxMultiCast);
2594 +       } else {
2595 +               dbg("Performing reset\n");
2596 +               catc_reset(catc);
2597 +               catc_get_mac(catc, netdev->dev_addr);
2598 +               
2599 +               dbg("Setting RX Mode");
2600 +               catc->rxmode[0] = RxEnable | RxPolarity | RxMultiCast;
2601 +               catc->rxmode[1] = 0;
2602 +               f5u011_rxmode(catc, catc->rxmode);
2603         }
2604 -
2605 -       dbg("Getting MAC from SEEROM.");
2606 -
2607 -       catc_get_mac(catc, netdev->dev_addr);
2608 -
2609 -       dbg("Setting MAC into registers.");
2610 -
2611 -       for (i = 0; i < 6; i++)
2612 -               catc_set_reg(catc, StationAddr0 - i, netdev->dev_addr[i]);
2613 -
2614 -       dbg("Filling the multicast list.");
2615 -
2616 -       memset(broadcast, 0xff, 8);
2617 -       catc_multicast(broadcast, catc->multicast);
2618 -       catc_multicast(netdev->dev_addr, catc->multicast);
2619 -       catc_write_mem(catc, 0xfa80, catc->multicast, 64);
2620 -
2621 -       dbg("Clearing error counters.");
2622 -
2623 -       for (i = 0; i < 8; i++)
2624 -               catc_set_reg(catc, EthStats + i, 0);
2625 -       catc->last_stats = jiffies;
2626 -
2627 -       dbg("Enabling.");
2628 -
2629 -       catc_set_reg(catc, MaxBurst, RX_MAX_BURST);
2630 -       catc_set_reg(catc, OpModes, OpTxMerge | OpRxMerge | OpLenInclude | Op3MemWaits);
2631 -       catc_set_reg(catc, LEDCtrl, LEDLink);
2632 -       catc_set_reg(catc, RxUnit, RxEnable | RxPolarity | RxMultiCast);
2633 -
2634         dbg("Init done.");
2635 -
2636 -       printk(KERN_INFO "%s: CATC EL1210A NetMate USB Ethernet at usb%d:%d.%d, ",
2637 -               netdev->name, usbdev->bus->busnum, usbdev->devnum, ifnum);
2638 +       printk(KERN_INFO "%s: %s USB Ethernet at usb%d:%d.%d, ",
2639 +              netdev->name, (catc->is_f5u011) ? "Belkin F5U011" : "CATC EL1210A NetMate",
2640 +              usbdev->bus->busnum, usbdev->devnum, ifnum);
2641         for (i = 0; i < 5; i++) printk("%2.2x:", netdev->dev_addr[i]);
2642         printk("%2.2x.\n", netdev->dev_addr[i]);
2643 -
2644         return catc;
2645  }
2646  
2647 @@ -791,7 +928,7 @@
2648   */
2649  
2650  static struct usb_device_id catc_id_table [] = {
2651 -       { USB_DEVICE(0x0423, 0xa) },    /* CATC Netmate */
2652 +       { USB_DEVICE(0x0423, 0xa) },    /* CATC Netmate, Belkin F5U011 */
2653         { USB_DEVICE(0x0423, 0xc) },    /* CATC Netmate II, Belkin F5U111 */
2654         { USB_DEVICE(0x08d1, 0x1) },    /* smartBridges smartNIC */
2655         { }
2656 diff -Nur linux-2.4.19.org/drivers/usb/dabusb.c linux-2.4.19/drivers/usb/dabusb.c
2657 --- linux-2.4.19.org/drivers/usb/dabusb.c       Fri Dec 21 18:41:55 2001
2658 +++ linux-2.4.19/drivers/usb/dabusb.c   Thu Oct 31 08:11:20 2002
2659 @@ -83,7 +83,7 @@
2660  }
2661  /*-------------------------------------------------------------------*/
2662  #ifdef DEBUG 
2663 -static void dump_urb (purb_t purb)
2664 +static void dump_urb (struct urb *purb)
2665  {
2666         dbg("urb                   :%p", purb);
2667         dbg("next                  :%p", purb->next);
2668 @@ -167,7 +167,7 @@
2669         return 0;
2670  }
2671  /*-------------------------------------------------------------------*/
2672 -static void dabusb_iso_complete (purb_t purb)
2673 +static void dabusb_iso_complete (struct urb *purb)
2674  {
2675         pbuff_t b = purb->context;
2676         pdabusb_t s = b->s;
2677 @@ -482,7 +482,7 @@
2678         int rem;
2679         int cnt;
2680         pbuff_t b;
2681 -       purb_t purb = NULL;
2682 +       struct urb *purb = NULL;
2683  
2684         dbg("dabusb_read");
2685  
2686 @@ -605,6 +605,7 @@
2687         }
2688         if (usb_set_interface (s->usbdev, _DABUSB_IF, 1) < 0) {
2689                 err("set_interface failed");
2690 +               up(&s->mutex);
2691                 return -EINVAL;
2692         }
2693         s->opened = 1;
2694 diff -Nur linux-2.4.19.org/drivers/usb/dabusb.h linux-2.4.19/drivers/usb/dabusb.h
2695 --- linux-2.4.19.org/drivers/usb/dabusb.h       Tue Oct  3 18:24:40 2000
2696 +++ linux-2.4.19/drivers/usb/dabusb.h   Thu Oct 31 08:11:20 2002
2697 @@ -38,7 +38,7 @@
2698  typedef struct 
2699  {
2700         pdabusb_t s;
2701 -       purb_t purb;
2702 +       struct urb *purb;
2703         struct list_head buff_list;
2704  } buff_t,*pbuff_t;
2705  
2706 diff -Nur linux-2.4.19.org/drivers/usb/devices.c linux-2.4.19/drivers/usb/devices.c
2707 --- linux-2.4.19.org/drivers/usb/devices.c      Sat Aug  3 02:39:44 2002
2708 +++ linux-2.4.19/drivers/usb/devices.c  Thu Oct 31 08:11:20 2002
2709 @@ -61,6 +61,8 @@
2710  #include <linux/usbdevice_fs.h>
2711  #include <asm/uaccess.h>
2712  
2713 +#include "hcd.h"
2714 +
2715  #define MAX_TOPO_LEVEL         6
2716  
2717  /* Define ALLOW_SERIAL_NUMBER if you want to see the serial number of devices */
2718 diff -Nur linux-2.4.19.org/drivers/usb/devio.c linux-2.4.19/drivers/usb/devio.c
2719 --- linux-2.4.19.org/drivers/usb/devio.c        Sat Aug  3 02:39:44 2002
2720 +++ linux-2.4.19/drivers/usb/devio.c    Thu Oct 31 08:11:20 2002
2721 @@ -52,7 +52,7 @@
2722         unsigned int signr;
2723         void *userbuffer;
2724          void *userurb;
2725 -        urb_t urb;
2726 +        struct urb urb;
2727  };
2728  
2729  static loff_t usbdev_lseek(struct file *file, loff_t offset, int orig)
2730 @@ -138,7 +138,7 @@
2731         return ret;
2732  }
2733  
2734 -extern inline unsigned int ld2(unsigned int x)
2735 +static inline unsigned int ld2(unsigned int x)
2736  {
2737          unsigned int r = 0;
2738          
2739 @@ -169,7 +169,7 @@
2740  
2741  static struct async *alloc_async(unsigned int numisoframes)
2742  {
2743 -        unsigned int assize = sizeof(struct async) + numisoframes * sizeof(iso_packet_descriptor_t);
2744 +        unsigned int assize = sizeof(struct async) + numisoframes * sizeof(struct iso_packet_descriptor);
2745          struct async *as = kmalloc(assize, GFP_KERNEL);
2746          if (!as)
2747                  return NULL;
2748 @@ -188,7 +188,7 @@
2749          kfree(as);
2750  }
2751  
2752 -extern __inline__ void async_newpending(struct async *as)
2753 +static inline void async_newpending(struct async *as)
2754  {
2755          struct dev_state *ps = as->ps;
2756          unsigned long flags;
2757 @@ -198,7 +198,7 @@
2758          spin_unlock_irqrestore(&ps->lock, flags);
2759  }
2760  
2761 -extern __inline__ void async_removepending(struct async *as)
2762 +static inline void async_removepending(struct async *as)
2763  {
2764          struct dev_state *ps = as->ps;
2765          unsigned long flags;
2766 @@ -209,7 +209,7 @@
2767          spin_unlock_irqrestore(&ps->lock, flags);
2768  }
2769  
2770 -extern __inline__ struct async *async_getcompleted(struct dev_state *ps)
2771 +static inline struct async *async_getcompleted(struct dev_state *ps)
2772  {
2773          unsigned long flags;
2774          struct async *as = NULL;
2775 @@ -224,7 +224,7 @@
2776          return as;
2777  }
2778  
2779 -extern __inline__ struct async *async_getpending(struct dev_state *ps, void *userurb)
2780 +static inline struct async *async_getpending(struct dev_state *ps, void *userurb)
2781  {
2782          unsigned long flags;
2783          struct async *as;
2784 @@ -245,7 +245,7 @@
2785          return NULL;
2786  }
2787  
2788 -static void async_completed(purb_t urb)
2789 +static void async_completed(struct urb *urb)
2790  {
2791          struct async *as = (struct async *)urb->context;
2792          struct dev_state *ps = as->ps;
2793 @@ -772,7 +772,7 @@
2794         struct usbdevfs_iso_packet_desc *isopkt = NULL;
2795         struct usb_endpoint_descriptor *ep_desc;
2796         struct async *as;
2797 -       devrequest *dr = NULL;
2798 +       struct usb_ctrlrequest *dr = NULL;
2799         unsigned int u, totlen, isofrmlen;
2800         int ret;
2801  
2802 @@ -802,23 +802,23 @@
2803                 /* min 8 byte setup packet, max arbitrary */
2804                 if (uurb.buffer_length < 8 || uurb.buffer_length > PAGE_SIZE)
2805                         return -EINVAL;
2806 -               if (!(dr = kmalloc(sizeof(devrequest), GFP_KERNEL)))
2807 +               if (!(dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL)))
2808                         return -ENOMEM;
2809                 if (copy_from_user(dr, (unsigned char*)uurb.buffer, 8)) {
2810                         kfree(dr);
2811                         return -EFAULT;
2812                 }
2813 -               if (uurb.buffer_length < (le16_to_cpup(&dr->length) + 8)) {
2814 +               if (uurb.buffer_length < (le16_to_cpup(&dr->wLength) + 8)) {
2815                         kfree(dr);
2816                         return -EINVAL;
2817                 }
2818 -               if ((ret = check_ctrlrecip(ps, dr->requesttype, le16_to_cpup(&dr->index)))) {
2819 +               if ((ret = check_ctrlrecip(ps, dr->bRequestType, le16_to_cpup(&dr->wIndex)))) {
2820                         kfree(dr);
2821                         return ret;
2822                 }
2823 -               uurb.endpoint = (uurb.endpoint & ~USB_ENDPOINT_DIR_MASK) | (dr->requesttype & USB_ENDPOINT_DIR_MASK);
2824 +               uurb.endpoint = (uurb.endpoint & ~USB_ENDPOINT_DIR_MASK) | (dr->bRequestType & USB_ENDPOINT_DIR_MASK);
2825                 uurb.number_of_packets = 0;
2826 -               uurb.buffer_length = le16_to_cpup(&dr->length);
2827 +               uurb.buffer_length = le16_to_cpup(&dr->wLength);
2828                 uurb.buffer += 8;
2829                 if (!access_ok((uurb.endpoint & USB_DIR_IN) ?  VERIFY_WRITE : VERIFY_READ, uurb.buffer, uurb.buffer_length)) {
2830                         kfree(dr);
2831 diff -Nur linux-2.4.19.org/drivers/usb/hc_simple.c linux-2.4.19/drivers/usb/hc_simple.c
2832 --- linux-2.4.19.org/drivers/usb/hc_simple.c    Thu Jan  1 01:00:00 1970
2833 +++ linux-2.4.19/drivers/usb/hc_simple.c        Thu Oct 31 08:11:20 2002
2834 @@ -0,0 +1,1072 @@
2835 +/*-------------------------------------------------------------------------*/
2836 +/*-------------------------------------------------------------------------*
2837 + * simple generic USB HCD frontend Version 0.9.5 (10/28/2001)
2838 + * for embedded HCs (SL811HS)
2839 + * 
2840 + * USB URB handling, hci_ hcs_
2841 + * URB queueing, qu_
2842 + * Transfer scheduling, sh_
2843 + * 
2844 + *
2845 + *-------------------------------------------------------------------------*
2846 + * This program is free software; you can redistribute it and/or modify
2847 + * it under the terms of the GNU General Public License as published by
2848 + * the Free Software Foundation; either version 2 of the License, or
2849 + * (at your option) any later version.
2850 + *
2851 + * This program is distributed in the hope that it will be useful,
2852 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2853 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2854 + * GNU General Public License for more details.
2855 + *
2856 + * You should have received a copy of the GNU General Public License
2857 + * along with this program; if not, write to the Free Software
2858 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2859 + *
2860 + *-------------------------------------------------------------------------*/
2861 +
2862 +/* main lock for urb access */
2863 +static spinlock_t usb_urb_lock = SPIN_LOCK_UNLOCKED;
2864 +
2865 +/*-------------------------------------------------------------------------*/
2866 +/*-------------------------------------------------------------------------*/
2867 +/* URB HCD API function layer
2868 + * * * */
2869 +
2870 +/***************************************************************************
2871 + * Function Name : hcs_urb_queue
2872 + *
2873 + * This function initializes the urb status and length before queueing the 
2874 + * urb. 
2875 + *
2876 + * Input:  hci = data structure for the host controller
2877 + *         urb = USB request block data structure 
2878 + *
2879 + * Return: 0 
2880 + **************************************************************************/
2881 +static inline int hcs_urb_queue (hci_t * hci, struct urb * urb)
2882 +{
2883 +       int i;
2884 +
2885 +       DBGFUNC ("enter hcs_urb_queue\n");
2886 +       if (usb_pipeisoc (urb->pipe)) {
2887 +               DBGVERBOSE ("hcs_urb_queue: isoc pipe\n");
2888 +               for (i = 0; i < urb->number_of_packets; i++) {
2889 +                       urb->iso_frame_desc[i].actual_length = 0;
2890 +                       urb->iso_frame_desc[i].status = -EXDEV;
2891 +               }
2892 +
2893 +               /* urb->next hack : 1 .. resub, 0 .. single shot */
2894 +               /* urb->interval = urb->next ? 1 : 0; */
2895 +       }
2896 +
2897 +       urb->status = -EINPROGRESS;
2898 +       urb->actual_length = 0;
2899 +       urb->error_count = 0;
2900 +
2901 +       if (usb_pipecontrol (urb->pipe))
2902 +               hc_flush_data_cache (hci, urb->setup_packet, 8);
2903 +       if (usb_pipeout (urb->pipe))
2904 +               hc_flush_data_cache (hci, urb->transfer_buffer,
2905 +                                    urb->transfer_buffer_length);
2906 +
2907 +       qu_queue_urb (hci, urb);
2908 +
2909 +       return 0;
2910 +}
2911 +
2912 +/***************************************************************************
2913 + * Function Name : hcs_return_urb
2914 + *
2915 + * This function the return path of URB back to the USB core. It calls the
2916 + * the urb complete function if exist, and also handles the resubmition of
2917 + * interrupt URBs.
2918 + *
2919 + * Input:  hci = data structure for the host controller
2920 + *         urb = USB request block data structure 
2921 + *         resub_ok = resubmit flag: 1 = submit urb again, 0 = not submit 
2922 + *
2923 + * Return: 0 
2924 + **************************************************************************/
2925 +static int hcs_return_urb (hci_t * hci, struct urb * urb, int resub_ok)
2926 +{
2927 +       struct usb_device *dev = urb->dev;
2928 +       int resubmit = 0;
2929 +
2930 +       DBGFUNC ("enter hcs_return_urb, urb pointer = 0x%x, "
2931 +                "transferbuffer point = 0x%x, "
2932 +                " setup packet pointer = 0x%x, context pointer = 0x%x \n",
2933 +                (__u32 *) urb, (__u32 *) urb->transfer_buffer,
2934 +                (__u32 *) urb->setup_packet, (__u32 *) urb->context);
2935 +       if (urb_debug)
2936 +               urb_print (urb, "RET", usb_pipeout (urb->pipe));
2937 +
2938 +       resubmit = urb->interval && resub_ok;
2939 +
2940 +       urb->dev = urb->hcpriv = NULL;
2941 +
2942 +       if (urb->complete) {
2943 +               urb->complete (urb);    /* call complete */
2944 +       }
2945 +
2946 +       if (resubmit) {
2947 +               /* requeue the URB */
2948 +               urb->dev = dev;
2949 +               hcs_urb_queue (hci, urb);
2950 +       }
2951 +
2952 +       return 0;
2953 +}
2954 +
2955 +/***************************************************************************
2956 + * Function Name : hci_submit_urb
2957 + *
2958 + * This function is called by the USB core API when an URB is available to
2959 + * process.  This function does the following
2960 + *
2961 + * 1) Check the validity of the URB
2962 + * 2) Parse the device number from the URB
2963 + * 3) Pass the URB to the root hub routine if its intended for the hub, else
2964 + *    queue the urb for the attached device. 
2965 + *
2966 + * Input: urb = USB request block data structure 
2967 + *
2968 + * Return: 0 if success or error code 
2969 + **************************************************************************/
2970 +static int hci_submit_urb (struct urb * urb)
2971 +{
2972 +       hci_t *hci;
2973 +       unsigned int pipe = urb->pipe;
2974 +       unsigned long flags;
2975 +       int ret;
2976 +
2977 +       DBGFUNC ("enter hci_submit_urb, pipe = 0x%x\n", urb->pipe);
2978 +       if (!urb->dev || !urb->dev->bus || urb->hcpriv)
2979 +               return -EINVAL;
2980 +
2981 +       if (usb_endpoint_halted
2982 +           (urb->dev, usb_pipeendpoint (pipe), usb_pipeout (pipe))) {
2983 +               printk ("hci_submit_urb: endpoint_halted\n");
2984 +               return -EPIPE;
2985 +       }
2986 +       hci = (hci_t *) urb->dev->bus->hcpriv;
2987 +
2988 +       /* a request to the virtual root hub */
2989 +
2990 +       if (usb_pipedevice (pipe) == hci->rh.devnum) {
2991 +               if (urb_debug > 1)
2992 +                       urb_print (urb, "SUB-RH", usb_pipein (pipe));
2993 +
2994 +               return rh_submit_urb (urb);
2995 +       }
2996 +
2997 +       /* queue the URB to its endpoint-queue */
2998 +
2999 +       spin_lock_irqsave (&usb_urb_lock, flags);
3000 +       ret = hcs_urb_queue (hci, urb);
3001 +       if (ret != 0) {
3002 +               /* error on return */
3003 +               DBGERR
3004 +                   ("hci_submit_urb: return err, ret = 0x%x, urb->status = 0x%x\n",
3005 +                    ret, urb->status);
3006 +       }
3007 +
3008 +       spin_unlock_irqrestore (&usb_urb_lock, flags);
3009 +
3010 +       return ret;
3011 +
3012 +}
3013 +
3014 +/***************************************************************************
3015 + * Function Name : hci_unlink_urb
3016 + *
3017 + * This function mark the URB to unlink
3018 + *
3019 + * Input: urb = USB request block data structure 
3020 + *
3021 + * Return: 0 if success or error code 
3022 + **************************************************************************/
3023 +static int hci_unlink_urb (struct urb * urb)
3024 +{
3025 +       unsigned long flags;
3026 +       hci_t *hci;
3027 +       DECLARE_WAITQUEUE (wait, current);
3028 +       void *comp = NULL;
3029 +
3030 +       DBGFUNC ("enter hci_unlink_urb\n");
3031 +
3032 +       if (!urb)               /* just to be sure */
3033 +               return -EINVAL;
3034 +
3035 +       if (!urb->dev || !urb->dev->bus)
3036 +               return -ENODEV;
3037 +
3038 +       hci = (hci_t *) urb->dev->bus->hcpriv;
3039 +
3040 +       /* a request to the virtual root hub */
3041 +       if (usb_pipedevice (urb->pipe) == hci->rh.devnum) {
3042 +               return rh_unlink_urb (urb);
3043 +       }
3044 +
3045 +       if (urb_debug)
3046 +               urb_print (urb, "UNLINK", 1);
3047 +
3048 +       spin_lock_irqsave (&usb_urb_lock, flags);
3049 +
3050 +       if (!list_empty (&urb->urb_list) && urb->status == -EINPROGRESS) {
3051 +               /* URB active? */
3052 +
3053 +               if (urb->
3054 +                   transfer_flags & (USB_ASYNC_UNLINK | USB_TIMEOUT_KILLED)) {
3055 +                       /* asynchron with callback */
3056 +
3057 +                       list_del (&urb->urb_list);      /* relink the urb to the del list */
3058 +                       list_add (&urb->urb_list, &hci->del_list);
3059 +                       spin_unlock_irqrestore (&usb_urb_lock, flags);
3060 +
3061 +               } else {
3062 +                       /* synchron without callback */
3063 +
3064 +                       add_wait_queue (&hci->waitq, &wait);
3065 +
3066 +                       set_current_state (TASK_UNINTERRUPTIBLE);
3067 +                       comp = urb->complete;
3068 +                       urb->complete = NULL;
3069 +
3070 +                       list_del (&urb->urb_list);      /* relink the urb to the del list */
3071 +                       list_add (&urb->urb_list, &hci->del_list);
3072 +
3073 +                       spin_unlock_irqrestore (&usb_urb_lock, flags);
3074 +
3075 +                       schedule_timeout (HZ / 50);
3076 +
3077 +                       if (!list_empty (&urb->urb_list))
3078 +                               list_del (&urb->urb_list);
3079 +
3080 +                       urb->complete = comp;
3081 +                       urb->hcpriv = NULL;
3082 +                       remove_wait_queue (&hci->waitq, &wait);
3083 +               }
3084 +       } else {
3085 +               /* hcd does not own URB but we keep the driver happy anyway */
3086 +               spin_unlock_irqrestore (&usb_urb_lock, flags);
3087 +
3088 +               if (urb->complete && (urb->transfer_flags & USB_ASYNC_UNLINK)) {
3089 +                       urb->status = -ENOENT;
3090 +                       urb->actual_length = 0;
3091 +                       urb->complete (urb);
3092 +                       urb->status = 0;
3093 +               } else {
3094 +                       urb->status = -ENOENT;
3095 +               }
3096 +       }
3097 +
3098 +       return 0;
3099 +}
3100 +
3101 +/***************************************************************************
3102 + * Function Name : hci_alloc_dev
3103 + *
3104 + * This function allocates private data space for the usb device and 
3105 + * initialize the endpoint descriptor heads.
3106 + *
3107 + * Input: usb_dev = pointer to the usb device 
3108 + *
3109 + * Return: 0 if success or error code 
3110 + **************************************************************************/
3111 +static int hci_alloc_dev (struct usb_device *usb_dev)
3112 +{
3113 +       struct hci_device *dev;
3114 +       int i;
3115 +
3116 +       DBGFUNC ("enter hci_alloc_dev\n");
3117 +       dev = kmalloc (sizeof (*dev), GFP_KERNEL);
3118 +       if (!dev)
3119 +               return -ENOMEM;
3120 +
3121 +       memset (dev, 0, sizeof (*dev));
3122 +
3123 +       for (i = 0; i < 32; i++) {
3124 +               INIT_LIST_HEAD (&(dev->ed[i].urb_queue));
3125 +               dev->ed[i].pipe_head = NULL;
3126 +       }
3127 +
3128 +       usb_dev->hcpriv = dev;
3129 +
3130 +       DBGVERBOSE ("USB HC dev alloc %d bytes\n", sizeof (*dev));
3131 +
3132 +       return 0;
3133 +
3134 +}
3135 +
3136 +/***************************************************************************
3137 + * Function Name : hci_free_dev
3138 + *
3139 + * This function de-allocates private data space for the usb devic
3140 + *
3141 + * Input: usb_dev = pointer to the usb device 
3142 + *
3143 + * Return: 0  
3144 + **************************************************************************/
3145 +static int hci_free_dev (struct usb_device *usb_dev)
3146 +{
3147 +       DBGFUNC ("enter hci_free_dev\n");
3148 +
3149 +       if (usb_dev->hcpriv)
3150 +               kfree (usb_dev->hcpriv);
3151 +
3152 +       usb_dev->hcpriv = NULL;
3153 +
3154 +       return 0;
3155 +}
3156 +
3157 +/***************************************************************************
3158 + * Function Name : hci_get_current_frame_number
3159 + *
3160 + * This function get the current USB frame number
3161 + *
3162 + * Input: usb_dev = pointer to the usb device 
3163 + *
3164 + * Return: frame number  
3165 + **************************************************************************/
3166 +static int hci_get_current_frame_number (struct usb_device *usb_dev)
3167 +{
3168 +       hci_t *hci = usb_dev->bus->hcpriv;
3169 +       DBGFUNC ("enter hci_get_current_frame_number, frame = 0x%x \r\n",
3170 +                hci->frame_number);
3171 +
3172 +       return (hci->frame_number);
3173 +}
3174 +
3175 +/***************************************************************************
3176 + * List of all io-functions 
3177 + **************************************************************************/
3178 +
3179 +static struct usb_operations hci_device_operations = {
3180 +       allocate:               hci_alloc_dev,
3181 +       deallocate:             hci_free_dev,
3182 +       get_frame_number:       hci_get_current_frame_number,
3183 +       submit_urb:             hci_submit_urb,
3184 +       unlink_urb:             hci_unlink_urb,
3185 +};
3186 +
3187 +/***************************************************************************
3188 + * URB queueing:
3189 + * 
3190 + * For each type of transfer (INTR, BULK, ISO, CTRL) there is a list of 
3191 + * active URBs.
3192 + * (hci->intr_list, hci->bulk_list, hci->iso_list, hci->ctrl_list)
3193 + * For every endpoint the head URB of the queued URBs is linked to one of 
3194 + * those lists.
3195 + * 
3196 + * The rest of the queued URBs of an endpoint are linked into a 
3197 + * private URB list for each endpoint. (hci_dev->ed [endpoint_io].urb_queue)
3198 + * hci_dev->ed [endpoint_io].pipe_head .. points to the head URB which is 
3199 + * in one of the active URB lists.
3200 + * 
3201 + * The index of an endpoint consists of its number and its direction.
3202 + * 
3203 + * The state of an intr and iso URB is 0. 
3204 + * For ctrl URBs the states are US_CTRL_SETUP, US_CTRL_DATA, US_CTRL_ACK
3205 + * Bulk URBs states are US_BULK and US_BULK0 (with 0-len packet)
3206 + * 
3207 + **************************************************************************/
3208 +
3209 +/***************************************************************************
3210 + * Function Name : qu_urb_timeout
3211 + *
3212 + * This function is called when the URB timeout. The function unlinks the 
3213 + * URB. 
3214 + *
3215 + * Input: lurb: URB 
3216 + *
3217 + * Return: none  
3218 + **************************************************************************/
3219 +#ifdef HC_URB_TIMEOUT
3220 +static void qu_urb_timeout (unsigned long lurb)
3221 +{
3222 +       struct urb *urb = (struct urb *) lurb;
3223 +
3224 +       DBGFUNC ("enter qu_urb_timeout\n");
3225 +       urb->transfer_flags |= USB_TIMEOUT_KILLED;
3226 +       hci_unlink_urb (urb);
3227 +}
3228 +#endif
3229 +
3230 +/***************************************************************************
3231 + * Function Name : qu_pipeindex
3232 + *
3233 + * This function gets the index of the pipe.   
3234 + *
3235 + * Input: pipe: the urb pipe 
3236 + *
3237 + * Return: index  
3238 + **************************************************************************/
3239 +static inline int qu_pipeindex (__u32 pipe)
3240 +{
3241 +       DBGFUNC ("enter qu_pipeindex\n");
3242 +       return (usb_pipeendpoint (pipe) << 1) | (usb_pipecontrol (pipe) ? 0 : usb_pipeout (pipe));
3243 +}
3244 +
3245 +/***************************************************************************
3246 + * Function Name : qu_seturbstate
3247 + *
3248 + * This function set the state of the URB.  
3249 + * 
3250 + * control pipe: 3 states -- Setup, data, status
3251 + * interrupt and bulk pipe: 1 state -- data    
3252 + *
3253 + * Input: urb = USB request block data structure 
3254 + *        state = the urb state
3255 + *
3256 + * Return: none  
3257 + **************************************************************************/
3258 +static inline void qu_seturbstate (struct urb * urb, int state)
3259 +{
3260 +       DBGFUNC ("enter qu_seturbstate\n");
3261 +       urb->pipe &= ~0x1f;
3262 +       urb->pipe |= state & 0x1f;
3263 +}
3264 +
3265 +/***************************************************************************
3266 + * Function Name : qu_urbstate
3267 + *
3268 + * This function get the current state of the URB.  
3269 + * 
3270 + * Input: urb = USB request block data structure 
3271 + *
3272 + * Return: none  
3273 + **************************************************************************/
3274 +static inline int qu_urbstate (struct urb * urb)
3275 +{
3276 +
3277 +       DBGFUNC ("enter qu_urbstate\n");
3278 +
3279 +       return urb->pipe & 0x1f;
3280 +}
3281 +
3282 +/***************************************************************************
3283 + * Function Name : qu_queue_active_urb
3284 + *
3285 + * This function adds the urb to the appropriate active urb list and set
3286 + * the urb state.
3287 + * 
3288 + * There are four active lists: isochoronous list, interrupt list, 
3289 + * control list, and bulk list.
3290 + * 
3291 + * Input: hci = data structure for the host controller 
3292 + *        urb = USB request block data structure 
3293 + *        ed = endpoint descriptor
3294 + *
3295 + * Return: none  
3296 + **************************************************************************/
3297 +static inline void qu_queue_active_urb (hci_t * hci, struct urb * urb, epd_t * ed)
3298 +{
3299 +       int urb_state = 0;
3300 +       DBGFUNC ("enter qu_queue_active_urb\n");
3301 +       switch (usb_pipetype (urb->pipe)) {
3302 +       case PIPE_CONTROL:
3303 +               list_add (&urb->urb_list, &hci->ctrl_list);
3304 +               urb_state = US_CTRL_SETUP;
3305 +               break;
3306 +
3307 +       case PIPE_BULK:
3308 +               list_add (&urb->urb_list, &hci->bulk_list);
3309 +               if ((urb->transfer_flags & USB_ZERO_PACKET)
3310 +                   && urb->transfer_buffer_length > 0
3311 +                   &&
3312 +                   ((urb->transfer_buffer_length %
3313 +                     usb_maxpacket (urb->dev, urb->pipe,
3314 +                                    usb_pipeout (urb->pipe))) == 0)) {
3315 +                       urb_state = US_BULK0;
3316 +               }
3317 +               break;
3318 +
3319 +       case PIPE_INTERRUPT:
3320 +               urb->start_frame = hci->frame_number;
3321 +               list_add (&urb->urb_list, &hci->intr_list);
3322 +               break;
3323 +
3324 +       case PIPE_ISOCHRONOUS:
3325 +               list_add (&urb->urb_list, &hci->iso_list);
3326 +               break;
3327 +       }
3328 +
3329 +#ifdef HC_URB_TIMEOUT
3330 +       if (urb->timeout) {
3331 +               ed->timeout.data = (unsigned long) urb;
3332 +               ed->timeout.expires = urb->timeout + jiffies;
3333 +               ed->timeout.function = qu_urb_timeout;
3334 +               add_timer (&ed->timeout);
3335 +       }
3336 +#endif
3337 +
3338 +       qu_seturbstate (urb, urb_state);
3339 +}
3340 +
3341 +/***************************************************************************
3342 + * Function Name : qu_queue_urb
3343 + *
3344 + * This function adds the urb to the endpoint descriptor list 
3345 + * 
3346 + * Input: hci = data structure for the host controller 
3347 + *        urb = USB request block data structure 
3348 + *
3349 + * Return: none  
3350 + **************************************************************************/
3351 +static int qu_queue_urb (hci_t * hci, struct urb * urb)
3352 +{
3353 +       struct hci_device *hci_dev = usb_to_hci (urb->dev);
3354 +       epd_t *ed = &hci_dev->ed[qu_pipeindex (urb->pipe)];
3355 +
3356 +       DBGFUNC ("Enter qu_queue_urb\n");
3357 +
3358 +       /* for ISOC transfers calculate start frame index */
3359 +
3360 +       if (usb_pipeisoc (urb->pipe) && urb->transfer_flags & USB_ISO_ASAP) {
3361 +               urb->start_frame = ((ed->pipe_head) ? (ed->last_iso + 1) : hci_get_current_frame_number (urb-> dev) + 1) & 0xffff;
3362 +       }
3363 +
3364 +       if (ed->pipe_head) {
3365 +               __list_add (&urb->urb_list, ed->urb_queue.prev,
3366 +                           &(ed->urb_queue));
3367 +       } else {
3368 +               ed->pipe_head = urb;
3369 +               qu_queue_active_urb (hci, urb, ed);
3370 +               if (++hci->active_urbs == 1)
3371 +                       hc_start_int (hci);
3372 +       }
3373 +
3374 +       return 0;
3375 +}
3376 +
3377 +/***************************************************************************
3378 + * Function Name : qu_next_urb
3379 + *
3380 + * This function removes the URB from the queue and add the next URB to 
3381 + * active list. 
3382 + * 
3383 + * Input: hci = data structure for the host controller 
3384 + *        urb = USB request block data structure 
3385 + *        resub_ok = resubmit flag
3386 + *
3387 + * Return: pointer to the next urb  
3388 + **************************************************************************/
3389 +static struct urb *qu_next_urb (hci_t * hci, struct urb * urb, int resub_ok)
3390 +{
3391 +       struct hci_device *hci_dev = usb_to_hci (urb->dev);
3392 +       epd_t *ed = &hci_dev->ed[qu_pipeindex (urb->pipe)];
3393 +
3394 +       DBGFUNC ("enter qu_next_urb\n");
3395 +       list_del (&urb->urb_list);
3396 +       INIT_LIST_HEAD (&urb->urb_list);
3397 +       if (ed->pipe_head == urb) {
3398 +
3399 +#ifdef HC_URB_TIMEOUT
3400 +               if (urb->timeout)
3401 +                       del_timer (&ed->timeout);
3402 +#endif
3403 +
3404 +               if (!--hci->active_urbs)
3405 +                       hc_stop_int (hci);
3406 +
3407 +               if (!list_empty (&ed->urb_queue)) {
3408 +                       urb = list_entry (ed->urb_queue.next, struct urb, urb_list);
3409 +                       list_del (&urb->urb_list);
3410 +                       INIT_LIST_HEAD (&urb->urb_list);
3411 +                       ed->pipe_head = urb;
3412 +                       qu_queue_active_urb (hci, urb, ed);
3413 +               } else {
3414 +                       ed->pipe_head = NULL;
3415 +                       urb = NULL;
3416 +               }
3417 +       }
3418 +       return urb;
3419 +}
3420 +
3421 +/***************************************************************************
3422 + * Function Name : qu_return_urb
3423 + *
3424 + * This function is part of the return path.   
3425 + * 
3426 + * Input: hci = data structure for the host controller 
3427 + *        urb = USB request block data structure 
3428 + *        resub_ok = resubmit flag
3429 + *
3430 + * Return: pointer to the next urb  
3431 + **************************************************************************/
3432 +static struct urb *qu_return_urb (hci_t * hci, struct urb * urb, int resub_ok)
3433 +{
3434 +       struct urb *next_urb;
3435 +
3436 +       DBGFUNC ("enter qu_return_rub\n");
3437 +       next_urb = qu_next_urb (hci, urb, resub_ok);
3438 +       hcs_return_urb (hci, urb, resub_ok);
3439 +       return next_urb;
3440 +}
3441 +
3442 +/***************************************************************************
3443 + * Function Name : sh_scan_iso_urb_list
3444 + *
3445 + * This function goes throught the isochronous urb list and schedule the 
3446 + * the transfer.   
3447 + *
3448 + * Note: This function has not tested yet
3449 + * 
3450 + * Input: hci = data structure for the host controller 
3451 + *        list_lh = pointer to the isochronous list 
3452 + *        frame_number = the frame number 
3453 + *
3454 + * Return: 0 = unsuccessful; 1 = successful  
3455 + **************************************************************************/
3456 +static int sh_scan_iso_urb_list (hci_t * hci, struct list_head *list_lh,
3457 +                                int frame_number)
3458 +{
3459 +       struct list_head *lh = list_lh->next;
3460 +       struct urb *urb;
3461 +
3462 +       DBGFUNC ("enter sh_scan_iso_urb_list\n");
3463 +       hci->td_array->len = 0;
3464 +
3465 +       while (lh != list_lh) {
3466 +               urb = list_entry (lh, struct urb, urb_list);
3467 +               lh = lh->next;
3468 +               if (((frame_number - urb->start_frame) & 0x7ff) <
3469 +                   urb->number_of_packets) {
3470 +                       if (!sh_add_packet (hci, urb)) {
3471 +                               return 0;
3472 +                       } else {
3473 +                               if (((frame_number -
3474 +                                     urb->start_frame) & 0x7ff) > 0x400) {
3475 +                                       if (qu_urbstate (urb) > 0)
3476 +                                               urb = qu_return_urb (hci, urb, 1);
3477 +                                       else
3478 +                                               urb = qu_next_urb (hci, urb, 1);
3479 +
3480 +                                       if (lh == list_lh && urb)
3481 +                                               lh = &urb->urb_list;
3482 +                               }
3483 +                       }
3484 +               }
3485 +       }
3486 +       return 1;
3487 +}
3488 +
3489 +/***************************************************************************
3490 + * Function Name : sh_scan_urb_list
3491 + *
3492 + * This function goes through the urb list and schedule the 
3493 + * the transaction.   
3494 + * 
3495 + * Input: hci = data structure for the host controller 
3496 + *        list_lh = pointer to the isochronous list 
3497 + *
3498 + * Return: 0 = unsuccessful; 1 = successful  
3499 + **************************************************************************/
3500 +static int sh_scan_urb_list (hci_t * hci, struct list_head *list_lh)
3501 +{
3502 +       struct list_head *lh = NULL;
3503 +       struct urb *urb;
3504 +
3505 +       if (list_lh == NULL) {
3506 +               DBGERR ("sh_scan_urb_list: error, list_lh == NULL\n");
3507 +       }
3508 +
3509 +       DBGFUNC ("enter sh_scan_urb_list: frame# \n");
3510 +
3511 +       list_for_each (lh, list_lh) {
3512 +               urb = list_entry (lh, struct urb, urb_list);
3513 +               if (urb == NULL)
3514 +                       return 1;
3515 +               if (!usb_pipeint (urb->pipe)
3516 +                   || (((hci->frame_number - urb->start_frame)
3517 +                        & 0x7ff) >= urb->interval)) {
3518 +                       DBGVERBOSE ("sh_scan_urb_list !INT: %d fr_no: %d int: %d pint: %d\n",
3519 +                                   urb->start_frame, hci->frame_number, urb->interval,
3520 +                                   usb_pipeint (urb->pipe));
3521 +                       if (!sh_add_packet (hci, urb)) {
3522 +                               return 0;
3523 +                       } else {
3524 +                               DBGVERBOSE ("INT: start: %d fr_no: %d int: %d pint: %d\n",
3525 +                                           urb->start_frame, hci->frame_number,
3526 +                                           urb->interval, usb_pipeint (urb->pipe));
3527 +                               urb->start_frame = hci->frame_number;
3528 +                               return 0;
3529 +
3530 +                       }
3531 +               }
3532 +       }
3533 +       return 1;
3534 +}
3535 +
3536 +/***************************************************************************
3537 + * Function Name : sh_shedule_trans
3538 + *
3539 + * This function schedule the USB transaction.
3540 + * This function will process the endpoint in the following order: 
3541 + * interrupt, control, and bulk.    
3542 + * 
3543 + * Input: hci = data structure for the host controller 
3544 + *        isSOF = flag indicate if Start Of Frame has occurred 
3545 + *
3546 + * Return: 0   
3547 + **************************************************************************/
3548 +static int sh_schedule_trans (hci_t * hci, int isSOF)
3549 +{
3550 +       int units_left = 1;
3551 +       struct list_head *lh;
3552 +
3553 +       if (hci == NULL) {
3554 +               DBGERR ("sh_schedule_trans: hci == NULL\n");
3555 +               return 0;
3556 +       }
3557 +       if (hci->td_array == NULL) {
3558 +               DBGERR ("sh_schedule_trans: hci->td_array == NULL\n");
3559 +               return 0;
3560 +       }
3561 +
3562 +       if (hci->td_array->len != 0) {
3563 +               DBGERR ("ERROR: schedule, hci->td_array->len = 0x%x, s/b: 0\n",
3564 +                       hci->td_array->len);
3565 +       }
3566 +
3567 +       /* schedule the next available interrupt transfer or the next
3568 +        * stage of the interrupt transfer */
3569 +
3570 +       if (hci->td_array->len == 0 && !list_empty (&hci->intr_list)) {
3571 +               units_left = sh_scan_urb_list (hci, &hci->intr_list);
3572 +       }
3573 +
3574 +       /* schedule the next available control transfer or the next
3575 +        * stage of the control transfer */
3576 +
3577 +       if (hci->td_array->len == 0 && !list_empty (&hci->ctrl_list) && units_left > 0) {
3578 +               units_left = sh_scan_urb_list (hci, &hci->ctrl_list);
3579 +       }
3580 +
3581 +       /* schedule the next available bulk transfer or the next
3582 +        * stage of the bulk transfer */
3583 +
3584 +       if (hci->td_array->len == 0 && !list_empty (&hci->bulk_list) && units_left > 0) {
3585 +               sh_scan_urb_list (hci, &hci->bulk_list);
3586 +
3587 +               /* be fair to each BULK URB (move list head around) 
3588 +                * only when the new SOF happens */
3589 +
3590 +               lh = hci->bulk_list.next;
3591 +               list_del (&hci->bulk_list);
3592 +               list_add (&hci->bulk_list, lh);
3593 +       }
3594 +       return 0;
3595 +}
3596 +
3597 +/***************************************************************************
3598 + * Function Name : sh_add_packet
3599 + *
3600 + * This function forms the packet and transmit the packet. This function
3601 + * will handle all endpoint type: isochoronus, interrupt, control, and 
3602 + * bulk.
3603 + * 
3604 + * Input: hci = data structure for the host controller 
3605 + *        urb = USB request block data structure 
3606 + *
3607 + * Return: 0 = unsucessful; 1 = successful   
3608 + **************************************************************************/
3609 +static int sh_add_packet (hci_t * hci, struct urb * urb)
3610 +{
3611 +       __u8 *data = NULL;
3612 +       int len = 0;
3613 +       int toggle = 0;
3614 +       int maxps = usb_maxpacket (urb->dev, urb->pipe, usb_pipeout (urb->pipe));
3615 +       int endpoint = usb_pipeendpoint (urb->pipe);
3616 +       int address = usb_pipedevice (urb->pipe);
3617 +       int slow = (((urb->pipe) >> 26) & 1);
3618 +       int out = usb_pipeout (urb->pipe);
3619 +       int pid = 0;
3620 +       int ret;
3621 +       int i = 0;
3622 +       int iso = 0;
3623 +
3624 +       DBGFUNC ("enter sh_add_packet\n");
3625 +       if (maxps == 0)
3626 +               maxps = 8;
3627 +
3628 +       /* calculate len, toggle bit and add the transaction */
3629 +       switch (usb_pipetype (urb->pipe)) {
3630 +       case PIPE_ISOCHRONOUS:
3631 +               pid = out ? PID_OUT : PID_IN;
3632 +               iso = 1;
3633 +               i = hci->frame_number - urb->start_frame;
3634 +               data = urb->transfer_buffer + urb->iso_frame_desc[i].offset;
3635 +               len = urb->iso_frame_desc[i].length;
3636 +               break;
3637 +
3638 +       case PIPE_BULK: /* BULK and BULK0 */
3639 +       case PIPE_INTERRUPT:
3640 +               pid = out ? PID_OUT : PID_IN;
3641 +               len = urb->transfer_buffer_length - urb->actual_length;
3642 +               data = urb->transfer_buffer + urb->actual_length;
3643 +               toggle = usb_gettoggle (urb->dev, endpoint, out);
3644 +               break;
3645 +
3646 +       case PIPE_CONTROL:
3647 +               switch (qu_urbstate (urb)) {
3648 +               case US_CTRL_SETUP:
3649 +                       len = 8;
3650 +                       pid = PID_SETUP;
3651 +                       data = urb->setup_packet;
3652 +                       toggle = 0;
3653 +                       break;
3654 +
3655 +               case US_CTRL_DATA:
3656 +                       if (!hci->last_packet_nak) {
3657 +                               /* The last packet received is not a nak:
3658 +                                * reset the nak count
3659 +                                */
3660 +
3661 +                               hci->nakCnt = 0;
3662 +                       }
3663 +                       if (urb->transfer_buffer_length != 0) {
3664 +                               pid = out ? PID_OUT : PID_IN;
3665 +                               len = urb->transfer_buffer_length - urb->actual_length;
3666 +                               data = urb->transfer_buffer + urb->actual_length;
3667 +                               toggle = (urb->actual_length & maxps) ? 0 : 1;
3668 +                               usb_settoggle (urb->dev,
3669 +                                              usb_pipeendpoint (urb->pipe),
3670 +                                              usb_pipeout (urb->pipe), toggle);
3671 +                               break;
3672 +                       } else {
3673 +                               /* correct state and fall through */
3674 +                               qu_seturbstate (urb, US_CTRL_ACK);
3675 +                       }
3676 +
3677 +               case US_CTRL_ACK:
3678 +                       len = 0;
3679 +
3680 +                       /* reply in opposite direction */
3681 +                       pid = !out ? PID_OUT : PID_IN;
3682 +                       toggle = 1;
3683 +                       usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe),
3684 +                                      usb_pipeout (urb->pipe), toggle);
3685 +                       break;
3686 +               }
3687 +       }
3688 +
3689 +       ret =
3690 +           hc_add_trans (hci, len, data, toggle, maxps, slow, endpoint,
3691 +                         address, pid, iso, qu_urbstate (urb));
3692 +
3693 +       DBGVERBOSE ("transfer_pa: addr:%d ep:%d pid:%x tog:%x iso:%x sl:%x "
3694 +                   "max:%d\n len:%d ret:%d data:%p left:%d\n",
3695 +                   address, endpoint, pid, toggle, iso, slow,
3696 +                   maxps, len, ret, data, hci->hp.units_left);
3697 +
3698 +       if (ret >= 0) {
3699 +               hci->td_array->td[hci->td_array->len].urb = urb;
3700 +               hci->td_array->td[hci->td_array->len].len = ret;
3701 +               hci->td_array->td[hci->td_array->len].iso_index = i;
3702 +               hci->td_array->len++;
3703 +               hci->active_trans = 1;
3704 +               return 1;
3705 +       }
3706 +       return 0;
3707 +}
3708 +
3709 +/***************************************************************************
3710 + * Function Name : cc_to_error
3711 + *
3712 + * This function maps the SL811HS hardware error code to the linux USB error
3713 + * code.
3714 + * 
3715 + * Input: cc = hardware error code 
3716 + *
3717 + * Return: USB error code   
3718 + **************************************************************************/
3719 +static int cc_to_error (int cc)
3720 +{
3721 +       int errCode = 0;
3722 +       if (cc & SL11H_STATMASK_ERROR) {
3723 +               errCode |= -EILSEQ;
3724 +       } else if (cc & SL11H_STATMASK_OVF) {
3725 +               errCode |= -EOVERFLOW;
3726 +       } else if (cc & SL11H_STATMASK_STALL) {
3727 +               errCode |= -EPIPE;
3728 +       }
3729 +       return errCode;
3730 +}
3731 +
3732 +/***************************************************************************
3733 + * Function Name : sh_done_list
3734 + *
3735 + * This function process the packet when it has done finish transfer.
3736 + * 
3737 + * 1) It handles hardware error
3738 + * 2) It updates the URB state
3739 + * 3) If the USB transaction is complete, it start the return stack path.
3740 + * 
3741 + * Input: hci = data structure for the host controller 
3742 + *        isExcessNak = flag tells if there excess NAK condition occurred 
3743 + *
3744 + * Return:  urb_state or -1 if the transaction has complete   
3745 + **************************************************************************/
3746 +static int sh_done_list (hci_t * hci, int *isExcessNak)
3747 +{
3748 +       int actbytes = 0;
3749 +       int active = 0;
3750 +       void *data = NULL;
3751 +       int cc;
3752 +       int maxps;
3753 +       int toggle;
3754 +       struct urb *urb;
3755 +       int urb_state = 0;
3756 +       int ret = 1;            /* -1 parse abbort, 1 parse ok, 0 last element */
3757 +       int trans = 0;
3758 +       int len;
3759 +       int iso_index = 0;
3760 +       int out;
3761 +       int pid = 0;
3762 +       int debugLen = 0;
3763 +
3764 +       *isExcessNak = 0;
3765 +
3766 +       DBGFUNC ("enter sh_done_list: td_array->len = 0x%x\n",
3767 +                hci->td_array->len);
3768 +
3769 +       debugLen = hci->td_array->len;
3770 +       if (debugLen > 1)
3771 +               DBGERR ("sh_done_list: td_array->len = 0x%x > 1\n",
3772 +                       hci->td_array->len);
3773 +
3774 +       for (trans = 0; ret && trans < hci->td_array->len && trans < MAX_TRANS;
3775 +            trans++) {
3776 +               urb = hci->td_array->td[trans].urb;
3777 +               len = hci->td_array->td[trans].len;
3778 +               out = usb_pipeout (urb->pipe);
3779 +
3780 +               if (usb_pipeisoc (urb->pipe)) {
3781 +                       iso_index = hci->td_array->td[trans].iso_index;
3782 +                       data = urb->transfer_buffer + urb->iso_frame_desc[iso_index].offset;
3783 +                       toggle = 0;
3784 +               } else {
3785 +                       data = urb->transfer_buffer + urb->actual_length;
3786 +                       toggle = usb_gettoggle (urb->dev,
3787 +                                               usb_pipeendpoint (urb->pipe),
3788 +                                               usb_pipeout (urb->pipe));
3789 +
3790 +               }
3791 +               urb_state = qu_urbstate (urb);
3792 +               pid = out ? PID_OUT : PID_IN;
3793 +               ret = hc_parse_trans (hci, &actbytes, data, &cc, &toggle, len,
3794 +                                     pid, urb_state);
3795 +               maxps = usb_maxpacket (urb->dev, urb->pipe, usb_pipeout (urb->pipe));
3796 +
3797 +               if (maxps == 0)
3798 +                       maxps = 8;
3799 +
3800 +               active = (urb_state != US_CTRL_SETUP) && (actbytes && !(actbytes & (maxps - 1)));
3801 +
3802 +               /* If the transfer is not bulk in, then it is necessary to get all
3803 +                * data specify by the urb->transfer_len.
3804 +                */
3805 +
3806 +               if (!(usb_pipebulk (urb->pipe) && usb_pipein (urb->pipe)))
3807 +                       active = active && (urb->transfer_buffer_length != urb->actual_length + actbytes);
3808 +
3809 +               if (urb->transfer_buffer_length == urb->actual_length + actbytes)
3810 +                       active = 0;
3811 +
3812 +               if ((cc &
3813 +                    (SL11H_STATMASK_ERROR | SL11H_STATMASK_TMOUT |
3814 +                     SL11H_STATMASK_OVF | SL11H_STATMASK_STALL))
3815 +                   && !(cc & SL11H_STATMASK_NAK)) {
3816 +                       if (++urb->error_count > 3) {
3817 +                               DBGERR ("done_list: excessive error: errcount = 0x%x, cc = 0x%x\n",
3818 +                                       urb->error_count, cc);
3819 +                               urb_state = 0;
3820 +                               active = 0;
3821 +                       } else {
3822 +                               DBGERR ("done_list: packet err, cc = 0x%x, "
3823 +                                       " urb->length = 0x%x, actual_len = 0x%x,"
3824 +                                       " urb_state =0x%x\n",
3825 +                                       cc, urb->transfer_buffer_length,
3826 +                                       urb->actual_length, urb_state);
3827 +//                     if (cc & SL11H_STATMASK_STALL) {
3828 +                               /* The USB function is STALLED on a control pipe (0), 
3829 +                                * then it needs to send the SETUP command again to 
3830 +                                * clear the STALL condition
3831 +                                */
3832 +
3833 +//                             if (usb_pipeendpoint (urb->pipe) == 0) {
3834 +//                                     urb_state = 2;  
3835 +//                                     active = 0;
3836 +//                             }
3837 +//                     } else   
3838 +                               active = 1;
3839 +                       }
3840 +               } else {
3841 +                       if (cc & SL11H_STATMASK_NAK) {
3842 +                               if (hci->nakCnt < 0x10000) {
3843 +                                       hci->nakCnt++;
3844 +                                       hci->last_packet_nak = 1;
3845 +                                       active = 1;
3846 +                                       *isExcessNak = 0;
3847 +                               } else {
3848 +                                       DBGERR ("done_list: nak count exceed limit\n");
3849 +                                       active = 0;
3850 +                                       *isExcessNak = 1;
3851 +                                       hci->nakCnt = 0;
3852 +                               }
3853 +                       } else {
3854 +                               hci->nakCnt = 0;
3855 +                               hci->last_packet_nak = 0;
3856 +                       }
3857 +
3858 +                       if (urb_state != US_CTRL_SETUP) {
3859 +                               /* no error */
3860 +                               urb->actual_length += actbytes;
3861 +                               usb_settoggle (urb->dev,
3862 +                                              usb_pipeendpoint (urb->pipe),
3863 +                                              usb_pipeout (urb->pipe), toggle);
3864 +                       }
3865 +                       if (usb_pipeisoc (urb->pipe)) {
3866 +                               urb->iso_frame_desc[iso_index].actual_length = actbytes;
3867 +                               urb->iso_frame_desc[iso_index].status = cc_to_error (cc);
3868 +                               active = (iso_index < urb->number_of_packets);
3869 +                       }
3870 +               }
3871 +               if (!active) {
3872 +                       if (!urb_state) {
3873 +                               urb->status = cc_to_error (cc);
3874 +                               if (urb->status) {
3875 +                                       DBGERR ("error on received packet: urb->status = 0x%x\n",
3876 +                                               urb->status);
3877 +                               }
3878 +                               hci->td_array->len = 0;
3879 +                               qu_return_urb (hci, urb, 1);
3880 +                               return -1;
3881 +                       } else {
3882 +                               /* We do not want to decrement the urb_state if exceeded nak,
3883 +                                * because we need to finish the data stage of the control 
3884 +                                * packet 
3885 +                                */
3886 +
3887 +                               if (!(*isExcessNak))
3888 +                                       urb_state--;
3889 +                               qu_seturbstate (urb, urb_state);
3890 +                       }
3891 +               }
3892 +       }
3893 +
3894 +       if (urb_state < 0)
3895 +               DBGERR ("ERROR: done_list, urb_state = %d, suppose > 0\n",
3896 +                       urb_state);
3897 +       if (debugLen != hci->td_array->len) {
3898 +               DBGERR ("ERROR: done_list, debugLen!= td_array->len,"
3899 +                       "debugLen = 0x%x, hci->td_array->len = 0x%x\n",
3900 +                       debugLen, hci->td_array->len);
3901 +       }
3902 +
3903 +       hci->td_array->len = 0;
3904 +
3905 +       return urb_state;
3906 +}
3907 diff -Nur linux-2.4.19.org/drivers/usb/hc_simple.h linux-2.4.19/drivers/usb/hc_simple.h
3908 --- linux-2.4.19.org/drivers/usb/hc_simple.h    Thu Jan  1 01:00:00 1970
3909 +++ linux-2.4.19/drivers/usb/hc_simple.h        Thu Oct 31 08:11:20 2002
3910 @@ -0,0 +1,231 @@
3911 +/*-------------------------------------------------------------------------*/
3912 +/* list of all controllers using this driver 
3913 + * */
3914 +
3915 +static LIST_HEAD (hci_hcd_list);
3916 +
3917 +/* URB states (urb_state) */
3918 +/* isoc, interrupt single state */
3919 +
3920 +/* bulk transfer main state and 0-length packet */
3921 +#define US_BULK                0
3922 +#define US_BULK0       1
3923 +/* three setup states */
3924 +#define US_CTRL_SETUP  2
3925 +#define US_CTRL_DATA   1
3926 +#define US_CTRL_ACK    0
3927 +
3928 +/*-------------------------------------------------------------------------*/
3929 +/* HC private part of a device descriptor
3930 + * */
3931 +
3932 +#define NUM_EDS 32
3933 +
3934 +typedef struct epd {
3935 +       struct urb *pipe_head;
3936 +       struct list_head urb_queue;
3937 +//     int urb_state;
3938 +       struct timer_list timeout;
3939 +       int last_iso;           /* timestamp of last queued ISOC transfer */
3940 +
3941 +} epd_t;
3942 +
3943 +struct hci_device {
3944 +       epd_t ed[NUM_EDS];
3945 +};
3946 +
3947 +/*-------------------------------------------------------------------------*/
3948 +/* Virtual Root HUB 
3949 + */
3950 +
3951 +#define usb_to_hci(usb)        ((struct hci_device *)(usb)->hcpriv)
3952 +
3953 +struct virt_root_hub {
3954 +       int devnum;             /* Address of Root Hub endpoint */
3955 +       void *urb;              /* interrupt URB of root hub */
3956 +       int send;               /* active flag */
3957 +       int interval;           /* intervall of roothub interrupt transfers */
3958 +       struct timer_list rh_int_timer; /* intervall timer for rh interrupt EP */
3959 +};
3960 +
3961 +#if 1
3962 +/* USB HUB CONSTANTS (not OHCI-specific; see hub.h and USB spec) */
3963 +
3964 +/* destination of request */
3965 +#define RH_INTERFACE           0x01
3966 +#define RH_ENDPOINT            0x02
3967 +#define RH_OTHER               0x03
3968 +
3969 +#define RH_CLASS               0x20
3970 +#define RH_VENDOR              0x40
3971 +
3972 +/* Requests: bRequest << 8 | bmRequestType */
3973 +#define RH_GET_STATUS          0x0080
3974 +#define RH_CLEAR_FEATURE       0x0100
3975 +#define RH_SET_FEATURE         0x0300
3976 +#define RH_SET_ADDRESS         0x0500
3977 +#define RH_GET_DESCRIPTOR      0x0680
3978 +#define RH_SET_DESCRIPTOR      0x0700
3979 +#define RH_GET_CONFIGURATION   0x0880
3980 +#define RH_SET_CONFIGURATION   0x0900
3981 +#define RH_GET_STATE           0x0280
3982 +#define RH_GET_INTERFACE       0x0A80
3983 +#define RH_SET_INTERFACE       0x0B00
3984 +#define RH_SYNC_FRAME          0x0C80
3985 +/* Our Vendor Specific Request */
3986 +#define RH_SET_EP              0x2000
3987 +
3988 +/* Hub port features */
3989 +#define RH_PORT_CONNECTION     0x00
3990 +#define RH_PORT_ENABLE         0x01
3991 +#define RH_PORT_SUSPEND                0x02
3992 +#define RH_PORT_OVER_CURRENT   0x03
3993 +#define RH_PORT_RESET          0x04
3994 +#define RH_PORT_POWER          0x08
3995 +#define RH_PORT_LOW_SPEED      0x09
3996 +
3997 +#define RH_C_PORT_CONNECTION   0x10
3998 +#define RH_C_PORT_ENABLE       0x11
3999 +#define RH_C_PORT_SUSPEND      0x12
4000 +#define RH_C_PORT_OVER_CURRENT 0x13
4001 +#define RH_C_PORT_RESET                0x14
4002 +
4003 +/* Hub features */
4004 +#define RH_C_HUB_LOCAL_POWER   0x00
4005 +#define RH_C_HUB_OVER_CURRENT  0x01
4006 +
4007 +#define RH_DEVICE_REMOTE_WAKEUP        0x00
4008 +#define RH_ENDPOINT_STALL      0x01
4009 +
4010 +#endif
4011 +
4012 +/*-------------------------------------------------------------------------*/
4013 +/* struct for each HC 
4014 + */
4015 +
4016 +#define MAX_TRANS      32
4017 +
4018 +typedef struct td {
4019 +       struct urb *urb;
4020 +       __u16 len;
4021 +       __u16 iso_index;
4022 +} td_t;
4023 +
4024 +typedef struct td_array {
4025 +       int len;
4026 +       td_t td[MAX_TRANS];
4027 +} td_array_t;
4028 +
4029 +typedef struct hci {
4030 +       struct virt_root_hub rh;        /* roothub */
4031 +       wait_queue_head_t waitq;        /* deletion of URBs and devices needs a waitqueue */
4032 +       int active;                     /* HC is operating */
4033 +
4034 +       struct list_head ctrl_list;     /* set of ctrl endpoints */
4035 +       struct list_head bulk_list;     /* set of bulk endpoints */
4036 +       struct list_head iso_list;      /* set of isoc endpoints */
4037 +       struct list_head intr_list;     /* ordered (tree) set of int endpoints */
4038 +       struct list_head del_list;      /* set of entpoints to be deleted */
4039 +
4040 +       td_array_t *td_array;
4041 +       td_array_t a_td_array;
4042 +       td_array_t i_td_array[2];
4043 +
4044 +       struct list_head hci_hcd_list;  /* list of all hci_hcd */
4045 +       struct usb_bus *bus;            /* our bus */
4046 +
4047 +//     int trans;                      /* number of transactions pending */
4048 +       int active_urbs;
4049 +       int active_trans;
4050 +       int frame_number;               /* frame number */
4051 +       hcipriv_t hp;                   /* individual part of hc type */
4052 +       int nakCnt;
4053 +       int last_packet_nak;
4054 +
4055 +} hci_t;
4056 +
4057 +/*-------------------------------------------------------------------------*/
4058 +/* condition (error) CC codes and mapping OHCI like
4059 + */
4060 +
4061 +#define TD_CC_NOERROR          0x00
4062 +#define TD_CC_CRC              0x01
4063 +#define TD_CC_BITSTUFFING      0x02
4064 +#define TD_CC_DATATOGGLEM      0x03
4065 +#define TD_CC_STALL            0x04
4066 +#define TD_DEVNOTRESP          0x05
4067 +#define TD_PIDCHECKFAIL                0x06
4068 +#define TD_UNEXPECTEDPID       0x07
4069 +#define TD_DATAOVERRUN         0x08
4070 +#define TD_DATAUNDERRUN                0x09
4071 +#define TD_BUFFEROVERRUN       0x0C
4072 +#define TD_BUFFERUNDERRUN      0x0D
4073 +#define TD_NOTACCESSED         0x0F
4074 +
4075 +
4076 +/* urb interface functions */
4077 +static int hci_get_current_frame_number (struct usb_device *usb_dev);
4078 +static int hci_unlink_urb (struct urb * urb);
4079 +
4080 +static int qu_queue_urb (hci_t * hci, struct urb * urb);
4081 +
4082 +/* root hub */
4083 +static int rh_init_int_timer (struct urb * urb);
4084 +static int rh_submit_urb (struct urb * urb);
4085 +static int rh_unlink_urb (struct urb * urb);
4086 +
4087 +/* schedule functions */
4088 +static int sh_add_packet (hci_t * hci, struct urb * urb);
4089 +
4090 +/* hc specific functions */
4091 +static inline void hc_flush_data_cache (hci_t * hci, void *data, int len);
4092 +static inline int hc_parse_trans (hci_t * hci, int *actbytes, __u8 * data,
4093 +                                 int *cc, int *toggle, int length, int pid,
4094 +                                 int urb_state);
4095 +static inline int hc_add_trans (hci_t * hci, int len, void *data, int toggle,
4096 +                               int maxps, int slow, int endpoint, int address,
4097 +                               int pid, int format, int urb_state);
4098 +
4099 +static void hc_start_int (hci_t * hci);
4100 +static void hc_stop_int (hci_t * hci);
4101 +static void SL811Write (hci_t * hci, char offset, char data);
4102 +
4103 +/* debug| print the main components of an URB     
4104 + * small: 0) header + data packets 1) just header */
4105 +
4106 +static void urb_print (struct urb * urb, char *str, int small)
4107 +{
4108 +       unsigned int pipe = urb->pipe;
4109 +       int i, len;
4110 +
4111 +       if (!urb->dev || !urb->dev->bus) {
4112 +               dbg ("%s URB: no dev", str);
4113 +               return;
4114 +       }
4115 +
4116 +       printk ("%s URB:[%4x] dev:%2d,ep:%2d-%c,type:%s,flags:%4x,len:%d/%d,stat:%d(%x)\n",
4117 +               str, hci_get_current_frame_number (urb->dev),
4118 +               usb_pipedevice (pipe), usb_pipeendpoint (pipe),
4119 +               usb_pipeout (pipe) ? 'O' : 'I',
4120 +               usb_pipetype (pipe) < 2 ? (usb_pipeint (pipe) ? "INTR" : "ISOC")
4121 +               : (usb_pipecontrol (pipe) ? "CTRL" : "BULK"), urb->transfer_flags,
4122 +               urb->actual_length, urb->transfer_buffer_length, urb->status,
4123 +               urb->status);
4124 +       if (!small) {
4125 +               if (usb_pipecontrol (pipe)) {
4126 +                       printk (__FILE__ ": cmd(8):");
4127 +                       for (i = 0; i < 8; i++)
4128 +                               printk (" %02x", ((__u8 *) urb->setup_packet)[i]);
4129 +                       printk ("\n");
4130 +               }
4131 +               if (urb->transfer_buffer_length > 0 && urb->transfer_buffer) {
4132 +                       printk (__FILE__ ": data(%d/%d):", urb->actual_length,
4133 +                               urb->transfer_buffer_length);
4134 +                       len = usb_pipeout (pipe) ? urb-> transfer_buffer_length : urb->actual_length;
4135 +                       for (i = 0; i < 2096 && i < len; i++)
4136 +                               printk (" %02x", ((__u8 *) urb->transfer_buffer)[i]);
4137 +                       printk ("%s stat:%d\n", i < len ? "..." : "",
4138 +                               urb->status);
4139 +               }
4140 +       }
4141 +}
4142 diff -Nur linux-2.4.19.org/drivers/usb/hc_sl811.c linux-2.4.19/drivers/usb/hc_sl811.c
4143 --- linux-2.4.19.org/drivers/usb/hc_sl811.c     Thu Jan  1 01:00:00 1970
4144 +++ linux-2.4.19/drivers/usb/hc_sl811.c Thu Oct 31 08:11:20 2002
4145 @@ -0,0 +1,1359 @@
4146 +/*-------------------------------------------------------------------------*/
4147 +/*-------------------------------------------------------------------------*
4148 + * SL811HS USB HCD for Linux Version 0.1 (10/28/2001)
4149 + * 
4150 + * requires (includes) hc_simple.[hc] simple generic HCD frontend
4151 + *  
4152 + * COPYRIGHT(C) 2001 by CYPRESS SEMICONDUCTOR INC.
4153 + *
4154 + *-------------------------------------------------------------------------*
4155 + * This program is free software; you can redistribute it and/or modify
4156 + * it under the terms of the GNU General Public License as published by
4157 + * the Free Software Foundation; either version 2 of the License, or
4158 + * (at your option) any later version.
4159 + *
4160 + * This program is distributed in the hope that it will be useful,
4161 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4162 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4163 + * GNU General Public License for more details.
4164 + *
4165 + * You should have received a copy of the GNU General Public License
4166 + * along with this program; if not, write to the Free Software
4167 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
4168 + *
4169 + *-------------------------------------------------------------------------*/
4170 +
4171 +#include <linux/config.h>
4172 +#include <linux/module.h>
4173 +#include <linux/kernel.h>
4174 +#include <linux/delay.h>
4175 +#include <linux/sched.h>
4176 +#include <linux/malloc.h>
4177 +#include <linux/errno.h>
4178 +#include <linux/init.h>
4179 +#include <linux/smp_lock.h>
4180 +#include <linux/list.h>
4181 +#include <linux/ioport.h>
4182 +#include <asm/io.h>
4183 +#include <asm/irq.h>
4184 +
4185 +#include <linux/usb.h>
4186 +#include "../core/hcd.h"
4187 +
4188 +#undef HC_URB_TIMEOUT
4189 +#undef HC_SWITCH_INT
4190 +#undef HC_ENABLE_ISOC
4191 +
4192 +#define SL811_DEBUG_ERR
4193 +
4194 +#ifdef SL811_DEBUG_ERR
4195 +#define DBGERR(fmt, args...) printk(fmt,## args)
4196 +#else
4197 +#define DBGERR(fmt, args...)
4198 +#endif
4199 +
4200 +#ifdef SL811_DEBUG
4201 +#define DBG(fmt, args...) printk(fmt,## args)
4202 +#else
4203 +#define DBG(fmt, args...)
4204 +#endif
4205 +
4206 +#ifdef SL811_DEBUG_FUNC
4207 +#define DBGFUNC(fmt, args...) printk(fmt,## args)
4208 +#else
4209 +#define DBGFUNC(fmt, args...)
4210 +#endif
4211 +
4212 +#ifdef SL811_DEBUG_DATA
4213 +#define DBGDATAR(fmt, args...) printk(fmt,## args)
4214 +#define DBGDATAW(fmt, args...) printk(fmt,## args)
4215 +#else
4216 +#define DBGDATAR(fmt, args...)
4217 +#define DBGDATAW(fmt, args...)
4218 +#endif
4219 +
4220 +#ifdef SL811_DEBUG_VERBOSE
4221 +#define DBGVERBOSE(fmt, args...) printk(fmt,## args)
4222 +#else
4223 +#define DBGVERBOSE(fmt, args...)
4224 +#endif
4225 +
4226 +#define TRUE 1
4227 +#define FALSE 0
4228 +
4229 +#define HC_SWITCH_INT
4230 +#include "hc_sl811.h"
4231 +#include "hc_simple.h"
4232 +
4233 +static int urb_debug = 0;
4234 +
4235 +#include "hc_simple.c"
4236 +#include "hc_sl811_rh.c"
4237 +
4238 +/* The base_addr, data_reg_addr, and irq number are board specific.
4239 + * The current values are design to run on the Accelent SA1110 IDP
4240 + * NOTE: values need to modify for different development boards 
4241 + */
4242 +
4243 +static int base_addr = 0xd3800000;
4244 +static int data_reg_addr = 0xd3810000;
4245 +static int irq = 34;
4246 +
4247 +/* forware declaration */
4248 +
4249 +int SL11StartXaction (hci_t * hci, __u8 addr, __u8 epaddr, int pid, int len,
4250 +                     int toggle, int slow, int urb_state);
4251 +
4252 +static int sofWaitCnt = 0;
4253 +
4254 +MODULE_PARM (urb_debug, "i");
4255 +MODULE_PARM_DESC (urb_debug, "debug urb messages, default is 0 (no)");
4256 +
4257 +MODULE_PARM (base_addr, "i");
4258 +MODULE_PARM_DESC (base_addr, "sl811 base address 0xd3800000");
4259 +MODULE_PARM (data_reg_addr, "i");
4260 +MODULE_PARM_DESC (data_reg_addr, "sl811 data register address 0xd3810000");
4261 +MODULE_PARM (irq, "i");
4262 +MODULE_PARM_DESC (irq, "IRQ 34 (default)");
4263 +
4264 +static int hc_reset (hci_t * hci);
4265 +
4266 +/***************************************************************************
4267 + * Function Name : SL811Read
4268 + *
4269 + * Read a byte of data from the SL811H/SL11H
4270 + *
4271 + * Input:  hci = data structure for the host controller
4272 + *         offset = address of SL811/SL11H register or memory
4273 + *
4274 + * Return: data 
4275 + **************************************************************************/
4276 +char SL811Read (hci_t * hci, char offset)
4277 +{
4278 +       hcipriv_t *hp = &hci->hp;
4279 +       char data;
4280 +       writeb (offset, hp->hcport);
4281 +       wmb ();
4282 +       data = readb (hp->hcport2);
4283 +       rmb ();
4284 +       return (data);
4285 +}
4286 +
4287 +/***************************************************************************
4288 + * Function Name : SL811Write
4289 + *
4290 + * Write a byte of data to the SL811H/SL11H
4291 + *
4292 + * Input:  hci = data structure for the host controller
4293 + *         offset = address of SL811/SL11H register or memory
4294 + *         data  = the data going to write to SL811H
4295 + *
4296 + * Return: none 
4297 + **************************************************************************/
4298 +void SL811Write (hci_t * hci, char offset, char data)
4299 +{
4300 +       hcipriv_t *hp = &hci->hp;
4301 +       writeb (offset, hp->hcport);
4302 +       writeb (data, hp->hcport2);
4303 +       wmb ();
4304 +}
4305 +
4306 +/***************************************************************************
4307 + * Function Name : SL811BufRead
4308 + *
4309 + * Read consecutive bytes of data from the SL811H/SL11H buffer
4310 + *
4311 + * Input:  hci = data structure for the host controller
4312 + *         offset = SL811/SL11H register offset
4313 + *         buf = the buffer where the data will store
4314 + *         size = number of bytes to read
4315 + *
4316 + * Return: none 
4317 + **************************************************************************/
4318 +void SL811BufRead (hci_t * hci, short offset, char *buf, short size)
4319 +{
4320 +       hcipriv_t *hp = &hci->hp;
4321 +       if (size <= 0)
4322 +               return;
4323 +       writeb ((char) offset, hp->hcport);
4324 +       wmb ();
4325 +       DBGDATAR ("SL811BufRead: offset = 0x%x, data = ", offset);
4326 +       while (size--) {
4327 +               *buf++ = (char) readb (hp->hcport2);
4328 +               DBGDATAR ("0x%x ", *(buf - 1));
4329 +               rmb ();
4330 +       }
4331 +       DBGDATAR ("\n");
4332 +}
4333 +
4334 +/***************************************************************************
4335 + * Function Name : SL811BufWrite
4336 + *
4337 + * Write consecutive bytes of data to the SL811H/SL11H buffer
4338 + *
4339 + * Input:  hci = data structure for the host controller
4340 + *         offset = SL811/SL11H register offset
4341 + *         buf = the data buffer 
4342 + *         size = number of bytes to write
4343 + *
4344 + * Return: none 
4345 + **************************************************************************/
4346 +void SL811BufWrite (hci_t * hci, short offset, char *buf, short size)
4347 +{
4348 +       hcipriv_t *hp = &hci->hp;
4349 +       if (size <= 0)
4350 +               return;
4351 +       writeb ((char) offset, hp->hcport);
4352 +       wmb ();
4353 +       DBGDATAW ("SL811BufWrite: offset = 0x%x, data = ", offset);
4354 +       while (size--) {
4355 +               DBGDATAW ("0x%x ", *buf);
4356 +               writeb (*buf, hp->hcport2);
4357 +               wmb ();
4358 +               buf++;
4359 +       }
4360 +       DBGDATAW ("\n");
4361 +}
4362 +
4363 +/***************************************************************************
4364 + * Function Name : regTest
4365 + *
4366 + * This routine test the Read/Write functionality of SL811HS registers  
4367 + *
4368 + * 1) Store original register value into a buffer
4369 + * 2) Write to registers with a RAMP pattern. (10, 11, 12, ..., 255)
4370 + * 3) Read from register
4371 + * 4) Compare the written value with the read value and make sure they are 
4372 + *    equivalent
4373 + * 5) Restore the original register value 
4374 + *
4375 + * Input:  hci = data structure for the host controller
4376 + *   
4377 + *
4378 + * Return: TRUE = passed; FALSE = failed 
4379 + **************************************************************************/
4380 +int regTest (hci_t * hci)
4381 +{
4382 +       int i, data, result = TRUE;
4383 +       char buf[256];
4384 +
4385 +       DBGFUNC ("Enter regTest\n");
4386 +       for (i = 0x10; i < 256; i++) {
4387 +               /* save the original buffer */
4388 +               buf[i] = (char) SL811Read (hci, i);
4389 +
4390 +               /* Write the new data to the buffer */
4391 +               SL811Write (hci, i, i);
4392 +       }
4393 +
4394 +       /* compare the written data */
4395 +       for (i = 0x10; i < 256; i++) {
4396 +               data = SL811Read (hci, i);
4397 +               if (data != i) {
4398 +                       DBGERR ("Pattern test failed!! value = 0x%x, s/b 0x%x\n",
4399 +                               data, i);
4400 +                       result = FALSE;
4401 +               }
4402 +       }
4403 +
4404 +       /* restore the data */
4405 +       for (i = 0x10; i < 256; i++) {
4406 +               SL811Write (hci, i, buf[i]);
4407 +       }
4408 +
4409 +       return (result);
4410 +}
4411 +
4412 +/***************************************************************************
4413 + * Function Name : regShow
4414 + *
4415 + * Display all SL811HS register values
4416 + *
4417 + * Input:  hci = data structure for the host controller
4418 + *
4419 + * Return: none 
4420 + **************************************************************************/
4421 +void regShow (hci_t * hci)
4422 +{
4423 +       int i;
4424 +       for (i = 0; i < 256; i++) {
4425 +               printk ("offset %d: 0x%x\n", i, SL811Read (hci, i));
4426 +       }
4427 +}
4428 +
4429 +/************************************************************************
4430 + * Function Name : USBReset
4431 + *  
4432 + * This function resets SL811HS controller and detects the speed of
4433 + * the connecting device                                 
4434 + *
4435 + * Input:  hci = data structure for the host controller
4436 + *                
4437 + * Return: 0 = no device attached; 1 = USB device attached
4438 + *                
4439 + ***********************************************************************/
4440 +static int USBReset (hci_t * hci)
4441 +{
4442 +       int status;
4443 +       hcipriv_t *hp = &hci->hp;
4444 +
4445 +       DBGFUNC ("enter USBReset\n");
4446 +
4447 +       SL811Write (hci, SL11H_CTLREG2, 0xae);
4448 +
4449 +       // setup master and full speed
4450 +
4451 +       SL811Write (hci, SL11H_CTLREG1, 0x08);  // reset USB
4452 +       mdelay (20);            // 20ms                             
4453 +       SL811Write (hci, SL11H_CTLREG1, 0);     // remove SE0        
4454 +
4455 +       for (status = 0; status < 100; status++)
4456 +               SL811Write (hci, SL11H_INTSTATREG, 0xff);       // clear all interrupt bits
4457 +
4458 +       status = SL811Read (hci, SL11H_INTSTATREG);
4459 +
4460 +       if (status & 0x40)      // Check if device is removed
4461 +       {
4462 +               DBG ("USBReset: Device removed\n");
4463 +               SL811Write (hci, SL11H_INTENBLREG,
4464 +                           SL11H_INTMASK_XFERDONE | SL11H_INTMASK_SOFINTR |
4465 +                           SL11H_INTMASK_INSRMV);
4466 +               hp->RHportStatus->portStatus &=
4467 +                   ~(PORT_CONNECT_STAT | PORT_ENABLE_STAT);
4468 +
4469 +               return 0;
4470 +       }
4471 +
4472 +       SL811Write (hci, SL11H_BUFLNTHREG_B, 0);        //zero lenth
4473 +       SL811Write (hci, SL11H_PIDEPREG_B, 0x50);       //send SOF to EP0       
4474 +       SL811Write (hci, SL11H_DEVADDRREG_B, 0x01);     //address0
4475 +       SL811Write (hci, SL11H_SOFLOWREG, 0xe0);
4476 +
4477 +       if (!(status & 0x80)) {
4478 +               /* slow speed device connect directly to root-hub */
4479 +
4480 +               DBG ("USBReset: low speed Device attached\n");
4481 +               SL811Write (hci, SL11H_CTLREG1, 0x8);
4482 +               mdelay (20);
4483 +               SL811Write (hci, SL11H_SOFTMRREG, 0xee);
4484 +               SL811Write (hci, SL11H_CTLREG1, 0x21);
4485 +
4486 +               /* start the SOF or EOP */
4487 +
4488 +               SL811Write (hci, SL11H_HOSTCTLREG_B, 0x01);
4489 +               hp->RHportStatus->portStatus |=
4490 +                   (PORT_CONNECT_STAT | PORT_LOW_SPEED_DEV_ATTACH_STAT);
4491 +
4492 +               /* clear all interrupt bits */
4493 +
4494 +               for (status = 0; status < 20; status++)
4495 +                       SL811Write (hci, SL11H_INTSTATREG, 0xff);
4496 +       } else {
4497 +               /* full speed device connect directly to root hub */
4498 +
4499 +               DBG ("USBReset: full speed Device attached\n");
4500 +               SL811Write (hci, SL11H_CTLREG1, 0x8);
4501 +               mdelay (20);
4502 +               SL811Write (hci, SL11H_SOFTMRREG, 0xae);
4503 +               SL811Write (hci, SL11H_CTLREG1, 0x01);
4504 +
4505 +               /* start the SOF or EOP */
4506 +
4507 +               SL811Write (hci, SL11H_HOSTCTLREG_B, 0x01);
4508 +               hp->RHportStatus->portStatus |= (PORT_CONNECT_STAT);
4509 +               hp->RHportStatus->portStatus &= ~PORT_LOW_SPEED_DEV_ATTACH_STAT;
4510 +
4511 +               /* clear all interrupt bits */
4512 +
4513 +               SL811Write (hci, SL11H_INTSTATREG, 0xff);
4514 +
4515 +       }
4516 +
4517 +       /* enable all interrupts */
4518 +       SL811Write (hci, SL11H_INTENBLREG,
4519 +                   SL11H_INTMASK_XFERDONE | SL11H_INTMASK_SOFINTR |
4520 +                   SL11H_INTMASK_INSRMV);
4521 +
4522 +       return 1;
4523 +}
4524 +
4525 +/*-------------------------------------------------------------------------*/
4526 +/* tl functions */
4527 +static inline void hc_mark_last_trans (hci_t * hci)
4528 +{
4529 +       hcipriv_t *hp = &hci->hp;
4530 +       __u8 *ptd = hp->tl;
4531 +
4532 +       dbg ("enter hc_mark_last_trans\n");
4533 +       if (ptd == NULL) {
4534 +               printk ("hc_mark_last_trans: ptd = null\n");
4535 +               return;
4536 +       }
4537 +       if (hp->xferPktLen > 0)
4538 +               *(ptd + hp->tl_last) |= (1 << 3);
4539 +}
4540 +
4541 +static inline void hc_flush_data_cache (hci_t * hci, void *data, int len)
4542 +{
4543 +}
4544 +
4545 +/************************************************************************
4546 + * Function Name : hc_add_trans
4547 + *  
4548 + * This function sets up the SL811HS register and transmit the USB packets.
4549 + * 
4550 + * 1) Determine if enough time within the current frame to send the packet
4551 + * 2) Load the data into the SL811HS register
4552 + * 3) Set the appropriate command to the register and trigger the transmit
4553 + *
4554 + * Input:  hci = data structure for the host controller
4555 + *         len = data length
4556 + *         data = transmitting data
4557 + *         toggle = USB toggle bit, either 0 or 1
4558 + *         maxps = maximum packet size for this endpoint
4559 + *         slow = speed of the device
4560 + *         endpoint = endpoint number
4561 + *         address = USB address of the device
4562 + *         pid = packet ID
4563 + *         format = 
4564 + *         urb_state = the current stage of USB transaction
4565 + *       
4566 + * Return: 0 = no time left to schedule the transfer
4567 + *         1 = success 
4568 + *                
4569 + ***********************************************************************/
4570 +static inline int hc_add_trans (hci_t * hci, int len, void *data, int toggle,
4571 +                               int maxps, int slow, int endpoint, int address,
4572 +                               int pid, int format, int urb_state)
4573 +{
4574 +       hcipriv_t *hp = &hci->hp;
4575 +       __u16 speed;
4576 +       int ii, jj, kk;
4577 +
4578 +       DBGFUNC ("enter hc_addr_trans: len =0x%x, toggle:0x%x, endpoing:0x%x,"
4579 +                " addr:0x%x, pid:0x%x,format:0x%x\n", len, toggle, endpoint,
4580 +                i address, pid, format);
4581 +
4582 +       if (len > maxps) {
4583 +               len = maxps;
4584 +       }
4585 +
4586 +       speed = hp->RHportStatus->portStatus;
4587 +       if (speed & PORT_LOW_SPEED_DEV_ATTACH_STAT) {
4588 +//      ii = (8*7*8 + 6*3) * len + 800; 
4589 +               ii = 8 * 8 * len + 1024;
4590 +       } else {
4591 +               if (slow) {
4592 +//          ii = (8*7*8 + 6*3) * len + 800; 
4593 +                       ii = 8 * 8 * len + 2048;
4594 +               } else
4595 +//          ii = (8*7 + 6*3)*len + 110;
4596 +                       ii = 8 * len + 256;
4597 +       }
4598 +
4599 +       ii += 2 * 10 * len;
4600 +
4601 +       jj = SL811Read (hci, SL11H_SOFTMRREG);
4602 +       kk = (jj & 0xFF) * 64 - ii;
4603 +
4604 +       if (kk < 0) {
4605 +               DBGVERBOSE
4606 +                   ("hc_add_trans: no bandwidth for schedule, ii = 0x%x,"
4607 +                    "jj = 0x%x, len =0x%x, active_trans = 0x%x\n", ii, jj, len,
4608 +                    hci->active_trans);
4609 +               return (-1);
4610 +       }
4611 +
4612 +       if (pid != PID_IN) {
4613 +               /* Load data into hc */
4614 +
4615 +               SL811BufWrite (hci, SL11H_DATA_START, (__u8 *) data, len);
4616 +       }
4617 +
4618 +       /* transmit */
4619 +
4620 +       SL11StartXaction (hci, (__u8) address, (__u8) endpoint, (__u8) pid, len,
4621 +                         toggle, slow, urb_state);
4622 +
4623 +       return len;
4624 +}
4625 +
4626 +/************************************************************************
4627 + * Function Name : hc_parse_trans
4628 + *  
4629 + * This function checks the status of the transmitted or received packet
4630 + * and copy the data from the SL811HS register into a buffer.
4631 + *
4632 + * 1) Check the status of the packet 
4633 + * 2) If successful, and IN packet then copy the data from the SL811HS register
4634 + *    into a buffer
4635 + *
4636 + * Input:  hci = data structure for the host controller
4637 + *         actbytes = pointer to actual number of bytes
4638 + *         data = data buffer
4639 + *         cc = packet status
4640 + *         length = the urb transmit length
4641 + *         pid = packet ID
4642 + *         urb_state = the current stage of USB transaction
4643 + *       
4644 + * Return: 0 
4645 + ***********************************************************************/
4646 +static inline int hc_parse_trans (hci_t * hci, int *actbytes, __u8 * data,
4647 +                                 int *cc, int *toggle, int length, int pid,
4648 +                                 int urb_state)
4649 +{
4650 +       __u8 addr;
4651 +       __u8 len;
4652 +
4653 +       DBGFUNC ("enter hc_parse_trans\n");
4654 +
4655 +       /* get packet status; convert ack rcvd to ack-not-rcvd */
4656 +
4657 +       *cc = (int) SL811Read (hci, SL11H_PKTSTATREG);
4658 +
4659 +       if (*cc &
4660 +           (SL11H_STATMASK_ERROR | SL11H_STATMASK_TMOUT | SL11H_STATMASK_OVF |
4661 +            SL11H_STATMASK_NAK | SL11H_STATMASK_STALL)) {
4662 +               if (*cc & SL11H_STATMASK_OVF)
4663 +                       DBGERR ("parse trans: error recv ack, cc = 0x%x, TX_BASE_Len = "
4664 +                               "0x%x, TX_count=0x%x\n", *cc,
4665 +                               SL811Read (hci, SL11H_BUFLNTHREG),
4666 +                               SL811Read (hci, SL11H_XFERCNTREG));
4667 +
4668 +       } else {
4669 +               DBGVERBOSE ("parse trans: recv ack, cc = 0x%x, len = 0x%x, \n",
4670 +                           *cc, length);
4671 +
4672 +               /* Successful data */
4673 +               if ((pid == PID_IN) && (urb_state != US_CTRL_SETUP)) {
4674 +
4675 +                       /* Find the base address */
4676 +                       addr = SL811Read (hci, SL11H_BUFADDRREG);
4677 +
4678 +                       /* Find the Transmit Length */
4679 +                       len = SL811Read (hci, SL11H_BUFLNTHREG);
4680 +
4681 +                       /* The actual data length = xmit length reg - xfer count reg */
4682 +                       *actbytes = len - SL811Read (hci, SL11H_XFERCNTREG);
4683 +
4684 +                       if ((data != NULL) && (*actbytes > 0)) {
4685 +                               SL811BufRead (hci, addr, data, *actbytes);
4686 +
4687 +                       } else if ((data == NULL) && (*actbytes <= 0)) {
4688 +                               DBGERR ("hc_parse_trans: data = NULL or actbyte = 0x%x\n",
4689 +                                       *actbytes);
4690 +                               return 0;
4691 +                       }
4692 +               } else if (pid == PID_OUT) {
4693 +                       *actbytes = length;
4694 +               } else {
4695 +                       // printk ("ERR:parse_trans, pid != IN or OUT, pid = 0x%x\n", pid);
4696 +               }
4697 +               *toggle = !*toggle;
4698 +       }
4699 +
4700 +       return 0;
4701 +}
4702 +
4703 +/************************************************************************
4704 + * Function Name : hc_start_int
4705 + *  
4706 + * This function enables SL811HS interrupts
4707 + *
4708 + * Input:  hci = data structure for the host controller
4709 + *       
4710 + * Return: none 
4711 + ***********************************************************************/
4712 +static void hc_start_int (hci_t * hci)
4713 +{
4714 +#ifdef HC_SWITCH_INT
4715 +       int mask =
4716 +           SL11H_INTMASK_XFERDONE | SL11H_INTMASK_SOFINTR |
4717 +           SL11H_INTMASK_INSRMV | SL11H_INTMASK_USBRESET;
4718 +       SL811Write (hci, IntEna, mask);
4719 +#endif
4720 +}
4721 +
4722 +/************************************************************************
4723 + * Function Name : hc_stop_int
4724 + *  
4725 + * This function disables SL811HS interrupts
4726 + *
4727 + * Input:  hci = data structure for the host controller
4728 + *       
4729 + * Return: none 
4730 + ***********************************************************************/
4731 +static void hc_stop_int (hci_t * hci)
4732 +{
4733 +#ifdef HC_SWITCH_INT
4734 +       SL811Write (hci, SL11H_INTSTATREG, 0xff);
4735 +//  SL811Write(hci, SL11H_INTENBLREG, SL11H_INTMASK_INSRMV);
4736 +
4737 +#endif
4738 +}
4739 +
4740 +/************************************************************************
4741 + * Function Name : handleInsRmvIntr
4742 + *  
4743 + * This function handles the insertion or removal of device on  SL811HS. 
4744 + * It resets the controller and updates the port status
4745 + *
4746 + * Input:  hci = data structure for the host controller
4747 + *       
4748 + * Return: none 
4749 + ***********************************************************************/
4750 +void handleInsRmvIntr (hci_t * hci)
4751 +{
4752 +       hcipriv_t *hp = &hci->hp;
4753 +
4754 +       USBReset (hci);
4755 +
4756 +       /* Changes in connection status */
4757 +
4758 +       hp->RHportStatus->portChange |= PORT_CONNECT_CHANGE;
4759 +
4760 +       /* Port Enable or Disable */
4761 +
4762 +       if (hp->RHportStatus->portStatus & PORT_CONNECT_STAT) {
4763 +               /* device is connected to the port:
4764 +                *    1) Enable port 
4765 +                *    2) Resume ?? 
4766 +                */
4767 +//               hp->RHportStatus->portChange |= PORT_ENABLE_CHANGE;
4768 +
4769 +               /* Over Current is not supported by the SL811 HW ?? */
4770 +
4771 +               /* How about the Port Power ?? */
4772 +
4773 +       } else {
4774 +               /* Device has disconnect:
4775 +                *    1) Disable port
4776 +                */
4777 +
4778 +               hp->RHportStatus->portStatus &= ~(PORT_ENABLE_STAT);
4779 +               hp->RHportStatus->portChange |= PORT_ENABLE_CHANGE;
4780 +
4781 +       }
4782 +}
4783 +
4784 +/*****************************************************************
4785 + *
4786 + * Function Name: SL11StartXaction
4787 + *  
4788 + * This functions load the registers with appropriate value and 
4789 + * transmit the packet.                                  
4790 + *
4791 + * Input:  hci = data structure for the host controller
4792 + *         addr = USB address of the device
4793 + *         epaddr = endpoint number
4794 + *         pid = packet ID
4795 + *         len = data length
4796 + *         toggle = USB toggle bit, either 0 or 1
4797 + *         slow = speed of the device
4798 + *         urb_state = the current stage of USB transaction
4799 + *
4800 + * Return: 0 = error; 1 = successful
4801 + *                
4802 + *****************************************************************/
4803 +int SL11StartXaction (hci_t * hci, __u8 addr, __u8 epaddr, int pid, int len,
4804 +                     int toggle, int slow, int urb_state)
4805 +{
4806 +
4807 +       hcipriv_t *hp = &hci->hp;
4808 +       __u8 cmd = 0;
4809 +       __u8 setup_data[4];
4810 +       __u16 speed;
4811 +
4812 +       speed = hp->RHportStatus->portStatus;
4813 +       if (!(speed & PORT_LOW_SPEED_DEV_ATTACH_STAT) && slow) {
4814 +               cmd |= SL11H_HCTLMASK_PREAMBLE;
4815 +       }
4816 +       switch (pid) {
4817 +       case PID_SETUP:
4818 +               cmd &= SL11H_HCTLMASK_PREAMBLE;
4819 +               cmd |=
4820 +                   (SL11H_HCTLMASK_ARM | SL11H_HCTLMASK_ENBLEP |
4821 +                    SL11H_HCTLMASK_WRITE);
4822 +               break;
4823 +
4824 +       case PID_OUT:
4825 +               cmd &= (SL11H_HCTLMASK_SEQ | SL11H_HCTLMASK_PREAMBLE);
4826 +               cmd |=
4827 +                   (SL11H_HCTLMASK_ARM | SL11H_HCTLMASK_ENBLEP |
4828 +                    SL11H_HCTLMASK_WRITE);
4829 +               if (toggle) {
4830 +                       cmd |= SL11H_HCTLMASK_SEQ;
4831 +               }
4832 +               break;
4833 +
4834 +       case PID_IN:
4835 +               cmd &= (SL11H_HCTLMASK_SEQ | SL11H_HCTLMASK_PREAMBLE);
4836 +               cmd |= (SL11H_HCTLMASK_ARM | SL11H_HCTLMASK_ENBLEP);
4837 +               break;
4838 +
4839 +       default:
4840 +               DBGERR ("ERR: SL11StartXaction: unknow pid = 0x%x\n", pid);
4841 +               return 0;
4842 +       }
4843 +       setup_data[0] = SL11H_DATA_START;
4844 +       setup_data[1] = len;
4845 +       setup_data[2] = (((pid & 0x0F) << 4) | (epaddr & 0xF));
4846 +       setup_data[3] = addr & 0x7F;
4847 +
4848 +       SL811BufWrite (hci, SL11H_BUFADDRREG, (__u8 *) & setup_data[0], 4);
4849 +
4850 +       SL811Write (hci, SL11H_HOSTCTLREG, cmd);
4851 +
4852 +#if 0
4853 +       /* The SL811 has a hardware flaw when hub devices sends out
4854 +        * SE0 between packets. It has been found in a TI chipset and
4855 +        * cypress hub chipset. It causes the SL811 to hang
4856 +        * The workaround is to re-issue the preample again.
4857 +        */
4858 +
4859 +       if ((cmd & SL11H_HCTLMASK_PREAMBLE)) {
4860 +               SL811Write (hci, SL11H_PIDEPREG_B, 0xc0);
4861 +               SL811Write (hci, SL11H_HOSTCTLREG_B, 0x1);      // send the premable
4862 +       }
4863 +#endif
4864 +       return 1;
4865 +}
4866 +
4867 +/*****************************************************************
4868 + *
4869 + * Function Name: hc_interrupt
4870 + *
4871 + * Interrupt service routine. 
4872 + *
4873 + * 1) determine the causes of interrupt
4874 + * 2) clears all interrupts
4875 + * 3) calls appropriate function to service the interrupt
4876 + *
4877 + * Input:  irq = interrupt line associated with the controller 
4878 + *         hci = data structure for the host controller
4879 + *         r = holds the snapshot of the processor's context before 
4880 + *             the processor entered interrupt code. (not used here) 
4881 + *
4882 + * Return value  : None.
4883 + *                
4884 + *****************************************************************/
4885 +static void hc_interrupt (int irq, void *__hci, struct pt_regs *r)
4886 +{
4887 +       char ii;
4888 +       hci_t *hci = __hci;
4889 +       int isExcessNak = 0;
4890 +       int urb_state = 0;
4891 +       char tmpIrq = 0;
4892 +
4893 +       /* Get value from interrupt status register */
4894 +
4895 +       ii = SL811Read (hci, SL11H_INTSTATREG);
4896 +
4897 +       if (ii & SL11H_INTMASK_INSRMV) {
4898 +               /* Device insertion or removal detected for the USB port */
4899 +
4900 +               SL811Write (hci, SL11H_INTENBLREG, 0);
4901 +               SL811Write (hci, SL11H_CTLREG1, 0);
4902 +               mdelay (100);   // wait for device stable 
4903 +               handleInsRmvIntr (hci);
4904 +               return;
4905 +       }
4906 +
4907 +       /* Clear all interrupts */
4908 +
4909 +       SL811Write (hci, SL11H_INTSTATREG, 0xff);
4910 +
4911 +       if (ii & SL11H_INTMASK_XFERDONE) {
4912 +               /* USB Done interrupt occurred */
4913 +
4914 +               urb_state = sh_done_list (hci, &isExcessNak);
4915 +#ifdef WARNING
4916 +               if (hci->td_array->len > 0)
4917 +                       printk ("WARNING: IRQ, td_array->len = 0x%x, s/b:0\n",
4918 +                               hci->td_array->len);
4919 +#endif
4920 +               if (hci->td_array->len == 0 && !isExcessNak
4921 +                   && !(ii & SL11H_INTMASK_SOFINTR) && (urb_state == 0)) {
4922 +                       if (urb_state == 0) {
4923 +                               /* All urb_state has not been finished yet! 
4924 +                                * continue with the current urb transaction 
4925 +                                */
4926 +
4927 +                               if (hci->last_packet_nak == 0) {
4928 +                                       if (!usb_pipecontrol
4929 +                                           (hci->td_array->td[0].urb->pipe))
4930 +                                               sh_add_packet (hci, hci->td_array-> td[0].urb);
4931 +                               }
4932 +                       } else {
4933 +                               /* The last transaction has completed:
4934 +                                * schedule the next transaction 
4935 +                                */
4936 +
4937 +                               sh_schedule_trans (hci, 0);
4938 +                       }
4939 +               }
4940 +               SL811Write (hci, SL11H_INTSTATREG, 0xff);
4941 +               return;
4942 +       }
4943 +
4944 +       if (ii & SL11H_INTMASK_SOFINTR) {
4945 +               hci->frame_number = (hci->frame_number + 1) % 2048;
4946 +               if (hci->td_array->len == 0)
4947 +                       sh_schedule_trans (hci, 1);
4948 +               else {
4949 +                       if (sofWaitCnt++ > 100) {
4950 +                               /* The last transaction has not completed.
4951 +                                * Need to retire the current td, and let
4952 +                                * it transmit again later on.
4953 +                                * (THIS NEEDS TO BE WORK ON MORE, IT SHOULD NEVER 
4954 +                                *  GET TO THIS POINT)
4955 +                                */
4956 +
4957 +                               DBGERR ("SOF interrupt: td_array->len = 0x%x, s/b: 0\n",
4958 +                                       hci->td_array->len);
4959 +                               urb_print (hci->td_array->td[hci->td_array->len - 1].urb,
4960 +                                          "INTERRUPT", 0);
4961 +                               sh_done_list (hci, &isExcessNak);
4962 +                               SL811Write (hci, SL11H_INTSTATREG, 0xff);
4963 +                               hci->td_array->len = 0;
4964 +                               sofWaitCnt = 0;
4965 +                       }
4966 +               }
4967 +               tmpIrq = SL811Read (hci, SL11H_INTSTATREG) & SL811Read (hci, SL11H_INTENBLREG);
4968 +               if (tmpIrq) {
4969 +                       DBG ("IRQ occurred while service SOF: irq = 0x%x\n",
4970 +                            tmpIrq);
4971 +
4972 +                       /* If we receive a DONE IRQ after schedule, need to 
4973 +                        * handle DONE IRQ again 
4974 +                        */
4975 +
4976 +                       if (tmpIrq & SL11H_INTMASK_XFERDONE) {
4977 +                               DBGERR ("IRQ occurred while service SOF: irq = 0x%x\n",
4978 +                                       tmpIrq);
4979 +                               urb_state = sh_done_list (hci, &isExcessNak);
4980 +                       }
4981 +                       SL811Write (hci, SL11H_INTSTATREG, 0xff);
4982 +               }
4983 +       } else {
4984 +               DBG ("SL811 ISR: unknown, int = 0x%x \n", ii);
4985 +       }
4986 +
4987 +       SL811Write (hci, SL11H_INTSTATREG, 0xff);
4988 +       return;
4989 +}
4990 +
4991 +/*****************************************************************
4992 + *
4993 + * Function Name: hc_reset
4994 + *
4995 + * This function does register test and resets the SL811HS 
4996 + * controller.
4997 + *
4998 + * Input:  hci = data structure for the host controller
4999 + *
5000 + * Return value  : 0
5001 + *                
5002 + *****************************************************************/
5003 +static int hc_reset (hci_t * hci)
5004 +{
5005 +       int attachFlag = 0;
5006 +
5007 +       DBGFUNC ("Enter hc_reset\n");
5008 +       regTest (hci);
5009 +       attachFlag = USBReset (hci);
5010 +       if (attachFlag) {
5011 +               setPortChange (hci, PORT_CONNECT_CHANGE);
5012 +       }
5013 +       return (0);
5014 +}
5015 +
5016 +/*****************************************************************
5017 + *
5018 + * Function Name: hc_alloc_trans_buffer
5019 + *
5020 + * This function allocates all transfer buffer  
5021 + *
5022 + * Input:  hci = data structure for the host controller
5023 + *
5024 + * Return value  : 0
5025 + *                
5026 + *****************************************************************/
5027 +static int hc_alloc_trans_buffer (hci_t * hci)
5028 +{
5029 +       hcipriv_t *hp = &hci->hp;
5030 +       int maxlen;
5031 +
5032 +       hp->itl0_len = 0;
5033 +       hp->itl1_len = 0;
5034 +       hp->atl_len = 0;
5035 +
5036 +       hp->itl_buffer_len = 1024;
5037 +       hp->atl_buffer_len = 4096 - 2 * hp->itl_buffer_len;     /* 2048 */
5038 +
5039 +       maxlen = (hp->itl_buffer_len > hp->atl_buffer_len) ? hp->itl_buffer_len : hp->atl_buffer_len;
5040 +
5041 +       hp->tl = kmalloc (maxlen, GFP_KERNEL);
5042 +
5043 +       if (!hp->tl)
5044 +               return -ENOMEM;
5045 +
5046 +       memset (hp->tl, 0, maxlen);
5047 +       return 0;
5048 +}
5049 +
5050 +/*****************************************************************
5051 + *
5052 + * Function Name: getPortStatusAndChange
5053 + *
5054 + * This function gets the ports status from SL811 and format it 
5055 + * to a USB request format
5056 + *
5057 + * Input:  hci = data structure for the host controller
5058 + *
5059 + * Return value  : port status and change
5060 + *                
5061 + *****************************************************************/
5062 +static __u32 getPortStatusAndChange (hci_t * hci)
5063 +{
5064 +       hcipriv_t *hp = &hci->hp;
5065 +       __u32 portstatus;
5066 +
5067 +       DBGFUNC ("enter getPorStatusAndChange\n");
5068 +
5069 +       portstatus = hp->RHportStatus->portChange << 16 | hp->RHportStatus->portStatus;
5070 +
5071 +       return (portstatus);
5072 +}
5073 +
5074 +/*****************************************************************
5075 + *
5076 + * Function Name: setPortChange
5077 + *
5078 + * This function set the bit position of portChange.
5079 + *
5080 + * Input:  hci = data structure for the host controller
5081 + *         bitPos = the bit position
5082 + *
5083 + * Return value  : none 
5084 + *                
5085 + *****************************************************************/
5086 +static void setPortChange (hci_t * hci, __u16 bitPos)
5087 +{
5088 +       hcipriv_t *hp = &hci->hp;
5089 +
5090 +       switch (bitPos) {
5091 +       case PORT_CONNECT_STAT:
5092 +               hp->RHportStatus->portChange |= bitPos;
5093 +               break;
5094 +
5095 +       case PORT_ENABLE_STAT:
5096 +               hp->RHportStatus->portChange |= bitPos;
5097 +               break;
5098 +
5099 +       case PORT_RESET_STAT:
5100 +               hp->RHportStatus->portChange |= bitPos;
5101 +               break;
5102 +
5103 +       case PORT_POWER_STAT:
5104 +               hp->RHportStatus->portChange |= bitPos;
5105 +               break;
5106 +
5107 +       case PORT_SUSPEND_STAT:
5108 +               hp->RHportStatus->portChange |= bitPos;
5109 +               break;
5110 +
5111 +       case PORT_OVER_CURRENT_STAT:
5112 +               hp->RHportStatus->portChange |= bitPos;
5113 +               break;
5114 +       }
5115 +}
5116 +
5117 +/*****************************************************************
5118 + *
5119 + * Function Name: clrPortChange
5120 + *
5121 + * This function clear the bit position of portChange.
5122 + *
5123 + * Input:  hci = data structure for the host controller
5124 + *         bitPos = the bit position
5125 + *
5126 + * Return value  : none 
5127 + *                
5128 + *****************************************************************/
5129 +static void clrPortChange (hci_t * hci, __u16 bitPos)
5130 +{
5131 +       hcipriv_t *hp = &hci->hp;
5132 +       switch (bitPos) {
5133 +       case PORT_CONNECT_CHANGE:
5134 +               hp->RHportStatus->portChange &= ~bitPos;
5135 +               break;
5136 +
5137 +       case PORT_ENABLE_CHANGE:
5138 +               hp->RHportStatus->portChange &= ~bitPos;
5139 +               break;
5140 +
5141 +       case PORT_RESET_CHANGE:
5142 +               hp->RHportStatus->portChange &= ~bitPos;
5143 +               break;
5144 +
5145 +       case PORT_SUSPEND_CHANGE:
5146 +               hp->RHportStatus->portChange &= ~bitPos;
5147 +               break;
5148 +
5149 +       case PORT_OVER_CURRENT_CHANGE:
5150 +               hp->RHportStatus->portChange &= ~bitPos;
5151 +               break;
5152 +       }
5153 +}
5154 +
5155 +/*****************************************************************
5156 + *
5157 + * Function Name: clrPortStatus
5158 + *
5159 + * This function clear the bit position of portStatus.
5160 + *
5161 + * Input:  hci = data structure for the host controller
5162 + *         bitPos = the bit position
5163 + *
5164 + * Return value  : none 
5165 + *                
5166 + *****************************************************************/
5167 +static void clrPortStatus (hci_t * hci, __u16 bitPos)
5168 +{
5169 +       hcipriv_t *hp = &hci->hp;
5170 +       switch (bitPos) {
5171 +       case PORT_ENABLE_STAT:
5172 +               hp->RHportStatus->portStatus &= ~bitPos;
5173 +               break;
5174 +
5175 +       case PORT_RESET_STAT:
5176 +               hp->RHportStatus->portStatus &= ~bitPos;
5177 +               break;
5178 +
5179 +       case PORT_POWER_STAT:
5180 +               hp->RHportStatus->portStatus &= ~bitPos;
5181 +               break;
5182 +
5183 +       case PORT_SUSPEND_STAT:
5184 +               hp->RHportStatus->portStatus &= ~bitPos;
5185 +               break;
5186 +       }
5187 +}
5188 +
5189 +/*****************************************************************
5190 + *
5191 + * Function Name: setPortStatus
5192 + *
5193 + * This function set the bit position of portStatus.
5194 + *
5195 + * Input:  hci = data structure for the host controller
5196 + *         bitPos = the bit position
5197 + *
5198 + * Return value  : none 
5199 + *                
5200 + *****************************************************************/
5201 +static void setPortStatus (hci_t * hci, __u16 bitPos)
5202 +{
5203 +       hcipriv_t *hp = &hci->hp;
5204 +       switch (bitPos) {
5205 +       case PORT_ENABLE_STAT:
5206 +               hp->RHportStatus->portStatus |= bitPos;
5207 +               break;
5208 +
5209 +       case PORT_RESET_STAT:
5210 +               hp->RHportStatus->portStatus |= bitPos;
5211 +               break;
5212 +
5213 +       case PORT_POWER_STAT:
5214 +               hp->RHportStatus->portStatus |= bitPos;
5215 +               break;
5216 +
5217 +       case PORT_SUSPEND_STAT:
5218 +               hp->RHportStatus->portStatus |= bitPos;
5219 +               break;
5220 +       }
5221 +}
5222 +
5223 +/*****************************************************************
5224 + *
5225 + * Function Name: hc_start
5226 + *
5227 + * This function starts the root hub functionality. 
5228 + *
5229 + * Input:  hci = data structure for the host controller
5230 + *
5231 + * Return value  : 0 
5232 + *                
5233 + *****************************************************************/
5234 +static int hc_start (hci_t * hci)
5235 +{
5236 +       DBGFUNC ("Enter hc_start\n");
5237 +
5238 +       rh_connect_rh (hci);
5239 +
5240 +       return 0;
5241 +}
5242 +
5243 +/*****************************************************************
5244 + *
5245 + * Function Name: hc_alloc_hci
5246 + *
5247 + * This function allocates all data structure and store in the 
5248 + * private data structure. 
5249 + *
5250 + * Input:  hci = data structure for the host controller
5251 + *
5252 + * Return value  : 0 
5253 + *                
5254 + *****************************************************************/
5255 +static hci_t *__devinit hc_alloc_hci (void)
5256 +{
5257 +       hci_t *hci;
5258 +       hcipriv_t *hp;
5259 +       portstat_t *ps;
5260 +       struct usb_bus *bus;
5261 +
5262 +       DBGFUNC ("Enter hc_alloc_hci\n");
5263 +       hci = (hci_t *) kmalloc (sizeof (hci_t), GFP_KERNEL);
5264 +       if (!hci)
5265 +               return NULL;
5266 +
5267 +       memset (hci, 0, sizeof (hci_t));
5268 +
5269 +       hp = &hci->hp;
5270 +
5271 +       hp->irq = -1;
5272 +       hp->hcport = -1;
5273 +
5274 +       /* setup root hub port status */
5275 +
5276 +       ps = (portstat_t *) kmalloc (sizeof (portstat_t), GFP_KERNEL);
5277 +
5278 +       if (!ps)
5279 +               return NULL;
5280 +       ps->portStatus = PORT_STAT_DEFAULT;
5281 +       ps->portChange = PORT_CHANGE_DEFAULT;
5282 +       hp->RHportStatus = ps;
5283 +
5284 +       hci->nakCnt = 0;
5285 +       hci->last_packet_nak = 0;
5286 +
5287 +       hci->a_td_array.len = 0;
5288 +       hci->i_td_array[0].len = 0;
5289 +       hci->i_td_array[1].len = 0;
5290 +       hci->td_array = &hci->a_td_array;
5291 +       hci->active_urbs = 0;
5292 +       hci->active_trans = 0;
5293 +       INIT_LIST_HEAD (&hci->hci_hcd_list);
5294 +       list_add (&hci->hci_hcd_list, &hci_hcd_list);
5295 +       init_waitqueue_head (&hci->waitq);
5296 +
5297 +       INIT_LIST_HEAD (&hci->ctrl_list);
5298 +       INIT_LIST_HEAD (&hci->bulk_list);
5299 +       INIT_LIST_HEAD (&hci->iso_list);
5300 +       INIT_LIST_HEAD (&hci->intr_list);
5301 +       INIT_LIST_HEAD (&hci->del_list);
5302 +
5303 +       bus = usb_alloc_bus (&hci_device_operations);
5304 +       if (!bus) {
5305 +               kfree (hci);
5306 +               return NULL;
5307 +       }
5308 +
5309 +       hci->bus = bus;
5310 +       bus->bus_name = "sl811";
5311 +       bus->hcpriv = (void *) hci;
5312 +
5313 +       return hci;
5314 +}
5315 +
5316 +/*****************************************************************
5317 + *
5318 + * Function Name: hc_release_hci
5319 + *
5320 + * This function De-allocate all resources  
5321 + *
5322 + * Input:  hci = data structure for the host controller
5323 + *
5324 + * Return value  : 0 
5325 + *                
5326 + *****************************************************************/
5327 +static void hc_release_hci (hci_t * hci)
5328 +{
5329 +       hcipriv_t *hp = &hci->hp;
5330 +
5331 +       DBGFUNC ("Enter hc_release_hci\n");
5332 +
5333 +       /* disconnect all devices */
5334 +       if (hci->bus->root_hub)
5335 +               usb_disconnect (&hci->bus->root_hub);
5336 +
5337 +       hc_reset (hci);
5338 +
5339 +       if (hp->tl)
5340 +               kfree (hp->tl);
5341 +
5342 +       if (hp->hcport > 0) {
5343 +               release_region (hp->hcport, 2);
5344 +               hp->hcport = 0;
5345 +       }
5346 +
5347 +       if (hp->irq >= 0) {
5348 +               free_irq (hp->irq, hci);
5349 +               hp->irq = -1;
5350 +       }
5351 +
5352 +       usb_deregister_bus (hci->bus);
5353 +       usb_free_bus (hci->bus);
5354 +
5355 +       list_del (&hci->hci_hcd_list);
5356 +       INIT_LIST_HEAD (&hci->hci_hcd_list);
5357 +
5358 +       kfree (hci);
5359 +}
5360 +
5361 +/*****************************************************************
5362 + *
5363 + * Function Name: init_irq
5364 + *
5365 + * This function is board specific.  It sets up the interrupt to 
5366 + * be an edge trigger and trigger on the rising edge  
5367 + *
5368 + * Input: none 
5369 + *
5370 + * Return value  : none 
5371 + *                
5372 + *****************************************************************/
5373 +void init_irq (void)
5374 +{
5375 +       GPDR &= ~(1 << 13);
5376 +       set_GPIO_IRQ_edge (1 << 13, GPIO_RISING_EDGE);
5377 +}
5378 +
5379 +/*****************************************************************
5380 + *
5381 + * Function Name: hc_found_hci
5382 + *
5383 + * This function request IO memory regions, request IRQ, and
5384 + * allocate all other resources. 
5385 + *
5386 + * Input: addr = first IO address
5387 + *        addr2 = second IO address
5388 + *        irq = interrupt number 
5389 + *
5390 + * Return: 0 = success or error condition 
5391 + *                
5392 + *****************************************************************/
5393 +static int __devinit hc_found_hci (int addr, int addr2, int irq)
5394 +{
5395 +       hci_t *hci;
5396 +       hcipriv_t *hp;
5397 +
5398 +       DBGFUNC ("Enter hc_found_hci\n");
5399 +       hci = hc_alloc_hci ();
5400 +       if (!hci) {
5401 +               return -ENOMEM;
5402 +       }
5403 +
5404 +       init_irq ();
5405 +       hp = &hci->hp;
5406 +
5407 +       if (!request_region (addr, 256, "SL811 USB HOST")) {
5408 +               DBGERR ("request address %d failed", addr);
5409 +               hc_release_hci (hci);
5410 +               return -EBUSY;
5411 +       }
5412 +       hp->hcport = addr;
5413 +       if (!hp->hcport) {
5414 +               DBGERR ("Error mapping SL811 Memory 0x%x", hp->hcport);
5415 +       }
5416 +
5417 +       if (!request_region (addr2, 256, "SL811 USB HOST")) {
5418 +               DBGERR ("request address %d failed", addr2);
5419 +               hc_release_hci (hci);
5420 +               return -EBUSY;
5421 +       }
5422 +       hp->hcport2 = addr2;
5423 +       if (!hp->hcport2) {
5424 +               DBGERR ("Error mapping SL811 Memory 0x%x", hp->hcport2);
5425 +       }
5426 +
5427 +       if (hc_alloc_trans_buffer (hci)) {
5428 +               hc_release_hci (hci);
5429 +               return -ENOMEM;
5430 +       }
5431 +
5432 +       usb_register_bus (hci->bus);
5433 +
5434 +       if (request_irq (irq, hc_interrupt, 0, "SL811", hci) != 0) {
5435 +               DBGERR ("request interrupt %d failed", irq);
5436 +               hc_release_hci (hci);
5437 +               return -EBUSY;
5438 +       }
5439 +       hp->irq = irq;
5440 +
5441 +       printk (KERN_INFO __FILE__ ": USB SL811 at %x, addr2 = %x, IRQ %d\n",
5442 +               addr, addr2, irq);
5443 +       hc_reset (hci);
5444 +
5445 +       if (hc_start (hci) < 0) {
5446 +               DBGERR ("can't start usb-%x", addr);
5447 +               hc_release_hci (hci);
5448 +               return -EBUSY;
5449 +       }
5450 +
5451 +       return 0;
5452 +}
5453 +
5454 +/*****************************************************************
5455 + *
5456 + * Function Name: hci_hcd_init
5457 + *
5458 + * This is an init function, and it is the first function being called
5459 + *
5460 + * Input: none 
5461 + *
5462 + * Return: 0 = success or error condition 
5463 + *                
5464 + *****************************************************************/
5465 +static int __init hci_hcd_init (void)
5466 +{
5467 +       int ret;
5468 +
5469 +       DBGFUNC ("Enter hci_hcd_init\n");
5470 +       ret = hc_found_hci (base_addr, data_reg_addr, irq);
5471 +
5472 +       return ret;
5473 +}
5474 +
5475 +/*****************************************************************
5476 + *
5477 + * Function Name: hci_hcd_cleanup
5478 + *
5479 + * This is a cleanup function, and it is called when module is 
5480 + * unloaded. 
5481 + *
5482 + * Input: none 
5483 + *
5484 + * Return: none 
5485 + *                
5486 + *****************************************************************/
5487 +static void __exit hci_hcd_cleanup (void)
5488 +{
5489 +       struct list_head *hci_l;
5490 +       hci_t *hci;
5491 +
5492 +       DBGFUNC ("Enter hci_hcd_cleanup\n");
5493 +       for (hci_l = hci_hcd_list.next; hci_l != &hci_hcd_list;) {
5494 +               hci = list_entry (hci_l, hci_t, hci_hcd_list);
5495 +               hci_l = hci_l->next;
5496 +               hc_release_hci (hci);
5497 +       }
5498 +}
5499 +
5500 +module_init (hci_hcd_init);
5501 +module_exit (hci_hcd_cleanup);
5502 +
5503 +MODULE_AUTHOR ("Pei Liu <pbl@cypress.com>");
5504 +MODULE_DESCRIPTION ("USB SL811HS Host Controller Driver");
5505 diff -Nur linux-2.4.19.org/drivers/usb/hc_sl811.h linux-2.4.19/drivers/usb/hc_sl811.h
5506 --- linux-2.4.19.org/drivers/usb/hc_sl811.h     Thu Jan  1 01:00:00 1970
5507 +++ linux-2.4.19/drivers/usb/hc_sl811.h Thu Oct 31 08:11:20 2002
5508 @@ -0,0 +1,385 @@
5509 +/*
5510 + * SL811HS HCD (Host Controller Driver) for USB.
5511 + * 
5512 + * COPYRIGHT (C) by CYPRESS SEMICONDUCTOR INC 
5513 + * 
5514 + *
5515 + */
5516 +
5517 +#define GET_FRAME_NUMBER(hci)  READ_REG32 (hci, HcFmNumber)
5518 +
5519 +/*
5520 + * Maximum number of root hub ports
5521 + */
5522 +#define MAX_ROOT_PORTS         15      /* maximum OHCI root hub ports */
5523 +
5524 +/* control and status registers */
5525 +#define HcRevision             0x00
5526 +#define HcControl              0x01
5527 +#define HcCommandStatus                0x02
5528 +#define HcInterruptStatus      0x03
5529 +#define HcInterruptEnable      0x04
5530 +#define HcInterruptDisable     0x05
5531 +#define HcFmInterval           0x0D
5532 +#define HcFmRemaining          0x0E
5533 +#define HcFmNumber             0x0F
5534 +#define HcLSThreshold          0x11
5535 +#define HcRhDescriptorA                0x12
5536 +#define HcRhDescriptorB                0x13
5537 +#define HcRhStatus             0x14
5538 +#define HcRhPortStatus         0x15
5539 +
5540 +#define HcHardwareConfiguration 0x20
5541 +#define HcDMAConfiguration     0x21
5542 +#define HcTransferCounter      0x22
5543 +#define HcuPInterrupt          0x24
5544 +#define HcuPInterruptEnable    0x25
5545 +#define HcChipID               0x27
5546 +#define HcScratch              0x28
5547 +#define HcSoftwareReset                0x29
5548 +#define HcITLBufferLength      0x2A
5549 +#define HcATLBufferLength      0x2B
5550 +#define HcBufferStatus         0x2C
5551 +#define HcReadBackITL0Length   0x2D
5552 +#define HcReadBackITL1Length   0x2E
5553 +#define HcITLBufferPort                0x40
5554 +#define HcATLBufferPort                0x41
5555 +
5556 +/* OHCI CONTROL AND STATUS REGISTER MASKS */
5557 +
5558 +/*
5559 + * HcControl (control) register masks
5560 + */
5561 +#define OHCI_CTRL_HCFS         (3 << 6)        /* BUS state mask */
5562 +#define OHCI_CTRL_RWC          (1 << 9)        /* remote wakeup connected */
5563 +#define OHCI_CTRL_RWE          (1 << 10)       /* remote wakeup enable */
5564 +
5565 +/* pre-shifted values for HCFS */
5566 +#define OHCI_USB_RESET         (0 << 6)
5567 +#define OHCI_USB_RESUME                (1 << 6)
5568 +#define OHCI_USB_OPER          (2 << 6)
5569 +#define OHCI_USB_SUSPEND       (3 << 6)
5570 +
5571 +/*
5572 + * HcCommandStatus (cmdstatus) register masks
5573 + */
5574 +#define OHCI_HCR       (1 << 0)        /* host controller reset */
5575 +#define OHCI_SO                (3 << 16)       /* scheduling overrun count */
5576 +
5577 +/*
5578 + * masks used with interrupt registers:
5579 + * HcInterruptStatus (intrstatus)
5580 + * HcInterruptEnable (intrenable)
5581 + * HcInterruptDisable (intrdisable)
5582 + */
5583 +#define OHCI_INTR_SO   (1 << 0)        /* scheduling overrun */
5584 +
5585 +#define OHCI_INTR_SF   (1 << 2)        /* start frame */
5586 +#define OHCI_INTR_RD   (1 << 3)        /* resume detect */
5587 +#define OHCI_INTR_UE   (1 << 4)        /* unrecoverable error */
5588 +#define OHCI_INTR_FNO  (1 << 5)        /* frame number overflow */
5589 +#define OHCI_INTR_RHSC (1 << 6)        /* root hub status change */
5590 +#define OHCI_INTR_ATD  (1 << 7)        /* scheduling overrun */
5591 +
5592 +#define OHCI_INTR_MIE  (1 << 31)       /* master interrupt enable */
5593 +
5594 +/*
5595 + * HcHardwareConfiguration
5596 + */
5597 +#define InterruptPinEnable     (1 << 0)
5598 +#define InterruptPinTrigger    (1 << 1)
5599 +#define InterruptOutputPolarity        (1 << 2)
5600 +#define DataBusWidth16         (1 << 3)
5601 +#define DREQOutputPolarity     (1 << 5)
5602 +#define DACKInputPolarity      (1 << 6)
5603 +#define EOTInputPolarity       (1 << 7)
5604 +#define DACKMode               (1 << 8)
5605 +#define AnalogOCEnable         (1 << 10)
5606 +#define SuspendClkNotStop      (1 << 11)
5607 +#define DownstreamPort15KRSel  (1 << 12)
5608 +
5609 +/* 
5610 + * HcDMAConfiguration
5611 + */
5612 +#define DMAReadWriteSelect     (1 << 0)
5613 +#define ITL_ATL_DataSelect     (1 << 1)
5614 +#define DMACounterSelect       (1 << 2)
5615 +#define DMAEnable              (1 << 4)
5616 +#define BurstLen_1             0
5617 +#define BurstLen_4             (1 << 5)
5618 +#define BurstLen_8             (2 << 5)
5619 +
5620 +/*
5621 + * HcuPInterrupt
5622 + */
5623 +#define SOFITLInt              (1 << 0)
5624 +#define ATLInt                 (1 << 1)
5625 +#define AllEOTInterrupt                (1 << 2)
5626 +#define OPR_Reg                        (1 << 4)
5627 +#define HCSuspended            (1 << 5)
5628 +#define ClkReady               (1 << 6)
5629 +
5630 +/*
5631 + * HcBufferStatus
5632 + */
5633 +#define ITL0BufferFull         (1 << 0)
5634 +#define ITL1BufferFull         (1 << 1)
5635 +#define ATLBufferFull          (1 << 2)
5636 +#define ITL0BufferDone         (1 << 3)
5637 +#define ITL1BufferDone         (1 << 4)
5638 +#define ATLBufferDone          (1 << 5)
5639 +
5640 +/* OHCI ROOT HUB REGISTER MASKS */
5641 +
5642 +/* roothub.portstatus [i] bits */
5643 +#define RH_PS_CCS            0x00000001        /* current connect status */
5644 +#define RH_PS_PES            0x00000002        /* port enable status */
5645 +#define RH_PS_PSS            0x00000004        /* port suspend status */
5646 +#define RH_PS_POCI           0x00000008        /* port over current indicator */
5647 +#define RH_PS_PRS            0x00000010        /* port reset status */
5648 +#define RH_PS_PPS            0x00000100        /* port power status */
5649 +#define RH_PS_LSDA           0x00000200        /* low speed device attached */
5650 +#define RH_PS_CSC            0x00010000        /* connect status change */
5651 +#define RH_PS_PESC           0x00020000        /* port enable status change */
5652 +#define RH_PS_PSSC           0x00040000        /* port suspend status change */
5653 +#define RH_PS_OCIC           0x00080000        /* over current indicator change */
5654 +#define RH_PS_PRSC           0x00100000        /* port reset status change */
5655 +
5656 +/* roothub.status bits */
5657 +#define RH_HS_LPS              0x00000001      /* local power status */
5658 +#define RH_HS_OCI              0x00000002      /* over current indicator */
5659 +#define RH_HS_DRWE             0x00008000      /* device remote wakeup enable */
5660 +#define RH_HS_LPSC             0x00010000      /* local power status change */
5661 +#define RH_HS_OCIC             0x00020000      /* over current indicator change */
5662 +#define RH_HS_CRWE             0x80000000      /* clear remote wakeup enable */
5663 +
5664 +/* roothub.b masks */
5665 +#define RH_B_DR                        0x0000ffff      /* device removable flags */
5666 +#define RH_B_PPCM              0xffff0000      /* port power control mask */
5667 +
5668 +/* roothub.a masks */
5669 +#define        RH_A_NDP                (0xff << 0)     /* number of downstream ports */
5670 +#define        RH_A_PSM                (1 << 8)        /* power switching mode */
5671 +#define        RH_A_NPS                (1 << 9)        /* no power switching */
5672 +#define        RH_A_DT                 (1 << 10)       /* device type (mbz) */
5673 +#define        RH_A_OCPM               (1 << 11)       /* over current protection mode */
5674 +#define        RH_A_NOCP               (1 << 12)       /* no over current protection */
5675 +#define        RH_A_POTPGT             (0xff << 24)    /* power on to power good time */
5676 +
5677 +#define URB_DEL 1
5678 +
5679 +#define PORT_STAT_DEFAULT              0x0100
5680 +#define PORT_CONNECT_STAT              0x1
5681 +#define PORT_ENABLE_STAT               0x2
5682 +#define PORT_SUSPEND_STAT              0x4
5683 +#define PORT_OVER_CURRENT_STAT         0x8
5684 +#define PORT_RESET_STAT                        0x10
5685 +#define PORT_POWER_STAT                        0x100
5686 +#define PORT_LOW_SPEED_DEV_ATTACH_STAT 0x200
5687 +
5688 +#define PORT_CHANGE_DEFAULT            0x0
5689 +#define PORT_CONNECT_CHANGE            0x1
5690 +#define PORT_ENABLE_CHANGE             0x2
5691 +#define PORT_SUSPEND_CHANGE            0x4
5692 +#define PORT_OVER_CURRENT_CHANGE       0x8
5693 +#define PORT_RESET_CHANGE              0x10
5694 +
5695 +/* Port Status Request info */
5696 +
5697 +typedef struct portstat {
5698 +       __u16 portChange;
5699 +       __u16 portStatus;
5700 +} portstat_t;
5701 +
5702 +typedef struct hcipriv {
5703 +       int irq;
5704 +       int disabled;           /* e.g. got a UE, we're hung */
5705 +       atomic_t resume_count;  /* defending against multiple resumes */
5706 +       struct ohci_regs *regs; /* OHCI controller's memory */
5707 +       int hcport;             /* I/O base address */
5708 +       int hcport2;            /* I/O data reg addr */
5709 +
5710 +       struct portstat *RHportStatus;  /* root hub port status */
5711 +
5712 +       int intrstatus;
5713 +       __u32 hc_control;       /* copy of the hc control reg */
5714 +
5715 +       int frame;
5716 +
5717 +       __u8 *tl;
5718 +       int xferPktLen;
5719 +       int atl_len;
5720 +       int atl_buffer_len;
5721 +       int itl0_len;
5722 +       int itl1_len;
5723 +       int itl_buffer_len;
5724 +       int itl_index;
5725 +       int tl_last;
5726 +       int units_left;
5727 +
5728 +} hcipriv_t;
5729 +struct hci;
5730 +
5731 +#define cClt        0          // Control
5732 +#define cISO        1          // ISO
5733 +#define cBULK       2          // BULK
5734 +#define cInt        3          // Interrupt
5735 +#define ISO_BIT     0x10
5736 +
5737 +/*-------------------------------------------------------------------------
5738 + * EP0 use for configuration and Vendor Specific command interface
5739 + *------------------------------------------------------------------------*/
5740 +#define cMemStart       0x10
5741 +#define EP0Buf          0x40   /* SL11H/SL811H memory start at 0x40 */
5742 +#define EP0Len          0x40   /* Length of config buffer EP0Buf */
5743 +#define EP1Buf          0x60
5744 +#define EP1Len          0x40
5745 +
5746 +/*-------------------------------------------------------------------------
5747 + * SL11H/SL811H memory from 80h-ffh use as ping-pong buffer.
5748 + *------------------------------------------------------------------------*/
5749 +#define uBufA           0x80   /* buffer A address for DATA0 */
5750 +#define uBufB           0xc0   /* buffer B address for DATA1 */
5751 +#define uXferLen        0x40   /* xfer length */
5752 +#define sMemSize        0xc0   /* Total SL11 memory size */
5753 +#define cMemEnd         256
5754 +
5755 +/*-------------------------------------------------------------------------
5756 + * SL811H Register Control memory map
5757 + * --Note: 
5758 + *      --SL11H only has one control register set from 0x00-0x04
5759 + *      --SL811H has two control register set from 0x00-0x04 and 0x08-0x0c
5760 + *------------------------------------------------------------------------*/
5761 +
5762 +#define EP0Control      0x00
5763 +#define EP0Address      0x01
5764 +#define EP0XferLen      0x02
5765 +#define EP0Status       0x03
5766 +#define EP0Counter      0x04
5767 +
5768 +#define EP1Control      0x08
5769 +#define EP1Address      0x09
5770 +#define EP1XferLen      0x0a
5771 +#define EP1Status       0x0b
5772 +#define EP1Counter      0x0c
5773 +
5774 +#define CtrlReg         0x05
5775 +#define IntEna          0x06
5776 +                        // 0x07 is reserved
5777 +#define IntStatus       0x0d
5778 +#define cDATASet        0x0e
5779 +#define cSOFcnt         0x0f
5780 +#define IntMask         0x57   /* Reset|DMA|EP0|EP2|EP1 for IntEna */
5781 +#define HostMask        0x47   /* Host request command  for IntStatus */
5782 +#define ReadMask        0xd7   /* Read mask interrupt   for IntStatus */
5783 +
5784 +/*-------------------------------------------------------------------------
5785 + * Standard Chapter 9 definition
5786 + *-------------------------------------------------------------------------
5787 + */
5788 +#define GET_STATUS      0x00
5789 +#define CLEAR_FEATURE   0x01
5790 +#define SET_FEATURE     0x03
5791 +#define SET_ADDRESS     0x05
5792 +#define GET_DESCRIPTOR  0x06
5793 +#define SET_DESCRIPTOR  0x07
5794 +#define GET_CONFIG      0x08
5795 +#define SET_CONFIG      0x09
5796 +#define GET_INTERFACE   0x0a
5797 +#define SET_INTERFACE   0x0b
5798 +#define SYNCH_FRAME     0x0c
5799 +
5800 +#define DEVICE          0x01
5801 +#define CONFIGURATION   0x02
5802 +#define STRING          0x03
5803 +#define INTERFACE       0x04
5804 +#define ENDPOINT        0x05
5805 +
5806 +/*-------------------------------------------------------------------------
5807 + * SL11H/SL811H definition
5808 + *-------------------------------------------------------------------------
5809 + */
5810 +#define DATA0_WR       0x07    // (Arm+Enable+tranmist to Host+DATA0)
5811 +#define DATA1_WR       0x47    // (Arm+Enable+tranmist to Host on DATA1)
5812 +#define ZDATA0_WR      0x05    // (Arm+Transaction Ignored+tranmist to Host+DATA0)
5813 +#define ZDATA1_WR      0x45    // (Arm+Transaction Ignored+tranmist to Host+DATA1)
5814 +#define DATA0_RD       0x03    // (Arm+Enable+received from Host+DATA0)
5815 +#define DATA1_RD       0x43    // (Arm+Enable+received from Host+DATA1)
5816 +
5817 +#define PID_SETUP      0x2d    // USB Specification 1.1 Standard Definition
5818 +#define PID_SOF                0xA5
5819 +#define PID_IN         0x69
5820 +#define PID_OUT                0xe1
5821 +
5822 +#define MAX_RETRY      0xffff
5823 +#define TIMEOUT                5               /* 2 mseconds */
5824 +
5825 +#define SL11H_HOSTCTLREG       0
5826 +#define SL11H_BUFADDRREG       1
5827 +#define SL11H_BUFLNTHREG       2
5828 +#define SL11H_PKTSTATREG       3       /* read */
5829 +#define SL11H_PIDEPREG         3       /* write */
5830 +#define SL11H_XFERCNTREG       4       /* read */
5831 +#define SL11H_DEVADDRREG       4       /* write */
5832 +#define SL11H_CTLREG1          5
5833 +#define SL11H_INTENBLREG       6
5834 +
5835 +#define SL11H_HOSTCTLREG_B     8
5836 +#define SL11H_BUFADDRREG_B     9
5837 +#define SL11H_BUFLNTHREG_B     0x0A
5838 +#define SL11H_PKTSTATREG_B     0x0B    /* read */
5839 +#define SL11H_PIDEPREG_B       0x0B    /* write */
5840 +#define SL11H_XFERCNTREG_B     0x0C    /* read */
5841 +#define SL11H_DEVADDRREG_B     0x0C    /* write */
5842 +
5843 +#define SL11H_INTSTATREG       0x0D    /* write clears bitwise */
5844 +#define SL11H_HWREVREG         0x0E    /* read */
5845 +#define SL11H_SOFLOWREG                0x0E    /* write */
5846 +#define SL11H_SOFTMRREG                0x0F    /* read */
5847 +#define SL11H_CTLREG2          0x0F    /* write */
5848 +#define SL11H_DATA_START       0x10
5849 +
5850 +/* Host control register bits (addr 0) */
5851 +#define SL11H_HCTLMASK_ARM     1
5852 +#define SL11H_HCTLMASK_ENBLEP  2
5853 +#define SL11H_HCTLMASK_WRITE   4
5854 +#define SL11H_HCTLMASK_ISOCH   0x10
5855 +#define SL11H_HCTLMASK_AFTERSOF        0x20
5856 +#define SL11H_HCTLMASK_SEQ     0x40
5857 +#define SL11H_HCTLMASK_PREAMBLE        0x80
5858 +
5859 +/* Packet status register bits (addr 3) */
5860 +#define SL11H_STATMASK_ACK     1
5861 +#define SL11H_STATMASK_ERROR   2
5862 +#define SL11H_STATMASK_TMOUT   4
5863 +#define SL11H_STATMASK_SEQ     8
5864 +#define SL11H_STATMASK_SETUP   0x10
5865 +#define SL11H_STATMASK_OVF     0x20
5866 +#define SL11H_STATMASK_NAK     0x40
5867 +#define SL11H_STATMASK_STALL   0x80
5868 +
5869 +/* Control register 1 bits (addr 5) */
5870 +#define SL11H_CTL1MASK_DSBLSOF 1
5871 +#define SL11H_CTL1MASK_NOTXEOF2        4
5872 +#define SL11H_CTL1MASK_DSTATE  0x18
5873 +#define SL11H_CTL1MASK_NSPD    0x20
5874 +#define SL11H_CTL1MASK_SUSPEND 0x40
5875 +#define SL11H_CTL1MASK_CLK12   0x80
5876 +
5877 +#define SL11H_CTL1VAL_RESET    8
5878 +
5879 +/* Interrut enable (addr 6) and interrupt status register bits (addr 0xD) */
5880 +#define SL11H_INTMASK_XFERDONE 1
5881 +#define SL11H_INTMASK_SOFINTR  0x10
5882 +#define SL11H_INTMASK_INSRMV   0x20
5883 +#define SL11H_INTMASK_USBRESET 0x40
5884 +#define SL11H_INTMASK_DSTATE   0x80    /* only in status reg */
5885 +
5886 +/* HW rev and SOF lo register bits (addr 0xE) */
5887 +#define SL11H_HWRMASK_HWREV    0xF0
5888 +
5889 +/* SOF counter and control reg 2 (addr 0xF) */
5890 +#define SL11H_CTL2MASK_SOFHI   0x3F
5891 +#define SL11H_CTL2MASK_DSWAP   0x40
5892 +#define SL11H_CTL2MASK_HOSTMODE        0xae
5893 +
5894 diff -Nur linux-2.4.19.org/drivers/usb/hc_sl811_rh.c linux-2.4.19/drivers/usb/hc_sl811_rh.c
5895 --- linux-2.4.19.org/drivers/usb/hc_sl811_rh.c  Thu Jan  1 01:00:00 1970
5896 +++ linux-2.4.19/drivers/usb/hc_sl811_rh.c      Thu Oct 31 08:11:20 2002
5897 @@ -0,0 +1,526 @@
5898 +
5899 +/*-------------------------------------------------------------------------*/
5900 +/*-------------------------------------------------------------------------*
5901 + * SL811HS virtual root hub
5902 + *  
5903 + * based on usb-ohci.c by R. Weissgaerber et al.
5904 + *-------------------------------------------------------------------------*
5905 + * This program is free software; you can redistribute it and/or modify
5906 + * it under the terms of the GNU General Public License as published by
5907 + * the Free Software Foundation; either version 2 of the License, or
5908 + * (at your option) any later version.
5909 + *
5910 + * This program is distributed in the hope that it will be useful,
5911 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
5912 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5913 + * GNU General Public License for more details.
5914 + *
5915 + * You should have received a copy of the GNU General Public License
5916 + * along with this program; if not, write to the Free Software
5917 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
5918 + *
5919 + *-------------------------------------------------------------------------*/
5920 +
5921 +#ifdef DEBUG
5922 +#undef DEBUG
5923 +#endif
5924 +static __u32 getPortStatusAndChange (hci_t * hci);
5925 +static void setPortStatus (hci_t * hci, __u16 bitPos);
5926 +static void setPortChange (hci_t * hci, __u16 bitPos);
5927 +static void clrPortStatus (hci_t * hci, __u16 bitPos);
5928 +static void clrPortChange (hci_t * hci, __u16 bitPos);
5929 +static int USBReset (hci_t * hci);
5930 +static int cc_to_error (int cc);
5931 +
5932 +/*-------------------------------------------------------------------------*
5933 + * Virtual Root Hub 
5934 + *-------------------------------------------------------------------------*/
5935 +
5936 +/* Device descriptor */
5937 +static __u8 root_hub_dev_des[] = {
5938 +       0x12,                   /*  __u8  bLength; */
5939 +       0x01,                   /*  __u8  bDescriptorType; Device */
5940 +       0x10,                   /*  __u16 bcdUSB; v1.1 */
5941 +       0x01,
5942 +       0x09,                   /*  __u8  bDeviceClass; HUB_CLASSCODE */
5943 +       0x00,                   /*  __u8  bDeviceSubClass; */
5944 +       0x00,                   /*  __u8  bDeviceProtocol; */
5945 +       0x08,                   /*  __u8  bMaxPacketSize0; 8 Bytes */
5946 +       0x00,                   /*  __u16 idVendor; */
5947 +       0x00,
5948 +       0x00,                   /*  __u16 idProduct; */
5949 +       0x00,
5950 +       0x00,                   /*  __u16 bcdDevice; */
5951 +       0x00,
5952 +       0x00,                   /*  __u8  iManufacturer; */
5953 +       0x02,                   /*  __u8  iProduct; */
5954 +       0x01,                   /*  __u8  iSerialNumber; */
5955 +       0x01                    /*  __u8  bNumConfigurations; */
5956 +};
5957 +
5958 +/* Configuration descriptor */
5959 +static __u8 root_hub_config_des[] = {
5960 +       0x09,                   /*  __u8  bLength; */
5961 +       0x02,                   /*  __u8  bDescriptorType; Configuration */
5962 +       0x19,                   /*  __u16 wTotalLength; */
5963 +       0x00,
5964 +       0x01,                   /*  __u8  bNumInterfaces; */
5965 +       0x01,                   /*  __u8  bConfigurationValue; */
5966 +       0x00,                   /*  __u8  iConfiguration; */
5967 +       0x40,                   /*  __u8  bmAttributes; 
5968 +                                  Bit 7: Bus-powered, 6: Self-powered, 5 Remote-wakwup, 
5969 +                                  4..0: resvd */
5970 +       0x00,                   /*  __u8  MaxPower; */
5971 +
5972 +       /* interface */
5973 +       0x09,                   /*  __u8  if_bLength; */
5974 +       0x04,                   /*  __u8  if_bDescriptorType; Interface */
5975 +       0x00,                   /*  __u8  if_bInterfaceNumber; */
5976 +       0x00,                   /*  __u8  if_bAlternateSetting; */
5977 +       0x01,                   /*  __u8  if_bNumEndpoints; */
5978 +       0x09,                   /*  __u8  if_bInterfaceClass; HUB_CLASSCODE */
5979 +       0x00,                   /*  __u8  if_bInterfaceSubClass; */
5980 +       0x00,                   /*  __u8  if_bInterfaceProtocol; */
5981 +       0x00,                   /*  __u8  if_iInterface; */
5982 +
5983 +       /* endpoint */
5984 +       0x07,                   /*  __u8  ep_bLength; */
5985 +       0x05,                   /*  __u8  ep_bDescriptorType; Endpoint */
5986 +       0x81,                   /*  __u8  ep_bEndpointAddress; IN Endpoint 1 */
5987 +       0x03,                   /*  __u8  ep_bmAttributes; Interrupt */
5988 +       0x02,                   /*  __u16 ep_wMaxPacketSize; ((MAX_ROOT_PORTS + 1) / 8 */
5989 +       0x00,
5990 +       0xff                    /*  __u8  ep_bInterval; 255 ms */
5991 +};
5992 +
5993 +/* Hub class-specific descriptor is constructed dynamically */
5994 +
5995 +/***************************************************************************
5996 + * Function Name : rh_send_irq
5997 + * 
5998 + * This function examine the port change in the virtual root hub.
5999 + * 
6000 + * Note: This function assumes only one port exist in the root hub.
6001 + *
6002 + * Input:  hci = data structure for the host controller
6003 + *         rh_data = The pointer to port change data
6004 + *         rh_len = length of the data in bytes
6005 + *
6006 + * Return: length of data  
6007 + **************************************************************************/
6008 +static int rh_send_irq (hci_t * hci, void *rh_data, int rh_len)
6009 +{
6010 +       int num_ports;
6011 +       int i;
6012 +       int ret;
6013 +       int len;
6014 +       __u8 data[8];
6015 +
6016 +       DBGFUNC ("enter rh_send_irq: \n");
6017 +
6018 +       /* Assuming the root hub has one port.  This value need to change if
6019 +        * there are more than one port for the root hub
6020 +        */
6021 +
6022 +       num_ports = 1;
6023 +
6024 +       /* The root hub status is not implemented, it basically has two fields:
6025 +        *     -- Local Power Status
6026 +        *     -- Over Current Indicator
6027 +        *     -- Local Power Change
6028 +        *     -- Over Current Indicator
6029 +        *
6030 +        * Right now, It is assume the power is good and no changes 
6031 +        */
6032 +
6033 +       *(__u8 *) data = 0;
6034 +
6035 +       ret = *(__u8 *) data;
6036 +
6037 +       /* Has the port status change within the root hub: It checks for
6038 +        *      -- Port Connect Status change
6039 +        *      -- Port Enable Change
6040 +        */
6041 +
6042 +       for (i = 0; i < num_ports; i++) {
6043 +               *(__u8 *) (data + (i + 1) / 8) |=
6044 +                   (((getPortStatusAndChange (hci) >> 16) & (PORT_CONNECT_STAT | PORT_ENABLE_STAT)) ? 1 : 0) << ((i + 1) % 8);
6045 +               ret += *(__u8 *) (data + (i + 1) / 8);
6046 +
6047 +               /* After the port change is read, it should be reset so the next time 
6048 +                * is it doesn't trigger a change again */
6049 +
6050 +       }
6051 +       len = i / 8 + 1;
6052 +
6053 +       if (ret > 0) {
6054 +               memcpy (rh_data, data, min (len, min (rh_len, (int)sizeof (data))));
6055 +               return len;
6056 +       }
6057 +       return 0;
6058 +}
6059 +
6060 +/***************************************************************************
6061 + * Function Name : rh_int_timer_do
6062 + * 
6063 + * This function is called when the timer expires.  It gets the the port 
6064 + * change data and pass along to the upper protocol.
6065 + * 
6066 + * Note:  The virtual root hub interrupt pipe are polled by the timer
6067 + *        every "interval" ms
6068 + *
6069 + * Input:  ptr = ptr to the urb
6070 + *
6071 + * Return: none  
6072 + **************************************************************************/
6073 +static void rh_int_timer_do (unsigned long ptr)
6074 +{
6075 +       int len;
6076 +       struct urb *urb = (struct urb *) ptr;
6077 +       hci_t *hci = urb->dev->bus->hcpriv;
6078 +
6079 +       DBGFUNC ("enter rh_int_timer_do\n");
6080 +
6081 +       if (hci->rh.send) {
6082 +               len = rh_send_irq (hci, urb->transfer_buffer,
6083 +                                  urb->transfer_buffer_length);
6084 +               if (len > 0) {
6085 +                       urb->actual_length = len;
6086 +                       if (urb_debug == 2)
6087 +                               urb_print (urb, "RET-t(rh)",
6088 +                                          usb_pipeout (urb->pipe));
6089 +
6090 +                       if (urb->complete) {
6091 +                               urb->complete (urb);
6092 +                       }
6093 +               }
6094 +       }
6095 +
6096 +       /* re-activate the timer */
6097 +       rh_init_int_timer (urb);
6098 +}
6099 +
6100 +/***************************************************************************
6101 + * Function Name : rh_init_int_timer
6102 + * 
6103 + * This function creates a timer that act as interrupt pipe in the
6104 + * virtual hub.   
6105 + * 
6106 + * Note:  The virtual root hub's interrupt pipe are polled by the timer
6107 + *        every "interval" ms
6108 + *
6109 + * Input: urb = USB request block 
6110 + *
6111 + * Return: 0  
6112 + **************************************************************************/
6113 +static int rh_init_int_timer (struct urb * urb)
6114 +{
6115 +       hci_t *hci = urb->dev->bus->hcpriv;
6116 +       hci->rh.interval = urb->interval;
6117 +
6118 +       init_timer (&hci->rh.rh_int_timer);
6119 +       hci->rh.rh_int_timer.function = rh_int_timer_do;
6120 +       hci->rh.rh_int_timer.data = (unsigned long) urb;
6121 +       hci->rh.rh_int_timer.expires = jiffies + (HZ * (urb->interval < 30 ? 30 : urb->interval)) / 1000;
6122 +       add_timer (&hci->rh.rh_int_timer);
6123 +
6124 +       return 0;
6125 +}
6126 +
6127 +/*-------------------------------------------------------------------------*/
6128 +
6129 +/* helper macro */
6130 +#define OK(x)                  len = (x); break
6131 +
6132 +/***************************************************************************
6133 + * Function Name : rh_submit_urb
6134 + * 
6135 + * This function handles all USB request to the the virtual root hub
6136 + * 
6137 + * Input: urb = USB request block 
6138 + *
6139 + * Return: 0  
6140 + **************************************************************************/
6141 +static int rh_submit_urb (struct urb * urb)
6142 +{
6143 +       struct usb_device *usb_dev = urb->dev;
6144 +       hci_t *hci = usb_dev->bus->hcpriv;
6145 +       unsigned int pipe = urb->pipe;
6146 +       struct usb_ctrlrequest *cmd = (struct usb_ctrlrequest *) urb->setup_packet;
6147 +       void *data = urb->transfer_buffer;
6148 +       int leni = urb->transfer_buffer_length;
6149 +       int len = 0;
6150 +       int status = TD_CC_NOERROR;
6151 +       __u32 datab[4];
6152 +       __u8 *data_buf = (__u8 *) datab;
6153 +
6154 +       __u16 bmRType_bReq;
6155 +       __u16 wValue;
6156 +       __u16 wIndex;
6157 +       __u16 wLength;
6158 +
6159 +       DBGFUNC ("enter rh_submit_urb\n");
6160 +       if (usb_pipeint (pipe)) {
6161 +               hci->rh.urb = urb;
6162 +               hci->rh.send = 1;
6163 +               hci->rh.interval = urb->interval;
6164 +               rh_init_int_timer (urb);
6165 +               urb->status = cc_to_error (TD_CC_NOERROR);
6166 +
6167 +               return 0;
6168 +       }
6169 +
6170 +       bmRType_bReq = cmd->bRequestType | (cmd->bRequest << 8);
6171 +       wValue = le16_to_cpu (cmd->wValue);
6172 +       wIndex = le16_to_cpu (cmd->wIndex);
6173 +       wLength = le16_to_cpu (cmd->wLength);
6174 +
6175 +       DBG ("rh_submit_urb, req = %d(%x) len=%d",
6176 +            bmRType_bReq, bmRType_bReq, wLength);
6177 +
6178 +       switch (bmRType_bReq) {
6179 +               /* Request Destination:
6180 +                  without flags: Device, 
6181 +                  RH_INTERFACE: interface, 
6182 +                  RH_ENDPOINT: endpoint,
6183 +                  RH_CLASS means HUB here, 
6184 +                  RH_OTHER | RH_CLASS  almost ever means HUB_PORT here 
6185 +                */
6186 +
6187 +       case RH_GET_STATUS:
6188 +               *(__u16 *) data_buf = cpu_to_le16 (1);
6189 +               OK (2);
6190 +
6191 +       case RH_GET_STATUS | RH_INTERFACE:
6192 +               *(__u16 *) data_buf = cpu_to_le16 (0);
6193 +               OK (2);
6194 +
6195 +       case RH_GET_STATUS | RH_ENDPOINT:
6196 +               *(__u16 *) data_buf = cpu_to_le16 (0);
6197 +               OK (2);
6198 +
6199 +       case RH_GET_STATUS | RH_CLASS:
6200 +               *(__u32 *) data_buf = cpu_to_le32 (0);
6201 +               OK (4);
6202 +
6203 +       case RH_GET_STATUS | RH_OTHER | RH_CLASS:
6204 +               *(__u32 *) data_buf =
6205 +                   cpu_to_le32 (getPortStatusAndChange (hci));
6206 +               OK (4);
6207 +
6208 +       case RH_CLEAR_FEATURE | RH_ENDPOINT:
6209 +               switch (wValue) {
6210 +               case (RH_ENDPOINT_STALL):
6211 +                       OK (0);
6212 +               }
6213 +               break;
6214 +
6215 +       case RH_CLEAR_FEATURE | RH_CLASS:
6216 +               switch (wValue) {
6217 +               case RH_C_HUB_LOCAL_POWER:
6218 +                       OK (0);
6219 +
6220 +               case (RH_C_HUB_OVER_CURRENT):
6221 +                       /* Over Current Not Implemented */
6222 +                       OK (0);
6223 +               }
6224 +               break;
6225 +
6226 +       case RH_CLEAR_FEATURE | RH_OTHER | RH_CLASS:
6227 +               switch (wValue) {
6228 +               case (RH_PORT_ENABLE):
6229 +                       clrPortStatus (hci, PORT_ENABLE_STAT);
6230 +                       OK (0);
6231 +
6232 +               case (RH_PORT_SUSPEND):
6233 +                       clrPortStatus (hci, PORT_SUSPEND_STAT);
6234 +                       OK (0);
6235 +
6236 +               case (RH_PORT_POWER):
6237 +                       clrPortStatus (hci, PORT_POWER_STAT);
6238 +                       OK (0);
6239 +
6240 +               case (RH_C_PORT_CONNECTION):
6241 +                       clrPortChange (hci, PORT_CONNECT_STAT);
6242 +                       OK (0);
6243 +
6244 +               case (RH_C_PORT_ENABLE):
6245 +                       clrPortChange (hci, PORT_ENABLE_STAT);
6246 +                       OK (0);
6247 +
6248 +               case (RH_C_PORT_SUSPEND):
6249 +                       clrPortChange (hci, PORT_SUSPEND_STAT);
6250 +                       OK (0);
6251 +
6252 +               case (RH_C_PORT_OVER_CURRENT):
6253 +                       clrPortChange (hci, PORT_OVER_CURRENT_STAT);
6254 +                       OK (0);
6255 +
6256 +               case (RH_C_PORT_RESET):
6257 +                       clrPortChange (hci, PORT_RESET_STAT);
6258 +                       OK (0);
6259 +               }
6260 +               break;
6261 +
6262 +       case RH_SET_FEATURE | RH_OTHER | RH_CLASS:
6263 +               switch (wValue) {
6264 +               case (RH_PORT_SUSPEND):
6265 +                       setPortStatus (hci, PORT_SUSPEND_STAT);
6266 +                       OK (0);
6267 +
6268 +               case (RH_PORT_RESET):
6269 +                       setPortStatus (hci, PORT_RESET_STAT);
6270 +                       // USBReset(hci);
6271 +                       clrPortChange (hci,
6272 +                                      PORT_CONNECT_CHANGE | PORT_ENABLE_CHANGE
6273 +                                      | PORT_SUSPEND_CHANGE |
6274 +                                      PORT_OVER_CURRENT_CHANGE);
6275 +                       setPortChange (hci, PORT_RESET_CHANGE);
6276 +                       clrPortStatus (hci, PORT_RESET_STAT);
6277 +                       setPortStatus (hci, PORT_ENABLE_STAT);
6278 +
6279 +                       OK (0);
6280 +
6281 +               case (RH_PORT_POWER):
6282 +                       setPortStatus (hci, PORT_POWER_STAT);
6283 +                       OK (0);
6284 +
6285 +               case (RH_PORT_ENABLE):
6286 +                       setPortStatus (hci, PORT_ENABLE_STAT);
6287 +                       OK (0);
6288 +               }
6289 +               break;
6290 +
6291 +       case RH_SET_ADDRESS:
6292 +               hci->rh.devnum = wValue;
6293 +               OK (0);
6294 +
6295 +       case RH_GET_DESCRIPTOR:
6296 +               DBGVERBOSE ("rh_submit_urb: RH_GET_DESCRIPTOR, wValue = 0x%x\n", wValue);
6297 +               switch ((wValue & 0xff00) >> 8) {
6298 +               case (0x01):    /* device descriptor */
6299 +                       len = min (leni, min ((__u16)sizeof (root_hub_dev_des), wLength));
6300 +                       data_buf = root_hub_dev_des;
6301 +                       OK (len);
6302 +
6303 +               case (0x02):    /* configuration descriptor */
6304 +                       len = min (leni, min ((__u16)sizeof (root_hub_config_des), wLength));
6305 +                       data_buf = root_hub_config_des;
6306 +                       OK (len);
6307 +
6308 +               case (0x03):    /* string descriptors */
6309 +                       len = usb_root_hub_string (wValue & 0xff, (int) (long) 0,
6310 +                                                  "SL811HS", data, wLength);
6311 +                       if (len > 0) {
6312 +                               data_buf = data;
6313 +                               OK (min (leni, len));
6314 +                       }
6315 +
6316 +               default:
6317 +                       status = SL11H_STATMASK_STALL;
6318 +               }
6319 +               break;
6320 +
6321 +       case RH_GET_DESCRIPTOR | RH_CLASS:
6322 +               data_buf[0] = 9;        // min length;
6323 +               data_buf[1] = 0x29;
6324 +               data_buf[2] = 1;        // # of downstream port
6325 +               data_buf[3] = 0;
6326 +               datab[1] = 0;
6327 +               data_buf[5] = 50;       // 100 ms for port reset
6328 +               data_buf[7] = 0xfc;     // which port is attachable
6329 +               if (data_buf[2] < 7) {
6330 +                       data_buf[8] = 0xff;
6331 +               } else {
6332 +               }
6333 +
6334 +               len = min (leni, min ((__u16)data_buf[0], wLength));
6335 +               OK (len);
6336 +
6337 +       case RH_GET_CONFIGURATION:
6338 +               *(__u8 *) data_buf = 0x01;
6339 +               OK (1);
6340 +
6341 +       case RH_SET_CONFIGURATION:
6342 +               OK (0);
6343 +
6344 +       default:
6345 +               DBGERR ("unsupported root hub command");
6346 +               status = SL11H_STATMASK_STALL;
6347 +       }
6348 +
6349 +       len = min (len, leni);
6350 +       if (data != data_buf)
6351 +               memcpy (data, data_buf, len);
6352 +       urb->actual_length = len;
6353 +       urb->status = cc_to_error (status);
6354 +
6355 +       urb->hcpriv = NULL;
6356 +       urb->dev = NULL;
6357 +       if (urb->complete) {
6358 +               urb->complete (urb);
6359 +       }
6360 +
6361 +       return 0;
6362 +}
6363 +
6364 +/***************************************************************************
6365 + * Function Name : rh_unlink_urb
6366 + * 
6367 + * This function unlinks the URB 
6368 + * 
6369 + * Input: urb = USB request block 
6370 + *
6371 + * Return: 0  
6372 + **************************************************************************/
6373 +static int rh_unlink_urb (struct urb * urb)
6374 +{
6375 +       hci_t *hci = urb->dev->bus->hcpriv;
6376 +
6377 +       DBGFUNC ("enter rh_unlink_urb\n");
6378 +       if (hci->rh.urb == urb) {
6379 +               hci->rh.send = 0;
6380 +               del_timer (&hci->rh.rh_int_timer);
6381 +               hci->rh.urb = NULL;
6382 +
6383 +               urb->hcpriv = NULL;
6384 +               usb_put_dev (urb->dev);
6385 +               urb->dev = NULL;
6386 +               if (urb->transfer_flags & USB_ASYNC_UNLINK) {
6387 +                       urb->status = -ECONNRESET;
6388 +                       if (urb->complete) {
6389 +                               urb->complete (urb);
6390 +                       }
6391 +               } else
6392 +                       urb->status = -ENOENT;
6393 +       }
6394 +       return 0;
6395 +}
6396 +
6397 +/***************************************************************************
6398 + * Function Name : rh_connect_rh
6399 + * 
6400 + * This function connect the virtual root hub to the USB stack 
6401 + * 
6402 + * Input: urb = USB request block 
6403 + *
6404 + * Return: 0  
6405 + **************************************************************************/
6406 +static int rh_connect_rh (hci_t * hci)
6407 +{
6408 +       struct usb_device *usb_dev;
6409 +
6410 +       hci->rh.devnum = 0;
6411 +       usb_dev = usb_alloc_dev (NULL, hci->bus);
6412 +       if (!usb_dev)
6413 +               return -ENOMEM;
6414 +
6415 +       hci->bus->root_hub = usb_dev;
6416 +       usb_connect (usb_dev);
6417 +       if (usb_new_device (usb_dev) != 0) {
6418 +               usb_free_dev (usb_dev);
6419 +               return -ENODEV;
6420 +       }
6421 +
6422 +       return 0;
6423 +}
6424 diff -Nur linux-2.4.19.org/drivers/usb/hcd/ehci-hcd.c linux-2.4.19/drivers/usb/hcd/ehci-hcd.c
6425 --- linux-2.4.19.org/drivers/usb/hcd/ehci-hcd.c Sat Aug  3 02:39:44 2002
6426 +++ linux-2.4.19/drivers/usb/hcd/ehci-hcd.c     Thu Oct 31 08:11:21 2002
6427 @@ -434,10 +434,6 @@
6428         scan_async (ehci);
6429         if (ehci->next_uframe != -1)
6430                 scan_periodic (ehci);
6431 -
6432 -       // FIXME:  when nothing is connected to the root hub,
6433 -       // turn off the RUN bit so the host can enter C3 "sleep" power
6434 -       // saving mode; make root hub code scan memory less often.
6435  }
6436  
6437  /*-------------------------------------------------------------------------*/
6438 @@ -582,7 +578,10 @@
6439                 return 0;
6440  
6441         case PIPE_INTERRUPT:
6442 -               intr_deschedule (ehci, urb->start_frame, qh, urb->interval);
6443 +               intr_deschedule (ehci, urb->start_frame, qh,
6444 +                       (urb->dev->speed == USB_SPEED_HIGH)
6445 +                           ? urb->interval
6446 +                           : (urb->interval << 3));
6447                 if (ehci->hcd.state == USB_STATE_HALT)
6448                         urb->status = -ESHUTDOWN;
6449                 qh_completions (ehci, qh, 1);
6450 diff -Nur linux-2.4.19.org/drivers/usb/hcd/ehci-q.c linux-2.4.19/drivers/usb/hcd/ehci-q.c
6451 --- linux-2.4.19.org/drivers/usb/hcd/ehci-q.c   Sat Aug  3 02:39:44 2002
6452 +++ linux-2.4.19/drivers/usb/hcd/ehci-q.c       Thu Oct 31 08:11:21 2002
6453 @@ -368,7 +368,7 @@
6454                 /* SETUP for control urb? */
6455                 if (unlikely (QTD_PID (token) == 2))
6456                         pci_unmap_single (ehci->hcd.pdev,
6457 -                               qtd->buf_dma, sizeof (devrequest),
6458 +                               qtd->buf_dma, sizeof (struct usb_ctrlrequest),
6459                                 PCI_DMA_TODEVICE);
6460         }
6461  
6462 @@ -419,7 +419,7 @@
6463                          */
6464                         if (!unmapped++ && usb_pipecontrol (urb->pipe)) {
6465                                 direction = PCI_DMA_TODEVICE;
6466 -                               size = sizeof (devrequest);
6467 +                               size = sizeof (struct usb_ctrlrequest);
6468                         } else {
6469                                 direction = usb_pipein (urb->pipe)
6470                                         ? PCI_DMA_FROMDEVICE
6471 @@ -470,13 +470,13 @@
6472                 qtd->buf_dma = pci_map_single (
6473                                         ehci->hcd.pdev,
6474                                         urb->setup_packet,
6475 -                                       sizeof (devrequest),
6476 +                                       sizeof (struct usb_ctrlrequest),
6477                                         PCI_DMA_TODEVICE);
6478                 if (unlikely (!qtd->buf_dma))
6479                         goto cleanup;
6480  
6481                 /* SETUP pid */
6482 -               qtd_fill (qtd, qtd->buf_dma, sizeof (devrequest),
6483 +               qtd_fill (qtd, qtd->buf_dma, sizeof (struct usb_ctrlrequest),
6484                         token | (2 /* "setup" */ << 8));
6485  
6486                 /* ... and always at least one more pid */
6487 @@ -681,6 +681,8 @@
6488         default:
6489  #ifdef DEBUG
6490                 BUG ();
6491 +#else
6492 +               ;
6493  #endif
6494         }
6495  
6496 @@ -817,9 +819,9 @@
6497                 } else {
6498                         // dbg_qh ("empty qh", ehci, qh);
6499  
6500 -// FIXME:  how handle usb_clear_halt() for an EP with queued URBs?
6501 -// usbcore may not let us handle that cleanly...
6502 -// likely must cancel them all first!
6503 +                       /* NOTE: we already canceled any queued URBs
6504 +                        * when the endpoint halted.
6505 +                        */
6506  
6507                         /* usb_clear_halt() means qh data toggle gets reset */
6508                         if (usb_pipebulk (urb->pipe)
6509 diff -Nur linux-2.4.19.org/drivers/usb/hcd/ehci-sched.c linux-2.4.19/drivers/usb/hcd/ehci-sched.c
6510 --- linux-2.4.19.org/drivers/usb/hcd/ehci-sched.c       Sat Aug  3 02:39:44 2002
6511 +++ linux-2.4.19/drivers/usb/hcd/ehci-sched.c   Thu Oct 31 08:11:21 2002
6512 @@ -881,7 +881,7 @@
6513         unsigned long   flags
6514  ) {
6515         struct urb                              *urb = itd->urb;
6516 -       iso_packet_descriptor_t                 *desc;
6517 +       struct iso_packet_descriptor            *desc;
6518         u32                                     t;
6519  
6520         /* update status for this uframe's transfers */
6521 @@ -919,17 +919,9 @@
6522                 return flags;
6523  
6524         /*
6525 -        * For now, always give the urb back to the driver ... expect it
6526 -        * to submit a new urb (or resubmit this), and to have another
6527 -        * already queued when un-interrupted transfers are needed.
6528 -        * No, that's not what OHCI or UHCI are now doing.
6529 -        *
6530 -        * FIXME Revisit the ISO URB model.  It's cleaner not to have all
6531 -        * the special case magic, but it'd be faster to reuse existing
6532 -        * ITD/DMA setup and schedule state.  Easy to dma_sync/complete(),
6533 -        * then either reschedule or, if unlinking, free and giveback().
6534 -        * But we can't overcommit like the full and low speed HCs do, and
6535 -        * there's no clean way to report an error when rescheduling...
6536 +        * Always give the urb back to the driver ... expect it to submit
6537 +        * a new urb (or resubmit this), and to have another already queued
6538 +        * when un-interrupted transfers are needed.
6539          *
6540          * NOTE that for now we don't accelerate ISO unlinks; they just
6541          * happen according to the current schedule.  Means a delay of
6542 @@ -964,15 +956,6 @@
6543         if (urb->iso_frame_desc [0].offset != 0)
6544                 return -EINVAL;
6545         
6546 -       /*
6547 -        * NOTE doing this for now, anticipating periodic URB models
6548 -        * get updated to be "explicit resubmit".
6549 -        */
6550 -       if (urb->next) {
6551 -               dbg ("use explicit resubmit for ISO");
6552 -               return -EINVAL;
6553 -       }
6554 -
6555         /* allocate ITDs w/o locking anything */
6556         status = itd_urb_transaction (ehci, urb, mem_flags);
6557         if (status < 0)
6558 diff -Nur linux-2.4.19.org/drivers/usb/hcd.c linux-2.4.19/drivers/usb/hcd.c
6559 --- linux-2.4.19.org/drivers/usb/hcd.c  Sat Aug  3 02:39:44 2002
6560 +++ linux-2.4.19/drivers/usb/hcd.c      Thu Oct 31 08:11:21 2002
6561 @@ -56,7 +56,8 @@
6562   * USB Host Controller Driver framework
6563   *
6564   * Plugs into usbcore (usb_bus) and lets HCDs share code, minimizing
6565 - * HCD-specific behaviors/bugs.
6566 + * HCD-specific behaviors/bugs.  Think of it as the "upper level" of
6567 + * some drivers, where the "lower level" is hardware-specific.
6568   *
6569   * This does error checks, tracks devices and urbs, and delegates to a
6570   * "hc_driver" only for code (and data) that really needs to know about
6571 @@ -78,6 +79,9 @@
6572   * Roman Weissgaerber, Rory Bolt, ...
6573   *
6574   * HISTORY:
6575 + * 2002-sept   Merge some 2.5 updates so we can share hardware level HCD
6576 + *     code between the 2.4.20+ and 2.5 trees.
6577 + * 2002-feb    merge to 2.4.19
6578   * 2001-12-12  Initial patch version for Linux 2.5.1 kernel.
6579   */
6580  
6581 @@ -316,16 +320,16 @@
6582  /* Root hub control transfers execute synchronously */
6583  static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
6584  {
6585 -       devrequest      *cmd = (devrequest *) urb->setup_packet;
6586 +       struct usb_ctrlrequest *cmd = (struct usb_ctrlrequest *) urb->setup_packet;
6587         u16             typeReq, wValue, wIndex, wLength;
6588         const u8        *bufp = 0;
6589         u8              *ubuf = urb->transfer_buffer;
6590         int             len = 0;
6591  
6592 -       typeReq  = (cmd->requesttype << 8) | cmd->request;
6593 -       wValue   = le16_to_cpu (cmd->value);
6594 -       wIndex   = le16_to_cpu (cmd->index);
6595 -       wLength  = le16_to_cpu (cmd->length);
6596 +       typeReq  = (cmd->bRequestType << 8) | cmd->bRequest;
6597 +       wValue   = le16_to_cpu (cmd->wValue);
6598 +       wIndex   = le16_to_cpu (cmd->wIndex);
6599 +       wLength  = le16_to_cpu (cmd->wLength);
6600  
6601         if (wLength > urb->transfer_buffer_length)
6602                 goto error;
6603 @@ -583,7 +587,6 @@
6604         struct hc_driver        *driver;
6605         unsigned long           resource, len;
6606         void                    *base;
6607 -       u8                      latency, limit;
6608         struct usb_bus          *bus;
6609         struct usb_hcd          *hcd;
6610         int                     retval, region;
6611 @@ -662,15 +665,6 @@
6612         hcd->pdev = dev;
6613         info ("%s @ %s, %s", hcd->description,  dev->slot_name, dev->name);
6614  
6615 -       pci_read_config_byte (dev, PCI_LATENCY_TIMER, &latency);
6616 -       if (latency) {
6617 -               pci_read_config_byte (dev, PCI_MAX_LAT, &limit);
6618 -               if (limit && limit < latency) {
6619 -                       dbg ("PCI latency reduced to max %d", limit);
6620 -                       pci_write_config_byte (dev, PCI_LATENCY_TIMER, limit);
6621 -               }
6622 -       }
6623 -
6624  #ifndef __sparc__
6625         sprintf (buf, "%d", dev->irq);
6626  #else
6627 @@ -701,7 +695,8 @@
6628                 goto clean_3;
6629         }
6630         hcd->bus = bus;
6631 -       hcd->bus_name = dev->slot_name;
6632 +       hcd->bus_name = dev->slot_name;         /* prefer bus->bus_name */
6633 +       bus->bus_name = dev->slot_name;
6634         hcd->product_desc = dev->name;
6635         bus->hcpriv = (void *) hcd;
6636  
6637 @@ -1072,6 +1067,8 @@
6638         if (urb->transfer_buffer_length < 0)
6639                 return -EINVAL;
6640  
6641 +       // FIXME set urb->transfer_dma and/or setup_dma 
6642 +
6643         if (urb->next) {
6644                 warn ("use explicit queuing not urb->next");
6645                 return -EINVAL;
6646 @@ -1463,6 +1460,8 @@
6647                 dbg ("giveback urb %p status %d len %d",
6648                         urb, urb->status, urb->actual_length);
6649  
6650 +       // FIXME unmap urb->transfer_dma and/or setup_dma 
6651 +
6652         /* pass ownership to the completion handler */
6653         urb->complete (urb);
6654  }
6655 diff -Nur linux-2.4.19.org/drivers/usb/hcd.h linux-2.4.19/drivers/usb/hcd.h
6656 --- linux-2.4.19.org/drivers/usb/hcd.h  Sat Aug  3 02:39:44 2002
6657 +++ linux-2.4.19/drivers/usb/hcd.h      Thu Oct 31 08:11:21 2002
6658 @@ -153,6 +153,7 @@
6659  
6660  #ifdef CONFIG_PCI
6661  
6662 +struct pci_device_id;
6663  extern int usb_hcd_pci_probe (struct pci_dev *dev,
6664                                 const struct pci_device_id *id);
6665  extern void usb_hcd_pci_remove (struct pci_dev *dev);
6666 @@ -206,6 +207,54 @@
6667  
6668  /*-------------------------------------------------------------------------*/
6669  
6670 +/*
6671 + * Generic bandwidth allocation constants/support
6672 + */
6673 +#define FRAME_TIME_USECS       1000L
6674 +#define BitTime(bytecount)  (7 * 8 * bytecount / 6)  /* with integer truncation */
6675 +               /* Trying not to use worst-case bit-stuffing
6676 +                   of (7/6 * 8 * bytecount) = 9.33 * bytecount */
6677 +               /* bytecount = data payload byte count */
6678 +
6679 +#define NS_TO_US(ns)   ((ns + 500L) / 1000L)
6680 +                       /* convert & round nanoseconds to microseconds */
6681 +
6682 +extern void usb_claim_bandwidth (struct usb_device *dev, struct urb *urb,
6683 +               int bustime, int isoc);
6684 +extern void usb_release_bandwidth (struct usb_device *dev, struct urb *urb,
6685 +               int isoc);
6686 +
6687 +/*
6688 + * Full/low speed bandwidth allocation constants/support.
6689 + */
6690 +#define BW_HOST_DELAY  1000L           /* nanoseconds */
6691 +#define BW_HUB_LS_SETUP        333L            /* nanoseconds */
6692 +                        /* 4 full-speed bit times (est.) */
6693 +
6694 +#define FRAME_TIME_BITS         12000L         /* frame = 1 millisecond */
6695 +#define FRAME_TIME_MAX_BITS_ALLOC      (90L * FRAME_TIME_BITS / 100L)
6696 +#define FRAME_TIME_MAX_USECS_ALLOC     (90L * FRAME_TIME_USECS / 100L)
6697 +
6698 +extern int usb_check_bandwidth (struct usb_device *dev, struct urb *urb);
6699 +
6700 +/*
6701 + * Ceiling microseconds (typical) for that many bytes at high speed
6702 + * ISO is a bit less, no ACK ... from USB 2.0 spec, 5.11.3 (and needed
6703 + * to preallocate bandwidth)
6704 + */
6705 +#define USB2_HOST_DELAY        5       /* nsec, guess */
6706 +#define HS_USECS(bytes) NS_TO_US ( ((55 * 8 * 2083)/1000) \
6707 +       + ((2083UL * (3167 + BitTime (bytes)))/1000) \
6708 +       + USB2_HOST_DELAY)
6709 +#define HS_USECS_ISO(bytes) NS_TO_US ( ((long)(38 * 8 * 2.083)) \
6710 +       + ((2083UL * (3167 + BitTime (bytes)))/1000) \
6711 +       + USB2_HOST_DELAY)
6712 +
6713 +extern long usb_calc_bus_time (int speed, int is_input,
6714 +                       int isoc, int bytecount);
6715 +
6716 +/*-------------------------------------------------------------------------*/
6717 +
6718  /* hub.h ... DeviceRemovable in 2.4.2-ac11, gone in 2.4.10 */
6719  // bleech -- resurfaced in 2.4.11 or 2.4.12
6720  #define bitmap         DeviceRemovable
6721 @@ -217,3 +266,20 @@
6722  
6723  #define        RUN_CONTEXT (in_irq () ? "in_irq" \
6724                 : (in_interrupt () ? "in_interrupt" : "can sleep"))
6725 +
6726 +/* 2.5 changes ... */
6727 +
6728 +#ifndef container_of
6729 +#define        container_of    list_entry
6730 +#endif
6731 +
6732 +#define usb_get_urb(x) (x)
6733 +#define usb_put_urb(x)
6734 +
6735 +static inline struct usb_bus *hcd_to_bus (struct usb_hcd *hcd)
6736 +       { return hcd->bus; }
6737 +
6738 +static inline void
6739 +usb_hub_tt_clear_buffer (struct usb_device *dev, int pipe)
6740 +       { }
6741 +
6742 diff -Nur linux-2.4.19.org/drivers/usb/hid-core.c linux-2.4.19/drivers/usb/hid-core.c
6743 --- linux-2.4.19.org/drivers/usb/hid-core.c     Sat Aug  3 02:39:44 2002
6744 +++ linux-2.4.19/drivers/usb/hid-core.c Thu Oct 31 08:11:21 2002
6745 @@ -988,7 +988,7 @@
6746  
6747  static int hid_submit_out(struct hid_device *hid)
6748  {
6749 -       hid->urbout.transfer_buffer_length = le16_to_cpup(&hid->out[hid->outtail].dr.length);
6750 +       hid->urbout.transfer_buffer_length = le16_to_cpup(&hid->out[hid->outtail].dr.wLength);
6751         hid->urbout.transfer_buffer = hid->out[hid->outtail].buffer;
6752         hid->urbout.setup_packet = (void *) &(hid->out[hid->outtail].dr);
6753         hid->urbout.dev = hid->dev;
6754 @@ -1018,8 +1018,8 @@
6755  {
6756         hid_output_report(report, hid->out[hid->outhead].buffer);
6757  
6758 -       hid->out[hid->outhead].dr.value = cpu_to_le16(0x200 | report->id);
6759 -       hid->out[hid->outhead].dr.length = cpu_to_le16((report->size + 7) >> 3);
6760 +       hid->out[hid->outhead].dr.wValue = cpu_to_le16(0x200 | report->id);
6761 +       hid->out[hid->outhead].dr.wLength = cpu_to_le16((report->size + 7) >> 3);
6762  
6763         hid->outhead = (hid->outhead + 1) & (HID_CONTROL_FIFO_SIZE - 1);
6764  
6765 @@ -1065,8 +1065,8 @@
6766                         list = report_enum->report_list.next;
6767                         while (list != &report_enum->report_list) {
6768                                 report = (struct hid_report *) list;
6769 -                               usb_set_idle(hid->dev, hid->ifnum, 0, report->id);
6770                                 hid_read_report(hid, report);
6771 +                               usb_set_idle(hid->dev, hid->ifnum, 0, report->id);
6772                                 list = list->next;
6773                         }
6774                 }
6775 @@ -1204,9 +1204,9 @@
6776         hid->ifnum = interface->bInterfaceNumber;
6777  
6778         for (n = 0; n < HID_CONTROL_FIFO_SIZE; n++) {
6779 -               hid->out[n].dr.requesttype = USB_TYPE_CLASS | USB_RECIP_INTERFACE;
6780 -               hid->out[n].dr.request = USB_REQ_SET_REPORT;
6781 -               hid->out[n].dr.index = cpu_to_le16(hid->ifnum);
6782 +               hid->out[n].dr.bRequestType = USB_TYPE_CLASS | USB_RECIP_INTERFACE;
6783 +               hid->out[n].dr.bRequest = USB_REQ_SET_REPORT;
6784 +               hid->out[n].dr.wIndex = cpu_to_le16(hid->ifnum);
6785         }
6786  
6787         hid->name[0] = 0;
6788 diff -Nur linux-2.4.19.org/drivers/usb/hid.h linux-2.4.19/drivers/usb/hid.h
6789 --- linux-2.4.19.org/drivers/usb/hid.h  Sat Aug  3 02:39:44 2002
6790 +++ linux-2.4.19/drivers/usb/hid.h      Thu Oct 31 08:11:21 2002
6791 @@ -287,7 +287,7 @@
6792  #define HID_CONTROL_FIFO_SIZE  8
6793  
6794  struct hid_control_fifo {
6795 -       devrequest dr;
6796 +       struct usb_ctrlrequest dr;
6797         char buffer[HID_BUFFER_SIZE];
6798  };
6799  
6800 diff -Nur linux-2.4.19.org/drivers/usb/hpusbscsi.c linux-2.4.19/drivers/usb/hpusbscsi.c
6801 --- linux-2.4.19.org/drivers/usb/hpusbscsi.c    Sat Aug  3 02:39:44 2002
6802 +++ linux-2.4.19/drivers/usb/hpusbscsi.c        Thu Oct 31 08:11:23 2002
6803 @@ -1,3 +1,51 @@
6804 +/*
6805 + * hpusbscsi
6806 + * (C) Copyright 2001 Oliver Neukum 
6807 + * Sponsored by the Linux Usb Project
6808 + * Large parts based on or taken from code by John Fremlin and Matt Dharm
6809 + * 
6810 + * This driver is known to work with the following scanners (VID, PID)
6811 + *    (0x03f0, 0x0701)  HP 53xx 
6812 + *    (0x03f0, 0x0801)  HP 7400 
6813 + *    (0x0638, 0x026a)  Minolta Scan Dual II
6814 + *    (0x0686, 0x4004)  Minolta Elite II
6815 + * To load with full debugging load with "insmod hpusbscsi debug=2"
6816 + * 
6817 + * This program is free software; you can redistribute it and/or modify it
6818 + * under the terms of the GNU General Public License as published by the
6819 + * Free Software Foundation; either version 2 of the License, or (at your
6820 + * option) any later version.
6821 + *
6822 + * This program is distributed in the hope that it will be useful, but
6823 + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
6824 + * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
6825 + * for more details.
6826 + *
6827 + * You should have received a copy of the GNU General Public License
6828 + * along with this program; if not, write to the Free Software Foundation,
6829 + * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
6830 + *
6831 + * Contributors:
6832 + *   Oliver Neukum
6833 + *   John Fremlin
6834 + *   Matt Dharm
6835 + *   .
6836 + *   .
6837 + *   Timothy Jedlicka <bonzo@lucent.com>
6838 + *
6839 + * History
6840 + *
6841 + * 22-Apr-2002
6842 + *
6843 + * - Added Elite II scanner - bonzo
6844 + * - Cleaned up the debug statements and made them optional at load time - bonzo
6845 + *
6846 + * 20020618
6847 + *
6848 + * - Confirm to stupid 2.4 rules on io_request_lock
6849 + *
6850 + */
6851 +
6852  #include <linux/module.h>
6853  #include <linux/kernel.h>
6854  #include <linux/sched.h>
6855 @@ -16,12 +64,28 @@
6856  
6857  #include "hpusbscsi.h"
6858  
6859 -#define DEBUG(x...) \
6860 -       printk( KERN_DEBUG x )
6861 -
6862  static char *states[]={"FREE", "BEGINNING", "WORKING", "ERROR", "WAIT", "PREMATURE"};
6863  
6864 -#define TRACE_STATE printk(KERN_DEBUG"hpusbscsi->state = %s at line %d\n", states[hpusbscsi->state], __LINE__)
6865 +/* DEBUG related parts */
6866 +#define HPUSBSCSI_DEBUG
6867 +
6868 +#ifdef HPUSBSCSI_DEBUG
6869 +#  define PDEBUG(level, fmt, args...) \
6870 +          if (debug >= (level)) info("[" __PRETTY_FUNCTION__ ":%d] " fmt, __LINE__ , \
6871 +                 ## args)
6872 +#else
6873 +#  define PDEBUG(level, fmt, args...) do {} while(0)
6874 +#endif
6875 +
6876 +
6877 +/* 0=no debug messages
6878 + * 1=everything but trace states
6879 + * 2=trace states
6880 + */
6881 +static int debug; /* = 0 */
6882 +
6883 +MODULE_PARM(debug, "i");
6884 +MODULE_PARM_DESC(debug, "Debug level: 0=none, 1=no trace states, 2=trace states");
6885  
6886  /* global variables */
6887  
6888 @@ -54,7 +118,7 @@
6889                                               GFP_KERNEL);
6890         if (new == NULL)
6891                 return NULL;
6892 -       DEBUG ("Allocated memory\n");
6893 +       PDEBUG (1, "Allocated memory");
6894         memset (new, 0, sizeof (struct hpusbscsi));
6895         spin_lock_init (&new->dataurb.lock);
6896         spin_lock_init (&new->controlurb.lock);
6897 @@ -136,14 +200,26 @@
6898  static void
6899  hpusbscsi_usb_disconnect (struct usb_device *dev, void *ptr)
6900  {
6901 -                 usb_unlink_urb(&(((struct hpusbscsi *) ptr)->controlurb));
6902 -       ((struct hpusbscsi *) ptr)->dev = NULL;
6903 +       struct hpusbscsi *hp = (struct hpusbscsi *)ptr;
6904 +
6905 +       usb_unlink_urb(&hp->controlurb);
6906 +       usb_unlink_urb(&hp->dataurb);
6907 +
6908 +       spin_lock_irq(&io_request_lock);
6909 +       hp->dev = NULL;
6910 +       spin_unlock_irq(&io_request_lock);
6911  }
6912  
6913  static struct usb_device_id hpusbscsi_usb_ids[] = {
6914         {USB_DEVICE (0x03f0, 0x0701)},  /* HP 53xx */
6915         {USB_DEVICE (0x03f0, 0x0801)},  /* HP 7400 */
6916 +       {USB_DEVICE (0x0638, 0x0268)},  /*iVina 1200U */
6917         {USB_DEVICE (0x0638, 0x026a)},  /*Scan Dual II */
6918 +       {USB_DEVICE (0x0638, 0x0A13)},  /*Avision AV600U */
6919 +       {USB_DEVICE (0x0638, 0x0A16)},  /*Avision DS610CU Scancopier */
6920 +       {USB_DEVICE (0x0638, 0x0A18)},  /*Avision AV600U Plus */
6921 +       {USB_DEVICE (0x0638, 0x0A23)},  /*Avision AV220 */
6922 +       {USB_DEVICE (0x0638, 0x0A24)},  /*Avision AV210 */
6923         {USB_DEVICE (0x0686, 0x4004)},  /*Minolta Elite II */
6924         {}                      /* Terminating entry */
6925  };
6926 @@ -167,7 +243,8 @@
6927         int result;
6928  
6929         INIT_LIST_HEAD (&hpusbscsi_devices);
6930 -
6931 +       PDEBUG(0, "driver loaded, DebugLvel=%d", debug);
6932
6933         if ((result = usb_register (&hpusbscsi_usb_driver)) < 0) {
6934                 printk (KERN_ERR "hpusbscsi: driver registration failed\n");
6935                 return -1;
6936 @@ -210,6 +287,7 @@
6937         /* What a hideous hack! */
6938  
6939         char local_name[48];
6940 +       spin_unlock_irq(&io_request_lock);
6941  
6942  
6943         /* set up the name of our subdirectory under /proc/scsi/ */
6944 @@ -218,6 +296,7 @@
6945         /* FIXME: where is this freed ? */
6946  
6947         if (!sht->proc_name) {
6948 +               spin_lock_irq(&io_request_lock);
6949                 return 0;
6950         }
6951  
6952 @@ -238,6 +317,7 @@
6953  
6954         if ( 0  >  usb_submit_urb(&desc->controlurb)) {
6955                 kfree(sht->proc_name);
6956 +               spin_lock_irq(&io_request_lock);
6957                 return 0;
6958         }
6959  
6960 @@ -246,10 +326,11 @@
6961         if (desc->host == NULL) {
6962                 kfree (sht->proc_name);
6963                 usb_unlink_urb(&desc->controlurb);
6964 +               spin_lock_irq(&io_request_lock);
6965                 return 0;
6966         }
6967         desc->host->hostdata[0] = (unsigned long) desc;
6968 -
6969 +       spin_lock_irq(&io_request_lock);
6970  
6971         return 1;
6972  }
6973 @@ -260,15 +341,13 @@
6974         usb_urb_callback usb_callback;
6975         int res;
6976  
6977 -       hpusbscsi->use_count++;
6978 +       spin_unlock_irq(&io_request_lock);
6979  
6980         /* we don't answer for anything but our single device on any faked host controller */
6981         if ( srb->device->lun || srb->device->id || srb->device->channel ) {
6982 -               if (callback) {
6983 -                       srb->result = DID_BAD_TARGET;
6984 -                       callback(srb);
6985 -               }
6986 -                       goto out;
6987 +               srb->result = DID_BAD_TARGET;
6988 +               callback(srb);
6989 +               goto out;
6990         }
6991  
6992         /* Now we need to decide which callback to give to the urb we send the command with */
6993 @@ -297,7 +376,7 @@
6994         }
6995  
6996  
6997 -       TRACE_STATE;
6998 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
6999         if (hpusbscsi->state != HP_STATE_FREE) {
7000                 printk(KERN_CRIT"hpusbscsi - Ouch: queueing violation!\n");
7001                 return 1; /* This must not happen */
7002 @@ -307,7 +386,7 @@
7003          memset(srb->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
7004  
7005         hpusbscsi->state = HP_STATE_BEGINNING;
7006 -       TRACE_STATE;
7007 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
7008  
7009         /* We prepare the urb for writing out the scsi command */
7010         FILL_BULK_URB(
7011 @@ -321,19 +400,24 @@
7012         );
7013         hpusbscsi->scallback = callback;
7014         hpusbscsi->srb = srb;
7015 +       
7016 +       if (hpusbscsi->dev == NULL) {
7017 +               srb->result = DID_ERROR;
7018 +               callback(srb);
7019 +               goto out;
7020 +       }
7021  
7022         res = usb_submit_urb(&hpusbscsi->dataurb);
7023         if (res) {
7024                 hpusbscsi->state = HP_STATE_FREE;
7025 -               TRACE_STATE;
7026 -               if (callback) {
7027 -                       srb->result = DID_ERROR;
7028 -                       callback(srb);
7029 -               }
7030 +               PDEBUG(2, "state= %s", states[hpusbscsi->state]);
7031 +               srb->result = DID_ERROR;
7032 +               callback(srb);
7033 +
7034         }
7035  
7036  out:
7037 -       hpusbscsi->use_count--;
7038 +       spin_lock_irq(&io_request_lock);
7039         return 0;
7040  }
7041  
7042 @@ -341,9 +425,9 @@
7043  {
7044         struct hpusbscsi* hpusbscsi = (struct hpusbscsi*)(srb->host->hostdata[0]);
7045  
7046 -       printk(KERN_DEBUG"SCSI reset requested.\n");
7047 +       PDEBUG(1, "SCSI reset requested");
7048         //usb_reset_device(hpusbscsi->dev);
7049 -       //printk(KERN_DEBUG"SCSI reset completed.\n");
7050 +       //PDEBUG(1, "SCSI reset completed");
7051         hpusbscsi->state = HP_STATE_FREE;
7052  
7053         return 0;
7054 @@ -352,11 +436,14 @@
7055  static int hpusbscsi_scsi_abort (Scsi_Cmnd *srb)
7056  {
7057         struct hpusbscsi* hpusbscsi = (struct hpusbscsi*)(srb->host->hostdata[0]);
7058 -       printk(KERN_DEBUG"Request is canceled.\n");
7059 +       PDEBUG(1, "Request is canceled");
7060  
7061 +       spin_unlock_irq(&io_request_lock);
7062         usb_unlink_urb(&hpusbscsi->dataurb);
7063         hpusbscsi->state = HP_STATE_FREE;
7064  
7065 +       spin_lock_irq(&io_request_lock);
7066 +
7067         return SCSI_ABORT_PENDING;
7068  }
7069  
7070 @@ -376,7 +463,7 @@
7071         struct hpusbscsi * hpusbscsi = (struct hpusbscsi *)u->context;
7072         u8 scsi_state;
7073  
7074 -DEBUG("Getting status byte %d \n",hpusbscsi->scsi_state_byte);
7075 +       PDEBUG(1, "Getting status byte %d",hpusbscsi->scsi_state_byte);
7076         if(u->status < 0) {
7077                  if (hpusbscsi->state != HP_STATE_FREE)
7078                          handle_usb_error(hpusbscsi);
7079 @@ -402,24 +489,24 @@
7080                 /* we do a callback to the scsi layer if and only if all data has been transfered */
7081                 hpusbscsi->scallback(hpusbscsi->srb);
7082  
7083 -       TRACE_STATE;
7084 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
7085         switch (hpusbscsi->state) {
7086         case HP_STATE_WAIT:
7087                 hpusbscsi->state = HP_STATE_FREE;
7088 -       TRACE_STATE;
7089 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
7090                 break;
7091         case HP_STATE_WORKING:
7092         case HP_STATE_BEGINNING:
7093                 hpusbscsi->state = HP_STATE_PREMATURE;
7094 -       TRACE_STATE;
7095 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
7096                 break;
7097         case HP_STATE_ERROR:
7098                 break;
7099         default:
7100                 printk(KERN_ERR"hpusbscsi: Unexpected status report.\n");
7101 -       TRACE_STATE;
7102 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
7103                 hpusbscsi->state = HP_STATE_FREE;
7104 -       TRACE_STATE;
7105 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
7106                 break;
7107         }
7108  }
7109 @@ -431,15 +518,15 @@
7110                 handle_usb_error(hpusbscsi);
7111                 return;
7112          }
7113 -       TRACE_STATE;
7114 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
7115         if (hpusbscsi->state != HP_STATE_PREMATURE) {
7116 -               TRACE_STATE;
7117 +               PDEBUG(2, "state= %s", states[hpusbscsi->state]);
7118                 hpusbscsi->state = HP_STATE_WAIT;
7119         } else {
7120                 if (hpusbscsi->scallback != NULL)
7121                         hpusbscsi->scallback(hpusbscsi->srb);
7122                 hpusbscsi->state = HP_STATE_FREE;
7123 -       TRACE_STATE;
7124 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
7125         }
7126  }
7127  
7128 @@ -450,7 +537,7 @@
7129          usb_urb_callback callback;
7130          int res;
7131  
7132 -        DEBUG("Going through scatter/gather\n");
7133 +        PDEBUG(1, "Going through scatter/gather"); // bonzo - this gets hit a lot - maybe make it a 2
7134          if (u->status < 0) {
7135                  handle_usb_error(hpusbscsi);
7136                  return;
7137 @@ -461,10 +548,10 @@
7138          else
7139                  callback = simple_done;
7140  
7141 -       TRACE_STATE;
7142 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
7143          if (hpusbscsi->state != HP_STATE_PREMATURE)
7144                 hpusbscsi->state = HP_STATE_WORKING;
7145 -       TRACE_STATE;
7146 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
7147  
7148          FILL_BULK_URB(
7149                  u,
7150 @@ -479,7 +566,7 @@
7151          res = usb_submit_urb(u);
7152          if (res)
7153                 handle_usb_error(hpusbscsi);
7154 -       TRACE_STATE;
7155 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
7156  }
7157  
7158  static void simple_done (struct urb *u)
7159 @@ -490,8 +577,8 @@
7160                  handle_usb_error(hpusbscsi);
7161                  return;
7162          }
7163 -        DEBUG("Data transfer done\n");
7164 -       TRACE_STATE;
7165 +       PDEBUG(1, "Data transfer done");
7166 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
7167         if (hpusbscsi->state != HP_STATE_PREMATURE) {
7168                 if (u->status < 0) {
7169                         handle_usb_error(hpusbscsi);
7170 @@ -501,7 +588,7 @@
7171                         } else {
7172                                 issue_request_sense(hpusbscsi);
7173                         }
7174 -               TRACE_STATE;
7175 +               PDEBUG(2, "state= %s", states[hpusbscsi->state]);
7176                 }
7177         } else {
7178                 if (hpusbscsi->scallback != NULL)
7179 @@ -535,10 +622,10 @@
7180                  handle_usb_error(hpusbscsi);
7181                 return;
7182          }
7183 -       TRACE_STATE;
7184 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
7185         if (hpusbscsi->state != HP_STATE_PREMATURE) {
7186                 hpusbscsi->state = HP_STATE_WORKING;
7187 -       TRACE_STATE;
7188 +       PDEBUG(2, "state= %s", states[hpusbscsi->state]);
7189         }
7190  }
7191  
7192 diff -Nur linux-2.4.19.org/drivers/usb/hub.c linux-2.4.19/drivers/usb/hub.c
7193 --- linux-2.4.19.org/drivers/usb/hub.c  Sat Aug  3 02:39:44 2002
7194 +++ linux-2.4.19/drivers/usb/hub.c      Thu Oct 31 08:11:23 2002
7195 @@ -155,7 +155,7 @@
7196  static int usb_hub_configure(struct usb_hub *hub, struct usb_endpoint_descriptor *endpoint)
7197  {
7198         struct usb_device *dev = hub->dev;
7199 -       struct usb_hub_status hubstatus;
7200 +       struct usb_hub_status *hubstatus;
7201         char portstr[USB_MAXCHILDREN + 1];
7202         unsigned int pipe;
7203         int i, maxp, ret;
7204 @@ -258,20 +258,29 @@
7205  
7206         dbg("port removable status: %s", portstr);
7207  
7208 -       ret = usb_get_hub_status(dev, &hubstatus);
7209 +       hubstatus = kmalloc(sizeof *hubstatus, GFP_KERNEL);
7210 +       if (!hubstatus) {
7211 +               err("Unable to allocate hubstatus");
7212 +               kfree(hub->descriptor);
7213 +               return -1;
7214 +       }
7215 +       ret = usb_get_hub_status(dev, hubstatus);
7216         if (ret < 0) {
7217                 err("Unable to get hub status (err = %d)", ret);
7218 +               kfree(hubstatus);
7219                 kfree(hub->descriptor);
7220                 return -1;
7221         }
7222  
7223 -       le16_to_cpus(&hubstatus.wHubStatus);
7224 +       le16_to_cpus(&hubstatus->wHubStatus);
7225  
7226         dbg("local power source is %s",
7227 -               (hubstatus.wHubStatus & HUB_STATUS_LOCAL_POWER) ? "lost (inactive)" : "good");
7228 +               (hubstatus->wHubStatus & HUB_STATUS_LOCAL_POWER) ? "lost (inactive)" : "good");
7229  
7230         dbg("%sover-current condition exists",
7231 -               (hubstatus.wHubStatus & HUB_STATUS_OVERCURRENT) ? "" : "no ");
7232 +               (hubstatus->wHubStatus & HUB_STATUS_OVERCURRENT) ? "" : "no ");
7233 +
7234 +       kfree(hubstatus);
7235  
7236         /* Start the interrupt endpoint */
7237         pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
7238 @@ -287,8 +296,11 @@
7239                 return -1;
7240         }
7241  
7242 -       FILL_INT_URB(hub->urb, dev, pipe, hub->buffer, maxp, hub_irq,
7243 -               hub, endpoint->bInterval);
7244 +       FILL_INT_URB(hub->urb, dev, pipe, hub->buffer, maxp, hub_irq, hub,
7245 +               /* NOTE:  in 2.5 fill_int_urb() converts the encoding */
7246 +               (dev->speed == USB_SPEED_HIGH)
7247 +                       ? 1 << (endpoint->bInterval - 1)
7248 +                       : endpoint->bInterval);
7249         ret = usb_submit_urb(hub->urb);
7250         if (ret) {
7251                 err("usb_submit_urb failed (%d)", ret);
7252 @@ -666,7 +678,6 @@
7253         struct usb_device *dev;
7254         unsigned int delay = HUB_SHORT_RESET_TIME;
7255         int i;
7256 -       char *portstr, *tempstr;
7257  
7258         dbg("port %d, portstatus %x, change %x, %s",
7259                 port + 1, portstatus, portchange, portspeed (portstatus));
7260 @@ -694,11 +705,9 @@
7261  
7262         down(&usb_address0_sem);
7263  
7264 -       tempstr = kmalloc(1024, GFP_KERNEL);
7265 -       portstr = kmalloc(1024, GFP_KERNEL);
7266 -
7267         for (i = 0; i < HUB_PROBE_TRIES; i++) {
7268 -               struct usb_device *pdev, *cdev;
7269 +               struct usb_device *pdev;
7270 +               int len;
7271  
7272                 /* Allocate a new device struct */
7273                 dev = usb_alloc_dev(hub, hub->bus);
7274 @@ -728,32 +737,28 @@
7275                         dev->ttport = port + 1;
7276                 }
7277  
7278 -               /* Create a readable topology string */
7279 -               cdev = dev;
7280 +               /* Save readable and stable topology id, distinguishing
7281 +                * devices by location for diagnostics, tools, etc.  The
7282 +                * string is a path along hub ports, from the root.  Each
7283 +                * device's id will be stable until USB is re-cabled, and
7284 +                * hubs are often labeled with these port numbers.
7285 +                *
7286 +                * Initial size: ".NN" times five hubs + NUL = 16 bytes max
7287 +                * (quite rare, since most hubs have 4-6 ports).
7288 +                */
7289                 pdev = dev->parent;
7290 -               if (portstr && tempstr) {
7291 -                       portstr[0] = 0;
7292 -                       while (pdev) {
7293 -                               int port;
7294 -
7295 -                               for (port = 0; port < pdev->maxchild; port++)
7296 -                                       if (pdev->children[port] == cdev)
7297 -                                               break;
7298 -
7299 -                               strcpy(tempstr, portstr);
7300 -                               if (!strlen(tempstr))
7301 -                                       sprintf(portstr, "%d", port + 1);
7302 -                               else
7303 -                                       sprintf(portstr, "%d/%s", port + 1, tempstr);
7304 -
7305 -                               cdev = pdev;
7306 -                               pdev = pdev->parent;
7307 -                       }
7308 -                       info("USB new device connect on bus%d/%s, assigned device number %d",
7309 -                               dev->bus->busnum, portstr, dev->devnum);
7310 -               } else
7311 -                       info("USB new device connect on bus%d, assigned device number %d",
7312 -                               dev->bus->busnum, dev->devnum);
7313 +               if (pdev->devpath [0] != '0')   /* parent not root? */
7314 +                       len = snprintf (dev->devpath, sizeof dev->devpath,
7315 +                               "%s.%d", pdev->devpath, port + 1);
7316 +               /* root == "0", root port 2 == "2", port 3 that hub "2.3" */
7317 +               else
7318 +                       len = snprintf (dev->devpath, sizeof dev->devpath,
7319 +                               "%d", port + 1);
7320 +               if (len == sizeof dev->devpath)
7321 +                       warn ("devpath size! usb/%03d/%03d path %s",
7322 +                               dev->bus->busnum, dev->devnum, dev->devpath);
7323 +               info("new USB device %s-%s, assigned address %d",
7324 +                       dev->bus->bus_name, dev->devpath, dev->devnum);
7325  
7326                 /* Run it through the hoops (find a driver, etc) */
7327                 if (!usb_new_device(dev))
7328 @@ -770,10 +775,6 @@
7329         usb_hub_port_disable(hub, port);
7330  done:
7331         up(&usb_address0_sem);
7332 -       if (portstr)
7333 -               kfree(portstr);
7334 -       if (tempstr)
7335 -               kfree(tempstr);
7336  }
7337  
7338  static void usb_hub_events(void)
7339 @@ -782,7 +783,7 @@
7340         struct list_head *tmp;
7341         struct usb_device *dev;
7342         struct usb_hub *hub;
7343 -       struct usb_hub_status hubsts;
7344 +       struct usb_hub_status *hubsts;
7345         u16 hubstatus;
7346         u16 hubchange;
7347         u16 portstatus;
7348 @@ -872,21 +873,27 @@
7349                 } /* end for i */
7350  
7351                 /* deal with hub status changes */
7352 -               if (usb_get_hub_status(dev, &hubsts) < 0)
7353 -                       err("get_hub_status failed");
7354 -               else {
7355 -                       hubstatus = le16_to_cpup(&hubsts.wHubStatus);
7356 -                       hubchange = le16_to_cpup(&hubsts.wHubChange);
7357 -                       if (hubchange & HUB_CHANGE_LOCAL_POWER) {
7358 -                               dbg("hub power change");
7359 -                               usb_clear_hub_feature(dev, C_HUB_LOCAL_POWER);
7360 -                       }
7361 -                       if (hubchange & HUB_CHANGE_OVERCURRENT) {
7362 -                               dbg("hub overcurrent change");
7363 -                               wait_ms(500);   /* Cool down */
7364 -                               usb_clear_hub_feature(dev, C_HUB_OVER_CURRENT);
7365 -                               usb_hub_power_on(hub);
7366 +               hubsts = kmalloc(sizeof *hubsts, GFP_KERNEL);
7367 +               if (!hubsts) {
7368 +                       err("couldn't allocate hubsts");
7369 +               } else {
7370 +                       if (usb_get_hub_status(dev, hubsts) < 0)
7371 +                               err("get_hub_status failed");
7372 +                       else {
7373 +                               hubstatus = le16_to_cpup(&hubsts->wHubStatus);
7374 +                               hubchange = le16_to_cpup(&hubsts->wHubChange);
7375 +                               if (hubchange & HUB_CHANGE_LOCAL_POWER) {
7376 +                                       dbg("hub power change");
7377 +                                       usb_clear_hub_feature(dev, C_HUB_LOCAL_POWER);
7378 +                               }
7379 +                               if (hubchange & HUB_CHANGE_OVERCURRENT) {
7380 +                                       dbg("hub overcurrent change");
7381 +                                       wait_ms(500);   /* Cool down */
7382 +                                       usb_clear_hub_feature(dev, C_HUB_OVER_CURRENT);
7383 +                                       usb_hub_power_on(hub);
7384 +                               }
7385                         }
7386 +                       kfree(hubsts);
7387                 }
7388                 up(&hub->khubd_sem);
7389          } /* end while (1) */
7390 @@ -995,7 +1002,7 @@
7391  int usb_reset_device(struct usb_device *dev)
7392  {
7393         struct usb_device *parent = dev->parent;
7394 -       struct usb_device_descriptor descriptor;
7395 +       struct usb_device_descriptor *descriptor;
7396         int i, ret, port = -1;
7397  
7398         if (!parent) {
7399 @@ -1044,17 +1051,22 @@
7400          * If nothing changed, we reprogram the configuration and then
7401          * the alternate settings.
7402          */
7403 -       ret = usb_get_descriptor(dev, USB_DT_DEVICE, 0, &descriptor,
7404 -                       sizeof(descriptor));
7405 +       descriptor = kmalloc(sizeof *descriptor, GFP_NOIO);
7406 +       if (!descriptor) {
7407 +               return -ENOMEM;
7408 +       }
7409 +       ret = usb_get_descriptor(dev, USB_DT_DEVICE, 0, descriptor,
7410 +                       sizeof(*descriptor));
7411         if (ret < 0)
7412                 return ret;
7413  
7414 -       le16_to_cpus(&descriptor.bcdUSB);
7415 -       le16_to_cpus(&descriptor.idVendor);
7416 -       le16_to_cpus(&descriptor.idProduct);
7417 -       le16_to_cpus(&descriptor.bcdDevice);
7418 +       le16_to_cpus(&descriptor->bcdUSB);
7419 +       le16_to_cpus(&descriptor->idVendor);
7420 +       le16_to_cpus(&descriptor->idProduct);
7421 +       le16_to_cpus(&descriptor->bcdDevice);
7422  
7423 -       if (memcmp(&dev->descriptor, &descriptor, sizeof(descriptor))) {
7424 +       if (memcmp(&dev->descriptor, descriptor, sizeof(*descriptor))) {
7425 +               kfree(descriptor);
7426                 usb_destroy_configuration(dev);
7427  
7428                 ret = usb_get_device_descriptor(dev);
7429 @@ -1084,6 +1096,8 @@
7430                 return 1;
7431         }
7432  
7433 +       kfree(descriptor);
7434 +
7435         ret = usb_set_configuration(dev, dev->actconfig->bConfigurationValue);
7436         if (ret < 0) {
7437                 err("failed to set active configuration (error=%d)", ret);
7438 diff -Nur linux-2.4.19.org/drivers/usb/inode.c linux-2.4.19/drivers/usb/inode.c
7439 --- linux-2.4.19.org/drivers/usb/inode.c        Sat Aug  3 02:39:45 2002
7440 +++ linux-2.4.19/drivers/usb/inode.c    Thu Oct 31 08:11:23 2002
7441 @@ -628,6 +628,7 @@
7442          s->s_root = d_alloc_root(root_inode);
7443          if (!s->s_root)
7444                  goto out_no_root;
7445 +       lock_kernel();
7446         list_add_tail(&s->u.usbdevfs_sb.slist, &superlist);
7447         for (i = 0; i < NRSPECIAL; i++) {
7448                 if (!(inode = iget(s, IROOT+1+i)))
7449 @@ -646,6 +647,7 @@
7450                 recurse_new_dev_inode(bus->root_hub, s);
7451         }
7452         up (&usb_bus_list_lock);
7453 +       unlock_kernel();
7454          return s;
7455  
7456   out_no_root:
7457 diff -Nur linux-2.4.19.org/drivers/usb/kaweth.c linux-2.4.19/drivers/usb/kaweth.c
7458 --- linux-2.4.19.org/drivers/usb/kaweth.c       Sat Aug  3 02:39:45 2002
7459 +++ linux-2.4.19/drivers/usb/kaweth.c   Thu Oct 31 08:11:23 2002
7460 @@ -5,17 +5,18 @@
7461   *     (c) 2000 Interlan Communications
7462   *     (c) 2000 Stephane Alnet
7463   *     (C) 2001 Brad Hards
7464 + *     (C) 2002 Oliver Neukum
7465   *
7466   *     Original author: The Zapman <zapman@interlan.net>
7467 - *     Inspired by, and much credit goes to Michael Rothwell 
7468 + *     Inspired by, and much credit goes to Michael Rothwell
7469   *     <rothwell@interlan.net> for the test equipment, help, and patience
7470   *     Based off of (and with thanks to) Petko Manolov's pegaus.c driver.
7471 - *     Also many thanks to Joel Silverman and Ed Surprenant at Kawasaki 
7472 + *     Also many thanks to Joel Silverman and Ed Surprenant at Kawasaki
7473   *     for providing the firmware and driver resources.
7474   *
7475   *     This program is free software; you can redistribute it and/or
7476   *     modify it under the terms of the GNU General Public License as
7477 - *     published by the Free Software Foundation; either version 2, or 
7478 + *     published by the Free Software Foundation; either version 2, or
7479   *     (at your option) any later version.
7480   *
7481   *     This program is distributed in the hope that it will be useful,
7482 @@ -25,7 +26,7 @@
7483   *
7484   *     You should have received a copy of the GNU General Public License
7485   *     along with this program; if not, write to the Free Software Foundation,
7486 - *     Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
7487 + *     Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7488   *
7489   ****************************************************************/
7490  
7491 @@ -36,8 +37,8 @@
7492   * Fix bugs from previous two steps
7493   * Snoop other OSs for any tricks we're not doing
7494   * SMP locking
7495 - * Reduce arbitrary timeouts 
7496 - * Smart multicast support 
7497 + * Reduce arbitrary timeouts
7498 + * Smart multicast support
7499   * Temporary MAC change support
7500   * Tunable SOFs parameter - ioctl()?
7501   * Ethernet stats collection
7502 @@ -54,7 +55,10 @@
7503  #include <linux/etherdevice.h>
7504  #include <linux/usb.h>
7505  #include <linux/types.h>
7506 +#include <linux/ethtool.h>
7507 +#include <asm/uaccess.h>
7508  #include <asm/semaphore.h>
7509 +#include <asm/byteorder.h>
7510  
7511  #define DEBUG
7512  
7513 @@ -73,6 +77,7 @@
7514  #define KAWETH_MTU                     1514
7515  #define KAWETH_BUF_SIZE                        1664
7516  #define KAWETH_TX_TIMEOUT              (5 * HZ)
7517 +#define KAWETH_SCRATCH_SIZE            32
7518  #define KAWETH_FIRMWARE_BUF_SIZE       4096
7519  #define KAWETH_CONTROL_TIMEOUT         (30 * HZ)
7520  
7521 @@ -98,8 +103,14 @@
7522  
7523  #define KAWETH_SOFS_TO_WAIT                    0x05
7524  
7525 +#define INTBUFFERSIZE                          4
7526  
7527 -MODULE_AUTHOR("Michael Zappe <zapman@interlan.net>, Stephane Alnet <stephane@u-picardie.fr> and Brad Hards <bhards@bigpond.net.au>");
7528 +#define STATE_OFFSET                           0
7529 +#define STATE_MASK                             0x40
7530 +#define        STATE_SHIFT                             5
7531 +
7532 +
7533 +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>");
7534  MODULE_DESCRIPTION("KL5USB101 USB Ethernet driver");
7535  MODULE_LICENSE("GPL");
7536  
7537 @@ -110,28 +121,28 @@
7538         );
7539  static void kaweth_disconnect(struct usb_device *dev, void *ptr);
7540  int kaweth_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe,
7541 -                               devrequest *cmd, void *data, int len,
7542 -                               int timeout);
7543 +                               struct usb_ctrlrequest *cmd, void *data,
7544 +                               int len, int timeout);
7545  
7546  /****************************************************************
7547   *     usb_device_id
7548   ****************************************************************/
7549  static struct usb_device_id usb_klsi_table[] = {
7550 -       { USB_DEVICE(0x03e8, 0x0008) }, /* AOX Endpoints USB Ethernet */ 
7551 +       { USB_DEVICE(0x03e8, 0x0008) }, /* AOX Endpoints USB Ethernet */
7552         { USB_DEVICE(0x04bb, 0x0901) }, /* I-O DATA USB-ET/T */
7553 -       { USB_DEVICE(0x0506, 0x03e8) }, /* 3Com 3C19250 */ 
7554 -       { USB_DEVICE(0x0557, 0x2002) }, /* ATEN USB Ethernet */ 
7555 -       { USB_DEVICE(0x0557, 0x4000) }, /* D-Link DSB-650C */ 
7556 +       { USB_DEVICE(0x0506, 0x03e8) }, /* 3Com 3C19250 */
7557 +       { USB_DEVICE(0x0557, 0x2002) }, /* ATEN USB Ethernet */
7558 +       { USB_DEVICE(0x0557, 0x4000) }, /* D-Link DSB-650C */
7559         { USB_DEVICE(0x0565, 0x0002) }, /* Peracom Enet */
7560         { USB_DEVICE(0x0565, 0x0003) }, /* Optus@Home UEP1045A */
7561 -       { USB_DEVICE(0x0565, 0x0005) }, /* Peracom Enet2 */ 
7562 +       { USB_DEVICE(0x0565, 0x0005) }, /* Peracom Enet2 */
7563         { USB_DEVICE(0x05e9, 0x0008) }, /* KLSI KL5KUSB101B */
7564         { USB_DEVICE(0x05e9, 0x0009) }, /* KLSI KL5KUSB101B (Board change) */
7565 -       { USB_DEVICE(0x066b, 0x2202) }, /* Linksys USB10T */ 
7566 -       { USB_DEVICE(0x06e1, 0x0008) }, /* ADS USB-10BT */ 
7567 -       { USB_DEVICE(0x06e1, 0x0009) }, /* ADS USB-10BT */ 
7568 -       { USB_DEVICE(0x0707, 0x0100) }, /* SMC 2202USB */ 
7569 -       { USB_DEVICE(0x07aa, 0x0001) }, /* Correga K.K. */ 
7570 +       { USB_DEVICE(0x066b, 0x2202) }, /* Linksys USB10T */
7571 +       { USB_DEVICE(0x06e1, 0x0008) }, /* ADS USB-10BT */
7572 +       { USB_DEVICE(0x06e1, 0x0009) }, /* ADS USB-10BT */
7573 +       { USB_DEVICE(0x0707, 0x0100) }, /* SMC 2202USB */
7574 +       { USB_DEVICE(0x07aa, 0x0001) }, /* Correga K.K. */
7575         { USB_DEVICE(0x07b8, 0x4000) }, /* D-Link DU-E10 */
7576         { USB_DEVICE(0x0846, 0x1001) }, /* NetGear EA-101 */
7577         { USB_DEVICE(0x0846, 0x1002) }, /* NetGear EA-101 */
7578 @@ -143,9 +154,10 @@
7579         { USB_DEVICE(0x10bd, 0x1427) }, /* ASANTE USB To Ethernet Adapter */
7580         { USB_DEVICE(0x1342, 0x0204) }, /* Mobility USB-Ethernet Adapter */
7581         { USB_DEVICE(0x13d2, 0x0400) }, /* Shark Pocket Adapter */
7582 -       { USB_DEVICE(0x1645, 0x0005) }, /* Entrega E45 */ 
7583 -       { USB_DEVICE(0x1645, 0x0008) }, /* Entrega USB Ethernet Adapter */ 
7584 -       { USB_DEVICE(0x1645, 0x8005) }, /* PortGear Ethernet Adapter */ 
7585 +       { USB_DEVICE(0x1485, 0x0001) }, /* Silicom U2E */
7586 +       { USB_DEVICE(0x1645, 0x0005) }, /* Entrega E45 */
7587 +       { USB_DEVICE(0x1645, 0x0008) }, /* Entrega USB Ethernet Adapter */
7588 +       { USB_DEVICE(0x1645, 0x8005) }, /* PortGear Ethernet Adapter */
7589         { USB_DEVICE(0x2001, 0x4000) }, /* D-link DSB-650C */
7590         {} /* Null terminator */
7591  };
7592 @@ -156,10 +168,10 @@
7593   *     kaweth_driver
7594   ****************************************************************/
7595  static struct usb_driver kaweth_driver = {
7596 -       name:           "kaweth",
7597 -       probe:          kaweth_probe,
7598 -       disconnect:     kaweth_disconnect,
7599 -       id_table:       usb_klsi_table,
7600 +       .name =         "kaweth",
7601 +       .probe =        kaweth_probe,
7602 +       .disconnect =   kaweth_disconnect,
7603 +       .id_table =     usb_klsi_table,
7604  };
7605  
7606  typedef __u8 eth_addr_t[6];
7607 @@ -198,17 +210,25 @@
7608         spinlock_t device_lock;
7609  
7610         __u32 status;
7611 +       int end;
7612 +       int removed;
7613 +       int suspend_lowmem;
7614 +       int linkstate;
7615  
7616         struct usb_device *dev;
7617         struct net_device *net;
7618 -       wait_queue_head_t control_wait;
7619 +       wait_queue_head_t term_wait;
7620  
7621         struct urb *rx_urb;
7622         struct urb *tx_urb;
7623 +       struct urb *irq_urb;
7624         
7625 -       __u8 firmware_buf[KAWETH_FIRMWARE_BUF_SIZE];
7626 -       __u8 tx_buf[KAWETH_BUF_SIZE];
7627 +       struct sk_buff *tx_skb;
7628 +
7629 +       __u8 *firmware_buf;
7630 +       __u8 scratch[KAWETH_SCRATCH_SIZE];
7631         __u8 rx_buf[KAWETH_BUF_SIZE];
7632 +       __u8 intbuffer[INTBUFFERSIZE];
7633         __u16 packet_filter_bitmap;
7634  
7635         struct kaweth_ethernet_configuration configuration;
7636 @@ -221,16 +241,16 @@
7637   *     kaweth_control
7638   ****************************************************************/
7639  static int kaweth_control(struct kaweth_device *kaweth,
7640 -                         unsigned int pipe, 
7641 -                         __u8 request, 
7642 -                         __u8 requesttype, 
7643 -                         __u16 value, 
7644 +                         unsigned int pipe,
7645 +                         __u8 request,
7646 +                         __u8 requesttype,
7647 +                         __u16 value,
7648                           __u16 index,
7649 -                         void *data, 
7650 -                         __u16 size, 
7651 +                         void *data,
7652 +                         __u16 size,
7653                           int timeout)
7654  {
7655 -       devrequest *dr;
7656 +       struct usb_ctrlrequest *dr;
7657  
7658         kaweth_dbg("kaweth_control()");
7659  
7660 @@ -239,19 +259,18 @@
7661                 return -EBUSY;
7662         }
7663  
7664 -       dr = kmalloc(sizeof(devrequest), GFP_ATOMIC);
7665 +       dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_ATOMIC);
7666  
7667 -       if(!dr)
7668 -       {
7669 +       if (!dr) {
7670                 kaweth_dbg("kmalloc() failed");
7671                 return -ENOMEM;
7672         }
7673 -       
7674 -       dr->requesttype = requesttype;
7675 -       dr->request = request;
7676 -       dr->value = cpu_to_le16p(&value);
7677 -       dr->index = cpu_to_le16p(&index);
7678 -       dr->length = cpu_to_le16p(&size);
7679 +
7680 +       dr->bRequestType= requesttype;
7681 +       dr->bRequest = request;
7682 +       dr->wValue = cpu_to_le16p(&value);
7683 +       dr->wIndex = cpu_to_le16p(&index);
7684 +       dr->wLength = cpu_to_le16p(&size);
7685  
7686         return kaweth_internal_control_msg(kaweth->dev,
7687                                         pipe,
7688 @@ -298,7 +317,7 @@
7689                                 USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
7690                                 urb_size,
7691                                 0,
7692 -                               (void *)&kaweth->firmware_buf,
7693 +                               (void *)&kaweth->scratch,
7694                                 0,
7695                                 KAWETH_CONTROL_TIMEOUT);
7696  
7697 @@ -320,7 +339,7 @@
7698                                 USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
7699                                 sofs_wait,
7700                                 0,
7701 -                               (void *)&kaweth->firmware_buf,
7702 +                               (void *)&kaweth->scratch,
7703                                 0,
7704                                 KAWETH_CONTROL_TIMEOUT);
7705  
7706 @@ -343,7 +362,7 @@
7707                                 USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
7708                                 receive_filter,
7709                                 0,
7710 -                               (void *)&kaweth->firmware_buf,
7711 +                               (void *)&kaweth->scratch,
7712                                 0,
7713                                 KAWETH_CONTROL_TIMEOUT);
7714  
7715 @@ -353,19 +372,19 @@
7716  /****************************************************************
7717   *     kaweth_download_firmware
7718   ****************************************************************/
7719 -static int kaweth_download_firmware(struct kaweth_device *kaweth, 
7720 -                                   __u8 *data, 
7721 +static int kaweth_download_firmware(struct kaweth_device *kaweth,
7722 +                                   __u8 *data,
7723                                     __u16 data_len,
7724                                     __u8 interrupt,
7725                                     __u8 type)
7726 -{      
7727 +{
7728         if(data_len > KAWETH_FIRMWARE_BUF_SIZE) {
7729                 kaweth_err("Firmware too big: %d", data_len);
7730                 return -ENOSPC;
7731         }
7732 -       
7733 +
7734         memcpy(kaweth->firmware_buf, data, data_len);
7735 -       
7736 +
7737         kaweth->firmware_buf[2] = (data_len & 0xFF) - 7;
7738         kaweth->firmware_buf[3] = data_len >> 8;
7739         kaweth->firmware_buf[4] = type;
7740 @@ -374,8 +393,8 @@
7741         kaweth_dbg("High: %i, Low:%i", kaweth->firmware_buf[3],
7742                    kaweth->firmware_buf[2]);
7743  
7744 -       kaweth_dbg("Downloading firmware at %p to kaweth device at %p", 
7745 -           data, 
7746 +       kaweth_dbg("Downloading firmware at %p to kaweth device at %p",
7747 +           data,
7748             kaweth);
7749         kaweth_dbg("Firmware length: %d", data_len);
7750  
7751 @@ -385,7 +404,7 @@
7752                               USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
7753                               0,
7754                               0,
7755 -                             (void *)&kaweth->firmware_buf,
7756 +                             (void *)kaweth->firmware_buf,
7757                               data_len,
7758                               KAWETH_CONTROL_TIMEOUT);
7759  }
7760 @@ -404,7 +423,7 @@
7761         kaweth->firmware_buf[5] = interrupt;
7762         kaweth->firmware_buf[6] = 0x00;
7763         kaweth->firmware_buf[7] = 0x00;
7764 -       
7765 +
7766         kaweth_dbg("Triggering firmware");
7767  
7768         return kaweth_control(kaweth,
7769 @@ -413,7 +432,7 @@
7770                               USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
7771                               0,
7772                               0,
7773 -                             (void *)&kaweth->firmware_buf,
7774 +                             (void *)kaweth->firmware_buf,
7775                               8,
7776                               KAWETH_CONTROL_TIMEOUT);
7777  }
7778 @@ -428,12 +447,12 @@
7779         kaweth_dbg("kaweth_reset(%p)", kaweth);
7780         result = kaweth_control(kaweth,
7781                                 usb_sndctrlpipe(kaweth->dev, 0),
7782 -                               USB_REQ_SET_CONFIGURATION, 
7783 -                               0, 
7784 +                               USB_REQ_SET_CONFIGURATION,
7785 +                               0,
7786                                 kaweth->dev->config[0].bConfigurationValue,
7787 -                               0, 
7788 -                               NULL, 
7789 -                               0, 
7790 +                               0,
7791 +                               NULL,
7792 +                               0,
7793                                 KAWETH_CONTROL_TIMEOUT);
7794  
7795         udelay(10000);
7796 @@ -444,15 +463,39 @@
7797  }
7798  
7799  static void kaweth_usb_receive(struct urb *);
7800 +static void kaweth_resubmit_rx_urb(struct kaweth_device *);
7801 +
7802 +/****************************************************************
7803 +       int_callback
7804 +*****************************************************************/
7805 +static void int_callback(struct urb *u)
7806 +{
7807 +       struct kaweth_device *kaweth = u->context;
7808 +       int act_state;
7809 +
7810 +       /* we abuse the interrupt urb for rebsubmitting under low memory saving a timer */
7811 +       if (kaweth->suspend_lowmem)
7812 +               kaweth_resubmit_rx_urb(kaweth);
7813 +
7814 +       /* we check the link state to report changes */
7815 +       if (kaweth->linkstate != (act_state = ( kaweth->intbuffer[STATE_OFFSET] | STATE_MASK) >> STATE_SHIFT)) {
7816 +               if (!act_state)
7817 +                       netif_carrier_on(kaweth->net);
7818 +               else
7819 +                       netif_carrier_off(kaweth->net);
7820 +
7821 +               kaweth->linkstate = act_state;
7822 +       }
7823 +
7824 +}
7825  
7826  /****************************************************************
7827   *     kaweth_resubmit_rx_urb
7828   ****************************************************************/
7829 -static inline void kaweth_resubmit_rx_urb(struct kaweth_device *kaweth)
7830 +static void kaweth_resubmit_rx_urb(struct kaweth_device *kaweth)
7831  {
7832         int result;
7833 -
7834 -       memset(kaweth->rx_urb, 0, sizeof(*kaweth->rx_urb));
7835 +       long flags;
7836  
7837         FILL_BULK_URB(kaweth->rx_urb,
7838                       kaweth->dev,
7839 @@ -462,9 +505,17 @@
7840                       kaweth_usb_receive,
7841                       kaweth);
7842  
7843 -       if((result = usb_submit_urb(kaweth->rx_urb))) {
7844 -               kaweth_err("resubmitting rx_urb %d failed", result);
7845 +       spin_lock_irqsave(&kaweth->device_lock, flags);
7846 +       if (!kaweth->removed) { /* no resubmit if disconnecting */
7847 +               if((result = usb_submit_urb(kaweth->rx_urb))) {
7848 +                       if (result == -ENOMEM)
7849 +                               kaweth->suspend_lowmem = 1;
7850 +                       kaweth_err("resubmitting rx_urb %d failed", result);
7851 +               } else {
7852 +                       kaweth->suspend_lowmem = 0;
7853 +               }
7854         }
7855 +       spin_unlock_irqrestore(&kaweth->device_lock, flags);
7856  }
7857  
7858  static void kaweth_async_set_rx_mode(struct kaweth_device *kaweth);
7859 @@ -476,23 +527,30 @@
7860  {
7861         struct kaweth_device *kaweth = urb->context;
7862         struct net_device *net = kaweth->net;
7863 -       
7864 +
7865         int count = urb->actual_length;
7866         int count2 = urb->transfer_buffer_length;
7867 -                       
7868 +
7869         __u16 pkt_len = le16_to_cpup((u16 *)kaweth->rx_buf);
7870  
7871         struct sk_buff *skb;
7872  
7873 -       if(kaweth->status & KAWETH_STATUS_CLOSING) {
7874 +       if(urb->status == -ECONNRESET || urb->status == -ECONNABORTED)
7875 +       /* we are killed - set a flag and wake the disconnect handler */
7876 +       {
7877 +               kaweth->end = 1;
7878 +               wake_up(&kaweth->term_wait);
7879                 return;
7880         }
7881 -       
7882 -       if(urb->status && urb->status != -EREMOTEIO && count != 1) { 
7883 +
7884 +       if (kaweth->status & KAWETH_STATUS_CLOSING)
7885 +               return;
7886 +
7887 +       if(urb->status && urb->status != -EREMOTEIO && count != 1) {
7888                 kaweth_err("%s RX status: %d count: %d packet_len: %d",
7889 -                           net->name, 
7890 +                           net->name,
7891                            urb->status,
7892 -                          count, 
7893 +                          count,
7894                            (int)pkt_len);
7895                 kaweth_resubmit_rx_urb(kaweth);
7896                  return;
7897 @@ -506,22 +564,24 @@
7898                         kaweth_resubmit_rx_urb(kaweth);
7899                          return;
7900                  }
7901 -               
7902 +
7903                 if(!(skb = dev_alloc_skb(pkt_len+2))) {
7904                         kaweth_resubmit_rx_urb(kaweth);
7905                          return;
7906                 }
7907  
7908 +               skb_reserve(skb, 2);    /* Align IP on 16 byte boundaries */
7909 +
7910                 skb->dev = net;
7911  
7912                 eth_copy_and_sum(skb, kaweth->rx_buf + 2, pkt_len, 0);
7913 -               
7914 +
7915                 skb_put(skb, pkt_len);
7916  
7917                 skb->protocol = eth_type_trans(skb, net);
7918 -               
7919 +
7920                 netif_rx(skb);
7921 -               
7922 +
7923                 kaweth->stats.rx_packets++;
7924                 kaweth->stats.rx_bytes += pkt_len;
7925         }
7926 @@ -540,11 +600,23 @@
7927  
7928         kaweth_dbg("Opening network device.");
7929  
7930 +       MOD_INC_USE_COUNT;
7931 +
7932         kaweth_resubmit_rx_urb(kaweth);
7933  
7934 -       netif_start_queue(net);
7935 +       FILL_INT_URB(
7936 +               kaweth->irq_urb,
7937 +               kaweth->dev,
7938 +               usb_rcvintpipe(kaweth->dev, 3),
7939 +               kaweth->intbuffer,
7940 +               INTBUFFERSIZE,
7941 +               int_callback,
7942 +               kaweth,
7943 +               HZ/4);
7944  
7945 -       MOD_INC_USE_COUNT;
7946 +       usb_submit_urb(kaweth->irq_urb);
7947 +
7948 +       netif_start_queue(net);
7949  
7950         kaweth_async_set_rx_mode(kaweth);
7951         return 0;
7952 @@ -558,9 +630,12 @@
7953         struct kaweth_device *kaweth = net->priv;
7954  
7955         netif_stop_queue(net);
7956 -
7957 +       
7958 +       spin_lock_irq(&kaweth->device_lock);
7959         kaweth->status |= KAWETH_STATUS_CLOSING;
7960 +       spin_unlock_irq(&kaweth->device_lock);
7961  
7962 +       usb_unlink_urb(kaweth->irq_urb);
7963         usb_unlink_urb(kaweth->rx_urb);
7964  
7965         kaweth->status &= ~KAWETH_STATUS_CLOSING;
7966 @@ -572,11 +647,35 @@
7967         return 0;
7968  }
7969  
7970 +static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
7971 +{
7972 +       u32 ethcmd;
7973 +       
7974 +       if (copy_from_user(&ethcmd, useraddr, sizeof(ethcmd)))
7975 +               return -EFAULT;
7976 +       
7977 +       switch (ethcmd) {
7978 +       case ETHTOOL_GDRVINFO: {
7979 +               struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
7980 +               strncpy(info.driver, "kaweth", sizeof(info.driver)-1);
7981 +               if (copy_to_user(useraddr, &info, sizeof(info)))
7982 +                       return -EFAULT;
7983 +               return 0;
7984 +       }
7985 +       }
7986 +       
7987 +       return -EOPNOTSUPP;
7988 +}
7989 +
7990  /****************************************************************
7991   *     kaweth_ioctl
7992   ****************************************************************/
7993  static int kaweth_ioctl(struct net_device *net, struct ifreq *rq, int cmd)
7994  {
7995 +       switch (cmd) {
7996 +       case SIOCETHTOOL:
7997 +               return netdev_ethtool_ioctl(net, (void *) rq->ifr_data);
7998 +       }
7999         return -EOPNOTSUPP;
8000  }
8001  
8002 @@ -586,11 +685,13 @@
8003  static void kaweth_usb_transmit_complete(struct urb *urb)
8004  {
8005         struct kaweth_device *kaweth = urb->context;
8006 +       struct sk_buff *skb = kaweth->tx_skb;
8007  
8008 -       if (urb->status)
8009 +       if (urb->status != 0)
8010                 kaweth_dbg("%s: TX status %d.", kaweth->net->name, urb->status);
8011  
8012         netif_wake_queue(kaweth->net);
8013 +       dev_kfree_skb(skb);
8014  }
8015  
8016  /****************************************************************
8017 @@ -599,45 +700,66 @@
8018  static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net)
8019  {
8020         struct kaweth_device *kaweth = net->priv;
8021 -       int count = skb->len;
8022 -       
8023 +       char *private_header;
8024 +
8025         int res;
8026  
8027         spin_lock(&kaweth->device_lock);
8028  
8029 +       if (kaweth->removed) {
8030 +       /* our device is undergoing disconnection - we bail out */
8031 +               spin_unlock(&kaweth->device_lock);
8032 +               dev_kfree_skb(skb);
8033 +               return 0;
8034 +       }
8035 +
8036         kaweth_async_set_rx_mode(kaweth);
8037         netif_stop_queue(net);
8038  
8039 -       *((__u16 *)kaweth->tx_buf) = cpu_to_le16(skb->len);
8040 -
8041 -       memcpy(kaweth->tx_buf + 2, skb->data, skb->len);
8042 +       /* We now decide whether we can put our special header into the sk_buff */
8043 +       if (skb_cloned(skb) || skb_headroom(skb) < 2) {
8044 +               /* no such luck - we make our own */
8045 +               struct sk_buff *copied_skb;
8046 +               copied_skb = skb_copy_expand(skb, 2, 0, GFP_ATOMIC);
8047 +               dev_kfree_skb_any(skb);
8048 +               skb = copied_skb;
8049 +               if (!copied_skb) {
8050 +                       kaweth->stats.tx_errors++;
8051 +                       netif_start_queue(net);
8052 +                       spin_unlock(&kaweth->device_lock);
8053 +                       return 0;
8054 +               }
8055 +       }
8056  
8057 -       memset(kaweth->tx_urb, 0, sizeof(*kaweth->tx_urb));
8058 +       private_header = __skb_push(skb, 2);
8059 +       *private_header = cpu_to_le16(skb->len);
8060 +       kaweth->tx_skb = skb;
8061  
8062         FILL_BULK_URB(kaweth->tx_urb,
8063                       kaweth->dev,
8064                       usb_sndbulkpipe(kaweth->dev, 2),
8065 -                     kaweth->tx_buf,
8066 -                     count + 2,
8067 +                     private_header,
8068 +                     skb->len,
8069                       kaweth_usb_transmit_complete,
8070                       kaweth);
8071 +       kaweth->end = 0;
8072 +       kaweth->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
8073  
8074         if((res = usb_submit_urb(kaweth->tx_urb)))
8075         {
8076                 kaweth_warn("kaweth failed tx_urb %d", res);
8077                 kaweth->stats.tx_errors++;
8078 -               
8079 +
8080                 netif_start_queue(net);
8081 -       } 
8082 -       else 
8083 +               dev_kfree_skb(skb);
8084 +       }
8085 +       else
8086         {
8087                 kaweth->stats.tx_packets++;
8088                 kaweth->stats.tx_bytes += skb->len;
8089                 net->trans_start = jiffies;
8090         }
8091  
8092 -       dev_kfree_skb(skb);
8093 -
8094         spin_unlock(&kaweth->device_lock);
8095  
8096         return 0;
8097 @@ -649,7 +771,7 @@
8098  static void kaweth_set_rx_mode(struct net_device *net)
8099  {
8100         struct kaweth_device *kaweth = net->priv;
8101 -       
8102 +
8103         __u16 packet_filter_bitmap = KAWETH_PACKET_FILTER_DIRECTED |
8104                                       KAWETH_PACKET_FILTER_BROADCAST |
8105                                      KAWETH_PACKET_FILTER_MULTICAST;
8106 @@ -660,7 +782,7 @@
8107  
8108         if (net->flags & IFF_PROMISC) {
8109                 packet_filter_bitmap |= KAWETH_PACKET_FILTER_PROMISCUOUS;
8110 -       } 
8111 +       }
8112         else if ((net->mc_count) || (net->flags & IFF_ALLMULTI)) {
8113                 packet_filter_bitmap |= KAWETH_PACKET_FILTER_ALL_MULTICAST;
8114         }
8115 @@ -675,7 +797,7 @@
8116  static void kaweth_async_set_rx_mode(struct kaweth_device *kaweth)
8117  {
8118         __u16 packet_filter_bitmap = kaweth->packet_filter_bitmap;
8119 -       kaweth->packet_filter_bitmap = 0;       
8120 +       kaweth->packet_filter_bitmap = 0;
8121         if(packet_filter_bitmap == 0) return;
8122  
8123         {
8124 @@ -686,7 +808,7 @@
8125                                 USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
8126                                 packet_filter_bitmap,
8127                                 0,
8128 -                               (void *)&kaweth->firmware_buf,
8129 +                               (void *)&kaweth->scratch,
8130                                 0,
8131                                 KAWETH_CONTROL_TIMEOUT);
8132  
8133 @@ -718,7 +840,6 @@
8134         kaweth->stats.tx_errors++;
8135         net->trans_start = jiffies;
8136  
8137 -       kaweth->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
8138         usb_unlink_urb(kaweth->tx_urb);
8139  }
8140  
8141 @@ -736,14 +857,14 @@
8142         int result = 0;
8143  
8144         kaweth_dbg("Kawasaki Device Probe (Device number:%d): 0x%4.4x:0x%4.4x:0x%4.4x",
8145 -                dev->devnum, 
8146 -                (int)dev->descriptor.idVendor, 
8147 +                dev->devnum,
8148 +                (int)dev->descriptor.idVendor,
8149                  (int)dev->descriptor.idProduct,
8150                  (int)dev->descriptor.bcdDevice);
8151  
8152         kaweth_dbg("Device at %p", dev);
8153  
8154 -       kaweth_dbg("Descriptor length: %x type: %x", 
8155 +       kaweth_dbg("Descriptor length: %x type: %x",
8156                  (int)dev->descriptor.bLength,
8157                  (int)dev->descriptor.bDescriptorType);
8158  
8159 @@ -755,10 +876,9 @@
8160         memset(kaweth, 0, sizeof(struct kaweth_device));
8161  
8162         kaweth->dev = dev;
8163 -       kaweth->status = 0;
8164 -       kaweth->net = NULL;
8165 -       kaweth->device_lock = SPIN_LOCK_UNLOCKED;
8166 -               
8167 +       spin_lock_init(&kaweth->device_lock);
8168 +       init_waitqueue_head(&kaweth->term_wait);
8169 +
8170         kaweth_dbg("Resetting.");
8171  
8172         kaweth_reset(kaweth);
8173 @@ -773,22 +893,25 @@
8174         } else {
8175                 /* Download the firmware */
8176                 kaweth_info("Downloading firmware...");
8177 -               if ((result = kaweth_download_firmware(kaweth, 
8178 -                                                     kaweth_new_code, 
8179 -                                                     len_kaweth_new_code, 
8180 -                                                     100, 
8181 +               kaweth->firmware_buf = (__u8 *)__get_free_page(GFP_KERNEL);
8182 +               if ((result = kaweth_download_firmware(kaweth,
8183 +                                                     kaweth_new_code,
8184 +                                                     len_kaweth_new_code,
8185 +                                                     100,
8186                                                       2)) < 0) {
8187                         kaweth_err("Error downloading firmware (%d)", result);
8188 +                       free_page((unsigned long)kaweth->firmware_buf);
8189                         kfree(kaweth);
8190                         return NULL;
8191                 }
8192  
8193 -               if ((result = kaweth_download_firmware(kaweth, 
8194 -                                                     kaweth_new_code_fix, 
8195 -                                                     len_kaweth_new_code_fix, 
8196 -                                                     100, 
8197 +               if ((result = kaweth_download_firmware(kaweth,
8198 +                                                     kaweth_new_code_fix,
8199 +                                                     len_kaweth_new_code_fix,
8200 +                                                     100,
8201                                                       3)) < 0) {
8202                         kaweth_err("Error downloading firmware fix (%d)", result);
8203 +                       free_page((unsigned long)kaweth->firmware_buf);
8204                         kfree(kaweth);
8205                         return NULL;
8206                 }
8207 @@ -799,6 +922,7 @@
8208                                                       126,
8209                                                       2)) < 0) {
8210                         kaweth_err("Error downloading trigger code (%d)", result);
8211 +                       free_page((unsigned long)kaweth->firmware_buf);
8212                         kfree(kaweth);
8213                         return NULL;
8214                 }
8215 @@ -809,6 +933,7 @@
8216                                                       126,
8217                                                       3)) < 0) {
8218                         kaweth_err("Error downloading trigger code fix (%d)", result);
8219 +                       free_page((unsigned long)kaweth->firmware_buf);
8220                         kfree(kaweth);
8221                         return NULL;
8222                 }
8223 @@ -816,12 +941,14 @@
8224  
8225                 if ((result = kaweth_trigger_firmware(kaweth, 126)) < 0) {
8226                         kaweth_err("Error triggering firmware (%d)", result);
8227 +                       free_page((unsigned long)kaweth->firmware_buf);
8228                         kfree(kaweth);
8229                         return NULL;
8230                 }
8231  
8232                 /* Device will now disappear for a moment...  */
8233                 kaweth_info("Firmware loaded.  I'll be back...");
8234 +               free_page((unsigned long)kaweth->firmware_buf);
8235                 kfree(kaweth);
8236                 return NULL;
8237         }
8238 @@ -846,7 +973,7 @@
8239                  (int)kaweth->configuration.hw_addr[5]);
8240  
8241         if(!memcmp(&kaweth->configuration.hw_addr,
8242 -                   &bcast_addr, 
8243 +                   &bcast_addr,
8244                    sizeof(bcast_addr))) {
8245                 kaweth_err("Firmware not functioning properly, no net device created");
8246                 kfree(kaweth);
8247 @@ -857,13 +984,13 @@
8248                 kaweth_dbg("Error setting URB size");
8249                 return kaweth;
8250         }
8251 -       
8252 +
8253         if(kaweth_set_sofs_wait(kaweth, KAWETH_SOFS_TO_WAIT) < 0) {
8254                 kaweth_err("Error setting SOFS wait");
8255                 return kaweth;
8256         }
8257  
8258 -       result = kaweth_set_receive_filter(kaweth, 
8259 +       result = kaweth_set_receive_filter(kaweth,
8260                                             KAWETH_PACKET_FILTER_DIRECTED |
8261                                             KAWETH_PACKET_FILTER_BROADCAST |
8262                                             KAWETH_PACKET_FILTER_MULTICAST);
8263 @@ -872,11 +999,18 @@
8264                 kaweth_err("Error setting receive filter");
8265                 return kaweth;
8266         }
8267 -       
8268 +
8269         kaweth_dbg("Initializing net device.");
8270  
8271         kaweth->tx_urb = usb_alloc_urb(0);
8272 +       if (!kaweth->tx_urb)
8273 +               goto err_no_urb;
8274         kaweth->rx_urb = usb_alloc_urb(0);
8275 +       if (!kaweth->rx_urb)
8276 +               goto err_only_tx;
8277 +       kaweth->irq_urb = usb_alloc_urb(0);
8278 +       if (!kaweth->irq_urb)
8279 +               goto err_tx_and_rx;
8280  
8281         kaweth->net = init_etherdev(0, 0);
8282         if (!kaweth->net) {
8283 @@ -885,17 +1019,17 @@
8284         }
8285  
8286         memcpy(kaweth->net->broadcast, &bcast_addr, sizeof(bcast_addr));
8287 -       memcpy(kaweth->net->dev_addr, 
8288 +       memcpy(kaweth->net->dev_addr,
8289                 &kaweth->configuration.hw_addr,
8290                 sizeof(kaweth->configuration.hw_addr));
8291 -        
8292 +
8293         kaweth->net->priv = kaweth;
8294         kaweth->net->open = kaweth_open;
8295         kaweth->net->stop = kaweth_close;
8296  
8297         kaweth->net->watchdog_timeo = KAWETH_TX_TIMEOUT;
8298         kaweth->net->tx_timeout = kaweth_tx_timeout;
8299 -       
8300 +
8301         kaweth->net->do_ioctl = kaweth_ioctl;
8302         kaweth->net->hard_start_xmit = kaweth_start_xmit;
8303         kaweth->net->set_multicast_list = kaweth_set_rx_mode;
8304 @@ -905,10 +1039,18 @@
8305         memset(&kaweth->stats, 0, sizeof(kaweth->stats));
8306  
8307         kaweth_info("kaweth interface created at %s", kaweth->net->name);
8308 -                                                               
8309 +
8310         kaweth_dbg("Kaweth probe returning.");
8311  
8312         return kaweth;
8313 +
8314 +err_tx_and_rx:
8315 +       usb_free_urb(kaweth->rx_urb);
8316 +err_only_tx:
8317 +       usb_free_urb(kaweth->tx_urb);
8318 +err_no_urb:
8319 +       kfree(kaweth);
8320 +       return NULL;
8321  }
8322  
8323  /****************************************************************
8324 @@ -925,8 +1067,18 @@
8325                 return;
8326         }
8327  
8328 +       kaweth->removed = 1;
8329 +       usb_unlink_urb(kaweth->irq_urb);
8330         usb_unlink_urb(kaweth->rx_urb);
8331 -       usb_unlink_urb(kaweth->tx_urb);
8332 +
8333 +       /* we need to wait for the urb to be cancelled, if it is active */
8334 +       spin_lock_irq(&kaweth->device_lock);
8335 +       if (usb_unlink_urb(kaweth->tx_urb) == -EINPROGRESS) {
8336 +               spin_unlock_irq(&kaweth->device_lock);
8337 +               wait_event(kaweth->term_wait, kaweth->end);
8338 +       } else {
8339 +               spin_unlock_irq(&kaweth->device_lock);
8340 +       }
8341  
8342         if(kaweth->net) {
8343                 if(kaweth->net->flags & IFF_UP) {
8344 @@ -945,12 +1097,19 @@
8345  }
8346  
8347  
8348 +// FIXME this completion stuff is a modified clone of
8349 +// an OLD version of some stuff in usb.c ...
8350 +struct kw_api_data {
8351 +       wait_queue_head_t wqh;
8352 +       int done;
8353 +};
8354 +
8355  /*-------------------------------------------------------------------*
8356   * completion handler for compatibility wrappers (sync control/bulk) *
8357   *-------------------------------------------------------------------*/
8358 -static void usb_api_blocking_completion(urb_t *urb)
8359 +static void usb_api_blocking_completion(struct urb *urb)
8360  {
8361 -        struct usb_api_data *awd = (struct usb_api_data *)urb->context;
8362 +        struct kw_api_data *awd = (struct kw_api_data *)urb->context;
8363  
8364         awd->done=1;
8365         wake_up(&awd->wqh);
8366 @@ -961,15 +1120,15 @@
8367   *-------------------------------------------------------------------*/
8368  
8369  // Starts urb and waits for completion or timeout
8370 -static int usb_start_wait_urb(urb_t *urb, int timeout, int* actual_length)
8371 +static int usb_start_wait_urb(struct urb *urb, int timeout, int* actual_length)
8372  {
8373          DECLARE_WAITQUEUE(wait, current);
8374 -       struct usb_api_data awd;
8375 +       struct kw_api_data awd;
8376          int status;
8377  
8378          init_waitqueue_head(&awd.wqh);
8379          awd.done = 0;
8380 -        
8381 +
8382          set_current_state(TASK_INTERRUPTIBLE);
8383          add_wait_queue(&awd.wqh, &wait);
8384          urb->context = &awd;
8385 @@ -1009,9 +1168,10 @@
8386  /*-------------------------------------------------------------------*/
8387  // returns status (negative) or length (positive)
8388  int kaweth_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe,
8389 -                            devrequest *cmd,  void *data, int len, int timeout)
8390 +                            struct usb_ctrlrequest *cmd, void *data, int len,
8391 +                           int timeout)
8392  {
8393 -        urb_t *urb;
8394 +        struct urb *urb;
8395          int retv;
8396          int length;
8397  
8398 @@ -1054,6 +1214,7 @@
8399  
8400  
8401  
8402 +
8403  
8404  
8405  
8406 diff -Nur linux-2.4.19.org/drivers/usb/mdc800.c linux-2.4.19/drivers/usb/mdc800.c
8407 --- linux-2.4.19.org/drivers/usb/mdc800.c       Mon Feb 25 20:38:07 2002
8408 +++ linux-2.4.19/drivers/usb/mdc800.c   Thu Oct 31 08:11:23 2002
8409 @@ -140,7 +140,7 @@
8410  
8411         unsigned int            endpoint [4];
8412  
8413 -       purb_t                  irq_urb;
8414 +       struct urb *            irq_urb;
8415         wait_queue_head_t       irq_wait;
8416         int                     irq_woken;
8417         char*                   irq_urb_buffer;
8418 @@ -149,13 +149,13 @@
8419         int                     camera_request_ready; // Status to synchronize with irq
8420         char                    camera_response [8];  // last Bytes send after busy
8421  
8422 -       purb_t                  write_urb;
8423 +       struct urb *            write_urb;
8424         char*                   write_urb_buffer;
8425         wait_queue_head_t       write_wait;
8426         int                     written;
8427  
8428  
8429 -       purb_t                  download_urb;
8430 +       struct urb *            download_urb;
8431         char*                   download_urb_buffer;
8432         wait_queue_head_t       download_wait;
8433         int                     downloaded;
8434 @@ -652,7 +652,7 @@
8435   */
8436  static ssize_t mdc800_device_read (struct file *file, char *buf, size_t len, loff_t *pos)
8437  {
8438 -       int   left=len, sts=len; /* single transfer size */
8439 +       size_t left=len, sts=len; /* single transfer size */
8440         char* ptr=buf;
8441         DECLARE_WAITQUEUE(wait, current);
8442  
8443 @@ -746,7 +746,7 @@
8444   */
8445  static ssize_t mdc800_device_write (struct file *file, const char *buf, size_t len, loff_t *pos)
8446  {
8447 -       int i=0;
8448 +       size_t i=0;
8449         DECLARE_WAITQUEUE(wait, current);
8450  
8451         down (&mdc800->io_lock);
8452 diff -Nur linux-2.4.19.org/drivers/usb/microtek.c linux-2.4.19/drivers/usb/microtek.c
8453 --- linux-2.4.19.org/drivers/usb/microtek.c     Fri Oct  5 21:04:51 2001
8454 +++ linux-2.4.19/drivers/usb/microtek.c Thu Oct 31 08:11:23 2002
8455 @@ -117,6 +117,8 @@
8456   *     20010320 Version 0.4.3
8457   *     20010408 Identify version on module load.
8458   *     20011003 Fix multiple requests
8459 + *     20020618 Version 0.4.4
8460 + *     20020618 Confirm to utterly stupid rules about io_request_lock
8461   */
8462  
8463  #include <linux/module.h>
8464 @@ -144,7 +146,7 @@
8465  /*
8466   * Version Information
8467   */
8468 -#define DRIVER_VERSION "v0.4.3"
8469 +#define DRIVER_VERSION "v0.4.4"
8470  #define DRIVER_AUTHOR "John Fremlin <vii@penguinpowered.com>, Oliver Neukum <Oliver.Neukum@lrz.uni-muenchen.de>"
8471  #define DRIVER_DESC "Microtek Scanmaker X6 USB scanner driver"
8472  
8473 @@ -326,10 +328,12 @@
8474  }  */
8475  
8476  static inline void mts_urb_abort(struct mts_desc* desc) {
8477 +       spin_unlock_irq(&io_request_lock);
8478         MTS_DEBUG_GOT_HERE();
8479         mts_debug_dump(desc);
8480  
8481         usb_unlink_urb( &desc->urb );
8482 +       spin_lock_irq(&io_request_lock);
8483  }
8484  
8485  static struct mts_desc * mts_list; /* list of active scanners */
8486 @@ -414,12 +418,14 @@
8487  
8488  static int mts_scsi_host_reset (Scsi_Cmnd *srb)
8489  {
8490 -       struct mts_desc* desc = (struct mts_desc*)(srb->host->hostdata[0]);
8491  
8492 +       struct mts_desc* desc = (struct mts_desc*)(srb->host->hostdata[0]);
8493 +       spin_unlock_irq(&io_request_lock);
8494         MTS_DEBUG_GOT_HERE();
8495         mts_debug_dump(desc);
8496  
8497         usb_reset_device(desc->usb_dev); /*FIXME: untested on new reset code */
8498 +       spin_lock_irq(&io_request_lock);
8499         return 0;  /* RANT why here 0 and not SUCCESS */
8500  }
8501  
8502 @@ -435,6 +441,7 @@
8503         /* What a hideous hack! */
8504  
8505         char local_name[48];
8506 +       spin_unlock_irq(&io_request_lock);
8507  
8508         MTS_DEBUG_GOT_HERE();
8509  
8510 @@ -445,6 +452,7 @@
8511  
8512         if (!sht->proc_name) {
8513                 MTS_ERROR( "unable to allocate memory for proc interface!!\n" );
8514 +               spin_lock_irq(&io_request_lock);
8515                 return 0;
8516         }
8517  
8518 @@ -457,11 +465,12 @@
8519         if (desc->host == NULL) {
8520                 MTS_ERROR("Cannot register due to low memory");
8521                 kfree(sht->proc_name);
8522 +               spin_lock_irq(&io_request_lock);
8523                 return 0;
8524         }
8525         desc->host->hostdata[0] = (unsigned long)desc;
8526  /* FIXME: what if sizeof(void*) != sizeof(unsigned long)? */
8527 -
8528 +       spin_lock_irq(&io_request_lock);
8529         return 1;
8530  }
8531  
8532 diff -Nur linux-2.4.19.org/drivers/usb/ov511.c linux-2.4.19/drivers/usb/ov511.c
8533 --- linux-2.4.19.org/drivers/usb/ov511.c        Sat Aug  3 02:39:45 2002
8534 +++ linux-2.4.19/drivers/usb/ov511.c    Thu Oct 31 08:11:23 2002
8535 @@ -9,7 +9,8 @@
8536   * OV7620 fixes by Charl P. Botha <cpbotha@ieee.org>
8537   * Changes by Claudio Matsuoka <claudio@conectiva.com>
8538   * Original SAA7111A code by Dave Perks <dperks@ibm.net>
8539 - * Kernel I2C interface adapted from nt1003 driver
8540 + * URB error messages from pwc driver by Nemosoft
8541 + * generic_ioctl() code from videodev.c by Gerd Knorr and Alan Cox
8542   *
8543   * Based on the Linux CPiA driver written by Peter Pregler,
8544   * Scott J. Bertin and Johannes Erdfelt.
8545 @@ -57,19 +58,22 @@
8546  /*
8547   * Version Information
8548   */
8549 -#define DRIVER_VERSION "v1.50 for Linux 2.4"
8550 -#define EMAIL "mmcclell@bigfoot.com"
8551 +#define DRIVER_VERSION "v1.61 for Linux 2.4"
8552 +#define EMAIL "mark@alpha.dyndns.org"
8553  #define DRIVER_AUTHOR "Mark McClelland <mmcclell@bigfoot.com> & Bret Wallach \
8554         & Orion Sky Lawlor <olawlor@acm.org> & Kevin Moore & Charl P. Botha \
8555         <cpbotha@ieee.org> & Claudio Matsuoka <claudio@conectiva.com>"
8556 -#define DRIVER_DESC "OV511 USB Camera Driver"
8557 +#define DRIVER_DESC "ov511 USB Camera Driver"
8558  
8559  #define OV511_I2C_RETRIES 3
8560  #define ENABLE_Y_QUANTABLE 1
8561  #define ENABLE_UV_QUANTABLE 1
8562  
8563 +#define OV511_MAX_UNIT_VIDEO 16
8564 +
8565  /* Pixel count * 3 bytes for RGB */
8566  #define MAX_FRAME_SIZE(w, h) ((w) * (h) * 3)
8567 +
8568  #define MAX_DATA_SIZE(w, h) (MAX_FRAME_SIZE(w, h) + sizeof(struct timeval))
8569  
8570  /* Max size * bytes per YUV420 pixel (1.5) + one extra isoc frame for safety */
8571 @@ -77,128 +81,47 @@
8572  
8573  #define FATAL_ERROR(rc) ((rc) < 0 && (rc) != -EPERM)
8574  
8575 -/* PARAMETER VARIABLES: */
8576 -/* (See ov511.txt for detailed descriptions of these.) */
8577 -
8578 -/* Sensor automatically changes brightness */
8579 -static int autobright = 1;
8580 -
8581 -/* Sensor automatically changes gain */
8582 -static int autogain = 1;
8583 -
8584 -/* Sensor automatically changes exposure */
8585 -static int autoexp = 1;
8586 -
8587 -/* 0=no debug messages
8588 - * 1=init/detection/unload and other significant messages,
8589 - * 2=some warning messages
8590 - * 3=config/control function calls
8591 - * 4=most function calls and data parsing messages
8592 - * 5=highly repetitive mesgs
8593 - * NOTE: This should be changed to 0, 1, or 2 for production kernels
8594 - */
8595 -static int debug; /* = 0 */
8596 -
8597 -/* Fix vertical misalignment of red and blue at 640x480 */
8598 -static int fix_rgb_offset; /* = 0 */
8599 -
8600 -/* Snapshot mode enabled flag */
8601 -static int snapshot; /* = 0 */
8602 -
8603 -/* Force image to be read in RGB instead of BGR. This option allow
8604 - * programs that expect RGB data (e.g. gqcam) to work with this driver. */
8605 -static int force_rgb; /* = 0 */
8606 -
8607 -/* Number of seconds before inactive buffers are deallocated */
8608 -static int buf_timeout = 5;
8609 -
8610 -/* Number of cameras to stream from simultaneously */
8611 -static int cams = 1;
8612 -
8613 -/* Enable compression. Needs a fast (>300 MHz) CPU. */
8614 -static int compress; /* = 0 */
8615 -
8616 -/* Display test pattern - doesn't work yet either */
8617 -static int testpat; /* = 0 */
8618 -
8619 -/* Setting this to 1 will make the sensor output GBR422 instead of YUV420. Only
8620 - * affects RGB24 mode. */
8621 -static int sensor_gbr; /* = 0 */
8622 -
8623 -/* Dump raw pixel data. */
8624 -static int dumppix; /* = 0 */
8625 -
8626 -/* LED policy. Only works on some OV511+ cameras. 0=off, 1=on (default), 2=auto
8627 - * (on when open) */
8628 -static int led = 1;
8629 -
8630 -/* Set this to 1 to dump the bridge register contents after initialization */
8631 -static int dump_bridge; /* = 0 */
8632 -
8633 -/* Set this to 1 to dump the sensor register contents after initialization */
8634 -static int dump_sensor; /* = 0 */
8635 -
8636 -/* Temporary option for debugging "works, but no image" problem. Prints the
8637 - * first 12 bytes of data (potentially a packet header) in each isochronous
8638 - * data frame. */
8639 -static int printph; /* = 0 */
8640 -
8641 -/* Compression parameters - I'm not exactly sure what these do yet */
8642 -static int phy = 0x1f;
8643 -static int phuv = 0x05;
8644 -static int pvy = 0x06;
8645 -static int pvuv = 0x06;
8646 -static int qhy = 0x14;
8647 -static int qhuv = 0x03;
8648 -static int qvy = 0x04;
8649 -static int qvuv = 0x04;
8650 -
8651 -/* Light frequency. Set to 50 or 60 (Hz), or zero for default settings */
8652 -static int lightfreq; /* = 0 */
8653 -
8654 -/* Set this to 1 to enable banding filter by default. Compensates for
8655 - * alternating horizontal light/dark bands caused by (usually fluorescent)
8656 - * lights */
8657 -static int bandingfilter; /* = 0 */
8658 -
8659 -/* Pixel clock divisor */
8660 -static int clockdiv = -1;
8661 -
8662 -/* Isoc packet size */
8663 -static int packetsize = -1;
8664 -
8665 -/* Frame drop register (16h) */
8666 -static int framedrop = -1;
8667 -
8668 -/* Allows picture settings (brightness, hue, etc...) to take effect immediately,
8669 - * even in the middle of a frame. This reduces the time to change settings, but
8670 - * can ruin frames during the change. Only affects OmniVision sensors. */
8671 -static int fastset; /* = 0 */
8672 -
8673 -/* Forces the palette to a specific value. If an application requests a
8674 - * different palette, it will be rejected. */
8675 -static int force_palette; /* = 0 */
8676 -
8677 -/* Set tuner type, if not autodetected */
8678 -static int tuner = -1;
8679 -
8680 -/* Allows proper exposure of objects that are illuminated from behind. Only
8681 - * affects OmniVision sensors. */
8682 -static int backlight; /* = 0 */
8683 -
8684 -/* If you change this, you must also change the MODULE_PARM definition */
8685 -#define OV511_MAX_UNIT_VIDEO 16
8686 +/**********************************************************************
8687 + * Module Parameters
8688 + * (See ov511.txt for detailed descriptions of these)
8689 + **********************************************************************/
8690  
8691 -/* Allows specified minor numbers to be forced. They will be assigned in the
8692 - * order that devices are detected. Note that you cannot specify 0 as a minor
8693 - * number. If you do not specify any, the next available one will be used. This
8694 - * requires kernel 2.4.5 or later. */
8695 +/* These variables (and all static globals) default to zero */
8696 +static int autobright          = 1;
8697 +static int autogain            = 1;
8698 +static int autoexp             = 1;
8699 +static int debug;
8700 +static int snapshot;
8701 +static int fix_rgb_offset;
8702 +static int force_rgb;
8703 +static int cams                        = 1;
8704 +static int compress;
8705 +static int testpat;
8706 +static int sensor_gbr;
8707 +static int dumppix;
8708 +static int led                         = 1;
8709 +static int dump_bridge;
8710 +static int dump_sensor;
8711 +static int printph;
8712 +static int phy                 = 0x1f;
8713 +static int phuv                        = 0x05;
8714 +static int pvy                 = 0x06;
8715 +static int pvuv                        = 0x06;
8716 +static int qhy                 = 0x14;
8717 +static int qhuv                        = 0x03;
8718 +static int qvy                 = 0x04;
8719 +static int qvuv                        = 0x04;
8720 +static int lightfreq;
8721 +static int bandingfilter;
8722 +static int clockdiv            = -1;
8723 +static int packetsize          = -1;
8724 +static int framedrop           = -1;
8725 +static int fastset;
8726 +static int force_palette;
8727 +static int backlight;
8728  static int unit_video[OV511_MAX_UNIT_VIDEO];
8729 -
8730 -/* Remove zero-padding from uncompressed incoming data. This will compensate for
8731 - * the blocks of corruption that appear when the camera cannot keep up with the
8732 - * speed of the USB bus (eg. at low frame resolutions) */
8733 -static int remove_zeros; /* = 0 */
8734 +static int remove_zeros;
8735 +static int mirror;
8736  
8737  MODULE_PARM(autobright, "i");
8738  MODULE_PARM_DESC(autobright, "Sensor automatically changes brightness");
8739 @@ -209,15 +132,13 @@
8740  MODULE_PARM(debug, "i");
8741  MODULE_PARM_DESC(debug,
8742    "Debug level: 0=none, 1=inits, 2=warning, 3=config, 4=functions, 5=max");
8743 +MODULE_PARM(snapshot, "i");
8744 +MODULE_PARM_DESC(snapshot, "Enable snapshot mode");
8745  MODULE_PARM(fix_rgb_offset, "i");
8746  MODULE_PARM_DESC(fix_rgb_offset,
8747    "Fix vertical misalignment of red and blue at 640x480");
8748 -MODULE_PARM(snapshot, "i");
8749 -MODULE_PARM_DESC(snapshot, "Enable snapshot mode");
8750  MODULE_PARM(force_rgb, "i");
8751  MODULE_PARM_DESC(force_rgb, "Read RGB instead of BGR");
8752 -MODULE_PARM(buf_timeout, "i");
8753 -MODULE_PARM_DESC(buf_timeout, "Number of seconds before buffer deallocation");
8754  MODULE_PARM(cams, "i");
8755  MODULE_PARM_DESC(cams, "Number of simultaneous cameras");
8756  MODULE_PARM(compress, "i");
8757 @@ -225,11 +146,6 @@
8758  MODULE_PARM(testpat, "i");
8759  MODULE_PARM_DESC(testpat,
8760    "Replace image with vertical bar testpattern (only partially working)");
8761 -
8762 -// Temporarily removed (needs to be rewritten for new format conversion code)
8763 -// MODULE_PARM(sensor_gbr, "i");
8764 -// MODULE_PARM_DESC(sensor_gbr, "Make sensor output GBR422 rather than YUV420");
8765 -
8766  MODULE_PARM(dumppix, "i");
8767  MODULE_PARM_DESC(dumppix, "Dump raw pixel data");
8768  MODULE_PARM(led, "i");
8769 @@ -273,21 +189,25 @@
8770  MODULE_PARM_DESC(fastset, "Allows picture settings to take effect immediately");
8771  MODULE_PARM(force_palette, "i");
8772  MODULE_PARM_DESC(force_palette, "Force the palette to a specific value");
8773 -MODULE_PARM(tuner, "i");
8774 -MODULE_PARM_DESC(tuner, "Set tuner type, if not autodetected");
8775  MODULE_PARM(backlight, "i");
8776  MODULE_PARM_DESC(backlight, "For objects that are lit from behind");
8777 -MODULE_PARM(unit_video, "0-16i");
8778 +MODULE_PARM(unit_video, "1-" __MODULE_STRING(OV511_MAX_UNIT_VIDEO) "i");
8779  MODULE_PARM_DESC(unit_video,
8780    "Force use of specific minor number(s). 0 is not allowed.");
8781  MODULE_PARM(remove_zeros, "i");
8782  MODULE_PARM_DESC(remove_zeros,
8783    "Remove zero-padding from uncompressed incoming data");
8784 +MODULE_PARM(mirror, "i");
8785 +MODULE_PARM_DESC(mirror, "Reverse image horizontally");
8786  
8787  MODULE_AUTHOR(DRIVER_AUTHOR);
8788  MODULE_DESCRIPTION(DRIVER_DESC);
8789  MODULE_LICENSE("GPL");
8790  
8791 +/**********************************************************************
8792 + * Miscellaneous Globals
8793 + **********************************************************************/
8794 +
8795  static struct usb_driver ov511_driver;
8796  
8797  static struct ov51x_decomp_ops *ov511_decomp_ops;
8798 @@ -302,20 +222,28 @@
8799  /* MMX support is present in kernel and CPU. Checked upon decomp module load. */
8800  static int ov51x_mmx_available;
8801  
8802 -/* Function prototypes */
8803 -static void ov51x_clear_snapshot(struct usb_ov511 *);
8804 -static int ov51x_check_snapshot(struct usb_ov511 *);
8805 -static inline int sensor_get_picture(struct usb_ov511 *, 
8806 -                                    struct video_picture *);
8807 -static int sensor_get_exposure(struct usb_ov511 *, unsigned char *);
8808 -static int ov51x_control_ioctl(struct inode *, struct file *, unsigned int,
8809 -                              unsigned long);
8810 +static __devinitdata struct usb_device_id device_table [] = {
8811 +       { USB_DEVICE(VEND_OMNIVISION, PROD_OV511) },
8812 +       { USB_DEVICE(VEND_OMNIVISION, PROD_OV511PLUS) },
8813 +       { USB_DEVICE(VEND_OMNIVISION, PROD_OV518) },
8814 +       { USB_DEVICE(VEND_OMNIVISION, PROD_OV518PLUS) },
8815 +       { USB_DEVICE(VEND_MATTEL, PROD_ME2CAM) },
8816 +       { }  /* Terminating entry */
8817 +};
8818 +
8819 +MODULE_DEVICE_TABLE (usb, device_table);
8820 +
8821 +static unsigned char yQuanTable511[] = OV511_YQUANTABLE;
8822 +static unsigned char uvQuanTable511[] = OV511_UVQUANTABLE;
8823 +static unsigned char yQuanTable518[] = OV518_YQUANTABLE;
8824 +static unsigned char uvQuanTable518[] = OV518_UVQUANTABLE;
8825  
8826  /**********************************************************************
8827 - * List of known OV511-based cameras
8828 + * Symbolic Names
8829   **********************************************************************/
8830  
8831 -static struct cam_list clist[] = {
8832 +/* Known OV511-based cameras */
8833 +static struct symbolic_list camlist[] = {
8834         {   0, "Generic Camera (no ID)" },
8835         {   1, "Mustek WCam 3X" },
8836         {   3, "D-Link DSB-C300" },
8837 @@ -323,11 +251,13 @@
8838         {   5, "Puretek PT-6007" },
8839         {   6, "Lifeview USB Life TV (NTSC)" },
8840         {  21, "Creative Labs WebCam 3" },
8841 +       {  22, "Lifeview USB Life TV (PAL D/K+B/G)" },
8842         {  36, "Koala-Cam" },
8843 -       {  38, "Lifeview USB Life TV" },
8844 +       {  38, "Lifeview USB Life TV (PAL)" },
8845         {  41, "Samsung Anycam MPC-M10" },
8846         {  43, "Mtekvision Zeca MV402" },
8847         {  46, "Suma eON" },
8848 +       {  70, "Lifeview USB Life TV (PAL/SECAM)" },
8849         { 100, "Lifeview RoboCam" },
8850         { 102, "AverMedia InterCam Elite" },
8851         { 112, "MediaForte MV300" },    /* or OV7110 evaluation kit */
8852 @@ -335,97 +265,90 @@
8853         {  -1, NULL }
8854  };
8855  
8856 -static __devinitdata struct usb_device_id device_table [] = {
8857 -       { USB_DEVICE(VEND_OMNIVISION, PROD_OV511) },
8858 -       { USB_DEVICE(VEND_OMNIVISION, PROD_OV511PLUS) },
8859 -       { USB_DEVICE(VEND_OMNIVISION, PROD_OV518) },
8860 -       { USB_DEVICE(VEND_OMNIVISION, PROD_OV518PLUS) },
8861 -       { USB_DEVICE(VEND_MATTEL, PROD_ME2CAM) },
8862 -       { }  /* Terminating entry */
8863 -};
8864 -
8865 -MODULE_DEVICE_TABLE (usb, device_table);
8866 -
8867 -#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
8868 -static struct palette_list plist[] = {
8869 +/* Video4Linux1 Palettes */
8870 +static struct symbolic_list v4l1_plist[] = {
8871         { VIDEO_PALETTE_GREY,   "GREY" },
8872 -       { VIDEO_PALETTE_HI240,  "HI240" },
8873 -       { VIDEO_PALETTE_RGB565, "RGB565" },
8874 +       { VIDEO_PALETTE_HI240,  "HI240" },
8875 +       { VIDEO_PALETTE_RGB565, "RGB565" },
8876         { VIDEO_PALETTE_RGB24,  "RGB24" },
8877         { VIDEO_PALETTE_RGB32,  "RGB32" },
8878 -       { VIDEO_PALETTE_RGB555, "RGB555" },
8879 -       { VIDEO_PALETTE_YUV422, "YUV422" },
8880 -       { VIDEO_PALETTE_YUYV,   "YUYV" },
8881 -       { VIDEO_PALETTE_UYVY,   "UYVY" },
8882 -       { VIDEO_PALETTE_YUV420, "YUV420" },
8883 -       { VIDEO_PALETTE_YUV411, "YUV411" },
8884 -       { VIDEO_PALETTE_RAW,    "RAW" },
8885 +       { VIDEO_PALETTE_RGB555, "RGB555" },
8886 +       { VIDEO_PALETTE_YUV422, "YUV422" },
8887 +       { VIDEO_PALETTE_YUYV,   "YUYV" },
8888 +       { VIDEO_PALETTE_UYVY,   "UYVY" },
8889 +       { VIDEO_PALETTE_YUV420, "YUV420" },
8890 +       { VIDEO_PALETTE_YUV411, "YUV411" },
8891 +       { VIDEO_PALETTE_RAW,    "RAW" },
8892         { VIDEO_PALETTE_YUV422P,"YUV422P" },
8893         { VIDEO_PALETTE_YUV411P,"YUV411P" },
8894         { VIDEO_PALETTE_YUV420P,"YUV420P" },
8895         { VIDEO_PALETTE_YUV410P,"YUV410P" },
8896         { -1, NULL }
8897  };
8898 -#endif
8899  
8900 -static unsigned char yQuanTable511[] = OV511_YQUANTABLE;
8901 -static unsigned char uvQuanTable511[] = OV511_UVQUANTABLE;
8902 -static unsigned char yQuanTable518[] = OV518_YQUANTABLE;
8903 -static unsigned char uvQuanTable518[] = OV518_UVQUANTABLE;
8904 +static struct symbolic_list brglist[] = {
8905 +       { BRG_OV511,            "OV511" },
8906 +       { BRG_OV511PLUS,        "OV511+" },
8907 +       { BRG_OV518,            "OV518" },
8908 +       { BRG_OV518PLUS,        "OV518+" },
8909 +       { -1, NULL }
8910 +};
8911 +
8912 +static struct symbolic_list senlist[] = {
8913 +       { SEN_OV76BE,   "OV76BE" },
8914 +       { SEN_OV7610,   "OV7610" },
8915 +       { SEN_OV7620,   "OV7620" },
8916 +       { SEN_OV7620AE, "OV7620AE" },
8917 +       { SEN_OV6620,   "OV6620" },
8918 +       { SEN_OV6630,   "OV6630" },
8919 +       { SEN_OV6630AE, "OV6630AE" },
8920 +       { SEN_OV6630AF, "OV6630AF" },
8921 +       { SEN_OV8600,   "OV8600" },
8922 +       { SEN_KS0127,   "KS0127" },
8923 +       { SEN_KS0127B,  "KS0127B" },
8924 +       { SEN_SAA7111A, "SAA7111A" },
8925 +       { -1, NULL }
8926 +};
8927 +
8928 +/* URB error codes: */
8929 +static struct symbolic_list urb_errlist[] = {
8930 +       { -ENOSR,       "Buffer error (overrun)" },
8931 +       { -EPIPE,       "Stalled (device not responding)" },
8932 +       { -EOVERFLOW,   "Babble (bad cable?)" },
8933 +       { -EPROTO,      "Bit-stuff error (bad cable?)" },
8934 +       { -EILSEQ,      "CRC/Timeout" },
8935 +       { -ETIMEDOUT,   "NAK (device does not respond)" },
8936 +       { -1, NULL }
8937 +};
8938  
8939  /**********************************************************************
8940 - *
8941 - * Memory management
8942 - *
8943 - * This is a shameless copy from the USB-cpia driver (linux kernel
8944 - * version 2.3.29 or so, I have no idea what this code actually does ;).
8945 - * Actually it seems to be a copy of a shameless copy of the bttv-driver.
8946 - * Or that is a copy of a shameless copy of ... (To the powers: is there
8947 - * no generic kernel-function to do this sort of stuff?)
8948 - *
8949 - * Yes, it was a shameless copy from the bttv-driver. IIRC, Alan says
8950 - * there will be one, but apparentely not yet -jerdfelt
8951 - *
8952 - * So I copied it again for the OV511 driver -claudio
8953 + * Prototypes
8954   **********************************************************************/
8955  
8956 -/* Given PGD from the address space's page table, return the kernel
8957 - * virtual mapping of the physical memory mapped at ADR.
8958 - */
8959 -static inline unsigned long 
8960 -uvirt_to_kva(pgd_t *pgd, unsigned long adr)
8961 -{
8962 -       unsigned long ret = 0UL;
8963 -       pmd_t *pmd;
8964 -       pte_t *ptep, pte;
8965 -
8966 -       if (!pgd_none(*pgd)) {
8967 -               pmd = pmd_offset(pgd, adr);
8968 -               if (!pmd_none(*pmd)) {
8969 -                       ptep = pte_offset(pmd, adr);
8970 -                       pte = *ptep;
8971 -                       if (pte_present(pte)) {
8972 -                               ret = (unsigned long) 
8973 -                                     page_address(pte_page(pte));
8974 -                               ret |= (adr & (PAGE_SIZE - 1));
8975 -                       }
8976 -               }
8977 -       }
8978 +static void ov51x_clear_snapshot(struct usb_ov511 *);
8979 +static inline int sensor_get_picture(struct usb_ov511 *,
8980 +                                    struct video_picture *);
8981 +#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
8982 +static int sensor_get_exposure(struct usb_ov511 *, unsigned char *);
8983 +static int ov51x_control_ioctl(struct inode *, struct file *, unsigned int,
8984 +                              unsigned long);
8985 +static int ov51x_check_snapshot(struct usb_ov511 *);
8986 +#endif
8987  
8988 -       return ret;
8989 -}
8990 +/**********************************************************************
8991 + * Memory management
8992 + **********************************************************************/
8993  
8994  /* Here we want the physical address of the memory.
8995 - * This is used when initializing the contents of the
8996 - * area and marking the pages as reserved.
8997 + * This is used when initializing the contents of the area.
8998   */
8999 -static inline unsigned long 
9000 +static inline unsigned long
9001  kvirt_to_pa(unsigned long adr)
9002  {
9003 -       unsigned long va, kva, ret;
9004 +       unsigned long kva, ret;
9005  
9006 -       va = VMALLOC_VMADDR(adr);
9007 -       kva = uvirt_to_kva(pgd_offset_k(va), va);
9008 +       kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
9009 +       kva |= adr & (PAGE_SIZE-1); /* restore the offset */
9010         ret = __pa(kva);
9011         return ret;
9012  }
9013 @@ -434,12 +357,9 @@
9014  rvmalloc(unsigned long size)
9015  {
9016         void *mem;
9017 -       unsigned long adr, page;
9018 -
9019 -       /* Round it off to PAGE_SIZE */
9020 -       size += (PAGE_SIZE - 1);
9021 -       size &= ~(PAGE_SIZE - 1);
9022 +       unsigned long adr;
9023  
9024 +       size = PAGE_ALIGN(size);
9025         mem = vmalloc_32(size);
9026         if (!mem)
9027                 return NULL;
9028 @@ -447,38 +367,27 @@
9029         memset(mem, 0, size); /* Clear the ram out, no junk to the user */
9030         adr = (unsigned long) mem;
9031         while (size > 0) {
9032 -               page = kvirt_to_pa(adr);
9033 -               mem_map_reserve(virt_to_page(__va(page)));
9034 +               mem_map_reserve(vmalloc_to_page((void *)adr));
9035                 adr += PAGE_SIZE;
9036 -               if (size > PAGE_SIZE)
9037 -                       size -= PAGE_SIZE;
9038 -               else
9039 -                       size = 0;
9040 +               size -= PAGE_SIZE;
9041         }
9042  
9043         return mem;
9044  }
9045  
9046 -static void 
9047 +static void
9048  rvfree(void *mem, unsigned long size)
9049  {
9050 -       unsigned long adr, page;
9051 +       unsigned long adr;
9052  
9053         if (!mem)
9054                 return;
9055  
9056 -       size += (PAGE_SIZE - 1);
9057 -       size &= ~(PAGE_SIZE - 1);
9058 -
9059 -       adr=(unsigned long) mem;
9060 -       while (size > 0) {
9061 -               page = kvirt_to_pa(adr);
9062 -               mem_map_unreserve(virt_to_page(__va(page)));
9063 +       adr = (unsigned long) mem;
9064 +       while ((long) size > 0) {
9065 +               mem_map_unreserve(vmalloc_to_page((void *)adr));
9066                 adr += PAGE_SIZE;
9067 -               if (size > PAGE_SIZE)
9068 -                       size -= PAGE_SIZE;
9069 -               else
9070 -                       size = 0;
9071 +               size -= PAGE_SIZE;
9072         }
9073         vfree(mem);
9074  }
9075 @@ -500,12 +409,12 @@
9076  #define YES_NO(x) ((x) ? "yes" : "no")
9077  
9078  /* /proc/video/ov511/<minor#>/info */
9079 -static int 
9080 +static int
9081  ov511_read_proc_info(char *page, char **start, off_t off, int count, int *eof,
9082                      void *data)
9083  {
9084         char *out = page;
9085 -       int i, j, len;
9086 +       int i, len;
9087         struct usb_ov511 *ov = data;
9088         struct video_picture p;
9089         unsigned char exp;
9090 @@ -521,8 +430,7 @@
9091  
9092         out += sprintf(out, "driver_version  : %s\n", DRIVER_VERSION);
9093         out += sprintf(out, "custom_id       : %d\n", ov->customid);
9094 -       out += sprintf(out, "model           : %s\n", ov->desc ?
9095 -                      clist[ov->desc].description : "unknown");
9096 +       out += sprintf(out, "model           : %s\n", ov->desc);
9097         out += sprintf(out, "streaming       : %s\n", YES_NO(ov->streaming));
9098         out += sprintf(out, "grabbing        : %s\n", YES_NO(ov->grabbing));
9099         out += sprintf(out, "compress        : %s\n", YES_NO(ov->compress));
9100 @@ -543,36 +451,16 @@
9101                                ov->frame[i].depth);
9102                 out += sprintf(out, "  size          : %d %d\n",
9103                                ov->frame[i].width, ov->frame[i].height);
9104 -               out += sprintf(out, "  format        : ");
9105 -               for (j = 0; plist[j].num >= 0; j++) {
9106 -                       if (plist[j].num == ov->frame[i].format) {
9107 -                               out += sprintf(out, "%s\n", plist[j].name);
9108 -                               break;
9109 -                       }
9110 -               }
9111 -               if (plist[j].num < 0)
9112 -                       out += sprintf(out, "unknown\n");
9113 +               out += sprintf(out, "  format        : %s\n",
9114 +                              symbolic(v4l1_plist, ov->frame[i].format));
9115                 out += sprintf(out, "  data_buffer   : 0x%p\n",
9116                                ov->frame[i].data);
9117         }
9118         out += sprintf(out, "snap_enabled    : %s\n", YES_NO(ov->snap_enabled));
9119         out += sprintf(out, "bridge          : %s\n",
9120 -                      ov->bridge == BRG_OV511 ? "OV511" :
9121 -                       ov->bridge == BRG_OV511PLUS ? "OV511+" :
9122 -                       ov->bridge == BRG_OV518 ? "OV518" :
9123 -                       ov->bridge == BRG_OV518PLUS ? "OV518+" :
9124 -                       "unknown");
9125 +                      symbolic(brglist, ov->bridge));
9126         out += sprintf(out, "sensor          : %s\n",
9127 -                      ov->sensor == SEN_OV6620 ? "OV6620" :
9128 -                       ov->sensor == SEN_OV6630 ? "OV6630" :
9129 -                       ov->sensor == SEN_OV7610 ? "OV7610" :
9130 -                       ov->sensor == SEN_OV7620 ? "OV7620" :
9131 -                       ov->sensor == SEN_OV7620AE ? "OV7620AE" :
9132 -                       ov->sensor == SEN_OV8600 ? "OV8600" :
9133 -                       ov->sensor == SEN_KS0127 ? "KS0127" :
9134 -                       ov->sensor == SEN_KS0127B ? "KS0127B" :
9135 -                       ov->sensor == SEN_SAA7111A ? "SAA7111A" :
9136 -                       "unknown");
9137 +                      symbolic(senlist, ov->sensor));
9138         out += sprintf(out, "packet_size     : %d\n", ov->packet_size);
9139         out += sprintf(out, "framebuffer     : 0x%p\n", ov->fbuf);
9140  
9141 @@ -595,13 +483,13 @@
9142   * When the camera's button is pressed, the output of this will change from a
9143   * 0 to a 1 (ASCII). It will retain this value until it is read, after which
9144   * it will reset to zero.
9145 - * 
9146 + *
9147   * SECURITY NOTE: Since reading this file can change the state of the snapshot
9148   * status, it is important for applications that open it to keep it locked
9149   * against access by other processes, using flock() or a similar mechanism. No
9150   * locking is provided by this driver.
9151   */
9152 -static int 
9153 +static int
9154  ov511_read_proc_button(char *page, char **start, off_t off, int count, int *eof,
9155                        void *data)
9156  {
9157 @@ -633,97 +521,95 @@
9158         return len;
9159  }
9160  
9161 -static void 
9162 -create_proc_ov511_cam(struct usb_ov511 *ov511)
9163 +static void
9164 +create_proc_ov511_cam(struct usb_ov511 *ov)
9165  {
9166         char dirname[10];
9167  
9168 -       if (!ov511_proc_entry || !ov511)
9169 +       if (!ov511_proc_entry || !ov)
9170                 return;
9171  
9172         /* Create per-device directory */
9173 -       snprintf(dirname, 10, "%d", ov511->vdev.minor);
9174 +       snprintf(dirname, 10, "%d", ov->vdev.minor);
9175         PDEBUG(4, "creating /proc/video/ov511/%s/", dirname);
9176 -       ov511->proc_devdir = create_proc_entry(dirname, S_IFDIR,
9177 -               ov511_proc_entry);
9178 -       if (!ov511->proc_devdir)
9179 +       ov->proc_devdir = create_proc_entry(dirname, S_IFDIR, ov511_proc_entry);
9180 +       if (!ov->proc_devdir)
9181                 return;
9182 -       ov511->proc_devdir->owner = THIS_MODULE;
9183 +       ov->proc_devdir->owner = THIS_MODULE;
9184  
9185         /* Create "info" entry (human readable device information) */
9186         PDEBUG(4, "creating /proc/video/ov511/%s/info", dirname);
9187 -       ov511->proc_info = create_proc_read_entry("info",
9188 -               S_IFREG|S_IRUGO|S_IWUSR, ov511->proc_devdir,
9189 -               ov511_read_proc_info, ov511);
9190 -       if (!ov511->proc_info)
9191 +       ov->proc_info = create_proc_read_entry("info", S_IFREG|S_IRUGO|S_IWUSR,
9192 +               ov->proc_devdir, ov511_read_proc_info, ov);
9193 +       if (!ov->proc_info)
9194                 return;
9195 -       ov511->proc_info->owner = THIS_MODULE;
9196 +       ov->proc_info->owner = THIS_MODULE;
9197  
9198         /* Don't create it if old snapshot mode on (would cause race cond.) */
9199         if (!snapshot) {
9200                 /* Create "button" entry (snapshot button status) */
9201                 PDEBUG(4, "creating /proc/video/ov511/%s/button", dirname);
9202 -               ov511->proc_button = create_proc_read_entry("button",
9203 -                       S_IFREG|S_IRUGO|S_IWUSR, ov511->proc_devdir,
9204 -                       ov511_read_proc_button, ov511);
9205 -               if (!ov511->proc_button)
9206 +               ov->proc_button = create_proc_read_entry("button",
9207 +                       S_IFREG|S_IRUGO|S_IWUSR, ov->proc_devdir,
9208 +                       ov511_read_proc_button, ov);
9209 +               if (!ov->proc_button)
9210                         return;
9211         }
9212 -       ov511->proc_button->owner = THIS_MODULE;
9213 +       ov->proc_button->owner = THIS_MODULE;
9214  
9215         /* Create "control" entry (ioctl() interface) */
9216         PDEBUG(4, "creating /proc/video/ov511/%s/control", dirname);
9217         lock_kernel();
9218 -       ov511->proc_control = create_proc_entry("control",
9219 -               S_IFREG|S_IRUGO|S_IWUSR, ov511->proc_devdir);
9220 -       if (!ov511->proc_control) {
9221 +       ov->proc_control = create_proc_entry("control", S_IFREG|S_IRUGO|S_IWUSR,
9222 +               ov->proc_devdir);
9223 +       if (!ov->proc_control) {
9224                 unlock_kernel();
9225                 return;
9226         }
9227 -       ov511->proc_control->owner = THIS_MODULE;
9228 -       ov511->proc_control->data = ov511;
9229 -       ov511->proc_control->proc_fops = &ov511_control_fops;
9230 +       ov->proc_control->owner = THIS_MODULE;
9231 +       ov->proc_control->data = ov;
9232 +       ov->proc_control->proc_fops = &ov511_control_fops;
9233         unlock_kernel();
9234  }
9235  
9236 -static void 
9237 -destroy_proc_ov511_cam(struct usb_ov511 *ov511)
9238 +static void
9239 +destroy_proc_ov511_cam(struct usb_ov511 *ov)
9240  {
9241         char dirname[10];
9242 -       
9243 -       if (!ov511 || !ov511->proc_devdir)
9244 +
9245 +       if (!ov || !ov->proc_devdir)
9246                 return;
9247  
9248 -       snprintf(dirname, 10, "%d", ov511->vdev.minor);
9249 +       snprintf(dirname, 10, "%d", ov->vdev.minor);
9250  
9251         /* Destroy "control" entry */
9252 -       if (ov511->proc_control) {
9253 +       if (ov->proc_control) {
9254                 PDEBUG(4, "destroying /proc/video/ov511/%s/control", dirname);
9255 -               remove_proc_entry("control", ov511->proc_devdir);
9256 -               ov511->proc_control = NULL;
9257 +               remove_proc_entry("control", ov->proc_devdir);
9258 +               ov->proc_control = NULL;
9259         }
9260  
9261         /* Destroy "button" entry */
9262 -       if (ov511->proc_button) {
9263 +       if (ov->proc_button) {
9264                 PDEBUG(4, "destroying /proc/video/ov511/%s/button", dirname);
9265 -               remove_proc_entry("button", ov511->proc_devdir);
9266 -               ov511->proc_button = NULL;
9267 +               remove_proc_entry("button", ov->proc_devdir);
9268 +               ov->proc_button = NULL;
9269         }
9270  
9271         /* Destroy "info" entry */
9272 -       if (ov511->proc_info) {
9273 +       if (ov->proc_info) {
9274                 PDEBUG(4, "destroying /proc/video/ov511/%s/info", dirname);
9275 -               remove_proc_entry("info", ov511->proc_devdir);
9276 -               ov511->proc_info = NULL;
9277 +               remove_proc_entry("info", ov->proc_devdir);
9278 +               ov->proc_info = NULL;
9279         }
9280  
9281         /* Destroy per-device directory */
9282         PDEBUG(4, "destroying /proc/video/ov511/%s/", dirname);
9283         remove_proc_entry(dirname, ov511_proc_entry);
9284 -       ov511->proc_devdir = NULL;
9285 +       ov->proc_devdir = NULL;
9286  }
9287  
9288 -static void 
9289 +static void
9290  proc_ov511_create(void)
9291  {
9292         /* No current standard here. Alan prefers /proc/video/ as it keeps
9293 @@ -744,7 +630,7 @@
9294                 err("Unable to create /proc/video/ov511");
9295  }
9296  
9297 -static void 
9298 +static void
9299  proc_ov511_destroy(void)
9300  {
9301         PDEBUG(3, "removing /proc/video/ov511");
9302 @@ -763,7 +649,7 @@
9303   **********************************************************************/
9304  
9305  /* Write an OV51x register */
9306 -static int 
9307 +static int
9308  reg_w(struct usb_ov511 *ov, unsigned char reg, unsigned char value)
9309  {
9310         int rc;
9311 @@ -774,20 +660,20 @@
9312         ov->cbuf[0] = value;
9313         rc = usb_control_msg(ov->dev,
9314                              usb_sndctrlpipe(ov->dev, 0),
9315 -                            2 /* REG_IO */,
9316 -                            USB_TYPE_CLASS | USB_RECIP_DEVICE,
9317 -                            0, (__u16)reg, &ov->cbuf[0], 1, HZ);       
9318 +                            (ov->bclass == BCL_OV518)?1:2 /* REG_IO */,
9319 +                            USB_TYPE_VENDOR | USB_RECIP_DEVICE,
9320 +                            0, (__u16)reg, &ov->cbuf[0], 1, HZ);
9321         up(&ov->cbuf_lock);
9322  
9323         if (rc < 0)
9324 -               err("reg write: error %d", rc);
9325 +               err("reg write: error %d: %s", rc, symbolic(urb_errlist, rc));
9326  
9327         return rc;
9328  }
9329  
9330  /* Read from an OV51x register */
9331  /* returns: negative is error, pos or zero is data */
9332 -static int 
9333 +static int
9334  reg_r(struct usb_ov511 *ov, unsigned char reg)
9335  {
9336         int rc;
9337 @@ -795,16 +681,16 @@
9338         down(&ov->cbuf_lock);
9339         rc = usb_control_msg(ov->dev,
9340                              usb_rcvctrlpipe(ov->dev, 0),
9341 -                            2 /* REG_IO */,
9342 -                            USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_DEVICE,
9343 +                            (ov->bclass == BCL_OV518)?1:3 /* REG_IO */,
9344 +                            USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
9345                              0, (__u16)reg, &ov->cbuf[0], 1, HZ);
9346 -                               
9347 -       PDEBUG(5, "0x%02X:0x%02X", reg, ov->cbuf[0]);
9348 -       
9349 -       if (rc < 0)
9350 -               err("reg read: error %d", rc);
9351 -       else
9352 -               rc = ov->cbuf[0];       
9353 +
9354 +       if (rc < 0) {
9355 +               err("reg read: error %d: %s", rc, symbolic(urb_errlist, rc));
9356 +       } else {
9357 +               rc = ov->cbuf[0];
9358 +               PDEBUG(5, "0x%02X:0x%02X", reg, ov->cbuf[0]);
9359 +       }
9360  
9361         up(&ov->cbuf_lock);
9362  
9363 @@ -814,10 +700,10 @@
9364  /*
9365   * Writes bits at positions specified by mask to an OV51x reg. Bits that are in
9366   * the same position as 1's in "mask" are cleared and set to "value". Bits
9367 - * that are in the same position as 0's in "mask" are preserved, regardless 
9368 + * that are in the same position as 0's in "mask" are preserved, regardless
9369   * of their respective state in "value".
9370   */
9371 -static int 
9372 +static int
9373  reg_w_mask(struct usb_ov511 *ov,
9374            unsigned char reg,
9375            unsigned char value,
9376 @@ -842,7 +728,7 @@
9377   * Writes multiple (n) byte value to a single register. Only valid with certain
9378   * registers (0x30 and 0xc4 - 0xce).
9379   */
9380 -static int 
9381 +static int
9382  ov518_reg_w32(struct usb_ov511 *ov, unsigned char reg, u32 val, int n)
9383  {
9384         int rc;
9385 @@ -855,18 +741,19 @@
9386  
9387         rc = usb_control_msg(ov->dev,
9388                              usb_sndctrlpipe(ov->dev, 0),
9389 -                            2 /* REG_IO */,
9390 -                            USB_TYPE_CLASS | USB_RECIP_DEVICE,
9391 +                            1 /* REG_IO */,
9392 +                            USB_TYPE_VENDOR | USB_RECIP_DEVICE,
9393                              0, (__u16)reg, ov->cbuf, n, HZ);
9394         up(&ov->cbuf_lock);
9395  
9396         if (rc < 0)
9397 -               err("reg write multiple: error %d", rc);
9398 +               err("reg write multiple: error %d: %s", rc,
9399 +                   symbolic(urb_errlist, rc));
9400  
9401         return rc;
9402  }
9403  
9404 -static int 
9405 +static int
9406  ov511_upload_quan_tables(struct usb_ov511 *ov)
9407  {
9408         unsigned char *pYTable = yQuanTable511;
9409 @@ -876,10 +763,8 @@
9410  
9411         PDEBUG(4, "Uploading quantization tables");
9412  
9413 -       for (i = 0; i < OV511_QUANTABLESIZE / 2; i++)
9414 -       {
9415 -               if (ENABLE_Y_QUANTABLE)
9416 -               {
9417 +       for (i = 0; i < OV511_QUANTABLESIZE / 2; i++) {
9418 +               if (ENABLE_Y_QUANTABLE) {
9419                         val0 = *pYTable++;
9420                         val1 = *pYTable++;
9421                         val0 &= 0x0f;
9422 @@ -890,8 +775,7 @@
9423                                 return rc;
9424                 }
9425  
9426 -               if (ENABLE_UV_QUANTABLE)
9427 -               {
9428 +               if (ENABLE_UV_QUANTABLE) {
9429                         val0 = *pUVTable++;
9430                         val1 = *pUVTable++;
9431                         val0 &= 0x0f;
9432 @@ -909,7 +793,7 @@
9433  }
9434  
9435  /* OV518 quantization tables are 8x4 (instead of 8x8) */
9436 -static int 
9437 +static int
9438  ov518_upload_quan_tables(struct usb_ov511 *ov)
9439  {
9440         unsigned char *pYTable = yQuanTable518;
9441 @@ -919,10 +803,8 @@
9442  
9443         PDEBUG(4, "Uploading quantization tables");
9444  
9445 -       for (i = 0; i < OV518_QUANTABLESIZE / 2; i++)
9446 -       {
9447 -               if (ENABLE_Y_QUANTABLE)
9448 -               {
9449 +       for (i = 0; i < OV518_QUANTABLESIZE / 2; i++) {
9450 +               if (ENABLE_Y_QUANTABLE) {
9451                         val0 = *pYTable++;
9452                         val1 = *pYTable++;
9453                         val0 &= 0x0f;
9454 @@ -933,8 +815,7 @@
9455                                 return rc;
9456                 }
9457  
9458 -               if (ENABLE_UV_QUANTABLE)
9459 -               {
9460 +               if (ENABLE_UV_QUANTABLE) {
9461                         val0 = *pUVTable++;
9462                         val1 = *pUVTable++;
9463                         val0 &= 0x0f;
9464 @@ -951,16 +832,16 @@
9465         return 0;
9466  }
9467  
9468 -static int 
9469 +static int
9470  ov51x_reset(struct usb_ov511 *ov, unsigned char reset_type)
9471  {
9472         int rc;
9473 -               
9474 +
9475         /* Setting bit 0 not allowed on 518/518Plus */
9476         if (ov->bclass == BCL_OV518)
9477                 reset_type &= 0xfe;
9478  
9479 -       PDEBUG(4, "Reset: type=0x%X", reset_type);
9480 +       PDEBUG(4, "Reset: type=0x%02X", reset_type);
9481  
9482         rc = reg_w(ov, R51x_SYS_RESET, reset_type);
9483         rc = reg_w(ov, R51x_SYS_RESET, 0);
9484 @@ -973,7 +854,7 @@
9485  
9486  /**********************************************************************
9487   *
9488 - * I2C (sensor) I/O
9489 + * Low-level I2C I/O functions
9490   *
9491   **********************************************************************/
9492  
9493 @@ -982,7 +863,7 @@
9494   * This is normally only called from i2c_w(). Note that this function
9495   * always succeeds regardless of whether the sensor is present and working.
9496   */
9497 -static int 
9498 +static int
9499  ov518_i2c_write_internal(struct usb_ov511 *ov,
9500                          unsigned char reg,
9501                          unsigned char value)
9502 @@ -993,25 +874,21 @@
9503  
9504         /* Select camera register */
9505         rc = reg_w(ov, R51x_I2C_SADDR_3, reg);
9506 -       if (rc < 0) goto error;
9507 +       if (rc < 0) return rc;
9508  
9509         /* Write "value" to I2C data port of OV511 */
9510         rc = reg_w(ov, R51x_I2C_DATA, value);
9511 -       if (rc < 0) goto error;
9512 +       if (rc < 0) return rc;
9513  
9514         /* Initiate 3-byte write cycle */
9515         rc = reg_w(ov, R518_I2C_CTL, 0x01);
9516 -       if (rc < 0) goto error;
9517 +       if (rc < 0) return rc;
9518  
9519         return 0;
9520 -
9521 -error:
9522 -       err("ov518 i2c write: error %d", rc);
9523 -       return rc;
9524  }
9525  
9526  /* NOTE: Do not call this function directly! */
9527 -static int 
9528 +static int
9529  ov511_i2c_write_internal(struct usb_ov511 *ov,
9530                          unsigned char reg,
9531                          unsigned char value)
9532 @@ -1024,38 +901,33 @@
9533         for (retries = OV511_I2C_RETRIES; ; ) {
9534                 /* Select camera register */
9535                 rc = reg_w(ov, R51x_I2C_SADDR_3, reg);
9536 -               if (rc < 0) goto error;
9537 +               if (rc < 0) return rc;
9538  
9539                 /* Write "value" to I2C data port of OV511 */
9540 -               rc = reg_w(ov, R51x_I2C_DATA, value);   
9541 -               if (rc < 0) goto error;
9542 +               rc = reg_w(ov, R51x_I2C_DATA, value);
9543 +               if (rc < 0) return rc;
9544  
9545                 /* Initiate 3-byte write cycle */
9546                 rc = reg_w(ov, R511_I2C_CTL, 0x01);
9547 -               if (rc < 0) goto error;
9548 +               if (rc < 0) return rc;
9549  
9550                 do rc = reg_r(ov, R511_I2C_CTL);
9551                 while (rc > 0 && ((rc&1) == 0)); /* Retry until idle */
9552 -               if (rc < 0) goto error;
9553 +               if (rc < 0) return rc;
9554  
9555                 if ((rc&2) == 0) /* Ack? */
9556                         break;
9557  #if 0
9558 -               /* I2C abort */ 
9559 +               /* I2C abort */
9560                 reg_w(ov, R511_I2C_CTL, 0x10);
9561  #endif
9562                 if (--retries < 0) {
9563                         err("i2c write retries exhausted");
9564 -                       rc = -1;
9565 -                       goto error;
9566 +                       return -1;
9567                 }
9568         }
9569  
9570         return 0;
9571 -
9572 -error:
9573 -       err("i2c write: error %d", rc);
9574 -       return rc;
9575  }
9576  
9577  /* NOTE: Do not call this function directly!
9578 @@ -1063,37 +935,33 @@
9579   * This is normally only called from i2c_r(). Note that this function
9580   * always succeeds regardless of whether the sensor is present and working.
9581   */
9582 -static int 
9583 +static int
9584  ov518_i2c_read_internal(struct usb_ov511 *ov, unsigned char reg)
9585  {
9586         int rc, value;
9587  
9588         /* Select camera register */
9589         rc = reg_w(ov, R51x_I2C_SADDR_2, reg);
9590 -       if (rc < 0) goto error;
9591 +       if (rc < 0) return rc;
9592  
9593         /* Initiate 2-byte write cycle */
9594         rc = reg_w(ov, R518_I2C_CTL, 0x03);
9595 -       if (rc < 0) goto error;
9596 +       if (rc < 0) return rc;
9597  
9598         /* Initiate 2-byte read cycle */
9599         rc = reg_w(ov, R518_I2C_CTL, 0x05);
9600 -       if (rc < 0) goto error;
9601 +       if (rc < 0) return rc;
9602  
9603         value = reg_r(ov, R51x_I2C_DATA);
9604  
9605         PDEBUG(5, "0x%02X:0x%02X", reg, value);
9606  
9607         return value;
9608 -
9609 -error:
9610 -       err("ov518 i2c read: error %d", rc);
9611 -       return rc;
9612  }
9613  
9614  /* NOTE: Do not call this function directly!
9615   * returns: negative is error, pos or zero is data */
9616 -static int 
9617 +static int
9618  ov511_i2c_read_internal(struct usb_ov511 *ov, unsigned char reg)
9619  {
9620         int rc, value, retries;
9621 @@ -1102,26 +970,25 @@
9622         for (retries = OV511_I2C_RETRIES; ; ) {
9623                 /* Select camera register */
9624                 rc = reg_w(ov, R51x_I2C_SADDR_2, reg);
9625 -               if (rc < 0) goto error;
9626 +               if (rc < 0) return rc;
9627  
9628                 /* Initiate 2-byte write cycle */
9629                 rc = reg_w(ov, R511_I2C_CTL, 0x03);
9630 -               if (rc < 0) goto error;
9631 +               if (rc < 0) return rc;
9632  
9633                 do rc = reg_r(ov, R511_I2C_CTL);
9634                 while (rc > 0 && ((rc&1) == 0)); /* Retry until idle */
9635 -               if (rc < 0) goto error;
9636 +               if (rc < 0) return rc;
9637  
9638                 if ((rc&2) == 0) /* Ack? */
9639                         break;
9640  
9641 -               /* I2C abort */ 
9642 +               /* I2C abort */
9643                 reg_w(ov, R511_I2C_CTL, 0x10);
9644  
9645                 if (--retries < 0) {
9646                         err("i2c write retries exhausted");
9647 -                       rc = -1;
9648 -                       goto error;
9649 +                       return -1;
9650                 }
9651         }
9652  
9653 @@ -1129,44 +996,39 @@
9654         for (retries = OV511_I2C_RETRIES; ; ) {
9655                 /* Initiate 2-byte read cycle */
9656                 rc = reg_w(ov, R511_I2C_CTL, 0x05);
9657 -               if (rc < 0) goto error;
9658 +               if (rc < 0) return rc;
9659  
9660                 do rc = reg_r(ov, R511_I2C_CTL);
9661                 while (rc > 0 && ((rc&1) == 0)); /* Retry until idle */
9662 -               if (rc < 0) goto error;
9663 +               if (rc < 0) return rc;
9664  
9665                 if ((rc&2) == 0) /* Ack? */
9666                         break;
9667  
9668 -               /* I2C abort */ 
9669 +               /* I2C abort */
9670                 rc = reg_w(ov, R511_I2C_CTL, 0x10);
9671 -               if (rc < 0) goto error;
9672 +               if (rc < 0) return rc;
9673  
9674                 if (--retries < 0) {
9675                         err("i2c read retries exhausted");
9676 -                       rc = -1;
9677 -                       goto error;
9678 +                       return -1;
9679                 }
9680         }
9681  
9682         value = reg_r(ov, R51x_I2C_DATA);
9683  
9684         PDEBUG(5, "0x%02X:0x%02X", reg, value);
9685 -               
9686 +
9687         /* This is needed to make i2c_w() work */
9688         rc = reg_w(ov, R511_I2C_CTL, 0x05);
9689         if (rc < 0)
9690 -               goto error;
9691 -       
9692 -       return value;
9693 +               return rc;
9694  
9695 -error:
9696 -       err("i2c read: error %d", rc);
9697 -       return rc;
9698 +       return value;
9699  }
9700  
9701  /* returns: negative is error, pos or zero is data */
9702 -static int 
9703 +static int
9704  i2c_r(struct usb_ov511 *ov, unsigned char reg)
9705  {
9706         int rc;
9707 @@ -1183,7 +1045,7 @@
9708         return rc;
9709  }
9710  
9711 -static int 
9712 +static int
9713  i2c_w(struct usb_ov511 *ov, unsigned char reg, unsigned char value)
9714  {
9715         int rc;
9716 @@ -1201,7 +1063,7 @@
9717  }
9718  
9719  /* Do not call this function directly! */
9720 -static int 
9721 +static int
9722  ov51x_i2c_write_mask_internal(struct usb_ov511 *ov,
9723                               unsigned char reg,
9724                               unsigned char value,
9725 @@ -1234,10 +1096,10 @@
9726  
9727  /* Writes bits at positions specified by mask to an I2C reg. Bits that are in
9728   * the same position as 1's in "mask" are cleared and set to "value". Bits
9729 - * that are in the same position as 0's in "mask" are preserved, regardless 
9730 + * that are in the same position as 0's in "mask" are preserved, regardless
9731   * of their respective state in "value".
9732   */
9733 -static int 
9734 +static int
9735  i2c_w_mask(struct usb_ov511 *ov,
9736            unsigned char reg,
9737            unsigned char value,
9738 @@ -1252,8 +1114,29 @@
9739         return rc;
9740  }
9741  
9742 +/* Set the read and write slave IDs. The "slave" argument is the write slave,
9743 + * and the read slave will be set to (slave + 1). ov->i2c_lock should be held
9744 + * when calling this. This should not be called from outside the i2c I/O
9745 + * functions.
9746 + */
9747 +static inline int
9748 +i2c_set_slave_internal(struct usb_ov511 *ov, unsigned char slave)
9749 +{
9750 +       int rc;
9751 +
9752 +       rc = reg_w(ov, R51x_I2C_W_SID, slave);
9753 +       if (rc < 0) return rc;
9754 +
9755 +       rc = reg_w(ov, R51x_I2C_R_SID, slave + 1);
9756 +       if (rc < 0) return rc;
9757 +
9758 +       return 0;
9759 +}
9760 +
9761 +#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
9762 +
9763  /* Write to a specific I2C slave ID and register, using the specified mask */
9764 -static int 
9765 +static int
9766  i2c_w_slave(struct usb_ov511 *ov,
9767             unsigned char slave,
9768             unsigned char reg,
9769 @@ -1265,38 +1148,22 @@
9770         down(&ov->i2c_lock);
9771  
9772         /* Set new slave IDs */
9773 -       if (reg_w(ov, R51x_I2C_W_SID, slave) < 0) {
9774 -               rc = -EIO;
9775 -               goto out;
9776 -       }
9777 -
9778 -       if (reg_w(ov, R51x_I2C_R_SID, slave + 1) < 0) {
9779 -               rc = -EIO;
9780 -               goto out;
9781 -       }
9782 +       rc = i2c_set_slave_internal(ov, slave);
9783 +       if (rc < 0) goto out;
9784  
9785         rc = ov51x_i2c_write_mask_internal(ov, reg, value, mask);
9786 -       /* Don't bail out yet if error; IDs must be restored */
9787  
9788 +out:
9789         /* Restore primary IDs */
9790 -       slave = ov->primary_i2c_slave;
9791 -       if (reg_w(ov, R51x_I2C_W_SID, slave) < 0) {
9792 -               rc = -EIO;
9793 -               goto out;
9794 -       }
9795 -
9796 -       if (reg_w(ov, R51x_I2C_R_SID, slave + 1) < 0) {
9797 -               rc = -EIO;
9798 -               goto out;
9799 -       }
9800 +       if (i2c_set_slave_internal(ov, ov->primary_i2c_slave) < 0)
9801 +               err("Couldn't restore primary I2C slave");
9802  
9803 -out:
9804         up(&ov->i2c_lock);
9805         return rc;
9806  }
9807  
9808  /* Read from a specific I2C slave ID and register */
9809 -static int 
9810 +static int
9811  i2c_r_slave(struct usb_ov511 *ov,
9812             unsigned char slave,
9813             unsigned char reg)
9814 @@ -1306,60 +1173,46 @@
9815         down(&ov->i2c_lock);
9816  
9817         /* Set new slave IDs */
9818 -       if (reg_w(ov, R51x_I2C_W_SID, slave) < 0) {
9819 -               rc = -EIO;
9820 -               goto out;
9821 -       }
9822 -
9823 -       if (reg_w(ov, R51x_I2C_R_SID, slave + 1) < 0) {
9824 -               rc = -EIO;
9825 -               goto out;
9826 -       }
9827 +       rc = i2c_set_slave_internal(ov, slave);
9828 +       if (rc < 0) goto out;
9829  
9830         if (ov->bclass == BCL_OV518)
9831                 rc = ov518_i2c_read_internal(ov, reg);
9832         else
9833                 rc = ov511_i2c_read_internal(ov, reg);
9834 -       /* Don't bail out yet if error; IDs must be restored */
9835  
9836 +out:
9837         /* Restore primary IDs */
9838 -       slave = ov->primary_i2c_slave;
9839 -       if (reg_w(ov, R51x_I2C_W_SID, slave) < 0) {
9840 -               rc = -EIO;
9841 -               goto out;
9842 -       }
9843 -
9844 -       if (reg_w(ov, R51x_I2C_R_SID, slave + 1) < 0) {
9845 -               rc = -EIO;
9846 -               goto out;
9847 -       }
9848 +       if (i2c_set_slave_internal(ov, ov->primary_i2c_slave) < 0)
9849 +               err("Couldn't restore primary I2C slave");
9850  
9851 -out:
9852         up(&ov->i2c_lock);
9853         return rc;
9854  }
9855  
9856 +#endif /* defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS) */
9857 +
9858  /* Sets I2C read and write slave IDs. Returns <0 for error */
9859 -static int 
9860 +static int
9861  ov51x_set_slave_ids(struct usb_ov511 *ov, unsigned char sid)
9862  {
9863 +       int rc;
9864 +
9865         down(&ov->i2c_lock);
9866  
9867 -       if (reg_w(ov, R51x_I2C_W_SID, sid) < 0)
9868 -               return -EIO;
9869 +       rc = i2c_set_slave_internal(ov, sid);
9870 +       if (rc < 0) goto out;
9871  
9872 -       if (reg_w(ov, R51x_I2C_R_SID, sid + 1) < 0)
9873 -               return -EIO;
9874 -
9875 -       if (ov51x_reset(ov, OV511_RESET_NOREGS) < 0)
9876 -               return -EIO;
9877 +       // FIXME: Is this actually necessary?
9878 +       rc = ov51x_reset(ov, OV511_RESET_NOREGS);
9879 +       if (rc < 0) goto out;
9880  
9881 +out:
9882         up(&ov->i2c_lock);
9883 -
9884 -       return 0;
9885 +       return rc;
9886  }
9887  
9888 -static int 
9889 +static int
9890  write_regvals(struct usb_ov511 *ov, struct ov511_regvals * pRegvals)
9891  {
9892         int rc;
9893 @@ -1367,26 +1220,21 @@
9894         while (pRegvals->bus != OV511_DONE_BUS) {
9895                 if (pRegvals->bus == OV511_REG_BUS) {
9896                         if ((rc = reg_w(ov, pRegvals->reg, pRegvals->val)) < 0)
9897 -                               goto error;
9898 +                               return rc;
9899                 } else if (pRegvals->bus == OV511_I2C_BUS) {
9900                         if ((rc = i2c_w(ov, pRegvals->reg, pRegvals->val)) < 0)
9901 -                               goto error;
9902 +                               return rc;
9903                 } else {
9904                         err("Bad regval array");
9905 -                       rc = -1;
9906 -                       goto error;
9907 +                       return -1;
9908                 }
9909                 pRegvals++;
9910         }
9911         return 0;
9912 -
9913 -error:
9914 -       err("write regvals: error %d", rc);
9915 -       return rc;
9916  }
9917  
9918 -#ifdef OV511_DEBUG 
9919 -static void 
9920 +#ifdef OV511_DEBUG
9921 +static void
9922  dump_i2c_range(struct usb_ov511 *ov, int reg1, int regn)
9923  {
9924         int i;
9925 @@ -1394,18 +1242,18 @@
9926  
9927         for (i = reg1; i <= regn; i++) {
9928                 rc = i2c_r(ov, i);
9929 -               info("OV7610[0x%X] = 0x%X", i, rc);
9930 +               info("Sensor[0x%02X] = 0x%02X", i, rc);
9931         }
9932  }
9933  
9934 -static void 
9935 +static void
9936  dump_i2c_regs(struct usb_ov511 *ov)
9937  {
9938         info("I2C REGS");
9939         dump_i2c_range(ov, 0x00, 0x7C);
9940  }
9941  
9942 -static void 
9943 +static void
9944  dump_reg_range(struct usb_ov511 *ov, int reg1, int regn)
9945  {
9946         int i;
9947 @@ -1413,12 +1261,12 @@
9948  
9949         for (i = reg1; i <= regn; i++) {
9950                 rc = reg_r(ov, i);
9951 -               info("OV511[0x%X] = 0x%X", i, rc);
9952 +               info("OV511[0x%02X] = 0x%02X", i, rc);
9953         }
9954  }
9955  
9956  /* FIXME: Should there be an OV518 version of this? */
9957 -static void 
9958 +static void
9959  ov511_dump_regs(struct usb_ov511 *ov)
9960  {
9961         info("CAMERA INTERFACE REGS");
9962 @@ -1445,43 +1293,29 @@
9963  }
9964  #endif
9965  
9966 -/**********************************************************************
9967 - *
9968 - * Kernel I2C Interface
9969 - *
9970 - **********************************************************************/
9971 -
9972 -/* For as-yet unimplemented I2C interface */
9973 -static void 
9974 -call_i2c_clients(struct usb_ov511 *ov, unsigned int cmd,
9975 -                void *arg)
9976 -{
9977 -       /* Do nothing */
9978 -}
9979 -
9980  /*****************************************************************************/
9981  
9982  /* Temporarily stops OV511 from functioning. Must do this before changing
9983   * registers while the camera is streaming */
9984 -static inline int 
9985 +static inline int
9986  ov51x_stop(struct usb_ov511 *ov)
9987  {
9988         PDEBUG(4, "stopping");
9989 -       ov->stopped = 1;        
9990 +       ov->stopped = 1;
9991         if (ov->bclass == BCL_OV518)
9992 -               return (reg_w(ov, R51x_SYS_RESET, 0x3a));
9993 +               return (reg_w_mask(ov, R51x_SYS_RESET, 0x3a, 0x3a));
9994         else
9995                 return (reg_w(ov, R51x_SYS_RESET, 0x3d));
9996  }
9997  
9998  /* Restarts OV511 after ov511_stop() is called. Has no effect if it is not
9999   * actually stopped (for performance). */
10000 -static inline int 
10001 +static inline int
10002  ov51x_restart(struct usb_ov511 *ov)
10003  {
10004         if (ov->stopped) {
10005                 PDEBUG(4, "restarting");
10006 -               ov->stopped = 0;        
10007 +               ov->stopped = 0;
10008  
10009                 /* Reinitialize the stream */
10010                 if (ov->bclass == BCL_OV518)
10011 @@ -1494,7 +1328,7 @@
10012  }
10013  
10014  /* Resets the hardware snapshot button */
10015 -static void 
10016 +static void
10017  ov51x_clear_snapshot(struct usb_ov511 *ov)
10018  {
10019         if (ov->bclass == BCL_OV511) {
10020 @@ -1506,12 +1340,12 @@
10021         } else {
10022                 err("clear snap: invalid bridge type");
10023         }
10024 -       
10025  }
10026  
10027 +#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
10028  /* Checks the status of the snapshot button. Returns 1 if it was pressed since
10029   * it was last cleared, and zero in all other cases (including errors) */
10030 -static int 
10031 +static int
10032  ov51x_check_snapshot(struct usb_ov511 *ov)
10033  {
10034         int ret, status = 0;
10035 @@ -1531,19 +1365,20 @@
10036  
10037         return status;
10038  }
10039 +#endif
10040  
10041  /* This does an initial reset of an OmniVision sensor and ensures that I2C
10042   * is synchronized. Returns <0 for failure.
10043   */
10044 -static int 
10045 +static int
10046  init_ov_sensor(struct usb_ov511 *ov)
10047  {
10048         int i, success;
10049  
10050 -       /* Reset the sensor */ 
10051 +       /* Reset the sensor */
10052         if (i2c_w(ov, 0x12, 0x80) < 0) return -EIO;
10053  
10054 -       /* Wait for it to initialize */ 
10055 +       /* Wait for it to initialize */
10056         schedule_timeout (1 + 150 * HZ / 1000);
10057  
10058         for (i = 0, success = 0; i < i2c_detect_tries && !success; i++) {
10059 @@ -1553,9 +1388,9 @@
10060                         continue;
10061                 }
10062  
10063 -               /* Reset the sensor */ 
10064 +               /* Reset the sensor */
10065                 if (i2c_w(ov, 0x12, 0x80) < 0) return -EIO;
10066 -               /* Wait for it to initialize */ 
10067 +               /* Wait for it to initialize */
10068                 schedule_timeout(1 + 150 * HZ / 1000);
10069                 /* Dummy read to sync I2C */
10070                 if (i2c_r(ov, 0x00) < 0) return -EIO;
10071 @@ -1563,14 +1398,14 @@
10072  
10073         if (!success)
10074                 return -EIO;
10075 -       
10076 +
10077         PDEBUG(1, "I2C synced in %d attempt(s)", i);
10078  
10079         return 0;
10080  }
10081  
10082 -static int 
10083 -ov51x_set_packet_size(struct usb_ov511 *ov, int size)
10084 +static int
10085 +ov511_set_packet_size(struct usb_ov511 *ov, int size)
10086  {
10087         int alt, mult;
10088  
10089 @@ -1602,7 +1437,44 @@
10090                         err("Set packet size: invalid size (%d)", size);
10091                         return -EINVAL;
10092                 }
10093 -       } else if (ov->bclass == BCL_OV518) {
10094 +       } else {
10095 +               err("Set packet size: Invalid bridge type");
10096 +               return -EINVAL;
10097 +       }
10098 +
10099 +       PDEBUG(3, "%d, mult=%d, alt=%d", size, mult, alt);
10100 +
10101 +       if (reg_w(ov, R51x_FIFO_PSIZE, mult) < 0)
10102 +               return -EIO;
10103 +
10104 +       if (usb_set_interface(ov->dev, ov->iface, alt) < 0) {
10105 +               err("Set packet size: set interface error");
10106 +               return -EBUSY;
10107 +       }
10108 +
10109 +       if (ov51x_reset(ov, OV511_RESET_NOREGS) < 0)
10110 +               return -EIO;
10111 +
10112 +       ov->packet_size = size;
10113 +
10114 +       if (ov51x_restart(ov) < 0)
10115 +               return -EIO;
10116 +
10117 +       return 0;
10118 +}
10119 +
10120 +/* Note: Unlike the OV511/OV511+, the size argument does NOT include the
10121 + * optional packet number byte. The actual size *is* stored in ov->packet_size,
10122 + * though. */
10123 +static int
10124 +ov518_set_packet_size(struct usb_ov511 *ov, int size)
10125 +{
10126 +       int alt;
10127 +
10128 +       if (ov51x_stop(ov) < 0)
10129 +               return -EIO;
10130 +
10131 +       if (ov->bclass == BCL_OV518) {
10132                 if (size == 0) alt = OV518_ALT_SIZE_0;
10133                 else if (size == 128) alt = OV518_ALT_SIZE_128;
10134                 else if (size == 256) alt = OV518_ALT_SIZE_256;
10135 @@ -1620,35 +1492,32 @@
10136                 return -EINVAL;
10137         }
10138  
10139 -       PDEBUG(3, "set packet size: %d, mult=%d, alt=%d", size, mult, alt);
10140 +       PDEBUG(3, "%d, alt=%d", size, alt);
10141  
10142 -       // FIXME: Don't know how to do this on OV518 yet
10143 -       if (ov->bclass == BCL_OV511) {
10144 -               if (reg_w(ov, R51x_FIFO_PSIZE,
10145 -                                   mult) < 0) {
10146 -                       return -EIO;
10147 -               }
10148 +       ov->packet_size = size;
10149 +       if (size > 0) {
10150 +               /* Program ISO FIFO size reg (packet number isn't included) */
10151 +               ov518_reg_w32(ov, 0x30, size, 2);
10152 +
10153 +               if (ov->packet_numbering)
10154 +                       ++ov->packet_size;
10155         }
10156 -       
10157 +
10158         if (usb_set_interface(ov->dev, ov->iface, alt) < 0) {
10159                 err("Set packet size: set interface error");
10160                 return -EBUSY;
10161         }
10162  
10163         /* Initialize the stream */
10164 -       if (ov->bclass == BCL_OV518)
10165 -               if (reg_w(ov, 0x2f, 0x80) < 0)
10166 -                       return -EIO;
10167 -
10168 -       // FIXME - Should we only reset the FIFO?
10169 -       if (ov51x_reset(ov, OV511_RESET_NOREGS) < 0)
10170 +       if (reg_w(ov, 0x2f, 0x80) < 0)
10171                 return -EIO;
10172  
10173 -       ov->packet_size = size;
10174 -
10175         if (ov51x_restart(ov) < 0)
10176                 return -EIO;
10177  
10178 +       if (ov51x_reset(ov, OV511_RESET_NOREGS) < 0)
10179 +               return -EIO;
10180 +
10181         return 0;
10182  }
10183  
10184 @@ -1659,7 +1528,6 @@
10185         int rc = 0;
10186  
10187         if (!ov->compress_inited) {
10188 -
10189                 reg_w(ov, 0x70, phy);
10190                 reg_w(ov, 0x71, phuv);
10191                 reg_w(ov, 0x72, pvy);
10192 @@ -1677,7 +1545,7 @@
10193         }
10194  
10195         ov->compress_inited = 1;
10196 -out:   
10197 +out:
10198         return rc;
10199  }
10200  
10201 @@ -1688,7 +1556,6 @@
10202         int rc = 0;
10203  
10204         if (!ov->compress_inited) {
10205 -
10206                 if (ov518_upload_quan_tables(ov) < 0) {
10207                         err("Error uploading quantization tables");
10208                         rc = -EIO;
10209 @@ -1697,7 +1564,7 @@
10210         }
10211  
10212         ov->compress_inited = 1;
10213 -out:   
10214 +out:
10215         return rc;
10216  }
10217  
10218 @@ -1718,13 +1585,19 @@
10219         switch (ov->sensor) {
10220         case SEN_OV7610:
10221         case SEN_OV6620:
10222 -       case SEN_OV6630:
10223         {
10224                 rc = i2c_w(ov, OV7610_REG_CNT, val >> 8);
10225                 if (rc < 0)
10226                         goto out;
10227                 break;
10228         }
10229 +       case SEN_OV6630:
10230 +       {
10231 +               rc = i2c_w_mask(ov, OV7610_REG_CNT, val >> 12, 0x0f);
10232 +               if (rc < 0)
10233 +                       goto out;
10234 +               break;
10235 +       }
10236         case SEN_OV7620:
10237         {
10238                 unsigned char ctab[] = {
10239 @@ -1771,13 +1644,19 @@
10240         switch (ov->sensor) {
10241         case SEN_OV7610:
10242         case SEN_OV6620:
10243 -       case SEN_OV6630:
10244                 rc = i2c_r(ov, OV7610_REG_CNT);
10245                 if (rc < 0)
10246                         return rc;
10247                 else
10248                         *val = rc << 8;
10249                 break;
10250 +       case SEN_OV6630:
10251 +               rc = i2c_r(ov, OV7610_REG_CNT);
10252 +               if (rc < 0)
10253 +                       return rc;
10254 +               else
10255 +                       *val = rc << 12;
10256 +               break;
10257         case SEN_OV7620:
10258                 /* Use Y gamma reg instead. Bit 0 is the enable bit. */
10259                 rc = i2c_r(ov, 0x64);
10260 @@ -1816,7 +1695,7 @@
10261  
10262         switch (ov->sensor) {
10263         case SEN_OV7610:
10264 -       case SEN_OV7620AE:
10265 +       case SEN_OV76BE:
10266         case SEN_OV6620:
10267         case SEN_OV6630:
10268                 rc = i2c_w(ov, OV7610_REG_BRT, val >> 8);
10269 @@ -1859,7 +1738,7 @@
10270  
10271         switch (ov->sensor) {
10272         case SEN_OV7610:
10273 -       case SEN_OV7620AE:
10274 +       case SEN_OV76BE:
10275         case SEN_OV7620:
10276         case SEN_OV6620:
10277         case SEN_OV6630:
10278 @@ -1899,7 +1778,7 @@
10279  
10280         switch (ov->sensor) {
10281         case SEN_OV7610:
10282 -       case SEN_OV7620AE:
10283 +       case SEN_OV76BE:
10284         case SEN_OV6620:
10285         case SEN_OV6630:
10286                 rc = i2c_w(ov, OV7610_REG_SAT, val >> 8);
10287 @@ -1943,7 +1822,7 @@
10288  
10289         switch (ov->sensor) {
10290         case SEN_OV7610:
10291 -       case SEN_OV7620AE:
10292 +       case SEN_OV76BE:
10293         case SEN_OV6620:
10294         case SEN_OV6630:
10295                 rc = i2c_r(ov, OV7610_REG_SAT);
10296 @@ -2142,6 +2021,7 @@
10297         return 0;
10298  }
10299  
10300 +#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
10301  // FIXME: Exposure range is only 0x00-0x7f in interlace mode
10302  /* Sets current exposure for sensor. This only has an effect if auto-exposure
10303   * is off */
10304 @@ -2161,7 +2041,7 @@
10305         case SEN_OV6630:
10306         case SEN_OV7610:
10307         case SEN_OV7620:
10308 -       case SEN_OV7620AE:
10309 +       case SEN_OV76BE:
10310         case SEN_OV8600:
10311                 rc = i2c_w(ov, 0x10, val);
10312                 if (rc < 0)
10313 @@ -2199,7 +2079,7 @@
10314         case SEN_OV6620:
10315         case SEN_OV6630:
10316         case SEN_OV7620:
10317 -       case SEN_OV7620AE:
10318 +       case SEN_OV76BE:
10319         case SEN_OV8600:
10320                 rc = i2c_r(ov, 0x10);
10321                 if (rc < 0)
10322 @@ -2223,9 +2103,10 @@
10323  
10324         return 0;
10325  }
10326 +#endif /* CONFIG_PROC_FS && CONFIG_VIDEO_PROC_FS */
10327  
10328  /* Turns on or off the LED. Only has an effect with OV511+/OV518(+) */
10329 -static inline void 
10330 +static inline void
10331  ov51x_led_control(struct usb_ov511 *ov, int enable)
10332  {
10333         PDEBUG(4, " (%s)", enable ? "turn on" : "turn off");
10334 @@ -2243,7 +2124,7 @@
10335   *     50 - 50Hz, for European and Asian lighting
10336   *     60 - 60Hz, for American lighting
10337   *
10338 - * Tested with: OV7610, OV7620, OV7620AE, OV6620
10339 + * Tested with: OV7610, OV7620, OV76BE, OV6620
10340   * Unsupported: KS0127, KS0127B, SAA7111A
10341   * Returns: 0 for success
10342   */
10343 @@ -2271,12 +2152,12 @@
10344                 i2c_w_mask(ov, 0x13, 0x00, 0x10);
10345                 break;
10346         case SEN_OV7620:
10347 -       case SEN_OV7620AE:
10348 +       case SEN_OV76BE:
10349         case SEN_OV8600:
10350                 i2c_w_mask(ov, 0x2a, sixty?0x00:0x80, 0x80);
10351                 i2c_w(ov, 0x2b, sixty?0x00:0xac);
10352                 i2c_w_mask(ov, 0x76, 0x01, 0x01);
10353 -               break;          
10354 +               break;
10355         case SEN_OV6620:
10356         case SEN_OV6630:
10357                 i2c_w(ov, 0x2b, sixty?0xa8:0x28);
10358 @@ -2302,7 +2183,7 @@
10359   * caused by some (usually fluorescent) lighting. The light frequency must be
10360   * set either before or after enabling it with ov51x_set_light_freq().
10361   *
10362 - * Tested with: OV7610, OV7620, OV7620AE, OV6620.
10363 + * Tested with: OV7610, OV7620, OV76BE, OV6620.
10364   * Unsupported: KS0127, KS0127B, SAA7111A
10365   * Returns: 0 for success
10366   */
10367 @@ -2364,7 +2245,7 @@
10368   */
10369  static inline int
10370  sensor_set_auto_exposure(struct usb_ov511 *ov, int enable)
10371 -{      
10372 +{
10373         PDEBUG(4, " (%s)", enable ? "turn on" : "turn off");
10374  
10375         switch (ov->sensor) {
10376 @@ -2373,10 +2254,10 @@
10377                 break;
10378         case SEN_OV6620:
10379         case SEN_OV7620:
10380 -       case SEN_OV7620AE:
10381 +       case SEN_OV76BE:
10382         case SEN_OV8600:
10383                 i2c_w_mask(ov, 0x13, enable?0x01:0x00, 0x01);
10384 -               break;          
10385 +               break;
10386         case SEN_OV6630:
10387                 i2c_w_mask(ov, 0x28, enable?0x00:0x10, 0x10);
10388                 break;
10389 @@ -2399,13 +2280,12 @@
10390   * that are illuminated from behind.
10391   *
10392   * Tested with: OV6620, OV7620
10393 - * Unsupported: OV7610, OV7620AE, KS0127, KS0127B, SAA7111A
10394 + * Unsupported: OV7610, OV76BE, KS0127, KS0127B, SAA7111A
10395   * Returns: 0 for success
10396   */
10397  static int
10398  sensor_set_backlight(struct usb_ov511 *ov, int enable)
10399  {
10400 -
10401         PDEBUG(4, " (%s)", enable ? "turn on" : "turn off");
10402  
10403         switch (ov->sensor) {
10404 @@ -2414,7 +2294,7 @@
10405                 i2c_w_mask(ov, 0x68, enable?0xe0:0xc0, 0xe0);
10406                 i2c_w_mask(ov, 0x29, enable?0x08:0x00, 0x08);
10407                 i2c_w_mask(ov, 0x28, enable?0x02:0x00, 0x02);
10408 -               break;          
10409 +               break;
10410         case SEN_OV6620:
10411                 i2c_w_mask(ov, 0x4e, enable?0xe0:0xc0, 0xe0);
10412                 i2c_w_mask(ov, 0x29, enable?0x08:0x00, 0x08);
10413 @@ -2426,7 +2306,7 @@
10414                 i2c_w_mask(ov, 0x28, enable?0x02:0x00, 0x02);
10415                 break;
10416         case SEN_OV7610:
10417 -       case SEN_OV7620AE:
10418 +       case SEN_OV76BE:
10419         case SEN_KS0127:
10420         case SEN_KS0127B:
10421         case SEN_SAA7111A:
10422 @@ -2442,27 +2322,56 @@
10423         return 0;
10424  }
10425  
10426 +static inline int
10427 +sensor_set_mirror(struct usb_ov511 *ov, int enable)
10428 +{
10429 +       PDEBUG(4, " (%s)", enable ? "turn on" : "turn off");
10430 +
10431 +       switch (ov->sensor) {
10432 +       case SEN_OV6620:
10433 +       case SEN_OV6630:
10434 +       case SEN_OV7610:
10435 +       case SEN_OV7620:
10436 +       case SEN_OV76BE:
10437 +       case SEN_OV8600:
10438 +               i2c_w_mask(ov, 0x12, enable?0x40:0x00, 0x40);
10439 +               break;
10440 +       case SEN_KS0127:
10441 +       case SEN_KS0127B:
10442 +       case SEN_SAA7111A:
10443 +               PDEBUG(5, "Unsupported with this sensor");
10444 +               return -EPERM;
10445 +       default:
10446 +               err("Sensor not supported for set_mirror");
10447 +               return -EINVAL;
10448 +       }
10449 +
10450 +       ov->mirror = enable;
10451 +
10452 +       return 0;
10453 +}
10454 +
10455  /* Returns number of bits per pixel (regardless of where they are located;
10456   * planar or not), or zero for unsupported format.
10457   */
10458 -static inline int 
10459 +static inline int
10460  get_depth(int palette)
10461  {
10462         switch (palette) {
10463         case VIDEO_PALETTE_GREY:    return 8;
10464 +       case VIDEO_PALETTE_YUV420:  return 12;
10465 +       case VIDEO_PALETTE_YUV420P: return 12; /* Planar */
10466         case VIDEO_PALETTE_RGB565:  return 16;
10467 -       case VIDEO_PALETTE_RGB24:   return 24;  
10468 +       case VIDEO_PALETTE_RGB24:   return 24;
10469         case VIDEO_PALETTE_YUV422:  return 16;
10470         case VIDEO_PALETTE_YUYV:    return 16;
10471 -       case VIDEO_PALETTE_YUV420:  return 12;
10472         case VIDEO_PALETTE_YUV422P: return 16; /* Planar */
10473 -       case VIDEO_PALETTE_YUV420P: return 12; /* Planar */
10474         default:                    return 0;  /* Invalid format */
10475         }
10476  }
10477  
10478  /* Bytes per frame. Used by read(). Return of 0 indicates error */
10479 -static inline long int 
10480 +static inline long int
10481  get_frame_length(struct ov511_frame *frame)
10482  {
10483         if (!frame)
10484 @@ -2502,7 +2411,7 @@
10485                 i2c_w_mask(ov, 0x67, qvga?0xf0:0x90, 0xf0);
10486                 i2c_w_mask(ov, 0x74, qvga?0x20:0x00, 0x20);
10487                 break;
10488 -       case SEN_OV7620AE:
10489 +       case SEN_OV76BE:
10490  //             i2c_w(ov, 0x2b, 0x00);
10491                 i2c_w(ov, 0x14, qvga?0xa4:0x84);
10492  // FIXME: Enable this once 7620AE uses 7620 initial settings
10493 @@ -2528,13 +2437,13 @@
10494         /******** Palette-specific regs ********/
10495  
10496         if (mode == VIDEO_PALETTE_GREY) {
10497 -               if (ov->sensor == SEN_OV7610 || ov->sensor == SEN_OV7620AE) {
10498 +               if (ov->sensor == SEN_OV7610 || ov->sensor == SEN_OV76BE) {
10499                         /* these aren't valid on the OV6620/OV7620/6630? */
10500                         i2c_w_mask(ov, 0x0e, 0x40, 0x40);
10501                 }
10502                 i2c_w_mask(ov, 0x13, 0x20, 0x20);
10503         } else {
10504 -               if (ov->sensor == SEN_OV7610 || ov->sensor == SEN_OV7620AE) {
10505 +               if (ov->sensor == SEN_OV7610 || ov->sensor == SEN_OV76BE) {
10506                         /* not valid on the OV6620/OV7620/6630? */
10507                         i2c_w_mask(ov, 0x0e, 0x00, 0x40);
10508                 }
10509 @@ -2596,8 +2505,7 @@
10510         if (framedrop >= 0)
10511                 i2c_w(ov, 0x16, framedrop);
10512  
10513 -       /* We only have code to convert GBR -> RGB24 */
10514 -       if ((mode == VIDEO_PALETTE_RGB24) && sensor_gbr)
10515 +       if (sensor_gbr)
10516                 i2c_w_mask(ov, 0x12, 0x08, 0x08);
10517         else
10518                 i2c_w_mask(ov, 0x12, 0x00, 0x08);
10519 @@ -2614,7 +2522,7 @@
10520         // This will go away as soon as ov51x_mode_init_sensor_regs()
10521         // is fully tested.
10522         /* 7620/6620/6630? don't have register 0x35, so play it safe */
10523 -       if (ov->sensor == SEN_OV7610 || ov->sensor == SEN_OV7620AE) {
10524 +       if (ov->sensor == SEN_OV7610 || ov->sensor == SEN_OV76BE) {
10525                 if (width == 640 && height == 480)
10526                         i2c_w(ov, 0x35, 0x9e);
10527                 else
10528 @@ -2636,13 +2544,13 @@
10529          * IF YOU SET IT WRONG, YOU WILL GET ALL ZERO ISOC DATA FROM OV51x!!! */
10530         switch (ov->sensor) {
10531         case SEN_OV7610:
10532 -       case SEN_OV7620AE:
10533 +       case SEN_OV76BE:
10534                 hwsbase = 0x38;
10535                 hwebase = 0x3a;
10536                 vwsbase = vwebase = 0x05;
10537                 break;
10538         case SEN_OV6620:
10539 -       case SEN_OV6630:        // FIXME: Is this right?
10540 +       case SEN_OV6630:
10541                 hwsbase = 0x38;
10542                 hwebase = 0x3a;
10543                 vwsbase = 0x05;
10544 @@ -2659,7 +2567,9 @@
10545         }
10546  
10547         if (ov->sensor == SEN_OV6620 || ov->sensor == SEN_OV6630) {
10548 -               if (width > 176 && height > 144) {  /* CIF */
10549 +               /* Note: OV518(+) does downsample on its own) */
10550 +               if ((width > 176 && height > 144)
10551 +                   || ov->bclass == BCL_OV518) {  /* CIF */
10552                         ret = mode_init_ov_sensor_regs(ov, width, height,
10553                                 mode, sub_flag, 0);
10554                         if (ret < 0)
10555 @@ -2736,7 +2646,7 @@
10556  ov511_mode_init_regs(struct usb_ov511 *ov,
10557                      int width, int height, int mode, int sub_flag)
10558  {
10559 -       int lncnt, pxcnt, rc = 0;
10560 +       int hsegs, vsegs;
10561  
10562         if (sub_flag) {
10563                 width = ov->subw;
10564 @@ -2752,11 +2662,11 @@
10565                 if (width == 320 && height == 240) {
10566                         /* No need to do anything special */
10567                 } else if (width == 640 && height == 480) {
10568 -                       /* Set the OV511 up as 320x480, but keep the V4L
10569 -                        * resolution as 640x480 */
10570 +                       /* Set the OV511 up as 320x480, but keep the
10571 +                        * V4L resolution as 640x480 */
10572                         width = 320;
10573                 } else {
10574 -                       err("SAA7111A only supports 320x240 or 640x480");
10575 +                       err("SAA7111A only allows 320x240 or 640x480");
10576                         return -EINVAL;
10577                 }
10578         }
10579 @@ -2788,11 +2698,11 @@
10580         /* Here I'm assuming that snapshot size == image size.
10581          * I hope that's always true. --claudio
10582          */
10583 -       pxcnt = (width >> 3) - 1;
10584 -       lncnt = (height >> 3) - 1;
10585 +       hsegs = (width >> 3) - 1;
10586 +       vsegs = (height >> 3) - 1;
10587  
10588 -       reg_w(ov, R511_CAM_PXCNT, pxcnt);
10589 -       reg_w(ov, R511_CAM_LNCNT, lncnt);
10590 +       reg_w(ov, R511_CAM_PXCNT, hsegs);
10591 +       reg_w(ov, R511_CAM_LNCNT, vsegs);
10592         reg_w(ov, R511_CAM_PXDIV, 0x00);
10593         reg_w(ov, R511_CAM_LNDIV, 0x00);
10594  
10595 @@ -2800,8 +2710,8 @@
10596         reg_w(ov, R511_CAM_OPTS, 0x03);
10597  
10598         /* Snapshot additions */
10599 -       reg_w(ov, R511_SNAP_PXCNT, pxcnt);
10600 -       reg_w(ov, R511_SNAP_LNCNT, lncnt);
10601 +       reg_w(ov, R511_SNAP_PXCNT, hsegs);
10602 +       reg_w(ov, R511_SNAP_LNCNT, vsegs);
10603         reg_w(ov, R511_SNAP_PXDIV, 0x00);
10604         reg_w(ov, R511_SNAP_LNDIV, 0x00);
10605  
10606 @@ -2811,27 +2721,17 @@
10607                 reg_w(ov, R511_COMP_LUT_EN, 0x03);
10608                 ov51x_reset(ov, OV511_RESET_OMNICE);
10609         }
10610 -//out:
10611 +
10612         if (ov51x_restart(ov) < 0)
10613                 return -EIO;
10614  
10615 -       return rc;
10616 +       return 0;
10617  }
10618  
10619 -static struct mode_list_518 mlist518[] = {
10620 -       /* W    H   reg28 reg29 reg2a reg2c reg2e reg24 reg25 */
10621 -       { 352, 288, 0x00, 0x16, 0x48, 0x00, 0x00, 0x9f, 0x90 },
10622 -       { 320, 240, 0x00, 0x14, 0x3c, 0x10, 0x18, 0x9f, 0x90 },
10623 -       { 176, 144, 0x05, 0x0b, 0x24, 0x00, 0x00, 0xff, 0xf0 },
10624 -       { 160, 120, 0x05, 0x0a, 0x1e, 0x08, 0x0c, 0xff, 0xf0 },
10625 -       { 0, 0 }
10626 -};
10627 -
10628  /* Sets up the OV518/OV518+ with the given image parameters
10629   *
10630   * OV518 needs a completely different approach, until we can figure out what
10631 - * the individual registers do. Many register ops are commented out until we
10632 - * can find out if they are still valid. Also, only 15 FPS is supported now.
10633 + * the individual registers do. Also, only 15 FPS is supported now.
10634   *
10635   * Do not put any sensor-specific code in here (including I2C I/O functions)
10636   */
10637 @@ -2839,112 +2739,110 @@
10638  ov518_mode_init_regs(struct usb_ov511 *ov,
10639                      int width, int height, int mode, int sub_flag)
10640  {
10641 -       int i;
10642 +       int hsegs, vsegs, hi_res;
10643 +
10644 +       if (sub_flag) {
10645 +               width = ov->subw;
10646 +               height = ov->subh;
10647 +       }
10648  
10649         PDEBUG(3, "width:%d, height:%d, mode:%d, sub:%d",
10650                width, height, mode, sub_flag);
10651  
10652 +       if (width % 16 || height % 8) {
10653 +               err("Invalid size (%d, %d)", width, height);
10654 +               return -EINVAL;
10655 +       }
10656 +
10657 +       if (width < ov->minwidth || height < ov->minheight) {
10658 +               err("Requested dimensions are too small");
10659 +               return -EINVAL;
10660 +       }
10661 +
10662 +       if (width >= 320 && height >= 240) {
10663 +               hi_res = 1;
10664 +       } else if (width >= 320 || height >= 240) {
10665 +               err("Invalid width/height combination (%d, %d)", width, height);
10666 +               return -EINVAL;
10667 +       } else {
10668 +               hi_res = 0;
10669 +       }
10670 +
10671         if (ov51x_stop(ov) < 0)
10672                 return -EIO;
10673  
10674 -       for (i = 0; mlist518[i].width; i++) {
10675 -//             int lncnt, pxcnt;
10676 +       /******** Set the mode ********/
10677  
10678 -               if (width != mlist518[i].width || height != mlist518[i].height)
10679 -                       continue;
10680 +       reg_w(ov, 0x2b, 0);
10681 +       reg_w(ov, 0x2c, 0);
10682 +       reg_w(ov, 0x2d, 0);
10683 +       reg_w(ov, 0x2e, 0);
10684 +       reg_w(ov, 0x3b, 0);
10685 +       reg_w(ov, 0x3c, 0);
10686 +       reg_w(ov, 0x3d, 0);
10687 +       reg_w(ov, 0x3e, 0);
10688  
10689 -// FIXME: Subcapture won't be possible until we know what the registers do
10690 -// FIXME: We can't handle anything but YUV420 so far
10691 +       reg_w(ov, 0x28, (mode == VIDEO_PALETTE_GREY) ? 0x00:0x80);
10692 +       reg_w(ov, 0x38, (mode == VIDEO_PALETTE_GREY) ? 0x00:0x80);
10693  
10694 -//             /* Here I'm assuming that snapshot size == image size.
10695 -//              * I hope that's always true. --claudio
10696 -//              */
10697 -//             pxcnt = sub_flag ? (ov511->subw >> 3) - 1 : mlist[i].pxcnt;
10698 -//             lncnt = sub_flag ? (ov511->subh >> 3) - 1 : mlist[i].lncnt;
10699 -//
10700 -//             reg_w(ov511, 0x12, pxcnt);
10701 -//             reg_w(ov511, 0x13, lncnt);
10702 -
10703 -               /******** Set the mode ********/                
10704 -
10705 -               /* Mode independent regs */
10706 -               reg_w(ov, 0x2b, 0x00);
10707 -               reg_w(ov, 0x2d, 0x00);
10708 -               reg_w(ov, 0x3b, 0x00);
10709 -               reg_w(ov, 0x3d, 0x00);
10710 -
10711 -               /* Mode dependent regs. Regs 38 - 3e are always the same as
10712 -                * regs 28 - 2e */
10713 -               reg_w_mask(ov, 0x28, mlist518[i].reg28
10714 -                       | (mode == VIDEO_PALETTE_GREY) ? 0x80:0x00, 0x8f);
10715 -               reg_w(ov, 0x29, mlist518[i].reg29);
10716 -               reg_w(ov, 0x2a, mlist518[i].reg2a);
10717 -               reg_w(ov, 0x2c, mlist518[i].reg2c);
10718 -               reg_w(ov, 0x2e, mlist518[i].reg2e);
10719 -               reg_w_mask(ov, 0x38, mlist518[i].reg28 
10720 -                       | (mode == VIDEO_PALETTE_GREY) ? 0x80:0x00, 0x8f);
10721 -               reg_w(ov, 0x39, mlist518[i].reg29);
10722 -               reg_w(ov, 0x3a, mlist518[i].reg2a);
10723 -               reg_w(ov, 0x3c, mlist518[i].reg2c);
10724 -               reg_w(ov, 0x3e, mlist518[i].reg2e);
10725 -               reg_w(ov, 0x24, mlist518[i].reg24);
10726 -               reg_w(ov, 0x25, mlist518[i].reg25);
10727 -
10728 -               /* Windows driver does this here; who knows why */
10729 -               reg_w(ov, 0x2f, 0x80);
10730 -
10731 -               /******** Set the framerate (to 15 FPS) ********/               
10732 -
10733 -               /* Mode independent, but framerate dependent, regs */
10734 -               /* These are for 15 FPS only */
10735 -               reg_w(ov, 0x51, 0x08);
10736 -               reg_w(ov, 0x22, 0x18);
10737 -               reg_w(ov, 0x23, 0xff);
10738 -               reg_w(ov, 0x71, 0x19);  /* Compression-related? */
10739 -
10740 -               // FIXME: Sensor-specific
10741 -               /* Bit 5 is what matters here. Of course, it is "reserved" */
10742 -               i2c_w(ov, 0x54, 0x23);
10743 -
10744 -               reg_w(ov, 0x2f, 0x80);
10745 -
10746 -               /* Mode dependent regs */
10747 -               if ((width == 352 && height == 288) ||
10748 -                   (width == 320 && height == 240)) {
10749 -                       /*  640 (280h) byte iso packets */
10750 -                       ov518_reg_w32(ov, 0x30,    640, 2);     /* 280h   */
10751 -                       ov518_reg_w32(ov, 0xc4,    400, 2);     /* 190h   */
10752 -                       ov518_reg_w32(ov, 0xc6,    500, 2);     /* 1f4h   */
10753 -                       ov518_reg_w32(ov, 0xc7,    500, 2);     /* 1f4h   */
10754 -                       ov518_reg_w32(ov, 0xc8,    142, 2);     /* 8eh    */
10755 -                       ov518_reg_w32(ov, 0xca, 131098, 3);     /* 2001ah */
10756 -                       ov518_reg_w32(ov, 0xcb,    532, 2);     /* 214h   */
10757 -                       ov518_reg_w32(ov, 0xcc,   2000, 2);     /* 7d0h   */
10758 -                       ov518_reg_w32(ov, 0xcd,     32, 2);     /* 20h    */
10759 -                       ov518_reg_w32(ov, 0xce,    608, 2);     /* 260h   */
10760 -               } else if ((width == 176 && height == 144) ||
10761 -                          (width == 160 && height == 120)) {
10762 -                       /*  384 (180h) byte iso packets */
10763 -                       ov518_reg_w32(ov, 0x30,    384, 2);     /* 180h   */
10764 -                       ov518_reg_w32(ov, 0xc4,    200, 2);     /* c8h    */
10765 -                       ov518_reg_w32(ov, 0xc6,    320, 2);     /* 140h   */
10766 -                       ov518_reg_w32(ov, 0xc7,    320, 2);     /* 140h   */
10767 -                       ov518_reg_w32(ov, 0xc8,     96, 2);     /* 60h    */
10768 -                       ov518_reg_w32(ov, 0xca,  78607, 3);     /* 1330fh */
10769 -                       ov518_reg_w32(ov, 0xcb,    320, 2);     /* 140h   */
10770 -                       ov518_reg_w32(ov, 0xcc,   1260, 2);     /* 4ech   */
10771 -                       ov518_reg_w32(ov, 0xcd,     19, 2);     /* 13h    */
10772 -                       ov518_reg_w32(ov, 0xce,    365, 2);     /* 16dh   */
10773 -               } else {
10774 -                       /* Can't happen, since we already handled this case */
10775 -                       err("ov518_mode_init_regs(): **** logic error ****");
10776 -               }
10777 +       hsegs = width / 16;
10778 +       vsegs = height / 4;
10779  
10780 -               reg_w(ov, 0x2f, 0x80);
10781 +       reg_w(ov, 0x29, hsegs);
10782 +       reg_w(ov, 0x2a, vsegs);
10783  
10784 -               break;
10785 +       reg_w(ov, 0x39, hsegs);
10786 +       reg_w(ov, 0x3a, vsegs);
10787 +
10788 +       /* Windows driver does this here; who knows why */
10789 +       reg_w(ov, 0x2f, 0x80);
10790 +
10791 +       /******** Set the framerate (to 15 FPS) ********/
10792 +
10793 +       /* Mode independent, but framerate dependent, regs */
10794 +       reg_w(ov, 0x51, 0x02);  /* Clock divider; lower==faster */
10795 +       reg_w(ov, 0x22, 0x18);
10796 +       reg_w(ov, 0x23, 0xff);
10797 +
10798 +       if (ov->bridge == BRG_OV518PLUS)
10799 +               reg_w(ov, 0x21, 0x19);
10800 +       else
10801 +               reg_w(ov, 0x71, 0x19);  /* Compression-related? */
10802 +
10803 +       // FIXME: Sensor-specific
10804 +       /* Bit 5 is what matters here. Of course, it is "reserved" */
10805 +       i2c_w(ov, 0x54, 0x23);
10806 +
10807 +       reg_w(ov, 0x2f, 0x80);
10808 +
10809 +       if (ov->bridge == BRG_OV518PLUS) {
10810 +               reg_w(ov, 0x24, 0x94);
10811 +               reg_w(ov, 0x25, 0x90);
10812 +               ov518_reg_w32(ov, 0xc4,    400, 2);     /* 190h   */
10813 +               ov518_reg_w32(ov, 0xc6,    540, 2);     /* 21ch   */
10814 +               ov518_reg_w32(ov, 0xc7,    540, 2);     /* 21ch   */
10815 +               ov518_reg_w32(ov, 0xc8,    108, 2);     /* 6ch    */
10816 +               ov518_reg_w32(ov, 0xca, 131098, 3);     /* 2001ah */
10817 +               ov518_reg_w32(ov, 0xcb,    532, 2);     /* 214h   */
10818 +               ov518_reg_w32(ov, 0xcc,   2400, 2);     /* 960h   */
10819 +               ov518_reg_w32(ov, 0xcd,     32, 2);     /* 20h    */
10820 +               ov518_reg_w32(ov, 0xce,    608, 2);     /* 260h   */
10821 +       } else {
10822 +               reg_w(ov, 0x24, 0x9f);
10823 +               reg_w(ov, 0x25, 0x90);
10824 +               ov518_reg_w32(ov, 0xc4,    400, 2);     /* 190h   */
10825 +               ov518_reg_w32(ov, 0xc6,    500, 2);     /* 1f4h   */
10826 +               ov518_reg_w32(ov, 0xc7,    500, 2);     /* 1f4h   */
10827 +               ov518_reg_w32(ov, 0xc8,    142, 2);     /* 8eh    */
10828 +               ov518_reg_w32(ov, 0xca, 131098, 3);     /* 2001ah */
10829 +               ov518_reg_w32(ov, 0xcb,    532, 2);     /* 214h   */
10830 +               ov518_reg_w32(ov, 0xcc,   2000, 2);     /* 7d0h   */
10831 +               ov518_reg_w32(ov, 0xcd,     32, 2);     /* 20h    */
10832 +               ov518_reg_w32(ov, 0xce,    608, 2);     /* 260h   */
10833         }
10834  
10835 +       reg_w(ov, 0x2f, 0x80);
10836 +
10837         if (ov51x_restart(ov) < 0)
10838                 return -EIO;
10839  
10840 @@ -2952,11 +2850,6 @@
10841         if (ov51x_reset(ov, OV511_RESET_NOREGS) < 0)
10842                 return -EIO;
10843  
10844 -       if (mlist518[i].width == 0) {
10845 -               err("Unknown mode (%d, %d): %d", width, height, mode);
10846 -               return -EINVAL;
10847 -       }
10848 -
10849         return 0;
10850  }
10851  
10852 @@ -2982,7 +2875,7 @@
10853         switch (ov->sensor) {
10854         case SEN_OV7610:
10855         case SEN_OV7620:
10856 -       case SEN_OV7620AE:
10857 +       case SEN_OV76BE:
10858         case SEN_OV8600:
10859         case SEN_OV6620:
10860         case SEN_OV6630:
10861 @@ -2994,10 +2887,10 @@
10862                 rc = -EINVAL;
10863                 break;
10864         case SEN_SAA7111A:
10865 -//             rc = mode_init_saa_sensor_regs(ov, width, height, mode, 
10866 +//             rc = mode_init_saa_sensor_regs(ov, width, height, mode,
10867  //                                            sub_flag);
10868  
10869 -               PDEBUG(1, "SAA status = 0X%x", i2c_r(ov, 0x1f));
10870 +               PDEBUG(1, "SAA status = 0x%02X", i2c_r(ov, 0x1f));
10871                 break;
10872         default:
10873                 err("Unknown sensor");
10874 @@ -3030,19 +2923,21 @@
10875         if (FATAL_ERROR(rc))
10876                 return rc;
10877  
10878 +       rc = sensor_set_mirror(ov, ov->mirror);
10879 +       if (FATAL_ERROR(rc))
10880 +               return rc;
10881 +
10882         return 0;
10883  }
10884  
10885 -/* This sets the default image parameters (Size = max, RGB24). This is
10886 - * useful for apps that use read() and do not set these.
10887 +/* This sets the default image parameters. This is useful for apps that use
10888 + * read() and do not set these.
10889   */
10890 -static int 
10891 +static int
10892  ov51x_set_default_params(struct usb_ov511 *ov)
10893  {
10894         int i;
10895  
10896 -       PDEBUG(3, "%dx%d, RGB24", ov->maxwidth, ov->maxheight);
10897 -
10898         /* Set default sizes in case IOCTL (VIDIOCMCAPTURE) is not used
10899          * (using read() instead). */
10900         for (i = 0; i < OV511_NUMFRAMES; i++) {
10901 @@ -3053,10 +2948,14 @@
10902                         ov->frame[i].format = force_palette;
10903                 else
10904                         ov->frame[i].format = VIDEO_PALETTE_RGB24;
10905 +
10906                 ov->frame[i].depth = get_depth(ov->frame[i].format);
10907         }
10908  
10909 -       /* Initialize to max width/height, RGB24 */
10910 +       PDEBUG(3, "%dx%d, %s", ov->maxwidth, ov->maxheight,
10911 +              symbolic(v4l1_plist, ov->frame[0].format));
10912 +
10913 +       /* Initialize to max width/height, YUV420 or RGB24 (if supported) */
10914         if (mode_init_regs(ov, ov->maxwidth, ov->maxheight,
10915                            ov->frame[0].format, 0) < 0)
10916                 return -EINVAL;
10917 @@ -3071,7 +2970,7 @@
10918   **********************************************************************/
10919  
10920  /* Set analog input port of decoder */
10921 -static int 
10922 +static int
10923  decoder_set_input(struct usb_ov511 *ov, int input)
10924  {
10925         PDEBUG(4, "port %d", input);
10926 @@ -3093,7 +2992,7 @@
10927  }
10928  
10929  /* Get ASCII name of video input */
10930 -static int 
10931 +static int
10932  decoder_get_input_name(struct usb_ov511 *ov, int input, char *name)
10933  {
10934         switch (ov->sensor) {
10935 @@ -3105,7 +3004,6 @@
10936                         sprintf(name, "CVBS-%d", input);
10937                 else // if (input < 8)
10938                         sprintf(name, "S-Video-%d", input - 4);
10939 -
10940                 break;
10941         }
10942         default:
10943 @@ -3116,7 +3014,7 @@
10944  }
10945  
10946  /* Set norm (NTSC, PAL, SECAM, AUTO) */
10947 -static int 
10948 +static int
10949  decoder_set_norm(struct usb_ov511 *ov, int norm)
10950  {
10951         PDEBUG(4, "%d", norm);
10952 @@ -3131,7 +3029,7 @@
10953                         reg_e = 0x00;   /* NTSC M / PAL BGHI */
10954                 } else if (norm == VIDEO_MODE_PAL) {
10955                         reg_8 = 0x00;   /* 50 Hz */
10956 -                       reg_e = 0x00;   /* NTSC M / PAL BGHI */ 
10957 +                       reg_e = 0x00;   /* NTSC M / PAL BGHI */
10958                 } else if (norm == VIDEO_MODE_AUTO) {
10959                         reg_8 = 0x80;   /* Auto field detect */
10960                         reg_e = 0x00;   /* NTSC M / PAL BGHI */
10961 @@ -3153,7 +3051,6 @@
10962         return 0;
10963  }
10964  
10965 -
10966  /**********************************************************************
10967   *
10968   * Color correction functions
10969 @@ -3176,21 +3073,21 @@
10970   * coefficients are scaled into 16.16 fixed-point integers.
10971   * They were determined as follows:
10972   *
10973 - *     double brightness = 1.0;  (0->black; 1->full scale) 
10974 + *     double brightness = 1.0;  (0->black; 1->full scale)
10975   *     double saturation = 1.0;  (0->greyscale; 1->full color)
10976   *     double fixScale = brightness * 256 * 256;
10977   *     int rvScale = (int)(1.402 * saturation * fixScale);
10978   *     int guScale = (int)(-0.344136 * saturation * fixScale);
10979   *     int gvScale = (int)(-0.714136 * saturation * fixScale);
10980   *     int buScale = (int)(1.772 * saturation * fixScale);
10981 - *     int yScale = (int)(fixScale);   
10982 + *     int yScale = (int)(fixScale);
10983   */
10984  
10985  /* LIMIT: convert a 16.16 fixed-point value to a byte, with clipping. */
10986  #define LIMIT(x) ((x)>0xffffff?0xff: ((x)<=0xffff?0:((x)>>16)))
10987  
10988  static inline void
10989 -move_420_block(int yTL, int yTR, int yBL, int yBR, int u, int v, 
10990 +move_420_block(int yTL, int yTR, int yBL, int yBR, int u, int v,
10991                int rowPixels, unsigned char * rgb, int bits)
10992  {
10993         const int rvScale = 91881;
10994 @@ -3229,14 +3126,14 @@
10995                 rgb[5] = LIMIT(r+yBR);
10996         } else if (bits == 16) {
10997                 /* Write out top two pixels */
10998 -               rgb[0] = ((LIMIT(b+yTL) >> 3) & 0x1F) 
10999 +               rgb[0] = ((LIMIT(b+yTL) >> 3) & 0x1F)
11000                         | ((LIMIT(g+yTL) << 3) & 0xE0);
11001                 rgb[1] = ((LIMIT(g+yTL) >> 5) & 0x07)
11002                         | (LIMIT(r+yTL) & 0xF8);
11003  
11004 -               rgb[2] = ((LIMIT(b+yTR) >> 3) & 0x1F) 
11005 +               rgb[2] = ((LIMIT(b+yTR) >> 3) & 0x1F)
11006                         | ((LIMIT(g+yTR) << 3) & 0xE0);
11007 -               rgb[3] = ((LIMIT(g+yTR) >> 5) & 0x07) 
11008 +               rgb[3] = ((LIMIT(g+yTR) >> 5) & 0x07)
11009                         | (LIMIT(r+yTR) & 0xF8);
11010  
11011                 /* Skip down to next line to write out bottom two pixels */
11012 @@ -3263,7 +3160,7 @@
11013  /* Copies a 64-byte segment at pIn to an 8x8 block at pOut. The width of the
11014   * image at pOut is specified by w.
11015   */
11016 -static inline void 
11017 +static inline void
11018  make_8x8(unsigned char *pIn, unsigned char *pOut, int w)
11019  {
11020         unsigned char *pOut1 = pOut;
11021 @@ -3276,7 +3173,6 @@
11022                 }
11023                 pOut += w;
11024         }
11025 -               
11026  }
11027  
11028  /*
11029 @@ -3394,7 +3290,7 @@
11030   * low, and the blue channel about 1 pixel high. After YUV->RGB
11031   * conversion, we can correct this easily. OSL 2/24/2000.
11032   */
11033 -static void 
11034 +static void
11035  fixFrameRGBoffset(struct ov511_frame *frame)
11036  {
11037         int x, y;
11038 @@ -3403,7 +3299,7 @@
11039         const int shift = 1;  /* Distance to shift pixels by, vertically */
11040  
11041         /* Don't bother with little images */
11042 -       if (frame->width < 400) 
11043 +       if (frame->width < 400)
11044                 return;
11045  
11046         /* This only works with RGB24 */
11047 @@ -3437,7 +3333,7 @@
11048   * accordingly. Returns -ENXIO if decompressor is not available, otherwise
11049   * returns 0 if no other error.
11050   */
11051 -static int 
11052 +static int
11053  request_decompressor(struct usb_ov511 *ov)
11054  {
11055         if (!ov)
11056 @@ -3476,24 +3372,24 @@
11057         }
11058  
11059         if (ov->decomp_ops) {
11060 -               if (!ov->decomp_ops->decomp_lock) {
11061 +               if (!ov->decomp_ops->owner) {
11062                         ov->decomp_ops = NULL;
11063                         unlock_kernel();
11064                         return -ENOSYS;
11065                 }
11066 -               ov->decomp_ops->decomp_lock();
11067 +               __MOD_INC_USE_COUNT(ov->decomp_ops->owner);
11068                 unlock_kernel();
11069                 return 0;
11070         } else {
11071                 unlock_kernel();
11072 -               return -ENXIO;
11073 +               return -ENOSYS;
11074         }
11075  }
11076  
11077  /* Unlocks decompression module and nulls ov->decomp_ops. Safe to call even
11078   * if ov->decomp_ops is NULL.
11079   */
11080 -static void 
11081 +static void
11082  release_decompressor(struct usb_ov511 *ov)
11083  {
11084         int released = 0;       /* Did we actually do anything? */
11085 @@ -3503,20 +3399,20 @@
11086  
11087         lock_kernel();
11088  
11089 -       if (ov->decomp_ops && ov->decomp_ops->decomp_unlock) {
11090 -               ov->decomp_ops->decomp_unlock();
11091 +       if (ov->decomp_ops && ov->decomp_ops->owner) {
11092 +               __MOD_DEC_USE_COUNT(ov->decomp_ops->owner);
11093                 released = 1;
11094         }
11095  
11096         ov->decomp_ops = NULL;
11097 -       
11098 +
11099         unlock_kernel();
11100  
11101         if (released)
11102                 PDEBUG(3, "Decompressor released");
11103  }
11104  
11105 -static void 
11106 +static void
11107  decompress(struct usb_ov511 *ov, struct ov511_frame *frame,
11108            unsigned char *pIn0, unsigned char *pOut0)
11109  {
11110 @@ -3526,19 +3422,22 @@
11111  
11112         PDEBUG(4, "Decompressing %d bytes", frame->bytes_recvd);
11113  
11114 -       if (frame->format == VIDEO_PALETTE_GREY 
11115 +       if (frame->format == VIDEO_PALETTE_GREY
11116             && ov->decomp_ops->decomp_400) {
11117                 int ret = ov->decomp_ops->decomp_400(
11118                         pIn0,
11119                         pOut0,
11120 +                       frame->compbuf,
11121                         frame->rawwidth,
11122                         frame->rawheight,
11123                         frame->bytes_recvd);
11124                 PDEBUG(4, "DEBUG: decomp_400 returned %d", ret);
11125 -       } else if (ov->decomp_ops->decomp_420) {
11126 +       } else if (frame->format != VIDEO_PALETTE_GREY
11127 +                  && ov->decomp_ops->decomp_420) {
11128                 int ret = ov->decomp_ops->decomp_420(
11129                         pIn0,
11130                         pOut0,
11131 +                       frame->compbuf,
11132                         frame->rawwidth,
11133                         frame->rawheight,
11134                         frame->bytes_recvd);
11135 @@ -3555,7 +3454,7 @@
11136   **********************************************************************/
11137  
11138  /* Converts from planar YUV420 to RGB24. */
11139 -static void 
11140 +static void
11141  yuv420p_to_rgb(struct ov511_frame *frame,
11142                unsigned char *pIn0, unsigned char *pOut0, int bits)
11143  {
11144 @@ -3578,10 +3477,9 @@
11145  
11146                         move_420_block(y00, y01, y10, y11, u, v,
11147                                        frame->width, pOut, bits);
11148 -       
11149 +
11150                         pY += 2;
11151                         pOut += 2 * bytes;
11152 -
11153                 }
11154                 pY += frame->width;
11155                 pOut += frame->width * bytes;
11156 @@ -3610,7 +3508,7 @@
11157                 for (i = 0; i <= frame->width - 2; i += 2) {
11158                         int u = *pU++;
11159                         int v = *pV++;
11160 -                       
11161 +
11162                         *pOut = u;
11163                         *(pOut+2) = v;
11164                         *(pOut+frame->width*2) = u;
11165 @@ -3725,27 +3623,11 @@
11166         }
11167  }
11168  
11169 -/* Post-processes the specified frame. This consists of:
11170 - *     1. Decompress frame, if necessary
11171 - *     2. Deinterlace frame and scale to proper size, if necessary
11172 - *     3. Convert from YUV planar to destination format, if necessary
11173 - *     4. Fix the RGB offset, if necessary
11174 - */
11175 -static void 
11176 -ov51x_postprocess(struct usb_ov511 *ov, struct ov511_frame *frame)
11177 +static void
11178 +ov51x_postprocess_grey(struct usb_ov511 *ov, struct ov511_frame *frame)
11179  {
11180 -       if (dumppix) {
11181 -               memset(frame->data, 0, 
11182 -                       MAX_DATA_SIZE(ov->maxwidth, ov->maxheight));
11183 -               PDEBUG(4, "Dumping %d bytes", frame->bytes_recvd);
11184 -               memmove(frame->data, frame->rawdata, frame->bytes_recvd);
11185 -               return;
11186 -       }
11187 -
11188 -       /* YUV400 must be handled separately */
11189 -       if (frame->format == VIDEO_PALETTE_GREY) {
11190                 /* Deinterlace frame, if necessary */
11191 -               if (ov->sensor == SEN_SAA7111A && frame->rawheight == 480) {
11192 +               if (ov->sensor == SEN_SAA7111A && frame->rawheight >= 480) {
11193                         if (frame->compressed)
11194                                 decompress(ov, frame, frame->rawdata,
11195                                                  frame->tempdata);
11196 @@ -3763,19 +3645,23 @@
11197                                 yuv400raw_to_yuv400p(frame, frame->rawdata,
11198                                                      frame->data);
11199                 }
11200 +}
11201  
11202 -               return;
11203 -       }
11204 -
11205 -       /* Process frame->data to frame->rawdata */
11206 +/* Process raw YUV420 data into the format requested by the app. Conversion
11207 + * between V4L formats is allowed.
11208 + */
11209 +static void
11210 +ov51x_postprocess_yuv420(struct usb_ov511 *ov, struct ov511_frame *frame)
11211 +{
11212 +       /* Process frame->rawdata to frame->tempdata */
11213         if (frame->compressed)
11214                 decompress(ov, frame, frame->rawdata, frame->tempdata);
11215         else
11216                 yuv420raw_to_yuv420p(frame, frame->rawdata, frame->tempdata);
11217  
11218         /* Deinterlace frame, if necessary */
11219 -       if (ov->sensor == SEN_SAA7111A && frame->rawheight == 480) {
11220 -               memmove(frame->rawdata, frame->tempdata,
11221 +       if (ov->sensor == SEN_SAA7111A && frame->rawheight >= 480) {
11222 +               memcpy(frame->rawdata, frame->tempdata,
11223                         MAX_RAW_DATA_SIZE(frame->width, frame->height));
11224                 deinterlace(frame, RAWFMT_YUV420, frame->rawdata,
11225                             frame->tempdata);
11226 @@ -3784,11 +3670,6 @@
11227         /* Frame should be (width x height) and not (rawwidth x rawheight) at
11228           * this point. */
11229  
11230 -#if 0
11231 -       /* Clear output buffer for testing purposes */
11232 -       memset(frame->data, 0, MAX_DATA_SIZE(frame->width, frame->height));
11233 -#endif
11234 -
11235         /* Process frame->tempdata to frame->data */
11236         switch (frame->format) {
11237         case VIDEO_PALETTE_RGB565:
11238 @@ -3803,348 +3684,124 @@
11239                 break;
11240         case VIDEO_PALETTE_YUV420:
11241         case VIDEO_PALETTE_YUV420P:
11242 -               memmove(frame->data, frame->tempdata,
11243 +               memcpy(frame->data, frame->tempdata,
11244                         MAX_RAW_DATA_SIZE(frame->width, frame->height));
11245                 break;
11246         case VIDEO_PALETTE_YUV422P:
11247                 /* Data is converted in place, so copy it in advance */
11248 -               memmove(frame->data, frame->tempdata,
11249 +               memcpy(frame->data, frame->tempdata,
11250                         MAX_RAW_DATA_SIZE(frame->width, frame->height));
11251  
11252                 yuv420p_to_yuv422p(frame, frame->data);
11253                 break;
11254         default:
11255 -               err("Cannot convert data to this format");
11256 +               err("Cannot convert YUV420 to %s",
11257 +                   symbolic(v4l1_plist, frame->format));
11258         }
11259  
11260         if (fix_rgb_offset)
11261                 fixFrameRGBoffset(frame);
11262  }
11263  
11264 -/**********************************************************************
11265 - *
11266 - * OV51x data transfer, IRQ handler
11267 - *
11268 - **********************************************************************/
11269 -
11270 -static int 
11271 -ov511_move_data(struct usb_ov511 *ov, struct urb *urb)
11272 +/* Post-processes the specified frame. This consists of:
11273 + *     1. Decompress frame, if necessary
11274 + *     2. Deinterlace frame and scale to proper size, if necessary
11275 + *     3. Convert from YUV planar to destination format, if necessary
11276 + *     4. Fix the RGB offset, if necessary
11277 + */
11278 +static void
11279 +ov51x_postprocess(struct usb_ov511 *ov, struct ov511_frame *frame)
11280  {
11281 -       unsigned char *cdata;
11282 -       int data_size, num, offset, i, totlen = 0;
11283 -       int aPackNum[FRAMES_PER_DESC];
11284 -       struct ov511_frame *frame;
11285 -       struct timeval *ts;
11286 -
11287 -       PDEBUG(5, "Moving %d packets", urb->number_of_packets);
11288 -
11289 -       data_size = ov->packet_size - 1;
11290 -
11291 -       for (i = 0; i < urb->number_of_packets; i++) {
11292 -               int n = urb->iso_frame_desc[i].actual_length;
11293 -               int st = urb->iso_frame_desc[i].status;
11294 -
11295 -               urb->iso_frame_desc[i].actual_length = 0;
11296 -               urb->iso_frame_desc[i].status = 0;
11297 -
11298 -               cdata = urb->transfer_buffer + urb->iso_frame_desc[i].offset;
11299 -
11300 -               aPackNum[i] = n ? cdata[ov->packet_size - 1] : -1;
11301 -
11302 -               if (!n || ov->curframe == -1)
11303 -                       continue;
11304 -
11305 -               if (st)
11306 -                       PDEBUG(2, "data error: [%d] len=%d, status=%d", i, n, st);
11307 -
11308 -               frame = &ov->frame[ov->curframe];
11309 -
11310 -               /* SOF/EOF packets have 1st to 8th bytes zeroed and the 9th
11311 -                * byte non-zero. The EOF packet has image width/height in the
11312 -                * 10th and 11th bytes. The 9th byte is given as follows:
11313 -                *
11314 -                * bit 7: EOF
11315 -                *     6: compression enabled
11316 -                *     5: 422/420/400 modes
11317 -                *     4: 422/420/400 modes
11318 -                *     3: 1
11319 -                *     2: snapshot button on
11320 -                *     1: snapshot frame
11321 -                *     0: even/odd field
11322 -                */
11323 -
11324 -               if (printph) {
11325 -                       info("packet header (%3d): %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x",
11326 -                               cdata[ov->packet_size - 1],
11327 -                               cdata[0], cdata[1], cdata[2], cdata[3], cdata[4], cdata[5],
11328 -                               cdata[6], cdata[7], cdata[8], cdata[9], cdata[10], cdata[11]);
11329 -               }
11330 -
11331 -               /* Check for SOF/EOF packet */
11332 -               if ((cdata[0] | cdata[1] | cdata[2] | cdata[3] |
11333 -                    cdata[4] | cdata[5] | cdata[6] | cdata[7]) ||
11334 -                    (~cdata[8] & 0x08))
11335 -                       goto check_middle;
11336 -
11337 -               /* Frame end */
11338 -               if (cdata[8] & 0x80) {
11339 -                       ts = (struct timeval *)(frame->data 
11340 -                             + MAX_FRAME_SIZE(ov->maxwidth, ov->maxheight));
11341 -                       do_gettimeofday(ts);
11342 -
11343 -                       /* Get the actual frame size from the EOF header */
11344 -                       frame->rawwidth = ((int)(cdata[9]) + 1) * 8;
11345 -                       frame->rawheight = ((int)(cdata[10]) + 1) * 8;
11346 -
11347 -                       PDEBUG(4, "Frame end, curframe = %d, packnum=%d, hw=%d, vw=%d, recvd=%d",
11348 -                               ov->curframe,
11349 -                               (int)(cdata[ov->packet_size - 1]),
11350 -                               frame->rawwidth,
11351 -                               frame->rawheight,
11352 -                               frame->bytes_recvd);
11353 -
11354 -                       /* Validate the header data */
11355 -                       RESTRICT_TO_RANGE(frame->rawwidth, ov->minwidth, ov->maxwidth);
11356 -                       RESTRICT_TO_RANGE(frame->rawheight, ov->minheight, ov->maxheight);
11357 -
11358 -                       /* Don't allow byte count to exceed buffer size */
11359 -                       RESTRICT_TO_RANGE(frame->bytes_recvd,
11360 -                                         8, 
11361 -                                         MAX_RAW_DATA_SIZE(ov->maxwidth,
11362 -                                                           ov->maxheight));
11363 -
11364 -                       if (frame->scanstate == STATE_LINES) {
11365 -                               int iFrameNext;
11366 -
11367 -                               frame->grabstate = FRAME_DONE;  // FIXME: Is this right?
11368 -
11369 -                               if (waitqueue_active(&frame->wq)) {
11370 -                                       frame->grabstate = FRAME_DONE;
11371 -                                       wake_up_interruptible(&frame->wq);
11372 -                               }
11373 -
11374 -                               /* If next frame is ready or grabbing,
11375 -                                 * point to it */
11376 -                               iFrameNext = (ov->curframe + 1) % OV511_NUMFRAMES;
11377 -                               if (ov->frame[iFrameNext].grabstate == FRAME_READY
11378 -                                   || ov->frame[iFrameNext].grabstate == FRAME_GRABBING) {
11379 -                                       ov->curframe = iFrameNext;
11380 -                                       ov->frame[iFrameNext].scanstate = STATE_SCANNING;
11381 -                               } else {
11382 -                                       if (frame->grabstate == FRAME_DONE) {
11383 -                                               PDEBUG(4, "Frame done! congratulations");
11384 -                                       } else {
11385 -                                               PDEBUG(4, "Frame not ready? state = %d",
11386 -                                                       ov->frame[iFrameNext].grabstate);
11387 -                                       }
11388 -
11389 -                                       ov->curframe = -1;
11390 -                               }
11391 -                       } else {
11392 -                               PDEBUG(5, "Frame done, but not scanning");
11393 -                       }
11394 -                       /* Image corruption caused by misplaced frame->segment = 0
11395 -                        * fixed by carlosf@conectiva.com.br
11396 -                        */
11397 -               } else {
11398 -                       /* Frame start */
11399 -                       PDEBUG(4, "Frame start, framenum = %d", ov->curframe);
11400 -
11401 -                       /* Check to see if it's a snapshot frame */
11402 -                       /* FIXME?? Should the snapshot reset go here? Performance? */
11403 -                       if (cdata[8] & 0x02) {
11404 -                               frame->snapshot = 1;
11405 -                               PDEBUG(3, "snapshot detected");
11406 -                       }
11407 -
11408 -                       frame->scanstate = STATE_LINES;
11409 -                       frame->bytes_recvd = 0;
11410 -                       frame->compressed = cdata[8] & 0x40;
11411 -               }
11412 -
11413 -check_middle:
11414 -               /* Are we in a frame? */
11415 -               if (frame->scanstate != STATE_LINES) {
11416 -                       PDEBUG(5, "Not in a frame; packet skipped");
11417 -                       continue;
11418 -               }
11419 -
11420 -#if 0
11421 -               /* Skip packet if first 9 bytes are zero. These are common, so
11422 -                * we use a less expensive test here instead of later */
11423 -               if (frame->compressed) {
11424 -                       int b, skip = 1;
11425 -
11426 -                       for (b = 0; b < 9; b++) { 
11427 -                               if (cdata[b])
11428 -                                       skip=0;
11429 -                       }
11430 -
11431 -                       if (skip) {
11432 -                               PDEBUG(5, "Skipping packet (all zero)");
11433 -                               continue;
11434 -                       }
11435 -               }
11436 -#endif
11437 -               /* If frame start, skip header */
11438 -               if (frame->bytes_recvd == 0)
11439 -                       offset = 9;
11440 -               else
11441 -                       offset = 0;
11442 -
11443 -               num = n - offset - 1;
11444 -
11445 -               /* Dump all data exactly as received */
11446 -               if (dumppix == 2) {
11447 -                       frame->bytes_recvd += n - 1;
11448 -                       if (frame->bytes_recvd <= MAX_RAW_DATA_SIZE(ov->maxwidth, ov->maxheight))
11449 -                               memmove(frame->rawdata + frame->bytes_recvd - (n - 1),
11450 -                                       &cdata[0], n - 1);
11451 -                       else
11452 -                               PDEBUG(3, "Raw data buffer overrun!! (%d)",
11453 -                                       frame->bytes_recvd
11454 -                                       - MAX_RAW_DATA_SIZE(ov->maxwidth,
11455 -                                                           ov->maxheight));
11456 -               } else if (!frame->compressed && !remove_zeros) {
11457 -                       frame->bytes_recvd += num;
11458 -                       if (frame->bytes_recvd <= MAX_RAW_DATA_SIZE(ov->maxwidth, ov->maxheight))
11459 -                               memmove(frame->rawdata + frame->bytes_recvd - num,
11460 -                                       &cdata[offset], num);
11461 -                       else
11462 -                               PDEBUG(3, "Raw data buffer overrun!! (%d)",
11463 -                                       frame->bytes_recvd
11464 -                                       - MAX_RAW_DATA_SIZE(ov->maxwidth,
11465 -                                                           ov->maxheight));
11466 -               } else { /* Remove all-zero FIFO lines (aligned 32-byte blocks) */
11467 -                       int b, in = 0, allzero, copied=0;
11468 -                       if (offset) {
11469 -                               frame->bytes_recvd += 32 - offset;      // Bytes out
11470 -                               memmove(frame->rawdata,
11471 -                                       &cdata[offset], 32 - offset);
11472 -                               in += 32;
11473 -                       }
11474 -
11475 -                       while (in < n - 1) {
11476 -                               allzero = 1;
11477 -                               for (b = 0; b < 32; b++) {
11478 -                                       if (cdata[in + b]) {
11479 -                                               allzero = 0;
11480 -                                               break;
11481 -                                       }
11482 -                               }
11483 -
11484 -                               if (allzero) {
11485 -                                       /* Don't copy it */
11486 -                               } else {
11487 -                                       if (frame->bytes_recvd + copied + 32
11488 -                                           <= MAX_RAW_DATA_SIZE(ov->maxwidth, ov->maxheight)) {
11489 -                                               memmove(frame->rawdata + frame->bytes_recvd + copied,
11490 -                                                       &cdata[in], 32);
11491 -                                               copied += 32;
11492 -                                       } else {
11493 -                                               PDEBUG(3, "Raw data buffer overrun!!");
11494 -                                       }
11495 -                               }
11496 -                               in += 32;
11497 -                       }
11498 -
11499 -                       frame->bytes_recvd += copied;
11500 +       if (dumppix) {
11501 +               memset(frame->data, 0,
11502 +                       MAX_DATA_SIZE(ov->maxwidth, ov->maxheight));
11503 +               PDEBUG(4, "Dumping %d bytes", frame->bytes_recvd);
11504 +               memcpy(frame->data, frame->rawdata, frame->bytes_recvd);
11505 +       } else {
11506 +               switch (frame->format) {
11507 +               case VIDEO_PALETTE_GREY:
11508 +                       ov51x_postprocess_grey(ov, frame);
11509 +                       break;
11510 +               case VIDEO_PALETTE_YUV420:
11511 +               case VIDEO_PALETTE_YUV420P:
11512 +               case VIDEO_PALETTE_RGB565:
11513 +               case VIDEO_PALETTE_RGB24:
11514 +               case VIDEO_PALETTE_YUV422:
11515 +               case VIDEO_PALETTE_YUYV:
11516 +               case VIDEO_PALETTE_YUV422P:
11517 +                       ov51x_postprocess_yuv420(ov, frame);
11518 +                       break;
11519 +               default:
11520 +                       err("Cannot convert data to %s",
11521 +                           symbolic(v4l1_plist, frame->format));
11522                 }
11523 -
11524         }
11525 -
11526 -       PDEBUG(5, "pn: %d %d %d %d %d %d %d %d %d %d",
11527 -               aPackNum[0], aPackNum[1], aPackNum[2], aPackNum[3], aPackNum[4],
11528 -               aPackNum[5],aPackNum[6], aPackNum[7], aPackNum[8], aPackNum[9]);
11529 -
11530 -       return totlen;
11531  }
11532  
11533 -static int 
11534 -ov518_move_data(struct usb_ov511 *ov, struct urb *urb)
11535 +/**********************************************************************
11536 + *
11537 + * OV51x data transfer, IRQ handler
11538 + *
11539 + **********************************************************************/
11540 +
11541 +static inline void
11542 +ov511_move_data(struct usb_ov511 *ov, unsigned char *in, int n)
11543  {
11544 -       unsigned char *cdata;
11545 -       int i, data_size, totlen = 0;
11546 -       struct ov511_frame *frame;
11547 +       int num, offset;
11548 +       int pnum = in[ov->packet_size - 1];             /* Get packet number */
11549 +       int max_raw = MAX_RAW_DATA_SIZE(ov->maxwidth, ov->maxheight);
11550 +       struct ov511_frame *frame = &ov->frame[ov->curframe];
11551         struct timeval *ts;
11552  
11553 -       PDEBUG(5, "Moving %d packets", urb->number_of_packets);
11554 -
11555 -       /* OV518(+) has no packet numbering */
11556 -       data_size = ov->packet_size;
11557 -
11558 -       for (i = 0; i < urb->number_of_packets; i++) {
11559 -               int n = urb->iso_frame_desc[i].actual_length;
11560 -               int st = urb->iso_frame_desc[i].status;
11561 -
11562 -               urb->iso_frame_desc[i].actual_length = 0;
11563 -               urb->iso_frame_desc[i].status = 0;
11564 -
11565 -               cdata = urb->transfer_buffer + urb->iso_frame_desc[i].offset;
11566 -
11567 -               if (!n) {
11568 -                       PDEBUG(4, "Zero-length packet");
11569 -                       continue;
11570 -               }
11571 -
11572 -               if (ov->curframe == -1) {
11573 -                       PDEBUG(4, "No frame currently active");
11574 -                       continue;
11575 -               }
11576 +       /* SOF/EOF packets have 1st to 8th bytes zeroed and the 9th
11577 +        * byte non-zero. The EOF packet has image width/height in the
11578 +        * 10th and 11th bytes. The 9th byte is given as follows:
11579 +        *
11580 +        * bit 7: EOF
11581 +        *     6: compression enabled
11582 +        *     5: 422/420/400 modes
11583 +        *     4: 422/420/400 modes
11584 +        *     3: 1
11585 +        *     2: snapshot button on
11586 +        *     1: snapshot frame
11587 +        *     0: even/odd field
11588 +        */
11589  
11590 -               if (st)
11591 -                       PDEBUG(2, "data error: [%d] len=%d, status=%d", i, n, st);
11592 +       if (printph) {
11593 +               info("ph(%3d): %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x",
11594 +                    pnum, in[0], in[1], in[2], in[3], in[4], in[5], in[6],
11595 +                    in[7], in[8], in[9], in[10], in[11]);
11596 +       }
11597  
11598 -               frame = &ov->frame[ov->curframe];
11599 +       /* Check for SOF/EOF packet */
11600 +       if ((in[0] | in[1] | in[2] | in[3] | in[4] | in[5] | in[6] | in[7]) ||
11601 +           (~in[8] & 0x08))
11602 +               goto check_middle;
11603  
11604 -               if (printph) {
11605 -                       info("packet header: %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x",
11606 -                               cdata[0], cdata[1], cdata[2], cdata[3], cdata[4], cdata[5],
11607 -                               cdata[6], cdata[7], cdata[8], cdata[9], cdata[10], cdata[11]);
11608 -               }
11609 -
11610 -               /* A false positive here is likely, until OVT gives me
11611 -                * the definitive SOF/EOF format */
11612 -               if ((!(cdata[0] | cdata[1] | cdata[2] | cdata[3] |
11613 -                     cdata[5])) && cdata[6]) {
11614 -                       
11615 -                       if (frame->scanstate == STATE_LINES) {
11616 -                               PDEBUG(4, "Detected frame end/start");
11617 -                               goto eof;
11618 -                       } else { //scanstate == STATE_SCANNING
11619 -                               /* Frame start */
11620 -                               PDEBUG(4, "Frame start, framenum = %d", ov->curframe);
11621 -                               goto sof;
11622 -                       }
11623 -               } else {
11624 -                       goto check_middle;
11625 -               }
11626 -       
11627 -eof:
11628 +       /* Frame end */
11629 +       if (in[8] & 0x80) {
11630                 ts = (struct timeval *)(frame->data
11631                       + MAX_FRAME_SIZE(ov->maxwidth, ov->maxheight));
11632                 do_gettimeofday(ts);
11633  
11634 -               PDEBUG(4, "Frame end, curframe = %d, hw=%d, vw=%d, recvd=%d",
11635 -                       ov->curframe,
11636 -                       (int)(cdata[9]), (int)(cdata[10]), frame->bytes_recvd);
11637 -
11638 -               // FIXME: Since we don't know the header formats yet,
11639 -               // there is no way to know what the actual image size is
11640 -               frame->rawwidth = frame->width;
11641 -               frame->rawheight = frame->height;
11642 +               /* Get the actual frame size from the EOF header */
11643 +               frame->rawwidth = ((int)(in[9]) + 1) * 8;
11644 +               frame->rawheight = ((int)(in[10]) + 1) * 8;
11645 +
11646 +               PDEBUG(4, "Frame end, frame=%d, pnum=%d, w=%d, h=%d, recvd=%d",
11647 +                       ov->curframe, pnum, frame->rawwidth, frame->rawheight,
11648 +                       frame->bytes_recvd);
11649  
11650                 /* Validate the header data */
11651                 RESTRICT_TO_RANGE(frame->rawwidth, ov->minwidth, ov->maxwidth);
11652 -               RESTRICT_TO_RANGE(frame->rawheight, ov->minheight, ov->maxheight);
11653 +               RESTRICT_TO_RANGE(frame->rawheight, ov->minheight,
11654 +                                 ov->maxheight);
11655  
11656                 /* Don't allow byte count to exceed buffer size */
11657 -               RESTRICT_TO_RANGE(frame->bytes_recvd,
11658 -                                 8, 
11659 -                                 MAX_RAW_DATA_SIZE(ov->maxwidth, ov->maxheight));
11660 +               RESTRICT_TO_RANGE(frame->bytes_recvd, 8, max_raw);
11661  
11662                 if (frame->scanstate == STATE_LINES) {
11663 -                       int iFrameNext;
11664 +                       int nextf;
11665  
11666                         frame->grabstate = FRAME_DONE;  // FIXME: Is this right?
11667  
11668 @@ -4155,115 +3812,280 @@
11669  
11670                         /* If next frame is ready or grabbing,
11671                          * point to it */
11672 -                       iFrameNext = (ov->curframe + 1) % OV511_NUMFRAMES;
11673 -                       if (ov->frame[iFrameNext].grabstate == FRAME_READY
11674 -                           || ov->frame[iFrameNext].grabstate == FRAME_GRABBING) {
11675 -                               ov->curframe = iFrameNext;
11676 -                               ov->frame[iFrameNext].scanstate = STATE_SCANNING;
11677 -                               frame = &ov->frame[iFrameNext];
11678 +                       nextf = (ov->curframe + 1) % OV511_NUMFRAMES;
11679 +                       if (ov->frame[nextf].grabstate == FRAME_READY
11680 +                           || ov->frame[nextf].grabstate == FRAME_GRABBING) {
11681 +                               ov->curframe = nextf;
11682 +                               ov->frame[nextf].scanstate = STATE_SCANNING;
11683                         } else {
11684                                 if (frame->grabstate == FRAME_DONE) {
11685 -                                       PDEBUG(4, "Frame done! congratulations");
11686 +                                       PDEBUG(4, "** Frame done **");
11687                                 } else {
11688                                         PDEBUG(4, "Frame not ready? state = %d",
11689 -                                               ov->frame[iFrameNext].grabstate);
11690 +                                               ov->frame[nextf].grabstate);
11691                                 }
11692  
11693                                 ov->curframe = -1;
11694 -                               PDEBUG(4, "SOF dropped (no active frame)");
11695 -                               continue;  /* Nowhere to store this frame */
11696                         }
11697 +               } else {
11698 +                       PDEBUG(5, "Frame done, but not scanning");
11699                 }
11700                 /* Image corruption caused by misplaced frame->segment = 0
11701                  * fixed by carlosf@conectiva.com.br
11702                  */
11703 -sof:
11704 -               PDEBUG(4, "Starting capture on frame %d", frame->framenum);
11705 -// Snapshot not reverse-engineered yet.
11706 -#if 0
11707 +       } else {
11708 +               /* Frame start */
11709 +               PDEBUG(4, "Frame start, framenum = %d", ov->curframe);
11710 +
11711                 /* Check to see if it's a snapshot frame */
11712                 /* FIXME?? Should the snapshot reset go here? Performance? */
11713 -               if (cdata[8] & 0x02) {
11714 +               if (in[8] & 0x02) {
11715                         frame->snapshot = 1;
11716                         PDEBUG(3, "snapshot detected");
11717                 }
11718 -#endif
11719 +
11720                 frame->scanstate = STATE_LINES;
11721                 frame->bytes_recvd = 0;
11722 -//             frame->compressed = 1;
11723 +               frame->compressed = in[8] & 0x40;
11724 +       }
11725  
11726  check_middle:
11727 -               /* Are we in a frame? */
11728 -               if (frame->scanstate != STATE_LINES) {
11729 -                       PDEBUG(4, "scanstate: no SOF yet");
11730 -                       continue;
11731 -               }
11732 +       /* Are we in a frame? */
11733 +       if (frame->scanstate != STATE_LINES) {
11734 +               PDEBUG(5, "Not in a frame; packet skipped");
11735 +               return;
11736 +       }
11737  
11738 -               /* Dump all data exactly as received */
11739 -               if (dumppix == 2) {
11740 -                       frame->bytes_recvd += n;
11741 -                       if (frame->bytes_recvd <= MAX_RAW_DATA_SIZE(ov->maxwidth, ov->maxheight))
11742 -                               memmove(frame->rawdata + frame->bytes_recvd - n,
11743 -                                       &cdata[0], n);
11744 -                       else
11745 -                               PDEBUG(3, "Raw data buffer overrun!! (%d)",
11746 -                                       frame->bytes_recvd
11747 -                                       - MAX_RAW_DATA_SIZE(ov->maxwidth,
11748 -                                                           ov->maxheight));
11749 -               } else {
11750 -                       /* All incoming data are divided into 8-byte segments. If the
11751 -                        * segment contains all zero bytes, it must be skipped. These
11752 -                        * zero-segments allow the OV518 to mainain a constant data rate
11753 -                        * regardless of the effectiveness of the compression. Segments
11754 -                        * are aligned relative to the beginning of each isochronous
11755 -                        * packet. The first segment is a header (the decompressor
11756 -                        * skips it later).
11757 -                        */
11758 -
11759 -                       int b, in = 0, allzero, copied=0;
11760 -
11761 -                       while (in < n) {
11762 -                               allzero = 1;
11763 -                               for (b = 0; b < 8; b++) {
11764 -                                       if (cdata[in + b]) {
11765 -                                               allzero = 0;
11766 -                                               break;
11767 -                                       }
11768 +       /* If frame start, skip header */
11769 +       if (frame->bytes_recvd == 0)
11770 +               offset = 9;
11771 +       else
11772 +               offset = 0;
11773 +
11774 +       num = n - offset - 1;
11775 +
11776 +       /* Dump all data exactly as received */
11777 +       if (dumppix == 2) {
11778 +               frame->bytes_recvd += n - 1;
11779 +               if (frame->bytes_recvd <= max_raw)
11780 +                       memcpy(frame->rawdata + frame->bytes_recvd - (n - 1),
11781 +                               in, n - 1);
11782 +               else
11783 +                       PDEBUG(3, "Raw data buffer overrun!! (%d)",
11784 +                               frame->bytes_recvd - max_raw);
11785 +       } else if (!frame->compressed && !remove_zeros) {
11786 +               frame->bytes_recvd += num;
11787 +               if (frame->bytes_recvd <= max_raw)
11788 +                       memcpy(frame->rawdata + frame->bytes_recvd - num,
11789 +                               in + offset, num);
11790 +               else
11791 +                       PDEBUG(3, "Raw data buffer overrun!! (%d)",
11792 +                               frame->bytes_recvd - max_raw);
11793 +       } else { /* Remove all-zero FIFO lines (aligned 32-byte blocks) */
11794 +               int b, read = 0, allzero, copied = 0;
11795 +               if (offset) {
11796 +                       frame->bytes_recvd += 32 - offset;      // Bytes out
11797 +                       memcpy(frame->rawdata,  in + offset, 32 - offset);
11798 +                       read += 32;
11799 +               }
11800 +
11801 +               while (read < n - 1) {
11802 +                       allzero = 1;
11803 +                       for (b = 0; b < 32; b++) {
11804 +                               if (in[read + b]) {
11805 +                                       allzero = 0;
11806 +                                       break;
11807                                 }
11808 +                       }
11809  
11810 -                               if (allzero) {
11811 +                       if (allzero) {
11812                                 /* Don't copy it */
11813 +                       } else {
11814 +                               if (frame->bytes_recvd + copied + 32 <= max_raw)
11815 +                               {
11816 +                                       memcpy(frame->rawdata
11817 +                                               + frame->bytes_recvd + copied,
11818 +                                               in + read, 32);
11819 +                                       copied += 32;
11820                                 } else {
11821 -                                       if (frame->bytes_recvd + copied + 8
11822 -                                           <= MAX_RAW_DATA_SIZE(ov->maxwidth, ov->maxheight)) {
11823 -                                               memmove(frame->rawdata + frame->bytes_recvd + copied,
11824 -                                                       &cdata[in], 8);
11825 -                                               copied += 8;
11826 -                                       } else {
11827 -                                               PDEBUG(3, "Raw data buffer overrun!!");
11828 -                                       }
11829 +                                       PDEBUG(3, "Raw data buffer overrun!!");
11830                                 }
11831 -                               in += 8;
11832                         }
11833 -                       frame->bytes_recvd += copied;
11834 +                       read += 32;
11835                 }
11836 +
11837 +               frame->bytes_recvd += copied;
11838         }
11839 +}
11840  
11841 -       return totlen;
11842 +static inline void
11843 +ov518_move_data(struct usb_ov511 *ov, unsigned char *in, int n)
11844 +{
11845 +       int max_raw = MAX_RAW_DATA_SIZE(ov->maxwidth, ov->maxheight);
11846 +       struct ov511_frame *frame = &ov->frame[ov->curframe];
11847 +       struct timeval *ts;
11848 +
11849 +       /* Don't copy the packet number byte */
11850 +       if (ov->packet_numbering)
11851 +               --n;
11852 +
11853 +       /* A false positive here is likely, until OVT gives me
11854 +        * the definitive SOF/EOF format */
11855 +       if ((!(in[0] | in[1] | in[2] | in[3] | in[5])) && in[6]) {
11856 +               if (printph) {
11857 +                       info("ph: %2x %2x %2x %2x %2x %2x %2x %2x", in[0],
11858 +                            in[1], in[2], in[3], in[4], in[5], in[6], in[7]);
11859 +               }
11860 +
11861 +               if (frame->scanstate == STATE_LINES) {
11862 +                       PDEBUG(4, "Detected frame end/start");
11863 +                       goto eof;
11864 +               } else { //scanstate == STATE_SCANNING
11865 +                       /* Frame start */
11866 +                       PDEBUG(4, "Frame start, framenum = %d", ov->curframe);
11867 +                       goto sof;
11868 +               }
11869 +       } else {
11870 +               goto check_middle;
11871 +       }
11872 +
11873 +eof:
11874 +       ts = (struct timeval *)(frame->data
11875 +             + MAX_FRAME_SIZE(ov->maxwidth, ov->maxheight));
11876 +       do_gettimeofday(ts);
11877 +
11878 +       PDEBUG(4, "Frame end, curframe = %d, hw=%d, vw=%d, recvd=%d",
11879 +               ov->curframe,
11880 +               (int)(in[9]), (int)(in[10]), frame->bytes_recvd);
11881 +
11882 +       // FIXME: Since we don't know the header formats yet,
11883 +       // there is no way to know what the actual image size is
11884 +       frame->rawwidth = frame->width;
11885 +       frame->rawheight = frame->height;
11886 +
11887 +       /* Validate the header data */
11888 +       RESTRICT_TO_RANGE(frame->rawwidth, ov->minwidth, ov->maxwidth);
11889 +       RESTRICT_TO_RANGE(frame->rawheight, ov->minheight, ov->maxheight);
11890 +
11891 +       /* Don't allow byte count to exceed buffer size */
11892 +       RESTRICT_TO_RANGE(frame->bytes_recvd, 8, max_raw);
11893 +
11894 +       if (frame->scanstate == STATE_LINES) {
11895 +               int nextf;
11896 +
11897 +               frame->grabstate = FRAME_DONE;  // FIXME: Is this right?
11898 +
11899 +               if (waitqueue_active(&frame->wq)) {
11900 +                       frame->grabstate = FRAME_DONE;
11901 +                       wake_up_interruptible(&frame->wq);
11902 +               }
11903 +
11904 +               /* If next frame is ready or grabbing,
11905 +                * point to it */
11906 +               nextf = (ov->curframe + 1) % OV511_NUMFRAMES;
11907 +               if (ov->frame[nextf].grabstate == FRAME_READY
11908 +                   || ov->frame[nextf].grabstate == FRAME_GRABBING) {
11909 +                       ov->curframe = nextf;
11910 +                       ov->frame[nextf].scanstate = STATE_SCANNING;
11911 +                       frame = &ov->frame[nextf];
11912 +               } else {
11913 +                       if (frame->grabstate == FRAME_DONE) {
11914 +                               PDEBUG(4, "** Frame done **");
11915 +                       } else {
11916 +                               PDEBUG(4, "Frame not ready? state = %d",
11917 +                                      ov->frame[nextf].grabstate);
11918 +                       }
11919 +
11920 +                       ov->curframe = -1;
11921 +                       PDEBUG(4, "SOF dropped (no active frame)");
11922 +                       return;  /* Nowhere to store this frame */
11923 +               }
11924 +       }
11925 +sof:
11926 +       PDEBUG(4, "Starting capture on frame %d", frame->framenum);
11927 +
11928 +// Snapshot not reverse-engineered yet.
11929 +#if 0
11930 +       /* Check to see if it's a snapshot frame */
11931 +       /* FIXME?? Should the snapshot reset go here? Performance? */
11932 +       if (in[8] & 0x02) {
11933 +               frame->snapshot = 1;
11934 +               PDEBUG(3, "snapshot detected");
11935 +       }
11936 +#endif
11937 +       frame->scanstate = STATE_LINES;
11938 +       frame->bytes_recvd = 0;
11939 +       frame->compressed = 1;
11940 +
11941 +check_middle:
11942 +       /* Are we in a frame? */
11943 +       if (frame->scanstate != STATE_LINES) {
11944 +               PDEBUG(4, "scanstate: no SOF yet");
11945 +               return;
11946 +       }
11947 +
11948 +       /* Dump all data exactly as received */
11949 +       if (dumppix == 2) {
11950 +               frame->bytes_recvd += n;
11951 +               if (frame->bytes_recvd <= max_raw)
11952 +                       memcpy(frame->rawdata + frame->bytes_recvd - n, in, n);
11953 +               else
11954 +                       PDEBUG(3, "Raw data buffer overrun!! (%d)",
11955 +                               frame->bytes_recvd - max_raw);
11956 +       } else {
11957 +               /* All incoming data are divided into 8-byte segments. If the
11958 +                * segment contains all zero bytes, it must be skipped. These
11959 +                * zero-segments allow the OV518 to mainain a constant data rate
11960 +                * regardless of the effectiveness of the compression. Segments
11961 +                * are aligned relative to the beginning of each isochronous
11962 +                * packet. The first segment in each image is a header (the
11963 +                * decompressor skips it later).
11964 +                */
11965 +
11966 +               int b, read = 0, allzero, copied = 0;
11967 +
11968 +               while (read < n) {
11969 +                       allzero = 1;
11970 +                       for (b = 0; b < 8; b++) {
11971 +                               if (in[read + b]) {
11972 +                                       allzero = 0;
11973 +                                       break;
11974 +                               }
11975 +                       }
11976 +
11977 +                       if (allzero) {
11978 +                       /* Don't copy it */
11979 +                       } else {
11980 +                               if (frame->bytes_recvd + copied + 8 <= max_raw)
11981 +                               {
11982 +                                       memcpy(frame->rawdata
11983 +                                               + frame->bytes_recvd + copied,
11984 +                                               in + read, 8);
11985 +                                       copied += 8;
11986 +                               } else {
11987 +                                       PDEBUG(3, "Raw data buffer overrun!!");
11988 +                               }
11989 +                       }
11990 +                       read += 8;
11991 +               }
11992 +               frame->bytes_recvd += copied;
11993 +       }
11994  }
11995  
11996 -static void 
11997 +static void
11998  ov51x_isoc_irq(struct urb *urb)
11999  {
12000 -       int len;
12001 +       int i;
12002         struct usb_ov511 *ov;
12003 +       struct ov511_sbuf *sbuf;
12004  
12005         if (!urb->context) {
12006                 PDEBUG(4, "no context");
12007                 return;
12008         }
12009  
12010 -       ov = (struct usb_ov511 *) urb->context;
12011 +       sbuf = urb->context;
12012 +       ov = sbuf->ov;
12013  
12014         if (!ov || !ov->dev || !ov->user) {
12015                 PDEBUG(4, "no device, or not open");
12016 @@ -4275,16 +4097,51 @@
12017                 return;
12018         }
12019  
12020 +        if (urb->status == -ENOENT || urb->status == -ECONNRESET) {
12021 +                PDEBUG(4, "URB unlinked");
12022 +                return;
12023 +        }
12024 +
12025 +       if (urb->status != -EINPROGRESS && urb->status != 0) {
12026 +               err("ERROR: urb->status=%d: %s", urb->status,
12027 +                   symbolic(urb_errlist, urb->status));
12028 +       }
12029 +
12030         /* Copy the data received into our frame buffer */
12031 -       if (ov->curframe >= 0) {
12032 -               if (ov->bclass == BCL_OV511)
12033 -                       len = ov511_move_data(ov, urb);
12034 -               else if (ov->bclass == BCL_OV518)
12035 -                       len = ov518_move_data(ov, urb);
12036 -               else
12037 -                       err("Unknown bridge device (%d)", ov->bridge);
12038 -       } else if (waitqueue_active(&ov->wq)) {
12039 -               wake_up_interruptible(&ov->wq);
12040 +       PDEBUG(5, "sbuf[%d]: Moving %d packets", sbuf->n,
12041 +              urb->number_of_packets);
12042 +       for (i = 0; i < urb->number_of_packets; i++) {
12043 +               /* Warning: Don't call *_move_data() if no frame active! */
12044 +               if (ov->curframe >= 0) {
12045 +                       int n = urb->iso_frame_desc[i].actual_length;
12046 +                       int st = urb->iso_frame_desc[i].status;
12047 +                       unsigned char *cdata;
12048 +
12049 +                       urb->iso_frame_desc[i].actual_length = 0;
12050 +                       urb->iso_frame_desc[i].status = 0;
12051 +
12052 +                       cdata = urb->transfer_buffer
12053 +                               + urb->iso_frame_desc[i].offset;
12054 +
12055 +                       if (!n) {
12056 +                               PDEBUG(4, "Zero-length packet");
12057 +                               continue;
12058 +                       }
12059 +
12060 +                       if (st)
12061 +                               PDEBUG(2, "data error: [%d] len=%d, status=%d",
12062 +                                      i, n, st);
12063 +
12064 +                       if (ov->bclass == BCL_OV511)
12065 +                               ov511_move_data(ov, cdata, n);
12066 +                       else if (ov->bclass == BCL_OV518)
12067 +                               ov518_move_data(ov, cdata, n);
12068 +                       else
12069 +                               err("Unknown bridge device (%d)", ov->bridge);
12070 +
12071 +               } else if (waitqueue_active(&ov->wq)) {
12072 +                       wake_up_interruptible(&ov->wq);
12073 +               }
12074         }
12075  
12076         urb->dev = ov->dev;
12077 @@ -4298,7 +4155,7 @@
12078   *
12079   ***************************************************************************/
12080  
12081 -static int 
12082 +static int
12083  ov51x_init_isoc(struct usb_ov511 *ov)
12084  {
12085         struct urb *urb;
12086 @@ -4340,27 +4197,32 @@
12087                 return -1;
12088         }
12089  
12090 -       if (packetsize == -1) {
12091 -               // FIXME: OV518 is hardcoded to 15 FPS (alternate 5) for now
12092 -               if (ov->bclass == BCL_OV518)
12093 -                       ov51x_set_packet_size(ov, 640);
12094 -               else
12095 -                       ov51x_set_packet_size(ov, size);
12096 +       // FIXME: OV518 is hardcoded to 15 FPS (alternate 5) for now
12097 +       if (ov->bclass == BCL_OV518) {
12098 +               if (packetsize == -1) {
12099 +                       ov518_set_packet_size(ov, 640);
12100 +               } else {
12101 +                       info("Forcing packet size to %d", packetsize);
12102 +                       ov518_set_packet_size(ov, packetsize);
12103 +               }
12104         } else {
12105 +               if (packetsize == -1) {
12106 +                       ov511_set_packet_size(ov, size);
12107 +               } else {
12108                         info("Forcing packet size to %d", packetsize);
12109 -                       ov51x_set_packet_size(ov, packetsize);
12110 +                       ov511_set_packet_size(ov, packetsize);
12111 +               }
12112         }
12113  
12114         for (n = 0; n < OV511_NUMSBUF; n++) {
12115                 urb = usb_alloc_urb(FRAMES_PER_DESC);
12116 -       
12117                 if (!urb) {
12118                         err("init isoc: usb_alloc_urb ret. NULL");
12119                         return -ENOMEM;
12120                 }
12121                 ov->sbuf[n].urb = urb;
12122                 urb->dev = ov->dev;
12123 -               urb->context = ov;
12124 +               urb->context = &ov->sbuf[n];
12125                 urb->pipe = usb_rcvisocpipe(ov->dev, OV511_ENDPOINT_ADDRESS);
12126                 urb->transfer_flags = USB_ISO_ASAP;
12127                 urb->transfer_buffer = ov->sbuf[n].data;
12128 @@ -4382,31 +4244,23 @@
12129         for (n = 0; n < OV511_NUMSBUF; n++) {
12130                 ov->sbuf[n].urb->dev = ov->dev;
12131                 err = usb_submit_urb(ov->sbuf[n].urb);
12132 -               if (err)
12133 +               if (err) {
12134                         err("init isoc: usb_submit_urb(%d) ret %d", n, err);
12135 +                       return err;
12136 +               }
12137         }
12138  
12139         return 0;
12140  }
12141  
12142 -static void 
12143 -ov51x_stop_isoc(struct usb_ov511 *ov)
12144 +static void
12145 +ov51x_unlink_isoc(struct usb_ov511 *ov)
12146  {
12147         int n;
12148  
12149 -       if (!ov->streaming || !ov->dev)
12150 -               return;
12151 -
12152 -       PDEBUG(3, "*** Stopping capture ***");
12153 -
12154 -       ov51x_set_packet_size(ov, 0);
12155 -
12156 -       ov->streaming = 0;
12157 -
12158         /* Unschedule all of the iso td's */
12159         for (n = OV511_NUMSBUF - 1; n >= 0; n--) {
12160                 if (ov->sbuf[n].urb) {
12161 -                       ov->sbuf[n].urb->next = NULL;
12162                         usb_unlink_urb(ov->sbuf[n].urb);
12163                         usb_free_urb(ov->sbuf[n].urb);
12164                         ov->sbuf[n].urb = NULL;
12165 @@ -4414,7 +4268,25 @@
12166         }
12167  }
12168  
12169 -static int 
12170 +static void
12171 +ov51x_stop_isoc(struct usb_ov511 *ov)
12172 +{
12173 +       if (!ov->streaming || !ov->dev)
12174 +               return;
12175 +
12176 +       PDEBUG(3, "*** Stopping capture ***");
12177 +
12178 +       if (ov->bclass == BCL_OV518)
12179 +               ov518_set_packet_size(ov, 0);
12180 +       else
12181 +               ov511_set_packet_size(ov, 0);
12182 +
12183 +       ov->streaming = 0;
12184 +
12185 +       ov51x_unlink_isoc(ov);
12186 +}
12187 +
12188 +static int
12189  ov51x_new_frame(struct usb_ov511 *ov, int framenum)
12190  {
12191         struct ov511_frame *frame;
12192 @@ -4436,7 +4308,7 @@
12193  
12194         frame = &ov->frame[framenum];
12195  
12196 -       PDEBUG(4, "framenum = %d, width = %d, height = %d", framenum, 
12197 +       PDEBUG(4, "framenum = %d, width = %d, height = %d", framenum,
12198                frame->width, frame->height);
12199  
12200         frame->grabstate = FRAME_GRABBING;
12201 @@ -4465,172 +4337,133 @@
12202   *
12203   ***************************************************************************/
12204  
12205 -static int 
12206 -ov51x_alloc(struct usb_ov511 *ov)
12207 +/*
12208 + * - You must acquire buf_lock before entering this function.
12209 + * - Because this code will free any non-null pointer, you must be sure to null
12210 + *   them if you explicitly free them somewhere else!
12211 + */
12212 +static void
12213 +ov51x_do_dealloc(struct usb_ov511 *ov)
12214  {
12215         int i;
12216 -       const int w = ov->maxwidth;
12217 -       const int h = ov->maxheight;
12218 -       const int data_bufsize = OV511_NUMFRAMES * MAX_DATA_SIZE(w, h);
12219 -       const int raw_bufsize = OV511_NUMFRAMES * MAX_RAW_DATA_SIZE(w, h);
12220 -
12221         PDEBUG(4, "entered");
12222 -       down(&ov->buf_lock);
12223 -
12224 -       if (ov->buf_state == BUF_PEND_DEALLOC) {
12225 -               ov->buf_state = BUF_ALLOCATED;
12226 -               del_timer(&ov->buf_timer);
12227 -       }
12228 -
12229 -       if (ov->buf_state == BUF_ALLOCATED)
12230 -               goto out;
12231  
12232 -       ov->fbuf = rvmalloc(data_bufsize);
12233 -       if (!ov->fbuf)
12234 -               goto error;
12235 -
12236 -       ov->rawfbuf = vmalloc(raw_bufsize);
12237 -       if (!ov->rawfbuf) {
12238 -               rvfree(ov->fbuf, data_bufsize);
12239 +       if (ov->fbuf) {
12240 +               rvfree(ov->fbuf, OV511_NUMFRAMES
12241 +                      * MAX_DATA_SIZE(ov->maxwidth, ov->maxheight));
12242                 ov->fbuf = NULL;
12243 -               goto error;
12244         }
12245 -       memset(ov->rawfbuf, 0, raw_bufsize);
12246  
12247 -       ov->tempfbuf = vmalloc(raw_bufsize);
12248 -       if (!ov->tempfbuf) {
12249 +       if (ov->rawfbuf) {
12250                 vfree(ov->rawfbuf);
12251                 ov->rawfbuf = NULL;
12252 -               rvfree(ov->fbuf, data_bufsize);
12253 -               ov->fbuf = NULL;
12254 -               goto error;
12255         }
12256 -       memset(ov->tempfbuf, 0, raw_bufsize);
12257  
12258 -       for (i = 0; i < OV511_NUMSBUF; i++) {
12259 -               ov->sbuf[i].data = kmalloc(FRAMES_PER_DESC *
12260 -                       MAX_FRAME_SIZE_PER_DESC, GFP_KERNEL);
12261 -               if (!ov->sbuf[i].data) {
12262 -                       while (--i) {
12263 -                               kfree(ov->sbuf[i].data);
12264 -                               ov->sbuf[i].data = NULL;
12265 -                       }
12266 -                       vfree(ov->tempfbuf);
12267 -                       ov->tempfbuf = NULL;
12268 -                       vfree(ov->rawfbuf);
12269 -                       ov->rawfbuf = NULL;
12270 -                       rvfree(ov->fbuf, data_bufsize);
12271 -                       ov->fbuf = NULL;
12272 +       if (ov->tempfbuf) {
12273 +               vfree(ov->tempfbuf);
12274 +               ov->tempfbuf = NULL;
12275 +       }
12276  
12277 -                       goto error;
12278 +       for (i = 0; i < OV511_NUMSBUF; i++) {
12279 +               if (ov->sbuf[i].data) {
12280 +                       kfree(ov->sbuf[i].data);
12281 +                       ov->sbuf[i].data = NULL;
12282                 }
12283 -               PDEBUG(4, "sbuf[%d] @ %p", i, ov->sbuf[i].data);
12284         }
12285  
12286         for (i = 0; i < OV511_NUMFRAMES; i++) {
12287 -               ov->frame[i].data = ov->fbuf + i * MAX_DATA_SIZE(w, h);
12288 -               ov->frame[i].rawdata = ov->rawfbuf 
12289 -                + i * MAX_RAW_DATA_SIZE(w, h);
12290 -               ov->frame[i].tempdata = ov->tempfbuf 
12291 -                + i * MAX_RAW_DATA_SIZE(w, h);
12292 -               PDEBUG(4, "frame[%d] @ %p", i, ov->frame[i].data);
12293 +               ov->frame[i].data = NULL;
12294 +               ov->frame[i].rawdata = NULL;
12295 +               ov->frame[i].tempdata = NULL;
12296 +               if (ov->frame[i].compbuf) {
12297 +                       free_page((unsigned long) ov->frame[i].compbuf);
12298 +                       ov->frame[i].compbuf = NULL;
12299 +               }
12300         }
12301  
12302 -       ov->buf_state = BUF_ALLOCATED;
12303 -out:
12304 -       up(&ov->buf_lock);
12305 -       PDEBUG(4, "leaving");
12306 -       return 0;
12307 -error:
12308 +       PDEBUG(4, "buffer memory deallocated");
12309         ov->buf_state = BUF_NOT_ALLOCATED;
12310 -       up(&ov->buf_lock);
12311 -       PDEBUG(4, "errored");
12312 -       return -ENOMEM;
12313 +       PDEBUG(4, "leaving");
12314  }
12315  
12316 -/* 
12317 - * - You must acquire buf_lock before entering this function.
12318 - * - Because this code will free any non-null pointer, you must be sure to null
12319 - *   them if you explicitly free them somewhere else!
12320 - */
12321 -static void 
12322 -ov51x_do_dealloc(struct usb_ov511 *ov)
12323 +static int
12324 +ov51x_alloc(struct usb_ov511 *ov)
12325  {
12326         int i;
12327 +       const int w = ov->maxwidth;
12328 +       const int h = ov->maxheight;
12329 +       const int data_bufsize = OV511_NUMFRAMES * MAX_DATA_SIZE(w, h);
12330 +       const int raw_bufsize = OV511_NUMFRAMES * MAX_RAW_DATA_SIZE(w, h);
12331 +
12332         PDEBUG(4, "entered");
12333 +       down(&ov->buf_lock);
12334  
12335 -       if (ov->fbuf) {
12336 -               rvfree(ov->fbuf, OV511_NUMFRAMES
12337 -                      * MAX_DATA_SIZE(ov->maxwidth, ov->maxheight));
12338 -               ov->fbuf = NULL;
12339 +       if (ov->buf_state == BUF_PEND_DEALLOC) {
12340 +               ov->buf_state = BUF_ALLOCATED;
12341 +               del_timer(&ov->buf_timer);
12342         }
12343  
12344 -       if (ov->rawfbuf) {
12345 -               vfree(ov->rawfbuf);
12346 -               ov->rawfbuf = NULL;
12347 -       }
12348 +       if (ov->buf_state == BUF_ALLOCATED)
12349 +               goto out;
12350 +
12351 +       ov->fbuf = rvmalloc(data_bufsize);
12352 +       if (!ov->fbuf)
12353 +               goto error;
12354 +
12355 +       ov->rawfbuf = vmalloc(raw_bufsize);
12356 +       if (!ov->rawfbuf)
12357 +               goto error;
12358 +
12359 +       memset(ov->rawfbuf, 0, raw_bufsize);
12360  
12361 -       if (ov->tempfbuf) {
12362 -               vfree(ov->tempfbuf);
12363 -               ov->tempfbuf = NULL;
12364 -       }
12365 +       ov->tempfbuf = vmalloc(raw_bufsize);
12366 +       if (!ov->tempfbuf)
12367 +               goto error;
12368 +
12369 +       memset(ov->tempfbuf, 0, raw_bufsize);
12370  
12371         for (i = 0; i < OV511_NUMSBUF; i++) {
12372 -               if (ov->sbuf[i].data) {
12373 -                       kfree(ov->sbuf[i].data);
12374 -                       ov->sbuf[i].data = NULL;
12375 -               }
12376 -       }
12377 +               ov->sbuf[i].data = kmalloc(FRAMES_PER_DESC *
12378 +                       MAX_FRAME_SIZE_PER_DESC, GFP_KERNEL);
12379 +               if (!ov->sbuf[i].data)
12380 +                       goto error;
12381  
12382 -       for (i = 0; i < OV511_NUMFRAMES; i++) {
12383 -               ov->frame[i].data = NULL;
12384 -               ov->frame[i].rawdata = NULL;
12385 -               ov->frame[i].tempdata = NULL;
12386 +               PDEBUG(4, "sbuf[%d] @ %p", i, ov->sbuf[i].data);
12387         }
12388  
12389 -       PDEBUG(4, "buffer memory deallocated");
12390 -       ov->buf_state = BUF_NOT_ALLOCATED;
12391 -       PDEBUG(4, "leaving");
12392 -}
12393 +       for (i = 0; i < OV511_NUMFRAMES; i++) {
12394 +               ov->frame[i].data = ov->fbuf + i * MAX_DATA_SIZE(w, h);
12395 +               ov->frame[i].rawdata = ov->rawfbuf
12396 +                + i * MAX_RAW_DATA_SIZE(w, h);
12397 +               ov->frame[i].tempdata = ov->tempfbuf
12398 +                + i * MAX_RAW_DATA_SIZE(w, h);
12399  
12400 -static void 
12401 -ov51x_buf_callback(unsigned long data)
12402 -{
12403 -       struct usb_ov511 *ov = (struct usb_ov511 *)data;
12404 -       PDEBUG(4, "entered");
12405 -       down(&ov->buf_lock);
12406 +               ov->frame[i].compbuf =
12407 +                (unsigned char *) __get_free_page(GFP_KERNEL);
12408 +               if (!ov->frame[i].compbuf)
12409 +                       goto error;
12410  
12411 -       if (ov->buf_state == BUF_PEND_DEALLOC)
12412 -               ov51x_do_dealloc(ov);
12413 +               PDEBUG(4, "frame[%d] @ %p", i, ov->frame[i].data);
12414 +       }
12415  
12416 +       ov->buf_state = BUF_ALLOCATED;
12417 +out:
12418         up(&ov->buf_lock);
12419         PDEBUG(4, "leaving");
12420 +       return 0;
12421 +error:
12422 +       ov51x_do_dealloc(ov);
12423 +       up(&ov->buf_lock);
12424 +       PDEBUG(4, "errored");
12425 +       return -ENOMEM;
12426  }
12427  
12428 -static void 
12429 +static void
12430  ov51x_dealloc(struct usb_ov511 *ov, int now)
12431  {
12432 -       struct timer_list *bt = &(ov->buf_timer);
12433         PDEBUG(4, "entered");
12434         down(&ov->buf_lock);
12435 -
12436 -       PDEBUG(4, "deallocating buffer memory %s", now ? "now" : "later");
12437 -
12438 -       if (ov->buf_state == BUF_PEND_DEALLOC) {
12439 -               ov->buf_state = BUF_ALLOCATED;
12440 -               del_timer(bt);
12441 -       }
12442 -
12443 -       if (now)
12444 -               ov51x_do_dealloc(ov);
12445 -       else {
12446 -               ov->buf_state = BUF_PEND_DEALLOC;
12447 -               init_timer(bt);
12448 -               bt->function = ov51x_buf_callback;
12449 -               bt->data = (unsigned long)ov;
12450 -               bt->expires = jiffies + buf_timeout * HZ;
12451 -               add_timer(bt);
12452 -       }
12453 +       ov51x_do_dealloc(ov);
12454         up(&ov->buf_lock);
12455         PDEBUG(4, "leaving");
12456  }
12457 @@ -4641,7 +4474,7 @@
12458   *
12459   ***************************************************************************/
12460  
12461 -static int 
12462 +static int
12463  ov51x_v4l1_open(struct video_device *vdev, int flags)
12464  {
12465         struct usb_ov511 *ov = vdev->priv;
12466 @@ -4652,17 +4485,18 @@
12467         down(&ov->lock);
12468  
12469         err = -EBUSY;
12470 -       if (ov->user) 
12471 +       if (ov->user)
12472                 goto out;
12473  
12474 -       err = -ENOMEM;
12475 -       if (ov51x_alloc(ov))
12476 +       err = ov51x_alloc(ov);
12477 +       if (err < 0)
12478                 goto out;
12479  
12480         ov->sub_flag = 0;
12481  
12482         /* In case app doesn't set them... */
12483 -       if (ov51x_set_default_params(ov) < 0)
12484 +       err = ov51x_set_default_params(ov);
12485 +       if (err < 0)
12486                 goto out;
12487  
12488         /* Make sure frames are reset */
12489 @@ -4671,7 +4505,7 @@
12490                 ov->frame[i].bytes_read = 0;
12491         }
12492  
12493 -       /* If compression is on, make sure now that a 
12494 +       /* If compression is on, make sure now that a
12495          * decompressor can be loaded */
12496         if (ov->compress && !ov->decomp_ops) {
12497                 err = request_decompressor(ov);
12498 @@ -4686,23 +4520,22 @@
12499         }
12500  
12501         ov->user++;
12502 -       
12503 +
12504         if (ov->led_policy == LED_AUTO)
12505                 ov51x_led_control(ov, 1);
12506  
12507  out:
12508         up(&ov->lock);
12509 -
12510         return err;
12511  }
12512  
12513 -static void 
12514 +static void
12515  ov51x_v4l1_close(struct video_device *vdev)
12516  {
12517         struct usb_ov511 *ov = vdev->priv;
12518  
12519         PDEBUG(4, "ov511_close");
12520 -       
12521 +
12522         down(&ov->lock);
12523  
12524         ov->user--;
12525 @@ -4731,129 +4564,93 @@
12526                 kfree(ov);
12527                 ov = NULL;
12528         }
12529 -}
12530 -
12531 -static int 
12532 -ov51x_v4l1_init_done(struct video_device *vdev)
12533 -{
12534 -#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
12535 -       create_proc_ov511_cam(vdev->priv);
12536 -#endif
12537 -
12538 -       return 0;
12539 -}
12540  
12541 -static long 
12542 -ov51x_v4l1_write(struct video_device *vdev, const char *buf,
12543 -                unsigned long count, int noblock)
12544 -{
12545 -       return -EINVAL;
12546 +       return;
12547  }
12548  
12549  /* Do not call this function directly! */
12550 -static int 
12551 -ov51x_v4l1_ioctl_internal(struct video_device *vdev, unsigned int cmd,
12552 +static int
12553 +ov51x_v4l1_ioctl_internal(struct usb_ov511 *ov, unsigned int cmd,
12554                           void *arg)
12555  {
12556 -       struct usb_ov511 *ov = vdev->priv;
12557 -
12558         PDEBUG(5, "IOCtl: 0x%X", cmd);
12559  
12560         if (!ov->dev)
12561 -               return -EIO;    
12562 +               return -EIO;
12563  
12564         switch (cmd) {
12565         case VIDIOCGCAP:
12566         {
12567 -               struct video_capability b;
12568 +               struct video_capability *b = arg;
12569  
12570                 PDEBUG(4, "VIDIOCGCAP");
12571  
12572 -               memset(&b, 0, sizeof(b));
12573 -               sprintf(b.name, "%s USB Camera",
12574 -                       ov->bridge == BRG_OV511 ? "OV511" :
12575 -                       ov->bridge == BRG_OV511PLUS ? "OV511+" :
12576 -                       ov->bridge == BRG_OV518 ? "OV518" :
12577 -                       ov->bridge == BRG_OV518PLUS ? "OV518+" :
12578 -                       "unknown");
12579 -               b.type = VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE;
12580 -               if (ov->has_tuner)
12581 -                       b.type |= VID_TYPE_TUNER;
12582 -               b.channels = ov->num_inputs;
12583 -               b.audios = ov->has_audio_proc ? 1:0;
12584 -               b.maxwidth = ov->maxwidth;
12585 -               b.maxheight = ov->maxheight;
12586 -               b.minwidth = ov->minwidth;
12587 -               b.minheight = ov->minheight;
12588 +               memset(b, 0, sizeof(struct video_capability));
12589 +               sprintf(b->name, "%s USB Camera",
12590 +                       symbolic(brglist, ov->bridge));
12591 +               b->type = VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE;
12592 +               b->channels = ov->num_inputs;
12593 +               b->audios = 0;
12594 +               b->maxwidth = ov->maxwidth;
12595 +               b->maxheight = ov->maxheight;
12596 +               b->minwidth = ov->minwidth;
12597 +               b->minheight = ov->minheight;
12598  
12599 -               if (copy_to_user(arg, &b, sizeof(b)))
12600 -                       return -EFAULT;
12601 -                               
12602                 return 0;
12603         }
12604         case VIDIOCGCHAN:
12605         {
12606 -               struct video_channel v;
12607 +               struct video_channel *v = arg;
12608  
12609                 PDEBUG(4, "VIDIOCGCHAN");
12610  
12611 -               if (copy_from_user(&v, arg, sizeof(v)))
12612 -                       return -EFAULT;
12613 -
12614 -               if ((unsigned)(v.channel) >= ov->num_inputs) {
12615 -                       err("Invalid channel (%d)", v.channel);
12616 +               if ((unsigned)(v->channel) >= ov->num_inputs) {
12617 +                       err("Invalid channel (%d)", v->channel);
12618                         return -EINVAL;
12619                 }
12620  
12621 -               v.norm = ov->norm;
12622 -               v.type = (ov->has_tuner) ? VIDEO_TYPE_TV : VIDEO_TYPE_CAMERA;
12623 -               v.flags = (ov->has_tuner) ? VIDEO_VC_TUNER : 0;
12624 -               v.flags |= (ov->has_audio_proc) ? VIDEO_VC_AUDIO : 0;
12625 -//             v.flags |= (ov->has_decoder) ? VIDEO_VC_NORM : 0;
12626 -               v.tuners = (ov->has_tuner) ? 1:0;
12627 -               decoder_get_input_name(ov, v.channel, v.name);
12628 +               v->norm = ov->norm;
12629 +               v->type = VIDEO_TYPE_CAMERA;
12630 +               v->flags = 0;
12631 +//             v->flags |= (ov->has_decoder) ? VIDEO_VC_NORM : 0;
12632 +               v->tuners = 0;
12633 +               decoder_get_input_name(ov, v->channel, v->name);
12634  
12635 -               if (copy_to_user(arg, &v, sizeof(v)))
12636 -                       return -EFAULT;
12637 -                               
12638                 return 0;
12639         }
12640         case VIDIOCSCHAN:
12641         {
12642 -               struct video_channel v;
12643 +               struct video_channel *v = arg;
12644                 int err;
12645  
12646                 PDEBUG(4, "VIDIOCSCHAN");
12647  
12648 -               if (copy_from_user(&v, arg, sizeof(v)))
12649 -                       return -EFAULT;
12650 -
12651                 /* Make sure it's not a camera */
12652                 if (!ov->has_decoder) {
12653 -                       if (v.channel == 0)
12654 +                       if (v->channel == 0)
12655                                 return 0;
12656                         else
12657                                 return -EINVAL;
12658                 }
12659  
12660 -               if (v.norm != VIDEO_MODE_PAL &&
12661 -                   v.norm != VIDEO_MODE_NTSC &&
12662 -                   v.norm != VIDEO_MODE_SECAM &&
12663 -                   v.norm != VIDEO_MODE_AUTO) {
12664 -                       err("Invalid norm (%d)", v.norm);
12665 +               if (v->norm != VIDEO_MODE_PAL &&
12666 +                   v->norm != VIDEO_MODE_NTSC &&
12667 +                   v->norm != VIDEO_MODE_SECAM &&
12668 +                   v->norm != VIDEO_MODE_AUTO) {
12669 +                       err("Invalid norm (%d)", v->norm);
12670                         return -EINVAL;
12671                 }
12672  
12673 -               if ((unsigned)(v.channel) >= ov->num_inputs) {
12674 -                       err("Invalid channel (%d)", v.channel);
12675 +               if ((unsigned)(v->channel) >= ov->num_inputs) {
12676 +                       err("Invalid channel (%d)", v->channel);
12677                         return -EINVAL;
12678                 }
12679  
12680 -               err = decoder_set_input(ov, v.channel);
12681 +               err = decoder_set_input(ov, v->channel);
12682                 if (err)
12683                         return err;
12684  
12685 -               err = decoder_set_norm(ov, v.norm);
12686 +               err = decoder_set_norm(ov, v->norm);
12687                 if (err)
12688                         return err;
12689  
12690 @@ -4861,43 +4658,37 @@
12691         }
12692         case VIDIOCGPICT:
12693         {
12694 -               struct video_picture p;
12695 +               struct video_picture *p = arg;
12696  
12697                 PDEBUG(4, "VIDIOCGPICT");
12698  
12699 -               memset(&p, 0, sizeof(p));
12700 -
12701 -               if (sensor_get_picture(ov, &p))
12702 +               memset(p, 0, sizeof(struct video_picture));
12703 +               if (sensor_get_picture(ov, p))
12704                         return -EIO;
12705  
12706 -               if (copy_to_user(arg, &p, sizeof(p)))
12707 -                       return -EFAULT;
12708 -
12709                 return 0;
12710         }
12711         case VIDIOCSPICT:
12712         {
12713 -               struct video_picture p;
12714 +               struct video_picture *p = arg;
12715                 int i;
12716  
12717                 PDEBUG(4, "VIDIOCSPICT");
12718  
12719 -               if (copy_from_user(&p, arg, sizeof(p)))
12720 -                       return -EFAULT;
12721 -
12722 -               if (!get_depth(p.palette))
12723 +               if (!get_depth(p->palette))
12724                         return -EINVAL;
12725  
12726 -               if (sensor_set_picture(ov, &p))
12727 +               if (sensor_set_picture(ov, p))
12728                         return -EIO;
12729  
12730 -               if (force_palette && p.palette != force_palette) {
12731 -                       info("Palette rejected (%d)", p.palette);
12732 +               if (force_palette && p->palette != force_palette) {
12733 +                       info("Palette rejected (%s)",
12734 +                            symbolic(v4l1_plist, p->palette));
12735                         return -EINVAL;
12736                 }
12737  
12738                 // FIXME: Format should be independent of frames
12739 -               if (p.palette != ov->frame[0].format) {
12740 +               if (p->palette != ov->frame[0].format) {
12741                         PDEBUG(4, "Detected format change");
12742  
12743                         /* If we're collecting previous frame wait
12744 @@ -4906,79 +4697,73 @@
12745                         if (signal_pending(current)) return -EINTR;
12746  
12747                         mode_init_regs(ov, ov->frame[0].width,
12748 -                               ov->frame[0].height, p.palette, ov->sub_flag);
12749 +                               ov->frame[0].height, p->palette, ov->sub_flag);
12750                 }
12751  
12752 -               PDEBUG(4, "Setting depth=%d, palette=%d", p.depth, p.palette);
12753 +               PDEBUG(4, "Setting depth=%d, palette=%s",
12754 +                      p->depth, symbolic(v4l1_plist, p->palette));
12755 +
12756                 for (i = 0; i < OV511_NUMFRAMES; i++) {
12757 -                       ov->frame[i].depth = p.depth;
12758 -                       ov->frame[i].format = p.palette;
12759 +                       ov->frame[i].depth = p->depth;
12760 +                       ov->frame[i].format = p->palette;
12761                 }
12762  
12763                 return 0;
12764         }
12765         case VIDIOCGCAPTURE:
12766         {
12767 -               int vf;
12768 +               int *vf = arg;
12769  
12770                 PDEBUG(4, "VIDIOCGCAPTURE");
12771  
12772 -               if (copy_from_user(&vf, arg, sizeof(vf)))
12773 -                       return -EFAULT;
12774 -               ov->sub_flag = vf;
12775 +               ov->sub_flag = *vf;
12776                 return 0;
12777         }
12778         case VIDIOCSCAPTURE:
12779         {
12780 -               struct video_capture vc;
12781 +               struct video_capture *vc = arg;
12782  
12783                 PDEBUG(4, "VIDIOCSCAPTURE");
12784  
12785 -               if (copy_from_user(&vc, arg, sizeof(vc)))
12786 -                       return -EFAULT;
12787 -               if (vc.flags)
12788 +               if (vc->flags)
12789                         return -EINVAL;
12790 -               if (vc.decimation)
12791 +               if (vc->decimation)
12792                         return -EINVAL;
12793  
12794 -               vc.x &= ~3L;
12795 -               vc.y &= ~1L;
12796 -               vc.y &= ~31L;
12797 -
12798 -               if (vc.width == 0)
12799 -                       vc.width = 32;
12800 -
12801 -               vc.height /= 16;
12802 -               vc.height *= 16;
12803 -               if (vc.height == 0)
12804 -                       vc.height = 16;
12805 -
12806 -               ov->subx = vc.x;
12807 -               ov->suby = vc.y;
12808 -               ov->subw = vc.width;
12809 -               ov->subh = vc.height;
12810 +               vc->x &= ~3L;
12811 +               vc->y &= ~1L;
12812 +               vc->y &= ~31L;
12813 +
12814 +               if (vc->width == 0)
12815 +                       vc->width = 32;
12816 +
12817 +               vc->height /= 16;
12818 +               vc->height *= 16;
12819 +               if (vc->height == 0)
12820 +                       vc->height = 16;
12821 +
12822 +               ov->subx = vc->x;
12823 +               ov->suby = vc->y;
12824 +               ov->subw = vc->width;
12825 +               ov->subh = vc->height;
12826  
12827                 return 0;
12828         }
12829         case VIDIOCSWIN:
12830         {
12831 -               struct video_window vw;
12832 +               struct video_window *vw = arg;
12833                 int i, result;
12834  
12835 -               if (copy_from_user(&vw, arg, sizeof(vw)))
12836 -                       return -EFAULT;
12837 -
12838 -               PDEBUG(4, "VIDIOCSWIN: width=%d, height=%d",
12839 -                       vw.width, vw.height);
12840 +               PDEBUG(4, "VIDIOCSWIN: %dx%d", vw->width, vw->height);
12841  
12842  #if 0
12843 -               if (vw.flags)
12844 +               if (vw->flags)
12845                         return -EINVAL;
12846 -               if (vw.clipcount)
12847 +               if (vw->clipcount)
12848                         return -EINVAL;
12849 -               if (vw.height != ov->maxheight)
12850 +               if (vw->height != ov->maxheight)
12851                         return -EINVAL;
12852 -               if (vw.width != ov->maxwidth)
12853 +               if (vw->width != ov->maxwidth)
12854                         return -EINVAL;
12855  #endif
12856  
12857 @@ -4987,140 +4772,131 @@
12858                 interruptible_sleep_on(&ov->wq);
12859                 if (signal_pending(current)) return -EINTR;
12860  
12861 -               result = mode_init_regs(ov, vw.width, vw.height,
12862 +               result = mode_init_regs(ov, vw->width, vw->height,
12863                         ov->frame[0].format, ov->sub_flag);
12864                 if (result < 0)
12865                         return result;
12866  
12867                 for (i = 0; i < OV511_NUMFRAMES; i++) {
12868 -                       ov->frame[i].width = vw.width;
12869 -                       ov->frame[i].height = vw.height;
12870 +                       ov->frame[i].width = vw->width;
12871 +                       ov->frame[i].height = vw->height;
12872                 }
12873  
12874                 return 0;
12875         }
12876         case VIDIOCGWIN:
12877         {
12878 -               struct video_window vw;
12879 -
12880 -               memset(&vw, 0, sizeof(vw));
12881 -               vw.x = 0;               /* FIXME */
12882 -               vw.y = 0;
12883 -               vw.width = ov->frame[0].width;
12884 -               vw.height = ov->frame[0].height;
12885 -               vw.flags = 30;
12886 +               struct video_window *vw = arg;
12887  
12888 -               PDEBUG(4, "VIDIOCGWIN: %dx%d", vw.width, vw.height);
12889 +               memset(vw, 0, sizeof(struct video_window));
12890 +               vw->x = 0;              /* FIXME */
12891 +               vw->y = 0;
12892 +               vw->width = ov->frame[0].width;
12893 +               vw->height = ov->frame[0].height;
12894 +               vw->flags = 30;
12895  
12896 -               if (copy_to_user(arg, &vw, sizeof(vw)))
12897 -                       return -EFAULT;
12898 +               PDEBUG(4, "VIDIOCGWIN: %dx%d", vw->width, vw->height);
12899  
12900                 return 0;
12901         }
12902         case VIDIOCGMBUF:
12903         {
12904 -               struct video_mbuf vm;
12905 +               struct video_mbuf *vm = arg;
12906                 int i;
12907  
12908                 PDEBUG(4, "VIDIOCGMBUF");
12909  
12910 -               memset(&vm, 0, sizeof(vm));
12911 -               vm.size = OV511_NUMFRAMES
12912 -                       * MAX_DATA_SIZE(ov->maxwidth, ov->maxheight);
12913 -               vm.frames = OV511_NUMFRAMES;
12914 +               memset(vm, 0, sizeof(struct video_mbuf));
12915 +               vm->size = OV511_NUMFRAMES
12916 +                          * MAX_DATA_SIZE(ov->maxwidth, ov->maxheight);
12917 +               vm->frames = OV511_NUMFRAMES;
12918  
12919 -               vm.offsets[0] = 0;
12920 +               vm->offsets[0] = 0;
12921                 for (i = 1; i < OV511_NUMFRAMES; i++) {
12922 -                       vm.offsets[i] = vm.offsets[i-1]
12923 +                       vm->offsets[i] = vm->offsets[i-1]
12924                            + MAX_DATA_SIZE(ov->maxwidth, ov->maxheight);
12925                 }
12926  
12927 -               if (copy_to_user((void *)arg, (void *)&vm, sizeof(vm)))
12928 -                       return -EFAULT;
12929 -
12930                 return 0;
12931         }
12932         case VIDIOCMCAPTURE:
12933         {
12934 -               struct video_mmap vm;
12935 +               struct video_mmap *vm = arg;
12936                 int ret, depth;
12937 +               unsigned int f = vm->frame;
12938  
12939 -               if (copy_from_user((void *)&vm, (void *)arg, sizeof(vm)))
12940 -                       return -EFAULT;
12941 -
12942 -               PDEBUG(4, "CMCAPTURE");
12943 -               PDEBUG(4, "frame: %d, size: %dx%d, format: %d",
12944 -                       vm.frame, vm.width, vm.height, vm.format);
12945 +               PDEBUG(4, "VIDIOCMCAPTURE: frame: %d, %dx%d, %s", f, vm->width,
12946 +                       vm->height, symbolic(v4l1_plist, vm->format));
12947  
12948 -               depth = get_depth(vm.format);
12949 +               depth = get_depth(vm->format);
12950                 if (!depth) {
12951 -                       err("VIDIOCMCAPTURE: invalid format (%d)", vm.format);
12952 +                       err("VIDIOCMCAPTURE: invalid format (%s)",
12953 +                           symbolic(v4l1_plist, vm->format));
12954                         return -EINVAL;
12955                 }
12956  
12957 -               if ((unsigned)vm.frame >= OV511_NUMFRAMES) {
12958 -                       err("VIDIOCMCAPTURE: invalid frame (%d)", vm.frame);
12959 +               if (f >= OV511_NUMFRAMES) {
12960 +                       err("VIDIOCMCAPTURE: invalid frame (%d)", f);
12961                         return -EINVAL;
12962                 }
12963  
12964 -               if (vm.width > ov->maxwidth 
12965 -                   || vm.height > ov->maxheight) {
12966 +               if (vm->width > ov->maxwidth
12967 +                   || vm->height > ov->maxheight) {
12968                         err("VIDIOCMCAPTURE: requested dimensions too big");
12969                         return -EINVAL;
12970                 }
12971  
12972 -               if (ov->frame[vm.frame].grabstate == FRAME_GRABBING) {
12973 +               if (ov->frame[f].grabstate == FRAME_GRABBING) {
12974                         PDEBUG(4, "VIDIOCMCAPTURE: already grabbing");
12975                         return -EBUSY;
12976                 }
12977  
12978 -               if (force_palette && vm.format != force_palette) {
12979 -                       info("palette rejected (%d)", vm.format);
12980 +               if (force_palette && (vm->format != force_palette)) {
12981 +                       info("palette rejected (%s)",
12982 +                            symbolic(v4l1_plist, vm->format));
12983                         return -EINVAL;
12984                 }
12985  
12986 -               if ((ov->frame[vm.frame].width != vm.width) ||
12987 -                   (ov->frame[vm.frame].height != vm.height) ||
12988 -                   (ov->frame[vm.frame].format != vm.format) ||
12989 -                   (ov->frame[vm.frame].sub_flag != ov->sub_flag) ||
12990 -                   (ov->frame[vm.frame].depth != depth)) {
12991 +               if ((ov->frame[f].width != vm->width) ||
12992 +                   (ov->frame[f].height != vm->height) ||
12993 +                   (ov->frame[f].format != vm->format) ||
12994 +                   (ov->frame[f].sub_flag != ov->sub_flag) ||
12995 +                   (ov->frame[f].depth != depth)) {
12996                         PDEBUG(4, "VIDIOCMCAPTURE: change in image parameters");
12997  
12998                         /* If we're collecting previous frame wait
12999                            before changing modes */
13000                         interruptible_sleep_on(&ov->wq);
13001                         if (signal_pending(current)) return -EINTR;
13002 -                       ret = mode_init_regs(ov, vm.width, vm.height,
13003 -                               vm.format, ov->sub_flag);
13004 +                       ret = mode_init_regs(ov, vm->width, vm->height,
13005 +                               vm->format, ov->sub_flag);
13006  #if 0
13007                         if (ret < 0) {
13008                                 PDEBUG(1, "Got error while initializing regs ");
13009                                 return ret;
13010                         }
13011  #endif
13012 -                       ov->frame[vm.frame].width = vm.width;
13013 -                       ov->frame[vm.frame].height = vm.height;
13014 -                       ov->frame[vm.frame].format = vm.format;
13015 -                       ov->frame[vm.frame].sub_flag = ov->sub_flag;
13016 -                       ov->frame[vm.frame].depth = depth;
13017 +                       ov->frame[f].width = vm->width;
13018 +                       ov->frame[f].height = vm->height;
13019 +                       ov->frame[f].format = vm->format;
13020 +                       ov->frame[f].sub_flag = ov->sub_flag;
13021 +                       ov->frame[f].depth = depth;
13022                 }
13023  
13024                 /* Mark it as ready */
13025 -               ov->frame[vm.frame].grabstate = FRAME_READY;
13026 +               ov->frame[f].grabstate = FRAME_READY;
13027  
13028 -               PDEBUG(4, "VIDIOCMCAPTURE: renewing frame %d", vm.frame);
13029 +               PDEBUG(4, "VIDIOCMCAPTURE: renewing frame %d", f);
13030  
13031 -               return ov51x_new_frame(ov, vm.frame);
13032 +               return ov51x_new_frame(ov, f);
13033         }
13034         case VIDIOCSYNC:
13035         {
13036 -               int fnum, rc;
13037 +               unsigned int fnum = *((unsigned int *) arg);
13038                 struct ov511_frame *frame;
13039 +               int rc;
13040  
13041 -               if (copy_from_user((void *)&fnum, arg, sizeof(int)))
13042 -                       return -EFAULT;
13043 -
13044 -               if ((unsigned)fnum >= OV511_NUMFRAMES) {
13045 +               if (fnum >= OV511_NUMFRAMES) {
13046                         err("VIDIOCSYNC: invalid frame (%d)", fnum);
13047                         return -EINVAL;
13048                 }
13049 @@ -5154,7 +4930,7 @@
13050                                         return ret;
13051                                 goto redo;
13052                         }
13053 -                       /* Fall through */                      
13054 +                       /* Fall through */
13055                 case FRAME_DONE:
13056                         if (ov->snap_enabled && !frame->snapshot) {
13057                                 int ret;
13058 @@ -5182,159 +4958,109 @@
13059         }
13060         case VIDIOCGFBUF:
13061         {
13062 -               struct video_buffer vb;
13063 -
13064 -               PDEBUG(4, "VIDIOCSCHAN");
13065 +               struct video_buffer *vb = arg;
13066  
13067 -               memset(&vb, 0, sizeof(vb));
13068 -               vb.base = NULL; /* frame buffer not supported, not used */
13069 +               PDEBUG(4, "VIDIOCGFBUF");
13070  
13071 -               if (copy_to_user((void *)arg, (void *)&vb, sizeof(vb)))
13072 -                       return -EFAULT;
13073 +               memset(vb, 0, sizeof(struct video_buffer));
13074  
13075                 return 0;
13076         }
13077         case VIDIOCGUNIT:
13078         {
13079 -               struct video_unit vu;
13080 +               struct video_unit *vu = arg;
13081  
13082                 PDEBUG(4, "VIDIOCGUNIT");
13083  
13084 -               memset(&vu, 0, sizeof(vu));
13085 -
13086 -               vu.video = ov->vdev.minor;      /* Video minor */
13087 -               vu.vbi = VIDEO_NO_UNIT;         /* VBI minor */
13088 -               vu.radio = VIDEO_NO_UNIT;       /* Radio minor */
13089 -               vu.audio = VIDEO_NO_UNIT;       /* Audio minor */
13090 -               vu.teletext = VIDEO_NO_UNIT;    /* Teletext minor */
13091 -
13092 -               if (copy_to_user((void *)arg, (void *)&vu, sizeof(vu)))
13093 -                       return -EFAULT;
13094 -
13095 -               return 0;
13096 -       }
13097 -       case VIDIOCGTUNER:
13098 -       {
13099 -               struct video_tuner v;
13100 -
13101 -               PDEBUG(4, "VIDIOCGTUNER");
13102 -
13103 -               if (copy_from_user(&v, arg, sizeof(v)))
13104 -                       return -EFAULT;
13105 -
13106 -               if (!ov->has_tuner || v.tuner)  // Only tuner 0
13107 -                       return -EINVAL;
13108 -
13109 -               strcpy(v.name, "Television");
13110 -
13111 -               // FIXME: Need a way to get the real values
13112 -               v.rangelow = 0;
13113 -               v.rangehigh = ~0;
13114 -
13115 -               v.flags = VIDEO_TUNER_PAL | VIDEO_TUNER_NTSC |
13116 -                   VIDEO_TUNER_SECAM;
13117 -               v.mode = 0;             /* FIXME:  Not sure what this is yet */
13118 -               v.signal = 0xFFFF;      /* unknown */
13119 -
13120 -               call_i2c_clients(ov, cmd, &v);
13121 -
13122 -               if (copy_to_user(arg, &v, sizeof(v)))
13123 -                       return -EFAULT;
13124 -
13125 -               return 0;
13126 -       }
13127 -       case VIDIOCSTUNER:
13128 -       {
13129 -               struct video_tuner v;
13130 -               int err;
13131 -
13132 -               PDEBUG(4, "VIDIOCSTUNER");
13133 -
13134 -               if (copy_from_user(&v, arg, sizeof(v)))
13135 -                       return -EFAULT;
13136 -
13137 -               /* Only no or one tuner for now */
13138 -               if (!ov->has_tuner || v.tuner)
13139 -                       return -EINVAL;
13140 -
13141 -               /* and it only has certain valid modes */
13142 -               if (v.mode != VIDEO_MODE_PAL &&
13143 -                   v.mode != VIDEO_MODE_NTSC &&
13144 -                   v.mode != VIDEO_MODE_SECAM) return -EOPNOTSUPP;
13145 -
13146 -               /* Is this right/necessary? */
13147 -               err = decoder_set_norm(ov, v.mode);
13148 -               if (err)
13149 -                       return err;
13150 +               memset(vu, 0, sizeof(struct video_unit));
13151  
13152 -               call_i2c_clients(ov, cmd, &v);
13153 +               vu->video = ov->vdev.minor;
13154 +               vu->vbi = VIDEO_NO_UNIT;
13155 +               vu->radio = VIDEO_NO_UNIT;
13156 +               vu->audio = VIDEO_NO_UNIT;
13157 +               vu->teletext = VIDEO_NO_UNIT;
13158  
13159                 return 0;
13160         }
13161 -       case VIDIOCGFREQ:
13162 -       {
13163 -               unsigned long v = ov->freq;
13164 +       default:
13165 +               PDEBUG(3, "Unsupported IOCtl: 0x%X", cmd);
13166 +               return -ENOIOCTLCMD;
13167 +       } /* end switch */
13168  
13169 -               PDEBUG(4, "VIDIOCGFREQ");
13170 +       return 0;
13171 +}
13172  
13173 -               if (!ov->has_tuner)
13174 -                       return -EINVAL;
13175 -#if 0
13176 -               /* FIXME: this is necessary for testing */
13177 -               v = 46*16;
13178 -#endif
13179 -               if (copy_to_user(arg, &v, sizeof(v)))
13180 -                       return -EFAULT;
13181 +/* This is implemented as video_generic_ioctl() in the new V4L's videodev.c */
13182 +static int
13183 +ov51x_v4l1_generic_ioctl(struct video_device *vdev, unsigned int cmd, void *arg)
13184 +{
13185 +       char    sbuf[128];
13186 +       void    *mbuf = NULL;
13187 +       void    *parg = NULL;
13188 +       int     err  = -EINVAL;
13189 +
13190 +       /*  Copy arguments into temp kernel buffer  */
13191 +       switch (_IOC_DIR(cmd)) {
13192 +       case _IOC_NONE:
13193 +               parg = arg;
13194 +               break;
13195 +       case _IOC_READ: /* some v4l ioctls are marked wrong ... */
13196 +       case _IOC_WRITE:
13197 +       case (_IOC_WRITE | _IOC_READ):
13198 +               if (_IOC_SIZE(cmd) <= sizeof(sbuf)) {
13199 +                       parg = sbuf;
13200 +               } else {
13201 +                       /* too big to allocate from stack */
13202 +                       mbuf = kmalloc(_IOC_SIZE(cmd), GFP_KERNEL);
13203 +                       if (NULL == mbuf)
13204 +                               return -ENOMEM;
13205 +                       parg = mbuf;
13206 +               }
13207  
13208 -               return 0;
13209 +               err = -EFAULT;
13210 +               if (copy_from_user(parg, arg, _IOC_SIZE(cmd)))
13211 +                       goto out;
13212 +               break;
13213         }
13214 -       case VIDIOCSFREQ:
13215 -       {
13216 -               unsigned long v;
13217 -
13218 -               if (!ov->has_tuner)
13219 -                       return -EINVAL;
13220 -
13221 -               if (copy_from_user(&v, arg, sizeof(v)))
13222 -                       return -EFAULT;
13223 -
13224 -               PDEBUG(4, "VIDIOCSFREQ: %lx", v);
13225  
13226 -               ov->freq = v;
13227 -               call_i2c_clients(ov, cmd, &v);
13228 +       err = ov51x_v4l1_ioctl_internal(vdev->priv, cmd, parg);
13229 +       if (err == -ENOIOCTLCMD)
13230 +               err = -EINVAL;
13231 +       if (err < 0)
13232 +               goto out;
13233  
13234 -               return 0;
13235 -       }
13236 -       case VIDIOCGAUDIO:
13237 -       case VIDIOCSAUDIO:
13238 +       /*  Copy results into user buffer  */
13239 +       switch (_IOC_DIR(cmd))
13240         {
13241 -               /* FIXME: Implement this... */
13242 -               return 0;
13243 +       case _IOC_READ:
13244 +       case (_IOC_WRITE | _IOC_READ):
13245 +               if (copy_to_user(arg, parg, _IOC_SIZE(cmd)))
13246 +                       err = -EFAULT;
13247 +               break;
13248         }
13249 -       default:
13250 -               PDEBUG(3, "Unsupported IOCtl: 0x%X", cmd);
13251 -               return -ENOIOCTLCMD;
13252 -       } /* end switch */
13253  
13254 -       return 0;
13255 +out:
13256 +       if (mbuf)
13257 +               kfree(mbuf);
13258 +       return err;
13259  }
13260  
13261 -static int 
13262 +static int
13263  ov51x_v4l1_ioctl(struct video_device *vdev, unsigned int cmd, void *arg)
13264  {
13265 -       int rc;
13266         struct usb_ov511 *ov = vdev->priv;
13267 +       int rc;
13268  
13269         if (down_interruptible(&ov->lock))
13270                 return -EINTR;
13271  
13272 -       rc = ov51x_v4l1_ioctl_internal(vdev, cmd, arg);
13273 +       rc = ov51x_v4l1_generic_ioctl(vdev, cmd, arg);
13274  
13275         up(&ov->lock);
13276         return rc;
13277  }
13278  
13279 -static inline long 
13280 +static inline long
13281  ov51x_v4l1_read(struct video_device *vdev, char *buf, unsigned long count,
13282                 int noblock)
13283  {
13284 @@ -5397,7 +5123,7 @@
13285  
13286         /* Wait while we're grabbing the image */
13287         PDEBUG(4, "Waiting image grabbing");
13288 -       rc = wait_event_interruptible(frame->wq, 
13289 +       rc = wait_event_interruptible(frame->wq,
13290                 (frame->grabstate == FRAME_DONE)
13291                 || (frame->grabstate == FRAME_ERROR));
13292  
13293 @@ -5444,7 +5170,7 @@
13294                 get_frame_length(frame));
13295  
13296         /* copy bytes to user space; we allow for partials reads */
13297 -//     if ((count + frame->bytes_read) 
13298 +//     if ((count + frame->bytes_read)
13299  //         > get_frame_length((struct ov511_frame *)frame))
13300  //             count = frame->scanlength - frame->bytes_read;
13301  
13302 @@ -5486,11 +5212,11 @@
13303         return rc;
13304  }
13305  
13306 -static int 
13307 +static int
13308  ov51x_v4l1_mmap(struct video_device *vdev, const char *adr, unsigned long size)
13309  {
13310 -       struct usb_ov511 *ov = vdev->priv;
13311         unsigned long start = (unsigned long)adr;
13312 +       struct usb_ov511 *ov = vdev->priv;
13313         unsigned long page, pos;
13314  
13315         if (ov->dev == NULL)
13316 @@ -5533,14 +5259,12 @@
13317         open:           ov51x_v4l1_open,
13318         close:          ov51x_v4l1_close,
13319         read:           ov51x_v4l1_read,
13320 -       write:          ov51x_v4l1_write,
13321         ioctl:          ov51x_v4l1_ioctl,
13322         mmap:           ov51x_v4l1_mmap,
13323 -       initialize:     ov51x_v4l1_init_done,
13324  };
13325  
13326  #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
13327 -static int 
13328 +static int
13329  ov51x_control_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
13330                     unsigned long ularg)
13331  {
13332 @@ -5761,10 +5485,10 @@
13333   *
13334   ***************************************************************************/
13335  
13336 -/* This initializes the OV7610, OV7620, or OV7620AE sensor. The OV7620AE uses
13337 +/* This initializes the OV7610, OV7620, or OV76BE sensor. The OV76BE uses
13338   * the same register settings as the OV7610, since they are very similar.
13339   */
13340 -static int 
13341 +static int
13342  ov7xx0_configure(struct usb_ov511 *ov)
13343  {
13344         int i, success;
13345 @@ -5915,7 +5639,7 @@
13346                         err("this to " EMAIL);
13347                         err("This is only a warning. You can attempt to use");
13348                         err("your camera anyway");
13349 -// Only issue a warning for now  
13350 +// Only issue a warning for now
13351  //                     return -1;
13352                 } else {
13353                         PDEBUG(1, "OV7xx0 initialized (method 2, %dx)", i+1);
13354 @@ -5932,20 +5656,23 @@
13355                 info("Sensor is an OV7610");
13356                 ov->sensor = SEN_OV7610;
13357         } else if ((rc & 3) == 1) {
13358 -               /* I don't know what's different about the 76BE yet */
13359 -               if (i2c_r(ov, 0x15) & 1)
13360 +               /* I don't know what's different about the 76BE yet. */
13361 +               if (i2c_r(ov, 0x15) & 1) {
13362                         info("Sensor is an OV7620AE");
13363 -               else
13364 +                       info("PLEASE REPORT THE EXISTENCE OF THIS SENSOR TO");
13365 +                       info("THE DRIVER AUTHOR");
13366 +               } else {
13367                         info("Sensor is an OV76BE");
13368 +               }
13369  
13370                 /* OV511+ will return all zero isoc data unless we
13371                  * configure the sensor as a 7620. Someone needs to
13372                  * find the exact reg. setting that causes this. */
13373                 if (ov->bridge == BRG_OV511PLUS) {
13374 -                       info("Enabling 511+/7620AE workaround");
13375 +                       info("Enabling 511+/76BE workaround");
13376                         ov->sensor = SEN_OV7620;
13377                 } else {
13378 -                       ov->sensor = SEN_OV7620AE;
13379 +                       ov->sensor = SEN_OV76BE;
13380                 }
13381         } else if ((rc & 3) == 0) {
13382                 info("Sensor is an OV7620");
13383 @@ -5981,7 +5708,7 @@
13384  }
13385  
13386  /* This initializes the OV6620, OV6630, OV6630AE, or OV6630AF sensor. */
13387 -static int 
13388 +static int
13389  ov6xx0_configure(struct usb_ov511 *ov)
13390  {
13391         int rc;
13392 @@ -5995,6 +5722,8 @@
13393                 /* The ratio of 0x0c and 0x0d  controls the white point */
13394                 { OV511_I2C_BUS, 0x0c, 0x24 },
13395                 { OV511_I2C_BUS, 0x0d, 0x24 },
13396 +               { OV511_I2C_BUS, 0x0f, 0x15 }, /* COMS */
13397 +               { OV511_I2C_BUS, 0x10, 0x75 }, /* AEC Exposure time */
13398                 { OV511_I2C_BUS, 0x12, 0x24 }, /* Enable AGC */
13399                 { OV511_I2C_BUS, 0x14, 0x04 },
13400                 /* 0x16: 0x06 helps frame stability with moving objects */
13401 @@ -6006,10 +5735,11 @@
13402                 { OV511_I2C_BUS, 0x2a, 0x04 }, /* Disable framerate adjust */
13403  //             { OV511_I2C_BUS, 0x2b, 0xac }, /* Framerate; Set 2a[7] first */
13404                 { OV511_I2C_BUS, 0x2d, 0x99 },
13405 +               { OV511_I2C_BUS, 0x33, 0xa0 }, /* Color Procesing Parameter */
13406                 { OV511_I2C_BUS, 0x34, 0xd2 }, /* Max A/D range */
13407                 { OV511_I2C_BUS, 0x38, 0x8b },
13408                 { OV511_I2C_BUS, 0x39, 0x40 },
13409 -               
13410 +
13411                 { OV511_I2C_BUS, 0x3c, 0x39 }, /* Enable AEC mode changing */
13412                 { OV511_I2C_BUS, 0x3c, 0x3c }, /* Change AEC mode */
13413                 { OV511_I2C_BUS, 0x3c, 0x24 }, /* Disable AEC mode changing */
13414 @@ -6089,7 +5819,7 @@
13415                  * control the color balance */
13416  //     /*OK?*/ { OV511_I2C_BUS, 0x4a, 0x80 }, // Check these
13417  //     /*OK?*/ { OV511_I2C_BUS, 0x4b, 0x80 },
13418 -//     /*U*/   { OV511_I2C_BUS, 0x4c, 0xd0 }, 
13419 +//     /*U*/   { OV511_I2C_BUS, 0x4c, 0xd0 },
13420         /*d2?*/ { OV511_I2C_BUS, 0x4d, 0x10 }, /* This reduces noise a bit */
13421         /*c1?*/ { OV511_I2C_BUS, 0x4e, 0x40 },
13422         /*04?*/ { OV511_I2C_BUS, 0x4f, 0x07 },
13423 @@ -6107,7 +5837,7 @@
13424         };
13425  
13426         PDEBUG(4, "starting sensor configuration");
13427 -       
13428 +
13429         if (init_ov_sensor(ov) < 0) {
13430                 err("Failed to read sensor ID. You might not have an OV6xx0,");
13431                 err("or it may be not responding. Report this to " EMAIL);
13432 @@ -6122,19 +5852,18 @@
13433         if (rc < 0) {
13434                 err("Error detecting sensor type");
13435                 return -1;
13436 -       } else if ((rc & 3) == 0) {
13437 -               info("Sensor is an OV6630");
13438 +       }
13439 +
13440 +       if ((rc & 3) == 0)
13441                 ov->sensor = SEN_OV6630;
13442 -       } else if ((rc & 3) == 1) {
13443 -               info("Sensor is an OV6620");
13444 +       else if ((rc & 3) == 1)
13445                 ov->sensor = SEN_OV6620;
13446 -       } else if ((rc & 3) == 2) {
13447 -               info("Sensor is an OV6630AE");
13448 +       else if ((rc & 3) == 2)
13449                 ov->sensor = SEN_OV6630;
13450 -       } else if ((rc & 3) == 3) {
13451 -               info("Sensor is an OV6630AF");
13452 +       else if ((rc & 3) == 3)
13453                 ov->sensor = SEN_OV6630;
13454 -       } 
13455 +
13456 +       info("Sensor is an %s", symbolic(senlist, ov->sensor));
13457  
13458         /* Set sensor-specific vars */
13459         ov->maxwidth = 352;
13460 @@ -6157,7 +5886,7 @@
13461                 if (write_regvals(ov, aRegvalsNorm6x30))
13462                         return -1;
13463         }
13464 -       
13465 +
13466         return 0;
13467  }
13468  
13469 @@ -6219,8 +5948,8 @@
13470  }
13471  
13472  /* This initializes the SAA7111A video decoder. */
13473 -static int 
13474 -saa7111a_configure(struct usb_ov511 *ov511)
13475 +static int
13476 +saa7111a_configure(struct usb_ov511 *ov)
13477  {
13478         int rc;
13479  
13480 @@ -6264,45 +5993,51 @@
13481         }
13482  #endif
13483  
13484 -       /* Set sensor-specific vars */
13485 -       ov511->maxwidth = 640;
13486 -       ov511->maxheight = 480;         /* Even/Odd fields */
13487 -       ov511->minwidth = 320;
13488 -       ov511->minheight = 240;         /* Even field only */
13489 -
13490 -       ov511->has_decoder = 1;
13491 -       ov511->num_inputs = 8;
13492 -       ov511->norm = VIDEO_MODE_AUTO;
13493 -       ov511->stop_during_set = 0;     /* Decoder guarantees stable image */
13494 +       /* 640x480 not supported with PAL */
13495 +       if (ov->pal) {
13496 +               ov->maxwidth = 320;
13497 +               ov->maxheight = 240;            /* Even field only */
13498 +       } else {
13499 +               ov->maxwidth = 640;
13500 +               ov->maxheight = 480;            /* Even/Odd fields */
13501 +       }
13502 +
13503 +       ov->minwidth = 320;
13504 +       ov->minheight = 240;            /* Even field only */
13505 +
13506 +       ov->has_decoder = 1;
13507 +       ov->num_inputs = 8;
13508 +       ov->norm = VIDEO_MODE_AUTO;
13509 +       ov->stop_during_set = 0;        /* Decoder guarantees stable image */
13510  
13511         /* Decoder doesn't change these values, so we use these instead of
13512          * acutally reading the registers (which doesn't work) */
13513 -       ov511->brightness = 0x80 << 8;
13514 -       ov511->contrast = 0x40 << 9;
13515 -       ov511->colour = 0x40 << 9;
13516 -       ov511->hue = 32768;
13517 +       ov->brightness = 0x80 << 8;
13518 +       ov->contrast = 0x40 << 9;
13519 +       ov->colour = 0x40 << 9;
13520 +       ov->hue = 32768;
13521  
13522         PDEBUG(4, "Writing SAA7111A registers");
13523 -       if (write_regvals(ov511, aRegvalsNormSAA7111A))
13524 +       if (write_regvals(ov, aRegvalsNormSAA7111A))
13525                 return -1;
13526  
13527         /* Detect version of decoder. This must be done after writing the
13528           * initial regs or the decoder will lock up. */
13529 -       rc = i2c_r(ov511, 0x00);
13530 +       rc = i2c_r(ov, 0x00);
13531  
13532         if (rc < 0) {
13533                 err("Error detecting sensor version");
13534                 return -1;
13535         } else {
13536                 info("Sensor is an SAA7111A (version 0x%x)", rc);
13537 -               ov511->sensor = SEN_SAA7111A;
13538 +               ov->sensor = SEN_SAA7111A;
13539         }
13540  
13541         // FIXME: Fix this for OV518(+)
13542         /* Latch to negative edge of clock. Otherwise, we get incorrect
13543          * colors and jitter in the digital signal. */
13544 -       if (ov511->bclass == BCL_OV511)
13545 -               reg_w(ov511, 0x11, 0x00);
13546 +       if (ov->bclass == BCL_OV511)
13547 +               reg_w(ov, 0x11, 0x00);
13548         else
13549                 warn("SAA7111A not yet supported with OV518/OV518+");
13550  
13551 @@ -6313,8 +6048,6 @@
13552  static int 
13553  ov511_configure(struct usb_ov511 *ov)
13554  {
13555 -       int i;
13556 -
13557         static struct ov511_regvals aRegvalsInit511[] = {
13558                 { OV511_REG_BUS, R51x_SYS_RESET,        0x7f },
13559                 { OV511_REG_BUS, R51x_SYS_INIT,         0x01 },
13560 @@ -6356,26 +6089,19 @@
13561                 goto error;
13562         }
13563  
13564 -       ov->desc = -1;
13565         PDEBUG (1, "CustomID = %d", ov->customid);
13566 -       for (i = 0; clist[i].id >= 0; i++) {
13567 -               if (ov->customid == clist[i].id) {
13568 -                       info("model: %s", clist[i].description);
13569 -                       ov->desc = i;
13570 -                       break;
13571 -               }
13572 -       }
13573 +       ov->desc = symbolic(camlist, ov->customid);
13574 +       info("model: %s", ov->desc);
13575  
13576 -       if (clist[i].id == -1) {
13577 +       if (0 == strcmp(ov->desc, NOT_DEFINED_STR)) {
13578                 err("Camera type (%d) not recognized", ov->customid);
13579                 err("Please notify " EMAIL " of the name,");
13580                 err("manufacturer, model, and this number of your camera.");
13581                 err("Also include the output of the detection process.");
13582         } 
13583  
13584 -       if (clist[i].id == 6) { /* USB Life TV (NTSC) */
13585 -               ov->tuner_type = 8;             /* Temic 4036FY5 3X 1981 */
13586 -       }
13587 +       if (ov->customid == 70)         /* USB Life TV (PAL/SECAM) */
13588 +               ov->pal = 1;
13589  
13590         if (write_regvals(ov, aRegvalsInit511)) goto error;
13591  
13592 @@ -6394,9 +6120,10 @@
13593  
13594         if (ov511_init_compression(ov)) goto error;
13595  
13596 -       ov51x_set_packet_size(ov, 0);
13597 +       ov->packet_numbering = 1;
13598 +       ov511_set_packet_size(ov, 0);
13599  
13600 -       ov->snap_enabled = snapshot;    
13601 +       ov->snap_enabled = snapshot;
13602  
13603         /* Test for 7xx0 */
13604         PDEBUG(3, "Testing for 0V7xx0");
13605 @@ -6415,21 +6142,21 @@
13606                         /* Test for 8xx0 */
13607                         PDEBUG(3, "Testing for 0V8xx0");
13608                         ov->primary_i2c_slave = OV8xx0_SID;
13609 -                       if (ov51x_set_slave_ids(ov, OV8xx0_SID))
13610 +                       if (ov51x_set_slave_ids(ov, OV8xx0_SID) < 0)
13611                                 goto error;
13612  
13613                         if (i2c_w(ov, 0x12, 0x80) < 0) {
13614                                 /* Test for SAA7111A */
13615                                 PDEBUG(3, "Testing for SAA7111A");
13616                                 ov->primary_i2c_slave = SAA7111A_SID;
13617 -                               if (ov51x_set_slave_ids(ov, SAA7111A_SID))
13618 +                               if (ov51x_set_slave_ids(ov, SAA7111A_SID) < 0)
13619                                         goto error;
13620  
13621                                 if (i2c_w(ov, 0x0d, 0x00) < 0) {
13622                                         /* Test for KS0127 */
13623                                         PDEBUG(3, "Testing for KS0127");
13624                                         ov->primary_i2c_slave = KS0127_SID;
13625 -                                       if (ov51x_set_slave_ids(ov, KS0127_SID))
13626 +                                       if (ov51x_set_slave_ids(ov, KS0127_SID) < 0)
13627                                                 goto error;
13628  
13629                                         if (i2c_w(ov, 0x10, 0x00) < 0) {
13630 @@ -6473,9 +6200,10 @@
13631  }
13632  
13633  /* This initializes the OV518/OV518+ and the sensor */
13634 -static int 
13635 +static int
13636  ov518_configure(struct usb_ov511 *ov)
13637  {
13638 +       /* For 518 and 518+ */
13639         static struct ov511_regvals aRegvalsInit518[] = {
13640                 { OV511_REG_BUS, R51x_SYS_RESET,        0x40 },
13641                 { OV511_REG_BUS, R51x_SYS_INIT,         0xe1 },
13642 @@ -6488,8 +6216,6 @@
13643                 { OV511_DONE_BUS, 0x0, 0x00},
13644         };
13645  
13646 -       /* New values, based on Windows driver. Since what they do is not
13647 -        * known yet, this may be incorrect. */
13648         static struct ov511_regvals aRegvalsNorm518[] = {
13649                 { OV511_REG_BUS, R51x_SYS_SNAP,         0x02 }, /* Reset */
13650                 { OV511_REG_BUS, R51x_SYS_SNAP,         0x01 }, /* Enable */
13651 @@ -6503,11 +6229,33 @@
13652                 { OV511_DONE_BUS, 0x0, 0x00 },
13653         };
13654  
13655 +       static struct ov511_regvals aRegvalsNorm518Plus[] = {
13656 +               { OV511_REG_BUS, R51x_SYS_SNAP,         0x02 }, /* Reset */
13657 +               { OV511_REG_BUS, R51x_SYS_SNAP,         0x01 }, /* Enable */
13658 +               { OV511_REG_BUS, 0x31,                  0x0f },
13659 +               { OV511_REG_BUS, 0x5d,                  0x03 },
13660 +               { OV511_REG_BUS, 0x24,                  0x9f },
13661 +               { OV511_REG_BUS, 0x25,                  0x90 },
13662 +               { OV511_REG_BUS, 0x20,                  0x60 }, /* Was 0x08 */
13663 +               { OV511_REG_BUS, 0x51,                  0x02 },
13664 +               { OV511_REG_BUS, 0x71,                  0x19 },
13665 +               { OV511_REG_BUS, 0x40,                  0xff },
13666 +               { OV511_REG_BUS, 0x41,                  0x42 },
13667 +               { OV511_REG_BUS, 0x46,                  0x00 },
13668 +               { OV511_REG_BUS, 0x33,                  0x04 },
13669 +               { OV511_REG_BUS, 0x21,                  0x19 },
13670 +               { OV511_REG_BUS, 0x3f,                  0x10 },
13671 +               { OV511_DONE_BUS, 0x0, 0x00 },
13672 +       };
13673 +
13674         PDEBUG(4, "");
13675  
13676         /* First 5 bits of custom ID reg are a revision ID on OV518 */
13677         info("Device revision %d", 0x1F & reg_r(ov, R511_SYS_CUST_ID));
13678  
13679 +       /* Give it the default description */
13680 +       ov->desc = symbolic(camlist, 0);
13681 +
13682         if (write_regvals(ov, aRegvalsInit518)) goto error;
13683  
13684         /* Set LED GPIO pin to output mode */
13685 @@ -6526,13 +6274,25 @@
13686                 warn("Compression required with OV518...enabling");
13687         }
13688  
13689 -       if (write_regvals(ov, aRegvalsNorm518)) goto error;
13690 +       if (ov->bridge == BRG_OV518) {
13691 +               if (write_regvals(ov, aRegvalsNorm518)) goto error;
13692 +       } else if (ov->bridge == BRG_OV518PLUS) {
13693 +               if (write_regvals(ov, aRegvalsNorm518Plus)) goto error;
13694 +       } else {
13695 +               err("Invalid bridge");
13696 +       }
13697  
13698         if (reg_w(ov, 0x2f, 0x80) < 0) goto error;
13699  
13700         if (ov518_init_compression(ov)) goto error;
13701  
13702 -       ov51x_set_packet_size(ov, 0);
13703 +       /* OV518+ has packet numbering turned on by default */
13704 +       if (ov->bridge == BRG_OV518)
13705 +               ov->packet_numbering = 0;
13706 +       else
13707 +               ov->packet_numbering = 1;
13708 +
13709 +       ov518_set_packet_size(ov, 0);
13710  
13711         ov->snap_enabled = snapshot;
13712  
13713 @@ -6577,9 +6337,8 @@
13714                 }
13715         }
13716  
13717 -       // FIXME: Sizes > 320x240 are not working yet
13718 -       ov->maxwidth = 320;
13719 -       ov->maxheight = 240;
13720 +       ov->maxwidth = 352;
13721 +       ov->maxheight = 288;
13722  
13723         // The OV518 cannot go as low as the sensor can
13724         ov->minwidth = 160;
13725 @@ -6640,46 +6399,42 @@
13726         ov->lightfreq = lightfreq;
13727         ov->num_inputs = 1;        /* Video decoder init functs. change this */
13728         ov->stop_during_set = !fastset;
13729 -       ov->tuner_type = tuner;
13730         ov->backlight = backlight;
13731 -
13732 +       ov->mirror = mirror;
13733         ov->auto_brt = autobright;
13734         ov->auto_gain = autogain;
13735         ov->auto_exp = autoexp;
13736  
13737         switch (dev->descriptor.idProduct) {
13738         case PROD_OV511:
13739 -               info("USB OV511 camera found");
13740                 ov->bridge = BRG_OV511;
13741                 ov->bclass = BCL_OV511;
13742                 break;
13743         case PROD_OV511PLUS:
13744 -               info("USB OV511+ camera found");
13745                 ov->bridge = BRG_OV511PLUS;
13746                 ov->bclass = BCL_OV511;
13747                 break;
13748         case PROD_OV518:
13749 -               info("USB OV518 camera found");
13750                 ov->bridge = BRG_OV518;
13751                 ov->bclass = BCL_OV518;
13752                 break;
13753         case PROD_OV518PLUS:
13754 -               info("USB OV518+ camera found");
13755                 ov->bridge = BRG_OV518PLUS;
13756                 ov->bclass = BCL_OV518;
13757                 break;
13758         case PROD_ME2CAM:
13759                 if (dev->descriptor.idVendor != VEND_MATTEL)
13760                         goto error;
13761 -               info("Intel Play Me2Cam (OV511+) found");
13762                 ov->bridge = BRG_OV511PLUS;
13763                 ov->bclass = BCL_OV511;
13764                 break;
13765         default:
13766 -               err("Unknown product ID 0x%x", dev->descriptor.idProduct);
13767 +               err("Unknown product ID 0x%04x", dev->descriptor.idProduct);
13768                 goto error_dealloc;
13769         }
13770  
13771 +       info("USB %s video device found", symbolic(brglist, ov->bridge));
13772 +
13773         /* Workaround for some applications that want data in RGB
13774          * instead of BGR. */
13775         if (force_rgb)
13776 @@ -6713,6 +6468,12 @@
13777                 init_waitqueue_head(&ov->frame[i].wq);
13778         }
13779  
13780 +       for (i = 0; i < OV511_NUMSBUF; i++) {
13781 +               ov->sbuf[i].ov = ov;
13782 +               spin_lock_init(&ov->sbuf[i].lock);
13783 +               ov->sbuf[i].n = i;
13784 +       }
13785 +
13786         /* Unnecessary? (This is done on open(). Need to make sure variables
13787          * are properly initialized without this before removing it, though). */
13788         if (ov51x_set_default_params(ov) < 0)
13789 @@ -6747,12 +6508,14 @@
13790  
13791         info("Device registered on minor %d", ov->vdev.minor);
13792  
13793 +#if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
13794 +       create_proc_ov511_cam(ov);
13795 +#endif
13796 +
13797         MOD_DEC_USE_COUNT;
13798         return ov;
13799  
13800  error:
13801 -       err("Camera initialization failed");
13802 -
13803  #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
13804         /* Safe to call even if entry doesn't exist */
13805         destroy_proc_ov511_cam(ov);
13806 @@ -6765,9 +6528,6 @@
13807                 up(&ov->cbuf_lock);
13808         }
13809  
13810 -       usb_driver_release_interface(&ov511_driver,
13811 -               &dev->actconfig->interface[ov->iface]);
13812 -
13813  error_dealloc:
13814         if (ov) {
13815                 kfree(ov);
13816 @@ -6776,6 +6536,7 @@
13817  
13818  error_out:
13819         MOD_DEC_USE_COUNT;
13820 +       err("Camera initialization failed");
13821         return NULL;
13822  }
13823  
13824 @@ -6810,22 +6571,12 @@
13825  
13826         ov->streaming = 0;
13827  
13828 -       /* Unschedule all of the iso td's */
13829 -       for (n = OV511_NUMSBUF - 1; n >= 0; n--) {
13830 -               if (ov->sbuf[n].urb) {
13831 -                       ov->sbuf[n].urb->next = NULL;
13832 -                       usb_unlink_urb(ov->sbuf[n].urb);
13833 -                       usb_free_urb(ov->sbuf[n].urb);
13834 -                       ov->sbuf[n].urb = NULL;
13835 -               }
13836 -       }
13837 +       ov51x_unlink_isoc(ov);
13838  
13839  #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
13840          destroy_proc_ov511_cam(ov);
13841  #endif
13842  
13843 -       usb_driver_release_interface(&ov511_driver,
13844 -               &ov->dev->actconfig->interface[ov->iface]);
13845         ov->dev = NULL;
13846  
13847         /* Free the memory */
13848 @@ -6858,7 +6609,7 @@
13849   ***************************************************************************/
13850  
13851  /* Returns 0 for success */
13852 -int 
13853 +int
13854  ov511_register_decomp_module(int ver, struct ov51x_decomp_ops *ops, int ov518,
13855                              int mmx)
13856  {
13857 @@ -6915,7 +6666,7 @@
13858         return -EBUSY;
13859  }
13860  
13861 -void 
13862 +void
13863  ov511_deregister_decomp_module(int ov518, int mmx)
13864  {
13865         lock_kernel();
13866 @@ -6931,13 +6682,13 @@
13867                 else
13868                         ov511_decomp_ops = NULL;
13869         }
13870 -       
13871 +
13872         MOD_DEC_USE_COUNT;
13873  
13874         unlock_kernel();
13875  }
13876  
13877 -static int __init 
13878 +static int __init
13879  usb_ov511_init(void)
13880  {
13881  #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
13882 @@ -6947,11 +6698,8 @@
13883         if (usb_register(&ov511_driver) < 0)
13884                 return -1;
13885  
13886 -       // FIXME: Don't know how to determine this yet
13887 -       ov51x_mmx_available = 0;
13888 -
13889  #if defined (__i386__)
13890 -       if (test_bit(X86_FEATURE_MMX, &boot_cpu_data.x86_capability))
13891 +       if (test_bit(X86_FEATURE_MMX, boot_cpu_data.x86_capability))
13892                 ov51x_mmx_available = 1;
13893  #endif
13894  
13895 @@ -6960,7 +6708,7 @@
13896         return 0;
13897  }
13898  
13899 -static void __exit 
13900 +static void __exit
13901  usb_ov511_exit(void)
13902  {
13903         usb_deregister(&ov511_driver);
13904 @@ -6974,6 +6722,5 @@
13905  module_init(usb_ov511_init);
13906  module_exit(usb_ov511_exit);
13907  
13908 -/* No version, for compatibility with binary-only modules */
13909 -EXPORT_SYMBOL_NOVERS(ov511_register_decomp_module);
13910 -EXPORT_SYMBOL_NOVERS(ov511_deregister_decomp_module);
13911 +EXPORT_SYMBOL(ov511_register_decomp_module);
13912 +EXPORT_SYMBOL(ov511_deregister_decomp_module);
13913 diff -Nur linux-2.4.19.org/drivers/usb/ov511.h linux-2.4.19/drivers/usb/ov511.h
13914 --- linux-2.4.19.org/drivers/usb/ov511.h        Sat Aug  3 02:39:45 2002
13915 +++ linux-2.4.19/drivers/usb/ov511.h    Thu Oct 31 08:11:23 2002
13916 @@ -10,8 +10,8 @@
13917  
13918  #ifdef OV511_DEBUG
13919         #define PDEBUG(level, fmt, args...) \
13920 -               if (debug >= (level)) info("[" __PRETTY_FUNCTION__ ":%d] " fmt,\
13921 -               __LINE__ , ## args)
13922 +               if (debug >= (level)) info("[%s:%d] " fmt, \
13923 +               __PRETTY_FUNCTION__, __LINE__ , ## args)
13924  #else
13925         #define PDEBUG(level, fmt, args...) do {} while(0)
13926  #endif
13927 @@ -243,6 +243,16 @@
13928  
13929  #define OV511_ENDPOINT_ADDRESS 1       /* Isoc endpoint number */
13930  
13931 +#define OV511_NUMFRAMES        2
13932 +#if OV511_NUMFRAMES > VIDEO_MAX_FRAME
13933 +       #error "OV511_NUMFRAMES is too high"
13934 +#endif
13935 +
13936 +#define OV511_NUMSBUF          2
13937 +
13938 +/* Control transfers use up to 4 bytes */
13939 +#define OV511_CBUF_SIZE                4
13940 +
13941  /* Bridge types */
13942  enum {
13943         BRG_UNKNOWN,
13944 @@ -376,9 +386,14 @@
13945                                struct ov511_i2c_struct)
13946  /* ------------- End IOCTL interface -------------- */
13947  
13948 +struct usb_ov511;              /* Forward declaration */
13949 +
13950  struct ov511_sbuf {
13951 -       char *data;
13952 +       struct usb_ov511 *ov;
13953 +       unsigned char *data;
13954         struct urb *urb;
13955 +       spinlock_t lock;
13956 +       int n;
13957  };
13958  
13959  enum {
13960 @@ -401,9 +416,10 @@
13961  
13962  struct ov511_frame {
13963         int framenum;           /* Index of this frame */
13964 -       char *data;             /* Frame buffer */
13965 -       char *tempdata;         /* Temp buffer for multi-stage conversions */
13966 -       char *rawdata;          /* Raw camera data buffer */
13967 +       unsigned char *data;    /* Frame buffer */
13968 +       unsigned char *tempdata; /* Temp buffer for multi-stage conversions */
13969 +       unsigned char *rawdata; /* Raw camera data buffer */
13970 +       unsigned char *compbuf; /* Temp buffer for decompressor */
13971  
13972         int depth;              /* Bytes per pixel */
13973         int width;              /* Width application is expecting */
13974 @@ -428,27 +444,19 @@
13975         int snapshot;           /* True if frame was a snapshot */
13976  };
13977  
13978 -#define DECOMP_INTERFACE_VER 2
13979 +#define DECOMP_INTERFACE_VER 4
13980  
13981  /* Compression module operations */
13982  struct ov51x_decomp_ops {
13983 -       int (*decomp_400)(unsigned char *, unsigned char *, int, int, int);
13984 -       int (*decomp_420)(unsigned char *, unsigned char *, int, int, int);
13985 -       int (*decomp_422)(unsigned char *, unsigned char *, int, int, int);
13986 -       void (*decomp_lock)(void);
13987 -       void (*decomp_unlock)(void);
13988 +       int (*decomp_400)(unsigned char *, unsigned char *, unsigned char *,
13989 +                         int, int, int);
13990 +       int (*decomp_420)(unsigned char *, unsigned char *, unsigned char *,
13991 +                         int, int, int);
13992 +       int (*decomp_422)(unsigned char *, unsigned char *, unsigned char *,
13993 +                         int, int, int);
13994 +       struct module *owner;
13995  };
13996  
13997 -#define OV511_NUMFRAMES        2
13998 -#if OV511_NUMFRAMES > VIDEO_MAX_FRAME
13999 -       #error "OV511_NUMFRAMES is too high"
14000 -#endif
14001 -
14002 -#define OV511_NUMSBUF          2
14003 -
14004 -/* Control transfers use up to 4 bytes */
14005 -#define OV511_CBUF_SIZE                4
14006 -
14007  struct usb_ov511 {
14008         struct video_device vdev;
14009  
14010 @@ -456,7 +464,7 @@
14011         struct usb_device *dev;
14012  
14013         int customid;
14014 -       int desc;
14015 +       char *desc;
14016         unsigned char iface;
14017  
14018         /* Determined by sensor type */
14019 @@ -475,6 +483,7 @@
14020         int auto_gain;          /* Auto gain control enabled flag */
14021         int auto_exp;           /* Auto exposure enabled flag */
14022         int backlight;          /* Backlight exposure algorithm flag */
14023 +       int mirror;             /* Image is reversed horizontally */
14024  
14025         int led_policy;         /* LED: off|on|auto; OV511+ only */
14026  
14027 @@ -490,9 +499,9 @@
14028         int lightfreq;          /* Power (lighting) frequency */
14029         int bandfilt;           /* Banding filter enabled flag */
14030  
14031 -       char *fbuf;             /* Videodev buffer area */
14032 -       char *tempfbuf;         /* Temporary (intermediate) buffer area */
14033 -       char *rawfbuf;          /* Raw camera data buffer area */
14034 +       unsigned char *fbuf;    /* Videodev buffer area */
14035 +       unsigned char *tempfbuf; /* Temporary (intermediate) buffer area */
14036 +       unsigned char *rawfbuf; /* Raw camera data buffer area */
14037  
14038         int sub_flag;           /* Pix Array subcapture on flag */
14039         int subx;               /* Pix Array subcapture x offset */
14040 @@ -513,9 +522,9 @@
14041         int bclass;             /* Class of bridge (BCL_*) */
14042         int sensor;             /* Type of image sensor chip (SEN_*) */
14043         int sclass;             /* Type of image sensor chip (SCL_*) */
14044 -       int tuner;              /* Type of TV tuner */
14045  
14046         int packet_size;        /* Frame size per isoc desc */
14047 +       int packet_numbering;   /* Is ISO frame numbering enabled? */
14048  
14049         struct semaphore param_lock;    /* params lock for this camera */
14050  
14051 @@ -542,12 +551,9 @@
14052         int num_inputs;         /* Number of inputs */
14053         int norm;               /* NTSC / PAL / SECAM */
14054         int has_decoder;        /* Device has a video decoder */
14055 -       int has_tuner;          /* Device has a TV tuner */
14056 -       int has_audio_proc;     /* Device has an audio processor */
14057 -       int freq;               /* Current tuner frequency */
14058 -       int tuner_type;         /* Specific tuner model */
14059 +       int pal;                /* Device is designed for PAL resolution */
14060  
14061 -       /* I2C interface to kernel */
14062 +       /* I2C interface */
14063         struct semaphore i2c_lock;        /* Protect I2C controller regs */
14064         unsigned char primary_i2c_slave;  /* I2C write id of sensor */
14065  
14066 @@ -556,27 +562,28 @@
14067         struct semaphore cbuf_lock;
14068  };
14069  
14070 -struct cam_list {
14071 -       int id;
14072 -       char *description;
14073 -};
14074 -
14075 -struct palette_list {
14076 +/* Used to represent a list of values and their respective symbolic names */
14077 +struct symbolic_list {
14078         int num;
14079         char *name;
14080  };
14081  
14082 -struct mode_list_518 {
14083 -       int width;
14084 -       int height;
14085 -       u8 reg28;
14086 -       u8 reg29;
14087 -       u8 reg2a;
14088 -       u8 reg2c;
14089 -       u8 reg2e;
14090 -       u8 reg24;
14091 -       u8 reg25;
14092 -};
14093 +#define NOT_DEFINED_STR "Unknown"
14094 +
14095 +/* Returns the name of the matching element in the symbolic_list array. The
14096 + * end of the list must be marked with an element that has a NULL name.
14097 + */
14098 +static inline char * 
14099 +symbolic(struct symbolic_list list[], int num)
14100 +{
14101 +       int i;
14102 +
14103 +       for (i = 0; list[i].name != NULL; i++)
14104 +                       if (list[i].num == num)
14105 +                               return (list[i].name);
14106 +
14107 +       return (NOT_DEFINED_STR);
14108 +}
14109  
14110  /* Compression stuff */
14111  
14112 diff -Nur linux-2.4.19.org/drivers/usb/pegasus.c linux-2.4.19/drivers/usb/pegasus.c
14113 --- linux-2.4.19.org/drivers/usb/pegasus.c      Sat Aug  3 02:39:45 2002
14114 +++ linux-2.4.19/drivers/usb/pegasus.c  Thu Oct 31 08:11:23 2002
14115 @@ -1,46 +1,31 @@
14116  /*
14117 -**     Pegasus: USB 10/100Mbps/HomePNA (1Mbps) Controller
14118 -**
14119 -**     Copyright (c) 1999-2002 Petko Manolov (petkan@users.sourceforge.net)
14120 -**     
14121 -**
14122 -**     ChangeLog:
14123 -**             ....    Most of the time spend reading sources & docs.
14124 -**             v0.2.x  First official release for the Linux kernel.
14125 -**             v0.3.0  Beutified and structured, some bugs fixed.
14126 -**             v0.3.x  URBifying bulk requests and bugfixing. First relatively
14127 -**                     stable release. Still can touch device's registers only
14128 -**                     from top-halves.
14129 -**             v0.4.0  Control messages remained unurbified are now URBs.
14130 -**                     Now we can touch the HW at any time.
14131 -**             v0.4.9  Control urbs again use process context to wait. Argh...
14132 -**                     Some long standing bugs (enable_net_traffic) fixed.
14133 -**                     Also nasty trick about resubmiting control urb from
14134 -**                     interrupt context used. Please let me know how it
14135 -**                     behaves. Pegasus II support added since this version.
14136 -**                     TODO: suppressing HCD warnings spewage on disconnect.
14137 -**             v0.4.13 Ethernet address is now set at probe(), not at open()
14138 -**                     time as this seems to break dhcpd. 
14139 -**             v0.4.25 ethtool support added.
14140 -*/
14141 -
14142 -/*
14143 - * This program is free software; you can redistribute it and/or modify
14144 - * it under the terms of the GNU General Public License as published by
14145 - * the Free Software Foundation; either version 2 of the License, or
14146 - * (at your option) any later version.
14147 + *  Copyright (c) 1999-2002 Petko Manolov (petkan@users.sourceforge.net)
14148   *
14149 - * This program is distributed in the hope that it will be useful,
14150 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
14151 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14152 - * GNU General Public License for more details.
14153 + * This program is free software; you can redistribute it and/or modify
14154 + * it under the terms of the GNU General Public License version 2 as
14155 + * published by the Free Software Foundation.
14156 + *     
14157   *
14158 - * You should have received a copy of the GNU General Public License
14159 - * along with this program; if not, write to the Free Software
14160 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14161 + *     ChangeLog:
14162 + *             ....    Most of the time spend reading sources & docs.
14163 + *             v0.2.x  First official release for the Linux kernel.
14164 + *             v0.3.0  Beutified and structured, some bugs fixed.
14165 + *             v0.3.x  URBifying bulk requests and bugfixing. First relatively
14166 + *                     stable release. Still can touch device's registers only
14167 + *                     from top-halves.
14168 + *             v0.4.0  Control messages remained unurbified are now URBs.
14169 + *                     Now we can touch the HW at any time.
14170 + *             v0.4.9  Control urbs again use process context to wait. Argh...
14171 + *                     Some long standing bugs (enable_net_traffic) fixed.
14172 + *                     Also nasty trick about resubmiting control urb from
14173 + *                     interrupt context used. Please let me know how it
14174 + *                     behaves. Pegasus II support added since this version.
14175 + *                     TODO: suppressing HCD warnings spewage on disconnect.
14176 + *             v0.4.13 Ethernet address is now set at probe(), not at open()
14177 + *                     time as this seems to break dhcpd. 
14178 + *             v0.4.25 ethtool support added.
14179   */
14180  
14181 -
14182  #include <linux/sched.h>
14183  #include <linux/slab.h>
14184  #include <linux/init.h>
14185 @@ -69,7 +54,6 @@
14186  static int loopback = 0;
14187  static int mii_mode = 1;
14188  static int multicast_filter_limit = 32;
14189 -static DECLARE_MUTEX(gsem);
14190  
14191  static struct usb_eth_dev usb_dev_id[] = {
14192  #define        PEGASUS_DEV(pn, vid, pid, flags)        \
14193 @@ -84,104 +68,102 @@
14194         {match_flags: USB_DEVICE_ID_MATCH_DEVICE, idVendor:vid, idProduct:pid},
14195  #include "pegasus.h"
14196  #undef PEGASUS_DEV
14197 -       { }
14198 +       {}
14199  };
14200  
14201 -
14202 -MODULE_AUTHOR( DRIVER_AUTHOR );
14203 -MODULE_DESCRIPTION( DRIVER_DESC );
14204 +MODULE_AUTHOR(DRIVER_AUTHOR);
14205 +MODULE_DESCRIPTION(DRIVER_DESC);
14206  MODULE_LICENSE("GPL");
14207  MODULE_PARM(loopback, "i");
14208  MODULE_PARM(mii_mode, "i");
14209  MODULE_PARM_DESC(loopback, "Enable MAC loopback mode (bit 0)");
14210  MODULE_PARM_DESC(mii_mode, "Enable HomePNA mode (bit 0),default=MII mode = 0");
14211  
14212 -MODULE_DEVICE_TABLE (usb, pegasus_ids);
14213 -
14214 +MODULE_DEVICE_TABLE(usb, pegasus_ids);
14215  
14216 -static int update_eth_regs_async( pegasus_t * );
14217 +static int update_eth_regs_async(pegasus_t *);
14218  /* Aargh!!! I _really_ hate such tweaks */
14219 -static void ctrl_callback( struct urb *urb )
14220 +static void ctrl_callback(struct urb *urb)
14221  {
14222 -       pegasus_t       *pegasus = urb->context;
14223 +       pegasus_t *pegasus = urb->context;
14224  
14225 -       if ( !pegasus )
14226 +       if (!pegasus)
14227                 return;
14228  
14229 -       switch ( urb->status ) {
14230 -               case 0:
14231 -                       if ( pegasus->flags & ETH_REGS_CHANGE ) {
14232 -                               pegasus->flags &= ~ETH_REGS_CHANGE;
14233 -                               pegasus->flags |= ETH_REGS_CHANGED;
14234 -                               update_eth_regs_async( pegasus );
14235 -                               return;
14236 -                       }
14237 -                       break;
14238 -               case -EINPROGRESS:
14239 +       switch (urb->status) {
14240 +       case 0:
14241 +               if (pegasus->flags & ETH_REGS_CHANGE) {
14242 +                       pegasus->flags &= ~ETH_REGS_CHANGE;
14243 +                       pegasus->flags |= ETH_REGS_CHANGED;
14244 +                       update_eth_regs_async(pegasus);
14245                         return;
14246 -               case -ENOENT:
14247 -                       break;
14248 -               default:
14249 -                       warn("%s: status %d", __FUNCTION__, urb->status);
14250 +               }
14251 +               break;
14252 +       case -EINPROGRESS:
14253 +               return;
14254 +       case -ENOENT:
14255 +               break;
14256 +       default:
14257 +               warn("%s: status %d", __FUNCTION__, urb->status);
14258         }
14259         pegasus->flags &= ~ETH_REGS_CHANGED;
14260 -       wake_up(&pegasus->ctrl_wait );
14261 +       wake_up(&pegasus->ctrl_wait);
14262  }
14263  
14264 -
14265 -static int get_registers(pegasus_t *pegasus, __u16 indx, __u16 size, void *data)
14266 +static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
14267 +                        void *data)
14268  {
14269 -       int     ret;
14270 +       int ret;
14271         unsigned char *buffer;
14272         DECLARE_WAITQUEUE(wait, current);
14273  
14274 -       buffer = kmalloc(size,GFP_KERNEL);
14275 +       buffer = kmalloc(size, GFP_KERNEL);
14276         if (!buffer) {
14277                 err("unable to allocate memory for configuration descriptors");
14278                 return 0;
14279         }
14280 -       memcpy(buffer,data,size);
14281 +       memcpy(buffer, data, size);
14282  
14283         add_wait_queue(&pegasus->ctrl_wait, &wait);
14284         set_current_state(TASK_UNINTERRUPTIBLE);
14285 -       while ( pegasus->flags & ETH_REGS_CHANGED )
14286 +       while (pegasus->flags & ETH_REGS_CHANGED)
14287                 schedule();
14288         remove_wait_queue(&pegasus->ctrl_wait, &wait);
14289         set_current_state(TASK_RUNNING);
14290  
14291 -       pegasus->dr.requesttype = PEGASUS_REQT_READ;
14292 -       pegasus->dr.request = PEGASUS_REQ_GET_REGS;
14293 -       pegasus->dr.value = cpu_to_le16 (0);
14294 -       pegasus->dr.index = cpu_to_le16p(&indx);
14295 -       pegasus->dr.length = cpu_to_le16p(&size);
14296 +       pegasus->dr.bRequestType = PEGASUS_REQT_READ;
14297 +       pegasus->dr.bRequest = PEGASUS_REQ_GET_REGS;
14298 +       pegasus->dr.wValue = cpu_to_le16(0);
14299 +       pegasus->dr.wIndex = cpu_to_le16p(&indx);
14300 +       pegasus->dr.wLength = cpu_to_le16p(&size);
14301         pegasus->ctrl_urb->transfer_buffer_length = size;
14302  
14303 -       FILL_CONTROL_URB( pegasus->ctrl_urb, pegasus->usb,
14304 -                         usb_rcvctrlpipe(pegasus->usb,0),
14305 -                         (char *)&pegasus->dr,
14306 -                         buffer, size, ctrl_callback, pegasus );
14307 +       FILL_CONTROL_URB(pegasus->ctrl_urb, pegasus->usb,
14308 +                        usb_rcvctrlpipe(pegasus->usb, 0),
14309 +                        (char *) &pegasus->dr,
14310 +                        buffer, size, ctrl_callback, pegasus);
14311  
14312 -       add_wait_queue( &pegasus->ctrl_wait, &wait );
14313 -       set_current_state( TASK_UNINTERRUPTIBLE );
14314 +       add_wait_queue(&pegasus->ctrl_wait, &wait);
14315 +       set_current_state(TASK_UNINTERRUPTIBLE);
14316  
14317 -       if ( (ret = usb_submit_urb( pegasus->ctrl_urb )) ) {
14318 +       if ((ret = usb_submit_urb(pegasus->ctrl_urb))) {
14319                 err("%s: BAD CTRLs %d", __FUNCTION__, ret);
14320                 goto out;
14321         }
14322  
14323         schedule();
14324  out:
14325 -       remove_wait_queue( &pegasus->ctrl_wait, &wait );
14326 -       memcpy(data,buffer,size);
14327 +       remove_wait_queue(&pegasus->ctrl_wait, &wait);
14328 +       memcpy(data, buffer, size);
14329         kfree(buffer);
14330  
14331         return ret;
14332  }
14333  
14334 -
14335 -static int set_registers(pegasus_t *pegasus, __u16 indx, __u16 size, void *data)
14336 +static int set_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
14337 +                        void *data)
14338  {
14339 -       int     ret;
14340 +       int ret;
14341         unsigned char *buffer;
14342         DECLARE_WAITQUEUE(wait, current);
14343  
14344 @@ -194,47 +176,46 @@
14345  
14346         add_wait_queue(&pegasus->ctrl_wait, &wait);
14347         set_current_state(TASK_UNINTERRUPTIBLE);
14348 -       while ( pegasus->flags & ETH_REGS_CHANGED )
14349 +       while (pegasus->flags & ETH_REGS_CHANGED)
14350                 schedule();
14351         remove_wait_queue(&pegasus->ctrl_wait, &wait);
14352         set_current_state(TASK_RUNNING);
14353  
14354 -       pegasus->dr.requesttype = PEGASUS_REQT_WRITE;
14355 -       pegasus->dr.request = PEGASUS_REQ_SET_REGS;
14356 -       pegasus->dr.value = cpu_to_le16 (0);
14357 -       pegasus->dr.index = cpu_to_le16p( &indx );
14358 -       pegasus->dr.length = cpu_to_le16p( &size );
14359 +       pegasus->dr.bRequestType = PEGASUS_REQT_WRITE;
14360 +       pegasus->dr.bRequest = PEGASUS_REQ_SET_REGS;
14361 +       pegasus->dr.wValue = cpu_to_le16(0);
14362 +       pegasus->dr.wIndex = cpu_to_le16p(&indx);
14363 +       pegasus->dr.wLength = cpu_to_le16p(&size);
14364         pegasus->ctrl_urb->transfer_buffer_length = size;
14365  
14366 -       FILL_CONTROL_URB( pegasus->ctrl_urb, pegasus->usb,
14367 -                         usb_sndctrlpipe(pegasus->usb,0),
14368 -                         (char *)&pegasus->dr,
14369 -                         buffer, size, ctrl_callback, pegasus );
14370 -                         
14371 -       add_wait_queue( &pegasus->ctrl_wait, &wait );
14372 -       set_current_state( TASK_UNINTERRUPTIBLE );
14373 +       FILL_CONTROL_URB(pegasus->ctrl_urb, pegasus->usb,
14374 +                        usb_sndctrlpipe(pegasus->usb, 0),
14375 +                        (char *) &pegasus->dr,
14376 +                        buffer, size, ctrl_callback, pegasus);
14377  
14378 -       if ( (ret = usb_submit_urb( pegasus->ctrl_urb )) ) {
14379 +       add_wait_queue(&pegasus->ctrl_wait, &wait);
14380 +       set_current_state(TASK_UNINTERRUPTIBLE);
14381 +
14382 +       if ((ret = usb_submit_urb(pegasus->ctrl_urb))) {
14383                 err("%s: BAD CTRL %d", __FUNCTION__, ret);
14384                 goto out;
14385         }
14386 -       
14387 +
14388         schedule();
14389  out:
14390 -       remove_wait_queue( &pegasus->ctrl_wait, &wait );
14391 +       remove_wait_queue(&pegasus->ctrl_wait, &wait);
14392         kfree(buffer);
14393 -       
14394 +
14395         return ret;
14396  }
14397  
14398 -
14399 -static int set_register( pegasus_t *pegasus, __u16 indx, __u8 data )
14400 +static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data)
14401  {
14402 -       int     ret;
14403 +       int ret;
14404         unsigned char *buffer;
14405         __u16 dat = data;
14406         DECLARE_WAITQUEUE(wait, current);
14407 -       
14408 +
14409         buffer = kmalloc(1, GFP_KERNEL);
14410         if (!buffer) {
14411                 err("unable to allocate memory for configuration descriptors");
14412 @@ -244,129 +225,126 @@
14413  
14414         add_wait_queue(&pegasus->ctrl_wait, &wait);
14415         set_current_state(TASK_UNINTERRUPTIBLE);
14416 -       while ( pegasus->flags & ETH_REGS_CHANGED )
14417 +       while (pegasus->flags & ETH_REGS_CHANGED)
14418                 schedule();
14419         remove_wait_queue(&pegasus->ctrl_wait, &wait);
14420         set_current_state(TASK_RUNNING);
14421  
14422 -       pegasus->dr.requesttype = PEGASUS_REQT_WRITE;
14423 -       pegasus->dr.request = PEGASUS_REQ_SET_REG;
14424 -       pegasus->dr.value = cpu_to_le16p( &dat);
14425 -       pegasus->dr.index = cpu_to_le16p( &indx );
14426 -       pegasus->dr.length = cpu_to_le16( 1 );
14427 +       pegasus->dr.bRequestType = PEGASUS_REQT_WRITE;
14428 +       pegasus->dr.bRequest = PEGASUS_REQ_SET_REG;
14429 +       pegasus->dr.wValue = cpu_to_le16p(&dat);
14430 +       pegasus->dr.wIndex = cpu_to_le16p(&indx);
14431 +       pegasus->dr.wLength = cpu_to_le16(1);
14432         pegasus->ctrl_urb->transfer_buffer_length = 1;
14433  
14434 -       FILL_CONTROL_URB( pegasus->ctrl_urb, pegasus->usb,
14435 -                         usb_sndctrlpipe(pegasus->usb,0),
14436 -                         (char *)&pegasus->dr,
14437 -                         buffer, 1, ctrl_callback, pegasus );
14438 +       FILL_CONTROL_URB(pegasus->ctrl_urb, pegasus->usb,
14439 +                        usb_sndctrlpipe(pegasus->usb, 0),
14440 +                        (char *) &pegasus->dr,
14441 +                        buffer, 1, ctrl_callback, pegasus);
14442  
14443 -       add_wait_queue( &pegasus->ctrl_wait, &wait );
14444 -       set_current_state( TASK_UNINTERRUPTIBLE );
14445 +       add_wait_queue(&pegasus->ctrl_wait, &wait);
14446 +       set_current_state(TASK_UNINTERRUPTIBLE);
14447  
14448 -       if ( (ret = usb_submit_urb( pegasus->ctrl_urb )) ) {
14449 +       if ((ret = usb_submit_urb(pegasus->ctrl_urb))) {
14450                 err("%s: BAD CTRL %d", __FUNCTION__, ret);
14451                 goto out;
14452         }
14453  
14454         schedule();
14455  out:
14456 -       remove_wait_queue( &pegasus->ctrl_wait, &wait );
14457 +       remove_wait_queue(&pegasus->ctrl_wait, &wait);
14458         kfree(buffer);
14459  
14460         return ret;
14461  }
14462  
14463 -
14464 -static int update_eth_regs_async( pegasus_t *pegasus )
14465 +static int update_eth_regs_async(pegasus_t * pegasus)
14466  {
14467 -       int     ret;
14468 +       int ret;
14469  
14470 -       pegasus->dr.requesttype = PEGASUS_REQT_WRITE;
14471 -       pegasus->dr.request = PEGASUS_REQ_SET_REGS;
14472 -       pegasus->dr.value = 0;
14473 -       pegasus->dr.index =  cpu_to_le16(EthCtrl0);
14474 -       pegasus->dr.length = cpu_to_le16(3);
14475 +       pegasus->dr.bRequestType = PEGASUS_REQT_WRITE;
14476 +       pegasus->dr.bRequest = PEGASUS_REQ_SET_REGS;
14477 +       pegasus->dr.wValue = 0;
14478 +       pegasus->dr.wIndex = cpu_to_le16(EthCtrl0);
14479 +       pegasus->dr.wLength = cpu_to_le16(3);
14480         pegasus->ctrl_urb->transfer_buffer_length = 3;
14481  
14482 -       FILL_CONTROL_URB( pegasus->ctrl_urb, pegasus->usb,
14483 -                         usb_sndctrlpipe(pegasus->usb,0),
14484 -                         (char *)&pegasus->dr,
14485 -                         pegasus->eth_regs, 3, ctrl_callback, pegasus );
14486 +       FILL_CONTROL_URB(pegasus->ctrl_urb, pegasus->usb,
14487 +                        usb_sndctrlpipe(pegasus->usb, 0),
14488 +                        (char *) &pegasus->dr,
14489 +                        pegasus->eth_regs, 3, ctrl_callback, pegasus);
14490 +
14491 +       if ((ret = usb_submit_urb(pegasus->ctrl_urb)))
14492 +               err("%s: BAD CTRL %d, flgs %x", __FUNCTION__, ret,
14493 +                   pegasus->flags);
14494  
14495 -       if ( (ret = usb_submit_urb( pegasus->ctrl_urb )) )
14496 -               err("%s: BAD CTRL %d, flgs %x",__FUNCTION__,ret,pegasus->flags);
14497 -
14498 -       return  ret;
14499 +       return ret;
14500  }
14501  
14502 -
14503 -static int read_mii_word( pegasus_t *pegasus, __u8 phy, __u8 indx, __u16 *regd )
14504 +static int read_mii_word(pegasus_t * pegasus, __u8 phy, __u8 indx, __u16 * regd)
14505  {
14506 -       int     i;
14507 -       __u8    data[4] = { phy, 0, 0, indx };
14508 -       __u16  regdi;
14509 -       
14510 -       set_register( pegasus, PhyCtrl, 0 );
14511 -       set_registers( pegasus, PhyAddr, sizeof(data), data );
14512 -       set_register( pegasus, PhyCtrl, (indx | PHY_READ) );
14513 +       int i;
14514 +       __u8 data[4] = { phy, 0, 0, indx };
14515 +       __u16 regdi;
14516 +
14517 +       set_register(pegasus, PhyCtrl, 0);
14518 +       set_registers(pegasus, PhyAddr, sizeof(data), data);
14519 +       set_register(pegasus, PhyCtrl, (indx | PHY_READ));
14520         for (i = 0; i < REG_TIMEOUT; i++) {
14521                 get_registers(pegasus, PhyCtrl, 1, data);
14522 -               if ( data[0] & PHY_DONE ) 
14523 +               if (data[0] & PHY_DONE)
14524                         break;
14525         }
14526 -       if ( i < REG_TIMEOUT ) {
14527 -               get_registers( pegasus, PhyData, 2, &regdi );
14528 +       if (i < REG_TIMEOUT) {
14529 +               get_registers(pegasus, PhyData, 2, &regdi);
14530                 *regd = le16_to_cpu(regdi);
14531 -               return  0;
14532 +               return 0;
14533         }
14534         warn("%s: failed", __FUNCTION__);
14535 -       
14536 +
14537         return 1;
14538  }
14539  
14540 -
14541 -static int write_mii_word( pegasus_t *pegasus, __u8 phy, __u8 indx, __u16 regd )
14542 +static int write_mii_word(pegasus_t * pegasus, __u8 phy, __u8 indx, __u16 regd)
14543  {
14544 -       int     i;
14545 -       __u8    data[4] = { phy, 0, 0, indx };
14546 -       
14547 -       *(data + 1) = cpu_to_le16p( &regd );
14548 -       set_register( pegasus, PhyCtrl, 0 );
14549 -       set_registers( pegasus, PhyAddr, 4, data );
14550 -       set_register( pegasus, PhyCtrl, (indx | PHY_WRITE) );
14551 +       int i;
14552 +       __u8 data[4] = { phy, 0, 0, indx };
14553 +
14554 +       *(data + 1) = cpu_to_le16p(&regd);
14555 +       set_register(pegasus, PhyCtrl, 0);
14556 +       set_registers(pegasus, PhyAddr, 4, data);
14557 +       set_register(pegasus, PhyCtrl, (indx | PHY_WRITE));
14558         for (i = 0; i < REG_TIMEOUT; i++) {
14559                 get_registers(pegasus, PhyCtrl, 1, data);
14560 -               if ( data[0] & PHY_DONE ) 
14561 +               if (data[0] & PHY_DONE)
14562                         break;
14563         }
14564 -       if ( i < REG_TIMEOUT )
14565 -               return  0;
14566 +       if (i < REG_TIMEOUT)
14567 +               return 0;
14568         warn("%s: failed", __FUNCTION__);
14569  
14570         return 1;
14571  }
14572  
14573 -
14574 -static int read_eprom_word( pegasus_t *pegasus, __u8 index, __u16 *retdata )
14575 +static int read_eprom_word(pegasus_t * pegasus, __u8 index, __u16 * retdata)
14576  {
14577 -       int     i;
14578 +       int i;
14579         __u8 tmp;
14580         __u16 retdatai;
14581 -       
14582 -       set_register( pegasus, EpromCtrl, 0 );
14583 -       set_register( pegasus, EpromOffset, index );
14584 -       set_register( pegasus, EpromCtrl, EPROM_READ); 
14585 -
14586 -       for ( i=0; i < REG_TIMEOUT; i++ ) {
14587 -               get_registers( pegasus, EpromCtrl, 1, &tmp );
14588 -               if ( tmp & EPROM_DONE )
14589 +
14590 +       set_register(pegasus, EpromCtrl, 0);
14591 +       set_register(pegasus, EpromOffset, index);
14592 +       set_register(pegasus, EpromCtrl, EPROM_READ);
14593 +
14594 +       for (i = 0; i < REG_TIMEOUT; i++) {
14595 +               get_registers(pegasus, EpromCtrl, 1, &tmp);
14596 +               if (tmp & EPROM_DONE)
14597                         break;
14598         }
14599 -       if ( i < REG_TIMEOUT ) {
14600 -               get_registers( pegasus, EpromData, 2, &retdatai );
14601 -               *retdata = le16_to_cpu (retdatai);
14602 -               return  0;
14603 +       if (i < REG_TIMEOUT) {
14604 +               get_registers(pegasus, EpromData, 2, &retdatai);
14605 +               *retdata = le16_to_cpu(retdatai);
14606 +               return 0;
14607         }
14608         warn("%s: failed", __FUNCTION__);
14609  
14610 @@ -374,199 +352,188 @@
14611  }
14612  
14613  #ifdef PEGASUS_WRITE_EEPROM
14614 -static inline void enable_eprom_write( pegasus_t *pegasus )
14615 +static inline void enable_eprom_write(pegasus_t * pegasus)
14616  {
14617 -       __u8    tmp;
14618 +       __u8 tmp;
14619  
14620 -       get_registers( pegasus, EthCtrl2, 1, &tmp );
14621 -       set_register( pegasus, EthCtrl2, tmp | EPROM_WR_ENABLE );
14622 +       get_registers(pegasus, EthCtrl2, 1, &tmp);
14623 +       set_register(pegasus, EthCtrl2, tmp | EPROM_WR_ENABLE);
14624  }
14625  
14626 -
14627 -static inline void disable_eprom_write( pegasus_t *pegasus )
14628 +static inline void disable_eprom_write(pegasus_t * pegasus)
14629  {
14630 -       __u8    tmp;
14631 +       __u8 tmp;
14632  
14633 -       get_registers( pegasus, EthCtrl2, 1, &tmp );
14634 -       set_register( pegasus, EpromCtrl, 0 );
14635 -       set_register( pegasus, EthCtrl2, tmp & ~EPROM_WR_ENABLE );
14636 +       get_registers(pegasus, EthCtrl2, 1, &tmp);
14637 +       set_register(pegasus, EpromCtrl, 0);
14638 +       set_register(pegasus, EthCtrl2, tmp & ~EPROM_WR_ENABLE);
14639  }
14640  
14641 -
14642 -static int write_eprom_word( pegasus_t *pegasus, __u8 index, __u16 data )
14643 +static int write_eprom_word(pegasus_t * pegasus, __u8 index, __u16 data)
14644  {
14645 -       int     i, tmp;
14646 -       __u8    d[4] = {0x3f, 0, 0, EPROM_WRITE};
14647 +       int i, tmp;
14648 +       __u8 d[4] = { 0x3f, 0, 0, EPROM_WRITE };
14649  
14650 -       set_registers( pegasus, EpromOffset, 4, d );
14651 -       enable_eprom_write( pegasus );
14652 -       set_register( pegasus, EpromOffset, index );
14653 -       set_registers( pegasus, EpromData, 2, &data );
14654 -       set_register( pegasus, EpromCtrl, EPROM_WRITE );
14655 +       set_registers(pegasus, EpromOffset, 4, d);
14656 +       enable_eprom_write(pegasus);
14657 +       set_register(pegasus, EpromOffset, index);
14658 +       set_registers(pegasus, EpromData, 2, &data);
14659 +       set_register(pegasus, EpromCtrl, EPROM_WRITE);
14660  
14661 -       for ( i=0; i < REG_TIMEOUT; i++ ) {
14662 -               get_registers( pegasus, EpromCtrl, 1, &tmp );
14663 -               if ( tmp & EPROM_DONE )
14664 +       for (i = 0; i < REG_TIMEOUT; i++) {
14665 +               get_registers(pegasus, EpromCtrl, 1, &tmp);
14666 +               if (tmp & EPROM_DONE)
14667                         break;
14668         }
14669 -       disable_eprom_write( pegasus );
14670 -       if ( i < REG_TIMEOUT )
14671 -               return  0;
14672 +       disable_eprom_write(pegasus);
14673 +       if (i < REG_TIMEOUT)
14674 +               return 0;
14675         warn("%s: failed", __FUNCTION__);
14676 -       return  -1;
14677 +       return -1;
14678  }
14679 -#endif /* PEGASUS_WRITE_EEPROM */
14680 +#endif                         /* PEGASUS_WRITE_EEPROM */
14681  
14682 -static inline void get_node_id( pegasus_t *pegasus, __u8 *id )
14683 +static inline void get_node_id(pegasus_t * pegasus, __u8 * id)
14684  {
14685 -       int     i;
14686 +       int i;
14687         __u16 w16;
14688 -       
14689 +
14690         for (i = 0; i < 3; i++) {
14691 -               read_eprom_word( pegasus, i, &w16);
14692 -               ((__u16 *) id)[i] = cpu_to_le16p (&w16);
14693 +               read_eprom_word(pegasus, i, &w16);
14694 +               ((__u16 *) id)[i] = cpu_to_le16p(&w16);
14695         }
14696  }
14697  
14698 -
14699 -static void set_ethernet_addr( pegasus_t *pegasus )
14700 +static void set_ethernet_addr(pegasus_t * pegasus)
14701  {
14702 -       __u8    node_id[6];
14703 +       __u8 node_id[6];
14704  
14705         get_node_id(pegasus, node_id);
14706 -       set_registers( pegasus, EthID, sizeof(node_id), node_id );
14707 -       memcpy( pegasus->net->dev_addr, node_id, sizeof(node_id) );
14708 +       set_registers(pegasus, EthID, sizeof(node_id), node_id);
14709 +       memcpy(pegasus->net->dev_addr, node_id, sizeof(node_id));
14710  }
14711  
14712 -
14713 -static inline int reset_mac( pegasus_t *pegasus )
14714 +static inline int reset_mac(pegasus_t * pegasus)
14715  {
14716 -       __u8    data = 0x8;
14717 -       int     i;
14718 +       __u8 data = 0x8;
14719 +       int i;
14720  
14721         set_register(pegasus, EthCtrl1, data);
14722         for (i = 0; i < REG_TIMEOUT; i++) {
14723                 get_registers(pegasus, EthCtrl1, 1, &data);
14724                 if (~data & 0x08) {
14725 -                       if (loopback & 1) 
14726 +                       if (loopback & 1)
14727                                 break;
14728 -                       if ( mii_mode && (pegasus->features & HAS_HOME_PNA) )
14729 -                               set_register( pegasus, Gpio1, 0x34 );
14730 +                       if (mii_mode && (pegasus->features & HAS_HOME_PNA))
14731 +                               set_register(pegasus, Gpio1, 0x34);
14732                         else
14733 -                               set_register( pegasus, Gpio1, 0x26 );
14734 -                       set_register( pegasus, Gpio0, pegasus->features );
14735 -                       set_register( pegasus, Gpio0, DEFAULT_GPIO_SET );
14736 +                               set_register(pegasus, Gpio1, 0x26);
14737 +                       set_register(pegasus, Gpio0, pegasus->features);
14738 +                       set_register(pegasus, Gpio0, DEFAULT_GPIO_SET);
14739                         break;
14740                 }
14741         }
14742 -       if ( i == REG_TIMEOUT )
14743 +       if (i == REG_TIMEOUT)
14744                 return 1;
14745  
14746         if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS ||
14747             usb_dev_id[pegasus->dev_index].vendor == VENDOR_DLINK) {
14748 -               __u16   auxmode;
14749 +               __u16 auxmode;
14750  
14751                 read_mii_word(pegasus, 1, 0x1b, &auxmode);
14752                 write_mii_word(pegasus, 1, 0x1b, auxmode | 4);
14753         }
14754         if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_ELCON) {
14755 -               __u16   auxmode;
14756 +               __u16 auxmode;
14757                 read_mii_word(pegasus, 3, 0x1b, &auxmode);
14758                 write_mii_word(pegasus, 3, 0x1b, auxmode | 4);
14759         }
14760 -       return  0;
14761 +       return 0;
14762  }
14763  
14764 -
14765 -static int enable_net_traffic( struct net_device *dev, struct usb_device *usb )
14766 +static int enable_net_traffic(struct net_device *dev, struct usb_device *usb)
14767  {
14768 -       __u16   linkpart, bmsr;
14769 -       __u8    data[4];
14770 +       __u16 linkpart, bmsr;
14771 +       __u8 data[4];
14772         pegasus_t *pegasus = dev->priv;
14773  
14774         /* read twice 'cos this is a latch bit */
14775         read_mii_word(pegasus, pegasus->phy, MII_BMSR, &bmsr);
14776         read_mii_word(pegasus, pegasus->phy, MII_BMSR, &bmsr);
14777 -       if ( !(bmsr & 4) && !loopback ) 
14778 -               warn( "%s: link NOT established (0x%x) - check the cable.",
14779 -                       dev->name, bmsr );
14780 -       if ( read_mii_word(pegasus, pegasus->phy, MII_LPA, &linkpart) )
14781 +       if (read_mii_word(pegasus, pegasus->phy, MII_LPA, &linkpart))
14782                 return 2;
14783 -       if ( !(linkpart & 1) )
14784 -               warn( "link partner stat %x", linkpart );
14785 +       if (!(linkpart & 1))
14786 +               warn("link partner stat %x", linkpart);
14787  
14788         data[0] = 0xc9;
14789         data[1] = 0;
14790 -       if ( linkpart & (ADVERTISE_100FULL | ADVERTISE_10FULL) )
14791 -               data[1] |= 0x20; /* set full duplex */
14792 -       if ( linkpart & (ADVERTISE_100FULL | ADVERTISE_100HALF) )
14793 -               data[1] |= 0x10; /* set 100 Mbps */
14794 -       if ( mii_mode )
14795 +       if (linkpart & (ADVERTISE_100FULL | ADVERTISE_10FULL))
14796 +               data[1] |= 0x20;        /* set full duplex */
14797 +       if (linkpart & (ADVERTISE_100FULL | ADVERTISE_100HALF))
14798 +               data[1] |= 0x10;        /* set 100 Mbps */
14799 +       if (mii_mode)
14800                 data[1] = 0;
14801         data[2] = (loopback & 1) ? 0x09 : 0x01;
14802 -
14803 -       memcpy( pegasus->eth_regs, data, sizeof(data) );
14804 -
14805 -       set_registers( pegasus, EthCtrl0, 3, data );
14806 +       memcpy(pegasus->eth_regs, data, sizeof(data));
14807 +       set_registers(pegasus, EthCtrl0, 3, data);
14808  
14809         return 0;
14810  }
14811  
14812 -
14813 -static void read_bulk_callback( struct urb *urb )
14814 +static void read_bulk_callback(struct urb *urb)
14815  {
14816         pegasus_t *pegasus = urb->context;
14817         struct net_device *net;
14818         int count = urb->actual_length, res;
14819         int rx_status;
14820 -       struct sk_buff  *skb;
14821 +       struct sk_buff *skb;
14822         __u16 pkt_len;
14823  
14824 -       if ( !pegasus || !(pegasus->flags & PEGASUS_RUNNING) )
14825 +       if (!pegasus || !(pegasus->flags & PEGASUS_RUNNING))
14826                 return;
14827  
14828         net = pegasus->net;
14829 -       if ( !netif_device_present(net) )
14830 +       if (!netif_device_present(net))
14831                 return;
14832  
14833 -       if ( pegasus->flags & PEGASUS_RX_BUSY ) {
14834 +       if (pegasus->flags & PEGASUS_RX_BUSY) {
14835                 pegasus->stats.rx_errors++;
14836                 dbg("pegasus Rx busy");
14837                 return;
14838         }
14839         pegasus->flags |= PEGASUS_RX_BUSY;
14840  
14841 -       switch ( urb->status ) {
14842 -               case 0:
14843 -                       break;
14844 -               case -ETIMEDOUT:
14845 -                       dbg( "reset MAC" );
14846 -                       pegasus->flags &= ~PEGASUS_RX_BUSY;
14847 -                       break;
14848 -               default:
14849 -                       dbg( "%s: RX status %d", net->name, urb->status );
14850 -                       goto goon;
14851 +       switch (urb->status) {
14852 +       case 0:
14853 +               break;
14854 +       case -ETIMEDOUT:
14855 +               dbg("reset MAC");
14856 +               pegasus->flags &= ~PEGASUS_RX_BUSY;
14857 +               break;
14858 +       default:
14859 +               dbg("%s: RX status %d", net->name, urb->status);
14860 +               goto goon;
14861         }
14862  
14863 -       if ( !count )
14864 +       if (!count)
14865                 goto goon;
14866  
14867 -       rx_status = le32_to_cpu(*(int *)(pegasus->rx_buff + count - 4));
14868 -       if ( rx_status & 0x000e0000 ) {
14869 +       rx_status = le32_to_cpu(*(int *) (pegasus->rx_buff + count - 4));
14870 +       if (rx_status & 0x000e0000) {
14871                 dbg("%s: RX packet error %x", net->name, rx_status & 0xe0000);
14872                 pegasus->stats.rx_errors++;
14873 -               if ( rx_status & 0x060000 )
14874 +               if (rx_status & 0x060000)
14875                         pegasus->stats.rx_length_errors++;
14876 -               if ( rx_status & 0x080000 )
14877 +               if (rx_status & 0x080000)
14878                         pegasus->stats.rx_crc_errors++;
14879 -               if ( rx_status & 0x100000 )
14880 +               if (rx_status & 0x100000)
14881                         pegasus->stats.rx_frame_errors++;
14882                 goto goon;
14883         }
14884  
14885         pkt_len = (rx_status & 0xfff) - 8;
14886  
14887 -       if ( !(skb = dev_alloc_skb(pkt_len+2)) )
14888 +       if (!(skb = dev_alloc_skb(pkt_len + 2)))
14889                 goto goon;
14890  
14891         skb->dev = net;
14892 @@ -580,102 +547,100 @@
14893         pegasus->stats.rx_bytes += pkt_len;
14894  
14895  goon:
14896 -       FILL_BULK_URB( pegasus->rx_urb, pegasus->usb,
14897 -                       usb_rcvbulkpipe(pegasus->usb, 1),
14898 -                       pegasus->rx_buff, PEGASUS_MAX_MTU, 
14899 -                       read_bulk_callback, pegasus );
14900 -       if ( (res = usb_submit_urb(pegasus->rx_urb)) )
14901 +       FILL_BULK_URB(pegasus->rx_urb, pegasus->usb,
14902 +                     usb_rcvbulkpipe(pegasus->usb, 1),
14903 +                     pegasus->rx_buff, PEGASUS_MAX_MTU,
14904 +                     read_bulk_callback, pegasus);
14905 +       if ((res = usb_submit_urb(pegasus->rx_urb)))
14906                 warn("%s: failed submint rx_urb %d", __FUNCTION__, res);
14907         pegasus->flags &= ~PEGASUS_RX_BUSY;
14908  }
14909  
14910 -
14911 -static void write_bulk_callback( struct urb *urb )
14912 +static void write_bulk_callback(struct urb *urb)
14913  {
14914         pegasus_t *pegasus = urb->context;
14915  
14916 -       if ( !pegasus || !(pegasus->flags & PEGASUS_RUNNING) )
14917 +       if (!pegasus || !(pegasus->flags & PEGASUS_RUNNING))
14918                 return;
14919  
14920 -       if ( !netif_device_present(pegasus->net) )
14921 +       if (!netif_device_present(pegasus->net))
14922                 return;
14923 -               
14924 -       if ( urb->status )
14925 +
14926 +       if (urb->status)
14927                 info("%s: TX status %d", pegasus->net->name, urb->status);
14928  
14929         pegasus->net->trans_start = jiffies;
14930 -       netif_wake_queue( pegasus->net );
14931 +       netif_wake_queue(pegasus->net);
14932  }
14933  
14934  #ifdef PEGASUS_USE_INTR
14935 -static void intr_callback( struct urb *urb )
14936 +static void intr_callback(struct urb *urb)
14937  {
14938         pegasus_t *pegasus = urb->context;
14939         struct net_device *net;
14940 -       __u8    *d;
14941 +       __u8 *d;
14942  
14943 -       if ( !pegasus )
14944 +       if (!pegasus)
14945                 return;
14946 -               
14947 -       switch ( urb->status ) {
14948 -               case 0:
14949 -                       break;
14950 -               case -ENOENT:
14951 -                       return;
14952 -               default:
14953 -                       info("intr status %d", urb->status);
14954 +
14955 +       switch (urb->status) {
14956 +       case 0:
14957 +               break;
14958 +       case -ENOENT:
14959 +               return;
14960 +       default:
14961 +               info("intr status %d", urb->status);
14962         }
14963  
14964         d = urb->transfer_buffer;
14965         net = pegasus->net;
14966 -       if ( d[0] & 0xfc ) {
14967 +       if (d[0] & 0xfc) {
14968                 pegasus->stats.tx_errors++;
14969 -               if ( d[0] & TX_UNDERRUN )
14970 +               if (d[0] & TX_UNDERRUN)
14971                         pegasus->stats.tx_fifo_errors++;
14972 -               if ( d[0] & (EXCESSIVE_COL | JABBER_TIMEOUT) )
14973 +               if (d[0] & (EXCESSIVE_COL | JABBER_TIMEOUT))
14974                         pegasus->stats.tx_aborted_errors++;
14975 -               if ( d[0] & LATE_COL )
14976 +               if (d[0] & LATE_COL)
14977                         pegasus->stats.tx_window_errors++;
14978 -               if ( d[0] & (NO_CARRIER | LOSS_CARRIER) )
14979 +               if (d[0] & (NO_CARRIER | LOSS_CARRIER))
14980                         pegasus->stats.tx_carrier_errors++;
14981         }
14982  }
14983  #endif
14984  
14985 -static void pegasus_tx_timeout( struct net_device *net )
14986 +static void pegasus_tx_timeout(struct net_device *net)
14987  {
14988         pegasus_t *pegasus = net->priv;
14989  
14990 -       if ( !pegasus )
14991 +       if (!pegasus)
14992                 return;
14993 -               
14994 +
14995         warn("%s: Tx timed out.", net->name);
14996         pegasus->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
14997 -       usb_unlink_urb( pegasus->tx_urb );
14998 +       usb_unlink_urb(pegasus->tx_urb);
14999         pegasus->stats.tx_errors++;
15000  }
15001  
15002 -
15003 -static int pegasus_start_xmit( struct sk_buff *skb, struct net_device *net )
15004 +static int pegasus_start_xmit(struct sk_buff *skb, struct net_device *net)
15005  {
15006 -       pegasus_t       *pegasus = net->priv;
15007 -       int     count = ((skb->len+2) & 0x3f) ? skb->len+2 : skb->len+3;
15008 -       int     res;
15009 +       pegasus_t *pegasus = net->priv;
15010 +       int count = ((skb->len + 2) & 0x3f) ? skb->len + 2 : skb->len + 3;
15011 +       int res;
15012         __u16 l16 = skb->len;
15013 -       
15014 -       netif_stop_queue( net );
15015 -               
15016 -       ((__u16 *)pegasus->tx_buff)[0] = cpu_to_le16( l16 );
15017 -       memcpy(pegasus->tx_buff+2, skb->data, skb->len);
15018 -       FILL_BULK_URB( pegasus->tx_urb, pegasus->usb,
15019 -                       usb_sndbulkpipe(pegasus->usb, 2),
15020 -                       pegasus->tx_buff, PEGASUS_MAX_MTU, 
15021 -                       write_bulk_callback, pegasus );
15022 +
15023 +       netif_stop_queue(net);
15024 +
15025 +       ((__u16 *) pegasus->tx_buff)[0] = cpu_to_le16(l16);
15026 +       memcpy(pegasus->tx_buff + 2, skb->data, skb->len);
15027 +       FILL_BULK_URB(pegasus->tx_urb, pegasus->usb,
15028 +                     usb_sndbulkpipe(pegasus->usb, 2),
15029 +                     pegasus->tx_buff, PEGASUS_MAX_MTU,
15030 +                     write_bulk_callback, pegasus);
15031         pegasus->tx_urb->transfer_buffer_length = count;
15032         if ((res = usb_submit_urb(pegasus->tx_urb))) {
15033                 warn("failed tx_urb %d", res);
15034                 pegasus->stats.tx_errors++;
15035 -               netif_start_queue( net );
15036 +               netif_start_queue(net);
15037         } else {
15038                 pegasus->stats.tx_packets++;
15039                 pegasus->stats.tx_bytes += skb->len;
15040 @@ -687,42 +652,38 @@
15041         return 0;
15042  }
15043  
15044 -
15045 -static struct net_device_stats *pegasus_netdev_stats( struct net_device *dev )
15046 +static struct net_device_stats *pegasus_netdev_stats(struct net_device *dev)
15047  {
15048 -       return &((pegasus_t *)dev->priv)->stats;
15049 +       return &((pegasus_t *) dev->priv)->stats;
15050  }
15051  
15052 -
15053 -static inline void disable_net_traffic( pegasus_t *pegasus )
15054 +static inline void disable_net_traffic(pegasus_t * pegasus)
15055  {
15056 -       int     tmp=0;
15057 +       int tmp = 0;
15058  
15059 -       set_registers( pegasus, EthCtrl0, 2, &tmp );
15060 +       set_registers(pegasus, EthCtrl0, 2, &tmp);
15061  }
15062  
15063 -
15064 -static inline void get_interrupt_interval( pegasus_t *pegasus )
15065 +static inline void get_interrupt_interval(pegasus_t * pegasus)
15066  {
15067 -       __u8    data[2];
15068 +       __u8 data[2];
15069  
15070 -       read_eprom_word( pegasus, 4, (__u16 *)data );
15071 -       if ( data[1] < 0x80 ) {
15072 -               info( "intr interval will be changed from %ums to %ums",
15073 -                    data[1], 0x80 );
15074 +       read_eprom_word(pegasus, 4, (__u16 *) data);
15075 +       if (data[1] < 0x80) {
15076 +               info("intr interval will be changed from %ums to %ums",
15077 +                    data[1], 0x80);
15078                 data[1] = 0x80;
15079  #ifdef PEGASUS_WRITE_EEPROM
15080 -               write_eprom_word( pegasus, 4, *(__u16 *)data );
15081 +               write_eprom_word(pegasus, 4, *(__u16 *) data);
15082  #endif
15083         }
15084         pegasus->intr_interval = data[1];
15085  }
15086  
15087 -
15088  static void set_carrier(struct net_device *net)
15089  {
15090 -       pegasus_t       *pegasus;
15091 -       short           tmp;
15092 +       pegasus_t *pegasus;
15093 +       short tmp;
15094  
15095         pegasus = net->priv;
15096         read_mii_word(pegasus, pegasus->phy, MII_BMSR, &tmp);
15097 @@ -730,34 +691,32 @@
15098                 netif_carrier_on(net);
15099         else
15100                 netif_carrier_off(net);
15101 -       
15102 -}
15103  
15104 +}
15105  
15106  static int pegasus_open(struct net_device *net)
15107  {
15108 -       pegasus_t *pegasus = (pegasus_t *)net->priv;
15109 -       int     res;
15110 -
15111 +       pegasus_t *pegasus = (pegasus_t *) net->priv;
15112 +       int res;
15113  
15114         down(&pegasus->sem);
15115 -       FILL_BULK_URB( pegasus->rx_urb, pegasus->usb,
15116 -                       usb_rcvbulkpipe(pegasus->usb, 1),
15117 -                       pegasus->rx_buff, PEGASUS_MAX_MTU, 
15118 -                       read_bulk_callback, pegasus );
15119 -       if ( (res = usb_submit_urb(pegasus->rx_urb)) )
15120 +       FILL_BULK_URB(pegasus->rx_urb, pegasus->usb,
15121 +                     usb_rcvbulkpipe(pegasus->usb, 1),
15122 +                     pegasus->rx_buff, PEGASUS_MAX_MTU,
15123 +                     read_bulk_callback, pegasus);
15124 +       if ((res = usb_submit_urb(pegasus->rx_urb)))
15125                 warn("%s: failed rx_urb %d", __FUNCTION__, res);
15126  #ifdef PEGASUS_USE_INTR
15127 -       FILL_INT_URB( pegasus->intr_urb, pegasus->usb,
15128 -                       usb_rcvintpipe(pegasus->usb, 3),
15129 -                       pegasus->intr_buff, sizeof(pegasus->intr_buff),
15130 -                       intr_callback, pegasus, pegasus->intr_interval );
15131 -       if ( (res = usb_submit_urb(pegasus->intr_urb)) )
15132 +       FILL_INT_URB(pegasus->intr_urb, pegasus->usb,
15133 +                    usb_rcvintpipe(pegasus->usb, 3),
15134 +                    pegasus->intr_buff, sizeof(pegasus->intr_buff),
15135 +                    intr_callback, pegasus, pegasus->intr_interval);
15136 +       if ((res = usb_submit_urb(pegasus->intr_urb)))
15137                 warn("%s: failed intr_urb %d", __FUNCTION__, res);
15138  #endif
15139 -       netif_start_queue( net );
15140 +       netif_start_queue(net);
15141         pegasus->flags |= PEGASUS_RUNNING;
15142 -       if ( (res = enable_net_traffic(net, pegasus->usb)) ) {
15143 +       if ((res = enable_net_traffic(net, pegasus->usb))) {
15144                 err("can't enable_net_traffic() - %d", res);
15145                 res = -EIO;
15146                 goto exit;
15147 @@ -767,129 +726,126 @@
15148         res = 0;
15149  exit:
15150         up(&pegasus->sem);
15151 -       
15152 +
15153         return res;
15154  }
15155  
15156 -
15157 -static int pegasus_close( struct net_device *net )
15158 +static int pegasus_close(struct net_device *net)
15159  {
15160 -       pegasus_t       *pegasus = net->priv;
15161 +       pegasus_t *pegasus = net->priv;
15162  
15163         down(&pegasus->sem);
15164         pegasus->flags &= ~PEGASUS_RUNNING;
15165 -       netif_stop_queue( net );
15166 -       if ( !(pegasus->flags & PEGASUS_UNPLUG) )
15167 -               disable_net_traffic( pegasus );
15168 -
15169 -       usb_unlink_urb( pegasus->rx_urb );
15170 -       usb_unlink_urb( pegasus->tx_urb );
15171 -       usb_unlink_urb( pegasus->ctrl_urb );
15172 +       netif_stop_queue(net);
15173 +       if (!(pegasus->flags & PEGASUS_UNPLUG))
15174 +               disable_net_traffic(pegasus);
15175 +
15176 +       usb_unlink_urb(pegasus->rx_urb);
15177 +       usb_unlink_urb(pegasus->tx_urb);
15178 +       usb_unlink_urb(pegasus->ctrl_urb);
15179  #ifdef PEGASUS_USE_INTR
15180 -       usb_unlink_urb( pegasus->intr_urb );
15181 +       usb_unlink_urb(pegasus->intr_urb);
15182  #endif
15183         up(&pegasus->sem);
15184 -       
15185 +
15186         return 0;
15187  }
15188  
15189 -
15190  static int pegasus_ethtool_ioctl(struct net_device *net, void *uaddr)
15191  {
15192 -       pegasus_t       *pegasus;
15193 -       int             cmd;
15194 -       char            tmp[128];
15195 +       pegasus_t *pegasus;
15196 +       int cmd;
15197 +       char tmp[128];
15198  
15199         pegasus = net->priv;
15200 -       if (get_user(cmd, (int *)uaddr))
15201 +       if (get_user(cmd, (int *) uaddr))
15202                 return -EFAULT;
15203         switch (cmd) {
15204 -       case ETHTOOL_GDRVINFO: {
15205 -               struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
15206 -               strncpy(info.driver, DRIVER_DESC, ETHTOOL_BUSINFO_LEN);
15207 -               strncpy(info.version, DRIVER_VERSION, ETHTOOL_BUSINFO_LEN);
15208 -               sprintf(tmp, "usb%d:%d", pegasus->usb->bus->busnum,
15209 -                       pegasus->usb->devnum);
15210 -               strncpy(info.bus_info, tmp, ETHTOOL_BUSINFO_LEN);
15211 -               if (copy_to_user(uaddr, &info, sizeof(info)))
15212 -                       return -EFAULT;
15213 -               return 0;
15214 -       }
15215 -       case ETHTOOL_GSET: {
15216 -               struct ethtool_cmd ecmd;
15217 -               short   lpa, bmcr;
15218 -
15219 -               if (copy_from_user(&ecmd, uaddr, sizeof(ecmd)))
15220 -                       return -EFAULT;
15221 -               ecmd.supported = (SUPPORTED_10baseT_Half |
15222 -                                SUPPORTED_10baseT_Full |
15223 -                                SUPPORTED_100baseT_Half |
15224 -                                SUPPORTED_100baseT_Full |
15225 -                                SUPPORTED_Autoneg |
15226 -                                SUPPORTED_TP |
15227 -                                SUPPORTED_MII);
15228 -               ecmd.port = PORT_TP;
15229 -               ecmd.transceiver = XCVR_INTERNAL;
15230 -               ecmd.phy_address = pegasus->phy;
15231 -               read_mii_word(pegasus, pegasus->phy, MII_BMCR, &bmcr);
15232 -               read_mii_word(pegasus, pegasus->phy, MII_LPA, &lpa);
15233 -               if (bmcr & BMCR_ANENABLE) {
15234 -                       ecmd.autoneg = AUTONEG_ENABLE;
15235 -                       ecmd.speed = lpa & (LPA_100HALF|LPA_100FULL) ?
15236 -                                    SPEED_100 : SPEED_10;
15237 -                       if (ecmd.speed == SPEED_100)
15238 -                               ecmd.duplex = lpa & LPA_100FULL ?
15239 -                                             DUPLEX_FULL : DUPLEX_HALF;
15240 -                       else
15241 -                               ecmd.duplex = lpa & LPA_10FULL ?
15242 -                                             DUPLEX_FULL : DUPLEX_HALF;
15243 -               } else {
15244 -                       ecmd.autoneg = AUTONEG_DISABLE;
15245 -                       ecmd.speed = bmcr & BMCR_SPEED100 ? 
15246 -                                    SPEED_100 : SPEED_10;
15247 -                       ecmd.duplex = bmcr & BMCR_FULLDPLX ?
15248 -                                     DUPLEX_FULL : DUPLEX_HALF;
15249 +       case ETHTOOL_GDRVINFO:{
15250 +                       struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
15251 +                       strncpy(info.driver, DRIVER_DESC, ETHTOOL_BUSINFO_LEN);
15252 +                       strncpy(info.version, DRIVER_VERSION,
15253 +                               ETHTOOL_BUSINFO_LEN);
15254 +                       sprintf(tmp, "usb%d:%d", pegasus->usb->bus->busnum,
15255 +                               pegasus->usb->devnum);
15256 +                       strncpy(info.bus_info, tmp, ETHTOOL_BUSINFO_LEN);
15257 +                       if (copy_to_user(uaddr, &info, sizeof(info)))
15258 +                               return -EFAULT;
15259 +                       return 0;
15260 +               }
15261 +       case ETHTOOL_GSET:{
15262 +                       struct ethtool_cmd ecmd;
15263 +                       short lpa, bmcr;
15264 +
15265 +                       if (copy_from_user(&ecmd, uaddr, sizeof(ecmd)))
15266 +                               return -EFAULT;
15267 +                       ecmd.supported = (SUPPORTED_10baseT_Half |
15268 +                                         SUPPORTED_10baseT_Full |
15269 +                                         SUPPORTED_100baseT_Half |
15270 +                                         SUPPORTED_100baseT_Full |
15271 +                                         SUPPORTED_Autoneg |
15272 +                                         SUPPORTED_TP | SUPPORTED_MII);
15273 +                       ecmd.port = PORT_TP;
15274 +                       ecmd.transceiver = XCVR_INTERNAL;
15275 +                       ecmd.phy_address = pegasus->phy;
15276 +                       read_mii_word(pegasus, pegasus->phy, MII_BMCR, &bmcr);
15277 +                       read_mii_word(pegasus, pegasus->phy, MII_LPA, &lpa);
15278 +                       if (bmcr & BMCR_ANENABLE) {
15279 +                               ecmd.autoneg = AUTONEG_ENABLE;
15280 +                               ecmd.speed = lpa & (LPA_100HALF | LPA_100FULL) ?
15281 +                                   SPEED_100 : SPEED_10;
15282 +                               if (ecmd.speed == SPEED_100)
15283 +                                       ecmd.duplex = lpa & LPA_100FULL ?
15284 +                                           DUPLEX_FULL : DUPLEX_HALF;
15285 +                               else
15286 +                                       ecmd.duplex = lpa & LPA_10FULL ?
15287 +                                           DUPLEX_FULL : DUPLEX_HALF;
15288 +                       } else {
15289 +                               ecmd.autoneg = AUTONEG_DISABLE;
15290 +                               ecmd.speed = bmcr & BMCR_SPEED100 ?
15291 +                                   SPEED_100 : SPEED_10;
15292 +                               ecmd.duplex = bmcr & BMCR_FULLDPLX ?
15293 +                                   DUPLEX_FULL : DUPLEX_HALF;
15294 +                       }
15295 +                       if (copy_to_user(uaddr, &ecmd, sizeof(ecmd)))
15296 +                               return -EFAULT;
15297 +
15298 +                       return 0;
15299 +               }
15300 +       case ETHTOOL_SSET:{
15301 +                       return -EOPNOTSUPP;
15302 +               }
15303 +       case ETHTOOL_GLINK:{
15304 +                       struct ethtool_value edata = { ETHTOOL_GLINK };
15305 +                       edata.data = netif_carrier_ok(net);
15306 +                       if (copy_to_user(uaddr, &edata, sizeof(edata)))
15307 +                               return -EFAULT;
15308 +                       return 0;
15309                 }
15310 -               if (copy_to_user(uaddr, &ecmd, sizeof(ecmd)))
15311 -                       return -EFAULT;
15312 -               
15313 -               return 0;
15314 -       }
15315 -       case ETHTOOL_SSET: {
15316 -               return -EOPNOTSUPP;
15317 -       }
15318 -       case ETHTOOL_GLINK: {
15319 -               struct ethtool_value edata = {ETHTOOL_GLINK};
15320 -               edata.data = netif_carrier_ok(net);
15321 -               if (copy_to_user(uaddr, &edata, sizeof(edata)))
15322 -                       return -EFAULT;
15323 -               return 0;
15324 -       }
15325         default:
15326                 return -EOPNOTSUPP;
15327         }
15328  }
15329  
15330 -
15331 -static int pegasus_ioctl( struct net_device *net, struct ifreq *rq, int cmd )
15332 +static int pegasus_ioctl(struct net_device *net, struct ifreq *rq, int cmd)
15333  {
15334 -       __u16 *data = (__u16 *)&rq->ifr_data;
15335 -       pegasus_t       *pegasus = net->priv;
15336 -       int     res;
15337 +       __u16 *data = (__u16 *) & rq->ifr_data;
15338 +       pegasus_t *pegasus = net->priv;
15339 +       int res;
15340  
15341         down(&pegasus->sem);
15342 -       switch(cmd) {
15343 +       switch (cmd) {
15344         case SIOCETHTOOL:
15345                 res = pegasus_ethtool_ioctl(net, rq->ifr_data);
15346                 break;
15347         case SIOCDEVPRIVATE:
15348                 data[0] = pegasus->phy;
15349 -       case SIOCDEVPRIVATE+1:
15350 -               read_mii_word(pegasus, data[0], data[1]&0x1f, &data[3]);
15351 +       case SIOCDEVPRIVATE + 1:
15352 +               read_mii_word(pegasus, data[0], data[1] & 0x1f, &data[3]);
15353                 res = 0;
15354                 break;
15355 -       case SIOCDEVPRIVATE+2:
15356 -               if ( !capable(CAP_NET_ADMIN) ) {
15357 +       case SIOCDEVPRIVATE + 2:
15358 +               if (!capable(CAP_NET_ADMIN)) {
15359                         up(&pegasus->sem);
15360                         return -EPERM;
15361                 }
15362 @@ -904,8 +860,7 @@
15363         return res;
15364  }
15365  
15366 -
15367 -static void pegasus_set_multicast( struct net_device *net )
15368 +static void pegasus_set_multicast(struct net_device *net)
15369  {
15370         pegasus_t *pegasus = net->priv;
15371  
15372 @@ -915,7 +870,7 @@
15373                 pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS;
15374                 info("%s: Promiscuous mode enabled", net->name);
15375         } else if ((net->mc_count > multicast_filter_limit) ||
15376 -                       (net->flags & IFF_ALLMULTI)) {
15377 +                  (net->flags & IFF_ALLMULTI)) {
15378                 pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST;
15379                 pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS;
15380                 info("%s set allmulti", net->name);
15381 @@ -925,100 +880,92 @@
15382         }
15383  
15384         pegasus->flags |= ETH_REGS_CHANGE;
15385 -       ctrl_callback( pegasus->ctrl_urb );
15386 +       ctrl_callback(pegasus->ctrl_urb);
15387  
15388         netif_wake_queue(net);
15389  }
15390  
15391 -
15392 -static __u8 mii_phy_probe( pegasus_t *pegasus )
15393 +static __u8 mii_phy_probe(pegasus_t * pegasus)
15394  {
15395 -       int     i;
15396 -       __u16   tmp;
15397 +       int i;
15398 +       __u16 tmp;
15399  
15400 -       for ( i=0; i < 32; i++ ) {
15401 -               read_mii_word( pegasus, i, MII_BMSR, &tmp );
15402 -               if ( tmp == 0 || tmp == 0xffff || (tmp & BMSR_MEDIA) == 0 )
15403 +       for (i = 0; i < 32; i++) {
15404 +               read_mii_word(pegasus, i, MII_BMSR, &tmp);
15405 +               if (tmp == 0 || tmp == 0xffff || (tmp & BMSR_MEDIA) == 0)
15406                         continue;
15407                 else
15408 -                       return  i;
15409 +                       return i;
15410         }
15411  
15412 -       return  0xff;
15413 +       return 0xff;
15414  }
15415  
15416 -
15417 -static inline void setup_pegasus_II( pegasus_t *pegasus )
15418 +static inline void setup_pegasus_II(pegasus_t * pegasus)
15419  {
15420 -       set_register( pegasus, Reg1d, 0 );
15421 -       set_register( pegasus, Reg7b, 2 );
15422 -       if ( pegasus->features & HAS_HOME_PNA  && mii_mode )
15423 -               set_register( pegasus, Reg81, 6 );
15424 +       set_register(pegasus, Reg1d, 0);
15425 +       set_register(pegasus, Reg7b, 2);
15426 +       if (pegasus->features & HAS_HOME_PNA && mii_mode)
15427 +               set_register(pegasus, Reg81, 6);
15428         else
15429 -               set_register( pegasus, Reg81, 2 );
15430 +               set_register(pegasus, Reg81, 2);
15431  }
15432  
15433 -
15434 -static void * pegasus_probe( struct usb_device *dev, unsigned int ifnum,
15435 -                            const struct usb_device_id *id)
15436 +static void *pegasus_probe(struct usb_device *dev, unsigned int ifnum,
15437 +                          const struct usb_device_id *id)
15438  {
15439 -       struct net_device       *net;
15440 -       pegasus_t               *pegasus;
15441 -       int                     dev_index = id - pegasus_ids;
15442 +       struct net_device *net;
15443 +       pegasus_t *pegasus;
15444 +       int dev_index = id - pegasus_ids;
15445  
15446         if (usb_set_configuration(dev, dev->config[0].bConfigurationValue)) {
15447                 err("usb_set_configuration() failed");
15448                 return NULL;
15449         }
15450  
15451 -       down(&gsem);
15452 -       if(!(pegasus = kmalloc(sizeof(struct pegasus), GFP_KERNEL))) {
15453 +       if (!(pegasus = kmalloc(sizeof(struct pegasus), GFP_KERNEL))) {
15454                 err("out of memory allocating device structure");
15455 -               goto exit;
15456 +               return NULL;
15457         }
15458  
15459 -       usb_inc_dev_use( dev );
15460 +       usb_inc_dev_use(dev);
15461         memset(pegasus, 0, sizeof(struct pegasus));
15462         pegasus->dev_index = dev_index;
15463 -       init_waitqueue_head( &pegasus->ctrl_wait );
15464 +       init_waitqueue_head(&pegasus->ctrl_wait);
15465  
15466         pegasus->ctrl_urb = usb_alloc_urb(0);
15467         if (!pegasus->ctrl_urb) {
15468 -               kfree (pegasus);
15469 -               pegasus = NULL;
15470 -               goto exit;
15471 +               kfree(pegasus);
15472 +               return NULL;
15473         }
15474         pegasus->rx_urb = usb_alloc_urb(0);
15475         if (!pegasus->rx_urb) {
15476 -               usb_free_urb (pegasus->ctrl_urb);
15477 -               kfree (pegasus);
15478 -               pegasus = NULL;
15479 -               goto exit;
15480 +               usb_free_urb(pegasus->ctrl_urb);
15481 +               kfree(pegasus);
15482 +               return NULL;
15483         }
15484         pegasus->tx_urb = usb_alloc_urb(0);
15485         if (!pegasus->tx_urb) {
15486 -               usb_free_urb (pegasus->rx_urb);
15487 -               usb_free_urb (pegasus->ctrl_urb);
15488 -               kfree (pegasus);
15489 -               pegasus = NULL;
15490 -               goto exit;
15491 +               usb_free_urb(pegasus->rx_urb);
15492 +               usb_free_urb(pegasus->ctrl_urb);
15493 +               kfree(pegasus);
15494 +               return NULL;
15495         }
15496         pegasus->intr_urb = usb_alloc_urb(0);
15497         if (!pegasus->intr_urb) {
15498 -               usb_free_urb (pegasus->tx_urb);
15499 -               usb_free_urb (pegasus->rx_urb);
15500 -               usb_free_urb (pegasus->ctrl_urb);
15501 -               kfree (pegasus);
15502 -               pegasus = NULL;
15503 -               goto exit;
15504 +               usb_free_urb(pegasus->tx_urb);
15505 +               usb_free_urb(pegasus->rx_urb);
15506 +               usb_free_urb(pegasus->ctrl_urb);
15507 +               kfree(pegasus);
15508 +               return NULL;
15509         }
15510  
15511 -       net = init_etherdev( NULL, 0 );
15512 -       if ( !net ) {
15513 -               usb_free_urb (pegasus->tx_urb);
15514 -               usb_free_urb (pegasus->rx_urb);
15515 -               usb_free_urb (pegasus->ctrl_urb);
15516 -               kfree( pegasus );
15517 +       net = init_etherdev(NULL, 0);
15518 +       if (!net) {
15519 +               usb_free_urb(pegasus->tx_urb);
15520 +               usb_free_urb(pegasus->rx_urb);
15521 +               usb_free_urb(pegasus->ctrl_urb);
15522 +               kfree(pegasus);
15523                 return NULL;
15524         }
15525  
15526 @@ -1040,32 +987,32 @@
15527  
15528         pegasus->features = usb_dev_id[dev_index].private;
15529  #ifdef PEGASUS_USE_INTR
15530 -       get_interrupt_interval( pegasus );
15531 +       get_interrupt_interval(pegasus);
15532  #endif
15533 -       if ( reset_mac(pegasus) ) {
15534 +       if (reset_mac(pegasus)) {
15535                 err("can't reset MAC");
15536 -               unregister_netdev( pegasus->net );
15537 -               usb_free_urb (pegasus->tx_urb);
15538 -               usb_free_urb (pegasus->rx_urb);
15539 -               usb_free_urb (pegasus->ctrl_urb);
15540 +               unregister_netdev(pegasus->net);
15541 +               usb_free_urb(pegasus->tx_urb);
15542 +               usb_free_urb(pegasus->rx_urb);
15543 +               usb_free_urb(pegasus->ctrl_urb);
15544                 kfree(pegasus->net);
15545                 kfree(pegasus);
15546                 pegasus = NULL;
15547                 goto exit;
15548         }
15549  
15550 -       info( "%s: %s", net->name, usb_dev_id[dev_index].name );
15551 +       info("%s: %s", net->name, usb_dev_id[dev_index].name);
15552  
15553 -       set_ethernet_addr( pegasus );
15554 +       set_ethernet_addr(pegasus);
15555  
15556 -       if ( pegasus->features & PEGASUS_II ) {
15557 -               info( "setup Pegasus II specific registers" );
15558 -               setup_pegasus_II( pegasus );
15559 -       }
15560 -       
15561 -       pegasus->phy = mii_phy_probe( pegasus );
15562 -       if ( pegasus->phy == 0xff ) {
15563 -               warn( "can't locate MII phy, using default" );
15564 +       if (pegasus->features & PEGASUS_II) {
15565 +               info("setup Pegasus II specific registers");
15566 +               setup_pegasus_II(pegasus);
15567 +       }
15568 +
15569 +       pegasus->phy = mii_phy_probe(pegasus);
15570 +       if (pegasus->phy == 0xff) {
15571 +               warn("can't locate MII phy, using default");
15572                 pegasus->phy = 1;
15573         }
15574  
15575 @@ -1074,19 +1021,18 @@
15576         return pegasus;
15577  }
15578  
15579 -
15580 -static void pegasus_disconnect( struct usb_device *dev, void *ptr )
15581 +static void pegasus_disconnect(struct usb_device *dev, void *ptr)
15582  {
15583         struct pegasus *pegasus = ptr;
15584  
15585 -       if ( !pegasus ) {
15586 +       if (!pegasus) {
15587                 warn("unregistering non-existant device");
15588                 return;
15589         }
15590  
15591         pegasus->flags |= PEGASUS_UNPLUG;
15592 -       unregister_netdev( pegasus->net );
15593 -       usb_dec_dev_use( dev );
15594 +       unregister_netdev(pegasus->net);
15595 +       usb_dec_dev_use(dev);
15596         usb_unlink_urb(pegasus->intr_urb);
15597         usb_unlink_urb(pegasus->tx_urb);
15598         usb_unlink_urb(pegasus->rx_urb);
15599 @@ -1095,12 +1041,11 @@
15600         usb_free_urb(pegasus->tx_urb);
15601         usb_free_urb(pegasus->rx_urb);
15602         usb_free_urb(pegasus->ctrl_urb);
15603 -       kfree( pegasus->net );
15604 -       kfree( pegasus );
15605 +       kfree(pegasus->net);
15606 +       kfree(pegasus);
15607         pegasus = NULL;
15608  }
15609  
15610 -
15611  static struct usb_driver pegasus_driver = {
15612         name:           "pegasus",
15613         probe:          pegasus_probe,
15614 @@ -1111,13 +1056,13 @@
15615  int __init pegasus_init(void)
15616  {
15617         info(DRIVER_VERSION ":" DRIVER_DESC);
15618 -       return usb_register( &pegasus_driver );
15619 +       return usb_register(&pegasus_driver);
15620  }
15621  
15622  void __exit pegasus_exit(void)
15623  {
15624 -       usb_deregister( &pegasus_driver );
15625 +       usb_deregister(&pegasus_driver);
15626  }
15627  
15628 -module_init( pegasus_init );
15629 -module_exit( pegasus_exit );
15630 +module_init(pegasus_init);
15631 +module_exit(pegasus_exit);
15632 diff -Nur linux-2.4.19.org/drivers/usb/pegasus.h linux-2.4.19/drivers/usb/pegasus.h
15633 --- linux-2.4.19.org/drivers/usb/pegasus.h      Sat Aug  3 02:39:45 2002
15634 +++ linux-2.4.19/drivers/usb/pegasus.h  Thu Oct 31 08:11:23 2002
15635 @@ -2,18 +2,9 @@
15636   * Copyright (c) 1999-2002 Petko Manolov - Petkan (petkan@users.sourceforge.net)
15637   *
15638   * This program is free software; you can redistribute it and/or modify
15639 - * it under the terms of the GNU General Public License as published by
15640 - * the Free Software Foundation; either version 2 of the License, or
15641 - * (at your option) any later version.
15642 + * it under the terms of the GNU General Public License version 2 as published
15643 + * by the Free Software Foundation.
15644   *
15645 - * This program is distributed in the hope that it will be useful,
15646 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
15647 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15648 - * GNU General Public License for more details.
15649 - *
15650 - * You should have received a copy of the GNU General Public License
15651 - * along with this program; if not, write to the Free Software
15652 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15653   */
15654  
15655  
15656 @@ -99,7 +90,7 @@
15657         int                     dev_index;
15658         int                     intr_interval;
15659         struct urb              *ctrl_urb, *rx_urb, *tx_urb, *intr_urb;
15660 -       devrequest              dr;
15661 +       struct usb_ctrlrequest  dr;
15662         wait_queue_head_t       ctrl_wait;
15663         struct semaphore        sem;
15664         unsigned char           rx_buff[PEGASUS_MAX_MTU];
15665 @@ -122,6 +113,7 @@
15666  #define        VENDOR_ABOCOM           0x07b8
15667  #define        VENDOR_ACCTON           0x083a
15668  #define        VENDOR_ADMTEK           0x07a6
15669 +#define        VENDOR_AEILAB           0x3334
15670  #define        VENDOR_ALLIEDTEL        0x07c9
15671  #define        VENDOR_BELKIN           0x050d
15672  #define        VENDOR_BILLIONTON       0x08dd
15673 @@ -177,6 +169,8 @@
15674                 DEFAULT_GPIO_RESET | HAS_HOME_PNA )
15675  PEGASUS_DEV( "ADMtek AN986A USB MAC", VENDOR_ADMTEK, 0x1986,
15676                 DEFAULT_GPIO_RESET | PEGASUS_II )
15677 +PEGASUS_DEV( "AEI USB Fast Ethernet Adapter", VENDOR_AEILAB, 0x1701,
15678 +               DEFAULT_GPIO_RESET | PEGASUS_II )
15679  PEGASUS_DEV( "Allied Telesyn Int. AT-USB100", VENDOR_ALLIEDTEL, 0xb100,
15680                 DEFAULT_GPIO_RESET | PEGASUS_II )
15681  PEGASUS_DEV( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121,
15682 @@ -193,6 +187,8 @@
15683                 DEFAULT_GPIO_RESET | PEGASUS_II )
15684  PEGASUS_DEV( "Corega FEter USB-TX", VENDOR_COREGA, 0x0004,
15685                 DEFAULT_GPIO_RESET )
15686 +PEGASUS_DEV( "Corega FEter", VENDOR_COREGA, 0x000d,
15687 +               DEFAULT_GPIO_RESET | PEGASUS_II )
15688  PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x4001,
15689                 LINKSYS_GPIO_RESET )
15690  PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x4002,
15691 @@ -207,7 +203,7 @@
15692                 DEFAULT_GPIO_RESET | HAS_HOME_PNA )
15693  PEGASUS_DEV( "D-Link DSB-650", VENDOR_DLINK, 0xabc1,
15694                 DEFAULT_GPIO_RESET )
15695 -PEGASUS_DEV( "ELCON EPLC10Mi USB to Powerline Adapter", VENDOR_ELCON, 0x0002,
15696 +PEGASUS_DEV( "GOLDPFEIL USB Adapter", VENDOR_ELCON, 0x0002,
15697                 DEFAULT_GPIO_RESET | PEGASUS_II | HAS_HOME_PNA )
15698  PEGASUS_DEV( "Elsa Micolink USB2Ethernet", VENDOR_ELSA, 0x3000,
15699                 DEFAULT_GPIO_RESET )
15700 @@ -256,6 +252,6 @@
15701  PEGASUS_DEV( "SOHOware NUB110 Ethernet", VENDOR_SOHOWARE, 0x9110,
15702                 DEFAULT_GPIO_RESET | PEGASUS_II )
15703  PEGASUS_DEV( "SpeedStream USB 10/100 Ethernet", VENDOR_SIEMENS, 0x1001,
15704 -               DEFAULT_GPIO_RESET )
15705 +               DEFAULT_GPIO_RESET | PEGASUS_II )
15706  
15707  #endif /* PEGASUS_DEV */
15708 diff -Nur linux-2.4.19.org/drivers/usb/printer.c linux-2.4.19/drivers/usb/printer.c
15709 --- linux-2.4.19.org/drivers/usb/printer.c      Sat Aug  3 02:39:45 2002
15710 +++ linux-2.4.19/drivers/usb/printer.c  Thu Oct 31 08:11:23 2002
15711 @@ -257,7 +257,7 @@
15712   * Get and print printer errors.
15713   */
15714  
15715 -static char *usblp_messages[] = { "ok", "out of paper", "off-line", "on fire" };
15716 +static char *usblp_messages[] = { "ok", "out of paper", "off-line", "unknown error" };
15717  
15718  static int usblp_check_status(struct usblp *usblp, int err)
15719  {
15720 @@ -388,7 +388,8 @@
15721  {
15722         struct usblp *usblp = file->private_data;
15723         int length, err, i;
15724 -       unsigned char status, newChannel;
15725 +       unsigned char lpstatus, newChannel;
15726 +       int status;
15727         int twoints[2];
15728         int retval = 0;
15729  
15730 @@ -539,12 +540,13 @@
15731                 switch (cmd) {
15732  
15733                         case LPGETSTATUS:
15734 -                               if (usblp_read_status(usblp, &status)) {
15735 +                               if (usblp_read_status(usblp, &lpstatus)) {
15736                                         err("usblp%d: failed reading printer status", usblp->minor);
15737                                         retval = -EIO;
15738                                         goto done;
15739                                 }
15740 -                               if (copy_to_user ((unsigned char *)arg, &status, 1))
15741 +                               status = lpstatus;
15742 +                               if (copy_to_user ((int *)arg, &status, sizeof(int)))
15743                                         retval = -EFAULT;
15744                                 break;
15745  
15746 @@ -560,7 +562,8 @@
15747  static ssize_t usblp_write(struct file *file, const char *buffer, size_t count, loff_t *ppos)
15748  {
15749         struct usblp *usblp = file->private_data;
15750 -       int timeout, err = 0, writecount = 0;
15751 +       int timeout, err = 0;
15752 +       size_t writecount = 0;
15753  
15754         while (writecount < count) {
15755  
15756 @@ -616,10 +619,9 @@
15757                                                          (count - writecount) : USBLP_BUF_SIZE;
15758  
15759                 if (copy_from_user(usblp->writeurb.transfer_buffer, buffer + writecount,
15760 -                               usblp->writeurb.transfer_buffer_length))
15761 -               {
15762 +                               usblp->writeurb.transfer_buffer_length)) {
15763                         up(&usblp->sem);
15764 -                       return writecount?writecount:-EFAULT;
15765 +                       return writecount ? writecount : -EFAULT;
15766                 }
15767  
15768                 usblp->writeurb.dev = usblp->dev;
15769 diff -Nur linux-2.4.19.org/drivers/usb/pwc-if.c linux-2.4.19/drivers/usb/pwc-if.c
15770 --- linux-2.4.19.org/drivers/usb/pwc-if.c       Sat Aug  3 02:39:45 2002
15771 +++ linux-2.4.19/drivers/usb/pwc-if.c   Thu Oct 31 08:11:23 2002
15772 @@ -65,7 +65,7 @@
15773  /* Function prototypes and driver templates */
15774  
15775  /* hotplug device table support */
15776 -static __devinitdata struct usb_device_id pwc_device_table [] = {
15777 +static struct usb_device_id pwc_device_table [] = {
15778         { USB_DEVICE(0x0471, 0x0302) }, /* Philips models */
15779         { USB_DEVICE(0x0471, 0x0303) },
15780         { USB_DEVICE(0x0471, 0x0304) },
15781 @@ -179,60 +179,25 @@
15782  /***************************************************************************/
15783  /* Private functions */
15784  
15785 -/* Memory management functions, nicked from cpia.c, which nicked them from
15786 -   bttv.c. So far, I've counted duplication of this code 6 times 
15787 -   (bttv, cpia, ibmcam, ov511, pwc, ieee1394).
15788 - */
15789 -
15790 -/* Given PGD from the address space's page table, return the kernel
15791 - * virtual mapping of the physical memory mapped at ADR.
15792 - */
15793 -static inline unsigned long uvirt_to_kva(pgd_t *pgd, unsigned long adr)
15794 -{
15795 -        unsigned long ret = 0UL;
15796 -       pmd_t *pmd;
15797 -       pte_t *ptep, pte;
15798 -  
15799 -       if (!pgd_none(*pgd)) {
15800 -                pmd = pmd_offset(pgd, adr);
15801 -                if (!pmd_none(*pmd)) {
15802 -                        ptep = pte_offset(pmd, adr);
15803 -                        pte = *ptep;
15804 -                        if(pte_present(pte)) {
15805 -                               ret  = (unsigned long) page_address(pte_page(pte));
15806 -                               ret |= (adr & (PAGE_SIZE - 1));
15807 -                               
15808 -                       }
15809 -                }
15810 -        }
15811 -       return ret;
15812 -}
15813 -
15814 -
15815 -
15816  /* Here we want the physical address of the memory.
15817 - * This is used when initializing the contents of the
15818 - * area and marking the pages as reserved.
15819 + * This is used when initializing the contents of the area.
15820   */
15821  static inline unsigned long kvirt_to_pa(unsigned long adr) 
15822  {
15823 -        unsigned long va, kva, ret;
15824 +        unsigned long kva, ret;
15825  
15826 -        va = VMALLOC_VMADDR(adr);
15827 -        kva = uvirt_to_kva(pgd_offset_k(va), va);
15828 +       kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
15829 +       kva |= adr & (PAGE_SIZE-1); /* restore the offset */
15830         ret = __pa(kva);
15831          return ret;
15832  }
15833  
15834 -static void * rvmalloc(signed long size)
15835 +static void * rvmalloc(unsigned long size)
15836  {
15837         void * mem;
15838 -       unsigned long adr, page;
15839 +       unsigned long adr;
15840  
15841 -        /* Round it off to PAGE_SIZE */
15842 -        size += (PAGE_SIZE - 1);
15843 -        size &= ~(PAGE_SIZE - 1);      
15844 -        
15845 +       size=PAGE_ALIGN(size);
15846          mem=vmalloc_32(size);
15847         if (mem) 
15848         {
15849 @@ -240,8 +205,7 @@
15850                 adr=(unsigned long) mem;
15851                 while (size > 0) 
15852                  {
15853 -                       page = kvirt_to_pa(adr);
15854 -                       mem_map_reserve(virt_to_page(__va(page)));
15855 +                       mem_map_reserve(vmalloc_to_page((void *)adr));
15856                         adr+=PAGE_SIZE;
15857                         size-=PAGE_SIZE;
15858                 }
15859 @@ -249,20 +213,16 @@
15860         return mem;
15861  }
15862  
15863 -static void rvfree(void * mem, signed long size)
15864 +static void rvfree(void * mem, unsigned long size)
15865  {
15866 -        unsigned long adr, page;
15867 -        
15868 -        /* Round it off to PAGE_SIZE */
15869 -        size += (PAGE_SIZE - 1);
15870 -        size &= ~(PAGE_SIZE - 1);      
15871 +        unsigned long adr;
15872 +
15873         if (mem) 
15874         {
15875                 adr=(unsigned long) mem;
15876 -               while (size > 0) 
15877 +               while ((long) size > 0) 
15878                  {
15879 -                       page = kvirt_to_pa(adr);
15880 -                       mem_map_unreserve(virt_to_page(__va(page)));
15881 +                       mem_map_unreserve(vmalloc_to_page((void *)adr));
15882                         adr+=PAGE_SIZE;
15883                         size-=PAGE_SIZE;
15884                 }
15885 diff -Nur linux-2.4.19.org/drivers/usb/rtl8150.c linux-2.4.19/drivers/usb/rtl8150.c
15886 --- linux-2.4.19.org/drivers/usb/rtl8150.c      Sat Aug  3 02:39:45 2002
15887 +++ linux-2.4.19/drivers/usb/rtl8150.c  Thu Oct 31 08:11:23 2002
15888 @@ -1,11 +1,9 @@
15889  /*
15890 - * Copyright (c) 2002 Petko Manolov (petkan@users.sourceforge.net)
15891 - *
15892 - *     This program is free software; you can redistribute it and/or
15893 - *     modify it under the terms of the GNU General Public License as
15894 - *     published by the Free Software Foundation; either version 2 of
15895 - *     the License, or (at your option) any later version.
15896 + *  Copyright (c) 2002 Petko Manolov (petkan@users.sourceforge.net)
15897   *
15898 + * This program is free software; you can redistribute it and/or
15899 + * modify it under the terms of the GNU General Public License 
15900 + * version 2 as published by the Free Software Foundation.
15901   */
15902  
15903  #include <linux/config.h>
15904 @@ -22,14 +20,11 @@
15905  #include <linux/init.h>
15906  #include <asm/uaccess.h>
15907  
15908 -
15909 -
15910  /* Version Information */
15911 -#define DRIVER_VERSION "v0.4.0 (2002/03/28)"
15912 +#define DRIVER_VERSION "v0.4.1 (2002/07/22)"
15913  #define DRIVER_AUTHOR "Petko Manolov <petkan@users.sourceforge.net>"
15914  #define DRIVER_DESC "rtl8150 based usb-ethernet driver"
15915  
15916 -
15917  #define        IRD                     0x0120
15918  #define        MAR                     0x0126
15919  #define        CR                      0x012e
15920 @@ -69,49 +64,48 @@
15921  #define        RX_REG_SET              1
15922  #define        RTL8150_UNPLUG          2
15923  
15924 -
15925  /* Define these values to match your device */
15926  #define VENDOR_ID_REALTEK              0x0bda
15927 +#define        VENDOR_ID_MELCO                 0x0411
15928 +
15929  #define PRODUCT_ID_RTL8150             0x8150
15930 +#define        PRODUCT_ID_LUAKTX               0x0012
15931  
15932  /* table of devices that work with this driver */
15933 -static struct usb_device_id rtl8150_table [] = {
15934 -       { USB_DEVICE(VENDOR_ID_REALTEK, PRODUCT_ID_RTL8150) },
15935 -       { }                             
15936 +static struct usb_device_id rtl8150_table[] = {
15937 +       {USB_DEVICE(VENDOR_ID_REALTEK, PRODUCT_ID_RTL8150)},
15938 +       {USB_DEVICE(VENDOR_ID_MELCO, PRODUCT_ID_LUAKTX)},
15939 +       {}
15940  };
15941  
15942 -MODULE_DEVICE_TABLE (usb, rtl8150_table);
15943 -
15944 +MODULE_DEVICE_TABLE(usb, rtl8150_table);
15945  
15946  struct rtl8150 {
15947 -       unsigned long           flags;
15948 -       struct usb_device       *udev;
15949 -       struct usb_interface    *interface;
15950 -       struct semaphore        sem;
15951 -       struct net_device_stats stats;
15952 -       struct net_device       *netdev;
15953 -       struct urb              *rx_urb, *tx_urb, *intr_urb, *ctrl_urb;
15954 -       devrequest              dr;
15955 -       int                     intr_interval;
15956 -       u16                     rx_creg;
15957 -       u8                      rx_buff[RTL8150_MAX_MTU];
15958 -       u8                      tx_buff[RTL8150_MAX_MTU];
15959 -       u8                      intr_buff[8];
15960 -       u8                      phy;
15961 +       unsigned int flags;
15962 +       struct usb_device *udev;
15963 +       struct usb_interface *interface;
15964 +       struct semaphore sem;
15965 +       struct net_device_stats stats;
15966 +       struct net_device *netdev;
15967 +       struct urb *rx_urb, *tx_urb, *intr_urb, *ctrl_urb;
15968 +       struct usb_ctrlrequest dr;
15969 +       int intr_interval;
15970 +       u16 rx_creg;
15971 +       u8 rx_buff[RTL8150_MAX_MTU];
15972 +       u8 tx_buff[RTL8150_MAX_MTU];
15973 +       u8 intr_buff[8];
15974 +       u8 phy;
15975  };
15976  
15977 -typedef        struct rtl8150  rtl8150_t;
15978 -
15979 +typedef struct rtl8150 rtl8150_t;
15980  
15981  /* the global usb devfs handle */
15982  extern devfs_handle_t usb_devfs_handle;
15983  unsigned long multicast_filter_limit = 32;
15984  
15985 -
15986  static void rtl8150_disconnect(struct usb_device *dev, void *ptr);
15987 -static void * rtl8150_probe(struct usb_device *dev, unsigned int ifnum,
15988 -                           const struct usb_device_id *id);
15989 -
15990 +static void *rtl8150_probe(struct usb_device *dev, unsigned int ifnum,
15991 +                          const struct usb_device_id *id);
15992  
15993  static struct usb_driver rtl8150_driver = {
15994         name:           "rtl8150",
15995 @@ -120,33 +114,29 @@
15996         id_table:       rtl8150_table,
15997  };
15998  
15999 -
16000 -
16001  /*
16002  **
16003  **     device related part of the code
16004  **
16005  */
16006 -static int get_registers(rtl8150_t *dev, u16 indx, u16 size, void *data)
16007 +static int get_registers(rtl8150_t * dev, u16 indx, u16 size, void *data)
16008  {
16009 -       return usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev,0),
16010 -                               RTL8150_REQ_GET_REGS, RTL8150_REQT_READ,
16011 -                               indx, 0, data, size, HZ/2);
16012 +       return usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0),
16013 +                              RTL8150_REQ_GET_REGS, RTL8150_REQT_READ,
16014 +                              indx, 0, data, size, HZ / 2);
16015  }
16016  
16017 -
16018 -static int set_registers(rtl8150_t *dev, u16 indx, u16 size, void *data)
16019 +static int set_registers(rtl8150_t * dev, u16 indx, u16 size, void *data)
16020  {
16021 -       return usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev,0),
16022 -                               RTL8150_REQ_SET_REGS, RTL8150_REQT_WRITE,
16023 -                               indx, 0, data, size, HZ/2);
16024 +       return usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0),
16025 +                              RTL8150_REQ_SET_REGS, RTL8150_REQT_WRITE,
16026 +                              indx, 0, data, size, HZ / 2);
16027  }
16028  
16029 -
16030  static void ctrl_callback(struct urb *urb)
16031  {
16032 -       rtl8150_t       *dev;
16033 -       
16034 +       rtl8150_t *dev;
16035 +
16036         switch (urb->status) {
16037         case 0:
16038                 break;
16039 @@ -161,22 +151,22 @@
16040         clear_bit(RX_REG_SET, &dev->flags);
16041  }
16042  
16043 -
16044 -static int async_set_registers(rtl8150_t *dev, u16 indx, u16 size, void *data)
16045 +static int async_set_registers(rtl8150_t * dev, u16 indx, u16 size, void *data)
16046  {
16047 -       int     ret;
16048 +       int ret;
16049  
16050         if (test_bit(RX_REG_SET, &dev->flags))
16051                 return -EAGAIN;
16052 -       
16053 -       dev->dr.requesttype = RTL8150_REQT_WRITE;
16054 -       dev->dr.request = RTL8150_REQ_SET_REGS;
16055 -       dev->dr.value = cpu_to_le16(indx);
16056 -       dev->dr.index = 0;
16057 -       dev->dr.length = cpu_to_le16(2);
16058 +
16059 +       dev->dr.bRequestType = RTL8150_REQT_WRITE;
16060 +       dev->dr.bRequest = RTL8150_REQ_SET_REGS;
16061 +       dev->dr.wValue = cpu_to_le16(indx);
16062 +       dev->dr.wIndex = 0;
16063 +       dev->dr.wLength = cpu_to_le16(2);
16064         dev->ctrl_urb->transfer_buffer_length = 2;
16065 -       FILL_CONTROL_URB(dev->ctrl_urb, dev->udev, usb_sndctrlpipe(dev->udev,0),
16066 -                        (char*)&dev->dr, &dev->rx_creg, 2, ctrl_callback, dev);
16067 +       FILL_CONTROL_URB(dev->ctrl_urb, dev->udev,
16068 +                        usb_sndctrlpipe(dev->udev, 0), (char *) &dev->dr,
16069 +                        &dev->rx_creg, 2, ctrl_callback, dev);
16070         if ((ret = usb_submit_urb(dev->ctrl_urb)))
16071                 err("control request submission failed: %d", ret);
16072         else
16073 @@ -185,11 +175,10 @@
16074         return ret;
16075  }
16076  
16077 -
16078 -static int read_mii_word(rtl8150_t *dev, u8 phy, __u8 indx, u16 *reg)
16079 +static int read_mii_word(rtl8150_t * dev, u8 phy, __u8 indx, u16 * reg)
16080  {
16081 -       int     i;
16082 -       u8      data[3], tmp;
16083 +       int i;
16084 +       u8 data[3], tmp;
16085  
16086         data[0] = phy;
16087         data[1] = data[2] = 0;
16088 @@ -204,17 +193,16 @@
16089  
16090         if (i < HZ) {
16091                 get_registers(dev, PHYDAT, 2, data);
16092 -               *reg = le16_to_cpup(data);
16093 +               *reg = le16_to_cpup((u16 *)data);
16094                 return 0;
16095         } else
16096                 return 1;
16097  }
16098  
16099 -
16100 -static int write_mii_word(rtl8150_t *dev, u8 phy, __u8 indx, u16 reg)
16101 +static int write_mii_word(rtl8150_t * dev, u8 phy, __u8 indx, u16 reg)
16102  {
16103 -       int     i;
16104 -       u8      data[3], tmp;
16105 +       int i;
16106 +       u8 data[3], tmp;
16107  
16108         data[0] = phy;
16109         *(data + 1) = cpu_to_le16p(&reg);
16110 @@ -225,7 +213,7 @@
16111         set_registers(dev, PHYCNT, 1, &tmp);
16112         do {
16113                 get_registers(dev, PHYCNT, 1, data);
16114 -       } while((data[0] & PHY_GO) && (i++ < HZ));
16115 +       } while ((data[0] & PHY_GO) && (i++ < HZ));
16116  
16117         if (i < HZ)
16118                 return 0;
16119 @@ -233,31 +221,28 @@
16120                 return 1;
16121  }
16122  
16123 -
16124 -static inline void set_ethernet_addr(rtl8150_t *dev)
16125 +static inline void set_ethernet_addr(rtl8150_t * dev)
16126  {
16127 -       u8      node_id[6];
16128 +       u8 node_id[6];
16129  
16130         get_registers(dev, IRD, sizeof(node_id), node_id);
16131         memcpy(dev->netdev->dev_addr, node_id, sizeof(node_id));
16132  }
16133  
16134 -
16135 -static int rtl8150_reset(rtl8150_t *dev)
16136 +static int rtl8150_reset(rtl8150_t * dev)
16137  {
16138 -       u8      data=0x10;
16139 -       int     i=HZ;
16140 +       u8 data = 0x10;
16141 +       int i = HZ;
16142  
16143         set_registers(dev, CR, 1, &data);
16144         do {
16145                 get_registers(dev, CR, 1, &data);
16146         } while ((data & 0x10) && --i);
16147 -       
16148 +
16149         return (i > 0) ? 0 : -1;
16150  }
16151  
16152 -
16153 -static int alloc_all_urbs(rtl8150_t *dev)
16154 +static int alloc_all_urbs(rtl8150_t * dev)
16155  {
16156         dev->rx_urb = usb_alloc_urb(0);
16157         if (!dev->rx_urb)
16158 @@ -284,8 +269,7 @@
16159         return 1;
16160  }
16161  
16162 -
16163 -static void free_all_urbs(rtl8150_t *dev)
16164 +static void free_all_urbs(rtl8150_t * dev)
16165  {
16166         usb_free_urb(dev->rx_urb);
16167         usb_free_urb(dev->tx_urb);
16168 @@ -293,8 +277,7 @@
16169         usb_free_urb(dev->ctrl_urb);
16170  }
16171  
16172 -
16173 -static void unlink_all_urbs(rtl8150_t *dev)
16174 +static void unlink_all_urbs(rtl8150_t * dev)
16175  {
16176         usb_unlink_urb(dev->rx_urb);
16177         usb_unlink_urb(dev->tx_urb);
16178 @@ -302,14 +285,13 @@
16179         usb_unlink_urb(dev->ctrl_urb);
16180  }
16181  
16182 -
16183  static void read_bulk_callback(struct urb *urb)
16184  {
16185 -       rtl8150_t       *dev;
16186 -       int             pkt_len, res;
16187 -       struct sk_buff  *skb;
16188 +       rtl8150_t *dev;
16189 +       int pkt_len, res;
16190 +       struct sk_buff *skb;
16191         struct net_device *netdev;
16192 -       u16             rx_stat;
16193 +       u16 rx_stat;
16194  
16195         dev = urb->context;
16196         if (!dev) {
16197 @@ -333,11 +315,11 @@
16198                 warn("Rx status %d", urb->status);
16199                 goto goon;
16200         }
16201 -       
16202 +
16203         pkt_len = urb->actual_length - 4;
16204 -       rx_stat = le16_to_cpu(*(u16 *)(dev->rx_buff + pkt_len));
16205 +       rx_stat = le16_to_cpu(*(u16 *) (dev->rx_buff + pkt_len));
16206  
16207 -       if (!(skb = dev_alloc_skb(pkt_len + 2))) 
16208 +       if (!(skb = dev_alloc_skb(pkt_len + 2)))
16209                 goto goon;
16210         skb->dev = netdev;
16211         skb_reserve(skb, 2);
16212 @@ -348,16 +330,15 @@
16213         dev->stats.rx_packets++;
16214         dev->stats.rx_bytes += pkt_len;
16215  goon:
16216 -       FILL_BULK_URB(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev,1),
16217 -                     dev->rx_buff, RTL8150_MAX_MTU, read_bulk_callback, dev);
16218 -       if ((res=usb_submit_urb(dev->rx_urb)))
16219 +       FILL_BULK_URB(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1),
16220 +                     dev->rx_buff, RTL8150_MAX_MTU, read_bulk_callback, dev);
16221 +       if ((res = usb_submit_urb(dev->rx_urb)))
16222                 warn("%s: Rx urb submission failed %d", netdev->name, res);
16223  }
16224  
16225 -
16226  static void write_bulk_callback(struct urb *urb)
16227  {
16228 -       rtl8150_t       *dev;
16229 +       rtl8150_t *dev;
16230  
16231         dev = urb->context;
16232         if (!dev)
16233 @@ -370,36 +351,32 @@
16234         netif_wake_queue(dev->netdev);
16235  }
16236  
16237 -
16238  void intr_callback(struct urb *urb)
16239  {
16240 -       rtl8150_t       *dev;
16241 +       rtl8150_t *dev;
16242  
16243         dev = urb->context;
16244         if (!dev)
16245                 return;
16246         switch (urb->status) {
16247 -               case 0:
16248 -                       break;
16249 -               case -ENOENT:
16250 -                       return;
16251 -               default:
16252 -                       info("%s: intr status %d", dev->netdev->name,
16253 -                            urb->status);
16254 +       case 0:
16255 +               break;
16256 +       case -ENOENT:
16257 +               return;
16258 +       default:
16259 +               info("%s: intr status %d", dev->netdev->name, urb->status);
16260         }
16261  }
16262  
16263 -
16264  /*
16265  **
16266  **     network related part of the code
16267  **
16268  */
16269  
16270 -
16271 -static int enable_net_traffic(rtl8150_t *dev)
16272 +static int enable_net_traffic(rtl8150_t * dev)
16273  {
16274 -       u8      cr, tcr, rcr, msr;
16275 +       u8 cr, tcr, rcr, msr;
16276  
16277         if (rtl8150_reset(dev)) {
16278                 warn("%s - device reset failed", __FUNCTION__);
16279 @@ -415,26 +392,23 @@
16280         return 0;
16281  }
16282  
16283 -
16284 -static void disable_net_traffic(rtl8150_t *dev)
16285 +static void disable_net_traffic(rtl8150_t * dev)
16286  {
16287 -       u8      cr;
16288 +       u8 cr;
16289  
16290         get_registers(dev, CR, 1, &cr);
16291         cr &= 0xf3;
16292         set_registers(dev, CR, 1, &cr);
16293  }
16294  
16295 -
16296  static struct net_device_stats *rtl8150_netdev_stats(struct net_device *dev)
16297  {
16298 -       return &((rtl8150_t *)dev->priv)->stats;
16299 +       return &((rtl8150_t *) dev->priv)->stats;
16300  }
16301  
16302 -
16303  static void rtl8150_tx_timeout(struct net_device *netdev)
16304  {
16305 -       rtl8150_t       *dev;
16306 +       rtl8150_t *dev;
16307  
16308         dev = netdev->priv;
16309         if (!dev)
16310 @@ -445,10 +419,9 @@
16311         dev->stats.tx_errors++;
16312  }
16313  
16314 -
16315  static void rtl8150_set_multicast(struct net_device *netdev)
16316  {
16317 -       rtl8150_t       *dev;
16318 +       rtl8150_t *dev;
16319  
16320         dev = netdev->priv;
16321         netif_stop_queue(netdev);
16322 @@ -456,7 +429,7 @@
16323                 dev->rx_creg |= 0x0001;
16324                 info("%s: promiscuous mode", netdev->name);
16325         } else if ((netdev->mc_count > multicast_filter_limit) ||
16326 -                  (netdev->flags & IFF_ALLMULTI)) {
16327 +                  (netdev->flags & IFF_ALLMULTI)) {
16328                 dev->rx_creg &= 0xfffe;
16329                 dev->rx_creg |= 0x0002;
16330                 info("%s: allmulti set", netdev->name);
16331 @@ -468,18 +441,17 @@
16332         netif_wake_queue(netdev);
16333  }
16334  
16335 -
16336  static int rtl8150_start_xmit(struct sk_buff *skb, struct net_device *netdev)
16337  {
16338 -       rtl8150_t       *dev;
16339 -       int             count, res;
16340 +       rtl8150_t *dev;
16341 +       int count, res;
16342  
16343         netif_stop_queue(netdev);
16344         dev = netdev->priv;
16345         count = (skb->len < 60) ? 60 : skb->len;
16346         count = (count & 0x3f) ? count : count + 1;
16347         memcpy(dev->tx_buff, skb->data, skb->len);
16348 -       FILL_BULK_URB(dev->tx_urb, dev->udev, usb_sndbulkpipe(dev->udev,2),
16349 +       FILL_BULK_URB(dev->tx_urb, dev->udev, usb_sndbulkpipe(dev->udev, 2),
16350                       dev->tx_buff, RTL8150_MAX_MTU, write_bulk_callback, dev);
16351         dev->tx_urb->transfer_buffer_length = count;
16352  
16353 @@ -497,26 +469,25 @@
16354         return 0;
16355  }
16356  
16357 -
16358  static int rtl8150_open(struct net_device *netdev)
16359  {
16360 -       rtl8150_t       *dev;
16361 -       int             res;
16362 -       
16363 +       rtl8150_t *dev;
16364 +       int res;
16365 +
16366         dev = netdev->priv;
16367         if (dev == NULL) {
16368                 return -ENODEV;
16369         }
16370  
16371         down(&dev->sem);
16372 -       FILL_BULK_URB(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev,1),
16373 -                       dev->rx_buff, RTL8150_MAX_MTU, read_bulk_callback, dev);
16374 -       if ((res=usb_submit_urb(dev->rx_urb)))
16375 +       FILL_BULK_URB(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1),
16376 +                     dev->rx_buff, RTL8150_MAX_MTU, read_bulk_callback, dev);
16377 +       if ((res = usb_submit_urb(dev->rx_urb)))
16378                 warn("%s: rx_urb submit failed: %d", __FUNCTION__, res);
16379 -       FILL_INT_URB(dev->intr_urb, dev->udev, usb_rcvintpipe(dev->udev,3),
16380 -                       dev->intr_buff, sizeof(dev->intr_buff), intr_callback,
16381 -                       dev, dev->intr_interval);
16382 -       if ((res=usb_submit_urb(dev->intr_urb)))
16383 +       FILL_INT_URB(dev->intr_urb, dev->udev, usb_rcvintpipe(dev->udev, 3),
16384 +                    dev->intr_buff, sizeof(dev->intr_buff), intr_callback,
16385 +                    dev, dev->intr_interval);
16386 +       if ((res = usb_submit_urb(dev->intr_urb)))
16387                 warn("%s: intr_urb submit failed: %d", __FUNCTION__, res);
16388         netif_start_queue(netdev);
16389         enable_net_traffic(dev);
16390 @@ -525,7 +496,6 @@
16391         return res;
16392  }
16393  
16394 -
16395  static int rtl8150_close(struct net_device *netdev)
16396  {
16397         rtl8150_t *dev;
16398 @@ -545,93 +515,92 @@
16399         return res;
16400  }
16401  
16402 -
16403  static int rtl8150_ethtool_ioctl(struct net_device *netdev, void *uaddr)
16404  {
16405 -       rtl8150_t       *dev;
16406 -       int             cmd;
16407 -       char            tmp[128];
16408 +       rtl8150_t *dev;
16409 +       int cmd;
16410 +       char tmp[128];
16411  
16412         dev = netdev->priv;
16413 -       if (get_user(cmd, (int *)uaddr))
16414 +       if (get_user(cmd, (int *) uaddr))
16415                 return -EFAULT;
16416  
16417         switch (cmd) {
16418 -       case ETHTOOL_GDRVINFO: {
16419 -               struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
16420 -               
16421 -               strncpy(info.driver, DRIVER_DESC, ETHTOOL_BUSINFO_LEN);
16422 -               strncpy(info.version, DRIVER_VERSION, ETHTOOL_BUSINFO_LEN);
16423 -               sprintf(tmp, "usb%d:%d", dev->udev->bus->busnum,
16424 -                       dev->udev->devnum);
16425 -               strncpy(info.bus_info, tmp, ETHTOOL_BUSINFO_LEN);
16426 -               if (copy_to_user(uaddr, &info, sizeof(info)))
16427 -                       return -EFAULT;
16428 -               return 0;
16429 -       }
16430 -       case ETHTOOL_GSET: {
16431 -               struct ethtool_cmd ecmd;
16432 -               short   lpa, bmcr;
16433 -
16434 -               if (copy_from_user(&ecmd, uaddr, sizeof(ecmd)))
16435 -                       return -EFAULT;
16436 -               ecmd.supported = (SUPPORTED_10baseT_Half |
16437 -                                 SUPPORTED_10baseT_Full |
16438 -                                 SUPPORTED_100baseT_Half |
16439 -                                 SUPPORTED_100baseT_Full |
16440 -                                 SUPPORTED_Autoneg |
16441 -                                 SUPPORTED_TP |
16442 -                                 SUPPORTED_MII);
16443 -               ecmd.port = PORT_TP;
16444 -               ecmd.transceiver = XCVR_INTERNAL;
16445 -               ecmd.phy_address = dev->phy;
16446 -               get_registers(dev, BMCR, 2, &bmcr);
16447 -               get_registers(dev, ANLP, 2, &lpa);
16448 -               if (bmcr & BMCR_ANENABLE) {
16449 -                       ecmd.autoneg = AUTONEG_ENABLE;
16450 -                       ecmd.speed = (lpa & (LPA_100HALF | LPA_100FULL)) ?
16451 -                                    SPEED_100 : SPEED_10;
16452 -                       if (ecmd.speed == SPEED_100)
16453 -                               ecmd.duplex = (lpa & LPA_100FULL) ?
16454 -                                             DUPLEX_FULL : DUPLEX_HALF;
16455 -                       else
16456 -                               ecmd.duplex = (lpa & LPA_10FULL) ?
16457 -                                             DUPLEX_FULL : DUPLEX_HALF;
16458 -               } else {
16459 -                       ecmd.autoneg = AUTONEG_DISABLE;
16460 -                       ecmd.speed = (bmcr & BMCR_SPEED100) ?
16461 -                                    SPEED_100 : SPEED_10;
16462 -                       ecmd.duplex = (bmcr & BMCR_FULLDPLX) ?
16463 -                                     DUPLEX_FULL : DUPLEX_HALF;
16464 +       case ETHTOOL_GDRVINFO:{
16465 +                       struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
16466 +
16467 +                       strncpy(info.driver, DRIVER_DESC, ETHTOOL_BUSINFO_LEN);
16468 +                       strncpy(info.version, DRIVER_VERSION,
16469 +                               ETHTOOL_BUSINFO_LEN);
16470 +                       sprintf(tmp, "usb%d:%d", dev->udev->bus->busnum,
16471 +                               dev->udev->devnum);
16472 +                       strncpy(info.bus_info, tmp, ETHTOOL_BUSINFO_LEN);
16473 +                       if (copy_to_user(uaddr, &info, sizeof(info)))
16474 +                               return -EFAULT;
16475 +                       return 0;
16476 +               }
16477 +       case ETHTOOL_GSET:{
16478 +                       struct ethtool_cmd ecmd;
16479 +                       short lpa, bmcr;
16480 +
16481 +                       if (copy_from_user(&ecmd, uaddr, sizeof(ecmd)))
16482 +                               return -EFAULT;
16483 +                       ecmd.supported = (SUPPORTED_10baseT_Half |
16484 +                                         SUPPORTED_10baseT_Full |
16485 +                                         SUPPORTED_100baseT_Half |
16486 +                                         SUPPORTED_100baseT_Full |
16487 +                                         SUPPORTED_Autoneg |
16488 +                                         SUPPORTED_TP | SUPPORTED_MII);
16489 +                       ecmd.port = PORT_TP;
16490 +                       ecmd.transceiver = XCVR_INTERNAL;
16491 +                       ecmd.phy_address = dev->phy;
16492 +                       get_registers(dev, BMCR, 2, &bmcr);
16493 +                       get_registers(dev, ANLP, 2, &lpa);
16494 +                       if (bmcr & BMCR_ANENABLE) {
16495 +                               ecmd.autoneg = AUTONEG_ENABLE;
16496 +                               ecmd.speed =
16497 +                                   (lpa & (LPA_100HALF | LPA_100FULL)) ?
16498 +                                   SPEED_100 : SPEED_10;
16499 +                               if (ecmd.speed == SPEED_100)
16500 +                                       ecmd.duplex = (lpa & LPA_100FULL) ?
16501 +                                           DUPLEX_FULL : DUPLEX_HALF;
16502 +                               else
16503 +                                       ecmd.duplex = (lpa & LPA_10FULL) ?
16504 +                                           DUPLEX_FULL : DUPLEX_HALF;
16505 +                       } else {
16506 +                               ecmd.autoneg = AUTONEG_DISABLE;
16507 +                               ecmd.speed = (bmcr & BMCR_SPEED100) ?
16508 +                                   SPEED_100 : SPEED_10;
16509 +                               ecmd.duplex = (bmcr & BMCR_FULLDPLX) ?
16510 +                                   DUPLEX_FULL : DUPLEX_HALF;
16511 +                       }
16512 +                       if (copy_to_user(uaddr, &ecmd, sizeof(ecmd)))
16513 +                               return -EFAULT;
16514 +                       return 0;
16515                 }
16516 -               if (copy_to_user(uaddr, &ecmd, sizeof(ecmd)))
16517 -                       return -EFAULT;
16518 -               return 0;
16519 -       }
16520         case ETHTOOL_SSET:
16521                 return -ENOTSUPP;
16522 -       case ETHTOOL_GLINK: {
16523 -               struct ethtool_value edata = {ETHTOOL_GLINK};
16524 +       case ETHTOOL_GLINK:{
16525 +                       struct ethtool_value edata = { ETHTOOL_GLINK };
16526  
16527 -               edata.data = netif_carrier_ok(netdev);
16528 -               if (copy_to_user(uaddr, &edata, sizeof(edata)))
16529 -                       return -EFAULT;
16530 -               return 0;
16531 -       }
16532 +                       edata.data = netif_carrier_ok(netdev);
16533 +                       if (copy_to_user(uaddr, &edata, sizeof(edata)))
16534 +                               return -EFAULT;
16535 +                       return 0;
16536 +               }
16537         default:
16538                 return -EOPNOTSUPP;
16539         }
16540  }
16541  
16542 -
16543 -static int rtl8150_ioctl (struct net_device *netdev, struct ifreq *rq, int cmd)
16544 +static int rtl8150_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
16545  {
16546         rtl8150_t *dev;
16547 -       u16     *data;
16548 -       int     res;
16549 +       u16 *data;
16550 +       int res;
16551  
16552         dev = netdev->priv;
16553 -       data = (u16 *)&rq->ifr_data;
16554 +       data = (u16 *) & rq->ifr_data;
16555         res = 0;
16556  
16557         down(&dev->sem);
16558 @@ -641,10 +610,10 @@
16559                 break;
16560         case SIOCDEVPRIVATE:
16561                 data[0] = dev->phy;
16562 -       case SIOCDEVPRIVATE+1:
16563 +       case SIOCDEVPRIVATE + 1:
16564                 read_mii_word(dev, dev->phy, (data[1] & 0x1f), &data[3]);
16565                 break;
16566 -       case SIOCDEVPRIVATE+2:
16567 +       case SIOCDEVPRIVATE + 2:
16568                 if (!capable(CAP_NET_ADMIN)) {
16569                         up(&dev->sem);
16570                         return -EPERM;
16571 @@ -659,9 +628,8 @@
16572         return res;
16573  }
16574  
16575 -
16576 -static void * rtl8150_probe(struct usb_device *udev, unsigned int ifnum,
16577 -                           const struct usb_device_id *id)
16578 +static void *rtl8150_probe(struct usb_device *udev, unsigned int ifnum,
16579 +                          const struct usb_device_id *id)
16580  {
16581         rtl8150_t *dev;
16582         struct net_device *netdev;
16583 @@ -671,14 +639,9 @@
16584                 err("usb_set_configuration() failed");
16585                 return NULL;
16586         }
16587 -       if ((udev->descriptor.idVendor != VENDOR_ID_REALTEK) ||
16588 -           (udev->descriptor.idProduct != PRODUCT_ID_RTL8150)) {
16589 -               err("Not the one we are interested about");
16590 -               return NULL;
16591 -       }
16592         dev = kmalloc(sizeof(rtl8150_t), GFP_KERNEL);
16593         if (!dev) {
16594 -               err ("Out of memory");
16595 +               err("Out of memory");
16596                 goto exit;
16597         } else
16598                 memset(dev, 0, sizeof(rtl8150_t));
16599 @@ -690,7 +653,7 @@
16600                 dev = NULL;
16601                 goto exit;
16602         }
16603 -               
16604 +
16605         init_MUTEX(&dev->sem);
16606         dev->udev = udev;
16607         dev->netdev = netdev;
16608 @@ -724,7 +687,6 @@
16609         return dev;
16610  }
16611  
16612 -
16613  static void rtl8150_disconnect(struct usb_device *udev, void *ptr)
16614  {
16615         rtl8150_t *dev;
16616 @@ -740,21 +702,17 @@
16617         dev = NULL;
16618  }
16619  
16620 -
16621 -
16622  static int __init usb_rtl8150_init(void)
16623  {
16624         info(DRIVER_DESC " " DRIVER_VERSION);
16625         return usb_register(&rtl8150_driver);
16626  }
16627  
16628 -
16629  static void __exit usb_rtl8150_exit(void)
16630  {
16631         usb_deregister(&rtl8150_driver);
16632  }
16633  
16634 -
16635  module_init(usb_rtl8150_init);
16636  module_exit(usb_rtl8150_exit);
16637  
16638 diff -Nur linux-2.4.19.org/drivers/usb/scanner.c linux-2.4.19/drivers/usb/scanner.c
16639 --- linux-2.4.19.org/drivers/usb/scanner.c      Fri Dec 21 18:41:55 2001
16640 +++ linux-2.4.19/drivers/usb/scanner.c  Thu Oct 31 08:11:23 2002
16641 @@ -1,13 +1,13 @@
16642  /* -*- linux-c -*- */
16643  
16644  /* 
16645 - * Driver for USB Scanners (linux-2.4.12)
16646 + * Driver for USB Scanners (linux-2.4.18)
16647   *
16648 - * Copyright (C) 1999, 2000, 2001 David E. Nelson
16649 + * Copyright (C) 1999, 2000, 2001, 2002 David E. Nelson
16650   *
16651   * Portions may be copyright Brad Keryan and Michael Gee.
16652   *
16653 - * David E. Nelson (dnelson@jump.net)
16654 + * Brian Beattie <beattie@beattie-home.net>
16655   * 
16656   * This program is free software; you can redistribute it and/or
16657   * modify it under the terms of the GNU General Public License as
16658 @@ -300,11 +300,24 @@
16659   *      Frank Zago <fzago@greshamstorage.com> and
16660   *      Oliver Neukum <520047054719-0001@t-online.de> for reviewing/testing.
16661   *
16662 + * 0.4.8  5/30/2002
16663 + *    - Added Mustek BearPaw 2400 TA.  Thanks to Sergey
16664 + *      Vlasov <vsu@mivlgu.murom.ru>.
16665 + *    - Added Mustek 1200UB Plus and Mustek BearPaw 1200 CU ID's.  These use
16666 + *      the Grandtech GT-6801 chip. Thanks to Henning
16667 + *      Meier-Geinitz <henning@meier-geinitz.de>.
16668 + *    - Increased Epson timeout to 60 secs as requested from 
16669 + *      Karl Heinz Kremer <khk@khk.net>.
16670 + *    - Changed maintainership from David E. Nelson to Brian
16671 + *      Beattie <beattie@beattie-home.net>.
16672 + *
16673   * TODO
16674 + *    - Remove the 2/3 endpoint limitation
16675   *    - Performance
16676   *    - Select/poll methods
16677   *    - More testing
16678   *    - Proper registry/assignment for LM9830 ioctl's
16679 + *    - More general usage ioctl's
16680   *
16681   *
16682   *  Thanks to:
16683 @@ -320,6 +333,8 @@
16684   *    - All the folks who chimed in with reports and suggestions.
16685   *    - All the developers that are working on USB SANE backends or other
16686   *      applications to use USB scanners.
16687 + *    - Thanks to Greg KH <greg@kroah.com> for setting up Brian Beattie
16688 + *      to be the new USB Scanner maintainer.
16689   *
16690   *  Performance:
16691   *
16692 @@ -747,7 +762,7 @@
16693         case SCANNER_IOCTL_CTRLMSG:
16694         {
16695                 struct ctrlmsg_ioctl {
16696 -                       devrequest      req;
16697 +                       struct usb_ctrlrequest  req;
16698                         void            *data;
16699                 } cmsg;
16700                 int pipe, nb, ret;
16701 @@ -756,12 +771,12 @@
16702                 if (copy_from_user(&cmsg, (void *)arg, sizeof(cmsg)))
16703                         return -EFAULT;
16704  
16705 -               nb = le16_to_cpup(&cmsg.req.length);
16706 +               nb = cmsg.req.wLength;
16707  
16708                 if (nb > sizeof(buf))
16709                         return -EINVAL;
16710  
16711 -               if ((cmsg.req.requesttype & 0x80) == 0) {
16712 +               if ((cmsg.req.bRequestType & 0x80) == 0) {
16713                         pipe = usb_sndctrlpipe(dev, 0);
16714                         if (nb > 0 && copy_from_user(buf, cmsg.data, nb))
16715                                 return -EFAULT;
16716 @@ -769,10 +784,10 @@
16717                         pipe = usb_rcvctrlpipe(dev, 0);
16718                 }
16719  
16720 -               ret = usb_control_msg(dev, pipe, cmsg.req.request,
16721 -                                     cmsg.req.requesttype,
16722 -                                     le16_to_cpup(&cmsg.req.value),
16723 -                                     le16_to_cpup(&cmsg.req.index),
16724 +               ret = usb_control_msg(dev, pipe, cmsg.req.bRequest,
16725 +                                     cmsg.req.bRequestType,
16726 +                                     cmsg.req.wValue,
16727 +                                     cmsg.req.wIndex,
16728                                       buf, nb, HZ);
16729  
16730                 if (ret < 0) {
16731 @@ -780,7 +795,7 @@
16732                         return -EIO;
16733                 }
16734  
16735 -               if (nb > 0 && (cmsg.req.requesttype & 0x80) && copy_to_user(cmsg.data, buf, nb))
16736 +               if (nb > 0 && (cmsg.req.bRequestType & 0x80) && copy_to_user(cmsg.data, buf, nb))
16737                         return -EFAULT;
16738  
16739                 return 0;
16740 @@ -1017,7 +1032,7 @@
16741  
16742         switch (dev->descriptor.idVendor) { /* Scanner specific read timeout parameters */
16743         case 0x04b8:            /* Seiko/Epson */
16744 -               scn->rd_nak_timeout = HZ * 40;
16745 +               scn->rd_nak_timeout = HZ * 60;
16746                 break;
16747         case 0x055f:            /* Mustek */
16748         case 0x0400:            /* Another Mustek */
16749 diff -Nur linux-2.4.19.org/drivers/usb/scanner.h linux-2.4.19/drivers/usb/scanner.h
16750 --- linux-2.4.19.org/drivers/usb/scanner.h      Fri Dec 21 18:41:55 2001
16751 +++ linux-2.4.19/drivers/usb/scanner.h  Thu Oct 31 08:11:23 2002
16752 @@ -1,9 +1,9 @@
16753  /*
16754 - * Driver for USB Scanners (linux-2.4.12)
16755 + * Driver for USB Scanners (linux-2.4.18)
16756   *
16757 - * Copyright (C) 1999, 2000, 2001 David E. Nelson
16758 + * Copyright (C) 1999, 2000, 2001, 2002 David E. Nelson
16759   *
16760 - * David E. Nelson (dnelson@jump.net)
16761 + * Brian Beattie <beattie@beattie-home.net>
16762   *
16763   * This program is free software; you can redistribute it and/or
16764   * modify it under the terms of the GNU General Public License as
16765 @@ -48,7 +48,7 @@
16766  
16767  static __s32 vendor=-1, product=-1, read_timeout=0;
16768  
16769 -MODULE_AUTHOR("David E. Nelson, dnelson@jump.net, http://www.jump.net/~dnelson");
16770 +MODULE_AUTHOR("Brian Beattie, beattie@beattie-home.net");
16771  MODULE_DESCRIPTION(DRIVER_DESC" "DRIVER_VERSION);
16772  MODULE_LICENSE("GPL");
16773  
16774 @@ -90,9 +90,12 @@
16775         { USB_DEVICE(0x06bd, 0x2097) }, /* SnapScan e26 */
16776         { USB_DEVICE(0x06bd, 0x208d) }, /* Snapscan e40 */
16777         /* Canon */
16778 -       { USB_DEVICE(0x04a9, 0x2202) }, /* FB620U */
16779 +       { USB_DEVICE(0x04a9, 0x2202) }, /* CanoScan FB620U */
16780 +       { USB_DEVICE(0x04a9, 0x2204) }, /* CanoScan FB630U/FB636U */
16781 +       { USB_DEVICE(0x04a9, 0x2206) }, /* CanoScan N650U/N656U */
16782 +       { USB_DEVICE(0x04a9, 0x2207) }, /* CanoScan N1220U */
16783 +       { USB_DEVICE(0x04a9, 0x2208) }, /* CanoScan D660U */ 
16784         { USB_DEVICE(0x04a9, 0x220b) }, /* D646U */
16785 -       { USB_DEVICE(0x04a9, 0x2207) }, /* 1220U */
16786         /* Colorado -- See Primax/Colorado below */
16787         /* Epson -- See Seiko/Epson below */
16788         /* Genius */
16789 @@ -110,6 +113,7 @@
16790         { USB_DEVICE(0x03f0, 0x0105) }, /* 4200C */
16791         { USB_DEVICE(0x03f0, 0x0305) }, /* 4300C */
16792         { USB_DEVICE(0x03f0, 0x0102) }, /* PhotoSmart S20 */
16793 +       { USB_DEVICE(0x03f0, 0x0705) }, /* 4400C */
16794         { USB_DEVICE(0x03f0, 0x0401) }, /* 5200C */
16795         //      { USB_DEVICE(0x03f0, 0x0701) }, /* 5300C - NOT SUPPORTED - see http://www.neatech.nl/oss/HP5300C/ */
16796         { USB_DEVICE(0x03f0, 0x0201) }, /* 6200C */
16797 @@ -141,6 +145,8 @@
16798         { USB_DEVICE(0x0400, 0x1001) }, /* BearPaw 2400 */
16799         { USB_DEVICE(0x055f, 0x0008) }, /* 1200 CU Plus */
16800         { USB_DEVICE(0x0ff5, 0x0010) }, /* BearPaw 1200F */
16801 +       { USB_DEVICE(0x055f, 0x0218) }, /* BearPaw 2400 TA */
16802 +       { USB_DEVICE(0x05d8, 0x4002) }, /* 1200 CU and 1200 UB Plus */
16803         /* Plustek */
16804         { USB_DEVICE(0x07b3, 0x0017) }, /* OpticPro UT12 */
16805         { USB_DEVICE(0x07b3, 0x0011) }, /* OpticPro UT24 */
16806 @@ -179,8 +185,12 @@
16807         { USB_DEVICE(0x04b8, 0x010b) }, /* Perfection 1240U */
16808         { USB_DEVICE(0x04b8, 0x010c) }, /* Perfection 640U */
16809         { USB_DEVICE(0x04b8, 0x010e) }, /* Expression 1680 */
16810 +       { USB_DEVICE(0x04b8, 0x010f) }, /* Perfection 1250U */
16811         { USB_DEVICE(0x04b8, 0x0110) }, /* Perfection 1650 */
16812         { USB_DEVICE(0x04b8, 0x0112) }, /* Perfection 2450 - GT-9700 for the Japanese mkt */
16813 +       { USB_DEVICE(0x04b8, 0x0114) }, /* Perfection 660 */
16814 +       { USB_DEVICE(0x04b8, 0x011b) }, /* Perfection 2400 Photo */
16815 +       { USB_DEVICE(0x04b8, 0x011e) }, /* Perfection 1660 Photo */
16816         /* Umax */
16817         { USB_DEVICE(0x1606, 0x0010) }, /* Astra 1220U */
16818         { USB_DEVICE(0x1606, 0x0030) }, /* Astra 2000U */
16819 @@ -230,7 +240,7 @@
16820  #define SCANNER_IOCTL_VENDOR _IOR('U', 0x20, int)
16821  #define SCANNER_IOCTL_PRODUCT _IOR('U', 0x21, int)
16822  /* send/recv a control message to the scanner */
16823 -#define SCANNER_IOCTL_CTRLMSG _IOWR('U', 0x22, devrequest )
16824 +#define SCANNER_IOCTL_CTRLMSG _IOWR('U', 0x22, struct usb_ctrlrequest )
16825  
16826  
16827  #define SCN_MAX_MNR 16         /* We're allocated 16 minors */
16828 diff -Nur linux-2.4.19.org/drivers/usb/se401.c linux-2.4.19/drivers/usb/se401.c
16829 --- linux-2.4.19.org/drivers/usb/se401.c        Sat Aug  3 02:39:45 2002
16830 +++ linux-2.4.19/drivers/usb/se401.c    Thu Oct 31 08:11:23 2002
16831 @@ -41,18 +41,12 @@
16832  #include <asm/semaphore.h>
16833  #include <linux/wrapper.h>
16834  
16835 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0)
16836 -#define virt_to_page(arg)      MAP_NR(arg)
16837 -#define vmalloc_32             vmalloc
16838 -#endif
16839 -
16840  #include "se401.h"
16841  
16842  static int flickerless=0;
16843  static int video_nr = -1;
16844  
16845 -#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 3, 0)
16846 -static __devinitdata struct usb_device_id device_table [] = {
16847 +static struct usb_device_id device_table [] = {
16848         { USB_DEVICE(0x03e8, 0x0004) },/* Endpoints/Aox SE401 */
16849         { USB_DEVICE(0x0471, 0x030b) },/* Philips PCVC665K */
16850         { USB_DEVICE(0x047d, 0x5001) },/* Kensington 67014 */
16851 @@ -62,7 +56,6 @@
16852  };
16853  
16854  MODULE_DEVICE_TABLE(usb, device_table);
16855 -#endif
16856  
16857  MODULE_AUTHOR("Jeroen Vreeken <pe1rxq@amsat.org>");
16858  MODULE_DESCRIPTION("SE401 USB Camera Driver");
16859 @@ -80,54 +73,17 @@
16860   *
16861   * Memory management
16862   *
16863 - * This is a shameless copy from the USB-cpia driver (linux kernel
16864 - * version 2.3.29 or so, I have no idea what this code actually does ;).
16865 - * Actually it seems to be a copy of a shameless copy of the bttv-driver.
16866 - * Or that is a copy of a shameless copy of ... (To the powers: is there
16867 - * no generic kernel-function to do this sort of stuff?)
16868 - *
16869 - * Yes, it was a shameless copy from the bttv-driver. IIRC, Alan says
16870 - * there will be one, but apparentely not yet -jerdfelt
16871 - *
16872 - * So I copied it again for the ov511 driver -claudio
16873 - *
16874 - * Same for the se401 driver -Jeroen
16875   **********************************************************************/
16876  
16877 -/* Given PGD from the address space's page table, return the kernel
16878 - * virtual mapping of the physical memory mapped at ADR.
16879 - */
16880 -static inline unsigned long uvirt_to_kva(pgd_t *pgd, unsigned long adr)
16881 -{
16882 -       unsigned long ret = 0UL;
16883 -       pmd_t *pmd;
16884 -       pte_t *ptep, pte;
16885 -
16886 -       if (!pgd_none(*pgd)) {
16887 -               pmd = pmd_offset(pgd, adr);
16888 -               if (!pmd_none(*pmd)) {
16889 -                       ptep = pte_offset(pmd, adr);
16890 -                       pte = *ptep;
16891 -                       if (pte_present(pte)) {
16892 -                               ret = (unsigned long) page_address(pte_page(pte));
16893 -                               ret |= (adr & (PAGE_SIZE - 1));
16894 -                       }
16895 -               }
16896 -       }
16897 -
16898 -       return ret;
16899 -}
16900 -
16901  /* Here we want the physical address of the memory.
16902 - * This is used when initializing the contents of the
16903 - * area and marking the pages as reserved.
16904 + * This is used when initializing the contents of the area.
16905   */
16906  static inline unsigned long kvirt_to_pa(unsigned long adr)
16907  {
16908 -       unsigned long va, kva, ret;
16909 +       unsigned long kva, ret;
16910  
16911 -       va = VMALLOC_VMADDR(adr);
16912 -       kva = uvirt_to_kva(pgd_offset_k(va), va);
16913 +       kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
16914 +       kva |= adr & (PAGE_SIZE-1); /* restore the offset */
16915         ret = __pa(kva);
16916         return ret;
16917  }
16918 @@ -135,12 +91,9 @@
16919  static void *rvmalloc(unsigned long size)
16920  {
16921         void *mem;
16922 -       unsigned long adr, page;
16923 -
16924 -       /* Round it off to PAGE_SIZE */
16925 -       size += (PAGE_SIZE - 1);
16926 -       size &= ~(PAGE_SIZE - 1);
16927 +       unsigned long adr;
16928  
16929 +       size = PAGE_ALIGN(size);
16930         mem = vmalloc_32(size);
16931         if (!mem)
16932                 return NULL;
16933 @@ -148,13 +101,9 @@
16934         memset(mem, 0, size); /* Clear the ram out, no junk to the user */
16935         adr = (unsigned long) mem;
16936         while (size > 0) {
16937 -               page = kvirt_to_pa(adr);
16938 -               mem_map_reserve(virt_to_page(__va(page)));
16939 +               mem_map_reserve(vmalloc_to_page((void *)adr));
16940                 adr += PAGE_SIZE;
16941 -               if (size > PAGE_SIZE)
16942 -                       size -= PAGE_SIZE;
16943 -               else
16944 -                       size = 0;
16945 +               size -= PAGE_SIZE;
16946         }
16947  
16948         return mem;
16949 @@ -162,23 +111,16 @@
16950  
16951  static void rvfree(void *mem, unsigned long size)
16952  {
16953 -       unsigned long adr, page;
16954 +       unsigned long adr;
16955  
16956         if (!mem)
16957                 return;
16958  
16959 -       size += (PAGE_SIZE - 1);
16960 -       size &= ~(PAGE_SIZE - 1);
16961 -
16962 -       adr=(unsigned long) mem;
16963 -       while (size > 0) {
16964 -               page = kvirt_to_pa(adr);
16965 -               mem_map_unreserve(virt_to_page(__va(page)));
16966 +       adr = (unsigned long) mem;
16967 +       while ((long) size > 0) {
16968 +               mem_map_unreserve(vmalloc_to_page((void *)adr));
16969                 adr += PAGE_SIZE;
16970 -               if (size > PAGE_SIZE)
16971 -                       size -= PAGE_SIZE;
16972 -               else
16973 -                       size = 0;
16974 +               size -= PAGE_SIZE;
16975         }
16976         vfree(mem);
16977  }
16978 @@ -610,7 +552,7 @@
16979  */
16980  static int se401_start_stream(struct usb_se401 *se401)
16981  {
16982 -       urb_t *urb;
16983 +       struct urb *urb;
16984         int err=0, i;
16985         se401->streaming=1;
16986  
16987 @@ -704,7 +646,7 @@
16988                 return 0;
16989  
16990         /* Check for a valid mode */
16991 -       if (!width || !height)
16992 +       if (width <= 0 || height <= 0)
16993                 return 1;
16994         if ((width & 1) || (height & 1))
16995                 return 1;
16996 @@ -738,7 +680,8 @@
16997  static inline void enhance_picture(unsigned char *frame, int len)
16998  {
16999         while (len--) {
17000 -               *frame++=(((*frame^255)*(*frame^255))/255)^255;
17001 +               *frame=(((*frame^255)*(*frame^255))/255)^255;
17002 +               frame++;
17003         }
17004  }
17005  
17006 @@ -972,7 +915,8 @@
17007                 /* Fix the top line */
17008                 framedata+=linelength;
17009                 for (i=0; i<linelength; i++) {
17010 -                       *--framedata=*(framedata+linelength);
17011 +                       framedata--;
17012 +                       *framedata=*(framedata+linelength);
17013                 }
17014                 /* Fix the left side (green is already present) */
17015                 for (i=0; i<se401->cheight; i++) {
17016 @@ -1425,7 +1369,13 @@
17017  
17018         se401->sizes=cp[4]+cp[5]*256;
17019         se401->width=kmalloc(se401->sizes*sizeof(int), GFP_KERNEL);
17020 +       if (!se401->width)
17021 +               return 1;
17022         se401->height=kmalloc(se401->sizes*sizeof(int), GFP_KERNEL);
17023 +       if (!se401->height) {
17024 +               kfree(se401->width);
17025 +               return 1;
17026 +       }
17027         for (i=0; i<se401->sizes; i++) {
17028                     se401->width[i]=cp[6+i*4+0]+cp[6+i*4+1]*256;
17029                     se401->height[i]=cp[6+i*4+2]+cp[6+i*4+3]*256;
17030 @@ -1491,12 +1441,8 @@
17031          return 0;
17032  }
17033  
17034 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0)
17035 -static void* se401_probe(struct usb_device *dev, unsigned int ifnum)
17036 -#else
17037 -static void* __devinit se401_probe(struct usb_device *dev, unsigned int ifnum,
17038 +static void* se401_probe(struct usb_device *dev, unsigned int ifnum,
17039         const struct usb_device_id *id)
17040 -#endif
17041  {
17042          struct usb_interface_descriptor *interface;
17043          struct usb_se401 *se401;
17044 @@ -1625,9 +1571,7 @@
17045  
17046  static struct usb_driver se401_driver = {
17047          name:          "se401",
17048 -#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 3, 0)
17049          id_table:      device_table,
17050 -#endif
17051         probe:          se401_probe,
17052          disconnect:    se401_disconnect
17053  };
17054 diff -Nur linux-2.4.19.org/drivers/usb/se401.h linux-2.4.19/drivers/usb/se401.h
17055 --- linux-2.4.19.org/drivers/usb/se401.h        Fri Sep  7 19:59:04 2001
17056 +++ linux-2.4.19/drivers/usb/se401.h    Thu Oct 31 08:11:23 2002
17057 @@ -10,7 +10,7 @@
17058  
17059  #ifdef se401_DEBUG
17060  #  define PDEBUG(level, fmt, args...) \
17061 -if (debug >= level) info("[" __PRETTY_FUNCTION__ ":%d] " fmt, __LINE__ , ## args)
17062 +if (debug >= level) info("[%s:%d] " fmt, __PRETTY_FUNCTION__, __LINE__ , ## args)
17063  #else
17064  #  define PDEBUG(level, fmt, args...) do {} while(0)
17065  #endif
17066 @@ -197,8 +197,8 @@
17067  
17068         char *fbuf;             /* Videodev buffer area */
17069  
17070 -       urb_t *urb[SE401_NUMSBUF];
17071 -       urb_t *inturb;
17072 +       struct urb *urb[SE401_NUMSBUF];
17073 +       struct urb *inturb;
17074         
17075         int button;
17076         int buttonpressed;
17077 diff -Nur linux-2.4.19.org/drivers/usb/serial/Config.in linux-2.4.19/drivers/usb/serial/Config.in
17078 --- linux-2.4.19.org/drivers/usb/serial/Config.in       Sat Aug  3 02:39:45 2002
17079 +++ linux-2.4.19/drivers/usb/serial/Config.in   Thu Oct 31 08:11:23 2002
17080 @@ -5,34 +5,39 @@
17081  comment 'USB Serial Converter support'
17082  
17083  dep_tristate 'USB Serial Converter support' CONFIG_USB_SERIAL $CONFIG_USB
17084 -if [ "$CONFIG_USB_SERIAL" = "y" ]; then
17085 -  dep_mbool '  USB Serial Converter verbose debug' CONFIG_USB_SERIAL_DEBUG $CONFIG_USB_SERIAL
17086 +if [ "$CONFIG_USB_SERIAL" != "n" ]; then
17087 +   dep_bool '  USB Serial Converter verbose debug' CONFIG_USB_SERIAL_DEBUG $CONFIG_USB_SERIAL
17088 +   dep_mbool '  USB Generic Serial Driver' CONFIG_USB_SERIAL_GENERIC $CONFIG_USB_SERIAL
17089 +   dep_tristate '  USB Belkin and Peracom Single Port Serial Driver' CONFIG_USB_SERIAL_BELKIN $CONFIG_USB_SERIAL
17090 +   dep_tristate '  USB ConnectTech WhiteHEAT Serial Driver' CONFIG_USB_SERIAL_WHITEHEAT $CONFIG_USB_SERIAL
17091 +   dep_tristate '  USB Digi International AccelePort USB Serial Driver' CONFIG_USB_SERIAL_DIGI_ACCELEPORT $CONFIG_USB_SERIAL
17092 +   dep_tristate '  USB Empeg empeg-car Mark I/II Driver' CONFIG_USB_SERIAL_EMPEG $CONFIG_USB_SERIAL
17093 +   dep_tristate '  USB FTDI Single Port Serial Driver' CONFIG_USB_SERIAL_FTDI_SIO $CONFIG_USB_SERIAL
17094 +   dep_tristate '  USB Handspring Visor / Palm m50x / Sony Clie Driver' CONFIG_USB_SERIAL_VISOR $CONFIG_USB_SERIAL
17095 +   dep_tristate '  USB Compaq iPAQ / HP Jornada / Casio EM500 Driver' CONFIG_USB_SERIAL_IPAQ $CONFIG_USB_SERIAL
17096 +   dep_tristate '  USB IR Dongle Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_IR $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
17097 +   dep_tristate '  USB Inside Out Edgeport Serial Driver' CONFIG_USB_SERIAL_EDGEPORT $CONFIG_USB_SERIAL
17098 +   dep_tristate '  USB Inside Out Edgeport Serial Driver (TI devices)' CONFIG_USB_SERIAL_EDGEPORT_TI $CONFIG_USB_SERIAL
17099 +   dep_tristate '  USB Keyspan PDA Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_KEYSPAN_PDA $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
17100 +   dep_tristate '  USB Keyspan USA-xxx Serial Driver' CONFIG_USB_SERIAL_KEYSPAN $CONFIG_USB_SERIAL
17101 +   if [ "$CONFIG_USB_SERIAL_KEYSPAN" != "n" ]; then
17102 +      bool '    USB Keyspan USA-28 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28
17103 +      bool '    USB Keyspan USA-28X Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28X
17104 +      bool '    USB Keyspan USA-28XA Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28XA
17105 +      bool '    USB Keyspan USA-28XB Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28XB
17106 +      bool '    USB Keyspan USA-19 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19
17107 +      bool '    USB Keyspan USA-18X Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA18X
17108 +      bool '    USB Keyspan USA-19W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19W
17109 +      bool '    USB Keyspan USA-19QW Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19QW
17110 +      bool '    USB Keyspan USA-19QI Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19QI
17111 +      bool '    USB Keyspan USA-49W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA49W
17112 +   fi
17113 +   dep_tristate '  USB MCT Single Port Serial Driver' CONFIG_USB_SERIAL_MCT_U232 $CONFIG_USB_SERIAL
17114 +   dep_tristate '  USB KL5KUSB105 (Palmconnect) Driver' CONFIG_USB_SERIAL_KLSI $CONFIG_USB_SERIAL
17115 +   dep_tristate '  USB Prolific 2303 Single Port Serial Driver' CONFIG_USB_SERIAL_PL2303 $CONFIG_USB_SERIAL
17116 +   dep_tristate '  USB REINER SCT cyberJack pinpad/e-com chipcard reader (EXPERIMENTAL)' CONFIG_USB_SERIAL_CYBERJACK $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
17117 +   dep_tristate '  USB Xircom / Entregra Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_XIRCOM $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
17118 +   dep_tristate '  USB ZyXEL omni.net LCD Plus Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_OMNINET $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
17119  fi
17120 -dep_mbool '  USB Generic Serial Driver' CONFIG_USB_SERIAL_GENERIC $CONFIG_USB_SERIAL
17121 -dep_tristate '  USB Belkin and Peracom Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_BELKIN $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
17122 -dep_tristate '  USB ConnectTech WhiteHEAT Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_WHITEHEAT $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
17123 -dep_tristate '  USB Digi International AccelePort USB Serial Driver' CONFIG_USB_SERIAL_DIGI_ACCELEPORT $CONFIG_USB_SERIAL
17124 -dep_tristate '  USB Empeg empeg-car Mark I/II Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_EMPEG $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
17125 -dep_tristate '  USB FTDI Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_FTDI_SIO $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
17126 -dep_tristate '  USB Handspring Visor / Palm m50x / Sony Clie Driver' CONFIG_USB_SERIAL_VISOR $CONFIG_USB_SERIAL
17127 -dep_tristate '  USB Compaq iPAQ / HP Jornada / Casio EM500 Driver' CONFIG_USB_SERIAL_IPAQ $CONFIG_USB_SERIAL
17128 -dep_tristate '  USB IR Dongle Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_IR $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
17129 -dep_tristate '  USB Inside Out Edgeport Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_EDGEPORT $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
17130 -dep_tristate '  USB Keyspan PDA Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_KEYSPAN_PDA $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
17131 -dep_tristate '  USB Keyspan USA-xxx Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_KEYSPAN $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
17132 -   dep_mbool '    USB Keyspan USA-28 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28 $CONFIG_USB_SERIAL_KEYSPAN
17133 -   dep_mbool '    USB Keyspan USA-28X Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28X $CONFIG_USB_SERIAL_KEYSPAN
17134 -   dep_mbool '    USB Keyspan USA-28XA Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28XA $CONFIG_USB_SERIAL_KEYSPAN
17135 -   dep_mbool '    USB Keyspan USA-28XB Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28XB $CONFIG_USB_SERIAL_KEYSPAN
17136 -   dep_mbool '    USB Keyspan USA-19 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19 $CONFIG_USB_SERIAL_KEYSPAN
17137 -   dep_mbool '    USB Keyspan USA-18X Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA18X $CONFIG_USB_SERIAL_KEYSPAN
17138 -   dep_mbool '    USB Keyspan USA-19W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19W $CONFIG_USB_SERIAL_KEYSPAN
17139 -   dep_mbool '    USB Keyspan USA-49W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA49W $CONFIG_USB_SERIAL_KEYSPAN
17140 -dep_tristate '  USB MCT Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_MCT_U232 $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
17141 -dep_tristate '  USB KL5KUSB105 (Palmconnect) Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_KLSI $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
17142 -dep_tristate '  USB Prolific 2303 Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_PL2303 $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
17143 -dep_tristate '  USB REINER SCT cyberJack pinpad/e-com chipcard reader (EXPERIMENTAL)' CONFIG_USB_SERIAL_CYBERJACK $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
17144 -dep_tristate '  USB Xircom / Entregra Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_XIRCOM $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
17145 -dep_tristate '  USB ZyXEL omni.net LCD Plus Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_OMNINET $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
17146  
17147  endmenu
17148 diff -Nur linux-2.4.19.org/drivers/usb/serial/Makefile linux-2.4.19/drivers/usb/serial/Makefile
17149 --- linux-2.4.19.org/drivers/usb/serial/Makefile        Mon Feb 25 20:38:07 2002
17150 +++ linux-2.4.19/drivers/usb/serial/Makefile    Thu Oct 31 08:11:23 2002
17151 @@ -20,6 +20,7 @@
17152  obj-$(CONFIG_USB_SERIAL_EMPEG)                 += empeg.o
17153  obj-$(CONFIG_USB_SERIAL_MCT_U232)              += mct_u232.o
17154  obj-$(CONFIG_USB_SERIAL_EDGEPORT)              += io_edgeport.o
17155 +obj-$(CONFIG_USB_SERIAL_EDGEPORT_TI)           += io_ti.o
17156  obj-$(CONFIG_USB_SERIAL_PL2303)                        += pl2303.o
17157  obj-$(CONFIG_USB_SERIAL_CYBERJACK)             += cyberjack.o
17158  obj-$(CONFIG_USB_SERIAL_IR)                    += ir-usb.o
17159 diff -Nur linux-2.4.19.org/drivers/usb/serial/belkin_sa.c linux-2.4.19/drivers/usb/serial/belkin_sa.c
17160 --- linux-2.4.19.org/drivers/usb/serial/belkin_sa.c     Fri Dec 21 18:41:55 2001
17161 +++ linux-2.4.19/drivers/usb/serial/belkin_sa.c Thu Oct 31 08:11:23 2002
17162 @@ -1,8 +1,8 @@
17163  /*
17164   * Belkin USB Serial Adapter Driver
17165   *
17166 - *  Copyright (C) 2000
17167 - *      William Greathouse (wgreathouse@smva.com)
17168 + *  Copyright (C) 2000         William Greathouse (wgreathouse@smva.com)
17169 + *  Copyright (C) 2000-2001    Greg Kroah-Hartman (greg@kroah.com)
17170   *
17171   *  This program is largely derived from work by the linux-usb group
17172   *  and associated source files.  Please see the usb/serial files for
17173 @@ -24,6 +24,9 @@
17174   * -- Add support for flush commands
17175   * -- Add everything that is missing :)
17176   *
17177 + * 27-Nov-2001 gkh
17178 + *     compressed all the differnent device entries into 1.
17179 + *
17180   * 30-May-2001 gkh
17181   *     switched from using spinlock to a semaphore, which fixes lots of problems.
17182   *
17183 @@ -62,18 +65,15 @@
17184  
17185  #include <linux/config.h>
17186  #include <linux/kernel.h>
17187 -#include <linux/sched.h>
17188 -#include <linux/signal.h>
17189  #include <linux/errno.h>
17190 -#include <linux/poll.h>
17191  #include <linux/init.h>
17192  #include <linux/slab.h>
17193 -#include <linux/fcntl.h>
17194  #include <linux/tty.h>
17195  #include <linux/tty_driver.h>
17196  #include <linux/tty_flip.h>
17197  #include <linux/module.h>
17198  #include <linux/spinlock.h>
17199 +#include <asm/uaccess.h>
17200  #include <linux/usb.h>
17201  
17202  #ifdef CONFIG_USB_SERIAL_DEBUG
17203 @@ -88,7 +88,7 @@
17204  /*
17205   * Version Information
17206   */
17207 -#define DRIVER_VERSION "v1.1"
17208 +#define DRIVER_VERSION "v1.2"
17209  #define DRIVER_AUTHOR "William Greathouse <wgreathouse@smva.com>"
17210  #define DRIVER_DESC "USB Belkin Serial converter driver"
17211  
17212 @@ -103,146 +103,35 @@
17213  static void belkin_sa_break_ctl                (struct usb_serial_port *port, int break_state );
17214  
17215  
17216 -static __devinitdata struct usb_device_id id_table_combined [] = {
17217 +static struct usb_device_id id_table_combined [] = {
17218         { USB_DEVICE(BELKIN_SA_VID, BELKIN_SA_PID) },
17219         { USB_DEVICE(BELKIN_OLD_VID, BELKIN_OLD_PID) },
17220         { USB_DEVICE(PERACOM_VID, PERACOM_PID) },
17221         { USB_DEVICE(GOHUBS_VID, GOHUBS_PID) },
17222 +       { USB_DEVICE(GOHUBS_VID, HANDYLINK_PID) },
17223         { USB_DEVICE(BELKIN_DOCKSTATION_VID, BELKIN_DOCKSTATION_PID) },
17224         { }                                                     /* Terminating entry */
17225  };
17226  
17227 -static __devinitdata struct usb_device_id belkin_dockstation_table [] = {
17228 -       { USB_DEVICE(BELKIN_DOCKSTATION_VID, BELKIN_DOCKSTATION_PID) },
17229 -       { }                                                     /* Terminating entry */
17230 -};
17231 -
17232 -static __devinitdata struct usb_device_id belkin_sa_table [] = {
17233 -       { USB_DEVICE(BELKIN_SA_VID, BELKIN_SA_PID) },
17234 -       { }                                                     /* Terminating entry */
17235 -};
17236 -
17237 -static __devinitdata struct usb_device_id belkin_old_table [] = {
17238 -       { USB_DEVICE(BELKIN_OLD_VID, BELKIN_OLD_PID) },
17239 -       { }                                                     /* Terminating entry */
17240 -};
17241 -
17242 -static __devinitdata struct usb_device_id peracom_table [] = {
17243 -       { USB_DEVICE(PERACOM_VID, PERACOM_PID) },
17244 -       { }                                                     /* Terminating entry */
17245 -};
17246 -
17247 -static __devinitdata struct usb_device_id gocom232_table [] = {
17248 -       { USB_DEVICE(GOHUBS_VID, GOHUBS_PID) },
17249 -       { }                                                     /* Terminating entry */
17250 -};
17251 -
17252  MODULE_DEVICE_TABLE (usb, id_table_combined);
17253  
17254 -/* All of the device info needed for the Belkin dockstation serial converter */
17255 -static struct usb_serial_device_type belkin_dockstation_device = {
17256 -       name:                   "Belkin F5U120-PC USB Serial Adapter",
17257 -       id_table:               belkin_dockstation_table,               /* the Belkin F5U103 device */
17258 -       needs_interrupt_in:     MUST_HAVE,                      /* this device must have an interrupt in endpoint */
17259 -       needs_bulk_in:          MUST_HAVE,                      /* this device must have a bulk in endpoint */
17260 -       needs_bulk_out:         MUST_HAVE,                      /* this device must have a bulk out endpoint */
17261 -       num_interrupt_in:       1,
17262 -       num_bulk_in:            1,
17263 -       num_bulk_out:           1,
17264 -       num_ports:              1,
17265 -       open:                   belkin_sa_open,
17266 -       close:                  belkin_sa_close,
17267 -       read_int_callback:      belkin_sa_read_int_callback,    /* How we get the status info */
17268 -       ioctl:                  belkin_sa_ioctl,
17269 -       set_termios:            belkin_sa_set_termios,
17270 -       break_ctl:              belkin_sa_break_ctl,
17271 -       startup:                belkin_sa_startup,
17272 -       shutdown:               belkin_sa_shutdown,
17273 -};
17274 -
17275 -/* All of the device info needed for the Belkin serial converter */
17276 -static struct usb_serial_device_type belkin_sa_device = {
17277 -       name:                   "Belkin F5U103 USB Serial Adapter",
17278 -       id_table:               belkin_sa_table,                /* the Belkin F5U103 device */
17279 -       needs_interrupt_in:     MUST_HAVE,                      /* this device must have an interrupt in endpoint */
17280 -       needs_bulk_in:          MUST_HAVE,                      /* this device must have a bulk in endpoint */
17281 -       needs_bulk_out:         MUST_HAVE,                      /* this device must have a bulk out endpoint */
17282 -       num_interrupt_in:       1,
17283 -       num_bulk_in:            1,
17284 -       num_bulk_out:           1,
17285 -       num_ports:              1,
17286 -       open:                   belkin_sa_open,
17287 -       close:                  belkin_sa_close,
17288 -       read_int_callback:      belkin_sa_read_int_callback,    /* How we get the status info */
17289 -       ioctl:                  belkin_sa_ioctl,
17290 -       set_termios:            belkin_sa_set_termios,
17291 -       break_ctl:              belkin_sa_break_ctl,
17292 -       startup:                belkin_sa_startup,
17293 -       shutdown:               belkin_sa_shutdown,
17294 -};
17295 -
17296 -
17297 -/* This driver also supports the "old" school Belkin single port adaptor */
17298 -static struct usb_serial_device_type belkin_old_device = {
17299 -       name:                   "Belkin USB Serial Adapter",
17300 -       id_table:               belkin_old_table,               /* the old Belkin device */
17301 -       needs_interrupt_in:     MUST_HAVE,                      /* this device must have an interrupt in endpoint */
17302 -       needs_bulk_in:          MUST_HAVE,                      /* this device must have a bulk in endpoint */
17303 -       needs_bulk_out:         MUST_HAVE,                      /* this device must have a bulk out endpoint */
17304 -       num_interrupt_in:       1,
17305 -       num_bulk_in:            1,
17306 -       num_bulk_out:           1,
17307 -       num_ports:              1,
17308 -       open:                   belkin_sa_open,
17309 -       close:                  belkin_sa_close,
17310 -       read_int_callback:      belkin_sa_read_int_callback,    /* How we get the status info */
17311 -       ioctl:                  belkin_sa_ioctl,
17312 -       set_termios:            belkin_sa_set_termios,
17313 -       break_ctl:              belkin_sa_break_ctl,
17314 -       startup:                belkin_sa_startup,
17315 -       shutdown:               belkin_sa_shutdown,
17316 -};
17317 -
17318 -/* this driver also works for the Peracom single port adapter */
17319 -static struct usb_serial_device_type peracom_device = {
17320 -       name:                   "Peracom single port USB Serial Adapter",
17321 -       id_table:               peracom_table,                  /* the Peracom device */
17322 -       needs_interrupt_in:     MUST_HAVE,                      /* this device must have an interrupt in endpoint */
17323 -       needs_bulk_in:          MUST_HAVE,                      /* this device must have a bulk in endpoint */
17324 -       needs_bulk_out:         MUST_HAVE,                      /* this device must have a bulk out endpoint */
17325 -       num_interrupt_in:       1,
17326 -       num_bulk_in:            1,
17327 -       num_bulk_out:           1,
17328 -       num_ports:              1,
17329 -       open:                   belkin_sa_open,
17330 -       close:                  belkin_sa_close,
17331 -       read_int_callback:      belkin_sa_read_int_callback,    /* How we get the status info */
17332 -       ioctl:                  belkin_sa_ioctl,
17333 -       set_termios:            belkin_sa_set_termios,
17334 -       break_ctl:              belkin_sa_break_ctl,
17335 -       startup:                belkin_sa_startup,
17336 -       shutdown:               belkin_sa_shutdown,
17337 -};
17338 -
17339 -/* the GoHubs Go-COM232 device is the same as the Peracom single port adapter */
17340 -static struct usb_serial_device_type gocom232_device = {
17341 -       name:                   "GO-COM232 USB Serial Converter",
17342 -       id_table:               gocom232_table,                 /* the GO-COM232 device */
17343 -       needs_interrupt_in:     MUST_HAVE,                      /* this device must have an interrupt in endpoint */
17344 -       needs_bulk_in:          MUST_HAVE,                      /* this device must have a bulk in endpoint */
17345 -       needs_bulk_out:         MUST_HAVE,                      /* this device must have a bulk out endpoint */
17346 -       num_interrupt_in:       1,
17347 -       num_bulk_in:            1,
17348 -       num_bulk_out:           1,
17349 -       num_ports:              1,
17350 -       open:                   belkin_sa_open,
17351 -       close:                  belkin_sa_close,
17352 -       read_int_callback:      belkin_sa_read_int_callback,    /* How we get the status info */
17353 -       ioctl:                  belkin_sa_ioctl,
17354 -       set_termios:            belkin_sa_set_termios,
17355 -       break_ctl:              belkin_sa_break_ctl,
17356 -       startup:                belkin_sa_startup,
17357 -       shutdown:               belkin_sa_shutdown,
17358 +/* All of the device info needed for the serial converters */
17359 +static struct usb_serial_device_type belkin_device = {
17360 +       .owner =                THIS_MODULE,
17361 +       .name =                 "Belkin / Peracom / GoHubs USB Serial Adapter",
17362 +       .id_table =             id_table_combined,
17363 +       .num_interrupt_in =     1,
17364 +       .num_bulk_in =          1,
17365 +       .num_bulk_out =         1,
17366 +       .num_ports =            1,
17367 +       .open =                 belkin_sa_open,
17368 +       .close =                belkin_sa_close,
17369 +       .read_int_callback =    belkin_sa_read_int_callback,    /* How we get the status info */
17370 +       .ioctl =                belkin_sa_ioctl,
17371 +       .set_termios =          belkin_sa_set_termios,
17372 +       .break_ctl =            belkin_sa_break_ctl,
17373 +       .startup =              belkin_sa_startup,
17374 +       .shutdown =             belkin_sa_shutdown,
17375  };
17376  
17377  
17378 @@ -296,13 +185,10 @@
17379  {
17380         int i;
17381         
17382 -       dbg (__FUNCTION__);
17383 +       dbg ("%s", __FUNCTION__);
17384  
17385         /* stop reads and writes on all ports */
17386         for (i=0; i < serial->num_ports; ++i) {
17387 -               while (serial->port[i].open_count > 0) {
17388 -                       belkin_sa_close (&serial->port[i], NULL);
17389 -               }
17390                 /* My special items, the standard routines free my urbs */
17391                 if (serial->port[i].private)
17392                         kfree(serial->port[i].private);
17393 @@ -314,36 +200,25 @@
17394  {
17395         int retval = 0;
17396  
17397 -       dbg(__FUNCTION__" port %d", port->number);
17398 +       dbg("%s port %d", __FUNCTION__, port->number);
17399  
17400 -       down (&port->sem);
17401 -       
17402 -       ++port->open_count;
17403 -       MOD_INC_USE_COUNT;
17404 -       
17405 -       if (!port->active) {
17406 -               port->active = 1;
17407 -
17408 -               /*Start reading from the device*/
17409 -               /* TODO: Look at possibility of submitting mulitple URBs to device to
17410 -                *       enhance buffering.  Win trace shows 16 initial read URBs.
17411 -                */
17412 -               port->read_urb->dev = port->serial->dev;
17413 -               retval = usb_submit_urb(port->read_urb);
17414 -               if (retval) {
17415 -                       err("usb_submit_urb(read bulk) failed");
17416 -                       goto exit;
17417 -               }
17418 -
17419 -               port->interrupt_in_urb->dev = port->serial->dev;
17420 -               retval = usb_submit_urb(port->interrupt_in_urb);
17421 -               if (retval)
17422 -                       err(" usb_submit_urb(read int) failed");
17423 +       /*Start reading from the device*/
17424 +       /* TODO: Look at possibility of submitting mulitple URBs to device to
17425 +        *       enhance buffering.  Win trace shows 16 initial read URBs.
17426 +        */
17427 +       port->read_urb->dev = port->serial->dev;
17428 +       retval = usb_submit_urb(port->read_urb);
17429 +       if (retval) {
17430 +               err("usb_submit_urb(read bulk) failed");
17431 +               goto exit;
17432         }
17433 -       
17434 -exit:
17435 -       up (&port->sem);
17436  
17437 +       port->interrupt_in_urb->dev = port->serial->dev;
17438 +       retval = usb_submit_urb(port->interrupt_in_urb);
17439 +       if (retval)
17440 +               err(" usb_submit_urb(read int) failed");
17441 +
17442 +exit:
17443         return retval;
17444  } /* belkin_sa_open */
17445  
17446 @@ -359,24 +234,14 @@
17447         if (!serial)
17448                 return;
17449  
17450 -       dbg(__FUNCTION__" port %d", port->number);
17451 -
17452 -       down (&port->sem);
17453 -
17454 -       --port->open_count;
17455 +       dbg("%s port %d", __FUNCTION__, port->number);
17456  
17457 -       if (port->open_count <= 0) {
17458 -               if (serial->dev) {
17459 -                       /* shutdown our bulk reads and writes */
17460 -                       usb_unlink_urb (port->write_urb);
17461 -                       usb_unlink_urb (port->read_urb);
17462 -                       usb_unlink_urb (port->interrupt_in_urb);
17463 -               }
17464 -               port->active = 0;
17465 +       if (serial->dev) {
17466 +               /* shutdown our bulk reads and writes */
17467 +               usb_unlink_urb (port->write_urb);
17468 +               usb_unlink_urb (port->read_urb);
17469 +               usb_unlink_urb (port->interrupt_in_urb);
17470         }
17471 -       
17472 -       up (&port->sem);
17473 -       MOD_DEC_USE_COUNT;
17474  } /* belkin_sa_close */
17475  
17476  
17477 @@ -457,12 +322,31 @@
17478  {
17479         struct usb_serial *serial = port->serial;
17480         struct belkin_sa_private *priv = (struct belkin_sa_private *)port->private;
17481 -       unsigned int iflag = port->tty->termios->c_iflag;
17482 -       unsigned int cflag = port->tty->termios->c_cflag;
17483 -       unsigned int old_iflag = old_termios->c_iflag;
17484 -       unsigned int old_cflag = old_termios->c_cflag;
17485 +       unsigned int iflag;
17486 +       unsigned int cflag;
17487 +       unsigned int old_iflag = 0;
17488 +       unsigned int old_cflag = 0;
17489         __u16 urb_value = 0; /* Will hold the new flags */
17490         
17491 +       if ((!port->tty) || (!port->tty->termios)) {
17492 +               dbg ("%s - no tty or termios structure", __FUNCTION__);
17493 +               return;
17494 +       }
17495 +
17496 +       iflag = port->tty->termios->c_iflag;
17497 +       cflag = port->tty->termios->c_cflag;
17498 +
17499 +       /* check that they really want us to change something */
17500 +       if (old_termios) {
17501 +               if ((cflag == old_termios->c_cflag) &&
17502 +                   (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
17503 +                       dbg("%s - nothing to change...", __FUNCTION__);
17504 +                       return;
17505 +               }
17506 +               old_iflag = old_termios->c_iflag;
17507 +               old_cflag = old_termios->c_cflag;
17508 +       }
17509 +
17510         /* Set the baud rate */
17511         if( (cflag&CBAUD) != (old_cflag&CBAUD) ) {
17512                 /* reassert DTR and (maybe) RTS on transition from B0 */
17513 @@ -642,11 +526,7 @@
17514  
17515  static int __init belkin_sa_init (void)
17516  {
17517 -       usb_serial_register (&belkin_dockstation_device);
17518 -       usb_serial_register (&belkin_sa_device);
17519 -       usb_serial_register (&belkin_old_device);
17520 -       usb_serial_register (&peracom_device);
17521 -       usb_serial_register (&gocom232_device);
17522 +       usb_serial_register (&belkin_device);
17523         info(DRIVER_DESC " " DRIVER_VERSION);
17524         return 0;
17525  }
17526 @@ -654,11 +534,7 @@
17527  
17528  static void __exit belkin_sa_exit (void)
17529  {
17530 -       usb_serial_deregister (&belkin_dockstation_device);
17531 -       usb_serial_deregister (&belkin_sa_device);
17532 -       usb_serial_deregister (&belkin_old_device);
17533 -       usb_serial_deregister (&peracom_device);
17534 -       usb_serial_deregister (&gocom232_device);
17535 +       usb_serial_deregister (&belkin_device);
17536  }
17537  
17538  
17539 diff -Nur linux-2.4.19.org/drivers/usb/serial/belkin_sa.h linux-2.4.19/drivers/usb/serial/belkin_sa.h
17540 --- linux-2.4.19.org/drivers/usb/serial/belkin_sa.h     Mon Oct  1 22:45:43 2001
17541 +++ linux-2.4.19/drivers/usb/serial/belkin_sa.h Thu Oct 31 08:11:23 2002
17542 @@ -47,6 +47,7 @@
17543  
17544  #define GOHUBS_VID     0x0921  /* GoHubs vendor id */
17545  #define GOHUBS_PID     0x1000  /* GoHubs single port serial converter's id (identical to the Peracom device) */
17546 +#define HANDYLINK_PID  0x1200  /* HandyLink USB's id (identical to the Peracom device) */
17547  
17548  /* Vendor Request Interface */
17549  #define BELKIN_SA_SET_BAUDRATE_REQUEST 0  /* Set baud rate */
17550 diff -Nur linux-2.4.19.org/drivers/usb/serial/cyberjack.c linux-2.4.19/drivers/usb/serial/cyberjack.c
17551 --- linux-2.4.19.org/drivers/usb/serial/cyberjack.c     Sat Aug  3 02:39:45 2002
17552 +++ linux-2.4.19/drivers/usb/serial/cyberjack.c Thu Oct 31 08:11:24 2002
17553 @@ -25,18 +25,15 @@
17554  
17555  #include <linux/config.h>
17556  #include <linux/kernel.h>
17557 -#include <linux/sched.h>
17558 -#include <linux/signal.h>
17559  #include <linux/errno.h>
17560 -#include <linux/poll.h>
17561  #include <linux/init.h>
17562  #include <linux/slab.h>
17563 -#include <linux/fcntl.h>
17564  #include <linux/tty.h>
17565  #include <linux/tty_driver.h>
17566  #include <linux/tty_flip.h>
17567  #include <linux/module.h>
17568  #include <linux/spinlock.h>
17569 +#include <asm/uaccess.h>
17570  #include <linux/usb.h>
17571  
17572  #ifdef CONFIG_USB_SERIAL_DEBUG
17573 @@ -69,7 +66,7 @@
17574  static void cyberjack_read_bulk_callback (struct urb *urb);
17575  static void cyberjack_write_bulk_callback (struct urb *urb);
17576  
17577 -static __devinitdata struct usb_device_id id_table [] = {
17578 +static struct usb_device_id id_table [] = {
17579         { USB_DEVICE(CYBERJACK_VENDOR_ID, CYBERJACK_PRODUCT_ID) },
17580         { }                     /* Terminating entry */
17581  };
17582 @@ -77,23 +74,21 @@
17583  MODULE_DEVICE_TABLE (usb, id_table);
17584  
17585  static struct usb_serial_device_type cyberjack_device = {
17586 -       name:                   "Reiner SCT Cyberjack USB card reader",
17587 -       id_table:               id_table,
17588 -       needs_interrupt_in:     MUST_HAVE,
17589 -       needs_bulk_in:          MUST_HAVE,
17590 -       needs_bulk_out:         MUST_HAVE,
17591 -       num_interrupt_in:       1,
17592 -       num_bulk_in:            1,
17593 -       num_bulk_out:           1,
17594 -       num_ports:              1,
17595 -       startup:                cyberjack_startup,
17596 -       shutdown:               cyberjack_shutdown,
17597 -       open:                   cyberjack_open,
17598 -       close:                  cyberjack_close,
17599 -       write:                  cyberjack_write,
17600 -       read_int_callback:      cyberjack_read_int_callback,
17601 -       read_bulk_callback:     cyberjack_read_bulk_callback,
17602 -       write_bulk_callback:    cyberjack_write_bulk_callback,
17603 +       .owner =                THIS_MODULE,
17604 +       .name =                 "Reiner SCT Cyberjack USB card reader",
17605 +       .id_table =             id_table,
17606 +       .num_interrupt_in =     1,
17607 +       .num_bulk_in =          1,
17608 +       .num_bulk_out =         1,
17609 +       .num_ports =            1,
17610 +       .startup =              cyberjack_startup,
17611 +       .shutdown =             cyberjack_shutdown,
17612 +       .open =                 cyberjack_open,
17613 +       .close =                cyberjack_close,
17614 +       .write =                cyberjack_write,
17615 +       .read_int_callback =    cyberjack_read_int_callback,
17616 +       .read_bulk_callback =   cyberjack_read_bulk_callback,
17617 +       .write_bulk_callback =  cyberjack_write_bulk_callback,
17618  };
17619  
17620  struct cyberjack_private {
17621 @@ -108,7 +103,7 @@
17622  {
17623         struct cyberjack_private *priv;
17624  
17625 -       dbg (__FUNCTION__);
17626 +       dbg("%s", __FUNCTION__);
17627  
17628         /* allocate the private data structure */
17629         serial->port->private = kmalloc(sizeof(struct cyberjack_private), GFP_KERNEL);
17630 @@ -130,13 +125,9 @@
17631  {
17632         int i;
17633         
17634 -       dbg (__FUNCTION__);
17635 +       dbg("%s", __FUNCTION__);
17636  
17637 -       /* stop reads and writes on all ports */
17638         for (i=0; i < serial->num_ports; ++i) {
17639 -               while (serial->port[i].open_count > 0) {
17640 -                       cyberjack_close (&serial->port[i], NULL);
17641 -               }
17642                 /* My special items, the standard routines free my urbs */
17643                 if (serial->port[i].private)
17644                         kfree(serial->port[i].private);
17645 @@ -151,66 +142,43 @@
17646         if (port_paranoia_check (port, __FUNCTION__))
17647                 return -ENODEV;
17648  
17649 -       MOD_INC_USE_COUNT;
17650 -
17651 -       dbg(__FUNCTION__ " - port %d", port->number);
17652 -
17653 -       down (&port->sem);
17654 -
17655 -       ++port->open_count;
17656 +       dbg("%s - port %d", __FUNCTION__, port->number);
17657  
17658 -       if (!port->active) {
17659 -               port->active = 1;
17660 -               /* force low_latency on so that our tty_push actually forces
17661 -                * the data through, otherwise it is scheduled, and with high
17662 -                * data rates (like with OHCI) data can get lost.
17663 -                */
17664 -               port->tty->low_latency = 1;
17665 -
17666 -               priv = (struct cyberjack_private *)port->private;
17667 -               priv->rdtodo = 0;
17668 -               priv->wrfilled = 0;
17669 -               priv->wrsent = 0;
17670 +       /* force low_latency on so that our tty_push actually forces
17671 +        * the data through, otherwise it is scheduled, and with high
17672 +        * data rates (like with OHCI) data can get lost.
17673 +        */
17674 +       port->tty->low_latency = 1;
17675  
17676 -               /* shutdown any bulk reads that might be going on */
17677 -               usb_unlink_urb (port->write_urb);
17678 -               usb_unlink_urb (port->read_urb);
17679 -               usb_unlink_urb (port->interrupt_in_urb);
17680 -
17681 -               port->interrupt_in_urb->dev = port->serial->dev;
17682 -               result = usb_submit_urb(port->interrupt_in_urb);
17683 -               if (result)
17684 -                       err(" usb_submit_urb(read int) failed");
17685 -               dbg(__FUNCTION__ " - usb_submit_urb(int urb)");
17686 -       }
17687 +       priv = (struct cyberjack_private *)port->private;
17688 +       priv->rdtodo = 0;
17689 +       priv->wrfilled = 0;
17690 +       priv->wrsent = 0;
17691  
17692 -       up (&port->sem);
17693 +       /* shutdown any bulk reads that might be going on */
17694 +       usb_unlink_urb (port->write_urb);
17695 +       usb_unlink_urb (port->read_urb);
17696 +       usb_unlink_urb (port->interrupt_in_urb);
17697 +
17698 +       port->interrupt_in_urb->dev = port->serial->dev;
17699 +       result = usb_submit_urb(port->interrupt_in_urb);
17700 +       if (result)
17701 +               err(" usb_submit_urb(read int) failed");
17702 +       dbg("%s - usb_submit_urb(int urb)", __FUNCTION__);
17703  
17704         return result;
17705  }
17706  
17707  static void cyberjack_close (struct usb_serial_port *port, struct file *filp)
17708  {
17709 -       dbg(__FUNCTION__ " - port %d", port->number);
17710 -
17711 -       down (&port->sem);
17712 -
17713 -       --port->open_count;
17714 +       dbg("%s - port %d", __FUNCTION__, port->number);
17715  
17716 -       if (port->open_count <= 0) {
17717 -               if (port->serial->dev) {
17718 -                       /* shutdown any bulk reads that might be going on */
17719 -                       usb_unlink_urb (port->write_urb);
17720 -                       usb_unlink_urb (port->read_urb);
17721 -                       usb_unlink_urb (port->interrupt_in_urb);
17722 -               }
17723 -
17724 -               port->active = 0;
17725 -               port->open_count = 0;
17726 +       if (port->serial->dev) {
17727 +               /* shutdown any bulk reads that might be going on */
17728 +               usb_unlink_urb (port->write_urb);
17729 +               usb_unlink_urb (port->read_urb);
17730 +               usb_unlink_urb (port->interrupt_in_urb);
17731         }
17732 -
17733 -       up (&port->sem);
17734 -       MOD_DEC_USE_COUNT;
17735  }
17736  
17737  static int cyberjack_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count)
17738 @@ -220,32 +188,28 @@
17739         int result;
17740         int wrexpected;
17741  
17742 -       dbg(__FUNCTION__ " - port %d", port->number);
17743 -       dbg(__FUNCTION__ " - from_user %d", from_user);
17744 +       dbg("%s - port %d", __FUNCTION__, port->number);
17745 +       dbg("%s - from_user %d", __FUNCTION__, from_user);
17746  
17747         if (count == 0) {
17748 -               dbg(__FUNCTION__ " - write request of 0 bytes");
17749 +               dbg("%s - write request of 0 bytes", __FUNCTION__);
17750                 return (0);
17751         }
17752  
17753         if (port->write_urb->status == -EINPROGRESS) {
17754 -               dbg (__FUNCTION__ " - already writing");
17755 +               dbg("%s - already writing", __FUNCTION__);
17756                 return (0);
17757         }
17758  
17759 -       down (&port->sem);
17760 -
17761         if( (count+priv->wrfilled)>sizeof(priv->wrbuf) ) {
17762                 /* To much data  for buffer. Reset buffer. */
17763                 priv->wrfilled=0;
17764 -               up (&port->sem);
17765                 return (0);
17766         }
17767  
17768         /* Copy data */
17769         if (from_user) {
17770                 if (copy_from_user(priv->wrbuf+priv->wrfilled, buf, count)) {
17771 -                       up (&port->sem);
17772                         return -EFAULT;
17773                 }
17774         } else {
17775 @@ -257,7 +221,7 @@
17776  
17777         if( priv->wrfilled >= 3 ) {
17778                 wrexpected = ((int)priv->wrbuf[2]<<8)+priv->wrbuf[1]+3;
17779 -               dbg(__FUNCTION__ " - expected data: %d", wrexpected);
17780 +               dbg("%s - expected data: %d", __FUNCTION__, wrexpected);
17781         } else {
17782                 wrexpected = sizeof(priv->wrbuf);
17783         }
17784 @@ -266,7 +230,7 @@
17785                 /* We have enough data to begin transmission */
17786                 int length;
17787  
17788 -               dbg(__FUNCTION__ " - transmitting data (frame 1)");
17789 +               dbg("%s - transmitting data (frame 1)", __FUNCTION__);
17790                 length = (wrexpected > port->bulk_out_size) ? port->bulk_out_size : wrexpected;
17791  
17792                 memcpy (port->write_urb->transfer_buffer, priv->wrbuf, length );
17793 @@ -284,26 +248,24 @@
17794                 /* send the data out the bulk port */
17795                 result = usb_submit_urb(port->write_urb);
17796                 if (result) {
17797 -                       err(__FUNCTION__ " - failed submitting write urb, error %d", result);
17798 +                       err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
17799                         /* Throw away data. No better idea what to do with it. */
17800                         priv->wrfilled=0;
17801                         priv->wrsent=0;
17802 -                       up (&port->sem);
17803                         return 0;
17804                 }
17805  
17806 -               dbg(__FUNCTION__ " - priv->wrsent=%d",priv->wrsent);
17807 -               dbg(__FUNCTION__ " - priv->wrfilled=%d",priv->wrfilled);
17808 +               dbg("%s - priv->wrsent=%d", __FUNCTION__,priv->wrsent);
17809 +               dbg("%s - priv->wrfilled=%d", __FUNCTION__,priv->wrfilled);
17810  
17811                 if( priv->wrsent>=priv->wrfilled ) {
17812 -                       dbg(__FUNCTION__ " - buffer cleaned");
17813 +                       dbg("%s - buffer cleaned", __FUNCTION__);
17814                         memset( priv->wrbuf, 0, sizeof(priv->wrbuf) );
17815                         priv->wrfilled=0;
17816                         priv->wrsent=0;
17817                 }
17818         }
17819  
17820 -       up (&port->sem);
17821         return (count);
17822  } 
17823  
17824 @@ -316,7 +278,7 @@
17825  
17826         if (port_paranoia_check (port, __FUNCTION__)) return;
17827  
17828 -       dbg(__FUNCTION__ " - port %d", port->number);
17829 +       dbg("%s - port %d", __FUNCTION__, port->number);
17830  
17831         /* the urb might have been killed. */
17832         if (urb->status)
17833 @@ -349,14 +311,14 @@
17834                 /* "+=" is probably more fault tollerant than "=" */
17835                 priv->rdtodo += size;
17836  
17837 -               dbg(__FUNCTION__ " - rdtodo: %d", priv->rdtodo);
17838 +               dbg("%s - rdtodo: %d", __FUNCTION__, priv->rdtodo);
17839  
17840                 if( !old_rdtodo ) {
17841                         port->read_urb->dev = port->serial->dev;
17842                         result = usb_submit_urb(port->read_urb);
17843                         if( result )
17844 -                               err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
17845 -                       dbg(__FUNCTION__ " - usb_submit_urb(read urb)");
17846 +                               err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
17847 +                       dbg("%s - usb_submit_urb(read urb)", __FUNCTION__);
17848                 }
17849         }
17850  }
17851 @@ -371,16 +333,16 @@
17852         int i;
17853         int result;
17854  
17855 -       dbg(__FUNCTION__ " - port %d", port->number);
17856 +       dbg("%s - port %d", __FUNCTION__, port->number);
17857         
17858         if (!serial) {
17859 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
17860 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
17861                 return;
17862         }
17863  
17864         if (urb->status) {
17865                 usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
17866 -               dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
17867 +               dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
17868                 return;
17869         }
17870  
17871 @@ -404,15 +366,15 @@
17872         /* Just to be sure */
17873         if( priv->rdtodo<0 ) priv->rdtodo=0;
17874  
17875 -       dbg(__FUNCTION__ " - rdtodo: %d", priv->rdtodo);
17876 +       dbg("%s - rdtodo: %d", __FUNCTION__, priv->rdtodo);
17877  
17878         /* Continue to read if we have still urbs to do. */
17879         if( priv->rdtodo /* || (urb->actual_length==port->bulk_in_endpointAddress)*/ ) {
17880                 port->read_urb->dev = port->serial->dev;
17881                 result = usb_submit_urb(port->read_urb);
17882                 if (result)
17883 -                       err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
17884 -               dbg(__FUNCTION__ " - usb_submit_urb(read urb)");
17885 +                       err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
17886 +               dbg("%s - usb_submit_urb(read urb)", __FUNCTION__);
17887         }
17888  }
17889  
17890 @@ -422,15 +384,15 @@
17891         struct cyberjack_private *priv = (struct cyberjack_private *)port->private;
17892         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
17893  
17894 -       dbg(__FUNCTION__ " - port %d", port->number);
17895 +       dbg("%s - port %d", __FUNCTION__, port->number);
17896         
17897         if (!serial) {
17898 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
17899 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
17900                 return;
17901         }
17902  
17903         if (urb->status) {
17904 -               dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
17905 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
17906                 return;
17907         }
17908  
17909 @@ -439,13 +401,11 @@
17910                 int length, blksize, result;
17911  
17912                 if (port->write_urb->status == -EINPROGRESS) {
17913 -                       dbg (__FUNCTION__ " - already writing");
17914 +                       dbg("%s - already writing", __FUNCTION__);
17915                         return;
17916                 }
17917  
17918 -               down (&port->sem);
17919 -
17920 -               dbg(__FUNCTION__ " - transmitting data (frame n)");
17921 +               dbg("%s - transmitting data (frame n)", __FUNCTION__);
17922  
17923                 length = ((priv->wrfilled - priv->wrsent) > port->bulk_out_size) ?
17924                         port->bulk_out_size : (priv->wrfilled - priv->wrsent);
17925 @@ -466,29 +426,27 @@
17926                 /* send the data out the bulk port */
17927                 result = usb_submit_urb(port->write_urb);
17928                 if (result) {
17929 -                       err(__FUNCTION__ " - failed submitting write urb, error %d", result);
17930 +                       err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
17931                         /* Throw away data. No better idea what to do with it. */
17932                         priv->wrfilled=0;
17933                         priv->wrsent=0;
17934 -                       up (&port->sem);
17935                         queue_task(&port->tqueue, &tq_immediate);
17936                         mark_bh(IMMEDIATE_BH);
17937                         return;
17938                 }
17939  
17940 -               dbg(__FUNCTION__ " - priv->wrsent=%d",priv->wrsent);
17941 -               dbg(__FUNCTION__ " - priv->wrfilled=%d",priv->wrfilled);
17942 +               dbg("%s - priv->wrsent=%d", __FUNCTION__,priv->wrsent);
17943 +               dbg("%s - priv->wrfilled=%d", __FUNCTION__,priv->wrfilled);
17944  
17945                 blksize = ((int)priv->wrbuf[2]<<8)+priv->wrbuf[1]+3;
17946  
17947                 if( (priv->wrsent>=priv->wrfilled) || (priv->wrsent>=blksize) ) {
17948 -                       dbg(__FUNCTION__ " - buffer cleaned");
17949 +                       dbg("%s - buffer cleaned", __FUNCTION__);
17950                         memset( priv->wrbuf, 0, sizeof(priv->wrbuf) );
17951                         priv->wrfilled=0;
17952                         priv->wrsent=0;
17953                 }
17954  
17955 -               up (&port->sem);
17956                 queue_task(&port->tqueue, &tq_immediate);
17957                 mark_bh(IMMEDIATE_BH);
17958                 return;
17959 diff -Nur linux-2.4.19.org/drivers/usb/serial/digi_acceleport.c linux-2.4.19/drivers/usb/serial/digi_acceleport.c
17960 --- linux-2.4.19.org/drivers/usb/serial/digi_acceleport.c       Sat Aug  3 02:39:45 2002
17961 +++ linux-2.4.19/drivers/usb/serial/digi_acceleport.c   Thu Oct 31 08:11:24 2002
17962 @@ -14,6 +14,10 @@
17963  *  Peter Berger (pberger@brimson.com)
17964  *  Al Borchers (borchers@steinerpoint.com)
17965  * 
17966 +* (12/03/2001) gkh
17967 +*      switched to using port->open_count instead of private version.
17968 +*      Removed port->active
17969 +*
17970  * (04/08/2001) gb
17971  *      Identify version on module load.
17972  *
17973 @@ -231,19 +235,16 @@
17974  
17975  #include <linux/config.h>
17976  #include <linux/kernel.h>
17977 -#include <linux/sched.h>
17978 -#include <linux/signal.h>
17979  #include <linux/errno.h>
17980 -#include <linux/poll.h>
17981  #include <linux/init.h>
17982  #include <linux/slab.h>
17983 -#include <linux/fcntl.h>
17984  #include <linux/tty.h>
17985  #include <linux/tty_driver.h>
17986  #include <linux/tty_flip.h>
17987  #include <linux/module.h>
17988  #include <linux/spinlock.h>
17989  #include <linux/tqueue.h>
17990 +#include <asm/uaccess.h>
17991  #include <linux/usb.h>
17992  
17993  #ifdef CONFIG_USB_SERIAL_DEBUG
17994 @@ -411,14 +412,14 @@
17995  
17996  /* Structures */
17997  
17998 -typedef struct digi_serial {
17999 +struct digi_serial {
18000         spinlock_t ds_serial_lock;
18001         struct usb_serial_port *ds_oob_port;    /* out-of-band port */
18002         int ds_oob_port_num;                    /* index of out-of-band port */
18003         int ds_device_started;
18004 -} digi_serial_t;
18005 +};
18006  
18007 -typedef struct digi_port {
18008 +struct digi_port {
18009         spinlock_t dp_port_lock;
18010         int dp_port_num;
18011         int dp_out_buf_len;
18012 @@ -429,7 +430,6 @@
18013         int dp_write_urb_in_use;
18014         unsigned int dp_modem_signals;
18015         wait_queue_head_t dp_modem_change_wait;
18016 -       int dp_open_count;                      /* inc on open, dec on close */
18017         int dp_transmit_idle;
18018         wait_queue_head_t dp_transmit_idle_wait;
18019         int dp_throttled;
18020 @@ -438,7 +438,7 @@
18021         int dp_in_close;                        /* close in progress */
18022         wait_queue_head_t dp_close_wait;        /* wait queue for close */
18023         struct tq_struct dp_wakeup_task;
18024 -} digi_port_t;
18025 +};
18026  
18027  
18028  /* Local Function Declarations */
18029 @@ -483,12 +483,12 @@
18030         { }                                             /* Terminating entry */
18031  };
18032  
18033 -static __devinitdata struct usb_device_id id_table_2 [] = {
18034 +static struct usb_device_id id_table_2 [] = {
18035         { USB_DEVICE(DIGI_VENDOR_ID, DIGI_2_ID) },
18036         { }                                             /* Terminating entry */
18037  };
18038  
18039 -static __devinitdata struct usb_device_id id_table_4 [] = {
18040 +static struct usb_device_id id_table_4 [] = {
18041         { USB_DEVICE(DIGI_VENDOR_ID, DIGI_4_ID) },
18042         { }                                             /* Terminating entry */
18043  };
18044 @@ -498,55 +498,51 @@
18045  /* device info needed for the Digi serial converter */
18046  
18047  static struct usb_serial_device_type digi_acceleport_2_device = {
18048 -       name:                           "Digi USB",
18049 -       id_table:                       id_table_2,
18050 -       needs_interrupt_in:             DONT_CARE,
18051 -       needs_bulk_in:                  MUST_HAVE,
18052 -       needs_bulk_out:                 MUST_HAVE,
18053 -       num_interrupt_in:               0,
18054 -       num_bulk_in:                    4,
18055 -       num_bulk_out:                   4,
18056 -       num_ports:                      3,
18057 -       open:                           digi_open,
18058 -       close:                          digi_close,
18059 -       write:                          digi_write,
18060 -       write_room:                     digi_write_room,
18061 -       write_bulk_callback:            digi_write_bulk_callback,
18062 -       read_bulk_callback:             digi_read_bulk_callback,
18063 -       chars_in_buffer:                digi_chars_in_buffer,
18064 -       throttle:                       digi_rx_throttle,
18065 -       unthrottle:                     digi_rx_unthrottle,
18066 -       ioctl:                          digi_ioctl,
18067 -       set_termios:                    digi_set_termios,
18068 -       break_ctl:                      digi_break_ctl,
18069 -       startup:                        digi_startup,
18070 -       shutdown:                       digi_shutdown,
18071 +       .owner =                        THIS_MODULE,
18072 +       .name =                         "Digi USB",
18073 +       .id_table =                     id_table_2,
18074 +       .num_interrupt_in =             0,
18075 +       .num_bulk_in =                  4,
18076 +       .num_bulk_out =                 4,
18077 +       .num_ports =                    3,
18078 +       .open =                         digi_open,
18079 +       .close =                        digi_close,
18080 +       .write =                        digi_write,
18081 +       .write_room =                   digi_write_room,
18082 +       .write_bulk_callback =          digi_write_bulk_callback,
18083 +       .read_bulk_callback =           digi_read_bulk_callback,
18084 +       .chars_in_buffer =              digi_chars_in_buffer,
18085 +       .throttle =                     digi_rx_throttle,
18086 +       .unthrottle =                   digi_rx_unthrottle,
18087 +       .ioctl =                        digi_ioctl,
18088 +       .set_termios =                  digi_set_termios,
18089 +       .break_ctl =                    digi_break_ctl,
18090 +       .startup =                      digi_startup,
18091 +       .shutdown =                     digi_shutdown,
18092  };
18093  
18094  static struct usb_serial_device_type digi_acceleport_4_device = {
18095 -       name:                           "Digi USB",
18096 -       id_table:                       id_table_4,
18097 -       needs_interrupt_in:             DONT_CARE,
18098 -       needs_bulk_in:                  MUST_HAVE,
18099 -       needs_bulk_out:                 MUST_HAVE,
18100 -       num_interrupt_in:               0,
18101 -       num_bulk_in:                    5,
18102 -       num_bulk_out:                   5,
18103 -       num_ports:                      4,
18104 -       open:                           digi_open,
18105 -       close:                          digi_close,
18106 -       write:                          digi_write,
18107 -       write_room:                     digi_write_room,
18108 -       write_bulk_callback:            digi_write_bulk_callback,
18109 -       read_bulk_callback:             digi_read_bulk_callback,
18110 -       chars_in_buffer:                digi_chars_in_buffer,
18111 -       throttle:                       digi_rx_throttle,
18112 -       unthrottle:                     digi_rx_unthrottle,
18113 -       ioctl:                          digi_ioctl,
18114 -       set_termios:                    digi_set_termios,
18115 -       break_ctl:                      digi_break_ctl,
18116 -       startup:                        digi_startup,
18117 -       shutdown:                       digi_shutdown,
18118 +       .owner =                        THIS_MODULE,
18119 +       .name =                         "Digi USB",
18120 +       .id_table =                     id_table_4,
18121 +       .num_interrupt_in =             0,
18122 +       .num_bulk_in =                  5,
18123 +       .num_bulk_out =                 5,
18124 +       .num_ports =                    4,
18125 +       .open =                         digi_open,
18126 +       .close =                        digi_close,
18127 +       .write =                        digi_write,
18128 +       .write_room =                   digi_write_room,
18129 +       .write_bulk_callback =          digi_write_bulk_callback,
18130 +       .read_bulk_callback =           digi_read_bulk_callback,
18131 +       .chars_in_buffer =              digi_chars_in_buffer,
18132 +       .throttle =                     digi_rx_throttle,
18133 +       .unthrottle =                   digi_rx_unthrottle,
18134 +       .ioctl =                        digi_ioctl,
18135 +       .set_termios =                  digi_set_termios,
18136 +       .break_ctl =                    digi_break_ctl,
18137 +       .startup =                      digi_startup,
18138 +       .shutdown =                     digi_shutdown,
18139  };
18140  
18141  
18142 @@ -600,13 +596,12 @@
18143  {
18144  
18145         unsigned long flags;
18146 -       digi_port_t *priv = (digi_port_t *)(port->private);
18147 +       struct digi_port *priv = (struct digi_port *)(port->private);
18148  
18149  
18150         spin_lock_irqsave( &priv->dp_port_lock, flags );
18151         digi_wakeup_write( port );
18152         spin_unlock_irqrestore( &priv->dp_port_lock, flags );
18153 -       MOD_DEC_USE_COUNT;
18154  }
18155  
18156  static void digi_wakeup_write( struct usb_serial_port *port )
18157 @@ -647,8 +642,8 @@
18158  
18159         int ret = 0;
18160         int len;
18161 -       struct usb_serial_port *oob_port = (struct usb_serial_port *)((digi_serial_t *)port->serial->private)->ds_oob_port;
18162 -       digi_port_t *oob_priv = (digi_port_t *)oob_port->private;
18163 +       struct usb_serial_port *oob_port = (struct usb_serial_port *)((struct digi_serial *)port->serial->private)->ds_oob_port;
18164 +       struct digi_port *oob_priv = (struct digi_port *)oob_port->private;
18165         unsigned long flags = 0;
18166  
18167  
18168 @@ -689,7 +684,7 @@
18169         spin_unlock_irqrestore( &oob_priv->dp_port_lock, flags );
18170  
18171         if( ret ) {
18172 -               err( __FUNCTION__ ": usb_submit_urb failed, ret=%d",
18173 +               err("%s: usb_submit_urb failed, ret=%d", __FUNCTION__,
18174                         ret );
18175         }
18176  
18177 @@ -716,7 +711,7 @@
18178  
18179         int ret = 0;
18180         int len;
18181 -       digi_port_t *priv = (digi_port_t *)(port->private);
18182 +       struct digi_port *priv = (struct digi_port *)(port->private);
18183         unsigned char *data = port->write_urb->transfer_buffer;
18184         unsigned long flags = 0;
18185  
18186 @@ -778,7 +773,7 @@
18187         spin_unlock_irqrestore( &priv->dp_port_lock, flags );
18188  
18189         if( ret ) {
18190 -               err( __FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d",
18191 +               err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__,
18192                 ret, priv->dp_port_num );
18193         }
18194  
18195 @@ -802,9 +797,9 @@
18196  {
18197  
18198         int ret;
18199 -       digi_port_t *port_priv = (digi_port_t *)port->private;
18200 -       struct usb_serial_port *oob_port = (struct usb_serial_port *)((digi_serial_t *)port->serial->private)->ds_oob_port;
18201 -       digi_port_t *oob_priv = (digi_port_t *)oob_port->private;
18202 +       struct digi_port *port_priv = (struct digi_port *)port->private;
18203 +       struct usb_serial_port *oob_port = (struct usb_serial_port *)((struct digi_serial *)port->serial->private)->ds_oob_port;
18204 +       struct digi_port *oob_priv = (struct digi_port *)oob_port->private;
18205         unsigned char *data = oob_port->write_urb->transfer_buffer;
18206         unsigned long flags = 0;
18207  
18208 @@ -854,7 +849,7 @@
18209         spin_unlock_irqrestore( &oob_priv->dp_port_lock, flags );
18210  
18211         if( ret ) {
18212 -               err( __FUNCTION__ ": usb_submit_urb failed, ret=%d",
18213 +               err("%s: usb_submit_urb failed, ret=%d", __FUNCTION__,
18214                 ret );
18215         }
18216  
18217 @@ -881,7 +876,7 @@
18218  
18219         int ret;
18220         unsigned char buf[2];
18221 -       digi_port_t *priv = (digi_port_t *)(port->private);
18222 +       struct digi_port *priv = (struct digi_port *)(port->private);
18223         unsigned long flags = 0;
18224  
18225  
18226 @@ -921,7 +916,7 @@
18227  {
18228  
18229         unsigned long flags;
18230 -       digi_port_t *priv = (digi_port_t *)(port->private);
18231 +       struct digi_port *priv = (struct digi_port *)(port->private);
18232  
18233  
18234  dbg( "digi_rx_throttle: TOP: port=%d", priv->dp_port_num );
18235 @@ -942,7 +937,7 @@
18236         int ret = 0;
18237         int len;
18238         unsigned long flags;
18239 -       digi_port_t *priv = (digi_port_t *)(port->private);
18240 +       struct digi_port *priv = (struct digi_port *)(port->private);
18241         struct tty_struct *tty = port->tty;
18242  
18243  
18244 @@ -975,7 +970,7 @@
18245         spin_unlock_irqrestore( &priv->dp_port_lock, flags );
18246  
18247         if( ret ) {
18248 -               err( __FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d",
18249 +               err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__,
18250                         ret, priv->dp_port_num );
18251         }
18252  
18253 @@ -986,7 +981,7 @@
18254         struct termios *old_termios )
18255  {
18256  
18257 -       digi_port_t *priv = (digi_port_t *)(port->private);
18258 +       struct digi_port *priv = (struct digi_port *)(port->private);
18259         unsigned int iflag = port->tty->termios->c_iflag;
18260         unsigned int cflag = port->tty->termios->c_cflag;
18261         unsigned int old_iflag = old_termios->c_iflag;
18262 @@ -1210,7 +1205,7 @@
18263         unsigned int cmd, unsigned long arg )
18264  {
18265  
18266 -       digi_port_t *priv = (digi_port_t *)(port->private);
18267 +       struct digi_port *priv = (struct digi_port *)(port->private);
18268         unsigned int val;
18269         unsigned long flags = 0;
18270  
18271 @@ -1262,7 +1257,7 @@
18272  {
18273  
18274         int ret,data_len,new_len;
18275 -       digi_port_t *priv = (digi_port_t *)(port->private);
18276 +       struct digi_port *priv = (struct digi_port *)(port->private);
18277         unsigned char *data = port->write_urb->transfer_buffer;
18278         unsigned char user_buf[64];     /* 64 bytes is max USB bulk packet */
18279         unsigned long flags = 0;
18280 @@ -1334,7 +1329,7 @@
18281         /* return length of new data written, or error */
18282         spin_unlock_irqrestore( &priv->dp_port_lock, flags );
18283         if( ret < 0 ) {
18284 -               err( __FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d",
18285 +               err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__,
18286                         ret, priv->dp_port_num );
18287         }
18288  
18289 @@ -1349,27 +1344,27 @@
18290  
18291         struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
18292         struct usb_serial *serial;
18293 -       digi_port_t *priv;
18294 +       struct digi_port *priv;
18295         int ret = 0;
18296  
18297  
18298  dbg( "digi_write_bulk_callback: TOP, urb->status=%d", urb->status );
18299  
18300         /* port and serial sanity check */
18301 -       if( port == NULL || (priv=(digi_port_t *)(port->private)) == NULL ) {
18302 -               err( __FUNCTION__ ": port or port->private is NULL, status=%d",
18303 +       if( port == NULL || (priv=(struct digi_port *)(port->private)) == NULL ) {
18304 +               err("%s: port or port->private is NULL, status=%d", __FUNCTION__,
18305                         urb->status );
18306                 return;
18307         }
18308         serial = port->serial;
18309         if( serial == NULL || serial->private == NULL ) {
18310 -               err( __FUNCTION__ ": serial or serial->private is NULL, status=%d", urb->status );
18311 +               err("%s: serial or serial->private is NULL, status=%d", __FUNCTION__, urb->status );
18312                 return;
18313         }
18314  
18315         /* handle oob callback */
18316         if( priv->dp_port_num
18317 -       == ((digi_serial_t *)(serial->private))->ds_oob_port_num ) {
18318 +       == ((struct digi_serial *)(serial->private))->ds_oob_port_num ) {
18319                 dbg( "digi_write_bulk_callback: oob callback" );
18320                 spin_lock( &priv->dp_port_lock );
18321                 priv->dp_write_urb_in_use = 0;
18322 @@ -1386,7 +1381,7 @@
18323         /* try to send any buffered data on this port, if it is open */
18324         spin_lock( &priv->dp_port_lock );
18325         priv->dp_write_urb_in_use = 0;
18326 -       if( priv->dp_open_count && port->write_urb->status != -EINPROGRESS
18327 +       if( port->open_count && port->write_urb->status != -EINPROGRESS
18328         && priv->dp_out_buf_len > 0 ) {
18329  
18330                 *((unsigned char *)(port->write_urb->transfer_buffer))
18331 @@ -1413,14 +1408,12 @@
18332  
18333         /* also queue up a wakeup at scheduler time, in case we */
18334         /* lost the race in write_chan(). */
18335 -       MOD_INC_USE_COUNT;
18336 -       if (schedule_task(&priv->dp_wakeup_task) == 0)
18337 -               MOD_DEC_USE_COUNT;
18338 +       schedule_task(&priv->dp_wakeup_task);
18339  
18340         spin_unlock( &priv->dp_port_lock );
18341  
18342         if( ret ) {
18343 -               err( __FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d",
18344 +               err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__,
18345                         ret, priv->dp_port_num );
18346         }
18347  
18348 @@ -1431,7 +1424,7 @@
18349  {
18350  
18351         int room;
18352 -       digi_port_t *priv = (digi_port_t *)(port->private);
18353 +       struct digi_port *priv = (struct digi_port *)(port->private);
18354         unsigned long flags = 0;
18355  
18356  
18357 @@ -1454,7 +1447,7 @@
18358  static int digi_chars_in_buffer( struct usb_serial_port *port )
18359  {
18360  
18361 -       digi_port_t *priv = (digi_port_t *)(port->private);
18362 +       struct digi_port *priv = (struct digi_port *)(port->private);
18363  
18364  
18365         if( port->write_urb->status == -EINPROGRESS
18366 @@ -1475,12 +1468,12 @@
18367  
18368         int ret;
18369         unsigned char buf[32];
18370 -       digi_port_t *priv = (digi_port_t *)(port->private);
18371 +       struct digi_port *priv = (struct digi_port *)(port->private);
18372         struct termios not_termios;
18373         unsigned long flags = 0;
18374  
18375  
18376 -dbg( "digi_open: TOP: port=%d, active=%d, open_count=%d", priv->dp_port_num, port->active, priv->dp_open_count );
18377 +dbg( "digi_open: TOP: port=%d, open_count=%d", priv->dp_port_num, port->open_count );
18378  
18379         /* be sure the device is started up */
18380         if( digi_startup_device( port->serial ) != 0 )
18381 @@ -1494,32 +1487,17 @@
18382                 return( -EAGAIN );
18383         }
18384  
18385 -       /* inc module use count before sleeping to wait for closes */
18386 -       ++priv->dp_open_count;
18387 -       MOD_INC_USE_COUNT;
18388 -
18389         /* wait for a close in progress to finish */
18390         while( priv->dp_in_close ) {
18391                 cond_wait_interruptible_timeout_irqrestore(
18392                         &priv->dp_close_wait, DIGI_RETRY_TIMEOUT,
18393                         &priv->dp_port_lock, flags );
18394                 if( signal_pending(current) ) {
18395 -                       --priv->dp_open_count;
18396 -                       MOD_DEC_USE_COUNT;
18397                         return( -EINTR );
18398                 }
18399                 spin_lock_irqsave( &priv->dp_port_lock, flags );
18400         }
18401  
18402 -       /* if port is already open, just return */
18403 -       /* be sure exactly one open proceeds */
18404 -       if( port->active ) {
18405 -               spin_unlock_irqrestore( &priv->dp_port_lock, flags );
18406 -               return( 0 );
18407 -       }
18408 -
18409 -       /* first open, mark port as active */
18410 -       port->active = 1;
18411         spin_unlock_irqrestore( &priv->dp_port_lock, flags );
18412   
18413         /* read modem signals automatically whenever they change */
18414 @@ -1556,24 +1534,15 @@
18415         int ret;
18416         unsigned char buf[32];
18417         struct tty_struct *tty = port->tty;
18418 -       digi_port_t *priv = (digi_port_t *)port->private;
18419 +       struct digi_port *priv = (struct digi_port *)port->private;
18420         unsigned long flags = 0;
18421  
18422  
18423 -dbg( "digi_close: TOP: port=%d, active=%d, open_count=%d", priv->dp_port_num, port->active, priv->dp_open_count );
18424 +dbg( "digi_close: TOP: port=%d, open_count=%d", priv->dp_port_num, port->open_count );
18425  
18426  
18427         /* do cleanup only after final close on this port */
18428         spin_lock_irqsave( &priv->dp_port_lock, flags );
18429 -       if( priv->dp_open_count > 1 ) {
18430 -               --priv->dp_open_count;
18431 -               MOD_DEC_USE_COUNT;
18432 -               spin_unlock_irqrestore( &priv->dp_port_lock, flags );
18433 -               return;
18434 -       } else if( priv->dp_open_count <= 0 ) {
18435 -               spin_unlock_irqrestore( &priv->dp_port_lock, flags );
18436 -               return;
18437 -       }
18438         priv->dp_in_close = 1;
18439         spin_unlock_irqrestore( &priv->dp_port_lock, flags );
18440  
18441 @@ -1644,11 +1613,8 @@
18442         tty->closing = 0;
18443  
18444         spin_lock_irqsave( &priv->dp_port_lock, flags );
18445 -       port->active = 0;
18446         priv->dp_write_urb_in_use = 0;
18447         priv->dp_in_close = 0;
18448 -       --priv->dp_open_count;
18449 -       MOD_DEC_USE_COUNT;
18450         wake_up_interruptible( &priv->dp_close_wait );
18451         spin_unlock_irqrestore( &priv->dp_port_lock, flags );
18452  
18453 @@ -1667,7 +1633,7 @@
18454  {
18455  
18456         int i,ret = 0;
18457 -       digi_serial_t *serial_priv = (digi_serial_t *)serial->private;
18458 +       struct digi_serial *serial_priv = (struct digi_serial *)serial->private;
18459         struct usb_serial_port *port;
18460  
18461  
18462 @@ -1689,8 +1655,7 @@
18463                 port->write_urb->dev = port->serial->dev;
18464  
18465                 if( (ret=usb_submit_urb(port->read_urb)) != 0 ) {
18466 -                       err(
18467 -                       __FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d",
18468 +                       err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__,
18469                         ret, i );
18470                         break;
18471                 }
18472 @@ -1706,8 +1671,8 @@
18473  {
18474  
18475         int i;
18476 -       digi_port_t *priv;
18477 -       digi_serial_t *serial_priv;
18478 +       struct digi_port *priv;
18479 +       struct digi_serial *serial_priv;
18480  
18481  
18482  dbg( "digi_startup: TOP" );
18483 @@ -1716,13 +1681,11 @@
18484         /* number of regular ports + 1 for the out-of-band port */
18485         for( i=0; i<serial->type->num_ports+1; i++ ) {
18486  
18487 -               serial->port[i].active = 0;
18488 -
18489                 /* allocate port private structure */
18490                 priv = serial->port[i].private =
18491 -                       (digi_port_t *)kmalloc( sizeof(digi_port_t),
18492 +                       (struct digi_port *)kmalloc( sizeof(struct digi_port),
18493                         GFP_KERNEL );
18494 -               if( priv == (digi_port_t *)0 ) {
18495 +               if( priv == (struct digi_port *)0 ) {
18496                         while( --i >= 0 )
18497                                 kfree( serial->port[i].private );
18498                         return( 1 );                    /* error */
18499 @@ -1736,7 +1699,6 @@
18500                 priv->dp_write_urb_in_use = 0;
18501                 priv->dp_modem_signals = 0;
18502                 init_waitqueue_head( &priv->dp_modem_change_wait );
18503 -               priv->dp_open_count = 0;
18504                 priv->dp_transmit_idle = 0;
18505                 init_waitqueue_head( &priv->dp_transmit_idle_wait );
18506                 priv->dp_throttled = 0;
18507 @@ -1756,9 +1718,9 @@
18508  
18509         /* allocate serial private structure */
18510         serial_priv = serial->private =
18511 -               (digi_serial_t *)kmalloc( sizeof(digi_serial_t),
18512 +               (struct digi_serial *)kmalloc( sizeof(struct digi_serial),
18513                 GFP_KERNEL );
18514 -       if( serial_priv == (digi_serial_t *)0 ) {
18515 +       if( serial_priv == (struct digi_serial *)0 ) {
18516                 for( i=0; i<serial->type->num_ports+1; i++ )
18517                         kfree( serial->port[i].private );
18518                 return( 1 );                    /* error */
18519 @@ -1779,8 +1741,6 @@
18520  {
18521  
18522         int i;
18523 -       digi_port_t *priv;
18524 -       unsigned long flags;
18525  
18526  
18527  dbg( "digi_shutdown: TOP, in_interrupt()=%d", in_interrupt() );
18528 @@ -1791,17 +1751,6 @@
18529                 usb_unlink_urb( serial->port[i].write_urb );
18530         }
18531  
18532 -       /* dec module use count */
18533 -       for( i=0; i<serial->type->num_ports; i++ ) {
18534 -               priv = serial->port[i].private;
18535 -               spin_lock_irqsave( &priv->dp_port_lock, flags );
18536 -               while( priv->dp_open_count > 0 ) {
18537 -                       MOD_DEC_USE_COUNT;
18538 -                       --priv->dp_open_count;
18539 -               }
18540 -               spin_unlock_irqrestore( &priv->dp_port_lock, flags );
18541 -       }
18542 -
18543         /* free the private data structures for all ports */
18544         /* number of regular ports + 1 for the out-of-band port */
18545         for( i=0; i<serial->type->num_ports+1; i++ )
18546 @@ -1815,34 +1764,34 @@
18547  {
18548  
18549         struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
18550 -       digi_port_t *priv;
18551 +       struct digi_port *priv;
18552         int ret;
18553  
18554  
18555  dbg( "digi_read_bulk_callback: TOP" );
18556  
18557         /* port sanity check, do not resubmit if port is not valid */
18558 -       if( port == NULL || (priv=(digi_port_t *)(port->private)) == NULL ) {
18559 -               err( __FUNCTION__ ": port or port->private is NULL, status=%d",
18560 +       if( port == NULL || (priv=(struct digi_port *)(port->private)) == NULL ) {
18561 +               err("%s: port or port->private is NULL, status=%d", __FUNCTION__,
18562                         urb->status );
18563                 return;
18564         }
18565         if( port->serial == NULL
18566         || serial_paranoia_check( port->serial, __FUNCTION__ )
18567         || port->serial->private == NULL ) {
18568 -               err( __FUNCTION__ ": serial is bad or serial->private is NULL, status=%d", urb->status );
18569 +               err("%s: serial is bad or serial->private is NULL, status=%d", __FUNCTION__, urb->status );
18570                 return;
18571         }
18572  
18573         /* do not resubmit urb if it has any status error */
18574         if( urb->status ) {
18575 -               err( __FUNCTION__ ": nonzero read bulk status: status=%d, port=%d", urb->status, priv->dp_port_num );
18576 +               err("%s: nonzero read bulk status: status=%d, port=%d", __FUNCTION__, urb->status, priv->dp_port_num );
18577                 return;
18578         }
18579  
18580         /* handle oob or inb callback, do not resubmit if error */
18581         if( priv->dp_port_num
18582 -       == ((digi_serial_t *)(port->serial->private))->ds_oob_port_num ) {
18583 +       == ((struct digi_serial *)(port->serial->private))->ds_oob_port_num ) {
18584                 if( digi_read_oob_callback( urb ) != 0 )
18585                         return;
18586         } else {
18587 @@ -1853,7 +1802,7 @@
18588         /* continue read */
18589         urb->dev = port->serial->dev;
18590         if( (ret=usb_submit_urb(urb)) != 0 ) {
18591 -               err( __FUNCTION__ ": failed resubmitting urb, ret=%d, port=%d",
18592 +               err("%s: failed resubmitting urb, ret=%d, port=%d", __FUNCTION__,
18593                         ret, priv->dp_port_num );
18594         }
18595  
18596 @@ -1875,7 +1824,7 @@
18597  
18598         struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
18599         struct tty_struct *tty = port->tty;
18600 -       digi_port_t *priv = (digi_port_t *)(port->private);
18601 +       struct digi_port *priv = (struct digi_port *)(port->private);
18602         int opcode = ((unsigned char *)urb->transfer_buffer)[0];
18603         int len = ((unsigned char *)urb->transfer_buffer)[1];
18604         int status = ((unsigned char *)urb->transfer_buffer)[2];
18605 @@ -1889,12 +1838,12 @@
18606  
18607         /* do not process callbacks on closed ports */
18608         /* but do continue the read chain */
18609 -       if( priv->dp_open_count == 0 )
18610 +       if( port->open_count == 0 )
18611                 return( 0 );
18612  
18613         /* short/multiple packet check */
18614         if( urb->actual_length != len + 2 ) {
18615 -               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 );
18616 +               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 );
18617                 return( -1 );
18618         }
18619  
18620 @@ -1963,9 +1912,9 @@
18621         spin_unlock( &priv->dp_port_lock );
18622  
18623         if( opcode == DIGI_CMD_RECEIVE_DISABLE ) {
18624 -               dbg( __FUNCTION__ ": got RECEIVE_DISABLE" );
18625 +               dbg("%s: got RECEIVE_DISABLE", __FUNCTION__ );
18626         } else if( opcode != DIGI_CMD_RECEIVE_DATA ) {
18627 -               dbg( __FUNCTION__ ": unknown opcode: %d", opcode );
18628 +               dbg("%s: unknown opcode: %d", __FUNCTION__, opcode );
18629         }
18630  
18631         return( throttled ? 1 : 0 );
18632 @@ -1987,7 +1936,7 @@
18633  
18634         struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
18635         struct usb_serial *serial = port->serial;
18636 -       digi_port_t *priv = (digi_port_t *)(port->private);
18637 +       struct digi_port *priv = (struct digi_port *)(port->private);
18638         int opcode, line, status, val;
18639         int i;
18640  
18641 @@ -2023,7 +1972,7 @@
18642                         if( val & DIGI_READ_INPUT_SIGNALS_CTS ) {
18643                                 priv->dp_modem_signals |= TIOCM_CTS;
18644                                 /* port must be open to use tty struct */
18645 -                               if( priv->dp_open_count
18646 +                               if( port->open_count
18647                                 && port->tty->termios->c_cflag & CRTSCTS ) {
18648                                         port->tty->hw_stopped = 0;
18649                                         digi_wakeup_write( port );
18650 @@ -2031,7 +1980,7 @@
18651                         } else {
18652                                 priv->dp_modem_signals &= ~TIOCM_CTS;
18653                                 /* port must be open to use tty struct */
18654 -                               if( priv->dp_open_count
18655 +                               if( port->open_count
18656                                 && port->tty->termios->c_cflag & CRTSCTS ) {
18657                                         port->tty->hw_stopped = 1;
18658                                 }
18659 diff -Nur linux-2.4.19.org/drivers/usb/serial/empeg.c linux-2.4.19/drivers/usb/serial/empeg.c
18660 --- linux-2.4.19.org/drivers/usb/serial/empeg.c Fri Dec 21 18:41:55 2001
18661 +++ linux-2.4.19/drivers/usb/serial/empeg.c     Thu Oct 31 08:11:24 2002
18662 @@ -53,18 +53,15 @@
18663  
18664  #include <linux/config.h>
18665  #include <linux/kernel.h>
18666 -#include <linux/sched.h>
18667 -#include <linux/signal.h>
18668  #include <linux/errno.h>
18669 -#include <linux/poll.h>
18670  #include <linux/init.h>
18671  #include <linux/slab.h>
18672 -#include <linux/fcntl.h>
18673  #include <linux/tty.h>
18674  #include <linux/tty_driver.h>
18675  #include <linux/tty_flip.h>
18676  #include <linux/module.h>
18677  #include <linux/spinlock.h>
18678 +#include <asm/uaccess.h>
18679  #include <linux/usb.h>
18680  
18681  #ifdef CONFIG_USB_SERIAL_DEBUG
18682 @@ -106,7 +103,7 @@
18683  static void empeg_write_bulk_callback  (struct urb *urb);
18684  static void empeg_read_bulk_callback   (struct urb *urb);
18685  
18686 -static __devinitdata struct usb_device_id id_table [] = {
18687 +static struct usb_device_id id_table [] = {
18688         { USB_DEVICE(EMPEG_VENDOR_ID, EMPEG_PRODUCT_ID) },
18689         { }                                     /* Terminating entry */
18690  };
18691 @@ -114,28 +111,26 @@
18692  MODULE_DEVICE_TABLE (usb, id_table);
18693  
18694  static struct usb_serial_device_type empeg_device = {
18695 -       name:                   "Empeg",
18696 -       id_table:               id_table,
18697 -       needs_interrupt_in:     MUST_HAVE_NOT,  /* must not have an interrupt in endpoint */
18698 -       needs_bulk_in:          MUST_HAVE,      /* must have a bulk in endpoint */
18699 -       needs_bulk_out:         MUST_HAVE,      /* must have a bulk out endpoint */
18700 -       num_interrupt_in:       0,
18701 -       num_bulk_in:            1,
18702 -       num_bulk_out:           1,
18703 -       num_ports:              1,
18704 -       open:                   empeg_open,
18705 -       close:                  empeg_close,
18706 -       throttle:               empeg_throttle,
18707 -       unthrottle:             empeg_unthrottle,
18708 -       startup:                empeg_startup,
18709 -       shutdown:               empeg_shutdown,
18710 -       ioctl:                  empeg_ioctl,
18711 -       set_termios:            empeg_set_termios,
18712 -       write:                  empeg_write,
18713 -       write_room:             empeg_write_room,
18714 -       chars_in_buffer:        empeg_chars_in_buffer,
18715 -       write_bulk_callback:    empeg_write_bulk_callback,
18716 -       read_bulk_callback:     empeg_read_bulk_callback,
18717 +       .owner =                THIS_MODULE,
18718 +       .name =                 "Empeg",
18719 +       .id_table =             id_table,
18720 +       .num_interrupt_in =     0,
18721 +       .num_bulk_in =          1,
18722 +       .num_bulk_out =         1,
18723 +       .num_ports =            1,
18724 +       .open =                 empeg_open,
18725 +       .close =                empeg_close,
18726 +       .throttle =             empeg_throttle,
18727 +       .unthrottle =           empeg_unthrottle,
18728 +       .startup =              empeg_startup,
18729 +       .shutdown =             empeg_shutdown,
18730 +       .ioctl =                empeg_ioctl,
18731 +       .set_termios =          empeg_set_termios,
18732 +       .write =                empeg_write,
18733 +       .write_room =           empeg_write_room,
18734 +       .chars_in_buffer =      empeg_chars_in_buffer,
18735 +       .write_bulk_callback =  empeg_write_bulk_callback,
18736 +       .read_bulk_callback =   empeg_read_bulk_callback,
18737  };
18738  
18739  #define NUM_URBS                       16
18740 @@ -157,43 +152,31 @@
18741         if (port_paranoia_check (port, __FUNCTION__))
18742                 return -ENODEV;
18743  
18744 -       dbg(__FUNCTION__ " - port %d", port->number);
18745 +       dbg("%s - port %d", __FUNCTION__, port->number);
18746  
18747 -       down (&port->sem);
18748 +       /* Force default termio settings */
18749 +       empeg_set_termios (port, NULL) ;
18750  
18751 -       ++port->open_count;
18752 -       MOD_INC_USE_COUNT;
18753 +       bytes_in = 0;
18754 +       bytes_out = 0;
18755  
18756 -       if (!port->active) {
18757 -
18758 -               /* Force default termio settings */
18759 -               empeg_set_termios (port, NULL) ;
18760 -
18761 -               port->active = 1;
18762 -               bytes_in = 0;
18763 -               bytes_out = 0;
18764 -
18765 -               /* Start reading from the device */
18766 -               FILL_BULK_URB(
18767 -                       port->read_urb,
18768 -                       serial->dev, 
18769 -                       usb_rcvbulkpipe(serial->dev,
18770 -                               port->bulk_in_endpointAddress),
18771 -                       port->read_urb->transfer_buffer,
18772 -                       port->read_urb->transfer_buffer_length,
18773 -                       empeg_read_bulk_callback,
18774 -                       port);
18775 -
18776 -               port->read_urb->transfer_flags |= USB_QUEUE_BULK;
18777 -
18778 -               result = usb_submit_urb(port->read_urb);
18779 +       /* Start reading from the device */
18780 +       FILL_BULK_URB(
18781 +               port->read_urb,
18782 +               serial->dev, 
18783 +               usb_rcvbulkpipe(serial->dev,
18784 +                       port->bulk_in_endpointAddress),
18785 +               port->read_urb->transfer_buffer,
18786 +               port->read_urb->transfer_buffer_length,
18787 +               empeg_read_bulk_callback,
18788 +               port);
18789  
18790 -               if (result)
18791 -                       err(__FUNCTION__ " - failed submitting read urb, error %d", result);
18792 +       port->read_urb->transfer_flags |= USB_QUEUE_BULK;
18793  
18794 -       }
18795 +       result = usb_submit_urb(port->read_urb);
18796  
18797 -       up (&port->sem);
18798 +       if (result)
18799 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
18800  
18801         return result;
18802  }
18803 @@ -206,31 +189,18 @@
18804         if (port_paranoia_check (port, __FUNCTION__))
18805                 return;
18806  
18807 -       dbg(__FUNCTION__ " - port %d", port->number);
18808 +       dbg("%s - port %d", __FUNCTION__, port->number);
18809  
18810         serial = get_usb_serial (port, __FUNCTION__);
18811         if (!serial)
18812                 return;
18813  
18814 -       down (&port->sem);
18815 -
18816 -       --port->open_count;
18817 -
18818 -       if (port->open_count <= 0) {
18819 -               if (serial->dev) {
18820 -                       /* shutdown our bulk read */
18821 -                       usb_unlink_urb (port->read_urb);
18822 -               }
18823 -               port->active = 0;
18824 -               port->open_count = 0;
18825 +       if (serial->dev) {
18826 +               /* shutdown our bulk read */
18827 +               usb_unlink_urb (port->read_urb);
18828         }
18829 -
18830 -       up (&port->sem);
18831 -
18832         /* Uncomment the following line if you want to see some statistics in your syslog */
18833         /* info ("Bytes In = %d  Bytes Out = %d", bytes_in, bytes_out); */
18834 -
18835 -       MOD_DEC_USE_COUNT;
18836  }
18837  
18838  
18839 @@ -245,7 +215,7 @@
18840         int bytes_sent = 0;
18841         int transfer_size;
18842  
18843 -       dbg(__FUNCTION__ " - port %d", port->number);
18844 +       dbg("%s - port %d", __FUNCTION__, port->number);
18845  
18846         usb_serial_debug_data (__FILE__, __FUNCTION__, count, buf);
18847  
18848 @@ -266,14 +236,14 @@
18849                 spin_unlock_irqrestore (&write_urb_pool_lock, flags);
18850  
18851                 if (urb == NULL) {
18852 -                       dbg (__FUNCTION__ " - no more free urbs");
18853 +                       dbg("%s - no more free urbs", __FUNCTION__);
18854                         goto exit;
18855                 }
18856  
18857                 if (urb->transfer_buffer == NULL) {
18858 -                       urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
18859 +                       urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);
18860                         if (urb->transfer_buffer == NULL) {
18861 -                               err(__FUNCTION__" no more kernel memory...");
18862 +                               err("%s no more kernel memory...", __FUNCTION__);
18863                                 goto exit;
18864                         }
18865                 }
18866 @@ -305,7 +275,7 @@
18867                 /* send it down the pipe */
18868                 status = usb_submit_urb(urb);
18869                 if (status) {
18870 -                       err(__FUNCTION__ " - usb_submit_urb(write bulk) failed with status = %d", status);
18871 +                       err("%s - usb_submit_urb(write bulk) failed with status = %d", __FUNCTION__, status);
18872                         bytes_sent = status;
18873                         break;
18874                 }
18875 @@ -329,7 +299,7 @@
18876         int i;
18877         int room = 0;
18878  
18879 -       dbg(__FUNCTION__ " - port %d", port->number);
18880 +       dbg("%s - port %d", __FUNCTION__, port->number);
18881  
18882         spin_lock_irqsave (&write_urb_pool_lock, flags);
18883  
18884 @@ -342,7 +312,7 @@
18885  
18886         spin_unlock_irqrestore (&write_urb_pool_lock, flags);
18887  
18888 -       dbg(__FUNCTION__ " - returns %d", room);
18889 +       dbg("%s - returns %d", __FUNCTION__, room);
18890  
18891         return (room);
18892  
18893 @@ -355,7 +325,7 @@
18894         int i;
18895         int chars = 0;
18896  
18897 -       dbg(__FUNCTION__ " - port %d", port->number);
18898 +       dbg("%s - port %d", __FUNCTION__, port->number);
18899  
18900         spin_lock_irqsave (&write_urb_pool_lock, flags);
18901  
18902 @@ -368,7 +338,7 @@
18903  
18904         spin_unlock_irqrestore (&write_urb_pool_lock, flags);
18905  
18906 -       dbg (__FUNCTION__ " - returns %d", chars);
18907 +       dbg("%s - returns %d", __FUNCTION__, chars);
18908  
18909         return (chars);
18910  
18911 @@ -382,10 +352,10 @@
18912         if (port_paranoia_check (port, __FUNCTION__))
18913                 return;
18914  
18915 -       dbg(__FUNCTION__ " - port %d", port->number);
18916 +       dbg("%s - port %d", __FUNCTION__, port->number);
18917  
18918         if (urb->status) {
18919 -               dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
18920 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
18921                 return;
18922         }
18923  
18924 @@ -409,15 +379,15 @@
18925         if (port_paranoia_check (port, __FUNCTION__))
18926                 return;
18927  
18928 -       dbg(__FUNCTION__ " - port %d", port->number);
18929 +       dbg("%s - port %d", __FUNCTION__, port->number);
18930  
18931         if (!serial) {
18932 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
18933 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
18934                 return;
18935         }
18936  
18937         if (urb->status) {
18938 -               dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
18939 +               dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
18940                 return;
18941         }
18942  
18943 @@ -459,7 +429,7 @@
18944         result = usb_submit_urb(port->read_urb);
18945  
18946         if (result)
18947 -               err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
18948 +               err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
18949  
18950         return;
18951  
18952 @@ -468,16 +438,8 @@
18953  
18954  static void empeg_throttle (struct usb_serial_port *port)
18955  {
18956 -       dbg(__FUNCTION__ " - port %d", port->number);
18957 -
18958 -       down (&port->sem);
18959 -
18960 +       dbg("%s - port %d", __FUNCTION__, port->number);
18961         usb_unlink_urb (port->read_urb);
18962 -
18963 -       up (&port->sem);
18964 -
18965 -       return;
18966 -
18967  }
18968  
18969  
18970 @@ -485,30 +447,25 @@
18971  {
18972         int result;
18973  
18974 -       dbg(__FUNCTION__ " - port %d", port->number);
18975 -
18976 -       down (&port->sem);
18977 +       dbg("%s - port %d", __FUNCTION__, port->number);
18978  
18979         port->read_urb->dev = port->serial->dev;
18980  
18981         result = usb_submit_urb(port->read_urb);
18982  
18983         if (result)
18984 -               err(__FUNCTION__ " - failed submitting read urb, error %d", result);
18985 -
18986 -       up (&port->sem);
18987 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
18988  
18989         return;
18990 -
18991  }
18992  
18993  
18994  static int  empeg_startup (struct usb_serial *serial)
18995  {
18996  
18997 -       dbg(__FUNCTION__);
18998 +       dbg("%s", __FUNCTION__);
18999  
19000 -       dbg(__FUNCTION__ " - Set config to 1");
19001 +       dbg("%s - Set config to 1", __FUNCTION__);
19002         usb_set_configuration (serial->dev, 1);
19003  
19004         /* continue on with initialization */
19005 @@ -519,23 +476,13 @@
19006  
19007  static void empeg_shutdown (struct usb_serial *serial)
19008  {
19009 -       int i;
19010 -
19011 -       dbg (__FUNCTION__);
19012 -
19013 -       /* stop reads and writes on all ports */
19014 -       for (i=0; i < serial->num_ports; ++i) {
19015 -               while (serial->port[i].open_count > 0) {
19016 -                       empeg_close (&serial->port[i], NULL);
19017 -               }
19018 -       }
19019 -
19020 +       dbg ("%s", __FUNCTION__);
19021  }
19022  
19023  
19024  static int empeg_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
19025  {
19026 -       dbg(__FUNCTION__ " - port %d, cmd 0x%.4x", port->number, cmd);
19027 +       dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
19028  
19029         return -ENOIOCTLCMD;
19030  }
19031 @@ -544,10 +491,10 @@
19032  static void empeg_set_termios (struct usb_serial_port *port, struct termios *old_termios)
19033  {
19034  
19035 -       dbg(__FUNCTION__ " - port %d", port->number);
19036 +       dbg("%s - port %d", __FUNCTION__, port->number);
19037  
19038         if ((!port->tty) || (!port->tty->termios)) {
19039 -               dbg(__FUNCTION__" - no tty structures");
19040 +               dbg("%s - no tty structures", __FUNCTION__);
19041                 return;
19042         }
19043  
19044 @@ -624,7 +571,8 @@
19045                 urb->transfer_buffer = NULL;
19046                 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
19047                 if (!urb->transfer_buffer) {
19048 -                       err (__FUNCTION__ " - out of memory for urb buffers.");
19049 +                       err("%s - out of memory for urb buffers.", 
19050 +                           __FUNCTION__);
19051                         continue;
19052                 }
19053         }
19054 diff -Nur linux-2.4.19.org/drivers/usb/serial/ftdi_sio.c linux-2.4.19/drivers/usb/serial/ftdi_sio.c
19055 --- linux-2.4.19.org/drivers/usb/serial/ftdi_sio.c      Sat Aug  3 02:39:45 2002
19056 +++ linux-2.4.19/drivers/usb/serial/ftdi_sio.c  Thu Oct 31 08:11:24 2002
19057 @@ -4,6 +4,8 @@
19058   *     Copyright (C) 1999 - 2001
19059   *         Greg Kroah-Hartman (greg@kroah.com)
19060   *          Bill Ryder (bryder@sgi.com)
19061 + *     Copyright (C) 2002
19062 + *         Kuba Ober (kuba@mareimbrium.org)
19063   *
19064   *     This program is free software; you can redistribute it and/or modify
19065   *     it under the terms of the GNU General Public License as published by
19066 @@ -13,49 +15,63 @@
19067   * See Documentation/usb/usb-serial.txt for more information on using this driver
19068   *
19069   * See http://ftdi-usb-sio.sourceforge.net for upto date testing info
19070 - *     and extra documentation
19071 + *     and extra documentation
19072 + *
19073 + * (25/Jul/2002) Bill Ryder inserted Dmitri's TIOCMIWAIT patch
19074 + *      Not tested by me but it doesn't break anything I use.
19075   * 
19076 + * (04/Jan/2002) Kuba Ober
19077 + *     Implemented 38400 baudrate kludge, where it can be substituted with other
19078 + *       values. That's the only way to set custom baudrates.
19079 + *     Implemented TIOCSSERIAL, TIOCGSERIAL ioctl's so that setserial is happy.
19080 + *     FIXME: both baudrate things should eventually go to usbserial.c as other
19081 + *       devices may need that functionality too. Actually, it can probably be
19082 + *       merged in serial.c somehow - too many drivers repeat this code over
19083 + *       and over.
19084 + *     Fixed baudrate forgetfulness - open() used to reset baudrate to 9600 every time.
19085 + *     Divisors for baudrates are calculated by a macro.
19086 + *     Small code cleanups. Ugly whitespace changes for Plato's sake only ;-].
19087 + *
19088   * (04/Nov/2001) Bill Ryder
19089 - *     Fixed bug in read_bulk_callback where incorrect urb buffer was used.
19090 - *     cleaned up write offset calculation
19091 - *     added write_room since default values can be incorrect for sio
19092 - *     changed write_bulk_callback to use same queue_task as other drivers
19093 - *       (the previous version caused panics)
19094 - *     Removed port iteration code since the device only has one I/O port and it 
19095 - *       was wrong anyway.
19096 + *     Fixed bug in read_bulk_callback where incorrect urb buffer was used.
19097 + *     Cleaned up write offset calculation
19098 + *     Added write_room since default values can be incorrect for sio
19099 + *     Changed write_bulk_callback to use same queue_task as other drivers
19100 + *        (the previous version caused panics)
19101 + *     Removed port iteration code since the device only has one I/O port and it
19102 + *       was wrong anyway.
19103   * 
19104   * (31/May/2001) gkh
19105 - *     switched from using spinlock to a semaphore, which fixes lots of problems.
19106 + *     Switched from using spinlock to a semaphore, which fixes lots of problems.
19107   *
19108   * (23/May/2001)   Bill Ryder
19109 - *     Added runtime debug patch (thanx Tyson D Sawyer).
19110 - *     Cleaned up comments for 8U232
19111 - *     Added parity, framing and overrun error handling
19112 - *     Added receive break handling.
19113 + *     Added runtime debug patch (thanx Tyson D Sawyer).
19114 + *     Cleaned up comments for 8U232
19115 + *     Added parity, framing and overrun error handling
19116 + *     Added receive break handling.
19117   * 
19118   * (04/08/2001) gb
19119   *     Identify version on module load.
19120   *       
19121   * (18/March/2001) Bill Ryder
19122 - *     (Not released)
19123 - *     Added send break handling. (requires kernel patch too)
19124 - *     Fixed 8U232AM hardware RTS/CTS etc status reporting.
19125 - *     Added flipbuf fix copied from generic device
19126 + *     (Not released)
19127 + *     Added send break handling. (requires kernel patch too)
19128 + *     Fixed 8U232AM hardware RTS/CTS etc status reporting.
19129 + *     Added flipbuf fix copied from generic device
19130   * 
19131   * (12/3/2000) Bill Ryder
19132 - *     Added support for 8U232AM device.
19133 - *     Moved PID and VIDs into header file only.
19134 - *     Turned on low-latency for the tty (device will do high baudrates)
19135 - *     Added shutdown routine to close files when device removed.
19136 - *     More debug and error message cleanups.
19137 - *     
19138 + *     Added support for 8U232AM device.
19139 + *     Moved PID and VIDs into header file only.
19140 + *     Turned on low-latency for the tty (device will do high baudrates)
19141 + *     Added shutdown routine to close files when device removed.
19142 + *     More debug and error message cleanups.
19143   *
19144   * (11/13/2000) Bill Ryder
19145 - *     Added spinlock protected open code and close code.
19146 - *     Multiple opens work (sort of - see webpage mentioned above).
19147 - *     Cleaned up comments. Removed multiple PID/VID definitions.
19148 - *     Factorised cts/dtr code
19149 - *     Made use of __FUNCTION__ in dbg's
19150 + *     Added spinlock protected open code and close code.
19151 + *     Multiple opens work (sort of - see webpage mentioned above).
19152 + *     Cleaned up comments. Removed multiple PID/VID definitions.
19153 + *     Factorised cts/dtr code
19154 + *     Made use of __FUNCTION__ in dbg's
19155   *      
19156   * (11/01/2000) Adam J. Richter
19157   *     usb_device_id table support
19158 @@ -72,16 +88,16 @@
19159   *     driver is a loadable module now.
19160   *
19161   * (04/04/2000) Bill Ryder 
19162 - *      Fixed bugs in TCGET/TCSET ioctls (by removing them - they are 
19163 + *     Fixed bugs in TCGET/TCSET ioctls (by removing them - they are
19164   *        handled elsewhere in the tty io driver chain).
19165   *
19166   * (03/30/2000) Bill Ryder 
19167 - *      Implemented lots of ioctls
19168 - *     Fixed a race condition in write
19169 - *     Changed some dbg's to errs
19170 + *     Implemented lots of ioctls
19171 + *     Fixed a race condition in write
19172 + *     Changed some dbg's to errs
19173   *
19174   * (03/26/2000) gkh
19175 - *     Split driver up into device specific pieces.
19176 + *     Split driver up into device specific pieces.
19177   *
19178   */
19179  
19180 @@ -90,22 +106,19 @@
19181  /*   to talk to the device */
19182  /* Thanx to gkh and the rest of the usb dev group for all code I have assimilated :-) */
19183  
19184 -
19185  #include <linux/config.h>
19186  #include <linux/kernel.h>
19187 -#include <linux/sched.h>
19188 -#include <linux/signal.h>
19189  #include <linux/errno.h>
19190 -#include <linux/poll.h>
19191  #include <linux/init.h>
19192  #include <linux/slab.h>
19193 -#include <linux/fcntl.h>
19194  #include <linux/tty.h>
19195  #include <linux/tty_driver.h>
19196  #include <linux/tty_flip.h>
19197  #include <linux/module.h>
19198  #include <linux/spinlock.h>
19199 +#include <asm/uaccess.h>
19200  #include <linux/usb.h>
19201 +#include <linux/serial.h>
19202  #ifdef CONFIG_USB_SERIAL_DEBUG
19203         static int debug = 1;
19204  #else
19205 @@ -115,28 +128,30 @@
19206  #include "usb-serial.h"
19207  #include "ftdi_sio.h"
19208  
19209 -
19210  /*
19211   * Version Information
19212   */
19213 -#define DRIVER_VERSION "v1.2.0"
19214 -#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>, Bill Ryder <bryder@sgi.com>"
19215 -#define DRIVER_DESC "USB FTDI RS232 Converters Driver"
19216 +#define DRIVER_VERSION "v1.2.1"
19217 +#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>, Bill Ryder <bryder@sgi.com>, Kuba Ober <kuba@mareimbrium.org>"
19218 +#define DRIVER_DESC "USB FTDI Serial Converters Driver"
19219  
19220 -static __devinitdata struct usb_device_id id_table_sio [] = {
19221 +static struct usb_device_id id_table_sio [] = {
19222         { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
19223         { }                                             /* Terminating entry */
19224  };
19225  
19226 -/* THe 8U232AM has the same API as the sio except for:
19227 -   - it can support MUCH higher baudrates (921600 at 48MHz/230400 
19228 -     at 12MHz so .. it's baudrate setting codes are different 
19229 -   - it has a two byte status code.
19230 -   - it returns characters very 16ms (the FTDI does it every 40ms)
19231 -  */
19232 +/*
19233 + * The 8U232AM has the same API as the sio except for:
19234 + * - it can support MUCH higher baudrates; up to:
19235 + *   o 921600 for RS232 and 2000000 for RS422/485 at 48MHz
19236 + *   o 230400 at 12MHz
19237 + *   so .. 8U232AM's baudrate setting codes are different
19238 + * - it has a two byte status code.
19239 + * - it returns characters every 16ms (the FTDI does it every 40ms)
19240 + */
19241  
19242 -   
19243 -static __devinitdata struct usb_device_id id_table_8U232AM [] = {
19244 +
19245 +static struct usb_device_id id_table_8U232AM [] = {
19246         { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
19247         { USB_DEVICE(FTDI_NF_RIC_VID, FTDI_NF_RIC_PID) },
19248         { }                                             /* Terminating entry */
19249 @@ -152,88 +167,98 @@
19250  
19251  MODULE_DEVICE_TABLE (usb, id_table_combined);
19252  
19253 -
19254  struct ftdi_private {
19255 -       ftdi_type_t ftdi_type;
19256 -       __u16 last_set_data_urb_value ; /* the last data state set - needed for doing a break */
19257 -        int write_offset;
19258 +       ftdi_chip_type_t chip_type;
19259 +                               /* type of the device, either SIO or FT8U232AM */
19260 +       int baud_base;          /* baud base clock for divisor setting */
19261 +       int custom_divisor;     /* custom_divisor kludge, this is for baud_base (different from what goes to the chip!) */
19262 +       __u16 last_set_data_urb_value ;
19263 +                               /* the last data state set - needed for doing a break */
19264 +        int write_offset;       /* This is the offset in the usb data block to write the serial data - 
19265 +                                * it is different between devices
19266 +                                */
19267 +       int flags;              /* some ASYNC_xxxx flags are supported */
19268 +        wait_queue_head_t delta_msr_wait; /* Used for TIOCMIWAIT */
19269 +       char prev_status, diff_status;        /* Used for TIOCMIWAIT */
19270  };
19271 +
19272 +/* Used for TIOCMIWAIT */
19273 +#define FTDI_STATUS_B0_MASK    (FTDI_RS0_CTS | FTDI_RS0_DSR | FTDI_RS0_RI | FTDI_RS0_RLSD)
19274 +#define FTDI_STATUS_B1_MASK    (FTDI_RS_BI)
19275 +/* End TIOCMIWAIT */
19276 +
19277 +#define FTDI_IMPL_ASYNC_FLAGS = ( ASYNC_SPD_HI | ASYNC_SPD_VHI \
19278 + ASYNC_SPD_CUST | ASYNC_SPD_SHI | ASYNC_SPD_WARP )
19279 +
19280  /* function prototypes for a FTDI serial converter */
19281 -static int  ftdi_sio_startup           (struct usb_serial *serial);
19282 +static int  ftdi_SIO_startup           (struct usb_serial *serial);
19283  static int  ftdi_8U232AM_startup       (struct usb_serial *serial);
19284 -static void ftdi_sio_shutdown          (struct usb_serial *serial);
19285 -static int  ftdi_sio_open              (struct usb_serial_port *port, struct file *filp);
19286 -static void ftdi_sio_close             (struct usb_serial_port *port, struct file *filp);
19287 -static int  ftdi_sio_write             (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count);
19288 -static int  ftdi_sio_write_room                (struct usb_serial_port *port);
19289 -static void ftdi_sio_write_bulk_callback (struct urb *urb);
19290 -static void ftdi_sio_read_bulk_callback        (struct urb *urb);
19291 -static void ftdi_sio_set_termios       (struct usb_serial_port *port, struct termios * old);
19292 -static int  ftdi_sio_ioctl             (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
19293 -static void ftdi_sio_break_ctl         (struct usb_serial_port *port, int break_state );
19294 -
19295 -/* Should rename most ftdi_sio's to ftdi_ now since there are two devices 
19296 -   which share common code */ 
19297 -
19298 -static struct usb_serial_device_type ftdi_sio_device = {
19299 -       name:                   "FTDI SIO",
19300 -       id_table:               id_table_sio,
19301 -       needs_interrupt_in:     MUST_HAVE_NOT,
19302 -       needs_bulk_in:          MUST_HAVE,
19303 -       needs_bulk_out:         MUST_HAVE,
19304 -       num_interrupt_in:       0,
19305 -       num_bulk_in:            1,
19306 -       num_bulk_out:           1,
19307 -       num_ports:              1,
19308 -       open:                   ftdi_sio_open,
19309 -       close:                  ftdi_sio_close,
19310 -       write:                  ftdi_sio_write,
19311 -       write_room:             ftdi_sio_write_room,
19312 -       read_bulk_callback:     ftdi_sio_read_bulk_callback,
19313 -       write_bulk_callback:    ftdi_sio_write_bulk_callback,
19314 -       ioctl:                  ftdi_sio_ioctl,
19315 -       set_termios:            ftdi_sio_set_termios,
19316 -       break_ctl:              ftdi_sio_break_ctl,
19317 -       startup:                ftdi_sio_startup,
19318 -        shutdown:               ftdi_sio_shutdown,
19319 +static void ftdi_shutdown              (struct usb_serial *serial);
19320 +static int  ftdi_open                  (struct usb_serial_port *port, struct file *filp);
19321 +static void ftdi_close                 (struct usb_serial_port *port, struct file *filp);
19322 +static int  ftdi_write                 (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count);
19323 +static int  ftdi_write_room            (struct usb_serial_port *port);
19324 +static void ftdi_write_bulk_callback   (struct urb *urb);
19325 +static void ftdi_read_bulk_callback    (struct urb *urb);
19326 +static void ftdi_set_termios           (struct usb_serial_port *port, struct termios * old);
19327 +static int  ftdi_ioctl                 (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
19328 +static void ftdi_break_ctl             (struct usb_serial_port *port, int break_state );
19329 +
19330 +static struct usb_serial_device_type ftdi_SIO_device = {
19331 +       .owner =                THIS_MODULE,
19332 +       .name =                 "FTDI SIO",
19333 +       .id_table =             id_table_sio,
19334 +       .num_interrupt_in =     0,
19335 +       .num_bulk_in =          1,
19336 +       .num_bulk_out =         1,
19337 +       .num_ports =            1,
19338 +       .open =                 ftdi_open,
19339 +       .close =                ftdi_close,
19340 +       .write =                ftdi_write,
19341 +       .write_room =           ftdi_write_room,
19342 +       .read_bulk_callback =   ftdi_read_bulk_callback,
19343 +       .write_bulk_callback =  ftdi_write_bulk_callback,
19344 +       .ioctl =                ftdi_ioctl,
19345 +       .set_termios =          ftdi_set_termios,
19346 +       .break_ctl =            ftdi_break_ctl,
19347 +       .startup =              ftdi_SIO_startup,
19348 +       .shutdown =             ftdi_shutdown,
19349  };
19350  
19351  static struct usb_serial_device_type ftdi_8U232AM_device = {
19352 -       name:                   "FTDI 8U232AM",
19353 -       id_table:               id_table_8U232AM,
19354 -       needs_interrupt_in:     DONT_CARE,
19355 -       needs_bulk_in:          MUST_HAVE,
19356 -       needs_bulk_out:         MUST_HAVE,
19357 -       num_interrupt_in:       0,
19358 -       num_bulk_in:            1,
19359 -       num_bulk_out:           1,
19360 -       num_ports:              1,
19361 -       open:                   ftdi_sio_open,
19362 -       close:                  ftdi_sio_close,
19363 -       write:                  ftdi_sio_write,
19364 -       write_room:             ftdi_sio_write_room,
19365 -       read_bulk_callback:     ftdi_sio_read_bulk_callback,
19366 -       write_bulk_callback:    ftdi_sio_write_bulk_callback,
19367 -       ioctl:                  ftdi_sio_ioctl,
19368 -       set_termios:            ftdi_sio_set_termios,
19369 -       break_ctl:              ftdi_sio_break_ctl,
19370 -       startup:                ftdi_8U232AM_startup,
19371 -        shutdown:               ftdi_sio_shutdown,
19372 +       .owner =                THIS_MODULE,
19373 +       .name =                 "FTDI 8U232AM",
19374 +       .id_table =             id_table_8U232AM,
19375 +       .num_interrupt_in =     0,
19376 +       .num_bulk_in =          1,
19377 +       .num_bulk_out =         1,
19378 +       .num_ports =            1,
19379 +       .open =                 ftdi_open,
19380 +       .close =                ftdi_close,
19381 +       .write =                ftdi_write,
19382 +       .write_room =           ftdi_write_room,
19383 +       .read_bulk_callback =   ftdi_read_bulk_callback,
19384 +       .write_bulk_callback =  ftdi_write_bulk_callback,
19385 +       .ioctl =                ftdi_ioctl,
19386 +       .set_termios =          ftdi_set_termios,
19387 +       .break_ctl =            ftdi_break_ctl,
19388 +       .startup =              ftdi_8U232AM_startup,
19389 +       .shutdown =             ftdi_shutdown,
19390  };
19391  
19392 +#define WDR_TIMEOUT (HZ * 5 ) /* default urb timeout */
19393 +
19394 +#define HIGH 1
19395 +#define LOW 0
19396  
19397  /*
19398   * ***************************************************************************
19399 - * FTDI SIO Serial Converter specific driver functions
19400 + * Utlity functions
19401   * ***************************************************************************
19402   */
19403  
19404 -#define WDR_TIMEOUT (HZ * 5 ) /* default urb timeout */
19405  
19406 -/* utility functions to set and unset dtr and rts */
19407 -#define HIGH 1
19408 -#define LOW 0
19409 -static int set_rts(struct usb_device *dev, 
19410 +static int set_rts(struct usb_device *dev,
19411                    unsigned int pipe,
19412                    int high_or_low)
19413  {
19414 @@ -246,9 +271,11 @@
19415                                ftdi_high_or_low, 0, 
19416                                buf, 0, WDR_TIMEOUT));
19417  }
19418 -static int set_dtr(struct usb_device *dev, 
19419 -                  unsigned int pipe,
19420 -                  int high_or_low)
19421 +
19422 +
19423 +static int set_dtr(struct usb_device *dev,
19424 +                   unsigned int pipe,
19425 +                   int high_or_low)
19426  {
19427         static char buf[1];
19428         unsigned ftdi_high_or_low = (high_or_low? FTDI_SIO_SET_DTR_HIGH : 
19429 @@ -261,51 +288,238 @@
19430  }
19431  
19432  
19433 +static __u16 get_ftdi_divisor(struct usb_serial_port * port);
19434 +
19435  
19436 -static int ftdi_sio_startup (struct usb_serial *serial)
19437 +static int change_speed(struct usb_serial_port *port)
19438  {
19439 -       struct ftdi_private *priv;
19440 +       char buf[1];
19441 +        __u16 urb_value;
19442 +
19443 +       urb_value = get_ftdi_divisor(port);
19444         
19445 +       return (usb_control_msg(port->serial->dev,
19446 +                           usb_sndctrlpipe(port->serial->dev, 0),
19447 +                           FTDI_SIO_SET_BAUDRATE_REQUEST,
19448 +                           FTDI_SIO_SET_BAUDRATE_REQUEST_TYPE,
19449 +                           urb_value, 0,
19450 +                           buf, 0, 100) < 0);
19451 +}
19452 +
19453 +
19454 +static __u16 get_ftdi_divisor(struct usb_serial_port * port)
19455 +{ /* get_ftdi_divisor */
19456         
19457 +       struct ftdi_private * priv = (struct ftdi_private *)port->private;
19458 +       __u16 urb_value = 0;
19459 +       int baud;
19460 +
19461 +       /*
19462 +        * The logic involved in setting the baudrate can be cleanly split in 3 steps.
19463 +        * Obtaining the actual baud rate is a little tricky since unix traditionally
19464 +        * somehow ignored the possibility to set non-standard baud rates.
19465 +        * 1. Standard baud rates are set in tty->termios->c_cflag
19466 +        * 2. If these are not enough, you can set any speed using alt_speed as follows:
19467 +        *    - set tty->termios->c_cflag speed to B38400
19468 +        *    - set your real speed in tty->alt_speed; it gets ignored when
19469 +        *      alt_speed==0, (or)
19470 +        *    - call TIOCSSERIAL ioctl with (struct serial_struct) set as follows:
19471 +        *      flags & ASYNC_SPD_MASK == ASYNC_SPD_[HI, VHI, SHI, WARP], this just
19472 +        *      sets alt_speed to (HI: 57600, VHI: 115200, SHI: 230400, WARP: 460800)
19473 +        * ** Steps 1, 2 are done courtesy of tty_get_baud_rate
19474 +        * 3. You can also set baud rate by setting custom divisor as follows
19475 +        *    - set tty->termios->c_cflag speed to B38400
19476 +        *    - call TIOCSSERIAL ioctl with (struct serial_struct) set as follows:
19477 +        *      o flags & ASYNC_SPD_MASK == ASYNC_SPD_CUST
19478 +        *      o custom_divisor set to baud_base / your_new_baudrate
19479 +        * ** Step 3 is done courtesy of code borrowed from serial.c - I should really
19480 +        *    spend some time and separate+move this common code to serial.c, it is
19481 +        *    replicated in nearly every serial driver you see.
19482 +        */
19483 +
19484 +       /* 1. Get the baud rate from the tty settings, this observes alt_speed hack */
19485 +
19486 +       baud = tty_get_baud_rate(port->tty);
19487 +       dbg("%s - tty_get_baud_rate reports speed %d", __FUNCTION__, baud);
19488 +
19489 +       /* 2. Observe async-compatible custom_divisor hack, update baudrate if needed */
19490 +
19491 +       if (baud == 38400 &&
19492 +           ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST) &&
19493 +            (priv->custom_divisor)) {
19494 +               baud = priv->baud_base / priv->custom_divisor;
19495 +               dbg("%s - custom divisor %d sets baud rate to %d", __FUNCTION__, priv->custom_divisor, baud);
19496 +       }
19497 +
19498 +       /* 3. Convert baudrate to device-specific divisor */
19499 +
19500 +       if (!baud) baud = 9600; 
19501 +       switch(priv->chip_type) {
19502 +       case SIO: /* SIO chip */
19503 +               switch(baud) {
19504 +               case 300: urb_value = ftdi_sio_b300; break;
19505 +               case 600: urb_value = ftdi_sio_b600; break;
19506 +               case 1200: urb_value = ftdi_sio_b1200; break;
19507 +               case 2400: urb_value = ftdi_sio_b2400; break;
19508 +               case 4800: urb_value = ftdi_sio_b4800; break;
19509 +               case 9600: urb_value = ftdi_sio_b9600; break;
19510 +               case 19200: urb_value = ftdi_sio_b19200; break;
19511 +               case 38400: urb_value = ftdi_sio_b38400; break;
19512 +               case 57600: urb_value = ftdi_sio_b57600;  break;
19513 +               case 115200: urb_value = ftdi_sio_b115200; break;
19514 +               } /* baud */
19515 +               if (urb_value == 0)
19516 +                       dbg("%s - Baudrate (%d) requested is not supported", __FUNCTION__,  baud);
19517 +               break;
19518 +       case FT8U232AM: /* 8U232AM chip */
19519 +               if (baud <= 3000000) {
19520 +                       urb_value = FTDI_SIO_BAUD_TO_DIVISOR(baud);
19521 +               } else {
19522 +                       dbg("%s - Baud rate too high!", __FUNCTION__);
19523 +               }
19524 +               break;
19525 +       } /* priv->chip_type */
19526 +
19527 +       if (urb_value == 0) {
19528 +               urb_value = ftdi_sio_b9600;
19529 +       } else {
19530 +               dbg("%s - Baud rate set to %d (divisor %d) on chip %s", __FUNCTION__, baud, urb_value, (priv->chip_type == SIO) ? "SIO" : "FT8U232AM" );
19531 +       }
19532 +
19533 +       return(urb_value);
19534 +}
19535 +
19536 +
19537 +static int get_serial_info(struct usb_serial_port * port, struct serial_struct * retinfo)
19538 +{
19539 +       struct ftdi_private * priv = (struct ftdi_private*) port->private;
19540 +       struct serial_struct tmp;
19541 +
19542 +       if (!retinfo)
19543 +               return -EFAULT;
19544 +       memset(&tmp, 0, sizeof(tmp));
19545 +       tmp.flags = priv->flags;
19546 +       tmp.baud_base = priv->baud_base;
19547 +       tmp.custom_divisor = priv->custom_divisor;
19548 +       if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
19549 +               return -EFAULT;
19550 +       return 0;
19551 +} /* get_serial_info */
19552 +
19553 +
19554 +static int set_serial_info(struct usb_serial_port * port, struct serial_struct * newinfo)
19555 +{ /* set_serial_info */
19556 +       struct ftdi_private * priv = (struct ftdi_private *) port->private;
19557 +       struct serial_struct new_serial;
19558 +       struct ftdi_private old_priv;
19559 +
19560 +       if (copy_from_user(&new_serial, newinfo, sizeof(new_serial)))
19561 +               return -EFAULT;
19562 +       old_priv = * priv;
19563 +
19564 +       /* Do error checking and permission checking */
19565 +
19566 +       if (!capable(CAP_SYS_ADMIN)) {
19567 +               if (((new_serial.flags & ~ASYNC_USR_MASK) !=
19568 +                    (priv->flags & ~ASYNC_USR_MASK)))
19569 +                       return -EPERM;
19570 +               priv->flags = ((priv->flags & ~ASYNC_USR_MASK) |
19571 +                              (new_serial.flags & ASYNC_USR_MASK));
19572 +               priv->custom_divisor = new_serial.custom_divisor;
19573 +               goto check_and_exit;
19574 +       }
19575 +
19576 +       if ((new_serial.baud_base != priv->baud_base) ||
19577 +           (new_serial.baud_base < 9600))
19578 +               return -EINVAL;
19579 +
19580 +       /* Make the changes - these are privileged changes! */
19581 +
19582 +       priv->flags = ((priv->flags & ~ASYNC_FLAGS) |
19583 +                      (new_serial.flags & ASYNC_FLAGS));       
19584 +       priv->custom_divisor = new_serial.custom_divisor;
19585 +
19586 +       port->tty->low_latency = (priv->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
19587 +
19588 +check_and_exit:
19589 +       if (((old_priv.flags & ASYNC_SPD_MASK) !=
19590 +            (priv->flags & ASYNC_SPD_MASK)) ||
19591 +           (old_priv.custom_divisor != priv->custom_divisor)) {
19592 +               if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
19593 +                       port->tty->alt_speed = 57600;
19594 +               if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
19595 +                       port->tty->alt_speed = 115200;
19596 +               if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_SHI)
19597 +                       port->tty->alt_speed = 230400;
19598 +               if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP)
19599 +                       port->tty->alt_speed = 460800;
19600 +               change_speed(port);
19601 +       }
19602 +       
19603 +       return (0);
19604 +
19605 +} /* set_serial_info */
19606 +
19607 +/*
19608 + * ***************************************************************************
19609 + * FTDI driver specific functions
19610 + * ***************************************************************************
19611 + */
19612 +
19613 +/* Startup for the SIO chip */
19614 +static int ftdi_SIO_startup (struct usb_serial *serial)
19615 +{
19616 +       struct ftdi_private *priv;
19617 +
19618         priv = serial->port->private = kmalloc(sizeof(struct ftdi_private), GFP_KERNEL);
19619         if (!priv){
19620 -               err(__FUNCTION__"- kmalloc(%Zd) failed.", sizeof(struct ftdi_private));
19621 +               err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct ftdi_private));
19622                 return -ENOMEM;
19623         }
19624  
19625 -       priv->ftdi_type = sio;
19626 +       priv->chip_type = SIO;
19627 +       priv->baud_base = 12000000 / 16;
19628 +       priv->custom_divisor = 0;
19629         priv->write_offset = 1;
19630 +       priv->prev_status = priv->diff_status = 0;
19631 +       /* This will push the characters through immediately rather
19632 +          than queue a task to deliver them */
19633 +       priv->flags = ASYNC_LOW_LATENCY;
19634         
19635         return (0);
19636  }
19637  
19638 -
19639 +/* Startup for the 8U232AM chip */
19640  static int ftdi_8U232AM_startup (struct usb_serial *serial)
19641  {
19642         struct ftdi_private *priv;
19643
19644  
19645         priv = serial->port->private = kmalloc(sizeof(struct ftdi_private), GFP_KERNEL);
19646         if (!priv){
19647 -               err(__FUNCTION__"- kmalloc(%Zd) failed.", sizeof(struct ftdi_private));
19648 +               err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct ftdi_private));
19649                 return -ENOMEM;
19650         }
19651  
19652 -       priv->ftdi_type = F8U232AM;
19653 +       priv->chip_type = FT8U232AM;
19654 +       priv->baud_base = 48000000 / 2; /* Would be / 16, but FTDI supports 0.125, 0.25 and 0.5 divisor fractions! */
19655 +       priv->custom_divisor = 0;
19656         priv->write_offset = 0;
19657 +        init_waitqueue_head(&priv->delta_msr_wait);
19658 +       /* This will push the characters through immediately rather
19659 +          than queue a task to deliver them */
19660 +       priv->flags = ASYNC_LOW_LATENCY;
19661         
19662         return (0);
19663  }
19664  
19665 -static void ftdi_sio_shutdown (struct usb_serial *serial)
19666 -{
19667 -       
19668 -       dbg (__FUNCTION__);
19669  
19670 +static void ftdi_shutdown (struct usb_serial *serial)
19671 +{
19672 +       dbg("%s", __FUNCTION__);
19673  
19674         /* stop reads and writes on all ports */
19675         while (serial->port[0].open_count > 0) {
19676 -               ftdi_sio_close (&serial->port[0], NULL);
19677 +               ftdi_close (&serial->port[0], NULL);
19678         }
19679         if (serial->port[0].private){
19680                 kfree(serial->port[0].private);
19681 @@ -314,117 +528,92 @@
19682  }
19683  
19684  
19685 -
19686 -static int  ftdi_sio_open (struct usb_serial_port *port, struct file *filp)
19687 -{ /* ftdi_sio_open */
19688 +static int  ftdi_open (struct usb_serial_port *port, struct file *filp)
19689 +{ /* ftdi_open */
19690         struct termios tmp_termios;
19691         struct usb_serial *serial = port->serial;
19692 +       struct ftdi_private *priv = port->private;
19693 +       
19694         int result = 0;
19695         char buf[1]; /* Needed for the usb_control_msg I think */
19696  
19697 -       dbg(__FUNCTION__);
19698 -
19699 -       down (&port->sem);
19700 -       
19701 -       MOD_INC_USE_COUNT;
19702 -       ++port->open_count;
19703 +       dbg("%s", __FUNCTION__);
19704  
19705 -       if (!port->active){
19706 -               port->active = 1;
19707  
19708 -               /* This will push the characters through immediately rather 
19709 -                  than queue a task to deliver them */
19710 -               port->tty->low_latency = 1;
19711 +       port->tty->low_latency = (priv->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
19712  
19713 -               /* No error checking for this (will get errors later anyway) */
19714 -               /* See ftdi_sio.h for description of what is reset */
19715 -               usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
19716 -                               FTDI_SIO_RESET_REQUEST, FTDI_SIO_RESET_REQUEST_TYPE, 
19717 -                               FTDI_SIO_RESET_SIO, 
19718 -                               0, buf, 0, WDR_TIMEOUT);
19719 +       /* No error checking for this (will get errors later anyway) */
19720 +       /* See ftdi_sio.h for description of what is reset */
19721 +       usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
19722 +                       FTDI_SIO_RESET_REQUEST, FTDI_SIO_RESET_REQUEST_TYPE, 
19723 +                       FTDI_SIO_RESET_SIO, 
19724 +                       0, buf, 0, WDR_TIMEOUT);
19725  
19726 -               /* Setup termios defaults. According to tty_io.c the 
19727 -                  settings are driver specific */
19728 -               port->tty->termios->c_cflag =
19729 -                       B9600 | CS8 | CREAD | HUPCL | CLOCAL;
19730 +       /* Termios defaults are set by usb_serial_init. We don't change
19731 +          port->tty->termios - this would loose speed settings, etc.
19732 +          This is same behaviour as serial.c/rs_open() - Kuba */
19733  
19734 -               /* ftdi_sio_set_termios  will send usb control messages */
19735 -               ftdi_sio_set_termios(port, &tmp_termios);       
19736 +       /* ftdi_set_termios  will send usb control messages */
19737 +       ftdi_set_termios(port, &tmp_termios);
19738  
19739 -               /* Turn on RTS and DTR since we are not flow controlling by default */
19740 -               if (set_dtr(serial->dev, usb_sndctrlpipe(serial->dev, 0),HIGH) < 0) {
19741 -                       err(__FUNCTION__ " Error from DTR HIGH urb");
19742 -               }
19743 -               if (set_rts(serial->dev, usb_sndctrlpipe(serial->dev, 0),HIGH) < 0){
19744 -                       err(__FUNCTION__ " Error from RTS HIGH urb");
19745 -               }
19746 -       
19747 -               /* Start reading from the device */
19748 -               FILL_BULK_URB(port->read_urb, serial->dev, 
19749 -                             usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
19750 -                             port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
19751 -                             ftdi_sio_read_bulk_callback, port);
19752 -               result = usb_submit_urb(port->read_urb);
19753 -               if (result)
19754 -                       err(__FUNCTION__ " - failed submitting read urb, error %d", result);
19755 +       /* FIXME: Flow control might be enabled, so it should be checked -
19756 +          we have no control of defaults! */
19757 +       /* Turn on RTS and DTR since we are not flow controlling by default */
19758 +       if (set_dtr(serial->dev, usb_sndctrlpipe(serial->dev, 0),HIGH) < 0) {
19759 +               err("%s Error from DTR HIGH urb", __FUNCTION__);
19760 +       }
19761 +       if (set_rts(serial->dev, usb_sndctrlpipe(serial->dev, 0),HIGH) < 0){
19762 +               err("%s Error from RTS HIGH urb", __FUNCTION__);
19763         }
19764  
19765 -       up (&port->sem);
19766 +       /* Start reading from the device */
19767 +       FILL_BULK_URB(port->read_urb, serial->dev, 
19768 +                     usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
19769 +                     port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
19770 +                     ftdi_read_bulk_callback, port);
19771 +       result = usb_submit_urb(port->read_urb);
19772 +       if (result)
19773 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
19774 +
19775         return result;
19776 -} /* ftdi_sio_open */
19777 +} /* ftdi_open */
19778  
19779  
19780 -static void ftdi_sio_close (struct usb_serial_port *port, struct file *filp)
19781 -{ /* ftdi_sio_close */
19782 +static void ftdi_close (struct usb_serial_port *port, struct file *filp)
19783 +{ /* ftdi_close */
19784         struct usb_serial *serial = port->serial; /* Checked in usbserial.c */
19785         unsigned int c_cflag = port->tty->termios->c_cflag;
19786         char buf[1];
19787  
19788 -       dbg( __FUNCTION__);
19789 -
19790 -       down (&port->sem);
19791 -       --port->open_count;
19792 +       dbg("%s", __FUNCTION__);
19793  
19794 -       if (port->open_count <= 0) {
19795 -               if (serial->dev) {
19796 -                       if (c_cflag & HUPCL){
19797 -                               /* Disable flow control */
19798 -                               if (usb_control_msg(serial->dev, 
19799 -                                                   usb_sndctrlpipe(serial->dev, 0),
19800 -                                                   FTDI_SIO_SET_FLOW_CTRL_REQUEST,
19801 -                                                   FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
19802 -                                                   0, 0, buf, 0, WDR_TIMEOUT) < 0) {
19803 -                                       err("error from flowcontrol urb");
19804 -                               }           
19805 -
19806 -                               /* drop DTR */
19807 -                               if (set_dtr(serial->dev, usb_sndctrlpipe(serial->dev, 0), LOW) < 0){
19808 -                                       err("Error from DTR LOW urb");
19809 -                               }
19810 -                               /* drop RTS */
19811 -                               if (set_rts(serial->dev, usb_sndctrlpipe(serial->dev, 0),LOW) < 0) {
19812 -                                       err("Error from RTS LOW urb");
19813 -                               }       
19814 -                       } /* Note change no line is hupcl is off */
19815 -
19816 -                       /* shutdown our bulk reads and writes */
19817 -                       /* ***CHECK*** behaviour when there is nothing queued */
19818 -                       usb_unlink_urb (port->write_urb);
19819 -                       usb_unlink_urb (port->read_urb);
19820 -               }
19821 -               port->active = 0;
19822 -               port->open_count = 0;
19823 -       } else {  
19824 -               /* Send a HUP if necessary */
19825 -               if (!(port->tty->termios->c_cflag & CLOCAL)){
19826 -                       tty_hangup(port->tty);
19827 -               }
19828 +       if (serial->dev) {
19829 +               if (c_cflag & HUPCL){
19830 +                       /* Disable flow control */
19831 +                       if (usb_control_msg(serial->dev, 
19832 +                                           usb_sndctrlpipe(serial->dev, 0),
19833 +                                           FTDI_SIO_SET_FLOW_CTRL_REQUEST,
19834 +                                           FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
19835 +                                           0, 0, buf, 0, WDR_TIMEOUT) < 0) {
19836 +                               err("error from flowcontrol urb");
19837 +                       }           
19838 +
19839 +                       /* drop DTR */
19840 +                       if (set_dtr(serial->dev, usb_sndctrlpipe(serial->dev, 0), LOW) < 0){
19841 +                               err("Error from DTR LOW urb");
19842 +                       }
19843 +                       /* drop RTS */
19844 +                       if (set_rts(serial->dev, usb_sndctrlpipe(serial->dev, 0),LOW) < 0) {
19845 +                               err("Error from RTS LOW urb");
19846 +                       }       
19847 +               } /* Note change no line is hupcl is off */
19848 +
19849 +               /* shutdown our bulk reads and writes */
19850 +               /* ***CHECK*** behaviour when there is nothing queued */
19851 +               usb_unlink_urb (port->write_urb);
19852 +               usb_unlink_urb (port->read_urb);
19853         }
19854 -
19855 -       up (&port->sem);
19856 -       MOD_DEC_USE_COUNT;
19857 -
19858 -} /* ftdi_sio_close */
19859 +} /* ftdi_close */
19860  
19861  
19862    
19863 @@ -433,16 +622,16 @@
19864   *  B1 0
19865   *  B2..7 length of message excluding byte 0
19866   */
19867 -static int ftdi_sio_write (struct usb_serial_port *port, int from_user, 
19868 +static int ftdi_write (struct usb_serial_port *port, int from_user,
19869                            const unsigned char *buf, int count)
19870 -{ /* ftdi_sio_write */
19871 +{ /* ftdi_write */
19872         struct usb_serial *serial = port->serial;
19873         struct ftdi_private *priv = (struct ftdi_private *)port->private;
19874         unsigned char *first_byte = port->write_urb->transfer_buffer;
19875         int data_offset ;
19876         int result;
19877         
19878 -       dbg(__FUNCTION__ " port %d, %d bytes", port->number, count);
19879 +       dbg("%s port %d, %d bytes", __FUNCTION__, port->number, count);
19880  
19881         if (count == 0) {
19882                 err("write request of 0 bytes");
19883 @@ -453,20 +642,17 @@
19884          dbg("data_offset set to %d",data_offset);
19885  
19886         if (port->write_urb->status == -EINPROGRESS) {
19887 -               dbg (__FUNCTION__ " - already writing");
19888 +               dbg("%s - already writing", __FUNCTION__);
19889                 return (0);
19890         }               
19891  
19892 -       down(&port->sem);
19893 -
19894         count += data_offset;
19895         count = (count > port->bulk_out_size) ? port->bulk_out_size : count;
19896  
19897 -               /* Copy in the data to send */
19898 +       /* Copy in the data to send */
19899         if (from_user) {
19900                 if (copy_from_user(port->write_urb->transfer_buffer + data_offset,
19901                                    buf, count - data_offset )){
19902 -                       up (&port->sem);
19903                         return -EFAULT;
19904                 }
19905         } else {
19906 @@ -480,41 +666,39 @@
19907                 *first_byte = 1 | ((count-data_offset) << 2) ; 
19908         }
19909  
19910 -       dbg(__FUNCTION__ " Bytes: %d, First Byte: 0x%02x",count, first_byte[0]);
19911 +       dbg("%s Bytes: %d, First Byte: 0x%02x", __FUNCTION__,count, first_byte[0]);
19912         usb_serial_debug_data (__FILE__, __FUNCTION__, count, first_byte);
19913                 
19914         /* send the data out the bulk port */
19915         FILL_BULK_URB(port->write_urb, serial->dev, 
19916                       usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress),
19917                       port->write_urb->transfer_buffer, count,
19918 -                     ftdi_sio_write_bulk_callback, port);
19919 +                     ftdi_write_bulk_callback, port);
19920                 
19921         result = usb_submit_urb(port->write_urb);
19922         if (result) {
19923 -               err(__FUNCTION__ " - failed submitting write urb, error %d", result);
19924 -               up (&port->sem);
19925 +               err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
19926                 return 0;
19927         }
19928 -       up (&port->sem);
19929  
19930 -       dbg(__FUNCTION__ " write returning: %d", count - data_offset);
19931 +       dbg("%s write returning: %d", __FUNCTION__, count - data_offset);
19932         return (count - data_offset);
19933 +} /* ftdi_write */
19934  
19935 -} /* ftdi_sio_write */
19936  
19937 -static void ftdi_sio_write_bulk_callback (struct urb *urb)
19938 +static void ftdi_write_bulk_callback (struct urb *urb)
19939  {
19940         struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
19941         struct usb_serial *serial;
19942  
19943 -       dbg("ftdi_sio_write_bulk_callback");
19944 +       dbg("%s", __FUNCTION__);
19945  
19946 -       if (port_paranoia_check (port, "ftdi_sio_write_bulk_callback")) {
19947 +       if (port_paranoia_check (port, "ftdi_write_bulk_callback")) {
19948                 return;
19949         }
19950         
19951         serial = port->serial;
19952 -       if (serial_paranoia_check (serial, "ftdi_sio_write_bulk_callback")) {
19953 +       if (serial_paranoia_check (serial, "ftdi_write_bulk_callback")) {
19954                 return;
19955         }
19956         
19957 @@ -526,13 +710,14 @@
19958         mark_bh(IMMEDIATE_BH);
19959  
19960         return;
19961 -} /* ftdi_sio_write_bulk_callback */
19962 +} /* ftdi_write_bulk_callback */
19963  
19964  
19965 -static int ftdi_sio_write_room( struct usb_serial_port *port )
19966 +static int ftdi_write_room( struct usb_serial_port *port )
19967  {
19968         struct ftdi_private *priv = (struct ftdi_private *)port->private;
19969         int room;
19970 +
19971         if ( port->write_urb->status == -EINPROGRESS) {
19972                 /* There is a race here with the _write routines but it won't hurt */
19973                 room = 0;
19974 @@ -540,16 +725,15 @@
19975                 room = port->bulk_out_size - priv->write_offset;
19976         }
19977         return(room);
19978 +} /* ftdi_write_room */
19979  
19980  
19981 -} /* ftdi_sio_write_room */
19982 -
19983 -
19984 -static void ftdi_sio_read_bulk_callback (struct urb *urb)
19985 -{ /* ftdi_sio_serial_buld_callback */
19986 +static void ftdi_read_bulk_callback (struct urb *urb)
19987 +{ /* ftdi_read_bulk_callback */
19988         struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
19989         struct usb_serial *serial;
19990                 struct tty_struct *tty = port->tty ;
19991 +       struct ftdi_private *priv = (struct ftdi_private *) port->private;
19992         char error_flag;
19993                 unsigned char *data = urb->transfer_buffer;
19994  
19995 @@ -557,7 +741,7 @@
19996         int i;
19997         int result;
19998  
19999 -       dbg(__FUNCTION__ " - port %d", port->number);
20000 +       dbg("%s - port %d", __FUNCTION__, port->number);
20001  
20002         if (port_paranoia_check (port, "ftdi_sio_read_bulk_callback")) {
20003                 return;
20004 @@ -586,6 +770,16 @@
20005         /* See acm.c - you do a tty_hangup  - eg tty_hangup(tty) */
20006         /* if CD is dropped and the line is not CLOCAL then we should hangup */
20007  
20008 +       /* Compare new line status to the old one, signal if different */
20009 +       if (priv != NULL) {
20010 +               char new_status = data[0] & FTDI_STATUS_B0_MASK;
20011 +               if (new_status != priv->prev_status) {
20012 +                       priv->diff_status |= new_status ^ priv->prev_status;
20013 +                       wake_up_interruptible(&priv->delta_msr_wait);
20014 +                       priv->prev_status = new_status;
20015 +               }
20016 +       }
20017 +
20018         /* Handle errors and break */
20019         error_flag = TTY_NORMAL;
20020          /* Although the device uses a bitmask and hence can have multiple */
20021 @@ -652,63 +846,17 @@
20022         FILL_BULK_URB(port->read_urb, serial->dev, 
20023                       usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
20024                       port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
20025 -                     ftdi_sio_read_bulk_callback, port);
20026 +                     ftdi_read_bulk_callback, port);
20027  
20028         result = usb_submit_urb(port->read_urb);
20029         if (result)
20030 -               err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
20031 +               err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
20032  
20033         return;
20034 -} /* ftdi_sio_serial_read_bulk_callback */
20035 -
20036 -
20037 -static __u16 translate_baudrate_to_ftdi(unsigned int cflag, ftdi_type_t ftdi_type) 
20038 -{ /* translate_baudrate_to_ftdi */
20039 -       
20040 -       __u16 urb_value = ftdi_sio_b9600;
20041 +} /* ftdi_read_bulk_callback */
20042  
20043 -       if (ftdi_type == sio){
20044 -               switch(cflag & CBAUD){
20045 -               case B0: break; /* ignored by this */
20046 -               case B300: urb_value = ftdi_sio_b300; dbg("Set to 300"); break;
20047 -               case B600: urb_value = ftdi_sio_b600; dbg("Set to 600") ; break;
20048 -               case B1200: urb_value = ftdi_sio_b1200; dbg("Set to 1200") ; break;
20049 -               case B2400: urb_value = ftdi_sio_b2400; dbg("Set to 2400") ; break;
20050 -               case B4800: urb_value = ftdi_sio_b4800; dbg("Set to 4800") ; break;
20051 -               case B9600: urb_value = ftdi_sio_b9600; dbg("Set to 9600") ; break;
20052 -               case B19200: urb_value = ftdi_sio_b19200; dbg("Set to 19200") ; break;
20053 -               case B38400: urb_value = ftdi_sio_b38400; dbg("Set to 38400") ; break;
20054 -               case B57600: urb_value = ftdi_sio_b57600; dbg("Set to 57600") ; break;
20055 -               case B115200: urb_value = ftdi_sio_b115200; dbg("Set to 115200") ; break;
20056 -               default: dbg(__FUNCTION__ " FTDI_SIO does not support the baudrate (%d) requested",
20057 -                            (cflag & CBAUD)); 
20058 -                  break;
20059 -               }
20060 -       } else { /* it is 8U232AM */
20061 -               switch(cflag & CBAUD){
20062 -               case B0: break; /* ignored by this */
20063 -               case B300: urb_value = ftdi_8U232AM_48MHz_b300; dbg("Set to 300"); break;
20064 -               case B600: urb_value = ftdi_8U232AM_48MHz_b600; dbg("Set to 600") ; break;
20065 -               case B1200: urb_value = ftdi_8U232AM_48MHz_b1200; dbg("Set to 1200") ; break;
20066 -               case B2400: urb_value = ftdi_8U232AM_48MHz_b2400; dbg("Set to 2400") ; break;
20067 -               case B4800: urb_value = ftdi_8U232AM_48MHz_b4800; dbg("Set to 4800") ; break;
20068 -               case B9600: urb_value = ftdi_8U232AM_48MHz_b9600; dbg("Set to 9600") ; break;
20069 -               case B19200: urb_value = ftdi_8U232AM_48MHz_b19200; dbg("Set to 19200") ; break;
20070 -               case B38400: urb_value = ftdi_8U232AM_48MHz_b38400; dbg("Set to 38400") ; break;
20071 -               case B57600: urb_value = ftdi_8U232AM_48MHz_b57600; dbg("Set to 57600") ; break;
20072 -               case B115200: urb_value = ftdi_8U232AM_48MHz_b115200; dbg("Set to 115200") ; break;
20073 -               case B230400: urb_value = ftdi_8U232AM_48MHz_b230400; dbg("Set to 230400") ; break;
20074 -               case B460800: urb_value = ftdi_8U232AM_48MHz_b460800; dbg("Set to 460800") ; break;
20075 -               case B921600: urb_value = ftdi_8U232AM_48MHz_b921600; dbg("Set to 921600") ; break;
20076 -               default: dbg(__FUNCTION__ " The baudrate (%d) requested is not implemented",
20077 -                            (cflag & CBAUD)); 
20078 -                  break;
20079 -               }
20080 -       }
20081 -       return(urb_value);
20082 -}
20083  
20084 -static void ftdi_sio_break_ctl( struct usb_serial_port *port, int break_state )
20085 +static void ftdi_break_ctl( struct usb_serial_port *port, int break_state )
20086  {
20087         struct usb_serial *serial = port->serial;
20088         struct ftdi_private *priv = (struct ftdi_private *)port->private;
20089 @@ -731,22 +879,21 @@
20090                             FTDI_SIO_SET_DATA_REQUEST_TYPE,
20091                             urb_value , 0,
20092                             buf, 0, WDR_TIMEOUT) < 0) {
20093 -               err(__FUNCTION__ " FAILED to enable/disable break state (state was %d)",break_state);
20094 +               err("%s FAILED to enable/disable break state (state was %d)", __FUNCTION__,break_state);
20095         }          
20096  
20097 -       dbg(__FUNCTION__ " break state is %d - urb is %d",break_state, urb_value);
20098 +       dbg("%s break state is %d - urb is %d", __FUNCTION__,break_state, urb_value);
20099         
20100  }
20101  
20102  
20103 +/* old_termios contains the original termios settings and tty->termios contains
20104 + * the new setting to be used
20105 + * WARNING: set_termios calls this with old_termios in kernel space
20106 + */
20107  
20108 -/* As I understand this - old_termios contains the original termios settings */
20109 -/*  and tty->termios contains the new setting to be used */
20110 -/* */
20111 -/*   WARNING: set_termios calls this with old_termios in kernel space */
20112 -
20113 -static void ftdi_sio_set_termios (struct usb_serial_port *port, struct termios *old_termios)
20114 -{ /* ftdi_sio_set_termios */
20115 +static void ftdi_set_termios (struct usb_serial_port *port, struct termios *old_termios)
20116 +{ /* ftdi_termios */
20117         struct usb_serial *serial = port->serial;
20118         unsigned int cflag = port->tty->termios->c_cflag;
20119         struct ftdi_private *priv = (struct ftdi_private *)port->private;       
20120 @@ -754,7 +901,7 @@
20121         char buf[1]; /* Perhaps I should dynamically alloc this? */
20122         
20123         
20124 -       dbg(__FUNCTION__);
20125 +       dbg("%s", __FUNCTION__);
20126  
20127  
20128         /* FIXME -For this cut I don't care if the line is really changing or 
20129 @@ -793,12 +940,10 @@
20130                             FTDI_SIO_SET_DATA_REQUEST_TYPE,
20131                             urb_value , 0,
20132                             buf, 0, 100) < 0) {
20133 -               err(__FUNCTION__ " FAILED to set databits/stopbits/parity");
20134 +               err("%s FAILED to set databits/stopbits/parity", __FUNCTION__);
20135         }          
20136  
20137         /* Now do the baudrate */
20138 -       urb_value = translate_baudrate_to_ftdi((cflag & CBAUD), priv->ftdi_type);
20139 -       
20140         if ((cflag & CBAUD) == B0 ) {
20141                 /* Disable flow control */
20142                 if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
20143 @@ -806,31 +951,27 @@
20144                                     FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
20145                                     0, 0, 
20146                                     buf, 0, WDR_TIMEOUT) < 0) {
20147 -                       err(__FUNCTION__ " error from disable flowcontrol urb");
20148 +                       err("%s error from disable flowcontrol urb", __FUNCTION__);
20149                 }           
20150                 /* Drop RTS and DTR */
20151                 if (set_dtr(serial->dev, usb_sndctrlpipe(serial->dev, 0),LOW) < 0){
20152 -                       err(__FUNCTION__ " Error from DTR LOW urb");
20153 +                       err("%s Error from DTR LOW urb", __FUNCTION__);
20154                 }
20155                 if (set_rts(serial->dev, usb_sndctrlpipe(serial->dev, 0),LOW) < 0){
20156 -                       err(__FUNCTION__ " Error from RTS LOW urb");
20157 +                       err("%s Error from RTS LOW urb", __FUNCTION__);
20158                 }       
20159                 
20160         } else {
20161                 /* set the baudrate determined before */
20162 -               if (usb_control_msg(serial->dev, 
20163 -                                   usb_sndctrlpipe(serial->dev, 0),
20164 -                                   FTDI_SIO_SET_BAUDRATE_REQUEST, 
20165 -                                   FTDI_SIO_SET_BAUDRATE_REQUEST_TYPE,
20166 -                                   urb_value, 0, 
20167 -                                   buf, 0, 100) < 0) {
20168 -                       err(__FUNCTION__ " urb failed to set baurdrate");
20169 +               if (change_speed(port)) {
20170 +                       err("%s urb failed to set baurdrate", __FUNCTION__);
20171                 }
20172         }
20173 +
20174         /* Set flow control */
20175         /* Note device also supports DTR/CD (ugh) and Xon/Xoff in hardware */
20176         if (cflag & CRTSCTS) {
20177 -               dbg(__FUNCTION__ " Setting to CRTSCTS flow control");
20178 +               dbg("%s Setting to CRTSCTS flow control", __FUNCTION__);
20179                 if (usb_control_msg(serial->dev, 
20180                                     usb_sndctrlpipe(serial->dev, 0),
20181                                     FTDI_SIO_SET_FLOW_CTRL_REQUEST, 
20182 @@ -842,7 +983,7 @@
20183                 
20184         } else { 
20185                 /* CHECKME Assuming XON/XOFF handled by tty stack - not by device */
20186 -               dbg(__FUNCTION__ " Turning off hardware flow control");
20187 +               dbg("%s Turning off hardware flow control", __FUNCTION__);
20188                 if (usb_control_msg(serial->dev, 
20189                                     usb_sndctrlpipe(serial->dev, 0),
20190                                     FTDI_SIO_SET_FLOW_CTRL_REQUEST, 
20191 @@ -854,24 +995,27 @@
20192                 
20193         }
20194         return;
20195 -} /* ftdi_sio_set_termios */
20196 +} /* ftdi_termios */
20197 +
20198  
20199 -static int ftdi_sio_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
20200 +static int ftdi_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
20201  {
20202         struct usb_serial *serial = port->serial;
20203         struct ftdi_private *priv = (struct ftdi_private *)port->private;
20204 +
20205         __u16 urb_value=0; /* Will hold the new flags */
20206         char buf[2];
20207         int  ret, mask;
20208         
20209 -       dbg(__FUNCTION__ " cmd 0x%04x", cmd);
20210 +       dbg("%s cmd 0x%04x", __FUNCTION__, cmd);
20211  
20212         /* Based on code from acm.c and others */
20213         switch (cmd) {
20214  
20215         case TIOCMGET:
20216 -               dbg(__FUNCTION__ " TIOCMGET");
20217 -               if (priv->ftdi_type == sio){
20218 +               dbg("%s TIOCMGET", __FUNCTION__);
20219 +               switch (priv->chip_type) {
20220 +               case SIO:
20221                         /* Request the status from the device */
20222                         if ((ret = usb_control_msg(serial->dev, 
20223                                                    usb_rcvctrlpipe(serial->dev, 0),
20224 @@ -879,12 +1023,13 @@
20225                                                    FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
20226                                                    0, 0, 
20227                                                    buf, 1, WDR_TIMEOUT)) < 0 ) {
20228 -                               err(__FUNCTION__ " Could not get modem status of device - err: %d",
20229 +                               err("%s Could not get modem status of device - err: %d", __FUNCTION__,
20230                                     ret);
20231                                 return(ret);
20232                         }
20233 -               } else {
20234 -                       /* the 8U232AM returns a two byte value (the sio is a 1 byte value) - in the same 
20235 +                       break;
20236 +               case FT8U232AM:
20237 +                       /* the 8U232AM returns a two byte value (the sio is a 1 byte value) - in the same
20238                            format as the data returned from the in point */
20239                         if ((ret = usb_control_msg(serial->dev, 
20240                                                    usb_rcvctrlpipe(serial->dev, 0),
20241 @@ -892,10 +1037,14 @@
20242                                                    FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
20243                                                    0, 0, 
20244                                                    buf, 2, WDR_TIMEOUT)) < 0 ) {
20245 -                               err(__FUNCTION__ " Could not get modem status of device - err: %d",
20246 +                               err("%s Could not get modem status of device - err: %d", __FUNCTION__,
20247                                     ret);
20248                                 return(ret);
20249                         }
20250 +                       break;
20251 +               default:
20252 +                       return -EFAULT;
20253 +                       break;
20254                 }
20255  
20256                 return put_user((buf[0] & FTDI_SIO_DSR_MASK ? TIOCM_DSR : 0) |
20257 @@ -906,7 +1055,7 @@
20258                 break;
20259  
20260         case TIOCMSET: /* Turns on and off the lines as specified by the mask */
20261 -               dbg(__FUNCTION__ " TIOCMSET");
20262 +               dbg("%s TIOCMSET", __FUNCTION__);
20263                 if (get_user(mask, (unsigned long *) arg))
20264                         return -EFAULT;
20265                 urb_value = ((mask & TIOCM_DTR) ? HIGH : LOW);
20266 @@ -920,7 +1069,7 @@
20267                 break;
20268                                         
20269         case TIOCMBIS: /* turns on (Sets) the lines as specified by the mask */
20270 -               dbg(__FUNCTION__ " TIOCMBIS");
20271 +               dbg("%s TIOCMBIS", __FUNCTION__);
20272                 if (get_user(mask, (unsigned long *) arg))
20273                         return -EFAULT;
20274                 if (mask & TIOCM_DTR){
20275 @@ -942,7 +1091,7 @@
20276                                         break;
20277  
20278         case TIOCMBIC: /* turns off (Clears) the lines as specified by the mask */
20279 -               dbg(__FUNCTION__ " TIOCMBIC");
20280 +               dbg("%s TIOCMBIC", __FUNCTION__);
20281                 if (get_user(mask, (unsigned long *) arg))
20282                         return -EFAULT;
20283                 if (mask & TIOCM_DTR){
20284 @@ -972,38 +1121,83 @@
20285                  *
20286                  */
20287  
20288 +       case TIOCGSERIAL: /* gets serial port data */
20289 +               return get_serial_info(port, (struct serial_struct *) arg);
20290 +
20291 +       case TIOCSSERIAL: /* sets serial port data */
20292 +               return set_serial_info(port, (struct serial_struct *) arg);
20293 +
20294 +       /*
20295 +        * Wait for any of the 4 modem inputs (DCD,RI,DSR,CTS) to change
20296 +        * - mask passed in arg for lines of interest
20297 +        *   (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
20298 +        * Caller should use TIOCGICOUNT to see which one it was.
20299 +        *
20300 +        * This code is borrowed from linux/drivers/char/serial.c
20301 +        */
20302 +       case TIOCMIWAIT:
20303 +               while (priv != NULL) {
20304 +                       interruptible_sleep_on(&priv->delta_msr_wait);
20305 +                       /* see if a signal did it */
20306 +                       if (signal_pending(current))
20307 +                               return -ERESTARTSYS;
20308 +                       else {
20309 +                               char diff = priv->diff_status;
20310 +
20311 +                               if (diff == 0) {
20312 +                                       return -EIO; /* no change => error */
20313 +                               }
20314 +
20315 +                               /* Consume all events */
20316 +                               priv->diff_status = 0;
20317 +
20318 +                               /* Return 0 if caller wanted to know about these bits */
20319 +                               if ( ((arg & TIOCM_RNG) && (diff & FTDI_RS0_RI)) ||
20320 +                                    ((arg & TIOCM_DSR) && (diff & FTDI_RS0_DSR)) ||
20321 +                                    ((arg & TIOCM_CD)  && (diff & FTDI_RS0_RLSD)) ||
20322 +                                    ((arg & TIOCM_CTS) && (diff & FTDI_RS0_CTS)) ) {
20323 +                                       return 0;
20324 +                               }
20325 +                               /*
20326 +                                * Otherwise caller can't care less about what happened,
20327 +                                * and so we continue to wait for more events.
20328 +                                */
20329 +                       }
20330 +               }
20331 +               /* NOTREACHED */
20332 +
20333         default:
20334           /* This is not an error - turns out the higher layers will do 
20335            *  some ioctls itself (see comment above)
20336            */
20337 -               dbg(__FUNCTION__ " arg not supported - it was 0x%04x",cmd);
20338 +               dbg("%s arg not supported - it was 0x%04x", __FUNCTION__,cmd);
20339                 return(-ENOIOCTLCMD);
20340                 break;
20341         }
20342         return 0;
20343 -} /* ftdi_sio_ioctl */
20344 +} /* ftdi_ioctl */
20345  
20346  
20347 -static int __init ftdi_sio_init (void)
20348 +static int __init ftdi_init (void)
20349  {
20350 -       dbg(__FUNCTION__);
20351 -       usb_serial_register (&ftdi_sio_device);
20352 +       dbg("%s", __FUNCTION__);
20353 +       usb_serial_register (&ftdi_SIO_device);
20354         usb_serial_register (&ftdi_8U232AM_device);
20355         info(DRIVER_VERSION ":" DRIVER_DESC);
20356         return 0;
20357  }
20358  
20359  
20360 -static void __exit ftdi_sio_exit (void)
20361 +static void __exit ftdi_exit (void)
20362  {
20363 -       dbg(__FUNCTION__);
20364 -       usb_serial_deregister (&ftdi_sio_device);
20365 +       dbg("%s", __FUNCTION__);
20366 +       usb_serial_deregister (&ftdi_SIO_device);
20367         usb_serial_deregister (&ftdi_8U232AM_device);
20368  }
20369  
20370  
20371 -module_init(ftdi_sio_init);
20372 -module_exit(ftdi_sio_exit);
20373 +module_init(ftdi_init);
20374 +module_exit(ftdi_exit);
20375  
20376  MODULE_AUTHOR( DRIVER_AUTHOR );
20377  MODULE_DESCRIPTION( DRIVER_DESC );
20378 diff -Nur linux-2.4.19.org/drivers/usb/serial/ftdi_sio.h linux-2.4.19/drivers/usb/serial/ftdi_sio.h
20379 --- linux-2.4.19.org/drivers/usb/serial/ftdi_sio.h      Sat Aug  3 02:39:45 2002
20380 +++ linux-2.4.19/drivers/usb/serial/ftdi_sio.h  Thu Oct 31 08:11:24 2002
20381 @@ -81,17 +81,36 @@
20382  /*
20383   * BmRequestType:  0100 0000B
20384   * bRequest:       FTDI_SIO_SET_BAUDRATE
20385 - * wValue:         BaudRate value - see below
20386 + * wValue:         BaudDivisor value - see below
20387   * wIndex:         Port
20388   * wLength:        0
20389   * Data:           None
20390 + * The BaudDivisor values are calculated as follows:
20391 + * - BaseClock is either 12000000 or 48000000 depending on the device. FIXME: I wish
20392 + *   I knew how to detect old chips to select proper base clock!
20393 + * - BaudDivisor is a fixed point number encoded in a funny way.
20394 + *   (--WRONG WAY OF THINKING--)
20395 + *   BaudDivisor is a fixed point number encoded with following bit weighs:
20396 + *   (-2)(-1)(13..0). It is a radical with a denominator of 4, so values
20397 + *   end with 0.0 (00...), 0.25 (10...), 0.5 (01...), and 0.75 (11...).
20398 + *   (--THE REALITY--)
20399 + *   The both-bits-set has quite different meaning from 0.75 - the chip designers
20400 + *   have decided it to mean 0.125 instead of 0.75.
20401 + *   This info looked up in FTDI application note "FT8U232 DEVICES \ Data Rates
20402 + *   and Flow Control Consideration for USB to RS232".
20403 + * - BaudDivisor = (BaseClock / 16) / BaudRate, where the (=) operation should
20404 + *   automagically re-encode the resulting value to take fractions into consideration.
20405 + * As all values are integers, some bit twiddling is in order:
20406 + *   BaudDivisor = (BaseClock / 16 / BaudRate) |
20407 + *   (((BaseClock / 2 / BaudRate) & 2) ? 0x8000 : 0) | // 0.25
20408 + *   (((BaseClock / 2 / BaudRate) & 4) ? 0x4000 : 0) | // 0.5
20409 + *   (((BaseClock / 2 / BaudRate) & 0x7) == 1 ? 0xc000) // 0.125 - this line due to funny encoding only
20410   */
20411  
20412  typedef enum {
20413 -       sio = 1,
20414 -       F8U232AM = 2,
20415 -} ftdi_type_t;
20416 -
20417 +       SIO = 1,
20418 +       FT8U232AM = 2,
20419 +} ftdi_chip_type_t;
20420  
20421  typedef enum {
20422   ftdi_sio_b300 = 0, 
20423 @@ -106,37 +125,18 @@
20424   ftdi_sio_b115200 = 9
20425  } FTDI_SIO_baudrate_t ;
20426  
20427 +#define FTDI_SIO_BASE_BAUD_TO_DIVISOR(base, baud) ( \
20428 +((base/2/baud) >> 3) | \
20429 +(((base/2/baud) & 2) ? 0x8000 : 0) | \
20430 +(((base/2/baud) & 4) ? 0x4000 : 0) | \
20431 +((((base/2/baud) & 0x7) == 1) ? 0xc000 : 0) )
20432  
20433 -typedef enum {
20434 -  ftdi_8U232AM_12MHz_b300 = 0x09c4,
20435 -  ftdi_8U232AM_12MHz_b600 = 0x04E2,
20436 -  ftdi_8U232AM_12MHz_b1200 = 0x0271,
20437 -  ftdi_8U232AM_12MHz_b2400 = 0x4138,
20438 -  ftdi_8U232AM_12MHz_b4800 = 0x809c,
20439 -  ftdi_8U232AM_12MHz_b9600 = 0xc04e,
20440 -  ftdi_8U232AM_12MHz_b19200 = 0x0027,
20441 -  ftdi_8U232AM_12MHz_b38400 = 0x4013,
20442 -  ftdi_8U232AM_12MHz_b57600 = 0x000d,
20443 -  ftdi_8U232AM_12MHz_b115200 = 0x4006,
20444 -  ftdi_8U232AM_12MHz_b230400 = 0x8003,
20445 -} FTDI_8U232AM_12MHz_baudrate_t;
20446 -/* Apparently all devices are 48MHz */
20447 -typedef enum {
20448 -  ftdi_8U232AM_48MHz_b300 = 0x2710,
20449 -  ftdi_8U232AM_48MHz_b600 = 0x1388,
20450 -  ftdi_8U232AM_48MHz_b1200 = 0x09c4,
20451 -  ftdi_8U232AM_48MHz_b2400 = 0x04e2,
20452 -  ftdi_8U232AM_48MHz_b4800 = 0x0271,
20453 -  ftdi_8U232AM_48MHz_b9600 = 0x4138,
20454 -  ftdi_8U232AM_48MHz_b19200 = 0x809c,
20455 -  ftdi_8U232AM_48MHz_b38400 = 0xc04e,
20456 -  ftdi_8U232AM_48MHz_b57600 = 0x0034,
20457 -  ftdi_8U232AM_48MHz_b115200 = 0x001a,
20458 -  ftdi_8U232AM_48MHz_b230400 = 0x000d,
20459 -  ftdi_8U232AM_48MHz_b460800 = 0x4006,
20460 -  ftdi_8U232AM_48MHz_b921600 = 0x8003,
20461 +#define FTDI_SIO_BAUD_TO_DIVISOR(baud) FTDI_SIO_BASE_BAUD_TO_DIVISOR(48000000, baud)
20462  
20463 -} FTDI_8U232AM_48MHz_baudrate_t;
20464 +/*
20465 + * The ftdi_8U232AM_xxMHz_byyy constans have been removed. Their values can
20466 + * be calculated as follows: FTDI_SIO_BAUD_TO_DIVISOR(xx000000, yyy)
20467 + */
20468  
20469  #define FTDI_SIO_SET_DATA_REQUEST FTDI_SIO_SET_DATA
20470  #define FTDI_SIO_SET_DATA_REQUEST_TYPE 0x40
20471 @@ -440,6 +440,11 @@
20472   * B7  Error in RCVR FIFO
20473   * 
20474   */
20475 +#define FTDI_RS0_CTS   (1 << 4)
20476 +#define FTDI_RS0_DSR   (1 << 5)
20477 +#define FTDI_RS0_RI    (1 << 6)
20478 +#define FTDI_RS0_RLSD  (1 << 7)
20479 +
20480  #define FTDI_RS_DR  1
20481  #define FTDI_RS_OE (1<<1)
20482  #define FTDI_RS_PE (1<<2)
20483 diff -Nur linux-2.4.19.org/drivers/usb/serial/io_edgeport.c linux-2.4.19/drivers/usb/serial/io_edgeport.c
20484 --- linux-2.4.19.org/drivers/usb/serial/io_edgeport.c   Sat Aug  3 02:39:45 2002
20485 +++ linux-2.4.19/drivers/usb/serial/io_edgeport.c       Thu Oct 31 08:11:24 2002
20486 @@ -242,13 +242,9 @@
20487  
20488  #include <linux/config.h>
20489  #include <linux/kernel.h>
20490 -#include <linux/sched.h>
20491 -#include <linux/signal.h>
20492  #include <linux/errno.h>
20493 -#include <linux/poll.h>
20494  #include <linux/init.h>
20495  #include <linux/slab.h>
20496 -#include <linux/fcntl.h>
20497  #include <linux/tty.h>
20498  #include <linux/tty_driver.h>
20499  #include <linux/tty_flip.h>
20500 @@ -256,7 +252,7 @@
20501  #include <linux/spinlock.h>
20502  #include <linux/serial.h>
20503  #include <linux/ioctl.h>
20504 -#include <linux/proc_fs.h>
20505 +#include <asm/uaccess.h>
20506  #include <linux/usb.h>
20507  
20508  #ifdef CONFIG_USB_SERIAL_DEBUG
20509 @@ -274,7 +270,7 @@
20510  /*
20511   * Version Information
20512   */
20513 -#define DRIVER_VERSION "v2.2"
20514 +#define DRIVER_VERSION "v2.3"
20515  #define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com> and David Iacovelli"
20516  #define DRIVER_DESC "Edgeport USB Serial Driver"
20517  
20518 @@ -372,8 +368,8 @@
20519  struct edgeport_serial {
20520         char                    name[MAX_NAME_LEN+1];           /* string name of this device */
20521  
20522 -       EDGE_MANUF_DESCRIPTOR           manuf_descriptor;       /* the manufacturer descriptor */
20523 -       EDGE_BOOT_DESCRIPTOR            boot_descriptor;        /* the boot firmware descriptor */
20524 +       struct edge_manuf_descriptor    manuf_descriptor;       /* the manufacturer descriptor */
20525 +       struct edge_boot_descriptor     boot_descriptor;        /* the boot firmware descriptor */
20526         struct edgeport_product_info    product_info;           /* Product Info */
20527  
20528         __u8                    interrupt_in_endpoint;          /* the interrupt endpoint handle */
20529 @@ -400,17 +396,17 @@
20530  };
20531  
20532  /* baud rate information */
20533 -typedef struct _DIVISOR_TABLE_ENTRY {
20534 +struct divisor_table_entry {
20535         __u32   BaudRate;
20536         __u16  Divisor;
20537 -} DIVISOR_TABLE_ENTRY, *PDIVISOR_TABLE_ENTRY;
20538 +};
20539  
20540  //
20541  // Define table of divisors for Rev A EdgePort/4 hardware
20542  // These assume a 3.6864MHz crystal, the standard /16, and
20543  // MCR.7 = 0.
20544  //
20545 -static DIVISOR_TABLE_ENTRY  DivisorTable[] = {
20546 +static struct divisor_table_entry divisor_table[] = {
20547         {   75,         3072},  
20548         {   110,        2095},          /* 2094.545455 => 230450   => .0217 % over */
20549         {   134,        1713},          /* 1713.011152 => 230398.5 => .00065% under */
20550 @@ -510,7 +506,7 @@
20551         __u16 BootBuildNumber;
20552         __u8 *BootImage;      
20553         __u32 BootSize;
20554 -       PEDGE_FIRMWARE_IMAGE_RECORD record;
20555 +       struct edge_firmware_image_record *record;
20556         unsigned char *firmware;
20557         int response;
20558  
20559 @@ -566,13 +562,13 @@
20560                 firmware = BootImage;
20561  
20562                 for (;;) {
20563 -                       record = (PEDGE_FIRMWARE_IMAGE_RECORD)firmware;
20564 +                       record = (struct edge_firmware_image_record *)firmware;
20565                         response = rom_write (edge_serial->serial, record->ExtAddr, record->Addr, record->Len, &record->Data[0]);
20566                         if (response < 0) {
20567                                 err("sram_write failed (%x, %x, %d)", record->ExtAddr, record->Addr, record->Len);
20568                                 break;
20569                         }
20570 -                       firmware += sizeof (EDGE_FIRMWARE_IMAGE_RECORD) + record->Len;
20571 +                       firmware += sizeof (struct edge_firmware_image_record) + record->Len;
20572                         if (firmware >= &BootImage[BootSize]) {
20573                                 break;
20574                         }
20575 @@ -593,7 +589,7 @@
20576         struct usb_string_descriptor StringDesc;
20577         struct usb_string_descriptor *pStringDesc;
20578  
20579 -       dbg(__FUNCTION__ " - USB String ID = %d", Id );
20580 +       dbg("%s - USB String ID = %d", __FUNCTION__, Id );
20581  
20582         if (!usb_get_descriptor(dev, USB_DT_STRING, Id, &StringDesc, sizeof(StringDesc))) {
20583                 return 0;
20584 @@ -628,7 +624,7 @@
20585         struct usb_string_descriptor StringDesc;
20586         struct usb_string_descriptor *pStringDesc;
20587  
20588 -       dbg(__FUNCTION__ " - USB String ID = %d", Id );
20589 +       dbg("%s - USB String ID = %d", __FUNCTION__, Id );
20590  
20591         if (!usb_get_descriptor(dev, USB_DT_STRING, Id, &StringDesc, sizeof(StringDesc))) {
20592                 return 0;
20593 @@ -763,14 +759,14 @@
20594         int portNumber;
20595         int result;
20596  
20597 -       dbg(__FUNCTION__);
20598 +       dbg("%s", __FUNCTION__);
20599  
20600         if (serial_paranoia_check (edge_serial->serial, __FUNCTION__)) {
20601                 return;
20602         }
20603  
20604         if (urb->status) {
20605 -               dbg(__FUNCTION__" - nonzero control read status received: %d", urb->status);
20606 +               dbg("%s - nonzero control read status received: %d", __FUNCTION__, urb->status);
20607                 return;
20608         }
20609  
20610 @@ -782,7 +778,7 @@
20611                         bytes_avail = data[0] | (data[1] << 8);
20612                         if (bytes_avail) {
20613                                 edge_serial->rxBytesAvail += bytes_avail;
20614 -                               dbg(__FUNCTION__" - bytes_avail = %d, rxBytesAvail %d", bytes_avail, edge_serial->rxBytesAvail);
20615 +                               dbg("%s - bytes_avail = %d, rxBytesAvail %d", __FUNCTION__, bytes_avail, edge_serial->rxBytesAvail);
20616  
20617                                 if ((edge_serial->rxBytesAvail > 0) &&
20618                                     (edge_serial->read_urb->status != -EINPROGRESS)) {
20619 @@ -792,7 +788,7 @@
20620                                         edge_serial->read_urb->dev = edge_serial->serial->dev;
20621                                         result = usb_submit_urb(edge_serial->read_urb);
20622                                         if (result) {
20623 -                                               dbg(__FUNCTION__" - usb_submit_urb(read bulk) failed with result = %d", result);
20624 +                                               dbg("%s - usb_submit_urb(read bulk) failed with result = %d", __FUNCTION__, result);
20625                                         }
20626                                 }
20627                         }
20628 @@ -808,10 +804,11 @@
20629                                         edge_port = (struct edgeport_port *)port->private;
20630                                         if (edge_port->open) {
20631                                                 edge_port->txCredits += txCredits;
20632 -                                               dbg(__FUNCTION__" - txcredits for port%d = %d", portNumber, edge_port->txCredits);
20633 +                                               dbg("%s - txcredits for port%d = %d", __FUNCTION__, portNumber, edge_port->txCredits);
20634  
20635                                                 /* tell the tty driver that something has changed */
20636 -                                               wake_up_interruptible(&edge_port->port->tty->write_wait);
20637 +                                               if (edge_port->port->tty)
20638 +                                                       wake_up_interruptible(&edge_port->port->tty->write_wait);
20639  
20640                                                 // Since we have more credit, check if more data can be sent
20641                                                 send_more_port_data(edge_serial, edge_port);
20642 @@ -837,14 +834,14 @@
20643         int                     status;
20644         __u16                   raw_data_length;
20645  
20646 -       dbg(__FUNCTION__);
20647 +       dbg("%s", __FUNCTION__);
20648  
20649         if (serial_paranoia_check (edge_serial->serial, __FUNCTION__)) {
20650                 return;
20651         }
20652  
20653         if (urb->status) {
20654 -               dbg(__FUNCTION__" - nonzero read bulk status received: %d", urb->status);
20655 +               dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
20656                 return;
20657         }
20658  
20659 @@ -856,7 +853,7 @@
20660                 /* decrement our rxBytes available by the number that we just got */
20661                 edge_serial->rxBytesAvail -= raw_data_length;
20662  
20663 -               dbg(__FUNCTION__" - Received = %d, rxBytesAvail %d", raw_data_length, edge_serial->rxBytesAvail);
20664 +               dbg("%s - Received = %d, rxBytesAvail %d", __FUNCTION__, raw_data_length, edge_serial->rxBytesAvail);
20665  
20666                 process_rcvd_data (edge_serial, data, urb->actual_length);
20667  
20668 @@ -869,7 +866,7 @@
20669                         edge_serial->read_urb->dev = edge_serial->serial->dev;
20670                         status = usb_submit_urb(edge_serial->read_urb);
20671                         if (status) {
20672 -                               err(__FUNCTION__" - usb_submit_urb(read bulk) failed, status = %d", status);
20673 +                               err("%s - usb_submit_urb(read bulk) failed, status = %d", __FUNCTION__, status);
20674                         }
20675                 }
20676         }
20677 @@ -886,25 +883,27 @@
20678         struct edgeport_port *edge_port = (struct edgeport_port *)urb->context;
20679         struct tty_struct *tty;
20680  
20681 -       dbg(__FUNCTION__);
20682 +       dbg("%s", __FUNCTION__);
20683  
20684         if (port_paranoia_check (edge_port->port, __FUNCTION__)) {
20685                 return;
20686         }
20687  
20688         if (urb->status) {
20689 -               dbg(__FUNCTION__" - nonzero write bulk status received: %d", urb->status);
20690 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
20691         }
20692  
20693         tty = edge_port->port->tty;
20694  
20695 -       /* let the tty driver wakeup if it has a special write_wakeup function */
20696 -       if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
20697 -               (tty->ldisc.write_wakeup)(tty);
20698 -       }
20699 +       if (tty) {
20700 +               /* let the tty driver wakeup if it has a special write_wakeup function */
20701 +               if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
20702 +                       (tty->ldisc.write_wakeup)(tty);
20703 +               }
20704  
20705 -       /* tell the tty driver that something has changed */
20706 -       wake_up_interruptible(&tty->write_wait);
20707 +               /* tell the tty driver that something has changed */
20708 +               wake_up_interruptible(&tty->write_wait);
20709 +       }
20710  
20711         // Release the Write URB
20712         edge_port->write_in_progress = FALSE;
20713 @@ -925,10 +924,10 @@
20714         struct tty_struct *tty;
20715         int status = urb->status;
20716  
20717 -       dbg(__FUNCTION__);
20718 +       dbg("%s", __FUNCTION__);
20719  
20720         CmdUrbs--;
20721 -       dbg(__FUNCTION__" - FREE URB %p (outstanding %d)", urb, CmdUrbs);
20722 +       dbg("%s - FREE URB %p (outstanding %d)", __FUNCTION__, urb, CmdUrbs);
20723  
20724  
20725         /* clean up the transfer buffer */
20726 @@ -945,7 +944,7 @@
20727         }
20728  
20729         if (status) {
20730 -               dbg(__FUNCTION__" - nonzero write bulk status received: %d", status);
20731 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, status);
20732                 return;
20733         }
20734  
20735 @@ -953,7 +952,8 @@
20736         tty = edge_port->port->tty;
20737  
20738         /* tell the tty driver that something has changed */
20739 -       wake_up_interruptible(&tty->write_wait);
20740 +       if (tty)
20741 +               wake_up_interruptible(&tty->write_wait);
20742  
20743         /* we have completed the command */
20744         edge_port->commandPending = FALSE;
20745 @@ -982,139 +982,124 @@
20746         if (port_paranoia_check (port, __FUNCTION__))
20747                 return -ENODEV;
20748         
20749 -       dbg(__FUNCTION__ " - port %d", port->number);
20750 +       dbg("%s - port %d", __FUNCTION__, port->number);
20751  
20752         if (edge_port == NULL)
20753                 return -ENODEV;
20754  
20755 -       ++port->open_count;
20756 -       MOD_INC_USE_COUNT;
20757 -       
20758 -       if (!port->active) {
20759 -               port->active = 1;
20760 -
20761 -               /* force low_latency on so that our tty_push actually forces the data through, 
20762 -                  otherwise it is scheduled, and with high data rates (like with OHCI) data
20763 -                  can get lost. */
20764 +       /* force low_latency on so that our tty_push actually forces the data through, 
20765 +          otherwise it is scheduled, and with high data rates (like with OHCI) data
20766 +          can get lost. */
20767 +       if (port->tty)
20768                 port->tty->low_latency = 1;
20769 +
20770 +       /* see if we've set up our endpoint info yet (can't set it up in edge_startup
20771 +          as the structures were not set up at that time.) */
20772 +       serial = port->serial;
20773 +       edge_serial = (struct edgeport_serial *)serial->private;
20774 +       if (edge_serial == NULL) {
20775 +               return -ENODEV;
20776 +       }
20777 +       if (edge_serial->interrupt_in_buffer == NULL) {
20778 +               struct usb_serial_port *port0 = &serial->port[0];
20779 +               
20780 +               /* not set up yet, so do it now */
20781 +               edge_serial->interrupt_in_buffer = port0->interrupt_in_buffer;
20782 +               edge_serial->interrupt_in_endpoint = port0->interrupt_in_endpointAddress;
20783 +               edge_serial->interrupt_read_urb = port0->interrupt_in_urb;
20784 +               edge_serial->bulk_in_buffer = port0->bulk_in_buffer;
20785 +               edge_serial->bulk_in_endpoint = port0->bulk_in_endpointAddress;
20786 +               edge_serial->read_urb = port0->read_urb;
20787 +               edge_serial->bulk_out_endpoint = port0->bulk_out_endpointAddress;
20788         
20789 -               /* see if we've set up our endpoint info yet (can't set it up in edge_startup
20790 -                  as the structures were not set up at that time.) */
20791 -               serial = port->serial;
20792 -               edge_serial = (struct edgeport_serial *)serial->private;
20793 -               if (edge_serial == NULL) {
20794 -                       port->active = 0;
20795 -                       port->open_count = 0;
20796 -                       MOD_DEC_USE_COUNT;
20797 -                       return -ENODEV;
20798 -               }
20799 -               if (edge_serial->interrupt_in_buffer == NULL) {
20800 -                       struct usb_serial_port *port0 = &serial->port[0];
20801 -                       
20802 -                       /* not set up yet, so do it now */
20803 -                       edge_serial->interrupt_in_buffer = port0->interrupt_in_buffer;
20804 -                       edge_serial->interrupt_in_endpoint = port0->interrupt_in_endpointAddress;
20805 -                       edge_serial->interrupt_read_urb = port0->interrupt_in_urb;
20806 -                       edge_serial->bulk_in_buffer = port0->bulk_in_buffer;
20807 -                       edge_serial->bulk_in_endpoint = port0->bulk_in_endpointAddress;
20808 -                       edge_serial->read_urb = port0->read_urb;
20809 -                       edge_serial->bulk_out_endpoint = port0->bulk_out_endpointAddress;
20810 +               /* set up our interrupt urb */
20811 +               FILL_INT_URB(edge_serial->interrupt_read_urb,
20812 +                            serial->dev,
20813 +                            usb_rcvintpipe(serial->dev,
20814 +                                           port0->interrupt_in_endpointAddress),
20815 +                            port0->interrupt_in_buffer,
20816 +                            edge_serial->interrupt_read_urb->transfer_buffer_length,
20817 +                            edge_interrupt_callback, edge_serial,
20818 +                            edge_serial->interrupt_read_urb->interval);
20819                 
20820 -                       /* set up our interrupt urb */
20821 -                       FILL_INT_URB(edge_serial->interrupt_read_urb,
20822 -                                    serial->dev,
20823 -                                    usb_rcvintpipe(serial->dev,
20824 -                                                   port0->interrupt_in_endpointAddress),
20825 -                                    port0->interrupt_in_buffer,
20826 -                                    edge_serial->interrupt_read_urb->transfer_buffer_length,
20827 -                                    edge_interrupt_callback, edge_serial,
20828 -                                    edge_serial->interrupt_read_urb->interval);
20829 -                       
20830 -                       /* set up our bulk in urb */
20831 -                       FILL_BULK_URB(edge_serial->read_urb, serial->dev,
20832 -                                     usb_rcvbulkpipe(serial->dev, port0->bulk_in_endpointAddress),
20833 -                                     port0->bulk_in_buffer,
20834 -                                     edge_serial->read_urb->transfer_buffer_length,
20835 -                                     edge_bulk_in_callback, edge_serial);
20836 -
20837 -                       /* start interrupt read for this edgeport
20838 -                        * this interrupt will continue as long as the edgeport is connected */
20839 -                       response = usb_submit_urb (edge_serial->interrupt_read_urb);
20840 -                       if (response) {
20841 -                               err(__FUNCTION__" - Error %d submitting control urb", response);
20842 -                       }
20843 +               /* set up our bulk in urb */
20844 +               FILL_BULK_URB(edge_serial->read_urb, serial->dev,
20845 +                             usb_rcvbulkpipe(serial->dev, port0->bulk_in_endpointAddress),
20846 +                             port0->bulk_in_buffer,
20847 +                             edge_serial->read_urb->transfer_buffer_length,
20848 +                             edge_bulk_in_callback, edge_serial);
20849 +
20850 +               /* start interrupt read for this edgeport
20851 +                * this interrupt will continue as long as the edgeport is connected */
20852 +               response = usb_submit_urb (edge_serial->interrupt_read_urb);
20853 +               if (response) {
20854 +                       err("%s - Error %d submitting control urb", __FUNCTION__, response);
20855                 }
20856 -               
20857 -               /* initialize our wait queues */
20858 -               init_waitqueue_head(&edge_port->wait_open);
20859 -               init_waitqueue_head(&edge_port->wait_chase);
20860 -               init_waitqueue_head(&edge_port->delta_msr_wait);
20861 -               init_waitqueue_head(&edge_port->wait_command);
20862 -
20863 -               /* initialize our icount structure */
20864 -               memset (&(edge_port->icount), 0x00, sizeof(edge_port->icount));
20865 -
20866 -               /* initialize our port settings */
20867 -               edge_port->txCredits            = 0;                    /* Can't send any data yet */
20868 -               edge_port->shadowMCR            = MCR_MASTER_IE;        /* Must always set this bit to enable ints! */
20869 -               edge_port->chaseResponsePending = FALSE;
20870 +       }
20871 +       
20872 +       /* initialize our wait queues */
20873 +       init_waitqueue_head(&edge_port->wait_open);
20874 +       init_waitqueue_head(&edge_port->wait_chase);
20875 +       init_waitqueue_head(&edge_port->delta_msr_wait);
20876 +       init_waitqueue_head(&edge_port->wait_command);
20877 +
20878 +       /* initialize our icount structure */
20879 +       memset (&(edge_port->icount), 0x00, sizeof(edge_port->icount));
20880 +
20881 +       /* initialize our port settings */
20882 +       edge_port->txCredits            = 0;                    /* Can't send any data yet */
20883 +       edge_port->shadowMCR            = MCR_MASTER_IE;        /* Must always set this bit to enable ints! */
20884 +       edge_port->chaseResponsePending = FALSE;
20885 +
20886 +       /* send a open port command */
20887 +       edge_port->openPending = TRUE;
20888 +       edge_port->open        = FALSE;
20889 +       response = send_iosp_ext_cmd (edge_port, IOSP_CMD_OPEN_PORT, 0);
20890  
20891 -               /* send a open port command */
20892 -               edge_port->openPending = TRUE;
20893 -               edge_port->open        = FALSE;
20894 -               response = send_iosp_ext_cmd (edge_port, IOSP_CMD_OPEN_PORT, 0);
20895 +       if (response < 0) {
20896 +               err("%s - error sending open port command", __FUNCTION__);
20897 +               edge_port->openPending = FALSE;
20898 +               return -ENODEV;
20899 +       }
20900  
20901 -               if (response < 0) {
20902 -                       err(__FUNCTION__" - error sending open port command");
20903 -                       edge_port->openPending = FALSE;
20904 -                       port->active = 0;
20905 -                       port->open_count = 0;
20906 -                       MOD_DEC_USE_COUNT;
20907 -                       return -ENODEV;
20908 -               }
20909 -
20910 -               /* now wait for the port to be completly opened */
20911 -               timeout = OPEN_TIMEOUT;
20912 -               while (timeout && edge_port->openPending == TRUE) {
20913 -                       timeout = interruptible_sleep_on_timeout (&edge_port->wait_open, timeout);
20914 -               }
20915 -
20916 -               if (edge_port->open == FALSE) {
20917 -                       /* open timed out */
20918 -                       dbg(__FUNCTION__" - open timedout");
20919 -                       edge_port->openPending = FALSE;
20920 -                       port->active = 0;
20921 -                       port->open_count = 0;
20922 -                       MOD_DEC_USE_COUNT;
20923 -                       return -ENODEV;
20924 -               }
20925 -
20926 -               /* create the txfifo */
20927 -               edge_port->txfifo.head  = 0;
20928 -               edge_port->txfifo.tail  = 0;
20929 -               edge_port->txfifo.count = 0;
20930 -               edge_port->txfifo.size  = edge_port->maxTxCredits;
20931 -               edge_port->txfifo.fifo  = kmalloc (edge_port->maxTxCredits, GFP_KERNEL);
20932 -
20933 -               if (!edge_port->txfifo.fifo) {
20934 -                       dbg(__FUNCTION__" - no memory");
20935 -                       edge_close (port, filp);
20936 -                       return -ENOMEM;
20937 -               }
20938 +       /* now wait for the port to be completly opened */
20939 +       timeout = OPEN_TIMEOUT;
20940 +       while (timeout && edge_port->openPending == TRUE) {
20941 +               timeout = interruptible_sleep_on_timeout (&edge_port->wait_open, timeout);
20942 +       }
20943  
20944 -               /* Allocate a URB for the write */
20945 -               edge_port->write_urb = usb_alloc_urb (0);
20946 +       if (edge_port->open == FALSE) {
20947 +               /* open timed out */
20948 +               dbg("%s - open timedout", __FUNCTION__);
20949 +               edge_port->openPending = FALSE;
20950 +               return -ENODEV;
20951 +       }
20952  
20953 -               if (!edge_port->write_urb) {
20954 -                       dbg(__FUNCTION__" - no memory");
20955 -                       edge_close (port, filp);
20956 -                       return -ENOMEM;
20957 -               }
20958 +       /* create the txfifo */
20959 +       edge_port->txfifo.head  = 0;
20960 +       edge_port->txfifo.tail  = 0;
20961 +       edge_port->txfifo.count = 0;
20962 +       edge_port->txfifo.size  = edge_port->maxTxCredits;
20963 +       edge_port->txfifo.fifo  = kmalloc (edge_port->maxTxCredits, GFP_KERNEL);
20964 +
20965 +       if (!edge_port->txfifo.fifo) {
20966 +               dbg("%s - no memory", __FUNCTION__);
20967 +               edge_close (port, filp);
20968 +               return -ENOMEM;
20969 +       }
20970 +
20971 +       /* Allocate a URB for the write */
20972 +       edge_port->write_urb = usb_alloc_urb (0);
20973  
20974 -               dbg(__FUNCTION__"(%d) - Initialize TX fifo to %d bytes", port->number, edge_port->maxTxCredits);
20975 +       if (!edge_port->write_urb) {
20976 +               dbg("%s - no memory", __FUNCTION__);
20977 +               edge_close (port, filp);
20978 +               return -ENOMEM;
20979         }
20980  
20981 -       dbg(__FUNCTION__" exited");
20982 +       dbg("%s(%d) - Initialize TX fifo to %d bytes", __FUNCTION__, port->number, edge_port->maxTxCredits);
20983 +
20984 +       dbg("%s exited", __FUNCTION__);
20985  
20986         return 0;
20987  }
20988 @@ -1142,11 +1127,11 @@
20989  
20990                 // Did we get our Chase response
20991                 if (edge_port->chaseResponsePending == FALSE) {
20992 -                       dbg(__FUNCTION__" - Got Chase Response");
20993 +                       dbg("%s - Got Chase Response", __FUNCTION__);
20994  
20995                         // did we get all of our credit back?
20996                         if (edge_port->txCredits == edge_port->maxTxCredits ) {
20997 -                               dbg(__FUNCTION__" - Got all credits");
20998 +                               dbg("%s - Got all credits", __FUNCTION__);
20999                                 return;
21000                         }
21001                 }
21002 @@ -1159,12 +1144,12 @@
21003                         wait--;
21004                         if (wait == 0) {
21005                                 edge_port->chaseResponsePending = FALSE;
21006 -                               dbg(__FUNCTION__" - Chase TIMEOUT");
21007 +                               dbg("%s - Chase TIMEOUT", __FUNCTION__);
21008                                 return;
21009                         }
21010                 } else {
21011                         // Reset timout value back to 10 seconds
21012 -                       dbg(__FUNCTION__" - Last %d, Current %d", lastCredits, edge_port->txCredits);
21013 +                       dbg("%s - Last %d, Current %d", __FUNCTION__, lastCredits, edge_port->txCredits);
21014                         wait = 10;
21015                 }
21016         }
21017 @@ -1194,20 +1179,20 @@
21018  
21019                 // Is the Edgeport Buffer empty?
21020                 if (lastCount == 0) {
21021 -                       dbg(__FUNCTION__" - TX Buffer Empty");
21022 +                       dbg("%s - TX Buffer Empty", __FUNCTION__);
21023                         return;
21024                 }
21025  
21026                 // Block the thread for a while
21027                 interruptible_sleep_on_timeout (&edge_port->wait_chase, timeout);
21028  
21029 -               dbg(__FUNCTION__ " wait");
21030 +               dbg("%s wait", __FUNCTION__);
21031  
21032                 if (lastCount == fifo->count) {
21033                         // No activity.. count down.
21034                         wait--;
21035                         if (wait == 0) {
21036 -                               dbg(__FUNCTION__" - TIMEOUT");
21037 +                               dbg("%s - TIMEOUT", __FUNCTION__);
21038                                 return;
21039                         }
21040                 } else {
21041 @@ -1232,7 +1217,7 @@
21042         if (port_paranoia_check (port, __FUNCTION__))
21043                 return;
21044         
21045 -       dbg(__FUNCTION__ " - port %d", port->number);
21046 +       dbg("%s - port %d", __FUNCTION__, port->number);
21047                          
21048         serial = get_usb_serial (port, __FUNCTION__);
21049         if (!serial)
21050 @@ -1243,57 +1228,50 @@
21051         if ((edge_serial == NULL) || (edge_port == NULL))
21052                 return;
21053         
21054 -       --port->open_count;
21055 +       if (serial->dev) {
21056 +               // block until tx is empty
21057 +               block_until_tx_empty(edge_port);
21058 +
21059 +               edge_port->closePending = TRUE;
21060 +
21061 +               /* flush and chase */
21062 +               edge_port->chaseResponsePending = TRUE;
21063 +
21064 +               dbg("%s - Sending IOSP_CMD_CHASE_PORT", __FUNCTION__);
21065 +               status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0);
21066 +               if (status == 0) {
21067 +                       // block until chase finished
21068 +                       block_until_chase_response(edge_port);
21069 +               } else {
21070 +                       edge_port->chaseResponsePending = FALSE;
21071 +               }
21072  
21073 -       if (port->open_count <= 0) {
21074 -               if (serial->dev) {
21075 -                       // block until tx is empty
21076 -                       block_until_tx_empty(edge_port);
21077 -
21078 -                       edge_port->closePending = TRUE;
21079 -
21080 -                       /* flush and chase */
21081 -                       edge_port->chaseResponsePending = TRUE;
21082 -
21083 -                       dbg(__FUNCTION__" - Sending IOSP_CMD_CHASE_PORT");
21084 -                       status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0);
21085 -                       if (status == 0) {
21086 -                               // block until chase finished
21087 -                               block_until_chase_response(edge_port);
21088 -                       } else {
21089 -                               edge_port->chaseResponsePending = FALSE;
21090 -                       }
21091 +               /* close the port */
21092 +               dbg("%s - Sending IOSP_CMD_CLOSE_PORT", __FUNCTION__);
21093 +               send_iosp_ext_cmd (edge_port, IOSP_CMD_CLOSE_PORT, 0);
21094  
21095 -                       /* close the port */
21096 -                       dbg(__FUNCTION__" - Sending IOSP_CMD_CLOSE_PORT");
21097 -                       send_iosp_ext_cmd (edge_port, IOSP_CMD_CLOSE_PORT, 0);
21098 -
21099 -                       //port->close = TRUE;
21100 -                       edge_port->closePending = FALSE;
21101 -                       edge_port->open = FALSE;
21102 -                       edge_port->openPending = FALSE;
21103 +               //port->close = TRUE;
21104 +               edge_port->closePending = FALSE;
21105 +               edge_port->open = FALSE;
21106 +               edge_port->openPending = FALSE;
21107  
21108 -                       if (edge_port->write_urb) {
21109 -                               usb_unlink_urb (edge_port->write_urb);
21110 -                       }
21111 -               }
21112 -       
21113                 if (edge_port->write_urb) {
21114 -                       /* if this urb had a transfer buffer already (old transfer) free it */
21115 -                       if (edge_port->write_urb->transfer_buffer != NULL) {
21116 -                               kfree(edge_port->write_urb->transfer_buffer);
21117 -                       }
21118 -                       usb_free_urb   (edge_port->write_urb);
21119 +                       usb_unlink_urb (edge_port->write_urb);
21120                 }
21121 -               if (edge_port->txfifo.fifo) {
21122 -                       kfree(edge_port->txfifo.fifo);
21123 +       }
21124 +
21125 +       if (edge_port->write_urb) {
21126 +               /* if this urb had a transfer buffer already (old transfer) free it */
21127 +               if (edge_port->write_urb->transfer_buffer != NULL) {
21128 +                       kfree(edge_port->write_urb->transfer_buffer);
21129                 }
21130 -               port->active = 0;
21131 -               port->open_count = 0;
21132 +               usb_free_urb   (edge_port->write_urb);
21133 +       }
21134 +       if (edge_port->txfifo.fifo) {
21135 +               kfree(edge_port->txfifo.fifo);
21136         }
21137  
21138 -       MOD_DEC_USE_COUNT;
21139 -       dbg(__FUNCTION__" exited");
21140 +       dbg("%s exited", __FUNCTION__);
21141  }   
21142  
21143  /*****************************************************************************
21144 @@ -1312,7 +1290,7 @@
21145         int firsthalf;
21146         int secondhalf;
21147  
21148 -       dbg(__FUNCTION__ " - port %d", port->number);
21149 +       dbg("%s - port %d", __FUNCTION__, port->number);
21150  
21151         if (edge_port == NULL)
21152                 return -ENODEV;
21153 @@ -1323,12 +1301,12 @@
21154         // calculate number of bytes to put in fifo
21155         copySize = min ((unsigned int)count, (edge_port->txCredits - fifo->count));
21156  
21157 -       dbg(__FUNCTION__"(%d) of %d byte(s) Fifo room  %d -- will copy %d bytes", 
21158 +       dbg("%s(%d) of %d byte(s) Fifo room  %d -- will copy %d bytes", __FUNCTION__, 
21159             port->number, count, edge_port->txCredits - fifo->count, copySize);
21160  
21161         /* catch writes of 0 bytes which the tty driver likes to give us, and when txCredits is empty */
21162         if (copySize == 0) {
21163 -               dbg (__FUNCTION__" - copySize = Zero");
21164 +               dbg("%s - copySize = Zero", __FUNCTION__);
21165                 return 0;
21166         }
21167  
21168 @@ -1340,7 +1318,7 @@
21169  
21170         bytesleft = fifo->size - fifo->head;
21171         firsthalf = min (bytesleft, copySize);
21172 -       dbg (__FUNCTION__" - copy %d bytes of %d into fifo ", firsthalf, bytesleft);
21173 +       dbg("%s - copy %d bytes of %d into fifo ", __FUNCTION__, firsthalf, bytesleft);
21174  
21175         /* now copy our data */
21176         if (from_user) {
21177 @@ -1362,7 +1340,7 @@
21178         secondhalf = copySize-firsthalf;
21179  
21180         if (secondhalf) {
21181 -               dbg (__FUNCTION__" - copy rest of data %d", secondhalf);
21182 +               dbg("%s - copy rest of data %d", __FUNCTION__, secondhalf);
21183                 if (from_user) {
21184                         if (copy_from_user(&fifo->fifo[fifo->head], &data[firsthalf], secondhalf))
21185                                 return -EFAULT;
21186 @@ -1381,7 +1359,7 @@
21187  
21188         send_more_port_data((struct edgeport_serial *)port->serial->private, edge_port);
21189  
21190 -       dbg(__FUNCTION__" wrote %d byte(s) TxCredits %d, Fifo %d", copySize, edge_port->txCredits, fifo->count);
21191 +       dbg("%s wrote %d byte(s) TxCredits %d, Fifo %d", __FUNCTION__, copySize, edge_port->txCredits, fifo->count);
21192  
21193         return copySize;   
21194  }
21195 @@ -1411,12 +1389,12 @@
21196         int             firsthalf;
21197         int             secondhalf;
21198  
21199 -       dbg(__FUNCTION__"(%d)", edge_port->port->number);
21200 +       dbg("%s(%d)", __FUNCTION__, edge_port->port->number);
21201  
21202         if (edge_port->write_in_progress ||
21203             !edge_port->open             ||
21204             (fifo->count == 0)) {
21205 -               dbg(__FUNCTION__"(%d) EXIT - fifo %d, PendingWrite = %d", edge_port->port->number, fifo->count, edge_port->write_in_progress);
21206 +               dbg("%s(%d) EXIT - fifo %d, PendingWrite = %d", __FUNCTION__, edge_port->port->number, fifo->count, edge_port->write_in_progress);
21207                 return;
21208         }
21209  
21210 @@ -1428,7 +1406,7 @@
21211         //      it's better to wait for more credits so we can do a larger
21212         //      write.
21213         if (edge_port->txCredits < EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(edge_port->maxTxCredits)) {
21214 -               dbg(__FUNCTION__"(%d) Not enough credit - fifo %d TxCredit %d", edge_port->port->number, fifo->count, edge_port->txCredits );
21215 +               dbg("%s(%d) Not enough credit - fifo %d TxCredit %d", __FUNCTION__, edge_port->port->number, fifo->count, edge_port->txCredits );
21216                 return;
21217         }
21218  
21219 @@ -1446,9 +1424,9 @@
21220  
21221         /* build the data header for the buffer and port that we are about to send out */
21222         count = fifo->count;
21223 -       buffer = kmalloc (count+2, GFP_KERNEL);
21224 +       buffer = kmalloc (count+2, GFP_ATOMIC);
21225         if (buffer == NULL) {
21226 -               err(__FUNCTION__" - no more kernel memory...");
21227 +               err("%s - no more kernel memory...", __FUNCTION__);
21228                 edge_port->write_in_progress = FALSE;
21229                 return;
21230         }
21231 @@ -1488,14 +1466,14 @@
21232         status = usb_submit_urb(urb);
21233         if (status) {
21234                 /* something went wrong */
21235 -               dbg(__FUNCTION__" - usb_submit_urb(write bulk) failed");
21236 +               dbg("%s - usb_submit_urb(write bulk) failed", __FUNCTION__);
21237                 edge_port->write_in_progress = FALSE;
21238         } else {
21239                 /* decrement the number of credits we have by the number we just sent */
21240                 edge_port->txCredits -= count;
21241                 edge_port->icount.tx += count;
21242         }
21243 -       dbg(__FUNCTION__" wrote %d byte(s) TxCredit %d, Fifo %d", count, edge_port->txCredits, fifo->count);
21244 +       dbg("%s wrote %d byte(s) TxCredit %d, Fifo %d", __FUNCTION__, count, edge_port->txCredits, fifo->count);
21245  }
21246  
21247  
21248 @@ -1512,24 +1490,24 @@
21249         struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
21250         int room;
21251  
21252 -       dbg(__FUNCTION__);
21253 +       dbg("%s", __FUNCTION__);
21254  
21255         if (edge_port == NULL)
21256                 return -ENODEV;
21257         if (edge_port->closePending == TRUE)
21258                 return -ENODEV;
21259  
21260 -       dbg(__FUNCTION__" - port %d", port->number);
21261 +       dbg("%s - port %d", __FUNCTION__, port->number);
21262  
21263         if (!edge_port->open) {
21264 -               dbg (__FUNCTION__" - port not opened");
21265 +               dbg("%s - port not opened", __FUNCTION__);
21266                 return -EINVAL;
21267         }
21268  
21269         // total of both buffers is still txCredit
21270         room = edge_port->txCredits - edge_port->txfifo.count;
21271  
21272 -       dbg(__FUNCTION__" - returns %d", room);
21273 +       dbg("%s - returns %d", __FUNCTION__, room);
21274         return room;
21275  }
21276  
21277 @@ -1548,7 +1526,7 @@
21278         struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
21279         int num_chars;
21280  
21281 -       dbg(__FUNCTION__);
21282 +       dbg("%s", __FUNCTION__);
21283  
21284         if (edge_port == NULL)
21285                 return -ENODEV;
21286 @@ -1556,13 +1534,13 @@
21287                 return -ENODEV;
21288  
21289         if (!edge_port->open) {
21290 -               dbg (__FUNCTION__" - port not opened");
21291 +               dbg("%s - port not opened", __FUNCTION__);
21292                 return -EINVAL;
21293         }
21294  
21295         num_chars = edge_port->maxTxCredits - edge_port->txCredits + edge_port->txfifo.count;
21296         if (num_chars) {
21297 -               dbg(__FUNCTION__"(port %d) - returns %d", port->number, num_chars);
21298 +               dbg("%s(port %d) - returns %d", __FUNCTION__, port->number, num_chars);
21299         }
21300  
21301         return num_chars;
21302 @@ -1580,17 +1558,21 @@
21303         struct tty_struct *tty;
21304         int status;
21305  
21306 -       dbg(__FUNCTION__" - port %d", port->number);
21307 +       dbg("%s - port %d", __FUNCTION__, port->number);
21308  
21309         if (edge_port == NULL)
21310                 return;
21311  
21312         if (!edge_port->open) {
21313 -               dbg (__FUNCTION__" - port not opened");
21314 +               dbg("%s - port not opened", __FUNCTION__);
21315                 return;
21316         }
21317  
21318         tty = port->tty;
21319 +       if (!tty) {
21320 +               dbg ("%s - no tty available", __FUNCTION__);
21321 +               return;
21322 +       }
21323  
21324         /* if we are implementing XON/XOFF, send the stop character */
21325         if (I_IXOFF(tty)) {
21326 @@ -1625,17 +1607,21 @@
21327         struct tty_struct *tty;
21328         int status;
21329  
21330 -       dbg(__FUNCTION__" - port %d", port->number);
21331 +       dbg("%s - port %d", __FUNCTION__, port->number);
21332  
21333         if (edge_port == NULL)
21334                 return;
21335  
21336         if (!edge_port->open) {
21337 -               dbg (__FUNCTION__" - port not opened");
21338 +               dbg("%s - port not opened", __FUNCTION__);
21339                 return;
21340         }
21341  
21342         tty = port->tty;
21343 +       if (!tty) {
21344 +               dbg ("%s - no tty available", __FUNCTION__);
21345 +               return;
21346 +       }
21347  
21348         /* if we are implementing XON/XOFF, send the start character */
21349         if (I_IXOFF(tty)) {
21350 @@ -1667,31 +1653,39 @@
21351  {
21352         struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
21353         struct tty_struct *tty = port->tty;
21354 -       unsigned int cflag = tty->termios->c_cflag;
21355 +       unsigned int cflag;
21356  
21357 -       dbg(__FUNCTION__" - clfag %08x %08x iflag %08x %08x", 
21358 -           tty->termios->c_cflag,
21359 -           old_termios->c_cflag,
21360 -           RELEVANT_IFLAG(tty->termios->c_iflag),
21361 -           RELEVANT_IFLAG(old_termios->c_iflag)
21362 -          );
21363 +       if (!port->tty || !port->tty->termios) {
21364 +               dbg ("%s - no tty or termios", __FUNCTION__);
21365 +               return;
21366 +       }
21367  
21368 +       cflag = tty->termios->c_cflag;
21369         /* check that they really want us to change something */
21370         if (old_termios) {
21371                 if ((cflag == old_termios->c_cflag) &&
21372                     (RELEVANT_IFLAG(tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
21373 -                       dbg(__FUNCTION__" - nothing to change");
21374 +                       dbg("%s - nothing to change", __FUNCTION__);
21375                         return;
21376                 }
21377         }
21378  
21379 -       dbg(__FUNCTION__" - port %d", port->number);
21380 +       dbg("%s - clfag %08x iflag %08x", __FUNCTION__, 
21381 +           tty->termios->c_cflag,
21382 +           RELEVANT_IFLAG(tty->termios->c_iflag));
21383 +       if (old_termios) {
21384 +               dbg("%s - old clfag %08x old iflag %08x", __FUNCTION__,
21385 +                   old_termios->c_cflag,
21386 +                   RELEVANT_IFLAG(old_termios->c_iflag));
21387 +       }
21388 +
21389 +       dbg("%s - port %d", __FUNCTION__, port->number);
21390  
21391         if (edge_port == NULL)
21392                 return;
21393  
21394         if (!edge_port->open) {
21395 -               dbg (__FUNCTION__" - port not opened");
21396 +               dbg("%s - port not opened", __FUNCTION__);
21397                 return;
21398         }
21399  
21400 @@ -1718,7 +1712,7 @@
21401  
21402         if (edge_port->maxTxCredits == edge_port->txCredits &&
21403             edge_port->txfifo.count == 0) {
21404 -               dbg(__FUNCTION__" -- Empty");
21405 +               dbg("%s -- Empty", __FUNCTION__);
21406                 result = TIOCSER_TEMT;
21407         }
21408  
21409 @@ -1732,9 +1726,12 @@
21410         unsigned int result = 0;
21411         struct tty_struct *tty = edge_port->port->tty;
21412  
21413 +       if (!tty)
21414 +               return -ENOIOCTLCMD;
21415 +
21416         result = tty->read_cnt;
21417  
21418 -       dbg(__FUNCTION__"(%d) = %d",  edge_port->port->number, result);
21419 +       dbg("%s(%d) = %d", __FUNCTION__,  edge_port->port->number, result);
21420         if (copy_to_user(value, &result, sizeof(int)))
21421                 return -EFAULT;
21422         //return 0;
21423 @@ -1799,7 +1796,7 @@
21424                   | ((msr & MSR_DSR)    ? TIOCM_DSR: 0);  /* 0x100 */
21425  
21426  
21427 -       dbg(__FUNCTION__" -- %x", result);
21428 +       dbg("%s -- %x", __FUNCTION__, result);
21429  
21430         if (copy_to_user(value, &result, sizeof(int)))
21431                 return -EFAULT;
21432 @@ -1850,40 +1847,40 @@
21433         struct serial_icounter_struct icount;
21434  
21435  
21436 -       dbg(__FUNCTION__" - port %d, cmd = 0x%x", port->number, cmd);
21437 +       dbg("%s - port %d, cmd = 0x%x", __FUNCTION__, port->number, cmd);
21438  
21439         switch (cmd) {
21440                 // return number of bytes available
21441                 case TIOCINQ:
21442 -                       dbg(__FUNCTION__" (%d) TIOCINQ",  port->number);
21443 +                       dbg("%s (%d) TIOCINQ", __FUNCTION__,  port->number);
21444                         return get_number_bytes_avail(edge_port, (unsigned int *) arg);
21445                         break;
21446  
21447                 case TIOCSERGETLSR:
21448 -                       dbg(__FUNCTION__" (%d) TIOCSERGETLSR",  port->number);
21449 +                       dbg("%s (%d) TIOCSERGETLSR", __FUNCTION__,  port->number);
21450                         return get_lsr_info(edge_port, (unsigned int *) arg);
21451                         return 0;
21452  
21453                 case TIOCMBIS:
21454                 case TIOCMBIC:
21455                 case TIOCMSET:
21456 -                       dbg(__FUNCTION__" (%d) TIOCMSET/TIOCMBIC/TIOCMSET",  port->number);
21457 +                       dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __FUNCTION__,  port->number);
21458                         return set_modem_info(edge_port, cmd, (unsigned int *) arg);
21459  
21460                 case TIOCMGET:  
21461 -                       dbg(__FUNCTION__" (%d) TIOCMGET",  port->number);
21462 +                       dbg("%s (%d) TIOCMGET", __FUNCTION__,  port->number);
21463                         return get_modem_info(edge_port, (unsigned int *) arg);
21464  
21465                 case TIOCGSERIAL:
21466 -                       dbg(__FUNCTION__" (%d) TIOCGSERIAL",  port->number);
21467 +                       dbg("%s (%d) TIOCGSERIAL", __FUNCTION__,  port->number);
21468                         return get_serial_info(edge_port, (struct serial_struct *) arg);
21469  
21470                 case TIOCSSERIAL:
21471 -                       dbg(__FUNCTION__" (%d) TIOCSSERIAL",  port->number);
21472 +                       dbg("%s (%d) TIOCSSERIAL", __FUNCTION__,  port->number);
21473                         break;
21474  
21475                 case TIOCMIWAIT:
21476 -                       dbg(__FUNCTION__" (%d) TIOCMIWAIT",  port->number);
21477 +                       dbg("%s (%d) TIOCMIWAIT", __FUNCTION__,  port->number);
21478                         cprev = edge_port->icount;
21479                         while (1) {
21480                                 interruptible_sleep_on(&edge_port->delta_msr_wait);
21481 @@ -1919,7 +1916,7 @@
21482                         icount.brk = cnow.brk;
21483                         icount.buf_overrun = cnow.buf_overrun;
21484  
21485 -                       dbg(__FUNCTION__" (%d) TIOCGICOUNT RX=%d, TX=%d",  port->number, icount.rx, icount.tx );
21486 +                       dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__,  port->number, icount.rx, icount.tx );
21487                         if (copy_to_user((void *)arg, &icount, sizeof(icount)))
21488                                 return -EFAULT;
21489                         return 0;
21490 @@ -1941,7 +1938,7 @@
21491         /* flush and chase */
21492         edge_port->chaseResponsePending = TRUE;
21493  
21494 -       dbg(__FUNCTION__" - Sending IOSP_CMD_CHASE_PORT");
21495 +       dbg("%s - Sending IOSP_CMD_CHASE_PORT", __FUNCTION__);
21496         status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0);
21497         if (status == 0) {
21498                 // block until chase finished
21499 @@ -1951,14 +1948,14 @@
21500         }
21501  
21502         if (break_state == -1) {
21503 -               dbg(__FUNCTION__" - Sending IOSP_CMD_SET_BREAK");
21504 +               dbg("%s - Sending IOSP_CMD_SET_BREAK", __FUNCTION__);
21505                 status = send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_BREAK, 0);
21506         } else {
21507 -               dbg(__FUNCTION__" - Sending IOSP_CMD_CLEAR_BREAK");
21508 +               dbg("%s - Sending IOSP_CMD_CLEAR_BREAK", __FUNCTION__);
21509                 status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CLEAR_BREAK, 0);
21510         }
21511         if (status) {
21512 -               dbg(__FUNCTION__" - error sending break set/clear command.");
21513 +               dbg("%s - error sending break set/clear command.", __FUNCTION__);
21514         }
21515  
21516         return;
21517 @@ -1978,14 +1975,14 @@
21518         __u16 rxLen;
21519         int i;
21520  
21521 -       dbg(__FUNCTION__);
21522 +       dbg("%s", __FUNCTION__);
21523  
21524         lastBufferLength = bufferLength + 1;
21525  
21526         while (bufferLength > 0) {
21527                 /* failsafe incase we get a message that we don't understand */
21528                 if (lastBufferLength == bufferLength) {
21529 -                       dbg(__FUNCTION__" - stuck in loop, exiting it.");
21530 +                       dbg("%s - stuck in loop, exiting it.", __FUNCTION__);
21531                         break;
21532                 }
21533                 lastBufferLength = bufferLength;
21534 @@ -2007,7 +2004,7 @@
21535                                 ++buffer;
21536                                 --bufferLength;
21537  
21538 -                               dbg(__FUNCTION__" - Hdr1=%02X Hdr2=%02X", edge_serial->rxHeader1, edge_serial->rxHeader2);
21539 +                               dbg("%s - Hdr1=%02X Hdr2=%02X", __FUNCTION__, edge_serial->rxHeader1, edge_serial->rxHeader2);
21540  
21541                                 // Process depending on whether this header is
21542                                 // data or status
21543 @@ -2038,7 +2035,7 @@
21544                                         edge_serial->rxPort = IOSP_GET_HDR_PORT(edge_serial->rxHeader1);
21545                                         edge_serial->rxBytesRemaining = IOSP_GET_HDR_DATA_LEN(edge_serial->rxHeader1, edge_serial->rxHeader2);
21546  
21547 -                                       dbg(__FUNCTION__" - Data for Port %u Len %u", edge_serial->rxPort, edge_serial->rxBytesRemaining);
21548 +                                       dbg("%s - Data for Port %u Len %u", __FUNCTION__, edge_serial->rxPort, edge_serial->rxBytesRemaining);
21549  
21550                                         //ASSERT( DevExt->RxPort < DevExt->NumPorts );
21551                                         //ASSERT( DevExt->RxBytesRemaining < IOSP_MAX_DATA_LENGTH );
21552 @@ -2072,7 +2069,7 @@
21553                                                 if (edge_port->open) {
21554                                                         tty = edge_port->port->tty;
21555                                                         if (tty) {
21556 -                                                               dbg (__FUNCTION__" - Sending %d bytes to TTY for port %d", rxLen, edge_serial->rxPort);
21557 +                                                               dbg("%s - Sending %d bytes to TTY for port %d", __FUNCTION__, rxLen, edge_serial->rxPort);
21558                                                                 for (i = 0; i < rxLen ; ++i) {
21559                                                                         /* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */
21560                                                                         if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
21561 @@ -2125,17 +2122,17 @@
21562         }
21563         edge_port = (struct edgeport_port *)port->private;
21564         if (edge_port == NULL) {
21565 -               err (__FUNCTION__ " - edge_port == NULL for port %d", edge_serial->rxPort);
21566 +               err("%s - edge_port == NULL for port %d", __FUNCTION__, edge_serial->rxPort);
21567                 return;
21568         }
21569  
21570 -       dbg(__FUNCTION__" - port %d", edge_serial->rxPort);
21571 +       dbg("%s - port %d", __FUNCTION__, edge_serial->rxPort);
21572  
21573         if (code == IOSP_EXT_STATUS) {
21574                 switch (byte2) {
21575                         case IOSP_EXT_STATUS_CHASE_RSP:
21576                                 // we want to do EXT status regardless of port open/closed 
21577 -                               dbg(__FUNCTION__" - Port %u EXT CHASE_RSP Data = %02x", edge_serial->rxPort, byte3 );
21578 +                               dbg("%s - Port %u EXT CHASE_RSP Data = %02x", __FUNCTION__, edge_serial->rxPort, byte3 );
21579                                 // Currently, the only EXT_STATUS is Chase, so process here instead of one more call
21580                                 // to one more subroutine. If/when more EXT_STATUS, there'll be more work to do.
21581                                 // Also, we currently clear flag and close the port regardless of content of above's Byte3.
21582 @@ -2146,7 +2143,7 @@
21583                                 return;
21584  
21585                         case IOSP_EXT_STATUS_RX_CHECK_RSP:
21586 -                               dbg( __FUNCTION__" ========== Port %u CHECK_RSP Sequence = %02x =============\n", edge_serial->rxPort, byte3 );
21587 +                               dbg("%s ========== Port %u CHECK_RSP Sequence = %02x =============\n", __FUNCTION__, edge_serial->rxPort, byte3 );
21588                                 //Port->RxCheckRsp = TRUE;
21589                                 return;
21590                 }
21591 @@ -2155,11 +2152,12 @@
21592         if (code == IOSP_STATUS_OPEN_RSP) {
21593                 edge_port->txCredits = GET_TX_BUFFER_SIZE(byte3);
21594                 edge_port->maxTxCredits = edge_port->txCredits;
21595 -               dbg (__FUNCTION__" - Port %u Open Response Inital MSR = %02x TxBufferSize = %d", edge_serial->rxPort, byte2, edge_port->txCredits);
21596 +               dbg("%s - Port %u Open Response Inital MSR = %02x TxBufferSize = %d", __FUNCTION__, edge_serial->rxPort, byte2, edge_port->txCredits);
21597                 handle_new_msr (edge_port, byte2);
21598  
21599                 /* send the current line settings to the port so we are in sync with any further termios calls */
21600 -               change_port_settings (edge_port, edge_port->port->tty->termios);
21601 +               if (edge_port->port->tty)
21602 +                       change_port_settings (edge_port, edge_port->port->tty->termios);
21603  
21604                 /* we have completed the open */
21605                 edge_port->openPending = FALSE;
21606 @@ -2178,23 +2176,23 @@
21607         switch (code) {
21608                 // Not currently sent by Edgeport
21609                 case IOSP_STATUS_LSR:
21610 -                       dbg(__FUNCTION__" - Port %u LSR Status = %02x", edge_serial->rxPort, byte2);
21611 +                       dbg("%s - Port %u LSR Status = %02x", __FUNCTION__, edge_serial->rxPort, byte2);
21612                         handle_new_lsr (edge_port, FALSE, byte2, 0);
21613                         break;
21614  
21615                 case IOSP_STATUS_LSR_DATA:
21616 -                       dbg(__FUNCTION__" - Port %u LSR Status = %02x, Data = %02x", edge_serial->rxPort, byte2, byte3);
21617 +                       dbg("%s - Port %u LSR Status = %02x, Data = %02x", __FUNCTION__, edge_serial->rxPort, byte2, byte3);
21618                         // byte2 is LSR Register
21619                         // byte3 is broken data byte
21620                         handle_new_lsr (edge_port, TRUE, byte2, byte3);
21621                         break;
21622                         //
21623                         //      case IOSP_EXT_4_STATUS:
21624 -                       //              dbg(__FUNCTION__" - Port %u LSR Status = %02x Data = %02x", edge_serial->rxPort, byte2, byte3);
21625 +                       //              dbg("%s - Port %u LSR Status = %02x Data = %02x", __FUNCTION__, edge_serial->rxPort, byte2, byte3);
21626                         //              break;
21627                         //
21628                 case IOSP_STATUS_MSR:
21629 -                       dbg(__FUNCTION__" - Port %u MSR Status = %02x", edge_serial->rxPort, byte2);
21630 +                       dbg("%s - Port %u MSR Status = %02x", __FUNCTION__, edge_serial->rxPort, byte2);
21631  
21632                         // Process this new modem status and generate appropriate
21633                         // events, etc, based on the new status. This routine
21634 @@ -2203,7 +2201,7 @@
21635                         break;
21636  
21637                 default:
21638 -                       dbg(__FUNCTION__" - Unrecognized IOSP status code %u\n", code);
21639 +                       dbg("%s - Unrecognized IOSP status code %u\n", __FUNCTION__, code);
21640                         break;
21641         }
21642  
21643 @@ -2219,7 +2217,7 @@
21644  {
21645         struct  async_icount *icount;
21646  
21647 -       dbg(__FUNCTION__" %02x", newMsr);
21648 +       dbg("%s %02x", __FUNCTION__, newMsr);
21649  
21650         if (newMsr & (MSR_DELTA_CTS | MSR_DELTA_DSR | MSR_DELTA_RI | MSR_DELTA_CD)) {
21651                 icount = &edge_port->icount;
21652 @@ -2256,7 +2254,7 @@
21653         __u8    newLsr = (__u8)(lsr & (__u8)(LSR_OVER_ERR | LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK));
21654         struct  async_icount *icount;
21655  
21656 -       dbg(__FUNCTION__" - %02x", newLsr);
21657 +       dbg("%s - %02x", __FUNCTION__, newLsr);
21658  
21659         edge_port->shadowLSR = lsr;
21660  
21661 @@ -2270,7 +2268,7 @@
21662         }
21663  
21664         /* Place LSR data byte into Rx buffer */
21665 -       if (lsrData) {
21666 +       if (lsrData && edge_port->port->tty) {
21667                 tty_insert_flip_char(edge_port->port->tty, data, 0);
21668                 tty_flip_buffer_push(edge_port->port->tty);
21669         }
21670 @@ -2307,11 +2305,11 @@
21671         __u16 current_length;
21672         unsigned char *transfer_buffer;
21673  
21674 -//     dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, length);
21675 +//     dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, length);
21676  
21677         transfer_buffer =  kmalloc (64, GFP_KERNEL);
21678         if (!transfer_buffer) {
21679 -               err(__FUNCTION__" - kmalloc(%d) failed.\n", 64);
21680 +               err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
21681                 return -ENOMEM;
21682         }
21683  
21684 @@ -2323,7 +2321,7 @@
21685                 } else {
21686                         current_length = length;
21687                 }
21688 -//             dbg (__FUNCTION__" - writing %x, %x, %d", extAddr, addr, current_length);
21689 +//             dbg("%s - writing %x, %x, %d", __FUNCTION__, extAddr, addr, current_length);
21690                 memcpy (transfer_buffer, data, current_length);
21691                 result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), USB_REQUEST_ION_WRITE_RAM, 
21692                                           0x40, addr, extAddr, transfer_buffer, current_length, 300);
21693 @@ -2352,11 +2350,11 @@
21694         __u16 current_length;
21695         unsigned char *transfer_buffer;
21696  
21697 -//     dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, length);
21698 +//     dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, length);
21699  
21700         transfer_buffer =  kmalloc (64, GFP_KERNEL);
21701         if (!transfer_buffer) {
21702 -               err(__FUNCTION__" - kmalloc(%d) failed.\n", 64);
21703 +               err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
21704                 return -ENOMEM;
21705         }
21706  
21707 @@ -2368,7 +2366,7 @@
21708                 } else {
21709                         current_length = length;
21710                 }
21711 -//             dbg (__FUNCTION__" - writing %x, %x, %d", extAddr, addr, current_length);
21712 +//             dbg("%s - writing %x, %x, %d", __FUNCTION__, extAddr, addr, current_length);
21713                 memcpy (transfer_buffer, data, current_length);
21714                 result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), USB_REQUEST_ION_WRITE_ROM, 
21715                                           0x40, addr, extAddr, transfer_buffer, current_length, 300);
21716 @@ -2397,11 +2395,11 @@
21717         __u16 current_length;
21718         unsigned char *transfer_buffer;
21719  
21720 -       dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, length);
21721 +       dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, length);
21722  
21723         transfer_buffer =  kmalloc (64, GFP_KERNEL);
21724         if (!transfer_buffer) {
21725 -               err(__FUNCTION__" - kmalloc(%d) failed.\n", 64);
21726 +               err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
21727                 return -ENOMEM;
21728         }
21729  
21730 @@ -2413,7 +2411,7 @@
21731                 } else {
21732                         current_length = length;
21733                 }
21734 -//             dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, current_length);
21735 +//             dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, current_length);
21736                 result = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), USB_REQUEST_ION_READ_ROM, 
21737                                           0xC0, addr, extAddr, transfer_buffer, current_length, 300);
21738                 if (result < 0)
21739 @@ -2440,11 +2438,11 @@
21740         int             length = 0;
21741         int             status = 0;
21742  
21743 -       dbg(__FUNCTION__" - %d, %d", command, param);
21744 +       dbg("%s - %d, %d", __FUNCTION__, command, param);
21745  
21746 -       buffer =  kmalloc (10, GFP_KERNEL);
21747 +       buffer =  kmalloc (10, GFP_ATOMIC);
21748         if (!buffer) {
21749 -               err(__FUNCTION__" - kmalloc(%d) failed.\n", 10);
21750 +               err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 10);
21751                 return -ENOMEM;
21752         }
21753  
21754 @@ -2472,7 +2470,7 @@
21755  {
21756         struct edgeport_serial *edge_serial = (struct edgeport_serial *)edge_port->port->serial->private;
21757         int status = 0;
21758 -       urb_t *urb;
21759 +       struct urb *urb;
21760         int timeout;
21761  
21762         usb_serial_debug_data (__FILE__, __FUNCTION__, length, buffer);
21763 @@ -2483,7 +2481,7 @@
21764                 return -ENOMEM;
21765  
21766         CmdUrbs++;
21767 -       dbg(__FUNCTION__" - ALLOCATE URB %p (outstanding %d)", urb, CmdUrbs);
21768 +       dbg("%s - ALLOCATE URB %p (outstanding %d)", __FUNCTION__, urb, CmdUrbs);
21769  
21770         FILL_BULK_URB (urb, edge_serial->serial->dev, 
21771                        usb_sndbulkpipe(edge_serial->serial->dev, edge_serial->bulk_out_endpoint),
21772 @@ -2497,7 +2495,7 @@
21773  
21774         if (status) {
21775                 /* something went wrong */
21776 -               dbg(__FUNCTION__" - usb_submit_urb(write bulk) failed");
21777 +               dbg("%s - usb_submit_urb(write bulk) failed", __FUNCTION__);
21778                 usb_unlink_urb (urb);
21779                 usb_free_urb   (urb);
21780                 return status;
21781 @@ -2512,7 +2510,7 @@
21782  
21783         if (edge_port->commandPending == TRUE) {
21784                 /* command timed out */
21785 -               dbg(__FUNCTION__" - command timed out");
21786 +               dbg("%s - command timed out", __FUNCTION__);
21787                 status = -EINVAL;
21788         }
21789  #endif
21790 @@ -2534,18 +2532,18 @@
21791         int status;
21792         unsigned char number = edge_port->port->number - edge_port->port->serial->minor;
21793  
21794 -       dbg(__FUNCTION__" - port = %d, baud = %d", edge_port->port->number, baudRate);
21795 +       dbg("%s - port = %d, baud = %d", __FUNCTION__, edge_port->port->number, baudRate);
21796  
21797         status = calc_baud_rate_divisor (baudRate, &divisor);
21798         if (status) {
21799 -               err(__FUNCTION__" - bad baud rate");
21800 +               err("%s - bad baud rate", __FUNCTION__);
21801                 return status;
21802         }
21803  
21804         // Alloc memory for the string of commands.
21805 -       cmdBuffer =  kmalloc (0x100, GFP_KERNEL);
21806 +       cmdBuffer =  kmalloc (0x100, GFP_ATOMIC);
21807         if (!cmdBuffer) {
21808 -               err(__FUNCTION__" - kmalloc(%d) failed.\n", 0x100);
21809 +               err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 0x100);
21810                 return -ENOMEM;
21811         }
21812         currCmd = cmdBuffer;
21813 @@ -2583,11 +2581,11 @@
21814         __u16 round;
21815  
21816  
21817 -       dbg(__FUNCTION__" - %d", baudrate);
21818 +       dbg("%s - %d", __FUNCTION__, baudrate);
21819  
21820 -       for (i = 0; i < NUM_ENTRIES(DivisorTable); i++) {
21821 -               if ( DivisorTable[i].BaudRate == baudrate ) {
21822 -                       *divisor = DivisorTable[i].Divisor;
21823 +       for (i = 0; i < NUM_ENTRIES(divisor_table); i++) {
21824 +               if ( divisor_table[i].BaudRate == baudrate ) {
21825 +                       *divisor = divisor_table[i].Divisor;
21826                         return 0;
21827                 }
21828         }
21829 @@ -2607,7 +2605,7 @@
21830                 }
21831                 *divisor = custom;
21832  
21833 -               dbg(__FUNCTION__" - Baud %d = %d\n", baudrate, custom);
21834 +               dbg("%s - Baud %d = %d\n", __FUNCTION__, baudrate, custom);
21835                 return 0;
21836         }
21837  
21838 @@ -2626,10 +2624,10 @@
21839         unsigned long cmdLen = 0;
21840         int status;
21841  
21842 -       dbg (__FUNCTION__" - write to %s register 0x%02x", (regNum == MCR) ? "MCR" : "LCR", regValue);
21843 +       dbg("%s - write to %s register 0x%02x", (regNum == MCR) ? "MCR" : "LCR", __FUNCTION__, regValue);
21844  
21845         // Alloc memory for the string of commands.
21846 -       cmdBuffer = kmalloc (0x10, GFP_KERNEL);
21847 +       cmdBuffer = kmalloc (0x10, GFP_ATOMIC);
21848         if (cmdBuffer == NULL ) {
21849                 return -ENOMEM;
21850         }
21851 @@ -2669,50 +2667,50 @@
21852         __u8 txFlow;
21853         int status;
21854  
21855 -       dbg(__FUNCTION__" - port %d", edge_port->port->number);
21856 +       dbg("%s - port %d", __FUNCTION__, edge_port->port->number);
21857  
21858         if ((!edge_port->open) &&
21859             (!edge_port->openPending)) {
21860 -               dbg(__FUNCTION__" - port not opened");
21861 +               dbg("%s - port not opened", __FUNCTION__);
21862                 return;
21863         }
21864  
21865         tty = edge_port->port->tty;
21866         if ((!tty) ||
21867             (!tty->termios)) {
21868 -               dbg(__FUNCTION__" - no tty structures");
21869 +               dbg("%s - no tty structures", __FUNCTION__);
21870                 return;
21871         }
21872  
21873         cflag = tty->termios->c_cflag;
21874  
21875         switch (cflag & CSIZE) {
21876 -               case CS5:   lData = LCR_BITS_5; mask = 0x1f;    dbg(__FUNCTION__" - data bits = 5");   break;
21877 -               case CS6:   lData = LCR_BITS_6; mask = 0x3f;    dbg(__FUNCTION__" - data bits = 6");   break;
21878 -               case CS7:   lData = LCR_BITS_7; mask = 0x7f;    dbg(__FUNCTION__" - data bits = 7");   break;
21879 +               case CS5:   lData = LCR_BITS_5; mask = 0x1f;    dbg("%s - data bits = 5", __FUNCTION__);   break;
21880 +               case CS6:   lData = LCR_BITS_6; mask = 0x3f;    dbg("%s - data bits = 6", __FUNCTION__);   break;
21881 +               case CS7:   lData = LCR_BITS_7; mask = 0x7f;    dbg("%s - data bits = 7", __FUNCTION__);   break;
21882                 default:
21883 -               case CS8:   lData = LCR_BITS_8;                 dbg(__FUNCTION__" - data bits = 8");   break;
21884 +               case CS8:   lData = LCR_BITS_8;                 dbg("%s - data bits = 8", __FUNCTION__);   break;
21885         }
21886  
21887         lParity = LCR_PAR_NONE;
21888         if (cflag & PARENB) {
21889                 if (cflag & PARODD) {
21890                         lParity = LCR_PAR_ODD;
21891 -                       dbg(__FUNCTION__" - parity = odd");
21892 +                       dbg("%s - parity = odd", __FUNCTION__);
21893                 } else {
21894                         lParity = LCR_PAR_EVEN;
21895 -                       dbg(__FUNCTION__" - parity = even");
21896 +                       dbg("%s - parity = even", __FUNCTION__);
21897                 }
21898         } else {
21899 -               dbg(__FUNCTION__" - parity = none");
21900 +               dbg("%s - parity = none", __FUNCTION__);
21901         }
21902  
21903         if (cflag & CSTOPB) {
21904                 lStop = LCR_STOP_2;
21905 -               dbg(__FUNCTION__" - stop bits = 2");
21906 +               dbg("%s - stop bits = 2", __FUNCTION__);
21907         } else {
21908                 lStop = LCR_STOP_1;
21909 -               dbg(__FUNCTION__" - stop bits = 1");
21910 +               dbg("%s - stop bits = 1", __FUNCTION__);
21911         }
21912  
21913         /* figure out the flow control settings */
21914 @@ -2720,9 +2718,9 @@
21915         if (cflag & CRTSCTS) {
21916                 rxFlow |= IOSP_RX_FLOW_RTS;
21917                 txFlow |= IOSP_TX_FLOW_CTS;
21918 -               dbg(__FUNCTION__" - RTS/CTS is enabled");
21919 +               dbg("%s - RTS/CTS is enabled", __FUNCTION__);
21920         } else {
21921 -               dbg(__FUNCTION__" - RTS/CTS is disabled");
21922 +               dbg("%s - RTS/CTS is disabled", __FUNCTION__);
21923         }
21924  
21925         /* if we are implementing XON/XOFF, set the start and stop character in the device */
21926 @@ -2736,17 +2734,17 @@
21927                 /* if we are implementing INBOUND XON/XOFF */
21928                 if (I_IXOFF(tty)) {
21929                         rxFlow |= IOSP_RX_FLOW_XON_XOFF;
21930 -                       dbg(__FUNCTION__" - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", start_char, stop_char);
21931 +                       dbg("%s - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", __FUNCTION__, start_char, stop_char);
21932                 } else {
21933 -                       dbg(__FUNCTION__" - INBOUND XON/XOFF is disabled");
21934 +                       dbg("%s - INBOUND XON/XOFF is disabled", __FUNCTION__);
21935                 }
21936  
21937                 /* if we are implementing OUTBOUND XON/XOFF */
21938                 if (I_IXON(tty)) {
21939                         txFlow |= IOSP_TX_FLOW_XON_XOFF;
21940 -                       dbg(__FUNCTION__" - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", start_char, stop_char);
21941 +                       dbg("%s - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", __FUNCTION__, start_char, stop_char);
21942                 } else {
21943 -                       dbg(__FUNCTION__" - OUTBOUND XON/XOFF is disabled");
21944 +                       dbg("%s - OUTBOUND XON/XOFF is disabled", __FUNCTION__);
21945                 }
21946         }
21947  
21948 @@ -2783,7 +2781,7 @@
21949                 baud = 9600;
21950         }
21951  
21952 -       dbg(__FUNCTION__ " - baud rate = %d", baud);
21953 +       dbg("%s - baud rate = %d", __FUNCTION__, baud);
21954         status = send_cmd_write_baud_rate (edge_port, baud);
21955  
21956         return;
21957 @@ -2881,7 +2879,7 @@
21958   ****************************************************************************/
21959  static void load_application_firmware (struct edgeport_serial *edge_serial)
21960  {
21961 -       PEDGE_FIRMWARE_IMAGE_RECORD record;
21962 +       struct edge_firmware_image_record *record;
21963         unsigned char *firmware;
21964         unsigned char *FirmwareImage;
21965         int ImageSize;
21966 @@ -2919,13 +2917,13 @@
21967  
21968  
21969         for (;;) {
21970 -               record = (PEDGE_FIRMWARE_IMAGE_RECORD)firmware;
21971 +               record = (struct edge_firmware_image_record *)firmware;
21972                 response = sram_write (edge_serial->serial, record->ExtAddr, record->Addr, record->Len, &record->Data[0]);
21973                 if (response < 0) {
21974                         err("sram_write failed (%x, %x, %d)", record->ExtAddr, record->Addr, record->Len);
21975                         break;
21976                 }
21977 -               firmware += sizeof (EDGE_FIRMWARE_IMAGE_RECORD) + record->Len;
21978 +               firmware += sizeof (struct edge_firmware_image_record) + record->Len;
21979                 if (firmware >= &FirmwareImage[ImageSize]) {
21980                         break;
21981                 }
21982 @@ -2958,7 +2956,7 @@
21983         /* create our private serial structure */
21984         edge_serial = kmalloc (sizeof(struct edgeport_serial), GFP_KERNEL);
21985         if (edge_serial == NULL) {
21986 -               err(__FUNCTION__" - Out of memory");
21987 +               err("%s - Out of memory", __FUNCTION__);
21988                 return -ENOMEM;
21989         }
21990         memset (edge_serial, 0, sizeof(struct edgeport_serial));
21991 @@ -2985,22 +2983,23 @@
21992         /* set the number of ports from the manufacturing description */
21993         /* serial->num_ports = serial->product_info.NumPorts; */
21994         if (edge_serial->product_info.NumPorts != serial->num_ports) {
21995 -               warn(__FUNCTION__ " - Device Reported %d serial ports vs core "
21996 +               warn("%s - Device Reported %d serial ports vs core "
21997                      "thinking we have %d ports, email greg@kroah.com this info.",
21998 -                    edge_serial->product_info.NumPorts, serial->num_ports);
21999 +                    __FUNCTION__, edge_serial->product_info.NumPorts, 
22000 +                    serial->num_ports);
22001         }
22002  
22003 -       dbg(__FUNCTION__ " - time 1 %ld", jiffies);
22004 +       dbg("%s - time 1 %ld", __FUNCTION__, jiffies);
22005  
22006         /* now load the application firmware into this device */
22007         load_application_firmware (edge_serial);
22008  
22009 -       dbg(__FUNCTION__ " - time 2 %ld", jiffies);
22010 +       dbg("%s - time 2 %ld", __FUNCTION__, jiffies);
22011  
22012         /* Check current Edgeport EEPROM and update if necessary */
22013         update_edgeport_E2PROM (edge_serial);
22014         
22015 -       dbg(__FUNCTION__ " - time 3 %ld", jiffies);
22016 +       dbg("%s - time 3 %ld", __FUNCTION__, jiffies);
22017  
22018         /* set the configuration to use #1 */
22019  //     dbg("set_configuration 1");
22020 @@ -3013,7 +3012,7 @@
22021         for (i = 0; i < serial->num_ports; ++i) {
22022                 edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL);
22023                 if (edge_port == NULL) {
22024 -                       err(__FUNCTION__" - Out of memory");
22025 +                       err("%s - Out of memory", __FUNCTION__);
22026                         return -ENOMEM;
22027                 }
22028                 memset (edge_port, 0, sizeof(struct edgeport_port));
22029 @@ -3034,13 +3033,10 @@
22030  {
22031         int i;
22032  
22033 -       dbg (__FUNCTION__);
22034 +       dbg("%s", __FUNCTION__);
22035  
22036         /* stop reads and writes on all ports */
22037         for (i=0; i < serial->num_ports; ++i) {
22038 -               while (serial->port[i].open_count > 0) {
22039 -                       edge_close (&serial->port[i], NULL);
22040 -               }
22041                 kfree (serial->port[i].private);
22042                 serial->port[i].private = NULL;
22043         }
22044 diff -Nur linux-2.4.19.org/drivers/usb/serial/io_edgeport.h linux-2.4.19/drivers/usb/serial/io_edgeport.h
22045 --- linux-2.4.19.org/drivers/usb/serial/io_edgeport.h   Tue Aug 28 20:21:02 2001
22046 +++ linux-2.4.19/drivers/usb/serial/io_edgeport.h       Thu Oct 31 08:11:24 2002
22047 @@ -136,7 +136,6 @@
22048         __u16   Strings[1];                     /* Start of string block */
22049  };
22050  
22051 -typedef struct string_block STRING_BLOCK, *PSTRING_BLOCK;
22052  
22053  
22054  #endif
22055 diff -Nur linux-2.4.19.org/drivers/usb/serial/io_fw_boot.h linux-2.4.19/drivers/usb/serial/io_fw_boot.h
22056 --- linux-2.4.19.org/drivers/usb/serial/io_fw_boot.h    Tue Mar 20 02:21:54 2001
22057 +++ linux-2.4.19/drivers/usb/serial/io_fw_boot.h        Thu Oct 31 08:11:24 2002
22058 @@ -12,20 +12,18 @@
22059  //Image structure definition
22060  #if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
22061  #define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
22062 -       typedef struct _EDGE_FIRMWARE_IMAGE_RECORD
22063 -       {
22064 +       struct edge_firmware_image_record {
22065                 unsigned short ExtAddr;
22066                 unsigned short Addr;
22067                 unsigned short Len;
22068                 unsigned char  Data[0];
22069 -       } EDGE_FIRMWARE_IMAGE_RECORD, *PEDGE_FIRMWARE_IMAGE_RECORD;
22070 +       };
22071  
22072 -       typedef struct _EDGE_FIRMWARE_VERSION_INFO
22073 -       {
22074 +       struct edge_firmware_version_info {
22075                 unsigned char    MajorVersion;
22076                 unsigned char  MinorVersion;
22077                 unsigned short BuildNumber;
22078 -       } EDGE_FIRMWARE_VERSION_INFO, *PEDGE_FIRMWARE_VERSION_INFO;
22079 +       };
22080  
22081  #endif
22082  
22083 @@ -549,7 +547,7 @@
22084      0x7e, 0x74, 0x00, 0x01, 0x02, 0x08, 0xd6, 
22085  };
22086  
22087 -static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = {
22088 +static struct edge_firmware_version_info IMAGE_VERSION_NAME = {
22089         1, 12, 2 };             // Major, Minor, Build
22090  
22091  #undef IMAGE_VERSION_NAME
22092 diff -Nur linux-2.4.19.org/drivers/usb/serial/io_fw_boot2.h linux-2.4.19/drivers/usb/serial/io_fw_boot2.h
22093 --- linux-2.4.19.org/drivers/usb/serial/io_fw_boot2.h   Tue Mar 20 02:21:54 2001
22094 +++ linux-2.4.19/drivers/usb/serial/io_fw_boot2.h       Thu Oct 31 08:11:24 2002
22095 @@ -12,20 +12,18 @@
22096  //Image structure definition
22097  #if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
22098  #define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
22099 -       typedef struct _EDGE_FIRMWARE_IMAGE_RECORD
22100 -       {
22101 +       struct edge_firmware_image_record {
22102                 unsigned short ExtAddr;
22103                 unsigned short Addr;
22104                 unsigned short Len;
22105                 unsigned char  Data[0];
22106 -       } EDGE_FIRMWARE_IMAGE_RECORD, *PEDGE_FIRMWARE_IMAGE_RECORD;
22107 +       };
22108  
22109 -       typedef struct _EDGE_FIRMWARE_VERSION_INFO
22110 -       {
22111 +       struct edge_firmware_version_info {
22112                 unsigned char    MajorVersion;
22113                 unsigned char  MinorVersion;
22114                 unsigned short BuildNumber;
22115 -       } EDGE_FIRMWARE_VERSION_INFO, *PEDGE_FIRMWARE_VERSION_INFO;
22116 +       };
22117  
22118  #endif
22119  
22120 @@ -539,7 +537,7 @@
22121  
22122  };
22123  
22124 -static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = {
22125 +static struct edge_firmware_version_info IMAGE_VERSION_NAME = {
22126         2, 0, 3 };              // Major, Minor, Build
22127  
22128  #undef IMAGE_VERSION_NAME
22129 diff -Nur linux-2.4.19.org/drivers/usb/serial/io_fw_down.h linux-2.4.19/drivers/usb/serial/io_fw_down.h
22130 --- linux-2.4.19.org/drivers/usb/serial/io_fw_down.h    Tue Mar 20 02:21:54 2001
22131 +++ linux-2.4.19/drivers/usb/serial/io_fw_down.h        Thu Oct 31 08:11:24 2002
22132 @@ -12,20 +12,18 @@
22133  //Image structure definition
22134  #if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
22135         #define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
22136 -       typedef struct _EDGE_FIRMWARE_IMAGE_RECORD
22137 -       {
22138 +       struct edge_firmware_image_record {
22139                 unsigned short  ExtAddr;
22140                 unsigned short  Addr;
22141                 unsigned short  Len;
22142                 unsigned char   Data[0];
22143 -       } EDGE_FIRMWARE_IMAGE_RECORD, *PEDGE_FIRMWARE_IMAGE_RECORD;
22144 +       };
22145  
22146 -       typedef struct _EDGE_FIRMWARE_VERSION_INFO
22147 -       {
22148 +       struct edge_firmware_version_info {
22149                 unsigned char   MajorVersion;
22150                 unsigned char   MinorVersion;
22151                 unsigned short  BuildNumber;
22152 -       } EDGE_FIRMWARE_VERSION_INFO, *PEDGE_FIRMWARE_VERSION_INFO;
22153 +       };
22154  
22155  #endif
22156  
22157 @@ -1114,7 +1112,7 @@
22158      0x08, 0xa5, 0xb8, 0x02, 0x03, 0x4e, 0xa0, 0x08, 0x22, 0x80, 0xfe, 
22159  };
22160  
22161 -static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = {
22162 +static struct edge_firmware_version_info IMAGE_VERSION_NAME = {
22163         1, 12, 3 };             // Major, Minor, Build
22164  
22165  #undef IMAGE_VERSION_NAME
22166 diff -Nur linux-2.4.19.org/drivers/usb/serial/io_fw_down2.h linux-2.4.19/drivers/usb/serial/io_fw_down2.h
22167 --- linux-2.4.19.org/drivers/usb/serial/io_fw_down2.h   Tue Mar 20 02:21:54 2001
22168 +++ linux-2.4.19/drivers/usb/serial/io_fw_down2.h       Thu Oct 31 08:11:24 2002
22169 @@ -12,20 +12,18 @@
22170  //Image structure definition
22171  #if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
22172         #define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
22173 -       typedef struct _EDGE_FIRMWARE_IMAGE_RECORD
22174 -       {
22175 +       struct edge_firmware_image_record {
22176                 unsigned short ExtAddr;
22177                 unsigned short Addr;
22178                 unsigned short Len;
22179                 unsigned char  Data[0];
22180 -       } EDGE_FIRMWARE_IMAGE_RECORD, *PEDGE_FIRMWARE_IMAGE_RECORD;
22181 +       };
22182  
22183 -       typedef struct _EDGE_FIRMWARE_VERSION_INFO
22184 -       {
22185 -               unsigned char    MajorVersion;
22186 +       struct edge_firmware_version_info {
22187 +               unsigned char  MajorVersion;
22188                 unsigned char  MinorVersion;
22189                 unsigned short BuildNumber;
22190 -       } EDGE_FIRMWARE_VERSION_INFO, *PEDGE_FIRMWARE_VERSION_INFO;
22191 +       };
22192  
22193  #endif
22194  
22195 @@ -1126,7 +1124,7 @@
22196      0x02, 0x03, 0x4e, 0xa0, 0x08, 0x22, 0x80, 0xfe, 
22197  };
22198  
22199 -static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = {
22200 +static struct edge_firmware_version_info IMAGE_VERSION_NAME = {
22201         2, 0, 3 };              // Major, Minor, Build
22202  
22203  #undef IMAGE_VERSION_NAME
22204 diff -Nur linux-2.4.19.org/drivers/usb/serial/io_fw_down3.h linux-2.4.19/drivers/usb/serial/io_fw_down3.h
22205 --- linux-2.4.19.org/drivers/usb/serial/io_fw_down3.h   Thu Jan  1 01:00:00 1970
22206 +++ linux-2.4.19/drivers/usb/serial/io_fw_down3.h       Thu Oct 31 08:11:24 2002
22207 @@ -0,0 +1,799 @@
22208 +//**************************************************************
22209 +//* Edgeport Binary Image (for TI based products)
22210 +//* Generated by TIBin2C v1.00
22211 +//* Copyright(c) 2001 Inside Out Networks, All rights reserved.
22212 +//**************************************************************
22213 +
22214 +
22215 +static int IMAGE_SIZE = 12166;
22216 +
22217 +struct EDGE_FIRMWARE_VERSION_INFO
22218 +{
22219 +       unsigned char   MajorVersion;
22220 +       unsigned char   MinorVersion;
22221 +       unsigned short  BuildNumber;
22222 +};
22223 +
22224 +static struct EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME =
22225 +{
22226 +       4, 1, 0         // Major, Minor, Build
22227 +
22228 +};
22229 +
22230 +static unsigned char IMAGE_ARRAY_NAME[] = 
22231 +{
22232 +//  struct ImageHdr
22233 +//  {
22234 +//      WORD    Length;
22235 +//      BYTE    CheckSum;
22236 +//  };
22237 +0x83, 0x2f, 
22238 +0x33, 
22239 +
22240 +0x02, 0x24, 0x84, 0x02, 0x1f, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x1e, 0x00, 0x00, 
22241 +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x1a, 0x85, 0x45, 
22242 +0x8c, 0x85, 0x46, 0x8a, 0xc0, 0xe0, 0xc0, 0xd0, 0xc0, 0xf0, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x00, 
22243 +0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, 0x07, 0xe5, 0x44, 
22244 +0x24, 0x08, 0xf8, 0xe6, 0x60, 0x2b, 0xe5, 0x44, 0x24, 0x10, 0xf8, 0xa6, 0x81, 0xe5, 0x44, 0x75, 
22245 +0xf0, 0x21, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0xf8, 0xf5, 0x83, 0x78, 0x92, 0xe5, 0x81, 
22246 +0x04, 0xc3, 0x98, 0xf9, 0x94, 0x22, 0x40, 0x03, 0x02, 0x11, 0x1a, 0xe6, 0xf0, 0x08, 0xa3, 0xd9, 
22247 +0xfa, 0x74, 0x08, 0x25, 0x44, 0xf8, 0x05, 0x44, 0x08, 0xe6, 0x54, 0x80, 0x70, 0x0c, 0xe5, 0x44, 
22248 +0xb4, 0x07, 0xf3, 0x78, 0x08, 0x75, 0x44, 0x00, 0x80, 0xef, 0xe5, 0x44, 0x24, 0x10, 0xf8, 0x86, 
22249 +0x81, 0xe5, 0x44, 0x75, 0xf0, 0x21, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0xf8, 0xf5, 0x83, 
22250 +0x78, 0x92, 0xe5, 0x81, 0x04, 0xc3, 0x98, 0xf9, 0xe0, 0xf6, 0x08, 0xa3, 0xd9, 0xfa, 0xd0, 0x07, 
22251 +0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04, 0xd0, 0x03, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0xd0, 0x83, 
22252 +0xd0, 0x82, 0xd0, 0xf0, 0xd0, 0xd0, 0xd0, 0xe0, 0x32, 0x30, 0x01, 0x4d, 0x30, 0xb4, 0x48, 0x10, 
22253 +0x00, 0x45, 0x90, 0xff, 0x08, 0xe0, 0x54, 0x20, 0xf8, 0x90, 0xff, 0x48, 0xe0, 0x54, 0x20, 0xf9, 
22254 +0x90, 0xff, 0x10, 0xe0, 0x54, 0x20, 0xfa, 0x90, 0xff, 0x50, 0xe0, 0x54, 0x20, 0xfb, 0x74, 0x00, 
22255 +0xf5, 0x82, 0x74, 0xf8, 0xf5, 0x83, 0xe0, 0xc8, 0xf0, 0x68, 0x60, 0x02, 0x7e, 0x04, 0xa3, 0xe0, 
22256 +0xc9, 0xf0, 0x69, 0x60, 0x02, 0x7e, 0x04, 0xa3, 0xe0, 0xca, 0xf0, 0x6a, 0x60, 0x02, 0x7e, 0x04, 
22257 +0xa3, 0xe0, 0xcb, 0xf0, 0x6b, 0x60, 0x02, 0x7e, 0x04, 0x22, 0xc0, 0xe0, 0xc0, 0xd0, 0xc0, 0xf0, 
22258 +0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x04, 0xc0, 0x05, 
22259 +0xc0, 0x06, 0xc0, 0x07, 0x90, 0xff, 0x93, 0x74, 0x01, 0xf0, 0xe5, 0x81, 0x94, 0xfd, 0x40, 0x03, 
22260 +0x02, 0x11, 0x1a, 0x85, 0x47, 0x8d, 0x85, 0x48, 0x8b, 0x74, 0xae, 0xf5, 0x82, 0x74, 0xfa, 0xf5, 
22261 +0x83, 0xe0, 0xb4, 0x01, 0x1b, 0xc0, 0x82, 0xc0, 0x83, 0x90, 0xff, 0x4a, 0xe0, 0x30, 0xe7, 0x2c, 
22262 +0x90, 0xff, 0x4e, 0xe0, 0x30, 0xe7, 0x25, 0xd0, 0x83, 0xd0, 0x82, 0x74, 0x02, 0xf0, 0x80, 0x20, 
22263 +0xb4, 0x02, 0x1d, 0xc0, 0x82, 0xc0, 0x83, 0x90, 0xff, 0x7a, 0xe0, 0x30, 0xe7, 0x05, 0x12, 0x25, 
22264 +0x13, 0x80, 0x09, 0xd0, 0x83, 0xd0, 0x82, 0x74, 0x03, 0xf0, 0x80, 0x04, 0xd0, 0x83, 0xd0, 0x82, 
22265 +0xa3, 0xe0, 0xb4, 0x01, 0x1b, 0xc0, 0x82, 0xc0, 0x83, 0x90, 0xff, 0x52, 0xe0, 0x30, 0xe7, 0x2c, 
22266 +0x90, 0xff, 0x56, 0xe0, 0x30, 0xe7, 0x25, 0xd0, 0x83, 0xd0, 0x82, 0x74, 0x02, 0xf0, 0x80, 0x20, 
22267 +0xb4, 0x02, 0x1d, 0xc0, 0x82, 0xc0, 0x83, 0x90, 0xff, 0x7a, 0xe0, 0x30, 0xe7, 0x05, 0x12, 0x25, 
22268 +0x13, 0x80, 0x09, 0xd0, 0x83, 0xd0, 0x82, 0x74, 0x03, 0xf0, 0x80, 0x04, 0xd0, 0x83, 0xd0, 0x82, 
22269 +0x20, 0x02, 0x03, 0x30, 0x01, 0x7b, 0x74, 0x16, 0xf5, 0x82, 0x74, 0xf9, 0xf5, 0x83, 0xe0, 0x14, 
22270 +0xfc, 0xf0, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0x64, 0x04, 0x70, 0x0f, 0xec, 0x70, 0x62, 0x7e, 
22271 +0x01, 0x12, 0x00, 0xc9, 0x7c, 0x0a, 0x7d, 0xfa, 0x02, 0x02, 0x22, 0x12, 0x00, 0xc9, 0xee, 0x64, 
22272 +0x04, 0x60, 0x1d, 0xec, 0x70, 0x4b, 0x7c, 0x0a, 0xed, 0x14, 0xfd, 0x70, 0x15, 0xee, 0x64, 0x02, 
22273 +0x60, 0x07, 0x7e, 0x02, 0x7d, 0x32, 0x02, 0x02, 0x22, 0x7e, 0x01, 0x7d, 0xfa, 0x02, 0x02, 0x22, 
22274 +0x7c, 0x0a, 0x74, 0x16, 0xf5, 0x82, 0x74, 0xf9, 0xf5, 0x83, 0xec, 0xf0, 0xa3, 0xed, 0xf0, 0xa3, 
22275 +0xee, 0xf0, 0x14, 0x60, 0x18, 0x20, 0xe1, 0x0f, 0x20, 0x01, 0x06, 0xd2, 0xb1, 0xc2, 0xb0, 0x80, 
22276 +0x10, 0xc2, 0xb1, 0xd2, 0xb0, 0x80, 0x0a, 0xc2, 0xb1, 0xc2, 0xb0, 0x80, 0x04, 0xd2, 0xb0, 0xd2, 
22277 +0xb1, 0x78, 0x19, 0x79, 0x09, 0x7a, 0x07, 0xe7, 0x70, 0x04, 0xa6, 0x00, 0x80, 0x0b, 0xe6, 0x60, 
22278 +0x08, 0x16, 0xe6, 0x70, 0x04, 0xe7, 0x44, 0x80, 0xf7, 0x08, 0x09, 0xda, 0xea, 0xe5, 0x43, 0x60, 
22279 +0x13, 0x14, 0xf5, 0x43, 0x70, 0x0e, 0xe5, 0x44, 0x24, 0x08, 0xf8, 0x76, 0x00, 0x12, 0x10, 0x95, 
22280 +0xd2, 0x8c, 0xd2, 0x8d, 0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04, 0xd0, 0x03, 0xd0, 0x02, 
22281 +0xd0, 0x01, 0xd0, 0x00, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0xf0, 0xd0, 0xd0, 0xd0, 0xe0, 0x32, 0x90, 
22282 +0xff, 0x04, 0xe0, 0x90, 0xfa, 0xb5, 0xf0, 0x90, 0xff, 0x06, 0xe0, 0xfc, 0xa3, 0xe0, 0xfa, 0xec, 
22283 +0xff, 0xea, 0xfe, 0xef, 0xc3, 0x94, 0x08, 0xee, 0x94, 0x01, 0x50, 0x02, 0x80, 0x04, 0x7e, 0x01, 
22284 +0x7f, 0x08, 0x8e, 0x34, 0x8f, 0x35, 0x90, 0xff, 0x02, 0xe0, 0xfc, 0xa3, 0xe0, 0xfa, 0xec, 0xff, 
22285 +0xea, 0x90, 0xfa, 0xb9, 0xf0, 0xef, 0xa3, 0xf0, 0x12, 0x18, 0x49, 0x78, 0x24, 0x7c, 0x00, 0x7d, 
22286 +0x00, 0x12, 0x19, 0x6c, 0x7e, 0x00, 0x7f, 0x05, 0x12, 0x13, 0x8f, 0xe4, 0xf5, 0x53, 0xe5, 0x53, 
22287 +0xc3, 0x94, 0x02, 0x50, 0x0f, 0x12, 0x18, 0x2a, 0xe4, 0x12, 0x13, 0xfb, 0x05, 0x53, 0x04, 0x12, 
22288 +0x18, 0x1b, 0x80, 0xea, 0x12, 0x18, 0x49, 0x90, 0xff, 0x00, 0xe0, 0xff, 0x54, 0x60, 0x24, 0xc0, 
22289 +0x70, 0x03, 0x02, 0x08, 0xb8, 0x24, 0x40, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 0xe0, 
22290 +0xfe, 0x54, 0x0f, 0xf5, 0x53, 0xee, 0x30, 0xe7, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x0a, 0x90, 
22291 +0xff, 0x01, 0xe0, 0x12, 0x15, 0x0f, 0x03, 0x55, 0x00, 0x04, 0x28, 0x01, 0x05, 0x2f, 0x03, 0x05, 
22292 +0xf6, 0x05, 0x06, 0x38, 0x06, 0x07, 0x9a, 0x08, 0x07, 0xe2, 0x09, 0x08, 0x3e, 0x0a, 0x08, 0x7e, 
22293 +0x0b, 0x00, 0x00, 0x0e, 0xac, 0xe5, 0x2c, 0x20, 0xe7, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb9, 
22294 +0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x35, 0x64, 0x02, 0x45, 0x34, 
22295 +0x60, 0x03, 0x02, 0x0e, 0xac, 0xef, 0x54, 0x1f, 0x14, 0x60, 0x2b, 0x14, 0x60, 0x47, 0x24, 0x02, 
22296 +0x60, 0x03, 0x02, 0x0e, 0xac, 0xee, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x18, 0x2a, 0x74, 0x01, 
22297 +0x12, 0x13, 0xfb, 0x78, 0x6d, 0xe6, 0x30, 0xe0, 0x08, 0x12, 0x18, 0x2a, 0x74, 0x02, 0x12, 0x13, 
22298 +0xfb, 0x7f, 0x02, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x20, 0xe1, 0x09, 0x90, 0xfa, 0xb5, 0xe0, 0x60, 
22299 +0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 0xe0, 0xd3, 0x94, 0x01, 0x40, 0x03, 0x02, 0x0e, 0xac, 
22300 +0x7f, 0x02, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x20, 0xe1, 0x0e, 0x90, 0xfa, 0xb5, 0xe0, 0xff, 0x60, 
22301 +0x07, 0x64, 0x80, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x0f, 0x38, 0x40, 0x03, 0x02, 0x0e, 0xac, 
22302 +0xe5, 0x53, 0x70, 0x19, 0x30, 0x0a, 0x0b, 0x90, 0xff, 0x80, 0x12, 0x18, 0x27, 0x12, 0x13, 0xfb, 
22303 +0x80, 0x24, 0x90, 0xff, 0x82, 0x12, 0x18, 0x27, 0x12, 0x13, 0xfb, 0x80, 0x19, 0x15, 0x53, 0x30, 
22304 +0x0a, 0x0b, 0x12, 0x18, 0xbd, 0x12, 0x18, 0x25, 0x12, 0x13, 0xfb, 0x80, 0x09, 0x12, 0x18, 0xcb, 
22305 +0x12, 0x18, 0x25, 0x12, 0x13, 0xfb, 0x12, 0x18, 0x2a, 0x12, 0x13, 0xb5, 0x60, 0x05, 0x74, 0x01, 
22306 +0x12, 0x13, 0xfb, 0x7f, 0x02, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xac, 
22307 +0xe5, 0x35, 0x45, 0x34, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x18, 0xd9, 0x14, 0x60, 0x2d, 0x14, 
22308 +0x60, 0x59, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb9, 0xe0, 0x70, 0x04, 0xa3, 
22309 +0xe0, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 0xe0, 0x60, 0x03, 0x02, 0x0e, 
22310 +0xac, 0x78, 0x6d, 0xe6, 0x54, 0xfe, 0xf6, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x20, 0xe1, 
22311 +0x06, 0x20, 0xe0, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x30, 0xe0, 0x09, 0x90, 0xfa, 0xb5, 0xe0, 
22312 +0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x30, 0xe1, 0x0c, 0x90, 0xfa, 0xb5, 0xe0, 0xd3, 0x94, 
22313 +0x01, 0x40, 0x03, 0x02, 0x0e, 0xac, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0x90, 0xfa, 0xb9, 0xe0, 0x70, 
22314 +0x02, 0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x0f, 0x38, 0x40, 0x03, 0x02, 0x0e, 0xac, 
22315 +0xe5, 0x2c, 0x20, 0xe1, 0x06, 0x20, 0xe0, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x30, 0xe0, 0x07, 
22316 +0xe5, 0x53, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x53, 0x70, 0x0f, 0x90, 0xff, 0x82, 0xe0, 0x54, 
22317 +0xf7, 0xf0, 0x90, 0xff, 0x80, 0xe0, 0x54, 0xf7, 0xf0, 0x22, 0xe5, 0x53, 0x24, 0xfe, 0x60, 0x1b, 
22318 +0x04, 0x70, 0x2e, 0x30, 0x0a, 0x0c, 0xa2, 0x0a, 0xe4, 0x33, 0xfd, 0x7f, 0x03, 0x12, 0x2a, 0xce, 
22319 +0x80, 0x1f, 0xe4, 0xfd, 0x7f, 0x03, 0x12, 0x2a, 0xce, 0x80, 0x16, 0x30, 0x0a, 0x0c, 0xa2, 0x0a, 
22320 +0xe4, 0x33, 0xfd, 0x7f, 0x04, 0x12, 0x2a, 0xce, 0x80, 0x07, 0xe4, 0xfd, 0x7f, 0x04, 0x12, 0x2a, 
22321 +0xce, 0x15, 0x53, 0x30, 0x0a, 0x0b, 0x12, 0x18, 0xbd, 0xf5, 0x83, 0xe0, 0x54, 0xf7, 0xf0, 0x80, 
22322 +0x09, 0x12, 0x18, 0xcb, 0xf5, 0x83, 0xe0, 0x54, 0xf7, 0xf0, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0xe5, 
22323 +0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x35, 0x45, 0x34, 0x60, 0x03, 0x02, 0x0e, 0xac, 
22324 +0x12, 0x18, 0xd9, 0x14, 0x60, 0x2d, 0x14, 0x60, 0x55, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0e, 0xac, 
22325 +0x90, 0xfa, 0xb9, 0xe0, 0x70, 0x04, 0xa3, 0xe0, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 
22326 +0xfa, 0xb5, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x78, 0x6d, 0xe6, 0x44, 0x01, 0xf6, 0xe4, 0xff, 
22327 +0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x20, 0xe1, 0x06, 0x20, 0xe0, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 
22328 +0x30, 0xe0, 0x07, 0xe5, 0x53, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x30, 0xe1, 0x0a, 0xe5, 
22329 +0x53, 0xd3, 0x94, 0x01, 0x40, 0x03, 0x02, 0x0e, 0xac, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0x90, 0xfa, 
22330 +0xb9, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 0xe0, 0xff, 
22331 +0x12, 0x2f, 0x3b, 0x40, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x20, 0xe1, 0x06, 0x20, 0xe0, 0x03, 
22332 +0x02, 0x0e, 0xac, 0xe5, 0x53, 0x70, 0x09, 0x30, 0x0a, 0x03, 0x02, 0x19, 0x7a, 0x02, 0x19, 0x3e, 
22333 +0xe5, 0x2c, 0x20, 0xe1, 0x03, 0x02, 0x0e, 0xac, 0x15, 0x53, 0x30, 0x0a, 0x0b, 0x12, 0x18, 0xbd, 
22334 +0xf5, 0x83, 0xe0, 0x44, 0x08, 0xf0, 0x80, 0x09, 0x12, 0x18, 0xcb, 0xf5, 0x83, 0xe0, 0x44, 0x08, 
22335 +0xf0, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x35, 
22336 +0x45, 0x34, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 
22337 +0x12, 0x18, 0xd9, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x30, 0xe1, 0x03, 0x02, 0x0e, 0xac, 
22338 +0x90, 0xfa, 0xba, 0xe0, 0x90, 0xff, 0xff, 0xf0, 0xe0, 0x60, 0x05, 0x43, 0x2c, 0x01, 0x80, 0x03, 
22339 +0x53, 0x2c, 0xfe, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 0x20, 0xe7, 0x03, 0x02, 0x0e, 0xac, 
22340 +0xe5, 0x35, 0x45, 0x34, 0x70, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x18, 0xd9, 0x60, 0x03, 0x02, 0x0e, 
22341 +0xac, 0x90, 0xfa, 0xb9, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xec, 0x24, 0xfe, 0x60, 0x3a, 0x14, 0x60, 
22342 +0x75, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xed, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x18, 
22343 +0x49, 0x12, 0x19, 0x73, 0x7d, 0x03, 0x12, 0x0e, 0xf3, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x0e, 
22344 +0xb0, 0x90, 0xfa, 0xb2, 0xe0, 0xfd, 0xa3, 0x12, 0x18, 0x93, 0x12, 0x0f, 0x0f, 0x50, 0x02, 0x80, 
22345 +0x04, 0xae, 0x34, 0xaf, 0x35, 0x02, 0x0f, 0x40, 0x12, 0x18, 0x49, 0x90, 0xf9, 0x65, 0xe0, 0x30, 
22346 +0xe4, 0x0d, 0x12, 0x19, 0x73, 0x7d, 0x14, 0x12, 0x0e, 0xf3, 0x60, 0x10, 0x02, 0x0e, 0xac, 0x12, 
22347 +0x19, 0x73, 0x7d, 0x04, 0x12, 0x0f, 0x47, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x0e, 0xb0, 0x90, 
22348 +0xfa, 0xb2, 0xe0, 0xfd, 0xa3, 0x12, 0x18, 0x93, 0x12, 0x0f, 0x0f, 0x50, 0x02, 0x80, 0x04, 0xae, 
22349 +0x34, 0xaf, 0x35, 0x02, 0x0f, 0x40, 0x12, 0x19, 0x73, 0x7d, 0x05, 0x12, 0x0f, 0x47, 0x60, 0x03, 
22350 +0x02, 0x0e, 0xac, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xb2, 0x12, 0x18, 0x90, 0x7d, 0x01, 0x12, 0x23, 
22351 +0xee, 0x90, 0xfa, 0xb3, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x14, 0x2f, 0x90, 0xfa, 0xba, 0xe0, 0x90, 
22352 +0xfa, 0xb1, 0xf0, 0xe4, 0xf5, 0x52, 0x90, 0xfa, 0xb1, 0xe0, 0xff, 0xe5, 0x52, 0xc3, 0x9f, 0x50, 
22353 +0x24, 0x12, 0x18, 0x8a, 0x12, 0x0f, 0x52, 0xff, 0xfd, 0x90, 0xfa, 0xb3, 0xe4, 0x8d, 0xf0, 0x12, 
22354 +0x14, 0x2f, 0x90, 0xfa, 0xb2, 0xe0, 0xc3, 0x9f, 0xf0, 0xd3, 0x94, 0x00, 0x50, 0x03, 0x02, 0x0e, 
22355 +0xac, 0x05, 0x52, 0x80, 0xd1, 0x12, 0x18, 0x8a, 0x12, 0x0f, 0x52, 0x24, 0xfe, 0xff, 0x90, 0xfa, 
22356 +0xb2, 0xf0, 0xfd, 0xa3, 0xe4, 0x75, 0xf0, 0x02, 0x12, 0x14, 0x2f, 0x7a, 0xf9, 0x79, 0x6e, 0x7b, 
22357 +0x01, 0x8b, 0x2d, 0x8a, 0x2e, 0x89, 0x2f, 0xe9, 0x24, 0x02, 0xf9, 0xe4, 0x3a, 0xfa, 0x12, 0x18, 
22358 +0x90, 0x12, 0x23, 0xee, 0x8f, 0x52, 0x05, 0x52, 0x05, 0x52, 0x12, 0x18, 0x2a, 0xe5, 0x52, 0x12, 
22359 +0x13, 0xfb, 0x12, 0x18, 0x2a, 0x90, 0x00, 0x01, 0x74, 0x03, 0x12, 0x14, 0x0d, 0xaf, 0x52, 0x7e, 
22360 +0x00, 0xc3, 0xef, 0x95, 0x35, 0xee, 0x95, 0x34, 0x50, 0x02, 0x80, 0x04, 0xae, 0x34, 0xaf, 0x35, 
22361 +0x8e, 0x30, 0x8f, 0x31, 0x02, 0x29, 0x2d, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x20, 0xe7, 0x03, 0x02, 
22362 +0x0e, 0xac, 0xe5, 0x35, 0x64, 0x01, 0x45, 0x34, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 
22363 +0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb9, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x03, 
22364 +0x02, 0x0e, 0xac, 0x12, 0x18, 0xd9, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x20, 0xe0, 0x06, 
22365 +0x20, 0xe1, 0x03, 0x02, 0x0e, 0xac, 0x75, 0x2d, 0x00, 0x75, 0x2e, 0x00, 0x75, 0x2f, 0x29, 0x02, 
22366 +0x0f, 0x2f, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x35, 0x45, 0x34, 0x60, 0x03, 
22367 +0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb5, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xd3, 0x90, 0xfa, 0xba, 
22368 +0xe0, 0x94, 0x01, 0x90, 0xfa, 0xb9, 0xe0, 0x94, 0x00, 0x40, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x18, 
22369 +0xd9, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x20, 0xe0, 0x06, 0x20, 0xe1, 0x03, 0x02, 0x0e, 
22370 +0xac, 0x90, 0xfa, 0xba, 0xe0, 0xf5, 0x29, 0xe5, 0x29, 0x70, 0x08, 0x43, 0x2c, 0x01, 0x53, 0x2c, 
22371 +0xfd, 0x80, 0x06, 0x53, 0x2c, 0xfe, 0x43, 0x2c, 0x02, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 
22372 +0x20, 0xe7, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x35, 0x64, 0x01, 0x45, 0x34, 0x60, 0x03, 0x02, 0x0e, 
22373 +0xac, 0x90, 0xfa, 0xb5, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x90, 0xfa, 0xb9, 0xe0, 0x70, 0x02, 
22374 +0xa3, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0xac, 0x12, 0x18, 0xd9, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0e, 
22375 +0xac, 0xe5, 0x2c, 0x20, 0xe1, 0x03, 0x02, 0x0e, 0xac, 0x7f, 0x01, 0x02, 0x2f, 0x6a, 0xe5, 0x2c, 
22376 +0x30, 0xe7, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x35, 0x45, 0x34, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xd3, 
22377 +0x90, 0xfa, 0xba, 0xe0, 0x94, 0x00, 0x90, 0xfa, 0xb9, 0xe0, 0x94, 0x00, 0x40, 0x03, 0x02, 0x0e, 
22378 +0xac, 0x12, 0x18, 0xd9, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0e, 0xac, 0xe5, 0x2c, 0x20, 0xe1, 0x03, 
22379 +0x02, 0x0e, 0xac, 0xe4, 0xff, 0x02, 0x2f, 0x6a, 0x90, 0xff, 0x01, 0x12, 0x19, 0x8a, 0xef, 0x12, 
22380 +0x13, 0xfb, 0x90, 0xfa, 0xb5, 0x12, 0x19, 0x8a, 0x90, 0x00, 0x01, 0xef, 0x12, 0x14, 0x0d, 0x90, 
22381 +0x00, 0x02, 0xe4, 0x12, 0x14, 0x0d, 0x74, 0x03, 0x12, 0x18, 0x1b, 0x90, 0xfa, 0xb9, 0xe0, 0xff, 
22382 +0xa3, 0xe0, 0x85, 0x2f, 0x82, 0x85, 0x2e, 0x83, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0xff, 0x01, 
22383 +0xe0, 0x12, 0x15, 0x0f, 0x09, 0x3d, 0x02, 0x09, 0x5f, 0x04, 0x09, 0x81, 0x05, 0x09, 0xad, 0x06, 
22384 +0x09, 0xcb, 0x07, 0x09, 0xe9, 0x08, 0x0a, 0x07, 0x09, 0x0a, 0x25, 0x0b, 0x0a, 0xda, 0x80, 0x0c, 
22385 +0xfa, 0x81, 0x0d, 0x1c, 0x82, 0x0b, 0x21, 0x83, 0x0b, 0x6a, 0x84, 0x0b, 0x89, 0x85, 0x0b, 0xc5, 
22386 +0x86, 0x0c, 0x07, 0x87, 0x0c, 0x95, 0x88, 0x0c, 0xd0, 0x89, 0x0a, 0x43, 0x92, 0x0a, 0x43, 0x93, 
22387 +0x0d, 0xcf, 0xc0, 0x0e, 0x00, 0xc1, 0x0e, 0x11, 0xc2, 0x00, 0x00, 0x0e, 0x9b, 0xe5, 0x2c, 0x20, 
22388 +0xe7, 0x05, 0x7f, 0x05, 0x02, 0x2e, 0xa5, 0x12, 0x18, 0xe0, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 
22389 +0xfd, 0x7c, 0x00, 0x7f, 0x07, 0x02, 0x10, 0x9c, 0xe4, 0xfd, 0x7f, 0x07, 0x02, 0x2c, 0xc0, 0xe5, 
22390 +0x2c, 0x20, 0xe7, 0x05, 0x7f, 0x05, 0x02, 0x2e, 0xa5, 0x12, 0x18, 0xe0, 0x60, 0x03, 0x04, 0x70, 
22391 +0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0c, 0x02, 0x10, 0x9c, 0xe4, 0xfd, 0x7f, 0x07, 0x02, 0x2c, 
22392 +0xc0, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xaf, 0x12, 0x19, 0x99, 0x50, 0x06, 0xe5, 0x35, 
22393 +0x45, 0x34, 0x70, 0x05, 0x7f, 0x02, 0x02, 0x2e, 0xa5, 0x90, 0xfa, 0xb5, 0xe0, 0x24, 0xfe, 0x24, 
22394 +0xfd, 0x50, 0x02, 0x80, 0x03, 0x02, 0x2f, 0x28, 0x7f, 0x07, 0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 
22395 +0xe7, 0x03, 0x02, 0x0e, 0xaf, 0x12, 0x18, 0xe0, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 
22396 +0x00, 0x7f, 0x08, 0x02, 0x10, 0x9c, 0x7f, 0x07, 0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 
22397 +0x02, 0x0e, 0xaf, 0x12, 0x18, 0xe0, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 
22398 +0x09, 0x02, 0x10, 0x9c, 0x7f, 0x07, 0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 
22399 +0xaf, 0x12, 0x18, 0xe0, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0a, 0x02, 
22400 +0x10, 0x9c, 0x7f, 0x07, 0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xaf, 0x12, 
22401 +0x18, 0xe0, 0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0b, 0x02, 0x10, 0x9c, 
22402 +0x7f, 0x07, 0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 0xe7, 0x03, 0x02, 0x0e, 0xaf, 0x12, 0x18, 0xe0, 
22403 +0x60, 0x03, 0x04, 0x70, 0x09, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0e, 0x02, 0x10, 0x9c, 0x7f, 0x07, 
22404 +0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 0xe7, 0x56, 0x12, 0x18, 0xd9, 0x70, 0x4a, 0x90, 0xff, 0x02, 
22405 +0xe0, 0xf5, 0x52, 0xe5, 0x52, 0xb4, 0x82, 0x05, 0x75, 0x52, 0x61, 0x80, 0x12, 0xe5, 0x52, 0xb4, 
22406 +0x83, 0x05, 0x75, 0x52, 0x62, 0x80, 0x08, 0xe5, 0x52, 0xc4, 0x54, 0xf0, 0x04, 0xf5, 0x52, 0x12, 
22407 +0x17, 0x8b, 0x12, 0x19, 0x6c, 0x12, 0x22, 0xb8, 0x12, 0x18, 0xe8, 0x12, 0x13, 0xce, 0x60, 0x05, 
22408 +0x12, 0x2f, 0x76, 0x80, 0x06, 0x85, 0x2a, 0x30, 0x85, 0x2b, 0x31, 0x75, 0x2d, 0x01, 0x75, 0x2e, 
22409 +0xf9, 0x75, 0x2f, 0x71, 0x02, 0x29, 0x2d, 0xe4, 0xfd, 0x7f, 0x05, 0x02, 0x2c, 0xc0, 0x12, 0x18, 
22410 +0xd9, 0x60, 0x05, 0x7f, 0x05, 0x02, 0x2e, 0xa5, 0x12, 0x19, 0x99, 0x40, 0x05, 0x7f, 0x03, 0x02, 
22411 +0x2e, 0xa5, 0x90, 0xff, 0x02, 0xe0, 0xf5, 0x52, 0xe5, 0x52, 0xb4, 0x82, 0x05, 0x75, 0x52, 0x61, 
22412 +0x80, 0x12, 0xe5, 0x52, 0xb4, 0x83, 0x05, 0x75, 0x52, 0x62, 0x80, 0x08, 0xe5, 0x52, 0xc4, 0x54, 
22413 +0xf0, 0x04, 0xf5, 0x52, 0x12, 0x17, 0x8b, 0x02, 0x2f, 0x28, 0x12, 0x19, 0xa3, 0x12, 0x27, 0x19, 
22414 +0x12, 0x18, 0x9b, 0xe0, 0x54, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0xe0, 0x90, 0xfa, 0xb6, 0xf0, 0x78, 
22415 +0x6e, 0x12, 0x14, 0xeb, 0x90, 0x00, 0x02, 0x12, 0x13, 0xce, 0x30, 0xe7, 0xf2, 0x90, 0x00, 0x02, 
22416 +0xe4, 0x12, 0x14, 0x0d, 0x90, 0xfa, 0xb6, 0xe0, 0x44, 0x80, 0xff, 0xf0, 0x78, 0x82, 0xe6, 0xfc, 
22417 +0x08, 0xe6, 0x8c, 0x83, 0x12, 0x18, 0xa3, 0xef, 0xf0, 0x12, 0x2f, 0x80, 0xe4, 0xff, 0x02, 0x2e, 
22418 +0xa5, 0x90, 0xfa, 0xb5, 0xe0, 0x64, 0x01, 0x70, 0x1f, 0x90, 0xfa, 0xb9, 0xe0, 0xff, 0x7e, 0x00, 
22419 +0x70, 0x06, 0xa3, 0xe0, 0xf5, 0x90, 0x80, 0x2d, 0xc2, 0xaf, 0xef, 0xf4, 0x52, 0x90, 0x90, 0xfa, 
22420 +0xba, 0xe0, 0x42, 0x90, 0xd2, 0xaf, 0x80, 0x1d, 0x90, 0xfa, 0xb9, 0xe0, 0xff, 0x7e, 0x00, 0x70, 
22421 +0x06, 0xa3, 0xe0, 0xf5, 0xb0, 0x80, 0x0e, 0xc2, 0xaf, 0xef, 0xf4, 0x52, 0xb0, 0x90, 0xfa, 0xba, 
22422 +0xe0, 0x42, 0xb0, 0xd2, 0xaf, 0xe4, 0xff, 0x02, 0x2e, 0xa5, 0x12, 0x18, 0x49, 0x90, 0xfa, 0xb5, 
22423 +0xe0, 0xb4, 0x01, 0x0a, 0x12, 0x18, 0x2a, 0xe5, 0x90, 0x12, 0x13, 0xfb, 0x80, 0x08, 0x12, 0x18, 
22424 +0x2a, 0xe5, 0xb0, 0x12, 0x13, 0xfb, 0x02, 0x0f, 0x2f, 0x90, 0xf9, 0x65, 0xe0, 0x20, 0xe1, 0x30, 
22425 +0x12, 0x18, 0x53, 0x60, 0x18, 0x04, 0x70, 0x28, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x09, 0x90, 0xff, 
22426 +0xa4, 0xe0, 0x44, 0x10, 0xf0, 0x80, 0x19, 0x12, 0x19, 0xad, 0xf0, 0x80, 0x13, 0x90, 0xfa, 0xb6, 
22427 +0xe0, 0x60, 0x09, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x10, 0xf0, 0x80, 0x04, 0x12, 0x19, 0xb4, 0xf0, 
22428 +0xe4, 0xff, 0x02, 0x2e, 0xa5, 0x90, 0xf9, 0x65, 0xe0, 0x20, 0xe1, 0x36, 0x12, 0x18, 0x53, 0x60, 
22429 +0x1b, 0x04, 0x70, 0x2e, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x09, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x20, 
22430 +0xf0, 0x80, 0x1f, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xdf, 0xf0, 0x80, 0x16, 0x90, 0xfa, 0xb6, 0xe0, 
22431 +0x60, 0x09, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x07, 0x90, 0xff, 0xb4, 0xe0, 0x54, 
22432 +0xdf, 0xf0, 0xe4, 0xff, 0x02, 0x2e, 0xa5, 0x12, 0x18, 0x53, 0x60, 0x46, 0x04, 0x60, 0x03, 0x02, 
22433 +0x0c, 0x90, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x17, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x04, 0xf0, 0x90, 
22434 +0xf9, 0x65, 0xe0, 0x30, 0xe1, 0x6a, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x61, 0x90, 
22435 +0xff, 0xa4, 0xe0, 0x54, 0xfb, 0xf0, 0x90, 0xf9, 0x65, 0xe0, 0x30, 0xe1, 0x53, 0x30, 0x95, 0x09, 
22436 +0x90, 0xff, 0xa4, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x47, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xfd, 0xf0, 
22437 +0x80, 0x3e, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x17, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x04, 0xf0, 0x90, 
22438 +0xf9, 0x65, 0xe0, 0x30, 0xe1, 0x2a, 0x90, 0xff, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x21, 0x90, 
22439 +0xff, 0xb4, 0xe0, 0x54, 0xfb, 0xf0, 0x90, 0xf9, 0x65, 0xe0, 0x30, 0xe1, 0x13, 0x30, 0x93, 0x09, 
22440 +0x90, 0xff, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x07, 0x90, 0xff, 0xb4, 0xe0, 0x54, 0xfd, 0xf0, 
22441 +0xe4, 0xff, 0x02, 0x2e, 0xa5, 0x12, 0x18, 0x53, 0x60, 0x1b, 0x04, 0x70, 0x2e, 0x90, 0xfa, 0xb6, 
22442 +0xe0, 0x60, 0x09, 0x90, 0xff, 0xa2, 0xe0, 0x44, 0x40, 0xf0, 0x80, 0x1f, 0x90, 0xff, 0xa2, 0xe0, 
22443 +0x54, 0xbf, 0xf0, 0x80, 0x16, 0x90, 0xfa, 0xb6, 0xe0, 0x60, 0x09, 0x90, 0xff, 0xb2, 0xe0, 0x44, 
22444 +0x40, 0xf0, 0x80, 0x07, 0x90, 0xff, 0xb2, 0xe0, 0x54, 0xbf, 0xf0, 0xe4, 0xff, 0x02, 0x2e, 0xa5, 
22445 +0x12, 0x18, 0x49, 0x12, 0x18, 0x5b, 0x60, 0x0f, 0x04, 0x70, 0x16, 0x90, 0xff, 0xa4, 0xe0, 0x12, 
22446 +0x18, 0x2a, 0x12, 0x13, 0xfb, 0x80, 0x0a, 0x90, 0xff, 0xb4, 0xe0, 0x12, 0x18, 0x2a, 0x12, 0x13, 
22447 +0xfb, 0x75, 0x30, 0x00, 0x75, 0x31, 0x01, 0x02, 0x29, 0x2d, 0xe4, 0xff, 0x12, 0x2e, 0xa5, 0x12, 
22448 +0x19, 0x46, 0x7f, 0x03, 0x12, 0x11, 0x9f, 0x90, 0xff, 0xfc, 0xe0, 0x54, 0x7f, 0xf0, 0x7f, 0xff, 
22449 +0x7e, 0x00, 0x12, 0x2d, 0xee, 0xc2, 0x90, 0xc2, 0xaf, 0x00, 0x80, 0xfd, 0xe4, 0xf5, 0x54, 0xf5, 
22450 +0x55, 0x90, 0xfa, 0xbb, 0x74, 0x3e, 0xf0, 0xa3, 0xe4, 0xf0, 0x90, 0xfa, 0xb3, 0xf0, 0xa3, 0x74, 
22451 +0x15, 0xf0, 0xe0, 0x54, 0x3f, 0xff, 0xc3, 0x74, 0x40, 0x9f, 0x90, 0xfa, 0xb8, 0xf0, 0xd3, 0x94, 
22452 +0x00, 0xe4, 0x94, 0x3e, 0x40, 0x08, 0x90, 0xfa, 0xbc, 0xe0, 0x90, 0xfa, 0xb8, 0xf0, 0x12, 0x0e, 
22453 +0xd6, 0xe5, 0x23, 0x45, 0x22, 0x70, 0x73, 0x12, 0x18, 0x62, 0x90, 0xfa, 0xbb, 0x12, 0x19, 0x65, 
22454 +0x60, 0x27, 0xd3, 0xef, 0x94, 0x40, 0xee, 0x94, 0x00, 0x40, 0x08, 0x90, 0xfa, 0xb8, 0x74, 0x40, 
22455 +0xf0, 0x80, 0x08, 0x90, 0xfa, 0xbc, 0xe0, 0x90, 0xfa, 0xb8, 0xf0, 0x12, 0x0e, 0xd6, 0xe5, 0x23, 
22456 +0x45, 0x22, 0x70, 0x46, 0x12, 0x18, 0x62, 0x80, 0xd1, 0x75, 0x52, 0x02, 0x90, 0xfa, 0xbb, 0xe4, 
22457 +0xf0, 0xa3, 0x04, 0xf0, 0x90, 0xfa, 0xb3, 0xe4, 0xf0, 0xa3, 0x74, 0x0f, 0xf0, 0x7b, 0x00, 0x7a, 
22458 +0x00, 0x79, 0x52, 0x90, 0xfa, 0xbc, 0xe0, 0xf5, 0x50, 0x7d, 0x0f, 0x7c, 0x00, 0x12, 0x26, 0x25, 
22459 +0x75, 0x22, 0x00, 0x8f, 0x23, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x52, 0xe4, 0xf5, 0x40, 0xf5, 0x41, 
22460 +0x7d, 0x01, 0x12, 0x23, 0xee, 0xe4, 0xf5, 0x22, 0xf5, 0x23, 0xaf, 0x23, 0x02, 0x2e, 0xa5, 0x90, 
22461 +0xfa, 0xba, 0xe0, 0x90, 0xfa, 0xb6, 0xf0, 0x30, 0xe7, 0x10, 0xe0, 0x54, 0x0f, 0x90, 0xf9, 0x62, 
22462 +0xf0, 0xd3, 0x94, 0x00, 0x40, 0x15, 0xc2, 0x95, 0x80, 0x11, 0x90, 0xfa, 0xb6, 0xe0, 0x54, 0x0f, 
22463 +0x90, 0xf9, 0x61, 0xf0, 0xd3, 0x94, 0x00, 0x40, 0x02, 0xc2, 0x94, 0xe4, 0xff, 0x02, 0x2e, 0xa5, 
22464 +0x12, 0x19, 0xa3, 0xbf, 0x01, 0x04, 0xd2, 0x93, 0x80, 0x02, 0xc2, 0x93, 0xe4, 0xff, 0x02, 0x2e, 
22465 +0xa5, 0x90, 0xfa, 0xba, 0xe0, 0x90, 0xfa, 0xb6, 0xf0, 0x54, 0x03, 0x14, 0x60, 0x0a, 0x14, 0x60, 
22466 +0x0f, 0x14, 0x60, 0x08, 0x24, 0x03, 0x70, 0x2b, 0xd2, 0x91, 0x80, 0x27, 0xc2, 0x91, 0x80, 0x23, 
22467 +0x12, 0x19, 0xad, 0x12, 0x0e, 0xfe, 0x60, 0x04, 0xd2, 0x91, 0x80, 0x17, 0x90, 0xff, 0xa4, 0xe0, 
22468 +0x44, 0x10, 0x12, 0x0e, 0xfe, 0xff, 0xbf, 0xa0, 0x04, 0xc2, 0x91, 0x80, 0x02, 0xd2, 0x91, 0x12, 
22469 +0x19, 0xad, 0xf0, 0x90, 0xfa, 0xb6, 0xe0, 0x54, 0x0c, 0xff, 0x13, 0x13, 0x54, 0x3f, 0x14, 0x60, 
22470 +0x0a, 0x14, 0x60, 0x0f, 0x14, 0x60, 0x08, 0x24, 0x03, 0x70, 0x2b, 0xd2, 0x92, 0x80, 0x27, 0xc2, 
22471 +0x92, 0x80, 0x23, 0x12, 0x19, 0xb4, 0x12, 0x0f, 0x1e, 0x60, 0x04, 0xd2, 0x92, 0x80, 0x17, 0x90, 
22472 +0xff, 0xb4, 0xe0, 0x44, 0x10, 0x12, 0x0f, 0x1e, 0xff, 0xbf, 0xa0, 0x04, 0xc2, 0x92, 0x80, 0x02, 
22473 +0xd2, 0x92, 0x12, 0x19, 0xb4, 0xf0, 0xe4, 0xff, 0x02, 0x2e, 0xa5, 0xe5, 0x2c, 0x30, 0xe7, 0x07, 
22474 +0xe4, 0xfd, 0x7f, 0x05, 0x02, 0x2c, 0xc0, 0x7f, 0x05, 0x02, 0x2e, 0xa5, 0x12, 0x2f, 0x76, 0x22, 
22475 +0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xb2, 0x90, 0xfa, 0xb3, 0xe0, 0xf5, 0x40, 0xa3, 0xe0, 0xf5, 0x41, 
22476 +0x7d, 0x01, 0x12, 0x23, 0xee, 0x90, 0xfa, 0xb3, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x14, 0x2f, 0xab, 
22477 +0x2d, 0xaa, 0x2e, 0xa9, 0x2f, 0x22, 0xaa, 0x54, 0xa9, 0x55, 0x7b, 0xff, 0x90, 0xfa, 0xb3, 0xe0, 
22478 +0xfc, 0xa3, 0xe0, 0xfd, 0x90, 0xfa, 0xb8, 0xe0, 0xf5, 0x50, 0x12, 0x26, 0x25, 0x75, 0x22, 0x00, 
22479 +0x8f, 0x23, 0x22, 0x12, 0x20, 0xc5, 0x7e, 0x00, 0x8e, 0x22, 0x8f, 0x23, 0xef, 0x22, 0xf0, 0x7f, 
22480 +0x01, 0x12, 0x11, 0x9f, 0x90, 0xff, 0xa6, 0xe0, 0x90, 0xfa, 0xb7, 0xf0, 0x54, 0xa0, 0x22, 0x12, 
22481 +0x23, 0xee, 0x8f, 0x52, 0x7e, 0x00, 0xc3, 0xef, 0x95, 0x35, 0xee, 0x95, 0x34, 0x22, 0xf0, 0x7f, 
22482 +0x01, 0x12, 0x11, 0x9f, 0x90, 0xff, 0xb6, 0xe0, 0x90, 0xfa, 0xb7, 0xf0, 0x54, 0xa0, 0x22, 0x75, 
22483 +0x30, 0x00, 0x75, 0x31, 0x01, 0x02, 0x29, 0x2d, 0x90, 0xfa, 0xb5, 0xe0, 0xff, 0x02, 0x2f, 0x3b, 
22484 +0x8e, 0x30, 0x8f, 0x31, 0x02, 0x29, 0x2d, 0x12, 0x20, 0xc5, 0x7e, 0x00, 0x8e, 0x22, 0x8f, 0x23, 
22485 +0xef, 0x22, 0x7d, 0x01, 0x12, 0x23, 0xee, 0x90, 0xfa, 0xb0, 0xe0, 0x22, 0xef, 0x90, 0xf8, 0x04, 
22486 +0xf0, 0x22, 0xc0, 0xa8, 0xc2, 0xaf, 0xee, 0x60, 0x0a, 0xc0, 0x05, 0x7d, 0x7f, 0xdd, 0xfe, 0xde, 
22487 +0xfa, 0xd0, 0x05, 0xef, 0xc3, 0x94, 0x15, 0x50, 0x03, 0xd0, 0xa8, 0x22, 0x13, 0x70, 0x03, 0xd0, 
22488 +0xa8, 0x22, 0xff, 0xd5, 0x07, 0xfd, 0xd0, 0xa8, 0x22, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 
22489 +0x04, 0xc0, 0x05, 0xe5, 0x44, 0x24, 0x08, 0xf8, 0x86, 0x05, 0x53, 0x05, 0x7f, 0x7c, 0xff, 0x12, 
22490 +0x0f, 0xfe, 0x7f, 0x00, 0x7e, 0x00, 0xe5, 0x49, 0x60, 0x46, 0xfc, 0x90, 0xf9, 0x19, 0xe0, 0x54, 
22491 +0x7f, 0x6d, 0x70, 0x0f, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xa3, 0x15, 
22492 +0x49, 0x80, 0x07, 0xa3, 0xa3, 0xa3, 0xdc, 0xe6, 0x80, 0x26, 0xdc, 0x06, 0xd0, 0x82, 0xd0, 0x83, 
22493 +0x80, 0x1e, 0xe0, 0xf8, 0xa3, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa, 0xd0, 0x82, 0xd0, 0x83, 0xe8, 0xf0, 
22494 +0xa3, 0xe9, 0xf0, 0xa3, 0xea, 0xf0, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0x80, 0xda, 
22495 +0x12, 0x10, 0x95, 0xd0, 0x05, 0xd0, 0x04, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0x22, 0x85, 0xa8, 
22496 +0x4a, 0x75, 0xa8, 0x88, 0xec, 0x70, 0x02, 0x7c, 0x3f, 0x8c, 0x43, 0x22, 0xe5, 0x44, 0x24, 0x08, 
22497 +0xf8, 0x76, 0x00, 0x12, 0x10, 0xec, 0x80, 0xfb, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x04, 
22498 +0xc0, 0x06, 0x7c, 0xff, 0x12, 0x0f, 0xfe, 0xe5, 0x49, 0x60, 0x42, 0xfe, 0x90, 0xf9, 0x19, 0xe0, 
22499 +0x54, 0x7f, 0x6f, 0x70, 0x0b, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0x15, 0x49, 0x80, 0x07, 
22500 +0xa3, 0xa3, 0xa3, 0xde, 0xea, 0x80, 0x26, 0xde, 0x06, 0xd0, 0x82, 0xd0, 0x83, 0x80, 0xd8, 0xe0, 
22501 +0xf8, 0xa3, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa, 0xd0, 0x82, 0xd0, 0x83, 0xe8, 0xf0, 0xa3, 0xe9, 0xf0, 
22502 +0xa3, 0xea, 0xf0, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0x80, 0xda, 0x78, 0x08, 0x08, 
22503 +0x79, 0x18, 0x09, 0x7c, 0x01, 0xe6, 0x54, 0x7f, 0x6f, 0x70, 0x06, 0x76, 0x00, 0x77, 0x00, 0x80, 
22504 +0x06, 0x08, 0x09, 0x0c, 0xbc, 0x08, 0xee, 0x12, 0x10, 0x95, 0xd0, 0x06, 0xd0, 0x04, 0xd0, 0x02, 
22505 +0xd0, 0x01, 0xd0, 0x00, 0x22, 0x75, 0x43, 0x00, 0x85, 0x4a, 0xa8, 0x22, 0xc0, 0xf0, 0xc0, 0x82, 
22506 +0xc0, 0x83, 0xc3, 0xe5, 0x49, 0x24, 0xe8, 0x50, 0x05, 0x12, 0x10, 0xec, 0x80, 0xf4, 0xef, 0x60, 
22507 +0x31, 0x90, 0x2e, 0x2c, 0xe4, 0x93, 0xc3, 0x9f, 0x40, 0x2f, 0xc0, 0x04, 0x7c, 0xff, 0x12, 0x0f, 
22508 +0xfe, 0xd0, 0x04, 0x43, 0x07, 0x80, 0xe5, 0x49, 0x75, 0xf0, 0x03, 0xa4, 0x24, 0x19, 0xf5, 0x82, 
22509 +0xe4, 0x34, 0xf9, 0xf5, 0x83, 0xef, 0xf0, 0xec, 0xa3, 0xf0, 0xed, 0xa3, 0xf0, 0x05, 0x49, 0x12, 
22510 +0x10, 0x95, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0xf0, 0x22, 0x02, 0x11, 0x1a, 0xc0, 0x04, 0x7c, 0x20, 
22511 +0xd2, 0x8c, 0xd2, 0x8d, 0xd5, 0x04, 0xfd, 0xd0, 0x04, 0x22, 0x75, 0xa8, 0x00, 0x75, 0x88, 0x00, 
22512 +0x75, 0xb8, 0x00, 0x75, 0xf0, 0x00, 0x75, 0xd0, 0x00, 0xe4, 0xf8, 0x90, 0xf8, 0x04, 0xf0, 0x90, 
22513 +0x00, 0x00, 0xf6, 0x08, 0xb8, 0x00, 0xfb, 0x02, 0x00, 0x00, 0xc2, 0xaf, 0xe4, 0x90, 0xff, 0x48, 
22514 +0xf0, 0x90, 0xff, 0x50, 0xf0, 0x90, 0xff, 0x08, 0xf0, 0x90, 0xff, 0x10, 0xf0, 0x90, 0xff, 0x80, 
22515 +0xf0, 0xa3, 0xa3, 0xf0, 0xd2, 0xb1, 0xc2, 0xb0, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0x62, 0x7e, 
22516 +0xff, 0x7f, 0xff, 0x12, 0x0f, 0x62, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0x62, 0xd2, 0xb0, 0xd2, 
22517 +0xb1, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0x62, 0x7e, 0xff, 0x7f, 0xff, 0x12, 0x0f, 0x62, 0x7e, 
22518 +0xff, 0x7f, 0xff, 0x12, 0x0f, 0x62, 0x80, 0xcc, 0xc3, 0xee, 0x94, 0x02, 0x50, 0x04, 0x7e, 0x03, 
22519 +0x7f, 0xe8, 0xef, 0xf4, 0xff, 0xee, 0xf4, 0xfe, 0x0f, 0xbf, 0x00, 0x01, 0x0e, 0x8f, 0x48, 0x8e, 
22520 +0x47, 0x22, 0xc3, 0xef, 0x94, 0xbc, 0xee, 0x94, 0x02, 0x50, 0x04, 0x7e, 0x07, 0x7f, 0xd0, 0xef, 
22521 +0xf4, 0xff, 0xee, 0xf4, 0xfe, 0x0f, 0xbf, 0x00, 0x01, 0x0e, 0x8f, 0x46, 0x8e, 0x45, 0x22, 0xef, 
22522 +0x70, 0x01, 0x22, 0xc0, 0x00, 0xe5, 0x44, 0x24, 0x18, 0xf8, 0xa6, 0x07, 0xe5, 0x44, 0x24, 0x08, 
22523 +0xf8, 0xc6, 0x54, 0x7f, 0xf6, 0xe6, 0x30, 0xe7, 0x03, 0xd0, 0x00, 0x22, 0x12, 0x10, 0xec, 0x80, 
22524 +0xf4, 0xc0, 0x00, 0x7f, 0x01, 0xef, 0x24, 0x08, 0xf8, 0xe6, 0x60, 0x09, 0x0f, 0xbf, 0x08, 0xf5, 
22525 +0x12, 0x10, 0xec, 0x80, 0xee, 0xd0, 0x00, 0x22, 0xc0, 0xf0, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x00, 
22526 +0xc0, 0x06, 0xc0, 0x04, 0xed, 0x24, 0x10, 0xf8, 0x76, 0xa0, 0xed, 0x75, 0xf0, 0x21, 0xa4, 0x24, 
22527 +0x05, 0xf5, 0x82, 0xe4, 0x34, 0xf8, 0xf5, 0x83, 0xc0, 0x82, 0xc0, 0x83, 0xa3, 0xa3, 0xe4, 0x78, 
22528 +0x0d, 0xf0, 0xa3, 0xd8, 0xfc, 0xef, 0x54, 0x7f, 0x75, 0xf0, 0x02, 0xa4, 0x24, 0x0e, 0xf5, 0x82, 
22529 +0xe5, 0xf0, 0x34, 0x2e, 0xf5, 0x83, 0xe4, 0x93, 0xfe, 0x74, 0x01, 0x93, 0xfc, 0xd0, 0x83, 0xd0, 
22530 +0x82, 0xec, 0xf0, 0xa3, 0xee, 0xf0, 0xed, 0x24, 0x08, 0xf8, 0xef, 0x44, 0x80, 0xf6, 0xd0, 0x04, 
22531 +0xd0, 0x06, 0xd0, 0x00, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0xf0, 0x22, 0x75, 0x44, 0x00, 0x75, 0x49, 
22532 +0x00, 0x7a, 0x08, 0x79, 0x18, 0x78, 0x08, 0x76, 0x00, 0x77, 0x00, 0x08, 0x09, 0xda, 0xf8, 0x90, 
22533 +0xf8, 0x04, 0xe0, 0xfc, 0x90, 0x2e, 0x2c, 0xe4, 0x93, 0xc3, 0x9c, 0x50, 0x05, 0xe4, 0x90, 0xf8, 
22534 +0x04, 0xf0, 0x78, 0x08, 0x74, 0x80, 0x44, 0x7f, 0xf6, 0x74, 0x01, 0x44, 0x10, 0xf5, 0x89, 0x75, 
22535 +0xb8, 0x00, 0xd2, 0xab, 0xd2, 0xa9, 0x22, 0x75, 0x81, 0x91, 0xd2, 0x8e, 0xd2, 0x8c, 0xd2, 0xaf, 
22536 +0xe5, 0x49, 0x60, 0x36, 0xff, 0x90, 0xf9, 0x19, 0xe0, 0x54, 0x80, 0x60, 0x28, 0x78, 0x08, 0x79, 
22537 +0x08, 0xe0, 0x54, 0x7f, 0xfa, 0x7b, 0x00, 0xe6, 0x54, 0x7f, 0xb5, 0x02, 0x02, 0x7b, 0xff, 0x08, 
22538 +0xd9, 0xf5, 0xeb, 0x70, 0x10, 0xea, 0xf0, 0xc0, 0x07, 0x12, 0x11, 0xc1, 0xad, 0x07, 0xaf, 0x02, 
22539 +0x12, 0x11, 0xd8, 0xd0, 0x07, 0xa3, 0xa3, 0xa3, 0xdf, 0xce, 0x12, 0x10, 0xec, 0x80, 0xc1, 0xe7, 
22540 +0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e, 0x88, 
22541 +0x82, 0x8c, 0x83, 0xe7, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x32, 0xe3, 0x09, 0xf6, 0x08, 0xdf, 
22542 +0xfa, 0x80, 0x78, 0xe3, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x70, 0x88, 0x82, 0x8c, 0x83, 0xe3, 
22543 +0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x64, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf6, 0x08, 0xdf, 
22544 +0xfa, 0x80, 0x58, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x4c, 0x80, 
22545 +0xd2, 0x80, 0xfa, 0x80, 0xc6, 0x80, 0xd4, 0x80, 0x69, 0x80, 0xf2, 0x80, 0x33, 0x80, 0x10, 0x80, 
22546 +0xa6, 0x80, 0xea, 0x80, 0x9a, 0x80, 0xa8, 0x80, 0xda, 0x80, 0xe2, 0x80, 0xca, 0x80, 0x33, 0x89, 
22547 +0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 
22548 +0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0x0d, 
22549 +0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf6, 0x08, 0xdf, 0xf9, 0xec, 0xfa, 0xa9, 0xf0, 0xed, 
22550 +0xfb, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 
22551 +0x83, 0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xea, 0xde, 0xe8, 
22552 +0x80, 0xdb, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf2, 0x08, 0xdf, 0xf9, 0x80, 0xcc, 0x88, 
22553 +0xf0, 0xef, 0x60, 0x01, 0x0e, 0x4e, 0x60, 0xc3, 0x88, 0xf0, 0xed, 0x24, 0x02, 0xb4, 0x04, 0x00, 
22554 +0x50, 0xb9, 0xf5, 0x82, 0xeb, 0x24, 0x02, 0xb4, 0x04, 0x00, 0x50, 0xaf, 0x23, 0x23, 0x45, 0x82, 
22555 +0x23, 0x90, 0x13, 0x0f, 0x73, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 
22556 +0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 
22557 +0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 
22558 +0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 
22559 +0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 
22560 +0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xf8, 0xbb, 0x01, 
22561 +0x0d, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe8, 0xf0, 0x22, 0x50, 0x06, 
22562 +0xe9, 0x25, 0x82, 0xc8, 0xf6, 0x22, 0xbb, 0xfe, 0x05, 0xe9, 0x25, 0x82, 0xc8, 0xf2, 0x22, 0xc5, 
22563 +0xf0, 0xf8, 0xa3, 0xe0, 0x28, 0xf0, 0xc5, 0xf0, 0xf8, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02, 0x15, 
22564 +0x83, 0xe0, 0x38, 0xf0, 0x22, 0xa3, 0xf8, 0xe0, 0xc5, 0xf0, 0x25, 0xf0, 0xf0, 0xe5, 0x82, 0x15, 
22565 +0x82, 0x70, 0x02, 0x15, 0x83, 0xe0, 0xc8, 0x38, 0xf0, 0xe8, 0x22, 0xbb, 0x01, 0x10, 0xe5, 0x82, 
22566 +0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0, 0xa3, 0xe0, 0x22, 0x50, 0x09, 
22567 +0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe, 0x0a, 0xe9, 0x25, 0x82, 0xf8, 
22568 +0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83, 0xe9, 0x93, 0xf5, 0xf0, 0xa3, 
22569 +0xe9, 0x93, 0x22, 0xbb, 0x01, 0x0a, 0x89, 0x82, 0x8a, 0x83, 0xf0, 0xe5, 0xf0, 0xa3, 0xf0, 0x22, 
22570 +0x50, 0x06, 0xf7, 0x09, 0xa7, 0xf0, 0x19, 0x22, 0xbb, 0xfe, 0x06, 0xf3, 0xe5, 0xf0, 0x09, 0xf3, 
22571 +0x19, 0x22, 0xf8, 0xbb, 0x01, 0x11, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 
22572 +0xe8, 0xf0, 0xe5, 0xf0, 0xa3, 0xf0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xc8, 0xf6, 0x08, 0xa6, 
22573 +0xf0, 0x22, 0xbb, 0xfe, 0x09, 0xe9, 0x25, 0x82, 0xc8, 0xf2, 0xe5, 0xf0, 0x08, 0xf2, 0x22, 0xa4, 
22574 +0x25, 0x82, 0xf5, 0x82, 0xe5, 0xf0, 0x35, 0x83, 0xf5, 0x83, 0x22, 0xe6, 0xfb, 0x08, 0xe6, 0xfa, 
22575 +0x08, 0xe6, 0xf9, 0x22, 0xeb, 0xf6, 0x08, 0xea, 0xf6, 0x08, 0xe9, 0xf6, 0x22, 0xe0, 0xfb, 0xa3, 
22576 +0xe0, 0xfa, 0xa3, 0xe0, 0xf9, 0x22, 0xeb, 0xf0, 0xa3, 0xea, 0xf0, 0xa3, 0xe9, 0xf0, 0x22, 0xd0, 
22577 +0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 
22578 +0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 
22579 +0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0x90, 0xff, 0xfa, 0x74, 0x08, 0xf0, 0xa3, 0x74, 0x16, 0xf0, 0x90, 
22580 +0xff, 0xf9, 0x74, 0x02, 0xf0, 0x90, 0xfa, 0xcb, 0xe4, 0xf0, 0xa3, 0x74, 0x0b, 0xf0, 0x7b, 0x00, 
22581 +0x7a, 0x00, 0x79, 0x37, 0x75, 0x40, 0x00, 0xf5, 0x41, 0x7d, 0x01, 0x12, 0x23, 0xee, 0xe5, 0x37, 
22582 +0x24, 0x80, 0x90, 0xff, 0xf8, 0xf0, 0xe5, 0x37, 0x64, 0x07, 0x60, 0x0b, 0xe5, 0x37, 0x64, 0x06, 
22583 +0x60, 0x05, 0xe5, 0x37, 0xb4, 0x14, 0x1b, 0xd2, 0x94, 0xd2, 0x95, 0xd2, 0x92, 0xd2, 0x93, 0xe5, 
22584 +0x37, 0xb4, 0x07, 0x08, 0x90, 0xf9, 0x65, 0x74, 0x02, 0xf0, 0x80, 0x06, 0x90, 0xf9, 0x65, 0x74, 
22585 +0x01, 0xf0, 0x90, 0xfa, 0xcb, 0xe4, 0xf0, 0xa3, 0x74, 0x0d, 0xf0, 0x12, 0x17, 0x71, 0x90, 0xff, 
22586 +0xf5, 0xe5, 0x37, 0xf0, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xcb, 0xe4, 0xfd, 0x12, 0x20, 0xc5, 0x90, 
22587 +0xfa, 0xcb, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x14, 0x2f, 0x12, 0x17, 0x71, 0xe5, 0x37, 0x30, 0xe7, 
22588 +0x02, 0xd2, 0x02, 0xe4, 0xf5, 0x2c, 0xf5, 0x2a, 0xf5, 0x2b, 0xf5, 0x29, 0x12, 0x19, 0x92, 0x12, 
22589 +0x18, 0x49, 0x12, 0x19, 0x6c, 0x90, 0xf9, 0x66, 0x12, 0x15, 0x06, 0x90, 0xf9, 0x6b, 0x12, 0x15, 
22590 +0x06, 0x90, 0xff, 0xff, 0xe4, 0xf0, 0x90, 0xff, 0x83, 0xe0, 0xe4, 0xf0, 0x90, 0xff, 0x81, 0x74, 
22591 +0x80, 0xf0, 0xa3, 0x74, 0x84, 0xf0, 0x90, 0xff, 0x80, 0xf0, 0xe4, 0xf5, 0x37, 0xe5, 0x37, 0x12, 
22592 +0x18, 0xbf, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x37, 0x12, 0x18, 0xcd, 0xf5, 0x83, 0xe4, 0xf0, 0x05, 
22593 +0x37, 0xe5, 0x37, 0xb4, 0x07, 0xe7, 0x78, 0x80, 0x76, 0xfe, 0x08, 0x76, 0xf0, 0x90, 0x2f, 0x06, 
22594 +0xe4, 0x93, 0xff, 0x78, 0x7e, 0xf6, 0xfd, 0xad, 0x07, 0x90, 0x2f, 0x13, 0xe4, 0x93, 0xff, 0x08, 
22595 +0xf6, 0xff, 0xed, 0x54, 0x0f, 0xfd, 0x12, 0x18, 0xaf, 0x74, 0x84, 0xf0, 0xed, 0x75, 0xf0, 0x08, 
22596 +0xa4, 0x24, 0x47, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0xc3, 0x74, 0xf0, 0x9f, 
22597 +0x78, 0x81, 0xf6, 0x74, 0xfe, 0x94, 0x00, 0x18, 0x12, 0x18, 0x41, 0xce, 0xc3, 0x13, 0xce, 0x13, 
22598 +0xd8, 0xf9, 0xff, 0xed, 0x12, 0x19, 0x07, 0xef, 0xf0, 0xed, 0x12, 0x19, 0x2d, 0xe4, 0xf5, 0x37, 
22599 +0xe5, 0x37, 0x90, 0x2f, 0x00, 0x93, 0xff, 0x78, 0x7e, 0xf6, 0xfd, 0xe5, 0x37, 0x25, 0xe0, 0x24, 
22600 +0x07, 0xf5, 0x82, 0xe4, 0x34, 0x2f, 0xf5, 0x83, 0xe4, 0x93, 0x08, 0xf6, 0xed, 0x30, 0xe7, 0x53, 
22601 +0x18, 0xe6, 0x54, 0x0f, 0xf9, 0x12, 0x18, 0xaf, 0x12, 0x19, 0x15, 0x24, 0x47, 0xf5, 0x82, 0xe4, 
22602 +0x34, 0xff, 0x12, 0x18, 0x31, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0xe9, 0x12, 0x19, 
22603 +0x07, 0xef, 0xf0, 0x12, 0x18, 0x38, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0x12, 0x19, 0x1a, 
22604 +0x24, 0x45, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0xe9, 0x12, 0x19, 0x2d, 0xe9, 
22605 +0x75, 0xf0, 0x08, 0xa4, 0x24, 0x46, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0x74, 0x80, 0xf0, 
22606 +0x02, 0x17, 0x46, 0x78, 0x7e, 0xe6, 0x54, 0x0f, 0xf9, 0x12, 0x18, 0xf9, 0x12, 0x19, 0x15, 0x24, 
22607 +0x07, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0x12, 0x18, 0x31, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 
22608 +0x12, 0x19, 0x1a, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0x12, 0x18, 
22609 +0x38, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0x12, 0x19, 0x1a, 0x24, 0x05, 0xf5, 0x82, 0xe4, 
22610 +0x34, 0xff, 0xf5, 0x83, 0xef, 0xf0, 0xe9, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 
22611 +0x34, 0xff, 0xf5, 0x83, 0xe4, 0xf0, 0xe9, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4, 
22612 +0x34, 0xff, 0xf5, 0x83, 0xe4, 0xf0, 0x05, 0x37, 0xe5, 0x37, 0x64, 0x04, 0x60, 0x03, 0x02, 0x16, 
22613 +0x70, 0x90, 0x2f, 0x05, 0xe4, 0x93, 0xff, 0x78, 0x7e, 0xf6, 0x12, 0x18, 0xf7, 0xe4, 0xf0, 0x90, 
22614 +0x2f, 0x04, 0x93, 0xff, 0xf6, 0x12, 0x18, 0xad, 0xe4, 0xf0, 0x90, 0xff, 0xfd, 0x74, 0x05, 0xf0, 
22615 +0x22, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x37, 0x90, 0xfa, 0xcb, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x14, 
22616 +0x45, 0x85, 0xf0, 0x41, 0xf5, 0x40, 0x7d, 0x01, 0x02, 0x23, 0xee, 0xab, 0x2d, 0xaa, 0x2e, 0xa9, 
22617 +0x2f, 0xe5, 0x52, 0x12, 0x13, 0xfb, 0x74, 0x01, 0x25, 0x2f, 0xf5, 0x2f, 0xe4, 0x35, 0x2e, 0xf5, 
22618 +0x2e, 0xab, 0x2d, 0xfa, 0xa9, 0x2f, 0x74, 0x11, 0x12, 0x13, 0xfb, 0x74, 0x01, 0x25, 0x2f, 0xf5, 
22619 +0x2f, 0xe4, 0x35, 0x2e, 0xf5, 0x2e, 0x90, 0xff, 0x06, 0xe0, 0xab, 0x2d, 0xaa, 0x2e, 0xa9, 0x2f, 
22620 +0x12, 0x13, 0xfb, 0x74, 0x01, 0x25, 0x2f, 0xf5, 0x2f, 0xe4, 0x35, 0x2e, 0xf5, 0x2e, 0xab, 0x2d, 
22621 +0xfa, 0xa9, 0x2f, 0xe4, 0x12, 0x13, 0xfb, 0x04, 0x25, 0x2f, 0xf5, 0x2f, 0xe4, 0x35, 0x2e, 0xf5, 
22622 +0x2e, 0xab, 0x2d, 0xfa, 0xa9, 0x2f, 0xe4, 0x12, 0x13, 0xfb, 0x04, 0x25, 0x2f, 0xf5, 0x2f, 0xe4, 
22623 +0x35, 0x2e, 0xf5, 0x2e, 0x90, 0xff, 0x04, 0xe0, 0xab, 0x2d, 0xaa, 0x2e, 0xa9, 0x2f, 0x12, 0x13, 
22624 +0xfb, 0x74, 0x01, 0x25, 0x2f, 0xf5, 0x2f, 0xe4, 0x35, 0x2e, 0xf5, 0x2e, 0x90, 0xff, 0x05, 0xe0, 
22625 +0xab, 0x2d, 0xaa, 0x2e, 0xa9, 0x2f, 0x12, 0x13, 0xfb, 0x74, 0x01, 0x25, 0x2f, 0xf5, 0x2f, 0xe4, 
22626 +0x35, 0x2e, 0xf5, 0x2e, 0x22, 0xf5, 0x83, 0xe0, 0x54, 0x08, 0xab, 0x2d, 0xaa, 0x2e, 0xa9, 0x2f, 
22627 +0x22, 0xf5, 0x83, 0xef, 0xf0, 0xfd, 0x7c, 0x00, 0xc3, 0x78, 0x81, 0xe6, 0x9d, 0xf6, 0x18, 0xe6, 
22628 +0x9c, 0xf6, 0xe6, 0xfe, 0x08, 0xe6, 0x78, 0x03, 0x22, 0x75, 0x2d, 0x01, 0x75, 0x2e, 0xf9, 0x75, 
22629 +0x2f, 0x6e, 0x22, 0x90, 0xfa, 0xba, 0xe0, 0x90, 0xfa, 0xb6, 0xf0, 0x90, 0xfa, 0xb5, 0xe0, 0x24, 
22630 +0xfc, 0x22, 0x90, 0xfa, 0xb8, 0xe0, 0xff, 0x7e, 0x00, 0xc3, 0x90, 0xfa, 0xbc, 0xe0, 0x9f, 0xf0, 
22631 +0x90, 0xfa, 0xbb, 0xe0, 0x9e, 0xf0, 0x90, 0xfa, 0xb3, 0xee, 0x8f, 0xf0, 0x12, 0x14, 0x2f, 0xef, 
22632 +0x25, 0x55, 0xf5, 0x55, 0xee, 0x35, 0x54, 0xf5, 0x54, 0x22, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xb0, 
22633 +0x90, 0xfa, 0xb3, 0xe0, 0xf5, 0x40, 0xa3, 0xe0, 0xf5, 0x41, 0x22, 0x78, 0x82, 0xe6, 0xfe, 0x08, 
22634 +0xe6, 0x8e, 0x83, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0x22, 0x54, 0x0f, 0x75, 
22635 +0xf0, 0x08, 0xa4, 0x24, 0x40, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0x22, 0xe5, 0x53, 0x75, 
22636 +0xf0, 0x08, 0xa4, 0x24, 0x48, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0x22, 0xe5, 0x53, 0x75, 0xf0, 0x08, 
22637 +0xa4, 0x24, 0x08, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0x22, 0x90, 0xff, 0x00, 0xe0, 0x54, 0x1f, 0x22, 
22638 +0x90, 0xfa, 0xb5, 0xe0, 0xff, 0x24, 0xfc, 0x22, 0x75, 0x2a, 0x00, 0x8f, 0x2b, 0x90, 0xf9, 0x6b, 
22639 +0x12, 0x14, 0xfd, 0x90, 0x00, 0x02, 0x22, 0x54, 0x0f, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 
22640 +0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0x22, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x41, 0xf5, 0x82, 0xe4, 
22641 +0x34, 0xff, 0xf5, 0x83, 0x22, 0x74, 0x80, 0xf0, 0x08, 0xe6, 0xff, 0xe9, 0x75, 0xf0, 0x08, 0xa4, 
22642 +0x22, 0x74, 0xae, 0x25, 0x36, 0xf5, 0x82, 0xe4, 0x34, 0xfa, 0xf5, 0x83, 0x22, 0x75, 0xf0, 0x08, 
22643 +0xa4, 0x24, 0x42, 0xf5, 0x82, 0xe4, 0x34, 0xff, 0xf5, 0x83, 0x74, 0x80, 0xf0, 0x22, 0x90, 0xff, 
22644 +0x82, 0xe0, 0x44, 0x08, 0xf0, 0x22, 0x90, 0xff, 0xfe, 0xe0, 0x44, 0x03, 0xf0, 0x90, 0xff, 0xfc, 
22645 +0xe0, 0x54, 0xfd, 0xf0, 0x22, 0x78, 0x6d, 0xe6, 0x54, 0xfd, 0xf6, 0x90, 0xff, 0xfd, 0x74, 0x65, 
22646 +0xf0, 0x22, 0x12, 0x14, 0xdf, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x4e, 0x22, 0x7b, 0x01, 0x7a, 0xf9, 
22647 +0x79, 0x6e, 0x22, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xb3, 0x22, 0x90, 0xff, 0x80, 0xe0, 0x44, 0x08, 
22648 +0xf0, 0x22, 0x90, 0xff, 0x83, 0xe0, 0x54, 0x7f, 0xf0, 0x22, 0xe0, 0xff, 0x90, 0xf9, 0x66, 0x02, 
22649 +0x14, 0xfd, 0x75, 0x30, 0x01, 0x75, 0x31, 0x09, 0x22, 0xd3, 0xe5, 0x35, 0x94, 0x08, 0xe5, 0x34, 
22650 +0x94, 0x01, 0x22, 0x90, 0xfa, 0xba, 0xe0, 0xff, 0x90, 0xfa, 0xb6, 0xf0, 0x22, 0x90, 0xff, 0xa4, 
22651 +0xe0, 0x54, 0xef, 0x22, 0x90, 0xff, 0xb4, 0xe0, 0x54, 0xef, 0x22, 0x8f, 0x38, 0x12, 0x27, 0x19, 
22652 +0x78, 0x86, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x8e, 0x83, 0x24, 0x08, 0x12, 0x20, 0x25, 0xe0, 0xfd, 
22653 +0x12, 0x20, 0xa6, 0x8a, 0x83, 0x24, 0x0a, 0x12, 0x20, 0x25, 0xed, 0xf0, 0x12, 0x20, 0x7c, 0x24, 
22654 +0x07, 0x12, 0x20, 0x25, 0xe0, 0xff, 0x12, 0x20, 0xbe, 0x24, 0x09, 0x12, 0x20, 0x25, 0xef, 0xf0, 
22655 +0x90, 0xf9, 0x65, 0xe0, 0x30, 0xe4, 0x20, 0x08, 0x12, 0x20, 0x2f, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 
22656 +0xe0, 0x25, 0xe0, 0xff, 0x05, 0x82, 0xd5, 0x82, 0x02, 0x15, 0x83, 0x15, 0x82, 0xe0, 0x33, 0xd0, 
22657 +0x82, 0xd0, 0x83, 0xf0, 0xa3, 0xef, 0xf0, 0x78, 0x86, 0x12, 0x20, 0x2f, 0xe0, 0xfc, 0xa3, 0xe0, 
22658 +0xfd, 0xec, 0xff, 0x12, 0x20, 0xa6, 0x8a, 0x83, 0x24, 0x08, 0x12, 0x20, 0x25, 0xef, 0xf0, 0xed, 
22659 +0x12, 0x20, 0xbe, 0x24, 0x07, 0x12, 0x20, 0x25, 0xed, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 
22660 +0xe0, 0xff, 0x53, 0x07, 0xc7, 0x08, 0xe6, 0xfc, 0x08, 0xe6, 0xfd, 0x12, 0x20, 0x69, 0xa3, 0xe0, 
22661 +0x30, 0xe3, 0x12, 0x8d, 0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, 0x05, 0x12, 0x20, 0x25, 0xe0, 0x90, 
22662 +0x2f, 0x4d, 0x93, 0x42, 0x07, 0x53, 0x07, 0xfb, 0x12, 0x20, 0xae, 0x24, 0x06, 0x12, 0x20, 0x25, 
22663 +0xe0, 0x60, 0x03, 0x43, 0x07, 0x04, 0x53, 0x07, 0xfc, 0x78, 0x86, 0x12, 0x20, 0x96, 0x24, 0x04, 
22664 +0x12, 0x20, 0x25, 0xe0, 0x42, 0x07, 0x43, 0x07, 0x80, 0x12, 0x20, 0xa6, 0xf5, 0x82, 0x8a, 0x83, 
22665 +0xa3, 0xa3, 0xef, 0xf0, 0x12, 0x20, 0xbe, 0x24, 0x04, 0x12, 0x20, 0x25, 0xe0, 0xff, 0x8d, 0x82, 
22666 +0x8c, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0x30, 0xe1, 0x05, 0x53, 0x07, 0xdf, 0x80, 
22667 +0x03, 0x43, 0x07, 0x20, 0xec, 0x30, 0xe4, 0x05, 0x53, 0x07, 0xef, 0x80, 0x03, 0x43, 0x07, 0x10, 
22668 +0x90, 0xf9, 0x65, 0xe0, 0xfe, 0x54, 0x03, 0x60, 0x4c, 0x53, 0x07, 0xdf, 0xee, 0x30, 0xe1, 0x42, 
22669 +0x12, 0x20, 0xae, 0x24, 0x09, 0x12, 0x20, 0x25, 0xe0, 0x14, 0x60, 0x31, 0x14, 0x60, 0x29, 0x14, 
22670 +0x60, 0x26, 0x14, 0x60, 0x28, 0x24, 0x04, 0x70, 0x2c, 0xe5, 0x38, 0xb4, 0x03, 0x0d, 0x30, 0x95, 
22671 +0x05, 0x43, 0x07, 0x02, 0x80, 0x1f, 0x53, 0x07, 0xfd, 0x80, 0x1a, 0x30, 0x93, 0x05, 0x43, 0x07, 
22672 +0x02, 0x80, 0x12, 0x53, 0x07, 0xfd, 0x80, 0x0d, 0x43, 0x07, 0x02, 0x80, 0x08, 0x53, 0x07, 0xfd, 
22673 +0x80, 0x03, 0x53, 0x07, 0xfd, 0x12, 0x20, 0x94, 0x24, 0x04, 0x12, 0x20, 0x25, 0xef, 0xf0, 0x8d, 
22674 +0x82, 0x8c, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xff, 0x90, 0xf9, 0x65, 0xe0, 0xfe, 0x54, 0x03, 0x60, 
22675 +0x4a, 0xee, 0x30, 0xe1, 0x43, 0x08, 0x12, 0x20, 0xb0, 0x24, 0x09, 0x12, 0x20, 0x25, 0xe0, 0x14, 
22676 +0x60, 0x2c, 0x14, 0x60, 0x2e, 0x14, 0x60, 0x26, 0x14, 0x60, 0x28, 0x24, 0x04, 0x70, 0x2c, 0xe5, 
22677 +0x38, 0xb4, 0x03, 0x0d, 0x30, 0x94, 0x05, 0x53, 0x07, 0x7f, 0x80, 0x1f, 0x43, 0x07, 0x80, 0x80, 
22678 +0x1a, 0x30, 0x92, 0x05, 0x53, 0x07, 0x7f, 0x80, 0x12, 0x43, 0x07, 0x80, 0x80, 0x0d, 0x53, 0x07, 
22679 +0x7f, 0x80, 0x08, 0x43, 0x07, 0x80, 0x80, 0x03, 0x53, 0x07, 0x7f, 0x78, 0x86, 0x12, 0x20, 0x65, 
22680 +0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0x30, 0xe0, 0x05, 0x43, 0x07, 0x20, 0x80, 0x03, 0x53, 0x07, 0xdf, 
22681 +0xec, 0x30, 0xe3, 0x05, 0x43, 0x07, 0x40, 0x80, 0x03, 0x53, 0x07, 0xbf, 0xec, 0x30, 0xe0, 0x05, 
22682 +0x43, 0x07, 0x10, 0x80, 0x03, 0x53, 0x07, 0xef, 0xed, 0x30, 0xe4, 0x05, 0x43, 0x07, 0x08, 0x80, 
22683 +0x03, 0x53, 0x07, 0xf7, 0xed, 0x30, 0xe5, 0x05, 0x43, 0x07, 0x04, 0x80, 0x03, 0x53, 0x07, 0xfb, 
22684 +0xed, 0x30, 0xe6, 0x05, 0x43, 0x07, 0x01, 0x80, 0x03, 0x53, 0x07, 0xfe, 0xed, 0x30, 0xe7, 0x05, 
22685 +0x43, 0x07, 0x02, 0x80, 0x03, 0x53, 0x07, 0xfd, 0x78, 0x84, 0x12, 0x20, 0x65, 0xa3, 0xef, 0xf0, 
22686 +0x12, 0x2f, 0x80, 0x7f, 0x00, 0x22, 0x12, 0x0f, 0x89, 0x78, 0x8e, 0xef, 0xf6, 0x12, 0x27, 0x19, 
22687 +0x12, 0x20, 0x70, 0x8e, 0x83, 0x24, 0x09, 0x12, 0x20, 0x25, 0xe0, 0xfd, 0x12, 0x20, 0x53, 0x90, 
22688 +0x00, 0x0a, 0x12, 0x20, 0x78, 0x24, 0x0a, 0x12, 0x20, 0x25, 0xe0, 0x90, 0x00, 0x0b, 0x12, 0x14, 
22689 +0x0d, 0x12, 0x20, 0x70, 0xf5, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xf5, 0x59, 0x12, 0x20, 
22690 +0x7c, 0x24, 0x04, 0x12, 0x20, 0x25, 0xe0, 0xf5, 0x5a, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 
22691 +0xf5, 0x5b, 0xe5, 0x59, 0xc4, 0x13, 0x13, 0x13, 0x54, 0x01, 0x78, 0x8e, 0xf6, 0xd3, 0x94, 0x00, 
22692 +0x40, 0x06, 0xe5, 0x5a, 0x30, 0xe1, 0x01, 0x06, 0x78, 0x8e, 0xe6, 0x12, 0x20, 0x52, 0x90, 0x00, 
22693 +0x0c, 0xef, 0x12, 0x14, 0x0d, 0x78, 0x86, 0x12, 0x20, 0x2f, 0xa3, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 
22694 +0xff, 0x53, 0x07, 0x0c, 0x53, 0x06, 0xe6, 0xe5, 0x59, 0x30, 0xe5, 0x03, 0x43, 0x07, 0x01, 0xe5, 
22695 +0x5a, 0x20, 0xe5, 0x0e, 0xe5, 0x59, 0x54, 0x7f, 0x70, 0x08, 0xe5, 0x59, 0x20, 0xe7, 0x03, 0x43, 
22696 +0x07, 0x02, 0xe5, 0x59, 0x30, 0xe3, 0x03, 0x43, 0x07, 0x10, 0xe5, 0x59, 0x30, 0xe2, 0x03, 0x43, 
22697 +0x07, 0x20, 0xe5, 0x59, 0x54, 0x03, 0x60, 0x03, 0x43, 0x07, 0x40, 0xe5, 0x59, 0x30, 0xe1, 0x03, 
22698 +0x43, 0x07, 0x80, 0xe5, 0x59, 0x30, 0xe4, 0x03, 0x43, 0x06, 0x01, 0xe5, 0x59, 0x30, 0xe6, 0x03, 
22699 +0x43, 0x06, 0x08, 0xe5, 0x5a, 0x20, 0xe4, 0x0e, 0xe5, 0x59, 0x54, 0x7f, 0x70, 0x08, 0xe5, 0x59, 
22700 +0x20, 0xe7, 0x03, 0x43, 0x06, 0x10, 0x53, 0x07, 0xfb, 0x53, 0x06, 0x79, 0x90, 0x00, 0x05, 0xee, 
22701 +0x8f, 0xf0, 0x12, 0x14, 0xb2, 0xe5, 0x5b, 0x30, 0xe3, 0x12, 0x54, 0x30, 0xff, 0xc4, 0x54, 0x0f, 
22702 +0x12, 0x20, 0x52, 0x90, 0x00, 0x08, 0xef, 0x12, 0x14, 0x0d, 0x80, 0x0a, 0x12, 0x20, 0x53, 0x90, 
22703 +0x00, 0x08, 0xe4, 0x12, 0x14, 0x0d, 0xe5, 0x5b, 0x54, 0x03, 0x12, 0x20, 0x52, 0x90, 0x00, 0x07, 
22704 +0xef, 0x12, 0x14, 0x0d, 0xe5, 0x5b, 0x54, 0x04, 0xff, 0xc3, 0x13, 0x90, 0x00, 0x09, 0x12, 0x14, 
22705 +0x0d, 0x90, 0x00, 0x07, 0x12, 0x13, 0xce, 0x70, 0x13, 0x12, 0x20, 0x53, 0xe9, 0x24, 0x09, 0xf9, 
22706 +0xe4, 0x3a, 0xfa, 0x12, 0x13, 0xb5, 0xff, 0xc3, 0x13, 0x12, 0x13, 0xfb, 0x12, 0x20, 0x94, 0x24, 
22707 +0x08, 0x12, 0x20, 0x25, 0xe0, 0xfe, 0x8d, 0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, 0x07, 0x12, 0x20, 
22708 +0x25, 0xe0, 0xfd, 0xee, 0xed, 0x12, 0x20, 0x52, 0x90, 0x00, 0x03, 0xee, 0x8f, 0xf0, 0x12, 0x14, 
22709 +0xb2, 0x12, 0x2f, 0x80, 0x7d, 0x0a, 0xe4, 0xff, 0x12, 0x2c, 0xc0, 0x02, 0x10, 0x0c, 0x90, 0xfa, 
22710 +0xe2, 0xe0, 0xb4, 0x03, 0x06, 0x7e, 0x00, 0x7f, 0x40, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x08, 0x90, 
22711 +0xfa, 0xd6, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x00, 0x05, 0x12, 0x13, 0xce, 0xff, 0x7e, 0x00, 
22712 +0x90, 0xfa, 0xd2, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x70, 0x03, 0x7f, 0x08, 0x22, 0x90, 0x00, 0x08, 
22713 +0x12, 0x14, 0x5b, 0xff, 0x90, 0xfa, 0xd4, 0xe5, 0xf0, 0xf0, 0xa3, 0xef, 0xf0, 0xae, 0x02, 0xaf, 
22714 +0x01, 0x8e, 0x56, 0x8f, 0x57, 0x74, 0x0a, 0x25, 0x57, 0xf5, 0x57, 0xe4, 0x35, 0x56, 0xf5, 0x56, 
22715 +0x90, 0xfa, 0xd7, 0xe0, 0xff, 0x14, 0xfe, 0x90, 0xfa, 0xd5, 0xe0, 0x5e, 0xfe, 0xc3, 0xef, 0x9e, 
22716 +0xff, 0x90, 0xfa, 0xd9, 0xf0, 0xc3, 0x90, 0xfa, 0xd3, 0xe0, 0x9f, 0x90, 0xfa, 0xd2, 0xe0, 0x94, 
22717 +0x00, 0x50, 0x06, 0xa3, 0xe0, 0x90, 0xfa, 0xd9, 0xf0, 0x12, 0x1e, 0x2d, 0x60, 0x03, 0xe0, 0xff, 
22718 +0x22, 0x12, 0x2a, 0x80, 0x90, 0xfa, 0xd2, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x4e, 0x60, 0x2b, 0x90, 
22719 +0xfa, 0xd6, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xd3, 0xef, 0x9d, 0xee, 0x9c, 0x40, 0x07, 0xe0, 0x90, 
22720 +0xfa, 0xd9, 0xf0, 0x80, 0x08, 0x90, 0xfa, 0xd3, 0xe0, 0x90, 0xfa, 0xd9, 0xf0, 0x12, 0x1e, 0x2d, 
22721 +0x60, 0x03, 0xe0, 0xff, 0x22, 0x12, 0x2a, 0x80, 0x80, 0xca, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x58, 
22722 +0xe4, 0xf5, 0x40, 0xf5, 0x41, 0x7d, 0x01, 0x12, 0x23, 0xee, 0x7f, 0x00, 0x22, 0xaa, 0x56, 0xa9, 
22723 +0x57, 0x7b, 0x01, 0x90, 0xfa, 0xd4, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0x90, 0xfa, 0xd9, 0xe0, 0xf5, 
22724 +0x50, 0x12, 0x26, 0x25, 0x90, 0xfa, 0xd8, 0xef, 0xf0, 0x22, 0xef, 0x24, 0xae, 0x60, 0x52, 0x24, 
22725 +0xfe, 0x60, 0x2e, 0x24, 0xfe, 0x70, 0x03, 0x02, 0x1e, 0xed, 0x24, 0x06, 0x60, 0x03, 0x02, 0x1f, 
22726 +0x35, 0x78, 0x77, 0xe6, 0x54, 0xfb, 0xf6, 0x90, 0xff, 0xa5, 0xe0, 0xf5, 0x36, 0x44, 0x0f, 0xf0, 
22727 +0x74, 0x33, 0x90, 0xfa, 0x90, 0xf0, 0xe5, 0x36, 0xa3, 0xf0, 0x90, 0xfa, 0xae, 0x74, 0x01, 0xf0, 
22728 +0x22, 0x78, 0x78, 0xe6, 0x54, 0xfb, 0xf6, 0x90, 0xff, 0xb5, 0xe0, 0xf5, 0x36, 0x44, 0x0f, 0xf0, 
22729 +0x74, 0x43, 0x90, 0xfa, 0x92, 0xf0, 0xe5, 0x36, 0xa3, 0xf0, 0x90, 0xfa, 0xaf, 0x74, 0x01, 0xf0, 
22730 +0x22, 0x90, 0xfa, 0x9c, 0xe0, 0xa3, 0x20, 0xe5, 0x03, 0x02, 0x1f, 0x35, 0x90, 0xff, 0xa6, 0xe0, 
22731 +0x90, 0xfa, 0xc9, 0xf0, 0xa3, 0xf0, 0x90, 0xfa, 0xc9, 0xe0, 0xff, 0x54, 0x0f, 0xfe, 0x60, 0x10, 
22732 +0x90, 0xff, 0xa6, 0x12, 0x20, 0x83, 0x90, 0xff, 0xa6, 0xe0, 0x90, 0xfa, 0xc9, 0xf0, 0x80, 0xe6, 
22733 +0x90, 0xfa, 0xca, 0xe0, 0xff, 0x74, 0x34, 0xfe, 0x12, 0x29, 0xda, 0xef, 0x70, 0x57, 0x90, 0xfa, 
22734 +0xca, 0xe0, 0xff, 0x74, 0x34, 0x90, 0xfa, 0x94, 0xf0, 0xef, 0xa3, 0xf0, 0x22, 0x90, 0xfa, 0xa6, 
22735 +0xe0, 0xa3, 0x30, 0xe5, 0x40, 0x90, 0xff, 0xb6, 0xe0, 0x90, 0xfa, 0xc9, 0xf0, 0xa3, 0xf0, 0x90, 
22736 +0xfa, 0xc9, 0xe0, 0xff, 0x54, 0x0f, 0xfe, 0x60, 0x10, 0x90, 0xff, 0xb6, 0x12, 0x20, 0x83, 0x90, 
22737 +0xff, 0xb6, 0xe0, 0x90, 0xfa, 0xc9, 0xf0, 0x80, 0xe6, 0x90, 0xfa, 0xca, 0xe0, 0xff, 0x74, 0x44, 
22738 +0xfe, 0x12, 0x29, 0xda, 0xef, 0x70, 0x0e, 0x90, 0xfa, 0xca, 0xe0, 0xff, 0x74, 0x44, 0x90, 0xfa, 
22739 +0x96, 0xf0, 0xef, 0xa3, 0xf0, 0x22, 0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 
22740 +0x75, 0xd0, 0x00, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 
22741 +0x06, 0xc0, 0x07, 0x90, 0xff, 0x92, 0xe0, 0xff, 0x90, 0xfa, 0xc8, 0xf0, 0x90, 0xff, 0x92, 0xe4, 
22742 +0xf0, 0xef, 0x12, 0x15, 0x0f, 0x1f, 0xed, 0x26, 0x1f, 0xed, 0x2e, 0x1f, 0x90, 0x30, 0x1f, 0x90, 
22743 +0x32, 0x1f, 0x9e, 0x38, 0x1f, 0xb0, 0x3a, 0x1f, 0xe2, 0x3e, 0x1f, 0xcd, 0x44, 0x1f, 0xc2, 0x46, 
22744 +0x1f, 0xd8, 0x50, 0x1f, 0xd8, 0x52, 0x1f, 0xd8, 0x54, 0x1f, 0xd8, 0x56, 0x00, 0x00, 0x1f, 0xf2, 
22745 +0x90, 0xfa, 0xc8, 0xe0, 0xfd, 0x7c, 0x00, 0x7f, 0x01, 0x12, 0x10, 0x9c, 0x80, 0x62, 0x7c, 0x00, 
22746 +0x7d, 0x01, 0x7f, 0x03, 0x12, 0x10, 0x9c, 0x90, 0xff, 0xfe, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x50, 
22747 +0x7c, 0x00, 0x7d, 0x01, 0x7f, 0x02, 0x12, 0x10, 0x9c, 0x90, 0xff, 0xfe, 0xe0, 0x44, 0x40, 0xf0, 
22748 +0x80, 0x3e, 0x7c, 0x00, 0x7d, 0x01, 0x7f, 0x05, 0x12, 0x10, 0x9c, 0x80, 0x33, 0x7c, 0x00, 0x7d, 
22749 +0x01, 0x7f, 0x06, 0x12, 0x10, 0x9c, 0x80, 0x28, 0x90, 0xfa, 0xc8, 0xe0, 0xff, 0x12, 0x1e, 0x4a, 
22750 +0x80, 0x1e, 0x7c, 0x00, 0x7d, 0x01, 0x7f, 0x04, 0x12, 0x10, 0x9c, 0x80, 0x13, 0x12, 0x25, 0x13, 
22751 +0x80, 0x0e, 0x90, 0xfa, 0xc8, 0xe0, 0x24, 0x00, 0xff, 0xe4, 0x34, 0xff, 0xfe, 0x12, 0x29, 0xda, 
22752 +0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04, 0xd0, 0x03, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 
22753 +0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0, 0x32, 0x78, 0x82, 0xe6, 0xfe, 0x08, 
22754 +0xe6, 0x24, 0x04, 0x8e, 0x83, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0x22, 0x78, 0x82, 0xe6, 
22755 +0xfe, 0x08, 0xe6, 0xf5, 0x82, 0x8e, 0x83, 0x22, 0x78, 0x86, 0xe6, 0xfe, 0x08, 0xe6, 0xaa, 0x06, 
22756 +0xf8, 0xac, 0x02, 0x7d, 0x01, 0x7b, 0xff, 0x7a, 0x2f, 0x79, 0x52, 0x7e, 0x00, 0x7f, 0x0a, 0x02, 
22757 +0x13, 0x8f, 0xff, 0x90, 0xf9, 0x6b, 0x02, 0x14, 0xfd, 0x90, 0xf9, 0x66, 0x12, 0x14, 0xfd, 0x90, 
22758 +0x00, 0x04, 0x02, 0x13, 0xce, 0xe6, 0xfc, 0x08, 0xe6, 0xf5, 0x82, 0x8c, 0x83, 0xa3, 0xa3, 0x22, 
22759 +0x78, 0x84, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x22, 0xed, 0x12, 0x14, 0x0d, 0x8f, 0x82, 0x8e, 0x83, 
22760 +0xe5, 0x82, 0x22, 0xef, 0xf0, 0x90, 0xfa, 0xca, 0xe0, 0x54, 0x0f, 0x4e, 0xfe, 0xf0, 0xef, 0x54, 
22761 +0xf0, 0x4e, 0xf0, 0x22, 0x78, 0x84, 0xe6, 0xfc, 0x08, 0xe6, 0xfd, 0x8c, 0x83, 0x22, 0xa6, 0x07, 
22762 +0xe6, 0x24, 0x74, 0xf8, 0xe6, 0x22, 0x78, 0x84, 0xe6, 0xfa, 0x08, 0xe6, 0xfb, 0x22, 0x78, 0x86, 
22763 +0xe6, 0xfc, 0x08, 0xe6, 0x8c, 0x83, 0x22, 0x26, 0xf6, 0x18, 0xee, 0x36, 0xf6, 0x22, 0x8b, 0x82, 
22764 +0x8a, 0x83, 0xe5, 0x82, 0x22, 0x8b, 0x38, 0x8a, 0x39, 0x89, 0x3a, 0x8d, 0x3b, 0x90, 0xfa, 0xce, 
22765 +0xe4, 0xf0, 0xa3, 0x74, 0x02, 0xf0, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xcd, 0x90, 0xfa, 0xce, 0xe0, 
22766 +0xf5, 0x40, 0xa3, 0xe0, 0xf5, 0x41, 0x7d, 0x01, 0x12, 0x23, 0xee, 0x90, 0xfa, 0xcd, 0xe0, 0x65, 
22767 +0x3b, 0x60, 0x46, 0xa3, 0xe0, 0xff, 0xa3, 0xe0, 0xa3, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x12, 0x21, 
22768 +0x54, 0x90, 0xfa, 0xcd, 0xe0, 0xff, 0x90, 0xfa, 0xd0, 0xe4, 0x8f, 0xf0, 0x12, 0x14, 0x2f, 0x12, 
22769 +0x21, 0x54, 0x90, 0xfa, 0xd0, 0xe0, 0xff, 0xa3, 0xe0, 0x90, 0xfa, 0xce, 0xcf, 0xf0, 0xa3, 0xef, 
22770 +0xf0, 0x90, 0xfa, 0xcd, 0xe0, 0xa3, 0x75, 0xf0, 0x00, 0x12, 0x14, 0x2f, 0x90, 0xfa, 0xce, 0xe4, 
22771 +0x75, 0xf0, 0x04, 0x12, 0x14, 0x2f, 0x02, 0x20, 0xd6, 0x90, 0xfa, 0xcf, 0xe0, 0x24, 0x01, 0xff, 
22772 +0x90, 0xfa, 0xce, 0xe0, 0x34, 0x00, 0xab, 0x38, 0xaa, 0x39, 0xa9, 0x3a, 0x8f, 0xf0, 0x12, 0x14, 
22773 +0x93, 0x7f, 0x00, 0x22, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xcd, 0x90, 0xfa, 0xce, 0xe4, 0x75, 0xf0, 
22774 +0x01, 0x12, 0x14, 0x2f, 0x85, 0xf0, 0x41, 0xf5, 0x40, 0x7d, 0x01, 0x02, 0x23, 0xee, 0x8f, 0x68, 
22775 +0x12, 0x27, 0x19, 0x12, 0x20, 0x70, 0x8e, 0x83, 0x24, 0x0b, 0x12, 0x20, 0x25, 0xe0, 0x54, 0xfb, 
22776 +0xf0, 0x44, 0x02, 0xf0, 0x08, 0x12, 0x20, 0x65, 0xe0, 0xa3, 0x30, 0xe5, 0x0c, 0x12, 0x20, 0x7c, 
22777 +0x24, 0x0b, 0x12, 0x20, 0x25, 0xe0, 0x44, 0x01, 0xf0, 0x78, 0x82, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 
22778 +0xf5, 0x82, 0x8e, 0x83, 0xe0, 0x54, 0xb8, 0xfd, 0xf0, 0xe5, 0x68, 0x24, 0xfe, 0x44, 0x20, 0xfc, 
22779 +0x4d, 0xf0, 0xe5, 0x82, 0x24, 0x04, 0x12, 0x20, 0x25, 0xe0, 0x54, 0xb8, 0xf0, 0x4c, 0xf0, 0x8f, 
22780 +0x82, 0x8e, 0x83, 0xa3, 0x74, 0x03, 0xf0, 0x18, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x8e, 0x83, 0x24, 
22781 +0x05, 0x12, 0x20, 0x25, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x74, 0x95, 0x25, 0x68, 0xf5, 0x82, 
22782 +0xe4, 0x34, 0xfa, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0x44, 0x03, 0xfc, 0xed, 0x4c, 0xd0, 0x82, 0xd0, 
22783 +0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x82, 0x24, 0x04, 0x12, 0x20, 
22784 +0x25, 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x2f, 0x80, 0x74, 0x74, 0x25, 0x68, 0xf8, 0x74, 0x04, 0x46, 
22785 +0xf6, 0x7f, 0x00, 0x22, 0x8b, 0x62, 0x8a, 0x63, 0x89, 0x64, 0x12, 0x2a, 0x62, 0x90, 0xfa, 0xbf, 
22786 +0x12, 0x15, 0x06, 0xaa, 0x63, 0xa9, 0x64, 0x90, 0xfa, 0xc2, 0x12, 0x15, 0x06, 0x90, 0xfa, 0xc3, 
22787 +0xe4, 0x75, 0xf0, 0x0a, 0x12, 0x14, 0x2f, 0x90, 0xfa, 0xc2, 0x12, 0x14, 0xfd, 0xe9, 0x24, 0x01, 
22788 +0xf9, 0xe4, 0x3a, 0xfa, 0x90, 0xfa, 0xc5, 0x12, 0x15, 0x06, 0xab, 0x62, 0xaa, 0x63, 0xa9, 0x64, 
22789 +0x12, 0x2a, 0x6e, 0xe0, 0xff, 0xc3, 0x13, 0xf0, 0xe4, 0x78, 0x88, 0xf6, 0x90, 0xfa, 0xbd, 0xe0, 
22790 +0xff, 0x78, 0x88, 0xe6, 0xc3, 0x9f, 0x50, 0x4a, 0x90, 0xfa, 0xbf, 0x12, 0x2a, 0x43, 0xff, 0x78, 
22791 +0x89, 0xf6, 0x90, 0xfa, 0xc2, 0x12, 0x2a, 0x43, 0xfe, 0xf4, 0x5f, 0xff, 0x78, 0x89, 0xf6, 0x12, 
22792 +0x2a, 0x40, 0x5e, 0x4f, 0xff, 0x78, 0x89, 0xf6, 0x12, 0x2a, 0x49, 0x75, 0xf0, 0x02, 0x12, 0x14, 
22793 +0x2f, 0x90, 0xfa, 0xc3, 0xe4, 0x75, 0xf0, 0x02, 0x12, 0x14, 0x2f, 0xab, 0x62, 0xaa, 0x63, 0xa9, 
22794 +0x64, 0x90, 0x00, 0x04, 0x12, 0x13, 0xce, 0x30, 0xe4, 0x03, 0x12, 0x2a, 0x58, 0x78, 0x88, 0x06, 
22795 +0x80, 0xaa, 0xe4, 0x90, 0xfa, 0xbe, 0xf0, 0x22, 0x8b, 0x5c, 0x8a, 0x5d, 0x89, 0x5e, 0x90, 0xfa, 
22796 +0xbe, 0x74, 0x06, 0xf0, 0xe4, 0x90, 0xfa, 0xbd, 0xf0, 0x12, 0x13, 0xb5, 0x24, 0x6e, 0x60, 0x26, 
22797 +0x14, 0x70, 0x70, 0x12, 0x2a, 0x2f, 0x60, 0x09, 0x24, 0x30, 0x70, 0x12, 0x12, 0x22, 0x14, 0x80, 
22798 +0x62, 0x12, 0x2a, 0x79, 0x12, 0x1d, 0x5e, 0x90, 0xfa, 0xbe, 0xef, 0xf0, 0x80, 0x55, 0x90, 0xfa, 
22799 +0xbe, 0x74, 0x81, 0xf0, 0x80, 0x4d, 0x12, 0x2a, 0x2f, 0x60, 0x09, 0x24, 0x30, 0x70, 0x3e, 0x12, 
22800 +0x29, 0x85, 0x80, 0x3f, 0xe5, 0x5e, 0x24, 0x03, 0xf9, 0xe4, 0x35, 0x5d, 0xfa, 0x7b, 0x01, 0xc0, 
22801 +0x03, 0xc0, 0x02, 0xc0, 0x01, 0x12, 0x2a, 0x79, 0x90, 0x00, 0x05, 0x12, 0x13, 0xce, 0xfd, 0x90, 
22802 +0x00, 0x08, 0x12, 0x14, 0x5b, 0xf5, 0x41, 0x85, 0xf0, 0x40, 0xd0, 0x01, 0xd0, 0x02, 0xd0, 0x03, 
22803 +0x12, 0x23, 0xee, 0x90, 0xfa, 0xbd, 0xef, 0xf0, 0xe4, 0xa3, 0xf0, 0x80, 0x06, 0x90, 0xfa, 0xbe, 
22804 +0x74, 0x81, 0xf0, 0x90, 0xfa, 0xbe, 0xe0, 0x12, 0x2a, 0x79, 0x90, 0x00, 0x02, 0x12, 0x14, 0x0d, 
22805 +0x90, 0xfa, 0xbd, 0xe0, 0xff, 0x22, 0x12, 0x0f, 0x89, 0x7f, 0x02, 0x12, 0x11, 0x9f, 0x78, 0x6d, 
22806 +0xe6, 0x44, 0x02, 0xf6, 0xd2, 0xb0, 0xd2, 0xb1, 0xd2, 0xb3, 0x90, 0xff, 0xa4, 0xe0, 0x90, 0xfa, 
22807 +0x7a, 0xf0, 0x90, 0xff, 0xb4, 0xe0, 0x90, 0xfa, 0x7b, 0xf0, 0x90, 0xff, 0xa2, 0xe0, 0x90, 0xfa, 
22808 +0x78, 0xf0, 0x90, 0xff, 0xb2, 0xe0, 0x90, 0xfa, 0x79, 0xf0, 0x90, 0xff, 0xa4, 0x74, 0x30, 0xf0, 
22809 +0x90, 0xff, 0xb4, 0xf0, 0x90, 0xff, 0xa2, 0x74, 0x40, 0xf0, 0x90, 0xff, 0xb2, 0xf0, 0x90, 0xfa, 
22810 +0xe3, 0xe5, 0xa8, 0xf0, 0x75, 0xa8, 0x81, 0x90, 0xff, 0x92, 0xe0, 0x60, 0x04, 0xe4, 0xf0, 0x80, 
22811 +0xf6, 0x90, 0xff, 0xfd, 0x74, 0x3a, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x90, 0xfa, 0x7a, 
22812 +0xe0, 0x90, 0xff, 0xa4, 0xf0, 0x90, 0xfa, 0x7b, 0xe0, 0x90, 0xff, 0xb4, 0xf0, 0x90, 0xfa, 0x78, 
22813 +0xe0, 0x90, 0xff, 0xa2, 0xf0, 0x90, 0xfa, 0x79, 0xe0, 0x90, 0xff, 0xb2, 0xf0, 0x90, 0xf9, 0x15, 
22814 +0xe0, 0x60, 0x02, 0xc2, 0xb3, 0x90, 0xfa, 0xe3, 0xe0, 0xf5, 0xa8, 0x02, 0x10, 0x0c, 0x8b, 0x3c, 
22815 +0x8a, 0x3d, 0x89, 0x3e, 0x8d, 0x3f, 0xe5, 0x3f, 0x70, 0x03, 0xaf, 0x3f, 0x22, 0x12, 0x2a, 0xa8, 
22816 +0x70, 0x16, 0x12, 0x2a, 0xc7, 0xe5, 0x40, 0x90, 0xff, 0xf1, 0xf0, 0x12, 0x2e, 0xd4, 0x50, 0xf2, 
22817 +0x12, 0x24, 0x7b, 0x40, 0x0b, 0x7f, 0x00, 0x22, 0x12, 0x2a, 0xc7, 0x12, 0x24, 0x7b, 0x50, 0xf8, 
22818 +0x90, 0xff, 0xf3, 0x74, 0xa1, 0xf0, 0xe5, 0x3f, 0xb4, 0x01, 0x07, 0x90, 0xff, 0xf0, 0xe0, 0x44, 
22819 +0x02, 0xf0, 0x90, 0xff, 0xf1, 0xe4, 0xf0, 0xf5, 0x42, 0xe5, 0x3f, 0x14, 0xff, 0xe5, 0x42, 0xc3, 
22820 +0x9f, 0x50, 0x2a, 0x12, 0x2e, 0xbd, 0x40, 0x03, 0xaf, 0x42, 0x22, 0xc3, 0xe5, 0x3f, 0x95, 0x42, 
22821 +0xff, 0xbf, 0x02, 0x07, 0x90, 0xff, 0xf0, 0xe0, 0x44, 0x02, 0xf0, 0x12, 0x2a, 0xba, 0x05, 0x42, 
22822 +0x74, 0x01, 0x25, 0x3e, 0xf5, 0x3e, 0xe4, 0x35, 0x3d, 0xf5, 0x3d, 0x80, 0xcc, 0x12, 0x2e, 0xbd, 
22823 +0x40, 0x03, 0x7f, 0x18, 0x22, 0x12, 0x2a, 0xba, 0xaf, 0x3f, 0x22, 0x90, 0xff, 0xf1, 0xe5, 0x41, 
22824 +0xf0, 0x02, 0x2e, 0xd4, 0x75, 0xa8, 0x40, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x91, 
22825 +0x02, 0x24, 0xce, 0x02, 0x2e, 0x88, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 
22826 +0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 
22827 +0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 
22828 +0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x28, 
22829 +0xcb, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 
22830 +0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 
22831 +0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 
22832 +0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 
22833 +0xe7, 0x80, 0xbe, 0xe4, 0xf5, 0x36, 0x12, 0x19, 0x21, 0xe0, 0xb4, 0x04, 0x0d, 0xe5, 0x36, 0x24, 
22834 +0x03, 0xff, 0x12, 0x2d, 0x4f, 0x12, 0x19, 0x21, 0xe4, 0xf0, 0x05, 0x36, 0xe5, 0x36, 0xc3, 0x94, 
22835 +0x02, 0x40, 0xe3, 0xe4, 0xf5, 0x36, 0x75, 0xf0, 0x02, 0xe5, 0x36, 0x90, 0xfa, 0x90, 0x12, 0x19, 
22836 +0x62, 0x60, 0x2c, 0x12, 0x29, 0xda, 0xef, 0x60, 0x52, 0x75, 0xf0, 0x02, 0xe5, 0x36, 0x90, 0xfa, 
22837 +0x90, 0x12, 0x14, 0xdf, 0xe4, 0xf0, 0xa3, 0xf0, 0x75, 0xf0, 0x0a, 0xe5, 0x36, 0x90, 0xfa, 0x9c, 
22838 +0x12, 0x14, 0xdf, 0xe0, 0xa3, 0x30, 0xe6, 0x33, 0x12, 0x19, 0x21, 0x74, 0x04, 0xf0, 0x22, 0x75, 
22839 +0xf0, 0x02, 0xe5, 0x36, 0x90, 0xfa, 0x94, 0x12, 0x19, 0x62, 0x60, 0x16, 0x12, 0x29, 0xda, 0xef, 
22840 +0x60, 0x19, 0x75, 0xf0, 0x02, 0xe5, 0x36, 0x90, 0xfa, 0x94, 0x12, 0x14, 0xdf, 0xe4, 0xf0, 0xa3, 
22841 +0xf0, 0x22, 0x05, 0x36, 0xe5, 0x36, 0xc3, 0x94, 0x02, 0x40, 0x9b, 0x22, 0xe4, 0xff, 0x90, 0xff, 
22842 +0x83, 0xe0, 0x54, 0x0f, 0xfe, 0xef, 0xc3, 0x9e, 0x50, 0x17, 0x74, 0xf0, 0x2f, 0xf5, 0x82, 0xe4, 
22843 +0x34, 0xfe, 0xf5, 0x83, 0xe0, 0x12, 0x18, 0x2a, 0x12, 0x13, 0xfb, 0x0f, 0x12, 0x18, 0x19, 0x80, 
22844 +0xdd, 0xef, 0xfd, 0xc3, 0xe5, 0x31, 0x9d, 0xf5, 0x31, 0xe5, 0x30, 0x94, 0x00, 0xf5, 0x30, 0xd3, 
22845 +0xe5, 0x31, 0x94, 0x00, 0xe5, 0x30, 0x94, 0x00, 0x40, 0x06, 0xe4, 0x90, 0xff, 0x83, 0xf0, 0x22, 
22846 +0x12, 0x19, 0x3e, 0x12, 0x19, 0x92, 0x12, 0x19, 0x8c, 0x12, 0x13, 0xb5, 0x24, 0x6e, 0x60, 0x1e, 
22847 +0x14, 0x60, 0x1b, 0x24, 0x8e, 0x70, 0x2d, 0x90, 0x00, 0x01, 0x12, 0x13, 0xce, 0xff, 0x24, 0xfc, 
22848 +0x60, 0x03, 0x04, 0x70, 0x1f, 0xef, 0xfd, 0x7c, 0x00, 0x7f, 0x0d, 0x02, 0x10, 0x9c, 0x12, 0x19, 
22849 +0x6c, 0x12, 0x22, 0xb8, 0x12, 0x18, 0xe8, 0x12, 0x13, 0xce, 0x60, 0x03, 0x02, 0x2f, 0x76, 0xe4, 
22850 +0xff, 0x12, 0x2f, 0x6a, 0x22, 0x8b, 0x4b, 0x8a, 0x4c, 0x89, 0x4d, 0x8c, 0x4e, 0x8d, 0x4f, 0xd2, 
22851 +0x00, 0x12, 0x2a, 0xa8, 0x70, 0x16, 0x12, 0x2a, 0xc7, 0xe5, 0x4e, 0x90, 0xff, 0xf1, 0xf0, 0x12, 
22852 +0x2e, 0xd4, 0x50, 0xf2, 0x12, 0x26, 0x9a, 0x40, 0x0b, 0x7f, 0x18, 0x22, 0x12, 0x2a, 0xc7, 0x12, 
22853 +0x26, 0x9a, 0x50, 0xf8, 0xe4, 0xf5, 0x51, 0xe5, 0x50, 0x14, 0xff, 0xe5, 0x51, 0xc3, 0x9f, 0x50, 
22854 +0x17, 0x12, 0x26, 0x8a, 0x40, 0x03, 0x7f, 0x18, 0x22, 0x05, 0x51, 0x74, 0x01, 0x25, 0x4d, 0xf5, 
22855 +0x4d, 0xe4, 0x35, 0x4c, 0xf5, 0x4c, 0x80, 0xdf, 0x90, 0xff, 0xf0, 0xe0, 0x44, 0x01, 0xf0, 0x12, 
22856 +0x26, 0x8a, 0x40, 0x03, 0x7f, 0x18, 0x22, 0x7f, 0x00, 0x22, 0xab, 0x4b, 0xaa, 0x4c, 0xa9, 0x4d, 
22857 +0x12, 0x13, 0xb5, 0x90, 0xff, 0xf1, 0xf0, 0x02, 0x2e, 0xd4, 0x90, 0xff, 0xf1, 0xe5, 0x4f, 0xf0, 
22858 +0x02, 0x2e, 0xd4, 0x7b, 0x01, 0x7a, 0xfa, 0x79, 0xcb, 0xe4, 0xfd, 0x12, 0x20, 0xc5, 0x90, 0xfa, 
22859 +0xcb, 0xe4, 0x75, 0xf0, 0x09, 0x12, 0x14, 0x2f, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x37, 0x90, 0xfa, 
22860 +0xcb, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x14, 0x45, 0x85, 0xf0, 0x41, 0xf5, 0x40, 0x7d, 0x01, 0x12, 
22861 +0x23, 0xee, 0x90, 0xff, 0xf7, 0xe5, 0x37, 0x12, 0x26, 0xfe, 0x90, 0xff, 0xf6, 0xe5, 0x37, 0xf0, 
22862 +0x90, 0xfa, 0xcb, 0xe4, 0xf0, 0xa3, 0x74, 0x06, 0x12, 0x26, 0xfe, 0xe5, 0x37, 0x30, 0xe0, 0x07, 
22863 +0x90, 0xff, 0xfc, 0x74, 0x94, 0xf0, 0x22, 0x90, 0xff, 0xfc, 0x74, 0x90, 0xf0, 0x22, 0xf0, 0x7b, 
22864 +0x00, 0x7a, 0x00, 0x79, 0x37, 0x90, 0xfa, 0xcb, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x14, 0x45, 0x85, 
22865 +0xf0, 0x41, 0xf5, 0x40, 0x7d, 0x01, 0x02, 0x23, 0xee, 0x15, 0x6b, 0xa8, 0x6b, 0xa6, 0x07, 0x30, 
22866 +0x08, 0x05, 0x12, 0x10, 0xec, 0x80, 0xf8, 0xd2, 0x08, 0xa8, 0x6b, 0xe6, 0xff, 0xb4, 0x03, 0x0f, 
22867 +0x78, 0x82, 0x76, 0xff, 0x08, 0x76, 0xe0, 0x08, 0x76, 0xff, 0x08, 0x76, 0xa0, 0x80, 0x0d, 0x78, 
22868 +0x82, 0x76, 0xff, 0x08, 0x76, 0xe2, 0x08, 0x76, 0xff, 0x08, 0x76, 0xb0, 0x78, 0x86, 0x76, 0xfa, 
22869 +0x08, 0x76, 0x9a, 0xef, 0x24, 0xfd, 0x75, 0xf0, 0x0a, 0xa4, 0xae, 0xf0, 0x12, 0x20, 0xb7, 0x7b, 
22870 +0x01, 0x7a, 0xff, 0x79, 0x48, 0x78, 0x6e, 0x12, 0x14, 0xf4, 0xa8, 0x6b, 0xe6, 0x24, 0xfd, 0x75, 
22871 +0xf0, 0x08, 0xa4, 0xff, 0xae, 0xf0, 0x78, 0x70, 0x12, 0x20, 0xb7, 0x79, 0x08, 0x78, 0x71, 0x12, 
22872 +0x14, 0xf4, 0x78, 0x73, 0xef, 0x12, 0x20, 0xb7, 0x05, 0x6b, 0x22, 0x90, 0xff, 0xf0, 0xe0, 0x54, 
22873 +0xab, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x90, 0xfa, 0xe2, 0x74, 0x02, 0xf0, 0x7b, 0x01, 0x7a, 0xfa, 
22874 +0x79, 0xcb, 0xe4, 0xf5, 0x40, 0xf5, 0x41, 0x7d, 0x01, 0x12, 0x23, 0xee, 0x7e, 0x00, 0x90, 0xfa, 
22875 +0xe0, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x64, 0x01, 0x70, 0x10, 0x90, 0xfa, 0xcb, 0xe0, 0xb4, 0x52, 
22876 +0x09, 0x90, 0xf9, 0x65, 0xe0, 0x54, 0xef, 0xf0, 0x80, 0x29, 0x90, 0xfa, 0xe0, 0xe0, 0x70, 0x04, 
22877 +0xa3, 0xe0, 0x64, 0x01, 0x70, 0x10, 0x90, 0xfa, 0xcb, 0xe0, 0xb4, 0x10, 0x09, 0x90, 0xf9, 0x65, 
22878 +0xe0, 0x44, 0x10, 0xf0, 0x80, 0x0d, 0x90, 0xfa, 0xe2, 0x74, 0x03, 0xf0, 0x90, 0xf9, 0x65, 0xe0, 
22879 +0x54, 0xef, 0xf0, 0x90, 0xff, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x22, 0x90, 0xff, 0x93, 0x74, 0x2a, 
22880 +0xf0, 0x90, 0xff, 0xff, 0xe0, 0x60, 0x06, 0x90, 0xff, 0xfc, 0x74, 0x10, 0xf0, 0x90, 0xff, 0x91, 
22881 +0xe0, 0x44, 0x90, 0xf0, 0x12, 0x27, 0x8b, 0x12, 0x15, 0x35, 0x12, 0x2d, 0xa5, 0x7e, 0x07, 0x7f, 
22882 +0xd0, 0x12, 0x11, 0x68, 0x7e, 0x0f, 0x7f, 0xa0, 0x12, 0x11, 0x82, 0xe4, 0x78, 0x7d, 0xf6, 0x78, 
22883 +0x7d, 0xe6, 0xff, 0xc3, 0x94, 0x06, 0x50, 0x0b, 0x74, 0x74, 0x2f, 0xf8, 0xe4, 0xf6, 0x78, 0x7d, 
22884 +0x06, 0x80, 0xec, 0x7f, 0x03, 0x12, 0x2c, 0x5b, 0x90, 0xf9, 0x65, 0xe0, 0x20, 0xe4, 0x05, 0x7f, 
22885 +0x04, 0x12, 0x2c, 0x5b, 0x90, 0xff, 0x9b, 0xe4, 0xf0, 0x90, 0xff, 0x9a, 0xf0, 0x90, 0xff, 0xe8, 
22886 +0xe0, 0x54, 0x1f, 0xf0, 0xd2, 0xa8, 0x22, 0x12, 0x0f, 0x89, 0x78, 0x90, 0xef, 0xf6, 0x12, 0x27, 
22887 +0x19, 0x12, 0x20, 0x59, 0x30, 0xe0, 0x25, 0x12, 0x20, 0x2d, 0xe0, 0x54, 0x7f, 0xf0, 0x78, 0x71, 
22888 +0x12, 0x14, 0xeb, 0x90, 0x00, 0x02, 0x12, 0x13, 0xce, 0x30, 0xe7, 0x09, 0x90, 0x00, 0x02, 0xe4, 
22889 +0x12, 0x14, 0x0d, 0x80, 0xe9, 0x12, 0x20, 0x2d, 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x20, 0x59, 0x30, 
22890 +0xe1, 0x1e, 0x12, 0x20, 0x1b, 0xe0, 0x54, 0x7f, 0xf0, 0x12, 0x2f, 0x15, 0x78, 0x6e, 0x12, 0x14, 
22891 +0xeb, 0x90, 0x00, 0x02, 0x74, 0x80, 0x12, 0x14, 0x0d, 0x12, 0x20, 0x1b, 0xe0, 0x44, 0x80, 0xf0, 
22892 +0x12, 0x2f, 0x80, 0xe4, 0xff, 0x12, 0x2e, 0xa5, 0x02, 0x10, 0x0c, 0x03, 0x6e, 0x01, 0xff, 0x48, 
22893 +0x03, 0x71, 0x01, 0xff, 0x08, 0x02, 0x6c, 0x00, 0x00, 0x44, 0xfa, 0x94, 0x00, 0x00, 0x00, 0x00, 
22894 +0x44, 0xfa, 0x90, 0x00, 0x00, 0x00, 0x00, 0x42, 0xfa, 0xae, 0x00, 0x00, 0x42, 0xfa, 0x7a, 0x00, 
22895 +0x00, 0x42, 0xfa, 0x78, 0x00, 0x00, 0x42, 0xf9, 0x69, 0xff, 0xff, 0x42, 0xfa, 0x76, 0x00, 0x00, 
22896 +0x43, 0xf9, 0x16, 0x0a, 0x32, 0x02, 0x41, 0xf9, 0x63, 0x20, 0x41, 0xf9, 0x64, 0x20, 0x41, 0xf9, 
22897 +0x61, 0x00, 0x41, 0xf9, 0x62, 0x00, 0x44, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xf9, 0x65, 
22898 +0x00, 0x41, 0xf9, 0x15, 0x00, 0x01, 0x20, 0x00, 0x41, 0xf8, 0x04, 0x00, 0x00, 0x12, 0x19, 0x82, 
22899 +0xe5, 0x31, 0x64, 0x09, 0x70, 0x04, 0xe5, 0x30, 0x64, 0x01, 0x60, 0x48, 0xc3, 0xe5, 0x31, 0x94, 
22900 +0x08, 0xe5, 0x30, 0x94, 0x00, 0x40, 0x11, 0x7f, 0x08, 0xef, 0xe5, 0x31, 0x94, 0x08, 0xf5, 0x31, 
22901 +0xe5, 0x30, 0x94, 0x00, 0xf5, 0x30, 0x80, 0x05, 0xaf, 0x31, 0x12, 0x19, 0x92, 0xe4, 0xfe, 0xee, 
22902 +0xc3, 0x9f, 0x50, 0x19, 0x12, 0x18, 0x2a, 0x12, 0x13, 0xb5, 0xfd, 0x74, 0xf8, 0x2e, 0xf5, 0x82, 
22903 +0xe4, 0x34, 0xfe, 0xf5, 0x83, 0xed, 0xf0, 0x0e, 0x12, 0x18, 0x19, 0x80, 0xe2, 0xef, 0x54, 0x7f, 
22904 +0x90, 0xff, 0x81, 0xf0, 0x22, 0x8b, 0x5f, 0x8a, 0x60, 0x89, 0x61, 0x12, 0x2a, 0x6e, 0x70, 0x05, 
22905 +0xa3, 0x74, 0x08, 0xf0, 0x22, 0xab, 0x5f, 0xaa, 0x60, 0xa9, 0x61, 0x12, 0x2a, 0x62, 0x90, 0xfa, 
22906 +0xc5, 0x12, 0x15, 0x06, 0xe5, 0x61, 0x24, 0x03, 0xf9, 0xe4, 0x35, 0x60, 0xfa, 0x90, 0xfa, 0xbf, 
22907 +0x12, 0x15, 0x06, 0xe4, 0x90, 0xfa, 0xbe, 0xf0, 0x78, 0x91, 0xf6, 0x90, 0xfa, 0xbd, 0xe0, 0xff, 
22908 +0x78, 0x91, 0xe6, 0xc3, 0x9f, 0x50, 0x12, 0x12, 0x2a, 0x40, 0xff, 0x12, 0x2a, 0x49, 0x12, 0x2a, 
22909 +0x5c, 0x78, 0x91, 0x06, 0x12, 0x2a, 0x58, 0x80, 0xe2, 0x22, 0xad, 0x07, 0xac, 0x06, 0x90, 0x2f, 
22910 +0x06, 0xe4, 0x93, 0xff, 0x78, 0x7a, 0xf6, 0x54, 0x0f, 0x12, 0x19, 0x07, 0xe0, 0x08, 0x76, 0x00, 
22911 +0x08, 0xf6, 0x18, 0x12, 0x18, 0x42, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff, 0x78, 0x7b, 
22912 +0xee, 0xf6, 0x08, 0xef, 0xf6, 0xee, 0x44, 0xf8, 0x18, 0xf6, 0xef, 0x08, 0xf6, 0x90, 0xff, 0x7a, 
22913 +0xe0, 0x20, 0xe7, 0x03, 0x7f, 0x00, 0x22, 0x78, 0x7b, 0xe6, 0xfe, 0x08, 0xe6, 0xf5, 0x82, 0x8e, 
22914 +0x83, 0xec, 0xf0, 0xa3, 0xed, 0xf0, 0x90, 0xff, 0x7a, 0x74, 0x02, 0xf0, 0x7f, 0x01, 0x22, 0xab, 
22915 +0x5c, 0xaa, 0x5d, 0xa9, 0x5e, 0x90, 0x00, 0x03, 0x12, 0x13, 0xce, 0x54, 0xf0, 0x24, 0xa0, 0x22, 
22916 +0x90, 0xfa, 0xc5, 0x12, 0x14, 0xfd, 0x02, 0x13, 0xb5, 0x90, 0xfa, 0xbf, 0x12, 0x14, 0xfd, 0xef, 
22917 +0x12, 0x13, 0xfb, 0x90, 0xfa, 0xc6, 0xe4, 0x22, 0x90, 0xfa, 0xc0, 0xe4, 0x75, 0xf0, 0x01, 0x02, 
22918 +0x14, 0x2f, 0x90, 0x00, 0x08, 0x12, 0x14, 0x5b, 0xaa, 0xf0, 0xf9, 0x7b, 0x01, 0x22, 0x90, 0x00, 
22919 +0x05, 0x12, 0x13, 0xce, 0x90, 0xfa, 0xbd, 0xf0, 0x22, 0xab, 0x5c, 0xaa, 0x5d, 0xa9, 0x5e, 0x22, 
22920 +0x90, 0xfa, 0xd9, 0xe0, 0xff, 0x7e, 0x00, 0xc3, 0x90, 0xfa, 0xd3, 0xe0, 0x9f, 0xf0, 0x90, 0xfa, 
22921 +0xd2, 0xe0, 0x9e, 0xf0, 0x90, 0xfa, 0xd4, 0xee, 0x8f, 0xf0, 0x12, 0x14, 0x2f, 0xef, 0x25, 0x57, 
22922 +0xf5, 0x57, 0xee, 0x35, 0x56, 0xf5, 0x56, 0x22, 0x90, 0xff, 0xf0, 0xe0, 0x54, 0xfe, 0xf0, 0xe0, 
22923 +0x54, 0xfd, 0xf0, 0x90, 0xfa, 0xe2, 0xe0, 0x64, 0x03, 0x22, 0x90, 0xff, 0xf2, 0xe0, 0xab, 0x3c, 
22924 +0xaa, 0x3d, 0xa9, 0x3e, 0x02, 0x13, 0xfb, 0x90, 0xff, 0xf3, 0x74, 0xa0, 0xf0, 0x22, 0x8f, 0x6a, 
22925 +0xed, 0x70, 0x0f, 0xe5, 0x6a, 0xb4, 0x03, 0x05, 0x7f, 0x01, 0x02, 0x2e, 0xeb, 0x7f, 0x02, 0x02, 
22926 +0x2e, 0xeb, 0xaf, 0x6a, 0x12, 0x27, 0x19, 0x74, 0x74, 0x25, 0x6a, 0xf8, 0xe6, 0x30, 0xe2, 0x0b, 
22927 +0xd2, 0x09, 0x12, 0x18, 0x9b, 0xe0, 0x54, 0x7f, 0xf0, 0x80, 0x02, 0xc2, 0x09, 0xe5, 0x6a, 0xb4, 
22928 +0x03, 0x07, 0x7f, 0x81, 0x12, 0x2e, 0xeb, 0x80, 0x05, 0x7f, 0x82, 0x12, 0x2e, 0xeb, 0x30, 0x09, 
22929 +0x07, 0x12, 0x18, 0x9b, 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x2f, 0x80, 0x22, 0x12, 0x0f, 0x89, 0x90, 
22930 +0xff, 0xfd, 0xe0, 0x44, 0x60, 0xf0, 0xd2, 0x01, 0x90, 0xff, 0xfc, 0xe0, 0x44, 0x02, 0xf0, 0x90, 
22931 +0xff, 0x00, 0xe0, 0x30, 0xe7, 0x13, 0x90, 0xff, 0x83, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x2c, 0x80, 
22932 +0x90, 0xff, 0xfc, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x0d, 0x12, 0x19, 0x3e, 0x53, 0x2c, 0x7f, 0x90, 
22933 +0xff, 0xfc, 0xe0, 0x54, 0xfe, 0xf0, 0x90, 0xff, 0x81, 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x02, 0x9f, 
22934 +0x12, 0x19, 0x46, 0x02, 0x10, 0x0c, 0x12, 0x0f, 0x89, 0x78, 0x8a, 0x12, 0x20, 0x9e, 0x30, 0xe1, 
22935 +0x07, 0x7f, 0x13, 0x12, 0x2e, 0xa5, 0x80, 0x34, 0x90, 0xf9, 0x65, 0xe0, 0x54, 0x03, 0x60, 0x16, 
22936 +0x78, 0x8a, 0xe6, 0xb4, 0x03, 0x09, 0x90, 0xff, 0xa4, 0xe0, 0x54, 0xdf, 0xf0, 0x80, 0x07, 0x90, 
22937 +0xff, 0xb4, 0xe0, 0x54, 0xdf, 0xf0, 0xc2, 0xb3, 0x90, 0xf9, 0x15, 0xe0, 0x04, 0xf0, 0x78, 0x8a, 
22938 +0xe6, 0xff, 0x12, 0x20, 0x59, 0xfd, 0x12, 0x2d, 0x21, 0x12, 0x2e, 0xa5, 0x02, 0x10, 0x0c, 0x12, 
22939 +0x0f, 0x89, 0x78, 0x8f, 0xef, 0xf6, 0xd2, 0x00, 0x12, 0x27, 0x19, 0x90, 0xf9, 0x66, 0x12, 0x14, 
22940 +0xfd, 0xe9, 0x24, 0x03, 0xf9, 0xe4, 0x3a, 0xfa, 0xc0, 0x02, 0x78, 0x86, 0xe6, 0xfe, 0x08, 0xe6, 
22941 +0xaa, 0x06, 0xf8, 0xac, 0x02, 0x7d, 0x01, 0xd0, 0x02, 0x12, 0x20, 0x4b, 0x12, 0x2f, 0x80, 0x78, 
22942 +0x8f, 0xe6, 0xff, 0x12, 0x19, 0xbb, 0x12, 0x2e, 0xa5, 0x02, 0x10, 0x0c, 0x12, 0x0f, 0x89, 0x78, 
22943 +0x8b, 0xef, 0xf6, 0x12, 0x2e, 0x4c, 0x12, 0x2e, 0xa5, 0x90, 0xf9, 0x65, 0xe0, 0x54, 0x03, 0x60, 
22944 +0x16, 0x78, 0x8b, 0xe6, 0xb4, 0x03, 0x09, 0x90, 0xff, 0xa4, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x07, 
22945 +0x90, 0xff, 0xb4, 0xe0, 0x44, 0x20, 0xf0, 0x90, 0xf9, 0x15, 0xe0, 0x14, 0xf0, 0xe0, 0x70, 0x02, 
22946 +0xd2, 0xb3, 0x02, 0x10, 0x0c, 0x8f, 0x69, 0x12, 0x27, 0x19, 0x12, 0x20, 0x2d, 0xe0, 0x54, 0x3f, 
22947 +0xf0, 0xe5, 0x82, 0x24, 0x04, 0x12, 0x20, 0x25, 0xe0, 0x54, 0x3f, 0xf0, 0x08, 0xe6, 0xfe, 0x08, 
22948 +0xe6, 0x8e, 0x83, 0x24, 0x0b, 0x12, 0x20, 0x25, 0xe0, 0x54, 0xf8, 0xf0, 0x12, 0x2f, 0x80, 0x74, 
22949 +0x74, 0x25, 0x69, 0xf8, 0x74, 0xfb, 0x56, 0xf6, 0x7f, 0x00, 0x22, 0x8f, 0x37, 0xc2, 0x08, 0x12, 
22950 +0x27, 0x19, 0x12, 0x20, 0x38, 0x78, 0x84, 0x12, 0x20, 0x1d, 0xe0, 0x44, 0x01, 0xf0, 0x12, 0x20, 
22951 +0x70, 0x12, 0x20, 0x21, 0xe0, 0x20, 0xe0, 0xf6, 0xef, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 
22952 +0x83, 0xe0, 0x54, 0xf8, 0xf0, 0x12, 0x2f, 0x80, 0xaf, 0x37, 0x12, 0x19, 0xbb, 0x22, 0x12, 0x0f, 
22953 +0x89, 0x12, 0x27, 0x19, 0x12, 0x20, 0x70, 0x24, 0x06, 0x12, 0x20, 0x23, 0xe0, 0xfd, 0x12, 0x20, 
22954 +0x53, 0x90, 0x00, 0x03, 0x12, 0x20, 0x78, 0x24, 0x05, 0x12, 0x20, 0x25, 0xe0, 0x90, 0x00, 0x04, 
22955 +0x12, 0x14, 0x0d, 0x12, 0x2f, 0x80, 0x7d, 0x02, 0xe4, 0xff, 0x12, 0x2c, 0xc0, 0x02, 0x10, 0x0c, 
22956 +0xae, 0x05, 0x12, 0x18, 0xed, 0xef, 0x12, 0x14, 0x0d, 0x0e, 0x0e, 0x0e, 0xee, 0xd3, 0x95, 0x35, 
22957 +0xe4, 0x95, 0x34, 0x40, 0x02, 0xae, 0x35, 0xee, 0xd3, 0x94, 0x08, 0x74, 0x80, 0x94, 0x81, 0x40, 
22958 +0x0a, 0x7e, 0x03, 0x90, 0x00, 0x02, 0x74, 0x02, 0x12, 0x14, 0x0d, 0xaf, 0x06, 0x12, 0x2f, 0x6a, 
22959 +0x22, 0x12, 0x0f, 0x89, 0x78, 0x8c, 0x12, 0x20, 0x9e, 0x30, 0xe2, 0x07, 0x7f, 0x13, 0x12, 0x2e, 
22960 +0xa5, 0x80, 0x1b, 0x78, 0x8c, 0xe6, 0x24, 0x74, 0xf8, 0xe6, 0x20, 0xe1, 0x07, 0x7f, 0x12, 0x12, 
22961 +0x2e, 0xa5, 0x80, 0x0a, 0x78, 0x8c, 0xe6, 0xff, 0x12, 0x21, 0x6e, 0x12, 0x2e, 0xa5, 0x02, 0x10, 
22962 +0x0c, 0xae, 0x07, 0xed, 0x54, 0x03, 0x64, 0x01, 0x60, 0x03, 0x7f, 0x10, 0x22, 0xed, 0x54, 0x7c, 
22963 +0xc3, 0x94, 0x04, 0x50, 0x03, 0x7f, 0x0b, 0x22, 0x74, 0x74, 0x2e, 0xf8, 0x74, 0x02, 0x46, 0xf6, 
22964 +0x74, 0x95, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0xfa, 0xf5, 0x83, 0xed, 0xf0, 0x7f, 0x00, 0x22, 0xbf, 
22965 +0x03, 0x06, 0x7c, 0xff, 0x7d, 0xe0, 0x80, 0x04, 0x7c, 0xff, 0x7d, 0xe2, 0x8d, 0x82, 0x8c, 0x83, 
22966 +0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x82, 0x24, 0x04, 0x12, 0x20, 0x25, 0xe0, 0x44, 0x80, 0xf0, 0x74, 
22967 +0x74, 0x2f, 0xf8, 0x74, 0x04, 0x46, 0xf6, 0x7f, 0x00, 0x22, 0x12, 0x0f, 0x89, 0xe5, 0x31, 0x64, 
22968 +0x09, 0x70, 0x04, 0xe5, 0x30, 0x64, 0x01, 0x60, 0x16, 0x90, 0xff, 0x83, 0xe0, 0x54, 0x0f, 0xff, 
22969 +0xc3, 0xe5, 0x31, 0x9f, 0xe5, 0x30, 0x94, 0x00, 0x40, 0x05, 0x12, 0x25, 0x9c, 0x80, 0x03, 0x12, 
22970 +0x2f, 0x76, 0x02, 0x10, 0x0c, 0x90, 0xff, 0xfc, 0xe0, 0x20, 0xe7, 0x1f, 0xc2, 0xaf, 0x7d, 0xff, 
22971 +0xac, 0x05, 0x1d, 0xec, 0x60, 0x15, 0x7e, 0x04, 0x7f, 0x00, 0xef, 0x1f, 0xaa, 0x06, 0x70, 0x01, 
22972 +0x1e, 0x4a, 0x60, 0xec, 0x90, 0xff, 0x92, 0xe4, 0xf0, 0x80, 0xef, 0x22, 0x12, 0x0f, 0x89, 0x78, 
22973 +0x6c, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x30, 0xe0, 0x12, 0x30, 0xe1, 0x0f, 0x90, 0xff, 0xfc, 0xe0, 
22974 +0x44, 0x20, 0xf0, 0x7f, 0x04, 0x12, 0x11, 0x9f, 0x12, 0x19, 0x55, 0x02, 0x10, 0x0c, 0x8e, 0x65, 
22975 +0x8f, 0x66, 0xe5, 0x66, 0x15, 0x66, 0xae, 0x65, 0x70, 0x02, 0x15, 0x65, 0xd3, 0x94, 0x00, 0xee, 
22976 +0x94, 0x00, 0x40, 0x09, 0x7e, 0x07, 0x7f, 0xd0, 0x12, 0x0f, 0x62, 0x80, 0xe5, 0x22, 0x11, 0x1a, 
22977 +0x2b, 0x1c, 0x23, 0x56, 0x2f, 0x5c, 0x2d, 0xcc, 0x2d, 0x7a, 0x2e, 0x6b, 0x2c, 0x8e, 0x2b, 0x66, 
22978 +0x2b, 0xec, 0x2c, 0xf1, 0x2e, 0x2d, 0x1b, 0xe6, 0x2b, 0xaf, 0x28, 0x67, 0x0e, 0x12, 0x0f, 0x89, 
22979 +0x78, 0x8d, 0x12, 0x20, 0x9e, 0x20, 0xe2, 0x07, 0x7f, 0x11, 0x12, 0x2e, 0xa5, 0x80, 0x0a, 0x78, 
22980 +0x8d, 0xe6, 0xff, 0x12, 0x2c, 0x25, 0x12, 0x2e, 0xa5, 0x02, 0x10, 0x0c, 0x8f, 0x67, 0x12, 0x2c, 
22981 +0x25, 0xaf, 0x67, 0x12, 0x27, 0x19, 0x12, 0x20, 0x38, 0x12, 0x2f, 0x80, 0x74, 0x74, 0x25, 0x67, 
22982 +0xf8, 0x74, 0xfd, 0x56, 0xf6, 0xaf, 0x67, 0x12, 0x19, 0xbb, 0x22, 0x12, 0x0f, 0x89, 0xe5, 0x31, 
22983 +0x64, 0x09, 0x70, 0x04, 0xe5, 0x30, 0x64, 0x01, 0x60, 0x05, 0x12, 0x29, 0x2d, 0x80, 0x06, 0x12, 
22984 +0x19, 0x7a, 0x12, 0x19, 0x82, 0x02, 0x10, 0x0c, 0x12, 0x27, 0xfb, 0x12, 0x12, 0x3b, 0x90, 0xf8, 
22985 +0x04, 0xe0, 0xff, 0x60, 0x05, 0x7d, 0x01, 0x12, 0x11, 0xd8, 0x12, 0x26, 0xa3, 0x12, 0x12, 0x77, 
22986 +0x12, 0x10, 0xfa, 0x80, 0xe3, 0x12, 0x18, 0xed, 0xef, 0x12, 0x14, 0x0d, 0xe4, 0xf5, 0x2a, 0xf5, 
22987 +0x2b, 0xef, 0x60, 0x03, 0x02, 0x2f, 0x76, 0xe4, 0xff, 0x12, 0x2f, 0x6a, 0x22, 0x90, 0xff, 0xf0, 
22988 +0xe0, 0xff, 0x54, 0xa0, 0x60, 0xf7, 0xef, 0x30, 0xe5, 0x08, 0x90, 0xff, 0xf0, 0x44, 0x20, 0xf0, 
22989 +0xc3, 0x22, 0xd3, 0x22, 0x90, 0xff, 0xf0, 0xe0, 0xff, 0x54, 0x28, 0x60, 0xf7, 0xef, 0x30, 0xe5, 
22990 +0x08, 0x90, 0xff, 0xf0, 0x44, 0x20, 0xf0, 0xc3, 0x22, 0xd3, 0x22, 0xef, 0x30, 0xe7, 0x08, 0x12, 
22991 +0x18, 0xad, 0xe0, 0x54, 0xdf, 0xf0, 0x22, 0xef, 0x12, 0x18, 0xf7, 0xe0, 0x54, 0xdf, 0xf0, 0x22, 
22992 +0x81, 0x01, 0x82, 0x02, 0x83, 0x03, 0x87, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 
22993 +0x00, 0x40, 0x00, 0x08, 0x00, 0x78, 0x84, 0x12, 0x20, 0x2f, 0xa3, 0xa3, 0xe0, 0xff, 0x30, 0xe7, 
22994 +0x06, 0x54, 0x7f, 0xf0, 0x44, 0x80, 0xf0, 0x22, 0x85, 0x34, 0x30, 0x85, 0x35, 0x31, 0x90, 0xff, 
22995 +0x82, 0xe0, 0x54, 0xf7, 0xf0, 0xa3, 0xe0, 0x54, 0x7f, 0xf0, 0x22, 0xe4, 0xfe, 0xee, 0x90, 0x2f, 
22996 +0x00, 0x93, 0xb5, 0x07, 0x02, 0xd3, 0x22, 0x0e, 0xbe, 0x07, 0xf2, 0xc3, 0x22, 0x00, 0x08, 0x18, 
22997 +0x38, 0x28, 0x01, 0x81, 0x10, 0x0a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x0f, 0x89, 0x7f, 
22998 +0x02, 0x12, 0x10, 0x18, 0x12, 0x19, 0x55, 0x02, 0x10, 0x0c, 0x75, 0x30, 0x00, 0x8f, 0x31, 0x12, 
22999 +0x18, 0x49, 0x12, 0x29, 0x2d, 0x22, 0x12, 0x19, 0x82, 0x12, 0x19, 0x3e, 0x12, 0x19, 0x7a, 0x22, 
23000 +0xc2, 0x08, 0x22, 
23001 +};
23002 +
23003 +#undef IMAGE_VERSION_NAME
23004 +
23005 +#undef IMAGE_ARRAY_NAME
23006 +
23007 diff -Nur linux-2.4.19.org/drivers/usb/serial/io_ionsp.h linux-2.4.19/drivers/usb/serial/io_ionsp.h
23008 --- linux-2.4.19.org/drivers/usb/serial/io_ionsp.h      Tue Mar 20 02:21:54 2001
23009 +++ linux-2.4.19/drivers/usb/serial/io_ionsp.h  Thu Oct 31 08:11:24 2002
23010 @@ -88,12 +88,12 @@
23011  // Interrupt pipe
23012  //
23013  
23014 -typedef struct _INT_STATUS_PKT {
23015 +struct int_status_pkt {
23016         __u16      RxBytesAvail;                    // Additional bytes available to
23017                                                     // be read from Bulk IN pipe
23018         __u16      TxCredits[ MAX_RS232_PORTS ];   // Additional space available in
23019                                                     // given port's TxBuffer
23020 -} INT_STATUS_PKT, *PINT_STATUS_PKT;
23021 +};
23022  
23023  
23024  #define GET_INT_STATUS_SIZE(NumPorts) (sizeof(__u16) + (sizeof(__u16) * (NumPorts)))
23025 diff -Nur linux-2.4.19.org/drivers/usb/serial/io_tables.h linux-2.4.19/drivers/usb/serial/io_tables.h
23026 --- linux-2.4.19.org/drivers/usb/serial/io_tables.h     Sat Aug  3 02:39:45 2002
23027 +++ linux-2.4.19/drivers/usb/serial/io_tables.h Thu Oct 31 08:11:24 2002
23028 @@ -14,12 +14,12 @@
23029  #ifndef IO_TABLES_H
23030  #define IO_TABLES_H
23031  
23032 -static __devinitdata struct usb_device_id edgeport_1port_id_table [] = {
23033 +static struct usb_device_id edgeport_1port_id_table [] = {
23034         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT) },
23035         { }
23036  };
23037  
23038 -static __devinitdata struct usb_device_id edgeport_2port_id_table [] = {
23039 +static struct usb_device_id edgeport_2port_id_table [] = {
23040         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2) },
23041         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2I) },
23042         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_421) },
23043 @@ -33,7 +33,7 @@
23044         { }
23045  };
23046  
23047 -static __devinitdata struct usb_device_id edgeport_4port_id_table [] = {
23048 +static struct usb_device_id edgeport_4port_id_table [] = {
23049         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4) },
23050         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_RAPIDPORT_4) },
23051         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4T) },
23052 @@ -50,7 +50,7 @@
23053         { }
23054  };
23055  
23056 -static __devinitdata struct usb_device_id edgeport_8port_id_table [] = {
23057 +static struct usb_device_id edgeport_8port_id_table [] = {
23058         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8) },
23059         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) },
23060         { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8I) },
23061 @@ -98,11 +98,9 @@
23062  MODULE_DEVICE_TABLE (usb, id_table_combined);
23063  
23064  static struct usb_serial_device_type edgeport_1port_device = {
23065 +       owner:                  THIS_MODULE,
23066         name:                   "Edgeport 1 port adapter",
23067         id_table:               edgeport_1port_id_table,
23068 -       needs_interrupt_in:     MUST_HAVE,
23069 -       needs_bulk_in:          MUST_HAVE,
23070 -       needs_bulk_out:         MUST_HAVE,
23071         num_interrupt_in:       1,
23072         num_bulk_in:            1,
23073         num_bulk_out:           1,
23074 @@ -122,11 +120,9 @@
23075  };
23076  
23077  static struct usb_serial_device_type edgeport_2port_device = {
23078 +       owner:                  THIS_MODULE,
23079         name:                   "Edgeport 2 port adapter",
23080         id_table:               edgeport_2port_id_table,
23081 -       needs_interrupt_in:     MUST_HAVE,
23082 -       needs_bulk_in:          MUST_HAVE,
23083 -       needs_bulk_out:         MUST_HAVE,
23084         num_interrupt_in:       1,
23085         num_bulk_in:            1,
23086         num_bulk_out:           1,
23087 @@ -146,11 +142,9 @@
23088  };
23089  
23090  static struct usb_serial_device_type edgeport_4port_device = {
23091 +       owner:                  THIS_MODULE,
23092         name:                   "Edgeport 4 port adapter",
23093         id_table:               edgeport_4port_id_table,
23094 -       needs_interrupt_in:     MUST_HAVE,
23095 -       needs_bulk_in:          MUST_HAVE,
23096 -       needs_bulk_out:         MUST_HAVE,
23097         num_interrupt_in:       1,
23098         num_bulk_in:            1,
23099         num_bulk_out:           1,
23100 @@ -170,11 +164,9 @@
23101  };
23102  
23103  static struct usb_serial_device_type edgeport_8port_device = {
23104 +       owner:                  THIS_MODULE,
23105         name:                   "Edgeport 8 port adapter",
23106         id_table:               edgeport_8port_id_table,
23107 -       needs_interrupt_in:     MUST_HAVE,
23108 -       needs_bulk_in:          MUST_HAVE,
23109 -       needs_bulk_out:         MUST_HAVE,
23110         num_interrupt_in:       1,
23111         num_bulk_in:            1,
23112         num_bulk_out:           1,
23113 diff -Nur linux-2.4.19.org/drivers/usb/serial/io_ti.c linux-2.4.19/drivers/usb/serial/io_ti.c
23114 --- linux-2.4.19.org/drivers/usb/serial/io_ti.c Thu Jan  1 01:00:00 1970
23115 +++ linux-2.4.19/drivers/usb/serial/io_ti.c     Thu Oct 31 08:11:24 2002
23116 @@ -0,0 +1,2684 @@
23117 +/*
23118 + * Edgeport USB Serial Converter driver
23119 + *
23120 + * Copyright(c) 2000-2002 Inside Out Networks, All rights reserved.
23121 + * Copyright(c) 2001-2002 Greg Kroah-Hartman <greg@kroah.com>
23122 + *
23123 + *     This program is free software; you can redistribute it and/or modify
23124 + *     it under the terms of the GNU General Public License as published by
23125 + *     the Free Software Foundation; either version 2 of the License, or
23126 + *     (at your option) any later version.
23127 + *
23128 + * Supports the following devices:
23129 + *     EP/1 EP/2 EP/4
23130 + *
23131 + * Version history:
23132 + *
23133 + *     July 11, 2002   Removed 4 port device structure since all TI UMP 
23134 + *                     chips have only 2 ports 
23135 + *                     David Iacovelli (davidi@ionetworks.com)
23136 + *
23137 + */
23138 +
23139 +#include <linux/config.h>
23140 +#include <linux/kernel.h>
23141 +#include <linux/errno.h>
23142 +#include <linux/init.h>
23143 +#include <linux/slab.h>
23144 +#include <linux/tty.h>
23145 +#include <linux/tty_driver.h>
23146 +#include <linux/tty_flip.h>
23147 +#include <linux/module.h>
23148 +#include <linux/spinlock.h>
23149 +#include <linux/serial.h>
23150 +#include <linux/ioctl.h>
23151 +#include <asm/uaccess.h>
23152 +#include <linux/usb.h>
23153 +
23154 +#ifdef CONFIG_USB_SERIAL_DEBUG
23155 +       static int debug = 1;
23156 +#else
23157 +       static int debug;
23158 +#endif
23159 +
23160 +#include "usb-serial.h"
23161 +
23162 +#include "io_16654.h"
23163 +#include "io_usbvend.h"
23164 +#include "io_ti.h"
23165 +
23166 +/*
23167 + * Version Information
23168 + */
23169 +#define DRIVER_VERSION "v0.2"
23170 +#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com> and David Iacovelli"
23171 +#define DRIVER_DESC "Edgeport USB Serial Driver"
23172 +
23173 +
23174 +/* firmware image code */
23175 +#define IMAGE_VERSION_NAME     PagableOperationalCodeImageVersion
23176 +#define IMAGE_ARRAY_NAME       PagableOperationalCodeImage
23177 +#define IMAGE_SIZE             PagableOperationalCodeSize
23178 +#include "io_fw_down3.h"       /* Define array OperationalCodeImage[] */
23179 +
23180 +#define EPROM_PAGE_SIZE                64
23181 +
23182 +
23183 +struct edgeport_uart_buf_desc {
23184 +       __u32 count;            // Number of bytes currently in buffer
23185 +};
23186 +
23187 +/* different hardware types */
23188 +#define HARDWARE_TYPE_930      0
23189 +#define HARDWARE_TYPE_TIUMP    1
23190 +
23191 +// IOCTL_PRIVATE_TI_GET_MODE Definitions
23192 +#define        TI_MODE_CONFIGURING     0   // Device has not entered start device 
23193 +#define        TI_MODE_BOOT            1   // Staying in boot mode
23194 +#define TI_MODE_DOWNLOAD       2   // Made it to download mode
23195 +#define TI_MODE_TRANSITIONING  3   // Currently in boot mode but transitioning to download mode
23196 +
23197 +
23198 +/* Product information read from the Edgeport */
23199 +struct product_info
23200 +{
23201 +       int     TiMode;                 // Current TI Mode
23202 +       __u8    hardware_type;          // Type of hardware
23203 +} __attribute__((packed));
23204 +
23205 +
23206 +struct edgeport_port {
23207 +       __u16 uart_base;
23208 +       __u16 dma_address;
23209 +       __u8 shadow_msr;
23210 +       __u8 shadow_mcr;
23211 +       __u8 shadow_lsr;
23212 +       __u8 lsr_mask;
23213 +       __u32 ump_read_timeout;         /* Number of miliseconds the UMP will
23214 +                                          wait without data before completing
23215 +                                          a read short */
23216 +       int baud_rate;
23217 +       int close_pending;
23218 +       int lsr_event;
23219 +       struct edgeport_uart_buf_desc tx;
23220 +       struct async_icount     icount;
23221 +       wait_queue_head_t       delta_msr_wait; /* for handling sleeping while
23222 +                                                  waiting for msr change to
23223 +                                                  happen */
23224 +       struct edgeport_serial  *edge_serial;
23225 +       struct usb_serial_port  *port;
23226 +};
23227 +
23228 +struct edgeport_serial {
23229 +       struct product_info product_info;
23230 +       u8 TI_I2C_Type;                 // Type of I2C in UMP
23231 +       u8 TiReadI2C;                   // Set to TRUE if we have read the I2c in Boot Mode
23232 +       int num_ports_open;
23233 +       struct usb_serial *serial;
23234 +};
23235 +
23236 +
23237 +/* Devices that this driver supports */
23238 +static struct usb_device_id edgeport_1port_id_table [] = {
23239 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_1) },
23240 +       { }
23241 +};
23242 +
23243 +static struct usb_device_id edgeport_2port_id_table [] = {
23244 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2) },
23245 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2I) },
23246 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421) },
23247 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421_BOOT) },
23248 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421_DOWN) },
23249 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21) },
23250 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21_BOOT) },
23251 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21_DOWN) },
23252 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_42) },
23253 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4) },
23254 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4I) },
23255 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_22) },
23256 +       { }
23257 +};
23258 +
23259 +/* Devices that this driver supports */
23260 +static __devinitdata struct usb_device_id id_table_combined [] = {
23261 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_1) },
23262 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2) },
23263 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2I) },
23264 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421) },
23265 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421_BOOT) },
23266 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421_DOWN) },
23267 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21) },
23268 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21_BOOT) },
23269 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21_DOWN) },
23270 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_42) },
23271 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4) },
23272 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4I) },
23273 +       { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_22) },
23274 +       { }
23275 +};
23276 +
23277 +MODULE_DEVICE_TABLE (usb, id_table_combined);
23278 +
23279 +
23280 +static struct EDGE_FIRMWARE_VERSION_INFO OperationalCodeImageVersion;
23281 +
23282 +static int TIStayInBootMode = 0;
23283 +static int ignore_cpu_rev = 0;
23284 +
23285 +
23286 +
23287 +static void edge_set_termios (struct usb_serial_port *port, struct termios *old_termios);
23288 +
23289 +static int TIReadVendorRequestSync (struct usb_device *dev,
23290 +                               __u8            request,
23291 +                               __u16           value,
23292 +                               __u16           index,
23293 +                               u8              *data,
23294 +                               int             size)
23295 +{
23296 +       int status;
23297 +
23298 +       status = usb_control_msg (dev,
23299 +                               usb_rcvctrlpipe(dev, 0),
23300 +                               request,
23301 +                               (USB_TYPE_VENDOR | 
23302 +                                USB_RECIP_DEVICE | 
23303 +                                USB_DIR_IN),
23304 +                               value,
23305 +                               index,
23306 +                               data,
23307 +                               size,
23308 +                               HZ);
23309 +       if (status < 0)
23310 +               return status;
23311 +       if (status != size) {
23312 +               dbg ("%s - wanted to write %d, but only wrote %d",
23313 +                    __FUNCTION__, size, status);
23314 +               return -ECOMM;
23315 +       }
23316 +       return 0;
23317 +}
23318 +
23319 +static int TISendVendorRequestSync (struct usb_device *dev,
23320 +                               __u8            request,
23321 +                               __u16           value,
23322 +                               __u16           index,
23323 +                               u8              *data,
23324 +                               int             size)
23325 +{
23326 +       int status;
23327 +
23328 +       status = usb_control_msg (dev,
23329 +                               usb_sndctrlpipe(dev, 0),
23330 +                               request,
23331 +                               (USB_TYPE_VENDOR | 
23332 +                                USB_RECIP_DEVICE | 
23333 +                                USB_DIR_OUT),
23334 +                               value,
23335 +                               index,
23336 +                               data,
23337 +                               size,
23338 +                               HZ);
23339 +
23340 +       if (status < 0)
23341 +               return status;
23342 +       if (status != size) {
23343 +               dbg ("%s - wanted to write %d, but only wrote %d",
23344 +                    __FUNCTION__, size, status);
23345 +               return -ECOMM;
23346 +       }
23347 +       return 0;
23348 +}
23349 +
23350 +static int TIWriteCommandSync (struct usb_device *dev, __u8 command,
23351 +                               __u8 moduleid, __u16 value, u8 *data,
23352 +                               int size)
23353 +{
23354 +       return TISendVendorRequestSync (dev,
23355 +                                         command,                      // Request
23356 +                                         value,                        // wValue 
23357 +                                         moduleid,                     // wIndex
23358 +                                         data,                         // TransferBuffer
23359 +                                         size);                        // TransferBufferLength
23360 +
23361 +}
23362 +
23363 +
23364 +/* clear tx/rx buffers and fifo in TI UMP */
23365 +static int TIPurgeDataSync (struct usb_serial_port *port, __u16 mask)
23366 +{
23367 +       int port_number = port->number - port->serial->minor;
23368 +
23369 +       dbg ("%s - port %d, mask %x", __FUNCTION__, port_number, mask);
23370 +
23371 +       return TIWriteCommandSync (port->serial->dev,
23372 +                                       UMPC_PURGE_PORT,
23373 +                                       (__u8)(UMPM_UART1_PORT + port_number),
23374 +                                       mask,
23375 +                                       NULL,
23376 +                                       0);
23377 +}
23378 +
23379 +/**
23380 + * TIReadDownloadMemory - Read edgeport memory from TI chip
23381 + * @dev: usb device pointer
23382 + * @address: Device CPU address at which to read
23383 + * @length: Length of above data
23384 + * @address_type: Can read both XDATA and I2C
23385 + * @buffer: pointer to input data buffer
23386 + */
23387 +int TIReadDownloadMemory (struct usb_device *dev, int start_address, int length,
23388 +                         __u8 address_type, __u8 *buffer)
23389 +{
23390 +       int status = 0;
23391 +       __u8 read_length;
23392 +       __u16 be_start_address;
23393 +       
23394 +       dbg ("%s - @ %x for %d", __FUNCTION__, start_address, length);
23395 +
23396 +       /* Read in blocks of 64 bytes
23397 +        * (TI firmware can't handle more than 64 byte reads)
23398 +        */
23399 +       while (length) {
23400 +               if (length > 64)
23401 +                       read_length= 64;
23402 +               else
23403 +                       read_length = (__u8)length;
23404 +
23405 +               if (read_length > 1) {
23406 +                       dbg ("%s - @ %x for %d", __FUNCTION__, 
23407 +                            start_address, read_length);
23408 +               }
23409 +               be_start_address = cpu_to_be16 (start_address);
23410 +               status = TIReadVendorRequestSync (dev,
23411 +                                                 UMPC_MEMORY_READ,     // Request
23412 +                                                 (__u16)address_type,  // wValue (Address type)
23413 +                                                 be_start_address,     // wIndex (Address to read)
23414 +                                                 buffer,               // TransferBuffer
23415 +                                                 read_length); // TransferBufferLength
23416 +
23417 +               if (status) {
23418 +                       dbg ("%s - ERROR %x", __FUNCTION__, status);
23419 +                       return status;
23420 +               }
23421 +
23422 +               if (read_length > 1) {
23423 +                       usb_serial_debug_data (__FILE__, __FUNCTION__,
23424 +                                              read_length, buffer);
23425 +               }
23426 +
23427 +               /* Update pointers/length */
23428 +               start_address += read_length;
23429 +               buffer += read_length;
23430 +               length -= read_length;
23431 +       }
23432 +       
23433 +       return status;
23434 +}
23435 +
23436 +int TIReadRam (struct usb_device *dev, int start_address, int length, __u8 *buffer)
23437 +{
23438 +       return TIReadDownloadMemory (dev,
23439 +                                    start_address,
23440 +                                    length,
23441 +                                    DTK_ADDR_SPACE_XDATA,
23442 +                                    buffer);
23443 +}
23444 +
23445 +/* Read edgeport memory to a given block */
23446 +static int TIReadBootMemory (struct edgeport_serial *serial, int start_address, int length, __u8 * buffer)
23447 +{
23448 +       int status = 0;
23449 +       int i;
23450 +
23451 +       for (i=0; i< length; i++) {
23452 +               status = TIReadVendorRequestSync (serial->serial->dev,
23453 +                                       UMPC_MEMORY_READ,               // Request
23454 +                                       serial->TI_I2C_Type,            // wValue (Address type)
23455 +                                       (__u16)(start_address+i),       // wIndex
23456 +                                       &buffer[i],                     // TransferBuffer
23457 +                                       0x01);                          // TransferBufferLength
23458 +               if (status) {
23459 +                       dbg ("%s - ERROR %x", __FUNCTION__, status);
23460 +                       return status;
23461 +               }
23462 +       }
23463 +
23464 +       dbg ("%s - start_address = %x, length = %d", __FUNCTION__, start_address, length);
23465 +       usb_serial_debug_data (__FILE__, __FUNCTION__, length, buffer);
23466 +
23467 +       serial->TiReadI2C = 1;
23468 +
23469 +       return status;
23470 +}
23471 +
23472 +/* Write given block to TI EPROM memory */
23473 +static int TIWriteBootMemory (struct edgeport_serial *serial, int start_address, int length, __u8 *buffer)
23474 +{
23475 +       int status = 0;
23476 +       int i;
23477 +       __u8 temp;
23478 +
23479 +       /* Must do a read before write */
23480 +       if (!serial->TiReadI2C) {
23481 +               status = TIReadBootMemory(serial, 0, 1, &temp);
23482 +               if (status)
23483 +                       return status;
23484 +       }
23485 +
23486 +       for (i=0; i < length; ++i) {
23487 +               status = TISendVendorRequestSync (serial->serial->dev,
23488 +                                               UMPC_MEMORY_WRITE,              // Request
23489 +                                               buffer[i],                      // wValue
23490 +                                               (__u16)(i+start_address),       // wIndex
23491 +                                               NULL,                           // TransferBuffer
23492 +                                               0);                             // TransferBufferLength
23493 +               if (status)
23494 +                       return status;
23495 +       }
23496 +
23497 +       dbg ("%s - start_sddr = %x, length = %d", __FUNCTION__, start_address, length);
23498 +       usb_serial_debug_data (__FILE__, __FUNCTION__, length, buffer);
23499 +
23500 +       return status;
23501 +}
23502 +
23503 +
23504 +/* Write edgeport I2C memory to TI chip        */
23505 +static int TIWriteDownloadI2C (struct edgeport_serial *serial, int start_address, int length, __u8 address_type, __u8 *buffer)
23506 +{
23507 +       int status = 0;
23508 +       int write_length;
23509 +       __u16 be_start_address;
23510 +
23511 +       /* We can only send a maximum of 1 aligned byte page at a time */
23512 +       
23513 +       /* calulate the number of bytes left in the first page */
23514 +       write_length = EPROM_PAGE_SIZE - (start_address & (EPROM_PAGE_SIZE - 1));
23515 +
23516 +       if (write_length > length)
23517 +               write_length = length;
23518 +
23519 +       dbg ("%s - BytesInFirstPage Addr = %x, length = %d", __FUNCTION__, start_address, write_length);
23520 +       usb_serial_debug_data (__FILE__, __FUNCTION__, write_length, buffer);
23521 +
23522 +       /* Write first page */
23523 +       be_start_address = cpu_to_be16 (start_address);
23524 +       status = TISendVendorRequestSync (serial->serial->dev,
23525 +                                       UMPC_MEMORY_WRITE,      // Request
23526 +                                       (__u16)address_type,    // wValue
23527 +                                       be_start_address,       // wIndex
23528 +                                       buffer,                 // TransferBuffer
23529 +                                       write_length);
23530 +       if (status) {
23531 +               dbg ("%s - ERROR %d", __FUNCTION__, status);
23532 +               return status;
23533 +       }
23534 +
23535 +       length          -= write_length;
23536 +       start_address   += write_length;
23537 +       buffer          += write_length;
23538 +
23539 +       /* We should be aligned now -- can write max page size bytes at a time */
23540 +       while (length) {
23541 +               if (length > EPROM_PAGE_SIZE)
23542 +                       write_length = EPROM_PAGE_SIZE;
23543 +               else
23544 +                       write_length = length;
23545 +
23546 +               dbg ("%s - Page Write Addr = %x, length = %d", __FUNCTION__, start_address, write_length);
23547 +               usb_serial_debug_data (__FILE__, __FUNCTION__, write_length, buffer);
23548 +
23549 +               /* Write next page */
23550 +               be_start_address = cpu_to_be16 (start_address);
23551 +               status = TISendVendorRequestSync (serial->serial->dev,
23552 +                                               UMPC_MEMORY_WRITE,      // Request
23553 +                                               (__u16)address_type,    // wValue
23554 +                                               be_start_address,       // wIndex
23555 +                                               buffer,                 // TransferBuffer
23556 +                                               write_length);          // TransferBufferLength
23557 +               if (status) {
23558 +                       dbg ("%s - ERROR %d", __FUNCTION__, status);
23559 +                       return status;
23560 +               }
23561 +               
23562 +               length          -= write_length;
23563 +               start_address   += write_length;
23564 +               buffer          += write_length;
23565 +       }
23566 +       return status;
23567 +}
23568 +
23569 +/* Examine the UMP DMA registers and LSR
23570 + * 
23571 + * Check the MSBit of the X and Y DMA byte count registers.
23572 + * A zero in this bit indicates that the TX DMA buffers are empty
23573 + * then check the TX Empty bit in the UART.
23574 + */
23575 +static int TIIsTxActive (struct edgeport_port *port)
23576 +{
23577 +       int status;
23578 +       struct out_endpoint_desc_block *oedb;
23579 +       __u8 lsr;
23580 +       int bytes_left = 0;
23581 +
23582 +       oedb = kmalloc (sizeof (* oedb), GFP_KERNEL);
23583 +       if (!oedb) {
23584 +               err ("%s - out of memory", __FUNCTION__);
23585 +               return -ENOMEM;
23586 +       }
23587 +
23588 +       /* Read the DMA Count Registers */
23589 +       status = TIReadRam (port->port->serial->dev,
23590 +                           port->dma_address,
23591 +                           sizeof( *oedb),
23592 +                           (void *)oedb);
23593 +
23594 +       if (status)
23595 +               goto exit_is_tx_active;
23596 +
23597 +       dbg ("%s - XByteCount    0x%X", __FUNCTION__, oedb->XByteCount);
23598 +
23599 +       /* and the LSR */
23600 +       status = TIReadRam (port->port->serial->dev, 
23601 +                           port->uart_base + UMPMEM_OFFS_UART_LSR,
23602 +                           1,
23603 +                           &lsr);
23604 +
23605 +       if (status)
23606 +               goto exit_is_tx_active;
23607 +       dbg ("%s - LSR = 0x%X", __FUNCTION__, lsr);
23608 +       
23609 +       /* If either buffer has data or we are transmitting then return TRUE */
23610 +       if ((oedb->XByteCount & 0x80 ) != 0 )
23611 +               bytes_left += 64;
23612 +
23613 +       if ((lsr & UMP_UART_LSR_TX_MASK ) == 0 )
23614 +               bytes_left += 1;
23615 +
23616 +       /* We return Not Active if we get any kind of error */
23617 +exit_is_tx_active:
23618 +       dbg ("%s - return %d", __FUNCTION__, bytes_left );
23619 +       return bytes_left;
23620 +}
23621 +
23622 +static void TIChasePort(struct edgeport_port *port)
23623 +{
23624 +       int loops;
23625 +       int last_count;
23626 +       int write_size;
23627 +
23628 +restart_tx_loop:
23629 +       // Base the LoopTime on the baud rate
23630 +       if (port->baud_rate == 0)
23631 +               port->baud_rate = 1200;
23632 +
23633 +       write_size = port->tx.count;
23634 +       loops = max(100, (100*write_size)/(port->baud_rate/10));
23635 +       dbg ("%s - write_size %d, baud %d loop = %d", __FUNCTION__,
23636 +            write_size, port->baud_rate, loops);
23637 +
23638 +       while (1) {
23639 +               // Save Last count
23640 +               last_count = port->tx.count;
23641 +
23642 +               dbg ("%s - Tx Buffer Size = %d loops = %d", __FUNCTION__,
23643 +                    last_count, loops);
23644 +
23645 +               /* Is the Edgeport Buffer empty? */
23646 +               if (port->tx.count == 0)
23647 +                       break;
23648 +
23649 +               /* Block the thread for 10ms */
23650 +               wait_ms (10);
23651 +
23652 +               if (last_count == port->tx.count) {
23653 +                       /* No activity.. count down. */
23654 +                       --loops;
23655 +                       if (loops == 0) {
23656 +                               dbg ("%s - Wait for TxEmpty - TIMEOUT",
23657 +                                    __FUNCTION__);
23658 +                               return;
23659 +                       }
23660 +               } else {
23661 +                       /* Reset timeout value back to a minimum of 1 second */
23662 +                       dbg ("%s - Wait for TxEmpty  Reset Count", __FUNCTION__);
23663 +                       goto restart_tx_loop;
23664 +               }
23665 +       }
23666 +
23667 +       dbg ("%s - Local Tx Buffer Empty -- Waiting for TI UMP to EMPTY X/Y and FIFO",
23668 +            __FUNCTION__);
23669 +
23670 +       write_size = TIIsTxActive (port);
23671 +       loops = max(50, (100*write_size)/(port->baud_rate/10));
23672 +       dbg ("%s - write_size %d, baud %d loop = %d", __FUNCTION__, 
23673 +            write_size, port->baud_rate, loops);
23674 +
23675 +       while (1) {
23676 +               /* This function takes 4 ms; */
23677 +               if (!TIIsTxActive (port)) {
23678 +                       /* Delay a few char times */
23679 +                       wait_ms (50);
23680 +                       dbg ("%s - Empty", __FUNCTION__);
23681 +                       return;
23682 +               }
23683 +
23684 +               --loops;
23685 +               if (loops == 0) {
23686 +                       dbg ("%s - TIMEOUT", __FUNCTION__);
23687 +                       return;
23688 +               }
23689 +       }
23690 +}
23691 +
23692 +static int TIChooseConfiguration (struct usb_device *dev)
23693 +{
23694 +       // There may be multiple configurations on this device, in which case
23695 +       // we would need to read and parse all of them to find out which one
23696 +       // we want. However, we just support one config at this point,
23697 +       // configuration # 1, which is Config Descriptor 0.
23698 +
23699 +       dbg ("%s - Number of Interfaces = %d", __FUNCTION__, dev->config->bNumInterfaces);
23700 +       dbg ("%s - MAX Power            = %d", __FUNCTION__, dev->config->MaxPower*2);
23701 +
23702 +       if (dev->config->bNumInterfaces != 1) {
23703 +               err ("%s - bNumInterfaces is not 1, ERROR!", __FUNCTION__);
23704 +               return -ENODEV;
23705 +       }
23706 +
23707 +       return 0;
23708 +}
23709 +
23710 +int TIReadRom (struct edgeport_serial *serial, int start_address, int length, __u8 *buffer)
23711 +{
23712 +       int status;
23713 +
23714 +       if (serial->product_info.TiMode == TI_MODE_DOWNLOAD) {
23715 +               status = TIReadDownloadMemory (serial->serial->dev,
23716 +                                              start_address,
23717 +                                              length,
23718 +                                              serial->TI_I2C_Type,
23719 +                                              buffer);
23720 +       } else {
23721 +               status = TIReadBootMemory (serial,
23722 +                                          start_address,
23723 +                                          length,
23724 +                                          buffer);
23725 +       }
23726 +
23727 +       return status;
23728 +}
23729 +
23730 +int TIWriteRom (struct edgeport_serial *serial, int start_address, int length, __u8 *buffer)
23731 +{
23732 +       if (serial->product_info.TiMode == TI_MODE_BOOT)
23733 +               return TIWriteBootMemory (serial,
23734 +                                         start_address,
23735 +                                         length,
23736 +                                         buffer);
23737 +
23738 +       if (serial->product_info.TiMode == TI_MODE_DOWNLOAD)
23739 +               return TIWriteDownloadI2C (serial,
23740 +                                          start_address,
23741 +                                          length,
23742 +                                          serial->TI_I2C_Type,
23743 +                                          buffer);
23744 +
23745 +       return -EINVAL;
23746 +}
23747 +
23748 +
23749 +
23750 +/* Read a descriptor header from I2C based on type */
23751 +static int TIGetDescriptorAddress (struct edgeport_serial *serial, int desc_type, struct ti_i2c_desc *rom_desc)
23752 +{
23753 +       int start_address;
23754 +       int status;
23755 +
23756 +       /* Search for requested descriptor in I2C */
23757 +       start_address = 2;
23758 +       do {
23759 +               status = TIReadRom (serial,
23760 +                                  start_address,
23761 +                                  sizeof(struct ti_i2c_desc),
23762 +                                  (__u8 *)rom_desc );
23763 +               if (status)
23764 +                       return 0;
23765 +
23766 +               if (rom_desc->Type == desc_type)
23767 +                       return start_address;
23768 +
23769 +               start_address = start_address + sizeof(struct ti_i2c_desc) +  rom_desc->Size;
23770 +
23771 +       } while ((start_address < TI_MAX_I2C_SIZE) && rom_desc->Type);
23772 +       
23773 +       return 0;
23774 +}
23775 +
23776 +/* Validate descriptor checksum */
23777 +static int ValidChecksum(struct ti_i2c_desc *rom_desc, __u8 *buffer)
23778 +{
23779 +       __u16 i;
23780 +       __u8 cs = 0;
23781 +
23782 +       for (i=0; i < rom_desc->Size; i++) {
23783 +               cs = (__u8)(cs + buffer[i]);
23784 +       }
23785 +       if (cs != rom_desc->CheckSum) {
23786 +               dbg ("%s - Mismatch %x - %x", __FUNCTION__, rom_desc->CheckSum, cs);
23787 +               return -EINVAL;
23788 +       }
23789 +       return 0;
23790 +}
23791 +
23792 +/* Make sure that the I2C image is good */
23793 +static int TiValidateI2cImage (struct edgeport_serial *serial)
23794 +{
23795 +       int status = 0;
23796 +       struct ti_i2c_desc *rom_desc;
23797 +       int start_address = 2;
23798 +       __u8 *buffer;
23799 +
23800 +       rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL);
23801 +       if (!rom_desc) {
23802 +               err ("%s - out of memory", __FUNCTION__);
23803 +               return -ENOMEM;
23804 +       }
23805 +       buffer = kmalloc (TI_MAX_I2C_SIZE, GFP_KERNEL);
23806 +       if (!buffer) {
23807 +               err ("%s - out of memory when allocating buffer", __FUNCTION__);
23808 +               kfree (rom_desc);
23809 +               return -ENOMEM;
23810 +       }
23811 +
23812 +       // Read the first byte (Signature0) must be 0x52
23813 +       status = TIReadRom (serial, 0, 1, buffer);
23814 +       if (status)
23815 +               goto ExitTiValidateI2cImage; 
23816 +
23817 +       if (*buffer != 0x52) {
23818 +               err ("%s - invalid buffer signature", __FUNCTION__);
23819 +               status = -ENODEV;
23820 +               goto ExitTiValidateI2cImage;
23821 +       }
23822 +
23823 +       do {
23824 +               // Validate the I2C
23825 +               status = TIReadRom (serial,
23826 +                               start_address,
23827 +                               sizeof(struct ti_i2c_desc),
23828 +                               (__u8 *)rom_desc);
23829 +               if (status)
23830 +                       break;
23831 +
23832 +               if ((start_address + sizeof(struct ti_i2c_desc) + rom_desc->Size) > TI_MAX_I2C_SIZE) {
23833 +                       status = -ENODEV;
23834 +                       dbg ("%s - structure too big, erroring out.", __FUNCTION__);
23835 +                       break;
23836 +               }
23837 +
23838 +               dbg ("%s Type = 0x%x", __FUNCTION__, rom_desc->Type);
23839 +
23840 +               // Skip type 2 record
23841 +               if ((rom_desc->Type & 0x0f) != I2C_DESC_TYPE_FIRMWARE_BASIC) {
23842 +                       // Read the descriptor data
23843 +                       status = TIReadRom(serial,
23844 +                                               start_address+sizeof(struct ti_i2c_desc),
23845 +                                               rom_desc->Size,
23846 +                                               buffer);
23847 +                       if (status)
23848 +                               break;
23849 +
23850 +                       status = ValidChecksum(rom_desc, buffer);
23851 +                       if (status)
23852 +                               break;
23853 +               }
23854 +               start_address = start_address + sizeof(struct ti_i2c_desc) + rom_desc->Size;
23855 +
23856 +       } while ((rom_desc->Type != I2C_DESC_TYPE_ION) && (start_address < TI_MAX_I2C_SIZE));
23857 +
23858 +       if ((rom_desc->Type != I2C_DESC_TYPE_ION) || (start_address > TI_MAX_I2C_SIZE))
23859 +               status = -ENODEV;
23860 +
23861 +ExitTiValidateI2cImage:        
23862 +       kfree (buffer);
23863 +       kfree (rom_desc);
23864 +       return status;
23865 +}
23866 +
23867 +static int TIReadManufDescriptor (struct edgeport_serial *serial, __u8 *buffer)
23868 +{
23869 +       int status;
23870 +       int start_address;
23871 +       struct ti_i2c_desc *rom_desc;
23872 +       struct edge_ti_manuf_descriptor *desc;
23873 +
23874 +       rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL);
23875 +       if (!rom_desc) {
23876 +               err ("%s - out of memory", __FUNCTION__);
23877 +               return -ENOMEM;
23878 +       }
23879 +       start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_ION, rom_desc);
23880 +
23881 +       if (!start_address) {
23882 +               dbg ("%s - Edge Descriptor not found in I2C", __FUNCTION__);
23883 +               status = -ENODEV;
23884 +               goto exit;
23885 +       }
23886 +
23887 +       // Read the descriptor data
23888 +       status = TIReadRom (serial,
23889 +                               start_address+sizeof(struct ti_i2c_desc),
23890 +                               rom_desc->Size,
23891 +                               buffer);
23892 +       if (status)
23893 +               goto exit;
23894 +       
23895 +       status = ValidChecksum(rom_desc, buffer);
23896 +       
23897 +       desc = (struct edge_ti_manuf_descriptor *)buffer;
23898 +       dbg ( "%s - IonConfig      0x%x", __FUNCTION__, desc->IonConfig         );
23899 +       dbg ( "%s - Version          %d", __FUNCTION__, desc->Version           );
23900 +       dbg ( "%s - Cpu/Board      0x%x", __FUNCTION__, desc->CpuRev_BoardRev   );
23901 +       dbg ( "%s - NumPorts         %d", __FUNCTION__, desc->NumPorts          );      
23902 +       dbg ( "%s - NumVirtualPorts  %d", __FUNCTION__, desc->NumVirtualPorts   );      
23903 +       dbg ( "%s - TotalPorts       %d", __FUNCTION__, desc->TotalPorts        );      
23904 +
23905 +exit:
23906 +       kfree (rom_desc);
23907 +       return status;
23908 +}
23909 +
23910 +/* Build firmware header used for firmware update */
23911 +static int BuildI2CFirmwareHeader (__u8 *header)
23912 +{
23913 +       __u8 *buffer;
23914 +       int buffer_size;
23915 +       int i;
23916 +       __u8 cs = 0;
23917 +       struct ti_i2c_desc *i2c_header;
23918 +       struct ti_i2c_image_header *img_header;
23919 +       struct ti_i2c_firmware_rec *firmware_rec;
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 +       
23928 +       // Allocate a 15.5k buffer + 2 bytes for version number (Firmware Record)
23929 +       buffer_size = (((1024 * 16) - 512 )+ sizeof(struct ti_i2c_firmware_rec));
23930 +
23931 +       buffer = kmalloc (buffer_size, GFP_KERNEL);
23932 +       if (!buffer) {
23933 +               err ("%s - out of memory", __FUNCTION__);
23934 +               return -ENOMEM;
23935 +       }
23936 +       
23937 +       // Set entire image of 0xffs
23938 +       memset (buffer, 0xff, buffer_size);
23939 +
23940 +       // Copy version number into firmware record
23941 +       firmware_rec = (struct ti_i2c_firmware_rec *)buffer;
23942 +
23943 +       firmware_rec->Ver_Major = OperationalCodeImageVersion.MajorVersion;
23944 +       firmware_rec->Ver_Minor = OperationalCodeImageVersion.MinorVersion;
23945 +
23946 +       // Pointer to fw_down memory image
23947 +       img_header = (struct ti_i2c_image_header *)&PagableOperationalCodeImage[0];
23948 +
23949 +       memcpy (buffer + sizeof(struct ti_i2c_firmware_rec),
23950 +               &PagableOperationalCodeImage[sizeof(struct ti_i2c_image_header)],
23951 +               img_header->Length);
23952 +
23953 +       for (i=0; i < buffer_size; i++) {
23954 +               cs = (__u8)(cs + buffer[i]);
23955 +       }
23956 +
23957 +       kfree (buffer);
23958 +
23959 +       // Build new header
23960 +       i2c_header =  (struct ti_i2c_desc *)header;
23961 +       firmware_rec =  (struct ti_i2c_firmware_rec*)i2c_header->Data;
23962 +       
23963 +       i2c_header->Type        = I2C_DESC_TYPE_FIRMWARE_BLANK;
23964 +       i2c_header->Size        = (__u16)buffer_size;
23965 +       i2c_header->CheckSum    = cs;
23966 +       firmware_rec->Ver_Major = OperationalCodeImageVersion.MajorVersion;
23967 +       firmware_rec->Ver_Minor = OperationalCodeImageVersion.MinorVersion;
23968 +
23969 +       return 0;
23970 +}
23971 +
23972 +/* Try to figure out what type of I2c we have */
23973 +static int TIGetI2cTypeInBootMode (struct edgeport_serial *serial)
23974 +{
23975 +       int status;
23976 +       __u8 data;
23977 +               
23978 +       // Try to read type 2
23979 +       status = TIReadVendorRequestSync (serial->serial->dev,
23980 +                                       UMPC_MEMORY_READ,               // Request
23981 +                                       DTK_ADDR_SPACE_I2C_TYPE_II,     // wValue (Address type)
23982 +                                       0,                              // wIndex
23983 +                                       &data,                          // TransferBuffer
23984 +                                       0x01);                          // TransferBufferLength
23985 +       if (status)
23986 +               dbg ("%s - read 2 status error = %d", __FUNCTION__, status);
23987 +       else
23988 +               dbg ("%s - read 2 data = 0x%x", __FUNCTION__, data);
23989 +       if ((!status) && data == 0x52) {
23990 +               dbg ("%s - ROM_TYPE_II", __FUNCTION__);
23991 +               serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
23992 +               return 0;
23993 +       }
23994 +
23995 +       // Try to read type 3
23996 +       status = TIReadVendorRequestSync (serial->serial->dev,
23997 +                                       UMPC_MEMORY_READ,               // Request
23998 +                                       DTK_ADDR_SPACE_I2C_TYPE_III,    // wValue (Address type)
23999 +                                       0,                              // wIndex
24000 +                                       &data,                          // TransferBuffer
24001 +                                       0x01);                          // TransferBufferLength
24002 +       if (status)
24003 +               dbg ("%s - read 3 status error = %d", __FUNCTION__, status);
24004 +       else
24005 +               dbg ("%s - read 2 data = 0x%x", __FUNCTION__, data);
24006 +       if ((!status) && data == 0x52) {
24007 +               dbg ("%s - ROM_TYPE_III", __FUNCTION__);
24008 +               serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_III;
24009 +               return 0;
24010 +       }
24011 +
24012 +       dbg ("%s - Unknown", __FUNCTION__);
24013 +       serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
24014 +       return -ENODEV;
24015 +}
24016 +
24017 +static int TISendBulkTransferSync (struct usb_serial *serial, void *buffer, int length, int *num_sent)
24018 +{
24019 +       int status;
24020 +
24021 +       status = usb_bulk_msg (serial->dev,
24022 +                               usb_sndbulkpipe(serial->dev,
24023 +                                               serial->port[0].bulk_out_endpointAddress),
24024 +                               buffer,
24025 +                               length,
24026 +                               num_sent,
24027 +                               HZ);
24028 +       return status;
24029 +}
24030 +
24031 +/* Download given firmware image to the device (IN BOOT MODE) */
24032 +static int TIDownloadCodeImage (struct edgeport_serial *serial, __u8 *image, int image_length)
24033 +{
24034 +       int status = 0;
24035 +       int pos;
24036 +       int transfer;
24037 +       int done;
24038 +
24039 +       // Transfer firmware image
24040 +       for (pos = 0; pos < image_length; ) {
24041 +               // Read the next buffer from file
24042 +               transfer = image_length - pos;
24043 +               if (transfer > EDGE_FW_BULK_MAX_PACKET_SIZE)
24044 +                       transfer = EDGE_FW_BULK_MAX_PACKET_SIZE;
24045 +
24046 +               // Transfer data
24047 +               status = TISendBulkTransferSync (serial->serial, &image[pos], transfer, &done);
24048 +               if (status)
24049 +                       break;
24050 +               // Advance buffer pointer
24051 +               pos += done;
24052 +       }
24053 +
24054 +       return status;
24055 +}
24056 +
24057 +// FIXME!!!
24058 +static int TIConfigureBootDevice (struct usb_device *dev)
24059 +{
24060 +       return 0;
24061 +}
24062 +
24063 +/**
24064 + * DownloadTIFirmware - Download run-time operating firmware to the TI5052
24065 + * 
24066 + * This routine downloads the main operating code into the TI5052, using the
24067 + * boot code already burned into E2PROM or ROM.
24068 + */
24069 +static int TIDownloadFirmware (struct edgeport_serial *serial)
24070 +{
24071 +       int status = 0;
24072 +       int start_address;
24073 +       struct edge_ti_manuf_descriptor *ti_manuf_desc;
24074 +       struct usb_interface_descriptor *interface;
24075 +       int download_cur_ver;
24076 +       int download_new_ver;
24077 +
24078 +       /* This routine is entered by both the BOOT mode and the Download mode
24079 +        * We can determine which code is running by the reading the config
24080 +        * descriptor and if we have only one bulk pipe it is in boot mode
24081 +        */
24082 +       serial->product_info.hardware_type = HARDWARE_TYPE_TIUMP;
24083 +
24084 +       /* Default to type 2 i2c */
24085 +       serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
24086 +
24087 +       status = TIChooseConfiguration (serial->serial->dev);
24088 +       if (status)
24089 +               return status;
24090 +
24091 +       interface = serial->serial->dev->config->interface->altsetting;
24092 +       if (!interface) {
24093 +               err ("%s - no interface set, error!", __FUNCTION__);
24094 +               return -ENODEV;
24095 +       }
24096 +
24097 +       // Setup initial mode -- the default mode 0 is TI_MODE_CONFIGURING
24098 +       // if we have more than one endpoint we are definitely in download mode
24099 +       if (interface->bNumEndpoints > 1)
24100 +               serial->product_info.TiMode = TI_MODE_DOWNLOAD;
24101 +       else
24102 +               // Otherwise we will remain in configuring mode
24103 +               serial->product_info.TiMode = TI_MODE_CONFIGURING;
24104 +
24105 +       // Save Download Version Number
24106 +       OperationalCodeImageVersion.MajorVersion = PagableOperationalCodeImageVersion.MajorVersion;
24107 +       OperationalCodeImageVersion.MinorVersion = PagableOperationalCodeImageVersion.MinorVersion;
24108 +       OperationalCodeImageVersion.BuildNumber  = PagableOperationalCodeImageVersion.BuildNumber;
24109 +
24110 +       /********************************************************************/
24111 +       /* Download Mode */
24112 +       /********************************************************************/
24113 +       if (serial->product_info.TiMode == TI_MODE_DOWNLOAD) {
24114 +               struct ti_i2c_desc *rom_desc;
24115 +
24116 +               dbg ("%s - <<<<<<<<<<<<<<<RUNNING IN DOWNLOAD MODE>>>>>>>>>>", __FUNCTION__);
24117 +
24118 +               status = TiValidateI2cImage (serial);
24119 +               if (status) {
24120 +                       dbg ("%s - <<<<<<<<<<<<<<<DOWNLOAD MODE -- BAD I2C >>>>>>>>>>",
24121 +                            __FUNCTION__);
24122 +                       return status;
24123 +               }
24124 +               
24125 +               /* Validate Hardware version number
24126 +                * Read Manufacturing Descriptor from TI Based Edgeport
24127 +                */
24128 +               ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL);
24129 +               if (!ti_manuf_desc) {
24130 +                       err ("%s - out of memory.", __FUNCTION__);
24131 +                       return -ENOMEM;
24132 +               }
24133 +               status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc);
24134 +               if (status) {
24135 +                       kfree (ti_manuf_desc);
24136 +                       return status;
24137 +               }
24138 +
24139 +               // Check version number of ION descriptor
24140 +               if (!ignore_cpu_rev && TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev) < 2) {
24141 +                       dbg ( "%s - Wrong CPU Rev %d (Must be 2)", __FUNCTION__, 
24142 +                            TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev));
24143 +                       kfree (ti_manuf_desc);
24144 +                       return -EINVAL;
24145 +               }
24146 +
24147 +               rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL);
24148 +               if (!rom_desc) {
24149 +                       err ("%s - out of memory.", __FUNCTION__);
24150 +                       kfree (ti_manuf_desc);
24151 +                       return -ENOMEM;
24152 +               }
24153 +
24154 +               // Search for type 2 record (firmware record)
24155 +               if ((start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_FIRMWARE_BASIC, rom_desc)) != 0) {
24156 +                       struct ti_i2c_firmware_rec *firmware_version;
24157 +                       __u8 record;
24158 +
24159 +                       dbg ("%s - Found Type FIRMWARE (Type 2) record", __FUNCTION__);
24160 +
24161 +                       firmware_version = kmalloc (sizeof (*firmware_version), GFP_KERNEL);
24162 +                       if (!firmware_version) {
24163 +                               err ("%s - out of memory.", __FUNCTION__);
24164 +                               kfree (rom_desc);
24165 +                               kfree (ti_manuf_desc);
24166 +                               return -ENOMEM;
24167 +                       }
24168 +
24169 +                       // Validate version number                              
24170 +                       // Read the descriptor data
24171 +                       status = TIReadRom (serial,
24172 +                                       start_address+sizeof(struct ti_i2c_desc),
24173 +                                       sizeof(struct ti_i2c_firmware_rec),
24174 +                                       (__u8 *)firmware_version);
24175 +                       if (status) {
24176 +                               kfree (firmware_version);
24177 +                               kfree (rom_desc);
24178 +                               kfree (ti_manuf_desc);
24179 +                               return status;
24180 +                       }
24181 +
24182 +                       // Check version number of download with current version in I2c
24183 +                       download_cur_ver = (firmware_version->Ver_Major << 8) + 
24184 +                                          (firmware_version->Ver_Minor);
24185 +                       download_new_ver = (OperationalCodeImageVersion.MajorVersion << 8) +
24186 +                                          (OperationalCodeImageVersion.MinorVersion);
24187 +
24188 +                       dbg ("%s - >>>Firmware Versions Device %d.%d  Driver %d.%d",
24189 +                            __FUNCTION__,
24190 +                            firmware_version->Ver_Major,
24191 +                            firmware_version->Ver_Minor,
24192 +                            OperationalCodeImageVersion.MajorVersion,
24193 +                            OperationalCodeImageVersion.MinorVersion);
24194 +
24195 +                       // Check if we have an old version in the I2C and update if necessary
24196 +                       if (download_cur_ver != download_new_ver) {
24197 +                               dbg ("%s - Update I2C Download from %d.%d to %d.%d",
24198 +                                    __FUNCTION__,
24199 +                                    firmware_version->Ver_Major,
24200 +                                    firmware_version->Ver_Minor,
24201 +                                    OperationalCodeImageVersion.MajorVersion,
24202 +                                    OperationalCodeImageVersion.MinorVersion);
24203 +
24204 +                               // In order to update the I2C firmware we must change the type 2 record to type 0xF2.
24205 +                               // This will force the UMP to come up in Boot Mode.  Then while in boot mode, the driver 
24206 +                               // will download the latest firmware (padded to 15.5k) into the UMP ram. 
24207 +                               // And finally when the device comes back up in download mode the driver will cause 
24208 +                               // the new firmware to be copied from the UMP Ram to I2C and the firmware will update
24209 +                               // the record type from 0xf2 to 0x02.
24210 +
24211 +                               record = I2C_DESC_TYPE_FIRMWARE_BLANK;
24212 +
24213 +                               // Change the I2C Firmware record type to 0xf2 to trigger an update
24214 +                               status = TIWriteRom (serial,
24215 +                                                       start_address,
24216 +                                                       sizeof(record),
24217 +                                                       &record);
24218 +                               if (status) {
24219 +                                       kfree (firmware_version);
24220 +                                       kfree (rom_desc);
24221 +                                       kfree (ti_manuf_desc);
24222 +                                       return status;
24223 +                               }
24224 +
24225 +                               // verify the write -- must do this in order for write to 
24226 +                               // complete before we do the hardware reset
24227 +                               status = TIReadRom (serial,
24228 +                                                       start_address,
24229 +                                                       sizeof(record),
24230 +                                                       &record);
24231 +
24232 +                               if (status) {
24233 +                                       kfree (firmware_version);
24234 +                                       kfree (rom_desc);
24235 +                                       kfree (ti_manuf_desc);
24236 +                                       return status;
24237 +                               }
24238 +
24239 +                               if (record != I2C_DESC_TYPE_FIRMWARE_BLANK) {
24240 +                                       err ("%s - error resetting device", __FUNCTION__);
24241 +                                       kfree (firmware_version);
24242 +                                       kfree (rom_desc);
24243 +                                       kfree (ti_manuf_desc);
24244 +                                       return -ENODEV;
24245 +                               }
24246 +
24247 +                               dbg ("%s - HARDWARE RESET", __FUNCTION__);
24248 +
24249 +                               // Reset UMP -- Back to BOOT MODE
24250 +                               status = TISendVendorRequestSync (serial->serial->dev,
24251 +                                                               UMPC_HARDWARE_RESET,    // Request
24252 +                                                               0,                      // wValue
24253 +                                                               0,                      // wIndex
24254 +                                                               NULL,                   // TransferBuffer
24255 +                                                               0);                     // TransferBufferLength
24256 +
24257 +                               dbg ( "%s - HARDWARE RESET return %d", __FUNCTION__, status);
24258 +
24259 +                               /* return an error on purpose. */
24260 +                               return -ENODEV;
24261 +                       }
24262 +               }
24263 +               // Search for type 0xF2 record (firmware blank record)
24264 +               else if ((start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_FIRMWARE_BLANK, rom_desc)) != 0) {
24265 +                       #define HEADER_SIZE     (sizeof(struct ti_i2c_desc) + sizeof(struct ti_i2c_firmware_rec))
24266 +                       __u8 *header;
24267 +                       __u8 *vheader;
24268 +
24269 +                       header  = kmalloc (HEADER_SIZE, GFP_KERNEL);
24270 +                       if (!header) {
24271 +                               err ("%s - out of memory.", __FUNCTION__);
24272 +                               kfree (rom_desc);
24273 +                               kfree (ti_manuf_desc);
24274 +                               return -ENOMEM;
24275 +                       }
24276 +                               
24277 +                       vheader = kmalloc (HEADER_SIZE, GFP_KERNEL);
24278 +                       if (!vheader) {
24279 +                               err ("%s - out of memory.", __FUNCTION__);
24280 +                               kfree (header);
24281 +                               kfree (rom_desc);
24282 +                               kfree (ti_manuf_desc);
24283 +                               return -ENOMEM;
24284 +                       }
24285 +                       
24286 +                       dbg ("%s - Found Type BLANK FIRMWARE (Type F2) record", __FUNCTION__);
24287 +
24288 +                       // In order to update the I2C firmware we must change the type 2 record to type 0xF2.
24289 +                       // This will force the UMP to come up in Boot Mode.  Then while in boot mode, the driver 
24290 +                       // will download the latest firmware (padded to 15.5k) into the UMP ram. 
24291 +                       // And finally when the device comes back up in download mode the driver will cause 
24292 +                       // the new firmware to be copied from the UMP Ram to I2C and the firmware will update
24293 +                       // the record type from 0xf2 to 0x02.
24294 +                       status = BuildI2CFirmwareHeader(header);
24295 +                       if (status) {
24296 +                               kfree (vheader);
24297 +                               kfree (header);
24298 +                               kfree (rom_desc);
24299 +                               kfree (ti_manuf_desc);
24300 +                               return status;
24301 +                       }
24302 +
24303 +                       // Update I2C with type 0xf2 record with correct size and checksum
24304 +                       status = TIWriteRom (serial,
24305 +                                               start_address,
24306 +                                               HEADER_SIZE,
24307 +                                               header);
24308 +                       if (status) {
24309 +                               kfree (vheader);
24310 +                               kfree (header);
24311 +                               kfree (rom_desc);
24312 +                               kfree (ti_manuf_desc);
24313 +                               return status;
24314 +                       }
24315 +
24316 +                       // verify the write -- must do this in order for write to 
24317 +                       // complete before we do the hardware reset
24318 +                       status = TIReadRom (serial,
24319 +                                               start_address,
24320 +                                               HEADER_SIZE,
24321 +                                               vheader);
24322 +
24323 +                       if (status) {
24324 +                               dbg ("%s - can't read header back", __FUNCTION__);
24325 +                               kfree (vheader);
24326 +                               kfree (header);
24327 +                               kfree (rom_desc);
24328 +                               kfree (ti_manuf_desc);
24329 +                               return status;
24330 +                       }
24331 +                       if (memcmp(vheader, header, HEADER_SIZE)) {
24332 +                               dbg ("%s - write download record failed", __FUNCTION__);
24333 +                               kfree (vheader);
24334 +                               kfree (header);
24335 +                               kfree (rom_desc);
24336 +                               kfree (ti_manuf_desc);
24337 +                               return status;
24338 +                       }
24339 +
24340 +                       kfree (vheader);
24341 +                       kfree (header);
24342 +
24343 +                       dbg ("%s - Start firmware update", __FUNCTION__);
24344 +
24345 +                       // Tell firmware to copy download image into I2C 
24346 +                       status = TISendVendorRequestSync (serial->serial->dev,
24347 +                                               UMPC_COPY_DNLD_TO_I2C,  // Request
24348 +                                               0,                      // wValue 
24349 +                                               0,                      // wIndex
24350 +                                               NULL,                   // TransferBuffer
24351 +                                               0);                     // TransferBufferLength
24352 +
24353 +                       dbg ("%s - Update complete 0x%x", __FUNCTION__, status);
24354 +                       if (status) {
24355 +                               dbg ("%s - UMPC_COPY_DNLD_TO_I2C failed", __FUNCTION__);
24356 +                               kfree (rom_desc);
24357 +                               kfree (ti_manuf_desc);
24358 +                               return status;
24359 +                       }
24360 +               }
24361 +
24362 +               // The device is running the download code
24363 +               kfree (rom_desc);
24364 +               kfree (ti_manuf_desc);
24365 +               return 0;
24366 +       }
24367 +
24368 +       /********************************************************************/
24369 +       /* Boot Mode */
24370 +       /********************************************************************/
24371 +       dbg ("%s - <<<<<<<<<<<<<<<RUNNING IN BOOT MODE>>>>>>>>>>>>>>>",
24372 +            __FUNCTION__);
24373 +
24374 +       // Configure the TI device so we can use the BULK pipes for download
24375 +       status = TIConfigureBootDevice (serial->serial->dev);
24376 +       if (status)
24377 +               return status;
24378 +
24379 +       if (serial->serial->dev->descriptor.idVendor != USB_VENDOR_ID_ION) {
24380 +               dbg ("%s - VID = 0x%x", __FUNCTION__,
24381 +                    serial->serial->dev->descriptor.idVendor);
24382 +               serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
24383 +               goto StayInBootMode;
24384 +       }
24385 +
24386 +       // We have an ION device (I2c Must be programmed)
24387 +       // Determine I2C image type
24388 +       if (TIGetI2cTypeInBootMode(serial)) {
24389 +               goto StayInBootMode;
24390 +       }
24391 +
24392 +       // Registry variable set?
24393 +       if (TIStayInBootMode) {
24394 +               dbg ("%s - TIStayInBootMode", __FUNCTION__);
24395 +               goto StayInBootMode;
24396 +       }
24397 +
24398 +       // Check for ION Vendor ID and that the I2C is valid
24399 +       if (!TiValidateI2cImage(serial)) {
24400 +               struct ti_i2c_image_header *header;
24401 +               int i;
24402 +               __u8 cs = 0;
24403 +               __u8 *buffer;
24404 +               int buffer_size;
24405 +
24406 +               /* Validate Hardware version number
24407 +                * Read Manufacturing Descriptor from TI Based Edgeport
24408 +                */
24409 +               ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL);
24410 +               if (!ti_manuf_desc) {
24411 +                       err ("%s - out of memory.", __FUNCTION__);
24412 +                       return -ENOMEM;
24413 +               }
24414 +               status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc);
24415 +               if (status) {
24416 +                       kfree (ti_manuf_desc);
24417 +                       goto StayInBootMode;
24418 +               }
24419 +
24420 +               // Check for version 2
24421 +               if (!ignore_cpu_rev && TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev) < 2) {
24422 +                       dbg ("%s - Wrong CPU Rev %d (Must be 2)", __FUNCTION__,
24423 +                            TI_GET_CPU_REVISION(ti_manuf_desc->CpuRev_BoardRev));
24424 +                       kfree (ti_manuf_desc);
24425 +                       goto StayInBootMode;
24426 +               }
24427 +
24428 +               kfree (ti_manuf_desc);
24429 +
24430 +               // In order to update the I2C firmware we must change the type 2 record to type 0xF2.
24431 +               // This will force the UMP to come up in Boot Mode.  Then while in boot mode, the driver 
24432 +               // will download the latest firmware (padded to 15.5k) into the UMP ram. 
24433 +               // And finally when the device comes back up in download mode the driver will cause 
24434 +               // the new firmware to be copied from the UMP Ram to I2C and the firmware will update
24435 +               // the record type from 0xf2 to 0x02.
24436 +               
24437 +               /*
24438 +                * Do we really have to copy the whole firmware image,
24439 +                * or could we do this in place!
24440 +                */
24441 +
24442 +               // Allocate a 15.5k buffer + 3 byte header
24443 +               buffer_size = (((1024 * 16) - 512) + sizeof(struct ti_i2c_image_header));
24444 +               buffer = kmalloc (buffer_size, GFP_KERNEL);
24445 +               if (!buffer) {
24446 +                       err ("%s - out of memory", __FUNCTION__);
24447 +                       return -ENOMEM;
24448 +               }
24449 +               
24450 +               // Initialize the buffer to 0xff (pad the buffer)
24451 +               memset (buffer, 0xff, buffer_size);
24452 +
24453 +               memcpy (buffer, &PagableOperationalCodeImage[0], PagableOperationalCodeSize);
24454 +
24455 +               for(i = sizeof(struct ti_i2c_image_header); i < buffer_size; i++) {
24456 +                       cs = (__u8)(cs + buffer[i]);
24457 +               }
24458 +               
24459 +               header = (struct ti_i2c_image_header *)buffer;
24460 +               
24461 +               // update length and checksum after padding
24462 +               header->Length   = (__u16)(buffer_size - sizeof(struct ti_i2c_image_header));
24463 +               header->CheckSum = cs;
24464 +
24465 +               // Download the operational code 
24466 +               dbg ("%s - Downloading operational code image (TI UMP)", __FUNCTION__);
24467 +               status = TIDownloadCodeImage (serial, buffer, buffer_size);
24468 +
24469 +               kfree (buffer);
24470 +
24471 +               if (status) {
24472 +                       dbg ("%s - Error downloading operational code image", __FUNCTION__);
24473 +                       return status;
24474 +               }
24475 +
24476 +               // Device will reboot
24477 +               serial->product_info.TiMode = TI_MODE_TRANSITIONING;
24478 +
24479 +               dbg ("%s - Download successful -- Device rebooting...", __FUNCTION__);
24480 +
24481 +               /* return an error on purpose */
24482 +               return -ENODEV;
24483 +       }
24484 +
24485 +StayInBootMode:
24486 +       // Eprom is invalid or blank stay in boot mode
24487 +       dbg ("%s - <<<<<<<<<<<<<<<STAYING IN BOOT MODE>>>>>>>>>>>>", __FUNCTION__);
24488 +       serial->product_info.TiMode = TI_MODE_BOOT;
24489 +
24490 +       return 0;
24491 +}
24492 +
24493 +
24494 +static int TISetDtr (struct edgeport_port *port)
24495 +{
24496 +       int port_number = port->port->number - port->port->serial->minor;
24497 +
24498 +       dbg ("%s", __FUNCTION__);
24499 +       port->shadow_mcr |= MCR_DTR;
24500 +
24501 +       return TIWriteCommandSync (port->port->serial->dev,
24502 +                               UMPC_SET_CLR_DTR,
24503 +                               (__u8)(UMPM_UART1_PORT + port_number),
24504 +                               1,      /* set */
24505 +                               NULL,
24506 +                               0);
24507 +}
24508 +
24509 +static int TIClearDtr (struct edgeport_port *port)
24510 +{
24511 +       int port_number = port->port->number - port->port->serial->minor;
24512 +
24513 +       dbg ("%s", __FUNCTION__);
24514 +       port->shadow_mcr &= ~MCR_DTR;
24515 +
24516 +       return TIWriteCommandSync (port->port->serial->dev,
24517 +                               UMPC_SET_CLR_DTR,
24518 +                               (__u8)(UMPM_UART1_PORT + port_number),
24519 +                               0,      /* clear */
24520 +                               NULL,
24521 +                               0);
24522 +}
24523 +
24524 +static int TISetRts (struct edgeport_port *port)
24525 +{
24526 +       int port_number = port->port->number - port->port->serial->minor;
24527 +
24528 +       dbg ("%s", __FUNCTION__);
24529 +       port->shadow_mcr |= MCR_RTS;
24530 +
24531 +       return TIWriteCommandSync (port->port->serial->dev,
24532 +                               UMPC_SET_CLR_RTS,
24533 +                               (__u8)(UMPM_UART1_PORT + port_number),
24534 +                               1,      /* set */
24535 +                               NULL,
24536 +                               0);
24537 +}
24538 +
24539 +static int TIClearRts (struct edgeport_port *port)
24540 +{
24541 +       int port_number = port->port->number - port->port->serial->minor;
24542 +
24543 +       dbg ("%s", __FUNCTION__);
24544 +       port->shadow_mcr &= ~MCR_RTS;
24545 +
24546 +       return TIWriteCommandSync (port->port->serial->dev,
24547 +                               UMPC_SET_CLR_RTS,
24548 +                               (__u8)(UMPM_UART1_PORT + port_number),
24549 +                               0,      /* clear */
24550 +                               NULL,
24551 +                               0);
24552 +}
24553 +
24554 +static int TISetLoopBack (struct edgeport_port *port)
24555 +{
24556 +       int port_number = port->port->number - port->port->serial->minor;
24557 +
24558 +       dbg ("%s", __FUNCTION__);
24559 +
24560 +       return TIWriteCommandSync (port->port->serial->dev,
24561 +                               UMPC_SET_CLR_LOOPBACK,
24562 +                               (__u8)(UMPM_UART1_PORT + port_number),
24563 +                               1,      /* set */
24564 +                               NULL,
24565 +                               0);
24566 +}
24567 +
24568 +static int TIClearLoopBack (struct edgeport_port *port)
24569 +{
24570 +       int port_number = port->port->number - port->port->serial->minor;
24571 +
24572 +       dbg ("%s", __FUNCTION__);
24573 +
24574 +       return TIWriteCommandSync (port->port->serial->dev,
24575 +                               UMPC_SET_CLR_LOOPBACK,
24576 +                               (__u8)(UMPM_UART1_PORT + port_number),
24577 +                               0,      /* clear */
24578 +                               NULL,
24579 +                               0);
24580 +}
24581 +
24582 +static int TISetBreak (struct edgeport_port *port)
24583 +{
24584 +       int port_number = port->port->number - port->port->serial->minor;
24585 +
24586 +       dbg ("%s", __FUNCTION__);
24587 +
24588 +       return TIWriteCommandSync (port->port->serial->dev,
24589 +                               UMPC_SET_CLR_BREAK,
24590 +                               (__u8)(UMPM_UART1_PORT + port_number),
24591 +                               1,      /* set */
24592 +                               NULL,
24593 +                               0);
24594 +}
24595 +
24596 +static int TIClearBreak (struct edgeport_port *port)
24597 +{
24598 +       int port_number = port->port->number - port->port->serial->minor;
24599 +
24600 +       dbg ("%s", __FUNCTION__);
24601 +
24602 +       return TIWriteCommandSync (port->port->serial->dev,
24603 +                               UMPC_SET_CLR_BREAK,
24604 +                               (__u8)(UMPM_UART1_PORT + port_number),
24605 +                               0,      /* clear */
24606 +                               NULL,
24607 +                               0);
24608 +}
24609 +
24610 +static int TIRestoreMCR (struct edgeport_port *port, __u8 mcr)
24611 +{
24612 +       int status = 0;
24613 +
24614 +       dbg ("%s - %x", __FUNCTION__, mcr);
24615 +
24616 +       if (mcr & MCR_DTR)
24617 +               status = TISetDtr (port);
24618 +       else
24619 +               status = TIClearDtr (port);
24620 +
24621 +       if (status)
24622 +               return status;
24623 +
24624 +       if (mcr & MCR_RTS)
24625 +               status = TISetRts (port);
24626 +       else
24627 +               status = TIClearRts (port);
24628 +
24629 +       if (status)
24630 +               return status;
24631 +
24632 +       if (mcr & MCR_LOOPBACK)
24633 +               status = TISetLoopBack (port);
24634 +       else
24635 +               status = TIClearLoopBack (port);
24636 +
24637 +       return status;
24638 +}
24639 +
24640 +
24641 +
24642 +/* Convert TI LSR to standard UART flags */
24643 +static __u8 MapLineStatus (__u8 ti_lsr)
24644 +{
24645 +       __u8 lsr = 0;
24646 +
24647 +#define MAP_FLAG(flagUmp, flagUart)    \
24648 +       if (ti_lsr & flagUmp) lsr |= flagUart;
24649 +
24650 +       MAP_FLAG(UMP_UART_LSR_OV_MASK, LSR_OVER_ERR)    /* overrun */
24651 +       MAP_FLAG(UMP_UART_LSR_PE_MASK, LSR_PAR_ERR)     /* parity error */
24652 +       MAP_FLAG(UMP_UART_LSR_FE_MASK, LSR_FRM_ERR)     /* framing error */
24653 +       MAP_FLAG(UMP_UART_LSR_BR_MASK, LSR_BREAK)       /* break detected */
24654 +       MAP_FLAG(UMP_UART_LSR_RX_MASK, LSR_RX_AVAIL)    /* receive data available */
24655 +       MAP_FLAG(UMP_UART_LSR_TX_MASK, LSR_TX_EMPTY)    /* transmit holding register empty */
24656 +
24657 +#undef MAP_FLAG
24658 +
24659 +       return lsr;
24660 +}
24661 +
24662 +static void handle_new_msr (struct edgeport_port *edge_port, __u8 msr)
24663 +{
24664 +       struct async_icount *icount;
24665 +
24666 +       dbg ("%s - %02x", __FUNCTION__, msr);
24667 +
24668 +       if (msr & (MSR_DELTA_CTS | MSR_DELTA_DSR | MSR_DELTA_RI | MSR_DELTA_CD)) {
24669 +               icount = &edge_port->icount;
24670 +
24671 +               /* update input line counters */
24672 +               if (msr & MSR_DELTA_CTS)
24673 +                       icount->cts++;
24674 +               if (msr & MSR_DELTA_DSR)
24675 +                       icount->dsr++;
24676 +               if (msr & MSR_DELTA_CD)
24677 +                       icount->dcd++;
24678 +               if (msr & MSR_DELTA_RI)
24679 +                       icount->rng++;
24680 +               wake_up_interruptible (&edge_port->delta_msr_wait);
24681 +       }
24682 +
24683 +       /* Save the new modem status */
24684 +       edge_port->shadow_msr = msr & 0xf0;
24685 +
24686 +       return;
24687 +}
24688 +
24689 +static void handle_new_lsr (struct edgeport_port *edge_port, int lsr_data, __u8 lsr, __u8 data)
24690 +{
24691 +       struct async_icount *icount;
24692 +       __u8 new_lsr = (__u8)(lsr & (__u8)(LSR_OVER_ERR | LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK));
24693 +
24694 +       dbg ("%s - %02x", __FUNCTION__, new_lsr);
24695 +
24696 +       edge_port->shadow_lsr = lsr;
24697 +
24698 +       if (new_lsr & LSR_BREAK) {
24699 +               /*
24700 +                * Parity and Framing errors only count if they
24701 +                * occur exclusive of a break being received.
24702 +                */
24703 +               new_lsr &= (__u8)(LSR_OVER_ERR | LSR_BREAK);
24704 +       }
24705 +
24706 +       /* Place LSR data byte into Rx buffer */
24707 +       if (lsr_data && edge_port->port->tty) {
24708 +               tty_insert_flip_char(edge_port->port->tty, data, 0);
24709 +               tty_flip_buffer_push(edge_port->port->tty);
24710 +       }
24711 +
24712 +       /* update input line counters */
24713 +       icount = &edge_port->icount;
24714 +       if (new_lsr & LSR_BREAK)
24715 +               icount->brk++;
24716 +       if (new_lsr & LSR_OVER_ERR)
24717 +               icount->overrun++;
24718 +       if (new_lsr & LSR_PAR_ERR)
24719 +               icount->parity++;
24720 +       if (new_lsr & LSR_FRM_ERR)
24721 +               icount->frame++;
24722 +}
24723 +
24724 +
24725 +static void edge_interrupt_callback (struct urb *urb)
24726 +{
24727 +       struct edgeport_serial  *edge_serial = (struct edgeport_serial *)urb->context;
24728 +       struct usb_serial_port *port;
24729 +       struct edgeport_port *edge_port;
24730 +       unsigned char *data = urb->transfer_buffer;
24731 +       int length = urb->actual_length;
24732 +       int port_number;
24733 +       int function;
24734 +       __u8 lsr;
24735 +       __u8 msr;
24736 +
24737 +       dbg("%s", __FUNCTION__);
24738 +
24739 +       if (serial_paranoia_check (edge_serial->serial, __FUNCTION__)) {
24740 +               return;
24741 +       }
24742 +
24743 +       if (urb->status) {
24744 +               dbg("%s - nonzero control read status received: %d", __FUNCTION__, urb->status);
24745 +               return;
24746 +       }
24747 +
24748 +       if (!length) {
24749 +               dbg ("%s - no data in urb", __FUNCTION__);
24750 +               return;
24751 +       }
24752 +               
24753 +       usb_serial_debug_data (__FILE__, __FUNCTION__, length, data);
24754 +               
24755 +       if (length != 2) {
24756 +               dbg ("%s - expecting packet of size 2, got %d", __FUNCTION__, length);
24757 +               return;
24758 +       }
24759 +
24760 +       port_number = TIUMP_GET_PORT_FROM_CODE (data[0]);
24761 +       function    = TIUMP_GET_FUNC_FROM_CODE (data[0]);
24762 +       dbg ("%s - port_number %d, function %d, info 0x%x",
24763 +            __FUNCTION__, port_number, function, data[1]);
24764 +       port = &edge_serial->serial->port[port_number];
24765 +       if (port_paranoia_check (port, __FUNCTION__)) {
24766 +               dbg ("%s - change found for port that is not present",
24767 +                    __FUNCTION__);
24768 +               return;
24769 +       }
24770 +       edge_port = port->private;
24771 +       if (!edge_port) {
24772 +               dbg ("%s - edge_port not found", __FUNCTION__);
24773 +               return;
24774 +       }
24775 +       switch (function) {
24776 +       case TIUMP_INTERRUPT_CODE_LSR:
24777 +               lsr = MapLineStatus(data[1]);
24778 +               if (lsr & UMP_UART_LSR_DATA_MASK) {
24779 +                       /* Save the LSR event for bulk read completion routine */
24780 +                       dbg ("%s - LSR Event Port %u LSR Status = %02x",
24781 +                            __FUNCTION__, port_number, lsr);
24782 +                       edge_port->lsr_event = 1;
24783 +                       edge_port->lsr_mask = lsr;
24784 +               } else {
24785 +                       dbg ("%s - ===== Port %d LSR Status = %02x ======",
24786 +                            __FUNCTION__, port_number, lsr);
24787 +                       handle_new_lsr (edge_port, 0, lsr, 0);
24788 +               }
24789 +               break;
24790 +
24791 +       case TIUMP_INTERRUPT_CODE_MSR:  // MSR
24792 +               /* Copy MSR from UMP */
24793 +               msr = data[1];
24794 +               dbg ("%s - ===== Port %u MSR Status = %02x ======\n",
24795 +                    __FUNCTION__, port_number, msr);
24796 +               handle_new_msr (edge_port, msr);
24797 +               break;
24798 +
24799 +       default:
24800 +               err ("%s - Unknown Interrupt code from UMP %x\n",
24801 +                    __FUNCTION__, data[1]);
24802 +               break;
24803 +               
24804 +       }
24805 +}
24806 +
24807 +static void edge_bulk_in_callback (struct urb *urb)
24808 +{
24809 +       struct edgeport_port *edge_port = (struct edgeport_port *)urb->context;
24810 +       unsigned char *data = urb->transfer_buffer;
24811 +       struct tty_struct *tty;
24812 +       int status;
24813 +       int i;
24814 +       int port_number;
24815 +
24816 +       dbg("%s", __FUNCTION__);
24817 +
24818 +       if (port_paranoia_check (edge_port->port, __FUNCTION__))
24819 +               return;
24820 +
24821 +       if (urb->status) {
24822 +               dbg ("%s - nonzero read bulk status received: %d",
24823 +                    __FUNCTION__, urb->status);
24824 +
24825 +               if (urb->status == -EPIPE) {
24826 +                       /* clear any problem that might have happened on this pipe */
24827 +                       usb_clear_halt (edge_port->port->serial->dev, urb->pipe);
24828 +                       goto exit;
24829 +               }
24830 +               return;
24831 +       }
24832 +
24833 +       port_number = edge_port->port->number - edge_port->port->serial->minor;
24834 +
24835 +       if (edge_port->lsr_event) {
24836 +               edge_port->lsr_event = 0;
24837 +               dbg ("%s ===== Port %u LSR Status = %02x, Data = %02x ======",
24838 +                    __FUNCTION__, port_number, edge_port->lsr_mask, *data);
24839 +               handle_new_lsr (edge_port, 1, edge_port->lsr_mask, *data);
24840 +               /* Adjust buffer length/pointer */
24841 +               --urb->actual_length;
24842 +               ++data;
24843 +       }
24844 +
24845 +       tty = edge_port->port->tty;
24846 +       if (tty && urb->actual_length) {
24847 +               usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
24848 +
24849 +               if (edge_port->close_pending) {
24850 +                       dbg ("%s - close is pending, dropping data on the floor.", __FUNCTION__);
24851 +               } else {
24852 +                       for (i = 0; i < urb->actual_length ; ++i) {
24853 +                               /* if we insert more than TTY_FLIPBUF_SIZE characters,
24854 +                                * we drop them. */
24855 +                               if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
24856 +                                       tty_flip_buffer_push(tty);
24857 +                               }
24858 +                               /* this doesn't actually push the data through unless
24859 +                                * tty->low_latency is set */
24860 +                               tty_insert_flip_char(tty, data[i], 0);
24861 +                       }
24862 +                       tty_flip_buffer_push(tty);
24863 +               }
24864 +               edge_port->icount.rx += urb->actual_length;
24865 +       }
24866 +
24867 +exit:
24868 +       /* continue always trying to read */
24869 +       urb->dev = edge_port->port->serial->dev;
24870 +       status = usb_submit_urb (urb);
24871 +       if (status)
24872 +               err ("%s - usb_submit_urb failed with result %d",
24873 +                    __FUNCTION__, status);
24874 +}
24875 +
24876 +static void edge_bulk_out_callback (struct urb *urb)
24877 +{
24878 +       struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
24879 +       struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
24880 +       struct tty_struct *tty;
24881 +
24882 +       dbg ("%s - port %d", __FUNCTION__, port->number);
24883 +
24884 +       if (!serial) {
24885 +               dbg ("%s - bad serial pointer, exiting", __FUNCTION__);
24886 +               return;
24887 +       }
24888 +
24889 +       if (urb->status) {
24890 +               dbg ("%s - nonzero write bulk status received: %d",
24891 +                    __FUNCTION__, urb->status);
24892 +
24893 +               if (urb->status == -EPIPE) {
24894 +                       /* clear any problem that might have happened on this pipe */
24895 +                       usb_clear_halt (serial->dev, urb->pipe);
24896 +               }
24897 +               return;
24898 +       }
24899 +
24900 +       tty = port->tty;
24901 +       if (tty) {
24902 +               /* let the tty driver wakeup if it has a special write_wakeup function */
24903 +               if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
24904 +                       (tty->ldisc.write_wakeup)(tty);
24905 +               }
24906 +
24907 +               /* tell the tty driver that something has changed */
24908 +               wake_up_interruptible(&tty->write_wait);
24909 +       }
24910 +}
24911 +
24912 +static int edge_open (struct usb_serial_port *port, struct file * filp)
24913 +{
24914 +       struct edgeport_port *edge_port = (struct edgeport_port *)port->private;
24915 +       struct edgeport_serial *edge_serial;
24916 +       struct usb_device *dev;
24917 +       struct urb *urb;
24918 +       int port_number;
24919 +       int status;
24920 +       u16 open_settings;
24921 +       u8 transaction_timeout;
24922 +
24923 +       if (port_paranoia_check (port, __FUNCTION__))
24924 +               return -ENODEV;
24925 +       
24926 +       dbg("%s - port %d", __FUNCTION__, port->number);
24927 +
24928 +       if (edge_port == NULL)
24929 +               return -ENODEV;
24930 +
24931 +       /* force low_latency on so that our tty_push actually forces the data through, 
24932 +          otherwise it is scheduled, and with high data rates (like with OHCI) data
24933 +          can get lost. */
24934 +       if (port->tty)
24935 +               port->tty->low_latency = 1;
24936 +
24937 +       port_number = port->number - port->serial->minor;
24938 +       switch (port_number) {
24939 +               case 0:
24940 +                       edge_port->uart_base = UMPMEM_BASE_UART1;
24941 +                       edge_port->dma_address = UMPD_OEDB1_ADDRESS;
24942 +                       break;
24943 +               case 1:
24944 +                       edge_port->uart_base = UMPMEM_BASE_UART2;
24945 +                       edge_port->dma_address = UMPD_OEDB2_ADDRESS;
24946 +                       break;
24947 +               default:
24948 +                       err ("Unknown port number!!!");
24949 +                       return -ENODEV;
24950 +       }
24951 +
24952 +       dbg ("%s - port_number = %d, uart_base = %04x, dma_address = %04x",
24953 +            __FUNCTION__, port_number, edge_port->uart_base, edge_port->dma_address);
24954 +
24955 +       dev = port->serial->dev;
24956 +
24957 +       memset (&(edge_port->icount), 0x00, sizeof(edge_port->icount));
24958 +       init_waitqueue_head (&edge_port->delta_msr_wait);
24959 +
24960 +       /* turn off loopback */
24961 +       status = TIClearLoopBack (edge_port);
24962 +       if (status)
24963 +               return status;
24964 +       
24965 +       /* set up the port settings */
24966 +       edge_set_termios (port, NULL);
24967 +
24968 +       /* open up the port */
24969 +
24970 +       /* milliseconds to timeout for DMA transfer */
24971 +       transaction_timeout = 2;
24972 +
24973 +       edge_port->ump_read_timeout = max (20, ((transaction_timeout * 3) / 2) );
24974 +
24975 +       // milliseconds to timeout for DMA transfer
24976 +       open_settings = (u8)(UMP_DMA_MODE_CONTINOUS | 
24977 +                            UMP_PIPE_TRANS_TIMEOUT_ENA | 
24978 +                            (transaction_timeout << 2));
24979 +
24980 +       dbg ("%s - Sending UMPC_OPEN_PORT", __FUNCTION__);
24981 +
24982 +       /* Tell TI to open and start the port */
24983 +       status = TIWriteCommandSync (dev,
24984 +                                       UMPC_OPEN_PORT,
24985 +                                       (u8)(UMPM_UART1_PORT + port_number),
24986 +                                       open_settings,
24987 +                                       NULL,
24988 +                                       0);
24989 +       if (status)
24990 +               return status;
24991 +
24992 +       /* Start the DMA? */
24993 +       status = TIWriteCommandSync (dev,
24994 +                                       UMPC_START_PORT,
24995 +                                       (u8)(UMPM_UART1_PORT + port_number),
24996 +                                       0,
24997 +                                       NULL,
24998 +                                       0);
24999 +       if (status)
25000 +               return status;
25001 +
25002 +       /* Clear TX and RX buffers in UMP */
25003 +       status = TIPurgeDataSync (port, UMP_PORT_DIR_OUT | UMP_PORT_DIR_IN);
25004 +       if (status)
25005 +               return status;
25006 +
25007 +       /* Read Initial MSR */
25008 +       status = TIReadVendorRequestSync (dev,
25009 +                                       UMPC_READ_MSR,  // Request
25010 +                                       0,              // wValue
25011 +                                       (__u16)(UMPM_UART1_PORT + port_number), // wIndex (Address)
25012 +                                       &edge_port->shadow_msr,                 // TransferBuffer
25013 +                                       1);                                     // TransferBufferLength
25014 +       if (status)
25015 +               return status;
25016 +
25017 +       dbg ("ShadowMSR 0x%X", edge_port->shadow_msr);
25018
25019 +       edge_serial = edge_port->edge_serial;
25020 +       if (edge_serial->num_ports_open == 0) {
25021 +               dbg ("%s - setting up bulk in urb", __FUNCTION__);
25022 +               /* we are the first port to be opened, let's post the interrupt urb */
25023 +               urb = edge_serial->serial->port[0].interrupt_in_urb;
25024 +               if (!urb) {
25025 +                       err ("%s - no interrupt urb present, exiting", __FUNCTION__);
25026 +                       return -EINVAL;
25027 +               }
25028 +               urb->complete = edge_interrupt_callback;
25029 +               urb->context = edge_serial;
25030 +               urb->dev = dev;
25031 +               status = usb_submit_urb (urb);
25032 +               if (status) {
25033 +                       err ("%s - usb_submit_urb failed with value %d", __FUNCTION__, status);
25034 +                       return status;
25035 +               }
25036 +       }
25037 +
25038 +       /*
25039 +        * reset the data toggle on the bulk endpoints to work around bug in
25040 +        * host controllers where things get out of sync some times
25041 +        */
25042 +       usb_clear_halt (dev, port->write_urb->pipe);
25043 +       usb_clear_halt (dev, port->read_urb->pipe);
25044 +
25045 +       /* start up our bulk read urb */
25046 +       urb = port->read_urb;
25047 +       if (!urb) {
25048 +               err ("%s - no read urb present, exiting", __FUNCTION__);
25049 +               return -EINVAL;
25050 +       }
25051 +       urb->complete = edge_bulk_in_callback;
25052 +       urb->context = edge_port;
25053 +       urb->dev = dev;
25054 +       status = usb_submit_urb (urb);
25055 +       if (status) {
25056 +               err ("%s - read bulk usb_submit_urb failed with value %d", __FUNCTION__, status);
25057 +               return status;
25058 +       }
25059 +
25060 +       ++edge_serial->num_ports_open;
25061 +
25062 +       dbg("%s - exited", __FUNCTION__);
25063 +
25064 +       return 0;
25065 +}
25066 +
25067 +static void edge_close (struct usb_serial_port *port, struct file * filp)
25068 +{
25069 +       struct usb_serial *serial;
25070 +       struct edgeport_serial *edge_serial;
25071 +       struct edgeport_port *edge_port;
25072 +       int port_number;
25073 +       int status;
25074 +
25075 +       if (port_paranoia_check (port, __FUNCTION__))
25076 +               return;
25077 +       
25078 +       dbg("%s - port %d", __FUNCTION__, port->number);
25079 +                        
25080 +       serial = get_usb_serial (port, __FUNCTION__);
25081 +       if (!serial)
25082 +               return;
25083 +       
25084 +       edge_serial = (struct edgeport_serial *)serial->private;
25085 +       edge_port = (struct edgeport_port *)port->private;
25086 +       if ((edge_serial == NULL) || (edge_port == NULL))
25087 +               return;
25088 +       
25089 +       if (serial->dev) {
25090 +               /* The bulkreadcompletion routine will check 
25091 +                * this flag and dump add read data */
25092 +               edge_port->close_pending = 1;
25093 +
25094 +               /* chase the port close */
25095 +               TIChasePort (edge_port);
25096 +
25097 +               usb_unlink_urb (port->read_urb);
25098 +
25099 +               /* assuming we can still talk to the device,
25100 +                * send a close port command to it */
25101 +               dbg("%s - send umpc_close_port", __FUNCTION__);
25102 +               port_number = port->number - port->serial->minor;
25103 +               status = TIWriteCommandSync (port->serial->dev,
25104 +                                            UMPC_CLOSE_PORT,
25105 +                                            (__u8)(UMPM_UART1_PORT + port_number),
25106 +                                            0,
25107 +                                            NULL,
25108 +                                            0);
25109 +               --edge_port->edge_serial->num_ports_open;
25110 +               if (edge_port->edge_serial->num_ports_open <= 0) {
25111 +                       /* last port is now closed, let's shut down our interrupt urb */
25112 +                       usb_unlink_urb (serial->port[0].interrupt_in_urb);
25113 +                       edge_port->edge_serial->num_ports_open = 0;
25114 +               }
25115 +       edge_port->close_pending = 0;
25116 +       }
25117 +
25118 +       dbg("%s - exited", __FUNCTION__);
25119 +}
25120 +
25121 +static int edge_write (struct usb_serial_port *port, int from_user, const unsigned char *data, int count)
25122 +{
25123 +       struct usb_serial *serial = port->serial;
25124 +       struct edgeport_port *edge_port = port->private;
25125 +       int result;
25126 +
25127 +       dbg("%s - port %d", __FUNCTION__, port->number);
25128 +
25129 +       if (count == 0) {
25130 +               dbg("%s - write request of 0 bytes", __FUNCTION__);
25131 +               return 0;
25132 +       }
25133 +
25134 +       if (edge_port == NULL)
25135 +               return -ENODEV;
25136 +       if (edge_port->close_pending == 1)
25137 +               return -ENODEV;
25138 +       
25139 +       if (port->write_urb->status == -EINPROGRESS) {
25140 +               dbg ("%s - already writing", __FUNCTION__);
25141 +               return 0;
25142 +       }
25143 +
25144 +       count = min (count, port->bulk_out_size);
25145 +
25146 +       if (from_user) {
25147 +               if (copy_from_user(port->write_urb->transfer_buffer, data, count))
25148 +                       return -EFAULT;
25149 +       } else {
25150 +               memcpy (port->write_urb->transfer_buffer, data, count);
25151 +       }
25152 +
25153 +       usb_serial_debug_data (__FILE__, __FUNCTION__, count, port->write_urb->transfer_buffer);
25154 +
25155 +       /* set up our urb */
25156 +       usb_fill_bulk_urb (port->write_urb, serial->dev,
25157 +                          usb_sndbulkpipe (serial->dev,
25158 +                                           port->bulk_out_endpointAddress),
25159 +                          port->write_urb->transfer_buffer, count,
25160 +                          edge_bulk_out_callback,
25161 +                          port);
25162 +
25163 +       /* send the data out the bulk port */
25164 +       result = usb_submit_urb(port->write_urb);
25165 +       if (result)
25166 +               err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
25167 +       else
25168 +               result = count;
25169 +
25170 +       if (result > 0)
25171 +               edge_port->icount.tx += count;
25172 +
25173 +       return result;
25174 +}
25175 +
25176 +static int edge_write_room (struct usb_serial_port *port)
25177 +{
25178 +       struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
25179 +       int room = 0;
25180 +
25181 +       dbg("%s", __FUNCTION__);
25182 +
25183 +       if (edge_port == NULL)
25184 +               return -ENODEV;
25185 +       if (edge_port->close_pending == 1)
25186 +               return -ENODEV;
25187 +       
25188 +       dbg("%s - port %d", __FUNCTION__, port->number);
25189 +
25190 +       if (port->write_urb->status != -EINPROGRESS)
25191 +               room = port->bulk_out_size;
25192 +
25193 +       dbg("%s - returns %d", __FUNCTION__, room);
25194 +       return room;
25195 +}
25196 +
25197 +static int edge_chars_in_buffer (struct usb_serial_port *port)
25198 +{
25199 +       struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
25200 +       int chars = 0;
25201 +
25202 +       dbg("%s", __FUNCTION__);
25203 +
25204 +       if (edge_port == NULL)
25205 +               return -ENODEV;
25206 +       if (edge_port->close_pending == 1)
25207 +               return -ENODEV;
25208 +
25209 +       dbg("%s - port %d", __FUNCTION__, port->number);
25210 +
25211 +       if (port->write_urb->status == -EINPROGRESS)
25212 +               chars = port->write_urb->transfer_buffer_length;
25213 +
25214 +       dbg ("%s - returns %d", __FUNCTION__, chars);
25215 +       return chars;
25216 +}
25217 +
25218 +static void edge_throttle (struct usb_serial_port *port)
25219 +{
25220 +       struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
25221 +       struct tty_struct *tty;
25222 +       int status;
25223 +
25224 +       dbg("%s - port %d", __FUNCTION__, port->number);
25225 +
25226 +       if (edge_port == NULL)
25227 +               return;
25228 +
25229 +       tty = port->tty;
25230 +       if (!tty) {
25231 +               dbg ("%s - no tty available", __FUNCTION__);
25232 +               return;
25233 +       }
25234 +       /* if we are implementing XON/XOFF, send the stop character */
25235 +       if (I_IXOFF(tty)) {
25236 +               unsigned char stop_char = STOP_CHAR(tty);
25237 +               status = edge_write (port, 0, &stop_char, 1);
25238 +               if (status <= 0) {
25239 +                       return;
25240 +               }
25241 +       }
25242 +
25243 +       /* if we are implementing RTS/CTS, toggle that line */
25244 +       if (tty->termios->c_cflag & CRTSCTS) {
25245 +               status = TIClearRts (edge_port);
25246 +       }
25247 +
25248 +       usb_unlink_urb (port->read_urb);
25249 +}
25250 +
25251 +static void edge_unthrottle (struct usb_serial_port *port)
25252 +{
25253 +       struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
25254 +       struct tty_struct *tty;
25255 +       int status;
25256 +
25257 +       dbg("%s - port %d", __FUNCTION__, port->number);
25258 +
25259 +       if (edge_port == NULL)
25260 +               return;
25261 +
25262 +       tty = port->tty;
25263 +       if (!tty) {
25264 +               dbg ("%s - no tty available", __FUNCTION__);
25265 +               return;
25266 +       }
25267 +
25268 +       /* if we are implementing XON/XOFF, send the start character */
25269 +       if (I_IXOFF(tty)) {
25270 +               unsigned char start_char = START_CHAR(tty);
25271 +               status = edge_write (port, 0, &start_char, 1);
25272 +               if (status <= 0) {
25273 +                       return;
25274 +               }
25275 +       }
25276 +
25277 +       /* if we are implementing RTS/CTS, toggle that line */
25278 +       if (tty->termios->c_cflag & CRTSCTS) {
25279 +               status = TISetRts (edge_port);
25280 +       }
25281 +
25282 +       port->read_urb->dev = port->serial->dev;
25283 +       status = usb_submit_urb (port->read_urb);
25284 +       if (status) {
25285 +               err ("%s - usb_submit_urb failed with value %d", __FUNCTION__, status);
25286 +       }
25287 +}
25288 +
25289 +
25290 +static void change_port_settings (struct edgeport_port *edge_port, struct termios *old_termios)
25291 +{
25292 +       struct ump_uart_config *config;
25293 +       struct tty_struct *tty;
25294 +       int baud;
25295 +       int round;
25296 +       unsigned cflag;
25297 +       int status;
25298 +       int port_number = edge_port->port->number - edge_port->port->serial->minor;
25299 +
25300 +       dbg("%s - port %d", __FUNCTION__, edge_port->port->number);
25301 +
25302 +       tty = edge_port->port->tty;
25303 +       if ((!tty) ||
25304 +           (!tty->termios)) {
25305 +               dbg("%s - no tty structures", __FUNCTION__);
25306 +               return;
25307 +       }
25308 +
25309 +       config = kmalloc (sizeof (*config), GFP_KERNEL);
25310 +       if (!config) {
25311 +               err ("%s - out of memory", __FUNCTION__);
25312 +               return;
25313 +       }
25314 +
25315 +       cflag = tty->termios->c_cflag;
25316 +
25317 +       config->wFlags = 0;
25318 +
25319 +       /* These flags must be set */
25320 +       config->wFlags |= UMP_MASK_UART_FLAGS_RECEIVE_MS_INT;
25321 +       config->wFlags |= UMP_MASK_UART_FLAGS_AUTO_START_ON_ERR;
25322 +       config->bUartMode = 0;
25323 +
25324 +       switch (cflag & CSIZE) {
25325 +               case CS5:
25326 +                           config->bDataBits = UMP_UART_CHAR5BITS;
25327 +                           dbg ("%s - data bits = 5", __FUNCTION__);
25328 +                           break;
25329 +               case CS6:
25330 +                           config->bDataBits = UMP_UART_CHAR6BITS;
25331 +                           dbg ("%s - data bits = 6", __FUNCTION__);
25332 +                           break;
25333 +               case CS7:
25334 +                           config->bDataBits = UMP_UART_CHAR7BITS;
25335 +                           dbg ("%s - data bits = 7", __FUNCTION__);
25336 +                           break;
25337 +               default:
25338 +               case CS8:
25339 +                           config->bDataBits = UMP_UART_CHAR8BITS;
25340 +                           dbg ("%s - data bits = 8", __FUNCTION__);
25341 +                           break;
25342 +       }
25343 +
25344 +       if (cflag & PARENB) {
25345 +               if (cflag & PARODD) {
25346 +                       config->wFlags |= UMP_MASK_UART_FLAGS_PARITY;
25347 +                       config->bParity = UMP_UART_ODDPARITY;
25348 +                       dbg("%s - parity = odd", __FUNCTION__);
25349 +               } else {
25350 +                       config->wFlags |= UMP_MASK_UART_FLAGS_PARITY;
25351 +                       config->bParity = UMP_UART_EVENPARITY;
25352 +                       dbg("%s - parity = even", __FUNCTION__);
25353 +               }
25354 +       } else {
25355 +               config->bParity = UMP_UART_NOPARITY;    
25356 +               dbg("%s - parity = none", __FUNCTION__);
25357 +       }
25358 +
25359 +       if (cflag & CSTOPB) {
25360 +               config->bStopBits = UMP_UART_STOPBIT2;
25361 +               dbg("%s - stop bits = 2", __FUNCTION__);
25362 +       } else {
25363 +               config->bStopBits = UMP_UART_STOPBIT1;
25364 +               dbg("%s - stop bits = 1", __FUNCTION__);
25365 +       }
25366 +
25367 +       /* figure out the flow control settings */
25368 +       if (cflag & CRTSCTS) {
25369 +               config->wFlags |= UMP_MASK_UART_FLAGS_OUT_X_CTS_FLOW;
25370 +               config->wFlags |= UMP_MASK_UART_FLAGS_RTS_FLOW;
25371 +               dbg("%s - RTS/CTS is enabled", __FUNCTION__);
25372 +       } else {
25373 +               dbg("%s - RTS/CTS is disabled", __FUNCTION__);
25374 +       }
25375 +
25376 +       /* if we are implementing XON/XOFF, set the start and stop character in the device */
25377 +       if (I_IXOFF(tty) || I_IXON(tty)) {
25378 +               config->cXon  = START_CHAR(tty);
25379 +               config->cXoff = STOP_CHAR(tty);
25380 +
25381 +               /* if we are implementing INBOUND XON/XOFF */
25382 +               if (I_IXOFF(tty)) {
25383 +                       config->wFlags |= UMP_MASK_UART_FLAGS_IN_X;
25384 +                       dbg ("%s - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x",
25385 +                            __FUNCTION__, config->cXon, config->cXoff);
25386 +               } else {
25387 +                       dbg ("%s - INBOUND XON/XOFF is disabled", __FUNCTION__);
25388 +               }
25389 +
25390 +               /* if we are implementing OUTBOUND XON/XOFF */
25391 +               if (I_IXON(tty)) {
25392 +                       config->wFlags |= UMP_MASK_UART_FLAGS_OUT_X;
25393 +                       dbg ("%s - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x",
25394 +                            __FUNCTION__, config->cXon, config->cXoff);
25395 +               } else {
25396 +                       dbg ("%s - OUTBOUND XON/XOFF is disabled", __FUNCTION__);
25397 +               }
25398 +       }
25399 +
25400 +       /* Round the baud rate */
25401 +       baud = tty_get_baud_rate(tty);
25402 +       if (!baud) {
25403 +               /* pick a default, any default... */
25404 +               baud = 9600;
25405 +       }
25406 +       config->wBaudRate = (__u16)(461550L / baud);
25407 +       round = 4615500L / baud;
25408 +       if ((round - (config->wBaudRate * 10)) >= 5)
25409 +               config->wBaudRate++;
25410 +
25411 +       dbg ("%s - baud rate = %d, wBaudRate = %d", __FUNCTION__, baud, config->wBaudRate);
25412 +
25413 +       dbg ("wBaudRate:   %d", (int)(461550L / config->wBaudRate));
25414 +       dbg ("wFlags:    0x%x", config->wFlags);
25415 +       dbg ("bDataBits:   %d", config->bDataBits);
25416 +       dbg ("bParity:     %d", config->bParity);
25417 +       dbg ("bStopBits:   %d", config->bStopBits);
25418 +       dbg ("cXon:        %d", config->cXon);
25419 +       dbg ("cXoff:       %d", config->cXoff);
25420 +       dbg ("bUartMode:   %d", config->bUartMode);
25421 +
25422 +       /* move the word values into big endian mode */
25423 +       cpu_to_be16s (&config->wFlags);
25424 +       cpu_to_be16s (&config->wBaudRate);
25425 +
25426 +       status = TIWriteCommandSync (edge_port->port->serial->dev,
25427 +                               UMPC_SET_CONFIG,
25428 +                               (__u8)(UMPM_UART1_PORT + port_number),
25429 +                               0,
25430 +                               (__u8 *)config,
25431 +                               sizeof(*config));
25432 +       if (status) {
25433 +               dbg ("%s - error %d when trying to write config to device",
25434 +                    __FUNCTION__, status);
25435 +       }
25436 +
25437 +       kfree (config);
25438 +       
25439 +       return;
25440 +}
25441 +
25442 +static void edge_set_termios (struct usb_serial_port *port, struct termios *old_termios)
25443 +{
25444 +       struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
25445 +       struct tty_struct *tty = port->tty;
25446 +       unsigned int cflag;
25447 +
25448 +       if (!port->tty || !port->tty->termios) {
25449 +               dbg ("%s - no tty or termios", __FUNCTION__);
25450 +               return;
25451 +       }
25452 +
25453 +       cflag = tty->termios->c_cflag;
25454 +       /* check that they really want us to change something */
25455 +       if (old_termios) {
25456 +               if ((cflag == old_termios->c_cflag) &&
25457 +                   (RELEVANT_IFLAG(tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
25458 +                       dbg ("%s - nothing to change", __FUNCTION__);
25459 +                       return;
25460 +               }
25461 +       }
25462 +
25463 +       dbg("%s - clfag %08x iflag %08x", __FUNCTION__, 
25464 +           tty->termios->c_cflag,
25465 +           RELEVANT_IFLAG(tty->termios->c_iflag));
25466 +       if (old_termios) {
25467 +               dbg("%s - old clfag %08x old iflag %08x", __FUNCTION__,
25468 +                   old_termios->c_cflag,
25469 +                   RELEVANT_IFLAG(old_termios->c_iflag));
25470 +       }
25471 +
25472 +       dbg("%s - port %d", __FUNCTION__, port->number);
25473 +
25474 +       if (edge_port == NULL)
25475 +               return;
25476 +
25477 +       /* change the port settings to the new ones specified */
25478 +       change_port_settings (edge_port, old_termios);
25479 +
25480 +       return;
25481 +}
25482 +
25483 +static int set_modem_info (struct edgeport_port *edge_port, unsigned int cmd, unsigned int *value)
25484 +{
25485 +       unsigned int mcr = edge_port->shadow_mcr;
25486 +       unsigned int arg;
25487 +
25488 +       if (copy_from_user(&arg, value, sizeof(int)))
25489 +               return -EFAULT;
25490 +
25491 +       switch (cmd) {
25492 +               case TIOCMBIS:
25493 +                       if (arg & TIOCM_RTS)
25494 +                               mcr |= MCR_RTS;
25495 +                       if (arg & TIOCM_DTR)
25496 +                               mcr |= MCR_RTS;
25497 +                       if (arg & TIOCM_LOOP)
25498 +                               mcr |= MCR_LOOPBACK;
25499 +                       break;
25500 +
25501 +               case TIOCMBIC:
25502 +                       if (arg & TIOCM_RTS)
25503 +                               mcr &= ~MCR_RTS;
25504 +                       if (arg & TIOCM_DTR)
25505 +                               mcr &= ~MCR_RTS;
25506 +                       if (arg & TIOCM_LOOP)
25507 +                               mcr &= ~MCR_LOOPBACK;
25508 +                       break;
25509 +
25510 +               case TIOCMSET:
25511 +                       /* turn off the RTS and DTR and LOOPBACK 
25512 +                        * and then only turn on what was asked to */
25513 +                       mcr &=  ~(MCR_RTS | MCR_DTR | MCR_LOOPBACK);
25514 +                       mcr |= ((arg & TIOCM_RTS) ? MCR_RTS : 0);
25515 +                       mcr |= ((arg & TIOCM_DTR) ? MCR_DTR : 0);
25516 +                       mcr |= ((arg & TIOCM_LOOP) ? MCR_LOOPBACK : 0);
25517 +                       break;
25518 +       }
25519 +
25520 +       edge_port->shadow_mcr = mcr;
25521 +
25522 +       TIRestoreMCR (edge_port, mcr);
25523 +
25524 +       return 0;
25525 +}
25526 +
25527 +static int get_modem_info (struct edgeport_port *edge_port, unsigned int *value)
25528 +{
25529 +       unsigned int result = 0;
25530 +       unsigned int msr = edge_port->shadow_msr;
25531 +       unsigned int mcr = edge_port->shadow_mcr;
25532 +
25533 +       result = ((mcr & MCR_DTR)       ? TIOCM_DTR: 0)   /* 0x002 */
25534 +                 | ((mcr & MCR_RTS)    ? TIOCM_RTS: 0)   /* 0x004 */
25535 +                 | ((msr & MSR_CTS)    ? TIOCM_CTS: 0)   /* 0x020 */
25536 +                 | ((msr & MSR_CD)     ? TIOCM_CAR: 0)   /* 0x040 */
25537 +                 | ((msr & MSR_RI)     ? TIOCM_RI:  0)   /* 0x080 */
25538 +                 | ((msr & MSR_DSR)    ? TIOCM_DSR: 0);  /* 0x100 */
25539 +
25540 +
25541 +       dbg("%s -- %x", __FUNCTION__, result);
25542 +
25543 +       if (copy_to_user(value, &result, sizeof(int)))
25544 +               return -EFAULT;
25545 +       return 0;
25546 +}
25547 +
25548 +static int get_serial_info (struct edgeport_port *edge_port, struct serial_struct * retinfo)
25549 +{
25550 +       struct serial_struct tmp;
25551 +
25552 +       if (!retinfo)
25553 +               return -EFAULT;
25554 +
25555 +       memset(&tmp, 0, sizeof(tmp));
25556 +
25557 +       tmp.type                = PORT_16550A;
25558 +       tmp.line                = edge_port->port->serial->minor;
25559 +       tmp.port                = edge_port->port->number;
25560 +       tmp.irq                 = 0;
25561 +       tmp.flags               = ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ;
25562 +       tmp.xmit_fifo_size      = edge_port->port->bulk_out_size;
25563 +       tmp.baud_base           = 9600;
25564 +       tmp.close_delay         = 5*HZ;
25565 +       tmp.closing_wait        = 30*HZ;
25566 +//     tmp.custom_divisor      = state->custom_divisor;
25567 +//     tmp.hub6                = state->hub6;
25568 +//     tmp.io_type             = state->io_type;
25569 +
25570 +
25571 +       if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
25572 +               return -EFAULT;
25573 +       return 0;
25574 +}
25575 +
25576 +static int edge_ioctl (struct usb_serial_port *port, struct file *file, unsigned int cmd, unsigned long arg)
25577 +{
25578 +       struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
25579 +       struct async_icount cnow;
25580 +       struct async_icount cprev;
25581 +
25582 +       dbg("%s - port %d, cmd = 0x%x", __FUNCTION__, port->number, cmd);
25583 +
25584 +       switch (cmd) {
25585 +               case TIOCINQ:
25586 +                       dbg("%s - (%d) TIOCINQ", __FUNCTION__, port->number);
25587 +//                     return get_number_bytes_avail(edge_port, (unsigned int *) arg);
25588 +                       break;
25589 +
25590 +               case TIOCSERGETLSR:
25591 +                       dbg("%s - (%d) TIOCSERGETLSR", __FUNCTION__, port->number);
25592 +//                     return get_lsr_info(edge_port, (unsigned int *) arg);
25593 +                       break;
25594 +
25595 +               case TIOCMBIS:
25596 +               case TIOCMBIC:
25597 +               case TIOCMSET:
25598 +                       dbg("%s - (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __FUNCTION__, port->number);
25599 +                       return set_modem_info(edge_port, cmd, (unsigned int *) arg);
25600 +                       break;
25601 +
25602 +               case TIOCMGET:  
25603 +                       dbg("%s - (%d) TIOCMGET", __FUNCTION__, port->number);
25604 +                       return get_modem_info(edge_port, (unsigned int *) arg);
25605 +                       break;
25606 +
25607 +               case TIOCGSERIAL:
25608 +                       dbg("%s - (%d) TIOCGSERIAL", __FUNCTION__, port->number);
25609 +                       return get_serial_info(edge_port, (struct serial_struct *) arg);
25610 +                       break;
25611 +
25612 +               case TIOCSSERIAL:
25613 +                       dbg("%s - (%d) TIOCSSERIAL", __FUNCTION__, port->number);
25614 +                       break;
25615 +
25616 +               case TIOCMIWAIT:
25617 +                       dbg("%s - (%d) TIOCMIWAIT", __FUNCTION__, port->number);
25618 +                       cprev = edge_port->icount;
25619 +                       while (1) {
25620 +                               interruptible_sleep_on(&edge_port->delta_msr_wait);
25621 +                               /* see if a signal did it */
25622 +                               if (signal_pending(current))
25623 +                                       return -ERESTARTSYS;
25624 +                               cnow = edge_port->icount;
25625 +                               if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr &&
25626 +                                   cnow.dcd == cprev.dcd && cnow.cts == cprev.cts)
25627 +                                       return -EIO; /* no change => error */
25628 +                               if (((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) ||
25629 +                                   ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) ||
25630 +                                   ((arg & TIOCM_CD)  && (cnow.dcd != cprev.dcd)) ||
25631 +                                   ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts)) ) {
25632 +                                       return 0;
25633 +                               }
25634 +                               cprev = cnow;
25635 +                       }
25636 +                       /* not reached */
25637 +                       break;
25638 +
25639 +               case TIOCGICOUNT:
25640 +                       dbg ("%s - (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__,
25641 +                            port->number, edge_port->icount.rx, edge_port->icount.tx);
25642 +                       if (copy_to_user((void *)arg, &edge_port->icount, sizeof(edge_port->icount)))
25643 +                               return -EFAULT;
25644 +                       return 0;
25645 +       }
25646 +
25647 +       return -ENOIOCTLCMD;
25648 +}
25649 +
25650 +static void edge_break (struct usb_serial_port *port, int break_state)
25651 +{
25652 +       struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
25653 +       int status;
25654 +
25655 +       dbg ("%s - state = %d", __FUNCTION__, break_state);
25656 +
25657 +       /* chase the port close */
25658 +       TIChasePort (edge_port);
25659 +
25660 +       if (break_state == -1) {
25661 +               status = TISetBreak (edge_port);
25662 +       } else {
25663 +               status = TIClearBreak (edge_port);
25664 +       }
25665 +       if (status) {
25666 +               dbg ("%s - error %d sending break set/clear command.",
25667 +                    __FUNCTION__, status);
25668 +       }
25669 +}
25670 +
25671 +static int edge_startup (struct usb_serial *serial)
25672 +{
25673 +       struct edgeport_serial *edge_serial;
25674 +       struct edgeport_port *edge_port;
25675 +       struct usb_device *dev;
25676 +       int status;
25677 +       int i;
25678 +
25679 +       dev = serial->dev;
25680 +
25681 +       /* create our private serial structure */
25682 +       edge_serial = kmalloc (sizeof(struct edgeport_serial), GFP_KERNEL);
25683 +       if (edge_serial == NULL) {
25684 +               err("%s - Out of memory", __FUNCTION__);
25685 +               return -ENOMEM;
25686 +       }
25687 +       memset (edge_serial, 0, sizeof(struct edgeport_serial));
25688 +       edge_serial->serial = serial;
25689 +       serial->private = edge_serial;
25690 +
25691 +       status = TIDownloadFirmware (edge_serial);
25692 +       if (status) {
25693 +               kfree (edge_serial);
25694 +               return status;
25695 +       }
25696 +
25697 +       /* set up our port private structures */
25698 +       for (i = 0; i < serial->num_ports; ++i) {
25699 +               edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL);
25700 +               if (edge_port == NULL) {
25701 +                       err("%s - Out of memory", __FUNCTION__);
25702 +                       return -ENOMEM;
25703 +               }
25704 +               memset (edge_port, 0, sizeof(struct edgeport_port));
25705 +               edge_port->port = &serial->port[i];
25706 +               edge_port->edge_serial = edge_serial;
25707 +               serial->port[i].private = edge_port;
25708 +       }
25709 +       
25710 +       return 0;
25711 +}
25712 +
25713 +static void edge_shutdown (struct usb_serial *serial)
25714 +{
25715 +       int i;
25716 +
25717 +       dbg ("%s", __FUNCTION__);
25718 +
25719 +       for (i=0; i < serial->num_ports; ++i) {
25720 +               kfree (serial->port[i].private);
25721 +               serial->port[i].private = NULL;
25722 +       }
25723 +       kfree (serial->private);
25724 +       serial->private = NULL;
25725 +}
25726 +
25727 +
25728 +static struct usb_serial_device_type edgeport_1port_device = {
25729 +       owner:                  THIS_MODULE,
25730 +       name:                   "Edgeport TI 1 port adapter",
25731 +       id_table:               edgeport_1port_id_table,
25732 +       num_interrupt_in:       1,
25733 +       num_bulk_in:            1,
25734 +       num_bulk_out:           1,
25735 +       num_ports:              1,
25736 +       open:                   edge_open,
25737 +       close:                  edge_close,
25738 +       throttle:               edge_throttle,
25739 +       unthrottle:             edge_unthrottle,
25740 +       startup:                edge_startup,
25741 +       shutdown:               edge_shutdown,
25742 +       ioctl:                  edge_ioctl,
25743 +       set_termios:            edge_set_termios,
25744 +       write:                  edge_write,
25745 +       write_room:             edge_write_room,
25746 +       chars_in_buffer:        edge_chars_in_buffer,
25747 +       break_ctl:              edge_break,
25748 +};
25749 +
25750 +static struct usb_serial_device_type edgeport_2port_device = {
25751 +       owner:                  THIS_MODULE,
25752 +       name:                   "Edgeport TI 2 port adapter",
25753 +       id_table:               edgeport_2port_id_table,
25754 +       num_interrupt_in:       1,
25755 +       num_bulk_in:            2,
25756 +       num_bulk_out:           2,
25757 +       num_ports:              2,
25758 +       open:                   edge_open,
25759 +       close:                  edge_close,
25760 +       throttle:               edge_throttle,
25761 +       unthrottle:             edge_unthrottle,
25762 +       startup:                edge_startup,
25763 +       shutdown:               edge_shutdown,
25764 +       ioctl:                  edge_ioctl,
25765 +       set_termios:            edge_set_termios,
25766 +       write:                  edge_write,
25767 +       write_room:             edge_write_room,
25768 +       chars_in_buffer:        edge_chars_in_buffer,
25769 +       break_ctl:              edge_break,
25770 +};
25771 +
25772 +
25773 +static int __init edgeport_init(void)
25774 +{
25775 +       usb_serial_register (&edgeport_1port_device);
25776 +       usb_serial_register (&edgeport_2port_device);
25777 +       info(DRIVER_DESC " " DRIVER_VERSION);
25778 +       return 0;
25779 +}
25780 +
25781 +static void __exit edgeport_exit (void)
25782 +{
25783 +       usb_serial_deregister (&edgeport_1port_device);
25784 +       usb_serial_deregister (&edgeport_2port_device);
25785 +}
25786 +
25787 +module_init(edgeport_init);
25788 +module_exit(edgeport_exit);
25789 +
25790 +/* Module information */
25791 +MODULE_AUTHOR(DRIVER_AUTHOR);
25792 +MODULE_DESCRIPTION(DRIVER_DESC);
25793 +MODULE_LICENSE("GPL");
25794 +
25795 +MODULE_PARM(debug, "i");
25796 +MODULE_PARM_DESC(debug, "Debug enabled or not");
25797 +
25798 +MODULE_PARM(ignore_cpu_rev, "i");
25799 +MODULE_PARM_DESC(ignore_cpu_rev, "Ignore the cpu revision when connecting to a device");
25800 +
25801 diff -Nur linux-2.4.19.org/drivers/usb/serial/io_ti.h linux-2.4.19/drivers/usb/serial/io_ti.h
25802 --- linux-2.4.19.org/drivers/usb/serial/io_ti.h Thu Jan  1 01:00:00 1970
25803 +++ linux-2.4.19/drivers/usb/serial/io_ti.h     Thu Oct 31 08:11:24 2002
25804 @@ -0,0 +1,180 @@
25805 +/*****************************************************************************  
25806 + *
25807 + *     Copyright (c) 1997-2002 Inside Out Networks, Inc.
25808 + *
25809 + *     This program is free software; you can redistribute it and/or modify
25810 + *     it under the terms of the GNU General Public License as published by
25811 + *     the Free Software Foundation; either version 2 of the License, or
25812 + *     (at your option) any later version.
25813 + *
25814 + *
25815 + *     Feb-16-2001     DMI     Added I2C structure definitions
25816 + *     May-29-2002     gkh     Ported to Linux
25817 + *
25818 + *
25819 + ******************************************************************************/
25820 +
25821 +#ifndef _IO_TI_H_
25822 +#define _IO_TI_H_
25823 +
25824 +/* Address Space */
25825 +#define DTK_ADDR_SPACE_XDATA           0x03    /* Addr is placed in XDATA space */
25826 +#define DTK_ADDR_SPACE_I2C_TYPE_II     0x82    /* Addr is placed in I2C area */
25827 +#define DTK_ADDR_SPACE_I2C_TYPE_III    0x83    /* Addr is placed in I2C area */
25828 +
25829 +// UART Defines
25830 +#define UMPMEM_BASE_UART1              0xFFA0  /* UMP UART1 base address          */
25831 +#define UMPMEM_BASE_UART2              0xFFB0  /* UMP UART2 base address          */
25832 +#define UMPMEM_OFFS_UART_LSR           0x05    /* UMP UART LSR register offset    */
25833 +
25834 +/* Bits per character */
25835 +#define UMP_UART_CHAR5BITS             0x00
25836 +#define UMP_UART_CHAR6BITS             0x01
25837 +#define UMP_UART_CHAR7BITS             0x02
25838 +#define UMP_UART_CHAR8BITS             0x03
25839 +
25840 +/* Parity */
25841 +#define UMP_UART_NOPARITY              0x00
25842 +#define UMP_UART_ODDPARITY             0x01
25843 +#define UMP_UART_EVENPARITY            0x02
25844 +#define UMP_UART_MARKPARITY            0x03
25845 +#define UMP_UART_SPACEPARITY           0x04
25846 +
25847 +/* Stop bits */
25848 +#define UMP_UART_STOPBIT1              0x00
25849 +#define UMP_UART_STOPBIT15             0x01
25850 +#define UMP_UART_STOPBIT2              0x02
25851 +
25852 +/* Line status register masks */
25853 +#define UMP_UART_LSR_OV_MASK           0x01
25854 +#define UMP_UART_LSR_PE_MASK           0x02
25855 +#define UMP_UART_LSR_FE_MASK           0x04
25856 +#define UMP_UART_LSR_BR_MASK           0x08
25857 +#define UMP_UART_LSR_ER_MASK           0x0F
25858 +#define UMP_UART_LSR_RX_MASK           0x10
25859 +#define UMP_UART_LSR_TX_MASK           0x20
25860 +
25861 +#define UMP_UART_LSR_DATA_MASK         ( LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK )
25862 +
25863 +/* Port Settings Constants) */
25864 +#define UMP_MASK_UART_FLAGS_RTS_FLOW           0x0001
25865 +#define UMP_MASK_UART_FLAGS_RTS_DISABLE                0x0002
25866 +#define UMP_MASK_UART_FLAGS_PARITY             0x0008
25867 +#define UMP_MASK_UART_FLAGS_OUT_X_DSR_FLOW     0x0010
25868 +#define UMP_MASK_UART_FLAGS_OUT_X_CTS_FLOW     0x0020
25869 +#define UMP_MASK_UART_FLAGS_OUT_X              0x0040
25870 +#define UMP_MASK_UART_FLAGS_OUT_XA             0x0080
25871 +#define UMP_MASK_UART_FLAGS_IN_X               0x0100
25872 +#define UMP_MASK_UART_FLAGS_DTR_FLOW           0x0800
25873 +#define UMP_MASK_UART_FLAGS_DTR_DISABLE                0x1000
25874 +#define UMP_MASK_UART_FLAGS_RECEIVE_MS_INT     0x2000
25875 +#define UMP_MASK_UART_FLAGS_AUTO_START_ON_ERR  0x4000
25876 +
25877 +#define UMP_DMA_MODE_CONTINOUS                 0x01
25878 +#define UMP_PIPE_TRANS_TIMEOUT_ENA             0x80
25879 +#define UMP_PIPE_TRANSFER_MODE_MASK            0x03
25880 +#define UMP_PIPE_TRANS_TIMEOUT_MASK            0x7C
25881 +
25882 +/* Purge port Direction Mask Bits */
25883 +#define UMP_PORT_DIR_OUT                       0x01
25884 +#define UMP_PORT_DIR_IN                                0x02
25885 +
25886 +// Address of Port 0
25887 +#define UMPM_UART1_PORT                        0x03
25888 +
25889 +// Commands
25890 +#define        UMPC_SET_CONFIG                 0x05
25891 +#define        UMPC_OPEN_PORT                  0x06
25892 +#define        UMPC_CLOSE_PORT                 0x07
25893 +#define        UMPC_START_PORT                 0x08
25894 +#define        UMPC_STOP_PORT                  0x09
25895 +#define        UMPC_TEST_PORT                  0x0A
25896 +#define        UMPC_PURGE_PORT                 0x0B
25897 +
25898 +#define        UMPC_COMPLETE_READ              0x80    // Force the Firmware to complete the current Read
25899 +#define        UMPC_HARDWARE_RESET             0x81    // Force UMP back into BOOT Mode
25900 +#define        UMPC_COPY_DNLD_TO_I2C           0x82    // Copy current download image to type 0xf2 record in 16k I2C
25901 +                                               // firmware will change 0xff record to type 2 record when complete
25902 +
25903 +       // Special function register commands
25904 +       // wIndex is register address
25905 +       // wValue is MSB/LSB mask/data
25906 +#define        UMPC_WRITE_SFR                  0x83    // Write SFR Register
25907 +
25908 +       // wIndex is register address
25909 +#define        UMPC_READ_SFR                   0x84    // Read SRF Register
25910 +
25911 +       // Set or Clear DTR (wValue bit 0 Set/Clear)            wIndex ModuleID (port)
25912 +#define        UMPC_SET_CLR_DTR                0x85
25913 +
25914 +       // Set or Clear RTS (wValue bit 0 Set/Clear)            wIndex ModuleID (port)
25915 +#define        UMPC_SET_CLR_RTS                0x86
25916 +
25917 +       // Set or Clear LOOPBACK (wValue bit 0 Set/Clear)       wIndex ModuleID (port)
25918 +#define        UMPC_SET_CLR_LOOPBACK           0x87
25919 +
25920 +       // Set or Clear BREAK (wValue bit 0 Set/Clear)          wIndex ModuleID (port)
25921 +#define        UMPC_SET_CLR_BREAK              0x88
25922 +
25923 +       // Read MSR wIndex ModuleID (port)
25924 +#define        UMPC_READ_MSR                   0x89
25925 +
25926 +       /* Toolkit commands */
25927 +       /* Read-write group */
25928 +#define        UMPC_MEMORY_READ                0x92
25929 +#define        UMPC_MEMORY_WRITE               0x93
25930 +
25931 +/*
25932 + *     UMP DMA Definitions
25933 + */
25934 +#define UMPD_OEDB1_ADDRESS             0xFF08
25935 +#define UMPD_OEDB2_ADDRESS             0xFF10
25936 +
25937 +struct out_endpoint_desc_block
25938 +{
25939 +       __u8 Configuration;
25940 +       __u8 XBufAddr;
25941 +       __u8 XByteCount;
25942 +       __u8 Unused1;
25943 +       __u8 Unused2;
25944 +       __u8 YBufAddr;
25945 +       __u8 YByteCount;
25946 +       __u8 BufferSize;
25947 +} __attribute__((packed));
25948 +
25949 +
25950 +/*
25951 + * TYPE DEFINITIONS
25952 + * Structures for Firmware commands
25953 + */
25954 +struct ump_uart_config         /* UART settings                    */
25955 +{
25956 +       __u16 wBaudRate;        /* Baud rate                        */
25957 +       __u16 wFlags;           /* Bitmap mask of flags             */
25958 +       __u8 bDataBits;         /* 5..8 - data bits per character   */
25959 +       __u8 bParity;           /* Parity settings                  */
25960 +       __u8 bStopBits;         /* Stop bits settings               */
25961 +       char cXon;              /* XON character                    */
25962 +       char cXoff;             /* XOFF character                   */
25963 +       __u8 bUartMode;         /* Will be updated when a user      */
25964 +                               /* interface is defined             */
25965 +} __attribute__((packed));
25966 +
25967 +
25968 +/*
25969 + * TYPE DEFINITIONS
25970 + * Structures for USB interrupts
25971 + */
25972 +struct ump_interrupt                   /* Interrupt packet structure       */
25973 +{
25974 +       __u8 bICode;                    /* Interrupt code (interrupt num)   */
25975 +       __u8 bIInfo;                    /* Interrupt information            */
25976 +}  __attribute__((packed));
25977 +
25978 +
25979 +#define TIUMP_GET_PORT_FROM_CODE(c)    (((c) >> 4) - 3)
25980 +#define TIUMP_GET_FUNC_FROM_CODE(c)    ((c) & 0x0f)
25981 +#define TIUMP_INTERRUPT_CODE_LSR       0x03
25982 +#define TIUMP_INTERRUPT_CODE_MSR       0x04
25983 +
25984 +#endif
25985 diff -Nur linux-2.4.19.org/drivers/usb/serial/io_usbvend.h linux-2.4.19/drivers/usb/serial/io_usbvend.h
25986 --- linux-2.4.19.org/drivers/usb/serial/io_usbvend.h    Sat Aug  3 02:39:45 2002
25987 +++ linux-2.4.19/drivers/usb/serial/io_usbvend.h        Thu Oct 31 08:11:24 2002
25988 @@ -106,11 +106,23 @@
25989  #define ION_DEVICE_ID_BB_EDGEPORT_4_DIN                0x011   // Edgeport/4 RS232 with Apple DIN connector
25990  #define ION_DEVICE_ID_BB_EDGEPORT_16_DUAL_CPU  0x012   // Half of an Edgeport/16 (the kind with 2 EP/8s)
25991  #define ION_DEVICE_ID_BB_EDGEPORT_8I           0x014   // Edgeport/8 RS422 (single-CPU)
25992 -// These IDs are used by the Edgeport.exe program for uninstalling.
25993 -// 
25994 -#define EDGEPORT_DEVICE_IDS    {0x001, 0x003, 0x004, 0x005, 0x006, 0x007, 0x00B, \
25995 -                                0x00C, 0x00D, 0x00E, 0x00F, 0x010, 0x011, 0x012, \
25996 -                                0x013, 0x014 }
25997 +
25998 +
25999 +/* Edgeport TI based devices */
26000 +#define ION_DEVICE_ID_TI_EDGEPORT_4            0x0201  /* Edgeport/4 RS232 */
26001 +#define ION_DEVICE_ID_TI_EDGEPORT_2            0x0205  /* Edgeport/2 RS232 */
26002 +#define ION_DEVICE_ID_TI_EDGEPORT_4I           0x0206  /* Edgeport/4i RS422 */
26003 +#define ION_DEVICE_ID_TI_EDGEPORT_2I           0x0207  /* Edgeport/2i RS422/RS485 */
26004 +#define ION_DEVICE_ID_TI_EDGEPORT_421          0x020C  /* Edgeport/421 4 hub 2 RS232 + Parallel (lucent on a different hub port) */
26005 +#define ION_DEVICE_ID_TI_EDGEPORT_21           0x020D  /* Edgeport/21 2 RS232 + Parallel (lucent on a different hub port) */
26006 +#define ION_DEVICE_ID_TI_EDGEPORT_1            0x0215  /* Edgeport/1 RS232 */
26007 +#define ION_DEVICE_ID_TI_EDGEPORT_42           0x0217  /* Edgeport/42 4 hub 2 RS232 */
26008 +#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 */
26009 +
26010 +#define ION_DEVICE_ID_TI_EDGEPORT_421_BOOT     0x0240  /* Edgeport/421 in boot mode */
26011 +#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) */
26012 +#define ION_DEVICE_ID_TI_EDGEPORT_21_BOOT      0x0242  /* Edgeport/21 in boot mode */
26013 +#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) */
26014  
26015  
26016  #define        MAKE_USB_PRODUCT_ID( OemId, DeviceId )                                  \
26017 @@ -196,11 +208,11 @@
26018  // Version 2 format of DeviceParams. This format is longer (3C0h)
26019  // and starts lower in memory, at the uppermost 1K in ROM.
26020  #define        EDGE_MANUF_DESC_ADDR            0x00FF7C00
26021 -#define        EDGE_MANUF_DESC_LEN             sizeof(EDGE_MANUF_DESCRIPTOR)
26022 +#define        EDGE_MANUF_DESC_LEN             sizeof(struct edge_manuf_descriptor)
26023  
26024  // Boot params descriptor
26025  #define        EDGE_BOOT_DESC_ADDR             0x00FF7FC0
26026 -#define        EDGE_BOOT_DESC_LEN              sizeof(EDGE_BOOT_DESCRIPTOR)
26027 +#define        EDGE_BOOT_DESC_LEN              sizeof(struct edge_boot_descriptor)
26028  
26029  // Define the max block size that may be read or written
26030  // in a read/write RAM/ROM command.
26031 @@ -217,7 +229,7 @@
26032  //             descriptor format, so that they may be separately retrieved,
26033  //             if necessary, with a minimum of work on the 930. This also
26034  //             requires them to be in UNICODE format, which, for English at
26035 -//             least, simply means extending each UCHAR into a USHORT.
26036 +//             least, simply means extending each __u8 into a __u16.
26037  //     3.      For all fields, 00 means 'uninitialized'.
26038  //     4.      All unused areas should be set to 00 for future expansion.
26039  //
26040 @@ -241,7 +253,7 @@
26041  #define MAX_SERIALNUMBER_LEN   12
26042  #define MAX_ASSEMBLYNUMBER_LEN 14
26043  
26044 -typedef struct _EDGE_MANUF_DESCRIPTOR {
26045 +struct edge_manuf_descriptor {
26046  
26047         __u16   RootDescTable[0x10];                    // C00 Root of descriptor tables (just a placeholder)
26048         __u8    DescriptorArea[0x2E0];                  // C20 Descriptors go here, up to 2E0h (just a placeholder)
26049 @@ -286,7 +298,7 @@
26050         __u8    IonConfig;                              // FBF Config byte for ION manufacturing use
26051                                                         // FBF end of structure, total len = 3C0h
26052  
26053 -} EDGE_MANUF_DESCRIPTOR, *PEDGE_MANUF_DESCRIPTOR;
26054 +};
26055  
26056  
26057  #define MANUF_DESC_VER_1       1       // Original definition of MANUF_DESC
26058 @@ -331,10 +343,10 @@
26059  
26060  
26061  
26062 -#define        MANUF_SERNUM_LENGTH             sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->SerialNumber)
26063 -#define        MANUF_ASSYNUM_LENGTH            sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->AssemblyNumber)
26064 -#define        MANUF_OEMASSYNUM_LENGTH         sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->OemAssyNumber)
26065 -#define        MANUF_MANUFDATE_LENGTH          sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->ManufDate)
26066 +#define        MANUF_SERNUM_LENGTH             sizeof(((struct edge_manuf_descriptor *)0)->SerialNumber)
26067 +#define        MANUF_ASSYNUM_LENGTH            sizeof(((struct edge_manuf_descriptor *)0)->AssemblyNumber)
26068 +#define        MANUF_OEMASSYNUM_LENGTH         sizeof(((struct edge_manuf_descriptor *)0)->OemAssyNumber)
26069 +#define        MANUF_MANUFDATE_LENGTH          sizeof(((struct edge_manuf_descriptor *)0)->ManufDate)
26070  
26071  #define        MANUF_ION_CONFIG_MASTER         0x80    // 1=Master mode, 0=Normal
26072  #define        MANUF_ION_CONFIG_DIAG           0x40    // 1=Run h/w diags, 0=norm
26073 @@ -349,7 +361,7 @@
26074  // - FF:xFFF. Note that the 930-mandated UCONFIG bytes are
26075  // included in this structure.
26076  //
26077 -typedef struct _EDGE_BOOT_DESCRIPTOR {
26078 +struct edge_boot_descriptor {
26079         __u8            Length;                 // C0 Desc length, per USB (= 40h)
26080         __u8            DescType;               // C1 Desc type, per USB (= DEVICE type)
26081         __u8            DescVer;                // C2 Desc version/format
26082 @@ -373,8 +385,7 @@
26083         __u8            UConfig1;               // F9 930-defined CPU configuration byte 1
26084         __u8            Reserved3[6];           // FA -- unused, set to 0 --
26085                                                 // FF end of structure, total len = 80
26086 -
26087 -} EDGE_BOOT_DESCRIPTOR, *PEDGE_BOOT_DESCRIPTOR;
26088 +};
26089  
26090  
26091  #define BOOT_DESC_VER_1                1       // Original definition of BOOT_PARAMS
26092 @@ -385,5 +396,92 @@
26093  
26094  #define        BOOT_CAP_RESET_CMD      0x0001  // If set, boot correctly supports ION_RESET_DEVICE
26095  
26096 -#endif // if !defined()
26097  
26098 +
26099 +/************************************************************************
26100 +                 T I   U M P   D E F I N I T I O N S
26101 + ***********************************************************************/
26102 +
26103 +//************************************************************************
26104 +//     TI I2C Format Definitions
26105 +//************************************************************************
26106 +#define I2C_DESC_TYPE_INFO_BASIC       1
26107 +#define I2C_DESC_TYPE_FIRMWARE_BASIC   2
26108 +#define I2C_DESC_TYPE_DEVICE           3
26109 +#define I2C_DESC_TYPE_CONFIG           4
26110 +#define I2C_DESC_TYPE_STRING           5
26111 +#define I2C_DESC_TYPE_FIRMWARE_BLANK   0xf2
26112 +
26113 +#define I2C_DESC_TYPE_MAX              5
26114 +// 3410 may define types 6, 7 for other firmware downloads
26115 +
26116 +// Special section defined by ION
26117 +#define I2C_DESC_TYPE_ION              0       // Not defined by TI
26118 +
26119 +
26120 +struct ti_i2c_desc
26121 +{
26122 +       __u8    Type;                   // Type of descriptor
26123 +       __u16   Size;                   // Size of data only not including header
26124 +       __u8    CheckSum;               // Checksum (8 bit sum of data only)
26125 +       __u8    Data[0];                // Data starts here
26126 +}__attribute__((packed));
26127 +
26128 +struct ti_i2c_firmware_rec 
26129 +{
26130 +       __u8    Ver_Major;              // Firmware Major version number
26131 +       __u8    Ver_Minor;              // Firmware Minor version number
26132 +       __u8    Data[0];                // Download starts here
26133 +}__attribute__((packed));
26134 +
26135 +
26136 +// Structure of header of download image in fw_down.h
26137 +struct ti_i2c_image_header
26138 +{
26139 +       __u16   Length;
26140 +       __u8    CheckSum;
26141 +}__attribute__((packed));
26142 +
26143 +struct ti_basic_descriptor
26144 +{
26145 +       __u8    Power;          // Self powered
26146 +                               // bit 7: 1 - power switching supported
26147 +                               //        0 - power switching not supported
26148 +                               //
26149 +                               // bit 0: 1 - self powered
26150 +                               //        0 - bus powered
26151 +                               //
26152 +                               //
26153 +       __u16   HubVid;         // VID HUB
26154 +       __u16   HubPid;         // PID HUB
26155 +       __u16   DevPid;         // PID Edgeport
26156 +       __u8    HubTime;        // Time for power on to power good
26157 +       __u8    HubCurrent;     // HUB Current = 100ma
26158 +} __attribute__((packed));
26159 +
26160 +
26161 +#define TI_GET_CPU_REVISION(x)         (__u8)((((x)>>4)&0x0f))
26162 +#define TI_GET_BOARD_REVISION(x)       (__u8)(((x)&0x0f))
26163 +
26164 +#define TI_I2C_SIZE_MASK               0x1f  // 5 bits
26165 +#define TI_GET_I2C_SIZE(x)             ((((x) & TI_I2C_SIZE_MASK)+1)*256)
26166 +
26167 +#define TI_MAX_I2C_SIZE                        ( 16 * 1024 )
26168 +
26169 +/* TI USB 5052 definitions */
26170 +struct edge_ti_manuf_descriptor
26171 +{
26172 +       __u8 IonConfig;         //  Config byte for ION manufacturing use
26173 +       __u8 IonConfig2;        //  Expansion
26174 +       __u8 Version;           //  Verqsion
26175 +       __u8 CpuRev_BoardRev;   //  CPU revision level (0xF0) and Board Rev Level (0x0F)
26176 +       __u8 NumPorts;          //  Number of ports     for this UMP
26177 +       __u8 NumVirtualPorts;   //  Number of Virtual ports
26178 +       __u8 HubConfig1;        //  Used to configure the Hub
26179 +       __u8 HubConfig2;        //  Used to configure the Hub
26180 +       __u8 TotalPorts;        //  Total Number of Com Ports for the entire device (All UMPs)
26181 +       __u8 Reserved;
26182 +}__attribute__((packed));
26183 +
26184 +
26185 +#endif         // if !defined()
26186 diff -Nur linux-2.4.19.org/drivers/usb/serial/ipaq.c linux-2.4.19/drivers/usb/serial/ipaq.c
26187 --- linux-2.4.19.org/drivers/usb/serial/ipaq.c  Sat Aug  3 02:39:45 2002
26188 +++ linux-2.4.19/drivers/usb/serial/ipaq.c      Thu Oct 31 08:11:24 2002
26189 @@ -9,6 +9,10 @@
26190   *     the Free Software Foundation; either version 2 of the License, or
26191   *     (at your option) any later version.
26192   *
26193 + * (26/7/2002) ganesh
26194 + *     Fixed up broken error handling in ipaq_open. Retry the "kickstart"
26195 + *     packet much harder - this drastically reduces connection failures.
26196 + *
26197   * (30/4/2002) ganesh
26198   *     Added support for the Casio EM500. Completely untested. Thanks
26199   *     to info from Nathan <wfilardo@fuse.net>
26200 @@ -34,18 +38,15 @@
26201  
26202  #include <linux/config.h>
26203  #include <linux/kernel.h>
26204 -#include <linux/sched.h>
26205 -#include <linux/signal.h>
26206  #include <linux/errno.h>
26207 -#include <linux/poll.h>
26208  #include <linux/init.h>
26209  #include <linux/slab.h>
26210 -#include <linux/fcntl.h>
26211  #include <linux/tty.h>
26212  #include <linux/tty_driver.h>
26213  #include <linux/tty_flip.h>
26214  #include <linux/module.h>
26215  #include <linux/spinlock.h>
26216 +#include <asm/uaccess.h>
26217  #include <linux/usb.h>
26218  
26219  #ifdef CONFIG_USB_SERIAL_DEBUG
26220 @@ -57,6 +58,8 @@
26221  #include "usb-serial.h"
26222  #include "ipaq.h"
26223  
26224 +#define KP_RETRIES     100
26225 +
26226  /*
26227   * Version Information
26228   */
26229 @@ -81,7 +84,7 @@
26230  static void ipaq_destroy_lists(struct usb_serial_port *port);
26231  
26232  
26233 -static __devinitdata struct usb_device_id ipaq_id_table [] = {
26234 +static struct usb_device_id ipaq_id_table [] = {
26235         { USB_DEVICE(COMPAQ_VENDOR_ID, COMPAQ_IPAQ_ID) },
26236         { USB_DEVICE(HP_VENDOR_ID, HP_JORNADA_548_ID) },
26237         { USB_DEVICE(HP_VENDOR_ID, HP_JORNADA_568_ID) },
26238 @@ -93,24 +96,22 @@
26239  
26240  /* All of the device info needed for the Compaq iPAQ */
26241  struct usb_serial_device_type ipaq_device = {
26242 -       name:                   "Compaq iPAQ",
26243 -       id_table:               ipaq_id_table,
26244 -       needs_interrupt_in:     DONT_CARE,
26245 -       needs_bulk_in:          MUST_HAVE,
26246 -       needs_bulk_out:         MUST_HAVE,
26247 -       num_interrupt_in:       NUM_DONT_CARE,
26248 -       num_bulk_in:            1,
26249 -       num_bulk_out:           1,
26250 -       num_ports:              1,
26251 -       open:                   ipaq_open,
26252 -       close:                  ipaq_close,
26253 -       startup:                ipaq_startup,
26254 -       shutdown:               ipaq_shutdown,
26255 -       write:                  ipaq_write,
26256 -       write_room:             ipaq_write_room,
26257 -       chars_in_buffer:        ipaq_chars_in_buffer,
26258 -       read_bulk_callback:     ipaq_read_bulk_callback,
26259 -       write_bulk_callback:    ipaq_write_bulk_callback,
26260 +       .owner =                THIS_MODULE,
26261 +       .name =                 "Compaq iPAQ",
26262 +       .id_table =             ipaq_id_table,
26263 +       .num_interrupt_in =     NUM_DONT_CARE,
26264 +       .num_bulk_in =          1,
26265 +       .num_bulk_out =         1,
26266 +       .num_ports =            1,
26267 +       .open =                 ipaq_open,
26268 +       .close =                ipaq_close,
26269 +       .startup =              ipaq_startup,
26270 +       .shutdown =             ipaq_shutdown,
26271 +       .write =                ipaq_write,
26272 +       .write_room =           ipaq_write_room,
26273 +       .chars_in_buffer =      ipaq_chars_in_buffer,
26274 +       .read_bulk_callback =   ipaq_read_bulk_callback,
26275 +       .write_bulk_callback =  ipaq_write_bulk_callback,
26276  };
26277  
26278  static spinlock_t      write_list_lock;
26279 @@ -123,115 +124,110 @@
26280         struct ipaq_private     *priv;
26281         struct ipaq_packet      *pkt;
26282         int                     i, result = 0;
26283 +       int                     retries = KP_RETRIES;
26284  
26285         if (port_paranoia_check(port, __FUNCTION__)) {
26286                 return -ENODEV;
26287         }
26288         
26289 -       dbg(__FUNCTION__ " - port %d", port->number);
26290 -
26291 -       down(&port->sem);
26292 -       
26293 -       ++port->open_count;
26294 -       MOD_INC_USE_COUNT;
26295 -       
26296 -       if (!port->active) {
26297 -               port->active = 1;
26298 -               bytes_in = 0;
26299 -               bytes_out = 0;
26300 -               priv = (struct ipaq_private *)kmalloc(sizeof(struct ipaq_private), GFP_KERNEL);
26301 -               if (priv == NULL) {
26302 -                       err(__FUNCTION__ " - Out of memory");
26303 -                       return -ENOMEM;
26304 -               }
26305 -               port->private = (void *)priv;
26306 -               priv->active = 0;
26307 -               priv->queue_len = 0;
26308 -               INIT_LIST_HEAD(&priv->queue);
26309 -               INIT_LIST_HEAD(&priv->freelist);
26310 -
26311 -               for (i = 0; i < URBDATA_QUEUE_MAX / PACKET_SIZE; i++) {
26312 -                       pkt = kmalloc(sizeof(struct ipaq_packet), GFP_KERNEL);
26313 -                       if (pkt == NULL) {
26314 -                               goto enomem;
26315 -                       }
26316 -                       pkt->data = kmalloc(PACKET_SIZE, GFP_KERNEL);
26317 -                       if (pkt->data == NULL) {
26318 -                               kfree(pkt);
26319 -                               goto enomem;
26320 -                       }
26321 -                       pkt->len = 0;
26322 -                       pkt->written = 0;
26323 -                       INIT_LIST_HEAD(&pkt->list);
26324 -                       list_add(&pkt->list, &priv->freelist);
26325 -                       priv->free_len += PACKET_SIZE;
26326 -               }
26327 -
26328 -               /*
26329 -                * Force low latency on. This will immediately push data to the line
26330 -                * discipline instead of queueing.
26331 -                */
26332 -
26333 -               port->tty->low_latency = 1;
26334 -               port->tty->raw = 1;
26335 -               port->tty->real_raw = 1;
26336 -
26337 -               /*
26338 -                * Lose the small buffers usbserial provides. Make larger ones.
26339 -                */
26340 +       dbg("%s - port %d", __FUNCTION__, port->number);
26341  
26342 -               kfree(port->bulk_in_buffer);
26343 -               kfree(port->bulk_out_buffer);
26344 -               port->bulk_in_buffer = kmalloc(URBDATA_SIZE, GFP_KERNEL);
26345 -               if (port->bulk_in_buffer == NULL) {
26346 +       bytes_in = 0;
26347 +       bytes_out = 0;
26348 +       priv = (struct ipaq_private *)kmalloc(sizeof(struct ipaq_private), GFP_KERNEL);
26349 +       if (priv == NULL) {
26350 +               err("%s - Out of memory", __FUNCTION__);
26351 +               return -ENOMEM;
26352 +       }
26353 +       port->private = (void *)priv;
26354 +       priv->active = 0;
26355 +       priv->queue_len = 0;
26356 +       INIT_LIST_HEAD(&priv->queue);
26357 +       INIT_LIST_HEAD(&priv->freelist);
26358 +
26359 +       for (i = 0; i < URBDATA_QUEUE_MAX / PACKET_SIZE; i++) {
26360 +               pkt = kmalloc(sizeof(struct ipaq_packet), GFP_KERNEL);
26361 +               if (pkt == NULL) {
26362                         goto enomem;
26363                 }
26364 -               port->bulk_out_buffer = kmalloc(URBDATA_SIZE, GFP_KERNEL);
26365 -               if (port->bulk_out_buffer == NULL) {
26366 -                       kfree(port->bulk_in_buffer);
26367 +               pkt->data = kmalloc(PACKET_SIZE, GFP_KERNEL);
26368 +               if (pkt->data == NULL) {
26369 +                       kfree(pkt);
26370                         goto enomem;
26371                 }
26372 -               port->read_urb->transfer_buffer = port->bulk_in_buffer;
26373 -               port->write_urb->transfer_buffer = port->bulk_out_buffer;
26374 -               port->read_urb->transfer_buffer_length = URBDATA_SIZE;
26375 -               port->bulk_out_size = port->write_urb->transfer_buffer_length = URBDATA_SIZE;
26376 -               
26377 -               /* Start reading from the device */
26378 -               FILL_BULK_URB(port->read_urb, serial->dev, 
26379 -                             usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
26380 -                             port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
26381 -                             ipaq_read_bulk_callback, port);
26382 -               result = usb_submit_urb(port->read_urb);
26383 -               if (result) {
26384 -                       err(__FUNCTION__ " - failed submitting read urb, error %d", result);
26385 -               }
26386 -
26387 -               /*
26388 -                * Send out two control messages observed in win98 sniffs. Not sure what
26389 -                * they do.
26390 -                */
26391 -
26392 -               result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), 0x22, 0x21,
26393 -                               0x1, 0, NULL, 0, 5 * HZ);
26394 -               if (result < 0) {
26395 -                       err(__FUNCTION__ " - failed doing control urb, error %d", result);
26396 -               }
26397 -               result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), 0x22, 0x21,
26398 -                               0x1, 0, NULL, 0, 5 * HZ);
26399 -               if (result < 0) {
26400 -                       err(__FUNCTION__ " - failed doing control urb, error %d", result);
26401 -               }
26402 +               pkt->len = 0;
26403 +               pkt->written = 0;
26404 +               INIT_LIST_HEAD(&pkt->list);
26405 +               list_add(&pkt->list, &priv->freelist);
26406 +               priv->free_len += PACKET_SIZE;
26407 +       }
26408 +
26409 +       /*
26410 +        * Force low latency on. This will immediately push data to the line
26411 +        * discipline instead of queueing.
26412 +        */
26413 +
26414 +       port->tty->low_latency = 1;
26415 +       port->tty->raw = 1;
26416 +       port->tty->real_raw = 1;
26417 +
26418 +       /*
26419 +        * Lose the small buffers usbserial provides. Make larger ones.
26420 +        */
26421 +
26422 +       kfree(port->bulk_in_buffer);
26423 +       kfree(port->bulk_out_buffer);
26424 +       port->bulk_in_buffer = kmalloc(URBDATA_SIZE, GFP_KERNEL);
26425 +       if (port->bulk_in_buffer == NULL) {
26426 +               goto enomem;
26427         }
26428 +       port->bulk_out_buffer = kmalloc(URBDATA_SIZE, GFP_KERNEL);
26429 +       if (port->bulk_out_buffer == NULL) {
26430 +               kfree(port->bulk_in_buffer);
26431 +               goto enomem;
26432 +       }
26433 +       port->read_urb->transfer_buffer = port->bulk_in_buffer;
26434 +       port->write_urb->transfer_buffer = port->bulk_out_buffer;
26435 +       port->read_urb->transfer_buffer_length = URBDATA_SIZE;
26436 +       port->bulk_out_size = port->write_urb->transfer_buffer_length = URBDATA_SIZE;
26437         
26438 -       up(&port->sem);
26439 -       
26440 -       return result;
26441 +       /* Start reading from the device */
26442 +       FILL_BULK_URB(port->read_urb, serial->dev, 
26443 +                     usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
26444 +                     port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
26445 +                     ipaq_read_bulk_callback, port);
26446 +       result = usb_submit_urb(port->read_urb);
26447 +       if (result) {
26448 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
26449 +               goto error;
26450 +       }
26451 +
26452 +       /*
26453 +        * Send out control message observed in win98 sniffs. Not sure what
26454 +        * it does, but from empirical observations, it seems that the device
26455 +        * will start the chat sequence once one of these messages gets
26456 +        * through. Since this has a reasonably high failure rate, we retry
26457 +        * several times.
26458 +        */
26459 +
26460 +       while (retries--) {
26461 +               result = usb_control_msg(serial->dev,
26462 +                               usb_sndctrlpipe(serial->dev, 0), 0x22, 0x21,
26463 +                               0x1, 0, NULL, 0, HZ / 10 + 1);
26464 +               if (result == 0) {
26465 +                       return 0;
26466 +               }
26467 +       }
26468 +       err("%s - failed doing control urb, error %d", __FUNCTION__, result);
26469 +       goto error;
26470  
26471  enomem:
26472 +       result = -ENOMEM;
26473 +       err("%s - Out of memory", __FUNCTION__);
26474 +error:
26475         ipaq_destroy_lists(port);
26476         kfree(priv);
26477 -       err(__FUNCTION__ " - Out of memory");
26478 -       return -ENOMEM;
26479 +       return result;
26480  }
26481  
26482  
26483 @@ -244,37 +240,24 @@
26484                 return; 
26485         }
26486         
26487 -       dbg(__FUNCTION__ " - port %d", port->number);
26488 +       dbg("%s - port %d", __FUNCTION__, port->number);
26489                          
26490         serial = get_usb_serial(port, __FUNCTION__);
26491         if (!serial)
26492                 return;
26493 -       
26494 -       down (&port->sem);
26495 -
26496 -       --port->open_count;
26497  
26498 -       if (port->open_count <= 0) {
26499 +       /*
26500 +        * shut down bulk read and write
26501 +        */
26502  
26503 -               /*
26504 -                * shut down bulk read and write
26505 -                */
26506 -
26507 -               usb_unlink_urb(port->write_urb);
26508 -               usb_unlink_urb(port->read_urb);
26509 -               ipaq_destroy_lists(port);
26510 -               kfree(priv);
26511 -               port->private = NULL;
26512 -               port->active = 0;
26513 -               port->open_count = 0;
26514 -
26515 -       }
26516 -       up (&port->sem);
26517 +       usb_unlink_urb(port->write_urb);
26518 +       usb_unlink_urb(port->read_urb);
26519 +       ipaq_destroy_lists(port);
26520 +       kfree(priv);
26521 +       port->private = NULL;
26522  
26523         /* Uncomment the following line if you want to see some statistics in your syslog */
26524         /* info ("Bytes In = %d  Bytes Out = %d", bytes_in, bytes_out); */
26525 -
26526 -       MOD_DEC_USE_COUNT;
26527  }
26528  
26529  static void ipaq_read_bulk_callback(struct urb *urb)
26530 @@ -288,15 +271,15 @@
26531         if (port_paranoia_check(port, __FUNCTION__))
26532                 return;
26533  
26534 -       dbg(__FUNCTION__ " - port %d", port->number);
26535 +       dbg("%s - port %d", __FUNCTION__, port->number);
26536  
26537         if (!serial) {
26538 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
26539 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
26540                 return;
26541         }
26542  
26543         if (urb->status) {
26544 -               dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
26545 +               dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
26546                 return;
26547         }
26548  
26549 @@ -323,7 +306,7 @@
26550                       ipaq_read_bulk_callback, port);
26551         result = usb_submit_urb(port->read_urb);
26552         if (result)
26553 -               err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
26554 +               err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
26555         return;
26556  }
26557  
26558 @@ -334,7 +317,7 @@
26559         int                     bytes_sent = 0;
26560         int                     transfer_size;
26561  
26562 -       dbg(__FUNCTION__ " - port %d", port->number);
26563 +       dbg("%s - port %d", __FUNCTION__, port->number);
26564  
26565         usb_serial_debug_data(__FILE__, __FUNCTION__, count, buf);
26566         
26567 @@ -361,7 +344,7 @@
26568         unsigned long           flags;
26569  
26570         if (priv->free_len <= 0) {
26571 -               dbg(__FUNCTION__ " - we're stuffed");
26572 +               dbg("%s - we're stuffed", __FUNCTION__);
26573                 return -EAGAIN;
26574         }
26575  
26576 @@ -373,12 +356,13 @@
26577         }
26578         spin_unlock_irqrestore(&write_list_lock, flags);
26579         if (pkt == NULL) {
26580 -               dbg(__FUNCTION__ " - we're stuffed");
26581 +               dbg("%s - we're stuffed", __FUNCTION__);
26582                 return -EAGAIN;
26583         }
26584  
26585         if (from_user) {
26586 -               copy_from_user(pkt->data, buf, count);
26587 +               if (copy_from_user(pkt->data, buf, count))
26588 +                       return -EFAULT;
26589         } else {
26590                 memcpy(pkt->data, buf, count);
26591         }
26592 @@ -395,7 +379,7 @@
26593                 spin_unlock_irqrestore(&write_list_lock, flags);
26594                 result = usb_submit_urb(port->write_urb);
26595                 if (result) {
26596 -                       err(__FUNCTION__ " - failed submitting write urb, error %d", result);
26597 +                       err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
26598                 }
26599         } else {
26600                 spin_unlock_irqrestore(&write_list_lock, flags);
26601 @@ -414,7 +398,7 @@
26602  
26603         if (urb->status == -EINPROGRESS) {
26604                 /* Should never happen */
26605 -               err(__FUNCTION__ " - flushing while urb is active !");
26606 +               err("%s - flushing while urb is active !", __FUNCTION__);
26607                 return;
26608         }
26609         room = URBDATA_SIZE;
26610 @@ -456,10 +440,10 @@
26611                 return;
26612         }
26613         
26614 -       dbg(__FUNCTION__ " - port %d", port->number);
26615 +       dbg("%s - port %d", __FUNCTION__, port->number);
26616         
26617         if (urb->status) {
26618 -               dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
26619 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
26620         }
26621  
26622         spin_lock_irqsave(&write_list_lock, flags);
26623 @@ -468,7 +452,7 @@
26624                 spin_unlock_irqrestore(&write_list_lock, flags);
26625                 result = usb_submit_urb(port->write_urb);
26626                 if (result) {
26627 -                       err(__FUNCTION__ " - failed submitting write urb, error %d", result);
26628 +                       err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
26629                 }
26630         } else {
26631                 priv->active = 0;
26632 @@ -484,7 +468,7 @@
26633  {
26634         struct ipaq_private     *priv = (struct ipaq_private *)port->private;
26635  
26636 -       dbg(__FUNCTION__ " - freelen %d", priv->free_len);
26637 +       dbg("%s - freelen %d", __FUNCTION__, priv->free_len);
26638         return priv->free_len;
26639  }
26640  
26641 @@ -492,7 +476,7 @@
26642  {
26643         struct ipaq_private     *priv = (struct ipaq_private *)port->private;
26644  
26645 -       dbg(__FUNCTION__ " - queuelen %d", priv->queue_len);
26646 +       dbg("%s - queuelen %d", __FUNCTION__, priv->queue_len);
26647         return priv->queue_len;
26648  }
26649  
26650 @@ -520,23 +504,14 @@
26651  
26652  static int ipaq_startup(struct usb_serial *serial)
26653  {
26654 -       dbg(__FUNCTION__);
26655 +       dbg("%s", __FUNCTION__);
26656         usb_set_configuration(serial->dev, 1);
26657         return 0;
26658  }
26659  
26660  static void ipaq_shutdown(struct usb_serial *serial)
26661  {
26662 -       int i;
26663 -
26664 -       dbg (__FUNCTION__);
26665 -
26666 -       /* stop reads and writes on all ports */
26667 -       for (i=0; i < serial->num_ports; ++i) {
26668 -               while (serial->port[i].open_count > 0) {
26669 -                       ipaq_close(&serial->port[i], NULL);
26670 -               }
26671 -       }
26672 +       dbg("%s", __FUNCTION__);
26673  }
26674  
26675  static int __init ipaq_init(void)
26676 diff -Nur linux-2.4.19.org/drivers/usb/serial/ipaq.h linux-2.4.19/drivers/usb/serial/ipaq.h
26677 --- linux-2.4.19.org/drivers/usb/serial/ipaq.h  Sat Aug  3 02:39:45 2002
26678 +++ linux-2.4.19/drivers/usb/serial/ipaq.h      Thu Oct 31 08:11:24 2002
26679 @@ -19,7 +19,7 @@
26680  #define COMPAQ_VENDOR_ID       0x049f
26681  #define COMPAQ_IPAQ_ID         0x0003
26682  
26683 -#define HP_VENDOR_ID           0x003f
26684 +#define HP_VENDOR_ID           0x03f0
26685  #define HP_JORNADA_548_ID      0x1016
26686  #define HP_JORNADA_568_ID      0x1116
26687  
26688 diff -Nur linux-2.4.19.org/drivers/usb/serial/ir-usb.c linux-2.4.19/drivers/usb/serial/ir-usb.c
26689 --- linux-2.4.19.org/drivers/usb/serial/ir-usb.c        Mon Feb 25 20:38:07 2002
26690 +++ linux-2.4.19/drivers/usb/serial/ir-usb.c    Thu Oct 31 08:11:24 2002
26691 @@ -1,8 +1,8 @@
26692  /*
26693   * USB IR Dongle driver
26694   *
26695 - *     Copyright (C) 2001 Greg Kroah-Hartman (greg@kroah.com)
26696 - *     Copyright (C) 2002 Gary Brubaker (xavyer@ix.netcom.com)
26697 + *     Copyright (C) 2001-2002 Greg Kroah-Hartman (greg@kroah.com)
26698 + *     Copyright (C) 2002      Gary Brubaker (xavyer@ix.netcom.com)
26699   *
26700   *     This program is free software; you can redistribute it and/or modify
26701   *     it under the terms of the GNU General Public License as published by
26702 @@ -21,6 +21,11 @@
26703   *
26704   * See Documentation/usb/usb-serial.txt for more information on using this driver
26705   *
26706 + * 2002_Mar_07 greg kh
26707 + *     moved some needed structures and #define values from the
26708 + *     net/irda/irda-usb.h file into our file, as we don't want to depend on
26709 + *     that codebase compiling correctly :)
26710 + *
26711   * 2002_Jan_14  gb
26712   *     Added module parameter to force specific number of XBOFs.
26713   *     Added ir_xbof_change().
26714 @@ -43,20 +48,16 @@
26715  
26716  #include <linux/config.h>
26717  #include <linux/kernel.h>
26718 -#include <linux/sched.h>
26719 -#include <linux/signal.h>
26720  #include <linux/errno.h>
26721 -#include <linux/poll.h>
26722  #include <linux/init.h>
26723  #include <linux/slab.h>
26724 -#include <linux/fcntl.h>
26725  #include <linux/tty.h>
26726  #include <linux/tty_driver.h>
26727  #include <linux/tty_flip.h>
26728  #include <linux/module.h>
26729  #include <linux/spinlock.h>
26730 +#include <asm/uaccess.h>
26731  #include <linux/usb.h>
26732 -#include <net/irda/irda-usb.h>
26733  
26734  #ifdef CONFIG_USB_SERIAL_DEBUG
26735         static int debug = 1;
26736 @@ -73,6 +74,33 @@
26737  #define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>"
26738  #define DRIVER_DESC "USB IR Dongle driver"
26739  
26740 +/* USB IrDA class spec information */
26741 +#define USB_CLASS_IRDA         0x02
26742 +#define USB_DT_IRDA            0x21
26743 +#define IU_REQ_GET_CLASS_DESC  0x06
26744 +#define SPEED_2400             0x01
26745 +#define SPEED_9600             0x02
26746 +#define SPEED_19200            0x03
26747 +#define SPEED_38400            0x04
26748 +#define SPEED_57600            0x05
26749 +#define SPEED_115200           0x06
26750 +#define SPEED_576000           0x07
26751 +#define SPEED_1152000          0x08
26752 +#define SPEED_4000000          0x09
26753 +
26754 +struct irda_class_desc {
26755 +       u8      bLength;
26756 +       u8      bDescriptorType;
26757 +       u16     bcdSpecRevision;
26758 +       u8      bmDataSize;
26759 +       u8      bmWindowSize;
26760 +       u8      bmMinTurnaroundTime;
26761 +       u16     wBaudRate;
26762 +       u8      bmAdditionalBOFs;
26763 +       u8      bIrdaRateSniff;
26764 +       u8      bMaxUnicastList;
26765 +} __attribute__ ((packed));
26766 +
26767  /* if overridden by the user, then use their value for the size of the read and
26768   * write urbs */
26769  static int buffer_size = 0;
26770 @@ -91,7 +119,7 @@
26771  static u8 ir_xbof = 0;
26772  static u8 ir_add_bof = 0;
26773  
26774 -static __devinitdata struct usb_device_id id_table [] = {
26775 +static struct usb_device_id id_table [] = {
26776         { USB_DEVICE(0x050f, 0x0180) },         /* KC Technology, KC-180 */
26777         { USB_DEVICE(0x08e9, 0x0100) },         /* XTNDAccess */
26778         { USB_DEVICE(0x09c4, 0x0011) },         /* ACTiSys ACT-IR2000U */
26779 @@ -103,22 +131,20 @@
26780  
26781  
26782  struct usb_serial_device_type ir_device = {
26783 -       name:                   "IR Dongle",
26784 -       id_table:               id_table,
26785 -       needs_interrupt_in:     MUST_HAVE,
26786 -       needs_bulk_in:          MUST_HAVE,
26787 -       needs_bulk_out:         MUST_HAVE,
26788 -       num_interrupt_in:       1,
26789 -       num_bulk_in:            1,
26790 -       num_bulk_out:           1,
26791 -       num_ports:              1,
26792 -       set_termios:            ir_set_termios,
26793 -       startup:                ir_startup,
26794 -       open:                   ir_open,
26795 -       close:                  ir_close,
26796 -       write:                  ir_write,
26797 -       write_bulk_callback:    ir_write_bulk_callback,
26798 -       read_bulk_callback:     ir_read_bulk_callback,
26799 +       .owner =                THIS_MODULE,
26800 +       .name =                 "IR Dongle",
26801 +       .id_table =             id_table,
26802 +       .num_interrupt_in =     1,
26803 +       .num_bulk_in =          1,
26804 +       .num_bulk_out =         1,
26805 +       .num_ports =            1,
26806 +       .set_termios =          ir_set_termios,
26807 +       .startup =              ir_startup,
26808 +       .open =                 ir_open,
26809 +       .close =                ir_close,
26810 +       .write =                ir_write,
26811 +       .write_bulk_callback =  ir_write_bulk_callback,
26812 +       .read_bulk_callback =   ir_read_bulk_callback,
26813  };
26814  
26815  static inline void irda_usb_dump_class_desc(struct irda_class_desc *desc)
26816 @@ -160,7 +186,7 @@
26817         ret = usb_control_msg(dev, usb_rcvctrlpipe(dev,0),
26818                         IU_REQ_GET_CLASS_DESC,
26819                         USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
26820 -                       0, ifnum, desc, sizeof(*desc), MSECS_TO_JIFFIES(500));
26821 +                       0, ifnum, desc, sizeof(*desc), HZ);
26822         
26823         dbg("%s -  ret=%d", __FUNCTION__, ret);
26824         if (ret < sizeof(*desc)) {
26825 @@ -235,7 +261,7 @@
26826                 case 0x20: ir_add_bof =  2; break;
26827                 case 0x40: ir_add_bof =  1; break;
26828                 case 0x80: ir_add_bof =  0; break;
26829 -               default:
26830 +               default:;
26831         }
26832  
26833         kfree (irda_desc);
26834 @@ -254,53 +280,42 @@
26835         
26836         dbg("%s - port %d", __FUNCTION__, port->number);
26837  
26838 -       down (&port->sem);
26839 -       
26840 -       ++port->open_count;
26841 -       MOD_INC_USE_COUNT;
26842 -       
26843 -       if (!port->active) {
26844 -               port->active = 1;
26845 -
26846 -               if (buffer_size) {
26847 -                       /* override the default buffer sizes */
26848 -                       buffer = kmalloc (buffer_size, GFP_KERNEL);
26849 -                       if (!buffer) {
26850 -                               err ("%s - out of memory.", __FUNCTION__);
26851 -                               return -ENOMEM;
26852 -                       }
26853 -                       kfree (port->read_urb->transfer_buffer);
26854 -                       port->read_urb->transfer_buffer = buffer;
26855 -                       port->read_urb->transfer_buffer_length = buffer_size;
26856 -
26857 -                       buffer = kmalloc (buffer_size, GFP_KERNEL);
26858 -                       if (!buffer) {
26859 -                               err ("%s - out of memory.", __FUNCTION__);
26860 -                               return -ENOMEM;
26861 -                       }
26862 -                       kfree (port->write_urb->transfer_buffer);
26863 -                       port->write_urb->transfer_buffer = buffer;
26864 -                       port->write_urb->transfer_buffer_length = buffer_size;
26865 -                       port->bulk_out_size = buffer_size;
26866 +       if (buffer_size) {
26867 +               /* override the default buffer sizes */
26868 +               buffer = kmalloc (buffer_size, GFP_KERNEL);
26869 +               if (!buffer) {
26870 +                       err ("%s - out of memory.", __FUNCTION__);
26871 +                       return -ENOMEM;
26872                 }
26873 -
26874 -               /* Start reading from the device */
26875 -               usb_fill_bulk_urb (
26876 -                       port->read_urb,
26877 -                       serial->dev, 
26878 -                       usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
26879 -                       port->read_urb->transfer_buffer,
26880 -                       port->read_urb->transfer_buffer_length,
26881 -                       ir_read_bulk_callback,
26882 -                       port);
26883 -               port->read_urb->transfer_flags = USB_QUEUE_BULK;
26884 -               result = usb_submit_urb(port->read_urb);
26885 -               if (result)
26886 -                       err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
26887 +               kfree (port->read_urb->transfer_buffer);
26888 +               port->read_urb->transfer_buffer = buffer;
26889 +               port->read_urb->transfer_buffer_length = buffer_size;
26890 +
26891 +               buffer = kmalloc (buffer_size, GFP_KERNEL);
26892 +               if (!buffer) {
26893 +                       err ("%s - out of memory.", __FUNCTION__);
26894 +                       return -ENOMEM;
26895 +               }
26896 +               kfree (port->write_urb->transfer_buffer);
26897 +               port->write_urb->transfer_buffer = buffer;
26898 +               port->write_urb->transfer_buffer_length = buffer_size;
26899 +               port->bulk_out_size = buffer_size;
26900         }
26901 -       
26902 -       up (&port->sem);
26903 -       
26904 +
26905 +       /* Start reading from the device */
26906 +       usb_fill_bulk_urb (
26907 +               port->read_urb,
26908 +               serial->dev, 
26909 +               usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
26910 +               port->read_urb->transfer_buffer,
26911 +               port->read_urb->transfer_buffer_length,
26912 +               ir_read_bulk_callback,
26913 +               port);
26914 +       port->read_urb->transfer_flags = USB_QUEUE_BULK;
26915 +       result = usb_submit_urb(port->read_urb);
26916 +       if (result)
26917 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
26918 +
26919         return result;
26920  }
26921  
26922 @@ -317,21 +332,10 @@
26923         if (!serial)
26924                 return;
26925         
26926 -       down (&port->sem);
26927 -
26928 -       --port->open_count;
26929 -
26930 -       if (port->open_count <= 0) {
26931 -               if (serial->dev) {
26932 -                       /* shutdown our bulk read */
26933 -                       usb_unlink_urb (port->read_urb);
26934 -               }
26935 -               port->active = 0;
26936 -               port->open_count = 0;
26937 -
26938 +       if (serial->dev) {
26939 +               /* shutdown our bulk read */
26940 +               usb_unlink_urb (port->read_urb);
26941         }
26942 -       up (&port->sem);
26943 -       MOD_DEC_USE_COUNT;
26944  }
26945  
26946  static int ir_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count)
26947 @@ -442,7 +446,7 @@
26948                 return;
26949         }
26950  
26951 -       if (!port->active) {
26952 +       if (!port->open_count) {
26953                 dbg("%s - port closed.", __FUNCTION__);
26954                 return;
26955         }
26956 diff -Nur linux-2.4.19.org/drivers/usb/serial/keyspan.c linux-2.4.19/drivers/usb/serial/keyspan.c
26957 --- linux-2.4.19.org/drivers/usb/serial/keyspan.c       Fri Dec 21 18:41:55 2001
26958 +++ linux-2.4.19/drivers/usb/serial/keyspan.c   Thu Oct 31 08:11:24 2002
26959 @@ -1,8 +1,8 @@
26960  /*
26961    Keyspan USB to Serial Converter driver
26962   
26963 -  (C) Copyright (C) 2000-2001
26964 -      Hugh Blemings <hugh@misc.nu>
26965 +  (C) Copyright (C) 2000-2001  Hugh Blemings <hugh@blemings.org>
26966 +  (C) Copyright (C) 2002       Greg Kroah-Hartman <greg@kroah.com>
26967     
26968    This program is free software; you can redistribute it and/or modify
26969    it under the terms of the GNU General Public License as published by
26970 @@ -28,6 +28,17 @@
26971  
26972    Change History
26973  
26974 +    Wed Apr 25 12:00:00 PST 2002 (Keyspan)
26975 +      Started with Hugh Blemings' code dated Jan 17, 2002.  All adapters
26976 +      now supported (including QI and QW).  Modified port open, port
26977 +      close, and send setup() logic to fix various data and endpoint
26978 +      synchronization bugs and device LED status bugs.  Changed keyspan_
26979 +      write_room() to accurately return transmit buffer availability.
26980 +      Changed forwardingLength from 1 to 16 for all adapters.
26981 +
26982 +    Fri Oct 12 16:45:00 EST 2001
26983 +      Preliminary USA-19QI and USA-28 support (both test OK for me, YMMV)
26984 +
26985      Mon Oct  8 14:29:00 EST 2001 hugh
26986        Fixed bug that prevented mulitport devices operating correctly
26987        if they weren't the first unit attached.
26988 @@ -65,19 +76,15 @@
26989  
26990  #include <linux/config.h>
26991  #include <linux/kernel.h>
26992 -#include <linux/sched.h>
26993 -#include <linux/signal.h>
26994  #include <linux/errno.h>
26995 -#include <linux/poll.h>
26996  #include <linux/init.h>
26997  #include <linux/slab.h>
26998 -#include <linux/fcntl.h>
26999  #include <linux/tty.h>
27000  #include <linux/tty_driver.h>
27001  #include <linux/tty_flip.h>
27002  #include <linux/module.h>
27003  #include <linux/spinlock.h>
27004 -#include <linux/usb.h>
27005 +#include <asm/uaccess.h>
27006  
27007  #ifdef CONFIG_USB_SERIAL_DEBUG
27008         static int debug = 1;
27009 @@ -95,7 +102,7 @@
27010  /*
27011   * Version Information
27012   */
27013 -#define DRIVER_VERSION "v1.1.1"
27014 +#define DRIVER_VERSION "v1.1.3"
27015  #define DRIVER_AUTHOR "Hugh Blemings <hugh@misc.nu"
27016  #define DRIVER_DESC "Keyspan USB to Serial Converter Driver"
27017  
27018 @@ -107,13 +114,13 @@
27019         /* number of active ports */
27020         atomic_t        active_count;
27021  
27022 -       const keyspan_device_details    *device_details;
27023 +       const struct keyspan_device_details     *device_details;
27024  
27025 -       urb_t           *instat_urb;
27026 +       struct urb      *instat_urb;
27027         char            instat_buf[INSTAT_BUFLEN];
27028  
27029         /* XXX this one probably will need a lock */
27030 -       urb_t           *glocont_urb;
27031 +       struct urb      *glocont_urb;
27032         char            glocont_buf[GLOCONT_BUFLEN];
27033  };
27034  
27035 @@ -125,21 +132,21 @@
27036         /* Keep duplicate of device details in each port
27037            structure as well - simplifies some of the
27038            callback functions etc. */
27039 -       const keyspan_device_details    *device_details;
27040 +       const struct keyspan_device_details     *device_details;
27041  
27042         /* Input endpoints and buffer for this port */
27043 -       urb_t           *in_urbs[2];
27044 +       struct urb      *in_urbs[2];
27045         char            in_buffer[2][64];
27046         /* Output endpoints and buffer for this port */
27047 -       urb_t           *out_urbs[2];
27048 +       struct urb      *out_urbs[2];
27049         char            out_buffer[2][64];
27050  
27051         /* Input ack endpoint */
27052 -       urb_t           *inack_urb;
27053 +       struct urb      *inack_urb;
27054         char            inack_buffer[1];
27055  
27056         /* Output control endpoint */
27057 -       urb_t           *outcont_urb;
27058 +       struct urb      *outcont_urb;
27059         char            outcont_buffer[64];
27060  
27061         /* Settings for the port */
27062 @@ -167,34 +174,14 @@
27063  #include "keyspan_usa28msg.h"
27064  #include "keyspan_usa49msg.h"
27065         
27066 -/* If you don't get debugging output, uncomment the following
27067 -   two lines to enable cheat. */
27068 -#if 0
27069 -  #undef       dbg 
27070 -  #define      dbg     printk 
27071 -#endif
27072 -
27073  
27074  /* Functions used by new usb-serial code. */
27075  static int __init keyspan_init (void)
27076  {
27077 -       usb_serial_register (&keyspan_usa18x_pre_device);
27078 -       usb_serial_register (&keyspan_usa19_pre_device);
27079 -       usb_serial_register (&keyspan_usa19w_pre_device);
27080 -       usb_serial_register (&keyspan_usa28_pre_device);
27081 -       usb_serial_register (&keyspan_usa28x_pre_device);
27082 -       usb_serial_register (&keyspan_usa28xa_pre_device);
27083 -       usb_serial_register (&keyspan_usa28xb_pre_device);
27084 -       usb_serial_register (&keyspan_usa49w_pre_device);
27085 -
27086 -       usb_serial_register (&keyspan_usa18x_device);
27087 -       usb_serial_register (&keyspan_usa19_device);
27088 -       usb_serial_register (&keyspan_usa19w_device);
27089 -       usb_serial_register (&keyspan_usa28_device);
27090 -       usb_serial_register (&keyspan_usa28x_device);
27091 -       usb_serial_register (&keyspan_usa28xa_device);
27092 -       /* We don't need a separate entry for the usa28xb as it appears as a 28x anyway */
27093 -       usb_serial_register (&keyspan_usa49w_device);
27094 +       usb_serial_register (&keyspan_pre_device);
27095 +       usb_serial_register (&keyspan_1port_device);
27096 +       usb_serial_register (&keyspan_2port_device);
27097 +       usb_serial_register (&keyspan_4port_device);
27098  
27099         info(DRIVER_VERSION ":" DRIVER_DESC);
27100  
27101 @@ -203,23 +190,10 @@
27102  
27103  static void __exit keyspan_exit (void)
27104  {
27105 -       usb_serial_deregister (&keyspan_usa18x_pre_device);
27106 -       usb_serial_deregister (&keyspan_usa19_pre_device);
27107 -       usb_serial_deregister (&keyspan_usa19w_pre_device);
27108 -       usb_serial_deregister (&keyspan_usa28_pre_device);
27109 -       usb_serial_deregister (&keyspan_usa28x_pre_device);
27110 -       usb_serial_deregister (&keyspan_usa28xa_pre_device);
27111 -       usb_serial_deregister (&keyspan_usa28xb_pre_device);
27112 -       usb_serial_deregister (&keyspan_usa49w_pre_device);
27113 -
27114 -       usb_serial_deregister (&keyspan_usa18x_device);
27115 -       usb_serial_deregister (&keyspan_usa19_device);
27116 -       usb_serial_deregister (&keyspan_usa19w_device);
27117 -       usb_serial_deregister (&keyspan_usa28_device);
27118 -       usb_serial_deregister (&keyspan_usa28x_device);
27119 -       usb_serial_deregister (&keyspan_usa28xa_device);
27120 -       /* We don't need a separate entry for the usa28xb as it appears as a 28x anyway */
27121 -       usb_serial_deregister (&keyspan_usa49w_device);
27122 +       usb_serial_deregister (&keyspan_pre_device);
27123 +       usb_serial_deregister (&keyspan_1port_device);
27124 +       usb_serial_deregister (&keyspan_2port_device);
27125 +       usb_serial_deregister (&keyspan_4port_device);
27126  }
27127  
27128  module_init(keyspan_init);
27129 @@ -227,13 +201,13 @@
27130  
27131  static void keyspan_rx_throttle (struct usb_serial_port *port)
27132  {
27133 -       dbg("keyspan_rx_throttle port %d\n", port->number);
27134 +       dbg("%s - port %d", __FUNCTION__, port->number);
27135  }
27136  
27137  
27138  static void keyspan_rx_unthrottle (struct usb_serial_port *port)
27139  {
27140 -       dbg("keyspan_rx_unthrottle port %d\n", port->number);
27141 +       dbg("%s - port %d", __FUNCTION__, port->number);
27142  }
27143  
27144  
27145 @@ -241,7 +215,7 @@
27146  {
27147         struct keyspan_port_private     *p_priv;
27148  
27149 -       dbg("keyspan_break_ctl\n");
27150 +       dbg("%s", __FUNCTION__);
27151  
27152         p_priv = (struct keyspan_port_private *)port->private;
27153  
27154 @@ -257,16 +231,17 @@
27155  static void keyspan_set_termios (struct usb_serial_port *port, 
27156                                      struct termios *old_termios)
27157  {
27158 -       int                             baud_rate;
27159 +       int                             baud_rate, device_port;
27160         struct keyspan_port_private     *p_priv;
27161 -       const keyspan_device_details    *d_details;
27162 +       const struct keyspan_device_details     *d_details;
27163         unsigned int                    cflag;
27164  
27165 -       dbg(__FUNCTION__ ".\n"); 
27166 +       dbg("%s", __FUNCTION__); 
27167  
27168         p_priv = (struct keyspan_port_private *)(port->private);
27169         d_details = p_priv->device_details;
27170         cflag = port->tty->termios->c_cflag;
27171 +       device_port = port->number - port->serial->minor;
27172  
27173         /* Baud rate calculation takes baud rate as an integer
27174            so other rates can be generated if desired. */
27175 @@ -274,7 +249,7 @@
27176         /* If no match or invalid, don't change */              
27177         if (baud_rate >= 0
27178             && d_details->calculate_baud_rate(baud_rate, d_details->baudclk,
27179 -                               NULL, NULL, NULL) == KEYSPAN_BAUD_RATE_OK) {
27180 +                               NULL, NULL, NULL, device_port) == KEYSPAN_BAUD_RATE_OK) {
27181                 /* FIXME - more to do here to ensure rate changes cleanly */
27182                 p_priv->baud = baud_rate;
27183         }
27184 @@ -337,19 +312,17 @@
27185                          const unsigned char *buf, int count)
27186  {
27187         struct keyspan_port_private     *p_priv;
27188 -       const keyspan_device_details    *d_details;
27189 +       const struct keyspan_device_details     *d_details;
27190         int                             flip;
27191         int                             left, todo;
27192 -       urb_t                           *this_urb;
27193 +       struct urb                      *this_urb;
27194         int                             err;
27195  
27196         p_priv = (struct keyspan_port_private *)(port->private);
27197         d_details = p_priv->device_details;
27198  
27199 -#if 0
27200 -       dbg(__FUNCTION__ " for port %d (%d chars [%x]), flip=%d\n",
27201 -           port->number, count, buf[0], p_priv->out_flip);
27202 -#endif
27203 +       dbg("%s - for port %d (%d chars [%x]), flip=%d",
27204 +           __FUNCTION__, port->number, count, buf[0], p_priv->out_flip);
27205  
27206         for (left = count; left > 0; left -= todo) {
27207                 todo = left;
27208 @@ -361,11 +334,11 @@
27209                 /* Check we have a valid urb/endpoint before we use it... */
27210                 if ((this_urb = p_priv->out_urbs[flip]) == 0) {
27211                         /* no bulk out, so return 0 bytes written */
27212 -                       dbg(__FUNCTION__ " no output urb :(\n");
27213 +                       dbg("%s - no output urb :(", __FUNCTION__);
27214                         return count;
27215                 }
27216  
27217 -               dbg(__FUNCTION__ " endpoint %d\n", usb_pipeendpoint(this_urb->pipe));
27218 +               dbg("%s - endpoint %d flip %d", __FUNCTION__, usb_pipeendpoint(this_urb->pipe), flip);
27219  
27220                 if (this_urb->status == -EINPROGRESS) {
27221                         if (this_urb->transfer_flags & USB_ASYNC_UNLINK)
27222 @@ -395,7 +368,7 @@
27223                 this_urb->transfer_flags &= ~USB_ASYNC_UNLINK;
27224                 this_urb->dev = port->serial->dev;
27225                 if ((err = usb_submit_urb(this_urb)) != 0) {
27226 -                       dbg("usb_submit_urb(write bulk) failed (%d)\n", err);
27227 +                       dbg("usb_submit_urb(write bulk) failed (%d)", err);
27228                 }
27229                 p_priv->tx_start_time[flip] = jiffies;
27230  
27231 @@ -415,26 +388,28 @@
27232         struct tty_struct       *tty;
27233         unsigned char           *data = urb->transfer_buffer;
27234  
27235 -       dbg ("%s\n", __FUNCTION__); 
27236 +       dbg ("%s", __FUNCTION__); 
27237  
27238         endpoint = usb_pipeendpoint(urb->pipe);
27239  
27240         if (urb->status) {
27241 -               dbg(__FUNCTION__ "nonzero status: %x on endpoint %d.\n",
27242 -                                       urb->status, endpoint);
27243 +               dbg("%s - nonzero status: %x on endpoint %d.",
27244 +                   __FUNCTION__, urb->status, endpoint);
27245                 return;
27246         }
27247  
27248         port = (struct usb_serial_port *) urb->context;
27249         tty = port->tty;
27250         if (urb->actual_length) {
27251 -               if (data[0] == 0) {
27252 +               /* 0x80 bit is error flag */
27253 +               if ((data[0] & 0x80) == 0) {
27254                         /* no error on any byte */
27255                         for (i = 1; i < urb->actual_length ; ++i) {
27256                                 tty_insert_flip_char(tty, data[i], 0);
27257                         }
27258                 } else {
27259                         /* some bytes had errors, every byte has status */
27260 +                       dbg("%s - RX error!!!!", __FUNCTION__);
27261                         for (i = 0; i + 1 < urb->actual_length; i += 2) {
27262                                 int stat = data[i], flag = 0;
27263                                 if (stat & RXERROR_OVERRUN)
27264 @@ -452,9 +427,10 @@
27265                                 
27266                 /* Resubmit urb so we continue receiving */
27267         urb->dev = port->serial->dev;
27268 -       if ((err = usb_submit_urb(urb)) != 0) {
27269 -               dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
27270 -       }
27271 +       if (port->open_count)
27272 +               if ((err = usb_submit_urb(urb)) != 0) {
27273 +                       dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
27274 +               }
27275         return;
27276  }
27277  
27278 @@ -466,9 +442,9 @@
27279  
27280         port = (struct usb_serial_port *) urb->context;
27281         p_priv = (struct keyspan_port_private *)(port->private);
27282 -       dbg (__FUNCTION__ " urb %d\n", urb == p_priv->out_urbs[1]); 
27283 +       dbg ("%s - urb %d", __FUNCTION__, urb == p_priv->out_urbs[1]); 
27284  
27285 -       if (port->active) {
27286 +       if (port->open_count) {
27287                 queue_task(&port->tqueue, &tq_immediate);
27288                 mark_bh(IMMEDIATE_BH);
27289         }
27290 @@ -476,7 +452,7 @@
27291  
27292  static void    usa26_inack_callback(struct urb *urb)
27293  {
27294 -       dbg ("%s\n", __FUNCTION__); 
27295 +       dbg ("%s", __FUNCTION__); 
27296         
27297  }
27298  
27299 @@ -489,15 +465,15 @@
27300         p_priv = (struct keyspan_port_private *)(port->private);
27301  
27302         if (p_priv->resend_cont) {
27303 -               dbg (__FUNCTION__ " sending setup\n"); 
27304 -               keyspan_usa26_send_setup(port->serial, port, 0);
27305 +               dbg ("%s - sending setup", __FUNCTION__); 
27306 +               keyspan_usa26_send_setup(port->serial, port, p_priv->resend_cont - 1);
27307         }
27308  }
27309  
27310  static void    usa26_instat_callback(struct urb *urb)
27311  {
27312         unsigned char                           *data = urb->transfer_buffer;
27313 -       keyspan_usa26_portStatusMessage         *msg;
27314 +       struct keyspan_usa26_portStatusMessage  *msg;
27315         struct usb_serial                       *serial;
27316         struct usb_serial_port                  *port;
27317         struct keyspan_port_private             *p_priv;
27318 @@ -506,19 +482,19 @@
27319         serial = (struct usb_serial *) urb->context;
27320  
27321         if (urb->status) {
27322 -               dbg(__FUNCTION__ " nonzero status: %x\n", urb->status);
27323 +               dbg("%s - nonzero status: %x", __FUNCTION__, urb->status);
27324                 return;
27325         }
27326         if (urb->actual_length != 9) {
27327 -               dbg(__FUNCTION__ " %d byte report??\n", urb->actual_length);
27328 +               dbg("%s - %d byte report??", __FUNCTION__, urb->actual_length);
27329                 goto exit;
27330         }
27331  
27332 -       msg = (keyspan_usa26_portStatusMessage *)data;
27333 +       msg = (struct keyspan_usa26_portStatusMessage *)data;
27334  
27335  #if 0
27336 -       dbg(__FUNCTION__ " port status: port %d cts %d dcd %d dsr %d ri %d toff %d txoff %d rxen %d cr %d\n",
27337 -           msg->port, msg->hskia_cts, msg->gpia_dcd, msg->dsr, msg->ri, msg->_txOff,
27338 +       dbg("%s - port status: port %d cts %d dcd %d dsr %d ri %d toff %d txoff %d rxen %d cr %d",
27339 +           __FUNCTION__, msg->port, msg->hskia_cts, msg->gpia_dcd, msg->dsr, msg->ri, msg->_txOff,
27340             msg->_txXoff, msg->rxEnabled, msg->controlResponse);
27341  #endif
27342  
27343 @@ -527,7 +503,7 @@
27344  
27345         /* Check port number from message and retrieve private data */  
27346         if (msg->port >= serial->num_ports) {
27347 -               dbg ("Unexpected port number %d\n", msg->port);
27348 +               dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->port);
27349                 goto exit;
27350         }
27351         port = &serial->port[msg->port];
27352 @@ -548,17 +524,17 @@
27353                 /*      wake_up_interruptible(&p_priv->open_wait); */
27354         }
27355         
27356 -exit:
27357         /* Resubmit urb so we continue receiving */
27358         urb->dev = serial->dev;
27359         if ((err = usb_submit_urb(urb)) != 0) {
27360 -               dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
27361 +               dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
27362         }
27363 +exit:
27364  }
27365  
27366  static void    usa26_glocont_callback(struct urb *urb)
27367  {
27368 -       dbg ("%s\n", __FUNCTION__);
27369 +       dbg ("%s", __FUNCTION__);
27370         
27371  }
27372  
27373 @@ -571,7 +547,7 @@
27374         unsigned char           *data;
27375         struct keyspan_port_private             *p_priv;
27376  
27377 -       dbg ("%s\n", __FUNCTION__);
27378 +       dbg ("%s", __FUNCTION__);
27379  
27380         port = (struct usb_serial_port *) urb->context;
27381         p_priv = (struct keyspan_port_private *)(port->private);
27382 @@ -582,9 +558,8 @@
27383  
27384         do {
27385                 if (urb->status) {
27386 -                       dbg(__FUNCTION__ "nonzero status: %x on endpoint
27387 -%d.\n",
27388 -                           urb->status, usb_pipeendpoint(urb->pipe));
27389 +                       dbg("%s - nonzero status: %x on endpoint %d.",
27390 +                           __FUNCTION__, urb->status, usb_pipeendpoint(urb->pipe));
27391                         return;
27392                 }
27393  
27394 @@ -602,10 +577,10 @@
27395  
27396                 /* Resubmit urb so we continue receiving */
27397                 urb->dev = port->serial->dev;
27398 -               if ((err = usb_submit_urb(urb)) != 0) {
27399 -                       dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n",
27400 -err);
27401 -               }
27402 +               if (port->open_count)
27403 +                       if ((err = usb_submit_urb(urb)) != 0) {
27404 +                               dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
27405 +                       }
27406                 p_priv->in_flip ^= 1;
27407  
27408                 urb = p_priv->in_urbs[p_priv->in_flip];
27409 @@ -614,7 +589,7 @@
27410  
27411  static void    usa28_inack_callback(struct urb *urb)
27412  {
27413 -       dbg ("%s\n", __FUNCTION__);
27414 +       dbg ("%s", __FUNCTION__);
27415  }
27416  
27417  static void    usa28_outcont_callback(struct urb *urb)
27418 @@ -626,8 +601,8 @@
27419         p_priv = (struct keyspan_port_private *)(port->private);
27420  
27421         if (p_priv->resend_cont) {
27422 -               dbg (__FUNCTION__ " sending setup\n");
27423 -               keyspan_usa28_send_setup(port->serial, port, 0);
27424 +               dbg ("%s - sending setup", __FUNCTION__);
27425 +               keyspan_usa28_send_setup(port->serial, port, p_priv->resend_cont - 1);
27426         }
27427  }
27428  
27429 @@ -635,7 +610,7 @@
27430  {
27431         int                                     err;
27432         unsigned char                           *data = urb->transfer_buffer;
27433 -       keyspan_usa28_portStatusMessage         *msg;
27434 +       struct keyspan_usa28_portStatusMessage  *msg;
27435         struct usb_serial                       *serial;
27436         struct usb_serial_port                  *port;
27437         struct keyspan_port_private             *p_priv;
27438 @@ -644,26 +619,26 @@
27439         serial = (struct usb_serial *) urb->context;
27440  
27441         if (urb->status) {
27442 -               dbg(__FUNCTION__ " nonzero status: %x\n", urb->status);
27443 +               dbg("%s - nonzero status: %x", __FUNCTION__, urb->status);
27444                 return;
27445         }
27446  
27447         if (urb->actual_length != sizeof(struct keyspan_usa28_portStatusMessage)) {
27448 -               dbg(__FUNCTION__ " bad length %d\n", urb->actual_length);
27449 +               dbg("%s - bad length %d", __FUNCTION__, urb->actual_length);
27450                 goto exit;
27451         }
27452  
27453 -       /*dbg(__FUNCTION__ " %x %x %x %x %x %x %x %x %x %x %x %x\n",
27454 +       /*dbg("%s %x %x %x %x %x %x %x %x %x %x %x %x", __FUNCTION__
27455             data[0], data[1], data[2], data[3], data[4], data[5],
27456             data[6], data[7], data[8], data[9], data[10], data[11]);*/
27457         
27458                 /* Now do something useful with the data */
27459 -       msg = (keyspan_usa28_portStatusMessage *)data;
27460 +       msg = (struct keyspan_usa28_portStatusMessage *)data;
27461  
27462  
27463                 /* Check port number from message and retrieve private data */  
27464         if (msg->port >= serial->num_ports) {
27465 -               dbg ("Unexpected port number %d\n", msg->port);
27466 +               dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->port);
27467                 goto exit;
27468         }
27469         port = &serial->port[msg->port];
27470 @@ -684,17 +659,17 @@
27471                 /*      wake_up_interruptible(&p_priv->open_wait); */
27472         }
27473  
27474 -exit:  
27475                 /* Resubmit urb so we continue receiving */
27476         urb->dev = serial->dev;
27477         if ((err = usb_submit_urb(urb)) != 0) {
27478 -               dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
27479 +               dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
27480         }
27481 +exit:  
27482  }
27483  
27484  static void    usa28_glocont_callback(struct urb *urb)
27485  {
27486 -       dbg ("%s\n", __FUNCTION__);
27487 +       dbg ("%s", __FUNCTION__);
27488  }
27489  
27490  
27491 @@ -705,7 +680,7 @@
27492         struct keyspan_port_private *p_priv;
27493         int i;
27494  
27495 -       dbg ("%s\n", __FUNCTION__);
27496 +       dbg ("%s", __FUNCTION__);
27497  
27498         serial = (struct usb_serial *) urb->context;
27499         for (i = 0; i < serial->num_ports; ++i) {
27500 @@ -713,8 +688,8 @@
27501                 p_priv = (struct keyspan_port_private *)(port->private);
27502  
27503                 if (p_priv->resend_cont) {
27504 -                       dbg (__FUNCTION__ " sending setup\n"); 
27505 -                       keyspan_usa49_send_setup(serial, port, 0);
27506 +                       dbg ("%s - sending setup", __FUNCTION__); 
27507 +                       keyspan_usa49_send_setup(serial, port, p_priv->resend_cont - 1);
27508                         break;
27509                 }
27510         }
27511 @@ -726,36 +701,36 @@
27512  {
27513         int                                     err;
27514         unsigned char                           *data = urb->transfer_buffer;
27515 -       keyspan_usa49_portStatusMessage         *msg;
27516 +       struct keyspan_usa49_portStatusMessage  *msg;
27517         struct usb_serial                       *serial;
27518         struct usb_serial_port                  *port;
27519         struct keyspan_port_private             *p_priv;
27520         int old_dcd_state;
27521  
27522 -       dbg ("%s\n", __FUNCTION__);
27523 +       dbg ("%s", __FUNCTION__);
27524  
27525         serial = (struct usb_serial *) urb->context;
27526  
27527         if (urb->status) {
27528 -               dbg(__FUNCTION__ " nonzero status: %x\n", urb->status);
27529 +               dbg("%s - nonzero status: %x", __FUNCTION__, urb->status);
27530                 return;
27531         }
27532  
27533         if (urb->actual_length != sizeof(struct keyspan_usa49_portStatusMessage)) {
27534 -               dbg(__FUNCTION__ " bad length %d\n", urb->actual_length);
27535 +               dbg("%s - bad length %d", __FUNCTION__, urb->actual_length);
27536                 goto exit;
27537         }
27538  
27539 -       /*dbg(__FUNCTION__ " %x %x %x %x %x %x %x %x %x %x %x\n",
27540 +       /*dbg(" %x %x %x %x %x %x %x %x %x %x %x", __FUNCTION__, 
27541             data[0], data[1], data[2], data[3], data[4], data[5],
27542             data[6], data[7], data[8], data[9], data[10]);*/
27543         
27544                 /* Now do something useful with the data */
27545 -       msg = (keyspan_usa49_portStatusMessage *)data;
27546 +       msg = (struct keyspan_usa49_portStatusMessage *)data;
27547  
27548                 /* Check port number from message and retrieve private data */  
27549         if (msg->portNumber >= serial->num_ports) {
27550 -               dbg ("Unexpected port number %d\n", msg->portNumber);
27551 +               dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->portNumber);
27552                 goto exit;
27553         }
27554         port = &serial->port[msg->portNumber];
27555 @@ -776,18 +751,18 @@
27556                 /*      wake_up_interruptible(&p_priv->open_wait); */
27557         }
27558  
27559 -exit:  
27560                 /* Resubmit urb so we continue receiving */
27561         urb->dev = serial->dev;
27562  
27563         if ((err = usb_submit_urb(urb)) != 0) {
27564 -               dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
27565 +               dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
27566         }
27567 +exit:  
27568  }
27569  
27570  static void    usa49_inack_callback(struct urb *urb)
27571  {
27572 -       dbg ("%s\n", __FUNCTION__);
27573 +       dbg ("%s", __FUNCTION__);
27574  }
27575  
27576  static void    usa49_indat_callback(struct urb *urb)
27577 @@ -798,20 +773,21 @@
27578         struct tty_struct       *tty;
27579         unsigned char           *data = urb->transfer_buffer;
27580  
27581 -       dbg ("%s\n", __FUNCTION__);
27582 +       dbg ("%s", __FUNCTION__);
27583  
27584         endpoint = usb_pipeendpoint(urb->pipe);
27585  
27586         if (urb->status) {
27587 -               dbg(__FUNCTION__ "nonzero status: %x on endpoint %d.\n",
27588 -                                       urb->status, endpoint);
27589 +               dbg("%s - nonzero status: %x on endpoint %d.", __FUNCTION__,
27590 +                   urb->status, endpoint);
27591                 return;
27592         }
27593  
27594         port = (struct usb_serial_port *) urb->context;
27595         tty = port->tty;
27596         if (urb->actual_length) {
27597 -               if (data[0] == 0) {
27598 +               /* 0x80 bit is error flag */
27599 +               if ((data[0] & 0x80) == 0) {
27600                         /* no error on any byte */
27601                         for (i = 1; i < urb->actual_length ; ++i) {
27602                                 tty_insert_flip_char(tty, data[i], 0);
27603 @@ -835,24 +811,43 @@
27604                                 
27605                 /* Resubmit urb so we continue receiving */
27606         urb->dev = port->serial->dev;
27607 -       if ((err = usb_submit_urb(urb)) != 0) {
27608 -               dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
27609 -       }
27610 +       if (port->open_count)
27611 +               if ((err = usb_submit_urb(urb)) != 0) {
27612 +                       dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
27613 +               }
27614  }
27615  
27616  /* not used, usa-49 doesn't have per-port control endpoints */
27617  static void    usa49_outcont_callback(struct urb *urb)
27618  {
27619 -       dbg ("%s\n", __FUNCTION__);
27620 +       dbg ("%s", __FUNCTION__);
27621  }
27622  
27623  
27624  
27625  static int keyspan_write_room (struct usb_serial_port *port)
27626  {
27627 -       dbg("keyspan_write_room called\n");
27628 -       return (32);
27629 +       struct keyspan_port_private     *p_priv;
27630 +       const struct keyspan_device_details     *d_details;
27631 +       int                             flip;
27632 +       struct urb                      *this_urb;
27633  
27634 +       dbg("%s", __FUNCTION__);
27635 +       p_priv = (struct keyspan_port_private *)(port->private);
27636 +       d_details = p_priv->device_details;
27637 +
27638 +       flip = p_priv->out_flip;
27639 +
27640 +       /* Check both endpoints to see if any are available. */
27641 +       if ((this_urb = p_priv->out_urbs[flip]) != 0) {
27642 +               if (this_urb->status != -EINPROGRESS)
27643 +                       return (63);
27644 +               flip = (flip + 1) & d_details->outdat_endp_flip;        
27645 +               if ((this_urb = p_priv->out_urbs[flip]) != 0) 
27646 +                       if (this_urb->status != -EINPROGRESS)
27647 +                               return (63);
27648 +       }
27649 +       return (0);
27650  }
27651  
27652  
27653 @@ -867,26 +862,15 @@
27654         struct keyspan_port_private     *p_priv;
27655         struct keyspan_serial_private   *s_priv;
27656         struct usb_serial               *serial = port->serial;
27657 -       const keyspan_device_details    *d_details;
27658 -       int                             i, already_active, err;
27659 -       urb_t *urb;
27660 +       const struct keyspan_device_details     *d_details;
27661 +       int                             i, err;
27662 +       struct urb                      *urb;
27663  
27664         s_priv = (struct keyspan_serial_private *)(serial->private);
27665         p_priv = (struct keyspan_port_private *)(port->private);
27666         d_details = s_priv->device_details;
27667         
27668 -       dbg("keyspan_open called for port%d.\n", port->number); 
27669 -
27670 -       MOD_INC_USE_COUNT;
27671 -
27672 -       down (&port->sem);
27673 -       ++port->open_count;
27674 -       already_active = port->active;
27675 -       port->active = 1;
27676 -       up (&port->sem);
27677 -
27678 -       if (already_active)
27679 -               return 0;
27680 +       dbg("%s - port%d.", __FUNCTION__, port->number); 
27681  
27682         p_priv = (struct keyspan_port_private *)(port->private);
27683         
27684 @@ -894,22 +878,37 @@
27685         p_priv->rts_state = 1;
27686         p_priv->dtr_state = 1;
27687  
27688 -       /* Start reading from endpoints */
27689 +       p_priv->out_flip = 0;
27690 +       p_priv->in_flip = 0;
27691 +
27692 +       /* Reset low level data toggle and start reading from endpoints */
27693         for (i = 0; i < 2; i++) {
27694                 if ((urb = p_priv->in_urbs[i]) == NULL)
27695                         continue;
27696                 urb->dev = serial->dev;
27697 +               usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe), 0);
27698 +
27699                 if ((err = usb_submit_urb(urb)) != 0) {
27700 -                       dbg(__FUNCTION__ " submit urb %d failed (%d)\n", i, err);
27701 +                       dbg("%s - submit urb %d failed (%d)", __FUNCTION__, i, err);
27702                 }
27703         }
27704  
27705 +       /* Reset low level data toggle on out endpoints */
27706 +       for (i = 0; i < 2; i++) {
27707 +               if ((urb = p_priv->out_urbs[i]) == NULL)
27708 +                       continue;
27709 +               urb->dev = serial->dev;
27710 +               /* usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe), 0); */
27711 +       }
27712 +
27713 +       keyspan_send_setup(port, 1);
27714 +       //mdelay(100);
27715         keyspan_set_termios(port, NULL);
27716  
27717         return (0);
27718  }
27719  
27720 -static inline void stop_urb(urb_t *urb)
27721 +static inline void stop_urb(struct urb *urb)
27722  {
27723         if (urb && urb->status == -EINPROGRESS) {
27724                 urb->transfer_flags &= ~USB_ASYNC_UNLINK;
27725 @@ -928,44 +927,37 @@
27726         if (!serial)
27727                 return;
27728  
27729 -       dbg("keyspan_close called\n");
27730 +       dbg("%s", __FUNCTION__);
27731         s_priv = (struct keyspan_serial_private *)(serial->private);
27732         p_priv = (struct keyspan_port_private *)(port->private);
27733         
27734         p_priv->rts_state = 0;
27735         p_priv->dtr_state = 0;
27736         
27737 -       if (serial->dev)
27738 -               keyspan_send_setup(port, 1);
27739 +       if (serial->dev) {
27740 +               keyspan_send_setup(port, 2);
27741 +               /* pilot-xfer seems to work best with this delay */
27742 +               mdelay(100);
27743 +               keyspan_set_termios(port, NULL);
27744 +       }
27745  
27746         /*while (p_priv->outcont_urb->status == -EINPROGRESS) {
27747 -               dbg("close - urb in progress\n");
27748 +               dbg("%s - urb in progress", __FUNCTION__);
27749         }*/
27750  
27751         p_priv->out_flip = 0;
27752         p_priv->in_flip = 0;
27753  
27754 -       down (&port->sem);
27755 -
27756 -       if (--port->open_count <= 0) {
27757 -               if (port->active) {
27758 -                       if (serial->dev) {
27759 -                               /* Stop reading/writing urbs */
27760 -                               stop_urb(p_priv->inack_urb);
27761 -                               stop_urb(p_priv->outcont_urb);
27762 -                               for (i = 0; i < 2; i++) {
27763 -                                       stop_urb(p_priv->in_urbs[i]);
27764 -                                       stop_urb(p_priv->out_urbs[i]);
27765 -                               }
27766 -                       }
27767 +       if (serial->dev) {
27768 +               /* Stop reading/writing urbs */
27769 +               stop_urb(p_priv->inack_urb);
27770 +               /* stop_urb(p_priv->outcont_urb); */
27771 +               for (i = 0; i < 2; i++) {
27772 +                       stop_urb(p_priv->in_urbs[i]);
27773 +                       stop_urb(p_priv->out_urbs[i]);
27774                 }
27775 -               port->active = 0;
27776 -               port->open_count = 0;
27777 -               port->tty = 0;
27778         }
27779 -       up (&port->sem);
27780 -
27781 -       MOD_DEC_USE_COUNT;
27782 +       port->tty = 0;
27783  }
27784  
27785  
27786 @@ -976,12 +968,12 @@
27787         const struct ezusb_hex_record   *record;
27788         char                            *fw_name;
27789  
27790 -       dbg("Keyspan startup version %04x product %04x\n",
27791 +       dbg("Keyspan startup version %04x product %04x",
27792             serial->dev->descriptor.bcdDevice,
27793             serial->dev->descriptor.idProduct); 
27794         
27795         if ((serial->dev->descriptor.bcdDevice & 0x8000) != 0x8000) {
27796 -               dbg("Firmware already loaded.  Quitting.\n");
27797 +               dbg("Firmware already loaded.  Quitting.");
27798                 return(1);
27799         }
27800  
27801 @@ -1012,6 +1004,16 @@
27802                 fw_name = "USA19";
27803                 break;
27804                              
27805 +       case keyspan_usa19qi_pre_product_id:
27806 +               record = &keyspan_usa19qi_firmware[0];
27807 +               fw_name = "USA19QI";
27808 +               break;
27809 +                            
27810 +       case keyspan_usa19qw_pre_product_id:
27811 +               record = &keyspan_usa19qw_firmware[0];
27812 +               fw_name = "USA19QI";
27813 +               break;
27814 +                            
27815         case keyspan_usa18x_pre_product_id:
27816                 record = &keyspan_usa18x_firmware[0];
27817                 fw_name = "USA18X";
27818 @@ -1038,7 +1040,7 @@
27819                 return(1);
27820         }
27821  
27822 -       dbg("Uploading Keyspan %s firmware.\n", fw_name);
27823 +       dbg("Uploading Keyspan %s firmware.", fw_name);
27824  
27825                 /* download the firmware image */
27826         response = ezusb_set_reset(serial, 1);
27827 @@ -1065,19 +1067,19 @@
27828  }
27829  
27830  /* Helper functions used by keyspan_setup_urbs */
27831 -static urb_t *keyspan_setup_urb(struct usb_serial *serial, int endpoint,
27832 -                               int dir, void *ctx, char *buf, int len,
27833 -                               void (*callback)(urb_t *))
27834 +static struct urb *keyspan_setup_urb (struct usb_serial *serial, int endpoint,
27835 +                                     int dir, void *ctx, char *buf, int len,
27836 +                                     void (*callback)(struct urb *))
27837  {
27838 -       urb_t *urb;
27839 +       struct urb *urb;
27840  
27841         if (endpoint == -1)
27842                 return NULL;            /* endpoint not needed */
27843  
27844 -       dbg (__FUNCTION__ " alloc for endpoint %d.\n", endpoint);
27845 +       dbg ("%s - alloc for endpoint %d.", __FUNCTION__, endpoint);
27846         urb = usb_alloc_urb(0);         /* No ISO */
27847         if (urb == NULL) {
27848 -               dbg (__FUNCTION__ " alloc for endpoint %d failed.\n", endpoint);
27849 +               dbg ("%s - alloc for endpoint %d failed.", __FUNCTION__, endpoint);
27850                 return NULL;
27851         }
27852  
27853 @@ -1090,37 +1092,37 @@
27854  }
27855  
27856  static struct callbacks {
27857 -       void    (*instat_callback)(urb_t *);
27858 -       void    (*glocont_callback)(urb_t *);
27859 -       void    (*indat_callback)(urb_t *);
27860 -       void    (*outdat_callback)(urb_t *);
27861 -       void    (*inack_callback)(urb_t *);
27862 -       void    (*outcont_callback)(urb_t *);
27863 +       void    (*instat_callback)(struct urb *);
27864 +       void    (*glocont_callback)(struct urb *);
27865 +       void    (*indat_callback)(struct urb *);
27866 +       void    (*outdat_callback)(struct urb *);
27867 +       void    (*inack_callback)(struct urb *);
27868 +       void    (*outcont_callback)(struct urb *);
27869  } keyspan_callbacks[] = {
27870         {
27871                 /* msg_usa26 callbacks */
27872 -               instat_callback: usa26_instat_callback,
27873 -               glocont_callback: usa26_glocont_callback,
27874 -               indat_callback: usa26_indat_callback,
27875 -               outdat_callback: usa2x_outdat_callback,
27876 -               inack_callback: usa26_inack_callback,
27877 -               outcont_callback: usa26_outcont_callback,
27878 +               .instat_callback =      usa26_instat_callback,
27879 +               .glocont_callback =     usa26_glocont_callback,
27880 +               .indat_callback =       usa26_indat_callback,
27881 +               .outdat_callback =      usa2x_outdat_callback,
27882 +               .inack_callback =       usa26_inack_callback,
27883 +               .outcont_callback =     usa26_outcont_callback,
27884         }, {
27885                 /* msg_usa28 callbacks */
27886 -               instat_callback: usa28_instat_callback,
27887 -               glocont_callback: usa28_glocont_callback,
27888 -               indat_callback: usa28_indat_callback,
27889 -               outdat_callback: usa2x_outdat_callback,
27890 -               inack_callback: usa28_inack_callback,
27891 -               outcont_callback: usa28_outcont_callback,
27892 +               .instat_callback =      usa28_instat_callback,
27893 +               .glocont_callback =     usa28_glocont_callback,
27894 +               .indat_callback =       usa28_indat_callback,
27895 +               .outdat_callback =      usa2x_outdat_callback,
27896 +               .inack_callback =       usa28_inack_callback,
27897 +               .outcont_callback =     usa28_outcont_callback,
27898         }, {
27899                 /* msg_usa49 callbacks */
27900 -               instat_callback: usa49_instat_callback,
27901 -               glocont_callback: usa49_glocont_callback,
27902 -               indat_callback: usa49_indat_callback,
27903 -               outdat_callback: usa2x_outdat_callback,
27904 -               inack_callback: usa49_inack_callback,
27905 -               outcont_callback: usa49_outcont_callback,
27906 +               .instat_callback =      usa49_instat_callback,
27907 +               .glocont_callback =     usa49_glocont_callback,
27908 +               .indat_callback =       usa49_indat_callback,
27909 +               .outdat_callback =      usa2x_outdat_callback,
27910 +               .inack_callback =       usa49_inack_callback,
27911 +               .outcont_callback =     usa49_outcont_callback,
27912         }
27913  };
27914  
27915 @@ -1130,13 +1132,13 @@
27916  {
27917         int                             i, j;
27918         struct keyspan_serial_private   *s_priv;
27919 -       const keyspan_device_details    *d_details;
27920 +       const struct keyspan_device_details     *d_details;
27921         struct usb_serial_port          *port;
27922         struct keyspan_port_private     *p_priv;
27923         struct callbacks                *cback;
27924         int                             endp;
27925  
27926 -       dbg ("%s\n", __FUNCTION__);
27927 +       dbg ("%s", __FUNCTION__);
27928  
27929         s_priv = (struct keyspan_serial_private *)(serial->private);
27930         d_details = s_priv->device_details;
27931 @@ -1198,13 +1200,14 @@
27932  }
27933  
27934  /* usa19 function doesn't require prescaler */
27935 -static int keyspan_usa19_calc_baud(u32 baud_rate, u32 baudclk,
27936 -                                  u8 *rate_hi, u8 *rate_low, u8 *prescaler)
27937 +static int keyspan_usa19_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
27938 +                                  u8 *rate_low, u8 *prescaler, int portnum)
27939  {
27940         u32     b16,    /* baud rate times 16 (actual rate used internally) */
27941                 div,    /* divisor */   
27942                 cnt;    /* inverse of divisor (programmed into 8051) */
27943                 
27944 +       dbg ("%s - %d.", __FUNCTION__, baud_rate);
27945  
27946                 /* prevent divide by zero...  */
27947         if( (b16 = (baud_rate * 16L)) == 0) {
27948 @@ -1237,14 +1240,14 @@
27949                 *rate_hi = (u8) ((cnt >> 8) & 0xff);
27950         }
27951         if (rate_low && rate_hi) {
27952 -               dbg (__FUNCTION__ " %d %02x %02x.", baud_rate, *rate_hi, *rate_low);
27953 +               dbg ("%s - %d %02x %02x.", __FUNCTION__, baud_rate, *rate_hi, *rate_low);
27954         }
27955         
27956         return (KEYSPAN_BAUD_RATE_OK);
27957  }
27958  
27959 -static int keyspan_usa19w_calc_baud(u32 baud_rate, u32 baudclk,
27960 -                                   u8 *rate_hi, u8 *rate_low, u8 *prescaler)
27961 +static int keyspan_usa19w_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
27962 +                                   u8 *rate_low, u8 *prescaler, int portnum)
27963  {
27964         u32     b16,    /* baud rate times 16 (actual rate used internally) */
27965                 clk,    /* clock with 13/8 prescaler */
27966 @@ -1255,7 +1258,7 @@
27967         u8      best_prescaler;
27968         int     i;
27969  
27970 -       dbg (__FUNCTION__ " %d.\n", baud_rate);
27971 +       dbg ("%s - %d.", __FUNCTION__, baud_rate);
27972  
27973                 /* prevent divide by zero */
27974         if( (b16 = baud_rate * 16L) == 0) {
27975 @@ -1271,8 +1274,7 @@
27976                 /* 0 is an invalid prescaler, used as a flag */
27977         best_prescaler = 0;
27978  
27979 -       for(i = 8; i <= 0xff; ++i)
27980 -       {
27981 +       for(i = 8; i <= 0xff; ++i) {
27982                 clk = (baudclk * 8) / (u32) i;
27983                 
27984                 if( (div = clk / b16) == 0) {
27985 @@ -1282,8 +1284,7 @@
27986                 res = clk / div;
27987                 diff= (res > b16) ? (res-b16) : (b16-res);
27988  
27989 -               if(diff < smallest_diff)
27990 -               {
27991 +               if(diff < smallest_diff) {
27992                         best_prescaler = i;
27993                         smallest_diff = diff;
27994                 }
27995 @@ -1305,8 +1306,59 @@
27996         }
27997         if (prescaler) {
27998                 *prescaler = best_prescaler;
27999 -               /*  dbg(__FUNCTION__ " %d %d", *prescaler, div); */
28000 +               /*  dbg("%s - %d %d", __FUNCTION__, *prescaler, div); */
28001 +       }
28002 +       return (KEYSPAN_BAUD_RATE_OK);
28003 +}
28004 +
28005 +       /* USA-28 supports different maximum baud rates on each port */
28006 +static int keyspan_usa28_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
28007 +                                   u8 *rate_low, u8 *prescaler, int portnum)
28008 +{
28009 +       u32     b16,    /* baud rate times 16 (actual rate used internally) */
28010 +               div,    /* divisor */   
28011 +               cnt;    /* inverse of divisor (programmed into 8051) */
28012 +
28013 +       dbg ("%s - %d.", __FUNCTION__, baud_rate);
28014 +
28015 +               /* prevent divide by zero */
28016 +       if ((b16 = baud_rate * 16L) == 0)
28017 +               return (KEYSPAN_INVALID_BAUD_RATE);
28018 +
28019 +               /* calculate the divisor and the counter (its inverse) */
28020 +       if ((div = (KEYSPAN_USA28_BAUDCLK / b16)) == 0) {
28021 +               return (KEYSPAN_INVALID_BAUD_RATE);
28022 +       }
28023 +       else {
28024 +               cnt = 0 - div;
28025 +       }
28026 +
28027 +               /* check for out of range, based on portnum, 
28028 +                  and return result */
28029 +       if(portnum == 0) {
28030 +               if(div > 0xffff)
28031 +                       return (KEYSPAN_INVALID_BAUD_RATE);
28032 +       }
28033 +       else {
28034 +               if(portnum == 1) {
28035 +                       if(div > 0xff) {
28036 +                               return (KEYSPAN_INVALID_BAUD_RATE);
28037 +                       }
28038 +               }
28039 +               else {
28040 +                       return (KEYSPAN_INVALID_BAUD_RATE);
28041 +               }
28042 +       }
28043 +
28044 +               /* return the counter values if not NULL
28045 +                  (port 1 will ignore retHi) */
28046 +       if (rate_low) {
28047 +               *rate_low = (u8) (cnt & 0xff);
28048 +       }
28049 +       if (rate_hi) {
28050 +               *rate_hi = (u8) ((cnt >> 8) & 0xff);
28051         }
28052 +       dbg ("%s - %d OK.", __FUNCTION__, baud_rate);
28053         return (KEYSPAN_BAUD_RATE_OK);
28054  }
28055  
28056 @@ -1317,31 +1369,35 @@
28057         struct keyspan_usa26_portControlMessage msg;            
28058         struct keyspan_serial_private           *s_priv;
28059         struct keyspan_port_private             *p_priv;
28060 -       const  keyspan_device_details           *d_details;
28061 +       const struct keyspan_device_details     *d_details;
28062         int                                     outcont_urb;
28063 -       urb_t *this_urb;
28064 -       int err;
28065 +       struct urb                              *this_urb;
28066 +       int                                     device_port, err;
28067  
28068 -       dbg ("%s reset=%d\n", __FUNCTION__, reset_port); 
28069 +       dbg ("%s reset=%d", __FUNCTION__, reset_port); 
28070  
28071         s_priv = (struct keyspan_serial_private *)(serial->private);
28072         p_priv = (struct keyspan_port_private *)(port->private);
28073         d_details = s_priv->device_details;
28074 +       device_port = port->number - port->serial->minor;
28075  
28076         outcont_urb = d_details->outcont_endpoints[port->number];
28077         this_urb = p_priv->outcont_urb;
28078  
28079 -       dbg(__FUNCTION__ " endpoint %d\n", usb_pipeendpoint(this_urb->pipe));
28080 +       dbg("%s - endpoint %d", __FUNCTION__, usb_pipeendpoint(this_urb->pipe));
28081  
28082                 /* Make sure we have an urb then send the message */
28083         if (this_urb == NULL) {
28084 -               dbg(__FUNCTION__ " oops no urb.\n");
28085 +               dbg("%s - oops no urb.", __FUNCTION__);
28086                 return -1;
28087         }
28088  
28089 -       p_priv->resend_cont = 1;
28090 +       /* Save reset port val for resend.
28091 +       Don't overwrite resend for close condition. */
28092 +       if (p_priv->resend_cont != 3)
28093 +               p_priv->resend_cont = reset_port + 1;
28094         if (this_urb->status == -EINPROGRESS) {
28095 -               /*  dbg (__FUNCTION__ " already writing"); */
28096 +               /*  dbg ("%s - already writing", __FUNCTION__); */
28097                 return(-1);
28098         }
28099  
28100 @@ -1353,8 +1409,8 @@
28101                 msg.setClocking = 0xff;
28102                 if (d_details->calculate_baud_rate
28103                     (p_priv->baud, d_details->baudclk, &msg.baudHi,
28104 -                    &msg.baudLo, &msg.prescaler) == KEYSPAN_INVALID_BAUD_RATE ) {
28105 -                       dbg(__FUNCTION__ "Invalid baud rate %d requested, using 9600.\n",
28106 +                    &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
28107 +                       dbg("%s - Invalid baud rate %d requested, using 9600.", __FUNCTION__,
28108                             p_priv->baud);
28109                         msg.baudLo = 0;
28110                         msg.baudHi = 125;       /* Values for 9600 baud */
28111 @@ -1388,12 +1444,26 @@
28112         msg.ctsFlowControl = (p_priv->flow_control == flow_cts);
28113         msg.xonFlowControl = 0;
28114         msg.setFlowControl = 0xff;
28115 -       
28116 -       msg.forwardingLength = 1;
28117 +       msg.forwardingLength = 16;
28118         msg.xonChar = 17;
28119         msg.xoffChar = 19;
28120  
28121 -       if (reset_port) {
28122 +       /* Opening port */
28123 +       if (reset_port == 1) {
28124 +               msg._txOn = 1;
28125 +               msg._txOff = 0;
28126 +               msg.txFlush = 0;
28127 +               msg.txBreak = 0;
28128 +               msg.rxOn = 1;
28129 +               msg.rxOff = 0;
28130 +               msg.rxFlush = 1;
28131 +               msg.rxForward = 0;
28132 +               msg.returnStatus = 0;
28133 +               msg.resetDataToggle = 0xff;
28134 +       }
28135 +
28136 +       /* Closing port */
28137 +       else if (reset_port == 2) {
28138                 msg._txOn = 0;
28139                 msg._txOff = 1;
28140                 msg.txFlush = 0;
28141 @@ -1403,14 +1473,16 @@
28142                 msg.rxFlush = 1;
28143                 msg.rxForward = 0;
28144                 msg.returnStatus = 0;
28145 -               msg.resetDataToggle = 0xff;
28146 +               msg.resetDataToggle = 0;
28147         }
28148 +
28149 +       /* Sending intermediate configs */
28150         else {
28151                 msg._txOn = (! p_priv->break_on);
28152                 msg._txOff = 0;
28153                 msg.txFlush = 0;
28154                 msg.txBreak = (p_priv->break_on);
28155 -               msg.rxOn = 1;
28156 +               msg.rxOn = 0;
28157                 msg.rxOff = 0;
28158                 msg.rxFlush = 0;
28159                 msg.rxForward = 0;
28160 @@ -1433,11 +1505,11 @@
28161  
28162         this_urb->dev = serial->dev;
28163         if ((err = usb_submit_urb(this_urb)) != 0) {
28164 -               dbg(__FUNCTION__ " usb_submit_urb(setup) failed (%d)\n", err);
28165 +               dbg("%s - usb_submit_urb(setup) failed (%d)", __FUNCTION__, err);
28166         }
28167  #if 0
28168         else {
28169 -               dbg(__FUNCTION__ " usb_submit_urb(%d) OK %d bytes (end %d)",
28170 +               dbg("%s - usb_submit_urb(%d) OK %d bytes (end %d)", __FUNCTION__
28171                     outcont_urb, this_urb->transfer_buffer_length,
28172                     usb_pipeendpoint(this_urb->pipe));
28173         }
28174 @@ -1453,32 +1525,38 @@
28175         struct keyspan_usa28_portControlMessage msg;            
28176         struct keyspan_serial_private           *s_priv;
28177         struct keyspan_port_private             *p_priv;
28178 -       const  keyspan_device_details           *d_details;
28179 -       urb_t *this_urb;
28180 -       int err;
28181 +       const struct keyspan_device_details     *d_details;
28182 +       struct urb                              *this_urb;
28183 +       int                                     device_port, err;
28184 +
28185 +       dbg ("%s", __FUNCTION__);
28186  
28187         s_priv = (struct keyspan_serial_private *)(serial->private);
28188         p_priv = (struct keyspan_port_private *)(port->private);
28189         d_details = s_priv->device_details;
28190 +       device_port = port->number - port->serial->minor;
28191  
28192         /* only do something if we have a bulk out endpoint */
28193         if ((this_urb = p_priv->outcont_urb) == NULL) {
28194 -               dbg(__FUNCTION__ " oops no urb.\n");
28195 +               dbg("%s - oops no urb.", __FUNCTION__);
28196                 return -1;
28197         }
28198  
28199 -       p_priv->resend_cont = 1;
28200 +       /* Save reset port val for resend.
28201 +          Don't overwrite resend for close condition. */
28202 +       if (p_priv->resend_cont != 3)
28203 +               p_priv->resend_cont = reset_port + 1;
28204         if (this_urb->status == -EINPROGRESS) {
28205 -               dbg (__FUNCTION__ " already writing\n");
28206 +               dbg ("%s already writing", __FUNCTION__);
28207                 return(-1);
28208         }
28209  
28210         memset(&msg, 0, sizeof (struct keyspan_usa28_portControlMessage));
28211  
28212         msg.setBaudRate = 1;
28213 -       if (keyspan_usa19_calc_baud(p_priv->baud, d_details->baudclk,
28214 -               &msg.baudHi, &msg.baudLo, NULL) == KEYSPAN_INVALID_BAUD_RATE ) {
28215 -               dbg(__FUNCTION__ "Invalid baud rate requested %d.", p_priv->baud);
28216 +       if (d_details->calculate_baud_rate(p_priv->baud, d_details->baudclk,
28217 +               &msg.baudHi, &msg.baudLo, NULL, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
28218 +               dbg("%s - Invalid baud rate requested %d.", __FUNCTION__, p_priv->baud);
28219                 msg.baudLo = 0xff;
28220                 msg.baudHi = 0xb2;      /* Values for 9600 baud */
28221         }
28222 @@ -1493,23 +1571,56 @@
28223         msg.rts = p_priv->rts_state;
28224         msg.dtr = p_priv->dtr_state;
28225  
28226 -       msg.forwardingLength = 1;
28227 +       msg.forwardingLength = 16;
28228         msg.forwardMs = 10;
28229         msg.breakThreshold = 45;
28230         msg.xonChar = 17;
28231         msg.xoffChar = 19;
28232  
28233 -       msg._txOn = 1;
28234 -       msg._txOff = 0;
28235 -       msg.txFlush = 0;
28236 -       msg.txForceXoff = 0;
28237 -       msg.txBreak = 0;
28238 -       msg.rxOn = 1;
28239 -       msg.rxOff = 0;
28240 -       msg.rxFlush = 0;
28241 -       msg.rxForward = 0;
28242         /*msg.returnStatus = 1;
28243         msg.resetDataToggle = 0xff;*/
28244 +       /* Opening port */
28245 +       if (reset_port == 1) {
28246 +               msg._txOn = 1;
28247 +               msg._txOff = 0;
28248 +               msg.txFlush = 0;
28249 +               msg.txForceXoff = 0;
28250 +               msg.txBreak = 0;
28251 +               msg.rxOn = 1;
28252 +               msg.rxOff = 0;
28253 +               msg.rxFlush = 1;
28254 +               msg.rxForward = 0;
28255 +               msg.returnStatus = 0;
28256 +               msg.resetDataToggle = 0xff;
28257 +       }
28258 +       /* Closing port */
28259 +       else if (reset_port == 2) {
28260 +               msg._txOn = 0;
28261 +               msg._txOff = 1;
28262 +               msg.txFlush = 0;
28263 +               msg.txForceXoff = 0;
28264 +               msg.txBreak = 0;
28265 +               msg.rxOn = 0;
28266 +               msg.rxOff = 1;
28267 +               msg.rxFlush = 1;
28268 +               msg.rxForward = 0;
28269 +               msg.returnStatus = 0;
28270 +               msg.resetDataToggle = 0;
28271 +       }
28272 +       /* Sending intermediate configs */
28273 +       else {
28274 +               msg._txOn = (! p_priv->break_on);
28275 +               msg._txOff = 0;
28276 +               msg.txFlush = 0;
28277 +               msg.txForceXoff = 0;
28278 +               msg.txBreak = (p_priv->break_on);
28279 +               msg.rxOn = 0;
28280 +               msg.rxOff = 0;
28281 +               msg.rxFlush = 0;
28282 +               msg.rxForward = 0;
28283 +               msg.returnStatus = 0;
28284 +               msg.resetDataToggle = 0x0;
28285 +       }
28286  
28287         p_priv->resend_cont = 0;
28288         memcpy (this_urb->transfer_buffer, &msg, sizeof(msg));
28289 @@ -1519,11 +1630,11 @@
28290  
28291         this_urb->dev = serial->dev;
28292         if ((err = usb_submit_urb(this_urb)) != 0) {
28293 -               dbg(__FUNCTION__ " usb_submit_urb(setup) failed\n");
28294 +               dbg("%s - usb_submit_urb(setup) failed", __FUNCTION__);
28295         }
28296  #if 0
28297         else {
28298 -               dbg(__FUNCTION__ " usb_submit_urb(setup) OK %d bytes",
28299 +               dbg("%s - usb_submit_urb(setup) OK %d bytes", __FUNCTION__,
28300                     this_urb->transfer_buffer_length);
28301         }
28302  #endif
28303 @@ -1538,13 +1649,12 @@
28304         struct keyspan_usa49_portControlMessage msg;            
28305         struct keyspan_serial_private           *s_priv;
28306         struct keyspan_port_private             *p_priv;
28307 -       const  keyspan_device_details           *d_details;
28308 +       const struct keyspan_device_details     *d_details;
28309         int                                     glocont_urb;
28310 -       urb_t                                   *this_urb;
28311 -       int                                     err;
28312 -       int                                     device_port;
28313 +       struct urb                              *this_urb;
28314 +       int                                     err, device_port;
28315  
28316 -       dbg ("%s\n", __FUNCTION__);
28317 +       dbg ("%s", __FUNCTION__);
28318  
28319         s_priv = (struct keyspan_serial_private *)(serial->private);
28320         p_priv = (struct keyspan_port_private *)(port->private);
28321 @@ -1556,17 +1666,20 @@
28322                 /* Work out which port within the device is being setup */
28323         device_port = port->number - port->serial->minor;
28324  
28325 -       dbg(__FUNCTION__ " endpoint %d port %d (%d)\n", usb_pipeendpoint(this_urb->pipe), port->number, device_port);
28326 +       dbg("%s - endpoint %d port %d (%d)",__FUNCTION__, usb_pipeendpoint(this_urb->pipe), port->number, device_port);
28327  
28328                 /* Make sure we have an urb then send the message */
28329         if (this_urb == NULL) {
28330 -               dbg(__FUNCTION__ " oops no urb for port %d.\n", port->number);
28331 +               dbg("%s - oops no urb for port %d.", __FUNCTION__, port->number);
28332                 return -1;
28333         }
28334  
28335 -       p_priv->resend_cont = 1;
28336 +       /* Save reset port val for resend.
28337 +          Don't overwrite resend for close condition. */
28338 +       if (p_priv->resend_cont != 3)
28339 +               p_priv->resend_cont = reset_port + 1;
28340         if (this_urb->status == -EINPROGRESS) {
28341 -               /*  dbg (__FUNCTION__ " already writing"); */
28342 +               /*  dbg ("%s - already writing", __FUNCTION__); */
28343                 return(-1);
28344         }
28345  
28346 @@ -1581,8 +1694,8 @@
28347                 msg.setClocking = 0xff;
28348                 if (d_details->calculate_baud_rate
28349                     (p_priv->baud, d_details->baudclk, &msg.baudHi,
28350 -                    &msg.baudLo, &msg.prescaler) == KEYSPAN_INVALID_BAUD_RATE ) {
28351 -                       dbg(__FUNCTION__ "Invalid baud rate %d requested, using 9600.\n",
28352 +                    &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
28353 +                       dbg("%s - Invalid baud rate %d requested, using 9600.", __FUNCTION__,
28354                             p_priv->baud);
28355                         msg.baudLo = 0;
28356                         msg.baudHi = 125;       /* Values for 9600 baud */
28357 @@ -1617,20 +1730,55 @@
28358         msg.xonFlowControl = 0;
28359         msg.setFlowControl = 0xff;
28360         
28361 -       msg.forwardingLength = 1;
28362 +       msg.forwardingLength = 16;
28363         msg.xonChar = 17;
28364         msg.xoffChar = 19;
28365 -       
28366 -       msg._txOn = 1;
28367 -       msg._txOff = 0;
28368 -       msg.txFlush = 0;
28369 -       msg.txBreak = 0;
28370 -       msg.rxOn = 1;
28371 -       msg.rxOff = 0;
28372 -       msg.rxFlush = 0;
28373 -       msg.rxForward = 0;
28374 -       msg.enablePort = 0xff;
28375 -       msg.disablePort = 0;
28376 +
28377 +       /* Opening port */ 
28378 +       if (reset_port == 1) {
28379 +               msg._txOn = 1;
28380 +               msg._txOff = 0;
28381 +               msg.txFlush = 0;
28382 +               msg.txBreak = 0;
28383 +               msg.rxOn = 1;
28384 +               msg.rxOff = 0;
28385 +               msg.rxFlush = 1;
28386 +               msg.rxForward = 0;
28387 +               msg.returnStatus = 0;
28388 +               msg.resetDataToggle = 0xff;
28389 +               msg.enablePort = 1;
28390 +               msg.disablePort = 0;
28391 +       }
28392 +       /* Closing port */
28393 +       else if (reset_port == 2) {
28394 +               msg._txOn = 0;
28395 +               msg._txOff = 1;
28396 +               msg.txFlush = 0;
28397 +               msg.txBreak = 0;
28398 +               msg.rxOn = 0;
28399 +               msg.rxOff = 1;
28400 +               msg.rxFlush = 1;
28401 +               msg.rxForward = 0;
28402 +               msg.returnStatus = 0;
28403 +               msg.resetDataToggle = 0;
28404 +               msg.enablePort = 0;
28405 +               msg.disablePort = 1;
28406 +       }
28407 +       /* Sending intermediate configs */
28408 +       else {
28409 +               msg._txOn = (! p_priv->break_on);
28410 +               msg._txOff = 0;
28411 +               msg.txFlush = 0;
28412 +               msg.txBreak = (p_priv->break_on);
28413 +               msg.rxOn = 0;
28414 +               msg.rxOff = 0;
28415 +               msg.rxFlush = 0;
28416 +               msg.rxForward = 0;
28417 +               msg.returnStatus = 0;
28418 +               msg.resetDataToggle = 0x0;
28419 +               msg.enablePort = 0;
28420 +               msg.disablePort = 0;
28421 +       }
28422  
28423                 /* Do handshaking outputs */    
28424         msg.setRts = 0xff;
28425 @@ -1647,11 +1795,11 @@
28426  
28427         this_urb->dev = serial->dev;
28428         if ((err = usb_submit_urb(this_urb)) != 0) {
28429 -               dbg(__FUNCTION__ " usb_submit_urb(setup) failed (%d)\n", err);
28430 +               dbg("%s - usb_submit_urb(setup) failed (%d)", __FUNCTION__, err);
28431         }
28432  #if 0
28433         else {
28434 -               dbg(__FUNCTION__ " usb_submit_urb(%d) OK %d bytes (end %d)",
28435 +               dbg("%s - usb_submit_urb(%d) OK %d bytes (end %d)", __FUNCTION__,
28436                     outcont_urb, this_urb->transfer_buffer_length,
28437                     usb_pipeendpoint(this_urb->pipe));
28438         }
28439 @@ -1663,8 +1811,10 @@
28440  static void keyspan_send_setup(struct usb_serial_port *port, int reset_port)
28441  {
28442         struct usb_serial *serial = port->serial;
28443 -       struct keyspan_serial_private   *s_priv;
28444 -       const keyspan_device_details    *d_details;
28445 +       struct keyspan_serial_private *s_priv;
28446 +       const struct keyspan_device_details *d_details;
28447 +
28448 +       dbg ("%s", __FUNCTION__);
28449  
28450         s_priv = (struct keyspan_serial_private *)(serial->private);
28451         d_details = s_priv->device_details;
28452 @@ -1690,16 +1840,15 @@
28453         struct usb_serial_port          *port;
28454         struct keyspan_serial_private   *s_priv;
28455         struct keyspan_port_private     *p_priv;
28456 -       const keyspan_device_details    *d_details;
28457 +       const struct keyspan_device_details     *d_details;
28458  
28459 -       dbg("keyspan_startup called.\n");
28460 +       dbg("%s", __FUNCTION__);
28461  
28462         for (i = 0; (d_details = keyspan_devices[i]) != NULL; ++i)
28463                 if (d_details->product_id == serial->dev->descriptor.idProduct)
28464                         break;
28465         if (d_details == NULL) {
28466 -               printk(KERN_ERR __FUNCTION__ ": unknown product id %x\n",
28467 -                      serial->dev->descriptor.idProduct);
28468 +               err("%s - unknown product id %x", __FUNCTION__, serial->dev->descriptor.idProduct);
28469                 return 1;
28470         }
28471  
28472 @@ -1707,7 +1856,7 @@
28473         serial->private = kmalloc(sizeof(struct keyspan_serial_private),
28474                                   GFP_KERNEL);
28475         if (!serial->private) {
28476 -               dbg(__FUNCTION__ "kmalloc for keyspan_serial_private failed.\n");
28477 +               dbg("%s - kmalloc for keyspan_serial_private failed.", __FUNCTION__);
28478                 return (1);
28479         }
28480         memset(serial->private, 0, sizeof(struct keyspan_serial_private));
28481 @@ -1721,7 +1870,7 @@
28482                 port->private = kmalloc(sizeof(struct keyspan_port_private),
28483                                         GFP_KERNEL);
28484                 if (!port->private) {
28485 -                       dbg(__FUNCTION__ "kmalloc for keyspan_port_private (%d) failed!.\n", i);
28486 +                       dbg("%s - kmalloc for keyspan_port_private (%d) failed!.", __FUNCTION__, i);
28487                         return (1);
28488                 }
28489                 memset(port->private, 0, sizeof(struct keyspan_port_private));
28490 @@ -1733,7 +1882,7 @@
28491  
28492         s_priv->instat_urb->dev = serial->dev;
28493         if ((err = usb_submit_urb(s_priv->instat_urb)) != 0) {
28494 -               dbg(__FUNCTION__ " submit instat urb failed %d\n", err);
28495 +               dbg("%s - submit instat urb failed %d", __FUNCTION__, err);
28496         }
28497                         
28498         return (0);
28499 @@ -1746,7 +1895,7 @@
28500         struct keyspan_serial_private   *s_priv;
28501         struct keyspan_port_private     *p_priv;
28502  
28503 -       dbg("keyspan_shutdown called\n");
28504 +       dbg("%s", __FUNCTION__);
28505  
28506         s_priv = (struct keyspan_serial_private *)(serial->private);
28507  
28508 @@ -1791,10 +1940,6 @@
28509         /* Now free per port private data */
28510         for (i = 0; i < serial->num_ports; i++) {
28511                 port = &serial->port[i];
28512 -               while (port->open_count > 0) {
28513 -                       --port->open_count;
28514 -                       MOD_DEC_USE_COUNT;
28515 -               }
28516                 kfree(port->private);
28517         }
28518  }
28519 diff -Nur linux-2.4.19.org/drivers/usb/serial/keyspan.h linux-2.4.19/drivers/usb/serial/keyspan.h
28520 --- linux-2.4.19.org/drivers/usb/serial/keyspan.h       Fri Dec 21 18:41:55 2001
28521 +++ linux-2.4.19/drivers/usb/serial/keyspan.h   Thu Oct 31 08:11:24 2002
28522 @@ -2,7 +2,7 @@
28523    Keyspan USB to Serial Converter driver
28524   
28525    (C) Copyright (C) 2000-2001
28526 -      Hugh Blemings <hugh@misc.nu>
28527 +      Hugh Blemings <hugh@blemings.org>
28528     
28529    This program is free software; you can redistribute it and/or modify
28530    it under the terms of the GNU General Public License as published by
28531 @@ -33,9 +33,8 @@
28532  #ifndef __LINUX_USB_SERIAL_KEYSPAN_H
28533  #define __LINUX_USB_SERIAL_KEYSPAN_H
28534  
28535 -#include <linux/config.h>
28536  
28537 -       /* Function prototypes for Keyspan serial converter */
28538 +/* Function prototypes for Keyspan serial converter */
28539  static int  keyspan_open               (struct usb_serial_port *port,
28540                                          struct file *filp);
28541  static void keyspan_close              (struct usb_serial_port *port,
28542 @@ -54,12 +53,7 @@
28543  static void keyspan_send_setup         (struct usb_serial_port *port,
28544                                          int reset_port);
28545  
28546 -#if 0
28547 -static void keyspan_write_bulk_callback (struct urb *urb);
28548 -#endif
28549  
28550 -//static void keyspan_usa26_read_int_callback  (struct urb *urb);
28551 -//static void keyspan_usa28_read_int_callback  (struct urb *urb);
28552  static int  keyspan_chars_in_buffer    (struct usb_serial_port *port);
28553  static int  keyspan_ioctl              (struct usb_serial_port *port,
28554                                          struct file *file,
28555 @@ -72,12 +66,16 @@
28556  static int  keyspan_fake_startup       (struct usb_serial *serial);
28557  
28558  static int  keyspan_usa19_calc_baud    (u32 baud_rate, u32 baudclk, 
28559 -                                        u8 *rate_hi, u8 *rate_low, u8 *prescaler);
28560 +                                        u8 *rate_hi, u8 *rate_low,
28561 +                                        u8 *prescaler, int portnum);
28562  
28563  static int  keyspan_usa19w_calc_baud   (u32 baud_rate, u32 baudclk,
28564 -                                        u8 *rate_hi, u8 *rate_low, u8 *prescaler);
28565 +                                        u8 *rate_hi, u8 *rate_low,
28566 +                                        u8 *prescaler, int portnum);
28567  
28568 -//static void keyspan_usa19_setup_urbs (struct usb_serial *serial);
28569 +static int  keyspan_usa28_calc_baud    (u32 baud_rate, u32 baudclk,
28570 +                                        u8 *rate_hi, u8 *rate_low,
28571 +                                        u8 *prescaler, int portnum);
28572  
28573  static int  keyspan_usa28_send_setup   (struct usb_serial *serial,
28574                                          struct usb_serial_port *port,
28575 @@ -89,91 +87,102 @@
28576                                          struct usb_serial_port *port,
28577                                          int reset_port);
28578  
28579 -       /* Functions from usbserial.c for ezusb firmware handling */
28580 -extern int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit);
28581 -extern int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *data, int length, __u8 bRequest);
28582  
28583 -       /* Struct used for firmware - increased size of data section
28584 -          to allow Keyspan's 'C' firmware struct to be used unmodified */
28585 +/* Struct used for firmware - increased size of data section
28586 +   to allow Keyspan's 'C' firmware struct to be used unmodified */
28587  struct ezusb_hex_record {
28588         __u16 address;
28589         __u8 data_size;
28590         __u8 data[64];
28591  };
28592 -       /* Conditionally include firmware images, if they aren't
28593 -          included create a null pointer instead.  Current 
28594 -          firmware images aren't optimised to remove duplicate
28595 -          addresses in the image itself. */
28596 +
28597 +/* Conditionally include firmware images, if they aren't
28598 +   included create a null pointer instead.  Current 
28599 +   firmware images aren't optimised to remove duplicate
28600 +   addresses in the image itself. */
28601  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA28
28602 -        #include "keyspan_usa28_fw.h"
28603 +       #include "keyspan_usa28_fw.h"
28604  #else
28605         static const struct ezusb_hex_record *keyspan_usa28_firmware = NULL;
28606  #endif
28607  
28608  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA28X
28609 -        #include "keyspan_usa28x_fw.h"
28610 +       #include "keyspan_usa28x_fw.h"
28611  #else
28612         static const struct ezusb_hex_record *keyspan_usa28x_firmware = NULL;
28613  #endif
28614  
28615  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA28XA
28616 -        #include "keyspan_usa28xa_fw.h"
28617 +       #include "keyspan_usa28xa_fw.h"
28618  #else
28619         static const struct ezusb_hex_record *keyspan_usa28xa_firmware = NULL;
28620  #endif
28621  
28622  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA28XB
28623 -        #include "keyspan_usa28xb_fw.h"
28624 +       #include "keyspan_usa28xb_fw.h"
28625  #else
28626         static const struct ezusb_hex_record *keyspan_usa28xb_firmware = NULL;
28627  #endif
28628  
28629  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA19
28630 -        #include "keyspan_usa19_fw.h"
28631 +       #include "keyspan_usa19_fw.h"
28632  #else
28633         static const struct ezusb_hex_record *keyspan_usa19_firmware = NULL;
28634  #endif
28635  
28636 +#ifdef CONFIG_USB_SERIAL_KEYSPAN_USA19QI
28637 +       #include "keyspan_usa19qi_fw.h"
28638 +#else
28639 +       static const struct ezusb_hex_record *keyspan_usa19qi_firmware = NULL;
28640 +#endif
28641 +
28642 +#ifdef CONFIG_USB_SERIAL_KEYSPAN_USA19QW
28643 +       #include "keyspan_usa19qw_fw.h"
28644 +#else
28645 +       static const struct ezusb_hex_record *keyspan_usa19qw_firmware = NULL;
28646 +#endif
28647 +
28648  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA18X
28649 -        #include "keyspan_usa18x_fw.h"
28650 +       #include "keyspan_usa18x_fw.h"
28651  #else
28652         static const struct ezusb_hex_record *keyspan_usa18x_firmware = NULL;
28653  #endif
28654  
28655  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA19W
28656 -        #include "keyspan_usa19w_fw.h"
28657 +       #include "keyspan_usa19w_fw.h"
28658  #else
28659         static const struct ezusb_hex_record *keyspan_usa19w_firmware = NULL;
28660  #endif
28661  
28662  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA49W
28663 -        #include "keyspan_usa49w_fw.h"
28664 +       #include "keyspan_usa49w_fw.h"
28665  #else
28666         static const struct ezusb_hex_record *keyspan_usa49w_firmware = NULL;
28667  #endif
28668 -       
28669 -       /* Values used for baud rate calculation - device specific */
28670 +
28671 +/* Values used for baud rate calculation - device specific */
28672  #define        KEYSPAN_INVALID_BAUD_RATE               (-1)
28673  #define        KEYSPAN_BAUD_RATE_OK                    (0)
28674  #define        KEYSPAN_USA18X_BAUDCLK                  (12000000L)     /* a guess */
28675  #define        KEYSPAN_USA19_BAUDCLK                   (12000000L)
28676  #define        KEYSPAN_USA19W_BAUDCLK                  (24000000L)
28677 +#define        KEYSPAN_USA28_BAUDCLK                   (1843200L)
28678  #define        KEYSPAN_USA28X_BAUDCLK                  (12000000L)
28679  #define        KEYSPAN_USA49W_BAUDCLK                  (48000000L)
28680  
28681 -       /* Some constants used to characterise each device. 
28682 -          There is a four port device due later in the year,
28683 -          we allow for it now in the following */
28684 +/* Some constants used to characterise each device.  */
28685  #define                KEYSPAN_MAX_NUM_PORTS           (4)
28686  #define                KEYSPAN_MAX_FLIPS               (2)
28687 -       
28688 -       /* Device info for the Keyspan serial converter, used
28689 -          by the overall usb-serial probe function */
28690 +
28691 +/* Device info for the Keyspan serial converter, used
28692 +   by the overall usb-serial probe function */
28693  #define KEYSPAN_VENDOR_ID                      (0x06cd)
28694  
28695 -       /* Product IDs for the eight products supported, pre-renumeration */
28696 +/* Product IDs for the products supported, pre-renumeration */
28697  #define        keyspan_usa18x_pre_product_id           0x0105
28698  #define        keyspan_usa19_pre_product_id            0x0103
28699 +#define        keyspan_usa19qi_pre_product_id          0x010b
28700 +#define        keyspan_usa19qw_pre_product_id          0x0118
28701  #define        keyspan_usa19w_pre_product_id           0x0106
28702  #define        keyspan_usa28_pre_product_id            0x0101
28703  #define        keyspan_usa28x_pre_product_id           0x0102
28704 @@ -181,11 +190,13 @@
28705  #define        keyspan_usa28xb_pre_product_id          0x0113
28706  #define        keyspan_usa49w_pre_product_id           0x0109
28707  
28708 -       /* Product IDs post-renumeration.  Note that the 28x and 28xb
28709 -          have the same id's post-renumeration but behave identically
28710 -          so it's not an issue. */
28711 +/* Product IDs post-renumeration.  Note that the 28x and 28xb
28712 +   have the same id's post-renumeration but behave identically
28713 +   so it's not an issue. */
28714  #define        keyspan_usa18x_product_id               0x0112
28715  #define        keyspan_usa19_product_id                0x0107
28716 +#define        keyspan_usa19qi_product_id              0x010c
28717 +#define        keyspan_usa19qw_product_id              0x0119
28718  #define        keyspan_usa19w_product_id               0x0108
28719  #define        keyspan_usa28_product_id                0x010f
28720  #define        keyspan_usa28x_product_id               0x0110
28721 @@ -194,10 +205,10 @@
28722  #define        keyspan_usa49w_product_id               0x010a
28723  
28724  
28725 -typedef struct {
28726 +struct keyspan_device_details {
28727         /* product ID value */
28728         int     product_id;
28729 -       
28730 +
28731         enum    {msg_usa26, msg_usa28, msg_usa49} msg_format;
28732  
28733                 /* Number of physical ports */
28734 @@ -219,137 +230,190 @@
28735                 /* Input acknowledge endpoints */
28736         int     inack_endpoints[KEYSPAN_MAX_NUM_PORTS];
28737  
28738 -               /* Output control endpoints */  
28739 +               /* Output control endpoints */
28740         int     outcont_endpoints[KEYSPAN_MAX_NUM_PORTS];
28741  
28742                 /* Endpoint used for input status */
28743         int     instat_endpoint;
28744  
28745                 /* Endpoint used for global control functions */
28746 -       int     glocont_endpoint;       
28747 -       
28748 +       int     glocont_endpoint;
28749 +
28750         int     (*calculate_baud_rate) (u32 baud_rate, u32 baudclk,
28751 -                       u8 *rate_hi, u8 *rate_low, u8 *prescaler);
28752 +                       u8 *rate_hi, u8 *rate_low, u8 *prescaler, int portnum);
28753         u32     baudclk;
28754 +}; 
28755 +
28756 +/* Now for each device type we setup the device detail
28757 +   structure with the appropriate information (provided
28758 +   in Keyspan's documentation) */
28759 +
28760 +static const struct keyspan_device_details usa18x_device_details = {
28761 +       product_id:             keyspan_usa18x_product_id,
28762 +       msg_format:             msg_usa26,
28763 +       num_ports:              1,
28764 +       indat_endp_flip:        0,
28765 +       outdat_endp_flip:       1,
28766 +       indat_endpoints:        {0x81},
28767 +       outdat_endpoints:       {0x01},
28768 +       inack_endpoints:        {0x85},
28769 +       outcont_endpoints:      {0x05},
28770 +       instat_endpoint:        0x87,
28771 +       glocont_endpoint:       0x07,
28772 +       calculate_baud_rate:    keyspan_usa19w_calc_baud,
28773 +       baudclk:                KEYSPAN_USA18X_BAUDCLK,
28774 +};
28775 +
28776 +static const struct keyspan_device_details usa19_device_details = {
28777 +       product_id:             keyspan_usa19_product_id,
28778 +       msg_format:             msg_usa28,
28779 +       num_ports:              1,
28780 +       indat_endp_flip:        1,
28781 +       outdat_endp_flip:       1,
28782 +       indat_endpoints:        {0x81},
28783 +       outdat_endpoints:       {0x01},
28784 +       inack_endpoints:        {0x83},
28785 +       outcont_endpoints:      {0x03},
28786 +       instat_endpoint:        0x84,
28787 +       glocont_endpoint:       -1,
28788 +       calculate_baud_rate:    keyspan_usa19_calc_baud,
28789 +       baudclk:                KEYSPAN_USA19_BAUDCLK,
28790 +};
28791 +
28792 +static const struct keyspan_device_details usa19qi_device_details = {
28793 +       product_id:             keyspan_usa19qi_product_id,
28794 +       msg_format:             msg_usa28,
28795 +       num_ports:              1,
28796 +       indat_endp_flip:        1,
28797 +       outdat_endp_flip:       1,
28798 +       indat_endpoints:        {0x81},
28799 +       outdat_endpoints:       {0x01},
28800 +       inack_endpoints:        {0x83},
28801 +       outcont_endpoints:      {0x03},
28802 +       instat_endpoint:        0x84,
28803 +       glocont_endpoint:       -1,
28804 +       calculate_baud_rate:    keyspan_usa28_calc_baud,
28805 +       baudclk:                KEYSPAN_USA19_BAUDCLK,
28806 +};
28807 +
28808 +static const struct keyspan_device_details usa19qw_device_details = {
28809 +       product_id:             keyspan_usa19qw_product_id,
28810 +       msg_format:             msg_usa26,
28811 +       num_ports:              1,
28812 +       indat_endp_flip:        0,
28813 +       outdat_endp_flip:       1,
28814 +       indat_endpoints:        {0x81},
28815 +       outdat_endpoints:       {0x01},
28816 +       inack_endpoints:        {0x85},
28817 +       outcont_endpoints:      {0x05},
28818 +       instat_endpoint:        0x87,
28819 +       glocont_endpoint:       0x07,
28820 +       calculate_baud_rate:    keyspan_usa19w_calc_baud,
28821 +       baudclk:                KEYSPAN_USA19W_BAUDCLK,
28822 +};
28823 +
28824 +static const struct keyspan_device_details usa19w_device_details = {
28825 +       product_id:             keyspan_usa19w_product_id,
28826 +       msg_format:             msg_usa26,
28827 +       num_ports:              1,
28828 +       indat_endp_flip:        0,
28829 +       outdat_endp_flip:       1,
28830 +       indat_endpoints:        {0x81},
28831 +       outdat_endpoints:       {0x01},
28832 +       inack_endpoints:        {0x85},
28833 +       outcont_endpoints:      {0x05},
28834 +       instat_endpoint:        0x87,
28835 +       glocont_endpoint:       0x07,
28836 +       calculate_baud_rate:    keyspan_usa19w_calc_baud,
28837 +       baudclk:                KEYSPAN_USA19W_BAUDCLK,
28838 +};
28839 +
28840 +static const struct keyspan_device_details usa28_device_details = {
28841 +       product_id:             keyspan_usa28_product_id,
28842 +       msg_format:             msg_usa28,
28843 +       num_ports:              2,
28844 +       indat_endp_flip:        1,
28845 +       outdat_endp_flip:       1,
28846 +       indat_endpoints:        {0x81, 0x83},
28847 +       outdat_endpoints:       {0x01, 0x03},
28848 +       inack_endpoints:        {0x85, 0x86},
28849 +       outcont_endpoints:      {0x05, 0x06},
28850 +       instat_endpoint:        0x87,
28851 +       glocont_endpoint:       0x07,
28852 +       calculate_baud_rate:    keyspan_usa28_calc_baud,
28853 +       baudclk:                KEYSPAN_USA28_BAUDCLK,          
28854 +};
28855  
28856 -} keyspan_device_details; 
28857 +static const struct keyspan_device_details usa28x_device_details = {
28858 +       product_id:             keyspan_usa28x_product_id,
28859 +       msg_format:             msg_usa26,
28860 +       num_ports:              2,
28861 +       indat_endp_flip:        0,
28862 +       outdat_endp_flip:       1,
28863 +       indat_endpoints:        {0x81, 0x83},
28864 +       outdat_endpoints:       {0x01, 0x03},
28865 +       inack_endpoints:        {0x85, 0x86},
28866 +       outcont_endpoints:      {0x05, 0x06},
28867 +       instat_endpoint:        0x87,
28868 +       glocont_endpoint:       0x07,
28869 +       calculate_baud_rate:    keyspan_usa19w_calc_baud,
28870 +       baudclk:                KEYSPAN_USA28X_BAUDCLK,
28871 +};
28872  
28873 -       /* Now for each device type we setup the device detail
28874 -          structure with the appropriate information (provided
28875 -          in Keyspan's documentation) */
28876 -
28877 -static const keyspan_device_details usa18x_device_details = {
28878 -       keyspan_usa18x_product_id,      /* product ID */
28879 -               msg_usa26,                      /* msg type*/
28880 -       1,                              /* num ports */
28881 -       0,                              /* indat endpoint flip */
28882 -       1,                              /* outdat endpoint flip */
28883 -       {0x81},                         /* per port indat */
28884 -       {0x01},                         /* per port outdat */
28885 -       {0x85},                         /* per port inack */
28886 -       {0x05},                         /* per port outcont */
28887 -       0x87,                           /* instat endpoint */
28888 -       0x07,                           /* glocont endpoint */
28889 -       keyspan_usa19w_calc_baud,       /* calc baud rate */
28890 -       KEYSPAN_USA18X_BAUDCLK          /* base baud clock */
28891 -};
28892 -
28893 -static const keyspan_device_details usa19_device_details = {
28894 -       keyspan_usa19_product_id,       /* product ID */
28895 -               msg_usa28,                      /* msg type*/
28896 -       1,                              /* num ports */
28897 -       1,                              /* indat endpoint flip */
28898 -       1,                              /* outdat endpoint flip */
28899 -       {0x81},                         /* per port indat */
28900 -       {0x01},                         /* per port outdat */
28901 -       {0x83},                         /* per port inack */
28902 -       {0x03},                         /* per port outcont */
28903 -       0x84,                           /* instat endpoint */
28904 -       -1,                             /* glocont endpoint */
28905 -       keyspan_usa19_calc_baud,        /* calc baud rate */
28906 -       KEYSPAN_USA19_BAUDCLK           /* base baud clock */
28907 -};
28908 -
28909 -static const keyspan_device_details usa19w_device_details = {
28910 -       keyspan_usa19w_product_id,      /* product ID */
28911 -               msg_usa26,                      /* msg type*/
28912 -       1,                              /* num ports */
28913 -       0,                              /* indat endpoint flip */
28914 -       1,                              /* outdat endpoint flip */
28915 -       {0x81},                         /* per port indat */
28916 -       {0x01},                         /* per port outdat */
28917 -       {0x85},                         /* per port inack */
28918 -       {0x05},                         /* per port outcont */
28919 -       0x87,                           /* instat endpoint */
28920 -       0x07,                           /* glocont endpoint */
28921 -       keyspan_usa19w_calc_baud,       /* calc baud rate */
28922 -       KEYSPAN_USA19W_BAUDCLK          /* base baud clock */
28923 -};
28924 -
28925 -static const keyspan_device_details usa28x_device_details = {
28926 -       keyspan_usa28x_product_id,      /* product ID */
28927 -               msg_usa26,                      /* msg type*/
28928 -       2,                              /* num ports */
28929 -       0,                              /* indat endpoint flip */
28930 -       1,                              /* outdat endpoint flip */
28931 -       {0x81, 0x83},                   /* per port indat */
28932 -       {0x01, 0x03},                   /* per port outdat */
28933 -       {0x85, 0x86},                   /* per port inack */
28934 -       {0x05, 0x06},                   /* per port outcont */
28935 -       0x87,                           /* instat endpoint */
28936 -       0x07,                           /* glocont endpoint */
28937 -       keyspan_usa19w_calc_baud,       /* calc baud rate */
28938 -       KEYSPAN_USA28X_BAUDCLK
28939 -};
28940 -
28941 -static const keyspan_device_details usa28xa_device_details = {
28942 -       keyspan_usa28xa_product_id,     /* product ID */
28943 -               msg_usa26,                      /* msg type*/
28944 -       2,                              /* num ports */
28945 -       0,                              /* indat endpoint flip */
28946 -       1,                              /* outdat endpoint flip */
28947 -       {0x81, 0x83},                   /* per port indat */
28948 -       {0x01, 0x03},                   /* per port outdat */
28949 -       {0x85, 0x86},                   /* per port inack */
28950 -       {0x05, 0x06},                   /* per port outcont */
28951 -       0x87,                           /* instat endpoint */
28952 -       0x07,                           /* glocont endpoint */
28953 -       keyspan_usa19w_calc_baud,       /* calc baud rate */
28954 -       KEYSPAN_USA28X_BAUDCLK
28955 -};
28956 -
28957 -       /* We don't need a separate entry for the usa28xb as it appears as a 28x anyway */
28958 -
28959 -static const keyspan_device_details usa49w_device_details = {
28960 -       keyspan_usa49w_product_id,      /* product ID */
28961 -               msg_usa49,                      /* msg type*/
28962 -       4,                              /* num ports */
28963 -       0,                              /* indat endpoint flip */
28964 -       0,                              /* outdat endpoint flip */
28965 -       { 0x81, 0x82, 0x83, 0x84},      /* per port indat */
28966 -       { 0x01, 0x02, 0x03, 0x04},      /* per port outdat */
28967 -       {-1, -1, -1, -1},               /* per port inack */
28968 -       {-1, -1, -1, -1},               /* per port outcont */
28969 -       0x87,                           /* instat endpoint */
28970 -       0x07,                           /* glocont endpoint */
28971 -       keyspan_usa19w_calc_baud,       /* calc baud rate */
28972 -       KEYSPAN_USA49W_BAUDCLK
28973 +static const struct keyspan_device_details usa28xa_device_details = {
28974 +       product_id:             keyspan_usa28xa_product_id,
28975 +       msg_format:             msg_usa26,
28976 +       num_ports:              2,
28977 +       indat_endp_flip:        0,
28978 +       outdat_endp_flip:       1,
28979 +       indat_endpoints:        {0x81, 0x83},
28980 +       outdat_endpoints:       {0x01, 0x03},
28981 +       inack_endpoints:        {0x85, 0x86},
28982 +       outcont_endpoints:      {0x05, 0x06},
28983 +       instat_endpoint:        0x87,
28984 +       glocont_endpoint:       0x07,
28985 +       calculate_baud_rate:    keyspan_usa19w_calc_baud,
28986 +       baudclk:                KEYSPAN_USA28X_BAUDCLK,
28987 +};
28988 +
28989 +/* We don't need a separate entry for the usa28xb as it appears as a 28x anyway */
28990 +
28991 +static const struct keyspan_device_details usa49w_device_details = {
28992 +       product_id:             keyspan_usa49w_product_id,
28993 +       msg_format:             msg_usa49,
28994 +       num_ports:              4,
28995 +       indat_endp_flip:        0,
28996 +       outdat_endp_flip:       0,
28997 +       indat_endpoints:        {0x81, 0x82, 0x83, 0x84},
28998 +       outdat_endpoints:       {0x01, 0x02, 0x03, 0x04},
28999 +       inack_endpoints:        {-1, -1, -1, -1},
29000 +       outcont_endpoints:      {-1, -1, -1, -1},
29001 +       instat_endpoint:        0x87,
29002 +       glocont_endpoint:       0x07,
29003 +       calculate_baud_rate:    keyspan_usa19w_calc_baud,
29004 +       baudclk:                KEYSPAN_USA49W_BAUDCLK,
29005  };
29006  
29007 -static const keyspan_device_details *keyspan_devices[] = {
29008 +static const struct keyspan_device_details *keyspan_devices[] = {
29009         &usa18x_device_details,
29010         &usa19_device_details,
29011 +       &usa19qi_device_details,
29012 +       &usa19qw_device_details,
29013         &usa19w_device_details,
29014 +       &usa28_device_details,
29015         &usa28x_device_details,
29016         &usa28xa_device_details,
29017 +       /* 28xb not required as it renumerates as a 28x */
29018         &usa49w_device_details,
29019 -       NULL
29020 +       NULL,
29021  };
29022  
29023  static __devinitdata struct usb_device_id keyspan_ids_combined[] = {
29024         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_pre_product_id) },
29025         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_pre_product_id) },
29026         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_pre_product_id) },
29027 +       { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_pre_product_id) },
29028 +       { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qw_pre_product_id) },
29029         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_pre_product_id) },
29030         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_pre_product_id) },
29031         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_pre_product_id) },
29032 @@ -358,6 +422,8 @@
29033         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_product_id) },
29034         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_product_id) },
29035         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_product_id) },
29036 +       { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_product_id) },
29037 +       { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qw_product_id) },
29038         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_product_id) },
29039         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_product_id) },
29040         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_product_id) },
29041 @@ -368,224 +434,58 @@
29042  
29043  MODULE_DEVICE_TABLE(usb, keyspan_ids_combined);
29044  
29045 -/* Eventually, we will not need separate id tables for each USB
29046 -   ID pattern.  But, for now, it looks like we need slightly different
29047 -   behavior for each match. */
29048 -
29049 -static __devinitdata struct usb_device_id keyspan_usa18x_pre_ids[] = {
29050 +/* usb_device_id table for the pre-firmware download keyspan devices */
29051 +static struct usb_device_id keyspan_pre_ids[] = {
29052         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_pre_product_id) },
29053 -       { }     /* Terminating entry */
29054 -};
29055 -
29056 -static __devinitdata struct usb_device_id keyspan_usa19_pre_ids[] = {
29057         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_pre_product_id) },
29058 -       { } /* Terminating entry */
29059 -};
29060 -
29061 -static __devinitdata struct usb_device_id keyspan_usa19w_pre_ids[] = {
29062 +       { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_pre_product_id) },
29063 +       { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qw_pre_product_id) },
29064         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_pre_product_id) },
29065 -       { } /* Terminating entry */
29066 -};
29067 -
29068 -static __devinitdata struct usb_device_id keyspan_usa28_pre_ids[] = {
29069         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_pre_product_id) },
29070 -       { } /* Terminating entry */
29071 -};
29072 -
29073 -static __devinitdata struct usb_device_id keyspan_usa28x_pre_ids[] = {
29074         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_pre_product_id) },
29075 -       { } /* Terminating entry */
29076 -};
29077 -
29078 -static __devinitdata struct usb_device_id keyspan_usa28xa_pre_ids[] = {
29079         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_pre_product_id) },
29080 -       { } /* Terminating entry */
29081 -};
29082 -
29083 -static __devinitdata struct usb_device_id keyspan_usa28xb_pre_ids[] = {
29084         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xb_pre_product_id) },
29085 -       { } /* Terminating entry */
29086 -};
29087 -
29088 -static __devinitdata struct usb_device_id keyspan_usa49w_pre_ids[] = {
29089         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_pre_product_id) },
29090         { } /* Terminating entry */
29091  };
29092  
29093 -static __devinitdata struct usb_device_id keyspan_usa18x_ids[] = {
29094 +static struct usb_device_id keyspan_1port_ids[] = {
29095         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_product_id) },
29096 -       { } /* Terminating entry */
29097 -};
29098 -
29099 -static __devinitdata struct usb_device_id keyspan_usa19_ids[] = {
29100         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_product_id) },
29101 -       { } /* Terminating entry */
29102 -};
29103 -
29104 -static __devinitdata struct usb_device_id keyspan_usa19w_ids[] = {
29105 +       { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_product_id) },
29106 +       { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qw_product_id) },
29107         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_product_id) },
29108         { } /* Terminating entry */
29109  };
29110  
29111 -static __devinitdata struct usb_device_id keyspan_usa28_ids[] = {
29112 +static struct usb_device_id keyspan_2port_ids[] = {
29113         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_product_id) },
29114 -       { } /* Terminating entry */
29115 -};
29116 -
29117 -static __devinitdata struct usb_device_id keyspan_usa28x_ids[] = {
29118         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_product_id) },
29119 -       { } /* Terminating entry */
29120 -};
29121 -
29122 -static __devinitdata struct usb_device_id keyspan_usa28xa_ids[] = {
29123         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_product_id) },
29124         { } /* Terminating entry */
29125  };
29126  
29127 -static __devinitdata struct usb_device_id keyspan_usa49w_ids[] = {
29128 +static struct usb_device_id keyspan_4port_ids[] = {
29129         { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_product_id) },
29130         { } /* Terminating entry */
29131  };
29132  
29133 -    /* Structs for the devices, pre and post renumeration. */
29134 -static struct usb_serial_device_type keyspan_usa18x_pre_device = {
29135 -       name:                   "Keyspan USA18X - (without firmware)",
29136 -       id_table:               keyspan_usa18x_pre_ids,
29137 -       needs_interrupt_in:     DONT_CARE,
29138 -       needs_bulk_in:          DONT_CARE,
29139 -       needs_bulk_out:         DONT_CARE,
29140 -       num_interrupt_in:       NUM_DONT_CARE,
29141 -       num_bulk_in:            NUM_DONT_CARE,
29142 -       num_bulk_out:           NUM_DONT_CARE,
29143 -       num_ports:              1,
29144 -       startup:                keyspan_fake_startup    
29145 -};
29146 -
29147 -static struct usb_serial_device_type keyspan_usa19_pre_device = {
29148 -       name:                   "Keyspan USA19 - (without firmware)",
29149 -       id_table:               keyspan_usa19_pre_ids,
29150 -       needs_interrupt_in:     DONT_CARE,
29151 -       needs_bulk_in:          DONT_CARE,
29152 -       needs_bulk_out:         DONT_CARE,
29153 -       num_interrupt_in:       NUM_DONT_CARE,
29154 -       num_bulk_in:            NUM_DONT_CARE,
29155 -       num_bulk_out:           NUM_DONT_CARE,
29156 -       num_ports:              1,
29157 -       startup:                keyspan_fake_startup    
29158 -};
29159 -
29160 -
29161 -static struct usb_serial_device_type keyspan_usa19w_pre_device = {
29162 -       name:                   "Keyspan USA19W - (without firmware)",
29163 -       id_table:               keyspan_usa19w_pre_ids,
29164 -       needs_interrupt_in:     DONT_CARE,
29165 -       needs_bulk_in:          DONT_CARE,
29166 -       needs_bulk_out:         DONT_CARE,
29167 -       num_interrupt_in:       NUM_DONT_CARE,
29168 -       num_bulk_in:            NUM_DONT_CARE,
29169 -       num_bulk_out:           NUM_DONT_CARE,
29170 -       num_ports:              1,
29171 -       startup:                keyspan_fake_startup    
29172 -};
29173 -
29174 -
29175 -static struct usb_serial_device_type keyspan_usa28_pre_device = {
29176 -       name:                   "Keyspan USA28 - (without firmware)",
29177 -       id_table:               keyspan_usa28_pre_ids,
29178 -       needs_interrupt_in:     DONT_CARE,
29179 -       needs_bulk_in:          DONT_CARE,
29180 -       needs_bulk_out:         DONT_CARE,
29181 -       num_interrupt_in:       NUM_DONT_CARE,
29182 -       num_bulk_in:            NUM_DONT_CARE,
29183 -       num_bulk_out:           NUM_DONT_CARE,
29184 -       num_ports:              2,
29185 -       startup:                keyspan_fake_startup    
29186 -};
29187 -
29188 -static struct usb_serial_device_type keyspan_usa28x_pre_device = {
29189 -       name:                   "Keyspan USA28X - (without firmware)",
29190 -       id_table:               keyspan_usa28x_pre_ids,
29191 -       needs_interrupt_in:     DONT_CARE,
29192 -       needs_bulk_in:          DONT_CARE,
29193 -       needs_bulk_out:         DONT_CARE,
29194 -       num_interrupt_in:       NUM_DONT_CARE,
29195 -       num_bulk_in:            NUM_DONT_CARE,
29196 -       num_bulk_out:           NUM_DONT_CARE,
29197 -       num_ports:              2,
29198 -       startup:                keyspan_fake_startup    
29199 -};
29200 -
29201 -static struct usb_serial_device_type keyspan_usa28xa_pre_device = {
29202 -       name:                   "Keyspan USA28XA - (without firmware)",
29203 -       id_table:               keyspan_usa28xa_pre_ids,
29204 -       needs_interrupt_in:     DONT_CARE,
29205 -       needs_bulk_in:          DONT_CARE,
29206 -       needs_bulk_out:         DONT_CARE,
29207 +/* Structs for the devices, pre and post renumeration. */
29208 +static struct usb_serial_device_type keyspan_pre_device = {
29209 +       owner:                  THIS_MODULE,
29210 +       name:                   "Keyspan - (without firmware)",
29211 +       id_table:               keyspan_pre_ids,
29212         num_interrupt_in:       NUM_DONT_CARE,
29213         num_bulk_in:            NUM_DONT_CARE,
29214         num_bulk_out:           NUM_DONT_CARE,
29215 -       num_ports:              2,
29216 -       startup:                keyspan_fake_startup    
29217 -};
29218 -
29219 -static struct usb_serial_device_type keyspan_usa28xb_pre_device = {
29220 -       name:                   "Keyspan USA28XB - (without firmware)",
29221 -       id_table:               keyspan_usa28xb_pre_ids,
29222 -       needs_interrupt_in:     DONT_CARE,
29223 -       needs_bulk_in:          DONT_CARE,
29224 -       needs_bulk_out:         DONT_CARE,
29225 -       num_interrupt_in:       NUM_DONT_CARE,
29226 -       num_bulk_in:            NUM_DONT_CARE,
29227 -       num_bulk_out:           NUM_DONT_CARE,
29228 -       num_ports:              2,
29229 -       startup:                keyspan_fake_startup    
29230 -};
29231 -
29232 -static struct usb_serial_device_type keyspan_usa49w_pre_device = {
29233 -       name:                   "Keyspan USA49W - (without firmware)",
29234 -       id_table:               keyspan_usa49w_pre_ids,
29235 -       needs_interrupt_in:     DONT_CARE,
29236 -       needs_bulk_in:          DONT_CARE,
29237 -       needs_bulk_out:         DONT_CARE,
29238 -       num_interrupt_in:       NUM_DONT_CARE,
29239 -       num_bulk_in:            NUM_DONT_CARE,
29240 -       num_bulk_out:           NUM_DONT_CARE,
29241 -       num_ports:              4,
29242 -       startup:                keyspan_fake_startup    
29243 -};
29244 -
29245 -static struct usb_serial_device_type keyspan_usa18x_device = {
29246 -       name:                   "Keyspan USA18X",
29247 -       id_table:               keyspan_usa18x_ids,
29248 -       needs_interrupt_in:     DONT_CARE,      
29249 -       needs_bulk_in:          MUST_HAVE,
29250 -       needs_bulk_out:         MUST_HAVE,
29251 -       num_interrupt_in:       NUM_DONT_CARE,
29252 -       num_bulk_in:            3,
29253 -       num_bulk_out:           4,
29254         num_ports:              1,
29255 -       open:                   keyspan_open,
29256 -       close:                  keyspan_close,
29257 -       write:                  keyspan_write,
29258 -       write_room:             keyspan_write_room,
29259 -       //write_bulk_callback:  Not used - we define our own herbs
29260 -       //read_int_callback:    keyspan_usa26_read_int_callback,
29261 -       chars_in_buffer:        keyspan_chars_in_buffer,
29262 -       throttle:               keyspan_rx_throttle,
29263 -       unthrottle:             keyspan_rx_unthrottle,
29264 -       ioctl:                  keyspan_ioctl,
29265 -       set_termios:            keyspan_set_termios,
29266 -       break_ctl:              keyspan_break_ctl,
29267 -       startup:                keyspan_startup,
29268 -       shutdown:               keyspan_shutdown,
29269 +       startup:                keyspan_fake_startup,
29270  };
29271  
29272 -static struct usb_serial_device_type keyspan_usa19_device = {
29273 -       name:                   "Keyspan USA19",
29274 -       id_table:               keyspan_usa19_ids,
29275 -       needs_interrupt_in:     DONT_CARE,      
29276 -       needs_bulk_in:          MUST_HAVE,
29277 -       needs_bulk_out:         MUST_HAVE,
29278 +static struct usb_serial_device_type keyspan_1port_device = {
29279 +       owner:                  THIS_MODULE,
29280 +       name:                   "Keyspan 1 port adapter",
29281 +       id_table:               keyspan_1port_ids,
29282         num_interrupt_in:       NUM_DONT_CARE,
29283         num_bulk_in:            3,
29284         num_bulk_out:           4,
29285 @@ -594,8 +494,6 @@
29286         close:                  keyspan_close,
29287         write:                  keyspan_write,
29288         write_room:             keyspan_write_room,
29289 -//     write_bulk_callback:    keyspan_write_bulk_callback,
29290 -//     read_int_callback:      keyspan_usa28_read_int_callback,
29291         chars_in_buffer:        keyspan_chars_in_buffer,
29292         throttle:               keyspan_rx_throttle,
29293         unthrottle:             keyspan_rx_unthrottle,
29294 @@ -606,85 +504,10 @@
29295         shutdown:               keyspan_shutdown,
29296  };
29297  
29298 -
29299 -static struct usb_serial_device_type keyspan_usa19w_device = {
29300 -       name:                   "Keyspan USA19W",
29301 -       id_table:               keyspan_usa19w_ids,
29302 -       needs_interrupt_in:     DONT_CARE,      
29303 -       needs_bulk_in:          MUST_HAVE,
29304 -       needs_bulk_out:         MUST_HAVE,
29305 -       num_interrupt_in:       NUM_DONT_CARE,
29306 -       num_bulk_in:            3,
29307 -       num_bulk_out:           4,
29308 -       num_ports:              1,
29309 -       open:                   keyspan_open,
29310 -       close:                  keyspan_close,
29311 -       write:                  keyspan_write,
29312 -       write_room:             keyspan_write_room,
29313 -       //write_bulk_callback:  Not used - we define our own herbs
29314 -       //read_int_callback:    keyspan_usa26_read_int_callback,
29315 -       chars_in_buffer:        keyspan_chars_in_buffer,
29316 -       throttle:               keyspan_rx_throttle,
29317 -       unthrottle:             keyspan_rx_unthrottle,
29318 -       ioctl:                  keyspan_ioctl,
29319 -       set_termios:            keyspan_set_termios,
29320 -       break_ctl:              keyspan_break_ctl,
29321 -       startup:                keyspan_startup,
29322 -       shutdown:               keyspan_shutdown,
29323 -};
29324 -
29325 -
29326 -static struct usb_serial_device_type keyspan_usa28_device = {
29327 -       name:                   "Keyspan USA28",
29328 -       id_table:               keyspan_usa28_ids,
29329 -       needs_interrupt_in:     DONT_CARE,      
29330 -       needs_bulk_in:          DONT_CARE,
29331 -       needs_bulk_out:         DONT_CARE,
29332 -       num_interrupt_in:       NUM_DONT_CARE,
29333 -       num_bulk_in:            NUM_DONT_CARE,
29334 -       num_bulk_out:           NUM_DONT_CARE,
29335 -       num_ports:              2,
29336 -       open:                   keyspan_open,
29337 -       close:                  keyspan_close,
29338 -       throttle:               keyspan_rx_throttle,
29339 -       unthrottle:             keyspan_rx_unthrottle,
29340 -       set_termios:            keyspan_set_termios,
29341 -};
29342 -
29343 -
29344 -static struct usb_serial_device_type keyspan_usa28x_device = {
29345 -       name:                   "Keyspan USA28X/XB",
29346 -       id_table:               keyspan_usa28x_ids,
29347 -       needs_interrupt_in:     DONT_CARE,      
29348 -       needs_bulk_in:          DONT_CARE,
29349 -       needs_bulk_out:         DONT_CARE,
29350 -       num_interrupt_in:       NUM_DONT_CARE,
29351 -       num_bulk_in:            NUM_DONT_CARE,
29352 -       num_bulk_out:           NUM_DONT_CARE,
29353 -       num_ports:              2,
29354 -       open:                   keyspan_open,
29355 -       close:                  keyspan_close,
29356 -       write:                  keyspan_write,
29357 -       write_room:             keyspan_write_room,
29358 -//     write_bulk_callback:    keyspan_write_bulk_callback,
29359 -//     read_int_callback:      keyspan_usa26_read_int_callback,
29360 -       chars_in_buffer:        keyspan_chars_in_buffer,
29361 -       throttle:               keyspan_rx_throttle,
29362 -       unthrottle:             keyspan_rx_unthrottle,
29363 -       ioctl:                  keyspan_ioctl,
29364 -       set_termios:            keyspan_set_termios,
29365 -       break_ctl:              keyspan_break_ctl,
29366 -       startup:                keyspan_startup,
29367 -       shutdown:               keyspan_shutdown,
29368 -
29369 -};
29370 -
29371 -static struct usb_serial_device_type keyspan_usa28xa_device = {
29372 -       name:                   "Keyspan USA28XA",
29373 -       id_table:               keyspan_usa28xa_ids,
29374 -       needs_interrupt_in:     DONT_CARE,      
29375 -       needs_bulk_in:          DONT_CARE,
29376 -       needs_bulk_out:         DONT_CARE,
29377 +static struct usb_serial_device_type keyspan_2port_device = {
29378 +       owner:                  THIS_MODULE,
29379 +       name:                   "Keyspan 2 port adapter",
29380 +       id_table:               keyspan_2port_ids,
29381         num_interrupt_in:       NUM_DONT_CARE,
29382         num_bulk_in:            NUM_DONT_CARE,
29383         num_bulk_out:           NUM_DONT_CARE,
29384 @@ -693,8 +516,6 @@
29385         close:                  keyspan_close,
29386         write:                  keyspan_write,
29387         write_room:             keyspan_write_room,
29388 -//     write_bulk_callback:    keyspan_write_bulk_callback,
29389 -//     read_int_callback:      keyspan_usa26_read_int_callback,
29390         chars_in_buffer:        keyspan_chars_in_buffer,
29391         throttle:               keyspan_rx_throttle,
29392         unthrottle:             keyspan_rx_unthrottle,
29393 @@ -703,15 +524,12 @@
29394         break_ctl:              keyspan_break_ctl,
29395         startup:                keyspan_startup,
29396         shutdown:               keyspan_shutdown,
29397 -
29398  };
29399  
29400 -static struct usb_serial_device_type keyspan_usa49w_device = {
29401 -       name:                   "Keyspan USA49W",
29402 -       id_table:               keyspan_usa49w_ids,
29403 -       needs_interrupt_in:     DONT_CARE,      
29404 -       needs_bulk_in:          MUST_HAVE,
29405 -       needs_bulk_out:         MUST_HAVE,
29406 +static struct usb_serial_device_type keyspan_4port_device = {
29407 +       owner:                  THIS_MODULE,
29408 +       name:                   "Keyspan 4 port adapter",
29409 +       id_table:               keyspan_4port_ids,
29410         num_interrupt_in:       NUM_DONT_CARE,
29411         num_bulk_in:            5,
29412         num_bulk_out:           5,
29413 @@ -720,8 +538,6 @@
29414         close:                  keyspan_close,
29415         write:                  keyspan_write,
29416         write_room:             keyspan_write_room,
29417 -       //write_bulk_callback:  Not used - we define our own herbs
29418 -       //read_int_callback:    keyspan_usa26_read_int_callback,
29419         chars_in_buffer:        keyspan_chars_in_buffer,
29420         throttle:               keyspan_rx_throttle,
29421         unthrottle:             keyspan_rx_unthrottle,
29422 @@ -732,5 +548,4 @@
29423         shutdown:               keyspan_shutdown,
29424  };
29425  
29426 -
29427  #endif
29428 diff -Nur linux-2.4.19.org/drivers/usb/serial/keyspan_pda.c linux-2.4.19/drivers/usb/serial/keyspan_pda.c
29429 --- linux-2.4.19.org/drivers/usb/serial/keyspan_pda.c   Thu Oct 11 08:42:47 2001
29430 +++ linux-2.4.19/drivers/usb/serial/keyspan_pda.c       Thu Oct 31 08:11:24 2002
29431 @@ -68,19 +68,16 @@
29432  
29433  #include <linux/config.h>
29434  #include <linux/kernel.h>
29435 -#include <linux/sched.h>
29436 -#include <linux/signal.h>
29437  #include <linux/errno.h>
29438 -#include <linux/poll.h>
29439  #include <linux/init.h>
29440  #include <linux/slab.h>
29441 -#include <linux/fcntl.h>
29442  #include <linux/tty.h>
29443  #include <linux/tty_driver.h>
29444  #include <linux/tty_flip.h>
29445  #include <linux/module.h>
29446  #include <linux/spinlock.h>
29447  #include <linux/tqueue.h>
29448 +#include <asm/uaccess.h>
29449  #include <linux/usb.h>
29450  
29451  #ifdef CONFIG_USB_SERIAL_DEBUG
29452 @@ -157,25 +154,21 @@
29453  
29454  MODULE_DEVICE_TABLE (usb, id_table_combined);
29455  
29456 -static __devinitdata struct usb_device_id id_table_std [] = {
29457 +static struct usb_device_id id_table_std [] = {
29458         { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_ID) },
29459         { }                                             /* Terminating entry */
29460  };
29461  
29462  #ifdef KEYSPAN
29463 -static __devinitdata struct usb_device_id id_table_fake [] = {
29464 +static struct usb_device_id id_table_fake [] = {
29465         { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_FAKE_ID) },
29466         { }                                             /* Terminating entry */
29467  };
29468  #endif
29469  
29470  #ifdef XIRCOM
29471 -static __devinitdata struct usb_device_id id_table_fake_xircom [] = {
29472 +static struct usb_device_id id_table_fake_xircom [] = {
29473          { USB_DEVICE(XIRCOM_VENDOR_ID, XIRCOM_FAKE_ID) },
29474 -        { }                                             
29475 -};
29476 -
29477 -static __devinitdata struct usb_device_id id_table_fake_entregra [] = {
29478          { USB_DEVICE(ENTREGRA_VENDOR_ID, ENTREGRA_FAKE_ID) },
29479          { }                                             
29480  };
29481 @@ -197,26 +190,28 @@
29482         /* wake up other tty processes */
29483         wake_up_interruptible( &tty->write_wait );
29484         /* For 2.2.16 backport -- wake_up_interruptible( &tty->poll_wait ); */
29485 -       MOD_DEC_USE_COUNT;
29486  }
29487  
29488  static void keyspan_pda_request_unthrottle( struct usb_serial *serial )
29489  {
29490 +       int result;
29491  
29492         dbg(" request_unthrottle");
29493         /* ask the device to tell us when the tx buffer becomes
29494            sufficiently empty */
29495 -       usb_control_msg(serial->dev, 
29496 -                            usb_sndctrlpipe(serial->dev, 0),
29497 -                            7, /* request_unthrottle */
29498 -                            USB_TYPE_VENDOR | USB_RECIP_INTERFACE
29499 -                            | USB_DIR_OUT,
29500 -                            16, /* value: threshold */
29501 -                            0, /* index */
29502 -                            NULL,
29503 -                            0,
29504 -                            2*HZ);
29505 -       MOD_DEC_USE_COUNT;
29506 +       result = usb_control_msg(serial->dev, 
29507 +                                usb_sndctrlpipe(serial->dev, 0),
29508 +                                7, /* request_unthrottle */
29509 +                                USB_TYPE_VENDOR | USB_RECIP_INTERFACE
29510 +                                | USB_DIR_OUT,
29511 +                                16, /* value: threshold */
29512 +                                0, /* index */
29513 +                                NULL,
29514 +                                0,
29515 +                                2*HZ);
29516 +       if (result < 0)
29517 +               dbg("%s - error %d from usb_control_msg", 
29518 +                   __FUNCTION__, result);
29519  }
29520  
29521  
29522 @@ -265,9 +260,7 @@
29523                         tty = serial->port[0].tty;
29524                         priv->tx_throttled = 0;
29525                         /* queue up a wakeup at scheduler time */
29526 -                       MOD_INC_USE_COUNT;
29527 -                       if (schedule_task(&priv->wakeup_task) == 0)
29528 -                               MOD_DEC_USE_COUNT;
29529 +                       schedule_task(&priv->wakeup_task);
29530                         break;
29531                 default:
29532                         break;
29533 @@ -345,14 +338,19 @@
29534  {
29535         struct usb_serial *serial = port->serial;
29536         int value;
29537 +       int result;
29538 +
29539         if (break_state == -1)
29540                 value = 1; /* start break */
29541         else
29542                 value = 0; /* clear break */
29543 -       usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
29544 -                       4, /* set break */
29545 -                       USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
29546 -                       value, 0, NULL, 0, 2*HZ);
29547 +       result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
29548 +                               4, /* set break */
29549 +                               USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
29550 +                               value, 0, NULL, 0, 2*HZ);
29551 +       if (result < 0)
29552 +               dbg("%s - error %d from usb_control_msg", 
29553 +                   __FUNCTION__, result);
29554         /* there is something funky about this.. the TCSBRK that 'cu' performs
29555            ought to translate into a break_ctl(-1),break_ctl(0) pair HZ/4
29556            seconds apart, but it feels like the break sent isn't as long as it
29557 @@ -606,9 +604,7 @@
29558  
29559         if (request_unthrottle) {
29560                 priv->tx_throttled = 1; /* block writers */
29561 -               MOD_INC_USE_COUNT;
29562 -               if (schedule_task(&priv->unthrottle_task) == 0)
29563 -                       MOD_DEC_USE_COUNT;
29564 +               schedule_task(&priv->unthrottle_task);
29565         }
29566  
29567         rc = count;
29568 @@ -635,9 +631,7 @@
29569         }
29570         
29571         /* queue up a wakeup at scheduler time */
29572 -       MOD_INC_USE_COUNT;
29573 -       if (schedule_task(&priv->wakeup_task) == 0)
29574 -               MOD_DEC_USE_COUNT;
29575 +       schedule_task(&priv->wakeup_task);
29576  }
29577  
29578  
29579 @@ -674,62 +668,45 @@
29580         int rc = 0;
29581         struct keyspan_pda_private *priv;
29582  
29583 -       down (&port->sem);
29584 -
29585 -       MOD_INC_USE_COUNT;
29586 -       ++port->open_count;
29587 -
29588 -       if (!port->active) {
29589 -               port->active = 1;
29590
29591 -               /* find out how much room is in the Tx ring */
29592 -               rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
29593 -                                    6, /* write_room */
29594 -                                    USB_TYPE_VENDOR | USB_RECIP_INTERFACE
29595 -                                    | USB_DIR_IN,
29596 -                                    0, /* value */
29597 -                                    0, /* index */
29598 -                                    &room,
29599 -                                    1,
29600 -                                    2*HZ);
29601 -               if (rc < 0) {
29602 -                       dbg(__FUNCTION__" - roomquery failed");
29603 -                       goto error;
29604 -               }
29605 -               if (rc == 0) {
29606 -                       dbg(__FUNCTION__" - roomquery returned 0 bytes");
29607 -                       rc = -EIO;
29608 -                       goto error;
29609 -               }
29610 -               priv = (struct keyspan_pda_private *)(port->private);
29611 -               priv->tx_room = room;
29612 -               priv->tx_throttled = room ? 0 : 1;
29613 -
29614 -               /* the normal serial device seems to always turn on DTR and RTS here,
29615 -                  so do the same */
29616 -               if (port->tty->termios->c_cflag & CBAUD)
29617 -                       keyspan_pda_set_modem_info(serial, (1<<7) | (1<<2) );
29618 -               else
29619 -                       keyspan_pda_set_modem_info(serial, 0);
29620 +       /* find out how much room is in the Tx ring */
29621 +       rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
29622 +                            6, /* write_room */
29623 +                            USB_TYPE_VENDOR | USB_RECIP_INTERFACE
29624 +                            | USB_DIR_IN,
29625 +                            0, /* value */
29626 +                            0, /* index */
29627 +                            &room,
29628 +                            1,
29629 +                            2*HZ);
29630 +       if (rc < 0) {
29631 +               dbg("%s - roomquery failed", __FUNCTION__);
29632 +               goto error;
29633 +       }
29634 +       if (rc == 0) {
29635 +               dbg("%s - roomquery returned 0 bytes", __FUNCTION__);
29636 +               rc = -EIO;
29637 +               goto error;
29638 +       }
29639 +       priv = (struct keyspan_pda_private *)(port->private);
29640 +       priv->tx_room = room;
29641 +       priv->tx_throttled = room ? 0 : 1;
29642  
29643 -               /*Start reading from the device*/
29644 -               port->interrupt_in_urb->dev = serial->dev;
29645 -               rc = usb_submit_urb(port->interrupt_in_urb);
29646 -               if (rc) {
29647 -                       dbg(__FUNCTION__" - usb_submit_urb(read int) failed");
29648 -                       goto error;
29649 -               }
29650 +       /* the normal serial device seems to always turn on DTR and RTS here,
29651 +          so do the same */
29652 +       if (port->tty->termios->c_cflag & CBAUD)
29653 +               keyspan_pda_set_modem_info(serial, (1<<7) | (1<<2) );
29654 +       else
29655 +               keyspan_pda_set_modem_info(serial, 0);
29656  
29657 +       /*Start reading from the device*/
29658 +       port->interrupt_in_urb->dev = serial->dev;
29659 +       rc = usb_submit_urb(port->interrupt_in_urb);
29660 +       if (rc) {
29661 +               dbg("%s - usb_submit_urb(read int) failed", __FUNCTION__);
29662 +               goto error;
29663         }
29664  
29665 -
29666 -       up (&port->sem);
29667 -       return rc;
29668  error:
29669 -       --port->open_count;
29670 -       port->active = 0;
29671 -       MOD_DEC_USE_COUNT;
29672 -       up (&port->sem);
29673         return rc;
29674  }
29675  
29676 @@ -738,26 +715,15 @@
29677  {
29678         struct usb_serial *serial = port->serial;
29679  
29680 -       down (&port->sem);
29681 -
29682 -       --port->open_count;
29683 +       if (serial->dev) {
29684 +               /* the normal serial device seems to always shut off DTR and RTS now */
29685 +               if (port->tty->termios->c_cflag & HUPCL)
29686 +                       keyspan_pda_set_modem_info(serial, 0);
29687  
29688 -       if (port->open_count <= 0) {
29689 -               if (serial->dev) {
29690 -                       /* the normal serial device seems to always shut off DTR and RTS now */
29691 -                       if (port->tty->termios->c_cflag & HUPCL)
29692 -                               keyspan_pda_set_modem_info(serial, 0);
29693 -
29694 -                       /* shutdown our bulk reads and writes */
29695 -                       usb_unlink_urb (port->write_urb);
29696 -                       usb_unlink_urb (port->interrupt_in_urb);
29697 -               }
29698 -               port->active = 0;
29699 -               port->open_count = 0;
29700 +               /* shutdown our bulk reads and writes */
29701 +               usb_unlink_urb (port->write_urb);
29702 +               usb_unlink_urb (port->interrupt_in_urb);
29703         }
29704 -
29705 -       up (&port->sem);
29706 -       MOD_DEC_USE_COUNT;
29707  }
29708  
29709  
29710 @@ -780,7 +746,7 @@
29711                 record = &xircom_pgs_firmware[0];
29712  #endif
29713         if (record == NULL) {
29714 -               err(__FUNCTION__": unknown vendor, aborting.");
29715 +               err("%s: unknown vendor, aborting.", __FUNCTION__);
29716                 return -ENODEV;
29717         }
29718  
29719 @@ -831,81 +797,59 @@
29720  
29721  static void keyspan_pda_shutdown (struct usb_serial *serial)
29722  {
29723 -       dbg (__FUNCTION__);
29724 +       dbg("%s", __FUNCTION__);
29725         
29726 -       while (serial->port[0].open_count > 0) {
29727 -               keyspan_pda_close (&serial->port[0], NULL);
29728 -       }
29729         kfree(serial->port[0].private);
29730  }
29731  
29732  #ifdef KEYSPAN
29733  static struct usb_serial_device_type keyspan_pda_fake_device = {
29734 -       name:                   "Keyspan PDA - (prerenumeration)",
29735 -       id_table:               id_table_fake,
29736 -       needs_interrupt_in:     DONT_CARE,
29737 -       needs_bulk_in:          DONT_CARE,
29738 -       needs_bulk_out:         DONT_CARE,
29739 -       num_interrupt_in:       NUM_DONT_CARE,
29740 -       num_bulk_in:            NUM_DONT_CARE,
29741 -       num_bulk_out:           NUM_DONT_CARE,
29742 -       num_ports:              1,
29743 -       startup:                keyspan_pda_fake_startup,
29744 +       .owner =                THIS_MODULE,
29745 +       .name =                 "Keyspan PDA - (prerenumeration)",
29746 +       .id_table =             id_table_fake,
29747 +       .num_interrupt_in =     NUM_DONT_CARE,
29748 +       .num_bulk_in =          NUM_DONT_CARE,
29749 +       .num_bulk_out =         NUM_DONT_CARE,
29750 +       .num_ports =            1,
29751 +       .startup =              keyspan_pda_fake_startup,
29752  };
29753  #endif
29754  
29755  #ifdef XIRCOM
29756  static struct usb_serial_device_type xircom_pgs_fake_device = {
29757 -        name:                   "Xircom PGS - (prerenumeration)",
29758 -        id_table:               id_table_fake_xircom,
29759 -        needs_interrupt_in:     DONT_CARE,
29760 -        needs_bulk_in:          DONT_CARE,
29761 -        needs_bulk_out:         DONT_CARE,
29762 -        num_interrupt_in:       NUM_DONT_CARE,
29763 -        num_bulk_in:            NUM_DONT_CARE,
29764 -        num_bulk_out:           NUM_DONT_CARE,
29765 -        num_ports:              1,
29766 -        startup:                keyspan_pda_fake_startup,
29767 -};
29768 -
29769 -static struct usb_serial_device_type entregra_pgs_fake_device = {
29770 -        name:                   "Entregra PGS - (prerenumeration)",
29771 -        id_table:               id_table_fake_entregra,
29772 -        needs_interrupt_in:     DONT_CARE,
29773 -        needs_bulk_in:          DONT_CARE,
29774 -        needs_bulk_out:         DONT_CARE,
29775 -        num_interrupt_in:       NUM_DONT_CARE,
29776 -        num_bulk_in:            NUM_DONT_CARE,
29777 -        num_bulk_out:           NUM_DONT_CARE,
29778 -        num_ports:              1,
29779 -        startup:                keyspan_pda_fake_startup,
29780 +       .owner =                THIS_MODULE,
29781 +       .name =                 "Xircom / Entregra PGS - (prerenumeration)",
29782 +       .id_table =             id_table_fake_xircom,
29783 +       .num_interrupt_in =     NUM_DONT_CARE,
29784 +       .num_bulk_in =          NUM_DONT_CARE,
29785 +       .num_bulk_out =         NUM_DONT_CARE,
29786 +       .num_ports =            1,
29787 +       .startup =              keyspan_pda_fake_startup,
29788  };
29789  #endif
29790  
29791  static struct usb_serial_device_type keyspan_pda_device = {
29792 -       name:                   "Keyspan PDA",
29793 -       id_table:               id_table_std,
29794 -       needs_interrupt_in:     MUST_HAVE,
29795 -       needs_bulk_in:          DONT_CARE,
29796 -       needs_bulk_out:         MUST_HAVE,
29797 -       num_interrupt_in:       1,
29798 -       num_bulk_in:            0,
29799 -       num_bulk_out:           1,
29800 -       num_ports:              1,
29801 -       open:                   keyspan_pda_open,
29802 -       close:                  keyspan_pda_close,
29803 -       write:                  keyspan_pda_write,
29804 -       write_room:             keyspan_pda_write_room,
29805 -       write_bulk_callback:    keyspan_pda_write_bulk_callback,
29806 -       read_int_callback:      keyspan_pda_rx_interrupt,
29807 -       chars_in_buffer:        keyspan_pda_chars_in_buffer,
29808 -       throttle:               keyspan_pda_rx_throttle,
29809 -       unthrottle:             keyspan_pda_rx_unthrottle,
29810 -       ioctl:                  keyspan_pda_ioctl,
29811 -       set_termios:            keyspan_pda_set_termios,
29812 -       break_ctl:              keyspan_pda_break_ctl,
29813 -       startup:                keyspan_pda_startup,
29814 -       shutdown:               keyspan_pda_shutdown,
29815 +       .owner =                THIS_MODULE,
29816 +       .name =                 "Keyspan PDA",
29817 +       .id_table =             id_table_std,
29818 +       .num_interrupt_in =     1,
29819 +       .num_bulk_in =          0,
29820 +       .num_bulk_out =         1,
29821 +       .num_ports =            1,
29822 +       .open =                 keyspan_pda_open,
29823 +       .close =                keyspan_pda_close,
29824 +       .write =                keyspan_pda_write,
29825 +       .write_room =           keyspan_pda_write_room,
29826 +       .write_bulk_callback =  keyspan_pda_write_bulk_callback,
29827 +       .read_int_callback =    keyspan_pda_rx_interrupt,
29828 +       .chars_in_buffer =      keyspan_pda_chars_in_buffer,
29829 +       .throttle =             keyspan_pda_rx_throttle,
29830 +       .unthrottle =           keyspan_pda_rx_unthrottle,
29831 +       .ioctl =                keyspan_pda_ioctl,
29832 +       .set_termios =          keyspan_pda_set_termios,
29833 +       .break_ctl =            keyspan_pda_break_ctl,
29834 +       .startup =              keyspan_pda_startup,
29835 +       .shutdown =             keyspan_pda_shutdown,
29836  };
29837  
29838  
29839 @@ -917,7 +861,6 @@
29840  #endif
29841  #ifdef XIRCOM
29842         usb_serial_register (&xircom_pgs_fake_device);
29843 -       usb_serial_register (&entregra_pgs_fake_device);
29844  #endif
29845         info(DRIVER_DESC " " DRIVER_VERSION);
29846         return 0;
29847 @@ -931,7 +874,6 @@
29848         usb_serial_deregister (&keyspan_pda_fake_device);
29849  #endif
29850  #ifdef XIRCOM
29851 -       usb_serial_deregister (&entregra_pgs_fake_device);
29852         usb_serial_deregister (&xircom_pgs_fake_device);
29853  #endif
29854  }
29855 diff -Nur linux-2.4.19.org/drivers/usb/serial/keyspan_usa18x_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa18x_fw.h
29856 --- linux-2.4.19.org/drivers/usb/serial/keyspan_usa18x_fw.h     Wed Oct 10 00:15:02 2001
29857 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa18x_fw.h Thu Oct 31 08:11:24 2002
29858 @@ -1,341 +1,345 @@
29859  /* keyspan_usa18x_fw.h
29860 -  
29861 -   Generated from Keyspan firmware image usa16code.h Sat Oct  6 12:16:35 EST 2001
29862 -   This firmware is for the Keyspan USA-18X Serial Adaptor
29863  
29864 -   "The firmware contained herein as keyspan_usa18x_fw.h is
29865 -   Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
29866 -   ("Keyspan"), as an unpublished work.  This notice does not imply
29867 -   unrestricted or public access to this firmware which is a trade secret of
29868 -   Keyspan, and which may not be reproduced, used, sold or transferred to any
29869 -   third party without Keyspan's prior written consent.  All Rights Reserved.
29870 +       The firmware contained herein as keyspan_usa18x_fw.h is
29871  
29872 -   This firmware may not be modified and may only be used with the Keyspan 
29873 -   USA-18X Serial Adapter.  Distribution and/or Modification of the
29874 -   keyspan.c driver which includes this firmware, in whole or in part,
29875 -   requires the inclusion of this statement."
29876 +               Copyright (C) 1999-2001
29877 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
29878 +               
29879 +       as an unpublished work. This notice does not imply unrestricted or
29880 +       public access to the source code from which this firmware image is
29881 +       derived.  Except as noted below this firmware image may not be 
29882 +       reproduced, used, sold or transferred to any third party without 
29883 +       Keyspan's prior written consent.  All Rights Reserved.
29884  
29885 +       Permission is hereby granted for the distribution of this firmware 
29886 +       image as part of a Linux or other Open Source operating system kernel 
29887 +       in text or binary form as required. 
29888 +
29889 +       This firmware may not be modified and may only be used with  
29890 +       Keyspan hardware.  Distribution and/or Modification of the 
29891 +       keyspan.c driver which includes this firmware, in whole or in 
29892 +       part, requires the inclusion of this statement."
29893  */
29894  
29895  static const struct ezusb_hex_record keyspan_usa18x_firmware[] = {
29896 - {0x0033,  3, { 0x02, 0x13, 0xab}},
29897 + {0x0033,  3, { 0x02, 0x12, 0xf7}},
29898   {0x0003, 16, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0}},
29899   {0x0013, 16, { 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90}},
29900   {0x0023, 15, { 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x07, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22}},
29901 - {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x33, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
29902 + {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x1b, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
29903   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x09, 0xc2, 0x00, 0x80, 0x77, 0x30, 0x03, 0x3b, 0x90, 0x7f}},
29904 - {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x33, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
29905 + {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x1b, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
29906   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x09, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60}},
29907 - {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xca}},
29908 + {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xba}},
29909   {0x0096, 16, { 0xc2, 0x03, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
29910 - {0x00a6, 16, { 0x12, 0x13, 0x33, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
29911 + {0x00a6, 16, { 0x12, 0x13, 0x1b, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
29912   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d}},
29913 - {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xca, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
29914 - {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x66, 0x53, 0x36, 0x80, 0x12}},
29915 - {0x00e6, 16, { 0x13, 0x3f, 0xef, 0x42, 0x36, 0x12, 0x11, 0xed, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3a, 0x50, 0x0f}},
29916 - {0x00f6, 16, { 0x12, 0x13, 0x1b, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x61, 0xc2}},
29917 + {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xba, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
29918 + {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x60, 0x12, 0x11, 0xd6, 0x8f}},
29919 + {0x00e6, 16, { 0x19, 0x12, 0x13, 0x27, 0x8f, 0x36, 0xe5, 0x19, 0xc3, 0x95, 0x3a, 0x50, 0x0f, 0x12, 0x12, 0xeb}},
29920 + {0x00f6, 16, { 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x5e, 0xc2, 0x0b, 0xe5, 0x19}},
29921   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
29922   {0x0043,  3, { 0x02, 0x13, 0x00}},
29923 - {0x0000,  3, { 0x02, 0x0e, 0x10}},
29924 - {0x0106, 64, { 0x0b, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x36, 0x80, 0x57, 0x12, 0x13, 0x3f, 0xef, 0x42, 0x36, 0xe5, 0x36,
29925 -  0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08,
29926 -  0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x5b, 0xe5,
29927 -  0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40}},
29928 - {0x0146, 64, { 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08, 0xe4, 0x90, 0x7e, 0x80, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75,
29929 -  0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12, 0x0c, 0xef, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90,
29930 -  0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x05, 0x03, 0x02, 0x03, 0xc5, 0xc2, 0x05, 0xe4, 0xf5,
29931 -  0x18, 0x74, 0x40, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5}},
29932 - {0x0186, 64, { 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
29933 -  0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68,
29934 -  0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xc8, 0x7f, 0x03, 0x7d,
29935 -  0xcd, 0x12, 0x11, 0xc8, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0}},
29936 - {0x01c6, 64, { 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12,
29937 -  0x10, 0x4c, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12, 0x10, 0x72, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0,
29938 -  0xfd, 0x12, 0x11, 0xc8, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xc8, 0x43, 0x46, 0x80, 0x90, 0x7f,
29939 -  0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12}},
29940 - {0x0206, 64, { 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e,
29941 -  0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0,
29942 -  0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0,
29943 -  0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e, 0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43}},
29944 - {0x0246, 64, { 0x42, 0x80, 0x80, 0x03, 0x53, 0x42, 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43,
29945 -  0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x10, 0xbe, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xe4,
29946 -  0xaf, 0x42, 0x12, 0x10, 0x98, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42,
29947 -  0x12, 0x10, 0x98, 0x90, 0x7e, 0x0c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46}},
29948 - {0x0286, 64, { 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46,
29949 -  0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03,
29950 -  0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90,
29951 -  0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3, 0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3}},
29952 - {0x02c6, 64, { 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10, 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
29953 -  0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90,
29954 -  0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98,
29955 -  0x74, 0x11, 0xf0, 0x12, 0x13, 0x0f, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e}},
29956 - {0x0306, 64, { 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xc8, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e,
29957 -  0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xc8, 0x75, 0x29,
29958 -  0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5,
29959 -  0x40, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11}},
29960 - {0x0346, 64, { 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
29961 -  0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xc8,
29962 -  0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff,
29963 -  0xad, 0x3e, 0x12, 0x11, 0xc8, 0xe4, 0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60}},
29964 - {0x0386, 64, { 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
29965 -  0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4,
29966 -  0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e, 0x1f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0,
29967 -  0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35, 0xf0, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30}},
29968 - {0x03c6, 64, { 0x1a, 0x52, 0xe5, 0x38, 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40,
29969 -  0x04, 0x15, 0x13, 0x80, 0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x13, 0x0f,
29970 -  0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13,
29971 -  0x4b, 0xef, 0x54, 0x80, 0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07}},
29972 - {0x0406, 64, { 0x30, 0x0d, 0x11, 0x12, 0x13, 0x4b, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19,
29973 -  0x25, 0xd2, 0x07, 0x20, 0x1b, 0x03, 0x02, 0x07, 0xf4, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x87, 0xef,
29974 -  0xc3, 0x95, 0x3d, 0x40, 0x03, 0x02, 0x04, 0xb2, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a,
29975 -  0xc2, 0x00, 0x80, 0x77, 0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12}},
29976 - {0x0446, 64, { 0x13, 0x87, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f,
29977 -  0xcb, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41,
29978 -  0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x41, 0x12, 0x0d, 0x14, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0,
29979 -  0x80, 0x39, 0x90, 0x7f, 0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x87, 0xef, 0xc3, 0x94}},
29980 - {0x0486, 64, { 0x40, 0x50, 0x29, 0x90, 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19,
29981 -  0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d,
29982 -  0xc1, 0x12, 0x0d, 0x14, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30,
29983 -  0xe1, 0x03, 0x02, 0x05, 0x40, 0x53, 0x37, 0x80, 0x12, 0x13, 0x93, 0xef, 0x42, 0x37, 0x12}},
29984 - {0x04c6, 64, { 0x12, 0x37, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x6f, 0xef, 0x30, 0xe0, 0x08,
29985 -  0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c, 0x61, 0xc2, 0x0c, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x37,
29986 -  0x80, 0x57, 0x12, 0x13, 0x93, 0xef, 0x42, 0x37, 0xe5, 0x37, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3,
29987 -  0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7d, 0x7f, 0x80, 0x75}},
29988 - {0x0506, 64, { 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0x94, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb,
29989 -  0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08,
29990 -  0xe4, 0x90, 0x7d, 0x80, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12,
29991 -  0x0d, 0x39, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90, 0x7f, 0xd0, 0xe0, 0x30, 0xe1}},
29992 - {0x0546, 64, { 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x9f, 0xc2, 0x06, 0xe4, 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5,
29993 -  0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e,
29994 -  0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5,
29995 -  0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x23, 0xe0, 0x60}},
29996 - {0x0586, 64, { 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x12, 0x12, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x12, 0x12, 0x43, 0x47,
29997 -  0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e,
29998 -  0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12, 0x11, 0x30, 0x90, 0x7e, 0x22, 0xe0,
29999 -  0xff, 0x12, 0x11, 0x56, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0, 0xfd, 0x12, 0x12, 0x12, 0x7f}},
30000 - {0x05c6, 64, { 0x03, 0x7d, 0x07, 0x12, 0x12, 0x12, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0,
30001 -  0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0,
30002 -  0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90,
30003 -  0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54}},
30004 - {0x0606, 64, { 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e,
30005 -  0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43, 0x80, 0x80, 0x03, 0x53, 0x43, 0x7f,
30006 -  0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43, 0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12,
30007 -  0x11, 0x7c, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0xa2, 0xaf, 0x43, 0x12, 0x11, 0x0a}},
30008 - {0x0646, 64, { 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf, 0x43, 0x12, 0x11, 0x0a, 0x90, 0x7e, 0x2c,
30009 -  0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02, 0x80, 0x03, 0x53, 0x47, 0xfd, 0x90,
30010 -  0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60,
30011 -  0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03, 0x53, 0x47, 0xfe, 0x90, 0x7f}},
30012 - {0x0686, 64, { 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3,
30013 -  0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x10, 0x80,
30014 -  0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0,
30015 -  0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0}},
30016 - {0x06c6, 64, { 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x63,
30017 -  0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12,
30018 -  0x12, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e, 0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f,
30019 -  0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x12, 0x75, 0x32, 0x01, 0xd2, 0x08, 0x90, 0x7e}},
30020 - {0x0706, 64, { 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00,
30021 -  0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43, 0x45, 0x40, 0x90, 0x7f, 0x98, 0x74,
30022 -  0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f,
30023 -  0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x12, 0x75, 0x34, 0x01, 0xd2, 0x08}},
30024 - {0x0746, 64, { 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x12, 0xe4,
30025 -  0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
30026 -  0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c,
30027 -  0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4, 0xf5, 0x39, 0xd2, 0x08, 0x90}},
30028 - {0x0786, 64, { 0x7e, 0x3f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x13, 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0,
30029 -  0x74, 0x36, 0xf0, 0xe4, 0x90, 0x7f, 0xd1, 0xf0, 0x30, 0x1a, 0x52, 0xe5, 0x39, 0x60, 0x02, 0x15,
30030 -  0x39, 0x30, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x3e, 0x75,
30031 -  0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12, 0x13, 0x63, 0xef, 0x54, 0x01, 0xf5, 0x19}},
30032 - {0x07c6, 64, { 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2, 0x08, 0x12, 0x13, 0x9f, 0xef, 0x54, 0x80, 0xf5, 0x19,
30033 -  0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2, 0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x9f, 0xef,
30034 -  0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05, 0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a,
30035 -  0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5}},
30036 - {0x0806, 64, { 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74,
30037 -  0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1,
30038 -  0x03, 0x02, 0x09, 0x28, 0xe5, 0x0a, 0x70, 0x40, 0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2,
30039 -  0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
30040 - {0x0846, 64, { 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
30041 -  0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38,
30042 -  0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22, 0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08,
30043 -  0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d}},
30044 - {0x0886, 64, { 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82,
30045 -  0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f,
30046 -  0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4, 0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a,
30047 -  0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2, 0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00}},
30048 - {0x08c6, 64, { 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18,
30049 -  0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb,
30050 -  0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a, 0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15,
30051 -  0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
30052 - {0x0906, 64, { 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
30053 -  0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5,
30054 -  0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0e, 0xf4, 0x0a, 0x10, 0x00, 0x0a, 0x84, 0x01, 0x0a,
30055 -  0xf0, 0x03, 0x09, 0x4c, 0x06, 0x0a, 0x03, 0x08, 0x09, 0xfd, 0x09, 0x09, 0xe5, 0x0a, 0x09}},
30056 - {0x0946, 64, { 0xf4, 0x0b, 0x00, 0x00, 0x0b, 0x3f, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61,
30057 -  0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xdb, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90,
30058 -  0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02,
30059 -  0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83}},
30060 - {0x0986, 64, { 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75,
30061 -  0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83,
30062 -  0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b,
30063 -  0x46, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f, 0x1a, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90}},
30064 - {0x09c6, 64, { 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01,
30065 -  0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f,
30066 -  0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea,
30067 -  0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x46, 0x12, 0x0b, 0x4e, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0x00}},
30068 - {0x0a06, 64, { 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60,
30069 -  0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff,
30070 -  0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
30071 -  0x02, 0xf0, 0x02, 0x0b, 0x46, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5}},
30072 - {0x0a46, 64, { 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f,
30073 -  0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83,
30074 -  0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0,
30075 -  0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f}},
30076 - {0x0a86, 64, { 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0,
30077 -  0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02,
30078 -  0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff,
30079 -  0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4}},
30080 - {0x0ac6, 64, { 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54,
30081 -  0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f,
30082 -  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60,
30083 -  0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80}},
30084 - {0x0b06, 64, { 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90,
30085 -  0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25,
30086 -  0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90,
30087 -  0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0}},
30088 - {0x0b46, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74,
30089 -  0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e,
30090 -  0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18, 0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74,
30091 -  0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5, 0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74}},
30092 - {0x0b86, 64, { 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5, 0x18, 0xb4,
30093 -  0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38, 0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b,
30094 -  0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13, 0xd2, 0x03, 0xd2, 0x01, 0x90, 0x7f, 0x98, 0x74,
30095 -  0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd}},
30096 - {0x0bc6, 64, { 0x12, 0x11, 0xc8, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0x98, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x7f,
30097 -  0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
30098 -  0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x11, 0xc8, 0xe4,
30099 -  0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xc8, 0x90, 0x7f, 0x98, 0x74, 0x11}},
30100 - {0x0c06, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11, 0xc8, 0x7f, 0x01, 0x12, 0x12,
30101 -  0x81, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xc8, 0x20, 0x1b, 0x03, 0x02, 0x0c, 0xc7, 0x75, 0x2d,
30102 -  0x01, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4,
30103 -  0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b, 0x01, 0xe4, 0xf5}},
30104 - {0x0c46, 64, { 0x39, 0xf5, 0x13, 0xf5, 0x37, 0xc2, 0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2, 0x00, 0xc2, 0x0a, 0xc2, 0x13,
30105 -  0xd2, 0x04, 0xd2, 0x02, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00,
30106 -  0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x12, 0x12, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x11,
30107 -  0x0a, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x7f, 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90}},
30108 - {0x0c86, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80,
30109 -  0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x12, 0x12, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12,
30110 -  0x12, 0x12, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d,
30111 -  0x7f, 0x12, 0x12, 0x12, 0x7f, 0x01, 0x12, 0x12, 0xa2, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12}},
30112 - {0x0cc6, 64, { 0x12, 0xd2, 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5,
30113 -  0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86,
30114 + {0x0000,  3, { 0x02, 0x0e, 0x00}},
30115 + {0x0106, 64, { 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x36, 0x02, 0xe5, 0x36, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94,
30116 +  0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e,
30117 +  0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x4b, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0,
30118 +  0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08}},
30119 + {0x0146, 64, { 0x90, 0x7e, 0x80, 0xe5, 0x36, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12,
30120 +  0x0c, 0xdf, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06,
30121 +  0x20, 0x05, 0x03, 0x02, 0x03, 0xc1, 0xc2, 0x05, 0xe4, 0xf5, 0x18, 0x74, 0x40, 0x25, 0x18, 0xf5,
30122 +  0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a}},
30123 + {0x0186, 64, { 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5,
30124 +  0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24,
30125 +  0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xb1, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x11, 0xb1, 0x43, 0x46,
30126 +  0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90}},
30127 + {0x01c6, 64, { 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x10, 0x35, 0x90, 0x7e, 0x02, 0xe0,
30128 +  0xff, 0x12, 0x10, 0x5b, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12, 0x11, 0xb1, 0x7f, 0x03,
30129 +  0x7d, 0x07, 0x12, 0x11, 0xb1, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0,
30130 +  0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90}},
30131 + {0x0206, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90,
30132 +  0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f,
30133 +  0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e,
30134 +  0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x42, 0x80, 0x80, 0x03, 0x53, 0x42}},
30135 + {0x0246, 64, { 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12,
30136 +  0x10, 0xa7, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xcd, 0xaf, 0x42, 0x12, 0x10, 0x81, 0x90,
30137 +  0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42, 0x12, 0x10, 0x81, 0x90, 0x7e, 0x0c,
30138 +  0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd}},
30139 + {0x0286, 64, { 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60,
30140 +  0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03, 0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98,
30141 +  0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3,
30142 +  0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10}},
30143 + {0x02c6, 64, { 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0,
30144 +  0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5,
30145 +  0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x12, 0x12, 0xdf,
30146 +  0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e, 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12}},
30147 + {0x0306, 64, { 0x11, 0xb1, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e,
30148 +  0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xb1, 0x75, 0x29, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18,
30149 +  0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x04, 0x90, 0xc0, 0x00,
30150 +  0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11, 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98}},
30151 + {0x0346, 64, { 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f,
30152 +  0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xb1, 0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90,
30153 +  0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xb1, 0xe4,
30154 +  0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12}},
30155 + {0x0386, 64, { 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b,
30156 +  0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4, 0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e,
30157 +  0x1f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0,
30158 +  0x74, 0x35, 0xf0, 0xd2, 0x03, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30, 0x1a, 0x52, 0xe5, 0x38}},
30159 + {0x03c6, 64, { 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80,
30160 +  0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x12, 0xdf, 0xef, 0x54, 0x01, 0xf5,
30161 +  0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13, 0x33, 0xef, 0x54, 0x80,
30162 +  0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07, 0x30, 0x0d, 0x11, 0x12}},
30163 + {0x0406, 64, { 0x13, 0x33, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19, 0x25, 0xd2, 0x07, 0x20,
30164 +  0x1b, 0x03, 0x02, 0x07, 0xec, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x6f, 0xef, 0xc3, 0x95, 0x3d, 0x40,
30165 +  0x03, 0x02, 0x04, 0xae, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a, 0xc2, 0x00, 0x80, 0x77,
30166 +  0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x6f, 0xef, 0xc3}},
30167 + {0x0446, 64, { 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcb, 0xe0, 0x14, 0xf5,
30168 +  0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41, 0x75, 0x0c, 0x7d, 0x75,
30169 +  0x0d, 0x41, 0x12, 0x0d, 0x04, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0x80, 0x39, 0x90, 0x7f,
30170 +  0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x6f, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90}},
30171 + {0x0486, 64, { 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60,
30172 +  0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d, 0xc1, 0x12, 0x0d, 0x04,
30173 +  0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x05,
30174 +  0x36, 0x12, 0x12, 0x20, 0x8f, 0x19, 0x12, 0x13, 0x7b, 0x8f, 0x37, 0xe5, 0x19, 0xc3, 0x95}},
30175 + {0x04c6, 64, { 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x57, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c,
30176 +  0x5e, 0xc2, 0x0c, 0xe5, 0x19, 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x37, 0x02, 0xe5, 0x37, 0x30,
30177 +  0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e,
30178 +  0x7d, 0x7f, 0x80, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0x84, 0xe5}},
30179 + {0x0506, 64, { 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb, 0xf0, 0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75,
30180 +  0x19, 0x3f, 0x85, 0x19, 0x08, 0x90, 0x7d, 0x80, 0xe5, 0x37, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75,
30181 +  0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12, 0x0d, 0x29, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90,
30182 +  0x7f, 0xd0, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x97, 0xc2, 0x06, 0xe4}},
30183 + {0x0546, 64, { 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18,
30184 +  0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
30185 +  0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68,
30186 +  0x90, 0x7e, 0x23, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xfb, 0x7f, 0x03}},
30187 + {0x0586, 64, { 0x7d, 0xcd, 0x12, 0x11, 0xfb, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00,
30188 +  0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12,
30189 +  0x11, 0x19, 0x90, 0x7e, 0x22, 0xe0, 0xff, 0x12, 0x11, 0x3f, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0,
30190 +  0xfd, 0x12, 0x11, 0xfb, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xfb, 0x43, 0x47, 0x80, 0x90}},
30191 + {0x05c6, 64, { 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
30192 +  0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e,
30193 +  0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0,
30194 +  0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90}},
30195 + {0x0606, 64, { 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e, 0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43,
30196 +  0x80, 0x80, 0x03, 0x53, 0x43, 0x7f, 0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43,
30197 +  0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x11, 0x65, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0x8b,
30198 +  0xaf, 0x43, 0x12, 0x10, 0xf3, 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf}},
30199 + {0x0646, 64, { 0x43, 0x12, 0x10, 0xf3, 0x90, 0x7e, 0x2c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02,
30200 +  0x80, 0x03, 0x53, 0x47, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47,
30201 +  0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03,
30202 +  0x53, 0x47, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0}},
30203 + {0x0686, 64, { 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3, 0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0,
30204 +  0x60, 0x05, 0x43, 0x47, 0x10, 0x80, 0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0,
30205 +  0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90,
30206 +  0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f}},
30207 + {0x06c6, 64, { 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x4b, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd,
30208 +  0xe4, 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e,
30209 +  0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb, 0x75, 0x32,
30210 +  0x01, 0xd2, 0x08, 0x90, 0x7e, 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0}},
30211 + {0x0706, 64, { 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43,
30212 +  0x45, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
30213 +  0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f, 0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb,
30214 +  0x75, 0x34, 0x01, 0xd2, 0x08, 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4}},
30215 + {0x0746, 64, { 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb, 0xe4, 0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e,
30216 +  0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
30217 +  0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c, 0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4,
30218 +  0xf5, 0x39, 0xd2, 0x08, 0x90, 0x7e, 0x3f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x13}},
30219 + {0x0786, 64, { 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0, 0x74, 0x36, 0xf0, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xd1, 0xf0,
30220 +  0x30, 0x1a, 0x52, 0xe5, 0x39, 0x60, 0x02, 0x15, 0x39, 0x30, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94,
30221 +  0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12,
30222 +  0x13, 0x4b, 0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2}},
30223 + {0x07c6, 64, { 0x08, 0x12, 0x13, 0x87, 0xef, 0x54, 0x80, 0xf5, 0x19, 0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2,
30224 +  0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x87, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05,
30225 +  0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90,
30226 +  0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5, 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90}},
30227 + {0x0806, 64, { 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f,
30228 +  0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x09, 0x20, 0xe5, 0x0a, 0x70, 0x40,
30229 +  0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2, 0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74,
30230 +  0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25}},
30231 + {0x0846, 64, { 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb,
30232 +  0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38, 0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22,
30233 +  0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08, 0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5,
30234 +  0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12}},
30235 + {0x0886, 64, { 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05,
30236 +  0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4,
30237 +  0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a, 0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2,
30238 +  0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
30239 + {0x08c6, 64, { 0xfa, 0x12, 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
30240 +  0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a,
30241 +  0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15, 0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74,
30242 +  0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25}},
30243 + {0x0906, 64, { 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb,
30244 +  0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0e,
30245 +  0xe4, 0x0a, 0x08, 0x00, 0x0a, 0x7c, 0x01, 0x0a, 0xe8, 0x03, 0x09, 0x44, 0x06, 0x09, 0xfb, 0x08,
30246 +  0x09, 0xf5, 0x09, 0x09, 0xdd, 0x0a, 0x09, 0xec, 0x0b, 0x00, 0x00, 0x0b, 0x37, 0x90, 0x7f}},
30247 + {0x0946, 64, { 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61, 0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xd3, 0x74,
30248 +  0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f,
30249 +  0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19,
30250 +  0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19}},
30251 + {0x0986, 64, { 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f,
30252 +  0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0,
30253 +  0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f,
30254 +  0x0a, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0}},
30255 + {0x09c6, 64, { 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0,
30256 +  0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
30257 +  0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x3e, 0x12, 0x0b,
30258 +  0x46, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02}},
30259 + {0x0a06, 64, { 0x0b, 0x3e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b,
30260 +  0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00,
30261 +  0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0xe4, 0x90, 0x7f,
30262 +  0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f}},
30263 + {0x0a46, 64, { 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24,
30264 +  0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4,
30265 +  0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
30266 +  0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02}},
30267 + {0x0a86, 64, { 0x60, 0x03, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x3e,
30268 +  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38,
30269 +  0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f,
30270 +  0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f}},
30271 + {0x0ac6, 64, { 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f,
30272 +  0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
30273 +  0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea,
30274 +  0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0}},
30275 + {0x0b06, 64, { 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4,
30276 +  0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f,
30277 +  0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07,
30278 +  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22}},
30279 + {0x0b46, 64, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90,
30280 +  0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18,
30281 +  0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5,
30282 +  0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa}},
30283 + {0x0b86, 64, { 0xe4, 0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38,
30284 +  0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b, 0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13,
30285 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f,
30286 +  0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xb1, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0x81, 0x90, 0x7f}},
30287 + {0x0bc6, 64, { 0x98, 0x74, 0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f,
30288 +  0x98, 0x74, 0x14, 0xf0, 0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd,
30289 +  0x12, 0x11, 0xb1, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xb1, 0x90, 0x7f,
30290 +  0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11}},
30291 + {0x0c06, 64, { 0xb1, 0x7f, 0x01, 0x12, 0x12, 0x6a, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xb1, 0x20, 0x1b, 0x03, 0x02,
30292 +  0x0c, 0xb7, 0x75, 0x2d, 0x01, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4,
30293 +  0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b,
30294 +  0x01, 0xe4, 0xf5, 0x39, 0xf5, 0x13, 0xf5, 0x37, 0xc2, 0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2}},
30295 + {0x0c46, 64, { 0x00, 0xc2, 0x0a, 0xc2, 0x13, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00,
30296 +  0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xfb, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x10,
30297 +  0xf3, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x7f, 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90, 0xc0,
30298 +  0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74}},
30299 + {0x0c86, 64, { 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x11, 0xfb, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12,
30300 +  0x11, 0xfb, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d,
30301 +  0x7f, 0x12, 0x11, 0xfb, 0x7f, 0x01, 0x12, 0x12, 0x8b, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xfb,
30302 +  0xd2, 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82}},
30303 + {0x0cc6, 64, { 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86,
30304    0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08,
30305 -  0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00}},
30306 - {0x0d06, 64, { 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98,
30307 -  0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05,
30308 +  0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0,
30309 +  0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f}},
30310 + {0x0d06, 64, { 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05,
30311    0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2,
30312 -  0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5}},
30313 - {0x0d46, 64, { 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86,
30314 -  0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05,
30315 +  0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c,
30316 +  0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05}},
30317 + {0x0d46, 64, { 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05,
30318    0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43,
30319 -  0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0, 0x44}},
30320 - {0x0d86, 64, { 0x02, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0, 0xd2,
30321 -  0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f,
30322 +  0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02,
30323 +  0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0}},
30324 + {0x0d86, 64, { 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f,
30325    0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90,
30326 -  0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf}},
30327 - {0x0dc6, 64, { 0xd2, 0x1a, 0x12, 0x12, 0x5c, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2, 0x12, 0x90,
30328 -  0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12, 0x05, 0xd2,
30329 +  0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2,
30330 +  0x1a, 0x12, 0x12, 0x45, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2, 0x12}},
30331 + {0x0dc6, 64, { 0x90, 0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12, 0x05, 0xd2,
30332    0x1a, 0x12, 0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30, 0x12, 0x05, 0xc2,
30333 -  0x1a, 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x29, 0x80, 0xd6, 0x30}},
30334 - {0x0e06, 64, { 0x18, 0xd3, 0xc2, 0x18, 0x12, 0x12, 0xf6, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75,
30335 -  0x81, 0x47, 0x02, 0x0e, 0x57, 0x02, 0x0d, 0x7f, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40,
30336 +  0x1a, 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x21, 0x80, 0xd6, 0x30, 0x18,
30337 +  0xd3, 0xc2, 0x18, 0x12, 0x13, 0x93, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd}},
30338 + {0x0e06, 64, { 0x75, 0x81, 0x47, 0x02, 0x0e, 0x47, 0x02, 0x0d, 0x6f, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40,
30339    0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07,
30340 -  0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4}},
30341 - {0x0e46, 64, { 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
30342 -  0x90, 0x12, 0xc3, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09,
30343 +  0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56,
30344 +  0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40}},
30345 + {0x0e46, 64, { 0x80, 0x90, 0x12, 0xac, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09,
30346    0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8,
30347 -  0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5}},
30348 - {0x0e86, 64, { 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf,
30349 -  0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02,
30350 +  0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82,
30351 +  0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca}},
30352 + {0x0e86, 64, { 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02,
30353    0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01,
30354 -  0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06}},
30355 - {0x0ec6, 64, { 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82,
30356 -  0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82,
30357 +  0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9,
30358 +  0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5}},
30359 + {0x0ec6, 64, { 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82,
30360    0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0,
30361 -  0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8}},
30362 - {0x0f06, 64, { 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3,
30363 -  0xa3, 0x80, 0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19, 0x75, 0x1c,
30364 -  0x86, 0xab, 0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xb5, 0xb4, 0x03, 0x1d,
30365 -  0xaf, 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0x9c, 0x7e, 0x00, 0x29}},
30366 - {0x0f46, 64, { 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b, 0x00, 0x7a,
30367 -  0x00, 0x79, 0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c,
30368 +  0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74,
30369 +  0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3}},
30370 + {0x0f06, 64, { 0xa3, 0xa3, 0x80, 0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19, 0x75, 0x1c,
30371 +  0x86, 0xab, 0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xa5, 0xb4, 0x03, 0x1d,
30372 +  0xaf, 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0x8c, 0x7e, 0x00, 0x29, 0xff,
30373 +  0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b, 0x00}},
30374 + {0x0f46, 64, { 0x7a, 0x00, 0x79, 0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c,
30375    0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d, 0xe5, 0x0d, 0xac,
30376 -  0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5}},
30377 - {0x0f86, 64, { 0x08, 0x60, 0x0a, 0x12, 0x13, 0x3f, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f, 0x1a, 0x05,
30378 -  0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a,
30379 -  0xf0, 0x12, 0x13, 0x57, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5,
30380 -  0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x93, 0x8f}},
30381 - {0x0fc6, 64, { 0x1a, 0xef, 0x42, 0x37, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84,
30382 -  0xc0, 0x86, 0x75, 0x86, 0x00, 0x30, 0x15, 0x04, 0xc2, 0x15, 0x80, 0x02, 0xd2, 0x18, 0x53, 0x91,
30383 -  0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0,
30384 -  0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0}},
30385 - {0x1006, 64, { 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04,
30386 -  0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0,
30387 -  0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x11, 0x53,
30388 -  0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0}},
30389 - {0x1046, 64, { 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
30390 -  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
30391 -  0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13,
30392 -  0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0}},
30393 - {0x1086, 64, { 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
30394 -  0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98,
30395 -  0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44,
30396 -  0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0}},
30397 - {0x10c6, 64, { 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
30398 -  0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98,
30399 -  0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90,
30400 -  0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90}},
30401 - {0x1106, 64, { 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90,
30402 -  0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0,
30403 -  0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90,
30404 -  0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef}},
30405 - {0x1146, 64, { 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90,
30406 -  0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09,
30407 -  0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f,
30408 -  0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74}},
30409 - {0x1186, 64, { 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
30410 -  0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b,
30411 -  0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00,
30412 -  0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00}},
30413 - {0x11c6, 64, { 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90,
30414 -  0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0,
30415 -  0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x27, 0x8f, 0x1a, 0x12, 0x13, 0x27, 0x8f, 0x1b,
30416 -  0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x27, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b}},
30417 - {0x1206, 64, { 0x60, 0x07, 0x12, 0x13, 0x27, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b,
30418 -  0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90,
30419 -  0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22,
30420 -  0x12, 0x13, 0x7b, 0x8f, 0x1a, 0x12, 0x13, 0x7b, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60}},
30421 - {0x1246, 64, { 0x12, 0x12, 0x13, 0x7b, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x7b, 0x8f, 0x1b,
30422 -  0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0,
30423 -  0x30, 0x1a, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x12, 0xdf, 0x90, 0x7f,
30424 -  0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5}},
30425 - {0x1286, 64, { 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xc8, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee,
30426 -  0xf0, 0xe4, 0xe5, 0x3e, 0x44, 0x80, 0xfd, 0x12, 0x11, 0xc8, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5,
30427 -  0x3f, 0x54, 0x7f, 0xfd, 0x12, 0x12, 0x12, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00,
30428 -  0xee, 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80, 0xfd, 0x12, 0x12, 0x12, 0x22, 0x05, 0x0e, 0x02}},
30429 - {0x12c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x03, 0x14, 0x03, 0x00, 0x00, 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10,
30430 -  0xc1, 0x16, 0x01, 0x0a, 0x00, 0xc1, 0x1b, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19,
30431 -  0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e, 0x60, 0x05, 0x12, 0x0d, 0x5e, 0x80, 0xee, 0x22, 0x12,
30432 -  0x00, 0x03, 0x12, 0x0d, 0x6f, 0x12, 0x0b, 0x4e, 0x22, 0x02, 0x10, 0x25, 0x00, 0x02, 0x13}},
30433 - {0x1306, 64, { 0x04, 0x00, 0x02, 0x0f, 0xfb, 0x00, 0x02, 0x0f, 0xcd, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0,
30434 +  0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08,
30435 +  0x60, 0x0a, 0x12, 0x13, 0x27, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f, 0x1a}},
30436 + {0x0f86, 64, { 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a,
30437 +  0xf0, 0x12, 0x13, 0x3f, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5,
30438 +  0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x7b, 0x8f, 0x1a,
30439 +  0xef, 0x42, 0x37, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0}},
30440 + {0x0fc6, 64, { 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab,
30441 +  0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32,
30442 +  0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2,
30443 +  0x11, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0}},
30444 + {0x1006, 64, { 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0,
30445 +  0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08,
30446 +  0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f,
30447 +  0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10}},
30448 + {0x1046, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90,
30449 +  0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
30450 +  0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13,
30451 +  0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13}},
30452 + {0x1086, 64, { 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef,
30453 +  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22,
30454 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74,
30455 +  0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44}},
30456 + {0x10c6, 64, { 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74,
30457 +  0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
30458 +  0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74,
30459 +  0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90}},
30460 + {0x1106, 64, { 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00,
30461 +  0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f,
30462 +  0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5,
30463 +  0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90}},
30464 + {0x1146, 64, { 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90,
30465 +  0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f,
30466 +  0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0,
30467 +  0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f}},
30468 + {0x1186, 64, { 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
30469 +  0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b,
30470 +  0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
30471 +  0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90}},
30472 + {0x11c6, 64, { 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12,
30473 +  0x13, 0x0f, 0x8f, 0x1a, 0x12, 0x13, 0x0f, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12,
30474 +  0x13, 0x0f, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x0f, 0x8f, 0x1b, 0x80,
30475 +  0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90}},
30476 + {0x1206, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
30477 +  0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x63, 0x8f, 0x1a, 0x12, 0x13,
30478 +  0x63, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x63, 0x8f, 0x1a, 0xe5, 0x1a,
30479 +  0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x63, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90}},
30480 + {0x1246, 64, { 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x1a, 0x04, 0xe0, 0x44, 0x02, 0xf0,
30481 +  0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x12, 0xc8, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44,
30482 +  0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xb1, 0x90,
30483 +  0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3e, 0x44, 0x80}},
30484 + {0x1286, 64, { 0xfd, 0x12, 0x11, 0xb1, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3f, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xfb,
30485 +  0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80,
30486 +  0xfd, 0x12, 0x11, 0xfb, 0x22, 0x05, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x14, 0x03, 0x00,
30487 +  0x00, 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10, 0xc1, 0x16, 0x01, 0x0a, 0x00, 0xc1}},
30488 + {0x12c6, 64, { 0x1b, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e,
30489 +  0x60, 0x05, 0x12, 0x0d, 0x4e, 0x80, 0xee, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0,
30490    0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
30491 -  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
30492 -  0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90}},
30493 - {0x1346, 64, { 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
30494 -  0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
30495 -  0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0,
30496 -  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff}},
30497 - {0x1386, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
30498 -  0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0,
30499 -  0x00, 0xe0, 0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30500 +  0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0f, 0xe7, 0x00, 0x02, 0x13}},
30501 + {0x1306, 64, { 0x04, 0x00, 0x02, 0x0f, 0xbd, 0x00, 0x02, 0x10, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0,
30502 +  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
30503 +  0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
30504 +  0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90}},
30505 + {0x1346, 64, { 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
30506 +  0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
30507 +  0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0,
30508 +  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff}},
30509 + {0x1386, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x12, 0x00, 0x03, 0x12,
30510 +  0x0d, 0x5f, 0x12, 0x0b, 0x46, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30511 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30512    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
30513   {0x13c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30514    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30515 @@ -420,13 +424,13 @@
30516   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30517    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30518    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30519 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
30520 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
30521   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x12, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
30522    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
30523    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
30524    0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x05, 0x02, 0x40, 0x00}},
30525   {0x1946, 64, { 0x00, 0x07, 0x05, 0x06, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05,
30526 -  0x81, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x83, 0x02,
30527 +  0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x83, 0x02,
30528    0x40, 0x00, 0x01, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
30529    0x01, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x01}},
30530   {0x1986, 64, { 0x04, 0x03, 0x09, 0x04, 0x48, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61,
30531 @@ -439,5 +443,5 @@
30532    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
30533   {0x1a06, 20, { 0x72, 0x00, 0x10, 0x03, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30,
30534    0x00, 0x00, 0x00}},
30535 - { 0xffff,     0,      {0x00} }
30536 + {0xffff,      0,      {0x00} }
30537  };
30538 diff -Nur linux-2.4.19.org/drivers/usb/serial/keyspan_usa19_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa19_fw.h
30539 --- linux-2.4.19.org/drivers/usb/serial/keyspan_usa19_fw.h      Wed Oct 10 00:15:02 2001
30540 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa19_fw.h  Thu Oct 31 08:11:24 2002
30541 @@ -1,28 +1,33 @@
30542  /* keyspan_usa19_fw.h
30543 -  
30544 -   Generated from Keyspan firmware image usa19code.h Sat Oct  6 12:14:44 EST 2001
30545 -   This firmware is for the Keyspan USA-19 Serial Adaptor
30546
30547 +       The firmware contained herein as keyspan_usa19_fw.h is
30548  
30549 -   "The firmware contained herein as keyspan_usa19_fw.h is
30550 -   Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
30551 -   ("Keyspan"), as an unpublished work.  This notice does not imply
30552 -   unrestricted or public access to this firmware which is a trade secret of
30553 -   Keyspan, and which may not be reproduced, used, sold or transferred to any
30554 -   third party without Keyspan's prior written consent.  All Rights Reserved.
30555 +               Copyright (C) 1999-2001
30556 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
30557 +               
30558 +       as an unpublished work. This notice does not imply unrestricted or
30559 +       public access to the source code from which this firmware image is
30560 +       derived.  Except as noted below this firmware image may not be 
30561 +       reproduced, used, sold or transferred to any third party without 
30562 +       Keyspan's prior written consent.  All Rights Reserved.
30563  
30564 -   This firmware may not be modified and may only be used with the Keyspan 
30565 -   USA-19 Serial Adapter.  Distribution and/or Modification of the
30566 -   keyspan.c driver which includes this firmware, in whole or in part,
30567 -   requires the inclusion of this statement."
30568 +       Permission is hereby granted for the distribution of this firmware 
30569 +       image as part of a Linux or other Open Source operating system kernel 
30570 +       in text or binary form as required. 
30571  
30572 +       This firmware may not be modified and may only be used with  
30573 +       Keyspan hardware.  Distribution and/or Modification of the 
30574 +       keyspan.c driver which includes this firmware, in whole or in 
30575 +       part, requires the inclusion of this statement."
30576  */
30577  
30578 +
30579  static const struct ezusb_hex_record keyspan_usa19_firmware[] = {
30580 - {0x0026, 10, { 0x12, 0x0d, 0xbb, 0x12, 0x0e, 0xee, 0x12, 0x0d, 0x67, 0x22}},
30581 + {0x0026, 10, { 0x12, 0x0d, 0xbf, 0x12, 0x0f, 0x47, 0x12, 0x0d, 0x6b, 0x22}},
30582   {0x0033,  3, { 0x02, 0x00, 0x1a}},
30583   {0x001a,  4, { 0x53, 0xd8, 0xef, 0x32}},
30584   {0x0003, 16, { 0x8e, 0x13, 0x8f, 0x14, 0xe5, 0x14, 0x15, 0x14, 0xae, 0x13, 0x70, 0x02, 0x15, 0x13, 0x4e, 0x60}},
30585 - {0x0013,  7, { 0x05, 0x12, 0x0e, 0xdd, 0x80, 0xee, 0x22}},
30586 + {0x0013,  7, { 0x05, 0x12, 0x0f, 0x36, 0x80, 0xee, 0x22}},
30587   {0x0023,  3, { 0x02, 0x00, 0x46}},
30588   {0x0046, 16, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0, 0xd0, 0x75, 0xd0, 0x08}},
30589   {0x0056, 16, { 0x30, 0x99, 0x0e, 0x30, 0x08, 0x07, 0xa2, 0x0b, 0x92, 0x9b, 0x85, 0x35, 0x99, 0xc2, 0x99, 0xd2}},
30590 @@ -37,7 +42,7 @@
30591   {0x00e6, 16, { 0xf5, 0x50, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x20, 0x09, 0x2d, 0x20, 0x06, 0x2a, 0x90}},
30592   {0x00f6, 16, { 0x7f, 0x9b, 0xe0, 0x30, 0xe3, 0x03, 0x20, 0x0e, 0x20, 0x30, 0x0d, 0x11, 0x90, 0x7d, 0xc1, 0xe0}},
30593   {0x0043,  3, { 0x02, 0x0f, 0x00}},
30594 - {0x0000,  3, { 0x02, 0x0c, 0x5d}},
30595 + {0x0000,  3, { 0x02, 0x0c, 0x61}},
30596   {0x0106, 64, { 0x13, 0x92, 0x0b, 0xa3, 0xe0, 0xf5, 0x35, 0x75, 0x37, 0x03, 0x02, 0x04, 0x2f, 0x75, 0x37, 0x02, 0x90,
30597    0x7d, 0xc1, 0xe0, 0xf5, 0x35, 0x02, 0x04, 0x2f, 0x75, 0x37, 0x01, 0xc2, 0x08, 0x02, 0x04, 0x2f,
30598    0xe5, 0x37, 0xc3, 0x95, 0x50, 0x50, 0x03, 0x02, 0x01, 0xcf, 0x90, 0x7f, 0xc6, 0xe0, 0x30, 0xe1,
30599 @@ -110,9 +115,9 @@
30600    0x15, 0x36, 0x05, 0x2b, 0x43, 0x33, 0x01, 0x80, 0x0b, 0x90, 0x7f, 0xb9, 0xe5, 0x36, 0xf0, 0x75,
30601    0x36, 0x00, 0xd2, 0x01, 0xd2, 0x12, 0x30, 0x12, 0x05, 0xc2, 0x12, 0x02, 0x00, 0x56, 0xd0, 0xd0,
30602    0xd0, 0x86, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xca, 0xe0, 0x30, 0xe1}},
30603 - {0x0586, 64, { 0x03, 0x02, 0x06, 0xa7, 0xe4, 0xf5, 0x13, 0x74, 0x40, 0x25, 0x13, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5,
30604 + {0x0586, 64, { 0x03, 0x02, 0x06, 0xab, 0xe4, 0xf5, 0x13, 0x74, 0x40, 0x25, 0x13, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5,
30605    0x83, 0xe0, 0xff, 0xe5, 0x13, 0x7c, 0x00, 0x7b, 0x00, 0x24, 0x38, 0xf9, 0xec, 0x34, 0x00, 0xfa,
30606 -  0xef, 0x12, 0x0d, 0x2f, 0x05, 0x13, 0xe5, 0x13, 0xb4, 0x18, 0xdb, 0xe5, 0x38, 0x60, 0x0c, 0x75,
30607 +  0xef, 0x12, 0x0d, 0x33, 0x05, 0x13, 0xe5, 0x13, 0xb4, 0x18, 0xdb, 0xe5, 0x38, 0x60, 0x0c, 0x75,
30608    0xc9, 0x20, 0x75, 0xc8, 0x34, 0x85, 0x39, 0xca, 0x85, 0x3a, 0xcb, 0xe5, 0x3b, 0x13, 0x92}},
30609   {0x05c6, 64, { 0x0d, 0x92, 0x9f, 0xe5, 0x3c, 0x13, 0x92, 0x0e, 0xe5, 0x3d, 0x13, 0x92, 0x11, 0xe5, 0x3e, 0x60, 0x09,
30610    0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfb, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0x98, 0xe0, 0x44, 0x04, 0xf0,
30611 @@ -125,149 +130,149 @@
30612   {0x0646, 64, { 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x4a, 0x60, 0x0a, 0xd2, 0x9c, 0xc2, 0x98, 0x75, 0x2c,
30613    0x01, 0x75, 0x31, 0x1e, 0xe5, 0x4b, 0x60, 0x07, 0xc2, 0x9c, 0xe4, 0xf5, 0x36, 0xf5, 0x2c, 0xe5,
30614    0x4c, 0x60, 0x03, 0xe4, 0xf5, 0x36, 0xe5, 0x4d, 0x60, 0x02, 0xd2, 0x04, 0xe5, 0x4e, 0x60, 0x0a,
30615 -  0xe5, 0x4a, 0x70, 0x02, 0xf5, 0x31, 0xe5, 0x4e, 0x42, 0x33, 0xe5, 0x4f, 0x60, 0x1b, 0x90}},
30616 +  0xe5, 0x4a, 0x70, 0x02, 0xf5, 0x31, 0xe5, 0x4e, 0x42, 0x33, 0xe5, 0x4f, 0x60, 0x1f, 0x90}},
30617   {0x0686, 64, { 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x12, 0xf0, 0x74, 0x32, 0xf0, 0x74, 0x13, 0xf0,
30618 -  0x74, 0x33, 0xf0, 0x74, 0x14, 0xf0, 0x74, 0x34, 0xf0, 0xd2, 0x05, 0xe4, 0x90, 0x7f, 0xcb, 0xf0,
30619 -  0xa2, 0x09, 0xe4, 0x33, 0xff, 0x65, 0x29, 0x60, 0x05, 0x8f, 0x29, 0x43, 0x33, 0x01, 0xa2, 0x06,
30620 -  0xe4, 0x33, 0xff, 0x65, 0x2a, 0x60, 0x05, 0x8f, 0x2a, 0x43, 0x33, 0x01, 0x90, 0x7f, 0x9b}},
30621 - {0x06c6, 64, { 0xe0, 0x54, 0x08, 0xb5, 0x25, 0x0a, 0xe0, 0x54, 0x08, 0x64, 0x08, 0xf5, 0x25, 0x43, 0x33, 0x01, 0x90,
30622 -  0x7f, 0x9b, 0xe0, 0x54, 0x10, 0xb5, 0x26, 0x0a, 0xe0, 0x54, 0x10, 0x64, 0x10, 0xf5, 0x26, 0x43,
30623 -  0x33, 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x40, 0xb5, 0x27, 0x0a, 0xe0, 0x54, 0x40, 0x64, 0x40,
30624 -  0xf5, 0x27, 0x43, 0x33, 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x20, 0xb5, 0x28, 0x0a, 0xe0}},
30625 - {0x0706, 64, { 0x54, 0x20, 0x64, 0x20, 0xf5, 0x28, 0x43, 0x33, 0x01, 0x30, 0x04, 0x35, 0xc2, 0xaf, 0x30, 0x01, 0x18,
30626 -  0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0xe5, 0x36, 0x60, 0x09, 0x90, 0x7f, 0xb7, 0xf0, 0xe4,
30627 -  0xf5, 0x36, 0xc2, 0x01, 0xc2, 0x04, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1, 0x0f, 0xe5,
30628 -  0x36, 0x60, 0x09, 0x90, 0x7f, 0xb9, 0xf0, 0xe4, 0xf5, 0x36, 0xd2, 0x01, 0xc2, 0x04, 0xd2}},
30629 - {0x0746, 64, { 0xaf, 0x20, 0x03, 0x37, 0x30, 0x02, 0x1b, 0x90, 0x7f, 0xc6, 0xe0, 0x20, 0xe1, 0x2d, 0x90, 0x7e, 0x40,
30630 -  0xe0, 0x13, 0x92, 0x0a, 0x75, 0x37, 0x01, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x50, 0xd2, 0x03, 0x80,
30631 -  0x19, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x75,
30632 -  0x37, 0x01, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x50, 0xd2, 0x03, 0x20, 0x10, 0x33, 0x20, 0x00}},
30633 - {0x0786, 64, { 0x06, 0xe5, 0x37, 0x65, 0x50, 0x70, 0x2a, 0x30, 0x03, 0x1a, 0x30, 0x02, 0x09, 0xe4, 0x90, 0x7f, 0xc7,
30634 -  0xf0, 0xc2, 0x02, 0x80, 0x07, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x02, 0xc2, 0x03, 0xe4, 0xf5,
30635 -  0x50, 0xf5, 0x37, 0x30, 0x0a, 0x0a, 0xc2, 0x0a, 0xc2, 0x00, 0x90, 0x7f, 0xbb, 0x74, 0x01, 0xf0,
30636 -  0x30, 0x10, 0x03, 0x02, 0x08, 0xc1, 0x20, 0x03, 0x03, 0x02, 0x08, 0xc1, 0x30, 0x0e, 0x0a}},
30637 - {0x07c6, 64, { 0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe3, 0x03, 0x02, 0x08, 0xc1, 0x30, 0x06, 0x03, 0x02, 0x08, 0xc1, 0x30,
30638 -  0x09, 0x03, 0x02, 0x08, 0xc1, 0x30, 0x02, 0x62, 0x30, 0x0d, 0x12, 0xaf, 0x37, 0x05, 0x37, 0x74,
30639 -  0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x19, 0xaf, 0x37, 0x05,
30640 -  0x37, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x14, 0xe5}},
30641 - {0x0806, 64, { 0x37, 0xc3, 0x95, 0x50, 0x50, 0x2a, 0x30, 0x0d, 0x12, 0xaf, 0x37, 0x05, 0x37, 0x74, 0x40, 0x2f, 0xf5,
30642 -  0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0b, 0xaf, 0x37, 0x05, 0x37, 0x74, 0x40,
30643 -  0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x35, 0xd2, 0x08, 0x80, 0x6b, 0xc2,
30644 -  0x08, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x02, 0x80, 0x60, 0x30, 0x0d, 0x12, 0xaf, 0x37}},
30645 - {0x0846, 64, { 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x19, 0xaf,
30646 -  0x37, 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x14,
30647 -  0xe5, 0x37, 0xc3, 0x95, 0x50, 0x50, 0x2a, 0x30, 0x0d, 0x12, 0xaf, 0x37, 0x05, 0x37, 0x74, 0xc0,
30648 -  0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0b, 0xaf, 0x37, 0x05}},
30649 - {0x0886, 64, { 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x35, 0xd2, 0x08, 0x80,
30650 -  0x09, 0xc2, 0x08, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x02, 0x30, 0x0d, 0x04, 0xa2, 0x19, 0x92,
30651 -  0x9b, 0xd2, 0x10, 0xc2, 0xaf, 0x85, 0x14, 0x99, 0x20, 0x08, 0x0d, 0x30, 0x0a, 0x0a, 0xc2, 0x0a,
30652 -  0xc2, 0x00, 0x90, 0x7f, 0xbb, 0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x90, 0x7f, 0xbc, 0xe0, 0x20}},
30653 - {0x08c6, 64, { 0xe1, 0x51, 0xe5, 0x33, 0x60, 0x4d, 0xe5, 0x31, 0x70, 0x49, 0xe5, 0x33, 0x30, 0xe1, 0x08, 0xe4, 0xf5,
30654 -  0x2f, 0x75, 0x33, 0x01, 0x80, 0x0b, 0xa2, 0x05, 0xe4, 0x33, 0xf5, 0x2f, 0xc2, 0x05, 0xe4, 0xf5,
30655 -  0x33, 0xe4, 0xf5, 0x13, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x13, 0xf9, 0xee, 0x34, 0x00,
30656 -  0xfa, 0x12, 0x0c, 0xe9, 0xff, 0x74, 0x00, 0x25, 0x13, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5}},
30657 - {0x0906, 64, { 0x83, 0xef, 0xf0, 0x05, 0x13, 0xe5, 0x13, 0xb4, 0x0c, 0xdb, 0x90, 0x7f, 0xbd, 0x74, 0x0c, 0xf0, 0x75,
30658 -  0x31, 0x10, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0d, 0x41, 0x09, 0xff, 0x00, 0x0a, 0x73, 0x01,
30659 -  0x0a, 0xdf, 0x03, 0x09, 0x3d, 0x06, 0x09, 0xf0, 0x08, 0x09, 0xe4, 0x09, 0x09, 0xcc, 0x0a, 0x09,
30660 -  0xdb, 0x0b, 0x00, 0x00, 0x0b, 0x2e, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14}},
30661 - {0x0946, 64, { 0x60, 0x57, 0x24, 0x02, 0x70, 0x76, 0x74, 0x0f, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x64, 0x90, 0x7f, 0xd5,
30662 -  0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03,
30663 -  0x75, 0x82, 0xb5, 0x75, 0x83, 0x0f, 0xef, 0xf0, 0x75, 0x82, 0xae, 0x75, 0x83, 0x0f, 0xf0, 0x75,
30664 -  0x82, 0xa7, 0x75, 0x83, 0x0f, 0xf0, 0x75, 0x82, 0xa0, 0x75, 0x83, 0x0f, 0xf0, 0x90, 0x7f}},
30665 - {0x0986, 64, { 0xea, 0xe0, 0x04, 0x75, 0x82, 0x7b, 0x75, 0x83, 0x0f, 0xf0, 0x74, 0x0f, 0x90, 0x7f, 0xd4, 0xf0, 0x74,
30666 -  0x76, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0e, 0x44,
30667 -  0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b,
30668 -  0x35, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xb4, 0xe0}},
30669 - {0x09c6, 64, { 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01,
30670 -  0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x19, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xea,
30671 -  0xe0, 0xf5, 0x18, 0x12, 0x0d, 0x67, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0x00, 0xe5, 0x18, 0xf0, 0x90,
30672 -  0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60}},
30673 - {0x0a06, 64, { 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x13, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2,
30674 -  0x17, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02,
30675 -  0xf0, 0x02, 0x0b, 0x35, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02,
30676 -  0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f}},
30677 - {0x0a46, 64, { 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0,
30678 -  0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02,
30679 -  0x0b, 0x35, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xe8, 0xe0,
30680 -  0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xea, 0xe0}},
30681 - {0x0a86, 64, { 0xb4, 0x01, 0x05, 0xc2, 0x13, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b,
30682 -  0x35, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4,
30683 -  0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f,
30684 -  0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54}},
30685 - {0x0ac6, 64, { 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90,
30686 -  0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18,
30687 -  0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x13, 0x80, 0x3f, 0x90,
30688 -  0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90}},
30689 - {0x0b06, 64, { 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0,
30690 -  0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f,
30691 -  0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f,
30692 -  0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0x20, 0x15, 0x03, 0x02, 0x0b, 0xcf, 0xe5, 0x31, 0x60}},
30693 - {0x0b46, 64, { 0x02, 0x15, 0x31, 0xe5, 0x36, 0x60, 0x4f, 0x65, 0x34, 0x70, 0x45, 0xe5, 0x32, 0xf4, 0x60, 0x02, 0x05,
30694 -  0x32, 0xe5, 0x32, 0xc3, 0x95, 0x41, 0x40, 0x3d, 0xc2, 0xaf, 0x30, 0x01, 0x18, 0x90, 0x7f, 0xb8,
30695 -  0xe0, 0x20, 0xe1, 0x27, 0x90, 0x7f, 0xb7, 0xe5, 0x36, 0xf0, 0xc2, 0x01, 0xe4, 0xf5, 0x36, 0xf5,
30696 -  0x32, 0xf5, 0x34, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1, 0x0f, 0x90, 0x7f, 0xb9}},
30697 - {0x0b86, 64, { 0xe5, 0x36, 0xf0, 0xd2, 0x01, 0xe4, 0xf5, 0x36, 0xf5, 0x32, 0xf5, 0x34, 0xd2, 0xaf, 0x80, 0x06, 0x85,
30698 -  0x36, 0x34, 0xe4, 0xf5, 0x32, 0xe5, 0x2c, 0x60, 0x2f, 0x20, 0x0c, 0x07, 0x90, 0x7f, 0x9b, 0xe0,
30699 -  0x30, 0xe0, 0x0f, 0xe5, 0x2d, 0x60, 0x06, 0xe4, 0xf5, 0x2d, 0x43, 0x33, 0x01, 0xe4, 0xf5, 0x30,
30700 -  0x80, 0x14, 0xe5, 0x30, 0xd3, 0x95, 0x42, 0x50, 0x0d, 0xe5, 0x30, 0xb5, 0x42, 0x06, 0x75}},
30701 - {0x0bc6, 64, { 0x2d, 0x01, 0x43, 0x33, 0x01, 0x05, 0x30, 0xc2, 0x0c, 0x22, 0x75, 0x12, 0x01, 0xc2, 0x14, 0xc2, 0x18,
30702 -  0xc2, 0x13, 0xc2, 0x17, 0xc2, 0x15, 0xc2, 0x12, 0xd2, 0x16, 0xe4, 0xf5, 0x18, 0x90, 0x7f, 0x92,
30703 -  0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x13, 0xe4, 0x33, 0xfe, 0xef,
30704 -  0x4e, 0xf0, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f}},
30705 - {0x0c06, 64, { 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53,
30706 -  0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0,
30707 -  0xd2, 0xaf, 0xd2, 0xbc, 0xd2, 0x19, 0x12, 0x0f, 0x36, 0xc2, 0x14, 0x30, 0x15, 0x03, 0x12, 0x05,
30708 -  0x80, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x11, 0x60, 0x08, 0xe0, 0xf5, 0x11, 0x12, 0x0b, 0x3d}},
30709 - {0x0c46, 64, { 0x80, 0xea, 0x30, 0x14, 0x07, 0xc2, 0x14, 0x12, 0x09, 0x1a, 0x80, 0xe0, 0x30, 0x18, 0xdd, 0xc2, 0x18,
30710 -  0x12, 0x00, 0x26, 0x80, 0xd6, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x50, 0x02,
30711 -  0x0c, 0xa4, 0x02, 0x0b, 0xd0, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80,
30712 -  0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c}},
30713 - {0x0c86, 64, { 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46,
30714 -  0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x0e, 0x00,
30715 -  0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe,
30716 -  0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8}},
30717 - {0x0cc6, 64, { 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5,
30718 -  0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7,
30719 -  0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb,
30720 -  0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c, 0xe5}},
30721 - {0x0d06, 64, { 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25, 0x82, 0xf8,
30722 -  0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 0x29, 0xf5, 0x82,
30723 -  0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xf0,
30724 -  0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8}},
30725 - {0x0d46, 64, { 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5,
30726 -  0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80, 0xdf,
30727 -  0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x96, 0x74, 0x10,
30728 -  0xf0, 0x90, 0x7f, 0x94, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0x9d, 0x04, 0xf0, 0x90, 0x7f, 0x97}},
30729 - {0x0d86, 64, { 0x74, 0x20, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0x03, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x84, 0xf0, 0xe4, 0x90,
30730 -  0x7f, 0x98, 0xf0, 0x90, 0x7f, 0xc7, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x90, 0x7f, 0xcb, 0xf0, 0x75,
30731 -  0x98, 0x40, 0x43, 0xa8, 0x10, 0x90, 0x7f, 0xde, 0x74, 0x1f, 0xf0, 0x90, 0x7f, 0xdf, 0x74, 0x0f,
30732 -  0xf0, 0xd2, 0x15, 0x22, 0xe4, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f}},
30733 - {0x0dc6, 64, { 0x93, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0x7f, 0x97, 0xe0, 0x44, 0x02, 0xf0, 0x90,
30734 -  0x7f, 0x9d, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x20, 0xf0, 0xe4, 0x90, 0x7f, 0x96,
30735 -  0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0xfd, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90, 0x7f, 0x9e,
30736 -  0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22, 0x0c, 0x24, 0x00, 0x00, 0x00, 0x00}},
30737 - {0x0e06, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x30, 0x00, 0x01, 0x33, 0x01, 0x01, 0x32, 0x00,
30738 -  0x01, 0x37, 0x00, 0x01, 0x50, 0x00, 0x01, 0x36, 0x00, 0x01, 0x34, 0x00, 0xc1, 0x05, 0xc1, 0x0c,
30739 -  0xc1, 0x03, 0xc1, 0x0f, 0xc1, 0x04, 0xc1, 0x0e, 0xc1, 0x11, 0xc1, 0x0a, 0xc1, 0x10, 0xc1, 0x08,
30740 -  0xc1, 0x09, 0xc1, 0x06, 0xc1, 0x00, 0xc1, 0x0d, 0xc1, 0x81, 0xc1, 0x82, 0x00, 0x8f, 0x13}},
30741 - {0x0e46, 64, { 0xe4, 0xf5, 0x14, 0x75, 0x15, 0xff, 0x75, 0x16, 0x0f, 0x75, 0x17, 0xb9, 0xab, 0x15, 0xaa, 0x16, 0xa9,
30742 -  0x17, 0x90, 0x00, 0x01, 0x12, 0x0d, 0x02, 0xb4, 0x03, 0x1d, 0xaf, 0x14, 0x05, 0x14, 0xef, 0xb5,
30743 -  0x13, 0x01, 0x22, 0x12, 0x0c, 0xe9, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x15,
30744 -  0xff, 0xf5, 0x16, 0x89, 0x17, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x22, 0xc0}},
30745 - {0x0e86, 64, { 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x30, 0x16, 0x04,
30746 -  0xc2, 0x16, 0x80, 0x02, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0,
30747 +  0x74, 0x33, 0xf0, 0x74, 0x14, 0xf0, 0x74, 0x34, 0xf0, 0xd2, 0x02, 0xd2, 0x01, 0xd2, 0x05, 0xe4,
30748 +  0x90, 0x7f, 0xcb, 0xf0, 0xa2, 0x09, 0xe4, 0x33, 0xff, 0x65, 0x29, 0x60, 0x05, 0x8f, 0x29, 0x43,
30749 +  0x33, 0x01, 0xa2, 0x06, 0xe4, 0x33, 0xff, 0x65, 0x2a, 0x60, 0x05, 0x8f, 0x2a, 0x43, 0x33}},
30750 + {0x06c6, 64, { 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x08, 0xb5, 0x25, 0x0a, 0xe0, 0x54, 0x08, 0x64, 0x08, 0xf5, 0x25,
30751 +  0x43, 0x33, 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x10, 0xb5, 0x26, 0x0a, 0xe0, 0x54, 0x10, 0x64,
30752 +  0x10, 0xf5, 0x26, 0x43, 0x33, 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x40, 0xb5, 0x27, 0x0a, 0xe0,
30753 +  0x54, 0x40, 0x64, 0x40, 0xf5, 0x27, 0x43, 0x33, 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x20}},
30754 + {0x0706, 64, { 0xb5, 0x28, 0x0a, 0xe0, 0x54, 0x20, 0x64, 0x20, 0xf5, 0x28, 0x43, 0x33, 0x01, 0x30, 0x04, 0x35, 0xc2,
30755 +  0xaf, 0x30, 0x01, 0x18, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0xe5, 0x36, 0x60, 0x09, 0x90,
30756 +  0x7f, 0xb7, 0xf0, 0xe4, 0xf5, 0x36, 0xc2, 0x01, 0xc2, 0x04, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0,
30757 +  0x20, 0xe1, 0x0f, 0xe5, 0x36, 0x60, 0x09, 0x90, 0x7f, 0xb9, 0xf0, 0xe4, 0xf5, 0x36, 0xd2}},
30758 + {0x0746, 64, { 0x01, 0xc2, 0x04, 0xd2, 0xaf, 0x20, 0x03, 0x37, 0x30, 0x02, 0x1b, 0x90, 0x7f, 0xc6, 0xe0, 0x20, 0xe1,
30759 +  0x2d, 0x90, 0x7e, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x75, 0x37, 0x01, 0x90, 0x7f, 0xc7, 0xe0, 0xf5,
30760 +  0x50, 0xd2, 0x03, 0x80, 0x19, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7d, 0xc0, 0xe0,
30761 +  0x13, 0x92, 0x0a, 0x75, 0x37, 0x01, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x50, 0xd2, 0x03, 0x20}},
30762 + {0x0786, 64, { 0x10, 0x33, 0x20, 0x00, 0x06, 0xe5, 0x37, 0x65, 0x50, 0x70, 0x2a, 0x30, 0x03, 0x1a, 0x30, 0x02, 0x09,
30763 +  0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x02, 0x80, 0x07, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x02,
30764 +  0xc2, 0x03, 0xe4, 0xf5, 0x50, 0xf5, 0x37, 0x30, 0x0a, 0x0a, 0xc2, 0x0a, 0xc2, 0x00, 0x90, 0x7f,
30765 +  0xbb, 0x74, 0x01, 0xf0, 0x30, 0x10, 0x03, 0x02, 0x08, 0xc5, 0x20, 0x03, 0x03, 0x02, 0x08}},
30766 + {0x07c6, 64, { 0xc5, 0x30, 0x0e, 0x0a, 0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe3, 0x03, 0x02, 0x08, 0xc5, 0x30, 0x06, 0x03,
30767 +  0x02, 0x08, 0xc5, 0x30, 0x09, 0x03, 0x02, 0x08, 0xc5, 0x30, 0x02, 0x62, 0x30, 0x0d, 0x12, 0xaf,
30768 +  0x37, 0x05, 0x37, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92,
30769 +  0x19, 0xaf, 0x37, 0x05, 0x37, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83}},
30770 + {0x0806, 64, { 0xe0, 0xf5, 0x14, 0xe5, 0x37, 0xc3, 0x95, 0x50, 0x50, 0x2a, 0x30, 0x0d, 0x12, 0xaf, 0x37, 0x05, 0x37,
30771 +  0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0b, 0xaf, 0x37,
30772 +  0x05, 0x37, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x35, 0xd2,
30773 +  0x08, 0x80, 0x6b, 0xc2, 0x08, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x02, 0x80, 0x60, 0x30}},
30774 + {0x0846, 64, { 0x0d, 0x12, 0xaf, 0x37, 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0,
30775 +  0x13, 0x92, 0x19, 0xaf, 0x37, 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5,
30776 +  0x83, 0xe0, 0xf5, 0x14, 0xe5, 0x37, 0xc3, 0x95, 0x50, 0x50, 0x2a, 0x30, 0x0d, 0x12, 0xaf, 0x37,
30777 +  0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92}},
30778 + {0x0886, 64, { 0x0b, 0xaf, 0x37, 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5,
30779 +  0x35, 0xd2, 0x08, 0x80, 0x09, 0xc2, 0x08, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x02, 0x30, 0x0d,
30780 +  0x04, 0xa2, 0x19, 0x92, 0x9b, 0xd2, 0x10, 0xc2, 0xaf, 0x85, 0x14, 0x99, 0x20, 0x08, 0x0d, 0x30,
30781 +  0x0a, 0x0a, 0xc2, 0x0a, 0xc2, 0x00, 0x90, 0x7f, 0xbb, 0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x90}},
30782 + {0x08c6, 64, { 0x7f, 0xbc, 0xe0, 0x20, 0xe1, 0x51, 0xe5, 0x33, 0x60, 0x4d, 0xe5, 0x31, 0x70, 0x49, 0xe5, 0x33, 0x30,
30783 +  0xe1, 0x08, 0xe4, 0xf5, 0x2f, 0x75, 0x33, 0x01, 0x80, 0x0b, 0xa2, 0x05, 0xe4, 0x33, 0xf5, 0x2f,
30784 +  0xc2, 0x05, 0xe4, 0xf5, 0x33, 0xe4, 0xf5, 0x13, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x13,
30785 +  0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0c, 0xed, 0xff, 0x74, 0x00, 0x25, 0x13, 0xf5, 0x82}},
30786 + {0x0906, 64, { 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x13, 0xe5, 0x13, 0xb4, 0x0c, 0xdb, 0x90, 0x7f, 0xbd,
30787 +  0x74, 0x0c, 0xf0, 0x75, 0x31, 0x10, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0d, 0x45, 0x0a, 0x03,
30788 +  0x00, 0x0a, 0x77, 0x01, 0x0a, 0xe3, 0x03, 0x09, 0x41, 0x06, 0x09, 0xf4, 0x08, 0x09, 0xe8, 0x09,
30789 +  0x09, 0xd0, 0x0a, 0x09, 0xdf, 0x0b, 0x00, 0x00, 0x0b, 0x32, 0x90, 0x7f, 0xeb, 0xe0, 0x24}},
30790 + {0x0946, 64, { 0xfe, 0x60, 0x16, 0x14, 0x60, 0x57, 0x24, 0x02, 0x70, 0x76, 0x74, 0x0f, 0x90, 0x7f, 0xd4, 0xf0, 0x74,
30791 +  0x64, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02,
30792 +  0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0xb5, 0x75, 0x83, 0x0f, 0xef, 0xf0, 0x75, 0x82, 0xae, 0x75,
30793 +  0x83, 0x0f, 0xf0, 0x75, 0x82, 0xa7, 0x75, 0x83, 0x0f, 0xf0, 0x75, 0x82, 0xa0, 0x75, 0x83}},
30794 + {0x0986, 64, { 0x0f, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75, 0x82, 0x7b, 0x75, 0x83, 0x0f, 0xf0, 0x74, 0x0f, 0x90,
30795 +  0x7f, 0xd4, 0xf0, 0x74, 0x76, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xea, 0xe0,
30796 +  0xff, 0x12, 0x0e, 0x48, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f,
30797 +  0xd5, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x39}},
30798 + {0x09c6, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0x00, 0xe5, 0x19, 0xf0, 0x90,
30799 +  0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x19, 0x02, 0x0b,
30800 +  0x39, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x18, 0x12, 0x0d, 0x6b, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0x00,
30801 +  0xe5, 0x18, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xe8}},
30802 + {0x0a06, 64, { 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x13, 0xe4, 0x33, 0xff,
30803 +  0x25, 0xe0, 0xff, 0xa2, 0x17, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90,
30804 +  0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x39, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90,
30805 +  0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80}},
30806 + {0x0a46, 64, { 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34,
30807 +  0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5,
30808 +  0x74, 0x02, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x39,
30809 +  0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x39}},
30810 + {0x0a86, 64, { 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x13, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
30811 +  0x01, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4,
30812 +  0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5,
30813 +  0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff}},
30814 + {0x0ac6, 64, { 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20,
30815 +  0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0,
30816 +  0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2,
30817 +  0x13, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea}},
30818 + {0x0b06, 64, { 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54,
30819 +  0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0,
30820 +  0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
30821 +  0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0x20, 0x15, 0x03, 0x02, 0x0b}},
30822 + {0x0b46, 64, { 0xd3, 0xe5, 0x31, 0x60, 0x02, 0x15, 0x31, 0xe5, 0x36, 0x60, 0x4f, 0x65, 0x34, 0x70, 0x45, 0xe5, 0x32,
30823 +  0xf4, 0x60, 0x02, 0x05, 0x32, 0xe5, 0x32, 0xc3, 0x95, 0x41, 0x40, 0x3d, 0xc2, 0xaf, 0x30, 0x01,
30824 +  0x18, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0x90, 0x7f, 0xb7, 0xe5, 0x36, 0xf0, 0xc2, 0x01,
30825 +  0xe4, 0xf5, 0x36, 0xf5, 0x32, 0xf5, 0x34, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1}},
30826 + {0x0b86, 64, { 0x0f, 0x90, 0x7f, 0xb9, 0xe5, 0x36, 0xf0, 0xd2, 0x01, 0xe4, 0xf5, 0x36, 0xf5, 0x32, 0xf5, 0x34, 0xd2,
30827 +  0xaf, 0x80, 0x06, 0x85, 0x36, 0x34, 0xe4, 0xf5, 0x32, 0xe5, 0x2c, 0x60, 0x2f, 0x20, 0x0c, 0x07,
30828 +  0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe0, 0x0f, 0xe5, 0x2d, 0x60, 0x06, 0xe4, 0xf5, 0x2d, 0x43, 0x33,
30829 +  0x01, 0xe4, 0xf5, 0x30, 0x80, 0x14, 0xe5, 0x30, 0xd3, 0x95, 0x42, 0x50, 0x0d, 0xe5, 0x30}},
30830 + {0x0bc6, 64, { 0xb5, 0x42, 0x06, 0x75, 0x2d, 0x01, 0x43, 0x33, 0x01, 0x05, 0x30, 0xc2, 0x0c, 0x22, 0x75, 0x12, 0x01,
30831 +  0xc2, 0x14, 0xc2, 0x18, 0xc2, 0x13, 0xc2, 0x17, 0xc2, 0x15, 0xc2, 0x12, 0xd2, 0x16, 0xe4, 0xf5,
30832 +  0x18, 0x90, 0x7f, 0x92, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x13,
30833 +  0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74}},
30834 + {0x0c06, 64, { 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90,
30835 +  0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae,
30836 +  0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0xbc, 0xd2, 0x19, 0x12, 0x0e, 0xda, 0xc2, 0x14, 0x30,
30837 +  0x15, 0x03, 0x12, 0x05, 0x80, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x11, 0x60, 0x08, 0xe0, 0xf5}},
30838 + {0x0c46, 64, { 0x11, 0x12, 0x0b, 0x41, 0x80, 0xea, 0x30, 0x14, 0x07, 0xc2, 0x14, 0x12, 0x09, 0x1e, 0x80, 0xe0, 0x30,
30839 +  0x18, 0xdd, 0xc2, 0x18, 0x12, 0x00, 0x26, 0x80, 0xd6, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd,
30840 +  0x75, 0x81, 0x50, 0x02, 0x0c, 0xa8, 0x02, 0x0b, 0xd4, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3,
30841 +  0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8}},
30842 + {0x0c86, 64, { 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4,
30843 +  0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40,
30844 +  0x80, 0x90, 0x0e, 0x04, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5,
30845 +  0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0}},
30846 + {0x0cc6, 64, { 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5,
30847 +  0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca,
30848 +  0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50,
30849 +  0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22}},
30850 + {0x0d06, 64, { 0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06,
30851 +  0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5,
30852 +  0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89,
30853 +  0x82, 0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0}},
30854 + {0x0d46, 64, { 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8,
30855 +  0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3,
30856 +  0xa3, 0xa3, 0x80, 0xdf, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0x90,
30857 +  0x7f, 0x96, 0x74, 0x10, 0xf0, 0x90, 0x7f, 0x94, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0x9d, 0x04}},
30858 + {0x0d86, 64, { 0xf0, 0x90, 0x7f, 0x97, 0x74, 0x20, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0x03, 0xf0, 0x90, 0x7f, 0x9e, 0x74,
30859 +  0x84, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x90, 0x7f, 0xc7, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x90,
30860 +  0x7f, 0xcb, 0xf0, 0x75, 0x98, 0x40, 0x43, 0xa8, 0x10, 0x90, 0x7f, 0xde, 0x74, 0x1f, 0xf0, 0x90,
30861 +  0x7f, 0xdf, 0x74, 0x0f, 0xf0, 0xd2, 0x15, 0x22, 0xe4, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f}},
30862 + {0x0dc6, 64, { 0x94, 0xf0, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0x7f, 0x97, 0xe0,
30863 +  0x44, 0x02, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x20, 0xf0,
30864 +  0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0xfd, 0xf0, 0xe4, 0x90, 0x7f, 0x97,
30865 +  0xf0, 0x90, 0x7f, 0x9e, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22, 0x0c, 0x24}},
30866 + {0x0e06, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x30, 0x00, 0x01, 0x33,
30867 +  0x01, 0x01, 0x32, 0x00, 0x01, 0x37, 0x00, 0x01, 0x50, 0x00, 0x01, 0x36, 0x00, 0x01, 0x34, 0x00,
30868 +  0xc1, 0x05, 0xc1, 0x0c, 0xc1, 0x03, 0xc1, 0x0f, 0xc1, 0x04, 0xc1, 0x0e, 0xc1, 0x11, 0xc1, 0x0a,
30869 +  0xc1, 0x10, 0xc1, 0x08, 0xc1, 0x09, 0xc1, 0x06, 0xc1, 0x00, 0xc1, 0x0d, 0xc1, 0x81, 0xc1}},
30870 + {0x0e46, 64, { 0x82, 0x00, 0x8f, 0x13, 0xe4, 0xf5, 0x14, 0x75, 0x15, 0xff, 0x75, 0x16, 0x0f, 0x75, 0x17, 0xb9, 0xab,
30871 +  0x15, 0xaa, 0x16, 0xa9, 0x17, 0x90, 0x00, 0x01, 0x12, 0x0d, 0x06, 0xb4, 0x03, 0x1d, 0xaf, 0x14,
30872 +  0x05, 0x14, 0xef, 0xb5, 0x13, 0x01, 0x22, 0x12, 0x0c, 0xed, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a,
30873 +  0xa9, 0x07, 0x75, 0x15, 0xff, 0xf5, 0x16, 0x89, 0x17, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00}},
30874 + {0x0e86, 64, { 0x79, 0x00, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86,
30875 +  0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0,
30876    0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83,
30877 -  0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4}},
30878 - {0x0ec6, 64, { 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0,
30879 -  0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3,
30880 -  0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87,
30881 -  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x02, 0x0f, 0x0f, 0x00, 0x02, 0x0f}},
30882 - {0x0f06, 64, { 0x04, 0x00, 0x02, 0x0e, 0xb3, 0x00, 0x02, 0x0e, 0x85, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85,
30883 -  0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x14, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74,
30884 -  0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90,
30885 -  0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x19, 0x04, 0xe0, 0x44}},
30886 - {0x0f46, 64, { 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x00, 0x03, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0,
30887 -  0x44, 0x04, 0xf0, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00,
30888 +  0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x14, 0x53, 0x91}},
30889 + {0x0ec6, 64, { 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83,
30890 +  0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x19,
30891 +  0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x00, 0x03, 0x90, 0x7f, 0xd6, 0xe0,
30892 +  0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0, 0x22, 0x00, 0x02, 0x0e, 0xb3, 0x00, 0x02, 0x0f}},
30893 + {0x0f06, 64, { 0x04, 0x00, 0x02, 0x0e, 0x89, 0x00, 0x02, 0x0f, 0x0f, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85,
30894 +  0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74,
30895 +  0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x74,
30896 +  0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9}},
30897 + {0x0f46, 64, { 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22,
30898 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10,
30899    0x01, 0xff, 0x00, 0x00, 0x40, 0xcd, 0x06, 0x07, 0x01, 0x01, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09,
30900    0x02, 0x43, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00, 0x00, 0x07, 0xff, 0x00}},
30901   {0x0f86, 64, { 0x00, 0x00, 0x07, 0x05, 0x01, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07,
30902 @@ -276,5 +281,5 @@
30903    0x00, 0x01, 0x04, 0x03, 0x09, 0x04, 0x10, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73}},
30904   {0x0fc6, 23, { 0x00, 0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x0e, 0x03, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00,
30905    0x61, 0x00, 0x6c, 0x00, 0x00, 0x00}},
30906 -{ 0xffff,      0,      {0x00} }
30907 + {0xffff,      0,      {0x00} }
30908  };
30909 diff -Nur linux-2.4.19.org/drivers/usb/serial/keyspan_usa19qi_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa19qi_fw.h
30910 --- linux-2.4.19.org/drivers/usb/serial/keyspan_usa19qi_fw.h    Thu Jan  1 01:00:00 1970
30911 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa19qi_fw.h        Thu Oct 31 08:11:24 2002
30912 @@ -0,0 +1,284 @@
30913 +/* keyspan_usa19qi_fw.h
30914
30915 +       The firmware contained herein as keyspn_usa19qi_fw.h is
30916 +
30917 +               Copyright (C) 1999-2001
30918 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
30919 +               
30920 +       as an unpublished work. This notice does not imply unrestricted or
30921 +       public access to the source code from which this firmware image is
30922 +       derived.  Except as noted below this firmware image may not be 
30923 +       reproduced, used, sold or transferred to any third party without 
30924 +       Keyspan's prior written consent.  All Rights Reserved.
30925 +
30926 +       Permission is hereby granted for the distribution of this firmware 
30927 +       image as part of a Linux or other Open Source operating system kernel 
30928 +       in text or binary form as required. 
30929 +
30930 +       This firmware may not be modified and may only be used with  
30931 +       Keyspan hardware.  Distribution and/or Modification of the 
30932 +       keyspan.c driver which includes this firmware, in whole or in 
30933 +       part, requires the inclusion of this statement."
30934 +
30935 +*/
30936 +
30937 +static const struct ezusb_hex_record keyspan_usa19qi_firmware[] = {
30938 + {0x0033,  3, { 0x02, 0x00, 0x1a}},
30939 + {0x001a,  4, { 0x53, 0xd8, 0xef, 0x32}},
30940 + {0x0003, 16, { 0x8e, 0x11, 0x8f, 0x12, 0xe5, 0x12, 0x15, 0x12, 0xae, 0x11, 0x70, 0x02, 0x15, 0x11, 0x4e, 0x60}},
30941 + {0x0013,  7, { 0x05, 0x12, 0x0f, 0x84, 0x80, 0xee, 0x22}},
30942 + {0x0023,  3, { 0x02, 0x00, 0x46}},
30943 + {0x0046, 16, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0, 0xd0, 0x75, 0xd0, 0x08}},
30944 + {0x0056, 16, { 0x30, 0x99, 0x0e, 0x30, 0x0b, 0x07, 0xa2, 0x0e, 0x92, 0x9b, 0x85, 0x36, 0x99, 0xc2, 0x99, 0xd2}},
30945 + {0x0066, 16, { 0x12, 0x20, 0x12, 0x03, 0x02, 0x04, 0x1e, 0xc2, 0x12, 0x20, 0x03, 0x03, 0x02, 0x02, 0x4e, 0x20}},
30946 + {0x0076, 16, { 0x0b, 0x03, 0x02, 0x01, 0x26, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x50, 0x3c, 0x20, 0x0c, 0x34, 0x20}},
30947 + {0x0086, 16, { 0x09, 0x31, 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x70, 0x29, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05}},
30948 + {0x0096, 16, { 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf}},
30949 + {0x00a6, 16, { 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x36}},
30950 + {0x00b6, 16, { 0x02, 0x04, 0x1c, 0xc2, 0x0b, 0x02, 0x04, 0x1c, 0x90, 0x7f, 0xc7, 0xe4, 0xf0, 0xc2, 0x03, 0x30}},
30951 + {0x00c6, 16, { 0x0d, 0x0c, 0xc2, 0x0d, 0x90, 0x7f, 0xbb, 0x04, 0xf0, 0xc2, 0x0b, 0x02, 0x04, 0x1c, 0x90, 0x7f}},
30952 + {0x00d6, 16, { 0xc8, 0xe0, 0x30, 0xe1, 0x05, 0xc2, 0x0b, 0x02, 0x04, 0x1c, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x53}},
30953 + {0x00e6, 16, { 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0d, 0x75, 0x16, 0xff, 0x20, 0x0c, 0x2b, 0x20, 0x09, 0x28}},
30954 + {0x00f6, 16, { 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x70, 0x20, 0x30, 0x10, 0x11, 0x90, 0x7d, 0xc1, 0xe0, 0x13}},
30955 + {0x0043,  3, { 0x02, 0x0e, 0x00}},
30956 + {0x0000,  3, { 0x02, 0x00, 0x26}},
30957 + {0x0026, 12, { 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x54, 0x02, 0x0b, 0x28}},
30958 + {0x0106, 64, { 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x36, 0x75, 0x3a, 0x03, 0x02, 0x04, 0x1c, 0x75, 0x3a, 0x02, 0x90, 0x7d,
30959 +  0xc1, 0xe0, 0xf5, 0x36, 0x02, 0x04, 0x1c, 0x75, 0x3a, 0x01, 0xc2, 0x0b, 0x02, 0x04, 0x1c, 0xe5,
30960 +  0x3a, 0xc3, 0x95, 0x53, 0x50, 0x03, 0x02, 0x01, 0xc9, 0x90, 0x7f, 0xc6, 0xe0, 0x30, 0xe1, 0x07,
30961 +  0xc2, 0x14, 0xc2, 0x05, 0x02, 0x04, 0x1c, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x53, 0x90, 0x7e}},
30962 + {0x0146, 64, { 0x40, 0xe0, 0x13, 0x92, 0x0d, 0x75, 0x16, 0xff, 0x20, 0x0c, 0x70, 0x20, 0x09, 0x6d, 0x90, 0x7f, 0x9b,
30963 +  0xe0, 0x55, 0x38, 0x70, 0x65, 0x30, 0x10, 0x10, 0x90, 0x7e, 0x41, 0xe0, 0x13, 0x92, 0x9b, 0xa3,
30964 +  0xe0, 0xf5, 0x99, 0x75, 0x3a, 0x03, 0x80, 0x09, 0x90, 0x7e, 0x41, 0xe0, 0xf5, 0x99, 0x75, 0x3a,
30965 +  0x02, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x40, 0x17, 0x90, 0x7f, 0xc7, 0xe4, 0xf0, 0xc2, 0x03}},
30966 + {0x0186, 64, { 0x20, 0x0d, 0x03, 0x02, 0x04, 0x1c, 0xc2, 0x0d, 0x90, 0x7f, 0xbb, 0x04, 0xf0, 0x02, 0x04, 0x1c, 0x30,
30967 +  0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83,
30968 +  0xe0, 0x13, 0x92, 0x0e, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e,
30969 +  0xf5, 0x83, 0xe0, 0xf5, 0x36, 0xd2, 0x0b, 0x02, 0x04, 0x1c, 0x75, 0x3a, 0x01, 0xc2, 0x14}},
30970 + {0x01c6, 64, { 0x02, 0x04, 0x1c, 0x30, 0x0c, 0x03, 0x02, 0x02, 0x49, 0x20, 0x09, 0x77, 0x90, 0x7f, 0x9b, 0xe0, 0x55,
30971 +  0x38, 0x70, 0x6f, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4,
30972 +  0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x9b, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5,
30973 +  0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x99, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x40}},
30974 + {0x0206, 64, { 0x17, 0x90, 0x7f, 0xc7, 0xe4, 0xf0, 0xc2, 0x03, 0x20, 0x0d, 0x03, 0x02, 0x04, 0x1c, 0xc2, 0x0d, 0x90,
30975 +  0x7f, 0xbb, 0x04, 0xf0, 0x02, 0x04, 0x1c, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40,
30976 +  0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf, 0x3a, 0x05, 0x3a,
30977 +  0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x36, 0xd2, 0x0b}},
30978 + {0x0246, 64, { 0x02, 0x04, 0x1c, 0xc2, 0x14, 0x02, 0x04, 0x1c, 0x20, 0x0b, 0x03, 0x02, 0x02, 0xff, 0xe5, 0x3a, 0xc3,
30979 +  0x95, 0x53, 0x50, 0x3c, 0x20, 0x0c, 0x34, 0x20, 0x09, 0x31, 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38,
30980 +  0x70, 0x29, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34,
30981 +  0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5}},
30982 + {0x0286, 64, { 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x36, 0x02, 0x04, 0x1c, 0xc2, 0x0b, 0x02, 0x04, 0x1c,
30983 +  0x90, 0x7f, 0xc9, 0xe4, 0xf0, 0xd2, 0x03, 0x30, 0x0d, 0x0c, 0xc2, 0x0d, 0x90, 0x7f, 0xbb, 0x04,
30984 +  0xf0, 0xc2, 0x0b, 0x02, 0x04, 0x1c, 0x90, 0x7f, 0xc6, 0xe0, 0x30, 0xe1, 0x05, 0xc2, 0x0b, 0x02,
30985 +  0x04, 0x1c, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x53, 0x90, 0x7e, 0x40, 0xe0, 0x13, 0x92, 0x0d}},
30986 + {0x02c6, 64, { 0x75, 0x16, 0xff, 0x20, 0x0c, 0x2b, 0x20, 0x09, 0x28, 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x70, 0x20,
30987 +  0x30, 0x10, 0x11, 0x90, 0x7e, 0x41, 0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x36, 0x75, 0x3a,
30988 +  0x03, 0x02, 0x04, 0x1c, 0x75, 0x3a, 0x02, 0x90, 0x7e, 0x41, 0xe0, 0xf5, 0x36, 0x02, 0x04, 0x1c,
30989 +  0x75, 0x3a, 0x01, 0xc2, 0x0b, 0x02, 0x04, 0x1c, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x50, 0x03}},
30990 + {0x0306, 64, { 0x02, 0x03, 0xa2, 0x90, 0x7f, 0xc8, 0xe0, 0x30, 0xe1, 0x07, 0xc2, 0x14, 0xc2, 0x05, 0x02, 0x04, 0x1c,
30991 +  0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x53, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0d, 0x75, 0x16, 0xff,
30992 +  0x20, 0x0c, 0x70, 0x20, 0x09, 0x6d, 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x70, 0x65, 0x30, 0x10,
30993 +  0x10, 0x90, 0x7d, 0xc1, 0xe0, 0x13, 0x92, 0x9b, 0xa3, 0xe0, 0xf5, 0x99, 0x75, 0x3a, 0x03}},
30994 + {0x0346, 64, { 0x80, 0x09, 0x90, 0x7d, 0xc1, 0xe0, 0xf5, 0x99, 0x75, 0x3a, 0x02, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x40,
30995 +  0x17, 0x90, 0x7f, 0xc9, 0xe4, 0xf0, 0xd2, 0x03, 0x20, 0x0d, 0x03, 0x02, 0x04, 0x1c, 0xc2, 0x0d,
30996 +  0x90, 0x7f, 0xbb, 0x04, 0xf0, 0x02, 0x04, 0x1c, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74,
30997 +  0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf, 0x3a}},
30998 + {0x0386, 64, { 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x36, 0xd2, 0x0b,
30999 +  0x02, 0x04, 0x1c, 0x75, 0x3a, 0x01, 0xc2, 0x14, 0x02, 0x04, 0x1c, 0x20, 0x0c, 0x75, 0x20, 0x09,
31000 +  0x72, 0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x70, 0x6a, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a,
31001 +  0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x9b, 0xaf}},
31002 + {0x03c6, 64, { 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x99, 0xe5,
31003 +  0x3a, 0xc3, 0x95, 0x53, 0x40, 0x13, 0x90, 0x7f, 0xc9, 0xe4, 0xf0, 0xd2, 0x03, 0x30, 0x0d, 0x35,
31004 +  0xc2, 0x0d, 0x90, 0x7f, 0xbb, 0x04, 0xf0, 0x80, 0x2c, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a,
31005 +  0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf}},
31006 + {0x0406, 64, { 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x36, 0xd2,
31007 +  0x0b, 0x80, 0x02, 0xc2, 0x14, 0xd2, 0x01, 0x20, 0x98, 0x03, 0x02, 0x05, 0x5a, 0xc2, 0x98, 0x20,
31008 +  0x02, 0x03, 0x02, 0x04, 0xc7, 0x20, 0x16, 0x27, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x80, 0x2f, 0xf5,
31009 +  0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x99, 0xf0, 0x30, 0x10, 0x4d, 0xaf, 0x39, 0x05}},
31010 + {0x0446, 64, { 0x39, 0x74, 0x80, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x98, 0xf0, 0x80, 0x3a, 0x85,
31011 +  0x99, 0x10, 0xe5, 0x10, 0xb5, 0x47, 0x04, 0xd2, 0x09, 0x80, 0x2e, 0xe5, 0x10, 0xb5, 0x46, 0x04,
31012 +  0xc2, 0x09, 0x80, 0x25, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x80, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e,
31013 +  0xf5, 0x83, 0xe5, 0x10, 0xf0, 0x30, 0x10, 0x11, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x80, 0x2f}},
31014 + {0x0486, 64, { 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x98, 0xf0, 0xd2, 0x0f, 0xe5, 0x39, 0xc3, 0x95, 0x43,
31015 +  0x50, 0x03, 0x02, 0x05, 0x58, 0x90, 0x7f, 0xb8, 0xe0, 0x30, 0xe1, 0x16, 0xe5, 0x39, 0xc3, 0x94,
31016 +  0x40, 0x50, 0x03, 0x02, 0x05, 0x58, 0x15, 0x39, 0x15, 0x39, 0x05, 0x2b, 0x43, 0x34, 0x01, 0x02,
31017 +  0x05, 0x58, 0x90, 0x7f, 0xb7, 0xe5, 0x39, 0xf0, 0x75, 0x39, 0x00, 0xc2, 0x02, 0x02, 0x05}},
31018 + {0x04c6, 64, { 0x58, 0x20, 0x16, 0x27, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x00, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5,
31019 +  0x83, 0xe5, 0x99, 0xf0, 0x30, 0x10, 0x4d, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x00, 0x2f, 0xf5, 0x82,
31020 +  0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x98, 0xf0, 0x80, 0x3a, 0x85, 0x99, 0x10, 0xe5, 0x10, 0xb5,
31021 +  0x47, 0x04, 0xd2, 0x09, 0x80, 0x2e, 0xe5, 0x10, 0xb5, 0x46, 0x04, 0xc2, 0x09, 0x80, 0x25}},
31022 + {0x0506, 64, { 0xaf, 0x39, 0x05, 0x39, 0x74, 0x00, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe5, 0x10, 0xf0,
31023 +  0x30, 0x10, 0x11, 0xaf, 0x39, 0x05, 0x39, 0x74, 0x00, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5,
31024 +  0x83, 0xe5, 0x98, 0xf0, 0xd2, 0x0f, 0xe5, 0x39, 0xc3, 0x95, 0x43, 0x40, 0x24, 0x90, 0x7f, 0xb6,
31025 +  0xe0, 0x30, 0xe1, 0x12, 0xe5, 0x39, 0xc3, 0x94, 0x40, 0x40, 0x16, 0x15, 0x39, 0x15, 0x39}},
31026 + {0x0546, 64, { 0x05, 0x2b, 0x43, 0x34, 0x01, 0x80, 0x0b, 0x90, 0x7f, 0xb9, 0xe5, 0x39, 0xf0, 0x75, 0x39, 0x00, 0xd2,
31027 +  0x02, 0xd2, 0x01, 0x30, 0x01, 0x05, 0xc2, 0x01, 0x02, 0x00, 0x56, 0xd0, 0xd0, 0xd0, 0x86, 0xd0,
31028 +  0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xbc, 0xe0, 0x20, 0xe1, 0x51, 0xe5, 0x34, 0x60,
31029 +  0x4d, 0xe5, 0x31, 0x70, 0x49, 0xe5, 0x34, 0x30, 0xe1, 0x08, 0xe4, 0xf5, 0x2f, 0x75, 0x34}},
31030 + {0x0586, 64, { 0x01, 0x80, 0x0b, 0xa2, 0x08, 0xe4, 0x33, 0xf5, 0x2f, 0xc2, 0x08, 0xe4, 0xf5, 0x34, 0xe4, 0xf5, 0x11,
31031 +  0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x11, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0d, 0x06,
31032 +  0xff, 0x74, 0x00, 0x25, 0x11, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x11,
31033 +  0xe5, 0x11, 0xb4, 0x0c, 0xdb, 0x90, 0x7f, 0xbd, 0x74, 0x0c, 0xf0, 0x75, 0x31, 0x10, 0x90}},
31034 + {0x05c6, 64, { 0x7f, 0xca, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x06, 0xf3, 0xe4, 0xf5, 0x11, 0x74, 0x40, 0x25, 0x11, 0xf5,
31035 +  0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x11, 0x7c, 0x00, 0x7b, 0x00, 0x24, 0x3b,
31036 +  0xf9, 0xec, 0x34, 0x00, 0xfa, 0xef, 0x12, 0x0d, 0x1f, 0x05, 0x11, 0xe5, 0x11, 0xb4, 0x18, 0xdb,
31037 +  0xe5, 0x3b, 0x60, 0x11, 0x75, 0xc9, 0x20, 0x75, 0xc8, 0x36, 0x85, 0x3c, 0xca, 0x85, 0x3d}},
31038 + {0x0606, 64, { 0xcb, 0xe4, 0x90, 0x7f, 0x9f, 0xf0, 0xe5, 0x3e, 0x13, 0x92, 0x10, 0x92, 0x9f, 0x85, 0x3f, 0x38, 0xe5,
31039 +  0x40, 0x13, 0x92, 0x16, 0xe5, 0x41, 0x60, 0x09, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfb, 0xf0, 0x80,
31040 +  0x07, 0x90, 0x7f, 0x98, 0xe0, 0x44, 0x04, 0xf0, 0xe5, 0x42, 0x60, 0x09, 0x90, 0x7f, 0x98, 0xe0,
31041 +  0x54, 0x7f, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0x98, 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x48, 0x60}},
31042 + {0x0646, 64, { 0x0b, 0xc2, 0x0c, 0xc2, 0x09, 0x90, 0x7f, 0x95, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x49, 0x60, 0x0c, 0xd2,
31043 +  0x09, 0x43, 0x34, 0x01, 0x90, 0x7f, 0x95, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x4a, 0x60, 0x0d, 0xc2,
31044 +  0xaf, 0xc2, 0x0b, 0xd2, 0x00, 0xe4, 0xf5, 0x53, 0xf5, 0x3a, 0xd2, 0xaf, 0xe5, 0x4b, 0x60, 0x05,
31045 +  0x30, 0x16, 0x02, 0xd2, 0x09, 0xe5, 0x4c, 0x60, 0x15, 0x90, 0x7f, 0x95, 0xe0, 0x54, 0xfd}},
31046 + {0x0686, 64, { 0xf0, 0x90, 0x7f, 0x9e, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x4d,
31047 +  0x60, 0x0a, 0xd2, 0x9c, 0xc2, 0x98, 0x75, 0x2c, 0x01, 0x75, 0x31, 0x1e, 0xe5, 0x4e, 0x60, 0x07,
31048 +  0xc2, 0x9c, 0xe4, 0xf5, 0x39, 0xf5, 0x2c, 0xe5, 0x4f, 0x60, 0x03, 0xe4, 0xf5, 0x39, 0xe5, 0x50,
31049 +  0x60, 0x02, 0xd2, 0x07, 0xe5, 0x51, 0x60, 0x0a, 0xe5, 0x4d, 0x70, 0x02, 0xf5, 0x31, 0xe5}},
31050 + {0x06c6, 64, { 0x51, 0x42, 0x34, 0xe5, 0x52, 0x60, 0x1f, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74,
31051 +  0x12, 0xf0, 0x74, 0x32, 0xf0, 0x74, 0x13, 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x14, 0xf0, 0x74, 0x34,
31052 +  0xf0, 0xd2, 0x03, 0xd2, 0x02, 0xd2, 0x08, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0xa2, 0x0c, 0xe4, 0x33,
31053 +  0xff, 0x65, 0x29, 0x60, 0x05, 0x8f, 0x29, 0x43, 0x34, 0x01, 0xa2, 0x09, 0xe4, 0x33, 0xff}},
31054 + {0x0706, 64, { 0x65, 0x2a, 0x60, 0x05, 0x8f, 0x2a, 0x43, 0x34, 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0xff, 0x54, 0x08, 0x64,
31055 +  0x08, 0xfe, 0x65, 0x25, 0x60, 0x05, 0x8e, 0x25, 0x43, 0x34, 0x01, 0xef, 0x54, 0x10, 0x64, 0x10,
31056 +  0xfe, 0x65, 0x26, 0x60, 0x05, 0x8e, 0x26, 0x43, 0x34, 0x01, 0xef, 0x54, 0x40, 0x64, 0x40, 0xfe,
31057 +  0x65, 0x27, 0x60, 0x05, 0x8e, 0x27, 0x43, 0x34, 0x01, 0xef, 0x54, 0x20, 0x64, 0x20, 0xfe}},
31058 + {0x0746, 64, { 0x65, 0x28, 0x60, 0x05, 0x8e, 0x28, 0x43, 0x34, 0x01, 0x90, 0x7f, 0x9a, 0xe0, 0x54, 0x40, 0x64, 0x40,
31059 +  0xfe, 0x65, 0x2e, 0x60, 0x05, 0x8e, 0x2e, 0x43, 0x34, 0x01, 0x30, 0x07, 0x35, 0xc2, 0xaf, 0x30,
31060 +  0x02, 0x18, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0xe5, 0x39, 0x60, 0x09, 0x90, 0x7f, 0xb7,
31061 +  0xf0, 0xe4, 0xf5, 0x39, 0xc2, 0x02, 0xc2, 0x07, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0, 0x20}},
31062 + {0x0786, 64, { 0xe1, 0x0f, 0xe5, 0x39, 0x60, 0x09, 0x90, 0x7f, 0xb9, 0xf0, 0xe4, 0xf5, 0x39, 0xd2, 0x02, 0xc2, 0x07,
31063 +  0xd2, 0xaf, 0x20, 0x05, 0x3d, 0x30, 0x03, 0x1e, 0x90, 0x7f, 0xc6, 0xe0, 0x20, 0xe1, 0x33, 0x90,
31064 +  0x7e, 0x40, 0xe0, 0x13, 0x92, 0x0d, 0x75, 0x3a, 0x01, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x53, 0xd2,
31065 +  0x05, 0x75, 0x16, 0xff, 0x80, 0x1c, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x15, 0x90, 0x7d}},
31066 + {0x07c6, 64, { 0xc0, 0xe0, 0x13, 0x92, 0x0d, 0x75, 0x3a, 0x01, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x53, 0xd2, 0x05, 0x75,
31067 +  0x16, 0xff, 0x20, 0x14, 0x33, 0x20, 0x00, 0x06, 0xe5, 0x3a, 0x65, 0x53, 0x70, 0x2a, 0x30, 0x05,
31068 +  0x1a, 0x30, 0x03, 0x09, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x03, 0x80, 0x07, 0xe4, 0x90, 0x7f,
31069 +  0xc9, 0xf0, 0xd2, 0x03, 0xc2, 0x05, 0xe4, 0xf5, 0x53, 0xf5, 0x3a, 0x30, 0x0d, 0x0a, 0xc2}},
31070 + {0x0806, 64, { 0x0d, 0xc2, 0x00, 0x90, 0x7f, 0xbb, 0x74, 0x01, 0xf0, 0x30, 0x14, 0x03, 0x02, 0x09, 0x14, 0x20, 0x05,
31071 +  0x03, 0x02, 0x09, 0x14, 0x30, 0x0c, 0x03, 0x02, 0x09, 0x14, 0x30, 0x09, 0x03, 0x02, 0x09, 0x14,
31072 +  0x90, 0x7f, 0x9b, 0xe0, 0x55, 0x38, 0x60, 0x03, 0x02, 0x09, 0x14, 0x30, 0x03, 0x61, 0x30, 0x10,
31073 +  0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83}},
31074 + {0x0846, 64, { 0xe0, 0x13, 0x92, 0x1b, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5,
31075 +  0x83, 0xe0, 0xfe, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x50, 0x2a, 0x30, 0x10, 0x12, 0xaf, 0x3a, 0x05,
31076 +  0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e, 0xaf,
31077 +  0x3a, 0x05, 0x3a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5}},
31078 + {0x0886, 64, { 0x36, 0xd2, 0x0b, 0x80, 0x6a, 0xc2, 0x0b, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x03, 0x80, 0x5f, 0x30,
31079 +  0x10, 0x12, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83,
31080 +  0xe0, 0x13, 0x92, 0x1b, 0xaf, 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d,
31081 +  0xf5, 0x83, 0xe0, 0xfe, 0xe5, 0x3a, 0xc3, 0x95, 0x53, 0x50, 0x2a, 0x30, 0x10, 0x12, 0xaf}},
31082 + {0x08c6, 64, { 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0e,
31083 +  0xaf, 0x3a, 0x05, 0x3a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5,
31084 +  0x36, 0xd2, 0x0b, 0x80, 0x09, 0xc2, 0x0b, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x03, 0x30, 0x10,
31085 +  0x04, 0xa2, 0x1b, 0x92, 0x9b, 0xd2, 0x14, 0xc2, 0xaf, 0x8e, 0x99, 0x20, 0x0b, 0x0d, 0x30}},
31086 + {0x0906, 64, { 0x0d, 0x0a, 0xc2, 0x0d, 0xc2, 0x00, 0x90, 0x7f, 0xbb, 0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x22, 0x90, 0x7f,
31087 +  0xe9, 0xe0, 0x12, 0x0d, 0x31, 0x0a, 0x11, 0x00, 0x0a, 0x7e, 0x01, 0x0a, 0xdb, 0x03, 0x09, 0x38,
31088 +  0x06, 0x0a, 0x02, 0x08, 0x09, 0xf6, 0x09, 0x09, 0xde, 0x0a, 0x09, 0xed, 0x0b, 0x00, 0x00, 0x0b,
31089 +  0x19, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x5a, 0x24, 0x02, 0x60}},
31090 + {0x0946, 64, { 0x03, 0x02, 0x0b, 0x19, 0x74, 0x0d, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x87, 0x90, 0x7f, 0xd5, 0xf0, 0x02,
31091 +  0x0b, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82,
31092 +  0xd8, 0x75, 0x83, 0x0d, 0xef, 0xf0, 0x75, 0x82, 0xd1, 0x75, 0x83, 0x0d, 0xf0, 0x75, 0x82, 0xca,
31093 +  0x75, 0x83, 0x0d, 0xf0, 0x75, 0x82, 0xc3, 0x75, 0x83, 0x0d, 0xf0, 0x90, 0x7f, 0xea, 0xe0}},
31094 + {0x0986, 64, { 0x04, 0x75, 0x82, 0x9e, 0x75, 0x83, 0x0d, 0xf0, 0x74, 0x0d, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x99, 0x90,
31095 +  0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x0b, 0x75, 0x11, 0xff, 0x75,
31096 +  0x12, 0x0d, 0x75, 0x13, 0xdc, 0x80, 0x1b, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x0b, 0x75, 0x11,
31097 +  0xff, 0x75, 0x12, 0x0d, 0x75, 0x13, 0xe0, 0x80, 0x09, 0x75, 0x11, 0xff, 0x75, 0x12, 0x0d}},
31098 + {0x09c6, 64, { 0x75, 0x13, 0xf0, 0xaa, 0x12, 0xa9, 0x13, 0xae, 0x02, 0xee, 0x90, 0x7f, 0xd4, 0xf0, 0xaf, 0x01, 0xef,
31099 +  0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0x00, 0xe5, 0x15, 0xf0, 0x90, 0x7f, 0xb5,
31100 +  0x74, 0x01, 0xf0, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x15, 0x02, 0x0b, 0x20, 0x12,
31101 +  0x0c, 0xb1, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x14, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0x00, 0xe5}},
31102 + {0x0a06, 64, { 0x14, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f,
31103 +  0x60, 0x27, 0x14, 0x60, 0x34, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x19, 0xa2, 0x17, 0xe4, 0x33,
31104 +  0xff, 0x25, 0xe0, 0xff, 0xa2, 0x19, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0,
31105 +  0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x20, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3}},
31106 + {0x0a46, 64, { 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80,
31107 +  0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4,
31108 +  0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f,
31109 +  0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x17}},
31110 + {0x0a86, 64, { 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0x64, 0x01, 0x60, 0x03, 0x02, 0x0b,
31111 +  0x19, 0xc2, 0x17, 0x02, 0x0b, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x76, 0x90, 0x7f, 0xec, 0xe0,
31112 +  0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4,
31113 +  0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80}},
31114 + {0x0ac6, 64, { 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44,
31115 +  0x20, 0xf0, 0x80, 0x45, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x10, 0x24, 0x02, 0x70, 0x39,
31116 +  0x90, 0x7f, 0xea, 0xe0, 0x64, 0x01, 0x70, 0x2a, 0xd2, 0x17, 0x80, 0x2d, 0x90, 0x7f, 0xea, 0xe0,
31117 +  0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0}},
31118 + {0x0b06, 64, { 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0,
31119 +  0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0,
31120 +  0x22, 0xc2, 0x10, 0xe4, 0xf5, 0x14, 0xf5, 0x34, 0xc2, 0x09, 0xc2, 0x0c, 0xc2, 0x0b, 0xc2, 0x14,
31121 +  0xc2, 0x0d, 0xc2, 0x16, 0xc2, 0x11, 0xc2, 0x07, 0xc2, 0x12, 0xc2, 0x0f, 0xc2, 0x08, 0xf5}},
31122 + {0x0b46, 64, { 0x35, 0xf5, 0x39, 0xf5, 0x53, 0xf5, 0x3a, 0xf5, 0x33, 0xf5, 0x30, 0xf5, 0x2f, 0xf5, 0x2e, 0xf5, 0x2d,
31123 +  0xf5, 0x2c, 0xf5, 0x2b, 0xf5, 0x2a, 0xf5, 0x29, 0xf5, 0x28, 0xf5, 0x27, 0xf5, 0x26, 0xf5, 0x25,
31124 +  0xf5, 0x24, 0xc2, 0x05, 0xc2, 0x18, 0xc2, 0x1a, 0xc2, 0x17, 0xc2, 0x19, 0xc2, 0x15, 0xc2, 0x04,
31125 +  0xd2, 0x13, 0xc2, 0x06, 0xc2, 0x01, 0x90, 0x7f, 0x92, 0xe0, 0x54, 0xfd, 0xf0, 0xd2, 0xe8}},
31126 + {0x0b86, 64, { 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74,
31127 +  0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf,
31128 +  0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0f, 0xf0, 0x90, 0x7f, 0xac, 0x74, 0x0e,
31129 +  0xf0, 0xd2, 0xaf, 0xd2, 0xbc, 0xd2, 0x1b, 0x12, 0x0f, 0x5f, 0xc2, 0x18, 0x30, 0x04, 0x03}},
31130 + {0x0bc6, 64, { 0x12, 0x05, 0x6d, 0x30, 0x04, 0x2a, 0x30, 0x06, 0x27, 0xc2, 0x06, 0xe5, 0x16, 0x60, 0x16, 0x15, 0x16,
31131 +  0x90, 0x7f, 0xd8, 0xe0, 0x30, 0xe6, 0x04, 0x7f, 0x00, 0x80, 0x02, 0x7f, 0x20, 0x90, 0x7f, 0x96,
31132 +  0xef, 0xf0, 0x80, 0x06, 0x90, 0x7f, 0x96, 0x74, 0x20, 0xf0, 0x12, 0x0c, 0x0b, 0x80, 0xcd, 0x30,
31133 +  0x18, 0x07, 0xc2, 0x18, 0x12, 0x09, 0x15, 0x80, 0xc3, 0x30, 0x1a, 0xc0, 0xc2, 0x1a, 0x12}},
31134 + {0x0c06, 64, { 0x0f, 0xbb, 0x80, 0xb9, 0x22, 0xe5, 0x31, 0x60, 0x02, 0x15, 0x31, 0xe5, 0x39, 0x60, 0x55, 0x65, 0x35,
31135 +  0x70, 0x4b, 0xe5, 0x33, 0xf4, 0x60, 0x02, 0x05, 0x33, 0xe5, 0x33, 0xc3, 0x95, 0x44, 0x40, 0x43,
31136 +  0xc2, 0xaf, 0x30, 0x02, 0x1b, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x2d, 0x90, 0x7f, 0xb7, 0xe5,
31137 +  0x39, 0xf0, 0xc2, 0x02, 0xe4, 0xf5, 0x39, 0xf5, 0x33, 0xf5, 0x35, 0x75, 0x16, 0xff, 0x80}},
31138 + {0x0c46, 64, { 0x19, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7f, 0xb9, 0xe5, 0x39, 0xf0, 0xd2, 0x02, 0xe4,
31139 +  0xf5, 0x39, 0xf5, 0x33, 0xf5, 0x35, 0x75, 0x16, 0xff, 0xd2, 0xaf, 0x80, 0x06, 0x85, 0x39, 0x35,
31140 +  0xe4, 0xf5, 0x33, 0xe5, 0x2c, 0x60, 0x30, 0x20, 0x0f, 0x07, 0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe0,
31141 +  0x0f, 0xe5, 0x2d, 0x60, 0x06, 0xe4, 0xf5, 0x2d, 0x43, 0x34, 0x01, 0xe4, 0xf5, 0x30, 0x80}},
31142 + {0x0c86, 64, { 0x14, 0xe5, 0x30, 0xd3, 0x95, 0x45, 0x50, 0x0d, 0xe5, 0x30, 0xb5, 0x45, 0x06, 0x75, 0x2d, 0x01, 0x43,
31143 +  0x34, 0x01, 0x05, 0x30, 0xc2, 0x0f, 0x22, 0x90, 0x7f, 0xd9, 0xe0, 0x30, 0xe2, 0x04, 0x7f, 0x00,
31144 +  0x80, 0x02, 0x7f, 0x20, 0x90, 0x7f, 0x96, 0xef, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90,
31145 +  0x7f, 0x9c, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x96, 0x74, 0x20, 0xf0, 0x90, 0x7f, 0x94, 0x74}},
31146 + {0x0cc6, 64, { 0x01, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x97, 0x74, 0x86, 0xf0, 0x90, 0x7f, 0x95,
31147 +  0x74, 0x03, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x84, 0xf0, 0x90, 0x7f, 0x98, 0xf0, 0xe4, 0x90, 0x7f,
31148 +  0xc7, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x90, 0x7f, 0xcb, 0xf0, 0x75, 0x98, 0x40, 0x43, 0xa8, 0x10,
31149 +  0x90, 0x7f, 0xde, 0x74, 0x1f, 0xf0, 0x90, 0x7f, 0xdf, 0x74, 0x0f, 0xf0, 0xd2, 0x04, 0x22}},
31150 + {0x0d06, 64, { 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3,
31151 +  0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xf0,
31152 +  0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8, 0xe4,
31153 +  0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93}},
31154 + {0x0d46, 64, { 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80, 0xdf,
31155 +  0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90,
31156 +  0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0,
31157 +  0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00}},
31158 + {0x0d86, 64, { 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00, 0x00, 0x40, 0xcd, 0x06, 0x0c, 0x01, 0x01, 0x00, 0x01, 0x02,
31159 +  0x00, 0x02, 0x09, 0x02, 0x43, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00, 0x00, 0x07,
31160 +  0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40,
31161 +  0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x81, 0x02, 0x40, 0x00}},
31162 + {0x0dc6, 64, { 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x83, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05,
31163 +  0x84, 0x02, 0x40, 0x00, 0x01, 0x04, 0x03, 0x09, 0x04, 0x10, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79,
31164 +  0x00, 0x73, 0x00, 0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x0e, 0x03, 0x53, 0x00, 0x65, 0x00, 0x72,
31165 +  0x00, 0x69, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x02, 0x0e, 0xa2, 0x00, 0x02, 0x0e}},
31166 + {0x0e06, 64, { 0x7b, 0x00, 0x02, 0x0d, 0x57, 0x00, 0x02, 0x0e, 0xc9, 0x00, 0x02, 0x0e, 0x10, 0x00, 0x02, 0x0e, 0x14,
31167 +  0x00, 0x02, 0x0e, 0x18, 0x00, 0x02, 0x0e, 0x1c, 0x00, 0x02, 0x0e, 0xf0, 0x00, 0x02, 0x0e, 0x24,
31168 +  0x00, 0x02, 0x0f, 0x15, 0x00, 0x02, 0x0e, 0x2c, 0x00, 0x02, 0x0f, 0x3a, 0xe4, 0x90, 0x7f, 0x95,
31169 +  0xf0, 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0x02}},
31170 + {0x0e46, 64, { 0xf0, 0x90, 0x7f, 0x97, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x10, 0xf0, 0xe4, 0x90, 0x7f,
31171 +  0x96, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xfe, 0xf0, 0x30, 0x17, 0x04, 0x7f, 0x80, 0x80, 0x02, 0x7f,
31172 +  0x00, 0x90, 0x7f, 0x97, 0xef, 0xf0, 0xe4, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0xf0, 0x90,
31173 +  0x7f, 0x98, 0xf0, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0}},
31174 + {0x0e86, 64, { 0x86, 0x75, 0x86, 0x00, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x02, 0xf0, 0xd2, 0x06, 0xd0, 0x86,
31175 +  0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0,
31176 +  0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90,
31177 +  0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83}},
31178 + {0x0ec6, 64, { 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86,
31179 +  0x00, 0xd2, 0x1a, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84,
31180 +  0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0,
31181 +  0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74}},
31182 + {0x0f06, 64, { 0x02, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0,
31183 +  0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x53, 0x91, 0xef,
31184 +  0x90, 0x7f, 0xa9, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83,
31185 +  0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86}},
31186 + {0x0f46, 64, { 0x75, 0x86, 0x00, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0,
31187 +  0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0,
31188 +  0x44, 0x08, 0xf0, 0x30, 0x1b, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x00,
31189 +  0x03, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0, 0x22, 0x74, 0x00}},
31190 + {0x0f86, 64, { 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f,
31191 +  0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x90, 0x7f,
31192 +  0xd6, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x0d, 0x7e, 0x00, 0x12, 0x00, 0x03, 0x90, 0x7f, 0xd6, 0xe0,
31193 +  0x54, 0xfe, 0xf0, 0x22, 0x12, 0x0e, 0x33, 0x12, 0x0f, 0x95, 0x90, 0x7f, 0xd6, 0xe0, 0x30}},
31194 + {0x0fc6,  9, { 0xe7, 0x03, 0x12, 0x0f, 0xa5, 0x12, 0x0c, 0xb1, 0x22}},
31195 + {0xffff,      0,      {0x00}}
31196 +};
31197 diff -Nur linux-2.4.19.org/drivers/usb/serial/keyspan_usa19qw_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa19qw_fw.h
31198 --- linux-2.4.19.org/drivers/usb/serial/keyspan_usa19qw_fw.h    Thu Jan  1 01:00:00 1970
31199 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa19qw_fw.h        Thu Oct 31 08:11:24 2002
31200 @@ -0,0 +1,448 @@
31201 +/* keyspan_usa19qw_fw.h
31202 +
31203 +       The firmware contained herein as keyspan_usa19wq_fw.h is
31204 +
31205 +               Copyright (C) 1999-2001
31206 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
31207 +               
31208 +       as an unpublished work. This notice does not imply unrestricted or
31209 +       public access to the source code from which this firmware image is
31210 +       derived.  Except as noted below this firmware image may not be 
31211 +       reproduced, used, sold or transferred to any third party without 
31212 +       Keyspan's prior written consent.  All Rights Reserved.
31213 +
31214 +       Permission is hereby granted for the distribution of this firmware 
31215 +       image as part of a Linux or other Open Source operating system kernel 
31216 +       in text or binary form as required. 
31217 +
31218 +       This firmware may not be modified and may only be used with  
31219 +       Keyspan hardware.  Distribution and/or Modification of the 
31220 +       keyspan.c driver which includes this firmware, in whole or in 
31221 +       part, requires the inclusion of this statement."
31222 +
31223 +*/
31224 +
31225 +static const struct ezusb_hex_record keyspan_usa19qw_firmware[] = {
31226 + {0x0033,  3, { 0x02, 0x00, 0x2d}},
31227 + {0x002d,  4, { 0x53, 0xd8, 0xef, 0x32}},
31228 + {0x0046, 16, { 0x30, 0x10, 0x19, 0x12, 0x0e, 0x0f, 0xef, 0xc3, 0x95, 0x14, 0x40, 0x03, 0x02, 0x00, 0xdf, 0x90}},
31229 + {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x10, 0xc2, 0x0b, 0x02, 0x00, 0xdf, 0x30, 0x0d, 0x3e, 0x90}},
31230 + {0x0066, 16, { 0x7f, 0xc6, 0xe0, 0x20, 0xe1, 0x73, 0x12, 0x0e, 0x0f, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x6a, 0x90}},
31231 + {0x0076, 16, { 0x7e, 0x40, 0xe0, 0x13, 0x92, 0x10, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x36, 0x20, 0x0b, 0x11}},
31232 + {0x0086, 16, { 0x60, 0x0f, 0xf5, 0x24, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x29, 0x7e, 0x75, 0x2a, 0x41, 0x12, 0x09}},
31233 + {0x0096, 16, { 0x10, 0xc2, 0x0d, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x75, 0x26, 0xff, 0x80, 0x3c, 0x90, 0x7f, 0xc8}},
31234 + {0x00a6, 16, { 0xe0, 0x20, 0xe1, 0x35, 0x12, 0x0e, 0x0f, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x2c, 0x90, 0x7d, 0xc0}},
31235 + {0x00b6, 16, { 0xe0, 0x13, 0x92, 0x10, 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x36, 0x20, 0x0b, 0x11, 0x60, 0x0f}},
31236 + {0x00c6, 16, { 0xf5, 0x24, 0x7e, 0x7d, 0x7f, 0xc1, 0x75, 0x29, 0x7d, 0x75, 0x2a, 0xc1, 0x12, 0x09, 0x10, 0xd2}},
31237 + {0x00d6, 16, { 0x0d, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0x75, 0x26, 0xff, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03}},
31238 + {0x00e6, 16, { 0x02, 0x01, 0x68, 0x12, 0x0c, 0xff, 0x8f, 0x36, 0x12, 0x0e, 0x1b, 0x8f, 0x11, 0xe5, 0x36, 0xc3}},
31239 + {0x00f6, 16, { 0x95, 0x13, 0x50, 0x0f, 0x12, 0x0d, 0xde, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x11, 0x20, 0xe7, 0x03}},
31240 + {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
31241 + {0x0043,  3, { 0x02, 0x0e, 0x00}},
31242 + {0x0003, 16, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90}},
31243 + {0x0013, 16, { 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0}},
31244 + {0x0023, 10, { 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32}},
31245 + {0x0000,  3, { 0x02, 0x09, 0xc5}},
31246 + {0x0106, 64, { 0x30, 0x13, 0x5f, 0xc2, 0x13, 0xe5, 0x36, 0x60, 0x59, 0xb4, 0x80, 0x03, 0x43, 0x11, 0x02, 0xe5, 0x11,
31247 +  0x30, 0xe7, 0x24, 0xe5, 0x36, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x36, 0x20, 0x85, 0x36, 0x24,
31248 +  0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x29, 0x7e, 0x75, 0x2a, 0x80, 0x12, 0x0b, 0x9a, 0xe5, 0x36, 0x25,
31249 +  0xe0, 0x90, 0x7f, 0xb7, 0xf0, 0x80, 0x2a, 0xe5, 0x36, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75}},
31250 + {0x0146, 64, { 0x36, 0x3f, 0x85, 0x36, 0x24, 0x90, 0x7e, 0x80, 0xe5, 0x11, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x29,
31251 +  0x7e, 0x75, 0x2a, 0x81, 0x12, 0x09, 0x35, 0xe5, 0x36, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x75, 0x26,
31252 +  0xff, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x0e, 0x03, 0x02, 0x03, 0xc4, 0xe4, 0xf5,
31253 +  0x35, 0x74, 0x40, 0x25, 0x35, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5}},
31254 + {0x0186, 64, { 0x35, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
31255 +  0x12, 0x0a, 0x97, 0x05, 0x35, 0xe5, 0x35, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x6e,
31256 +  0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12, 0x0c, 0xda, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12,
31257 +  0x0c, 0x1c, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12, 0x0c, 0x42, 0xd2, 0x11, 0xd2, 0x12, 0x75}},
31258 + {0x01c6, 64, { 0x36, 0x04, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x05, 0xc2, 0x12, 0x43, 0x36, 0xc0, 0x90, 0x7e, 0x04, 0xe0,
31259 +  0xb4, 0x01, 0x07, 0xc2, 0x12, 0x43, 0x36, 0x0b, 0x80, 0x10, 0x90, 0x7e, 0x04, 0xe0, 0x60, 0x07,
31260 +  0xc2, 0x11, 0x43, 0x36, 0x09, 0x80, 0x03, 0x43, 0x36, 0x02, 0x7f, 0x03, 0xad, 0x36, 0x12, 0x0c,
31261 +  0xda, 0x43, 0x1a, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x1a}},
31262 + {0x0206, 64, { 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x17, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
31263 +  0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x19, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
31264 +  0x90, 0xc0, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7e, 0x07, 0xe0, 0x60, 0x42, 0x90, 0x7e, 0x13, 0xe0,
31265 +  0x60, 0x05, 0x43, 0x16, 0x04, 0x80, 0x03, 0x53, 0x16, 0xfb, 0xe4, 0xff, 0xad, 0x16, 0x12}},
31266 + {0x0246, 64, { 0x0c, 0xda, 0x90, 0x7e, 0x08, 0xe0, 0x60, 0x05, 0x43, 0x18, 0x80, 0x80, 0x03, 0x53, 0x18, 0x7f, 0x53,
31267 +  0x18, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x18, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x0c,
31268 +  0x8e, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x0c, 0xb4, 0xaf, 0x18, 0x12, 0x0c, 0x68, 0x90, 0x7e,
31269 +  0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x1a, 0x01, 0x80, 0x03, 0x53, 0x1a}},
31270 + {0x0286, 64, { 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x1a, 0xf0, 0x90, 0x7e, 0x0c, 0xe0,
31271 +  0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x1a, 0x02, 0x80, 0x03, 0x53, 0x1a, 0xfd, 0x90, 0x7f,
31272 +  0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x1a, 0xf0, 0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x13,
31273 +  0xa3, 0xe0, 0x13, 0x92, 0x14, 0xa3, 0xe0, 0xf5, 0x14, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x1a}},
31274 + {0x02c6, 64, { 0x10, 0x80, 0x03, 0x53, 0x1a, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x1a,
31275 +  0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x19, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
31276 +  0xe5, 0x19, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x12, 0x0d,
31277 +  0xd2, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x16, 0xfd, 0xe4, 0xff, 0xad, 0x16}},
31278 + {0x0306, 64, { 0x12, 0x0c, 0xda, 0xe4, 0xf5, 0x0e, 0xf5, 0x0d, 0xd2, 0x0f, 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43,
31279 +  0x16, 0x02, 0xe4, 0xff, 0xad, 0x16, 0x12, 0x0c, 0xda, 0x75, 0x0d, 0x01, 0xd2, 0x0f, 0x90, 0x7e,
31280 +  0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x17, 0x44, 0x04, 0x90, 0xc0,
31281 +  0x00, 0xf0, 0xd2, 0x0b, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11, 0x43, 0x19, 0x40, 0x90, 0x7f}},
31282 + {0x0346, 64, { 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x19, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60,
31283 +  0x0f, 0x53, 0x16, 0xfe, 0xe4, 0xff, 0xad, 0x16, 0x12, 0x0c, 0xda, 0x75, 0x0f, 0x01, 0xd2, 0x0f,
31284 +  0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x16, 0x01, 0xe4, 0xff, 0xad, 0x16, 0x12, 0x0c, 0xda,
31285 +  0xe4, 0xf5, 0x0f, 0xd2, 0x0f, 0x90, 0x7e, 0x1c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74}},
31286 + {0x0386, 64, { 0x12, 0xf0, 0xe5, 0x17, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2,
31287 +  0x13, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x10, 0x01, 0xe4, 0xf5, 0x12, 0xd2, 0x0f, 0x90,
31288 +  0x7e, 0x1f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15,
31289 +  0xf0, 0x74, 0x35, 0xf0, 0xd2, 0x0d, 0xc2, 0x0e, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30, 0x16}},
31290 + {0x03c6, 64, { 0x71, 0xe5, 0x12, 0x60, 0x02, 0x15, 0x12, 0xe5, 0x30, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x30, 0x80,
31291 +  0x60, 0x75, 0x30, 0x0a, 0x12, 0x0d, 0xd2, 0xef, 0x54, 0x01, 0xf5, 0x36, 0x65, 0x0e, 0x60, 0x07,
31292 +  0x85, 0x36, 0x0e, 0xd2, 0x0f, 0x80, 0x11, 0x12, 0x0e, 0x27, 0xef, 0x54, 0x10, 0xf5, 0x36, 0x65,
31293 +  0x09, 0x60, 0x05, 0x85, 0x36, 0x09, 0xd2, 0x0f, 0x12, 0x0e, 0x27, 0xef, 0x54, 0x80, 0xf5}},
31294 + {0x0406, 64, { 0x36, 0x65, 0x0a, 0x60, 0x05, 0x85, 0x36, 0x0a, 0xd2, 0x0f, 0x12, 0x0e, 0x27, 0xef, 0x54, 0x20, 0xf5,
31295 +  0x36, 0x65, 0x0b, 0x60, 0x08, 0x85, 0x36, 0x0b, 0x30, 0x11, 0x02, 0xd2, 0x0f, 0x12, 0x0e, 0x27,
31296 +  0xef, 0x54, 0x40, 0xf5, 0x36, 0x65, 0x0c, 0x60, 0x08, 0x85, 0x36, 0x0c, 0x30, 0x12, 0x02, 0xd2,
31297 +  0x0f, 0x30, 0x16, 0x2a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0}},
31298 + {0x0446, 64, { 0x60, 0x09, 0xe0, 0xf5, 0x32, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x33, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09,
31299 +  0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f,
31300 +  0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x05, 0x29, 0xe5, 0x27, 0x70, 0x40, 0x30, 0x0f, 0x39, 0xe5,
31301 +  0x12, 0x70, 0x35, 0xc2, 0x0f, 0xf5, 0x35, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x08, 0x25, 0x35}},
31302 + {0x0486, 64, { 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0a, 0x51, 0xff, 0x74, 0x80, 0x25, 0x35, 0xf5, 0x82, 0xe4, 0x34,
31303 +  0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x35, 0xe5, 0x35, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74,
31304 +  0x09, 0xf0, 0x75, 0x12, 0x10, 0xe4, 0xf5, 0x10, 0x75, 0x27, 0x02, 0x22, 0xe5, 0x27, 0x64, 0x02,
31305 +  0x70, 0x36, 0x30, 0x05, 0x2f, 0xc2, 0x05, 0xf5, 0x35, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2b}},
31306 + {0x04c6, 64, { 0x25, 0x35, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0a, 0x51, 0xff, 0x74, 0x80, 0x25, 0x35, 0xf5, 0x82,
31307 +  0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x35, 0xe5, 0x35, 0xb4, 0x05, 0xdb, 0x90, 0x7f,
31308 +  0xc3, 0x74, 0x05, 0xf0, 0x75, 0x27, 0x03, 0x22, 0xe5, 0x32, 0x60, 0x33, 0x75, 0x31, 0x03, 0x15,
31309 +  0x32, 0xe4, 0xf5, 0x35, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x31, 0x25, 0x35, 0xf9, 0xee, 0x34}},
31310 + {0x0506, 64, { 0x00, 0xfa, 0x12, 0x0a, 0x51, 0xff, 0x74, 0x80, 0x25, 0x35, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83,
31311 +  0xef, 0xf0, 0x05, 0x35, 0xe5, 0x35, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4,
31312 +  0xf5, 0x27, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0a, 0xa9, 0x06, 0x08, 0x00, 0x06, 0x7c, 0x01,
31313 +  0x06, 0xe9, 0x03, 0x05, 0x4d, 0x06, 0x05, 0xf9, 0x08, 0x05, 0xed, 0x09, 0x05, 0xd5, 0x0a}},
31314 + {0x0546, 64, { 0x05, 0xe4, 0x0b, 0x00, 0x00, 0x07, 0x39, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60,
31315 +  0x50, 0x24, 0x02, 0x70, 0x6f, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5,
31316 +  0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03,
31317 +  0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19, 0xf0}},
31318 + {0x0586, 64, { 0x75, 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83,
31319 +  0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x07,
31320 +  0x40, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0b, 0x1c, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f,
31321 +  0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xb4, 0xe0, 0x44}},
31322 + {0x05c6, 64, { 0x01, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f,
31323 +  0x00, 0xe5, 0x25, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xea,
31324 +  0xe0, 0xf5, 0x25, 0x02, 0x07, 0x40, 0x12, 0x07, 0x48, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x23, 0x02,
31325 +  0x07, 0x40, 0x90, 0x7f, 0x00, 0xe5, 0x23, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02}},
31326 + {0x0606, 64, { 0x07, 0x40, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b,
31327 +  0xa2, 0x01, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x07, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00,
31328 +  0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x07, 0x40, 0xe4, 0x90, 0x7f,
31329 +  0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f}},
31330 + {0x0646, 64, { 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24,
31331 +  0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4,
31332 +  0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
31333 +  0x01, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1e, 0x24, 0x02}},
31334 + {0x0686, 64, { 0x60, 0x03, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x06, 0x12, 0x0d, 0xf9, 0x02, 0x07,
31335 +  0x40, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x07, 0x40, 0x90, 0x7f, 0xea, 0xe0, 0x70,
31336 +  0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07,
31337 +  0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90}},
31338 + {0x06c6, 64, { 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90,
31339 +  0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x60, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0,
31340 +  0x80, 0x57, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x24, 0x02, 0x70, 0x4b, 0x90, 0x7f,
31341 +  0xea, 0xe0, 0xb4, 0x01, 0x05, 0x12, 0x0d, 0xf6, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44}},
31342 + {0x0706, 64, { 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80,
31343 +  0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4,
31344 +  0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0,
31345 +  0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02}},
31346 + {0x0746, 64, { 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x96, 0x74,
31347 +  0x20, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f,
31348 +  0x98, 0x74, 0x10, 0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde,
31349 +  0xf0, 0xe4, 0xf5, 0x08, 0x7f, 0x01, 0x7b, 0x00, 0x74, 0x08, 0x2f, 0xf9, 0xe4, 0x34, 0x00}},
31350 + {0x0786, 64, { 0xfa, 0xe4, 0x12, 0x0a, 0x97, 0x0f, 0xbf, 0x09, 0xee, 0x75, 0x13, 0x01, 0xe4, 0xf5, 0x12, 0xf5, 0x30,
31351 +  0xf5, 0x11, 0xc2, 0x0f, 0xc2, 0x13, 0xc2, 0x0e, 0xc2, 0x0b, 0xc2, 0x10, 0xc2, 0x04, 0x90, 0x7f,
31352 +  0x98, 0x74, 0x13, 0xf0, 0x75, 0x19, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4,
31353 +  0xfd, 0x12, 0x0c, 0xda, 0x7f, 0x10, 0x8f, 0x18, 0x12, 0x0c, 0x68, 0x90, 0x7f, 0x98, 0x74}},
31354 + {0x07c6, 64, { 0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x17, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x0f, 0xe4, 0xfd, 0x12,
31355 +  0x0c, 0xda, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x16, 0x12, 0x0c, 0xda, 0x90, 0x7f, 0x98,
31356 +  0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x0c, 0xda, 0x7f,
31357 +  0x01, 0x12, 0x0d, 0x6a, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x0c, 0xda, 0xe4, 0xff, 0xe5, 0x16}},
31358 + {0x0806, 64, { 0x54, 0x7f, 0xfd, 0x12, 0x0c, 0xda, 0x12, 0x0e, 0x0f, 0x8f, 0x15, 0xe4, 0xff, 0xe5, 0x16, 0x44, 0x80,
31359 +  0xfd, 0x12, 0x0c, 0xda, 0xe5, 0x15, 0x30, 0xe7, 0x04, 0xc2, 0x08, 0x80, 0x02, 0xd2, 0x08, 0x90,
31360 +  0x7f, 0x98, 0x74, 0x14, 0xf0, 0x75, 0x1a, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0xd2, 0x03,
31361 +  0x22, 0xd2, 0x15, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0, 0x12, 0x0d, 0xf9, 0xd2, 0xe8}},
31362 + {0x0846, 64, { 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74,
31363 +  0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf,
31364 +  0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0x74, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0x16, 0x12, 0x0d,
31365 +  0x24, 0xc2, 0x02, 0xe4, 0xf5, 0x28, 0xf5, 0x30, 0xc2, 0x09, 0xf5, 0x23, 0xc2, 0x03, 0x90}},
31366 + {0x0886, 64, { 0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x34, 0x60, 0x48, 0x30, 0x03, 0x05, 0xd2, 0x16,
31367 +  0x12, 0x00, 0x46, 0xe5, 0x0f, 0x60, 0x22, 0xe5, 0x26, 0x60, 0x16, 0x15, 0x26, 0x90, 0x7f, 0xd8,
31368 +  0xe0, 0x30, 0xe6, 0x04, 0x7f, 0x20, 0x80, 0x02, 0x7f, 0x30, 0x90, 0x7f, 0x96, 0xef, 0xf0, 0x80,
31369 +  0x1a, 0x90, 0x7f, 0x96, 0x74, 0x30, 0xf0, 0x80, 0x12, 0x90, 0x7f, 0xd9, 0xe0, 0x30, 0xe2}},
31370 + {0x08c6, 64, { 0x04, 0x7f, 0x30, 0x80, 0x02, 0x7f, 0x20, 0x90, 0x7f, 0x96, 0xef, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0xf5,
31371 +  0x34, 0x80, 0x20, 0x30, 0x03, 0x07, 0xc2, 0x16, 0x12, 0x00, 0x46, 0x80, 0x16, 0xe5, 0x0f, 0x70,
31372 +  0x12, 0x90, 0x7f, 0xd9, 0xe0, 0x30, 0xe2, 0x04, 0x7f, 0x30, 0x80, 0x02, 0x7f, 0x20, 0x90, 0x7f,
31373 +  0x96, 0xef, 0xf0, 0x30, 0x02, 0x07, 0xc2, 0x02, 0x12, 0x05, 0x2a, 0x80, 0x86, 0x30, 0x0a}},
31374 + {0x0906, 64, { 0x83, 0xc2, 0x0a, 0x12, 0x0b, 0x5d, 0x02, 0x08, 0x8a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf,
31375 +  0x24, 0xe5, 0x2a, 0xf5, 0x82, 0xe5, 0x29, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00,
31376 +  0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f,
31377 +  0x98, 0x74, 0x10, 0xf0, 0xaf, 0x24, 0xe5, 0x2a, 0xf5, 0x82, 0xe5, 0x29, 0xf5, 0x83, 0xc2}},
31378 + {0x0946, 64, { 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86,
31379 +  0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x24, 0xe5, 0x2a, 0xf5, 0x82, 0xe5,
31380 +  0x29, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86,
31381 +  0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf}},
31382 + {0x0986, 64, { 0x24, 0xe5, 0x2a, 0xf5, 0x82, 0xe5, 0x29, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0,
31383 +  0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5,
31384 +  0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f,
31385 +  0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x78}},
31386 + {0x09c6, 64, { 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x39, 0x02, 0x0a, 0x0c, 0x02, 0x08, 0x38, 0xe4, 0x93, 0xa3,
31387 +  0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4,
31388 +  0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8,
31389 +  0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02}},
31390 + {0x0a06, 64, { 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x0d, 0x8b, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff,
31391 +  0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54,
31392 +  0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4,
31393 +  0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82}},
31394 + {0x0a46, 64, { 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a,
31395 +  0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83,
31396 +  0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83,
31397 +  0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25}},
31398 + {0x0a86, 64, { 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22,
31399 +  0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01,
31400 +  0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d,
31401 +  0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02}},
31402 + {0x0ac6, 64, { 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c,
31403 +  0x74, 0x20, 0xf0, 0x30, 0x01, 0x03, 0xff, 0x80, 0x02, 0x7f, 0x00, 0x90, 0x7f, 0x96, 0xef, 0xf0,
31404 +  0xe4, 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0,
31405 +  0x30, 0x08, 0x11, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0xff, 0xf0, 0x90, 0x7f}},
31406 + {0x0b06, 64, { 0x98, 0x74, 0x20, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0xdf, 0xf0, 0xe4,
31407 +  0x90, 0x7f, 0x98, 0xf0, 0x22, 0x8f, 0x35, 0xe4, 0xf5, 0x36, 0x75, 0x37, 0xff, 0x75, 0x38, 0x19,
31408 +  0x75, 0x39, 0x86, 0xab, 0x37, 0xaa, 0x38, 0xa9, 0x39, 0x90, 0x00, 0x01, 0x12, 0x0a, 0x6a, 0xb4,
31409 +  0x03, 0x1d, 0xaf, 0x36, 0x05, 0x36, 0xef, 0xb5, 0x35, 0x01, 0x22, 0x12, 0x0a, 0x51, 0x7e}},
31410 + {0x0b46, 64, { 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x37, 0xff, 0xf5, 0x38, 0x89, 0x39, 0x80, 0xd4, 0x7b,
31411 +  0x00, 0x7a, 0x00, 0x79, 0x00, 0x22, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x35, 0x12, 0x0a, 0xcf, 0x20,
31412 +  0x08, 0x07, 0x90, 0x7f, 0x92, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0,
31413 +  0x12, 0x09, 0xb5, 0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0x0e, 0x30, 0x01, 0x05, 0x12, 0x0d}},
31414 + {0x0b86, 64, { 0xbc, 0x80, 0x06, 0x12, 0x0d, 0x49, 0xef, 0x60, 0xe1, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0, 0x12,
31415 +  0x07, 0x48, 0x22, 0x05, 0x2a, 0xe5, 0x2a, 0xae, 0x29, 0x70, 0x02, 0x05, 0x29, 0x14, 0xf5, 0x82,
31416 +  0x8e, 0x83, 0xe5, 0x11, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x2a, 0xe5, 0x2a, 0xac, 0x29, 0x70, 0x02,
31417 +  0x05, 0x29, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x24, 0xe5, 0x24, 0x60, 0x07}},
31418 + {0x0bc6, 64, { 0x12, 0x0e, 0x1b, 0x8f, 0x11, 0x80, 0xcd, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0,
31419 +  0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x02, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01,
31420 +  0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0,
31421 +  0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x0a}},
31422 + {0x0c06, 64, { 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82,
31423 +  0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
31424 +  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
31425 +  0x13, 0xf0, 0xe5, 0x19, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74}},
31426 + {0x0c46, 64, { 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00,
31427 +  0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x19, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
31428 +  0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98,
31429 +  0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5}},
31430 + {0x0c86, 64, { 0x19, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00,
31431 +  0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
31432 +  0x98, 0x74, 0x13, 0xf0, 0xe5, 0x19, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98,
31433 +  0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0}},
31434 + {0x0cc6, 64, { 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x19, 0x54, 0x7f, 0x90, 0xc0,
31435 +  0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x19, 0x54, 0x7f, 0x90, 0xc0, 0x00,
31436 +  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
31437 +  0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x0d, 0xea, 0x8f, 0x37, 0x12, 0x0d}},
31438 + {0x0d06, 64, { 0xea, 0x8f, 0x38, 0xe5, 0x37, 0x65, 0x38, 0x60, 0x12, 0x12, 0x0d, 0xea, 0x8f, 0x37, 0xe5, 0x37, 0x65,
31439 +  0x38, 0x60, 0x07, 0x12, 0x0d, 0xea, 0x8f, 0x38, 0x80, 0xe8, 0xaf, 0x37, 0x22, 0x90, 0x7f, 0xd6,
31440 +  0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x16, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f,
31441 +  0xf4, 0x7e, 0x01, 0x12, 0x0d, 0xa5, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44}},
31442 + {0x0d46, 64, { 0x04, 0xf0, 0x22, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x36, 0x12, 0x07, 0x48, 0x12, 0x0e, 0x27, 0xef, 0x30,
31443 +  0xe6, 0x0b, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x36, 0x60, 0xf1, 0x7f, 0x01, 0x22, 0x12, 0x0a, 0xcf,
31444 +  0x7f, 0x00, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x16, 0x54, 0x7f, 0xfd, 0x12, 0x0c, 0xda, 0x90,
31445 +  0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x16, 0x44, 0x80}},
31446 + {0x0d86, 64, { 0xfd, 0x12, 0x0c, 0xda, 0x22, 0x05, 0x2b, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x31, 0x03, 0x00, 0x00,
31447 +  0xc1, 0x86, 0xc1, 0x02, 0xc1, 0x0a, 0xc1, 0x01, 0xc1, 0x07, 0x01, 0x27, 0x00, 0x00, 0x8e, 0x36,
31448 +  0x8f, 0x37, 0xe5, 0x37, 0x15, 0x37, 0xae, 0x36, 0x70, 0x02, 0x15, 0x36, 0x4e, 0x60, 0x05, 0x12,
31449 +  0x09, 0xa4, 0x80, 0xee, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x0d, 0x7e}},
31450 + {0x0dc6, 64, { 0x00, 0x12, 0x0d, 0xa5, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x11,
31451 +  0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00,
31452 +  0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0xd2,
31453 +  0x01, 0x22, 0xc2, 0x01, 0x22, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0b, 0xce, 0x00, 0x02, 0x0e}},
31454 + {0x0e06, 64, { 0x04, 0x00, 0x02, 0x00, 0x03, 0x00, 0x02, 0x0b, 0xf5, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0,
31455 +  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
31456 +  0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x00, 0x00, 0x00, 0x00,
31457 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31458 + {0x0e46, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31459 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31460 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31461 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31462 + {0x0e86, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31463 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31464 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31465 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31466 + {0x0ec6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31467 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31468 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31469 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31470 + {0x0f06, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31471 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31472 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31473 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31474 + {0x0f46, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31475 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31476 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31477 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31478 + {0x0f86, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31479 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31480 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31481 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31482 + {0x0fc6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31483 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31484 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31485 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31486 + {0x1006, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31487 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31488 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31489 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31490 + {0x1046, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31491 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31492 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31493 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31494 + {0x1086, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31495 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31496 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31497 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31498 + {0x10c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31499 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31500 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31501 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31502 + {0x1106, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31503 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31504 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31505 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31506 + {0x1146, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31507 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31508 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31509 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31510 + {0x1186, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31511 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31512 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31513 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31514 + {0x11c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31515 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31516 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31517 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31518 + {0x1206, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31519 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31520 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31521 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31522 + {0x1246, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31523 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31524 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31525 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31526 + {0x1286, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31527 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31528 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31529 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31530 + {0x12c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31531 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31532 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31533 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31534 + {0x1306, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31535 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31536 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31537 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31538 + {0x1346, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31539 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31540 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31541 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31542 + {0x1386, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31543 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31544 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31545 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31546 + {0x13c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31547 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31548 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31549 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31550 + {0x1406, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31551 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31552 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31553 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31554 + {0x1446, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31555 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31556 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31557 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31558 + {0x1486, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31559 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31560 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31561 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31562 + {0x14c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31563 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31564 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31565 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31566 + {0x1506, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31567 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31568 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31569 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31570 + {0x1546, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31571 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31572 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31573 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31574 + {0x1586, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31575 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31576 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31577 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31578 + {0x15c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31579 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31580 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31581 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31582 + {0x1606, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31583 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31584 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31585 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31586 + {0x1646, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31587 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31588 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31589 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31590 + {0x1686, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31591 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31592 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31593 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31594 + {0x16c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31595 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31596 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31597 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31598 + {0x1706, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31599 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31600 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31601 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31602 + {0x1746, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31603 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31604 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31605 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31606 + {0x1786, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31607 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31608 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31609 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31610 + {0x17c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31611 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31612 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31613 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31614 + {0x1806, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31615 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31616 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31617 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31618 + {0x1846, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31619 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31620 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31621 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31622 + {0x1886, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31623 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31624 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31625 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
31626 + {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31627 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31628 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31629 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
31630 + {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x19, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
31631 +  0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
31632 +  0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
31633 +  0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x05, 0x02, 0x40, 0x00}},
31634 + {0x1946, 64, { 0x00, 0x07, 0x05, 0x06, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05,
31635 +  0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x83, 0x02,
31636 +  0x40, 0x00, 0x01, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
31637 +  0x01, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x01}},
31638 + {0x1986, 64, { 0x04, 0x03, 0x09, 0x04, 0x48, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61,
31639 +  0x00, 0x6e, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x61, 0x00, 0x20, 0x00, 0x64, 0x00, 0x69, 0x00, 0x76,
31640 +  0x00, 0x69, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x6f, 0x00, 0x66,
31641 +  0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x53, 0x00, 0x79, 0x00}},
31642 + {0x19c6, 64, { 0x73, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x2e, 0x00, 0x36, 0x03, 0x4b, 0x00, 0x65,
31643 +  0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x55, 0x00, 0x53,
31644 +  0x00, 0x42, 0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c,
31645 +  0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
31646 + {0x1a06,  4, { 0x72, 0x00, 0x00, 0x00}},
31647 + {0xffff, 0,   {0x00}}
31648 +};
31649 diff -Nur linux-2.4.19.org/drivers/usb/serial/keyspan_usa19w_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa19w_fw.h
31650 --- linux-2.4.19.org/drivers/usb/serial/keyspan_usa19w_fw.h     Wed Oct 10 00:15:02 2001
31651 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa19w_fw.h Thu Oct 31 08:11:24 2002
31652 @@ -1,108 +1,112 @@
31653  /* keyspan_usa19w_fw.h
31654 -  
31655 -   Generated from Keyspan firmware image usa17code.h Sat Oct  6 12:13:03 EST 2001
31656 -   This firmware is for the Keyspan USA-19W Serial Adaptor
31657  
31658 -   "The firmware contained herein as keyspan_usa19w_fw.h is
31659 -   Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
31660 -   ("Keyspan"), as an unpublished work.  This notice does not imply
31661 -   unrestricted or public access to this firmware which is a trade secret of
31662 -   Keyspan, and which may not be reproduced, used, sold or transferred to any
31663 -   third party without Keyspan's prior written consent.  All Rights Reserved.
31664 +       The firmware contained herein as keyspan_usa19w_fw.h is
31665  
31666 -   This firmware may not be modified and may only be used with the Keyspan 
31667 -   USA-19W Serial Adapter.  Distribution and/or Modification of the
31668 -   keyspan.c driver which includes this firmware, in whole or in part,
31669 -   requires the inclusion of this statement."
31670 +               Copyright (C) 1999-2001
31671 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
31672 +               
31673 +       as an unpublished work. This notice does not imply unrestricted or
31674 +       public access to the source code from which this firmware image is
31675 +       derived.  Except as noted below this firmware image may not be 
31676 +       reproduced, used, sold or transferred to any third party without 
31677 +       Keyspan's prior written consent.  All Rights Reserved.
31678  
31679 +       Permission is hereby granted for the distribution of this firmware 
31680 +       image as part of a Linux or other Open Source operating system kernel 
31681 +       in text or binary form as required. 
31682 +
31683 +       This firmware may not be modified and may only be used with  
31684 +       Keyspan hardware.  Distribution and/or Modification of the 
31685 +       keyspan.c driver which includes this firmware, in whole or in 
31686 +       part, requires the inclusion of this statement."
31687  */
31688  
31689  static const struct ezusb_hex_record keyspan_usa19w_firmware[] = {
31690 - {0x0033,  3, { 0x02, 0x0d, 0x6c}},
31691 + {0x0033,  3, { 0x02, 0x0d, 0x5c}},
31692   {0x0003, 16, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0}},
31693   {0x0013, 16, { 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90}},
31694   {0x0023, 15, { 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x17, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22}},
31695 - {0x0046, 16, { 0x30, 0x0f, 0x18, 0x12, 0x0d, 0x48, 0xef, 0xc3, 0x95, 0x14, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
31696 + {0x0046, 16, { 0x30, 0x0f, 0x18, 0x12, 0x0d, 0x38, 0xef, 0xc3, 0x95, 0x14, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
31697   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x0f, 0xc2, 0x0a, 0x80, 0x77, 0x30, 0x0c, 0x3b, 0x90, 0x7f}},
31698 - {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x0d, 0x48, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
31699 + {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x0d, 0x38, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
31700   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x0f, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x1c, 0x20, 0x0a, 0x11, 0x60}},
31701 - {0x0086, 16, { 0x0f, 0xf5, 0x23, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x27, 0x7e, 0x75, 0x28, 0x41, 0x12, 0x08, 0x05}},
31702 + {0x0086, 16, { 0x0f, 0xf5, 0x23, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x27, 0x7e, 0x75, 0x28, 0x41, 0x12, 0x08, 0x01}},
31703   {0x0096, 16, { 0xc2, 0x0c, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
31704 - {0x00a6, 16, { 0x12, 0x0d, 0x48, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0f}},
31705 + {0x00a6, 16, { 0x12, 0x0d, 0x38, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0f}},
31706   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x1c, 0x20, 0x0a, 0x11, 0x60, 0x0f, 0xf5, 0x23, 0x7e, 0x7d}},
31707 - {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x27, 0x7d, 0x75, 0x28, 0xc1, 0x12, 0x08, 0x05, 0xd2, 0x0c, 0xe4, 0x90, 0x7f}},
31708 - {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x60, 0x53, 0x11, 0x80, 0x12}},
31709 - {0x00e6, 16, { 0x0d, 0x54, 0xef, 0x42, 0x11, 0x12, 0x0c, 0x51, 0x8f, 0x1c, 0xef, 0xc3, 0x95, 0x13, 0x50, 0x0f}},
31710 - {0x00f6, 16, { 0x12, 0x0d, 0x30, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x11, 0x20, 0xe7, 0x03, 0x30, 0x12, 0x5b, 0xc2}},
31711 + {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x27, 0x7d, 0x75, 0x28, 0xc1, 0x12, 0x08, 0x01, 0xd2, 0x0c, 0xe4, 0x90, 0x7f}},
31712 + {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x5e, 0x12, 0x0c, 0x41, 0x8f}},
31713 + {0x00e6, 16, { 0x1c, 0x12, 0x0d, 0x44, 0x8f, 0x11, 0xe5, 0x1c, 0xc3, 0x95, 0x13, 0x50, 0x0f, 0x12, 0x0d, 0x20}},
31714 + {0x00f6, 16, { 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x11, 0x20, 0xe7, 0x03, 0x30, 0x12, 0x5c, 0xc2, 0x12, 0xe5, 0x1c}},
31715   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
31716   {0x0043,  3, { 0x02, 0x0e, 0x00}},
31717 - {0x0000,  3, { 0x02, 0x08, 0xba}},
31718 - {0x0106, 64, { 0x12, 0xe5, 0x1c, 0x70, 0x04, 0xf5, 0x11, 0x80, 0x51, 0xe5, 0x11, 0x30, 0xe7, 0x26, 0xe5, 0x1c, 0xd3,
31719 -  0x94, 0x20, 0x40, 0x03, 0x75, 0x1c, 0x20, 0x85, 0x1c, 0x23, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x27,
31720 -  0x7e, 0x75, 0x28, 0x80, 0xaf, 0x11, 0x12, 0x0a, 0x8a, 0xe5, 0x1c, 0x25, 0xe0, 0x90, 0x7f, 0xb7,
31721 -  0xf0, 0x80, 0x26, 0xe5, 0x1c, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x1c, 0x3f, 0x85, 0x1c}},
31722 - {0x0146, 64, { 0x23, 0xe4, 0x90, 0x7e, 0x80, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x27, 0x7e, 0x75, 0x28, 0x81, 0x12,
31723 -  0x08, 0x2a, 0xe5, 0x1c, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06,
31724 -  0x20, 0x0d, 0x03, 0x02, 0x03, 0xba, 0xe4, 0xf5, 0x1b, 0x74, 0x40, 0x25, 0x1b, 0xf5, 0x82, 0xe4,
31725 -  0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x1b, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79}},
31726 - {0x0186, 64, { 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0a, 0x11, 0x05, 0x1b, 0xe5, 0x1b, 0xb4,
31727 -  0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x6e, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12,
31728 -  0x0c, 0x2c, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x0b, 0x6e, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12,
31729 -  0x0b, 0x94, 0xd2, 0x10, 0xd2, 0x11, 0x75, 0x1c, 0x04, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x05}},
31730 - {0x01c6, 64, { 0xc2, 0x11, 0x43, 0x1c, 0xc0, 0x90, 0x7e, 0x04, 0xe0, 0xb4, 0x01, 0x07, 0xc2, 0x11, 0x43, 0x1c, 0x0b,
31731 -  0x80, 0x10, 0x90, 0x7e, 0x04, 0xe0, 0x60, 0x07, 0xc2, 0x10, 0x43, 0x1c, 0x09, 0x80, 0x03, 0x43,
31732 -  0x1c, 0x02, 0x7f, 0x03, 0xad, 0x1c, 0x12, 0x0c, 0x2c, 0x43, 0x19, 0x80, 0x90, 0x7f, 0x98, 0x74,
31733 -  0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5}},
31734 - {0x0206, 64, { 0x16, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f,
31735 -  0xf5, 0x18, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x18, 0xf0, 0x90, 0x7e,
31736 -  0x07, 0xe0, 0x60, 0x42, 0x90, 0x7e, 0x13, 0xe0, 0x60, 0x05, 0x43, 0x15, 0x04, 0x80, 0x03, 0x53,
31737 -  0x15, 0xfb, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c, 0x2c, 0x90, 0x7e, 0x08, 0xe0, 0x60, 0x05}},
31738 - {0x0246, 64, { 0x43, 0x17, 0x80, 0x80, 0x03, 0x53, 0x17, 0x7f, 0x53, 0x17, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11,
31739 -  0x43, 0x17, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x0b, 0xe0, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x0c,
31740 -  0x06, 0xaf, 0x17, 0x12, 0x0b, 0xba, 0x90, 0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05,
31741 -  0x43, 0x19, 0x01, 0x80, 0x03, 0x53, 0x19, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90}},
31742 - {0x0286, 64, { 0xc0, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7e, 0x0c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x19,
31743 -  0x02, 0x80, 0x03, 0x53, 0x19, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5,
31744 -  0x19, 0xf0, 0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x13, 0xa3, 0xe0, 0x13, 0x92, 0x13, 0xa3, 0xe0, 0xf5,
31745 -  0x14, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x19, 0x10, 0x80, 0x03, 0x53, 0x19, 0xef, 0x90, 0x7f}},
31746 - {0x02c6, 64, { 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53,
31747 -  0x18, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
31748 -  0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x12, 0x0d, 0x24, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0,
31749 -  0x53, 0x15, 0xfd, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c, 0x2c, 0xe4, 0xf5, 0x0e, 0xf5, 0x0d}},
31750 - {0x0306, 64, { 0xd2, 0x0e, 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43, 0x15, 0x02, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c,
31751 -  0x2c, 0x75, 0x0d, 0x01, 0xd2, 0x0e, 0x90, 0x7e, 0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74,
31752 -  0x12, 0xf0, 0xe5, 0x16, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x0a, 0x90, 0x7e, 0x19, 0xe0,
31753 -  0x60, 0x11, 0x43, 0x18, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f}},
31754 - {0x0346, 64, { 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x15, 0xfe, 0xe4, 0xff, 0xad, 0x15,
31755 -  0x12, 0x0c, 0x2c, 0x75, 0x0f, 0x01, 0xd2, 0x0e, 0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x15,
31756 -  0x01, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c, 0x2c, 0xe4, 0xf5, 0x0f, 0xd2, 0x0e, 0x90, 0x7e, 0x1c,
31757 -  0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x16, 0x44, 0x02, 0x90, 0xc0}},
31758 - {0x0386, 64, { 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x12, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75,
31759 -  0x10, 0x01, 0xe4, 0xf5, 0x12, 0xd2, 0x0e, 0x90, 0x7e, 0x1f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7,
31760 -  0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35, 0xf0, 0xc2, 0x0d, 0xe4, 0x90,
31761 + {0x0000,  3, { 0x02, 0x08, 0xb6}},
31762 + {0x0106, 64, { 0x60, 0x56, 0xb4, 0x80, 0x03, 0x43, 0x11, 0x02, 0xe5, 0x11, 0x30, 0xe7, 0x24, 0xe5, 0x1c, 0xd3, 0x94,
31763 +  0x20, 0x40, 0x03, 0x75, 0x1c, 0x20, 0x85, 0x1c, 0x23, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x27, 0x7e,
31764 +  0x75, 0x28, 0x80, 0x12, 0x0a, 0x86, 0xe5, 0x1c, 0x25, 0x1c, 0x90, 0x7f, 0xb7, 0xf0, 0x80, 0x27,
31765 +  0xe5, 0x1c, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x1c, 0x3f, 0x85, 0x1c, 0x23, 0x90, 0x7e}},
31766 + {0x0146, 64, { 0x80, 0xe5, 0x11, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x27, 0x7e, 0x75, 0x28, 0x81, 0x12, 0x08, 0x26,
31767 +  0xe5, 0x1c, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x0d,
31768 +  0x03, 0x02, 0x03, 0xba, 0xe4, 0xf5, 0x1b, 0x74, 0x40, 0x25, 0x1b, 0xf5, 0x82, 0xe4, 0x34, 0x7c,
31769 +  0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x1b, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x00, 0x24}},
31770 + {0x0186, 64, { 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0a, 0x0d, 0x05, 0x1b, 0xe5, 0x1b, 0xb4, 0x20, 0xd7,
31771 +  0x90, 0x7e, 0x00, 0xe0, 0x60, 0x6e, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12, 0x0c, 0x1c,
31772 +  0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x0b, 0x5e, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12, 0x0b, 0x84,
31773 +  0xd2, 0x10, 0xd2, 0x11, 0x75, 0x1c, 0x04, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x05, 0xc2, 0x11}},
31774 + {0x01c6, 64, { 0x43, 0x1c, 0xc0, 0x90, 0x7e, 0x04, 0xe0, 0xb4, 0x01, 0x07, 0xc2, 0x11, 0x43, 0x1c, 0x0b, 0x80, 0x10,
31775 +  0x90, 0x7e, 0x04, 0xe0, 0x60, 0x07, 0xc2, 0x10, 0x43, 0x1c, 0x09, 0x80, 0x03, 0x43, 0x1c, 0x02,
31776 +  0x7f, 0x03, 0xad, 0x1c, 0x12, 0x0c, 0x1c, 0x43, 0x19, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
31777 +  0x90, 0xc0, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x16, 0x44}},
31778 + {0x0206, 64, { 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x18,
31779 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x18, 0xf0, 0x90, 0x7e, 0x07, 0xe0,
31780 +  0x60, 0x42, 0x90, 0x7e, 0x13, 0xe0, 0x60, 0x05, 0x43, 0x15, 0x04, 0x80, 0x03, 0x53, 0x15, 0xfb,
31781 +  0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c, 0x1c, 0x90, 0x7e, 0x08, 0xe0, 0x60, 0x05, 0x43, 0x17}},
31782 + {0x0246, 64, { 0x80, 0x80, 0x03, 0x53, 0x17, 0x7f, 0x53, 0x17, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x17,
31783 +  0x02, 0xa3, 0xe0, 0xff, 0x12, 0x0b, 0xd0, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x0b, 0xf6, 0xaf,
31784 +  0x17, 0x12, 0x0b, 0xaa, 0x90, 0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x19,
31785 +  0x01, 0x80, 0x03, 0x53, 0x19, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00}},
31786 + {0x0286, 64, { 0xe5, 0x19, 0xf0, 0x90, 0x7e, 0x0c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x19, 0x02, 0x80,
31787 +  0x03, 0x53, 0x19, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x19, 0xf0,
31788 +  0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x13, 0xa3, 0xe0, 0x13, 0x92, 0x13, 0xa3, 0xe0, 0xf5, 0x14, 0xa3,
31789 +  0xe0, 0x60, 0x05, 0x43, 0x19, 0x10, 0x80, 0x03, 0x53, 0x19, 0xef, 0x90, 0x7f, 0x98, 0x74}},
31790 + {0x02c6, 64, { 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x18, 0xbf,
31791 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f,
31792 +  0x98, 0x74, 0x11, 0xf0, 0x12, 0x0d, 0x14, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x15,
31793 +  0xfd, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c, 0x1c, 0xe4, 0xf5, 0x0e, 0xf5, 0x0d, 0xd2, 0x0e}},
31794 + {0x0306, 64, { 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43, 0x15, 0x02, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c, 0x1c, 0x75,
31795 +  0x0d, 0x01, 0xd2, 0x0e, 0x90, 0x7e, 0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0,
31796 +  0xe5, 0x16, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x0a, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11,
31797 +  0x43, 0x18, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0}},
31798 + {0x0346, 64, { 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x15, 0xfe, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c,
31799 +  0x1c, 0x75, 0x0f, 0x01, 0xd2, 0x0e, 0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x15, 0x01, 0xe4,
31800 +  0xff, 0xad, 0x15, 0x12, 0x0c, 0x1c, 0xe4, 0xf5, 0x0f, 0xd2, 0x0e, 0x90, 0x7e, 0x1c, 0xe0, 0x60,
31801 +  0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x16, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0}},
31802 + {0x0386, 64, { 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x12, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x10, 0x01,
31803 +  0xe4, 0xf5, 0x12, 0xd2, 0x0e, 0x90, 0x7e, 0x1f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x11,
31804 +  0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35, 0xf0, 0xd2, 0x0c, 0xc2, 0x0d, 0xe4, 0x90,
31805    0x7f, 0xcf, 0xf0, 0x30, 0x15, 0x71, 0xe5, 0x12, 0x60, 0x02, 0x15, 0x12, 0xe5, 0x2e, 0xd3}},
31806 - {0x03c6, 64, { 0x94, 0x00, 0x40, 0x04, 0x15, 0x2e, 0x80, 0x60, 0x75, 0x2e, 0x0a, 0x12, 0x0d, 0x24, 0xef, 0x54, 0x01,
31807 -  0xf5, 0x1c, 0x65, 0x0e, 0x60, 0x07, 0x85, 0x1c, 0x0e, 0xd2, 0x0e, 0x80, 0x11, 0x12, 0x0d, 0x60,
31808 + {0x03c6, 64, { 0x94, 0x00, 0x40, 0x04, 0x15, 0x2e, 0x80, 0x60, 0x75, 0x2e, 0x0a, 0x12, 0x0d, 0x14, 0xef, 0x54, 0x01,
31809 +  0xf5, 0x1c, 0x65, 0x0e, 0x60, 0x07, 0x85, 0x1c, 0x0e, 0xd2, 0x0e, 0x80, 0x11, 0x12, 0x0d, 0x50,
31810    0xef, 0x54, 0x10, 0xf5, 0x1c, 0x65, 0x09, 0x60, 0x05, 0x85, 0x1c, 0x09, 0xd2, 0x0e, 0x12, 0x0d,
31811 -  0x60, 0xef, 0x54, 0x80, 0xf5, 0x1c, 0x65, 0x0a, 0x60, 0x05, 0x85, 0x1c, 0x0a, 0xd2, 0x0e}},
31812 - {0x0406, 64, { 0x12, 0x0d, 0x60, 0xef, 0x54, 0x20, 0xf5, 0x1c, 0x65, 0x0b, 0x60, 0x08, 0x85, 0x1c, 0x0b, 0x30, 0x10,
31813 -  0x02, 0xd2, 0x0e, 0x12, 0x0d, 0x60, 0xef, 0x54, 0x40, 0xf5, 0x1c, 0x65, 0x0c, 0x60, 0x08, 0x85,
31814 +  0x50, 0xef, 0x54, 0x80, 0xf5, 0x1c, 0x65, 0x0a, 0x60, 0x05, 0x85, 0x1c, 0x0a, 0xd2, 0x0e}},
31815 + {0x0406, 64, { 0x12, 0x0d, 0x50, 0xef, 0x54, 0x20, 0xf5, 0x1c, 0x65, 0x0b, 0x60, 0x08, 0x85, 0x1c, 0x0b, 0x30, 0x10,
31816 +  0x02, 0xd2, 0x0e, 0x12, 0x0d, 0x50, 0xef, 0x54, 0x40, 0xf5, 0x1c, 0x65, 0x0c, 0x60, 0x08, 0x85,
31817    0x1c, 0x0c, 0x30, 0x11, 0x02, 0xd2, 0x0e, 0x30, 0x15, 0x2a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1,
31818    0x23, 0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5, 0x30, 0x90, 0x7b, 0x42, 0xe0, 0xf5}},
31819   {0x0446, 64, { 0x31, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4,
31820    0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x05, 0x1f, 0xe5, 0x25,
31821    0x70, 0x40, 0x30, 0x0e, 0x39, 0xe5, 0x12, 0x70, 0x35, 0xc2, 0x0e, 0xf5, 0x1b, 0x7e, 0x00, 0x7b,
31822 -  0x00, 0x74, 0x08, 0x25, 0x1b, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x09, 0xcb, 0xff, 0x74}},
31823 +  0x00, 0x74, 0x08, 0x25, 0x1b, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x09, 0xc7, 0xff, 0x74}},
31824   {0x0486, 64, { 0x80, 0x25, 0x1b, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x1b, 0xe5, 0x1b, 0xb4,
31825    0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x12, 0x10, 0xe4, 0xf5, 0x10, 0x75, 0x25,
31826    0x02, 0x22, 0xe5, 0x25, 0x64, 0x02, 0x70, 0x36, 0x30, 0x05, 0x2f, 0xc2, 0x05, 0xf5, 0x1b, 0x7e,
31827 -  0x00, 0x7b, 0x00, 0x74, 0x29, 0x25, 0x1b, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x09, 0xcb}},
31828 +  0x00, 0x7b, 0x00, 0x74, 0x29, 0x25, 0x1b, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x09, 0xc7}},
31829   {0x04c6, 64, { 0xff, 0x74, 0x80, 0x25, 0x1b, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x1b, 0xe5,
31830    0x1b, 0xb4, 0x05, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x25, 0x03, 0x22, 0xe5, 0x30,
31831    0x60, 0x33, 0x75, 0x2f, 0x03, 0x15, 0x30, 0xe4, 0xf5, 0x1b, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2f,
31832 -  0x25, 0x1b, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x09, 0xcb, 0xff, 0x74, 0x80, 0x25, 0x1b}},
31833 +  0x25, 0x1b, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x09, 0xc7, 0xff, 0x74, 0x80, 0x25, 0x1b}},
31834   {0x0506, 64, { 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x1b, 0xe5, 0x1b, 0xb4, 0x03, 0xdb, 0x90,
31835 -  0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x25, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0a, 0x23,
31836 +  0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x25, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0a, 0x1f,
31837    0x05, 0xf6, 0x00, 0x06, 0x6a, 0x01, 0x06, 0xd7, 0x03, 0x05, 0x43, 0x06, 0x05, 0xe9, 0x08, 0x05,
31838    0xe3, 0x09, 0x05, 0xcb, 0x0a, 0x05, 0xda, 0x0b, 0x00, 0x00, 0x07, 0x27, 0x90, 0x7f, 0xeb}},
31839   {0x0546, 64, { 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x50, 0x24, 0x02, 0x70, 0x6f, 0x74, 0x19, 0x90, 0x7f, 0xd4,
31840 @@ -110,7 +114,7 @@
31841    0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82,
31842    0x74, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea}},
31843   {0x0586, 64, { 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12,
31844 -  0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0a, 0x49, 0xea,
31845 +  0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0a, 0x45, 0xea,
31846    0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x07, 0x2e,
31847    0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xb4, 0xe0, 0x44}},
31848   {0x05c6, 64, { 0x01, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0x00, 0xe5, 0x24, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0,
31849 @@ -124,14 +128,14 @@
31850   {0x0646, 64, { 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0,
31851    0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0,
31852    0x02, 0x07, 0x2e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1e, 0x24, 0x02, 0x60, 0x03, 0x02,
31853 -  0x07, 0x2e, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x06, 0x12, 0x0d, 0x73, 0x02, 0x07, 0x2e}},
31854 +  0x07, 0x2e, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x06, 0x12, 0x0d, 0x63, 0x02, 0x07, 0x2e}},
31855   {0x0686, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90,
31856    0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25,
31857    0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0,
31858    0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f}},
31859   {0x06c6, 64, { 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x60, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x57,
31860    0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x24, 0x02, 0x70, 0x4b, 0x90, 0x7f, 0xea, 0xe0,
31861 -  0xb4, 0x01, 0x05, 0x12, 0x0d, 0x70, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
31862 +  0xb4, 0x01, 0x05, 0x12, 0x0d, 0x60, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
31863    0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff}},
31864   {0x0706, 64, { 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f,
31865    0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07,
31866 @@ -140,102 +144,102 @@
31867   {0x0746, 64, { 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18,
31868    0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5,
31869    0x08, 0x7f, 0x01, 0x7b, 0x00, 0x74, 0x08, 0x2f, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0a,
31870 -  0x11, 0x0f, 0xbf, 0x09, 0xee, 0x75, 0x13, 0x01, 0xe4, 0xf5, 0x12, 0xf5, 0x2e, 0xf5, 0x11}},
31871 - {0x0786, 64, { 0xc2, 0x0e, 0xc2, 0x12, 0xc2, 0x0d, 0xc2, 0x0a, 0xc2, 0x0f, 0xc2, 0x04, 0xd2, 0x0c, 0xd2, 0x0b, 0x90,
31872 -  0x7f, 0x98, 0x74, 0x13, 0xf0, 0x75, 0x18, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c,
31873 -  0xe4, 0xfd, 0x12, 0x0c, 0x2c, 0x7f, 0x10, 0x8f, 0x17, 0x12, 0x0b, 0xba, 0x90, 0x7f, 0x98, 0x74,
31874 -  0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x16, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f}},
31875 - {0x07c6, 64, { 0x98, 0x74, 0x14, 0xf0, 0x75, 0x19, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12,
31876 -  0x0c, 0x2c, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x15, 0x12, 0x0c, 0x2c, 0x90, 0x7f, 0x98,
31877 -  0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x0c, 0x2c, 0x7f,
31878 -  0x01, 0x12, 0x0c, 0xbc, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x0c, 0x2c, 0xd2, 0x03, 0x22, 0x90}},
31879 - {0x0806, 64, { 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x23, 0xe5, 0x28, 0xf5, 0x82, 0xe5, 0x27, 0xf5, 0x83, 0xc2, 0xaf,
31880 -  0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7,
31881 -  0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x23, 0xe5, 0x28, 0xf5, 0x82, 0xe5,
31882 -  0x27, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3}},
31883 - {0x0846, 64, { 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x23,
31884 -  0xe5, 0x28, 0xf5, 0x82, 0xe5, 0x27, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05,
31885 -  0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98,
31886 -  0x74, 0x08, 0xf0, 0xaf, 0x23, 0xe5, 0x28, 0xf5, 0x82, 0xe5, 0x27, 0xf5, 0x83, 0xc2, 0xaf}},
31887 - {0x0886, 64, { 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2,
31888 -  0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83,
31889 -  0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00,
31890 -  0x00, 0x00, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x31, 0x02, 0x09, 0x01}},
31891 - {0x08c6, 64, { 0x02, 0x09, 0x46, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08,
31892 -  0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4,
31893 -  0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4,
31894 -  0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x0c, 0xdd, 0xe4, 0x7e}},
31895 - {0x0906, 64, { 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3,
31896 -  0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa,
31897 -  0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0,
31898 -  0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe}},
31899 - {0x0946, 64, { 0xd2, 0x14, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0, 0x12, 0x0d, 0x73, 0xd2, 0xe8, 0x43, 0xd8, 0x20,
31900 -  0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0,
31901 -  0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44,
31902 -  0x01, 0xf0, 0x90, 0x7f, 0xae, 0x74, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0x15, 0x12, 0x0c, 0x76}},
31903 - {0x0986, 64, { 0xc2, 0x02, 0xe4, 0xf5, 0x26, 0xf5, 0x2e, 0xc2, 0x08, 0xc2, 0x03, 0x90, 0x7f, 0xa1, 0x04, 0xf0, 0x90,
31904 -  0x7f, 0xd8, 0xe0, 0x65, 0x1a, 0x60, 0x10, 0x30, 0x03, 0x05, 0xd2, 0x15, 0x12, 0x00, 0x46, 0x90,
31905 -  0x7f, 0xd8, 0xe0, 0xf5, 0x1a, 0x80, 0x08, 0x30, 0x03, 0x05, 0xc2, 0x15, 0x12, 0x00, 0x46, 0x30,
31906 -  0x02, 0x07, 0xc2, 0x02, 0x12, 0x05, 0x20, 0x80, 0xd6, 0x30, 0x09, 0xd3, 0xc2, 0x09, 0x12}},
31907 - {0x09c6, 64, { 0x0a, 0xf1, 0x80, 0xcc, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7,
31908 -  0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c,
31909 -  0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25,
31910 -  0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82}},
31911 - {0x0a06, 64, { 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a,
31912 -  0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82,
31913 -  0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01,
31914 -  0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3}},
31915 - {0x0a46, 64, { 0xa3, 0x80, 0xdf, 0x8f, 0x1b, 0xe4, 0xf5, 0x1c, 0x75, 0x1d, 0xff, 0x75, 0x1e, 0x19, 0x75, 0x1f, 0x86,
31916 -  0xab, 0x1d, 0xaa, 0x1e, 0xa9, 0x1f, 0x90, 0x00, 0x01, 0x12, 0x09, 0xe4, 0xb4, 0x03, 0x1d, 0xaf,
31917 -  0x1c, 0x05, 0x1c, 0xef, 0xb5, 0x1b, 0x01, 0x22, 0x12, 0x09, 0xcb, 0x7e, 0x00, 0x29, 0xff, 0xee,
31918 -  0x3a, 0xa9, 0x07, 0x75, 0x1d, 0xff, 0xf5, 0x1e, 0x89, 0x1f, 0x80, 0xd4, 0x7b, 0x00, 0x7a}},
31919 - {0x0a86, 64, { 0x00, 0x79, 0x00, 0x22, 0x8f, 0x1d, 0x05, 0x28, 0xe5, 0x28, 0xae, 0x27, 0x70, 0x02, 0x05, 0x27, 0x14,
31920 -  0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1d, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x28, 0xe5, 0x28, 0xac, 0x27,
31921 -  0x70, 0x02, 0x05, 0x27, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x23, 0xe5, 0x23, 0x60,
31922 -  0x0a, 0x12, 0x0d, 0x54, 0x8f, 0x1d, 0xef, 0x42, 0x11, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0}},
31923 - {0x0ac6, 64, { 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x30, 0x06, 0x04, 0xc2, 0x06,
31924 -  0x80, 0x02, 0xd2, 0x09, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0,
31925 -  0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x1b,
31926 -  0x12, 0x00, 0x03, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x08, 0xaa, 0x90, 0x7f}},
31927 - {0x0b06, 64, { 0xd6, 0xe0, 0x30, 0xe7, 0x0e, 0x30, 0x01, 0x05, 0x12, 0x0d, 0x0e, 0x80, 0x06, 0x12, 0x0c, 0x9b, 0xef,
31928 -  0x60, 0xe1, 0x12, 0x07, 0x36, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84,
31929 -  0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab,
31930 -  0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0}},
31931 - {0x0b46, 64, { 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2,
31932 -  0x02, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85,
31933 +  0x0d, 0x0f, 0xbf, 0x09, 0xee, 0x75, 0x13, 0x01, 0xe4, 0xf5, 0x12, 0xf5, 0x2e, 0xf5, 0x11}},
31934 + {0x0786, 64, { 0xc2, 0x0e, 0xc2, 0x12, 0xc2, 0x0d, 0xc2, 0x0a, 0xc2, 0x0f, 0xc2, 0x04, 0x90, 0x7f, 0x98, 0x74, 0x13,
31935 +  0xf0, 0x75, 0x18, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x0c,
31936 +  0x1c, 0x7f, 0x10, 0x8f, 0x17, 0x12, 0x0b, 0xaa, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x7f, 0x01,
31937 +  0x8f, 0x16, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x0c, 0x1c}},
31938 + {0x07c6, 64, { 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x15, 0x12, 0x0c, 0x1c, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0,
31939 +  0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x0c, 0x1c, 0x7f, 0x01, 0x12, 0x0c,
31940 +  0xac, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x0c, 0x1c, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x75, 0x19,
31941 +  0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0xd2, 0x03, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10}},
31942 + {0x0806, 64, { 0xf0, 0xaf, 0x23, 0xe5, 0x28, 0xf5, 0x82, 0xe5, 0x27, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0,
31943 +  0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90,
31944 +  0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x23, 0xe5, 0x28, 0xf5, 0x82, 0xe5, 0x27, 0xf5, 0x83, 0xc2,
31945 +  0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7}},
31946 + {0x0846, 64, { 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x23, 0xe5, 0x28, 0xf5, 0x82,
31947 +  0xe5, 0x27, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05,
31948 +  0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf,
31949 +  0x23, 0xe5, 0x28, 0xf5, 0x82, 0xe5, 0x27, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0}},
31950 + {0x0886, 64, { 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00,
31951 +  0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90,
31952 +  0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x78,
31953 +  0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x31, 0x02, 0x08, 0xfd, 0x02, 0x09, 0x42, 0xe4}},
31954 + {0x08c6, 64, { 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29,
31955 +  0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20,
31956 +  0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02,
31957 +  0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x0c, 0xcd, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc}},
31958 + {0x0906, 64, { 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf,
31959 +  0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8,
31960 +  0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82,
31961 +  0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xd2, 0x14, 0x90, 0x7f}},
31962 + {0x0946, 64, { 0x92, 0xe0, 0x44, 0x02, 0xf0, 0x12, 0x0d, 0x63, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74,
31963 +  0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0,
31964 +  0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f,
31965 +  0xae, 0x74, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0x15, 0x12, 0x0c, 0x66, 0xc2, 0x02, 0xe4, 0xf5}},
31966 + {0x0986, 64, { 0x26, 0xf5, 0x2e, 0xc2, 0x08, 0xc2, 0x03, 0x90, 0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65,
31967 +  0x1a, 0x60, 0x10, 0x30, 0x03, 0x05, 0xd2, 0x15, 0x12, 0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5,
31968 +  0x1a, 0x80, 0x08, 0x30, 0x03, 0x05, 0xc2, 0x15, 0x12, 0x00, 0x46, 0x30, 0x02, 0x07, 0xc2, 0x02,
31969 +  0x12, 0x05, 0x20, 0x80, 0xd6, 0x30, 0x09, 0xd3, 0xc2, 0x09, 0x12, 0x0a, 0xba, 0x80, 0xcc}},
31970 + {0x09c6, 64, { 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02,
31971 +  0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5,
31972 +  0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22,
31973 +  0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5}},
31974 + {0x0a06, 64, { 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xf0, 0x22, 0x50,
31975 +  0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70,
31976 +  0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88,
31977 +  0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0x8f}},
31978 + {0x0a46, 64, { 0x1b, 0xe4, 0xf5, 0x1c, 0x75, 0x1d, 0xff, 0x75, 0x1e, 0x19, 0x75, 0x1f, 0x86, 0xab, 0x1d, 0xaa, 0x1e,
31979 +  0xa9, 0x1f, 0x90, 0x00, 0x01, 0x12, 0x09, 0xe0, 0xb4, 0x03, 0x1d, 0xaf, 0x1c, 0x05, 0x1c, 0xef,
31980 +  0xb5, 0x1b, 0x01, 0x22, 0x12, 0x09, 0xc7, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75,
31981 +  0x1d, 0xff, 0xf5, 0x1e, 0x89, 0x1f, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x22}},
31982 + {0x0a86, 64, { 0x05, 0x28, 0xe5, 0x28, 0xae, 0x27, 0x70, 0x02, 0x05, 0x27, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x11,
31983 +  0xf0, 0x12, 0x00, 0x36, 0x05, 0x28, 0xe5, 0x28, 0xac, 0x27, 0x70, 0x02, 0x05, 0x27, 0x14, 0xf5,
31984 +  0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x23, 0xe5, 0x23, 0x60, 0x07, 0x12, 0x0d, 0x44, 0x8f, 0x11,
31985 +  0x80, 0xcd, 0x22, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x1b, 0x12, 0x00, 0x03, 0x90, 0x7f, 0xd6}},
31986 + {0x0ac6, 64, { 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x08, 0xa6, 0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0x0e, 0x30, 0x01, 0x05,
31987 +  0x12, 0x0c, 0xfe, 0x80, 0x06, 0x12, 0x0c, 0x8b, 0xef, 0x60, 0xe1, 0x12, 0x07, 0x36, 0x22, 0xc0,
31988 +  0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f,
31989 +  0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0}},
31990 + {0x0b06, 64, { 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0,
31991 +  0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x02, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab,
31992 +  0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32,
31993 +  0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00}},
31994 + {0x0b46, 64, { 0xd2, 0x09, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85,
31995    0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00,
31996 -  0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90}},
31997 - {0x0b86, 64, { 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98,
31998 -  0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90,
31999 +  0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
32000 +  0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f}},
32001 + {0x0b86, 64, { 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90,
32002    0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0,
32003 -  0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0}},
32004 - {0x0bc6, 64, { 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
32005 -  0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90,
32006 +  0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90,
32007 +  0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13}},
32008 + {0x0bc6, 64, { 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90,
32009    0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0,
32010 -  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22}},
32011 - {0x0c06, 64, { 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16,
32012 -  0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f,
32013 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90,
32014 +  0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74}},
32015 + {0x0c06, 64, { 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f,
32016    0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90,
32017 -  0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90}},
32018 - {0x0c46, 64, { 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x0d, 0x3c, 0x8f, 0x1d, 0x12,
32019 -  0x0d, 0x3c, 0x8f, 0x1e, 0xe5, 0x1d, 0x65, 0x1e, 0x60, 0x12, 0x12, 0x0d, 0x3c, 0x8f, 0x1d, 0xe5,
32020 -  0x1d, 0x65, 0x1e, 0x60, 0x07, 0x12, 0x0d, 0x3c, 0x8f, 0x1e, 0x80, 0xe8, 0xaf, 0x1d, 0x22, 0x90,
32021 -  0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x15, 0x04, 0xe0, 0x44}},
32022 - {0x0c86, 64, { 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x0c, 0xf7, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0,
32023 -  0x44, 0x04, 0xf0, 0x22, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x1c, 0x12, 0x07, 0x36, 0x12, 0x0d, 0x60,
32024 +  0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
32025 +  0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x0d, 0x2c, 0x8f, 0x1d}},
32026 + {0x0c46, 64, { 0x12, 0x0d, 0x2c, 0x8f, 0x1e, 0xe5, 0x1d, 0x65, 0x1e, 0x60, 0x12, 0x12, 0x0d, 0x2c, 0x8f, 0x1d, 0xe5,
32027 +  0x1d, 0x65, 0x1e, 0x60, 0x07, 0x12, 0x0d, 0x2c, 0x8f, 0x1e, 0x80, 0xe8, 0xaf, 0x1d, 0x22, 0x90,
32028 +  0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x15, 0x04, 0xe0, 0x44, 0x02,
32029 +  0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x0c, 0xe7, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0}},
32030 + {0x0c86, 64, { 0xe0, 0x44, 0x04, 0xf0, 0x22, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x1c, 0x12, 0x07, 0x36, 0x12, 0x0d, 0x50,
32031    0xef, 0x30, 0xe6, 0x0b, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x1c, 0x60, 0xf1, 0x7f, 0x01, 0x22, 0x12,
32032 -  0x00, 0x03, 0x7f, 0x00, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x15, 0x54, 0x7f, 0xfd, 0x12}},
32033 - {0x0cc6, 64, { 0x0c, 0x2c, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x15, 0x44,
32034 -  0x80, 0xfd, 0x12, 0x0c, 0x2c, 0x22, 0x05, 0x29, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x2f, 0x03,
32035 +  0x00, 0x03, 0x7f, 0x00, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x15, 0x54, 0x7f, 0xfd, 0x12, 0x0c,
32036 +  0x1c, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x15}},
32037 + {0x0cc6, 64, { 0x44, 0x80, 0xfd, 0x12, 0x0c, 0x1c, 0x22, 0x05, 0x29, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x2f, 0x03,
32038    0x00, 0x00, 0xc1, 0x86, 0xc1, 0x02, 0xc1, 0x09, 0xc1, 0x01, 0xc1, 0x07, 0x01, 0x25, 0x00, 0x00,
32039 -  0x8e, 0x1c, 0x8f, 0x1d, 0xe5, 0x1d, 0x15, 0x1d, 0xae, 0x1c, 0x70, 0x02, 0x15, 0x1c, 0x4e}},
32040 - {0x0d06, 64, { 0x60, 0x05, 0x12, 0x08, 0x99, 0x80, 0xee, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x0d,
32041 -  0x7e, 0x00, 0x12, 0x0c, 0xf7, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22, 0x90, 0x7f, 0x98,
32042 +  0x8e, 0x1c, 0x8f, 0x1d, 0xe5, 0x1d, 0x15, 0x1d, 0xae, 0x1c, 0x70, 0x02, 0x15, 0x1c, 0x4e, 0x60,
32043 +  0x05, 0x12, 0x08, 0x95, 0x80, 0xee, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x01, 0xf0, 0x7f}},
32044 + {0x0d06, 64, { 0x0d, 0x7e, 0x00, 0x12, 0x0c, 0xe7, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22, 0x90, 0x7f, 0x98,
32045    0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90,
32046 -  0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0}},
32047 - {0x0d46, 64, { 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98,
32048 -  0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90,
32049 +  0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff,
32050 +  0x22, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f}},
32051 + {0x0d46, 64, { 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90,
32052    0xc0, 0x00, 0xe0, 0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0xd2, 0x01, 0x22, 0xc2, 0x01, 0x22, 0x00,
32053 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32054    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
32055   {0x0d86, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32056    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32057 @@ -244,8 +248,8 @@
32058   {0x0dc6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32059    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32060    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32061 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0b, 0x47, 0x00, 0x02, 0x0e}},
32062 - {0x0e06, 64, { 0x04, 0x00, 0x02, 0x0b, 0x1d, 0x00, 0x02, 0x0a, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32063 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0b, 0x10, 0x00, 0x02, 0x0e}},
32064 + {0x0e06, 64, { 0x04, 0x00, 0x02, 0x0a, 0xe6, 0x00, 0x02, 0x0b, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32065    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32066    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32067    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
32068 @@ -420,15 +424,15 @@
32069   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32070    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32071    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32072 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
32073 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
32074   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x08, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
32075    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
32076    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
32077    0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x05, 0x02, 0x40, 0x00}},
32078   {0x1946, 64, { 0x00, 0x07, 0x05, 0x06, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05,
32079 -  0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x83, 0x02,
32080 -  0x40, 0x00, 0x00, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
32081 -  0x01, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x01}},
32082 +  0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x83, 0x02,
32083 +  0x40, 0x00, 0x01, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
32084 +  0x01, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x01}},
32085   {0x1986, 64, { 0x04, 0x03, 0x09, 0x04, 0x48, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61,
32086    0x00, 0x6e, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x61, 0x00, 0x20, 0x00, 0x64, 0x00, 0x69, 0x00, 0x76,
32087    0x00, 0x69, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x6f, 0x00, 0x66,
32088 @@ -438,5 +442,5 @@
32089    0x00, 0x42, 0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c,
32090    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
32091   {0x1a06,  4, { 0x72, 0x00, 0x00, 0x00}},
32092 -{ 0xffff,      0,      {0x00} }
32093 + {0xffff,      0,      {0x00} }
32094  };
32095 diff -Nur linux-2.4.19.org/drivers/usb/serial/keyspan_usa26msg.h linux-2.4.19/drivers/usb/serial/keyspan_usa26msg.h
32096 --- linux-2.4.19.org/drivers/usb/serial/keyspan_usa26msg.h      Wed Oct 10 00:15:02 2001
32097 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa26msg.h  Thu Oct 31 08:11:24 2002
32098 @@ -44,7 +44,7 @@
32099         Buffer formats for RX/TX data messages are not defined by
32100         a structure, but are described here:
32101  
32102 -       USB OUT (host -> USA26, transmit) messages contain a 
32103 +       USB OUT (host -> USAxx, transmit) messages contain a 
32104         REQUEST_ACK indicator (set to 0xff to request an ACK at the 
32105         completion of transmit; 0x00 otherwise), followed by data:
32106  
32107 @@ -52,25 +52,48 @@
32108  
32109         with a total data length of 63.
32110  
32111 -       USB IN (USA26 -> host, receive) messages contain either a zero
32112 -       flag (indicating no error in any data bytes):
32113 +       USB IN (USAxx -> host, receive) messages begin with a status
32114 +       byte in which the 0x80 bit is either:
32115  
32116 -               00 DAT DAT DAT ...
32117 +               (a)     0x80 bit clear
32118 +                       indicates that the bytes following it are all data
32119 +                       bytes:
32120  
32121 -       for a total of 63 data bytes, or a non-zero status flag (indicating 
32122 -       that all data bytes will be preceded by status flag):
32123 +                               STAT DATA DATA DATA DATA DATA ...
32124  
32125 -               STAT DAT STAT DAT STAT DAT ...
32126 +                       for a total of up to 63 DATA bytes,
32127  
32128 -       for a total of 32 data bytes.  The valid bits in the STAT bytes are:
32129 +       or:
32130 +
32131 +               (b)     0x80 bit set
32132 +                       indiates that the bytes following alternate data and
32133 +                       status bytes:
32134 +
32135 +                               STAT DATA STAT DATA STAT DATA STAT DATA ...
32136 +
32137 +                       for a total of up to 32 DATA bytes.
32138 +
32139 +       The valid bits in the STAT bytes are:
32140  
32141                 OVERRUN 0x02
32142                 PARITY  0x04
32143                 FRAMING 0x08
32144                 BREAK   0x10
32145  
32146 -       Note: a "no status" RX data message (first byte zero) can serve as
32147 -       a "break off" indicator.
32148 +       Notes:
32149 +
32150 +       (1) The OVERRUN bit can appear in either (a) or (b) format
32151 +               messages, but the but the PARITY/FRAMING/BREAK bits
32152 +               only appear in (b) format messages.
32153 +       (2) For the host to determine the exact point at which the
32154 +               overrun occurred (to identify the point in the data
32155 +               stream at which the data was lost), it needs to count
32156 +               128 characters, starting at the first character of the
32157 +               message in which OVERRUN was reported; the lost character(s)
32158 +               would have been received between the 128th and 129th
32159 +               characters.
32160 +       (3)     An RX data message in which the first byte has 0x80 clear
32161 +               serves as a "break off" indicator.
32162  
32163         revision history:
32164  
32165 @@ -80,6 +103,7 @@
32166         1999apr14       add resetDataToggle to control message
32167         2000jan04       merge with usa17msg.h
32168         2000jun01       add extended BSD-style copyright text
32169 +       2001jul05       change message format to improve OVERRUN case
32170  
32171         Note on shared names:
32172  
32173 @@ -93,7 +117,7 @@
32174  #define        __USA26MSG__
32175  
32176  
32177 -typedef struct keyspan_usa26_portControlMessage
32178 +struct keyspan_usa26_portControlMessage
32179  {
32180         /*
32181                 there are three types of "commands" sent in the control message:
32182 @@ -164,7 +188,7 @@
32183                 returnStatus,   // BOTH: return current status (even if it hasn't changed)
32184                 resetDataToggle;// BOTH: reset data toggle state to DATA0
32185         
32186 -} keyspan_usa26_portControlMessage;
32187 +};
32188  
32189  // defines for bits in lcr
32190  #define        USA_DATABITS_5          0x00
32191 @@ -182,7 +206,7 @@
32192  
32193  // all things called "StatusMessage" are sent on the status endpoint
32194  
32195 -typedef struct keyspan_usa26_portStatusMessage // one for each port
32196 +struct keyspan_usa26_portStatusMessage // one for each port
32197  {
32198         u8      port,                   // BOTH: 0=first, 1=second, other=see below
32199                 hskia_cts,              // USA26: reports HSKIA pin
32200 @@ -195,7 +219,7 @@
32201                 _txXoff,                // port is in XOFF state (either host or RX XOFF)
32202                 rxEnabled,              // as configured by rxOn/rxOff 1=on, 0=off
32203                 controlResponse;// 1=a control message has been processed
32204 -} keyspan_usa26_portStatusMessage;
32205 +};
32206  
32207  // bits in RX data message when STAT byte is included
32208  #define        RXERROR_OVERRUN 0x02
32209 @@ -203,28 +227,28 @@
32210  #define        RXERROR_FRAMING 0x08
32211  #define        RXERROR_BREAK   0x10
32212  
32213 -typedef struct keyspan_usa26_globalControlMessage
32214 +struct keyspan_usa26_globalControlMessage
32215  {
32216         u8      sendGlobalStatus,       // 2=request for two status responses
32217                 resetStatusToggle,      // 1=reset global status toggle
32218                 resetStatusCount;       // a cycling value
32219 -} keyspan_usa26_globalControlMessage;
32220 +};
32221  
32222 -typedef struct keyspan_usa26_globalStatusMessage
32223 +struct keyspan_usa26_globalStatusMessage
32224  {
32225         u8      port,                           // 3
32226                 sendGlobalStatus,       // from request, decremented
32227                 resetStatusCount;       // as in request
32228 -} keyspan_usa26_globalStatusMessage;
32229 +};
32230  
32231 -typedef struct keyspan_usa26_globalDebugMessage
32232 +struct keyspan_usa26_globalDebugMessage
32233  {
32234         u8      port,                           // 2
32235                 a,
32236                 b,
32237                 c,
32238                 d;
32239 -} keyspan_usa26_globalDebugMessage;
32240 +};
32241  
32242  // ie: the maximum length of an EZUSB endpoint buffer
32243  #define        MAX_DATA_LEN                    64
32244 diff -Nur linux-2.4.19.org/drivers/usb/serial/keyspan_usa28_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa28_fw.h
32245 --- linux-2.4.19.org/drivers/usb/serial/keyspan_usa28_fw.h      Wed Oct 10 00:15:02 2001
32246 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa28_fw.h  Thu Oct 31 08:11:25 2002
32247 @@ -1,28 +1,33 @@
32248  /* keyspan_usa28_fw.h
32249 -  
32250 -   Generated from Keyspan firmware image usa28code.h Sat Oct  6 12:11:26 EST 2001
32251 -   This firmware is for the Keyspan USA-28 Serial Adaptor
32252  
32253 -   "The firmware contained herein as keyspan_usa28_fw.h is
32254 -   Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
32255 -   ("Keyspan"), as an unpublished work.  This notice does not imply
32256 -   unrestricted or public access to this firmware which is a trade secret of
32257 -   Keyspan, and which may not be reproduced, used, sold or transferred to any
32258 -   third party without Keyspan's prior written consent.  All Rights Reserved.
32259 +       The firmware contained herein as keyspan_usa28_fw.h is
32260  
32261 -   This firmware may not be modified and may only be used with the Keyspan 
32262 -   USA-28 Serial Adapter.  Distribution and/or Modification of the
32263 -   keyspan.c driver which includes this firmware, in whole or in part,
32264 -   requires the inclusion of this statement."
32265 +               Copyright (C) 1999-2001
32266 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
32267 +               
32268 +       as an unpublished work. This notice does not imply unrestricted or
32269 +       public access to the source code from which this firmware image is
32270 +       derived.  Except as noted below this firmware image may not be 
32271 +       reproduced, used, sold or transferred to any third party without 
32272 +       Keyspan's prior written consent.  All Rights Reserved.
32273 +
32274 +       Permission is hereby granted for the distribution of this firmware 
32275 +       image as part of a Linux or other Open Source operating system kernel 
32276 +       in text or binary form as required. 
32277 +
32278 +       This firmware may not be modified and may only be used with  
32279 +       Keyspan hardware.  Distribution and/or Modification of the 
32280 +       keyspan.c driver which includes this firmware, in whole or in 
32281 +       part, requires the inclusion of this statement."
32282  
32283  */
32284  
32285  static const struct ezusb_hex_record keyspan_usa28_firmware[] = {
32286 - {0x0026, 10, { 0x12, 0x18, 0x09, 0x12, 0x18, 0xbc, 0x12, 0x14, 0xbb, 0x22}},
32287 + {0x0026, 10, { 0x12, 0x17, 0xdb, 0x12, 0x18, 0xb5, 0x12, 0x14, 0xc3, 0x22}},
32288   {0x0033,  3, { 0x02, 0x00, 0x1d}},
32289   {0x001d,  4, { 0x53, 0xd8, 0xef, 0x32}},
32290   {0x0006, 16, { 0x8e, 0x12, 0x8f, 0x13, 0xe5, 0x13, 0x15, 0x13, 0xae, 0x12, 0x70, 0x02, 0x15, 0x12, 0x4e, 0x60}},
32291 - {0x0016,  7, { 0x05, 0x12, 0x18, 0xab, 0x80, 0xee, 0x22}},
32292 + {0x0016,  7, { 0x05, 0x12, 0x18, 0xa4, 0x80, 0xee, 0x22}},
32293   {0x0003,  3, { 0x02, 0x00, 0x46}},
32294   {0x0046, 16, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0, 0xd0, 0x75, 0xd0, 0x08}},
32295   {0x0056, 16, { 0x30, 0x99, 0x0e, 0x30, 0x11, 0x07, 0xa2, 0x17, 0x92, 0x9b, 0x85, 0x46, 0x99, 0xc2, 0x99, 0xd2}},
32296 @@ -192,7 +197,7 @@
32297    0x40, 0x15, 0x15, 0x49, 0x15, 0x49, 0x05, 0x39, 0xd2, 0x0e, 0x80, 0x0b, 0x90, 0x7f, 0xbd, 0xe5,
32298    0x49, 0xf0, 0x75, 0x49, 0x00, 0xd2, 0x02, 0xd2, 0x25, 0x30, 0x25, 0x05, 0xc2, 0x25, 0x02, 0x00,
32299    0x56, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xce}},
32300 - {0x0a86, 64, { 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x0b, 0xa1, 0xe4, 0xf5, 0x12, 0x74, 0x40, 0x25, 0x12, 0xf5, 0x82, 0xe4,
32301 + {0x0a86, 64, { 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x0b, 0xa5, 0xe4, 0xf5, 0x12, 0x74, 0x40, 0x25, 0x12, 0xf5, 0x82, 0xe4,
32302    0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x12, 0x7c, 0x00, 0x7b, 0x00, 0x24, 0x4c, 0xf9, 0xec,
32303    0x34, 0x00, 0xfa, 0xef, 0x12, 0x15, 0xcd, 0x05, 0x12, 0xe5, 0x12, 0xb4, 0x18, 0xdb, 0xe5, 0x4c,
32304    0x60, 0x0c, 0x75, 0xc9, 0x20, 0x75, 0xc8, 0x36, 0x85, 0x4d, 0xca, 0x85, 0x4e, 0xcb, 0xe5}},
32305 @@ -207,166 +212,166 @@
32306   {0x0b46, 64, { 0x02, 0xf0, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x5e, 0x60, 0x0a, 0xd2, 0x9c, 0xc2, 0x98,
32307    0x75, 0x2e, 0x01, 0x75, 0x40, 0x28, 0xe5, 0x5f, 0x60, 0x07, 0xc2, 0x9c, 0xe4, 0xf5, 0x48, 0xf5,
32308    0x2e, 0xe5, 0x60, 0x60, 0x03, 0xe4, 0xf5, 0x48, 0xe5, 0x61, 0x60, 0x02, 0xd2, 0x07, 0xe5, 0x62,
32309 -  0x60, 0x08, 0xe5, 0x5e, 0x70, 0x02, 0xf5, 0x40, 0xd2, 0x0c, 0xe5, 0x63, 0x60, 0x15, 0x90}},
32310 +  0x60, 0x08, 0xe5, 0x5e, 0x70, 0x02, 0xf5, 0x40, 0xd2, 0x0c, 0xe5, 0x63, 0x60, 0x19, 0x90}},
32311   {0x0b86, 64, { 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x12, 0xf0, 0x74, 0x32, 0xf0, 0x74, 0x15, 0xf0,
32312 -  0x74, 0x35, 0xf0, 0xd2, 0x09, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0xa2, 0x13, 0xe4, 0x33, 0xff, 0x65,
32313 -  0x2b, 0x60, 0x04, 0x8f, 0x2b, 0xd2, 0x0c, 0xa2, 0x0b, 0xe4, 0x33, 0xff, 0x65, 0x2c, 0x60, 0x04,
32314 -  0x8f, 0x2c, 0xd2, 0x0c, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x08, 0x65, 0x27, 0x60, 0x07, 0xe0}},
32315 - {0x0bc6, 64, { 0x54, 0x08, 0xf5, 0x27, 0xd2, 0x0c, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x40, 0xb5, 0x29, 0x09, 0xe0, 0x54,
32316 -  0x40, 0x64, 0x40, 0xf5, 0x29, 0xd2, 0x0c, 0x30, 0x07, 0x35, 0xc2, 0xaf, 0x30, 0x01, 0x18, 0x90,
32317 -  0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0xe5, 0x48, 0x60, 0x09, 0x90, 0x7f, 0xb7, 0xf0, 0xe4, 0xf5,
32318 -  0x48, 0xc2, 0x01, 0xc2, 0x07, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1, 0x0f, 0xe5}},
32319 - {0x0c06, 64, { 0x48, 0x60, 0x09, 0x90, 0x7f, 0xb9, 0xf0, 0xe4, 0xf5, 0x48, 0xd2, 0x01, 0xc2, 0x07, 0xd2, 0xaf, 0x20,
32320 -  0x05, 0x37, 0x30, 0x03, 0x1b, 0x90, 0x7f, 0xc6, 0xe0, 0x20, 0xe1, 0x2d, 0x90, 0x7e, 0x40, 0xe0,
32321 -  0x13, 0x92, 0x15, 0x75, 0x4a, 0x01, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x7c, 0xd2, 0x05, 0x80, 0x19,
32322 -  0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x15, 0x75}},
32323 - {0x0c46, 64, { 0x4a, 0x01, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x7c, 0xd2, 0x05, 0x20, 0x21, 0x33, 0x20, 0x00, 0x06, 0xe5,
32324 -  0x4a, 0x65, 0x7c, 0x70, 0x2a, 0x30, 0x05, 0x1a, 0x30, 0x03, 0x09, 0xe4, 0x90, 0x7f, 0xc7, 0xf0,
32325 -  0xc2, 0x03, 0x80, 0x07, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x03, 0xc2, 0x05, 0xe4, 0xf5, 0x7c,
32326 -  0xf5, 0x4a, 0x30, 0x15, 0x0a, 0xc2, 0x15, 0xc2, 0x00, 0x90, 0x7f, 0xbf, 0x74, 0x01, 0xf0}},
32327 - {0x0c86, 64, { 0x30, 0x21, 0x03, 0x02, 0x0d, 0x90, 0x20, 0x05, 0x03, 0x02, 0x0d, 0x90, 0x30, 0x1c, 0x0a, 0x90, 0x7f,
32328 -  0x9b, 0xe0, 0x20, 0xe3, 0x03, 0x02, 0x0d, 0x90, 0x30, 0x0b, 0x03, 0x02, 0x0d, 0x90, 0x30, 0x13,
32329 -  0x03, 0x02, 0x0d, 0x90, 0x30, 0x03, 0x62, 0x30, 0x1b, 0x12, 0xaf, 0x4a, 0x05, 0x4a, 0x74, 0x40,
32330 -  0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x2d, 0xaf, 0x4a, 0x05}},
32331 - {0x0cc6, 64, { 0x4a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x13, 0xe5, 0x4a, 0xc3,
32332 -  0x95, 0x7c, 0x50, 0x2a, 0x30, 0x1b, 0x12, 0xaf, 0x4a, 0x05, 0x4a, 0x74, 0x40, 0x2f, 0xf5, 0x82,
32333 -  0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x17, 0xaf, 0x4a, 0x05, 0x4a, 0x74, 0x40, 0x2f,
32334 -  0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x46, 0xd2, 0x11, 0x80, 0x6b, 0xc2}},
32335 - {0x0d06, 64, { 0x11, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x03, 0x80, 0x60, 0x30, 0x1b, 0x12, 0xaf, 0x4a, 0x05, 0x4a,
32336 -  0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x2d, 0xaf, 0x4a,
32337 -  0x05, 0x4a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x13, 0xe5,
32338 -  0x4a, 0xc3, 0x95, 0x7c, 0x50, 0x2a, 0x30, 0x1b, 0x12, 0xaf, 0x4a, 0x05, 0x4a, 0x74, 0xc0}},
32339 - {0x0d46, 64, { 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x17, 0xaf, 0x4a, 0x05, 0x4a, 0x74,
32340 -  0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x46, 0xd2, 0x11, 0x80, 0x09,
32341 -  0xc2, 0x11, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x03, 0x30, 0x1b, 0x04, 0xa2, 0x2d, 0x92, 0x9b,
32342 -  0xd2, 0x21, 0xc2, 0xaf, 0x85, 0x13, 0x99, 0x20, 0x11, 0x0d, 0x30, 0x15, 0x0a, 0xc2, 0x15}},
32343 - {0x0d86, 64, { 0xc2, 0x00, 0x90, 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x90, 0x7f, 0xd0, 0xe0, 0x30, 0xe1, 0x03,
32344 -  0x02, 0x0e, 0xad, 0xe4, 0xf5, 0x12, 0x74, 0xc0, 0x25, 0x12, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5,
32345 -  0x83, 0xe0, 0xff, 0xe5, 0x12, 0x7c, 0x00, 0x7b, 0x00, 0x24, 0x64, 0xf9, 0xec, 0x34, 0x00, 0xfa,
32346 -  0xef, 0x12, 0x15, 0xcd, 0x05, 0x12, 0xe5, 0x12, 0xb4, 0x18, 0xdb, 0xe5, 0x64, 0x60, 0x0b}},
32347 - {0x0dc6, 64, { 0x75, 0x89, 0x60, 0x75, 0x88, 0x40, 0xd2, 0xdf, 0x85, 0x65, 0x8d, 0xe5, 0x67, 0x13, 0x92, 0x1d, 0x92,
32348 -  0xc7, 0xe5, 0x68, 0x13, 0x92, 0x1e, 0xe5, 0x69, 0x13, 0x92, 0x24, 0xe5, 0x6a, 0x60, 0x09, 0x90,
32349 -  0x7f, 0x97, 0xe0, 0x54, 0xef, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0x97, 0xe0, 0x44, 0x10, 0xf0, 0xe5,
32350 -  0x6b, 0x60, 0x09, 0x90, 0x7f, 0x97, 0xe0, 0x54, 0x7f, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0x97}},
32351 - {0x0e06, 64, { 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x71, 0x60, 0x0b, 0xc2, 0x14, 0xc2, 0x0d, 0x90, 0x7f, 0x94, 0xe0, 0x44,
32352 -  0x08, 0xf0, 0xe5, 0x72, 0x60, 0x0b, 0xd2, 0x0d, 0xd2, 0x0e, 0x90, 0x7f, 0x94, 0xe0, 0x44, 0x08,
32353 -  0xf0, 0xe5, 0x73, 0x60, 0x0d, 0xc2, 0xaf, 0xc2, 0x12, 0xd2, 0x00, 0xe4, 0xf5, 0x7d, 0xf5, 0x4b,
32354 -  0xd2, 0xaf, 0xe5, 0x74, 0x60, 0x05, 0x30, 0x24, 0x02, 0xd2, 0x0d, 0xe5, 0x75, 0x60, 0x15}},
32355 - {0x0e46, 64, { 0x90, 0x7f, 0x94, 0xe0, 0x54, 0xf7, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0x08, 0xf0, 0x90, 0x7f, 0x97,
32356 -  0xe0, 0x54, 0xf7, 0xf0, 0xe5, 0x76, 0x60, 0x0a, 0xd2, 0xc4, 0xc2, 0xc0, 0x75, 0x3a, 0x01, 0x75,
32357 -  0x41, 0x28, 0xe5, 0x77, 0x60, 0x07, 0xc2, 0xc4, 0xe4, 0xf5, 0x49, 0xf5, 0x3a, 0xe5, 0x78, 0x60,
32358 -  0x03, 0xe4, 0xf5, 0x49, 0xe5, 0x79, 0x60, 0x02, 0xd2, 0x08, 0xe5, 0x7a, 0x60, 0x08, 0xe5}},
32359 - {0x0e86, 64, { 0x76, 0x70, 0x02, 0xf5, 0x41, 0xd2, 0x0e, 0xe5, 0x7b, 0x60, 0x15, 0x90, 0x7f, 0xd7, 0x74, 0x13, 0xf0,
32360 -  0x74, 0x33, 0xf0, 0x74, 0x14, 0xf0, 0x74, 0x34, 0xf0, 0x74, 0x16, 0xf0, 0x74, 0x36, 0xf0, 0xd2,
32361 -  0x0a, 0xe4, 0x90, 0x7f, 0xd1, 0xf0, 0xa2, 0x14, 0xe4, 0x33, 0xff, 0x65, 0x37, 0x60, 0x04, 0x8f,
32362 -  0x37, 0xd2, 0x0e, 0xa2, 0x0d, 0xe4, 0x33, 0xff, 0x65, 0x38, 0x60, 0x04, 0x8f, 0x38, 0xd2}},
32363 - {0x0ec6, 64, { 0x0e, 0x90, 0x7f, 0x9a, 0xe0, 0x54, 0x20, 0x65, 0x33, 0x60, 0x07, 0xe0, 0x54, 0x20, 0xf5, 0x33, 0xd2,
32364 -  0x0e, 0x90, 0x7f, 0x9a, 0xe0, 0x54, 0x40, 0xb5, 0x35, 0x09, 0xe0, 0x54, 0x40, 0x64, 0x40, 0xf5,
32365 -  0x35, 0xd2, 0x0e, 0x30, 0x08, 0x35, 0xc2, 0xaf, 0x30, 0x02, 0x18, 0x90, 0x7f, 0xbc, 0xe0, 0x20,
32366 -  0xe1, 0x27, 0xe5, 0x49, 0x60, 0x09, 0x90, 0x7f, 0xbb, 0xf0, 0xe4, 0xf5, 0x49, 0xc2, 0x02}},
32367 - {0x0f06, 64, { 0xc2, 0x08, 0x80, 0x16, 0x90, 0x7f, 0xba, 0xe0, 0x20, 0xe1, 0x0f, 0xe5, 0x49, 0x60, 0x09, 0x90, 0x7f,
32368 -  0xbd, 0xf0, 0xe4, 0xf5, 0x49, 0xd2, 0x02, 0xc2, 0x08, 0xd2, 0xaf, 0x20, 0x06, 0x37, 0x30, 0x04,
32369 -  0x1b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x2d, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x16, 0x75,
32370 -  0x4b, 0x01, 0x90, 0x7f, 0xcb, 0xe0, 0xf5, 0x7d, 0xd2, 0x06, 0x80, 0x19, 0x90, 0x7f, 0xcc}},
32371 - {0x0f46, 64, { 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x16, 0x75, 0x4b, 0x01, 0x90, 0x7f, 0xcd,
32372 -  0xe0, 0xf5, 0x7d, 0xd2, 0x06, 0x20, 0x22, 0x33, 0x20, 0x00, 0x06, 0xe5, 0x4b, 0x65, 0x7d, 0x70,
32373 -  0x2a, 0x30, 0x06, 0x1a, 0x30, 0x04, 0x09, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0xc2, 0x04, 0x80, 0x07,
32374 -  0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0xd2, 0x04, 0xc2, 0x06, 0xe4, 0xf5, 0x7d, 0xf5, 0x4b, 0x30}},
32375 - {0x0f86, 64, { 0x16, 0x0a, 0xc2, 0x16, 0xc2, 0x00, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0x30, 0x22, 0x03, 0x02, 0x10,
32376 -  0x9c, 0x20, 0x06, 0x03, 0x02, 0x10, 0x9c, 0x30, 0x1e, 0x0a, 0x90, 0x7f, 0x9a, 0xe0, 0x20, 0xe5,
32377 -  0x03, 0x02, 0x10, 0x9c, 0x30, 0x0d, 0x03, 0x02, 0x10, 0x9c, 0x30, 0x14, 0x03, 0x02, 0x10, 0x9c,
32378 -  0x30, 0x04, 0x62, 0x30, 0x1d, 0x12, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5, 0x82}},
32379 - {0x0fc6, 64, { 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x2d, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5,
32380 -  0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x13, 0xe5, 0x4b, 0xc3, 0x95, 0x7d, 0x50, 0x2a,
32381 -  0x30, 0x1d, 0x12, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5,
32382 -  0x83, 0xe0, 0x13, 0x92, 0x18, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4}},
32383 - {0x1006, 64, { 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x47, 0xd2, 0x12, 0x80, 0x6b, 0xc2, 0x12, 0xe4, 0x90, 0x7f, 0xcb,
32384 -  0xf0, 0xc2, 0x04, 0x80, 0x60, 0x30, 0x1d, 0x12, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2f, 0xf5,
32385 -  0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x2d, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0xc0,
32386 -  0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xf5, 0x13, 0xe5, 0x4b, 0xc3, 0x95}},
32387 - {0x1046, 64, { 0x7d, 0x50, 0x2a, 0x30, 0x1d, 0x12, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34,
32388 -  0x7c, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x18, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2f, 0xf5, 0x82,
32389 -  0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xf5, 0x47, 0xd2, 0x12, 0x80, 0x09, 0xc2, 0x12, 0xe4, 0x90,
32390 -  0x7f, 0xcd, 0xf0, 0xd2, 0x04, 0x30, 0x1d, 0x04, 0xa2, 0x2d, 0x92, 0xc3, 0xd2, 0x22, 0xc2}},
32391 - {0x1086, 64, { 0xaf, 0x85, 0x13, 0xc1, 0x20, 0x12, 0x0d, 0x30, 0x16, 0x0a, 0xc2, 0x16, 0xc2, 0x00, 0x90, 0x7f, 0xc1,
32392 -  0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x11, 0x72, 0xe5,
32393 -  0x1a, 0x70, 0x46, 0x30, 0x0c, 0x3f, 0xe5, 0x40, 0x70, 0x3b, 0xa2, 0x09, 0x33, 0xf5, 0x31, 0xc2,
32394 -  0x09, 0xc2, 0x0c, 0xe4, 0xf5, 0x12, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x26, 0x25, 0x12, 0xf9}},
32395 - {0x10c6, 64, { 0xee, 0x34, 0x00, 0xfa, 0x12, 0x15, 0x87, 0xff, 0x74, 0x80, 0x25, 0x12, 0xf5, 0x82, 0xe4, 0x34, 0x7b,
32396 -  0xf5, 0x83, 0xef, 0xf0, 0x05, 0x12, 0xe5, 0x12, 0xb4, 0x0c, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x0c,
32397 -  0xf0, 0x75, 0x40, 0x10, 0x22, 0x75, 0x1a, 0x01, 0x22, 0xe5, 0x1a, 0x64, 0x01, 0x70, 0x45, 0x30,
32398 -  0x0e, 0x3e, 0xe5, 0x41, 0x70, 0x3a, 0xa2, 0x0a, 0x33, 0xf5, 0x3d, 0xc2, 0x0a, 0xc2, 0x0e}},
32399 - {0x1106, 64, { 0xe4, 0xf5, 0x12, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x32, 0x25, 0x12, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12,
32400 -  0x15, 0x87, 0xff, 0x74, 0x80, 0x25, 0x12, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0,
32401 -  0x05, 0x12, 0xe5, 0x12, 0xb4, 0x0c, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x0c, 0xf0, 0x75, 0x41, 0x10,
32402 -  0x75, 0x1a, 0x02, 0x22, 0xe5, 0x1c, 0x60, 0x30, 0x15, 0x1c, 0xe4, 0xf5, 0x12, 0x7e, 0x00}},
32403 - {0x1146, 64, { 0x7b, 0x00, 0x74, 0x1b, 0x25, 0x12, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x15, 0x87, 0xff, 0x74, 0x80,
32404 -  0x25, 0x12, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x12, 0xe5, 0x12, 0xb4,
32405 -  0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x1a, 0x22, 0x90, 0x7f, 0xe9, 0xe0,
32406 -  0x12, 0x16, 0x17, 0x12, 0x38, 0x00, 0x12, 0xac, 0x01, 0x13, 0x18, 0x03, 0x11, 0x96, 0x06}},
32407 - {0x1186, 64, { 0x12, 0x2b, 0x08, 0x12, 0x25, 0x09, 0x12, 0x18, 0x0a, 0x13, 0x6e, 0x0b, 0x00, 0x00, 0x13, 0x67, 0x90,
32408 -  0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x40, 0x24, 0x02, 0x70, 0x69, 0x74, 0x19,
32409 -  0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xea,
32410 -  0xe0, 0xff, 0x12, 0x17, 0x4b, 0x8b, 0x12, 0x8a, 0x13, 0x89, 0x14, 0xea, 0x49, 0x60, 0x11}},
32411 - {0x11c6, 64, { 0xae, 0x02, 0xee, 0x90, 0x7f, 0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x13, 0x6e,
32412 -  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12,
32413 -  0x17, 0x9a, 0x8b, 0x12, 0x8a, 0x13, 0x89, 0x14, 0xea, 0x49, 0x60, 0x11, 0xae, 0x02, 0xee, 0x90,
32414 -  0x7f, 0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f}},
32415 - {0x1206, 64, { 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13,
32416 -  0x6e, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x13, 0x6e, 0x12, 0x14,
32417 -  0xbb, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x13,
32418 -  0x6e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70}},
32419 - {0x1246, 64, { 0x5b, 0xa2, 0x26, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x2b, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00,
32420 -  0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x13, 0x6e, 0xe4, 0x90, 0x7f,
32421 -  0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xec,
32422 -  0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0}},
32423 - {0x1286, 64, { 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4,
32424 -  0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
32425 -  0x01, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60,
32426 -  0x03, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x26, 0x02, 0x13}},
32427 - {0x12c6, 64, { 0x6e, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38,
32428 -  0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f,
32429 -  0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec,
32430 -  0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90}},
32431 - {0x1306, 64, { 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
32432 -  0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea,
32433 -  0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x26, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
32434 -  0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff}},
32435 - {0x1346, 64, { 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f,
32436 -  0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07,
32437 -  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0x20,
32438 -  0x28, 0x03, 0x02, 0x14, 0xba, 0xe5, 0x40, 0x60, 0x02, 0x15, 0x40, 0xe5, 0x48, 0x60, 0x4f}},
32439 - {0x1386, 64, { 0x65, 0x44, 0x70, 0x45, 0xe5, 0x42, 0xf4, 0x60, 0x02, 0x05, 0x42, 0xe5, 0x42, 0xc3, 0x95, 0x55, 0x40,
32440 -  0x3d, 0xc2, 0xaf, 0x30, 0x01, 0x18, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0x90, 0x7f, 0xb7,
32441 -  0xe5, 0x48, 0xf0, 0xc2, 0x01, 0xe4, 0xf5, 0x48, 0xf5, 0x42, 0xf5, 0x44, 0x80, 0x16, 0x90, 0x7f,
32442 -  0xb6, 0xe0, 0x20, 0xe1, 0x0f, 0x90, 0x7f, 0xb9, 0xe5, 0x48, 0xf0, 0xd2, 0x01, 0xe4, 0xf5}},
32443 - {0x13c6, 64, { 0x48, 0xf5, 0x42, 0xf5, 0x44, 0xd2, 0xaf, 0x80, 0x06, 0x85, 0x48, 0x44, 0xe4, 0xf5, 0x42, 0xe5, 0x2e,
32444 -  0x60, 0x2d, 0x20, 0x19, 0x07, 0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe0, 0x0e, 0xe5, 0x2f, 0x60, 0x05,
32445 -  0xe4, 0xf5, 0x2f, 0xd2, 0x0c, 0xe4, 0xf5, 0x3e, 0x80, 0x13, 0xe5, 0x3e, 0xd3, 0x95, 0x56, 0x50,
32446 -  0x0c, 0xe5, 0x3e, 0xb5, 0x56, 0x05, 0x75, 0x2f, 0x01, 0xd2, 0x0c, 0x05, 0x3e, 0xc2, 0x19}},
32447 - {0x1406, 64, { 0xe5, 0x41, 0x60, 0x02, 0x15, 0x41, 0xe5, 0x49, 0x60, 0x4f, 0x65, 0x45, 0x70, 0x45, 0xe5, 0x43, 0xf4,
32448 -  0x60, 0x02, 0x05, 0x43, 0xe5, 0x43, 0xc3, 0x95, 0x6d, 0x40, 0x3d, 0xc2, 0xaf, 0x30, 0x02, 0x18,
32449 -  0x90, 0x7f, 0xbc, 0xe0, 0x20, 0xe1, 0x27, 0x90, 0x7f, 0xbb, 0xe5, 0x49, 0xf0, 0xc2, 0x02, 0xe4,
32450 -  0xf5, 0x49, 0xf5, 0x43, 0xf5, 0x45, 0x80, 0x16, 0x90, 0x7f, 0xba, 0xe0, 0x20, 0xe1, 0x0f}},
32451 - {0x1446, 64, { 0x90, 0x7f, 0xbd, 0xe5, 0x49, 0xf0, 0xd2, 0x02, 0xe4, 0xf5, 0x49, 0xf5, 0x43, 0xf5, 0x45, 0xd2, 0xaf,
32452 -  0x80, 0x06, 0x85, 0x49, 0x45, 0xe4, 0xf5, 0x43, 0xe5, 0x3a, 0x60, 0x2d, 0x20, 0x1a, 0x07, 0x90,
32453 -  0x7f, 0x9a, 0xe0, 0x30, 0xe2, 0x0e, 0xe5, 0x3b, 0x60, 0x05, 0xe4, 0xf5, 0x3b, 0xd2, 0x0e, 0xe4,
32454 -  0xf5, 0x3f, 0x80, 0x13, 0xe5, 0x3f, 0xd3, 0x95, 0x6e, 0x50, 0x0c, 0xe5, 0x3f, 0xb5, 0x6e}},
32455 - {0x1486, 64, { 0x05, 0x75, 0x3b, 0x01, 0xd2, 0x0e, 0x05, 0x3f, 0xc2, 0x1a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23,
32456 -  0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5, 0x1c, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x1d, 0x90,
32457 -  0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90,
32458 -  0x7f, 0xd3, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0}},
32459 - {0x14c6, 64, { 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x10, 0xf0, 0x90, 0x7f, 0x94, 0x74, 0x0d, 0xf0, 0x90, 0x7f, 0x9d, 0x74,
32460 -  0x9a, 0xf0, 0x90, 0x7f, 0x97, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0x23, 0xf0, 0x90,
32461 -  0x7f, 0x9e, 0x74, 0x84, 0xf0, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x90, 0x7f,
32462 -  0xcf, 0xf0, 0x75, 0x98, 0x40, 0x43, 0xa8, 0x10, 0xc2, 0x1b, 0xc2, 0x05, 0xc2, 0x21, 0xc2}},
32463 - {0x1506, 64, { 0x0b, 0xc2, 0x13, 0xf5, 0x7c, 0xf5, 0x4a, 0xc2, 0x11, 0xc2, 0x15, 0xf5, 0x42, 0xc2, 0x19, 0xf5, 0x44,
32464 -  0xf5, 0x48, 0xc2, 0x23, 0xc2, 0x1c, 0xf5, 0x2d, 0xf5, 0x2f, 0xc2, 0x07, 0xc2, 0x00, 0xc2, 0x1f,
32465 -  0xf5, 0x3e, 0xc2, 0x09, 0xd2, 0x01, 0xd2, 0x03, 0xd2, 0x0c, 0xf5, 0x26, 0x90, 0x7f, 0xcb, 0xf0,
32466 -  0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xd1, 0xf0, 0x75, 0xc0, 0x40, 0x43, 0xa8, 0x40, 0xc2}},
32467 - {0x1546, 64, { 0x1d, 0xc2, 0x06, 0xc2, 0x22, 0xc2, 0x0d, 0xc2, 0x14, 0xf5, 0x7d, 0xf5, 0x4b, 0xc2, 0x12, 0xc2, 0x16,
32468 -  0xf5, 0x43, 0xc2, 0x1a, 0xf5, 0x45, 0xf5, 0x49, 0xc2, 0x24, 0xc2, 0x1e, 0xf5, 0x39, 0xf5, 0x3b,
32469 -  0xc2, 0x08, 0xc2, 0x00, 0xc2, 0x20, 0xf5, 0x3f, 0xc2, 0x0a, 0xd2, 0x02, 0xd2, 0x04, 0xd2, 0x0e,
32470 +  0x74, 0x35, 0xf0, 0xd2, 0x03, 0xd2, 0x01, 0xd2, 0x09, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0xa2, 0x13,
32471 +  0xe4, 0x33, 0xff, 0x65, 0x2b, 0x60, 0x04, 0x8f, 0x2b, 0xd2, 0x0c, 0xa2, 0x0b, 0xe4, 0x33, 0xff,
32472 +  0x65, 0x2c, 0x60, 0x04, 0x8f, 0x2c, 0xd2, 0x0c, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x08, 0x65}},
32473 + {0x0bc6, 64, { 0x27, 0x60, 0x07, 0xe0, 0x54, 0x08, 0xf5, 0x27, 0xd2, 0x0c, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x40, 0xb5,
32474 +  0x29, 0x09, 0xe0, 0x54, 0x40, 0x64, 0x40, 0xf5, 0x29, 0xd2, 0x0c, 0x30, 0x07, 0x35, 0xc2, 0xaf,
32475 +  0x30, 0x01, 0x18, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0xe5, 0x48, 0x60, 0x09, 0x90, 0x7f,
32476 +  0xb7, 0xf0, 0xe4, 0xf5, 0x48, 0xc2, 0x01, 0xc2, 0x07, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0}},
32477 + {0x0c06, 64, { 0x20, 0xe1, 0x0f, 0xe5, 0x48, 0x60, 0x09, 0x90, 0x7f, 0xb9, 0xf0, 0xe4, 0xf5, 0x48, 0xd2, 0x01, 0xc2,
32478 +  0x07, 0xd2, 0xaf, 0x20, 0x05, 0x37, 0x30, 0x03, 0x1b, 0x90, 0x7f, 0xc6, 0xe0, 0x20, 0xe1, 0x2d,
32479 +  0x90, 0x7e, 0x40, 0xe0, 0x13, 0x92, 0x15, 0x75, 0x4a, 0x01, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x7c,
32480 +  0xd2, 0x05, 0x80, 0x19, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7d, 0xc0, 0xe0}},
32481 + {0x0c46, 64, { 0x13, 0x92, 0x15, 0x75, 0x4a, 0x01, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x7c, 0xd2, 0x05, 0x20, 0x21, 0x33,
32482 +  0x20, 0x00, 0x06, 0xe5, 0x4a, 0x65, 0x7c, 0x70, 0x2a, 0x30, 0x05, 0x1a, 0x30, 0x03, 0x09, 0xe4,
32483 +  0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x03, 0x80, 0x07, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x03, 0xc2,
32484 +  0x05, 0xe4, 0xf5, 0x7c, 0xf5, 0x4a, 0x30, 0x15, 0x0a, 0xc2, 0x15, 0xc2, 0x00, 0x90, 0x7f}},
32485 + {0x0c86, 64, { 0xbf, 0x74, 0x01, 0xf0, 0x30, 0x21, 0x03, 0x02, 0x0d, 0x94, 0x20, 0x05, 0x03, 0x02, 0x0d, 0x94, 0x30,
32486 +  0x1c, 0x0a, 0x90, 0x7f, 0x9b, 0xe0, 0x20, 0xe3, 0x03, 0x02, 0x0d, 0x94, 0x30, 0x0b, 0x03, 0x02,
32487 +  0x0d, 0x94, 0x30, 0x13, 0x03, 0x02, 0x0d, 0x94, 0x30, 0x03, 0x62, 0x30, 0x1b, 0x12, 0xaf, 0x4a,
32488 +  0x05, 0x4a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92}},
32489 + {0x0cc6, 64, { 0x2d, 0xaf, 0x4a, 0x05, 0x4a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5,
32490 +  0x13, 0xe5, 0x4a, 0xc3, 0x95, 0x7c, 0x50, 0x2a, 0x30, 0x1b, 0x12, 0xaf, 0x4a, 0x05, 0x4a, 0x74,
32491 +  0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x17, 0xaf, 0x4a, 0x05,
32492 +  0x4a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x46, 0xd2}},
32493 + {0x0d06, 64, { 0x11, 0x80, 0x6b, 0xc2, 0x11, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x03, 0x80, 0x60, 0x30, 0x1b, 0x12,
32494 +  0xaf, 0x4a, 0x05, 0x4a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13,
32495 +  0x92, 0x2d, 0xaf, 0x4a, 0x05, 0x4a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83,
32496 +  0xe0, 0xf5, 0x13, 0xe5, 0x4a, 0xc3, 0x95, 0x7c, 0x50, 0x2a, 0x30, 0x1b, 0x12, 0xaf, 0x4a}},
32497 + {0x0d46, 64, { 0x05, 0x4a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x17, 0xaf,
32498 +  0x4a, 0x05, 0x4a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x46,
32499 +  0xd2, 0x11, 0x80, 0x09, 0xc2, 0x11, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x03, 0x30, 0x1b, 0x04,
32500 +  0xa2, 0x2d, 0x92, 0x9b, 0xd2, 0x21, 0xc2, 0xaf, 0x85, 0x13, 0x99, 0x20, 0x11, 0x0d, 0x30}},
32501 + {0x0d86, 64, { 0x15, 0x0a, 0xc2, 0x15, 0xc2, 0x00, 0x90, 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x90, 0x7f, 0xd0,
32502 +  0xe0, 0x30, 0xe1, 0x03, 0x02, 0x0e, 0xb5, 0xe4, 0xf5, 0x12, 0x74, 0xc0, 0x25, 0x12, 0xf5, 0x82,
32503 +  0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x12, 0x7c, 0x00, 0x7b, 0x00, 0x24, 0x64, 0xf9,
32504 +  0xec, 0x34, 0x00, 0xfa, 0xef, 0x12, 0x15, 0xcd, 0x05, 0x12, 0xe5, 0x12, 0xb4, 0x18, 0xdb}},
32505 + {0x0dc6, 64, { 0xe5, 0x64, 0x60, 0x0b, 0x75, 0x89, 0x60, 0x75, 0x88, 0x40, 0xd2, 0xdf, 0x85, 0x65, 0x8d, 0xe5, 0x67,
32506 +  0x13, 0x92, 0x1d, 0x92, 0xc7, 0xe5, 0x68, 0x13, 0x92, 0x1e, 0xe5, 0x69, 0x13, 0x92, 0x24, 0xe5,
32507 +  0x6a, 0x60, 0x09, 0x90, 0x7f, 0x97, 0xe0, 0x54, 0xef, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0x97, 0xe0,
32508 +  0x44, 0x10, 0xf0, 0xe5, 0x6b, 0x60, 0x09, 0x90, 0x7f, 0x97, 0xe0, 0x54, 0x7f, 0xf0, 0x80}},
32509 + {0x0e06, 64, { 0x07, 0x90, 0x7f, 0x97, 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x71, 0x60, 0x0b, 0xc2, 0x14, 0xc2, 0x0d, 0x90,
32510 +  0x7f, 0x94, 0xe0, 0x44, 0x08, 0xf0, 0xe5, 0x72, 0x60, 0x0b, 0xd2, 0x0d, 0xd2, 0x0e, 0x90, 0x7f,
32511 +  0x94, 0xe0, 0x44, 0x08, 0xf0, 0xe5, 0x73, 0x60, 0x0d, 0xc2, 0xaf, 0xc2, 0x12, 0xd2, 0x00, 0xe4,
32512 +  0xf5, 0x7d, 0xf5, 0x4b, 0xd2, 0xaf, 0xe5, 0x74, 0x60, 0x05, 0x30, 0x24, 0x02, 0xd2, 0x0d}},
32513 + {0x0e46, 64, { 0xe5, 0x75, 0x60, 0x15, 0x90, 0x7f, 0x94, 0xe0, 0x54, 0xf7, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0x08,
32514 +  0xf0, 0x90, 0x7f, 0x97, 0xe0, 0x54, 0xf7, 0xf0, 0xe5, 0x76, 0x60, 0x0a, 0xd2, 0xc4, 0xc2, 0xc0,
32515 +  0x75, 0x3a, 0x01, 0x75, 0x41, 0x28, 0xe5, 0x77, 0x60, 0x07, 0xc2, 0xc4, 0xe4, 0xf5, 0x49, 0xf5,
32516 +  0x3a, 0xe5, 0x78, 0x60, 0x03, 0xe4, 0xf5, 0x49, 0xe5, 0x79, 0x60, 0x02, 0xd2, 0x08, 0xe5}},
32517 + {0x0e86, 64, { 0x7a, 0x60, 0x08, 0xe5, 0x76, 0x70, 0x02, 0xf5, 0x41, 0xd2, 0x0e, 0xe5, 0x7b, 0x60, 0x19, 0x90, 0x7f,
32518 +  0xd7, 0x74, 0x13, 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x14, 0xf0, 0x74, 0x34, 0xf0, 0x74, 0x16, 0xf0,
32519 +  0x74, 0x36, 0xf0, 0xd2, 0x04, 0xd2, 0x02, 0xd2, 0x0a, 0xe4, 0x90, 0x7f, 0xd1, 0xf0, 0xa2, 0x14,
32520 +  0xe4, 0x33, 0xff, 0x65, 0x37, 0x60, 0x04, 0x8f, 0x37, 0xd2, 0x0e, 0xa2, 0x0d, 0xe4, 0x33}},
32521 + {0x0ec6, 64, { 0xff, 0x65, 0x38, 0x60, 0x04, 0x8f, 0x38, 0xd2, 0x0e, 0x90, 0x7f, 0x9a, 0xe0, 0x54, 0x20, 0x65, 0x33,
32522 +  0x60, 0x07, 0xe0, 0x54, 0x20, 0xf5, 0x33, 0xd2, 0x0e, 0x90, 0x7f, 0x9a, 0xe0, 0x54, 0x40, 0xb5,
32523 +  0x35, 0x09, 0xe0, 0x54, 0x40, 0x64, 0x40, 0xf5, 0x35, 0xd2, 0x0e, 0x30, 0x08, 0x35, 0xc2, 0xaf,
32524 +  0x30, 0x02, 0x18, 0x90, 0x7f, 0xbc, 0xe0, 0x20, 0xe1, 0x27, 0xe5, 0x49, 0x60, 0x09, 0x90}},
32525 + {0x0f06, 64, { 0x7f, 0xbb, 0xf0, 0xe4, 0xf5, 0x49, 0xc2, 0x02, 0xc2, 0x08, 0x80, 0x16, 0x90, 0x7f, 0xba, 0xe0, 0x20,
32526 +  0xe1, 0x0f, 0xe5, 0x49, 0x60, 0x09, 0x90, 0x7f, 0xbd, 0xf0, 0xe4, 0xf5, 0x49, 0xd2, 0x02, 0xc2,
32527 +  0x08, 0xd2, 0xaf, 0x20, 0x06, 0x37, 0x30, 0x04, 0x1b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x2d,
32528 +  0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x16, 0x75, 0x4b, 0x01, 0x90, 0x7f, 0xcb, 0xe0, 0xf5}},
32529 + {0x0f46, 64, { 0x7d, 0xd2, 0x06, 0x80, 0x19, 0x90, 0x7f, 0xcc, 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7c, 0xc0, 0xe0, 0x13,
32530 +  0x92, 0x16, 0x75, 0x4b, 0x01, 0x90, 0x7f, 0xcd, 0xe0, 0xf5, 0x7d, 0xd2, 0x06, 0x20, 0x22, 0x33,
32531 +  0x20, 0x00, 0x06, 0xe5, 0x4b, 0x65, 0x7d, 0x70, 0x2a, 0x30, 0x06, 0x1a, 0x30, 0x04, 0x09, 0xe4,
32532 +  0x90, 0x7f, 0xcb, 0xf0, 0xc2, 0x04, 0x80, 0x07, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0xd2, 0x04}},
32533 + {0x0f86, 64, { 0xc2, 0x06, 0xe4, 0xf5, 0x7d, 0xf5, 0x4b, 0x30, 0x16, 0x0a, 0xc2, 0x16, 0xc2, 0x00, 0x90, 0x7f, 0xc1,
32534 +  0x74, 0x01, 0xf0, 0x30, 0x22, 0x03, 0x02, 0x10, 0xa4, 0x20, 0x06, 0x03, 0x02, 0x10, 0xa4, 0x30,
32535 +  0x1e, 0x0a, 0x90, 0x7f, 0x9a, 0xe0, 0x20, 0xe5, 0x03, 0x02, 0x10, 0xa4, 0x30, 0x0d, 0x03, 0x02,
32536 +  0x10, 0xa4, 0x30, 0x14, 0x03, 0x02, 0x10, 0xa4, 0x30, 0x04, 0x62, 0x30, 0x1d, 0x12, 0xaf}},
32537 + {0x0fc6, 64, { 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x2d,
32538 +  0xaf, 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5,
32539 +  0x13, 0xe5, 0x4b, 0xc3, 0x95, 0x7d, 0x50, 0x2a, 0x30, 0x1d, 0x12, 0xaf, 0x4b, 0x05, 0x4b, 0x74,
32540 +  0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x18, 0xaf, 0x4b}},
32541 + {0x1006, 64, { 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x47, 0xd2, 0x12,
32542 +  0x80, 0x6b, 0xc2, 0x12, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0xc2, 0x04, 0x80, 0x60, 0x30, 0x1d, 0x12,
32543 +  0xaf, 0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0x13,
32544 +  0x92, 0x2d, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5}},
32545 + {0x1046, 64, { 0x83, 0xe0, 0xf5, 0x13, 0xe5, 0x4b, 0xc3, 0x95, 0x7d, 0x50, 0x2a, 0x30, 0x1d, 0x12, 0xaf, 0x4b, 0x05,
32546 +  0x4b, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x18, 0xaf,
32547 +  0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xf5, 0x47,
32548 +  0xd2, 0x12, 0x80, 0x09, 0xc2, 0x12, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0xd2, 0x04, 0x30, 0x1d}},
32549 + {0x1086, 64, { 0x04, 0xa2, 0x2d, 0x92, 0xc3, 0xd2, 0x22, 0xc2, 0xaf, 0x85, 0x13, 0xc1, 0x20, 0x12, 0x0d, 0x30, 0x16,
32550 +  0x0a, 0xc2, 0x16, 0xc2, 0x00, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x90, 0x7f, 0xc2,
32551 +  0xe0, 0x30, 0xe1, 0x03, 0x02, 0x11, 0x7a, 0xe5, 0x1a, 0x70, 0x46, 0x30, 0x0c, 0x3f, 0xe5, 0x40,
32552 +  0x70, 0x3b, 0xa2, 0x09, 0x33, 0xf5, 0x31, 0xc2, 0x09, 0xc2, 0x0c, 0xe4, 0xf5, 0x12, 0x7e}},
32553 + {0x10c6, 64, { 0x00, 0x7b, 0x00, 0x74, 0x26, 0x25, 0x12, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x15, 0x87, 0xff, 0x74,
32554 +  0x80, 0x25, 0x12, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x12, 0xe5, 0x12,
32555 +  0xb4, 0x0c, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x0c, 0xf0, 0x75, 0x40, 0x10, 0x22, 0x75, 0x1a, 0x01,
32556 +  0x22, 0xe5, 0x1a, 0x64, 0x01, 0x70, 0x45, 0x30, 0x0e, 0x3e, 0xe5, 0x41, 0x70, 0x3a, 0xa2}},
32557 + {0x1106, 64, { 0x0a, 0x33, 0xf5, 0x3d, 0xc2, 0x0a, 0xc2, 0x0e, 0xe4, 0xf5, 0x12, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x32,
32558 +  0x25, 0x12, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x15, 0x87, 0xff, 0x74, 0x80, 0x25, 0x12, 0xf5,
32559 +  0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x12, 0xe5, 0x12, 0xb4, 0x0c, 0xdb, 0x90,
32560 +  0x7f, 0xc3, 0x74, 0x0c, 0xf0, 0x75, 0x41, 0x10, 0x75, 0x1a, 0x02, 0x22, 0xe5, 0x1c, 0x60}},
32561 + {0x1146, 64, { 0x30, 0x15, 0x1c, 0xe4, 0xf5, 0x12, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x1b, 0x25, 0x12, 0xf9, 0xee, 0x34,
32562 +  0x00, 0xfa, 0x12, 0x15, 0x87, 0xff, 0x74, 0x80, 0x25, 0x12, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5,
32563 +  0x83, 0xef, 0xf0, 0x05, 0x12, 0xe5, 0x12, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0,
32564 +  0xe4, 0xf5, 0x1a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x16, 0x17, 0x12, 0x40, 0x00, 0x12}},
32565 + {0x1186, 64, { 0xb4, 0x01, 0x13, 0x20, 0x03, 0x11, 0x9e, 0x06, 0x12, 0x33, 0x08, 0x12, 0x2d, 0x09, 0x12, 0x20, 0x0a,
32566 +  0x13, 0x76, 0x0b, 0x00, 0x00, 0x13, 0x6f, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14,
32567 +  0x60, 0x40, 0x24, 0x02, 0x70, 0x69, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f,
32568 +  0xd5, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x17, 0x4b, 0x8b, 0x12}},
32569 + {0x11c6, 64, { 0x8a, 0x13, 0x89, 0x14, 0xea, 0x49, 0x60, 0x11, 0xae, 0x02, 0xee, 0x90, 0x7f, 0xd4, 0xf0, 0xaf, 0x01,
32570 +  0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02,
32571 +  0x13, 0x76, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x17, 0x9a, 0x8b, 0x12, 0x8a, 0x13, 0x89, 0x14,
32572 +  0xea, 0x49, 0x60, 0x11, 0xae, 0x02, 0xee, 0x90, 0x7f, 0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90}},
32573 + {0x1206, 64, { 0x7f, 0xd5, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13, 0x76, 0x90,
32574 +  0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90,
32575 +  0x7f, 0xb5, 0xf0, 0x02, 0x13, 0x76, 0x12, 0x14, 0xc3, 0x02, 0x13, 0x76, 0x90, 0x7f, 0x00, 0x74,
32576 +  0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f}},
32577 + {0x1246, 64, { 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x26, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff,
32578 +  0xa2, 0x2b, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
32579 +  0x02, 0xf0, 0x02, 0x13, 0x76, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
32580 +  0x02, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54}},
32581 + {0x1286, 64, { 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83,
32582 +  0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0,
32583 +  0x02, 0x13, 0x76, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xe8,
32584 +  0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xea}},
32585 + {0x12c6, 64, { 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x26, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02,
32586 +  0x13, 0x76, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff,
32587 +  0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34,
32588 +  0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13}},
32589 + {0x1306, 64, { 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f,
32590 +  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60,
32591 +  0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x26, 0x80, 0x3f,
32592 +  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20}},
32593 + {0x1346, 64, { 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25,
32594 +  0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90,
32595 +  0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90,
32596 +  0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0x20, 0x28, 0x03, 0x02, 0x14, 0xc2, 0xe5, 0x40}},
32597 + {0x1386, 64, { 0x60, 0x02, 0x15, 0x40, 0xe5, 0x48, 0x60, 0x4f, 0x65, 0x44, 0x70, 0x45, 0xe5, 0x42, 0xf4, 0x60, 0x02,
32598 +  0x05, 0x42, 0xe5, 0x42, 0xc3, 0x95, 0x55, 0x40, 0x3d, 0xc2, 0xaf, 0x30, 0x01, 0x18, 0x90, 0x7f,
32599 +  0xb8, 0xe0, 0x20, 0xe1, 0x27, 0x90, 0x7f, 0xb7, 0xe5, 0x48, 0xf0, 0xc2, 0x01, 0xe4, 0xf5, 0x48,
32600 +  0xf5, 0x42, 0xf5, 0x44, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1, 0x0f, 0x90, 0x7f}},
32601 + {0x13c6, 64, { 0xb9, 0xe5, 0x48, 0xf0, 0xd2, 0x01, 0xe4, 0xf5, 0x48, 0xf5, 0x42, 0xf5, 0x44, 0xd2, 0xaf, 0x80, 0x06,
32602 +  0x85, 0x48, 0x44, 0xe4, 0xf5, 0x42, 0xe5, 0x2e, 0x60, 0x2d, 0x20, 0x19, 0x07, 0x90, 0x7f, 0x9b,
32603 +  0xe0, 0x30, 0xe0, 0x0e, 0xe5, 0x2f, 0x60, 0x05, 0xe4, 0xf5, 0x2f, 0xd2, 0x0c, 0xe4, 0xf5, 0x3e,
32604 +  0x80, 0x13, 0xe5, 0x3e, 0xd3, 0x95, 0x56, 0x50, 0x0c, 0xe5, 0x3e, 0xb5, 0x56, 0x05, 0x75}},
32605 + {0x1406, 64, { 0x2f, 0x01, 0xd2, 0x0c, 0x05, 0x3e, 0xc2, 0x19, 0xe5, 0x41, 0x60, 0x02, 0x15, 0x41, 0xe5, 0x49, 0x60,
32606 +  0x4f, 0x65, 0x45, 0x70, 0x45, 0xe5, 0x43, 0xf4, 0x60, 0x02, 0x05, 0x43, 0xe5, 0x43, 0xc3, 0x95,
32607 +  0x6d, 0x40, 0x3d, 0xc2, 0xaf, 0x30, 0x02, 0x18, 0x90, 0x7f, 0xbc, 0xe0, 0x20, 0xe1, 0x27, 0x90,
32608 +  0x7f, 0xbb, 0xe5, 0x49, 0xf0, 0xc2, 0x02, 0xe4, 0xf5, 0x49, 0xf5, 0x43, 0xf5, 0x45, 0x80}},
32609 + {0x1446, 64, { 0x16, 0x90, 0x7f, 0xba, 0xe0, 0x20, 0xe1, 0x0f, 0x90, 0x7f, 0xbd, 0xe5, 0x49, 0xf0, 0xd2, 0x02, 0xe4,
32610 +  0xf5, 0x49, 0xf5, 0x43, 0xf5, 0x45, 0xd2, 0xaf, 0x80, 0x06, 0x85, 0x49, 0x45, 0xe4, 0xf5, 0x43,
32611 +  0xe5, 0x3a, 0x60, 0x2d, 0x20, 0x1a, 0x07, 0x90, 0x7f, 0x9a, 0xe0, 0x30, 0xe2, 0x0e, 0xe5, 0x3b,
32612 +  0x60, 0x05, 0xe4, 0xf5, 0x3b, 0xd2, 0x0e, 0xe4, 0xf5, 0x3f, 0x80, 0x13, 0xe5, 0x3f, 0xd3}},
32613 + {0x1486, 64, { 0x95, 0x6e, 0x50, 0x0c, 0xe5, 0x3f, 0xb5, 0x6e, 0x05, 0x75, 0x3b, 0x01, 0xd2, 0x0e, 0x05, 0x3f, 0xc2,
32614 +  0x1a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5,
32615 +  0x1c, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x1d, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7,
32616 +  0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x22, 0xe4, 0x90, 0x7f}},
32617 + {0x14c6, 64, { 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x10, 0xf0, 0x90, 0x7f,
32618 +  0x94, 0x74, 0x0d, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0x9a, 0xf0, 0x90, 0x7f, 0x97, 0xe0, 0x54, 0xfd,
32619 +  0xf0, 0x90, 0x7f, 0x95, 0x74, 0x23, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x84, 0xf0, 0xe4, 0x90, 0x7f,
32620 +  0xc7, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x90, 0x7f, 0xcf, 0xf0, 0x75, 0x98, 0x40, 0x43, 0xa8}},
32621 + {0x1506, 64, { 0x10, 0xc2, 0x1b, 0xc2, 0x05, 0xc2, 0x21, 0xc2, 0x0b, 0xc2, 0x13, 0xf5, 0x7c, 0xf5, 0x4a, 0xc2, 0x11,
32622 +  0xc2, 0x15, 0xf5, 0x42, 0xc2, 0x19, 0xf5, 0x44, 0xf5, 0x48, 0xc2, 0x23, 0xc2, 0x1c, 0xf5, 0x2d,
32623 +  0xf5, 0x2f, 0xc2, 0x07, 0xc2, 0x00, 0xc2, 0x1f, 0xf5, 0x3e, 0xc2, 0x09, 0xd2, 0x0c, 0xf5, 0x26,
32624 +  0x90, 0x7f, 0xcb, 0xf0, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xd1, 0xf0, 0x75, 0xc0, 0x40}},
32625 + {0x1546, 64, { 0x43, 0xa8, 0x40, 0xc2, 0x1d, 0xc2, 0x06, 0xc2, 0x22, 0xc2, 0x0d, 0xc2, 0x14, 0xf5, 0x7d, 0xf5, 0x4b,
32626 +  0xc2, 0x12, 0xc2, 0x16, 0xf5, 0x43, 0xc2, 0x1a, 0xf5, 0x45, 0xf5, 0x49, 0xc2, 0x24, 0xc2, 0x1e,
32627 +  0xf5, 0x39, 0xf5, 0x3b, 0xc2, 0x08, 0xc2, 0x00, 0xc2, 0x20, 0xf5, 0x3f, 0xc2, 0x0a, 0xd2, 0x0e,
32628    0x75, 0x32, 0x01, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xd2, 0x28}},
32629   {0x1586, 64, { 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02,
32630    0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5,
32631 @@ -384,7 +389,7 @@
32632    0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8,
32633    0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46,
32634    0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x18}},
32635 - {0x1686, 64, { 0xcc, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe,
32636 + {0x1686, 64, { 0xc5, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe,
32637    0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4,
32638    0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5,
32639    0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde}},
32640 @@ -393,9 +398,9 @@
32641    0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90,
32642    0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44}},
32643   {0x1706, 64, { 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0xbc, 0xd2, 0xbe, 0xd2, 0x2d,
32644 -  0x12, 0x18, 0x86, 0xc2, 0x27, 0xc2, 0x25, 0xc2, 0x28, 0x30, 0x28, 0x03, 0x12, 0x0a, 0x83, 0x90,
32645 -  0x7f, 0xd8, 0xe0, 0x65, 0x10, 0x60, 0x08, 0xe0, 0xf5, 0x10, 0x12, 0x13, 0x76, 0x80, 0xea, 0x30,
32646 -  0x27, 0x07, 0xc2, 0x27, 0x12, 0x11, 0x73, 0x80, 0xe0, 0x30, 0x2c, 0xdd, 0xc2, 0x2c, 0x12}},
32647 +  0x12, 0x18, 0x7f, 0xc2, 0x27, 0xc2, 0x25, 0xc2, 0x28, 0x30, 0x28, 0x03, 0x12, 0x0a, 0x83, 0x90,
32648 +  0x7f, 0xd8, 0xe0, 0x65, 0x10, 0x60, 0x08, 0xe0, 0xf5, 0x10, 0x12, 0x13, 0x7e, 0x80, 0xea, 0x30,
32649 +  0x27, 0x07, 0xc2, 0x27, 0x12, 0x11, 0x7b, 0x80, 0xe0, 0x30, 0x2c, 0xdd, 0xc2, 0x2c, 0x12}},
32650   {0x1746, 64, { 0x00, 0x26, 0x80, 0xd6, 0x22, 0xe4, 0xfe, 0x75, 0x17, 0xff, 0x75, 0x18, 0x19, 0x75, 0x19, 0x12, 0xab,
32651    0x17, 0xaa, 0x18, 0xa9, 0x19, 0x90, 0x00, 0x01, 0x12, 0x15, 0xa0, 0x64, 0x02, 0x70, 0x2d, 0xad,
32652    0x06, 0x0e, 0xed, 0xb5, 0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0x15, 0xdf, 0x85, 0xf0, 0x15,
32653 @@ -405,33 +410,33 @@
32654    0x86, 0xab, 0x17, 0xaa, 0x18, 0xa9, 0x19, 0x90, 0x00, 0x01, 0x12, 0x15, 0xa0, 0xb4, 0x03, 0x1d,
32655    0xaf, 0x16, 0x05, 0x16, 0xef, 0xb5, 0x15, 0x01, 0x22, 0x12, 0x15, 0x87, 0x7e, 0x00, 0x29}},
32656   {0x17c6, 64, { 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x17, 0xff, 0xf5, 0x18, 0x89, 0x19, 0x80, 0xd4, 0x7b, 0x00, 0x7a,
32657 -  0x00, 0x79, 0x00, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86,
32658 -  0x75, 0x86, 0x00, 0x30, 0x2a, 0x04, 0xc2, 0x2a, 0x80, 0x02, 0xd2, 0x2c, 0x53, 0x91, 0xef, 0x90,
32659 -  0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83}},
32660 - {0x1806, 64, { 0xd0, 0xe0, 0x32, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0xf0, 0x90, 0x7f, 0x94, 0xf0, 0x90,
32661 -  0x7f, 0x9d, 0x74, 0x02, 0xf0, 0x90, 0x7f, 0x97, 0xf0, 0xe4, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f,
32662 -  0x9e, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x90, 0x7f, 0x9d, 0xf0, 0x22, 0xc0, 0xe0,
32663 -  0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f}},
32664 - {0x1846, 64, { 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0,
32665 -  0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85,
32666 -  0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x27, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74,
32667 -  0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32}},
32668 - {0x1886, 64, { 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x2d, 0x04, 0xe0, 0x44, 0x02,
32669 -  0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x00, 0x06, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0,
32670 -  0x44, 0x04, 0xf0, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82,
32671 -  0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01}},
32672 - {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xc1, 0xaa, 0x01, 0x1a, 0x00, 0x03, 0x1b, 0x03, 0x00, 0x00, 0xc1,
32673 -  0x27, 0xc1, 0x2c, 0xc1, 0x26, 0xc1, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32674 +  0x00, 0x79, 0x00, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0xf0, 0x90, 0x7f, 0x94,
32675 +  0xf0, 0x90, 0x7f, 0x9d, 0x74, 0x02, 0xf0, 0x90, 0x7f, 0x97, 0xf0, 0xe4, 0x90, 0x7f, 0x95, 0xf0,
32676 +  0x90, 0x7f, 0x9e, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x90, 0x7f, 0x9d, 0xf0}},
32677 + {0x1806, 64, { 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90,
32678 +  0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0,
32679 +  0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82,
32680 +  0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x27, 0x53, 0x91, 0xef, 0x90}},
32681 + {0x1846, 64, { 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0,
32682 +  0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00,
32683 +  0xd2, 0x2c, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0,
32684 +  0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0}},
32685 + {0x1886, 64, { 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x2d, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x00,
32686 +  0x06, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0, 0x22, 0x74, 0x00, 0xf5,
32687 +  0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f,
32688 +  0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xc1}},
32689 + {0x18c6, 64, { 0xaa, 0x01, 0x1a, 0x00, 0x03, 0x1b, 0x03, 0x00, 0x00, 0xc1, 0x27, 0xc1, 0x2c, 0xc1, 0x26, 0xc1, 0x2b,
32690 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32691    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32692 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
32693 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
32694   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x0f, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x01, 0x09, 0x02, 0x74, 0x00, 0x01,
32695    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
32696    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
32697    0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x05, 0x02, 0x40, 0x00}},
32698   {0x1946, 64, { 0x00, 0x07, 0x05, 0x06, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05,
32699 -  0x81, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x83, 0x02,
32700 -  0x40, 0x00, 0x00, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
32701 -  0x00, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x00}},
32702 +  0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x83, 0x02,
32703 +  0x40, 0x00, 0x01, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
32704 +  0x01, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x01}},
32705   {0x1986, 64, { 0x04, 0x03, 0x09, 0x04, 0x48, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61,
32706    0x00, 0x6e, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x61, 0x00, 0x20, 0x00, 0x64, 0x00, 0x69, 0x00, 0x76,
32707    0x00, 0x69, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x6f, 0x00, 0x66,
32708 @@ -455,7 +460,7 @@
32709   {0x1ac6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32710    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32711    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32712 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x18, 0x5f, 0x00, 0x02, 0x1b}},
32713 - {0x1b06,  9, { 0x04, 0x00, 0x02, 0x18, 0x35, 0x00, 0x02, 0x17, 0xdb}},
32714 -{ 0xffff,      0,      {0x00} }
32715 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x18, 0x31, 0x00, 0x02, 0x1b}},
32716 + {0x1b06,  9, { 0x04, 0x00, 0x02, 0x18, 0x07, 0x00, 0x02, 0x18, 0x58}},
32717 + {0xffff,  0, {0x00}}
32718  };
32719 diff -Nur linux-2.4.19.org/drivers/usb/serial/keyspan_usa28msg.h linux-2.4.19/drivers/usb/serial/keyspan_usa28msg.h
32720 --- linux-2.4.19.org/drivers/usb/serial/keyspan_usa28msg.h      Wed Oct 10 00:15:02 2001
32721 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa28msg.h  Thu Oct 31 08:11:25 2002
32722 @@ -95,7 +95,7 @@
32723  #define        __USA28MSG__
32724  
32725  
32726 -typedef struct keyspan_usa28_portControlMessage
32727 +struct keyspan_usa28_portControlMessage
32728  {
32729         /*
32730                 there are four types of "commands" sent in the control message:
32731 @@ -146,9 +146,9 @@
32732                 returnStatus,   // return current status n times (1 or 2)
32733                 resetDataToggle;// reset data toggle state to DATA0
32734         
32735 -} keyspan_usa28_portControlMessage;
32736 +};
32737  
32738 -typedef struct keyspan_usa28_portStatusMessage
32739 +struct keyspan_usa28_portStatusMessage
32740  {
32741         u8      port,                   // 0=first, 1=second, 2=global (see below)
32742                 cts,
32743 @@ -164,32 +164,32 @@
32744                 rxBreak,                // 1=we're in break state
32745                 rs232invalid,   // 1=no valid signals on rs-232 inputs
32746                 controlResponse;// 1=a control messages has been processed
32747 -} keyspan_usa28_portStatusMessage;
32748 +};
32749  
32750  // bit defines in txState
32751  #define        TX_OFF                  0x01    // requested by host txOff command
32752  #define        TX_XOFF                 0x02    // either real, or simulated by host
32753  
32754 -typedef struct keyspan_usa28_globalControlMessage
32755 +struct keyspan_usa28_globalControlMessage
32756  {
32757         u8      sendGlobalStatus,       // 2=request for two status responses
32758                 resetStatusToggle,      // 1=reset global status toggle
32759                 resetStatusCount;       // a cycling value
32760 -} keyspan_usa28_globalControlMessage;
32761 +};
32762  
32763 -typedef struct keyspan_usa28_globalStatusMessage
32764 +struct keyspan_usa28_globalStatusMessage
32765  {
32766         u8      port,                           // 3
32767                 sendGlobalStatus,       // from request, decremented
32768                 resetStatusCount;       // as in request
32769 -} keyspan_usa28_globalStatusMessage;
32770 +};
32771  
32772 -typedef struct keyspan_usa28_globalDebugMessage
32773 +struct keyspan_usa28_globalDebugMessage
32774  {
32775         u8      port,                           // 2
32776                 n,                                      // typically a count/status byte
32777                 b;                                      // typically a data byte
32778 -} keyspan_usa28_globalDebugMessage;
32779 +};
32780  
32781  // ie: the maximum length of an EZUSB endpoint buffer
32782  #define        MAX_DATA_LEN                    64
32783 diff -Nur linux-2.4.19.org/drivers/usb/serial/keyspan_usa28x_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa28x_fw.h
32784 --- linux-2.4.19.org/drivers/usb/serial/keyspan_usa28x_fw.h     Wed Oct 10 00:15:02 2001
32785 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa28x_fw.h Thu Oct 31 08:11:25 2002
32786 @@ -1,341 +1,346 @@
32787  /* keyspan_usa28x_fw.h
32788 -  
32789 -   Generated from Keyspan firmware image usa26code.h Sat Oct  6 12:08:55 EST 2001
32790 -   This firmware is for the Keyspan USA-28X Serial Adaptor
32791  
32792 -   "The firmware contained herein as keyspan_usa28x_fw.h is
32793 -   Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
32794 -   ("Keyspan"), as an unpublished work.  This notice does not imply
32795 -   unrestricted or public access to this firmware which is a trade secret of
32796 -   Keyspan, and which may not be reproduced, used, sold or transferred to any
32797 -   third party without Keyspan's prior written consent.  All Rights Reserved.
32798 +       The firmware contained herein as keyspan_usa28x_fw.h is
32799  
32800 -   This firmware may not be modified and may only be used with the Keyspan 
32801 -   USA-28X Serial Adapter.  Distribution and/or Modification of the
32802 -   keyspan.c driver which includes this firmware, in whole or in part,
32803 -   requires the inclusion of this statement."
32804 +               Copyright (C) 1999-2001
32805 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
32806 +               
32807 +       as an unpublished work. This notice does not imply unrestricted or
32808 +       public access to the source code from which this firmware image is
32809 +       derived.  Except as noted below this firmware image may not be 
32810 +       reproduced, used, sold or transferred to any third party without 
32811 +       Keyspan's prior written consent.  All Rights Reserved.
32812 +
32813 +       Permission is hereby granted for the distribution of this firmware 
32814 +       image as part of a Linux or other Open Source operating system kernel 
32815 +       in text or binary form as required. 
32816 +
32817 +       This firmware may not be modified and may only be used with  
32818 +       Keyspan hardware.  Distribution and/or Modification of the 
32819 +       keyspan.c driver which includes this firmware, in whole or in 
32820 +       part, requires the inclusion of this statement."
32821  
32822  */
32823  
32824  static const struct ezusb_hex_record keyspan_usa28x_firmware[] = {
32825 - {0x0033,  3, { 0x02, 0x13, 0xab}},
32826 + {0x0033,  3, { 0x02, 0x12, 0xf7}},
32827   {0x0003, 16, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0}},
32828   {0x0013, 16, { 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90}},
32829   {0x0023, 15, { 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x07, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22}},
32830 - {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x33, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
32831 + {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x1b, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
32832   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x09, 0xc2, 0x00, 0x80, 0x77, 0x30, 0x03, 0x3b, 0x90, 0x7f}},
32833 - {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x33, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
32834 + {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x1b, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
32835   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x09, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60}},
32836 - {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xca}},
32837 + {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xba}},
32838   {0x0096, 16, { 0xc2, 0x03, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
32839 - {0x00a6, 16, { 0x12, 0x13, 0x33, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
32840 + {0x00a6, 16, { 0x12, 0x13, 0x1b, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
32841   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d}},
32842 - {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xca, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
32843 - {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x66, 0x53, 0x36, 0x80, 0x12}},
32844 - {0x00e6, 16, { 0x13, 0x3f, 0xef, 0x42, 0x36, 0x12, 0x11, 0xed, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3a, 0x50, 0x0f}},
32845 - {0x00f6, 16, { 0x12, 0x13, 0x1b, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x61, 0xc2}},
32846 + {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xba, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
32847 + {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x60, 0x12, 0x11, 0xd6, 0x8f}},
32848 + {0x00e6, 16, { 0x19, 0x12, 0x13, 0x27, 0x8f, 0x36, 0xe5, 0x19, 0xc3, 0x95, 0x3a, 0x50, 0x0f, 0x12, 0x12, 0xeb}},
32849 + {0x00f6, 16, { 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x5e, 0xc2, 0x0b, 0xe5, 0x19}},
32850   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
32851   {0x0043,  3, { 0x02, 0x13, 0x00}},
32852 - {0x0000,  3, { 0x02, 0x0e, 0x10}},
32853 - {0x0106, 64, { 0x0b, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x36, 0x80, 0x57, 0x12, 0x13, 0x3f, 0xef, 0x42, 0x36, 0xe5, 0x36,
32854 -  0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08,
32855 -  0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x5b, 0xe5,
32856 -  0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40}},
32857 - {0x0146, 64, { 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08, 0xe4, 0x90, 0x7e, 0x80, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75,
32858 -  0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12, 0x0c, 0xef, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90,
32859 -  0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x05, 0x03, 0x02, 0x03, 0xc5, 0xc2, 0x05, 0xe4, 0xf5,
32860 -  0x18, 0x74, 0x40, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5}},
32861 - {0x0186, 64, { 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
32862 -  0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68,
32863 -  0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xc8, 0x7f, 0x03, 0x7d,
32864 -  0xcd, 0x12, 0x11, 0xc8, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0}},
32865 - {0x01c6, 64, { 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12,
32866 -  0x10, 0x4c, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12, 0x10, 0x72, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0,
32867 -  0xfd, 0x12, 0x11, 0xc8, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xc8, 0x43, 0x46, 0x80, 0x90, 0x7f,
32868 -  0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12}},
32869 - {0x0206, 64, { 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e,
32870 -  0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0,
32871 -  0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0,
32872 -  0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e, 0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43}},
32873 - {0x0246, 64, { 0x42, 0x80, 0x80, 0x03, 0x53, 0x42, 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43,
32874 -  0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x10, 0xbe, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xe4,
32875 -  0xaf, 0x42, 0x12, 0x10, 0x98, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42,
32876 -  0x12, 0x10, 0x98, 0x90, 0x7e, 0x0c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46}},
32877 - {0x0286, 64, { 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46,
32878 -  0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03,
32879 -  0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90,
32880 -  0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3, 0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3}},
32881 - {0x02c6, 64, { 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10, 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
32882 -  0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90,
32883 -  0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98,
32884 -  0x74, 0x11, 0xf0, 0x12, 0x13, 0x0f, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e}},
32885 - {0x0306, 64, { 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xc8, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e,
32886 -  0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xc8, 0x75, 0x29,
32887 -  0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5,
32888 -  0x40, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11}},
32889 - {0x0346, 64, { 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
32890 -  0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xc8,
32891 -  0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff,
32892 -  0xad, 0x3e, 0x12, 0x11, 0xc8, 0xe4, 0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60}},
32893 - {0x0386, 64, { 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
32894 -  0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4,
32895 -  0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e, 0x1f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0,
32896 -  0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35, 0xf0, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30}},
32897 - {0x03c6, 64, { 0x1a, 0x52, 0xe5, 0x38, 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40,
32898 -  0x04, 0x15, 0x13, 0x80, 0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x13, 0x0f,
32899 -  0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13,
32900 -  0x4b, 0xef, 0x54, 0x80, 0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07}},
32901 - {0x0406, 64, { 0x30, 0x0d, 0x11, 0x12, 0x13, 0x4b, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19,
32902 -  0x25, 0xd2, 0x07, 0x20, 0x1b, 0x03, 0x02, 0x07, 0xf4, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x87, 0xef,
32903 -  0xc3, 0x95, 0x3d, 0x40, 0x03, 0x02, 0x04, 0xb2, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a,
32904 -  0xc2, 0x00, 0x80, 0x77, 0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12}},
32905 - {0x0446, 64, { 0x13, 0x87, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f,
32906 -  0xcb, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41,
32907 -  0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x41, 0x12, 0x0d, 0x14, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0,
32908 -  0x80, 0x39, 0x90, 0x7f, 0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x87, 0xef, 0xc3, 0x94}},
32909 - {0x0486, 64, { 0x40, 0x50, 0x29, 0x90, 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19,
32910 -  0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d,
32911 -  0xc1, 0x12, 0x0d, 0x14, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30,
32912 -  0xe1, 0x03, 0x02, 0x05, 0x40, 0x53, 0x37, 0x80, 0x12, 0x13, 0x93, 0xef, 0x42, 0x37, 0x12}},
32913 - {0x04c6, 64, { 0x12, 0x37, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x6f, 0xef, 0x30, 0xe0, 0x08,
32914 -  0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c, 0x61, 0xc2, 0x0c, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x37,
32915 -  0x80, 0x57, 0x12, 0x13, 0x93, 0xef, 0x42, 0x37, 0xe5, 0x37, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3,
32916 -  0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7d, 0x7f, 0x80, 0x75}},
32917 - {0x0506, 64, { 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0x94, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb,
32918 -  0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08,
32919 -  0xe4, 0x90, 0x7d, 0x80, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12,
32920 -  0x0d, 0x39, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90, 0x7f, 0xd0, 0xe0, 0x30, 0xe1}},
32921 - {0x0546, 64, { 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x9f, 0xc2, 0x06, 0xe4, 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5,
32922 -  0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e,
32923 -  0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5,
32924 -  0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x23, 0xe0, 0x60}},
32925 - {0x0586, 64, { 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x12, 0x12, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x12, 0x12, 0x43, 0x47,
32926 -  0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e,
32927 -  0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12, 0x11, 0x30, 0x90, 0x7e, 0x22, 0xe0,
32928 -  0xff, 0x12, 0x11, 0x56, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0, 0xfd, 0x12, 0x12, 0x12, 0x7f}},
32929 - {0x05c6, 64, { 0x03, 0x7d, 0x07, 0x12, 0x12, 0x12, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0,
32930 -  0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0,
32931 -  0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90,
32932 -  0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54}},
32933 - {0x0606, 64, { 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e,
32934 -  0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43, 0x80, 0x80, 0x03, 0x53, 0x43, 0x7f,
32935 -  0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43, 0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12,
32936 -  0x11, 0x7c, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0xa2, 0xaf, 0x43, 0x12, 0x11, 0x0a}},
32937 - {0x0646, 64, { 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf, 0x43, 0x12, 0x11, 0x0a, 0x90, 0x7e, 0x2c,
32938 -  0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02, 0x80, 0x03, 0x53, 0x47, 0xfd, 0x90,
32939 -  0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60,
32940 -  0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03, 0x53, 0x47, 0xfe, 0x90, 0x7f}},
32941 - {0x0686, 64, { 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3,
32942 -  0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x10, 0x80,
32943 -  0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0,
32944 -  0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0}},
32945 - {0x06c6, 64, { 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x63,
32946 -  0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12,
32947 -  0x12, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e, 0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f,
32948 -  0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x12, 0x75, 0x32, 0x01, 0xd2, 0x08, 0x90, 0x7e}},
32949 - {0x0706, 64, { 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00,
32950 -  0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43, 0x45, 0x40, 0x90, 0x7f, 0x98, 0x74,
32951 -  0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f,
32952 -  0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x12, 0x75, 0x34, 0x01, 0xd2, 0x08}},
32953 - {0x0746, 64, { 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x12, 0xe4,
32954 -  0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
32955 -  0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c,
32956 -  0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4, 0xf5, 0x39, 0xd2, 0x08, 0x90}},
32957 - {0x0786, 64, { 0x7e, 0x3f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x13, 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0,
32958 -  0x74, 0x36, 0xf0, 0xe4, 0x90, 0x7f, 0xd1, 0xf0, 0x30, 0x1a, 0x52, 0xe5, 0x39, 0x60, 0x02, 0x15,
32959 -  0x39, 0x30, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x3e, 0x75,
32960 -  0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12, 0x13, 0x63, 0xef, 0x54, 0x01, 0xf5, 0x19}},
32961 - {0x07c6, 64, { 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2, 0x08, 0x12, 0x13, 0x9f, 0xef, 0x54, 0x80, 0xf5, 0x19,
32962 -  0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2, 0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x9f, 0xef,
32963 -  0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05, 0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a,
32964 -  0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5}},
32965 - {0x0806, 64, { 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74,
32966 -  0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1,
32967 -  0x03, 0x02, 0x09, 0x28, 0xe5, 0x0a, 0x70, 0x40, 0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2,
32968 -  0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
32969 - {0x0846, 64, { 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
32970 -  0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38,
32971 -  0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22, 0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08,
32972 -  0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d}},
32973 - {0x0886, 64, { 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82,
32974 -  0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f,
32975 -  0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4, 0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a,
32976 -  0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2, 0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00}},
32977 - {0x08c6, 64, { 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18,
32978 -  0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb,
32979 -  0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a, 0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15,
32980 -  0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
32981 - {0x0906, 64, { 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
32982 -  0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5,
32983 -  0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0e, 0xf4, 0x0a, 0x10, 0x00, 0x0a, 0x84, 0x01, 0x0a,
32984 -  0xf0, 0x03, 0x09, 0x4c, 0x06, 0x0a, 0x03, 0x08, 0x09, 0xfd, 0x09, 0x09, 0xe5, 0x0a, 0x09}},
32985 - {0x0946, 64, { 0xf4, 0x0b, 0x00, 0x00, 0x0b, 0x3f, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61,
32986 -  0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xdb, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90,
32987 -  0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02,
32988 -  0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83}},
32989 - {0x0986, 64, { 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75,
32990 -  0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83,
32991 -  0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b,
32992 -  0x46, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f, 0x1a, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90}},
32993 - {0x09c6, 64, { 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01,
32994 -  0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f,
32995 -  0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea,
32996 -  0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x46, 0x12, 0x0b, 0x4e, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0x00}},
32997 - {0x0a06, 64, { 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60,
32998 -  0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff,
32999 -  0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
33000 -  0x02, 0xf0, 0x02, 0x0b, 0x46, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5}},
33001 - {0x0a46, 64, { 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f,
33002 -  0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83,
33003 -  0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0,
33004 -  0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f}},
33005 - {0x0a86, 64, { 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0,
33006 -  0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02,
33007 -  0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff,
33008 -  0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4}},
33009 - {0x0ac6, 64, { 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54,
33010 -  0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f,
33011 -  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60,
33012 -  0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80}},
33013 - {0x0b06, 64, { 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90,
33014 -  0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25,
33015 -  0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90,
33016 -  0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0}},
33017 - {0x0b46, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74,
33018 -  0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e,
33019 -  0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18, 0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74,
33020 -  0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5, 0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74}},
33021 - {0x0b86, 64, { 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5, 0x18, 0xb4,
33022 -  0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38, 0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b,
33023 -  0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13, 0xd2, 0x03, 0xd2, 0x01, 0x90, 0x7f, 0x98, 0x74,
33024 -  0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd}},
33025 - {0x0bc6, 64, { 0x12, 0x11, 0xc8, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0x98, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x7f,
33026 -  0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
33027 -  0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x11, 0xc8, 0xe4,
33028 -  0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xc8, 0x90, 0x7f, 0x98, 0x74, 0x11}},
33029 - {0x0c06, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11, 0xc8, 0x7f, 0x01, 0x12, 0x12,
33030 -  0x81, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xc8, 0x20, 0x1b, 0x03, 0x02, 0x0c, 0xc7, 0x75, 0x2d,
33031 -  0x01, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4,
33032 -  0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b, 0x01, 0xe4, 0xf5}},
33033 - {0x0c46, 64, { 0x39, 0xf5, 0x13, 0xf5, 0x37, 0xc2, 0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2, 0x00, 0xc2, 0x0a, 0xc2, 0x13,
33034 -  0xd2, 0x04, 0xd2, 0x02, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00,
33035 -  0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x12, 0x12, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x11,
33036 -  0x0a, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x7f, 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90}},
33037 - {0x0c86, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80,
33038 -  0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x12, 0x12, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12,
33039 -  0x12, 0x12, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d,
33040 -  0x7f, 0x12, 0x12, 0x12, 0x7f, 0x01, 0x12, 0x12, 0xa2, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12}},
33041 - {0x0cc6, 64, { 0x12, 0xd2, 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5,
33042 -  0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86,
33043 + {0x0000,  3, { 0x02, 0x0e, 0x00}},
33044 + {0x0106, 64, { 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x36, 0x02, 0xe5, 0x36, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94,
33045 +  0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e,
33046 +  0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x4b, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0,
33047 +  0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08}},
33048 + {0x0146, 64, { 0x90, 0x7e, 0x80, 0xe5, 0x36, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12,
33049 +  0x0c, 0xdf, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06,
33050 +  0x20, 0x05, 0x03, 0x02, 0x03, 0xc1, 0xc2, 0x05, 0xe4, 0xf5, 0x18, 0x74, 0x40, 0x25, 0x18, 0xf5,
33051 +  0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a}},
33052 + {0x0186, 64, { 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5,
33053 +  0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24,
33054 +  0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xb1, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x11, 0xb1, 0x43, 0x46,
33055 +  0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90}},
33056 + {0x01c6, 64, { 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x10, 0x35, 0x90, 0x7e, 0x02, 0xe0,
33057 +  0xff, 0x12, 0x10, 0x5b, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12, 0x11, 0xb1, 0x7f, 0x03,
33058 +  0x7d, 0x07, 0x12, 0x11, 0xb1, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0,
33059 +  0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90}},
33060 + {0x0206, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90,
33061 +  0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f,
33062 +  0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e,
33063 +  0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x42, 0x80, 0x80, 0x03, 0x53, 0x42}},
33064 + {0x0246, 64, { 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12,
33065 +  0x10, 0xa7, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xcd, 0xaf, 0x42, 0x12, 0x10, 0x81, 0x90,
33066 +  0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42, 0x12, 0x10, 0x81, 0x90, 0x7e, 0x0c,
33067 +  0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd}},
33068 + {0x0286, 64, { 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60,
33069 +  0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03, 0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98,
33070 +  0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3,
33071 +  0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10}},
33072 + {0x02c6, 64, { 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0,
33073 +  0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5,
33074 +  0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x12, 0x12, 0xdf,
33075 +  0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e, 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12}},
33076 + {0x0306, 64, { 0x11, 0xb1, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e,
33077 +  0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xb1, 0x75, 0x29, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18,
33078 +  0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x04, 0x90, 0xc0, 0x00,
33079 +  0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11, 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98}},
33080 + {0x0346, 64, { 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f,
33081 +  0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xb1, 0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90,
33082 +  0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xb1, 0xe4,
33083 +  0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12}},
33084 + {0x0386, 64, { 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b,
33085 +  0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4, 0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e,
33086 +  0x1f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0,
33087 +  0x74, 0x35, 0xf0, 0xd2, 0x03, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30, 0x1a, 0x52, 0xe5, 0x38}},
33088 + {0x03c6, 64, { 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80,
33089 +  0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x12, 0xdf, 0xef, 0x54, 0x01, 0xf5,
33090 +  0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13, 0x33, 0xef, 0x54, 0x80,
33091 +  0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07, 0x30, 0x0d, 0x11, 0x12}},
33092 + {0x0406, 64, { 0x13, 0x33, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19, 0x25, 0xd2, 0x07, 0x20,
33093 +  0x1b, 0x03, 0x02, 0x07, 0xec, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x6f, 0xef, 0xc3, 0x95, 0x3d, 0x40,
33094 +  0x03, 0x02, 0x04, 0xae, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a, 0xc2, 0x00, 0x80, 0x77,
33095 +  0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x6f, 0xef, 0xc3}},
33096 + {0x0446, 64, { 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcb, 0xe0, 0x14, 0xf5,
33097 +  0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41, 0x75, 0x0c, 0x7d, 0x75,
33098 +  0x0d, 0x41, 0x12, 0x0d, 0x04, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0x80, 0x39, 0x90, 0x7f,
33099 +  0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x6f, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90}},
33100 + {0x0486, 64, { 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60,
33101 +  0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d, 0xc1, 0x12, 0x0d, 0x04,
33102 +  0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x05,
33103 +  0x36, 0x12, 0x12, 0x20, 0x8f, 0x19, 0x12, 0x13, 0x7b, 0x8f, 0x37, 0xe5, 0x19, 0xc3, 0x95}},
33104 + {0x04c6, 64, { 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x57, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c,
33105 +  0x5e, 0xc2, 0x0c, 0xe5, 0x19, 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x37, 0x02, 0xe5, 0x37, 0x30,
33106 +  0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e,
33107 +  0x7d, 0x7f, 0x80, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0x84, 0xe5}},
33108 + {0x0506, 64, { 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb, 0xf0, 0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75,
33109 +  0x19, 0x3f, 0x85, 0x19, 0x08, 0x90, 0x7d, 0x80, 0xe5, 0x37, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75,
33110 +  0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12, 0x0d, 0x29, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90,
33111 +  0x7f, 0xd0, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x97, 0xc2, 0x06, 0xe4}},
33112 + {0x0546, 64, { 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18,
33113 +  0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
33114 +  0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68,
33115 +  0x90, 0x7e, 0x23, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xfb, 0x7f, 0x03}},
33116 + {0x0586, 64, { 0x7d, 0xcd, 0x12, 0x11, 0xfb, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00,
33117 +  0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12,
33118 +  0x11, 0x19, 0x90, 0x7e, 0x22, 0xe0, 0xff, 0x12, 0x11, 0x3f, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0,
33119 +  0xfd, 0x12, 0x11, 0xfb, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xfb, 0x43, 0x47, 0x80, 0x90}},
33120 + {0x05c6, 64, { 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
33121 +  0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e,
33122 +  0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0,
33123 +  0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90}},
33124 + {0x0606, 64, { 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e, 0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43,
33125 +  0x80, 0x80, 0x03, 0x53, 0x43, 0x7f, 0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43,
33126 +  0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x11, 0x65, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0x8b,
33127 +  0xaf, 0x43, 0x12, 0x10, 0xf3, 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf}},
33128 + {0x0646, 64, { 0x43, 0x12, 0x10, 0xf3, 0x90, 0x7e, 0x2c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02,
33129 +  0x80, 0x03, 0x53, 0x47, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47,
33130 +  0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03,
33131 +  0x53, 0x47, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0}},
33132 + {0x0686, 64, { 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3, 0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0,
33133 +  0x60, 0x05, 0x43, 0x47, 0x10, 0x80, 0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0,
33134 +  0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90,
33135 +  0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f}},
33136 + {0x06c6, 64, { 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x4b, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd,
33137 +  0xe4, 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e,
33138 +  0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb, 0x75, 0x32,
33139 +  0x01, 0xd2, 0x08, 0x90, 0x7e, 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0}},
33140 + {0x0706, 64, { 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43,
33141 +  0x45, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
33142 +  0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f, 0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb,
33143 +  0x75, 0x34, 0x01, 0xd2, 0x08, 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4}},
33144 + {0x0746, 64, { 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb, 0xe4, 0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e,
33145 +  0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
33146 +  0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c, 0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4,
33147 +  0xf5, 0x39, 0xd2, 0x08, 0x90, 0x7e, 0x3f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x13}},
33148 + {0x0786, 64, { 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0, 0x74, 0x36, 0xf0, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xd1, 0xf0,
33149 +  0x30, 0x1a, 0x52, 0xe5, 0x39, 0x60, 0x02, 0x15, 0x39, 0x30, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94,
33150 +  0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12,
33151 +  0x13, 0x4b, 0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2}},
33152 + {0x07c6, 64, { 0x08, 0x12, 0x13, 0x87, 0xef, 0x54, 0x80, 0xf5, 0x19, 0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2,
33153 +  0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x87, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05,
33154 +  0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90,
33155 +  0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5, 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90}},
33156 + {0x0806, 64, { 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f,
33157 +  0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x09, 0x20, 0xe5, 0x0a, 0x70, 0x40,
33158 +  0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2, 0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74,
33159 +  0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25}},
33160 + {0x0846, 64, { 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb,
33161 +  0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38, 0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22,
33162 +  0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08, 0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5,
33163 +  0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12}},
33164 + {0x0886, 64, { 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05,
33165 +  0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4,
33166 +  0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a, 0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2,
33167 +  0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
33168 + {0x08c6, 64, { 0xfa, 0x12, 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
33169 +  0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a,
33170 +  0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15, 0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74,
33171 +  0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25}},
33172 + {0x0906, 64, { 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb,
33173 +  0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0e,
33174 +  0xe4, 0x0a, 0x08, 0x00, 0x0a, 0x7c, 0x01, 0x0a, 0xe8, 0x03, 0x09, 0x44, 0x06, 0x09, 0xfb, 0x08,
33175 +  0x09, 0xf5, 0x09, 0x09, 0xdd, 0x0a, 0x09, 0xec, 0x0b, 0x00, 0x00, 0x0b, 0x37, 0x90, 0x7f}},
33176 + {0x0946, 64, { 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61, 0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xd3, 0x74,
33177 +  0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f,
33178 +  0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19,
33179 +  0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19}},
33180 + {0x0986, 64, { 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f,
33181 +  0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0,
33182 +  0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f,
33183 +  0x0a, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0}},
33184 + {0x09c6, 64, { 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0,
33185 +  0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
33186 +  0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x3e, 0x12, 0x0b,
33187 +  0x46, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02}},
33188 + {0x0a06, 64, { 0x0b, 0x3e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b,
33189 +  0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00,
33190 +  0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0xe4, 0x90, 0x7f,
33191 +  0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f}},
33192 + {0x0a46, 64, { 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24,
33193 +  0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4,
33194 +  0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
33195 +  0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02}},
33196 + {0x0a86, 64, { 0x60, 0x03, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x3e,
33197 +  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38,
33198 +  0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f,
33199 +  0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f}},
33200 + {0x0ac6, 64, { 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f,
33201 +  0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
33202 +  0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea,
33203 +  0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0}},
33204 + {0x0b06, 64, { 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4,
33205 +  0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f,
33206 +  0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07,
33207 +  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22}},
33208 + {0x0b46, 64, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90,
33209 +  0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18,
33210 +  0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5,
33211 +  0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa}},
33212 + {0x0b86, 64, { 0xe4, 0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38,
33213 +  0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b, 0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13,
33214 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f,
33215 +  0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xb1, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0x81, 0x90, 0x7f}},
33216 + {0x0bc6, 64, { 0x98, 0x74, 0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f,
33217 +  0x98, 0x74, 0x14, 0xf0, 0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd,
33218 +  0x12, 0x11, 0xb1, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xb1, 0x90, 0x7f,
33219 +  0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11}},
33220 + {0x0c06, 64, { 0xb1, 0x7f, 0x01, 0x12, 0x12, 0x6a, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xb1, 0x20, 0x1b, 0x03, 0x02,
33221 +  0x0c, 0xb7, 0x75, 0x2d, 0x01, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4,
33222 +  0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b,
33223 +  0x01, 0xe4, 0xf5, 0x39, 0xf5, 0x13, 0xf5, 0x37, 0xc2, 0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2}},
33224 + {0x0c46, 64, { 0x00, 0xc2, 0x0a, 0xc2, 0x13, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00,
33225 +  0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xfb, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x10,
33226 +  0xf3, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x7f, 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90, 0xc0,
33227 +  0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74}},
33228 + {0x0c86, 64, { 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x11, 0xfb, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12,
33229 +  0x11, 0xfb, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d,
33230 +  0x7f, 0x12, 0x11, 0xfb, 0x7f, 0x01, 0x12, 0x12, 0x8b, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xfb,
33231 +  0xd2, 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82}},
33232 + {0x0cc6, 64, { 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86,
33233    0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08,
33234 -  0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00}},
33235 - {0x0d06, 64, { 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98,
33236 -  0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05,
33237 +  0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0,
33238 +  0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f}},
33239 + {0x0d06, 64, { 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05,
33240    0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2,
33241 -  0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5}},
33242 - {0x0d46, 64, { 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86,
33243 -  0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05,
33244 +  0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c,
33245 +  0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05}},
33246 + {0x0d46, 64, { 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05,
33247    0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43,
33248 -  0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0, 0x44}},
33249 - {0x0d86, 64, { 0x02, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0, 0xd2,
33250 -  0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f,
33251 +  0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02,
33252 +  0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0}},
33253 + {0x0d86, 64, { 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f,
33254    0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90,
33255 -  0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf}},
33256 - {0x0dc6, 64, { 0xd2, 0x1a, 0x12, 0x12, 0x5c, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2, 0x12, 0x90,
33257 -  0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12, 0x05, 0xd2,
33258 +  0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2,
33259 +  0x1a, 0x12, 0x12, 0x45, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2, 0x12}},
33260 + {0x0dc6, 64, { 0x90, 0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12, 0x05, 0xd2,
33261    0x1a, 0x12, 0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30, 0x12, 0x05, 0xc2,
33262 -  0x1a, 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x29, 0x80, 0xd6, 0x30}},
33263 - {0x0e06, 64, { 0x18, 0xd3, 0xc2, 0x18, 0x12, 0x12, 0xf6, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75,
33264 -  0x81, 0x47, 0x02, 0x0e, 0x57, 0x02, 0x0d, 0x7f, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40,
33265 +  0x1a, 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x21, 0x80, 0xd6, 0x30, 0x18,
33266 +  0xd3, 0xc2, 0x18, 0x12, 0x13, 0x93, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd}},
33267 + {0x0e06, 64, { 0x75, 0x81, 0x47, 0x02, 0x0e, 0x47, 0x02, 0x0d, 0x6f, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40,
33268    0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07,
33269 -  0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4}},
33270 - {0x0e46, 64, { 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
33271 -  0x90, 0x12, 0xc3, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09,
33272 +  0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56,
33273 +  0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40}},
33274 + {0x0e46, 64, { 0x80, 0x90, 0x12, 0xac, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09,
33275    0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8,
33276 -  0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5}},
33277 - {0x0e86, 64, { 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf,
33278 -  0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02,
33279 +  0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82,
33280 +  0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca}},
33281 + {0x0e86, 64, { 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02,
33282    0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01,
33283 -  0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06}},
33284 - {0x0ec6, 64, { 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82,
33285 -  0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82,
33286 +  0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9,
33287 +  0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5}},
33288 + {0x0ec6, 64, { 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82,
33289    0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0,
33290 -  0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8}},
33291 - {0x0f06, 64, { 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3,
33292 -  0xa3, 0x80, 0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19, 0x75, 0x1c,
33293 -  0x86, 0xab, 0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xb5, 0xb4, 0x03, 0x1d,
33294 -  0xaf, 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0x9c, 0x7e, 0x00, 0x29}},
33295 - {0x0f46, 64, { 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b, 0x00, 0x7a,
33296 -  0x00, 0x79, 0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c,
33297 +  0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74,
33298 +  0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3}},
33299 + {0x0f06, 64, { 0xa3, 0xa3, 0x80, 0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19, 0x75, 0x1c,
33300 +  0x86, 0xab, 0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xa5, 0xb4, 0x03, 0x1d,
33301 +  0xaf, 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0x8c, 0x7e, 0x00, 0x29, 0xff,
33302 +  0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b, 0x00}},
33303 + {0x0f46, 64, { 0x7a, 0x00, 0x79, 0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c,
33304    0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d, 0xe5, 0x0d, 0xac,
33305 -  0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5}},
33306 - {0x0f86, 64, { 0x08, 0x60, 0x0a, 0x12, 0x13, 0x3f, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f, 0x1a, 0x05,
33307 -  0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a,
33308 -  0xf0, 0x12, 0x13, 0x57, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5,
33309 -  0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x93, 0x8f}},
33310 - {0x0fc6, 64, { 0x1a, 0xef, 0x42, 0x37, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84,
33311 -  0xc0, 0x86, 0x75, 0x86, 0x00, 0x30, 0x15, 0x04, 0xc2, 0x15, 0x80, 0x02, 0xd2, 0x18, 0x53, 0x91,
33312 -  0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0,
33313 -  0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0}},
33314 - {0x1006, 64, { 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04,
33315 -  0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0,
33316 -  0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x11, 0x53,
33317 -  0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0}},
33318 - {0x1046, 64, { 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
33319 -  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
33320 -  0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13,
33321 -  0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0}},
33322 - {0x1086, 64, { 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
33323 -  0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98,
33324 -  0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44,
33325 -  0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0}},
33326 - {0x10c6, 64, { 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
33327 -  0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98,
33328 -  0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90,
33329 -  0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90}},
33330 - {0x1106, 64, { 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90,
33331 -  0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0,
33332 -  0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90,
33333 -  0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef}},
33334 - {0x1146, 64, { 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90,
33335 -  0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09,
33336 -  0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f,
33337 -  0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74}},
33338 - {0x1186, 64, { 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
33339 -  0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b,
33340 -  0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00,
33341 -  0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00}},
33342 - {0x11c6, 64, { 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90,
33343 -  0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0,
33344 -  0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x27, 0x8f, 0x1a, 0x12, 0x13, 0x27, 0x8f, 0x1b,
33345 -  0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x27, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b}},
33346 - {0x1206, 64, { 0x60, 0x07, 0x12, 0x13, 0x27, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b,
33347 -  0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90,
33348 -  0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22,
33349 -  0x12, 0x13, 0x7b, 0x8f, 0x1a, 0x12, 0x13, 0x7b, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60}},
33350 - {0x1246, 64, { 0x12, 0x12, 0x13, 0x7b, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x7b, 0x8f, 0x1b,
33351 -  0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0,
33352 -  0x30, 0x1a, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x12, 0xdf, 0x90, 0x7f,
33353 -  0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5}},
33354 - {0x1286, 64, { 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xc8, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee,
33355 -  0xf0, 0xe4, 0xe5, 0x3e, 0x44, 0x80, 0xfd, 0x12, 0x11, 0xc8, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5,
33356 -  0x3f, 0x54, 0x7f, 0xfd, 0x12, 0x12, 0x12, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00,
33357 -  0xee, 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80, 0xfd, 0x12, 0x12, 0x12, 0x22, 0x05, 0x0e, 0x02}},
33358 - {0x12c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x03, 0x14, 0x03, 0x00, 0x00, 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10,
33359 -  0xc1, 0x16, 0x01, 0x0a, 0x00, 0xc1, 0x9b, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19,
33360 -  0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e, 0x60, 0x05, 0x12, 0x0d, 0x5e, 0x80, 0xee, 0x22, 0x12,
33361 -  0x00, 0x03, 0x12, 0x0d, 0x6f, 0x12, 0x0b, 0x4e, 0x22, 0x02, 0x10, 0x25, 0x00, 0x02, 0x13}},
33362 - {0x1306, 64, { 0x04, 0x00, 0x02, 0x0f, 0xfb, 0x00, 0x02, 0x0f, 0xcd, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0,
33363 +  0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08,
33364 +  0x60, 0x0a, 0x12, 0x13, 0x27, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f, 0x1a}},
33365 + {0x0f86, 64, { 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a,
33366 +  0xf0, 0x12, 0x13, 0x3f, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5,
33367 +  0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x7b, 0x8f, 0x1a,
33368 +  0xef, 0x42, 0x37, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0}},
33369 + {0x0fc6, 64, { 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab,
33370 +  0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32,
33371 +  0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2,
33372 +  0x11, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0}},
33373 + {0x1006, 64, { 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0,
33374 +  0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08,
33375 +  0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f,
33376 +  0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10}},
33377 + {0x1046, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90,
33378 +  0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
33379 +  0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13,
33380 +  0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13}},
33381 + {0x1086, 64, { 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef,
33382 +  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22,
33383 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74,
33384 +  0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44}},
33385 + {0x10c6, 64, { 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74,
33386 +  0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
33387 +  0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74,
33388 +  0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90}},
33389 + {0x1106, 64, { 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00,
33390 +  0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f,
33391 +  0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5,
33392 +  0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90}},
33393 + {0x1146, 64, { 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90,
33394 +  0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f,
33395 +  0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0,
33396 +  0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f}},
33397 + {0x1186, 64, { 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
33398 +  0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b,
33399 +  0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
33400 +  0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90}},
33401 + {0x11c6, 64, { 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12,
33402 +  0x13, 0x0f, 0x8f, 0x1a, 0x12, 0x13, 0x0f, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12,
33403 +  0x13, 0x0f, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x0f, 0x8f, 0x1b, 0x80,
33404 +  0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90}},
33405 + {0x1206, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
33406 +  0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x63, 0x8f, 0x1a, 0x12, 0x13,
33407 +  0x63, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x63, 0x8f, 0x1a, 0xe5, 0x1a,
33408 +  0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x63, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90}},
33409 + {0x1246, 64, { 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x1a, 0x04, 0xe0, 0x44, 0x02, 0xf0,
33410 +  0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x12, 0xc8, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44,
33411 +  0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xb1, 0x90,
33412 +  0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3e, 0x44, 0x80}},
33413 + {0x1286, 64, { 0xfd, 0x12, 0x11, 0xb1, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3f, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xfb,
33414 +  0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80,
33415 +  0xfd, 0x12, 0x11, 0xfb, 0x22, 0x05, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x14, 0x03, 0x00,
33416 +  0x00, 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10, 0xc1, 0x16, 0x01, 0x0a, 0x00, 0xc1}},
33417 + {0x12c6, 64, { 0x9b, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e,
33418 +  0x60, 0x05, 0x12, 0x0d, 0x4e, 0x80, 0xee, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0,
33419    0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
33420 -  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
33421 -  0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90}},
33422 - {0x1346, 64, { 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
33423 -  0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
33424 -  0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0,
33425 -  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff}},
33426 - {0x1386, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
33427 -  0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0,
33428 -  0x00, 0xe0, 0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33429 +  0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0f, 0xe7, 0x00, 0x02, 0x13}},
33430 + {0x1306, 64, { 0x04, 0x00, 0x02, 0x0f, 0xbd, 0x00, 0x02, 0x10, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0,
33431 +  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
33432 +  0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
33433 +  0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90}},
33434 + {0x1346, 64, { 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
33435 +  0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
33436 +  0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0,
33437 +  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff}},
33438 + {0x1386, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x12, 0x00, 0x03, 0x12,
33439 +  0x0d, 0x5f, 0x12, 0x0b, 0x46, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33440 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33441    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
33442   {0x13c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33443    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33444 @@ -420,7 +425,7 @@
33445   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33446    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33447    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33448 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
33449 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
33450   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x10, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
33451    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
33452    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
33453 @@ -438,5 +443,5 @@
33454    0x00, 0x42, 0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c,
33455    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
33456   {0x1a06,  4, { 0x72, 0x00, 0x00, 0x00}},
33457 -{ 0xffff,      0,      {0x00} }
33458 + {0xffff,  0,  {0x00}}
33459  };
33460 diff -Nur linux-2.4.19.org/drivers/usb/serial/keyspan_usa28xa_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa28xa_fw.h
33461 --- linux-2.4.19.org/drivers/usb/serial/keyspan_usa28xa_fw.h    Wed Oct 10 00:15:03 2001
33462 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa28xa_fw.h        Thu Oct 31 08:11:25 2002
33463 @@ -1,351 +1,354 @@
33464  /* keyspan_usa28xa_fw.h
33465  
33466 -   Generated from Keyspan firmware image usa44code.h Sat Oct  6 12:08:02 EST 2001
33467 -   This firmware is for the Keyspan USA-28XA Serial Adaptor
33468 +       The firmware contained herein as keyspan_usa28xa.h is
33469  
33470 -   "The firmware contained herein as keyspan_usa28xa_fw.h is
33471 -   Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
33472 -   ("Keyspan"), as an unpublished work.  This notice does not imply
33473 -   unrestricted or public access to this firmware which is a trade secret of
33474 -   Keyspan, and which may not be reproduced, used, sold or transferred to any
33475 -   third party without Keyspan's prior written consent.  All Rights Reserved.
33476 +               Copyright (C) 1999-2001
33477 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
33478 +               
33479 +       as an unpublished work. This notice does not imply unrestricted or
33480 +       public access to the source code from which this firmware image is
33481 +       derived.  Except as noted below this firmware image may not be 
33482 +       reproduced, used, sold or transferred to any third party without 
33483 +       Keyspan's prior written consent.  All Rights Reserved.
33484 +
33485 +       Permission is hereby granted for the distribution of this firmware 
33486 +       image as part of a Linux or other Open Source operating system kernel 
33487 +       in text or binary form as required. 
33488 +
33489 +       This firmware may not be modified and may only be used with  
33490 +       Keyspan hardware.  Distribution and/or Modification of the 
33491 +       keyspan.c driver which includes this firmware, in whole or in 
33492 +       part, requires the inclusion of this statement."
33493  
33494 -   Permission is hereby granted for the distribution of this firmware image
33495 -   as part of a Linux or other Open Source operating system kernel in 
33496 -   text or binary form as required.
33497  
33498 -   This firmware may not be modified and may only be used with the Keyspan 
33499 -   USA-28XA Serial Adapter.  Distribution and/or Modification of the
33500 -   keyspan.c driver which includes this firmware, in whole or in part,
33501 -   requires the inclusion of this statement."
33502  
33503  */
33504  
33505  static const struct ezusb_hex_record keyspan_usa28xa_firmware[] = {
33506 - {0x0033,  3, { 0x02, 0x13, 0xaa}},
33507 + {0x0033,  3, { 0x02, 0x12, 0xf9}},
33508   {0x0003, 16, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0}},
33509   {0x0013, 16, { 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90}},
33510   {0x0023, 15, { 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x07, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22}},
33511 - {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x28, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
33512 + {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x27, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
33513   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x09, 0xc2, 0x00, 0x80, 0x77, 0x30, 0x03, 0x3b, 0x90, 0x7f}},
33514 - {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x28, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
33515 + {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x27, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
33516   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x09, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60}},
33517 - {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xd8}},
33518 + {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xc8}},
33519   {0x0096, 16, { 0xc2, 0x03, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
33520 - {0x00a6, 16, { 0x12, 0x13, 0x28, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
33521 + {0x00a6, 16, { 0x12, 0x13, 0x27, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
33522   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d}},
33523 - {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xd8, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
33524 - {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x66, 0x53, 0x36, 0x80, 0x12}},
33525 - {0x00e6, 16, { 0x13, 0x34, 0xef, 0x42, 0x36, 0x12, 0x11, 0xfb, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3a, 0x50, 0x0f}},
33526 - {0x00f6, 16, { 0x12, 0x13, 0x10, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x61, 0xc2}},
33527 + {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xc8, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
33528 + {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x60, 0x12, 0x11, 0xe4, 0x8f}},
33529 + {0x00e6, 16, { 0x19, 0x12, 0x13, 0x33, 0x8f, 0x36, 0xe5, 0x19, 0xc3, 0x95, 0x3a, 0x50, 0x0f, 0x12, 0x13, 0x0f}},
33530 + {0x00f6, 16, { 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x5e, 0xc2, 0x0b, 0xe5, 0x19}},
33531   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
33532 - {0x0043,  3, { 0x02, 0x14, 0x00}},
33533 - {0x0000,  3, { 0x02, 0x0e, 0x1e}},
33534 - {0x0106, 64, { 0x0b, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x36, 0x80, 0x57, 0x12, 0x13, 0x34, 0xef, 0x42, 0x36, 0xe5, 0x36,
33535 -  0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08,
33536 -  0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x69, 0xe5,
33537 -  0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40}},
33538 - {0x0146, 64, { 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08, 0xe4, 0x90, 0x7e, 0x80, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75,
33539 -  0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12, 0x0c, 0xfd, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90,
33540 -  0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x05, 0x03, 0x02, 0x03, 0xc5, 0xc2, 0x05, 0xe4, 0xf5,
33541 -  0x18, 0x74, 0x40, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5}},
33542 - {0x0186, 64, { 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
33543 -  0x12, 0x0e, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68,
33544 -  0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xd6, 0x7f, 0x03, 0x7d,
33545 -  0xcd, 0x12, 0x11, 0xd6, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0}},
33546 - {0x01c6, 64, { 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12,
33547 -  0x10, 0x5a, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12, 0x10, 0x80, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0,
33548 -  0xfd, 0x12, 0x11, 0xd6, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xd6, 0x43, 0x46, 0x80, 0x90, 0x7f,
33549 -  0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12}},
33550 - {0x0206, 64, { 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e,
33551 -  0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0,
33552 -  0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0,
33553 -  0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e, 0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43}},
33554 - {0x0246, 64, { 0x42, 0x80, 0x80, 0x03, 0x53, 0x42, 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43,
33555 -  0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x10, 0xcc, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xf2,
33556 -  0xaf, 0x42, 0x12, 0x10, 0xa6, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42,
33557 -  0x12, 0x10, 0xa6, 0x90, 0x7e, 0x0c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46}},
33558 - {0x0286, 64, { 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46,
33559 -  0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03,
33560 -  0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90,
33561 -  0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3, 0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3}},
33562 - {0x02c6, 64, { 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10, 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
33563 -  0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90,
33564 -  0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98,
33565 -  0x74, 0x11, 0xf0, 0x12, 0x13, 0x04, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e}},
33566 - {0x0306, 64, { 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xd6, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e,
33567 -  0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xd6, 0x75, 0x29,
33568 -  0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5,
33569 -  0x40, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11}},
33570 - {0x0346, 64, { 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
33571 -  0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xd6,
33572 -  0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff,
33573 -  0xad, 0x3e, 0x12, 0x11, 0xd6, 0xe4, 0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60}},
33574 - {0x0386, 64, { 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
33575 -  0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4,
33576 -  0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e, 0x1f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0,
33577 -  0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35, 0xf0, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30}},
33578 - {0x03c6, 64, { 0x1a, 0x52, 0xe5, 0x38, 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40,
33579 -  0x04, 0x15, 0x13, 0x80, 0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x13, 0x04,
33580 -  0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13,
33581 -  0x40, 0xef, 0x54, 0x80, 0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07}},
33582 - {0x0406, 64, { 0x30, 0x0d, 0x11, 0x12, 0x13, 0x40, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19,
33583 -  0x25, 0xd2, 0x07, 0x20, 0x1b, 0x03, 0x02, 0x07, 0xf4, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x7c, 0xef,
33584 -  0xc3, 0x95, 0x3d, 0x40, 0x03, 0x02, 0x04, 0xb2, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a,
33585 -  0xc2, 0x00, 0x80, 0x77, 0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12}},
33586 - {0x0446, 64, { 0x13, 0x7c, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f,
33587 -  0xcb, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41,
33588 -  0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x41, 0x12, 0x0d, 0x22, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0,
33589 -  0x80, 0x39, 0x90, 0x7f, 0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x7c, 0xef, 0xc3, 0x94}},
33590 - {0x0486, 64, { 0x40, 0x50, 0x29, 0x90, 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19,
33591 -  0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d,
33592 -  0xc1, 0x12, 0x0d, 0x22, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30,
33593 -  0xe1, 0x03, 0x02, 0x05, 0x40, 0x53, 0x37, 0x80, 0x12, 0x13, 0x88, 0xef, 0x42, 0x37, 0x12}},
33594 - {0x04c6, 64, { 0x12, 0x45, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x64, 0xef, 0x30, 0xe0, 0x08,
33595 -  0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c, 0x61, 0xc2, 0x0c, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x37,
33596 -  0x80, 0x57, 0x12, 0x13, 0x88, 0xef, 0x42, 0x37, 0xe5, 0x37, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3,
33597 -  0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7d, 0x7f, 0x80, 0x75}},
33598 - {0x0506, 64, { 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0xa2, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb,
33599 -  0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08,
33600 -  0xe4, 0x90, 0x7d, 0x80, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12,
33601 -  0x0d, 0x47, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90, 0x7f, 0xd0, 0xe0, 0x30, 0xe1}},
33602 - {0x0546, 64, { 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x9f, 0xc2, 0x06, 0xe4, 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5,
33603 -  0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e,
33604 -  0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xf0, 0x05, 0x18, 0xe5,
33605 -  0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x23, 0xe0, 0x60}},
33606 - {0x0586, 64, { 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x12, 0x20, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x12, 0x20, 0x43, 0x47,
33607 -  0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e,
33608 -  0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12, 0x11, 0x3e, 0x90, 0x7e, 0x22, 0xe0,
33609 -  0xff, 0x12, 0x11, 0x64, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0, 0xfd, 0x12, 0x12, 0x20, 0x7f}},
33610 - {0x05c6, 64, { 0x03, 0x7d, 0x07, 0x12, 0x12, 0x20, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0,
33611 -  0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0,
33612 -  0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90,
33613 -  0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54}},
33614 - {0x0606, 64, { 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e,
33615 -  0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43, 0x80, 0x80, 0x03, 0x53, 0x43, 0x7f,
33616 -  0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43, 0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12,
33617 -  0x11, 0x8a, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0xb0, 0xaf, 0x43, 0x12, 0x11, 0x18}},
33618 - {0x0646, 64, { 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf, 0x43, 0x12, 0x11, 0x18, 0x90, 0x7e, 0x2c,
33619 -  0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02, 0x80, 0x03, 0x53, 0x47, 0xfd, 0x90,
33620 -  0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60,
33621 -  0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03, 0x53, 0x47, 0xfe, 0x90, 0x7f}},
33622 - {0x0686, 64, { 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3,
33623 -  0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x10, 0x80,
33624 -  0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0,
33625 -  0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0}},
33626 - {0x06c6, 64, { 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x58,
33627 -  0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12,
33628 -  0x20, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e, 0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f,
33629 -  0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x20, 0x75, 0x32, 0x01, 0xd2, 0x08, 0x90, 0x7e}},
33630 - {0x0706, 64, { 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00,
33631 -  0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43, 0x45, 0x40, 0x90, 0x7f, 0x98, 0x74,
33632 -  0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f,
33633 -  0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x20, 0x75, 0x34, 0x01, 0xd2, 0x08}},
33634 - {0x0746, 64, { 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x20, 0xe4,
33635 -  0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
33636 -  0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c,
33637 -  0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4, 0xf5, 0x39, 0xd2, 0x08, 0x90}},
33638 - {0x0786, 64, { 0x7e, 0x3f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x13, 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0,
33639 -  0x74, 0x36, 0xf0, 0xe4, 0x90, 0x7f, 0xd1, 0xf0, 0x30, 0x1a, 0x52, 0xe5, 0x39, 0x60, 0x02, 0x15,
33640 -  0x39, 0x30, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x3e, 0x75,
33641 -  0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12, 0x13, 0x58, 0xef, 0x54, 0x01, 0xf5, 0x19}},
33642 - {0x07c6, 64, { 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2, 0x08, 0x12, 0x13, 0x94, 0xef, 0x54, 0x80, 0xf5, 0x19,
33643 -  0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2, 0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x94, 0xef,
33644 -  0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05, 0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a,
33645 -  0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5}},
33646 - {0x0806, 64, { 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74,
33647 -  0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1,
33648 -  0x03, 0x02, 0x09, 0x28, 0xe5, 0x0a, 0x70, 0x40, 0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2,
33649 -  0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
33650 - {0x0846, 64, { 0xfa, 0x12, 0x0e, 0xaa, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
33651 -  0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38,
33652 -  0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22, 0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08,
33653 -  0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d}},
33654 - {0x0886, 64, { 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0xaa, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82,
33655 -  0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f,
33656 -  0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4, 0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a,
33657 -  0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2, 0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00}},
33658 - {0x08c6, 64, { 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0xaa, 0xff, 0x74, 0x80, 0x25, 0x18,
33659 -  0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb,
33660 -  0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a, 0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15,
33661 -  0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
33662 - {0x0906, 64, { 0xfa, 0x12, 0x0e, 0xaa, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
33663 -  0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5,
33664 -  0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0f, 0x02, 0x0a, 0x10, 0x00, 0x0a, 0x84, 0x01, 0x0a,
33665 -  0xf0, 0x03, 0x09, 0x4c, 0x06, 0x0a, 0x03, 0x08, 0x09, 0xfd, 0x09, 0x09, 0xe5, 0x0a, 0x09}},
33666 - {0x0946, 64, { 0xf4, 0x0b, 0x00, 0x00, 0x0b, 0x3f, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61,
33667 -  0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xdb, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90,
33668 -  0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02,
33669 -  0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83}},
33670 - {0x0986, 64, { 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75,
33671 -  0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83,
33672 -  0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b,
33673 -  0x46, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f, 0x28, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90}},
33674 - {0x09c6, 64, { 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01,
33675 -  0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f,
33676 -  0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea,
33677 -  0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x46, 0x12, 0x0b, 0x4e, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0x00}},
33678 - {0x0a06, 64, { 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60,
33679 -  0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff,
33680 -  0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
33681 -  0x02, 0xf0, 0x02, 0x0b, 0x46, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5}},
33682 - {0x0a46, 64, { 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f,
33683 -  0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83,
33684 -  0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0,
33685 -  0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f}},
33686 - {0x0a86, 64, { 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0,
33687 -  0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02,
33688 -  0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff,
33689 -  0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4}},
33690 - {0x0ac6, 64, { 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54,
33691 -  0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f,
33692 -  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60,
33693 -  0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80}},
33694 - {0x0b06, 64, { 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90,
33695 -  0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25,
33696 -  0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90,
33697 -  0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0}},
33698 - {0x0b46, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74,
33699 -  0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e,
33700 -  0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18, 0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74,
33701 -  0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5, 0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74}},
33702 - {0x0b86, 64, { 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4,
33703 -  0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38, 0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b,
33704 -  0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13, 0xd2, 0x03, 0xd2, 0x01, 0x90, 0x7f, 0x98, 0x74,
33705 -  0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd}},
33706 - {0x0bc6, 64, { 0x12, 0x11, 0xd6, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0xa6, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x7f,
33707 -  0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
33708 -  0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x11, 0xd6, 0xe4,
33709 -  0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xd6, 0x90, 0x7f, 0x98, 0x74, 0x11}},
33710 - {0x0c06, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11, 0xd6, 0x7f, 0x01, 0x12, 0x12,
33711 -  0x8f, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xd6, 0x7f, 0x13, 0x7d, 0x01, 0x12, 0x11, 0xd6, 0x20,
33712 -  0x1b, 0x03, 0x02, 0x0c, 0xd5, 0x75, 0x2d, 0x01, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x2d, 0x25,
33713 -  0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4}},
33714 - {0x0c46, 64, { 0x09, 0xea, 0x75, 0x3b, 0x01, 0xe4, 0xf5, 0x39, 0xf5, 0x13, 0xf5, 0x37, 0xc2, 0x08, 0xc2, 0x0c, 0xc2,
33715 -  0x06, 0xc2, 0x00, 0xc2, 0x0a, 0xc2, 0x13, 0xd2, 0x04, 0xd2, 0x02, 0x90, 0x7f, 0x98, 0x74, 0x0b,
33716 + {0x0043,  3, { 0x02, 0x13, 0x00}},
33717 + {0x0000,  3, { 0x02, 0x0e, 0x0e}},
33718 + {0x0106, 64, { 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x36, 0x02, 0xe5, 0x36, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94,
33719 +  0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e,
33720 +  0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x59, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0,
33721 +  0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08}},
33722 + {0x0146, 64, { 0x90, 0x7e, 0x80, 0xe5, 0x36, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12,
33723 +  0x0c, 0xed, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06,
33724 +  0x20, 0x05, 0x03, 0x02, 0x03, 0xc1, 0xc2, 0x05, 0xe4, 0xf5, 0x18, 0x74, 0x40, 0x25, 0x18, 0xf5,
33725 +  0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a}},
33726 + {0x0186, 64, { 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xe0, 0x05, 0x18, 0xe5,
33727 +  0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24,
33728 +  0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xbf, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x11, 0xbf, 0x43, 0x46,
33729 +  0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90}},
33730 + {0x01c6, 64, { 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x10, 0x43, 0x90, 0x7e, 0x02, 0xe0,
33731 +  0xff, 0x12, 0x10, 0x69, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12, 0x11, 0xbf, 0x7f, 0x03,
33732 +  0x7d, 0x07, 0x12, 0x11, 0xbf, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0,
33733 +  0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90}},
33734 + {0x0206, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90,
33735 +  0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f,
33736 +  0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e,
33737 +  0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x42, 0x80, 0x80, 0x03, 0x53, 0x42}},
33738 + {0x0246, 64, { 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12,
33739 +  0x10, 0xb5, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xdb, 0xaf, 0x42, 0x12, 0x10, 0x8f, 0x90,
33740 +  0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42, 0x12, 0x10, 0x8f, 0x90, 0x7e, 0x0c,
33741 +  0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd}},
33742 + {0x0286, 64, { 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60,
33743 +  0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03, 0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98,
33744 +  0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3,
33745 +  0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10}},
33746 + {0x02c6, 64, { 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0,
33747 +  0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5,
33748 +  0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x12, 0x12, 0xed,
33749 +  0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e, 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12}},
33750 + {0x0306, 64, { 0x11, 0xbf, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e,
33751 +  0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xbf, 0x75, 0x29, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18,
33752 +  0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x04, 0x90, 0xc0, 0x00,
33753 +  0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11, 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98}},
33754 + {0x0346, 64, { 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f,
33755 +  0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xbf, 0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90,
33756 +  0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xbf, 0xe4,
33757 +  0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12}},
33758 + {0x0386, 64, { 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b,
33759 +  0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4, 0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e,
33760 +  0x1f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0,
33761 +  0x74, 0x35, 0xf0, 0xd2, 0x03, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30, 0x1a, 0x52, 0xe5, 0x38}},
33762 + {0x03c6, 64, { 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80,
33763 +  0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x12, 0xed, 0xef, 0x54, 0x01, 0xf5,
33764 +  0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13, 0x3f, 0xef, 0x54, 0x80,
33765 +  0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07, 0x30, 0x0d, 0x11, 0x12}},
33766 + {0x0406, 64, { 0x13, 0x3f, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19, 0x25, 0xd2, 0x07, 0x20,
33767 +  0x1b, 0x03, 0x02, 0x07, 0xec, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x7b, 0xef, 0xc3, 0x95, 0x3d, 0x40,
33768 +  0x03, 0x02, 0x04, 0xae, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a, 0xc2, 0x00, 0x80, 0x77,
33769 +  0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x7b, 0xef, 0xc3}},
33770 + {0x0446, 64, { 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcb, 0xe0, 0x14, 0xf5,
33771 +  0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41, 0x75, 0x0c, 0x7d, 0x75,
33772 +  0x0d, 0x41, 0x12, 0x0d, 0x12, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0x80, 0x39, 0x90, 0x7f,
33773 +  0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x7b, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90}},
33774 + {0x0486, 64, { 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60,
33775 +  0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d, 0xc1, 0x12, 0x0d, 0x12,
33776 +  0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x05,
33777 +  0x36, 0x12, 0x12, 0x2e, 0x8f, 0x19, 0x12, 0x13, 0x87, 0x8f, 0x37, 0xe5, 0x19, 0xc3, 0x95}},
33778 + {0x04c6, 64, { 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x63, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c,
33779 +  0x5e, 0xc2, 0x0c, 0xe5, 0x19, 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x37, 0x02, 0xe5, 0x37, 0x30,
33780 +  0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e,
33781 +  0x7d, 0x7f, 0x80, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0x92, 0xe5}},
33782 + {0x0506, 64, { 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb, 0xf0, 0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75,
33783 +  0x19, 0x3f, 0x85, 0x19, 0x08, 0x90, 0x7d, 0x80, 0xe5, 0x37, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75,
33784 +  0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12, 0x0d, 0x37, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90,
33785 +  0x7f, 0xd0, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x97, 0xc2, 0x06, 0xe4}},
33786 + {0x0546, 64, { 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18,
33787 +  0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
33788 +  0x12, 0x0e, 0xe0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68,
33789 +  0x90, 0x7e, 0x23, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x12, 0x09, 0x7f, 0x03}},
33790 + {0x0586, 64, { 0x7d, 0xcd, 0x12, 0x12, 0x09, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00,
33791 +  0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12,
33792 +  0x11, 0x27, 0x90, 0x7e, 0x22, 0xe0, 0xff, 0x12, 0x11, 0x4d, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0,
33793 +  0xfd, 0x12, 0x12, 0x09, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12, 0x09, 0x43, 0x47, 0x80, 0x90}},
33794 + {0x05c6, 64, { 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
33795 +  0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e,
33796 +  0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0,
33797 +  0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90}},
33798 + {0x0606, 64, { 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e, 0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43,
33799 +  0x80, 0x80, 0x03, 0x53, 0x43, 0x7f, 0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43,
33800 +  0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x11, 0x73, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0x99,
33801 +  0xaf, 0x43, 0x12, 0x11, 0x01, 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf}},
33802 + {0x0646, 64, { 0x43, 0x12, 0x11, 0x01, 0x90, 0x7e, 0x2c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02,
33803 +  0x80, 0x03, 0x53, 0x47, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47,
33804 +  0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03,
33805 +  0x53, 0x47, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0}},
33806 + {0x0686, 64, { 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3, 0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0,
33807 +  0x60, 0x05, 0x43, 0x47, 0x10, 0x80, 0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0,
33808 +  0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90,
33809 +  0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f}},
33810 + {0x06c6, 64, { 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x57, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd,
33811 +  0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x09, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e,
33812 +  0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x09, 0x75, 0x32,
33813 +  0x01, 0xd2, 0x08, 0x90, 0x7e, 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0}},
33814 + {0x0706, 64, { 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43,
33815 +  0x45, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
33816 +  0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f, 0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x09,
33817 +  0x75, 0x34, 0x01, 0xd2, 0x08, 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4}},
33818 + {0x0746, 64, { 0xff, 0xad, 0x3f, 0x12, 0x12, 0x09, 0xe4, 0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e,
33819 +  0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
33820 +  0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c, 0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4,
33821 +  0xf5, 0x39, 0xd2, 0x08, 0x90, 0x7e, 0x3f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x13}},
33822 + {0x0786, 64, { 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0, 0x74, 0x36, 0xf0, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xd1, 0xf0,
33823 +  0x30, 0x1a, 0x52, 0xe5, 0x39, 0x60, 0x02, 0x15, 0x39, 0x30, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94,
33824 +  0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12,
33825 +  0x13, 0x57, 0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2}},
33826 + {0x07c6, 64, { 0x08, 0x12, 0x13, 0x93, 0xef, 0x54, 0x80, 0xf5, 0x19, 0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2,
33827 +  0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x93, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05,
33828 +  0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90,
33829 +  0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5, 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90}},
33830 + {0x0806, 64, { 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f,
33831 +  0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x09, 0x20, 0xe5, 0x0a, 0x70, 0x40,
33832 +  0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2, 0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74,
33833 +  0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9a, 0xff, 0x74, 0x80, 0x25}},
33834 + {0x0846, 64, { 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb,
33835 +  0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38, 0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22,
33836 +  0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08, 0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5,
33837 +  0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12}},
33838 + {0x0886, 64, { 0x0e, 0x9a, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05,
33839 +  0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4,
33840 +  0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a, 0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2,
33841 +  0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
33842 + {0x08c6, 64, { 0xfa, 0x12, 0x0e, 0x9a, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
33843 +  0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a,
33844 +  0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15, 0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74,
33845 +  0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9a, 0xff, 0x74, 0x80, 0x25}},
33846 + {0x0906, 64, { 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb,
33847 +  0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0e,
33848 +  0xf2, 0x0a, 0x08, 0x00, 0x0a, 0x7c, 0x01, 0x0a, 0xe8, 0x03, 0x09, 0x44, 0x06, 0x09, 0xfb, 0x08,
33849 +  0x09, 0xf5, 0x09, 0x09, 0xdd, 0x0a, 0x09, 0xec, 0x0b, 0x00, 0x00, 0x0b, 0x37, 0x90, 0x7f}},
33850 + {0x0946, 64, { 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61, 0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xd3, 0x74,
33851 +  0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f,
33852 +  0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19,
33853 +  0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19}},
33854 + {0x0986, 64, { 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f,
33855 +  0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0,
33856 +  0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f,
33857 +  0x18, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0}},
33858 + {0x09c6, 64, { 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0,
33859 +  0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
33860 +  0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x3e, 0x12, 0x0b,
33861 +  0x46, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02}},
33862 + {0x0a06, 64, { 0x0b, 0x3e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b,
33863 +  0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00,
33864 +  0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0xe4, 0x90, 0x7f,
33865 +  0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f}},
33866 + {0x0a46, 64, { 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24,
33867 +  0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4,
33868 +  0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
33869 +  0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02}},
33870 + {0x0a86, 64, { 0x60, 0x03, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x3e,
33871 +  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38,
33872 +  0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f,
33873 +  0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f}},
33874 + {0x0ac6, 64, { 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f,
33875 +  0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
33876 +  0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea,
33877 +  0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0}},
33878 + {0x0b06, 64, { 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4,
33879 +  0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f,
33880 +  0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07,
33881 +  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22}},
33882 + {0x0b46, 64, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90,
33883 +  0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18,
33884 +  0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5,
33885 +  0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa}},
33886 + {0x0b86, 64, { 0xe4, 0x12, 0x0e, 0xe0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38,
33887 +  0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b, 0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13,
33888 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f,
33889 +  0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xbf, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0x8f, 0x90, 0x7f}},
33890 + {0x0bc6, 64, { 0x98, 0x74, 0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f,
33891 +  0x98, 0x74, 0x14, 0xf0, 0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd,
33892 +  0x12, 0x11, 0xbf, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xbf, 0x90, 0x7f,
33893 +  0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11}},
33894 + {0x0c06, 64, { 0xbf, 0x7f, 0x01, 0x12, 0x12, 0x78, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xbf, 0x7f, 0x13, 0x7d, 0x01,
33895 +  0x12, 0x11, 0xbf, 0x20, 0x1b, 0x03, 0x02, 0x0c, 0xc5, 0x75, 0x2d, 0x01, 0x75, 0x18, 0x01, 0x7b,
33896 +  0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xe0, 0x05, 0x18,
33897 +  0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b, 0x01, 0xe4, 0xf5, 0x39, 0xf5, 0x13, 0xf5, 0x37}},
33898 + {0x0c46, 64, { 0xc2, 0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2, 0x00, 0xc2, 0x0a, 0xc2, 0x13, 0x90, 0x7f, 0x98, 0x74, 0x0b,
33899    0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x12,
33900 -  0x20, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x11, 0x18, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x7f}},
33901 - {0x0c86, 64, { 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x75,
33902 -  0x47, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x12, 0x20, 0xe4, 0xff,
33903 -  0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12, 0x12, 0x20, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90,
33904 -  0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x12, 0x20, 0x7f, 0x01, 0x12, 0x12}},
33905 - {0x0cc6, 64, { 0xb0, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12, 0x20, 0x7f, 0x13, 0x7d, 0x01, 0x12, 0x12, 0x20, 0xd2, 0x12,
33906 -  0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5,
33907 +  0x09, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x11, 0x01, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x7f, 0x01,
33908 +  0x8f, 0x41, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0}},
33909 + {0x0c86, 64, { 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x12, 0x09, 0xe4, 0xff,
33910 +  0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12, 0x12, 0x09, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90,
33911 +  0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x12, 0x09, 0x7f, 0x01, 0x12, 0x12, 0x99,
33912 +  0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12, 0x09, 0x7f, 0x13, 0x7d, 0x01, 0x12, 0x12, 0x09, 0xd2}},
33913 + {0x0cc6, 64, { 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5,
33914    0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05,
33915 -  0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5}},
33916 - {0x0d06, 64, { 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86,
33917 -  0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08,
33918 +  0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d,
33919 +  0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05}},
33920 + {0x0d06, 64, { 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08,
33921    0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90,
33922 -  0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf}},
33923 - {0x0d46, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83,
33924 -  0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7,
33925 +  0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22,
33926 +  0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5}},
33927 + {0x0d46, 64, { 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7,
33928    0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5,
33929 -  0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87}},
33930 - {0x0d86, 64, { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0, 0x90,
33931 -  0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0, 0xd2, 0xe8, 0x43,
33932 +  0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01,
33933 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0}},
33934 + {0x0d86, 64, { 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0, 0xd2, 0xe8, 0x43,
33935    0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74,
33936 -  0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f}},
33937 - {0x0dc6, 64, { 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0x1a, 0x12,
33938 -  0x12, 0x6a, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2, 0x12, 0x90, 0x7f, 0xa1,
33939 +  0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf,
33940 +  0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0x1a}},
33941 + {0x0dc6, 64, { 0x12, 0x12, 0x53, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2, 0x12, 0x90, 0x7f, 0xa1,
33942    0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12, 0x05, 0xd2, 0x1a, 0x12,
33943 -  0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30, 0x12, 0x05, 0xc2, 0x1a}},
33944 - {0x0e06, 64, { 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x29, 0x80, 0xd6, 0x30, 0x18, 0xd3, 0xc2,
33945 -  0x18, 0x12, 0x13, 0xa0, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x47,
33946 -  0x02, 0x0e, 0x65, 0x02, 0x0d, 0x8d, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6,
33947 -  0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24}},
33948 - {0x0e46, 64, { 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01,
33949 -  0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x12,
33950 -  0xd1, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f,
33951 -  0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40}},
33952 - {0x0e86, 64, { 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca,
33953 -  0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde,
33954 +  0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30, 0x12, 0x05, 0xc2, 0x1a, 0x12,
33955 +  0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x21, 0x80, 0xd6, 0x30, 0x18, 0xd3}},
33956 + {0x0e06, 64, { 0xc2, 0x18, 0x12, 0x13, 0x9f, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x47,
33957 +  0x02, 0x0e, 0x55, 0x02, 0x0d, 0x7d, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6,
33958 +  0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c,
33959 +  0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80}},
33960 + {0x0e46, 64, { 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x12,
33961 +  0xba, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f,
33962 +  0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8,
33963 +  0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8}},
33964 + {0x0e86, 64, { 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde,
33965    0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22,
33966 -  0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c}},
33967 - {0x0ec6, 64, { 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25, 0x82,
33968 -  0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 0x29, 0xf5,
33969 +  0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c, 0xe5,
33970 +  0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25}},
33971 + {0x0ec6, 64, { 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 0x29, 0xf5,
33972    0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83,
33973 -  0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82}},
33974 - {0x0f06, 64, { 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93,
33975 -  0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80,
33976 +  0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8,
33977 +  0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01}},
33978 + {0x0f06, 64, { 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80,
33979    0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19, 0x75, 0x1c, 0x86, 0xab,
33980 -  0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xc3, 0xb4, 0x03, 0x1d, 0xaf}},
33981 - {0x0f46, 64, { 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0xaa, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a,
33982 -  0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79,
33983 +  0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xb3, 0xb4, 0x03, 0x1d, 0xaf, 0x19,
33984 +  0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0x9a, 0x7e, 0x00, 0x29, 0xff, 0xee}},
33985 + {0x0f46, 64, { 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79,
33986    0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5,
33987 -  0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c}},
33988 - {0x0f86, 64, { 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a,
33989 -  0x12, 0x13, 0x34, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5,
33990 +  0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70,
33991 +  0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60}},
33992 + {0x0f86, 64, { 0x0a, 0x12, 0x13, 0x33, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5,
33993    0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12,
33994 -  0x13, 0x4c, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82}},
33995 - {0x0fc6, 64, { 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x88, 0x8f, 0x1a, 0xef, 0x42,
33996 -  0x37, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86,
33997 -  0x75, 0x86, 0x00, 0x30, 0x15, 0x04, 0xc2, 0x15, 0x80, 0x02, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90,
33998 -  0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83}},
33999 - {0x1006, 64, { 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86,
34000 -  0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0,
34001 -  0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83,
34002 -  0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x11, 0x53, 0x91}},
34003 - {0x1046, 64, { 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83,
34004 -  0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90,
34005 -  0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
34006 -  0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0}},
34007 - {0x1086, 64, { 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0,
34008 -  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90,
34009 -  0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12,
34010 -  0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54}},
34011 - {0x10c6, 64, { 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
34012 -  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
34013 -  0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13,
34014 -  0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0}},
34015 - {0x1106, 64, { 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
34016 -  0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98,
34017 -  0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45,
34018 -  0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0}},
34019 - {0x1146, 64, { 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
34020 -  0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98,
34021 -  0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90,
34022 -  0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90}},
34023 - {0x1186, 64, { 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90,
34024 -  0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0,
34025 -  0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90,
34026 -  0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xef}},
34027 - {0x11c6, 64, { 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90,
34028 -  0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98,
34029 -  0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0,
34030 -  0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x1c, 0x8f, 0x1a, 0x12, 0x13, 0x1c, 0x8f, 0x1b, 0xe5}},
34031 - {0x1206, 64, { 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x1c, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12,
34032 -  0x13, 0x1c, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5,
34033 -  0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90, 0xc0, 0x00,
34034 -  0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12}},
34035 - {0x1246, 64, { 0x13, 0x70, 0x8f, 0x1a, 0x12, 0x13, 0x70, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13,
34036 -  0x70, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x70, 0x8f, 0x1b, 0x80, 0xe8,
34037 -  0xaf, 0x1a, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x1a,
34038 -  0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x12, 0xed, 0x90, 0x7f, 0xd6}},
34039 - {0x1286, 64, { 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3e, 0x54, 0x7f,
34040 -  0xfd, 0x12, 0x11, 0xd6, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4,
34041 -  0xe5, 0x3e, 0x44, 0x80, 0xfd, 0x12, 0x11, 0xd6, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3f, 0x54,
34042 -  0x7f, 0xfd, 0x12, 0x12, 0x20, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xee}},
34043 - {0x12c6, 64, { 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80, 0xfd, 0x12, 0x12, 0x20, 0x22, 0x05, 0x0e, 0x02, 0x00, 0x00, 0x00,
34044 -  0x00, 0x03, 0x14, 0x03, 0x00, 0x00, 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10, 0xc1, 0x16,
34045 -  0x01, 0x0a, 0x00, 0xc1, 0x9b, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18,
34046 -  0x70, 0x02, 0x15, 0x18, 0x4e, 0x60, 0x05, 0x12, 0x0d, 0x6c, 0x80, 0xee, 0x22, 0x90, 0x7f}},
34047 - {0x1306, 64, { 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90,
34048 -  0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff,
34049 -  0x22, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98,
34050 -  0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0}},
34051 - {0x1346, 64, { 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff,
34052 -  0x22, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98,
34053 -  0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90,
34054 -  0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe0}},
34055 - {0x1386, 64, { 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98,
34056 -  0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x12, 0x00, 0x03, 0x12, 0x0d, 0x7d, 0x12,
34057 -  0x0b, 0x4e, 0x22, 0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34058 +  0x13, 0x4b, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c,
34059 +  0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x87, 0x8f, 0x1a, 0xef}},
34060 + {0x0fc6, 64, { 0x42, 0x37, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86,
34061 +  0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04,
34062 +  0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0,
34063 +  0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x11}},
34064 + {0x1006, 64, { 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82,
34065 +  0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0,
34066 +  0x86, 0x75, 0x86, 0x00, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0,
34067 +  0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98}},
34068 + {0x1046, 64, { 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0,
34069 +  0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00,
34070 +  0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f,
34071 +  0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0}},
34072 + {0x1086, 64, { 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0,
34073 +  0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90,
34074 +  0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f,
34075 +  0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14}},
34076 + {0x10c6, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90,
34077 +  0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
34078 +  0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13,
34079 +  0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b}},
34080 + {0x1106, 64, { 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xef,
34081 +  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22,
34082 +  0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74,
34083 +  0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45}},
34084 + {0x1146, 64, { 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74,
34085 +  0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
34086 +  0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74,
34087 +  0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90}},
34088 + {0x1186, 64, { 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00,
34089 +  0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f,
34090 +  0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5,
34091 +  0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5}},
34092 + {0x11c6, 64, { 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef,
34093 +  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x1b,
34094 +  0x8f, 0x1a, 0x12, 0x13, 0x1b, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x1b,
34095 +  0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x1b, 0x8f, 0x1b, 0x80, 0xe8}},
34096 + {0x1206, 64, { 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
34097 +  0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0d,
34098 +  0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x6f, 0x8f, 0x1a, 0x12, 0x13, 0x6f, 0x8f,
34099 +  0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x6f, 0x8f, 0x1a, 0xe5, 0x1a, 0x65}},
34100 + {0x1246, 64, { 0x1b, 0x60, 0x07, 0x12, 0x13, 0x6f, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0xd6, 0xe0,
34101 +  0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x1a, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4,
34102 +  0x7e, 0x01, 0x12, 0x12, 0xd6, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0,
34103 +  0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xbf, 0x90, 0x7f}},
34104 + {0x1286, 64, { 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3e, 0x44, 0x80, 0xfd, 0x12, 0x11,
34105 +  0xbf, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3f, 0x54, 0x7f, 0xfd, 0x12, 0x12, 0x09, 0x90, 0x7f,
34106 +  0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80, 0xfd, 0x12,
34107 +  0x12, 0x09, 0x22, 0x05, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x14, 0x03, 0x00, 0x00}},
34108 + {0x12c6, 64, { 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10, 0xc1, 0x16, 0x01, 0x0a, 0x00, 0xc1, 0x9b, 0x00, 0x8e,
34109 +  0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e, 0x60, 0x05,
34110 +  0x12, 0x0d, 0x5c, 0x80, 0xee, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe0,
34111 +  0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x02, 0x0f, 0xf5, 0x00, 0x02, 0x13}},
34112 + {0x1306, 64, { 0x04, 0x00, 0x02, 0x0f, 0xcb, 0x00, 0x02, 0x10, 0x1c, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0,
34113 +  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
34114 +  0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
34115 +  0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90}},
34116 + {0x1346, 64, { 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
34117 +  0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
34118 +  0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0,
34119 +  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff}},
34120 + {0x1386, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
34121 +  0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x12, 0x00, 0x03, 0x12, 0x0d, 0x6d, 0x12, 0x0b,
34122 +  0x46, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34123    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
34124   {0x13c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34125    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34126    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34127 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x33, 0x00, 0x02, 0x14}},
34128 - {0x1406, 64, { 0x04, 0x00, 0x02, 0x10, 0x09, 0x00, 0x02, 0x0f, 0xdb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34129 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
34130 + {0x1406, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34131    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34132    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34133    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
34134 @@ -424,13 +427,13 @@
34135   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34136    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34137    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34138 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
34139 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
34140   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x15, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
34141    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
34142    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
34143    0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x05, 0x02, 0x40, 0x00}},
34144   {0x1946, 64, { 0x00, 0x07, 0x05, 0x06, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05,
34145 -  0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x83, 0x02,
34146 +  0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x83, 0x02,
34147    0x40, 0x00, 0x01, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
34148    0x01, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x01}},
34149   {0x1986, 64, { 0x04, 0x03, 0x09, 0x04, 0x48, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61,
34150 @@ -442,5 +445,5 @@
34151    0x00, 0x42, 0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c,
34152    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
34153   {0x1a06,  4, { 0x72, 0x00, 0x00, 0x00}},
34154 - { 0xffff,     0,      {0x00} }
34155 + {0xffff,  0, {0x00}}
34156  };
34157 diff -Nur linux-2.4.19.org/drivers/usb/serial/keyspan_usa28xb_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa28xb_fw.h
34158 --- linux-2.4.19.org/drivers/usb/serial/keyspan_usa28xb_fw.h    Wed Oct 10 00:15:03 2001
34159 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa28xb_fw.h        Thu Oct 31 08:11:25 2002
34160 @@ -1,352 +1,353 @@
34161  /* keyspan_usa28xb_fw.h
34162  
34163 -   Generated from Keyspan firmware image usacode36.h Sat Oct  6 12:07:38 EST 2001
34164 -   This firmware is for the Keyspan USA-28XA Serial Adaptor
34165 +       The firmware contained herein as keyspan_usa29xb_fw.h is
34166  
34167 -   "The firmware contained herein as keyspan_usa28xb_fw.h is
34168 -   Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
34169 -   ("Keyspan"), as an unpublished work.  This notice does not imply
34170 -   unrestricted or public access to the source code from which this 
34171 -   firmware image is derived.  Except as noted below this firmware image
34172 -   may not be reproduced, used, sold or transferred to any third party
34173 -   without Keyspan's prior written consent.  All Rights Reserved.
34174 +               Copyright (C) 1999-2001
34175 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
34176 +               
34177 +       as an unpublished work. This notice does not imply unrestricted or
34178 +       public access to the source code from which this firmware image is
34179 +       derived.  Except as noted below this firmware image may not be 
34180 +       reproduced, used, sold or transferred to any third party without 
34181 +       Keyspan's prior written consent.  All Rights Reserved.
34182  
34183 -   Permission is hereby granted for the distribution of this firmware image
34184 -   as part of a Linux or other Open Source operating system kernel in 
34185 -   text or binary form as required.
34186 +       Permission is hereby granted for the distribution of this firmware 
34187 +       image as part of a Linux or other Open Source operating system kernel 
34188 +       in text or binary form as required. 
34189  
34190 -   This firmware may not be modified and may only be used with the Keyspan 
34191 -   USA-28 Serial Adapter.  Distribution and/or Modification of the
34192 -   keyspan.c driver which includes this firmware, in whole or in part,
34193 -   requires the inclusion of this statement."
34194 +       This firmware may not be modified and may only be used with  
34195 +       Keyspan hardware.  Distribution and/or Modification of the 
34196 +       keyspan.c driver which includes this firmware, in whole or in 
34197 +       part, requires the inclusion of this statement."
34198  
34199  */
34200  
34201  static const struct ezusb_hex_record keyspan_usa28xb_firmware[] = {
34202 - {0x0033,  3, { 0x02, 0x13, 0xb7}},
34203 - {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x35, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
34204 + {0x0033,  3, { 0x02, 0x00, 0x2d}},
34205 + {0x002d,  4, { 0x53, 0xd8, 0xef, 0x32}},
34206 + {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x33, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
34207   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x09, 0xc2, 0x00, 0x80, 0x77, 0x30, 0x03, 0x3b, 0x90, 0x7f}},
34208 - {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x35, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
34209 + {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x33, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
34210   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x09, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60}},
34211 - {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xdc}},
34212 + {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xcc}},
34213   {0x0096, 16, { 0xc2, 0x03, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
34214 - {0x00a6, 16, { 0x12, 0x13, 0x35, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
34215 + {0x00a6, 16, { 0x12, 0x13, 0x33, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
34216   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d}},
34217 - {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xdc, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
34218 - {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x66, 0x53, 0x36, 0x80, 0x12}},
34219 - {0x00e6, 16, { 0x13, 0x41, 0xef, 0x42, 0x36, 0x12, 0x12, 0x08, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3a, 0x50, 0x0f}},
34220 - {0x00f6, 16, { 0x12, 0x13, 0x1d, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x61, 0xc2}},
34221 + {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xcc, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
34222 + {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x60, 0x12, 0x11, 0xf5, 0x8f}},
34223 + {0x00e6, 16, { 0x19, 0x12, 0x13, 0x3f, 0x8f, 0x36, 0xe5, 0x19, 0xc3, 0x95, 0x3a, 0x50, 0x0f, 0x12, 0x13, 0x1b}},
34224 + {0x00f6, 16, { 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x5e, 0xc2, 0x0b, 0xe5, 0x19}},
34225   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
34226 - {0x0043,  3, { 0x02, 0x14, 0x00}},
34227 - {0x0003, 16, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x30}},
34228 - {0x0013, 16, { 0x15, 0x04, 0xc2, 0x15, 0x80, 0x02, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08}},
34229 - {0x0023, 14, { 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32}},
34230 - {0x0000,  3, { 0x02, 0x0e, 0x22}},
34231 - {0x0106, 64, { 0x0b, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x36, 0x80, 0x57, 0x12, 0x13, 0x41, 0xef, 0x42, 0x36, 0xe5, 0x36,
34232 -  0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08,
34233 -  0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x6d, 0xe5,
34234 -  0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40}},
34235 - {0x0146, 64, { 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08, 0xe4, 0x90, 0x7e, 0x80, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75,
34236 -  0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12, 0x0d, 0x01, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90,
34237 -  0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x05, 0x03, 0x02, 0x03, 0xc5, 0xe4, 0xf5, 0x18, 0x74,
34238 -  0x40, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c}},
34239 - {0x0186, 64, { 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e,
34240 -  0xf4, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68, 0x90, 0x7e,
34241 -  0x03, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xe3, 0x7f, 0x03, 0x7d, 0xcd, 0x12,
34242 -  0x11, 0xe3, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5}},
34243 - {0x01c6, 64, { 0x46, 0xf0, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x10, 0x67,
34244 -  0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12, 0x10, 0x8d, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12,
34245 -  0x11, 0xe3, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xe3, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74,
34246 -  0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5}},
34247 - {0x0206, 64, { 0x40, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x13, 0xe0,
34248 -  0x70, 0x08, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12,
34249 -  0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5,
34250 -  0x44, 0xf0, 0x90, 0x7e, 0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x42, 0x80}},
34251 - {0x0246, 64, { 0x80, 0x03, 0x53, 0x42, 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x42, 0x02,
34252 -  0xa3, 0xe0, 0xff, 0x12, 0x10, 0xd9, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xff, 0xaf, 0x42,
34253 -  0x12, 0x10, 0xb3, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42, 0x12, 0x10,
34254 -  0xb3, 0x90, 0x7e, 0x0c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x02, 0x80}},
34255 - {0x0286, 64, { 0x03, 0x53, 0x46, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90,
34256 -  0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03, 0x53, 0x46,
34257 -  0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x12,
34258 -  0xe0, 0xf5, 0x3a, 0xa3, 0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3, 0xe0, 0x60}},
34259 - {0x02c6, 64, { 0x05, 0x43, 0x46, 0x10, 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0,
34260 -  0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90, 0x7f, 0x98,
34261 -  0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11,
34262 -  0xf0, 0x12, 0x13, 0x11, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e, 0xfd, 0xe4}},
34263 - {0x0306, 64, { 0xff, 0xad, 0x3e, 0x12, 0x11, 0xe3, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e, 0x17, 0xe0,
34264 -  0x60, 0x0f, 0x43, 0x3e, 0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xe3, 0x75, 0x29, 0x01, 0xd2,
34265 -  0x07, 0x90, 0x7e, 0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44,
34266 -  0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11, 0x43, 0x44}},
34267 - {0x0346, 64, { 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
34268 -  0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xe3, 0x75, 0x2b,
34269 -  0x01, 0xd2, 0x07, 0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff, 0xad, 0x3e,
34270 -  0x12, 0x11, 0xe3, 0xe4, 0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60, 0x0e, 0x90}},
34271 - {0x0386, 64, { 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0,
34272 -  0x60, 0x02, 0xd2, 0x0b, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4, 0xf5, 0x38,
34273 -  0xd2, 0x07, 0x90, 0x7e, 0x1f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31,
34274 -  0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35, 0xf0, 0xc2, 0x05, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30}},
34275 - {0x03c6, 64, { 0x1a, 0x54, 0xe5, 0x38, 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x4b, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40,
34276 -  0x04, 0x15, 0x13, 0x80, 0x40, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x13, 0x11,
34277 -  0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13,
34278 -  0x4d, 0xef, 0x54, 0x80, 0x64, 0x80, 0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26}},
34279 - {0x0406, 64, { 0xd2, 0x07, 0x30, 0x0d, 0x11, 0x12, 0x13, 0x4d, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05,
34280 -  0x85, 0x19, 0x25, 0xd2, 0x07, 0x20, 0x1b, 0x03, 0x02, 0x07, 0xf8, 0x30, 0x0a, 0x18, 0x12, 0x13,
34281 -  0x89, 0xef, 0xc3, 0x95, 0x3d, 0x40, 0x03, 0x02, 0x04, 0xb4, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0,
34282 -  0xc2, 0x0a, 0xc2, 0x00, 0x80, 0x77, 0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1}},
34283 - {0x0446, 64, { 0x6d, 0x12, 0x13, 0x89, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a,
34284 -  0x90, 0x7f, 0xcb, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d,
34285 -  0x7f, 0x41, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x41, 0x12, 0x0d, 0x26, 0xc2, 0x04, 0xe4, 0x90, 0x7f,
34286 -  0xcb, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x89, 0xef}},
34287 - {0x0486, 64, { 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14,
34288 -  0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c,
34289 -  0x75, 0x0d, 0xc1, 0x12, 0x0d, 0x26, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba,
34290 -  0xe0, 0x30, 0xe1, 0x03, 0x02, 0x05, 0x42, 0x53, 0x37, 0x80, 0x12, 0x13, 0x95, 0xef, 0x42}},
34291 - {0x04c6, 64, { 0x37, 0x12, 0x12, 0x52, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x71, 0xef, 0x30,
34292 -  0xe0, 0x08, 0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c, 0x61, 0xc2, 0x0c, 0xe5, 0x19, 0x70, 0x04,
34293 -  0xf5, 0x37, 0x80, 0x57, 0x12, 0x13, 0x95, 0xef, 0x42, 0x37, 0xe5, 0x37, 0x30, 0xe7, 0x26, 0xe5,
34294 -  0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7d, 0x7f}},
34295 - {0x0506, 64, { 0x80, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0xa6, 0xe5, 0x19, 0x25, 0xe0, 0x90,
34296 -  0x7f, 0xbb, 0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85,
34297 -  0x19, 0x08, 0xe4, 0x90, 0x7d, 0x80, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75, 0x0c, 0x7d, 0x75, 0x0d,
34298 -  0x81, 0x12, 0x0d, 0x4b, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90, 0x7f, 0xd0, 0xe0}},
34299 - {0x0546, 64, { 0x30, 0xe1, 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0xa1, 0xe4, 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5,
34300 -  0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e,
34301 -  0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xf4, 0x05, 0x18, 0xe5,
34302 -  0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x23, 0xe0, 0x60}},
34303 - {0x0586, 64, { 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x12, 0x2d, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x12, 0x2d, 0x43, 0x47,
34304 -  0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e,
34305 -  0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12, 0x11, 0x4b, 0x90, 0x7e, 0x22, 0xe0,
34306 -  0xff, 0x12, 0x11, 0x71, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0, 0xfd, 0x12, 0x12, 0x2d, 0x7f}},
34307 - {0x05c6, 64, { 0x03, 0x7d, 0x07, 0x12, 0x12, 0x2d, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0,
34308 -  0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0,
34309 -  0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90,
34310 -  0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54}},
34311 - {0x0606, 64, { 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e,
34312 -  0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43, 0x80, 0x80, 0x03, 0x53, 0x43, 0x7f,
34313 -  0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43, 0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12,
34314 -  0x11, 0x97, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0xbd, 0xaf, 0x43, 0x12, 0x11, 0x25}},
34315 - {0x0646, 64, { 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf, 0x43, 0x12, 0x11, 0x25, 0x90, 0x7e, 0x2c,
34316 -  0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02, 0x80, 0x03, 0x53, 0x47, 0xfd, 0x90,
34317 -  0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60,
34318 -  0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03, 0x53, 0x47, 0xfe, 0x90, 0x7f}},
34319 - {0x0686, 64, { 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3,
34320 -  0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x10, 0x80,
34321 -  0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0,
34322 -  0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0}},
34323 - {0x06c6, 64, { 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x65,
34324 -  0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12,
34325 -  0x2d, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e, 0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f,
34326 -  0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x2d, 0x75, 0x32, 0x01, 0xd2, 0x08, 0x90, 0x7e}},
34327 - {0x0706, 64, { 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00,
34328 -  0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43, 0x45, 0x40, 0x90, 0x7f, 0x98, 0x74,
34329 -  0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f,
34330 -  0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x2d, 0x75, 0x34, 0x01, 0xd2, 0x08}},
34331 - {0x0746, 64, { 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x2d, 0xe4,
34332 -  0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
34333 -  0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c,
34334 -  0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4, 0xf5, 0x39, 0xd2, 0x08, 0x90}},
34335 - {0x0786, 64, { 0x7e, 0x3f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x13, 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0,
34336 -  0x74, 0x36, 0xf0, 0xc2, 0x06, 0xe4, 0x90, 0x7f, 0xd1, 0xf0, 0x30, 0x1a, 0x54, 0xe5, 0x39, 0x60,
34337 -  0x02, 0x15, 0x39, 0x30, 0x13, 0x4b, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80,
34338 -  0x40, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12, 0x13, 0x65, 0xef, 0x54, 0x01}},
34339 - {0x07c6, 64, { 0xf5, 0x19, 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2, 0x08, 0x12, 0x13, 0xa1, 0xef, 0x54, 0x80,
34340 -  0x64, 0x80, 0xf5, 0x19, 0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2, 0x08, 0x30, 0x0e, 0x11,
34341 -  0x12, 0x13, 0xa1, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05, 0x85, 0x19, 0x2e, 0xd2,
34342 -  0x08, 0x30, 0x1a, 0x2a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0}},
34343 - {0x0806, 64, { 0x60, 0x09, 0xe0, 0xf5, 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09,
34344 -  0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f,
34345 -  0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x09, 0x2c, 0xe5, 0x0a, 0x70, 0x40, 0x30, 0x07, 0x39, 0xe5,
34346 -  0x38, 0x70, 0x35, 0xc2, 0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18}},
34347 - {0x0846, 64, { 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0xae, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34,
34348 -  0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74,
34349 -  0x09, 0xf0, 0x75, 0x38, 0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22, 0xe5, 0x0a, 0x64, 0x01,
34350 -  0x70, 0x40, 0x30, 0x08, 0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5, 0x18, 0x7e, 0x00}},
34351 - {0x0886, 64, { 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0xae, 0xff, 0x74, 0x80,
34352 -  0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4,
34353 -  0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4, 0xf5, 0x35, 0x75, 0x0a,
34354 -  0x02, 0x22, 0xe5, 0x0a, 0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2, 0x14, 0xf5, 0x18}},
34355 - {0x08c6, 64, { 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0xae, 0xff,
34356 -  0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5,
34357 -  0x18, 0xb4, 0x05, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a, 0x03, 0x22, 0xe5, 0x15,
34358 -  0x60, 0x30, 0x15, 0x15, 0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x14, 0x25, 0x18}},
34359 - {0x0906, 64, { 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0xae, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34,
34360 -  0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74,
34361 -  0x03, 0xf0, 0xe4, 0xf5, 0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0f, 0x06, 0x0a, 0x14, 0x00,
34362 -  0x0a, 0x88, 0x01, 0x0a, 0xf4, 0x03, 0x09, 0x50, 0x06, 0x0a, 0x07, 0x08, 0x0a, 0x01, 0x09}},
34363 - {0x0946, 64, { 0x09, 0xe9, 0x0a, 0x09, 0xf8, 0x0b, 0x00, 0x00, 0x0b, 0x43, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60,
34364 -  0x19, 0x14, 0x60, 0x61, 0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xdf, 0x74, 0x19, 0x90, 0x7f, 0xd4,
34365 -  0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04,
34366 -  0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75}},
34367 - {0x0986, 64, { 0x82, 0x7b, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x66, 0x75,
34368 -  0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75,
34369 -  0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12, 0x90, 0x7f,
34370 -  0xd5, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f, 0x2c, 0xea, 0x49}},
34371 - {0x09c6, 64, { 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f,
34372 -  0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02,
34373 -  0x0b, 0x4a, 0x90, 0x7f, 0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b,
34374 -  0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x4a, 0x12, 0x0b, 0x52, 0x02, 0x0b}},
34375 - {0x0a06, 64, { 0x4a, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xe8,
34376 -  0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x10, 0xe4, 0x33,
34377 -  0xff, 0x25, 0xe0, 0xff, 0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0,
34378 -  0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x4a, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3}},
34379 - {0x0a46, 64, { 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80,
34380 -  0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4,
34381 -  0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f,
34382 -  0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02}},
34383 - {0x0a86, 64, { 0x0b, 0x4a, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x4a,
34384 -  0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xb4, 0xe0,
34385 -  0x44, 0x01, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0,
34386 -  0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24}},
34387 - {0x0ac6, 64, { 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff,
34388 -  0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44,
34389 -  0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8,
34390 -  0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01}},
34391 - {0x0b06, 64, { 0x04, 0xd2, 0x10, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea,
34392 -  0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0,
34393 -  0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01,
34394 -  0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4}},
34395 - {0x0b46, 64, { 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0,
34396 -  0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc0,
34397 -  0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18, 0xf0, 0xe4, 0xf5, 0x8e,
34398 -  0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5, 0x24, 0x75, 0x18}},
34399 - {0x0b86, 64, { 0x01, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xf4, 0x05,
34400 -  0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38, 0xf5, 0x13, 0xf5, 0x36,
34401 -  0xc2, 0x07, 0xc2, 0x0b, 0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13, 0xd2, 0x03, 0xd2, 0x01,
34402 -  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0}},
34403 - {0x0bc6, 64, { 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xe3, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0xb3, 0x90, 0x7f, 0x98,
34404 -  0x74, 0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f,
34405 -  0x98, 0x74, 0x14, 0xf0, 0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd,
34406 -  0x12, 0x11, 0xe3, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xe3, 0x90}},
34407 - {0x0c06, 64, { 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11, 0xe3,
34408 -  0x7f, 0x01, 0x12, 0x12, 0x9c, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xe3, 0x7f, 0x13, 0x7d, 0x09,
34409 -  0x12, 0x11, 0xe3, 0x20, 0x1b, 0x03, 0x02, 0x0c, 0xd9, 0x75, 0x2d, 0x01, 0x75, 0x18, 0x01, 0x7b,
34410 -  0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xf4, 0x05}},
34411 - {0x0c46, 64, { 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b, 0x01, 0xe4, 0xf5, 0x39, 0xf5, 0x13, 0xf5, 0x37, 0xc2,
34412 -  0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2, 0x00, 0xc2, 0x0a, 0xc2, 0x13, 0xd2, 0x04, 0xd2, 0x02, 0x90,
34413 + {0x0043,  3, { 0x02, 0x13, 0x00}},
34414 + {0x0003, 16, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90}},
34415 + {0x0013, 16, { 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0}},
34416 + {0x0023, 10, { 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32}},
34417 + {0x0000,  3, { 0x02, 0x0e, 0x12}},
34418 + {0x0106, 64, { 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x36, 0x02, 0xe5, 0x36, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94,
34419 +  0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e,
34420 +  0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x5d, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0,
34421 +  0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08}},
34422 + {0x0146, 64, { 0x90, 0x7e, 0x80, 0xe5, 0x36, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12,
34423 +  0x0c, 0xf1, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06,
34424 +  0x20, 0x05, 0x03, 0x02, 0x03, 0xc1, 0xe4, 0xf5, 0x18, 0x74, 0x40, 0x25, 0x18, 0xf5, 0x82, 0xe4,
34425 +  0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79}},
34426 + {0x0186, 64, { 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xe4, 0x05, 0x18, 0xe5, 0x18, 0xb4,
34427 +  0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24, 0x7f, 0x01,
34428 +  0xe4, 0xfd, 0x12, 0x11, 0xd0, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x11, 0xd0, 0x43, 0x46, 0x80, 0x90,
34429 +  0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90, 0x7e, 0x13}},
34430 + {0x01c6, 64, { 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x10, 0x54, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12,
34431 +  0x10, 0x7a, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12, 0x11, 0xd0, 0x7f, 0x03, 0x7d, 0x07,
34432 +  0x12, 0x11, 0xd0, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5,
34433 +  0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90, 0xc0, 0x00}},
34434 + {0x0206, 64, { 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x13,
34435 +  0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x44,
34436 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e, 0x07, 0xe0,
34437 +  0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x42, 0x80, 0x80, 0x03, 0x53, 0x42, 0x7f, 0x53}},
34438 + {0x0246, 64, { 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x10, 0xc6,
34439 +  0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xec, 0xaf, 0x42, 0x12, 0x10, 0xa0, 0x90, 0x7e, 0x03,
34440 +  0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42, 0x12, 0x10, 0xa0, 0x90, 0x7e, 0x0c, 0xe0, 0x60,
34441 +  0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd, 0x90, 0x7f}},
34442 + {0x0286, 64, { 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3,
34443 +  0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03, 0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14,
34444 +  0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3, 0xe0, 0x13,
34445 +  0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10, 0x80, 0x03}},
34446 + {0x02c6, 64, { 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e,
34447 +  0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54,
34448 +  0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x12, 0x13, 0x0f, 0xef, 0x54,
34449 +  0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e, 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xd0}},
34450 + {0x0306, 64, { 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x02, 0xe4,
34451 +  0xff, 0xad, 0x3e, 0x12, 0x11, 0xd0, 0x75, 0x29, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18, 0xe0, 0x60,
34452 +  0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2,
34453 +  0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11, 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13}},
34454 + {0x0346, 64, { 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x3e,
34455 +  0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xd0, 0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x1b,
34456 +  0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xd0, 0xe4, 0xf5, 0x2b,
34457 +  0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5}},
34458 + {0x0386, 64, { 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b, 0x90, 0x7e,
34459 +  0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4, 0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e, 0x1f, 0xe0,
34460 +  0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35,
34461 +  0xf0, 0xd2, 0x03, 0xc2, 0x05, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30, 0x1a, 0x54, 0xe5, 0x38}},
34462 + {0x03c6, 64, { 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x4b, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80,
34463 +  0x40, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x13, 0x0f, 0xef, 0x54, 0x01, 0xf5,
34464 +  0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13, 0x4b, 0xef, 0x54, 0x80,
34465 +  0x64, 0x80, 0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07, 0x30, 0x0d}},
34466 + {0x0406, 64, { 0x11, 0x12, 0x13, 0x4b, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19, 0x25, 0xd2,
34467 +  0x07, 0x20, 0x1b, 0x03, 0x02, 0x07, 0xf0, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x87, 0xef, 0xc3, 0x95,
34468 +  0x3d, 0x40, 0x03, 0x02, 0x04, 0xb0, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a, 0xc2, 0x00,
34469 +  0x80, 0x77, 0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x87}},
34470 + {0x0446, 64, { 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcb, 0xe0,
34471 +  0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41, 0x75, 0x0c,
34472 +  0x7d, 0x75, 0x0d, 0x41, 0x12, 0x0d, 0x16, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0x80, 0x39,
34473 +  0x90, 0x7f, 0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x87, 0xef, 0xc3, 0x94, 0x40, 0x50}},
34474 + {0x0486, 64, { 0x29, 0x90, 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00,
34475 +  0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d, 0xc1, 0x12,
34476 +  0x0d, 0x16, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30, 0xe1, 0x03,
34477 +  0x02, 0x05, 0x38, 0x12, 0x12, 0x3f, 0x8f, 0x19, 0x12, 0x13, 0x93, 0x8f, 0x37, 0xe5, 0x19}},
34478 + {0x04c6, 64, { 0xc3, 0x95, 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x6f, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x37, 0x20, 0xe7, 0x03,
34479 +  0x30, 0x0c, 0x5e, 0xc2, 0x0c, 0xe5, 0x19, 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x37, 0x02, 0xe5,
34480 +  0x37, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19,
34481 +  0x08, 0x7e, 0x7d, 0x7f, 0x80, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f}},
34482 + {0x0506, 64, { 0x96, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb, 0xf0, 0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40,
34483 +  0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08, 0x90, 0x7d, 0x80, 0xe5, 0x37, 0xf0, 0x7e, 0x7d, 0x7f,
34484 +  0x81, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12, 0x0d, 0x3b, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb,
34485 +  0xf0, 0x90, 0x7f, 0xd0, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x99, 0xe4}},
34486 + {0x0546, 64, { 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18,
34487 +  0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
34488 +  0x12, 0x0e, 0xe4, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68,
34489 +  0x90, 0x7e, 0x23, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x12, 0x1a, 0x7f, 0x03}},
34490 + {0x0586, 64, { 0x7d, 0xcd, 0x12, 0x12, 0x1a, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00,
34491 +  0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12,
34492 +  0x11, 0x38, 0x90, 0x7e, 0x22, 0xe0, 0xff, 0x12, 0x11, 0x5e, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0,
34493 +  0xfd, 0x12, 0x12, 0x1a, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12, 0x1a, 0x43, 0x47, 0x80, 0x90}},
34494 + {0x05c6, 64, { 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
34495 +  0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e,
34496 +  0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0,
34497 +  0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90}},
34498 + {0x0606, 64, { 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e, 0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43,
34499 +  0x80, 0x80, 0x03, 0x53, 0x43, 0x7f, 0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43,
34500 +  0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x11, 0x84, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0xaa,
34501 +  0xaf, 0x43, 0x12, 0x11, 0x12, 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf}},
34502 + {0x0646, 64, { 0x43, 0x12, 0x11, 0x12, 0x90, 0x7e, 0x2c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02,
34503 +  0x80, 0x03, 0x53, 0x47, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47,
34504 +  0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03,
34505 +  0x53, 0x47, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0}},
34506 + {0x0686, 64, { 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3, 0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0,
34507 +  0x60, 0x05, 0x43, 0x47, 0x10, 0x80, 0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0,
34508 +  0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90,
34509 +  0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f}},
34510 + {0x06c6, 64, { 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x63, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd,
34511 +  0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x1a, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e,
34512 +  0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x1a, 0x75, 0x32,
34513 +  0x01, 0xd2, 0x08, 0x90, 0x7e, 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0}},
34514 + {0x0706, 64, { 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43,
34515 +  0x45, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
34516 +  0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f, 0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x1a,
34517 +  0x75, 0x34, 0x01, 0xd2, 0x08, 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4}},
34518 + {0x0746, 64, { 0xff, 0xad, 0x3f, 0x12, 0x12, 0x1a, 0xe4, 0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e,
34519 +  0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
34520 +  0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c, 0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4,
34521 +  0xf5, 0x39, 0xd2, 0x08, 0x90, 0x7e, 0x3f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x13}},
34522 + {0x0786, 64, { 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0, 0x74, 0x36, 0xf0, 0xd2, 0x04, 0xc2, 0x06, 0xe4, 0x90, 0x7f,
34523 +  0xd1, 0xf0, 0x30, 0x1a, 0x54, 0xe5, 0x39, 0x60, 0x02, 0x15, 0x39, 0x30, 0x13, 0x4b, 0xe5, 0x13,
34524 +  0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x40, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2,
34525 +  0x13, 0x12, 0x13, 0x63, 0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x33, 0x60, 0x05, 0x85, 0x19}},
34526 + {0x07c6, 64, { 0x33, 0xd2, 0x08, 0x12, 0x13, 0x9f, 0xef, 0x54, 0x80, 0x64, 0x80, 0xf5, 0x19, 0x65, 0x2f, 0x60, 0x05,
34527 +  0x85, 0x19, 0x2f, 0xd2, 0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x9f, 0xef, 0x54, 0x10, 0xf5, 0x19,
34528 +  0x65, 0x2e, 0x60, 0x05, 0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a, 0x90, 0x7f, 0xd2, 0xe0,
34529 +  0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5, 0x15, 0x90, 0x7b, 0x42}},
34530 + {0x0806, 64, { 0xe0, 0xf5, 0x16, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37,
34531 +  0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x09, 0x24,
34532 +  0xe5, 0x0a, 0x70, 0x40, 0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2, 0x07, 0xf5, 0x18, 0x7e,
34533 +  0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9e}},
34534 + {0x0846, 64, { 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5,
34535 +  0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38, 0x10, 0xe4, 0xf5, 0x2c,
34536 +  0x75, 0x0a, 0x01, 0x22, 0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08, 0x39, 0xe5, 0x39, 0x70,
34537 +  0x35, 0xc2, 0x08, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xee}},
34538 + {0x0886, 64, { 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9e, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5,
34539 +  0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0,
34540 +  0x75, 0x39, 0x10, 0xe4, 0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a, 0x64, 0x02, 0x70, 0x36,
34541 +  0x30, 0x14, 0x2f, 0xc2, 0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x0e, 0x25, 0x18}},
34542 + {0x08c6, 64, { 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9e, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34,
34543 +  0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb, 0x90, 0x7f, 0xc3, 0x74,
34544 +  0x05, 0xf0, 0x75, 0x0a, 0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15, 0xe4, 0xf5, 0x18, 0x7e,
34545 +  0x00, 0x7b, 0x00, 0x74, 0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9e}},
34546 + {0x0906, 64, { 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5,
34547 +  0x18, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x0a, 0x22, 0x90, 0x7f,
34548 +  0xe9, 0xe0, 0x12, 0x0e, 0xf6, 0x0a, 0x0c, 0x00, 0x0a, 0x80, 0x01, 0x0a, 0xec, 0x03, 0x09, 0x48,
34549 +  0x06, 0x09, 0xff, 0x08, 0x09, 0xf9, 0x09, 0x09, 0xe1, 0x0a, 0x09, 0xf0, 0x0b, 0x00, 0x00}},
34550 + {0x0946, 64, { 0x0b, 0x3b, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61, 0x24, 0x02, 0x60, 0x03,
34551 +  0x02, 0x09, 0xd7, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02,
34552 +  0x0b, 0x42, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82,
34553 +  0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82}},
34554 + {0x0986, 64, { 0x74, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83,
34555 +  0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x74, 0x19,
34556 +  0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xea,
34557 +  0xe0, 0xff, 0x12, 0x0f, 0x1c, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9}},
34558 + {0x09c6, 64, { 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x42,
34559 +  0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0x00, 0xe5, 0x09, 0xf0,
34560 +  0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x09, 0x02,
34561 +  0x0b, 0x42, 0x12, 0x0b, 0x4a, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90}},
34562 + {0x0a06, 64, { 0x7f, 0xb5, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31,
34563 +  0x24, 0x02, 0x70, 0x5b, 0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x16, 0xe4, 0x33,
34564 +  0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b,
34565 +  0x42, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02}},
34566 + {0x0a46, 64, { 0x0b, 0x42, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07,
34567 +  0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90,
34568 +  0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x42, 0x90,
34569 +  0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe}},
34570 + {0x0a86, 64, { 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2,
34571 +  0x10, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f,
34572 +  0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff,
34573 +  0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83}},
34574 + {0x0ac6, 64, { 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54,
34575 +  0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0,
34576 +  0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70,
34577 +  0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80, 0x3f, 0x90, 0x7f, 0xb4}},
34578 + {0x0b06, 64, { 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4,
34579 +  0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5,
34580 +  0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
34581 +  0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0}},
34582 + {0x0b46, 64, { 0x44, 0x02, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90,
34583 +  0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90,
34584 +  0x7f, 0x98, 0x74, 0x18, 0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f,
34585 +  0xde, 0xf0, 0xe4, 0xf5, 0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9}},
34586 + {0x0b86, 64, { 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xe4, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3a,
34587 +  0x01, 0xe4, 0xf5, 0x38, 0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b, 0xc2, 0x05, 0xc2, 0x00,
34588 +  0xc2, 0x09, 0xc2, 0x13, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00,
34589 +  0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xd0, 0x7f, 0x10, 0x8f, 0x42, 0x12}},
34590 + {0x0bc6, 64, { 0x10, 0xa0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0,
34591 +  0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80,
34592 +  0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x11, 0xd0, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12,
34593 +  0x11, 0xd0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05}},
34594 + {0x0c06, 64, { 0x7d, 0x7f, 0x12, 0x11, 0xd0, 0x7f, 0x01, 0x12, 0x12, 0x89, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xd0,
34595 +  0x7f, 0x13, 0x7d, 0x09, 0x12, 0x11, 0xd0, 0x20, 0x1b, 0x03, 0x02, 0x0c, 0xc9, 0x75, 0x2d, 0x01,
34596 +  0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12,
34597 +  0x0e, 0xe4, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b, 0x01, 0xe4, 0xf5, 0x39}},
34598 + {0x0c46, 64, { 0xf5, 0x13, 0xf5, 0x37, 0xc2, 0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2, 0x00, 0xc2, 0x0a, 0xc2, 0x13, 0x90,
34599    0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c,
34600 -  0xe4, 0xfd, 0x12, 0x12, 0x2d, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x11, 0x25, 0x90, 0x7f, 0x98}},
34601 - {0x0c86, 64, { 0x74, 0x0a, 0xf0, 0x7f, 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98,
34602 -  0x74, 0x0c, 0xf0, 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12,
34603 -  0x12, 0x2d, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12, 0x12, 0x2d, 0x90, 0x7f, 0x98,
34604 -  0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x12, 0x2d}},
34605 - {0x0cc6, 64, { 0x7f, 0x01, 0x12, 0x12, 0xbd, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12, 0x2d, 0x7f, 0x13, 0x7d, 0x09, 0x12,
34606 -  0x12, 0x2d, 0xd2, 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5,
34607 +  0xe4, 0xfd, 0x12, 0x12, 0x1a, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x11, 0x12, 0x90, 0x7f, 0x98, 0x74,
34608 +  0x0a, 0xf0, 0x7f, 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f}},
34609 + {0x0c86, 64, { 0x98, 0x74, 0x0c, 0xf0, 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12,
34610 +  0x12, 0x1a, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12, 0x12, 0x1a, 0x90, 0x7f, 0x98,
34611 +  0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x12, 0x1a, 0x7f,
34612 +  0x01, 0x12, 0x12, 0xaa, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12, 0x1a, 0x7f, 0x13, 0x7d, 0x09}},
34613 + {0x0cc6, 64, { 0x12, 0x12, 0x1a, 0xd2, 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5,
34614    0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3,
34615 -  0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10}},
34616 - {0x0d06, 64, { 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0,
34617 -  0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90,
34618 +  0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0,
34619 +  0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90}},
34620 + {0x0d06, 64, { 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90,
34621    0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2,
34622 -  0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86}},
34623 - {0x0d46, 64, { 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82,
34624 -  0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3,
34625 +  0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf,
34626 +  0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5}},
34627 + {0x0d46, 64, { 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3,
34628    0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5,
34629 -  0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44}},
34630 - {0x0d86, 64, { 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0,
34631 -  0x44, 0x02, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e,
34632 +  0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80,
34633 +  0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92}},
34634 + {0x0d86, 64, { 0xe0, 0x44, 0x02, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e,
34635    0xf0, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0,
34636 -  0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53}},
34637 - {0x0dc6, 64, { 0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2,
34638 -  0xaf, 0xd2, 0x1a, 0x12, 0x12, 0x77, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2,
34639 +  0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91,
34640 +  0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0}},
34641 + {0x0dc6, 64, { 0xd2, 0xaf, 0xd2, 0x1a, 0x12, 0x12, 0x64, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2,
34642    0x12, 0x90, 0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12,
34643 -  0x05, 0xd2, 0x1a, 0x12, 0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30}},
34644 - {0x0e06, 64, { 0x12, 0x05, 0xc2, 0x1a, 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x2d, 0x80, 0xd6,
34645 -  0x30, 0x18, 0xd3, 0xc2, 0x18, 0x12, 0x13, 0xad, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8,
34646 -  0xfd, 0x75, 0x81, 0x47, 0x02, 0x0e, 0x69, 0x02, 0x0d, 0x91, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93,
34647 -  0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3}},
34648 - {0x0e46, 64, { 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04,
34649 -  0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20,
34650 -  0x40, 0x80, 0x90, 0x12, 0xde, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30,
34651 -  0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25}},
34652 - {0x0e86, 64, { 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8,
34653 -  0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83,
34654 +  0x05, 0xd2, 0x1a, 0x12, 0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30, 0x12,
34655 +  0x05, 0xc2, 0x1a, 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x25, 0x80}},
34656 + {0x0e06, 64, { 0xd6, 0x30, 0x18, 0xd3, 0xc2, 0x18, 0x12, 0x13, 0xab, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8,
34657 +  0xfd, 0x75, 0x81, 0x47, 0x02, 0x0e, 0x59, 0x02, 0x0d, 0x81, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93,
34658 +  0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8,
34659 +  0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40}},
34660 + {0x0e46, 64, { 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20,
34661 +  0x40, 0x80, 0x90, 0x12, 0xcb, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30,
34662 +  0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0,
34663 +  0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3}},
34664 + {0x0e86, 64, { 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83,
34665    0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22,
34666 -  0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93}},
34667 - {0x0ec6, 64, { 0x22, 0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50,
34668 -  0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22,
34669 +  0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22,
34670 +  0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22}},
34671 + {0x0ec6, 64, { 0x50, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22,
34672    0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06,
34673 -  0x89, 0x82, 0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22}},
34674 - {0x0f06, 64, { 0xd0, 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93,
34675 -  0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef,
34676 +  0x89, 0x82, 0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0,
34677 +  0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3}},
34678 + {0x0f06, 64, { 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef,
34679    0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19,
34680 -  0x75, 0x1c, 0x86, 0xab, 0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xc7}},
34681 - {0x0f46, 64, { 0xb4, 0x03, 0x1d, 0xaf, 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0xae, 0x7e, 0x00,
34682 -  0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b,
34683 +  0x75, 0x1c, 0x86, 0xab, 0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xb7, 0xb4,
34684 +  0x03, 0x1d, 0xaf, 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0x9e, 0x7e}},
34685 + {0x0f46, 64, { 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b,
34686    0x00, 0x7a, 0x00, 0x79, 0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02,
34687 -  0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d}},
34688 - {0x0f86, 64, { 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08,
34689 -  0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x41, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f,
34690 +  0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d, 0xe5,
34691 +  0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15}},
34692 + {0x0f86, 64, { 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x3f, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f,
34693    0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83,
34694 -  0xe5, 0x1a, 0xf0, 0x12, 0x13, 0x59, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05}},
34695 - {0x0fc6, 64, { 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x95,
34696 -  0x8f, 0x1a, 0xef, 0x42, 0x37, 0x80, 0xca, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c,
34697 +  0xe5, 0x1a, 0xf0, 0x12, 0x13, 0x57, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c,
34698 +  0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13}},
34699 + {0x0fc6, 64, { 0x93, 0x8f, 0x1a, 0xef, 0x42, 0x37, 0x80, 0xca, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c,
34700    0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74,
34701 -  0x27, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x20, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x07, 0xf0, 0xe4}},
34702 - {0x1006, 64, { 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x22, 0xc0,
34703 -  0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f,
34704 -  0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84,
34705 -  0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82}},
34706 - {0x1046, 64, { 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x11, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab,
34707 -  0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32,
34708 -  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74,
34709 -  0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44}},
34710 - {0x1086, 64, { 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74,
34711 -  0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
34712 -  0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74,
34713 -  0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90}},
34714 - {0x10c6, 64, { 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00,
34715 -  0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f,
34716 -  0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5,
34717 -  0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90}},
34718 - {0x1106, 64, { 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90,
34719 -  0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f,
34720 -  0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
34721 -  0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f}},
34722 - {0x1146, 64, { 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
34723 -  0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b,
34724 -  0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0,
34725 -  0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00}},
34726 - {0x1186, 64, { 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22,
34727 -  0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74,
34728 -  0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54,
34729 -  0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00}},
34730 - {0x11c6, 64, { 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
34731 -  0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74,
34732 -  0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0,
34733 -  0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed}},
34734 - {0x1206, 64, { 0xf0, 0x22, 0x12, 0x13, 0x29, 0x8f, 0x1a, 0x12, 0x13, 0x29, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60,
34735 -  0x12, 0x12, 0x13, 0x29, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x29, 0x8f,
34736 -  0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f,
34737 -  0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0}},
34738 - {0x1246, 64, { 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x7d, 0x8f, 0x1a,
34739 -  0x12, 0x13, 0x7d, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x7d, 0x8f, 0x1a,
34740 -  0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x7d, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22,
34741 -  0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x1a, 0x04, 0xe0}},
34742 - {0x1286, 64, { 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x12, 0xfa, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0,
34743 -  0xe0, 0x44, 0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11,
34744 -  0xe3, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3e, 0x44,
34745 -  0x80, 0xfd, 0x12, 0x11, 0xe3, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3f, 0x54, 0x7f, 0xfd}},
34746 - {0x12c6, 64, { 0x12, 0x12, 0x2d, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3f,
34747 -  0x44, 0x80, 0xfd, 0x12, 0x12, 0x2d, 0x22, 0x05, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x14,
34748 -  0x03, 0x00, 0x00, 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10, 0xc1, 0x16, 0x01, 0x0a, 0x00,
34749 -  0xc1, 0x9b, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02}},
34750 - {0x1306, 64, { 0x15, 0x18, 0x4e, 0x60, 0x05, 0x12, 0x0d, 0x70, 0x80, 0xee, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0,
34751 -  0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xe0,
34752 -  0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f,
34753 -  0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x15}},
34754 - {0x1346, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0,
34755 -  0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f,
34756 -  0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
34757 -  0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00}},
34758 - {0x1386, 64, { 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f,
34759 -  0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0,
34760 -  0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x12, 0x0f, 0xdf, 0x12, 0x0d, 0x81, 0x12, 0x0b, 0x52, 0x22,
34761 -  0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
34762 +  0x27, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x20, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x07, 0xf0, 0xe4, 0x90,
34763 +  0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x22}},
34764 + {0x1006, 64, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x11,
34765 +  0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0,
34766 +  0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84,
34767 +  0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08}},
34768 + {0x1046, 64, { 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98,
34769 +  0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90,
34770 +  0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0,
34771 +  0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0}},
34772 + {0x1086, 64, { 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
34773 +  0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90,
34774 +  0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0,
34775 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22}},
34776 + {0x10c6, 64, { 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14,
34777 +  0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f,
34778 +  0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
34779 +  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98}},
34780 + {0x1106, 64, { 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b,
34781 +  0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00,
34782 +  0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
34783 +  0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f}},
34784 + {0x1146, 64, { 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45,
34785 +  0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00,
34786 +  0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
34787 +  0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f}},
34788 + {0x1186, 64, { 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90,
34789 +  0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0,
34790 +  0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90,
34791 +  0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b}},
34792 + {0x11c6, 64, { 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5,
34793 +  0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00,
34794 +  0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13,
34795 +  0x27, 0x8f, 0x1a, 0x12, 0x13, 0x27, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12}},
34796 + {0x1206, 64, { 0x13, 0x27, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x27, 0x8f, 0x1b, 0x80, 0xe8,
34797 +  0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00,
34798 +  0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
34799 +  0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x7b, 0x8f, 0x1a, 0x12, 0x13}},
34800 + {0x1246, 64, { 0x7b, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x7b, 0x8f, 0x1a, 0xe5, 0x1a, 0x65,
34801 +  0x1b, 0x60, 0x07, 0x12, 0x13, 0x7b, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0xd6,
34802 +  0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x1a, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f,
34803 +  0xf4, 0x7e, 0x01, 0x12, 0x12, 0xe7, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44}},
34804 + {0x1286, 64, { 0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xd0, 0x90, 0x7f,
34805 +  0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3e, 0x44, 0x80, 0xfd, 0x12,
34806 +  0x11, 0xd0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3f, 0x54, 0x7f, 0xfd, 0x12, 0x12, 0x1a, 0x90,
34807 +  0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80}},
34808 + {0x12c6, 64, { 0xfd, 0x12, 0x12, 0x1a, 0x22, 0x05, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x14, 0x03, 0x00, 0x00,
34809 +  0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10, 0xc1, 0x16, 0x01, 0x0a, 0x00, 0xc1, 0x9b, 0x00,
34810 +  0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e, 0x60,
34811 +  0x05, 0x12, 0x0d, 0x60, 0x80, 0xee, 0x22, 0x00, 0x00, 0x02, 0x10, 0x06, 0x00, 0x02, 0x13}},
34812 + {0x1306, 64, { 0x04, 0x00, 0x02, 0x00, 0x03, 0x00, 0x02, 0x10, 0x2d, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0,
34813 +  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
34814 +  0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
34815 +  0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90}},
34816 + {0x1346, 64, { 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
34817 +  0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
34818 +  0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0,
34819 +  0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff}},
34820 + {0x1386, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
34821 +  0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0,
34822 +  0x00, 0xe0, 0xff, 0x22, 0x12, 0x0f, 0xcf, 0x12, 0x0d, 0x71, 0x12, 0x0b, 0x4a, 0x22, 0x00, 0x00,
34823 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
34824   {0x13c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34825    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34826    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34827 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x40, 0x00, 0x02, 0x14}},
34828 - {0x1406, 64, { 0x04, 0x00, 0x02, 0x10, 0x16, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34829 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
34830 + {0x1406, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34831    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34832    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34833    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
34834 @@ -425,7 +426,7 @@
34835   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34836    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34837    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34838 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
34839 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
34840   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x10, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
34841    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
34842    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
34843 @@ -443,5 +444,5 @@
34844    0x00, 0x42, 0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c,
34845    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
34846   {0x1a06,  4, { 0x72, 0x00, 0x00, 0x00}},
34847 - {0xffff,      0,      {0x00} }
34848 + {0xffff,  0, {0x00}}
34849  };
34850 diff -Nur linux-2.4.19.org/drivers/usb/serial/keyspan_usa49msg.h linux-2.4.19/drivers/usb/serial/keyspan_usa49msg.h
34851 --- linux-2.4.19.org/drivers/usb/serial/keyspan_usa49msg.h      Wed Oct 10 00:15:03 2001
34852 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa49msg.h  Thu Oct 31 08:11:25 2002
34853 @@ -41,14 +41,10 @@
34854  
34855         4th revision: USA49W version
34856  
34857 -       See usa26msg.h for description of message formats
34858 -
34859 -       Third revision: USA28X version (aka USA26)
34860 -
34861         Buffer formats for RX/TX data messages are not defined by
34862         a structure, but are described here:
34863  
34864 -       USB OUT (host -> USA26, transmit) messages contain a 
34865 +       USB OUT (host -> USAxx, transmit) messages contain a 
34866         REQUEST_ACK indicator (set to 0xff to request an ACK at the 
34867         completion of transmit; 0x00 otherwise), followed by data:
34868  
34869 @@ -56,17 +52,28 @@
34870  
34871         with a total data length of 63.
34872  
34873 -       USB IN (USA26 -> host, receive) messages contain either a zero
34874 -       flag (indicating no error in any data bytes):
34875 +       USB IN (USAxx -> host, receive) messages begin with a status
34876 +       byte in which the 0x80 bit is either:
34877 +                                       
34878 +               (a)     0x80 bit clear
34879 +                       indicates that the bytes following it are all data
34880 +                       bytes:
34881 +
34882 +                               STAT DATA DATA DATA DATA DATA ...
34883 +
34884 +                       for a total of up to 63 DATA bytes,
34885 +
34886 +       or:
34887  
34888 -               00 DAT DAT DAT ...
34889 +               (b)     0x80 bit set
34890 +                       indiates that the bytes following alternate data and
34891 +                       status bytes:
34892  
34893 -       for a total of 63 data bytes, or a non-zero status flag (indicating 
34894 -       that all data bytes will be preceded by status flag):
34895 +                               STAT DATA STAT DATA STAT DATA STAT DATA ...
34896  
34897 -               STAT DAT STAT DAT STAT DAT ...
34898 +                       for a total of up to 32 DATA bytes.
34899  
34900 -       for a total of 32 data bytes.  The valid bits in the STAT bytes are:
34901 +       The valid bits in the STAT bytes are:
34902  
34903                 OVERRUN 0x02
34904                 PARITY  0x04
34905 @@ -75,9 +82,19 @@
34906  
34907         Notes:
34908         
34909 -       1.      a "no status" RX data message (first byte zero) can serve as
34910 -               a "break off" indicator.
34911 -       2.      a control message specifying disablePort will be answered
34912 +       (1) The OVERRUN bit can appear in either (a) or (b) format
34913 +               messages, but the but the PARITY/FRAMING/BREAK bits
34914 +               only appear in (b) format messages.
34915 +       (2) For the host to determine the exact point at which the
34916 +               overrun occurred (to identify the point in the data
34917 +               stream at which the data was lost), it needs to count
34918 +               128 characters, starting at the first character of the
34919 +               message in which OVERRUN was reported; the lost character(s)
34920 +               would have been received between the 128th and 129th
34921 +               characters.
34922 +       (3)     An RX data message in which the first byte has 0x80 clear
34923 +               serves as a "break off" indicator.
34924 +       (4)     a control message specifying disablePort will be answered
34925                 with a status message, but no further status will be sent
34926                 until a control messages with enablePort is sent
34927  
34928 @@ -92,6 +109,7 @@
34929         2000mar09       change to support 4 ports
34930         2000may03       change external clocking to match USA-49W hardware
34931         2000jun01       add extended BSD-style copyright text
34932 +       2001jul05       change message format to improve OVERRUN case
34933  */
34934  
34935  #ifndef        __USA49MSG__
34936 @@ -107,7 +125,7 @@
34937         0x80            globalControlMessage
34938  */
34939  
34940 -typedef struct keyspan_usa49_portControlMessage
34941 +struct keyspan_usa49_portControlMessage
34942  {
34943         /*
34944                 0.      0/1/2/3         port control message follows
34945 @@ -173,7 +191,7 @@
34946                 enablePort,             // start servicing port (move data, check status)
34947                 disablePort;    // stop servicing port (does implicit tx/rx flush/off)
34948         
34949 -} keyspan_usa49_portControlMessage;
34950 +};
34951  
34952  // defines for bits in lcr
34953  #define        USA_DATABITS_5          0x00
34954 @@ -201,7 +219,7 @@
34955         sends any control message (either global or port-specific).
34956  */
34957  
34958 -typedef struct keyspan_usa49_globalControlMessage
34959 +struct keyspan_usa49_globalControlMessage
34960  {
34961         u8      portNumber,                     // 0x80
34962                 sendGlobalStatus,       // 1/2=number of status responses requested
34963 @@ -209,7 +227,7 @@
34964                 resetStatusCount,       // a cycling value
34965                 remoteWakeupEnable,             // 0x10=P1, 0x20=P2, 0x40=P3, 0x80=P4
34966                 disableStatusMessages;  // 1=send no status until host talks
34967 -} keyspan_usa49_globalControlMessage;
34968 +};
34969  
34970  /*
34971         Device->host messages send on the global status endpoint
34972 @@ -221,7 +239,7 @@
34973         0x81                            globalDebugMessage
34974  */
34975  
34976 -typedef struct keyspan_usa49_portStatusMessage // one for each port
34977 +struct keyspan_usa49_portStatusMessage // one for each port
34978  {
34979         u8      portNumber,             // 0,1,2,3
34980                 cts,                    // reports CTS pin
34981 @@ -234,7 +252,7 @@
34982                 controlResponse,// 1=a control message has been processed
34983                 txAck,                  // ACK (data TX complete)
34984                 rs232valid;             // RS-232 signal valid
34985 -} keyspan_usa49_portStatusMessage;
34986 +};
34987  
34988  // bits in RX data message when STAT byte is included
34989  #define        RXERROR_OVERRUN 0x02
34990 @@ -242,19 +260,19 @@
34991  #define        RXERROR_FRAMING 0x08
34992  #define        RXERROR_BREAK   0x10
34993  
34994 -typedef struct keyspan_usa49_globalStatusMessage
34995 +struct keyspan_usa49_globalStatusMessage
34996  {
34997         u8      portNumber,                     // 0x80=globalStatusMessage
34998                 sendGlobalStatus,       // from request, decremented
34999                 resetStatusCount;       // as in request
35000 -} keyspan_usa49_globalStatusMessage;
35001 +};
35002  
35003 -typedef struct keyspan_usa49_globalDebugMessage
35004 +struct keyspan_usa49_globalDebugMessage
35005  {
35006         u8      portNumber,                     // 0x81=globalDebugMessage
35007                 n,                                      // typically a count/status byte
35008                 b;                                      // typically a data byte
35009 -} keyspan_usa49_globalDebugMessage;
35010 +};
35011  
35012  // ie: the maximum length of an EZUSB endpoint buffer
35013  #define        MAX_DATA_LEN                    64
35014 diff -Nur linux-2.4.19.org/drivers/usb/serial/keyspan_usa49w_fw.h linux-2.4.19/drivers/usb/serial/keyspan_usa49w_fw.h
35015 --- linux-2.4.19.org/drivers/usb/serial/keyspan_usa49w_fw.h     Wed Oct 10 00:15:03 2001
35016 +++ linux-2.4.19/drivers/usb/serial/keyspan_usa49w_fw.h Thu Oct 31 08:11:25 2002
35017 @@ -1,43 +1,47 @@
35018  /* keyspan_usa49w_fw.h
35019 -  
35020 -   Generated from Keyspan firmware image usa49code.h Sat Oct  6 12:06:59 EST 2001
35021 -   This firmware is for the Keyspan USA-49W Serial Adaptor
35022  
35023 -   "The firmware contained herein as keyspan_usa49w_fw.h is
35024 -   Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
35025 -   ("Keyspan"), as an unpublished work.  This notice does not imply
35026 -   unrestricted or public access to this firmware which is a trade secret of
35027 -   Keyspan, and which may not be reproduced, used, sold or transferred to any
35028 -   third party without Keyspan's prior written consent.  All Rights Reserved.
35029 +       The firmware contained herein as keyspan_usa49w_fw.h is
35030  
35031 -   This firmware may not be modified and may only be used with the Keyspan 
35032 -   USA-49W Serial Adapter.  Distribution and/or Modification of the
35033 -   keyspan.c driver which includes this firmware, in whole or in part,
35034 -   requires the inclusion of this statement."
35035 +               Copyright (C) 1999-2001
35036 +               Keyspan, A division of InnoSys Incorporated ("Keyspan")
35037 +               
35038 +       as an unpublished work. This notice does not imply unrestricted or
35039 +       public access to the source code from which this firmware image is
35040 +       derived.  Except as noted below this firmware image may not be 
35041 +       reproduced, used, sold or transferred to any third party without 
35042 +       Keyspan's prior written consent.  All Rights Reserved.
35043 +
35044 +       Permission is hereby granted for the distribution of this firmware 
35045 +       image as part of a Linux or other Open Source operating system kernel 
35046 +       in text or binary form as required. 
35047 +
35048 +       This firmware may not be modified and may only be used with  
35049 +       Keyspan hardware.  Distribution and/or Modification of the 
35050 +       keyspan.c driver which includes this firmware, in whole or in 
35051 +       part, requires the inclusion of this statement."
35052  
35053  */
35054  
35055  static const struct ezusb_hex_record keyspan_usa49w_firmware[] = {
35056 - {0x7f92,  1, { 0x01}},
35057 - {0x0033,  3, { 0x02, 0x18, 0xfc}},
35058 + {0x0033,  3, { 0x02, 0x18, 0xfb}},
35059   {0x0036, 12, { 0x90, 0x78, 0x41, 0x74, 0x01, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
35060   {0x0046, 16, { 0xe4, 0xff, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xfe, 0xe5, 0x15}},
35061   {0x0056, 16, { 0x24, 0x04, 0xfd, 0xe4, 0x35, 0x14, 0xfa, 0xa9, 0x05, 0x7b, 0x01, 0xef, 0x7c, 0x00, 0x29, 0xf9}},
35062 - {0x0066, 16, { 0xec, 0x3a, 0xfa, 0xee, 0x12, 0x11, 0xf6, 0x0f, 0xbf, 0x22, 0xd7, 0xe5, 0x15, 0x24, 0x05, 0xf5}},
35063 + {0x0066, 16, { 0xec, 0x3a, 0xfa, 0xee, 0x12, 0x11, 0xf1, 0x0f, 0xbf, 0x22, 0xd7, 0xe5, 0x15, 0x24, 0x05, 0xf5}},
35064   {0x0076, 16, { 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x03, 0x02, 0x01, 0x34, 0xe5, 0x15, 0x24, 0x09}},
35065   {0x0086, 16, { 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x0e, 0xe5, 0x15, 0x24, 0x0a, 0xf5, 0x82}},
35066 - {0x0096, 16, { 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x18, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x16, 0x4c, 0xe5}},
35067 + {0x0096, 16, { 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x18, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x16, 0x47, 0xe5}},
35068   {0x00a6, 16, { 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xcf, 0xf0, 0x80, 0x41}},
35069 - {0x00b6, 16, { 0xe5, 0x15, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x16, 0x7b}},
35070 + {0x00b6, 16, { 0xe5, 0x15, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x16, 0x76}},
35071   {0x00c6, 16, { 0xe5, 0x15, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x00, 0x03}},
35072   {0x00d6, 16, { 0x7f, 0x01, 0xe5, 0x15, 0x24, 0x08, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xfd, 0x12}},
35073 - {0x00e6, 16, { 0x16, 0x4c, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x30}},
35074 + {0x00e6, 16, { 0x16, 0x47, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x30}},
35075   {0x00f6, 16, { 0xf0, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x80, 0xf0}},
35076   {0x0003, 16, { 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x78, 0x41, 0x74}},
35077   {0x0013, 16, { 0x01, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24}},
35078   {0x0023, 16, { 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22}},
35079   {0x0043,  3, { 0x02, 0x1b, 0x00}},
35080 - {0x0000,  3, { 0x02, 0x10, 0x9a}},
35081 + {0x0000,  3, { 0x02, 0x10, 0x95}},
35082   {0x0106, 64, { 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
35083    0xe0, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0, 0xe5, 0x15, 0x24, 0x36, 0xf5,
35084    0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24,
35085 @@ -49,16 +53,16 @@
35086   {0x0186, 64, { 0x15, 0x24, 0x17, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x11, 0xe5, 0x15, 0x24, 0x32,
35087    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x04, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24,
35088    0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfb, 0xf0, 0xe4, 0xff, 0xe5, 0x15,
35089 -  0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xfd, 0x12, 0x16, 0x4c, 0xe5}},
35090 +  0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xfd, 0x12, 0x16, 0x47, 0xe5}},
35091   {0x01c6, 64, { 0x15, 0x24, 0x0e, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x11, 0xe5, 0x15, 0x24, 0x33,
35092    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24,
35093    0x33, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0xf0, 0xe5, 0x15, 0x24, 0x33,
35094    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xe5, 0x15, 0x24, 0x0f}},
35095   {0x0206, 64, { 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x2f, 0xe5, 0x15, 0x24, 0x33, 0xf5, 0x82, 0xe4,
35096    0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x15, 0x24, 0x10, 0xf5, 0x82, 0xe4, 0x35,
35097 -  0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x15, 0xec, 0xe5, 0x15, 0x24, 0x11, 0xf5, 0x82, 0xe4, 0x35,
35098 -  0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x16, 0x1c, 0xe5, 0x15, 0x24, 0x33, 0xf5, 0x82, 0xe4}},
35099 - {0x0246, 64, { 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x15, 0xbc, 0xe5, 0x15, 0x24, 0x14, 0xf5, 0x82, 0xe4, 0x35,
35100 +  0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x15, 0xe7, 0xe5, 0x15, 0x24, 0x11, 0xf5, 0x82, 0xe4, 0x35,
35101 +  0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x16, 0x17, 0xe5, 0x15, 0x24, 0x33, 0xf5, 0x82, 0xe4}},
35102 + {0x0246, 64, { 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x15, 0xb7, 0xe5, 0x15, 0x24, 0x14, 0xf5, 0x82, 0xe4, 0x35,
35103    0x14, 0xf5, 0x83, 0xe0, 0x60, 0x44, 0xe5, 0x15, 0x24, 0x15, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
35104    0x83, 0xe0, 0x60, 0x11, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0,
35105    0x44, 0x01, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5}},
35106 @@ -84,12 +88,12 @@
35107    0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14}},
35108   {0x03c6, 64, { 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x01, 0xf0, 0x12, 0x00,
35109    0x36, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35,
35110 -  0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0xff, 0xf0, 0xfd, 0xe4, 0xff, 0x12, 0x16, 0x4c, 0xe5, 0x15,
35111 +  0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0xff, 0xf0, 0xfd, 0xe4, 0xff, 0x12, 0x16, 0x47, 0xe5, 0x15,
35112    0x24, 0x2c, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x15, 0x24, 0x2b}},
35113   {0x0406, 64, { 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x1b,
35114    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x0e, 0xe5, 0x15, 0x24, 0x25, 0xf5, 0x82,
35115    0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x28, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35,
35116 -  0x14, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xff, 0xf0, 0xfd, 0xe4, 0xff, 0x12, 0x16, 0x4c, 0xe5}},
35117 +  0x14, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xff, 0xf0, 0xfd, 0xe4, 0xff, 0x12, 0x16, 0x47, 0xe5}},
35118   {0x0446, 64, { 0x15, 0x24, 0x2b, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0xe5, 0x16, 0x42, 0x13,
35119    0xe5, 0x15, 0x24, 0x1c, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x70, 0x0e, 0xe5,
35120    0x15, 0x24, 0x25, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x2a, 0x90, 0x78, 0x41,
35121 @@ -100,12 +104,12 @@
35122    0xe0, 0x44, 0x40, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5}},
35123   {0x04c6, 64, { 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24, 0x1e,
35124    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x28, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82,
35125 -  0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfe, 0xff, 0xf0, 0xfd, 0xe4, 0xff, 0x12, 0x16, 0x4c,
35126 +  0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfe, 0xff, 0xf0, 0xfd, 0xe4, 0xff, 0x12, 0x16, 0x47,
35127    0xe5, 0x15, 0x24, 0x2d, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0xe5}},
35128   {0x0506, 64, { 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x1f, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x0e,
35129    0xe5, 0x15, 0x24, 0x25, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x27, 0xe5, 0x15,
35130    0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x01, 0xff, 0xf0, 0xfd, 0xe4,
35131 -  0xff, 0x12, 0x16, 0x4c, 0xe5, 0x15, 0x24, 0x2d, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83}},
35132 +  0xff, 0x12, 0x16, 0x47, 0xe5, 0x15, 0x24, 0x2d, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83}},
35133   {0x0546, 64, { 0xe4, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x20, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
35134    0xe0, 0x70, 0x0e, 0xe5, 0x15, 0x24, 0x25, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60,
35135    0x18, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0, 0xe5, 0x15, 0x24, 0x36, 0xf5, 0x82, 0xe4, 0x35, 0x14,
35136 @@ -115,12 +119,12 @@
35137    0x83, 0xe0, 0x60, 0x1f, 0xe5, 0x15, 0x24, 0x2e, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74,
35138    0x01, 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0}},
35139   {0x05c6, 64, { 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x23, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60,
35140 -  0x03, 0x12, 0x18, 0x91, 0xe5, 0x15, 0x24, 0x24, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0,
35141 +  0x03, 0x12, 0x18, 0x85, 0xe5, 0x15, 0x24, 0x24, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0,
35142    0x60, 0x1b, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x08,
35143    0xf0, 0x90, 0x7f, 0x98, 0xe0, 0xff, 0xe5, 0x16, 0xf4, 0xfe, 0xef, 0x5e, 0xf0, 0xe5, 0x15}},
35144   {0x0606, 64, { 0x24, 0x25, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x16, 0xe5, 0x15, 0x24, 0x31, 0xf5,
35145    0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xf7, 0xf0, 0x90, 0x7f, 0x98, 0xe0, 0x45, 0x16,
35146 -  0xf0, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x12, 0x08, 0x07, 0x83, 0x00, 0x07, 0xf7, 0x01, 0x08,
35147 +  0xf0, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x12, 0x03, 0x07, 0x83, 0x00, 0x07, 0xf7, 0x01, 0x08,
35148    0x63, 0x03, 0x06, 0x4c, 0x06, 0x07, 0x74, 0x08, 0x07, 0x68, 0x09, 0x07, 0x50, 0x0a, 0x07}},
35149   {0x0646, 64, { 0x5f, 0x0b, 0x00, 0x00, 0x08, 0xb2, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x1c, 0x14, 0x70, 0x03,
35150    0x02, 0x06, 0xfe, 0x24, 0x02, 0x60, 0x03, 0x02, 0x07, 0x46, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0,
35151 @@ -133,14 +137,14 @@
35152   {0x06c6, 64, { 0xfe, 0x90, 0x7f, 0xee, 0xe0, 0x7c, 0x00, 0x24, 0x00, 0xf5, 0x19, 0xec, 0x3e, 0xf5, 0x18, 0x75, 0x33,
35153    0x19, 0x75, 0x34, 0x12, 0x75, 0x82, 0x14, 0x75, 0x83, 0x19, 0xe0, 0x75, 0x27, 0x00, 0xf5, 0x28,
35154    0xd3, 0xe5, 0x28, 0x95, 0x19, 0xe5, 0x27, 0x95, 0x18, 0x40, 0x06, 0x85, 0x18, 0x27, 0x85, 0x19,
35155 -  0x28, 0x12, 0x13, 0x17, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x14, 0x30}},
35156 +  0x28, 0x12, 0x13, 0x12, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x14, 0x2b}},
35157   {0x0706, 64, { 0xea, 0x49, 0x60, 0x32, 0x90, 0x7f, 0xee, 0xe0, 0x75, 0x18, 0x00, 0xf5, 0x19, 0xae, 0x02, 0xaf, 0x01,
35158    0x8e, 0x33, 0x8f, 0x34, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xfe, 0xa3, 0xe0, 0x8e, 0x27, 0xf5, 0x28,
35159    0xd3, 0x95, 0x19, 0xe5, 0x27, 0x95, 0x18, 0x40, 0x06, 0x85, 0x18, 0x27, 0x85, 0x19, 0x28, 0x12,
35160 -  0x13, 0x17, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x08, 0xb9}},
35161 +  0x13, 0x12, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x08, 0xb9}},
35162   {0x0746, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0x00, 0xe5, 0x25, 0xf0, 0x90,
35163    0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x25, 0x02, 0x08,
35164 -  0xb9, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x22, 0x12, 0x0a, 0xbd, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0x00,
35165 +  0xb9, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x22, 0x12, 0x0a, 0xb8, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0x00,
35166    0xe5, 0x22, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xe8}},
35167   {0x0786, 64, { 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x00, 0xe4, 0x33, 0xff,
35168    0x25, 0xe0, 0xff, 0xa2, 0x06, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90,
35169 @@ -162,266 +166,266 @@
35170    0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0,
35171    0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
35172    0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0xe5, 0x11, 0x54, 0x0f, 0x70}},
35173 - {0x08c6, 64, { 0x03, 0x02, 0x09, 0xb2, 0x12, 0x16, 0xaa, 0xef, 0x20, 0xe1, 0x75, 0x12, 0x17, 0x08, 0xef, 0x14, 0xf5,
35174 -  0x19, 0x12, 0x18, 0xd8, 0xef, 0x25, 0x19, 0xff, 0xe4, 0x33, 0xfe, 0xc3, 0xef, 0x94, 0x80, 0xee,
35175 + {0x08c6, 64, { 0x03, 0x02, 0x09, 0xb2, 0x12, 0x16, 0xa5, 0xef, 0x20, 0xe1, 0x75, 0x12, 0x17, 0x03, 0xef, 0x14, 0xf5,
35176 +  0x19, 0x12, 0x18, 0xcc, 0xef, 0x25, 0x19, 0xff, 0xe4, 0x33, 0xfe, 0xc3, 0xef, 0x94, 0x80, 0xee,
35177    0x64, 0x80, 0x94, 0x80, 0x50, 0x59, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xe0, 0xfe, 0xa3, 0xe0,
35178    0xff, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0x30, 0xe0, 0x11, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82}},
35179   {0x0906, 64, { 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82,
35180    0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0xf0, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4,
35181    0x35, 0x14, 0xf5, 0x83, 0xe0, 0x20, 0xe2, 0x12, 0xe5, 0x19, 0x60, 0x0e, 0xf5, 0x23, 0xef, 0x24,
35182 -  0x01, 0xf5, 0x2d, 0xe4, 0x3e, 0xf5, 0x2c, 0x12, 0x14, 0xb2, 0xe4, 0xff, 0x12, 0x14, 0xe8}},
35183 +  0x01, 0xf5, 0x2d, 0xe4, 0x3e, 0xf5, 0x2c, 0x12, 0x14, 0xad, 0xe4, 0xff, 0x12, 0x14, 0xe3}},
35184   {0x0946, 64, { 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe7, 0x5d, 0x12, 0x18,
35185 -  0xd8, 0xe5, 0x15, 0x24, 0x3b, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xfe, 0xef, 0xc3,
35186 +  0xcc, 0xe5, 0x15, 0x24, 0x3b, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xfe, 0xef, 0xc3,
35187    0x9e, 0x50, 0x48, 0xe5, 0x15, 0x24, 0x2f, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01,
35188    0xf0, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7b}},
35189   {0x0986, 64, { 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x16, 0x42,
35190    0x13, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x10, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35,
35191 -  0x14, 0xf5, 0x83, 0xe0, 0xf5, 0x24, 0x80, 0x03, 0x12, 0x12, 0xa6, 0x12, 0x16, 0xd9, 0xef, 0x30,
35192 -  0xe1, 0x03, 0x02, 0x0a, 0xbc, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5}},
35193 - {0x09c6, 64, { 0x83, 0xe0, 0x54, 0x80, 0xf0, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xc0,
35194 -  0x83, 0xc0, 0x82, 0xe0, 0xfe, 0x12, 0x18, 0xe4, 0xee, 0x4f, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x12,
35195 -  0x17, 0xde, 0x8f, 0x19, 0xe5, 0x15, 0x24, 0x35, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0,
35196 -  0xfe, 0xef, 0xc3, 0x9e, 0x50, 0x28, 0x12, 0x18, 0xc0, 0xef, 0x30, 0xe0, 0x21, 0xe5, 0x15}},
35197 - {0x0a06, 64, { 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x20, 0xe7, 0x12, 0xe5, 0x15, 0x24, 0x31,
35198 -  0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x20, 0xe1, 0x03, 0x02, 0x0a, 0xbc, 0xe5, 0x15,
35199 -  0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x19, 0x70,
35200 -  0x0e, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0x22}},
35201 - {0x0a46, 64, { 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x30, 0xe7, 0x29, 0xe5,
35202 -  0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x23, 0x85, 0x15, 0x82, 0x85,
35203 -  0x14, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0x8c, 0x2c, 0xf5, 0x2d, 0x12, 0x13, 0xe2, 0xe5,
35204 -  0x19, 0x25, 0xe0, 0xff, 0x12, 0x15, 0x1e, 0x22, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03}},
35205 - {0x0a86, 64, { 0x75, 0x19, 0x3f, 0x85, 0x19, 0x23, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0xe0, 0xfe, 0xa3,
35206 -  0xe0, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0xe0,
35207 -  0xfe, 0xa3, 0xe0, 0x24, 0x01, 0xf5, 0x2d, 0xe4, 0x3e, 0xf5, 0x2c, 0x12, 0x14, 0x71, 0xe5, 0x19,
35208 -  0x04, 0xff, 0x12, 0x15, 0x1e, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74}},
35209 - {0x0ac6, 64, { 0xf0, 0xf0, 0x90, 0x7f, 0x96, 0xf0, 0xe4, 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x78, 0x4a, 0x04, 0xf0, 0xf5,
35210 -  0x8e, 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98,
35211 -  0x74, 0x1f, 0xf0, 0x90, 0x78, 0x43, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90, 0x7f,
35212 -  0xdf, 0x74, 0x9f, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0}},
35213 - {0x0b06, 64, { 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75,
35214 -  0x16, 0x01, 0x12, 0x0f, 0x17, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90,
35215 -  0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35,
35216 -  0x14, 0xf5, 0x83, 0xe4, 0xf0, 0x7e, 0x7e, 0x7f, 0x40, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83}},
35217 - {0x0b46, 64, { 0x74, 0x7e, 0xf0, 0xa3, 0x74, 0x40, 0xf0, 0x7e, 0x7e, 0x7f, 0x80, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83,
35218 -  0xa3, 0xa3, 0x74, 0x7e, 0xf0, 0xa3, 0x74, 0x80, 0xf0, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c,
35219 -  0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x0f, 0x17, 0x7e,
35220 -  0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0}},
35221 - {0x0b86, 64, { 0x75, 0x16, 0x02, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01, 0xf0,
35222 -  0x7e, 0x7d, 0x7f, 0xc0, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0x74, 0x7d, 0xf0, 0xa3, 0x74, 0xc0,
35223 -  0xf0, 0x7e, 0x7e, 0x7f, 0x00, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0x74, 0x7e, 0xf0,
35224 -  0xa3, 0x74, 0x00, 0xf0, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90}},
35225 - {0x0bc6, 64, { 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0x12, 0x0f, 0x17, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14,
35226 -  0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0xe5, 0x15, 0x24,
35227 -  0x26, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x02, 0xf0, 0x7e, 0x7d, 0x7f, 0x40, 0x85,
35228 -  0x15, 0x82, 0x85, 0x14, 0x83, 0x74, 0x7d, 0xf0, 0xa3, 0x74, 0x40, 0xf0, 0x7e, 0x7d, 0x7f}},
35229 - {0x0c06, 64, { 0x80, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0x74, 0x7d, 0xf0, 0xa3, 0x74, 0x80, 0xf0, 0x7e,
35230 -  0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75,
35231 -  0x16, 0x08, 0x12, 0x0f, 0x17, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90,
35232 -  0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4}},
35233 - {0x0c46, 64, { 0x35, 0x14, 0xf5, 0x83, 0x74, 0x03, 0xf0, 0x7e, 0x7c, 0x7f, 0xc0, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83,
35234 -  0x74, 0x7c, 0xf0, 0xa3, 0x74, 0xc0, 0xf0, 0x7e, 0x7d, 0x7f, 0x00, 0x85, 0x15, 0x82, 0x85, 0x14,
35235 -  0x83, 0xa3, 0xa3, 0x74, 0x7d, 0xf0, 0xa3, 0x74, 0x00, 0xf0, 0xc2, 0x0a, 0xc2, 0x09, 0xd2, 0x02,
35236 -  0x22, 0xe5, 0x10, 0x04, 0x54, 0x03, 0xf5, 0x10, 0x14, 0x60, 0x1f, 0x14, 0x60, 0x31, 0x14}},
35237 - {0x0c86, 64, { 0x60, 0x43, 0x24, 0x03, 0x70, 0x52, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90,
35238 -  0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0x80, 0x3d, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14,
35239 -  0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x80, 0x28, 0x7e,
35240 +  0x14, 0xf5, 0x83, 0xe0, 0xf5, 0x24, 0x80, 0x03, 0x12, 0x12, 0xa1, 0x12, 0x16, 0xd4, 0xef, 0x30,
35241 +  0xe1, 0x03, 0x02, 0x0a, 0xb7, 0x12, 0x17, 0xd2, 0x8f, 0x19, 0x12, 0x18, 0xd8, 0xe5, 0x15}},
35242 + {0x09c6, 64, { 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x15, 0x24, 0x35, 0xf5, 0x82,
35243 +  0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x19, 0xc3, 0x9f, 0x50, 0x28, 0x12, 0x18, 0xb4,
35244 +  0xef, 0x30, 0xe0, 0x21, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0,
35245 +  0x20, 0xe7, 0x12, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0}},
35246 + {0x0a06, 64, { 0x20, 0xe1, 0x03, 0x02, 0x0a, 0xb7, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
35247 +  0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x19, 0x70, 0x03, 0x02, 0x0a, 0xb7, 0xb4, 0x80, 0x0f, 0xe5, 0x15,
35248 +  0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x15, 0x24,
35249 +  0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x30, 0xe7, 0x29, 0xe5, 0x19}},
35250 + {0x0a46, 64, { 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x23, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83,
35251 +  0xa3, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0x8c, 0x2c, 0xf5, 0x2d, 0x12, 0x13, 0xdd, 0xe5, 0x19, 0x25,
35252 +  0xe0, 0xff, 0x12, 0x15, 0x19, 0x22, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f,
35253 +  0x85, 0x19, 0x23, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0}},
35254 + {0x0a86, 64, { 0xff, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xf5, 0x82, 0x8c, 0x83,
35255 +  0xef, 0xf0, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0x24, 0x01,
35256 +  0xf5, 0x2d, 0xe4, 0x3e, 0xf5, 0x2c, 0x12, 0x14, 0x6c, 0xe5, 0x19, 0x04, 0xff, 0x12, 0x15, 0x19,
35257 +  0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xf0, 0xf0, 0x90, 0x7f, 0x96}},
35258 + {0x0ac6, 64, { 0xf0, 0xe4, 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x78, 0x4a, 0x04, 0xf0, 0xf5, 0x8e, 0x90, 0x7f, 0x95, 0x74,
35259 +  0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x1f, 0xf0, 0x90, 0x78,
35260 +  0x43, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90, 0x7f, 0xdf, 0x74, 0x9f, 0xf0, 0x90,
35261 +  0x7f, 0xde, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0, 0x7e, 0x7b, 0x7f, 0xc0, 0x75}},
35262 + {0x0b06, 64, { 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0x12, 0x0f, 0x12,
35263 +  0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0,
35264 +  0x75, 0x16, 0x01, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0,
35265 +  0x7e, 0x7e, 0x7f, 0x40, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0x74, 0x7e, 0xf0, 0xa3, 0x74}},
35266 + {0x0b46, 64, { 0x40, 0xf0, 0x7e, 0x7e, 0x7f, 0x80, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0x74, 0x7e, 0xf0,
35267 +  0xa3, 0x74, 0x80, 0xf0, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f,
35268 +  0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x0f, 0x12, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14,
35269 +  0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0xe5, 0x15}},
35270 + {0x0b86, 64, { 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x7e, 0x7d, 0x7f, 0xc0, 0x85,
35271 +  0x15, 0x82, 0x85, 0x14, 0x83, 0x74, 0x7d, 0xf0, 0xa3, 0x74, 0xc0, 0xf0, 0x7e, 0x7e, 0x7f, 0x00,
35272 +  0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0x74, 0x7e, 0xf0, 0xa3, 0x74, 0x00, 0xf0, 0x7e,
35273    0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0}},
35274 - {0x0cc6, 64, { 0x75, 0x16, 0x04, 0x80, 0x13, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f,
35275 -  0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0xe5, 0x32, 0x55, 0x16, 0x70, 0x03, 0x02, 0x0e, 0x16,
35276 -  0xe5, 0x16, 0xf4, 0xff, 0x52, 0x32, 0xe5, 0x26, 0x54, 0x7f, 0xfe, 0x70, 0x0f, 0xe5, 0x2a, 0x55,
35277 -  0x16, 0x60, 0x24, 0x90, 0x7f, 0x98, 0xe0, 0x45, 0x16, 0xf0, 0x80, 0x1b, 0xbe, 0x20, 0x18}},
35278 - {0x0d06, 64, { 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe3, 0x09, 0xe4, 0xf5,
35279 -  0x2a, 0x90, 0x7f, 0x98, 0xe0, 0x5f, 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14,
35280 -  0xf5, 0x83, 0xe0, 0x60, 0x03, 0xe0, 0x14, 0xf0, 0xe5, 0x15, 0x24, 0x34, 0xf5, 0x82, 0xe4, 0x35,
35281 -  0x14, 0xf5, 0x83, 0xe0, 0x60, 0x03, 0xe0, 0x14, 0xf0, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0x16}},
35282 - {0x0d46, 64, { 0x74, 0x0a, 0xf0, 0x12, 0x00, 0x36, 0xef, 0x54, 0x01, 0xff, 0xf5, 0x19, 0xe5, 0x15, 0x24, 0x2c, 0xf5,
35283 -  0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x6f, 0x60, 0x07, 0xe5, 0x19, 0xf0, 0xe5, 0x16, 0x42,
35284 -  0x13, 0x12, 0x18, 0xf0, 0x8f, 0x19, 0xe5, 0x15, 0x24, 0x27, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
35285 -  0x83, 0xe0, 0xff, 0xe5, 0x19, 0x54, 0x10, 0xfe, 0x6f, 0x60, 0x06, 0xee, 0xf0, 0xe5, 0x16}},
35286 - {0x0d86, 64, { 0x42, 0x13, 0xe5, 0x15, 0x24, 0x28, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x19,
35287 -  0x54, 0x80, 0xfe, 0x6f, 0x60, 0x06, 0xee, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x29,
35288 -  0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x19, 0x54, 0x20, 0xfe, 0x6f, 0x60,
35289 -  0x15, 0xee, 0xf0, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0}},
35290 - {0x0dc6, 64, { 0x30, 0xe4, 0x04, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x12, 0x55, 0x16, 0xff, 0xf5, 0x19, 0xe5, 0x15, 0x24,
35291 -  0x2a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x6f, 0x60, 0x16, 0xe5, 0x19, 0xf0, 0xe5,
35292 -  0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe5, 0x04, 0xe5, 0x16,
35293 -  0x42, 0x13, 0xe5, 0x17, 0x55, 0x16, 0xff, 0xf5, 0x19, 0xe5, 0x15, 0x24, 0x30, 0xf5, 0x82}},
35294 - {0x0e06, 64, { 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x6f, 0x60, 0x07, 0xe5, 0x19, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0x22,
35295 -  0x30, 0x09, 0x03, 0x02, 0x0f, 0x16, 0xe5, 0x24, 0x14, 0x60, 0x2a, 0x14, 0x60, 0x41, 0x14, 0x60,
35296 -  0x58, 0x14, 0x60, 0x6f, 0x24, 0x04, 0x60, 0x03, 0x02, 0x0e, 0xd4, 0x7e, 0x7b, 0x7f, 0xc0, 0x75,
35297 -  0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0x12}},
35298 - {0x0e46, 64, { 0x12, 0xa6, 0x75, 0x24, 0x01, 0x22, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90,
35299 -  0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x12, 0xa6, 0x75, 0x24, 0x02, 0x22, 0x7e,
35300 -  0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75,
35301 -  0x16, 0x04, 0x12, 0x12, 0xa6, 0x75, 0x24, 0x03, 0x22, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14}},
35302 - {0x0e86, 64, { 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x12, 0xa6, 0x75,
35303 -  0x24, 0x04, 0x22, 0x30, 0x04, 0x33, 0xc2, 0x04, 0x53, 0x13, 0xdf, 0xe4, 0xf5, 0x19, 0x7e, 0x00,
35304 -  0x7b, 0x00, 0x74, 0x2e, 0x25, 0x19, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x11, 0xb0, 0xff, 0x74,
35305 -  0x80, 0x25, 0x19, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x19, 0xe5}},
35306 - {0x0ec6, 64, { 0x19, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0x75, 0x24, 0x05, 0x22, 0xe5, 0x36, 0x60,
35307 -  0x3b, 0xd5, 0x36, 0x0a, 0x53, 0x13, 0xef, 0x30, 0x0a, 0x04, 0xd2, 0x09, 0xc2, 0x0a, 0xe4, 0xf5,
35308 -  0x19, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x35, 0x25, 0x19, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x11,
35309 -  0xb0, 0xff, 0x74, 0x80, 0x25, 0x19, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0}},
35310 - {0x0f06, 64, { 0x05, 0x19, 0xe5, 0x19, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x24, 0x22,
35311 -  0xe4, 0xf5, 0x1a, 0x7e, 0x00, 0x7b, 0x01, 0xe5, 0x15, 0x25, 0x1a, 0xf9, 0xee, 0x35, 0x14, 0xfa,
35312 -  0xe4, 0x12, 0x11, 0xf6, 0x05, 0x1a, 0xe5, 0x1a, 0xb4, 0x3c, 0xe8, 0xe5, 0x15, 0x24, 0x35, 0xf5,
35313 -  0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0}},
35314 - {0x0f46, 64, { 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00,
35315 -  0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x16, 0x4c, 0x7f, 0x10, 0xe5, 0x15, 0x24, 0x33, 0xf5, 0x82,
35316 -  0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0, 0x12, 0x15, 0xbc, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0,
35317 -  0x7f, 0x01, 0xe5, 0x15, 0x24, 0x36, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0}},
35318 - {0x0f86, 64, { 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0xe5, 0x15, 0x24, 0x39, 0xf5,
35319 -  0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x80, 0xf0, 0x90, 0xc0, 0x00, 0xf0, 0x0f, 0xe4, 0xfd,
35320 -  0x12, 0x16, 0x4c, 0xe4, 0xff, 0x7e, 0xa3, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14,
35321 -  0xf5, 0x83, 0xee, 0xf0, 0xfd, 0x12, 0x16, 0x4c, 0x90, 0x78, 0x41, 0x74, 0x01, 0xf0, 0x90}},
35322 - {0x0fc6, 64, { 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x16, 0x4c, 0x7f, 0x01, 0x12, 0x15, 0x54, 0x7f,
35323 -  0x03, 0x7d, 0x07, 0x12, 0x16, 0x4c, 0x22, 0x53, 0x13, 0x3f, 0x90, 0x7b, 0xf1, 0xe0, 0x30, 0xe3,
35324 -  0x16, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef,
35325 -  0xf0, 0x75, 0x16, 0x01, 0x12, 0x08, 0xc1, 0x90, 0x7c, 0x31, 0xe0, 0x30, 0xe3, 0x16, 0x7e}},
35326 - {0x1006, 64, { 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16,
35327 -  0x02, 0x12, 0x08, 0xc1, 0x90, 0x7c, 0x71, 0xe0, 0x30, 0xe3, 0x16, 0x7e, 0x7c, 0x7f, 0x40, 0x75,
35328 -  0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0x12, 0x08,
35329 -  0xc1, 0x90, 0x7c, 0xb1, 0xe0, 0x30, 0xe3, 0x16, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c}},
35330 - {0x1046, 64, { 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x08, 0xc1, 0x05, 0x11,
35331 -  0xe5, 0x11, 0x54, 0x0f, 0xf5, 0x18, 0x70, 0x1f, 0x90, 0x78, 0x41, 0xe0, 0x54, 0xf7, 0xf0, 0x90,
35332 -  0x7f, 0x99, 0xe0, 0xf5, 0x17, 0x90, 0x78, 0x41, 0xe0, 0x44, 0x08, 0xf0, 0x90, 0x7f, 0x99, 0xe0,
35333 -  0xf4, 0xf5, 0x12, 0x12, 0x11, 0x26, 0x22, 0xe5, 0x18, 0xb4, 0x01, 0x04, 0x12, 0x0c, 0x78}},
35334 - {0x1086, 64, { 0x22, 0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x08, 0xe5, 0x13, 0x60, 0x04, 0x12, 0x0e, 0x17, 0x22, 0x12,
35335 -  0x0c, 0x78, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x37, 0x02, 0x10, 0xe1, 0x02,
35336 -  0x12, 0x2e, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08,
35337 -  0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33}},
35338 - {0x10c6, 64, { 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4,
35339 -  0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x18, 0x5c, 0xe4, 0x7e, 0x01,
35340 -  0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3,
35341 -  0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3}},
35342 - {0x1106, 64, { 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0,
35343 -  0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0x90,
35344 -  0x7f, 0xd2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x11, 0xaf, 0xc2, 0x09, 0x90, 0x7b, 0x40, 0xe0, 0x14,
35345 -  0x60, 0x26, 0x14, 0x60, 0x3b, 0x14, 0x60, 0x50, 0x24, 0x83, 0x60, 0x64, 0x24, 0x80, 0x70}},
35346 - {0x1146, 64, { 0x63, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0,
35347 -  0x75, 0x16, 0x01, 0x12, 0x00, 0x46, 0x80, 0x4b, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75,
35348 -  0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x00, 0x46, 0x80, 0x33,
35349 -  0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf}},
35350 - {0x1186, 64, { 0xf0, 0x75, 0x16, 0x04, 0x12, 0x00, 0x46, 0x80, 0x1b, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75,
35351 -  0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x00, 0x46, 0x80, 0x03,
35352 -  0x12, 0x17, 0x8f, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83,
35353 -  0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83}},
35354 - {0x11c6, 64, { 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0,
35355 -  0x22, 0x50, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8,
35356 -  0xe2, 0x22, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb,
35357 -  0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01}},
35358 - {0x1206, 64, { 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3,
35359 -  0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68,
35360 -  0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x00, 0xe4,
35361 -  0x33, 0xfe, 0xef, 0x4e, 0xf0, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01}},
35362 - {0x1246, 64, { 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f,
35363 -  0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0x74, 0x0d,
35364 -  0xf0, 0xd2, 0xaf, 0xd2, 0x0b, 0x12, 0x18, 0x20, 0xc2, 0x01, 0xe4, 0xf5, 0x2b, 0xf5, 0x31, 0xc2,
35365 -  0x07, 0xc2, 0x02, 0x75, 0x29, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x26, 0x60, 0x06, 0x75}},
35366 - {0x1286, 64, { 0x32, 0x0f, 0xe0, 0xf5, 0x26, 0x30, 0x02, 0x03, 0x12, 0x0f, 0xde, 0x30, 0x01, 0x07, 0xc2, 0x01, 0x12,
35367 -  0x06, 0x29, 0x80, 0xe2, 0x30, 0x08, 0xdf, 0xc2, 0x08, 0x12, 0x18, 0x41, 0x80, 0xd8, 0x22, 0xe5,
35368 -  0x13, 0x55, 0x16, 0x60, 0x6a, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
35369 -  0xe0, 0x70, 0x5c, 0xe5, 0x16, 0xf4, 0x52, 0x13, 0xe5, 0x15, 0x24, 0x26, 0xff, 0xe4, 0x35}},
35370 - {0x12c6, 64, { 0x14, 0xfe, 0xe4, 0xfd, 0x0f, 0xef, 0xaa, 0x06, 0x70, 0x01, 0x0e, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xe0,
35371 -  0xfc, 0x74, 0x80, 0x2d, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xec, 0xf0, 0x0d, 0xbd, 0x0b,
35372 -  0xe2, 0x90, 0x7f, 0xc3, 0x74, 0x0b, 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14,
35373 -  0xf5, 0x83, 0x74, 0x10, 0xf0, 0xe5, 0x15, 0x24, 0x2e, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5}},
35374 - {0x1306, 64, { 0x83, 0xe4, 0xf0, 0xe5, 0x15, 0x24, 0x2f, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0x22,
35375 -  0xe5, 0x28, 0x45, 0x27, 0x60, 0x57, 0xae, 0x27, 0xaf, 0x28, 0xd3, 0xef, 0x94, 0x40, 0xee, 0x94,
35376 -  0x00, 0x40, 0x04, 0x7e, 0x00, 0x7f, 0x40, 0xc3, 0xe5, 0x28, 0x9f, 0xf5, 0x28, 0xe5, 0x27, 0x9e,
35377 -  0xf5, 0x27, 0xe4, 0xfd, 0xed, 0xc3, 0x9f, 0xe4, 0x9e, 0x50, 0x1f, 0x85, 0x34, 0x82, 0x85}},
35378 - {0x1346, 64, { 0x33, 0x83, 0xe0, 0xfc, 0x74, 0x00, 0x2d, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xec, 0xf0, 0x0d,
35379 -  0x05, 0x34, 0xe5, 0x34, 0x70, 0x02, 0x05, 0x33, 0x80, 0xda, 0x90, 0x7f, 0xa9, 0x74, 0x01, 0xf0,
35380 -  0x90, 0x7f, 0xac, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xef, 0xf0, 0x22, 0x90, 0x7f, 0xac,
35381 -  0xe0, 0x54, 0xfe, 0xf0, 0xe4, 0x90, 0x7f, 0xb5, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0}},
35382 - {0x1386, 64, { 0x90, 0x7f, 0x9c, 0x74, 0xf0, 0xf0, 0x90, 0x7f, 0x96, 0xf0, 0xe4, 0x90, 0x78, 0x4a, 0xf0, 0x90, 0x7f,
35383 -  0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x30, 0x00, 0x07,
35384 -  0xe5, 0x29, 0x54, 0xf0, 0xff, 0x80, 0x02, 0x7f, 0x00, 0xef, 0x44, 0x08, 0x90, 0x78, 0x41, 0xf0,
35385 -  0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0xff, 0xf0}},
35386 - {0x13c6, 64, { 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xf0, 0xf0, 0xe4, 0x90,
35387 -  0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0x54, 0xfd, 0xf0, 0x22, 0x8f, 0x1a, 0x05, 0x2d, 0xe5,
35388 -  0x2d, 0xae, 0x2c, 0x70, 0x02, 0x05, 0x2c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12,
35389 -  0x1a, 0x08, 0x05, 0x2d, 0xe5, 0x2d, 0xac, 0x2c, 0x70, 0x02, 0x05, 0x2c, 0x14, 0xf5, 0x82}},
35390 - {0x1406, 64, { 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x23, 0xe5, 0x23, 0x60, 0x1f, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4,
35391 -  0x35, 0x14, 0xf5, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfe, 0x12, 0x18, 0xe4, 0x8f, 0x1a, 0xee,
35392 -  0x4f, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x80, 0xb5, 0x22, 0x8f, 0x1a, 0xe4, 0xf5, 0x1b, 0x75, 0x1c,
35393 -  0xff, 0x75, 0x1d, 0x19, 0x75, 0x1e, 0x86, 0xab, 0x1c, 0xaa, 0x1d, 0xa9, 0x1e, 0x90, 0x00}},
35394 - {0x1446, 64, { 0x01, 0x12, 0x11, 0xc9, 0xb4, 0x03, 0x1d, 0xaf, 0x1b, 0x05, 0x1b, 0xef, 0xb5, 0x1a, 0x01, 0x22, 0x12,
35395 -  0x11, 0xb0, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1c, 0xff, 0xf5, 0x1d, 0x89,
35396 -  0x1e, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x22, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90,
35397 -  0x78, 0x4f, 0x74, 0xc0, 0xf0, 0xe4, 0x90, 0x78, 0x50, 0xf0, 0xe5, 0x2c, 0x90, 0x78, 0x51}},
35398 - {0x1486, 64, { 0xf0, 0xae, 0x2c, 0xe5, 0x2d, 0x90, 0x78, 0x52, 0xf0, 0x90, 0x78, 0x54, 0xe5, 0x23, 0xf0, 0x90, 0x78,
35399 -  0x57, 0x74, 0x04, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x10, 0xf0, 0xe0, 0x54, 0xf7, 0xf0, 0xe4,
35400 -  0x90, 0x78, 0x55, 0xf0, 0x90, 0x78, 0x55, 0xe0, 0x60, 0xfa, 0x22, 0xe4, 0x90, 0x78, 0x41, 0xf0,
35401 -  0xe5, 0x2c, 0x90, 0x78, 0x4f, 0xf0, 0xae, 0x2c, 0xe5, 0x2d, 0x90, 0x78, 0x50, 0xf0, 0x90}},
35402 - {0x14c6, 64, { 0x78, 0x51, 0x74, 0xc0, 0xf0, 0xe4, 0x90, 0x78, 0x52, 0xf0, 0x90, 0x78, 0x54, 0xe5, 0x23, 0xf0, 0x90,
35403 -  0x78, 0x57, 0x74, 0x04, 0xf0, 0xe4, 0x90, 0x78, 0x55, 0xf0, 0x90, 0x78, 0x55, 0xe0, 0x60, 0xfa,
35404 -  0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0f,
35405 -  0x14, 0x60, 0x13, 0x14, 0x60, 0x17, 0x80, 0x00, 0x90, 0x7f, 0xc7, 0xef, 0xf0, 0x80, 0x13}},
35406 - {0x1506, 64, { 0x90, 0x7f, 0xc9, 0xef, 0xf0, 0x80, 0x0c, 0x90, 0x7f, 0xcb, 0xef, 0xf0, 0x80, 0x05, 0x90, 0x7f, 0xcd,
35407 -  0xef, 0xf0, 0xe5, 0x16, 0x42, 0x2a, 0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14,
35408 -  0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0f, 0x14, 0x60, 0x13, 0x14, 0x60, 0x17, 0x80, 0x00, 0x90, 0x7f,
35409 -  0xb7, 0xef, 0xf0, 0x80, 0x13, 0x90, 0x7f, 0xb9, 0xef, 0xf0, 0x80, 0x0c, 0x90, 0x7f, 0xbb}},
35410 - {0x1546, 64, { 0xef, 0xf0, 0x80, 0x05, 0x90, 0x7f, 0xbd, 0xef, 0xf0, 0xe5, 0x16, 0x42, 0x2a, 0x22, 0xae, 0x07, 0xe4,
35411 -  0xff, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0xfd,
35412 -  0x12, 0x16, 0x4c, 0x90, 0x78, 0x41, 0x74, 0x01, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5,
35413 -  0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x80, 0xfd, 0x12}},
35414 - {0x1586, 64, { 0x16, 0x4c, 0x22, 0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86,
35415 -  0x75, 0x86, 0x00, 0xc0, 0xd0, 0x75, 0xd0, 0x08, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x01,
35416 -  0xf0, 0x12, 0x13, 0x17, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83,
35417 -  0xd0, 0xf0, 0xd0, 0xe0, 0x32, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74}},
35418 - {0x15c6, 64, { 0xbf, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74,
35419 -  0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f,
35420 -  0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
35421 -  0xf0, 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41}},
35422 - {0x1606, 64, { 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f,
35423 -  0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
35424 -  0xf0, 0x90, 0x78, 0x41, 0x74, 0x06, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74,
35425 -  0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54}},
35426 - {0x1646, 64, { 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5,
35427 -  0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41,
35428 -  0x74, 0x07, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x05, 0xf0, 0x90, 0xc0,
35429 -  0x00, 0xed, 0xf0, 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf}},
35430 - {0x1686, 64, { 0xf0, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0,
35431 -  0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0,
35432 -  0x00, 0xf0, 0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14,
35433 -  0x60, 0x0e, 0x14, 0x60, 0x11, 0x14, 0x60, 0x14, 0x80, 0x00, 0x90, 0x7f, 0xc6, 0xe0, 0xff}},
35434 - {0x16c6, 64, { 0x22, 0x90, 0x7f, 0xc8, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xca, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xcc, 0xe0,
35435 -  0xff, 0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60,
35436 -  0x0e, 0x14, 0x60, 0x11, 0x14, 0x60, 0x14, 0x80, 0x00, 0x90, 0x7f, 0xb6, 0xe0, 0xff, 0x22, 0x90,
35437 -  0x7f, 0xb8, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xba, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xbc, 0xe0}},
35438 - {0x1706, 64, { 0xff, 0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0e,
35439 -  0x14, 0x60, 0x11, 0x14, 0x60, 0x14, 0x80, 0x00, 0x90, 0x7f, 0xc7, 0xe0, 0xff, 0x22, 0x90, 0x7f,
35440 -  0xc9, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xcb, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xcd, 0xe0, 0xff, 0x22,
35441 -  0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00}},
35442 - {0x1746, 64, { 0x30, 0x05, 0x04, 0xc2, 0x05, 0x80, 0x02, 0xd2, 0x08, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08,
35443 -  0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0,
35444 -  0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4,
35445 -  0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84}},
35446 - {0x1786, 64, { 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7b, 0x41, 0xe0, 0xf5, 0x36, 0x43, 0x13,
35447 -  0x10, 0xa3, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0x90, 0x7b,
35448 -  0x43, 0xe0, 0xf5, 0x37, 0xa3, 0xe0, 0x54, 0xf0, 0xf5, 0x29, 0xe0, 0x60, 0x02, 0xd2, 0x0a, 0x22,
35449 -  0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00}},
35450 - {0x17c6, 64, { 0xd2, 0x01, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85,
35451 -  0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x12, 0x18, 0xcc, 0xae, 0x07, 0x12, 0x18, 0xcc, 0xad,
35452 -  0x07, 0xee, 0x6d, 0x60, 0x10, 0x12, 0x18, 0xcc, 0xae, 0x07, 0xee, 0x6d, 0x60, 0x07, 0x12, 0x18,
35453 -  0xcc, 0xad, 0x07, 0x80, 0xec, 0xaf, 0x06, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5}},
35454 - {0x1806, 64, { 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0,
35455 -  0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x04, 0xf0,
35456 -  0xe0, 0x44, 0x08, 0xf0, 0x30, 0x0b, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12,
35457 -  0x18, 0x77, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0x22, 0x12, 0x13, 0x81, 0x12, 0x18}},
35458 - {0x1846, 64, { 0x10, 0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0x0a, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x18, 0x77, 0x12, 0x18,
35459 -  0xaa, 0x12, 0x0a, 0xbd, 0x22, 0x03, 0x35, 0x80, 0x00, 0x00, 0x03, 0x2e, 0x81, 0x00, 0x00, 0xc1,
35460 -  0x85, 0xc1, 0x81, 0xc1, 0x08, 0xc1, 0x00, 0xc1, 0x06, 0x01, 0x22, 0x00, 0x01, 0x24, 0x00, 0x00,
35461 -  0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e}},
35462 - {0x1886, 64, { 0x60, 0x08, 0x12, 0x17, 0xff, 0x12, 0x17, 0xff, 0x80, 0xeb, 0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82,
35463 -  0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x04, 0xff, 0x44, 0x10, 0x90, 0x7f, 0xd7, 0xf0, 0xef, 0x44,
35464 -  0x30, 0xf0, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x0d, 0x7e, 0x00, 0x12, 0x18,
35465 -  0x77, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0}},
35466 - {0x18c6, 64, { 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff,
35467 -  0x22, 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x78, 0x41,
35468 -  0x74, 0x05, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x78, 0x41, 0x74, 0x06, 0xf0, 0x90,
35469 -  0xc0, 0x00, 0xe0, 0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
35470 + {0x0bc6, 64, { 0x75, 0x16, 0x04, 0x12, 0x0f, 0x12, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90,
35471 +  0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35,
35472 +  0x14, 0xf5, 0x83, 0x74, 0x02, 0xf0, 0x7e, 0x7d, 0x7f, 0x40, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83,
35473 +  0x74, 0x7d, 0xf0, 0xa3, 0x74, 0x40, 0xf0, 0x7e, 0x7d, 0x7f, 0x80, 0x85, 0x15, 0x82, 0x85}},
35474 + {0x0c06, 64, { 0x14, 0x83, 0xa3, 0xa3, 0x74, 0x7d, 0xf0, 0xa3, 0x74, 0x80, 0xf0, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14,
35475 +  0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x0f, 0x12,
35476 +  0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0,
35477 +  0x75, 0x16, 0x08, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74}},
35478 + {0x0c46, 64, { 0x03, 0xf0, 0x7e, 0x7c, 0x7f, 0xc0, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0x74, 0x7c, 0xf0, 0xa3, 0x74,
35479 +  0xc0, 0xf0, 0x7e, 0x7d, 0x7f, 0x00, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0x74, 0x7d,
35480 +  0xf0, 0xa3, 0x74, 0x00, 0xf0, 0xc2, 0x0a, 0xc2, 0x09, 0xd2, 0x02, 0x22, 0xe5, 0x10, 0x04, 0x54,
35481 +  0x03, 0xf5, 0x10, 0x14, 0x60, 0x1f, 0x14, 0x60, 0x31, 0x14, 0x60, 0x43, 0x24, 0x03, 0x70}},
35482 + {0x0c86, 64, { 0x52, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0,
35483 +  0x75, 0x16, 0x01, 0x80, 0x3d, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90,
35484 +  0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x80, 0x28, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14,
35485 +  0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0x80, 0x13}},
35486 + {0x0cc6, 64, { 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75,
35487 +  0x16, 0x08, 0xe5, 0x32, 0x55, 0x16, 0x70, 0x03, 0x02, 0x0e, 0x11, 0xe5, 0x16, 0xf4, 0xff, 0x52,
35488 +  0x32, 0xe5, 0x26, 0x54, 0x7f, 0xfe, 0x70, 0x0f, 0xe5, 0x2a, 0x55, 0x16, 0x60, 0x24, 0x90, 0x7f,
35489 +  0x98, 0xe0, 0x45, 0x16, 0xf0, 0x80, 0x1b, 0xbe, 0x20, 0x18, 0xe5, 0x15, 0x24, 0x31, 0xf5}},
35490 + {0x0d06, 64, { 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe3, 0x09, 0xe4, 0xf5, 0x2a, 0x90, 0x7f, 0x98, 0xe0,
35491 +  0x5f, 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x03,
35492 +  0xe0, 0x14, 0xf0, 0xe5, 0x15, 0x24, 0x34, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60,
35493 +  0x03, 0xe0, 0x14, 0xf0, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0x11, 0x74, 0x0a, 0xf0, 0x12, 0x00}},
35494 + {0x0d46, 64, { 0x36, 0xef, 0x54, 0x01, 0xff, 0xf5, 0x19, 0xe5, 0x15, 0x24, 0x2c, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
35495 +  0x83, 0xe0, 0x6f, 0x60, 0x07, 0xe5, 0x19, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0x12, 0x18, 0xe4, 0x8f,
35496 +  0x19, 0xe5, 0x15, 0x24, 0x27, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x19,
35497 +  0x54, 0x10, 0xfe, 0x6f, 0x60, 0x06, 0xee, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24}},
35498 + {0x0d86, 64, { 0x28, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x19, 0x54, 0x80, 0xfe, 0x6f, 0x60,
35499 +  0x06, 0xee, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x29, 0xf5, 0x82, 0xe4, 0x35, 0x14,
35500 +  0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x19, 0x54, 0x20, 0xfe, 0x6f, 0x60, 0x15, 0xee, 0xf0, 0xe5, 0x15,
35501 +  0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe4, 0x04, 0xe5, 0x16}},
35502 + {0x0dc6, 64, { 0x42, 0x13, 0xe5, 0x12, 0x55, 0x16, 0xff, 0xf5, 0x19, 0xe5, 0x15, 0x24, 0x2a, 0xf5, 0x82, 0xe4, 0x35,
35503 +  0x14, 0xf5, 0x83, 0xe0, 0x6f, 0x60, 0x16, 0xe5, 0x19, 0xf0, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82,
35504 +  0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe5, 0x04, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x17, 0x55,
35505 +  0x16, 0xff, 0xf5, 0x19, 0xe5, 0x15, 0x24, 0x30, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83}},
35506 + {0x0e06, 64, { 0xe0, 0x6f, 0x60, 0x07, 0xe5, 0x19, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0x22, 0x30, 0x09, 0x03, 0x02, 0x0f,
35507 +  0x11, 0xe5, 0x24, 0x14, 0x60, 0x2a, 0x14, 0x60, 0x41, 0x14, 0x60, 0x58, 0x14, 0x60, 0x6f, 0x24,
35508 +  0x04, 0x60, 0x03, 0x02, 0x0e, 0xcf, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0,
35509 +  0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0x12, 0x12, 0xa1, 0x75, 0x24, 0x01}},
35510 + {0x0e46, 64, { 0x22, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0,
35511 +  0x75, 0x16, 0x02, 0x12, 0x12, 0xa1, 0x75, 0x24, 0x02, 0x22, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14,
35512 +  0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0x12, 0x12, 0xa1,
35513 +  0x75, 0x24, 0x03, 0x22, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90}},
35514 + {0x0e86, 64, { 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x12, 0xa1, 0x75, 0x24, 0x04, 0x22, 0x30, 0x04,
35515 +  0x33, 0xc2, 0x04, 0x53, 0x13, 0xdf, 0xe4, 0xf5, 0x19, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2e, 0x25,
35516 +  0x19, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x11, 0xab, 0xff, 0x74, 0x80, 0x25, 0x19, 0xf5, 0x82,
35517 +  0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x19, 0xe5, 0x19, 0xb4, 0x03, 0xdb, 0x90}},
35518 + {0x0ec6, 64, { 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0x75, 0x24, 0x05, 0x22, 0xe5, 0x36, 0x60, 0x3b, 0xd5, 0x36, 0x0a, 0x53,
35519 +  0x13, 0xef, 0x30, 0x0a, 0x04, 0xd2, 0x09, 0xc2, 0x0a, 0xe4, 0xf5, 0x19, 0x7e, 0x00, 0x7b, 0x00,
35520 +  0x74, 0x35, 0x25, 0x19, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x11, 0xab, 0xff, 0x74, 0x80, 0x25,
35521 +  0x19, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x19, 0xe5, 0x19, 0xb4}},
35522 + {0x0f06, 64, { 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x24, 0x22, 0xe4, 0xf5, 0x1a, 0x7e, 0x00,
35523 +  0x7b, 0x01, 0xe5, 0x15, 0x25, 0x1a, 0xf9, 0xee, 0x35, 0x14, 0xfa, 0xe4, 0x12, 0x11, 0xf1, 0x05,
35524 +  0x1a, 0xe5, 0x1a, 0xb4, 0x3c, 0xe8, 0xe5, 0x15, 0x24, 0x35, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
35525 +  0x83, 0x74, 0x01, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5}},
35526 + {0x0f46, 64, { 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd,
35527 +  0x12, 0x16, 0x47, 0x7f, 0x10, 0xe5, 0x15, 0x24, 0x33, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
35528 +  0xef, 0xf0, 0x12, 0x15, 0xb7, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0, 0x7f, 0x01, 0xe5, 0x15, 0x24,
35529 +  0x36, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0, 0x44, 0x06, 0x90, 0xc0, 0x00}},
35530 + {0x0f86, 64, { 0xf0, 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
35531 +  0x83, 0x74, 0x80, 0xf0, 0x90, 0xc0, 0x00, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x16, 0x47, 0xe4, 0xff,
35532 +  0x7e, 0xa3, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xee, 0xf0, 0xfd,
35533 +  0x12, 0x16, 0x47, 0x90, 0x78, 0x41, 0x74, 0x01, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f}},
35534 + {0x0fc6, 64, { 0x05, 0x7d, 0x7f, 0x12, 0x16, 0x47, 0x7f, 0x01, 0x12, 0x15, 0x4f, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x16,
35535 +  0x47, 0x22, 0x53, 0x13, 0x3f, 0x90, 0x7b, 0xf1, 0xe0, 0x30, 0xe3, 0x16, 0x7e, 0x7b, 0x7f, 0xc0,
35536 +  0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0x12,
35537 +  0x08, 0xc1, 0x90, 0x7c, 0x31, 0xe0, 0x30, 0xe3, 0x16, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14}},
35538 + {0x1006, 64, { 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x08, 0xc1, 0x90,
35539 +  0x7c, 0x71, 0xe0, 0x30, 0xe3, 0x16, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40,
35540 +  0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0x12, 0x08, 0xc1, 0x90, 0x7c, 0xb1, 0xe0,
35541 +  0x30, 0xe3, 0x16, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f}},
35542 + {0x1046, 64, { 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x08, 0xc1, 0x05, 0x11, 0xe5, 0x11, 0x54, 0x0f, 0xf5,
35543 +  0x18, 0x70, 0x1f, 0x90, 0x78, 0x41, 0xe0, 0x54, 0xf7, 0xf0, 0x90, 0x7f, 0x99, 0xe0, 0xf5, 0x17,
35544 +  0x90, 0x78, 0x41, 0xe0, 0x44, 0x08, 0xf0, 0x90, 0x7f, 0x99, 0xe0, 0xf4, 0xf5, 0x12, 0x12, 0x11,
35545 +  0x21, 0x22, 0xe5, 0x18, 0xb4, 0x01, 0x04, 0x12, 0x0c, 0x73, 0x22, 0x90, 0x7f, 0xc2, 0xe0}},
35546 + {0x1086, 64, { 0x20, 0xe1, 0x08, 0xe5, 0x13, 0x60, 0x04, 0x12, 0x0e, 0x12, 0x22, 0x12, 0x0c, 0x73, 0x22, 0x78, 0x7f,
35547 +  0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x37, 0x02, 0x10, 0xdc, 0x02, 0x12, 0x29, 0xe4, 0x93, 0xa3,
35548 +  0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4,
35549 +  0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20}},
35550 + {0x10c6, 64, { 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04,
35551 +  0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x18, 0x50, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff,
35552 +  0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54,
35553 +  0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8}},
35554 + {0x1106, 64, { 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8,
35555 +  0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0x90, 0x7f, 0xd2, 0xe0, 0x30, 0xe1,
35556 +  0x03, 0x02, 0x11, 0xaa, 0xc2, 0x09, 0x90, 0x7b, 0x40, 0xe0, 0x14, 0x60, 0x26, 0x14, 0x60, 0x3b,
35557 +  0x14, 0x60, 0x50, 0x24, 0x83, 0x60, 0x64, 0x24, 0x80, 0x70, 0x63, 0x7e, 0x7b, 0x7f, 0xc0}},
35558 + {0x1146, 64, { 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0x12, 0x00,
35559 +  0x46, 0x80, 0x4b, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96,
35560 +  0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x00, 0x46, 0x80, 0x33, 0x7e, 0x7c, 0x7f, 0x40, 0x75,
35561 +  0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0x12}},
35562 + {0x1186, 64, { 0x00, 0x46, 0x80, 0x1b, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96,
35563 +  0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x00, 0x46, 0x80, 0x03, 0x12, 0x17, 0x5c, 0xe4, 0x90,
35564 +  0x7f, 0xd3, 0xf0, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7,
35565 +  0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01}},
35566 + {0x11c6, 64, { 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25,
35567 +  0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 0x29,
35568 +  0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a,
35569 +  0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0}},
35570 + {0x1206, 64, { 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01,
35571 +  0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3,
35572 +  0x80, 0xdf, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x00, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0,
35573 +  0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0}},
35574 + {0x1246, 64, { 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef,
35575 +  0x90, 0x7f, 0xaf, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0x74, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0x0b,
35576 +  0x12, 0x18, 0x14, 0xc2, 0x01, 0xe4, 0xf5, 0x2b, 0xf5, 0x31, 0xc2, 0x07, 0xc2, 0x02, 0x75, 0x29,
35577 +  0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x26, 0x60, 0x06, 0x75, 0x32, 0x0f, 0xe0, 0xf5, 0x26}},
35578 + {0x1286, 64, { 0x30, 0x02, 0x03, 0x12, 0x0f, 0xd9, 0x30, 0x01, 0x07, 0xc2, 0x01, 0x12, 0x06, 0x29, 0x80, 0xe2, 0x30,
35579 +  0x08, 0xdf, 0xc2, 0x08, 0x12, 0x18, 0x35, 0x80, 0xd8, 0x22, 0xe5, 0x13, 0x55, 0x16, 0x60, 0x6a,
35580 +  0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x5c, 0xe5, 0x16,
35581 +  0xf4, 0x52, 0x13, 0xe5, 0x15, 0x24, 0x26, 0xff, 0xe4, 0x35, 0x14, 0xfe, 0xe4, 0xfd, 0x0f}},
35582 + {0x12c6, 64, { 0xef, 0xaa, 0x06, 0x70, 0x01, 0x0e, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xe0, 0xfc, 0x74, 0x80, 0x2d, 0xf5,
35583 +  0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xec, 0xf0, 0x0d, 0xbd, 0x0b, 0xe2, 0x90, 0x7f, 0xc3, 0x74,
35584 +  0x0b, 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x10, 0xf0,
35585 +  0xe5, 0x15, 0x24, 0x2e, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x15}},
35586 + {0x1306, 64, { 0x24, 0x2f, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0x22, 0xe5, 0x28, 0x45, 0x27, 0x60,
35587 +  0x57, 0xae, 0x27, 0xaf, 0x28, 0xd3, 0xef, 0x94, 0x40, 0xee, 0x94, 0x00, 0x40, 0x04, 0x7e, 0x00,
35588 +  0x7f, 0x40, 0xc3, 0xe5, 0x28, 0x9f, 0xf5, 0x28, 0xe5, 0x27, 0x9e, 0xf5, 0x27, 0xe4, 0xfd, 0xed,
35589 +  0xc3, 0x9f, 0xe4, 0x9e, 0x50, 0x1f, 0x85, 0x34, 0x82, 0x85, 0x33, 0x83, 0xe0, 0xfc, 0x74}},
35590 + {0x1346, 64, { 0x00, 0x2d, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xec, 0xf0, 0x0d, 0x05, 0x34, 0xe5, 0x34, 0x70,
35591 +  0x02, 0x05, 0x33, 0x80, 0xda, 0x90, 0x7f, 0xa9, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xac, 0xe0, 0x44,
35592 +  0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xef, 0xf0, 0x22, 0x90, 0x7f, 0xac, 0xe0, 0x54, 0xfe, 0xf0, 0xe4,
35593 +  0x90, 0x7f, 0xb5, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xf0}},
35594 + {0x1386, 64, { 0xf0, 0x90, 0x7f, 0x96, 0xf0, 0xe4, 0x90, 0x78, 0x4a, 0xf0, 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d,
35595 +  0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x30, 0x00, 0x07, 0xe5, 0x29, 0x54, 0xf0, 0xff,
35596 +  0x80, 0x02, 0x7f, 0x00, 0xef, 0x44, 0x08, 0x90, 0x78, 0x41, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0,
35597 +  0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0}},
35598 + {0x13c6, 64, { 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xf0, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f,
35599 +  0x92, 0xe0, 0x54, 0xfd, 0xf0, 0x22, 0x8f, 0x1a, 0x05, 0x2d, 0xe5, 0x2d, 0xae, 0x2c, 0x70, 0x02,
35600 +  0x05, 0x2c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x18, 0xf0, 0x05, 0x2d, 0xe5,
35601 +  0x2d, 0xac, 0x2c, 0x70, 0x02, 0x05, 0x2c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15}},
35602 + {0x1406, 64, { 0x23, 0xe5, 0x23, 0x60, 0x1f, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xc0,
35603 +  0x83, 0xc0, 0x82, 0xe0, 0xfe, 0x12, 0x18, 0xd8, 0x8f, 0x1a, 0xee, 0x4f, 0xd0, 0x82, 0xd0, 0x83,
35604 +  0xf0, 0x80, 0xb5, 0x22, 0x8f, 0x1a, 0xe4, 0xf5, 0x1b, 0x75, 0x1c, 0xff, 0x75, 0x1d, 0x19, 0x75,
35605 +  0x1e, 0x86, 0xab, 0x1c, 0xaa, 0x1d, 0xa9, 0x1e, 0x90, 0x00, 0x01, 0x12, 0x11, 0xc4, 0xb4}},
35606 + {0x1446, 64, { 0x03, 0x1d, 0xaf, 0x1b, 0x05, 0x1b, 0xef, 0xb5, 0x1a, 0x01, 0x22, 0x12, 0x11, 0xab, 0x7e, 0x00, 0x29,
35607 +  0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1c, 0xff, 0xf5, 0x1d, 0x89, 0x1e, 0x80, 0xd4, 0x7b, 0x00,
35608 +  0x7a, 0x00, 0x79, 0x00, 0x22, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90, 0x78, 0x4f, 0x74, 0xc0, 0xf0,
35609 +  0xe4, 0x90, 0x78, 0x50, 0xf0, 0xe5, 0x2c, 0x90, 0x78, 0x51, 0xf0, 0xae, 0x2c, 0xe5, 0x2d}},
35610 + {0x1486, 64, { 0x90, 0x78, 0x52, 0xf0, 0x90, 0x78, 0x54, 0xe5, 0x23, 0xf0, 0x90, 0x78, 0x57, 0x74, 0x04, 0xf0, 0x90,
35611 +  0x7f, 0xe2, 0xe0, 0x44, 0x10, 0xf0, 0xe0, 0x54, 0xf7, 0xf0, 0xe4, 0x90, 0x78, 0x55, 0xf0, 0x90,
35612 +  0x78, 0x55, 0xe0, 0x60, 0xfa, 0x22, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0xe5, 0x2c, 0x90, 0x78, 0x4f,
35613 +  0xf0, 0xae, 0x2c, 0xe5, 0x2d, 0x90, 0x78, 0x50, 0xf0, 0x90, 0x78, 0x51, 0x74, 0xc0, 0xf0}},
35614 + {0x14c6, 64, { 0xe4, 0x90, 0x78, 0x52, 0xf0, 0x90, 0x78, 0x54, 0xe5, 0x23, 0xf0, 0x90, 0x78, 0x57, 0x74, 0x04, 0xf0,
35615 +  0xe4, 0x90, 0x78, 0x55, 0xf0, 0x90, 0x78, 0x55, 0xe0, 0x60, 0xfa, 0x22, 0xe5, 0x15, 0x24, 0x04,
35616 +  0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0f, 0x14, 0x60, 0x13, 0x14, 0x60,
35617 +  0x17, 0x80, 0x00, 0x90, 0x7f, 0xc7, 0xef, 0xf0, 0x80, 0x13, 0x90, 0x7f, 0xc9, 0xef, 0xf0}},
35618 + {0x1506, 64, { 0x80, 0x0c, 0x90, 0x7f, 0xcb, 0xef, 0xf0, 0x80, 0x05, 0x90, 0x7f, 0xcd, 0xef, 0xf0, 0xe5, 0x16, 0x42,
35619 +  0x2a, 0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60,
35620 +  0x0f, 0x14, 0x60, 0x13, 0x14, 0x60, 0x17, 0x80, 0x00, 0x90, 0x7f, 0xb7, 0xef, 0xf0, 0x80, 0x13,
35621 +  0x90, 0x7f, 0xb9, 0xef, 0xf0, 0x80, 0x0c, 0x90, 0x7f, 0xbb, 0xef, 0xf0, 0x80, 0x05, 0x90}},
35622 + {0x1546, 64, { 0x7f, 0xbd, 0xef, 0xf0, 0xe5, 0x16, 0x42, 0x2a, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x15, 0x24, 0x32,
35623 +  0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0xfd, 0x12, 0x16, 0x47, 0x90, 0x78,
35624 +  0x41, 0x74, 0x01, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82,
35625 +  0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x80, 0xfd, 0x12, 0x16, 0x47, 0x22, 0xc0, 0xe0}},
35626 + {0x1586, 64, { 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0, 0xd0,
35627 +  0x75, 0xd0, 0x08, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x01, 0xf0, 0x12, 0x13, 0x12, 0xd0,
35628 +  0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0, 0x32,
35629 +  0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x78, 0x41}},
35630 + {0x15c6, 64, { 0x74, 0x02, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24,
35631 +  0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22,
35632 +  0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x78, 0x41, 0x74,
35633 +  0x04, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15}},
35634 + {0x1606, 64, { 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22,
35635 +  0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x78, 0x41, 0x74,
35636 +  0x06, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24,
35637 +  0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0}},
35638 + {0x1646, 64, { 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
35639 +  0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x07, 0xf0, 0x90, 0xc0,
35640 +  0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x05, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x90,
35641 +  0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0xe4, 0x90, 0x78, 0x41}},
35642 + {0x1686, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5,
35643 +  0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0xe5, 0x15,
35644 +  0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0e, 0x14, 0x60, 0x11,
35645 +  0x14, 0x60, 0x14, 0x80, 0x00, 0x90, 0x7f, 0xc6, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xc8, 0xe0}},
35646 + {0x16c6, 64, { 0xff, 0x22, 0x90, 0x7f, 0xca, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xcc, 0xe0, 0xff, 0x22, 0xe5, 0x15, 0x24,
35647 +  0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0e, 0x14, 0x60, 0x11, 0x14,
35648 +  0x60, 0x14, 0x80, 0x00, 0x90, 0x7f, 0xb6, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xb8, 0xe0, 0xff, 0x22,
35649 +  0x90, 0x7f, 0xba, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xbc, 0xe0, 0xff, 0x22, 0xe5, 0x15, 0x24}},
35650 + {0x1706, 64, { 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0e, 0x14, 0x60, 0x11, 0x14, 0x60,
35651 +  0x14, 0x80, 0x00, 0x90, 0x7f, 0xc7, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xc9, 0xe0, 0xff, 0x22, 0x90,
35652 +  0x7f, 0xcb, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xcd, 0xe0, 0xff, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0,
35653 +  0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0}},
35654 + {0x1746, 64, { 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82,
35655 +  0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7b, 0x41, 0xe0, 0xf5, 0x36, 0x43, 0x13, 0x10, 0xa3, 0xe0,
35656 +  0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0x90, 0x7b, 0x43, 0xe0, 0xf5,
35657 +  0x37, 0xa3, 0xe0, 0x54, 0xf0, 0xf5, 0x29, 0xe0, 0x60, 0x02, 0xd2, 0x0a, 0x22, 0xc0, 0xe0}},
35658 + {0x1786, 64, { 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x01, 0x53, 0x91,
35659 +  0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0,
35660 +  0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86,
35661 +  0x75, 0x86, 0x00, 0xd2, 0x08, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0}},
35662 + {0x17c6, 64, { 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x12, 0x18, 0xc0, 0xae, 0x07,
35663 +  0x12, 0x18, 0xc0, 0xad, 0x07, 0xee, 0x6d, 0x60, 0x10, 0x12, 0x18, 0xc0, 0xae, 0x07, 0xee, 0x6d,
35664 +  0x60, 0x07, 0x12, 0x18, 0xc0, 0xad, 0x07, 0x80, 0xec, 0xaf, 0x06, 0x22, 0x74, 0x00, 0xf5, 0x86,
35665 +  0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f}},
35666 + {0x1806, 64, { 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x90, 0x7f, 0xd6,
35667 +  0xe0, 0x44, 0x04, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x0b, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f,
35668 +  0xf4, 0x7e, 0x01, 0x12, 0x18, 0x6b, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0x22, 0x12, 0x13,
35669 +  0x7c, 0x12, 0x18, 0x04, 0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0x0a, 0x7f, 0x05, 0x7e, 0x00}},
35670 + {0x1846, 64, { 0x12, 0x18, 0x6b, 0x12, 0x18, 0x9e, 0x12, 0x0a, 0xb8, 0x22, 0x03, 0x35, 0x80, 0x00, 0x00, 0x03, 0x2e,
35671 +  0x81, 0x00, 0x00, 0xc1, 0x85, 0xc1, 0x81, 0xc1, 0x08, 0xc1, 0x00, 0xc1, 0x06, 0x01, 0x22, 0x00,
35672 +  0x01, 0x24, 0x00, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02,
35673 +  0x15, 0x18, 0x4e, 0x60, 0x08, 0x12, 0x17, 0xf3, 0x12, 0x17, 0xf3, 0x80, 0xeb, 0x22, 0xe5}},
35674 + {0x1886, 64, { 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x04, 0xff, 0x44, 0x10, 0x90, 0x7f,
35675 +  0xd7, 0xf0, 0xef, 0x44, 0x30, 0xf0, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x0d,
35676 +  0x7e, 0x00, 0x12, 0x18, 0x6b, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22, 0x90, 0x78, 0x41,
35677 +  0x74, 0x02, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0}},
35678 + {0x18c6, 64, { 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff,
35679 +  0x22, 0x90, 0x78, 0x41, 0x74, 0x05, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x78, 0x41,
35680 +  0x74, 0x06, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90, 0xc0,
35681 +  0x00, 0xe0, 0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
35682   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x0a, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x04, 0x09, 0x02, 0x74, 0x00, 0x01,
35683    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
35684    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
35685 @@ -438,7 +442,7 @@
35686    0x00, 0x42, 0x00, 0x20, 0x00, 0x34, 0x00, 0x2d, 0x00, 0x70, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x74,
35687    0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x20,
35688    0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00}},
35689 - {0x1a06, 64, { 0x00, 0x00, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x00, 0x00, 0x00, 0x00,
35690 + {0x1a06, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
35691    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
35692    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
35693    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
35694 @@ -453,8 +457,8 @@
35695   {0x1ac6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
35696    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
35697    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
35698 -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x17, 0xb7, 0x00, 0x02, 0x1b}},
35699 - {0x1b06, 21, { 0x04, 0x00, 0x02, 0x17, 0x65, 0x00, 0x02, 0x17, 0x37, 0x00, 0x02, 0x1b, 0x10, 0x00, 0x02, 0x1b, 0x14,
35700 -  0x00, 0x02, 0x15, 0x89}},
35701 -{ 0xffff,      0,      {0x00} }
35702 +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x17, 0x84, 0x00, 0x02, 0x1b}},
35703 + {0x1b06, 21, { 0x04, 0x00, 0x02, 0x17, 0x32, 0x00, 0x02, 0x17, 0xab, 0x00, 0x02, 0x1b, 0x10, 0x00, 0x02, 0x1b, 0x14,
35704 +  0x00, 0x02, 0x15, 0x84}},
35705 + {0xffff, 0, {0x00}}
35706  };
35707 diff -Nur linux-2.4.19.org/drivers/usb/serial/kl5kusb105.c linux-2.4.19/drivers/usb/serial/kl5kusb105.c
35708 --- linux-2.4.19.org/drivers/usb/serial/kl5kusb105.c    Mon Feb 25 20:38:07 2002
35709 +++ linux-2.4.19/drivers/usb/serial/kl5kusb105.c        Thu Oct 31 08:11:25 2002
35710 @@ -47,18 +47,14 @@
35711  
35712  #include <linux/config.h>
35713  #include <linux/kernel.h>
35714 -#include <linux/sched.h>
35715 -#include <linux/signal.h>
35716  #include <linux/errno.h>
35717 -#include <linux/poll.h>
35718  #include <linux/init.h>
35719  #include <linux/slab.h>
35720 -/*#include <linux/fcntl.h>*/
35721  #include <linux/tty.h>
35722  #include <linux/tty_driver.h>
35723  #include <linux/tty_flip.h>
35724  #include <linux/module.h>
35725 -/*#include <linux/spinlock.h>*/
35726 +#include <asm/uaccess.h>
35727  #include <linux/usb.h>
35728  
35729  #ifdef CONFIG_USB_SERIAL_DEBUG
35730 @@ -111,81 +107,41 @@
35731   */
35732  
35733  /*
35734 - * All of the device info needed for the MCT USB-RS232 converter.
35735 + * All of the device info needed for the KLSI converters.
35736   */
35737 -static __devinitdata struct usb_device_id id_table_combined [] = {
35738 +static struct usb_device_id id_table [] = {
35739         { USB_DEVICE(PALMCONNECT_VID, PALMCONNECT_PID) },
35740         { USB_DEVICE(KLSI_VID, KLSI_KL5KUSB105D_PID) },
35741         { }             /* Terminating entry */
35742  };
35743  
35744 -static __devinitdata struct usb_device_id palmconnect_table [] = {
35745 -        { USB_DEVICE(PALMCONNECT_VID, PALMCONNECT_PID) },
35746 -        { }                        /* Terminating entry */
35747 -};
35748 -
35749 -static __devinitdata struct usb_device_id kl5kusb105d_table [] = {
35750 -        { USB_DEVICE(KLSI_VID, KLSI_KL5KUSB105D_PID) },
35751 -        { }                        /* Terminating entry */
35752 -};
35753 -
35754 +MODULE_DEVICE_TABLE (usb, id_table);
35755  
35756 -MODULE_DEVICE_TABLE (usb, id_table_combined);
35757 -
35758 -
35759 -static struct usb_serial_device_type palmconnect_device = {
35760 -       name:                "PalmConnect USB Serial",
35761 -       id_table:            palmconnect_table,
35762 -       needs_interrupt_in:  MUST_HAVE,   /* 1 interrupt-in endpoints */
35763 -       needs_bulk_in:       MUST_HAVE,   /* 1 bulk-in endpoint */
35764 -       needs_bulk_out:      MUST_HAVE,   /* 1 bulk-out endpoint */
35765 -       num_interrupt_in:    1,
35766 -       num_bulk_in:         1,
35767 -       num_bulk_out:        1,
35768 -       num_ports:           1,
35769 -       open:                klsi_105_open,
35770 -       close:               klsi_105_close,
35771 -       write:               klsi_105_write,
35772 -       write_bulk_callback: klsi_105_write_bulk_callback,
35773 -       chars_in_buffer:     klsi_105_chars_in_buffer,
35774 -       write_room:          klsi_105_write_room,
35775 -       read_bulk_callback:  klsi_105_read_bulk_callback,
35776 -       ioctl:               klsi_105_ioctl,
35777 -       set_termios:         klsi_105_set_termios,
35778 -       /*break_ctl:         klsi_105_break_ctl,*/
35779 -       startup:             klsi_105_startup,
35780 -       shutdown:            klsi_105_shutdown,
35781 -       throttle:            klsi_105_throttle,
35782 -       unthrottle:          klsi_105_unthrottle,
35783 -};
35784  
35785  static struct usb_serial_device_type kl5kusb105d_device = {
35786 -       name:                "generic KL5KUSB105D USB->Serial",
35787 -       id_table:            kl5kusb105d_table,
35788 -       needs_interrupt_in:  MUST_HAVE,  /* 1 interrupt-in endpoints */
35789 -       needs_bulk_in:       MUST_HAVE,  /* 1 bulk-in endpoint */
35790 -       needs_bulk_out:      MUST_HAVE,  /* 1 bulk-out endpoint */
35791 -       num_interrupt_in:    1,
35792 -       num_bulk_in:         1,
35793 -       num_bulk_out:        1,
35794 -       num_ports:           1,
35795 -       open:                klsi_105_open,
35796 -       close:               klsi_105_close,
35797 -       write:               klsi_105_write,
35798 -       write_bulk_callback: klsi_105_write_bulk_callback,
35799 -       chars_in_buffer:     klsi_105_chars_in_buffer,
35800 -       write_room:          klsi_105_write_room,
35801 -       read_bulk_callback:  klsi_105_read_bulk_callback,
35802 -       ioctl:               klsi_105_ioctl,
35803 -       set_termios:         klsi_105_set_termios,
35804 -       /*break_ctl:         klsi_105_break_ctl,*/
35805 -       startup:             klsi_105_startup,
35806 -       shutdown:            klsi_105_shutdown,
35807 -       throttle:            klsi_105_throttle,
35808 -       unthrottle:          klsi_105_unthrottle,
35809 +       .owner =             THIS_MODULE,
35810 +       .name =              "KL5KUSB105D / PalmConnect",
35811 +       .id_table =          id_table,
35812 +       .num_interrupt_in =  1,
35813 +       .num_bulk_in =       1,
35814 +       .num_bulk_out =      1,
35815 +       .num_ports =         1,
35816 +       .open =              klsi_105_open,
35817 +       .close =             klsi_105_close,
35818 +       .write =             klsi_105_write,
35819 +       .write_bulk_callback = klsi_105_write_bulk_callback,
35820 +       .chars_in_buffer =   klsi_105_chars_in_buffer,
35821 +       .write_room =        klsi_105_write_room,
35822 +       .read_bulk_callback =klsi_105_read_bulk_callback,
35823 +       .ioctl =             klsi_105_ioctl,
35824 +       .set_termios =       klsi_105_set_termios,
35825 +       /*.break_ctl =       klsi_105_break_ctl,*/
35826 +       .startup =           klsi_105_startup,
35827 +       .shutdown =          klsi_105_shutdown,
35828 +       .throttle =          klsi_105_throttle,
35829 +       .unthrottle =        klsi_105_unthrottle,
35830  };
35831  
35832 -
35833  struct klsi_105_port_settings {
35834         __u8    pktlen;         /* always 5, it seems */
35835         __u8    baudrate;
35836 @@ -231,7 +187,8 @@
35837                              KLSI_TIMEOUT);
35838         if (rc < 0)
35839                 err("Change port settings failed (error = %d)", rc);
35840 -       info(__FUNCTION__ " - %d byte block, baudrate %x, databits %d, u1 %d, u2 %d",
35841 +       info("%s - %d byte block, baudrate %x, databits %d, u1 %d, u2 %d",
35842 +           __FUNCTION__,
35843             settings->pktlen,
35844             settings->baudrate, settings->databits,
35845             settings->unknown1, settings->unknown2);
35846 @@ -262,7 +219,7 @@
35847         __u8 status_buf[KLSI_STATUSBUF_LEN] = { -1,-1};
35848         __u16 status;
35849  
35850 -       info(__FUNCTION__ " - sending SIO Poll request");
35851 +       info("%s - sending SIO Poll request", __FUNCTION__);
35852          rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
35853                              KL5KUSB105A_SIO_POLL,
35854                               USB_TYPE_VENDOR | USB_DIR_IN,
35855 @@ -276,7 +233,7 @@
35856         else {
35857                 status = status_buf[0] + (status_buf[1]<<8);
35858  
35859 -               info(__FUNCTION__ " - read status %x %x",
35860 +               info("%s - read status %x %x", __FUNCTION__,
35861                      status_buf[0], status_buf[1]);
35862  
35863                 *line_state_p = klsi_105_status2linestate(status);
35864 @@ -304,7 +261,7 @@
35865                 serial->port[i].private = kmalloc(sizeof(struct klsi_105_private),
35866                                                    GFP_KERNEL);
35867                 if (!serial->port[i].private) {
35868 -                       dbg(__FUNCTION__ "kmalloc for klsi_105_private failed.");
35869 +                       dbg("%skmalloc for klsi_105_private failed.", __FUNCTION__);
35870                         return (-1); /* error */
35871                 }
35872                 priv = (struct klsi_105_private *)serial->port[i].private;
35873 @@ -334,8 +291,7 @@
35874                         urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE,
35875                                                         GFP_KERNEL);
35876                         if (!urb->transfer_buffer) {
35877 -                               err (__FUNCTION__ 
35878 -                                    " - out of memory for urb buffers.");
35879 +                               err("%s - out of memory for urb buffers.", __FUNCTION__);
35880                                 continue;
35881                         }
35882                 }
35883 @@ -352,16 +308,13 @@
35884  {
35885         int i;
35886         
35887 -       dbg (__FUNCTION__);
35888 +       dbg("%s", __FUNCTION__);
35889  
35890         /* stop reads and writes on all ports */
35891         for (i=0; i < serial->num_ports; ++i) {
35892                 struct klsi_105_private *priv = 
35893                         (struct klsi_105_private*) serial->port[i].private;
35894                 unsigned long flags;
35895 -               while (serial->port[i].open_count > 0) {
35896 -                       klsi_105_close (&serial->port[i], NULL);
35897 -               }
35898  
35899                 if (priv) {
35900                         /* kill our write urb pool */
35901 @@ -397,92 +350,79 @@
35902         struct usb_serial *serial = port->serial;
35903         struct klsi_105_private *priv = (struct klsi_105_private *)port->private;
35904         int retval = 0;
35905 +       int rc;
35906 +       int i;
35907 +       unsigned long line_state;
35908  
35909 -       dbg(__FUNCTION__" port %d", port->number);
35910 +       dbg("%s port %d", __FUNCTION__, port->number);
35911  
35912 -       down (&port->sem);
35913 +       /* force low_latency on so that our tty_push actually forces
35914 +        * the data through
35915 +        * port->tty->low_latency = 1; */
35916 +
35917 +       /* Do a defined restart:
35918 +        * Set up sane default baud rate and send the 'READ_ON'
35919 +        * vendor command. 
35920 +        * FIXME: set modem line control (how?)
35921 +        * Then read the modem line control and store values in
35922 +        * priv->line_state.
35923 +        */
35924 +       priv->cfg.pktlen   = 5;
35925 +       priv->cfg.baudrate = kl5kusb105a_sio_b9600;
35926 +       priv->cfg.databits = kl5kusb105a_dtb_8;
35927 +       priv->cfg.unknown1 = 0;
35928 +       priv->cfg.unknown2 = 1;
35929 +       klsi_105_chg_port_settings(serial, &(priv->cfg));
35930         
35931 -       ++port->open_count;
35932 -       MOD_INC_USE_COUNT;
35933 +       /* set up termios structure */
35934 +       priv->termios.c_iflag = port->tty->termios->c_iflag;
35935 +       priv->termios.c_oflag = port->tty->termios->c_oflag;
35936 +       priv->termios.c_cflag = port->tty->termios->c_cflag;
35937 +       priv->termios.c_lflag = port->tty->termios->c_lflag;
35938 +       for (i=0; i<NCCS; i++)
35939 +               priv->termios.c_cc[i] = port->tty->termios->c_cc[i];
35940  
35941 -       if (!port->active) {
35942 -               int rc;
35943 -               int i;
35944 -               unsigned long line_state;
35945 -               port->active = 1;
35946 -
35947 -               /* force low_latency on so that our tty_push actually forces
35948 -                * the data through
35949 -                * port->tty->low_latency = 1; */
35950 -
35951 -               /* Do a defined restart:
35952 -                * Set up sane default baud rate and send the 'READ_ON'
35953 -                * vendor command. 
35954 -                * FIXME: set modem line control (how?)
35955 -                * Then read the modem line control and store values in
35956 -                * priv->line_state.
35957 -                */
35958 -               priv->cfg.pktlen   = 5;
35959 -               priv->cfg.baudrate = kl5kusb105a_sio_b9600;
35960 -               priv->cfg.databits = kl5kusb105a_dtb_8;
35961 -               priv->cfg.unknown1 = 0;
35962 -               priv->cfg.unknown2 = 1;
35963 -               klsi_105_chg_port_settings(serial, &(priv->cfg));
35964 -               
35965 -               /* set up termios structure */
35966 -               priv->termios.c_iflag = port->tty->termios->c_iflag;
35967 -               priv->termios.c_oflag = port->tty->termios->c_oflag;
35968 -               priv->termios.c_cflag = port->tty->termios->c_cflag;
35969 -               priv->termios.c_lflag = port->tty->termios->c_lflag;
35970 -               for (i=0; i<NCCS; i++)
35971 -                       priv->termios.c_cc[i] = port->tty->termios->c_cc[i];
35972 -
35973 -
35974 -               /* READ_ON and urb submission */
35975 -               FILL_BULK_URB(port->read_urb, serial->dev, 
35976 -                             usb_rcvbulkpipe(serial->dev,
35977 -                                             port->bulk_in_endpointAddress),
35978 -                             port->read_urb->transfer_buffer,
35979 -                             port->read_urb->transfer_buffer_length,
35980 -                             klsi_105_read_bulk_callback,
35981 -                             port);
35982 -               port->read_urb->transfer_flags |= USB_QUEUE_BULK;
35983 -
35984 -               rc = usb_submit_urb(port->read_urb);
35985 -               if (rc) {
35986 -                       err(__FUNCTION__ 
35987 -                           " - failed submitting read urb, error %d", rc);
35988 -                       retval = rc;
35989 -                       goto exit;
35990 -               }
35991  
35992 -               rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev,0),
35993 -                                    KL5KUSB105A_SIO_CONFIGURE,
35994 -                                    USB_TYPE_VENDOR|USB_DIR_OUT|USB_RECIP_INTERFACE,
35995 -                                    KL5KUSB105A_SIO_CONFIGURE_READ_ON,
35996 -                                    0, /* index */
35997 -                                    NULL,
35998 -                                    0,
35999 -                                    KLSI_TIMEOUT);
36000 -               if (rc < 0) {
36001 -                       err("Enabling read failed (error = %d)", rc);
36002 -                       retval = rc;
36003 -               } else 
36004 -                       dbg(__FUNCTION__ " - enabled reading");
36005 +       /* READ_ON and urb submission */
36006 +       FILL_BULK_URB(port->read_urb, serial->dev, 
36007 +                     usb_rcvbulkpipe(serial->dev,
36008 +                                     port->bulk_in_endpointAddress),
36009 +                     port->read_urb->transfer_buffer,
36010 +                     port->read_urb->transfer_buffer_length,
36011 +                     klsi_105_read_bulk_callback,
36012 +                     port);
36013 +       port->read_urb->transfer_flags |= USB_QUEUE_BULK;
36014  
36015 -               rc = klsi_105_get_line_state(serial, &line_state);
36016 -               if (rc >= 0) {
36017 -                       priv->line_state = line_state;
36018 -                       dbg(__FUNCTION__ 
36019 -                           " - read line state 0x%lx", line_state);
36020 -                       retval = 0;
36021 -               } else
36022 -                       retval = rc;
36023 +       rc = usb_submit_urb(port->read_urb);
36024 +       if (rc) {
36025 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, rc);
36026 +               retval = rc;
36027 +               goto exit;
36028         }
36029  
36030 +       rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev,0),
36031 +                            KL5KUSB105A_SIO_CONFIGURE,
36032 +                            USB_TYPE_VENDOR|USB_DIR_OUT|USB_RECIP_INTERFACE,
36033 +                            KL5KUSB105A_SIO_CONFIGURE_READ_ON,
36034 +                            0, /* index */
36035 +                            NULL,
36036 +                            0,
36037 +                            KLSI_TIMEOUT);
36038 +       if (rc < 0) {
36039 +               err("Enabling read failed (error = %d)", rc);
36040 +               retval = rc;
36041 +       } else 
36042 +               dbg("%s - enabled reading", __FUNCTION__);
36043 +
36044 +       rc = klsi_105_get_line_state(serial, &line_state);
36045 +       if (rc >= 0) {
36046 +               priv->line_state = line_state;
36047 +               dbg("%s - read line state 0x%lx", __FUNCTION__, line_state);
36048 +               retval = 0;
36049 +       } else
36050 +               retval = rc;
36051 +
36052  exit:
36053 -       up (&port->sem);
36054 -       
36055         return retval;
36056  } /* klsi_105_open */
36057  
36058 @@ -492,43 +432,35 @@
36059         struct usb_serial *serial;
36060         struct klsi_105_private *priv 
36061                 = (struct klsi_105_private *)port->private;
36062 -       dbg(__FUNCTION__" port %d", port->number);
36063 +       int rc;
36064 +
36065 +       dbg("%s port %d", __FUNCTION__, port->number);
36066  
36067         serial = get_usb_serial (port, __FUNCTION__);
36068  
36069         if(!serial)
36070                 return;
36071  
36072 -       down (&port->sem);
36073 -
36074 -       --port->open_count;
36075 +       /* send READ_OFF */
36076 +       rc = usb_control_msg (serial->dev,
36077 +                             usb_sndctrlpipe(serial->dev, 0),
36078 +                             KL5KUSB105A_SIO_CONFIGURE,
36079 +                             USB_TYPE_VENDOR | USB_DIR_OUT,
36080 +                             KL5KUSB105A_SIO_CONFIGURE_READ_OFF,
36081 +                             0, /* index */
36082 +                             NULL, 0,
36083 +                             KLSI_TIMEOUT);
36084 +       if (rc < 0)
36085 +                   err("Disabling read failed (error = %d)", rc);
36086  
36087 -       if (port->open_count <= 0) {
36088 -               /* send READ_OFF */
36089 -               int rc = usb_control_msg(serial->dev,
36090 -                                        usb_sndctrlpipe(serial->dev, 0),
36091 -                                        KL5KUSB105A_SIO_CONFIGURE,
36092 -                                        USB_TYPE_VENDOR | USB_DIR_OUT,
36093 -                                        KL5KUSB105A_SIO_CONFIGURE_READ_OFF,
36094 -                                        0, /* index */
36095 -                                        NULL, 0,
36096 -                                        KLSI_TIMEOUT);
36097 -               if (rc < 0)
36098 -                           err("Disabling read failed (error = %d)", rc);
36099 -
36100 -               /* shutdown our bulk reads and writes */
36101 -               usb_unlink_urb (port->write_urb);
36102 -               usb_unlink_urb (port->read_urb);
36103 -               /* unlink our write pool */
36104 -               /* FIXME */
36105 -               /* wgg - do I need this? I think so. */
36106 -               usb_unlink_urb (port->interrupt_in_urb);
36107 -               port->active = 0;
36108 -               info("kl5kusb105 port stats: %ld bytes in, %ld bytes out", priv->bytes_in, priv->bytes_out);
36109 -       }
36110 -       
36111 -       up (&port->sem);
36112 -       MOD_DEC_USE_COUNT;
36113 +       /* shutdown our bulk reads and writes */
36114 +       usb_unlink_urb (port->write_urb);
36115 +       usb_unlink_urb (port->read_urb);
36116 +       /* unlink our write pool */
36117 +       /* FIXME */
36118 +       /* wgg - do I need this? I think so. */
36119 +       usb_unlink_urb (port->interrupt_in_urb);
36120 +       info("kl5kusb105 port stats: %ld bytes in, %ld bytes out", priv->bytes_in, priv->bytes_out);
36121  } /* klsi_105_close */
36122  
36123  
36124 @@ -538,6 +470,7 @@
36125   */
36126  #define KLSI_105_DATA_OFFSET   2   /* in the bulk urb data block */
36127  
36128 +
36129  static int klsi_105_write (struct usb_serial_port *port, int from_user,
36130                            const unsigned char *buf, int count)
36131  {
36132 @@ -547,10 +480,7 @@
36133         int result, size;
36134         int bytes_sent=0;
36135  
36136 -       dbg(__FUNCTION__ " - port %d", port->number);
36137 -
36138 -       down (&port->sem);      /* to lock against someone else trying to
36139 -                                  take an URB we just selected from the pool */
36140 +       dbg("%s - port %d", __FUNCTION__, port->number);
36141  
36142         while (count > 0) {
36143                 /* try to find a free urb (write 0 bytes if none) */
36144 @@ -562,21 +492,21 @@
36145                 for (i=0; i<NUM_URBS; i++) {
36146                         if (priv->write_urb_pool[i]->status != -EINPROGRESS) {
36147                                 urb = priv->write_urb_pool[i];
36148 -                               dbg(__FUNCTION__ " - using pool URB %d", i);
36149 +                               dbg("%s - using pool URB %d", __FUNCTION__, i);
36150                                 break;
36151                         }
36152                 }
36153                 spin_unlock_irqrestore (&priv->write_urb_pool_lock, flags);
36154  
36155                 if (urb==NULL) {
36156 -                       dbg (__FUNCTION__ " - no more free urbs");
36157 +                       dbg("%s - no more free urbs", __FUNCTION__);
36158                         goto exit;
36159                 }
36160  
36161                 if (urb->transfer_buffer == NULL) {
36162                         urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
36163                         if (urb->transfer_buffer == NULL) {
36164 -                               err(__FUNCTION__ " - no more kernel memory...");
36165 +                               err("%s - no more kernel memory...", __FUNCTION__);
36166                                 goto exit;
36167                         }
36168                 }
36169 @@ -587,7 +517,6 @@
36170                 if (from_user) {
36171                         if (copy_from_user(urb->transfer_buffer
36172                                            + KLSI_105_DATA_OFFSET, buf, size)) {
36173 -                               up (&port->sem);
36174                                 return -EFAULT;
36175                         }
36176                 } else {
36177 @@ -613,8 +542,7 @@
36178                 /* send the data out the bulk port */
36179                 result = usb_submit_urb(urb);
36180                 if (result) {
36181 -                       err(__FUNCTION__
36182 -                           " - failed submitting write urb, error %d", result);
36183 +                       err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
36184                         goto exit;
36185                 }
36186                 buf += size;
36187 @@ -622,7 +550,6 @@
36188                 count -= size;
36189         }
36190  exit:
36191 -       up (&port->sem);
36192         priv->bytes_out+=bytes_sent;
36193  
36194         return bytes_sent;      /* that's how much we wrote */
36195 @@ -633,15 +560,15 @@
36196         struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
36197         struct usb_serial *serial = port->serial;
36198  
36199 -       dbg(__FUNCTION__ " - port %d", port->number);
36200 +       dbg("%s - port %d", __FUNCTION__, port->number);
36201         
36202         if (!serial) {
36203 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
36204 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
36205                 return;
36206         }
36207  
36208         if (urb->status) {
36209 -               dbg(__FUNCTION__ " - nonzero write bulk status received: %d",
36210 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__,
36211                     urb->status);
36212                 return;
36213         }
36214 @@ -673,7 +600,7 @@
36215  
36216         spin_unlock_irqrestore (&priv->write_urb_pool_lock, flags);
36217  
36218 -       dbg (__FUNCTION__ " - returns %d", chars);
36219 +       dbg("%s - returns %d", __FUNCTION__, chars);
36220         return (chars);
36221  }
36222  
36223 @@ -694,7 +621,7 @@
36224  
36225         spin_unlock_irqrestore (&priv->write_urb_pool_lock, flags);
36226  
36227 -       dbg(__FUNCTION__ " - returns %d", room);
36228 +       dbg("%s - returns %d", __FUNCTION__, room);
36229         return (room);
36230  }
36231  
36232 @@ -710,16 +637,16 @@
36233         unsigned char *data = urb->transfer_buffer;
36234         int rc;
36235  
36236 -        dbg(__FUNCTION__ " - port %d", port->number);
36237 +        dbg("%s - port %d", __FUNCTION__, port->number);
36238  
36239         /* The urb might have been killed. */
36240          if (urb->status) {
36241 -                dbg(__FUNCTION__ " - nonzero read bulk status received: %d",
36242 +                dbg("%s - nonzero read bulk status received: %d", __FUNCTION__,
36243                     urb->status);
36244                  return;
36245          }
36246         if (!serial) {
36247 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
36248 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
36249                 return;
36250         }
36251         
36252 @@ -728,10 +655,10 @@
36253          */
36254         if (urb->actual_length == 0) {
36255                 /* empty urbs seem to happen, we ignore them */
36256 -               /* dbg(__FUNCTION__ " - emtpy URB"); */
36257 +               /* dbg("%s - emtpy URB", __FUNCTION__); */
36258                ;
36259         } else if (urb->actual_length <= 2) {
36260 -               dbg(__FUNCTION__ " - size %d URB not understood",
36261 +               dbg("%s - size %d URB not understood", __FUNCTION__,
36262                     urb->actual_length);
36263                 usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
36264         } else {
36265 @@ -749,9 +676,8 @@
36266                                        urb->actual_length, data);
36267  
36268                 if (bytes_sent + 2 > urb->actual_length) {
36269 -                       dbg(__FUNCTION__ 
36270 -                           " - trying to read more data than available"
36271 -                           " (%d vs. %d)",
36272 +                       dbg("%s - trying to read more data than available"
36273 +                           " (%d vs. %d)", __FUNCTION__,
36274                             bytes_sent+2, urb->actual_length);
36275                         /* cap at implied limit */
36276                         bytes_sent = urb->actual_length - 2;
36277 @@ -780,8 +706,7 @@
36278                       port);
36279         rc = usb_submit_urb(port->read_urb);
36280         if (rc)
36281 -               err(__FUNCTION__ 
36282 -                   " - failed resubmitting read urb, error %d", rc);
36283 +               err("%s - failed resubmitting read urb, error %d", __FUNCTION__, rc);
36284  } /* klsi_105_read_bulk_callback */
36285  
36286  
36287 @@ -801,7 +726,7 @@
36288         if( (cflag & CBAUD) != (old_cflag & CBAUD) ) {
36289                 /* reassert DTR and (maybe) RTS on transition from B0 */
36290                 if( (old_cflag & CBAUD) == B0 ) {
36291 -                       dbg(__FUNCTION__ ": baud was B0");
36292 +                       dbg("%s: baud was B0", __FUNCTION__);
36293  #if 0
36294                         priv->control_state |= TIOCM_DTR;
36295                         /* don't set RTS if using hardware flow control */
36296 @@ -839,7 +764,7 @@
36297                         break;
36298                 }
36299                 if ((cflag & CBAUD) == B0 ) {
36300 -                       dbg(__FUNCTION__ ": baud is B0");
36301 +                       dbg("%s: baud is B0", __FUNCTION__);
36302                         /* Drop RTS and DTR */
36303                         /* maybe this should be simulated by sending read
36304                          * disable and read enable messages?
36305 @@ -856,10 +781,10 @@
36306                 /* set the number of data bits */
36307                 switch (cflag & CSIZE) {
36308                 case CS5:
36309 -                       dbg(__FUNCTION__ " - 5 bits/byte not supported");
36310 +                       dbg("%s - 5 bits/byte not supported", __FUNCTION__);
36311                         return ;
36312                 case CS6:
36313 -                       dbg(__FUNCTION__ " - 6 bits/byte not supported");
36314 +                       dbg("%s - 6 bits/byte not supported", __FUNCTION__);
36315                         return ;
36316                 case CS7:
36317                         priv->cfg.databits = kl5kusb105a_dtb_7;
36318 @@ -930,7 +855,7 @@
36319         struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
36320         unsigned char lcr = priv->last_lcr;
36321  
36322 -       dbg (__FUNCTION__ "state=%d", break_state);
36323 +       dbg("%sstate=%d", __FUNCTION__, break_state);
36324  
36325         if (break_state)
36326                 lcr |= MCT_U232_SET_BREAK;
36327 @@ -946,14 +871,14 @@
36328         struct klsi_105_private *priv = (struct klsi_105_private *)port->private;
36329         int mask;
36330         
36331 -       dbg (__FUNCTION__ "cmd=0x%x", cmd);
36332 +       dbg("%scmd=0x%x", __FUNCTION__, cmd);
36333  
36334         /* Based on code from acm.c and others */
36335         switch (cmd) {
36336         case TIOCMGET: {
36337                 int rc;
36338                 unsigned long line_state;
36339 -               dbg (__FUNCTION__ " - TIOCMGET request, just guessing");
36340 +               dbg("%s - TIOCMGET request, just guessing", __FUNCTION__);
36341  
36342                 rc = klsi_105_get_line_state(serial, &line_state);
36343                 if (rc < 0) {
36344 @@ -962,7 +887,7 @@
36345                         return -ENOIOCTLCMD;
36346                 } else {
36347                         priv->line_state = line_state;
36348 -                       dbg(__FUNCTION__ " - read line state 0x%lx", line_state);
36349 +                       dbg("%s - read line state 0x%lx", __FUNCTION__, line_state);
36350                 }
36351                 return put_user(priv->line_state, (unsigned long *) arg); 
36352                };
36353 @@ -977,10 +902,10 @@
36354                         /* RTS needs set */
36355                         if( ((cmd == TIOCMSET) && (mask & TIOCM_RTS)) ||
36356                             (cmd == TIOCMBIS) )
36357 -                               dbg (__FUNCTION__ " - set RTS not handled");
36358 +                               dbg("%s - set RTS not handled", __FUNCTION__);
36359                                 /* priv->control_state |=  TIOCM_RTS; */
36360                         else
36361 -                               dbg (__FUNCTION__ " - clear RTS not handled");
36362 +                               dbg("%s - clear RTS not handled", __FUNCTION__);
36363                                 /* priv->control_state &= ~TIOCM_RTS; */
36364                 }
36365  
36366 @@ -988,10 +913,10 @@
36367                         /* DTR needs set */
36368                         if( ((cmd == TIOCMSET) && (mask & TIOCM_DTR)) ||
36369                             (cmd == TIOCMBIS) )
36370 -                               dbg (__FUNCTION__ " - set DTR not handled");
36371 +                               dbg("%s - set DTR not handled", __FUNCTION__);
36372                         /*      priv->control_state |=  TIOCM_DTR; */
36373                         else
36374 -                               dbg (__FUNCTION__ " - clear DTR not handled");
36375 +                               dbg("%s - clear DTR not handled", __FUNCTION__);
36376                                 /* priv->control_state &= ~TIOCM_DTR; */
36377                 }
36378                 /*
36379 @@ -1002,19 +927,19 @@
36380         case TIOCMIWAIT:
36381                 /* wait for any of the 4 modem inputs (DCD,RI,DSR,CTS)*/
36382                 /* TODO */
36383 -               dbg (__FUNCTION__ " - TIOCMIWAIT not handled");
36384 +               dbg("%s - TIOCMIWAIT not handled", __FUNCTION__);
36385                 return -ENOIOCTLCMD;
36386  
36387         case TIOCGICOUNT:
36388                 /* return count of modemline transitions */
36389                 /* TODO */
36390 -               dbg (__FUNCTION__ " - TIOCGICOUNT not handled");
36391 +               dbg("%s - TIOCGICOUNT not handled", __FUNCTION__);
36392                 return -ENOIOCTLCMD;
36393         case TCGETS: {
36394              /* return current info to caller */
36395              int retval;
36396  
36397 -            dbg (__FUNCTION__ " - TCGETS data faked/incomplete");
36398 +            dbg("%s - TCGETS data faked/incomplete", __FUNCTION__);
36399  
36400              retval = verify_area(VERIFY_WRITE, (void *)arg,
36401                                   sizeof(struct termios));
36402 @@ -1030,7 +955,7 @@
36403                 /* set port termios to the one given by the user */
36404                 int retval;
36405  
36406 -               dbg (__FUNCTION__ " - TCSETS not handled");
36407 +               dbg("%s - TCSETS not handled", __FUNCTION__);
36408  
36409                 retval = verify_area(VERIFY_READ, (void *)arg,
36410                                      sizeof(struct termios));
36411 @@ -1056,7 +981,7 @@
36412                 return -ENOIOCTLCMD;
36413                       }
36414         default:
36415 -               dbg(__FUNCTION__ ": arg not supported - 0x%04x",cmd);
36416 +               dbg("%s: arg not supported - 0x%04x", __FUNCTION__,cmd);
36417                 return(-ENOIOCTLCMD);
36418                 break;
36419         }
36420 @@ -1065,41 +990,27 @@
36421  
36422  static void klsi_105_throttle (struct usb_serial_port *port)
36423  {
36424 -
36425 -       dbg(__FUNCTION__ " - port %d", port->number);
36426 -
36427 -       down (&port->sem);
36428 -
36429 +       dbg("%s - port %d", __FUNCTION__, port->number);
36430         usb_unlink_urb (port->read_urb);
36431 -
36432 -       up (&port->sem);
36433 -
36434 -       return;
36435  }
36436 +
36437  static void klsi_105_unthrottle (struct usb_serial_port *port)
36438  {
36439         int result;
36440  
36441 -       dbg(__FUNCTION__ " - port %d", port->number);
36442 -
36443 -       down (&port->sem);
36444 +       dbg("%s - port %d", __FUNCTION__, port->number);
36445  
36446         port->read_urb->dev = port->serial->dev;
36447         result = usb_submit_urb(port->read_urb);
36448         if (result)
36449 -               err(__FUNCTION__ " - failed submitting read urb, error %d",
36450 +               err("%s - failed submitting read urb, error %d", __FUNCTION__,
36451                     result);
36452 -
36453 -       up (&port->sem);
36454 -
36455 -       return;
36456  }
36457  
36458  
36459  
36460  static int __init klsi_105_init (void)
36461  {
36462 -       usb_serial_register (&palmconnect_device);
36463         usb_serial_register (&kl5kusb105d_device);
36464  
36465         info(DRIVER_DESC " " DRIVER_VERSION);
36466 @@ -1109,7 +1020,6 @@
36467  
36468  static void __exit klsi_105_exit (void)
36469  {
36470 -       usb_serial_deregister (&palmconnect_device);
36471         usb_serial_deregister (&kl5kusb105d_device);
36472  }
36473  
36474 diff -Nur linux-2.4.19.org/drivers/usb/serial/kl5kusb105.h linux-2.4.19/drivers/usb/serial/kl5kusb105.h
36475 --- linux-2.4.19.org/drivers/usb/serial/kl5kusb105.h    Mon Feb 25 20:38:07 2002
36476 +++ linux-2.4.19/drivers/usb/serial/kl5kusb105.h        Thu Oct 31 08:11:25 2002
36477 @@ -16,7 +16,7 @@
36478  
36479  /* baud rates */
36480  
36481 -typedef enum {
36482 +enum {
36483    kl5kusb105a_sio_b115200 = 0,
36484    kl5kusb105a_sio_b57600  = 1,
36485    kl5kusb105a_sio_b38400  = 2,
36486 @@ -27,7 +27,7 @@
36487    kl5kusb105a_sio_b2400   = 9,   /* unchecked */
36488    kl5kusb105a_sio_b1200   = 0xa,  /* unchecked */
36489    kl5kusb105a_sio_b600    = 0xb   /* unchecked */
36490 -} KL5KUSB105A_SIO_baudrate_t;
36491 +};
36492  
36493  /* data bits */
36494  #define kl5kusb105a_dtb_7   7
36495 diff -Nur linux-2.4.19.org/drivers/usb/serial/mct_u232.c linux-2.4.19/drivers/usb/serial/mct_u232.c
36496 --- linux-2.4.19.org/drivers/usb/serial/mct_u232.c      Fri Dec 21 18:41:55 2001
36497 +++ linux-2.4.19/drivers/usb/serial/mct_u232.c  Thu Oct 31 08:11:25 2002
36498 @@ -61,18 +61,15 @@
36499  
36500  #include <linux/config.h>
36501  #include <linux/kernel.h>
36502 -#include <linux/sched.h>
36503 -#include <linux/signal.h>
36504  #include <linux/errno.h>
36505 -#include <linux/poll.h>
36506  #include <linux/init.h>
36507  #include <linux/slab.h>
36508 -#include <linux/fcntl.h>
36509  #include <linux/tty.h>
36510  #include <linux/tty_driver.h>
36511  #include <linux/tty_flip.h>
36512  #include <linux/module.h>
36513  #include <linux/spinlock.h>
36514 +#include <asm/uaccess.h>
36515  #include <linux/usb.h>
36516  
36517  #ifdef CONFIG_USB_SERIAL_DEBUG
36518 @@ -132,7 +129,7 @@
36519  /*
36520   * All of the device info needed for the MCT USB-RS232 converter.
36521   */
36522 -static __devinitdata struct usb_device_id id_table_combined [] = {
36523 +static struct usb_device_id id_table_combined [] = {
36524         { USB_DEVICE(MCT_U232_VID, MCT_U232_PID) },
36525         { USB_DEVICE(MCT_U232_VID, MCT_U232_SITECOM_PID) },
36526         { USB_DEVICE(MCT_U232_VID, MCT_U232_DU_H3SP_PID) },
36527 @@ -140,99 +137,31 @@
36528         { }             /* Terminating entry */
36529  };
36530  
36531 -static __devinitdata struct usb_device_id mct_u232_table [] = {
36532 -        { USB_DEVICE(MCT_U232_VID, MCT_U232_PID) },
36533 -       { USB_DEVICE(MCT_U232_BELKIN_F5U109_VID, MCT_U232_BELKIN_F5U109_PID) },
36534 -        { }                        /* Terminating entry */
36535 -};
36536 -
36537 -static __devinitdata struct usb_device_id mct_u232_sitecom_table [] = {
36538 -        { USB_DEVICE(MCT_U232_VID, MCT_U232_SITECOM_PID) },
36539 -        { }                        /* Terminating entry */
36540 -};
36541 -
36542 -static __devinitdata struct usb_device_id mct_u232_du_h3sp_table [] = {
36543 -        { USB_DEVICE(MCT_U232_VID, MCT_U232_DU_H3SP_PID) },
36544 -        { }                        /* Terminating entry */
36545 -};
36546 -
36547  MODULE_DEVICE_TABLE (usb, id_table_combined);
36548  
36549  
36550  static struct usb_serial_device_type mct_u232_device = {
36551 -       name:                "Magic Control Technology USB-RS232",
36552 -       id_table:            mct_u232_table,
36553 -       needs_interrupt_in:  MUST_HAVE,  /* 2 interrupt-in endpoints */
36554 -       needs_bulk_in:       MUST_HAVE_NOT,   /* no bulk-in endpoint */
36555 -       needs_bulk_out:      MUST_HAVE,       /* 1 bulk-out endpoint */
36556 -       num_interrupt_in:    2,
36557 -       num_bulk_in:         0,
36558 -       num_bulk_out:        1,
36559 -       num_ports:           1,
36560 -       open:                mct_u232_open,
36561 -       close:               mct_u232_close,
36562 +       .owner =             THIS_MODULE,
36563 +       .name =              "Magic Control Technology USB-RS232",
36564 +       .id_table =          id_table_combined,
36565 +       .num_interrupt_in =  2,
36566 +       .num_bulk_in =       0,
36567 +       .num_bulk_out =      1,
36568 +       .num_ports =         1,
36569 +       .open =              mct_u232_open,
36570 +       .close =             mct_u232_close,
36571  #ifdef FIX_WRITE_RETURN_CODE_PROBLEM
36572 -       write:               mct_u232_write,
36573 -       write_bulk_callback: mct_u232_write_bulk_callback,
36574 +       .write =             mct_u232_write,
36575 +       .write_bulk_callback = mct_u232_write_bulk_callback,
36576  #endif
36577 -       read_int_callback:   mct_u232_read_int_callback,
36578 -       ioctl:               mct_u232_ioctl,
36579 -       set_termios:         mct_u232_set_termios,
36580 -       break_ctl:           mct_u232_break_ctl,
36581 -       startup:             mct_u232_startup,
36582 -       shutdown:            mct_u232_shutdown,
36583 +       .read_int_callback = mct_u232_read_int_callback,
36584 +       .ioctl =             mct_u232_ioctl,
36585 +       .set_termios =       mct_u232_set_termios,
36586 +       .break_ctl =         mct_u232_break_ctl,
36587 +       .startup =           mct_u232_startup,
36588 +       .shutdown =          mct_u232_shutdown,
36589  };
36590  
36591 -static struct usb_serial_device_type mct_u232_sitecom_device = {
36592 -       name:                "MCT/Sitecom USB-RS232",
36593 -       id_table:            mct_u232_sitecom_table,
36594 -       needs_interrupt_in:  MUST_HAVE,  /* 2 interrupt-in endpoints */
36595 -       needs_bulk_in:       MUST_HAVE_NOT,   /* no bulk-in endpoint */
36596 -       needs_bulk_out:      MUST_HAVE,       /* 1 bulk-out endpoint */
36597 -       num_interrupt_in:    2,
36598 -       num_bulk_in:         0,
36599 -       num_bulk_out:        1,
36600 -       num_ports:           1,
36601 -       open:                mct_u232_open,
36602 -       close:               mct_u232_close,
36603 -#ifdef FIX_WRITE_RETURN_CODE_PROBLEM
36604 -       write:               mct_u232_write,
36605 -       write_bulk_callback: mct_u232_write_bulk_callback,
36606 -#endif
36607 -       read_int_callback:   mct_u232_read_int_callback,
36608 -       ioctl:               mct_u232_ioctl,
36609 -       set_termios:         mct_u232_set_termios,
36610 -       break_ctl:           mct_u232_break_ctl,
36611 -       startup:             mct_u232_startup,
36612 -       shutdown:            mct_u232_shutdown,
36613 -};
36614 -
36615 -static struct usb_serial_device_type mct_u232_du_h3sp_device = {
36616 -        name:                "MCT/D-Link DU-H3SP USB BAY",
36617 -        id_table:            mct_u232_du_h3sp_table,
36618 -        needs_interrupt_in:  MUST_HAVE,  /* 2 interrupt-in endpoints */
36619 -        needs_bulk_in:       MUST_HAVE_NOT,   /* no bulk-in endpoint */
36620 -        needs_bulk_out:      MUST_HAVE,       /* 1 bulk-out endpoint */
36621 -        num_interrupt_in:    2,
36622 -        num_bulk_in:         0,
36623 -        num_bulk_out:        1,
36624 -        num_ports:           1,
36625 -        open:                mct_u232_open,
36626 -        close:               mct_u232_close,
36627 -#ifdef FIX_WRITE_RETURN_CODE_PROBLEM
36628 -        write:               mct_u232_write,
36629 -        write_bulk_callback: mct_u232_write_bulk_callback,
36630 -#endif
36631 -        read_int_callback:   mct_u232_read_int_callback,
36632 -        ioctl:               mct_u232_ioctl,
36633 -        set_termios:         mct_u232_set_termios,
36634 -        break_ctl:           mct_u232_break_ctl,
36635 -        startup:             mct_u232_startup,
36636 -        shutdown:            mct_u232_shutdown,
36637 -};
36638 -
36639 -
36640 -
36641  
36642  struct mct_u232_private {
36643         unsigned long        control_state; /* Modem Line Setting (TIOCM) */
36644 @@ -388,13 +317,10 @@
36645  {
36646         int i;
36647         
36648 -       dbg (__FUNCTION__);
36649 +       dbg("%s", __FUNCTION__);
36650  
36651         /* stop reads and writes on all ports */
36652         for (i=0; i < serial->num_ports; ++i) {
36653 -               while (serial->port[i].open_count > 0) {
36654 -                       mct_u232_close (&serial->port[i], NULL);
36655 -               }
36656                 /* My special items, the standard routines free my urbs */
36657                 if (serial->port[i].private)
36658                         kfree(serial->port[i].private);
36659 @@ -407,94 +333,72 @@
36660         struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
36661         int retval = 0;
36662  
36663 -       dbg(__FUNCTION__" port %d", port->number);
36664 +       dbg("%s port %d", __FUNCTION__, port->number);
36665  
36666 -       down (&port->sem);
36667 -       
36668 -       ++port->open_count;
36669 -       MOD_INC_USE_COUNT;
36670 +       /* Compensate for a hardware bug: although the Sitecom U232-P25
36671 +        * device reports a maximum output packet size of 32 bytes,
36672 +        * it seems to be able to accept only 16 bytes (and that's what
36673 +        * SniffUSB says too...)
36674 +        */
36675 +       if (serial->dev->descriptor.idProduct == MCT_U232_SITECOM_PID)
36676 +               port->bulk_out_size = 16;
36677  
36678 -       if (!port->active) {
36679 -               port->active = 1;
36680 -
36681 -               /* Compensate for a hardware bug: although the Sitecom U232-P25
36682 -                * device reports a maximum output packet size of 32 bytes,
36683 -                * it seems to be able to accept only 16 bytes (and that's what
36684 -                * SniffUSB says too...)
36685 -                */
36686 -               if (serial->dev->descriptor.idProduct == MCT_U232_SITECOM_PID)
36687 -                       port->bulk_out_size = 16;
36688 -
36689 -               /* Do a defined restart: the normal serial device seems to 
36690 -                * always turn on DTR and RTS here, so do the same. I'm not
36691 -                * sure if this is really necessary. But it should not harm
36692 -                * either.
36693 -                */
36694 -               if (port->tty->termios->c_cflag & CBAUD)
36695 -                       priv->control_state = TIOCM_DTR | TIOCM_RTS;
36696 -               else
36697 -                       priv->control_state = 0;
36698 -               mct_u232_set_modem_ctrl(serial, priv->control_state);
36699 -               
36700 -               priv->last_lcr = (MCT_U232_DATA_BITS_8 | 
36701 -                                 MCT_U232_PARITY_NONE |
36702 -                                 MCT_U232_STOP_BITS_1);
36703 -               mct_u232_set_line_ctrl(serial, priv->last_lcr);
36704 +       /* Do a defined restart: the normal serial device seems to 
36705 +        * always turn on DTR and RTS here, so do the same. I'm not
36706 +        * sure if this is really necessary. But it should not harm
36707 +        * either.
36708 +        */
36709 +       if (port->tty->termios->c_cflag & CBAUD)
36710 +               priv->control_state = TIOCM_DTR | TIOCM_RTS;
36711 +       else
36712 +               priv->control_state = 0;
36713 +       mct_u232_set_modem_ctrl(serial, priv->control_state);
36714 +       
36715 +       priv->last_lcr = (MCT_U232_DATA_BITS_8 | 
36716 +                         MCT_U232_PARITY_NONE |
36717 +                         MCT_U232_STOP_BITS_1);
36718 +       mct_u232_set_line_ctrl(serial, priv->last_lcr);
36719  
36720 -               /* Read modem status and update control state */
36721 -               mct_u232_get_modem_stat(serial, &priv->last_msr);
36722 -               mct_u232_msr_to_state(&priv->control_state, priv->last_msr);
36723 -
36724 -               {
36725 -                       /* Puh, that's dirty */
36726 -                       struct usb_serial_port *rport;  
36727 -                       rport = &serial->port[1];
36728 -                       rport->tty = port->tty;
36729 -                       rport->private = port->private;
36730 -                       port->read_urb = rport->interrupt_in_urb;
36731 -               }
36732 -
36733 -               port->read_urb->dev = port->serial->dev;
36734 -               retval = usb_submit_urb(port->read_urb);
36735 -               if (retval) {
36736 -                       err("usb_submit_urb(read bulk) failed");
36737 -                       goto exit;
36738 -               }
36739 -
36740 -               port->interrupt_in_urb->dev = port->serial->dev;
36741 -               retval = usb_submit_urb(port->interrupt_in_urb);
36742 -               if (retval)
36743 -                       err(" usb_submit_urb(read int) failed");
36744 +       /* Read modem status and update control state */
36745 +       mct_u232_get_modem_stat(serial, &priv->last_msr);
36746 +       mct_u232_msr_to_state(&priv->control_state, priv->last_msr);
36747  
36748 -       }
36749 +       {
36750 +               /* Puh, that's dirty */
36751 +               struct usb_serial_port *rport;  
36752 +               rport = &serial->port[1];
36753 +               rport->tty = port->tty;
36754 +               rport->private = port->private;
36755 +               port->read_urb = rport->interrupt_in_urb;
36756 +       }
36757 +
36758 +       port->read_urb->dev = port->serial->dev;
36759 +       retval = usb_submit_urb(port->read_urb);
36760 +       if (retval) {
36761 +               err("usb_submit_urb(read bulk) failed");
36762 +               goto exit;
36763 +       }
36764 +
36765 +       port->interrupt_in_urb->dev = port->serial->dev;
36766 +       retval = usb_submit_urb(port->interrupt_in_urb);
36767 +       if (retval)
36768 +               err(" usb_submit_urb(read int) failed");
36769  
36770  exit:
36771 -       up (&port->sem);
36772 -       
36773         return 0;
36774  } /* mct_u232_open */
36775  
36776  
36777  static void mct_u232_close (struct usb_serial_port *port, struct file *filp)
36778  {
36779 -       dbg(__FUNCTION__" port %d", port->number);
36780 -
36781 -       down (&port->sem);
36782 +       dbg("%s port %d", __FUNCTION__, port->number);
36783  
36784 -       --port->open_count;
36785 -
36786 -       if (port->open_count <= 0) {
36787 -               if (port->serial->dev) {
36788 -                       /* shutdown our urbs */
36789 -                       usb_unlink_urb (port->write_urb);
36790 -                       usb_unlink_urb (port->read_urb);
36791 -                       usb_unlink_urb (port->interrupt_in_urb);
36792 -               }
36793 -               port->active = 0;
36794 +       if (port->serial->dev) {
36795 +               /* shutdown our urbs */
36796 +               usb_unlink_urb (port->write_urb);
36797 +               usb_unlink_urb (port->read_urb);
36798 +               usb_unlink_urb (port->interrupt_in_urb);
36799         }
36800 -       
36801 -       up (&port->sem);
36802 -       MOD_DEC_USE_COUNT;
36803  } /* mct_u232_close */
36804  
36805  
36806 @@ -507,10 +411,10 @@
36807         struct usb_serial *serial = port->serial;
36808         int result, bytes_sent, size;
36809  
36810 -       dbg(__FUNCTION__ " - port %d", port->number);
36811 +       dbg("%s - port %d", __FUNCTION__, port->number);
36812  
36813         if (count == 0) {
36814 -               dbg(__FUNCTION__ " - write request of 0 bytes");
36815 +               dbg("%s - write request of 0 bytes", __FUNCTION__);
36816                 return (0);
36817         }
36818  
36819 @@ -520,22 +424,18 @@
36820         
36821         /* another write is still pending? */
36822         if (port->write_urb->status == -EINPROGRESS) {
36823 -               dbg (__FUNCTION__ " - already writing");
36824 +               dbg("%s - already writing", __FUNCTION__);
36825                 return (0);
36826         }
36827                 
36828         bytes_sent = 0;
36829         while (count > 0) {
36830 -               
36831 -               down (&port->sem);
36832 -               
36833                 size = (count > port->bulk_out_size) ? port->bulk_out_size : count;
36834                 
36835                 usb_serial_debug_data (__FILE__, __FUNCTION__, size, buf);
36836                 
36837                 if (from_user) {
36838                         if (copy_from_user(port->write_urb->transfer_buffer, buf, size)) {
36839 -                               up (&port->sem);
36840                                 return -EFAULT;
36841                         }
36842                 }
36843 @@ -556,14 +456,10 @@
36844                 /* send the data out the bulk port */
36845                 result = usb_submit_urb(port->write_urb);
36846                 if (result) {
36847 -                       err(__FUNCTION__
36848 -                           " - failed submitting write urb, error %d", result);
36849 -                       up (&port->sem);
36850 +                       err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
36851                         return result;
36852                 }
36853  
36854 -               up (&port->sem);
36855 -
36856                 bytes_sent += size;
36857                 if (write_blocking)
36858                         interruptible_sleep_on(&port->write_wait);
36859 @@ -583,15 +479,15 @@
36860         struct usb_serial *serial = port->serial;
36861                 struct tty_struct *tty = port->tty;
36862  
36863 -       dbg(__FUNCTION__ " - port %d", port->number);
36864 +       dbg("%s - port %d", __FUNCTION__, port->number);
36865         
36866         if (!serial) {
36867 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
36868 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
36869                 return;
36870         }
36871  
36872         if (urb->status) {
36873 -               dbg(__FUNCTION__ " - nonzero write bulk status received: %d",
36874 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__,
36875                     urb->status);
36876                 return;
36877         }
36878 @@ -621,16 +517,16 @@
36879         struct tty_struct *tty;
36880         unsigned char *data = urb->transfer_buffer;
36881  
36882 -        dbg(__FUNCTION__ " - port %d", port->number);
36883 +        dbg("%s - port %d", __FUNCTION__, port->number);
36884  
36885         /* The urb might have been killed. */
36886          if (urb->status) {
36887 -                dbg(__FUNCTION__ " - nonzero read bulk status received: %d",
36888 +                dbg("%s - nonzero read bulk status received: %d", __FUNCTION__,
36889                     urb->status);
36890                  return;
36891          }
36892         if (!serial) {
36893 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
36894 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
36895                 return;
36896         }
36897         
36898 @@ -707,7 +603,7 @@
36899         if( (cflag & CBAUD) != (old_cflag & CBAUD) ) {
36900                 /* reassert DTR and (maybe) RTS on transition from B0 */
36901                 if( (old_cflag & CBAUD) == B0 ) {
36902 -                       dbg(__FUNCTION__ ": baud was B0");
36903 +                       dbg("%s: baud was B0", __FUNCTION__);
36904                         priv->control_state |= TIOCM_DTR;
36905                         /* don't set RTS if using hardware flow control */
36906                         if (!(old_cflag & CRTSCTS)) {
36907 @@ -743,7 +639,7 @@
36908                         mct_u232_set_baud_rate(serial, 9600); break;
36909                 }
36910                 if ((cflag & CBAUD) == B0 ) {
36911 -                       dbg(__FUNCTION__ ": baud is B0");
36912 +                       dbg("%s: baud is B0", __FUNCTION__);
36913                         /* Drop RTS and DTR */
36914                         priv->control_state &= ~(TIOCM_DTR | TIOCM_RTS);
36915                         mct_u232_set_modem_ctrl(serial, priv->control_state);
36916 @@ -814,7 +710,7 @@
36917         struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
36918         unsigned char lcr = priv->last_lcr;
36919  
36920 -       dbg (__FUNCTION__ "state=%d", break_state);
36921 +       dbg("%sstate=%d", __FUNCTION__, break_state);
36922  
36923         if (break_state)
36924                 lcr |= MCT_U232_SET_BREAK;
36925 @@ -830,7 +726,7 @@
36926         struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
36927         int mask;
36928         
36929 -       dbg (__FUNCTION__ "cmd=0x%x", cmd);
36930 +       dbg("%scmd=0x%x", __FUNCTION__, cmd);
36931  
36932         /* Based on code from acm.c and others */
36933         switch (cmd) {
36934 @@ -875,7 +771,7 @@
36935                 return 0;
36936  
36937         default:
36938 -               dbg(__FUNCTION__ ": arg not supported - 0x%04x",cmd);
36939 +               dbg("%s: arg not supported - 0x%04x", __FUNCTION__,cmd);
36940                 return(-ENOIOCTLCMD);
36941                 break;
36942         }
36943 @@ -886,9 +782,7 @@
36944  static int __init mct_u232_init (void)
36945  {
36946         usb_serial_register (&mct_u232_device);
36947 -       usb_serial_register (&mct_u232_sitecom_device);
36948 -       usb_serial_register (&mct_u232_du_h3sp_device);
36949 -       info(DRIVER_VERSION ":" DRIVER_DESC);
36950 +       info(DRIVER_DESC " " DRIVER_VERSION);
36951         return 0;
36952  }
36953  
36954 @@ -896,8 +790,6 @@
36955  static void __exit mct_u232_exit (void)
36956  {
36957         usb_serial_deregister (&mct_u232_device);
36958 -       usb_serial_deregister (&mct_u232_sitecom_device);
36959 -       usb_serial_deregister (&mct_u232_du_h3sp_device);
36960  }
36961  
36962  
36963 diff -Nur linux-2.4.19.org/drivers/usb/serial/omninet.c linux-2.4.19/drivers/usb/serial/omninet.c
36964 --- linux-2.4.19.org/drivers/usb/serial/omninet.c       Fri Dec 21 18:41:55 2001
36965 +++ linux-2.4.19/drivers/usb/serial/omninet.c   Thu Oct 31 08:11:25 2002
36966 @@ -37,18 +37,15 @@
36967  
36968  #include <linux/config.h>
36969  #include <linux/kernel.h>
36970 -#include <linux/sched.h>
36971 -#include <linux/signal.h>
36972  #include <linux/errno.h>
36973 -#include <linux/poll.h>
36974  #include <linux/init.h>
36975  #include <linux/slab.h>
36976 -#include <linux/fcntl.h>
36977  #include <linux/tty.h>
36978  #include <linux/tty_driver.h>
36979  #include <linux/tty_flip.h>
36980  #include <linux/module.h>
36981  #include <linux/spinlock.h>
36982 +#include <asm/uaccess.h>
36983  #include <linux/usb.h>
36984  
36985  #ifdef CONFIG_USB_SERIAL_DEBUG
36986 @@ -79,7 +76,7 @@
36987  static int  omninet_write_room         (struct usb_serial_port *port);
36988  static void omninet_shutdown           (struct usb_serial *serial);
36989  
36990 -static __devinitdata struct usb_device_id id_table [] = {
36991 +static struct usb_device_id id_table [] = {
36992         { USB_DEVICE(ZYXEL_VENDOR_ID, ZYXEL_OMNINET_ID) },
36993         { }                                             /* Terminating entry */
36994  };
36995 @@ -88,22 +85,20 @@
36996  
36997  
36998  static struct usb_serial_device_type zyxel_omninet_device = {
36999 -       name:                   "ZyXEL - omni.net lcd plus usb",
37000 -       id_table:               id_table,
37001 -       needs_interrupt_in:     MUST_HAVE,
37002 -       needs_bulk_in:          MUST_HAVE,
37003 -       needs_bulk_out:         MUST_HAVE,
37004 -       num_interrupt_in:       1,
37005 -       num_bulk_in:            1,
37006 -       num_bulk_out:           2,
37007 -       num_ports:              1,
37008 -       open:                   omninet_open,
37009 -       close:                  omninet_close,
37010 -       write:                  omninet_write,
37011 -       write_room:             omninet_write_room,
37012 -       read_bulk_callback:     omninet_read_bulk_callback,
37013 -       write_bulk_callback:    omninet_write_bulk_callback,
37014 -       shutdown:               omninet_shutdown,
37015 +       .owner =                THIS_MODULE,
37016 +       .name =                 "ZyXEL - omni.net lcd plus usb",
37017 +       .id_table =             id_table,
37018 +       .num_interrupt_in =     1,
37019 +       .num_bulk_in =          1,
37020 +       .num_bulk_out =         2,
37021 +       .num_ports =            1,
37022 +       .open =                 omninet_open,
37023 +       .close =                omninet_close,
37024 +       .write =                omninet_write,
37025 +       .write_room =           omninet_write_room,
37026 +       .read_bulk_callback =   omninet_read_bulk_callback,
37027 +       .write_bulk_callback =  omninet_write_bulk_callback,
37028 +       .shutdown =             omninet_shutdown,
37029  };
37030  
37031  
37032 @@ -153,45 +148,30 @@
37033         if (port_paranoia_check (port, __FUNCTION__))
37034                 return -ENODEV;
37035  
37036 -       dbg(__FUNCTION__ " - port %d", port->number);
37037 +       dbg("%s - port %d", __FUNCTION__, port->number);
37038  
37039         serial = get_usb_serial (port, __FUNCTION__);
37040         if (!serial)
37041                 return -ENODEV;
37042  
37043 -       down (&port->sem);
37044 -
37045 -       MOD_INC_USE_COUNT;
37046 -       ++port->open_count;
37047 -
37048 -       if (!port->active) {
37049 -               port->active = 1;
37050 -
37051 -               od = kmalloc( sizeof(struct omninet_data), GFP_KERNEL );
37052 -               if( !od ) {
37053 -                       err(__FUNCTION__"- kmalloc(%Zd) failed.", sizeof(struct omninet_data));
37054 -                       --port->open_count;
37055 -                       port->active = 0;
37056 -                       up (&port->sem);
37057 -                       MOD_DEC_USE_COUNT;
37058 -                       return -ENOMEM;
37059 -               }
37060 -
37061 -               port->private = od;
37062 -               wport = &serial->port[1];
37063 -               wport->tty = port->tty;
37064 -
37065 -               /* Start reading from the device */
37066 -               FILL_BULK_URB(port->read_urb, serial->dev, 
37067 -                             usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
37068 -                             port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
37069 -                             omninet_read_bulk_callback, port);
37070 -               result = usb_submit_urb(port->read_urb);
37071 -               if (result)
37072 -                       err(__FUNCTION__ " - failed submitting read urb, error %d", result);
37073 +       od = kmalloc( sizeof(struct omninet_data), GFP_KERNEL );
37074 +       if( !od ) {
37075 +               err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct omninet_data));
37076 +               return -ENOMEM;
37077         }
37078  
37079 -       up (&port->sem);
37080 +       port->private = od;
37081 +       wport = &serial->port[1];
37082 +       wport->tty = port->tty;
37083 +
37084 +       /* Start reading from the device */
37085 +       FILL_BULK_URB(port->read_urb, serial->dev, 
37086 +                     usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
37087 +                     port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
37088 +                     omninet_read_bulk_callback, port);
37089 +       result = usb_submit_urb(port->read_urb);
37090 +       if (result)
37091 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
37092  
37093         return result;
37094  }
37095 @@ -205,32 +185,21 @@
37096         if (port_paranoia_check (port, __FUNCTION__))
37097                 return;
37098  
37099 -       dbg(__FUNCTION__ " - port %d", port->number);
37100 +       dbg("%s - port %d", __FUNCTION__, port->number);
37101  
37102         serial = get_usb_serial (port, __FUNCTION__);
37103         if (!serial)
37104                 return;
37105  
37106 -       down (&port->sem);
37107 -
37108 -       --port->open_count;
37109 -
37110 -       if (port->open_count <= 0) {
37111 -               if (serial->dev) {
37112 -                       wport = &serial->port[1];
37113 -                       usb_unlink_urb (wport->write_urb);
37114 -                       usb_unlink_urb (port->read_urb);
37115 -               }
37116 -
37117 -               port->active = 0;
37118 -               port->open_count = 0;
37119 -               od = (struct omninet_data *)port->private;
37120 -               if (od)
37121 -                       kfree(od);
37122 +       if (serial->dev) {
37123 +               wport = &serial->port[1];
37124 +               usb_unlink_urb (wport->write_urb);
37125 +               usb_unlink_urb (port->read_urb);
37126         }
37127  
37128 -       up (&port->sem);
37129 -       MOD_DEC_USE_COUNT;
37130 +       od = (struct omninet_data *)port->private;
37131 +       if (od)
37132 +               kfree(od);
37133  }
37134  
37135  
37136 @@ -252,12 +221,12 @@
37137  //     dbg("omninet_read_bulk_callback");
37138  
37139         if (!serial) {
37140 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
37141 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
37142                 return;
37143         }
37144  
37145         if (urb->status) {
37146 -               dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
37147 +               dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
37148                 return;
37149         }
37150  
37151 @@ -285,7 +254,7 @@
37152                       omninet_read_bulk_callback, port);
37153         result = usb_submit_urb(urb);
37154         if (result)
37155 -               err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
37156 +               err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
37157  
37158         return;
37159  }
37160 @@ -303,11 +272,11 @@
37161  //     dbg("omninet_write port %d", port->number);
37162  
37163         if (count == 0) {
37164 -               dbg(__FUNCTION__" - write request of 0 bytes");
37165 +               dbg("%s - write request of 0 bytes", __FUNCTION__);
37166                 return (0);
37167         }
37168         if (wport->write_urb->status == -EINPROGRESS) {
37169 -               dbg (__FUNCTION__" - already writing");
37170 +               dbg("%s - already writing", __FUNCTION__);
37171                 return (0);
37172         }
37173  
37174 @@ -336,7 +305,7 @@
37175         wport->write_urb->dev = serial->dev;
37176         result = usb_submit_urb(wport->write_urb);
37177         if (result)
37178 -               err(__FUNCTION__ " - failed submitting write urb, error %d", result);
37179 +               err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
37180         else
37181                 result = count;
37182  
37183 @@ -379,7 +348,7 @@
37184         }
37185  
37186         if (urb->status) {
37187 -               dbg(__FUNCTION__" - nonzero write bulk status received: %d", urb->status);
37188 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
37189                 return;
37190         }
37191  
37192 @@ -394,11 +363,7 @@
37193  
37194  static void omninet_shutdown (struct usb_serial *serial)
37195  {
37196 -       dbg (__FUNCTION__);
37197 -
37198 -       while (serial->port[0].open_count > 0) {
37199 -               omninet_close (&serial->port[0], NULL);
37200 -       }
37201 +       dbg ("%s", __FUNCTION__);
37202  }
37203  
37204  
37205 diff -Nur linux-2.4.19.org/drivers/usb/serial/pl2303.c linux-2.4.19/drivers/usb/serial/pl2303.c
37206 --- linux-2.4.19.org/drivers/usb/serial/pl2303.c        Sat Aug  3 02:39:45 2002
37207 +++ linux-2.4.19/drivers/usb/serial/pl2303.c    Thu Oct 31 08:11:25 2002
37208 @@ -1,7 +1,7 @@
37209  /*
37210   * Prolific PL2303 USB to serial adaptor driver
37211   *
37212 - * Copyright (C) 2001 Greg Kroah-Hartman (greg@kroah.com)
37213 + * Copyright (C) 2001-2002 Greg Kroah-Hartman (greg@kroah.com)
37214   *
37215   * Original driver for 2.2.x by anonymous
37216   *
37217 @@ -32,19 +32,16 @@
37218  
37219  #include <linux/config.h>
37220  #include <linux/kernel.h>
37221 -#include <linux/sched.h>
37222 -#include <linux/signal.h>
37223  #include <linux/errno.h>
37224 -#include <linux/poll.h>
37225  #include <linux/init.h>
37226  #include <linux/slab.h>
37227 -#include <linux/fcntl.h>
37228  #include <linux/tty.h>
37229  #include <linux/tty_driver.h>
37230  #include <linux/tty_flip.h>
37231  #include <linux/serial.h>
37232  #include <linux/module.h>
37233  #include <linux/spinlock.h>
37234 +#include <asm/uaccess.h>
37235  #include <linux/usb.h>
37236  
37237  #ifdef CONFIG_USB_SERIAL_DEBUG
37238 @@ -64,11 +61,14 @@
37239  
37240  
37241  
37242 -static __devinitdata struct usb_device_id id_table [] = {
37243 +static struct usb_device_id id_table [] = {
37244         { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID) },
37245         { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ2) },
37246         { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
37247         { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) },
37248 +       { USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID) },
37249 +       { USB_DEVICE(ITEGNO_VENDOR_ID, ITEGNO_PRODUCT_ID) },
37250 +       { USB_DEVICE(MA620_VENDOR_ID, MA620_PRODUCT_ID) },
37251         { }                                     /* Terminating entry */
37252  };
37253  
37254 @@ -116,26 +116,24 @@
37255  
37256  /* All of the device info needed for the PL2303 SIO serial converter */
37257  static struct usb_serial_device_type pl2303_device = {
37258 -       name:                   "PL-2303",
37259 -       id_table:               id_table,
37260 -       needs_interrupt_in:     DONT_CARE,              /* this device must have an interrupt in endpoint */
37261 -       needs_bulk_in:          MUST_HAVE,              /* this device must have a bulk in endpoint */
37262 -       needs_bulk_out:         MUST_HAVE,              /* this device must have a bulk out endpoint */
37263 -       num_interrupt_in:       NUM_DONT_CARE,
37264 -       num_bulk_in:            1,
37265 -       num_bulk_out:           1,
37266 -       num_ports:              1,
37267 -       open:                   pl2303_open,
37268 -       close:                  pl2303_close,
37269 -       write:                  pl2303_write,
37270 -       ioctl:                  pl2303_ioctl,
37271 -       break_ctl:              pl2303_break_ctl,
37272 -       set_termios:            pl2303_set_termios,
37273 -       read_bulk_callback:     pl2303_read_bulk_callback,
37274 -       read_int_callback:      pl2303_read_int_callback,
37275 -       write_bulk_callback:    pl2303_write_bulk_callback,
37276 -       startup:                pl2303_startup,
37277 -       shutdown:               pl2303_shutdown,
37278 +       .owner =                THIS_MODULE,
37279 +       .name =                 "PL-2303",
37280 +       .id_table =             id_table,
37281 +       .num_interrupt_in =     NUM_DONT_CARE,
37282 +       .num_bulk_in =          1,
37283 +       .num_bulk_out =         1,
37284 +       .num_ports =            1,
37285 +       .open =                 pl2303_open,
37286 +       .close =                pl2303_close,
37287 +       .write =                pl2303_write,
37288 +       .ioctl =                pl2303_ioctl,
37289 +       .break_ctl =            pl2303_break_ctl,
37290 +       .set_termios =          pl2303_set_termios,
37291 +       .read_bulk_callback =   pl2303_read_bulk_callback,
37292 +       .read_int_callback =    pl2303_read_int_callback,
37293 +       .write_bulk_callback =  pl2303_write_bulk_callback,
37294 +       .startup =              pl2303_startup,
37295 +       .shutdown =             pl2303_shutdown,
37296  };
37297  
37298  struct pl2303_private { 
37299 @@ -166,7 +164,7 @@
37300         retval = usb_control_msg (dev, usb_sndctrlpipe (dev, 0),
37301                                   SET_CONTROL_REQUEST, SET_CONTROL_REQUEST_TYPE,
37302                                   value, 0, NULL, 0, 100);
37303 -       dbg (__FUNCTION__" - value = %d, retval = %d", value, retval);
37304 +       dbg("%s - value = %d, retval = %d", __FUNCTION__, value, retval);
37305         return retval;
37306  }
37307  
37308 @@ -174,15 +172,10 @@
37309  {
37310         int result;
37311  
37312 -       dbg (__FUNCTION__ " - port %d, %d bytes", port->number, count);
37313 -
37314 -       if (!port->tty) {
37315 -               err (__FUNCTION__ " - no tty???");
37316 -               return 0;
37317 -       }
37318 +       dbg("%s - port %d, %d bytes", __FUNCTION__, port->number, count);
37319  
37320         if (port->write_urb->status == -EINPROGRESS) {
37321 -               dbg (__FUNCTION__ " - already writing");
37322 +               dbg("%s - already writing", __FUNCTION__);
37323                 return 0;
37324         }
37325  
37326 @@ -200,7 +193,7 @@
37327         port->write_urb->dev = port->serial->dev;
37328         result = usb_submit_urb (port->write_urb);
37329         if (result)
37330 -               err(__FUNCTION__ " - failed submitting write urb, error %d", result);
37331 +               err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
37332         else
37333                 result = count;
37334  
37335 @@ -218,15 +211,15 @@
37336         int baud;
37337         int i;
37338  
37339 -       dbg (__FUNCTION__ " -  port %d, initialized = %d", port->number, 
37340 +       dbg("%s -  port %d, initialized = %d", __FUNCTION__, port->number, 
37341              ((struct pl2303_private *) port->private)->termios_initialized);
37342  
37343         if ((!port->tty) || (!port->tty->termios)) {
37344 -               dbg(__FUNCTION__" - no tty structures");
37345 +               dbg("%s - no tty structures", __FUNCTION__);
37346                 return;
37347         }
37348  
37349 -       if (!(((struct pl2303_private *)port->private)->termios_initialized)) {
37350 +       if (!(((struct pl2303_private *) port->private)->termios_initialized)) {
37351                 *(port->tty->termios) = tty_std_termios;
37352                 port->tty->termios->c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
37353                 ((struct pl2303_private *) port->private)->termios_initialized = 1;
37354 @@ -236,14 +229,14 @@
37355         if (old_termios) {
37356                 if ((cflag == old_termios->c_cflag) &&
37357                     (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
37358 -                   dbg(__FUNCTION__ " - nothing to change...");
37359 +                   dbg("%s - nothing to change...", __FUNCTION__);
37360                     return;
37361                 }
37362         }
37363  
37364         buf = kmalloc (7, GFP_KERNEL);
37365         if (!buf) {
37366 -               err(__FUNCTION__ " - out of memory.");
37367 +               err("%s - out of memory.", __FUNCTION__);
37368                 return;
37369         }
37370         memset (buf, 0x00, 0x07);
37371 @@ -269,7 +262,7 @@
37372                         default:
37373                         case CS8:       buf[6] = 8;     break;
37374                 }
37375 -               dbg (__FUNCTION__ " - data bits = %d", buf[6]);
37376 +               dbg("%s - data bits = %d", __FUNCTION__, buf[6]);
37377         }
37378  
37379         baud = 0;
37380 @@ -294,7 +287,7 @@
37381                         err ("pl2303 driver does not support the baudrate requested (fix it)");
37382                         break;
37383         }
37384 -       dbg (__FUNCTION__ " - baud = %d", baud);
37385 +       dbg("%s - baud = %d", __FUNCTION__, baud);
37386         if (baud) {
37387                 buf[0] = baud & 0xff;
37388                 buf[1] = (baud >> 8) & 0xff;
37389 @@ -307,10 +300,10 @@
37390         /* For reference buf[4]=2 is 2 stop bits */
37391         if (cflag & CSTOPB) {
37392                 buf[4] = 2;
37393 -               dbg(__FUNCTION__ " - stop bits = 2");
37394 +               dbg("%s - stop bits = 2", __FUNCTION__);
37395         } else {
37396                 buf[4] = 0;
37397 -               dbg(__FUNCTION__ " - stop bits = 1");
37398 +               dbg("%s - stop bits = 1", __FUNCTION__);
37399         }
37400  
37401         if (cflag & PARENB) {
37402 @@ -321,14 +314,14 @@
37403                 /* For reference buf[5]=4 is space parity */
37404                 if (cflag & PARODD) {
37405                         buf[5] = 1;
37406 -                       dbg(__FUNCTION__ " - parity = odd");
37407 +                       dbg("%s - parity = odd", __FUNCTION__);
37408                 } else {
37409                         buf[5] = 2;
37410 -                       dbg(__FUNCTION__ " - parity = even");
37411 +                       dbg("%s - parity = even", __FUNCTION__);
37412                 }
37413         } else {
37414                 buf[5] = 0;
37415 -               dbg(__FUNCTION__ " - parity = none");
37416 +               dbg("%s - parity = none", __FUNCTION__);
37417         }
37418  
37419         i = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 0),
37420 @@ -355,7 +348,7 @@
37421  
37422         if (cflag & CRTSCTS) {
37423                 i = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 0),
37424 -                                    VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST_TYPE,
37425 +                                    VENDOR_WRITE_REQUEST, VENDOR_WRITE_REQUEST_TYPE,
37426                                      0x0, 0x41, NULL, 0, 100);
37427                 dbg ("0x40:0x1:0x0:0x41  %d", i);
37428         }
37429 @@ -374,64 +367,54 @@
37430         if (port_paranoia_check (port, __FUNCTION__))
37431                 return -ENODEV;
37432                 
37433 -       dbg (__FUNCTION__ " -  port %d", port->number);
37434 +       dbg("%s -  port %d", __FUNCTION__, port->number);
37435  
37436 -       down (&port->sem);
37437 +#define FISH(a,b,c,d)                                                          \
37438 +       result=usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev,0),     \
37439 +                              b, a, c, d, buf, 1, 100);                        \
37440 +       dbg("0x%x:0x%x:0x%x:0x%x  %d - %x",a,b,c,d,result,buf[0]);
37441 +
37442 +#define SOUP(a,b,c,d)                                                          \
37443 +       result=usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev,0),     \
37444 +                              b, a, c, d, NULL, 0, 100);                       \
37445 +       dbg("0x%x:0x%x:0x%x:0x%x  %d",a,b,c,d,result);
37446 +
37447 +       FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
37448 +       SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0x0404, 0);
37449 +       FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
37450 +       FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8383, 0);
37451 +       FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
37452 +       SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0x0404, 1);
37453 +       FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
37454 +       FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8383, 0);
37455 +       SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0, 1);
37456 +       SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 1, 0xc0);
37457 +       SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 2, 4);
37458  
37459 -       ++port->open_count;
37460 -       MOD_INC_USE_COUNT;
37461 -
37462 -       if (!port->active) {
37463 -               port->active = 1;
37464 -
37465 -#define FISH(a,b,c,d)                                                                  \
37466 -               result=usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev,0),     \
37467 -                                      b, a, c, d, buf, 1, 100);                        \
37468 -               dbg("0x%x:0x%x:0x%x:0x%x  %d - %x",a,b,c,d,result,buf[0]);
37469 -
37470 -#define SOUP(a,b,c,d)                                                                  \
37471 -               result=usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev,0),     \
37472 -                                      b, a, c, d, NULL, 0, 100);                       \
37473 -               dbg("0x%x:0x%x:0x%x:0x%x  %d",a,b,c,d,result);
37474 -
37475 -               FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
37476 -               SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0x0404, 0);
37477 -               FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
37478 -               FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8383, 0);
37479 -               FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
37480 -               SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0x0404, 1);
37481 -               FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
37482 -               FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8383, 0);
37483 -               SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0, 1);
37484 -               SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 1, 0xc0);
37485 -               SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 2, 4);
37486 -
37487 -               /* Setup termios */
37488 +       /* Setup termios */
37489 +       if (port->tty) {
37490                 pl2303_set_termios (port, &tmp_termios);
37491 +       }
37492  
37493 -               //FIXME: need to assert RTS and DTR if CRTSCTS off
37494 -
37495 -               dbg (__FUNCTION__ " - submitting read urb");
37496 -               port->read_urb->dev = serial->dev;
37497 -               result = usb_submit_urb (port->read_urb);
37498 -               if (result) {
37499 -                       err(__FUNCTION__ " - failed submitting read urb, error %d", result);
37500 -                       up (&port->sem);
37501 -                       pl2303_close (port, NULL);
37502 -                       return -EPROTO;
37503 -               }
37504 +       //FIXME: need to assert RTS and DTR if CRTSCTS off
37505  
37506 -               dbg (__FUNCTION__ " - submitting interrupt urb");
37507 -               port->interrupt_in_urb->dev = serial->dev;
37508 -               result = usb_submit_urb (port->interrupt_in_urb);
37509 -               if (result) {
37510 -                       err(__FUNCTION__ " - failed submitting interrupt urb, error %d", result);
37511 -                       up (&port->sem);
37512 -                       pl2303_close (port, NULL);
37513 -                       return -EPROTO;
37514 -               }
37515 +       dbg("%s - submitting read urb", __FUNCTION__);
37516 +       port->read_urb->dev = serial->dev;
37517 +       result = usb_submit_urb (port->read_urb);
37518 +       if (result) {
37519 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
37520 +               pl2303_close (port, NULL);
37521 +               return -EPROTO;
37522 +       }
37523 +
37524 +       dbg("%s - submitting interrupt urb", __FUNCTION__);
37525 +       port->interrupt_in_urb->dev = serial->dev;
37526 +       result = usb_submit_urb (port->interrupt_in_urb);
37527 +       if (result) {
37528 +               err("%s - failed submitting interrupt urb, error %d", __FUNCTION__, result);
37529 +               pl2303_close (port, NULL);
37530 +               return -EPROTO;
37531         }
37532 -       up (&port->sem);
37533         return 0;
37534  }
37535  
37536 @@ -449,13 +432,10 @@
37537         if (!serial)
37538                 return;
37539         
37540 -       dbg (__FUNCTION__ " - port %d", port->number);
37541 +       dbg("%s - port %d", __FUNCTION__, port->number);
37542  
37543 -       down (&port->sem);
37544 -
37545 -       --port->open_count;
37546 -       if (port->open_count <= 0) {
37547 -               if (serial->dev) {
37548 +       if (serial->dev) {
37549 +               if (port->tty) {
37550                         c_cflag = port->tty->termios->c_cflag;
37551                         if (c_cflag & HUPCL) {
37552                                 /* drop DTR and RTS */
37553 @@ -464,34 +444,28 @@
37554                                 set_control_lines (port->serial->dev,
37555                                                    priv->line_control);
37556                         }
37557 +               }
37558  
37559 -                       /* shutdown our urbs */
37560 -                       dbg (__FUNCTION__ " - shutting down urbs");
37561 -                       result = usb_unlink_urb (port->write_urb);
37562 -                       if (result)
37563 -                               dbg (__FUNCTION__ " - usb_unlink_urb "
37564 -                                    "(write_urb) failed with reason: %d",
37565 -                                    result);
37566 -
37567 -                       result = usb_unlink_urb (port->read_urb);
37568 -                       if (result)
37569 -                               dbg (__FUNCTION__ " - usb_unlink_urb "
37570 -                                    "(read_urb) failed with reason: %d",
37571 -                                    result);
37572 +               /* shutdown our urbs */
37573 +               dbg("%s - shutting down urbs", __FUNCTION__);
37574 +               result = usb_unlink_urb (port->write_urb);
37575 +               if (result)
37576 +                       dbg("%s - usb_unlink_urb (write_urb)"
37577 +                           " failed with reason: %d", __FUNCTION__,
37578 +                            result);
37579  
37580 -                       result = usb_unlink_urb (port->interrupt_in_urb);
37581 -                       if (result)
37582 -                               dbg (__FUNCTION__ " - usb_unlink_urb "
37583 -                                    "(interrupt_in_urb) failed with reason: %d",
37584 -                                    result);
37585 -               }
37586 +               result = usb_unlink_urb (port->read_urb);
37587 +               if (result)
37588 +                       dbg("%s - usb_unlink_urb (read_urb) "
37589 +                           "failed with reason: %d", __FUNCTION__,
37590 +                            result);
37591  
37592 -               port->active = 0;
37593 -               port->open_count = 0;
37594 +               result = usb_unlink_urb (port->interrupt_in_urb);
37595 +               if (result)
37596 +                       dbg("%s - usb_unlink_urb (interrupt_in_urb)"
37597 +                           " failed with reason: %d", __FUNCTION__,
37598 +                            result);
37599         }
37600 -
37601 -       up (&port->sem);
37602 -       MOD_DEC_USE_COUNT;
37603  }
37604  
37605  static int set_modem_info (struct usb_serial_port *port, unsigned int cmd, unsigned int *value)
37606 @@ -538,7 +512,7 @@
37607         result = ((mcr & CONTROL_DTR)           ? TIOCM_DTR : 0)
37608                   | ((mcr & CONTROL_RTS)        ? TIOCM_RTS : 0);
37609  
37610 -       dbg (__FUNCTION__ " - result = %x", result);
37611 +       dbg("%s - result = %x", __FUNCTION__, result);
37612  
37613         if (copy_to_user(value, &result, sizeof(int)))
37614                 return -EFAULT;
37615 @@ -547,22 +521,22 @@
37616  
37617  static int pl2303_ioctl (struct usb_serial_port *port, struct file *file, unsigned int cmd, unsigned long arg)
37618  {
37619 -       dbg (__FUNCTION__" (%d) cmd = 0x%04x", port->number, cmd);
37620 +       dbg("%s (%d) cmd = 0x%04x", __FUNCTION__, port->number, cmd);
37621  
37622         switch (cmd) {
37623                 
37624                 case TIOCMGET:
37625 -                       dbg (__FUNCTION__" (%d) TIOCMGET", port->number);
37626 +                       dbg("%s (%d) TIOCMGET", __FUNCTION__, port->number);
37627                         return get_modem_info (port, (unsigned int *)arg);
37628  
37629                 case TIOCMBIS:
37630                 case TIOCMBIC:
37631                 case TIOCMSET:
37632 -                       dbg(__FUNCTION__" (%d) TIOCMSET/TIOCMBIC/TIOCMSET",  port->number);
37633 +                       dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __FUNCTION__,  port->number);
37634                         return set_modem_info(port, cmd, (unsigned int *) arg);
37635  
37636                 default:
37637 -                       dbg (__FUNCTION__" not supported = 0x%04x", cmd);
37638 +                       dbg("%s not supported = 0x%04x", __FUNCTION__, cmd);
37639                         break;
37640         }
37641  
37642 @@ -576,19 +550,19 @@
37643         u16 state;
37644         int result;
37645  
37646 -       dbg (__FUNCTION__ " - port %d", port->number);
37647 +       dbg("%s - port %d", __FUNCTION__, port->number);
37648  
37649         if (break_state == 0)
37650                 state = BREAK_OFF;
37651         else
37652                 state = BREAK_ON;
37653 -       dbg (__FUNCTION__" - turning break %s", state==BREAK_OFF ? "off" : "on");
37654 +       dbg("%s - turning break %s", state==BREAK_OFF ? "off" : "on", __FUNCTION__);
37655  
37656         result = usb_control_msg (serial->dev, usb_rcvctrlpipe (serial->dev, 0),
37657                                   BREAK_REQUEST, BREAK_REQUEST_TYPE, state, 
37658                                   0, NULL, 0, 100);
37659         if (result)
37660 -               dbg (__FUNCTION__" - error sending break = %d", result);
37661 +               dbg("%s - error sending break = %d", __FUNCTION__, result);
37662  }
37663  
37664  
37665 @@ -596,14 +570,10 @@
37666  {
37667         int i;
37668  
37669 -       dbg (__FUNCTION__);
37670 +       dbg("%s", __FUNCTION__);
37671  
37672 -       /* stop everything on all ports */
37673         for (i = 0; i < serial->num_ports; ++i)
37674 -               while (serial->port[i].open_count > 0) {
37675 -                       pl2303_close (&serial->port[i], NULL);
37676 -                       kfree (serial->port[i].private);
37677 -               }
37678 +               kfree (serial->port[i].private);
37679  }
37680  
37681  
37682 @@ -646,37 +616,37 @@
37683         if (port_paranoia_check (port, __FUNCTION__))
37684                 return;
37685  
37686 -       dbg(__FUNCTION__ " - port %d", port->number);
37687 +       dbg("%s - port %d", __FUNCTION__, port->number);
37688  
37689         if (!serial) {
37690 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
37691 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
37692                 return;
37693         }
37694  
37695         if (urb->status) {
37696 -               dbg (__FUNCTION__ " - urb->status = %d", urb->status);
37697 -               if (!port->active) {
37698 -                       dbg (__FUNCTION__ " - port is closed, exiting.");
37699 +               dbg("%s - urb->status = %d", __FUNCTION__, urb->status);
37700 +               if (!port->open_count) {
37701 +                       dbg("%s - port is closed, exiting.", __FUNCTION__);
37702                         return;
37703                 }
37704                 if (urb->status == -EPROTO) {
37705                         /* PL2303 mysteriously fails with -EPROTO reschedule the read */
37706 -                       dbg (__FUNCTION__ " - caught -EPROTO, resubmitting the urb");
37707 +                       dbg("%s - caught -EPROTO, resubmitting the urb", __FUNCTION__);
37708                         urb->status = 0;
37709                         urb->dev = serial->dev;
37710                         result = usb_submit_urb(urb);
37711                         if (result)
37712 -                               err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
37713 +                               err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
37714                         return;
37715                 }
37716 -               dbg (__FUNCTION__ " - unable to handle the error, exiting.");
37717 +               dbg("%s - unable to handle the error, exiting.", __FUNCTION__);
37718                 return;
37719         }
37720  
37721         usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
37722  
37723         tty = port->tty;
37724 -       if (urb->actual_length) {
37725 +       if (tty && urb->actual_length) {
37726                 for (i = 0; i < urb->actual_length; ++i) {
37727                         if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
37728                                 tty_flip_buffer_push(tty);
37729 @@ -687,11 +657,11 @@
37730         }
37731  
37732         /* Schedule the next read _if_ we are still open */
37733 -       if (port->active) {
37734 +       if (port->open_count) {
37735                 urb->dev = serial->dev;
37736                 result = usb_submit_urb(urb);
37737                 if (result)
37738 -                       err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
37739 +                       err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
37740         }
37741  
37742         return;
37743 @@ -707,20 +677,20 @@
37744         if (port_paranoia_check (port, __FUNCTION__))
37745                 return;
37746         
37747 -       dbg(__FUNCTION__ " - port %d", port->number);
37748 +       dbg("%s - port %d", __FUNCTION__, port->number);
37749         
37750         if (urb->status) {
37751                 /* error in the urb, so we have to resubmit it */
37752                 if (serial_paranoia_check (port->serial, __FUNCTION__)) {
37753                         return;
37754                 }
37755 -               dbg (__FUNCTION__ " - Overflow in write");
37756 -               dbg (__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
37757 +               dbg("%s - Overflow in write", __FUNCTION__);
37758 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
37759                 port->write_urb->transfer_buffer_length = 1;
37760                 port->write_urb->dev = port->serial->dev;
37761                 result = usb_submit_urb (port->write_urb);
37762                 if (result)
37763 -                       err(__FUNCTION__ " - failed resubmitting write urb, error %d", result);
37764 +                       err("%s - failed resubmitting write urb, error %d", __FUNCTION__, result);
37765  
37766                 return;
37767         }
37768 diff -Nur linux-2.4.19.org/drivers/usb/serial/pl2303.h linux-2.4.19/drivers/usb/serial/pl2303.h
37769 --- linux-2.4.19.org/drivers/usb/serial/pl2303.h        Wed Oct 10 00:15:02 2001
37770 +++ linux-2.4.19/drivers/usb/serial/pl2303.h    Thu Oct 31 08:11:25 2002
37771 @@ -16,3 +16,12 @@
37772  
37773  #define IODATA_VENDOR_ID       0x04bb
37774  #define IODATA_PRODUCT_ID      0x0a03
37775 +
37776 +#define ELCOM_VENDOR_ID                0x056e
37777 +#define ELCOM_PRODUCT_ID       0x5003
37778 +
37779 +#define ITEGNO_VENDOR_ID       0x0eba
37780 +#define ITEGNO_PRODUCT_ID      0x1080
37781 +
37782 +#define MA620_VENDOR_ID                0x0df7
37783 +#define MA620_PRODUCT_ID       0x0620
37784 diff -Nur linux-2.4.19.org/drivers/usb/serial/usb-serial.h linux-2.4.19/drivers/usb/serial/usb-serial.h
37785 --- linux-2.4.19.org/drivers/usb/serial/usb-serial.h    Mon Feb 25 20:38:07 2002
37786 +++ linux-2.4.19/drivers/usb/serial/usb-serial.h        Thu Oct 31 08:11:25 2002
37787 @@ -1,7 +1,7 @@
37788  /*
37789   * USB Serial Converter driver
37790   *
37791 - *     Copyright (C) 1999 - 2001
37792 + *     Copyright (C) 1999 - 2002
37793   *         Greg Kroah-Hartman (greg@kroah.com)
37794   *
37795   *     This program is free software; you can redistribute it and/or modify
37796 @@ -11,6 +11,10 @@
37797   *
37798   * See Documentation/usb/usb-serial.txt for more information on using this driver
37799   *
37800 + * (12/03/2001) gkh
37801 + *     removed active from the port structure.
37802 + *     added documentation to the usb_serial_device_type structure
37803 + *
37804   * (10/10/2001) gkh
37805   *     added vendor and product to serial structure.  Needed to determine device
37806   *     owner when the device is disconnected.
37807 @@ -59,13 +63,41 @@
37808  /* parity check flag */
37809  #define RELEVANT_IFLAG(iflag)  (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
37810  
37811 -
37812 +/**
37813 + * usb_serial_port: structure for the specific ports of a device.
37814 + * @magic: magic number for internal validity of this pointer.
37815 + * @serial: pointer back to the struct usb_serial owner of this port.
37816 + * @tty: pointer to the coresponding tty for this port.
37817 + * @number: the number of the port (the minor number).
37818 + * @interrupt_in_buffer: pointer to the interrupt in buffer for this port.
37819 + * @interrupt_in_urb: pointer to the interrupt in struct urb for this port.
37820 + * @interrupt_in_endpointAddress: endpoint address for the interrupt in pipe
37821 + *     for this port.
37822 + * @bulk_in_buffer: pointer to the bulk in buffer for this port.
37823 + * @read_urb: pointer to the bulk in struct urb for this port.
37824 + * @bulk_in_endpointAddress: endpoint address for the bulk in pipe for this
37825 + *     port.
37826 + * @bulk_out_buffer: pointer to the bulk out buffer for this port.
37827 + * @bulk_out_size: the size of the bulk_out_buffer, in bytes.
37828 + * @write_urb: pointer to the bulk out struct urb for this port.
37829 + * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this
37830 + *     port.
37831 + * @write_wait: a wait_queue_head_t used by the port.
37832 + * @tqueue: task queue for the line discipline waking up.
37833 + * @open_count: number of times this port has been opened.
37834 + * @sem: struct semaphore used to lock this structure.
37835 + * @private: place to put any driver specific information that is needed.  The
37836 + *     usb-serial driver is required to manage this data, the usb-serial core
37837 + *     will not touch this.
37838 + *
37839 + * This structure is used by the usb-serial core and drivers for the specific
37840 + * ports of a device.
37841 + */
37842  struct usb_serial_port {
37843         int                     magic;
37844 -       struct usb_serial       *serial;        /* pointer back to the owner of this port */
37845 -       struct tty_struct *     tty;            /* the coresponding tty for this port */
37846 +       struct usb_serial       *serial;
37847 +       struct tty_struct *     tty;
37848         unsigned char           number;
37849 -       char                    active;         /* someone has this device open */
37850  
37851         unsigned char *         interrupt_in_buffer;
37852         struct urb *            interrupt_in_urb;
37853 @@ -81,63 +113,92 @@
37854         __u8                    bulk_out_endpointAddress;
37855  
37856         wait_queue_head_t       write_wait;
37857 -
37858 -       struct tq_struct        tqueue;         /* task queue for line discipline waking up */
37859 -       int                     open_count;     /* number of times this port has been opened */
37860 -       struct semaphore        sem;            /* locks this structure */
37861 -       
37862 -       void *                  private;        /* data private to the specific port */
37863 +       struct tq_struct        tqueue;
37864 +       int                     open_count;
37865 +       struct semaphore        sem;
37866 +       void *                  private;
37867  };
37868  
37869 +/**
37870 + * usb_serial - structure used by the usb-serial core for a device
37871 + * @magic: magic number for internal validity of this pointer.
37872 + * @dev: pointer to the struct usb_device for this device
37873 + * @type: pointer to the struct usb_serial_device_type for this device
37874 + * @interface: pointer to the struct usb_interface for this device
37875 + * @minor: the starting minor number for this device
37876 + * @num_ports: the number of ports this device has
37877 + * @num_interrupt_in: number of interrupt in endpoints we have
37878 + * @num_bulk_in: number of bulk in endpoints we have
37879 + * @num_bulk_out: number of bulk out endpoints we have
37880 + * @vendor: vendor id of this device
37881 + * @product: product id of this device
37882 + * @port: array of struct usb_serial_port structures for the different ports.
37883 + * @private: place to put any driver specific information that is needed.  The
37884 + *     usb-serial driver is required to manage this data, the usb-serial core
37885 + *     will not touch this.
37886 + */
37887  struct usb_serial {
37888         int                             magic;
37889         struct usb_device *             dev;
37890 -       struct usb_serial_device_type * type;                   /* the type of usb serial device this is */
37891 -       struct usb_interface *          interface;              /* the interface for this device */
37892 -       struct tty_driver *             tty_driver;             /* the tty_driver for this device */
37893 -       unsigned char                   minor;                  /* the starting minor number for this device */
37894 -       unsigned char                   num_ports;              /* the number of ports this device has */
37895 -       char                            num_interrupt_in;       /* number of interrupt in endpoints we have */
37896 -       char                            num_bulk_in;            /* number of bulk in endpoints we have */
37897 -       char                            num_bulk_out;           /* number of bulk out endpoints we have */
37898 -       __u16                           vendor;                 /* vendor id of this device */
37899 -       __u16                           product;                /* product id of this device */
37900 +       struct usb_serial_device_type * type;
37901 +       struct usb_interface *          interface;
37902 +       unsigned char                   minor;
37903 +       unsigned char                   num_ports;
37904 +       char                            num_interrupt_in;
37905 +       char                            num_bulk_in;
37906 +       char                            num_bulk_out;
37907 +       __u16                           vendor;
37908 +       __u16                           product;
37909         struct usb_serial_port          port[MAX_NUM_PORTS];
37910 -
37911 -       void *                  private;                /* data private to the specific driver */
37912 +       void *                          private;
37913  };
37914  
37915  
37916 -#define MUST_HAVE_NOT  0x01
37917 -#define MUST_HAVE      0x02
37918 -#define DONT_CARE      0x03
37919 -
37920 -#define        HAS             0x02
37921 -#define HAS_NOT                0x01
37922 -
37923  #define NUM_DONT_CARE  (-1)
37924  
37925  
37926 -/* This structure defines the individual serial converter. */
37927 +/**
37928 + * usb_serial_device_type - a structure that defines a usb serial device
37929 + * @owner: pointer to the module that owns this device.
37930 + * @name: pointer to a string that describes this device.  This string used
37931 + *     in the syslog messages when a device is inserted or removed.
37932 + * @id_table: pointer to a list of usb_device_id structures that define all
37933 + *     of the devices this structure can support.
37934 + * @num_interrupt_in: the number of interrupt in endpoints this device will
37935 + *     have.
37936 + * @num_bulk_in: the number of bulk in endpoints this device will have.
37937 + * @num_bulk_out: the number of bulk out endpoints this device will have.
37938 + * @num_ports: the number of different ports this device will have.
37939 + * @calc_num_ports: pointer to a function to determine how many ports this
37940 + *     device has dynamically.  It will be called after the probe()
37941 + *     callback is called, but before attach()
37942 + * @startup: pointer to the driver's startup function.
37943 + *     This will be called when the device is inserted into the system,
37944 + *     but before the device has been fully initialized by the usb_serial
37945 + *     subsystem.  Use this function to download any firmware to the device,
37946 + *     or any other early initialization that might be needed.
37947 + *     Return 0 to continue on with the initialization sequence.  Anything 
37948 + *     else will abort it.
37949 + * @shutdown: pointer to the driver's shutdown function.  This will be
37950 + *     called when the device is removed from the system.
37951 + *
37952 + * This structure is defines a USB Serial device.  It provides all of
37953 + * the information that the USB serial core code needs.  If the function
37954 + * pointers are defined, then the USB serial core code will call them when
37955 + * the corresponding tty port functions are called.  If they are not
37956 + * called, the generic serial function will be used instead.
37957 + */
37958  struct usb_serial_device_type {
37959 +       struct module *owner;
37960         char    *name;
37961         const struct usb_device_id *id_table;
37962 -       char    needs_interrupt_in;
37963 -       char    needs_bulk_in;
37964 -       char    needs_bulk_out;
37965         char    num_interrupt_in;
37966         char    num_bulk_in;
37967         char    num_bulk_out;
37968 -       char    num_ports;              /* number of serial ports this device has */
37969 +       char    num_ports;
37970  
37971         struct list_head        driver_list;
37972         
37973 -       /* function call to make before accepting driver
37974 -        * return 0 to continue initialization,
37975 -        * < 0 aborts startup,
37976 -        * > 0 does not set up anything else and is useful for devices that have
37977 -        * downloaded firmware, and will reset themselves shortly.
37978 -        */
37979         int (*startup) (struct usb_serial *serial);
37980         
37981         void (*shutdown) (struct usb_serial *serial);
37982 diff -Nur linux-2.4.19.org/drivers/usb/serial/usbserial.c linux-2.4.19/drivers/usb/serial/usbserial.c
37983 --- linux-2.4.19.org/drivers/usb/serial/usbserial.c     Mon Feb 25 20:38:07 2002
37984 +++ linux-2.4.19/drivers/usb/serial/usbserial.c Thu Oct 31 08:11:25 2002
37985 @@ -1,14 +1,13 @@
37986  /*
37987   * USB Serial Converter driver
37988   *
37989 - * Copyright (C) 1999 - 2001 Greg Kroah-Hartman (greg@kroah.com)
37990 + * Copyright (C) 1999 - 2002 Greg Kroah-Hartman (greg@kroah.com)
37991   * Copyright (c) 2000 Peter Berger (pberger@brimson.com)
37992   * Copyright (c) 2000 Al Borchers (borchers@steinerpoint.com)
37993   *
37994 - *     This program is free software; you can redistribute it and/or modify
37995 - *     it under the terms of the GNU General Public License as published by
37996 - *     the Free Software Foundation; either version 2 of the License, or
37997 - *     (at your option) any later version.
37998 + *     This program is free software; you can redistribute it and/or
37999 + *     modify it under the terms of the GNU General Public License version
38000 + *     2 as published by the Free Software Foundation.
38001   *
38002   * This driver was originally based on the ACM driver by Armin Fuerst (which was 
38003   * based on a driver by Brad Keryan)
38004 @@ -337,24 +336,15 @@
38005  
38006  /* All of the device info needed for the Generic Serial Converter */
38007  static struct usb_serial_device_type generic_device = {
38008 -       name:                   "Generic",
38009 -       id_table:               generic_device_ids,
38010 -       needs_interrupt_in:     DONT_CARE,              /* don't have to have an interrupt in endpoint */
38011 -       needs_bulk_in:          DONT_CARE,              /* don't have to have a bulk in endpoint */
38012 -       needs_bulk_out:         DONT_CARE,              /* don't have to have a bulk out endpoint */
38013 -       num_interrupt_in:       NUM_DONT_CARE,
38014 -       num_bulk_in:            NUM_DONT_CARE,
38015 -       num_bulk_out:           NUM_DONT_CARE,
38016 -       num_ports:              1,
38017 -       shutdown:               generic_shutdown,
38018 +       .owner =                THIS_MODULE,
38019 +       .name =                 "Generic",
38020 +       .id_table =             generic_device_ids,
38021 +       .num_interrupt_in =     NUM_DONT_CARE,
38022 +       .num_bulk_in =          NUM_DONT_CARE,
38023 +       .num_bulk_out =         NUM_DONT_CARE,
38024 +       .num_ports =            1,
38025 +       .shutdown =             generic_shutdown,
38026  };
38027 -
38028 -#define if_generic_do(x)                       \
38029 -       if ((serial->vendor == vendor) &&       \
38030 -           (serial->product == product))       \
38031 -                       x
38032 -#else
38033 -#define if_generic_do(x)
38034  #endif
38035  
38036  
38037 @@ -375,10 +365,10 @@
38038  static void usb_serial_disconnect(struct usb_device *dev, void *ptr);
38039  
38040  static struct usb_driver usb_serial_driver = {
38041 -       name:           "serial",
38042 -       probe:          usb_serial_probe,
38043 -       disconnect:     usb_serial_disconnect,
38044 -       id_table:       NULL,                   /* check all devices */
38045 +       .name =         "serial",
38046 +       .probe =        usb_serial_probe,
38047 +       .disconnect =   usb_serial_disconnect,
38048 +       .id_table =     NULL,                   /* check all devices */
38049  };
38050  
38051  /* There is no MODULE_DEVICE_TABLE for usbserial.c.  Instead
38052 @@ -387,7 +377,7 @@
38053     via modprobe, and modprobe will load usbserial because the serial
38054     drivers depend on it.
38055  */
38056 -   
38057 +
38058  
38059  static int                     serial_refcount;
38060  static struct tty_driver       serial_tty_driver;
38061 @@ -400,7 +390,7 @@
38062  static LIST_HEAD(usb_serial_driver_list);
38063  
38064  
38065 -static struct usb_serial *get_serial_by_minor (int minor)
38066 +static struct usb_serial *get_serial_by_minor (unsigned int minor)
38067  {
38068         return serial_table[minor];
38069  }
38070 @@ -412,7 +402,7 @@
38071         int i, j;
38072         int good_spot;
38073  
38074 -       dbg(__FUNCTION__ " %d", num_ports);
38075 +       dbg("%s %d", __FUNCTION__, num_ports);
38076  
38077         *minor = 0;
38078         for (i = 0; i < SERIAL_TTY_MINORS; ++i) {
38079 @@ -427,14 +417,14 @@
38080                         continue;
38081                         
38082                 if (!(serial = kmalloc(sizeof(struct usb_serial), GFP_KERNEL))) {
38083 -                       err(__FUNCTION__ " - Out of memory");
38084 +                       err("%s - Out of memory", __FUNCTION__);
38085                         return NULL;
38086                 }
38087                 memset(serial, 0, sizeof(struct usb_serial));
38088                 serial->magic = USB_SERIAL_MAGIC;
38089                 serial_table[i] = serial;
38090                 *minor = i;
38091 -               dbg(__FUNCTION__ " - minor base = %d", *minor);
38092 +               dbg("%s - minor base = %d", __FUNCTION__, *minor);
38093                 for (i = *minor+1; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i)
38094                         serial_table[i] = serial;
38095                 return serial;
38096 @@ -442,12 +432,11 @@
38097         return NULL;
38098  }
38099  
38100 -
38101  static void return_serial (struct usb_serial *serial)
38102  {
38103         int i;
38104  
38105 -       dbg(__FUNCTION__);
38106 +       dbg("%s", __FUNCTION__);
38107  
38108         if (serial == NULL)
38109                 return;
38110 @@ -459,7 +448,6 @@
38111         return;
38112  }
38113  
38114 -
38115  #ifdef USES_EZUSB_FUNCTIONS
38116  /* EZ-USB Control and Status Register.  Bit 0 controls 8051 reset */
38117  #define CPUCS_REG    0x7F92
38118 @@ -471,36 +459,34 @@
38119  
38120         /* dbg("ezusb_writememory %x, %d", address, length); */
38121         if (!serial->dev) {
38122 -               dbg(__FUNCTION__ " - no physical device present, failing.");
38123 +               dbg("%s - no physical device present, failing.", __FUNCTION__);
38124                 return -ENODEV;
38125         }
38126  
38127         transfer_buffer =  kmalloc (length, GFP_KERNEL);
38128         if (!transfer_buffer) {
38129 -               err(__FUNCTION__ " - kmalloc(%d) failed.", length);
38130 +               err("%s - kmalloc(%d) failed.", __FUNCTION__, length);
38131                 return -ENOMEM;
38132         }
38133         memcpy (transfer_buffer, data, length);
38134 -       result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), bRequest, 0x40, address, 0, transfer_buffer, length, 300);
38135 +       result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), bRequest, 0x40, address, 0, transfer_buffer, length, 3*HZ);
38136         kfree (transfer_buffer);
38137         return result;
38138  }
38139  
38140 -
38141  int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit)
38142  {
38143         int     response;
38144 -       dbg(__FUNCTION__ " - %d", reset_bit);
38145 +       dbg("%s - %d", __FUNCTION__, reset_bit);
38146         response = ezusb_writememory (serial, CPUCS_REG, &reset_bit, 1, 0xa0);
38147         if (response < 0) {
38148 -               err(__FUNCTION__ "- %d failed", reset_bit);
38149 +               err("%s- %d failed", __FUNCTION__, reset_bit);
38150         }
38151         return response;
38152  }
38153  
38154  #endif /* USES_EZUSB_FUNCTIONS */
38155  
38156 -
38157  /*****************************************************************************
38158   * Driver tty interface functions
38159   *****************************************************************************/
38160 @@ -508,9 +494,10 @@
38161  {
38162         struct usb_serial *serial;
38163         struct usb_serial_port *port;
38164 -       int portNumber;
38165 +       unsigned int portNumber;
38166 +       int retval = 0;
38167         
38168 -       dbg(__FUNCTION__);
38169 +       dbg("%s", __FUNCTION__);
38170  
38171         /* initialize the pointer incase something fails */
38172         tty->driver_data = NULL;
38173 @@ -518,257 +505,350 @@
38174         /* get the serial object associated with this tty pointer */
38175         serial = get_serial_by_minor (MINOR(tty->device));
38176  
38177 -       if (serial_paranoia_check (serial, __FUNCTION__)) {
38178 +       if (serial_paranoia_check (serial, __FUNCTION__))
38179                 return -ENODEV;
38180 -       }
38181  
38182         /* set up our port structure making the tty driver remember our port object, and us it */
38183         portNumber = MINOR(tty->device) - serial->minor;
38184         port = &serial->port[portNumber];
38185         tty->driver_data = port;
38186 +
38187 +       down (&port->sem);
38188         port->tty = tty;
38189          
38190 -       /* pass on to the driver specific version of this function if it is available */
38191 -       if (serial->type->open) {
38192 -               return (serial->type->open(port, filp));
38193 -       } else {
38194 -               return (generic_open(port, filp));
38195 +       /* lock this module before we call it */
38196 +       if (serial->type->owner)
38197 +               __MOD_INC_USE_COUNT(serial->type->owner);
38198 +
38199 +       ++port->open_count;
38200 +       if (port->open_count == 1) {
38201 +               /* only call the device specific open if this 
38202 +                * is the first time the port is opened */
38203 +               if (serial->type->open)
38204 +                       retval = serial->type->open(port, filp);
38205 +               else
38206 +                       retval = generic_open(port, filp);
38207         }
38208 +
38209 +       if (retval) {
38210 +               port->open_count = 0;
38211 +               if (serial->type->owner)
38212 +                       __MOD_DEC_USE_COUNT(serial->type->owner);
38213 +       }
38214 +
38215 +       up (&port->sem);
38216 +       return retval;
38217  }
38218  
38219 +static void __serial_close(struct usb_serial_port *port, struct file *filp)
38220 +{
38221 +       if (!port->open_count) {
38222 +               dbg ("%s - port not opened", __FUNCTION__);
38223 +               return;
38224 +       }
38225 +
38226 +       --port->open_count;
38227 +       if (port->open_count <= 0) {
38228 +               /* only call the device specific close if this 
38229 +                * port is being closed by the last owner */
38230 +               if (port->serial->type->close)
38231 +                       port->serial->type->close(port, filp);
38232 +               else
38233 +                       generic_close(port, filp);
38234 +               port->open_count = 0;
38235 +       }
38236 +
38237 +       if (port->serial->type->owner)
38238 +               __MOD_DEC_USE_COUNT(port->serial->type->owner);
38239 +}
38240  
38241  static void serial_close(struct tty_struct *tty, struct file * filp)
38242  {
38243         struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
38244         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
38245  
38246 -       if (!serial) {
38247 +       if (!serial)
38248                 return;
38249 -       }
38250  
38251 -       dbg(__FUNCTION__ " - port %d", port->number);
38252 -       
38253 -       if (!port->active) {
38254 -               dbg (__FUNCTION__ " - port not opened");
38255 -               return;
38256 -       }
38257 +       down (&port->sem);
38258  
38259 -       /* pass on to the driver specific version of this function if it is available */
38260 -       if (serial->type->close) {
38261 -               serial->type->close(port, filp);
38262 -       } else {
38263 -               generic_close(port, filp);
38264 +       dbg("%s - port %d", __FUNCTION__, port->number);
38265 +
38266 +       /* if disconnect beat us to the punch here, there's nothing to do */
38267 +       if (tty->driver_data) {
38268 +               __serial_close(port, filp);
38269         }
38270 -}      
38271  
38272 +       up (&port->sem);
38273 +}
38274  
38275  static int serial_write (struct tty_struct * tty, int from_user, const unsigned char *buf, int count)
38276  {
38277         struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
38278         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
38279 -       
38280 -       if (!serial) {
38281 +       int retval = -EINVAL;
38282 +
38283 +       if (!serial)
38284                 return -ENODEV;
38285 -       }
38286 -       
38287 -       dbg(__FUNCTION__ " - port %d, %d byte(s)", port->number, count);
38288  
38289 -       if (!port->active) {
38290 -               dbg (__FUNCTION__ " - port not opened");
38291 -               return -EINVAL;
38292 +       down (&port->sem);
38293 +
38294 +       dbg("%s - port %d, %d byte(s)", __FUNCTION__, port->number, count);
38295 +
38296 +       if (!port->open_count) {
38297 +               dbg("%s - port not opened", __FUNCTION__);
38298 +               goto exit;
38299         }
38300 -       
38301 +
38302         /* pass on to the driver specific version of this function if it is available */
38303 -       if (serial->type->write) {
38304 -               return (serial->type->write(port, from_user, buf, count));
38305 -       } else {
38306 -               return (generic_write(port, from_user, buf, count));
38307 -       }
38308 -}
38309 +       if (serial->type->write)
38310 +               retval = serial->type->write(port, from_user, buf, count);
38311 +       else
38312 +               retval = generic_write(port, from_user, buf, count);
38313  
38314 +exit:
38315 +       up (&port->sem);
38316 +       return retval;
38317 +}
38318  
38319  static int serial_write_room (struct tty_struct *tty) 
38320  {
38321         struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
38322         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
38323 +       int retval = -EINVAL;
38324  
38325 -       if (!serial) {
38326 +       if (!serial)
38327                 return -ENODEV;
38328 -       }
38329  
38330 -       dbg(__FUNCTION__ " - port %d", port->number);
38331 -       
38332 -       if (!port->active) {
38333 -               dbg (__FUNCTION__ " - port not open");
38334 -               return -EINVAL;
38335 +       down (&port->sem);
38336 +
38337 +       dbg("%s - port %d", __FUNCTION__, port->number);
38338 +
38339 +       if (!port->open_count) {
38340 +               dbg("%s - port not open", __FUNCTION__);
38341 +               goto exit;
38342         }
38343  
38344         /* pass on to the driver specific version of this function if it is available */
38345 -       if (serial->type->write_room) {
38346 -               return (serial->type->write_room(port));
38347 -       } else {
38348 -               return (generic_write_room(port));
38349 -       }
38350 -}
38351 +       if (serial->type->write_room)
38352 +               retval = serial->type->write_room(port);
38353 +       else
38354 +               retval = generic_write_room(port);
38355  
38356 +exit:
38357 +       up (&port->sem);
38358 +       return retval;
38359 +}
38360  
38361  static int serial_chars_in_buffer (struct tty_struct *tty) 
38362  {
38363         struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
38364         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
38365 +       int retval = -EINVAL;
38366  
38367 -       if (!serial) {
38368 +       if (!serial)
38369                 return -ENODEV;
38370 -       }
38371  
38372 -       if (!port->active) {
38373 -               dbg (__FUNCTION__ " - port not open");
38374 -               return -EINVAL;
38375 +       down (&port->sem);
38376 +
38377 +       dbg("%s = port %d", __FUNCTION__, port->number);
38378 +
38379 +       if (!port->open_count) {
38380 +               dbg("%s - port not open", __FUNCTION__);
38381 +               goto exit;
38382         }
38383  
38384         /* pass on to the driver specific version of this function if it is available */
38385 -       if (serial->type->chars_in_buffer) {
38386 -               return (serial->type->chars_in_buffer(port));
38387 -       } else {
38388 -               return (generic_chars_in_buffer(port));
38389 -       }
38390 -}
38391 +       if (serial->type->chars_in_buffer)
38392 +               retval = serial->type->chars_in_buffer(port);
38393 +       else
38394 +               retval = generic_chars_in_buffer(port);
38395  
38396 +exit:
38397 +       up (&port->sem);
38398 +       return retval;
38399 +}
38400  
38401  static void serial_throttle (struct tty_struct * tty)
38402  {
38403         struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
38404         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
38405  
38406 -       if (!serial) {
38407 +       if (!serial)
38408                 return;
38409 -       }
38410  
38411 -       dbg(__FUNCTION__ " - port %d", port->number);
38412 +       down (&port->sem);
38413 +
38414 +       dbg("%s - port %d", __FUNCTION__, port->number);
38415  
38416 -       if (!port->active) {
38417 -               dbg (__FUNCTION__ " - port not open");
38418 -               return;
38419 +       if (!port->open_count) {
38420 +               dbg ("%s - port not open", __FUNCTION__);
38421 +               goto exit;
38422         }
38423  
38424         /* pass on to the driver specific version of this function */
38425 -       if (serial->type->throttle) {
38426 +       if (serial->type->throttle)
38427                 serial->type->throttle(port);
38428 -       }
38429  
38430 -       return;
38431 +exit:
38432 +       up (&port->sem);
38433  }
38434  
38435 -
38436  static void serial_unthrottle (struct tty_struct * tty)
38437  {
38438         struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
38439         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
38440  
38441 -       if (!serial) {
38442 +       if (!serial)
38443                 return;
38444 -       }
38445  
38446 -       dbg(__FUNCTION__ " - port %d", port->number);
38447 +       down (&port->sem);
38448  
38449 -       if (!port->active) {
38450 -               dbg (__FUNCTION__ " - port not open");
38451 -               return;
38452 +       dbg("%s - port %d", __FUNCTION__, port->number);
38453 +
38454 +       if (!port->open_count) {
38455 +               dbg("%s - port not open", __FUNCTION__);
38456 +               goto exit;
38457         }
38458  
38459         /* pass on to the driver specific version of this function */
38460 -       if (serial->type->unthrottle) {
38461 +       if (serial->type->unthrottle)
38462                 serial->type->unthrottle(port);
38463 -       }
38464  
38465 -       return;
38466 +exit:
38467 +       up (&port->sem);
38468  }
38469  
38470 -
38471  static int serial_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg)
38472  {
38473         struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
38474         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
38475 +       int retval = -ENODEV;
38476  
38477 -       if (!serial) {
38478 +       if (!serial)
38479                 return -ENODEV;
38480 -       }
38481  
38482 -       dbg(__FUNCTION__ " - port %d, cmd 0x%.4x", port->number, cmd);
38483 +       down (&port->sem);
38484  
38485 -       if (!port->active) {
38486 -               dbg (__FUNCTION__ " - port not open");
38487 -               return -ENODEV;
38488 +       dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
38489 +
38490 +       if (!port->open_count) {
38491 +               dbg ("%s - port not open", __FUNCTION__);
38492 +               goto exit;
38493         }
38494  
38495         /* pass on to the driver specific version of this function if it is available */
38496 -       if (serial->type->ioctl) {
38497 -               return (serial->type->ioctl(port, file, cmd, arg));
38498 -       } else {
38499 -               return -ENOIOCTLCMD;
38500 -       }
38501 -}
38502 +       if (serial->type->ioctl)
38503 +               retval = serial->type->ioctl(port, file, cmd, arg);
38504 +       else
38505 +               retval = -ENOIOCTLCMD;
38506  
38507 +exit:
38508 +       up (&port->sem);
38509 +       return retval;
38510 +}
38511  
38512  static void serial_set_termios (struct tty_struct *tty, struct termios * old)
38513  {
38514         struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
38515         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
38516  
38517 -       if (!serial) {
38518 +       if (!serial)
38519                 return;
38520 -       }
38521  
38522 -       dbg(__FUNCTION__ " - port %d", port->number);
38523 +       down (&port->sem);
38524 +
38525 +       dbg("%s - port %d", __FUNCTION__, port->number);
38526  
38527 -       if (!port->active) {
38528 -               dbg (__FUNCTION__ " - port not open");
38529 -               return;
38530 +       if (!port->open_count) {
38531 +               dbg("%s - port not open", __FUNCTION__);
38532 +               goto exit;
38533         }
38534  
38535         /* pass on to the driver specific version of this function if it is available */
38536 -       if (serial->type->set_termios) {
38537 +       if (serial->type->set_termios)
38538                 serial->type->set_termios(port, old);
38539 -       }
38540 -       
38541 -       return;
38542 -}
38543  
38544 +exit:
38545 +       up (&port->sem);
38546 +}
38547  
38548  static void serial_break (struct tty_struct *tty, int break_state)
38549  {
38550         struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
38551         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
38552  
38553 -       if (!serial) {
38554 +       if (!serial)
38555                 return;
38556 -       }
38557  
38558 -       dbg(__FUNCTION__ " - port %d", port->number);
38559 +       down (&port->sem);
38560  
38561 -       if (!port->active) {
38562 -               dbg (__FUNCTION__ " - port not open");
38563 -               return;
38564 +       dbg("%s - port %d", __FUNCTION__, port->number);
38565 +
38566 +       if (!port->open_count) {
38567 +               dbg("%s - port not open", __FUNCTION__);
38568 +               goto exit;
38569         }
38570  
38571 -       /* pass on to the driver specific version of this function if it is
38572 -           available */
38573 -       if (serial->type->break_ctl) {
38574 +       /* pass on to the driver specific version of this function if it is available */
38575 +       if (serial->type->break_ctl)
38576                 serial->type->break_ctl(port, break_state);
38577 -       }
38578 -}
38579  
38580 +exit:
38581 +       up (&port->sem);
38582 +}
38583  
38584  static void serial_shutdown (struct usb_serial *serial)
38585  {
38586 -       if (serial->type->shutdown) {
38587 +       dbg ("%s", __FUNCTION__);
38588 +
38589 +       if (serial->type->shutdown)
38590                 serial->type->shutdown(serial);
38591 -       } else {
38592 +       else
38593                 generic_shutdown(serial);
38594 -       }
38595  }
38596  
38597 +static int serial_read_proc (char *page, char **start, off_t off, int count, int *eof, void *data)
38598 +{
38599 +       struct usb_serial *serial;
38600 +       int length = 0;
38601 +       int i;
38602 +       off_t begin = 0;
38603 +       char tmp[40];
38604 +
38605 +       dbg("%s", __FUNCTION__);
38606 +       length += sprintf (page, "usbserinfo:1.0 driver:%s\n", DRIVER_VERSION);
38607 +       for (i = 0; i < SERIAL_TTY_MINORS && length < PAGE_SIZE; ++i) {
38608 +               serial = get_serial_by_minor(i);
38609 +               if (serial == NULL)
38610 +                       continue;
38611  
38612 +               length += sprintf (page+length, "%d:", i);
38613 +               if (serial->type->owner)
38614 +                       length += sprintf (page+length, " module:%s", serial->type->owner->name);
38615 +               length += sprintf (page+length, " name:\"%s\"", serial->type->name);
38616 +               length += sprintf (page+length, " vendor:%04x product:%04x", serial->vendor, serial->product);
38617 +               length += sprintf (page+length, " num_ports:%d", serial->num_ports);
38618 +               length += sprintf (page+length, " port:%d", i - serial->minor + 1);
38619 +
38620 +               usb_make_path(serial->dev, tmp, sizeof(tmp));
38621 +               length += sprintf (page+length, " path:%s", tmp);
38622 +                       
38623 +               length += sprintf (page+length, "\n");
38624 +               if ((length + begin) > (off + count))
38625 +                       goto done;
38626 +               if ((length + begin) < off) {
38627 +                       begin += length;
38628 +                       length = 0;
38629 +               }
38630 +       }
38631 +       *eof = 1;
38632 +done:
38633 +       if (off >= (length + begin))
38634 +               return 0;
38635 +       *start = page + (off-begin);
38636 +       return ((count < begin+length-off) ? count : begin+length-off);
38637 +}
38638  
38639  /*****************************************************************************
38640   * generic devices specific driver functions
38641 @@ -781,91 +861,70 @@
38642         if (port_paranoia_check (port, __FUNCTION__))
38643                 return -ENODEV;
38644  
38645 -       /* only increment our usage count, if this device is _really_ a generic device */
38646 -       if_generic_do(MOD_INC_USE_COUNT);
38647 -
38648 -       dbg(__FUNCTION__ " - port %d", port->number);
38649 -
38650 -       down (&port->sem);
38651 -       
38652 -       ++port->open_count;
38653 -       
38654 -       if (!port->active) {
38655 -               port->active = 1;
38656 +       dbg("%s - port %d", __FUNCTION__, port->number);
38657  
38658 -               /* force low_latency on so that our tty_push actually forces the data through, 
38659 -                  otherwise it is scheduled, and with high data rates (like with OHCI) data
38660 -                  can get lost. */
38661 +       /* force low_latency on so that our tty_push actually forces the data through, 
38662 +          otherwise it is scheduled, and with high data rates (like with OHCI) data
38663 +          can get lost. */
38664 +       if (port->tty)
38665                 port->tty->low_latency = 1;
38666 -               
38667 -               /* if we have a bulk interrupt, start reading from it */
38668 -               if (serial->num_bulk_in) {
38669 -                       /* Start reading from the device */
38670 -                       FILL_BULK_URB(port->read_urb, serial->dev, 
38671 -                                     usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
38672 -                                     port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
38673 -                                     ((serial->type->read_bulk_callback) ?
38674 -                                      serial->type->read_bulk_callback :
38675 -                                      generic_read_bulk_callback), 
38676 -                                     port);
38677 -                       result = usb_submit_urb(port->read_urb);
38678 -                       if (result)
38679 -                               err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
38680 -               }
38681 +
38682 +       /* if we have a bulk interrupt, start reading from it */
38683 +       if (serial->num_bulk_in) {
38684 +               /* Start reading from the device */
38685 +               usb_fill_bulk_urb (port->read_urb, serial->dev,
38686 +                                  usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
38687 +                                  port->read_urb->transfer_buffer,
38688 +                                  port->read_urb->transfer_buffer_length,
38689 +                                  ((serial->type->read_bulk_callback) ?
38690 +                                    serial->type->read_bulk_callback :
38691 +                                    generic_read_bulk_callback),
38692 +                                  port);
38693 +               result = usb_submit_urb(port->read_urb);
38694 +               if (result)
38695 +                       err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
38696         }
38697 -       
38698 -       up (&port->sem);
38699 -       
38700 +
38701         return result;
38702  }
38703  
38704 -
38705 -static void generic_close (struct usb_serial_port *port, struct file * filp)
38706 +static void generic_cleanup (struct usb_serial_port *port)
38707  {
38708         struct usb_serial *serial = port->serial;
38709  
38710 -       dbg(__FUNCTION__ " - port %d", port->number);
38711 -
38712 -       down (&port->sem);
38713 -
38714 -       --port->open_count;
38715 +       dbg("%s - port %d", __FUNCTION__, port->number);
38716  
38717 -       if (port->open_count <= 0) {
38718 -               if (serial->dev) {
38719 -                       /* shutdown any bulk reads that might be going on */
38720 -                       if (serial->num_bulk_out)
38721 -                               usb_unlink_urb (port->write_urb);
38722 -                       if (serial->num_bulk_in)
38723 -                               usb_unlink_urb (port->read_urb);
38724 -               }
38725 -               
38726 -               port->active = 0;
38727 -               port->open_count = 0;
38728 +       if (serial->dev) {
38729 +               /* shutdown any bulk reads that might be going on */
38730 +               if (serial->num_bulk_out)
38731 +                       usb_unlink_urb (port->write_urb);
38732 +               if (serial->num_bulk_in)
38733 +                       usb_unlink_urb (port->read_urb);
38734         }
38735 -
38736 -       up (&port->sem);
38737 -
38738 -       /* only decrement our usage count, if this device is _really_ a generic device */
38739 -       if_generic_do(MOD_DEC_USE_COUNT);
38740  }
38741  
38742 +static void generic_close (struct usb_serial_port *port, struct file * filp)
38743 +{
38744 +       dbg("%s - port %d", __FUNCTION__, port->number);
38745 +       generic_cleanup (port);
38746 +}
38747  
38748  static int generic_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count)
38749  {
38750         struct usb_serial *serial = port->serial;
38751         int result;
38752  
38753 -       dbg(__FUNCTION__ " - port %d", port->number);
38754 +       dbg("%s - port %d", __FUNCTION__, port->number);
38755  
38756         if (count == 0) {
38757 -               dbg(__FUNCTION__ " - write request of 0 bytes");
38758 +               dbg("%s - write request of 0 bytes", __FUNCTION__);
38759                 return (0);
38760         }
38761  
38762         /* only do something if we have a bulk out endpoint */
38763         if (serial->num_bulk_out) {
38764                 if (port->write_urb->status == -EINPROGRESS) {
38765 -                       dbg (__FUNCTION__ " - already writing");
38766 +                       dbg("%s - already writing", __FUNCTION__);
38767                         return (0);
38768                 }
38769  
38770 @@ -877,68 +936,65 @@
38771                 }
38772                 else {
38773                         memcpy (port->write_urb->transfer_buffer, buf, count);
38774 -               }  
38775 +               }
38776  
38777                 usb_serial_debug_data (__FILE__, __FUNCTION__, count, port->write_urb->transfer_buffer);
38778  
38779                 /* set up our urb */
38780 -               FILL_BULK_URB(port->write_urb, serial->dev, 
38781 -                             usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress),
38782 -                             port->write_urb->transfer_buffer, count,
38783 -                             ((serial->type->write_bulk_callback) ? 
38784 -                              serial->type->write_bulk_callback : 
38785 -                              generic_write_bulk_callback), 
38786 -                             port);
38787 +               usb_fill_bulk_urb (port->write_urb, serial->dev,
38788 +                                  usb_sndbulkpipe (serial->dev,
38789 +                                                   port->bulk_out_endpointAddress),
38790 +                                  port->write_urb->transfer_buffer, count,
38791 +                                  ((serial->type->write_bulk_callback) ? 
38792 +                                    serial->type->write_bulk_callback :
38793 +                                    generic_write_bulk_callback), port);
38794  
38795                 /* send the data out the bulk port */
38796                 result = usb_submit_urb(port->write_urb);
38797                 if (result)
38798 -                       err(__FUNCTION__ " - failed submitting write urb, error %d", result);
38799 +                       err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
38800                 else
38801                         result = count;
38802  
38803                 return result;
38804         }
38805 -       
38806 +
38807         /* no bulk out, so return 0 bytes written */
38808         return (0);
38809 -} 
38810 -
38811 +}
38812  
38813  static int generic_write_room (struct usb_serial_port *port)
38814  {
38815         struct usb_serial *serial = port->serial;
38816         int room = 0;
38817  
38818 -       dbg(__FUNCTION__ " - port %d", port->number);
38819 +       dbg("%s - port %d", __FUNCTION__, port->number);
38820         
38821         if (serial->num_bulk_out) {
38822                 if (port->write_urb->status != -EINPROGRESS)
38823                         room = port->bulk_out_size;
38824         }
38825 -       
38826 -       dbg(__FUNCTION__ " - returns %d", room);
38827 +
38828 +       dbg("%s - returns %d", __FUNCTION__, room);
38829         return (room);
38830  }
38831  
38832 -
38833  static int generic_chars_in_buffer (struct usb_serial_port *port)
38834  {
38835         struct usb_serial *serial = port->serial;
38836         int chars = 0;
38837  
38838 -       dbg(__FUNCTION__ " - port %d", port->number);
38839 -       
38840 +       dbg("%s - port %d", __FUNCTION__, port->number);
38841 +
38842         if (serial->num_bulk_out) {
38843                 if (port->write_urb->status == -EINPROGRESS)
38844                         chars = port->write_urb->transfer_buffer_length;
38845         }
38846  
38847 -       dbg (__FUNCTION__ " - returns %d", chars);
38848 +       dbg("%s - returns %d", __FUNCTION__, chars);
38849         return (chars);
38850  }
38851  
38852 -
38853  static void generic_read_bulk_callback (struct urb *urb)
38854  {
38855         struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
38856 @@ -948,22 +1004,22 @@
38857         int i;
38858         int result;
38859  
38860 -       dbg(__FUNCTION__ " - port %d", port->number);
38861 -       
38862 +       dbg("%s - port %d", __FUNCTION__, port->number);
38863 +
38864         if (!serial) {
38865 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
38866 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
38867                 return;
38868         }
38869  
38870         if (urb->status) {
38871 -               dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
38872 +               dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
38873                 return;
38874         }
38875  
38876         usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
38877  
38878         tty = port->tty;
38879 -       if (urb->actual_length) {
38880 +       if (tty && urb->actual_length) {
38881                 for (i = 0; i < urb->actual_length ; ++i) {
38882                         /* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */
38883                         if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
38884 @@ -976,73 +1032,71 @@
38885         }
38886  
38887         /* Continue trying to always read  */
38888 -       FILL_BULK_URB(port->read_urb, serial->dev, 
38889 -                     usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
38890 -                     port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
38891 -                     ((serial->type->read_bulk_callback) ?
38892 -                      serial->type->read_bulk_callback :
38893 -                      generic_read_bulk_callback), 
38894 -                     port);
38895 +       usb_fill_bulk_urb (port->read_urb, serial->dev,
38896 +                          usb_rcvbulkpipe (serial->dev,
38897 +                                           port->bulk_in_endpointAddress),
38898 +                          port->read_urb->transfer_buffer,
38899 +                          port->read_urb->transfer_buffer_length,
38900 +                          ((serial->type->read_bulk_callback) ? 
38901 +                            serial->type->read_bulk_callback : 
38902 +                            generic_read_bulk_callback), port);
38903         result = usb_submit_urb(port->read_urb);
38904         if (result)
38905 -               err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
38906 +               err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
38907  }
38908  
38909 -
38910  static void generic_write_bulk_callback (struct urb *urb)
38911  {
38912         struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
38913         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
38914  
38915 -       dbg(__FUNCTION__ " - port %d", port->number);
38916 -       
38917 +       dbg("%s - port %d", __FUNCTION__, port->number);
38918 +
38919         if (!serial) {
38920 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
38921 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
38922                 return;
38923         }
38924  
38925         if (urb->status) {
38926 -               dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
38927 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
38928                 return;
38929         }
38930  
38931         queue_task(&port->tqueue, &tq_immediate);
38932         mark_bh(IMMEDIATE_BH);
38933 -       
38934 +
38935         return;
38936  }
38937  
38938 -
38939  static void generic_shutdown (struct usb_serial *serial)
38940  {
38941         int i;
38942  
38943 -       dbg (__FUNCTION__);
38944 +       dbg("%s", __FUNCTION__);
38945  
38946         /* stop reads and writes on all ports */
38947         for (i=0; i < serial->num_ports; ++i) {
38948 -               while (serial->port[i].open_count > 0) {
38949 -                       generic_close (&serial->port[i], NULL);
38950 -               }
38951 +               generic_cleanup (&serial->port[i]);
38952         }
38953  }
38954  
38955 -
38956  static void port_softint(void *private)
38957  {
38958         struct usb_serial_port *port = (struct usb_serial_port *)private;
38959         struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
38960         struct tty_struct *tty;
38961  
38962 -       dbg(__FUNCTION__ " - port %d", port->number);
38963 +       dbg("%s - port %d", __FUNCTION__, port->number);
38964         
38965 -       if (!serial) {
38966 +       if (!serial)
38967                 return;
38968 -       }
38969 -       
38970 +
38971         tty = port->tty;
38972 +       if (!tty)
38973 +               return;
38974 +
38975         if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
38976 -               dbg(__FUNCTION__ " - write wakeup call.");
38977 +               dbg("%s - write wakeup call.", __FUNCTION__);
38978                 (tty->ldisc.write_wakeup)(tty);
38979         }
38980  
38981 @@ -1068,9 +1122,6 @@
38982         int minor;
38983         int buffer_size;
38984         int i;
38985 -       char interrupt_pipe;
38986 -       char bulk_in_pipe;
38987 -       char bulk_out_pipe;
38988         int num_interrupt_in = 0;
38989         int num_bulk_in = 0;
38990         int num_bulk_out = 0;
38991 @@ -1078,7 +1129,6 @@
38992         int max_endpoints;
38993         const struct usb_device_id *id_pattern = NULL;
38994  
38995 -       
38996         /* loop through our list of known serial converters, and see if this
38997            device matches. */
38998         found = 0;
38999 @@ -1099,8 +1149,6 @@
39000         }
39001         
39002         /* descriptor matches, let's find the endpoints needed */
39003 -       interrupt_pipe = bulk_in_pipe = bulk_out_pipe = HAS_NOT;
39004 -                       
39005         /* check out the endpoints */
39006         iface_desc = &interface->altsetting[0];
39007         for (i = 0; i < iface_desc->bNumEndpoints; ++i) {
39008 @@ -1110,7 +1158,6 @@
39009                     ((endpoint->bmAttributes & 3) == 0x02)) {
39010                         /* we found a bulk in endpoint */
39011                         dbg("found bulk in");
39012 -                       bulk_in_pipe = HAS;
39013                         bulk_in_endpoint[num_bulk_in] = endpoint;
39014                         ++num_bulk_in;
39015                 }
39016 @@ -1119,7 +1166,6 @@
39017                     ((endpoint->bmAttributes & 3) == 0x02)) {
39018                         /* we found a bulk out endpoint */
39019                         dbg("found bulk out");
39020 -                       bulk_out_pipe = HAS;
39021                         bulk_out_endpoint[num_bulk_out] = endpoint;
39022                         ++num_bulk_out;
39023                 }
39024 @@ -1128,20 +1174,19 @@
39025                     ((endpoint->bmAttributes & 3) == 0x03)) {
39026                         /* we found a interrupt in endpoint */
39027                         dbg("found interrupt in");
39028 -                       interrupt_pipe = HAS;
39029                         interrupt_in_endpoint[num_interrupt_in] = endpoint;
39030                         ++num_interrupt_in;
39031                 }
39032         }
39033 -       
39034 +
39035  #if defined(CONFIG_USB_SERIAL_PL2303) || defined(CONFIG_USB_SERIAL_PL2303_MODULE)
39036         /* BEGIN HORRIBLE HACK FOR PL2303 */ 
39037         /* this is needed due to the looney way its endpoints are set up */
39038 -       if (ifnum == 1) {
39039 -               if (((dev->descriptor.idVendor == PL2303_VENDOR_ID) &&
39040 -                    (dev->descriptor.idProduct == PL2303_PRODUCT_ID)) ||
39041 -                   ((dev->descriptor.idVendor == ATEN_VENDOR_ID) &&
39042 -                    (dev->descriptor.idProduct == ATEN_PRODUCT_ID))) {
39043 +       if (((dev->descriptor.idVendor == PL2303_VENDOR_ID) &&
39044 +            (dev->descriptor.idProduct == PL2303_PRODUCT_ID)) ||
39045 +           ((dev->descriptor.idVendor == ATEN_VENDOR_ID) &&
39046 +            (dev->descriptor.idProduct == ATEN_PRODUCT_ID))) {
39047 +               if (ifnum == 1) {
39048                         /* check out the endpoints of the other interface*/
39049                         interface = &dev->actconfig->interface[ifnum ^ 1];
39050                         iface_desc = &interface->altsetting[0];
39051 @@ -1151,24 +1196,23 @@
39052                                     ((endpoint->bmAttributes & 3) == 0x03)) {
39053                                         /* we found a interrupt in endpoint */
39054                                         dbg("found interrupt in for Prolific device on separate interface");
39055 -                                       interrupt_pipe = HAS;
39056                                         interrupt_in_endpoint[num_interrupt_in] = endpoint;
39057                                         ++num_interrupt_in;
39058                                 }
39059                         }
39060                 }
39061 +
39062 +               /* Now make sure the PL-2303 is configured correctly.
39063 +                * If not, give up now and hope this hack will work
39064 +                * properly during a later invocation of usb_serial_probe
39065 +                */
39066 +               if (num_bulk_in == 0 || num_bulk_out == 0) {
39067 +                       info("PL-2303 hack: descriptors matched but endpoints did not");
39068 +                       return NULL;
39069 +               }
39070         }
39071         /* END HORRIBLE HACK FOR PL2303 */
39072  #endif
39073 -       
39074 -       /* verify that we found all of the endpoints that we need */
39075 -       if (!((interrupt_pipe & type->needs_interrupt_in) &&
39076 -             (bulk_in_pipe & type->needs_bulk_in) &&
39077 -             (bulk_out_pipe & type->needs_bulk_out))) {
39078 -               /* nope, they don't match what we expected */
39079 -               info("descriptors matched, but endpoints did not");
39080 -               return NULL;
39081 -       }
39082  
39083         /* found all that we need */
39084         info("%s converter detected", type->name);
39085 @@ -1189,7 +1233,7 @@
39086                 err("No more free serial devices");
39087                 return NULL;
39088         }
39089 -       
39090 +
39091         serial->dev = dev;
39092         serial->type = type;
39093         serial->interface = interface;
39094 @@ -1201,15 +1245,6 @@
39095         serial->vendor = dev->descriptor.idVendor;
39096         serial->product = dev->descriptor.idProduct;
39097  
39098 -       /* if this device type has a startup function, call it */
39099 -       if (type->startup) {
39100 -               i = type->startup (serial);
39101 -               if (i < 0)
39102 -                       goto probe_error;
39103 -               if (i > 0)
39104 -                       return serial;
39105 -       }
39106 -
39107         /* set up the endpoint information */
39108         for (i = 0; i < num_bulk_in; ++i) {
39109                 endpoint = bulk_in_endpoint[i];
39110 @@ -1226,13 +1261,14 @@
39111                         err("Couldn't allocate bulk_in_buffer");
39112                         goto probe_error;
39113                 }
39114 -               FILL_BULK_URB(port->read_urb, dev, 
39115 -                             usb_rcvbulkpipe(dev, endpoint->bEndpointAddress),
39116 -                             port->bulk_in_buffer, buffer_size, 
39117 -                             ((serial->type->read_bulk_callback) ?
39118 -                              serial->type->read_bulk_callback :
39119 -                              generic_read_bulk_callback), 
39120 -                             port);
39121 +               usb_fill_bulk_urb (port->read_urb, dev,
39122 +                                  usb_rcvbulkpipe (dev,
39123 +                                                   endpoint->bEndpointAddress),
39124 +                                  port->bulk_in_buffer, buffer_size,
39125 +                                  ((serial->type->read_bulk_callback) ? 
39126 +                                    serial->type->read_bulk_callback : 
39127 +                                    generic_read_bulk_callback),
39128 +                                  port);
39129         }
39130  
39131         for (i = 0; i < num_bulk_out; ++i) {
39132 @@ -1251,13 +1287,14 @@
39133                         err("Couldn't allocate bulk_out_buffer");
39134                         goto probe_error;
39135                 }
39136 -               FILL_BULK_URB(port->write_urb, dev, 
39137 -                             usb_sndbulkpipe(dev, endpoint->bEndpointAddress),
39138 -                             port->bulk_out_buffer, buffer_size,
39139 -                             ((serial->type->write_bulk_callback) ? 
39140 -                              serial->type->write_bulk_callback : 
39141 -                              generic_write_bulk_callback), 
39142 -                             port);
39143 +               usb_fill_bulk_urb (port->write_urb, dev,
39144 +                                  usb_sndbulkpipe (dev,
39145 +                                                   endpoint->bEndpointAddress),
39146 +                                  port->bulk_out_buffer, buffer_size, 
39147 +                                  ((serial->type->write_bulk_callback) ? 
39148 +                                    serial->type->write_bulk_callback : 
39149 +                                    generic_write_bulk_callback),
39150 +                                  port);
39151         }
39152  
39153         for (i = 0; i < num_interrupt_in; ++i) {
39154 @@ -1275,12 +1312,12 @@
39155                         err("Couldn't allocate interrupt_in_buffer");
39156                         goto probe_error;
39157                 }
39158 -               FILL_INT_URB(port->interrupt_in_urb, dev, 
39159 -                            usb_rcvintpipe(dev, endpoint->bEndpointAddress),
39160 -                            port->interrupt_in_buffer, buffer_size, 
39161 -                            serial->type->read_int_callback,
39162 -                            port, 
39163 -                            endpoint->bInterval);
39164 +               usb_fill_int_urb (port->interrupt_in_urb, dev, 
39165 +                                 usb_rcvintpipe (dev,
39166 +                                                 endpoint->bEndpointAddress),
39167 +                                 port->interrupt_in_buffer, buffer_size, 
39168 +                                 serial->type->read_int_callback, port, 
39169 +                                 endpoint->bInterval);
39170         }
39171  
39172         /* initialize some parts of the port structures */
39173 @@ -1288,7 +1325,7 @@
39174         max_endpoints = max(num_bulk_in, num_bulk_out);
39175         max_endpoints = max(max_endpoints, num_interrupt_in);
39176         max_endpoints = max(max_endpoints, (int)serial->num_ports);
39177 -       dbg (__FUNCTION__ " - setting up %d port structures for this device", max_endpoints);
39178 +       dbg("%s - setting up %d port structures for this device", __FUNCTION__, max_endpoints);
39179         for (i = 0; i < max_endpoints; ++i) {
39180                 port = &serial->port[i];
39181                 port->number = i + serial->minor;
39182 @@ -1298,14 +1335,23 @@
39183                 port->tqueue.data = port;
39184                 init_MUTEX (&port->sem);
39185         }
39186 -       
39187 +
39188 +       /* if this device type has a startup function, call it */
39189 +       if (type->startup) {
39190 +               i = type->startup (serial);
39191 +               if (i < 0)
39192 +                       goto probe_error;
39193 +               if (i > 0)
39194 +                       return serial;
39195 +       }
39196 +
39197         /* initialize the devfs nodes for this device and let the user know what ports we are bound to */
39198         for (i = 0; i < serial->num_ports; ++i) {
39199                 tty_register_devfs (&serial_tty_driver, 0, serial->port[i].number);
39200                 info("%s converter now attached to ttyUSB%d (or usb/tts/%d for devfs)", 
39201                      type->name, serial->port[i].number, serial->port[i].number);
39202         }
39203 -       
39204 +
39205         return serial; /* success */
39206  
39207  
39208 @@ -1331,7 +1377,7 @@
39209                 if (port->interrupt_in_buffer)
39210                         kfree (port->interrupt_in_buffer);
39211         }
39212 -               
39213 +
39214         /* return the minor range that this device had */
39215         return_serial (serial);
39216  
39217 @@ -1340,25 +1386,32 @@
39218         return NULL;
39219  }
39220  
39221 -
39222  static void usb_serial_disconnect(struct usb_device *dev, void *ptr)
39223  {
39224         struct usb_serial *serial = (struct usb_serial *) ptr;
39225         struct usb_serial_port *port;
39226         int i;
39227  
39228 +       dbg ("%s", __FUNCTION__);
39229         if (serial) {
39230                 /* fail all future close/read/write/ioctl/etc calls */
39231                 for (i = 0; i < serial->num_ports; ++i) {
39232 -                       if (serial->port[i].tty != NULL)
39233 -                               serial->port[i].tty->driver_data = NULL;
39234 +                       port = &serial->port[i];
39235 +                       down (&port->sem);
39236 +                       if (port->tty != NULL) {
39237 +                               while (port->open_count > 0) {
39238 +                                       __serial_close(port, NULL);
39239 +                               }
39240 +                               port->tty->driver_data = NULL;
39241 +                       }
39242 +                       up (&port->sem);
39243                 }
39244  
39245                 serial->dev = NULL;
39246                 serial_shutdown (serial);
39247  
39248                 for (i = 0; i < serial->num_ports; ++i)
39249 -                       serial->port[i].active = 0;
39250 +                       serial->port[i].open_count = 0;
39251  
39252                 for (i = 0; i < serial->num_bulk_in; ++i) {
39253                         port = &serial->port[i];
39254 @@ -1402,36 +1455,41 @@
39255         } else {
39256                 info("device disconnected");
39257         }
39258 -       
39259 +
39260  }
39261  
39262  
39263  static struct tty_driver serial_tty_driver = {
39264 -       magic:                  TTY_DRIVER_MAGIC,
39265 -       driver_name:            "usb-serial",
39266 -       name:                   "usb/tts/%d",
39267 -       major:                  SERIAL_TTY_MAJOR,
39268 -       minor_start:            0,
39269 -       num:                    SERIAL_TTY_MINORS,
39270 -       type:                   TTY_DRIVER_TYPE_SERIAL,
39271 -       subtype:                SERIAL_TYPE_NORMAL,
39272 -       flags:                  TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS,
39273 -       
39274 -       refcount:               &serial_refcount,
39275 -       table:                  serial_tty,
39276 -       termios:                serial_termios,
39277 -       termios_locked:         serial_termios_locked,
39278 -       
39279 -       open:                   serial_open,
39280 -       close:                  serial_close,
39281 -       write:                  serial_write,
39282 -       write_room:             serial_write_room,
39283 -       ioctl:                  serial_ioctl,
39284 -       set_termios:            serial_set_termios,
39285 -       throttle:               serial_throttle,
39286 -       unthrottle:             serial_unthrottle,
39287 -       break_ctl:              serial_break,
39288 -       chars_in_buffer:        serial_chars_in_buffer,
39289 +       .magic =                TTY_DRIVER_MAGIC,
39290 +       .driver_name =          "usb-serial",
39291 +#ifndef CONFIG_DEVFS_FS
39292 +       .name =                 "ttyUSB",
39293 +#else
39294 +       .name =                 "usb/tts/%d",
39295 +#endif
39296 +       .major =                SERIAL_TTY_MAJOR,
39297 +       .minor_start =          0,
39298 +       .num =                  SERIAL_TTY_MINORS,
39299 +       .type =                 TTY_DRIVER_TYPE_SERIAL,
39300 +       .subtype =              SERIAL_TYPE_NORMAL,
39301 +       .flags =                TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS,
39302 +
39303 +       .refcount =             &serial_refcount,
39304 +       .table =                serial_tty,
39305 +       .termios =              serial_termios,
39306 +       .termios_locked =       serial_termios_locked,
39307 +
39308 +       .open =                 serial_open,
39309 +       .close =                serial_close,
39310 +       .write =                serial_write,
39311 +       .write_room =           serial_write_room,
39312 +       .ioctl =                serial_ioctl,
39313 +       .set_termios =          serial_set_termios,
39314 +       .throttle =             serial_throttle,
39315 +       .unthrottle =           serial_unthrottle,
39316 +       .break_ctl =            serial_break,
39317 +       .chars_in_buffer =      serial_chars_in_buffer,
39318 +       .read_proc =            serial_read_proc,
39319  };
39320  
39321  
39322 @@ -1449,7 +1507,7 @@
39323         serial_tty_driver.init_termios          = tty_std_termios;
39324         serial_tty_driver.init_termios.c_cflag  = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
39325         if (tty_register_driver (&serial_tty_driver)) {
39326 -               err(__FUNCTION__ " - failed to register tty driver");
39327 +               err("%s - failed to register tty driver", __FUNCTION__);
39328                 return -1;
39329         }
39330  
39331 @@ -1526,7 +1584,7 @@
39332  
39333  
39334  
39335 -/* If the usb-serial core is build into the core, the usb-serial drivers
39336 +/* If the usb-serial core is built into the core, the usb-serial drivers
39337     need these symbols to load properly as modules. */
39338  EXPORT_SYMBOL(usb_serial_register);
39339  EXPORT_SYMBOL(usb_serial_deregister);
39340 diff -Nur linux-2.4.19.org/drivers/usb/serial/visor.c linux-2.4.19/drivers/usb/serial/visor.c
39341 --- linux-2.4.19.org/drivers/usb/serial/visor.c Sat Aug  3 02:39:45 2002
39342 +++ linux-2.4.19/drivers/usb/serial/visor.c     Thu Oct 31 08:11:25 2002
39343 @@ -123,18 +123,15 @@
39344  
39345  #include <linux/config.h>
39346  #include <linux/kernel.h>
39347 -#include <linux/sched.h>
39348 -#include <linux/signal.h>
39349  #include <linux/errno.h>
39350 -#include <linux/poll.h>
39351  #include <linux/init.h>
39352  #include <linux/slab.h>
39353 -#include <linux/fcntl.h>
39354  #include <linux/tty.h>
39355  #include <linux/tty_driver.h>
39356  #include <linux/tty_flip.h>
39357  #include <linux/module.h>
39358  #include <linux/spinlock.h>
39359 +#include <asm/uaccess.h>
39360  #include <linux/usb.h>
39361  
39362  #ifdef CONFIG_USB_SERIAL_DEBUG
39363 @@ -149,7 +146,7 @@
39364  /*
39365   * Version Information
39366   */
39367 -#define DRIVER_VERSION "v1.5"
39368 +#define DRIVER_VERSION "v1.6"
39369  #define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>"
39370  #define DRIVER_DESC "USB HandSpring Visor, Palm m50x, Sony Clié driver"
39371  
39372 @@ -170,41 +167,35 @@
39373  static int  clie_3_5_startup   (struct usb_serial *serial);
39374  
39375  
39376 -static __devinitdata struct usb_device_id visor_id_table [] = {
39377 -       { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) },
39378 -       { }                                     /* Terminating entry */
39379 -};
39380 -
39381 -static __devinitdata struct usb_device_id palm_4_0_id_table [] = {
39382 +static struct usb_device_id id_table [] = {
39383         { USB_DEVICE(PALM_VENDOR_ID, PALM_M500_ID) },
39384         { USB_DEVICE(PALM_VENDOR_ID, PALM_M505_ID) },
39385         { USB_DEVICE(PALM_VENDOR_ID, PALM_M515_ID) },
39386 +       { USB_DEVICE(PALM_VENDOR_ID, PALM_I705_ID) },
39387         { USB_DEVICE(PALM_VENDOR_ID, PALM_M125_ID) },
39388         { USB_DEVICE(PALM_VENDOR_ID, PALM_M130_ID) },
39389 -       { USB_DEVICE(PALM_VENDOR_ID, PALM_I705_ID) },
39390 +       { USB_DEVICE(PALM_VENDOR_ID, PALM_ZIRE_ID) },
39391 +       { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) },
39392 +       { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_0_ID) },
39393 +       { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_S360_ID) },
39394 +       { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_1_ID) },
39395         { }                                     /* Terminating entry */
39396  };
39397  
39398 -static __devinitdata struct usb_device_id clie_id_3_5_table [] = {
39399 +static struct usb_device_id clie_id_3_5_table [] = {
39400         { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_3_5_ID) },
39401         { }                                     /* Terminating entry */
39402  };
39403  
39404 -static __devinitdata struct usb_device_id clie_id_4_0_table [] = {
39405 -       { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_0_ID) },
39406 -       { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_S360_ID) },
39407 -       { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_1_ID) },
39408 -       { }                                     /* Terminating entry */
39409 -};
39410 -
39411 -static __devinitdata struct usb_device_id id_table [] = {
39412 +static __devinitdata struct usb_device_id id_table_combined [] = {
39413         { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) },
39414         { USB_DEVICE(PALM_VENDOR_ID, PALM_M500_ID) },
39415         { USB_DEVICE(PALM_VENDOR_ID, PALM_M505_ID) },
39416         { USB_DEVICE(PALM_VENDOR_ID, PALM_M515_ID) },
39417 +       { USB_DEVICE(PALM_VENDOR_ID, PALM_I705_ID) },
39418         { USB_DEVICE(PALM_VENDOR_ID, PALM_M125_ID) },
39419         { USB_DEVICE(PALM_VENDOR_ID, PALM_M130_ID) },
39420 -       { USB_DEVICE(PALM_VENDOR_ID, PALM_I705_ID) },
39421 +       { USB_DEVICE(PALM_VENDOR_ID, PALM_ZIRE_ID) },
39422         { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_3_5_ID) },
39423         { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_0_ID) },
39424         { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_S360_ID) },
39425 @@ -212,113 +203,57 @@
39426         { }                                     /* Terminating entry */
39427  };
39428  
39429 -MODULE_DEVICE_TABLE (usb, id_table);
39430 +MODULE_DEVICE_TABLE (usb, id_table_combined);
39431  
39432  
39433  
39434 -/* All of the device info needed for the Handspring Visor */
39435 +/* All of the device info needed for the Handspring Visor, and Palm 4.0 devices */
39436  static struct usb_serial_device_type handspring_device = {
39437 -       name:                   "Handspring Visor",
39438 -       id_table:               visor_id_table,
39439 -       needs_interrupt_in:     MUST_HAVE_NOT,          /* this device must not have an interrupt in endpoint */
39440 -       needs_bulk_in:          MUST_HAVE,              /* this device must have a bulk in endpoint */
39441 -       needs_bulk_out:         MUST_HAVE,              /* this device must have a bulk out endpoint */
39442 -       num_interrupt_in:       0,
39443 -       num_bulk_in:            2,
39444 -       num_bulk_out:           2,
39445 -       num_ports:              2,
39446 -       open:                   visor_open,
39447 -       close:                  visor_close,
39448 -       throttle:               visor_throttle,
39449 -       unthrottle:             visor_unthrottle,
39450 -       startup:                visor_startup,
39451 -       shutdown:               visor_shutdown,
39452 -       ioctl:                  visor_ioctl,
39453 -       set_termios:            visor_set_termios,
39454 -       write:                  visor_write,
39455 -       write_room:             visor_write_room,
39456 -       chars_in_buffer:        visor_chars_in_buffer,
39457 -       write_bulk_callback:    visor_write_bulk_callback,
39458 -       read_bulk_callback:     visor_read_bulk_callback,
39459 +       .owner =                THIS_MODULE,
39460 +       .name =                 "Handspring Visor / Palm 4.0 / Clié 4.x",
39461 +       .id_table =             id_table,
39462 +       .num_interrupt_in =     0,
39463 +       .num_bulk_in =          2,
39464 +       .num_bulk_out =         2,
39465 +       .num_ports =            2,
39466 +       .open =                 visor_open,
39467 +       .close =                visor_close,
39468 +       .throttle =             visor_throttle,
39469 +       .unthrottle =           visor_unthrottle,
39470 +       .startup =              visor_startup,
39471 +       .shutdown =             visor_shutdown,
39472 +       .ioctl =                visor_ioctl,
39473 +       .set_termios =          visor_set_termios,
39474 +       .write =                visor_write,
39475 +       .write_room =           visor_write_room,
39476 +       .chars_in_buffer =      visor_chars_in_buffer,
39477 +       .write_bulk_callback =  visor_write_bulk_callback,
39478 +       .read_bulk_callback =   visor_read_bulk_callback,
39479  };
39480  
39481 -/* device info for the Palm 4.0 devices */
39482 -static struct usb_serial_device_type palm_4_0_device = {
39483 -       name:                   "Palm 4.0",
39484 -       id_table:               palm_4_0_id_table,
39485 -       needs_interrupt_in:     MUST_HAVE_NOT,          /* this device must not have an interrupt in endpoint */
39486 -       needs_bulk_in:          MUST_HAVE,              /* this device must have a bulk in endpoint */
39487 -       needs_bulk_out:         MUST_HAVE,              /* this device must have a bulk out endpoint */
39488 -       num_interrupt_in:       0,
39489 -       num_bulk_in:            2,
39490 -       num_bulk_out:           2,
39491 -       num_ports:              2,
39492 -       open:                   visor_open,
39493 -       close:                  visor_close,
39494 -       throttle:               visor_throttle,
39495 -       unthrottle:             visor_unthrottle,
39496 -       startup:                visor_startup,
39497 -       shutdown:               visor_shutdown,
39498 -       ioctl:                  visor_ioctl,
39499 -       set_termios:            visor_set_termios,
39500 -       write:                  visor_write,
39501 -       write_room:             visor_write_room,
39502 -       chars_in_buffer:        visor_chars_in_buffer,
39503 -       write_bulk_callback:    visor_write_bulk_callback,
39504 -       read_bulk_callback:     visor_read_bulk_callback,
39505 -};
39506 -
39507 -
39508  /* device info for the Sony Clie OS version 3.5 */
39509  static struct usb_serial_device_type clie_3_5_device = {
39510 -       name:                   "Sony Clié 3.5",
39511 -       id_table:               clie_id_3_5_table,
39512 -       needs_interrupt_in:     MUST_HAVE_NOT,          /* this device must not have an interrupt in endpoint */
39513 -       needs_bulk_in:          MUST_HAVE,              /* this device must have a bulk in endpoint */
39514 -       needs_bulk_out:         MUST_HAVE,              /* this device must have a bulk out endpoint */
39515 -       num_interrupt_in:       0,
39516 -       num_bulk_in:            1,
39517 -       num_bulk_out:           1,
39518 -       num_ports:              1,
39519 -       open:                   visor_open,
39520 -       close:                  visor_close,
39521 -       throttle:               visor_throttle,
39522 -       unthrottle:             visor_unthrottle,
39523 -       startup:                clie_3_5_startup,
39524 -       ioctl:                  visor_ioctl,
39525 -       set_termios:            visor_set_termios,
39526 -       write:                  visor_write,
39527 -       write_room:             visor_write_room,
39528 -       chars_in_buffer:        visor_chars_in_buffer,
39529 -       write_bulk_callback:    visor_write_bulk_callback,
39530 -       read_bulk_callback:     visor_read_bulk_callback,
39531 +       .owner =                THIS_MODULE,
39532 +       .name =                 "Sony Clié 3.5",
39533 +       .id_table =             clie_id_3_5_table,
39534 +       .num_interrupt_in =     0,
39535 +       .num_bulk_in =          1,
39536 +       .num_bulk_out =         1,
39537 +       .num_ports =            1,
39538 +       .open =                 visor_open,
39539 +       .close =                visor_close,
39540 +       .throttle =             visor_throttle,
39541 +       .unthrottle =           visor_unthrottle,
39542 +       .startup =              clie_3_5_startup,
39543 +       .ioctl =                visor_ioctl,
39544 +       .set_termios =          visor_set_termios,
39545 +       .write =                visor_write,
39546 +       .write_room =           visor_write_room,
39547 +       .chars_in_buffer =      visor_chars_in_buffer,
39548 +       .write_bulk_callback =  visor_write_bulk_callback,
39549 +       .read_bulk_callback =   visor_read_bulk_callback,
39550  };
39551  
39552 -/* device info for the Sony Clie OS version 4.0 */
39553 -static struct usb_serial_device_type clie_4_0_device = {
39554 -       name:                   "Sony Clié 4.x",
39555 -       id_table:               clie_id_4_0_table,
39556 -       needs_interrupt_in:     MUST_HAVE_NOT,          /* this device must not have an interrupt in endpoint */
39557 -       needs_bulk_in:          MUST_HAVE,              /* this device must have a bulk in endpoint */
39558 -       needs_bulk_out:         MUST_HAVE,              /* this device must have a bulk out endpoint */
39559 -       num_interrupt_in:       0,
39560 -       num_bulk_in:            2,
39561 -       num_bulk_out:           2,
39562 -       num_ports:              2,
39563 -       open:                   visor_open,
39564 -       close:                  visor_close,
39565 -       throttle:               visor_throttle,
39566 -       unthrottle:             visor_unthrottle,
39567 -       startup:                visor_startup,
39568 -       shutdown:               visor_shutdown,
39569 -       ioctl:                  visor_ioctl,
39570 -       set_termios:            visor_set_termios,
39571 -       write:                  visor_write,
39572 -       write_room:             visor_write_room,
39573 -       chars_in_buffer:        visor_chars_in_buffer,
39574 -       write_bulk_callback:    visor_write_bulk_callback,
39575 -       read_bulk_callback:     visor_read_bulk_callback,
39576 -};
39577  
39578  #define NUM_URBS                       24
39579  #define URB_TRANSFER_BUFFER_SIZE       768
39580 @@ -339,39 +274,35 @@
39581         if (port_paranoia_check (port, __FUNCTION__))
39582                 return -ENODEV;
39583         
39584 -       dbg(__FUNCTION__ " - port %d", port->number);
39585 +       dbg("%s - port %d", __FUNCTION__, port->number);
39586  
39587         if (!port->read_urb) {
39588 +               /* this is needed for some brain dead Sony devices */
39589                 err ("Device lied about number of ports, please use a lower one.");
39590                 return -ENODEV;
39591         }
39592  
39593 -       down (&port->sem);
39594 -       
39595 -       ++port->open_count;
39596 -       MOD_INC_USE_COUNT;
39597 -       
39598 -       if (!port->active) {
39599 -               port->active = 1;
39600 -               bytes_in = 0;
39601 -               bytes_out = 0;
39602 -
39603 -               /* force low_latency on so that our tty_push actually forces the data through, 
39604 -                  otherwise it is scheduled, and with high data rates (like with OHCI) data
39605 -                  can get lost. */
39606 +       bytes_in = 0;
39607 +       bytes_out = 0;
39608 +
39609 +       /*
39610 +        * Force low_latency on so that our tty_push actually forces the data
39611 +        * through, otherwise it is scheduled, and with high data rates (like
39612 +        * with OHCI) data can get lost.
39613 +        */
39614 +       if (port->tty)
39615                 port->tty->low_latency = 1;
39616 -               
39617 -               /* Start reading from the device */
39618 -               FILL_BULK_URB(port->read_urb, serial->dev, 
39619 -                             usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
39620 -                             port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
39621 -                             visor_read_bulk_callback, port);
39622 -               result = usb_submit_urb(port->read_urb);
39623 -               if (result)
39624 -                       err(__FUNCTION__ " - failed submitting read urb, error %d", result);
39625 -       }
39626 -       
39627 -       up (&port->sem);
39628 +
39629 +       /* Start reading from the device */
39630 +       usb_fill_bulk_urb (port->read_urb, serial->dev,
39631 +                          usb_rcvbulkpipe (serial->dev, 
39632 +                                           port->bulk_in_endpointAddress),
39633 +                          port->read_urb->transfer_buffer,
39634 +                          port->read_urb->transfer_buffer_length,
39635 +                          visor_read_bulk_callback, port);
39636 +       result = usb_submit_urb(port->read_urb);
39637 +       if (result)
39638 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
39639         
39640         return result;
39641  }
39642 @@ -385,44 +316,32 @@
39643         if (port_paranoia_check (port, __FUNCTION__))
39644                 return;
39645         
39646 -       dbg(__FUNCTION__ " - port %d", port->number);
39647 +       dbg("%s - port %d", __FUNCTION__, port->number);
39648                          
39649         serial = get_usb_serial (port, __FUNCTION__);
39650         if (!serial)
39651                 return;
39652         
39653 -       down (&port->sem);
39654 -
39655 -       --port->open_count;
39656 -
39657 -       if (port->open_count <= 0) {
39658 -               if (serial->dev) {
39659 -                       /* only send a shutdown message if the 
39660 -                        * device is still here */
39661 -                       transfer_buffer =  kmalloc (0x12, GFP_KERNEL);
39662 -                       if (!transfer_buffer) {
39663 -                               err(__FUNCTION__ " - kmalloc(%d) failed.", 0x12);
39664 -                       } else {
39665 -                               /* send a shutdown message to the device */
39666 -                               usb_control_msg (serial->dev,
39667 -                                                usb_rcvctrlpipe(serial->dev, 0),
39668 -                                                VISOR_CLOSE_NOTIFICATION, 0xc2,
39669 -                                                0x0000, 0x0000, 
39670 -                                                transfer_buffer, 0x12, 300);
39671 -                               kfree (transfer_buffer);
39672 -                       }
39673 -                       /* shutdown our bulk read */
39674 -                       usb_unlink_urb (port->read_urb);
39675 +       if (serial->dev) {
39676 +               /* only send a shutdown message if the 
39677 +                * device is still here */
39678 +               transfer_buffer =  kmalloc (0x12, GFP_KERNEL);
39679 +               if (!transfer_buffer) {
39680 +                       err("%s - kmalloc(%d) failed.", __FUNCTION__, 0x12);
39681 +               } else {
39682 +                       /* send a shutdown message to the device */
39683 +                       usb_control_msg (serial->dev,
39684 +                                        usb_rcvctrlpipe(serial->dev, 0),
39685 +                                        VISOR_CLOSE_NOTIFICATION, 0xc2,
39686 +                                        0x0000, 0x0000, 
39687 +                                        transfer_buffer, 0x12, 300);
39688 +                       kfree (transfer_buffer);
39689                 }
39690 -               port->active = 0;
39691 -               port->open_count = 0;
39692 +               /* shutdown our bulk read */
39693 +               usb_unlink_urb (port->read_urb);
39694         }
39695 -       up (&port->sem);
39696 -
39697         /* Uncomment the following line if you want to see some statistics in your syslog */
39698         /* info ("Bytes In = %d  Bytes Out = %d", bytes_in, bytes_out); */
39699 -
39700 -       MOD_DEC_USE_COUNT;
39701  }
39702  
39703  
39704 @@ -437,7 +356,7 @@
39705         int bytes_sent = 0;
39706         int transfer_size;
39707  
39708 -       dbg(__FUNCTION__ " - port %d", port->number);
39709 +       dbg("%s - port %d", __FUNCTION__, port->number);
39710  
39711         while (count > 0) {
39712                 /* try to find a free urb in our list of them */
39713 @@ -451,13 +370,13 @@
39714                 }
39715                 spin_unlock_irqrestore (&write_urb_pool_lock, flags);
39716                 if (urb == NULL) {
39717 -                       dbg (__FUNCTION__ " - no more free urbs");
39718 +                       dbg("%s - no more free urbs", __FUNCTION__);
39719                         goto exit;
39720                 }
39721                 if (urb->transfer_buffer == NULL) {
39722                         urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
39723                         if (urb->transfer_buffer == NULL) {
39724 -                               err(__FUNCTION__" no more kernel memory...");
39725 +                               err("%s no more kernel memory...", __FUNCTION__);
39726                                 goto exit;
39727                         }
39728                 }
39729 @@ -482,7 +401,7 @@
39730                 /* send it down the pipe */
39731                 status = usb_submit_urb(urb);
39732                 if (status) {
39733 -                       err(__FUNCTION__ " - usb_submit_urb(write bulk) failed with status = %d", status);
39734 +                       err("%s - usb_submit_urb(write bulk) failed with status = %d", __FUNCTION__, status);
39735                         bytes_sent = status;
39736                         break;
39737                 }
39738 @@ -504,7 +423,7 @@
39739         int i;
39740         int room = 0;
39741  
39742 -       dbg(__FUNCTION__ " - port %d", port->number);
39743 +       dbg("%s - port %d", __FUNCTION__, port->number);
39744         
39745         spin_lock_irqsave (&write_urb_pool_lock, flags);
39746  
39747 @@ -516,7 +435,7 @@
39748         
39749         spin_unlock_irqrestore (&write_urb_pool_lock, flags);
39750         
39751 -       dbg(__FUNCTION__ " - returns %d", room);
39752 +       dbg("%s - returns %d", __FUNCTION__, room);
39753         return (room);
39754  }
39755  
39756 @@ -527,7 +446,7 @@
39757         int i;
39758         int chars = 0;
39759  
39760 -       dbg(__FUNCTION__ " - port %d", port->number);
39761 +       dbg("%s - port %d", __FUNCTION__, port->number);
39762         
39763         spin_lock_irqsave (&write_urb_pool_lock, flags);
39764  
39765 @@ -539,7 +458,7 @@
39766         
39767         spin_unlock_irqrestore (&write_urb_pool_lock, flags);
39768  
39769 -       dbg (__FUNCTION__ " - returns %d", chars);
39770 +       dbg("%s - returns %d", __FUNCTION__, chars);
39771         return (chars);
39772  }
39773  
39774 @@ -551,16 +470,16 @@
39775         if (port_paranoia_check (port, __FUNCTION__))
39776                 return;
39777         
39778 -       dbg(__FUNCTION__ " - port %d", port->number);
39779 +       dbg("%s - port %d", __FUNCTION__, port->number);
39780         
39781         if (urb->status) {
39782 -               dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
39783 +               dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
39784                 return;
39785         }
39786  
39787         queue_task(&port->tqueue, &tq_immediate);
39788         mark_bh(IMMEDIATE_BH);
39789 -       
39790 +
39791         return;
39792  }
39793  
39794 @@ -577,22 +496,22 @@
39795         if (port_paranoia_check (port, __FUNCTION__))
39796                 return;
39797  
39798 -       dbg(__FUNCTION__ " - port %d", port->number);
39799 +       dbg("%s - port %d", __FUNCTION__, port->number);
39800  
39801         if (!serial) {
39802 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
39803 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
39804                 return;
39805         }
39806  
39807         if (urb->status) {
39808 -               dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
39809 +               dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
39810                 return;
39811         }
39812  
39813         usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
39814  
39815         tty = port->tty;
39816 -       if (urb->actual_length) {
39817 +       if (tty && urb->actual_length) {
39818                 for (i = 0; i < urb->actual_length ; ++i) {
39819                         /* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */
39820                         if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
39821 @@ -606,29 +525,23 @@
39822         }
39823  
39824         /* Continue trying to always read  */
39825 -       FILL_BULK_URB(port->read_urb, serial->dev, 
39826 -                     usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
39827 -                     port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
39828 -                     visor_read_bulk_callback, port);
39829 +       usb_fill_bulk_urb (port->read_urb, serial->dev,
39830 +                          usb_rcvbulkpipe (serial->dev,
39831 +                                           port->bulk_in_endpointAddress),
39832 +                          port->read_urb->transfer_buffer,
39833 +                          port->read_urb->transfer_buffer_length,
39834 +                          visor_read_bulk_callback, port);
39835         result = usb_submit_urb(port->read_urb);
39836         if (result)
39837 -               err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
39838 +               err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
39839         return;
39840  }
39841  
39842  
39843  static void visor_throttle (struct usb_serial_port *port)
39844  {
39845 -
39846 -       dbg(__FUNCTION__ " - port %d", port->number);
39847 -
39848 -       down (&port->sem);
39849 -
39850 +       dbg("%s - port %d", __FUNCTION__, port->number);
39851         usb_unlink_urb (port->read_urb);
39852 -
39853 -       up (&port->sem);
39854 -
39855 -       return;
39856  }
39857  
39858  
39859 @@ -636,42 +549,35 @@
39860  {
39861         int result;
39862  
39863 -       dbg(__FUNCTION__ " - port %d", port->number);
39864 -
39865 -       down (&port->sem);
39866 +       dbg("%s - port %d", __FUNCTION__, port->number);
39867  
39868         port->read_urb->dev = port->serial->dev;
39869         result = usb_submit_urb(port->read_urb);
39870         if (result)
39871 -               err(__FUNCTION__ " - failed submitting read urb, error %d", result);
39872 -
39873 -       up (&port->sem);
39874 -
39875 -       return;
39876 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
39877  }
39878  
39879 -
39880 -static int  visor_startup (struct usb_serial *serial)
39881 +static int visor_startup (struct usb_serial *serial)
39882  {
39883         int response;
39884         int i;
39885         unsigned char *transfer_buffer =  kmalloc (256, GFP_KERNEL);
39886  
39887         if (!transfer_buffer) {
39888 -               err(__FUNCTION__ " - kmalloc(%d) failed.", 256);
39889 +               err("%s - kmalloc(%d) failed.", __FUNCTION__, 256);
39890                 return -ENOMEM;
39891         }
39892  
39893 -       dbg(__FUNCTION__);
39894 +       dbg("%s", __FUNCTION__);
39895  
39896 -       dbg(__FUNCTION__ " - Set config to 1");
39897 +       dbg("%s - Set config to 1", __FUNCTION__);
39898         usb_set_configuration (serial->dev, 1);
39899  
39900         /* send a get connection info request */
39901         response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_GET_CONNECTION_INFORMATION,
39902                                         0xc2, 0x0000, 0x0000, transfer_buffer, 0x12, 300);
39903         if (response < 0) {
39904 -               err(__FUNCTION__ " - error getting connection information");
39905 +               err("%s - error getting connection information", __FUNCTION__);
39906         } else {
39907                 struct visor_connection_info *connection_info = (struct visor_connection_info *)transfer_buffer;
39908                 char *string;
39909 @@ -699,7 +605,8 @@
39910                                         string = "unknown";
39911                                         break;  
39912                         }
39913 -                       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);
39914 +                       info("%s: port %d, is for %s use and is bound to ttyUSB%d", serial->type->name,
39915 +                            connection_info->connections[i].port, string, serial->minor + i);
39916                 }
39917         }
39918  
39919 @@ -712,7 +619,7 @@
39920                                             0xc2, 0x0000, 0x0000, transfer_buffer, 
39921                                             0x14, 300);
39922                 if (response < 0) {
39923 -                       err(__FUNCTION__ " - error getting first unknown palm command");
39924 +                       err("%s - error getting first unknown palm command", __FUNCTION__);
39925                 } else {
39926                         usb_serial_debug_data (__FILE__, __FUNCTION__, 0x14, transfer_buffer);
39927                 }
39928 @@ -721,7 +628,7 @@
39929                                             0xc2, 0x0000, 0x0000, transfer_buffer, 
39930                                             0x14, 300);
39931                 if (response < 0) {
39932 -                       err(__FUNCTION__ " - error getting second unknown palm command");
39933 +                       err("%s - error getting second unknown palm command", __FUNCTION__);
39934                 } else {
39935                         usb_serial_debug_data (__FILE__, __FUNCTION__, 0x14, transfer_buffer);
39936                 }
39937 @@ -731,7 +638,7 @@
39938         response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_REQUEST_BYTES_AVAILABLE,
39939                                         0xc2, 0x0000, 0x0005, transfer_buffer, 0x02, 300);
39940         if (response < 0) {
39941 -               err(__FUNCTION__ " - error getting bytes available request");
39942 +               err("%s - error getting bytes available request", __FUNCTION__);
39943         }
39944  
39945         kfree (transfer_buffer);
39946 @@ -745,7 +652,7 @@
39947         int result;
39948         u8 data;
39949  
39950 -       dbg(__FUNCTION__);
39951 +       dbg("%s", __FUNCTION__);
39952  
39953         /*
39954          * Note that PEG-300 series devices expect the following two calls.
39955 @@ -756,11 +663,11 @@
39956                                   USB_REQ_GET_CONFIGURATION, USB_DIR_IN,
39957                                   0, 0, &data, 1, HZ * 3);
39958         if (result < 0) {
39959 -               err(__FUNCTION__ ": get config number failed: %d", result);
39960 +               err("%s: get config number failed: %d", __FUNCTION__, result);
39961                 return result;
39962         }
39963         if (result != 1) {
39964 -               err(__FUNCTION__ ": get config number bad return length: %d", result);
39965 +               err("%s: get config number bad return length: %d", __FUNCTION__, result);
39966                 return -EIO;
39967         }
39968  
39969 @@ -770,11 +677,11 @@
39970                                   USB_DIR_IN | USB_DT_DEVICE,
39971                                   0, 0, &data, 1, HZ * 3);
39972         if (result < 0) {
39973 -               err(__FUNCTION__ ": get interface number failed: %d", result);
39974 +               err("%s: get interface number failed: %d", __FUNCTION__, result);
39975                 return result;
39976         }
39977         if (result != 1) {
39978 -               err(__FUNCTION__ ": get interface number bad return length: %d", result);
39979 +               err("%s: get interface number bad return length: %d", __FUNCTION__, result);
39980                 return -EIO;
39981         }
39982  
39983 @@ -783,21 +690,12 @@
39984  
39985  static void visor_shutdown (struct usb_serial *serial)
39986  {
39987 -       int i;
39988 -
39989 -       dbg (__FUNCTION__);
39990 -
39991 -       /* stop reads and writes on all ports */
39992 -       for (i=0; i < serial->num_ports; ++i) {
39993 -               serial->port[i].active = 0;
39994 -               serial->port[i].open_count = 0;
39995 -       }
39996 +       dbg("%s", __FUNCTION__);
39997  }
39998  
39999 -
40000  static int visor_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
40001  {
40002 -       dbg(__FUNCTION__ " - port %d, cmd 0x%.4x", port->number, cmd);
40003 +       dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
40004  
40005         return -ENOIOCTLCMD;
40006  }
40007 @@ -808,10 +706,10 @@
40008  {
40009         unsigned int cflag;
40010  
40011 -       dbg(__FUNCTION__ " - port %d", port->number);
40012 +       dbg("%s - port %d", __FUNCTION__, port->number);
40013  
40014         if ((!port->tty) || (!port->tty->termios)) {
40015 -               dbg(__FUNCTION__" - no tty structures");
40016 +               dbg("%s - no tty structures", __FUNCTION__);
40017                 return;
40018         }
40019  
40020 @@ -820,50 +718,51 @@
40021         if (old_termios) {
40022                 if ((cflag == old_termios->c_cflag) &&
40023                     (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
40024 -                       dbg(__FUNCTION__ " - nothing to change...");
40025 +                       dbg("%s - nothing to change...", __FUNCTION__);
40026                         return;
40027                 }
40028         }
40029  
40030         /* get the byte size */
40031         switch (cflag & CSIZE) {
40032 -               case CS5:       dbg(__FUNCTION__ " - data bits = 5");   break;
40033 -               case CS6:       dbg(__FUNCTION__ " - data bits = 6");   break;
40034 -               case CS7:       dbg(__FUNCTION__ " - data bits = 7");   break;
40035 +               case CS5:       dbg("%s - data bits = 5", __FUNCTION__);   break;
40036 +               case CS6:       dbg("%s - data bits = 6", __FUNCTION__);   break;
40037 +               case CS7:       dbg("%s - data bits = 7", __FUNCTION__);   break;
40038                 default:
40039 -               case CS8:       dbg(__FUNCTION__ " - data bits = 8");   break;
40040 +               case CS8:       dbg("%s - data bits = 8", __FUNCTION__);   break;
40041         }
40042         
40043         /* determine the parity */
40044         if (cflag & PARENB)
40045                 if (cflag & PARODD)
40046 -                       dbg(__FUNCTION__ " - parity = odd");
40047 +                       dbg("%s - parity = odd", __FUNCTION__);
40048                 else
40049 -                       dbg(__FUNCTION__ " - parity = even");
40050 +                       dbg("%s - parity = even", __FUNCTION__);
40051         else
40052 -               dbg(__FUNCTION__ " - parity = none");
40053 +               dbg("%s - parity = none", __FUNCTION__);
40054  
40055         /* figure out the stop bits requested */
40056         if (cflag & CSTOPB)
40057 -               dbg(__FUNCTION__ " - stop bits = 2");
40058 +               dbg("%s - stop bits = 2", __FUNCTION__);
40059         else
40060 -               dbg(__FUNCTION__ " - stop bits = 1");
40061 +               dbg("%s - stop bits = 1", __FUNCTION__);
40062  
40063         
40064         /* figure out the flow control settings */
40065         if (cflag & CRTSCTS)
40066 -               dbg(__FUNCTION__ " - RTS/CTS is enabled");
40067 +               dbg("%s - RTS/CTS is enabled", __FUNCTION__);
40068         else
40069 -               dbg(__FUNCTION__ " - RTS/CTS is disabled");
40070 +               dbg("%s - RTS/CTS is disabled", __FUNCTION__);
40071         
40072         /* determine software flow control */
40073         if (I_IXOFF(port->tty))
40074 -               dbg(__FUNCTION__ " - XON/XOFF is enabled, XON = %2x, XOFF = %2x", START_CHAR(port->tty), STOP_CHAR(port->tty));
40075 +               dbg("%s - XON/XOFF is enabled, XON = %2x, XOFF = %2x",
40076 +                   __FUNCTION__, START_CHAR(port->tty), STOP_CHAR(port->tty));
40077         else
40078 -               dbg(__FUNCTION__ " - XON/XOFF is disabled");
40079 +               dbg("%s - XON/XOFF is disabled", __FUNCTION__);
40080  
40081         /* get the baud rate wanted */
40082 -       dbg(__FUNCTION__ " - baud rate = %d", tty_get_baud_rate(port->tty));
40083 +       dbg("%s - baud rate = %d", __FUNCTION__, tty_get_baud_rate(port->tty));
40084  
40085         return;
40086  }
40087 @@ -875,9 +774,7 @@
40088         int i;
40089  
40090         usb_serial_register (&handspring_device);
40091 -       usb_serial_register (&palm_4_0_device);
40092         usb_serial_register (&clie_3_5_device);
40093 -       usb_serial_register (&clie_4_0_device);
40094         
40095         /* create our write urb pool and transfer buffers */ 
40096         spin_lock_init (&write_urb_pool_lock);
40097 @@ -892,7 +789,7 @@
40098                 urb->transfer_buffer = NULL;
40099                 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
40100                 if (!urb->transfer_buffer) {
40101 -                       err (__FUNCTION__ " - out of memory for urb buffers.");
40102 +                       err("%s - out of memory for urb buffers.", __FUNCTION__);
40103                         continue;
40104                 }
40105         }
40106 @@ -909,9 +806,7 @@
40107         unsigned long flags;
40108  
40109         usb_serial_deregister (&handspring_device);
40110 -       usb_serial_deregister (&palm_4_0_device);
40111         usb_serial_deregister (&clie_3_5_device);
40112 -       usb_serial_deregister (&clie_4_0_device);
40113  
40114         spin_lock_irqsave (&write_urb_pool_lock, flags);
40115  
40116 diff -Nur linux-2.4.19.org/drivers/usb/serial/visor.h linux-2.4.19/drivers/usb/serial/visor.h
40117 --- linux-2.4.19.org/drivers/usb/serial/visor.h Sat Aug  3 02:39:45 2002
40118 +++ linux-2.4.19/drivers/usb/serial/visor.h     Thu Oct 31 08:11:25 2002
40119 @@ -27,6 +27,7 @@
40120  #define PALM_I705_ID                   0x0020
40121  #define PALM_M125_ID                   0x0040
40122  #define PALM_M130_ID                   0x0050
40123 +#define PALM_ZIRE_ID                   0x0070
40124  
40125  #define SONY_VENDOR_ID                 0x054C
40126  #define SONY_CLIE_3_5_ID               0x0038
40127 diff -Nur linux-2.4.19.org/drivers/usb/serial/whiteheat.c linux-2.4.19/drivers/usb/serial/whiteheat.c
40128 --- linux-2.4.19.org/drivers/usb/serial/whiteheat.c     Sat Aug  3 02:39:45 2002
40129 +++ linux-2.4.19/drivers/usb/serial/whiteheat.c Thu Oct 31 08:11:26 2002
40130 @@ -61,18 +61,15 @@
40131  
40132  #include <linux/config.h>
40133  #include <linux/kernel.h>
40134 -#include <linux/sched.h>
40135 -#include <linux/signal.h>
40136  #include <linux/errno.h>
40137 -#include <linux/poll.h>
40138  #include <linux/init.h>
40139  #include <linux/slab.h>
40140 -#include <linux/fcntl.h>
40141  #include <linux/tty.h>
40142  #include <linux/tty_driver.h>
40143  #include <linux/tty_flip.h>
40144  #include <linux/module.h>
40145  #include <linux/spinlock.h>
40146 +#include <asm/uaccess.h>
40147  #include <linux/usb.h>
40148  
40149  #ifdef CONFIG_USB_SERIAL_DEBUG
40150 @@ -103,12 +100,12 @@
40151     separate ID tables, and then a third table that combines them
40152     just for the purpose of exporting the autoloading information.
40153  */
40154 -static __devinitdata struct usb_device_id id_table_std [] = {
40155 +static struct usb_device_id id_table_std [] = {
40156         { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_WHITE_HEAT_ID) },
40157         { }                                             /* Terminating entry */
40158  };
40159  
40160 -static __devinitdata struct usb_device_id id_table_prerenumeration [] = {
40161 +static struct usb_device_id id_table_prerenumeration [] = {
40162         { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_FAKE_WHITE_HEAT_ID) },
40163         { }                                             /* Terminating entry */
40164  };
40165 @@ -133,36 +130,32 @@
40166  static void whiteheat_real_shutdown    (struct usb_serial *serial);
40167  
40168  static struct usb_serial_device_type whiteheat_fake_device = {
40169 -       name:                   "Connect Tech - WhiteHEAT - (prerenumeration)",
40170 -       id_table:               id_table_prerenumeration,
40171 -       needs_interrupt_in:     DONT_CARE,                              /* don't have to have an interrupt in endpoint */
40172 -       needs_bulk_in:          DONT_CARE,                              /* don't have to have a bulk in endpoint */
40173 -       needs_bulk_out:         DONT_CARE,                              /* don't have to have a bulk out endpoint */
40174 -       num_interrupt_in:       NUM_DONT_CARE,
40175 -       num_bulk_in:            NUM_DONT_CARE,
40176 -       num_bulk_out:           NUM_DONT_CARE,
40177 -       num_ports:              1,
40178 -       startup:                whiteheat_fake_startup,
40179 +       .owner =                THIS_MODULE,
40180 +       .name =                 "Connect Tech - WhiteHEAT - (prerenumeration)",
40181 +       .id_table =             id_table_prerenumeration,
40182 +       .num_interrupt_in =     NUM_DONT_CARE,
40183 +       .num_bulk_in =          NUM_DONT_CARE,
40184 +       .num_bulk_out =         NUM_DONT_CARE,
40185 +       .num_ports =            1,
40186 +       .startup =              whiteheat_fake_startup,
40187  };
40188  
40189  static struct usb_serial_device_type whiteheat_device = {
40190 -       name:                   "Connect Tech - WhiteHEAT",
40191 -       id_table:               id_table_std,
40192 -       needs_interrupt_in:     DONT_CARE,                              /* don't have to have an interrupt in endpoint */
40193 -       needs_bulk_in:          DONT_CARE,                              /* don't have to have a bulk in endpoint */
40194 -       needs_bulk_out:         DONT_CARE,                              /* don't have to have a bulk out endpoint */
40195 -       num_interrupt_in:       NUM_DONT_CARE,
40196 -       num_bulk_in:            NUM_DONT_CARE,
40197 -       num_bulk_out:           NUM_DONT_CARE,
40198 -       num_ports:              4,
40199 -       open:                   whiteheat_open,
40200 -       close:                  whiteheat_close,
40201 -       throttle:               whiteheat_throttle,
40202 -       unthrottle:             whiteheat_unthrottle,
40203 -       ioctl:                  whiteheat_ioctl,
40204 -       set_termios:            whiteheat_set_termios,
40205 -       startup:                whiteheat_real_startup,
40206 -       shutdown:               whiteheat_real_shutdown,
40207 +       .owner =                THIS_MODULE,
40208 +       .name =                 "Connect Tech - WhiteHEAT",
40209 +       .id_table =             id_table_std,
40210 +       .num_interrupt_in =     NUM_DONT_CARE,
40211 +       .num_bulk_in =          NUM_DONT_CARE,
40212 +       .num_bulk_out =         NUM_DONT_CARE,
40213 +       .num_ports =            4,
40214 +       .open =                 whiteheat_open,
40215 +       .close =                whiteheat_close,
40216 +       .throttle =             whiteheat_throttle,
40217 +       .unthrottle =           whiteheat_unthrottle,
40218 +       .ioctl =                whiteheat_ioctl,
40219 +       .set_termios =          whiteheat_set_termios,
40220 +       .startup =              whiteheat_real_startup,
40221 +       .shutdown =             whiteheat_real_shutdown,
40222  };
40223  
40224  struct whiteheat_private {
40225 @@ -186,7 +179,7 @@
40226   *****************************************************************************/
40227  static void command_port_write_callback (struct urb *urb)
40228  {
40229 -       dbg (__FUNCTION__);
40230 +       dbg("%s", __FUNCTION__);
40231  
40232         if (urb->status) {
40233                 dbg ("nonzero urb status: %d", urb->status);
40234 @@ -207,15 +200,15 @@
40235         unsigned char *data = urb->transfer_buffer;
40236         int result;
40237  
40238 -       dbg (__FUNCTION__);
40239 +       dbg("%s", __FUNCTION__);
40240  
40241         if (urb->status) {
40242 -               dbg (__FUNCTION__ " - nonzero urb status: %d", urb->status);
40243 +               dbg("%s - nonzero urb status: %d", __FUNCTION__, urb->status);
40244                 return;
40245         }
40246  
40247         if (!serial) {
40248 -               dbg(__FUNCTION__ " - bad serial pointer, exiting");
40249 +               dbg("%s - bad serial pointer, exiting", __FUNCTION__);
40250                 return;
40251         }
40252         
40253 @@ -223,7 +216,7 @@
40254  
40255         info = (struct whiteheat_private *)port->private;
40256         if (!info) {
40257 -               dbg (__FUNCTION__ " - info is NULL, exiting.");
40258 +               dbg("%s - info is NULL, exiting.", __FUNCTION__);
40259                 return;
40260         }
40261  
40262 @@ -246,7 +239,7 @@
40263                       command_port_read_callback, port);
40264         result = usb_submit_urb(port->read_urb);
40265         if (result)
40266 -               dbg(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
40267 +               dbg("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
40268  }
40269  
40270  
40271 @@ -258,7 +251,7 @@
40272         __u8 *transfer_buffer;
40273         int retval = 0;
40274  
40275 -       dbg(__FUNCTION__" - command %d", command);
40276 +       dbg("%s - command %d", __FUNCTION__, command);
40277  
40278         port = &serial->port[COMMAND_PORT];
40279         info = (struct whiteheat_private *)port->private;
40280 @@ -271,7 +264,7 @@
40281         port->write_urb->dev = serial->dev;
40282         retval = usb_submit_urb (port->write_urb);
40283         if (retval) {
40284 -               dbg (__FUNCTION__" - submit urb failed");
40285 +               dbg("%s - submit urb failed", __FUNCTION__);
40286                 goto exit;
40287         }
40288  
40289 @@ -282,19 +275,19 @@
40290         }
40291  
40292         if (info->command_finished == FALSE) {
40293 -               dbg (__FUNCTION__ " - command timed out.");
40294 +               dbg("%s - command timed out.", __FUNCTION__);
40295                 retval = -ETIMEDOUT;
40296                 goto exit;
40297         }
40298  
40299         if (info->command_finished == WHITEHEAT_CMD_FAILURE) {
40300 -               dbg (__FUNCTION__ " - command failed.");
40301 +               dbg("%s - command failed.", __FUNCTION__);
40302                 retval = -EIO;
40303                 goto exit;
40304         }
40305  
40306         if (info->command_finished == WHITEHEAT_CMD_COMPLETE)
40307 -               dbg (__FUNCTION__ " - command completed.");
40308 +               dbg("%s - command completed.", __FUNCTION__);
40309  
40310  exit:
40311         return retval;
40312 @@ -308,70 +301,51 @@
40313         struct whiteheat_private        *info;
40314         int                             retval = 0;
40315  
40316 -       dbg(__FUNCTION__" - port %d", port->number);
40317 +       dbg("%s - port %d", __FUNCTION__, port->number);
40318  
40319 -       down (&port->sem);
40320 -
40321 -       ++port->open_count;
40322 -       MOD_INC_USE_COUNT;
40323 -       
40324 -       if (!port->active) {
40325 -               port->active = 1;
40326 -
40327 -               /* set up some stuff for our command port */
40328 -               command_port = &port->serial->port[COMMAND_PORT];
40329 -               if (command_port->private == NULL) {
40330 -                       info = (struct whiteheat_private *)kmalloc (sizeof(struct whiteheat_private), GFP_KERNEL);
40331 -                       if (info == NULL) {
40332 -                               err(__FUNCTION__ " - out of memory");
40333 -                               retval = -ENOMEM;
40334 -                               goto error_exit;
40335 -                       }
40336 -                       
40337 -                       init_waitqueue_head(&info->wait_command);
40338 -                       command_port->private = info;
40339 -                       command_port->write_urb->complete = command_port_write_callback;
40340 -                       command_port->read_urb->complete = command_port_read_callback;
40341 -                       command_port->read_urb->dev = port->serial->dev;
40342 -                       command_port->tty = port->tty;          /* need this to "fake" our our sanity check macros */
40343 -                       retval = usb_submit_urb (command_port->read_urb);
40344 -                       if (retval) {
40345 -                               err(__FUNCTION__ " - failed submitting read urb, error %d", retval);
40346 -                               goto error_exit;
40347 -                       }
40348 +       /* set up some stuff for our command port */
40349 +       command_port = &port->serial->port[COMMAND_PORT];
40350 +       if (command_port->private == NULL) {
40351 +               info = (struct whiteheat_private *)kmalloc (sizeof(struct whiteheat_private), GFP_KERNEL);
40352 +               if (info == NULL) {
40353 +                       err("%s - out of memory", __FUNCTION__);
40354 +                       retval = -ENOMEM;
40355 +                       goto exit;
40356                 }
40357                 
40358 -               /* Start reading from the device */
40359 -               port->read_urb->dev = port->serial->dev;
40360 -               retval = usb_submit_urb(port->read_urb);
40361 +               init_waitqueue_head(&info->wait_command);
40362 +               command_port->private = info;
40363 +               command_port->write_urb->complete = command_port_write_callback;
40364 +               command_port->read_urb->complete = command_port_read_callback;
40365 +               command_port->read_urb->dev = port->serial->dev;
40366 +               command_port->tty = port->tty;          /* need this to "fake" our our sanity check macros */
40367 +               retval = usb_submit_urb (command_port->read_urb);
40368                 if (retval) {
40369 -                       err(__FUNCTION__ " - failed submitting read urb, error %d", retval);
40370 -                       goto error_exit;
40371 +                       err("%s - failed submitting read urb, error %d", __FUNCTION__, retval);
40372 +                       goto exit;
40373                 }
40374 +       }
40375         
40376 -               /* send an open port command */
40377 -               /* firmware uses 1 based port numbering */
40378 -               open_command.port = port->number - port->serial->minor + 1;
40379 -               retval = whiteheat_send_cmd (port->serial, WHITEHEAT_OPEN, (__u8 *)&open_command, sizeof(open_command));
40380 -               if (retval)
40381 -                       goto error_exit;
40382 -       
40383 -               /* Need to do device specific setup here (control lines, baud rate, etc.) */
40384 -               /* FIXME!!! */
40385 +       /* Start reading from the device */
40386 +       port->read_urb->dev = port->serial->dev;
40387 +       retval = usb_submit_urb(port->read_urb);
40388 +       if (retval) {
40389 +               err("%s - failed submitting read urb, error %d", __FUNCTION__, retval);
40390 +               goto exit;
40391         }
40392  
40393 -       dbg(__FUNCTION__ " - exit");
40394 -       up (&port->sem);
40395 -       
40396 -       return retval;
40397 +       /* send an open port command */
40398 +       /* firmware uses 1 based port numbering */
40399 +       open_command.port = port->number - port->serial->minor + 1;
40400 +       retval = whiteheat_send_cmd (port->serial, WHITEHEAT_OPEN, (__u8 *)&open_command, sizeof(open_command));
40401 +       if (retval)
40402 +               goto exit;
40403  
40404 -error_exit:
40405 -       --port->open_count;
40406 -       MOD_DEC_USE_COUNT;
40407 +       /* Need to do device specific setup here (control lines, baud rate, etc.) */
40408 +       /* FIXME!!! */
40409  
40410 -       dbg(__FUNCTION__ " - error_exit");
40411 -       up (&port->sem);
40412 -       
40413 +exit:
40414 +       dbg("%s - exit, retval = %d", __FUNCTION__, retval);
40415         return retval;
40416  }
40417  
40418 @@ -380,33 +354,25 @@
40419  {
40420         struct whiteheat_min_set        close_command;
40421         
40422 -       dbg(__FUNCTION__ " - port %d", port->number);
40423 +       dbg("%s - port %d", __FUNCTION__, port->number);
40424         
40425 -       down (&port->sem);
40426 -       --port->open_count;
40427 +       /* send a close command to the port */
40428 +       /* firmware uses 1 based port numbering */
40429 +       close_command.port = port->number - port->serial->minor + 1;
40430 +       whiteheat_send_cmd (port->serial, WHITEHEAT_CLOSE, (__u8 *)&close_command, sizeof(close_command));
40431  
40432 -       if (port->open_count <= 0) {
40433 -               /* send a close command to the port */
40434 -               /* firmware uses 1 based port numbering */
40435 -               close_command.port = port->number - port->serial->minor + 1;
40436 -               whiteheat_send_cmd (port->serial, WHITEHEAT_CLOSE, (__u8 *)&close_command, sizeof(close_command));
40437 +       /* Need to change the control lines here */
40438 +       /* FIXME */
40439         
40440 -               /* Need to change the control lines here */
40441 -               /* FIXME */
40442 -               
40443 -               /* shutdown our bulk reads and writes */
40444 -               usb_unlink_urb (port->write_urb);
40445 -               usb_unlink_urb (port->read_urb);
40446 -               port->active = 0;
40447 -       }
40448 -       MOD_DEC_USE_COUNT;
40449 -       up (&port->sem);
40450 +       /* shutdown our bulk reads and writes */
40451 +       usb_unlink_urb (port->write_urb);
40452 +       usb_unlink_urb (port->read_urb);
40453  }
40454  
40455  
40456  static int whiteheat_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
40457  {
40458 -       dbg(__FUNCTION__ " - port %d, cmd 0x%.4x", port->number, cmd);
40459 +       dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
40460  
40461         return -ENOIOCTLCMD;
40462  }
40463 @@ -417,12 +383,10 @@
40464         unsigned int cflag;
40465         struct whiteheat_port_settings port_settings;
40466  
40467 -       dbg(__FUNCTION__ " -port %d", port->number);
40468 -
40469 -       down (&port->sem);
40470 +       dbg("%s -port %d", __FUNCTION__, port->number);
40471  
40472         if ((!port->tty) || (!port->tty->termios)) {
40473 -               dbg(__FUNCTION__" - no tty structures");
40474 +               dbg("%s - no tty structures", __FUNCTION__);
40475                 goto exit;
40476         }
40477         
40478 @@ -431,7 +395,7 @@
40479         if (old_termios) {
40480                 if ((cflag == old_termios->c_cflag) &&
40481                     (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
40482 -                       dbg(__FUNCTION__ " - nothing to change...");
40483 +                       dbg("%s - nothing to change...", __FUNCTION__);
40484                         goto exit;
40485                 }
40486         }
40487 @@ -448,7 +412,7 @@
40488                 default:
40489                 case CS8:       port_settings.bits = 8;   break;
40490         }
40491 -       dbg(__FUNCTION__ " - data bits = %d", port_settings.bits);
40492 +       dbg("%s - data bits = %d", __FUNCTION__, port_settings.bits);
40493         
40494         /* determine the parity */
40495         if (cflag & PARENB)
40496 @@ -458,14 +422,14 @@
40497                         port_settings.parity = 'e';
40498         else
40499                 port_settings.parity = 'n';
40500 -       dbg(__FUNCTION__ " - parity = %c", port_settings.parity);
40501 +       dbg("%s - parity = %c", __FUNCTION__, port_settings.parity);
40502  
40503         /* figure out the stop bits requested */
40504         if (cflag & CSTOPB)
40505                 port_settings.stop = 2;
40506         else
40507                 port_settings.stop = 1;
40508 -       dbg(__FUNCTION__ " - stop bits = %d", port_settings.stop);
40509 +       dbg("%s - stop bits = %d", __FUNCTION__, port_settings.stop);
40510  
40511         
40512         /* figure out the flow control settings */
40513 @@ -473,7 +437,7 @@
40514                 port_settings.hflow = (WHITEHEAT_CTS_FLOW | WHITEHEAT_RTS_FLOW);
40515         else
40516                 port_settings.hflow = 0;
40517 -       dbg(__FUNCTION__ " - hardware flow control = %s %s %s %s",
40518 +       dbg("%s - hardware flow control = %s %s %s %s", __FUNCTION__,
40519             (port_settings.hflow & WHITEHEAT_CTS_FLOW) ? "CTS" : "",
40520             (port_settings.hflow & WHITEHEAT_RTS_FLOW) ? "RTS" : "",
40521             (port_settings.hflow & WHITEHEAT_DSR_FLOW) ? "DSR" : "",
40522 @@ -484,15 +448,15 @@
40523                 port_settings.sflow = 'b';
40524         else
40525                 port_settings.sflow = 'n';
40526 -       dbg(__FUNCTION__ " - software flow control = %c", port_settings.sflow);
40527 +       dbg("%s - software flow control = %c", __FUNCTION__, port_settings.sflow);
40528         
40529         port_settings.xon = START_CHAR(port->tty);
40530         port_settings.xoff = STOP_CHAR(port->tty);
40531 -       dbg(__FUNCTION__ " - XON = %2x, XOFF = %2x", port_settings.xon, port_settings.xoff);
40532 +       dbg("%s - XON = %2x, XOFF = %2x", __FUNCTION__, port_settings.xon, port_settings.xoff);
40533  
40534         /* get the baud rate wanted */
40535         port_settings.baud = tty_get_baud_rate(port->tty);
40536 -       dbg(__FUNCTION__ " - baud rate = %d", port_settings.baud);
40537 +       dbg("%s - baud rate = %d", __FUNCTION__, port_settings.baud);
40538  
40539         /* handle any settings that aren't specified in the tty structure */
40540         port_settings.lloop = 0;
40541 @@ -501,14 +465,13 @@
40542         whiteheat_send_cmd (port->serial, WHITEHEAT_SETUP_PORT, (__u8 *)&port_settings, sizeof(port_settings));
40543         
40544  exit:
40545 -       up (&port->sem);
40546         return;
40547  }
40548  
40549  
40550  static void whiteheat_throttle (struct usb_serial_port *port)
40551  {
40552 -       dbg(__FUNCTION__" - port %d", port->number);
40553 +       dbg("%s - port %d", __FUNCTION__, port->number);
40554  
40555         /* Change the control signals */
40556         /* FIXME!!! */
40557 @@ -519,7 +482,7 @@
40558  
40559  static void whiteheat_unthrottle (struct usb_serial_port *port)
40560  {
40561 -       dbg(__FUNCTION__" - port %d", port->number);
40562 +       dbg("%s - port %d", __FUNCTION__, port->number);
40563  
40564         /* Change the control signals */
40565         /* FIXME!!! */
40566 @@ -541,12 +504,12 @@
40567   - device renumerated itself and comes up as new device id with all
40568     firmware download completed.
40569  */
40570 -static int  whiteheat_fake_startup (struct usb_serial *serial)
40571 +static int whiteheat_fake_startup (struct usb_serial *serial)
40572  {
40573         int response;
40574         const struct whiteheat_hex_record *record;
40575         
40576 -       dbg(__FUNCTION__);
40577 +       dbg("%s", __FUNCTION__);
40578         
40579         response = ezusb_set_reset (serial, 1);
40580  
40581 @@ -555,8 +518,8 @@
40582                 response = ezusb_writememory (serial, record->address, 
40583                                 (unsigned char *)record->data, record->data_size, 0xa0);
40584                 if (response < 0) {
40585 -                       err(__FUNCTION__ " - ezusb_writememory failed for loader (%d %04X %p %d)", 
40586 -                               response, record->address, record->data, record->data_size);
40587 +                       err("%s - ezusb_writememory failed for loader (%d %04X %p %d)",
40588 +                               __FUNCTION__, response, record->address, record->data, record->data_size);
40589                         break;
40590                 }
40591                 ++record;
40592 @@ -572,8 +535,8 @@
40593                 response = ezusb_writememory (serial, record->address, 
40594                                 (unsigned char *)record->data, record->data_size, 0xa3);
40595                 if (response < 0) {
40596 -                       err(__FUNCTION__ " - ezusb_writememory failed for first firmware step (%d %04X %p %d)", 
40597 -                               response, record->address, record->data, record->data_size);
40598 +                       err("%s - ezusb_writememory failed for first firmware step (%d %04X %p %d)", 
40599 +                               __FUNCTION__, response, record->address, record->data, record->data_size);
40600                         break;
40601                 }
40602                 ++record;
40603 @@ -586,8 +549,8 @@
40604                 response = ezusb_writememory (serial, record->address, 
40605                                 (unsigned char *)record->data, record->data_size, 0xa0);
40606                 if (response < 0) {
40607 -                       err(__FUNCTION__" - ezusb_writememory failed for second firmware step (%d %04X %p %d)", 
40608 -                               response, record->address, record->data, record->data_size);
40609 +                       err("%s - ezusb_writememory failed for second firmware step (%d %04X %p %d)", 
40610 +                               __FUNCTION__, response, record->address, record->data, record->data_size);
40611                         break;
40612                 }
40613                 ++record;
40614 @@ -662,16 +625,8 @@
40615  static void whiteheat_real_shutdown (struct usb_serial *serial)
40616  {
40617         struct usb_serial_port *command_port;
40618 -       int i;
40619 -
40620 -       dbg(__FUNCTION__);
40621  
40622 -       /* stop reads and writes on all ports */
40623 -       for (i=0; i < serial->num_ports; ++i) {
40624 -               while (serial->port[i].open_count > 0) {
40625 -                       whiteheat_close (&serial->port[i], NULL);
40626 -               }
40627 -       }
40628 +       dbg("%s", __FUNCTION__);
40629  
40630         /* free up our private data for our command port */
40631         command_port = &serial->port[COMMAND_PORT];
40632 diff -Nur linux-2.4.19.org/drivers/usb/storage/Makefile linux-2.4.19/drivers/usb/storage/Makefile
40633 --- linux-2.4.19.org/drivers/usb/storage/Makefile       Sat Aug  3 02:39:45 2002
40634 +++ linux-2.4.19/drivers/usb/storage/Makefile   Thu Oct 31 08:11:26 2002
40635 @@ -15,6 +15,7 @@
40636  usb-storage-obj-$(CONFIG_USB_STORAGE_DEBUG)    += debug.o
40637  usb-storage-obj-$(CONFIG_USB_STORAGE_HP8200e)  += shuttle_usbat.o
40638  usb-storage-obj-$(CONFIG_USB_STORAGE_SDDR09)   += sddr09.o
40639 +usb-storage-obj-$(CONFIG_USB_STORAGE_SDDR55)   += sddr55.o
40640  usb-storage-obj-$(CONFIG_USB_STORAGE_FREECOM)  += freecom.o
40641  usb-storage-obj-$(CONFIG_USB_STORAGE_DPCM)     += dpcm.o
40642  usb-storage-obj-$(CONFIG_USB_STORAGE_ISD200)   += isd200.o
40643 diff -Nur linux-2.4.19.org/drivers/usb/storage/freecom.c linux-2.4.19/drivers/usb/storage/freecom.c
40644 --- linux-2.4.19.org/drivers/usb/storage/freecom.c      Mon Feb 25 20:38:07 2002
40645 +++ linux-2.4.19/drivers/usb/storage/freecom.c  Thu Oct 31 08:11:26 2002
40646 @@ -34,7 +34,7 @@
40647  #include "usb.h"
40648  #include "debug.h"
40649  #include "freecom.h"
40650 -#include "linux/hdreg.h"
40651 +#include <linux/hdreg.h>
40652  
40653  #ifdef CONFIG_USB_STORAGE_DEBUG
40654  static void pdump (void *, int);
40655 diff -Nur linux-2.4.19.org/drivers/usb/storage/scsiglue.c linux-2.4.19/drivers/usb/storage/scsiglue.c
40656 --- linux-2.4.19.org/drivers/usb/storage/scsiglue.c     Sun Nov 11 19:01:32 2001
40657 +++ linux-2.4.19/drivers/usb/storage/scsiglue.c Thu Oct 31 08:11:26 2002
40658 @@ -190,7 +190,7 @@
40659         }
40660  
40661         /* if we have an urb pending, let's wake the control thread up */
40662 -       if (us->current_urb->status == -EINPROGRESS) {
40663 +       if (!us->current_done.done) {
40664                 /* cancel the URB -- this will automatically wake the thread */
40665                 usb_unlink_urb(us->current_urb);
40666  
40667 diff -Nur linux-2.4.19.org/drivers/usb/storage/sddr55.c linux-2.4.19/drivers/usb/storage/sddr55.c
40668 --- linux-2.4.19.org/drivers/usb/storage/sddr55.c       Thu Jan  1 01:00:00 1970
40669 +++ linux-2.4.19/drivers/usb/storage/sddr55.c   Thu Oct 31 08:11:26 2002
40670 @@ -0,0 +1,1134 @@
40671 +/* Driver for SanDisk SDDR-55 SmartMedia reader
40672 + *
40673 + * $Id$
40674 + *
40675 + * SDDR55 driver v0.1:
40676 + *
40677 + * First release
40678 + *
40679 + * Current development and maintenance by:
40680 + *   (c) 2002 Simon Munton
40681 + *
40682 + * This program is free software; you can redistribute it and/or modify it
40683 + * under the terms of the GNU General Public License as published by the
40684 + * Free Software Foundation; either version 2, or (at your option) any
40685 + * later version.
40686 + *
40687 + * This program is distributed in the hope that it will be useful, but
40688 + * WITHOUT ANY WARRANTY; without even the implied warranty of
40689 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
40690 + * General Public License for more details.
40691 + *
40692 + * You should have received a copy of the GNU General Public License along
40693 + * with this program; if not, write to the Free Software Foundation, Inc.,
40694 + * 675 Mass Ave, Cambridge, MA 02139, USA.
40695 + */
40696 +
40697 +#include "transport.h"
40698 +#include "protocol.h"
40699 +#include "usb.h"
40700 +#include "debug.h"
40701 +#include "sddr55.h"
40702 +
40703 +#include <linux/sched.h>
40704 +#include <linux/errno.h>
40705 +#include <linux/slab.h>
40706 +
40707 +#define short_pack(lsb,msb) ( ((u16)(lsb)) | ( ((u16)(msb))<<8 ) )
40708 +#define LSB_of(s) ((s)&0xFF)
40709 +#define MSB_of(s) ((s)>>8)
40710 +#define PAGESIZE  512
40711 +
40712 +#define set_sense_info(sk, asc, ascq)  \
40713 +    do {                               \
40714 +       info->sense_data[2] = sk;       \
40715 +       info->sense_data[12] = asc;     \
40716 +       info->sense_data[13] = ascq;    \
40717 +       } while (0)
40718 +
40719 +
40720 +struct sddr55_card_info {
40721 +       unsigned long   capacity;       /* Size of card in bytes */
40722 +       int             max_log_blks;   /* maximum number of logical blocks */
40723 +       int             pageshift;      /* log2 of pagesize */
40724 +       int             smallpageshift; /* 1 if pagesize == 256 */
40725 +       int             blocksize;      /* Size of block in pages */
40726 +       int             blockshift;     /* log2 of blocksize */
40727 +       int             blockmask;      /* 2^blockshift - 1 */
40728 +       int             read_only;      /* non zero if card is write protected */
40729 +       int             force_read_only;        /* non zero if we find a map error*/
40730 +       int             *lba_to_pba;    /* logical to physical map */
40731 +       int             *pba_to_lba;    /* physical to logical map */
40732 +       int             fatal_error;    /* set if we detect something nasty */
40733 +       unsigned long   last_access;    /* number of jiffies since we last talked to device */
40734 +       unsigned char   sense_data[18];
40735 +};
40736 +
40737 +
40738 +#define NOT_ALLOCATED          0xffffffff
40739 +#define BAD_BLOCK              0xffff
40740 +#define CIS_BLOCK              0x400
40741 +#define UNUSED_BLOCK           0x3ff
40742 +
40743 +
40744 +
40745 +static int sddr55_raw_bulk(struct us_data *us, 
40746 +               int direction,
40747 +               unsigned char *data,
40748 +               unsigned int len) {
40749 +
40750 +       int result;
40751 +       int act_len;
40752 +       int pipe;
40753 +
40754 +       if (direction == SCSI_DATA_READ)
40755 +               pipe = usb_rcvbulkpipe(us->pusb_dev, us->ep_in);
40756 +       else
40757 +               pipe = usb_sndbulkpipe(us->pusb_dev, us->ep_out);
40758 +
40759 +       result = usb_stor_bulk_msg(us, data, pipe, len, &act_len);
40760 +
40761 +       /* if we stall, we need to clear it before we go on */
40762 +       if (result == -EPIPE) {
40763 +               US_DEBUGP("EPIPE: clearing endpoint halt for"
40764 +                       " pipe 0x%x, stalled at %d bytes\n",
40765 +                       pipe, act_len);
40766 +               usb_clear_halt(us->pusb_dev, pipe);
40767 +       }
40768 +
40769 +       if (result) {
40770 +
40771 +               /* NAK - that means we've retried a few times already */
40772 +               if (result == -ETIMEDOUT) {
40773 +                       US_DEBUGP("usbat_raw_bulk():"
40774 +                               " device NAKed\n");
40775 +
40776 +                       return US_BULK_TRANSFER_FAILED;
40777 +               }
40778 +
40779 +               /* -ENOENT -- we canceled this transfer */
40780 +               if (result == -ENOENT) {
40781 +                       US_DEBUGP("usbat_raw_bulk():"
40782 +                               " transfer aborted\n");
40783 +                       return US_BULK_TRANSFER_ABORTED;
40784 +               }
40785 +
40786 +               if (result == -EPIPE) {
40787 +                       US_DEBUGP("usbat_raw_bulk():"
40788 +                               " output pipe stalled\n");
40789 +                       return US_BULK_TRANSFER_FAILED;
40790 +               }
40791 +
40792 +               /* the catch-all case */
40793 +               US_DEBUGP("us_transfer_partial(): unknown error\n");
40794 +               return US_BULK_TRANSFER_FAILED;
40795 +       }
40796 +
40797 +       if (act_len != len) {
40798 +               US_DEBUGP("Warning: Transferred only %d bytes\n",
40799 +                       act_len);
40800 +               return US_BULK_TRANSFER_SHORT;
40801 +       }
40802 +
40803 +       US_DEBUGP("Transferred %d of %d bytes\n", act_len, len);
40804 +
40805 +       return US_BULK_TRANSFER_GOOD;
40806 +}
40807 +
40808 +/*
40809 + * Note: direction must be set if command_len == 0.
40810 + */
40811 +
40812 +static int sddr55_bulk_transport(struct us_data *us,
40813 +                         int direction,
40814 +                         unsigned char *data,
40815 +                         unsigned int len) {
40816 +
40817 +       int result = USB_STOR_TRANSPORT_GOOD;
40818 +       struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
40819 +
40820 +       if (len==0)
40821 +               return USB_STOR_TRANSPORT_GOOD;
40822 +
40823 +       info->last_access = jiffies;
40824 +
40825 +#ifdef CONFIG_USB_STORAGE_DEBUG
40826 +       if (direction == SCSI_DATA_WRITE) {
40827 +               int i;
40828 +               char string[64];
40829 +
40830 +               /* Debug-print the first 48 bytes of the write transfer */
40831 +
40832 +               strcpy(string, "wr: ");
40833 +               for (i=0; i<len && i<48; i++) {
40834 +                       sprintf(string+strlen(string), "%02X ",
40835 +                         data[i]);
40836 +                       if ((i%16)==15) {
40837 +                               US_DEBUGP("%s\n", string);
40838 +                               strcpy(string, "wr: ");
40839 +                       }
40840 +               }
40841 +               if ((i%16)!=0)
40842 +                       US_DEBUGP("%s\n", string);
40843 +       }
40844 +#endif
40845 +
40846 +       /* transfer the data */
40847 +
40848 +       US_DEBUGP("SCM data %s transfer %d\n",
40849 +                 ( direction==SCSI_DATA_READ ? "in" : "out"),
40850 +                 len);
40851 +
40852 +       result = sddr55_raw_bulk(us, direction, data, len);
40853 +
40854 +#ifdef CONFIG_USB_STORAGE_DEBUG
40855 +       if (direction == SCSI_DATA_READ) {
40856 +               int i;
40857 +               char string[64];
40858 +
40859 +               /* Debug-print the first 48 bytes of the read transfer */
40860 +
40861 +               strcpy(string, "rd: ");
40862 +               for (i=0; i<len && i<48; i++) {
40863 +                       sprintf(string+strlen(string), "%02X ",
40864 +                         data[i]);
40865 +                       if ((i%16)==15) {
40866 +                               US_DEBUGP("%s\n", string);
40867 +                               strcpy(string, "rd: ");
40868 +                       }
40869 +               }
40870 +               if ((i%16)!=0)
40871 +                       US_DEBUGP("%s\n", string);
40872 +       }
40873 +#endif
40874 +
40875 +       return result;
40876 +}
40877 +
40878 +
40879 +/* check if card inserted, if there is, update read_only status
40880 + * return non zero if no card
40881 + */
40882 +
40883 +static int sddr55_status(struct us_data *us)
40884 +{
40885 +       int result;
40886 +       unsigned char command[8] = {
40887 +               0, 0, 0, 0, 0, 0xb0, 0, 0x80
40888 +       };
40889 +       unsigned char status[8];
40890 +       struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
40891 +
40892 +       /* send command */
40893 +       result = sddr55_bulk_transport(us,
40894 +               SCSI_DATA_WRITE, command, 8);
40895 +
40896 +       US_DEBUGP("Result for send_command in status %d\n",
40897 +               result);
40898 +
40899 +       if (result != US_BULK_TRANSFER_GOOD) {
40900 +               set_sense_info (4, 0, 0);       /* hardware error */
40901 +               return result;
40902 +       }
40903 +
40904 +       result = sddr55_bulk_transport(us,
40905 +               SCSI_DATA_READ, status, 4);
40906 +
40907 +       /* expect to get short transfer if no card fitted */
40908 +       if (result == US_BULK_TRANSFER_SHORT) {
40909 +               /* had a short transfer, no card inserted, free map memory */
40910 +               if (info->lba_to_pba)
40911 +                       kfree(info->lba_to_pba);
40912 +               if (info->pba_to_lba)
40913 +                       kfree(info->pba_to_lba);
40914 +               info->lba_to_pba = NULL;
40915 +               info->pba_to_lba = NULL;
40916 +
40917 +               info->fatal_error = 0;
40918 +               info->force_read_only = 0;
40919 +
40920 +               set_sense_info (2, 0x3a, 0);    /* not ready, medium not present */
40921 +               return result;
40922 +       }
40923 +
40924 +       if (result != US_BULK_TRANSFER_GOOD) {
40925 +               set_sense_info (4, 0, 0);       /* hardware error */
40926 +               return result;
40927 +       }
40928 +       
40929 +       /* check write protect status */
40930 +       info->read_only = (status[0] & 0x20);
40931 +
40932 +       /* now read status */
40933 +       result = sddr55_bulk_transport(us,
40934 +               SCSI_DATA_READ, status, 2);
40935 +
40936 +       if (result != US_BULK_TRANSFER_GOOD) {
40937 +               set_sense_info (4, 0, 0);       /* hardware error */
40938 +       }
40939 +
40940 +       return result;
40941 +}
40942 +
40943 +
40944 +static int sddr55_read_data(struct us_data *us,
40945 +               unsigned int lba,
40946 +               unsigned int page,
40947 +               unsigned short sectors,
40948 +               unsigned char *content,
40949 +               int use_sg) {
40950 +
40951 +       int result;
40952 +       unsigned char command[8] = {
40953 +               0, 0, 0, 0, 0, 0xb0, 0, 0x85
40954 +       };
40955 +       unsigned char status[8];
40956 +       struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
40957 +
40958 +       unsigned int pba;
40959 +       unsigned long address;
40960 +
40961 +       unsigned short pages;
40962 +       unsigned char *buffer = NULL;
40963 +       unsigned char *ptr;
40964 +       struct scatterlist *sg = NULL;
40965 +       int i;
40966 +       int len;
40967 +       int transferred;
40968 +
40969 +       // If we're using scatter-gather, we have to create a new
40970 +       // buffer to read all of the data in first, since a
40971 +       // scatter-gather buffer could in theory start in the middle
40972 +       // of a page, which would be bad. A developer who wants a
40973 +       // challenge might want to write a limited-buffer
40974 +       // version of this code.
40975 +
40976 +       len = sectors * PAGESIZE;
40977 +
40978 +       if (use_sg) {
40979 +               sg = (struct scatterlist *)content;
40980 +               buffer = kmalloc(len, GFP_NOIO);
40981 +               if (buffer == NULL)
40982 +                       return USB_STOR_TRANSPORT_ERROR;
40983 +               ptr = buffer;
40984 +       } else
40985 +               ptr = content;
40986 +
40987 +       // This could be made much more efficient by checking for
40988 +       // contiguous LBA's. Another exercise left to the student.
40989 +
40990 +       while (sectors>0) {
40991 +
40992 +               /* have we got to end? */
40993 +               if (lba >= info->max_log_blks)
40994 +                       break;
40995 +
40996 +               pba = info->lba_to_pba[lba];
40997 +
40998 +               // Read as many sectors as possible in this block
40999 +
41000 +               pages = info->blocksize - page;
41001 +               if (pages > (sectors << info->smallpageshift))
41002 +                       pages = (sectors << info->smallpageshift);
41003 +
41004 +               US_DEBUGP("Read %02X pages, from PBA %04X"
41005 +                       " (LBA %04X) page %02X\n",
41006 +                       pages, pba, lba, page);
41007 +
41008 +               if (pba == NOT_ALLOCATED) {
41009 +                       /* no pba for this lba, fill with zeroes */
41010 +                       memset (ptr, 0, pages << info->pageshift);
41011 +               } else {
41012 +
41013 +                       address = (pba << info->blockshift) + page;
41014 +
41015 +                       command[1] = LSB_of(address>>16);
41016 +                       command[2] = LSB_of(address>>8);
41017 +                       command[3] = LSB_of(address);
41018 +
41019 +                       command[6] = LSB_of(pages << (1 - info->smallpageshift));
41020 +
41021 +                       /* send command */
41022 +                       result = sddr55_bulk_transport(us,
41023 +                               SCSI_DATA_WRITE, command, 8);
41024 +
41025 +                       US_DEBUGP("Result for send_command in read_data %d\n",
41026 +                               result);
41027 +
41028 +                       if (result != US_BULK_TRANSFER_GOOD) {
41029 +                               if (use_sg)
41030 +                                       kfree(buffer);
41031 +                               return result;
41032 +                       }
41033 +
41034 +                       /* read data */
41035 +                       result = sddr55_bulk_transport(us,
41036 +                               SCSI_DATA_READ, ptr,
41037 +                               pages<<info->pageshift);
41038 +
41039 +                       if (result != US_BULK_TRANSFER_GOOD) {
41040 +                               if (use_sg)
41041 +                                       kfree(buffer);
41042 +                               return result;
41043 +                       }
41044 +
41045 +                       /* now read status */
41046 +                       result = sddr55_bulk_transport(us,
41047 +                               SCSI_DATA_READ, status, 2);
41048 +
41049 +                       if (result != US_BULK_TRANSFER_GOOD) {
41050 +                               if (use_sg)
41051 +                                       kfree(buffer);
41052 +                               return result;
41053 +                       }
41054 +
41055 +                       /* check status for error */
41056 +                       if (status[0] == 0xff && status[1] == 0x4) {
41057 +                               set_sense_info (3, 0x11, 0);
41058 +                               if (use_sg)
41059 +                                       kfree(buffer);
41060 +
41061 +                               return USB_STOR_TRANSPORT_FAILED;
41062 +                       }
41063 +
41064 +               }
41065 +
41066 +               page = 0;
41067 +               lba++;
41068 +               sectors -= pages >> info->smallpageshift;
41069 +               ptr += (pages << info->pageshift);
41070 +       }
41071 +
41072 +       if (use_sg) {
41073 +               transferred = 0;
41074 +               for (i=0; i<use_sg && transferred<len; i++) {
41075 +                       memcpy(sg[i].address, buffer+transferred,
41076 +                               len-transferred > sg[i].length ?
41077 +                                       sg[i].length : len-transferred);
41078 +                       transferred += sg[i].length;
41079 +               }
41080 +               kfree(buffer);
41081 +       }
41082 +
41083 +       return USB_STOR_TRANSPORT_GOOD;
41084 +}
41085 +
41086 +static int sddr55_write_data(struct us_data *us,
41087 +               unsigned int lba,
41088 +               unsigned int page,
41089 +               unsigned short sectors,
41090 +               unsigned char *content,
41091 +               int use_sg) {
41092 +
41093 +       int result;
41094 +       unsigned char command[8] = {
41095 +               0, 0, 0, 0, 0, 0xb0, 0, 0x86
41096 +       };
41097 +       unsigned char status[8];
41098 +       struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
41099 +
41100 +       unsigned int pba;
41101 +       unsigned int new_pba;
41102 +       unsigned long address;
41103 +
41104 +       unsigned short pages;
41105 +       unsigned char *buffer = NULL;
41106 +       unsigned char *ptr;
41107 +       struct scatterlist *sg = NULL;
41108 +       int i;
41109 +       int len;
41110 +       int transferred;
41111 +
41112 +       /* check if we are allowed to write */
41113 +       if (info->read_only || info->force_read_only) {
41114 +               set_sense_info (7, 0x27, 0);    /* read only */
41115 +               return USB_STOR_TRANSPORT_FAILED;
41116 +       }
41117 +
41118 +       // If we're using scatter-gather, we have to create a new
41119 +       // buffer to write all of the data in first, since a
41120 +       // scatter-gather buffer could in theory start in the middle
41121 +       // of a page, which would be bad. A developer who wants a
41122 +       // challenge might want to write a limited-buffer
41123 +       // version of this code.
41124 +
41125 +       len = sectors * PAGESIZE;
41126 +
41127 +       if (use_sg) {
41128 +               sg = (struct scatterlist *)content;
41129 +               buffer = kmalloc(len, GFP_NOIO);
41130 +               if (buffer == NULL)
41131 +                       return USB_STOR_TRANSPORT_ERROR;
41132 +
41133 +               transferred = 0;
41134 +               for (i=0; i<use_sg && transferred<len; i++) {
41135 +                       memcpy(buffer+transferred, sg[i].address,
41136 +                               len-transferred > sg[i].length ?
41137 +                                       sg[i].length : len-transferred);
41138 +                       transferred += sg[i].length;
41139 +               }
41140 +
41141 +               ptr = buffer;
41142 +       } else
41143 +               ptr = content;
41144 +
41145 +       while (sectors > 0) {
41146 +
41147 +               /* have we got to end? */
41148 +               if (lba >= info->max_log_blks)
41149 +                       break;
41150 +
41151 +               pba = info->lba_to_pba[lba];
41152 +
41153 +               // Write as many sectors as possible in this block
41154 +
41155 +               pages = info->blocksize - page;
41156 +               if (pages > (sectors << info->smallpageshift))
41157 +                       pages = (sectors << info->smallpageshift);
41158 +
41159 +               US_DEBUGP("Write %02X pages, to PBA %04X"
41160 +                       " (LBA %04X) page %02X\n",
41161 +                       pages, pba, lba, page);
41162 +                       
41163 +               command[4] = 0;
41164 +
41165 +               if (pba == NOT_ALLOCATED) {
41166 +                       /* no pba allocated for this lba, find a free pba to use */
41167 +
41168 +                       int max_pba = (info->max_log_blks / 250 ) * 256;
41169 +                       int found_count = 0;
41170 +                       int found_pba = -1;
41171 +
41172 +                       /* set pba to first block in zone lba is in */
41173 +                       pba = (lba / 1000) * 1024;
41174 +
41175 +                       US_DEBUGP("No PBA for LBA %04X\n",lba);
41176 +
41177 +                       if (max_pba > 1024)
41178 +                               max_pba = 1024;
41179 +
41180 +                       /* scan through the map lookiong for an unused block
41181 +                        * leave 16 unused blocks at start (or as many as possible)
41182 +                        * since the sddr55 seems to reuse a used block when it shouldn't
41183 +                        * if we don't leave space */
41184 +                       for (i = 0; i < max_pba; i++, pba++) {
41185 +                               if (info->pba_to_lba[pba] == UNUSED_BLOCK) {
41186 +                                       found_pba = pba;
41187 +                                       if (found_count++ > 16)
41188 +                                               break;
41189 +                               }
41190 +                       }
41191 +
41192 +                       pba = found_pba;
41193 +
41194 +                       if (pba == -1) {
41195 +                               /* oh dear, couldn't find an unallocated block */
41196 +                               US_DEBUGP("Couldn't find unallocated block\n");
41197 +
41198 +                               set_sense_info (3, 0x31, 0);    /* medium error */
41199 +
41200 +                               if (use_sg)
41201 +                                       kfree(buffer);
41202 +
41203 +                               return USB_STOR_TRANSPORT_FAILED;
41204 +                       }
41205 +
41206 +                       US_DEBUGP("Allocating PBA %04X for LBA %04X\n", pba, lba);
41207 +
41208 +                       /* set writing to unallocated block flag */
41209 +                       command[4] = 0x40;
41210 +               }
41211 +
41212 +               address = (pba << info->blockshift) + page;
41213 +
41214 +               command[1] = LSB_of(address>>16);
41215 +               command[2] = LSB_of(address>>8); 
41216 +               command[3] = LSB_of(address);
41217 +
41218 +               /* set the lba into the command, modulo 1000 */
41219 +               command[0] = LSB_of(lba % 1000);
41220 +               command[6] = MSB_of(lba % 1000);
41221 +
41222 +               command[4] |= LSB_of(pages >> info->smallpageshift);
41223 +
41224 +               /* send command */
41225 +               result = sddr55_bulk_transport(us,
41226 +                       SCSI_DATA_WRITE, command, 8);
41227 +
41228 +               if (result != US_BULK_TRANSFER_GOOD) {
41229 +                       US_DEBUGP("Result for send_command in write_data %d\n",
41230 +                       result);
41231 +
41232 +                       set_sense_info (3, 0x3, 0);     /* peripheral write error */
41233 +                       
41234 +                       if (use_sg)
41235 +                               kfree(buffer);
41236 +                       return result;
41237 +               }
41238 +
41239 +               /* send the data */
41240 +               result = sddr55_bulk_transport(us,
41241 +                       SCSI_DATA_WRITE, ptr,
41242 +                       pages<<info->pageshift);
41243 +
41244 +               if (result != US_BULK_TRANSFER_GOOD) {
41245 +                       US_DEBUGP("Result for send_data in write_data %d\n",
41246 +                       result);
41247 +
41248 +                       set_sense_info (3, 0x3, 0);     /* peripheral write error */
41249 +
41250 +                       if (use_sg)
41251 +                               kfree(buffer);
41252 +                       return result;
41253 +               }
41254 +
41255 +               /* now read status */
41256 +               result = sddr55_bulk_transport(us,
41257 +                       SCSI_DATA_READ, status, 6);
41258 +
41259 +               if (result != US_BULK_TRANSFER_GOOD) {
41260 +                       US_DEBUGP("Result for get_status in write_data %d\n",
41261 +                       result);
41262 +
41263 +                       set_sense_info (3, 0x3, 0);     /* peripheral write error */
41264 +
41265 +                       if (use_sg)
41266 +                               kfree(buffer);
41267 +                       return result;
41268 +               }
41269 +
41270 +               new_pba = (status[3] + (status[4] << 8) + (status[5] << 16)) >> info->blockshift;
41271 +
41272 +               /* check status for error */
41273 +               if (status[0] == 0xff && status[1] == 0x4) {
41274 +                       set_sense_info (3, 0x0c, 0);
41275 +                       if (use_sg)
41276 +                               kfree(buffer);
41277 +
41278 +                       info->pba_to_lba[new_pba] = BAD_BLOCK;
41279 +
41280 +                       return USB_STOR_TRANSPORT_FAILED;
41281 +               }
41282 +
41283 +               US_DEBUGP("Updating maps for LBA %04X: old PBA %04X, new PBA %04X\n",
41284 +                       lba, pba, new_pba);
41285 +
41286 +               /* update the lba<->pba maps, note new_pba might be the same as pba */
41287 +               info->lba_to_pba[lba] = new_pba;
41288 +               info->pba_to_lba[pba] = UNUSED_BLOCK;
41289 +
41290 +               /* check that new_pba wasn't already being used */
41291 +               if (info->pba_to_lba[new_pba] != UNUSED_BLOCK) {
41292 +                       printk(KERN_ERR "sddr55 error: new PBA %04X already in use for LBA %04X\n",
41293 +                               new_pba, info->pba_to_lba[new_pba]);
41294 +                       info->fatal_error = 1;
41295 +                       set_sense_info (3, 0x31, 0);
41296 +                       if (use_sg)
41297 +                               kfree(buffer);
41298 +
41299 +                       return USB_STOR_TRANSPORT_FAILED;
41300 +               }
41301 +
41302 +               /* update the pba<->lba maps for new_pba */
41303 +               info->pba_to_lba[new_pba] = lba % 1000;
41304 +
41305 +               page = 0;
41306 +               lba++;
41307 +               sectors -= pages >> info->smallpageshift;
41308 +               ptr += (pages << info->pageshift);
41309 +       }
41310 +
41311 +       if (use_sg) {
41312 +               kfree(buffer);
41313 +       }
41314 +
41315 +       return USB_STOR_TRANSPORT_GOOD;
41316 +}
41317 +
41318 +static int sddr55_read_deviceID(struct us_data *us,
41319 +               unsigned char *manufacturerID,
41320 +               unsigned char *deviceID) {
41321 +
41322 +       int result;
41323 +       unsigned char command[8] = {
41324 +               0, 0, 0, 0, 0, 0xb0, 0, 0x84
41325 +       };
41326 +       unsigned char content[64];
41327 +
41328 +       result = sddr55_bulk_transport(us, SCSI_DATA_WRITE, command, 8);
41329 +
41330 +       US_DEBUGP("Result of send_control for device ID is %d\n",
41331 +               result);
41332 +
41333 +       if (result != US_BULK_TRANSFER_GOOD)
41334 +               return result;
41335 +
41336 +       result = sddr55_bulk_transport(us,
41337 +               SCSI_DATA_READ, content, 4);
41338 +
41339 +       if (result != US_BULK_TRANSFER_GOOD)
41340 +               return result;
41341 +
41342 +       *manufacturerID = content[0];
41343 +       *deviceID = content[1];
41344 +
41345 +       if (content[0] != 0xff) {
41346 +               result = sddr55_bulk_transport(us,
41347 +                       SCSI_DATA_READ, content, 2);
41348 +       }
41349 +
41350 +       return result;
41351 +}
41352 +
41353 +
41354 +int sddr55_reset(struct us_data *us) {
41355 +       return 0;
41356 +}
41357 +
41358 +
41359 +static unsigned long sddr55_get_capacity(struct us_data *us) {
41360 +
41361 +       unsigned char manufacturerID;
41362 +       unsigned char deviceID;
41363 +       int result;
41364 +       struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
41365 +
41366 +       US_DEBUGP("Reading capacity...\n");
41367 +
41368 +       result = sddr55_read_deviceID(us,
41369 +               &manufacturerID,
41370 +               &deviceID);
41371 +
41372 +       US_DEBUGP("Result of read_deviceID is %d\n",
41373 +               result);
41374 +
41375 +       if (result != US_BULK_TRANSFER_GOOD)
41376 +               return 0;
41377 +
41378 +       US_DEBUGP("Device ID = %02X\n", deviceID);
41379 +       US_DEBUGP("Manuf  ID = %02X\n", manufacturerID);
41380 +
41381 +       info->pageshift = 9;
41382 +       info->smallpageshift = 0;
41383 +       info->blocksize = 16;
41384 +       info->blockshift = 4;
41385 +       info->blockmask = 15;
41386 +
41387 +       switch (deviceID) {
41388 +
41389 +       case 0x6e: // 1MB
41390 +       case 0xe8:
41391 +       case 0xec:
41392 +               info->pageshift = 8;
41393 +               info->smallpageshift = 1;
41394 +               return 0x00100000;
41395 +
41396 +       case 0xea: // 2MB
41397 +       case 0x64:
41398 +               info->pageshift = 8;
41399 +               info->smallpageshift = 1;
41400 +       case 0x5d: // 5d is a ROM card with pagesize 512.
41401 +               return 0x00200000;
41402 +
41403 +       case 0xe3: // 4MB
41404 +       case 0xe5:
41405 +       case 0x6b:
41406 +       case 0xd5:
41407 +               return 0x00400000;
41408 +
41409 +       case 0xe6: // 8MB
41410 +       case 0xd6:
41411 +               return 0x00800000;
41412 +
41413 +       case 0x73: // 16MB
41414 +               info->blocksize = 32;
41415 +               info->blockshift = 5;
41416 +               info->blockmask = 31;
41417 +               return 0x01000000;
41418 +
41419 +       case 0x75: // 32MB
41420 +               info->blocksize = 32;
41421 +               info->blockshift = 5;
41422 +               info->blockmask = 31;
41423 +               return 0x02000000;
41424 +
41425 +       case 0x76: // 64MB
41426 +               info->blocksize = 32;
41427 +               info->blockshift = 5;
41428 +               info->blockmask = 31;
41429 +               return 0x04000000;
41430 +
41431 +       case 0x79: // 128MB
41432 +               info->blocksize = 32;
41433 +               info->blockshift = 5;
41434 +               info->blockmask = 31;
41435 +               return 0x08000000;
41436 +
41437 +       default: // unknown
41438 +               return 0;
41439 +
41440 +       }
41441 +}
41442 +
41443 +static int sddr55_read_map(struct us_data *us) {
41444 +
41445 +       struct sddr55_card_info *info = (struct sddr55_card_info *)(us->extra);
41446 +       int numblocks;
41447 +       unsigned char *buffer;
41448 +       unsigned char command[8] = { 0, 0, 0, 0, 0, 0xb0, 0, 0x8a};     
41449 +       int i;
41450 +       unsigned short lba;
41451 +       unsigned short max_lba;
41452 +       int result;
41453 +
41454 +       if (!info->capacity)
41455 +               return -1;
41456 +
41457 +       numblocks = info->capacity >> (info->blockshift + info->pageshift);
41458 +       
41459 +       buffer = kmalloc( numblocks * 2, GFP_NOIO );
41460 +       
41461 +       if (!buffer)
41462 +               return -1;
41463 +
41464 +       command[6] = numblocks * 2 / 256;
41465 +
41466 +       result = sddr55_bulk_transport(us, SCSI_DATA_WRITE, command, 8);
41467 +
41468 +       if ( result != US_BULK_TRANSFER_GOOD) {
41469 +               kfree (buffer);
41470 +               return -1;
41471 +       }
41472 +
41473 +       result = sddr55_bulk_transport(us, SCSI_DATA_READ, buffer, numblocks * 2);
41474 +
41475 +       if ( result != US_BULK_TRANSFER_GOOD) {
41476 +               kfree (buffer);
41477 +               return -1;
41478 +       }
41479 +
41480 +       result = sddr55_bulk_transport(us, SCSI_DATA_READ, command, 2);
41481 +
41482 +       if ( result != US_BULK_TRANSFER_GOOD) {
41483 +               kfree (buffer);
41484 +               return -1;
41485 +       }
41486 +
41487 +       if (info->lba_to_pba)
41488 +               kfree(info->lba_to_pba);
41489 +       if (info->pba_to_lba)
41490 +               kfree(info->pba_to_lba);
41491 +       info->lba_to_pba = kmalloc(numblocks*sizeof(int), GFP_NOIO);
41492 +       info->pba_to_lba = kmalloc(numblocks*sizeof(int), GFP_NOIO);
41493 +
41494 +       if (info->lba_to_pba == NULL || info->pba_to_lba == NULL) {
41495 +               if (info->lba_to_pba != NULL)
41496 +                       kfree(info->lba_to_pba);
41497 +               if (info->pba_to_lba != NULL)
41498 +                       kfree(info->pba_to_lba);
41499 +               info->lba_to_pba = NULL;
41500 +               info->pba_to_lba = NULL;
41501 +               kfree(buffer);
41502 +               return -1;
41503 +       }
41504 +
41505 +       memset(info->lba_to_pba, 0xff, numblocks*sizeof(int));
41506 +       memset(info->pba_to_lba, 0xff, numblocks*sizeof(int));
41507 +
41508 +       /* set maximum lba */
41509 +       max_lba = info->max_log_blks;
41510 +       if (max_lba > 1000)
41511 +               max_lba = 1000;
41512 +
41513 +       // Each block is 64 bytes of control data, so block i is located in
41514 +       // scatterlist block i*64/128k = i*(2^6)*(2^-17) = i*(2^-11)
41515 +
41516 +       for (i=0; i<numblocks; i++) {
41517 +               int zone = i / 1024;
41518 +
41519 +               lba = short_pack(buffer[i * 2], buffer[i * 2 + 1]);
41520 +
41521 +                       /* Every 1024 physical blocks ("zone"), the LBA numbers
41522 +                        * go back to zero, but are within a higher
41523 +                        * block of LBA's. Also, there is a maximum of
41524 +                        * 1000 LBA's per zone. In other words, in PBA
41525 +                        * 1024-2047 you will find LBA 0-999 which are
41526 +                        * really LBA 1000-1999. Yes, this wastes 24
41527 +                        * physical blocks per zone. Go figure. 
41528 +                        * These devices can have blocks go bad, so there
41529 +                        * are 24 spare blocks to use when blocks do go bad.
41530 +                        */
41531 +
41532 +                       /* SDDR55 returns 0xffff for a bad block, and 0x400 for the 
41533 +                        * CIS block. (Is this true for cards 8MB or less??)
41534 +                        * Record these in the physical to logical map
41535 +                        */ 
41536 +
41537 +               info->pba_to_lba[i] = lba;
41538 +
41539 +               if (lba >= max_lba) {
41540 +                       continue;
41541 +               }
41542 +               
41543 +               if (info->lba_to_pba[lba + zone * 1000] != NOT_ALLOCATED &&
41544 +                   !info->force_read_only) {
41545 +                       printk("sddr55: map inconsistency at LBA %04X\n", lba + zone * 1000);
41546 +                       info->force_read_only = 1;
41547 +               }
41548 +
41549 +               if (lba<0x10 || (lba>=0x3E0 && lba<0x3EF))
41550 +                       US_DEBUGP("LBA %04X <-> PBA %04X\n", lba, i);
41551 +
41552 +               info->lba_to_pba[lba + zone * 1000] = i;
41553 +       }
41554 +
41555 +       kfree(buffer);
41556 +       return 0;
41557 +}
41558 +
41559 +
41560 +static void sddr55_card_info_destructor(void *extra) {
41561 +       struct sddr55_card_info *info = (struct sddr55_card_info *)extra;
41562 +
41563 +       if (!extra)
41564 +               return;
41565 +
41566 +       if (info->lba_to_pba)
41567 +               kfree(info->lba_to_pba);
41568 +       if (info->pba_to_lba)
41569 +               kfree(info->pba_to_lba);
41570 +}
41571 +
41572 +
41573 +/*
41574 + * Transport for the Sandisk SDDR-55
41575 + */
41576 +int sddr55_transport(Scsi_Cmnd *srb, struct us_data *us)
41577 +{
41578 +       int result;
41579 +       int i;
41580 +       unsigned char inquiry_response[36] = {
41581 +               0x00, 0x80, 0x00, 0x02, 0x1F, 0x00, 0x00, 0x00
41582 +       };
41583 +       unsigned char mode_page_01[16] = { // write-protected for now
41584 +               0x03, 0x00, 0x80, 0x00,
41585 +               0x01, 0x0A,
41586 +               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
41587 +       };
41588 +       unsigned char *ptr;
41589 +       unsigned long capacity;
41590 +       unsigned int lba;
41591 +       unsigned int pba;
41592 +       unsigned int page;
41593 +       unsigned short pages;
41594 +       struct sddr55_card_info *info;
41595 +
41596 +       if (!us->extra) {
41597 +               us->extra = kmalloc(
41598 +                       sizeof(struct sddr55_card_info), GFP_NOIO);
41599 +               if (!us->extra)
41600 +                       return USB_STOR_TRANSPORT_ERROR;
41601 +               memset(us->extra, 0, sizeof(struct sddr55_card_info));
41602 +               us->extra_destructor = sddr55_card_info_destructor;
41603 +       }
41604 +
41605 +       info = (struct sddr55_card_info *)(us->extra);
41606 +
41607 +       ptr = (unsigned char *)srb->request_buffer;
41608 +
41609 +       if (srb->cmnd[0] == REQUEST_SENSE) {
41610 +               i = srb->cmnd[4];
41611 +
41612 +               if (i > sizeof info->sense_data)
41613 +                       i = sizeof info->sense_data;
41614 +
41615 +
41616 +               US_DEBUGP("SDDR55: request sense %02x/%02x/%02x\n", info->sense_data[2], info->sense_data[12], info->sense_data[13]);
41617 +
41618 +               info->sense_data[0] = 0x70;
41619 +               info->sense_data[7] = 10;
41620 +
41621 +               memcpy (ptr, info->sense_data, i);
41622 +               memset (info->sense_data, 0, sizeof info->sense_data);
41623 +
41624 +               return USB_STOR_TRANSPORT_GOOD;
41625 +       }
41626 +
41627 +       memset (info->sense_data, 0, sizeof info->sense_data);
41628 +
41629 +       /* Dummy up a response for INQUIRY since SDDR55 doesn't
41630 +          respond to INQUIRY commands */
41631 +
41632 +       if (srb->cmnd[0] == INQUIRY) {
41633 +               memset(inquiry_response+8, 0, 28);
41634 +               fill_inquiry_response(us, inquiry_response, 36);
41635 +               return USB_STOR_TRANSPORT_GOOD;
41636 +       }
41637 +
41638 +       /* only check card status if the map isn't allocated, ie no card seen yet
41639 +        * or if it's been over half a second since we last accessed it
41640 +        */
41641 +       if (info->lba_to_pba == NULL || time_after(jiffies, info->last_access + HZ/2)) {
41642 +
41643 +               /* check to see if a card is fitted */
41644 +               result = sddr55_status (us);
41645 +               if (result) {
41646 +                       result = sddr55_status (us);
41647 +                       if (!result) {
41648 +                       set_sense_info (6, 0x28, 0);    /* new media, set unit attention, not ready to ready */
41649 +                       }
41650 +                       return USB_STOR_TRANSPORT_FAILED;
41651 +               }
41652 +       }
41653 +
41654 +       /* if we detected a problem with the map when writing, don't allow any more access */
41655 +       if (info->fatal_error) {
41656 +
41657 +               set_sense_info (3, 0x31, 0);
41658 +               return USB_STOR_TRANSPORT_FAILED;
41659 +       }
41660 +
41661 +       if (srb->cmnd[0] == READ_CAPACITY) {
41662 +
41663 +               capacity = sddr55_get_capacity(us);
41664 +
41665 +               if (!capacity) {
41666 +                       set_sense_info (3, 0x30, 0);    /* incompatible medium */
41667 +                       return USB_STOR_TRANSPORT_FAILED;
41668 +               }
41669 +
41670 +               info->capacity = capacity;
41671 +
41672 +                /* figure out the maximum logical block number, allowing for the fact
41673 +                 * that only 250 out of every 256 are used */
41674 +               info->max_log_blks = ((info->capacity >> (info->pageshift + info->blockshift)) / 256) * 250;
41675 +
41676 +               /* Last page in the card, adjust as we only use 250 out of every 256 pages */
41677 +               capacity = (capacity / 256) * 250;
41678 +
41679 +               capacity /= PAGESIZE;
41680 +               capacity--;
41681 +
41682 +               ptr[0] = MSB_of(capacity>>16);
41683 +               ptr[1] = LSB_of(capacity>>16);
41684 +               ptr[2] = MSB_of(capacity&0xFFFF);
41685 +               ptr[3] = LSB_of(capacity&0xFFFF);
41686 +
41687 +               // The page size
41688 +
41689 +               ptr[4] = MSB_of(PAGESIZE>>16);
41690 +               ptr[5] = LSB_of(PAGESIZE>>16);
41691 +               ptr[6] = MSB_of(PAGESIZE&0xFFFF);
41692 +               ptr[7] = LSB_of(PAGESIZE&0xFFFF);
41693 +
41694 +               sddr55_read_map(us);
41695 +
41696 +               return USB_STOR_TRANSPORT_GOOD;
41697 +       }
41698 +
41699 +       if (srb->cmnd[0] == MODE_SENSE) {
41700 +
41701 +               mode_page_01[2] = (info->read_only || info->force_read_only) ? 0x80 : 0;
41702 +
41703 +               if ( (srb->cmnd[2] & 0x3F) == 0x01 ) {
41704 +
41705 +                       US_DEBUGP(
41706 +                         "SDDR55: Dummy up request for mode page 1\n");
41707 +
41708 +                       if (ptr==NULL || 
41709 +                         srb->request_bufflen<sizeof(mode_page_01)) {
41710 +                               set_sense_info (5, 0x24, 0);    /* invalid field in command */
41711 +                               return USB_STOR_TRANSPORT_FAILED;
41712 +                       }
41713 +
41714 +                       memcpy(ptr, mode_page_01, sizeof(mode_page_01));
41715 +                       return USB_STOR_TRANSPORT_GOOD;
41716 +
41717 +               } else if ( (srb->cmnd[2] & 0x3F) == 0x3F ) {
41718 +
41719 +                       US_DEBUGP(
41720 +                         "SDDR55: Dummy up request for all mode pages\n");
41721 +
41722 +                       if (ptr==NULL || 
41723 +                         srb->request_bufflen<sizeof(mode_page_01)) {
41724 +                               set_sense_info (5, 0x24, 0);    /* invalid field in command */
41725 +                               return USB_STOR_TRANSPORT_FAILED;
41726 +                       }
41727 +
41728 +                       memcpy(ptr, mode_page_01, sizeof(mode_page_01));
41729 +                       return USB_STOR_TRANSPORT_GOOD;
41730 +               }
41731 +
41732 +               set_sense_info (5, 0x24, 0);    /* invalid field in command */
41733 +
41734 +               return USB_STOR_TRANSPORT_FAILED;
41735 +       }
41736 +
41737 +       if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) {
41738 +
41739 +               US_DEBUGP(
41740 +                 "SDDR55: %s medium removal. Not that I can do"
41741 +                 " anything about it...\n",
41742 +                 (srb->cmnd[4]&0x03) ? "Prevent" : "Allow");
41743 +
41744 +               return USB_STOR_TRANSPORT_GOOD;
41745 +
41746 +       }
41747 +
41748 +       if (srb->cmnd[0] == READ_10 || srb->cmnd[0] == WRITE_10) {
41749 +
41750 +               page = short_pack(srb->cmnd[3], srb->cmnd[2]);
41751 +               page <<= 16;
41752 +               page |= short_pack(srb->cmnd[5], srb->cmnd[4]);
41753 +               pages = short_pack(srb->cmnd[8], srb->cmnd[7]);
41754 +
41755 +               page <<= info->smallpageshift;
41756 +
41757 +               // convert page to block and page-within-block
41758 +
41759 +               lba = page >> info->blockshift;
41760 +               page = page & info->blockmask;
41761 +
41762 +               // locate physical block corresponding to logical block
41763 +
41764 +               if (lba >= info->max_log_blks) {
41765 +
41766 +                       US_DEBUGP("Error: Requested LBA %04X exceeds maximum "
41767 +                         "block %04X\n", lba, info->max_log_blks-1);
41768 +
41769 +                       set_sense_info (5, 0x24, 0);    /* invalid field in command */
41770 +
41771 +                       return USB_STOR_TRANSPORT_FAILED;
41772 +               }
41773 +
41774 +               pba = info->lba_to_pba[lba];
41775 +
41776 +               if (srb->cmnd[0] == WRITE_10) {
41777 +                       US_DEBUGP("WRITE_10: write block %04X (LBA %04X) page %01X"
41778 +                               " pages %d\n",
41779 +                               pba, lba, page, pages);
41780 +
41781 +                       return sddr55_write_data(us, lba, page, pages, ptr, srb->use_sg);
41782 +               } else {
41783 +                       US_DEBUGP("READ_10: read block %04X (LBA %04X) page %01X"
41784 +                               " pages %d\n",
41785 +                               pba, lba, page, pages);
41786 +
41787 +                       return sddr55_read_data(us, lba, page, pages, ptr, srb->use_sg);
41788 +               }
41789 +       }
41790 +
41791 +
41792 +       if (srb->cmnd[0] == TEST_UNIT_READY) {
41793 +               return USB_STOR_TRANSPORT_GOOD;
41794 +       }
41795 +
41796 +       if (srb->cmnd[0] == START_STOP) {
41797 +               return USB_STOR_TRANSPORT_GOOD;
41798 +       }
41799 +
41800 +       set_sense_info (5, 0x20, 0);    /* illegal command */
41801 +
41802 +       return USB_STOR_TRANSPORT_FAILED; // FIXME: sense buffer?
41803 +}
41804 +
41805 diff -Nur linux-2.4.19.org/drivers/usb/storage/sddr55.h linux-2.4.19/drivers/usb/storage/sddr55.h
41806 --- linux-2.4.19.org/drivers/usb/storage/sddr55.h       Thu Jan  1 01:00:00 1970
41807 +++ linux-2.4.19/drivers/usb/storage/sddr55.h   Thu Oct 31 08:11:26 2002
41808 @@ -0,0 +1,34 @@
41809 +/* Driver for SanDisk SDDR-55 SmartMedia reader
41810 + * Header File
41811 + *
41812 + * $Id$
41813 + *
41814 + * Current development and maintenance by:
41815 + *   (c) 2002 Simon Munton
41816 + *
41817 + * See sddr55.c for more explanation
41818 + *
41819 + * This program is free software; you can redistribute it and/or modify it
41820 + * under the terms of the GNU General Public License as published by the
41821 + * Free Software Foundation; either version 2, or (at your option) any
41822 + * later version.
41823 + *
41824 + * This program is distributed in the hope that it will be useful, but
41825 + * WITHOUT ANY WARRANTY; without even the implied warranty of
41826 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
41827 + * General Public License for more details.
41828 + *
41829 + * You should have received a copy of the GNU General Public License along
41830 + * with this program; if not, write to the Free Software Foundation, Inc.,
41831 + * 675 Mass Ave, Cambridge, MA 02139, USA.
41832 + */
41833 +
41834 +#ifndef _USB_SHUTTLE_EUSB_SDDR55_H
41835 +#define _USB_SHUTTLE_EUSB_SDDR55_H
41836 +
41837 +/* Sandisk SDDR-55 stuff */
41838 +
41839 +extern int sddr55_transport(Scsi_Cmnd *srb, struct us_data *us);
41840 +extern int sddr55_reset(struct us_data *us);
41841 +
41842 +#endif
41843 diff -Nur linux-2.4.19.org/drivers/usb/storage/transport.c linux-2.4.19/drivers/usb/storage/transport.c
41844 --- linux-2.4.19.org/drivers/usb/storage/transport.c    Sat Aug  3 02:39:45 2002
41845 +++ linux-2.4.19/drivers/usb/storage/transport.c        Thu Oct 31 08:11:26 2002
41846 @@ -346,7 +346,7 @@
41847  /* This is the completion handler which will wake us up when an URB
41848   * completes.
41849   */
41850 -static void usb_stor_blocking_completion(urb_t *urb)
41851 +static void usb_stor_blocking_completion(struct urb *urb)
41852  {
41853         struct completion *urb_done_ptr = (struct completion *)urb->context;
41854  
41855 @@ -360,24 +360,23 @@
41856                          u8 request, u8 requesttype, u16 value, u16 index, 
41857                          void *data, u16 size)
41858  {
41859 -       struct completion urb_done;
41860         int status;
41861 -       devrequest *dr;
41862 +       struct usb_ctrlrequest *dr;
41863  
41864         /* allocate the device request structure */
41865 -       dr = kmalloc(sizeof(devrequest), GFP_NOIO);
41866 +       dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_NOIO);
41867         if (!dr)
41868                 return -ENOMEM;
41869  
41870         /* fill in the structure */
41871 -       dr->requesttype = requesttype;
41872 -       dr->request = request;
41873 -       dr->value = cpu_to_le16(value);
41874 -       dr->index = cpu_to_le16(index);
41875 -       dr->length = cpu_to_le16(size);
41876 +       dr->bRequestType = requesttype;
41877 +       dr->bRequest = request;
41878 +       dr->wValue = cpu_to_le16(value);
41879 +       dr->wIndex = cpu_to_le16(index);
41880 +       dr->wLength = cpu_to_le16(size);
41881  
41882         /* set up data structures for the wakeup system */
41883 -       init_completion(&urb_done);
41884 +       init_completion(&us->current_done);
41885  
41886         /* lock the URB */
41887         down(&(us->current_urb_sem));
41888 @@ -385,7 +384,7 @@
41889         /* fill the URB */
41890         FILL_CONTROL_URB(us->current_urb, us->pusb_dev, pipe, 
41891                          (unsigned char*) dr, data, size, 
41892 -                        usb_stor_blocking_completion, &urb_done);
41893 +                        usb_stor_blocking_completion, &us->current_done);
41894         us->current_urb->actual_length = 0;
41895         us->current_urb->error_count = 0;
41896         us->current_urb->transfer_flags = USB_ASYNC_UNLINK;
41897 @@ -401,7 +400,7 @@
41898  
41899         /* wait for the completion of the URB */
41900         up(&(us->current_urb_sem));
41901 -       wait_for_completion(&urb_done);
41902 +       wait_for_completion(&us->current_done);
41903         down(&(us->current_urb_sem));
41904  
41905         /* return the actual length of the data transferred if no error*/
41906 @@ -421,18 +420,17 @@
41907  int usb_stor_bulk_msg(struct us_data *us, void *data, int pipe,
41908                       unsigned int len, unsigned int *act_len)
41909  {
41910 -       struct completion urb_done;
41911         int status;
41912  
41913         /* set up data structures for the wakeup system */
41914 -       init_completion(&urb_done);
41915 +       init_completion(&us->current_done);
41916  
41917         /* lock the URB */
41918         down(&(us->current_urb_sem));
41919  
41920         /* fill the URB */
41921         FILL_BULK_URB(us->current_urb, us->pusb_dev, pipe, data, len,
41922 -                     usb_stor_blocking_completion, &urb_done);
41923 +                     usb_stor_blocking_completion, &us->current_done);
41924         us->current_urb->actual_length = 0;
41925         us->current_urb->error_count = 0;
41926         us->current_urb->transfer_flags = USB_ASYNC_UNLINK;
41927 @@ -447,7 +445,7 @@
41928  
41929         /* wait for the completion of the URB */
41930         up(&(us->current_urb_sem));
41931 -       wait_for_completion(&urb_done);
41932 +       wait_for_completion(&us->current_done);
41933         down(&(us->current_urb_sem));
41934  
41935         /* return the actual length of the data transferred */
41936 @@ -1040,10 +1038,15 @@
41937  /* Determine what the maximum LUN supported is */
41938  int usb_stor_Bulk_max_lun(struct us_data *us)
41939  {
41940 -       unsigned char data;
41941 +       unsigned char *data;
41942         int result;
41943         int pipe;
41944  
41945 +       data = kmalloc(sizeof *data, GFP_KERNEL);
41946 +       if (!data) {
41947 +               return 0;
41948 +       }
41949 +
41950         /* issue the command -- use usb_control_msg() because
41951          *  the state machine is not yet alive */
41952         pipe = usb_rcvctrlpipe(us->pusb_dev, 0);
41953 @@ -1051,14 +1054,19 @@
41954                                  US_BULK_GET_MAX_LUN, 
41955                                  USB_DIR_IN | USB_TYPE_CLASS | 
41956                                  USB_RECIP_INTERFACE,
41957 -                                0, us->ifnum, &data, sizeof(data), HZ);
41958 +                                0, us->ifnum, data, sizeof(data), HZ);
41959  
41960         US_DEBUGP("GetMaxLUN command result is %d, data is %d\n", 
41961 -                 result, data);
41962 +                 result, *data);
41963  
41964         /* if we have a successful request, return the result */
41965 -       if (result == 1)
41966 -               return data;
41967 +       if (result == 1) {
41968 +               result = *data;
41969 +               kfree(data);
41970 +               return result;
41971 +       } else {
41972 +               kfree(data);
41973 +       }
41974  
41975         /* if we get a STALL, clear the stall */
41976         if (result == -EPIPE) {
41977 @@ -1077,41 +1085,54 @@
41978  
41979  int usb_stor_Bulk_transport(Scsi_Cmnd *srb, struct us_data *us)
41980  {
41981 -       struct bulk_cb_wrap bcb;
41982 -       struct bulk_cs_wrap bcs;
41983 +       struct bulk_cb_wrap *bcb;
41984 +       struct bulk_cs_wrap *bcs;
41985         int result;
41986         int pipe;
41987         int partial;
41988 +       int ret = USB_STOR_TRANSPORT_ERROR;
41989 +
41990 +       bcb = kmalloc(sizeof *bcb, in_interrupt() ? GFP_ATOMIC : GFP_NOIO);
41991 +       if (!bcb) {
41992 +               return USB_STOR_TRANSPORT_ERROR;
41993 +       }
41994 +       bcs = kmalloc(sizeof *bcs, in_interrupt() ? GFP_ATOMIC : GFP_NOIO);
41995 +       if (!bcs) {
41996 +               kfree(bcb);
41997 +               return USB_STOR_TRANSPORT_ERROR;
41998 +       }
41999  
42000         /* set up the command wrapper */
42001 -       bcb.Signature = cpu_to_le32(US_BULK_CB_SIGN);
42002 -       bcb.DataTransferLength = cpu_to_le32(usb_stor_transfer_length(srb));
42003 -       bcb.Flags = srb->sc_data_direction == SCSI_DATA_READ ? 1 << 7 : 0;
42004 -       bcb.Tag = srb->serial_number;
42005 -       bcb.Lun = srb->cmnd[1] >> 5;
42006 +       bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN);
42007 +       bcb->DataTransferLength = cpu_to_le32(usb_stor_transfer_length(srb));
42008 +       bcb->Flags = srb->sc_data_direction == SCSI_DATA_READ ? 1 << 7 : 0;
42009 +       bcb->Tag = srb->serial_number;
42010 +       bcb->Lun = srb->cmnd[1] >> 5;
42011         if (us->flags & US_FL_SCM_MULT_TARG)
42012 -               bcb.Lun |= srb->target << 4;
42013 -       bcb.Length = srb->cmd_len;
42014 +               bcb->Lun |= srb->target << 4;
42015 +       bcb->Length = srb->cmd_len;
42016  
42017         /* construct the pipe handle */
42018         pipe = usb_sndbulkpipe(us->pusb_dev, us->ep_out);
42019  
42020         /* copy the command payload */
42021 -       memset(bcb.CDB, 0, sizeof(bcb.CDB));
42022 -       memcpy(bcb.CDB, srb->cmnd, bcb.Length);
42023 +       memset(bcb->CDB, 0, sizeof(bcb->CDB));
42024 +       memcpy(bcb->CDB, srb->cmnd, bcb->Length);
42025  
42026         /* send it to out endpoint */
42027         US_DEBUGP("Bulk command S 0x%x T 0x%x Trg %d LUN %d L %d F %d CL %d\n",
42028 -                 le32_to_cpu(bcb.Signature), bcb.Tag,
42029 -                 (bcb.Lun >> 4), (bcb.Lun & 0x0F), 
42030 -                 bcb.DataTransferLength, bcb.Flags, bcb.Length);
42031 -       result = usb_stor_bulk_msg(us, &bcb, pipe, US_BULK_CB_WRAP_LEN, 
42032 +                 le32_to_cpu(bcb->Signature), bcb->Tag,
42033 +                 (bcb->Lun >> 4), (bcb->Lun & 0x0F), 
42034 +                 bcb->DataTransferLength, bcb->Flags, bcb->Length);
42035 +       result = usb_stor_bulk_msg(us, bcb, pipe, US_BULK_CB_WRAP_LEN, 
42036                                    &partial);
42037         US_DEBUGP("Bulk command transfer result=%d\n", result);
42038  
42039         /* if the command was aborted, indicate that */
42040 -       if (result == -ENOENT)
42041 -               return USB_STOR_TRANSPORT_ABORTED;
42042 +       if (result == -ENOENT) {
42043 +               ret = USB_STOR_TRANSPORT_ABORTED;
42044 +               goto out;
42045 +       }
42046  
42047         /* if we stall, we need to clear it before we go on */
42048         if (result == -EPIPE) {
42049 @@ -1119,25 +1140,30 @@
42050                 result = usb_stor_clear_halt(us, pipe);
42051  
42052                 /* if the command was aborted, indicate that */
42053 -               if (result == -ENOENT)
42054 -                       return USB_STOR_TRANSPORT_ABORTED;
42055 +               if (result == -ENOENT) {
42056 +                       ret = USB_STOR_TRANSPORT_ABORTED;
42057 +                       goto out;
42058 +               }
42059                 result = -EPIPE;
42060         } else if (result) {
42061                 /* unknown error -- we've got a problem */
42062 -               return USB_STOR_TRANSPORT_ERROR;
42063 +               ret = USB_STOR_TRANSPORT_ERROR;
42064 +               goto out;
42065         }
42066  
42067         /* if the command transfered well, then we go to the data stage */
42068         if (result == 0) {
42069                 /* send/receive data payload, if there is any */
42070 -               if (bcb.DataTransferLength) {
42071 +               if (bcb->DataTransferLength) {
42072                         usb_stor_transfer(srb, us);
42073                         result = srb->result;
42074                         US_DEBUGP("Bulk data transfer result 0x%x\n", result);
42075  
42076                         /* if it was aborted, we need to indicate that */
42077 -                       if (result == US_BULK_TRANSFER_ABORTED)
42078 -                               return USB_STOR_TRANSPORT_ABORTED;
42079 +                       if (result == US_BULK_TRANSFER_ABORTED) {
42080 +                               ret = USB_STOR_TRANSPORT_ABORTED;
42081 +                               goto out;
42082 +                       }
42083                 }
42084         }
42085  
42086 @@ -1150,12 +1176,14 @@
42087  
42088         /* get CSW for device status */
42089         US_DEBUGP("Attempting to get CSW...\n");
42090 -       result = usb_stor_bulk_msg(us, &bcs, pipe, US_BULK_CS_WRAP_LEN, 
42091 +       result = usb_stor_bulk_msg(us, bcs, pipe, US_BULK_CS_WRAP_LEN, 
42092                                    &partial);
42093  
42094         /* if the command was aborted, indicate that */
42095 -       if (result == -ENOENT)
42096 -               return USB_STOR_TRANSPORT_ABORTED;
42097 +       if (result == -ENOENT) {
42098 +               ret = USB_STOR_TRANSPORT_ABORTED;
42099 +               goto out;
42100 +       }
42101  
42102         /* did the attempt to read the CSW fail? */
42103         if (result == -EPIPE) {
42104 @@ -1163,17 +1191,21 @@
42105                 result = usb_stor_clear_halt(us, pipe);
42106  
42107                 /* if the command was aborted, indicate that */
42108 -               if (result == -ENOENT)
42109 -                       return USB_STOR_TRANSPORT_ABORTED;
42110 +               if (result == -ENOENT) {
42111 +                       ret = USB_STOR_TRANSPORT_ABORTED;
42112 +                       goto out;
42113 +               }
42114  
42115                 /* get the status again */
42116                 US_DEBUGP("Attempting to get CSW (2nd try)...\n");
42117 -               result = usb_stor_bulk_msg(us, &bcs, pipe,
42118 +               result = usb_stor_bulk_msg(us, bcs, pipe,
42119                                            US_BULK_CS_WRAP_LEN, &partial);
42120  
42121                 /* if the command was aborted, indicate that */
42122 -               if (result == -ENOENT)
42123 -                       return USB_STOR_TRANSPORT_ABORTED;
42124 +               if (result == -ENOENT) {
42125 +                       ret = USB_STOR_TRANSPORT_ABORTED;
42126 +                       goto out;
42127 +               }
42128  
42129                 /* if it fails again, we need a reset and return an error*/
42130                 if (result == -EPIPE) {
42131 @@ -1181,48 +1213,60 @@
42132                         result = usb_stor_clear_halt(us, pipe);
42133  
42134                         /* if the command was aborted, indicate that */
42135 -                       if (result == -ENOENT)
42136 -                               return USB_STOR_TRANSPORT_ABORTED;
42137 -                       return USB_STOR_TRANSPORT_ERROR;
42138 +                       if (result == -ENOENT) {
42139 +                               ret = USB_STOR_TRANSPORT_ABORTED;
42140 +                       } else {
42141 +                               ret = USB_STOR_TRANSPORT_ERROR;
42142 +                       }
42143 +                       goto out;
42144                 }
42145         }
42146  
42147         /* if we still have a failure at this point, we're in trouble */
42148         US_DEBUGP("Bulk status result = %d\n", result);
42149         if (result) {
42150 -               return USB_STOR_TRANSPORT_ERROR;
42151 +               ret = USB_STOR_TRANSPORT_ERROR;
42152 +               goto out;
42153         }
42154  
42155         /* check bulk status */
42156         US_DEBUGP("Bulk status Sig 0x%x T 0x%x R %d Stat 0x%x\n",
42157 -                 le32_to_cpu(bcs.Signature), bcs.Tag, 
42158 -                 bcs.Residue, bcs.Status);
42159 -       if (bcs.Signature != cpu_to_le32(US_BULK_CS_SIGN) || 
42160 -           bcs.Tag != bcb.Tag || 
42161 -           bcs.Status > US_BULK_STAT_PHASE || partial != 13) {
42162 +                 le32_to_cpu(bcs->Signature), bcs->Tag, 
42163 +                 bcs->Residue, bcs->Status);
42164 +       if (bcs->Signature != cpu_to_le32(US_BULK_CS_SIGN) || 
42165 +           bcs->Tag != bcb->Tag || 
42166 +           bcs->Status > US_BULK_STAT_PHASE || partial != 13) {
42167                 US_DEBUGP("Bulk logical error\n");
42168 -               return USB_STOR_TRANSPORT_ERROR;
42169 +               ret = USB_STOR_TRANSPORT_ERROR;
42170 +               goto out;
42171         }
42172  
42173         /* based on the status code, we report good or bad */
42174 -       switch (bcs.Status) {
42175 +       switch (bcs->Status) {
42176                 case US_BULK_STAT_OK:
42177                         /* command good -- note that data could be short */
42178 -                       return USB_STOR_TRANSPORT_GOOD;
42179 +                       ret = USB_STOR_TRANSPORT_GOOD;
42180 +                       goto out;
42181  
42182                 case US_BULK_STAT_FAIL:
42183                         /* command failed */
42184 -                       return USB_STOR_TRANSPORT_FAILED;
42185 +                       ret = USB_STOR_TRANSPORT_FAILED;
42186 +                       goto out;
42187  
42188                 case US_BULK_STAT_PHASE:
42189                         /* phase error -- note that a transport reset will be
42190                          * invoked by the invoke_transport() function
42191                          */
42192 -                       return USB_STOR_TRANSPORT_ERROR;
42193 +                       ret = USB_STOR_TRANSPORT_ERROR;
42194 +                       goto out;
42195         }
42196  
42197         /* we should never get here, but if we do, we're in trouble */
42198 -       return USB_STOR_TRANSPORT_ERROR;
42199 +
42200 + out:
42201 +       kfree(bcb);
42202 +       kfree(bcs);
42203 +       return ret;
42204  }
42205  
42206  /***********************************************************************
42207 diff -Nur linux-2.4.19.org/drivers/usb/storage/transport.h linux-2.4.19/drivers/usb/storage/transport.h
42208 --- linux-2.4.19.org/drivers/usb/storage/transport.h    Sat Aug  3 02:39:45 2002
42209 +++ linux-2.4.19/drivers/usb/storage/transport.h        Thu Oct 31 08:11:26 2002
42210 @@ -58,6 +58,9 @@
42211  #define US_PR_EUSB_SDDR09      0x81    /* SCM-SCSI bridge for
42212                                                 SDDR-09 */
42213  #endif
42214 +#ifdef CONFIG_USB_STORAGE_SDDR55
42215 +#define US_PR_SDDR55   0x82            /* SDDR-55 (made up) */
42216 +#endif
42217  #define US_PR_DPCM_USB  0xf0           /* Combination CB/SDDR09 */
42218  
42219  #ifdef CONFIG_USB_STORAGE_FREECOM
42220 diff -Nur linux-2.4.19.org/drivers/usb/storage/unusual_devs.h linux-2.4.19/drivers/usb/storage/unusual_devs.h
42221 --- linux-2.4.19.org/drivers/usb/storage/unusual_devs.h Sat Aug  3 02:39:45 2002
42222 +++ linux-2.4.19/drivers/usb/storage/unusual_devs.h     Thu Oct 31 08:11:26 2002
42223 @@ -65,6 +65,17 @@
42224                 US_SC_8070, US_PR_SCM_ATAPI, init_8200e, 0), 
42225  #endif
42226  
42227 +/* Deduced by Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
42228 + * Entry needed for flags: US_FL_FIX_INQUIRY because initial inquiry message
42229 + * always fails and confuses drive; without US_FL_START_STOP, drive accesses
42230 + * (read or write) all fail.
42231 + */
42232 +UNUSUAL_DEV(  0x0411, 0x001c, 0x0113, 0x0113,
42233 +               "Buffalo",
42234 +               "DUB-P40G HDD",
42235 +               US_SC_SCSI, US_PR_BULK, NULL,
42236 +               US_FL_FIX_INQUIRY | US_FL_START_STOP),
42237 +
42238  #ifdef CONFIG_USB_STORAGE_DPCM
42239  UNUSUAL_DEV(  0x0436, 0x0005, 0x0100, 0x0100,
42240                 "Microtech",
42241 @@ -292,6 +303,13 @@
42242                 US_FL_MODE_XLATE ),
42243  #endif
42244  
42245 +/* Reported by Blake Matheny <bmatheny@purdue.edu> */
42246 +UNUSUAL_DEV(  0x05dc, 0xb002, 0x0000, 0x0113,
42247 +               "Lexar",
42248 +               "USB CF Reader",
42249 +               US_SC_SCSI, US_PR_BULK, NULL,
42250 +               US_FL_FIX_INQUIRY ),
42251 +
42252  /* Reported by Carlos Villegas <cav@uniscope.co.jp>
42253   * This device needs an INQUIRY of exactly 36-bytes to function.
42254   * That is the only reason this entry is needed.
42255 @@ -306,8 +324,10 @@
42256   * Like the SIIG unit above, this unit needs an INQUIRY to ask for exactly
42257   * 36 bytes of data.  No more, no less. That is the only reason this entry
42258   * is needed.
42259 - */
42260 -UNUSUAL_DEV(  0x05e3, 0x0702, 0x0000, 0xffff,
42261 + *
42262 + * ST818 slim drives (rev 0.02) don't need special care.
42263 +*/
42264 +UNUSUAL_DEV(  0x05e3, 0x0702, 0x0000, 0x0001,
42265                 "EagleTec",
42266                 "External Hard Disk",
42267                 US_SC_SCSI, US_PR_BULK, NULL,
42268 @@ -342,6 +362,12 @@
42269                  US_SC_SCSI, US_PR_BULK, NULL,
42270                  US_FL_START_STOP ),
42271  
42272 +UNUSUAL_DEV( 0x0686, 0x400b, 0x0001, 0x0001, 
42273 +               "Minolta", 
42274 +               "Dimage 7i", 
42275 +               US_SC_SCSI, US_PR_BULK, NULL, 
42276 +               US_FL_START_STOP ),
42277 +
42278  UNUSUAL_DEV(  0x0693, 0x0002, 0x0100, 0x0100, 
42279                 "Hagiwara",
42280                 "FlashGate SmartMedia",
42281 @@ -488,17 +514,22 @@
42282                  0 ),
42283  #endif
42284  
42285 -/* Submitted by Brian Hall <brihall@bigfoot.com>
42286 +/* Submitted by Brian Hall <brihall@pcisys.net>
42287   * Needed for START_STOP flag */
42288  UNUSUAL_DEV(  0x0c76, 0x0003, 0x0100, 0x0100,
42289                 "JMTek",
42290                 "USBDrive",
42291                 US_SC_SCSI, US_PR_BULK, NULL,
42292                 US_FL_START_STOP ),
42293 +UNUSUAL_DEV(  0x0c76, 0x0005, 0x0100, 0x0100,
42294 +               "JMTek",
42295 +               "USBDrive",
42296 +               US_SC_SCSI, US_PR_BULK, NULL,
42297 +               US_FL_START_STOP ),
42298  
42299  /* Reported by Dan Pilone <pilone@slac.com>
42300   * The device needs the flags only.
42301 - * Also reported by Brian Hall <brihall@bigfoot.com>, again for flags.
42302 + * Also reported by Brian Hall <brihall@pcisys.net>, again for flags.
42303   * I also suspect this device may have a broken serial number.
42304   */
42305  UNUSUAL_DEV(  0x1065, 0x2136, 0x0000, 0x9999,
42306 @@ -506,3 +537,11 @@
42307                 "EasyDisk Portable Device",
42308                 US_SC_SCSI, US_PR_BULK, NULL,
42309                 US_FL_MODE_XLATE | US_FL_START_STOP),
42310 +
42311 +#ifdef CONFIG_USB_STORAGE_SDDR55
42312 +UNUSUAL_DEV(  0x55aa, 0xa103, 0x0000, 0x9999, 
42313 +               "Sandisk",
42314 +               "ImageMate SDDR55",
42315 +               US_SC_SCSI, US_PR_SDDR55, NULL,
42316 +               US_FL_SINGLE_LUN),
42317 +#endif
42318 diff -Nur linux-2.4.19.org/drivers/usb/storage/usb.c linux-2.4.19/drivers/usb/storage/usb.c
42319 --- linux-2.4.19.org/drivers/usb/storage/usb.c  Sat Aug  3 02:39:45 2002
42320 +++ linux-2.4.19/drivers/usb/storage/usb.c      Thu Oct 31 08:11:26 2002
42321 @@ -60,6 +60,9 @@
42322  #ifdef CONFIG_USB_STORAGE_SDDR09
42323  #include "sddr09.h"
42324  #endif
42325 +#ifdef CONFIG_USB_STORAGE_SDDR55
42326 +#include "sddr55.h"
42327 +#endif
42328  #ifdef CONFIG_USB_STORAGE_DPCM
42329  #include "dpcm.h"
42330  #endif
42331 @@ -863,6 +866,15 @@
42332                         ss->max_lun = 0;
42333                         break;
42334  #endif
42335 +
42336 +#ifdef CONFIG_USB_STORAGE_SDDR55
42337 +               case US_PR_SDDR55:
42338 +                       ss->transport_name = "SDDR55";
42339 +                       ss->transport = sddr55_transport;
42340 +                       ss->transport_reset = sddr55_reset;
42341 +                       ss->max_lun = 0;
42342 +                       break;
42343 +#endif
42344  
42345  #ifdef CONFIG_USB_STORAGE_DPCM
42346                 case US_PR_DPCM_USB:
42347 diff -Nur linux-2.4.19.org/drivers/usb/storage/usb.h linux-2.4.19/drivers/usb/storage/usb.h
42348 --- linux-2.4.19.org/drivers/usb/storage/usb.h  Thu Nov 22 20:49:34 2001
42349 +++ linux-2.4.19/drivers/usb/storage/usb.h      Thu Oct 31 08:11:26 2002
42350 @@ -166,6 +166,7 @@
42351         /* control and bulk communications data */
42352         struct semaphore        current_urb_sem; /* to protect irq_urb   */
42353         struct urb              *current_urb;    /* non-int USB requests */
42354 +       struct completion       current_done;    /* the done flag        */
42355  
42356         /* the semaphore for sleeping the control thread */
42357         struct semaphore        sema;            /* to sleep thread on   */
42358 diff -Nur linux-2.4.19.org/drivers/usb/stv680.c linux-2.4.19/drivers/usb/stv680.c
42359 --- linux-2.4.19.org/drivers/usb/stv680.c       Sat Aug  3 02:39:45 2002
42360 +++ linux-2.4.19/drivers/usb/stv680.c   Thu Oct 31 08:11:26 2002
42361 @@ -86,7 +86,7 @@
42362  #define PDEBUG(level, fmt, args...) \
42363         do { \
42364         if (debug >= level)     \
42365 -               info("[" __PRETTY_FUNCTION__ ":%d] " fmt, __LINE__ , ## args);  \
42366 +               info("[%s:%d] " fmt, __PRETTY_FUNCTION__, __LINE__ , ## args);  \
42367         } while (0)
42368  
42369  
42370 @@ -111,67 +111,27 @@
42371   *
42372   * Memory management
42373   *
42374 - * This is a shameless copy from the USB-cpia driver (linux kernel
42375 - * version 2.3.29 or so, I have no idea what this code actually does ;).
42376 - * Actually it seems to be a copy of a shameless copy of the bttv-driver.
42377 - * Or that is a copy of a shameless copy of ... (To the powers: is there
42378 - * no generic kernel-function to do this sort of stuff?)
42379 - *
42380 - * Yes, it was a shameless copy from the bttv-driver. IIRC, Alan says
42381 - * there will be one, but apparentely not yet -jerdfelt
42382 - *
42383 - * So I copied it again for the ov511 driver -claudio
42384 - *
42385 - * Same for the se401 driver -Jeroen
42386 - *
42387 - * And the STV0680 driver - Kevin
42388   ********************************************************************/
42389  
42390 -/* Given PGD from the address space's page table, return the kernel
42391 - * virtual mapping of the physical memory mapped at ADR.
42392 - */
42393 -static inline unsigned long uvirt_to_kva (pgd_t * pgd, unsigned long adr)
42394 -{
42395 -       unsigned long ret = 0UL;
42396 -       pmd_t *pmd;
42397 -       pte_t *ptep, pte;
42398 -
42399 -       if (!pgd_none (*pgd)) {
42400 -               pmd = pmd_offset (pgd, adr);
42401 -               if (!pmd_none (*pmd)) {
42402 -                       ptep = pte_offset (pmd, adr);
42403 -                       pte = *ptep;
42404 -                       if (pte_present (pte)) {
42405 -                               ret = (unsigned long) page_address (pte_page (pte));
42406 -                               ret |= (adr & (PAGE_SIZE - 1));
42407 -                       }
42408 -               }
42409 -       }
42410 -       return ret;
42411 -}
42412 -
42413 -/* Here we want the physical address of the memory. This is used when 
42414 - * initializing the contents of the area and marking the pages as reserved.
42415 +/* Here we want the physical address of the memory.
42416 + * This is used when initializing the contents of the area.
42417   */
42418  static inline unsigned long kvirt_to_pa (unsigned long adr)
42419  {
42420 -       unsigned long va, kva, ret;
42421 +       unsigned long kva, ret;
42422  
42423 -       va = VMALLOC_VMADDR (adr);
42424 -       kva = uvirt_to_kva (pgd_offset_k (va), va);
42425 -       ret = __pa (kva);
42426 +       kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
42427 +       kva |= adr & (PAGE_SIZE-1); /* restore the offset */
42428 +       ret = __pa(kva);
42429         return ret;
42430  }
42431  
42432  static void *rvmalloc (unsigned long size)
42433  {
42434         void *mem;
42435 -       unsigned long adr, page;
42436 -
42437 -       /* Round it off to PAGE_SIZE */
42438 -       size += (PAGE_SIZE - 1);
42439 -       size &= ~(PAGE_SIZE - 1);
42440 +       unsigned long adr;
42441  
42442 +       size = PAGE_ALIGN(size);
42443         mem = vmalloc_32 (size);
42444         if (!mem)
42445                 return NULL;
42446 @@ -179,36 +139,25 @@
42447         memset (mem, 0, size);  /* Clear the ram out, no junk to the user */
42448         adr = (unsigned long) mem;
42449         while (size > 0) {
42450 -               page = kvirt_to_pa (adr);
42451 -               mem_map_reserve (virt_to_page (__va (page)));
42452 +               mem_map_reserve(vmalloc_to_page((void *)adr));
42453                 adr += PAGE_SIZE;
42454 -               if (size > PAGE_SIZE)
42455 -                       size -= PAGE_SIZE;
42456 -               else
42457 -                       size = 0;
42458 +               size -= PAGE_SIZE;
42459         }
42460         return mem;
42461  }
42462  
42463  static void rvfree (void *mem, unsigned long size)
42464  {
42465 -       unsigned long adr, page;
42466 +       unsigned long adr;
42467  
42468         if (!mem)
42469                 return;
42470  
42471 -       size += (PAGE_SIZE - 1);
42472 -       size &= ~(PAGE_SIZE - 1);
42473 -
42474         adr = (unsigned long) mem;
42475 -       while (size > 0) {
42476 -               page = kvirt_to_pa (adr);
42477 -               mem_map_unreserve (virt_to_page (__va (page)));
42478 +       while ((long) size > 0) {
42479 +               mem_map_unreserve(vmalloc_to_page((void *)adr));
42480                 adr += PAGE_SIZE;
42481 -               if (size > PAGE_SIZE)
42482 -                       size -= PAGE_SIZE;
42483 -               else
42484 -                       size = 0;
42485 +               size -= PAGE_SIZE;
42486         }
42487         vfree (mem);
42488  }
42489 @@ -772,7 +721,7 @@
42490  
42491  static int stv680_start_stream (struct usb_stv *stv680)
42492  {
42493 -       urb_t *urb;
42494 +       struct urb *urb;
42495         int err = 0, i;
42496  
42497         stv680->streaming = 1;
42498 @@ -1123,6 +1072,9 @@
42499                         errors++;
42500                 }
42501                 wait_event_interruptible (stv680->wq, (stv680->scratch[stv680->scratch_use].state == BUFFER_READY));
42502 +               
42503 +               if (stv680->removed)
42504 +                       return -ENODEV;
42505  
42506                 if (stv680->nullpackets > STV680_MAX_NULLPACKETS) {
42507                         stv680->nullpackets = 0;
42508 @@ -1191,10 +1143,10 @@
42509  
42510         for (i = 0; i < STV680_NUMFRAMES; i++)
42511                 stv680->frame[i].grabstate = FRAME_UNUSED;
42512 -       if (stv680->streaming)
42513 +       if (stv680->streaming && !stv680->removed)
42514                 stv680_stop_stream (stv680);
42515  
42516 -       if ((i = stv_stop_video (stv680)) < 0)
42517 +       if ((!stv680->removed) && (i = stv_stop_video (stv680)) < 0)
42518                 PDEBUG (1, "STV(e): stop_video failed in stv_close");
42519  
42520         rvfree (stv680->fbuf, stv680->maxframesize * STV680_NUMFRAMES);
42521 @@ -1220,6 +1172,9 @@
42522  
42523         if (!stv680->udev)
42524                 return -EIO;
42525 +               
42526 +       if (stv680->removed)
42527 +               return -ENODEV;
42528  
42529         switch (cmd) {
42530         case VIDIOCGCAP:{
42531 @@ -1545,7 +1500,7 @@
42532         initialize:     stv_init_done,
42533  };
42534  
42535 -static void *__devinit stv680_probe (struct usb_device *dev, unsigned int ifnum, const struct usb_device_id *id)
42536 +static void *stv680_probe (struct usb_device *dev, unsigned int ifnum, const struct usb_device_id *id)
42537  {
42538         struct usb_interface_descriptor *interface;
42539         struct usb_stv *stv680;
42540 @@ -1629,6 +1584,7 @@
42541  static void stv680_disconnect (struct usb_device *dev, void *ptr)
42542  {
42543         struct usb_stv *stv680 = (struct usb_stv *) ptr;
42544 +       int i;
42545  
42546         lock_kernel ();
42547         /* We don't want people trying to open up the device */
42548 @@ -1637,6 +1593,9 @@
42549                 usb_stv680_remove_disconnected (stv680);
42550         } else {
42551                 stv680->removed = 1;
42552 +               for( i = 0; i < STV680_NUMSBUF; i++)
42553 +                       usb_unlink_urb(stv680->urb[i]);
42554 +               wake_up_interruptible (&stv680->wq);
42555         }
42556         unlock_kernel ();
42557  }
42558 diff -Nur linux-2.4.19.org/drivers/usb/stv680.h linux-2.4.19/drivers/usb/stv680.h
42559 --- linux-2.4.19.org/drivers/usb/stv680.h       Mon Feb 25 20:38:07 2002
42560 +++ linux-2.4.19/drivers/usb/stv680.h   Thu Oct 31 08:11:26 2002
42561 @@ -45,7 +45,7 @@
42562  /* fmt 4 */
42563  #define STV_VIDEO_PALETTE       VIDEO_PALETTE_RGB24
42564  
42565 -static __devinitdata struct usb_device_id device_table[] = {
42566 +static struct usb_device_id device_table[] = {
42567         {USB_DEVICE (USB_PENCAM_VENDOR_ID, USB_PENCAM_PRODUCT_ID)},
42568         {}
42569  };
42570 @@ -118,7 +118,7 @@
42571         int removed;            /* device disconnected */
42572         int streaming;          /* Are we streaming video? */
42573         char *fbuf;             /* Videodev buffer area */
42574 -       urb_t *urb[STV680_NUMSBUF];     /* # of queued bulk transfers */
42575 +       struct urb *urb[STV680_NUMSBUF];        /* # of queued bulk transfers */
42576         int curframe;           /* Current receiving frame */
42577         struct stv680_frame frame[STV680_NUMFRAMES];    /* # frames supported by v4l part */
42578         int readcount;
42579 diff -Nur linux-2.4.19.org/drivers/usb/tiglusb.c linux-2.4.19/drivers/usb/tiglusb.c
42580 --- linux-2.4.19.org/drivers/usb/tiglusb.c      Thu Jan  1 01:00:00 1970
42581 +++ linux-2.4.19/drivers/usb/tiglusb.c  Thu Oct 31 08:11:26 2002
42582 @@ -0,0 +1,514 @@
42583 +/* Hey EMACS -*- linux-c -*-
42584 + *
42585 + * tiglusb -- Texas Instruments' USB GraphLink (aka SilverLink) driver.
42586 + * Target: Texas Instruments graphing calculators (http://lpg.ticalc.org).
42587 + *
42588 + * Copyright (C) 2001-2002:
42589 + *   Romain Lievin <roms@lpg.ticalc.org>
42590 + *   Julien BLACHE <jb@technologeek.org>
42591 + * under the terms of the GNU General Public License.
42592 + *
42593 + * Based on dabusb.c, printer.c & scanner.c
42594 + *
42595 + * Please see the file: linux/Documentation/usb/SilverLink.txt
42596 + * and the website at:  http://lpg.ticalc.org/prj_usb/
42597 + * for more info.
42598 + *
42599 + * History :
42600 + *  16/07/2002 : v1.04 -- Julien BLACHE <jb@jblache.org>
42601 + *    + removed useless usblp_cleanup()
42602 + *    + removed {un,}lock_kernel() as suggested on lkml
42603 + *    + inlined clear_pipes() (used once)
42604 + *    + inlined clear_device() (small, used twice)
42605 + *    + removed tiglusb_find_struct() (used once, simple code)
42606 + *    + replaced down() with down_interruptible() wherever possible
42607 + *    + fixed double unregistering wrt devfs, causing devfs
42608 + *      to force an oops when the device is deconnected
42609 + *    + removed unused fields from struct tiglusb_t
42610 + */
42611 +
42612 +#include <linux/module.h>
42613 +#include <linux/socket.h>
42614 +#include <linux/miscdevice.h>
42615 +#include <linux/slab.h>
42616 +#include <linux/init.h>
42617 +#include <asm/uaccess.h>
42618 +#include <linux/delay.h>
42619 +#include <linux/usb.h>
42620 +#include <linux/smp_lock.h>
42621 +#include <linux/devfs_fs_kernel.h>
42622 +
42623 +#include <linux/ticable.h>
42624 +#include "tiglusb.h"
42625 +
42626 +/*
42627 + * Version Information
42628 + */
42629 +#define DRIVER_VERSION "1.04"
42630 +#define DRIVER_AUTHOR  "Romain Lievin <roms@lpg.ticalc.org> & Julien Blache <jb@jblache.org>"
42631 +#define DRIVER_DESC    "TI-GRAPH LINK USB (aka SilverLink) driver"
42632 +#define DRIVER_LICENSE "GPL"
42633 +
42634 +/* ----- global variables --------------------------------------------- */
42635 +
42636 +static tiglusb_t tiglusb[MAXTIGL];
42637 +static int timeout = TIMAXTIME;        /* timeout in tenth of seconds     */
42638 +
42639 +static devfs_handle_t devfs_handle;
42640 +
42641 +/*---------- misc functions ------------------------------------------- */
42642 +
42643 +/*
42644 + * Re-initialize device
42645 + */
42646 +static inline int
42647 +clear_device (struct usb_device *dev)
42648 +{
42649 +       if (usb_set_configuration (dev, dev->config[0].bConfigurationValue) < 0) {
42650 +               err ("clear_device failed");
42651 +               return -1;
42652 +       }
42653 +
42654 +       return 0;
42655 +}
42656 +
42657 +/* 
42658 + * Clear input & output pipes (endpoints)
42659 + */
42660 +static inline int
42661 +clear_pipes (struct usb_device *dev)
42662 +{
42663 +       unsigned int pipe;
42664 +
42665 +       pipe = usb_sndbulkpipe (dev, 1);
42666 +       if (usb_clear_halt (dev, usb_pipeendpoint (pipe))) {
42667 +               err ("clear_pipe (r), request failed");
42668 +               return -1;
42669 +       }
42670 +
42671 +       pipe = usb_sndbulkpipe (dev, 2);
42672 +       if (usb_clear_halt (dev, usb_pipeendpoint (pipe))) {
42673 +               err ("clear_pipe (w), request failed");
42674 +               return -1;
42675 +       }
42676 +
42677 +       return 0;
42678 +}
42679 +
42680 +/* ----- file operations functions--------------------------------------- */
42681 +
42682 +static int
42683 +tiglusb_open (struct inode *inode, struct file *filp)
42684 +{
42685 +       int devnum = minor (inode->i_rdev);
42686 +       ptiglusb_t s;
42687 +
42688 +       if (devnum < TIUSB_MINOR || devnum >= (TIUSB_MINOR + MAXTIGL))
42689 +               return -EIO;
42690 +
42691 +       s = &tiglusb[devnum - TIUSB_MINOR];
42692 +
42693 +       if (down_interruptible (&s->mutex)) {
42694 +               return -ERESTARTSYS;
42695 +       }
42696 +
42697 +       while (!s->dev || s->opened) {
42698 +               up (&s->mutex);
42699 +
42700 +               if (filp->f_flags & O_NONBLOCK) {
42701 +                       return -EBUSY;
42702 +               }
42703 +
42704 +               schedule_timeout (HZ / 2);
42705 +
42706 +               if (signal_pending (current)) {
42707 +                       return -EAGAIN;
42708 +               }
42709 +
42710 +               if (down_interruptible (&s->mutex)) {
42711 +                       return -ERESTARTSYS;
42712 +               }
42713 +       }
42714 +
42715 +       s->opened = 1;
42716 +       up (&s->mutex);
42717 +
42718 +       filp->f_pos = 0;
42719 +       filp->private_data = s;
42720 +
42721 +       return 0;
42722 +}
42723 +
42724 +static int
42725 +tiglusb_release (struct inode *inode, struct file *filp)
42726 +{
42727 +       ptiglusb_t s = (ptiglusb_t) filp->private_data;
42728 +
42729 +       if (down_interruptible (&s->mutex)) {
42730 +               return -ERESTARTSYS;
42731 +       }
42732 +
42733 +       s->state = _stopped;
42734 +       up (&s->mutex);
42735 +
42736 +       if (!s->remove_pending)
42737 +               clear_device (s->dev);
42738 +       else
42739 +               wake_up (&s->remove_ok);
42740 +
42741 +       s->opened = 0;
42742 +
42743 +       return 0;
42744 +}
42745 +
42746 +static ssize_t
42747 +tiglusb_read (struct file *filp, char *buf, size_t count, loff_t * f_pos)
42748 +{
42749 +       ptiglusb_t s = (ptiglusb_t) filp->private_data;
42750 +       ssize_t ret = 0;
42751 +       int bytes_to_read = 0;
42752 +       int bytes_read = 0;
42753 +       int result = 0;
42754 +       char buffer[BULK_RCV_MAX];
42755 +       unsigned int pipe;
42756 +
42757 +       if (*f_pos)
42758 +               return -ESPIPE;
42759 +
42760 +       if (s->remove_pending)
42761 +               return -EIO;
42762 +
42763 +       if (!s->dev)
42764 +               return -EIO;
42765 +
42766 +       bytes_to_read = (count >= BULK_RCV_MAX) ? BULK_RCV_MAX : count;
42767 +
42768 +       pipe = usb_rcvbulkpipe (s->dev, 1);
42769 +       result = usb_bulk_msg (s->dev, pipe, buffer, bytes_to_read,
42770 +                              &bytes_read, HZ / (timeout / 10));
42771 +       if (result == -ETIMEDOUT) {     /* NAK */
42772 +               ret = result;
42773 +               if (!bytes_read) {
42774 +                       dbg ("quirk !");
42775 +               }
42776 +               warn ("tiglusb_read, NAK received.");
42777 +               goto out;
42778 +       } else if (result == -EPIPE) {  /* STALL -- shouldn't happen */
42779 +               warn ("clear_halt request to remove STALL condition.");
42780 +               if (usb_clear_halt (s->dev, usb_pipeendpoint (pipe)))
42781 +                       err ("clear_halt, request failed");
42782 +               clear_device (s->dev);
42783 +               ret = result;
42784 +               goto out;
42785 +       } else if (result < 0) {        /* We should not get any I/O errors */
42786 +               err ("funky result: %d. Please notify maintainer.", result);
42787 +               ret = -EIO;
42788 +               goto out;
42789 +       }
42790 +
42791 +       if (copy_to_user (buf, buffer, bytes_read)) {
42792 +               ret = -EFAULT;
42793 +       }
42794 +
42795 +      out:
42796 +       return ret ? ret : bytes_read;
42797 +}
42798 +
42799 +static ssize_t
42800 +tiglusb_write (struct file *filp, const char *buf, size_t count, loff_t * f_pos)
42801 +{
42802 +       ptiglusb_t s = (ptiglusb_t) filp->private_data;
42803 +       ssize_t ret = 0;
42804 +       int bytes_to_write = 0;
42805 +       int bytes_written = 0;
42806 +       int result = 0;
42807 +       char buffer[BULK_SND_MAX];
42808 +       unsigned int pipe;
42809 +
42810 +       if (*f_pos)
42811 +               return -ESPIPE;
42812 +
42813 +       if (s->remove_pending)
42814 +               return -EIO;
42815 +
42816 +       if (!s->dev)
42817 +               return -EIO;
42818 +
42819 +       bytes_to_write = (count >= BULK_SND_MAX) ? BULK_SND_MAX : count;
42820 +       if (copy_from_user (buffer, buf, bytes_to_write)) {
42821 +               ret = -EFAULT;
42822 +               goto out;
42823 +       }
42824 +
42825 +       pipe = usb_sndbulkpipe (s->dev, 2);
42826 +       result = usb_bulk_msg (s->dev, pipe, buffer, bytes_to_write,
42827 +                              &bytes_written, HZ / (timeout / 10));
42828 +
42829 +       if (result == -ETIMEDOUT) {     /* NAK */
42830 +               warn ("tiglusb_write, NAK received.");
42831 +               ret = result;
42832 +               goto out;
42833 +       } else if (result == -EPIPE) {  /* STALL -- shouldn't happen */
42834 +               warn ("clear_halt request to remove STALL condition.");
42835 +               if (usb_clear_halt (s->dev, usb_pipeendpoint (pipe)))
42836 +                       err ("clear_halt, request failed");
42837 +               clear_device (s->dev);
42838 +               ret = result;
42839 +               goto out;
42840 +       } else if (result < 0) {        /* We should not get any I/O errors */
42841 +               warn ("funky result: %d. Please notify maintainer.", result);
42842 +               ret = -EIO;
42843 +               goto out;
42844 +       }
42845 +
42846 +       if (bytes_written != bytes_to_write) {
42847 +               ret = -EIO;
42848 +       }
42849 +
42850 +      out:
42851 +       return ret ? ret : bytes_written;
42852 +}
42853 +
42854 +static int
42855 +tiglusb_ioctl (struct inode *inode, struct file *filp,
42856 +              unsigned int cmd, unsigned long arg)
42857 +{
42858 +       ptiglusb_t s = (ptiglusb_t) filp->private_data;
42859 +       int ret = 0;
42860 +
42861 +       if (s->remove_pending)
42862 +               return -EIO;
42863 +
42864 +       if (down_interruptible (&s->mutex)) {
42865 +               return -ERESTARTSYS;
42866 +       }
42867 +
42868 +       if (!s->dev) {
42869 +               up (&s->mutex);
42870 +               return -EIO;
42871 +       }
42872 +
42873 +       switch (cmd) {
42874 +       case IOCTL_TIUSB_TIMEOUT:
42875 +               timeout = arg;  // timeout value in tenth of seconds
42876 +               break;
42877 +       case IOCTL_TIUSB_RESET_DEVICE:
42878 +               dbg ("IOCTL_TIGLUSB_RESET_DEVICE");
42879 +               if (clear_device (s->dev))
42880 +                       ret = -EIO;
42881 +               break;
42882 +       case IOCTL_TIUSB_RESET_PIPES:
42883 +               dbg ("IOCTL_TIGLUSB_RESET_PIPES");
42884 +               if (clear_pipes (s->dev))
42885 +                       ret = -EIO;
42886 +               break;
42887 +       default:
42888 +               ret = -ENOTTY;
42889 +               break;
42890 +       }
42891 +
42892 +       up (&s->mutex);
42893 +
42894 +       return ret;
42895 +}
42896 +
42897 +/* ----- kernel module registering ------------------------------------ */
42898 +
42899 +static struct file_operations tiglusb_fops = {
42900 +       .llseek =       no_llseek,
42901 +       .read =         tiglusb_read,
42902 +       .write =        tiglusb_write,
42903 +       .ioctl =        tiglusb_ioctl,
42904 +       .open =         tiglusb_open,
42905 +       .release =      tiglusb_release,
42906 +};
42907 +
42908 +/* --- initialisation code ------------------------------------- */
42909 +
42910 +static void *
42911 +tiglusb_probe (struct usb_device *dev, unsigned int ifnum,
42912 +              const struct usb_device_id *id)
42913 +{
42914 +       int minor = -1;
42915 +       int i;
42916 +       ptiglusb_t s;
42917 +       char name[8];
42918 +
42919 +       dbg ("probing vendor id 0x%x, device id 0x%x ifnum:%d",
42920 +            dev->descriptor.idVendor, dev->descriptor.idProduct, ifnum);
42921 +
42922 +       /*
42923 +        * We don't handle multiple configurations. As of version 0x0103 of
42924 +        * the TIGL hardware, there's only 1 configuration.
42925 +        */
42926 +
42927 +       if (dev->descriptor.bNumConfigurations != 1)
42928 +               return NULL;
42929 +
42930 +       if ((dev->descriptor.idProduct != 0xe001)
42931 +           && (dev->descriptor.idVendor != 0x451))
42932 +               return NULL;
42933 +
42934 +       if (usb_set_configuration (dev, dev->config[0].bConfigurationValue) < 0) {
42935 +               err ("tiglusb_probe: set_configuration failed");
42936 +               return NULL;
42937 +       }
42938 +
42939 +       /*
42940 +        * Find a tiglusb struct
42941 +        */
42942 +       for (i = 0; i < MAXTIGL; i++) {
42943 +               ptiglusb_t s = &tiglusb[i];
42944 +               if (!s->dev) {
42945 +                       minor = i;
42946 +                       break;
42947 +               }
42948 +       }
42949 +
42950 +       if (minor == -1)
42951 +               return NULL;
42952 +
42953 +       s = &tiglusb[minor];
42954 +
42955 +       down (&s->mutex);
42956 +       s->remove_pending = 0;
42957 +       s->dev = dev;
42958 +       up (&s->mutex);
42959 +       dbg ("bound to interface: %d", ifnum);
42960 +
42961 +       sprintf (name, "%d", s->minor);
42962 +       dbg ("registering to devfs : major = %d, minor = %d, node = %s",
42963 +            TIUSB_MAJOR, (TIUSB_MINOR + s->minor), name);
42964 +       s->devfs =
42965 +           devfs_register (devfs_handle, name, DEVFS_FL_DEFAULT, TIUSB_MAJOR,
42966 +                           TIUSB_MINOR + s->minor, S_IFCHR | S_IRUGO | S_IWUGO,
42967 +                           &tiglusb_fops, NULL);
42968 +
42969 +       /* Display firmware version */
42970 +       info ("link cable version %i.%02x",
42971 +               dev->descriptor.bcdDevice >> 8,
42972 +               dev->descriptor.bcdDevice & 0xff);
42973 +
42974 +       return s;
42975 +}
42976 +
42977 +static void
42978 +tiglusb_disconnect (struct usb_device *dev, void *drv_context)
42979 +{
42980 +       ptiglusb_t s = (ptiglusb_t) drv_context;
42981 +
42982 +       if (!s || !s->dev)
42983 +               info ("bogus disconnect");
42984 +
42985 +       s->remove_pending = 1;
42986 +       wake_up (&s->wait);
42987 +       if (s->state == _started)
42988 +               sleep_on (&s->remove_ok);
42989 +       down (&s->mutex);
42990 +       s->dev = NULL;
42991 +       s->opened = 0;
42992 +
42993 +       devfs_unregister (s->devfs);
42994 +       s->devfs = NULL;
42995 +
42996 +       info ("device %d removed", s->minor);
42997 +
42998 +       up (&s->mutex);
42999 +}
43000 +
43001 +static struct usb_device_id tiglusb_ids[] = {
43002 +       {USB_DEVICE (0x0451, 0xe001)},
43003 +       {}
43004 +};
43005 +
43006 +MODULE_DEVICE_TABLE (usb, tiglusb_ids);
43007 +
43008 +static struct usb_driver tiglusb_driver = {
43009 +       .name =         "tiglusb",
43010 +       .probe =        tiglusb_probe,
43011 +       .disconnect =   tiglusb_disconnect,
43012 +       .id_table =     tiglusb_ids,
43013 +};
43014 +
43015 +/* --- initialisation code ------------------------------------- */
43016 +
43017 +#ifndef MODULE
43018 +/*
43019 + * You can use 'tiusb=timeout'
43020 + */
43021 +static int __init
43022 +tiglusb_setup (char *str)
43023 +{
43024 +       int ints[2];
43025 +
43026 +       str = get_options (str, ARRAY_SIZE (ints), ints);
43027 +
43028 +       if (ints[0] > 0) {
43029 +               timeout = ints[1];
43030 +       }
43031 +
43032 +       return 1;
43033 +}
43034 +#endif
43035 +
43036 +static int __init
43037 +tiglusb_init (void)
43038 +{
43039 +       unsigned u;
43040 +       int result;
43041 +
43042 +       /* initialize struct */
43043 +       for (u = 0; u < MAXTIGL; u++) {
43044 +               ptiglusb_t s = &tiglusb[u];
43045 +               memset (s, 0, sizeof (tiglusb_t));
43046 +               init_MUTEX (&s->mutex);
43047 +               s->dev = NULL;
43048 +               s->minor = u;
43049 +               s->opened = 0;
43050 +               init_waitqueue_head (&s->wait);
43051 +               init_waitqueue_head (&s->remove_ok);
43052 +       }
43053 +
43054 +       /* register device */
43055 +       if (devfs_register_chrdev (TIUSB_MAJOR, "tiglusb", &tiglusb_fops)) {
43056 +               err ("unable to get major %d", TIUSB_MAJOR);
43057 +               return -EIO;
43058 +       }
43059 +
43060 +       /* Use devfs, tree: /dev/ticables/usb/[0..3] */
43061 +       devfs_handle = devfs_mk_dir (NULL, "ticables/usb", NULL);
43062 +
43063 +       /* register USB module */
43064 +       result = usb_register (&tiglusb_driver);
43065 +       if (result < 0) {
43066 +               devfs_unregister_chrdev (TIUSB_MAJOR, "tiglusb");
43067 +               return -1;
43068 +       }
43069 +
43070 +       info (DRIVER_DESC ", " DRIVER_VERSION);
43071 +
43072 +       return 0;
43073 +}
43074 +
43075 +static void __exit
43076 +tiglusb_cleanup (void)
43077 +{
43078 +       usb_deregister (&tiglusb_driver);
43079 +       devfs_unregister (devfs_handle);
43080 +       devfs_unregister_chrdev (TIUSB_MAJOR, "tiglusb");
43081 +}
43082 +
43083 +/* --------------------------------------------------------------------- */
43084 +
43085 +__setup ("tiusb=", tiglusb_setup);
43086 +module_init (tiglusb_init);
43087 +module_exit (tiglusb_cleanup);
43088 +
43089 +MODULE_AUTHOR (DRIVER_AUTHOR);
43090 +MODULE_DESCRIPTION (DRIVER_DESC);
43091 +MODULE_LICENSE (DRIVER_LICENSE);
43092 +
43093 +MODULE_PARM (timeout, "i");
43094 +MODULE_PARM_DESC (timeout, "Timeout (default=1.5 seconds)");
43095 +
43096 +/* --------------------------------------------------------------------- */
43097 diff -Nur linux-2.4.19.org/drivers/usb/tiglusb.h linux-2.4.19/drivers/usb/tiglusb.h
43098 --- linux-2.4.19.org/drivers/usb/tiglusb.h      Thu Jan  1 01:00:00 1970
43099 +++ linux-2.4.19/drivers/usb/tiglusb.h  Thu Oct 31 08:11:26 2002
43100 @@ -0,0 +1,48 @@
43101 +/* Hey EMACS -*- linux-c -*-
43102 + *
43103 + * tiglusb - low level driver for SilverLink cable
43104 + *
43105 + * Copyright (C) 2000-2002, Romain Lievin <roms@lpg.ticalc.org>
43106 + * under the terms of the GNU General Public License.
43107 + *
43108 + * Redistribution of this file is permitted under the terms of the GNU
43109 + * Public License (GPL)
43110 + */
43111 +
43112 +#ifndef _TIGLUSB_H
43113 +#define _TIGLUSB_H
43114 +
43115 +/*
43116 + * Max. number of devices supported
43117 + */
43118 +#define MAXTIGL                16
43119 +
43120 +/*
43121 + * Max. packetsize for IN and OUT pipes
43122 + */
43123 +#define BULK_RCV_MAX   32
43124 +#define BULK_SND_MAX   32
43125 +
43126 +/*
43127 + * The driver context...
43128 + */
43129 +
43130 +typedef enum { _stopped=0, _started } driver_state_t;
43131 +
43132 +typedef struct
43133 +{
43134 +       struct usb_device       *dev;           /* USB device handle */
43135 +       struct semaphore        mutex;          /* locks this struct */
43136 +
43137 +       wait_queue_head_t       wait;           /* for timed waits */
43138 +       wait_queue_head_t       remove_ok;
43139 +
43140 +       int             minor;                  /* which minor dev #? */
43141 +       devfs_handle_t  devfs;                  /* devfs device */
43142 +
43143 +       driver_state_t  state;                  /* started/stopped */
43144 +       int             opened;                 /* tru if open */
43145 +       int     remove_pending;
43146 +} tiglusb_t, *ptiglusb_t;
43147 +
43148 +#endif
43149 diff -Nur linux-2.4.19.org/drivers/usb/uhci.c linux-2.4.19/drivers/usb/uhci.c
43150 --- linux-2.4.19.org/drivers/usb/uhci.c Sat Aug  3 02:39:45 2002
43151 +++ linux-2.4.19/drivers/usb/uhci.c     Thu Oct 31 08:11:26 2002
43152 @@ -57,6 +57,8 @@
43153  
43154  #include <linux/pm.h>
43155  
43156 +#include "hcd.h"
43157 +
43158  /*
43159   * Version Information
43160   */
43161 @@ -100,6 +102,11 @@
43162  #define IDLE_TIMEOUT   (HZ / 20)       /* 50 ms */
43163  #define FSBR_DELAY     (HZ / 20)       /* 50 ms */
43164  
43165 +/* When we timeout an idle transfer for FSBR, we'll switch it over to */
43166 +/* depth first traversal. We'll do it in groups of this number of TD's */
43167 +/* to make sure it doesn't hog all of the bandwidth */
43168 +#define DEPTH_INTERVAL 5
43169 +
43170  #define MAX_URB_LOOP   2048            /* Maximum number of linked URB's */
43171  
43172  /*
43173 @@ -115,12 +122,20 @@
43174         return 0;
43175  }
43176  
43177 +/*
43178 + * Technically, updating td->status here is a race, but it's not really a
43179 + * problem. The worst that can happen is that we set the IOC bit again
43180 + * generating a spurios interrupt. We could fix this by creating another
43181 + * QH and leaving the IOC bit always set, but then we would have to play
43182 + * games with the FSBR code to make sure we get the correct order in all
43183 + * the cases. I don't think it's worth the effort
43184 + */
43185  static inline void uhci_set_next_interrupt(struct uhci *uhci)
43186  {
43187         unsigned long flags;
43188  
43189         spin_lock_irqsave(&uhci->frame_list_lock, flags);
43190 -       set_bit(TD_CTRL_IOC_BIT, &uhci->skel_term_td->status);
43191 +       uhci->skel_term_td->status |= TD_CTRL_IOC;
43192         spin_unlock_irqrestore(&uhci->frame_list_lock, flags);
43193  }
43194  
43195 @@ -129,7 +144,7 @@
43196         unsigned long flags;
43197  
43198         spin_lock_irqsave(&uhci->frame_list_lock, flags);
43199 -       clear_bit(TD_CTRL_IOC_BIT, &uhci->skel_term_td->status);
43200 +       uhci->skel_term_td->status &= ~TD_CTRL_IOC;
43201         spin_unlock_irqrestore(&uhci->frame_list_lock, flags);
43202  }
43203  
43204 @@ -474,9 +489,9 @@
43205                 tmp = tmp->next;
43206  
43207                 if (toggle)
43208 -                       set_bit(TD_TOKEN_TOGGLE, &td->info);
43209 +                       td->info |= TD_TOKEN_TOGGLE;
43210                 else
43211 -                       clear_bit(TD_TOKEN_TOGGLE, &td->info);
43212 +                       td->info &= ~TD_TOKEN_TOGGLE;
43213  
43214                 toggle ^= 1;
43215         }
43216 @@ -649,7 +664,7 @@
43217  
43218                 if (usb_pipetype(urb->pipe) == PIPE_CONTROL && urb->setup_packet) {
43219                         urbp->setup_packet_dma_handle = pci_map_single(uhci->dev,
43220 -                               urb->setup_packet, sizeof(devrequest),
43221 +                               urb->setup_packet, sizeof(struct usb_ctrlrequest),
43222                                 PCI_DMA_TODEVICE);
43223                         if (!urbp->setup_packet_dma_handle)
43224                                 return NULL;
43225 @@ -724,7 +739,7 @@
43226  
43227         if (urbp->setup_packet_dma_handle) {
43228                 pci_unmap_single(uhci->dev, urbp->setup_packet_dma_handle,
43229 -                       sizeof(devrequest), PCI_DMA_TODEVICE);
43230 +                       sizeof(struct usb_ctrlrequest), PCI_DMA_TODEVICE);
43231                 urbp->setup_packet_dma_handle = 0;
43232         }
43233  
43234 @@ -857,7 +872,7 @@
43235                         return -ENOMEM;
43236  
43237                 /* Alternate Data0/1 (start with Data1) */
43238 -               destination ^= 1 << TD_TOKEN_TOGGLE;
43239 +               destination ^= TD_TOKEN_TOGGLE;
43240         
43241                 uhci_add_td_to_urb(urb, td);
43242                 uhci_fill_td(td, status, destination | ((pktsze - 1) << 21),
43243 @@ -884,7 +899,7 @@
43244         else
43245                 destination |= USB_PID_OUT;
43246  
43247 -       destination |= 1 << TD_TOKEN_TOGGLE;            /* End in Data1 */
43248 +       destination |= TD_TOKEN_TOGGLE;         /* End in Data1 */
43249  
43250         status &= ~TD_CTRL_SPD;
43251  
43252 @@ -953,14 +968,6 @@
43253  
43254                 tmp = tmp->next;
43255  
43256 -               if (urbp->fsbr_timeout && (td->status & TD_CTRL_IOC) &&
43257 -                   !(td->status & TD_CTRL_ACTIVE)) {
43258 -                       uhci_inc_fsbr(urb->dev->bus->hcpriv, urb);
43259 -                       urbp->fsbr_timeout = 0;
43260 -                       urbp->fsbrtime = jiffies;
43261 -                       clear_bit(TD_CTRL_IOC_BIT, &td->status);
43262 -               }
43263 -
43264                 status = uhci_status_bits(td->status);
43265                 if (status & TD_CTRL_ACTIVE)
43266                         return -EINPROGRESS;
43267 @@ -1097,7 +1104,7 @@
43268         if (!td)
43269                 return -ENOMEM;
43270  
43271 -       destination |= (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE);
43272 +       destination |= (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE_SHIFT);
43273         destination |= ((urb->transfer_buffer_length - 1) << 21);
43274  
43275         usb_dotoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe));
43276 @@ -1127,14 +1134,6 @@
43277  
43278                 tmp = tmp->next;
43279  
43280 -               if (urbp->fsbr_timeout && (td->status & TD_CTRL_IOC) &&
43281 -                   !(td->status & TD_CTRL_ACTIVE)) {
43282 -                       uhci_inc_fsbr(urb->dev->bus->hcpriv, urb);
43283 -                       urbp->fsbr_timeout = 0;
43284 -                       urbp->fsbrtime = jiffies;
43285 -                       clear_bit(TD_CTRL_IOC_BIT, &td->status);
43286 -               }
43287 -
43288                 status = uhci_status_bits(td->status);
43289                 if (status & TD_CTRL_ACTIVE)
43290                         return -EINPROGRESS;
43291 @@ -1198,8 +1197,8 @@
43292         td = list_entry(urbp->td_list.next, struct uhci_td, list);
43293  
43294         td->status = (td->status & 0x2F000000) | TD_CTRL_ACTIVE | TD_CTRL_IOC;
43295 -       td->info &= ~(1 << TD_TOKEN_TOGGLE);
43296 -       td->info |= (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE);
43297 +       td->info &= ~TD_TOKEN_TOGGLE;
43298 +       td->info |= (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE_SHIFT);
43299         usb_dotoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe));
43300  
43301  out:
43302 @@ -1255,7 +1254,7 @@
43303                 uhci_fill_td(td, status, destination |
43304                         (((pktsze - 1) & UHCI_NULL_DATA_SIZE) << 21) |
43305                         (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe),
43306 -                        usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE),
43307 +                        usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE_SHIFT),
43308                         data);
43309  
43310                 data += pktsze;
43311 @@ -1283,7 +1282,7 @@
43312                 uhci_fill_td(td, status, destination |
43313                         (UHCI_NULL_DATA_SIZE << 21) |
43314                         (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe),
43315 -                        usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE),
43316 +                        usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE_SHIFT),
43317                         data);
43318  
43319                 usb_dotoggle(urb->dev, usb_pipeendpoint(urb->pipe),
43320 @@ -1830,11 +1829,18 @@
43321  {
43322         struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
43323         struct list_head *head, *tmp;
43324 +       int count = 0;
43325  
43326         uhci_dec_fsbr(uhci, urb);
43327  
43328         urbp->fsbr_timeout = 1;
43329  
43330 +       /*
43331 +        * Ideally we would want to fix qh->element as well, but it's
43332 +        * read/write by the HC, so that can introduce a race. It's not
43333 +        * really worth the hassle
43334 +        */
43335 +
43336         head = &urbp->td_list;
43337         tmp = head->next;
43338         while (tmp != head) {
43339 @@ -1842,10 +1848,15 @@
43340  
43341                 tmp = tmp->next;
43342  
43343 -               if (td->status & TD_CTRL_ACTIVE) {
43344 -                       set_bit(TD_CTRL_IOC_BIT, &td->status);
43345 -                       break;
43346 -               }
43347 +               /*
43348 +                * Make sure we don't do the last one (since it'll have the
43349 +                * TERM bit set) as well as we skip every so many TD's to
43350 +                * make sure it doesn't hog the bandwidth
43351 +                */
43352 +               if (tmp != head && (count % DEPTH_INTERVAL) == (DEPTH_INTERVAL - 1))
43353 +                       td->link |= UHCI_PTR_DEPTH;
43354 +
43355 +               count++;
43356         }
43357  
43358         return 0;
43359 @@ -2073,7 +2084,7 @@
43360  {
43361         struct uhci *uhci = (struct uhci *)urb->dev->bus->hcpriv;
43362         unsigned int pipe = urb->pipe;
43363 -       devrequest *cmd = (devrequest *)urb->setup_packet;
43364 +       struct usb_ctrlrequest *cmd = (struct usb_ctrlrequest *)urb->setup_packet;
43365         void *data = urb->transfer_buffer;
43366         int leni = urb->transfer_buffer_length;
43367         int len = 0;
43368 @@ -2096,10 +2107,10 @@
43369                 return -EINPROGRESS;
43370         }
43371  
43372 -       bmRType_bReq = cmd->requesttype | cmd->request << 8;
43373 -       wValue = le16_to_cpu(cmd->value);
43374 -       wIndex = le16_to_cpu(cmd->index);
43375 -       wLength = le16_to_cpu(cmd->length);
43376 +       bmRType_bReq = cmd->bRequestType | cmd->bRequest << 8;
43377 +       wValue = le16_to_cpu(cmd->wValue);
43378 +       wIndex = le16_to_cpu(cmd->wIndex);
43379 +       wLength = le16_to_cpu(cmd->wLength);
43380  
43381         for (i = 0; i < 8; i++)
43382                 uhci->rh.c_p_r[i] = 0;
43383 @@ -2340,7 +2351,7 @@
43384  
43385         if (urbp->setup_packet_dma_handle)
43386                 pci_dma_sync_single(uhci->dev, urbp->setup_packet_dma_handle,
43387 -                       sizeof(devrequest), PCI_DMA_TODEVICE);
43388 +                       sizeof(struct usb_ctrlrequest), PCI_DMA_TODEVICE);
43389  
43390         status = urbp->status;
43391         if (!resubmit_interrupt || killed)
43392 @@ -2788,6 +2799,7 @@
43393         }
43394  
43395         uhci->bus = bus;
43396 +       bus->bus_name = dev->slot_name;
43397         bus->hcpriv = uhci;
43398  
43399         usb_register_bus(uhci->bus);
43400 diff -Nur linux-2.4.19.org/drivers/usb/uhci.h linux-2.4.19/drivers/usb/uhci.h
43401 --- linux-2.4.19.org/drivers/usb/uhci.h Sat Aug  3 02:39:45 2002
43402 +++ linux-2.4.19/drivers/usb/uhci.h     Thu Oct 31 08:11:26 2002
43403 @@ -100,7 +100,6 @@
43404  #define TD_CTRL_C_ERR_SHIFT    27
43405  #define TD_CTRL_LS             (1 << 26)       /* Low Speed Device */
43406  #define TD_CTRL_IOS            (1 << 25)       /* Isochronous Select */
43407 -#define TD_CTRL_IOC_BIT                24
43408  #define TD_CTRL_IOC            (1 << 24)       /* Interrupt on Complete */
43409  #define TD_CTRL_ACTIVE         (1 << 23)       /* TD Active */
43410  #define TD_CTRL_STALLED                (1 << 22)       /* TD Stalled */
43411 @@ -120,13 +119,14 @@
43412  /*
43413   * for TD <info>: (a.k.a. Token)
43414   */
43415 -#define TD_TOKEN_TOGGLE                19
43416 +#define TD_TOKEN_TOGGLE_SHIFT  19
43417 +#define TD_TOKEN_TOGGLE                (1 << 19)
43418  #define TD_TOKEN_PID_MASK      0xFF
43419  #define TD_TOKEN_EXPLEN_MASK   0x7FF           /* expected length, encoded as n - 1 */
43420  
43421  #define uhci_maxlen(token)     ((token) >> 21)
43422  #define uhci_expected_length(info) (((info >> 21) + 1) & TD_TOKEN_EXPLEN_MASK) /* 1-based */
43423 -#define uhci_toggle(token)     (((token) >> TD_TOKEN_TOGGLE) & 1)
43424 +#define uhci_toggle(token)     (((token) >> TD_TOKEN_TOGGLE_SHIFT) & 1)
43425  #define uhci_endpoint(token)   (((token) >> 15) & 0xf)
43426  #define uhci_devaddr(token)    (((token) >> 8) & 0x7f)
43427  #define uhci_devep(token)      (((token) >> 8) & 0x7ff)
43428 diff -Nur linux-2.4.19.org/drivers/usb/usb-debug.c linux-2.4.19/drivers/usb/usb-debug.c
43429 --- linux-2.4.19.org/drivers/usb/usb-debug.c    Fri Feb  9 20:30:23 2001
43430 +++ linux-2.4.19/drivers/usb/usb-debug.c        Thu Oct 31 08:11:26 2002
43431 @@ -181,23 +181,23 @@
43432         kfree(buf);
43433  }
43434  
43435 -void usb_dump_urb (purb_t purb)
43436 +void usb_dump_urb (struct urb *urb)
43437  {
43438 -       printk ("urb                   :%p\n", purb);
43439 -       printk ("next                  :%p\n", purb->next);
43440 -       printk ("dev                   :%p\n", purb->dev);
43441 -       printk ("pipe                  :%08X\n", purb->pipe);
43442 -       printk ("status                :%d\n", purb->status);
43443 -       printk ("transfer_flags        :%08X\n", purb->transfer_flags);
43444 -       printk ("transfer_buffer       :%p\n", purb->transfer_buffer);
43445 -       printk ("transfer_buffer_length:%d\n", purb->transfer_buffer_length);
43446 -       printk ("actual_length         :%d\n", purb->actual_length);
43447 -       printk ("setup_packet          :%p\n", purb->setup_packet);
43448 -       printk ("start_frame           :%d\n", purb->start_frame);
43449 -       printk ("number_of_packets     :%d\n", purb->number_of_packets);
43450 -       printk ("interval              :%d\n", purb->interval);
43451 -       printk ("error_count           :%d\n", purb->error_count);
43452 -       printk ("context               :%p\n", purb->context);
43453 -       printk ("complete              :%p\n", purb->complete);
43454 +       printk ("urb                   :%p\n", urb);
43455 +       printk ("next                  :%p\n", urb->next);
43456 +       printk ("dev                   :%p\n", urb->dev);
43457 +       printk ("pipe                  :%08X\n", urb->pipe);
43458 +       printk ("status                :%d\n", urb->status);
43459 +       printk ("transfer_flags        :%08X\n", urb->transfer_flags);
43460 +       printk ("transfer_buffer       :%p\n", urb->transfer_buffer);
43461 +       printk ("transfer_buffer_length:%d\n", urb->transfer_buffer_length);
43462 +       printk ("actual_length         :%d\n", urb->actual_length);
43463 +       printk ("setup_packet          :%p\n", urb->setup_packet);
43464 +       printk ("start_frame           :%d\n", urb->start_frame);
43465 +       printk ("number_of_packets     :%d\n", urb->number_of_packets);
43466 +       printk ("interval              :%d\n", urb->interval);
43467 +       printk ("error_count           :%d\n", urb->error_count);
43468 +       printk ("context               :%p\n", urb->context);
43469 +       printk ("complete              :%p\n", urb->complete);
43470  }
43471  
43472 diff -Nur linux-2.4.19.org/drivers/usb/usb-midi.c linux-2.4.19/drivers/usb/usb-midi.c
43473 --- linux-2.4.19.org/drivers/usb/usb-midi.c     Thu Jan  1 01:00:00 1970
43474 +++ linux-2.4.19/drivers/usb/usb-midi.c Thu Oct 31 08:11:26 2002
43475 @@ -0,0 +1,2228 @@
43476 +/*
43477 +  usb-midi.c  --  USB-MIDI driver
43478 +
43479 +  Copyright (C) 2001 
43480 +      NAGANO Daisuke <breeze.nagano@nifty.ne.jp>
43481 +
43482 +  This program is free software; you can redistribute it and/or modify
43483 +  it under the terms of the GNU General Public License as published by
43484 +  the Free Software Foundation; either version 2, or (at your option)
43485 +  any later version.
43486 +
43487 +  This program is distributed in the hope that it will be useful,
43488 +  but WITHOUT ANY WARRANTY; without even the implied warranty of
43489 +  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
43490 +  GNU General Public License for more details.
43491 +
43492 +  You should have received a copy of the GNU General Public License
43493 +  along with this program; if not, write to the Free Software
43494 +  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
43495 +
43496 +  This driver is based on:
43497 +    - 'Universal Serial Bus Device Class Definition for MIDI Device'
43498 +    - linux/drivers/sound/es1371.c, linux/drivers/usb/audio.c
43499 +    - alsa/lowlevel/pci/cs64xx.c
43500 +    - umidi.c for NetBSD
43501 + */
43502 +
43503 +/* ------------------------------------------------------------------------- */
43504 +
43505 +
43506 +#include <linux/module.h>
43507 +#include <linux/kernel.h>
43508 +#include <linux/sched.h>
43509 +#include <linux/list.h>
43510 +#include <linux/slab.h>
43511 +#include <linux/wrapper.h>
43512 +#include <linux/usb.h>
43513 +#include <linux/poll.h>
43514 +#include <linux/sound.h>
43515 +#include <linux/init.h>
43516 +#include <asm/semaphore.h>
43517 +
43518 +/** This declaration is missing from linux/usb.h **/
43519 +extern int usb_get_string(struct usb_device *dev, unsigned short langid, unsigned char index, void *buf, int size);
43520 +
43521 +#include "usb-midi.h"
43522 +
43523 +/* ------------------------------------------------------------------------- */
43524 +
43525 +/* More verbose on syslog */
43526 +#undef MIDI_DEBUG
43527 +
43528 +#define MIDI_IN_BUFSIZ 1024
43529 +
43530 +#define HAVE_SUPPORT_USB_MIDI_CLASS
43531 +
43532 +#undef HAVE_SUPPORT_ALSA
43533 +
43534 +#undef MOD_INC_EACH_PROBE
43535 +
43536 +/* ------------------------------------------------------------------------- */
43537 +
43538 +static int singlebyte = 0;
43539 +MODULE_PARM(singlebyte,"i");
43540 +MODULE_PARM_DESC(singlebyte,"Enable sending MIDI messages with single message packet");
43541 +
43542 +static int maxdevices = 4;
43543 +MODULE_PARM(maxdevices,"i");
43544 +MODULE_PARM_DESC(maxdevices,"Max number of allocatable MIDI device");
43545 +
43546 +static int uvendor     = -1;
43547 +MODULE_PARM(uvendor,"i");
43548 +MODULE_PARM_DESC(uvendor, "The USB Vendor ID of a semi-compliant interface");
43549 +
43550 +static int uproduct    = -1;
43551 +MODULE_PARM(uproduct,"i");
43552 +MODULE_PARM_DESC(uproduct, "The USB Product ID of a semi-compliant interface");
43553 +
43554 +static int uinterface  = -1;
43555 +MODULE_PARM(uinterface,"i");
43556 +MODULE_PARM_DESC(uinterface, "The Interface number of a semi-compliant interface");
43557 +
43558 +static int ualt        = -1;
43559 +MODULE_PARM(ualt,"i");
43560 +MODULE_PARM_DESC(ualt, "The optional alternative setting of a semi-compliant interface");
43561 +
43562 +static int umin        = -1;
43563 +MODULE_PARM(umin,"i");
43564 +MODULE_PARM_DESC(umin, "The input endpoint of a semi-compliant interface");
43565 +
43566 +static int umout       = -1;
43567 +MODULE_PARM(umout,"i");
43568 +MODULE_PARM_DESC(umout, "The output endpoint of a semi-compliant interface");
43569 +
43570 +static int ucable      = -1;
43571 +MODULE_PARM(ucable,"i");
43572 +MODULE_PARM_DESC(ucable, "The cable number used for a semi-compliant interface");
43573 +
43574 +/** Note -- the usb_string() returns only Latin-1 characters.
43575 + * (unicode chars <= 255). To support Japanese, a unicode16LE-to-EUC or
43576 + * unicode16LE-to-JIS routine is needed to wrap around usb_get_string().
43577 + **/
43578 +static unsigned short ulangid      = 0x0409; /** 0x0411 for Japanese **/
43579 +MODULE_PARM(ulangid,"h");
43580 +MODULE_PARM_DESC(ulangid, "The optional preferred USB Language ID for all devices");
43581 +
43582 +MODULE_AUTHOR("NAGANO Daisuke <breeze.nagano@nifty.ne.jp>");
43583 +MODULE_DESCRIPTION("USB-MIDI driver");
43584 +#if LINUX_VERSION_CODE  >= KERNEL_VERSION(2,4,14)
43585 +MODULE_LICENSE("GPL");
43586 +#endif
43587 +
43588 +/* ------------------------------------------------------------------------- */
43589 +
43590 +/** MIDIStreaming Class-Specific Interface Descriptor Subtypes **/
43591 +
43592 +#define MS_DESCRIPTOR_UNDEFINED        0
43593 +#define MS_HEADER              1
43594 +#define MIDI_IN_JACK           2
43595 +#define MIDI_OUT_JACK          3
43596 +/* Spec reads: ELEMENT */
43597 +#define ELEMENT_DESCRIPTOR     4
43598 +
43599 +#define MS_HEADER_LENGTH       7
43600 +
43601 +/** MIDIStreaming Class-Specific Endpoint Descriptor Subtypes **/
43602 +
43603 +#define DESCRIPTOR_UNDEFINED   0
43604 +/* Spec reads: MS_GENERAL */
43605 +#define MS_GENERAL_ENDPOINT    1
43606 +
43607 +/** MIDIStreaming MIDI IN and OUT Jack Types **/
43608 +
43609 +#define JACK_TYPE_UNDEFINED    0
43610 +/* Spec reads: EMBEDDED */
43611 +#define EMBEDDED_JACK          1
43612 +/* Spec reads: EXTERNAL */
43613 +#define EXTERNAL_JACK          2
43614 +
43615 +
43616 +/* structure summary
43617 +  
43618 +      usb_midi_state     usb_device
43619 +       |         |
43620 +      *|        *|       per ep
43621 +     in_ep     out_ep
43622 +       |         |
43623 +      *|        *|       per cable
43624 +      min       mout
43625 +       |         |       (cable to device pairing magic)
43626 +       |         |
43627 +       usb_midi_dev      dev_id (major,minor) == file->private_data
43628 +
43629 +*/
43630 +
43631 +/* usb_midi_state: corresponds to a USB-MIDI module */
43632 +struct usb_midi_state {
43633 +       struct list_head   mididev;
43634 +       
43635 +       struct usb_device *usbdev;
43636 +       
43637 +       struct list_head   midiDevList;
43638 +       struct list_head   inEndpointList;
43639 +       struct list_head   outEndpointList;
43640 +       
43641 +       spinlock_t         lock;
43642 +       
43643 +       unsigned int       count; /* usage counter */
43644 +};
43645 +
43646 +/* midi_out_endpoint: corresponds to an output endpoint */
43647 +struct midi_out_endpoint {
43648 +       struct list_head  list;
43649 +       
43650 +       struct usb_device *usbdev;
43651 +       int                endpoint;
43652 +       spinlock_t         lock;
43653 +       wait_queue_head_t  wait;
43654 +       
43655 +       unsigned char     *buf;
43656 +       int                bufWrPtr;
43657 +       int                bufSize;
43658 +       
43659 +       struct urb       *urb;
43660 +};
43661 +
43662 +/* midi_in_endpoint: corresponds to an input endpoint */
43663 +struct midi_in_endpoint {
43664 +       struct list_head   list;
43665 +
43666 +       struct usb_device *usbdev;
43667 +       int                endpoint;
43668 +       spinlock_t         lock;
43669 +       wait_queue_head_t  wait;
43670 +
43671 +       struct usb_mididev *cables[16]; // cables open for read
43672 +       int                 readers;    // number of cables open for read
43673 +
43674 +       struct urb        *urb;
43675 +       unsigned char     *recvBuf;
43676 +       int                recvBufSize;
43677 +       int                urbSubmitted;        //FIXME: == readers > 0
43678 +};
43679 +
43680 +/* usb_mididev: corresponds to a logical device */
43681 +struct usb_mididev {
43682 +       struct list_head       list;
43683 +
43684 +       struct usb_midi_state *midi;
43685 +       int                    dev_midi;
43686 +       mode_t                 open_mode;
43687 +
43688 +       struct {
43689 +               struct midi_in_endpoint *ep;
43690 +               int              cableId;
43691 +               
43692 +// as we are pushing data from usb_bulk_read to usb_midi_read,
43693 +// we need a larger, cyclic buffer here.
43694 +               unsigned char    buf[MIDI_IN_BUFSIZ];
43695 +               int              bufRdPtr;
43696 +               int              bufWrPtr;
43697 +               int              bufRemains;
43698 +       } min;
43699 +
43700 +       struct {
43701 +               struct midi_out_endpoint *ep;
43702 +               int              cableId;
43703 +               
43704 +               unsigned char    buf[3];
43705 +               int              bufPtr;
43706 +               int              bufRemains;
43707 +               
43708 +               int              isInExclusive;
43709 +               unsigned char    lastEvent;
43710 +       } mout;
43711 +
43712 +       int singlebyte;
43713 +};
43714 +
43715 +/** Map the high nybble of MIDI voice messages to number of Message bytes.
43716 + * High nyble ranges from 0x8 to 0xe
43717 + */
43718 +
43719 +static int remains_80e0[] = {
43720 +       3,      /** 0x8X Note Off **/
43721 +       3,      /** 0x9X Note On **/
43722 +       3,      /** 0xAX Poly-key pressure **/
43723 +       3,      /** 0xBX Control Change **/
43724 +       2,      /** 0xCX Program Change **/
43725 +       2,      /** 0xDX Channel pressure **/
43726 +       3       /** 0xEX PitchBend Change **/
43727 +};
43728 +
43729 +/** Map the messages to a number of Message bytes.
43730 + *
43731 + **/
43732 +static int remains_f0f6[] = {
43733 +       0,      /** 0xF0 **/
43734 +       2,      /** 0XF1 **/
43735 +       3,      /** 0XF2 **/
43736 +       2,      /** 0XF3 **/
43737 +       2,      /** 0XF4 (Undefined by MIDI Spec, and subject to change) **/
43738 +       2,      /** 0XF5 (Undefined by MIDI Spec, and subject to change) **/
43739 +       1       /** 0XF6 **/
43740 +};
43741 +
43742 +/** Map the messages to a CIN (Code Index Number).
43743 + *
43744 + **/
43745 +static int cin_f0ff[] = {
43746 +       4,      /** 0xF0 System Exclusive Message Start (special cases may be 6 or 7) */
43747 +       2,      /** 0xF1 **/
43748 +       3,      /** 0xF2 **/
43749 +       2,      /** 0xF3 **/
43750 +       2,      /** 0xF4 **/
43751 +       2,      /** 0xF5 **/
43752 +       5,      /** 0xF6 **/
43753 +       5,      /** 0xF7 End of System Exclusive Message (May be 6 or 7) **/
43754 +       5,      /** 0xF8 **/
43755 +       5,      /** 0xF9 **/
43756 +       5,      /** 0xFA **/
43757 +       5,      /** 0xFB **/
43758 +       5,      /** 0xFC **/
43759 +       5,      /** 0xFD **/
43760 +       5,      /** 0xFE **/
43761 +       5       /** 0xFF **/
43762 +};
43763 +
43764 +/** Map MIDIStreaming Event packet Code Index Number (low nybble of byte 0)
43765 + * to the number of bytes of valid MIDI data.
43766 + *
43767 + * CIN of 0 and 1 are NOT USED in MIDIStreaming 1.0.
43768 + *
43769 + **/
43770 +static int cin_to_len[] = {
43771 +       0, 0, 2, 3,
43772 +       3, 1, 2, 3,
43773 +       3, 3, 3, 3,
43774 +       2, 2, 3, 1
43775 +};
43776 +
43777 +
43778 +/* ------------------------------------------------------------------------- */
43779 +
43780 +static struct list_head mididevs = LIST_HEAD_INIT(mididevs);
43781 +
43782 +static DECLARE_MUTEX(open_sem);
43783 +static DECLARE_WAIT_QUEUE_HEAD(open_wait);
43784 +
43785 +
43786 +/* ------------------------------------------------------------------------- */
43787 +
43788 +static void usb_write_callback(struct urb *urb)
43789 +{
43790 +       struct midi_out_endpoint *ep = (struct midi_out_endpoint *)urb->context;
43791 +
43792 +       if ( waitqueue_active( &ep->wait ) )
43793 +               wake_up_interruptible( &ep->wait );
43794 +}
43795 +
43796 +
43797 +static int usb_write( struct midi_out_endpoint *ep, unsigned char *buf, int len )
43798 +{
43799 +       struct usb_device *d;
43800 +       int pipe;
43801 +       int ret = 0;
43802 +       int status;
43803 +       int maxretry = 50;
43804 +       
43805 +       DECLARE_WAITQUEUE(wait,current);
43806 +       init_waitqueue_head(&ep->wait);
43807 +
43808 +       d = ep->usbdev;
43809 +       pipe = usb_sndbulkpipe(d, ep->endpoint);
43810 +       FILL_BULK_URB( ep->urb, d, pipe, (unsigned char*)buf, len,
43811 +                      (usb_complete_t)usb_write_callback, ep );
43812 +
43813 +       status = usb_submit_urb(ep->urb);
43814 +    
43815 +       if (status) {
43816 +               printk(KERN_ERR "usbmidi: Cannot submit urb (%d)\n",status);
43817 +               ret = -EFAULT;
43818 +       }
43819 +
43820 +       add_wait_queue( &ep->wait, &wait );
43821 +       set_current_state( TASK_INTERRUPTIBLE );
43822 +
43823 +       while( ep->urb->status == -EINPROGRESS ) {
43824 +               if ( maxretry-- < 0 ) {
43825 +                       printk(KERN_ERR "usbmidi: usb_bulk_msg timed out\n");
43826 +                       ret = -ETIME;
43827 +                       break;
43828 +               }
43829 +               interruptible_sleep_on_timeout( &ep->wait, 10 );
43830 +       }
43831 +       set_current_state( TASK_RUNNING );
43832 +       remove_wait_queue( &ep->wait, &wait );
43833 +
43834 +       return ret;
43835 +}
43836 +
43837 +
43838 +/** Copy data from URB to In endpoint buf.
43839 + * Discard if CIN == 0 or CIN = 1.
43840 + *
43841 + *
43842 + **/
43843 +
43844 +static void usb_bulk_read(struct urb *urb)
43845 +{
43846 +       struct midi_in_endpoint *ep = (struct midi_in_endpoint *)(urb->context);
43847 +       unsigned char *data = urb->transfer_buffer;
43848 +       int i, l, wake;
43849 +       unsigned long int flags;
43850 +
43851 +       if ( !ep->urbSubmitted ) {
43852 +               return;
43853 +       }
43854 +
43855 +       if ( (urb->status == 0) && (urb->actual_length > 0) ) {
43856 +               wake = 0;
43857 +               spin_lock_irqsave( &ep->lock, flags );
43858 +
43859 +               for(l = 0; l < urb->actual_length; l += 4) {
43860 +                       int cin = (data[l]>>0)&0xf;
43861 +                       int cab = (data[l]>>4)&0xf;
43862 +                       struct usb_mididev *cable = ep->cables[cab];
43863 +                       if ( cable ) {
43864 +                               int len = cin_to_len[cin]; /** length of MIDI data **/
43865 +                               for (i = 0; i < len; i++) {
43866 +                                       cable->min.buf[cable->min.bufWrPtr] = data[1+i];
43867 +                                       cable->min.bufWrPtr = (cable->min.bufWrPtr+1)%MIDI_IN_BUFSIZ;
43868 +                                       if (cable->min.bufRemains < MIDI_IN_BUFSIZ)
43869 +                                               cable->min.bufRemains += 1;
43870 +                                       else /** need to drop data **/
43871 +                                               cable->min.bufRdPtr += (cable->min.bufRdPtr+1)%MIDI_IN_BUFSIZ;
43872 +                                       wake = 1;
43873 +                               }
43874 +                       }
43875 +               }
43876 +
43877 +               spin_unlock_irqrestore( &ep->lock, flags );
43878 +               if ( wake ) {
43879 +                       wake_up( &ep->wait );
43880 +               }
43881 +       }
43882 +
43883 +       /* urb->dev must be reinitialized on 2.4.x kernels */
43884 +       urb->dev = ep->usbdev;
43885 +
43886 +       urb->actual_length = 0;
43887 +       usb_submit_urb(urb);
43888 +}
43889 +
43890 +
43891 +
43892 +/* ------------------------------------------------------------------------- */
43893 +
43894 +/* This routine must be called with spin_lock */
43895 +
43896 +/** Wrapper around usb_write().
43897 + *  This routine must be called with spin_lock held on ep.
43898 + *  Called by midiWrite(), putOneMidiEvent(), and  usb_midi_write();
43899 + **/
43900 +static int flush_midi_buffer( struct midi_out_endpoint *ep )
43901 +{
43902 +       int ret=0;
43903 +
43904 +       if ( ep->bufWrPtr > 0 ) {
43905 +               ret = usb_write( ep, ep->buf, ep->bufWrPtr );
43906 +               ep->bufWrPtr = 0;
43907 +       }
43908 +
43909 +       return ret;
43910 +}
43911 +
43912 +
43913 +/* ------------------------------------------------------------------------- */
43914 +
43915 +
43916 +/** Given a MIDI Event, determine size of data to be attached to 
43917 + * USB-MIDI packet.
43918 + * Returns 1, 2 or 3.
43919 + * Called by midiWrite();
43920 + * Uses remains_80e0 and remains_f0f6;
43921 + **/
43922 +static int get_remains(int event)
43923 +{
43924 +       int ret;
43925 +
43926 +       if ( event  < 0x80 ) {
43927 +               ret = 1;
43928 +       } else if ( event < 0xf0 ) {
43929 +               ret = remains_80e0[((event-0x80)>>4)&0x0f];
43930 +       } else if ( event < 0xf7 ) {
43931 +               ret = remains_f0f6[event-0xf0];
43932 +       } else {
43933 +               ret = 1;
43934 +       }
43935 +
43936 +       return ret;
43937 +}
43938 +
43939 +/** Given the output MIDI data in the output buffer, computes a reasonable 
43940 + * CIN.
43941 + * Called by putOneMidiEvent().
43942 + **/
43943 +static int get_CIN( struct usb_mididev *m )
43944 +{
43945 +       int cin;
43946 +
43947 +       if ( m->mout.buf[0] == 0xf7 ) {
43948 +               cin = 5;
43949 +       }
43950 +       else if ( m->mout.buf[1] == 0xf7 ) {
43951 +               cin = 6;
43952 +       }
43953 +       else if ( m->mout.buf[2] == 0xf7 ) {
43954 +               cin = 7;
43955 +       }
43956 +       else {
43957 +               if ( m->mout.isInExclusive == 1 ) {
43958 +                       cin = 4;
43959 +               } else if ( m->mout.buf[0] < 0x80 ) {
43960 +                       /** One byte that we know nothing about. **/
43961 +                       cin = 0xF; 
43962 +               } else if ( m->mout.buf[0] < 0xf0 ) {
43963 +                       /** MIDI Voice messages 0x8X to 0xEX map to cin 0x8 to 0xE. **/
43964 +                       cin = (m->mout.buf[0]>>4)&0x0f; 
43965 +               }
43966 +               else {
43967 +                       /** Special lookup table exists for real-time events. **/
43968 +                       cin = cin_f0ff[m->mout.buf[0]-0xf0];
43969 +               }
43970 +       }
43971 +
43972 +       return cin;
43973 +}
43974 +
43975 +
43976 +/* ------------------------------------------------------------------------- */
43977 +
43978 +
43979 +
43980 +/** Move data to USB endpoint buffer.
43981 + *
43982 + **/
43983 +static int put_one_midi_event(struct usb_mididev *m)
43984 +{
43985 +       int cin;
43986 +       unsigned long flags;
43987 +       struct midi_out_endpoint *ep = m->mout.ep;
43988 +       int ret=0;
43989 +
43990 +       cin = get_CIN( m );
43991 +       if ( cin > 0x0f || cin < 0 ) {
43992 +               return -EINVAL;
43993 +       }
43994 +
43995 +       spin_lock_irqsave( &ep->lock, flags );
43996 +       ep->buf[ep->bufWrPtr++] = (m->mout.cableId<<4) | cin;
43997 +       ep->buf[ep->bufWrPtr++] = m->mout.buf[0];
43998 +       ep->buf[ep->bufWrPtr++] = m->mout.buf[1];
43999 +       ep->buf[ep->bufWrPtr++] = m->mout.buf[2];
44000 +       if ( ep->bufWrPtr >= ep->bufSize ) {
44001 +               ret = flush_midi_buffer( ep );
44002 +       }
44003 +       spin_unlock_irqrestore( &ep->lock, flags);
44004 +
44005 +       m->mout.buf[0] = m->mout.buf[1] = m->mout.buf[2] = 0;
44006 +       m->mout.bufPtr = 0;
44007 +
44008 +       return ret;
44009 +}
44010 +
44011 +/** Write the MIDI message v on the midi device.
44012 + *  Called by usb_midi_write();
44013 + *  Responsible for packaging a MIDI data stream into USB-MIDI packets.
44014 + **/
44015 +
44016 +static int midi_write( struct usb_mididev *m, int v )
44017 +{
44018 +       unsigned long flags;
44019 +       struct midi_out_endpoint *ep = m->mout.ep;
44020 +       int ret=0;
44021 +       unsigned char c = (unsigned char)v;
44022 +       unsigned char sysrt_buf[4];
44023 +
44024 +       if ( m->singlebyte != 0 ) {
44025 +               /** Simple code to handle the single-byte USB-MIDI protocol. */
44026 +               spin_lock_irqsave( &ep->lock, flags );
44027 +               if ( ep->bufWrPtr+4 > ep->bufSize ) {
44028 +                       ret = flush_midi_buffer( ep );
44029 +                       if ( !ret ) {
44030 +                               spin_unlock_irqrestore( &ep->lock, flags );
44031 +                               return ret;
44032 +                       }
44033 +               }
44034 +               ep->buf[ep->bufWrPtr++] = (m->mout.cableId<<4) |  0x0f; /* single byte */
44035 +               ep->buf[ep->bufWrPtr++] = c;
44036 +               ep->buf[ep->bufWrPtr++] = 0;
44037 +               ep->buf[ep->bufWrPtr++] = 0;
44038 +               if ( ep->bufWrPtr >= ep->bufSize ) {
44039 +                       ret = flush_midi_buffer( ep );
44040 +               }
44041 +               spin_unlock_irqrestore( &ep->lock, flags );
44042 +
44043 +               return ret;
44044 +       }
44045 +       /** Normal USB-MIDI protocol begins here. */
44046 +
44047 +       if ( c > 0xf7 ) {       /* system: Realtime messages */
44048 +               /** Realtime messages are written IMMEDIATELY. */
44049 +               sysrt_buf[0] = (m->mout.cableId<<4) | 0x0f;
44050 +               sysrt_buf[1] = c;
44051 +               sysrt_buf[2] = 0;
44052 +               sysrt_buf[3] = 0;
44053 +               spin_lock_irqsave( &ep->lock, flags );
44054 +               ret = usb_write( ep, sysrt_buf, 4 );
44055 +               spin_unlock_irqrestore( &ep->lock, flags );
44056 +               /* m->mout.lastEvent = 0; */
44057 +
44058 +               return ret;
44059 +       }
44060 +
44061 +       if ( c >= 0x80 ) {
44062 +               if ( c < 0xf0 ) {
44063 +                       m->mout.lastEvent = c;
44064 +                       m->mout.isInExclusive = 0;
44065 +                       m->mout.bufRemains = get_remains(c);
44066 +               } else if ( c == 0xf0 ) {
44067 +                       /* m->mout.lastEvent = 0; */
44068 +                       m->mout.isInExclusive = 1;
44069 +                       m->mout.bufRemains = get_remains(c);
44070 +               } else if ( c == 0xf7 && m->mout.isInExclusive == 1 ) {
44071 +                       /* m->mout.lastEvent = 0; */
44072 +                       m->mout.isInExclusive = 0;
44073 +                       m->mout.bufRemains = 1;
44074 +               } else if ( c > 0xf0 ) {
44075 +                       /* m->mout.lastEvent = 0; */
44076 +                       m->mout.isInExclusive = 0;
44077 +                       m->mout.bufRemains = get_remains(c);
44078 +               }
44079 +    
44080 +       } else if ( m->mout.bufRemains == 0 && m->mout.isInExclusive == 0 ) {
44081 +               if ( m->mout.lastEvent == 0 ) {
44082 +                       return 0; /* discard, waiting for the first event */
44083 +               }
44084 +               /** track status **/
44085 +               m->mout.buf[0] = m->mout.lastEvent;
44086 +               m->mout.bufPtr = 1;
44087 +               m->mout.bufRemains = get_remains(m->mout.lastEvent)-1;
44088 +       }
44089 +  
44090 +       m->mout.buf[m->mout.bufPtr++] = c;
44091 +       m->mout.bufRemains--;
44092 +       if ( m->mout.bufRemains == 0 || m->mout.bufPtr >= 3) {
44093 +               ret = put_one_midi_event(m);
44094 +       }
44095 +
44096 +       return ret;
44097 +}
44098 +
44099 +
44100 +/* ------------------------------------------------------------------------- */
44101 +
44102 +/** Basic operation on /dev/midiXX as registered through struct file_operations.
44103 + *
44104 + *  Basic contract: Used to change the current read/write position in a file.
44105 + *  On success, the non-negative position is reported.
44106 + *  On failure, the negative of an error code is reported.
44107 + *
44108 + *  Because a MIDIStream is not a file, all seek operations are doomed to fail.
44109 + *
44110 + **/
44111 +static loff_t usb_midi_llseek(struct file *file, loff_t offset, int origin)
44112 +{
44113 +       /** Tell user you cannot seek on a PIPE-like device. **/
44114 +       return -ESPIPE;
44115 +}
44116 +
44117 +
44118 +/** Basic operation on /dev/midiXX as registered through struct file_operations.
44119 + *
44120 + * Basic contract: Block until count bytes have been read or an error occurs.
44121 + *
44122 + **/
44123 +
44124 +static ssize_t usb_midi_read(struct file *file, char *buffer, size_t count, loff_t *ppos)
44125 +{
44126 +       struct usb_mididev *m = (struct usb_mididev *)file->private_data;
44127 +       struct midi_in_endpoint *ep = m->min.ep;
44128 +       ssize_t ret;
44129 +       DECLARE_WAITQUEUE(wait, current);
44130 +
44131 +       if ( ppos != &file->f_pos ) {
44132 +               return -ESPIPE;
44133 +       }
44134 +       if ( !access_ok(VERIFY_READ, buffer, count) ) {
44135 +               return -EFAULT;
44136 +       }
44137 +       if ( count == 0 ) {
44138 +               return 0;
44139 +       }
44140 +
44141 +       add_wait_queue( &ep->wait, &wait );
44142 +       ret = 0;
44143 +       while( count > 0 ) {
44144 +               int cnt;
44145 +               int d = (int)count;
44146 +
44147 +               cnt = m->min.bufRemains;
44148 +               if ( cnt > d ) {
44149 +                       cnt = d;
44150 +               }
44151 +
44152 +               if ( cnt <= 0 ) {
44153 +                       if ( file->f_flags & O_NONBLOCK ) {
44154 +                               if (!ret) 
44155 +                                       ret = -EAGAIN;
44156 +                               break;
44157 +                       }
44158 +                       __set_current_state(TASK_INTERRUPTIBLE);
44159 +                       schedule();
44160 +                       if (signal_pending(current)) {
44161 +                               if(!ret)
44162 +                                       ret=-ERESTARTSYS;
44163 +                               break;
44164 +                       }
44165 +                       continue;
44166 +               }
44167 +
44168 +               {
44169 +                       int i;
44170 +                       unsigned long flags; /* used to synchronize access to the endpoint */
44171 +                       spin_lock_irqsave( &ep->lock, flags );
44172 +                       for (i = 0; i < cnt; i++) {
44173 +                               if ( copy_to_user( buffer+i, m->min.buf+m->min.bufRdPtr, 1 ) ) {
44174 +                                       if ( !ret )
44175 +                                               ret = -EFAULT;
44176 +                                       break;
44177 +                               }
44178 +                               m->min.bufRdPtr = (m->min.bufRdPtr+1)%MIDI_IN_BUFSIZ;
44179 +                               m->min.bufRemains -= 1;
44180 +                       }
44181 +                       spin_unlock_irqrestore( &ep->lock, flags );
44182 +               }
44183 +
44184 +               count-=cnt;
44185 +               buffer+=cnt;
44186 +               ret+=cnt;
44187 +
44188 +               break;
44189 +       }
44190 +
44191 +       remove_wait_queue( &ep->wait, &wait );
44192 +       set_current_state(TASK_RUNNING);
44193 +
44194 +       return ret;
44195 +}
44196 +
44197 +
44198 +/** Basic operation on /dev/midiXX as registered through struct file_operations.
44199 + *
44200 + *  Basic Contract: Take MIDI data byte-by-byte and pass it to
44201 + *  writeMidi() which packages MIDI data into USB-MIDI stream.
44202 + *  Then flushMidiData() is called to ensure all bytes have been written
44203 + *  in a timely fashion.
44204 + *
44205 + **/
44206 +
44207 +static ssize_t usb_midi_write(struct file *file, const char *buffer, size_t count, loff_t *ppos)
44208 +{
44209 +       struct usb_mididev *m = (struct usb_mididev *)file->private_data;
44210 +       ssize_t ret;
44211 +       unsigned long int flags;
44212 +
44213 +       if ( ppos != &file->f_pos ) {
44214 +               return -ESPIPE;
44215 +       }
44216 +       if ( !access_ok(VERIFY_READ, buffer, count) ) {
44217 +               return -EFAULT;
44218 +       }
44219 +       if ( count == 0 ) {
44220 +               return 0;
44221 +       }
44222 +
44223 +       ret = 0;
44224 +       while( count > 0 ) {
44225 +               unsigned char c;
44226 +
44227 +               if (copy_from_user((unsigned char *)&c, buffer, 1)) {
44228 +                       if ( ret == 0 )
44229 +                               ret = -EFAULT;
44230 +                       break;
44231 +               }
44232 +               if( midi_write(m, (int)c) ) {
44233 +                       if ( ret == 0 )
44234 +                               ret = -EFAULT;
44235 +                       break;
44236 +               }
44237 +               count--;
44238 +               buffer++;
44239 +               ret++;
44240 +       }
44241 +
44242 +       spin_lock_irqsave( &m->mout.ep->lock, flags );
44243 +       if ( flush_midi_buffer(m->mout.ep) < 0 ) {
44244 +               ret = -EFAULT;
44245 +       }
44246 +       spin_unlock_irqrestore( &m->mout.ep->lock, flags );
44247 +
44248 +       return ret;
44249 +}
44250 +
44251 +/** Basic operation on /dev/midiXX as registered through struct file_operations.
44252 + *
44253 + * Basic contract:  Wait (spin) until ready to read or write on the file.
44254 + *
44255 + **/
44256 +static unsigned int usb_midi_poll(struct file *file, struct poll_table_struct *wait)
44257 +{
44258 +       struct usb_mididev *m = (struct usb_mididev *)file->private_data;
44259 +       struct midi_in_endpoint *iep = m->min.ep;
44260 +       struct midi_out_endpoint *oep = m->mout.ep;
44261 +       unsigned long flags;
44262 +       unsigned int mask = 0;
44263 +  
44264 +       if ( file->f_mode & FMODE_READ ) {
44265 +               poll_wait( file, &iep->wait, wait );
44266 +               spin_lock_irqsave( &iep->lock, flags );
44267 +               if ( m->min.bufRemains > 0 )
44268 +                       mask |= POLLIN | POLLRDNORM;
44269 +               spin_unlock_irqrestore( &iep->lock, flags );
44270 +       }
44271 +
44272 +       if ( file->f_mode & FMODE_WRITE ) {
44273 +               poll_wait( file, &oep->wait, wait );
44274 +               spin_lock_irqsave( &oep->lock, flags );
44275 +               if ( oep->bufWrPtr < oep->bufSize )
44276 +                       mask |= POLLOUT | POLLWRNORM;
44277 +               spin_unlock_irqrestore( &oep->lock, flags );
44278 +       }
44279 +
44280 +       return mask;
44281 +}
44282 +
44283 +
44284 +/** Basic operation on /dev/midiXX as registered through struct file_operations.
44285 + *
44286 + * Basic contract: This is always the first operation performed on the
44287 + * device node. If no method is defined, the open succeeds without any
44288 + * notification given to the module.
44289 + *
44290 + **/
44291 +
44292 +static int usb_midi_open(struct inode *inode, struct file *file)
44293 +{
44294 +       int minor = MINOR(inode->i_rdev);
44295 +       DECLARE_WAITQUEUE(wait, current);
44296 +       struct list_head      *devs, *mdevs;
44297 +       struct usb_midi_state *s;
44298 +       struct usb_mididev    *m;
44299 +       int flags;
44300 +       int succeed = 0;
44301 +
44302 +#if 0
44303 +       printk(KERN_INFO "usb-midi: Open minor= %d.\n", minor);
44304 +#endif
44305 +
44306 +       for(;;) {
44307 +               down(&open_sem);
44308 +               for (devs = mididevs.next; devs != &mididevs; devs = devs->next) {
44309 +                       s = list_entry(devs, struct usb_midi_state, mididev);
44310 +                       for (mdevs = s->midiDevList.next; mdevs != &s->midiDevList; mdevs = mdevs->next) {
44311 +                               m = list_entry(mdevs, struct usb_mididev, list);
44312 +                               if ( !((m->dev_midi ^ minor) & ~0xf) )
44313 +                                       goto device_found;
44314 +                       }
44315 +               }
44316 +               up(&open_sem);
44317 +               return -ENODEV;
44318 +
44319 +       device_found:
44320 +               if ( !s->usbdev ) {
44321 +                       up(&open_sem);
44322 +                       return -EIO;
44323 +               }
44324 +               if ( !(m->open_mode & file->f_mode) ) {
44325 +                       break;
44326 +               }
44327 +               if ( file->f_flags & O_NONBLOCK ) {
44328 +                       up(&open_sem);
44329 +                       return -EBUSY;
44330 +               }
44331 +               __set_current_state(TASK_INTERRUPTIBLE);
44332 +               add_wait_queue( &open_wait, &wait );
44333 +               up(&open_sem);
44334 +               schedule();
44335 +               __set_current_state(TASK_RUNNING);
44336 +               remove_wait_queue( &open_wait, &wait );
44337 +               if ( signal_pending(current) ) {
44338 +                       return -ERESTARTSYS;
44339 +               }
44340 +       }
44341 +
44342 +       file->private_data = m;
44343 +       spin_lock_irqsave( &s->lock, flags );
44344 +
44345 +       if ( !(m->open_mode & (FMODE_READ | FMODE_WRITE)) ) {
44346 +               //FIXME: intented semantics unclear here
44347 +               m->min.bufRdPtr       = 0;
44348 +               m->min.bufWrPtr       = 0;
44349 +               m->min.bufRemains     = 0;
44350 +               spin_lock_init(&m->min.ep->lock);
44351 +
44352 +               m->mout.bufPtr        = 0;
44353 +               m->mout.bufRemains    = 0;
44354 +               m->mout.isInExclusive = 0;
44355 +               m->mout.lastEvent     = 0;
44356 +               spin_lock_init(&m->mout.ep->lock);
44357 +       }
44358 +
44359 +       if ( (file->f_mode & FMODE_READ) && m->min.ep != NULL ) {
44360 +               unsigned long int flagsep;
44361 +               spin_lock_irqsave( &m->min.ep->lock, flagsep );
44362 +               m->min.ep->cables[m->min.cableId] = m;
44363 +               m->min.ep->readers += 1;
44364 +               m->min.bufRdPtr       = 0;
44365 +               m->min.bufWrPtr       = 0;
44366 +               m->min.bufRemains     = 0;
44367 +               spin_unlock_irqrestore( &m->min.ep->lock, flagsep );
44368 +
44369 +               if ( !(m->min.ep->urbSubmitted)) {
44370 +
44371 +                       /* urb->dev must be reinitialized on 2.4.x kernels */
44372 +                       m->min.ep->urb->dev = m->min.ep->usbdev;
44373 +
44374 +                       if ( usb_submit_urb(m->min.ep->urb) ) {
44375 +                               printk(KERN_ERR "usbmidi: Cannot submit urb for MIDI-IN\n");
44376 +                       }
44377 +                       m->min.ep->urbSubmitted = 1;
44378 +               }
44379 +               m->open_mode |= FMODE_READ;
44380 +               succeed = 1;
44381 +       }
44382 +
44383 +       if ( (file->f_mode & FMODE_WRITE) && m->mout.ep != NULL ) {
44384 +               m->mout.bufPtr        = 0;
44385 +               m->mout.bufRemains    = 0;
44386 +               m->mout.isInExclusive = 0;
44387 +               m->mout.lastEvent     = 0;
44388 +               m->open_mode |= FMODE_WRITE;
44389 +               succeed = 1;
44390 +       }
44391 +
44392 +       spin_unlock_irqrestore( &s->lock, flags );
44393 +
44394 +       s->count++;
44395 +       up(&open_sem);
44396 +
44397 +       /** Changed to prevent extra increments to USE_COUNT. **/
44398 +       if (!succeed) {
44399 +               return -EBUSY;
44400 +       }
44401 +
44402 +#if 0
44403 +       printk(KERN_INFO "usb-midi: Open Succeeded. minor= %d.\n", minor);
44404 +#endif
44405 +
44406 +       /** Side-effect: module cannot be removed until USE_COUNT is 0. **/
44407 +#ifndef MOD_INC_EACH_PROBE
44408 +       MOD_INC_USE_COUNT;
44409 +#endif
44410 +
44411 +       return 0; /** Success. **/
44412 +}
44413 +
44414 +
44415 +/** Basic operation on /dev/midiXX as registered through struct file_operations.
44416 + *
44417 + *  Basic contract: Close an opened file and deallocate anything we allocated.
44418 + *  Like open(), this can be missing. If open set file->private_data,
44419 + *  release() must clear it.
44420 + *
44421 + **/
44422 +
44423 +static int usb_midi_release(struct inode *inode, struct file *file)
44424 +{
44425 +       struct usb_mididev *m = (struct usb_mididev *)file->private_data;
44426 +       struct usb_midi_state *s = (struct usb_midi_state *)m->midi;
44427 +
44428 +#if 0
44429 +       printk(KERN_INFO "usb-midi: Close.\n");
44430 +#endif
44431 +
44432 +       down(&open_sem);
44433 +
44434 +       if ( m->open_mode & FMODE_WRITE ) {
44435 +               m->open_mode &= ~FMODE_WRITE;
44436 +               usb_unlink_urb( m->mout.ep->urb );
44437 +       }
44438 +
44439 +       if ( m->open_mode & FMODE_READ ) {
44440 +               unsigned long int flagsep;
44441 +               spin_lock_irqsave( &m->min.ep->lock, flagsep );
44442 +                m->min.ep->cables[m->min.cableId] = 0; // discard cable
44443 +                m->min.ep->readers -= 1;
44444 +               m->open_mode &= ~FMODE_READ;
44445 +               if ( m->min.ep->readers == 0 &&
44446 +                     m->min.ep->urbSubmitted ) {
44447 +                       m->min.ep->urbSubmitted = 0;
44448 +                       usb_unlink_urb(m->min.ep->urb);
44449 +               }
44450 +               spin_unlock_irqrestore( &m->min.ep->lock, flagsep );
44451 +       }
44452 +
44453 +       s->count--;
44454 +
44455 +       up(&open_sem);
44456 +       wake_up(&open_wait);
44457 +
44458 +       file->private_data = 0;
44459 +       /** Sideeffect: Module cannot be removed until usecount is 0. */
44460 +#ifndef MOD_INC_EACH_PROBE
44461 +       MOD_DEC_USE_COUNT;
44462 +#endif
44463 +
44464 +       return 0;
44465 +}
44466 +
44467 +static struct file_operations usb_midi_fops = {
44468 +       llseek:         usb_midi_llseek,
44469 +       read:           usb_midi_read,
44470 +       write:          usb_midi_write,
44471 +       poll:           usb_midi_poll,
44472 +       open:           usb_midi_open,
44473 +       release:        usb_midi_release,
44474 +};
44475 +
44476 +/* ------------------------------------------------------------------------- */
44477 +
44478 +/** Returns filled midi_in_endpoint structure or null on failure.
44479 + *
44480 + * Parameters:
44481 + *     d        - a usb_device
44482 + *     endPoint - An usb endpoint in the range 0 to 15.
44483 + * Called by allocUsbMidiDev();
44484 + *
44485 + **/
44486 +
44487 +static struct midi_in_endpoint *alloc_midi_in_endpoint( struct usb_device *d, int endPoint )
44488 +{
44489 +       struct midi_in_endpoint *ep;
44490 +       int bufSize;
44491 +       int pipe;
44492 +
44493 +       endPoint &= 0x0f; /* Silently force endPoint to lie in range 0 to 15. */
44494 +
44495 +       pipe =  usb_rcvbulkpipe( d, endPoint );
44496 +       bufSize = usb_maxpacket( d, pipe, usb_pipein(pipe) );
44497 +       /* usb_pipein() = ! usb_pipeout() = true for an in Endpoint */
44498 +
44499 +       ep = (struct midi_in_endpoint *)kmalloc(sizeof(struct midi_in_endpoint), GFP_KERNEL);
44500 +       if ( !ep ) {
44501 +               printk(KERN_ERR "usbmidi: no memory for midi in-endpoint\n");
44502 +               return NULL;
44503 +       }
44504 +       memset( ep, 0, sizeof(struct midi_in_endpoint) );
44505 +//      this sets cables[] and readers to 0, too.
44506 +//      for (i=0; i<16; i++) ep->cables[i] = 0; // discard cable
44507 +//      ep->readers = 0;
44508 +
44509 +       ep->endpoint = endPoint;
44510 +
44511 +       ep->recvBuf = (unsigned char *)kmalloc(sizeof(unsigned char)*(bufSize), GFP_KERNEL);
44512 +       if ( !ep->recvBuf ) {
44513 +               printk(KERN_ERR "usbmidi: no memory for midi in-endpoint buffer\n");
44514 +               kfree(ep);
44515 +               return NULL;
44516 +       }
44517 +
44518 +       ep->urb = usb_alloc_urb(0); /* no ISO */
44519 +       if ( !ep->urb ) {
44520 +               printk(KERN_ERR "usbmidi: no memory for midi in-endpoint urb\n");
44521 +               kfree(ep->recvBuf);
44522 +               kfree(ep);
44523 +               return NULL;
44524 +       }
44525 +       FILL_BULK_URB( ep->urb, d, 
44526 +                      usb_rcvbulkpipe(d, endPoint),
44527 +                      (unsigned char *)ep->recvBuf, bufSize,
44528 +                      (usb_complete_t)usb_bulk_read, ep );
44529 +
44530 +       /* ep->bufRdPtr     = 0; */
44531 +       /* ep->bufWrPtr     = 0; */
44532 +       /* ep->bufRemains   = 0; */
44533 +       /* ep->urbSubmitted = 0; */
44534 +       ep->recvBufSize  = bufSize;
44535 +
44536 +       init_waitqueue_head(&ep->wait);
44537 +
44538 +       return ep;
44539 +}
44540 +
44541 +static int remove_midi_in_endpoint( struct midi_in_endpoint *min )
44542 +{
44543 +       usb_unlink_urb( min->urb );
44544 +       usb_free_urb( min->urb );
44545 +       kfree( min->recvBuf );
44546 +       kfree( min );
44547 +
44548 +       return 0;
44549 +}
44550 +
44551 +/** Returns filled midi_out_endpoint structure or null on failure.
44552 + *
44553 + * Parameters:
44554 + *     d        - a usb_device
44555 + *     endPoint - An usb endpoint in the range 0 to 15.
44556 + * Called by allocUsbMidiDev();
44557 + *
44558 + **/
44559 +static struct midi_out_endpoint *alloc_midi_out_endpoint( struct usb_device *d, int endPoint )
44560 +{
44561 +       struct midi_out_endpoint *ep = NULL;
44562 +       int pipe;
44563 +       int bufSize;
44564 +
44565 +       endPoint &= 0x0f;
44566 +       pipe =  usb_sndbulkpipe( d, endPoint );
44567 +       bufSize = usb_maxpacket( d, pipe, usb_pipeout(pipe) );
44568 +
44569 +       ep = (struct midi_out_endpoint *)kmalloc(sizeof(struct midi_out_endpoint), GFP_KERNEL);
44570 +       if ( !ep ) {
44571 +               printk(KERN_ERR "usbmidi: no memory for midi out-endpoint\n");
44572 +               return NULL;
44573 +       }
44574 +       memset( ep, 0, sizeof(struct midi_out_endpoint) );
44575 +
44576 +       ep->endpoint = endPoint;
44577 +       ep->buf = (unsigned char *)kmalloc(sizeof(unsigned char)*bufSize, GFP_KERNEL);
44578 +       if ( !ep->buf ) {
44579 +               printk(KERN_ERR "usbmidi: no memory for midi out-endpoint buffer\n");
44580 +               kfree(ep);
44581 +               return NULL;
44582 +       }
44583 +
44584 +       ep->urb = usb_alloc_urb(0); /* no ISO */
44585 +       if ( !ep->urb ) {
44586 +               printk(KERN_ERR "usbmidi: no memory for midi out-endpoint urb\n");
44587 +               kfree(ep->buf);
44588 +               kfree(ep);
44589 +               return NULL;
44590 +       }
44591 +
44592 +       ep->bufSize       = bufSize;
44593 +       /* ep->bufWrPtr      = 0; */
44594 +
44595 +       init_waitqueue_head(&ep->wait);
44596 +
44597 +       return ep;
44598 +}
44599 +
44600 +
44601 +static int remove_midi_out_endpoint( struct midi_out_endpoint *mout )
44602 +{
44603 +       usb_unlink_urb( mout->urb );
44604 +       usb_free_urb( mout->urb );
44605 +       kfree( mout->buf );
44606 +       kfree( mout );
44607 +
44608 +       return 0;
44609 +}
44610 +
44611 +
44612 +/** Returns a filled usb_mididev structure, registered as a Linux MIDI device.
44613 + *
44614 + * Returns null if memory is not available or the device cannot be registered.
44615 + * Called by allocUsbMidiDev();
44616 + *
44617 + **/
44618 +static struct usb_mididev *allocMidiDev(
44619 +       struct usb_midi_state *s,
44620 +       struct midi_in_endpoint *min,
44621 +       struct midi_out_endpoint *mout,
44622 +       int inCableId,
44623 +       int outCableId )
44624 +{
44625 +       struct usb_mididev *m;
44626 +
44627 +       m = (struct usb_mididev *)kmalloc(sizeof(struct usb_mididev), GFP_KERNEL);
44628 +       if (!m) {
44629 +               printk(KERN_ERR "usbmidi: no memory for midi device\n");
44630 +               return NULL;
44631 +       }
44632 +
44633 +       memset(m, 0, sizeof(struct usb_mididev));
44634 +
44635 +       if ((m->dev_midi = register_sound_midi(&usb_midi_fops, -1)) < 0) {
44636 +               printk(KERN_ERR "usbmidi: cannot register midi device\n");
44637 +               kfree(m);
44638 +               return NULL;
44639 +       }
44640 +
44641 +       m->midi               = s;
44642 +       /* m->open_mode          = 0; */
44643 +
44644 +       if ( min ) {
44645 +               m->min.ep             = min;
44646 +               m->min.ep->usbdev     = s->usbdev;
44647 +               m->min.cableId        = inCableId;
44648 +       }
44649 +       /* m->min.bufPtr         = 0; */
44650 +       /* m->min.bufRemains     = 0; */
44651 +
44652 +       if ( mout ) {
44653 +               m->mout.ep            = mout;
44654 +               m->mout.ep->usbdev    = s->usbdev;
44655 +               m->mout.cableId       = outCableId;
44656 +       }
44657 +       /* m->mout.bufPtr        = 0; */
44658 +       /* m->mout.bufRemains    = 0; */
44659 +       /* m->mout.isInExclusive = 0; */
44660 +       /* m->mout.lastEvent     = 0; */
44661 +
44662 +       m->singlebyte         = singlebyte;
44663 +
44664 +       return m;
44665 +}
44666 +
44667 +
44668 +static void release_midi_device( struct usb_midi_state *s )
44669 +{
44670 +       struct usb_mididev *m;
44671 +       struct midi_in_endpoint *min;
44672 +       struct midi_out_endpoint *mout;
44673 +
44674 +       if ( s->count > 0 ) {
44675 +               up(&open_sem);
44676 +               return;
44677 +       }
44678 +       up( &open_sem );
44679 +       wake_up( &open_wait );
44680 +
44681 +       while(!list_empty(&s->inEndpointList)) {
44682 +               min = list_entry(s->inEndpointList.next, struct midi_in_endpoint, list);
44683 +               list_del(&min->list);
44684 +               remove_midi_in_endpoint(min);
44685 +       }
44686 +
44687 +       while(!list_empty(&s->outEndpointList)) {
44688 +               mout = list_entry(s->outEndpointList.next, struct midi_out_endpoint, list);
44689 +               list_del(&mout->list);
44690 +               remove_midi_out_endpoint(mout);
44691 +       }
44692 +
44693 +       while(!list_empty(&s->midiDevList)) {
44694 +               m = list_entry(s->midiDevList.next, struct usb_mididev, list);
44695 +               list_del(&m->list);
44696 +               kfree(m);
44697 +       }
44698 +
44699 +       kfree(s);
44700 +
44701 +       return;
44702 +}
44703 +
44704 +
44705 +/* ------------------------------------------------------------------------- */
44706 +
44707 +/** Utility routine to find a descriptor in a dump of many descriptors.
44708 + * Returns start of descriptor or NULL if not found. 
44709 + * descStart pointer to list of interfaces.
44710 + * descLength length (in bytes) of dump
44711 + * after (ignored if NULL) this routine returns only descriptors after "after"
44712 + * dtype (mandatory) The descriptor type.
44713 + * iface (ignored if -1) returns descriptor at/following given interface
44714 + * altSetting (ignored if -1) returns descriptor at/following given altSetting
44715 + *
44716 + *
44717 + *  Called by parseDescriptor(), find_csinterface_descriptor();
44718 + *
44719 + */
44720 +static void *find_descriptor( void *descStart, unsigned int descLength, void *after, unsigned char dtype, int iface, int altSetting )
44721 +{
44722 +       unsigned char *p, *end, *next;
44723 +       int interfaceNumber = -1, altSet = -1;
44724 +
44725 +       p = descStart;
44726 +       end = p + descLength;
44727 +       for( ; p < end; ) {
44728 +               if ( p[0] < 2 )
44729 +                       return NULL;
44730 +               next = p + p[0];
44731 +               if ( next > end )
44732 +                       return NULL;
44733 +               if ( p[1] == USB_DT_INTERFACE ) {
44734 +                       if ( p[0] < USB_DT_INTERFACE_SIZE )
44735 +                               return NULL;
44736 +                       interfaceNumber = p[2];
44737 +                       altSet = p[3];
44738 +               }
44739 +               if ( p[1] == dtype &&
44740 +                    ( !after || ( p > (unsigned char *)after) ) &&
44741 +                    ( ( iface == -1) || (iface == interfaceNumber) ) &&
44742 +                    ( (altSetting == -1) || (altSetting == altSet) )) {
44743 +                       return p;
44744 +               }
44745 +               p = next;
44746 +       }
44747 +       return NULL;
44748 +}
44749 +
44750 +/** Utility to find a class-specfic interface descriptor.
44751 + *  dsubtype is a descriptor subtype
44752 + *  Called by parseDescriptor();
44753 + **/
44754 +static void *find_csinterface_descriptor(void *descStart, unsigned int descLength, void *after, u8 dsubtype, int iface, int altSetting)
44755 +{
44756 +       unsigned char *p;
44757 +  
44758 +       p = find_descriptor( descStart, descLength, after, USB_DT_CS_INTERFACE, iface, altSetting );
44759 +       while ( p ) {
44760 +               if ( p[0] >= 3 && p[2] == dsubtype )
44761 +                       return p;
44762 +               p = find_descriptor( descStart, descLength, p, USB_DT_CS_INTERFACE, 
44763 +                                    iface, altSetting );
44764 +       }
44765 +       return NULL;
44766 +}
44767 +
44768 +
44769 +/** The magic of making a new usb_midi_device from config happens here.
44770 + *
44771 + * The caller is responsible for free-ing this return value (if not NULL).
44772 + *
44773 + **/
44774 +static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned char *buffer, int bufSize, unsigned int ifnum , unsigned int altSetting, int quirks)
44775 +{
44776 +       struct usb_midi_device *u;
44777 +       unsigned char *p1;
44778 +       unsigned char *p2;
44779 +       unsigned char *next;
44780 +       int iep, oep;
44781 +       int length;
44782 +       unsigned long longBits;
44783 +       int pins, nbytes, offset, shift, jack;
44784 +#ifdef HAVE_JACK_STRINGS
44785 +       /** Jacks can have associated names.  **/
44786 +       unsigned char jack2string[256];
44787 +#endif
44788 +
44789 +       u = 0;
44790 +       /* find audiocontrol interface */
44791 +       p1 = find_csinterface_descriptor( buffer, bufSize, NULL,
44792 +                                         MS_HEADER, ifnum, altSetting);
44793 +
44794 +       if ( !p1 ) {
44795 +               goto error_end;
44796 +       }
44797 +
44798 +       if ( p1[0] < MS_HEADER_LENGTH ) {
44799 +               goto error_end;
44800 +       }
44801 +
44802 +       /* Assume success. Since the device corresponds to USB-MIDI spec, we assume
44803 +          that the rest of the USB 2.0 spec is obeyed. */
44804 +
44805 +       u = (struct usb_midi_device *)kmalloc( sizeof(struct usb_midi_device), GFP_KERNEL );
44806 +       if ( !u ) {
44807 +               return NULL;
44808 +       }
44809 +       u->deviceName = 0;
44810 +       u->idVendor = d->descriptor.idVendor;
44811 +       u->idProduct = d->descriptor.idProduct;
44812 +       u->interface = ifnum;
44813 +       u->altSetting = altSetting;
44814 +       u->in[0].endpoint = -1;
44815 +       u->in[0].cableId = -1;
44816 +       u->out[0].endpoint = -1;
44817 +       u->out[0].cableId = -1;
44818 +
44819 +
44820 +       printk(KERN_INFO "usb-midi: Found MIDIStreaming device corresponding to Release %d.%02d of spec.\n",
44821 +              (p1[4] >> 4) * 10 + (p1[4] & 0x0f ),
44822 +              (p1[3] >> 4) * 10 + (p1[3] & 0x0f )
44823 +               );
44824 +
44825 +       length = p1[5] | (p1[6] << 8);
44826 +
44827 +#ifdef HAVE_JACK_STRINGS
44828 +       memset(jack2string, 0, sizeof(unsigned char) * 256);
44829 +#endif
44830 +
44831 +       length -= p1[0];
44832 +       for (p2 = p1 + p1[0]; length > 0; p2 = next) {
44833 +               next = p2 + p2[0];
44834 +               length -= p2[0];
44835 +
44836 +               if (p2[0] < 2 ) break;
44837 +               if (p2[1] != USB_DT_CS_INTERFACE) break;
44838 +               if (p2[2] == MIDI_IN_JACK && p2[0] >= 6 ) {
44839 +                       jack = p2[4];
44840 +#ifdef HAVE_JACK_STRINGS
44841 +                       jack2string[jack] = p2[5];
44842 +#endif
44843 +                       printk(KERN_INFO "usb-midi: Found IN Jack 0x%02x %s\n",
44844 +                              jack, (p2[3] == EMBEDDED_JACK)?"EMBEDDED":"EXTERNAL" );
44845 +               } else if ( p2[2] == MIDI_OUT_JACK && p2[0] >= 6) {
44846 +                       pins = p2[5];
44847 +                       if ( p2[0] < (6 + 2 * pins) ) continue;
44848 +                       jack = p2[4];
44849 +#ifdef HAVE_JACK_STRINGS
44850 +                       jack2string[jack] = p2[5 + 2 * pins];
44851 +#endif
44852 +                       printk(KERN_INFO "usb-midi: Found OUT Jack 0x%02x %s, %d pins\n",
44853 +                              jack, (p2[3] == EMBEDDED_JACK)?"EMBEDDED":"EXTERNAL", pins );
44854 +               } else if ( p2[2] == ELEMENT_DESCRIPTOR  && p2[0]  >= 10) {
44855 +                       pins = p2[4];
44856 +                       if ( p2[0] < (9 + 2 * pins ) ) continue;
44857 +                       nbytes = p2[8 + 2 * pins ];
44858 +                       if ( p2[0] < (10 + 2 * pins + nbytes) ) continue;
44859 +                       longBits = 0L;
44860 +                       for ( offset = 0, shift = 0; offset < nbytes && offset < 8; offset ++, shift += 8) {
44861 +                               longBits |= ((long)(p2[9 + 2 * pins + offset])) << shift;
44862 +                       }
44863 +                       jack = p2[3];
44864 +#ifdef HAVE_JACK_STRINGS
44865 +                       jack2string[jack] = p2[9 + 2 * pins + nbytes];
44866 +#endif
44867 +                       printk(KERN_INFO "usb-midi: Found ELEMENT 0x%02x, %d/%d pins in/out, bits: 0x%016lx\n",
44868 +                              jack, pins, (int)(p2[5 + 2 * pins]), (long)longBits );
44869 +               } else {
44870 +               }
44871 +       }
44872 +
44873 +       iep=0;
44874 +       oep=0;
44875 +
44876 +       if (quirks==0) {
44877 +               /* MIDISTREAM */
44878 +               p2 = 0;
44879 +               for (p1 = find_descriptor(buffer, bufSize, NULL, USB_DT_ENDPOINT,
44880 +                                         ifnum, altSetting ); p1; p1 = next ) {
44881 +                       next = find_descriptor(buffer, bufSize, p1, USB_DT_ENDPOINT,
44882 +                                              ifnum, altSetting ); 
44883 +                       p2 = find_descriptor(buffer, bufSize, p1, USB_DT_CS_ENDPOINT,
44884 +                                            ifnum, altSetting ); 
44885 +
44886 +                       if ( p2 && next && ( p2 > next ) )
44887 +                               p2 = 0;
44888 +
44889 +                       if ( p1[0] < 9 || !p2 || p2[0] < 4 ) continue;
44890 +
44891 +                       if ( (p1[2] & 0x80) == 0x80 ) {
44892 +                               if ( iep < 15 ) {
44893 +                                       pins = p2[3]; /* not pins -- actually "cables" */
44894 +                                       if ( pins > 16 )
44895 +                                               pins = 16;
44896 +                                       u->in[iep].endpoint = p1[2];
44897 +                                       u->in[iep].cableId = ( 1 << pins ) - 1;
44898 +                                       if ( u->in[iep].cableId ) iep ++;
44899 +                                       if ( iep < 15 ) {
44900 +                                               u->in[iep].endpoint = -1;
44901 +                                               u->in[iep].cableId = -1;
44902 +                                       }
44903 +                               }
44904 +                       } else {
44905 +                               if ( oep < 15 ) {
44906 +                                       pins = p2[3]; /* not pins -- actually "cables" */
44907 +                                       if ( pins > 16 )
44908 +                                               pins = 16;
44909 +                                       u->out[oep].endpoint = p1[2];
44910 +                                       u->out[oep].cableId = ( 1 << pins ) - 1;
44911 +                                       if ( u->out[oep].cableId ) oep ++;
44912 +                                       if ( oep < 15 ) {
44913 +                                               u->out[oep].endpoint = -1;
44914 +                                               u->out[oep].cableId = -1;
44915 +                                       }
44916 +                               }
44917 +                       }
44918 +       
44919 +               }
44920 +       } else if (quirks==1) {
44921 +               /* YAMAHA quirks */
44922 +               for (p1 = find_descriptor(buffer, bufSize, NULL, USB_DT_ENDPOINT,
44923 +                                         ifnum, altSetting ); p1; p1 = next ) {
44924 +                       next = find_descriptor(buffer, bufSize, p1, USB_DT_ENDPOINT,
44925 +                                              ifnum, altSetting ); 
44926 +       
44927 +                       if ( p1[0] < 7 ) continue;
44928 +
44929 +                       if ( (p1[2] & 0x80) == 0x80 ) {
44930 +                               if ( iep < 15 ) {
44931 +                                       pins = iep+1;
44932 +                                       if ( pins > 16 )
44933 +                                               pins = 16;
44934 +                                       u->in[iep].endpoint = p1[2];
44935 +                                       u->in[iep].cableId = ( 1 << pins ) - 1;
44936 +                                       if ( u->in[iep].cableId ) iep ++;
44937 +                                       if ( iep < 15 ) {
44938 +                                               u->in[iep].endpoint = -1;
44939 +                                               u->in[iep].cableId = -1;
44940 +                                       }
44941 +                               }
44942 +                       } else {
44943 +                               if ( oep < 15 ) {
44944 +                                       pins = oep+1;
44945 +                                       if ( pins > 16 )
44946 +                                               pins = 16;
44947 +                                       u->out[oep].endpoint = p1[2];
44948 +                                       u->out[oep].cableId = ( 1 << pins ) - 1;
44949 +                                       if ( u->out[oep].cableId ) oep ++;
44950 +                                       if ( oep < 15 ) {
44951 +                                               u->out[oep].endpoint = -1;
44952 +                                               u->out[oep].cableId = -1;
44953 +                                       }
44954 +                               }
44955 +                       }
44956 +       
44957 +               }
44958 +       }
44959 +
44960 +       if ( !iep && ! oep ) {
44961 +               goto error_end;
44962 +       }
44963 +
44964 +       return u;
44965 +
44966 +error_end:
44967 +       if ( u ) kfree(u);
44968 +       return NULL;
44969 +}
44970 +
44971 +/* ------------------------------------------------------------------------- */
44972 +
44973 +/** Returns number between 0 and 16.
44974 + *
44975 + **/
44976 +static int on_bits( unsigned short v )
44977 +{
44978 +       int i;
44979 +       int ret=0;
44980 +
44981 +       for ( i=0 ; i<16 ; i++ ) {
44982 +               if ( v & (1<<i) ) ret++;
44983 +       }
44984 +
44985 +       return ret;
44986 +}
44987 +
44988 +
44989 +/** USB-device will be interrogated for altSetting.
44990 + *
44991 + * Returns negative on error.
44992 + * Called by allocUsbMidiDev();
44993 + *
44994 + **/
44995 +
44996 +static int get_alt_setting( struct usb_device *d, int ifnum )
44997 +{
44998 +       int alts, alt=0;
44999 +       struct usb_interface_descriptor *interface;
45000 +       struct usb_endpoint_descriptor *ep;
45001 +       int epin, epout;
45002 +       int i;
45003 +
45004 +       alts = d->actconfig->interface[ifnum].num_altsetting;
45005 +
45006 +       for ( alt=0 ; alt<alts ; alt++ ) {
45007 +               interface = &d->actconfig->interface[ifnum].altsetting[alt];
45008 +               epin = -1;
45009 +               epout = -1;
45010 +
45011 +               for ( i=0 ; i<interface->bNumEndpoints ; i++ ) {
45012 +                       ep = &interface->endpoint[i];
45013 +                       if ( (ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK ) {
45014 +                               continue;
45015 +                       }
45016 +                       if ( (ep->bEndpointAddress & USB_DIR_IN) && epin < 0 ) {
45017 +                               epin = i;
45018 +                       } else if ( epout < 0 ) {
45019 +                               epout = i;
45020 +                       }
45021 +                       if ( epin >= 0 && epout >= 0 ) {
45022 +                               return alt;
45023 +                       }
45024 +               }
45025 +       }
45026 +
45027 +       return -ENODEV;
45028 +}
45029 +
45030 +
45031 +/* ------------------------------------------------------------------------- */
45032 +
45033 +
45034 +/** Returns 0 if successful in allocating and registering internal structures.
45035 + * Returns negative on failure.
45036 + * Calls allocMidiDev which additionally registers /dev/midiXX devices.
45037 + * Writes messages on success to indicate which /dev/midiXX is which physical
45038 + * endpoint.
45039 + *
45040 + **/
45041 +static int alloc_usb_midi_device( struct usb_device *d, struct usb_midi_state *s, struct usb_midi_device *u )
45042 +{
45043 +       struct usb_mididev **mdevs=NULL;
45044 +       struct midi_in_endpoint *mins[15], *min;
45045 +       struct midi_out_endpoint *mouts[15], *mout;
45046 +       int inDevs=0, outDevs=0;
45047 +       int inEndpoints=0, outEndpoints=0;
45048 +       int inEndpoint, outEndpoint;
45049 +       int inCableId, outCableId;
45050 +       int i;
45051 +       int devices = 0;
45052 +       int alt = 0;
45053 +
45054 +       /* Obtain altSetting or die.. */
45055 +       alt = u->altSetting;
45056 +       if ( alt < 0 ) {
45057 +               alt = get_alt_setting( d, u->interface );
45058 +       }
45059 +       if ( alt < 0 ) { return -ENXIO; }
45060 +
45061 +       /* Configure interface */
45062 +       if ( usb_set_interface( d, u->interface, alt ) < 0 ) {
45063 +               return -ENXIO;
45064 +       }
45065 +
45066 +       for ( i = 0 ; i < 15 ; i++ ) {
45067 +               mins[i] = NULL;
45068 +               mouts[i] = NULL;
45069 +       }
45070 +
45071 +       /* Begin Allocation */
45072 +       while( inEndpoints < 15
45073 +              && inDevs < maxdevices
45074 +              && u->in[inEndpoints].cableId >= 0 ) {
45075 +               inDevs += on_bits((unsigned short)u->in[inEndpoints].cableId);
45076 +               mins[inEndpoints] = alloc_midi_in_endpoint( d, u->in[inEndpoints].endpoint );
45077 +               if ( mins[inEndpoints] == NULL ) { goto error_end; }
45078 +               inEndpoints++;
45079 +       }
45080 +
45081 +       while( outEndpoints < 15
45082 +              && outDevs < maxdevices
45083 +              && u->out[outEndpoints].cableId >= 0 ) {
45084 +               outDevs += on_bits((unsigned short)u->out[outEndpoints].cableId);
45085 +               mouts[outEndpoints] = alloc_midi_out_endpoint( d, u->out[outEndpoints].endpoint );
45086 +               if ( mouts[outEndpoints] == NULL ) { goto error_end; }
45087 +               outEndpoints++;
45088 +       }
45089 +
45090 +       devices = inDevs > outDevs ? inDevs : outDevs;
45091 +       devices = maxdevices > devices ? devices : maxdevices;
45092 +
45093 +       /* obtain space for device name (iProduct) if not known. */
45094 +       if ( ! u->deviceName ) {
45095 +               mdevs = (struct usb_mididev **)
45096 +                       kmalloc(sizeof(struct usb_mididevs *)*devices
45097 +                               + sizeof(char) * 256, GFP_KERNEL);
45098 +       } else {
45099 +               mdevs = (struct usb_mididev **)
45100 +                       kmalloc(sizeof(struct usb_mididevs *)*devices, GFP_KERNEL);
45101 +       }
45102 +
45103 +       if ( !mdevs ) {
45104 +               /* devices = 0; */
45105 +               /* mdevs = NULL; */
45106 +               goto error_end;
45107 +       }
45108 +       for ( i=0 ; i<devices ; i++ ) {
45109 +               mdevs[i] = NULL;
45110 +       }
45111 +
45112 +       /* obtain device name (iProduct) if not known. */
45113 +       if ( ! u->deviceName ) {
45114 +               u->deviceName = (char *) (mdevs + devices);
45115 +               if ( ! d->have_langid && d->descriptor.iProduct) {
45116 +                       alt = usb_get_string(d, 0, 0, u->deviceName, 250);
45117 +                       if (alt < 0) {
45118 +                               printk(KERN_INFO "error getting string descriptor 0 (error=%d)\n", alt);
45119 +                       } else if (u->deviceName[0] < 4) {
45120 +                               printk(KERN_INFO "string descriptor 0 too short (length = %d)\n", alt);
45121 +                       } else {
45122 +                               printk(KERN_INFO "string descriptor 0 found (length = %d)\n", alt);
45123 +                               for(; alt >= 4; alt -= 2) {
45124 +                                       i = u->deviceName[alt-2] | (u->deviceName[alt-1]<< 8);
45125 +                                       printk(KERN_INFO "usb-midi: langid(%d) 0x%04x\n",
45126 +                                              (alt-4) >> 1, i);
45127 +                                       if ( ( ( i ^ ulangid ) & 0xff ) == 0 ) {
45128 +                                               d->have_langid = 1;
45129 +                                               d->string_langid = i;
45130 +                                               printk(KERN_INFO "usb-midi: langid(match) 0x%04x\n", i);
45131 +                                               if ( i == ulangid )
45132 +                                                       break;
45133 +                                       }
45134 +                               }
45135 +                       }
45136 +               }
45137 +               u->deviceName[0] = (char) 0;
45138 +               if (d->descriptor.iProduct) {
45139 +                       printk(KERN_INFO "usb-midi: fetchString(%d)\n", d->descriptor.iProduct);
45140 +                       alt = usb_string(d, d->descriptor.iProduct, u->deviceName, 255);
45141 +                       if( alt < 0 ) {
45142 +                               u->deviceName[0] = (char) 0;
45143 +                       }
45144 +                       printk(KERN_INFO "usb-midi: fetchString = %d\n", alt);
45145 +               } 
45146 +               /* Failsafe */
45147 +               if ( !u->deviceName[0] ) {
45148 +                       if ( d->descriptor.idVendor == USB_VENDOR_ID_ROLAND ) {
45149 +                               strcpy(u->deviceName, "Unknown Roland");
45150 +                       } else if ( d->descriptor.idVendor == USB_VENDOR_ID_STEINBERG  ) {
45151 +                               strcpy(u->deviceName, "Unknown Steinberg");
45152 +                       } else if ( d->descriptor.idVendor == USB_VENDOR_ID_YAMAHA ) {
45153 +                               strcpy(u->deviceName, "Unknown Yamaha");
45154 +                       } else {
45155 +                               strcpy(u->deviceName, "Unknown");
45156 +                       }
45157 +               }
45158 +       }
45159 +
45160 +       inEndpoint  = 0; inCableId  = -1;
45161 +       outEndpoint = 0; outCableId = -1;
45162 +
45163 +       for ( i=0 ; i<devices ; i++ ) {
45164 +               for ( inCableId ++ ;
45165 +                     inEndpoint <15
45166 +                             && mins[inEndpoint] 
45167 +                             && !(u->in[inEndpoint].cableId & (1<<inCableId)) ;
45168 +                     inCableId++ ) {
45169 +                       if ( inCableId >= 16 ) {
45170 +                               inEndpoint  ++;
45171 +                               inCableId  = 0;
45172 +                       }
45173 +               }
45174 +               min  = mins[inEndpoint];
45175 +               for ( outCableId ++ ;
45176 +                     outEndpoint <15
45177 +                             && mouts[outEndpoint] 
45178 +                             && !(u->out[outEndpoint].cableId & (1<<outCableId)) ;
45179 +                     outCableId++ ) {
45180 +                       if ( outCableId >= 16 ) {
45181 +                               outEndpoint  ++;
45182 +                               outCableId  = 0;
45183 +                       }
45184 +               }
45185 +               mout = mouts[outEndpoint];
45186 +
45187 +               mdevs[i] = allocMidiDev( s, min, mout, inCableId, outCableId );
45188 +               if ( mdevs[i] == NULL ) { goto error_end; }
45189 +
45190 +       }
45191 +
45192 +       /* Success! */
45193 +       for ( i=0 ; i<devices ; i++ ) {
45194 +               list_add_tail( &mdevs[i]->list, &s->midiDevList );
45195 +       }
45196 +       for ( i=0 ; i<inEndpoints ; i++ ) {
45197 +               list_add_tail( &mins[i]->list, &s->inEndpointList );
45198 +       }
45199 +       for ( i=0 ; i<outEndpoints ; i++ ) {
45200 +               list_add_tail( &mouts[i]->list, &s->outEndpointList );
45201 +       }
45202 +
45203 +       printk(KERN_INFO "usbmidi: found [ %s ] (0x%04x:0x%04x), attached:\n", u->deviceName, u->idVendor, u->idProduct );
45204 +       for ( i=0 ; i<devices ; i++ ) {
45205 +               int dm = (mdevs[i]->dev_midi-2)>>4;
45206 +               if ( mdevs[i]->mout.ep != NULL && mdevs[i]->min.ep != NULL ) {
45207 +                       printk(KERN_INFO "usbmidi: /dev/midi%02d: in (ep:%02x cid:%2d bufsiz:%2d) out (ep:%02x cid:%2d bufsiz:%2d)\n", 
45208 +                              dm,
45209 +                              mdevs[i]->min.ep->endpoint|USB_DIR_IN, mdevs[i]->min.cableId, mdevs[i]->min.ep->recvBufSize,
45210 +                              mdevs[i]->mout.ep->endpoint, mdevs[i]->mout.cableId, mdevs[i]->mout.ep->bufSize);
45211 +               } else if ( mdevs[i]->min.ep != NULL ) {
45212 +                       printk(KERN_INFO "usbmidi: /dev/midi%02d: in (ep:%02x cid:%2d bufsiz:%02d)\n", 
45213 +                              dm,
45214 +                              mdevs[i]->min.ep->endpoint|USB_DIR_IN, mdevs[i]->min.cableId, mdevs[i]->min.ep->recvBufSize);
45215 +               } else if ( mdevs[i]->mout.ep != NULL ) {
45216 +                       printk(KERN_INFO "usbmidi: /dev/midi%02d: out (ep:%02x cid:%2d bufsiz:%02d)\n", 
45217 +                              dm,
45218 +                              mdevs[i]->mout.ep->endpoint, mdevs[i]->mout.cableId, mdevs[i]->mout.ep->bufSize);
45219 +               }
45220 +       }
45221 +
45222 +       kfree(mdevs);
45223 +       return 0;
45224 +
45225 + error_end:
45226 +       if ( mdevs != NULL && devices > 0 ) {
45227 +               for ( i=0 ; i<devices ; i++ ) {
45228 +                       if ( mdevs[i] != NULL ) {
45229 +                               unregister_sound_midi( mdevs[i]->dev_midi );
45230 +                               kfree(mdevs[i]);
45231 +                       }
45232 +               }
45233 +               kfree(mdevs);
45234 +       }
45235 +
45236 +       for ( i=0 ; i<15 ; i++ ) {
45237 +               if ( mins[i] != NULL ) {
45238 +                       remove_midi_in_endpoint( mins[i] );
45239 +               }
45240 +               if ( mouts[i] != NULL ) {
45241 +                       remove_midi_out_endpoint( mouts[i] );
45242 +               }
45243 +       }
45244 +
45245 +       return -ENOMEM;
45246 +}
45247 +
45248 +/* ------------------------------------------------------------------------- */
45249 +
45250 +/** Attempt to scan YAMAHA's device descriptor and detect correct values of
45251 + *  them.
45252 + *  Return 0 on succes, negative on failure.
45253 + *  Called by usb_midi_probe();
45254 + **/
45255 +
45256 +static int detect_yamaha_device( struct usb_device *d, unsigned int ifnum, struct usb_midi_state *s)
45257 +{
45258 +       struct usb_config_descriptor    *c = d->actconfig;
45259 +       struct usb_interface_descriptor *interface;
45260 +       struct usb_midi_device *u;
45261 +       unsigned char buf[USB_DT_CONFIG_SIZE], *buffer;
45262 +       int bufSize;
45263 +       int i;
45264 +       int alts=-1;
45265 +       int ret;
45266 +
45267 +       if (d->descriptor.idVendor != USB_VENDOR_ID_YAMAHA) {
45268 +               return -EINVAL;
45269 +       }
45270 +
45271 +       for ( i=0 ; i < c->interface[ifnum].num_altsetting; i++ ) {
45272 +               interface = c->interface[ifnum].altsetting + i;
45273 +
45274 +               if ( interface->bInterfaceClass != 255 ||
45275 +                    interface->bInterfaceSubClass != 0 )
45276 +                       continue;
45277 +               alts = i;
45278 +       }
45279 +       if ( alts == -1 ) {
45280 +               return -EINVAL;
45281 +       }
45282 +
45283 +       printk(KERN_INFO "usb-midi: Found YAMAHA USB-MIDI device on dev %04x:%04x, iface %d\n",
45284 +              d->descriptor.idVendor, d->descriptor.idProduct, ifnum);
45285 +
45286 +       for ( i=0 ; i < d->descriptor.bNumConfigurations ; i++ ) {
45287 +               if ( d->config+i == c ) goto configfound;
45288 +       }
45289 +
45290 +       printk(KERN_INFO "usb-midi: Config not found.\n");
45291 +
45292 +       return -EINVAL;
45293 +
45294 + configfound:
45295 +
45296 +       /* this may not be necessary. */
45297 +       if ( usb_set_configuration( d, c->bConfigurationValue ) < 0 ) {
45298 +               printk(KERN_INFO "usb-midi: Could not set config.\n");
45299 +               return -EINVAL;
45300 +       }
45301 +
45302 +       ret = usb_get_descriptor( d, USB_DT_CONFIG, i, buf, USB_DT_CONFIG_SIZE );
45303 +       if ( ret < 0 ) {
45304 +               printk(KERN_INFO "usb-midi: Could not get config (error=%d).\n", ret);
45305 +               return -EINVAL;
45306 +       }
45307 +       if ( buf[1] != USB_DT_CONFIG || buf[0] < USB_DT_CONFIG_SIZE ) {
45308 +               printk(KERN_INFO "usb-midi: config not as expected.\n");
45309 +               return -EINVAL;
45310 +       }
45311 +       bufSize = buf[2] | buf[3]<<8;
45312 +       buffer = (unsigned char *)kmalloc(sizeof(unsigned char)*bufSize, GFP_KERNEL);
45313 +       if ( !buffer ) {
45314 +               printk(KERN_INFO "usb-midi: Could not allocate memory.\n");
45315 +               return -EINVAL;
45316 +       }
45317 +       ret = usb_get_descriptor( d, USB_DT_CONFIG, i, buffer, bufSize );
45318 +       if ( ret < 0 ) {
45319 +               printk(KERN_INFO "usb-midi: Could not get full config (error=%d).\n", ret);
45320 +               kfree(buffer);
45321 +               return -EINVAL;
45322 +       }
45323 +
45324 +       u = parse_descriptor( d, buffer, bufSize, ifnum, alts, 1);
45325 +       kfree(buffer);
45326 +       if ( u == NULL ) {
45327 +               return -EINVAL;
45328 +       }
45329 +
45330 +       ret = alloc_usb_midi_device( d, s, u );
45331 +
45332 +       kfree(u);
45333 +
45334 +       return ret;
45335 +}
45336 +
45337 +
45338 +/** Scan table of known devices which are only partially compliant with 
45339 + * the MIDIStreaming specification.
45340 + * Called by usb_midi_probe();
45341 + *
45342 + **/
45343 +
45344 +static int detect_vendor_specific_device( struct usb_device *d, unsigned int ifnum, struct usb_midi_state *s )
45345 +{
45346 +       struct usb_midi_device *u;
45347 +       int i;
45348 +       int ret = -ENXIO;
45349 +
45350 +       for ( i=0; i<VENDOR_SPECIFIC_USB_MIDI_DEVICES ; i++ ) {
45351 +               u=&(usb_midi_devices[i]);
45352 +    
45353 +               if ( d->descriptor.idVendor != u->idVendor ||
45354 +                    d->descriptor.idProduct != u->idProduct ||
45355 +                    ifnum != u->interface )
45356 +                       continue;
45357 +
45358 +               ret = alloc_usb_midi_device( d, s, u );
45359 +               break;
45360 +       }
45361 +
45362 +       return ret;
45363 +}
45364 +
45365 +
45366 +/** Attempt to match any config of an interface to a MIDISTREAMING interface.
45367 + *  Returns 0 on success, negative on failure.
45368 + * Called by usb_midi_probe();
45369 + **/
45370 +static int detect_midi_subclass(struct usb_device *d, unsigned int ifnum, struct usb_midi_state *s)
45371 +{
45372 +       struct usb_config_descriptor    *c = d->actconfig;
45373 +       struct usb_interface_descriptor *interface;
45374 +       struct usb_midi_device *u;
45375 +       unsigned char buf[USB_DT_CONFIG_SIZE], *buffer;
45376 +       int bufSize;
45377 +       int i;
45378 +       int alts=-1;
45379 +       int ret;
45380 +
45381 +       for ( i=0 ; i < c->interface[ifnum].num_altsetting; i++ ) {
45382 +               interface = c->interface[ifnum].altsetting + i;
45383 +
45384 +               if ( interface->bInterfaceClass != USB_CLASS_AUDIO ||
45385 +                    interface->bInterfaceSubClass != USB_SUBCLASS_MIDISTREAMING )
45386 +                       continue;
45387 +               alts = i;
45388 +       }
45389 +       if ( alts == -1 ) {
45390 +               return -EINVAL;
45391 +       }
45392 +
45393 +       printk(KERN_INFO "usb-midi: Found MIDISTREAMING on dev %04x:%04x, iface %d\n",
45394 +              d->descriptor.idVendor, d->descriptor.idProduct, ifnum);
45395 +
45396 +       for ( i=0 ; i < d->descriptor.bNumConfigurations ; i++ ) {
45397 +               if ( d->config+i == c ) goto configfound;
45398 +       }
45399 +
45400 +       printk(KERN_INFO "usb-midi: Config not found.\n");
45401 +
45402 +       return -EINVAL;
45403 +
45404 + configfound:
45405 +
45406 +       /* this may not be necessary. */
45407 +       if ( usb_set_configuration( d, c->bConfigurationValue ) < 0 ) {
45408 +               printk(KERN_INFO "usb-midi: Could not set config.\n");
45409 +               return -EINVAL;
45410 +       }
45411 +
45412 +       /* From USB Spec v2.0, Section 9.5.
45413 +          If the class or vendor specific descriptors use the same format
45414 +          as standard descriptors (e.g., start with a length byte and
45415 +          followed by a type byte), they must be returned interleaved with
45416 +          standard descriptors in the configuration information returned by
45417 +          a GetDescriptor(Configuration) request. In this case, the class
45418 +          or vendor-specific descriptors must follow a related standard
45419 +          descriptor they modify or extend.
45420 +       */
45421 +
45422 +       ret = usb_get_descriptor( d, USB_DT_CONFIG, i, buf, USB_DT_CONFIG_SIZE );
45423 +       if ( ret < 0 ) {
45424 +               printk(KERN_INFO "usb-midi: Could not get config (error=%d).\n", ret);
45425 +               return -EINVAL;
45426 +       }
45427 +       if ( buf[1] != USB_DT_CONFIG || buf[0] < USB_DT_CONFIG_SIZE ) {
45428 +               printk(KERN_INFO "usb-midi: config not as expected.\n");
45429 +               return -EINVAL;
45430 +       }
45431 +       bufSize = buf[2] | buf[3]<<8;
45432 +       buffer = (unsigned char *)kmalloc(sizeof(unsigned char)*bufSize, GFP_KERNEL);
45433 +       if ( !buffer ) {
45434 +               printk(KERN_INFO "usb-midi: Could not allocate memory.\n");
45435 +               return -EINVAL;
45436 +       }
45437 +       ret = usb_get_descriptor( d, USB_DT_CONFIG, i, buffer, bufSize );
45438 +       if ( ret < 0 ) {
45439 +               printk(KERN_INFO "usb-midi: Could not get full config (error=%d).\n", ret);
45440 +               kfree(buffer);
45441 +               return -EINVAL;
45442 +       }
45443 +
45444 +       u = parse_descriptor( d, buffer, bufSize, ifnum, alts, 0);
45445 +       kfree(buffer);
45446 +       if ( u == NULL ) {
45447 +               return -EINVAL;
45448 +       }
45449 +
45450 +       ret = alloc_usb_midi_device( d, s, u );
45451 +
45452 +       kfree(u);
45453 +
45454 +       return ret;
45455 +}
45456 +
45457 +
45458 +/** When user has requested a specific device, match it exactly.
45459 + *
45460 + * Uses uvendor, uproduct, uinterface, ualt, umin, umout and ucable.
45461 + * Called by usb_midi_probe();
45462 + *
45463 + **/
45464 +static int detect_by_hand(struct usb_device *d, unsigned int ifnum, struct usb_midi_state *s)
45465 +{
45466 +       struct usb_midi_device u;
45467 +
45468 +       if ( d->descriptor.idVendor != uvendor ||
45469 +            d->descriptor.idProduct != uproduct ||
45470 +            ifnum != uinterface ) {
45471 +               return -EINVAL;
45472 +       }
45473 +
45474 +       if ( ualt < 0 ) { ualt = -1; }
45475 +
45476 +       if ( umin   < 0 || umin   > 15 ) { umin   = 0x01 | USB_DIR_IN; }
45477 +       if ( umout  < 0 || umout  > 15 ) { umout  = 0x01; }
45478 +       if ( ucable < 0 || ucable > 15 ) { ucable = 0; }
45479 +
45480 +       u.deviceName = 0; /* A flag for alloc_usb_midi_device to get device name
45481 +                            from device. */
45482 +       u.idVendor   = uvendor;
45483 +       u.idProduct  = uproduct;
45484 +       u.interface  = uinterface;
45485 +       u.altSetting = ualt;
45486 +
45487 +       u.in[0].endpoint    = umin;
45488 +       u.in[0].cableId     = (1<<ucable);
45489 +
45490 +       u.out[0].endpoint   = umout;
45491 +       u.out[0].cableId    = (1<<ucable);
45492 +
45493 +       return alloc_usb_midi_device( d, s, &u );
45494 +}
45495 +
45496 +
45497 +
45498 +/* ------------------------------------------------------------------------- */
45499 +
45500 +static void *usb_midi_probe(struct usb_device *dev, unsigned int ifnum,
45501 +                           const struct usb_device_id *id)
45502 +{
45503 +       struct usb_midi_state *s;
45504 +
45505 +       s = (struct usb_midi_state *)kmalloc(sizeof(struct usb_midi_state), GFP_KERNEL);
45506 +       if ( !s ) { return NULL; }
45507 +
45508 +       memset( s, 0, sizeof(struct usb_midi_state) );
45509 +       INIT_LIST_HEAD(&s->midiDevList);
45510 +       INIT_LIST_HEAD(&s->inEndpointList);
45511 +       INIT_LIST_HEAD(&s->outEndpointList);
45512 +       s->usbdev = dev;
45513 +       s->count  = 0;
45514 +       spin_lock_init(&s->lock);
45515 +
45516 +       if (
45517 +               detect_by_hand( dev, ifnum, s ) &&
45518 +               detect_midi_subclass( dev, ifnum, s ) &&
45519 +               detect_vendor_specific_device( dev, ifnum, s ) &&
45520 +               detect_yamaha_device( dev, ifnum, s) ) {
45521 +               kfree(s);
45522 +               return NULL;
45523 +       }
45524 +
45525 +       down(&open_sem);
45526 +       list_add_tail(&s->mididev, &mididevs);
45527 +       up(&open_sem);
45528 +
45529 +#ifdef MOD_INC_EACH_PROBE
45530 +       MOD_INC_USE_COUNT;
45531 +#endif
45532 +
45533 +       return s;
45534 +}
45535 +
45536 +
45537 +static void usb_midi_disconnect(struct usb_device *dev, void *ptr)
45538 +{
45539 +       struct usb_midi_state *s = (struct usb_midi_state *)ptr;
45540 +       struct list_head      *list;
45541 +       struct usb_mididev    *m;
45542 +
45543 +       if ( s == (struct usb_midi_state *)-1 ) {
45544 +               return;
45545 +       }
45546 +       if ( !s->usbdev ) {
45547 +               return;
45548 +       }
45549 +       down(&open_sem);
45550 +       list_del(&s->mididev);
45551 +       INIT_LIST_HEAD(&s->mididev);
45552 +       s->usbdev = NULL;
45553 +
45554 +       for ( list = s->midiDevList.next; list != &s->midiDevList; list = list->next ) {
45555 +               m = list_entry(list, struct usb_mididev, list);
45556 +               wake_up(&(m->min.ep->wait));
45557 +               wake_up(&(m->mout.ep->wait));
45558 +               if ( m->dev_midi >= 0 ) {
45559 +                       unregister_sound_midi(m->dev_midi);
45560 +               }
45561 +               m->dev_midi = -1;
45562 +       }
45563 +       release_midi_device(s);
45564 +       wake_up(&open_wait);
45565 +#ifdef MOD_INC_EACH_PROBE
45566 +       MOD_DEC_USE_COUNT;
45567 +#endif
45568 +
45569 +       return;
45570 +}
45571 +
45572 +
45573 +
45574 +static struct usb_driver usb_midi_driver = {
45575 +       name: "midi",
45576 +       probe: usb_midi_probe,
45577 +       disconnect: usb_midi_disconnect,
45578 +       id_table:       NULL,                   /* check all devices */
45579 +       driver_list: LIST_HEAD_INIT(usb_midi_driver.driver_list)
45580 +};
45581 +
45582 +/* ------------------------------------------------------------------------- */
45583 +
45584 +int __init usb_midi_init(void)
45585 +{
45586 +       if ( usb_register(&usb_midi_driver) < 0 )
45587 +               return -1;
45588 +
45589 +       return 0;
45590 +
45591 +}
45592 +
45593 +void __exit usb_midi_exit(void)
45594 +{
45595 +       usb_deregister(&usb_midi_driver);
45596 +}
45597 +
45598 +module_init(usb_midi_init) ;
45599 +module_exit(usb_midi_exit) ;
45600 +
45601 +#ifdef HAVE_ALSA_SUPPORT
45602 +#define SNDRV_MAIN_OBJECT_FILE
45603 +#include "../../include/driver.h"
45604 +#include "../../include/control.h"
45605 +#include "../../include/info.h"
45606 +#include "../../include/cs46xx.h"
45607 +
45608 +/* ------------------------------------------------------------------------- */
45609 +
45610 +static int snd_usbmidi_input_close(snd_rawmidi_substream_t * substream)
45611 +{
45612 +       return 0;
45613 +}
45614 +
45615 +static int snd_usbmidi_input_open(snd_rawmidi_substream_t * substream )
45616 +{
45617 +       return 0;
45618 +}
45619 +
45620 +static void snd_usbmidi_input_trigger(snd_rawmidi_substream_t * substream, int up)
45621 +{
45622 +       return 0;
45623 +}
45624 +
45625 +
45626 +/* ------------------------------------------------------------------------- */
45627 +
45628 +static int snd_usbmidi_output_close(snd_rawmidi_substream_t * substream)
45629 +{
45630 +       return 0;
45631 +}
45632 +
45633 +static int snd_usbmidi_output_open(snd_rawmidi_substream_t * substream)
45634 +{
45635 +       return 0;
45636 +}
45637 +
45638 +static void snd_usb_midi_output_trigger(snd_rawmidi_substream_t * substream,
45639 +                                       int up)
45640 +{
45641 +       return 0;
45642 +}
45643 +
45644 +/* ------------------------------------------------------------------------- */
45645 +
45646 +static snd_rawmidi_ops_t snd_usbmidi_output =
45647 +{
45648 +        open:           snd_usbmidi_output_open,
45649 +        close:          snd_usbmidi_output_close,
45650 +        trigger:        snd_usbmidi_output_trigger,
45651 +};
45652 +static snd_rawmidi_ops_t snd_usbmidi_input =
45653 +{
45654 +        open:           snd_usbmidi_input_open,
45655 +        close:          snd_usbmidi_input_close,
45656 +        trigger:        snd_usbmidi_input_trigger,
45657 +};
45658 +
45659 +int snd_usbmidi_midi(cs46xx_t *chip, int device, snd_rawmidi_t **rrawmidi)
45660 +{
45661 +       snd_rawmidi_t *rmidi;
45662 +       int err;
45663 +
45664 +       if (rrawmidi)
45665 +               *rrawmidi = NULL;
45666 +       if ((err = snd_rawmidi_new(chip->card, "USB-MIDI", device, 1, 1, &rmidi)) < 0)
45667 +               return err;
45668 +       strcpy(rmidi->name, "USB-MIDI");
45669 +
45670 +       snd_rawmidi_set_ops( rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, &snd_usbmidi_output );
45671 +       snd_rawmidi_set_ops( rmidi, SNDRV_RAWMIDI_STREAM_INPUT, &snd_usbmidi_input );
45672 +
45673 +       rmidi->info_flags |= SNDRV_RAWMIDI_INFO_OUTPUT | SNDRV_RAWMIDI_INFO_INPUT | SNDRV_RAWMIDI_INFO_DUPLEX;
45674 +
45675 +       rmidi->private_data = chip;
45676 +       chip->rmidi = rmidi;
45677 +       if (rrawmidi)
45678 +               *rrawmidi = NULL;
45679 +
45680 +       return 0;
45681 +}
45682 +
45683 +int snd_usbmidi_create( snd_card_t * card,
45684 +                       struct pci_dev * pci,
45685 +                       usbmidi_t ** rchip )
45686 +{
45687 +       usbmidi_t *chip;
45688 +       int err, idx;
45689 +       snd_region_t *region;
45690 +       static snd_device_opt_t ops = {
45691 +               dev_free: snd_usbmidi_dev_free,
45692 +       };
45693 +
45694 +       *rchip = NULL;
45695 +       chip = snd_magic_kcalloc( usbmidi_t, 0, GFP_KERNEL );
45696 +       if ( chip == NULL )
45697 +               return -ENOMEM;
45698 +}
45699 +
45700 +EXPORT_SYMBOL(snd_usbmidi_create);
45701 +EXPORT_SYMBOL(snd_usbmidi_midi);
45702 +#endif /* HAVE_ALSA_SUPPORT */
45703 +
45704 diff -Nur linux-2.4.19.org/drivers/usb/usb-midi.h linux-2.4.19/drivers/usb/usb-midi.h
45705 --- linux-2.4.19.org/drivers/usb/usb-midi.h     Thu Jan  1 01:00:00 1970
45706 +++ linux-2.4.19/drivers/usb/usb-midi.h Thu Oct 31 08:11:26 2002
45707 @@ -0,0 +1,143 @@
45708 +/*
45709 +  usb-midi.h  --  USB-MIDI driver
45710 +
45711 +  Copyright (C) 2001
45712 +      NAGANO Daisuke <breeze.nagano@nifty.ne.jp>
45713 +
45714 +  This program is free software; you can redistribute it and/or modify
45715 +  it under the terms of the GNU General Public License as published by
45716 +  the Free Software Foundation; either version 2, or (at your option)
45717 +  any later version.
45718 +
45719 +  This program is distributed in the hope that it will be useful,
45720 +  but WITHOUT ANY WARRANTY; without even the implied warranty of
45721 +  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
45722 +  GNU General Public License for more details.
45723 +
45724 +  You should have received a copy of the GNU General Public License
45725 +  along with this program; if not, write to the Free Software
45726 +  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
45727 + */
45728 +
45729 +/* ------------------------------------------------------------------------- */
45730 +
45731 +#ifndef _USB_MIDI_H_
45732 +#define _USB_MIDI_H_
45733 +
45734 +#ifndef USB_SUBCLASS_MIDISTREAMING
45735 +#define USB_SUBCLASS_MIDISTREAMING     3
45736 +#endif
45737 +
45738 +#define USB_DT_CS_DEVICE               0x21
45739 +#define USB_DT_CS_CONFIG               0x22
45740 +#define USB_DT_CS_STRING               0x23
45741 +#define USB_DT_CS_INTERFACE            0x24
45742 +#define USB_DT_CS_ENDPOINT             0x25
45743 +
45744 +/* ------------------------------------------------------------------------- */
45745 +/* Roland MIDI Devices */
45746 +
45747 +#define USB_VENDOR_ID_ROLAND           0x0582
45748 +#define USBMIDI_ROLAND_UA100G          0x0000
45749 +#define USBMIDI_ROLAND_MPU64           0x0002
45750 +#define USBMIDI_ROLAND_SC8850          0x0003
45751 +#define USBMIDI_ROLAND_UM2             0x0005
45752 +#define USBMIDI_ROLAND_UM1             0x0009
45753 +#define USBMIDI_ROLAND_PC300           0x0008
45754 +
45755 +/* YAMAHA MIDI Devices */
45756 +#define USB_VENDOR_ID_YAMAHA           0x0499
45757 +#define USBMIDI_YAMAHA_MU1000          0x1001
45758 +
45759 +/* Steinberg MIDI Devices */
45760 +#define USB_VENDOR_ID_STEINBERG                0x0763
45761 +#define USBMIDI_STEINBERG_USB2MIDI     0x1001
45762 +
45763 +/* ------------------------------------------------------------------------- */
45764 +/* Supported devices */
45765 +
45766 +struct usb_midi_endpoint {
45767 +       int  endpoint;
45768 +       int  cableId; /* if bit-n == 1 then cableId-n is enabled (n: 0 - 15) */
45769 +};
45770 +
45771 +struct usb_midi_device {
45772 +       char  *deviceName;
45773 +
45774 +       int    idVendor;
45775 +       int    idProduct;
45776 +       int    interface;
45777 +       int    altSetting; /* -1: auto detect */
45778 +
45779 +       struct usb_midi_endpoint in[15];
45780 +       struct usb_midi_endpoint out[15];
45781 +};
45782 +
45783 +static struct usb_midi_device usb_midi_devices[] = {
45784 +  { /* Roland UM-1 */
45785 +    "Roland UM-1",
45786 +    USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM1, 2, -1,
45787 +    { { 0x81, 1 }, {-1, -1} },
45788 +    { { 0x01, 1,}, {-1, -1} },
45789 +  },
45790 +
45791 +  { /* Roland UM-2 */
45792 +    "Roland UM-2" ,
45793 +    USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM2, 2, -1,
45794 +    { { 0x81, 3 }, {-1, -1} },
45795 +    { { 0x01, 3,}, {-1, -1} },
45796 +  },
45797 +
45798 +/** Next entry courtesy research by Michael Minn <michael@michaelminn.com> **/
45799 +  { /* Roland UA-100 */
45800 +    "Roland UA-100",
45801 +    USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UA100G, 2, -1,
45802 +    { { 0x82, 7 }, {-1, -1} }, /** cables 0,1 and 2 for SYSEX **/
45803 +    { { 0x02, 7 }, {-1, -1} },
45804 +  },
45805 +
45806 +/** Next entry courtesy research by Michael Minn <michael@michaelminn.com> **/
45807 +  { /* Roland SC8850 */
45808 +    "Roland SC8850",
45809 +    USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8850, 2, -1,
45810 +    { { 0x81, 15 }, {-1, -1} }, /** cables 0,1,2, and 3 **/
45811 +    { { 0x01, 15 }, {-1, -1} },
45812 +  },
45813 +
45814 +  { /* YAMAHA MU1000 */
45815 +    "YAMAHA MU1000",
45816 +    USB_VENDOR_ID_YAMAHA, USBMIDI_YAMAHA_MU1000, 0, -1, 
45817 +    { { 0x81, 1 }, {-1, -1} },
45818 +    { { 0x01, 15 }, {-1, -1} },
45819 +  },
45820 +  { /* Roland PC-300 */
45821 +    "Roland PC-300",
45822 +    USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_PC300, 2, -1, 
45823 +    { { 0x81, 1 }, {-1, -1} },
45824 +    { { 0x01, 1 }, {-1, -1} },
45825 +  }
45826 +};
45827 +
45828 +#define VENDOR_SPECIFIC_USB_MIDI_DEVICES (sizeof(usb_midi_devices)/sizeof(struct usb_midi_device))
45829 +
45830 +/* for Hot-Plugging */
45831 +
45832 +static struct usb_device_id usb_midi_ids [] = {
45833 +       { match_flags: (USB_DEVICE_ID_MATCH_INT_CLASS | USB_DEVICE_ID_MATCH_INT_SUBCLASS),
45834 +         bInterfaceClass: USB_CLASS_AUDIO, bInterfaceSubClass: USB_SUBCLASS_MIDISTREAMING},
45835 +       { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM1    ) },
45836 +       { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM2    ) },
45837 +       { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UA100G ) },
45838 +       { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_PC300 ) },
45839 +       { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8850 ) },
45840 +       { USB_DEVICE( USB_VENDOR_ID_YAMAHA, USBMIDI_YAMAHA_MU1000 ) },
45841 +/*     { USB_DEVICE( USB_VENDOR_ID_STEINBERG, USBMIDI_STEINBERG_USB2MIDI ) },*/
45842 +       { } /* Terminating entry */
45843 +};
45844 +
45845 +MODULE_DEVICE_TABLE (usb, usb_midi_ids);
45846 +
45847 +/* ------------------------------------------------------------------------- */
45848 +#endif /* _USB_MIDI_H_ */
45849 +
45850 +
45851 diff -Nur linux-2.4.19.org/drivers/usb/usb-ohci.c linux-2.4.19/drivers/usb/usb-ohci.c
45852 --- linux-2.4.19.org/drivers/usb/usb-ohci.c     Sat Aug  3 02:39:45 2002
45853 +++ linux-2.4.19/drivers/usb/usb-ohci.c Thu Oct 31 08:11:27 2002
45854 @@ -78,6 +78,7 @@
45855  
45856  #include "usb-ohci.h"
45857  
45858 +#include "hcd.h"
45859  
45860  #ifdef CONFIG_PMAC_PBOOK
45861  #include <asm/machdep.h>
45862 @@ -178,7 +179,7 @@
45863         kfree (urb_priv);
45864  }
45865   
45866 -static void urb_rm_priv_locked (urb_t * urb) 
45867 +static void urb_rm_priv_locked (struct urb * urb) 
45868  {
45869         urb_priv_t * urb_priv = urb->hcpriv;
45870         
45871 @@ -212,7 +213,7 @@
45872         }
45873  }
45874  
45875 -static void urb_rm_priv (urb_t * urb)
45876 +static void urb_rm_priv (struct urb * urb)
45877  {
45878         unsigned long flags;
45879  
45880 @@ -229,7 +230,7 @@
45881  /* debug| print the main components of an URB     
45882   * small: 0) header + data packets 1) just header */
45883   
45884 -static void urb_print (urb_t * urb, char * str, int small)
45885 +static void urb_print (struct urb * urb, char * str, int small)
45886  {
45887         unsigned int pipe= urb->pipe;
45888         
45889 @@ -384,6 +385,8 @@
45890         __u32                   temp, ndp, i;
45891  
45892         temp = roothub_a (controller);
45893 +       if (temp == ~(u32)0)
45894 +               return;
45895         ndp = (temp & RH_A_NDP);
45896  
45897         if (verbose) {
45898 @@ -458,10 +461,10 @@
45899  
45900  /* return a request to the completion handler */
45901   
45902 -static int sohci_return_urb (struct ohci *hc, urb_t * urb)
45903 +static int sohci_return_urb (struct ohci *hc, struct urb * urb)
45904  {
45905         urb_priv_t * urb_priv = urb->hcpriv;
45906 -       urb_t * urbt;
45907 +       struct urb * urbt;
45908         unsigned long flags;
45909         int i;
45910         
45911 @@ -536,7 +539,7 @@
45912  
45913  /* get a transfer request */
45914   
45915 -static int sohci_submit_urb (urb_t * urb)
45916 +static int sohci_submit_urb (struct urb * urb)
45917  {
45918         ohci_t * ohci;
45919         ed_t * ed;
45920 @@ -720,7 +723,7 @@
45921  /* deactivate all TDs and remove the private part of the URB */
45922  /* interrupt callers must use async unlink mode */
45923  
45924 -static int sohci_unlink_urb (urb_t * urb)
45925 +static int sohci_unlink_urb (struct urb * urb)
45926  {
45927         unsigned long flags;
45928         ohci_t * ohci;
45929 @@ -1295,7 +1298,7 @@
45930  static void
45931  td_fill (ohci_t * ohci, unsigned int info,
45932         dma_addr_t data, int len,
45933 -       urb_t * urb, int index)
45934 +       struct urb * urb, int index)
45935  {
45936         volatile td_t  * td, * td_pt;
45937         urb_priv_t * urb_priv = urb->hcpriv;
45938 @@ -1344,7 +1347,7 @@
45939   
45940  /* prepare all TDs of a transfer */
45941  
45942 -static void td_submit_urb (urb_t * urb)
45943 +static void td_submit_urb (struct urb * urb)
45944  { 
45945         urb_priv_t * urb_priv = urb->hcpriv;
45946         ohci_t * ohci = (ohci_t *) urb->dev->bus->hcpriv;
45947 @@ -1457,7 +1460,7 @@
45948  {
45949         __u32 tdINFO, tdBE, tdCBP;
45950         __u16 tdPSW;
45951 -       urb_t * urb = td->urb;
45952 +       struct urb * urb = td->urb;
45953         urb_priv_t * urb_priv = urb->hcpriv;
45954         int dlen = 0;
45955         int cc = 0;
45956 @@ -1498,7 +1501,7 @@
45957  
45958  /* handle an urb that is being unlinked */
45959  
45960 -static void dl_del_urb (urb_t * urb)
45961 +static void dl_del_urb (struct urb * urb)
45962  {
45963         wait_queue_head_t * wait_head = ((urb_priv_t *)(urb->hcpriv))->wait;
45964  
45965 @@ -1510,6 +1513,8 @@
45966                         urb->complete (urb);
45967         } else {
45968                 urb->status = -ENOENT;
45969 +               if (urb->complete)
45970 +                       urb->complete (urb);
45971  
45972                 /* unblock sohci_unlink_urb */
45973                 if (wait_head)
45974 @@ -1587,7 +1592,7 @@
45975                 td_p = &ed->hwHeadP;
45976  
45977                 for (td = tdHeadP; td != tdTailP; td = td_next) { 
45978 -                       urb_t * urb = td->urb;
45979 +                       struct urb * urb = td->urb;
45980                         urb_priv_t * urb_priv = td->urb->hcpriv;
45981                         
45982                         td_next = dma_to_td (ohci, le32_to_cpup (&td->hwNextTD) & 0xfffffff0);
45983 @@ -1626,11 +1631,6 @@
45984                         if (tdHeadP == tdTailP) {
45985                                 if (ed->state == ED_OPER)
45986                                         ep_unlink(ohci, ed);
45987 -                               td_free (ohci, tdTailP);
45988 -                               ed->hwINFO = cpu_to_le32 (OHCI_ED_SKIP);
45989 -                               ed->state = ED_NEW;
45990 -                               hash_free_ed(ohci, ed);
45991 -                               --(usb_to_ohci (ohci->dev[edINFO & 0x7F]))->ed_cnt;
45992                         } else
45993                                 ed->hwINFO &= ~cpu_to_le32 (OHCI_ED_SKIP);
45994                 }
45995 @@ -1675,7 +1675,7 @@
45996         td_t * td_list_next = NULL;
45997         ed_t * ed;
45998         int cc = 0;
45999 -       urb_t * urb;
46000 +       struct urb * urb;
46001         urb_priv_t * urb_priv;
46002         __u32 tdINFO, edHeadP, edTailP;
46003         
46004 @@ -1851,7 +1851,7 @@
46005  {
46006         int len; 
46007  
46008 -       urb_t * urb = (urb_t *) ptr;
46009 +       struct urb * urb = (struct urb *) ptr;
46010         ohci_t * ohci = urb->dev->bus->hcpriv;
46011  
46012         if (ohci->disabled)
46013 @@ -1880,7 +1880,7 @@
46014  
46015  /* Root Hub INTs are polled by this timer */
46016  
46017 -static int rh_init_int_timer (urb_t * urb) 
46018 +static int rh_init_int_timer (struct urb * urb) 
46019  {
46020         ohci_t * ohci = urb->dev->bus->hcpriv;
46021  
46022 @@ -1905,12 +1905,12 @@
46023  
46024  /* request to virtual root hub */
46025  
46026 -static int rh_submit_urb (urb_t * urb)
46027 +static int rh_submit_urb (struct urb * urb)
46028  {
46029         struct usb_device * usb_dev = urb->dev;
46030         ohci_t * ohci = usb_dev->bus->hcpriv;
46031         unsigned int pipe = urb->pipe;
46032 -       devrequest * cmd = (devrequest *) urb->setup_packet;
46033 +       struct usb_ctrlrequest * cmd = (struct usb_ctrlrequest *) urb->setup_packet;
46034         void * data = urb->transfer_buffer;
46035         int leni = urb->transfer_buffer_length;
46036         int len = 0;
46037 @@ -1934,10 +1934,10 @@
46038                 return 0;
46039         }
46040  
46041 -       bmRType_bReq  = cmd->requesttype | (cmd->request << 8);
46042 -       wValue        = le16_to_cpu (cmd->value);
46043 -       wIndex        = le16_to_cpu (cmd->index);
46044 -       wLength       = le16_to_cpu (cmd->length);
46045 +       bmRType_bReq  = cmd->bRequestType | (cmd->bRequest << 8);
46046 +       wValue        = le16_to_cpu (cmd->wValue);
46047 +       wIndex        = le16_to_cpu (cmd->wIndex);
46048 +       wLength       = le16_to_cpu (cmd->wLength);
46049  
46050         switch (bmRType_bReq) {
46051         /* Request Destination:
46052 @@ -2111,7 +2111,7 @@
46053  
46054  /*-------------------------------------------------------------------------*/
46055  
46056 -static int rh_unlink_urb (urb_t * urb)
46057 +static int rh_unlink_urb (struct urb * urb)
46058  {
46059         ohci_t * ohci = urb->dev->bus->hcpriv;
46060   
46061 @@ -2144,6 +2144,8 @@
46062         int timeout = 30;
46063         int smm_timeout = 50; /* 0,5 sec */
46064                 
46065 +#ifndef __hppa__
46066 +       /* PA-RISC doesn't have SMM, but PDC might leave IR set */
46067         if (readl (&ohci->regs->control) & OHCI_CTRL_IR) { /* SMM owns the HC */
46068                 writel (OHCI_OCR, &ohci->regs->cmdstatus); /* request ownership */
46069                 dbg("USB HC TakeOver from SMM");
46070 @@ -2154,7 +2156,8 @@
46071                                 return -1;
46072                         }
46073                 }
46074 -       }       
46075 +       }
46076 +#endif 
46077                 
46078         /* Disable HC interrupts */
46079         writel (OHCI_INTR_MIE, &ohci->regs->intrdisable);
46080 @@ -2218,9 +2221,19 @@
46081         writel (mask, &ohci->regs->intrstatus);
46082  
46083  #ifdef OHCI_USE_NPS
46084 -       /* required for AMD-756 and some Mac platforms */
46085 -       writel ((roothub_a (ohci) | RH_A_NPS) & ~RH_A_PSM,
46086 -               &ohci->regs->roothub.a);
46087 +       if(ohci->flags & OHCI_QUIRK_SUCKYIO)
46088 +       {
46089 +               /* NSC 87560 at least requires different setup .. */
46090 +               writel ((roothub_a (ohci) | RH_A_NOCP) &
46091 +                       ~(RH_A_OCPM | RH_A_POTPGT | RH_A_PSM | RH_A_NPS),
46092 +                       &ohci->regs->roothub.a);
46093 +       }
46094 +       else
46095 +       {
46096 +               /* required for AMD-756 and some Mac platforms */
46097 +               writel ((roothub_a (ohci) | RH_A_NPS) & ~RH_A_PSM,
46098 +                       &ohci->regs->roothub.a);
46099 +       }
46100         writel (RH_HS_LPSC, &ohci->regs->roothub.status);
46101  #endif /* OHCI_USE_NPS */
46102  
46103 @@ -2288,9 +2301,19 @@
46104         struct ohci_regs * regs = ohci->regs;
46105         int ints; 
46106  
46107 -       if ((ohci->hcca->done_head != 0) && !(le32_to_cpup (&ohci->hcca->done_head) & 0x01)) {
46108 +       /* avoid (slow) readl if only WDH happened */
46109 +       if ((ohci->hcca->done_head != 0)
46110 +                       && !(le32_to_cpup (&ohci->hcca->done_head) & 0x01)) {
46111                 ints =  OHCI_INTR_WDH;
46112 -       } else if ((ints = (readl (&regs->intrstatus) & readl (&regs->intrenable))) == 0) {
46113 +
46114 +       /* cardbus/... hardware gone before remove() */
46115 +       } else if ((ints = readl (&regs->intrstatus)) == ~(u32)0) {
46116 +               ohci->disabled++;
46117 +               err ("%s device removed!", ohci->ohci_dev->slot_name);
46118 +               return;
46119 +
46120 +       /* interrupt for some other device? */
46121 +       } else if ((ints &= readl (&regs->intrenable)) == 0) {
46122                 return;
46123         } 
46124  
46125 @@ -2391,6 +2414,7 @@
46126                 kfree (ohci);
46127                 return NULL;
46128         }
46129 +       ohci->bus->bus_name = dev->slot_name;
46130         ohci->bus->hcpriv = (void *) ohci;
46131  
46132         return ohci;
46133 @@ -2418,8 +2442,9 @@
46134         }
46135         pci_set_drvdata(ohci->ohci_dev, NULL);
46136         if (ohci->bus) {
46137 -               if (ohci->bus->busnum)
46138 +               if (ohci->bus->busnum != -1)
46139                         usb_deregister_bus (ohci->bus);
46140 +
46141                 usb_free_bus (ohci->bus);
46142         }
46143  
46144 @@ -2448,7 +2473,6 @@
46145         void *mem_base, const struct pci_device_id *id)
46146  {
46147         ohci_t * ohci;
46148 -       u8 latency, limit;
46149         char buf[8], *bufp = buf;
46150         int ret;
46151  
46152 @@ -2470,23 +2494,24 @@
46153                 return ret;
46154         }
46155         ohci->flags = id->driver_data;
46156 +       
46157 +       /* Check for NSC87560. We have to look at the bridge (fn1) to identify
46158 +          the USB (fn2). This quirk might apply to more or even all NSC stuff
46159 +          I don't know.. */
46160 +          
46161 +       if(dev->vendor == PCI_VENDOR_ID_NS)
46162 +       {
46163 +               struct pci_dev *fn1  = pci_find_slot(dev->bus->number, PCI_DEVFN(PCI_SLOT(dev->devfn), 1));
46164 +               if(fn1 && fn1->vendor == PCI_VENDOR_ID_NS && fn1->device == PCI_DEVICE_ID_NS_87560_LIO)
46165 +                       ohci->flags |= OHCI_QUIRK_SUCKYIO;
46166 +               
46167 +       }
46168 +       
46169 +       if (ohci->flags & OHCI_QUIRK_SUCKYIO)
46170 +               printk (KERN_INFO __FILE__ ": Using NSC SuperIO setup\n");
46171         if (ohci->flags & OHCI_QUIRK_AMD756)
46172                 printk (KERN_INFO __FILE__ ": AMD756 erratum 4 workaround\n");
46173  
46174 -       /* bad pci latencies can contribute to overruns */ 
46175 -       pci_read_config_byte (dev, PCI_LATENCY_TIMER, &latency);
46176 -       if (latency) {
46177 -               pci_read_config_byte (dev, PCI_MAX_LAT, &limit);
46178 -               if (limit && limit < latency) {
46179 -                       dbg ("PCI latency reduced to max %d", limit);
46180 -                       pci_write_config_byte (dev, PCI_LATENCY_TIMER, limit);
46181 -                       ohci->pci_latency = limit;
46182 -               } else {
46183 -                       /* it might already have been reduced */
46184 -                       ohci->pci_latency = latency;
46185 -               }
46186 -       }
46187 -
46188         if (hc_reset (ohci) < 0) {
46189                 hc_release_ohci (ohci);
46190                 return -ENODEV;
46191 diff -Nur linux-2.4.19.org/drivers/usb/usb-ohci.h linux-2.4.19/drivers/usb/usb-ohci.h
46192 --- linux-2.4.19.org/drivers/usb/usb-ohci.h     Sat Aug  3 02:39:45 2002
46193 +++ linux-2.4.19/drivers/usb/usb-ohci.h Thu Oct 31 08:11:27 2002
46194 @@ -111,7 +111,7 @@
46195         __u8 index;
46196         struct ed * ed;
46197         struct td * next_dl_td;
46198 -       urb_t * urb;
46199 +       struct urb * urb;
46200  
46201         dma_addr_t td_dma;
46202         dma_addr_t data_dma;
46203 @@ -381,6 +381,7 @@
46204         atomic_t resume_count;          /* defending against multiple resumes */
46205         unsigned long flags;            /* for HC bugs */
46206  #define        OHCI_QUIRK_AMD756       0x01            /* erratum #4 */
46207 +#define OHCI_QUIRK_SUCKYIO     0x02            /* NSC superio */
46208  
46209         struct ohci_regs * regs;        /* OHCI controller's memory */
46210         struct list_head ohci_hcd_list; /* list of all ohci_hcd */
46211 @@ -430,12 +431,12 @@
46212  static ed_t * ep_add_ed(struct usb_device * usb_dev, unsigned int pipe, int interval, int load, int mem_flags);
46213  static void ep_rm_ed(struct usb_device * usb_dev, ed_t * ed);
46214  /* td */
46215 -static void td_fill(ohci_t * ohci, unsigned int info, dma_addr_t data, int len, urb_t * urb, int index);
46216 -static void td_submit_urb(urb_t * urb);
46217 +static void td_fill(ohci_t * ohci, unsigned int info, dma_addr_t data, int len, struct urb * urb, int index);
46218 +static void td_submit_urb(struct urb * urb);
46219  /* root hub */
46220 -static int rh_submit_urb(urb_t * urb);
46221 -static int rh_unlink_urb(urb_t * urb);
46222 -static int rh_init_int_timer(urb_t * urb);
46223 +static int rh_submit_urb(struct urb * urb);
46224 +static int rh_unlink_urb(struct urb * urb);
46225 +static int rh_init_int_timer(struct urb * urb);
46226  
46227  /*-------------------------------------------------------------------------*/
46228  
46229 diff -Nur linux-2.4.19.org/drivers/usb/usb-uhci.c linux-2.4.19/drivers/usb/usb-uhci.c
46230 --- linux-2.4.19.org/drivers/usb/usb-uhci.c     Sat Aug  3 02:39:45 2002
46231 +++ linux-2.4.19/drivers/usb/usb-uhci.c Thu Oct 31 08:11:27 2002
46232 @@ -59,6 +59,8 @@
46233  #include "usb-uhci.h"
46234  #include "usb-uhci-debug.h"
46235  
46236 +#include "hcd.h"
46237 +
46238  /*
46239   * Version Information
46240   */
46241 @@ -117,12 +119,12 @@
46242  // Suppress HC interrupt error messages for 5s
46243  #define ERROR_SUPPRESSION_TIME (HZ*5)
46244  
46245 -_static int rh_submit_urb (urb_t *urb);
46246 -_static int rh_unlink_urb (urb_t *urb);
46247 +_static int rh_submit_urb (struct urb *urb);
46248 +_static int rh_unlink_urb (struct urb *urb);
46249  _static int delete_qh (uhci_t *s, uhci_desc_t *qh);
46250 -_static int process_transfer (uhci_t *s, urb_t *urb, int mode);
46251 -_static int process_interrupt (uhci_t *s, urb_t *urb);
46252 -_static int process_iso (uhci_t *s, urb_t *urb, int force);
46253 +_static int process_transfer (uhci_t *s, struct urb *urb, int mode);
46254 +_static int process_interrupt (uhci_t *s, struct urb *urb);
46255 +_static int process_iso (uhci_t *s, struct urb *urb, int force);
46256  
46257  // How much URBs with ->next are walked
46258  #define MAX_NEXT_COUNT 2048
46259 @@ -168,7 +170,7 @@
46260  }
46261  /*-------------------------------------------------------------------*/
46262  #ifdef CONFIG_USB_UHCI_HIGH_BANDWIDTH
46263 -_static void enable_desc_loop(uhci_t *s, urb_t *urb)
46264 +_static void enable_desc_loop(uhci_t *s, struct urb *urb)
46265  {
46266         unsigned long flags;
46267  
46268 @@ -183,7 +185,7 @@
46269         spin_unlock_irqrestore (&s->qh_lock, flags);
46270  }
46271  /*-------------------------------------------------------------------*/
46272 -_static void disable_desc_loop(uhci_t *s, urb_t *urb)
46273 +_static void disable_desc_loop(uhci_t *s, struct urb *urb)
46274  {
46275         unsigned long flags;
46276  
46277 @@ -204,7 +206,7 @@
46278  }
46279  #endif
46280  /*-------------------------------------------------------------------*/
46281 -_static void queue_urb_unlocked (uhci_t *s, urb_t *urb)
46282 +_static void queue_urb_unlocked (uhci_t *s, struct urb *urb)
46283  {
46284         struct list_head *p=&urb->urb_list;
46285  #ifdef CONFIG_USB_UHCI_HIGH_BANDWIDTH
46286 @@ -224,7 +226,7 @@
46287         uhci_switch_timer_int(s);
46288  }
46289  /*-------------------------------------------------------------------*/
46290 -_static void queue_urb (uhci_t *s, urb_t *urb)
46291 +_static void queue_urb (uhci_t *s, struct urb *urb)
46292  {
46293         unsigned long flags=0;
46294  
46295 @@ -233,7 +235,7 @@
46296         spin_unlock_irqrestore (&s->urb_list_lock, flags);
46297  }
46298  /*-------------------------------------------------------------------*/
46299 -_static void dequeue_urb (uhci_t *s, urb_t *urb)
46300 +_static void dequeue_urb (uhci_t *s, struct urb *urb)
46301  {
46302  #ifdef CONFIG_USB_UHCI_HIGH_BANDWIDTH
46303         int type;
46304 @@ -698,7 +700,7 @@
46305  //                         LOW LEVEL STUFF
46306  //          assembles QHs und TDs for control, bulk and iso
46307  /*-------------------------------------------------------------------*/
46308 -_static int uhci_submit_control_urb (urb_t *urb)
46309 +_static int uhci_submit_control_urb (struct urb *urb)
46310  {
46311         uhci_desc_t *qh, *td;
46312         uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
46313 @@ -815,7 +817,7 @@
46314  // For queued bulk transfers, two additional QH helpers are allocated (nqh, bqh)
46315  // Due to the linking with other bulk urbs, it has to be locked with urb_list_lock!
46316  
46317 -_static int uhci_submit_bulk_urb (urb_t *urb, urb_t *bulk_urb)
46318 +_static int uhci_submit_bulk_urb (struct urb *urb, struct urb *bulk_urb)
46319  {
46320         uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
46321         urb_priv_t *urb_priv = urb->hcpriv, *upriv, *bpriv=NULL;
46322 @@ -977,7 +979,7 @@
46323   looks a bit complicated because of all the bulk queueing goodies
46324  */
46325  
46326 -_static void uhci_clean_transfer (uhci_t *s, urb_t *urb, uhci_desc_t *qh, int mode)
46327 +_static void uhci_clean_transfer (uhci_t *s, struct urb *urb, uhci_desc_t *qh, int mode)
46328  {
46329         uhci_desc_t *bqh, *nqh, *prevqh, *prevtd;
46330         int now;
46331 @@ -1031,7 +1033,7 @@
46332                        urb, priv->prev_queued_urb,  priv->next_queued_urb, qh, bqh, priv->next_qh);     
46333                 
46334                 if (mode != CLEAN_TRANSFER_DELETION_MARK) {     // no work for cleanup at unlink-completion
46335 -                       urb_t *nurb;
46336 +                       struct urb *nurb;
46337                         unsigned long flags;
46338  
46339                         nurb = priv->next_queued_urb;
46340 @@ -1069,7 +1071,7 @@
46341  }
46342  /*-------------------------------------------------------------------*/
46343  // Release bandwidth for Interrupt or Isoc. transfers 
46344 -_static void uhci_release_bandwidth(urb_t *urb)
46345 +_static void uhci_release_bandwidth(struct urb *urb)
46346  {       
46347         if (urb->bandwidth) {
46348                 switch (usb_pipetype(urb->pipe)) {
46349 @@ -1085,11 +1087,11 @@
46350         }       
46351  }
46352  
46353 -_static void uhci_urb_dma_sync(uhci_t *s, urb_t *urb, urb_priv_t *urb_priv)
46354 +_static void uhci_urb_dma_sync(uhci_t *s, struct urb *urb, urb_priv_t *urb_priv)
46355  {
46356         if (urb_priv->setup_packet_dma)
46357                 pci_dma_sync_single(s->uhci_pci, urb_priv->setup_packet_dma,
46358 -                                   sizeof(devrequest), PCI_DMA_TODEVICE);
46359 +                                   sizeof(struct usb_ctrlrequest), PCI_DMA_TODEVICE);
46360  
46361         if (urb_priv->transfer_buffer_dma)
46362                 pci_dma_sync_single(s->uhci_pci, urb_priv->transfer_buffer_dma,
46363 @@ -1099,11 +1101,11 @@
46364                                     PCI_DMA_TODEVICE);
46365  }
46366  
46367 -_static void uhci_urb_dma_unmap(uhci_t *s, urb_t *urb, urb_priv_t *urb_priv)
46368 +_static void uhci_urb_dma_unmap(uhci_t *s, struct urb *urb, urb_priv_t *urb_priv)
46369  {
46370         if (urb_priv->setup_packet_dma) {
46371                 pci_unmap_single(s->uhci_pci, urb_priv->setup_packet_dma,
46372 -                                sizeof(devrequest), PCI_DMA_TODEVICE);
46373 +                                sizeof(struct usb_ctrlrequest), PCI_DMA_TODEVICE);
46374                 urb_priv->setup_packet_dma = 0;
46375         }
46376         if (urb_priv->transfer_buffer_dma) {
46377 @@ -1120,7 +1122,7 @@
46378     mode: UNLINK_ASYNC_STORE_URB: unlink and move URB into unlinked list
46379           UNLINK_ASYNC_DONT_STORE: unlink, don't move URB into unlinked list
46380  */
46381 -_static int uhci_unlink_urb_async (uhci_t *s,urb_t *urb, int mode)
46382 +_static int uhci_unlink_urb_async (uhci_t *s,struct urb *urb, int mode)
46383  {
46384         uhci_desc_t *qh;
46385         urb_priv_t *urb_priv;
46386 @@ -1165,7 +1167,7 @@
46387  }
46388  /*-------------------------------------------------------------------*/
46389  // kills an urb by unlinking descriptors and waiting for at least one frame
46390 -_static int uhci_unlink_urb_sync (uhci_t *s, urb_t *urb)
46391 +_static int uhci_unlink_urb_sync (uhci_t *s, struct urb *urb)
46392  {
46393         uhci_desc_t *qh;
46394         urb_priv_t *urb_priv;
46395 @@ -1176,7 +1178,7 @@
46396  
46397         if (urb->status == -EINPROGRESS) {
46398  
46399 -               // move descriptors out the the running chains, dequeue urb
46400 +               // move descriptors out of the running chains, dequeue urb
46401                 uhci_unlink_urb_async(s, urb, UNLINK_ASYNC_DONT_STORE);
46402  
46403                 urb_priv = urb->hcpriv;
46404 @@ -1229,7 +1231,7 @@
46405  _static void uhci_cleanup_unlink(uhci_t *s, int force)
46406  {
46407         struct list_head *q;
46408 -       urb_t *urb;
46409 +       struct urb *urb;
46410         struct usb_device *dev;
46411         int now, type;
46412         urb_priv_t *urb_priv;
46413 @@ -1239,7 +1241,7 @@
46414  
46415         while (q != &s->urb_unlinked) {
46416  
46417 -               urb = list_entry (q, urb_t, urb_list);
46418 +               urb = list_entry (q, struct urb, urb_list);
46419  
46420                 urb_priv = (urb_priv_t*)urb->hcpriv;
46421                 q = urb->urb_list.next;
46422 @@ -1308,7 +1310,7 @@
46423  }
46424   
46425  /*-------------------------------------------------------------------*/
46426 -_static int uhci_unlink_urb (urb_t *urb)
46427 +_static int uhci_unlink_urb (struct urb *urb)
46428  {
46429         uhci_t *s;
46430         unsigned long flags=0;
46431 @@ -1341,9 +1343,9 @@
46432  // In case of ASAP iso transfer, search the URB-list for already queued URBs
46433  // for this EP and calculate the earliest start frame for the new
46434  // URB (easy seamless URB continuation!)
46435 -_static int find_iso_limits (urb_t *urb, unsigned int *start, unsigned int *end)
46436 +_static int find_iso_limits (struct urb *urb, unsigned int *start, unsigned int *end)
46437  {
46438 -       urb_t *u, *last_urb = NULL;
46439 +       struct urb *u, *last_urb = NULL;
46440         uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
46441         struct list_head *p;
46442         int ret=-1;
46443 @@ -1353,7 +1355,7 @@
46444         p=s->urb_list.prev;
46445  
46446         for (; p != &s->urb_list; p = p->prev) {
46447 -               u = list_entry (p, urb_t, urb_list);
46448 +               u = list_entry (p, struct urb, urb_list);
46449                 // look for pending URBs with identical pipe handle
46450                 // works only because iso doesn't toggle the data bit!
46451                 if ((urb->pipe == u->pipe) && (urb->dev == u->dev) && (u->status == -EINPROGRESS)) {
46452 @@ -1375,7 +1377,7 @@
46453  /*-------------------------------------------------------------------*/
46454  // adjust start_frame according to scheduling constraints (ASAP etc)
46455  
46456 -_static int iso_find_start (urb_t *urb)
46457 +_static int iso_find_start (struct urb *urb)
46458  {
46459         uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
46460         unsigned int now;
46461 @@ -1433,7 +1435,7 @@
46462  // ASAP-flag set implicitely
46463  // if period==0, the transfer is only done once
46464  
46465 -_static int uhci_submit_int_urb (urb_t *urb)
46466 +_static int uhci_submit_int_urb (struct urb *urb)
46467  {
46468         uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
46469         urb_priv_t *urb_priv = urb->hcpriv;
46470 @@ -1493,7 +1495,7 @@
46471         return 0;
46472  }
46473  /*-------------------------------------------------------------------*/
46474 -_static int uhci_submit_iso_urb (urb_t *urb)
46475 +_static int uhci_submit_iso_urb (struct urb *urb)
46476  {
46477         uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
46478         urb_priv_t *urb_priv = urb->hcpriv;
46479 @@ -1586,10 +1588,10 @@
46480  /*-------------------------------------------------------------------*/
46481  // returns: 0 (no transfer queued), urb* (this urb already queued)
46482   
46483 -_static urb_t* search_dev_ep (uhci_t *s, urb_t *urb)
46484 +_static struct urb* search_dev_ep (uhci_t *s, struct urb *urb)
46485  {
46486         struct list_head *p;
46487 -       urb_t *tmp;
46488 +       struct urb *tmp;
46489         unsigned int mask = usb_pipecontrol(urb->pipe) ? (~USB_DIR_IN) : (~0);
46490  
46491         dbg("search_dev_ep:");
46492 @@ -1597,7 +1599,7 @@
46493         p=s->urb_list.next;
46494  
46495         for (; p != &s->urb_list; p = p->next) {
46496 -               tmp = list_entry (p, urb_t, urb_list);
46497 +               tmp = list_entry (p, struct urb, urb_list);
46498                 dbg("urb: %p", tmp);
46499                 // we can accept this urb if it is not queued at this time 
46500                 // or if non-iso transfer requests should be scheduled for the same device and pipe
46501 @@ -1610,13 +1612,13 @@
46502         return 0;
46503  }
46504  /*-------------------------------------------------------------------*/
46505 -_static int uhci_submit_urb (urb_t *urb)
46506 +_static int uhci_submit_urb (struct urb *urb)
46507  {
46508         uhci_t *s;
46509         urb_priv_t *urb_priv;
46510         int ret = 0, type;
46511         unsigned long flags;
46512 -       urb_t *queued_urb=NULL;
46513 +       struct urb *queued_urb=NULL;
46514         int bustime;
46515                 
46516         if (!urb->dev || !urb->dev->bus)
46517 @@ -1683,7 +1685,7 @@
46518         
46519         if (type == PIPE_CONTROL)
46520                 urb_priv->setup_packet_dma = pci_map_single(s->uhci_pci, urb->setup_packet,
46521 -                                                           sizeof(devrequest), PCI_DMA_TODEVICE);
46522 +                                                           sizeof(struct usb_ctrlrequest), PCI_DMA_TODEVICE);
46523  
46524         if (urb->transfer_buffer_length)
46525                 urb_priv->transfer_buffer_dma = pci_map_single(s->uhci_pci,
46526 @@ -1770,7 +1772,7 @@
46527  _static void uhci_check_timeouts(uhci_t *s)
46528  {
46529         struct list_head *p,*p2;
46530 -       urb_t *urb;
46531 +       struct urb *urb;
46532         int type;       
46533  
46534         p = s->urb_list.prev;   
46535 @@ -1780,7 +1782,7 @@
46536  
46537                 p2 = p;
46538                 p = p->prev;
46539 -               urb = list_entry (p2, urb_t, urb_list);
46540 +               urb = list_entry (p2, struct urb, urb_list);
46541                 type = usb_pipetype (urb->pipe);
46542  
46543                 hcpriv = (urb_priv_t*)urb->hcpriv;
46544 @@ -1878,7 +1880,7 @@
46545  
46546  /*-------------------------------------------------------------------------*/
46547  /* prepare Interrupt pipe transaction data; HUB INTERRUPT ENDPOINT */
46548 -_static int rh_send_irq (urb_t *urb)
46549 +_static int rh_send_irq (struct urb *urb)
46550  {
46551         int len = 1;
46552         int i;
46553 @@ -1905,12 +1907,12 @@
46554  
46555  /*-------------------------------------------------------------------------*/
46556  /* Virtual Root Hub INTs are polled by this timer every "intervall" ms */
46557 -_static int rh_init_int_timer (urb_t *urb);
46558 +_static int rh_init_int_timer (struct urb *urb);
46559  
46560  _static void rh_int_timer_do (unsigned long ptr)
46561  {
46562         int len;
46563 -       urb_t *urb = (urb_t*) ptr;
46564 +       struct urb *urb = (struct urb*) ptr;
46565         uhci_t *uhci = urb->dev->bus->hcpriv;
46566  
46567         if (uhci->rh.send) {
46568 @@ -1927,7 +1929,7 @@
46569  /*-------------------------------------------------------------------------*/
46570  /* Root Hub INTs are polled by this timer, polling interval 20ms */
46571  
46572 -_static int rh_init_int_timer (urb_t *urb)
46573 +_static int rh_init_int_timer (struct urb *urb)
46574  {
46575         uhci_t *uhci = urb->dev->bus->hcpriv;
46576  
46577 @@ -1961,12 +1963,12 @@
46578   *************************/
46579  
46580  
46581 -_static int rh_submit_urb (urb_t *urb)
46582 +_static int rh_submit_urb (struct urb *urb)
46583  {
46584         struct usb_device *usb_dev = urb->dev;
46585         uhci_t *uhci = usb_dev->bus->hcpriv;
46586         unsigned int pipe = urb->pipe;
46587 -       devrequest *cmd = (devrequest *) urb->setup_packet;
46588 +       struct usb_ctrlrequest *cmd = (struct usb_ctrlrequest *) urb->setup_packet;
46589         void *data = urb->transfer_buffer;
46590         int leni = urb->transfer_buffer_length;
46591         int len = 0;
46592 @@ -1992,10 +1994,10 @@
46593         }
46594  
46595  
46596 -       bmRType_bReq = cmd->requesttype | cmd->request << 8;
46597 -       wValue = le16_to_cpu (cmd->value);
46598 -       wIndex = le16_to_cpu (cmd->index);
46599 -       wLength = le16_to_cpu (cmd->length);
46600 +       bmRType_bReq = cmd->bRequestType | cmd->bRequest << 8;
46601 +       wValue = le16_to_cpu (cmd->wValue);
46602 +       wIndex = le16_to_cpu (cmd->wIndex);
46603 +       wLength = le16_to_cpu (cmd->wLength);
46604  
46605         for (i = 0; i < 8; i++)
46606                 uhci->rh.c_p_r[i] = 0;
46607 @@ -2162,7 +2164,7 @@
46608  }
46609  /*-------------------------------------------------------------------------*/
46610  
46611 -_static int rh_unlink_urb (urb_t *urb)
46612 +_static int rh_unlink_urb (struct urb *urb)
46613  {
46614         uhci_t *uhci = urb->dev->bus->hcpriv;
46615  
46616 @@ -2220,14 +2222,14 @@
46617         unsigned long flags;
46618         struct list_head *p;
46619         struct list_head *p2;
46620 -       urb_t *urb;
46621 +       struct urb *urb;
46622  
46623         spin_lock_irqsave (&s->urb_list_lock, flags);
46624         p = s->urb_list.prev;   
46625         while (p != &s->urb_list) {
46626                 p2 = p;
46627                 p = p->prev ;
46628 -               urb = list_entry (p2, urb_t, urb_list);
46629 +               urb = list_entry (p2, struct urb, urb_list);
46630                 dbg("urb: %p, dev %p, %p", urb, usb_dev,urb->dev);
46631                 
46632                 //urb->transfer_flags |=USB_ASYNC_UNLINK; 
46633 @@ -2277,7 +2279,7 @@
46634         uhci_unlink_urb
46635  };
46636  
46637 -_static void correct_data_toggles(urb_t *urb)
46638 +_static void correct_data_toggles(struct urb *urb)
46639  {
46640         usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe), usb_pipeout (urb->pipe), 
46641                        !usb_gettoggle (urb->dev, usb_pipeendpoint (urb->pipe), usb_pipeout (urb->pipe)));
46642 @@ -2307,7 +2309,7 @@
46643   *       PROCESS_TRANSFER_DONT_UNLINK: QHs already unlinked (for async unlink_urb)
46644   */
46645  
46646 -_static int process_transfer (uhci_t *s, urb_t *urb, int mode)
46647 +_static int process_transfer (uhci_t *s, struct urb *urb, int mode)
46648  {
46649         int ret = 0;
46650         urb_priv_t *urb_priv = urb->hcpriv;
46651 @@ -2395,7 +2397,7 @@
46652         if (usb_pipetype (urb->pipe) == PIPE_BULK ) {  /* toggle correction for short bulk transfers (nonqueued/queued) */
46653  
46654                 urb_priv_t *priv=(urb_priv_t*)urb->hcpriv;
46655 -               urb_t *next_queued_urb=priv->next_queued_urb;
46656 +               struct urb *next_queued_urb=priv->next_queued_urb;
46657  
46658                 if (next_queued_urb) {
46659                         urb_priv_t *next_priv=(urb_priv_t*)next_queued_urb->hcpriv;
46660 @@ -2426,7 +2428,7 @@
46661         return ret;
46662  }
46663  
46664 -_static int process_interrupt (uhci_t *s, urb_t *urb)
46665 +_static int process_interrupt (uhci_t *s, struct urb *urb)
46666  {
46667         int i, ret = -EINPROGRESS;
46668         urb_priv_t *urb_priv = urb->hcpriv;
46669 @@ -2525,7 +2527,7 @@
46670  // mode: PROCESS_ISO_REGULAR: processing only for done TDs, unlink TDs
46671  // mode: PROCESS_ISO_FORCE: force processing, don't unlink TDs (already unlinked)
46672  
46673 -_static int process_iso (uhci_t *s, urb_t *urb, int mode)
46674 +_static int process_iso (uhci_t *s, struct urb *urb, int mode)
46675  {
46676         int i;
46677         int ret = 0;
46678 @@ -2594,9 +2596,9 @@
46679  _static int process_urb (uhci_t *s, struct list_head *p)
46680  {
46681         int ret = 0;
46682 -       urb_t *urb;
46683 +       struct urb *urb;
46684  
46685 -       urb=list_entry (p, urb_t, urb_list);
46686 +       urb=list_entry (p, struct urb, urb_list);
46687         //dbg("process_urb: found queued urb: %p", urb);
46688  
46689         switch (usb_pipetype (urb->pipe)) {
46690 @@ -2645,7 +2647,7 @@
46691  #endif
46692  
46693                 if ((usb_pipetype (urb->pipe) != PIPE_INTERRUPT)) {  // process_interrupt does completion on its own            
46694 -                       urb_t *next_urb = urb->next;
46695 +                       struct urb *next_urb = urb->next;
46696                         int is_ring = 0;
46697                         int contains_killed = 0;
46698                         int loop_count=0;
46699 @@ -2952,6 +2954,7 @@
46700         }
46701  
46702         s->bus = bus;
46703 +       bus->bus_name = dev->slot_name;
46704         bus->hcpriv = s;
46705  
46706         /* UHCI specs says devices must have 2 ports, but goes on to say */
46707 diff -Nur linux-2.4.19.org/drivers/usb/usb-uhci.h linux-2.4.19/drivers/usb/usb-uhci.h
46708 --- linux-2.4.19.org/drivers/usb/usb-uhci.h     Sat Aug  3 02:39:45 2002
46709 +++ linux-2.4.19/drivers/usb/usb-uhci.h Thu Oct 31 08:11:27 2002
46710 @@ -158,8 +158,8 @@
46711         dma_addr_t setup_packet_dma;
46712         dma_addr_t transfer_buffer_dma;
46713         unsigned long started;
46714 -       urb_t *next_queued_urb;         // next queued urb for this EP
46715 -       urb_t *prev_queued_urb;
46716 +       struct urb *next_queued_urb;    // next queued urb for this EP
46717 +       struct urb *prev_queued_urb;
46718         uhci_desc_t *bottom_qh;
46719         uhci_desc_t *next_qh;           // next helper QH
46720         char use_loop;
46721 diff -Nur linux-2.4.19.org/drivers/usb/usb.c linux-2.4.19/drivers/usb/usb.c
46722 --- linux-2.4.19.org/drivers/usb/usb.c  Sat Aug  3 02:39:45 2002
46723 +++ linux-2.4.19/drivers/usb/usb.c      Thu Oct 31 08:11:28 2002
46724 @@ -38,6 +38,8 @@
46725  #endif
46726  #include <linux/usb.h>
46727  
46728 +#include "hcd.h"
46729 +
46730  static const int usb_bandwidth_option =
46731  #ifdef CONFIG_USB_BANDWIDTH
46732                                 1;
46733 @@ -218,42 +220,51 @@
46734  }
46735  
46736  /*
46737 - * usb_calc_bus_time:
46738 - *
46739 - * returns (approximate) USB bus time in nanoseconds for a USB transaction.
46740 + * usb_calc_bus_time - approximate periodic transaction time in nanoseconds
46741 + * @speed: from dev->speed; USB_SPEED_{LOW,FULL,HIGH}
46742 + * @is_input: true iff the transaction sends data to the host
46743 + * @isoc: true for isochronous transactions, false for interrupt ones
46744 + * @bytecount: how many bytes in the transaction.
46745 + *
46746 + * Returns approximate bus time in nanoseconds for a periodic transaction.
46747 + * See USB 2.0 spec section 5.11.3; only periodic transfers need to be
46748 + * scheduled in software, this function is only used for such scheduling.
46749   */
46750 -static long usb_calc_bus_time (int low_speed, int input_dir, int isoc, int bytecount)
46751 +long usb_calc_bus_time (int speed, int is_input, int isoc, int bytecount)
46752  {
46753         unsigned long   tmp;
46754  
46755 -       if (low_speed)          /* no isoc. here */
46756 -       {
46757 -               if (input_dir)
46758 -               {
46759 +       switch (speed) {
46760 +       case USB_SPEED_LOW:     /* INTR only */
46761 +               if (is_input) {
46762                         tmp = (67667L * (31L + 10L * BitTime (bytecount))) / 1000L;
46763                         return (64060L + (2 * BW_HUB_LS_SETUP) + BW_HOST_DELAY + tmp);
46764 -               }
46765 -               else
46766 -               {
46767 +               } else {
46768                         tmp = (66700L * (31L + 10L * BitTime (bytecount))) / 1000L;
46769                         return (64107L + (2 * BW_HUB_LS_SETUP) + BW_HOST_DELAY + tmp);
46770                 }
46771 +       case USB_SPEED_FULL:    /* ISOC or INTR */
46772 +               if (isoc) {
46773 +                       tmp = (8354L * (31L + 10L * BitTime (bytecount))) / 1000L;
46774 +                       return (((is_input) ? 7268L : 6265L) + BW_HOST_DELAY + tmp);
46775 +               } else {
46776 +                       tmp = (8354L * (31L + 10L * BitTime (bytecount))) / 1000L;
46777 +                       return (9107L + BW_HOST_DELAY + tmp);
46778 +               }
46779 +       case USB_SPEED_HIGH:    /* ISOC or INTR */
46780 +               // FIXME adjust for input vs output
46781 +               if (isoc)
46782 +                       tmp = HS_USECS (bytecount);
46783 +               else
46784 +                       tmp = HS_USECS_ISO (bytecount);
46785 +               return tmp;
46786 +       default:
46787 +               dbg ("bogus device speed!");
46788 +               return -1;
46789         }
46790 -
46791 -       /* for full-speed: */
46792 -
46793 -       if (!isoc)              /* Input or Output */
46794 -       {
46795 -               tmp = (8354L * (31L + 10L * BitTime (bytecount))) / 1000L;
46796 -               return (9107L + BW_HOST_DELAY + tmp);
46797 -       } /* end not Isoc */
46798 -
46799 -       /* for isoc: */
46800 -
46801 -       tmp = (8354L * (31L + 10L * BitTime (bytecount))) / 1000L;
46802 -       return (((input_dir) ? 7268L : 6265L) + BW_HOST_DELAY + tmp);
46803  }
46804  
46805 +
46806  /*
46807   * usb_check_bandwidth():
46808   *
46809 @@ -285,7 +296,7 @@
46810         unsigned int    pipe = urb->pipe;
46811         long            bustime;
46812  
46813 -       bustime = usb_calc_bus_time (usb_pipeslow(pipe), usb_pipein(pipe),
46814 +       bustime = usb_calc_bus_time (dev->speed, usb_pipein(pipe),
46815                         usb_pipeisoc(pipe), usb_maxpacket(dev, pipe, usb_pipeout(pipe)));
46816         if (usb_pipeisoc(pipe))
46817                 bustime = NS_TO_US(bustime) / urb->number_of_packets;
46818 @@ -457,12 +468,11 @@
46819          */
46820         down (&usb_bus_list_lock);
46821         list_del(&bus->bus_list);
46822 +       clear_bit(bus->busnum, busmap.busmap);
46823         up (&usb_bus_list_lock);
46824  
46825         usbdevfs_remove_bus(bus);
46826  
46827 -       clear_bit(bus->busnum, busmap.busmap);
46828 -
46829         usb_bus_put(bus);
46830  }
46831  
46832 @@ -939,6 +949,9 @@
46833  
46834         usb_bus_get(bus);
46835  
46836 +       if (!parent)
46837 +               dev->devpath [0] = '0';
46838 +
46839         dev->bus = bus;
46840         dev->parent = parent;
46841         atomic_set(&dev->refcnt, 1);
46842 @@ -985,11 +998,11 @@
46843   *
46844   *     The driver should call usb_free_urb() when it is finished with the urb.
46845   */
46846 -urb_t *usb_alloc_urb(int iso_packets)
46847 +struct urb *usb_alloc_urb(int iso_packets)
46848  {
46849 -       urb_t *urb;
46850 +       struct urb *urb;
46851  
46852 -       urb = (urb_t *)kmalloc(sizeof(urb_t) + iso_packets * sizeof(iso_packet_descriptor_t),
46853 +       urb = (struct urb *)kmalloc(sizeof(struct urb) + iso_packets * sizeof(struct iso_packet_descriptor),
46854               in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
46855         if (!urb) {
46856                 err("alloc_urb: kmalloc failed");
46857 @@ -1011,13 +1024,13 @@
46858   *     cleaned up with a call to usb_free_urb() when the driver is finished
46859   *     with it.
46860   */
46861 -void usb_free_urb(urb_t* urb)
46862 +void usb_free_urb(struct urb* urb)
46863  {
46864         if (urb)
46865                 kfree(urb);
46866  }
46867  /*-------------------------------------------------------------------*/
46868 -int usb_submit_urb(urb_t *urb)
46869 +int usb_submit_urb(struct urb *urb)
46870  {
46871         if (urb && urb->dev && urb->dev->bus && urb->dev->bus->op)
46872                 return urb->dev->bus->op->submit_urb(urb);
46873 @@ -1026,7 +1039,7 @@
46874  }
46875  
46876  /*-------------------------------------------------------------------*/
46877 -int usb_unlink_urb(urb_t *urb)
46878 +int usb_unlink_urb(struct urb *urb)
46879  {
46880         if (urb && urb->dev && urb->dev->bus && urb->dev->bus->op)
46881                 return urb->dev->bus->op->unlink_urb(urb);
46882 @@ -1040,7 +1053,7 @@
46883  /*-------------------------------------------------------------------*
46884   * completion handler for compatibility wrappers (sync control/bulk) *
46885   *-------------------------------------------------------------------*/
46886 -static void usb_api_blocking_completion(urb_t *urb)
46887 +static void usb_api_blocking_completion(struct urb *urb)
46888  {
46889         struct usb_api_data *awd = (struct usb_api_data *)urb->context;
46890  
46891 @@ -1054,7 +1067,7 @@
46892   *-------------------------------------------------------------------*/
46893  
46894  // Starts urb and waits for completion or timeout
46895 -static int usb_start_wait_urb(urb_t *urb, int timeout, int* actual_length)
46896 +static int usb_start_wait_urb(struct urb *urb, int timeout, int* actual_length)
46897  { 
46898         DECLARE_WAITQUEUE(wait, current);
46899         struct usb_api_data awd;
46900 @@ -1110,9 +1123,9 @@
46901  /*-------------------------------------------------------------------*/
46902  // returns status (negative) or length (positive)
46903  int usb_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe, 
46904 -                           devrequest *cmd,  void *data, int len, int timeout)
46905 +                           struct usb_ctrlrequest *cmd,  void *data, int len, int timeout)
46906  {
46907 -       urb_t *urb;
46908 +       struct urb *urb;
46909         int retv;
46910         int length;
46911  
46912 @@ -1145,7 +1158,8 @@
46913   *     This function sends a simple control message to a specified endpoint
46914   *     and waits for the message to complete, or timeout.
46915   *     
46916 - *     If successful, it returns 0, othwise a negative error number.
46917 + *     If successful, it returns the number of bytes transferred; 
46918 + *     otherwise, it returns a negative error number.
46919   *
46920   *     Don't use this function from within an interrupt context, like a
46921   *     bottom half handler.  If you need a asyncronous message, or need to send
46922 @@ -1154,17 +1168,17 @@
46923  int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype,
46924                          __u16 value, __u16 index, void *data, __u16 size, int timeout)
46925  {
46926 -       devrequest *dr = kmalloc(sizeof(devrequest), GFP_KERNEL);
46927 +       struct usb_ctrlrequest *dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL);
46928         int ret;
46929         
46930         if (!dr)
46931                 return -ENOMEM;
46932  
46933 -       dr->requesttype = requesttype;
46934 -       dr->request = request;
46935 -       dr->value = cpu_to_le16p(&value);
46936 -       dr->index = cpu_to_le16p(&index);
46937 -       dr->length = cpu_to_le16p(&size);
46938 +       dr->bRequestType = requesttype;
46939 +       dr->bRequest = request;
46940 +       dr->wValue = cpu_to_le16p(&value);
46941 +       dr->wIndex = cpu_to_le16p(&index);
46942 +       dr->wLength = cpu_to_le16p(&size);
46943  
46944         //dbg("usb_control_msg");       
46945  
46946 @@ -1188,9 +1202,9 @@
46947   *     This function sends a simple bulk message to a specified endpoint
46948   *     and waits for the message to complete, or timeout.
46949   *     
46950 - *     If successful, it returns 0, othwise a negative error number.
46951 - *     The number of actual bytes transferred will be plaed in the 
46952 - *     actual_timeout paramater.
46953 + *     If successful, it returns 0, otherwise a negative error number.
46954 + *     The number of actual bytes transferred will be stored in the 
46955 + *     actual_length paramater.
46956   *
46957   *     Don't use this function from within an interrupt context, like a
46958   *     bottom half handler.  If you need a asyncronous message, or need to
46959 @@ -1199,7 +1213,7 @@
46960  int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, 
46961                         void *data, int len, int *actual_length, int timeout)
46962  {
46963 -       urb_t *urb;
46964 +       struct urb *urb;
46965  
46966         if (len < 0)
46967                 return -EINVAL;
46968 @@ -1698,7 +1712,8 @@
46969  
46970         *pdev = NULL;
46971  
46972 -       info("USB disconnect on device %d", dev->devnum);
46973 +       info("USB disconnect on device %s-%s address %d",
46974 +                       dev->bus->bus_name, dev->devpath, dev->devnum);
46975  
46976         if (dev->actconfig) {
46977                 for (i = 0; i < dev->actconfig->bNumInterfaces; i++) {
46978 @@ -2392,6 +2407,7 @@
46979  EXPORT_SYMBOL(usb_connect);
46980  EXPORT_SYMBOL(usb_disconnect);
46981  
46982 +EXPORT_SYMBOL(usb_calc_bus_time);
46983  EXPORT_SYMBOL(usb_check_bandwidth);
46984  EXPORT_SYMBOL(usb_claim_bandwidth);
46985  EXPORT_SYMBOL(usb_release_bandwidth);
46986 diff -Nur linux-2.4.19.org/drivers/usb/usbkbd.c linux-2.4.19/drivers/usb/usbkbd.c
46987 --- linux-2.4.19.org/drivers/usb/usbkbd.c       Fri Sep 14 23:04:07 2001
46988 +++ linux-2.4.19/drivers/usb/usbkbd.c   Thu Oct 31 08:11:28 2002
46989 @@ -71,7 +71,7 @@
46990         unsigned char new[8];
46991         unsigned char old[8];
46992         struct urb irq, led;
46993 -       devrequest dr;
46994 +       struct usb_ctrlrequest dr;
46995         unsigned char leds, newleds;
46996         char name[128];
46997         int open;
46998 @@ -215,11 +215,11 @@
46999         kdb_usb_infos.reset_timer = usb_kbd_reset_timer;
47000         kdb_usb_infos.driver = USB_KBD_ACTIVE;
47001  #endif /* CONFIG_KDB_USB */
47002 -       kbd->dr.requesttype = USB_TYPE_CLASS | USB_RECIP_INTERFACE;
47003 -       kbd->dr.request = USB_REQ_SET_REPORT;
47004 -       kbd->dr.value = 0x200;
47005 -       kbd->dr.index = interface->bInterfaceNumber;
47006 -       kbd->dr.length = 1;
47007 +       kbd->dr.bRequestType = USB_TYPE_CLASS | USB_RECIP_INTERFACE;
47008 +       kbd->dr.bRequest = USB_REQ_SET_REPORT;
47009 +       kbd->dr.wValue = 0x200;
47010 +       kbd->dr.wIndex = interface->bInterfaceNumber;
47011 +       kbd->dr.wLength = 1;
47012  
47013         kbd->dev.name = kbd->name;
47014         kbd->dev.idbus = BUS_USB;
47015 diff -Nur linux-2.4.19.org/drivers/usb/usblcd.c linux-2.4.19/drivers/usb/usblcd.c
47016 --- linux-2.4.19.org/drivers/usb/usblcd.c       Thu Jan  1 01:00:00 1970
47017 +++ linux-2.4.19/drivers/usb/usblcd.c   Thu Oct 31 08:11:28 2002
47018 @@ -0,0 +1,347 @@
47019 +/***************************************************************************** 
47020 + *                          USBLCD Kernel Driver                             *
47021 + *        See http://www.usblcd.de for Hardware and Documentation.           *
47022 + *                            Version 1.03                                   *
47023 + *             (C) 2002 Adams IT Services <info@usblcd.de>                   *
47024 + *                                                                           *
47025 + *     This file is licensed under the GPL. See COPYING in the package.      *
47026 + * Based on rio500.c by Cesar Miquel (miquel@df.uba.ar) which is based on    *
47027 + * hp_scanner.c by David E. Nelson (dnelson@jump.net)                        *
47028 + *                                                                           *
47029 + * 23.7.02 RA changed minor device number to the official assigned one       *
47030 + * 18.9.02 RA Vendor ID change, longer timeouts                              *
47031 + *****************************************************************************/
47032 +#include <linux/module.h>
47033 +#include <linux/kernel.h>
47034 +#include <linux/init.h>
47035 +#include <linux/slab.h>
47036 +#include <linux/errno.h>
47037 +#include <asm/uaccess.h>
47038 +#include <linux/usb.h>
47039 +
47040 +#define DRIVER_VERSION "USBLCD Driver Version 1.03"
47041 +
47042 +#define USBLCD_MINOR           144
47043 +
47044 +#define IOCTL_GET_HARD_VERSION 1
47045 +#define IOCTL_GET_DRV_VERSION  2
47046 +
47047 +/* stall/wait timeout for USBLCD */
47048 +#define NAK_TIMEOUT    (10*HZ)
47049 +
47050 +#define IBUF_SIZE      0x1000
47051 +#define OBUF_SIZE      0x10000
47052 +
47053 +struct lcd_usb_data {
47054 +       struct usb_device *lcd_dev;     /* init: probe_lcd */
47055 +       unsigned int ifnum;             /* Interface number of the USB device */
47056 +       int isopen;                     /* nz if open */
47057 +       int present;                    /* Device is present on the bus */
47058 +       char *obuf, *ibuf;              /* transfer buffers */
47059 +       char bulk_in_ep, bulk_out_ep;   /* Endpoint assignments */
47060 +       wait_queue_head_t wait_q;       /* for timeouts */
47061 +};
47062 +
47063 +static struct lcd_usb_data lcd_instance;
47064 +
47065 +static int open_lcd(struct inode *inode, struct file *file)
47066 +{
47067 +       struct lcd_usb_data *lcd = &lcd_instance;
47068 +
47069 +       if (lcd->isopen || !lcd->present) {
47070 +               return -EBUSY;
47071 +       }
47072 +       lcd->isopen = 1;
47073 +
47074 +       init_waitqueue_head(&lcd->wait_q);
47075 +
47076 +       info("USBLCD opened.");
47077 +
47078 +       return 0;
47079 +}
47080 +
47081 +static int close_lcd(struct inode *inode, struct file *file)
47082 +{
47083 +       struct lcd_usb_data *lcd = &lcd_instance;
47084 +
47085 +       lcd->isopen = 0;
47086 +
47087 +       info("USBLCD closed.");
47088 +       return 0;
47089 +}
47090 +
47091 +static int
47092 +ioctl_lcd(struct inode *inode, struct file *file, unsigned int cmd,
47093 +         unsigned long arg)
47094 +{
47095 +       struct lcd_usb_data *lcd = &lcd_instance;
47096 +       int i;
47097 +       char buf[30];
47098 +
47099 +       /* Sanity check to make sure lcd is connected, powered, etc */
47100 +       if (lcd == NULL ||
47101 +           lcd->present == 0 ||
47102 +           lcd->lcd_dev == NULL)
47103 +               return -1;
47104 +
47105 +       switch (cmd) {
47106 +       case IOCTL_GET_HARD_VERSION:
47107 +               i = (lcd->lcd_dev)->descriptor.bcdDevice;
47108 +               sprintf(buf,"%1d%1d.%1d%1d",(i & 0xF000)>>12,(i & 0xF00)>>8,
47109 +                       (i & 0xF0)>>4,(i & 0xF));
47110 +               if (copy_to_user((void *)arg,buf,strlen(buf))!=0)
47111 +                       return -EFAULT;
47112 +               break;
47113 +       case IOCTL_GET_DRV_VERSION:
47114 +               sprintf(buf,DRIVER_VERSION);
47115 +               if (copy_to_user((void *)arg,buf,strlen(buf))!=0)
47116 +                       return -EFAULT;
47117 +               break;
47118 +       default:
47119 +               return -ENOIOCTLCMD;
47120 +               break;
47121 +       }
47122 +
47123 +       return 0;
47124 +}
47125 +
47126 +static ssize_t
47127 +write_lcd(struct file *file, const char *buffer,
47128 +         size_t count, loff_t * ppos)
47129 +{
47130 +       struct lcd_usb_data *lcd = &lcd_instance;
47131 +
47132 +       unsigned long copy_size;
47133 +       unsigned long bytes_written = 0;
47134 +       unsigned int partial;
47135 +
47136 +       int result = 0;
47137 +       int maxretry;
47138 +
47139 +       /* Sanity check to make sure lcd is connected, powered, etc */
47140 +       if (lcd == NULL ||
47141 +           lcd->present == 0 ||
47142 +           lcd->lcd_dev == NULL)
47143 +               return -1;
47144 +
47145 +       do {
47146 +               unsigned long thistime;
47147 +               char *obuf = lcd->obuf;
47148 +
47149 +               thistime = copy_size =
47150 +                   (count >= OBUF_SIZE) ? OBUF_SIZE : count;
47151 +               if (copy_from_user(lcd->obuf, buffer, copy_size))
47152 +                       return -EFAULT;
47153 +               maxretry = 5;
47154 +               while (thistime) {
47155 +                       if (!lcd->lcd_dev)
47156 +                               return -ENODEV;
47157 +                       if (signal_pending(current)) {
47158 +                               return bytes_written ? bytes_written : -EINTR;
47159 +                       }
47160 +
47161 +                       result = usb_bulk_msg(lcd->lcd_dev,
47162 +                                        usb_sndbulkpipe(lcd->lcd_dev, 1),
47163 +                                        obuf, thistime, &partial, 10 * HZ);
47164 +
47165 +                       dbg("write stats: result:%d thistime:%lu partial:%u",
47166 +                            result, thistime, partial);
47167 +
47168 +                       if (result == USB_ST_TIMEOUT) { /* NAK - so hold for a while */
47169 +                               if (!maxretry--) {
47170 +                                       return -ETIME;
47171 +                               }
47172 +                               interruptible_sleep_on_timeout(&lcd-> wait_q, NAK_TIMEOUT);
47173 +                               continue;
47174 +                       } else if (!result & partial) {
47175 +                               obuf += partial;
47176 +                               thistime -= partial;
47177 +                       } else
47178 +                               break;
47179 +               };
47180 +               if (result) {
47181 +                       err("Write Whoops - %x", result);
47182 +                       return -EIO;
47183 +               }
47184 +               bytes_written += copy_size;
47185 +               count -= copy_size;
47186 +               buffer += copy_size;
47187 +       } while (count > 0);
47188 +
47189 +       return bytes_written ? bytes_written : -EIO;
47190 +}
47191 +
47192 +static ssize_t
47193 +read_lcd(struct file *file, char *buffer, size_t count, loff_t * ppos)
47194 +{
47195 +       struct lcd_usb_data *lcd = &lcd_instance;
47196 +       ssize_t read_count;
47197 +       unsigned int partial;
47198 +       int this_read;
47199 +       int result;
47200 +       int maxretry = 10;
47201 +       char *ibuf = lcd->ibuf;
47202 +
47203 +       /* Sanity check to make sure lcd is connected, powered, etc */
47204 +       if (lcd == NULL ||
47205 +           lcd->present == 0 ||
47206 +           lcd->lcd_dev == NULL)
47207 +               return -1;
47208 +
47209 +       read_count = 0;
47210 +
47211 +       while (count > 0) {
47212 +               if (signal_pending(current)) {
47213 +                       return read_count ? read_count : -EINTR;
47214 +               }
47215 +               if (!lcd->lcd_dev)
47216 +                       return -ENODEV;
47217 +               this_read = (count >= IBUF_SIZE) ? IBUF_SIZE : count;
47218 +
47219 +               result = usb_bulk_msg(lcd->lcd_dev,
47220 +                                     usb_rcvbulkpipe(lcd->lcd_dev, 0),
47221 +                                     ibuf, this_read, &partial,
47222 +                                     (int) (HZ * 8));
47223 +
47224 +               dbg(KERN_DEBUG "read stats: result:%d this_read:%u partial:%u",
47225 +                      result, this_read, partial);
47226 +
47227 +               if (partial) {
47228 +                       count = this_read = partial;
47229 +               } else if (result == USB_ST_TIMEOUT || result == 15) {  /* FIXME: 15 ??? */
47230 +                       if (!maxretry--) {
47231 +                               err("read_lcd: maxretry timeout");
47232 +                               return -ETIME;
47233 +                       }
47234 +                       interruptible_sleep_on_timeout(&lcd->wait_q,
47235 +                                                      NAK_TIMEOUT);
47236 +                       continue;
47237 +               } else if (result != USB_ST_DATAUNDERRUN) {
47238 +                       err("Read Whoops - result:%u partial:%u this_read:%u",
47239 +                            result, partial, this_read);
47240 +                       return -EIO;
47241 +               } else {
47242 +                       return (0);
47243 +               }
47244 +
47245 +               if (this_read) {
47246 +                       if (copy_to_user(buffer, ibuf, this_read))
47247 +                               return -EFAULT;
47248 +                       count -= this_read;
47249 +                       read_count += this_read;
47250 +                       buffer += this_read;
47251 +               }
47252 +       }
47253 +       return read_count;
47254 +}
47255 +
47256 +static void *probe_lcd(struct usb_device *dev, unsigned int ifnum)
47257 +{
47258 +       struct lcd_usb_data *lcd = &lcd_instance;
47259 +       int i;
47260 +       
47261 +       if (dev->descriptor.idProduct != 0x0001  ) {
47262 +               warn(KERN_INFO "USBLCD model not supported.");
47263 +               return NULL;
47264 +       }
47265 +
47266 +       if (lcd->present == 1) {
47267 +               warn(KERN_INFO "Multiple USBLCDs are not supported!");
47268 +               return NULL;
47269 +       }
47270 +
47271 +       i = dev->descriptor.bcdDevice;
47272 +
47273 +       info("USBLCD Version %1d%1d.%1d%1d found at address %d",
47274 +               (i & 0xF000)>>12,(i & 0xF00)>>8,(i & 0xF0)>>4,(i & 0xF),
47275 +               dev->devnum);
47276 +
47277 +       lcd->present = 1;
47278 +       lcd->lcd_dev = dev;
47279 +
47280 +       if (!(lcd->obuf = (char *) kmalloc(OBUF_SIZE, GFP_KERNEL))) {
47281 +               err("probe_lcd: Not enough memory for the output buffer");
47282 +               return NULL;
47283 +       }
47284 +       dbg("probe_lcd: obuf address:%p", lcd->obuf);
47285 +
47286 +       if (!(lcd->ibuf = (char *) kmalloc(IBUF_SIZE, GFP_KERNEL))) {
47287 +               err("probe_lcd: Not enough memory for the input buffer");
47288 +               kfree(lcd->obuf);
47289 +               return NULL;
47290 +       }
47291 +       dbg("probe_lcd: ibuf address:%p", lcd->ibuf);
47292 +
47293 +       return lcd;
47294 +}
47295 +
47296 +static void disconnect_lcd(struct usb_device *dev, void *ptr)
47297 +{
47298 +       struct lcd_usb_data *lcd = (struct lcd_usb_data *) ptr;
47299 +
47300 +       if (lcd->isopen) {
47301 +               lcd->isopen = 0;
47302 +               /* better let it finish - the release will do whats needed */
47303 +               lcd->lcd_dev = NULL;
47304 +               return;
47305 +       }
47306 +       kfree(lcd->ibuf);
47307 +       kfree(lcd->obuf);
47308 +
47309 +       info("USBLCD disconnected.");
47310 +
47311 +       lcd->present = 0;
47312 +}
47313 +
47314 +static struct usb_device_id id_table [] = {
47315 +       { .idVendor = 0x10D2, .match_flags = USB_DEVICE_ID_MATCH_VENDOR, },
47316 +       {},
47317 +};
47318 +
47319 +MODULE_DEVICE_TABLE (usb, id_table);
47320 +
47321 +static struct
47322 +file_operations usb_lcd_fops = {
47323 +       .owner =        THIS_MODULE,
47324 +       .read =         read_lcd,
47325 +       .write =        write_lcd,
47326 +       .ioctl =        ioctl_lcd,
47327 +       .open =         open_lcd,
47328 +       .release =      close_lcd,
47329 +};
47330 +
47331 +static struct
47332 +usb_driver lcd_driver = {
47333 +       .name =         "usblcd",
47334 +       .probe =        (void *)probe_lcd,
47335 +       .disconnect =   disconnect_lcd,
47336 +       .id_table =     id_table,
47337 +       .fops =         &usb_lcd_fops,
47338 +       .minor =        USBLCD_MINOR,
47339 +};
47340 +
47341 +int usb_lcd_init(void)
47342 +{
47343 +       if (usb_register(&lcd_driver) < 0)
47344 +               return -1;
47345 +
47346 +       info("%s (C) Adams IT Services http://www.usblcd.de", DRIVER_VERSION);
47347 +       info("USBLCD support registered.");
47348 +       return 0;
47349 +}
47350 +
47351 +
47352 +void usb_lcd_cleanup(void)
47353 +{
47354 +       struct lcd_usb_data *lcd = &lcd_instance;
47355 +
47356 +       lcd->present = 0;
47357 +       usb_deregister(&lcd_driver);
47358 +}
47359 +
47360 +module_init(usb_lcd_init);
47361 +module_exit(usb_lcd_cleanup);
47362 +
47363 +MODULE_AUTHOR("Adams IT Services <info@usblcd.de>");
47364 +MODULE_DESCRIPTION(DRIVER_VERSION);
47365 +MODULE_LICENSE("GPL");
47366 diff -Nur linux-2.4.19.org/drivers/usb/usbnet.c linux-2.4.19/drivers/usb/usbnet.c
47367 --- linux-2.4.19.org/drivers/usb/usbnet.c       Sat Aug  3 02:39:45 2002
47368 +++ linux-2.4.19/drivers/usb/usbnet.c   Thu Oct 31 08:11:28 2002
47369 @@ -1,6 +1,6 @@
47370  /*
47371   * USB Host-to-Host Links
47372 - * Copyright (C) 2000-2001 by David Brownell <dbrownell@users.sourceforge.net>
47373 + * Copyright (C) 2000-2002 by David Brownell <dbrownell@users.sourceforge.net>
47374   */
47375  
47376  /*
47377 @@ -16,6 +16,7 @@
47378   *
47379   *     - AnchorChip 2720
47380   *     - Belkin, eTEK (interops with Win32 drivers)
47381 + *     - EPSON USB clients
47382   *     - GeneSys GL620USB-A
47383   *     - "Linux Devices" (like iPaq and similar SA-1100 based PDAs)
47384   *     - NetChip 1080 (interoperates with NetChip Win32 drivers)
47385 @@ -23,33 +24,41 @@
47386   *
47387   * USB devices can implement their side of this protocol at the cost
47388   * of two bulk endpoints; it's not restricted to "cable" applications.
47389 - * See the LINUXDEV support.
47390 + * See the LINUXDEV or EPSON device/client support.
47391   *
47392   * 
47393 - * TODO:
47394 + * Status:
47395   *
47396 - * This needs to be retested for bulk queuing problems ... earlier versions
47397 - * seemed to find different types of problems in each HCD.  Once they're fixed,
47398 - * re-enable queues to get higher bandwidth utilization (without needing
47399 - * to tweak MTU for larger packets).
47400 - *
47401 - * Add support for more "network cable" chips; interop with their Win32
47402 - * drivers may be a good thing.  Test the AnchorChip 2720 support..
47403 - * Figure out the initialization protocol used by the Prolific chips,
47404 - * for better robustness ... there's some powerup/reset handshake that's
47405 - * needed when only one end reboots.
47406 - *
47407 - * Use interrupt on PL230x to detect peer connect/disconnect, and call
47408 - * netif_carrier_{on,off} (?) appropriately.  For Net1080, detect peer
47409 - * connect/disconnect with async control messages.
47410 - *
47411 - * Find some way to report "peer connected" network hotplug events; it'll
47412 - * likely mean updating the networking layer.  (This has been discussed
47413 - * on the netdev list...)
47414 + * - AN2720 ... not widely available, but reportedly works well
47415   *
47416 - * Craft smarter hotplug policy scripts ... ones that know how to arrange
47417 + * - Belkin/eTEK ... no known issues
47418 + *
47419 + * - Both GeneSys and PL-230x use interrupt transfers for driver-to-driver
47420 + *   handshaking; it'd be worth implementing those as "carrier detect".
47421 + *   Prefer generic hooks, not minidriver-specific hacks.
47422 + *
47423 + * - Linux devices ... the www.handhelds.org SA-1100 support works nicely,
47424 + *   but the Sharp Zaurus uses an incompatible protocol (extra checksums).
47425 + *   No reason not to merge the Zaurus protocol here too (got patch? :)
47426 + *
47427 + * - For Netchip, should use keventd to poll via control requests to detect
47428 + *   hardware level "carrier detect". 
47429 + *
47430 + * - PL-230x ... the initialization protocol doesn't seem to match chip data
47431 + *   sheets, sometimes it's not needed and sometimes it hangs.  Prolific has
47432 + *   not responded to repeated support/information requests.
47433 + *
47434 + * Interop with more Win32 drivers may be a good thing.
47435 + *
47436 + * Seems like reporting "peer connected" (carrier present) events may end
47437 + * up going through the netlink event system, not hotplug ... that may be
47438 + * awkward in terms of automatic configuration though.
47439 + *
47440 + * There are reports that bridging gives lower-than-usual throughput.
47441 + *
47442 + * Need smarter hotplug policy scripts ... ones that know how to arrange
47443   * bridging with "brctl", and can handle static and dynamic ("pump") setups.
47444 - * Use those "peer connected" events.
47445 + * Use those eventual "peer connected" events, and zeroconf.
47446   *
47447   *
47448   * CHANGELOG:
47449 @@ -62,6 +71,7 @@
47450   * 18-dec-2000 (db) tx watchdog, "net1080" renaming to "usbnet", device_info
47451   *             and prolific support, isolate net1080-specific bits, cleanup.
47452   *             fix unlink_urbs oops in D3 PM resume code path.
47453 + *
47454   * 02-feb-2001 (db) fix tx skb sharing, packet length, match_flags, ...
47455   * 08-feb-2001 stubbed in "linuxdev", maybe the SA-1100 folk can use it;
47456   *             AnchorChips 2720 support (from spec) for testing;
47457 @@ -83,6 +93,14 @@
47458   *             tie mostly to (sub)driver info.  Workaround some PL-2302
47459   *             chips that seem to reject SET_INTERFACE requests.
47460   *
47461 + * 06-apr-2002 Added ethtool support, based on a patch from Brad Hards.
47462 + *             Level of diagnostics is more configurable; they use device
47463 + *             location (usb_device->devpath) instead of address (2.5).
47464 + *             For tx_fixup, memflags can't be NOIO.
47465 + * 07-may-2002 Generalize/cleanup keventd support, handling rx stalls (mostly
47466 + *             for USB 2.0 TTs) and memory shortages (potential) too. (db)
47467 + *             Use "locally assigned" IEEE802 address space. (Brad Hards)
47468 + *
47469   *-------------------------------------------------------------------------*/
47470  
47471  #include <linux/config.h>
47472 @@ -93,6 +111,9 @@
47473  #include <linux/netdevice.h>
47474  #include <linux/etherdevice.h>
47475  #include <linux/random.h>
47476 +#include <linux/ethtool.h>
47477 +#include <linux/tqueue.h>
47478 +#include <asm/uaccess.h>
47479  #include <asm/unaligned.h>
47480  
47481  // #define     DEBUG                   // error path messages, extra info
47482 @@ -104,15 +125,27 @@
47483  #endif
47484  #include <linux/usb.h>
47485  
47486 +/* in 2.5 these standard usb ops take mem_flags */
47487 +#define ALLOC_URB(n,flags)     usb_alloc_urb(n)
47488 +#define SUBMIT_URB(u,flags)    usb_submit_urb(u)
47489 +
47490 +/* and these got renamed (may move to usb.h) */
47491 +#define usb_get_dev            usb_inc_dev_use
47492 +#define usb_put_dev            usb_dec_dev_use
47493  
47494 +
47495 +/* minidrivers _could_ be individually configured */
47496  #define        CONFIG_USB_AN2720
47497  #define        CONFIG_USB_BELKIN
47498 +#define        CONFIG_USB_EPSON2888
47499  #define        CONFIG_USB_GENESYS
47500  #define        CONFIG_USB_LINUXDEV
47501  #define        CONFIG_USB_NET1080
47502  #define        CONFIG_USB_PL2301
47503  
47504  
47505 +#define DRIVER_VERSION         "17-Jul-2002"
47506 +
47507  /*-------------------------------------------------------------------------*/
47508  
47509  /*
47510 @@ -164,6 +197,7 @@
47511         // protocol/interface state
47512         struct net_device       net;
47513         struct net_device_stats stats;
47514 +       int                     msg_level;
47515  
47516  #ifdef CONFIG_USB_NET1080
47517         u16                     packet_id;
47518 @@ -174,7 +208,12 @@
47519         struct sk_buff_head     txq;
47520         struct sk_buff_head     done;
47521         struct tasklet_struct   bh;
47522 -       struct tq_struct        ctrl_task;
47523 +
47524 +       struct tq_struct        kevent;
47525 +       unsigned long           flags;
47526 +#              define EVENT_TX_HALT    0
47527 +#              define EVENT_RX_HALT    1
47528 +#              define EVENT_RX_MEMORY  2
47529  };
47530  
47531  // device-specific info used by the driver
47532 @@ -224,6 +263,13 @@
47533         size_t                  length;
47534  };
47535  
47536 +static const char driver_name [] = "usbnet";
47537 +
47538 +/* use ethtool to change the level for any given device */
47539 +static int msg_level = 1;
47540 +MODULE_PARM (msg_level, "i");
47541 +MODULE_PARM_DESC (msg_level, "Initial message level (default = 1)");
47542 +
47543  
47544  #define        mutex_lock(x)   down(x)
47545  #define        mutex_unlock(x) up(x)
47546 @@ -241,7 +287,9 @@
47547  #endif
47548  
47549  #define devinfo(usbnet, fmt, arg...) \
47550 -       printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net.name, ## arg)
47551 +       do { if ((usbnet)->msg_level >= 1) \
47552 +       printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net.name, ## arg); \
47553 +       } while (0)
47554  
47555  \f
47556  #ifdef CONFIG_USB_AN2720
47557 @@ -258,12 +306,12 @@
47558   *-------------------------------------------------------------------------*/
47559  
47560  static const struct driver_info        an2720_info = {
47561 -       description:    "AnchorChips/Cypress 2720",
47562 +       .description =  "AnchorChips/Cypress 2720",
47563         // no reset available!
47564         // no check_connect available!
47565  
47566 -       in: 2, out: 2,          // direction distinguishes these
47567 -       epsize: 64,
47568 +       .in = 2, .out = 2,              // direction distinguishes these
47569 +       .epsize =64,
47570  };
47571  
47572  #endif /* CONFIG_USB_AN2720 */
47573 @@ -281,16 +329,39 @@
47574   *-------------------------------------------------------------------------*/
47575  
47576  static const struct driver_info        belkin_info = {
47577 -       description:    "Belkin, eTEK, or compatible",
47578 +       .description =  "Belkin, eTEK, or compatible",
47579  
47580 -       in: 1, out: 1,          // direction distinguishes these
47581 -       epsize: 64,
47582 +       .in = 1, .out = 1,              // direction distinguishes these
47583 +       .epsize =64,
47584  };
47585  
47586  #endif /* CONFIG_USB_BELKIN */
47587  
47588  
47589  \f
47590 +#ifdef CONFIG_USB_EPSON2888
47591 +
47592 +/*-------------------------------------------------------------------------
47593 + *
47594 + * EPSON USB clients
47595 + *
47596 + * This is the same idea as "linuxdev" (below) except the firmware in the
47597 + * device might not be Tux-powered.  Epson provides reference firmware that
47598 + * implements this interface.  Product developers can reuse or modify that
47599 + * code, such as by using their own product and vendor codes.
47600 + *
47601 + *-------------------------------------------------------------------------*/
47602 +
47603 +static const struct driver_info        epson2888_info = {
47604 +       .description =  "Epson USB Device",
47605 +
47606 +       .in = 4, .out = 3,
47607 +       .epsize = 64,
47608 +};
47609 +
47610 +#endif /* CONFIG_USB_EPSON2888 */
47611 +
47612 +\f
47613  #ifdef CONFIG_USB_GENESYS
47614  
47615  /*-------------------------------------------------------------------------
47616 @@ -300,6 +371,15 @@
47617   * ... should partially interop with the Win32 driver for this hardware
47618   * The GeneSys docs imply there's some NDIS issue motivating this framing.
47619   *
47620 + * Some info from GeneSys:
47621 + *  - GL620USB-A is full duplex; GL620USB is only half duplex for bulk.
47622 + *    (Some cables, like the BAFO-100c, use the half duplex version.)
47623 + *  - For the full duplex model, the low bit of the version code says
47624 + *    which side is which ("left/right").
47625 + *  - For the half duplex type, a control/interrupt handshake settles
47626 + *    the transfer direction.  (That's disabled here, partially coded.)
47627 + *    A control URB would block until other side writes an interrupt.
47628 + *
47629   *-------------------------------------------------------------------------*/
47630  
47631  // control msg write command
47632 @@ -373,7 +453,7 @@
47633         // issue usb interrupt read
47634         if (priv && priv->irq_urb) {
47635                 // submit urb
47636 -               if ((retval = usb_submit_urb (priv->irq_urb)) != 0)
47637 +               if ((retval = SUBMIT_URB (priv->irq_urb, GFP_KERNEL)) != 0)
47638                         dbg ("gl_interrupt_read: submit fail - %X...", retval);
47639                 else
47640                         dbg ("gl_interrupt_read: submit success...");
47641 @@ -420,7 +500,7 @@
47642         }
47643  
47644         // allocate irq urb
47645 -       if ((priv->irq_urb = usb_alloc_urb (0)) == 0) {
47646 +       if ((priv->irq_urb = ALLOC_URB (0, GFP_KERNEL)) == 0) {
47647                 dbg ("%s: cannot allocate private irq urb per device",
47648                         dev->net.name);
47649                 kfree (priv);
47650 @@ -464,23 +544,8 @@
47651         return 0;
47652  }
47653  
47654 -#else
47655 -
47656 -static int genelink_check_connect (struct usbnet *dev)
47657 -{
47658 -       dbg ("%s: assuming peer is connected", dev->net.name);
47659 -       return 0;
47660 -}
47661 -
47662  #endif
47663  
47664 -// reset the device status
47665 -static int genelink_reset (struct usbnet *dev)
47666 -{
47667 -       // we don't need to reset, just return 0
47668 -       return 0;
47669 -}
47670 -
47671  static int genelink_rx_fixup (struct usbnet *dev, struct sk_buff *skb)
47672  {
47673         struct gl_header        *header;
47674 @@ -600,15 +665,17 @@
47675  }
47676  
47677  static const struct driver_info        genelink_info = {
47678 -       description:    "Genesys GeneLink",
47679 -       flags:          FLAG_FRAMING_GL | FLAG_NO_SETINT,
47680 -       reset:          genelink_reset,
47681 -       check_connect:  genelink_check_connect,
47682 -       rx_fixup:       genelink_rx_fixup,
47683 -       tx_fixup:       genelink_tx_fixup,
47684 +       .description =  "Genesys GeneLink",
47685 +       .flags =        FLAG_FRAMING_GL | FLAG_NO_SETINT,
47686 +       .rx_fixup =     genelink_rx_fixup,
47687 +       .tx_fixup =     genelink_tx_fixup,
47688 +
47689 +       .in = 1, .out = 2,
47690 +       .epsize =64,
47691  
47692 -       in: 1, out: 2,
47693 -       epsize: 64,
47694 +#ifdef GENELINK_ACK
47695 +       .check_connect =genelink_check_connect,
47696 +#endif
47697  };
47698  
47699  #endif /* CONFIG_USB_GENESYS */
47700 @@ -629,21 +696,19 @@
47701   *
47702   * One example is Intel's SA-1100 chip, which integrates basic USB
47703   * support (arch/arm/sa1100/usb-eth.c); it's used in the iPaq PDA.
47704 + * And others too, like the Yopy.
47705   *
47706   *-------------------------------------------------------------------------*/
47707  
47708 -
47709  static const struct driver_info        linuxdev_info = {
47710 -       description:    "Linux Device",
47711 -       // no reset defined (yet?)
47712 -       // no check_connect needed!
47713 -       in: 2, out: 1,
47714 -       epsize: 64,
47715 +       .description =  "Linux Device",
47716 +
47717 +       .in = 2, .out = 1,
47718 +       .epsize = 64,
47719  };
47720  
47721  #endif /* CONFIG_USB_LINUXDEV */
47722  
47723 -
47724  \f
47725  #ifdef CONFIG_USB_NET1080
47726  
47727 @@ -814,10 +879,10 @@
47728  static inline void nc_dump_usbctl (struct usbnet *dev, u16 usbctl)
47729  {
47730  #ifdef DEBUG
47731 -       devdbg (dev, "net1080 %03d/%03d usbctl 0x%x:%s%s%s%s%s;"
47732 +       devdbg (dev, "net1080 %s-%s usbctl 0x%x:%s%s%s%s%s;"
47733                         " this%s%s;"
47734                         " other%s%s; r/o 0x%x",
47735 -               dev->udev->bus->busnum, dev->udev->devnum,
47736 +               dev->udev->bus->bus_name, dev->udev->devpath,
47737                 usbctl,
47738                 (usbctl & USBCTL_ENABLE_LANG) ? " lang" : "",
47739                 (usbctl & USBCTL_ENABLE_MFGR) ? " mfgr" : "",
47740 @@ -859,10 +924,10 @@
47741  static inline void nc_dump_status (struct usbnet *dev, u16 status)
47742  {
47743  #ifdef DEBUG
47744 -       devdbg (dev, "net1080 %03d/%03d status 0x%x:"
47745 +       devdbg (dev, "net1080 %s-%s status 0x%x:"
47746                         " this (%c) PKT=%d%s%s%s;"
47747                         " other PKT=%d%s%s%s; unspec 0x%x",
47748 -               dev->udev->bus->busnum, dev->udev->devnum,
47749 +               dev->udev->bus->bus_name, dev->udev->devpath,
47750                 status,
47751  
47752                 // XXX the packet counts don't seem right
47753 @@ -897,8 +962,8 @@
47754  static inline void nc_dump_ttl (struct usbnet *dev, u16 ttl)
47755  {
47756  #ifdef DEBUG
47757 -       devdbg (dev, "net1080 %03d/%03d ttl 0x%x this = %d, other = %d",
47758 -               dev->udev->bus->busnum, dev->udev->devnum,
47759 +       devdbg (dev, "net1080 %s-%s ttl 0x%x this = %d, other = %d",
47760 +               dev->udev->bus->bus_name, dev->udev->devpath,
47761                 ttl,
47762  
47763                 TTL_THIS (ttl),
47764 @@ -921,7 +986,8 @@
47765         // nc_dump_registers (dev);
47766  
47767         if ((retval = nc_register_read (dev, REG_STATUS, vp)) < 0) {
47768 -               dbg ("can't read dev %d status: %d", dev->udev->devnum, retval);
47769 +               dbg ("can't read %s-%s status: %d",
47770 +                       dev->udev->bus->bus_name, dev->udev->devpath, retval);
47771                 goto done;
47772         }
47773         status = *vp;
47774 @@ -948,10 +1014,11 @@
47775                         MK_TTL (NC_READ_TTL_MS, TTL_OTHER (ttl)) );
47776         dbg ("%s: assigned TTL, %d ms", dev->net.name, NC_READ_TTL_MS);
47777  
47778 -       devdbg (dev, "port %c, peer %sconnected",
47779 -               (status & STATUS_PORT_A) ? 'A' : 'B',
47780 -               (status & STATUS_CONN_OTHER) ? "" : "dis"
47781 -               );
47782 +       if (dev->msg_level >= 2)
47783 +               devinfo (dev, "port %c, peer %sconnected",
47784 +                       (status & STATUS_PORT_A) ? 'A' : 'B',
47785 +                       (status & STATUS_CONN_OTHER) ? "" : "dis"
47786 +                       );
47787         retval = 0;
47788  
47789  done:
47790 @@ -1079,15 +1146,15 @@
47791  }
47792  
47793  static const struct driver_info        net1080_info = {
47794 -       description:    "NetChip TurboCONNECT",
47795 -       flags:          FLAG_FRAMING_NC,
47796 -       reset:          net1080_reset,
47797 -       check_connect:  net1080_check_connect,
47798 -       rx_fixup:       net1080_rx_fixup,
47799 -       tx_fixup:       net1080_tx_fixup,
47800 +       .description =  "NetChip TurboCONNECT",
47801 +       .flags =        FLAG_FRAMING_NC,
47802 +       .reset =        net1080_reset,
47803 +       .check_connect =net1080_check_connect,
47804 +       .rx_fixup =     net1080_rx_fixup,
47805 +       .tx_fixup =     net1080_tx_fixup,
47806  
47807 -       in: 1, out: 1,          // direction distinguishes these
47808 -       epsize: 64,
47809 +       .in = 1, .out = 1,              // direction distinguishes these
47810 +       .epsize =64,
47811  };
47812  
47813  #endif /* CONFIG_USB_NET1080 */
47814 @@ -1147,24 +1214,14 @@
47815                 PL_S_EN|PL_RESET_OUT|PL_RESET_IN|PL_PEER_E);
47816  }
47817  
47818 -static int pl_check_connect (struct usbnet *dev)
47819 -{
47820 -       // FIXME test interrupt data PL_PEER_E bit
47821 -       // plus, there's some handshake done by
47822 -       // the prolific win32 driver... 
47823 -       dbg ("%s: assuming peer is connected", dev->net.name);
47824 -       return 0;
47825 -}
47826 -
47827  static const struct driver_info        prolific_info = {
47828 -       description:    "Prolific PL-2301/PL-2302",
47829 -       flags:          FLAG_NO_SETINT,
47830 +       .description =  "Prolific PL-2301/PL-2302",
47831 +       .flags =        FLAG_NO_SETINT,
47832                 /* some PL-2302 versions seem to fail usb_set_interface() */
47833 -       reset:          pl_reset,
47834 -       check_connect:  pl_check_connect,
47835 +       .reset =        pl_reset,
47836  
47837 -       in: 3, out: 2,
47838 -       epsize: 64,
47839 +       .in = 3, .out = 2,
47840 +       .epsize =64,
47841  };
47842  
47843  #endif /* CONFIG_USB_PL2301 */
47844 @@ -1227,6 +1284,21 @@
47845         spin_unlock_irqrestore (&dev->done.lock, flags);
47846  }
47847  
47848 +/* some work can't be done in tasklets, so we use keventd
47849 + *
47850 + * NOTE:  annoying asymmetry:  if it's active, schedule_task() fails,
47851 + * but tasklet_schedule() doesn't.  hope the failure is rare.
47852 + */
47853 +static void defer_kevent (struct usbnet *dev, int work)
47854 +{
47855 +       set_bit (work, &dev->flags);
47856 +       if (!schedule_task (&dev->kevent))
47857 +               err ("%s: kevent %d may have been dropped",
47858 +                       dev->net.name, work);
47859 +       else
47860 +               dbg ("%s: kevent %d scheduled", dev->net.name, work);
47861 +}
47862 +
47863  /*-------------------------------------------------------------------------*/
47864  
47865  static void rx_complete (struct urb *urb);
47866 @@ -1253,7 +1325,7 @@
47867  
47868         if ((skb = alloc_skb (size, flags)) == 0) {
47869                 dbg ("no rx skb");
47870 -               tasklet_schedule (&dev->bh);
47871 +               defer_kevent (dev, EVENT_RX_MEMORY);
47872                 usb_free_urb (urb);
47873                 return;
47874         }
47875 @@ -1268,9 +1340,6 @@
47876                 usb_rcvbulkpipe (dev->udev, dev->driver_info->in),
47877                 skb->data, size, rx_complete, skb);
47878         urb->transfer_flags |= USB_ASYNC_UNLINK;
47879 -#ifdef REALLY_QUEUE
47880 -       urb->transfer_flags |= USB_QUEUE_BULK;
47881 -#endif
47882  #if 0
47883         // Idle-but-posted reads with UHCI really chew up
47884         // PCI bandwidth unless FSBR is disabled
47885 @@ -1279,11 +1348,20 @@
47886  
47887         spin_lock_irqsave (&dev->rxq.lock, lockflags);
47888  
47889 -       if (netif_running (&dev->net)) {
47890 -               if ((retval = usb_submit_urb (urb)) != 0) {
47891 +       if (netif_running (&dev->net)
47892 +                       && !test_bit (EVENT_RX_HALT, &dev->flags)) {
47893 +               switch (retval = SUBMIT_URB (urb, GFP_ATOMIC)){ 
47894 +               case -EPIPE:
47895 +                       defer_kevent (dev, EVENT_RX_HALT);
47896 +                       break;
47897 +               case -ENOMEM:
47898 +                       defer_kevent (dev, EVENT_RX_MEMORY);
47899 +                       break;
47900 +               default:
47901                         dbg ("%s rx submit, %d", dev->net.name, retval);
47902                         tasklet_schedule (&dev->bh);
47903 -               } else {
47904 +                       break;
47905 +               case 0:
47906                         __skb_queue_tail (&dev->rxq, skb);
47907                 }
47908         } else {
47909 @@ -1357,12 +1435,20 @@
47910                 }
47911                 break;
47912  
47913 +           // stalls need manual reset. this is rare ... except that
47914 +           // when going through USB 2.0 TTs, unplug appears this way.
47915 +           // we avoid the highspeed version of the ETIMEOUT/EILSEQ
47916 +           // storm, recovering as needed.
47917 +           case -EPIPE:
47918 +               defer_kevent (dev, EVENT_RX_HALT);
47919 +               // FALLTHROUGH
47920 +
47921             // software-driven interface shutdown
47922 -           case -ECONNRESET:           // usb-ohci, usb-uhci
47923 -           case -ECONNABORTED:         // uhci ... for usb-uhci, INTR
47924 -               dbg ("%s shutdown, code %d", dev->net.name, urb_status);
47925 +           case -ECONNRESET:           // according to API spec
47926 +           case -ECONNABORTED:         // some (now fixed?) UHCI bugs
47927 +               dbg ("%s rx shutdown, code %d", dev->net.name, urb_status);
47928                 entry->state = rx_cleanup;
47929 -               // do urb frees only in the tasklet
47930 +               // do urb frees only in the tasklet (UHCI has oopsed ...)
47931                 entry->urb = urb;
47932                 urb = 0;
47933                 break;
47934 @@ -1373,8 +1459,9 @@
47935                 // FALLTHROUGH
47936             
47937             default:
47938 -               // on unplug we'll get a burst of ETIMEDOUT/EILSEQ
47939 -               // till the khubd gets and handles its interrupt.
47940 +               // on unplug we get ETIMEDOUT (ohci) or EILSEQ (uhci)
47941 +               // until khubd sees its interrupt and disconnects us.
47942 +               // that can easily be hundreds of passes through here.
47943                 entry->state = rx_cleanup;
47944                 dev->stats.rx_errors++;
47945                 dbg ("%s rx: status %d", dev->net.name, urb_status);
47946 @@ -1384,10 +1471,12 @@
47947         defer_bh (dev, skb);
47948  
47949         if (urb) {
47950 -               if (netif_running (&dev->net)) {
47951 +               if (netif_running (&dev->net)
47952 +                               && !test_bit (EVENT_RX_HALT, &dev->flags)) {
47953                         rx_submit (dev, urb, GFP_ATOMIC);
47954                         return;
47955                 }
47956 +               usb_free_urb (urb);
47957         }
47958  #ifdef VERBOSE
47959         dbg ("no read resubmitted");
47960 @@ -1417,7 +1506,7 @@
47961                 // during some PM-driven resume scenarios,
47962                 // these (async) unlinks complete immediately
47963                 retval = usb_unlink_urb (urb);
47964 -               if (retval < 0)
47965 +               if (retval != -EINPROGRESS && retval != 0)
47966                         dbg ("unlink urb err, %d", retval);
47967                 else
47968                         count++;
47969 @@ -1441,10 +1530,11 @@
47970         mutex_lock (&dev->mutex);
47971         netif_stop_queue (net);
47972  
47973 -       devdbg (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld",
47974 -               dev->stats.rx_packets, dev->stats.tx_packets, 
47975 -               dev->stats.rx_errors, dev->stats.tx_errors
47976 -               );
47977 +       if (dev->msg_level >= 2)
47978 +               devinfo (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld",
47979 +                       dev->stats.rx_packets, dev->stats.tx_packets, 
47980 +                       dev->stats.rx_errors, dev->stats.tx_errors
47981 +                       );
47982  
47983         // ensure there are no more active urbs
47984         add_wait_queue (&unlink_wakeup, &wait);
47985 @@ -1482,9 +1572,9 @@
47986  
47987         // put into "known safe" state
47988         if (info->reset && (retval = info->reset (dev)) < 0) {
47989 -               devinfo (dev, "open reset fail (%d) usbnet %03d/%03d, %s",
47990 +               devinfo (dev, "open reset fail (%d) usbnet usb-%s-%s, %s",
47991                         retval,
47992 -                       dev->udev->bus->busnum, dev->udev->devnum,
47993 +                       dev->udev->bus->bus_name, dev->udev->devpath,
47994                         info->description);
47995                 goto done;
47996         }
47997 @@ -1496,14 +1586,16 @@
47998         }
47999  
48000         netif_start_queue (net);
48001 -       devdbg (dev, "open: enable queueing (rx %d, tx %d) mtu %d %s framing",
48002 -               RX_QLEN, TX_QLEN, dev->net.mtu,
48003 -               (info->flags & (FLAG_FRAMING_NC | FLAG_FRAMING_GL))
48004 -                   ? ((info->flags & FLAG_FRAMING_NC)
48005 -                       ? "NetChip"
48006 -                       : "GeneSys")
48007 -                   : "raw"
48008 -               );
48009 +       if (dev->msg_level >= 2)
48010 +               devinfo (dev, "open: enable queueing "
48011 +                               "(rx %d, tx %d) mtu %d %s framing",
48012 +                       RX_QLEN, TX_QLEN, dev->net.mtu,
48013 +                       (info->flags & (FLAG_FRAMING_NC | FLAG_FRAMING_GL))
48014 +                           ? ((info->flags & FLAG_FRAMING_NC)
48015 +                               ? "NetChip"
48016 +                               : "GeneSys")
48017 +                           : "raw"
48018 +                       );
48019  
48020         // delay posting reads until we're fully open
48021         tasklet_schedule (&dev->bh);
48022 @@ -1514,16 +1606,134 @@
48023  
48024  /*-------------------------------------------------------------------------*/
48025  
48026 -/* usb_clear_halt cannot be called in interrupt context */
48027 +static int usbnet_ethtool_ioctl (struct net_device *net, void *useraddr)
48028 +{
48029 +       struct usbnet   *dev = (struct usbnet *) net->priv;
48030 +       u32             cmd;
48031 +
48032 +       if (get_user (cmd, (u32 *)useraddr))
48033 +               return -EFAULT;
48034 +       switch (cmd) {
48035 +
48036 +       case ETHTOOL_GDRVINFO: {        /* get driver info */
48037 +               struct ethtool_drvinfo          info;
48038 +
48039 +               memset (&info, 0, sizeof info);
48040 +               info.cmd = ETHTOOL_GDRVINFO;
48041 +               strncpy (info.driver, driver_name, sizeof info.driver);
48042 +               strncpy (info.version, DRIVER_VERSION, sizeof info.version);
48043 +               strncpy (info.fw_version, dev->driver_info->description,
48044 +                       sizeof info.fw_version);
48045 +               usb_make_path (dev->udev, info.bus_info, sizeof info.bus_info);
48046 +               if (copy_to_user (useraddr, &info, sizeof (info)))
48047 +                       return -EFAULT;
48048 +               return 0;
48049 +               }
48050 +
48051 +       case ETHTOOL_GLINK:             /* get link status */
48052 +               if (dev->driver_info->check_connect) {
48053 +                       struct ethtool_value    edata = { ETHTOOL_GLINK };
48054 +
48055 +                       edata.data = dev->driver_info->check_connect (dev) == 0;
48056 +                       if (copy_to_user (useraddr, &edata, sizeof (edata)))
48057 +                               return -EFAULT;
48058 +                       return 0;
48059 +               }
48060 +               break;
48061  
48062 +       case ETHTOOL_GMSGLVL: {         /* get message-level */
48063 +               struct ethtool_value    edata = {ETHTOOL_GMSGLVL};
48064 +
48065 +               edata.data = dev->msg_level;
48066 +               if (copy_to_user (useraddr, &edata, sizeof (edata)))
48067 +                       return -EFAULT;
48068 +               return 0;
48069 +               }
48070 +
48071 +       case ETHTOOL_SMSGLVL: {         /* set message-level */
48072 +               struct ethtool_value    edata;
48073 +
48074 +               if (copy_from_user (&edata, useraddr, sizeof (edata)))
48075 +                       return -EFAULT;
48076 +               dev->msg_level = edata.data;
48077 +               return 0;
48078 +               }
48079 +       
48080 +       /* could also map RINGPARAM to RX/TX QLEN */
48081 +
48082 +       }
48083 +        /* Note that the ethtool user space code requires EOPNOTSUPP */
48084 +       return -EOPNOTSUPP;
48085 +}
48086 +
48087 +static int usbnet_ioctl (struct net_device *net, struct ifreq *rq, int cmd)
48088 +{
48089 +       switch (cmd) {
48090 +       case SIOCETHTOOL:
48091 +               return usbnet_ethtool_ioctl (net, (void *)rq->ifr_data);
48092 +       default:
48093 +               return -EOPNOTSUPP;
48094 +       }
48095 +}
48096 +
48097 +/*-------------------------------------------------------------------------*/
48098 +
48099 +/* work that cannot be done in interrupt context uses keventd.
48100 + *
48101 + * NOTE:  "uhci" and "usb-uhci" may have trouble with this since they don't
48102 + * queue control transfers to individual devices, and other threads could
48103 + * trigger control requests concurrently.  hope that's rare.
48104 + */
48105  static void
48106 -tx_clear_halt (void *data)
48107 +kevent (void *data)
48108  {
48109         struct usbnet           *dev = data;
48110 +       int                     status;
48111  
48112 -       usb_clear_halt (dev->udev,
48113 -               usb_sndbulkpipe (dev->udev, dev->driver_info->out));
48114 -       netif_wake_queue (&dev->net);
48115 +       /* usb_clear_halt() needs a thread context */
48116 +       if (test_bit (EVENT_TX_HALT, &dev->flags)) {
48117 +               unlink_urbs (&dev->txq);
48118 +               status = usb_clear_halt (dev->udev,
48119 +                       usb_sndbulkpipe (dev->udev, dev->driver_info->out));
48120 +               if (status < 0)
48121 +                       err ("%s: can't clear tx halt, status %d",
48122 +                               dev->net.name, status);
48123 +               else {
48124 +                       clear_bit (EVENT_TX_HALT, &dev->flags);
48125 +                       netif_wake_queue (&dev->net);
48126 +               }
48127 +       }
48128 +       if (test_bit (EVENT_RX_HALT, &dev->flags)) {
48129 +               unlink_urbs (&dev->rxq);
48130 +               status = usb_clear_halt (dev->udev,
48131 +                       usb_rcvbulkpipe (dev->udev, dev->driver_info->in));
48132 +               if (status < 0)
48133 +                       err ("%s: can't clear rx halt, status %d",
48134 +                               dev->net.name, status);
48135 +               else {
48136 +                       clear_bit (EVENT_RX_HALT, &dev->flags);
48137 +                       tasklet_schedule (&dev->bh);
48138 +               }
48139 +       }
48140 +
48141 +       /* tasklet could resubmit itself forever if memory is tight */
48142 +       if (test_bit (EVENT_RX_MEMORY, &dev->flags)) {
48143 +               struct urb      *urb = 0;
48144 +
48145 +               if (netif_running (&dev->net))
48146 +                       urb = ALLOC_URB (0, GFP_KERNEL);
48147 +               else
48148 +                       clear_bit (EVENT_RX_MEMORY, &dev->flags);
48149 +               if (urb != 0) {
48150 +                       clear_bit (EVENT_RX_MEMORY, &dev->flags);
48151 +                       rx_submit (dev, urb, GFP_KERNEL);
48152 +                       tasklet_schedule (&dev->bh);
48153 +               }
48154 +       }
48155 +
48156 +       if (dev->flags)
48157 +               dbg ("%s: kevent done, flags = 0x%lx",
48158 +                       dev->net.name, dev->flags);
48159  }
48160  
48161  /*-------------------------------------------------------------------------*/
48162 @@ -1534,15 +1744,8 @@
48163         struct skb_data         *entry = (struct skb_data *) skb->cb;
48164         struct usbnet           *dev = entry->dev;
48165  
48166 -       if (urb->status == USB_ST_STALL) {
48167 -               if (dev->ctrl_task.sync == 0) {
48168 -                       dev->ctrl_task.routine = tx_clear_halt;
48169 -                       dev->ctrl_task.data = dev;
48170 -                       schedule_task (&dev->ctrl_task);
48171 -               } else {
48172 -                       dbg ("Cannot clear TX stall");
48173 -               }
48174 -       }
48175 +       if (urb->status == -EPIPE)
48176 +               defer_kevent (dev, EVENT_TX_HALT);
48177         urb->dev = 0;
48178         entry->state = tx_done;
48179         defer_bh (dev, skb);
48180 @@ -1576,19 +1779,17 @@
48181         struct nc_trailer       *trailer = 0;
48182  #endif /* CONFIG_USB_NET1080 */
48183  
48184 -       flags = in_interrupt () ? GFP_ATOMIC : GFP_NOIO; /* might be used for nfs */
48185 -
48186         // some devices want funky USB-level framing, for
48187         // win32 driver (usually) and/or hardware quirks
48188         if (info->tx_fixup) {
48189 -               skb = info->tx_fixup (dev, skb, flags);
48190 +               skb = info->tx_fixup (dev, skb, GFP_ATOMIC);
48191                 if (!skb) {
48192                         dbg ("can't tx_fixup skb");
48193                         goto drop;
48194                 }
48195         }
48196  
48197 -       if (!(urb = usb_alloc_urb (0))) {
48198 +       if (!(urb = ALLOC_URB (0, GFP_ATOMIC))) {
48199                 dbg ("no urb");
48200                 goto drop;
48201         }
48202 @@ -1621,9 +1822,6 @@
48203                         usb_sndbulkpipe (dev->udev, info->out),
48204                         skb->data, skb->len, tx_complete, skb);
48205         urb->transfer_flags |= USB_ASYNC_UNLINK;
48206 -#ifdef REALLY_QUEUE
48207 -       urb->transfer_flags |= USB_QUEUE_BULK;
48208 -#endif
48209         // FIXME urb->timeout = ... jiffies ... ;
48210  
48211         spin_lock_irqsave (&dev->txq.lock, flags);
48212 @@ -1640,15 +1838,19 @@
48213         }
48214  #endif /* CONFIG_USB_NET1080 */
48215  
48216 -       netif_stop_queue (net);
48217 -       if ((retval = usb_submit_urb (urb)) != 0) {
48218 -               netif_start_queue (net);
48219 +       switch ((retval = SUBMIT_URB (urb, GFP_ATOMIC))) {
48220 +       case -EPIPE:
48221 +               netif_stop_queue (net);
48222 +               defer_kevent (dev, EVENT_TX_HALT);
48223 +               break;
48224 +       default:
48225                 dbg ("%s tx: submit urb err %d", net->name, retval);
48226 -       } else {
48227 +               break;
48228 +       case 0:
48229                 net->trans_start = jiffies;
48230                 __skb_queue_tail (&dev->txq, skb);
48231 -               if (dev->txq.qlen < TX_QLEN)
48232 -                       netif_start_queue (net);
48233 +               if (dev->txq.qlen >= TX_QLEN)
48234 +                       netif_stop_queue (net);
48235         }
48236         spin_unlock_irqrestore (&dev->txq.lock, flags);
48237  
48238 @@ -1715,14 +1917,15 @@
48239                 }
48240  
48241         // or are we maybe short a few urbs?
48242 -       } else if (netif_running (&dev->net)) {
48243 +       } else if (netif_running (&dev->net)
48244 +                       && !test_bit (EVENT_RX_HALT, &dev->flags)) {
48245                 int     temp = dev->rxq.qlen;
48246  
48247                 if (temp < RX_QLEN) {
48248                         struct urb      *urb;
48249                         int             i;
48250                         for (i = 0; i < 3 && dev->rxq.qlen < RX_QLEN; i++) {
48251 -                               if ((urb = usb_alloc_urb (0)) != 0)
48252 +                               if ((urb = ALLOC_URB (0, GFP_ATOMIC)) != 0)
48253                                         rx_submit (dev, urb, GFP_ATOMIC);
48254                         }
48255                         if (temp != dev->rxq.qlen)
48256 @@ -1750,8 +1953,8 @@
48257  {
48258         struct usbnet   *dev = (struct usbnet *) ptr;
48259  
48260 -       devinfo (dev, "unregister usbnet %03d/%03d, %s",
48261 -               udev->bus->busnum, udev->devnum,
48262 +       devinfo (dev, "unregister usbnet usb-%s-%s, %s",
48263 +               udev->bus->bus_name, udev->devpath,
48264                 dev->driver_info->description);
48265         
48266         unregister_netdev (&dev->net);
48267 @@ -1761,8 +1964,11 @@
48268         list_del (&dev->dev_list);
48269         mutex_unlock (&usbnet_mutex);
48270  
48271 +       // assuming we used keventd, it must quiesce too
48272 +       flush_scheduled_tasks ();
48273 +
48274         kfree (dev);
48275 -       usb_dec_dev_use (udev);
48276 +       usb_put_dev (udev);
48277  }
48278  
48279  
48280 @@ -1808,15 +2014,17 @@
48281         memset (dev, 0, sizeof *dev);
48282  
48283         init_MUTEX_LOCKED (&dev->mutex);
48284 -       usb_inc_dev_use (udev);
48285 +       usb_get_dev (udev);
48286         dev->udev = udev;
48287         dev->driver_info = info;
48288 +       dev->msg_level = msg_level;
48289         INIT_LIST_HEAD (&dev->dev_list);
48290         skb_queue_head_init (&dev->rxq);
48291         skb_queue_head_init (&dev->txq);
48292         skb_queue_head_init (&dev->done);
48293         dev->bh.func = usbnet_bh;
48294         dev->bh.data = (unsigned long) dev;
48295 +       INIT_TQUEUE (&dev->kevent, kevent, dev);
48296  
48297         // set up network interface records
48298         net = &dev->net;
48299 @@ -1836,10 +2044,11 @@
48300         net->stop = usbnet_stop;
48301         net->watchdog_timeo = TX_TIMEOUT_JIFFIES;
48302         net->tx_timeout = usbnet_tx_timeout;
48303 +       net->do_ioctl = usbnet_ioctl;
48304  
48305         register_netdev (&dev->net);
48306 -       devinfo (dev, "register usbnet %03d/%03d, %s",
48307 -               udev->bus->busnum, udev->devnum,
48308 +       devinfo (dev, "register usbnet usb-%s-%s, %s",
48309 +               udev->bus->bus_name, udev->devpath,
48310                 dev->driver_info->description);
48311  
48312         // ok, it's ready to go.
48313 @@ -1867,33 +2076,41 @@
48314  #ifdef CONFIG_USB_AN2720
48315  {
48316         USB_DEVICE (0x0547, 0x2720),    // AnchorChips defaults
48317 -       driver_info:    (unsigned long) &an2720_info,
48318 -},
48319 -
48320 -{
48321 +       .driver_info =  (unsigned long) &an2720_info,
48322 +}, {
48323         USB_DEVICE (0x0547, 0x2727),    // Xircom PGUNET
48324 -       driver_info:    (unsigned long) &an2720_info,
48325 +       .driver_info =  (unsigned long) &an2720_info,
48326  },
48327  #endif
48328  
48329  #ifdef CONFIG_USB_BELKIN
48330  {
48331         USB_DEVICE (0x050d, 0x0004),    // Belkin
48332 -       driver_info:    (unsigned long) &belkin_info,
48333 +       .driver_info =  (unsigned long) &belkin_info,
48334  }, {
48335         USB_DEVICE (0x056c, 0x8100),    // eTEK
48336 -       driver_info:    (unsigned long) &belkin_info,
48337 +       .driver_info =  (unsigned long) &belkin_info,
48338  }, {
48339         USB_DEVICE (0x0525, 0x9901),    // Advance USBNET (eTEK)
48340 -       driver_info:    (unsigned long) &belkin_info,
48341 +       .driver_info =  (unsigned long) &belkin_info,
48342 +},
48343 +#endif
48344 +
48345 +#ifdef CONFIG_USB_EPSON2888
48346 +{
48347 +       USB_DEVICE (0x0525, 0x2888),    // EPSON USB client
48348 +       driver_info:    (unsigned long) &epson2888_info,
48349  },
48350  #endif
48351  
48352  #ifdef CONFIG_USB_GENESYS
48353  {
48354         USB_DEVICE (0x05e3, 0x0502),    // GL620USB-A
48355 -       driver_info:    (unsigned long) &genelink_info,
48356 +       .driver_info =  (unsigned long) &genelink_info,
48357  },
48358 +       /* NOT: USB_DEVICE (0x05e3, 0x0501),    // GL620USB
48359 +        * that's half duplex, not currently supported
48360 +        */
48361  #endif
48362  
48363  #ifdef CONFIG_USB_LINUXDEV
48364 @@ -1904,28 +2121,32 @@
48365  {
48366         // 1183 = 0x049F, both used as hex values?
48367         USB_DEVICE (0x049F, 0x505A),    // Compaq "Itsy"
48368 -       driver_info:    (unsigned long) &linuxdev_info,
48369 +       .driver_info =  (unsigned long) &linuxdev_info,
48370 +}, {
48371 +       USB_DEVICE (0x0E7E, 0x1001),    // G.Mate "Yopy"
48372 +       .driver_info =  (unsigned long) &linuxdev_info,
48373  },
48374 +       // NOTE:  the Sharp Zaurus uses a modified version of
48375 +       // this driver, which is not interoperable with this.
48376  #endif
48377  
48378  #ifdef CONFIG_USB_NET1080
48379  {
48380         USB_DEVICE (0x0525, 0x1080),    // NetChip ref design
48381 -       driver_info:    (unsigned long) &net1080_info,
48382 -},
48383 -{
48384 +       .driver_info =  (unsigned long) &net1080_info,
48385 +}, {
48386         USB_DEVICE (0x06D0, 0x0622),    // Laplink Gold
48387 -       driver_info:    (unsigned long) &net1080_info,
48388 +       .driver_info =  (unsigned long) &net1080_info,
48389  },
48390  #endif
48391  
48392  #ifdef CONFIG_USB_PL2301
48393  {
48394         USB_DEVICE (0x067b, 0x0000),    // PL-2301
48395 -       driver_info:    (unsigned long) &prolific_info,
48396 +       .driver_info =  (unsigned long) &prolific_info,
48397  }, {
48398         USB_DEVICE (0x067b, 0x0001),    // PL-2302
48399 -       driver_info:    (unsigned long) &prolific_info,
48400 +       .driver_info =  (unsigned long) &prolific_info,
48401  },
48402  #endif
48403  
48404 @@ -1936,10 +2157,10 @@
48405  MODULE_DEVICE_TABLE (usb, products);
48406  
48407  static struct usb_driver usbnet_driver = {
48408 -       name:           "usbnet",
48409 -       id_table:       products,
48410 -       probe:          usbnet_probe,
48411 -       disconnect:     usbnet_disconnect,
48412 +       .name =         driver_name,
48413 +       .id_table =     products,
48414 +       .probe =        usbnet_probe,
48415 +       .disconnect =   usbnet_disconnect,
48416  };
48417  
48418  /*-------------------------------------------------------------------------*/
48419 @@ -1952,6 +2173,7 @@
48420  
48421         get_random_bytes (node_id, sizeof node_id);
48422         node_id [0] &= 0xfe;    // clear multicast bit
48423 +       node_id [0] |= 0x02;    // set local assignment bit (IEEE802)
48424  
48425         if (usb_register (&usbnet_driver) < 0)
48426                 return -1;
48427 diff -Nur linux-2.4.19.org/drivers/usb/usbvideo.c linux-2.4.19/drivers/usb/usbvideo.c
48428 --- linux-2.4.19.org/drivers/usb/usbvideo.c     Sat Aug  3 02:39:45 2002
48429 +++ linux-2.4.19/drivers/usb/usbvideo.c Thu Oct 31 08:11:28 2002
48430 @@ -58,57 +58,26 @@
48431  /* Memory management functions */
48432  /*******************************/
48433  
48434 -#define MDEBUG(x)      do { } while(0)         /* Debug memory management */
48435 -
48436 -/* Given PGD from the address space's page table, return the kernel
48437 - * virtual mapping of the physical memory mapped at ADR.
48438 - */
48439 -unsigned long usbvideo_uvirt_to_kva(pgd_t *pgd, unsigned long adr)
48440 -{
48441 -       unsigned long ret = 0UL;
48442 -       pmd_t *pmd;
48443 -       pte_t *ptep, pte;
48444 -
48445 -       if (!pgd_none(*pgd)) {
48446 -               pmd = pmd_offset(pgd, adr);
48447 -               if (!pmd_none(*pmd)) {
48448 -                       ptep = pte_offset(pmd, adr);
48449 -                       pte = *ptep;
48450 -                       if (pte_present(pte)) {
48451 -                               ret = (unsigned long) page_address(pte_page(pte));
48452 -                               ret |= (adr & (PAGE_SIZE-1));
48453 -                       }
48454 -               }
48455 -       }
48456 -       MDEBUG(printk("uv2kva(%lx-->%lx)", adr, ret));
48457 -       return ret;
48458 -}
48459 -
48460  /*
48461   * Here we want the physical address of the memory.
48462 - * This is used when initializing the contents of the
48463 - * area and marking the pages as reserved.
48464 + * This is used when initializing the contents of the area.
48465   */
48466  unsigned long usbvideo_kvirt_to_pa(unsigned long adr)
48467  {
48468 -       unsigned long va, kva, ret;
48469 +       unsigned long kva, ret;
48470  
48471 -       va = VMALLOC_VMADDR(adr);
48472 -       kva = usbvideo_uvirt_to_kva(pgd_offset_k(va), va);
48473 +       kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
48474 +       kva |= adr & (PAGE_SIZE-1); /* restore the offset */
48475         ret = __pa(kva);
48476 -       MDEBUG(printk("kv2pa(%lx-->%lx)", adr, ret));
48477         return ret;
48478  }
48479  
48480  void *usbvideo_rvmalloc(unsigned long size)
48481  {
48482         void *mem;
48483 -       unsigned long adr, page;
48484 -
48485 -       /* Round it off to PAGE_SIZE */
48486 -       size += (PAGE_SIZE - 1);
48487 -       size &= ~(PAGE_SIZE - 1);
48488 +       unsigned long adr;
48489  
48490 +       size = PAGE_ALIGN(size);
48491         mem = vmalloc_32(size);
48492         if (!mem)
48493                 return NULL;
48494 @@ -116,13 +85,9 @@
48495         memset(mem, 0, size); /* Clear the ram out, no junk to the user */
48496         adr = (unsigned long) mem;
48497         while (size > 0) {
48498 -               page = usbvideo_kvirt_to_pa(adr);
48499 -               mem_map_reserve(virt_to_page(__va(page)));
48500 +               mem_map_reserve(vmalloc_to_page((void *)adr));
48501                 adr += PAGE_SIZE;
48502 -               if (size > PAGE_SIZE)
48503 -                       size -= PAGE_SIZE;
48504 -               else
48505 -                       size = 0;
48506 +               size -= PAGE_SIZE;
48507         }
48508  
48509         return mem;
48510 @@ -130,23 +95,16 @@
48511  
48512  void usbvideo_rvfree(void *mem, unsigned long size)
48513  {
48514 -       unsigned long adr, page;
48515 +       unsigned long adr;
48516  
48517         if (!mem)
48518                 return;
48519  
48520 -       size += (PAGE_SIZE - 1);
48521 -       size &= ~(PAGE_SIZE - 1);
48522 -
48523 -       adr=(unsigned long) mem;
48524 -       while (size > 0) {
48525 -               page = usbvideo_kvirt_to_pa(adr);
48526 -               mem_map_unreserve(virt_to_page(__va(page)));
48527 +       adr = (unsigned long) mem;
48528 +       while ((long) size > 0) {
48529 +               mem_map_unreserve(vmalloc_to_page((void *)adr));
48530                 adr += PAGE_SIZE;
48531 -               if (size > PAGE_SIZE)
48532 -                       size -= PAGE_SIZE;
48533 -               else
48534 -                       size = 0;
48535 +               size -= PAGE_SIZE;
48536         }
48537         vfree(mem);
48538  }
48539 @@ -1782,7 +1740,7 @@
48540  /*
48541   * Make all of the blocks of data contiguous
48542   */
48543 -static int usbvideo_CompressIsochronous(uvd_t *uvd, urb_t *urb)
48544 +static int usbvideo_CompressIsochronous(uvd_t *uvd, struct urb *urb)
48545  {
48546         char *cdata;
48547         int i, totlen = 0;
48548 @@ -1897,7 +1855,7 @@
48549         /* We double buffer the Iso lists */
48550         for (i=0; i < USBVIDEO_NUMSBUF; i++) {
48551                 int j, k;
48552 -               urb_t *urb = uvd->sbuf[i].urb;
48553 +               struct urb *urb = uvd->sbuf[i].urb;
48554                 urb->dev = dev;
48555                 urb->context = uvd;
48556                 urb->pipe = usb_rcvisocpipe(dev, uvd->video_endp);
48557 diff -Nur linux-2.4.19.org/drivers/usb/usbvideo.h linux-2.4.19/drivers/usb/usbvideo.h
48558 --- linux-2.4.19.org/drivers/usb/usbvideo.h     Thu Oct 11 08:42:46 2001
48559 +++ linux-2.4.19/drivers/usb/usbvideo.h Thu Oct 31 08:11:28 2002
48560 @@ -165,7 +165,7 @@
48561  /* This structure represents one Isoc request - URB and buffer */
48562  typedef struct {
48563         char *data;
48564 -       urb_t *urb;
48565 +       struct urb *urb;
48566  } usbvideo_sbuf_t;
48567  
48568  typedef struct {
48569 diff -Nur linux-2.4.19.org/drivers/usb/vicam.c linux-2.4.19/drivers/usb/vicam.c
48570 --- linux-2.4.19.org/drivers/usb/vicam.c        Sat Aug  3 02:39:45 2002
48571 +++ linux-2.4.19/drivers/usb/vicam.c    Thu Oct 31 08:11:28 2002
48572 @@ -91,80 +91,25 @@
48573   *
48574   ******************************************************************************/
48575  
48576 -/* [DaveM] I've recoded most of this so that:
48577 - * 1) It's easier to tell what is happening
48578 - * 2) It's more portable, especially for translating things
48579 - *    out of vmalloc mapped areas in the kernel.
48580 - * 3) Less unnecessary translations happen.
48581 - *
48582 - * The code used to assume that the kernel vmalloc mappings
48583 - * existed in the page tables of every process, this is simply
48584 - * not guarenteed.  We now use pgd_offset_k which is the
48585 - * defined way to get at the kernel page tables.
48586 - */
48587 -
48588 -/* Given PGD from the address space's page table, return the kernel
48589 - * virtual mapping of the physical memory mapped at ADR.
48590 - */
48591 -static inline unsigned long uvirt_to_kva(pgd_t *pgd, unsigned long adr)
48592 -{
48593 -       unsigned long ret = 0UL;
48594 -       pmd_t *pmd;
48595 -       pte_t *ptep, pte;
48596 -
48597 -       if (!pgd_none(*pgd)) {
48598 -               pmd = pmd_offset(pgd, adr);
48599 -               if (!pmd_none(*pmd)) {
48600 -                       ptep = pte_offset(pmd, adr);
48601 -                       pte = *ptep;
48602 -                       if(pte_present(pte)) {
48603 -                               ret  = (unsigned long) page_address(pte_page(pte));
48604 -                               ret |= (adr & (PAGE_SIZE - 1));
48605 -
48606 -                       }
48607 -               }
48608 -       }
48609 -       return ret;
48610 -}
48611 -
48612 -static inline unsigned long uvirt_to_bus(unsigned long adr)
48613 -{
48614 -       unsigned long kva, ret;
48615 -
48616 -       kva = uvirt_to_kva(pgd_offset(current->mm, adr), adr);
48617 -       ret = virt_to_bus((void *)kva);
48618 -       return ret;
48619 -}
48620 -
48621 -static inline unsigned long kvirt_to_bus(unsigned long adr)
48622 -{
48623 -       unsigned long va, kva, ret;
48624 -
48625 -       va = VMALLOC_VMADDR(adr);
48626 -       kva = uvirt_to_kva(pgd_offset_k(va), va);
48627 -       ret = virt_to_bus((void *)kva);
48628 -       return ret;
48629 -}
48630 -
48631  /* Here we want the physical address of the memory.
48632 - * This is used when initializing the contents of the
48633 - * area and marking the pages as reserved.
48634 + * This is used when initializing the contents of the area.
48635   */
48636  static inline unsigned long kvirt_to_pa(unsigned long adr)
48637  {
48638 -       unsigned long va, kva, ret;
48639 +       unsigned long kva, ret;
48640  
48641 -       va = VMALLOC_VMADDR(adr);
48642 -       kva = uvirt_to_kva(pgd_offset_k(va), va);
48643 +       kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
48644 +       kva |= adr & (PAGE_SIZE-1); /* restore the offset */
48645         ret = __pa(kva);
48646         return ret;
48647  }
48648  
48649 -static void * rvmalloc(signed long size)
48650 +static void * rvmalloc(unsigned long size)
48651  {
48652         void * mem;
48653 -       unsigned long adr, page;
48654 +       unsigned long adr;
48655  
48656 +       size=PAGE_ALIGN(size);
48657         mem=vmalloc_32(size);
48658         if (mem)
48659         {
48660 @@ -172,8 +117,7 @@
48661                 adr=(unsigned long) mem;
48662                 while (size > 0)
48663                 {
48664 -                       page = kvirt_to_pa(adr);
48665 -                       mem_map_reserve(virt_to_page(__va(page)));
48666 +                       mem_map_reserve(vmalloc_to_page((void *)adr));
48667                         adr+=PAGE_SIZE;
48668                         size-=PAGE_SIZE;
48669                 }
48670 @@ -181,17 +125,16 @@
48671         return mem;
48672  }
48673  
48674 -static void rvfree(void * mem, signed long size)
48675 +static void rvfree(void * mem, unsigned long size)
48676  {
48677 -       unsigned long adr, page;
48678 +       unsigned long adr;
48679  
48680         if (mem)
48681         {
48682                 adr=(unsigned long) mem;
48683 -               while (size > 0)
48684 +               while ((long) size > 0)
48685                 {
48686 -                       page = kvirt_to_pa(adr);
48687 -                       mem_map_unreserve(virt_to_page(__va(page)));
48688 +                       mem_map_unreserve(vmalloc_to_page((void *)adr));
48689                         adr+=PAGE_SIZE;
48690                         size-=PAGE_SIZE;
48691                 }
48692 @@ -532,7 +475,9 @@
48693  
48694         if (!vdev || !buf)
48695                 return -EFAULT;
48696 -
48697 +       
48698 +       if(buflen > 0x1e480)
48699 +               buflen = 0x1e480;
48700         if (copy_to_user(user_buf, buf2, buflen))
48701                 return -EFAULT;
48702         return buflen;
48703 @@ -866,7 +811,7 @@
48704         return 1;
48705  }
48706  
48707 -static void * __devinit vicam_probe(struct usb_device *udev, unsigned int ifnum,
48708 +static void * vicam_probe(struct usb_device *udev, unsigned int ifnum,
48709         const struct usb_device_id *id)
48710  {
48711         struct usb_vicam *vicam;
48712 diff -Nur linux-2.4.19.org/drivers/usb/vicam.h linux-2.4.19/drivers/usb/vicam.h
48713 --- linux-2.4.19.org/drivers/usb/vicam.h        Mon Feb 25 20:38:07 2002
48714 +++ linux-2.4.19/drivers/usb/vicam.h    Thu Oct 31 08:11:28 2002
48715 @@ -68,7 +68,7 @@
48716         /* v4l stuff */
48717         char *camera_name;
48718         char *fbuf;
48719 -       urb_t *urb[VICAM_NUMSBUF];
48720 +       struct urb *urb[VICAM_NUMSBUF];
48721         int sizes;
48722         int *width;
48723         int *height;
48724 diff -Nur linux-2.4.19.org/drivers/usb/vicamurbs.h linux-2.4.19/drivers/usb/vicamurbs.h
48725 --- linux-2.4.19.org/drivers/usb/vicamurbs.h    Mon Feb 25 20:38:07 2002
48726 +++ linux-2.4.19/drivers/usb/vicamurbs.h        Thu Oct 31 08:11:28 2002
48727 @@ -17,12 +17,6 @@
48728  
48729  /* Request 0x51 Image Setup */
48730  
48731 -/* 128x98 ? 0x3180 size */
48732 -static unsigned char s128x98bw[] = {
48733 -  0,    0x34, 0xC4, 0x00, 0x00, 0x00, 0,    0,
48734 -  0x18, 0x02, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00
48735 -};
48736 -
48737  /* 128x122 3D80 size */
48738  static unsigned char s128x122bw[] = {
48739    0,    0x34, 0xF4, 0x00, 0x00, 0x00, 0,    0,
48740 diff -Nur linux-2.4.19.org/drivers/usb/wacom.c linux-2.4.19/drivers/usb/wacom.c
48741 --- linux-2.4.19.org/drivers/usb/wacom.c        Sat Aug  3 02:39:45 2002
48742 +++ linux-2.4.19/drivers/usb/wacom.c    Thu Oct 31 08:11:28 2002
48743 @@ -111,7 +111,6 @@
48744         struct wacom_features *features;
48745         int tool[2];
48746         int open;
48747 -       int x, y;
48748         __u32 serial[2];
48749  };
48750  
48751 @@ -209,16 +208,16 @@
48752                         input_report_abs(dev, ABS_DISTANCE, data[7]);
48753                         input_report_rel(dev, REL_WHEEL, (signed char) data[6]);
48754  
48755 -                       input_report_abs(dev, ABS_X, wacom->x = x);
48756 -                       input_report_abs(dev, ABS_Y, wacom->y = y);
48757 +                       input_report_abs(dev, ABS_X, x);
48758 +                       input_report_abs(dev, ABS_Y, y);
48759  
48760                         input_event(dev, EV_MSC, MSC_SERIAL, data[1] & 0x01);
48761                         return;
48762         }
48763  
48764         if (data[1] & 0x80) {
48765 -               input_report_abs(dev, ABS_X, wacom->x = x);
48766 -               input_report_abs(dev, ABS_Y, wacom->y = y);
48767 +               input_report_abs(dev, ABS_X, x);
48768 +               input_report_abs(dev, ABS_Y, y);
48769         }
48770  
48771         input_report_abs(dev, ABS_PRESSURE, data[6] | ((__u32)data[7] << 8));
48772 @@ -236,7 +235,6 @@
48773         struct input_dev *dev = &wacom->dev;
48774         unsigned int t;
48775         int idx;
48776 -       int x, y; 
48777  
48778         if (urb->status) return;
48779  
48780 @@ -285,11 +283,8 @@
48781                 return;
48782         }
48783  
48784 -       x = ((__u32)data[2] << 8) | data[3];
48785 -       y = ((__u32)data[4] << 8) | data[5];
48786 -       
48787 -       input_report_abs(dev, ABS_X, wacom->x);
48788 -       input_report_abs(dev, ABS_Y, wacom->y);
48789 +       input_report_abs(dev, ABS_X, ((__u32)data[2] << 8) | data[3]);
48790 +       input_report_abs(dev, ABS_Y, ((__u32)data[4] << 8) | data[5]);
48791         input_report_abs(dev, ABS_DISTANCE, data[9] >> 4);
48792         
48793         if ((data[1] & 0xb8) == 0xa0) {                                         /* general pen packet */
This page took 6.672798 seconds and 3 git commands to generate.