<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Hi Ameet,<br><br>We were able to get over with the unstability in the driver with the following fix in the code<br><br>Instead of fixing the number of sectors to be 2 in the loop, we are actually doing a read based on the kernel request like this :<br><br> for(i = xsa_cur_req->current_nr_sectors; i > 0; i-=<span style="font-weight: bold;">xsa_cur_req->current_nr_sectors </span>){<br> xsa_device.req_done = 1;<br> while ((stat =
cur_req(&SysAce, sector,<br> <span style="font-weight: bold;">xsa_cur_req->current_nr_sectors</span> ,<br> buffer)) == XST_DEVICE_BUSY)<br> xsa_short_delay();<br><br><br>Now the driver is stable with all the filesystem commands.<br><br>Please test this out and if appropriate patch this to the driver
code.<br><br>Thanks<br>Junita<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Ameet Patil <ammubhai@gmail.com><br>To: agnel juni <junijoseph@yahoo.co.in><br>Cc: linuxppc-embedded@ozlabs.org<br>Sent: Thursday, 26 October, 2006 1:00:48 AM<br>Subject: Re: System ACE driver - for 2.6 kernel - need help to understand xsa_thread<br><br><div>Hi Junita,<br> Its a hack really! When I was developing/porting the SysAce driver <br>to 2.6 I tried to maintain the code as is from the 2.4 kernel driver. In <br>doing so I found that there is a slight difference between the two <br>kernels. i.e. I am not sure why, but the sysace device can only handle <br>requests for 2 sectors at a time. This was fine in the 2.4 as the kernel <br>always requested 2 sectors. However, in 2.6 I found that this is <br>different: the requests are 8 secs. or more. I tried to fix this in vain <br>by
changing several parameters of the driver during initialization. <br>Anyway, due to several issues I didn't try hard to fix it at that time.<br><br>Hence this hack: No matter how many sec. req. I get from the kernel, I <br>use a loop to req. only 2 secs. at a time. The xsa_device.req_done is <br>used as a flag and reset in the XSA IRQ IIRC.<br><br>If you find a better approach, please do update me. Hope this helps!<br><br>cheers,<br>-Ameet<br><br>agnel juni wrote:<br>> <br>> Hello all<br>> <br>> I am trying to understand the parameters that are sent through "cur_req" <br>> function used in funtion xsa_thread in System ACE driver.<br>> <br>> In xsa_thread function in the System ACE driver ,<br>> <br>> In 2.4 kernel:<br>> --------------------<br>> while ((stat = cur_req(&SysAce,
sector,<br>> CURRENT->current_nr_sectors,<br>> CURRENT->buffer)) == XST_DEVICE_BUSY)<br>> xsa_short_delay();<br>> <br>> <br>> Where as in 2.6 kernel this is changed to<br>> ---------------------------------------------------------------<br>> <br>> for(i = xsa_cur_req->current_nr_sectors; i > 0;
i-=2){<br>> xsa_device.req_done = 1;<br>> while ((stat = cur_req(&SysAce, sector,<br>> 2,<br>> buffer)) ==
XST_DEVICE_BUSY)<br>> xsa_short_delay();<br>> #endif<br>> <br>> Ameet , could you help me understand the impact of the parameters, <br>> especailly the 3rd paramter which is hardcoded in 2.6 kernel.It would be <br>> great if you could clarify this in regard to 'mount' command.<br>> <br>> Thanks in advance<br>> Junita<br>> <br>> <br>> <br>> ------------------------------------------------------------------------<br>> Find out what India is talking about on - Yahoo! Answers India <br>> <<a target="_blank" href="http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/">http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/</a>><br>> Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8.
<br>> Get it NOW <br>> <<a target="_blank" href="http://us.rd.yahoo.com/mail/in/messengertagline/*http://in.messenger.yahoo.com">http://us.rd.yahoo.com/mail/in/messengertagline/*http://in.messenger.yahoo.com</a>> <br>> <br></div></div><br></div></div><br>
        
        
                <hr size=1></hr>
Find out what India is talking about on - <a href="http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/">Yahoo! Answers India</a> <BR>
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. <a href="http://us.rd.yahoo.com/mail/in/messengertagline/*http://in.messenger.yahoo.com">Get it NOW</a></body></html>