freebsd-dev/sbin
Doug Ambrisko 499e862cae Change the ifr_media operation to only get its value and only set
its value once per ifconfig run.  Use Sam's new callback
operation to set it when everything is done.

The purpose for this is that if you did something like
	ifconfig bge0 media 100baseTX mediaopt full-duplex
multiple times it would end up causing the PHY to re-sync
since it would send the IOCTLs:
	ifconfig bge0 media 100baseTX -mediaopt full-duplex
	ifconfig bge0 media 100baseTX mediaopt full-duplex
This would cause the PHY to be updated twice even though
there really wasn't any change since the check in
sys/net/if_media.c would always fail.

Caveat is that this doesn't fix the case of:
	ifconfig bge0 media autoselect
etc. since in sys/net/if_media.c it forces an autoselect to go through
the entire process in ifmedia_ioctl :-( :
          /*
           * If no change, we're done.
           * XXX Automedia may invole software intervention.
           *     Keep going in case the the connected media changed.
           *     Similarly, if best match changed (kernel debugger?).
           */
           if ((IFM_SUBTYPE(newmedia) != IFM_AUTO) &&
                (newmedia == ifm->ifm_media) &&
                (match == ifm->ifm_cur))
                     return 0;

Briefly looked at by:	sam
2005-01-27 16:40:12 +00:00
..
adjkerntz Sort sections. 2005-01-18 10:09:38 +00:00
atacontrol Distinguish between TCQ and NCQ type of tagged queing. 2004-09-15 11:22:05 +00:00
atm Sort sections. 2005-01-18 10:09:38 +00:00
badsect Sort sections. 2005-01-18 10:09:38 +00:00
bsdlabel Scheduled mdoc(7) sweep. 2005-01-10 16:17:34 +00:00
camcontrol Deal with double whitespace. 2004-07-03 00:13:43 +00:00
ccdconfig Sort sections. 2005-01-18 10:09:38 +00:00
clri Remove advertising clause from University of California Regent's license, 2004-04-09 19:58:40 +00:00
comcontrol Sort sections. 2005-01-18 10:09:38 +00:00
conscontrol Note that conscontrol set and unset are an interface for TIOCCONS. 2004-06-18 20:06:04 +00:00
devd Scheduled mdoc(7) sweep. 2005-01-10 16:17:34 +00:00
devfs Remove a useless use of cat, strip overzealous punctuation, and 2004-11-06 11:16:56 +00:00
dhclient Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
dmesg WARNS=6 cleanup: 2005-01-17 13:56:46 +00:00
dump Improved error checking for existence of a .snap directory to 2005-01-21 22:13:25 +00:00
dumpfs Mechanically kill hard sentence breaks. 2004-07-02 21:45:06 +00:00
dumpon Sort sections. 2005-01-18 10:09:38 +00:00
fdisk Add 0xbf as new partition id for Solaris. 2004-11-10 07:48:29 +00:00
fdisk_pc98 Merged from src/sbin/fdisk/fdisk.c revision 1.75. 2004-10-24 12:05:10 +00:00
ffsinfo Sort sections. 2005-01-18 10:09:38 +00:00
fsck Deal with double whitespace. 2004-07-03 00:13:43 +00:00
fsck_ffs Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
fsck_msdosfs Sort sections. 2005-01-18 10:09:38 +00:00
fsdb Sort sections. 2005-01-18 10:09:38 +00:00
fsirand Avoid casts as lvalues. 2004-07-28 05:59:22 +00:00
gbde Fix a type bug which sometimes wrote unusable lock sectors on the disk. 2004-09-10 12:16:54 +00:00
geom Sort sections. 2005-01-18 10:09:38 +00:00
ggate Sort sections. 2005-01-18 10:09:38 +00:00
gpt Scheduled mdoc(7) sweep. 2005-01-10 16:17:34 +00:00
growfs Sort sections. 2005-01-18 10:09:38 +00:00
gvinum Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
idmapd Fixed xrefs. 2005-01-21 10:35:40 +00:00
ifconfig Change the ifr_media operation to only get its value and only set 2005-01-27 16:40:12 +00:00
init Sort sections. 2005-01-18 10:09:38 +00:00
ip6fw Sort sections. 2005-01-18 10:09:38 +00:00
ipf Link a couple of missing manpages 2005-01-07 09:22:02 +00:00
ipfs style.Makefile(5): 2004-02-23 20:25:27 +00:00
ipfstat style.Makefile(5): 2004-02-23 20:25:27 +00:00
ipfw Don't print extra " via ", if we have already printed one. While here, 2005-01-18 15:13:20 +00:00
ipmon style.Makefile(5): 2004-02-23 20:25:27 +00:00
ipnat style.Makefile(5): 2004-02-23 20:25:27 +00:00
kldconfig Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
kldload Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
kldstat Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
kldunload Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
ldconfig Improve readability for the recently introduced changes by having 2005-01-14 15:49:05 +00:00
mca Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
md5 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
mdconfig Allow to specify device size in bytes. 2005-01-22 20:02:01 +00:00
mdmfs - Make WARNS?= 6 clean 2005-01-25 14:28:31 +00:00
mknod Mark mknod(8) as deprecated. Add text in the 'COMPATIBILITY' section 2004-12-17 14:36:02 +00:00
mksnap_ffs Make sure we don't pass garbage to the kernel. 2004-12-08 11:54:50 +00:00
mount Sort sections. 2005-01-18 10:09:38 +00:00
mount_autofs spell "file system" correctly 2005-01-24 20:06:16 +00:00
mount_cd9660 Sort sections. 2005-01-18 10:09:38 +00:00
mount_ext2fs Remove advertising clause from University of California Regent's license, 2004-04-09 19:58:40 +00:00
mount_hpfs style.Makefile(5): 2004-02-23 20:25:27 +00:00
mount_msdosfs NOSHARED -> NO_SHARED 2004-12-21 09:59:45 +00:00
mount_nfs Mechanically kill hard sentence breaks. 2004-07-02 21:45:06 +00:00
mount_nfs4 Markup nits. 2004-05-17 21:24:06 +00:00
mount_ntfs NOSHARED -> NO_SHARED 2004-12-21 09:59:45 +00:00
mount_nullfs Sort sections. 2005-01-18 10:09:38 +00:00
mount_std Fix the mount(8) status reporting, now that MNT_NODEV is a no-op (zero). 2004-11-29 09:35:01 +00:00
mount_udf NOSHARED -> NO_SHARED 2004-12-21 09:59:45 +00:00
mount_ufs NOSHARED -> NO_SHARED 2004-12-21 09:59:45 +00:00
mount_umapfs Sort sections. 2005-01-18 10:09:38 +00:00
mount_unionfs Sort sections. 2005-01-18 10:09:38 +00:00
natd Eliminate macro calls inside literal displays. 2005-01-15 12:28:01 +00:00
newfs Document -l and -n options in usage(). 2005-01-22 14:37:57 +00:00
newfs_msdos Bring back WARNS to 3 for arm until I figure out how to make gcc happy. 2005-01-24 01:56:06 +00:00
nfsiod Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
nos-tun Sort sections. 2005-01-18 10:09:38 +00:00
pfctl Remove -I from CFLAGS. This splipped in with the 3.5 import (as I was 2004-10-03 06:19:22 +00:00
pflogd Fixed misspelling of DPADD. 2004-10-24 14:25:53 +00:00
ping o Store timestamp in network byte order. 2004-09-30 07:35:56 +00:00
ping6 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
quotacheck Remove advertising clause from University of California Regent's license, 2004-04-09 19:58:40 +00:00
rcorder Deal with harmful leading whitespace. 2004-07-02 18:37:52 +00:00
reboot Code style tweaks: Use static and const where suitable. 2005-01-25 08:24:06 +00:00
recoverdisk Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
restore Sort sections. 2005-01-18 10:09:38 +00:00
route Sort sections. 2005-01-18 10:09:38 +00:00
routed Sort sections. 2005-01-18 10:09:38 +00:00
rtsol Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
savecore Sort sections. 2005-01-18 10:09:38 +00:00
sconfig Fix typos. 2004-12-30 01:48:12 +00:00
setkey Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
shutdown Use new style declarations instead of K&R ones. 2005-01-25 08:40:51 +00:00
slattach Sort sections. 2005-01-18 10:09:38 +00:00
spppcontrol Mechanically kill hard sentence breaks. 2004-07-02 21:45:06 +00:00
startslip - Signal handlers must have an int argument. 2004-08-02 08:10:28 +00:00
sunlabel Fix indentation of continuation lines to (hopefully) comply with 2004-06-18 15:08:08 +00:00
swapon Sort sections. 2005-01-18 10:09:38 +00:00
sysctl Get rid of a NULL dereference when oid is too long. 2005-01-25 14:37:43 +00:00
tunefs Sort sections. 2005-01-18 10:09:38 +00:00
umount Remove advertising clause from University of California Regent's license, 2004-04-09 19:58:40 +00:00
Makefile NOINET6 -> NO_INET6 2004-12-21 10:49:29 +00:00
Makefile.inc NOSHARED -> NO_SHARED 2004-12-21 09:59:45 +00:00