-#ifdef GDTH_IOCTL_PROC
-#if LINUX_VERSION_CODE >= 0x020503
-static int gdth_set_bin_info(char *buffer,int length,int hanum,Scsi_Request *scp)
-#elif LINUX_VERSION_CODE >= 0x020322
-static int gdth_set_bin_info(char *buffer,int length,int hanum,Scsi_Cmnd *scp)
-#else
-static int gdth_set_bin_info(char *buffer,int length,int hanum,Scsi_Cmnd scp)
-#endif
-{
- unchar i, j;
- ushort k, hdr_cnt, status;
- gdth_ha_str *ha;
- gdth_iowr_str *piowr;
- gdth_iord_str *piord;
- gdth_cmd_str *pcmd;
- gdth_evt_str *pevt;
- ulong32 *ppadd, add_size, *ppadd2, add_size2, info, paddr;
- ulong flags;
- gdth_cmd_str gdtcmd;
- int drv_cyls, drv_hds, drv_secs;
-
- char cmnd[MAX_COMMAND_SIZE];
- memset(cmnd, 0xff, 12);
- memset(&gdtcmd, 0, sizeof(gdth_cmd_str));
-
- TRACE2(("gdth_set_bin_info() ha %d\n",hanum));
- ha = HADATA(gdth_ctr_tab[hanum]);
- piowr = (gdth_iowr_str *)buffer;
- piord = NULL;
- pcmd = NULL;
- ppadd = ppadd2 = NULL;
- add_size = add_size2 = 0;
-
- if (length < GDTOFFSOF(gdth_iowr_str,iu))
- return(-EINVAL);
-
- switch (piowr->ioctl) {
- case GDTIOCTL_GENERAL:
- if (length < GDTOFFSOF(gdth_iowr_str,iu.general.data[0]))
- return(-EINVAL);
- pcmd = (gdth_cmd_str *)piowr->iu.general.command;
- pcmd->Service = piowr->service;
- if (pcmd->OpCode == GDT_IOCTL) {
- ppadd = &pcmd->u.ioctl.p_param;
- add_size = pcmd->u.ioctl.param_size;
- } else if (piowr->service == CACHESERVICE) {
- add_size = pcmd->u.cache.BlockCnt * SECTOR_SIZE;
- if (ha->cache_feat & SCATTER_GATHER) {
- ppadd = &pcmd->u.cache.sg_lst[0].sg_ptr;
- pcmd->u.cache.DestAddr = 0xffffffff;
- pcmd->u.cache.sg_lst[0].sg_len = add_size;
- pcmd->u.cache.sg_canz = 1;
- } else {
- ppadd = &pcmd->u.cache.DestAddr;
- pcmd->u.cache.sg_canz = 0;
- }
- } else if (piowr->service == SCSIRAWSERVICE) {
- add_size = pcmd->u.raw.sdlen;
- add_size2 = pcmd->u.raw.sense_len;
- if (ha->raw_feat & SCATTER_GATHER) {
- ppadd = &pcmd->u.raw.sg_lst[0].sg_ptr;
- pcmd->u.raw.sdata = 0xffffffff;
- pcmd->u.raw.sg_lst[0].sg_len = add_size;
- pcmd->u.raw.sg_ranz = 1;
- } else {
- ppadd = &pcmd->u.raw.sdata;
- pcmd->u.raw.sg_ranz = 0;
- }
- ppadd2 = &pcmd->u.raw.sense_data;
- } else {
- return(-EINVAL);
- }
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str)+add_size+add_size2,
- TRUE, &paddr ))
- return(-EBUSY);
- piord = (gdth_iord_str *)ha->pscratch;
- piord->size = sizeof(gdth_iord_str) + add_size + add_size2;
- if (add_size > 0) {
- memcpy(piord->iu.general.data, piowr->iu.general.data, add_size);
- *ppadd = paddr + GDTOFFSOF(gdth_iord_str, iu.general.data[0]);
- }
- if (add_size2 > 0) {
- memcpy(piord->iu.general.data+add_size, piowr->iu.general.data, add_size2);
- *ppadd2 = paddr + GDTOFFSOF(gdth_iord_str, iu.general.data[0]) + add_size2;
- }
-
- /* do IOCTL */
-#if LINUX_VERSION_CODE >= 0x020503
- gdth_do_req(scp, pcmd, cmnd, piowr->timeout);
- piord->status = (scp->sr_command->SCp.Message << 16) |
- scp->sr_command->SCp.Status;
-#elif LINUX_VERSION_CODE >= 0x020322
- gdth_do_cmd(scp, pcmd, cmnd, piowr->timeout);
- piord->status = (scp->SCp.Message<<16)|scp->SCp.Status;
-#else
- gdth_do_cmd(&scp, pcmd, cmnd, piowr->timeout);
- piord->status = (scp.SCp.Message<<16)|scp.SCp.Status;
-#endif
- break;
-
- case GDTIOCTL_DRVERS:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE, &paddr ))
- return(-EBUSY);
- piord = (gdth_iord_str *)ha->pscratch;
- piord->size = sizeof(gdth_iord_str);
- piord->status = S_OK;
- piord->iu.drvers.version = (GDTH_VERSION<<8) | GDTH_SUBVERSION;
- break;
-
- case GDTIOCTL_CTRTYPE:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE, &paddr ))
- return(-EBUSY);
- piord = (gdth_iord_str *)ha->pscratch;
- piord->size = sizeof(gdth_iord_str);
- piord->status = S_OK;
- if (ha->type == GDT_ISA || ha->type == GDT_EISA) {
- piord->iu.ctrtype.type = (unchar)((ha->stype>>20) - 0x10);
- } else {
- if (ha->type != GDT_PCIMPR) {
- piord->iu.ctrtype.type = (unchar)((ha->stype<<4) + 6);
- } else {
- piord->iu.ctrtype.type =
- (ha->oem_id == OEM_ID_INTEL ? 0xfd : 0xfe);
- if (ha->stype >= 0x300)
- piord->iu.ctrtype.ext_type = 0x6000 | ha->subdevice_id;
- else
- piord->iu.ctrtype.ext_type = 0x6000 | ha->stype;
- }
- piord->iu.ctrtype.device_id = ha->stype;
- piord->iu.ctrtype.sub_device_id = ha->subdevice_id;
- }
- piord->iu.ctrtype.info = ha->brd_phys;
- piord->iu.ctrtype.oem_id = ha->oem_id;
- break;
-
- case GDTIOCTL_CTRCNT:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE, &paddr ))
- return(-EBUSY);
- piord = (gdth_iord_str *)ha->pscratch;
- piord->size = sizeof(gdth_iord_str);
- piord->status = S_OK;
- piord->iu.ctrcnt.count = (ushort)gdth_ctr_count;
- break;
-
- case GDTIOCTL_OSVERS:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE, &paddr ))
- return(-EBUSY);
- piord = (gdth_iord_str *)ha->pscratch;
- piord->size = sizeof(gdth_iord_str);
- piord->status = S_OK;
- piord->iu.osvers.version = (unchar)(LINUX_VERSION_CODE >> 16);
- piord->iu.osvers.subversion = (unchar)(LINUX_VERSION_CODE >> 8);
- piord->iu.osvers.revision = (ushort)(LINUX_VERSION_CODE & 0xff);
- break;
-
- case GDTIOCTL_LOCKDRV:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE, &paddr ))
- return(-EBUSY);
- piord = (gdth_iord_str *)ha->pscratch;
- for (i = 0; i < piowr->iu.lockdrv.drive_cnt; ++i) {
- j = piowr->iu.lockdrv.drives[i];
- if (j >= MAX_HDRIVES || !ha->hdr[j].present)
- continue;
- if (piowr->iu.lockdrv.lock) {
- GDTH_LOCK_HA(ha, flags);
- ha->hdr[j].lock = 1;
- GDTH_UNLOCK_HA(ha, flags);
- gdth_wait_completion( hanum, ha->bus_cnt, j );
- gdth_stop_timeout( hanum, ha->bus_cnt, j );
- } else {
- GDTH_LOCK_HA(ha, flags);
- ha->hdr[j].lock = 0;
- GDTH_UNLOCK_HA(ha, flags);
- gdth_start_timeout( hanum, ha->bus_cnt, j );
- gdth_next( hanum );
- }
- }
- piord->size = sizeof(gdth_iord_str);
- piord->status = S_OK;
- break;
-
- case GDTIOCTL_LOCKCHN:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE, &paddr ))
- return(-EBUSY);
- i = piowr->iu.lockchn.channel;
- if (i < ha->bus_cnt) {
- if (piowr->iu.lockchn.lock) {
- GDTH_LOCK_HA(ha, flags);
- ha->raw[i].lock = 1;
- GDTH_UNLOCK_HA(ha, flags);
- for (j = 0; j < ha->tid_cnt; ++j) {
- gdth_wait_completion( hanum, i, j );
- gdth_stop_timeout( hanum, i, j );
- }
- } else {
- GDTH_LOCK_HA(ha, flags);
- ha->raw[i].lock = 0;
- GDTH_UNLOCK_HA(ha, flags);
- for (j = 0; j < ha->tid_cnt; ++j) {
- gdth_start_timeout( hanum, i, j );
- gdth_next( hanum );
- }
- }
- }
- piord = (gdth_iord_str *)ha->pscratch;
- piord->size = sizeof(gdth_iord_str);
- piord->status = S_OK;
- break;
-
- case GDTIOCTL_EVENT:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE, &paddr ))
- return(-EBUSY);
- piord = (gdth_iord_str *)ha->pscratch;
- if (piowr->iu.event.erase == 0xff) {
- pevt = (gdth_evt_str *)piowr->iu.event.evt;
- if (pevt->event_source == ES_TEST)
- pevt->event_data.size = sizeof(pevt->event_data.eu.test);
- else if (pevt->event_source == ES_DRIVER)
- pevt->event_data.size = sizeof(pevt->event_data.eu.driver);
- else if (pevt->event_source == ES_SYNC)
- pevt->event_data.size = sizeof(pevt->event_data.eu.sync);
- else {
- pevt->event_data.size = sizeof(pevt->event_data.eu.async);
- gdth_log_event(&pevt->event_data, NULL);
- }
- GDTH_LOCK_HA(ha, flags);
- gdth_store_event(ha, pevt->event_source, pevt->event_idx,
- &pevt->event_data);
- GDTH_UNLOCK_HA(ha, flags);
- } else if (piowr->iu.event.erase == 0xfe) {
- gdth_clear_events();
- } else if (piowr->iu.event.erase == 0) {
- piord->iu.event.handle =
- gdth_read_event(ha,piowr->iu.event.handle,
- (gdth_evt_str *)piord->iu.event.evt);
- } else {
- piord->iu.event.handle = piowr->iu.event.handle;
- gdth_readapp_event(ha, (unchar)piowr->iu.event.erase,
- (gdth_evt_str *)piord->iu.event.evt);
- }
- piord->size = sizeof(gdth_iord_str);
- piord->status = S_OK;
- break;
-
- case GDTIOCTL_SCSI:
-#if LINUX_VERSION_CODE >= 0x020503
- return(-EINVAL);
-#else
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE, &paddr ))
- return(-EBUSY);
- piord = (gdth_iord_str *)ha->pscratch;
- piord->size = sizeof(gdth_iord_str);
- memcpy(cmnd, piowr->iu.scsi.cmd, 12);
-#if LINUX_VERSION_CODE >= 0x020322
- scp->target = piowr->iu.scsi.target;
- scp->channel = virt_ctr ? 0 : piowr->iu.scsi.bus;
- scp->cmd_len = piowr->iu.scsi.cmd_len;
- gdth_do_cmd(scp, pcmd, cmnd, piowr->timeout);
- piord->status = (scp->SCp.Message<<16)|scp->SCp.Status;
-#else
- scp.target = piowr->iu.scsi.target;
- scp.channel = virt_ctr ? 0 : piowr->iu.scsi.bus;
- scp.cmd_len = piowr->iu.scsi.cmd_len;
- gdth_do_cmd(&scp, pcmd, cmnd, piowr->timeout);
- piord->status = (scp.SCp.Message<<16)|scp.SCp.Status;
-#endif
-#endif
- break;
-
- case GDTIOCTL_RESET_BUS:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE, &paddr ))
- return(-EBUSY);
- piord = (gdth_iord_str *)ha->pscratch;
- piord->size = sizeof(gdth_iord_str);
-#if LINUX_VERSION_CODE >= 0x02053C
- {
- Scsi_Device *sdev;
- Scsi_Cmnd *scmnd;
-
- sdev = scsi_get_host_dev(gdth_ctr_tab[hanum]);
- scmnd= scsi_get_command(sdev, GFP_KERNEL);
- if (!scmnd)
- return(-ENOMEM);
- scmnd->device->host = scp->sr_host;
- scmnd->device->channel = virt_ctr ? 0 : piowr->iu.scsi.bus;
- piord->status = (ulong32)gdth_eh_bus_reset( scmnd );
- if (piord->status == SUCCESS)
- piord->status = S_OK;
- else
- piord->status = S_GENERR;
- scsi_put_command(scmnd);
- scsi_free_host_dev(sdev);
- }
-#elif LINUX_VERSION_CODE >= 0x020503
- {
- Scsi_Cmnd scmnd;
-
- scmnd.host = scp->sr_host;
- scmnd.channel = virt_ctr ? 0 : piowr->iu.scsi.bus;
- piord->status = (ulong32)gdth_eh_bus_reset( &scmnd );
- if (piord->status == SUCCESS)
- piord->status = S_OK;
- else
- piord->status = S_GENERR;
- }
-#elif LINUX_VERSION_CODE >= 0x020322
- scp->channel = virt_ctr ? 0 : piowr->iu.scsi.bus;
- piord->status = (ulong32)gdth_eh_bus_reset( scp );
- if (piord->status == SUCCESS)
- piord->status = S_OK;
- else
- piord->status = S_GENERR;
-#elif LINUX_VERSION_CODE >= 0x02015F
- scp.channel = virt_ctr ? 0 : piowr->iu.scsi.bus;
- piord->status = (ulong32)gdth_eh_bus_reset( &scp );
- if (piord->status == SUCCESS)
- piord->status = S_OK;
- else
- piord->status = S_GENERR;
-#else
- piord->status = S_OK;
-#endif
- break;
-
- case GDTIOCTL_HDRLIST:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE, &paddr ))
- return(-EBUSY);
- piord = (gdth_iord_str *)ha->pscratch;
- piord->size = sizeof(gdth_iord_str);
- piord->status = S_OK;
- for (i = 0; i < MAX_HDRIVES; ++i) {
- if (ha->hdr[i].present) {
- piord->iu.hdr_list[i].bus = ha->virt_bus;
- piord->iu.hdr_list[i].target = i;
- piord->iu.hdr_list[i].lun = 0;
- piord->iu.hdr_list[i].cluster_type = ha->hdr[i].cluster_type;
- if (ha->hdr[i].cluster_type & CLUSTER_DRIVE) {
- gdtcmd.Service = CACHESERVICE;
- gdtcmd.OpCode = GDT_CLUST_INFO;
- gdtcmd.u.cache.DeviceNo = i;
-#if LINUX_VERSION_CODE >= 0x020503
- gdth_do_req(scp, &gdtcmd, cmnd, 30);
- if (scp->sr_command->SCp.Status == S_OK)
- piord->iu.hdr_list[i].cluster_type =
- (unchar)scp->sr_command->SCp.Message;
-#elif LINUX_VERSION_CODE >= 0x020322
- gdth_do_cmd(scp, &gdtcmd, cmnd, 30);
- if (scp->SCp.Status == S_OK)
- piord->iu.hdr_list[i].cluster_type =
- (unchar)scp->SCp.Message;
-#else
- gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);
- if (scp.SCp.Status == S_OK)
- piord->iu.hdr_list[i].cluster_type =
- (unchar)scp.SCp.Message;
-#endif
- }
- } else {
- piord->iu.hdr_list[i].bus = 0xff;
- }
- }
- break;
-
- case GDTIOCTL_RESCAN:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE, &paddr ))
- return(-EBUSY);
- piord = (gdth_iord_str *)ha->pscratch;
- piord->size = sizeof(gdth_iord_str);
- piord->status = S_OK;
- if (piowr->iu.rescan.flag == 0) {
- /* old method: scan all host drives
- re-initialize cache service to get host drive count
- */
- gdtcmd.Service = CACHESERVICE;
- gdtcmd.OpCode = GDT_INIT;
- gdtcmd.u.cache.DeviceNo = LINUX_OS;
-#if LINUX_VERSION_CODE >= 0x020503
- gdth_do_req(scp, &gdtcmd, cmnd, 30);
- status = (ushort)scp->sr_command->SCp.Status;
- info = (ulong32)scp->sr_command->SCp.Message;
-#elif LINUX_VERSION_CODE >= 0x020322
- gdth_do_cmd(scp, &gdtcmd, cmnd, 30);
- status = (ushort)scp->SCp.Status;
- info = (ulong32)scp->SCp.Message;
-#else
- gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);
- status = (ushort)scp.SCp.Status;
- info = (ulong32)scp.SCp.Message;
-#endif
- if (status != S_OK)
- break;
- k = 0;
- hdr_cnt = (ushort)info;
- } else {
- k = piowr->iu.rescan.hdr_no;
- hdr_cnt = k + 1;
- }
- if (hdr_cnt > MAX_HDRIVES)
- hdr_cnt = MAX_HDRIVES;
- /* scanning for host drives */
- for (; k < hdr_cnt; ++k) {
- /* info about host drive */
- gdtcmd.Service = CACHESERVICE;
- gdtcmd.OpCode = GDT_INFO;
- gdtcmd.u.cache.DeviceNo = k;
-#if LINUX_VERSION_CODE >= 0x020503
- gdth_do_req(scp, &gdtcmd, cmnd, 30);
- status = (ushort)scp->sr_command->SCp.Status;
- info = (ulong32)scp->sr_command->SCp.Message;
-#elif LINUX_VERSION_CODE >= 0x020322
- gdth_do_cmd(scp, &gdtcmd, cmnd, 30);
- status = (ushort)scp->SCp.Status;
- info = (ulong32)scp->SCp.Message;
-#else
- gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);
- status = (ushort)scp.SCp.Status;
- info = (ulong32)scp.SCp.Message;
-#endif
- GDTH_LOCK_HA(ha, flags);
- piord->iu.hdr_list[k].bus = ha->virt_bus;
- piord->iu.hdr_list[k].target = k;
- piord->iu.hdr_list[k].lun = 0;
- if (status != S_OK) {
- ha->hdr[k].present = FALSE;
- } else {
- ha->hdr[k].present = TRUE;
- ha->hdr[k].size = info;
- /* evaluate mapping (sectors per head, heads per cylinder) */
- ha->hdr[k].size &= ~SECS32;
- gdth_eval_mapping(ha->hdr[k].size,&drv_cyls,&drv_hds,&drv_secs);
- ha->hdr[k].heads = (unchar)drv_hds;
- ha->hdr[k].secs = (unchar)drv_secs;
- /* round size */
- ha->hdr[k].size = drv_cyls * drv_hds * drv_secs;
- }
- GDTH_UNLOCK_HA(ha, flags);
- if (status != S_OK)
- continue; /* next host drive */
-
- /* devtype, cluster info, R/W attributes */
- gdtcmd.Service = CACHESERVICE;
- gdtcmd.OpCode = GDT_DEVTYPE;
- gdtcmd.u.cache.DeviceNo = k;
-#if LINUX_VERSION_CODE >= 0x020503
- gdth_do_req(scp, &gdtcmd, cmnd, 30);
- status = (ushort)scp->sr_command->SCp.Status;
- info = (ulong32)scp->sr_command->SCp.Message;
-#elif LINUX_VERSION_CODE >= 0x020322
- gdth_do_cmd(scp, &gdtcmd, cmnd, 30);
- status = (ushort)scp->SCp.Status;
- info = (ulong32)scp->SCp.Message;
-#else
- gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);
- status = (ushort)scp.SCp.Status;
- info = (ulong32)scp.SCp.Message;
-#endif
- GDTH_LOCK_HA(ha, flags);
- ha->hdr[k].devtype = 0;
- if (status == S_OK)
- ha->hdr[k].devtype = (ushort)info;
- GDTH_UNLOCK_HA(ha, flags);
-
- gdtcmd.Service = CACHESERVICE;
- gdtcmd.OpCode = GDT_CLUST_INFO;
- gdtcmd.u.cache.DeviceNo = k;
-#if LINUX_VERSION_CODE >= 0x020503
- gdth_do_req(scp, &gdtcmd, cmnd, 30);
- status = (ushort)scp->sr_command->SCp.Status;
- info = (ulong32)scp->sr_command->SCp.Message;
-#elif LINUX_VERSION_CODE >= 0x020322
- gdth_do_cmd(scp, &gdtcmd, cmnd, 30);
- status = (ushort)scp->SCp.Status;
- info = (ulong32)scp->SCp.Message;
-#else
- gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);
- status = (ushort)scp.SCp.Status;
- info = (ulong32)scp.SCp.Message;
-#endif
- GDTH_LOCK_HA(ha, flags);
- ha->hdr[k].cluster_type = 0;
- if (status == S_OK && !shared_access)
- ha->hdr[k].cluster_type = (ushort)info;
- GDTH_UNLOCK_HA(ha, flags);
- piord->iu.hdr_list[k].cluster_type = ha->hdr[k].cluster_type;
-
- gdtcmd.Service = CACHESERVICE;
- gdtcmd.OpCode = GDT_RW_ATTRIBS;
- gdtcmd.u.cache.DeviceNo = k;
-#if LINUX_VERSION_CODE >= 0x020503
- gdth_do_req(scp, &gdtcmd, cmnd, 30);
- status = (ushort)scp->sr_command->SCp.Status;
- info = (ulong32)scp->sr_command->SCp.Message;
-#elif LINUX_VERSION_CODE >= 0x020322
- gdth_do_cmd(scp, &gdtcmd, cmnd, 30);
- status = (ushort)scp->SCp.Status;
- info = (ulong32)scp->SCp.Message;
-#else
- gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);
- status = (ushort)scp.SCp.Status;
- info = (ulong32)scp.SCp.Message;
-#endif
- GDTH_LOCK_HA(ha, flags);
- ha->hdr[k].rw_attribs = 0;
- if (status == S_OK)
- ha->hdr[k].rw_attribs = (ushort)info;
- GDTH_UNLOCK_HA(ha, flags);
- }
- break;
-
- case GDTIOCTL_RESET_DRV:
- if (!gdth_ioctl_alloc( hanum, sizeof(gdth_iord_str), TRUE, &paddr ))
- return(-EBUSY);
- piord = (gdth_iord_str *)ha->pscratch;
- piord->size = sizeof(gdth_iord_str);
- piord->status = S_OK;
- i = piowr->iu.scsi.target;
- if (ha->hdr[i].present) {
- gdtcmd.Service = CACHESERVICE;
- gdtcmd.OpCode = GDT_CLUST_RESET;
- gdtcmd.u.cache.DeviceNo = i;
-#if LINUX_VERSION_CODE >= 0x020503
- gdth_do_req(scp, &gdtcmd, cmnd, 30);
- piord->status = (ushort)scp->sr_command->SCp.Status;
-#elif LINUX_VERSION_CODE >= 0x020322
- gdth_do_cmd(scp, &gdtcmd, cmnd, 30);
- piord->status = (scp->SCp.Message<<16)|scp->SCp.Status;
-#else
- gdth_do_cmd(&scp, &gdtcmd, cmnd, 30);
- piord->status = (scp.SCp.Message<<16)|scp.SCp.Status;
-#endif
- }
- break;
-
- default:
- return(-EINVAL);
- }
- return length;
-}
-#endif
-
-static int gdth_get_info(char *buffer,char **start,off_t offset,
- int length,int hanum,int busnum)