Print the error code in the "not queued" message, to make debugging
a bit easier, and make sure a newline gets printed.
This commit is contained in:
parent
adfd5ba766
commit
1379322cde
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sd.c,v 1.98 1996/05/05 19:52:53 christos Exp $ */
|
||||
/* $NetBSD: sd.c,v 1.99 1996/05/14 00:10:37 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
|
@ -501,7 +501,7 @@ sdstart(v)
|
|||
struct scsi_rw_big cmd_big;
|
||||
struct scsi_rw cmd_small;
|
||||
struct scsi_generic *cmdp;
|
||||
int blkno, nblks, cmdlen;
|
||||
int blkno, nblks, cmdlen, error;
|
||||
struct partition *p;
|
||||
|
||||
SC_DEBUG(sc_link, SDEV_DB2, ("sdstart "));
|
||||
|
@ -590,11 +590,13 @@ sdstart(v)
|
|||
* Call the routine that chats with the adapter.
|
||||
* Note: we cannot sleep as we may be an interrupt
|
||||
*/
|
||||
if (scsi_scsi_cmd(sc_link, cmdp, cmdlen,
|
||||
error = scsi_scsi_cmd(sc_link, cmdp, cmdlen,
|
||||
(u_char *)bp->b_data, bp->b_bcount,
|
||||
SDRETRIES, 10000, bp, SCSI_NOSLEEP |
|
||||
((bp->b_flags & B_READ) ? SCSI_DATA_IN : SCSI_DATA_OUT)))
|
||||
printf("%s: not queued", sd->sc_dev.dv_xname);
|
||||
((bp->b_flags & B_READ) ? SCSI_DATA_IN : SCSI_DATA_OUT));
|
||||
if (error)
|
||||
printf("%s: not queued, error %d\n",
|
||||
sd->sc_dev.dv_xname, error);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sd.c,v 1.98 1996/05/05 19:52:53 christos Exp $ */
|
||||
/* $NetBSD: sd.c,v 1.99 1996/05/14 00:10:37 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
|
@ -501,7 +501,7 @@ sdstart(v)
|
|||
struct scsi_rw_big cmd_big;
|
||||
struct scsi_rw cmd_small;
|
||||
struct scsi_generic *cmdp;
|
||||
int blkno, nblks, cmdlen;
|
||||
int blkno, nblks, cmdlen, error;
|
||||
struct partition *p;
|
||||
|
||||
SC_DEBUG(sc_link, SDEV_DB2, ("sdstart "));
|
||||
|
@ -590,11 +590,13 @@ sdstart(v)
|
|||
* Call the routine that chats with the adapter.
|
||||
* Note: we cannot sleep as we may be an interrupt
|
||||
*/
|
||||
if (scsi_scsi_cmd(sc_link, cmdp, cmdlen,
|
||||
error = scsi_scsi_cmd(sc_link, cmdp, cmdlen,
|
||||
(u_char *)bp->b_data, bp->b_bcount,
|
||||
SDRETRIES, 10000, bp, SCSI_NOSLEEP |
|
||||
((bp->b_flags & B_READ) ? SCSI_DATA_IN : SCSI_DATA_OUT)))
|
||||
printf("%s: not queued", sd->sc_dev.dv_xname);
|
||||
((bp->b_flags & B_READ) ? SCSI_DATA_IN : SCSI_DATA_OUT));
|
||||
if (error)
|
||||
printf("%s: not queued, error %d\n",
|
||||
sd->sc_dev.dv_xname, error);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue