# SATA: The right way

## qnx

I just got a Seagate SATA drive and connected it, together with my "old" one PATA I now have two disks. The SATA drive is still empty. All OS:es and stuff are on PATA. I also boot from PATA's MBR. 

Now I am wondering how to make use of my new SATA disk the best, most efficient way. I enabled libata's Silicon Images driver for SATA in the kernel. However, my motherboard is nForce2-based, so I am wondering if I maybe should go with libata's Nvidia-driver? 

It's working with the Silicon driver, I have /dev/sda for my new disk. 

However, this makes a problem, since my card reader also uses SCSI-subsystem and used to allocate the 7-in-1 reader's devices starting at /dev/sda and ending with /dev/sdd . And /dev/sdd1 happes to be the one device I want to access from there - Memory Stick card. The new SATA disk creates a problem cause it takes /dev/sda. One might think that the card reader is just "moved up" one step in the SCSI subsystem but unfortunately for me, no /dev/sde1 is present. There is something called /dev/sde however, but I can not use that device for mounting - seems to be something else. 

Questions:

1. Which SATA driver should I use for a Seagate 7200.7 SATA on Abit NF7-S nForce2-based?

2. Can I boot from the SATA drive's MBR without removing the PATA disk?

3. How can I access my memory stick when SATA is taking my /dev/sda ?

Thanks for reading!

----------

## NeddySeagoon

qnx,

Run lspci. You should use the SATA driver for teh chipset it shows you.

You can boot from the SATA MBR if you want to.

If you have a fstab entry for your memory stick you will need to change it by mounting with the long form of the command should stilll work.

----------

## qnx

Thanks for replying. 

Now I got it all working and am copying some files. Or have copied before I started X and begun with other stuff, so that the copying could occur at maximum speed. However, copying from PATA to SATA (both Seagate 7200.7) gave me a max speed at 20-21MB/s, which is a bit low, isn't it? 

Seems like there's no DMA enabled on the SATA:

```
bash-2.05b# hdparm /dev/sda

/dev/sda:

 HDIO_GET_MULTCOUNT failed: Inappropriate ioctl for device

 IO_support   =  0 (default 16-bit)

 readonly     =  0 (off)

 readahead    = 256 (on)

 geometry     = 24321/255/63, sectors = 200049647616, start = 0

```

How about this?

----------

## NeddySeagoon

qnx,

DMA is always enabled on SATA. Its part of the design. However, the software is not required to use it.

Some chipset/drive combinations are 'blacklisted' by the driver. For them, DMA is not used.

To know if your hardware is blackisted you need to read the kernel code, or google may turn up something.

Your data rate looks too fast for PIO modes.

----------

## qnx

This really looks bad...

```
bash-2.05b# hdparm -tT /dev/hda

/dev/hda:

 Timing cached reads:   1436 MB in  2.00 seconds = 717.39 MB/sec

 Timing buffered disk reads:  150 MB in  3.14 seconds =  47.82 MB/sec

bash-2.05b# hdparm -tT /dev/sda

/dev/sda:

 Timing cached reads:   1476 MB in  2.00 seconds = 736.27 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

 Timing buffered disk reads:   60 MB in  3.08 seconds =  19.50 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

```

----------

## NeddySeagoon

qnx,

Doing  

```
grep -R blacklist ./*
```

in the kerenl tree turns up

```
./drivers/scsi/libata-core.c:   printk(KERN_WARNING "ata%u: dev %u is on DMA blacklist, disabling DMA\n",
```

Look in dmesg near the start, as the drive is detected. That message will be bad news.

----------

## qnx

```
bash-2.05b# dmesg|grep blacklist

```

I was also affraid of this, have seen this page among others.. But it doesn't seem I'm affected, after all. 

But I'll give you my dmesg, in case I missed something:

```
bash-2.05b# dmesg

  HighMem zone: 0 pages, LIFO batch:1

DMI 2.2 present.

ACPI: RSDP (v000 Nvidia                                ) @ 0x000f6b00

ACPI: RSDT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1fff3000

ACPI: FADT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1fff3040

ACPI: MADT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1fff79c0

ACPI: DSDT (v001 NVIDIA AWRDACPI 0x00001000 MSFT 0x0100000d) @ 0x00000000

ACPI: PM-Timer IO Port: 0x4008

ACPI: Local APIC address 0xfee00000

ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)

Processor #0 6:10 APIC version 16

ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])

ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])

IOAPIC[0]: apic_id 2, version 17, address 0xfec00000, GSI 0-23

ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)

ACPI: BIOS IRQ0 pin2 override ignored.

ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)

ACPI: IRQ9 used by override.

Enabling APIC mode:  Flat.  Using 1 I/O APICs

Using ACPI (MADT) for SMP configuration information

Allocating PCI resources starting at 20000000 (gap: 20000000:dec00000)

Built 1 zonelists

Kernel command line: root=/dev/hda6 video=vesafb:1024x768-32@75

mapped APIC to ffffd000 (fee00000)

mapped IOAPIC to ffffc000 (fec00000)

Initializing CPU#0

PID hash table entries: 2048 (order: 11, 32768 bytes)

Detected 1837.255 MHz processor.

Using pmtmr for high-res timesource

Console: colour VGA+ 80x25

Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)

Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)

Memory: 514672k/524224k available (2699k kernel code, 8996k reserved, 1033k data, 180k init, 0k highmem)

Checking if this processor honours the WP bit even in supervisor mode... Ok.

Calibrating delay loop... 3637.24 BogoMIPS (lpj=1818624)

Mount-cache hash table entries: 512

CPU: After generic identify, caps: 0383fbff c1c3fbff 00000000 00000000 00000000 00000000 00000000

CPU: After vendor identify, caps: 0383fbff c1c3fbff 00000000 00000000 00000000 00000000 00000000

CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)

CPU: L2 Cache: 512K (64 bytes/line)

CPU: After all inits, caps: 0383fbff c1c3fbff 00000000 00000020 00000000 00000000 00000000

Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#0.

CPU: AMD Athlon(tm)  stepping 00

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Checking 'hlt' instruction... OK.

|---------------------------------------------------------------|

| Version : 2.6.12-rc2-love1                      ,o8o, ,o8o,   |

| made by fallow for Love-Community             ,888888,888888, |

| PLEASE DON'T REPORT ANY BUG TO GENTOO DEVS    888888888888888 |

| for the support please join #love-sources     888888888888888 |

| on freenode or post in the love thread        `8888888888888' |

| on Unsupported Software forum <Gentoo Forums>   `888888888'   |

|                                                   `88888'     |

