NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: timeout on siside0



On Tue, May 27, 2014 at 01:25:41PM -0600, Roy Bixler wrote:
> On Sat, May 24, 2014 at 11:06:43PM +0100, David Brownlee wrote:
> > On 22 May 2014 18:25, Roy Bixler <rcbixler%nyx.net@localhost> wrote:
> > > atapci0: <SiS 962/963 WDMA2 controller> port
> > > 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xff00-0xff0f at device 2.5 on pci0
> > > ata0: <ATA channel> at channel 0 on atapci0
> > > ata1: <ATA channel> at channel 1 on atapci0
> > 
> > So FreeBSD seems to indicate is running the CD at full speed... well, it
> > was worth a check.
> > 
> > Interestingly FreeBSD identifies it as "SiS 962/963 WDMA2 controller" and
> > treats it as "TYPE_133NEW" - generally found on 661GX/761GX chipsets
> > http://fxr.watson.org/fxr/source/dev/ata/chipsets/ata-sis.c
> > 
> > while NetBSD calls it a "746 IDE controller" of "TYPE_SOUTH" with
> > integrated southbridge
> > http://nxr.netbsd.org/xref/src/sys/dev/pci/siside.c
> > 
> > which implies different setup config, which could be affecting things
> > 
> > Are you able to confirm which base chipset the machine has? 746, 761 etc?
> 
> >From the OpenBSD boot messages, it looks like it's a 746 chipset.
> Here's a snippet:
> 
> pci0 at mainbus0 bus 0: configuration mode 1 (bios)
> pchb0 at pci0 dev 0 function 0 "SiS 746 PCI" rev 0x10
> sisagp0 at pchb0
> agp0 at sisagp0: aperture at 0xd0000000, size 0x8000000
> ppb0 at pci0 dev 1 function 0 "SiS 86C202 AGP" rev 0x00
> pci1 at ppb0 bus 1
> 
> pciide0 at pci0 dev 2 function 5 "SiS 5513 EIDE" rev 0x00: 746: DMA, channel 
> 0 wired to compatibility, channel 1 wired to compatibility
> wd0 at pciide0 channel 0 drive 0: <ST310210A>
> wd0: 16-sector PIO, LBA, 9729MB, 19925880 sectors
> wd1 at pciide0 channel 0 drive 1: <WDC WD400BB-00GFA0>
> wd1: 16-sector PIO, LBA, 38166MB, 78165360 sectors
> wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4
> wd1(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 5
> atapiscsi0 at pciide0 channel 1 drive 0
> scsibus0 at atapiscsi0: 2 targets
> cd0 at scsibus0 targ 0 lun 0: <HP, DVD Writer 635d, JPS3> ATAPI 5/cdrom 
> removable
> wd2 at pciide0 channel 1 drive 1: <QUANTUM FIREBALL CR8.4A>
> wd2: 16-sector PIO, LBA, 8063MB, 16514064 sectors
> cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 4
> wd2(pciide0:1:1): using PIO mode 4, Ultra-DMA mode 4

Looking further, I see where different operating systems give
different answers as to the chipset.  Here are some results from a
Knoppix (spruced up Debian GNU/Linux) live-CD:

[    0.896228] pata_sis 0000:00:02.5: version 0.5.2
[    0.896301] pata_sis 0000:00:02.5: SiS 962/963 MuTIOL IDE UDMA133 controller
[    0.897572] scsi0 : pata_sis
[    0.897900] scsi1 : pata_sis
[    0.899036] ata1: PATA max UDMA/133 cmd 0x1f0 ctl 0x3f6 bmdma 0xff00 irq 14
[    0.899042] ata2: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xff08 irq 15

and then:

[    1.063598] ata1.00: FORCE: horkage modified (noncq)
[    1.063611] ata1.00: ATA-4: ST310210A, 3.17, max UDMA/66
[    1.063617] ata1.00: 19925880 sectors, multi 16: LBA 
[    1.063627] ata1.01: FORCE: horkage modified (noncq)
[    1.064735] ata1.01: ATA-5: WDC WD400BB-00GFA0, 09.01B09, max UDMA/100
[    1.064741] ata1.01: 78165360 sectors, multi 16: LBA 
[    1.076876] ata1.00: configured for UDMA/66
[    1.091287] ata1.01: configured for UDMA/100
[    1.091605] scsi 0:0:0:0: Direct-Access     ATA      ST310210A        3.17 
PQ: 0 ANSI: 5
[    1.092157] sd 0:0:0:0: [sda] 19925880 512-byte logical blocks: (10.2 
GB/9.50 GiB)
[    1.092258] sd 0:0:0:0: [sda] Write Protect is off
[    1.092264] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    1.092308] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, 
doesn't support DPO or FUA
[    1.093185] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    1.114449]  sda: sda1
[    1.114451]  sda1: <netbsd: >
[    1.114676] scsi 0:0:1:0: Direct-Access     ATA      WDC WD400BB-00GF 09.0 
PQ: 0 ANSI: 5
[    1.115351] sd 0:0:0:0: [sda] Attached SCSI disk
[    1.115680] sd 0:0:1:0: [sdb] 78165360 512-byte logical blocks: (40.0 
GB/37.2 GiB)
[    1.115775] sd 0:0:1:0: [sdb] Write Protect is off
[    1.115782] sd 0:0:1:0: [sdb] Mode Sense: 00 3a 00 00
[    1.115824] sd 0:0:1:0: [sdb] Write cache: enabled, read cache: enabled, 
doesn't support DPO or FUA
[    1.116625] sd 0:0:1:0: Attached scsi generic sg1 type 0
[    1.144345]  sdb: sdb1 sdb2
[    1.145121] sd 0:0:1:0: [sdb] Attached SCSI disk
[    1.193865] psmouse serio1: hgpk: ID: 10 00 64
[    1.283578] ata2.00: FORCE: horkage modified (noncq)
[    1.283590] ata2.00: ATAPI: HP      DVD Writer 635d, JPS3, max UDMA/66
[    1.283600] ata2.01: FORCE: horkage modified (noncq)
[    1.283826] ata2.01: ATA-4: QUANTUM FIREBALL CR8.4A, A5U.0200, max UDMA/66
[    1.283831] ata2.01: 16514064 sectors, multi 16: LBA 
[    1.296907] ata2.00: configured for UDMA/66
[    1.310393] ata2.01: configured for UDMA/66
[    1.311814] scsi 1:0:0:0: CD-ROM            HP       DVD Writer 635d  JPS3 
PQ: 0 ANSI: 5
[    1.314228] sr0: scsi3-mmc drive: 62x/62x writer cd/rw xa/form2 cdda tray
[    1.314235] cdrom: Uniform CD-ROM driver Revision: 3.20
[    1.314563] sr 1:0:0:0: Attached scsi CD-ROM sr0
[    1.314913] sr 1:0:0:0: Attached scsi generic sg2 type 5
[    1.318594] scsi 1:0:1:0: Direct-Access     ATA      QUANTUM FIREBALL A5U. 
PQ: 0 ANSI: 5
[    1.319112] sd 1:0:1:0: [sdc] 16514064 512-byte logical blocks: (8.45 
GB/7.87 GiB)
[    1.319214] sd 1:0:1:0: [sdc] Write Protect is off
[    1.319220] sd 1:0:1:0: [sdc] Mode Sense: 00 3a 00 00
[    1.319265] sd 1:0:1:0: [sdc] Write cache: enabled, read cache: enabled, 
doesn't support DPO or FUA
[    1.320197] sd 1:0:1:0: Attached scsi generic sg3 type 0
[    1.325582]  sdc: sdc1
[    1.326195] sd 1:0:1:0: [sdc] Attached SCSI disk

