Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jun 2002 12:00:06 -0700 (PDT)
From:      "Jin Guojun[DSD]" <j_guojun@lbl.gov>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/39449: wierd ata status
Message-ID:  <200206201900.g5KJ06i46419@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/39449; it has been noted by GNATS.

From: "Jin Guojun[DSD]" <j_guojun@lbl.gov>
To: cjclark@alum.mit.edu
Cc: bug-followup@freebsd.org
Subject: Re: kern/39449: wierd ata status
Date: Thu, 20 Jun 2002 11:59:59 -0700

 "Crist J. Clark" wrote:
 > 
 > On Wed, Jun 19, 2002 at 05:40:42PM -0700, Jin Guojun[DSD] wrote:
 > [snip]
 > 
 > > Attached again "x". Look at the #3, which had exact things configured as #2
 > > except the secondary IDE is disabled in BIOS. Yes, it probably looks
 > > very similar as the #4, which had disk drive unpluged. Search and read
 > > the title line start with
 > 
 > Huh. Well that is really strange. I am not sure at all what is going
 > on with that, how you can disable a PCI device in the BIOS. Maybe
 > Soren could tell you.
 
 Because you did not look at the status report closely and made some
 assumption based on a sort of guessing.
 IDE can be disabled in BIOS is not new. It is in history.
 
 ata_probe(device_t dev) in /sys/dev/ata/ata-all.c clearly knows how 
 to distinguish these cases:
 
 ata1: iobase=0x0170 altiobase=0x0376 bmaddr=0xd808
 ata1: mask=00 status0=a5 status1=a5
 ata1: probe allocation failed
 
 status 0xa5 shows no device is attached.
 
 
 ata1: iobase=0x0170 altiobase=0x0376 bmaddr=0xd808
 ata1: mask=00 status0=ff status1=ff
 ata1: probe allocation failed
 
 status 0xFF shows the controller is disabled.
 
 I think to add a BIOS status checking is reasonable and valuable.
 (see the diff below)
 I would like to know what is the developer's thought. If this feature
 will be permanently removed, then I will do it on my own.
  
 >> 4.6 removed status checking and changed ata_reset() to ignore the
 further checking:
     if (bootverbose)
         ata_printf(ch, -1, "iobase=0x%04x altiobase=0x%04x bmaddr=0x%04x\n",
                    (int)rman_get_start(ch->r_io),
                    (int)rman_get_start(ch->r_altio),
                    (ch->r_bmio) ? (int)rman_get_start(ch->r_bmio) : 0);
 
     ata_reset(ch);
 
 << this is the same place 4.5 does:
     if (bootverbose)
         ata_printf(scp, -1, "iobase=0x%04x altiobase=0x%04x bmaddr=0x%04x\n",
                    scp->ioaddr, scp->altioaddr, scp->bmaddr);
 
     /* do we have any signs of ATA/ATAPI HW being present ? */
     outb(scp->ioaddr + ATA_DRIVE, ATA_D_IBM | ATA_MASTER);
     DELAY(1);
     status0 = inb(scp->ioaddr + ATA_STATUS);
     outb(scp->ioaddr + ATA_DRIVE, ATA_D_IBM | ATA_SLAVE);
     DELAY(1);
     status1 = inb(scp->ioaddr + ATA_STATUS);
     if ((status0 & 0xf8) != 0xf8 && status0 != 0xa5)
         mask |= 0x01;
     if ((status1 & 0xf8) != 0xf8 && status1 != 0xa5)
         mask |= 0x02;
     if (bootverbose)
         ata_printf(scp, -1, "mask=%02x status0=%02x status1=%02x\n",
                    mask, status0, status1);
     if (!mask)
         goto failure;
 
     ata_reset(scp, &mask);
 
     if (!mask)
         goto failure;
 
 > --
 > Crist J. Clark                     |     cjclark@alum.mit.edu
 >                                    |     cjclark@jhu.edu
 > http://people.freebsd.org/~cjc/    |     cjc@freebsd.org
 
 -- 
 ------------ Jin Guojun ----------- v --- j_guojun@lbl.gov ---
 Distributed Systems Department		http://www.itg.lbl.gov/~jin
 M/S 50B-2239				Ph#:(510) 486-7531 Fax: 486-6363
 Lawrence Berkeley National Laboratory,	Berkeley, CA 94720

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206201900.g5KJ06i46419>