А что нам г openBSD?
(«Телесистемы»: Конференция 'Микроконтроллеры и их применение')

миниатюрный аудио-видеорекордер mAVR

Отправлено ,,,, 07 августа 2003 г. 18:10
В ответ на: насколько я знаю, в MassStorageClass driver ATAPI вообще не пахнет. а на файловую систему пока наплевать, т.к. можно будет договориться использовать например FAT16/32 отправлено Andy-spb 07 августа 2003 г. 17:58

/*-
* Copyright (c) 1999 MAEKAWA Masahide ,
* Nick Hibma
*
* $FreeBSD: src/sys/dev/usb/umass.c,v 1.11.2.8 2001/12/06 18:09:21 iedowse Exp $
* $NetBSD: umass.c,v 1.28 2000/04/02 23:46:53 augustss Exp $
*/

/*
* Ported to NetBSD by Lennart Augustsson .
* Parts of the code written my Jason R. Thorpe .
*/

/*
* The PDF documentation can be found at http://www.usb.org/developers/
*/

/*
* The driver handles 3 Wire Protocols
* - Command/Bulk/Interrupt (CBI)
* - Command/Bulk/Interrupt with Command Completion Interrupt (CBI with CCI)
* - Mass Storage Bulk-Only (BBB)
* (BBB refers Bulk/Bulk/Bulk for Command/Data/Status phases)
*
* Over these wire protocols it handles the following command protocols
* - SCSI
* - UFI (floppy command set)
* - 8070i (ATAPI)
*
* UFI and 8070i (ATAPI) are transformed versions of the SCSI command set. The
* sc->transform method is used to convert the commands into the appropriate
* format (if at all necessary). For example, UFI requires all commands to be
* 12 bytes in length amongst other things.
*
* The source code below is marked and can be split into a number of pieces
* (in this order):
*
* - probe/attach/detach
* - generic transfer routines
* - BBB
* - CBI
* - CBI_I (in addition to functions from CBI)
* - CAM (Common Access Method)
* - SCSI
* - UFI
* - 8070i (ATAPI)
*
* The protocols are implemented using a state machine, for the transfers as
* well as for the resets. The state machine is contained in umass_*_state.
* The state machine is started through either umass_*_transfer or
* umass_*_reset.
*
* The reason for doing this is a) CAM performs a lot better this way and b) it
* avoids using tsleep from interrupt context (for example after a failed
* transfer).
*/

/*
* The SCSI related part of this driver has been derived from the
* dev/ppbus/vpo.c driver, by Nicolas Souchu (nsouch@freebsd.org).
*
* The CAM layer uses so called actions which are messages sent to the host
* adapter for completion. The actions come in through umass_cam_action. The
* appropriate block of routines is called depending on the transport protocol
* in use. When the transfer has finished, these routines call
* umass_cam_cb again to complete the CAM command.
*/

/*
* XXX Currently CBI with CCI is not supported because it bombs the system
* when the device is detached (low frequency interrupts are detached
* too late.
*/

Составить ответ  |||  Конференция  |||  Архив

Ответы



Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru