4 * Copyright (c) 1999 Armin Fuerst <fuerst@in.tum.de>
5 * Copyright (c) 1999 Pavel Machek <pavel@suse.cz>
6 * Copyright (c) 1999 Johannes Erdfelt <johannes@erdfelt.com>
7 * Copyright (c) 2000 Vojtech Pavlik <vojtech@suse.cz>
9 * USB Abstract Control Model driver for USB modems and ISDN adapters
14 * v0.9 - thorough cleaning, URBification, almost a rewrite
15 * v0.10 - some more cleanups
16 * v0.11 - fixed flow control, read error doesn't stop reads
17 * v0.12 - added TIOCM ioctls, added break handling, made struct acm kmalloced
18 * v0.13 - added termios, added hangup
19 * v0.14 - sized down struct acm
20 * v0.15 - fixed flow control again - characters could be lost
21 * v0.16 - added code for modems with swapped data and control interfaces
22 * v0.17 - added new style probing
23 * v0.18 - fixed new style probing for devices with more configurations
24 * v0.19 - fixed CLOCAL handling (thanks to Richard Shih-Ping Chan)
25 * v0.20 - switched to probing on interface (rather than device) class
26 * v0.21 - revert to probing on device for devices with multiple configs
27 * v0.22 - probe only the control interface. if usbcore doesn't choose the
28 * config we want, sysadmin changes bConfigurationValue in sysfs.
29 * v0.23 - use softirq for rx processing, as needed by tty layer
30 * v0.24 - change probe method to evaluate CDC union descriptor
34 * This program is free software; you can redistribute it and/or modify
35 * it under the terms of the GNU General Public License as published by
36 * the Free Software Foundation; either version 2 of the License, or
37 * (at your option) any later version.
39 * This program is distributed in the hope that it will be useful,
40 * but WITHOUT ANY WARRANTY; without even the implied warranty of
41 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42 * GNU General Public License for more details.
44 * You should have received a copy of the GNU General Public License
45 * along with this program; if not, write to the Free Software
46 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
51 #include <linux/kernel.h>
52 #include <linux/errno.h>
53 #include <linux/init.h>
54 #include <linux/slab.h>
55 #include <linux/tty.h>
56 #include <linux/tty_driver.h>
57 #include <linux/tty_flip.h>
58 #include <linux/module.h>
59 #include <linux/smp_lock.h>
60 #include <asm/uaccess.h>
61 #include <linux/usb.h>
62 #include <asm/byteorder.h>
69 #define DRIVER_VERSION "v0.23"
70 #define DRIVER_AUTHOR "Armin Fuerst, Pavel Machek, Johannes Erdfelt, Vojtech Pavlik"
71 #define DRIVER_DESC "USB Abstract Control Model driver for USB modems and ISDN adapters"
73 static struct usb_driver acm_driver;
74 static struct tty_driver *acm_tty_driver;
75 static struct acm *acm_table[ACM_TTY_MINORS];
77 static DECLARE_MUTEX(open_sem);
79 #define ACM_READY(acm) (acm && acm->dev && acm->used)
82 * Functions for ACM control messages.
85 static int acm_ctrl_msg(struct acm *acm, int request, int value, void *buf, int len)
87 int retval = usb_control_msg(acm->dev, usb_sndctrlpipe(acm->dev, 0),
88 request, USB_RT_ACM, value,
89 acm->control->altsetting[0].desc.bInterfaceNumber,
91 dbg("acm_control_msg: rq: 0x%02x val: %#x len: %#x result: %d", request, value, len, retval);
92 return retval < 0 ? retval : 0;
95 /* devices aren't required to support these requests.
96 * the cdc acm descriptor tells whether they do...
98 #define acm_set_control(acm, control) acm_ctrl_msg(acm, ACM_REQ_SET_CONTROL, control, NULL, 0)
99 #define acm_set_line(acm, line) acm_ctrl_msg(acm, ACM_REQ_SET_LINE, 0, line, sizeof(struct acm_line))
100 #define acm_send_break(acm, ms) acm_ctrl_msg(acm, ACM_REQ_SEND_BREAK, ms, NULL, 0)
103 * Interrupt handlers for various ACM device responses
106 /* control interface reports status changes with "interrupt" transfers */
107 static void acm_ctrl_irq(struct urb *urb, struct pt_regs *regs)
109 struct acm *acm = urb->context;
110 struct usb_ctrlrequest *dr = urb->transfer_buffer;
111 unsigned char *data = (unsigned char *)(dr + 1);
115 switch (urb->status) {
122 /* this urb is terminated, clean up */
123 dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
126 dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
133 switch (dr->bRequest) {
135 case ACM_IRQ_NETWORK:
137 dbg("%s network", dr->wValue ? "connected to" : "disconnected from");
140 case ACM_IRQ_LINE_STATE:
142 newctrl = le16_to_cpup((__u16 *) data);
144 if (acm->tty && !acm->clocal && (acm->ctrlin & ~newctrl & ACM_CTRL_DCD)) {
145 dbg("calling hangup");
146 tty_hangup(acm->tty);
149 acm->ctrlin = newctrl;
151 dbg("input control lines: dcd%c dsr%c break%c ring%c framing%c parity%c overrun%c",
152 acm->ctrlin & ACM_CTRL_DCD ? '+' : '-', acm->ctrlin & ACM_CTRL_DSR ? '+' : '-',
153 acm->ctrlin & ACM_CTRL_BRK ? '+' : '-', acm->ctrlin & ACM_CTRL_RI ? '+' : '-',
154 acm->ctrlin & ACM_CTRL_FRAMING ? '+' : '-', acm->ctrlin & ACM_CTRL_PARITY ? '+' : '-',
155 acm->ctrlin & ACM_CTRL_OVERRUN ? '+' : '-');
160 dbg("unknown control event received: request %d index %d len %d data0 %d data1 %d",
161 dr->bRequest, dr->wIndex, dr->wLength, data[0], data[1]);
165 status = usb_submit_urb (urb, GFP_ATOMIC);
167 err ("%s - usb_submit_urb failed with result %d",
168 __FUNCTION__, status);
171 /* data interface returns incoming bytes, or we got unthrottled */
172 static void acm_read_bulk(struct urb *urb, struct pt_regs *regs)
174 struct acm *acm = urb->context;
180 dev_dbg(&acm->data->dev, "bulk rx status %d\n", urb->status);
182 /* calling tty_flip_buffer_push() in_irq() isn't allowed */
183 tasklet_schedule(&acm->bh);
186 static void acm_rx_tasklet(unsigned long _acm)
188 struct acm *acm = (void *)_acm;
189 struct urb *urb = acm->readurb;
190 struct tty_struct *tty = acm->tty;
191 unsigned char *data = urb->transfer_buffer;
194 if (urb->actual_length > 0 && !acm->throttle) {
195 for (i = 0; i < urb->actual_length && !acm->throttle; i++) {
196 /* if we insert more than TTY_FLIPBUF_SIZE characters,
198 if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
199 tty_flip_buffer_push(tty);
201 tty_insert_flip_char(tty, data[i], 0);
203 tty_flip_buffer_push(tty);
207 memmove(data, data + i, urb->actual_length - i);
208 urb->actual_length -= i;
212 urb->actual_length = 0;
215 i = usb_submit_urb(urb, GFP_ATOMIC);
217 dev_dbg(&acm->data->dev, "bulk rx resubmit %d\n", i);
220 /* data interface wrote those outgoing bytes */
221 static void acm_write_bulk(struct urb *urb, struct pt_regs *regs)
223 struct acm *acm = (struct acm *)urb->context;
229 dbg("nonzero write bulk status received: %d", urb->status);
231 schedule_work(&acm->work);
233 acm->ready_for_write = 1;
236 static void acm_softint(void *private)
238 struct acm *acm = private;
239 struct tty_struct *tty = acm->tty;
244 if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup)
245 (tty->ldisc.write_wakeup)(tty);
247 wake_up_interruptible(&tty->write_wait);
254 static int acm_tty_open(struct tty_struct *tty, struct file *filp)
256 struct acm *acm = acm_table[tty->index];
258 if (!acm || !acm->dev)
261 tty->driver_data = acm;
270 acm->ctrlurb->dev = acm->dev;
271 if (usb_submit_urb(acm->ctrlurb, GFP_KERNEL)) {
272 dbg("usb_submit_urb(ctrl irq) failed");
276 acm->readurb->dev = acm->dev;
277 if (usb_submit_urb(acm->readurb, GFP_KERNEL)) {
278 dbg("usb_submit_urb(read bulk) failed");
279 goto bail_out_and_unlink;
282 acm_set_control(acm, acm->ctrlout = ACM_CTRL_DTR | ACM_CTRL_RTS);
284 /* force low_latency on so that our tty_push actually forces the data through,
285 otherwise it is scheduled, and with high data rates data can get lost. */
286 tty->low_latency = 1;
294 usb_unlink_urb(acm->ctrlurb);
300 static void acm_tty_close(struct tty_struct *tty, struct file *filp)
302 struct acm *acm = tty->driver_data;
304 if (!acm || !acm->used)
310 acm_set_control(acm, acm->ctrlout = 0);
311 usb_unlink_urb(acm->ctrlurb);
312 usb_unlink_urb(acm->writeurb);
313 usb_unlink_urb(acm->readurb);
315 tty_unregister_device(acm_tty_driver, acm->minor);
316 acm_table[acm->minor] = NULL;
317 usb_free_urb(acm->ctrlurb);
318 usb_free_urb(acm->readurb);
319 usb_free_urb(acm->writeurb);
326 static int acm_tty_write(struct tty_struct *tty, int from_user, const unsigned char *buf, int count)
328 struct acm *acm = tty->driver_data;
333 if (!acm->ready_for_write)
338 count = (count > acm->writesize) ? acm->writesize : count;
341 if (copy_from_user(acm->writeurb->transfer_buffer, (void __user *)buf, count))
344 memcpy(acm->writeurb->transfer_buffer, buf, count);
346 acm->writeurb->transfer_buffer_length = count;
347 acm->writeurb->dev = acm->dev;
349 acm->ready_for_write = 0;
350 stat = usb_submit_urb(acm->writeurb, GFP_NOIO);
352 dbg("usb_submit_urb(write bulk) failed");
353 acm->ready_for_write = 1;
360 static int acm_tty_write_room(struct tty_struct *tty)
362 struct acm *acm = tty->driver_data;
365 return !acm->ready_for_write ? 0 : acm->writesize;
368 static int acm_tty_chars_in_buffer(struct tty_struct *tty)
370 struct acm *acm = tty->driver_data;
373 return !acm->ready_for_write ? acm->writeurb->transfer_buffer_length : 0;
376 static void acm_tty_throttle(struct tty_struct *tty)
378 struct acm *acm = tty->driver_data;
384 static void acm_tty_unthrottle(struct tty_struct *tty)
386 struct acm *acm = tty->driver_data;
390 if (acm->readurb->status != -EINPROGRESS)
391 acm_read_bulk(acm->readurb, NULL);
394 static void acm_tty_break_ctl(struct tty_struct *tty, int state)
396 struct acm *acm = tty->driver_data;
399 if (acm_send_break(acm, state ? 0xffff : 0))
400 dbg("send break failed");
403 static int acm_tty_tiocmget(struct tty_struct *tty, struct file *file)
405 struct acm *acm = tty->driver_data;
410 return (acm->ctrlout & ACM_CTRL_DTR ? TIOCM_DTR : 0) |
411 (acm->ctrlout & ACM_CTRL_RTS ? TIOCM_RTS : 0) |
412 (acm->ctrlin & ACM_CTRL_DSR ? TIOCM_DSR : 0) |
413 (acm->ctrlin & ACM_CTRL_RI ? TIOCM_RI : 0) |
414 (acm->ctrlin & ACM_CTRL_DCD ? TIOCM_CD : 0) |
418 static int acm_tty_tiocmset(struct tty_struct *tty, struct file *file,
419 unsigned int set, unsigned int clear)
421 struct acm *acm = tty->driver_data;
422 unsigned int newctrl;
427 newctrl = acm->ctrlout;
428 set = (set & TIOCM_DTR ? ACM_CTRL_DTR : 0) | (set & TIOCM_RTS ? ACM_CTRL_RTS : 0);
429 clear = (clear & TIOCM_DTR ? ACM_CTRL_DTR : 0) | (clear & TIOCM_RTS ? ACM_CTRL_RTS : 0);
431 newctrl = (newctrl & ~clear) | set;
433 if (acm->ctrlout == newctrl)
435 return acm_set_control(acm, acm->ctrlout = newctrl);
438 static int acm_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg)
440 struct acm *acm = tty->driver_data;
448 static __u32 acm_tty_speed[] = {
449 0, 50, 75, 110, 134, 150, 200, 300, 600,
450 1200, 1800, 2400, 4800, 9600, 19200, 38400,
451 57600, 115200, 230400, 460800, 500000, 576000,
452 921600, 1000000, 1152000, 1500000, 2000000,
453 2500000, 3000000, 3500000, 4000000
456 static __u8 acm_tty_size[] = {
460 static void acm_tty_set_termios(struct tty_struct *tty, struct termios *termios_old)
462 struct acm *acm = tty->driver_data;
463 struct termios *termios = tty->termios;
464 struct acm_line newline;
465 int newctrl = acm->ctrlout;
470 newline.speed = cpu_to_le32p(acm_tty_speed +
471 (termios->c_cflag & CBAUD & ~CBAUDEX) + (termios->c_cflag & CBAUDEX ? 15 : 0));
472 newline.stopbits = termios->c_cflag & CSTOPB ? 2 : 0;
473 newline.parity = termios->c_cflag & PARENB ?
474 (termios->c_cflag & PARODD ? 1 : 2) + (termios->c_cflag & CMSPAR ? 2 : 0) : 0;
475 newline.databits = acm_tty_size[(termios->c_cflag & CSIZE) >> 4];
477 acm->clocal = ((termios->c_cflag & CLOCAL) != 0);
479 if (!newline.speed) {
480 newline.speed = acm->line.speed;
481 newctrl &= ~ACM_CTRL_DTR;
482 } else newctrl |= ACM_CTRL_DTR;
484 if (newctrl != acm->ctrlout)
485 acm_set_control(acm, acm->ctrlout = newctrl);
487 if (memcmp(&acm->line, &newline, sizeof(struct acm_line))) {
488 memcpy(&acm->line, &newline, sizeof(struct acm_line));
489 dbg("set line: %d %d %d %d", newline.speed, newline.stopbits, newline.parity, newline.databits);
490 acm_set_line(acm, &acm->line);
495 * USB probe and disconnect routines.
498 static int acm_probe (struct usb_interface *intf,
499 const struct usb_device_id *id)
501 struct union_desc *union_header = NULL;
502 char *buffer = intf->altsetting->extra;
503 int buflen = intf->altsetting->extralen;
504 struct usb_interface *control_interface;
505 struct usb_interface *data_interface;
506 struct usb_endpoint_descriptor *epctrl;
507 struct usb_endpoint_descriptor *epread;
508 struct usb_endpoint_descriptor *epwrite;
509 struct usb_device *usb_dev = interface_to_usbdev(intf);
512 int ctrlsize,readsize;
516 err("Wierd descriptor references");
521 if (buffer [1] != USB_DT_CS_INTERFACE) {
522 err("skipping garbage");
526 switch (buffer [2]) {
527 case CDC_UNION_TYPE: /* we've found it */
529 err("More than one union descriptor, skipping ...");
532 union_header = (struct union_desc *)buffer;
535 err("Ignoring extra header");
544 dev_dbg(&intf->dev,"No union descriptor, giving up\n");
548 control_interface = usb_ifnum_to_if(usb_dev, union_header->bMasterInterface0);
549 data_interface = usb_ifnum_to_if(usb_dev, union_header->bSlaveInterface0);
550 if (!control_interface || !data_interface) {
551 dev_dbg(&intf->dev,"no interfaces\n");
555 if (usb_interface_claimed(data_interface)) { /* valid in this context */
556 dev_dbg(&intf->dev,"The data interface isn't available\n");
560 /*workaround for switched interfaces */
561 if (data_interface->cur_altsetting->desc.bInterfaceClass != CDC_DATA_INTERFACE_TYPE) {
562 if (control_interface->cur_altsetting->desc.bInterfaceClass == CDC_DATA_INTERFACE_TYPE) {
563 struct usb_interface *t;
564 dev_dbg(&intf->dev,"Your device has switched interfaces.\n");
566 t = control_interface;
567 control_interface = data_interface;
573 if (data_interface->cur_altsetting->desc.bNumEndpoints < 2)
576 epctrl = &control_interface->cur_altsetting->endpoint[0].desc;
577 epread = &data_interface->cur_altsetting->endpoint[0].desc;
578 epwrite = &data_interface->cur_altsetting->endpoint[1].desc;
581 /* workaround for switched endpoints */
582 if ((epread->bEndpointAddress & USB_DIR_IN) != USB_DIR_IN) {
583 /* descriptors are swapped */
584 struct usb_endpoint_descriptor *t;
585 dev_dbg(&intf->dev,"The data interface has switched endpoints\n");
591 dbg("interfaces are valid");
592 for (minor = 0; minor < ACM_TTY_MINORS && acm_table[minor]; minor++);
594 if (acm_table[minor]) {
595 err("no more free acm devices");
599 if (!(acm = kmalloc(sizeof(struct acm), GFP_KERNEL))) {
600 dev_dbg(&intf->dev, "out of memory (acm kmalloc)\n");
603 memset(acm, 0, sizeof(struct acm));
605 ctrlsize = epctrl->wMaxPacketSize;
606 readsize = epread->wMaxPacketSize;
607 acm->writesize = epwrite->wMaxPacketSize;
608 acm->control = control_interface;
609 acm->data = data_interface;
613 acm->bh.func = acm_rx_tasklet;
614 acm->bh.data = (unsigned long) acm;
615 INIT_WORK(&acm->work, acm_softint, acm);
616 acm->ready_for_write = 1;
619 if (!(buf = kmalloc(ctrlsize + readsize + acm->writesize, GFP_KERNEL))) {
620 dev_dbg(&intf->dev, "out of memory (buf kmalloc)\n");
625 acm->ctrlurb = usb_alloc_urb(0, GFP_KERNEL);
627 dev_dbg(&intf->dev, "out of memory (ctrlurb kmalloc)\n");
632 acm->readurb = usb_alloc_urb(0, GFP_KERNEL);
634 dev_dbg(&intf->dev, "out of memory (readurb kmalloc)\n");
635 usb_free_urb(acm->ctrlurb);
640 acm->writeurb = usb_alloc_urb(0, GFP_KERNEL);
641 if (!acm->writeurb) {
642 dev_dbg(&intf->dev, "out of memory (writeurb kmalloc)\n");
643 usb_free_urb(acm->readurb);
644 usb_free_urb(acm->ctrlurb);
650 usb_fill_int_urb(acm->ctrlurb, usb_dev, usb_rcvintpipe(usb_dev, epctrl->bEndpointAddress),
651 buf, ctrlsize, acm_ctrl_irq, acm, epctrl->bInterval);
653 usb_fill_bulk_urb(acm->readurb, usb_dev, usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress),
654 buf += ctrlsize, readsize, acm_read_bulk, acm);
655 acm->readurb->transfer_flags |= URB_NO_FSBR;
657 usb_fill_bulk_urb(acm->writeurb, usb_dev, usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress),
658 buf += readsize, acm->writesize, acm_write_bulk, acm);
659 acm->writeurb->transfer_flags |= URB_NO_FSBR;
661 dev_info(&intf->dev, "ttyACM%d: USB ACM device\n", minor);
663 acm_set_control(acm, acm->ctrlout);
665 acm->line.speed = cpu_to_le32(9600);
666 acm->line.databits = 8;
667 acm_set_line(acm, &acm->line);
669 usb_driver_claim_interface(&acm_driver, data_interface, acm);
671 tty_register_device(acm_tty_driver, minor, &intf->dev);
673 acm_table[minor] = acm;
674 usb_set_intfdata (intf, acm);
678 static void acm_disconnect(struct usb_interface *intf)
680 struct acm *acm = usb_get_intfdata (intf);
682 if (!acm || !acm->dev) {
683 dbg("disconnect on nonexisting interface");
688 usb_set_intfdata (intf, NULL);
690 usb_unlink_urb(acm->ctrlurb);
691 usb_unlink_urb(acm->readurb);
692 usb_unlink_urb(acm->writeurb);
694 flush_scheduled_work(); /* wait for acm_softint */
696 kfree(acm->ctrlurb->transfer_buffer);
698 usb_driver_release_interface(&acm_driver, acm->data);
701 tty_unregister_device(acm_tty_driver, acm->minor);
702 acm_table[acm->minor] = NULL;
703 usb_free_urb(acm->ctrlurb);
704 usb_free_urb(acm->readurb);
705 usb_free_urb(acm->writeurb);
711 tty_hangup(acm->tty);
715 * USB driver structure.
718 static struct usb_device_id acm_ids[] = {
719 /* control interfaces with various AT-command sets */
720 { USB_INTERFACE_INFO(USB_CLASS_COMM, 2, 1) },
721 { USB_INTERFACE_INFO(USB_CLASS_COMM, 2, 2) },
722 { USB_INTERFACE_INFO(USB_CLASS_COMM, 2, 3) },
723 { USB_INTERFACE_INFO(USB_CLASS_COMM, 2, 4) },
724 { USB_INTERFACE_INFO(USB_CLASS_COMM, 2, 5) },
725 { USB_INTERFACE_INFO(USB_CLASS_COMM, 2, 6) },
727 /* NOTE: COMM/2/0xff is likely MSFT RNDIS ... NOT a modem!! */
731 MODULE_DEVICE_TABLE (usb, acm_ids);
733 static struct usb_driver acm_driver = {
734 .owner = THIS_MODULE,
737 .disconnect = acm_disconnect,
742 * TTY driver structures.
745 static struct tty_operations acm_ops = {
746 .open = acm_tty_open,
747 .close = acm_tty_close,
748 .write = acm_tty_write,
749 .write_room = acm_tty_write_room,
750 .ioctl = acm_tty_ioctl,
751 .throttle = acm_tty_throttle,
752 .unthrottle = acm_tty_unthrottle,
753 .chars_in_buffer = acm_tty_chars_in_buffer,
754 .break_ctl = acm_tty_break_ctl,
755 .set_termios = acm_tty_set_termios,
756 .tiocmget = acm_tty_tiocmget,
757 .tiocmset = acm_tty_tiocmset,
764 static int __init acm_init(void)
767 acm_tty_driver = alloc_tty_driver(ACM_TTY_MINORS);
770 acm_tty_driver->owner = THIS_MODULE,
771 acm_tty_driver->driver_name = "acm",
772 acm_tty_driver->name = "ttyACM",
773 acm_tty_driver->devfs_name = "usb/acm/",
774 acm_tty_driver->major = ACM_TTY_MAJOR,
775 acm_tty_driver->minor_start = 0,
776 acm_tty_driver->type = TTY_DRIVER_TYPE_SERIAL,
777 acm_tty_driver->subtype = SERIAL_TYPE_NORMAL,
778 acm_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS,
779 acm_tty_driver->init_termios = tty_std_termios;
780 acm_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
781 tty_set_operations(acm_tty_driver, &acm_ops);
783 retval = tty_register_driver(acm_tty_driver);
785 put_tty_driver(acm_tty_driver);
789 retval = usb_register(&acm_driver);
791 tty_unregister_driver(acm_tty_driver);
792 put_tty_driver(acm_tty_driver);
796 info(DRIVER_VERSION ":" DRIVER_DESC);
801 static void __exit acm_exit(void)
803 usb_deregister(&acm_driver);
804 tty_unregister_driver(acm_tty_driver);
805 put_tty_driver(acm_tty_driver);
808 module_init(acm_init);
809 module_exit(acm_exit);
811 MODULE_AUTHOR( DRIVER_AUTHOR );
812 MODULE_DESCRIPTION( DRIVER_DESC );
813 MODULE_LICENSE("GPL");