1If you have a IBM IDE hard disk on Solaris x86 and did enable DMA for ata,
2then your system may hang after a reboot due to a firmware bug in the IBM
3drive. On Solaris 9 you may edit the config file /platform/i86pc/kernel/drv/ata.conf
4see also man ata.
5
6On earlier versions, you need to patch the ata driver (see below):
7
8Juergen Keil <jk@tools.de>
9
10Bruce posted a patch for this problem some time ago:
11
12http://groups.google.com/groups?q=solaris+DMA+IBM+timeout&hl=en&lr=&safe=off&site=groups
13
14http://groups.google.com/groups?hl=en&safe=off&th=28213cb0f9e4067b,8&seekm=wywvaq7dvy.fsf%40tools.de#p
15
16/*--------------------------------------------------------------------------*/
17
18> >> "Bruce Adler" <bruce.NxOxSxPxAxMx.adler@acm.org> writes:
19> >> ...
20> >> > Here's a patch that will change the Solaris 8 FCS ata driver's 0xCC
21> >> > command into a 0x66:
22> >> >
23> >> > cd /platform/i86pc/kernel/drv
24> >> > cp ata ata.SAVE
25> >> > adb -w ata<<EOF
26> >> >     ata_devo_reset+0x54?w 0xaa68  ;; was 0xcc68
27> >> > EOF
28> >>
29> >> Small typo, that should be
30> >>
31> >>   ata_devo_reset+0x54?w 0x6668
32> >>
33> >> > This should change the "pushl 0xcc" into a "pushl 0xaa" just before
34> >> > the call to ata_set_feature().
35> >>
36> >> Indeed, changing the "pushl 0xcc" into a "pushl 0x66" fixes the reboot
37> >> problem!
38/*--------------------------------------------------------------------------*/
39ata_devo_reset,50?ai
40ata_devo_reset:
41ata_devo_reset: pushl   %ebp
42ata_devo_reset+1:               movl    %esp,%ebp
43ata_devo_reset+3:               subl    $4,%esp
44ata_devo_reset+6:               pushl   %ebx
45ata_devo_reset+7:               pushl   %esi
46ata_devo_reset+8:               pushl   %edi
47ata_devo_reset+9:               cmpl    $0,+0xc(%ebp)
48ata_devo_reset+0xd:             je      +0xb            <ata_devo_reset+0x18>
49ata_devo_reset+0xf:             xorl    %eax,%eax
50ata_devo_reset+0x11:            popl    %edi
51ata_devo_reset+0x12:            popl    %esi
52ata_devo_reset+0x13:            popl    %ebx
53ata_devo_reset+0x14:            movl    %ebp,%esp
54ata_devo_reset+0x16:            popl    %ebp
55ata_devo_reset+0x17:            ret
56ata_devo_reset+0x18:            pushl   +8(%ebp)
57ata_devo_reset+0x1b:            call    +1              <ata_devo_reset+0x1c>
58ata_devo_reset+0x20:            addl    $4,%esp
59ata_devo_reset+0x23:            pushl   %eax
60ata_devo_reset+0x24:            pushl   0
61ata_devo_reset+0x2a:            call    +1              <ata_devo_reset+0x2b>
62ata_devo_reset+0x2f:            addl    $8,%esp
63ata_devo_reset+0x32:            movl    %eax,%edi
64ata_devo_reset+0x34:            testl   %edi,%edi
65ata_devo_reset+0x36:            je      +0x8d           <ata_devo_reset+0xc3>
66ata_devo_reset+0x3c:            movl    $1,-4(%ebp)
67ata_devo_reset+0x43:            xorl    %esi,%esi
68ata_devo_reset+0x45:            nop
69ata_devo_reset+0x46:            nop
70ata_devo_reset+0x47:            nop
71ata_devo_reset+0x48:            movl    %esi,%eax
72ata_devo_reset+0x4a:            shll    $6,%eax
73ata_devo_reset+0x4d:            movl    +0xc(%edi,%eax),%ebx
74ata_devo_reset+0x51:            testl   %ebx,%ebx
75ata_devo_reset+0x53:            je      +0x4d           <ata_devo_reset+0xa0>
76ata_devo_reset+0x55:            movl    +0x204(%ebx),%eax
77ata_devo_reset+0x5b:            andl    $2,%eax
78ata_devo_reset+0x5e:            je      +0x13           <ata_devo_reset+0x71>
79ata_devo_reset+0x60:            pushl   $0
80ata_devo_reset+0x62:            pushl   $0x66		<<<======== War vorher pushl $0xcc
81ata_devo_reset+0x67:            pushl   %ebx
82ata_devo_reset+0x68:            pushl   %edi
83ata_devo_reset+0x69:            call    +0x1846         <ata_set_feature>
84ata_devo_reset+0x6e:            addl    $0x10,%esp
85ata_devo_reset+0x71:            movl    +0x204(%ebx),%eax
86ata_devo_reset+0x77:            andl    $1,%eax
87ata_devo_reset+0x7a:            je      +0x11           <ata_devo_reset+0x8b>
88
89
90Note that the exact position of the instruction that needs to be patched
91may vary depending on the version of Solaris you use. Be extremely careful
92when applying the patch.
93