ChangeSet 1.897.1.6, 2003/01/08 09:32:25-08:00, baldrick@wanadoo.fr [PATCH] USB: speedtouch: add GPL notices speedtouch and friends: add GPL notices (yes, the module was released by Alcatel under the GPL) and fix some typos. diff -Nru a/drivers/usb/misc/atmsar.c b/drivers/usb/misc/atmsar.c --- a/drivers/usb/misc/atmsar.c Wed Jan 8 11:54:02 2003 +++ b/drivers/usb/misc/atmsar.c Wed Jan 8 11:54:02 2003 @@ -1,73 +1,75 @@ +/****************************************************************************** + * atmsar.c -- General SAR library for ATM devices. + * + * Copyright (C) 2000, Johan Verrept + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 + * Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + ******************************************************************************/ + /* - * General SAR library for ATM devices. - * - * Written By Johan Verrept ( Johan.Verrept@advalvas.be ) - * - * Copyright (c) 2000, Johan Verrept - * - * This code falls under the GNU General Public License, see COPYING for details - * - * This package is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -Version 0.2.4A: - - Version for inclusion in 2.5 series kernel - - Modifcations by Richard Purdie (rpurdie@rpsys.net) - - replaced "sarlib" with "atmsar" - - adaptations for inclusion in kernel tree - -Version 0.2.4: - - Fixed wrong buffer overrun check in atmsar_decode_rawcell() - reported by Stephen Robinson - - Fixed bug when input skb did not contain a multple of 52/53 bytes. - (would happen when the speedtouch device resynced) - also reported by Stephen Robinson - -Version 0.2.3: - - Fixed wrong allocation size. caused memory corruption in some - cases. Reported by Vladimir Dergachev - - Added some comments - -Version 0.2.2: - - Fixed CRCASM (patch from Linus Flannagan ) - - Fixed problem when user did NOT use the ATMSAR_USE_53BYTE_CELL flag. - (reported by Piers Scannell ) - - No more in-buffer rewriting for cloned buffers. - - Removed the PII specific CFLAGS in the Makefile. - -Version 0.2.1: - - removed dependancy on alloc_tx. tis presented problems when using - this with the br2684 code. - -Version 0.2: - - added AAL0 reassembly - - added alloc_tx support - - replaced alloc_skb in decode functions to dev_alloc_skb to allow - calling from interrupt - - fixed embarassing AAL5 bug. I was setting the pti bit in the wrong - byte... - - fixed another emabrassing bug.. picked up the wrong crc type and - forgot to invert the crc result... - - fixed AAL5 length calculations. - - removed automatic skb freeing from encode functions. - This caused problems because i did kfree_skb it, while it - needed to be popped. I cannot determine though whether it - needs to be popped or not. Figu'e it out ye'self ;-) - - added mru field. This is the buffersize. atmsar_decode_aal0 will - use when it allocates a receive buffer. A stop gap for real - buffer management. - -Version 0.1: - - library created. - - only contains AAL5, AAL0 can be easily added. ( actually, only - AAL0 reassembly is missing) -*/ + * Written by Johan Verrept (Johan.Verrept@advalvas.be) + * + * 0.2.4A: - Version for inclusion in 2.5 series kernel + * - Modifications by Richard Purdie (rpurdie@rpsys.net) + * - replaced "sarlib" with "atmsar" + * - adaptations for inclusion in kernel tree + * + * 0.2.4: - Fixed wrong buffer overrun check in atmsar_decode_rawcell() + * reported by Stephen Robinson + * - Fixed bug when input skb did not contain a multple of 52/53 + * bytes (would happen when the speedtouch device resynced) + * also reported by Stephen Robinson + * + * 0.2.3: - Fixed wrong allocation size. caused memory corruption in some + * cases. Reported by Vladimir Dergachev + * - Added some comments + * + * 0.2.2: - Fixed CRCASM + * patch from Linus Flannagan + * - Fixed problem when user did NOT use the + * ATMSAR_USE_53BYTE_CELL flag. + * reported by Piers Scannell + * - No more in-buffer rewriting for cloned buffers. + * - Removed the PII specific CFLAGS in the Makefile. + * + * 0.2.1: - removed dependancy on alloc_tx. tis presented problems when + * using this with the br2684 code. + * + * 0.2: - added AAL0 reassembly + * - added alloc_tx support + * - replaced alloc_skb in decode functions to dev_alloc_skb to + * allow calling from interrupt + * - fixed embarassing AAL5 bug. I was setting the pti bit in the + * wrong byte... + * - fixed another emabrassing bug.. picked up the wrong crc type + * and forgot to invert the crc result... + * - fixed AAL5 length calculations. + * - removed automatic skb freeing from encode functions. + * This caused problems because i did kfree_skb it, while it + * needed to be popped. I cannot determine though whether it + * needs to be popped or not. Figu'e it out ye'self ;-) + * - added mru field. This is the buffersize. atmsar_decode_aal0 + * will use when it allocates a receive buffer. A stop gap for + * real buffer management. + * + * 0.1: - library created. + * - only contains AAL5, AAL0 can be easily added. (actually, only + * AAL0 reassembly is missing) + * + */ #include "atmsar.h" @@ -214,7 +216,7 @@ #define crc32( crc, mem, len) calc_crc(mem, len, crc); -/* initialiation routines. not used at the moment +/* initialization routines. not used at the moment * I will avoid these as long as possible !! */ @@ -296,7 +298,7 @@ /* * This gives problems with the ATM layer alloc_tx(). * It is not usable from interrupt context and for - * some reason this is used in interurpt context + * some reason this is used in interrupt context * with br2684.c * if (vcc->alloc_tx) @@ -581,7 +583,7 @@ vcc->reasBuffer = dev_alloc_skb (vcc->mtu); /* if alloc fails, we just drop the cell. it is possible that we can still - * receive cells on other vcc's + * receive cells on other vcc's */ if (vcc->reasBuffer) { /* if (buffer overrun) discard received cells until now */ diff -Nru a/drivers/usb/misc/atmsar.h b/drivers/usb/misc/atmsar.h --- a/drivers/usb/misc/atmsar.h Wed Jan 8 11:54:02 2003 +++ b/drivers/usb/misc/atmsar.h Wed Jan 8 11:54:02 2003 @@ -1,15 +1,26 @@ -/* +#ifndef _ATMSAR_H_ +#define _ATMSAR_H_ + +/****************************************************************************** + * atmsar.h -- General SAR library for ATM devices. * - * General SAR library for ATM devices. + * Copyright (C) 2000, Johan Verrept * - * Copyright (c) 2000, Johan Verrept + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * This code falls under the GNU General Public License, see COPYING for details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. * - */ - -#ifndef _ATMSAR_H_ -#define _ATMSAR_H_ + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 + * Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + ******************************************************************************/ #include #include diff -Nru a/drivers/usb/misc/speedtouch.c b/drivers/usb/misc/speedtouch.c --- a/drivers/usb/misc/speedtouch.c Wed Jan 8 11:54:02 2003 +++ b/drivers/usb/misc/speedtouch.c Wed Jan 8 11:54:02 2003 @@ -1,31 +1,49 @@ +/****************************************************************************** + * speedtouch.c -- Alcatel SpeedTouch USB xDSL modem driver. + * + * Copyright (C) 2001, Alcatel + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 + * Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + ******************************************************************************/ + /* - * Driver Module for Alcatel SpeedTouch USB xDSL modem - * Copyright 2001, Alcatel * Written by Johan Verrept (Johan.Verrept@advalvas.be) * - -1.5A: - Version for inclusion in 2.5 series kernel - - Modifcations by Richard Purdie (rpurdie@rpsys.net) - - made compatible with kernel 2.5.6 onwards by changing - udsl_usb_send_data_context->urb changed to a pointer - and adding code to alloc and free it - - remove_wait_queue() added to udsl_atm_processqueue_thread() - -1.5: - fixed memory leak when atmsar_decode_aal5 returned NULL. - (reported by stephen.robinson@zen.co.uk) - -1.4: - changed the spin_lock() under interrupt to spin_lock_irqsave() - - unlink all active send urbs of a vcc that is being closed. - -1.3.1: - added the version number - -1.3: - Added multiple send urb support - - fixed memory leak and vcc->tx_inuse starvation bug - when not enough memory left in vcc. - -1.2: - Fixed race condition in udsl_usb_send_data() -1.1: - Turned off packet debugging - + * 1.5A: - Version for inclusion in 2.5 series kernel + * - Modifications by Richard Purdie (rpurdie@rpsys.net) + * - made compatible with kernel 2.5.6 onwards by changing + * udsl_usb_send_data_context->urb to a pointer and adding code + * to alloc and free it + * - remove_wait_queue() added to udsl_atm_processqueue_thread() + * + * 1.5: - fixed memory leak when atmsar_decode_aal5 returned NULL. + * (reported by stephen.robinson@zen.co.uk) + * + * 1.4: - changed the spin_lock() under interrupt to spin_lock_irqsave() + * - unlink all active send urbs of a vcc that is being closed. + * + * 1.3.1: - added the version number + * + * 1.3: - Added multiple send urb support + * - fixed memory leak and vcc->tx_inuse starvation bug + * when not enough memory left in vcc. + * + * 1.2: - Fixed race condition in udsl_usb_send_data() + * 1.1: - Turned off packet debugging + * */ #include @@ -734,7 +752,7 @@ case -ENOENT: /* buffer was unlinked */ case -EILSEQ: /* unplug or timeout */ case -ETIMEDOUT: /* unplug or timeout */ - /* + /* * we don't do anything here and we don't resubmit */ return; @@ -1033,7 +1051,7 @@ #ifdef DEBUG_PACKET /******************************************************************************* * -* Debug +* Debug * *******************************************************************************/