Bug 12631 - sata_sx4 failed to set xfermode (err_mask=0x4)
Summary: sata_sx4 failed to set xfermode (err_mask=0x4)
Status: RESOLVED PATCH_ALREADY_AVAILABLE
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: Serial ATA (show other bugs)
Hardware: All Linux
: P1 blocking
Assignee: Tejun Heo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-04 02:13 UTC by Roman Valls
Modified: 2009-07-23 21:53 UTC (History)
5 users (show)

See Also:
Kernel Version: 2.6.26.8-1.0.11.smp.gcc3.4.x86.i686
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg (24.34 KB, application/octet-stream)
2009-02-11 08:07 UTC, Roman Valls
Details
acpidump using pmtools-20071116 (68.67 KB, application/octet-stream)
2009-02-11 08:08 UTC, Roman Valls
Details
cat /proc/interrupts (1.11 KB, application/octet-stream)
2009-02-11 08:09 UTC, Roman Valls
Details
kernel 2.6.15 sample .config (54.42 KB, text/plain)
2009-03-17 04:43 UTC, Roman Valls
Details
my working acpidump+dmesg+interrupts using primise port 2 and 4 (28.88 KB, application/x-zip-compressed)
2009-03-19 00:44 UTC, Alessandro Perugini
Details
acpidump, dmesg, interrupts and lspci listing. (32.78 KB, application/x-gzip)
2009-06-12 05:51 UTC, ak.digitalmonkey
Details
dmesg 2.6.18.8 (49.98 KB, application/octet-stream)
2009-07-17 12:29 UTC, hrober
Details
sata_sx4-leave-irq-on.patch (471 bytes, patch)
2009-07-19 02:20 UTC, Tejun Heo
Details | Diff

Description Roman Valls 2009-02-04 02:13:29 UTC
Latest working kernel version: unknown
Earliest failing kernel version: 2.6.24
Distribution: OpenFiler 2.3.1 (rpath based), kernel 2.6.26

Hardware Environment: 
$ lspci
02:0c.0 RAID bus controller: Promise Technology, Inc. PDC20621 [SATA150 SX4] 4 Channel IDE RAID Controller (rev 01)

Software Environment:
$ uname -a
Linux openfiler 2.6.26.8-1.0.11.smp.gcc3.4.x86.i686 #1 SMP Sat Jan 10 22:09:09 GMT 2009 i686 i686 i386 GNU/Linux

Problem Description:

After boot, dmesg reads:

ata2.00: ATA-7: ST3400832AS, 3.01, max UDMA/133
ata2.00: 781422768 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata2.00: qc timeout (cmd 0xef)
ata2.00: failed to set xfermode (err_mask=0x4)
ata2.00: disabled

And there are no /dev/sdX devices to mount. I've tried JBOD an RAID as well as kernel cmdline workarounds such as "irqpoll" but they have no effect.

The original ticket was reported to openfiler bug tracking system:

https://project.openfiler.com/tracker/ticket/880

Steps to reproduce:
1) Boot machine
2) No /dev/sdX devices present
Comment 1 Tejun Heo 2009-02-04 02:22:07 UTC
Can you please attach full kernel boot log?
Comment 2 Roman Valls 2009-02-04 02:45:41 UTC
Here you are. Just for the record, the last thing I tried with cmdline
according to forums: acpi=noirq, no effect):

Initializing cgroup subsys cpuset
Linux version 2.6.26.8-1.0.11.smp.gcc3.4.x86.i686
(openfiler.rpath.org@ofns:2-devel) (gcc version 3.4.4
) #1 SMP Sat Jan 10 22:09:09 GMT 2009
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000e8000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000003ff30000 (usable)
 BIOS-e820: 000000003ff30000 - 000000003ff40000 (ACPI data)
 BIOS-e820: 000000003ff40000 - 000000003fff0000 (ACPI NVS)
 BIOS-e820: 000000003fff0000 - 0000000040000000 (reserved)
 BIOS-e820: 00000000ffb80000 - 0000000100000000 (reserved)
x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
127MB HIGHMEM available.
896MB LOWMEM available.
found SMP MP-table at [c00ff780] 000ff780
Entering add_active_range(0, 0, 261936) 0 entries of 256 used
Zone PFN ranges:
  DMA             0 ->     4096
  Normal       4096 ->   229376
  HighMem    229376 ->   261936
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0:        0 ->   261936
On node 0 totalpages: 261936
  DMA zone: 36 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 4060 pages, LIFO batch:0
  Normal zone: 1980 pages used for memmap
  Normal zone: 223300 pages, LIFO batch:31
  HighMem zone: 287 pages used for memmap
  HighMem zone: 32273 pages, LIFO batch:7
  Movable zone: 0 pages used for memmap
DMI 2.3 present.
Using APIC driver default
ACPI: RSDP 000F9E60, 0021 (r2 ACPIAM)
ACPI: XSDT 3FF30100, 003C (r1 A M I  OEMXSDT   8000320 MSFT       97)
ACPI: FACP 3FF30290, 00F4 (r3 A M I  OEMFACP   8000320 MSFT       97)
ACPI: DSDT 3FF303F0, 382D (r1  P4P81 P4P81086       86 INTL  2002026)
ACPI: FACS 3FF40000, 0040
ACPI: APIC 3FF30390, 005C (r1 A M I  OEMAPIC   8000320 MSFT       97)
ACPI: OEMB 3FF40040, 003F (r1 A M I  OEMBIOS   8000320 MSFT       97)
ACPI: PM-Timer IO Port: 0x808
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
Using ACPI for processor (LAPIC) configuration information
Intel MultiProcessor Specification v1.4
    Virtual Wire compatibility mode.
