diff options
author | imp <imp@FreeBSD.org> | 1999-12-02 05:52:58 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1999-12-02 05:52:58 +0000 |
commit | 5a3a6c595118808aeeda50648c544d2d1cdba04e (patch) | |
tree | 3ae71a49e3982fb66e0293ed1cf03dab70f75262 /usr.sbin | |
parent | be66291a6b80a37ccc47113c6fff10720aa29c24 (diff) | |
download | FreeBSD-src-5a3a6c595118808aeeda50648c544d2d1cdba04e.zip FreeBSD-src-5a3a6c595118808aeeda50648c544d2d1cdba04e.tar.gz |
Implement pccardc power command. This allows one to power off
individual slots at one's whim. Useful for turning the slots into
card carrying cases, etc. Patch was originally from mihira-san in
message to freebsd-mobile. He ported the code originally from PAO.
Submitted by: MIHIRA Sanpei Yoshiro <sanpei@sanpei.org>
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pccard/pccardc/Makefile | 2 | ||||
-rw-r--r-- | usr.sbin/pccard/pccardc/pccardc.8 | 17 | ||||
-rw-r--r-- | usr.sbin/pccard/pccardc/pccardc.c | 2 |
3 files changed, 20 insertions, 1 deletions
diff --git a/usr.sbin/pccard/pccardc/Makefile b/usr.sbin/pccard/pccardc/Makefile index 902ea18..679b47d 100644 --- a/usr.sbin/pccard/pccardc/Makefile +++ b/usr.sbin/pccard/pccardc/Makefile @@ -4,7 +4,7 @@ # $FreeBSD$ # PROG= pccardc -SRCS= beep.c dumpcis.c enabler.c pccardc.c pccardmem.c printcis.c \ +SRCS= beep.c dumpcis.c enabler.c pccardc.c pccardmem.c power.c printcis.c \ rdattr.c rdmap.c rdreg.c readcis.c wrattr.c wrreg.c MAN8= pccardc.8 diff --git a/usr.sbin/pccard/pccardc/pccardc.8 b/usr.sbin/pccard/pccardc/pccardc.8 index 25662a4..a5714ca 100644 --- a/usr.sbin/pccard/pccardc/pccardc.8 +++ b/usr.sbin/pccard/pccardc/pccardc.8 @@ -54,6 +54,8 @@ Device driver enabler Print command summary .It Pa pccardmem Allocate memory for pccard driver +.It Pa power +Power on/off slots .It Pa rdattr Read attribute memory .It Pa rdmap @@ -162,6 +164,21 @@ This subcommand corresponds to in .Xr rc.conf 5 . .It +.Nm power Ar slot 0|1 +.Pp +It turns ON/OFF a power supply of a card in the slot specified in +.Ar slot . +.Pp +.Bl -tag -width Ds +.It Ar 0 +turn OFF a power supply. If a card becomes unstable when it is removed at +activate state, +this can force it to turn into inactive state first and remove it safely. +.It Ar 1 +turn ON a power supply and into active state similar to a card insertion. +.El +.Pp +It .Nm rdattr Ar slot offs length .Pp Prints a hex dump diff --git a/usr.sbin/pccard/pccardc/pccardc.c b/usr.sbin/pccard/pccardc/pccardc.c index c162a2a..743493b 100644 --- a/usr.sbin/pccard/pccardc/pccardc.c +++ b/usr.sbin/pccard/pccardc/pccardc.c @@ -41,6 +41,7 @@ DECL(dumpcis_main); DECL(enabler_main); DECL(help_main); DECL(pccardmem_main); +DECL(power_main); DECL(rdattr_main); DECL(rdmap_main); DECL(rdreg_main); @@ -57,6 +58,7 @@ struct { { "enabler", enabler_main, "Device driver enabler" }, { "help", help_main, "Prints command summary" }, { "pccardmem", pccardmem_main, "Allocate memory for pccard driver" }, + { "power", power_main, "Power on/off slots" }, { "rdattr", rdattr_main, "Read attribute memory" }, { "rdmap", rdmap_main, "Read pcic mappings" }, { "rdreg", rdreg_main, "Read pcic register" }, |