| GENETIC NICKSCHED doesnt compiled into kernel       `8'       |

|---------------------------------------------------------------|

Running with "nicksched" cpu scheduler.

ENABLING IO-APIC IRQs

..TIMER: vector=0x31 pin1=0 pin2=-1

NET: Registered protocol family 16

PCI: PCI BIOS revision 2.10 entry at 0xfb420, last bus=2

PCI: Using configuration type 1

mtrr: v2.0 (20020519)

ACPI: Subsystem revision 20050309

ACPI: Interpreter enabled

ACPI: Using IOAPIC for interrupt routing

ACPI: PCI Root Bridge [PCI0] (0000:00)

PCI: Probing PCI hardware (bus 00)

ACPI: Assume root bridge [\_SB_.PCI0] segment is 0

PCI: nForce2 C1 Halt Disconnect fixup

Boot video device is 0000:02:00.0

ACPI: Can't get handler for 0000:00:00.1

ACPI: Can't get handler for 0000:00:00.2

ACPI: Can't get handler for 0000:00:00.3

ACPI: Can't get handler for 0000:00:00.4

ACPI: Can't get handler for 0000:00:00.5

ACPI: Can't get handler for 0000:01:0b.0

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.HUB0._PRT]

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.AGPB._PRT]

ACPI: PCI Interrupt Link [LNK1] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNK2] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNK3] (IRQs 3 4 5 6 7 10 *11 12 14 15)

ACPI: PCI Interrupt Link [LNK4] (IRQs 3 4 *5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LNK5] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LUBA] (IRQs 3 4 5 6 *7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LUBB] (IRQs 3 4 *5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LMAC] (IRQs 3 4 5 6 7 *10 11 12 14 15)

ACPI: PCI Interrupt Link [LAPU] (IRQs 3 4 5 6 *7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LACI] (IRQs 3 4 5 6 7 10 *11 12 14 15)

ACPI: PCI Interrupt Link [LMCI] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LSMB] (IRQs 3 4 5 6 7 10 *11 12 14 15)

ACPI: PCI Interrupt Link [LUB2] (IRQs 3 4 5 6 7 *10 11 12 14 15)

ACPI: PCI Interrupt Link [LFIR] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [L3CM] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LIDE] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [APC1] (IRQs *16), disabled.

ACPI: PCI Interrupt Link [APC2] (IRQs *17), disabled.

ACPI: PCI Interrupt Link [APC3] (IRQs *18), disabled.

ACPI: PCI Interrupt Link [APC4] (IRQs *19), disabled.

ACPI: PCI Interrupt Link [APCE] (IRQs *16), disabled.

ACPI: PCI Interrupt Link [APCF] (IRQs 20 21 22) *0, disabled.

ACPI: PCI Interrupt Link [APCG] (IRQs 20 21 22) *0, disabled.

ACPI: PCI Interrupt Link [APCH] (IRQs 20 21 22) *0, disabled.

ACPI: PCI Interrupt Link [APCI] (IRQs 20 21 22) *0, disabled.

ACPI: PCI Interrupt Link [APCJ] (IRQs 20 21 22) *0, disabled.

ACPI: PCI Interrupt Link [APCK] (IRQs 20 21 22) *0, disabled.

ACPI: PCI Interrupt Link [APCS] (IRQs *23), disabled.

ACPI: PCI Interrupt Link [APCL] (IRQs 20 21 22) *0, disabled.

ACPI: PCI Interrupt Link [APCM] (IRQs 20 21 22) *0, disabled.

ACPI: PCI Interrupt Link [AP3C] (IRQs 20 21 22) *0, disabled.

ACPI: PCI Interrupt Link [APCZ] (IRQs 20 21 22) *0, disabled.

SCSI subsystem initialized

PCI: Using ACPI for IRQ routing

PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a report

Machine check exception polling timer started.

inotify device minor=63

devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)

devfs: boot_options: 0x0

NTFS driver 2.1.23-WIP [Flags: R/O].

Real Time Clock Driver v1.12

Linux agpgart interface v0.101 (c) Dave Jones

agpgart: Detected NVIDIA nForce2 chipset

agpgart: AGP aperture is 64M @ 0xd8000000

vesafb: NVidia Corporation, NV10 Reference Board, Chip Rev A1 (OEM: NVidia)

vesafb: VBE version: 3.0

vesafb: protected mode interface info at c000:0f3e

vesafb: pmi: set display start = c00c0f77, set palette = c00c0fed

vesafb: pmi: ports = 3b4 3b5 3ba 3c0 3c1 3c4 3c5 3c6 3c7 3c8 3c9 3cc 3ce 3cf 3d0 3d1 3d2 3d3 3d4 3d5 3da

vesafb: hardware supports DCC2 transfers

vesafb: monitor limits: vf = 75 Hz, hf = 60 kHz, clk = 80 MHz

vesafb: scrolling: redraw

Console: switching to colour frame buffer device 128x48

vesafb: framebuffer at 0xd0000000, mapped to 0xe0880000, using 6144k, total 32768k

fb0: VESA VGA frame buffer device

ACPI: No ACPI bus support for vesafb.0

ACPI: Power Button (FF) [PWRF]

ACPI: Power Button (CM) [PWRB]

ACPI: Fan [FAN] (on)

ACPI: CPU0 (power states: C1[C1])

ACPI: Thermal Zone [THRM] (33 C)

ACPI: No ACPI bus support for i8042

serio: i8042 AUX port at 0x60,0x64 irq 12

serio: i8042 KBD port at 0x60,0x64 irq 1

Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled

ACPI: No ACPI bus support for serio0

ACPI: No ACPI bus support for serio1

ACPI: No ACPI bus support for serial8250

ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A

ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A

io scheduler noop registered

io scheduler anticipatory registered

io scheduler deadline registered

io scheduler cfq registered

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

ACPI: No ACPI bus support for floppy.0

forcedeth.c: Reverse Engineered nForce ethernet driver. Version 0.31.

ACPI: PCI Interrupt Link [APCH] enabled at IRQ 22

ACPI: PCI Interrupt 0000:00:04.0[A] -> Link [APCH] -> GSI 22 (level, high) -> IRQ 22

PCI: Setting latency timer of device 0000:00:04.0 to 64

eth0: forcedeth.c: subsystem: 0147b:1c00 bound to 0000:00:04.0

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

NFORCE2: IDE controller at PCI slot 0000:00:09.0

NFORCE2: chipset revision 162

NFORCE2: not 100% native mode: will probe irqs later

NFORCE2: BIOS didn't set cable bits correctly. Enabling workaround.

NFORCE2: 0000:00:09.0 (rev a2) UDMA133 controller

    ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:DMA

    ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:DMA, hdd:DMA

Probing IDE interface ide0...

hda: ST3120022A, ATA DISK drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

ACPI: No ACPI bus support for 0.0

Probing IDE interface ide1...

hdc: ATAPI-CD ROM-DRIVE-50MAX, ATAPI CD/DVD-ROM drive

hdd: RICOH CD-R/RW MP7200A, ATAPI CD/DVD-ROM drive

ide1 at 0x170-0x177,0x376 on irq 15

ACPI: No ACPI bus support for 1.0

ACPI: No ACPI bus support for 1.1

Probing IDE interface ide2...

Probing IDE interface ide3...

Probing IDE interface ide4...

Probing IDE interface ide5...

hda: max request size: 1024KiB

hda: 234441648 sectors (120034 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)

hda: cache flushes supported

 /dev/ide/host0/bus0/target0/lun0: p1 p2 < p5 p6 p7 p8 > p3 p4

hdc: ATAPI 50X CD-ROM drive, 128kB Cache, UDMA(33)

Uniform CD-ROM driver Revision: 3.20

hdd: ATAPI 40X CD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)

libata version 1.10 loaded.

sata_sil version 0.9

ACPI: PCI Interrupt Link [APC3] enabled at IRQ 18

ACPI: PCI Interrupt 0000:01:0b.0[A] -> Link [APC3] -> GSI 18 (level, high) -> IRQ 18

ata1: SATA max UDMA/100 cmd 0xE0814080 ctl 0xE081408A bmdma 0xE0814000 irq 18

ata2: SATA max UDMA/100 cmd 0xE08140C0 ctl 0xE08140CA bmdma 0xE0814008 irq 18

ata1: dev 0 cfg 49:2f00 82:346b 83:7d01 84:4003 85:3469 86:3c01 87:4003 88:007f

ata1: dev 0 ATA, max UDMA/133, 390721968 sectors: lba48

ata1(0): applying Seagate errata fix

ata1: dev 0 configured for UDMA/100

scsi0 : sata_sil

ata2: no device found (phy stat 00000000)

scsi1 : sata_sil

  Vendor: ATA       Model: ST3200822AS       Rev: 3.01

  Type:   Direct-Access                      ANSI SCSI revision: 05

ACPI: No ACPI bus support for 0:0:0:0

SCSI device sda: 390721968 512-byte hdwr sectors (200050 MB)

SCSI device sda: drive cache: write back

SCSI device sda: 390721968 512-byte hdwr sectors (200050 MB)

SCSI device sda: drive cache: write back

 /dev/scsi/host0/bus0/target0/lun0: p1 p2 p3 < p5 p6 p7 >

Attached scsi disk sda at scsi0, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0

mice: PS/2 mouse device common for all mice

Advanced Linux Sound Architecture Driver Version 1.0.9rc2  (Thu Mar 24 10:33:39 2005 UTC).

ACPI: PCI Interrupt Link [APCJ] enabled at IRQ 21

ACPI: PCI Interrupt 0000:00:06.0[A] -> Link [APCJ] -> GSI 21 (level, high) -> IRQ 21

PCI: Setting latency timer of device 0000:00:06.0 to 64

input: AT Translated Set 2 keyboard on isa0060/serio0

input: ImPS/2 Generic Wheel Mouse on isa0060/serio1

intel8x0_measure_ac97_clock: measured 49760 usecs

intel8x0: clocking to 47453

ALSA device list:

  #0: NVidia nForce2 with ALC650E at 0xe0081000, irq 21

NET: Registered protocol family 2

IP: routing cache hash table of 4096 buckets, 32Kbytes

TCP established hash table entries: 32768 (order: 6, 262144 bytes)

TCP bind hash table entries: 32768 (order: 5, 131072 bytes)

TCP: Hash tables configured (established 32768 bind 32768)

NET: Registered protocol family 1

NET: Registered protocol family 17

ReiserFS: hda6: found reiserfs format "3.6" with standard journal

ReiserFS: hda6: using ordered data mode

ReiserFS: hda6: journal params: device hda6, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

ReiserFS: hda6: checking transaction log (hda6)

ReiserFS: hda6: Using r5 hash to sort names

VFS: Mounted root (reiserfs filesystem) readonly.

Freeing unused kernel memory: 180k freed

Adding 497972k swap on /dev/hda5.  Priority:-1 extents:1

ReiserFS: hda8: found reiserfs format "3.6" with standard journal

ReiserFS: hda8: using ordered data mode

ReiserFS: hda8: journal params: device hda8, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

ReiserFS: hda8: checking transaction log (hda8)

ReiserFS: hda8: Using r5 hash to sort names

NTFS volume version 3.1.

usbcore: registered new driver usbfs

usbcore: registered new driver hub

i2c_adapter i2c-0: nForce2 SMBus adapter at 0x5000

i2c_adapter i2c-1: nForce2 SMBus adapter at 0x5100

ohci_hcd: 2004 Nov 08 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)

ACPI: PCI Interrupt Link [APCF] enabled at IRQ 20

ACPI: PCI Interrupt 0000:00:02.0[A] -> Link [APCF] -> GSI 20 (level, high) -> IRQ 20

PCI: Setting latency timer of device 0000:00:02.0 to 64

ohci_hcd 0000:00:02.0: nVidia Corporation nForce2 USB Controller

ohci_hcd 0000:00:02.0: new USB bus registered, assigned bus number 1

ohci_hcd 0000:00:02.0: irq 20, io mem 0xe0080000

ACPI: No ACPI bus support for usb1

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 3 ports detected

ACPI: No ACPI bus support for 1-0:1.0

ACPI: PCI Interrupt Link [APCG] enabled at IRQ 22

ACPI: PCI Interrupt 0000:00:02.1[B] -> Link [APCG] -> GSI 22 (level, high) -> IRQ 22

PCI: Setting latency timer of device 0000:00:02.1 to 64

ohci_hcd 0000:00:02.1: nVidia Corporation nForce2 USB Controller (#2)

ohci_hcd 0000:00:02.1: new USB bus registered, assigned bus number 2

ohci_hcd 0000:00:02.1: irq 22, io mem 0xe0083000

ACPI: No ACPI bus support for usb2

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 3 ports detected

ACPI: No ACPI bus support for 2-0:1.0

ACPI: PCI Interrupt Link [APCL] enabled at IRQ 21

ACPI: PCI Interrupt 0000:00:02.2[C] -> Link [APCL] -> GSI 21 (level, high) -> IRQ 21

PCI: Setting latency timer of device 0000:00:02.2 to 64

ehci_hcd 0000:00:02.2: nVidia Corporation nForce2 USB Controller

ehci_hcd 0000:00:02.2: new USB bus registered, assigned bus number 3

ehci_hcd 0000:00:02.2: irq 21, io mem 0xe0084000

PCI: cache line size of 64 is not supported by device 0000:00:02.2

ehci_hcd 0000:00:02.2: USB 2.0 initialized, EHCI 1.00, driver 10 Dec 2004

ACPI: No ACPI bus support for usb3

hub 3-0:1.0: USB hub found

hub 3-0:1.0: 6 ports detected

ACPI: No ACPI bus support for 3-0:1.0

nvidia: module license 'NVIDIA' taints kernel.

ACPI: PCI Interrupt Link [APC4] enabled at IRQ 19

ACPI: PCI Interrupt 0000:02:00.0[A] -> Link [APC4] -> GSI 19 (level, high) -> IRQ 19

NVRM: loading NVIDIA Linux x86 NVIDIA Kernel Module  1.0-7174  Tue Mar 22 06:44:39 PST 2005

i2c /dev entries driver

ACPI: No ACPI bus support for 0-0051

ACPI: No ACPI bus support for 0-0052

ACPI: No ACPI bus support for 2-0290

agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.

agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode

agpgart: Putting AGP V2 device at 0000:02:00.0 into 4x mode

agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.

agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode

agpgart: Putting AGP V2 device at 0000:02:00.0 into 4x mode

```

Thanks![/url]

----------

## NeddySeagoon

qnx,

Hmmm.... whats that do then ?

```
ata1(0): applying Seagate errata fix

ata1: dev 0 configured for UDMA/100 
```

It claims its using UDMA/100 mode, which should get you >40Mb/s.

Your drive  

```
{ "ST3200822AS",        SIL_QUIRK_MOD15WRITE },
```

 qualifies for the blacklist.

Which is 

```
 *      For certain Seagate devices, we must limit the maximum sectors

 *      to under 8K. 
```

Look in 

```
/usr/src/drivers/scsi/sata_sil.c
```

. If you are feeling adventurous, remove the line I quoted and remake your kernel. Your drive will no longer be blacklisted but it may trash your filesystems.

Maybe there is fixed firmware on the Seagate site, so you could FLASH your drive, then remove yourself from the blacklist wit a degree of confidence.

----------

## qnx

Yeah, I saw this errata fix later on too.. They've just changed the info message obviously. 

Now I need to figure out what to do next, leaving the disc back might be hard since I got it for free as a gift.... 

Trying to find a firmware upgrade but no luck there, can't find any for this one. If anybody sees something, or finds something out - please let me know!!

Thanks for your help,  NeddySeagoon!

Cheers!

----------

## NeddySeagoon

qnx,

Maybe worth an email to Seagate support?

Telll them your drive, its firmware version and yoiur SATA chip. They may know if its fixed in your drives firmware version.

----------

## danorris

For what it's worth, I've got a Seagate drive as well -- three, actually -- model number ST3300831AS, and I don't appear to have any problems with DMA:

```
% hdparm -tT /dev/sda

/dev/sda:

 Timing cached reads:   2136 MB in  2.00 seconds = 1066.56 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

 Timing buffered disk reads:  194 MB in  3.03 seconds =  64.10 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device
```

Maybe only some Seagate models are blacklisted, and I got lucky. In any case, I do have a question. A while back, I read somewhere that hdparm is really broken for SATA drives and that you should pretty much ignore any benchmarking figures you get with -tT. I remember running hdparm several times and seeing the buffered read speed increase every time -- first I'd get ~50, then ~100, then ~150, and so on -- clearly incorrect numbers.

Does anyone know if this is still the case? Or has hdparm been fixed to be sane on SATA disks? I no longer have the growing-speed problem... I can run hdparm repeatedly and get fairly consistent results. But I'm just wondering how much I should believe the numbers it's telling me. Thanks!

P.S., is that HDIO_DRIVE_CMD(null) error normal for SATA disks? It seems to be harmless, but maybe I've got something configured wrong?

