Commit graph

3694 commits

Author SHA1 Message Date
Nick Hibma 2aff98945c Properly teardown the allocated and initialised stuff when an error
occurs (OHCIwas already done for UHCI).

Get rid of the usbus variable. It is confusing.

Align uhci_pci.c and ohci_pci.c again.
2000-01-26 10:52:27 +00:00
Nick Hibma 9e2bdb4369 Don't set ivars until we checked the return value from device_add_child. 2000-01-26 10:27:12 +00:00
Nick Hibma 06ffae8586 Add comments 2000-01-26 08:46:41 +00:00
Doug Rabson 150630c449 Make this lot build on alpha. 2000-01-25 22:23:48 +00:00
Doug Rabson d64d73c906 * Don't use ivars to access resources, bus_set/get_resource is much better.
* First approximation of making this work on alpha (not working yet).
2000-01-25 22:21:45 +00:00
Søren Schmidt 0817db9f98 Retry a bit more agressively on the atapi identify.
Try to support older systems reporting irq0 for the first channels.

Support sharing of the std interrupts (says peter :) )

Dont use READ_CD on normal data reads (2048 bytes), too many old drives
doesn't support this command even if the std says "shall" :(, but still
use READ_CD on all other blocksizes.

Add the geometry to the ad probe, its still usefull.
2000-01-25 20:14:51 +00:00
Nick Hibma f68d3a9c5c Add usbd_clear_endpoint_toggle(pipe) function.
This is needed to implement a asynchronous callback for clear endpoint
stall, needed for the umass driver.
2000-01-25 18:40:39 +00:00
Nick Hibma ad705781e1 Correct subroutine names in DPRINTF 2000-01-25 18:37:58 +00:00
Peter Wemm 931e989797 Always leave SP_DCEN on (monitor DCD). Otherwise the firmware *really*
does ignore DCD.  Even TIOCMGET cannot read DCD as the firmware doesn't
report it.  This has pretty interesting effects for ppp(8) which runs
in clocal mode and polls carrier (!).  (Specialix's linux driver does
this too)

Also update the firmware to 3.0.6 for the SX cards, as apparently there
was a problem with floating (disconnected) DCD pins causing stray carrier
transitions, especially at port open time.

It seems to work here, and carrier loss is detected nearly immediately
rather than having to wait for a LQR timeout (a few minutes) before ppp(8)
gives up.

DCD problem noted by: nsayer
2000-01-25 16:45:54 +00:00
Søren Schmidt fe08efdcfb General cleanup.
Dont be so verbose in the probe, only ONE line printed now, to get more
info boot verbose. Centralise most printf's in ata-all & ata-dma to use
the ata_printf function, it saves alot of codelines.

Repeat the identify command if drive fails the first.

Protect the timeout functions with splbio.

Dont update the transfer details before we are sure the transfer
succeded, this way they are proberly retried on errors.

Move the handling of next_writeable to userland.

Use the READ_CD command to read CD's. That enables us to read _anything_
via the normal read/write interface. This kindof obsoletes the READAUDIO
ioctl, but we keep that for now.
2000-01-24 20:45:24 +00:00
Bill Paul f43d9309a5 Add support for DM9102A boards with Davicom DM9801 HomePNA PHYs. 2000-01-24 17:19:37 +00:00
Roger Hardiman cfa7b44621 Update to driver 2.07
Add new Channel Set for France. Submitted by Daniel Dagneaux <dagneaux@lure.u-psud.fr>
2000-01-24 14:00:34 +00:00
Roger Hardiman 12504d0820 Update to driver 2.07
Update i2c code to build on FreeBSD 3.x and 4.x machines.
Added GPIO audio values for the Askey/Dynalink TV card talken from postings on the V4L mailing list.
Update Australian Channel Set. Submitted by John Birrell <jb@cimlogic.com.au>
Add new Channel Set for France. Submitted by Daniel Dagneaux <dagneaux@lure.u-psud.fr>
2000-01-24 14:00:21 +00:00
Kazutaka YOKOTA 3c0931ff87 Fix a bug exposed by the previous commit. Do not use scp->font_size,
if the screen is in a graphics mode

Reported by: Maxim Sobolev <sobomax@altavista.net>
2000-01-24 13:44:39 +00:00
Nick Hibma dd3d335141 The previous fix for the USB ugen device set configuration ioctl()
has a slight error, and returns EIO way too often.

PR:		16315
Submitted by:  Louis Mamakos <louie@TransSys.COM>
2000-01-24 10:23:57 +00:00
Doug Rabson f0aac6a503 Add a workaround to which allows alphas to reserve a port range which
doesn't conflict with the parallel port on my miata (0x3bc..0x3bf).
The right solution will be to reserve two port ranges in vga, 0x3b0..0x3ba
and 0x3c0..0x3ca.

Reviewed by: yokota
2000-01-24 09:22:51 +00:00
Peter Wemm 67d5be5275 Ack! I totally botched the pci probe routine which resulted in it trying
to match everything else *but* a specialix pci card. *blush*.
2000-01-24 08:11:10 +00:00
Peter Wemm b830d4388e A bit more newbusification of si. This still isn't quite finished.
Split out the bus attachments so the impact of the bus xxxvar.h files
with the inline macros for the ivars are confined to one file each.
2000-01-24 07:24:02 +00:00
Warner Losh 25f061dedd Fix plug and play support:
o Cut out the probed stuff.  We no longer need it since newbus implicitly
  checks for this (likely bt can be changed as well in this way).
o Add preliminary support for unload.  Untested because aha doesn't yet
  support identify and there are some interactions with PnP that I've
  not yet worked out.

With this I can boot the AHA-1542CP FW F.0.  All the aha resources
appear to be picked up via pnp now.
2000-01-24 07:08:40 +00:00
Peter Wemm 5b249744bd Initial attempt at newbusification of the specialix si/xio/sx driver.
The files were repo copied from their original location and are part
way towards being portable.
This should unbreak the EISA support in the driver.
I have not updated files* yet as I'm not quite finished.
2000-01-23 22:51:49 +00:00
Peter Wemm fe8140cd15 Fix some warnings. 2000-01-23 19:27:11 +00:00
Peter Wemm 62797de451 remove "extern int cold" from SPLUSBCHECK - it causes a heap of warnings. 2000-01-23 19:26:16 +00:00
Peter Wemm 10a1190c8b Fix a warning in DIAGNOSTIC code. 2000-01-23 19:25:29 +00:00
Peter Wemm 6ff37636a3 Remove #if 0'ed reference to isa_device->id_alive 2000-01-23 18:21:20 +00:00
Nick Hibma db972b58b5 Check whether we can change config at all. If any of the endpoints
has been opened, we should not allow configuration changes as endpoint
descriptors might disappear.

PR:	16256, 16168
2000-01-23 15:48:29 +00:00
Nick Hibma bf79729b6e Zap the vnodes for the control endpoint as well. 2000-01-23 15:42:08 +00:00
Nick Hibma 9c918de3de Return ENXIO on error, not 0. Seems to have been skipped when converting
to newbus.

Reviewed by:	bde
2000-01-23 15:11:15 +00:00
Peter Wemm 0f063508d7 Some newbus-inspired tidy-ups. Use device_identify() rather than scanning
the resource table to locate children.  The 'at ppbus?' can go again.
Remove a few #if Nxxx > 0' type things, config arranges this for us.
Move the newbus method glue next to the DRIVER_MODULE() stuff so we
don't need extra prototypes.
Don't set device descriptions until after the possibility of the probe
returning an error.
Remove all cdevsw_add() calls, all the drivers that did this also use
make_dev() correctly, so it's not required.
A couple of other minor nits.
2000-01-23 14:41:04 +00:00
Peter Wemm a3a2b1e1b2 Note the PnP id's for the NMX2210 next to the id's where they are used.
The pnpbios doesn't supply a description in the case we've seen so
supply one.
2000-01-23 13:17:03 +00:00
Peter Wemm 1816634e49 Clean up some more loose ends..
isa_device->id_ri_flags and RI_FAST were not implemented and did nothing.
The two drivers that were mistakenly thinking this was working were
cy.c and loran.c - these should be converted to newbus.
GC (garbage collect) isa_device->id_alive
GC userconfig.c references to isa_device->id_scsiid (!).
2000-01-23 11:50:43 +00:00
Matthew N. Dodd 0e8fe3f0e9 Fix a bug in the last commit. >> 4 instead of >> 8. *bap*
Fix a long-standing bug where I used a 'break;' instead of a 'continue;';
you had to have multiple ISA boards in non-PnP mode with an 'unknown' board
with a lower MAC address to find this one.  Since I have 4 3c5x9 boards
in my test box I was somewhat confused when this happened. :)

Make the messages printed by ep_isa_identify() a little more consistent;
we'll only see them in verbose boot mode but it makes me feel better if
they look nice.
2000-01-23 08:46:21 +00:00
Matthew N. Dodd adc098b163 Add the ID for the 3c509-TPC.
Also, while I'm here, add a mechanism to catch unknown board IDs that
are likely to be 3c509s and allow them to be attached.

PR:		kern/16304
Submitted by:	Kelly Yancey <kbyanc@posi.net>
2000-01-23 08:23:38 +00:00
Seigo Tanimura 8f7076b8ff The pointer of the serial FIFO in the DSP seems to make an error
upon starting/stopping the DSP. Correct the pointer in addition
to clearing the FIFO.
2000-01-23 07:04:02 +00:00
Tatsumi Hosokawa 19fdaeba95 Don't execute MAC address initialization for non-pccard sn devices. 2000-01-22 17:24:16 +00:00
Matt Jacob 997f6ab3d7 There seems to be some problems, particularly on alpha, with
FAST POSTING enabled for parallel SCSI. Be sure about things
and disable it for now.
2000-01-21 20:54:22 +00:00
Nick Hibma bd7bdb532c Add ID for the AMD-756 OHCI controller 2000-01-21 10:46:29 +00:00
Tatsumi Hosokawa de2119c894 Added support for hex-encoded MAC address of Megahertz X-Jack Ethernet Card
Reviewed by:	Warner Losh <imp@village.org>
2000-01-21 09:05:49 +00:00
Tatsumi Hosokawa 87ef0a0afb Propagate MAC address in CIS tupple to dev/ed/ driver.
Many ed-based Ethernet PC-cards can't get correct MAC address without
this patch.

Submitted by: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
Reviewed by: Warner Losh <imp@village.org>
2000-01-21 03:08:46 +00:00
Archie Cobbs 22b6e04be8 Remove definition of the unimplemented "control" hook. 2000-01-21 01:39:40 +00:00
Nick Hibma 341777d004 Add support for DEVICE_SUSPEND, DEVICE_RESUME and DEVICE_SHUTDOWN
methods for USB devices.

However: with none of the devices I have here suspend seems to work
properly.  This is probably a bug in uhci_power which I still have to
look at.

Prodded and pushed by:  Christopher Masto <chris@netmonger.net>
2000-01-20 22:24:35 +00:00
Nick Hibma fc096eaad4 Remove duplicate include 2000-01-20 22:05:30 +00:00
Nick Hibma 5fa5aeec53 Properly remove interrupts if initialisation fails. 2000-01-20 21:36:07 +00:00
Bill Paul 58295f6ace Fix test for deciding when a bulk IN transfer got truncated. I thought
I fixed this last night, but apparently I only applied the patch to the
copy of the code in /dev/brain0.
2000-01-20 19:57:43 +00:00
Kazutaka YOKOTA 7c6f57a384 - Add some comment from bde on the keyboard interrupt.
- Fix obsolete comments.
2000-01-20 13:32:53 +00:00
Kazutaka YOKOTA cf3024b76c Do not include `ukbd.h'; it's not used.
Pointed out by: bde
2000-01-20 13:24:28 +00:00
Kazutaka YOKOTA e17b116645 Unconditionally define sc_paste(). 2000-01-20 13:23:03 +00:00
Kazutaka YOKOTA acdf858c9b Fix wrong usage of FONT_NONE. It was not meant to be set in
scp->font_size in the first place.  It is redundant now and is
removed.

Found by: bde
2000-01-20 13:21:47 +00:00
Bill Paul 1aebda0582 Regen. 2000-01-20 07:39:19 +00:00
Bill Paul a6d9a40e81 More USB ethernet tweaks:
- Sync ohci, uhci and usbdi modules with NetBSD in order to obtain the
  following improvements:
        o New USBD_NO_TSLEEP flag can be used in place of UQ_NO_TSLEEP
          quirk. This allows drivers to specify busy waiting only for
          certain transfers (namely control transfers for reading/writing
          registers and stuff).
        o New USBD_FORCE_SHORT_XFER flag can be used to deal with
          devices like the ADMtek Pegasus that sense the end of bulk OUT
          transfers in a special way (if a transfer is exactly a multiple
          of 64 bytes in size, you need to send an extra empty packet
          to terminate the transfer).
        o usbd_open_pipe_intr() now accepts an interval argument which
          can be used to change the rate at which the interrupt callback
          routine is invoked. Specifying USBD_DEFAULT_INTERVAL uses the
          value specified in the device's config data, but drivers can
          override it if needed.
- Change if_aue to use USBD_FORCE_SHORT_XFER for packet transmissions.
- Change if_aue, if_kue and if_cue to use USBD_NO_TSLEEP for all
  control transfers. We no longer force the non-tsleep hack for
  bulk transfers since these are done asynchronously anyway.
- Removed quirk entry fiddling from if_aue and if_kue since we don't
  need it anymore now that we have the USBD_NO_TSLEEP flag.
- Tweak ulpt, uhid, ums and ukbd drivers to use the new arg to
  usbd_open_pipe_intr().
- Add a flag to the softc struct in the ethernet drivers to indicate
  when a device has been detached, and use this flag to perform
  tests to prevent the drivers from trying to do control transfers
  if this is the case. This is necessary because calling if_detach()
  with INET6 enabled will eventually result in a call to the driver's
  ioctl() routine to delete the multicast groups on the interface,
  which will result in attempts to perform control transfers. (It's
  possible this also happens even without INET6 support enabled.) This
  is pointless since we know that if the detach method has been called,
  the hardware has been unplugged.
- Changed watchdog timeout routines to just call the driver init routines
  to initialize the device states without trying to close and re-open the
  pipes. This is partly because we don't want to frob things at interrupt
  context, but also because this doesn't seem to work right and I don't
  want to panic the system just because a USB device may have stopped
  responding.
- Fix aue_rxeof() to be a little smarter about detecting when a double
  transfer is needed. Unfortunately, the design of the chip makes it hard
  to get this exactly right. Hopefully, this will go away once either
  Nick or Lennart finds the bug in the uhci driver that makes this ugly
  hack necessary.
- Also sync usbdevs with NetBSD.
2000-01-20 07:38:33 +00:00
Archie Cobbs 1b67001469 Fix an #ifdef that should have been and #ifndef.
Noticed by:	Hellmuth Michaelis <hm@hcs.de>
2000-01-20 01:49:45 +00:00