Commit Graph

144 Commits

Author SHA1 Message Date
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