----------

## NeddySeagoon

danorris,

Most of hdparm is broken for SATA. You shouldn't need it anyway.

edit :-

The blacklist often applies to chip and drive pairs, some combinations are OK some not.

Look at the kernel source for yor SATA driver chip if you want to know if you drive is blacklisted or not.

In sil.c at least, the blacklist is a bit of a blunt instrument because firmware revisions are not checked.

----------

## gringo

 *Quote:*   

> Most of hdparm is broken for SATA. You shouldn't need it anyway. 

 

yep, thats right. Some SMART monitoring features will be available in next 2.6.12. BTW

cheers

----------

## gstrock

correct me if I'm wrong but I thought the sata drives

are treated as scsi devices and hdparm only works

for IDE drives.  In all the hdparm info posted above

I saw a complaint about 

Inappropriate ioctl for device

I'm curious about the performance of SATA.  A friend

is booting off his and claims a 40% increase in performance.

While Toms Hardware says there is no discernible difference

between PATA and SATA.

what have you guys been finding?

----------

## danorris

From what I've seen, SATA may be marginally faster than IDE, but certainly not by much; maybe a few percent. For me personally, the major benefit is the topology: one disk per "channel," i.e., no more master/slave dasy-chaining nonsense. No jumpers to worry about, and it's easier to rearrange drives if (like me) you have more than one controller. The small data cable is a superficial advantage; with 4 disks in my system it keeps me out of cable hell and lets the case fans do their job. And finally, Western Digital makes 10,000 RPM SATA disks, something you certainly won't find in the IDE market.

