The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/ieee1394/NOTES

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 SBP2 SCSI notes:
    2 
    3 sbp *sbp_init(dir node *, int numorbs)
    4 int sbp_runcmd(sbp *, sbp_cmd *);
    5 orb *sbp_construct_orb(data *, orb data *, void *callback, cbarg)
    6 void sbp_free(sbp *);
    7 
    8 cmd - u_int8_t cmd[12]
    9       int cmdlen
   10       u_char *data
   11       int datalen (0 if data uio)
   12       u_int16_t lun;
   13       int r/w
   14       void (*cb)(void *, sbp2_status *)
   15       void *cb_arg
   16  
   17 status -
   18 
   19         u_int8_t resp;
   20         u_int8_t sbp_status;
   21         u_int8_t object;
   22         u_int8_t serial_error;
   23         u_int32_t *data
   24         u_int16_t datalen;
   25 
   26         crc check
   27 
   28 status orb
   29 
   30 src
   31 resp
   32 dead
   33 len 
   34 sbp status
   35 u_int32_t *data
   36 
   37 sbp2 management struct:
   38 
   39 struct ieee1394_softc *dev
   40 mgmt register
   41 csr regs
   42 loginid
   43 speed
   44 maxpayload
   45 mgmt orb timeout
   46 orb size
   47 sbp state
   48 
   49 orb:
   50 
   51 *need addr for orb address range
   52 *need addr for data address range
   53 *need addr for page table address range
   54 
   55 abuf *
   56 abuf count
   57 inuse
   58 void *request
   59 
   60 fwscsi:
   61 
   62 sbp2 struct
   63 orb *
   64 orbcount
   65 
   66 init sbp2 (ieeesoftc and sbp2 struct)
   67 
   68 send login packet
   69 setup handlers for login resp
   70 and status fifo
   71 
   72 get login resp and clear handler
   73 get status but leave handler for unsolicated responses.
   74 
   75 login resp has mgmt registers pointer, save it
   76 also contains login id, save it
   77 
   78 setup dummy orb and get agent ready by having it fetch this
   79 
   80 return dummy orb or NULL on error
   81 
   82 scsi-init
   83 
   84 setup generic status callback 
   85 
   86 request -
   87  Accept packet through request routine
   88 
   89 examine packet for data vs. cmd
   90 
   91 cmd: 
   92 
   93 construct orb with no data addr
   94 
   95 data:
   96 
   97 determine direction bit
   98 
   99 examine packet for uio vs direct map:
  100 
  101 direct map: 
  102 
  103 setup read callback if <= 64k in size
  104 
  105 else setup uio and do uio
  106 
  107 uio:
  108 
  109 setup unrestricted page table in 64k chunks
  110 setup callback for each chunk
  111 setup callback for page table
  112 
  113 find current end of orb chain
  114 DIAG - make sure there's room for a new orb
  115 add new orb into chain 
  116 setup callback to read that orb
  117 ring doorbell
  118 
  119 status callback - mark orb as not in use, pull data and call scsipi_done with
  120 status
  121 unregister all callback associated with orb
  122 
  123 extend orbs -
  124 
  125 allocate more orb pointers
  126 
  127 
  128 config rom -
  129 
  130 a typical match routine will
  131 
  132         find_type(type code) == X type
  133         find_type(type code) == X type
  134         ...
  135 
  136         ex
  137                 
  138         find_type(unit spec id) == sbp2
  139         find_type(unit sw version) == scsi
  140 
  141         in attach:
  142 
  143         call sbp2_register_print for unit directory -- fwscsi_rom_print
  144         direcotory entries need print callback pointer
  145 

Cache object: b2592e0a40606f93af1ba5b71c8ca8de


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.