aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-04-19 10:13:45 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-07-03 09:25:56 -0400
commit324b9337f246e5f00aad10220d8d4bc13f1922ed (patch)
tree20611de47c59b158533d438297ec0e93bf0a166a /drivers
parentd8f8eb43e9d6d5789f37c8a80db99af894944d41 (diff)
[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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/arm/Kconfig2
-rw-r--r--drivers/scsi/arm/acornscsi-io.S6
-rw-r--r--drivers/scsi/arm/acornscsi.c38
3 files changed, 16 insertions, 30 deletions
diff --git a/drivers/scsi/arm/Kconfig b/drivers/scsi/arm/Kconfig
index 7236143941f3..a8587f1f5e7e 100644
--- a/drivers/scsi/arm/Kconfig
+++ b/drivers/scsi/arm/Kconfig
@@ -3,7 +3,7 @@
3# 3#
4config SCSI_ACORNSCSI_3 4config SCSI_ACORNSCSI_3
5 tristate "Acorn SCSI card (aka30) support" 5 tristate "Acorn SCSI card (aka30) support"
6 depends on ARCH_ACORN && SCSI && BROKEN 6 depends on ARCH_ACORN && SCSI
7 select SCSI_SPI_ATTRS 7 select SCSI_SPI_ATTRS
8 help 8 help
9 This enables support for the Acorn SCSI card (aka30). If you have an 9 This enables support for the Acorn SCSI card (aka30). If you have an
diff --git a/drivers/scsi/arm/acornscsi-io.S b/drivers/scsi/arm/acornscsi-io.S
index 3c5d4f8485dc..5cebe3105260 100644
--- a/drivers/scsi/arm/acornscsi-io.S
+++ b/drivers/scsi/arm/acornscsi-io.S
@@ -10,6 +10,12 @@
10#include <asm/assembler.h> 10#include <asm/assembler.h>
11#include <asm/hardware.h> 11#include <asm/hardware.h>
12 12
13#if defined(__APCS_32__)
14#define LOADREGS(t,r,l...) ldm##t r, l
15#elif defined(__APCS_26__)
16#define LOADREGS(t,r,l...) ldm##t r, l##^
17#endif
18
13@ Purpose: transfer a block of data from the acorn scsi card to memory 19@ Purpose: transfer a block of data from the acorn scsi card to memory
14@ Proto : void acornscsi_in(unsigned int addr_start, char *buffer, int length) 20@ Proto : void acornscsi_in(unsigned int addr_start, char *buffer, int length)
15@ Returns: nothing 21@ Returns: nothing
diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornscsi.c
index 8e53f02cc311..fa58d02ad0b8 100644
--- a/drivers/scsi/arm/acornscsi.c
+++ b/drivers/scsi/arm/acornscsi.c
@@ -2731,9 +2731,7 @@ int acornscsi_abort(struct scsi_cmnd *SCpnt)
2731//#if (DEBUG & DEBUG_ABORT) 2731//#if (DEBUG & DEBUG_ABORT)
2732 printk("success\n"); 2732 printk("success\n");
2733//#endif 2733//#endif
2734 SCpnt->result = DID_ABORT << 16; 2734 result = SUCCESS;
2735 SCpnt->scsi_done(SCpnt);
2736 result = SCSI_ABORT_SUCCESS;
2737 break; 2735 break;
2738 2736
2739 /* 2737 /*
@@ -2745,7 +2743,7 @@ int acornscsi_abort(struct scsi_cmnd *SCpnt)
2745//#if (DEBUG & DEBUG_ABORT) 2743//#if (DEBUG & DEBUG_ABORT)
2746 printk("snooze\n"); 2744 printk("snooze\n");
2747//#endif 2745//#endif
2748 result = SCSI_ABORT_SNOOZE; 2746 result = FAILED;
2749 break; 2747 break;
2750 2748
2751 /* 2749 /*
@@ -2755,11 +2753,7 @@ int acornscsi_abort(struct scsi_cmnd *SCpnt)
2755 default: 2753 default:
2756 case res_not_running: 2754 case res_not_running:
2757 acornscsi_dumplog(host, SCpnt->device->id); 2755 acornscsi_dumplog(host, SCpnt->device->id);
2758#if (DEBUG & DEBUG_ABORT) 2756 result = FAILED;
2759 result = SCSI_ABORT_SNOOZE;
2760#else
2761 result = SCSI_ABORT_NOT_RUNNING;
2762#endif
2763//#if (DEBUG & DEBUG_ABORT) 2757//#if (DEBUG & DEBUG_ABORT)
2764 printk("not running\n"); 2758 printk("not running\n");
2765//#endif 2759//#endif
@@ -2770,13 +2764,12 @@ int acornscsi_abort(struct scsi_cmnd *SCpnt)
2770} 2764}
2771 2765
2772/* 2766/*
2773 * Prototype: int acornscsi_reset(struct scsi_cmnd *SCpnt, unsigned int reset_flags) 2767 * Prototype: int acornscsi_reset(struct scsi_cmnd *SCpnt)
2774 * Purpose : reset a command on this host/reset this host 2768 * Purpose : reset a command on this host/reset this host
2775 * Params : SCpnt - command causing reset 2769 * Params : SCpnt - command causing reset
2776 * result - what type of reset to perform
2777 * Returns : one of SCSI_RESET_ macros 2770 * Returns : one of SCSI_RESET_ macros
2778 */ 2771 */
2779int acornscsi_reset(struct scsi_cmnd *SCpnt, unsigned int reset_flags) 2772int acornscsi_bus_reset(struct scsi_cmnd *SCpnt)
2780{ 2773{
2781 AS_Host *host = (AS_Host *)SCpnt->device->host->hostdata; 2774 AS_Host *host = (AS_Host *)SCpnt->device->host->hostdata;
2782 struct scsi_cmnd *SCptr; 2775 struct scsi_cmnd *SCptr;
@@ -2798,28 +2791,16 @@ int acornscsi_reset(struct scsi_cmnd *SCpnt, unsigned int reset_flags)
2798 2791
2799 acornscsi_dma_stop(host); 2792 acornscsi_dma_stop(host);
2800 2793
2801 SCptr = host->SCpnt;
2802
2803 /* 2794 /*
2804 * do hard reset. This resets all devices on this host, and so we 2795 * do hard reset. This resets all devices on this host, and so we
2805 * must set the reset status on all commands. 2796 * must set the reset status on all commands.
2806 */ 2797 */
2807 acornscsi_resetcard(host); 2798 acornscsi_resetcard(host);
2808 2799
2809 /*
2810 * report reset on commands current connected/disconnected
2811 */
2812 acornscsi_reportstatus(&host->SCpnt, &SCptr, DID_RESET);
2813
2814 while ((SCptr = queue_remove(&host->queues.disconnected)) != NULL) 2800 while ((SCptr = queue_remove(&host->queues.disconnected)) != NULL)
2815 acornscsi_reportstatus(&SCptr, &SCpnt, DID_RESET); 2801 ;
2816
2817 if (SCpnt) {
2818 SCpnt->result = DID_RESET << 16;
2819 SCpnt->scsi_done(SCpnt);
2820 }
2821 2802
2822 return SCSI_RESET_BUS_RESET | SCSI_RESET_HOST_RESET | SCSI_RESET_SUCCESS; 2803 return SUCCESS;
2823} 2804}
2824 2805
2825/*============================================================================================== 2806/*==============================================================================================
@@ -2976,9 +2957,8 @@ static struct scsi_host_template acornscsi_template = {
2976 .name = "AcornSCSI", 2957 .name = "AcornSCSI",
2977 .info = acornscsi_info, 2958 .info = acornscsi_info,
2978 .queuecommand = acornscsi_queuecmd, 2959 .queuecommand = acornscsi_queuecmd,
2979#warning fixme 2960 .eh_abort_handler = acornscsi_abort,
2980 .abort = acornscsi_abort, 2961 .eh_bus_reset_handler = acornscsi_bus_reset,
2981 .reset = acornscsi_reset,
2982 .can_queue = 16, 2962 .can_queue = 16,
2983 .this_id = 7, 2963 .this_id = 7,
2984 .sg_tablesize = SG_ALL, 2964 .sg_tablesize = SG_ALL,