196 emul64_info, /* getinfo */
197 nulldev, /* identify */
198 nulldev, /* probe */
199 emul64_attach, /* attach */
200 emul64_detach, /* detach */
201 nodev, /* reset */
202 &emul64_cbops, /* char/block ops */
203 NULL, /* bus ops */
204 NULL, /* power */
205 ddi_quiesce_not_needed, /* quiesce */
206 };
207
208 static struct modldrv modldrv = {
209 &mod_driverops, /* module type - driver */
210 "emul64 SCSI Host Bus Adapter", /* module name */
211 &emul64_ops, /* driver ops */
212 };
213
214 static struct modlinkage modlinkage = {
215 MODREV_1, /* ml_rev - must be MODREV_1 */
216 &modldrv, /* ml_linkage */
217 NULL /* end of driver linkage */
218 };
219
220 int
221 _init(void)
222 {
223 int ret;
224
225 ret = ddi_soft_state_init(&emul64_state, sizeof (struct emul64),
226 EMUL64_INITIAL_SOFT_SPACE);
227 if (ret != 0)
228 return (ret);
229
230 if ((ret = scsi_hba_init(&modlinkage)) != 0) {
231 ddi_soft_state_fini(&emul64_state);
232 return (ret);
233 }
234
235 /* Set the number of task threads to the number of CPUs */
236 if (boot_max_ncpus == -1) {
237 emul64_task_nthreads = max_ncpus;
|
196 emul64_info, /* getinfo */
197 nulldev, /* identify */
198 nulldev, /* probe */
199 emul64_attach, /* attach */
200 emul64_detach, /* detach */
201 nodev, /* reset */
202 &emul64_cbops, /* char/block ops */
203 NULL, /* bus ops */
204 NULL, /* power */
205 ddi_quiesce_not_needed, /* quiesce */
206 };
207
208 static struct modldrv modldrv = {
209 &mod_driverops, /* module type - driver */
210 "emul64 SCSI Host Bus Adapter", /* module name */
211 &emul64_ops, /* driver ops */
212 };
213
214 static struct modlinkage modlinkage = {
215 MODREV_1, /* ml_rev - must be MODREV_1 */
216 { &modldrv, NULL } /* ml_linkage */
217 };
218
219 int
220 _init(void)
221 {
222 int ret;
223
224 ret = ddi_soft_state_init(&emul64_state, sizeof (struct emul64),
225 EMUL64_INITIAL_SOFT_SPACE);
226 if (ret != 0)
227 return (ret);
228
229 if ((ret = scsi_hba_init(&modlinkage)) != 0) {
230 ddi_soft_state_fini(&emul64_state);
231 return (ret);
232 }
233
234 /* Set the number of task threads to the number of CPUs */
235 if (boot_max_ncpus == -1) {
236 emul64_task_nthreads = max_ncpus;
|