summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/ulpt.c
Commit message (Collapse)AuthorAgeFilesLines
* Move usb to a graveyard location under sys/legacy/dev, it is intended that thethompsa2009-02-231-815/+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.
* Replace all calls to minor() with dev2unit().ed2008-09-271-2/+2
| | | | | | | | | | | | | | | After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere. This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware. Reviewed by: kib
* Latest round of usb cleanups:imp2007-06-211-0/+1
| | | | | | | | | | | | | | | | | | | 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
* s/logprintf/printf/gimp2007-06-201-2/+2
| | | | Approved by: re@
* Expand usb_port.h macros.imp2007-06-181-15/+39
|
* Expand USB_MATCH_STARTimp2007-06-171-1/+1
|
* Expand USB_DETACH, USB_ATTACH and USB_MATCH inline. No functionalimp2007-06-131-3/+6
| | | | change, and MD5's appear to be the same.
* Eliminate usb_thread_t.imp2007-06-121-3/+3
|
* Remove USBDEV() macro. We do not need a macro that is defined as itsimp2007-06-121-8/+6
| | | | only argument. It was used inconsistently in the tree, so remove it.
* Expand USB_ATTACH_{ERROR,SUCCESS}_RETURN inline and eliminate fromimp2007-06-121-5/+5
| | | | usb_port.h. They aren't needed, and are a legacy of this code's past.
* Remove devinfo junk.imp2007-06-091-69/+2
| | | | | | Remove bogus bzero/memset Expand USB_ATTACH_SETUP Minor nits
* Remove compat ifdefs for version < 500014 from the rest of the USB files.brueffer2007-06-071-3/+0
| | | | | Approved by: rwatson (mentor) MFC after: 1 week
* More removing compatibility macros.imp2006-09-071-12/+12
| | | | | | md5 still the same. "Dave, stop. I feel my mind slipping away." -- hal
* s/Static/static/gimp2006-09-061-7/+7
| | | | | | | | | | 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.
* Fix a > 1 year old typo that caused the ulpt driver to try readingiedowse2005-11-121-1/+1
| | | | | | | | | | from the printer and discarding the data even if the ulpt device was opened for reading. This resulted in crashes because two conconcurrent read transfers were using the same transfer structure. PR: usb/88886 Reported By: Alex Pivovarov MFC after: 1 week
* Don't wait for the printer to become ready before allowing the open toimp2005-07-151-23/+1
| | | | | | | | | | | | | | | | succeed. There are many printers that return status over the read channel, and if we wait for the status to become ready, then we can't find the status automatically. Linux doesn't wait, nor does it ever seem to really check the status in any meaningful way... If there really is a problem, the writes to the bulk out endpoint will still fail (like they would if the printer was ready and then ran out of paper or became unready). In addition, there are a number of printers being made that emulate the 'status' byte by returning '0' always rather than '0x18'. This fixes the EBUSY on open timeouts on those printer as well. Reviewed by: the defining silence on usb@
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Tweak the compatibility macros a little so that the device printing isimp2004-08-151-3/+1
| | | | moved into them.
* MFp4: First batch of dev/usb/usbdevs.h -> usbdevs.h changes.imp2004-06-271-1/+1
|
* MFNetBSD 1.60, author: augustssle2004-06-231-55/+182
| | | | | | | | | | | Several changes: * Implement read for ulpt. * If the device is not opened for reading, occasionally drain any data the printer might have (but don't hammer the printer with reads). * Lower the buffer size to one page. The driver seems to work with more printers now. Obtained from: NetBSD
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-6/+6
| | | | Bump __FreeBSD_version accordingly.
* Device megapatch 4/6:phk2004-02-211-0/+2
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Device megapatch 1/6:phk2004-02-211-2/+0
| | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number.
* I don't know from where the notion that device driver should orphk2003-09-281-10/+0
| | | | | | | | | | | | | | even could call VOP_REVOKE() on vnodes associated with its dev_t's has originated, but it stops right here. If there are things people belive destroy_dev() needs to learn how to do, please tell me about it, preferably with a reproducible test case. Include <sys/uio.h> in bluetooth code rather than rely on <sys/vnode.h> to do so. The fact that some of the USB code needs to include <sys/vnode.h> still disturbs me greatly, but I do not have time to chase that.
* Fix the cdevsw compatibility for -stable.joe2003-08-251-1/+1
|
* Use __FBSDID().obrien2003-08-241-1/+3
| | | | Also some minor style cleanups.
* If the device goes away during ulpt_reset(), make sure not to calliedowse2003-06-151-1/+7
| | | | | | | | | ulpt_status() afterwards. This fixes a crash that can occur if a USB printer is power-cycled when printing is just starting. The problem is similar to that fixed in revision 1.33, but it is much less likely to occur. MFC after: 1 week
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-13/+6
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).des2003-03-021-1/+1
|
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-011-1/+1
| | | | especially in troff files.
* Ignore IEEE1284 descriptors when looking for bidirectional mode. We don'tdes2002-12-161-2/+2
| | | | | | | really know how to talk IEEE1284, so attaching to that interface makes the printer unusable. Approved by: joe
* MFNetBSD: 1.52-1.55des2002-12-161-4/+17
| | | | | Mostly OpenBSD-related changes. Remove newline from panic string. Remove an unreachable break statement.
* Check for errors and zero-length transfers in the ulpt_input() inputiedowse2002-10-301-0/+6
| | | | | | | pipe callback function, and just return if these cases are detected. Without these checks, the ulpt driver may cause an infinite loop of failing USB transfers that can hang the whole machine. This makes printing work for me on a HP DJ950C printer.
* MFNetBSD: 1.51joe2002-08-161-4/+5
| | | | | Move a quirk tests so the message printed about directionality is right.
* MFNetBSD: (1.50) Get rid of trailing white space.joe2002-08-161-5/+5
|
* Use the hw.usb sysctl tree instead of debug.usb.joe2002-08-081-1/+2
| | | | Requested by: imp
* Replace the FOO_DEBUG definitions with USB_DEBUG, and switch thejoe2002-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.
* Get bored with hard coded debug level variables and introduce a debug.usbjoe2002-07-311-0/+3
| | | | | | sysctl tree for tweaking them real-time. Reviewed by: iedowse
* MFNetBSD: ugen.c (1.57), ulpt.c (1.48), usb.c (1.67), usbdi.c (1.96),joe2002-05-061-2/+2
| | | | | | | | usbdi.h (1.60) (and local changes compatibility changes to ufm.c and urio.c) date: 2002/02/11 15:11:49; author: augustss; Give usbd_do_request_flags() an extra argument for the timeout.
* Be more specific about when block major numbers disappeared fromjoe2002-03-111-1/+1
| | | | the cdev switch.
* in ulpt_reset() req.bmRequestType was unitialized, fix it.alfred2002-02-261-0/+1
|
* Re-add bmaj to the cdevsw's, but don't compile it in on -current.joe2002-02-151-0/+3
| | | | | This makes the code more portable between -current, -stable and the other BSDs.
* Merge from NetBSD: revs 1.43 + 1.45joe2002-02-111-5/+25
| | | | | | | | | | | | | From the NetBSD logs: revision 1.45 date: 2001/11/29 11:07:12; author: augustss; state: Exp; lines: +12 -2 Plug a memory leak in an error case. ---------------------------- revision 1.43 date: 2001/10/19 15:30:25; author: nathanw; state: Exp; lines: +5 -3 Match printers that report their interface as IEEE 1284 in addition to bidirectional.
* Sync with NetBSD:joe2002-01-021-7/+7
| | | | | | 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.)
* NetBSD have introduced usb_proc_ptr for us (they'll be needing it soon too)joe2002-01-021-3/+3
| | | | to hide the distinction between struct proc and struct thread.
* Set ulptusein = 0 so that the machine doesn't hang solid after aphk2001-10-121-1/+1
| | | | | | | printjob. There is probably a better fix, but this at least makes USB printing working again.
* KSE Milestone 2julian2001-09-121-3/+3
| | | | | | | | | | | | | | 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
* Pull in the current version of NetBSD's ulpt.c, supporting bidirectionaln_hibma2001-07-051-83/+201
| | | | communication with printers.
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* Fix for powering off a HP DJ950C during printing. As stated by Ian:n_hibma2000-11-071-0/+5
| | | | | | | | | | | When the printer is turned off the pipe write will cause and error, which causes lpd to close the device and reopen it to clear the error. After a short while the device will disappear from the bus but lpd will have opened the ulpt0 port by then. ulpt_status will check for status without checking the sc->dying flag and panic the kernel when the device finally disappears from the bus. Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
OpenPOWER on IntegriCloud