# Silicon 680 PCI / IDE controller: Where's my drive? [SOLVED]

## jimmywannadog

I am trying to add additional IDE drives to computer running Gentoo Linux 2.6.24-r3. I have installed a IDE RAID 2 Port PCI Host (but I don't care about the RAID functionality for now). I am not able to locate the drive attached to the controller in the relevant disk utilities even though I believe the controller is being recognized by the kernel. I can also see the new drive in the BIOS configuration utility that the controller offer during startup.

Below are the relevant portions of running lscpi -v and lscpci -nn on the machine in question. (The new controller is listed second in each case, I believe.)

 *Quote:*   

> 00:02.5 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev d0) (prog-if 80 [Master])
> 
>         Subsystem: Silicon Integrated Systems [SiS] SiS5513 EIDE Controller (A,B step)
> 
>         Flags: bus master, fast devsel, latency 128
> ...

 

 *Quote:*   

> 
> 
> 00:02.5 IDE interface [0101]: Silicon Integrated Systems [SiS] 5513 [IDE] [1039:5513] (rev d0)
> 
> 00:09.0 RAID bus controller [0104]: Silicon Image, Inc. PCI0680 Ultra ATA-133 Host Controller [1095:0680] (rev 02)

 

Below are the results of running fdisk -l. I have part of hda and all of hdb under LVM. hdc and hdd are CD-R and DVD drives respectively. I am expecting the new drive to show up as hde.

 *Quote:*   

> Disk /dev/hda: 15.3 GB, 15301836800 bytes
> 
> 255 heads, 63 sectors/track, 1860 cylinders
> 
> Units = cylinders of 16065 * 512 = 8225280 bytes
> ...

 

Any help is appreciated. Let me know if I can supply any other information. Thanks.Last edited by jimmywannadog on Fri May 30, 2008 12:57 pm; edited 2 times in total

----------

## cyrillic

Your current kernel has support for the Silicon Integrated Systems 5513 controller, but not for the Silicon Image 0680 controller, that is why your new harddrive doesn't show up.

```
Device Drivers  --->

  <*> ATA/ATAPI/MFM/RLL support  --->

    <*>     Include IDE/ATA-2 DISK support

    < >     Silicon Image chipset support (NEW)

    <*>     SiS5513 chipset support 
```

Another approach would be to get rid of the legacy IDE drivers, and use the newer libata drivers instead.

This would result in your drives being named /dev/sd* instead of /dev/hd*

```
Device Drivers  --->

  SCSI device support  --->

    <*> SCSI disk support

  <*> Serial ATA (prod) and Parallel ATA (experimental) drivers  --->

    <*>   CMD / Silicon Image 680 PATA support

    <*>   SiS PATA support (Experimental) 
```

Whichever way you choose to go, including both IDE and libata drivers in the same kernel is generally a bad idea.

----------

## jimmywannadog

Thanks for the tips. Indeed, when I added support for the Silicon Image chipset, I can see that hde is being recognized when the kernel loads. Unfortunately, the process ends in a kernel panic following a delay and then the message "hde: <4>hde:dma_time_expiry: dma status==0x21"

I'm willing to ditch the legacy drivers and use the Serial ATA support but would like to understand the implications of that for the existing drives, some of which are currently under LVM. Am I going to be able to find my way back to these two physical voiumes once they are renamed?

 *Quote:*   

> PV /dev/hda4   VG vg   lvm2 [12.29 GB / 300.00 MB free]
> 
> PV /dev/hdb1   VG vg   lvm2 [18.64 GB / 660.00 MB free]
> 
> Total: 2 [30.94 GB] / in use: 2 [30.94 GB] / in no VG: 0 [0   ]

 

How much danger is there in some critical LVM files being overwritten if I boot into a kernel with SATA support? How can I back those up?

Thanks again.

----------

## cyrillic

I am not very familiar with LVM, but you may need to reconfigure something in order for it to find the renamed drives.

I doubt this would cause any loss of data.

ps.  If you were running without LVM, the only files you would have to rename the drives in would be /etc/fstab and /boot/grub/grub.conf

----------

## jimmywannadog