MPTABLE: OEM ID: ASUSTek  Product ID:  <6>MPTABLE: Product ID:  <6>MPTABLE:
APIC at: 0xFEE00000
I/O APIC #2 Version 32 at 0xFEC00000.
Enabling APIC mode:  Flat.  Using 1 I/O APICs
Processors: 2
Allocating PCI resources starting at 50000000 (gap: 40000000:bfb80000)
PM: Registered nosave memory: 000000000009f000 - 00000000000a0000
PM: Registered nosave memory: 00000000000a0000 - 00000000000e8000
PM: Registered nosave memory: 00000000000e8000 - 0000000000100000
SMP: Allowing 2 CPUs, 0 hotplug CPUs
PERCPU: Allocating 41384 bytes of per cpu data
NR_CPUS: 32, nr_cpu_ids: 2
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 259633
Kernel command line: BOOT_IMAGE=/vmlinuz-2.6.26.8-1.0.11.smp.gcc3.4.x86.i686 ro
root=LABEL=/ quiet irqpoll acpi=noirq
Misrouted IRQ fixup and polling support enabled
This may significantly impact system performance
mapped APIC to ffffb000 (fee00000)
mapped IOAPIC to ffffa000 (fec00000)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 16384 bytes)
Detected 2798.662 MHz processor.
Console: colour VGA+ 80x25
console [tty0] enabled
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1030692k/1047744k available (2352k kernel code, 16356k reserved, 1326k
data, 272k init, 130240k highmem)
virtual kernel memory layout:
    fixmap  : 0xffe13000 - 0xfffff000   (1968 kB)
    pkmap   : 0xff800000 - 0xffc00000   (4096 kB)
    vmalloc : 0xf8800000 - 0xff7fe000   ( 111 MB)
    lowmem  : 0xc0000000 - 0xf8000000   ( 896 MB)
      .init : 0xc079f000 - 0xc07e3000   ( 272 kB)
      .data : 0xc064c08c - 0xc0797b1c   (1326 kB)
      .text : 0xc0400000 - 0xc064c08c   (2352 kB)
Checking if this processor honours the WP bit even in supervisor mode...Ok.
CPA: page pool initialized 1 of 1 pages preallocated
SLUB: Genslabs=12, HWalign=128, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Calibrating delay using timer specific routine.. 5639.46 BogoMIPS
(lpj=11278924)
Security Framework initialized
SELinux:  Disabled at boot.
Capability LSM initialized
Mount-cache hash table entries: 512
Initializing cgroup subsys ns
Initializing cgroup subsys cpuacct
Initializing cgroup subsys devices
CPU: Trace cache: 12K uops, L1 D cache: 8K
CPU: L2 cache: 512K
CPU: Physical Processor ID: 0
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU0: Intel P4/Xeon Extended MCE MSRs (12) available
CPU0: Thermal monitoring enabled
Checking 'hlt' instruction... OK.
ACPI: Core revision 20080321
ACPI: setting ELCR to ce20 (from cc20)
ExtINT not setup in hardware but reported by MP table
ENABLING IO-APIC IRQs
..TIMER: vector=0x31 apic1=0 pin1=2 apic2=0 pin2=0
CPU0: Intel(R) Pentium(R) 4 CPU 2.80GHz stepping 09
Booting processor 1/1 ip 6000
Initializing CPU#1
Calibrating delay using timer specific routine.. 5597.62 BogoMIPS
(lpj=11195248)
CPU: Trace cache: 12K uops, L1 D cache: 8K
CPU: L2 cache: 512K
CPU: Physical Processor ID: 0
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#1.
CPU1: Intel P4/Xeon Extended MCE MSRs (12) available
CPU1: Thermal monitoring enabled
x86 PAT enabled: cpu 1, old 0x7040600070406, new 0x7010600070106
CPU1: Intel(R) Pentium(R) 4 CPU 2.80GHz stepping 09
checking TSC synchronization [CPU#0 -> CPU#1]: passed.
Brought up 2 CPUs
Total of 2 processors activated (11237.08 BogoMIPS).
CPU0 attaching sched-domain:
 domain 0: span 0-1
  groups: 0 1
  domain 1: span 0-1
   groups: 0-1
CPU1 attaching sched-domain:
 domain 0: span 0-1
  groups: 1 0
  domain 1: span 0-1
   groups: 0-1
net_namespace: 660 bytes
Booting paravirtualized kernel on bare hardware
NET: Registered protocol family 16
ACPI: bus type pci registered
PCI: PCI BIOS revision 2.10 entry at 0xf0031, last bus=2
PCI: Using configuration type 1 for base access
Setting up standard PCI resources
ACPI: EC: Look up EC in DSDT
ACPI: Interpreter enabled
ACPI: (supports S0 S1 S3 S4 S5)
ACPI: Using PIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (0000:00)
pci 0000:00:1f.0: Force enabled HPET at 0xfed00000
pci 0000:00:1f.0: quirk: region 0800-087f claimed by ICH4 ACPI/GPIO/TCO
pci 0000:00:1f.0: quirk: region 0480-04bf claimed by ICH4 GPIO
PCI: Transparent bridge - 0000:00:1e.0
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P4._PRT]
ACPI Warning (tbutils-0217): Incorrect checksum in table [OEMB] - 14, should be
05 [20080321]
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
ACPI: bus type pnp registered
pnp: PnP ACPI: found 14 devices
ACPI: ACPI bus type pnp unregistered
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI: Probing PCI hardware
PCI: Using IRQ router PIIX/ICH [8086/24d0] at 0000:00:1f.0
PCI->APIC IRQ transform: 0000:00:1d.0[A] -> IRQ 16
PCI->APIC IRQ transform: 0000:00:1d.1[B] -> IRQ 19
PCI->APIC IRQ transform: 0000:00:1d.2[C] -> IRQ 18
PCI->APIC IRQ transform: 0000:00:1d.3[A] -> IRQ 16
PCI->APIC IRQ transform: 0000:00:1d.7[D] -> IRQ 23
PCI->APIC IRQ transform: 0000:00:1f.1[A] -> IRQ 18
PCI->APIC IRQ transform: 0000:00:1f.2[A] -> IRQ 18
PCI->APIC IRQ transform: 0000:00:1f.3[B] -> IRQ 17
PCI->APIC IRQ transform: 0000:01:00.0[A] -> IRQ 16
PCI->APIC IRQ transform: 0000:02:03.0[A] -> IRQ 20
PCI->APIC IRQ transform: 0000:02:05.0[A] -> IRQ 22
PCI->APIC IRQ transform: 0000:02:0c.0[A] -> IRQ 20
NetLabel: Initializing
NetLabel:  domain hash size = 128
NetLabel:  protocols = UNLABELED CIPSOv4
NetLabel:  unlabeled traffic allowed by default
hpet clockevent registered
ACPI: RTC can wake from S4
system 00:09: ioport range 0x680-0x6ff has been reserved
system 00:09: ioport range 0x290-0x297 has been reserved
system 00:0a: ioport range 0x4d0-0x4d1 has been reserved
system 00:0a: ioport range 0x800-0x87f has been reserved
system 00:0a: ioport range 0x480-0x4bf has been reserved
system 00:0a: iomem range 0xfed20000-0xfed8ffff has been reserved
system 00:0a: iomem range 0xffb00000-0xffbfffff could not be reserved
system 00:0b: ioport range 0x3f6-0x3f6 has been reserved
system 00:0c: iomem range 0xfec00000-0xfec00fff has been reserved
system 00:0c: iomem range 0xfee00000-0xfee00fff has been reserved
system 00:0d: iomem range 0x0-0x9ffff could not be reserved
system 00:0d: iomem range 0xc0000-0xdffff could not be reserved
system 00:0d: iomem range 0xe0000-0xfffff could not be reserved
system 00:0d: iomem range 0x100000-0x3ffeffff could not be reserved
system 00:0d: iomem range 0xfff00000-0xffffffff could not be reserved
PCI: Bridge: 0000:00:01.0
  IO window: c000-cfff
  MEM window: 0xfe700000-0xfe7fffff
  PREFETCH window: 0x00000000e7f00000-0x00000000f7efffff
PCI: Bridge: 0000:00:1e.0
  IO window: d000-dfff
  MEM window: 0xfe800000-0xfeafffff
  PREFETCH window: 0x0000000050000000-0x00000000500fffff
PCI: Setting latency timer of device 0000:00:1e.0 to 64
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
NET: Registered protocol family 1
checking if image is initramfs... it is
Freeing initrd memory: 1569k freed
apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16ac)
apm: disabled - APM is not SMP safe.
audit: initializing netlink socket (disabled)
type=2000 audit(1233741878.484:1): initialized
highmem bounce pool size: 64 pages
Total HugeTLB memory allocated, 0
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
msgmni has been set to 1762
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Switched to high resolution mode on CPU 1
Switched to high resolution mode on CPU 0
pci 0000:00:1d.7: EHCI: BIOS handoff failed (BIOS bug?) 01010001
pci 0000:01:00.0: Boot video device
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
ACPI: ACPI0007:00 is registered as cooling_device0
ACPI: ACPI0007:01 is registered as cooling_device1
Linux agpgart interface v0.103
agpgart: Detected an Intel 865 Chipset.
agpgart: AGP aperture is 64M @ 0xf8000000
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
00:05: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:06: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
brd: module loaded
Uniform Multi-Platform E-IDE driver
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ICH5: IDE controller (0x8086:0x24db rev 0x02) at  PCI slot 0000:00:1f.1
pci 0000:00:1f.1: enabling device (0005 -> 0007)
ICH5: 100% native mode on irq 18
    ide0: BM-DMA at 0xef90-0xef97
    ide1: BM-DMA at 0xef98-0xef9f
Probing IDE interface ide0...
hda: QUANTUM FIREBALLP LM30, ATA DISK drive
hdb: HL-DT-ST DVDRAM GSA-4163B, ATAPI CD/DVD-ROM drive
hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
hda: UDMA/66 mode selected
hdb: host max PIO4 wanted PIO255(auto-tune) selected PIO4
hdb: UDMA/33 mode selected
Probing IDE interface ide1...
ide0 at 0xefe0-0xefe7,0xefae on irq 18
ide1 at 0xefa0-0xefa7,0xefaa on irq 18
ide_generic: please use "probe_mask=0x3f" module parameter for probing all
legacy ISA IDE ports
hda: max request size: 128KiB
hda: 58633344 sectors (30020 MB) w/1900KiB Cache, CHS=58168/16/63
hda: cache flushes not supported
 hda: hda1 hda2 hda3
hdb: ATAPI 40X DVD-ROM DVD-R-RAM CD-R/RW drive, 2048kB Cache
Uniform CD-ROM driver Revision: 3.20
ide-floppy driver 1.00
usbcore: registered new interface driver libusual
PNP: No PS/2 controller found. Probing ports directly.
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice
cpuidle: using governor ladder
cpuidle: using governor menu
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
TCP bic registered
Initializing XFRM netlink socket
NET: Registered protocol family 17
Starting balanced_irq
Using IPI No-Shortcut mode
registered taskstats version 1
Freeing unused kernel memory: 272k freed
rtc_cmos 00:02: rtc core: registered rtc_cmos as rtc0
rtc0: alarms up to one month
SCSI subsystem initialized
Driver 'sd' needs updating - please use bus_type methods
No dock devices found.
libata version 3.00 loaded.
ata_piix 0000:00:1f.2: version 2.12
ata_piix 0000:00:1f.2: MAP [ P0 -- P1 -- ]
PCI: Setting latency timer of device 0000:00:1f.2 to 64
scsi0 : ata_piix
scsi1 : ata_piix
ata1: SATA max UDMA/133 cmd 0xef88 ctl 0xef84 bmdma 0xeeb0 irq 18
ata2: SATA max UDMA/133 cmd 0xef68 ctl 0xef80 bmdma 0xeeb8 irq 18
ata1.00: ATA-7: ST3250820AS, 3.AAC, max UDMA/133
ata1.00: 488397168 sectors, multi 16: LBA48 NCQ (depth 0/32)
ata1.00: configured for UDMA/133
ata2.00: ATA-7: ST3400832AS, 3.03, max UDMA/133
ata2.00: 781422768 sectors, multi 16: LBA48 NCQ (depth 0/32)
ata2.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access     ATA      ST3250820AS      3.AA PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 488397168 512-byte hardware sectors (250059 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
sd 0:0:0:0: [sda] 488397168 512-byte hardware sectors (250059 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
 sda: sda1
sd 0:0:0:0: [sda] Attached SCSI disk
scsi 1:0:0:0: Direct-Access     ATA      ST3400832AS      3.03 PQ: 0 ANSI: 5
sd 1:0:0:0: [sdb] 781422768 512-byte hardware sectors (400088 MB)
sd 1:0:0:0: [sdb] Write Protect is off
sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
sd 1:0:0:0: [sdb] 781422768 512-byte hardware sectors (400088 MB)
sd 1:0:0:0: [sdb] Write Protect is off
sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
 sdb: sdb1
sd 1:0:0:0: [sdb] Attached SCSI disk
sata_sx4 0000:02:0c.0: version 0.12
Local DIMM ECC Enabled
scsi2 : sata_sx4
scsi3 : sata_sx4
scsi4 : sata_sx4
scsi5 : sata_sx4
ata3: SATA max UDMA/133 mmio m1048576@0xfea00000 dimm m32768@0xfe9f8000 port
0xfea00200 irq 20
ata4: SATA max UDMA/133 mmio m1048576@0xfea00000 dimm m32768@0xfe9f8000 port
0xfea00280 irq 20
ata5: SATA max UDMA/133 mmio m1048576@0xfea00000 dimm m32768@0xfe9f8000 port
0xfea00300 irq 20
ata6: SATA max UDMA/133 mmio m1048576@0xfea00000 dimm m32768@0xfe9f8000 port
0xfea00380 irq 20
ata3.00: ATA-7: ST3400832AS, 3.01, max UDMA/133
ata3.00: 781422768 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata3.00: qc timeout (cmd 0xef)
ata3.00: failed to set xfermode (err_mask=0x4)
ata3.00: ATA-7: ST3400832AS, 3.01, max UDMA/133
ata3.00: 781422768 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata3.00: qc timeout (cmd 0xef)
ata3.00: failed to set xfermode (err_mask=0x4)
ata3.00: limiting speed to UDMA/133:PIO3
ata3.00: ATA-7: ST3400832AS, 3.01, max UDMA/133
ata3.00: 781422768 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata3.00: qc timeout (cmd 0xef)
ata3.00: failed to set xfermode (err_mask=0x4)
ata3.00: disabled
ata4.00: ATA-7: ST3400832AS, 3.01, max UDMA/133
ata4.00: 781422768 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata4.00: qc timeout (cmd 0xef)
ata4.00: failed to set xfermode (err_mask=0x4)
ata4.00: ATA-7: ST3400832AS, 3.01, max UDMA/133
ata4.00: 781422768 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata4.00: qc timeout (cmd 0xef)
ata4.00: failed to set xfermode (err_mask=0x4)
ata4.00: limiting speed to UDMA/133:PIO3
ata4.00: ATA-7: ST3400832AS, 3.01, max UDMA/133
ata4.00: 781422768 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata4.00: qc timeout (cmd 0xef)
ata4.00: failed to set xfermode (err_mask=0x4)
ata4.00: disabled
ata5.00: ATA-7: ST3400832AS, 3.01, max UDMA/133
ata5.00: 781422768 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata5.00: qc timeout (cmd 0xef)
ata5.00: failed to set xfermode (err_mask=0x4)
ata5.00: ATA-7: ST3400832AS, 3.01, max UDMA/133
ata5.00: 781422768 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata5.00: qc timeout (cmd 0xef)
ata5.00: failed to set xfermode (err_mask=0x4)
ata5.00: limiting speed to UDMA/133:PIO3
ata5.00: ATA-7: ST3400832AS, 3.01, max UDMA/133
ata5.00: 781422768 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata5.00: qc timeout (cmd 0xef)
ata5.00: failed to set xfermode (err_mask=0x4)
ata5.00: disabled
ata6.00: ATA-7: ST3400832AS, 3.01, max UDMA/133
ata6.00: 781422768 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata6.00: qc timeout (cmd 0xef)
ata6.00: failed to set xfermode (err_mask=0x4)
ata6.00: ATA-7: ST3400832AS, 3.01, max UDMA/133
ata6.00: 781422768 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata6.00: qc timeout (cmd 0xef)
ata6.00: failed to set xfermode (err_mask=0x4)
ata6.00: limiting speed to UDMA/133:PIO3
ata6.00: ATA-7: ST3400832AS, 3.01, max UDMA/133
ata6.00: 781422768 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata6.00: qc timeout (cmd 0xef)
ata6.00: failed to set xfermode (err_mask=0x4)
ata6.00: disabled
USB Universal Host Controller Interface driver v3.0
PCI: Setting latency timer of device 0000:00:1d.0 to 64
uhci_hcd 0000:00:1d.0: UHCI Host Controller
uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 1
uhci_hcd 0000:00:1d.0: irq 16, io base 0x0000eec0
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: UHCI Host Controller
usb usb1: Manufacturer: Linux 2.6.26.8-1.0.11.smp.gcc3.4.x86.i686 uhci_hcd
usb usb1: SerialNumber: 0000:00:1d.0
PCI: Setting latency timer of device 0000:00:1d.1 to 64
uhci_hcd 0000:00:1d.1: UHCI Host Controller
uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:1d.1: irq 19, io base 0x0000ef00
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: UHCI Host Controller
usb usb2: Manufacturer: Linux 2.6.26.8-1.0.11.smp.gcc3.4.x86.i686 uhci_hcd
usb usb2: SerialNumber: 0000:00:1d.1
PCI: Setting latency timer of device 0000:00:1d.2 to 64
uhci_hcd 0000:00:1d.2: UHCI Host Controller
uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:1d.2: irq 18, io base 0x0000ef20
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
usb usb3: New USB device found, idVendor=1d6b, idProduct=0001
usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb3: Product: UHCI Host Controller
usb usb3: Manufacturer: Linux 2.6.26.8-1.0.11.smp.gcc3.4.x86.i686 uhci_hcd
usb usb3: SerialNumber: 0000:00:1d.2
PCI: Setting latency timer of device 0000:00:1d.3 to 64
uhci_hcd 0000:00:1d.3: UHCI Host Controller
uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 4
uhci_hcd 0000:00:1d.3: irq 16, io base 0x0000ef40
usb usb4: configuration #1 chosen from 1 choice
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
usb usb4: New USB device found, idVendor=1d6b, idProduct=0001
usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb4: Product: UHCI Host Controller
usb usb4: Manufacturer: Linux 2.6.26.8-1.0.11.smp.gcc3.4.x86.i686 uhci_hcd
usb usb4: SerialNumber: 0000:00:1d.3
PCI: Setting latency timer of device 0000:00:1d.7 to 64
ehci_hcd 0000:00:1d.7: EHCI Host Controller
ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 5
ehci_hcd 0000:00:1d.7: debug port 1
PCI: cache line size of 128 is not supported by device 0000:00:1d.7
ehci_hcd 0000:00:1d.7: irq 23, io mem 0xfebff800
usb 2-1: new low speed USB device using uhci_hcd and address 2
ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb5: configuration #1 chosen from 1 choice
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 8 ports detected
hub 2-0:1.0: unable to enumerate USB device on port 1
usb usb5: New USB device found, idVendor=1d6b, idProduct=0002
usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb5: Product: EHCI Host Controller
usb usb5: Manufacturer: Linux 2.6.26.8-1.0.11.smp.gcc3.4.x86.i686 ehci_hcd
usb usb5: SerialNumber: 0000:00:1d.7
async_tx: api initialized (async)
xor: automatically using best checksumming function: pIII_sse
   pIII_sse  :  3540.000 MB/sec
xor: using function: pIII_sse (3540.000 MB/sec)
raid6: int32x1    794 MB/s
raid6: int32x2    645 MB/s
raid6: int32x4    553 MB/s
raid6: int32x8    540 MB/s
raid6: mmxx1     1928 MB/s
usb 2-1: new low speed USB device using uhci_hcd and address 3
raid6: mmxx2     2618 MB/s
raid6: sse1x1    1571 MB/s
raid6: sse1x2    2482 MB/s
usb 2-1: configuration #1 chosen from 1 choice
input: Justcom Technology USB KVM Switch as /class/input/input0
raid6: sse2x1    2995 MB/s
raid6: sse2x2    2859 MB/s
raid6: using algorithm sse2x1 (2995 MB/s)
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
md: raid10 personality registered for level 10
input,hidraw0: USB HID v1.10 Keyboard [Justcom Technology USB KVM Switch] on
usb-0000:00:1d.1-1
input: Justcom Technology USB KVM Switch as /class/input/input1
input,hidraw1: USB HID v1.10 Mouse [Justcom Technology USB KVM Switch] on
usb-0000:00:1d.1-1
usb 2-1: New USB device found, idVendor=06f2, idProduct=0011
usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1: Product: USB KVM Switch
usb 2-1: Manufacturer: Justcom Technology
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
warning: process `kmodule' used the deprecated sysctl system call with 1.23.
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
skge 1.13 addr 0xfe9f0000 irq 22 chip Yukon rev 1
skge eth0: addr 00:0c:6e:ba:cd:80
iTCO_vendor_support: vendor-support=0
iTCO_wdt: Intel TCO WatchDog Timer Driver v1.03 (30-Apr-2008)
iTCO_wdt: Found a ICH5 or ICH5R TCO device (Version=1, TCOBASE=0x0860)
iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[20]  MMIO=[fe9f7800-fe9f7fff] 
Max Packet=[2048]  IR/IT contexts=[4/8]
input: Power Button (FF) as /class/input/input2
ACPI: Power Button (FF) [PWRF]
input: Power Button (CM) as /class/input/input3
ACPI: Power Button (CM) [PWRB]
ACPI: WMI: Mapper loaded
md: Autodetecting RAID arrays.
md: Scanned 0 and added 0 devices.
md: autorun ...
md: ... autorun DONE.
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.13.0-ioctl (2007-10-18) initialised:
dm-devel@redhat.com
device-mapper: multipath: version 1.0.5 loaded
ieee1394: Host added: ID:BUS[0-00:1023]  GUID[00e0180000347e4e]
EXT3 FS on hda2, internal journal
kjournald starting.  Commit interval 5 seconds
EXT3 FS on hda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Adding 2040244k swap on /dev/hda3.  Priority:-1 extents:1 across:2040244k
warning: process `kudzu' used the deprecated sysctl system call with 1.23.
warning: process `kudzu' used the deprecated sysctl system call with 1.49.
warning: process `kudzu' used the deprecated sysctl system call with 1.49.
skge eth0: enabling interface
skge eth0: Link is up at 100 Mbps, full duplex, flow control none
aoe: AoE v64 initialised.
Loading iSCSI transport class v2.0-869.
iscsi: registered transport (tcp)
iscsi: registered transport (iser)
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
eth0: no IPv6 routers present
Comment 3 Roman Valls 2009-02-06 07:37:15 UTC
Same issue on latest vanilla kernel (2.6.28.3) from kernel.org.
Comment 4 Tejun Heo 2009-02-11 00:52:14 UTC
Definitely looks like IRQ routing problem.  Don't know why irqpoll isn't working tho.  cc'ing Rafael and Thomas.  SETXFERMODE is the first command which is processed via IRQ.  Given that IDENTIFY (polling PIO) went okay and SETXFERMODE fails with timeout, it's highly likely to be an IRQ problem.  Any ideas on how to proceed?
Comment 5 Rafael J. Wysocki 2009-02-11 01:36:28 UTC
Roman, please also attach dmesg without any extra options (please attach, don't paste it into a comment).
Comment 6 Thomas Renninger 2009-02-11 02:54:25 UTC
Please also attach acpidump output and /proc/interrupts.
Comment 7 Roman Valls 2009-02-11 08:07:38 UTC
Created attachment 20194 [details]
dmesg

dmesg without additional options
Comment 8 Roman Valls 2009-02-11 08:08:40 UTC
Created attachment 20195 [details]
acpidump using pmtools-20071116
Comment 9 Roman Valls 2009-02-11 08:09:16 UTC
Created attachment 20196 [details]
cat /proc/interrupts
Comment 10 Roman Valls 2009-02-11 08:49:05 UTC
Just for the record, I tried disabling on BIOS:

ACPI 2.0 support
ACPI/APM AML

Same effect.
Comment 11 Rafael J. Wysocki 2009-02-11 13:16:25 UTC
(In reply to comment #7)
> Created an attachment (id=20194) [details]
> dmesg
> 
> dmesg without additional options

Hm.  This dmesg doesn't seem to show the problem described in the original report.  Evidently, there are sda and sdb in there, with partitions.
Comment 12 Roman Valls 2009-02-11 13:28:30 UTC
You can just ignore sda & sdb, they're connected to the mainboard ata chipset, not to the promise controller. In fact, they are detected by ata_piix, a different driver.

You should read from the line that reads:

sata_sx4 0000:02:0c.0: version 0.12
(...)

It tries to detect the 4 disks which are connected to the promise (sata_sx4) controller.
Comment 13 Rafael J. Wysocki 2009-02-11 13:59:05 UTC
Ah, ok, sorry.  I'm evidently too tired.
Comment 14 Roman Valls 2009-02-20 01:31:47 UTC
Is there any way I can set xfermode manually ? On kernel cmdline at boot, for instance ?

I looked for ATA_DEBUG on libata.h as the following bug suggests:

https://bugzilla.redhat.com/show_bug.cgi?id=199034

But apparently things have changed so much since then .. :-/

What would you suggest as next steps to debug this issue ?
Comment 15 Roman Valls 2009-02-25 08:41:48 UTC
Checking the manufacturer site:

http://www.promise.com/support/download/download2_eng.asp?productId=112&category=all&os=100&go=GO

There's no useful BIOS update, driver or source that could be used to fix this issue. The linux pre-compiled drivers obviously do not work on newer kernels/distros.
Comment 16 Tejun Heo 2009-02-25 16:38:12 UTC
Roman, what do you mean by setting xfermode manually?
Comment 17 Roman Valls 2009-02-25 23:33:49 UTC
I'm just guessing but... does xfermode refer to PIO[1..4], UDMA[33,66,100] (transfer) modes ? My question was about to force one of this modes on boot time, if it's even possible and/or useful to try.

Tejun, I'm ready to munge with debugging options and kernel code, which path/test do you recommend me to get started on ATA subsystems ?
Comment 18 Tejun Heo 2009-02-26 03:00:21 UTC
(In reply to comment #17)
> I'm just guessing but... does xfermode refer to PIO[1..4], UDMA[33,66,100]
> (transfer) modes ? My question was about to force one of this modes on boot
> time, if it's even possible and/or useful to try.

You can override it using module parameter libata.force=pio4 (or any other mode) but I doubt it has any impact on the problem you're seeing.

> Tejun, I'm ready to munge with debugging options and kernel code, which
> path/test do you recommend me to get started on ATA subsystems ?

It looks much more like an IRQ routing problem.  ATA just seems to be getting hit by it.  Rafael, any ideas?
Comment 19 Thomas Renninger 2009-02-26 04:24:02 UTC
I couldn't see anything obvious.
Does init=/bin/bash work?
Hmm, init=/bin/bash eventually already loads a lot drivers...
Best is you compile in (not as a module) your needed sata and other most important drivers (you could even try to leave out ata_piix and only put in sata_sx4 on a second try, maybe both do not like each other?).
With some luck this works for you:
cp arch/x86/configs/x86_64_defconfig .config
Then edit .config and make sure sata_sx4 is set to =y
Then boot without an initrd and init=/bin/bash
Is the sata device initialized fine now?
Comment 20 Thomas Renninger 2009-02-26 04:26:03 UTC
> Earliest failing kernel version: 2.6.24
Does that mean it worked before or did you not try earlier kernels (no need to try, just to know whether something broke)?
Comment 21 Roman Valls 2009-03-09 09:06:38 UTC
> Earliest failing kernel version: 2.6.24
It means that I started trying with kernel 2.6.24, the one that comes with OpenFiler by default. 

I'll try your other suggestions soon, thanks for the feedback !
Comment 22 Roman Valls 2009-03-09 09:46:15 UTC
I've just tried what Thomas suggested with latest 2.6.28.3 kernel using init=/bin/bash & sata_sx4 compiled-in instead of module and it does not work either :-/

I also tried booting with a knoppix 5.3 livecd, same effect.

Next steps to try:

1) Disable PIIX driver, but I'm afraid it's not gonna boot, provided that the system is installed on drives connected to this onboard controller.

2) Try to compile & run kernel 2.6.15 which has a quite different sata_sx4 revision.

More and/or better ideas ?

Thanks for your support
Comment 23 Roman Valls 2009-03-09 10:31:50 UTC
Confirmed ! It works under 2.6.15.1 with irqpoll cmdline option and JBOD config.

Therefore, something is obviously broken between sata_sx4.c versions 0.8 and 0.12 (or the underlying kernel SATA subsystems). You can ask me to try patches on the newest kernels if you spot where the bug is.

Thanks again for your assistance !
Comment 24 Roman Valls 2009-03-10 08:49:39 UTC
Warning ! For some reason, running the previous kernel (2.6.15.1) for a while let the system's hard drive (hda) corrupted and unbootable (not the ones connected to sata_sx4 controller (sda,sdb,sdc,sdd)).

Symptom:

INIT: "No inittab file found"
Enter runlevel:

:-!

So watch out if you try this on your own.
Comment 25 Thomas Renninger 2009-03-11 08:10:23 UTC
> It works under 2.6.15.1 with irqpoll
But not without? So the irqs are set up wrong there already.
I am out of ideas, but the fact that irqpoll is needed in these kernels, seem to point to general irq set up, not sata drivers.
Comment 26 Roman Valls 2009-03-11 09:48:39 UTC
I've just had a look at Documentation/kernel-parameters.txt... do you think any particular combination on the "pci=" cmdline setting could help ? In other words, is there a way to set a fixed IRQ per PCI slot ?

I'm aware that some BIOSes could do that in the past, but it's not my case with this machine :-/
Comment 27 Alessandro Perugini 2009-03-13 16:27:01 UTC
i have proliant ml110 G4 with debian etch kernel 2.6.18-6.

with only one disk installed in the controller it works (with some error, some times it switch in read only mode...)

if i can send some information to help us say me....
Comment 28 Roman Valls 2009-03-17 03:33:37 UTC
Hi Alessandro,

Please, attach your dmesg+acpidump+/proc/interrupts, to compare them with my case.

Thanks for your feedback !
Roman
Comment 29 Roman Valls 2009-03-17 04:43:26 UTC
Created attachment 20566 [details]
kernel 2.6.15 sample .config

Kernel config used to test sata_sx4 v0.8 with kernel 2.6.15.1. This config lead to a massive filesystem corruption.
Comment 30 Alessandro Perugini 2009-03-19 00:43:00 UTC
i have partially solved; 
with kernel 2.6.18-6 (debian) 
if i disable pata (old eide) support from ML110G4 matherboard bios i will stop error (err_mask=0x4) but with more filesystem corruption.

i have seen the disk in error is every time the one in the first slot of the array (port 1 of controller).
now i have solved moving the disk on the port 2 and 4... and it seem to work!
now i have only 2 disk in raid 1 (mirroring) using bay 2 and 4!

if i upgrade the kernel it will not detect any disk.

sorry for my very bad english
Alessandro

P.S. i atach my dmesg+interruptsèacpidump
Comment 31 Alessandro Perugini 2009-03-19 00:44:44 UTC
Created attachment 20592 [details]
my working acpidump+dmesg+interrupts using primise port 2 and 4
Comment 32 ak.digitalmonkey 2009-06-12 05:51:11 UTC
Created attachment 21865 [details]
acpidump, dmesg, interrupts and lspci listing.

I can confirm that I have the same behaviour on an Intel Server Board (SE7505VB2).

Running Ubuntu Server 9.04, uname output below:
"2.6.28-11-server #42 Ubuntu SMP Fri Apr 17 02:48:10 UTC 2009"

I have re-arranged the controller in different pci slots, attempted to run it with drives only in the second and third slot and tried booting with irqpoll to no avail.
Comment 33 Rob Geelen 2009-07-07 17:31:48 UTC
I have the exact same issue, and tried several things.
Also removed USB support from BIOS, but no luck there. So I'm anctiously waiting for a possible solution as I need to get this fixed.
(My problem started after I had to replace my main board, and the installed linux version didn't want to boot at all. I then decided to install latest fedora code on my ide drive, but now stuck without sata disks :( )
Comment 34 Tejun Heo 2009-07-08 07:02:42 UTC
Hmmm... similar problems on different machines.  This is a add-in card, right?  Which products are you guys using?  Let's see if I can get hold of one here.

Thanks.
Comment 35 Roman Valls 2009-07-08 09:41:13 UTC
By products I guess you mean Kernel version, which is the component that is failing (IMHO, there are no userland issues). If you want to know when it started failing for me, have a look at comment 23:

http://bugzilla.kernel.org/show_bug.cgi?id=12631#c23

I managed to get it working using 2.6.15.1 but corrupted filesystems soon afterwards (comment 24).
Comment 36 Tejun Heo 2009-07-08 09:56:34 UTC
I meant the physical add-on controller.  Sorry about not being clear.
Comment 37 Roman Valls 2009-07-08 10:03:47 UTC
Ok, in that case I have a:

Promise FastTrack S150 SX4-M Rev.A

The main processor on this controller reads: ATA RAID5 PDC20621
Comment 38 Rob Geelen 2009-07-08 15:05:03 UTC
I have the exact same add-on controller.

I tried a disk connected directly to the main board sata, and that discoveres just fine. So the add-on adapter seems to be the problem.
Even when I turn off the board-sata completely, the symptoms stay the same.
Comment 39 Rob Geelen 2009-07-09 19:21:42 UTC
I booted from FC7 cdrom, and during that boot it was obvious the disks were discovered (complaining that they had unreadable data or something). After installing FC7, the disks did not show any more :(

Now booted from FC5 cdrom and again disks show. Installed FC5 and voila, without any adaptions, or kernel settings the disks are shown, and I can assemble a raid disk. (Even better, the original data is still on there !)

So, a working kernel version is 2.6.15-1.2054


I now have two disks, one running this older kernel version, which does see my sata disks, and one on which I can do whatever you want to get the same result.

One major difference I can tell, is that in this kernel the ide disks are still seen as hdx, where in the not functioning kernels they are also converted to sdx.
(Not sure if that points to a certain directory, but I felt it was better to mention it)

So, if you have any ideas, or want some certain tests run on a non working distro (without tampering with the actual disk content), let me know and I'm happy to assist. (as far as my time lets me)
Comment 40 Tejun Heo 2009-07-15 08:24:57 UTC
Can you please post boot logs from FC7?  IIUC, ide ignored SETXFER failures, so that might be it.
Comment 41 Tejun Heo 2009-07-15 08:27:17 UTC
Eh... can't find any vendor which carries the specific controller over here.  :-(
Comment 42 hrober 2009-07-17 02:43:36 UTC
Hi  folks!

Following the suggests founds here, I downgraded my kernel to 2.6.18.8 and fixed it.

if anyone want to get my kernel configuration, please visit: http://tips.blog.br/files/config-2.6.18.8

and here you can find a little steps (in portuguese) http://tips.blog.br/2009/?p=3

sorry for english!
Comment 43 Tejun Heo 2009-07-17 03:13:46 UTC
Can you please attach boot log from 2.6.18?
Comment 44 hrober 2009-07-17 12:29:32 UTC
Created attachment 22388 [details]
dmesg 2.6.18.8
Comment 45 Tejun Heo 2009-07-19 02:20:24 UTC
Created attachment 22397 [details]
sata_sx4-leave-irq-on.patch

Does this patch make any difference?
Comment 46 Rob Geelen 2009-07-21 17:59:37 UTC
Hi, sounds crazy, but it has been since redhat 9 that I lost all track of linux. So what's the best way of applying the patch ?
Already downloaded the kernels and stuff, and ready to build a new one. Lots has changed since I last done that....

If you have an easy to use way of applying this patch, than please let me know.
Comment 47 Tejun Heo 2009-07-22 03:14:51 UTC
The following doc should be sufficient.  The only additional step is "patch -p1 < PATCH_FILE" in /usr/src/linux after unpacking the kernel.

  http://www.cromwell-intl.com/unix/linux-kernel.html
Comment 48 Rob Geelen 2009-07-22 20:27:53 UTC
Thanks for that. Together with this and the 'fedora way' of burning new kernels, I tried to run the patch on my 2.6.29.4-167.fc11.i686 kernel, but failed.

patch -p1 < sata_sx4-leave-irq-on.patch 
patching file drivers/ata/sata_sx4.c
Hunk #1 FAILED at 867.
1 out of 1 hunk FAILED -- saving rejects to file drivers/ata/sata_sx4.c.rej

# cat sata_sx4.c.rej 
***************
*** 867,873 ****
  	/* FIXME: if all 4 ATA engines are stopped, also stop HDMA engine */
  
  	tmp = readl(mmio + PDC_CTLSTAT);
- 	tmp |= PDC_MASK_INT;
  	tmp &= ~PDC_DMA_ENABLE;
  	writel(tmp, mmio + PDC_CTLSTAT);
  	readl(mmio + PDC_CTLSTAT); /* flush */
--- 867,873 ----
  	/* FIXME: if all 4 ATA engines are stopped, also stop HDMA engine */
  
  	tmp = readl(mmio + PDC_CTLSTAT);
+ 	//tmp |= PDC_MASK_INT;
  	tmp &= ~PDC_DMA_ENABLE;
  	writel(tmp, mmio + PDC_CTLSTAT);
  	readl(mmio + PDC_CTLSTAT); /* flush */


I see only one PDC_CTLSTAT in the sata_sx4.c file
I do see things like :

$ cat sata_sx4.c | grep CTLSTAT
	PDC_HDMA_CTLSTAT	= 0x12C, /* Host DMA control / status */
	PDC_CTLSTAT		= 0x60,	/* IDEn control / status */
				readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT));
				readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT));
				readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT));
				readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT));
	tmp = readl(mmio + PDC_HDMA_CTLSTAT);
	writel(tmp, mmio + PDC_HDMA_CTLSTAT);
	readl(mmio + PDC_HDMA_CTLSTAT);		/* flush */
	tmp = readl(mmio + PDC_HDMA_CTLSTAT);
	writel(tmp, mmio + PDC_HDMA_CTLSTAT);
	readl(mmio + PDC_HDMA_CTLSTAT);		/* flush */
