Commit Graph

190 Commits

Author SHA1 Message Date
imp
6a1dfba5bd Remove duplicate $FreeBSD$
Noticed by: njl
2004-07-22 07:11:15 +00:00
imp
3c3bda2a22 Minor style nit 2004-07-22 00:16:50 +00:00
imp
5f2befc69a Fix disordering of pccarddevs.h noticed by bde. Also remove a few
redundant includes and fix some of the include disordering.

Submitted by: bde
2004-05-27 03:49:45 +00:00
imp
1f5642e8bb Move to generating pccarddevs.h on the fly, both for the kernel and
the modules.

Also generate usbdevs.h automatically now, but a non-kernel file is
stopping that at the moment.
2004-05-26 00:53:10 +00:00
mux
03028ee82d We don't need to initialize if_output, ether_ifattach() does it
for us.
2004-05-23 16:11:53 +00:00
njl
05a1f56fc9 Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by:	Mark Santcroos <marks@ripe.net>
Reviewed by:	imp, dfr, bde
2004-03-17 17:50:55 +00:00
ru
0691899be2 Removed duplicate __FBSDID(). Keep the one that style(9) likes. 2004-03-14 08:43:55 +00:00
mdodd
5c1fa8d5da Announce ethernet MAC addresss in ether_ifattach(). 2004-03-14 07:12:25 +00:00
imp
3fef709f3d MFp4:
o Remove redundant $FreeBSD$
o Better comments about ep_get_macaddr.
o remove one tab in a switch statement (style only)
o Recognize ID 0x0035 as the device ID for the 3CXEM556 that I have.  This
  makes the 3CXEM556 work for me.  Not 100% sure this is the assigned ID,
  as I don't have the datasheets for this part, but it does work and get
  the correct ethrnet address.
o Comment about the whole fake IRQ 3 thing.  some need it, some don't, all
  work with it.
2003-11-02 20:13:39 +00:00
imp
df6cf256ed MFp4:
o Minor tweak to error processing in ep_alloc.
2003-11-02 20:10:09 +00:00
imp
dbf45c3d8e MFP4:
o define EP_W2_ALT_EEPROM.  we don't use it yet, but may soon.
2003-11-02 20:08:58 +00:00
brooks
f1e94c6f29 Replace the if_name and if_unit members of struct ifnet with new members
if_xname, if_dname, and if_dunit. if_xname is the name of the interface
and if_dname/unit are the driver name and instance.

This change paves the way for interface renaming and enhanced pseudo
device creation and configuration symantics.

Approved By:	re (in principle)
Reviewed By:	njl, imp
Tested On:	i386, amd64, sparc64
Obtained From:	NetBSD (if_xname)
2003-10-31 18:32:15 +00:00
imp
33cc34743e Pass sc to GO_WINDOW macro.
Use SET_IRQ for pccard case, rather than exapnding it inline.

Requested by: mdodd
2003-10-26 22:28:20 +00:00
imp
a499536827 Minor style nits suggested by sam and mdodd:
o give an argument to EP_BUSY_WAIT
o use foo_locked rather than foo_body
o Add locking assertions for extra safety.
2003-10-25 21:28:40 +00:00
imp
cdc83babef Whole grab-bag of changes:
o Make the driver MPSAFE
o Some changes due to diff reduction effort with vx.
o Removed some obsolete junk.

Reviewed by: sam, modd
2003-10-25 04:09:49 +00:00
imp
15a4c57d43 Fix mismerge from one tree to another: add ( 2003-10-23 05:33:53 +00:00
imp
85e50985be Learn basic C.
((uint32_t *) v) + 10 != ((caddr_t) v) + 10
so apply the cast later.
2003-10-23 03:42:47 +00:00
imp
92be84c4b4 Finish the removal of the bst/bsh confusion. 2003-10-19 17:38:04 +00:00
bms
6360d0a43d Fix LINT build by correcting a missed change. 2003-10-19 09:31:07 +00:00
imp
61abce2611 Don't confuse tags and handles. 2003-10-19 00:03:10 +00:00
bms
39bde695bf Fix a typo. The module has the EISA front-end commented out, therefore the
error may not have been picked up right away.

Reviewed by:	mdodd
Submitted by:	Stuart Walsh
2003-10-18 20:44:23 +00:00
imp
cec43b43e0 Transition to using bus_space macros rather than the inb/outb/etc.
Use EP_{READ,WRITE}{,_MULTI}_{1,2,4} instead.  I've had several people
submit patches like this over the years of varying qualities, markm
being the last.  The names were chosen in consulation with mdodd on
irc.

I've tested this with only PCMCIA cards: 3CCE589EC and 3CCSH572BT.
I've not tried with my more extensive ISA, EISA and cbus collection.

Reviewed by: mdodd
2003-10-18 15:22:43 +00:00
markm
a7ab0b2416 Style fixes of the whitespace variety. Fix long lines and tabs. 2003-08-30 08:10:58 +00:00
obrien
c63dab466c Use __FBSDID().
Also some minor style cleanups.
2003-08-24 17:55:58 +00:00
cognet
6404cf2aa0 Use bus_child_present() to make sure the card is still there before calling
epstop() in ep_detach().
This fixes a freeze that happens when ejecting a ep(4) pcmcia card.
2003-08-19 14:06:42 +00:00
markm
65110ffbfb Style(9) cleanup. There was no consistent style in this driver, and
The next round of commits will be to fix up locking in it. This lot
is to at least give a consistent base to work off.

OK'ed by:	imp, mdodd
2003-07-17 19:37:56 +00:00
mux
42e3f9b6ff Other minor style nits I missed in ep_if_start() in my previous
commit.
2003-06-26 17:02:52 +00:00
mux
f0e747489f Make if_ep_start() look a bit more like other if_start() functions,
by calling the first mbuf in the chain m0 and fixing a few nearby
style bugs, mostly s/0/NULL/.
2003-06-26 14:28:35 +00:00
mux
77cccd32e5 Fix a race condition that was introduced since pccbb interrupts are
flag'ed INTR_MPSAFE.  In ep_if_start(), use the IF_DEQUEUE macro to
grab the next mbuf to send, and use IF_PREPEND if the card is busy
and we actually can't handle it right now.

The old code was first getting the mbuf by taking it from the queue
without using the macros, thus without locking, and without removing
it from the queue either.  It was later assuming that IF_DEQUEUE would
give him this same mbuf.

Tested by:	mich
2003-06-26 13:27:44 +00:00
imp
0b41fd998b Make sure that pp_name is non-null before setting the device
description.  This allows us to rely entirely on the CIS entries if
necessary...
2003-04-10 04:36:02 +00:00
mdodd
47e745e49e Revert 1.21; this was local code that should not have been
committed.
2003-03-30 08:13:47 +00:00
mdodd
446c24ca7a - Free interrupt handler in ep_free().
- Move ep_pccard_detach() to if_ep.c and rename to ep_detach()
- Specify detach methods for all bus frontends.
2003-03-29 22:27:41 +00:00
mdodd
46dc207e19 Checksum the configuration EEPROM. 2003-03-29 21:57:32 +00:00
mdodd
69599b7cf6 - Return error status instead of value in get_e().
- Modify ep_get_macaddr() to return an error status.
- Reverse the return value logic of eeprom_rdy().
2003-03-29 21:44:46 +00:00
mdodd
da71607d13 Register dependency on the elink module. 2003-03-29 13:45:17 +00:00
marcel
3f47a37129 Fix compilation on non-i386 machines. Inconsistent conditional
compilation yielded definitions that we're used.
2003-02-23 03:39:22 +00:00
imp
cf874b345d Back out M_* changes, per decision of the TRB.
Approved by: trb
2003-02-19 05:47:46 +00:00
mdodd
e9378a292b Bandaid the bits that use the elink_foo() functions which are
i386 only at this point.
2003-02-13 23:01:59 +00:00
alfred
bf8e8a6e8f Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
sam
14c32b5f40 network interface driver changes:
o don't strip the Ethernet header from inbound packets; pass packets
  up the stack intact (required significant changes to some drivers)
o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN)
o track ether_ifattach/ether_ifdetach API changes
o track bpf changes (use BPF_TAP and BPF_MTAP)
o track vlan changes (ifnet capabilities, revised processing scheme, etc.)
o use if_input to pass packets "up"
o call ether_ioctl for default handling of ioctls

Reviewed by:	many
Approved by:	re
2002-11-14 23:54:55 +00:00
takawata
94f9a3d5a8 Fix build breakage on my pccard related commit. 2002-05-31 01:08:49 +00:00
alfred
3264aec746 Remove __P. 2002-03-20 02:08:01 +00:00
imp
f3e9446326 Two fixes from Jonathan Hanna:
1) We shouldn't continue when we get a RX complete because we ack it
	   and the TX complete.
	2) Fix a couple of spl leaks
(why splbio is needed in ISR, I cannot understand).

MFC after: 3 days
2002-02-12 05:32:58 +00:00
imp
1f90e6ccf5 More devices. Obtained from NetBSD. 2001-11-15 07:57:38 +00:00
imp
6fdb4db61f Migrate to PCMCIA_CARD() macros 2001-11-15 07:52:49 +00:00
imp
249aae3888 s/PCCARD_/PCMCIA_/g in NEWCARD device tables to enable easier NetBSD sharing 2001-11-11 20:17:10 +00:00
imp
f5e8ef092a Commit part of the patch that I have for card eject problems with the
ep driver.  The rest of the patch will wait until I can put the time
into it to get it righter than the kludge it is.

This protects us against card eject problems at all times,e xecpt when
we're in the epintr ISR.
2001-06-05 22:29:16 +00:00
imp
4e0af4d009 Use PCCARD_CIS_xxx #defines for the table of oem ids. These usually
translate to all NULLs (as for all the ones in this commit).
2001-01-21 08:15:37 +00:00
peter
98a14853d9 Add the 3COM ID's that I could find in the pccarddevs file that seemed
to match the pccard.conf file.  There are more ID's that need adding, but
these seem to be the common ones.

This was committed on an ep0 interface under NEWCARD:
ep0: <3Com 3c589 10Mbps Ethernet> at port 0x300-0x30f irq 9 function 0 config 1 on pccard1
ep0: Ethernet address 00:10:4b:df:48:57

Reviewed by: imp
2001-01-07 21:24:41 +00:00
nyan
afb8ae41f3 Fixed to support 3Com 3C569B for PC-98.
Submitted by:	"Hirokazu WATANABE" <gwna@geocities.co.jp>
2000-12-09 04:25:07 +00:00