Close

SCSI bugs ironed out

A project log for Orthrus

SD card secure RAID USB storage

nick-sayerNick Sayer 04/29/2017 at 00:040 Comments

Thanks to Dean Camera for giving me some hints as to how to best handle a removable media SCSI device on USB. His suggestions were spot on and now the SCSI layer is working absolutely correctly, so far as I can tell.

So if you yank out a card, you get an immediate "forceable disk ejection" reaction from your host computer. Same thing happens if you push the button - when you push it, the disk is forcibly ejected. If you let go before the time runs out, it's re-mounted without changes, and should be seen by the host just fine. If you push the button long enough, it will re-key the volume and remount the disk, and your host should notice right away that it's all filled with garbage and needs to be initialized with a filesystem.

Dean, if you weren't aware, is the guy behind LUFA, which is the USB library that Orthrus uses to do the USB stuff. Despite the documentation stating the XMega support is experimental, it seems to be working just fine, at least for what I need it to do. So, big ups to Dean - without him and LUFA, Orthrus wouldn't have been nearly as easy to create.

Discussions