Well, I'm back at trying to get this PCI IDE card to work after a couple of months of neglect. Basically, the situation is that I am trying to connect a 60G IDE drive to an siI0680 PCI IDE controller. The controller is recognized by BIOS and the kernel, however I cannot access the drive; the plainest symptom of the issue is a DMA timeout message. The drive works fine when connected to the onboard IDE controller although these are already connected to existing drives.

This is the PCI device's info:

```
00:09.0 RAID bus controller: Silicon Image, Inc. PCI0680 Ultra ATA-133 Host Controller (rev 02)

        Subsystem: Silicon Image, Inc. Winic W-680 (Silicon Image 680 based)

        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB

2B- DisINTx-

        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR-

 <PERR- INTx-

        Latency: 64, Cache Line Size: 4 bytes

        Interrupt: pin A routed to IRQ 11

        Region 0: I/O ports at dc00 [size=8]

        Region 1: I/O ports at d800 [size=4]

        Region 2: I/O ports at d400 [size=8]

        Region 3: I/O ports at d000 [size=4]

        Region 4: I/O ports at cc00 [size=16]

        Region 5: Memory at cfffff00 (32-bit, non-prefetchable) [size=256]

        Expansion ROM at cff00000 [disabled] [size=512K]

        Capabilities: [60] Power Management version 2

                Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)

                Status: D0 PME-Enable- DSel=0 DScale=2 PME-

        Kernel driver in use: SiI_IDE
```

