Don't use INTR when only one device supports it.
Submitted by: Satoh Junichi <junichi@astec.co.jp>
This commit is contained in:
parent
add212bf7e
commit
a470e6686d
@ -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");
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user