Commit Graph

4915 Commits

Author SHA1 Message Date
Warner Losh
283a983028 Cleanup allocation of resources for 16-bits. We now do the right
thing in pccbb bridge (the pcic bridge will be updated as I merge the
two copies of the code that were in the original cardbus commit).
2000-10-22 04:37:57 +00:00
Bosko Milekic
ca43854a66 (Introduce something sitting in my repo for 3 weeks now...)
Have if_ti stop "hiding" the softc pointer in the buffer region. Rather,
use the available void * passed to the free routine and pass the softc
pointer through there.

To note: in MEXTADD(), TI_JUMBO_FRAMELEN should probably be TI_JLEN. I left it
unchanged, because this way I'm sure to not damage anything in this respect...
2000-10-21 00:13:35 +00:00
Warner Losh
f40ed9c2e4 Allow interrupts to be sharable.
This allows us to probe, but not attach.
2000-10-20 20:29:59 +00:00
Warner Losh
4659a20822 Get the interrupt correct. 2000-10-20 20:27:22 +00:00
Archie Cobbs
69ad30ba3a Add actual URL for XMAC II datasheet in comments. 2000-10-20 16:18:16 +00:00
Andrey A. Chernov
6fdfeafd1b Add i815 host to PCI bridge ID 2000-10-20 16:05:47 +00:00
Roger Hardiman
b02fea74af Add missing 'unit' code
Submitted by:	Brad L. Chisholm <blc@bsdwins.com>
2000-10-20 08:16:53 +00:00
John Baldwin
35e0e5b311 Catch up to moving headers:
- machine/ipl.h -> sys/ipl.h
- machine/mutex.h -> sys/mutex.h
2000-10-20 07:58:15 +00:00
John Baldwin
36f8814a83 Remove unnecessary machine/mutex.h include. 2000-10-20 07:54:21 +00:00
Nick Hibma
64b78d815a Bugfix: The data is not stored only in the first cblock, calculate the
length of the data properly. This should be moved into a tty_subr
function.

Also, disanle the setting of the CDC_CM_OVER_DATA flag. It breaks some
modems. I don't think that ther actually is a modem that needs this.

Submitted by:		Brad Karp <bkarp@ICSI.Berkeley.EDU>
2000-10-20 00:35:52 +00:00
Nick Hibma
3cf950d1c5 Regen. 2000-10-20 00:30:01 +00:00
Nick Hibma
9258cec045 Add the Sony MSC Memory Stick Adaptor (in the Sony PCS laptops) 2000-10-20 00:29:21 +00:00
Warner Losh
7ae6b1ebd2 o Fix memory leak in ivars
o Change name of bus
o Change the panic on resource allocation failure to just a message.  We'll
  work out why this fails later in the pcic/pccbb code merge.
2000-10-19 22:36:41 +00:00
John Baldwin
0cfbef3288 Quiet a silly warning.
Pointy-hat to:	ps
2000-10-19 18:52:20 +00:00
Jonathan Chen
feb78939ee NEWCARD/Cardbus -
This commit adds support for Xircom X3201 based cardbus cards.
Support for the TDK 78Q2120 MII is also added.
IBM Etherjet, Intel and Xircom cards uses these chips.

Note that as a result of this commit, some Intel/DEC 21143 based cardbus
cards will also attach, but not get link.  That is being looked at.
2000-10-19 08:34:32 +00:00
Mike Smith
c7e95d0abe Write the routed interrupt back to PCI configuration space. 2000-10-19 08:07:23 +00:00
Roger Hardiman
de2c745ce3 Add Daniel's name and fix release data 2000-10-19 07:34:18 +00:00
Roger Hardiman
97e1cf9c1b Update to driver 2.17
Fixes bugs in devfs when unloading and reloading
Syncs with NetBSD changes

Submitted by:	Alexander Langer <alex@big.endian.de>
Submitted by:	Thomas Klausner <wiz@netbsd.org>
Submitted by:	Daniel O'Connor" <doconnor@gsoft.com.au>
2000-10-19 07:33:28 +00:00
Søren Schmidt
550abec2a0 Minor changes to the ATA RAID support code, remove some verbosity
and put some under bootverbose..
2000-10-18 18:49:42 +00:00
Peter Wemm
df58517066 This didn't compile. Fix typo: s/rmang_get_start/rman_get_start/ 2000-10-18 17:45:29 +00:00
Peter Wemm
93d88e0056 Attempt to fix the random read blocking. The old code slept at
priority "0" and without PCATCH, so it was uninterruptable.  And
even when it did wake up after entropy arrived, it exited after the
wakeup without actually reading the freshly arrived entropy.  I
sent this to Mark before but it seems he is in transit.
Mark: feel free to replace this if it gets in your way.
2000-10-18 10:39:18 +00:00
Warner Losh
b8493884df Go ahead and disable the legacy mapping of the pcic registers on the
RF5C47x.  Before the code would only do this on the RF5C46x bridges.

Submitted by: Jonathan Chen
2000-10-18 09:55:39 +00:00
Jonathan Chen
6672edd320 Initial commit of NEWCARD cardbus side (that actually compiles and works)
Files:
	dev/cardbus/cardbus.c
	dev/cardbus/cardbusreg.h
	dev/cardbus/cardbusvar.h
	dev/cardbus/cardbus_cis.c
	dev/cardbus/cardbus_cis.h
	dev/pccbb/pccbb.c
	dev/pccbb/pccbbreg.h
	dev/pccbb/pccbbvar.h
	dev/pccbb/pccbb_if.m

This should support:
  - cardbus controllers:
    * TI 113X
    * TI 12XX
    * TI 14XX
    * Ricoh 47X
    * Ricoh 46X
    * ToPIC 95
    * ToPIC 97
    * ToPIC 100
    * Cirrus Logic CLPD683x
  - cardbus cards
    * 3c575BT
    * 3c575CT
    * Xircom X3201 (includes IBM, Xircom and, Intel cards)
    [ 3com support already in kernel, Xircom will be committed real soon now]

This doesn't work with 16bit pccards under NEWCARD.

Enable in your config by having "device pccbb" and "device cardbus".
(A "device pccard" will attach a pccard bus, but it means you system have
a high chance of panicing when a 16bit card is inserted)

It should be fairly simple to make a driver attach to cardbus under
NEWCARD -- simply add an entry for attaching to cardbus on a new
DRIVER_MODULE and add new device IDs as necessary.  You should also make
sure the card can be detached nicely without the interrupt routine doing
something weird, like going into an infinite loop.  Usually that should
entail adding an additional check when a pci register or the bus space is
read to check if it equals 0xffffffff.

Any problems, please let me know.

Reviewed by: imp
2000-10-18 03:37:21 +00:00
Jonathan Chen
0db7e66cdc Initial commit of NEWCARD cardbus side (that actually compiles and works)
Files:
	dev/cardbus/cardbus.c
	dev/cardbus/cardbusreg.h
	dev/cardbus/cardbusvar.h
	dev/cardbus/cardbus_cis.c
	dev/cardbus/cardbus_cis.h
	dev/pccbb/pccbb.c
	dev/pccbb/pccbbreg.h
	dev/pccbb/pccbbvar.h
	dev/pccbb/pccbb_if.m

This should support:
  - cardbus controllers:
    * TI 113X
    * TI 12XX
    * TI 14XX
    * Ricoh 47X
    * Ricoh 46X
    * ToPIC 95
    * ToPIC 97
    * ToPIC 100
    * Cirrus Logic CLPD683x
  - cardbus cards
    * 3c575BT
    * 3c575CT
    * Xircom X3201 (includes IBM, Xircom and, Intel cards)
    [ 3com support already in kernel, Xircom will be committed real soon now]

This doesn't work with 16bit pccards under NEWCARD.

Enable in your config by having "device pccbb" and "device cardbus".
(A "device pccard" will attach a pccard bus, but it means you system have
a high chance of panicing when a 16bit card is inserted)

It should be fairly simple to make a driver attach to cardbus under
NEWCARD -- simply add an entry for attaching to cardbus on a new
DRIVER_MODULE and add new device IDs as necessary.  You should also make
sure the card can be detached nicely without the interrupt routine doing
something weird, like going into an infinite loop.  Usually that should
entail adding an additional check when a pci register or the bus space is
read to check if it equals 0xffffffff.

Any problems, please let me know.

Reviewed by: imp
2000-10-18 03:25:13 +00:00
Warner Losh
e8f9f4ecd4 Remove some silly debug writes and code that we don't need 2000-10-18 02:22:39 +00:00
Warner Losh
cc8e7d4250 o Remove a boatload of debugging printfs.
o Report function number and config index on probe line
o Activate the resources (I hope) when RF_ACTIVE is set on those resources
  I'm allocating on behalf of my children.
o Always enable interrupts on multifunction cards in the multifunction
  register.
2000-10-18 02:21:00 +00:00
Matthew N. Dodd
a4a64f2f0a Use appropriate resource management accessors instead of directly
referencing structure members.

Use rman_get_size() instead of end - start + 1.
2000-10-18 00:09:26 +00:00
Matt Jacob
e92fbe47e2 Roll minor revision- for once we'll use this because.... if revision >= 5.4,
compile time will build in mutex locks, otherwise the old locking (splcam/splx
with a recursion counter) will be compiled in.

We still depend on config_intr_hook to tell us when it's okay to call
msleep instead of polling. It'd be real nice if we could do this early
enough to not hang up a machine struggling with a bad Fibre Channel loop,
but that's still to come.
2000-10-17 18:18:14 +00:00
Matt Jacob
39f3fc6f69 remove "SERVICING_INTERRUPT" nonsense 2000-10-17 18:15:30 +00:00
Paul Saab
c794ceb56a Implement write combining for crashdumps. This is useful when
write caching is disabled on both SCSI and IDE disks where large
memory dumps could take up to an hour to complete.

Taking an i386 scsi based system with 512MB of ram and timing (in
seconds) how long it took to complete a dump, the following results
were obtained:

Before:				After:
	WCE           TIME		WCE           TIME
	------------------		------------------
	1	141.820972		1	 15.600111
	0	797.265072		0	 65.480465

