Commit Graph

12829 Commits

Author SHA1 Message Date
Warner Losh
3302cab184 Rework DL10019/DL10022 support. This tries to reset things in a more
proper way, or at least the same way that NetBSD and Linux do things
(I've been unable to obtain datasheets for these parts to know for
sure).  This has some marginal improvement in the DL10022 and DL10019
cards that I have.  Also, report which type, exactly.

# There's one or two ed cards that I have which still don't work, but I think
# that's due to MII losage on the card that's not presently compensated
# for in the MII drivers.
2005-02-14 06:54:06 +00:00
Warner Losh
f3fe05f878 MFp4: Merge in AX88790 support from my p4 tree. I've had this in my
tree since 2003/02/20, and I recently cleaned it up.  I'd even closed
the PR that I obtained this from Fri Jul 18 23:25:08 MDT 2003 since
I looked at my p4 tree.

PR: 46889
Submitted by: HASEGAWA Tomoki
2005-02-14 06:47:22 +00:00
Warner Losh
f8d201b879 Add some comments in preparation for converting bcopy/bzero to busspace.
Minor style nits.
2005-02-14 06:27:23 +00:00
Warner Losh
1ab733644b MFP4: Optimize the layout of softc somewhat. This groups the u_chars
into larger sections.  I'd like to move to having a flags word, but I
need to make sure that there's no adverse locking problems.
2005-02-14 06:25:06 +00:00
Ian Dowse
e0a4f554be Abort any active transfers when the device detaches. This fixes a
few situations where we used to crash, but by no means all of them.
2005-02-14 02:17:53 +00:00
Ian Dowse
d83604e89a Add a new function usbd_abort_default_pipe() that aborts any transfers
on the default pipe. This is helpful in device detach routines to
stop any active control transfers.
2005-02-14 01:51:51 +00:00
David E. O'Brien
f882b45c07 Fix a missing /*- 2005-02-14 01:10:50 +00:00
Alan Cox
e340fc602b Request a CPU private mapping from sf_buf_alloc(). If the swap-backed
memory disk is larger than the number of available sf_bufs, this improves
performance on SMPs by eliminating interprocessor TLB shootdowns.  For
example, with 6656 sf_bufs, the default on my test machine, and a 256MB
swap-backed memory disk, I see the command
"dd if=/dev/md0 of=/dev/null bs=64k" achieve ~489MB/sec with the default,
shared mappings, and ~587MB/sec with CPU private mappings.
2005-02-13 21:51:50 +00:00
Ian Dowse
a66e65f5a9 When attached to a high-speed device, report a more appropriate
base transfer speed to CAM. The actual value used (40MB/s) is fairly
arbitrary, but assumes the same 33% overhead as was implied by the
1MB/s figure we used for USB1 devices.
2005-02-13 21:38:34 +00:00
Nate Lawson
39da3eb359 Allow users to manually override quirks with the tunable "debug.acpi.quirks".
Suggested by:	Jung-uk Kim
2005-02-13 20:10:28 +00:00
Nate Lawson
e22cd41c01 Add support for the CPUFREQ_FLAG_INFO_ONLY flag. Devices that report this
are not added to the list(s) of available settings.  However, other drivers
can call the CPUFREQ_DRV_SETTINGS() method on those devices directly to
get info about available settings.

Update the acpi_perf(4) driver to use this flag in the presence of
"functional fixed hardware."  Thus, future drivers like Powernow can
query acpi_perf for platform info but perform frequency transitions
themselves.
2005-02-13 18:49:48 +00:00
Ruslan Ermilov
b25030ca8e Install netgraph type at an appropriate time. 2005-02-13 11:15:25 +00:00
Nate Lawson
3bd74b84f5 Be sure to register with cpufreq(4). On systems that only supported
throttling, neglecting to do this kept the sysctls from appearing.
Attach an acpi_throttle device to each CPU that supports it.
Don't add a device if the P_BLK is invalid or if _PTC is not present.
This removes extraneous probe/attach failure messages on some machines.
Make the cpu throttle state local to the softc to account for partial
successes when changing the clock rate on MP machines.
2005-02-13 05:34:52 +00:00
Nate Lawson
8b39b8ce63 Attach an acpi_perf device for every processor that offers the right
methods.
2005-02-13 05:25:27 +00:00
Poul-Henning Kamp
6833149f4b Check handle types.
Implement more device functions.
Make DMA optional.
2005-02-12 23:52:44 +00:00
Poul-Henning Kamp
da0e67693d Add ibcntl as alias for ibcnt
Add ibsta and start to use it.
Rename the argument structure more sensibly.
Improve timeout and error handling
2005-02-12 21:07:09 +00:00
Marius Strobl
2b2250b149 - Re-write OF_decode_addr() with a bus-neutral approach, adding support
for nodes hanging off of Central (untested), FireHose (untested) and
  PCI (tested) busses.
- Add an additional parameter to OF_decode_addr() which specifies the
  index of the register bank to decode.

These should allow to eventually add support for the Z8530 hanging off of
FireHose to uart(4) and to write support for PCI-based graphics adapters.

Suggested by:	tmm (back in '03)
2005-02-12 19:13:51 +00:00
Marius Strobl
61e2f26526 Merge revision 1.5 from NetBSD: Fix a typo in a comment.
NetBSD rev. 1.4 (addition of the OFW_PCI_PHYS_HI_BUS macro) had already
been merged prior to adding this file to FreeBSD (with the 1.3 tag though).
2005-02-12 19:12:17 +00:00
Poul-Henning Kamp
3ee4a2a426 Split the ibfoo API into its own file.
Implement ibdma() (only affects ibrd() mode)
Implement ibeot()
2005-02-12 17:39:50 +00:00
Warner Losh
ec54f56441 Improve the mining of MAC address from the card:
o Add a fallback location for the MAC address.  Most of the early ne2000
  PC Cards were built from the same parts, so most of them have the same
  address in the CIS to grab the MAC from.  Use this address as our
  fallback if we don't find anything better.
o Add printf, in bootverbose, noting the MAC addresses that we find along
  the way.

# Better sanity checking of the MAC address is needed.  Will have to
# investigate using/creating a centralized function to do this as a number
# of other PC Card drivers each have their own ad-hoc tests.
2005-02-12 16:44:15 +00:00
Poul-Henning Kamp
c434197487 Fix prototype for ibeot() 2005-02-12 15:49:50 +00:00
Ruslan Ermilov
7becf838ce Two problems here:
1.  Dependency on netgraph module was broken (wrong version).
2.  Netgraph node type was never destroyed on unload.  This
    was masked by problem #1.

Fixed both by using NETGRAPH_INIT().  Now netgraph node type
is created on module load, as in the rest of netgraph modules.
2005-02-12 12:04:10 +00:00
Warner Losh
1d0fc8fda7 Add comment about MAC mining 2005-02-12 08:27:46 +00:00
Vinod Kashyap
fc01f80ec3 Bumped up the driver version, following recent changes. 2005-02-12 01:16:28 +00:00
Warner Losh
c5377c2c88 Really old PCMCIA cards stored the MAC address in the attribute memory
at some offset.  Unlike newer cards, the MAC address wasn't part of
the CIS as a specific FUNCE.  These older cards were having their MAC
address show up as 0:2:4:6:8:a because that's what's in the ROM
locations that would be there in a real ne2000.

This patch allows one to specify the offset for the MAC address for
these cards.  Specify one for the IBM Ethernet II card, as it is one
that has this problem.  One shouldn't specify this unless the MAC
address really isn't in the CIS at all.

Side note: The novell probe likely shouldn't read the MAC address, and
that should be moved to the bus specific attach routine(s), maybe as a
convenience function in if_ed_novell.c.

My IBM Ethernet II (aka Info Mover) now has a believable MAC address.
2005-02-12 00:45:22 +00:00
Poul-Henning Kamp
09dbf9afd3 Make sure the last command byte makes it onto the wire. 2005-02-11 22:24:02 +00:00
Warner Losh
d74c567254 Diff reduction with p4. 2005-02-11 07:50:03 +00:00
Poul-Henning Kamp
a3a7ba5989 Improve EOS handling. 2005-02-11 06:57:02 +00:00
Warner Losh
bd019eb78c Eliminate the ED_VENDOR_{PCCARD,LINKSYS} types. These cards really
are NOVELL NE2000 with just a tiny quirk that's non vendor specific.
Instead, use the chip_type of DL100XX instead.  This is more inline
with how the AX88190 support was added, and seems a little cleaner.
2005-02-11 06:02:27 +00:00
Warner Losh
8d50b6af00 Skip PNP probes. If there are isapnp or pnpbios instances of this driver,
then we can support them later.  This keeps the pbio probe from claiming
lots of otherwise unused pnpbios devices on my laptop.
2005-02-11 03:56:13 +00:00
Bill Paul
88d8970dea Merge in patch to support AP scanning via ifconfig and the new
net80211 API.

Submitted by: Stephane E. Potvin sepotvin at videotron dot ca
2005-02-11 02:13:12 +00:00
Warner Losh
f7167d3e91 Move enable/disable 16bit access routines into if_ed. Slightly
pessmize the error recover path through edintr by calling these
functions, rather than expanding it inline.  This error path already
does a lot in it, so an extra function call will be lost in the noise.
It also happens rarely.
2005-02-10 23:48:13 +00:00
Warner Losh
0cfebadeb9 use
while (complicated-expr)
		continune;
in preference to
	while (complicated-expr);

since the code generated is identical, and the former is easier to read,
especially for complicated-expr that reach to the end of the line...
2005-02-10 23:31:27 +00:00
Julian Elischer
c96e43721a Remove lots of tab/space errors introduced by massive cut-n-paste action.
Noticed from:	diffs of the last commit.
MFC after:	1 week
2005-02-10 22:38:51 +00:00
Julian Elischer
ade68ea226 Take into account that Pinnacle screwed up their PCI ID in the beginning..
Older cards have it reversed.
Also, use some already defined values instead of magic numbers.

PR:	 73324
Submitted by:	arne_woerner@yahoo.com
MFC after:	1 week
2005-02-10 22:26:28 +00:00
Vinod Kashyap
6cc7bd9464 1. Revert back to the way the older driver handled XPT_PATH_INQ. This seems to
fix the problem with device discovery seen by some people.
2. Change to make 3ware CLI/3DM work on amd64.
3. Fix a potential problem that could cause the driver to do strlen(NULL) when
   using older firmware.

Reviewed by:scottl
2005-02-10 18:07:33 +00:00
Poul-Henning Kamp
923da43e9b Statification 2005-02-10 12:08:55 +00:00
Poul-Henning Kamp
c711aea6ca Make a bunch of malloc types static.
Found by:	src/tools/tools/kernxref
2005-02-10 12:02:37 +00:00
Warner Losh
f2566fc59b Extricate probing of the gwether card (Gateway AT) from the middle of
probing the novell ne[12]000 cards.  It should be its own thing, ala
how we do the dl100xx support doing its own thing at the right time.
For the moment, it is just a function, which makes the mainline of the
generic probe easier to follow.

Also, correct a couple of comments that looked wrong.

# there may be a bug in setting up gwether, in that we set
# sc->rec_page_stop based on memsize, rather than sc->mem_size, so if
# these two are different, then the rec_page_stop will be wrong.  I'm
# hesitant to fix it without real hardware to test with.  Since
# gwether isn't in the hardware list of the man page nor in the commit
# messages, it is hard to know for sure.
2005-02-10 06:09:03 +00:00
Warner Losh
1e379d3696 Remove an ifdef that's been here for a long time. So long, in fact,
that it references a function parameter that's not been passed in for
more than 4 years.

This has been if 0'd since 1994.
2005-02-10 05:34:25 +00:00
Poul-Henning Kamp
954ad216af Constify. 2005-02-09 20:56:32 +00:00
Warner Losh
969eaf2179 Break out obscure ISA cards into their own files, as well as ne2000
and wd80x3 support.  Make the obscure ISA cards optional, and add
those options to NOTES on i386 (note: the ifdef around the whole code
is for module building).  Tweak pc98 ed support to include wd80x3 too.
Add goo for alpha too.

The affected cards are the 3Com 3C503, HP LAN+ and SIC (whatever that
is).  I couldn't find any of these for sale on ebay, so they are
untested.  If you have one of these cards, and send it to me, I'll
ensure that you have no future problems with it...

Minor cleanups as well by using functions rather than cut and paste
code for some probing operations (where the function call overhead is
lost in the noise).

Remove use of kvtop, since they aren't required anymore.  This driver
needs to get its memory mapped act together, however, and use bus
space.  It doesn't right now.

This reduces the size of if_ed.ko from about 51k to 33k on my laptop.
2005-02-09 20:03:40 +00:00
Wilko Bulte
1217303f75 add support for NetMos NM9805 1284 Printer port
Submitted by: Willy Offermans <W.K.Offermans@TUe.nl>

MFC after: 2 weeks
2005-02-09 18:38:28 +00:00
Warner Losh
13bf0bf2a8 Since we no longer use kvtop, we no longer need machine/md_var.h 2005-02-09 17:37:53 +00:00
Warner Losh
b3f44d7907 If either ed_probe_Novell or ed_attach returns an error, release the
resources too.
2005-02-09 17:35:13 +00:00
Scott Long
7e22e3674b Remove some unused variables. 2005-02-09 17:19:12 +00:00
Scott Long
29c711f038 Remove the messy locking dance around xpt_done() 2005-02-09 11:50:16 +00:00
Warner Losh
887a166c34 Remove DLINK_3, its unused. Remove NETGEAR FA410TX, since it is the
same as the LINKSYS COMBO_ECARD (which also seems to be the same as
another linksys product that also has a modem, but I can't find that
one at the moment).  Remove the PCM100, since it is now no longer
used.
2005-02-09 06:16:27 +00:00
Warner Losh
940e7b9e51 o Remove duplicate LINKSYS ETHERFAST entry.
o The COMBO_ECARD comes in many flavors, it seems, so probe both the DL10019
  and the AX88x90 on it.  Since this seems to work with no ill effects, maybe
  the probing should happen more generally rather than being table driven.
  Need to think more about this.
o Remove PCM100 because it is duplicative (the ETHERFAST is the pcm100 and
  apparently has the same IDs).  It was here for NetBSD because they match
  up an expected MAC address OID, but since we don't bother with that, we
  don't need to be so finely discriminating.
o Minor style nit.
2005-02-09 06:03:36 +00:00
Warner Losh
8a3b3c6288 Remove reference to softc from probe entirely... 2005-02-09 05:55:54 +00:00