[PATCH] MAINTAINERS: update ide-cd maintainer's email address
commit c65b97fdbb9f3075a37f711aa6b388a48a27d3f4 Author: Borislav Petkov [EMAIL PROTECTED] Date: Sat Feb 16 09:10:46 2008 +0100 MAINTAINERS: update ide-cd maintainer's email address Signed-off-by: Borislav Petkov [EMAIL PROTECTED] diff --git a/MAINTAINERS b/MAINTAINERS index 1d2edb4..082d1ee 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1924,7 +1924,7 @@ S:Maintained IDE/ATAPI CDROM DRIVER P: Borislav Petkov -M: [EMAIL PROTECTED] +M: [EMAIL PROTECTED] L: linux-ide@vger.kernel.org S: Maintained -- Regards/Gruß, Boris. - 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: Optiarc DVD RW AD-5200A audio playing
On Fri, Feb 15, 2008 at 02:53:27PM -0500, Stefan Bader wrote: Hello Borislav, I worked on a problem with an DVD driver (model=Optiarc DVD RW AD-5200A) which obviously has the same problem as some Matshita drives. The following patch was reported to enabled audio playing on this drive. Would this approach be suitable for upstream or are there other solutions to this problem? Regards, Stefan --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -2988,7 +2988,8 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) if (strcmp(drive-id-model, MATSHITADVD-ROM SR-8187) == 0 || strcmp(drive-id-model, MATSHITADVD-ROM SR-8186) == 0 || strcmp(drive-id-model, MATSHITADVD-ROM SR-8176) == 0 || - strcmp(drive-id-model, MATSHITADVD-ROM SR-8174) == 0) + strcmp(drive-id-model, MATSHITADVD-ROM SR-8174) == 0 || + strcmp(drive-id-model, Optiarc DVD RW AD-5200A) == 0) CDROM_CONFIG_FLAGS(drive)-audio_play = 1; #if ! STANDARD_ATAPI Hi Stefan, just to make sure that the audioplay bit is not set in the capabilities page, can you please try the following patch applied against 2.6.25-rc2 and send me the output. Thanks! @Bart: by the way, this cdi-mask thingy is kinda unintuitive doing double negation to check whether a feature is supported or not. Yeah, this comes from above, i.e. uniform cdrom layer. But still, shouldn't we use a cdi-caps_flags or something similar instead, which mirrors the caps page bits setting? commit 435f0f4496a1b32af2d542f43b2370a890fe2f83 Author: Borislav Petkov [EMAIL PROTECTED] Date: Sat Feb 16 09:56:36 2008 +0100 ide-cd: Enable audio play quirk for Optiarc DVD RW AD-5200A drive Reported-by: Stefan Bader [EMAIL PROTECTED] Signed-off-by: Borislav Petkov [EMAIL PROTECTED] diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index f77db6b..2c9d06e 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1750,6 +1750,10 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) cdi-mask = ~(CDC_DVD_RAM | CDC_RAM); if (buf[8 + 3] 0x10) cdi-mask = ~CDC_DVD_R; + if (!(buf[8 + 4] 0x01)) { + printk(KERN_INFO ide-cd: audio play not advertised in caps page, + enabling quirk.\n); + } if ((buf[8 + 4] 0x01) || (cd-cd_flags IDE_CD_FLAG_PLAY_AUDIO_OK)) cdi-mask = ~CDC_PLAY_AUDIO; @@ -1929,6 +1933,7 @@ static const struct cd_list_entry ide_cd_quirks_list[] = { { MATSHITADVD-ROM SR-8186, NULL, IDE_CD_FLAG_PLAY_AUDIO_OK }, { MATSHITADVD-ROM SR-8176, NULL, IDE_CD_FLAG_PLAY_AUDIO_OK }, { MATSHITADVD-ROM SR-8174, NULL, IDE_CD_FLAG_PLAY_AUDIO_OK }, + { Optiarc DVD RW AD-5200A, NULL, IDE_CD_FLAG_PLAY_AUDIO_OK }, { NULL, NULL, 0 } }; -- Regards/Gruß, Boris. - 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/2] sata_mv: remove iounmap in mv_platform_remove
* Mark Lord [EMAIL PROTECTED] [2008-02-13 14:31]: struct device *dev = pdev-dev; struct ata_host *host = dev_get_drvdata(dev); -struct mv_host_priv *hpriv = host-private_data; -void __iomem *base = hpriv-base; ata_host_detach(host); -iounmap(base); return 0; } .. Where does the iounmap() now get done instead of that place? You commented on the 2nd patch but can you please review/ack the 1st one so this can go in. Thanks. -- Martin Michlmayr http://www.cyrius.com/ - 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 1/2] sata_mv: use hpriv-base instead of the host-iomap
Saeed Bishara wrote: this fixes crash bug as the iomap table is not valid for integrated controllers. Signed-off-by: Saeed Bishara [EMAIL PROTECTED] --- drivers/ata/sata_mv.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 04b5717..9c9a5b0 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -870,7 +870,7 @@ static void mv_start_dma(struct ata_port *ap, void __iomem *port_mmio, struct mv_host_priv *hpriv = ap-host-private_data; int hard_port = mv_hardport_from_port(ap-port_no); void __iomem *hc_mmio = mv_hc_base_from_port( - ap-host-iomap[MV_PRIMARY_BAR], hard_port); + mv_host_base(ap-host), hard_port); u32 hc_irq_cause, ipending; /* clear EDMA event indicators, if any */ .. This one looks fine. Acked-by: Mark Lord [EMAIL PROTECTED] Cheers - 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: Spurious completions during NCQ
Hugo Mills wrote: I'm getting these on my Dell Latitude D830: Feb 15 13:06:00 willow kernel: ata1.00: exception Emask 0x2 SAct 0x4 SErr 0x0 action 0x2 frozen Feb 15 13:06:00 willow kernel: ata1.00: spurious completions during NCQ issue=0x0 SAct=0x4 FIS=004040a1:0002 Feb 15 13:06:00 willow kernel: ata1.00: cmd 61/10:10:26:fb:c4/00:00:02:00:00/40 tag 2 cdb 0x0 data 8192 out Feb 15 13:06:00 willow kernel: res 40/00:10:26:fb:c4/00:00:02:00:00/40 Emask 0x2 (HSM violation) Feb 15 13:06:00 willow kernel: ata1: soft resetting port Feb 15 13:06:00 willow kernel: ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) Feb 15 13:06:00 willow kernel: ata1.00: configured for UDMA/133 Feb 15 13:06:00 willow kernel: ata1: EH complete Feb 15 13:06:00 willow kernel: sd 0:0:0:0: [sda] 312581808 512-byte hardware sectors (160042 MB) Feb 15 13:06:00 willow kernel: sd 0:0:0:0: [sda] Write Protect is off Feb 15 13:06:00 willow kernel: sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 Feb 15 13:06:00 willow kernel: sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA In some cases, there are several cmd/res lines listed. It's happening about once an hour or so (not correlated with any other event that I can see). It doesn't seem to be affecting operation of the machine, but it's making me nervous. Can anyone set my mind at rest? (Or suggest a fix?) .. Tejun, have the spurious completion fixes been backported to 2.6.23 / 2.6.22 yet ? Those kernels will be in common use for some time to come, and this fix is more or less essential. ??? - 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: [PATCHSET] printk: implement printk_header() and merging printk, take #3
Tejun Heo wrote: Andrew Morton wrote: So, I guess it's NACK w/o suggested alternatives, right? I wouldn't nack without good reasons, and I have none here. I don't have very strong opinions either way. I was just wondering whether I should just go with snprintf dancing in eh_link_report, which does make sense if not many need merging printk. .. Any chance you could poke through snprintf() and look for the off-by-one bug on the return result? (I think it happens when n is exceeded). :) - 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 1/4] : More use DIV_ROUND_UP
From: Julia Lawall [EMAIL PROTECTED] The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) / (d)) but is perhaps more readable. An extract of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // smpl @haskernel@ @@ #include linux/kernel.h @depends on haskernel@ expression n,d; @@ ( - (n + d - 1) / d + DIV_ROUND_UP(n,d) | - (n + (d - 1)) / d + DIV_ROUND_UP(n,d) ) @depends on haskernel@ expression n,d; @@ - DIV_ROUND_UP((n),d) + DIV_ROUND_UP(n,d) @depends on haskernel@ expression n,d; @@ - DIV_ROUND_UP(n,(d)) + DIV_ROUND_UP(n,d) // /smpl Signed-off-by: Julia Lawall [EMAIL PROTECTED] --- diff -u -p a/drivers/ide/arm/palm_bk3710.c b/drivers/ide/arm/palm_bk3710.c --- a/drivers/ide/arm/palm_bk3710.c 2008-02-13 20:42:50.0 +0100 +++ b/drivers/ide/arm/palm_bk3710.c 2008-02-15 22:25:33.0 +0100 @@ -96,11 +96,11 @@ static void palm_bk3710_setudmamode(void u16 val16; /* DMA Data Setup */ - t0 = (palm_bk3710_udmatimings[mode].cycletime + ide_palm_clk - 1) - / ide_palm_clk - 1; - tenv = (20 + ide_palm_clk - 1) / ide_palm_clk - 1; - trp = (palm_bk3710_udmatimings[mode].rptime + ide_palm_clk - 1) - / ide_palm_clk - 1; + t0 = DIV_ROUND_UP(palm_bk3710_udmatimings[mode].cycletime, + ide_palm_clk) - 1; + tenv = DIV_ROUND_UP(20, ide_palm_clk) - 1; + trp = DIV_ROUND_UP(palm_bk3710_udmatimings[mode].rptime, + ide_palm_clk) - 1; /* udmatim Register */ val16 = readw(base + BK3710_UDMATIM) (dev ? 0xFF0F : 0xFFF0); @@ -141,8 +141,8 @@ static void palm_bk3710_setdmamode(void cycletime = max_t(int, t-cycle, min_cycle); /* DMA Data Setup */ - t0 = (cycletime + ide_palm_clk - 1) / ide_palm_clk; - td = (t-active + ide_palm_clk - 1) / ide_palm_clk; + t0 = DIV_ROUND_UP(cycletime, ide_palm_clk); + td = DIV_ROUND_UP(t-active, ide_palm_clk); tkw = t0 - td - 1; td -= 1; @@ -168,9 +168,9 @@ static void palm_bk3710_setpiomode(void struct ide_timing *t; /* PIO Data Setup */ - t0 = (cycletime + ide_palm_clk - 1) / ide_palm_clk; - t2 = (ide_timing_find_mode(XFER_PIO_0 + mode)-active + - ide_palm_clk - 1) / ide_palm_clk; + t0 = DIV_ROUND_UP(cycletime, ide_palm_clk); + t2 = DIV_ROUND_UP(ide_timing_find_mode(XFER_PIO_0 + mode)-active, + ide_palm_clk); t2i = t0 - t2 - 1; t2 -= 1; @@ -192,8 +192,8 @@ static void palm_bk3710_setpiomode(void /* TASKFILE Setup */ t = ide_timing_find_mode(XFER_PIO_0 + mode); - t0 = (t-cyc8b + ide_palm_clk - 1) / ide_palm_clk; - t2 = (t-act8b + ide_palm_clk - 1) / ide_palm_clk; + t0 = DIV_ROUND_UP(t-cyc8b, ide_palm_clk); + t2 = DIV_ROUND_UP(t-act8b, ide_palm_clk); t2i = t0 - t2 - 1; t2 -= 1; diff -u -p a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c --- a/drivers/ide/pci/cmd640.c 2008-02-08 08:58:12.0 +0100 +++ b/drivers/ide/pci/cmd640.c 2008-02-15 22:25:38.0 +0100 @@ -584,15 +584,15 @@ static void cmd640_set_mode (unsigned in active_time = ide_pio_timings[pio_mode].active_time; recovery_time = cycle_time - (setup_time + active_time); clock_time = 1000 / bus_speed; - cycle_count = (cycle_time + clock_time - 1) / clock_time; + cycle_count = DIV_ROUND_UP(cycle_time, clock_time); - setup_count = (setup_time + clock_time - 1) / clock_time; + setup_count = DIV_ROUND_UP(setup_time, clock_time); - active_count = (active_time + clock_time - 1) / clock_time; + active_count = DIV_ROUND_UP(active_time, clock_time); if (active_count 2) active_count = 2; /* minimum allowed by cmd640 */ - recovery_count = (recovery_time + clock_time - 1) / clock_time; + recovery_count = DIV_ROUND_UP(recovery_time, clock_time); recovery_count2 = cycle_count - (setup_count + active_count); if (recovery_count2 recovery_count) recovery_count = recovery_count2; - 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] MAINTAINERS: update ide-cd maintainer's email address
On Saturday 16 February 2008, Borislav Petkov wrote: commit c65b97fdbb9f3075a37f711aa6b388a48a27d3f4 Author: Borislav Petkov [EMAIL PROTECTED] Date: Sat Feb 16 09:10:46 2008 +0100 MAINTAINERS: update ide-cd maintainer's email address Signed-off-by: Borislav Petkov [EMAIL PROTECTED] 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: ST31000340NS (1000G) Capacity equal 33MB issue.
Mark Lord wrote: Richard Liu wrote: Dear Mark: 2008/2/15, Mark Lord [EMAIL PROTECTED]: Richard Liu wrote: Hello all: I bought a Seagate ES.2 ST31000340NS (1000GB) and run at Gentoo Linux kernel 2.6.24. But Linux kernel report the disk size only 33MB. I tried Intel ICH5 and Sil3112, but get the same result. I don't know this issue was caused by libsata or scsi layer . .. hdparm == hdparm -i /dev/sdc /dev/sdc: Model=ST31000340NS, FwRev=SN04, SerialNo=9QJ09BJ4 Config={ HardSect NotMFM HdSw15uSec Fixed DTR10Mbs RotSpdTol.5% } RawCHS=64/16/63, TrkSize=0, SectSize=0, ECCbytes=4 BuffType=unknown, BuffSize=0kB, MaxMultSect=16, MultSect=?16? CurCHS=64/16/63, CurSects=64512, LBA=yes, LBAsects=65134 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120} PIO modes: pio0 pio1 pio2 pio3 pio4 DMA modes: mdma0 mdma1 mdma2 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 AdvancedPM=no WriteCache=enabled Drive conforms to: ATA/ATAPI-6 T13 1410D revision 2: ATA/ATAPI-4,5,6 * signifies the current active mode .. Nothing wrong there, but I would really like/prefer to see the output from: hdparm --Istdout /dev/sdc thanks. # hdparm --Istdout /dev/sdc /dev/sdc: 0c5a 0040 c837 0010 003f 2020 2020 2020 2020 2020 2020 3951 4a30 3942 4a34 0004 534e 3034 2020 2020 5354 3331 3030 3033 3430 4e53 2020 2020 2020 2020 2020 2020 2020 2020 2020 2020 2020 2020 2020 2020 8010 2f00 4000 0200 0200 0007 0040 0010 003f fc00 0110 fe6e 0007 0003 0078 0078 0078 0078 001f 0502 0040 0040 0070 001b 346b 7d01 4123 3468 bc01 4103 207f fefe fffe fe00 fe6e 5000 c500 09b9 0136 4006 4006 0021 6db0 7470 6db0 7470 0002 0140 0100 5000 3c06 3c0a 003c 0008 000f 0280 000a 2700 8000 003d 1c20 e9a5 .. Thanks. By running the above data through hdparm --Istdin, I see that the drive is indeed identifying itself as a 33MB drive. Probably because it has been told to do so by either the factory defaults, or the BIOS, having enabled these features (which can cause it to report fake values for various things): *Host Protected Area feature set *Device Configuration Overlay feature set So that's why the 1TB drive appears as a 33MB drive. In the near future, I will be enhancing hdparm to query more detailed data from underneath those artificial features. But you'll have to enable the entire 1TB capacity if you want Linux to use it. It is currently disabled in the drive, and Linux respects that. .. Okay, hdparm-8.1 is now available from sourceforge.net. Download it, build it (make), and see what you get from hdparm -N /dev/sdc Thanks - 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 09/12] ide: move default IDE ports setup to ide_generic host driver
* Make CONFIG_IDE_GENERIC depended on CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS. * Move default IDE ports setup from init_ide_data() to ide_generic host driver (remembering to not break idex=noprobe parameter). * Use ide_init_port_hw() in ide_generic host driver. * Remove no longer needed CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS. Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/Kconfig |4 +--- drivers/ide/ide-generic.c | 16 +--- drivers/ide/ide.c | 18 -- 3 files changed, 14 insertions(+), 24 deletions(-) Index: b/drivers/ide/Kconfig === --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -307,6 +307,7 @@ comment IDE chipset support/bugfixes config IDE_GENERIC tristate generic/default IDE chipset support + depends on ALPHA || X86 || IA64 || M32R || MIPS || PPC32 help If unsure, say N. @@ -1096,9 +1097,6 @@ config BLK_DEV_IDEDMA def_bool BLK_DEV_IDEDMA_SFF || BLK_DEV_IDEDMA_PMAC || \ BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA -config IDE_ARCH_OBSOLETE_DEFAULTS - def_bool ALPHA || X86 || IA64 || M32R || MIPS || PPC32 - endif config BLK_DEV_HD_ONLY Index: b/drivers/ide/ide-generic.c === --- a/drivers/ide/ide-generic.c +++ b/drivers/ide/ide-generic.c @@ -94,11 +94,21 @@ static int __init ide_generic_init(void) for (i = 0; i MAX_HWIFS; i++) { ide_hwif_t *hwif = ide_hwifs[i]; + unsigned long io_addr = ide_default_io_base(i); + hw_regs_t hw; + + if (hwif-chipset == ide_unknown io_addr) { + u8 oldnoprobe = hwif-noprobe; + + memset(hw, 0, sizeof(hw)); + ide_std_init_ports(hw, io_addr, io_addr + 0x206); + hw.irq = ide_init_default_irq(io_addr); + ide_init_port_hw(hwif, hw); + + hwif-noprobe = oldnoprobe; - if (hwif-io_ports[IDE_DATA_OFFSET] - hwif-chipset == ide_unknown) idx[i] = i; - else + } else idx[i] = 0xff; } Index: b/drivers/ide/ide.c === --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -167,12 +167,6 @@ static void ide_port_init_devices_data(i } } -#ifndef CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS -# define ide_default_io_base(index)(0) -# define ide_default_irq(base) (0) -# define ide_init_default_irq(base)(0) -#endif - /* * init_ide_data() sets reasonable default values into all fields * of all instances of the hwifs and drives, but only on the first call. @@ -195,7 +189,6 @@ static void __init init_ide_data (void) { unsigned int index; static unsigned long magic_cookie = MAGIC_COOKIE; - hw_regs_t hw; if (magic_cookie != MAGIC_COOKIE) return; /* already initialized */ @@ -204,19 +197,8 @@ static void __init init_ide_data (void) /* Initialise all interface structures */ for (index = 0; index MAX_HWIFS; ++index) { ide_hwif_t *hwif = ide_hwifs[index]; - unsigned long io_addr = ide_default_io_base(index); - unsigned long ctl_addr = io_addr + 0x206; ide_init_port_data(hwif, index); - -#ifdef CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS - memset(hw, 0, sizeof(hw)); - ide_std_init_ports(hw, io_addr, ctl_addr); - memcpy(hwif-io_ports, hw.io_ports, sizeof(hw.io_ports)); - hwif-noprobe = !hwif-io_ports[IDE_DATA_OFFSET]; - hwif-irq = - ide_init_default_irq(hwif-io_ports[IDE_DATA_OFFSET]); -#endif } } - 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 10/12] ide: remove ide_init_default_irq() macro
* Use ide_default_irq() instead of ide_init_default_irq() in ide_generic host driver (so the correct IRQ is always set regardless of CONFIG_PCI / CONFIG_BLK_DEV_IDEPCI). * Remove no longer needed ide_init_default_irq() macro. Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/ide-generic.c |2 +- include/asm-alpha/ide.h |6 -- include/asm-ia64/ide.h |6 -- include/asm-m32r/ide.h |6 -- include/asm-mips/mach-generic/ide.h |6 -- include/asm-powerpc/ide.h |6 -- include/asm-x86/ide.h |6 -- 7 files changed, 1 insertion(+), 37 deletions(-) Index: b/drivers/ide/ide-generic.c === --- a/drivers/ide/ide-generic.c +++ b/drivers/ide/ide-generic.c @@ -102,7 +102,7 @@ static int __init ide_generic_init(void) memset(hw, 0, sizeof(hw)); ide_std_init_ports(hw, io_addr, io_addr + 0x206); - hw.irq = ide_init_default_irq(io_addr); + hw.irq = ide_default_irq(io_addr); ide_init_port_hw(hwif, hw); hwif-noprobe = oldnoprobe; Index: b/include/asm-alpha/ide.h === --- a/include/asm-alpha/ide.h +++ b/include/asm-alpha/ide.h @@ -37,12 +37,6 @@ static inline unsigned long ide_default_ } } -#ifdef CONFIG_PCI -#define ide_init_default_irq(base) (0) -#else -#define ide_init_default_irq(base) ide_default_irq(base) -#endif - #include asm-generic/ide_iops.h #endif /* __KERNEL__ */ Index: b/include/asm-ia64/ide.h === --- a/include/asm-ia64/ide.h +++ b/include/asm-ia64/ide.h @@ -44,12 +44,6 @@ static inline unsigned long ide_default_ } } -#ifdef CONFIG_PCI -#define ide_init_default_irq(base) (0) -#else -#define ide_init_default_irq(base) ide_default_irq(base) -#endif - #include asm-generic/ide_iops.h #endif /* __KERNEL__ */ Index: b/include/asm-m32r/ide.h === --- a/include/asm-m32r/ide.h +++ b/include/asm-m32r/ide.h @@ -63,12 +63,6 @@ static __inline__ unsigned long ide_defa } } -#ifdef CONFIG_BLK_DEV_IDEPCI -#define ide_init_default_irq(base) (0) -#else -#define ide_init_default_irq(base) ide_default_irq(base) -#endif - #include asm-generic/ide_iops.h #endif /* __KERNEL__ */ Index: b/include/asm-mips/mach-generic/ide.h === --- a/include/asm-mips/mach-generic/ide.h +++ b/include/asm-mips/mach-generic/ide.h @@ -96,12 +96,6 @@ static __inline__ unsigned long ide_defa } } -#ifdef CONFIG_BLK_DEV_IDEPCI -#define ide_init_default_irq(base) (0) -#else -#define ide_init_default_irq(base) ide_default_irq(base) -#endif - /* MIPS port and memory-mapped I/O string operations. */ static inline void __ide_flush_prologue(void) { Index: b/include/asm-powerpc/ide.h === --- a/include/asm-powerpc/ide.h +++ b/include/asm-powerpc/ide.h @@ -73,12 +73,6 @@ static __inline__ unsigned long ide_defa return 0; } -#ifdef CONFIG_PCI -#define ide_init_default_irq(base) (0) -#else -#define ide_init_default_irq(base) ide_default_irq(base) -#endif - #ifdef CONFIG_BLK_DEV_MPC8xx_IDE #define IDE_ARCH_ACK_INTR 1 #define ide_ack_intr(hwif) ((hwif)-ack_intr ? (hwif)-ack_intr(hwif) : 1) Index: b/include/asm-x86/ide.h === --- a/include/asm-x86/ide.h +++ b/include/asm-x86/ide.h @@ -58,12 +58,6 @@ static __inline__ unsigned long ide_defa } } -#ifdef CONFIG_BLK_DEV_IDEPCI -#define ide_init_default_irq(base) (0) -#else -#define ide_init_default_irq(base) ide_default_irq(base) -#endif - #include asm-generic/ide_iops.h #endif /* __KERNEL__ */ - 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 11/12] ide: cleanup ide_match_hwif()
* Remove no longer needed matching against I/O base and 'io_base' argument. * Move printk() to the caller and remove 'name' argument. Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/setup-pci.c | 47 +++ 1 file changed, 15 insertions(+), 32 deletions(-) Index: b/drivers/ide/setup-pci.c === --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c @@ -22,42 +22,20 @@ /** - * ide_match_hwif - match a PCI IDE against an ide_hwif - * @io_base: I/O base of device - * @bootable: set if its bootable - * @name: name of device + * ide_match_hwif - find free ide_hwifs[] slot + * @bootable: bootable flag * - * Match a PCI IDE port against an entry in ide_hwifs[], - * based on io_base port if possible. Return the matching hwif, - * or a new hwif. If we find an error (clashing, out of devices, etc) - * return NULL - * - * FIXME: we need to handle mmio matches here too + * Return the new hwif. If we are out of free slots return NULL. */ -static ide_hwif_t *ide_match_hwif(unsigned long io_base, u8 bootable, const char *name) +static ide_hwif_t *ide_match_hwif(u8 bootable) { - int h; ide_hwif_t *hwif; + int h; /* -* Look for a hwif with matching io_base default value. -* If chipset is ide_unknown, then claim that hwif slot. -* Otherwise, some other chipset has already claimed it.. :( -*/ - for (h = 0; h MAX_HWIFS; ++h) { - hwif = ide_hwifs[h]; - if (hwif-io_ports[IDE_DATA_OFFSET] == io_base) { - if (hwif-chipset == ide_unknown) - return hwif; /* match */ - printk(KERN_ERR %s: port 0x%04lx already claimed by %s\n, - name, io_base, hwif-name); - return NULL;/* already claimed */ - } - } - /* -* Okay, there is no hwif matching our io_base, -* so we'll just claim an unassigned slot. +* Claim an unassigned slot. +* * Give preference to claiming other slots before claiming ide0/ide1, * just in case there's another interface yet-to-be-scanned * which uses ports 1f0/170 (the ide0/ide1 defaults). @@ -83,7 +61,7 @@ static ide_hwif_t *ide_match_hwif(unsign if (hwif-chipset == ide_unknown) return hwif;/* pick an unused entry */ } - printk(KERN_ERR %s: too many IDE interfaces, no room in table\n, name); + return NULL; } @@ -367,8 +345,13 @@ static ide_hwif_t *ide_hwif_configure(st ctl = port ? 0x374 : 0x3f4; base = port ? 0x170 : 0x1f0; } - if ((hwif = ide_match_hwif(base, bootable, d-name)) == NULL) - return NULL;/* no room in ide_hwifs[] */ + + hwif = ide_match_hwif(bootable); + if (hwif == NULL) { + printk(KERN_ERR %s: too many IDE interfaces, no room in + table\n, d-name); + return NULL; + } memset(hw, 0, sizeof(hw)); hw.irq = irq; - 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 12/12] ide: cleanup ide_find_port()
Remove no longer needed matching against I/O base and 'base' argument. Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/arm/bast-ide.c|2 +- drivers/ide/arm/icside.c |2 +- drivers/ide/arm/ide_arm.c |2 +- drivers/ide/arm/palm_bk3710.c |2 +- drivers/ide/arm/rapide.c |2 +- drivers/ide/cris/ide-cris.c |2 +- drivers/ide/h8300/ide-h8300.c |3 +-- drivers/ide/ide-generic.c |2 +- drivers/ide/ide-pnp.c |2 +- drivers/ide/ide.c | 15 +++ drivers/ide/legacy/buddha.c |2 +- drivers/ide/legacy/falconide.c|2 +- drivers/ide/legacy/gayle.c|2 +- drivers/ide/legacy/ide-cs.c |2 +- drivers/ide/legacy/ide_platform.c |2 +- drivers/ide/legacy/macide.c |2 +- drivers/ide/legacy/q40ide.c |2 +- drivers/ide/pci/delkin_cb.c |2 +- include/linux/ide.h |2 +- 19 files changed, 21 insertions(+), 31 deletions(-) Index: b/drivers/ide/arm/bast-ide.c === --- a/drivers/ide/arm/bast-ide.c +++ b/drivers/ide/arm/bast-ide.c @@ -41,7 +41,7 @@ static int __init bastide_register(unsig hw.io_ports[IDE_CONTROL_OFFSET] = aux + (6 * 0x20); hw.irq = irq; - hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]); + hwif = ide_find_port(); if (hwif == NULL) goto out; Index: b/drivers/ide/arm/icside.c === --- a/drivers/ide/arm/icside.c +++ b/drivers/ide/arm/icside.c @@ -400,7 +400,7 @@ icside_setup(void __iomem *base, struct unsigned long port = (unsigned long)base + info-dataoffset; ide_hwif_t *hwif; - hwif = ide_find_port(port); + hwif = ide_find_port(); if (hwif) { int i; Index: b/drivers/ide/arm/ide_arm.c === --- a/drivers/ide/arm/ide_arm.c +++ b/drivers/ide/arm/ide_arm.c @@ -34,7 +34,7 @@ static int __init ide_arm_init(void) ide_std_init_ports(hw, IDE_ARM_IO, IDE_ARM_IO + 0x206); hw.irq = IDE_ARM_IRQ; - hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]); + hwif = ide_find_port(); if (hwif) { ide_init_port_hw(hwif, hw); idx[0] = hwif-index; Index: b/drivers/ide/arm/palm_bk3710.c === --- a/drivers/ide/arm/palm_bk3710.c +++ b/drivers/ide/arm/palm_bk3710.c @@ -378,7 +378,7 @@ static int __devinit palm_bk3710_probe(s hw.irq = irq-start; hw.chipset = ide_palm3710; - hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]); + hwif = ide_find_port(); if (hwif == NULL) goto out; Index: b/drivers/ide/arm/rapide.c === --- a/drivers/ide/arm/rapide.c +++ b/drivers/ide/arm/rapide.c @@ -44,7 +44,7 @@ rapide_probe(struct expansion_card *ec, goto release; } - hwif = ide_find_port((unsigned long)base); + hwif = ide_find_port(); if (hwif) { memset(hw, 0, sizeof(hw)); rapide_setup_ports(hw, base, base + 0x818, 1 6, ec-irq); Index: b/drivers/ide/cris/ide-cris.c === --- a/drivers/ide/cris/ide-cris.c +++ b/drivers/ide/cris/ide-cris.c @@ -804,7 +804,7 @@ static int __init init_e100_ide(void) cris_setup_ports(hw, cris_ide_base_address(h)); - hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]); + hwif = ide_find_port(); if (hwif == NULL) continue; ide_init_port_data(hwif, hwif-index); Index: b/drivers/ide/h8300/ide-h8300.c === --- a/drivers/ide/h8300/ide-h8300.c +++ b/drivers/ide/h8300/ide-h8300.c @@ -99,8 +99,7 @@ static int __init h8300_ide_init(void) hw_setup(hw); - /* register if */ - hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]); + hwif = ide_find_port(); if (hwif == NULL) { printk(KERN_ERR ide-h8300: IDE I/F register failed\n); return -ENOENT; Index: b/drivers/ide/ide-generic.c === --- a/drivers/ide/ide-generic.c +++ b/drivers/ide/ide-generic.c @@ -33,7 +33,7 @@ static ssize_t store_add(struct class *c if (sscanf(buf, %x:%x:%d, base, ctl, irq) != 3) return -EINVAL; - hwif = ide_find_port(base); + hwif = ide_find_port(); if (hwif == NULL) return -ENOENT; Index: b/drivers/ide/ide-pnp.c === ---
[PATCH 06/12] ide: limit legacy VLB host drivers to alpha, x86 and mips
These host drivers indirectly depend on CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS=y which is defined only on alpha, x86, ia64, m32r, mips and ppc32. Moreover: - on ia64 there is no ISA - m32r is too new for VLB - on ppc32 ISA is available only on PPC_CHRP (no default IDE ports) and PPC_PREP (marked as BROKEN) [ the common sense tells me that VLB was only used on x86 but there are urban legends that one of these host drivers was needed on some other arch - thus the extra care ] Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/Kconfig |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: b/drivers/ide/Kconfig === --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -1031,7 +1031,7 @@ config IDE_EXT_DIRECT endchoice # no isa - no vlb -if ISA +if ISA (ALPHA || X86 || MIPS) comment Other IDE chipsets support comment Note: most of these also require special kernel boot parameters - 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 03/12] ide: add ide-4drives host driver
CONFIG_BLK_DEV_4DRIVES deserves its own host driver: * Add drivers/ide/legacy/ide-4drives.c and move 4drives support there. * Add ide-4drives.o in the link order after all other legacy host drivers enabled by ide0= options (they all are mutually exclusive). * Make ide-4drives host driver probe itself for IDE devices instead of indirectly depending on ide_generic host driver. * Add probe module parameter to ide-4drives and update documentation. Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- Documentation/ide.txt|5 ++-- drivers/ide/Kconfig |4 +-- drivers/ide/ide.c| 15 ++-- drivers/ide/legacy/Makefile |1 drivers/ide/legacy/ide-4drives.c | 46 +++ 5 files changed, 55 insertions(+), 16 deletions(-) Index: b/Documentation/ide.txt === --- a/Documentation/ide.txt +++ b/Documentation/ide.txt @@ -242,8 +242,6 @@ Summary of ide driver parameters for ker both the respective primary and secondary channel to take effect. - idex=four : four drives on idex and ide(x^1) share same ports - idex=reset : reset interface after probe idex=ata66 : informs the interface that it has an 80c cable @@ -276,6 +274,9 @@ Also for legacy CMD640 host driver (cmd6 kernel paremeter to enable probing for VLB version of the chipset (PCI ones are detected automatically). +You also need to use probe kernel paramater for ide-4drives driver +(support for IDE generic chipset with four drives on one port). + IDE ATAPI streaming tape driver Index: b/drivers/ide/Kconfig === --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -1042,8 +1042,8 @@ config BLK_DEV_4DRIVES Certain older chipsets, including the Tekram 690CD, use a single set of I/O ports at 0x1f0 to control up to four drives, instead of the customary two drives per port. Support for this can be enabled at - runtime using the ide0=four kernel boot parameter if you say Y - here. + runtime using the ide_4drives.probe kernel boot parameter if you + say Y here. config BLK_DEV_ALI14XX tristate ALI M14xx support Index: b/drivers/ide/ide.c === --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -989,6 +989,7 @@ extern int probe_dtc2278; extern int probe_ht6560b; extern int probe_qd65xx; extern int cmd640_vlb; +extern int probe_4drives; static int __initdata is_chipset_set[MAX_HWIFS]; @@ -1213,19 +1214,9 @@ static int __init ide_setup(char *s) #endif #ifdef CONFIG_BLK_DEV_4DRIVES case -11: /* four drives on one set of ports */ - { - ide_hwif_t *mate = ide_hwifs[hw^1]; - mate-drives[0].select.all ^= 0x20; - mate-drives[1].select.all ^= 0x20; - hwif-chipset = mate-chipset = ide_4drives; - mate-irq = hwif-irq; - memcpy(mate-io_ports, hwif-io_ports, sizeof(hwif-io_ports)); - hwif-mate = mate; - mate-mate = hwif; - hwif-serialized = mate-serialized = 1; + probe_4drives = 1; goto obsolete_option; - } -#endif /* CONFIG_BLK_DEV_4DRIVES */ +#endif case -10: /* minus10 */ case -9: /* minus9 */ case -8: /* minus8 */ Index: b/drivers/ide/legacy/Makefile === --- a/drivers/ide/legacy/Makefile +++ b/drivers/ide/legacy/Makefile @@ -6,6 +6,7 @@ obj-$(CONFIG_BLK_DEV_UMC8672) += umc867 obj-$(CONFIG_BLK_DEV_DTC2278) += dtc2278.o obj-$(CONFIG_BLK_DEV_HT6560B) += ht6560b.o obj-$(CONFIG_BLK_DEV_QD65XX) += qd65xx.o +obj-$(CONFIG_BLK_DEV_4DRIVES) += ide-4drives.o obj-$(CONFIG_BLK_DEV_GAYLE)+= gayle.o obj-$(CONFIG_BLK_DEV_FALCON_IDE) += falconide.o Index: b/drivers/ide/legacy/ide-4drives.c === --- /dev/null +++ b/drivers/ide/legacy/ide-4drives.c @@ -0,0 +1,46 @@ + +#include linux/kernel.h +#include linux/init.h +#include linux/module.h +#include linux/ide.h + +int probe_4drives = 0; + +module_param_named(probe, probe_4drives, bool, 0); +MODULE_PARM_DESC(probe, probe for generic IDE chipset with 4 drives/port); + +static int __init ide_4drives_init(void) +{ +
[PATCH 04/12] cmd640: cleanup setup_device_ptrs()
This loop is no longer needed. Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/pci/cmd640.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) Index: b/drivers/ide/pci/cmd640.c === --- a/drivers/ide/pci/cmd640.c +++ b/drivers/ide/pci/cmd640.c @@ -409,19 +409,9 @@ static void __init check_prefetch (unsig */ static void __init setup_device_ptrs (void) { - unsigned int i; + cmd_hwif0 = ide_hwifs[0]; + cmd_hwif1 = ide_hwifs[1]; - cmd_hwif0 = ide_hwifs[0]; /* default, if not found below */ - cmd_hwif1 = ide_hwifs[1]; /* default, if not found below */ - for (i = 0; i MAX_HWIFS; i++) { - ide_hwif_t *hwif = ide_hwifs[i]; - if (hwif-chipset == ide_unknown) { - if (hwif-io_ports[IDE_DATA_OFFSET] == 0x1f0) - cmd_hwif0 = hwif; - else if (hwif-io_ports[IDE_DATA_OFFSET] == 0x170) - cmd_hwif1 = hwif; - } - } cmd_drives[0] = cmd_hwif0-drives[0]; cmd_drives[1] = cmd_hwif0-drives[1]; cmd_drives[2] = cmd_hwif1-drives[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 07/12] ide: init hwif-{io_ports,irq} explicitly in legacy VLB host drivers
Do explicit port setup in legacy VLB host drivers instead of depending on init_ide_data(). This way hwif-io_ports[] and hwif-irq are always correctly set regardless of CONFIG_PCI / CONFIG_BLK_DEV_IDEPCI. [ No need to care about idex=noprobe parameter for these drivers as they need to be explicitly enabled with probe parameter. ] Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/legacy/ali14xx.c | 12 drivers/ide/legacy/dtc2278.c | 12 drivers/ide/legacy/ht6560b.c | 12 drivers/ide/legacy/ide-4drives.c | 10 +++--- drivers/ide/legacy/qd65xx.c | 19 +-- drivers/ide/legacy/umc8672.c | 12 6 files changed, 72 insertions(+), 5 deletions(-) Index: b/drivers/ide/legacy/ali14xx.c === --- a/drivers/ide/legacy/ali14xx.c +++ b/drivers/ide/legacy/ali14xx.c @@ -200,6 +200,7 @@ static const struct ide_port_info ali14x static int __init ali14xx_probe(void) { static u8 idx[4] = { 0, 1, 0xff, 0xff }; + hw_regs_t hw[2]; printk(KERN_DEBUG ali14xx: base=0x%03x, regOn=0x%02x.\n, basePort, regOn); @@ -210,6 +211,17 @@ static int __init ali14xx_probe(void) return 1; } + memset(hw, 0, sizeof(hw)); + + ide_std_init_ports(hw[0], 0x1f0, 0x3f6); + hw[0].irq = 14; + + ide_std_init_ports(hw[1], 0x170, 0x376); + hw[1].irq = 15; + + ide_init_port_hw(ide_hwifs[0], hw[0]); + ide_init_port_hw(ide_hwifs[1], hw[1]); + ide_hwifs[0].set_pio_mode = ali14xx_set_pio_mode; ide_hwifs[1].set_pio_mode = ali14xx_set_pio_mode; Index: b/drivers/ide/legacy/dtc2278.c === --- a/drivers/ide/legacy/dtc2278.c +++ b/drivers/ide/legacy/dtc2278.c @@ -103,6 +103,7 @@ static int __init dtc2278_probe(void) unsigned long flags; ide_hwif_t *hwif, *mate; static u8 idx[4] = { 0, 1, 0xff, 0xff }; + hw_regs_t hw[2]; hwif = ide_hwifs[0]; mate = ide_hwifs[1]; @@ -128,6 +129,17 @@ static int __init dtc2278_probe(void) #endif local_irq_restore(flags); + memset(hw, 0, sizeof(hw)); + + ide_std_init_ports(hw[0], 0x1f0, 0x3f6); + hw[0].irq = 14; + + ide_std_init_ports(hw[1], 0x170, 0x376); + hw[1].irq = 15; + + ide_init_port_hw(hwif, hw[0]); + ide_init_port_hw(mate, hw[1]); + hwif-set_pio_mode = dtc2278_set_pio_mode; ide_device_add(idx, dtc2278_port_info); Index: b/drivers/ide/legacy/ht6560b.c === --- a/drivers/ide/legacy/ht6560b.c +++ b/drivers/ide/legacy/ht6560b.c @@ -331,6 +331,7 @@ static int __init ht6560b_init(void) { ide_hwif_t *hwif, *mate; static u8 idx[4] = { 0, 1, 0xff, 0xff }; + hw_regs_t hw[2]; if (probe_ht6560b == 0) return -ENODEV; @@ -349,6 +350,17 @@ static int __init ht6560b_init(void) goto release_region; } + memset(hw, 0, sizeof(hw)); + + ide_std_init_ports(hw[0], 0x1f0, 0x3f6); + hw[0].irq = 14; + + ide_std_init_ports(hw[1], 0x170, 0x376); + hw[1].irq = 15; + + ide_init_port_hw(hwif, hw[0]); + ide_init_port_hw(mate, hw[1]); + hwif-selectproc = ht6560b_selectproc; hwif-set_pio_mode = ht6560b_set_pio_mode; Index: b/drivers/ide/legacy/ide-4drives.c === --- a/drivers/ide/legacy/ide-4drives.c +++ b/drivers/ide/legacy/ide-4drives.c @@ -13,6 +13,7 @@ static int __init ide_4drives_init(void) { ide_hwif_t *hwif, *mate; u8 idx[4] = { 0, 1, 0xff, 0xff }; + hw_regs_t hw; if (probe_4drives == 0) return -ENODEV; @@ -20,11 +21,14 @@ static int __init ide_4drives_init(void) hwif = ide_hwifs[0]; mate = ide_hwifs[1]; - memcpy(mate-io_ports, hwif-io_ports, sizeof(hwif-io_ports)); + memset(hw, 0, sizeof(hw)); - mate-irq = hwif-irq; + ide_std_init_ports(hw, 0x1f0, 0x3f6); + hw.irq = 14; + hw.chipset = ide_4drives; - mate-chipset = hwif-chipset = ide_4drives; + ide_init_port_hw(hwif, hw); + ide_init_port_hw(mate, hw); mate-drives[0].select.all ^= 0x20; mate-drives[1].select.all ^= 0x20; Index: b/drivers/ide/legacy/qd65xx.c === --- a/drivers/ide/legacy/qd65xx.c +++ b/drivers/ide/legacy/qd65xx.c @@ -389,9 +389,9 @@ static const struct ide_port_info qd65xx static int __init qd_probe(int base) { ide_hwif_t *hwif; + u8 config, unit; u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; - u8 config; - u8 unit; + hw_regs_t hw[2]; config = inb(QD_CONFIG_PORT); @@ -400,6
Re: [BUID_FAILURE] next-20080215 Build failure caused by ide: rework PowerMac media-bay support
On Friday 15 February 2008, Kamalesh Babulal wrote: The linux-next-20080215 kernel build fails on the powerpc with following error CC arch/powerpc/platforms/powermac/setup.o In file included from arch/powerpc/platforms/powermac/setup.c:66: include/asm/mediabay.h:29: error: syntax error before 'ide_hwif_t' include/asm/mediabay.h:29: warning: function declaration isn't a prototype make[2]: *** [arch/powerpc/platforms/powermac/setup.o] Error 1 make[1]: *** [arch/powerpc/platforms/powermac] Error 2 make: *** [arch/powerpc/platforms] Error 2 This build failure is caused by the ide: rework PowerMac media-bay support patch.This problem was reported and solution suggested according to http://lkml.org/lkml/2008/2/13/195 including the #include linux/ide.h after #ifdef CONFIG_BLK_DEV_IDE_PMAC helps in fixing the build failure. Thanks, I fixed the original patch. interdiff: [...] v2: * Fix build by adding linux/ide.h include to asm-powerpc/mediabay.h. (Reported by Michael/Kamalesh/Andrew). Cc: Kamalesh Babulal [EMAIL PROTECTED] Cc: Michael Ellerman [EMAIL PROTECTED] Cc: Andrew Morton [EMAIL PROTECTED] [...] diff -u b/include/asm-powerpc/mediabay.h b/include/asm-powerpc/mediabay.h --- b/include/asm-powerpc/mediabay.h +++ b/include/asm-powerpc/mediabay.h @@ -23,6 +23,8 @@ extern int media_bay_count; #ifdef CONFIG_BLK_DEV_IDE_PMAC +#include linux/ide.h + int check_media_bay_by_base(unsigned long base, int what); /* called by IDE PMAC host driver to register IDE controller for media bay */ int media_bay_set_ide_infos(struct device_node *which_bay, unsigned long base, - 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 01/12] ide: remove ide_default_io_ctl() macro
It is always == '((base) + 0x206)' if CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS=y and it is not needed otherwise (arm, blackfin, parisc, ppc64, sh, sparc[64]). Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/ide.c |2 +- include/asm-alpha/ide.h |2 -- include/asm-arm/ide.h |8 include/asm-blackfin/ide.h |4 include/asm-ia64/ide.h |2 -- include/asm-m32r/ide.h |2 -- include/asm-mips/mach-generic/ide.h |2 -- include/asm-parisc/ide.h|2 -- include/asm-powerpc/ide.h |2 -- include/asm-sh/ide.h|3 --- include/asm-sparc/ide.h |2 -- include/asm-sparc64/ide.h |2 -- include/asm-x86/ide.h |2 -- 13 files changed, 1 insertion(+), 34 deletions(-) Index: b/drivers/ide/ide.c === --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -205,7 +205,7 @@ static void __init init_ide_data (void) for (index = 0; index MAX_HWIFS; ++index) { ide_hwif_t *hwif = ide_hwifs[index]; unsigned long io_addr = ide_default_io_base(index); - unsigned long ctl_addr = ide_default_io_ctl(io_addr); + unsigned long ctl_addr = io_addr + 0x206; ide_init_port_data(hwif, index); Index: b/include/asm-alpha/ide.h === --- a/include/asm-alpha/ide.h +++ b/include/asm-alpha/ide.h @@ -37,8 +37,6 @@ static inline unsigned long ide_default_ } } -#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ - #ifdef CONFIG_PCI #define ide_init_default_irq(base) (0) #else Index: b/include/asm-arm/ide.h === --- a/include/asm-arm/ide.h +++ b/include/asm-arm/ide.h @@ -17,14 +17,6 @@ #define MAX_HWIFS 4 #endif -#if !defined(CONFIG_ARCH_L7200) -# ifdef CONFIG_ARCH_CLPS7500 -# define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ -# else -# define ide_default_io_ctl(base) (0) -# endif -#endif /* !ARCH_L7200 */ - #define __ide_mm_insw(port,addr,len) readsw(port,addr,len) #define __ide_mm_insl(port,addr,len) readsl(port,addr,len) #define __ide_mm_outsw(port,addr,len) writesw(port,addr,len) Index: b/include/asm-blackfin/ide.h === --- a/include/asm-blackfin/ide.h +++ b/include/asm-blackfin/ide.h @@ -19,10 +19,6 @@ #define MAX_HWIFS 1 -/* Legacy ... BLK_DEV_IDECS */ -#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ - - #include asm-generic/ide_iops.h // Index: b/include/asm-ia64/ide.h === --- a/include/asm-ia64/ide.h +++ b/include/asm-ia64/ide.h @@ -44,8 +44,6 @@ static inline unsigned long ide_default_ } } -#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ - #ifdef CONFIG_PCI #define ide_init_default_irq(base) (0) #else Index: b/include/asm-m32r/ide.h === --- a/include/asm-m32r/ide.h +++ b/include/asm-m32r/ide.h @@ -63,8 +63,6 @@ static __inline__ unsigned long ide_defa } } -#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ - #ifdef CONFIG_BLK_DEV_IDEPCI #define ide_init_default_irq(base) (0) #else Index: b/include/asm-mips/mach-generic/ide.h === --- a/include/asm-mips/mach-generic/ide.h +++ b/include/asm-mips/mach-generic/ide.h @@ -96,8 +96,6 @@ static __inline__ unsigned long ide_defa } } -#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ - #ifdef CONFIG_BLK_DEV_IDEPCI #define ide_init_default_irq(base) (0) #else Index: b/include/asm-parisc/ide.h === --- a/include/asm-parisc/ide.h +++ b/include/asm-parisc/ide.h @@ -17,8 +17,6 @@ #define MAX_HWIFS 2 #endif -#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ - #define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id)) #define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id)) #define ide_request_region(from,extent,name) request_region((from), (extent), (name)) Index: b/include/asm-powerpc/ide.h === --- a/include/asm-powerpc/ide.h +++ b/include/asm-powerpc/ide.h @@ -86,8 +86,6 @@ static __inline__ unsigned long ide_defa #endif /* __powerpc64__ */ -#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ - #endif /* __KERNEL__ */ #endif /*
[PATCH 05/12] cmd640: init hwif-{io_ports,irq} explicitly
Do explicit port setup instead of depending on init_ide_data(). This way hwif-io_ports[] and hwif-irq are always correctly set regardless of CONFIG_PCI / CONFIG_BLK_DEV_IDEPCI. [ Remember to not break idex=noprobe parameter. ] While at it fix printk(). Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/pci/cmd640.c | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) Index: b/drivers/ide/pci/cmd640.c === --- a/drivers/ide/pci/cmd640.c +++ b/drivers/ide/pci/cmd640.c @@ -712,8 +712,9 @@ static int __init cmd640x_init(void) int second_port_cmd640 = 0; const char *bus_type, *port2; unsigned int index; - u8 b, cfr; + u8 b, cfr, oldnoprobe; u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; + hw_regs_t hw[2]; if (cmd640_vlb probe_for_cmd640_vlb()) { bus_type = VLB; @@ -752,12 +753,25 @@ static int __init cmd640x_init(void) return 0; } + memset(hw, 0, sizeof(hw)); + + ide_std_init_ports(hw[0], 0x1f0, 0x3f6); + hw[0].irq = 14; + + ide_std_init_ports(hw[1], 0x170, 0x376); + hw[1].irq = 15; + + printk(KERN_INFO cmd640: buggy cmd640%c interface on %s, config=0x%02x +\n, 'a' + cmd640_chip_version - 1, bus_type, cfr); + /* * Initialize data for primary port */ setup_device_ptrs (); - printk(%s: buggy cmd640%c interface on %s, config=0x%02x\n, - cmd_hwif0-name, 'a' + cmd640_chip_version - 1, bus_type, cfr); + + oldnoprobe = cmd_hwif0-noprobe; + ide_init_port_hw(cmd_hwif0, hw[0]); + cmd_hwif0-noprobe = oldnoprobe; #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED cmd_hwif0-set_pio_mode = cmd640_set_pio_mode; #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ @@ -809,6 +823,9 @@ static int __init cmd640x_init(void) * Initialize data for secondary cmd640 port, if enabled */ if (second_port_cmd640) { + oldnoprobe = cmd_hwif1-noprobe; + ide_init_port_hw(cmd_hwif1, hw[1]); + cmd_hwif1-noprobe = oldnoprobe; #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED cmd_hwif1-set_pio_mode = cmd640_set_pio_mode; #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ - 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 02/12] ide: remove ppc ifdef from init_ide_data()
On PPC32 ide_init_default_irq() is non-zero only for PPLUS and PPC_PREP (the latter marked as BROKEN currently) so this ifdef can be removed. Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/ide.c |2 -- 1 file changed, 2 deletions(-) Index: b/drivers/ide/ide.c === --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -214,11 +214,9 @@ static void __init init_ide_data (void) ide_std_init_ports(hw, io_addr, ctl_addr); memcpy(hwif-io_ports, hw.io_ports, sizeof(hw.io_ports)); hwif-noprobe = !hwif-io_ports[IDE_DATA_OFFSET]; -#if !defined(CONFIG_PPC32) || defined(CONFIG_PPLUS) || !defined(CONFIG_PCI) hwif-irq = ide_init_default_irq(hwif-io_ports[IDE_DATA_OFFSET]); #endif -#endif } } - 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] sata_mv: Define module alias for platform device
Martin Michlmayr wrote: The sata_mv driver can be loaded as a platform device, as is done by various Orion (ARM) based devices. The driver needs to define a module alias for the platform driver so udev will load it automatically. Tested with Debian on a QNAP TS-209. Signed-off-by: Martin Michlmayr [EMAIL PROTECTED] --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -3198,6 +3198,7 @@ MODULE_DESCRIPTION(SCSI low-level driver for Marvell SATA controllers); MODULE_LICENSE(GPL); MODULE_DEVICE_TABLE(pci, mv_pci_tbl); MODULE_VERSION(DRV_VERSION); +MODULE_ALIAS(platform:sata_mv); #ifdef CONFIG_PCI module_param(msi, int, 0444); .. Acked-by: Mark Lord [EMAIL PROTECTED] Looks safe enough. - 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: IDE cdrom problem
On Saturday 16 February 2008, Borislav Petkov wrote: On Sat, Feb 16, 2008 at 04:24:46PM +0100, Bartlomiej Zolnierkiewicz wrote: [ added Borislav (ide-cd maintainer) to cc: ] Hi, Unless there are some very important reasons to keep the discussion private please always cc: linux-ide@ and/or linux-kernel@ ML when reporting problems. Othewise your mail misses many knowledgeable people and is left on mercy of clueless IDE maintainer... ;-) -- Forwarded Message -- Subject: IDE cdrom problem Date: Saturday 16 February 2008 From: WaVeR [EMAIL PROTECTED] To: [EMAIL PROTECTED] Hello Bart, Sorry to distrub you, but I have a similar problem like this post http://lkml.org/lkml/2008/2/12/97 I'm not subscribed to linux ML, so I decide to write you directly. From my dmesg, I get this error: Feb 16 08:01:58 Jupiter kernel: hdc: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 08:06:16 Jupiter kernel: hdc: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 08:10:45 Jupiter kernel: hdd: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 08:37:41 Jupiter kernel: hdd: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 08:42:10 Jupiter kernel: hdc: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 09:00:07 Jupiter kernel: hdd: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Yeah, this is kinda funny, i think i've seen that somewhere :) But seriously, Yep, this looks to be the identical problem as discussed recently: http://www.mail-archive.com/linux-ide@vger.kernel.org/msg16131.html [ + IIRC the similar issue might be already in the kernel bugzilla... ] can you try 2.6.25-rc2 - this one should be stable enough and it has the ide-cd rewrite in there and it would be interesting to see whether the new interrupt handler shows the same behaviour. Bart, since this starts to occur often, i'm thinking of adding a debugging macro similar to the ones we rewrote in ide-floppy and ide-tape besides the CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS facility in ide-cd. What are your thoughts on the matter? I would rather prefer to see more code removal/unification in ide-cd. [ If the code is simple/clean enough and have informative printk()-s for error conditions there shouldn't be a frequent need for an extra debugging information. ] As you can see on the atached file. It's a simple IDE dvdrom and a cd burner. I dont have this problem with the kernel 2.6.21.3 My actual kernel is: 9:28 [EMAIL PROTECTED] ~% uname -a Linux Jupiter 2.6.24.2-waver.1 #1 Wed Feb 13 23:53:31 CET 2008 i686 GNU/Linux It would also help us if it can be narrowed down to the specific commit. Please install git package, get kernel git tree from kernel.org, and do: git bisect start git bisect good 2.6.21 git bisect bad 2.6.24 It will select the kernel to test - compile and boot it to see if the problem is still there. If so do git bisect bad which will give you new kernel to test. If the kernel works fine do git bisect good instead. After few iterations you should find the exact commit which introduced the bug. Thanks, Bart - 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: Optiarc DVD RW AD-5200A audio playing
On Sat, Feb 16, 2008 at 04:24:01PM +0100, Bartlomiej Zolnierkiewicz wrote: Hi, On Saturday 16 February 2008, Borislav Petkov wrote: On Fri, Feb 15, 2008 at 02:53:27PM -0500, Stefan Bader wrote: Hello Borislav, I worked on a problem with an DVD driver (model=Optiarc DVD RW AD-5200A) which obviously has the same problem as some Matshita drives. The following patch was reported to enabled audio playing on this drive. Would this approach be suitable for upstream or are there other solutions to this problem? Regards, Stefan --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -2988,7 +2988,8 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) if (strcmp(drive-id-model, MATSHITADVD-ROM SR-8187) == 0 || strcmp(drive-id-model, MATSHITADVD-ROM SR-8186) == 0 || strcmp(drive-id-model, MATSHITADVD-ROM SR-8176) == 0 || - strcmp(drive-id-model, MATSHITADVD-ROM SR-8174) == 0) + strcmp(drive-id-model, MATSHITADVD-ROM SR-8174) == 0 || + strcmp(drive-id-model, Optiarc DVD RW AD-5200A) == 0) CDROM_CONFIG_FLAGS(drive)-audio_play = 1; #if ! STANDARD_ATAPI Hi Stefan, just to make sure that the audioplay bit is not set in the capabilities page, can you please try the following patch applied against 2.6.25-rc2 and send me the output. Thanks! @Bart: by the way, this cdi-mask thingy is kinda unintuitive doing double negation to check whether a feature is supported or not. Yeah, this comes from above, i.e. uniform cdrom layer. But still, shouldn't we use a cdi-caps_flags or something similar instead, which mirrors the caps page bits setting? It seems so (at least having negative flags is very unintuitive) but they might be some reason for this ugliness, Jens? [ Please also remember that since cdrom layer is _uniform_ it may be not possible and/or desirable to have 1-1 mapping between caps page bits and the future cdi-caps_flags. ] commit 435f0f4496a1b32af2d542f43b2370a890fe2f83 Author: Borislav Petkov [EMAIL PROTECTED] Date: Sat Feb 16 09:56:36 2008 +0100 ide-cd: Enable audio play quirk for Optiarc DVD RW AD-5200A drive Reported-by: Stefan Bader [EMAIL PROTECTED] Signed-off-by: Borislav Petkov [EMAIL PROTECTED] diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index f77db6b..2c9d06e 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1750,6 +1750,10 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) cdi-mask = ~(CDC_DVD_RAM | CDC_RAM); if (buf[8 + 3] 0x10) cdi-mask = ~CDC_DVD_R; + if (!(buf[8 + 4] 0x01)) { Hmm, shouldn't there be ' (cd-cd_flags IDE_CD_FLAG_PLAY_AUDIO_OK)' to prevent false positives? I wanted to see whether the caps page reports the audioplay bit off... + printk(KERN_INFO ide-cd: audio play not advertised in caps page, Would be nice to also printk() the device name. ... but printing the device model is actually a good idea and this will rule out false positives, so Stefan, please drop the previous patch and test the updated one below. Thanks. commit 6cc44b0ce5c9270b15d456eb9ffa91b855e4e0d0 Author: Borislav Petkov [EMAIL PROTECTED] Date: Sat Feb 16 09:56:36 2008 +0100 ide-cd: Enable audio play quirk for Optiarc DVD RW AD-5200A drive Reported-by: Stefan Bader [EMAIL PROTECTED] Signed-off-by: Borislav Petkov [EMAIL PROTECTED] diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index f77db6b..4c9984f 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1750,6 +1750,11 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) cdi-mask = ~(CDC_DVD_RAM | CDC_RAM); if (buf[8 + 3] 0x10) cdi-mask = ~CDC_DVD_R; + if (!(buf[8 + 4] 0x01)) { + printk(KERN_INFO ide-cd: audio play not advertised in caps + page for drive model [%s], enabling quirk.\n, + drive-id-model); + } if ((buf[8 + 4] 0x01) || (cd-cd_flags IDE_CD_FLAG_PLAY_AUDIO_OK)) cdi-mask = ~CDC_PLAY_AUDIO; @@ -1929,6 +1934,7 @@ static const struct cd_list_entry ide_cd_quirks_list[] = { { MATSHITADVD-ROM SR-8186, NULL, IDE_CD_FLAG_PLAY_AUDIO_OK }, { MATSHITADVD-ROM SR-8176, NULL, IDE_CD_FLAG_PLAY_AUDIO_OK }, { MATSHITADVD-ROM SR-8174, NULL, IDE_CD_FLAG_PLAY_AUDIO_OK }, + { Optiarc DVD RW AD-5200A, NULL, IDE_CD_FLAG_PLAY_AUDIO_OK }, { NULL, NULL, 0 } }; -- Regards/Gruß, Boris. - 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: Optiarc DVD RW AD-5200A audio playing
On Saturday 16 February 2008, Borislav Petkov wrote: On Sat, Feb 16, 2008 at 04:24:01PM +0100, Bartlomiej Zolnierkiewicz wrote: Hi, On Saturday 16 February 2008, Borislav Petkov wrote: On Fri, Feb 15, 2008 at 02:53:27PM -0500, Stefan Bader wrote: Hello Borislav, I worked on a problem with an DVD driver (model=Optiarc DVD RW AD-5200A) which obviously has the same problem as some Matshita drives. The following patch was reported to enabled audio playing on this drive. Would this approach be suitable for upstream or are there other solutions to this problem? Regards, Stefan --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -2988,7 +2988,8 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) if (strcmp(drive-id-model, MATSHITADVD-ROM SR-8187) == 0 || strcmp(drive-id-model, MATSHITADVD-ROM SR-8186) == 0 || strcmp(drive-id-model, MATSHITADVD-ROM SR-8176) == 0 || - strcmp(drive-id-model, MATSHITADVD-ROM SR-8174) == 0) + strcmp(drive-id-model, MATSHITADVD-ROM SR-8174) == 0 || + strcmp(drive-id-model, Optiarc DVD RW AD-5200A) == 0) CDROM_CONFIG_FLAGS(drive)-audio_play = 1; #if ! STANDARD_ATAPI Hi Stefan, just to make sure that the audioplay bit is not set in the capabilities page, can you please try the following patch applied against 2.6.25-rc2 and send me the output. Thanks! @Bart: by the way, this cdi-mask thingy is kinda unintuitive doing double negation to check whether a feature is supported or not. Yeah, this comes from above, i.e. uniform cdrom layer. But still, shouldn't we use a cdi-caps_flags or something similar instead, which mirrors the caps page bits setting? It seems so (at least having negative flags is very unintuitive) but they might be some reason for this ugliness, Jens? [ Please also remember that since cdrom layer is _uniform_ it may be not possible and/or desirable to have 1-1 mapping between caps page bits and the future cdi-caps_flags. ] commit 435f0f4496a1b32af2d542f43b2370a890fe2f83 Author: Borislav Petkov [EMAIL PROTECTED] Date: Sat Feb 16 09:56:36 2008 +0100 ide-cd: Enable audio play quirk for Optiarc DVD RW AD-5200A drive Reported-by: Stefan Bader [EMAIL PROTECTED] Signed-off-by: Borislav Petkov [EMAIL PROTECTED] diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index f77db6b..2c9d06e 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1750,6 +1750,10 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) cdi-mask = ~(CDC_DVD_RAM | CDC_RAM); if (buf[8 + 3] 0x10) cdi-mask = ~CDC_DVD_R; + if (!(buf[8 + 4] 0x01)) { Hmm, shouldn't there be ' (cd-cd_flags IDE_CD_FLAG_PLAY_AUDIO_OK)' to prevent false positives? I wanted to see whether the caps page reports the audioplay bit off... we still need IDE_CD_FLAG_PLAY_AUDIO_OK flag to be _set_ to enable the quirk + printk(KERN_INFO ide-cd: audio play not advertised in caps page, Would be nice to also printk() the device name. ... but printing the device model is actually a good idea and this will rule out false positives, so Stefan, please drop the previous patch and test the updated one below. Thanks. commit 6cc44b0ce5c9270b15d456eb9ffa91b855e4e0d0 Author: Borislav Petkov [EMAIL PROTECTED] Date: Sat Feb 16 09:56:36 2008 +0100 ide-cd: Enable audio play quirk for Optiarc DVD RW AD-5200A drive Reported-by: Stefan Bader [EMAIL PROTECTED] Signed-off-by: Borislav Petkov [EMAIL PROTECTED] diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index f77db6b..4c9984f 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1750,6 +1750,11 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) cdi-mask = ~(CDC_DVD_RAM | CDC_RAM); if (buf[8 + 3] 0x10) cdi-mask = ~CDC_DVD_R; + if (!(buf[8 + 4] 0x01)) { + printk(KERN_INFO ide-cd: audio play not advertised in caps + page for drive model [%s], enabling quirk.\n, + drive-id-model); if IDE_CD_FLAG_PLAY_AUDIO_OK flag is not set the above message is _bogus_ (because the quirk won't be enabled) [ how's about just deleting the whole printk() to preserve simplicity? ] + } if ((buf[8 + 4] 0x01) || (cd-cd_flags IDE_CD_FLAG_PLAY_AUDIO_OK)) cdi-mask = ~CDC_PLAY_AUDIO; @@ -1929,6 +1934,7 @@ static const struct cd_list_entry ide_cd_quirks_list[] = { { MATSHITADVD-ROM SR-8186, NULL, IDE_CD_FLAG_PLAY_AUDIO_OK }, { MATSHITADVD-ROM SR-8176, NULL, IDE_CD_FLAG_PLAY_AUDIO_OK }, { MATSHITADVD-ROM SR-8174, NULL, IDE_CD_FLAG_PLAY_AUDIO_OK }, +
[PATCH] sata_mv: Define module alias for platform device
The sata_mv driver can be loaded as a platform device, as is done by various Orion (ARM) based devices. The driver needs to define a module alias for the platform driver so udev will load it automatically. Tested with Debian on a QNAP TS-209. Signed-off-by: Martin Michlmayr [EMAIL PROTECTED] --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -3198,6 +3198,7 @@ MODULE_DESCRIPTION(SCSI low-level driver for Marvell SATA controllers); MODULE_LICENSE(GPL); MODULE_DEVICE_TABLE(pci, mv_pci_tbl); MODULE_VERSION(DRV_VERSION); +MODULE_ALIAS(platform:sata_mv); #ifdef CONFIG_PCI module_param(msi, int, 0444); -- Martin Michlmayr http://www.cyrius.com/ - 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: Optiarc DVD RW AD-5200A audio playing
On Sat, Feb 16, 2008 at 06:48:24PM +0100, Bartlomiej Zolnierkiewicz wrote: On Saturday 16 February 2008, Borislav Petkov wrote: On Sat, Feb 16, 2008 at 04:24:01PM +0100, Bartlomiej Zolnierkiewicz wrote: Hi, On Saturday 16 February 2008, Borislav Petkov wrote: On Fri, Feb 15, 2008 at 02:53:27PM -0500, Stefan Bader wrote: Hello Borislav, I worked on a problem with an DVD driver (model=Optiarc DVD RW AD-5200A) which obviously has the same problem as some Matshita drives. The following patch was reported to enabled audio playing on this drive. Would this approach be suitable for upstream or are there other solutions to this problem? Regards, Stefan --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -2988,7 +2988,8 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) if (strcmp(drive-id-model, MATSHITADVD-ROM SR-8187) == 0 || strcmp(drive-id-model, MATSHITADVD-ROM SR-8186) == 0 || strcmp(drive-id-model, MATSHITADVD-ROM SR-8176) == 0 || - strcmp(drive-id-model, MATSHITADVD-ROM SR-8174) == 0) + strcmp(drive-id-model, MATSHITADVD-ROM SR-8174) == 0 || + strcmp(drive-id-model, Optiarc DVD RW AD-5200A) == 0) CDROM_CONFIG_FLAGS(drive)-audio_play = 1; #if ! STANDARD_ATAPI Hi Stefan, just to make sure that the audioplay bit is not set in the capabilities page, can you please try the following patch applied against 2.6.25-rc2 and send me the output. Thanks! @Bart: by the way, this cdi-mask thingy is kinda unintuitive doing double negation to check whether a feature is supported or not. Yeah, this comes from above, i.e. uniform cdrom layer. But still, shouldn't we use a cdi-caps_flags or something similar instead, which mirrors the caps page bits setting? It seems so (at least having negative flags is very unintuitive) but they might be some reason for this ugliness, Jens? [ Please also remember that since cdrom layer is _uniform_ it may be not possible and/or desirable to have 1-1 mapping between caps page bits and the future cdi-caps_flags. ] commit 435f0f4496a1b32af2d542f43b2370a890fe2f83 Author: Borislav Petkov [EMAIL PROTECTED] Date: Sat Feb 16 09:56:36 2008 +0100 ide-cd: Enable audio play quirk for Optiarc DVD RW AD-5200A drive Reported-by: Stefan Bader [EMAIL PROTECTED] Signed-off-by: Borislav Petkov [EMAIL PROTECTED] diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index f77db6b..2c9d06e 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1750,6 +1750,10 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) cdi-mask = ~(CDC_DVD_RAM | CDC_RAM); if (buf[8 + 3] 0x10) cdi-mask = ~CDC_DVD_R; + if (!(buf[8 + 4] 0x01)) { Hmm, shouldn't there be ' (cd-cd_flags IDE_CD_FLAG_PLAY_AUDIO_OK)' to prevent false positives? I wanted to see whether the caps page reports the audioplay bit off... we still need IDE_CD_FLAG_PLAY_AUDIO_OK flag to be _set_ to enable the quirk + printk(KERN_INFO ide-cd: audio play not advertised in caps page, Would be nice to also printk() the device name. ... but printing the device model is actually a good idea and this will rule out false positives, so Stefan, please drop the previous patch and test the updated one below. Thanks. commit 6cc44b0ce5c9270b15d456eb9ffa91b855e4e0d0 Author: Borislav Petkov [EMAIL PROTECTED] Date: Sat Feb 16 09:56:36 2008 +0100 ide-cd: Enable audio play quirk for Optiarc DVD RW AD-5200A drive Reported-by: Stefan Bader [EMAIL PROTECTED] Signed-off-by: Borislav Petkov [EMAIL PROTECTED] diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index f77db6b..4c9984f 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1750,6 +1750,11 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) cdi-mask = ~(CDC_DVD_RAM | CDC_RAM); if (buf[8 + 3] 0x10) cdi-mask = ~CDC_DVD_R; + if (!(buf[8 + 4] 0x01)) { + printk(KERN_INFO ide-cd: audio play not advertised in caps + page for drive model [%s], enabling quirk.\n, + drive-id-model); if IDE_CD_FLAG_PLAY_AUDIO_OK flag is not set the above message is _bogus_ (because the quirk won't be enabled) [ how's about just deleting the whole printk() to preserve simplicity? ] + } if ((buf[8 + 4] 0x01) || (cd-cd_flags IDE_CD_FLAG_PLAY_AUDIO_OK)) cdi-mask = ~CDC_PLAY_AUDIO; @@ -1929,6 +1934,7 @@ static const struct cd_list_entry ide_cd_quirks_list[] = { { MATSHITADVD-ROM
Re: Optiarc DVD RW AD-5200A audio playing
On Saturday 16 February 2008, Borislav Petkov wrote: On Sat, Feb 16, 2008 at 06:48:24PM +0100, Bartlomiej Zolnierkiewicz wrote: On Saturday 16 February 2008, Borislav Petkov wrote: On Sat, Feb 16, 2008 at 04:24:01PM +0100, Bartlomiej Zolnierkiewicz wrote: Hi, On Saturday 16 February 2008, Borislav Petkov wrote: On Fri, Feb 15, 2008 at 02:53:27PM -0500, Stefan Bader wrote: Hello Borislav, I worked on a problem with an DVD driver (model=Optiarc DVD RW AD-5200A) which obviously has the same problem as some Matshita drives. The following patch was reported to enabled audio playing on this drive. Would this approach be suitable for upstream or are there other solutions to this problem? Regards, Stefan --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -2988,7 +2988,8 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) if (strcmp(drive-id-model, MATSHITADVD-ROM SR-8187) == 0 || strcmp(drive-id-model, MATSHITADVD-ROM SR-8186) == 0 || strcmp(drive-id-model, MATSHITADVD-ROM SR-8176) == 0 || - strcmp(drive-id-model, MATSHITADVD-ROM SR-8174) == 0) + strcmp(drive-id-model, MATSHITADVD-ROM SR-8174) == 0 || + strcmp(drive-id-model, Optiarc DVD RW AD-5200A) == 0) CDROM_CONFIG_FLAGS(drive)-audio_play = 1; #if ! STANDARD_ATAPI Hi Stefan, just to make sure that the audioplay bit is not set in the capabilities page, can you please try the following patch applied against 2.6.25-rc2 and send me the output. Thanks! @Bart: by the way, this cdi-mask thingy is kinda unintuitive doing double negation to check whether a feature is supported or not. Yeah, this comes from above, i.e. uniform cdrom layer. But still, shouldn't we use a cdi-caps_flags or something similar instead, which mirrors the caps page bits setting? It seems so (at least having negative flags is very unintuitive) but they might be some reason for this ugliness, Jens? [ Please also remember that since cdrom layer is _uniform_ it may be not possible and/or desirable to have 1-1 mapping between caps page bits and the future cdi-caps_flags. ] commit 435f0f4496a1b32af2d542f43b2370a890fe2f83 Author: Borislav Petkov [EMAIL PROTECTED] Date: Sat Feb 16 09:56:36 2008 +0100 ide-cd: Enable audio play quirk for Optiarc DVD RW AD-5200A drive Reported-by: Stefan Bader [EMAIL PROTECTED] Signed-off-by: Borislav Petkov [EMAIL PROTECTED] diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index f77db6b..2c9d06e 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1750,6 +1750,10 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) cdi-mask = ~(CDC_DVD_RAM | CDC_RAM); if (buf[8 + 3] 0x10) cdi-mask = ~CDC_DVD_R; + if (!(buf[8 + 4] 0x01)) { Hmm, shouldn't there be ' (cd-cd_flags IDE_CD_FLAG_PLAY_AUDIO_OK)' to prevent false positives? I wanted to see whether the caps page reports the audioplay bit off... we still need IDE_CD_FLAG_PLAY_AUDIO_OK flag to be _set_ to enable the quirk + printk(KERN_INFO ide-cd: audio play not advertised in caps page, Would be nice to also printk() the device name. ... but printing the device model is actually a good idea and this will rule out false positives, so Stefan, please drop the previous patch and test the updated one below. Thanks. commit 6cc44b0ce5c9270b15d456eb9ffa91b855e4e0d0 Author: Borislav Petkov [EMAIL PROTECTED] Date: Sat Feb 16 09:56:36 2008 +0100 ide-cd: Enable audio play quirk for Optiarc DVD RW AD-5200A drive Reported-by: Stefan Bader [EMAIL PROTECTED] Signed-off-by: Borislav Petkov [EMAIL PROTECTED] diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index f77db6b..4c9984f 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1750,6 +1750,11 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) cdi-mask = ~(CDC_DVD_RAM | CDC_RAM); if (buf[8 + 3] 0x10) cdi-mask = ~CDC_DVD_R; + if (!(buf[8 + 4] 0x01)) { + printk(KERN_INFO ide-cd: audio play not advertised in caps + page for drive model [%s], enabling quirk.\n, + drive-id-model); if IDE_CD_FLAG_PLAY_AUDIO_OK flag is not set the above message is _bogus_ (because the quirk won't be enabled) [ how's about just deleting the whole printk() to preserve simplicity? ] + } if ((buf[8 + 4] 0x01) || (cd-cd_flags IDE_CD_FLAG_PLAY_AUDIO_OK))
Re: IDE cdrom problem
On Sat, Feb 16, 2008 at 06:40:08PM +0100, Bartlomiej Zolnierkiewicz wrote: On Saturday 16 February 2008, Borislav Petkov wrote: On Sat, Feb 16, 2008 at 04:24:46PM +0100, Bartlomiej Zolnierkiewicz wrote: [ added Borislav (ide-cd maintainer) to cc: ] Hi, Unless there are some very important reasons to keep the discussion private please always cc: linux-ide@ and/or linux-kernel@ ML when reporting problems. Othewise your mail misses many knowledgeable people and is left on mercy of clueless IDE maintainer... ;-) -- Forwarded Message -- Subject: IDE cdrom problem Date: Saturday 16 February 2008 From: WaVeR [EMAIL PROTECTED] To: [EMAIL PROTECTED] Hello Bart, Sorry to distrub you, but I have a similar problem like this post http://lkml.org/lkml/2008/2/12/97 I'm not subscribed to linux ML, so I decide to write you directly. From my dmesg, I get this error: Feb 16 08:01:58 Jupiter kernel: hdc: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 08:06:16 Jupiter kernel: hdc: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 08:10:45 Jupiter kernel: hdd: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 08:37:41 Jupiter kernel: hdd: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 08:42:10 Jupiter kernel: hdc: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 09:00:07 Jupiter kernel: hdd: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Yeah, this is kinda funny, i think i've seen that somewhere :) But seriously, Yep, this looks to be the identical problem as discussed recently: http://www.mail-archive.com/linux-ide@vger.kernel.org/msg16131.html [ + IIRC the similar issue might be already in the kernel bugzilla... ] can you try 2.6.25-rc2 - this one should be stable enough and it has the ide-cd rewrite in there and it would be interesting to see whether the new interrupt handler shows the same behaviour. Bart, since this starts to occur often, i'm thinking of adding a debugging macro similar to the ones we rewrote in ide-floppy and ide-tape besides the CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS facility in ide-cd. What are your thoughts on the matter? I would rather prefer to see more code removal/unification in ide-cd. Yep, this is underway. Am working on removing the ide-cd internal buffer and will get back to you after testing it... Ide floppy will have to wait. [ If the code is simple/clean enough and have informative printk()-s for error conditions there shouldn't be a frequent need for an extra debugging information. ] As you can see on the atached file. It's a simple IDE dvdrom and a cd burner. I dont have this problem with the kernel 2.6.21.3 My actual kernel is: 9:28 [EMAIL PROTECTED] ~% uname -a Linux Jupiter 2.6.24.2-waver.1 #1 Wed Feb 13 23:53:31 CET 2008 i686 GNU/Linux It would also help us if it can be narrowed down to the specific commit. Please install git package, get kernel git tree from kernel.org, and do: git bisect start git bisect good 2.6.21 git bisect bad 2.6.24 What would decrease the number of bisection iterations would be specifying the path for bisection, like so: git bisect start -- drivers/ide and then we'll nail down the evildoer significantly faster, imho. It will select the kernel to test - compile and boot it to see if the problem is still there. If so do git bisect bad which will give you new kernel to test. If the kernel works fine do git bisect good instead. After few iterations you should find the exact commit which introduced the bug. Thanks, Bart -- Regards/Gruß, Boris. - 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 5/13] cy82c693: add -set_dma_mode method
[ Sorry for the late reply. ] On Friday 04 January 2008, Sergei Shtylyov wrote: Bartlomiej Zolnierkiewicz wrote: * Fix SWDMA/MWDMA masks in cy82c693_chipset. * Add IDE_HFLAG_CY82C693 host flag and use it in ide_tune_dma() to check whether the DMA should be enabled even if ide_max_dma_mode() fails. I didn't get why this was necessary... paranoia ;-) Care to send a patch removing it? * Convert cy82c693_dma_enable() to become cy82c693_set_dma_mode() and remove no longer needed cy82c693_ide_dma_on(). Then set IDE_HFLAG_CY82C693 instead of IDE_HFLAG_TRUST_BIOS_FOR_DMA in cy82c693_chipset. * Bump driver version. As a result of this patch cy82c693 driver will configure and use DMA on all SWDMA0-2 and MWDMA0-2 capable ATA devices instead of relying on BIOS. Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] Index: b/drivers/ide/pci/cy82c693.c === --- a/drivers/ide/pci/cy82c693.c +++ b/drivers/ide/pci/cy82c693.c @@ -1,5 +1,5 @@ /* - * linux/drivers/ide/pci/cy82c693.cVersion 0.43Nov 7, 2007 + * linux/drivers/ide/pci/cy82c693.cVersion 0.44Nov 8, 2007 * * Copyright (C) 1998-2000 Andreas S. Krebs ([EMAIL PROTECTED]), Maintainer * Copyright (C) 1998-2002 Andre Hedrick [EMAIL PROTECTED], Integrator @@ -176,14 +176,12 @@ static void compute_clocks (u8 pio, pio_ * set DMA mode a specific channel for CY82C693 */ -static void cy82c693_dma_enable (ide_drive_t *drive, int mode, int single) +static void cy82c693_set_dma_mode(ide_drive_t *drive, const u8 mode) { - u8 index = 0, data = 0; + ide_hwif_t *hwif = drive-hwif; + u8 single = (mode 0x10) 4, index = 0, data = 0; Useless intializers for 'index' and 'data'. ditto Thanks, Bart - 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 2/2] ide-pmac: use ide_find_port()
Cc: Benjamin Herrenschmidt [EMAIL PROTECTED] Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/ppc/pmac.c | 44 +++- 1 file changed, 19 insertions(+), 25 deletions(-) Index: b/drivers/ide/ppc/pmac.c === --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c @@ -1086,38 +1086,34 @@ pmac_ide_macio_attach(struct macio_dev * { void __iomem *base; unsigned long regbase; - int irq; ide_hwif_t *hwif; pmac_ide_hwif_t *pmif; - int i, rc; + int irq, rc; hw_regs_t hw; pmif = (struct pmac_ide_hwif)kzalloc(sizeof(*pmif), GFP_KERNEL); if (pmif == NULL) return -ENOMEM; - i = 0; - while (i MAX_HWIFS (ide_hwifs[i].io_ports[IDE_DATA_OFFSET] != 0)) - ++i; - if (i = MAX_HWIFS) { + hwif = ide_find_port(); + if (hwif == NULL) { printk(KERN_ERR ide-pmac: MacIO interface attach with no slot\n); printk(KERN_ERR %s\n, mdev-ofdev.node-full_name); rc = -ENODEV; goto out_free_pmif; } - hwif = ide_hwifs[i]; - if (macio_resource_count(mdev) == 0) { - printk(KERN_WARNING ide%d: no address for %s\n, - i, mdev-ofdev.node-full_name); + printk(KERN_WARNING ide-pmac: no address for %s\n, + mdev-ofdev.node-full_name); rc = -ENXIO; goto out_free_pmif; } /* Request memory resource for IO ports */ if (macio_request_resource(mdev, 0, ide-pmac (ports))) { - printk(KERN_ERR ide%d: can't request mmio resource !\n, i); + printk(KERN_ERR ide-pmac: can't request MMIO resource for + %s!\n, mdev-ofdev.node-full_name); rc = -EBUSY; goto out_free_pmif; } @@ -1128,8 +1124,8 @@ pmac_ide_macio_attach(struct macio_dev * * where that happens though... */ if (macio_irq_count(mdev) == 0) { - printk(KERN_WARNING ide%d: no intrs for device %s, using 13\n, - i, mdev-ofdev.node-full_name); + printk(KERN_WARNING ide-pmac: no intrs for device %s, using + 13\n, mdev-ofdev.node-full_name); irq = irq_create_mapping(NULL, 13); } else irq = macio_irq(mdev, 0); @@ -1147,7 +1143,9 @@ pmac_ide_macio_attach(struct macio_dev * #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC if (macio_resource_count(mdev) = 2) { if (macio_request_resource(mdev, 1, ide-pmac (dma))) - printk(KERN_WARNING ide%d: can't request DMA resource !\n, i); + printk(KERN_WARNING ide-pmac: can't request DMA + resource for %s!\n, + mdev-ofdev.node-full_name); else pmif-dma_regs = ioremap(macio_resource_start(mdev, 1), 0x1000); } else @@ -1222,7 +1220,7 @@ pmac_ide_pci_attach(struct pci_dev *pdev pmac_ide_hwif_t *pmif; void __iomem *base; unsigned long rbase, rlen; - int i, rc; + int rc; hw_regs_t hw; np = pci_device_to_OF_node(pdev); @@ -1235,29 +1233,25 @@ pmac_ide_pci_attach(struct pci_dev *pdev if (pmif == NULL) return -ENOMEM; - i = 0; - while (i MAX_HWIFS (ide_hwifs[i].io_ports[IDE_DATA_OFFSET] != 0)) - ++i; - if (i = MAX_HWIFS) { + hwif = ide_find_port(); + if (hwif == NULL) { printk(KERN_ERR ide-pmac: PCI interface attach with no slot\n); printk(KERN_ERR %s\n, np-full_name); rc = -ENODEV; goto out_free_pmif; } - hwif = ide_hwifs[i]; - if (pci_enable_device(pdev)) { - printk(KERN_WARNING ide%i: Can't enable PCI device for %s\n, - i, np-full_name); + printk(KERN_WARNING ide-pmac: Can't enable PCI device for + %s\n, np-full_name); rc = -ENXIO; goto out_free_pmif; } pci_set_master(pdev); if (pci_request_regions(pdev, Kauai ATA)) { - printk(KERN_ERR ide%d: Cannot obtain PCI resources for %s\n, - i, np-full_name); + printk(KERN_ERR ide-pmac: Cannot obtain PCI resources for + %s\n, np-full_name); rc = -ENXIO; goto out_free_pmif; } - To unsubscribe from this list: send the line unsubscribe linux-ide in the body of a message to [EMAIL PROTECTED] More majordomo info at
[Bug 8036] hdc: lost interrupt using some compact flash as ide disk
http://bugzilla.kernel.org/show_bug.cgi?id=8036 [EMAIL PROTECTED] changed: What|Removed |Added AssignedTo|[EMAIL PROTECTED] |[EMAIL PROTECTED] --- Comment #8 from [EMAIL PROTECTED] 2008-02-16 10:38 --- Is this still a problem with 2.6.25-rc2? -- Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - 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
[Bug 7971] Kernel complains about hard drive error, but mhdd program says there's no problem with hard drive.
http://bugzilla.kernel.org/show_bug.cgi?id=7971 [EMAIL PROTECTED] changed: What|Removed |Added AssignedTo|[EMAIL PROTECTED] |[EMAIL PROTECTED] --- Comment #2 from [EMAIL PROTECTED] 2008-02-16 10:39 --- Is this still a problem with 2.6.25-rc2? -- Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - 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
[Bug 8988] via82cxxx: SATA DVD-RW Pioneer DVR-212BK with CX700, system hangs
http://bugzilla.kernel.org/show_bug.cgi?id=8988 [EMAIL PROTECTED] changed: What|Removed |Added AssignedTo|[EMAIL PROTECTED] |[EMAIL PROTECTED] Component|IDE |Serial ATA --- Comment #4 from [EMAIL PROTECTED] 2008-02-16 10:25 --- Is this still a problem with 2.6.25-rc2? -- Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - 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
[Bug 10004] New: Smartd causes HSM violations on ata_piix
http://bugzilla.kernel.org/show_bug.cgi?id=10004 Summary: Smartd causes HSM violations on ata_piix Product: IO/Storage Version: 2.5 KernelVersion: 2.6.24.1 Platform: All OS/Version: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: IDE AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Latest working kernel version: Earliest failing kernel version: Distribution: Gentoo Hardware Environment: IDE interface: Intel Corporation 82801DB (ICH4) IDE Controller (rev 02) Software Environment: smartmontools-5.36 Problem Description: When smartd starts and initializes device parameters, HSM violation errors are reported. The smartd is configured in the following way: /dev/sda -d ata -a -o on -R 194 -m root -M daily (the same parameters for sdb). When smartd starts, the following is reported to the syslog: Feb 16 21:39:01 fpfe smartd[10704]: smartd version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen Feb 16 21:39:01 fpfe smartd[10704]: Home page is http://smartmontools.sourceforge.net/ Feb 16 21:39:01 fpfe smartd[10704]: Opened configuration file /etc/smartd.conf Feb 16 21:39:01 fpfe smartd[10704]: Configuration file /etc/smartd.conf parsed. Feb 16 21:39:01 fpfe smartd[10704]: Device: /dev/sda, opened Feb 16 21:39:01 fpfe smartd[10704]: Device: /dev/sda, found in smartd database. Feb 16 21:39:02 fpfe ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen Feb 16 21:39:02 fpfe ata1.00: cmd b0/db:f8:00:4f:c2/00:00:00:00:00/00 tag 0 pio 126976 in Feb 16 21:39:02 fpfe res 50/00:f8:00:4f:c2/00:00:00:00:00/00 Emask 0x202 (HSM violation) Feb 16 21:39:02 fpfe ata1.00: status: { DRDY } Feb 16 21:39:02 fpfe ata1: soft resetting link Feb 16 21:39:02 fpfe ata1.00: configured for UDMA/100 Feb 16 21:39:02 fpfe ata1.01: configured for UDMA/100 Feb 16 21:39:02 fpfe ata1: EH complete Feb 16 21:39:02 fpfe ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen Feb 16 21:39:02 fpfe ata1.00: cmd b0/db:f8:00:4f:c2/00:00:00:00:00/00 tag 0 pio 126976 in Feb 16 21:39:02 fpfe res 50/00:f8:00:4f:c2/00:00:00:00:00/00 Emask 0x202 (HSM violation) Feb 16 21:39:02 fpfe ata1.00: status: { DRDY } Feb 16 21:39:02 fpfe ata1: soft resetting link Feb 16 21:39:02 fpfe ata1.00: configured for UDMA/100 Feb 16 21:39:02 fpfe ata1.01: configured for UDMA/100 Feb 16 21:39:02 fpfe ata1: EH complete Feb 16 21:39:02 fpfe ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen Feb 16 21:39:02 fpfe ata1.00: cmd b0/db:f8:00:4f:c2/00:00:00:00:00/00 tag 0 pio 126976 in Feb 16 21:39:02 fpfe res 50/00:f8:00:4f:c2/00:00:00:00:00/00 Emask 0x202 (HSM violation) Feb 16 21:39:02 fpfe ata1.00: status: { DRDY } Feb 16 21:39:02 fpfe ata1: soft resetting link Feb 16 21:39:02 fpfe ata1.00: configured for UDMA/100 Feb 16 21:39:02 fpfe ata1.01: configured for UDMA/100 Feb 16 21:39:02 fpfe ata1: EH complete Feb 16 21:39:02 fpfe ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen Feb 16 21:39:02 fpfe ata1.00: cmd b0/db:f8:00:4f:c2/00:00:00:00:00/00 tag 0 pio 126976 in Feb 16 21:39:02 fpfe res 50/00:f8:00:4f:c2/00:00:00:00:00/00 Emask 0x202 (HSM violation) Feb 16 21:39:02 fpfe ata1.00: status: { DRDY } Feb 16 21:39:02 fpfe ata1: soft resetting link Feb 16 21:39:02 fpfe ata1.00: configured for UDMA/100 Feb 16 21:39:02 fpfe ata1.01: configured for UDMA/100 Feb 16 21:39:02 fpfe ata1: EH complete Feb 16 21:39:02 fpfe ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen Feb 16 21:39:02 fpfe ata1.00: cmd b0/db:f8:00:4f:c2/00:00:00:00:00/00 tag 0 pio 126976 in Feb 16 21:39:02 fpfe res 50/00:f8:00:4f:c2/00:00:00:00:00/00 Emask 0x202 (HSM violation) Feb 16 21:39:02 fpfe ata1.00: status: { DRDY } Feb 16 21:39:02 fpfe ata1: soft resetting link Feb 16 21:39:03 fpfe ata1.00: configured for UDMA/100 Feb 16 21:39:03 fpfe ata1.01: configured for UDMA/100 Feb 16 21:39:03 fpfe ata1: EH complete Feb 16 21:39:03 fpfe ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen Feb 16 21:39:03 fpfe ata1.00: cmd b0/db:f8:00:4f:c2/00:00:00:00:00/00 tag 0 pio 126976 in Feb 16 21:39:03 fpfe res 50/00:f8:00:4f:c2/00:00:00:00:00/00 Emask 0x202 (HSM violation) Feb 16 21:39:03 fpfe ata1.00: status: { DRDY } Feb 16 21:39:03 fpfe ata1: soft resetting link Feb 16 21:39:03 fpfe ata1.00: configured for UDMA/100 Feb 16 21:39:03 fpfe ata1.01: configured for UDMA/100 Feb 16 21:39:03 fpfe ata1: EH complete Feb 16 21:39:03 fpfe sd 0:0:0:0: [sda] 117302879 512-byte hardware sectors (60059 MB) Feb 16 21:39:03 fpfe sd 0:0:0:0: [sda] Write Protect is off Feb 16 21:39:03 fpfe sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 Feb 16 21:39:03 fpfe sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA Feb 16 21:39:03 fpfe sd 0:0:1:0: [sdb] 488397168 512-byte hardware sectors (250059 MB) Feb 16 21:39:03 fpfe sd 0:0:1:0: [sdb] Write Protect is off Feb 16 21:39:03 fpfe sd
[Bug 4798] Error messages for hda when system is booting
http://bugzilla.kernel.org/show_bug.cgi?id=4798 [EMAIL PROTECTED] changed: What|Removed |Added AssignedTo|[EMAIL PROTECTED] |[EMAIL PROTECTED] --- Comment #7 from [EMAIL PROTECTED] 2008-02-16 10:55 --- Has this been fixed by some later kernels? -- Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - 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
[Bug 10004] Smartd causes HSM violations on ata_piix
http://bugzilla.kernel.org/show_bug.cgi?id=10004 [EMAIL PROTECTED] changed: What|Removed |Added AssignedTo|[EMAIL PROTECTED] |[EMAIL PROTECTED] Status|NEW |ASSIGNED --- Comment #1 from [EMAIL PROTECTED] 2008-02-16 11:09 --- this is libata problem - reassigning -- Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. You are the assignee for the bug, or are watching the assignee. - 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 1/2] ide-pmac: dynamically allocate struct pmac_ide_hwif instances
Dynamically allocate struct pmac_ide_hwif instances in pmac_ide_macio_attach() and pmac_ide_pci_attach(), then remove no longer needed pmac_ide[]. Cc: Benjamin Herrenschmidt [EMAIL PROTECTED] Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/ppc/pmac.c | 49 + 1 file changed, 33 insertions(+), 16 deletions(-) Index: b/drivers/ide/ppc/pmac.c === --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c @@ -79,8 +79,6 @@ typedef struct pmac_ide_hwif { } pmac_ide_hwif_t; -static pmac_ide_hwif_t pmac_ide[MAX_HWIFS]; - enum { controller_ohare, /* OHare based */ controller_heathrow,/* Heathrow/Paddington */ @@ -1094,29 +1092,34 @@ pmac_ide_macio_attach(struct macio_dev * int i, rc; hw_regs_t hw; + pmif = (struct pmac_ide_hwif)kzalloc(sizeof(*pmif), GFP_KERNEL); + if (pmif == NULL) + return -ENOMEM; + i = 0; - while (i MAX_HWIFS (ide_hwifs[i].io_ports[IDE_DATA_OFFSET] != 0 - || pmac_ide[i].node != NULL)) + while (i MAX_HWIFS (ide_hwifs[i].io_ports[IDE_DATA_OFFSET] != 0)) ++i; if (i = MAX_HWIFS) { printk(KERN_ERR ide-pmac: MacIO interface attach with no slot\n); printk(KERN_ERR %s\n, mdev-ofdev.node-full_name); - return -ENODEV; + rc = -ENODEV; + goto out_free_pmif; } - pmif = pmac_ide[i]; hwif = ide_hwifs[i]; if (macio_resource_count(mdev) == 0) { printk(KERN_WARNING ide%d: no address for %s\n, i, mdev-ofdev.node-full_name); - return -ENXIO; + rc = -ENXIO; + goto out_free_pmif; } /* Request memory resource for IO ports */ if (macio_request_resource(mdev, 0, ide-pmac (ports))) { printk(KERN_ERR ide%d: can't request mmio resource !\n, i); - return -EBUSY; + rc = -EBUSY; + goto out_free_pmif; } /* XXX This is bogus. Should be fixed in the registry by checking @@ -1166,11 +1169,15 @@ pmac_ide_macio_attach(struct macio_dev * iounmap(pmif-dma_regs); macio_release_resource(mdev, 1); } - memset(pmif, 0, sizeof(*pmif)); macio_release_resource(mdev, 0); + kfree(pmif); } return rc; + +out_free_pmif: + kfree(pmif); + return rc; } static int @@ -1223,30 +1230,36 @@ pmac_ide_pci_attach(struct pci_dev *pdev printk(KERN_ERR ide-pmac: cannot find MacIO node for Kauai ATA interface\n); return -ENODEV; } + + pmif = (struct pmac_ide_hwif)kzalloc(sizeof(*pmif), GFP_KERNEL); + if (pmif == NULL) + return -ENOMEM; + i = 0; - while (i MAX_HWIFS (ide_hwifs[i].io_ports[IDE_DATA_OFFSET] != 0 - || pmac_ide[i].node != NULL)) + while (i MAX_HWIFS (ide_hwifs[i].io_ports[IDE_DATA_OFFSET] != 0)) ++i; if (i = MAX_HWIFS) { printk(KERN_ERR ide-pmac: PCI interface attach with no slot\n); printk(KERN_ERR %s\n, np-full_name); - return -ENODEV; + rc = -ENODEV; + goto out_free_pmif; } - pmif = pmac_ide[i]; hwif = ide_hwifs[i]; if (pci_enable_device(pdev)) { printk(KERN_WARNING ide%i: Can't enable PCI device for %s\n, i, np-full_name); - return -ENXIO; + rc = -ENXIO; + goto out_free_pmif; } pci_set_master(pdev); if (pci_request_regions(pdev, Kauai ATA)) { printk(KERN_ERR ide%d: Cannot obtain PCI resources for %s\n, i, np-full_name); - return -ENXIO; + rc = -ENXIO; + goto out_free_pmif; } hwif-dev = pdev-dev; @@ -1276,11 +1289,15 @@ pmac_ide_pci_attach(struct pci_dev *pdev /* The inteface is released to the common IDE layer */ pci_set_drvdata(pdev, NULL); iounmap(base); - memset(pmif, 0, sizeof(*pmif)); pci_release_regions(pdev); + kfree(pmif); } return rc; + +out_free_pmif: + kfree(pmif); + return rc; } static int - 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
[Bug 6883] ide-probe.c attempts to use polling designed for ancient Seagate drives on some compact flash disks
http://bugzilla.kernel.org/show_bug.cgi?id=6883 [EMAIL PROTECTED] changed: What|Removed |Added AssignedTo|[EMAIL PROTECTED] |[EMAIL PROTECTED] --- Comment #1 from [EMAIL PROTECTED] 2008-02-16 10:46 --- Is this still a problem with recent kernels (2.6.24 or 2.6.25-rc2)? -- Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - 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
[Bug 7506] it821x: long wait time due to dma_timer_expiry
http://bugzilla.kernel.org/show_bug.cgi?id=7506 [EMAIL PROTECTED] changed: What|Removed |Added AssignedTo|[EMAIL PROTECTED] |[EMAIL PROTECTED] KernelVersion|2.6.19-rc3 |2.6.19-rc3 - 2.6.23-rc2 --- Comment #12 from [EMAIL PROTECTED] 2008-02-16 10:45 --- Martin, could you try 2.6.25-rc2? -- Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - 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
[Bug 6745] kernel hangs when trying to read atip wiith cdrecord
http://bugzilla.kernel.org/show_bug.cgi?id=6745 [EMAIL PROTECTED] changed: What|Removed |Added AssignedTo|[EMAIL PROTECTED] |[EMAIL PROTECTED] --- Comment #7 from [EMAIL PROTECTED] 2008-02-16 10:47 --- Is this still a problem with recent kernels? -- Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - 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
[Bug 7553] growisofs trapped in disk sleep mode, after finishing writing a DVD
http://bugzilla.kernel.org/show_bug.cgi?id=7553 [EMAIL PROTECTED] changed: What|Removed |Added AssignedTo|[EMAIL PROTECTED] |[EMAIL PROTECTED] --- Comment #8 from [EMAIL PROTECTED] 2008-02-16 10:43 --- Is this still a problem with recent kernels (2.6.24 or 2.6.25-rc2)? -- Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - 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
[Bug 9994] atiixp ide timeouts
http://bugzilla.kernel.org/show_bug.cgi?id=9994 --- Comment #1 from [EMAIL PROTECTED] 2008-02-16 10:21 --- Please try using git-bisect to narrow down the problem to the specific commit. Install git package, get git tree from kernel.org and do: git bisect start git bisect good 2.6.23 git bisect bad 2.6.24 It will select the kernel to test - compile and boot it to see if the problem is still there. If so do git bisect bad which will give you new kernel to test. If the kernel works fine do git bisect good instead. After few iterations you should find the exact commit which introduced the bug. Thanks. -- Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - 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: Optiarc DVD RW AD-5200A audio playing
On Sat, Feb 16, 2008 at 07:23:58PM +0100, Bartlomiej Zolnierkiewicz wrote: On Saturday 16 February 2008, Borislav Petkov wrote: On Sat, Feb 16, 2008 at 06:48:24PM +0100, Bartlomiej Zolnierkiewicz wrote: On Saturday 16 February 2008, Borislav Petkov wrote: On Sat, Feb 16, 2008 at 04:24:01PM +0100, Bartlomiej Zolnierkiewicz wrote: Hi, On Saturday 16 February 2008, Borislav Petkov wrote: On Fri, Feb 15, 2008 at 02:53:27PM -0500, Stefan Bader wrote: Hello Borislav, I worked on a problem with an DVD driver (model=Optiarc DVD RW AD-5200A) which obviously has the same problem as some Matshita drives. The following patch was reported to enabled audio playing on this drive. Would this approach be suitable for upstream or are there other solutions to this problem? Regards, Stefan --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -2988,7 +2988,8 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) if (strcmp(drive-id-model, MATSHITADVD-ROM SR-8187) == 0 || strcmp(drive-id-model, MATSHITADVD-ROM SR-8186) == 0 || strcmp(drive-id-model, MATSHITADVD-ROM SR-8176) == 0 || - strcmp(drive-id-model, MATSHITADVD-ROM SR-8174) == 0) + strcmp(drive-id-model, MATSHITADVD-ROM SR-8174) == 0 || + strcmp(drive-id-model, Optiarc DVD RW AD-5200A) == 0) CDROM_CONFIG_FLAGS(drive)-audio_play = 1; #if ! STANDARD_ATAPI Hi Stefan, just to make sure that the audioplay bit is not set in the capabilities page, can you please try the following patch applied against 2.6.25-rc2 and send me the output. Thanks! @Bart: by the way, this cdi-mask thingy is kinda unintuitive doing double negation to check whether a feature is supported or not. Yeah, this comes from above, i.e. uniform cdrom layer. But still, shouldn't we use a cdi-caps_flags or something similar instead, which mirrors the caps page bits setting? It seems so (at least having negative flags is very unintuitive) but they might be some reason for this ugliness, Jens? [ Please also remember that since cdrom layer is _uniform_ it may be not possible and/or desirable to have 1-1 mapping between caps page bits and the future cdi-caps_flags. ] commit 435f0f4496a1b32af2d542f43b2370a890fe2f83 Author: Borislav Petkov [EMAIL PROTECTED] Date: Sat Feb 16 09:56:36 2008 +0100 ide-cd: Enable audio play quirk for Optiarc DVD RW AD-5200A drive Reported-by: Stefan Bader [EMAIL PROTECTED] Signed-off-by: Borislav Petkov [EMAIL PROTECTED] diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index f77db6b..2c9d06e 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1750,6 +1750,10 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) cdi-mask = ~(CDC_DVD_RAM | CDC_RAM); if (buf[8 + 3] 0x10) cdi-mask = ~CDC_DVD_R; + if (!(buf[8 + 4] 0x01)) { Hmm, shouldn't there be ' (cd-cd_flags IDE_CD_FLAG_PLAY_AUDIO_OK)' to prevent false positives? I wanted to see whether the caps page reports the audioplay bit off... we still need IDE_CD_FLAG_PLAY_AUDIO_OK flag to be _set_ to enable the quirk + printk(KERN_INFO ide-cd: audio play not advertised in caps page, Would be nice to also printk() the device name. ... but printing the device model is actually a good idea and this will rule out false positives, so Stefan, please drop the previous patch and test the updated one below. Thanks. commit 6cc44b0ce5c9270b15d456eb9ffa91b855e4e0d0 Author: Borislav Petkov [EMAIL PROTECTED] Date: Sat Feb 16 09:56:36 2008 +0100 ide-cd: Enable audio play quirk for Optiarc DVD RW AD-5200A drive Reported-by: Stefan Bader [EMAIL PROTECTED] Signed-off-by: Borislav Petkov [EMAIL PROTECTED] diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index f77db6b..4c9984f 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1750,6 +1750,11 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) cdi-mask = ~(CDC_DVD_RAM | CDC_RAM); if (buf[8 + 3] 0x10) cdi-mask = ~CDC_DVD_R; + if (!(buf[8 + 4] 0x01)) { + printk(KERN_INFO ide-cd: audio play not advertised in caps + page for drive model [%s], enabling quirk.\n, + drive-id-model); if
Re: Optiarc DVD RW AD-5200A audio playing
On Saturday 16 February 2008, Borislav Petkov wrote: On Sat, Feb 16, 2008 at 07:23:58PM +0100, Bartlomiej Zolnierkiewicz wrote: On Saturday 16 February 2008, Borislav Petkov wrote: On Sat, Feb 16, 2008 at 06:48:24PM +0100, Bartlomiej Zolnierkiewicz wrote: On Saturday 16 February 2008, Borislav Petkov wrote: On Sat, Feb 16, 2008 at 04:24:01PM +0100, Bartlomiej Zolnierkiewicz wrote: Hi, On Saturday 16 February 2008, Borislav Petkov wrote: On Fri, Feb 15, 2008 at 02:53:27PM -0500, Stefan Bader wrote: Hello Borislav, I worked on a problem with an DVD driver (model=Optiarc DVD RW AD-5200A) which obviously has the same problem as some Matshita drives. The following patch was reported to enabled audio playing on this drive. Would this approach be suitable for upstream or are there other solutions to this problem? Regards, Stefan --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -2988,7 +2988,8 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) if (strcmp(drive-id-model, MATSHITADVD-ROM SR-8187) == 0 || strcmp(drive-id-model, MATSHITADVD-ROM SR-8186) == 0 || strcmp(drive-id-model, MATSHITADVD-ROM SR-8176) == 0 || - strcmp(drive-id-model, MATSHITADVD-ROM SR-8174) == 0) + strcmp(drive-id-model, MATSHITADVD-ROM SR-8174) == 0 || + strcmp(drive-id-model, Optiarc DVD RW AD-5200A) == 0) CDROM_CONFIG_FLAGS(drive)-audio_play = 1; #if ! STANDARD_ATAPI Hi Stefan, just to make sure that the audioplay bit is not set in the capabilities page, can you please try the following patch applied against 2.6.25-rc2 and send me the output. Thanks! @Bart: by the way, this cdi-mask thingy is kinda unintuitive doing double negation to check whether a feature is supported or not. Yeah, this comes from above, i.e. uniform cdrom layer. But still, shouldn't we use a cdi-caps_flags or something similar instead, which mirrors the caps page bits setting? It seems so (at least having negative flags is very unintuitive) but they might be some reason for this ugliness, Jens? [ Please also remember that since cdrom layer is _uniform_ it may be not possible and/or desirable to have 1-1 mapping between caps page bits and the future cdi-caps_flags. ] commit 435f0f4496a1b32af2d542f43b2370a890fe2f83 Author: Borislav Petkov [EMAIL PROTECTED] Date: Sat Feb 16 09:56:36 2008 +0100 ide-cd: Enable audio play quirk for Optiarc DVD RW AD-5200A drive Reported-by: Stefan Bader [EMAIL PROTECTED] Signed-off-by: Borislav Petkov [EMAIL PROTECTED] diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index f77db6b..2c9d06e 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1750,6 +1750,10 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) cdi-mask = ~(CDC_DVD_RAM | CDC_RAM); if (buf[8 + 3] 0x10) cdi-mask = ~CDC_DVD_R; + if (!(buf[8 + 4] 0x01)) { Hmm, shouldn't there be ' (cd-cd_flags IDE_CD_FLAG_PLAY_AUDIO_OK)' to prevent false positives? I wanted to see whether the caps page reports the audioplay bit off... we still need IDE_CD_FLAG_PLAY_AUDIO_OK flag to be _set_ to enable the quirk + printk(KERN_INFO ide-cd: audio play not advertised in caps page, Would be nice to also printk() the device name. ... but printing the device model is actually a good idea and this will rule out false positives, so Stefan, please drop the previous patch and test the updated one below. Thanks. commit 6cc44b0ce5c9270b15d456eb9ffa91b855e4e0d0 Author: Borislav Petkov [EMAIL PROTECTED] Date: Sat Feb 16 09:56:36 2008 +0100 ide-cd: Enable audio play quirk for Optiarc DVD RW AD-5200A drive Reported-by: Stefan Bader [EMAIL PROTECTED] Signed-off-by: Borislav Petkov [EMAIL PROTECTED] diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index f77db6b..4c9984f 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -1750,6 +1750,11 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) cdi-mask = ~(CDC_DVD_RAM | CDC_RAM); if (buf[8 + 3] 0x10) cdi-mask = ~CDC_DVD_R; + if
Re: IDE cdrom problem
Hi, Le samedi 16 février 2008 à 19:09 +0100, Borislav Petkov a écrit : On Sat, Feb 16, 2008 at 06:40:08PM +0100, Bartlomiej Zolnierkiewicz wrote: On Saturday 16 February 2008, Borislav Petkov wrote: On Sat, Feb 16, 2008 at 04:24:46PM +0100, Bartlomiej Zolnierkiewicz wrote: [ added Borislav (ide-cd maintainer) to cc: ] Hi, Unless there are some very important reasons to keep the discussion private please always cc: linux-ide@ and/or linux-kernel@ ML when reporting problems. Othewise your mail misses many knowledgeable people and is left on mercy of clueless IDE maintainer... ;-) As I mentioned, the reason why I wrote to you directly is i'm not on the linux-ide mailing list. Do you want me to try the 2.6.25-rc2 ? and give my feedback -- Forwarded Message -- Subject: IDE cdrom problem Date: Saturday 16 February 2008 From: WaVeR [EMAIL PROTECTED] To: [EMAIL PROTECTED] Hello Bart, Sorry to distrub you, but I have a similar problem like this post http://lkml.org/lkml/2008/2/12/97 I'm not subscribed to linux ML, so I decide to write you directly. From my dmesg, I get this error: Feb 16 08:01:58 Jupiter kernel: hdc: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 08:06:16 Jupiter kernel: hdc: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 08:10:45 Jupiter kernel: hdd: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 08:37:41 Jupiter kernel: hdd: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 08:42:10 Jupiter kernel: hdc: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 09:00:07 Jupiter kernel: hdd: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Yeah, this is kinda funny, i think i've seen that somewhere :) But seriously, Yep, this looks to be the identical problem as discussed recently: http://www.mail-archive.com/linux-ide@vger.kernel.org/msg16131.html [ + IIRC the similar issue might be already in the kernel bugzilla... ] can you try 2.6.25-rc2 - this one should be stable enough and it has the ide-cd rewrite in there and it would be interesting to see whether the new interrupt handler shows the same behaviour. Bart, since this starts to occur often, i'm thinking of adding a debugging macro similar to the ones we rewrote in ide-floppy and ide-tape besides the CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS facility in ide-cd. What are your thoughts on the matter? I would rather prefer to see more code removal/unification in ide-cd. Yep, this is underway. Am working on removing the ide-cd internal buffer and will get back to you after testing it... Ide floppy will have to wait. [ If the code is simple/clean enough and have informative printk()-s for error conditions there shouldn't be a frequent need for an extra debugging information. ] As you can see on the atached file. It's a simple IDE dvdrom and a cd burner. I dont have this problem with the kernel 2.6.21.3 My actual kernel is: 9:28 [EMAIL PROTECTED] ~% uname -a Linux Jupiter 2.6.24.2-waver.1 #1 Wed Feb 13 23:53:31 CET 2008 i686 GNU/Linux It would also help us if it can be narrowed down to the specific commit. Please install git package, get kernel git tree from kernel.org, and do: git bisect start git bisect good 2.6.21 git bisect bad 2.6.24 What would decrease the number of bisection iterations would be specifying the path for bisection, like so: git bisect start -- drivers/ide and then we'll nail down the evildoer significantly faster, imho. It will select the kernel to test - compile and boot it to see if the problem is still there. If so do git bisect bad which will give you new kernel to test. If the kernel works fine do git bisect good instead. After few iterations you should find the exact commit which introduced the bug. Thanks, Bart - 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
[Bug 3072] ATAPI Zip drive doesn't work properly
http://bugzilla.kernel.org/show_bug.cgi?id=3072 [EMAIL PROTECTED] changed: What|Removed |Added AssignedTo|[EMAIL PROTECTED] |[EMAIL PROTECTED] KernelVersion|2.6.7 et seq. |2.6.7 et seq. - 2.6.21.5-smp --- Comment #7 from [EMAIL PROTECTED] 2008-02-16 11:20 --- Is this still a problem with recent kernels? -- Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - 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
[Bug 8988] via82cxxx: SATA DVD-RW Pioneer DVR-212BK with CX700, system hangs
http://bugzilla.kernel.org/show_bug.cgi?id=8988 --- Comment #6 from [EMAIL PROTECTED] 2008-02-16 11:53 --- Could you please try to bisect it? Install git, get kernel git tree from kernel.org, and do: git bisect start git bisect good 2.6.22 git bisect bad 2.6.24 It will select the kernel to test - compile and boot it to see if the problem is still there. If so do git bisect bad which will give you new kernel to test. If the kernel works fine do git bisect good instead. After few iterations you should find the exact commit which introduced the bug. -- Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - 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 6/9] umc8672: don't use ide_hwifs[] in umc_set_pio_mode()
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/legacy/umc8672.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: b/drivers/ide/legacy/umc8672.c === --- a/drivers/ide/legacy/umc8672.c +++ b/drivers/ide/legacy/umc8672.c @@ -105,13 +105,13 @@ static void umc_set_speeds (u8 speeds[]) static void umc_set_pio_mode(ide_drive_t *drive, const u8 pio) { + ide_hwif_t *hwif = drive-hwif; unsigned long flags; - ide_hwgroup_t *hwgroup = ide_hwifs[HWIF(drive)-index^1].hwgroup; printk(%s: setting umc8672 to PIO mode%d (speed %d)\n, drive-name, pio, pio_to_umc[pio]); spin_lock_irqsave(ide_lock, flags); - if (hwgroup hwgroup-handler != NULL) { + if (hwif-mate hwif-mate-hwgroup-handler) { printk(KERN_ERR umc8672: other interface is busy: exiting tune_umc()\n); } else { current_speeds[drive-name[2] - 'a'] = pio_to_umc[pio]; - 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 5/9] scc_pata: store 'hwif' pointer in struct scc_ports
Replace 'unsigned char hwif_id' by 'ide_hwif_t *hwif' in struct scc_ports. This allows us to remove ide_hwifs[] usage from scc_remove(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/pci/scc_pata.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: b/drivers/ide/pci/scc_pata.c === --- a/drivers/ide/pci/scc_pata.c +++ b/drivers/ide/pci/scc_pata.c @@ -65,7 +65,7 @@ static struct scc_ports { unsigned long ctl, dma; - unsigned char hwif_id; /* for removing hwif from system */ + ide_hwif_t *hwif; /* for removing port from system */ } scc_ports[MAX_HWIFS]; /* PIO transfer mode table */ @@ -664,7 +664,7 @@ static void __devinit init_hwif_scc(ide_ { struct scc_ports *ports = ide_get_hwifdata(hwif); - ports-hwif_id = hwif-index; + ports-hwif = hwif; hwif-dma_command = hwif-dma_base; hwif-dma_status = hwif-dma_base + 0x04; @@ -726,7 +726,7 @@ static int __devinit scc_init_one(struct static void __devexit scc_remove(struct pci_dev *dev) { struct scc_ports *ports = pci_get_drvdata(dev); - ide_hwif_t *hwif = ide_hwifs[ports-hwif_id]; + ide_hwif_t *hwif = ports-hwif; unsigned long ctl_base = pci_resource_start(dev, 0); unsigned long dma_base = pci_resource_start(dev, 1); unsigned long ctl_size = pci_resource_len(dev, 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 4/9] cmd640: use ide_find_port()
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/pci/cmd640.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) Index: b/drivers/ide/pci/cmd640.c === --- a/drivers/ide/pci/cmd640.c +++ b/drivers/ide/pci/cmd640.c @@ -744,20 +744,21 @@ static int __init cmd640x_init(void) printk(KERN_INFO cmd640: buggy cmd640%c interface on %s, config=0x%02x \n, 'a' + cmd640_chip_version - 1, bus_type, cfr); - cmd_hwif0 = ide_hwifs[0]; - cmd_hwif1 = ide_hwifs[1]; + cmd_hwif0 = ide_find_port(); /* * Initialize data for primary port */ - oldnoprobe = cmd_hwif0-noprobe; - ide_init_port_hw(cmd_hwif0, hw[0]); - cmd_hwif0-noprobe = oldnoprobe; + if (cmd_hwif0) { + oldnoprobe = cmd_hwif0-noprobe; + ide_init_port_hw(cmd_hwif0, hw[0]); + cmd_hwif0-noprobe = oldnoprobe; #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED - cmd_hwif0-set_pio_mode = cmd640_set_pio_mode; + cmd_hwif0-set_pio_mode = cmd640_set_pio_mode; #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ - idx[0] = cmd_hwif0-index; + idx[0] = cmd_hwif0-index; + } /* * Ensure compatibility by always using the slowest timings @@ -772,7 +773,7 @@ static int __init cmd640x_init(void) /* * Try to enable the secondary interface, if not already enabled */ - if (cmd_hwif1-noprobe) { + if (cmd_hwif1 cmd_hwif1-noprobe) { port2 = not probed; } else { b = get_cmd640_reg(CNTRL); @@ -803,7 +804,7 @@ static int __init cmd640x_init(void) /* * Initialize data for secondary cmd640 port, if enabled */ - if (second_port_cmd640) { + if (second_port_cmd640 cmd_hwif1) { oldnoprobe = cmd_hwif1-noprobe; ide_init_port_hw(cmd_hwif1, hw[1]); cmd_hwif1-noprobe = oldnoprobe; @@ -813,7 +814,7 @@ static int __init cmd640x_init(void) idx[1] = cmd_hwif1-index; } - printk(KERN_INFO %s: %sserialized, secondary interface %s\n, cmd_hwif1-name, + printk(KERN_INFO cmd640: %sserialized, secondary interface %s\n, second_port_cmd640 ? : not , port2); /* @@ -823,10 +824,15 @@ static int __init cmd640x_init(void) for (index = 0; index (2 + (second_port_cmd640 1)); index++) { ide_drive_t *drive; - if (index 1) + if (index 1) { + if (cmd_hwif1 == NULL) + continue; drive = cmd_hwif1-drives[index 1]; - else + } else { + if (cmd_hwif0 == NULL) + continue; drive = cmd_hwif0-drives[index 1]; + } #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED if (drive-autotune || ((index 1) second_port_toggled)) { - 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 8/9] qd65xx: return error value in qd_probe()
Return error value in qd_probe() and use it in qd65xx_init() instead of checking ide_hwifs[].chipset. Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/legacy/qd65xx.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) Index: b/drivers/ide/legacy/qd65xx.c === --- a/drivers/ide/legacy/qd65xx.c +++ b/drivers/ide/legacy/qd65xx.c @@ -396,7 +396,7 @@ static int __init qd_probe(int base) config = inb(QD_CONFIG_PORT); if (! ((config QD_CONFIG_BASEPORT) 1 == (base == 0xb0)) ) - return 1; + return -ENODEV; unit = ! (config QD_CONFIG_IDE_BASEPORT); @@ -410,7 +410,8 @@ static int __init qd_probe(int base) if ((config 0xf0) == QD_CONFIG_QD6500) { - if (qd_testreg(base)) return 1; /* bad register */ + if (qd_testreg(base)) +return -ENODEV;/* bad register */ /* qd6500 found */ @@ -421,7 +422,7 @@ static int __init qd_probe(int base) if (config QD_CONFIG_DISABLED) { printk(KERN_WARNING qd6500 is disabled !\n); - return 1; + return -ENODEV; } ide_init_port_hw(hwif, hw[unit]); @@ -443,8 +444,8 @@ static int __init qd_probe(int base) u8 control; - if (qd_testreg(base) || qd_testreg(base+0x02)) return 1; - /* bad registers */ + if (qd_testreg(base) || qd_testreg(base + 0x02)) + return -ENODEV; /* bad registers */ /* qd6580 found */ @@ -508,7 +509,7 @@ static int __init qd_probe(int base) } } /* no qd65xx found */ - return 1; + return -ENODEV; } int probe_qd65xx = 0; @@ -518,14 +519,18 @@ MODULE_PARM_DESC(probe, probe for QD65x static int __init qd65xx_init(void) { + int rc1, rc2 = -ENODEV; + if (probe_qd65xx == 0) return -ENODEV; - if (qd_probe(0x30)) - qd_probe(0xb0); - if (ide_hwifs[0].chipset != ide_qd65xx - ide_hwifs[1].chipset != ide_qd65xx) + rc1 = qd_probe(0x30); + if (rc1) + rc2 = qd_probe(0xb0); + + if (rc1 0 rc2 0) return -ENODEV; + return 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 7/9] ht6560b: use driver name for resource allocation
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/legacy/ht6560b.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: b/drivers/ide/legacy/ht6560b.c === --- a/drivers/ide/legacy/ht6560b.c +++ b/drivers/ide/legacy/ht6560b.c @@ -32,6 +32,7 @@ * Try: http://www.maf.iki.fi/~maf/ht6560b/ */ +#define DRV_NAME ht6560b #define HT6560B_VERSION v0.07 #include linux/module.h @@ -339,7 +340,7 @@ static int __init ht6560b_init(void) hwif = ide_hwifs[0]; mate = ide_hwifs[1]; - if (!request_region(HT_CONFIG_PORT, 1, hwif-name)) { + if (!request_region(HT_CONFIG_PORT, 1, DRV_NAME)) { printk(KERN_NOTICE %s: HT_CONFIG_PORT not found\n, __FUNCTION__); return -ENODEV; - 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
[Bug 5911] siimage.c interrupts screaming
http://bugzilla.kernel.org/show_bug.cgi?id=5911 --- Comment #13 from [EMAIL PROTECTED] 2008-02-16 11:44 --- Care to try 2.6.25-rc2 (it has IDE patches that were previously in -mm). -- Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - 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
[Bug 8988] via82cxxx: SATA DVD-RW Pioneer DVR-212BK with CX700, system hangs
http://bugzilla.kernel.org/show_bug.cgi?id=8988 [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Comment #5 from [EMAIL PROTECTED] 2008-02-16 11:47 --- I have the similar problem with kernel 2.6.24.1 and IDE cd/dvd-rom (the system doesn't have SATA controller at all). IDE controller is intel ICH4. During kernel boot, the following messages appear: Feb 16 20:04:45 fpfe Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2 Feb 16 20:04:45 fpfe ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx Feb 16 20:04:45 fpfe ICH4: IDE controller (0x8086:0x24cb rev 0x02) at PCI slot :00:1f.1 Feb 16 20:04:45 fpfe ACPI: PCI Interrupt :00:1f.1[A] - GSI 18 (level, low) - IRQ 16 Feb 16 20:04:45 fpfe ICH4: not 100% native mode: will probe irqs later Feb 16 20:04:45 fpfe ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:DMA Feb 16 20:04:45 fpfe ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:DMA, hdd:pio Feb 16 20:04:45 fpfe Probing IDE interface ide0... Feb 16 20:04:45 fpfe hdb: Hitachi HDT725025VLAT80, ATA DISK drive Feb 16 20:04:45 fpfe hda: SAMSUNG SP0612N, ATA DISK drive Feb 16 20:04:45 fpfe hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4 Feb 16 20:04:45 fpfe hda: UDMA/100 mode selected Feb 16 20:04:45 fpfe hdb: host max PIO4 wanted PIO255(auto-tune) selected PIO4 Feb 16 20:04:45 fpfe hdb: UDMA/100 mode selected Feb 16 20:04:45 fpfe ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 Feb 16 20:04:45 fpfe Probing IDE interface ide1... Feb 16 20:04:45 fpfe hdc: BENQ DVD DD DW1640, ATAPI CD/DVD-ROM drive Feb 16 20:04:45 fpfe hdc: host max PIO4 wanted PIO255(auto-tune) selected PIO4 Feb 16 20:04:45 fpfe hdc: UDMA/33 mode selected Feb 16 20:04:45 fpfe ide1 at 0x170-0x177,0x376 on irq 15 === the system waits here for several seconds Feb 16 20:04:45 fpfe hdc: lost interrupt Feb 16 20:04:45 fpfe hdc: task_in_intr: status=0x59 { DriveReady SeekComplete DataRequest Error } Feb 16 20:04:45 fpfe hdc: task_in_intr: error=0x00 { } Feb 16 20:04:45 fpfe ide: failed opcode was: 0xa1 Feb 16 20:04:45 fpfe hda: max request size: 512KiB Later, when cdrom module is loaded, the following errors are reported: Feb 16 20:04:45 fpfe hdc: status error: status=0x59 { DriveReady SeekComplete DataRequest Error } Feb 16 20:04:45 fpfe hdc: status error: error=0x00 { } Feb 16 20:04:45 fpfe ide: failed opcode was: unknown Feb 16 20:04:45 fpfe hdc: drive not ready for command Feb 16 20:04:45 fpfe hdc: ATAPI CD-ROM drive, 0kB Cache Feb 16 20:04:45 fpfe Uniform CD-ROM driver Revision: 3.20 Feb 16 20:04:45 fpfe hdc: status error: status=0x59 { DriveReady SeekComplete DataRequest Error } Feb 16 20:04:45 fpfe hdc: status error: error=0x00 { } Feb 16 20:04:45 fpfe ide: failed opcode was: unknown Feb 16 20:04:45 fpfe hdc: drive not ready for command The drive becomes locked (i. e. it doesn't eject when you press eject button or execute 'eject' command). The libata driver works with dvd without noticeable problems. Kernel 2.6.22 works, too. -- Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - 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 1/9] sgiioc4: use ide_find_port()
There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/pci/sgiioc4.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) Index: b/drivers/ide/pci/sgiioc4.c === --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c @@ -591,20 +591,12 @@ sgiioc4_ide_setup_pci_device(struct pci_ unsigned long bar0, cmd_phys_base, ctl; void __iomem *virt_base; ide_hwif_t *hwif; - int h; u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; hw_regs_t hw; struct ide_port_info d = sgiioc4_port_info; - /* -* Find an empty HWIF; if none available, return -ENOMEM. -*/ - for (h = 0; h MAX_HWIFS; ++h) { - hwif = ide_hwifs[h]; - if (hwif-chipset == ide_unknown) - break; - } - if (h == MAX_HWIFS) { + hwif = ide_find_port(); + if (hwif == NULL) { printk(KERN_ERR %s: too many IDE interfaces, no room in table\n, DRV_NAME); return -ENOMEM; - 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 9/9] ide: IDE_HFLAG_BOOTABLE - IDE_HFLAG_NON_BOOTABLE
bootable should be the default behavior so replace IDE_HFLAG_BOOTABLE host flag with IDE_HFLAG_NON_BOOTABLE. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/pci/aec62xx.c |3 ++- drivers/ide/pci/alim15x3.c|1 - drivers/ide/pci/amd74xx.c |3 +-- drivers/ide/pci/atiixp.c |5 ++--- drivers/ide/pci/cmd64x.c |9 - drivers/ide/pci/cs5520.c |3 +-- drivers/ide/pci/cs5530.c |3 +-- drivers/ide/pci/cs5535.c |2 +- drivers/ide/pci/cy82c693.c|3 +-- drivers/ide/pci/generic.c |6 ++ drivers/ide/pci/hpt34x.c |2 +- drivers/ide/pci/hpt366.c |2 +- drivers/ide/pci/it8213.c |3 +-- drivers/ide/pci/it821x.c |1 - drivers/ide/pci/jmicron.c |1 - drivers/ide/pci/ns87415.c |3 +-- drivers/ide/pci/opti621.c |6 ++ drivers/ide/pci/piix.c|4 ++-- drivers/ide/pci/rz1000.c |2 +- drivers/ide/pci/sc1200.c |3 +-- drivers/ide/pci/scc_pata.c|3 +-- drivers/ide/pci/serverworks.c |5 ++--- drivers/ide/pci/siimage.c |1 - drivers/ide/pci/sis5513.c |3 +-- drivers/ide/pci/sl82c105.c|3 +-- drivers/ide/pci/slc90e66.c|2 +- drivers/ide/pci/triflex.c |1 - drivers/ide/pci/trm290.c |1 - drivers/ide/pci/via82cxxx.c |3 +-- drivers/ide/setup-pci.c |2 +- include/linux/ide.h |8 31 files changed, 37 insertions(+), 60 deletions(-) Index: b/drivers/ide/pci/aec62xx.c === --- a/drivers/ide/pci/aec62xx.c +++ b/drivers/ide/pci/aec62xx.c @@ -220,7 +220,8 @@ static const struct ide_port_info aec62x .init_hwif = init_hwif_aec62xx, .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, .host_flags = IDE_HFLAG_NO_ATAPI_DMA | - IDE_HFLAG_ABUSE_SET_DMA_MODE, + IDE_HFLAG_ABUSE_SET_DMA_MODE | + IDE_HFLAG_NON_BOOTABLE, .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA4, Index: b/drivers/ide/pci/alim15x3.c === --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c @@ -750,7 +750,6 @@ static const struct ide_port_info ali15x .init_chipset = init_chipset_ali15x3, .init_hwif = init_hwif_ali15x3, .init_dma = init_dma_ali15x3, - .host_flags = IDE_HFLAG_BOOTABLE, .pio_mask = ATA_PIO5, .swdma_mask = ATA_SWDMA2, .mwdma_mask = ATA_MWDMA2, Index: b/drivers/ide/pci/amd74xx.c === --- a/drivers/ide/pci/amd74xx.c +++ b/drivers/ide/pci/amd74xx.c @@ -223,8 +223,7 @@ static void __devinit init_hwif_amd74xx( IDE_HFLAG_ABUSE_SET_DMA_MODE | \ IDE_HFLAG_POST_SET_MODE | \ IDE_HFLAG_IO_32BIT | \ -IDE_HFLAG_UNMASK_IRQS | \ -IDE_HFLAG_BOOTABLE) +IDE_HFLAG_UNMASK_IRQS) #define DECLARE_AMD_DEV(name_str, swdma, udma) \ { \ Index: b/drivers/ide/pci/atiixp.c === --- a/drivers/ide/pci/atiixp.c +++ b/drivers/ide/pci/atiixp.c @@ -151,7 +151,7 @@ static const struct ide_port_info atiixp .name = ATIIXP, .init_hwif = init_hwif_atiixp, .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}}, - .host_flags = IDE_HFLAG_LEGACY_IRQS | IDE_HFLAG_BOOTABLE, + .host_flags = IDE_HFLAG_LEGACY_IRQS, .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA5, @@ -159,8 +159,7 @@ static const struct ide_port_info atiixp .name = SB600_PATA, .init_hwif = init_hwif_atiixp, .enablebits = {{0x48,0x01,0x00}, {0x00,0x00,0x00}}, - .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_LEGACY_IRQS | - IDE_HFLAG_BOOTABLE, + .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_LEGACY_IRQS, .pio_mask = ATA_PIO4, .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA5, Index: b/drivers/ide/pci/cmd64x.c === --- a/drivers/ide/pci/cmd64x.c +++ b/drivers/ide/pci/cmd64x.c @@ -440,8 +440,7 @@ static const struct ide_port_info cmd64x .init_hwif = init_hwif_cmd64x, .enablebits =
[PATCH 2/9] au1xxx-ide: use ide_find_port()
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/mips/au1xxx-ide.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) Index: b/drivers/ide/mips/au1xxx-ide.c === --- a/drivers/ide/mips/au1xxx-ide.c +++ b/drivers/ide/mips/au1xxx-ide.c @@ -603,9 +603,11 @@ static int au_ide_probe(struct device *d goto out; } - /* FIXME: This might possibly break PCMCIA IDE devices */ - - hwif= ide_hwifs[pdev-id]; + hwif = ide_find_port(); + if (hwif == NULL) { + ret = -ENOENT; + goto out; + } memset(hw, 0, sizeof(hw)); auide_setup_ports(hw, ahwif); - 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: IDE cdrom problem
On Sat, Feb 16, 2008 at 08:27:21PM +0100, WaVeR wrote: Hi, Le samedi 16 février 2008 à 19:09 +0100, Borislav Petkov a écrit : On Sat, Feb 16, 2008 at 06:40:08PM +0100, Bartlomiej Zolnierkiewicz wrote: On Saturday 16 February 2008, Borislav Petkov wrote: On Sat, Feb 16, 2008 at 04:24:46PM +0100, Bartlomiej Zolnierkiewicz wrote: [ added Borislav (ide-cd maintainer) to cc: ] Hi, Unless there are some very important reasons to keep the discussion private please always cc: linux-ide@ and/or linux-kernel@ ML when reporting problems. Othewise your mail misses many knowledgeable people and is left on mercy of clueless IDE maintainer... ;-) As I mentioned, the reason why I wrote to you directly is i'm not on the linux-ide mailing list. That doesn't matter. What Bart ment is that if you cc the mailing list, more people are going to see your bug report and the chance of the bug getting fixed is bigger. Do you want me to try the 2.6.25-rc2 ? and give my feedback Yes, please. -- Forwarded Message -- Subject: IDE cdrom problem Date: Saturday 16 February 2008 From: WaVeR [EMAIL PROTECTED] To: [EMAIL PROTECTED] Hello Bart, Sorry to distrub you, but I have a similar problem like this post http://lkml.org/lkml/2008/2/12/97 I'm not subscribed to linux ML, so I decide to write you directly. From my dmesg, I get this error: Feb 16 08:01:58 Jupiter kernel: hdc: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 08:06:16 Jupiter kernel: hdc: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 08:10:45 Jupiter kernel: hdd: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 08:37:41 Jupiter kernel: hdd: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 08:42:10 Jupiter kernel: hdc: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Feb 16 09:00:07 Jupiter kernel: hdd: cdrom_pc_intr: The drive appears confused (ireason = 0x01). Trying to recover by ending request. Yeah, this is kinda funny, i think i've seen that somewhere :) But seriously, Yep, this looks to be the identical problem as discussed recently: http://www.mail-archive.com/linux-ide@vger.kernel.org/msg16131.html [ + IIRC the similar issue might be already in the kernel bugzilla... ] can you try 2.6.25-rc2 - this one should be stable enough and it has the ide-cd rewrite in there and it would be interesting to see whether the new interrupt handler shows the same behaviour. Bart, since this starts to occur often, i'm thinking of adding a debugging macro similar to the ones we rewrote in ide-floppy and ide-tape besides the CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS facility in ide-cd. What are your thoughts on the matter? I would rather prefer to see more code removal/unification in ide-cd. Yep, this is underway. Am working on removing the ide-cd internal buffer and will get back to you after testing it... Ide floppy will have to wait. [ If the code is simple/clean enough and have informative printk()-s for error conditions there shouldn't be a frequent need for an extra debugging information. ] As you can see on the atached file. It's a simple IDE dvdrom and a cd burner. I dont have this problem with the kernel 2.6.21.3 My actual kernel is: 9:28 [EMAIL PROTECTED] ~% uname -a Linux Jupiter 2.6.24.2-waver.1 #1 Wed Feb 13 23:53:31 CET 2008 i686 GNU/Linux It would also help us if it can be narrowed down to the specific commit. Please install git package, get kernel git tree from kernel.org, and do: git bisect start git bisect good 2.6.21 git bisect bad 2.6.24 What would decrease the number of bisection iterations would be specifying the path for bisection, like so: git bisect start -- drivers/ide and then we'll nail down the evildoer significantly faster, imho. It will select the kernel to test - compile and boot it to see if the problem is still there. If so do git bisect bad which will give you new kernel to test. If the kernel works fine do git bisect good instead. After few iterations you should find the exact commit which introduced the bug. Thanks, Bart -- Regards/Gruß, Boris. - 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 3/9] cmd640: remove cmd_drives[]
* Pass 'ide_drive_t *drive' to check_prefetch(), set_prefetch_mode(), program_drive_counts() and cmd640_set_mode(). * Remove no longer needed cmd_drives[]. * Inline setup_device_ptrs() helper in cmd640x_init(). Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] --- drivers/ide/pci/cmd640.c | 67 ++- 1 file changed, 27 insertions(+), 40 deletions(-) Index: b/drivers/ide/pci/cmd640.c === --- a/drivers/ide/pci/cmd640.c +++ b/drivers/ide/pci/cmd640.c @@ -185,7 +185,6 @@ static DEFINE_SPINLOCK(cmd640_lock); * These are initialized to point at the devices we control */ static ide_hwif_t *cmd_hwif0, *cmd_hwif1; -static ide_drive_t *cmd_drives[4]; /* * Interface to access cmd640x registers @@ -386,9 +385,8 @@ static void cmd640_dump_regs (void) * Check whether prefetch is on for a drive, * and initialize the unmask flags for safe operation. */ -static void __init check_prefetch (unsigned int index) +static void __init check_prefetch(ide_drive_t *drive, unsigned int index) { - ide_drive_t *drive = cmd_drives[index]; u8 b = get_cmd640_reg(prefetch_regs[index]); if (b prefetch_masks[index]) {/* is prefetch off? */ @@ -404,28 +402,13 @@ static void __init check_prefetch (unsig } } -/* - * Figure out which devices we control - */ -static void __init setup_device_ptrs (void) -{ - cmd_hwif0 = ide_hwifs[0]; - cmd_hwif1 = ide_hwifs[1]; - - cmd_drives[0] = cmd_hwif0-drives[0]; - cmd_drives[1] = cmd_hwif0-drives[1]; - cmd_drives[2] = cmd_hwif1-drives[0]; - cmd_drives[3] = cmd_hwif1-drives[1]; -} - #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED /* * Sets prefetch mode for a drive. */ -static void set_prefetch_mode (unsigned int index, int mode) +static void set_prefetch_mode(ide_drive_t *drive, unsigned int index, int mode) { - ide_drive_t *drive = cmd_drives[index]; unsigned long flags; int reg = prefetch_regs[index]; u8 b; @@ -508,7 +491,7 @@ static void __init retrieve_drive_counts * This routine writes the prepared setup/active/recovery counts * for a drive into the cmd640 chipset registers to active them. */ -static void program_drive_counts (unsigned int index) +static void program_drive_counts(ide_drive_t *drive, unsigned int index) { unsigned long flags; u8 setup_count= setup_counts[index]; @@ -522,8 +505,11 @@ static void program_drive_counts (unsign * so we merge the timings, using the slowest value for each timing. */ if (index 1) { - unsigned int mate; - if (cmd_drives[mate = index ^ 1]-present) { + ide_hwif_t *hwif = drive-hwif; + ide_drive_t *peer = hwif-drives[!drive-select.b.unit]; + unsigned int mate = index ^ 1; + + if (peer-present) { if (setup_count setup_counts[mate]) setup_count = setup_counts[mate]; if (active_count active_counts[mate]) @@ -562,7 +548,8 @@ static void program_drive_counts (unsign /* * Set a specific pio_mode for a drive */ -static void cmd640_set_mode (unsigned int index, u8 pio_mode, unsigned int cycle_time) +static void cmd640_set_mode(ide_drive_t *drive, unsigned int index, + u8 pio_mode, unsigned int cycle_time) { int setup_time, active_time, recovery_time, clock_time; u8 setup_count, active_count, recovery_count, recovery_count2, cycle_count; @@ -611,7 +598,7 @@ static void cmd640_set_mode (unsigned in * 1) this is the wrong place to do it (proper is do_special() in ide.c) * 2) in practice this is rarely, if ever, necessary */ - program_drive_counts (index); + program_drive_counts(drive, index); } static void cmd640_set_pio_mode(ide_drive_t *drive, const u8 pio) @@ -619,13 +606,6 @@ static void cmd640_set_pio_mode(ide_driv unsigned int index = 0, cycle_time; u8 b; - while (drive != cmd_drives[index]) { - if (++index 3) { - printk(KERN_ERR %s: bad news in %s\n, - drive-name, __FUNCTION__); - return; - } - } switch (pio) { case 6: /* set fast-devsel off */ case 7: /* set fast-devsel on */ @@ -638,13 +618,13 @@ static void cmd640_set_pio_mode(ide_driv case 8: /* set prefetch off */ case 9: /* set prefetch on */ - set_prefetch_mode(index, pio 1); + set_prefetch_mode(drive, index, pio 1); printk(%s: %sabled cmd640 prefetch\n, drive-name, (pio 1) ? en : dis); return; } cycle_time =
[Bug 3072] ATAPI Zip drive doesn't work properly
http://bugzilla.kernel.org/show_bug.cgi?id=3072 --- Comment #8 from [EMAIL PROTECTED] 2008-02-16 16:32 --- Yes Reconfirmed with 2.6.24.2 mainline. -- Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - 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: pci_get_device_reverse(), why does Calgary need this?
On Fri, Feb 15, 2008 at 10:28:22AM -0800, Greg KH wrote: That would be nice. Muli, want to make a patch for this? Sure, I'll put something together. Cheers, Muli - 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