Re: Hitachi disk: spurious completions during NCQ
ata3.00: spurious completions during NCQ issue=0x0 SAct=0x407fd FIS=005040a1:0002 ata3.00: cmd 61/08:00:c7:5a:82/00:00:1b:00:00/40 tag 0 cdb 0x0 data 4096 out res 50/00:10:07:5b:82/00:00:1b:00:00/40 Emask 0x2 (HSM violation) This has been seen with several Hitachi drives. There's speculation that it's due to a bug in the drive firmware: http://groups.google.it/group/linux.kernel/browse_thread/thread/a4bd3c19565a2009/389817602f0cd551?hl=itlnk=stq=hitachi+hsm+violationrnum=3#389817602f0cd551 https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/137470 A workaround: Index: /etc/rc.local === --- .orig/etc/rc.local 2007-10-13 14:57:10.0 -0700 +++ /etc/rc.local 2007-10-13 14:59:21.0 -0700 @@ -11,4 +11,7 @@ # # By default this script does nothing. +# See https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/137470/ +echo 1 /sys/block/sda/device/queue_depth + exit 0 - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Bug is fixed in 2.6.23.1: sata_promise: port is slow to respond, reset failed
On Sun, 14 Oct 2007 11:21:13 +0200, Peter Favrholdt wrote: The problem is solved in 2.6.23.1 regarding the port slow to respond issue. I'm using sata_promise on Promise Technology, Inc. PDC40718 (SATA 300 TX4) (rev 02) and 4 Seagate 500GB ES drives. Using 2.6.23.1 it is possible to run dd if=/dev/sda of=/dev/null bs=1M dd if=/dev/sdb of=/dev/null bs=1M dd if=/dev/sdc of=/dev/null bs=1M dd if=/dev/sdd of=/dev/null bs=1M And it just runs perfectly to the end with no hickups :-) That's very good to hear. However, I don't see how the sata_promise changes from 2.6.22 to 2.6.23 can explain this. The only functional changes there are a critical fix for FastTrack TX4200 (not your card), and support for SATA hotplugging (not happening here). So I'm suspecting something in libata core might have changed to fix this. Just to make sure, what's the numerical PCI IDs for your card? (No big deal, but I'd like to know what the error was.) /Mikael - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Sata Sil3512 bug?
MisterE wrote: Hello, Alexander, does these problems with the Promise SATA300 TX4 happen to everyone? Most probably not, as I think it would have been fixed much faster then. I was waiting for a) release of 2.6.23, and b) me completing the move to another flat to retest all the latest developments in mainline and libata-dev. With a) done and b) almost done, I'll retest and report any issues quite soon. Besides, there is a report of TX4 and 2.6.23 not showing problems that were there with 2.6.22, ( see Bug is fixed in 2.6.23.1: sata_promise: port is slow to respond, reset failed thread). The only alternatives are using soft-raid products as normal controllers. Does anyone have experiences with the following products? * Highpoint RocketRAID 1640 (150 MB/s) * Highpoint RocketRAID 1740 (300 MB/s) * Adaptec 1210SA For any kind of non-hobby task I'd skip trying to build a disk array to buying a SATA-SCSI/SATA-iSCSI box. While I had many mind-boggling issues with various combinations of SATA HDDs, onboard and standalone controllers, Promise and Infortrend disk arrays worked quite reliably. -- ./lxnt - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Hitachi disk: spurious completions during NCQ
On 10/15/07, Don Mullis [EMAIL PROTECTED] wrote: ata3.00: spurious completions during NCQ issue=0x0 SAct=0x407fd FIS=005040a1:0002 ata3.00: cmd 61/08:00:c7:5a:82/00:00:1b:00:00/40 tag 0 cdb 0x0 data 4096 out res 50/00:10:07:5b:82/00:00:1b:00:00/40 Emask 0x2 (HSM violation) This has been seen with several Hitachi drives. There's speculation that it's due to a bug in the drive firmware: Yes, I'm aware of this. That's why I was suggesting to blacklist this drive. thanks, Luca - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/3] faster workaround
On Friday 12 October 2007 23:08:21 Jeff Garzik wrote: Bernd Schubert wrote: a) 2.6.23 + sil-patch I posted, this is on a customer system (though my former group), I wouldn't like to use -mm there. b) .config is attached c) attached d) attached (don't get irritaded by those machine check events, thats GART TLB errorr, harmless warnings, just not disabled in the bios). Any chance you could provide dmesg on 2.6.23 without the sil patch? Its attached. Bernd -- Bernd Schubert Q-Leap Networks GmbH [0.00] Linux version 2.6.23-l162 ([EMAIL PROTECTED]) (gcc version 3.4.6 (Ubuntu 3.4.6-5ubuntu1)) #7 SMP Mon Oct 15 11:50:28 CEST 2007 [0.00] Command line: root=/dev/ram0 ramdisk_size=110592 console=tty0 console=ttyS0,115200 [0.00] BIOS-provided physical RAM map: [0.00] BIOS-e820: - 0009f400 (usable) [0.00] BIOS-e820: 0009f400 - 000a (reserved) [0.00] BIOS-e820: 000e - 0010 (reserved) [0.00] BIOS-e820: 0010 - fbff (usable) [0.00] BIOS-e820: fbff - fbfff000 (ACPI data) [0.00] BIOS-e820: fbfff000 - fc00 (ACPI NVS) [0.00] BIOS-e820: ff78 - 0001 (reserved) [0.00] BIOS-e820: 0001 - 0004 (usable) [0.00] Entering add_active_range(0, 0, 159) 0 entries of 3200 used [0.00] Entering add_active_range(0, 256, 1032176) 1 entries of 3200 used [0.00] Entering add_active_range(0, 1048576, 4194304) 2 entries of 3200 used [0.00] end_pfn_map = 4194304 [0.00] DMI 2.3 present. [0.00] ACPI: RSDP 000F6F20, 0014 (r0 ACPIAM) [0.00] ACPI: RSDT FBFF, 0038 (r1 A M I OEMRSDT 7000626 MSFT 97) [0.00] ACPI: FACP FBFF0200, 0081 (r1 A M I OEMFACP 7000626 MSFT 97) [0.00] ACPI: DSDT FBFF0410, 3751 (r1 0 00000 INTL 2002026) [0.00] ACPI: FACS FBFFF000, 0040 [0.00] ACPI: APIC FBFF0380, 0084 (r1 A M I OEMAPIC 7000626 MSFT 97) [0.00] ACPI: OEMB FBFFF040, 0041 (r1 A M I OEMBIOS 7000626 MSFT 97) [0.00] ACPI: SRAT FBFF3B70, 0110 (r1 A M I OEMSRAT 7000626 MSFT 97) [0.00] ACPI: ASF! FBFF3C80, 0086 (r1 AMIASF AMDSTRET1 INTL 2002026) [0.00] SRAT: PXM 0 - APIC 0 - Node 0 [0.00] SRAT: PXM 1 - APIC 1 - Node 1 [0.00] SRAT: Node 0 PXM 0 10-fc00 [0.00] Entering add_active_range(0, 256, 1032176) 0 entries of 3200 used [0.00] SRAT: Node 1 PXM 1 2-4 [0.00] Entering add_active_range(1, 2097152, 4194304) 1 entries of 3200 used [0.00] SRAT: Node 0 PXM 0 10-2 [0.00] Entering add_active_range(0, 256, 1032176) 2 entries of 3200 used [0.00] Entering add_active_range(0, 1048576, 2097152) 2 entries of 3200 used [0.00] SRAT: Node 0 PXM 0 0-2 [0.00] Entering add_active_range(0, 0, 159) 3 entries of 3200 used [0.00] Entering add_active_range(0, 256, 1032176) 4 entries of 3200 used [0.00] Entering add_active_range(0, 1048576, 2097152) 4 entries of 3200 used [0.00] NUMA: Using 33 for the hash shift. [0.00] Bootmem setup node 0 -0002 [0.00] Bootmem setup node 1 0002-0004 [0.00] Zone PFN ranges: [0.00] DMA 0 - 4096 [0.00] DMA324096 - 1048576 [0.00] Normal1048576 - 4194304 [0.00] Movable zone start PFN for each node [0.00] early_node_map[4] active PFN ranges [0.00] 0:0 - 159 [0.00] 0: 256 - 1032176 [0.00] 0: 1048576 - 2097152 [0.00] 1: 2097152 - 4194304 [0.00] On node 0 totalpages: 2080655 [0.00] DMA zone: 56 pages used for memmap [0.00] DMA zone: 1451 pages reserved [0.00] DMA zone: 2492 pages, LIFO batch:0 [0.00] DMA32 zone: 14280 pages used for memmap [0.00] DMA32 zone: 1013800 pages, LIFO batch:31 [0.00] Normal zone: 14336 pages used for memmap [0.00] Normal zone: 1034240 pages, LIFO batch:31 [0.00] Movable zone: 0 pages used for memmap [0.00] On node 1 totalpages: 2097152 [0.00] DMA zone: 0 pages used for memmap [0.00] DMA32 zone: 0 pages used for memmap [0.00] Normal zone: 28672 pages used for memmap [0.00] Normal zone: 2068480 pages, LIFO batch:31 [0.00] Movable zone: 0 pages used for memmap [0.00] ACPI: PM-Timer IO Port: 0x1008 [0.00] ACPI: Local APIC address 0xfee0 [0.00] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled) [0.00] Processor #0 (Bootup-CPU) [0.00] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled) [0.00]
[PATCH] Add a global ide=off switch for drivers/ide
Had a situation where drivers/ide was compiled in, but I wanted to turn it off to let the drivers/ata drivers take over. I ended up using ide*=noprobe, but that was somewhat clumpsy because I wasn't sure how many IDE interfaces the machine really had. Add a global ide=off switch to handle this situation better. The patch is a little bigger because I tried to cover all modules. I'm also not 100% sure ENODEV is the right error return for this case, but I didn't come up with a better one. The ARM/MIPS part is uncompiled. Signed-off-by: Andi Kleen [EMAIL PROTECTED] Index: linux-2.6.23-rc8-misc/drivers/ide/ide.c === --- linux-2.6.23-rc8-misc.orig/drivers/ide/ide.c +++ linux-2.6.23-rc8-misc/drivers/ide/ide.c @@ -91,6 +91,9 @@ static const u8 ide_hwif_to_major[] = { static int idebus_parameter; /* holds the idebus= parameter */ static int system_bus_speed; /* holds what we think is VESA/PCI bus speed */ +int ide_off; +EXPORT_SYMBOL(ide_off); + DEFINE_MUTEX(ide_cfg_mtx); __cacheline_aligned_in_smp DEFINE_SPINLOCK(ide_lock); @@ -1249,6 +1252,13 @@ static int __init ide_setup(char *s) return 0; printk(KERN_INFO ide_setup: %s, s); + + if (!strcmp(s, ide=off)) { + printk( : IDE disabled\n); + ide_off = 1; + return 1; + } + init_ide_data (); #ifdef CONFIG_BLK_DEV_IDEDOUBLER @@ -1717,6 +1727,9 @@ static int __init ide_init(void) { int ret; + if (ide_off) + return -ENODEV; + printk(KERN_INFO Uniform Multi-Platform E-IDE driver REVISION \n); system_bus_speed = ide_system_bus_speed(); Index: linux-2.6.23-rc8-misc/drivers/ide/setup-pci.c === --- linux-2.6.23-rc8-misc.orig/drivers/ide/setup-pci.c +++ linux-2.6.23-rc8-misc/drivers/ide/setup-pci.c @@ -793,6 +793,8 @@ static LIST_HEAD(ide_pci_drivers); int __ide_pci_register_driver(struct pci_driver *driver, struct module *module, const char *mod_name) { + if (ide_off) + return -ENODEV; if(!pre_init) return __pci_register_driver(driver, module, mod_name); driver-driver.owner = module; Index: linux-2.6.23-rc8-misc/include/linux/ide.h === --- linux-2.6.23-rc8-misc.orig/include/linux/ide.h +++ linux-2.6.23-rc8-misc/include/linux/ide.h @@ -871,6 +871,8 @@ typedef struct ide_driver_s ide_driver_t extern struct mutex ide_setting_mtx; +extern int ide_off; + int set_io_32bit(ide_drive_t *, int); int set_pio_mode(ide_drive_t *, int); int set_using_dma(ide_drive_t *, int); Index: linux-2.6.23-rc8-misc/drivers/ide/arm/bast-ide.c === --- linux-2.6.23-rc8-misc.orig/drivers/ide/arm/bast-ide.c +++ linux-2.6.23-rc8-misc/drivers/ide/arm/bast-ide.c @@ -52,6 +52,9 @@ bastide_register(unsigned int base, unsi static int __init bastide_init(void) { + if (ide_off) + return -ENODEV; + /* we can treat the VR1000 and the BAST the same */ if (!(machine_is_bast() || machine_is_vr1000())) Index: linux-2.6.23-rc8-misc/drivers/ide/arm/icside.c === --- linux-2.6.23-rc8-misc.orig/drivers/ide/arm/icside.c +++ linux-2.6.23-rc8-misc/drivers/ide/arm/icside.c @@ -824,6 +824,8 @@ static struct ecard_driver icside_driver static int __init icside_init(void) { + if (ide_off) + return -ENODEV; return ecard_register_driver(icside_driver); } Index: linux-2.6.23-rc8-misc/drivers/ide/arm/rapide.c === --- linux-2.6.23-rc8-misc.orig/drivers/ide/arm/rapide.c +++ linux-2.6.23-rc8-misc/drivers/ide/arm/rapide.c @@ -113,6 +113,8 @@ static struct ecard_driver rapide_driver static int __init rapide_init(void) { + if (ide_off) + return -ENODEV; return ecard_register_driver(rapide_driver); } Index: linux-2.6.23-rc8-misc/drivers/ide/ide-cd.c === --- linux-2.6.23-rc8-misc.orig/drivers/ide/ide-cd.c +++ linux-2.6.23-rc8-misc/drivers/ide/ide-cd.c @@ -3568,6 +3568,8 @@ static void __exit ide_cdrom_exit(void) static int __init ide_cdrom_init(void) { + if (ide_off) + return -ENODEV; return driver_register(ide_cdrom_driver.gen_driver); } Index: linux-2.6.23-rc8-misc/drivers/ide/ide-disk.c === --- linux-2.6.23-rc8-misc.orig/drivers/ide/ide-disk.c +++ linux-2.6.23-rc8-misc/drivers/ide/ide-disk.c @@ -1329,6 +1329,8 @@ static void __exit idedisk_exit (void) static int __init idedisk_init(void) { + if (ide_off) + return
RE: [PATCH v2] drivers/ata: add support to Freescale 3.0Gbps SATA Controller
Hello Arnd, Thanks for your comments and feedback. Actually, for PowerPC platforms iowrite32/ioread32 internally call writel/readl, which are again mapped to out_le32/in_le32, therefore we will modify our code to use of_iomap() to combine functionalities of both of_address_to_resource() ioremap(). We will also incorporate your other suggestions and then resubmit the patch. Ashish -Original Message- From: Arnd Bergmann [mailto:[EMAIL PROTECTED] Sent: Friday, October 12, 2007 7:52 PM To: [EMAIL PROTECTED] Cc: Li Yang-r58472; [EMAIL PROTECTED]; linux-ide@vger.kernel.org; Kalra Ashish-B00888 Subject: Re: [PATCH v2] drivers/ata: add support to Freescale 3.0Gbps SATA Controller On Friday 12 October 2007, Li Yang wrote: This patch adds support for Freescale 3.0Gbps SATA Controller supporting Native Command Queueing(NCQ), device hotplug, and ATAPI. This controller can be found on MPC8315 and MPC8378. Most of the driver looks really good, but here are a few things that stick out: +static int sata_fsl_probe(struct of_device *ofdev, + const struct of_device_id *match) +{ + int retval = 0; + void __iomem *hcr_base = NULL; + void __iomem *ssr_base = NULL; + void __iomem *csr_base = NULL; + struct sata_fsl_host_priv *host_priv = NULL; + struct resource *r; + int irq; + struct ata_host *host; + + struct ata_port_info pi = sata_fsl_port_info[0]; + const struct ata_port_info *ppi[] = { pi, NULL }; + + dev_printk(KERN_INFO, ofdev-dev, +Sata FSL Platform/CSB Driver init\n); + + r = kmalloc(sizeof(struct resource), GFP_KERNEL); + retval = of_address_to_resource(ofdev-node, 0, r); + if (retval) + return -EINVAL; + + DPRINTK(start i/o @0x%x\n, r-start); + + hcr_base = ioremap(r-start, r-end - r-start + 1); + if (!hcr_base) + goto error_exit_with_cleanup; Hmm, I think we should redefine of_iomap to do the right thing for you. currently, it is the combination of of_address_to_resource and ioremap, which you do as well, so your code can be simplified to do that. However, ioremap is meant to be used with readl/writel or in_le32/out_le32 and similar functions, not with ioread32/iowrite32 which you are using. I had planned to do a patch to get that right for some time so you can use of_iomap with ioread in all cases, but I guess you should start using of_iomap even now. + +error_exit_with_cleanup: + + if (hcr_base) + iounmap(hcr_base); + if (host_priv) + kfree(host_priv); + + return retval; +} Once of_iomap start using devres, we would no longer need to iounmap here. +static int sata_fsl_remove(struct of_device *ofdev) { + struct ata_host *host = dev_get_drvdata(ofdev-dev); + struct sata_fsl_host_priv *host_priv = host-private_data; + + dev_set_drvdata(ofdev-dev, NULL); + + iounmap(host_priv-hcr_base); + kfree(host_priv); + + return 0; +} Should you also free the irq mapping here? --- /dev/null +++ b/drivers/ata/sata_fsl.h @@ -0,0 +1,92 @@ +/* + * drivers/ata/sata_fsl.h + * + * Freescale 3.0Gbps SATA device driver The header file is entirely pointless, since all definitions in here are only used in a single file. Please merge the header into the implementation. +static int sata_fsl_probe(struct of_device *ofdev, + const struct of_device_id *match); static int +sata_fsl_remove(struct of_device *ofdev); static int +sata_fsl_scr_read(struct ata_port *, unsigned int, u32 *); static int +sata_fsl_scr_write(struct ata_port *, unsigned int, u32); static +unsigned int sata_fsl_qc_issue(struct ata_queued_cmd *); static +irqreturn_t sata_fsl_interrupt(int, void *); static void +sata_fsl_irq_clear(struct ata_port *); static int +sata_fsl_port_start(struct ata_port *); static void +sata_fsl_port_stop(struct ata_port *); static void +sata_fsl_tf_read(struct ata_port *, struct ata_taskfile *); static +void sata_fsl_qc_prep(struct ata_queued_cmd *); static u8 +sata_fsl_check_status(struct ata_port *); static void +sata_fsl_freeze(struct ata_port *); static void sata_fsl_thaw(struct +ata_port *); static void sata_fsl_error_handler(struct ata_port *); +static void sata_fsl_post_internal_cmd(struct ata_queued_cmd *); + +static inline unsigned int sata_fsl_tag(unsigned int, void __iomem +*); In particular, get rid of the forward declarations for static functions. All functions in a simple driver should be ordered in a way that you always reference only code that was previously defined. This helps avoid accidental recursions and makes it easier to review. Arnd - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] drivers/ata: add support to Freescale 3.0Gbps SATA Controller
On Monday 15 October 2007, Kalra Ashish-B00888 wrote: Thanks for your comments and feedback. Actually, for PowerPC platforms iowrite32/ioread32 internally call writel/readl, which are again mapped to out_le32/in_le32, This is correct on 6xx and e500 for now, but it's a little more complicated than that in general: iowriteXX/ioreadXX are either the simple readX/writeX wrappers from arch/powerpc/kernel/iomap.c, or the more complex functions from lib/iomap.c, depending on whether any of the active platforms has set CONFIG_PPC_INDIRECT_IO. writeX/readX can either map directly to out_leXX/in_leXX, or do something more complicated, again depending on the platform. In general, writeX/readX may need to consider PCI specific error handling or synchronization requirements, while out_leXX/in_leXX are low-level accessors that should only be used by device drivers when they are used on directly connected (non-PCI) devices. Since iowriteXX/ioreadXX is supposed to be the most generic variant covering both PCI MMIO (writeX/readX) and PCI PIO (outX/inX) transfers, it would make sense to extend them to also do SOC MMIO (out_leXX/in_leXX/out_beXX/in_beXX) and DCR (dcr_write/dcr_read) accesses in the future. Arnd - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [git patches] IDE updates (part 1)
On Sun, 14 Oct 2007, Bartlomiej Zolnierkiewicz wrote: CONFIG_BLK_DEV_IDE_SWARM disabled by default -- that should probably be changed; I'll cook a patch). I guess it is not possible to make everyone happy at once though, so please do not treat it as a hard objection. :-) Hmm, it also seems that CONFIG_IDE_GENERIC=y may be removed now because IDE SWARM host driver does the probing itself? I do not think it should have relied on it in any way or otherwise select should have been used. I recall confusion around this driver and even recently some breakage happened as a result of some fiddling with include/asm-mips/mach-generic/ide.h and the fact this platform is legacy-free -- there is nothing decoding subtractively on the PCI bus (no south bridge of any kind) and blind pokes at presumed ISA addresses result in bus error exceptions. I'll have a look at it in due course. Maciej - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Fwd: CMD 64x regression from 2.6.21 to 2.6.22 and 2.6.23?
Martin Rogge wrote: Hi Sergei and Bartlomiej, I have read in the changelog that both of you got linux kernel patches into 2.6.22-rc1 for the cmd64x driver. I found that some patches introduced in 2.6.22-rc1 break the CMD648 operation of one of my machines. (Actually I discovered it in 2.6.23 but since then verified that the fatal change was introduced between 2.6.21 and 2.6.22-rc1.) Your 2.6.22-rc1 patches may not be responsible for my problem. Nonetheless, could you take a look? If you need any additional info, or need me to try something out, please let me know. Could you git-bisect this? Although I have a couple of patch suspects (dealing with interrupts), all worked fine with PCI-649 just fine. PCI-648 is not really much different from 649 according to specs... Below I copied the mail I sent to lkml a few days ago. So far I have received no reaction. I'm not reading LKML, so CC your further mails to [EMAIL PROTECTED] WBR, Sergei - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
ata_piix: ICH7 invalid MAP value 0 msg at boot
Hello, I have a Sony laptop SZ series and I get the message ata_piix :00:1f.2: invalid MAP value 0 even with 'quiet' in the boot command line. I think it's because of a controller with no disk attached, but I am a total newb, so I went to #kernelnewbies and I was told to post this here. The code that prints the message is here drivers/ata/ata_piix.c +973. I'm using this kernel: Linux vaio 2.6.22-gentoo-r8 #1 SMP PREEMPT Sun Sep 30 13:19:56 BRT 2007 i686 Genuine Intel(R) CPU T2400 @ 1.83GHz GenuineIntel GNU/Linux Below are the outputs that may be relevant for tracing the problem. If anything else is needed, I can provide, but please CC me, because I'm not subscribed to the list. Guilherme -- dmesg: ata_piix :00:1f.2: version 2.11 ata_piix :00:1f.2: MAP [ P0 P2 XX XX ] ata_piix :00:1f.2: invalid MAP value 0 ACPI: PCI Interrupt :00:1f.2[B] - GSI 22 (level, low) - IRQ 21 PCI: Setting latency timer of device :00:1f.2 to 64 scsi0 : ata_piix scsi1 : ata_piix ata1: SATA max UDMA/133 cmd 0x000118d0 ctl 0x000118c6 bmdma 0x000118b0 irq 21 ata2: SATA max UDMA/133 cmd 0x000118c8 ctl 0x000118c2 bmdma 0x000118b8 irq 21 ata1.00: ATA-7: ST9100824AS, 3.14, max UDMA/133 ata1.00: 195371568 sectors, multi 16: LBA48 NCQ (depth 0/32) ata1.00: configured for UDMA/133 scsi 0:0:0:0: Direct-Access ATA ST9100824AS 3.14 PQ: 0 ANSI: 5 sd 0:0:0:0: [sda] 195371568 512-byte hardware sectors (100030 MB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 0:0:0:0: [sda] 195371568 512-byte hardware sectors (100030 MB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sda: sda1 sda2 sda3 sda4 sda5 sda6 sd 0:0:0:0: [sda] Attached SCSI disk lspci: 00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03) 00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03) 00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03) 00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02) 00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02) 00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02) 00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02) 00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2) 00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02) 00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02) 00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02) 00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02) 02:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02) 03:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8036 PCI-E Fast Ethernet Controller (rev 15) 05:04.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller 05:04.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller 05:04.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD) lspci -vvs 00:1f.2: 00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02) (prog-if 8f [Master SecP SecO PriP PriO]) Subsystem: Sony Corporation Unknown device 81e6 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium TAbort- TAbort- MAbort- SERR- PERR- INTx- Latency: 0 Interrupt: pin B routed to IRQ 21 Region 0: I/O ports at 18d0 [size=8] Region 1: I/O ports at 18c4 [size=4] Region 2: I/O ports at 18c8 [size=8] Region 3: I/O ports at 18c0 [size=4] Region 4: I/O ports at 18b0 [size=16] Region 5: Memory at dc544400 (32-bit, non-prefetchable) [size=1K] Capabilities: [70] Power
Re: Bug is fixed in 2.6.23.1: sata_promise: port is slow to respond, reset failed
Hi Mikael Pettersson wrote: However, I don't see how the sata_promise changes from 2.6.22 to 2.6.23 can explain this. The only functional changes there are a critical fix for FastTrack TX4200 (not your card), and support for SATA hotplugging (not happening here). So I'm suspecting something in libata core might have changed to fix this. Just to make sure, what's the numerical PCI IDs for your card? 01:08.0 0180: 105a:3d17 (rev 02) Subsystem: 105a:3d17 Flags: bus master, 66MHz, medium devsel, latency 72, IRQ 19 I/O ports at a400 [size=128] I/O ports at a800 [size=256] Memory at e9024000 (32-bit, non-prefetchable) [size=4K] Memory at e900 (32-bit, non-prefetchable) [size=128K] [virtual] Expansion ROM at 300a [disabled] [size=32K] Capabilities: [60] Power Management version 2 Best regards, Peter - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] libata-core: Be a bit more relaxed about early DMA zero devices
I guess Windows didn't care about the command so neither did they Signed-off-by: Alan Cox [EMAIL PROTECTED] diff -u --exclude-from /usr/src/exclude --new-file --recursive linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c linux-2.6.23-mm1/drivers/ata/libata-core.c --- linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c 2007-10-15 15:03:26.0 +0100 +++ linux-2.6.23-mm1/drivers/ata/libata-core.c 2007-10-15 15:13:49.0 +0100 @@ -2884,6 +2894,14 @@ if (dev-xfer_shift == ATA_SHIFT_PIO !ata_id_has_iordy(dev-id) dev-pio_mode = XFER_PIO_2) err_mask = ~AC_ERR_DEV; + + /* Early MWDMA devices do DMA but don't allow DMA mode setting. + Don't fail an MWDMA0 set IFF the device indicates it is in MWDMA0 */ + if (dev-xfer_shift == ATA_SHIFT_MWDMA + dev-dma_mode == XFER_MW_DMA_0 + (dev-id[63] 8) 1) + err_mask = ~AC_ERR_DEV; + if (err_mask) { ata_dev_printk(dev, KERN_ERR, failed to set xfermode (err_mask=0x%x)\n, err_mask); @@ -3985,9 +4003,6 @@ { _NEC DV5800A, NULL, ATA_HORKAGE_NODMA }, { SAMSUNG CD-ROM SN-124,N001, ATA_HORKAGE_NODMA }, { Seagate STT2A, NULL,ATA_HORKAGE_NODMA }, - { IOMEGA ZIP 250 ATAPI, NULL, ATA_HORKAGE_NODMA }, /* temporary fix */ - { IOMEGA ZIP 250 ATAPI Floppy, - NULL, ATA_HORKAGE_NODMA }, /* Odd clown on sil3726/4726 PMPs */ { Config Disk, NULL, ATA_HORKAGE_NODMA | ATA_HORKAGE_SKIP_PM }, - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] libata-core: Drop in the final bit of IORDY handling
Signed-off-by: Alan Cox [EMAIL PROTECTED] diff -u --exclude-from /usr/src/exclude --new-file --recursive linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c linux-2.6.23-mm1/drivers/ata/libata-core.c --- linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c 2007-10-15 15:03:26.0 +0100 +++ linux-2.6.23-mm1/drivers/ata/libata-core.c 2007-10-15 15:13:49.0 +0100 @@ -4203,8 +4219,12 @@ tf.command = ATA_CMD_SET_FEATURES; tf.feature = SETFEATURES_XFER; tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE | ATA_TFLAG_POLLING; tf.protocol = ATA_PROT_NODATA; - tf.nsect = dev-xfer_mode; + /* Ancient devices may need us to avoid IORDY */ + if (ata_pio_need_iordy(dev)) + tf.nsect = dev-xfer_mode; + else + tf.nsect = 0x01; err_mask = ata_exec_internal(dev, tf, NULL, DMA_NONE, NULL, 0, 0); - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] libata-core: Don't have screaming fits over DF/ERR combinations
Some hardware seems to get this wrong in a non-harmful way, and there are some devices that seem to do it deliberately for various reasons. Just take it as a device error not a catastrophic state machine explosion. Signed-off-by: Alan Cox [EMAIL PROTECTED] diff -u --exclude-from /usr/src/exclude --new-file --recursive linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c linux-2.6.23-mm1/drivers/ata/libata-core.c --- linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c 2007-10-15 15:03:26.0 +0100 +++ linux-2.6.23-mm1/drivers/ata/libata-core.c 2007-10-15 15:13:49.0 +0100 @@ -5258,7 +5319,15 @@ if (unlikely(status (ATA_ERR | ATA_DF))) { ata_port_printk(ap, KERN_WARNING, DRQ=1 with device error, dev_stat 0x%X\n, status); - qc-err_mask |= AC_ERR_HSM; + /* Some devices muck this up. Some follow an ATA + non-standard that permits the damaged sector to + be retrieved at this point. The ATA spec says + we should jump up and down on DRQ + ERR, reality + says we should be a little more relaxed. + + Rather than an HSM error, take it as a device + error */ + qc-err_mask |= AC_ERR_DEV; ap-hsm_task_state = HSM_ST_ERR; goto fsm_start; } - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] libata-sff: Correct use of check_status()
ata_check_status() does an SFF compliant check ata_chk_status() does a generic call to ap-ops-check_status (usually ata_check_status) libata-sff uses the wrong one. Hardly suprising given the naming here, which ought to get fixed to ata_sff_check_status() perhaps ? Signed-off-by: Alan Cox [EMAIL PROTECTED] diff -u --exclude-from /usr/src/exclude --new-file --recursive linux.vanilla-2.6.23-mm1/drivers/ata/libata-sff.c linux-2.6.23-mm1/drivers/ata/libata-sff.c --- linux.vanilla-2.6.23-mm1/drivers/ata/libata-sff.c 2007-10-15 15:03:26.0 +0100 +++ linux-2.6.23-mm1/drivers/ata/libata-sff.c 2007-10-15 15:16:29.0 +0100 @@ -156,7 +156,7 @@ { struct ata_ioports *ioaddr = ap-ioaddr; - tf-command = ata_check_status(ap); + tf-command = ata_chk_status(ap); tf-feature = ioread8(ioaddr-error_addr); tf-nsect = ioread8(ioaddr-nsect_addr); tf-lbal = ioread8(ioaddr-lbal_addr); - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] ide: fix serverworks.c UDMA regression
The patch described by the following excerpt from ChangeLog-2.6.22 makes it impossible to use UDMA on a Tyan S2707 motherboard (SvrWks CSB5): commit 2d5eaa6dd744a641e75503232a01f52d0768884c Author: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] Date: Thu May 10 00:01:08 2007 +0200 ide: rework the code for selecting the best DMA transfer mode (v3) ... This one-line patch against 2.6.23 fixes the problem. Signed-off-by: Tony Battersby [EMAIL PROTECTED] --- --- linux-2.6.23/drivers/ide/pci/serverworks.c.orig 2007-10-15 12:15:01.0 -0400 +++ linux-2.6.23/drivers/ide/pci/serverworks.c 2007-10-15 13:47:29.0 -0400 @@ -97,6 +97,7 @@ static u8 svwks_udma_filter(ide_drive_t mode = 2; switch(mode) { + case 3: mask = 0x3f; break; case 2: mask = 0x1f; break; case 1: mask = 0x07; break; default: mask = 0x00; break; - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] pata_pcmcia: Add support for dumb 8bit IDE emulations
Signed-off-by: Alan Cox [EMAIL PROTECTED] diff -u --exclude-from /usr/src/exclude --new-file --recursive linux.vanilla-2.6.23-mm1/drivers/ata/pata_pcmcia.c linux-2.6.23-mm1/drivers/ata/pata_pcmcia.c --- linux.vanilla-2.6.23-mm1/drivers/ata/pata_pcmcia.c 2007-10-15 15:03:26.0 +0100 +++ linux-2.6.23-mm1/drivers/ata/pata_pcmcia.c 2007-10-15 15:17:56.0 +0100 @@ -87,6 +87,43 @@ return ata_do_set_mode(link, r_failed_dev); } +/** + * pcmcia_set_mode_8bit- PCMCIA specific mode setup + * @link: link + * @r_failed_dev: Return pointer for failed device + * + * For the simple emulated 8bit stuff the less we do the better. + */ + +static int pcmcia_set_mode_8bit(struct ata_link *link, struct ata_device **r_failed_dev) +{ + return 0; +} + +/** + * ata_data_xfer_8bit - Transfer data by 8bit PIO + * @adev: device to target + * @buf: data buffer + * @buflen: buffer length + * @write_data: read/write + * + * Transfer data from/to the device data register by 8 bit PIO. + * + * LOCKING: + * Inherited from caller. + */ + +static void ata_data_xfer_8bit(struct ata_device *adev, unsigned char *buf, + unsigned int buflen, int write_data) +{ + struct ata_port *ap = adev-link-ap; + if (write_data) + iowrite8_rep(ap-ioaddr.data_addr, buf, buflen); + else + ioread8_rep(ap-ioaddr.data_addr, buf, buflen); +} + + static struct scsi_host_template pcmcia_sht = { .module = THIS_MODULE, .name = DRV_NAME, @@ -130,12 +167,38 @@ .port_start = ata_sff_port_start, }; +static struct ata_port_operations pcmcia_8bit_port_ops = { + .set_mode = pcmcia_set_mode_8bit, + .tf_load= ata_tf_load, + .tf_read= ata_tf_read, + .check_status = ata_check_status, + .exec_command = ata_exec_command, + .dev_select = ata_std_dev_select, + + .freeze = ata_bmdma_freeze, + .thaw = ata_bmdma_thaw, + .error_handler = ata_bmdma_error_handler, + .post_internal_cmd = ata_bmdma_post_internal_cmd, + .cable_detect = ata_cable_40wire, + + .qc_prep= ata_qc_prep, + .qc_issue = ata_qc_issue_prot, + + .data_xfer = ata_data_xfer_8bit, + + .irq_clear = ata_bmdma_irq_clear, + .irq_on = ata_irq_on, + + .port_start = ata_sff_port_start, +}; + #define CS_CHECK(fn, ret) \ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) /** * pcmcia_init_one - attach a PCMCIA interface * @pdev: pcmcia device + * @ops: operations for this device * * Register a PCMCIA IDE interface. Such interfaces are PIO 0 and * shared IRQ. @@ -157,6 +220,8 @@ int pass, last_ret = 0, last_fn = 0, is_kme = 0, ret = -ENOMEM; unsigned long io_base, ctl_base; void __iomem *io_addr, *ctl_addr; + + struct ata_port_operations *ops = pcmcia_port_ops; info = kzalloc(sizeof(*info), GFP_KERNEL); if (info == NULL) @@ -284,6 +349,8 @@ if (pdev-io.NumPorts1 = 0x20) printk(KERN_WARNING DRV_NAME : second channel not yet supported.\n); + if (pdev-manf_id == 0x0097 pdev-card_id == 0x1620) + ops = pcmcia_8bit_port_ops; /* * Having done the PCMCIA plumbing the ATA side is relatively * sane. @@ -294,7 +361,7 @@ goto failed; ap = host-ports[0]; - ap-ops = pcmcia_port_ops; + ap-ops = ops; ap-pio_mask = 1; /* ISA so PIO 0 cycles */ ap-flags |= ATA_FLAG_SLAVE_POSS; ap-ioaddr.cmd_addr = io_addr; @@ -359,6 +426,7 @@ PCMCIA_DEVICE_MANF_CARD(0x0032, 0x0704), PCMCIA_DEVICE_MANF_CARD(0x0032, 0x2904), PCMCIA_DEVICE_MANF_CARD(0x0045, 0x0401),/* SanDisk CFA */ + PCMCIA_DEVICE_MANF_CARD(0x0097, 0x1620),/* TI emulated */ PCMCIA_DEVICE_MANF_CARD(0x0098, 0x),/* Toshiba */ PCMCIA_DEVICE_MANF_CARD(0x00a4, 0x002d), PCMCIA_DEVICE_MANF_CARD(0x00ce, 0x),/* Samsung */ @@ -415,7 +483,7 @@ .drv = { .name = DRV_NAME, }, - .id_table = pcmcia_devices, + .id_table = pcmcia_devices, .probe = pcmcia_init_one, .remove = pcmcia_remove_one, }; - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2.6.23]ata_piix: SATA 2port controller port map fix
Jason Gaston wrote: This patch adds a port map for ICH9 and ICH8 SATA controllers that have only 2 ports available in that mode. Signed-off-by: Jason Gaston [EMAIL PROTECTED] --- linux-2.6.23/drivers/ata/ata_piix.c.orig2007-10-09 13:31:38.0 -0700 +++ linux-2.6.23/drivers/ata/ata_piix.c 2007-10-11 15:55:19.0 -0700 @@ -131,6 +131,7 @@ ich8_sata_ahci = 9, piix_pata_mwdma = 10, /* PIIX3 MWDMA only */ tolapai_sata_ahci = 11, + ich9_2port_sata = 12, /* constants for mapping table */ P0 = 0, /* port 0 */ @@ -239,19 +240,19 @@ /* SATA Controller 1 IDE (ICH8) */ { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, /* SATA Controller 2 IDE (ICH8) */ - { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, + { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, /* Mobile SATA Controller IDE (ICH8M) */ { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, /* SATA Controller IDE (ICH9) */ { 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, /* SATA Controller IDE (ICH9) */ - { 0x8086, 0x2921, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, + { 0x8086, 0x2921, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, /* SATA Controller IDE (ICH9) */ - { 0x8086, 0x2926, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, + { 0x8086, 0x2926, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, /* SATA Controller IDE (ICH9M) */ - { 0x8086, 0x2928, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, + { 0x8086, 0x2928, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, /* SATA Controller IDE (ICH9M) */ - { 0x8086, 0x292d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, + { 0x8086, 0x292d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, /* SATA Controller IDE (ICH9M) */ { 0x8086, 0x292e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, /* SATA Controller IDE (Tolapai) */ @@ -456,6 +457,18 @@ }, }; +static const struct piix_map_db ich9_2port_map_db = { +.mask = 0x3, +.port_enable = 0x3, +.map = { +/* PM PS SM SS MAP */ +{ P0, NA, P1, NA }, /* 00b */ +{ RV, RV, RV, RV }, /* 01b */ +{ RV, RV, RV, RV }, /* 10b */ +{ RV, RV, RV, RV }, +}, +}; this was full of spaces, and should be converted to tabs (I did this manually) In the future, make sure to run your patch through scripts/checkpatch.pl. Some of that script's complaints are a bit insane, but most are good. static const struct piix_map_db *piix_map_db_table[] = { [ich5_sata] = ich5_map_db, [ich6_sata] = ich6_map_db, @@ -463,6 +476,7 @@ [ich6m_sata_ahci] = ich6m_map_db, [ich8_sata_ahci]= ich8_map_db, [tolapai_sata_ahci] = tolapai_map_db, + [ich9_2port_sata] = ich9_2port_map_db, }; static struct ata_port_info piix_port_info[] = { @@ -587,6 +601,17 @@ .udma_mask = ATA_UDMA6, .port_ops = piix_sata_ops, }, + + /* ich9_2port_sata: 12: */ changed this to [ich9_2port_sata] = since we have started using the (C99? gcc?) method of initializing piix_port_info[] array entries based on the given index, rather than simply noting the index in a comment and depending on the order of other entries not to change. Jeff - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] pata_cs5536: ATA driver for Geode companion chip
Martin K. Petersen wrote: This is a driver for the ATA controller on the Geode CS5536 companion chip. The PCI device ID for this device was previously claimed by pata_amd.c but the PIO timings were not correct. This driver also works around a bug in some BIOSes that handle unaligned access to the PCI config registers poorly. Finally, the driver allows fallback to using MSR registers for configuration on BIOSes that are truly broken. Signed-off-by: Martin K. Petersen [EMAIL PROTECTED] --- diff -r 79f0ea1e0e70 drivers/ata/Kconfig --- a/drivers/ata/Kconfig Tue Oct 09 21:00:40 2007 + +++ b/drivers/ata/Kconfig Thu Oct 11 03:26:40 2007 -0400 @@ -254,6 +254,15 @@ config PATA_CS5535 If unsure, say N. +config PATA_CS5536 + tristate CS5536 PATA support (Experimental) + depends on PCI X86 !X86_64 EXPERIMENTAL + help + This option enables support for the AMD CS5536 + companion chip used with the Geode LX processor family. + + If unsure, say N. + config PATA_CYPRESS tristate Cypress CY82C693 PATA support (Very Experimental) depends on PCI EXPERIMENTAL diff -r 79f0ea1e0e70 drivers/ata/Makefile --- a/drivers/ata/Makefile Tue Oct 09 21:00:40 2007 + +++ b/drivers/ata/Makefile Thu Oct 11 03:26:40 2007 -0400 @@ -27,6 +27,7 @@ obj-$(CONFIG_PATA_CS5520) += pata_cs5520 obj-$(CONFIG_PATA_CS5520) += pata_cs5520.o obj-$(CONFIG_PATA_CS5530) += pata_cs5530.o obj-$(CONFIG_PATA_CS5535) += pata_cs5535.o +obj-$(CONFIG_PATA_CS5536) += pata_cs5536.o obj-$(CONFIG_PATA_CYPRESS) += pata_cypress.o obj-$(CONFIG_PATA_EFAR)+= pata_efar.o obj-$(CONFIG_PATA_HPT366) += pata_hpt366.o diff -r 79f0ea1e0e70 drivers/ata/pata_amd.c --- a/drivers/ata/pata_amd.cTue Oct 09 21:00:40 2007 + +++ b/drivers/ata/pata_amd.cThu Oct 11 03:26:40 2007 -0400 @@ -693,7 +693,10 @@ static const struct pci_device_id amd[] { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE), 8 }, { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE), 8 }, { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE), 8 }, +/* Temporary */ +#if !defined(CONFIG_PATA_CS5536) !defined(CONFIG_PATA_CS5536_MODULE) { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_CS5536_IDE), 9 }, +#endif { }, }; applied, after removing the pata_amd patch I don't typically apply things marked temporary :) but moreover, this is a bit unusual to do in a driver. Any opinions on simply removing the PCI ID? what's the installed base like today? do we need to keep the PCI ID in both drivers? - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] libata: add ST9160821AS / 3.CCD to NCQ blacklist
Tejun Heo wrote: ST9160821AS / 3.CCD does spurious completions too. Blacklist it. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/libata-core.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index ce8ccb4..5402755 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3984,6 +3984,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { { ST9120822AS, 3.CLF, ATA_HORKAGE_NONCQ, }, { ST9160821AS, 3.CLF, ATA_HORKAGE_NONCQ, }, { ST9160821AS, 3.ALD, ATA_HORKAGE_NONCQ, }, + { ST9160821AS, 3.CCD, ATA_HORKAGE_NONCQ, }, { ST3160812AS, 3.ADJ, ATA_HORKAGE_NONCQ, }, { ST980813AS, 3.ADB, ATA_HORKAGE_NONCQ, }, { SAMSUNG HD401LJ, ZZ100-15, ATA_HORKAGE_NONCQ, }, applied - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] libata: fix revalidation issuing after configuration commands
Tejun Heo wrote: After commands which can change device configuration, EH is scheduled to revalidate and reconfigure the device. Host link was incorrectly used unconditionally when scheduling EH action. This resulted in bogus revalidation request and mismatched configuration between device and driver. Fix it. This bug was reported by Igor Durdanovic. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: Igor Durdanovic [EMAIL PROTECTED] --- drivers/ata/libata-scsi.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) applied - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] libata: prevent devices with blank model names from being DMA blacklisted
Andrew Paprocki wrote: The strn_pattern_cmp routine does not handle a blank name parameter properly. The only patterns which should match a blank name are * and an explicit . If the function is passed a blank name in current code, it will always match against the patt parameter. The bug manifests itself as the device with the empty model name always matching the first device in the DMA blacklist, forcing it to revert to PIO mode. Signed-off-by: Andrew Paprocki [EMAIL PROTECTED] --- drivers/ata/libata-core.c | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 4e11e39..e73b7b4 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -4013,8 +4013,19 @@ int strn_pattern_cmp(const char *patt, const char *name, int wildchar) p = strchr(patt, wildchar); if (p ((*(p + 1)) == 0)) len = p - patt; - else + else { len = strlen(name); + /* If the model name parameter is empty, it should not match +* against anything other than * or . +*/ + if (unlikely(len == 0)) { + /* In the rare case your pattern is . */ + if (strlen(patt) == 0) + return 0; + else + return -1; + } + } applied manually, patch was corrupted - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] libata-core: Drop in the final bit of IORDY handling
Hello. Alan Cox wrote: Signed-off-by: Alan Cox [EMAIL PROTECTED] diff -u --exclude-from /usr/src/exclude --new-file --recursive linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c linux-2.6.23-mm1/drivers/ata/libata-core.c --- linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c 2007-10-15 15:03:26.0 +0100 +++ linux-2.6.23-mm1/drivers/ata/libata-core.c 2007-10-15 15:13:49.0 +0100 @@ -4203,8 +4219,12 @@ tf.command = ATA_CMD_SET_FEATURES; tf.feature = SETFEATURES_XFER; tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE | ATA_TFLAG_POLLING; tf.protocol = ATA_PROT_NODATA; - tf.nsect = dev-xfer_mode; + /* Ancient devices may need us to avoid IORDY */ + if (ata_pio_need_iordy(dev)) + tf.nsect = dev-xfer_mode; + else + tf.nsect = 0x01; This is wrong logic as I've alredy pointed out: according to the ATA-2 setting *any* PIO mode via 0x08..0x0c commands assumes IORDY is enabled. We should only set mode 0x01 (default w/IORDY disabled) if device supports IORDY and the host doesn't. err_mask = ata_exec_internal(dev, tf, NULL, DMA_NONE, NULL, 0, 0); MBR, Sergei - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] dtc2278: note on docs
Signed-off-by: Alan Cox [EMAIL PROTECTED] diff -u --exclude-from /usr/src/exclude --new-file --recursive linux.vanilla-2.6.23-mm1/drivers/ide/legacy/dtc2278.c linux-2.6.23-mm1/drivers/ide/legacy/dtc2278.c --- linux.vanilla-2.6.23-mm1/drivers/ide/legacy/dtc2278.c 2007-10-15 15:03:27.0 +0100 +++ linux-2.6.23-mm1/drivers/ide/legacy/dtc2278.c 2007-10-15 15:18:56.0 +0100 @@ -83,6 +83,8 @@ spin_unlock_irqrestore(dtc2278_lock, flags); } else { /* we don't know how to set it back again.. */ + /* Actually we do - there is a data sheet available for the + Winbond but does anyone actually care */ } /* - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] pata_pcmcia: Add support for dumb 8bit IDE emulations
Alan Cox wrote: Signed-off-by: Alan Cox [EMAIL PROTECTED] should I be adding this to libata-dev.git#for-testing, to reduce Andrew's libata patching headaches? - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] libata-core: Don't have screaming fits over DF/ERR combinations
Alan Cox wrote: Some hardware seems to get this wrong in a non-harmful way, and there are some devices that seem to do it deliberately for various reasons. Just take it as a device error not a catastrophic state machine explosion. Signed-off-by: Alan Cox [EMAIL PROTECTED] diff -u --exclude-from /usr/src/exclude --new-file --recursive linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c linux-2.6.23-mm1/drivers/ata/libata-core.c --- linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c 2007-10-15 15:03:26.0 +0100 +++ linux-2.6.23-mm1/drivers/ata/libata-core.c 2007-10-15 15:13:49.0 +0100 @@ -5258,7 +5319,15 @@ if (unlikely(status (ATA_ERR | ATA_DF))) { ata_port_printk(ap, KERN_WARNING, DRQ=1 with device error, dev_stat 0x%X\n, status); - qc-err_mask |= AC_ERR_HSM; + /* Some devices muck this up. Some follow an ATA + non-standard that permits the damaged sector to + be retrieved at this point. The ATA spec says + we should jump up and down on DRQ + ERR, reality I've always thought that setting both DRQ and ERR is perfectly valid (well, maybe it's become invalid since ATAPI-4 where all these state transition flow charts have made its first appearance, to be quickly replaced by the state diagrams :-) -- I'm too lazy to check now... :-) + says we should be a little more relaxed. + + Rather than an HSM error, take it as a device + error */ I'm not sure it's an error in the first place. + qc-err_mask |= AC_ERR_DEV; ap-hsm_task_state = HSM_ST_ERR; goto fsm_start; } MBR, Sergei - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [git patches] IDE updates (part 2)
Al Viro wrote: Proposed addition to icside part, provided that ARM folks ACK it - gets icside to build and AFAICS it's correct: ACK from me too... ARM folks? - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] libata-core: Don't have screaming fits over DF/ERR combinations
Sergei Shtylyov wrote: Alan Cox wrote: Some hardware seems to get this wrong in a non-harmful way, and there are some devices that seem to do it deliberately for various reasons. Just take it as a device error not a catastrophic state machine explosion. Signed-off-by: Alan Cox [EMAIL PROTECTED] diff -u --exclude-from /usr/src/exclude --new-file --recursive linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c linux-2.6.23-mm1/drivers/ata/libata-core.c --- linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c2007-10-15 15:03:26.0 +0100 +++ linux-2.6.23-mm1/drivers/ata/libata-core.c2007-10-15 15:13:49.0 +0100 @@ -5258,7 +5319,15 @@ if (unlikely(status (ATA_ERR | ATA_DF))) { ata_port_printk(ap, KERN_WARNING, DRQ=1 with device error, dev_stat 0x%X\n, status); -qc-err_mask |= AC_ERR_HSM; +/* Some devices muck this up. Some follow an ATA + non-standard that permits the damaged sector to + be retrieved at this point. The ATA spec says + we should jump up and down on DRQ + ERR, reality I've always thought that setting both DRQ and ERR is perfectly valid (well, maybe it's become invalid since ATAPI-4 where all these state transition flow charts have made its first appearance, to be quickly replaced by the state diagrams :-) -- I'm too lazy to check now... :-) DRQ+ERR is valid, and SRST (or hard reset) is defined as the method of kicking the device out of that state. Jeff - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [git patches] IDE updates (part 2)
On Mon, Oct 15, 2007 at 03:54:16PM -0400, Jeff Garzik wrote: Al Viro wrote: Proposed addition to icside part, provided that ARM folks ACK it - gets icside to build and AFAICS it's correct: ACK from me too... ARM folks? Will test tomorrow/Wednesday. -- Russell King Linux kernel2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] libata-core: Don't have screaming fits over DF/ERR combinations
Jeff Garzik wrote: Some hardware seems to get this wrong in a non-harmful way, and there are some devices that seem to do it deliberately for various reasons. Just take it as a device error not a catastrophic state machine explosion. Signed-off-by: Alan Cox [EMAIL PROTECTED] diff -u --exclude-from /usr/src/exclude --new-file --recursive linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c linux-2.6.23-mm1/drivers/ata/libata-core.c --- linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c2007-10-15 15:03:26.0 +0100 +++ linux-2.6.23-mm1/drivers/ata/libata-core.c2007-10-15 15:13:49.0 +0100 @@ -5258,7 +5319,15 @@ if (unlikely(status (ATA_ERR | ATA_DF))) { ata_port_printk(ap, KERN_WARNING, DRQ=1 with device error, dev_stat 0x%X\n, status); -qc-err_mask |= AC_ERR_HSM; +/* Some devices muck this up. Some follow an ATA + non-standard that permits the damaged sector to + be retrieved at this point. The ATA spec says + we should jump up and down on DRQ + ERR, reality I've always thought that setting both DRQ and ERR is perfectly valid (well, maybe it's become invalid since ATAPI-4 where all these state transition flow charts have made its first appearance, to be quickly replaced by the state diagrams :-) -- I'm too lazy to check now... :-) DRQ+ERR is valid, and SRST (or hard reset) is defined as the method of kicking the device out of that state. Well, in the times of old, reading a sector (or group of them for multiple mode) was valid for that purpose, wasn't it? Jeff MBR, Sergei - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [git patches] IDE updates (part 2)
Russell King wrote: On Mon, Oct 15, 2007 at 03:54:16PM -0400, Jeff Garzik wrote: Al Viro wrote: Proposed addition to icside part, provided that ARM folks ACK it - gets icside to build and AFAICS it's correct: ACK from me too... ARM folks? Will test tomorrow/Wednesday. Thanks. Sorry about missing your CC on the libata-wide ata_link changes. We should have poked the maintainers on that, for the drivers we cannot build ourselves. - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] libata-core: Don't have screaming fits over DF/ERR combinations
Sergei Shtylyov wrote: Jeff Garzik wrote: Some hardware seems to get this wrong in a non-harmful way, and there are some devices that seem to do it deliberately for various reasons. Just take it as a device error not a catastrophic state machine explosion. Signed-off-by: Alan Cox [EMAIL PROTECTED] diff -u --exclude-from /usr/src/exclude --new-file --recursive linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c linux-2.6.23-mm1/drivers/ata/libata-core.c --- linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c2007-10-15 15:03:26.0 +0100 +++ linux-2.6.23-mm1/drivers/ata/libata-core.c2007-10-15 15:13:49.0 +0100 @@ -5258,7 +5319,15 @@ if (unlikely(status (ATA_ERR | ATA_DF))) { ata_port_printk(ap, KERN_WARNING, DRQ=1 with device error, dev_stat 0x%X\n, status); -qc-err_mask |= AC_ERR_HSM; +/* Some devices muck this up. Some follow an ATA + non-standard that permits the damaged sector to + be retrieved at this point. The ATA spec says + we should jump up and down on DRQ + ERR, reality I've always thought that setting both DRQ and ERR is perfectly valid (well, maybe it's become invalid since ATAPI-4 where all these state transition flow charts have made its first appearance, to be quickly replaced by the state diagrams :-) -- I'm too lazy to check now... :-) DRQ+ERR is valid, and SRST (or hard reset) is defined as the method of kicking the device out of that state. Well, in the times of old, reading a sector (or group of them for multiple mode) was valid for that purpose, wasn't it? Yes, hence the recent FIFO drain patches. But that doesn't make sense for SATA devices, where the FIFO is really emulated, and it works on older PATA devices. Jeff - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] pata_pcmcia: Add support for dumb 8bit IDE emulations
Alan Cox wrote: Signed-off-by: Alan Cox [EMAIL PROTECTED] applied to libata-dev.git#for-testing (and propagated into #ALL) - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[git patches] libata updates
The sata_nv update has been in -mm for a while, but couldn't make the last drop due to last minute bugs. 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 |9 + drivers/ata/Makefile |1 + drivers/ata/ata_piix.c| 35 ++- drivers/ata/libata-core.c |9 +- drivers/ata/libata-scsi.c |5 +- drivers/ata/pata_cs5536.c | 346 ++ drivers/ata/pata_pcmcia.c |2 + drivers/ata/pata_sil680.c | 61 +++- drivers/ata/sata_nv.c | 851 - 9 files changed, 1298 insertions(+), 21 deletions(-) create mode 100644 drivers/ata/pata_cs5536.c Andrew Paprocki (1): libata: prevent devices with blank model names from being DMA blacklisted Benjamin Herrenschmidt (1): [libata] pata_sil680: Add MMIO support Jason Gaston (1): ata_piix: SATA 2port controller port map fix Kristoffer Ericson (1): [libata] pata_pcmcia: Add additional id string (corsair, 1GB) Kuan Luo (1): [libata] sata_nv: add SW NCQ support for MCP51/MCP55/MCP61 Martin K. Petersen (1): pata_cs5536: ATA driver for Geode companion chip Tejun Heo (2): libata: fix revalidation issuing after configuration commands libata: add ST9160821AS / 3.CCD to NCQ blacklist diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 4672066..33f5eb0 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -272,6 +272,15 @@ config PATA_CS5535 If unsure, say N. +config PATA_CS5536 + tristate CS5536 PATA support (Experimental) + depends on PCI X86 !X86_64 EXPERIMENTAL + help + This option enables support for the AMD CS5536 + companion chip used with the Geode LX processor family. + + If unsure, say N. + config PATA_CYPRESS tristate Cypress CY82C693 PATA support (Very Experimental) depends on PCI EXPERIMENTAL diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile index 2a63645..6bdc307 100644 --- a/drivers/ata/Makefile +++ b/drivers/ata/Makefile @@ -28,6 +28,7 @@ obj-$(CONFIG_PATA_CMD64X) += pata_cmd64x.o obj-$(CONFIG_PATA_CS5520) += pata_cs5520.o obj-$(CONFIG_PATA_CS5530) += pata_cs5530.o obj-$(CONFIG_PATA_CS5535) += pata_cs5535.o +obj-$(CONFIG_PATA_CS5536) += pata_cs5536.o obj-$(CONFIG_PATA_CYPRESS) += pata_cypress.o obj-$(CONFIG_PATA_EFAR)+= pata_efar.o obj-$(CONFIG_PATA_HPT366) += pata_hpt366.o diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 9ce4aa9..3c6f43e 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -130,6 +130,7 @@ enum { ich8_sata_ahci = 9, piix_pata_mwdma = 10, /* PIIX3 MWDMA only */ tolapai_sata_ahci = 11, + ich9_2port_sata = 12, /* constants for mapping table */ P0 = 0, /* port 0 */ @@ -238,19 +239,19 @@ static const struct pci_device_id piix_pci_tbl[] = { /* SATA Controller 1 IDE (ICH8) */ { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, /* SATA Controller 2 IDE (ICH8) */ - { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, + { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, /* Mobile SATA Controller IDE (ICH8M) */ { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, /* SATA Controller IDE (ICH9) */ { 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, /* SATA Controller IDE (ICH9) */ - { 0x8086, 0x2921, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, + { 0x8086, 0x2921, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, /* SATA Controller IDE (ICH9) */ - { 0x8086, 0x2926, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, + { 0x8086, 0x2926, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, /* SATA Controller IDE (ICH9M) */ - { 0x8086, 0x2928, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, + { 0x8086, 0x2928, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, /* SATA Controller IDE (ICH9M) */ - { 0x8086, 0x292d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, + { 0x8086, 0x292d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, /* SATA Controller IDE (ICH9M) */ { 0x8086, 0x292e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, /* SATA Controller IDE (Tolapai) */ @@ -448,6 +449,18 @@ static const struct piix_map_db tolapai_map_db = { }, }; +static const struct piix_map_db ich9_2port_map_db = { + .mask = 0x3, + .port_enable = 0x3, + .map = { + /* PM PS SM SS MAP */ + { P0, NA, P1, NA }, /* 00b */ + { RV, RV, RV, RV }, /* 01b */ + { RV, RV, RV, RV }, /* 10b */ +
Re: [PATCH] libata-core: Drop in the final bit of IORDY handling
Alan Cox wrote: + /* Ancient devices may need us to avoid IORDY */ + if (ata_pio_need_iordy(dev)) + tf.nsect = dev-xfer_mode; + else + tf.nsect = 0x01; This is wrong logic as I've alredy pointed out: according to the ATA-2 setting *any* PIO mode via 0x08..0x0c commands assumes IORDY is enabled. We should only set mode 0x01 (default w/IORDY disabled) if device supports IORDY and the host doesn't. ata_pio_need_iordy is false if - the controller does not support iordy Hm, I'm sorry -- it turned out that I was looking at 2.6.21... or - mode = PIO 2 and the device does not support iordy I can tighten that if to if (!ata_pio_need_iordy(dev) ata_has_iordy(dev-id)) tf.nsect = 0x01; if you prefer ? Yeah, that'd be better. :-) Alan MBR, Sergei - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] libata-core: Don't have screaming fits over DF/ERR combinations
Yes, hence the recent FIFO drain patches. But that doesn't make sense for SATA devices, where the FIFO is really emulated, and it works on older PATA devices. The FIFO is emulated on PATA. Basically speaking the device prefetches data and buffers the irq arrival until the right moment. Hence the need to drain it on some chips. Others reset themselves in this case and post reset a data read on some promise chips hangs the bus solid - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 2.6.23]ata_piix: SATA 2port controller port map fix
this was full of spaces, and should be converted to tabs (I did this manually) In the future, make sure to run your patch through scripts/checkpatch.pl. Some of that script's complaints are a bit insane, but most are good. static const struct piix_map_db *piix_map_db_table[] = { [ich5_sata] = ich5_map_db, [ich6_sata] = ich6_map_db, @@ -463,6 +476,7 @@ [ich6m_sata_ahci] = ich6m_map_db, [ich8_sata_ahci]= ich8_map_db, [tolapai_sata_ahci] = tolapai_map_db, +[ich9_2port_sata] = ich9_2port_map_db, }; static struct ata_port_info piix_port_info[] = { @@ -587,6 +601,17 @@ .udma_mask = ATA_UDMA6, .port_ops = piix_sata_ops, }, + +/* ich9_2port_sata: 12: */ changed this to [ich9_2port_sata] = since we have started using the (C99? gcc?) method of initializing piix_port_info[] array entries based on the given index, rather than simply noting the index in a comment and depending on the order of other entries not to change. Jeff Thank you Jeff! I guess it is time to switch email clients, as this one keeps trashing my file import. I thought I had it worked out, guess not. Thanks again, Jason - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Please help. ICH6 chipset: dvd drive dies after a short time
hi, on a friend's laptop, the DVD drive dies after a short while and takes down the main HD's DMA down with it, hda has to be reinstantiated with hdparm -d1 /dev/hda, but hdb (DVD drive) cannot be revived. tried with both kernel 2.6.17 and 2.6.22/23 here is a link to 50kB+ debug info: http://ied.com/linux_dying_dvd_1.txt contents: ( uname -a; lspci; lspci -n; tail -600 /var/log/syslog; cd /proc ; head -100 $( cd /proc ; find ide -type f ) ; hdparm -iI /dev/hda /dev/hdb ) This contents was generated *after* the bug manifested, and manual hdparm -d1 /dev/hda was issued. What else should be in the contents to help you guys pinpoint the problem? Should I include the 50kB+ contents inside this message, or is posting a link better? Can someone please suggest what to try to pass to kernel at boot to work around, so the drive doesn't die? (If I absolutely had to, I would try to recompile the kernel -- I haven't done that in a few years.) Thanks a bunch in advance, John - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[git patch] libata build fix
And it becomes obvious I normally do my building and testing on x86-64... 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/pata_cs5536.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) Jeff Garzik (1): [libata] pata_cs5536: new API build fix diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c index 21405bf..53070f6 100644 --- a/drivers/ata/pata_cs5536.c +++ b/drivers/ata/pata_cs5536.c @@ -239,7 +239,6 @@ static struct scsi_host_template cs5536_sht = { }; static struct ata_port_operations cs5536_port_ops = { - .port_disable = ata_port_disable, .set_piomode= cs5536_set_piomode, .set_dmamode= cs5536_set_dmamode, .mode_filter= ata_pci_default_filter, @@ -269,7 +268,6 @@ static struct ata_port_operations cs5536_port_ops = { .irq_handler= ata_interrupt, .irq_clear = ata_bmdma_irq_clear, .irq_on = ata_irq_on, - .irq_ack= ata_irq_ack, .port_start = ata_port_start, }; - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [git patches] libata update
Bartlomiej Zolnierkiewicz wrote: On Friday 12 October 2007, Jeff Garzik wrote: [ I just sent this upstream to Andrew and Linus ] Now that I have nailed down the corruption problem, I can attend to this... Fun stuff: * port multiplier support (like an ethernet hub, only dumber) Great to see this here. * Asynchronous notification -- finally userspace CD-ROM polling can go away! Is this AHCI specific or could be used by some other SATA hosts? Can be used by any controller that supports SNotification (or is able to capture and parse the raw FIS's). And FWIW, Tejun's PMP work also uses a few bits of same async-notify stuff. I agree with your review items, and will look at those if others don't beat me to it. Jeff - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] sc1200 pci cleanup, resume improvement, bug fix
This patch accomplishes the following goals: * kill the 'pci_enable_device ret val not checked' warning * eliminate the incorrect mucking with pci_dev::current_state via the following changes: * [minor bug fix] eliminate pci_set_power_state() call in resume, pci_enable_device() does so for us. * [bug fix] do not touch dev-current_state, pci_set_power_state() and other PCI layer functions manage this for us. * [minor bug fix, warning fix] check pci_enable_device() ret val in resume, and do not bring up interfaces if it fails (which it might) * eliminate lookup_pci_dev(), a needless loop over a global list, by storing our associated hwif in a struct allocated at probe time. * introduce __ide_setup_pci_device() to facilitate making PCI drivers aware of the hwifs created during IDE generic probe. Signed-off-by: Jeff Garzik [EMAIL PROTECTED] --- WARNING WARNING WARNING This is a drop-n-run patch, created ultimately because I was annoyed at the [quite valid] pci_enable_device() build warning. If someone likes this, please take ownership of the patch. WARNING WARNING WARNING drivers/ide/pci/sc1200.c | 72 ++- drivers/ide/setup-pci.c | 12 +++ include/linux/ide.h |2 + 3 files changed, 59 insertions(+), 27 deletions(-) diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c index ee0e3f5..fa61550 100644 --- a/drivers/ide/pci/sc1200.c +++ b/drivers/ide/pci/sc1200.c @@ -41,6 +41,12 @@ #define PCI_CLK_66 0x02 #define PCI_CLK_33A0x03 +#define SC1200_IFS 2 + +struct sc1200_ifs { + ide_hwif_t *iface[SC1200_IFS]; +}; + static unsigned short sc1200_get_pci_clock (void) { unsigned char chip_id, silicon_revision; @@ -274,22 +280,6 @@ static void sc1200_set_pio_mode(ide_drive_t *drive, const u8 pio) } #ifdef CONFIG_PM -static ide_hwif_t *lookup_pci_dev (ide_hwif_t *prev, struct pci_dev *dev) -{ - int h; - - for (h = 0; h MAX_HWIFS; h++) { - ide_hwif_t *hwif = ide_hwifs[h]; - if (prev) { - if (hwif == prev) - prev = NULL;// found previous, now look for next match - } else { - if (hwif hwif-pci_dev == dev) - return hwif;// found next match - } - } - return NULL;// not found -} typedef struct sc1200_saved_state_s { __u32 regs[4]; @@ -298,7 +288,9 @@ typedef struct sc1200_saved_state_s { static int sc1200_suspend (struct pci_dev *dev, pm_message_t state) { - ide_hwif_t *hwif = NULL; + struct sc1200_ifs *ifs = pci_get_drvdata(dev); + ide_hwif_t *hwif; + int i; printk(SC1200: suspend(%u)\n, state.event); @@ -308,9 +300,14 @@ static int sc1200_suspend (struct pci_dev *dev, pm_message_t state) // // Loop over all interfaces that are part of this PCI device: // - while ((hwif = lookup_pci_dev(hwif, dev)) != NULL) { + for (i = 0; i SC1200_IFS; i++) { sc1200_saved_state_t*ss; unsigned intbasereg, r; + + hwif = ifs-iface[i]; + if (!hwif) + continue; + // // allocate a permanent save area, if not already allocated // @@ -337,23 +334,31 @@ static int sc1200_suspend (struct pci_dev *dev, pm_message_t state) pci_disable_device(dev); pci_set_power_state(dev, pci_choose_state(dev, state)); - dev-current_state = state.event; return 0; } static int sc1200_resume (struct pci_dev *dev) { - ide_hwif_t *hwif = NULL; + struct sc1200_ifs *ifs = pci_get_drvdata(dev); + ide_hwif_t *hwif; + int rc, i; + + rc = pci_enable_device(dev); + if (rc) + return rc; - pci_set_power_state(dev, PCI_D0); // bring chip back from sleep state - dev-current_state = PM_EVENT_ON; - pci_enable_device(dev); // // loop over all interfaces that are part of this pci device: // - while ((hwif = lookup_pci_dev(hwif, dev)) != NULL) { + for (i = 0; i SC1200_IFS; i++) { unsigned intbasereg, r; - sc1200_saved_state_t*ss = (sc1200_saved_state_t *)hwif-config_data; + sc1200_saved_state_t*ss; + + hwif = ifs-iface[i]; + if (!hwif) + continue; + + ss = (sc1200_saved_state_t *)hwif-config_data; // // Restore timing registers: this may be unnecessary if BIOS also does it @@ -411,7 +416,22 @@ static
linux-2.6.git error messages
I get this on ICH5, modular kernel build: libata version 3.00 loaded. PCI: Enabling device :00:1f.1 (0005 - 0007) ACPI: PCI Interrupt :00:1f.1[A] - GSI 18 (level, low) - IRQ 18 PCI: Setting latency timer of device :00:1f.1 to 64 ata4294967295: failed to start port (errno=-19) ^ ACPI: PCI interrupt for device :00:1f.1 disabled ACPI: PCI Interrupt :00:1f.2[A] - GSI 18 (level, low) - IRQ 18 PCI: Setting latency timer of device :00:1f.2 to 64 ata4294967295: failed to start port (errno=-19) ^ ACPI: PCI interrupt for device :00:1f.2 disabled ata_piix :00:1f.1: version 2.12 ACPI: PCI Interrupt :00:1f.1[A] - GSI 18 (level, low) - IRQ 18 PCI: Setting latency timer of device :00:1f.1 to 64 scsi0 : ata_piix scsi1 : ata_piix ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0x24c0 irq 14 ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0x24c8 irq 15 ata1.00: ATA-5: MAXTOR 6L080J4, A93.0500, max UDMA/133 ata1.00: 156301488 sectors, multi 16: LBA ata1.00: configured for UDMA/100 ata2.00: ATAPI: HL-DT-ST CD-ROM GCR-8480B, 1.00, max MWDMA2 ata2.00: configured for MWDMA2 scsi 0:0:0:0: Direct-Access ATA MAXTOR 6L080J4 A93. PQ: 0 ANSI: 5 sd 0:0:0:0: [sda] 156301488 512-byte hardware sectors (80026 MB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 0:0:0:0: [sda] 156301488 512-byte hardware sectors (80026 MB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sda: sda1 sda2 sd 0:0:0:0: [sda] Attached SCSI disk sd 0:0:0:0: Attached scsi generic sg0 type 0 scsi 1:0:0:0: CD-ROMHL-DT-ST CD-ROM GCR-8480B 1.00 PQ: 0 ANSI: 5 scsi 1:0:0:0: Attached scsi generic sg1 type 5 ata_piix :00:1f.2: MAP [ P0 -- P1 -- ] ACPI: PCI Interrupt :00:1f.2[A] - GSI 18 (level, low) - IRQ 18 PCI: Setting latency timer of device :00:1f.2 to 64 scsi2 : ata_piix scsi3 : ata_piix ata3: SATA max UDMA/133 cmd 0x24f0 ctl 0x2808 bmdma 0x24d0 irq 18 ata4: SATA max UDMA/133 cmd 0x24f8 ctl 0x280c bmdma 0x24d8 irq 18 ata4.00: ATA-6: ST380013AS, 3.05, max UDMA/133 ata4.00: 156301488 sectors, multi 16: LBA48 ata4.00: configured for UDMA/133 scsi 3:0:0:0: Direct-Access ATA ST380013AS 3.05 PQ: 0 ANSI: 5 sd 3:0:0:0: [sdb] 156301488 512-byte hardware sectors (80026 MB) sd 3:0:0:0: [sdb] Write Protect is off sd 3:0:0:0: [sdb] Mode Sense: 00 3a 00 00 sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 3:0:0:0: [sdb] 156301488 512-byte hardware sectors (80026 MB) sd 3:0:0:0: [sdb] Write Protect is off sd 3:0:0:0: [sdb] Mode Sense: 00 3a 00 00 sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sdb: sdb1 sdb2 sd 3:0:0:0: [sdb] Attached SCSI disk sd 3:0:0:0: Attached scsi generic sg2 type 0 sata_sil :05:09.0: version 2.3 ACPI: PCI Interrupt :05:09.0[A] - GSI 18 (level, low) - IRQ 18 scsi4 : sata_sil scsi5 : sata_sil ata5: SATA max UDMA/100 mmio [EMAIL PROTECTED] tf 0xf0410080 irq 18 ata6: SATA max UDMA/100 mmio [EMAIL PROTECTED] tf 0xf04100c0 irq 18 ata5: SATA link down (SStatus 0 SControl 310) ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 310) ata6.00: ATA-6: HDS722580VLSA80, V32OA60A, max UDMA/100 ata6.00: 160836480 sectors, multi 16: LBA48 ata6.00: configured for UDMA/100 scsi 5:0:0:0: Direct-Access ATA HDS722580VLSA80 V32O PQ: 0 ANSI: 5 sd 5:0:0:0: [sdc] 160836480 512-byte hardware sectors (82348 MB) sd 5:0:0:0: [sdc] Write Protect is off sd 5:0:0:0: [sdc] Mode Sense: 00 3a 00 00 sd 5:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 5:0:0:0: [sdc] 160836480 512-byte hardware sectors (82348 MB) sd 5:0:0:0: [sdc] Write Protect is off sd 5:0:0:0: [sdc] Mode Sense: 00 3a 00 00 sd 5:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sdc: sdc1 sdc2 sd 5:0:0:0: [sdc] Attached SCSI disk sd 5:0:0:0: Attached scsi generic sg3 type 0 - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html