summaryrefslogtreecommitdiff
path: root/drivers/scsi/arm
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/arm')
-rw-r--r--drivers/scsi/arm/cumana_1.c10
-rw-r--r--drivers/scsi/arm/oak.c4
2 files changed, 10 insertions, 4 deletions
diff --git a/drivers/scsi/arm/cumana_1.c b/drivers/scsi/arm/cumana_1.c
index 7bcb66893059..402d984aa088 100644
--- a/drivers/scsi/arm/cumana_1.c
+++ b/drivers/scsi/arm/cumana_1.c
@@ -101,7 +101,10 @@ static inline int cumanascsi_pwrite(struct Scsi_Host *host,
}
end:
writeb(priv(host)->ctrl | 0x40, priv(host)->base + CTRL);
- return len;
+
+ if (len)
+ return -1;
+ return 0;
}
static inline int cumanascsi_pread(struct Scsi_Host *host,
@@ -163,7 +166,10 @@ static inline int cumanascsi_pread(struct Scsi_Host *host,
}
end:
writeb(priv(host)->ctrl | 0x40, priv(host)->base + CTRL);
- return len;
+
+ if (len)
+ return -1;
+ return 0;
}
static unsigned char cumanascsi_read(struct Scsi_Host *host, unsigned int reg)
diff --git a/drivers/scsi/arm/oak.c b/drivers/scsi/arm/oak.c
index 5d6e0e590638..05cf874fc739 100644
--- a/drivers/scsi/arm/oak.c
+++ b/drivers/scsi/arm/oak.c
@@ -47,13 +47,13 @@ static inline int oakscsi_pwrite(struct Scsi_Host *instance,
void __iomem *base = priv(instance)->base;
printk("writing %p len %d\n",addr, len);
- if(!len) return -1;
while(1)
{
int status;
while (((status = readw(base + STAT)) & 0x100)==0);
}
+ return 0;
}
static inline int oakscsi_pread(struct Scsi_Host *instance,
@@ -74,7 +74,7 @@ printk("reading %p len %d\n", addr, len);
if(status & 0x200 || !timeout)
{
printk("status = %08X\n", status);
- return 1;
+ return -1;
}
}