Hi Wilson,
Just a follow-up to clarify a few things - nothing too important!
Wilson Callan wrote:
> we use this driver all the time, so i care.
Me too.
>> I'm just trying to understand two things:
>>
>> 1. Is is really okay to just ignore this "bug" under uClinux?
> i think so, meaning that's my take, but i just have too much else to
> do to correct the driver for regular linux.
I agree, especially since I can transfer 16 bytes with no trouble at all
with the check removed.
Actually, this is the real reason I'm replying to your last message. I
want to clarify two things about the driver, after removing the faulty
size check, under uClinux _only_:
1. It does indeed work, but only because of the flat memory (you
already know this, but I thought I'd add my experience here), and,
2. There is one potential gotcha to point 1, and that is the chip
select issue. If you transfer more than 16 bytes, the driver will send
it in sixteen byte "chunks", framed by the SPI chip select lines.
The second point is a problem (for me) that I may or may not address.
The hardware I'm connecting to (Ramtron FRAM and my custom FPGA) use
"transactions" consisting of a command byte followed by a variable
length set of bytes, all framed by the chip select. So for now, I can
probably live with limiting these transactions to 16 bytes or fewer. If
the need elevates, I may address this, but probably not in the immediate
future.
I wanted to clarify this, in case I was unclear, as you were so kind to
reply in the first place!
> you would make the fix and submit it to the list.
If I do, I will, but it's highly unlikely I'd fix the missing copy bug.
>
>> Take care,
>> -Bob
>>
>>
>> Wilson Callan wrote:
>>>> if (read_data->length >
>>>> sizeof(read_data->buf)) {
>>> yes, i flagged that as a bug, but didnt require more than 4 bytes at a
>>> time to test removing it.
>>>
>>>
>>>> What I'm doing (for now) is simply commenting out this check, because
>>>> I don't see how it can be made with the given information, and
>>>> because for uClinux, the (alleged) missing buffer copy is not really
>>>> necessary anyways. Is this wise?
>>> yes, i think the check should be removed. somebody erred by assuming
>>> the pointer size was relevant. the important thing here is that the
>>> user supplied length should be how much space buf actually points to.
>>> only the user can guarantee that.
>>>
>>> thanks, wilson
>>>
>>>
>>>
>>>
>
>
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev