Don't use INTR when only one device supports it.

Submitted by:	Satoh Junichi <junichi@astec.co.jp>
This commit is contained in:
Mike Smith 1998-04-13 17:45:56 +00:00
parent add212bf7e
commit a470e6686d
3 changed files with 12 additions and 1 deletions

View File

@ -219,12 +219,21 @@ int atapi_attach (int ctlr, int unit, int port)
switch (ap->drqtype) {
case AT_DRQT_MPROC: ata->slow = 1; break;
case AT_DRQT_INTR: printf (", intr"); ata->intrcmd = 1; break;
case AT_DRQT_ACCEL: printf (", accel"); break;
case AT_DRQT_ACCEL: printf (", accel"); ata->accel = 1; break;
default: printf (", drq%d", ap->drqtype);
}
if (ata->slow)
ata->intrcmd = 0;
/*
* If we have two devices, one supporting INTR and one ACCEL, we
* have to pessimise - clear INTR and set slow.
*/
if (ata->accel && ata->intrcmd) {
ata->intrcmd = 0;
ata->slow = 1;
}
/* overlap operation supported */
if (ap->ovlapflag)
printf (", ovlap");

View File

@ -245,6 +245,7 @@ struct atapi { /* ATAPI controller data */
u_char cmd16 : 1; /* 16-byte command flag */
u_char intrcmd : 1; /* interrupt before cmd flag */
u_char slow : 1; /* slow reaction device */
u_char accel : 1; /* accelerated reaction device */
u_char use_dsc : 1; /* use DSC completition handeling */
u_char wait_for_dsc : 1;
u_int dsc_timeout;

View File

@ -245,6 +245,7 @@ struct atapi { /* ATAPI controller data */
u_char cmd16 : 1; /* 16-byte command flag */
u_char intrcmd : 1; /* interrupt before cmd flag */
u_char slow : 1; /* slow reaction device */
u_char accel : 1; /* accelerated reaction device */
u_char use_dsc : 1; /* use DSC completition handeling */
u_char wait_for_dsc : 1;
u_int dsc_timeout;