The write up of the partial DMA is cogent and correct. However, I am of the opining that there is a unique opportunity here to express something another way than via USCSI, which I happen to think is a hideous way to deal with this. USCSI is a sort of catch all for “any other SCSI command we don’t know how to handle”, and IMO we can do much better here. I’d really like to avoid the mistake of continuing to abuse USCSI this way.
So what I’d actually like to see instead is a new firmware flash API (ioctl-based) defined, ideally that a common framework could use, essentially presenting firmware flashing as a first class operation. Then the sd(7d) driver could internally use whatever mechanism(s) it finds are best for supporting this. For example, I imagine that I’d implement this a single transfer between user and kernel space, then use either multiple mode 7 steps, or a single mode 5 step, depending on the device’s behavior . User space application code (the fwflash utility) need not be bothered with any of this. I believe some other open source operating systems have generalized firmware loading interfaces. Part of figuring out a good interface here is coming up with a solution to “permanent” firmware rewrite, vs. a device that needs a firmware file to be loaded into device RAM during boot (see linux’s request_firmware() interface for examples of this). If you look at fwflash, it has some pretty basic operations, so it should be straight-forward to map these into an ioctl API, IMO. Actually, even better, one could imagine a central “fwflash” driver that individual device nodes “register” a fwflash ops vector to, so that in the future it would not be necessary to write new fwflash plugins for a driver, but instead just supply an fwflash ops entry point and register it. The fwflash module/API would express the flash operations via ioctl to fwflash. On Mon, Apr 25, 2016 at 10:21 AM, Robert Mustacchi <[email protected]> wrote: > Hi, > > This RFD focuses on changes to illumos to better enable firmware > upgrade. It mostly focuses on extending some public and private > interfaces for use with the fwflash(1M) command which can be used to > flash disk drive firmware. > > https://github.com/joyent/rfd/tree/master/rfd/0031 > > Feedback is appreciated. > > Robert > ------------------------------------------- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
