head 1.3; access; symbols perseant-exfatfs-base-20261102:1.3 perseant-exfatfs-base-20250801:1.3 perseant-exfatfs-base-20240630:1.3 perseant-exfatfs:1.3.0.114 perseant-exfatfs-base:1.3 bouyer-sunxi-drm:1.3.0.112 bouyer-sunxi-drm-base:1.3 cjep_sun2x:1.3.0.110 cjep_sun2x-base:1.3 cjep_staticlib_x-base1:1.3 cjep_staticlib_x:1.3.0.108 cjep_staticlib_x-base:1.3 thorpej-futex-base:1.3 bouyer-xenpvh-base2:1.3 phil-wifi-20200421:1.3 bouyer-xenpvh-base1:1.3 phil-wifi-20200411:1.3 bouyer-xenpvh:1.3.0.106 bouyer-xenpvh-base:1.3 phil-wifi-20200406:1.3 ad-namecache-base3:1.3 ad-namecache-base2:1.3 ad-namecache-base1:1.3 ad-namecache:1.3.0.104 ad-namecache-base:1.3 isaki-audio2:1.3.0.102 isaki-audio2-base:1.3 pgoyette-compat-merge-20190127:1.3 pgoyette-compat-20190127:1.3 pgoyette-compat-20190118:1.3 pgoyette-compat-1226:1.3 pgoyette-compat-1126:1.3 pgoyette-compat-1020:1.3 pgoyette-compat-0930:1.3 pgoyette-compat-0906:1.3 pgoyette-compat-0728:1.3 pgoyette-compat-0625:1.3 pgoyette-compat-0521:1.3 pgoyette-compat-0502:1.3 pgoyette-compat-0422:1.3 pgoyette-compat-0415:1.3 pgoyette-compat-0407:1.3 pgoyette-compat-0330:1.3 pgoyette-compat-0322:1.3 pgoyette-compat-0315:1.3 pgoyette-compat:1.3.0.100 pgoyette-compat-base:1.3 perseant-stdc-iso10646:1.3.0.98 perseant-stdc-iso10646-base:1.3 prg-localcount2-base3:1.3 prg-localcount2-base2:1.3 prg-localcount2-base1:1.3 prg-localcount2:1.3.0.96 prg-localcount2-base:1.3 pgoyette-localcount-20170426:1.3 bouyer-socketcan-base1:1.3 pgoyette-localcount-20170320:1.3 bouyer-socketcan:1.3.0.94 bouyer-socketcan-base:1.3 pgoyette-localcount-20170107:1.3 pgoyette-localcount-20161104:1.3 localcount-20160914:1.3 pgoyette-localcount-20160806:1.3 pgoyette-localcount-20160726:1.3 pgoyette-localcount:1.3.0.92 pgoyette-localcount-base:1.3 netbsd-5-2-3-RELEASE:1.3 netbsd-5-1-5-RELEASE:1.3 yamt-pagecache-base9:1.3 yamt-pagecache-tag8:1.3 tls-earlyentropy:1.3.0.90 tls-earlyentropy-base:1.3 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.3 riastradh-drm2-base3:1.3 netbsd-5-2-2-RELEASE:1.3 netbsd-5-1-4-RELEASE:1.3 netbsd-5-2-1-RELEASE:1.3 netbsd-5-1-3-RELEASE:1.3 rmind-smpnet-nbase:1.3 rmind-smpnet:1.3.0.86 rmind-smpnet-base:1.3 agc-symver:1.3.0.88 agc-symver-base:1.3 tls-maxphys-base:1.3 yamt-pagecache-base8:1.3 netbsd-5-2:1.3.0.84 yamt-pagecache-base7:1.3 netbsd-5-2-RELEASE:1.3 netbsd-5-2-RC1:1.3 yamt-pagecache-base6:1.3 yamt-pagecache-base5:1.3 yamt-pagecache-base4:1.3 netbsd-5-1-2-RELEASE:1.3 netbsd-5-1-1-RELEASE:1.3 jmcneill-usbmp:1.3.0.82 jmcneill-usbmp-base:1.3 jmcneill-audiomp3:1.3.0.80 jmcneill-audiomp3-base:1.3 yamt-pagecache-base3:1.3 yamt-pagecache-base2:1.3 yamt-pagecache:1.3.0.78 yamt-pagecache-base:1.3 rmind-uvmplock-nbase:1.3 bouyer-quota2-nbase:1.3 bouyer-quota2:1.3.0.76 bouyer-quota2-base:1.3 jruoho-x86intr:1.3.0.74 jruoho-x86intr-base:1.3 matt-nb5-pq3:1.3.0.72 matt-nb5-pq3-base:1.3 netbsd-5-1:1.3.0.70 netbsd-5-1-RELEASE:1.3 yamt-nfs-mp-base11:1.3 netbsd-5-1-RC4:1.3 uebayasi-xip-base2:1.3 yamt-nfs-mp-base10:1.3 netbsd-5-1-RC3:1.3 netbsd-5-1-RC2:1.3 netbsd-5-1-RC1:1.3 rmind-uvmplock:1.3.0.68 rmind-uvmplock-base:1.3 yamt-nfs-mp-base9:1.3 uebayasi-xip:1.3.0.66 uebayasi-xip-base:1.3 netbsd-5-0-2-RELEASE:1.3 yamt-nfs-mp-base8:1.3 yamt-nfs-mp-base7:1.3 netbsd-5-0-1-RELEASE:1.3 jymxensuspend-base:1.3 yamt-nfs-mp-base6:1.3 yamt-nfs-mp-base5:1.3 yamt-nfs-mp-base4:1.3 jym-xensuspend-nbase:1.3 yamt-nfs-mp-base3:1.3 netbsd-5-0:1.3.0.64 netbsd-5-0-RELEASE:1.3 netbsd-5-0-RC4:1.3 netbsd-5-0-RC3:1.3 netbsd-5-0-RC2:1.3 jym-xensuspend:1.3.0.62 jym-xensuspend-base:1.3 netbsd-5-0-RC1:1.3 haad-dm-base2:1.3 haad-nbase2:1.3 ad-audiomp2:1.3.0.60 ad-audiomp2-base:1.3 netbsd-5:1.3.0.58 netbsd-5-base:1.3 haad-dm-base1:1.3 haad-dm:1.3.0.56 haad-dm-base:1.3 simonb-wapbl-nbase:1.3 yamt-pf42-base4:1.3 simonb-wapbl:1.3.0.54 simonb-wapbl-base:1.3 yamt-pf42-base3:1.3 hpcarm-cleanup-nbase:1.3 yamt-pf42-base2:1.3 yamt-nfs-mp-base2:1.3 yamt-nfs-mp:1.3.0.52 yamt-nfs-mp-base:1.3 yamt-pf42:1.3.0.50 yamt-pf42-base:1.3 ad-socklock-base1:1.3 yamt-lazymbuf-base15:1.3 yamt-lazymbuf-base14:1.3 keiichi-mipv6-nbase:1.3 mjf-devfs2:1.3.0.48 mjf-devfs2-base:1.3 keiichi-mipv6:1.3.0.46 keiichi-mipv6-base:1.3 bouyer-xeni386-merge1:1.3 vmlocking2-base3:1.3 bouyer-xeni386-nbase:1.3 yamt-kmem-base3:1.3 cube-autoconf:1.3.0.44 cube-autoconf-base:1.3 yamt-kmem-base2:1.3 bouyer-xeni386:1.3.0.42 bouyer-xeni386-base:1.3 yamt-kmem:1.3.0.40 yamt-kmem-base:1.3 vmlocking2-base2:1.3 reinoud-bufcleanup-nbase:1.3 vmlocking2:1.3.0.38 vmlocking2-base1:1.3 jmcneill-base:1.3 mjf-devfs:1.3.0.36 mjf-devfs-base:1.3 bouyer-xenamd64-base2:1.3 vmlocking-nbase:1.3 yamt-x86pmap-base4:1.3 bouyer-xenamd64:1.3.0.34 bouyer-xenamd64-base:1.3 yamt-x86pmap-base3:1.3 yamt-x86pmap-base2:1.3 yamt-x86pmap:1.3.0.32 yamt-x86pmap-base:1.3 jmcneill-pm:1.3.0.30 jmcneill-pm-base:1.3 hpcarm-cleanup:1.3.0.28 hpcarm-cleanup-base:1.3 mjf-ufs-trans-base:1.3 netbsd-3-1-1-RELEASE:1.2 netbsd-3-0-3-RELEASE:1.2 yamt-idlelwp-base8:1.3 reinoud-bufcleanup-base:1.3 vmlocking:1.3.0.26 vmlocking-base:1.3 ad-audiomp:1.3.0.24 ad-audiomp-base:1.3 yamt-idlelwp:1.3.0.22 post-newlock2-merge:1.3 newlock2-nbase:1.3 yamt-splraiseipl-base5:1.3 yamt-splraiseipl-base4:1.3 yamt-splraiseipl-base3:1.3 netbsd-3-1:1.2.0.8 netbsd-3-1-RELEASE:1.2 netbsd-3-0-2-RELEASE:1.2 yamt-splraiseipl-base2:1.3 netbsd-3-1-RC4:1.2 yamt-splraiseipl:1.3.0.20 yamt-splraiseipl-base:1.3 netbsd-3-1-RC3:1.2 newlock2:1.3.0.18 newlock2-base:1.3 yamt-pdpolicy-base8:1.3 netbsd-3-1-RC2:1.2 netbsd-3-1-RC1:1.2 yamt-pdpolicy-base7:1.3 yamt-pdpolicy-base6:1.3 netbsd-3-0-1-RELEASE:1.2 gdamore-uart:1.3.0.16 gdamore-uart-base:1.3 simonb-timcounters-final:1.3 yamt-pdpolicy-base5:1.3 elad-kernelauth-nbase:1.3 yamt-pdpolicy-base4:1.3 yamt-pdpolicy-base3:1.3 yamt-pdpolicy-base2:1.3 yamt-pdpolicy:1.3.0.14 yamt-pdpolicy-base:1.3 yamt-uio_vmspace-base5:1.3 simonb-timecounters:1.3.0.12 simonb-timecounters-base:1.3 rpaulo-netinet-merge-pcb:1.3.0.10 rpaulo-netinet-merge-pcb-base:1.3 yamt-uio_vmspace:1.3.0.8 netbsd-3-0:1.2.0.6 netbsd-3-0-RELEASE:1.2 netbsd-3-0-RC6:1.2 yamt-readahead-base3:1.3 netbsd-3-0-RC5:1.2 netbsd-3-0-RC4:1.2 netbsd-3-0-RC3:1.2 yamt-readahead-base2:1.3 netbsd-3-0-RC2:1.2 yamt-readahead:1.3.0.6 yamt-readahead-base:1.3 netbsd-3-0-RC1:1.2 yamt-vop-base3:1.3 netbsd-2-0-3-RELEASE:1.1 netbsd-2-1:1.1.0.22 yamt-vop-base2:1.3 thorpej-vnode-attr:1.3.0.4 thorpej-vnode-attr-base:1.3 netbsd-2-1-RELEASE:1.1 yamt-vop:1.3.0.2 yamt-vop-base:1.3 netbsd-2-1-RC6:1.1 netbsd-2-1-RC5:1.1 netbsd-2-1-RC4:1.1 netbsd-2-1-RC3:1.1 netbsd-2-1-RC2:1.1 netbsd-2-1-RC1:1.1 yamt-lazymbuf:1.2.0.4 yamt-km-base4:1.2 netbsd-2-0-2-RELEASE:1.1 yamt-km-base3:1.2 netbsd-3:1.2.0.2 netbsd-3-base:1.2 yamt-km-base2:1.1 yamt-km:1.1.0.18 yamt-km-base:1.1 kent-audio2:1.1.0.16 kent-audio2-base:1.2 netbsd-2-0-1-RELEASE:1.1 kent-audio1-beforemerge:1.1 netbsd-2:1.1.0.14 netbsd-2-base:1.1 kent-audio1:1.1.0.12 kent-audio1-base:1.1 netbsd-2-0-RELEASE:1.1 netbsd-2-0-RC5:1.1 ktrace-lwp-newbase:1.2 netbsd-2-0-RC4:1.1 netbsd-2-0-RC3:1.1 netbsd-2-0-RC2:1.1 netbsd-2-0-RC1:1.1 netbsd-2-0:1.1.0.10 netbsd-2-0-base:1.1 ktrace-lwp:1.1.0.8 ktrace-lwp-base:1.2 nathanw_sa_end:1.1.2.2 nathanw_sa_before_merge:1.1 fvdl_fs64_base:1.1 gmcgarry_ctxsw:1.1.0.6 gmcgarry_ctxsw_base:1.1 gmcgarry_ucred:1.1.0.4 gmcgarry_ucred_base:1.1 nathanw_sa_base:1.1 nathanw_sa:1.1.0.2; locks; strict; comment @# @; 1.3 date 2005.07.11.15.37.00; author kiyohara; state dead; branches; next 1.2; 1.2 date 2005.02.27.00.27.17; author perry; state Exp; branches 1.2.4.1; next 1.1; 1.1 date 2002.11.22.16.28.54; author jmc; state Exp; branches 1.1.2.1 1.1.8.1 1.1.16.1 1.1.18.1; next ; 1.2.4.1 date 2006.06.21.15.04.08; author yamt; state dead; branches; next ; 1.1.2.1 date 2002.11.22.16.28.54; author thorpej; state dead; branches; next 1.1.2.2; 1.1.2.2 date 2002.12.11.06.38.04; author thorpej; state Exp; branches; next ; 1.1.8.1 date 2005.03.04.16.43.12; author skrll; state Exp; branches; next 1.1.8.2; 1.1.8.2 date 2005.11.10.14.05.22; author skrll; state dead; branches; next ; 1.1.16.1 date 2005.04.29.11.28.53; author kent; state Exp; branches; next ; 1.1.18.1 date 2005.03.19.08.34.32; author yamt; state Exp; branches; next ; desc @@ 1.3 log @ieee1394 import from FreeBSD. @ text @SBP2 SCSI notes: sbp *sbp_init(dir node *, int numorbs) int sbp_runcmd(sbp *, sbp_cmd *); orb *sbp_construct_orb(data *, orb data *, void *callback, cbarg) void sbp_free(sbp *); cmd - u_int8_t cmd[12] int cmdlen u_char *data int datalen (0 if data uio) u_int16_t lun; int r/w void (*cb)(void *, sbp2_status *) void *cb_arg status - u_int8_t resp; u_int8_t sbp_status; u_int8_t object; u_int8_t serial_error; u_int32_t *data u_int16_t datalen; crc check status orb src resp dead len sbp status u_int32_t *data sbp2 management struct: struct ieee1394_softc *dev mgmt register csr regs loginid speed maxpayload mgmt orb timeout orb size sbp state orb: *need addr for orb address range *need addr for data address range *need addr for page table address range abuf * abuf count inuse void *request fwscsi: sbp2 struct orb * orbcount init sbp2 (ieeesoftc and sbp2 struct) send login packet setup handlers for login resp and status fifo get login resp and clear handler get status but leave handler for unsolicated responses. login resp has mgmt registers pointer, save it also contains login id, save it setup dummy orb and get agent ready by having it fetch this return dummy orb or NULL on error scsi-init setup generic status callback request - Accept packet through request routine examine packet for data vs. cmd cmd: construct orb with no data addr data: determine direction bit examine packet for uio vs direct map: direct map: setup read callback if <= 64k in size else setup uio and do uio uio: setup unrestricted page table in 64k chunks setup callback for each chunk setup callback for page table find current end of orb chain DIAG - make sure there's room for a new orb add new orb into chain setup callback to read that orb ring doorbell status callback - mark orb as not in use, pull data and call scsipi_done with status unregister all callback associated with orb extend orbs - allocate more orb pointers config rom - a typical match routine will find_type(type code) == X type find_type(type code) == X type ... ex find_type(unit spec id) == sbp2 find_type(unit sw version) == scsi in attach: call sbp2_register_print for unit directory -- fwscsi_rom_print direcotory entries need print callback pointer @ 1.2 log @nuke trailing whitespace @ text @@ 1.2.4.1 log @sync with head. @ text @@ 1.1 log @First pass (checkpoint checkin) for firewire scsi code. There are a number of issues here for anyone trying to use this today: 1. On my test drive the command engine on the drive seems to stall after the inquire is done. So the mode sense times out for a long time before aborting. This obviously needs to be tracked down and fixed. However it does do a proper inquire: scsibus0 at sbpscsi0: 1 target, 1 lun per target sd0 at scsibus0 target 0 lun 0: disk fixed 2. This code is quite ugly in places as debug code was added to test things. Definitly needs cleanup/documention in places where it's using command structures. The structure for alloc'ing orbs, running them through the command engine and getting state back is mostly set but implementation needs an overhaul in places. 3. For testing I use the following config options: fwohci* at cardbus? dev ? function ? # IEEE1394 Controller fw* at fwbus? options FW_DEBUG options FWNODE_DEBUG options P1212_DEBUG options SBP2_DEBUG options SBPSCSI_DEBUG fwnode* at fwbus? sbpscsi* at fwnode? scsibus* at sbpscsi? @ text @d16 1 a16 1 d33 1 a33 1 len d84 1 a84 1 setup generic status callback d91 1 a91 1 cmd: d101 1 a101 1 direct map: d115 1 a115 1 add new orb into chain d137 1 a137 1 @ 1.1.2.1 log @file NOTES was added on branch nathanw_sa on 2002-12-11 06:38:04 +0000 @ text @d1 145 @ 1.1.2.2 log @Sync with HEAD. @ text @a0 145 SBP2 SCSI notes: sbp *sbp_init(dir node *, int numorbs) int sbp_runcmd(sbp *, sbp_cmd *); orb *sbp_construct_orb(data *, orb data *, void *callback, cbarg) void sbp_free(sbp *); cmd - u_int8_t cmd[12] int cmdlen u_char *data int datalen (0 if data uio) u_int16_t lun; int r/w void (*cb)(void *, sbp2_status *) void *cb_arg status - u_int8_t resp; u_int8_t sbp_status; u_int8_t object; u_int8_t serial_error; u_int32_t *data u_int16_t datalen; crc check status orb src resp dead len sbp status u_int32_t *data sbp2 management struct: struct ieee1394_softc *dev mgmt register csr regs loginid speed maxpayload mgmt orb timeout orb size sbp state orb: *need addr for orb address range *need addr for data address range *need addr for page table address range abuf * abuf count inuse void *request fwscsi: sbp2 struct orb * orbcount init sbp2 (ieeesoftc and sbp2 struct) send login packet setup handlers for login resp and status fifo get login resp and clear handler get status but leave handler for unsolicated responses. login resp has mgmt registers pointer, save it also contains login id, save it setup dummy orb and get agent ready by having it fetch this return dummy orb or NULL on error scsi-init setup generic status callback request - Accept packet through request routine examine packet for data vs. cmd cmd: construct orb with no data addr data: determine direction bit examine packet for uio vs direct map: direct map: setup read callback if <= 64k in size else setup uio and do uio uio: setup unrestricted page table in 64k chunks setup callback for each chunk setup callback for page table find current end of orb chain DIAG - make sure there's room for a new orb add new orb into chain setup callback to read that orb ring doorbell status callback - mark orb as not in use, pull data and call scsipi_done with status unregister all callback associated with orb extend orbs - allocate more orb pointers config rom - a typical match routine will find_type(type code) == X type find_type(type code) == X type ... ex find_type(unit spec id) == sbp2 find_type(unit sw version) == scsi in attach: call sbp2_register_print for unit directory -- fwscsi_rom_print direcotory entries need print callback pointer @ 1.1.16.1 log @sync with -current @ text @d16 1 a16 1 d33 1 a33 1 len d84 1 a84 1 setup generic status callback d91 1 a91 1 cmd: d101 1 a101 1 direct map: d115 1 a115 1 add new orb into chain d137 1 a137 1 @ 1.1.18.1 log @sync with head. xen and whitespace. xen part is not finished. @ text @d16 1 a16 1 d33 1 a33 1 len d84 1 a84 1 setup generic status callback d91 1 a91 1 cmd: d101 1 a101 1 direct map: d115 1 a115 1 add new orb into chain d137 1 a137 1 @ 1.1.8.1 log @Sync with HEAD. Hi Perry! @ text @d16 1 a16 1 d33 1 a33 1 len d84 1 a84 1 setup generic status callback d91 1 a91 1 cmd: d101 1 a101 1 direct map: d115 1 a115 1 add new orb into chain d137 1 a137 1 @ 1.1.8.2 log @Sync with HEAD. Here we go again... @ text @@