----------

## gringo

 *Quote:*   

> correct me if I'm wrong but I thought the sata drives
> 
> are treated as scsi devices and hdparm only works
> 
> for IDE drives.

 

correct, thats why hdparm does nothing on sata drives.

 *Quote:*   

> I'm curious about the performance of SATA. A friend
> 
> is booting off his and claims a 40% increase in performance. 

 

hehe, you friends joking ( maybe hes talking about sataII ?? ), i have two Raptor drives here and i didnt noticed much performance increase; they perform more or less like my other 133 Ata drive.

 *Quote:*   

> For me personally, the major benefit is the topology: one disk per "channel," i.e., no more master/slave dasy-chaining nonsense. No jumpers to worry about, and it's easier to rearrange drives if (like me) you have more than one controller. The small data cable is a superficial advantage; with 4 disks in my system it keeps me out of cable hell and lets the case fans do their job.

 

yep, i think thats the point and keep in mind that sata drives will become more and more cheaper. Just keep away from seagate and all will be fine  :Wink: 

 *Quote:*   

> Western Digital makes 10,000 RPM SATA disks, something you certainly won't find in the IDE market.

 

for sure, scsi technology for pata drives  :Wink: 

cheers

----------

## qnx

 *gringo wrote:*   

>  *Quote:*   Most of hdparm is broken for SATA. You shouldn't need it anyway.  
> 
> yep, thats right. Some SMART monitoring features will be available in next 2.6.12. BTW
> 
> cheers

 

I tried hddtemp with no luck on my SATA, I have 2.6.12-rc2. Where did you see this info? Perhaps some other SMART features than used by hddtemp are implemented so it won't work anyway, right?

----------

## gringo

 *Quote:*   

> Where did you see this info?

 

i believe Jeff Garzik talked about this in lkml three weeks ago. I searched right now but cant find it ...

But i just realised this -> http://gentoo-wiki.com/HARDWARE_SATA ( read the tips section)

So it looks like it has been in the dev branch for a while !

BTW, did anyone of you guys played with sdparm ?? 

cheers

----------

## qnx

 *gringo wrote:*   

>  *Quote:*   Where did you see this info? 
> 
> i believe Jeff Garzik talked about this in lkml three weeks ago. I searched right now but cant find it ...
> 
> But i just realised this -> http://gentoo-wiki.com/HARDWARE_SATA ( read the tips section)
> ...

 

Cool, nice wiki page, I just thought about adding an info about this particular issue with Sil 3112 and some Seagate disks, as described in  this thread. 

My kernel says: libata version 1.10 loaded. But this isn't the same as dev-branch I guess (asking because some other things in this release of mine - 2.6.12-rc2-love1 - contain "unstable" versions of drivers, like the sata_sil version 0.9)?

Haven't played with sdparm, don't really know what to do with it  :Wink:  Use hdparm only for testing performance.  :Smile: 

----------

## gringo

 *Quote:*   

> My kernel says: libata version 1.10 loaded.

 

thats what mine says too ( running plain 2.6.12-rc4 here) ; i dont believe Fallow included libata-dev in love, maybe time to request a new feature ?  :Wink: 

Should apply cleanly over love btw.

 *Quote:*   

> I just thought about adding an info about this particular issue with Sil 3112 and some Seagate disks, as described in this thread. 

 