Comment 49 Tejun Heo 2009-07-23 03:01:17 UTC
Please try with 2.6.30.2.  You should be able to use the same config file w/ oldconfig.
Comment 50 Rob Geelen 2009-07-23 21:12:00 UTC
Oke, downloaded that kernel, and what I now did was the following :

I copied existing config over, and ran make menuconfig (I prefer menuconfig, but that's personal) I noticed that the promise adapter was a module by default, so I made sure it was embedded in the kernel itself.
At this point I made the new kernel, even without the patch (unless this is accidently picked up somewhere, but I doubt that). 
After booting the new kernel I could actually see the sata disks !!!!!!!

Unfortunately for me the array would not assemble, but that could be me done something wrong earlier. Figuring that out now. Will keep you posted.
Comment 51 Rob Geelen 2009-07-23 21:35:39 UTC
Following worked to get the array active :

# losetup /dev/loop0 /dev/sdc
# losetup /dev/loop1 /dev/sdd
# losetup /dev/loop2 /dev/sde
# losetup /dev/loop3 /dev/sdf
# mdadm --assemble /dev/md0 /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3
mdadm: /dev/md0 has been started with 4 drives

So, big question now, was it the kernel in itself, or the fact that I changed promise to be loaded into the kernel, rather then being a module ?

Or did the patch somehow make it into my kernel. How can I check this ?
Comment 52 Tejun Heo 2009-07-23 21:53:44 UTC
It's most likely the driver itself.  Oh... this one.  The patch is from rh.  Maybe it will show up as kernel update soonish?  Anyways, resolving as PATCH_ALREADY_AVAILABLE.  Thanks.

commit 19799bfc5da476ad72eecc5f0f9018c5d351cbd5
Author: David Milburn <dmilburn@redhat.com>
Date:   Wed May 13 18:02:21 2009 -0500

    [libata] sata_sx4: fixup interrupt handling
    
    Issuing ATA_CMD_SET_FEATURES (0xef) times out because
    pdc20621_interrupt ignores command completion since
    ATA_TFLAG_POLLING flag is set.
    
    This has already been fixed for sata_promise:
    
    commit 51b94d2a5a90d4800e74d7348bcde098a28f4fb3
    Author: Tejun Heo <htejun@gmail.com>
    Date:   Fri Jun 8 13:46:55 2007 -0700
    
        sata_promise: use TF interface for polling NODATA commands
    
    Also, this patch includes Mikael's original patches:
    
    http://marc.info/?l=linux-ide&m=121135828227724&w=2
    http://marc.info/?l=linux-ide&m=121144512109826&w=2
    
    Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
    Signed-off-by: David Milburn <dmilburn@redhat.com>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

Note You need to log in before you can comment on or make changes to this bug.