Re: ide driver bug fix for the error message "hda: bad special flag 0x03"

From: Andre Hedrick (andre@linux-ide.org)
Date: Wed Jun 26 2002 - 00:50:42 EST


Cool!

Thanks!

On Tue, 25 Jun 2002, Shen, JT wrote:

> diff -Naur linux-2.4.19-10/drivers/ide/ide-probe.c linux-2.4.19-11/drivers/ide/ide-probe.c
> --- linux-2.4.19-10/drivers/ide/ide-probe.c Fri Jun 21 15:14:46 2002
> +++ linux-2.4.19-11/drivers/ide/ide-probe.c Mon Jun 24 15:19:15 2002
> @@ -131,6 +131,7 @@
> type = ide_cdrom; /* Early cdrom models used zero */
> case ide_cdrom:
> drive->removable = 1;
> + drive->special.all = 0;
> #ifdef CONFIG_PPC
> /* kludge for Apple PowerBook internal zip */
> if (!strstr(id->model, "CD-ROM") && strstr(id->model, "ZIP")) {
>
>
>
>
>
>
>
>
> Andre,
>
> Above is the patch that will fix the bug that when a user issue the command:
>
> cat /proc/ide/hda/identify
>
> the message "hda: bad special flag 0x03" gets written to the system log. This will happen because the .config file that RedHat uses to create the kernel image has the flag CONFIG_BLK_DEV_IDECD=m. Thus in ide.c code, it won't call ide_cdrom_reinit(). So for CDROM the special flag is left as 0x03.
>
>
> The solution is to set the special flags to 0 when it is discovered as cdrom in ide-probe.c.
>
> Let me know if you have any question.
>
> Thanks,
>
> JT
>

Andre Hedrick
LAD Storage Consulting Group

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jun 30 2002 - 22:00:10 EST