Re: [PARPORT] Help with large disk
Wed, 3 Feb 1999 17:18:44 -0500 (EST)

> I have a 13.6gig Maxtor IDE hard drive in an H45 (Shuttle EPAT)
> parrallel enclosure.

Boy, that's sick. ;-)

> Linux can only "see" the first 8gigs of the drive. I
> read in the large-disk-HOWTO that this was a problem with the IDE driver but
> it has been fixed in THAT driver but there is no mention of the parport
> driver.

There's no common code between the "real" IDE driver and the pd driver.

I don't have a disk that reports 16383 cylinders, so you're going to have
to test the fix for me. If you also happen to have a smaller disk
that works with the current driver, I'd appreciate it if you could test
that too after applying this patch.

Now, I'm coding on the fly here, so please be _very_ careful.

Please locate linux/drivers/block/paride/pd.c and go to the function
pd_identify(). Modify it to look like like the version below, and remake
the pd module.

static int pd_identify( int unit )

{ int j, cyls;
        char id[PD_ID_LEN+1];

/* WARNING: here there may be dragons. reset() applies to both drives,
   but we call it only on probing the MASTER. This should allow most
   common configurations to work, but be warned that a reset can clear
   settings on the SLAVE drive.

/* Patched to detect and adjust for disks with more than 16383 cylinders
   in the default translation.

        if ( == 0) pd_reset(unit);

        pd_wait_for(unit,0,DBMSG("before IDENT"));

        if (pd_wait_for(unit,STAT_DRQ,DBMSG("IDENT DRQ")) & STAT_ERR) {
                return 0;

        cyls = word_val(1);
        if (cyls) pd_init_dev_parms(unit);

        PD.sectors = word_val(6);
        PD.heads = word_val(3);
        PD.cylinders = cyls;

        if (cyls == 16383) PD.cylinders = word_val(56);

        PD.capacity = PD.sectors*PD.heads*PD.cylinders;

        for(j=0;j<PD_ID_LEN;j++) id[j^1] = pd_scratch[j+PD_ID_OFF];
        j = PD_ID_LEN-1;
        while ((j >= 0) && (id[j] <= 0x20)) j--;
        j++; id[j] = 0;

        PD.removable = (word_val(0) & 0x80);
        printk("%s: %s, %s, %d blocks [%dM], (%d/%d/%d), %s media\n",

        if (!PD.standby) pd_standby_off(unit);

        pd_hd[unit<<PD_BITS].nr_sects = PD.capacity;
        pd_hd[unit<<PD_BITS].start_sect = 0;
        return 1;

Grant R. Guenther

-- To unsubscribe, send mail to: --
-- with the single word "unsubscribe" in the body of the message. --

This archive was generated by hypermail 2.0b3 on Wed 03 Feb 1999 - 17:19:53 EST