From owner-freebsd-bugs@FreeBSD.ORG Wed Sep 17 22:10:02 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5392C106567B for ; Wed, 17 Sep 2008 22:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 251F98FC14 for ; Wed, 17 Sep 2008 22:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m8HMA1S3021099 for ; Wed, 17 Sep 2008 22:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m8HMA1uj021098; Wed, 17 Sep 2008 22:10:01 GMT (envelope-from gnats) Resent-Date: Wed, 17 Sep 2008 22:10:01 GMT Resent-Message-Id: <200809172210.m8HMA1uj021098@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Nick Hibma Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6483D106566B for ; Wed, 17 Sep 2008 22:05:37 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from hpsmtp-eml13.kpnxchange.com (hpsmtp-eml13.kpnxchange.com [213.75.38.113]) by mx1.freebsd.org (Postfix) with ESMTP id D4ABC8FC0C for ; Wed, 17 Sep 2008 22:05:36 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from cpsmtpi-eml06.kpnxchange.com ([213.75.38.136]) by hpsmtp-eml13.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 18 Sep 2008 00:05:35 +0200 Received: from uitsmijter.van-laarhoven.org ([81.207.207.222]) by cpsmtpi-eml06.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 18 Sep 2008 00:05:35 +0200 Received: (qmail 60342 invoked by uid 98); 17 Sep 2008 22:05:32 -0000 Received: from 10.66.0.133 (nick@10.66.0.133) by uitsmijter.van-laarhoven.org (envelope-from , uid 82) with qmail-scanner-2.01 (clamdscan: 0.92/5270. f-prot: 4.6.7/3.16.15. spamassassin: 3.2.3. Clear:RC:1(10.66.0.133):. Processed in 0.750627 secs); 17 Sep 2008 22:05:32 -0000 Received: from unknown (HELO van-laarhoven.org) (nick@10.66.0.133) by uitsmijter.van-laarhoven.org with SMTP; 17 Sep 2008 22:05:31 -0000 Received: (nullmailer pid 43088 invoked by uid 1001); Wed, 17 Sep 2008 22:05:31 -0000 Message-Id: <1221689131.035456.43087.nullmailer@van-laarhoven.org> Date: Thu, 18 Sep 2008 00:05:31 +0200 From: Nick Hibma To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/127453: ubsa, uark, ubser, uftdi, and friends should all be put in one big bag, usbser X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2008 22:10:02 -0000 >Number: 127453 >Category: kern >Synopsis: ubsa, uark, ubser, uftdi, and friends should all be put in one big bag, usbser >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Sep 17 22:10:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Nick Hibma >Release: FreeBSD 7.0-STABLE i386 >Organization: AnyWi Technologies >Environment: System: FreeBSD hind.van-laarhoven.org 7.0-STABLE FreeBSD 7.0-STABLE #3: Thu Aug 14 21:10:55 CEST 2008 toor@hind.van-laarhoven.org:/usr/src/sys/i386/compile/HIND i386 >Description: It gets annoying after a while to have to search for the correct driver for your serial device. There is simply too many of them. It would be simpler to have to load usbser, ucom and usb and be done with it. The reason is simple: We have developed yet another serial port driver for Option Globetrotter and Huawei E220 cards (multiple serial ports on 1 device, unlike the ubsa hack for these devices) which adds yet another label. This will be committed in the next month. Most obvious consequence is the larger size of the kernel because of bloat: sys/modules % ls -l {uark,ubsa,usbser}/*.kld -rw-r--r-- 1 nick nick 4748 Sep 17 23:25 uark/uark.kld -rw-r--r-- 1 nick nick 7180 Sep 17 23:25 ubsa/ubsa.kld -rw-r--r-- 1 nick nick 10204 Sep 17 22:31 usbser/usbser.kld klds for the individual drivers are not big, but you usually just need 1 or 2, not all of them. Thus: adding 10+ * 10k - 17% ~ 100k, which is a lot if you just need the one driver. Then again, umass is 30*270KB in size (if CAM is just needed for umass and nothing else and counted in here). >How-To-Repeat: Buy a serial device and figure out the USB device driver that supports it. Example: Currently support for Option Globetrotter Fusion cards is included in ubsa. Go figure. >Fix: Step 1: simply throw them all into 1 device driver usbser - Change sys/conf/files to indicate usbser as the device for uark.c, ubsa.c, etc/ - Replace all the directories uark, ubsa, etc. in sys/modules with the one directory usbser. - Combine the man pages uark.4, ubsa.4, etc. into usbser.4 - Update release/ documentation? - Add aliases uark, ubsa, etc. for usbser? Step 2: separate the code to show similarities possibly - Move uark.c, ubsa.c, etc. into sys/dev/usb/usbser to separate them. - Possibly rename ubsa.c to a more generic name, like belkin.c - Update sys/conf/files. - Update sys/modules/usbser/Makefile Step 3: integrate stuff from various places to conserve space, like debugging output, probing routines, etc. The last step might be less productive. uark does not share a lot of code wth ubsa for example if I read the code correctly. Candidates: uark.ko ubsa.ko ubser.ko ucycom.ko ufoma.ko uftdi.ko umct.ko umodem.ko uplcom.ko uslcom.ko uvisor.ko uvscom.ko and in the future usm.ko Note: some of them, ucycom, still need to be converted to use ucom. >Release-Note: >Audit-Trail: >Unformatted: