Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Silicon Image 3112 SerialATA FIX! (kernel patch inside)
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Heretic
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jul 2002
Posts: 114
Location: Austin, TX USA

PostPosted: Sat Jan 10, 2004 8:13 am    Post subject: Reply with quote

If I were you, I'd either share a channel or get a cheap PATA controller. I, personally, wouldn't put my fast harddrive on the shared PCI bus if I could avoid it.
Back to top
View user's profile Send private message
PrakashP
Veteran
Veteran


Joined: 27 Oct 2003
Posts: 1249
Location: C.C.A.A., Germania

PostPosted: Sat Jan 10, 2004 10:55 am    Post subject: Reply with quote

? In which way do I share the PCI Bus? (And what would another card do better?) I think my configuration is already a very efficient one. Using APIC, every IDE controller has its own interrupt.
Back to top
View user's profile Send private message
GTVincent
Tux's lil' helper
Tux's lil' helper


Joined: 26 Oct 2002
Posts: 91
Location: Las Vegas, NV

PostPosted: Sat Jan 10, 2004 3:30 pm    Post subject: Reply with quote

I tried the love1-r1 sources, but the computer still hangs at mounting filesystems read/write. This time, however, it got me this interesting bit of info:

Code:
 * Remounting rootystem read/write...
journal-601, buffer write failed
-------------[ cut here ]-----------
kernel BUG at fs/reiserfs/prints.c:339!
invalid operand: 0000 [#1]
PREEMPT
CPU:    0
EIP:    0060:[<c01cae07>]    Not tainted VLI
EFLAGS: 00010286
EIP is at reiserfs_panic+0x37/0x70
eax: 00000024   ebx: f7c57e00   ecx: c02eb970   edx: 00000282
esi: f880e0d8   edi: 00000000   ebp: f75f5dd0   esp: f75f5dc0
ds: 007b   es: 007b   ss: 0068
Process mount (pid: 183, threadinfo=f75f4000 task=f75f7980)
Stack: c02bb10c c037e220 f880e0d8 000005d9 f75f5e0c c01d6817 f7c57e00 c02c98e0
       00001000 f880e0b0 000005d9 00000005 00000003 00000000 00000002 f76c53f0
       00000000 00000000 f7511000 f75f5e74 c01db462 f7c57e00 f880e0d8 00000001
Call Trace:
 [<c01d6817>] flush_commit_list+0x2d7/0x460
 [<c01db462>] do_journal_end+0xa42/0xc70
 [<c01d9e57>] journal_end+0x27/0x30
 [<c01c8c5b>] reiserfs_remount+0x15b/0x230
 [<c0157ce9>] sync_blockdev+0x39/0x50
 [<c015d60a>] do_remount_sb+0xba/0x120
 [<c0173d5c>] do_remount+0xbc/0xf0
 [<c017441d>] do_mount+0x17d/0x190
 [<c013cf25>] __get_free_pages+0x35/0x40
 [<c017422e>] copy_mount_options+0x9e/0x110
 [<c01747f3>] sys_mount+0xc3/0x120
 [<c02a6a9f>] syscall_call+0x7/0xb

Code: e8 2f f3 00 00 8d 45 10 89 44 24 04 8b 45 0c 89 04 24 e8 0d fe ff ff c7 44
 24 04 20 e2 37 c0 c7 04 24 0c b1 2b c0 e8 99 27 f5 ff <0f> 0b 53 01 4c 04 2c c0
 b8 4f 00 2c c0 8d 93 18 01 00 00 85 db
 /sbin/rc: line 313:   183 Segmentation fault      mount / -n -o remount,rw >&/dev/null
 * Root filesystem could not be mounted read/write:(                      [!!]

en_request: I/O error, dev hda, sector 169475175
Buffer I/O error on device hda6, logical block 886923
end_request: I/O error, dev hda, sector 169475175
Buffer I/O error on device hda6, logical block 885923
/sbin/rc: line 66: /sbin/sulogin: Input/output error


So I think it's not a PCI error as much as it is a reiserfs error. Who would be interested in this backtrace?
Back to top
View user's profile Send private message
Heretic
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jul 2002
Posts: 114
Location: Austin, TX USA

PostPosted: Sat Jan 10, 2004 5:47 pm    Post subject: Reply with quote

PrakashKC wrote:
? In which way do I share the PCI Bus? (And what would another card do better?) I think my configuration is already a very efficient one. Using APIC, every IDE controller has its own interrupt.


The IDE controller on your southbridge isn't on the slow, easily saturated 133MB/sec PCI bus. What chipset do you use? nforce2? The north and south bridge are linked by a 533MB/sec to 1.06GB/sec connection. The embedded IDe controller uses this faster connection so you get better performance.
Back to top
View user's profile Send private message
PrakashP
Veteran
Veteran


Joined: 27 Oct 2003
Posts: 1249
Location: C.C.A.A., Germania

PostPosted: Sat Jan 10, 2004 8:59 pm    Post subject: Reply with quote

Uh OK, now I undestand what you are saying. I think the speed difference can be neglected, as it only matters in burst transmissions. On the other hand, using WIn2k (have to do it sometimes) SATA has no problem with the 128GB barrier while w2k with ide has (at least in my case). I know some sp should fix it, but I had some troubles and was sick of it.
Back to top
View user's profile Send private message
Heretic
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jul 2002
Posts: 114
Location: Austin, TX USA

PostPosted: Sat Jan 10, 2004 10:08 pm    Post subject: Reply with quote

PrakashKC wrote:
...using WIn2k (have to do it sometimes) SATA has no problem with the 128GB barrier while w2k with ide has (at least in my case)...


Yea, that sux. Can't help you with Microsoft problems. I'd call their tech support, lol.
Back to top
View user's profile Send private message
PrakashP
Veteran
Veteran


Joined: 27 Oct 2003
Posts: 1249
Location: C.C.A.A., Germania

PostPosted: Sun Jan 11, 2004 9:48 am    Post subject: Reply with quote

So coming back to my original problem. Do you think you could help me fixing the driver?
Back to top
View user's profile Send private message
denials
n00b
n00b


Joined: 11 Jan 2004
Posts: 27
Location: Sudbury, Ontario

PostPosted: Sun Jan 11, 2004 4:45 pm    Post subject: Siimage patches in 2.6.1-mm2 -- getting much closer Reply with quote

Released today: Andrew Morton's 2.6.1-mm2 patch set (ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.1/2.6.1-mm2) included the following patches, which is that much closer to being in the vanilla kernel (and should make our lives a little easier):

  • ide-siimage-seagate.patch
    - limit requests to 15kB only for Seagate SATA drives
  • ide-siimage-stack-fix.patch
    - Heretic's patch, as discussed here (kudos again!)
  • ide-siimage-sil3114.patch
    - recognizes a new 4-port Siimage controller
  • libata-update.patch
    - [libata sata_sil] add support for adaptec 1210sa, 4-port sii 3114
    - libata sata_svr] fix DRV_NAME to reflect actual driver filename
    - [libata sata_sil] unmask interrupts during initialization

Haven't tried it yet, but looking forward to the results.
Back to top
View user's profile Send private message
Heretic
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jul 2002
Posts: 114
Location: Austin, TX USA

PostPosted: Sun Jan 11, 2004 7:23 pm    Post subject: Re: Siimage patches in 2.6.1-mm2 -- getting much closer Reply with quote

denials wrote:
...much closer to being in the vanilla kernel...

  • ide-siimage-stack-fix.patch
    - Heretic's patch, as discussed here (kudos again!)

Haven't tried it yet, but looking forward to the results.


Linus doesn't believe my fix should work. I still have to provide him more proof I think, despite all the success stores of my pactches.

Here's a couple emails from the exchange:

Code:
On Tue, 6 Jan 2004, Bartlomiej Zolnierkiewicz wrote:

>>> >
>>> > What kind of strange report was this? I don't see how the thing _possibly_
>>> > could make any difference at all.
>
>>
>> /me thought the same first, but I couldn't verify this (lack of hardware).


Ok. I really can't see any way that "u32" -> "u16" change could change
anything at all, if there isn't some compiler bug involved. The compiler
definitely should be passing the value as a 16-bit thing regardless of
what the variable type is.

Actually, in the x86 calling convention, it should always be _passed_ as a
32-bit value, and it's really the callee that should always just read the
16 bits.

Ryan, can you compile the drivers/ide/pci/siimage.c file to assembly
before and after your change, so that we can see what the difference is? 
Also, can you tell us what compiler version you're using?

      Linus


Code:

Here's the diff from my box:

--- siimage.s.16        2004-01-06 06:13:45.000000000 -0600
+++ siimage.s.32        2004-01-06 06:14:44.000000000 -0600
@@ -481,9 +481,8 @@
        movl    1036(%esi), %eax
        testl   %eax, %eax
        je      .L335
-       movzwl  %bp, %eax
        movl    %ebx, 4(%esp)
-       movl    %eax, (%esp)
+       movl    %ebp, (%esp)
        call    *976(%esi)
        movzwl  14(%esp), %eax
        movl    %edi, 4(%esp)
@@ -523,8 +522,7 @@
        movl    824(%esi), %eax
        movl    %eax, (%esp)
        call    pci_write_config_word
-       movzwl  %bp, %eax
-       movl    %eax, 8(%esp)
+       movl    %ebp, 8(%esp)
        movl    %edi, 4(%esp)
        movl    824(%esi), %eax
        movl    %eax, (%esp)

-ryan


>> Thanks. All my machines are gcc-3.3 by now, and the diff from changing the
>> u32 to a u16 is literally:
>>
>>    --- /home/torvalds/siimage.s    2004-01-05 17:19:27.860992398 -0800
>>    +++ drivers/ide/pci/siimage.s   2004-01-05 17:19:40.275187848 -0800
>>    @@ -474,8 +474,9 @@
>>            movl    1296(%esi), %eax
>>            testl   %eax, %eax
>>            je      .L79
>>    +       movzwl  %bp, %eax
>>            movl    %ebx, 4(%esp)
>>    -       movl    %ebp, (%esp)
>>    +       movl    %eax, (%esp)
>>            call    *1236(%esi)
>>            movzwl  18(%esp), %eax
>>            movl    %edi, 4(%esp)
>>    @@ -518,9 +519,10 @@
>>            movl    16(%edx), %eax
>>            movl    %eax, (%esp)
>>            call    pci_bus_write_config_word
>>    +       movzwl  %bp, %eax
>>            movl    1060(%esi), %edx
>>    -       movl    %ebp, 12(%esp)
>>            movl    %edi, 8(%esp)
>>    +       movl    %eax, 12(%esp)
>>            movl    32(%edx), %eax
>>            movl    %eax, 4(%esp)
>>            movl    16(%edx), %eax
>>
>> which _definitely_ can't matter, since the only difference is literally
>> the 16->32 zero expansion, but since "bp" is always in the 16-bit range,
>> that ends up being effectively just a regulal move.
>>
>> It is quite possible that some version of gcc-3.2 did the 16-bit argument
>> push wrong, though. I'd love to have that confirmed, because that would
>> definitely mean that the compiler is totally unusable for the kernel..
>>
>>       Linus


Code:

On Tue, 6 Jan 2004, J. Ryan Earl wrote:

>>>>
>>>> Here's the diff from my box:
>
>>
>> This _literally_ can't make any difference. Are you sure that diff makes
>> the difference? Maybe it was your other part - the one that disabled the
>> sector limits?
>>
>> Th eonly thing the u16/u32 thing does is zero-extension of a value that is
>> already zero-extended (and that the callee won't even look at the high
>> bits of:
>>
>>    ide_mm_outw:
>>            movl    4(%esp), %edx
>>            movl    8(%esp), %eax
>>            movw    %dx, (%eax)
>>            ret
>>
>>
>> It will load the full 32-bit value off the argument list, but it will only
>> use the low 16 bits.
>>
>>       Linus


I would suggest it has something to do with signed-ness.  The zero
expansion probably gaurantees proper signed/unsigned expansion.  I am
still out of town, so I can't load up the driver with printk's to see the
actual value of speedt as used, but I am absolutely sure this change is
what resulted in stability.  The difference is night and day.  I increased
the request buffer from 15->128 without the u32->u16 change which resulted
in equally if not worse stability.  I'm talking crash and burn, no HD
response within 5-10 minutes of stress testing.  With the patch it runs
for days moving terrabytes of data around with no problems and much higher
performance metrics.

-ryan


Everybody that has had the patches fix their problems should probably email me their `dmesg`, `lspci -vv`, and `hdparm -i` so that I can start compiling a list as proof/evidence of success.

mailto:heretic@clanhk.org?subject="siimage success"
Back to top
View user's profile Send private message
PrakashP
Veteran
Veteran


Joined: 27 Oct 2003
Posts: 1249
Location: C.C.A.A., Germania

PostPosted: Sun Jan 11, 2004 8:48 pm    Post subject: Reply with quote

Uhhhmm, does siimag.c v1.09 now contain Heretic's fix or not? :?
Back to top
View user's profile Send private message
Heretic
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jul 2002
Posts: 114
Location: Austin, TX USA

PostPosted: Sun Jan 11, 2004 9:53 pm    Post subject: Reply with quote

PrakashKC wrote:
Uhhhmm, does siimag.c v1.09 now contain Heretic's fix or not? :?


My fix was the change between 1.07 and 1.08.
Back to top
View user's profile Send private message
PrakashP
Veteran
Veteran


Joined: 27 Oct 2003
Posts: 1249
Location: C.C.A.A., Germania

PostPosted: Sun Jan 11, 2004 10:05 pm    Post subject: Reply with quote

OK, I checked it and it is in 1.09 though the seagate stuff a bit altered (smarter).

BTW, my CPU is 15% at linear reading.
Back to top
View user's profile Send private message
GTVincent
Tux's lil' helper
Tux's lil' helper


Joined: 26 Oct 2002
Posts: 91
Location: Las Vegas, NV

PostPosted: Mon Jan 12, 2004 2:11 pm    Post subject: Reply with quote

Heretic, do you have more reports of this fix interfering with reiserfs, or, for that matter, with any other fs? Or am I the only one?

Since the performance gain using your patch will always come in handy, I would love to be able to see if it does anything for me. Preferably without reformatting, of course :)
Back to top
View user's profile Send private message
PrakashP
Veteran
Veteran


Joined: 27 Oct 2003
Posts: 1249
Location: C.C.A.A., Germania

PostPosted: Mon Jan 12, 2004 2:14 pm    Post subject: Reply with quote

I am using 2.6.1-love1 and reiserfs and so far no probs.
Back to top
View user's profile Send private message
Heretic
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jul 2002
Posts: 114
Location: Austin, TX USA

PostPosted: Mon Jan 12, 2004 3:54 pm    Post subject: Reply with quote

GTVincent wrote:
Heretic, do you have more reports of this fix interfering with reiserfs, or, for that matter, with any other fs? Or am I the only one?

Since the performance gain using your patch will always come in handy, I would love to be able to see if it does anything for me. Preferably without reformatting, of course :)


I run reiserfs. No problems.

You might have problems if your reiserfs partition became corrupted before you installed the patch though... did you reiserfsck it?

BTW, I stayed with the gs-sources kernel plus my patch on my production server: 2.4.23_pre8-gss
Back to top
View user's profile Send private message
estebann
n00b
n00b


Joined: 16 Jul 2003
Posts: 6

PostPosted: Tue Jan 13, 2004 4:45 am    Post subject: hang at mounting Reply with quote

I seem to be in precisely the same boat as GTVincent.
reiserfs
Kernel: 2.6.1-mm2
HD: ST380013AS
MB: Leadtek Winfast k7ncr18d-proII

Any help you could give would be greatly appreciated.
Back to top
View user's profile Send private message
ballyn
n00b
n00b


Joined: 14 Aug 2003
Posts: 73

PostPosted: Wed Jan 14, 2004 1:28 am    Post subject: Reply with quote

Try using the libata drivers (Device Drivers -> SCSI -> SCSI low-level drivers -> Serial ATA (SATA) support -> Silicon Image SATA support). You'll need to disable the "native" IDE driver ("Silicon Image chipset support" under IDE) and disable "Select only drivers expected to compile cleanly"... This seems to be a much more stable driver right now.

I think what Vincent mentioned was that sw suspend(?) doesn't work correctly with the scsi subsystem, however, so you might lose that functionality?

I'd love to hear the results of some tests with one driver vs. the other...
Back to top
View user's profile Send private message
Heretic
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jul 2002
Posts: 114
Location: Austin, TX USA

PostPosted: Wed Jan 14, 2004 11:32 am    Post subject: Reply with quote

ballyn wrote:
Try using the libata drivers (Device Drivers -> SCSI -> SCSI low-level drivers -> Serial ATA (SATA) support -> Silicon Image SATA support). You'll need to disable the "native" IDE driver ("Silicon Image chipset support" under IDE) and disable "Select only drivers expected to compile cleanly"... This seems to be a much more stable driver right now.

I think what Vincent mentioned was that sw suspend(?) doesn't work correctly with the scsi subsystem, however, so you might lose that functionality?

I'd love to hear the results of some tests with one driver vs. the other...


Uhhh... There's a reason sata_sil is listed as BROKEN. It doesn't mask all the SATA PHY specific interrupts yet. Try it, but don't be surprised when you lock up your system. It failed under stress testing for me. I tested the IDE version thoroughly as well; much more robust.
Back to top
View user's profile Send private message
estebann
n00b
n00b


Joined: 16 Jul 2003
Posts: 6

PostPosted: Wed Jan 14, 2004 8:36 pm    Post subject: Reply with quote

Thanks for the reply, I tried the scsi driver and it booted fine, but as heretic warned it would lock up the first time I did anything hd intensive. So, If I can be of any further assistance to you or you to me, It would please me to provide or recieve it.
Back to top
View user's profile Send private message
Heretic
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jul 2002
Posts: 114
Location: Austin, TX USA

PostPosted: Wed Jan 14, 2004 8:48 pm    Post subject: Reply with quote

GTVincent wrote:
Heretic, do you have more reports of this fix interfering with reiserfs, or, for that matter, with any other fs? Or am I the only one?

Since the performance gain using your patch will always come in handy, I would love to be able to see if it does anything for me. Preferably without reformatting, of course :)


I use reiserfs, and have had no problems. Not even my tests on the 2.6 kernel have problems with reiserfs.

However, note the 2.6 kernel isn't as stable as 2.4 was. I had to stay with 2.4 for my production server 'cause I need stability above all else.
Back to top
View user's profile Send private message
ballyn
n00b
n00b


Joined: 14 Aug 2003
Posts: 73

PostPosted: Thu Jan 15, 2004 5:19 pm    Post subject: Reply with quote

Update to libata:

Jeff Garzik (the developer working on libata) posted this yesterday... In general, he suggests using the ide driver instead (so I recant my earlier suggestion about using libata... :) ).

