* 2.6.17-mm6 libata stupid question...
@ 2006-07-07 4:28 Valdis.Kletnieks
2006-07-07 5:33 ` Jeff Garzik
2006-07-07 16:12 ` Alan Cox
0 siblings, 2 replies; 8+ messages in thread
From: Valdis.Kletnieks @ 2006-07-07 4:28 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2668 bytes --]
I decided to be brave, and see if I could get libata instead of the old
ide driver working on my laptop, and I got (mostly) success:
CONFIG_SCSI_SATA=y
CONFIG_SCSI_ATA_PIIX=y
CONFIG_BLK_DEV_SD=y
CONFIG_BLK_DEV_SR=y
(and turn off CONFIG_IDE - that bit me for a while ;)
[ 34.409542] libata version 2.00 loaded.
[ 34.409781] ata_piix 0000:00:1f.1: version 2.00tj1ac5
[ 34.409804] PCI: Enabling device 0000:00:1f.1 (0005 -> 0007)
[ 34.411282] ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11
[ 34.411809] ACPI: PCI Interrupt 0000:00:1f.1[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
[ 34.412676] PCI: Setting latency timer of device 0000:00:1f.1 to 64
[ 34.412761] ata1: PATA max UDMA/100 cmd 0x1F0 ctl 0x3F6 bmdma 0xBFA0 irq 14
[ 34.413426] scsi0 : ata_piix
[ 34.720915] ata1.00: configured for UDMA/33
[ 34.872966] ata1.01: configured for UDMA/33
[ 34.873476] Vendor: ATA Model: FUJITSU MHV2060A Rev: 0000
[ 34.874589] Type: Direct-Access ANSI SCSI revision: 05
[ 34.878297] Vendor: TOSHIBA Model: CDRW/DVD SDR2102 Rev: 1D13
[ 34.879429] Type: CD-ROM ANSI SCSI revision: 05
[ 34.880725] ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0xBFA8 irq 15
[ 34.881385] scsi1 : ata_piix
[ 35.032798] SCSI device sda: 117210240 512-byte hdwr sectors (60012 MB)
[ 35.033432] sda: Write Protect is off
[ 35.033768] sda: Mode Sense: 00 3a 00 00
[ 35.033792] SCSI device sda: drive cache: write back
[ 35.034329] SCSI device sda: 117210240 512-byte hdwr sectors (60012 MB)
[ 35.034945] sda: Write Protect is off
[ 35.060944] sda: Mode Sense: 00 3a 00 00
[ 35.060967] SCSI device sda: drive cache: write back
[ 35.086940] sda: sda1 sda2
[ 35.149760] sd 0:0:0:0: Attached scsi disk sda
[ 35.185542] sr0: scsi3-mmc drive: 24x/24x writer cd/rw xa/form2 cdda tray
[ 35.211369] Uniform CD-ROM driver Revision: 3.20
[ 35.237311] sr 0:0:1:0: Attached scsi CD-ROM sr0
There's only one minor detail - although the CD is (AFAIK) a UDMA/33 device,
the hard drive and the controller are both able to do UDMA/100.
Now admittedly, the ide driver wasn't able to figure that out *either*, so
in a /etc/rc script I had: '/sbin/hdparm -X udma5'. But alas, that doesn't
work:
# hdparm -X udma5 /dev/sda
/dev/sda:
setting xfermode to 69 (UltraDMA mode5)
HDIO_DRIVE_CMD(setxfermode) failed: Input/output error
1) How do I do the equivalent for a libata device? Googling seems to hint
that hdparm can do it with a mythical patch by Jeff Garzik..
2) Should the kernel be able to autodetect it, and if so, what can I do
to help the code figure it out?
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.17-mm6 libata stupid question...
2006-07-07 4:28 2.6.17-mm6 libata stupid question Valdis.Kletnieks
@ 2006-07-07 5:33 ` Jeff Garzik
2006-07-07 14:32 ` Valdis.Kletnieks
2006-07-07 18:59 ` Fabio Comolli
2006-07-07 16:12 ` Alan Cox
1 sibling, 2 replies; 8+ messages in thread
From: Jeff Garzik @ 2006-07-07 5:33 UTC (permalink / raw)
To: Valdis.Kletnieks; +Cc: linux-kernel
Valdis.Kletnieks@vt.edu wrote:
> There's only one minor detail - although the CD is (AFAIK) a UDMA/33 device,
> the hard drive and the controller are both able to do UDMA/100.
Currently both master and slave are forced to the least common
denominator speed.
Alan Cox has fixed this in a patch, for the controllers that allow
master and slave to run at different bus speeds (most allow this).
Jeff
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.17-mm6 libata stupid question...
2006-07-07 5:33 ` Jeff Garzik
@ 2006-07-07 14:32 ` Valdis.Kletnieks
2006-07-07 18:59 ` Fabio Comolli
1 sibling, 0 replies; 8+ messages in thread
From: Valdis.Kletnieks @ 2006-07-07 14:32 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 6184 bytes --]
On Fri, 07 Jul 2006 01:33:56 EDT, Jeff Garzik said:
> Valdis.Kletnieks@vt.edu wrote:
> > There's only one minor detail - although the CD is (AFAIK) a UDMA/33 device
,
> > the hard drive and the controller are both able to do UDMA/100.
>
> Currently both master and slave are forced to the least common
> denominator speed.
OK, that explains why I couldn't make it work. :)
> Alan Cox has fixed this in a patch, for the controllers that allow
> master and slave to run at different bus speeds (most allow this).
Good to know. As a practical matter, the disk throughput is dominated by
seek overhead, so I'm not seeing a *vast* performance hit. So I can wait
till the patch shows up in a form I can get working with a -mm kernel.
The only other thing I've noticed (possibly reported before when I wasn't
paying attention to libata activity) was this when SMART started up:
(The hardware involved, for those who missed the start of thread):
lspci says:
00:1f.1 IDE interface: Intel Corporation 82801CAM IDE U100 (rev 02)
And 'hdparm -I /dev/sda' says:
ATA device, with non-removable media
Model Number: FUJITSU MHV2060AH
Serial Number: NT25T5629CCL
Firmware Revision: 00000096
[ 53.109000] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
[ 53.110000] ata1.00: tag 0 cmd 0xb0 Emask 0x2 stat 0x50 err 0x0 (HSM violation)
[ 53.111000] ata1: soft resetting port
[ 53.420000] ata1.00: configured for UDMA/33
[ 53.572000] ata1.01: configured for UDMA/33
[ 53.572000] ata1: EH complete
[ 53.573000] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
[ 53.574000] ata1.00: tag 0 cmd 0xb0 Emask 0x2 stat 0x50 err 0x0 (HSM violation)
[ 53.575000] ata1: soft resetting port
[ 53.882000] ata1.00: configured for UDMA/33
[ 54.033000] ata1.01: configured for UDMA/33
[ 54.033000] ata1: EH complete
[ 54.034000] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
[ 54.035000] ata1.00: tag 0 cmd 0xb0 Emask 0x2 stat 0x50 err 0x0 (HSM violation)
[ 54.036000] ata1: soft resetting port
[ 54.343000] ata1.00: configured for UDMA/33
[ 54.495000] ata1.01: configured for UDMA/33
[ 54.495000] ata1: EH complete
[ 54.496000] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
[ 54.497000] ata1.00: tag 0 cmd 0xb0 Emask 0x2 stat 0x50 err 0x0 (HSM violation)
[ 54.498000] ata1: soft resetting port
[ 54.805000] ata1.00: configured for UDMA/33
[ 54.957000] ata1.01: configured for UDMA/33
[ 54.957000] ata1: EH complete
[ 54.958000] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
[ 54.959000] ata1.00: tag 0 cmd 0xb0 Emask 0x2 stat 0x50 err 0x0 (HSM violation)
[ 54.960000] ata1: soft resetting port
[ 55.267000] ata1.00: configured for UDMA/33
[ 55.419000] ata1.01: configured for UDMA/33
[ 55.419000] ata1: EH complete
[ 55.420000] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
[ 55.421000] ata1.00: tag 0 cmd 0xb0 Emask 0x2 stat 0x50 err 0x0 (HSM violation)
[ 55.422000] ata1: soft resetting port
[ 55.729000] ata1.00: configured for UDMA/33
[ 55.880000] ata1.01: configured for UDMA/33
[ 55.880000] ata1: EH complete
[ 55.917000] SCSI device sda: 117210240 512-byte hdwr sectors (60012 MB)
[ 55.918000] sda: Write Protect is off
[ 55.919000] sda: Mode Sense: 00 3a 00 00
[ 55.919000] SCSI device sda: drive cache: write back
[ 55.920000] SCSI device sda: 117210240 512-byte hdwr sectors (60012 MB)
[ 55.921000] sda: Write Protect is off
[ 55.922000] sda: Mode Sense: 00 3a 00 00
[ 55.922000] SCSI device sda: drive cache: write back
[ 56.524000] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
[ 56.525000] ata1.00: tag 0 cmd 0xb0 Emask 0x2 stat 0x50 err 0x0 (HSM violation)
[ 56.526000] ata1: soft resetting port
[ 56.833000] ata1.00: configured for UDMA/33
[ 56.985000] ata1.01: configured for UDMA/33
[ 56.985000] ata1: EH complete
[ 57.099000] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
[ 57.100000] ata1.00: tag 0 cmd 0xb0 Emask 0x2 stat 0x50 err 0x0 (HSM violation)
[ 57.101000] ata1: soft resetting port
[ 57.408000] ata1.00: configured for UDMA/33
[ 57.559000] ata1.01: configured for UDMA/33
[ 57.559000] ata1: EH complete
[ 57.673000] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
[ 57.674000] ata1.00: tag 0 cmd 0xb0 Emask 0x2 stat 0x50 err 0x0 (HSM violation)
[ 57.675000] ata1: soft resetting port
[ 57.982000] ata1.00: configured for UDMA/33
[ 58.133000] ata1.01: configured for UDMA/33
[ 58.133000] ata1: EH complete
[ 58.247000] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
[ 58.248000] ata1.00: tag 0 cmd 0xb0 Emask 0x2 stat 0x50 err 0x0 (HSM violation)
[ 58.249000] ata1: soft resetting port
[ 58.557000] ata1.00: configured for UDMA/33
[ 58.709000] ata1.01: configured for UDMA/33
[ 58.709000] ata1: EH complete
[ 58.833000] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
[ 58.834000] ata1.00: tag 0 cmd 0xb0 Emask 0x2 stat 0x50 err 0x0 (HSM violation)
[ 58.835000] ata1: soft resetting port
[ 59.143000] ata1.00: configured for UDMA/33
[ 59.294000] ata1.01: configured for UDMA/33
[ 59.294000] ata1: EH complete
[ 59.418000] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
[ 59.419000] ata1.00: tag 0 cmd 0xb0 Emask 0x2 stat 0x50 err 0x0 (HSM violation)
[ 59.420000] ata1: soft resetting port
[ 59.727000] ata1.00: configured for UDMA/33
[ 59.879000] ata1.01: configured for UDMA/33
[ 59.879000] ata1: EH complete
[ 59.880000] SCSI device sda: 117210240 512-byte hdwr sectors (60012 MB)
[ 59.881000] sda: Write Protect is off
[ 59.882000] sda: Mode Sense: 00 3a 00 00
[ 59.883000] SCSI device sda: drive cache: write back
[ 59.884000] SCSI device sda: 117210240 512-byte hdwr sectors (60012 MB)
[ 59.886000] sda: Write Protect is off
[ 59.887000] sda: Mode Sense: 00 3a 00 00
[ 59.888000] SCSI device sda: drive cache: write back
Lot of noise, but the system keeps going and /usr/sbin/smartd doesn't seem
to notice a problem....
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.17-mm6 libata stupid question...
2006-07-07 4:28 2.6.17-mm6 libata stupid question Valdis.Kletnieks
2006-07-07 5:33 ` Jeff Garzik
@ 2006-07-07 16:12 ` Alan Cox
2006-07-07 21:22 ` Valdis.Kletnieks
1 sibling, 1 reply; 8+ messages in thread
From: Alan Cox @ 2006-07-07 16:12 UTC (permalink / raw)
To: Valdis.Kletnieks; +Cc: linux-kernel
Ar Gwe, 2006-07-07 am 00:28 -0400, ysgrifennodd Valdis.Kletnieks@vt.edu:
> [ 34.412761] ata1: PATA max UDMA/100 cmd 0x1F0 ctl 0x3F6 bmdma 0xBFA0 irq 14
> [ 34.413426] scsi0 : ata_piix
> [ 34.720915] ata1.00: configured for UDMA/33
> [ 34.872966] ata1.01: configured for UDMA/33
> There's only one minor detail - although the CD is (AFAIK) a UDMA/33 device,
> the hard drive and the controller are both able to do UDMA/100.
Until the very latest code the speed setting on the libata tree is
conservative and sets the speed per channel not per device.
The fact you get the same response with drivers/ide rather suggests that
in this case the problem is cable detection. Tweak ata_piix to print out
the cable type it detects. If it thinks its a 40 pin cable you know
where to start.
> Now admittedly, the ide driver wasn't able to figure that out *either*, so
> in a /etc/rc script I had: '/sbin/hdparm -X udma5'. But alas, that doesn't
> work:
Right now speed setting by user apps isnt supported.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.17-mm6 libata stupid question...
2006-07-07 5:33 ` Jeff Garzik
2006-07-07 14:32 ` Valdis.Kletnieks
@ 2006-07-07 18:59 ` Fabio Comolli
1 sibling, 0 replies; 8+ messages in thread
From: Fabio Comolli @ 2006-07-07 18:59 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Valdis.Kletnieks, linux-kernel
Hi.
On 7/7/06, Jeff Garzik <jeff@garzik.org> wrote:
> Valdis.Kletnieks@vt.edu wrote:
> > There's only one minor detail - although the CD is (AFAIK) a UDMA/33 device,
> > the hard drive and the controller are both able to do UDMA/100.
>
> Currently both master and slave are forced to the least common
> denominator speed.
>
> Alan Cox has fixed this in a patch, for the controllers that allow
> master and slave to run at different bus speeds (most allow this).
Wil this patch be included in next -mm?
>
> Jeff
>
Fabio
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.17-mm6 libata stupid question...
2006-07-07 16:12 ` Alan Cox
@ 2006-07-07 21:22 ` Valdis.Kletnieks
2006-07-07 21:51 ` Alan Cox
0 siblings, 1 reply; 8+ messages in thread
From: Valdis.Kletnieks @ 2006-07-07 21:22 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 682 bytes --]
On Fri, 07 Jul 2006 17:12:01 BST, Alan Cox said:
> The fact you get the same response with drivers/ide rather suggests that
> in this case the problem is cable detection. Tweak ata_piix to print out
> the cable type it detects. If it thinks its a 40 pin cable you know
> where to start
I tried instrumenting ich_pata_cbl_detect(), but it turns out that
the chipset is an ICH3M (lspci ID 8086:248A), which ends up down in
piix_pata_prereset which forces a 40-pin:
ap->cbl = ATA_CBL_PATA40;
Guess that explains that, unless the chipset actually *can* do 80-pin
and has an 80-pin cable (which would be surprising because apparently
none of the other piix variants can...)
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.17-mm6 libata stupid question...
2006-07-07 21:22 ` Valdis.Kletnieks
@ 2006-07-07 21:51 ` Alan Cox
2006-07-07 22:05 ` Valdis.Kletnieks
0 siblings, 1 reply; 8+ messages in thread
From: Alan Cox @ 2006-07-07 21:51 UTC (permalink / raw)
To: Valdis.Kletnieks; +Cc: linux-kernel
Ar Gwe, 2006-07-07 am 17:22 -0400, ysgrifennodd Valdis.Kletnieks@vt.edu:
> ap->cbl = ATA_CBL_PATA40;
>
> Guess that explains that, unless the chipset actually *can* do 80-pin
> and has an 80-pin cable (which would be surprising because apparently
> none of the other piix variants can...)
Thats a bug. ich_pata_100: 3 should have port_ops of ich_port_ops. Try
with that fixed.
Alan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.17-mm6 libata stupid question...
2006-07-07 21:51 ` Alan Cox
@ 2006-07-07 22:05 ` Valdis.Kletnieks
0 siblings, 0 replies; 8+ messages in thread
From: Valdis.Kletnieks @ 2006-07-07 22:05 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2449 bytes --]
On Fri, 07 Jul 2006 22:51:36 BST, Alan Cox said:
> Ar Gwe, 2006-07-07 am 17:22 -0400, ysgrifennodd Valdis.Kletnieks@vt.edu:
> > ap->cbl = ATA_CBL_PATA40;
> >
> > Guess that explains that, unless the chipset actually *can* do 80-pin
> > and has an 80-pin cable (which would be surprising because apparently
> > none of the other piix variants can...)
>
> Thats a bug. ich_pata_100: 3 should have port_ops of ich_port_ops. Try
> with that fixed.
OK, now it thinks there is indeed an 80-pin there:
[ 8.447302] ata1: PATA max UDMA/100 cmd 0x1F0 ctl 0x3F6 bmdma 0xBFA0 irq 14
[ 8.447959] scsi0 : ata_piix
[ 8.448598] in ich_pata_cbl_detect
[ 8.448912] controller has 80c support
[ 8.449256] ... and we found an 80-pin cable
[ 8.756113] ata1.00: configured for UDMA/33
[ 8.908139] ata1.01: configured for UDMA/33
[ 8.908657] Vendor: ATA Model: FUJITSU MHV2060A Rev: 0000
[ 8.909770] Type: Direct-Access ANSI SCSI revision: 05
[ 8.913676] Vendor: TOSHIBA Model: CDRW/DVD SDR2102 Rev: 1D13
[ 8.914795] Type: CD-ROM ANSI SCSI revision: 05
so we're slowly getting there...
(If I get ambitious, I'll go back and see what the IDE speed detection issue
was...)
--- linux-2.6.17-mm6/drivers/scsi/ata_piix.c.cable 2006-07-07 12:30:38.000000000 -0400
+++ linux-2.6.17-mm6/drivers/scsi/ata_piix.c 2006-07-07 17:43:32.000000000 -0400
@@ -432,7 +432,7 @@ static struct ata_port_info piix_port_in
.pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x06, /* mwdma1-2 */
.udma_mask = 0x3f, /* udma0-5 */
- .port_ops = &piix_pata_ops,
+ .port_ops = &ich_pata_ops,
},
/* ich_pata_133: 4 ICH with full UDMA6 */
@@ -536,20 +536,24 @@ static void ich_pata_cbl_detect(struct a
struct pci_dev *pdev = to_pci_dev(ap->host_set->dev);
u8 tmp, mask;
+printk(KERN_INFO "in ich_pata_cbl_detect\n");
/* no 80c support in host controller? */
if ((ap->udma_mask & ~ATA_UDMA_MASK_40C) == 0)
goto cbl40;
+printk(KERN_INFO "controller has 80c support\n");
/* check BIOS cable detect results */
mask = ap->hard_port_no == 0 ? PIIX_80C_PRI : PIIX_80C_SEC;
pci_read_config_byte(pdev, PIIX_IOCFG, &tmp);
if ((tmp & mask) == 0)
goto cbl40;
+printk(KERN_INFO "... and we found an 80-pin cable\n");
ap->cbl = ATA_CBL_PATA80;
return;
cbl40:
+printk(KERN_INFO "... and we defaulted to 40-pin\n");
ap->cbl = ATA_CBL_PATA40;
}
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-07-07 22:05 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-07 4:28 2.6.17-mm6 libata stupid question Valdis.Kletnieks
2006-07-07 5:33 ` Jeff Garzik
2006-07-07 14:32 ` Valdis.Kletnieks
2006-07-07 18:59 ` Fabio Comolli
2006-07-07 16:12 ` Alan Cox
2006-07-07 21:22 ` Valdis.Kletnieks
2006-07-07 21:51 ` Alan Cox
2006-07-07 22:05 ` Valdis.Kletnieks
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.