forked from Minki/linux
[ARM] rpc: acornscsi: fixup abort/reset methods, fix build errors
Revive the AcornSCSI driver, update it for the replacement command abort and host reset methods, and fix the build errors in acornscsi-io.S. Acked-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
d8f8eb43e9
commit
324b9337f2
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
config SCSI_ACORNSCSI_3
|
config SCSI_ACORNSCSI_3
|
||||||
tristate "Acorn SCSI card (aka30) support"
|
tristate "Acorn SCSI card (aka30) support"
|
||||||
depends on ARCH_ACORN && SCSI && BROKEN
|
depends on ARCH_ACORN && SCSI
|
||||||
select SCSI_SPI_ATTRS
|
select SCSI_SPI_ATTRS
|
||||||
help
|
help
|
||||||
This enables support for the Acorn SCSI card (aka30). If you have an
|
This enables support for the Acorn SCSI card (aka30). If you have an
|
||||||
|
@ -10,6 +10,12 @@
|
|||||||
#include <asm/assembler.h>
|
#include <asm/assembler.h>
|
||||||
#include <asm/hardware.h>
|
#include <asm/hardware.h>
|
||||||
|
|
||||||
|
#if defined(__APCS_32__)
|
||||||
|
#define LOADREGS(t,r,l...) ldm##t r, l
|
||||||
|
#elif defined(__APCS_26__)
|
||||||
|
#define LOADREGS(t,r,l...) ldm##t r, l##^
|
||||||
|
#endif
|
||||||
|
|
||||||
@ Purpose: transfer a block of data from the acorn scsi card to memory
|
@ Purpose: transfer a block of data from the acorn scsi card to memory
|
||||||
@ Proto : void acornscsi_in(unsigned int addr_start, char *buffer, int length)
|
@ Proto : void acornscsi_in(unsigned int addr_start, char *buffer, int length)
|
||||||
@ Returns: nothing
|
@ Returns: nothing
|
||||||
|
@ -2731,9 +2731,7 @@ int acornscsi_abort(struct scsi_cmnd *SCpnt)
|
|||||||
//#if (DEBUG & DEBUG_ABORT)
|
//#if (DEBUG & DEBUG_ABORT)
|
||||||
printk("success\n");
|
printk("success\n");
|
||||||
//#endif
|
//#endif
|
||||||
SCpnt->result = DID_ABORT << 16;
|
result = SUCCESS;
|
||||||
SCpnt->scsi_done(SCpnt);
|
|
||||||
result = SCSI_ABORT_SUCCESS;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2745,7 +2743,7 @@ int acornscsi_abort(struct scsi_cmnd *SCpnt)
|
|||||||
//#if (DEBUG & DEBUG_ABORT)
|
//#if (DEBUG & DEBUG_ABORT)
|
||||||
printk("snooze\n");
|
printk("snooze\n");
|
||||||
//#endif
|
//#endif
|
||||||
result = SCSI_ABORT_SNOOZE;
|
result = FAILED;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2755,11 +2753,7 @@ int acornscsi_abort(struct scsi_cmnd *SCpnt)
|
|||||||
default:
|
default:
|
||||||
case res_not_running:
|
case res_not_running:
|
||||||
acornscsi_dumplog(host, SCpnt->device->id);
|
acornscsi_dumplog(host, SCpnt->device->id);
|
||||||
#if (DEBUG & DEBUG_ABORT)
|
result = FAILED;
|
||||||
result = SCSI_ABORT_SNOOZE;
|
|
||||||
#else
|
|
||||||
result = SCSI_ABORT_NOT_RUNNING;
|
|
||||||
#endif
|
|
||||||
//#if (DEBUG & DEBUG_ABORT)
|
//#if (DEBUG & DEBUG_ABORT)
|
||||||
printk("not running\n");
|
printk("not running\n");
|
||||||
//#endif
|
//#endif
|
||||||
@ -2770,13 +2764,12 @@ int acornscsi_abort(struct scsi_cmnd *SCpnt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prototype: int acornscsi_reset(struct scsi_cmnd *SCpnt, unsigned int reset_flags)
|
* Prototype: int acornscsi_reset(struct scsi_cmnd *SCpnt)
|
||||||
* Purpose : reset a command on this host/reset this host
|
* Purpose : reset a command on this host/reset this host
|
||||||
* Params : SCpnt - command causing reset
|
* Params : SCpnt - command causing reset
|
||||||
* result - what type of reset to perform
|
|
||||||
* Returns : one of SCSI_RESET_ macros
|
* Returns : one of SCSI_RESET_ macros
|
||||||
*/
|
*/
|
||||||
int acornscsi_reset(struct scsi_cmnd *SCpnt, unsigned int reset_flags)
|
int acornscsi_bus_reset(struct scsi_cmnd *SCpnt)
|
||||||
{
|
{
|
||||||
AS_Host *host = (AS_Host *)SCpnt->device->host->hostdata;
|
AS_Host *host = (AS_Host *)SCpnt->device->host->hostdata;
|
||||||
struct scsi_cmnd *SCptr;
|
struct scsi_cmnd *SCptr;
|
||||||
@ -2798,28 +2791,16 @@ int acornscsi_reset(struct scsi_cmnd *SCpnt, unsigned int reset_flags)
|
|||||||
|
|
||||||
acornscsi_dma_stop(host);
|
acornscsi_dma_stop(host);
|
||||||
|
|
||||||
SCptr = host->SCpnt;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* do hard reset. This resets all devices on this host, and so we
|
* do hard reset. This resets all devices on this host, and so we
|
||||||
* must set the reset status on all commands.
|
* must set the reset status on all commands.
|
||||||
*/
|
*/
|
||||||
acornscsi_resetcard(host);
|
acornscsi_resetcard(host);
|
||||||
|
|
||||||
/*
|
|
||||||
* report reset on commands current connected/disconnected
|
|
||||||
*/
|
|
||||||
acornscsi_reportstatus(&host->SCpnt, &SCptr, DID_RESET);
|
|
||||||
|
|
||||||
while ((SCptr = queue_remove(&host->queues.disconnected)) != NULL)
|
while ((SCptr = queue_remove(&host->queues.disconnected)) != NULL)
|
||||||
acornscsi_reportstatus(&SCptr, &SCpnt, DID_RESET);
|
;
|
||||||
|
|
||||||
if (SCpnt) {
|
return SUCCESS;
|
||||||
SCpnt->result = DID_RESET << 16;
|
|
||||||
SCpnt->scsi_done(SCpnt);
|
|
||||||
}
|
|
||||||
|
|
||||||
return SCSI_RESET_BUS_RESET | SCSI_RESET_HOST_RESET | SCSI_RESET_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*==============================================================================================
|
/*==============================================================================================
|
||||||
@ -2976,9 +2957,8 @@ static struct scsi_host_template acornscsi_template = {
|
|||||||
.name = "AcornSCSI",
|
.name = "AcornSCSI",
|
||||||
.info = acornscsi_info,
|
.info = acornscsi_info,
|
||||||
.queuecommand = acornscsi_queuecmd,
|
.queuecommand = acornscsi_queuecmd,
|
||||||
#warning fixme
|
.eh_abort_handler = acornscsi_abort,
|
||||||
.abort = acornscsi_abort,
|
.eh_bus_reset_handler = acornscsi_bus_reset,
|
||||||
.reset = acornscsi_reset,
|
|
||||||
.can_queue = 16,
|
.can_queue = 16,
|
||||||
.this_id = 7,
|
.this_id = 7,
|
||||||
.sg_tablesize = SG_ALL,
|
.sg_tablesize = SG_ALL,
|
||||||
|
Loading…
Reference in New Issue
Block a user