List: linux-kernel
Subject: [SATA] libata update posted, and news
From: Jeff Garzik <jgarzik () pobox ! com>
Date: 2004-01-15 0:34:53

Updates to the Silicon Image and ServerWorks drivers.

News:
* will freeze current codebase as libata 1.0, without queueing support.
libata 2.x development has already begun, and will support queueing,
sata2, and will build upon the existing codebase.
* ServerWorks seems stable, will remove 'beta' label soon

Notes:
* Silicon Image support is still considered to be unstable.
drivers/ide's siimage.c is preferred.
* Silicon Image users with Seagate SATA, particularly if you know if you
have the "mod15write" bug, should make sure that the driver is properly
applying the errata fix.

ChangeSet@1.1513, 2004-01-14 18:44:53-05:00, benh@kernel.crashing.org
[libata sata_svw] cleanup, better probing

* use fewer magic numbers
* probe all 4 ports, using standard SATA SCRs
* limit udma mask to 0x3f
* clean up PPC-specific procfs stuff

ChangeSet@1.1512, 2004-01-14 18:34:48-05:00, arubin@atl.lmco.com
[libata sata_sil] add pci id for Silicon Image 3512

ChangeSet@1.1511, 2004-01-14 18:19:36-05:00, normalperson@yhbt.net
[libata sata_sil] cleaner, better version of errata workarounds
No longer unfairly punishes non-errata Seagate and Maxtor drives.

ChangeSet@1.1474.72.3, 2004-01-06 04:26:01-05:00, marchand@kde.org
[libata sata_sil] add support for adaptec 1210sa, 4-port sii 3114

ChangeSet@1.1474.72.2, 2004-01-06 04:22:09-05:00, jgarzik@redhat.com
[libata sata_svr] fix DRV_NAME to reflect actual driver filename

ChangeSet@1.1474.61.1, 2003-12-30 19:46:09-05:00, jgarzik@redhat.com
[libata sata_sil] unmask interrupts during initialization
Prudent in general, and needed for Adaptec BIOSes.
Back to top
View user's profile Send private message
Tony420
Apprentice
Apprentice


Joined: 16 Mar 2004
Posts: 193
Location: Corona, CA

PostPosted: Fri Mar 19, 2004 1:43 am    Post subject: Reply with quote

does anyone know why my nf7-s 2.0 (3112) shows up as two drives? and will this effect it meaning its not raid0?
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Fri Mar 19, 2004 1:46 am    Post subject: Reply with quote

Tony420 wrote:
does anyone know why my nf7-s 2.0 (3112) shows up as two drives? and will this effect it meaning its not raid0?


that means you are not using a raid driver under linux

but linux is detecting the drives seperately, in NONraid status
_________________
Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer!
Back to top
View user's profile Send private message
Tony420
Apprentice
Apprentice


Joined: 16 Mar 2004
Posts: 193
Location: Corona, CA

PostPosted: Fri Mar 19, 2004 1:47 am    Post subject: Reply with quote

i striped them...do I need to format them in windows first or somthing?
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Fri Mar 19, 2004 1:49 am    Post subject: Reply with quote

Tony420 wrote:
i striped them...do I need to format them in windows first or somthing?


no - it means linux is not using the raid driver, just the silicon ide driver.

you need to load the silicon image raid driver, then you will see /dev/ataraid/disc device, instead of two seperate drives.

are you booting with 2004.0 livecd? I don't know if it supports ataraid, but you can try booting to it with

gentoo doataraid

and see if that works.. someone else here can probably tell you
_________________
Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page Previous  1, 2, 3, 4, 5  Next
Page 4 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum