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

Re: [MiNT] [PATCH][1/3] USB mass storage driver returns wrong FS limits for MiNT kernel



Hi David,

On 16/04/15 20:50, David Gálvez wrote:
> Hi Alan,
>
> 2015-04-16 21:24 GMT+02:00 Alan Hourihane <alanh@fairlite.co.uk>:
>> Hi David,
>>
>> Not sure this makes sense. The following code in XHDOSLimits() in the
>> usb's xhdi.c handler does this.....
>>
>> #ifdef TOSONLY
>>         return sys_XHDOSLimits(which,limit);
>> #else
>>         return ENOSYS;  /* so FreeMiNT kernel will handle this call */
>> #endif
>>
>> So sys_XHDOSLimits() would never be called in the FreeMiNT case.
>>
> The problem is that sys_XHDOSLimits is called also from inside the USB
> driver, in install.c the function build_bpb( ) calls it three times,
> and it ends filling with wrong values the BPB struct.

I see, so really, for these calls, we should be getting the XHDI handler
cookie and calling XHDOSLimits instead.

Can we do that instead of duplicating the MiNT code ?

Alan.
>