This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: Patch to allow disk support to work with non CHS devices
On Mon, Aug 21, 2006 at 03:16:40PM +0100, Andy Jackson wrote:
> Hi Andrew,
>
> >Is there any way i can easily test this?
>
> My understanding is that the LBA entries in the MBR should be valid even
> when the disk supports CHS, so changing
>
> cyg_disk_identify_t ident;
>
> ident.serial[0] = '\0';
> ident.firmware_rev[0] = '\0';
> ident.model_num[0] = '\0';
> ident.lba_sectors_num = synth_info->size / 512;
> ident.cylinders_num = synth_info->cylinders_num;
> ident.heads_num = synth_info->heads_num;
> ident.sectors_num = synth_info->sectors_num;
>
> if (!(chan->callbacks->disk_init)(tab))
> return false;
> if (ENOERR != (chan->callbacks->disk_connected)(tab, &ident))
> return false;
>
> to
>
> ident.cylinders_num = 0
> ident.heads_num = 0;
> ident.sectors_num = 0;
>
> in the synth disk driver should still work *if* the MBR LBA data is valid.
Yes, this worked. I've committed your patch.
Thanks
Andrew