public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: michael <trimarchi@gandalf.sssup.it>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] USB SUPPORT & get_vfatname
Date: Thu, 24 Apr 2008 09:59:57 +0200	[thread overview]
Message-ID: <48103DFD.1050500@gandalf.sssup.it> (raw)
In-Reply-To: <AA28F077645B324881335614E4F7C428034CDB@win-ex01.bench.com>

Ken.Fuchs at bench.com wrote:
Ok,

check your fat.h and your fsdata


typedef struct {
        __u8    fatbuf[FATBUFSIZE]; /* Current FAT buffer */
        int     fatsize;        /* Size of FAT in bits */
        __u16   fatlength;      /* Length of FAT in sectors */
        __u16   fat_sect;       /* Starting sector of the FAT */
        __u16   rootdir_sect;   /* Start sector of root directory */
        __u16   clust_size;     /* Size of clusters in sectors */
        short   data_begin;     /* The sector of the first cluster, can 
be negative */
        int     fatbufnum;      /* Used by get_fatent, init to -1 */
} fsdata;

The fatbuf is on the top?

Regards Michael



> Michael,
>
> Sorry, your latest get_vfatname patch doesn't work either.
>
> FAT16 works perfectly, so the USB code is probably _not_ at fault.  I see only problems with FAT32, but only for _some_ long collections of files.
>
> Thus, there may still be a problem with fs/fat/fat.c.  Maybe there is something wrong with my copy of fat.c  I attached it;  Perhaps you can see a problem with it.
>
> Sincerely,
>
> Ken Fuchs
>
>   
>> -----Original Message-----
>> From: michael [mailto:trimarchi at gandalf.sssup.it] 
>> Sent: Wednesday, April 23, 2008 06:16
>> To: michael
>> Cc: Fuchs, Ken; u-boot-users at lists.sourceforge.net; Wolfgang Denk
>> Subject: Re: [U-Boot-Users] USB SUPPORT & get_vfatname
>>
>>
>> Hi,
>>
>> michael wrote:
>>     
>>> Hi,
>>>
>>> Can you try this one?
>>>
>>> Revert my last one patch?
>>> It change the test code, before the while. I use your script on a 
>>> Compact Flash and it looks fine for me (under linux).
>>>
>>> Regards Michael
>>>
>>>
>>>       
>> --------------------------------------------------------------
>> ----------
>>     
>>> Check if the entry is a valid dir_slot entry, otherwise it 
>>>       
>> is a dentry and the
>>     
>>> name has to be taken by the get_name function
>>>
>>> Signed-off-by: michael trimarchi <trimarchi@gandalf.sssup.it>
>>>
>>> ---
>>>  fs/fat/fat.c |    7 +++++++
>>>  1 files changed, 7 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/fs/fat/fat.c b/fs/fat/fat.c
>>> index 49c78ed..bc37cec 100644
>>> --- a/fs/fat/fat.c
>>> +++ b/fs/fat/fat.c
>>> @@ -473,8 +473,14 @@ get_vfatname(fsdata *mydata, int 
>>>       
>> curclust, __u8 *cluster,
>>     
>>>  		while (slotptr2->id > 0x01) {
>>>  			slotptr2++;
>>>  		}
>>> +
>>>  		/* Save the real directory entry */
>>>  		realdent = (dir_entry*)slotptr2 + 1;
>>> +		if (slotptr2->attr != ATTR_VFAT) {
>>> +			get_name ((dir_entry *)realdent, l_name);
>>> +			goto out;
>>> +		}
>>> +
>>>  		while ((__u8*)slotptr2 >= get_vfatname_block) {
>>>  			slot2str(slotptr2, l_name, &idx);
>>>  			slotptr2--;
>>> @@ -494,6 +500,7 @@ get_vfatname(fsdata *mydata, int 
>>>       
>> curclust, __u8 *cluster,
>>     
>>>  	else if (*l_name == aRING) *l_name = '?';
>>>  	downcase(l_name);
>>>  
>>> +out:
>>>  	/* Return the real directory entry */
>>>  	memcpy(retdent, realdent, sizeof(dir_entry));
>>>  
>>>   
>>>       
>> The scripts in this thread can be used to test the fat32 
>> filesystem. I 
>> do some tests using Compact Flash
>> device and this patchs work for me. I would like to know if is a fat 
>> layer problem or usb layer problem.
>>
>> Michael
>>
>>
>>     

  reply	other threads:[~2008-04-24  7:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-21  4:29 [U-Boot-Users] USB SUPPORT Aneesh
2008-04-21 15:04 ` Markus Klotzbücher
2008-04-21 16:36 ` Ken.Fuchs at bench.com
2008-04-21 16:56   ` michael
2008-04-21 22:53     ` Ken.Fuchs at bench.com
2008-04-22  7:53       ` michael
2008-04-22 22:31         ` Ken.Fuchs at bench.com
2008-04-23  6:54           ` michael
2008-04-23  8:14             ` michael
2008-04-23 11:15               ` [U-Boot-Users] USB SUPPORT & get_vfatname michael
2008-04-23 18:01                 ` Ken.Fuchs at bench.com
2008-04-24  7:59                   ` michael [this message]
2008-04-24 16:13                     ` Ken.Fuchs at bench.com
2008-04-24 17:01                       ` michael
2008-04-24 21:30                         ` Ken.Fuchs at bench.com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48103DFD.1050500@gandalf.sssup.it \
    --to=trimarchi@gandalf.sssup.it \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox