summaryrefslogtreecommitdiff
path: root/sys/arch/mac68k
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2010-03-23 01:57:21 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2010-03-23 01:57:21 +0000
commitcd948c1fd3a45bb8ee18483b4f8df6ce849f8140 (patch)
tree2748525ad92550d0ad2b46b5619c24e5bcda0e13 /sys/arch/mac68k
parente88d321d148e115dbbf6fea61f7c0dcb67021421 (diff)
Change the scsi_cmd function member of scsi_adapter from int to
void. Use XS_NO_CCB error in the scsi command (xs) to report the NO_CCB condition. Eliminates all SUCCESSFULLY_QUEUED and COMPLETE confusion and untangles the midlayer from the adapter a bit more. Eyes and some fixes by miod@ There may be some compile issues on little used (i.e. I don't have any) drivers but the change is mechanical and thus easy to remedy. ok dlg@
Diffstat (limited to 'sys/arch/mac68k')
-rw-r--r--sys/arch/mac68k/dev/ncr5380.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/arch/mac68k/dev/ncr5380.c b/sys/arch/mac68k/dev/ncr5380.c
index 9324557d98b..201cab11ff6 100644
--- a/sys/arch/mac68k/dev/ncr5380.c
+++ b/sys/arch/mac68k/dev/ncr5380.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr5380.c,v 1.37 2010/01/13 06:09:44 krw Exp $ */
+/* $OpenBSD: ncr5380.c,v 1.38 2010/03/23 01:57:19 krw Exp $ */
/* $NetBSD: ncr5380.c,v 1.38 1996/12/19 21:48:18 scottr Exp $ */
/*
@@ -74,7 +74,7 @@ static volatile int main_running = 0;
static u_char busy;
static void ncr5380_minphys(struct buf *bp, struct scsi_link *sl);
-static int mac68k_ncr5380_scsi_cmd(struct scsi_xfer *xs);
+static void mac68k_ncr5380_scsi_cmd(struct scsi_xfer *xs);
static void ncr5380_show_scsi_cmd(struct scsi_xfer *xs);
struct scsi_adapter ncr5380_switch = {
@@ -287,7 +287,7 @@ void *auxp;
/*
* Carry out a request from the high level driver.
*/
-static int
+static void
mac68k_ncr5380_scsi_cmd(struct scsi_xfer *xs)
{
int sps;
@@ -300,7 +300,7 @@ mac68k_ncr5380_scsi_cmd(struct scsi_xfer *xs)
if (flags & SCSI_RESET) {
scsi_reset_verbose(xs->sc_link->adapter_softc,
"Got reset-command");
- return (COMPLETE);
+ return;
}
/*
@@ -308,8 +308,10 @@ mac68k_ncr5380_scsi_cmd(struct scsi_xfer *xs)
*/
sps = splbio();
if ((reqp = free_head) == 0) {
+ xs->error = XS_NO_CCB;
+ scsi_done(xs);
splx(sps);
- return (NO_CCB);
+ return;
}
free_head = reqp->next;
reqp->next = NULL;
@@ -380,10 +382,6 @@ mac68k_ncr5380_scsi_cmd(struct scsi_xfer *xs)
#endif
run_main(xs->sc_link->adapter_softc);
-
- if (xs->flags & (SCSI_POLL|ITSDONE))
- return (COMPLETE); /* We're booting or run_main has completed */
- return (SUCCESSFULLY_QUEUED);
}
static void