cfgadm_sdcard - SD/MMC hardware-specific commands for cfgadm
/usr/sbin/cfgadm [-f] [-y | -n] [-o hardware_options] -c function ap_id[...]
/usr/sbin/cfgadm [-f] [-y | -n] [-o hardware_options] -c hardware_function ap_id[...]
/usr/sbin/cfgadm [-v] [-a] [-s listing_options] [-o hardware_options] [-l [ap_id | ap_type[...]]]
/usr/sbin/cfgadm [-v] [-o hardware_options] -h [ap_id[...]]
The Secure Digital (SD) and MultiMediaCard (MMC) hardware specific library, /usr/lib/cfgadm/sdcard.so.1, provides the functionality for SD/MMC 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 information on attachment points.
Each SD/MMC slot is represented by an attachment point in the device tree. Card devices that are connected and configured in the system are shown as attachment point name extensions. The terms "attachment point" and "SD/MMC slot" are used interchangeably throughout this manpage.
Attachment points are named through ap_ids. All SD/MMC attachment points consist of a string in the following form:
sdcardX/[S][::dsk/cXtYd0]
Where:
X is the SD/MMC controller number.
S is the slot number on the controller (0 to 8).
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/MMC device, the "d" component of the device string will always have number 0 (zero). For example, the logical ap_id of slot 4 of SD/MMC controller 2 would be sdcard2/4. If the SD/MMC media card is inserted in this attachment point and the device is configured, the ap_id 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/MMC device slots and attached devices. For example:
#cfgadm -l Ap_Id 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/MMC slot has the following meanings:
empty
disconnected
connected
The occupant (device inserted in the SD/MMC slot) state has the following meanings:
configured
unconfigured
The attachment point (SD/MMC slot) condition has the following meanings:
ok
failed
unknown
The cfgadm command defines several types of operations besides listing (-l). These operations include invoking configuration state changes (-c), invoking hardware specific functions (-x), and obtaining configuration administration help messages (-h).
-c: For SD/MMC slot attachment points, the following configuration state change operations are supported:
connect
disconnect
The following state change operations are supported for an SD/MMC card inserted in to the SD/MMC slot:
configure
unconfigure
-f : Not supported.
-h ap_id: SD/MMC specific help can be obtained by using the help option with any SD/MMC 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/MMC-specific information:
Mod: product model string
Rev: product revision number (major.minor)
Date: month and year of manufacture
SN: product serial number (hexadecimal)
-o hardware_options --- No hardware specific options are currently defined.
-s listing_options: Attachment points of class SD/MMC can be listed by using the select suboption. See cfgadm(1M).
-t ap_id: Self-test functionality. Not supported by SD/MMC slots.
-x hardware_function: Perform hardware specific function. sdcard_reset_slot ap_idindicates reset of the SD/MMC slot specified by ap_id. If an SD/MMC device is inserted in the slot, it is also reset.
Example 1 - Configuring an SD/MMC card:
The following command configures a card attached to SD/MMC controller 0, slot 0. It should be issued only when there is a device inserted in the SD/MMC slot.
# cfgadm -c configure sdcard0/0
Example 2 - Unconfiguring an SD/MMC card:
The following command unconfigures a card inserted in SD/MMC controller 0, slot 3:
# cfgadm -c unconfigure sdcard0/3
Example 3 --- Encountering a mounted file system while unconfiguring a disk:
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"
/usr/lib/cfgadm/sdcard.so.1
See attributes(5) for descriptions of the following attributes:
|
cfgadm(1M), config_admin(3CFGADM), libcfgadm(3LIB), attributes(5), sda(7D), sdcard(7D), sdhost(7D)
Under normal operation, SD/MMC 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/MMC 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.
Devices that have filesystems other than pcfs(7FS) on them should always be explicitly unconfigured before removal.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |