Re: [PATCH #upstream-fixes] libata: assume no device is attached if both IDENTIFYs are aborted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > How did they work anyway?  By specifying geometry manually to the
> > driver?  I think we can do that.  We just need another cute HORKAGE.
> > ATA_HORKAGE_NO_IDENITFY and some massaging around EH to handle it.
> > Heh... That's gonna be a silly but fun project.  :-)
> ..
> 
> Geometry from CMOS, BIOS, partition table, or kernel command line.

Thats the only bit we really need - I've already got the rest of the
support code back to MFM drives sitting in my test tree waiting a finish
and polish. The actual probe code for the initial detect is quite
different anyway - you either rely on BIOS settings or you watch TRKZ and
try to restore to track zero.

The needed fake block is pretty small

        memset(buf, 0, 512);
        id[0] = 0x8000; /* ATA */  
        id[1] = d->cyls;
        id[2] = 0xC837;
        id[3] = d->heads;
        id[6] = d->sectors;
        memset(id + 10, " ", 20);
        /* FIXME: Set some kind of unique serial */
        memcpy(id + 23, "ATAHD001", 8);
        memcpy(id + 27, "ATA HD EMULATION OF MFM/RLL             ", 40);
        id[47] = 0x8000;
        id[49] = 0x30;

In fact if we had the proposed memcpy_to_sg/memcpy_from_sg type
interfaces discussed between Matthew Wilcox and Jeff in the download
microcode thread we could actually intercept IDENTIFY in the MFM driver
and fix it up there (after all we can't issue it to the
MFM/RLL controller).

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux