linux_driver: fixup a few flash write bugs

This commits fixes a buffer length issues and pipe directionality issues.