sun microsystems Systems Architecture Committee _________________________________________________________________ Subject: SDcard Stack Phase I Submitted by: Garrett D'Amore File: PSARC/2007/659/opinion.ms Date: November 28, 2007 Committee: Gary Winiger (opinion written by Garrett D'Amore), Kais Belgaied, James D. Carlson, Mark Carlson, Glenn Skinner. Product Approval Committee: Solaris PAC solaris-pac-opinion@sun.com 1. Summary SDcard Stack Phase I is a project to provide access to Secure Digital (SD) storage media via SD card slots found on common laptop computers. SD media is a small-form-factor storage media popular for use with digital cameras, MP3 players, and other consumer devices. 2. Decision & Precedence Information The project is approved as specified in reference [1] - [4], but as modified by the required technical change listed in Appendix A below. The project may be delivered in a patch release of the ON consolidation. The project depends on the following other project and may not be delivered before it. PSARC/2007/654 blk2scsa 3. Interfaces PSARC/2007/659 Copyright 2007 Sun Microsystems - 2 - The project exports the following interfaces. _______________________________________________________________________________ | Interfaces Exported | |______________________|_______________________|______________________________| |Interface | Classification | Comments | |______________________|_______________________|______________________________| |drv/sdhost | Volatile | sdhost device driver name | |drv/sdcard | Volatile | sdcard device driver name | | | | | |misc/sda | Consolidation Private| sda common API support | |sys/sdcard/sda.h | Consolidation Private| sda common API header | | | | | |sda_mem_init() | Project Private | memory card API | |sda_mem_fini() | Project Private | memory card API | | | | | |sda_host_init() | Consolidation Private| nexus API | |sda_host_fini() | Consolidation Private| nexus API | |sda_host_alloc() | Consolidation Private| nexus API | |sda_host_free() | Consolidation Private| nexus API | |sda_host_attach() | Consolidation Private| nexus API | |sda_host_detach() | Consolidation Private| nexus API | |sda_host_set_private()| Consolidation Private| nexus API | |sda_host_detect() | Consolidation Private| nexus API | |sda_cmd_done() | Consolidation Private| nexus API | |sda_transfer_done() | Consolidation Private| nexus API | |sda_host_err() | Consolidation Private| nexus API | |sda_host_log() | Consolidation Private| nexus API | | | | | |struct sda_host | Consolidation Private| nexus API opaque slot handle| |struct sda_ops | Consolidation Private| nexus API operations vector | |struct sda_cmd | Consolidation Private| nexus API operations | | | | | |SDA_OPS_VERSION | Consolidation Private| nexus API operations version| |SDA_CMDF_* | Consolidation Private| nexus API command flags | |SDA_PROP_* | Consolidation Private| nexus API slot properties | |______________________|_______________________|______________________________| The project imports the following interfaces. ____________________________________________________ | Interfaces Imported | |_________|_______________________|________________| |Interface| Classification | Comments | |_________|_______________________|________________| |blk2scsa | Consolidation Private| PSARC 2007/654| |_________|_______________________|________________| 4. Opinion PSARC/2007/659 Copyright 2007 Sun Microsystems - 3 - 4.1. blk2scsa dependency One member was unclear about the boundary between blk2scsa PSARC/2007/654 and this project. The project team clarified this, and an updated clarification has been posted in [4]. Further, it is noted that PSARC/2007/654 is a dependency for this case. 4.2. sda_slot_online versus sda_slot_offline errors One member was surprised that sda_slot_offline could return an error while sda_slot_online could not. The project team responded that this was a hold over from earlier design, and has updated the specification so that both functions have no return value (void). 4.3. hald/dbus/userland interaction One member raised a question as to whether certain userland components would need to be modified as part of this case. The project team responded that this should not be the case, barring any bugs in those components (which would be fixed if necessary.) 4.4. sda_slot_detect insertion/removal One member questioned that sda_slot_detect did not accept an argument with the current state (inserted or removed) of the card, and other members expressed concern that this could cause confusion for device driver implementors. The project team clarified the relationship of this portion of the API, and updated the specification to make clear the interaction of this function and the SDA_PROP_INSERTED property. 4.5. cfgadm plugin During case investigation, it was noted that without a specific plugin for cfgadm(1M), administrators might be presented with confusing information misrepresenting an SD slot as a SCSI bus. This led to the required technical change listed in 4.6. spec change due to TCR When implementing the technical change required in Appendix A, the project team found that some interface changes were required. Specifically, instead of using abstract slots, the host driver must register itself once per instance. A new sda_host_set_private() function is provided for host drivers to supply per-slot private data. The interface table and the specification in [4] have been updated accord- ingly. PSARC/2007/659 Copyright 2007 Sun Microsystems - 4 - 5. Minority Opinion(s) None. 6. Advisory Information None. 7. Appendices 7.1. Appendix A: Technical Changes Required 1. The project shall deliver a cfgadm plugin for SDcard busses, so that users of cfgadm are presented with meaningful and accurate information about the state of SDcard slots. 7.2. Appendix B: Technical Changes Advised None. 7.3. Appendix C: Reference Material Unless stated otherwise, path names are relative to the case directory PSARC/2007/659. 1. 20 Questions File: inception.materials/sdcard.20q.txt 2. One Pager File: inception.materials/sdcard.1pager.txt 3. Functional Specification File: final.materials/sdcard.spec.txt 4 Issues and Responses File: final.materials/issues PSARC/2007/659 Copyright 2007 Sun Microsystems