[KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB - Kernel

This is a discussion on [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB - Kernel ; On Fri, 30 May 2008 13:57:28 +0200 Kristoffer Ericson wrote: > > > pcmcia: registering new device pcmcia1.0 > > ... > > > pcmcia: registering new device pcmcia1.1 > > > 1.1: GetNextTuple: No more items > > > ...

+ Reply to Thread
Results 1 to 18 of 18

Thread: [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB

  1. [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB

    On Fri, 30 May 2008 13:57:28 +0200
    Kristoffer Ericson wrote:


    > > > pcmcia: registering new device pcmcia1.0

    > > ...
    > > > pcmcia: registering new device pcmcia1.1
    > > > 1.1: GetNextTuple: No more items
    > > > pata_pcmcia: probe of 1.1 failed with error -12


    This problem is introduced at kernel 2.6.26-rc4.

    The kernel 2.6.26-rc3 does not have this problem.


    Best Regards
    Komuro


    >
    > > Hi,
    > >
    > > > Ive added the id123 strings for a Sandisk Extreme III 8GB.
    > > > I get this when using pcmcia->CF adapter.

    > >
    > > > pcmcia: registering new device pcmcia1.0

    > > ...
    > > > pcmcia: registering new device pcmcia1.1
    > > > 1.1: GetNextTuple: No more items
    > > > pata_pcmcia: probe of 1.1 failed with error -12

    > >
    > > Is that a multifunction device? It seems to me that something is broken in
    > > the device CIS, for both drives seem to be exported already by device
    > > pcmcia1.0.

    >
    > Its a simply pcmcia->CF adapter and the CF card is a simple storage one. I got it to work through USB-adapter after replacing my
    > broken one.
    > However it still doesnt work through the pcmcia->CF adapter.
    >
    > Im not ruling out that its broken though.
    >
    > >
    > > Best,
    > > Dominik

    >
    >
    > --
    > Kristoffer Ericson
    >
    > _______________________________________________
    > Linux PCMCIA reimplementation list
    > http://lists.infradead.org/mailman/l...o/linux-pcmcia



    --
    Komuro
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB

    On Sat, Jun 07, 2008 at 10:37:16PM +0900, Komuro wrote:
    > On Fri, 30 May 2008 13:57:28 +0200
    > Kristoffer Ericson wrote:
    >
    >
    > > > > pcmcia: registering new device pcmcia1.0
    > > > ...
    > > > > pcmcia: registering new device pcmcia1.1
    > > > > 1.1: GetNextTuple: No more items
    > > > > pata_pcmcia: probe of 1.1 failed with error -12

    >
    > This problem is introduced at kernel 2.6.26-rc4.
    >
    > The kernel 2.6.26-rc3 does not have this problem.



    git-diff drivers/pcmcia is empty for 2.6.26-rc3 to 2.6.26-rc4. Therefore,
    it looks like something in the ata codepaths introduced this error? Tejun,
    Jeff, any ideas? (original bugreport below)

    Thanks,
    Dominik

    > > > Hi,
    > > >
    > > > > Ive added the id123 strings for a Sandisk Extreme III 8GB.
    > > > > I get this when using pcmcia->CF adapter.
    > > >
    > > > > pcmcia: registering new device pcmcia1.0
    > > > ...
    > > > > pcmcia: registering new device pcmcia1.1
    > > > > 1.1: GetNextTuple: No more items
    > > > > pata_pcmcia: probe of 1.1 failed with error -12
    > > >
    > > > Is that a multifunction device? It seems to me that something is broken in
    > > > the device CIS, for both drives seem to be exported already by device
    > > > pcmcia1.0.

    > >
    > > Its a simply pcmcia->CF adapter and the CF card is a simple storage one. I got it to work through USB-adapter after replacing my
    > > broken one.
    > > However it still doesnt work through the pcmcia->CF adapter.
    > >
    > > Im not ruling out that its broken though.
    > >
    > > >
    > > > Best,
    > > > Dominik

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. Re: [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB

    Dear Tejun

    > > > > > pcmcia: registering new device pcmcia1.1
    > > > > > 1.1: GetNextTuple: No more items
    > > > > > pata_pcmcia: probe of 1.1 failed with error -12


    The patch "libata: kill hotplug related race condition"
    introduced the pata_pcmcia error.

    Please fix this problem.


    Best Regards
    Komuro

    > > f046519fc85a8fdf6a058b4ac9d897cdee6f3e52 is first bad commit

    commit f046519fc85a8fdf6a058b4ac9d897cdee6f3e52
    Author: Tejun Heo
    Date: Mon May 19 01:15:08 2008 +0900

    libata: kill hotplug related race condition

    Originally, whole reset processing was done while the port is frozen
    and SError was cleared during @postreset(). This had two race
    conditions. 1: hotplug could occur after reset but before SError is
    cleared and libata won't know about it. 2: hotplug could occur after
    all the reset is complete but before the port is thawed. As all
    events are cleared on thaw, the hotplug event would be lost.


    > > > > > pcmcia: registering new device pcmcia1.0
    > > > > ...
    > > > > > pcmcia: registering new device pcmcia1.1
    > > > > > 1.1: GetNextTuple: No more items
    > > > > > pata_pcmcia: probe of 1.1 failed with error -12

    > >
    > > This problem is introduced at kernel 2.6.26-rc4.
    > >
    > > The kernel 2.6.26-rc3 does not have this problem.

    >
    >
    > git-diff drivers/pcmcia is empty for 2.6.26-rc3 to 2.6.26-rc4. Therefore,
    > it looks like something in the ata codepaths introduced this error? Tejun,
    > Jeff, any ideas? (original bugreport below)
    >
    > Thanks,
    > Dominik
    >
    > > > > Hi,
    > > > >
    > > > > > Ive added the id123 strings for a Sandisk Extreme III 8GB.
    > > > > > I get this when using pcmcia->CF adapter.
    > > > >
    > > > > > pcmcia: registering new device pcmcia1.0
    > > > > ...
    > > > > > pcmcia: registering new device pcmcia1.1
    > > > > > 1.1: GetNextTuple: No more items
    > > > > > pata_pcmcia: probe of 1.1 failed with error -12
    > > > >
    > > > > Is that a multifunction device? It seems to me that something is broken in
    > > > > the device CIS, for both drives seem to be exported already by device
    > > > > pcmcia1.0.
    > > >
    > > > Its a simply pcmcia->CF adapter and the CF card is a simple storage one. I got it to work through USB-adapter after replacing my
    > > > broken one.
    > > > However it still doesnt work through the pcmcia->CF adapter.
    > > >
    > > > Im not ruling out that its broken though.
    > > >
    > > > >
    > > > > Best,
    > > > > Dominik



    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  4. Re: [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB

    Komuro wrote:
    > Dear Tejun
    >
    >>>>>> pcmcia: registering new device pcmcia1.1
    >>>>>> 1.1: GetNextTuple: No more items
    >>>>>> pata_pcmcia: probe of 1.1 failed with error -12

    >
    > The patch "libata: kill hotplug related race condition"
    > introduced the pata_pcmcia error.
    >
    > Please fix this problem.
    >
    >
    > Best Regards
    > Komuro
    >
    >>> f046519fc85a8fdf6a058b4ac9d897cdee6f3e52 is first bad commit

    > commit f046519fc85a8fdf6a058b4ac9d897cdee6f3e52
    > Author: Tejun Heo
    > Date: Mon May 19 01:15:08 2008 +0900
    >
    > libata: kill hotplug related race condition
    >
    > Originally, whole reset processing was done while the port is frozen
    > and SError was cleared during @postreset(). This had two race
    > conditions. 1: hotplug could occur after reset but before SError is
    > cleared and libata won't know about it. 2: hotplug could occur after
    > all the reset is complete but before the port is thawed. As all
    > events are cleared on thaw, the hotplug event would be lost.


    Interesting! Thanks for the diagnosis...

    Jeff



    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  5. Re: [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB

    On Sat, 14 Jun 2008 03:20:41 -0400
    Jeff Garzik wrote:


    After removing the 3-lines below in ata_eh_reset
    the pata_pcmcia works properly.


    - spin_lock_irqsave(link->ap->lock, flags);
    - link->eh_info.serror = 0;
    - spin_unlock_irqrestore(link->ap->lock, flags);

    Please fix this problem.

    Best Regards
    Komuro


    > >
    > >>>>>> pcmcia: registering new device pcmcia1.1
    > >>>>>> 1.1: GetNextTuple: No more items
    > >>>>>> pata_pcmcia: probe of 1.1 failed with error -12

    > >
    > > The patch "libata: kill hotplug related race condition"
    > > introduced the pata_pcmcia error.
    > >
    > > Please fix this problem.
    > >
    > >
    > > Best Regards
    > > Komuro
    > >
    > >>> f046519fc85a8fdf6a058b4ac9d897cdee6f3e52 is first bad commit

    > > commit f046519fc85a8fdf6a058b4ac9d897cdee6f3e52
    > > Author: Tejun Heo
    > > Date: Mon May 19 01:15:08 2008 +0900
    > >
    > > libata: kill hotplug related race condition
    > >
    > > Originally, whole reset processing was done while the port is frozen
    > > and SError was cleared during @postreset(). This had two race
    > > conditions. 1: hotplug could occur after reset but before SError is
    > > cleared and libata won't know about it. 2: hotplug could occur after
    > > all the reset is complete but before the port is thawed. As all
    > > events are cleared on thaw, the hotplug event would be lost.

    >
    > Interesting! Thanks for the diagnosis...
    >
    > Jeff
    >
    >
    >



    --
    Komuro
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  6. Re: [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB

    Hello,

    Komuro wrote:
    > On Sat, 14 Jun 2008 03:20:41 -0400
    > Jeff Garzik wrote:
    >
    >
    > After removing the 3-lines below in ata_eh_reset
    > the pata_pcmcia works properly.
    >
    >
    > - spin_lock_irqsave(link->ap->lock, flags);
    > - link->eh_info.serror = 0;
    > - spin_unlock_irqrestore(link->ap->lock, flags);
    >
    > Please fix this problem.


    Thanks for diagnosing the problem but it doesn't make any sense at all.
    Those three lines just clear cached SError value. pata_pcmcia being a
    PATA driver, SError is not implemented and always zero.

    Also the init_one error is -ENOMEM. For the above change to make any
    difference, EH should have been entered which is invoked deep into
    ata_host_register() and once control reaches that point it never returns
    error code. I have difficult time imagining any way the above diff can
    have anything to do with the reported failure.

    Please apply the attached patch and report the log after probe failure.

    Thanks.

    --
    tejun


  7. Re: [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB

    Hi,

    Here is the log (your patch is applied).
    Unfortunately, no message that you added appears.

    It seems this device is detected as pcmcia0.0 first
    but later it is detected as pcmcia0.1.


    >pcmcia: registering new device pcmcia0.0
    >scsi2 : pata_pcmcia
    >ata3: PATA max PIO0 cmd 0xd100 ctl 0xd10e irq 4
    >ata3.00: CFA: , Ver.1.0, max PIO2
    >ata3.00: 32000 sectors, multi 0: LBA
    >ata3.00: configured for PIO0
    >ata3.00: configured for PIO0
    >ata3: EH complete
    >isa bounce pool size: 16 pages
    >scsi 2:0:0:0: Direct-Access ATA Ver. PQ: 0 ANSI: 5
    >sd 2:0:0:0: [sdb] 32000 512-byte hardware sectors (16 MB)
    >sd 2:0:0:0: [sdb] Write Protect is off
    >sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00
    >sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    >sd 2:0:0:0: [sdb] 32000 512-byte hardware sectors (16 MB)
    >sd 2:0:0:0: [sdb] Write Protect is off
    >sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00
    >sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    > sdb: sdb1
    >sd 2:0:0:0: [sdb] Attached SCSI removable disk
    >sd 2:0:0:0: Attached scsi generic sg2 type 0
    >pcmcia: registering new device pcmcia0.1
    >pcmcia: registering new device pcmcia0.1
    >0.1: GetNextTuple: No more items
    >pata_pcmcia: probe of 0.1 failed with error -12
    >modprobe used greatest stack depth: 1684 bytes left
    >0.1: GetNextTuple: No more items
    >pata_pcmcia: probe of 0.1 failed with error -12
    >0.1: GetNextTuple: No more items
    >pata_pcmcia: probe of 0.1 failed with error -12


    Best Regards
    Komuro

    > Hello,
    >
    > Komuro wrote:
    > > On Sat, 14 Jun 2008 03:20:41 -0400
    > > Jeff Garzik wrote:
    > >
    > >
    > > After removing the 3-lines below in ata_eh_reset
    > > the pata_pcmcia works properly.
    > >
    > >
    > > - spin_lock_irqsave(link->ap->lock, flags);
    > > - link->eh_info.serror = 0;
    > > - spin_unlock_irqrestore(link->ap->lock, flags);
    > >
    > > Please fix this problem.

    >
    > Thanks for diagnosing the problem but it doesn't make any sense at all.
    > Those three lines just clear cached SError value. pata_pcmcia being a
    > PATA driver, SError is not implemented and always zero.
    >
    > Also the init_one error is -ENOMEM. For the above change to make any
    > difference, EH should have been entered which is invoked deep into
    > ata_host_register() and once control reaches that point it never returns
    > error code. I have difficult time imagining any way the above diff can
    > have anything to do with the reported failure.
    >
    > Please apply the attached patch and report the log after probe failure.
    >
    > Thanks.
    >
    > --
    > tejun
    >



    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  8. Re: [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB

    Komuro wrote:
    > Hi,
    >
    > Here is the log (your patch is applied).
    > Unfortunately, no message that you added appears.
    >
    > It seems this device is detected as pcmcia0.0 first
    > but later it is detected as pcmcia0.1.


    Hmmm... strange. Can you please try the attached patch?

    --
    tejun


  9. Re: [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB

    Hi,

    Here is the log again.

    pcmcia: registering new device pcmcia0.0
    pata_pcmcia 0.0: XXX ENTER
    Pid: 1648, comm: modprobe Not tainted 2.6.26-rc5 #3
    [] pcmcia_init_one+0x34/0x585 [pata_pcmcia]
    [] pccard_get_tuple_data+0x53/0x5c
    [] iput+0x2a/0x4a
    [] pcmcia_device_probe+0xa6/0xf6
    [] driver_probe_device+0x103/0x12c
    [] __driver_attach+0x0/0x55
    [] driver_probe_device+0xb5/0x12c
    [] __driver_attach+0x37/0x55
    [] bus_for_each_dev+0x37/0x59
    [] driver_attach+0x11/0x13
    [] __driver_attach+0x0/0x55
    [] bus_add_driver+0x8a/0x1a7
    [] kset_find_obj+0x20/0x4b
    [] driver_register+0x6d/0xc1
    [] pcmcia_register_driver+0xaf/0xdb
    [] sys_init_module+0x1844/0x19b4
    [] pcmcia_request_irq+0x0/0x1d6
    [] sysenter_past_esp+0x6a/0x91
    =======================
    scsi2 : pata_pcmcia
    ata3: PATA max PIO0 cmd 0xd100 ctl 0xd10e irq 3
    ata3.00: CFA: , Ver.1.0, max PIO2
    ata3.00: 32000 sectors, multi 0: LBA
    ata3.00: configured for PIO0
    ata3.00: configured for PIO0
    ata3: EH complete
    isa bounce pool size: 16 pages
    scsi 2:0:0:0: Direct-Access ATA Ver. PQ: 0 ANSI: 5
    sd 2:0:0:0: [sdb] 32000 512-byte hardware sectors (16 MB)
    sd 2:0:0:0: [sdb] Write Protect is off
    sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00
    sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    sd 2:0:0:0: [sdb] 32000 512-byte hardware sectors (16 MB)
    sd 2:0:0:0: [sdb] Write Protect is off
    sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00
    sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    sdb: sdb1
    sd 2:0:0:0: [sdb] Attached SCSI removable disk
    sd 2:0:0:0: Attached scsi generic sg2 type 0
    pata_pcmcia 0.0: XXX LEAVE 0
    pcmcia: registering new device pcmcia0.1
    pata_pcmcia 0.1: XXX ENTER
    Pid: 6, comm: events/0 Not tainted 2.6.26-rc5 #3
    [] pcmcia_init_one+0x34/0x585 [pata_pcmcia]
    [] pccard_get_tuple_data+0x53/0x5c
    [] pcmcia_device_probe+0xa6/0xf6
    [] driver_probe_device+0xb5/0x12c
    [] __device_attach+0x0/0x5
    [] bus_for_each_drv+0x36/0x5e
    [] device_attach+0x4e/0x5e
    [] __device_attach+0x0/0x5
    [] bus_attach_device+0x1e/0x46
    [] device_add+0x310/0x43d
    [] pcmcia_device_add+0x188/0x1eb
    [] pcmcia_delayed_add_device+0x0/0x23
    [] pcmcia_delayed_add_device+0x1a/0x23
    [] run_workqueue+0x6b/0xe0
    [] worker_thread+0x0/0xbd
    [] worker_thread+0xb3/0xbd
    [] autoremove_wake_function+0x0/0x2d
    [] kthread+0x38/0x5e
    [] kthread+0x0/0x5e
    [] kernel_thread_helper+0x7/0x10
    =======================
    0.1: GetNextTuple: No more items
    pata_pcmcia 0.1: XXX LEAVE -12
    pata_pcmcia: probe of 0.1 failed with error -12
    modprobe used greatest stack depth: 1676 bytes left
    pata_pcmcia 0.1: XXX ENTER
    Pid: 1661, comm: sh Not tainted 2.6.26-rc5 #3
    [] pcmcia_init_one+0x34/0x585 [pata_pcmcia]
    [] pccard_get_tuple_data+0x53/0x5c
    [] iput+0x2a/0x4a
    [] pcmcia_device_probe+0xa6/0xf6
    [] bus_register_notifier+0x2/0xb
    [] bus_rescan_devices_helper+0x0/0x44
    [] driver_probe_device+0xb5/0x12c
    [] __device_attach+0x0/0x5
    [] bus_for_each_drv+0x36/0x5e
    [] device_attach+0x4e/0x5e
    [] __device_attach+0x0/0x5
    [] bus_rescan_devices_helper+0x27/0x44
    [] bus_for_each_dev+0x37/0x59
    [] bus_rescan_devices+0xe/0x10
    [] bus_rescan_devices_helper+0x0/0x44
    [] pcmcia_store_allow_func_id_match+0x46/0x5b
    [] pcmcia_store_allow_func_id_match+0x0/0x5b
    [] dev_attr_store+0x19/0x1d
    [] sysfs_write_file+0xa4/0xd8
    [] sysfs_write_file+0x0/0xd8
    [] vfs_write+0x83/0x114
    [] sys_write+0x3c/0x63
    [] sysenter_past_esp+0x6a/0x91
    =======================
    0.1: GetNextTuple: No more items
    pata_pcmcia 0.1: XXX LEAVE -12
    pata_pcmcia: probe of 0.1 failed with error -12


    Best Regards
    Komuro


    > >
    > > Here is the log (your patch is applied).
    > > Unfortunately, no message that you added appears.
    > >
    > > It seems this device is detected as pcmcia0.0 first
    > > but later it is detected as pcmcia0.1.

    >
    > Hmmm... strange. Can you please try the attached patch?
    >
    > --
    > tejun
    >



    --
    Komuro
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  10. Re: [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB

    Okay. The exit is from CS_CHECK macro on GetNextTuple, missed that
    macro. It means it failed to request IO resource somewhere. Can you
    please try the attached patch? It will show us where it failed.

    This part of code hasn't changed at all in pata_pcmcia && I don't really
    understand the tuple business. We need pcmcia people to pitch in.

    Thanks.

    --
    tejun


  11. Re: [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB

    On Tue, Jun 17, 2008 at 11:09:20PM +0900, Tejun Heo wrote:
    > Okay. The exit is from CS_CHECK macro on GetNextTuple, missed that
    > macro. It means it failed to request IO resource somewhere. Can you
    > please try the attached patch? It will show us where it failed.
    >
    > This part of code hasn't changed at all in pata_pcmcia && I don't really
    > understand the tuple business. We need pcmcia people to pitch in.


    The strange thing is that neither the PCMCIA side nor pata_pcmcia changed
    between the working 2.6.26-rc4 and the non-working 2.6.26-rc3... that's why
    I am at least as surprised as you are

    Thanks,
    Dominik
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  12. Re: [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB


    Hi,

    Here is the log.

    My card is single function device.

    it is correct that GetNextTuple fails for pcmcia0.1.
    since pcmcia0.1 does not exist.

    I think the reason of this problem is
    memory-leak or something.


    pcmcia: registering new device pcmcia0.0
    pata_pcmcia 0.0: XXX ENTER
    pata_pcmcia 0.0: XXX resource loop, pass=0
    pata_pcmcia 0.0: XXX resource loop, pass=0
    scsi2 : pata_pcmcia
    ata3: PATA max PIO0 cmd 0xd100 ctl 0xd10e irq 4
    ata3.00: CFA: , Ver.1.0, max PIO2
    ata3.00: 32000 sectors, multi 0: LBA
    ata3.00: configured for PIO0
    ata3.00: configured for PIO0
    ata3: EH complete
    isa bounce pool size: 16 pages
    scsi 2:0:0:0: Direct-Access ATA Ver. PQ: 0 ANSI: 5
    sd 2:0:0:0: [sdb] 32000 512-byte hardware sectors (16 MB)
    sd 2:0:0:0: [sdb] Write Protect is off
    sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00
    sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    sd 2:0:0:0: [sdb] 32000 512-byte hardware sectors (16 MB)
    sd 2:0:0:0: [sdb] Write Protect is off
    sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00
    sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    sdb: sdb1
    sd 2:0:0:0: [sdb] Attached SCSI removable disk
    sd 2:0:0:0: Attached scsi generic sg2 type 0
    pata_pcmcia 0.0: XXX LEAVE 0
    pcmcia: registering new device pcmcia0.1
    pata_pcmcia 0.1: XXX ENTER
    pata_pcmcia 0.1: XXX resource loop, pass=0
    pata_pcmcia 0.1: XXX resource loop, pass=0
    pata_pcmcia 0.1: XXX IO request failed 2 0:16 0:0
    pata_pcmcia 0.1: XXX resource loop, pass=0
    pata_pcmcia 0.1: XXX IO request failed 1 1f0:8 3f6:1
    pata_pcmcia 0.1: XXX resource loop, pass=0
    pata_pcmcia 0.1: XXX IO request failed 1 170:8 376:1
    pata_pcmcia 0.1: XXX pass=0, doing GetFirstTuple
    pata_pcmcia 0.1: XXX resource loop, pass=1
    pata_pcmcia 0.1: XXX pass=1, doing GetNextTuple
    pata_pcmcia 0.1: XXX resource loop, pass=1
    pata_pcmcia 0.1: XXX IO request failed 2 0:16 376:0
    pata_pcmcia 0.1: XXX pass=1, doing GetNextTuple
    pata_pcmcia 0.1: XXX resource loop, pass=1
    pata_pcmcia 0.1: XXX IO request failed 1 1f0:8 3f6:1
    pata_pcmcia 0.1: XXX pass=1, doing GetNextTuple
    pata_pcmcia 0.1: XXX resource loop, pass=1
    pata_pcmcia 0.1: XXX IO request failed 1 170:8 376:1
    pata_pcmcia 0.1: XXX pass=1, doing GetNextTuple
    0.1: GetNextTuple: No more items
    pata_pcmcia 0.1: XXX LEAVE -12
    pata_pcmcia: probe of 0.1 failed with error -12
    modprobe used greatest stack depth: 1676 bytes left
    pata_pcmcia 0.1: XXX ENTER
    pata_pcmcia 0.1: XXX resource loop, pass=0
    pata_pcmcia 0.1: XXX resource loop, pass=0
    pata_pcmcia 0.1: XXX IO request failed 2 0:16 376:0
    pata_pcmcia 0.1: XXX resource loop, pass=0
    pata_pcmcia 0.1: XXX IO request failed 1 1f0:8 3f6:1
    pata_pcmcia 0.1: XXX resource loop, pass=0
    pata_pcmcia 0.1: XXX IO request failed 1 170:8 376:1
    pata_pcmcia 0.1: XXX pass=0, doing GetFirstTuple
    pata_pcmcia 0.1: XXX resource loop, pass=1
    pata_pcmcia 0.1: XXX pass=1, doing GetNextTuple
    pata_pcmcia 0.1: XXX resource loop, pass=1
    pata_pcmcia 0.1: XXX IO request failed 2 0:16 376:0
    pata_pcmcia 0.1: XXX pass=1, doing GetNextTuple
    pata_pcmcia 0.1: XXX resource loop, pass=1
    pata_pcmcia 0.1: XXX IO request failed 1 1f0:8 3f6:1
    pata_pcmcia 0.1: XXX pass=1, doing GetNextTuple
    pata_pcmcia 0.1: XXX resource loop, pass=1
    pata_pcmcia 0.1: XXX IO request failed 1 170:8 376:1
    pata_pcmcia 0.1: XXX pass=1, doing GetNextTuple
    0.1: GetNextTuple: No more items
    pata_pcmcia 0.1: XXX LEAVE -12
    pata_pcmcia: probe of 0.1 failed with error -12
    pata_pcmcia 0.1: XXX ENTER
    pata_pcmcia 0.1: XXX resource loop, pass=0
    pata_pcmcia 0.1: XXX resource loop, pass=0
    pata_pcmcia 0.1: XXX IO request failed 2 0:16 376:0
    pata_pcmcia 0.1: XXX resource loop, pass=0
    pata_pcmcia 0.1: XXX IO request failed 1 1f0:8 3f6:1
    pata_pcmcia 0.1: XXX resource loop, pass=0
    pata_pcmcia 0.1: XXX IO request failed 1 170:8 376:1
    pata_pcmcia 0.1: XXX pass=0, doing GetFirstTuple
    pata_pcmcia 0.1: XXX resource loop, pass=1
    pata_pcmcia 0.1: XXX pass=1, doing GetNextTuple
    pata_pcmcia 0.1: XXX resource loop, pass=1
    pata_pcmcia 0.1: XXX IO request failed 2 0:16 376:0
    pata_pcmcia 0.1: XXX pass=1, doing GetNextTuple
    pata_pcmcia 0.1: XXX resource loop, pass=1
    pata_pcmcia 0.1: XXX IO request failed 1 1f0:8 3f6:1
    pata_pcmcia 0.1: XXX pass=1, doing GetNextTuple
    pata_pcmcia 0.1: XXX resource loop, pass=1
    pata_pcmcia 0.1: XXX IO request failed 1 170:8 376:1
    pata_pcmcia 0.1: XXX pass=1, doing GetNextTuple
    0.1: GetNextTuple: No more items
    pata_pcmcia 0.1: XXX LEAVE -12
    pata_pcmcia: probe of 0.1 failed with error -12

    Best Regards
    Komuro

    > Okay. The exit is from CS_CHECK macro on GetNextTuple, missed that
    > macro. It means it failed to request IO resource somewhere. Can you
    > please try the attached patch? It will show us where it failed.
    >
    > This part of code hasn't changed at all in pata_pcmcia && I don't really
    > understand the tuple business. We need pcmcia people to pitch in.
    >
    > Thanks.
    >
    > --
    > tejun
    >

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  13. Re: [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB

    Hi,

    Strangely, after removing the spin_lock_irqsave
    and spin_unlock_irqrestore from the ata_eh_reset,
    the pata_pcmcia works properly.

    It seedms link->ap->lock is not intialized
    by spin_lock_init().

    - spin_lock_irqsave(link->ap->lock, flags);
    link->eh_info.serror = 0;
    - spin_unlock_irqrestore(link->ap->lock, flags);



    Best Regards
    Komuro

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  14. Re: [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB


    Hi, Tejun

    The patch below fixes the pata_pcmcia problem.

    I think the ap->lock points to bogus address.

    Any comment?

    --- linux-2.6.26-rc8/drivers/ata/libata-core.c.orig 2008-07-06 10:05:46.000000000 +0900
    +++ linux-2.6.26-rc8/drivers/ata/libata-core.c 2008-07-06 10:09:16.000000000 +0900
    @@ -5304,6 +5304,8 @@ struct ata_host *ata_host_alloc(struct d
    goto err_out;

    ap->port_no = i;
    + ap->lock = &ap->__lock;
    + spin_lock_init(ap->lock);
    host->ports[i] = ap;
    }

    --- linux-2.6.26-rc8/include/linux/libata.h.orig 2008-07-06 10:03:54.000000000 +0900
    +++ linux-2.6.26-rc8/include/linux/libata.h 2008-07-06 10:04:35.000000000 +0900
    @@ -639,6 +639,7 @@ struct ata_port {
    struct Scsi_Host *scsi_host; /* our co-allocated scsi host */
    struct ata_port_operations *ops;
    spinlock_t *lock;
    + spinlock_t __lock;
    unsigned long flags; /* ATA_FLAG_xxx */
    unsigned int pflags; /* ATA_PFLAG_xxx */
    unsigned int print_id; /* user visible unique port ID */

    Best Regards
    Komuro

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  15. Re: [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB

    Hello, Komuro.

    Komuro wrote:
    > Hi, Tejun
    >
    > The patch below fixes the pata_pcmcia problem.
    >
    > I think the ap->lock points to bogus address.
    >
    > Any comment?
    >
    > --- linux-2.6.26-rc8/drivers/ata/libata-core.c.orig 2008-07-06 10:05:46.000000000 +0900
    > +++ linux-2.6.26-rc8/drivers/ata/libata-core.c 2008-07-06 10:09:16.000000000 +0900
    > @@ -5304,6 +5304,8 @@ struct ata_host *ata_host_alloc(struct d
    > goto err_out;
    >
    > ap->port_no = i;
    > + ap->lock = &ap->__lock;
    > + spin_lock_init(ap->lock);
    > host->ports[i] = ap;
    > }
    >
    > --- linux-2.6.26-rc8/include/linux/libata.h.orig 2008-07-06 10:03:54.000000000 +0900
    > +++ linux-2.6.26-rc8/include/linux/libata.h 2008-07-06 10:04:35.000000000 +0900
    > @@ -639,6 +639,7 @@ struct ata_port {
    > struct Scsi_Host *scsi_host; /* our co-allocated scsi host */
    > struct ata_port_operations *ops;
    > spinlock_t *lock;
    > + spinlock_t __lock;
    > unsigned long flags; /* ATA_FLAG_xxx */
    > unsigned int pflags; /* ATA_PFLAG_xxx */
    > unsigned int print_id; /* user visible unique port ID */


    Hmmm... Strange. From ata_port_alloc(),

    struct ata_port *ata_port_alloc(struct ata_host *host)
    {
    struct ata_port *ap;

    DPRINTK("ENTER\n");

    ap = kzalloc(sizeof(*ap), GFP_KERNEL);
    if (!ap)
    return NULL;

    ap->pflags |= ATA_PFLAG_INITIALIZING;
    ap->lock = &host->lock;
    ^^^^^^^^^^^^^^^^^^^^^^^

    How come ap->lock can get set to bogus address? Can you please printk
    &host->lock and ap->lock after ata_host_alloc() without the patch?

    Thanks.

    --
    tejun
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  16. Re: [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB


    Hi,

    > How come ap->lock can get set to bogus address? Can you please printk
    > &host->lock and ap->lock after ata_host_alloc() without the patch?


    Here is the output of printk.
    Strangely, without the patch, the pata_pcmcia problem happens again.


    ata_piix 0000:00:1f.1: version 2.12
    ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11
    ACPI: PCI Interrupt 0000:00:1f.1[A] -> Link [LNKC] -> GSI 11 (level, low) -> IRQ 11
    &host->lock = d6c288b4
    ap->lock = d6c288b4
    ap->lock = d6c288b4
    PCI: Setting latency timer of device 0000:00:1f.1 to 64
    scsi0 : ata_piix
    scsi1 : ata_piix
    .....

    pcmcia: registering new device pcmcia1.0
    &host->lock = d70ee534
    ap->lock = d70ee534
    scsi2 : pata_pcmcia


    host = devres_alloc(ata_host_release, sz, GFP_KERNEL);
    if (!host)
    goto err_out;

    devres_add(dev, host);
    dev_set_drvdata(dev, host);

    spin_lock_init(&host->lock);
    printk("&host->lock = %x\n", &host->lock);
    host->dev = dev;
    host->n_ports = max_ports;

    /* allocate ports bound to this host */
    for (i = 0; i < max_ports; i++) {
    struct ata_port *ap;

    ap = ata_port_alloc(host);
    if (!ap)
    goto err_out;

    ap->port_no = i;
    /*
    ap->lock = &ap->__lock;
    spin_lock_init(ap->lock);
    */
    printk("ap->lock = %x\n", ap->lock);
    host->ports[i] = ap;
    }

    Best Regards
    Komuro

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  17. Re: [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB

    Hello,

    Komuro wrote:
    >> How come ap->lock can get set to bogus address? Can you please printk
    >> &host->lock and ap->lock after ata_host_alloc() without the patch?

    >
    > Here is the output of printk.
    > Strangely, without the patch, the pata_pcmcia problem happens again.


    Ah... super strange. Can you please try to swap memory sticks around
    and see whether anything changes to rule out bad memory? Another
    possibility is DMA corrupting the memory and printk makes the timing
    different and dodges the bullet. Does putting msleep(100) in the
    pata_pcmcia init_one make any difference?

    Thanks.

    --
    tejun
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  18. Re: [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB


    Hello,

    > Ah... super strange. Can you please try to swap memory sticks around
    > and see whether anything changes to rule out bad memory?


    I tried the pata_pcmcia on 3(three) PC.but the result is same.
    So I think the memory is good.

    > Another
    > possibility is DMA corrupting the memory and printk makes the timing
    > different and dodges the bullet. Does putting msleep(100) in the
    > pata_pcmcia init_one make any difference?


    I tried the msleep , but it still does not work.

    By the way,
    If I delete the pata_pcmcia.ko from /lib/modules/...
    and insert the ata pcmcia card,
    only /sys/bus/pcmcia/devices/0.0 exist.

    But if I install the pata_pcmcia.ko,
    /sys/bus/pcmcia/devices/0.0 and
    /sys/bus/pcmcia/devices/0.1 exist.

    Maybe the sysfs or something like that
    is the problem.

    Best Regards
    Komuro
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread