summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/ulpt.c
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Remove unneccessary includes. (phk)n_hibma2000-10-101-3/+1
|
* Remove __P prototypes to reduce diffs between the NetBSD and FreeBSDn_hibma2000-07-171-6/+6
| | | | versions.
* Sync with NetBSD:n_hibma2000-05-141-3/+3
| | | | Textual changes.
* Change Lennart's e-mail address.n_hibma2000-05-141-1/+1
|
* Remove 42 unneeded #include <sys/ioccom.h>.phk2000-05-031-1/+0
| | | | | | ioccom.h defines only implementation detail, and should therefore only be included from the #include which defines the ioctl tags, in other words: never include it from *.c
* OpenBSD has a broken debugger that does not grok static. Use an_hibma2000-04-031-5/+5
| | | | | | #define Static static that the OpenBSD folks can define it to be empty if they like.
* Synchronisation with NetBSD 1999/11/27n_hibma1999-11-281-4/+4
| | | | | | | | | | | | | | | | | - more req[uest]->xfer changes. - get the corresponding NetBSD Id's right ohci.c - move untimeout above print statement - remove usb_delay that panics the system (tsleep in intr context) when ohcidebug > 5. ugen.c - create the devices for endpoints with make_dev. uhub.c - change from using usbdebug to uhubdebug - add more debugging statements
* Revoke the vnodes on detach. This avoids the crashes people have seenn_hibma1999-11-211-1/+10
| | | | | | | when moused was still running when the mouse was detached. Convert uhid to use make_dev while I am there. Ugen still needs to be converted.
* Synchronisation with NetBSD as of 1999/11/16:n_hibma1999-11-171-37/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaning up the code: - Declare many functions static - Change variable names to make them more self explanatory - Change usbd_request_handle -> usbd_xfer_handle - Syntactical changes - Remove some unused code - Other KNF changes Interrupt context handling - Change delay to usbd_delay_ms were possible (takes polling mode into account) - Change detection mechanism for interrupt context Add support for pre-allocation DMA-able memory by device driver Add preliminary support for isochronous to the UHCI driver (not for OHCI yet). usb.c, uhci.c, ohci.c - Initial attempt at detachable USB host controllers - Handle the use_polling flag with a lttle more care and only set it if we are cold booting. usb.c, uhci.c ohci.c, usbdi.c usbdi_util.c usb_subr.c - Make sure an aborted pipe is marked as not running. - Start queued request in the right order. - Insert some more DIAGNOSTIC sanity checks. - Remove (almost) unused definitions USBD_XFER_OUT and USBD_XFER_IN. usb.c, usb_subr.c - Add an event mechanism so that a userland process can watch devices come and go. ohci.c - Handle the case when a USB transfer is so long that it crosses two page (4K) boundaries. OHCI cannot do that with a single TD so we make a chain. ulpt.c - Use a bigger buffer when transferring data. - Pre-allocate the DMA buffer. This makes the driver slightly more efficient. - Comment out the GET_DEVICE_ID code, because for some unknown reason it causes printing to fail sometimes. usb.h - Add a macro to extract the isoc type. - Add a macro to check whether the routine has been entered after splusb and if not, complain. usbdi.c - Fix a glitch in dequeueing and aborting requests on interrupt pipes. - Add a flag in the request to determine if the data copying is done by the driver or the usbdi layer.
* Rename remove_dev() to destroy_dev().phk1999-11-081-2/+2
| | | | Nagged about by: msmith
* ulpt.c and ums.c already uses make_dev(), so there's no need to use thepeter1999-11-081-2/+1
| | | | (presently broken) DEV_DRIVER_MODULE(). Use DRIVER_MODULE() directly.
* Major synchronisation with the NetBSD USB stack:n_hibma1999-10-071-68/+202
| | | | | | | | | | | - Some cleanup and improvements in the uhci and ohci drivers - Support for plugging and unplugging devices improved - Now available is bulk transport over OHCI controllers - Resume and suspend have been temporarily been disabled again. Proper support for it is available in the uhci.c and ohci.c files but I have not yet spent the brain cycles to use it. - OpenBSD now uses the USB stack as well - Add FreeBSD tags
* Remove five now unused fields from struct cdevsw. They should neverphk1999-09-251-5/+0
| | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags
* We use device_set_desc_copy, so we do not need to free the copied textn_hibma1999-08-281-1/+1
| | | | manually.
* Remove cmaj and bmaj args from DEV_DRIVER_MODULE.phk1999-07-041-2/+1
|
* This commit should be a extensive NO-OP:phk1999-05-301-5/+20
| | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors.
OpenPOWER on IntegriCloud