Commit Graph

3461 Commits

Author SHA1 Message Date
Kazutaka YOKOTA
51ebcb230e - Added a new kernel configuration option: SC_TWOBUTTON_MOUSE.
The new option will make the right mouse button the `paste' button.
  Useful for two button mice.

Submitted by: morganw@engr.sc.edu (Wes Morgan)
1999-11-08 10:04:29 +00:00
Kazutaka YOKOTA
73027df75c - Removed SC_VIDEO_DEBUG. It is broken and useless now. 1999-11-08 09:57:16 +00:00
Peter Wemm
80855566e2 Use cdevsw_add() explicitly and DRIVER_MODULE(). 1999-11-08 07:57:03 +00:00
Peter Wemm
91bbda5f1f Call id_drvinit() from attach, not probe as the OS hasn't necessarily
decided which driver to use until attach.  Use DRIVER_MODULE().
1999-11-08 07:56:10 +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
c6b92dec5e Use (temporarily) cdevsw_add() so we can change from DEV_DRIVER_MODULE()
to DRIVER_MODULE().
1999-11-08 07:37:15 +00:00
Peter Wemm
475ad603bb Use cdevsw_add() (temporarily) to avoid DEV_DRIVER_MODULE(), since the
make_dev()'s that are there are not enough.
1999-11-08 07:32:06 +00:00
Peter Wemm
1faa5a84a8 Use DEVICE_MODULE() directly instead of DEV_DRIVER_MODULE. psm.c uses
make_dev() already.
1999-11-08 07:29:23 +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
8cd932769f No need to use DEV_DRIVER_MODULE() since the bktr driver calls make_dev().
Roger: Feel free to change or spam this as you please.
1999-11-08 07:20:07 +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
Peter Wemm
bb63a8f5a5 Update the stream socket fileops table to match fo_stat() additions. 1999-11-08 03:34:53 +00:00
Poul-Henning Kamp
d53dedee55 Remove the devsw magic from DEV_MODULE() 1999-11-07 10:01:17 +00:00
Seigo Tanimura
35e6a54a31 Conserve stereo mode in ioctl SNDCTL_DSP_SETFMT.
PR:		14372
Submitted by:	Mattias Pantzare <pantzer@ludd.luth.se>, Ville-Pertti Keinonen <will@iki.fi>
1999-11-07 04:15:30 +00:00
Søren Schmidt
3de25e2f32 Fix IRQ allocation bug on controllers using a shared interrupt.
Fix a bug which could cause panics in ad/atapi-interrupt.

Add support for UDMA66 on Promise Ultra/Fasttrak controllers.

Get rid of ATA_IGNORE_INTR, and introduce ATA_WAIT_INTR instead.

Add a delay in the dump routine in ata-disk.c, some controllers
seem to need this. Also dont use the timeout watchdog when dumping.

Disable DMA on ATAPI devices as default, add option ATA_ENABLE_ATAPI_DMA
for those that has HW that works.

Add support for some not-up-to-spec ATAPI devices that returns data
together with completition status on data moving cmd's.
1999-11-06 16:50:21 +00:00
Matthew N. Dodd
61f676b449 resource_list_{alloc,release}() takes a struct resource_list * as its
first arg.

Reminded by:	Andy Farkas <andyf@speednet.com.au>
1999-11-06 07:38:01 +00:00
Seigo Tanimura
05b17b64dc The unit of sndstat is fixed to zero. 1999-11-06 05:31:47 +00:00
Andrew Gallatin
a3f09ae6e1 Remove calls to alpha_register_pci_scsi(). After Mike's recent boot
changes, it no longer exists and is preventing alpha kernels from building.

reviewed by: msmith
1999-11-05 13:10:39 +00:00
Andrew Gallatin
870c4cf8eb now that a map's base addr is 64-bits, the alpha multi-hose hack needs
to be cast to 64-bits in pci_add_map.  This should allow XP1000s and
DS20s to boot -current again.
1999-11-03 22:43:03 +00:00
Greg Lehey
4e449fe462 Emergency fix to stop world breakage.
Broken-by:	archie
1999-11-03 20:04:00 +00:00
Poul-Henning Kamp
5b664c7c13 Move isfoo() and friends to the newly created sys/ctype.h.
Urged by:       bde
1999-11-03 17:54:26 +00:00
Matthew N. Dodd
5178bd8bde Fix bus_setup_intr(); I changed exintr() to take a pointer to ex_softc
but didn't change bus_setup_intr() to pass the softc in.

Submitted by:	Warner Losh <imp@village.org>
1999-11-03 15:45:14 +00:00
Seigo Tanimura
083279e41b Fix for multiple pcm devices. 1999-11-03 08:10:49 +00:00
Archie Cobbs
44b4dd855d Consolidate some of the various ctype(3) macros in one location. 1999-11-02 22:50:34 +00:00
Archie Cobbs
2ea6270424 Change isspace() macro name to avoid conflict. 1999-11-02 22:42:56 +00:00
Archie Cobbs
da5e3849b2 Fix typo in previous commit. 1999-11-02 22:24:41 +00:00
Mike Smith
97adfbaf83 Correctly compute the block count. In reality, it seems that the
controller will never return the command if it's not exactly a multiple
of a block in size.

Cosmetic formatting for RAID level output.
1999-11-02 03:25:24 +00:00
Mike Smith
83f2409369 Don't print the chipset value; it's not useful.
Now we know what some of the state values are, print the current array
state.
1999-11-02 03:24:09 +00:00
Jonathan M. Bresler
aab735d218 fix misordering of two lines in this file. 1999-11-02 02:19:24 +00:00
Nicolas Souchu
7a19171479 Sync with RELENG_3. 1999-11-01 23:15:29 +00:00
Bill Paul
8562ad200e Do some more work on the mxphy pseudo-driver to make it better at media
detection and remove the long delays that I had used previously. Everything
should be handled by timeouts now.
1999-11-01 17:10:26 +00:00
Seigo Tanimura
1134623173 Call make_dev() to shut up the warning.
Pointed out by:	Donn Miller <dmmiller@cvzoom.net>
1999-11-01 14:29:07 +00:00
Julian Elischer
17f3711323 User netgraph typedefs for methods 1999-11-01 10:09:34 +00:00
Matt Jacob
fdc79fd3fc correct moronic typo 1999-11-01 04:39:52 +00:00
Jonathan M. Bresler
4b9943106b rearrange order of tests for NE1000, NE2000, and Linksys
cards.   previous order caused computers with NE2000 cards
        to hang during boot.
1999-11-01 01:16:56 +00:00
Yoshihiro Takahashi
b81cbfc4af Change Linksys registers base/offset.
On NEC PC-98, asic_addr != nic_addr + 0x10.

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
1999-10-31 09:05:20 +00:00
Seigo Tanimura
b3dde4ea8e The total uiomoved size is accumulated in c, not tmp. 1999-10-31 08:58:51 +00:00
Matt Jacob
fed92c475e Organize things to cope with the (possible) lack of downloadable
firmware a bit better.
1999-10-30 19:35:11 +00:00
Matt Jacob
57dd0656a5 Remove firmware from tree until a better copyright from Qlogic is forthcoming. 1999-10-30 19:33:45 +00:00
Matt Jacob
03322f8625 Use pointer to f/w in md structure as to whether f/w exists or not.
If firmware length isn't specified, extract from the 4th short into
the firmware.
1999-10-30 19:32:44 +00:00
Poul-Henning Kamp
02c58685a4 Change useracc() and kernacc() to use VM_PROT_{READ|WRITE|EXECUTE} for the
"rw" argument, rather than hijacking B_{READ|WRITE}.

Fix two bugs (physio & cam) resulting by the confusion caused by this.

Submitted by:   Tor.Egge@fast.no
Reviewed by:    alc, ken (partly)
1999-10-30 06:32:05 +00:00
Poul-Henning Kamp
7254edcfaf Don't test boolean return against != 1.
Don't needlessly assign the error variable in an if statement.
1999-10-29 19:03:18 +00:00
Poul-Henning Kamp
923502ff91 useracc() the prequel:
Merge the contents (less some trivial bordering the silly comments)
of <vm/vm_prot.h> and <vm/vm_inherit.h> into <vm/vm.h>.  This puts
the #defines for the vm_inherit_t and vm_prot_t types next to their
typedefs.

This paves the road for the commit to follow shortly: change
useracc() to use VM_PROT_{READ|WRITE} rather than B_{READ|WRITE}
as argument.
1999-10-29 18:09:36 +00:00
Warner Losh
e653ecce87 Disable old PCCARD_MODULE code.
This should fix LINT.

Prompted by: phk's explicit message about LINT breakage
1999-10-29 17:28:09 +00:00
Semen Ustimenko
1d45e38736 Added code to enable BusMaster operations.
Kurt D. Starsinic <kstar@chapin.edu> had reported
this patch fixing strange behaviour (like timeouts
and RX/TX DMAs stopping errors).
1999-10-29 09:56:52 +00:00
Warner Losh
5eafefaf7a Add (untested) support for the 3C562D/3C563D. I have been unable to
test this support since I don't have the dongle for the card in
question and the dongle I have for my 3C589D doesn't seem to work on
it.  I don't know if this is due to the damage I did to the 562 card
in transit from freebsdcon, or a mis-matched dongle...
1999-10-29 06:27:07 +00:00
Roger Hardiman
56597309fa Update to driver release 2.04
Update AverMedia GPIO values
Submitted by:	AverMedia

Add support for WinTV Theater Dolby Surround Sound DPL3518A chip
Submitted by:	Frank Nobis <fn@radio-do.de>

Make PLL mode the default for Bt878s. You no longer need options BKTR_USE_PLL
1999-10-28 13:58:17 +00:00
Doug Rabson
f8ef46e907 Fix some resource allocation peculiarities of the intpm device. 1999-10-28 08:06:59 +00:00
Warner Losh
c864a1a7e8 Fix identify code. This also fixes the eeprom messages.
pccard attachments must activate the resources they want to access.
ep didn't do this, so of course thee eeprom came back as busy.  ed and
sio already did this.  It was only due to a bug in the logic that the
probe succeeded.  These problems have been fixed.
1999-10-28 06:12:58 +00:00
Luoqi Chen
4b80d3dd0b Bug fix: allow reset device command to complete. 1999-10-28 05:28:00 +00:00
Warner Losh
806338b15d Last change to pccard_nbk now obviates the need to check the name of
the device in question.
Also fix warnings on if_ep_pccard.c
1999-10-28 05:06:14 +00:00
Warner Losh
12e0beb470 Add comments to Linksys probe code.
Add another OUI to those acceptible to linksys (this check may need to
be removed).
A couple of style(9) nits.
1999-10-28 04:53:46 +00:00
Matt Jacob
2668d67e9c I was misinformed. I cannot get away from specifying tags for FC. Some devices
are happy w/o them- some are unhappy (IBM drives).
1999-10-28 02:48:42 +00:00
Matthew N. Dodd
79a9057038 HEADS UP! All 3c5x9 users!
- Rip out all the static softc stuff and do softc allocation the right way.
- Rewrite most of the ISA code so that it provides a DEVICE_IDENTIFY
  method to enumerate all non-PnP ISA devices.

  This has the following consequences:

	- No 'ep' devices may be hardwired.
	  - All hardwired devices will probably be detected twice.
	    By hardwired I mean:

		device          ep0     at isa? port 0x300 irq 10

	- 'ep' devices are ordered by bus, slot, and then MAC address.

- Make 3c509B cards work in PnP mode.  Yes, they really work.
- Convert over to using ifmedia for media selection.  No more of this
  lame 'linkX' stuff.
- Consolidate a lot of duplicated code.
- Make a stab at not breaking MII based PCCARD devices.
  I doubt that the PCCARD stuff works any more than it did before my
  changes but theres hope.  My PCCARD hardware should arrive in a
  week or so.
- Retreive the media settings from the card EEPROM rather than guessing.
  I've got a 3c509-TPO that thinks its got an AUI port and if others
  can report similar problems I'll write a bit of clever code that will
  fix this but right now it works correctly on all but 1 card.
- Clean up a few things and make some cosmetic changes.
- Add myself as the MAINTAINER since nobody else wants to.  I'm
  in the best position to do this as I've got an example of most
  of the cards:

	EISA	3c579	bnc/aui
	MCA	3c529	tp/aui
	ISA	3c509	tpo
	ISA-PnP	3c509B	combo

   If someone wants to send me a any cards I don't have I'd appriciate
   it.  Also welcome are 3c59x boards since I'll be folding if_vx and
   if_ep at some point.
1999-10-27 06:25:16 +00:00
Warner Losh
fac207b0b2 Make these compile. Next step is to connect newbus plumbing. 1999-10-27 05:24:09 +00:00
Mike Smith
4b006d7bb7 Move some hardware-related items to the hardware-related header.
Shift to using the same queueing strategy that the amr driver uses.
Some simple tests indicate that we use about 2% of the CPU at around
500tps with the controller completely saturated with I/O.
1999-10-26 23:20:43 +00:00
Mike Smith
ba2ace5164 Change the queueing model used by the controller to drastically reduce
the time spent at splbio().  We now avoid it unless we are actually
manipulating the command queues themselves.  This doesn't improve
performance noticeably, but should improve concurrency somewhat.
1999-10-26 23:18:57 +00:00
Jonathan M. Bresler
6d193c9936 add support for LinkSys 10/100 cards
new code is conditionalized by the vendor's ethernet OUI

Obtained from:	PAO Project
1999-10-26 23:03:45 +00:00
Matt Jacob
83d62096d6 nuke a debug printout I thought I had already nuked 1999-10-26 22:25:13 +00:00
Luoqi Chen
9da0c0ca63 Fix a typo which would result a bad REQUEST SENSE command be sent to
a device at lun != 0.

Enable tagged queueing (should it be spelled as queuing?) by default.
1999-10-26 22:11:45 +00:00
Warner Losh
dc781fe4ff Very preliminary pcic device support. Will make depend, but won't
(yet) compile and link.  Renamed pcic back to pcic from pcicx, but
conditionalize its inclusion on pccard being included also.  card is
the old and pccard is the new, which is a handy way to have both in
the tree at the same time.

Obtained from: newconfig project

More to follow...
1999-10-26 16:53:57 +00:00
Doug Rabson
4ed33d1537 Make sure we add an interrupt resource if intline!=255. 1999-10-26 07:40:41 +00:00
Warner Losh
c2380338f0 Moderately hacked pccard code from newconfig. It is somewhat in
incomplete and likely has problem.  The code was originally pcmcia,
but I renamed it to pccard and made it compile on FreeBSD -current.  I
converted SIMPLEQ to STAILQ as well as a few sc->dev.xname ->
device_printf changes.  This is a green port of fairly mature code.

I derived this work from the FreeBSD newconfig project
(http://www.jp.freebsd.org/newconfig).  Any problems with it are
likely introduced by me.

Obtained from: newconfig project
1999-10-26 06:52:31 +00:00
Julian Elischer
3bfb36efc0 Make it compile inthe NETGRAPH case. 1999-10-25 23:14:04 +00:00
Bill Paul
b7da85ec26 Make release is now falling over in if_fe.c due to Warner's pccard changes:
if_fe.c uses PCCARD_MODULE() and is part of GENERIC. I've #ifdef'ed out
the #include of "card.h" to hopefully disable pccard support in this
driver until it can be converted. I'm not positive this will fix make
release, but it can't possibly make it any worse than it is now.

I hope this stuff settles down soon.
1999-10-25 17:04:17 +00:00
Warner Losh
99ad33d010 Have only one attach routine, rather than two.
Remove debug printfs.

This should allow the ed driver to work when memory mapping works again.
1999-10-25 06:15:45 +00:00
Warner Losh
822ddbd8f7 MIN unused, so kill it 1999-10-25 04:28:53 +00:00
Warner Losh
e3132c8373 Add pccard attachment. This won't work with memory mapped ed devices
yet, but that should be resolved shortly.  Non memory mapped ed
devices should work, but I cannot test this since my only ed card is
memory mapped.

Submitted by: Matt Dodd <mdodd@freebsd.org>
1999-10-25 02:55:14 +00:00
Warner Losh
758b76dc94 Add newbus attachment for pccard driver. Heavily tested by me, and
I'm committing this from a laptop running this driver.  Have only one
devclass for all ep devices (at least for pccard and eisa) so unit
numbering is sane.  Might not work with both isa and non-isa devices
on the same system until ep is updated (Matt has some patches in the
pipeline which should resolve this, he wanted me to commit this so he
can resolve any conflicts against cvs rather than my patches).

Reviewed by: Matt Dodd <mdodd@freebsd.org>
1999-10-25 02:52:16 +00:00
Warner Losh
a57cd933dc Add newbus pccard attachment for sio. Some of this code was written
by Peter Wemm, but I've not merged all the changes he sent to me yet.
This has not been reviewed by bde, so I'm committing to resolve any
issues he has with this when he returns from FreeBSD CON 99.

I've had four reports of this working for them.  I've been able to
communicate to both my built in modem and a pccard modem with these
patches.
1999-10-25 02:46:52 +00:00
Matthew N. Dodd
e3f7c52da1 Fix compiling PCCARD kernels.
This is a hack and I don't like it.

Hopefully the new PCCARD stuff should be in working order in a day or so.
1999-10-24 07:17:26 +00:00
Mike Smith
cd4ace0c76 Use the physical block number, not the logical block number, for I/O
operations.  The latter only works where the partion begins at the bottom
of the disk.  Whoops.

Submitted by:	Chris Csanady <cc@137.org>
1999-10-22 20:55:15 +00:00
Matt Jacob
5e73516b7b remember to initialize mailbox 2 for FC isp bus resets 1999-10-22 17:03:03 +00:00
Luoqi Chen
cb6c99d54e A few improvements and cleanups. 1999-10-21 21:15:02 +00:00
Luoqi Chen
86a4b08dc7 Non-functional changes. Add some comments before I start to forget how
everything works myself.
1999-10-21 15:49:25 +00:00
Julian Elischer
4cf49a4355 Whistle's Netgraph link-layer (sometimes more) networking infrastructure.
Been in production for 3 years now. Gives Instant Frame relay to if_sr
and if_ar drivers, and PPPOE support soon. See:
ftp://ftp.whistle.com/pub/archie/netgraph/index.html
for on-line manual pages.

Reviewed by: Doug Rabson (dfr@freebsd.org)
Obtained from:  Whistle CVS tree
1999-10-21 09:06:11 +00:00
Luoqi Chen
81ef553683 Adaptec 6260/6360 CAM driver. 1999-10-21 08:56:53 +00:00
Andrew Gallatin
ca4e37e1cf Increase the timeout to be 3*hz. This recalibrates the timeout so that
it has the same value on all platforms.  Previously it was just under
3 seconds on x86 (typically hz<=128) and just under 1/3 of a second on
alpha (typically hz>=1024).  This covers up a race between ad_interrupt()
and ad_timeout() which is being looked into.

reviewd by: sos
1999-10-18 17:55:38 +00:00
Matthew N. Dodd
c769df5b65 This fixes the problem with SMC NE2000 cards hanging the box on
bootup.  Somehow my backout of an abortaive attempt at shared
memory autoconfiguration included this line:

        sc->mem_shared = 1;

Which is fairly important as it turns out.

Since I performed my pre-commit testing on a different box with a generic
NE2000 I didn't catch this.  Pointy hat.
1999-10-18 04:27:33 +00:00
Greg Lehey
5c920f6765 sdio_done:
Set the errors in the correct buffer header.

Inspection-provoked-by: Bernd Walter <ticso@cicely.de>
1999-10-17 23:56:47 +00:00
Greg Lehey
54cd2d3309 launch_requests:
Put splbio protection around the main launch loop.  We've seen cases where
  the bottom half was cutting off the branch on which we're sitting.

Experienced-by: Michael Reifenberger <root@nihil.plaut.de>
1999-10-17 23:55:10 +00:00
Matt Jacob
a95ae1936f Add in inclusion of machine/md_var.h (so alpha_scsi_bus_register or what
have you is prototyped). Removed code versions in md struct- not used
any more. Allocate transfer dma maps and xflist stuff in mbxdmasetup based
upon isp->isp_maxcmds. Allow for multiple calls to mbxdmasetup (for
isp_reset cases).
1999-10-17 19:03:11 +00:00
Matt Jacob
fc0685ea06 Remove some target mode stuff. It will get re-introduced in a different
file later. Do some pencil-sharpening types of minor changes. Change
how active commands are remembered (using new inline functions to get
handles, etc..). Now do a GET FIRMWARE STATUS after firing up the f/w as
outgoing mailbox 2 will tell you the f/w's notion of the max commands
that can be supported. Attempt to retrieve loop topology. Add in the
appropriate SWIZZLE/UNSWIZZLE macros calls (this is a no-op on Little
Endian machines but is needed for sparc (on other platforms)). Move
the temp port database we use to find out where things have moved to
after a LIP to the softc and off the kernel stack. Follow Qlogic's
hint and don't bother setting a tag for commands that don't have
this enabled (presumably the f/w will do it's own selection then).
Use an INT_PENDING macro to check for an interrupt. The call to
ISP_DMAFREE now just takes the handle- not the 'handle-1' which was
a layering violation. Use CFGPRINTF in a couple of places to make
things less chatty if not booting verbose, or CAMDEBUG compiles, etc..
1999-10-17 18:58:22 +00:00
Matt Jacob
ab6c4b31c6 Add in isp_debug variable. It defaults to zero unless CAMDEBUG is defined
where it defaults to one. Change simq width allocation to the max number
of commands supported by the HBA after f/w fires up- not the constant
MAXISPREQUEST value. Do some stylistic changes.
1999-10-17 18:50:47 +00:00
Matt Jacob
67b6f02b5e Roll platform major && minor (major now tracks FreeBSD major release).
Add in null SWIZZLE definitions. Add in CFGPRINTF define. Change default
debug level to refer to an external isp_debug variable. Remove inline
functions as they're now in isp_inline.h and include that file.
1999-10-17 18:48:16 +00:00
Matt Jacob
7e90346eec Roll core version number. Do some stylistic changes. Ensure that
the result queue length is never less than 64. Move (ick) temp port
database used for post-LIP merging off the kernel stack and put it
into the softc. Remove some target mode stuff which will come back
later in a different file. Change how the list of outstanding commands
are stored (now allocated at mailbox setup time to be just enough for
the max for a specific HBA which can vary). Keep a rotating seed of
the last index for this in the softc. Increase the count of active
commands from 10 to 16 bits.
1999-10-17 18:45:31 +00:00
Matt Jacob
b996239f46 add in an INT_PENDING macro 1999-10-17 18:41:47 +00:00
Matt Jacob
327d3cc65b Remove target mode definitions (they'll come back later in
a different file).
1999-10-17 18:41:21 +00:00
Matt Jacob
f4e5fd3676 Add a file where inline functions for the Qlogic isp cards can go. This reduces
duplication in all the platform specific header files.
1999-10-17 18:15:05 +00:00
Matt Jacob
1b50f40613 roll 10[24]0 and 1080/12X0 f/w 1999-10-17 18:09:34 +00:00
John Hay
9c21293f55 Add support for the PCI version of the Digi SYNC/570i cards. 1999-10-17 09:40:04 +00:00
Doug Rabson
9091387f87 Correct a stupid type which prevented us from working with any device
which needed port resources.
1999-10-17 06:48:47 +00:00
David E. O'Brien
13bdeaf987 The CTL0044 is more properly known as a "Creative SB AWE64 Gold". 1999-10-16 15:57:33 +00:00
Doug Rabson
d8517c5437 Relax the check for class=storage, subclass=ide to just class=storage.
This allows ata to probe correctly for the HPT366 on Abit's BP6.
1999-10-16 09:00:49 +00:00
Matthew N. Dodd
9f69cadf84 - Convert this driver to newbus.
- Generally clean things up.
- PnP now supported.

Will convert to bus_space, ifmedia and add a DEVICE_IDENTIFY() method
for autodetection.  As it stands

device ex0 at isa0

should find a card if one is present.

I feel less dirty now.
1999-10-16 06:26:44 +00:00
Bill Paul
ed8c6514c4 Convert the mx driver to miibus.
In order to make this work, I created a pseudo-PHY driver to deal with
Macronix chips that use the built-in NWAY support and symbol mode port.
This is actually all of them, with the exception of the original MX98713
which presents its NWAY support via the MII serial interface.

The mxphy driver actually manipulates the controller registers directly
rather than using the miibus_readreg()/miibus_writereg() bus interface
since there are no MII registers to read. The mx driver itself pretends
that the NWAY interface is a PHY locayed at MII address 31 for the sole
purpose of allowing the mxphy_probe() routine to know when it needs to
attach to a host controller.
1999-10-16 05:24:13 +00:00
Mike Smith
33c8cb18b3 Use a much larger buffer for message log retrieval until we are sure that
32 bytes is safe.

Handle successful completion of message log retrieval commands.

With these changes, the driver correctly handles the consequences of drive
death and replacement in a reliable array.  Note that the massive backlog
of I/O during handling of such an event can kill the system if softupdates
is enabled.
1999-10-16 03:21:20 +00:00
Mike Smith
466454bd7b Fix mlx_diagnose_command so that it actually works. I can't believe this
has been broken since implemented.
1999-10-16 03:08:46 +00:00
Mike Smith
7382092841 Save the drive device_t so that we can print it later. 1999-10-16 01:47:46 +00:00
Mike Smith
f01f2af67a Save the drive device_t correctly so we can print it later.
The drive number is 5 bits, not 4, in the read/write command.
1999-10-16 01:46:59 +00:00
Matt Jacob
042ebb911e Until we actually support SBus, there's no reason to keep the f/w in the tree. 1999-10-15 19:00:50 +00:00
Roger Hardiman
dea6f3fbb6 Include opt_bktr.
Without it the kernel config options, like OVERRIDE_TUNER, where not
getting passed to the driver.

Bug noticed by:	Marc Fonvieille <fonvi@club-internet.fr>
1999-10-15 13:35:55 +00:00
Matthew N. Dodd
14bacef14e - Remove the ISA, PCI, and PCCARD specific code from if_ed.c; it
now lives in the respective bus front end files.
- Add various function prototypes to if_edvar.h
- Clean up some debugging code that snuck into if_ed_isa.c
- Turn on the right bits in files.i386
1999-10-15 03:12:48 +00:00
Matthew N. Dodd
9b63938369 Break out the bus front end code into separate files.
Note that these haven't been turned on nor has the old code
been removed from if_ed.c.  The next commit will address that.
1999-10-15 01:28:04 +00:00
Doug Rabson
45f0aa1f0e * Implement bus_set/get/delete_resource for pci.
* Change the hack used on the alpha for mapping devices into DENSE or
  BWX memory spaces to a simpler one. Its still a hack and should be
  a seperate api to explicitly map the resource.
* Add $FreeBSD$ as necessary.
1999-10-14 21:38:33 +00:00
Mike Smith
f6b84b08c9 Add support for the version 4 firmware interface and the DAC960 PG and
PJ cards.  This will probably also support the AcceleRAID and
eXtremeRAID cards, but nobody has volunteered one for testing, so I
haven't enabled their PCI device IDs.

Slightly clean up communication between the disk devices and the
controller device as per new practice, and move some more register-
related items int mlxreg.h from mlxvar.h.

Remove some unnecessary read-modify-write operations to the card
control registers; they don't behave like that.

Increase the status polling interval to 10 seconds.  It's still possible
to load the card up to the point where a status poll will find the
previous poll still running, but this will reduce the incidence of
complaints.
1999-10-14 02:54:06 +00:00
Greg Lehey
553faec194 Remove reference to obsolete initsd function.
This should have been committed yesterday.

Broke-world-for:	USW2 Root <root@usw2.freebsd.org>
1999-10-13 23:00:30 +00:00
Doug Rabson
81f4abc9c1 Don't match non-IDE devices in probe.
Reviewed by: sos
1999-10-13 18:56:49 +00:00
Greg Lehey
5473959c2b Change default revive block size to 60 kB (was 64 kB), and set a
maximum of 64 kB.

vinum_conf, struct drive: add fields for the current number of active
requests and the maximum ever active.

struct sd: Add fields for initialize progress.

struct mc: set the size of saved file names to MCFILENAMELEN instead
of the previous explicit constant.
1999-10-13 03:21:54 +00:00
Greg Lehey
17105dc3e0 Add glue for passing revive block size, and also for initializing a
subdisk.
1999-10-13 03:21:04 +00:00
Greg Lehey
88bba10194 revive_block: Add a check for a too high revive block size. This is
possible now that vinum(8) can specify this size.

Add function initsd, which initializes a subdisk and optionally checks
that it really happened.
1999-10-13 03:20:11 +00:00
Greg Lehey
2e30926d26 launch_requests:
limit the number of outstanding requests on a specific drive and
  overall.

  Change the way we set the active request count.  This enables us to
  start the requests without being in splbio for the duration, which
  could be very long for IDE drives in PIO mode.
1999-10-13 03:19:31 +00:00
Greg Lehey
2e5213425e MMalloc: don't supply M_WAITOK when mallocing from an interrupt
context.  Be prepared to fail instead.

MMalloc, FFree: ensure that saved file names are properly terminated.
Use MCFILENAMELEN instead of the previous explicit constant.
1999-10-13 03:18:53 +00:00
Greg Lehey
ed3e9bf301 struct vinum_ioctl_msg: Add fields verify (for initsd) and blocksize
(for revive and init).
1999-10-13 03:18:29 +00:00
Greg Lehey
c46d09a85b Fix another instance of vinum_scandisk giving a request to the daemon
and then doing it itself, resulting in a panic downed drives.

Sleuth-work-by:	  Christopher Masto <chris@netmonger.net>

Remove dummy function initsd, which is now (implemented) in
vinumrevive.c

vinum_scandisk: Check that a drive is up before reading from it.  This
is probably excessive paranoia.
1999-10-13 03:17:59 +00:00
Greg Lehey
e7ec252617 Limit the number of outstanding requests on a specific drive and
overall.
1999-10-13 03:17:21 +00:00
Greg Lehey
eab69675bf Modify definition of Malloc: only M_WAITOK if we're not in an
interrupt context.
1999-10-13 03:16:56 +00:00
Greg Lehey
be41f47c8a Change the declaration of initsd. 1999-10-13 03:16:35 +00:00
Greg Lehey
8409d98998 Add some private storage so that we can queue requests in an interrupt
environment even if malloc fails.
1999-10-13 03:16:05 +00:00
Andrew Gallatin
da7ca2d9bd allow pci_ioctl to work with multi-hose alphas.
Rather than teaching pci_ioctl about hoses, we just pass down a magic number
& let the platform code figure out what the hose is based on what the bus
number is.

concept approved by dfr
1999-10-12 22:10:53 +00:00
Doug Rabson
25afb89b1c * Add struct resource_list* argument to resource_list_alloc and
resource_list_release. This removes the dependancy on the
  layout of ivars.

* Move set_resource, get_resource and delete_resource from
  isa_if.m to bus_if.m.

* Simplify driver code by providing wrappers to those methods:

     bus_set_resource(dev, type, rid, start, count);
     bus_get_resource(dev, type, rid, startp, countp);
     bus_get_resource_start(dev, type, rid);
     bus_get_resource_count(dev, type, rid);
     bus_delete_resource(dev, type, rid);

* Delete isa_get_rsrc and use bus_get_resource_start instead.

* Fix a stupid typo in isa_alloc_resource reported by Takahashi
  Yoshihiro <nyan@FreeBSD.org>.

* Print a diagnostic message if we can't assign resources to a PnP
  device.

* Change device_print_prettyname() so that it doesn't print
  "(no driver assigned)-1" for anonymous devices.
1999-10-12 21:35:51 +00:00
Doug Rabson
3598f19234 Bring support for opti931 in from the old driver. 1999-10-12 20:19:03 +00:00
Matt Jacob
d23245c01c remove unnecessary includes 1999-10-11 19:30:59 +00:00
Poul-Henning Kamp
c23f21660c remove unused #include 1999-10-11 19:16:54 +00:00
Poul-Henning Kamp
56b5b87171 remove unused #include, add $FreeBSD$ 1999-10-11 19:14:37 +00:00
Warner Losh
d17298bf1c Kill unused includes 1999-10-11 19:05:21 +00:00
Warner Losh
4ec8d172a9 Hid silly unknown board types message behind if (bootverbose). This
appears to have been lost sometime since joerge made this same fix in
1.47.
1999-10-11 18:53:59 +00:00
Peter Wemm
e6daa4d087 Oh foo. I got carried away. :-( "joy.h" is used to size an array.
(Incidently, there is no bounds checking...)
1999-10-11 16:09:00 +00:00
Steve Price
004348c300 Add support for the USRobotics Courier V.Everything (USR0101) modem.
Submitted by:	Robert Blayzor <robert@superior.net>
1999-10-11 15:06:14 +00:00
Peter Wemm
3b8f07bbc3 Trim some unused #includes
Submitted by:	phk
1999-10-11 15:00:09 +00:00
Peter Wemm
90c7f2d6a2 Zap unneeded #include (found by phk)
Remove useless #include "joy.h"; #if NJOY > 0 - this is always true
if it's being compiled. config arranges this.
1999-10-11 14:53:46 +00:00
Peter Wemm
07bee188eb Delete unneeded #include
Submitted by:	 phk
1999-10-11 14:42:33 +00:00
Søren Schmidt
205a52de79 Fix a bug in the isa attach code which would panic isa systems. 1999-10-11 11:04:43 +00:00
Mark Newton
34d4b8f4c3 Replace cdevsw_add() and friends with make_dev()/remove_dev(). 1999-10-10 22:57:40 +00:00
Søren Schmidt
31694ea9b0 Remove unused include files.
Submitted by: phk
1999-10-10 18:08:40 +00:00
Søren Schmidt
2b0a1c086d Add support for the HPT366 chip, this is used on the Abit boards and
their HotRod controller and on SIIG PCI ultra DMA controller. These
changes also made lots of the Promise code go away, its all much more
generic this way.

Get rid of atapi_immed_cmd, instead use the queue to move atapi commands
from interrupt context if nessesary, the entire atapi layer has
gotten an overhaul.

Lots of fixes to utililize the new features in subr_disk.c etc, and
get rid of the last biots of softc arrays in the drivers, the
only one left is atadevices which cannot easily go away (yet).

Use our own malloc names, its a lot easier to track memory usage this way.

General cleanup overall.
1999-10-09 19:57:13 +00:00
Peter Wemm
649f6f6393 Add the 16550 programming interface code for PCIS_SIMPLECOMM_UART. 1999-10-09 16:00:56 +00:00
Matthew N. Dodd
3c6247433d - Point the right bits at the new location of the bus front ends.
The 'bt' SCSI driver now lives in sys/dev/buslogic.

- Correct a few comments.
1999-10-09 06:25:18 +00:00
Matthew N. Dodd
8a28315fb6 - Restore correct operation of bt_mca.
- Work around a problem not yet solved in the tree (but solved in mine.)

	device_get_ivars() should never be cast to a struct resource_list *
	The solution, under review, involves the creation of a
	device_get_resource_list() function.  More later.
1999-10-09 04:02:02 +00:00
Warner Losh
a832055165 Make interrupts shareable with RF_SHAREABLE. This is untested, but
it compiles and should just work.
1999-10-09 03:52:07 +00:00
Warner Losh
c0de9fc637 Allow interrupt sharing by allocating the interrupt RF_SHAREABLE.
This allows newpcm to grok my es1370 based card, which shared
interrupts with the ethernet card.
1999-10-09 03:50:27 +00:00
Matthew N. Dodd
6bab6ffeb8 Switch over to the new location in sys/dev/dpt.
Fix a forgotten #include
1999-10-09 03:46:28 +00:00
Matthew N. Dodd
645e599d70 - Implement a simple PIO driven function for retreiving the onboard
configuration information from a DPT card at a given port.

  This is needed by the ISA bus front end (still to come) and the EISA
  bus front end (which hasn't ever worked).

- Blow away dpt_eisa.h as the information it contains does not justify
  an additional file.

- Convert dpt_eisa.c to use the onboard config instead of trying to
  read the EISA configuration registers.
1999-10-09 03:39:47 +00:00
Peter Wemm
90fce79ecd Zap cdevsw_add() - the make_dev's take care of it and don't use
the cdevsw[] array.
1999-10-08 18:27:20 +00:00
Matthew N. Dodd
fad05b4cf4 Sync with recent changes to the MCA bus code. Resource IVARS went
away.
1999-10-08 13:02:34 +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
Mike Smith
d5a51e03e7 This is a driver for the AMI MegaRAID family of controllers. It all of
the AMI PCI controllers using the 8LD firmware interface (40LD firmware
will be supported as soon as I have hardware to test with).

These controllers are rebadged by Dell as the PERC, as well as by HP
and possibly other vendors.
1999-10-07 02:23:12 +00:00
Mike Smith
1ac4b82b11 This is a driver for the Mylex DAC960 family of integrated RAID
controllers.  It currently supports the P, PL, PD and PU variants,
with more to be supported shortly.
1999-10-07 02:20:32 +00:00
Mike Smith
5c0b893d05 Be much more selective in claiming devices that might be IDE controllers.
The old algorithm was:

 if class == storage and subclass != SCSI device must be IDE

This results in claiming 'raid' and 'other' storage devices as IDE,
which is typically not the case.

Reviewed by:	sos
1999-10-07 02:17:21 +00:00
Kazutaka YOKOTA
afa239de67 - Remove cdevsw_add(). 1999-10-06 13:03:09 +00:00
Nick Hibma
3e2c6ca3b9 Removal of sys/device.h
- Move intrhook stuff into kernel.h
- Remove all occurrences of #device <device.h>
- Add kernel.h were necessary (nowhere)
- delete device.h

This file contained the structures for cfdata (old style config) and is no
longer used. It was included by most drivers.

It confuses the remote debugger as the definition of 'struct device' in
device.h is found before the one in bus_private.h.
1999-10-05 21:19:41 +00:00
Nick Hibma
d8add747ef Check whether init and term are actually given 1999-10-05 20:32:53 +00:00
Nick Hibma
fc56bfd8a7 Print more verbose debugging output
Clean up computation of parameters.
1999-10-05 20:29:00 +00:00
Roger Hardiman
2a9394b156 Found and fixed FM radio mute bug
Submitted by:	Thomas Runge <runge@rostock.zgdv.de>
1999-10-05 01:49:43 +00:00
Peter Wemm
fb45ca12a7 Fix: WARNING: "iic" is usurping "iic"'s cdevsw[] - the DEV_DRIVER_MODULE()
takes care of the cdevsw_add() - it doesn't need to be done twice.
1999-10-04 15:53:08 +00:00
Roger Hardiman
8657e599b3 Update Australian channel set and add Leadtek Winfast 2000 GPIO
values for audio.

Submitted by:	peter
1999-10-04 09:47:44 +00:00
Daniel Eischen
3c6967023c Change pnp ID for the SupraExpress 56i Sp V.90 modem (logical ID
0x8024b04e) so that the cards description is used instead of overriding
it.  While I'm here, add an ID for the SUP2080 and the SUP2030.

PR:		kern/13983
Submitted by:	Kurt D. Zeilenga <Kurt@OpenLDAP.Org> (SUP2030)
		dfr  (rest of change)
Reviewed by:	dfr
1999-10-03 22:25:19 +00:00
Andrew Gallatin
9b2591a0a4 A band-aid to prevent multi-hose alpha chipsets (aka tsunami) from
panic'ing because the hose is not filled in.  We should probably extend the
pciioctl interface to take hoses into account..
1999-10-03 21:09:30 +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
Daniel Eischen
c0d3a0d572 Add logical device ID for the Diamond SupraExpress 56K PnP modem:
Vendor ID SUP2480 (0x8024b04e), Serial Number 0x00001334
  PnP Version 1.0, Vendor Version 0
  Device Description: SupraExpress 56i Sp V.90

Reviewed by:	dfr
1999-10-03 17:50:09 +00:00
David E. O'Brien
d0847d9cf1 Detect CTL0044 & CTL0045 as "Creative AWE64 PnP" rather than "SB16 PnP".
Reviewed by:	dfr
1999-10-03 17:45:54 +00:00
Bruce Evans
503e666658 Fixed "misspelling" of bcmp as memcmp. memcmp doesn't exist in the
kernel, but gcc provides a pessimal builtin for it.

Makefile.i386:
Added a variable (CONF_CFLAGS) for configuration-specific compiler flags.

LINT:
Use CONF_CFLAGS to inhibit use of gcc builtins.
1999-10-03 07:09:31 +00:00
Matthew N. Dodd
7366fe57d4 Fix includes. I missed this the first time around. 1999-10-02 20:22:26 +00:00
Matthew N. Dodd
fe76c677ea Use the PRVERB() macro instead of 'if (bootverbose) printf()...
Add debuging for all failure cases in aha_cmd().

Always check DATAIN_REG_READY even if we're ready to exit the
read loop.

The last fix allows the AHA-1640 MCA SCSI adapter to operate
correctly and likely fixes problems on a few other oddball
adapters. (I suspect my Dell Drive Array in 1540 mode needs this.)

Reviewed by:	Warner Losh
1999-10-02 17:40:07 +00:00
Nick Sayer
472a4993b0 Add the apm_saver syscons screen saver module.
apm_saver uses the apm_display() routine from the apm system to
"suspend" the "display" part of the machine.

This is beneficial for some laptops (or other machines with
non-traditional displays) that choke on the 'green' saver's
effect.

Another way of looking at this is that it's the same as a screen
saver that does an 'apm -d 0' to blank the display and an 'apm -d 1'
to bring it back. One probably ought to use these commands to make
sure the effect will be correct before using it unattended.
1999-10-02 03:56:42 +00:00
Roger Hardiman
70d32847e5 Backout part of the changes made in 1.111
For unknown devices the output will now be
  pci0: unknown card (vendor=0x109e, dev=0x0878) at 14.1 irq 19
instead of
  pci0: unknown card DD^0878 (vendor=0x109e, dev=0x0878) at 14.1 irq 19

Before this change, the code used to take the PCI vendor id and translate it
into a three letter ASCII name.
For PnP devices, the vendor id _does_ map to a nice ASCII name
(eg Creative Labs PnP ID maps to "CTL", ESS PnP ID maps to "ESS")

But there is no such mapping for PCI devices, as can be seen by the
example above where the Brooktree PCI vendor ID maps to "DD^"

The PCI Special Interest Group confirmed they do not have any mappings
from vendor ID to ASCII.
1999-10-01 16:58:40 +00:00
Peter Wemm
fe49e6c57c Use the sys/wormio.h definitions of the CDRIOCNEXTWRITEABLEADDR and
CDRIOCBLANK ioctls rather than duplicating them.
1999-10-01 14:14:20 +00:00
Matthew N. Dodd
288778409b Add support for the AHA-1640 SCSI adapter.
The changes to sys/dev/aha/aha.c that allow these
cards to function properly will be here in a day
or 2.
1999-10-01 03:12:15 +00:00
Andrew Gallatin
4fc1dda91d Make the fxp driver work on alpha, rather than panic the machine on boot
and/or when using the card.

o Convert the driver to using bus_space.  This allows alphas with
fxp's to boot, rather than panic'ing because rman_get_virtual()
doesn't really return a virtual address on alphas.

o Fix an alpha unaligned access error caused by some misfeature of
gcc/egcs: if link_addr & rbd_addr in the fxp_rfa struct are 32 bit
quantities, egcs will assume they are naturally aligned. So it will do
a ldl & some shifty/masky to twiddle 16 bit values in fxp_lwcopy().
However, if they are 16-bit aligned, the ldl will actually be done on
a 16-bit aligned value & we will panic with an unaligned access
error... Changing their definition to an array of chars seems to fix
this.  I obtained this from NetBSD.

I've tested this on both i386 & alpha.
1999-09-30 19:03:12 +00:00
Poul-Henning Kamp
b89392e703 Remove the D_NOCLUSTER[RW] options which were added because vn had
problems.  Now that Matt has fixed vn, this can go.  The vn driver
should have used d_maxio (now si_iosize_max) anyway.
1999-09-30 07:11:30 +00:00
Doug Rabson
9689906734 Add ID for ESS ES1869. 1999-09-29 07:27:35 +00:00
Greg Lehey
a13f3fcca5 struct plex: Add variables checkblock and rebuildblock to keep track
of parity check and rebuild operations.  This enables us
             to stop the operation and restart at a later time.

enum parityop: Trivial enum to decide what parityops() is going to do.
1999-09-28 22:58:07 +00:00
Greg Lehey
c460c4f8b3 revive_block: set b_resid correctly.
parityops: New function to check and rebuild RAID-5 parity blocks.
Not yet usable.
1999-09-28 22:57:29 +00:00
Greg Lehey
141580f5a0 logrq: add sdiodone case.
launch_requests: Remove debug code

sdio: Reformat log call.
1999-09-28 22:56:54 +00:00
Greg Lehey
667b5ca097 Don't count iterations while waiting for a lock to become free. 1999-09-28 22:56:04 +00:00
Greg Lehey
aa1c16b781 Add ioctls VINUM_CHECKPARITY and VINUM_RESETPARITY, still to be fully
implemented.
1999-09-28 22:55:37 +00:00
Greg Lehey
af87ab426c Reduce MAX_IOCTL_REPLY to 1024; the previous value was more than ioctl
could stand.

Define the correct return lengths for a number of ioctls.

Add ioctls VINUM_CHECKPARITY and VINUM_RESETPARITY, still to be fully
implemented.
1999-09-28 22:54:58 +00:00
Greg Lehey
b86ee4725e open_drive: Don't call set_drive_state to take a drive down, do it
ourselves.  This breaks a vicious circle which caused
            vinum to dereference a null vp if device nodes were
            missing.

Reported-by:	Brad Chisholm <sasblc@unx.sas.com>
		Alec Wolman <wolman@cs.washington.edu>

check_drive: Don't take a drive down if it's only referenced.

read_drive: Remove unused variable.
1999-09-28 22:46:39 +00:00
Greg Lehey
3465ababcf sdio_done: Log events if DEBUG_LASTREQS set. 1999-09-28 22:45:21 +00:00
Greg Lehey
a40b9736a1 Change remove_drive_entry
Add parityops
1999-09-28 22:43:59 +00:00
Greg Lehey
bb5f4d7898 Remove some superfluous comments.
get_empty_volume: initialize plexes to -1 (not allocated)

remove_drive_entry:
  Remove recurse parameter (there's nothing below a drive in the hierarchy).
  Use remove_sd_entry to remove sds, don't do it ourselves.
  Log errors, don't throw rude remarks.

remove_plex_entry:
  Don't use plex->subdisks as a loop limit, it gets changed in the
     loop.  This caused some removals to only remove half the subdisks.
  Change logging of some "impossible" situations.

remove_volume_entry:
  Use remove_plex_entry to remove plexes, don't do it ourselves.

update_sd_config:
  Use set_sd_state to do the work.
1999-09-28 22:43:07 +00:00
Greg Lehey
18ba0ff290 Minor formatting changes (7th attempt) 1999-09-28 22:42:06 +00:00
Greg Lehey
9bd4ba1364 Add loginfo type for sdiodone. 1999-09-28 22:27:10 +00:00
Cameron Grant
5b78a73443 * add a non-reset device- will not reset the channel on open. you
will have to mknod yourself for now.
* don't eat the first write()
* partial rvplayer fix- don't panic on unaligned writes unless our
  feeder chain requires them for downconversion.  a fuller fix is
  on the way.
1999-09-28 21:43:35 +00:00
Cameron Grant
89c57f2d02 add a missing blank line 1999-09-28 20:24:28 +00:00
Cameron Grant
cf56588462 seperate the ad1816 driver from the mss driver since it shares no code 1999-09-28 20:00:06 +00:00
Warner Losh
d77db02192 Use rmand_get_bus{tag,handle} rather than hard wiring things to
I386_BUS_SPACE_IO.  Compiles now on the Alpha, but likely will not
work due to bus space address <-> virtual address mapping bogons that
work for i386 but not alpha.
1999-09-28 19:59:41 +00:00
Poul-Henning Kamp
1ab305ef60 Introduce ttyread() and ttywrite() which do the canonical thing.
Use them in many tty drivers.

Reviewed by: julian, bde
1999-09-28 11:45:31 +00:00
Doug Rabson
340b1ef545 Add another ID for the AWE64. 1999-09-28 08:25:08 +00:00
Warner Losh
896f49b096 Newbusification of aha. dfr sent me the first cut, and I made it
work.  Be more verbose when one cannot allocate IRQ, et al since this
is a common configuration problem.  The cards have the IRQ soft wired
into their BIOS and do not try to do collision detection.  This can
cause problems when this IRQ is the same as another card/device.

The PNP hasn't been tested.  My PNP board is in a deployed system.
I'll sneak in testing of it sometime later.  I've been able to mount
the 3.3R cdrom that arrived today and access files off it.

Submitted by: dfr
1999-09-28 02:39:45 +00:00
Roger Hardiman
77b4241c45 Add auto-detection for Askey Dynalink Magic TView and
Leadtek Winfast 2000 cards.
No audio support yet, just the card make is reported.

Submitted by:	 Craig <crh@outpost.co.nz>
Submitted by:	 Peter Wemm <peter@netplex.com.au>
1999-09-27 08:04:55 +00:00
Greg Lehey
1441456f23 Correct typo in comment. putccdbuf() releases a buffer, it doesn't allocate one. 1999-09-27 01:51:42 +00:00
Peter Wemm
2740fc8ee1 zap #include "streams.h" (for NSTREAMS) - which isn't used. 1999-09-27 00:54:20 +00:00
Peter Wemm
9854d29d4e Zap #include "vn.h" - it's not used 1999-09-27 00:53:24 +00:00
Matthew Dillon
adec8f4338 If the request crosses EOF and bp->b_bcount is not a multiple of
the sector size, the new value for bp->b_bcount was incorrectly
    calculated.  Fixed.

Submitted by: 	Tor.Egge@fast.no
1999-09-27 00:27:32 +00:00
Matthew Dillon
74427f90f2 Buffer locking code failed to use BUF_KERNPROC and BUF_UNLOCK and
BUF_LOCKFREE a buffer prior to physically freeing it.  While these
    bugs did not cause a crash, they might in the future.

    Added eof handling for unlabeled partitions.

Submitted by:	Tor.Egge@fast.no
1999-09-27 00:12:36 +00:00
Roger Hardiman
96476a9986 Split the Bt848 driver into seperate files for
audio, tuner, card make, os dependent code and core bt848/i2c code.

Also, rewrite tuner code for FM Radio to make the code cleaner.
1999-09-26 22:06:20 +00:00
Bill Paul
c63d3a6678 Update the Starfire driver comments and man page to include the URL of
the AIC-6915 Programmer's Manual which I finally found online at Adaptec's
site.
1999-09-26 18:35:30 +00:00
Eivind Eklund
3e148c4099 Move the declaration of panic() from sys/systm.h to sys/param.h.
Rationale: Wider access, so we can add assertions to header files.
panicstr is still in sys/systm.h

Suggested by:   phk
Discussed with: peter
1999-09-26 18:19:49 +00:00
Matthew N. Dodd
20530663b3 device_get_ivars() called twice. Remove second call and assignment.
Noticed by: Peter
1999-09-26 18:05:37 +00:00
Matthew N. Dodd
58e4bcc53a Duplicated '(' removed.
Noticed by: Mark Murray <mark@grondar.za>
1999-09-26 18:04:26 +00:00
Matthew N. Dodd
d8accb14bd mca_add_{iospace,mspace}() no longer takes a 4th arg. 1999-09-26 07:16:01 +00:00
Matthew N. Dodd
b438239c0a Rip out the nastiness I cribbed from the EISA bus code and actually
implement the resource management code correctly, using approved
interfaces.

While I'm here, clean up a few things.
1999-09-26 07:02:05 +00:00
Matthew N. Dodd
39b547ce4d - Split out the ISA and PCCARD specific code.
- Split out the prototypes, externs and struct decls from if_epreg.h into
  if_epvar.h.

- Add support for MCA based Etherlink III (3c529) devices.

None of this code is used right now; the old if_ep driver is still
in place and used.

I will eventually get around to converting if_ep_isa.c to newbus once I've
had a talk with Peter and DFR about the DEVICE_IDENTIFY() method.

I have tested this code on my PS/2.  It works.  I would like EISA and ISA
testers since my example hardware hasn't arrived yet.

Add:

dev/ep/if_ep.c          optional ep
dev/ep/if_ep_isa.c      optional ep isa
dev/ep/if_ep_eisa.c     optional ep eisa
dev/ep/if_ep_mca.c      optional ep mca
dev/ep/if_ep_pccard.c   optional ep card

to sys/conf/files

Remove:

i386/eisa/3c5x9.c             optional        ep
i386/isa/if_ep.c              optional        ep

from sys/i386/conf/files.i386

PCCARD testers wanted!

I will switch off and cvs rm the old driver in favor of this copy once
I've had positive feedback or have the hardware to verify that it works.
1999-09-26 06:42:36 +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
Bill Paul
784733e9ec Change contigmalloc() lower memory bound from 1MB to 0 to improve
chances of allocations succeeding on systems with small amounts of
RAM.

Pointed out by: bde
1999-09-25 17:29:02 +00:00
Poul-Henning Kamp
ae8e1d08d7 This patch clears the way for removing a number of tty related
fields in struct cdevsw:

        d_stop          moved to struct tty.
        d_reset         already unused.
        d_devtotty      linkage now provided by dev_t->si_tty.

These fields will be removed from struct cdevsw together with
d_params and d_maxio Real Soon Now.

The changes in this patch consist of:

        initialize dev->si_tty in *_open()
        initialize tty->t_stop
        remove devtotty functions
        rename ttpoll to ttypoll
        a few adjustments to these changes in the generic code
        a bump of __FreeBSD_version
        add a couple of FreeBSD tags
1999-09-25 16:21:39 +00:00
Poul-Henning Kamp
46783fb897 Remove NBPF conditionality of bpf calls in most of our network drivers.
This means that we will not have to have a bpf and a non-bpf version
of our driver modules.

This does not open any security hole, because the bpf core isn't loadable

The drivers left unchanged are the "cross platform" drivers where the respective
maintainers are urged to DTRT, whatever that may be.

Add a couple of missing FreeBSD tags.
1999-09-25 12:06:01 +00:00
Bill Paul
e51e55880d Call sk_start() at the end of sk_intr() if there's packets in the
interface send queue that need to be processed.
1999-09-25 04:50:27 +00:00
David E. O'Brien
2b832347ec Switch the order of a two tests so that the error actually has to occur
for you to be told there was an error [during verbose boot].

I poked him for the fix, he poked me to get it committed.

Submitted by:	Jason Young <doogie@anet-stl.com>
1999-09-24 16:27:32 +00:00
Søren Schmidt
27fceb7416 Fix timeout handeling and add retry counts.
Add HPT366 probe message (but no real support yet),
Add CDR support for several diffenrent blocktypes, also close
disk as a multisession CD.
1999-09-24 12:36:10 +00:00
Matthew Dillon
1464240ec4 Cleanup CCD quite a bit, including adding clarifying comments.
Enhance MIRROR code.  Add a few more sanity checks and implement
    a zone-based disk selector to make use of both disks when reading.

    Also implement a read fail-over.  If a read error occurs on one
    disk, the I/O is retried on the other.

    NOTE: CCD's mirroring support cannot deal with write errors properly
    in regards to recovery, meaning that 'old' data under a write error may
    be read non-deterministically if you reboot after a write error, and CCD
    certainly cannot deal with a disk changeout.  And it still can't.  Use
    vinum if you are really serious about mirroring.  CCD basically just
    implements a poor-man's mirror.
1999-09-23 09:25:05 +00:00
Matthew Dillon
25d1a00bc0 Fix ccdiodone code. The code was using cbp->cb_buf.b_bcount to
sum the total amount of I/O issued to determine when all the I/O
    has completed.  This fails when the EOF boundry occurs in the middle
    of an I/O.  Using cbp->cb_buf.b_bufsize works better.
1999-09-23 08:41:48 +00:00
Peter Wemm
f6ef7d48bf Restore vendor $Id$ now that it won't be clobbered. 1999-09-23 05:26:10 +00:00
Bill Paul
98a229f65e As suggested by phk, unconditionalize BPF support in these drivers. Since
there are stubs compiled into the kernel if BPF support is not enabled,
there aren't any problems with unresolved symbols. The modules in /modules
are compiled with BPF support enabled anyway, so the most this will do is
bloat GENERIC a little.
1999-09-23 03:32:57 +00:00
Matthew Dillon
e322ec4cb4 Fix bug in pseudo-geometry calculation code that assumed a sector size
smaller then 1024 bytes.
1999-09-23 00:09:08 +00:00
Brian Feldman
27068b01f7 Fix includes (remove unnecessary ones, reorder necessary ones.)
Also, correct an %x to be %lx.

Reviewed by:	phk
1999-09-22 21:23:21 +00:00
Søren Schmidt
fbf6ea790a Support quad & max speeds in wormcontrol.
A bit more general cleanup.
1999-09-22 12:04:51 +00:00
Søren Schmidt
0720c0ebbe I knew it, I introduced new bugs :)
The lun is not incremented in the ata-disk driver when ATA_STATIC_ID
is not defined, thanks to Kenneth Wayne Culver <culverk@wam.umd.edu>
for finding that one.

PHK pointed at the & problem in atapi-cd in devstat_end_transaction_buf.

Too little sleep I guess...
1999-09-22 07:15:46 +00:00
Roger Hardiman
ca0c4630a1 Move the bktr Bt848/Bt878 driver to /sys/dev/bktr
Phase 1) move the driver
Phase 2)
Phase 3) Profit, by splitting the driver into smaller files like
bktr_tuner, bktr_card, bktr_audio, bktr_<osname>
making it easier to maintain and understand.
1999-09-22 06:46:08 +00:00
Bill Paul
981069a71b Update the Tigon driver firmware images to the latest release from
Alteon (12.6.15).
1999-09-22 06:43:16 +00:00
Bill Paul
9e4c647c74 Tweak these for what I hope is the last time: change the DRIVER_MODULE()
declaration for the interface driver from "foo" to "if_foo" but leave the
declaration for the miibus attached to the interface driver alone. This
lets the internal module name be "if_foo" while still allowing the miibus
instances to attach to "foo."

This should allow ifconfig to autoload driver modules again without
breaking the miibus attach.
1999-09-22 06:08:11 +00:00
Søren Schmidt
3427651043 Ten'th update to the new ATA/ATAPI driver:
It been awhile since the last major update, as a benefit there
are some cool things in this one (and new bugs probably :) )...

The ATA driver has grown "real" timeout support for all devices.
This means that it should be possible to get in contact with
(especially) lost ATAPI devices. It also means that the ATA
driver is now usable on notebooks as it will DTRT on resume.

An experimental hack at utilizing the Promise66's at UDMA66 is
in there, but I cant test it. If someone feels like sending
me one, give me a ping.

The ATAPI DMA enableling scheme has been changed, also better DMA
support for the Aladdin chipset has been implemented for ATAPI
devices. Note that the Aladdin apparently only can do DMA reads
on ATAPI devices, and the Promise cant do ATAPI DMA at all.
I have seen problems on some ATAPI devices that should be able
to run in DMA mode, so if you encounter problems with hanging
atapi devices during the probe, or during access, disable DMA
in atapi-all.c, and let me know. It might be nessesary to do this
via a "white list" for known good devices...

The ATAPI CDROM driver can now use eject/close without hanging and
the bug that caused reading beyond the end of a CD has been fixed.
Media change is also handled proberly. DVD drives are identified
and are usable as CDROM devices at least, I dont have the HW to
test this further, see above :).

The ATAPI tape driver has gotten some support for using the DSC
method for not blocking the IDE channel during read/write when
the device has full buffers. It knows about the OnStream DI-30
device, support is not completed yet, but it can function as a
primitive backup medium, without filemarks, and without bad media
handeling. This is because the OnStream device doesn't handle this
(like everybody else) in HW. It also now supports getting/setting
the record position on devices that supports it.

Some rather major cleanups and rearrangements as well (cvs -b diff
is your freind). I'm closing in on declaring this for beta code,
most of the infrastruture is in place by now.

As usual USE AT YOUR OWN RISK!!, this is still alpha level code.
This driver can hose your disk real bad if anything goes wrong, but
now you have been warned :)

But please tell me how it works for you!

Enjoy!

-Søren
1999-09-21 19:50:40 +00:00
Poul-Henning Kamp
33edfabe57 fix a buglet which jordan made me provoke :-) 1999-09-21 12:05:38 +00:00
Poul-Henning Kamp
00a6a3c65f Add an experimental Memory-Disk driver. This driver will allocate
memory with malloc(9) using a few tricks to save space on the way.
1999-09-21 11:00:49 +00:00
Bill Paul
0355003f26 Un-do the changes to the DRIVER_MODULE() declarations in these drivers.
This whole idea isn't going to work until somebody makes the bus/kld
code smarter. The idea here is to change the module's internal name
from "foo" to "if_foo" so that ifconfig can tell a network driver from
a non-network one. However doing this doesn't work correctly no matter
how you slice it. For everything to work, you have to change the name
in both the driver_t struct and the DRIVER_MODULE() declaration. The
problems are:

- If you change the name in both places, then the kernel thinks that
  the device's name is now "if_foo", so you get things like:

if_foo0: <FOO ethernet> irq foo at device foo on pcifoo
if_foo0: Ethernet address: foo:foo:foo:foo:foo:foo

  This is bogus. Now the device name doesn't agree with the logical
  interface name. There's no reason for this, and it violates the
  principle of least astonishment.

- If you leave the name in the driver_t struct as "foo" and only
  change the names in the DRIVER_MODULE() declaration to "if_foo" then
  attaching drivers to child devices doesn't work because the names don't
  agree. This breaks miibus: drivers that need to have miibuses and PHY
  drivers attached never get them.

In other words: damned if you do, damned if you don't.

This needs to be thought through some more. Since the drivers that
use miibus are broken, I have to change these all back in order to
make them work again. Yes this will stop ifconfig from being able
to demand load driver modules. On the whole, I'd rather have that
than having the drivers not work at all.
1999-09-20 19:06:45 +00:00
Justin T. Gibbs
d8a4660643 Clear the SELINGO bit after a selection timeout occurs. SELINGO is
usually cleared by a successful selection, but there is no guarantee
that a future successful selection will ever occur (e.g. empty bus).
The driver never looks at SELINGO, but the busy LED does, so this
change has the cosmetic effect of fixing the rare instance where the
busy LED was left on, confusing the user.
1999-09-20 19:04:22 +00:00
Justin T. Gibbs
55bad6b5c3 Work around a defect in the FIFOEMP status bit of Ultra2 class
aic7xxx parts.  This problem could result in data corruption
during periods of my PCI bus load by busmasters other than the
aic7xxx.

Many thanks to Andrew Gallatin <gallatin@cs.duke.edu> for characterizing
the symptoms of this problem and testing this fix.
1999-09-20 18:57:04 +00:00
Matthew Dillon
5b4cc8ee79 Fix the situation where an I/O crosses the EOF point. We need to properly
adjust the bp->b_bcount the same way for unlabeled VN access as dscheck
    does for labeled access.

    We also increase the block size to at least 8K for efficiency.

Reviewed by:	 Tor.Egge@fast.no
1999-09-20 18:06:17 +00:00
Poul-Henning Kamp
f7d9e545c0 Trying to set BAD144 handling on a CD is sufficiently "Dont Do That
then" that we don't need to give the ioctl special treatment.
1999-09-20 17:06:29 +00:00
Bill Paul
fac1f39b19 Grrr. Okay, changing the devnames was a bad idea. Put them back the way
they were.
1999-09-20 08:47:11 +00:00
Bill Paul
b95a9362a0 Fix the strings in the driver_t structs so that they match the new names
in the DRIVER_MODULES() declarations. *sigh*
1999-09-20 08:14:39 +00:00
David E. O'Brien
abad681b03 Goofed and didn't change the second DRIVER_MODULE() linking these with
the miibus.

Noticed by:	wpaul
1999-09-20 07:50:10 +00:00
David E. O'Brien
bd8a15ce8a Change the name we register with DRIVER_MODULE() to include the leading
"if_".

Reviewed by:	msmith, wpaul
1999-09-20 06:50:52 +00:00
Peter Wemm
814e16091b Make if_ed work again on pci, isa, isapnp. The hack to make it work on
PCCARD is pretty revolting but should buy us time while the pccard driver
angle is sorted out.  A commit for the MCA ed attachment will follow
shortly.
1999-09-20 05:48:16 +00:00
Bill Paul
ae3b8c19b1 Convert the VIA Rhine driver to miibus. 1999-09-19 22:03:31 +00:00
Bill Paul
2d8fad26b3 Allow the AMD PHY driver to support the DM9101 PHY. The DM9101 and the
AMD AM79c873 have identical registers. I'm not sure why; one is probably
a clone of the other.
1999-09-19 21:56:08 +00:00
Poul-Henning Kamp
11a0be87e3 Two more devstat_end_transaction() -> devstat_end_transaction_buf(). 1999-09-19 12:43:34 +00:00
Peter Wemm
fc80907389 Fix the "dsp sync" debugging printf that was unconditional. Fix a few
formatting nits/glitches/whatever.
1999-09-19 09:53:57 +00:00
Kazutaka YOKOTA
8c12242c81 - Hang the scr_stat struct from dev_t.
- Remove sc_get_scr_stat().  It's not necessary anymore.
- Call ttymalloc() to allocate the struct tty for each vty, rather than
  statically declaring an array of struct tty.  We still need a statically
  allocated struct tty for the first vty which is used for the kernel
  console I/O, though.
- Likewise, call ttymalloc() for /dev/sysmouse and /dev/consolectl.
- Delete unnecessary test on the pointer struct tty *tp in some functions.
- Delete unused code in scmouse.c.

WARNING: this change requires you to recompile screen savers!
1999-09-19 08:58:53 +00:00
Kazutaka YOKOTA
d94eccc2ad - Preserve the content of the back scroll buffer when changing the
video mode.

Requested by: a lot of people.
PR: kern/13764
1999-09-19 08:07:46 +00:00
David E. O'Brien
424baf384e This adds support for the 3Com Megahertz 574B ethernet 16-bit PC-Card.
1) Reworked the probe routine
   2) Addition of the 574B's product ID.
   3) Added useful info when booting verbosely.

Submitted by:	Jason Young <doogie@anet-stl.com>
1999-09-19 06:20:23 +00:00
Poul-Henning Kamp
712f8471fb Only assign to si_bsize_phys if we have an intelligent value for it.
Otherwise leave at zero and let the generic code decide.
1999-09-18 21:48:39 +00:00
Poul-Henning Kamp
2186cd9e8d Use devstat_end_transaction_buf() rather than Use devstat_end_transaction() 1999-09-18 21:30:27 +00:00
Bill Paul
2c0431ecf6 Fix the mechanism used to choose the unit numbers for the IP interfaces
attached by the SysKonnect driver. Use ifunit() to scan for existing
skN interfaces and pick the first unused one.
1999-09-18 04:01:31 +00:00
Roger Hardiman
f53c00ee1a Update to driver release 1.74
Bug fix:     xmradio nolonger experiences a 6Mhz offset after running FXTV

New feature: Automatic Tuner selection for AVerMedia cards with
             configuration EEPROMs on (ie the Bt878 based cards)
1999-09-17 21:28:23 +00:00
Bill Paul
28b50861e7 Patch if_vr to add bridging support.
PR:		12385
Submitted by:	lyndon@orthanc.ab.ca
1999-09-17 18:25:30 +00:00
Bill Paul
d1e8f983ef Remember to account for ETHER_ALIGN when setting the maxmimum packet
length for mini receive ring. The max length was MHLEN, however the mbufs
are actually shortened to MHLEN - ETHER_ALIGN to force payload alignment.

PR:		13793
1999-09-17 18:04:14 +00:00
Roger Hardiman
1ea586719f Sync with driver release 1.74 1999-09-17 17:06:36 +00:00
Matthew Dillon
447deba3da Fix a bug in the block number calculation for VN disks with a sector
size != 512 that are configured without a label.  The bug should only
    have effected swap-backed VN mounts without a label.

    Add several major features to VN.  In the kernel we add a swap
    pre-reservation capability, which can be used to guarentee seek
    consistency for swap-backed VN nodes.  This also incidently allows
    a swap-backed VN filesystem to be recovered after a crash in some
    cases (if the same swap blocks happen to be reserved).

    We also add a number of new options to vnconfig which do the work
    of pre-zeroing or creating/truncating/extending a file which greatly
    simplifies using VN in a file-backed configuration.

    Add FreeBSD CVS label to sys/sys/vnioctl.h, as well as a new ioctl
    flag for the swap pre-reservation feature.

Reviewed by:	Alan Cox <alc@cs.rice.edu>, David Greenman <dg@root.com>
1999-09-17 05:34:00 +00:00
Bill Paul
1ed9e51a4d Fix sf_probe() to detect the card type properly. I botched the reading
of the subsystem ID when I converted to newbus. The driver still detects
the chipset and still works but fails to identify the exact card.
1999-09-17 00:47:41 +00:00
Ollivier Robert
76b7b29ed0 wlinit() must be called to recalculate the multicast filter.
Submitted by:	Francis Dupont <Francis.Dupont@inria.fr>
1999-09-15 12:49:03 +00:00
Peter Wemm
0e27edc0e2 The sense of probes has inverted. They return an error, rather than
true/false.  Fix ed_probe_HP_pclanp() so that it doesn't "succeed" on
non-existing hardware.

Submitted by:	Mark Hittinger <bugs@freebsd.netcom.com>
1999-09-13 19:14:43 +00:00
Kenneth D. Merry
20d39afec3 Get rid of a stray printf on boot. (BRDCTL = ...)
Approved by:	gibbs
1999-09-13 16:32:34 +00:00
Bruce Evans
887ba12fc5 Removed diskerr()'s unused d_name arg and updated callers. This fixes
warnings caused by the arg having the wrong type (not const enough).
The arg was also wrong (a full name instead of a short one) for calls
from from subr_diskmbr.c and pc98/diskslice_machdep.c.
1999-09-13 12:59:41 +00:00
Poul-Henning Kamp
2016e4e906 Bite the bullet and allocate the devsw entry at compile time. 1999-09-12 20:40:29 +00:00
Justin T. Gibbs
f0540c3d39 Fix a compile warning. 1999-09-11 16:03:57 +00:00
Roger Hardiman
76e2530cfb Update to driver 1.73
Add new hauppauge Tuner Type 6
Add Aims Labs Video Highway Xtreme card type
1999-09-10 12:08:36 +00:00
Doug Rabson
45dde9cda4 Make sure that opti931's and guspnp's use the right offset from their ports. 1999-09-10 08:20:23 +00:00
Julian Elischer
85a219d201 Changes to centralise the default blocksize behaviour.
More likely to follow.

Submitted by: phk@freebsd.org
1999-09-09 19:08:44 +00:00
Poul-Henning Kamp
8072a14e83 Don't register a bmajor.
Approved by:	sos
1999-09-08 18:45:52 +00:00
Cameron Grant
a78723c1c1 fix a bug with cat >/dev/{dsp,dspW,audio} hanging 1999-09-08 17:34:54 +00:00
Peter Wemm
518dee7dbb Add a pointer to "controller miibus0" for people who will not read the
commit messages or GENERIC and insist on running -CURRENT.
It probably won't work, but it's worth a try.
1999-09-08 15:01:58 +00:00
Peter Wemm
213fcefef2 Make it build, copy from dev/sio/sio.c:
isa_set_flags -> device_set_flags
isa_get_flags -> device_get_flags
1999-09-08 13:46:54 +00:00
Peter Wemm
f97d942bd0 Restore the old sio* - bruce can fix it himself. 1999-09-08 10:59:03 +00:00
Doug Rabson
062acdb7e7 Change isa_get/set_flags() to device_get/set_flags(). 1999-09-07 08:42:49 +00:00
Peter Wemm
e5174d14c5 Repo copy isa/sio* to dev/sio/sio* in preperation for extra bus methods
including pci.
Also, eliminate NSIOTOT and do it dynamically where it matters.
1999-09-06 14:06:23 +00:00
Peter Wemm
945f740363 Move the #if 0 to catch the card.h include and make sure it's zero. 1999-09-06 13:30:36 +00:00
Warner Losh
13264f28fb Start to disentangle the isa attachments from other buses. Partially
rewrite the pccard attachment case.  This is a work in progress, but
doesn't break the isa case.

I left the #if 0...#endif around the pccard stuff, at Peter's request,
so that normal users don't shoot themselves in the foot.

While I was here:
	o Indent a comment to the right location
	o Spell Unknown with a final 'n'.

Reviewed by: peter
1999-09-06 06:45:20 +00:00
Peter Wemm
dd68ef1623 Recognise the new 82559 chip id as used on the InBusiness 10/100 adapter.
I have an 82559 card with the same id as the other 8255[78] chips, but
that was made with a date code of 0699 (June 99).  The submitter shows
this working with the probe etc, but doesn't actually say it works as
on the ethernet. :-) Assuming it does, this is a RELENG_3 merge candidate.
Submitted by:	Steven E Lumos <slumos@sam.ISRI.UNLV.EDU>
1999-09-06 06:15:18 +00:00
Bill Paul
bbf7ca2249 Add a driver for the AMD AM79c873 10/100 PHY. By some strange coincidence,
this PHY and the Davicom DM9101 have exactly the same register definitions.
One of them is probably a clone of the other. I'm not sure which.

This is needed for the Davicom DM9102 10/100 PCI ethernet driver which
will be committed shortly.
1999-09-06 05:27:55 +00:00
Poul-Henning Kamp
9e33123898 nullclose, not noclose of course. 1999-09-05 15:41:09 +00:00
Peter Wemm
3ca1647688 $Id$ -> $FreeBSD$ 1999-09-05 15:21:05 +00:00
Greg Lehey
950da56038 struct rqgroup: put 0-length array at the end. Make mental note not
to write such crap again.

Spotted-by:	Parag Patel <parag@cgt.com>
1999-09-05 06:32:20 +00:00
Cameron Grant
8f77ea6449 incorporate better ess support
Obtained From:	KUROSAWA Takahiro <fwkg7679@mb.infoweb.ne.jp>
Tested By:	peter
1999-09-04 18:23:23 +00:00
Cameron Grant
c5ad1e3a03 handle uiomove better in feed_root 1999-09-04 17:08:30 +00:00
Cameron Grant
4a8480837a bugfix: deallocate channels properly if no read/write ops between open/close 1999-09-04 17:03:59 +00:00
Doug Rabson
bd64ce72a8 Add USR3031 pnp id.
Submitted by: Steve Price <sprice@hiwaay.net>
1999-09-04 14:31:56 +00:00
Bill Paul
ba2cb70286 #ifdef out the definition for the small packet RX ring. I ended up only
using one RX ring because of the alignment issue, so we may as well save
a few K of memory by not allocating space for it.
1999-09-03 20:58:39 +00:00
Doug Rabson
4c2212401b Remove vestiges of old pnp code. 1999-09-03 20:11:25 +00:00
Doug Rabson
1c3111dc06 Remove the last vestiges of the old pnp code in favour of the new one. 1999-09-03 20:01:08 +00:00
Peter Wemm
599d7638dd Commit a checkpoint of an updated if_ed driver. This is pretty much
Doug Rabson's work, with a few tweaks from Warner Losh and I.  There are
still some quirks to resolve, but the old driver is presently breaking
the build.
1999-09-03 19:10:56 +00:00
Peter Wemm
16e68fc605 Cosmetic tweak. Collect the fdc methods together and apart from the fd
methods so it's a little easier to seperate the two when reading the code.
1999-09-03 11:32:21 +00:00
Poul-Henning Kamp
9c48bdd348 Use micro "disk" layer in ata-disk
Reviewed by:	sos
1999-09-03 10:57:17 +00:00
Poul-Henning Kamp
a2f21fdc51 Set si_bsize_phys to 2048 for cdrom.
Reviewed by:	sos
1999-09-03 10:56:27 +00:00
Julian Elischer
7012bab988 Revert a bunch of contraversial changes by PHK. After
a quick think and discussion among various people some form of some of
these changes will probably be recommitted.

The reversion requested was requested by dg while discussions proceed.
PHK has indicated that he can live with this, and it has been agreed
that some form of some of these changes may return shortly after further
discussion.
1999-09-03 05:16:59 +00:00
Julian Elischer
439a479b3b remove some out-of-scope DEVFS references..
(don't worry greg.. cosmetic only)
1999-09-03 05:08:05 +00:00
Luoqi Chen
cb899cd41d Handle for passthru resource release correctly. 1999-09-03 04:30:01 +00:00
Matthew N. Dodd
fdfd9f2f70 This adds support for the Buslogic/Bustek/Storage Dimensions
MCA SCSI adapters.

bt_mca.c is going to live in sys/dev/buslogic instead of sys/dev/mca
as per a conversation with Peter, Doug and Mike.

Thanks to Andy Farkas <andyf@speednet.com.au> for being such a good
sport and doing all the testing for me (as I don't actually own one
of these cards.  Yet.)
1999-09-03 03:50:55 +00:00
Matthew N. Dodd
30ca126cee This is the rest of the MCA support; new_bus code to be exact.
Should we ever find ourselves on an RS/6000 this code should work
with few changes.
1999-09-03 03:40:00 +00:00
Greg Lehey
1fa2fb7bf2 Reverse MFC of revision 1.5.2.7:
Remove a rather embarrassing race condition.

Egged-on-by:	alfred
1999-09-03 01:37:26 +00:00
KATO Takenori
8b18acc0df - Added new macros ED_P1_MAR(i) and ED_P1_PAR(i) that replace
`ED_P1_MAR + i' and `ED_P1_PAR + i', respectively.
- convert ED_PC_RESET and ED_PC_MISC into relative offset from
  ED_PC_ASIC_OFFSET (those macros are not used in current source).

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
1999-09-02 15:06:23 +00:00