head 1.1; access; symbols perseant-exfatfs-base-20250801:1.1 perseant-exfatfs-base-20240630:1.1 perseant-exfatfs:1.1.0.140 perseant-exfatfs-base:1.1 bouyer-sunxi-drm:1.1.0.138 bouyer-sunxi-drm-base:1.1 cjep_sun2x:1.1.0.136 cjep_sun2x-base:1.1 cjep_staticlib_x-base1:1.1 cjep_staticlib_x:1.1.0.134 cjep_staticlib_x-base:1.1 thorpej-futex-base:1.1 bouyer-xenpvh-base2:1.1 phil-wifi-20200421:1.1 bouyer-xenpvh-base1:1.1 phil-wifi-20200411:1.1 bouyer-xenpvh:1.1.0.132 bouyer-xenpvh-base:1.1 phil-wifi-20200406:1.1 ad-namecache-base3:1.1 ad-namecache-base2:1.1 ad-namecache-base1:1.1 ad-namecache:1.1.0.130 ad-namecache-base:1.1 isaki-audio2:1.1.0.128 isaki-audio2-base:1.1 pgoyette-compat-merge-20190127:1.1 pgoyette-compat-20190127:1.1 pgoyette-compat-20190118:1.1 pgoyette-compat-1226:1.1 pgoyette-compat-1126:1.1 pgoyette-compat-1020:1.1 pgoyette-compat-0930:1.1 pgoyette-compat-0906:1.1 pgoyette-compat-0728:1.1 pgoyette-compat-0625:1.1 pgoyette-compat-0521:1.1 pgoyette-compat-0502:1.1 pgoyette-compat-0422:1.1 pgoyette-compat-0415:1.1 pgoyette-compat-0407:1.1 pgoyette-compat-0330:1.1 pgoyette-compat-0322:1.1 pgoyette-compat-0315:1.1 pgoyette-compat:1.1.0.10 pgoyette-compat-base:1.1 perseant-stdc-iso10646:1.1.0.126 perseant-stdc-iso10646-base:1.1 prg-localcount2-base3:1.1 prg-localcount2-base2:1.1 prg-localcount2-base1:1.1 prg-localcount2:1.1.0.124 prg-localcount2-base:1.1 pgoyette-localcount-20170426:1.1 bouyer-socketcan-base1:1.1 pgoyette-localcount-20170320:1.1 bouyer-socketcan:1.1.0.122 bouyer-socketcan-base:1.1 pgoyette-localcount-20170107:1.1 pgoyette-localcount-20161104:1.1 localcount-20160914:1.1 pgoyette-localcount-20160806:1.1 pgoyette-localcount-20160726:1.1 pgoyette-localcount:1.1.0.120 pgoyette-localcount-base:1.1 netbsd-5-2-3-RELEASE:1.1 netbsd-5-1-5-RELEASE:1.1 yamt-pagecache-base9:1.1 yamt-pagecache-tag8:1.1 tls-earlyentropy:1.1.0.118 tls-earlyentropy-base:1.1 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1 riastradh-drm2-base3:1.1 netbsd-5-2-2-RELEASE:1.1 netbsd-5-1-4-RELEASE:1.1 netbsd-5-2-1-RELEASE:1.1 netbsd-5-1-3-RELEASE:1.1 rmind-smpnet-nbase:1.1 rmind-smpnet:1.1.0.114 rmind-smpnet-base:1.1 agc-symver:1.1.0.116 agc-symver-base:1.1 tls-maxphys-base:1.1 yamt-pagecache-base8:1.1 netbsd-5-2:1.1.0.112 yamt-pagecache-base7:1.1 netbsd-5-2-RELEASE:1.1 netbsd-5-2-RC1:1.1 yamt-pagecache-base6:1.1 yamt-pagecache-base5:1.1 yamt-pagecache-base4:1.1 netbsd-5-1-2-RELEASE:1.1 netbsd-5-1-1-RELEASE:1.1 jmcneill-usbmp:1.1.0.110 jmcneill-usbmp-base:1.1 jmcneill-audiomp3:1.1.0.108 jmcneill-audiomp3-base:1.1 yamt-pagecache-base3:1.1 yamt-pagecache-base2:1.1 yamt-pagecache:1.1.0.106 yamt-pagecache-base:1.1 rmind-uvmplock-nbase:1.1 bouyer-quota2-nbase:1.1 bouyer-quota2:1.1.0.104 bouyer-quota2-base:1.1 jruoho-x86intr:1.1.0.102 jruoho-x86intr-base:1.1 matt-nb5-pq3:1.1.0.100 matt-nb5-pq3-base:1.1 netbsd-5-1:1.1.0.98 netbsd-5-1-RELEASE:1.1 yamt-nfs-mp-base11:1.1 netbsd-5-1-RC4:1.1 uebayasi-xip-base2:1.1 yamt-nfs-mp-base10:1.1 netbsd-5-1-RC3:1.1 netbsd-5-1-RC2:1.1 netbsd-5-1-RC1:1.1 rmind-uvmplock:1.1.0.96 rmind-uvmplock-base:1.1 yamt-nfs-mp-base9:1.1 uebayasi-xip:1.1.0.94 uebayasi-xip-base:1.1 netbsd-5-0-2-RELEASE:1.1 yamt-nfs-mp-base8:1.1 yamt-nfs-mp-base7:1.1 netbsd-5-0-1-RELEASE:1.1 jymxensuspend-base:1.1 yamt-nfs-mp-base6:1.1 yamt-nfs-mp-base5:1.1 yamt-nfs-mp-base4:1.1 jym-xensuspend-nbase:1.1 yamt-nfs-mp-base3:1.1 netbsd-5-0:1.1.0.92 netbsd-5-0-RELEASE:1.1 netbsd-5-0-RC4:1.1 netbsd-5-0-RC3:1.1 netbsd-5-0-RC2:1.1 jym-xensuspend:1.1.0.90 jym-xensuspend-base:1.1 netbsd-5-0-RC1:1.1 haad-dm-base2:1.1 haad-nbase2:1.1 ad-audiomp2:1.1.0.88 ad-audiomp2-base:1.1 netbsd-5:1.1.0.86 netbsd-5-base:1.1 haad-dm-base1:1.1 haad-dm:1.1.0.84 haad-dm-base:1.1 simonb-wapbl-nbase:1.1 yamt-pf42-base4:1.1 simonb-wapbl:1.1.0.82 simonb-wapbl-base:1.1 yamt-pf42-base3:1.1 hpcarm-cleanup-nbase:1.1 yamt-pf42-base2:1.1 yamt-nfs-mp-base2:1.1 yamt-nfs-mp:1.1.0.80 yamt-nfs-mp-base:1.1 yamt-pf42:1.1.0.78 yamt-pf42-base:1.1 ad-socklock-base1:1.1 yamt-lazymbuf-base15:1.1 yamt-lazymbuf-base14:1.1 keiichi-mipv6-nbase:1.1 mjf-devfs2:1.1.0.76 mjf-devfs2-base:1.1 keiichi-mipv6:1.1.0.74 keiichi-mipv6-base:1.1 bouyer-xeni386-merge1:1.1 vmlocking2-base3:1.1 bouyer-xeni386-nbase:1.1 yamt-kmem-base3:1.1 cube-autoconf:1.1.0.72 cube-autoconf-base:1.1 yamt-kmem-base2:1.1 bouyer-xeni386:1.1.0.70 bouyer-xeni386-base:1.1 yamt-kmem:1.1.0.68 yamt-kmem-base:1.1 vmlocking2-base2:1.1 reinoud-bufcleanup-nbase:1.1 vmlocking2:1.1.0.66 vmlocking2-base1:1.1 jmcneill-base:1.1 mjf-devfs:1.1.0.64 mjf-devfs-base:1.1 bouyer-xenamd64-base2:1.1 vmlocking-nbase:1.1 yamt-x86pmap-base4:1.1 bouyer-xenamd64:1.1.0.62 bouyer-xenamd64-base:1.1 yamt-x86pmap-base3:1.1 yamt-x86pmap-base2:1.1 yamt-x86pmap:1.1.0.60 yamt-x86pmap-base:1.1 jmcneill-pm:1.1.0.58 jmcneill-pm-base:1.1 hpcarm-cleanup:1.1.0.56 hpcarm-cleanup-base:1.1 mjf-ufs-trans-base:1.1 yamt-idlelwp-base8:1.1 reinoud-bufcleanup-base:1.1 vmlocking:1.1.0.54 vmlocking-base:1.1 ad-audiomp:1.1.0.52 ad-audiomp-base:1.1 yamt-idlelwp:1.1.0.50 post-newlock2-merge:1.1 newlock2-nbase:1.1 yamt-splraiseipl-base5:1.1 yamt-splraiseipl-base4:1.1 yamt-splraiseipl-base3:1.1 yamt-splraiseipl-base2:1.1 yamt-splraiseipl:1.1.0.48 yamt-splraiseipl-base:1.1 newlock2:1.1.0.46 newlock2-base:1.1 yamt-pdpolicy-base8:1.1 yamt-pdpolicy-base7:1.1 yamt-pdpolicy-base6:1.1 gdamore-uart:1.1.0.44 gdamore-uart-base:1.1 simonb-timcounters-final:1.1 yamt-pdpolicy-base5:1.1 elad-kernelauth-nbase:1.1 yamt-pdpolicy-base4:1.1 yamt-pdpolicy-base3:1.1 yamt-pdpolicy-base2:1.1 yamt-pdpolicy:1.1.0.42 yamt-pdpolicy-base:1.1 yamt-uio_vmspace-base5:1.1 simonb-timecounters:1.1.0.40 simonb-timecounters-base:1.1 rpaulo-netinet-merge-pcb:1.1.0.38 rpaulo-netinet-merge-pcb-base:1.1 yamt-uio_vmspace:1.1.0.36 yamt-readahead-base3:1.1 yamt-readahead-base2:1.1 yamt-readahead:1.1.0.34 yamt-readahead-base:1.1 yamt-vop-base3:1.1 yamt-vop-base2:1.1 thorpej-vnode-attr:1.1.0.32 thorpej-vnode-attr-base:1.1 yamt-vop:1.1.0.30 yamt-vop-base:1.1 yamt-lazymbuf:1.1.0.28 yamt-km-base4:1.1 yamt-km-base3:1.1 yamt-km-base2:1.1 yamt-km:1.1.0.26 yamt-km-base:1.1 kent-audio2:1.1.0.24 kent-audio2-base:1.1 ktrace-lwp:1.1.0.22 ktrace-lwp-base:1.1 nathanw_sa_before_merge:1.1 gmcgarry_ctxsw:1.1.0.20 gmcgarry_ctxsw_base:1.1 gmcgarry_ucred:1.1.0.18 gmcgarry_ucred_base:1.1 nathanw_sa_base:1.1 gehenna-devsw:1.1.0.16 gehenna-devsw-base:1.1 eeh-devprop:1.1.0.14 eeh-devprop-base:1.1 newlock:1.1.0.12 newlock-base:1.1 ifpoll-base:1.1 thorpej-mips-cache:1.1.0.8 thorpej-mips-cache-base:1.1 thorpej-devvp:1.1.0.6 thorpej-devvp-base:1.1 kqueue:1.1.0.4 kqueue-base:1.1 thorpej_scsipi_beforemerge:1.1 thorpej_scsipi_nbase:1.1 thorpej_scsipi_base:1.1 thorpej_scsipi:1.1.0.2; locks; strict; comment @# @; 1.1 date 2000.11.20.11.42.27; author bouyer; state dead; branches 1.1.2.1; next ; 1.1.2.1 date 2000.11.20.11.42.27; author bouyer; state Exp; branches; next 1.1.2.2; 1.1.2.2 date 2000.11.20.18.03.33; author bouyer; state dead; branches; next ; desc @@ 1.1 log @file ncr.c.rej was initially added on branch thorpej_scsipi. @ text @@ 1.1.2.1 log @Update thorpej_scsipi to -current as of a month ago A i386 GENERIC kernel compiles without the siop, ahc and bha drivers (will be updated later). i386 IDE/ATAPI and ncr work, as well as sparc/esp_sbus. alpha should work as well (untested yet). siop, ahc and bha will be updated once I've updated the branch to current -current, as well as machine-dependant code. @ text @a0 216 *************** *** 1537,1543 **** #if 0 static char ident[] = - "\n$NetBSD: ncr.c,v 1.87 1999/10/08 20:43:45 cgd Exp $\n"; #endif static const u_long ncr_version = NCR_VERSION * 11 --- 1535,1541 ---- #if 0 static char ident[] = + "\n$NetBSD: ncr.c,v 1.87.2.3 1999/10/26 23:10:17 thorpej Exp $\n"; #endif static const u_long ncr_version = NCR_VERSION * 11 *************** *** 1580,1645 **** #define NCR_895_ID (0x000c1000ul) #define NCR_896_ID (0x000b1000ul) - #ifdef __NetBSD__ - struct cfattach ncr_ca = { sizeof(struct ncb), ncr_probe, ncr_attach }; - #else /* !__NetBSD__ */ - - static u_long ncr_count; - - static struct pci_device ncr_device = { - "ncr", - ncr_probe, - ncr_attach, - &ncr_count, - NULL - }; - - DATA_SET (pcidevice_set, ncr_device); - - #endif /* !__NetBSD__ */ - - #ifndef __NetBSD__ - static struct scsipi_adapter ncr_switch = - { - ncr_start, - ncr_min_phys, - 0, - 0, - ncr_info, - "ncr", - NULL, /* scsipi_ioctl */ - }; - #endif /* !__NetBSD__ */ - - static struct scsipi_device ncr_dev = - { - NULL, /* Use default error handler */ - NULL, /* have a queue, served by this */ - NULL, /* have no async handler */ - NULL, /* Use default 'done' routine */ - #ifndef __NetBSD__ - "ncr", - #endif /* !__NetBSD__ */ - }; - - #ifdef __NetBSD__ - #define ncr_name(np) (np->sc_dev.dv_xname) - #else /* !__NetBSD__ */ - - static char *ncr_name (ncb_p np) - { - static char name[10]; - sprintf(name, "ncr0", np->unit); - return (name); - } - #endif - /*========================================================== ** ** --- 1578,1589 ---- #define NCR_895_ID (0x000c1000ul) #define NCR_896_ID (0x000b1000ul) struct cfattach ncr_ca = { sizeof(struct ncb), ncr_probe, ncr_attach }; #define ncr_name(np) (np->sc_dev.dv_xname) /*========================================================== ** ** *************** *** 4370,4432 **** ** Now let the generic SCSI driver ** look for the SCSI devices on the bus .. */ - - #ifdef __NetBSD__ - np->sc_adapter.scsipi_cmd = ncr_start; - np->sc_adapter.scsipi_minphys = ncr_minphys; - - np->sc_link.adapter_softc = np; - np->sc_link.scsipi_scsi.adapter_target = np->myaddr; - np->sc_link.openings = 1; - np->sc_link.scsipi_scsi.channel = SCSI_CHANNEL_ONLY_ONE; - np->sc_link.scsipi_scsi.max_target = np->maxwide ? 15 : 7; - np->sc_link.scsipi_scsi.max_lun = MAX_LUN-1; - np->sc_link.type = BUS_SCSI; - np->sc_link.adapter = &np->sc_adapter; - #else /* !__NetBSD__ */ - np->sc_link.adapter_unit = unit; - np->sc_link.adapter_softc = np; - np->sc_link.adapter_targ = np->myaddr; - np->sc_link.fordriver = 0; - np->sc_link.adapter = &ncr_switch; - #endif /* !__NetBSD__ */ - np->sc_link.device = &ncr_dev; - np->sc_link.flags = 0; - - #ifdef __NetBSD__ - config_found(self, &np->sc_link, scsiprint); - #else /* !__NetBSD__ */ - #if (__FreeBSD__ >= 2) - scbus = scsi_alloc_bus(); - if(!scbus) - return; - scbus->adapter_link = &np->sc_link; - if(np->maxwide) - scbus->maxtarg = 15; - if (bootverbose) { - unsigned t_from = 0; - unsigned t_to = scbus->maxtarg; - unsigned myaddr = np->myaddr; - - char *txt_and = ""; - printf (" scanning for targets ", ncr_name (np)); - if (t_from < myaddr) { - printf ("0..0 ", t_from, myaddr -1); - txt_and = "and "; - } - if (myaddr < t_to) - printf ("0..0 ", txt_and, myaddr +1, t_to); - printf ("(V0 " NCR_DATE ")\n", NCR_VERSION); - } - - scsi_attachdevs (scbus); - scbus = NULL; /* Upper-level SCSI code owns this now */ - #else - scsi_attachdevs (&np->sc_link); - #endif /* !__FreeBSD__ >= 2 */ - #endif /* !__NetBSD__ */ /* ** start the timeout daemon --- 4254,4277 ---- ** Now let the generic SCSI driver ** look for the SCSI devices on the bus .. */ + memset(adapt, 0, sizeof(*adapt)); + adapt->adapt_dev = &np->sc_dev; + adapt->adapt_nchannels = 1; + adapt->adapt_openings = MAX_START - 4; /* XXX I hate this driver */ + adapt->adapt_max_periph = 1; /* XXX I hate this driver */ + adapt->adapt_request = ncr_scsipi_request; + adapt->adapt_minphys = ncr_minphys; + + memset(chan, 0, sizeof(*chan)); + chan->chan_adapter = adapt; + chan->chan_bustype = &scsi_bustype; + chan->chan_channel = 0; + chan->chan_ntargets = np->maxwide ? 16 : 8; + chan->chan_nluns = MAX_LUN; + chan->chan_id = np->myaddr; + config_found(self, &np->sc_channel, scsiprint); /* ** start the timeout daemon *************** *** 4605,4616 **** oldspl = splbio(); - if (!(cp=ncr_get_ccb (np, flags, xp->sc_link->scsipi_scsi.target, - xp->sc_link->scsipi_scsi.lun))) { printf (": no ccb.\n", ncr_name (np)); - xp->error = XS_DRIVER_STUFFUP; splx(oldspl); - return(TRY_AGAIN_LATER); }; cp->xfer = xp; --- 4471,4483 ---- oldspl = splbio(); + if (!(cp=ncr_get_ccb (np, flags, periph->periph_target, + periph->periph_lun))) { printf (": no ccb.\n", ncr_name (np)); + xp->error = XS_RESOURCE_SHORTAGE; splx(oldspl); + scsipi_done(xp); + return; }; cp->xfer = xp; @ 1.1.2.2 log @Remove files that should not have been added @ text @d6 1 a6 1 - "\n$NetBSD: ncr.c.rej,v 1.1.2.1 2000/11/20 11:42:27 bouyer Exp $\n"; d14 1 a14 1 + "\n$NetBSD: ncr.c.rej,v 1.1.2.1 2000/11/20 11:42:27 bouyer Exp $\n"; @