I guess by "horkage" they mean "borkage" but the sense I get is that
they are working around some known hardware or BIOS quirk.

Then I also tried fiddling with the NetBSD kernel and I got some
results that look promising based on the following patch:

--- siside.c.orig       2014-05-27 15:49:34.000000000 -0500
+++ siside.c    2014-05-27 19:21:05.000000000 -0500
@@ -158,7 +158,7 @@
        {PCI_PRODUCT_SIS_740,   0x00, 5, "740", SIS_TYPE_SOUTH},
        {PCI_PRODUCT_SIS_741,   0x00, 5, "741", SIS_TYPE_SOUTH},
        {PCI_PRODUCT_SIS_745,   0x00, 5, "745", SIS_TYPE_100NEW},
-       {PCI_PRODUCT_SIS_746,   0x00, 6, "746", SIS_TYPE_SOUTH},
+       {PCI_PRODUCT_SIS_746,   0x00, 6, "746", SIS_TYPE_100NEW},
        {PCI_PRODUCT_SIS_748,   0x00, 6, "748", SIS_TYPE_SOUTH},
        {PCI_PRODUCT_SIS_750,   0x00, 6, "750", SIS_TYPE_SOUTH},
        {PCI_PRODUCT_SIS_751,   0x00, 6, "751", SIS_TYPE_SOUTH},

That is, with this patch, I was able to mount a CD, do commands like
the following:

mount -rt cd9660 /dev/cd0a /mnt
find /mnt -type f |xargs wc

and get some ballpark correct results without any visible errors or
unexpected aborts (i.e. read errors without a corresponding error in
the "dmesg" output.)  The other SIS_TYPEs didn't work out so well
(i.e. either unexpected aborts or the CD drive was not detected at
all.)

-- 
Roy Bixler <rcbixler%nyx.net@localhost>
"The fundamental principle of science, the definition almost, is this: the
sole test of the validity of any idea is experiment."
-- Richard P. Feynman


Home | Main Index | Thread Index | Old Index