Change the SCSI select timeout from 2ms to 250ms as kernel spc(4) driver does.

Noticed by miod@openbsd.
This commit is contained in:
tsutsui 2014-01-02 17:43:32 +00:00
parent f2050dfc52
commit 273c5b9bba
2 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: scsi.c,v 1.10 2011/02/08 20:20:14 rmind Exp $ */
/* $NetBSD: scsi.c,v 1.11 2014/01/02 17:43:32 tsutsui Exp $ */
/*
* This is reported to fix some odd failures when disklabeling
@ -181,10 +181,10 @@ issue_select(volatile struct scsidevice *hd, uint8_t target, uint8_t our_addr)
hd->scsi_pctl = 0;
hd->scsi_temp = (1 << target) | our_addr;
/* select timeout is hardcoded to 2ms */
hd->scsi_tch = 0;
hd->scsi_tcm = 32;
hd->scsi_tcl = 4;
/* select timeout is hardcoded to 250ms */
hd->scsi_tch = 2;
hd->scsi_tcm = 113;
hd->scsi_tcl = 3;
hd->scsi_scmd = SCMD_SELECT;
return 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sc.c,v 1.4 2013/01/22 15:48:40 tsutsui Exp $ */
/* $NetBSD: sc.c,v 1.5 2014/01/02 17:47:23 tsutsui Exp $ */
/*
* Copyright (c) 1992 OMRON Corporation.
@ -191,10 +191,10 @@ issue_select(struct scsidevice *hd, u_char target)
hd->scsi_pctl = 0;
hd->scsi_temp = (1 << SCSI_ID) | (1 << target);
/* select timeout is hardcoded to 2ms */
hd->scsi_tch = 0;
hd->scsi_tcm = 32;
hd->scsi_tcl = 4;
/* select timeout is hardcoded to 250ms */
hd->scsi_tch = 2;
hd->scsi_tcm = 113;
hd->scsi_tcl = 3;
hd->scsi_scmd = SCMD_SELECT;