Commit Graph

1896 Commits

Author SHA1 Message Date
Nick Hibma
4fe1353de0 Correct the last parameter for clalloc 1999-11-28 21:07:11 +00:00
Nick Hibma
a9909bdaab Synchronisation with NetBSD 1999/11/27
- 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
1999-11-28 21:01:06 +00:00
Nick Hibma
961c5779bc Add devnames, the device names the drivers attached to for usbd.
0 -> NULL changes.
Add realloc (for OpenBSD)
1999-11-28 20:55:22 +00:00
Nick Hibma
3475de90b2 Add a quirk for the Altec ASC495 speakers. They pretend to support the
audio class, but they don't
1999-11-28 20:48:08 +00:00
Nick Hibma
cf6e42a4a9 Add PCI_USBREV_1_1 1999-11-28 20:47:27 +00:00
Nick Hibma
17d98133fb Add USB revision strings and numbers. 1999-11-28 20:46:29 +00:00
Nick Hibma
66272d3701 Remove some bogus bus methods peter added. We are hardly doing
anything as a bus.
1999-11-22 03:22:43 +00:00
Nick Hibma
937791192a Addition of new fields to the usb_devinfo struct to enable the new
and shiny usbd daemon to handle events.

usb_port.h:
- Add a macro to retrieve the unit number from a USBBASEDEVICE

usb.h, usb_subr.c:
- Add fields to the device_info struct.

usb_subr.c:
- Fill in the new fields.
- Remove the notification of the event up a bit to make sure all the
  information is still available to fill the usb_devinfo struct.

This requires recompilation of usbdevs (src/usr.sbin/usbdevs) and the
ezdownload/ezupload (ports/misc/ezload) utilities in any case.
1999-11-21 17:30:42 +00:00
Nick Hibma
88ea580e34 Revoke the vnodes on detach. This avoids the crashes people have seen
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.
1999-11-21 17:25:30 +00:00
Nick Hibma
6c1119c8a5 Enclosed the arguments of binary and in brackets. 1999-11-21 17:22:30 +00:00
Nick Hibma
6c20390aa7 Make the event creation work
- Create the /dev/usb event queue device node.
- Add usbread to the cdevsw.
- Also hide the many minor() behind a USBUNIT macro.
1999-11-19 13:13:28 +00:00
Nick Hibma
5630d3135e Add usbdevs and friends. 1999-11-18 18:02:44 +00:00
Nick Hibma
3d45ad67b2 Change the clist reservation from 0 to buffer size.
Submitted by:  mmoeller@infolibria.com
1999-11-18 12:50:48 +00:00
Nick Hibma
c907e117dd Missed a name change. 1999-11-18 12:45:09 +00:00
Nick Hibma
3241be7550 Synchronisation with NetBSD as of 1999/11/16:
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.
1999-11-17 22:33:51 +00:00
Nick Hibma
2c15f8aa97 Add many new devicelabels
Rename a few (I wish companies would stop buying each other)

Add a quirk entry for hubs that say they are self powered but are
in fact bus powered (usage in uhub follows shortly).
1999-11-12 23:31:03 +00:00
Nick Hibma
0e46cd3e22 Fix the computation of the status of the transfers. It never saw a STALLED
condition for Short transfers.

Change the scheduling to Depth first. We now transfer as many TD's as
possible from QH before moving to the next queue (Breadth first). It should
still be verified that this does not lead to starvation in a busy system
(in the case were transfers are added to the beginning of the control
or bulk queues).
1999-11-11 22:32:55 +00:00
Nick Hibma
babd82dfa2 Avoid the usurping message 1999-11-11 17:36:33 +00:00
Nick Hibma
0b0f3f6c3d The Qtronix keyboard has a built in PS/2 port for a mouse.
It however posts a bogus button up event once in a while. Whenever
we receive dx=dy=dz=buttons=0 we postpone adding it to the queue for
50msecs with a timeout. If in the meantime something else is posted
the event is ignored.

This avoids the problem Nik Sayer reported. He noticed that X windows
would drop and pick up a window once in a while.

Thanks, Nik, for supplying me with the keyboard to fix the problem!
1999-11-08 23:58:33 +00:00
Nick Hibma
25ead8013f Add QTronix keyboard with PS/2 mouse connector 1999-11-08 23:50:00 +00:00
Nick Hibma
396f1f268d remove superfluous header include
Submitted-By:	phk
1999-11-08 23:47:34 +00:00
Nick Hibma
031911c604 Remove superfluous header file includes
Remove definition of initialiser.

Some clean up.
1999-11-08 21:12:25 +00:00
Nick Hibma
24b4921ad1 Remove superfluous header file includes.
Pushed-By:	phk
1999-11-08 21:06:21 +00:00
Poul-Henning Kamp
44d1184e81 Rename remove_dev() to destroy_dev().
Nagged about by:        msmith
1999-11-08 07:44:01 +00:00
Peter Wemm
b09ce13f07 Use cdevsw_add() explicitly as a workaround for DEV_DRIVER_MODULE().
This should be changed to use make_dev() at some point.
1999-11-08 07:24:55 +00:00
Peter Wemm
bda20b64e4 ulpt.c and ums.c already uses make_dev(), so there's no need to use the
(presently broken) DEV_DRIVER_MODULE().  Use DRIVER_MODULE() directly.
1999-11-08 07:10:48 +00:00
Nick Hibma
cd7a0684fd Move the include of device.h into the NetBSD specific section.
Submitted by:	Guy Helmer <ghelmer@scl.ameslab.gov>
1999-10-08 07:38:11 +00:00
Nick Hibma
33ccf7c7a9 Make the umodem stub compile 1999-10-07 21:09:08 +00:00
Nick Hibma
53ec492bb8 Remove a debugging printf. 1999-10-07 21:08:29 +00:00
Nick Hibma
92fc9a510e Add make_dev and remove_dev. 1999-10-07 21:06:52 +00:00
Nick Hibma
354b93e124 priorities weren't correct (old version). 1999-10-07 20:58:43 +00:00
Nick Hibma
8c895d718b Major synchronisation with the NetBSD USB stack:
- 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
1999-10-07 19:26:38 +00:00
Nick Hibma
82799545e3 remove the use of uhci_reset to wake up the controller after
resume/suspend (->resume is broken again, will be fixed properly ASAP)

style fixes
1999-10-07 18:56:10 +00:00
Nick Hibma
271ef6615e Remove last bits and pieces of NetBSD porting.
Remove the use of ukbd_disconnect and replace it with direct
calls to disable.
Change printf to DPRINTF
Remove the use of usbd_lock, change it to splusb()/splx()
1999-10-07 18:53:08 +00:00
Nick Hibma
dc73fb2b83 Remove the last bits and pieces left over from porting the driver
from NetBSD.
1999-10-07 18:50:46 +00:00
Nick Hibma
aa9b0faecb Check for a valid irq number before calling BUS_SETUP_INTR.
Requested-By:	msmith
1999-10-03 20:23:25 +00:00
Poul-Henning Kamp
d6a0e38a1b Remove five now unused fields from struct cdevsw. They should never
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
1999-09-25 18:24:47 +00:00
Nick Hibma
2e771e0387 Typo: 'x' should be 'y' (only affects debugging output) 1999-09-01 21:37:56 +00:00
Nick Hibma
51b98897fa Only NetBSD needs sys/device.h. 1999-08-29 11:56:49 +00:00
Nick Hibma
a7fa9611ed Only NetBSD uses sys/device.h
Error-reported-by:	phk
1999-08-29 11:49:22 +00:00
Masahide MAEKAWA
52b18414f4 o fix typo 1999-08-29 02:05:12 +00:00
Masahide MAEKAWA
a0f9149b19 o synchronisation with NetBSD
Reviewed by:	Hick Hibma
Obtained from:	NetBSD
1999-08-29 01:18:32 +00:00
Nick Hibma
ca66889cf7 Correct URL's and change ifdef to if defined (following rest of style in
file)
1999-08-28 20:10:46 +00:00
Nick Hibma
805bb37eb5 Remove NetBSD specific code. USB part is trivial, and the rest is not
shared anyway.
1999-08-28 20:09:34 +00:00
Nick Hibma
d447ab3427 Thou shall do a make before commit.
[grmbl]
Fix duplicate elements in struct in previous commit.
1999-08-28 11:52:12 +00:00
Nick Hibma
d88879933b We use device_set_desc_copy, so we do not need to free the copied text
manually.
1999-08-28 11:35:36 +00:00
Nick Hibma
f748f71688 Share more between FreeBSD and NetBSD 1999-08-28 11:31:21 +00:00
Nick Hibma
7e8893c9b4 Update the list of devices from NetBSD 1999-08-28 09:39:54 +00:00
Doug Rabson
50de873b59 Fix DMA macros to work on alpha. 1999-08-26 08:41:41 +00:00
Doug Rabson
22147525d2 Don't schedule the next transaction if the pipe is being aborted. 1999-08-26 08:40:55 +00:00
Nick Hibma
0b77022752 Reset the UHCI controller when the device comes back from suspend.
This should be replaced by proper support for suspend one day (global
suspend).

Submitted-by:   Christopher Masto <chris@netmonger.net>
1999-08-23 21:00:08 +00:00
Kazutaka YOKOTA
800da3b22a - Remove cdevsw entry points in individual keyboard drivers;
instead, use generic entry points for all drivers.
- Eliminate bogus makedev().
- Eliminate softc in the lower drivers, as it is no longer necessary.

Submitted (95%) by: phk
1999-08-22 09:52:33 +00:00
Nick Hibma
25519565df 1) rename dev->self to be consistent
2) use device_printf
3) properly tear down and disable interrupts when init fails
1999-08-18 10:24:59 +00:00
Nick Hibma
6efd8273f4 - Added documentation
- fix bug in data toggle handling
1999-08-17 07:36:34 +00:00
Nick Hibma
e0f5b7a3be Protect the file interface against disconnects. 1999-08-12 18:55:41 +00:00
Matthew N. Dodd
15317dd875 Alter the behavior of sys/kern/subr_bus.c:device_print_child()
- device_print_child() either lets the BUS_PRINT_CHILD
	  method produce the entire device announcement message or
	  it prints "foo0: not found\n"

Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on
the previous behavior of device_print_child() (printing the
"foo0: <FooDevice 1.1>" bit of the announce message.)

Provide bus_print_child_header() and bus_print_child_footer()
to actually print the output for bus_generic_print_child().
These functions should be used whenever possible (unless you can
just use bus_generic_print_child())

The BUS_PRINT_CHILD method now returns int instead of void.

Modify everything else that defines or uses a BUS_PRINT_CHILD
method to comply with the above changes.

	- Devices are 'on' a bus, not 'at' it.
	- If a custom BUS_PRINT_CHILD method does the same thing
	  as bus_generic_print_child(), use bus_generic_print_child()
	- Use device_get_nameunit() instead of both
	  device_get_name() and device_get_unit()
	- All BUS_PRINT_CHILD methods return the number of
	  characters output.

Reviewed by: dfr, peter
1999-07-29 01:03:04 +00:00
Nick Hibma
2cc20f83b3 Every reqh in an aborted pipe is given status CANCELED and the callback is
called. It might be necessary to split that routine into two parts in
which calling the callback is not done at splusb().
1999-07-27 20:22:29 +00:00
Nick Hibma
6d38342e16 Add comments, change variable names to make them consistent (r -> err,
timo_handle -> timeout_handle, p -> pipe, *pipe -> *rpipe, etc.)
1999-07-25 18:54:22 +00:00
Poul-Henning Kamp
03016f421b Remove cmaj and bmaj args from DEV_DRIVER_MODULE. 1999-07-04 14:58:56 +00:00
Nick Hibma
2677b5a4db Add the semi-official Bulk protocol id 'P' 1999-07-03 22:19:41 +00:00
Nick Hibma
fd7a5fcd8e Add MultiTech Atlas modem 1999-06-27 22:28:02 +00:00
Nick Hibma
616ff839aa Remove superfluous semi-colon 1999-06-27 22:24:20 +00:00
Nick Hibma
178e4460ef Replace usbd_device_set_desc by device_set_desc_copy 1999-06-27 09:42:40 +00:00
Nick Hibma
7678b59a40 Change 'device' to 'self', to be more like the rest of the code 1999-06-26 12:55:25 +00:00
Nick Hibma
923938f93a Only print the device name once, during attach (device_quiet) 1999-06-21 21:32:15 +00:00
Nick Hibma
c1fc766d3f 1) Do not include usbdivar.h and access the interface descriptor through
usbd_get_interface_descriptor
2) remove soft reset. It's been dropped from the USB Mass Storage Bulk-Only
   Specification
3) move the clear feature halt to the reset routine.
1999-06-20 15:46:13 +00:00
Nick Hibma
f06b2abff3 Remove option USBVERBOSE
Add the options for debugging used in dev/usb/*.c

Submitted by:	Kazu
1999-06-16 17:34:36 +00:00
Nick Hibma
85dd1453b1 1) remove the soft reset after a command failed.
2) remove printing of errno and errstr
1999-06-13 22:09:14 +00:00
Nick Hibma
7b69218647 1) Add non-blocking I/O on read
2) Add checks to make sure we do not dereference the softc when not found
because the device has been removed.
1999-06-13 20:49:12 +00:00
Nick Hibma
b24ecce39c Shorten the strings a bit (remove 'Host') 1999-06-13 20:46:10 +00:00
Nick Hibma
bb32aa3960 Add remark about where bInterfaceProtocol number for USB Zip drive comes
from. 0x50 == 'P' for protoype.

Obtained from:	Pat LaVarre <LAVARRE@iomega.com> on linux-usb@suse.com
1999-06-04 12:41:42 +00:00
Nick Hibma
509a03961f USB stopped working as of the recent cdevsw cleanup. This fixes that. 1999-06-01 07:22:01 +00:00
Nick Hibma
20f81fcbbc Remove the stub driver. It's useless. 1999-06-01 07:18:53 +00:00
Nick Hibma
a0557cd697 usbd_get_request_status now only returns the value if the associated
pointer is passed.
1999-06-01 06:39:03 +00:00
Nick Hibma
114278b089 1) Remove the definition of usb_cdc_generic_descriptor_t. It is
equivalent to usb_descriptor_t

2) Rename USB_CDC_CM_CM_OVER_DATA to USB_CDC_CM_OVER_DATA
1999-05-31 22:35:55 +00:00
Poul-Henning Kamp
2447bec829 Simplify cdevsw registration.
The cdevsw_add() function now finds the major number(s) in the
struct cdevsw passed to it.  cdevsw_add_generic() is no longer
needed, cdevsw_add() does the same thing.

cdevsw_add() will print an message if the d_maj field looks bogus.

Remove nblkdev and nchrdev variables.  Most places they were used
bogusly.  Instead check a dev_t for validity by seeing if devsw()
or bdevsw() returns NULL.

Move bdevsw() and devsw() functions to kern/kern_conf.c

Bump __FreeBSD_version to 400006

This commit removes:
        72 bogus makedev() calls
        26 bogus SYSINIT functions

if_xe.c bogusly accessed cdevsw[], author/maintainer please fix.

I4b and vinum not changed.  Patches emailed to authors.  LINT
probably broken until they catch up.
1999-05-31 11:29:30 +00:00
Nick Hibma
6e3802969a Enable attachment of multiple drivers to a single device. 1999-05-30 18:49:17 +00:00
Nick Hibma
2eaf666111 Notify CAM of the removed device on detach. 1999-05-30 18:46:04 +00:00
Poul-Henning Kamp
4e2f199e0c This commit should be a extensive NO-OP:
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.
1999-05-30 16:53:49 +00:00
Nick Hibma
8c701b4eef 1) Add URL for printer class specification
2) Change name of UE_IN to UE_DIR
3) Enable printing of the Printer Id string
4) Clean up debugging output while we are at it.
1999-05-30 13:03:00 +00:00
Nick Hibma
12788196b1 - When aborting an interrupt pipe, just wait for 1ms for the completion
of the current interrupt trasaction.
- Do not schedule the next interrupt transaction if the pipe is being
aborted or the last round of the interrupt transaction ended with error.

Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1999-05-30 12:49:39 +00:00
Nick Hibma
c9efdb87e8 When the mouse is being disconnected, do the followings:
- Call ums_disable() to abort the pipe.
- Do not wake up processes which has been waiting or polling for mouse
  data.  It won't be available anymore.

Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1999-05-30 12:48:49 +00:00
Nick Hibma
f26c33d249 usbdi.h:
Implement priorities.
GENERIC, LINT, files:
        Remove remarks about ordering of device names.
GENERIC, LINT:
        Sort the devices alphabetically in LINT and GENERIC.
1999-05-20 20:02:37 +00:00
Nick Hibma
91ea20f498 Add comment about split in driver 1999-05-20 19:52:04 +00:00
Nick Hibma
4cc318579c Enable the support for a file interface on the HID driver for
easy testing of the HID reports that come back.

Submitted by: MAEKAWA Masahide <bishop@rr.iij4u.or.jp>
1999-05-09 20:13:51 +00:00
Nick Hibma
818850c6eb Added Thrustmaster Fusion Digital Gamepad 1999-05-09 18:29:37 +00:00
Poul-Henning Kamp
52400704e9 Unconfuse DEV_MODULE() and DEV_DRIVER_MODULE() about the difference between
a major number for a dev_t.
1999-05-09 13:00:50 +00:00
Doug Rabson
566643e39e Move the declaration of the interrupt type from the driver structure
to the BUS_SETUP_INTR call.
1999-05-08 21:59:43 +00:00
Peter Wemm
9eea90b55d Trivial tweak to avoid a warning. 1999-05-08 21:36:03 +00:00
Poul-Henning Kamp
1637aa4b1c Fix some of the places where too much inside knowledge about major/minor
layout and dev_t structure is being (ab)used.
1999-05-08 07:02:41 +00:00
Poul-Henning Kamp
46eede0058 Continue where Julian left off in July 1998:
Virtualize bdevsw[] from cdevsw.  bdevsw() is now an (inline)
        function.

        Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention
        to the order of the cmaj/bmaj arguments!)

        Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE
        (ditto!)

(Next step will be to convert all bdev dev_t's to cdev dev_t's
before they get to do any damage^H^H^H^H^H^Hwork in the kernel.)
1999-05-07 10:11:40 +00:00
Kenneth D. Merry
169b302922 Take out calls to cam_sim_set_basexfer_speed(), the base transfer speed is
now returned in the path inquiry CCB.

Submitted by:	Nick Hibma <hibma@skylink.it>
1999-05-06 21:12:58 +00:00
Nick Hibma
4ea5aa83d4 Add new member for XPT_PATH_INQ, follows recent changes in
version v1.2 of cam_sim.h.
1999-05-06 20:58:37 +00:00
Nick Hibma
139559717b Descriptors can be delivered with short transfers. 1999-05-03 23:21:28 +00:00
Nick Hibma
a13cdf0c74 Add a load of definitions 1999-05-03 23:20:37 +00:00
Nick Hibma
42be55493c Remove disconnected method 1999-05-03 23:19:55 +00:00
Nick Hibma
561a70bd94 Replace UE_GET_IN with UE_GET_DIR
Remove freeind of description. Is done by subr_bus.c.
1999-05-03 23:19:32 +00:00
Nick Hibma
0bf8525354 Replace UE_GET_IN with UE_GET_DIR 1999-05-03 23:18:11 +00:00
Nick Hibma
f99abb25a6 Change '#if UKBD_DEBUG' to '#ifdef...'
Remove freeing of description on detach. Is done by subr_bus.c.
1999-05-03 23:16:05 +00:00
Nick Hibma
6fed05b974 Remove double removal of children of a hub. (remove disconnected method)
This was introduced when merging a patch for the newbus people.

And change the debugging flag from USB_DEBUG to UHUB_DEBUG.
1999-05-03 23:14:46 +00:00
Nick Hibma
808844911f Add URL to HID spec 1999-05-03 23:13:14 +00:00
Nick Hibma
f018dbb4d9 Clean up parts of struct shared between NetBSD and FreeBSD 1999-05-03 23:12:49 +00:00
Nick Hibma
7b3849971a Clean up debugging output 1999-05-03 23:11:41 +00:00
Nick Hibma
b7b075a2a2 Add driver for the Iomega Zip 100 drive. 1999-05-02 21:54:05 +00:00
Nick Hibma
5801da881d Oops. Introduced a typo in one of previous commits. 1999-05-01 23:59:09 +00:00
Nick Hibma
4933978a5f Clean up uhci_intr. Avoid acknowledging mutliple interrupts with
multiple writes.
1999-05-01 23:46:02 +00:00
Nick Hibma
e017ab4741 Correct maximum error count in TD initialisation for transfer from 2 to 3. 1999-05-01 23:38:46 +00:00
Nick Hibma
146a3db349 Clean up debugging output, rename printf to DPRINTF and set some
debugging levels to more sensible values.
1999-05-01 23:35:41 +00:00
Nick Hibma
1a7cfd07a3 Move the disabling of interrupts right before the allocation of the
resource. Avoids useless interrupts occurring between the allocation
of the interrupt resource and the final initialisation of the
kernel. Cause of these interrupts is unknown (a resuming device?).
1999-05-01 23:30:09 +00:00
Nick Hibma
9deb189ddc Z direction was upside down.
Submitted By: MAEKAWA Masahide
1999-05-01 13:17:47 +00:00
Nick Hibma
04f5d6d7a2 Added vendor OmniVision and camera 1999-05-01 13:16:35 +00:00
Nick Hibma
63b6d959ae Forgot one.
Original log message:

Remove feature creep: STAILQ_REMOVE_HEAD_UNTIL added it for convenience
but we can do without it.

Obtained from:	Peter Wemm
1999-04-21 12:08:07 +00:00
Nick Hibma
38a3a046fc Remove feature creep: STAILQ_REMOVE_HEAD_UNTIL added it for convenience
but we can do without it.
1999-04-20 22:37:18 +00:00
Nick Hibma
42b8d61161 1) Change printf's into DPRINTF.
2) rename variables to be more conclusive.
3) fix a problem in uhci_ii_done. Avoid collecting all the status's of the
TD's, we only need to one from the last inactive one.
4) Change the errorcount from 2 to 3 (see UHCI spec.).
1999-04-20 21:35:27 +00:00
Nick Hibma
272bc74e12 Add defines for Mass Storage Bulk-Only and COmmun. Class devices. 1999-04-20 21:25:29 +00:00
Nick Hibma
157ddd9539 Enclose .hcidebug in '#ifdef N.HCI' 1999-04-20 21:10:43 +00:00
Nick Hibma
49ae25e811 1) Add Rockfire vendor and gamepad product (MAEKAWA Masahide)
2) Sort the list again (Roger Hardiman)
3) Reinstate a piece of code to look for a name for a device
   if none is found in the device itself.
1999-04-19 20:25:18 +00:00
Nick Hibma
921a038ad5 UHCI_DEBUG should of course be OHCI_DEBUG
Reported by: MAEKAWA Masahide <bishop@rr.iij4u.or.jp>
1999-04-17 21:48:03 +00:00
Peter Wemm
6182fdbda8 Bring the 'new-bus' to the i386. This extensively changes the way the
i386 platform boots, it is no longer ISA-centric, and is fully dynamic.
Most old drivers compile and run without modification via 'compatability
shims' to enable a smoother transition.  eisa, isapnp and pccard* are
not yet using the new resource manager.  Once fully converted, all drivers
will be loadable, including PCI and ISA.

(Some other changes appear to have snuck in, including a port of Soren's
 ATA driver to the Alpha.  Soren, back this out if you need to.)

This is a checkpoint of work-in-progress, but is quite functional.

The bulk of the work was done over the last few years by Doug Rabson and
Garrett Wollman.

Approved by:	core
1999-04-16 21:22:55 +00:00
Nick Hibma
67aa00a71b 1) Make debugging more selective.
2) create function usbd_errstr which turns a usbd_status into a sensible
   error message
3) Change the printf in DPRINTF to logprintf which is a define for
   log(KERN_DEBUG, x)
1999-04-11 20:50:33 +00:00
Nick Hibma
91fe4c07fa Applied patch for ukbd disconnect. Disconnect not fully functional
yet however.

Supplied by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1999-04-11 16:49:15 +00:00
Nick Hibma
49de1dd30d USBD_STALLED bit checking was inconsistent. Mixed use of == and &
Patch provided by: Kazutaka YOKOTA
1999-04-11 16:43:48 +00:00
Nick Hibma
2115c3404f Remove unit from struct. Not used anymore. 1999-04-11 16:22:57 +00:00
Nick Hibma
f6f5fdd730 Reenable the recursive disconnection from a hub. Stop gap solution
until the newbus version of uhub.c is ready.

Submitted by: Kazutaka YOKOTA
1999-04-11 14:24:43 +00:00
Nick Hibma
5e36e2fe52 Changed pci_config_read() to pci_map_port(). Pointed out by Doug Rabson. 1999-04-11 14:24:20 +00:00
Nick Hibma
948d2900b2 1) Add Lucent USS-720 eval kit
2) Rename Epson printer cable to proper name
1999-04-08 23:26:50 +00:00
Nick Hibma
95b1c9ac5d 1) Add AKS USB-HASP 0.6
2) Rename Lucent -> Epson
   (Undoes previous commit, Mike agrees)
1999-04-08 23:13:17 +00:00
Mike Smith
0858cc98d3 Add the Lucent USS-720 ISD Smart Cable. 1999-04-08 20:50:51 +00:00
Nick Hibma
7ae8132edd Added macro logprintf 1999-04-07 17:07:07 +00:00
Nick Hibma
61f973056b fix typo 1999-04-06 23:09:58 +00:00
Nick Hibma
7b9e192e28 1) Add the defines for the Mass Storage class
2) Add comments
	3) Add UE_DIR to replace the querying of UE_IN directly
1999-04-05 17:23:54 +00:00
Nick Hibma
ff0ccda34e change wrong names in prototypes (pipe to dev) 1999-04-05 17:19:48 +00:00
Nick Hibma
5163f215e0 Add the defines for the Iomega Zip 100 drive 1999-04-05 17:12:46 +00:00
Nick Hibma
1294cd03e1 bugfix: initialise timeout for usbd_device_request as well.
moved statements around to reflect sequence in the struct, to make
	finding these discrepancies easier.
1999-04-05 17:01:52 +00:00
Nick Hibma
44e361fd80 added vision camera 1999-03-31 23:53:48 +00:00
Nick Hibma
e1c81f1d94 Cleaning up of code, remove unneeded cruft and make
code more compact.
1999-03-27 23:08:44 +00:00
Nick Hibma
acf3654412 Added a number of device names: Konica, Microsoft, Macally 1999-03-24 07:46:53 +00:00
Nick Hibma
d0ef08ba15 Check whether the PIRQD enable bit is set in LegSup and if not, set it.
On my PIIX4 chip rev 1 this is required. Have not had any complaints from
other people so it might be a problem with this stepping.
1999-03-23 21:37:45 +00:00
Nick Hibma
7dfd509563 1) clean up debugging output
2) remove erroneous querying of PCI LegSup register while it should be
   fetched from PCI config space
3) change name of define for this register
1999-03-23 21:35:57 +00:00
Nick Hibma
83fac6ab3f Cosmetical changes. 1999-03-22 19:58:59 +00:00
Nick Hibma
86df1e04cc Implementation of the keyboard driver.
Done by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1999-03-22 19:55:30 +00:00
Nick Hibma
5e294a20cf Moved timeout initialisation a bit earlier in the process. The
untimeout function triggered panics once in a while.
1999-03-22 19:52:28 +00:00
Nick Hibma
ab18313bcb Move untimeout up before call to uhci_ii_done, avoids panic in
untimeout.

Submitted by Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
and gehenna@jp.FreeBSD.org.
1999-03-08 22:27:07 +00:00
Nick Hibma
88cac66373 Bug fix: Trap 12 when ugen not present and therefore unattached physical
device removed.
1999-02-21 16:53:35 +00:00
Nick Hibma
f96f6ae5d8 Device unload code is broken, disabled. Requires a bit of redesign on the
part of the uhub driver to be able to fix it. Modules should not be
unloaded as they unload partially. Not easy to fix either.
1999-02-21 16:36:30 +00:00
Nick Hibma
6b769ffb36 make ums look like a Mouse Systems or Sysmouse mouse. Remove PS/2 interf.
Supplied by MAEKAWA Masahide <bishop@rr.iij4u.or.jp>. Thanks!
USB Mouse now supports up to 7 buttons and X,Y,Z (wheel) directions.
1999-02-21 16:20:19 +00:00
Nick Hibma
7d0d9122c9 Bug fix: devcount was running from [count..0], should be [count-1..0] 1999-02-20 19:22:00 +00:00
Nick Hibma
d894d5dedb 1) In polling mode (during boot) the callout_handle wasn't
initialised (PR1).
	Thanks to "Louis A. Mamakos" <louie@TransSys.COM> for his patient
	testing of my mods.
     2) Removed some debugging output (PR1)
1999-02-19 22:48:28 +00:00
Nick Hibma
fe5ba84529 Moved [uo]hci_pci.c from /sys/dev/pci to /sys/pci after Soren
threatened to send Bruce. These files are no longer shared
   with NetBSD anyway.

   Requires a config and make depend.
1999-02-18 21:42:19 +00:00
Nick Hibma
e99cd85d69 Moved busreset in uhci_init up to avoid clearing of FLBASE in Via 83572
(PR1)
1999-02-18 21:03:10 +00:00
Nick Hibma
fe7627280b Applied patch from MAEKAWA Masahide <bishop@rr.iij4u.or.jp>. (PR2)
Seems to solve a problem with a mouse not responding to movements in the
X direction. Problem description is still rather vague and solution is
not exactly clear. Problem might be a compiler optimisation.
1999-02-15 21:41:43 +00:00
Nick Hibma
48f79d0e5c Added more verbose debugging output to uhci_run 1999-02-15 20:43:17 +00:00
Nick Hibma
aa11c7f9d1 Added UHCI_LEGSUP to uhcireg.h 1999-01-31 16:22:35 +00:00
Matthew Dillon
0a5e03dda5 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-28 01:59:53 +00:00
Matthew Dillon
8aef171243 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-28 00:57:57 +00:00
Nick Hibma
7613dbd346 add LEGSUP to uhci_dumpregs 1999-01-22 21:52:46 +00:00
Nick Hibma
1f7b3fe5be forgotten in previous commit: Lowered default debug level 1999-01-22 01:02:24 +00:00
Nick Hibma
ab521a755e Fixed disconnect for umouse 1999-01-22 00:59:52 +00:00
Nick Hibma
235dddd4ea Textual changes 1999-01-22 00:51:12 +00:00
Nick Hibma
5602b5091c Fixed bug in disconnect handling in uhub.c 1999-01-22 00:44:31 +00:00
Nick Hibma
cf4e36da61 Fixed bug that made UHCI controllers fail to start. 1999-01-21 23:31:58 +00:00
Nick Hibma
88a610db55 Cleaning up, improving _detach, removing ominous warning (msmith) 1999-01-21 23:06:02 +00:00
Nick Hibma
f8c31e6fac Added ioctl interface 1999-01-21 22:56:10 +00:00
Nick Hibma
5f2848a953 Removal unneccessary definitions 1999-01-14 01:35:12 +00:00
Nick Hibma
1c8fa23724 Corrected the latent fact that the uhub driver was providing a driver for
the usb device class instead of the uhub devclass. Only a problem with more
than one USB host controller.
1999-01-14 01:28:15 +00:00
Nick Hibma
86d7ad019e Added Entrega Parallel and Serial Connectors to the information
file.
1999-01-14 01:18:44 +00:00
Nick Hibma
bc2093747f Changed 'xxxdebug = 0' to '...= 1' (Brian Feldman) 1999-01-13 01:09:14 +00:00
Nick Hibma
796a3c0d00 1) Bug fix: Interrupt transfers worked only for the first packet.
The second packet was not seen as finished.
2) Textual changes
1999-01-13 00:50:02 +00:00
Eivind Eklund
037e944431 Cast argument to avoid warning.
Reviewed by:	Nick Hibma <n_hibma>
1999-01-12 12:46:36 +00:00
Eivind Eklund
26ccf6d24a %b takes ints, not u_longs. 1999-01-12 02:22:59 +00:00
Nick Hibma
fa99797979 Take cdev major # 114 for ugen 1999-01-12 01:31:13 +00:00
Nick Hibma
627246f4dc 1) textual changes
2) bug fix in handling of select (or presumed bug)
3) trigger a mouse packet on the Z direction as well (but Z still not
   working)
1999-01-12 01:21:15 +00:00
Nick Hibma
991a64f7ba Changed DRIVER_MODULE to CDEV_DRIVER_MODULE 1999-01-12 01:18:38 +00:00
Nick Hibma
34dced2c1a Added file handling to ulpt (USB printer) driver 1999-01-11 00:03:59 +00:00
Nick Hibma
53809e8652 Sync with NetBSD sources. Almost there. Mostly style fixes. 1999-01-10 18:42:54 +00:00
Eivind Eklund
95ddc5daa5 USUBCLASS_MODEM -> USUBCLASS_ABSTRACT_CONTROL_MODEL
Matches the header file change, and makes this compile.
1999-01-08 17:25:37 +00:00
Nick Hibma
a73f7cf01f Major synchronisation with NetBSD USB code 1999-01-07 23:07:57 +00:00
Nick Hibma
f21bc50cc2 queue.h has taken over this functionality 1999-01-06 23:16:45 +00:00
Nick Hibma
3523e1b5a7 Big oops, wrong major number in source 1999-01-05 09:33:23 +00:00
Nick Hibma
0d3c3d3942 Corrected the major number for usb and added ums as major 111 1999-01-03 16:48:03 +00:00
Nick Hibma
fd3ae282c5 Added UCLASS_CDC definitions to usb.h 1998-12-15 07:06:51 +00:00
Julian Elischer
6384b0f1bb The OHCI interfaces I have access to map their control regs etc. into
memory address space rather than IO space.. reflect this when looking for the
interface revision register.

If this is not true for them all then we probably need some smarter code.
1998-12-14 21:14:11 +00:00
Nick Hibma
6fef2c2c27 Added Id to all files 1998-12-14 09:32:25 +00:00
Nick Hibma
f287ad3471 Added Id 1998-12-14 09:31:41 +00:00
Nick Hibma
680a2f48d9 Added comment 1998-12-14 09:15:19 +00:00
Nick Hibma
def348d45a Added copyright and Id 1998-12-14 09:13:29 +00:00
Nick Hibma
1806e812ae small oops on previous bug fix, it's late... 1998-12-13 23:53:42 +00:00
Nick Hibma
67aabdd8b7 small bug fix 1998-12-13 23:26:41 +00:00
Nick Hibma
9501b6d6b8 Removed unneeded definition 1998-12-13 23:16:20 +00:00
Nick Hibma
eca58e5e00 dded the stubs for umodem and ucom (communications class driver). They are nothing other than
the ugen driver with different variable names.
1998-12-13 23:04:35 +00:00
Nick Hibma
3e041e6116 Updated USB kernel sources to NetBSD sources of 1998-12-09.
1 bug fix and several textual changes.
Preparing to feed back changes for port into NetBSD to create one source base.
1998-12-13 22:27:42 +00:00
Nick Hibma
da3ff61390 Fixed warning in usr.sbin/usbd 1998-12-12 11:57:59 +00:00
Julian Elischer
8cbe8a3ebf If we failed to probe/attach somehow, we never have a sc->sc_hcca
but the present PCI probe code still thinks we are there as the pci attach
can't return an error code.

This means we are in the shared interrupt list, but have not been set up.
If we are sharing ints with another device, ohci_intr will be called and will
coredump on a NULL reference. So just return if it is called when not set up.

This fixes the symptom and not the cause.
The right answer is to let the PCI system know that the attach failed,
or to fail earlier (in the PCI probe).
The attach() is a void fn() so it can't return failure..
1998-12-11 06:02:06 +00:00
Nick Hibma
97797dc959 Various bug fixes:
1) Removed 'emulation' of bitmaps in printfs, FreeBSD seems to have caught
  up on that one
2) Fixed a few bugs in the timeout/timo timeout variables
3) First attempt at fixing a bug mentioned by Kazu: uhci_run is not able
  start/stop his USB host on his motherboard.
1998-12-09 23:36:15 +00:00
Nick Hibma
a48e33e094 Preliminary support for OHCI motherboards 1998-12-09 23:28:43 +00:00
Nick Hibma
0cec007c5f Initial commit of ported NetBSD USB stack 1998-11-26 23:13:13 +00:00