Lines Matching refs:ioctl
69 void *ioctl; member
249 memcpy(esas2r_buffered_ioctl, bi->ioctl, bi->length); in handle_buffered_ioctl()
286 memcpy(bi->ioctl, esas2r_buffered_ioctl, bi->length); in handle_buffered_ioctl()
300 esas2r_sgc_init(sgc, a, rq, rq->vrq->ioctl.sge); in smp_ioctl_callback()
319 bi.ioctl = si; in handle_smp_ioctl()
348 struct atto_vda_ioctl_req *ioctl = &rq->vrq->ioctl; in csmi_ioctl_tunnel() local
353 esas2r_sgc_init(sgc, a, rq, rq->vrq->ioctl.sge); in csmi_ioctl_tunnel()
355 ioctl->csmi.ctrl_code = cpu_to_le32(ctrl_code); in csmi_ioctl_tunnel()
356 ioctl->csmi.target_id = cpu_to_le16(target_id); in csmi_ioctl_tunnel()
357 ioctl->csmi.lun = (u8)le32_to_cpu(rq->vrq->scsi.flags); in csmi_ioctl_tunnel()
653 bi.ioctl = &ci->data; in handle_csmi_ioctl()
672 esas2r_sgc_init(sgc, a, rq, rq->vrq->ioctl.sge); in hba_ioctl_tunnel()
1237 bi.ioctl = ioctl_hba; in handle_hba_ioctl()
1275 struct atto_express_ioctl *ioctl = NULL; in esas2r_ioctl_handler() local
1288 ioctl = memdup_user(arg, sizeof(struct atto_express_ioctl)); in esas2r_ioctl_handler()
1289 if (IS_ERR(ioctl)) { in esas2r_ioctl_handler()
1293 return PTR_ERR(ioctl); in esas2r_ioctl_handler()
1298 if (memcmp(ioctl->header.signature, in esas2r_ioctl_handler()
1302 kfree(ioctl); in esas2r_ioctl_handler()
1309 ioctl->header.return_code = IOCTL_SUCCESS; in esas2r_ioctl_handler()
1320 ioctl->data.chanlist.num_channels = 0; in esas2r_ioctl_handler()
1324 ioctl->data.chanlist.num_channels++; in esas2r_ioctl_handler()
1325 ioctl->data.chanlist.channel[k] = i; in esas2r_ioctl_handler()
1336 if (ioctl->header.channel == 0xFF) { in esas2r_ioctl_handler()
1339 if (ioctl->header.channel >= MAX_ADAPTERS || in esas2r_ioctl_handler()
1340 esas2r_adapters[ioctl->header.channel] == NULL) { in esas2r_ioctl_handler()
1341 ioctl->header.return_code = IOCTL_BAD_CHANNEL; in esas2r_ioctl_handler()
1343 kfree(ioctl); in esas2r_ioctl_handler()
1347 a = esas2r_adapters[ioctl->header.channel]; in esas2r_ioctl_handler()
1353 if (ioctl->data.fwrw.img_type == FW_IMG_FM_API) { in esas2r_ioctl_handler()
1355 (char *)ioctl->data.fwrw.image, in esas2r_ioctl_handler()
1362 (char *)ioctl->data.fwrw. in esas2r_ioctl_handler()
1368 } else if (ioctl->data.fwrw.img_type == FW_IMG_FS_API) { in esas2r_ioctl_handler()
1370 (char *)ioctl->data.fwrw.image, in esas2r_ioctl_handler()
1377 (char *)ioctl->data.fwrw. in esas2r_ioctl_handler()
1384 ioctl->header.return_code = IOCTL_BAD_FLASH_IMGTYPE; in esas2r_ioctl_handler()
1391 memcpy(ioctl->data.prw.data_buffer, a->nvram, in esas2r_ioctl_handler()
1393 ioctl->data.prw.code = 1; in esas2r_ioctl_handler()
1400 kfree(ioctl); in esas2r_ioctl_handler()
1407 (struct esas2r_sas_nvram *)ioctl->data.prw.data_buffer); in esas2r_ioctl_handler()
1408 ioctl->data.prw.code = code; in esas2r_ioctl_handler()
1417 (struct esas2r_sas_nvram *)ioctl->data.prw.data_buffer); in esas2r_ioctl_handler()
1418 ioctl->data.prw.code = 1; in esas2r_ioctl_handler()
1423 ioctl->data.chaninfo.major_rev = ESAS2R_MAJOR_REV; in esas2r_ioctl_handler()
1424 ioctl->data.chaninfo.minor_rev = ESAS2R_MINOR_REV; in esas2r_ioctl_handler()
1425 ioctl->data.chaninfo.IRQ = a->pcid->irq; in esas2r_ioctl_handler()
1426 ioctl->data.chaninfo.device_id = a->pcid->device; in esas2r_ioctl_handler()
1427 ioctl->data.chaninfo.vendor_id = a->pcid->vendor; in esas2r_ioctl_handler()
1428 ioctl->data.chaninfo.ven_dev_id = a->pcid->subsystem_device; in esas2r_ioctl_handler()
1429 ioctl->data.chaninfo.revision_id = a->pcid->revision; in esas2r_ioctl_handler()
1430 ioctl->data.chaninfo.pci_bus = a->pcid->bus->number; in esas2r_ioctl_handler()
1431 ioctl->data.chaninfo.pci_dev_func = a->pcid->devfn; in esas2r_ioctl_handler()
1432 ioctl->data.chaninfo.core_rev = 0; in esas2r_ioctl_handler()
1433 ioctl->data.chaninfo.host_no = a->host->host_no; in esas2r_ioctl_handler()
1434 ioctl->data.chaninfo.hbaapi_rev = 0; in esas2r_ioctl_handler()
1438 ioctl->header.return_code = handle_smp_ioctl(a, in esas2r_ioctl_handler()
1439 &ioctl->data. in esas2r_ioctl_handler()
1444 ioctl->header.return_code = in esas2r_ioctl_handler()
1445 handle_csmi_ioctl(a, &ioctl->data.csmi); in esas2r_ioctl_handler()
1449 ioctl->header.return_code = handle_hba_ioctl(a, in esas2r_ioctl_handler()
1450 &ioctl->data. in esas2r_ioctl_handler()
1456 (char *)&ioctl->data.ioctl_vda, in esas2r_ioctl_handler()
1459 ioctl->data.ioctl_vda.data_length); in esas2r_ioctl_handler()
1463 (char *)&ioctl->data.ioctl_vda, in esas2r_ioctl_handler()
1466 ioctl->data.ioctl_vda.data_length); in esas2r_ioctl_handler()
1476 ioctl->data.modinfo.adapter = a; in esas2r_ioctl_handler()
1477 ioctl->data.modinfo.pci_dev = a->pcid; in esas2r_ioctl_handler()
1478 ioctl->data.modinfo.scsi_host = a->host; in esas2r_ioctl_handler()
1479 ioctl->data.modinfo.host_no = a->host->host_no; in esas2r_ioctl_handler()
1485 ioctl->header.return_code = IOCTL_ERR_INVCMD; in esas2r_ioctl_handler()
1497 ioctl->header.return_code = IOCTL_OUT_OF_RESOURCES; in esas2r_ioctl_handler()
1502 ioctl->header.return_code = IOCTL_INVALID_PARAM; in esas2r_ioctl_handler()
1506 ioctl->header.return_code = IOCTL_GENERAL_ERROR; in esas2r_ioctl_handler()
1513 err = copy_to_user(arg, ioctl, sizeof(struct atto_express_ioctl)); in esas2r_ioctl_handler()
1518 kfree(ioctl); in esas2r_ioctl_handler()
1523 kfree(ioctl); in esas2r_ioctl_handler()