System Administration Commands cfgadmsdcard(1M)
NAME
cfgadmsdcard - SD/MC hardware-specific commands for cfgadm
SYNOPSIS
/usr/sbin/cfgadm [-f] [-y -n] [-o hardwareoptions]
-c function apid[...]
/usr/sbin/cfgadm [-f] [-y -n] [-o hardwareoptions]
-c hardwarefunction apid[...]
/usr/sbin/cfgadm [-v] [-a] [-s listingoptions]
[-o hardwareoptions] [-l [apid aptype[...]
/usr/sbin/cfgadm [-v] [-o hardwareoptions] -h [apid[...]
DESCRIPTION
The Secure Digital (SD) and MultiMediaCard (MC) hardware
specific library, /usr/lib/cfgadm/sdcard.so.1, provides the
functionality for SD/MC hot-plugging through the cfgadm(1M)
command. The cfgadm command operates on attachment points,
which are locations in the system where hardware resources
can be dynamically reconfigured. See cfgadm(1M) for infor-
mation on attachment points.
Each SD/MC slot is represented by an attachment point in
the device tree. Card devices that are connected and config-
ured in the system are shown as attachment point name exten-
sions. The terms "attachment point" and "SD/MC slot" are
used interchangeably throughout this manpage.
Attachment points are named through apids. All SD/MC
attachment points consist of a string in the following form:
sdcardX/[S][::dsk/cXtYd0]
Where:
X is the SD/MC controller number.
S is the slot number on the controller (0 to 8).
SunOS 5.11 Last change: 28 Feb 2008 1
System Administration Commands cfgadmsdcard(1M)
dev/cXtYd0 identifies the inserted memory card.
Y is a target number.
In general, the device identifier is derived from the
corresponding logical link for the device in /dev. Because
only one LUN (LUN 0) is supported by the SD/MC device, the
"d" component of the device string will always have number 0
(zero). For example, the logical apid of slot 4 of SD/MC
controller 2 would be sdcard2/4. If the SD/MC media card is
inserted in this attachment point and the device is config-
ured, the apid might be sdcard2/4::dsk/c2t0d0.
The cXtYd0 string identifying a device has one-to-one
correspondence to the device attachment point.
A simple listing of attachment points in the system includes
all SD/MC device slots and attached devices. For example:
#cfgadm -l
ApId Type Receptacle Occupant Condition
sdcard0/0::dev/c2t0d0 sdcard connected configured ok
sata0/1::dev/c0t1d0 disk connected configured ok
sata0/2::dev/c0t2d0 cd-dvd connected configured ok
sata0/3 sata-port empty unconfigured ok
usb0/1 unknown empty unconfigured ok
usb0/2 unknown empty unconfigured ok
See cfgadm(1M) for more information regarding listing of
attachment points.
The receptacle state for an attachment point at the SD/MC
slot has the following meanings:
empty
The SD/MC slot is powered-on and enabled. No device
presence was detected for this slot.
disconnected
The SD/MC slot is not enabled, or the SD/MC device
presence was detected but no communication with the dev-
ice was established, or the slot has failed.
SunOS 5.11 Last change: 28 Feb 2008 2
System Administration Commands cfgadmsdcard(1M)
connected
The SD/MC device is detected in the slot and device
communication is established.
The occupant (device inserted in the SD/MC slot) state has
the following meanings:
configured
The attached SD/MC device is configured and ready to
use by the operating system.
unconfigured
No device is attached, or the SD/MC device inserted in
the SD/MC slot is not yet configured.
To configure, run the command cfgadm -c configure
apid.
The attachment point (SD/MC slot) condition has the follow-
ing meanings:
ok
The SD/MC slot is powered-on, enabled and ready for
use.
failed
The SD/MC slot failed. It may be disabled and/or
powered-off by the system. It is unusable and its
condition is unknown. The failure may be due to the
device inserted in the slot.
unknown
The SD/MC slot is disabled and its condition is
unknown.
OPTIONS
The cfgadm command defines several types of operations
besides listing (-l). These operations include invoking
configuration state changes (-c), invoking hardware
SunOS 5.11 Last change: 28 Feb 2008 3
System Administration Commands cfgadmsdcard(1M)
specific functions (-x), and obtaining configuration
administration help messages (-h).
-c: For SD/MC slot attachment points, the following confi-
guration state change operations are supported:
connect
Enable (activate) the SD/MC slot and establish the
communication with an attached device. This operation
implies powering-on the slot if necessary.
disconnect
Unconfigure the inserted device if it is not already
unconfigured and disable (deactivate) the SD/MC slot. A
subsequent "connect" command enables SD/MC slot opera-
tion but does not bring a device to the "configured"
state.
The following state change operations are supported for an
SD/MC card inserted in to the SD/MC slot:
configure
Configure new device for use by the operating system if
it is not already configured. This command also
implies connect operation, if necessary.
unconfigure
Unconfigure the device inserted in the SD/MC slot if it
is not already unconfigured.
-f : Not supported.
-h apid: SD/MC specific help can be obtained by using the
help option with any SD/MC attachment point.
-l [-v]: The -l option works as described in cfgadm(1M).
When paired with the -v option, the "Information" field
contains the following SD/MC-specific information:
Mod: product model string
SunOS 5.11 Last change: 28 Feb 2008 4
System Administration Commands cfgadmsdcard(1M)
Rev: product revision number (major.minor)
Date: month and year of manufacture
SN: product serial number (hexadecimal)
-o hardwareoptions - No hardware specific options are
currently defined.
-s listingoptions: Attachment points of class SD/MC can be
listed by using the select suboption. See cfgadm(1M).
-t apid: Self-test functionality. Not supported by SD/MC
slots.
-x hardwarefunction: Perform hardware specific function.
sdcardresetslot apidindicates reset of the SD/MC slot
specified by apid. If an SD/MC device is inserted in the
slot, it is also reset.
-v: Execute in verbose mode.
EXAMPLES
Example 1 - Configuring an SD/MC card:
The following command configures a card attached to SD/MC
controller 0, slot 0. It should be issued only when there is
a device inserted in the SD/MC slot.
# cfgadm -c configure sdcard0/0
Example 2 - Unconfiguring an SD/MC card:
The following command unconfigures a card inserted in SD/MC
controller 0, slot 3:
# cfgadm -c unconfigure sdcard0/3
Example 3 - Encountering a mounted file system while uncon-
figuring a disk:
SunOS 5.11 Last change: 28 Feb 2008 5
System Administration Commands cfgadmsdcard(1M)
The following command illustrates encountering a mounted
file system while unconfiguring a disk:
# cfgadm -c unconfigure sdcard1/5::dsk/c01t35d0
The system responds with the following:
cfgadm: Component system is busy, try again: failed to offline:
/devices/pci@0,0/pci8086,244e@1e/pci1095,3124@1/sd@5,0
Resource Information
------------------ --------------------------
/dev/dsk/c1t5d0s0 mounted filesystem "/mnt"
FILES
/usr/lib/cfgadm/sdcard.so.1
Hardware specific library for generic SD/MC hot plug-
ging.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Availability SUNWcsl
SEE ALSO
cfgadm(1M), configadmin(3CFGADM), libcfgadm(3LIB), attri-
butes(5), sda(7D), sdcard(7D), sdhost(7D)
NOTES
Under normal operation, SD/MC media cards are automatically
configured when a card is inserted. Most administrators do
not find it necessary to use this command under normal use.
Removing an SD/MC card without first unconfiguring it may
result in data loss if the device is being written to when
it's being removed. Devices that are mounted read-only can
be safely removed at any time.
SunOS 5.11 Last change: 28 Feb 2008 6
System Administration Commands cfgadmsdcard(1M)
Devices that have filesystems other than pcfs(7FS) on them
should always be explicitly unconfigured before removal.
SunOS 5.11 Last change: 28 Feb 2008 7
|