Commit Graph

4591 Commits

Author SHA1 Message Date
Søren Schmidt
b0bb0aeb95 Rearrange the probe a bit, hopefully this will help to eleminate
some of the fake devices sometimes seen on single device ATA
channels.

Proberly fail on failures in ata-disk.c, retry instead of hang.

Cleanup the VIA probe/init code a bit.

Fix a couble of missing free's in atapi-cd.c in the changer code.
2000-08-16 07:09:04 +00:00
Greg Lehey
7a598eabdd open_drive:
Add support for AMD RAID controllers as "disks".

Requested-by:  Marius Bendiksen <mbendiks@eunet.no>

  Remove potential panic when attempting to open non-existent drivers.

init_drive: Return error codes correctly.  Previously it would
            occasionally return 0.  The error was redetected
            elsewhere, but this was causing a number of confusing
            error messages.
2000-08-16 04:31:37 +00:00
Peter Wemm
d7db4e569d Add another USR modem.
PR: 20621
Submitted by: Masanori Taira <mtaira@logicaleffect.com>
2000-08-15 21:03:28 +00:00
Atsushi Onoe
e05d1af60e awictl configuration interface is never used and now it is replaced by
wicontrol(8).
2000-08-14 14:10:10 +00:00
Atsushi Onoe
3b65d03e0a Add support for WEP functionality.
Add support for wi(4) compatible configuration interface.  It enables
wicontrol(8) to configure some 802.11 specific parameters.
Some minor fixes from NetBSD.
Obtained from:  NetBSD current
2000-08-14 13:42:38 +00:00
Atsushi Onoe
149348ccc3 This file contains a shim just for NetBSD, and not used in FreeBSD at all. 2000-08-14 05:44:35 +00:00
Seigo Tanimura
8f4fec9c36 Newbusify ed driver.
Partly submitted by:	alex
2000-08-14 04:31:07 +00:00
Nick Sayer
6ba60b3c4a This patch appears to solve the problems with recording resulting
in bogus hwptr warnings. Further comments sought on -hackers
were not forthcoming. I can only hope that calling DELAY() like
this doesn't cause any heartburn.
2000-08-13 19:20:02 +00:00
Nick Hibma
74bd1c1038 CAM, the module: scbus, da, cd, and st wrapped in one module.
Make the umass driver depend on this module.

Makes it possible to compile the kernel without SCSI support and load it
when for example a USB floppy is conencted.
2000-08-13 18:49:40 +00:00
Nick Hibma
028d28adb8 From NetBSD:
Make it possible to move a device to its unconfigured state by
using config #0.

Add some comments.

Change error reporting in port reset function.

usbd_devinfo_vp(): search the know devs array also if the device doesn't
return product description (e.g. Kye's Genius NetScroll mouse returns
vendor, but not product); the strings returned by device are still
preferred to those in the array, though
2000-08-13 18:39:24 +00:00
Nick Hibma
3f0148fee0 Add more CDC defines. 2000-08-13 18:23:07 +00:00
Nick Hibma
048f89016c Fake the Power On command on the virtual hub.
This removes the two IOERROR's on startup a many has been seeing on UHCI
controllers.

Taken from NetBSD.
2000-08-13 18:21:18 +00:00
Søren Schmidt
710591b796 Fix off by one error in track# calculation. 2000-08-13 09:08:19 +00:00
Bill Paul
069363018f Fix a bug brought to light by the people working on SMPng. I don't quite
understand exactly what it is about SMPng that tickles this bug. What I
do know is that the foo_init() routine in most drivers is often called
twice when an interface is brought up. One time is due to the ifconfig(8)
command calling the SIOCSIFFLAGS ioctl to set the IFF_UP flag, and another
is probably due to the kernel calling ifp->if_init at some point. In any
case, the SMPng changes seem to affect the timing of these two events in
such a way that there is a significant delay before any packets are sent
onto the wire after the interface is first brought up. This manifested
itself locally as an SMPng test machine which failed to obtain an address
via DHCP when booting up.

It looks like the second call to fxp_init() is happening faster now than
it did before, and I think it catches the chip while it's in the process
of dealing with the configuration command from the first call. Whatever
the case, a FXP_CSR_SCB_CNA interrupt event is now generated shortly after
the second fxp_init() call. (This interrupt is apparently never generated
by a non-SMPng kernel, so nobody noticed.)

There are two problems with this: first, fxp_intr() does not handle the
FXP_CSR_SCB_CNA interrupt event (it never tests for it or does anything
to deal with it), and second, the meaning of FXP_CSR_SCB_CNA is not
documented in the driver. (Apparently it means "command unit not active.")
Bad coder. No biscuit.

