Commit Graph

25 Commits

Author SHA1 Message Date
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
perry f07677dd81 nuke trailing whitespace 2005-02-26 22:45:09 +00:00
dyoung a8699ab9a4 As pointed out by Greg Troxel, ifmedia_entrys were allocated with
malloc_type M_IFADDR and freed with malloc_type M_DEVBUF.  This
causes a panic(9) in DIAGNOSTIC kernels.  Add malloc_type M_IFMEDIA
and use it for both malloc'ing and free'ing ifmedia_entrys.
2004-12-08 20:37:43 +00:00
thorpej 15921b5f23 De-__P'ify. 2004-04-09 20:44:57 +00:00
ragge 9a3ec25f87 Add media type 10GbaseLR. Change ifmb_baudrate and ifmedia_baudrate()
to u_quad_t instead of int (common speed today exceeds 2Gbit).
2004-02-19 11:58:30 +00:00
briggs 953bcec0ab ifmedia_set() should not panic, nor can it really fail. So if there is
some problem setting the media to the requested value (usually IFM_AUTO),
we now force the media selection to IFM_NONE.
This addresses PR/14029 ``panic("ifmedia_set") a little too brutal''
and may address to some degree PR/19504 and PR/23341.
2003-11-03 14:43:32 +00:00
christos 9a1168a5bf Avoid DOS attack by setting ifm->ifm_media to a high number and running the
kernel out of memory. Thanks to Andreas Oman.
2003-07-25 19:35:57 +00:00
chs 7d8622764c when there are multiple matches for the requested media, select the first
matching instance rather than the last one.  this restores the behaviour
in the multiple-match case to what it was when all the drivers only allowed
instance 0 (and in particular, makes autonegotiation of the on-board fxp
on my DK440LX board work again by default, which has two PHYs that both
advertise "auto").  as discussed on tech-net.
2002-11-12 16:54:45 +00:00
thorpej f5c6a07c43 Fix more signed/unsigned comparison warnings. 2002-11-07 08:00:47 +00:00
itojun 822449ac65 KNF - return is not a function. 2002-09-11 05:36:26 +00:00
lukem 34d65a3414 add RCSIDs 2001-11-12 23:49:33 +00:00
drochner 32f3bee595 fix typo in comment 2001-05-18 08:56:27 +00:00
joda 7c1106ddf8 when changing to an unsupported media type, return EINVAL instead of
ENXIO
2001-02-26 09:42:00 +00:00
jdolecek fd0f688850 make local const stuff as static const, so that it's pushed to text segment 2001-01-17 19:04:03 +00:00
augustss c1ebd1929a Kill some more register declarations. 2000-03-30 09:45:33 +00:00
soren 95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +00:00
thorpej 877704d33e Add ifmedia_baudrate(), which returns a value suitable for ifi_baudrate
given a media word, or 0 for unknown.
2000-03-06 20:50:29 +00:00
thorpej 3302e4f5a2 Add a way to delete all media for a specified instance. 2000-01-26 21:58:17 +00:00
thorpej e19c356e76 Make the ifmedia_entry list a TAILQ. This is pretty much for cosmetics
(media added to tail, so that when e.g. the list is run to print out
what media exist, they appear in-order).
1999-11-03 23:06:35 +00:00
thorpej 98109043a9 Expose the ifmedia_match() function. 1999-10-27 17:59:24 +00:00
thorpej c7ea24c151 Back out previous. It was just ... braindamaged. 1999-04-30 17:47:36 +00:00
abs 175b821dfe If the driver only supports one media type, and ifmedia_ioctl() is called to
select the current medium, (and it is not autoselect), assume no change and
do not try to select the medium. Fixes 'ifconfig le0 medium 10base5' on sparc2
without requiring a 'do nothing' mediachange callback.
1999-04-30 17:30:49 +00:00
enami 27d8639238 Make this compile with -DIFMEDIA_DEBUG. 1998-08-30 07:39:39 +00:00
thorpej b04ded7264 Completely rewrite the way media descriptions are represented. The same
data structure is used, but a much saner matching mechanism is used, one
which allows greater ease in adding new types.
1998-08-06 02:19:34 +00:00
thorpej 1b1c7ef868 BSD/OS-style network interface media selection, implemented by
Jonathan Stone and myself.  Many thanks to Matt Thomas for providing
the information necessary to implement this interface, and for helping
to shake out the bugs.
1997-03-17 02:55:12 +00:00