This is what I see in dmesg: ( I switched the kernel code into a module on the advice of another post: https://forums.gentoo.org/viewtopic-t-218005-highlight-sii+0680.html ) Also, it looks like LVM got mixed up in the messages too, probably reflecting two different and unsuccessful attempts to access hde, the new drive connected to the PCI IDE controller. 

```

SiI680: IDE controller (0x1095:0x0680 rev 0x02) at  PCI slot 0000:00:09.0

ACPI: PCI Interrupt 0000:00:09.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IR

 11

SiI680: BASE CLOCK == 133

SiI680: 100% native mode on irq 11

    ide2: MMIO-DMA , BIOS settings: hde:pio, hdf:pio

    ide3: MMIO-DMA , BIOS settings: hdg:pio, hdh:pio

Probing IDE interface ide2...

hde: FUJITSU MHT2060AH, ATA DISK drive

hde: host max PIO4 wanted PIO255(auto-tune) selected PIO4

hde: UDMA/100 mode selected

ide2 at 0xd083cf80-0xd083cf87,0xd083cf8a on irq 11

hde: max request size: 64KiB

hde: Host Protected Area detected.

        current capacity is 117209088 sectors (60011 MB)

        native  capacity is 117210240 sectors (60011 MB)

hde: Host Protected Area disabled.

hde: 117210240 sectors (60011 MB) w/8192KiB Cache, CHS=65535/16/63

hde: cache flushes supported

 hde:<4>hde: dma_timer_expiry: dma status == 0x21

hde: DMA timeout error

hde: dma timeout error: status=0x31 { DeviceFault SeekComplete Error }

hde: dma timeout error: error=0x7f { DriveStatusError UncorrectableError Sector

dNotFound TrackZeroNotFound AddrMarkNotFound }, LBAsect=260013951, sector=0

ide: failed opcode was: unknown

hde: DMA disabled

ide2: reset: master: error (0x7f?)

hde: status error: status=0x7f { DriveReady DeviceFault SeekComplete DataReques

 CorrectedError Index Error }

hde: status error: error=0x7f { DriveStatusError UncorrectableError SectorIdNot

ound TrackZeroNotFound AddrMarkNotFound }, LBAsect=260013951, sector=0

ide: failed opcode was: unknown

hde: drive not ready for command

ide2: reset: master: error (0x7f?)

end_request: I/O error, dev hde, sector 0

Buffer I/O error on device hde, logical block 0

end_request: I/O error, dev hde, sector 0

Buffer I/O error on device hde, logical block 0

end_request: I/O error, dev hde, sector 0

Buffer I/O error on device hde, logical block 0

 unable to read partition table

Probing IDE interface ide3...

ACPI: PCI Interrupt 0000:00:11.0[A] -> Link [LNKB] -> GSI 11 (level, low) -> IR

 11

device-mapper: ioctl: 4.12.0-ioctl (2007-10-02) initialised: dm-devel@redhat.co

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

ReiserFS: dm-0: found reiserfs format "3.6" with standard journal

ReiserFS: dm-0: using ordered data mode

ReiserFS: dm-0: journal params: device dm-0, size 8192, journal first block 18,

max trans len 1024, max batch 900, max commit age 30, max trans age 30

ReiserFS: dm-0: checking transaction log (dm-0)

ReiserFS: dm-0: Using r5 hash to sort names

ReiserFS: dm-2: found reiserfs format "3.6" with standard journal

ReiserFS: dm-2: using ordered data mode

ReiserFS: dm-2: journal params: device dm-2, size 8192, journal first block 18,

max trans len 1024, max batch 900, max commit age 30, max trans age 30

ReiserFS: dm-2: checking transaction log (dm-2)

ReiserFS: dm-2: Using r5 hash to sort names

ReiserFS: dm-3: found reiserfs format "3.6" with standard journal

ReiserFS: dm-3: using ordered data mode

ReiserFS: dm-3: journal params: device dm-3, size 8192, journal first block 18,

max trans len 1024, max batch 900, max commit age 30, max trans age 30

ReiserFS: dm-3: checking transaction log (dm-3)

ReiserFS: dm-3: Using r5 hash to sort names

ReiserFS: dm-1: found reiserfs format "3.6" with standard journal

ReiserFS: dm-1: using ordered data mode

ReiserFS: dm-1: journal params: device dm-1, size 8192, journal first block 18,

max trans len 1024, max batch 900, max commit age 30, max trans age 30

ReiserFS: dm-1: checking transaction log (dm-1)

ReiserFS: dm-1: Using r5 hash to sort names

ReiserFS: dm-4: found reiserfs format "3.6" with standard journal

ReiserFS: dm-4: using ordered data mode

ReiserFS: dm-4: journal params: device dm-4, size 8192, journal first block 18,

max trans len 1024, max batch 900, max commit age 30, max trans age 30

ReiserFS: dm-4: checking transaction log (dm-4)

ReiserFS: dm-4: Using r5 hash to sort names

Adding 506036k swap on /dev/hda2.  Priority:-1 extents:1 across:506036k

eth0: Media Link On 100mbps full-duplex 

end_request: I/O error, dev hde, sector 117210112

Buffer I/O error on device hde, logical block 14651264

end_request: I/O error, dev hde, sector 117210112

Buffer I/O error on device hde, logical block 14651264

end_request: I/O error, dev hde, sector 117210224

Buffer I/O error on device hde, logical block 14651278

end_request: I/O error, dev hde, sector 117210224

Buffer I/O error on device hde, logical block 14651278

end_request: I/O error, dev hde, sector 0

Buffer I/O error on device hde, logical block 0

end_request: I/O error, dev hde, sector 8

Buffer I/O error on device hde, logical block 1

end_request: I/O error, dev hde, sector 0

Buffer I/O error on device hde, logical block 0

end_request: I/O error, dev hde, sector 0

Buffer I/O error on device hde, logical block 0

end_request: I/O error, dev hde, sector 117210232

Buffer I/O error on device hde, logical block 14651279

end_request: I/O error, dev hde, sector 117210232

Buffer I/O error on device hde, logical block 14651279

end_request: I/O error, dev hde, sector 117210232

end_request: I/O error, dev hde, sector 117210232

end_request: I/O error, dev hde, sector 117210232

end_request: I/O error, dev hde, sector 117210232

end_request: I/O error, dev hde, sector 117210176

end_request: I/O error, dev hde, sector 117210224

end_request: I/O error, dev hde, sector 117210232

end_request: I/O error, dev hde, sector 117210232

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0

end_request: I/O error, dev hde, sector 0
```

Here's a relevant section of my .config:

```
CONFIG_IDE=y

CONFIG_BLK_DEV_IDE=y

#

# Please see Documentation/ide.txt for help/info on IDE drives

#

# CONFIG_BLK_DEV_IDE_SATA is not set

# CONFIG_BLK_DEV_HD_IDE is not set

CONFIG_BLK_DEV_IDEDISK=y

# CONFIG_IDEDISK_MULTI_MODE is not set

CONFIG_BLK_DEV_IDECD=y

# CONFIG_BLK_DEV_IDETAPE is not set

CONFIG_BLK_DEV_IDEFLOPPY=y

# CONFIG_BLK_DEV_IDESCSI is not set

# CONFIG_BLK_DEV_IDEACPI is not set

# CONFIG_IDE_TASK_IOCTL is not set

CONFIG_IDE_PROC_FS=y

#

# IDE chipset support/bugfixes

#

CONFIG_IDE_GENERIC=y

# CONFIG_BLK_DEV_PLATFORM is not set

# CONFIG_BLK_DEV_CMD640 is not set

# CONFIG_BLK_DEV_IDEPNP is not set

#

# PCI IDE chipsets support

#

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_IDEPCI_SHARE_IRQ=y

CONFIG_IDEPCI_PCIBUS_ORDER=y

# CONFIG_BLK_DEV_GENERIC is not set

# CONFIG_BLK_DEV_OPTI621 is not set

# CONFIG_BLK_DEV_RZ1000 is not set

CONFIG_BLK_DEV_IDEDMA_PCI=y

# CONFIG_BLK_DEV_AEC62XX is not set

# CONFIG_BLK_DEV_ALI15X3 is not set

# CONFIG_BLK_DEV_AMD74XX is not set

# CONFIG_BLK_DEV_ATIIXP is not set

# CONFIG_BLK_DEV_CMD64X is not set

# CONFIG_BLK_DEV_TRIFLEX is not set

# CONFIG_BLK_DEV_CY82C693 is not set

# CONFIG_BLK_DEV_CS5520 is not set

# CONFIG_BLK_DEV_CS5530 is not set

# CONFIG_BLK_DEV_CS5535 is not set

# CONFIG_BLK_DEV_HPT34X is not set

# CONFIG_BLK_DEV_HPT366 is not set

# CONFIG_BLK_DEV_JMICRON is not set

# CONFIG_BLK_DEV_SC1200 is not set

# CONFIG_BLK_DEV_PIIX is not set

# CONFIG_BLK_DEV_IT8213 is not set

# CONFIG_BLK_DEV_IT821X is not set

# CONFIG_BLK_DEV_NS87415 is not set

# CONFIG_BLK_DEV_PDC202XX_OLD is not set

# CONFIG_BLK_DEV_PDC202XX_NEW is not set

# CONFIG_BLK_DEV_SVWKS is not set

CONFIG_BLK_DEV_SIIMAGE=m

CONFIG_BLK_DEV_SIS5513=y

# CONFIG_BLK_DEV_SLC90E66 is not set

# CONFIG_BLK_DEV_TRM290 is not set

CONFIG_BLK_DEV_VIA82CXXX=y

# CONFIG_BLK_DEV_TC86C001 is not set

# CONFIG_IDE_ARM is not set

CONFIG_BLK_DEV_IDEDMA=y

CONFIG_IDE_ARCH_OBSOLETE_INIT=y

# CONFIG_BLK_DEV_HD is not set
```

Any suggestions on something that's misconfigured on my end? Switching to SATA is intriguing but intimidating because this is a core machine and I want to avoid breaking it through experimentation.

Thanks.

----------

## cyrillic

The DMA timeout error you are getting could be caused by defective hardware (the drive or the cable or the controller).

It could also be caused by a buggy driver, so maybe trying the libata driver would give better results ...

You could also test the new controller by plugging your existing drives (hda, hdb, hdc, hdd) into it, and see if you get similar errors in dmesg.

----------

## solamour

Any updates on this? I'm having the exactly same problem (i.e. making "Silicon Image, Inc. PCI0680 Ultra ATA-133 Host Controller" work with kernel 2.4). Kernel 2.6 seems fine, but I do need 2.4 for this particular case. Considering that Slackware v11.0 with kernel 2.4 can recognize it, I'm sure there is a way, but I just can't figure out what kernel options to use. I'd appreciate any help.

__

sol

----------

## jimmywannadog

Once I got the card recognized, I ended up finally resolving the DMA problem by switching the PCI slot the card was in. That's not going to help with 2.4 though and I'm not sure what the 2.4 kernel supports although some quick searching seems to indicate that kernel support for the cards came in around 2.4.18.

Is CONFIG_BLK_DEV_SIIMAGE available and set in your kernel version? That did the trick for me.

----------

## solamour

I sort of got lazy and resorted to an "all-inclusive" type of kernel, which worked right out of the box without much tweaking. And CONFIG_BLK_DEV_SIIMAGE is checked, although I'm not sure that was what made it work or not.

__

sol

----------

