summaryrefslogtreecommitdiff
path: root/sys/dev/usb/umodem.c
Commit message (Collapse)AuthorAgeFilesLines
* Move usb to a graveyard location under sys/legacy/dev, it is intended that theAndrew Thompson2009-02-231-821/+0
| | | | | | | | | | new USB2 stack will fully replace this for 8.0. Remove kernel modules, a subsequent commit will update conf/files. Unhook usbdevs from the build. Notes: svn path=/head/; revision=188939
* All the other routines returned EIO from the param routine. Return itWarner Losh2008-08-311-1/+1
| | | | | | | | | | | | from umodem and ufoma. With these changes, umodem kinda works for me now. It certainly gets past the "tip" bug that I found earlier where 115200 wasn't a valid baud rate. This was "broken" in the mpsafetty commit, but in reality, umodem was always broken. Notes: svn path=/head/; revision=182506
* Ioctls that aren't handled by this layer need to return ENOIOCTL, notWarner Losh2008-08-311-9/+7
| | | | | | | | ENOTTY. Also, make the ucom callback structure easier to read while I'm here. Notes: svn path=/head/; revision=182505
* Integrate the new MPSAFE TTY layer to the FreeBSD operating system.Ed Schouten2008-08-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last half year I've been working on a replacement TTY layer for the FreeBSD kernel. The new TTY layer was designed to improve the following: - Improved driver model: The old TTY layer has a driver model that is not abstract enough to make it friendly to use. A good example is the output path, where the device drivers directly access the output buffers. This means that an in-kernel PPP implementation must always convert network buffers into TTY buffers. If a PPP implementation would be built on top of the new TTY layer (still needs a hooks layer, though), it would allow the PPP implementation to directly hand the data to the TTY driver. - Improved hotplugging: With the old TTY layer, it isn't entirely safe to destroy TTY's from the system. This implementation has a two-step destructing design, where the driver first abandons the TTY. After all threads have left the TTY, the TTY layer calls a routine in the driver, which can be used to free resources (unit numbers, etc). The pts(4) driver also implements this feature, which means posix_openpt() will now return PTY's that are created on the fly. - Improved performance: One of the major improvements is the per-TTY mutex, which is expected to improve scalability when compared to the old Giant locking. Another change is the unbuffered copying to userspace, which is both used on TTY device nodes and PTY masters. Upgrading should be quite straightforward. Unlike previous versions, existing kernel configuration files do not need to be changed, except when they reference device drivers that are listed in UPDATING. Obtained from: //depot/projects/mpsafetty/... Approved by: philip (ex-mentor) Discussed: on the lists, at BSDCan, at the DevSummit Sponsored by: Snow B.V., the Netherlands dcons(4) fixed by: kan Notes: svn path=/head/; revision=181905
* Add missing newline in printf.Warner Losh2007-07-291-1/+1
| | | | | | | | Submitted by: "R.Mahmatkhanov" cvs-src at yandex ru Approved by: re (blanket) Notes: svn path=/head/; revision=171651
* With the advent of G3/CDMA modems, the old buffer sizes are no longerWarner Losh2007-06-281-4/+4
| | | | | | | | | | | | | | adequate. Increase them to 1k. The referenced PR made this a sysctl, but that seems like overkill to me. The difference between 320 and 2048 bytes in modern systems, even embedded ones, seems to be in the noise to be worth the extra hair to make it settable. PR: 74609 Submitted by: Divacky Roman Approved by: re (blanket) Notes: svn path=/head/; revision=171074
* Initialize id before using it.Warner Losh2007-06-231-1/+1
| | | | | | | | Submitted by: mjacob Approved by: re@ Notes: svn path=/head/; revision=170997
* Latest round of usb cleanups:Warner Losh2007-06-211-12/+7
| | | | | | | | | | | | | | | | | | | | | | o Consistently use device_foo_t and bus_foo_t for functions implementing device_foo and bus_foo respectively. Adjust those routines that were wrong (we should do this throughout the tree). o make all the modules depend on usb. Otherwise these modules won't load. o ucycom doesn't need usb_port.h o Minor unifdefing o uhub, umass, ums, urio, uscanner conversion complete. o ukbd: Remove the NO_SET_PROTO quirk (fixes a PR 77940). NetBSD removed their check and setting the proto a long time ago. o umodem panic fixed. UQ_ASSUME_CM_OVER_DATA quirk removed because I've never seen a umodem that needed this rejection for proection (this gets rid of ~20% of the quirks). Approved by: re@ (kensmith) PR: 77940 Notes: svn path=/head/; revision=170969
* s/logprintf/printf/gWarner Losh2007-06-201-1/+1
| | | | | | | Approved by: re@ Notes: svn path=/head/; revision=170960
* Finish removal of usb_port.h macros.Warner Losh2007-06-181-2/+3
| | | | Notes: svn path=/head/; revision=170937
* Expand USB_MATCH_STARTWarner Losh2007-06-171-1/+1
| | | | Notes: svn path=/head/; revision=170886
* Expand USB_DETACH, USB_ATTACH and USB_MATCH inline. No functionalWarner Losh2007-06-131-3/+6
| | | | | | | change, and MD5's appear to be the same. Notes: svn path=/head/; revision=170655
* Eliminate usb_thread_t.Warner Losh2007-06-121-2/+2
| | | | Notes: svn path=/head/; revision=170617
* Expand USB_ATTACH_{ERROR,SUCCESS}_RETURN inline and eliminate fromWarner Losh2007-06-121-2/+2
| | | | | | | usb_port.h. They aren't needed, and are a legacy of this code's past. Notes: svn path=/head/; revision=170612
* Try to set the data multiplexed feature, but don't care if there's anWarner Losh2007-06-091-46/+28
| | | | | | | | | | | | | | error doing so. It seems an increasing number of phones have this quirk, and we're not keeping up. There appears to be nothing bad that happens for non-quirked phones. Minor cleanups: o prefer device_printf over printf o kill devinfo stuff o minor other preening. Notes: svn path=/head/; revision=170450
* More removing compatibility macros.Warner Losh2006-09-071-9/+9
| | | | | | | | | md5 still the same. "Dave, stop. I feel my mind slipping away." -- hal Notes: svn path=/head/; revision=162097
* s/Static/static/gWarner Losh2006-09-061-28/+28
| | | | | | | | | | | | | s/device_ptr_t/device_t/g No md5 changes in the .o's # Note to the md5 tracking club: $FreeBSD$ changes md5 after every commit # so you need to checkout -kk to get $FreeBSD$ instead of the actual value # of the keyword. Notes: svn path=/head/; revision=162095
* Add support for:Alexander Leidinger2006-06-181-0/+2
| | | | | | | | | | | - Curitel PC5740 Wireless Modem (Verizon's PCMCIA card) - Sierra MC5720 Wireless Modem (Built in to Thinkpad X60s) PR: 98908 Submitted by: Michael Collette <metrol@metrol.net> Notes: svn path=/head/; revision=159749
* Use a taskqueue to handle port status changes.Shunsuke Akiyama2005-01-311-1/+18
| | | | | | | | | Calling ucom layer directly from interrupt context make a panic. MFC after: 1 week Notes: svn path=/head/; revision=141087
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-061-1/+1
| | | | Notes: svn path=/head/; revision=139749
* We don't need vnode.h, but do need uio.h in these files. vnode.hWarner Losh2004-12-131-1/+1
| | | | | | | | | shouldn't be included in drivers, generally, so remove them. OK'd by: phk Notes: svn path=/head/; revision=138787
* Overhaul ucom serial driver by using generic stuff instead of homerolledPoul-Henning Kamp2004-09-171-3/+4
| | | | | | | all over the place. Notes: svn path=/head/; revision=135379
* MFp4: First batch of dev/usb/usbdevs.h -> usbdevs.h changes.Warner Losh2004-06-271-2/+2
| | | | Notes: svn path=/head/; revision=131187
* Add missing <sys/module.h> includesPoul-Henning Kamp2004-05-301-0/+1
| | | | Notes: svn path=/head/; revision=129879
* check interface numberMIHIRA Sanpei Yoshiro2004-05-301-3/+5
| | | | | | | | | | | Kyocera AH-K3001V has 2 data interface. But we could use only one interface(id = 0) PR: kern/66779 Submitted by: Togawa Satoshi <toga@puyo.org> Notes: svn path=/head/; revision=129858
* add support Kyocera AH-K3001V (cellular phone in Japan)MIHIRA Sanpei Yoshiro2004-05-211-6/+32
| | | | | | | | | PR: kern/66779 Submitted by: Togawa Satoshi <toga@puyo.org> MFC after: 1 week Notes: svn path=/head/; revision=129527
* MFNetBSD (umodem.c 1.46):MIHIRA Sanpei Yoshiro2004-05-141-2/+2
| | | | | | | URL updates Notes: svn path=/head/; revision=129228
* Use __FBSDID().David E. O'Brien2003-08-241-1/+3
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* Fix duplicate sc_dying usage.Shunsuke Akiyama2003-03-091-5/+2
| | | | | | | | All drivers which depend on ucom interfaces should use only one sc_dying. Notes: svn path=/head/; revision=112039
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-1/+1
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-1/+1
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* Make compile cleanly when USB_DEBUG is defined.Warner Losh2003-01-121-1/+2
| | | | Notes: svn path=/head/; revision=109132
* Merge from NetBSD and arrange for FreeBSD's slight differences inWarner Losh2003-01-091-817/+411
| | | | | | | | | | | ucom. This gets my Sanyo SCP-4900 working. Approved by: joe Notes: svn path=/head/; revision=108986
* Use the hw.usb sysctl tree instead of debug.usb.Josef Karthauser2002-08-081-1/+2
| | | | | | | Requested by: imp Notes: svn path=/head/; revision=101521
* Replace the FOO_DEBUG definitions with USB_DEBUG, and switch theJosef Karthauser2002-07-311-2/+2
| | | | | | | | | debugging levels to off by default. Now that debug levels can be tweaked by sysctl we don't need to go through hoops to get the different usb parts to produce debug data. Notes: svn path=/head/; revision=101060
* Get bored with hard coded debug level variables and introduce a debug.usbJosef Karthauser2002-07-311-0/+3
| | | | | | | | | sysctl tree for tweaking them real-time. Reviewed by: iedowse Notes: svn path=/head/; revision=101053
* Make this compile again after the recent NetBSD mergeWarner Losh2002-04-021-2/+2
| | | | Notes: svn path=/head/; revision=93614
* Change the suser() API to take advantage of td_ucred as well as do aJohn Baldwin2002-04-011-1/+1
| | | | | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@ Notes: svn path=/head/; revision=93593
* MFNetBSD: Update many URLs.Josef Karthauser2002-04-011-1/+2
| | | | Notes: svn path=/head/; revision=93591
* Use ANSI prototypes and declarations.Josef Karthauser2002-04-011-69/+22
| | | | | | | Update $NetBSD$ idents to better reflect reality. Notes: svn path=/head/; revision=93568
* Be more specific about when block major numbers disappeared fromJosef Karthauser2002-03-111-1/+1
| | | | | | | the cdev switch. Notes: svn path=/head/; revision=92094
* Re-add bmaj to the cdevsw's, but don't compile it in on -current.Josef Karthauser2002-02-151-0/+3
| | | | | | | | This makes the code more portable between -current, -stable and the other BSDs. Notes: svn path=/head/; revision=90713
* Sync with NetBSD:Josef Karthauser2002-01-021-3/+3
| | | | | | | | | date: 2000/02/29 21:37:01; author: augustss; state: Exp; Distinguish between device and interface classes. (I finally found a document that said that they were different.) Notes: svn path=/head/; revision=88824
* NetBSD have introduced usb_proc_ptr for us (they'll be needing it soon too)Josef Karthauser2002-01-021-9/+9
| | | | | | | to hide the distinction between struct proc and struct thread. Notes: svn path=/head/; revision=88818
* KSE Milestone 2Julian Elischer2001-09-121-9/+9
| | | | | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha Notes: svn path=/head/; revision=83366
* Only clear endpoint stall if status was USBD_STALLED.Nick Hibma2001-09-021-2/+4
| | | | | | | | This avoids panicing the system by unplugging a hub. The interrupt transfer would sometimes arrive after the driver had been removed. Notes: svn path=/head/; revision=82786
* Send the remains (such as I have located) of "block major numbers" toPoul-Henning Kamp2001-03-261-1/+0
| | | | | | | the bit-bucket. Notes: svn path=/head/; revision=74810
* Extend kqueue down to the device layer.Jonathan Lemon2001-02-151-2/+3
| | | | | | | Backwards compatible approach suggested by: peter Notes: svn path=/head/; revision=72521
* Use suser(9) instead of checking p->p_ucred->cr_uid directly.John Baldwin2001-01-231-1/+1
| | | | Notes: svn path=/head/; revision=71477
* select() DKI is now in <sys/selinfo.h>.Garrett Wollman2001-01-091-0/+4
| | | | Notes: svn path=/head/; revision=70834