libata updates
PATCH 1/1 libata updates
- sata_mv: continued fixing
- sata_inic: make it actually work
- new driver from Intel
- misc fixes from Tejun
Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus
to receive the following updates:
drivers/ata/Kconfig | 13 +- drivers/ata/Makefile | 1 + drivers/ata/ahci.c | 4 +- drivers/ata/ata_generic.c | 6 + drivers/ata/ata_piix.c | 25 ++ drivers/ata/libata-core.c | 1 + drivers/ata/libata-eh.c | 2 +- drivers/ata/libata-sff.c | 6 +- drivers/ata/pata_acpi.c | 6 + drivers/ata/pata_sch.c | 206 +++++++++++++ drivers/ata/sata_inic162x.c | 646 ++++++++++++++++++++++++++-------------- drivers/ata/sata_mv.c | 688 +++++++++++++++++++++++++++++++++---------- include/linux/libata.h | 16 + 13 files changed, 1222 insertions(+), 398 deletions(-) create mode 100644 drivers/ata/pata_sch.c
Alan Cox (1):
pata_atiixp: Don't disable
Alek Du (1):
libata: Add Intel SCH PATA driver
Mark Lord (13):
sata_mv more cosmetic changes
sata_mv pci features
sata_mv wait for empty+idle
sata_mv new mv_qc_defer method sata_mv errata workaround for sata25 part 1 sata_mv rearrange mv_config_fbs sata_mv NCQ and SError fixes for mv_err_intr sata_mv fix mv_host_intr bug for hc_irq_cause sata_mv new mv_port_intr function
libata: export ata_eh_analyze_ncq_error sata_mv delayed eh handling
sata_mv NCQ-EH for FIS-based switching sata_mv use hweight16() for bit counting (V2)
Tejun Heo (12):
libata: improve post-reset device ready test
ata_piix: verify SIDPR access before enabling it
sata_inic162x: misc clean ups
sata_inic162x: add / update constants
sata_inic162x: update TF read handling
sata_inic162x: use IDMA for ATA_PROT_DMA
sata_inic162x: kill now unused bmdma related stuff
sata_inic162x: use IDMA for non DMA ATA commands
sata_inic162x: use IDMA for ATAPI commands
sata_inic162x: kill now unused SFF related stuff
sata_inic162x: add cardbus support
sata_inic162x: update intro comment, up the version and drop EXPERIMENTAL
drivers/ata/Kconfig +11 -2
@@ -205,8 +205,8 @@ config SATA_VITESSE If unsure, say N. config SATA_INIC162X - tristate "Initio 162x SATA support (HIGHLY EXPERIMENTAL)" - depends on PCI && EXPERIMENTAL + tristate "Initio 162x SATA support" + depends on PCI help This option enables support for Initio 162x Serial ATA.
@@ -697,6 +697,15 @@ config PATA_SCC If unsure, say N. +config PATA_SCH + tristate "Intel SCH PATA support" + depends on PCI + help + This option enables support for Intel SCH PATA on the Intel + SCH (US15W, US15L, UL11L) series host controllers. + + If unsure, say N. + config PATA_BF54X tristate "Blackfin 54x ATAPI support" depends on BF542 || BF548 || BF549
drivers/ata/Makefile +1 -0
@@ -67,6 +67,7 @@ obj-$(CONFIG_PATA_SIS) += pata_sis.o obj-$(CONFIG_PATA_TRIFLEX) += pata_triflex.o obj-$(CONFIG_PATA_IXP4XX_CF) += pata_ixp4xx_cf.o obj-$(CONFIG_PATA_SCC) += pata_scc.o +obj-$(CONFIG_PATA_SCH) += pata_sch.o obj-$(CONFIG_PATA_BF54X) += pata_bf54x.o obj-$(CONFIG_PATA_PLATFORM) += pata_platform.o obj-$(CONFIG_PATA_OF_PLATFORM) += pata_of_platform.o
drivers/ata/ahci.c +1 -3
@@ -1267,9 +1267,7 @@ static int ahci_check_ready(struct ata_link *link)void __iomem *port_mmio =ahci_port_base (link->ap);u8 status =readl (port_mmio +PORT_TFDATA ) &0xFF ; -if (!(status &ATA_BUSY )) -return 1 ; -return 0 ; +return ata_check_ready (status); } static int ahci_softreset(struct ata_link *link, unsigned int *class,
drivers/ata/ata_generic.c +6 -0
@@ -152,6 +152,12 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_idif (dev->vendor ==PCI_VENDOR_ID_AL )ata_pci_bmdma_clear_simplex (dev); +if (dev->vendor ==PCI_VENDOR_ID_ATI ) { +int rc =pcim_enable_device (dev); +if (rc <0 ) +return rc; +pcim_pin_device (dev); + }return ata_pci_sff_init_one (dev, ppi, &generic_sht,NULL ); }
drivers/ata/ata_piix.c +25 -0
@@ -1348,6 +1348,8 @@ static void __devinit piix_init_sidpr(struct ata_host *host) {struct pci_dev *pdev =to_pci_dev (host->dev);struct piix_host_priv *hpriv = host->private_data; +struct ata_device *dev0 = &host->ports[0 ]->link.device[0 ]; +u32 scontrol;int i;/* check for availability */
@@ -1366,6 +1368,29 @@ static void __devinit piix_init_sidpr(struct ata_host *host)return ; hpriv->sidpr =pcim_iomap_table (pdev)[PIIX_SIDPR_BAR ]; + +/* SCR access via SIDPR doesn't work on some configurations. +* Give it a test drive by inhibiting power save modes which +* we'll do anyway. +*/ + scontrol =piix_sidpr_read (dev0,SCR_CONTROL ); + +/* if IPM is already 3, SCR access is probably working. Don't +* un-inhibit power save modes as BIOS might have inhibited +* them for a reason. +*/ +if ((scontrol &0xf00 ) !=0x300 ) { + scontrol |=0x300 ; +piix_sidpr_write (dev0,SCR_CONTROL , scontrol); + scontrol =piix_sidpr_read (dev0,SCR_CONTROL ); + +if ((scontrol &0xf00 ) !=0x300 ) { +dev_printk (KERN_INFO , host->dev,"SCR access via " +"SIDPR is available but doesn't work\n" ); +return ; + } + } + host->ports[0 ]->ops = &piix_sidpr_sata_ops; host->ports[1 ]->ops = &piix_sidpr_sata_ops; }
drivers/ata/libata-core.c +1 -0
@@ -6292,6 +6292,7 @@ EXPORT_SYMBOL_GPL(ata_eh_freeze_port);EXPORT_SYMBOL_GPL (ata_eh_thaw_port);EXPORT_SYMBOL_GPL (ata_eh_qc_complete);EXPORT_SYMBOL_GPL (ata_eh_qc_retry); +EXPORT_SYMBOL_GPL (ata_eh_analyze_ncq_error);EXPORT_SYMBOL_GPL (ata_do_eh);EXPORT_SYMBOL_GPL (ata_std_error_handler);
drivers/ata/libata-eh.c +1 -1
@@ -1357,7 +1357,7 @@ static void ata_eh_analyze_serror(struct ata_link *link)* LOCKING: * Kernel thread context (may sleep). */ -static void ata_eh_analyze_ncq_error (struct ata_link *link) +void ata_eh_analyze_ncq_error (struct ata_link *link) {struct ata_port *ap = link->ap;struct ata_eh_context *ehc = &link->eh_context;
drivers/ata/libata-sff.c +1 -5
@@ -314,11 +314,7 @@ static int ata_sff_check_ready(struct ata_link *link) {u8 status = link->ap->ops->sff_check_status (link->ap); -if (!(status &ATA_BUSY )) -return 1 ; -if (status ==0xff ) -return -ENODEV ; -return 0 ; +return ata_check_ready (status); }/**
drivers/ata/pata_acpi.c +6 -0
@@ -259,6 +259,12 @@ static int pacpi_init_one (struct pci_dev *pdev, const struct pci_device_id *id) .port_ops = &pacpi_ops, };const struct ata_port_info *ppi[] = { &info,NULL }; +if (pdev->vendor ==PCI_VENDOR_ID_ATI ) { +int rc =pcim_enable_device (pdev); +if (rc <0 ) +return rc; +pcim_pin_device (pdev); + }return ata_pci_sff_init_one (pdev, ppi, &pacpi_sht,NULL ); }
drivers/ata/pata_sch.c new file +206 -0
206 lines not on this page · raw message
drivers/ata/sata_inic162x.c +417 -229
929 lines not on this page · raw message
drivers/ata/sata_mv.c +531 -159
1,038 lines not on this page · raw message
include/linux/libata.h +16 -0
@@ -1039,6 +1039,7 @@ extern void ata_eh_thaw_port(struct ata_port *ap);extern void ata_eh_qc_complete (struct ata_queued_cmd *qc);extern void ata_eh_qc_retry (struct ata_queued_cmd *qc); +extern void ata_eh_analyze_ncq_error (struct ata_link *link); extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
@@ -1381,6 +1382,21 @@ static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host)return *(struct ata_port **)&host->hostdata[0 ]; } +static inline int ata_check_ready (u8 status) +{ +/* Some controllers report 0x77 or 0x7f during intermediate +* not-ready stages. +*/ +if (status ==0x77 || status ==0x7f ) +return 0 ; + +/* 0xff indicates either no device or device not ready */ +if (status ==0xff ) +return -ENODEV ; + +return !(status &ATA_BUSY ); +} +/************************************************************************** * PMP - drivers/ata/libata-pmp.c
drivers/ata/Kconfig config PATA_SCC · line 707
Quoted 9 lines · Jeff Garzik
drivers/ata/Kconfig +8
-0+config PATA_SCH + tristate "Intel SCH PATA support" + depends on PCI + help + This option enables support for Intel SCH PATA on the Intel + SCH (US15W, US15L, UL11L) series host controllers. + + If unsure, say N.
I think it would generally be good if people explained their drivers better than this.
If you know what the hell an SCH is, you don't *need* that help message in the first place! Agreed?
IOW, when adding drivers, please add help messages that actually explain what the driver is from a *user* perspective, not from a chip designer perspective. In this case, something like
The Intel SCH chipset is the new low-power, small-footprint embedded chipset that is generally paired with the Atom CPU and is not their normal PC chipset.
or something. So that people can actually make a somewhat informed guess about whether it's relevant to them or not.
Linus
Re: [git patches] libata updates - (improve post-reset device ready test) regression
In reply to Jeff GarzikQuoted 3 lines
Tejun Heo (12):
libata: improve post-reset device ready test
This commit (78ab88f04f44bed566d51dce0c7cbfeff6449a06) causes a long boot delay with my onboard Promise controller. It seems like libata probes for a nonexisting PATA drive...
ACPI: PCI Interrupt 0000:00:08.0[A] -> GSI 18 (level, low) -> IRQ 18 scsi0 : sata_promise
scsi1 : sata_promise
scsi2 : sata_promise
ata1: SATA max UDMA/133 mmio m4096@0xfb600000 port 0xfb600200 irq 18
ata2: SATA max UDMA/133 mmio m4096@0xfb600000 port 0xfb600280 irq 18
ata3: PATA max UDMA/133 mmio m4096@0xfb600000 port 0xfb600300 irq 18
ata1: SATA link down (SStatus 0 SControl 300)
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300) ata2.00: ATA-7: SAMSUNG HD753LJ, 1AA01109, max UDMA7 ata2.00: 1465149168 sectors, multi 0: LBA48 NCQ (depth 0/32) ata2.00: configured for UDMA/133
ata3: link is slow to respond, please be patient (ready=0)
ata3: device not ready (errno=-16), forcing hardreset
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
- Last output repeated twice -
ata3: reset failed, giving up
Signature · 1 line
Markus
Re: [git patches] libata updates - (improve post-reset device ready test) regression
At Wed, 7 May 2008 16:56:16 +0200,
Quoted 23 lines · Markus Trippelsdorf
Quoted 4 lines
Tejun Heo (12):
libata: improve post-reset device ready testThis commit (
78ab88f04f44bed566d51dce0c7cbfeff6449a06) causes a long boot delay with my onboard Promise controller. It seems like libata probes for a nonexisting PATA drive...ACPI: PCI Interrupt 0000:00:08.0[A] -> GSI 18 (level, low) -> IRQ 18 scsi0 :
sata_promise
scsi1 :sata_promise
scsi2 :sata_promise
ata1: SATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600200irq 18
ata2: SATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600280irq 18
ata3: PATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600300irq 18
ata1: SATA link down (SStatus 0 SControl 300)
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300) ata2.00: ATA-7: SAMSUNG HD753LJ, 1AA01109, max UDMA7 ata2.00: 1465149168 sectors, multi 0: LBA48 NCQ (depth 0/32) ata2.00: configured for UDMA/133
ata3: link is slow to respond, please be patient (ready=0)
ata3: device not ready (errno=-16), forcing hardreset
Quoted 8 lines
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
- Last output repeated twice -
ata3: reset failed, giving up
The same problem appears on my machine, too:
libata version 3.00 loaded.ata_piix 0000:00:1f.2: version 2.12
ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 19 (level, low) -> IRQ 19 ata_piix 0000:00:1f.2: MAP [ P0 P2 P1 P3 ]
PCI: Setting latency timer of device 0000:00:1f.2 to 64 scsi0 : ata_piix
scsi1 : ata_piix
ata1: SATA max UDMA/133 cmd 0xe400 ctl 0xe500 bmdma 0xe800 irq 19
ata2: SATA max UDMA/133 cmd 0xe600 ctl 0xe700 bmdma 0xe808 irq 19 ata1.00: ATA-7: HDS728080PLA380, PF2OA60A, max UDMA/133 ata1.00: 160836480 sectors, multi 16: LBA48 NCQ (depth 0/32) ata1.00: configured for UDMA/133
ata2: link is slow to respond, please be patient (ready=0)
ata2: device not ready (errno=-16), forcing hardreset
ata2: link is slow to respond, please be patient (ready=0)
ata2: SRST failed (errno=-16)
ata2: link is slow to respond, please be patient (ready=0)
ata2: SRST failed (errno=-16)
ata2: link is slow to respond, please be patient (ready=0)
ata2: SRST failed (errno=-16)
ata2: SRST failed (errno=-16)
ata2: reset failed, giving up
Takashi
Re: [git patches] libata updates - (improve post-reset device ready test) regression
07/05/08 12:35 PM, Takashi Iwai:
Quoted 27 lines
The same problem appears on my machine, too:
libata version 3.00 loaded.
ata_piix0000:00:1f.2: version 2.12
ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 19 (level, low) -> IRQ 19ata_piix0000:00:1f.2: MAP [ P0 P2 P1 P3 ]
PCI: Setting latency timer of device 0000:00:1f.2 to 64 scsi0 :ata_piix
scsi1 :ata_piix
ata1: SATA max UDMA/133 cmd0xe400ctl0xe500bmdma0xe800irq 19
ata2: SATA max UDMA/133 cmd0xe600ctl0xe700bmdma0xe808irq 19 ata1.00: ATA-7: HDS728080PLA380, PF2OA60A, max UDMA/133 ata1.00: 160836480 sectors, multi 16: LBA48 NCQ (depth 0/32) ata1.00: configured for UDMA/133
ata2: link is slow to respond, please be patient (ready=0)
ata2: device not ready (errno=-16), forcing hardreset
ata2: link is slow to respond, please be patient (ready=0)
ata2: SRST failed (errno=-16)
ata2: link is slow to respond, please be patient (ready=0)
ata2: SRST failed (errno=-16)
ata2: link is slow to respond, please be patient (ready=0)
ata2: SRST failed (errno=-16)
ata2: SRST failed (errno=-16)
ata2: reset failed, giving up
Quoted 1 line
Takashi
Same here as well, with sata_nv.
The patch comment states:
Quoted 5 lines
This patch implements
ata_check_ready(), which takes TF status value and determines whether the port is ready or not considering the above and other conditions, and use it in @check_ready() functions. This is safe as both0x77and0x7faren't valid ready status value even though they have BSY bit cleared.
.. but adding a print to the ata_check_ready function shows the status in my case is systematically 0x7f for all unconnected links. This makes ata_*_check_ready return 0 where it previously returned 1, and triggers several hundred retries (over several minutes) before the boot proceeds.
Marc
Re: [git patches] libata updates - (improve post-reset device ready test) regression
In reply to Takashi IwaiAm Mittwoch 07 Mai 2008 18:35:48 schrieben Sie:
Quoted 11 lines
At Wed, 7 May 2008 16:56:16 +0200,
Quoted 9 lines · Markus Trippelsdorf
Quoted 4 lines
Tejun Heo (12):
libata: improve post-reset device ready testThis commit (
78ab88f04f44bed566d51dce0c7cbfeff6449a06) causes a long boot delay with my onboard Promise controller. It seems like libata probes for a nonexisting PATA drive...
Same here :
<6>ata1: SATA max UDMA/133 abar m2048@0xfc404000 port 0xfc404100 irq 4347 <6>ata2: SATA max UDMA/133 abar m2048@0xfc404000 port 0xfc404180 irq 4347 <6>ata3: SATA max UDMA/133 abar m2048@0xfc404000 port 0xfc404200 irq 4347 <6>ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
<4>ata1.00: _GTF unexpected object type 0x1
<6>ata1.00: ATA-8: WDC WD2500BEVS-22UST0, 01.01A01, max UDMA/133
<6>ata1.00: 488397168 sectors, multi 16: LBA48 NCQ (depth 31/32)
<4>ata1.00: _GTF unexpected object type 0x1
<6>ata1.00: configured for UDMA/133
<6>ata2: SATA link down (SStatus 0 SControl 300)
<6>ata3: SATA link down (SStatus 0 SControl 300)
<5>scsi 0:0:0:0: Direct-Access ATA WDC WD2500BEVS-2 01.0 PQ: 0 ANSI: 5
<7>PM: Adding info for No Bus:target0:0:0
<7>PM: Adding info for scsi:0:0:0:0
<7>PM: Adding info for No Bus:0:0:0:0
<7>ata_piix 0000:00:1f.1: version 2.12
<6>ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 19 (level, low) -> IRQ 19
<7>PCI: Setting latency timer of device 0000:00:1f.1 to 64
<6>scsi3 : ata_piix
<7>PM: Adding info for No Bus:host3
<7>PM: Adding info for No Bus:host3
<6>scsi4 : ata_piix
<7>PM: Adding info for No Bus:host4
<7>PM: Adding info for No Bus:host4
<6>ata4: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0x1810 irq 14
<6>ata5: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0x1818 irq 15
<6>ata4.00: ATAPI: HL-DT-ST DVDRAM GSA-T20N, WW01, max UDMA/33
<6>ata4.00: configured for UDMA/33
<4>ata5: link is slow to respond, please be patient (ready=0)
<4>ata5: device not ready (errno=-16), forcing hardreset
<4>ata5: link is slow to respond, please be patient (ready=0)
<3>ata5: SRST failed (errno=-16)
<4>ata5: link is slow to respond, please be patient (ready=0)
<3>ata5: SRST failed (errno=-16)
<4>ata5: link is slow to respond, please be patient (ready=0)
<3>ata5: SRST failed (errno=-16)
<3>ata5: SRST failed (errno=-16)
<3>ata5: reset failed, giving up
<4>isa bounce pool size: 16 pages
<5>scsi 3:0:0:0: CD-ROM HL-DT-ST DVDRAM GSA-T20N WW01 PQ: 0 ANSI: 5
<7>PM: Adding info for No Bus:target3:0:0
<7>PM: Adding info for scsi:3:0:0:0
<7>PM: Adding info for No Bus:3:0:0:0
<6>SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled <6>SGI XFS Quota Management subsystem
<6>BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
<6>EDD information not available.
<4>sys_init_module: 'edd'->init suspiciously returned 1, it should follow 0/-E convention <4>sys_init_module: loading module anyway...
<4>Pid: 554, comm: modprobe Not tainted 2.6.26-rc1-linus.git-00166-gc0a1811 #1 <4>
<4>Call Trace:
<4> [sys_init_module+304/428] sys_init_module+0x130/0x1ac
<4> [system_call_after_swapgs+138/143] system_call_after_swapgs+0x8a/0x8f
<4>
<6>usbcore: registered new interface driver usbfs
<6>usbcore: registered new interface driver hub
<6>usbcore: registered new device driver usb
[PATCH] Re: [git patches] libata updates - (improve post-reset device ready test) regression
In reply to Markus TrippelsdorfQuoted 20 lines · Markus Trippelsdorf
Quoted 2 lines
Tejun Heo (12):
libata: improve post-reset device ready testThis commit (
78ab88f04f44bed566d51dce0c7cbfeff6449a06) causes a long boot delay with my onboard Promise controller. It seems like libata probes for a nonexisting PATA drive...ACPI: PCI Interrupt 0000:00:08.0[A] -> GSI 18 (level, low) -> IRQ 18 scsi0 :
sata_promise
scsi1 :sata_promise
scsi2 :sata_promise
ata1: SATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600200irq 18
ata2: SATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600280irq 18
ata3: PATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600300irq 18
ata1: SATA link down (SStatus 0 SControl 300)
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300) ata2.00: ATA-7: SAMSUNG HD753LJ, 1AA01109, max UDMA7 ata2.00: 1465149168 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata2.00: configured for UDMA/133 ata3: link is slow to respond, please be patient (ready=0)
ata3: device not ready (errno=-16), forcing hardreset
Quoted 8 lines
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
- Last output repeated twice -
ata3: reset failed, giving up
Does the attached patch fix things?
It basically reverts the patch, while still maintaining the consolidation. It looks like that status evaluation is not as universal as believed.
Jeff
include/linux/libata.h +3 -6
@@ -1384,17 +1384,14 @@ static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host)static inline int ata_check_ready (u8 status) { -/* Some controllers report 0x77 or 0x7f during intermediate -* not-ready stages. -*/ -if (status ==0x77 || status ==0x7f ) -return 0 ; +if (!(status &ATA_BUSY )) +return 1 ;/* 0xff indicates either no device or device not ready */ if (status ==0xff )return -ENODEV ; -return !(status &ATA_BUSY ); +return 0 ; }
Re: [PATCH] Re: [git patches] libata updates - (improve post-reset device ready test) regression
At Thu, 08 May 2008 11:35:11 -0400,
Quoted 32 lines · Jeff Garzik
Quoted 21 lines · Markus Trippelsdorf
Quoted 2 lines
Tejun Heo (12):
libata: improve post-reset device ready testThis commit (
78ab88f04f44bed566d51dce0c7cbfeff6449a06) causes a long boot delay with my onboard Promise controller. It seems like libata probes for a nonexisting PATA drive...ACPI: PCI Interrupt 0000:00:08.0[A] -> GSI 18 (level, low) -> IRQ 18 scsi0 :
sata_promise
scsi1 :sata_promise
scsi2 :sata_promise
ata1: SATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600200irq 18
ata2: SATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600280irq 18
ata3: PATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600300irq 18
ata1: SATA link down (SStatus 0 SControl 300)
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300) ata2.00: ATA-7: SAMSUNG HD753LJ, 1AA01109, max UDMA7 ata2.00: 1465149168 sectors, multi 0: LBA48 NCQ (depth 0/32) ata2.00: configured for UDMA/133
ata3: link is slow to respond, please be patient (ready=0)
ata3: device not ready (errno=-16), forcing hardresetQuoted 8 lines
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
- Last output repeated twice -
ata3: reset failed, giving up
Quoted 5 lines
Does the attached patch fix things?
It basically reverts the patch, while still maintaining the consolidation. It looks like that status evaluation is not as universal as believed.
Yes, the patch fixes the problem on my machine.
Thanks,
Takashi
Re: [PATCH] Re: [git patches] libata updates - (improve post-reset device ready test) regression
Quoted 12 lines · Takashi Iwai
At Thu, 08 May 2008 11:35:11 -0400,
Quoted 10 lines · Jeff Garzik
Quoted 7 lines · Markus Trippelsdorf
Quoted 2 lines
Tejun Heo (12):
libata: improve post-reset device ready testThis commit (
78ab88f04f44bed566d51dce0c7cbfeff6449a06) causes a long boot delay with my onboard Promise controller. It seems like libata probes for a nonexisting PATA drive...
Quoted 8 lines
Quoted 5 lines
Does the attached patch fix things?
It basically reverts the patch, while still maintaining the consolidation. It looks like that status evaluation is not as universal as believed.
Yes, the patch fixes the problem on my machine.
Your patch fixes the problem for me, too...
Signature · 1 line
Markus
Re: [PATCH] Re: [git patches] libata updates - (improve post-reset device ready test) regression
Am Donnerstag, den 08.05.2008, 18:18 +0200 schrieb Markus Trippelsdorf:
Quoted 15 lines · Takashi Iwai
Quoted 14 lines
At Thu, 08 May 2008 11:35:11 -0400,
Quoted 12 lines · Jeff Garzik
Quoted 7 lines · Markus Trippelsdorf
Quoted 2 lines
Tejun Heo (12):
libata: improve post-reset device ready testThis commit (
78ab88f04f44bed566d51dce0c7cbfeff6449a06) causes a long boot delay with my onboard Promise controller. It seems like libata probes for a nonexisting PATA drive...Does the attached patch fix things?
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
It basically reverts the patch, while still maintaining the consolidation. It looks like that status evaluation is not as universal as believed.
Yes, the patch fixes the problem on my machine.
Your patch fixes the problem for me, too...
me too :)
Re: [PATCH] Re: [git patches] libata updates - (improve post-reset device ready test) regression
In reply to Markus TrippelsdorfQuoted 11 lines · Markus Trippelsdorf
Quoted 8 lines · Takashi Iwai
At Thu, 08 May 2008 11:35:11 -0400,
Quoted 4 lines · Jeff Garzik
It basically reverts the patch, while still maintaining the consolidation. It looks like that status evaluation is not as universal as believed.
Yes, the patch fixes the problem on my machine.
Your patch fixes the problem for me, too...
And for me: I was preparing to report when I saw these go by. A Fujitsu-Siemens laptop and a Fujitsu-Siemens desktop were each taking 70 seconds longer to boot than before. (The status byte was 0x7f.)
Thanks,
Hugh
Re: [PATCH] Re: [git patches] libata updates - (improve post-reset device ready test) regression
In reply to Jeff GarzikQuoted 8 lines · Jeff Garzik
Quoted 7 lines · Markus Trippelsdorf
Quoted 2 lines
Tejun Heo (12):
libata: improve post-reset device ready testThis commit (
78ab88f04f44bed566d51dce0c7cbfeff6449a06) causes a long boot delay with my onboard Promise controller. It seems like libata probes for a nonexisting PATA drive...
I also had this patch collected from LKML, that still applies to -git6. Is it really needed ?
ref: http://marc.info/?l=linux-ide&m=120913178617926&w=2
TIA
drivers/ata/libata-eh.c +2 -3
@@ -1312,8 +1312,7 @@ err_mask |=AC_ERR_ATA_BUS ; action |=ATA_EH_RESET ; } -if (serror & - (SERR_DATA_RECOVERED |SERR_COMM_RECOVERED |SERR_DATA )) { +if (serror & (SERR_DATA_RECOVERED |SERR_DATA )) { err_mask |=AC_ERR_ATA_BUS ; action |=ATA_EH_RESET ; }
@@ -1924,7 +1923,7 @@ }if (ehc->i.serror) - ata_port_printk(ap, KERN_ERR, + ata_link_printk(link, KERN_ERR, "SError: { %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s}\n", ehc->i.serror & SERR_DATA_RECOVERED ? "RecovData " : "", ehc->i.serror & SERR_COMM_RECOVERED ? "RecovComm " : "",
Signature · 4 lines
J.A. Magallon <jamagallon()ono!com> \ Software is like sex:
\ It's better when it's free
Mandriva Linux release 2008.1 (Cooker) for i586
Linux 2.6.23-jam05 (gcc 4.2.2 20071128 (4.2.2-2mdv2008.1)) SMP PREEMPTRe: [PATCH] Re: [git patches] libata updates - (improve post-reset device ready test) regression
In reply to Jeff Garzik08/05/08 11:35 AM, Jeff Garzik:
Quoted 30 lines
Quoted 20 lines · Markus Trippelsdorf
Quoted 2 lines
Tejun Heo (12):
libata: improve post-reset device ready testThis commit (
78ab88f04f44bed566d51dce0c7cbfeff6449a06) causes a long boot delay with my onboard Promise controller. It seems like libata probes for a nonexisting PATA drive...ACPI: PCI Interrupt 0000:00:08.0[A] -> GSI 18 (level, low) -> IRQ 18 scsi0 :
sata_promise
scsi1 :sata_promise
scsi2 :sata_promise
ata1: SATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600200irq 18
ata2: SATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600280irq 18
ata3: PATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600300irq 18
ata1: SATA link down (SStatus 0 SControl 300)
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300) ata2.00: ATA-7: SAMSUNG HD753LJ, 1AA01109, max UDMA7 ata2.00: 1465149168 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata2.00: configured for UDMA/133 ata3: link is slow to respond, please be patient (ready=0)
ata3: device not ready (errno=-16), forcing hardresetQuoted 8 lines
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
- Last output repeated twice -
ata3: reset failed, giving up
Quoted 5 lines
Does the attached patch fix things?
It basically reverts the patch, while still maintaining the consolidation. It looks like that status evaluation is not as universal as believed.
Jeff
Yes, with the patch I get normal booting behaviour.
Thanks,
Marc
Re: [PATCH] Re: [git patches] libata updates - (improve post-reset device ready test) regression
In reply to Jeff GarzikQuoted 30 lines · Jeff Garzik
Quoted 20 lines · Markus Trippelsdorf
Quoted 2 lines
Tejun Heo (12):
libata: improve post-reset device ready testThis commit (
78ab88f04f44bed566d51dce0c7cbfeff6449a06) causes a long boot delay with my onboard Promise controller. It seems like libata probes for a nonexisting PATA drive...ACPI: PCI Interrupt 0000:00:08.0[A] -> GSI 18 (level, low) -> IRQ 18 scsi0 :
sata_promise
scsi1 :sata_promise
scsi2 :sata_promise
ata1: SATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600200irq 18
ata2: SATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600280irq 18
ata3: PATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600300irq 18
ata1: SATA link down (SStatus 0 SControl 300)
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300) ata2.00: ATA-7: SAMSUNG HD753LJ, 1AA01109, max UDMA7 ata2.00: 1465149168 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata2.00: configured for UDMA/133 ata3: link is slow to respond, please be patient (ready=0)
ata3: device not ready (errno=-16), forcing hardresetQuoted 8 lines
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
- Last output repeated twice -
ata3: reset failed, giving up
Quoted 3 lines
Does the attached patch fix things?
It basically reverts the patch, while still maintaining the consolidation. It looks like that status evaluation is not as universal as believed.
This means that we need to make custom readiness tests for controllers using 0x77 or 0x7f. Eeeek... Both groups of controllers are behaving in incorrect way. Controllers shouldn't use 0x77 or 0x7f for either busy or ready states - it's invalid for both, yet, some use the 77/7f for busy while others use them for ready state. Great. :-(
Jeff, can you please revert 78ab88f04f44bed566d51dce0c7cbfeff6449a06 for now? I'll post updated patch.
Markus, Alexey, Marc, which controllers are you using?
Thanks.
Signature · 1 line
tejun
Re: [PATCH] Re: [git patches] libata updates - (improve post-reset device ready test) regression
Quoted 1 line · Tejun Heo
Markus, Alexey, Marc, which controllers are you using?
Never mind, found the rest of the thread.
Thanks.
Signature · 1 line
tejun
Re: [PATCH] Re: [git patches] libata updates - (improve post-reset device ready test) regression
In reply to Tejun HeoQuoted 53 lines · Tejun Heo
Quoted 34 lines · Jeff Garzik
Quoted 23 lines · Markus Trippelsdorf
Quoted 3 lines
Tejun Heo (12):
libata: improve post-reset device ready testThis commit (
78ab88f04f44bed566d51dce0c7cbfeff6449a06) causes a long boot delay with my onboard Promise controller. It seems like libata probes for a nonexisting PATA drive...ACPI: PCI Interrupt 0000:00:08.0[A] -> GSI 18 (level, low) -> IRQ 18 scsi0 :
sata_promise
scsi1 :sata_promise
scsi2 :sata_promise
ata1: SATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600200irq 18
ata2: SATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600280irq 18
ata3: PATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600300irq 18
ata1: SATA link down (SStatus 0 SControl 300)
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300) ata2.00: ATA-7: SAMSUNG HD753LJ, 1AA01109, max UDMA7 ata2.00: 1465149168 sectors, multi 0: LBA48 NCQ (depth 0/32) ata2.00: configured for UDMA/133
ata3: link is slow to
respond, please be patient (ready=0)
ata3: device not ready (errno=-16), forcing hardresetQuoted 8 lines
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
- Last output repeated twice -
ata3: reset failed, giving upQuoted 4 lines
Does the attached patch fix things?
It basically reverts the patch, while still maintaining the consolidation.
It looks like that status evaluation is not as universal as believed.This means that we need to make custom readiness tests for controllers using
0x77or0x7f. Eeeek... Both groups of controllers are behaving in incorrect way. Controllers shouldn't use0x77or0x7ffor either busy or ready states
- it's invalid for both, yet, some use the 77/7f for busy while others use them for ready state. Great. :-(Jeff, can you please revert
78ab88f04f44bed566d51dce0c7cbfeff6449a06for now? I'll post updated patch.Markus, Alexey, Marc, which controllers are you using?
Thanks.
Quoted 8 lines
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Hello; Im getting that same message here as well, If you have the patch I'll give it a try to see if it works.
regards;
Signature · 1 line
Justin P. Mattock
Re: [PATCH] Re: [git patches] libata updates - (improve post-reset device ready test) regression
In reply to Tejun HeoQuoted 8 lines · Tejun Heo
Quoted 2 lines · Tejun Heo
Markus, Alexey, Marc, which controllers are you using?
Never mind, found the rest of the thread.
Thanks.
Quoted 8 lines
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This patch here is what fixes this issue for the macbook pro.
http://lkml.org/lkml/2008/5/8/245
regards;
Signature · 1 line
Justin P. Mattock
Re: [PATCH] Re: [git patches] libata updates - (improve post-reset device ready test) regression
In reply to Tejun HeoQuoted 1 line · Tejun Heo
This means that we need to make custom readiness tests for controllers using
0x77or0x7f. Eeeek... Both groups of controllers are behaving in incorrect way. Controllers shouldn't use0x77or0x7ffor either busy or ready states - it's invalid for both, yet, some use the 77/7f for busy while others use them for ready state. Great. :-(
I think that's assuming too much? PATA and SATA are quite different here... in PATA the status is mostly the value from the device directly off the wires. in SATA, it may be from the device or from the controller. And "smart" or firmware-based controllers may generate their own status, too, apart from the device's status.
So that results in varied status returns, and not all the time is a definite "ready" or "not ready" obvious.
Jeff
Re: [PATCH] Re: [git patches] libata updates - (improve post-reset device ready test) regression
In reply to Tejun HeoAm Freitag, den 09.05.2008, 11:57 +0900 schrieb Tejun Heo:
Quoted 5 lines
Markus, Alexey, Marc, which controllers are you using?
Thanks.
This is lspci of my controller.
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)
00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) SATA IDE Controller (rev 01)
complete lspci -vvxxn you can find here
http://bugzilla.kernel.org/show_bug.cgi?id=10619
Re: [PATCH] Re: [git patches] libata updates - (improve post-reset device ready test) regression
In reply to Tejun Heo08/05/08 10:57 PM, Tejun Heo:
Quoted 35 lines
Quoted 30 lines · Jeff Garzik
Quoted 20 lines · Markus Trippelsdorf
Quoted 2 lines
Tejun Heo (12):
libata: improve post-reset device ready testThis commit (
78ab88f04f44bed566d51dce0c7cbfeff6449a06) causes a long boot delay with my onboard Promise controller. It seems like libata probes for a nonexisting PATA drive...ACPI: PCI Interrupt 0000:00:08.0[A] -> GSI 18 (level, low) -> IRQ 18 scsi0 :
sata_promise
scsi1 :sata_promise
scsi2 :sata_promise
ata1: SATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600200irq 18
ata2: SATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600280irq 18
ata3: PATA max UDMA/133 mmio m4096@0xfb600000 port0xfb600300irq 18
ata1: SATA link down (SStatus 0 SControl 300)
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300) ata2.00: ATA-7: SAMSUNG HD753LJ, 1AA01109, max UDMA7 ata2.00: 1465149168 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata2.00: configured for UDMA/133 ata3: link is slow to respond, please be patient (ready=0)
ata3: device not ready (errno=-16), forcing hardresetQuoted 8 lines
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
ata3: link is slow to respond, please be patient (ready=0)
ata3: SRST failed (errno=-16)
- Last output repeated twice -
ata3: reset failed, giving upQuoted 3 lines
Does the attached patch fix things?
It basically reverts the patch, while still maintaining the consolidation. It looks like that status evaluation is not as universal as believed.
Quoted 8 lines
This means that we need to make custom readiness tests for controllers using
0x77or0x7f. Eeeek... Both groups of controllers are behaving in incorrect way. Controllers shouldn't use0x77or0x7ffor either busy or ready states - it's invalid for both, yet, some use the 77/7f for busy while others use them for ready state. Great. :-(Jeff, can you please revert
78ab88f04f44bed566d51dce0c7cbfeff6449a06for now? I'll post updated patch.Markus, Alexey, Marc, which controllers are you using?
Thanks.
nVidia NForce4 chipset, sata_nv driver:
00:06.0 IDE interface: nVidia Corporation CK804 IDE (rev f2) 00:08.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3)
Marc
Re: [PATCH] Re: [git patches] libata updates - (improve post-reset device ready test) regression
In reply to J.A. MagallónQuoted 13 lines · J.A. Magallón
Quoted 7 lines · Jeff Garzik
Quoted 6 lines · Markus Trippelsdorf
Quoted 2 lines
Tejun Heo (12):
libata: improve post-reset device ready testThis commit (
78ab88f04f44bed566d51dce0c7cbfeff6449a06) causes a long boot delay with my onboard Promise controller. It seems like libata probes for a nonexisting PATA drive...I also had this patch collected from LKML, that still applies to -git6. Is it really needed ?
ref: http://marc.info/?l=linux-ide&m=120913178617926&w=2
..
drivers/ata/libata-eh.c line 1318
Quoted 12 lines
drivers/ata/libata-eh.c +1
-2@@ -1312,8 +1312,7 @@ err_mask |=AC_ERR_ATA_BUS ; action |=ATA_EH_RESET ; } -if (serror & - (SERR_DATA_RECOVERED |SERR_COMM_RECOVERED |SERR_DATA )) { +if (serror & (SERR_DATA_RECOVERED |SERR_DATA )) { err_mask |=AC_ERR_ATA_BUS ; action |=ATA_EH_RESET ; }
..
The original problem I had, which prompted this patch, eventually was resolved in other ways. But I do think that a hw-recovered bit in SError is not a good reason to reset everything.
Tejun suggested that we still want to know about such errors, and eventually do something if they repeat often enough. But doing a port/link reset every single time ?
drivers/ata/libata-eh.c line 1929
Quoted 10 lines
drivers/ata/libata-eh.c +1
-1@@ -1924,7 +1923,7 @@ }if (ehc->i.serror) - ata_port_printk(ap, KERN_ERR, + ata_link_printk(link, KERN_ERR, "SError: { %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s}\n", ehc->i.serror & SERR_DATA_RECOVERED ? "RecovData " : "", ehc->i.serror & SERR_COMM_RECOVERED ? "RecovComm " : "",
..
That portion of the patch is still a very good idea.
Cheers
Re: [PATCH] Re: [git patches] libata updates - (improve post-reset device ready test) regression
In reply to Jeff GarzikQuoted 6 lines · Jeff Garzik
Quoted 1 line · Tejun Heo
This means that we need to make custom readiness tests for controllers using
0x77or0x7f. Eeeek... Both groups of controllers are behaving in incorrect way. Controllers shouldn't use0x77or0x7ffor either busy or ready states - it's invalid for both, yet, some use the 77/7f for busy while others use them for ready state. Great. :-(I think that's assuming too much? PATA and SATA are quite different here... in PATA the status is mostly the value from the device directly off the wires. in SATA, it may be from the device or from the controller. And "smart" or firmware-based controllers may generate their own status, too, apart from the device's status.
So that results in varied status returns, and not all the time is a definite "ready" or "not ready" obvious.
I think it's pretty safe to say that these weird ready values are from TF emulation on controller side. The ready/not ready distinction is probably too simplistic but those values aren't supposed to appear during post-reset readiness test.
Sorry about the big regression. Heh... It's amazing how all the controllers I tested didn't show the problem and I did test a good number of combinations.
I still think it would be better to have a unified readiness test function. The problem is subtle (device misdetection on hotplug of certain drives) and went unnoticed quite some time for JMB ahcis && test coverage over those things can't be good. I'll try to think about something better.
Thanks.
Signature · 1 line
tejun