nice idea, people should be aware of these problems with some segate and maxtor drives. Just take a look to the sata_sil.c file and search for blacklist to know which drives will work with less performance. Would be great to check other chips for blacklisted drives too.

cheers

----------

## qnx

I maybe will try applying libata-dev (where can I find it?) over 2.6.12-rc3-love1, but... this might sound funny, but what should I except to change from my current sittuation (I've removed my disk from blacklist, built kernel, run tests and it seems ok...)? Nothing eh?  :Wink: 

Wouldn't it be possible to have an option "use libata/use libata-dev"? If so, maybe Fallow can add this feature, don't you think?  :Smile: 

----------

## gringo

 *Quote:*   

> I maybe will try applying libata-dev (where can I find it?)

 

here

but these look quite old, maybe theyre moving to git or just planning to include it in next 2.6.12 release ?

 *Quote:*   

> but what should I except to change from my current sittuation (I've removed my disk from blacklist, built kernel, run tests and it seems ok

 

when using the dev one, smart should be working by calling it with something like smartctl -d ata -a /dev/sdX. I dont believe youll notice more performance in your sata drives with libata-dev.

Be carefull when remoing your drive from the blacklist : try to stress your drives with some benchmarking tool f.ex., and you should get tons of I/O errors !

*EDIT -> will ask Fallow about including libata-dev in coming releases  :Wink: 

cheers

----------

## qnx

 *gringo wrote:*   

>  *Quote:*   I maybe will try applying libata-dev (where can I find it?) 
> 
> here
> 
> but these look quite old, maybe theyre moving to git or just planning to include it in next 2.6.12 release ?
> ...

 

But I thought that some kind of fix for the Sil 3112 with Seagates disks, the so called Mod15Write qurik, was included here?

 *gringo wrote:*   

> 
> 
> Be carefull when remoing your drive from the blacklist : try to stress your drives with some benchmarking tool f.ex., and you should get tons of I/O errors !
> 
> *EDIT -> will ask Fallow about including libata-dev in coming releases 
> ...

 

Would you recommend any tool for stressing disks? I've copied tons of GBs without any errors nor corruption (according to md5, at least, more about this in the other thread over here.

----------

## qnx

Can't patch my 2.6.12-rc4-love1 with the 2.6.11-libata-dev1. Seems too old... =/ What to do now?

----------

## NeddySeagoon

qnx,

Read the patch file, see if it takes your drive out of the blacklist.

If not it won't solve your problem.

----------

## qnx

I've patchet my kernel with this, which I thought is implementend in libata-dev and was the reason I wanted to patch with libata-dev. It was however easier to patch only with TeJun Heo's fix of sata_sil.c . Gonna reboot and see what happens. Now, with the usual blacklist appliend I have, as expected

```
hdparm -tT /dev/sda

/dev/sda:

 Timing cached reads:   1316 MB in  2.00 seconds = 657.77 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

 Timing buffered disk reads:   60 MB in  3.08 seconds =  19.46 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

```

Let's see what happens with this new fix!

----------

## qnx

OMG, almost can't belive it! This is what I was looking for!

```
dmesg|grep errata

ata1(0): applying Seagate errata fix

```

Still there, haven't removed my drive from blacklist. But...

```
hdparm -tT /dev/sda

/dev/sda:

 Timing cached reads:   1356 MB in  2.01 seconds = 676.07 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

 Timing buffered disk reads:  182 MB in  3.02 seconds =  60.31 MB/sec

HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

```

Gotta write a big thank-you to TeJun Heo, I guess.  :Laughing: 

----------

## gringo

interesting, didnt know about this hack !

From what i saw, did you tried to flash with latest bios ( which should include a sata rom update) ? 

Maybe they have already solved it in latest releases and theres no need to patch  :Wink: 

cheers

----------

## qnx

Yes, I patched with BIOS 2.7 for NF7-S from Abit. In some previous versions of BIOS I saw in changelog something about SATA update, but it didn't say that much. And in other threads I've read that that update was something else, not the issue we're having. Something like it's not possible to update BIOS and fix it if you have 3112 rev 1.21 (look on your chip). So I have no idea if it's fixed or not, there's too little info about this out there.

----------

