<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: XSysAce driver cant mount DOS part</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Hi,<BR>
<BR>
Thanks for your insight into the older code.<BR>
I tried your fix and came up with this.<BR>
I have run e2fsck and the cf card comes up clean with that.<BR>
<BR>
heres a boot sequence:<BR>
<BR>
Initializing Cryptographic API<BR>
io scheduler noop registered<BR>
io scheduler anticipatory registered (default)<BR>
io scheduler deadline registered<BR>
io scheduler cfq registered<BR>
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled<BR>
serial8250.0: ttyS0 at MMIO 0x40421003 (irq = 4) is a 16550A<BR>
serial8250.0: ttyS1 at MMIO 0x40401003 (irq = 5) is a 16550A<BR>
RAMDISK driver initialized: 16 RAM disks of 65536K size 1024 blocksize<BR>
XSysAce driver&nbsp; v0771.<BR>
IDENTIFY: heads: 16, nsec: 63, cyls: 1011, size= 1019088<BR>
REGISTERED: major no.= 125 capacity= 1019088<BR>
&nbsp;xsa: xsa1 xsa2 xsa3<BR>
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2<BR>
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx<BR>
mice: PS/2 mouse device common for all mice<BR>
TCP bic registered<BR>
NET: Registered protocol family 1<BR>
VFS: Mounted root (ext2 filesystem) readonly.<BR>
Freeing unused kernel memory: 100k init<BR>
EXT2-fs error (device xsa2): ext2_check_page: bad entry in directory #32689: unaligned directory entry - offset=1024, inode=1713398885, rec_len=29295, name_len=109<BR>
Warning: unable to open an initial console.<BR>
init has generated signal 11 but has no handler for it<BR>
Kernel panic - not syncing: Attempted to kill init!<BR>
<BR>
<BR>
The only thing I notice is that the disk capacity is wrong, its a 512Mb, not a 1Gb as shown.<BR>
<BR>
Any thoughts about what to look into next?<BR>
<BR>
Thanks a lot.<BR>
<BR>
<BR>
Joe Robertson<BR>
Joseph.Robertson@sanmina-sci.com<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: urwithsudheer [<A HREF="mailto:urwithsudheer@gmail.com">mailto:urwithsudheer@gmail.com</A>]<BR>
Sent: Mon 7/16/2007 12:08 AM<BR>
To: Robertson, Joseph M.<BR>
Cc: linuxppc-embedded@ozlabs.org<BR>
Subject: Re: XSysAce driver cant mount DOS part<BR>
<BR>
Hi Joe Robertson,<BR>
<BR>
Thanks for the link.<BR>
<BR>
In the xsa_thread function, can u try changing the hardcoded coded value<BR>
&quot;2&quot; to &quot;xsa_cur_req-&gt;current_nr_sectors &quot;<BR>
<BR>
<BR>
The actual code in the given link.<BR>
<BR>
for(i = xsa_cur_req-&gt;current_nr_sectors; i &gt; 0; i-=2){<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xsa_device.req_done = 1;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while ((stat = cur_req(&amp;SysAce, sector,<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2,<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buffer)) == XST_DEVICE_BUSY)<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xsa_short_delay();<BR>
<BR>
<BR>
Try changing it to ...<BR>
<BR>
for(i = xsa_cur_req-&gt;current_nr_sectors; i &gt; 0;<BR>
i-=xsa_cur_req-&gt;current_nr_sectors ){ xsa_device.req_done = 1;<BR>
while ((stat = cur_req(&amp;SysAce, sector,<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xsa_cur_req-&gt;current_nr_sectors ,<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; buffer)) == XST_DEVICE_BUSY)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xsa_short_delay();<BR>
<BR>
<BR>
<BR>
Due to the hardcoded value, it gave problem while mounting but no issue<BR>
with fdisk. It mounts well but generated a kernel BUG. Tried changing<BR>
the value to '1' from '2' , fdisk crashed but mount is working well. So<BR>
removed the hardcode value and then placed the dynamic variable<BR>
xsa_cur_req-&gt;current_nr_sectors which is chosen by kernel. And now fdisk<BR>
and mount both are working fine.<BR>
<BR>
<BR>
Pl let me know the results in your setup.<BR>
<BR>
Thanks<BR>
Sudheer<BR>
<BR>
<BR>
Robertson, Joseph M. wrote:<BR>
&gt;<BR>
&gt; Hi,<BR>
&gt;<BR>
&gt; Yes, I got it from here.<BR>
&gt; <A HREF="http://www.cs.york.ac.uk/rtslab/demos/amos/xupv2pro/patches/linuxppc-2.6.17.1-sysace-1.2.patch">http://www.cs.york.ac.uk/rtslab/demos/amos/xupv2pro/patches/linuxppc-2.6.17.1-sysace-1.2.patch</A><BR>
&gt;<BR>
&gt; The 'official' one, yes?<BR>
&gt;<BR>
&gt; Thanks,<BR>
&gt;<BR>
&gt; Joe Robertson<BR>
&gt; Joseph.Robertson@sanmina-sci.com<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; -----Original Message-----<BR>
&gt; From: urwithsudheer [<A HREF="mailto:urwithsudheer@gmail.com">mailto:urwithsudheer@gmail.com</A>]<BR>
&gt; Sent: Fri 7/13/2007 4:25 AM<BR>
&gt; To: Robertson, Joseph M.<BR>
&gt; Cc: linuxppc-embedded@ozlabs.org<BR>
&gt; Subject: Re: XSysAce driver cant mount DOS part<BR>
&gt;<BR>
&gt; Hi<BR>
&gt;<BR>
&gt; Robertson, Joseph M. wrote:<BR>
&gt; &gt;<BR>
&gt; &gt; Hi all,<BR>
&gt; &gt;<BR>
&gt; &gt; I've been workig with this for a while but have made no progress.<BR>
&gt; &gt; Today I got the latest XSysAce patch for kernel 2.6.17.1 and applied<BR>
&gt; &gt; it to get clean code.<BR>
&gt; &gt; I inherited the previous code from another developer.<BR>
&gt; &gt;<BR>
&gt; Can you send the link to xsysace driver source code from where you<BR>
&gt; obtained.<BR>
&gt;<BR>
&gt;<BR>
&gt; Thanks<BR>
&gt; Sudheer<BR>
&gt;<BR>
&gt;<BR>
&gt; &gt;<BR>
&gt; &gt; My problem is that mounting the DOS partition always fails in a short<BR>
&gt; &gt; time with a kernel oops.<BR>
&gt; &gt;<BR>
&gt; &gt; ECAU-9999:# Oops: kernel access of bad area, sig: 11<BR>
&gt; &gt; [#1]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; &gt;<BR>
&gt; PREEMPT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; &gt; NIP: C00701C8 LR: C0070C18 CTR:<BR>
&gt; &gt; 00000000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; &gt; GPR00: 00000080 C0391E80 C0373030 C02CAC00 C0E03000 C0E03154 00000000<BR>
&gt; &gt; C02CAC00<BR>
&gt; &gt; GPR08: 00200200 00000000 00100100 00000000 00051A4B FFFFDE60 03BD4900<BR>
&gt; &gt; 007FFF3B<BR>
&gt; &gt; GPR16: 00400000 00000001 FFFFFFFF 03BCDC58 00000000 007FFF00 00000002<BR>
&gt; &gt; C0280000<BR>
&gt; &gt; GPR24: C0363A10 0000000B 00000000 00000000 00000000 C02CAC00 C035ED20<BR>
&gt; &gt; C0E03000<BR>
&gt; &gt; NIP [C00701C8]<BR>
&gt; &gt; free_block+0x8c/0x138&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; &gt; LR [C0070C18]<BR>
&gt; &gt; drain_array+0xb8/0x124&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; &gt; Call Trace:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; &gt;<BR>
&gt; &gt; The setup:<BR>
&gt; &gt; My own build system.<BR>
&gt; &gt; Kernel 2.6.17.1 with lots of xilinx stuff, eth, i2c, xsysace.<BR>
&gt; &gt; Crosscompiled for PPC405.<BR>
&gt; &gt; Latest, clean XSysAce code.&nbsp; mods:&nbsp; major hardcoded to = 125.&nbsp; Polled<BR>
&gt; &gt; mode.<BR>
&gt; &gt; CF:&nbsp; 3 partitions,<BR>
&gt; &gt; 1:&nbsp; DOS FAT16<BR>
&gt; &gt; 2:&nbsp; Ext2&nbsp; main<BR>
&gt; &gt; 3:&nbsp; Ext2&nbsp; rescue<BR>
&gt; &gt;<BR>
&gt; &gt; This build boots up fine, mounts a ext2 as root fine.&nbsp; I can also<BR>
&gt; &gt; mount the rescue partition with no problems.<BR>
&gt; &gt;<BR>
&gt; &gt; Does anyone have any pointers of where I should look for problems?<BR>
&gt; &gt;<BR>
&gt; &gt; My next step is to go and set it up for interrupt service and see if<BR>
&gt; &gt; that changes anything.<BR>
&gt; &gt;<BR>
&gt; &gt; Thanks,<BR>
&gt; &gt;<BR>
&gt; &gt; Joe Robertson<BR>
&gt; &gt; Joseph.Robertson@sanmina-sci.com<BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt; &gt; CONFIDENTIALITY<BR>
&gt; &gt; This e-mail message and any attachments thereto, is intended only for<BR>
&gt; &gt; use by the addressee(s) named herein and may contain legally<BR>
&gt; &gt; privileged and/or confidential information. If you are not the<BR>
&gt; &gt; intended recipient of this e-mail message, you are hereby notified<BR>
&gt; &gt; that any dissemination, distribution or copying of this e-mail<BR>
&gt; &gt; message, and any attachments thereto, is strictly prohibited. If you<BR>
&gt; &gt; have received this e-mail message in error, please immediately notify<BR>
&gt; &gt; the sender and permanently delete the original and any copies of this<BR>
&gt; &gt; email and any prints thereof.<BR>
&gt; &gt; ABSENT AN EXPRESS STATEMENT TO THE CONTRARY HEREINABOVE, THIS E-MAIL<BR>
&gt; &gt; IS NOT INTENDED AS A SUBSTITUTE FOR A WRITING. Notwithstanding the<BR>
&gt; &gt; Uniform Electronic Transactions Act or the applicability of any other<BR>
&gt; &gt; law of similar substance and effect, absent an express statement to<BR>
&gt; &gt; the contrary hereinabove, this e-mail message its contents, and any<BR>
&gt; &gt; attachments hereto are not intended to represent an offer or<BR>
&gt; &gt; acceptance to enter into a contract and are not otherwise intended to<BR>
&gt; &gt; bind the sender, Sanmina-SCI Corporation (or any of its subsidiaries),<BR>
&gt; &gt; or any other person or entity.<BR>
&gt; &gt; ------------------------------------------------------------------------<BR>
&gt; &gt;<BR>
&gt; &gt; _______________________________________________<BR>
&gt; &gt; Linuxppc-embedded mailing list<BR>
&gt; &gt; Linuxppc-embedded@ozlabs.org<BR>
&gt; &gt; <A HREF="https://ozlabs.org/mailman/listinfo/linuxppc-embedded">https://ozlabs.org/mailman/listinfo/linuxppc-embedded</A><BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; CONFIDENTIALITY<BR>
&gt; This e-mail message and any attachments thereto, is intended only for<BR>
&gt; use by the addressee(s) named herein and may contain legally<BR>
&gt; privileged and/or confidential information. If you are not the<BR>
&gt; intended recipient of this e-mail message, you are hereby notified<BR>
&gt; that any dissemination, distribution or copying of this e-mail<BR>
&gt; message, and any attachments thereto, is strictly prohibited. If you<BR>
&gt; have received this e-mail message in error, please immediately notify<BR>
&gt; the sender and permanently delete the original and any copies of this<BR>
&gt; email and any prints thereof.<BR>
&gt; ABSENT AN EXPRESS STATEMENT TO THE CONTRARY HEREINABOVE, THIS E-MAIL<BR>
&gt; IS NOT INTENDED AS A SUBSTITUTE FOR A WRITING. Notwithstanding the<BR>
&gt; Uniform Electronic Transactions Act or the applicability of any other<BR>
&gt; law of similar substance and effect, absent an express statement to<BR>
&gt; the contrary hereinabove, this e-mail message its contents, and any<BR>
&gt; attachments hereto are not intended to represent an offer or<BR>
&gt; acceptance to enter into a contract and are not otherwise intended to<BR>
&gt; bind the sender, Sanmina-SCI Corporation (or any of its subsidiaries),<BR>
&gt; or any other person or entity.<BR>
<BR>
<BR>
</FONT>
</P>


<BR>
CONFIDENTIALITY<BR>
This e-mail message and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail message, you are hereby notified that any dissemination, distribution or copying of this e-mail message, and any attachments thereto, is strictly prohibited.  If you have received this e-mail message in error, please immediately notify the sender and permanently delete the original and any copies of this email and any prints thereof.<BR>
ABSENT AN EXPRESS STATEMENT TO THE CONTRARY HEREINABOVE, THIS E-MAIL IS NOT INTENDED AS A SUBSTITUTE FOR A WRITING.  Notwithstanding the Uniform Electronic Transactions Act or the applicability of any other law of similar substance and effect, absent an express statement to the contrary hereinabove, this e-mail message its contents, and any attachments hereto are not intended to represent an offer or acceptance to enter into a contract and are not otherwise intended to bind the sender, Sanmina-SCI Corporation (or any of its subsidiaries), or any other person or entity.<BR>
</BODY>
</HTML>