The fix is to have the FXP_CSR_SCB_CNA interrupt handled just like the
FXP_SCB_STATACK_CXTNO interrupt. This prevents the state machine for
the configuration/RX filter programming stuff from getting wedged for
several seconds and preventing packet transmission.

Noticed by: jhb
2000-08-11 17:47:55 +00:00
Nick Hibma
cad823f463 Fix indentation ruined by previous commit. 2000-08-11 16:37:43 +00:00
Warner Losh
2c6b3ec454 Define get_memory_offset method 2000-08-11 15:51:51 +00:00
Søren Schmidt
ae97e232fb Backout the tsleep on probe, it breaks in resume mode as tsleep
not always has a context to sleep on.
Back to the drawing board...
2000-08-11 10:34:22 +00:00
Søren Schmidt
071e6e581e Add support for accessing individual tracks on a CD.
This is done by misusing the device minor a bit to encode the
track no there.

So to read track #4 just use /dev/acdNt4 where N is the device #.

The driver no automatically sets the blocksize (sectorsize) to
what the track is set to in the TOC.

This has the nice effect that you can now rip audioi tracks
by simply doing:

dd if=/dev/acdNt2 of=audiotrack2.raw bs=2352

it cant be much simpler than that :)

NOTE: the original acdNa & acdNc device still work as usual,
except the blocksize is set according to track0.
2000-08-11 09:21:36 +00:00
Søren Schmidt
4466a3504d Fix the ICH2 ATA100 support, and proberly downgrade the chip setup when
going to slower DMA modes on all Intel chips.
2000-08-10 07:34:49 +00:00
Nick Sayer
fc35953a16 Missed a step when activating the solo driver. 2000-08-09 20:28:19 +00:00
Cameron Grant
4873b46dc7 change irq handling slightly
add another non-ac97 256av
2000-08-09 18:51:27 +00:00
Cameron Grant
071280d442 MFS: module macro changes 2000-08-09 18:46:48 +00:00
Nick Hibma
b40a42fbe8 Finally got my brain around what a SIM UNIT number is and how it differs
from the SCSI id it has. (this avoids the confusing umass-sim32 device. It
should have been umass-sim0 all along (there is only one), and if it is
spoken to as a SCSI device the sim should be umass32.

Make the rescan actually work. We need to fill in a target and lun wildcard
and not the SCSI id of the SIM.

Add a seatbelt.
2000-08-09 17:41:11 +00:00
Nick Hibma
02211bae3b Avoid a '"fd" is usurping ...' message.
PR:		20348
Submitted by:	Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
2000-08-09 12:45:04 +00:00
Nick Sayer
0edeb3dc90 A couple of cosmetic fixes, plus a biggie: When checking the DMA
position, channel 1's dma position register must be quiescent. So
the driver will spl, pause the DMA, delay a bit and hold as still as
possible while snapping the picture.

I'm sure there HAS to be a better way to do this, but if there is, it's
not documented.

So far as I can tell, this fixes recording, which means the Solo is open
for business.
2000-08-09 07:14:56 +00:00
Cameron Grant
1874ec255c MFS: sync with peter's isadma fixup 2000-08-09 01:22:09 +00:00
Cameron Grant
ba90ebe703 activate via82c686 audio driver 2000-08-09 01:08:59 +00:00
Cameron Grant
fb9f118e6f new driver: via 82c686 chipset audio
not personally tested, but i'm assured it works

Submitted by:	David Jones <dej@ox.org>
PR:		kern/20161
2000-08-09 00:55:55 +00:00
Cameron Grant
5fd7b0878e warn if hwptr goes backwards 2000-08-09 00:42:00 +00:00
Peter Wemm
3dd0dbfeb9 MF4: fix style(9) whitespace breakage. 2000-08-08 23:53:11 +00:00
Søren Schmidt
bfc0a42650 Fix braino in the tsleep call, ata_delayed_attach might be a NULL
pointer..
2000-08-08 14:57:36 +00:00
Peter Wemm
d27e361b58 Fix some warnings. Here are more part-time volatiles - ie: data that
lives in memory and is sometimes busmastered to/from the controller.
I believe these are all ok.
2000-08-07 18:44:05 +00:00
Bill Paul
bf64541762 Close PR 20438. Make fix for preserving LED settings conditional on
presence Intel 21143 chip.
2000-08-07 17:03:20 +00:00
Nick Hibma
9bd863570a Save and restore the registers SOF and FRAMENUMBER on suspend. In some
cases the registers are not correctly set on resume.

This solves the problem of USB failing after resuming a machine.

Submitted by:	mike+fbsd@medianstrip.net
PR:		18261
2000-08-07 00:04:53 +00:00
Nick Hibma
2a46959d8e Regen. 2000-08-06 23:27:36 +00:00
Nick Hibma
6ba97967be New ids
Submitted by:	Scott Long
PR:		18897
2000-08-06 23:26:58 +00:00
Nick Hibma
85dff41567 Some new ids, from NetBSD 2000-08-06 23:22:13 +00:00
Søren Schmidt
ab418d7db3 Add experimental code for ATA100 support on:
Promise Ultra100 / Fasttrak100
HighPoint HPT370 controllers (fx Abit KA7-100 onboard ctrl, Abit HotRod 100)
Intel ICH2 (Intel 815E based motherboards)

So far I can read >90MB/s on the Promise and the HPT370.
I can write >64MB/s on the promise and >50MB/s on the HPT370 so it seems
writing is still done in ATA66 mode :(
The ICH2 support is untested as of yet...
2000-08-06 19:51:58 +00:00
Søren Schmidt
19095fd23c Use tsleep instead od DELAY in probe when not in boot.
This fixes the uptil 30s hangs on PCCARD ata device probes.
2000-08-06 19:10:05 +00:00
Cameron Grant
6c1146c0b8 fix the staticy sound issue
use timer instead of per-channel interrupts

do playback like the linux driver - may fix nmi-with-ecc issue
2000-08-06 18:10:05 +00:00
Søren Schmidt
0ec4d7b5b0 Remove sequence checking in the burner support.
This was really a leftover from the wormcontrol days, it is no longer
needed when using burncd.
2000-08-06 18:03:42 +00:00
Søren Schmidt
e7d1a5c2b1 Be a bit more restrictive in using multisector transfers. 2000-08-06 18:01:47 +00:00
Nick Hibma
adeb72abfb Finally make the module dependencies work. kern_linker.c now allows
modules to depend on modules in the same file (uhub depends on usb) or
even on themselves (usb on usb, makes the define in usb_port.h a lot
less convoluted).

Use ANSI prototypes.
2000-08-04 19:05:49 +00:00
Bill Paul
8ebe5155fa *smack* #if 0, not #ifdef 0. 2000-08-04 18:17:45 +00:00
Bill Paul
624539bb38 The check_extport() function appears to have some new code in it that checks
the scratch RAM for data normally found in the SEEPROM (presumably in the
event that the SEEPROM is unavailable or can't be read). This code causes
a spontaneous reboot on monster.osd.bsdi.com, which has an embedded aic7880
controller. The problem appears to happen either when it writes to the
SCBPTR port and then reads from the SCB_CONTROL port. Somewhere during
the inb/outb operations, the system has a heart attack and restarts.

This code looks very suspicious, particularly since it has unconditionalized
debug mesages such as "Got here!" and "And it even worked!". With this
block #ifdef'ed out, the machine boots and runs properly. I stronly suggest
that it stay #ifdef'ed out until it's properly tested.
2000-08-04 18:09:56 +00:00
Mike Smith
786cd128a8 Add support for 2.x/3.x firmware adapters which are too old to have a
memory-mapped register window.  This closes the last known issue with
2.x vintage adapters.
2000-08-04 06:52:00 +00:00
Matt Jacob
3ea883b46d Add a comment as to where stdarg.h applies. 2000-08-03 03:05:50 +00:00
John Baldwin
7d615c1d8b Use <machine/stdarg.h> instead of <stdarg.h> so that this will compile.
While I'm at it, move the #include line up to the top of the file.
2000-08-03 02:47:06 +00:00
Nick Sayer
05a1fdb459 Simplex devices will always report EBUSY on 2nd (and subsequent)
opens if the reference count is not decremented on close.

Note that this may result in the reference count being corrupted
on full duplex devices (due to mismatching opens/closes), but the
code doesn't use the reference count for anything on full duplex
devices.
2000-08-02 22:47:44 +00:00
Nick Sayer
3ac1ca3363 1. Increase the size of the DMA buffer.
2. Offer half duplex with both playback and record on channel 1 or
full duplex with playback always on channel 2 as a compile-time option.

3. 16 bit record output is byte swapped for some dumb reason. Report the _BE
AFMTs for recording.
2000-08-02 22:45:57 +00:00