[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
kernel/1017: Kernel will not recognize HP 7100i SureStore CD-WRITER
>Number: 1017
>Category: kernel
>Synopsis: Kernel will not recognize HP 7100i SureStore CD-WRITER
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bugs
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Dec 20 17:00:01 MST 1999
>Last-Modified:
>Originator: Mari Donkers
>Organization:
net
>Release: OpenBSD 2.6
>Environment:
System : OpenBSD 2.6
Architecture: OpenBSD.i386
Machine : i386
>Description:
My (ide) HP 7100i SureStore CD-WRITER is not recognized at
system boot. My Toshiba CD-ROM drive is recognized correctly.
With an older RedHat version I also had this problem but it got
solved. The newer RedHat version has code that retries an
operation when initialising the CD-WRITER at boot time. In the
listing below the code that I think is responsible for recognizing
my HP7100i CD-WRITER is around the 'no response ... resetting drive'
comment (this is the text that RedHat prints to my screen when it
recognizes my CD-WRITER).
The RedHat 'probe' code is taken from ide-probe.c and is listed
below:
/*
* do_probe() has the difficult job of finding a drive if it exists,
* without getting hung up if it doesn't exist, without trampling on
* ethernet cards, and without leaving any IRQs dangling to haunt us
later.
*
* If a drive is "known" to exist (from CMOS or kernel parameters),
* but does not respond right away, the probe will "hang in there"
* for the maximum wait time (about 30 seconds), otherwise it will
* exit much more quickly.
*
* Returns: 0 device was identified
* 1 device timed-out (no response to identify request)
* 2 device aborted the command (refused to identify
itself)
* 3 bad status from device (possible for ATAPI drives)
* 4 probe was not attempted because failure was obvious
*/
static int do_probe (ide_drive_t *drive, byte cmd)
{
int rc;
ide_hwif_t *hwif = HWIF(drive);
if (drive->present) { /* avoid waiting for inappropriate
probes */
if ((drive->media != ide_disk) && (cmd ==
WIN_IDENTIFY))
return 4;
}
#ifdef DEBUG
printk("probing for %s: present=%d, media=%d, probetype=%s\n",
drive->name, drive->present, drive->media,
(cmd == WIN_IDENTIFY) ? "ATA" : "ATAPI");
#endif
SELECT_DRIVE(hwif,drive);
delay_50ms();
if (IN_BYTE(IDE_SELECT_REG) != drive->select.all &&
!drive->present) {
if (drive->select.b.unit != 0) {
SELECT_DRIVE(hwif,&hwif->drives[0]); /* exit
with drive0 selected */
delay_50ms(); /* allow BUSY_STAT to
assert & clear */
}
return 3; /* no i/f present: mmm.. this should be a
4 -ml */
}
if (OK_STAT(GET_STAT(),READY_STAT,BUSY_STAT)
|| drive->present || cmd == WIN_PIDENTIFY)
{
if ((rc = try_to_identify(drive,cmd))) /* send cmd
and wait */
rc = try_to_identify(drive,cmd); /* failed: try
again */
if (rc == 1 && cmd == WIN_PIDENTIFY && drive->autotune
!= 2) {
unsigned long timeout;
printk("%s: no response (status = 0x%02x),
resetting drive\n", drive->name, GET_STAT());
delay_50ms();
OUT_BYTE (drive->select.all, IDE_SELECT_REG);
delay_50ms();
OUT_BYTE(WIN_SRST, IDE_COMMAND_REG);
timeout = jiffies;
while ((GET_STAT() & BUSY_STAT) &&
time_before(jiffies, timeout + WAIT_WORSTCASE))
delay_50ms();
rc = try_to_identify(drive, cmd);
}
if (rc == 1)
printk("%s: no response (status = 0x%02x)\n",
drive->name, GET_STAT());
(void) GET_STAT(); /* ensure drive irq is
clear */
} else {
rc = 3; /* not present or maybe
ATAPI */
}
if (drive->select.b.unit != 0) {
SELECT_DRIVE(hwif,&hwif->drives[0]); /* exit with
drive0 selected */
delay_50ms();
(void) GET_STAT(); /* ensure drive irq is
clear */
}
return rc;
}
>How-To-Repeat:
Boot the system, observe that HP7100i SureStore is not recognized.
>Fix:
unknown.
>Audit-Trail:
>Unformatted: