Getting "disk not ejected properly" in OSX
Re: Getting "disk not ejected properly" in OSX
Do we know if the code change had the intended effect and prevented the call to StopUnit? There's no logging of that is there?
Re: Getting "disk not ejected properly" in OSX
Hey Larry,
It didn't seem to work.
The next step is to add some logging. I've been working on the timer code and that seems to be very close to being done.
So I'll work up a logging patch next.
It didn't seem to work.
The next step is to add some logging. I've been working on the timer code and that seems to be very close to being done.
So I'll work up a logging patch next.
Re: Getting "disk not ejected properly" in OSX
Hi Larry - As Dave said, no luck yet. On the bright side, we did successfully resolve a few unrelated OSX issues this week (related to building micropython's unix port on OSX) and this is next on my list. Not that I necessarily know what to do, but one week ago I didn't think I knew what to do about the unix build issues either
I also have a bit of a mea culpa - I took another look at the code Dave found, and realized the comments around it looked familiar; I also remembered that Damien generally doesn't mess with the hardware abstraction layer code unless absolutely necessary (makes it harder to migrate later when updated libraries are released.) So I looked back at the history and saw that I had an exchange with Damien when he put this change in back in April - it was to fix another OSX issue where it was impossible to do a clean eject of the filesystem; OSX would always immediately remount it. I confirmed to Damien that it worked and we could eject the filesystem - at least if it was done right away. I didn't notice until much later that I couldn't unmount after a few minutes, and it took me much more time still to confirm that it wasn't just my machine.
Oh well - some things you are just going to miss.
Dave- I'm thinking we should open an issue for this on Github - my only hesitation being that I like to write up a clear and detailed description of the problem (even if my interpretation of the details turns out to be wrong, as it often is.) In this case, I'm not really sure how to describe it, except that OSX seems to be using some SCSI commands to put mass storage devices into and out of sleep states, in a way that Windows and Linux don't, and the pyboard misinterprets something there causing the MSC device to hang. That is probably good enough for a report, though; I'll take any suggestions you have and try to post something tomorrow or Monday (unless you want to do it first.)
-Bryan
I also have a bit of a mea culpa - I took another look at the code Dave found, and realized the comments around it looked familiar; I also remembered that Damien generally doesn't mess with the hardware abstraction layer code unless absolutely necessary (makes it harder to migrate later when updated libraries are released.) So I looked back at the history and saw that I had an exchange with Damien when he put this change in back in April - it was to fix another OSX issue where it was impossible to do a clean eject of the filesystem; OSX would always immediately remount it. I confirmed to Damien that it worked and we could eject the filesystem - at least if it was done right away. I didn't notice until much later that I couldn't unmount after a few minutes, and it took me much more time still to confirm that it wasn't just my machine.
Oh well - some things you are just going to miss.
Dave- I'm thinking we should open an issue for this on Github - my only hesitation being that I like to write up a clear and detailed description of the problem (even if my interpretation of the details turns out to be wrong, as it often is.) In this case, I'm not really sure how to describe it, except that OSX seems to be using some SCSI commands to put mass storage devices into and out of sleep states, in a way that Windows and Linux don't, and the pyboard misinterprets something there causing the MSC device to hang. That is probably good enough for a report, though; I'll take any suggestions you have and try to post something tomorrow or Monday (unless you want to do it first.)
-Bryan
Re: Getting "disk not ejected properly" in OSX
Thanks guys for finding and working out the cause of this bug, and Dave for fixing it.
The fix is now in the master branch, and firmware with the fix will be available from micropython.org/download, dates 2014-10-02 onwards.
The fix is now in the master branch, and firmware with the fix will be available from micropython.org/download, dates 2014-10-02 onwards.