| 12345678910111213141516171819202122232425 |
- /* USB mass-storage class driver (Bulk-Only Transport + SCSI).
- *
- * Devices are registered as `usb0..` in the block-device registry. Only the
- * controllers with a bulk-transfer path work: EHCI (high-speed) and xHCI
- * (USB2 root ports). UHCI/OHCI leave bulk_in/bulk_out NULL, so a stick on a
- * full/low-speed companion controller is not usable.
- */
- #ifndef USB_MSC_H
- #define USB_MSC_H
- /* Register the device probe; call before the first USB bus scan. */
- void usbmsc_register(void);
- /* Add the currently present MSC devices to the blkdev registry. Called at
- * the end of blk_scan(); the USB bus scan itself runs earlier at boot. */
- void usbmsc_blk_scan(void);
- /* Block I/O for BLK_USB devices (unit = usbmsc slot index). */
- int usbmsc_read(unsigned int unit, unsigned int lba, void *buf,
- unsigned int count);
- int usbmsc_write(unsigned int unit, unsigned int lba, const void *buf,
- unsigned int count);
- int usbmsc_flush(unsigned int unit);
- #endif
|