diff options
| author | Matt Jacob <mjacob@FreeBSD.org> | 2006-04-21 18:46:35 +0000 |
|---|---|---|
| committer | Matt Jacob <mjacob@FreeBSD.org> | 2006-04-21 18:46:35 +0000 |
| commit | 8c4e89e24907af9676ff4ded36ac750fe8427c79 (patch) | |
| tree | 0485041f09122d7ca22e66c91da5287f2640544b /sys/dev | |
| parent | 54302f8e50251c798d8c18c8f6d1a1c97199b363 (diff) | |
Notes
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 8d28afcf2baa5..8fcb134e57f51 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 f95b77df2e860..de898d9f3194a 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 39f776a82f5bc..caabc84ed5e4a 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 4ddcc9290ac4a..f3a6976dd7be3 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: |