Obtained from:	Yahoo!
Reviewed by:	peter
2000-10-17 10:05:49 +00:00
Warner Losh
c5cdd6f29e More NEWCARD fixes. We now almost properly print the probe message.
o Remember the resources we allocate for the config entry.
o When we get the resource, do an resource_list_add and do a
  resource_list_delete if we fail later in the resource list.
o In the pccard bus, we allocate the resources.  When a child asks for
  them, just return the resources that we allocated (thanks to Paul
  Richards and Mike Smith for the idea).
2000-10-17 06:29:21 +00:00
Warner Losh
8302c16686 Forgot to commit this last night.
Define interrupt routing method.

Submitted by: msmith
2000-10-16 19:43:44 +00:00
Nick Hibma
ebcc7b37d5 Undo previous commit. <machine/clock.h> is needed for the prototype
for DELAY().
2000-10-16 18:50:00 +00:00
Nick Hibma
8b677600f9 Sync with NetBSD:
Add more Usages.
2000-10-16 17:45:27 +00:00
Nick Hibma
b78cc80b0d Sync with NetBSD:
Add seatbelts.
Be more lenient towards restarting the ports: If a port manages to connect
successfully reset the restartcount.
2000-10-16 17:40:59 +00:00
Andrew Gallatin
68ab2e8672 The previous commit broke kernel builds on alpha (and probably ia64).
#ifdef away the offending code until somebody with more newbus fu than
me can figure out where to put a default function that returns 255
without touching each alpha chipset driver..
2000-10-16 15:38:11 +00:00
David E. O'Brien
146a7d5318 "Ok, my loader's now up to putting up a prompt. It probes disks partially
but can't boot from them yet."

Thanks to Stephane Potvin for the some of the code in this set.

Submitted by:	Benno Rice <benno@jeamland.net>
2000-10-16 10:46:22 +00:00
Ruslan Ermilov
df4443ffa6 Added support for i815. 2000-10-16 08:53:00 +00:00
Warner Losh
9344caaf08 First cut at allocating the resources from the CIS after the probe, but
before the attach.  Things aren't completely working, but this is a good
checkpoint.

Also, initialize the dev member of the function as soon as we add it
to the parent.
2000-10-16 07:51:12 +00:00
Warner Losh
9bf4bbcaf7 When a pci device hasn't had an interrupt routed to it (signified by
the intline of 255) go ahead and route the interrupt when we allocate
an interrupt.

Submitted by: msmith
2000-10-16 07:24:00 +00:00
Mike Smith
1b97a6c6a9 Network modules are all "if_foo" not "foo". Avoid the confusing spew that
ensues when ifconfig tries to load if_ed.ko when it's already in the kernel.
2000-10-15 20:23:27 +00:00
Warner Losh
d62abc771f Lots of little fixes. We no longer panic on card insert:
o initialize ivars with bzero.
o remove interrupt function pointer.  netbsd needs it, but we don't.
o add lots of comments about bogus things that I've been kludging to try
  to make the simple cases work.
o add new ivar accessor for cis4 to match cis3.  likely neither will be
  needed, but it doesn't hurt to have it.
2000-10-15 17:21:50 +00:00
Poul-Henning Kamp
db7e3af111 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
Poul-Henning Kamp
398bc678aa Move DELAY() from <machine/clock.h> to <sys/systm.h> 2000-10-15 09:51:49 +00:00
Peter Wemm
ada54f9e54 Untangle some resource matching loops that were getting on my nerves
and seemed to be getting cut/pasted to places they shouldn't be.
2000-10-15 08:50:45 +00:00
Poul-Henning Kamp
1f22e63352 Remove even more unneeded #includes. 2000-10-14 17:37:32 +00:00
Poul-Henning Kamp
2d99f9a72c Remove even more nneeded #includes. 2000-10-14 15:57:44 +00:00
Mark Murray
a6278a2a42 After some complaints about the dir names, the random device is
now in dirs called sys/*/random/ instead of sys/*/randomdev/*.

Introduce blocking, but only at startup; the random device will
block until the first reseed happens to prevent clients from
using untrustworthy output.

Provide a read_random() call for the rest of the kernel so that
the entropy device does not need to be present. This means that
things like IPX no longer need to have "device random" hardcoded
into thir kernel config. The downside is that read_random() will
provide very poor output until the entropy device is loaded and
reseeded. It is recommended that developers do NOT use the
read_random() call; instead, they should use arc4random() which
internally uses read_random().

Clean up the mutex and locking code a bit; this makes it possible
to unload the module again.
2000-10-14 10:59:56 +00:00
Bill Paul
4c2efe270a Clean up a few things in dc_setcfg() pointed out to be me by
aaron@openbsd.com on IRC earlier today.
2000-10-14 00:40:14 +00:00
Jonathan Lemon
834801e8af Look at both the vendor and subvendor information when determining
whether this is a Smart Array.  This fixes a problem where the driver
would incorrectly match a Dell RAID device.

Reviewed by: msmith
2000-10-13 23:34:47 +00:00