<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div style="RIGHT: auto">Hi,</div>
<div style="RIGHT: auto"><BR>I am facing a problem during the SDcard unmount with the rtems 4.10.99 (GIT HEAD). Following sequence is performed during the mount:</div>
<div style="RIGHT: auto">1. rtems_io_register_driver .This returns the major number of the device</div>
<div style="RIGHT: auto">2. Then create a device (dev) using the call to rtems_filesystem_make_dev_t</div>
<div style="RIGHT: auto">3. rtems_disk_io_initialize<BR>4. rtems_disk_create_phys is then called with the device (dev) returned from above call to rtems_filesystem_make_dev_t and the name as /dev/sdc0<BR>5. rtems_bdpart_register_from_disk("/dev/sdc0")<BR style="RIGHT: auto">6. rtems_fsmount. The rtems_fstab_entry has two entries. one for the partition (/dev/sdc01) and the other as /dev/sdc0</div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto">The above sequence is succesfull.</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">The unmount sequence is as follows:<BR>1. unmount("/mnt/sdcard")<BR>2. rmdir("/mnt/sdcard")<BR>3. Call the rtems_media_get_device_identifier("/dev/sdc01", &dev) to get the dev. Note that here we start with the first partition<BR>4. Call rtems_disk_obtain(dev) to get the disk_device pointer.<BR>5. rtems_bdbuf_syncdev is then called. The pointer returned by disk_obtain is passed here. </div>
<div style="RIGHT: auto">But at this point, i notice that the rtems_disk_obtain returns a NULL pointer and the syncdev crashes. I also see that the dev returned from the call to rtems_media_get_device_identifier does not seem to be correct. It does not give me the correct major number. </div>
<div style="RIGHT: auto">This sequence used to work with the rtems4.10.2. The only difference was that in 4.10.2, the syncdev used to take the 'dev' itself as the argument. In 4.10.2, if this partition was not correctly removed, then all further SD card mount failed and needed a system reset for further mounts.</div>
<div style="RIGHT: auto"><BR style="RIGHT: auto">What is the correct sequence to unmount an existing single partition SDcard with the latest RTEMS?Note that it used to work correct with the 4.10.2</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">I see that there is a media manager also in place? Any example on how to use the media manager?</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">-Ali</div>
<div style="RIGHT: auto"><BR style="RIGHT: auto" class=yui-cursor> </div></div></body></html>