diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/isp/isp.c | 5 | ||||
-rw-r--r-- | sys/dev/isp/isp_freebsd.c | 27 | ||||
-rw-r--r-- | sys/dev/isp/isp_library.c | 2 | ||||
-rw-r--r-- | sys/dev/isp/isp_target.c | 2 |
4 files changed, 16 insertions, 20 deletions
diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index 8d28afc..8fcb134 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -3515,7 +3515,10 @@ isp_control(ispsoftc_t *isp, ispctl_t ctl, void *arg) case ISPCTL_FCLINK_TEST: if (IS_FC(isp)) { - int usdelay = (arg)? *((int *) arg) : 250000; + int usdelay = *((int *) arg); + if (usdelay == 0) { + usdelay = 250000; + } return (isp_fclink_test(isp, usdelay)); } break; diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c index f95b77d..de898d9 100644 --- a/sys/dev/isp/isp_freebsd.c +++ b/sys/dev/isp/isp_freebsd.c @@ -1531,9 +1531,16 @@ isp_handle_platform_atio(ispsoftc_t *isp, at_entry_t *aep) if (tptr == NULL) { tptr = get_lun_statep(isp, bus, CAM_LUN_WILDCARD); if (tptr == NULL) { - isp_endcmd(isp, aep, - SCSI_STATUS_CHECK_COND | ECMD_SVALID | - (0x5 << 12) | (0x25 << 16), 0); + /* + * Because we can't autofeed sense data back with + * a command for parallel SCSI, we can't give back + * a CHECK CONDITION. We'll give back a BUSY status + * instead. This works out okay because the only + * time we should, in fact, get this, is in the + * case that somebody configured us without the + * blackhole driver, so they get what they deserve. + */ + isp_endcmd(isp, aep, SCSI_STATUS_BUSY, 0); return (0); } iswildcard = 1; @@ -1541,20 +1548,6 @@ isp_handle_platform_atio(ispsoftc_t *isp, at_entry_t *aep) iswildcard = 0; } - if (tptr == NULL) { - /* - * Because we can't autofeed sense data back with - * a command for parallel SCSI, we can't give back - * a CHECK CONDITION. We'll give back a BUSY status - * instead. This works out okay because the only - * time we should, in fact, get this, is in the - * case that somebody configured us without the - * blackhole driver, so they get what they deserve. - */ - isp_endcmd(isp, aep, SCSI_STATUS_BUSY, 0); - return (0); - } - atiop = (struct ccb_accept_tio *) SLIST_FIRST(&tptr->atios); if (atiop == NULL) { /* diff --git a/sys/dev/isp/isp_library.c b/sys/dev/isp/isp_library.c index 39f776a..caabc84 100644 --- a/sys/dev/isp/isp_library.c +++ b/sys/dev/isp/isp_library.c @@ -203,7 +203,7 @@ isp_fc_runstate(ispsoftc_t *isp, int tval) if (IS_SCSI(isp)) return (0); - tptr = tval? &tval : NULL; + tptr = &tval; if (isp_control(isp, ISPCTL_FCLINK_TEST, tptr) != 0) { return (-1); } diff --git a/sys/dev/isp/isp_target.c b/sys/dev/isp/isp_target.c index 4ddcc92..f3a6976 100644 --- a/sys/dev/isp/isp_target.c +++ b/sys/dev/isp/isp_target.c @@ -229,7 +229,7 @@ isp_target_notify(ispsoftc_t *isp, void *vptr, uint16_t *optrp) isp_notify_ack(isp, local); break; case IN_RESET: - isp_target_async(isp, 0, ASYNC_BUS_RESET); + (void) isp_target_async(isp, 0, ASYNC_BUS_RESET); break; case IN_PORT_LOGOUT: case IN_ABORT_TASK: |