ATA ident command
Joel Sherrill
joel.sherrill at OARcorp.com
Thu Aug 27 11:54:05 UTC 2009
Thomas Doerfler wrote:
> Chris Johns wrote:
>
>> Thomas Doerfler wrote:
>>
>>> So I think you are correct.
>>>
>>>
>> Excellent. I will commit the change. Interesting it has been in RTEMS
>> for this amount of time.
>>
>
> Gotcha. I didn't dare to ask that question ;-)
>
And don't forget the other thing about long lurking bugs.
It seems that multiple people often trip them independently
about the same time. 10 year old code with no reports suddenly
gets a flurry. <sigh>
--joel
> Thomas.
>
>
>> Thanks.
>> Chris
>>
>>
>>> wkr,
>>> Thomas.
>>>
>>> Chris Johns wrote:
>>>
>>>> Hi all,
>>>>
>>>> I have found the ATA driver's handling of the ident command seems a
>>>> little suspect but I did not want to change the driver without some
>>>> feedback.
>>>>
>>>> If you look around line 1470 in the ata.c driver the LBA sectors is
>>>> passed to the rtems_disk_create_phys call. This value comes from the
>>>> handling of the ident table returned from the drive (line 1419). I
>>>> found the value returned by qemu for its drive was word reversed. I
>>>> now have this:
>>>>
>>>> ATA_DEV_INFO(ctrl_minor, dev).lba_sectors =
>>>> (CF_LE_W(buffer[ATA_IDENT_WORD_NUM_OF_USR_SECS1]) << 16) +
>>>> CF_LE_W(buffer[ATA_IDENT_WORD_NUM_OF_USR_SECS0]);
>>>>
>>>> and it is working with qemu.
>>>>
>>>> If any one has an ATA standard handy could they please check if this
>>>> change is ok ?
>>>>
>>>> Regards
>>>> Chris
>>>> _______________________________________________
>>>> rtems-users mailing list
>>>> rtems-users at rtems.org
>>>> http://www.rtems.org/mailman/listinfo/rtems-users
>>>>
>>>
>
>
>
More information about the users
mailing list