/* Abort a queued command that has been passed to the firmware layer if possible. This is all handled by the firmware. We aks the firmware and it either aborts the command or fails  */
static int orchid_abort_scb(struct orc_host *host, struct orc_scb *scb)
/* Abort a queued command that has been passed to the firmware layer if possible. This is all handled by the firmware. We aks the firmware and it either aborts the command or fails  */
static int orchid_abort_scb(struct orc_host *host, struct orc_scb *scb)
{
	unsigned char data, status;
	outb(ORC_CMD_ABORT_SCB, host->base + ORC_HDATA);
	outb(HDO, host->base + ORC_HCTRL);
	if (wait_HDO_off(host) == 0)
		return 0;
	outb(scb->scbidx, host->base + ORC_HDATA);
	outb(HDO, host->base + ORC_HCTRL);
	if (wait_HDO_off(host) == 0)
		return 0;
	if (wait_hdi_set(host, &data) == 0)
		return 0;
	status = inb(host->base + ORC_HDATA);
	outb(data, host->base + ORC_HSTUS);
	if (status == 1)
		return 0;
	return 1;
}