linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.6.26-rc6: pcmcia stopped working after resume
@ 2008-06-22 22:40 Pavel Machek
  2008-06-23  8:13 ` Dominik Brodowski
  0 siblings, 1 reply; 14+ messages in thread
From: Pavel Machek @ 2008-06-22 22:40 UTC (permalink / raw)
  To: kernel list, Rafael J. Wysocki, linux-pcmcia

Hi!

After s2ram and resume, CF card in PCMCIA-to-CF slot is no longer
detected.

Jun 23 00:38:28 amd kernel: sd 0:0:0:0: [sda] Write cache: enabled,
read cache: enabled, doesn't support DPO or FUA
Jun 23 00:38:28 amd kernel: sd 0:0:0:0: [sda] 117210240 512-byte
hardware sectors (60012 MB)
Jun 23 00:38:28 amd kernel: sd 0:0:0:0: [sda] Write Protect is off
Jun 23 00:38:28 amd kernel: sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
Jun 23 00:38:28 amd kernel: sd 0:0:0:0: [sda] Write cache: enabled,
read cache: enabled, doesn't support DPO or FUA
Jun 23 00:38:28 amd kernel: PM: Writing back config space on device
0000:15:00.2 at offset 4 (was 0, writing e4301800)
Jun 23 00:38:28 amd kernel: PM: Writing back config space on device
0000:15:00.2 at offset 3 (was 800000, writing 804000)
Jun 23 00:38:28 amd kernel: PM: Writing back config space on device
0000:15:00.2 at offset 1 (was 2100000, writing 2100006)
Jun 23 00:38:28 amd kernel: sleepy: scsi_bus_resume start
Jun 23 00:38:28 amd kernel: sleepy: scsi_bus_resume done
Jun 23 00:38:28 amd kernel: usb 4-1: reset low speed USB device using
uhci_hcd and address 2
Jun 23 00:38:28 amd kernel: PM: Finishing wakeup.
Jun 23 00:38:28 amd kernel: Restarting tasks ... done.
Jun 23 00:38:28 amd kernel: usb 5-1: USB disconnect, address 2
Jun 23 00:38:28 amd cardmgr[1396]: executing: './ide resume hdc 2>&1'
Jun 23 00:38:28 amd cardmgr[1396]: + ./shared: line 127:
/var/run/stab: No such file or directory
Jun 23 00:38:28 amd cardmgr[1396]: + usage: ./ide [action] [device
name]
Jun 23 00:38:28 amd cardmgr[1396]: +   actions: start check stop
suspend resume
Jun 23 00:38:28 amd cardmgr[1396]: resume cmd exited with status 1
Jun 23 00:38:28 amd kernel: usb 5-1: new full speed USB device using
uhci_hcd and address 4
Jun 23 00:38:28 amd kernel: usb 5-1: configuration #1 chosen from 1
choice
Jun 23 00:38:28 amd kernel: usb 5-1: New USB device found,
idVendor=0a5c, idProduct=2110
Jun 23 00:38:28 amd kernel: usb 5-1: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
Jun 23 00:38:28 amd kernel: usb 5-1: Product: BCM2045B
Jun 23 00:38:28 amd kernel: usb 5-1: Manufacturer: Broadcom Corp
Jun 23 00:38:28 amd kernel: usb 5-2: USB disconnect, address 3
Jun 23 00:38:28 amd kernel: usb 5-2: new full speed USB device using
uhci_hcd and address 5
Jun 23 00:38:29 amd kernel: usb 5-2: configuration #1 chosen from 1
choice
Jun 23 00:38:29 amd kernel: usb 5-2: New USB device found,
idVendor=0483, idProduct=2016
Jun 23 00:38:29 amd kernel: usb 5-2: New USB device strings: Mfr=1,
Product=2, SerialNumber=0
Jun 23 00:38:29 amd kernel: usb 5-2: Product: Biometric Coprocessor
Jun 23 00:38:29 amd kernel: usb 5-2: Manufacturer: STMicroelectronics
pccard: card ejected from slot 0
Jun 23 00:38:32 amd kernel: pccard: card ejected from slot 0

I eject it, but nothing happens (and no messages in log) on
insertion. I think system will die on next s2ram attempt.

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 2.6.26-rc6: pcmcia stopped working after resume
  2008-06-22 22:40 2.6.26-rc6: pcmcia stopped working after resume Pavel Machek
@ 2008-06-23  8:13 ` Dominik Brodowski
  2008-06-23  8:18   ` Pavel Machek
  0 siblings, 1 reply; 14+ messages in thread
From: Dominik Brodowski @ 2008-06-23  8:13 UTC (permalink / raw)
  To: Pavel Machek; +Cc: kernel list, Rafael J. Wysocki, linux-pcmcia

Hi,

On Mon, Jun 23, 2008 at 12:40:22AM +0200, Pavel Machek wrote:
> After s2ram and resume, CF card in PCMCIA-to-CF slot is no longer
> detected.

might this be related to:
http://bugzilla.kernel.org/show_bug.cgi?id=10957 ? There didn't change
anything with regard to pcmcia between -rc3 and -rc6...

Best,
	Dominik

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 2.6.26-rc6: pcmcia stopped working after resume
  2008-06-23  8:13 ` Dominik Brodowski
@ 2008-06-23  8:18   ` Pavel Machek
  2008-06-23  8:30     ` Dominik Brodowski
  0 siblings, 1 reply; 14+ messages in thread
From: Pavel Machek @ 2008-06-23  8:18 UTC (permalink / raw)
  To: kernel list, Rafael J. Wysocki, linux-pcmcia

Hi!

> > After s2ram and resume, CF card in PCMCIA-to-CF slot is no longer
> > detected.
> 
> might this be related to:
> http://bugzilla.kernel.org/show_bug.cgi?id=10957 ? There didn't change
> anything with regard to pcmcia between -rc3 and -rc6...

I'm pretty sure it worked in 2.6.25; I don't know if it worked in
-rc3, or not.

I don't even see note about card insertion in dmesg, so I figured out
it is probably pcmcia-core problem (or something deeper).
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 2.6.26-rc6: pcmcia stopped working after resume
  2008-06-23  8:18   ` Pavel Machek
@ 2008-06-23  8:30     ` Dominik Brodowski
  2008-06-25 10:23       ` [regression] Re: 2.6.26-rc6: pcmcia stopped working Pavel Machek
  0 siblings, 1 reply; 14+ messages in thread
From: Dominik Brodowski @ 2008-06-23  8:30 UTC (permalink / raw)
  To: Pavel Machek; +Cc: kernel list, Rafael J. Wysocki, linux-pcmcia

On Mon, Jun 23, 2008 at 10:18:11AM +0200, Pavel Machek wrote:
> Hi!
> 
> > > After s2ram and resume, CF card in PCMCIA-to-CF slot is no longer
> > > detected.
> > 
> > might this be related to:
> > http://bugzilla.kernel.org/show_bug.cgi?id=10957 ? There didn't change
> > anything with regard to pcmcia between -rc3 and -rc6...
> 
> I'm pretty sure it worked in 2.6.25; I don't know if it worked in
> -rc3, or not.
> 
> I don't even see note about card insertion in dmesg, so I figured out
> it is probably pcmcia-core problem (or something deeper).

Well, even since 2.6.25 not much changed in PCMCIA-land, so...

Best,
	Dominik

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [regression] Re: 2.6.26-rc6: pcmcia stopped working
  2008-06-23  8:30     ` Dominik Brodowski
@ 2008-06-25 10:23       ` Pavel Machek
  2008-06-25 11:01         ` Pavel Machek
  0 siblings, 1 reply; 14+ messages in thread
From: Pavel Machek @ 2008-06-25 10:23 UTC (permalink / raw)
  To: kernel list, Rafael J. Wysocki, linux-pcmcia

On Mon 2008-06-23 10:30:46, Dominik Brodowski wrote:
> On Mon, Jun 23, 2008 at 10:18:11AM +0200, Pavel Machek wrote:
> > Hi!
> > 
> > > > After s2ram and resume, CF card in PCMCIA-to-CF slot is no longer
> > > > detected.
> > > 
> > > might this be related to:
> > > http://bugzilla.kernel.org/show_bug.cgi?id=10957 ? There didn't change
> > > anything with regard to pcmcia between -rc3 and -rc6...
> > 
> > I'm pretty sure it worked in 2.6.25; I don't know if it worked in
> > -rc3, or not.
> > 
> > I don't even see note about card insertion in dmesg, so I figured out
> > it is probably pcmcia-core problem (or something deeper).
> 
> Well, even since 2.6.25 not much changed in PCMCIA-land, so...

Actually, it is worse. On thinkpad, PCMCIA card is only detected
once. If I remove it and reinsert it, it will not be detected, and
machine will not reboot.

Thinkpad X60.

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [regression] Re: 2.6.26-rc6: pcmcia stopped working
  2008-06-25 10:23       ` [regression] Re: 2.6.26-rc6: pcmcia stopped working Pavel Machek
@ 2008-06-25 11:01         ` Pavel Machek
  2008-06-25 12:03           ` Tejun Heo
  2008-06-25 21:53           ` Pavel Machek
  0 siblings, 2 replies; 14+ messages in thread
From: Pavel Machek @ 2008-06-25 11:01 UTC (permalink / raw)
  To: kernel list, Rafael J. Wysocki, linux-pcmcia, bzolnier, linux-ide

On Wed 2008-06-25 12:23:47, Pavel Machek wrote:
> On Mon 2008-06-23 10:30:46, Dominik Brodowski wrote:
> > On Mon, Jun 23, 2008 at 10:18:11AM +0200, Pavel Machek wrote:
> > > Hi!
> > > 
> > > > > After s2ram and resume, CF card in PCMCIA-to-CF slot is no longer
> > > > > detected.
> > > > 
> > > > might this be related to:
> > > > http://bugzilla.kernel.org/show_bug.cgi?id=10957 ? There didn't change
> > > > anything with regard to pcmcia between -rc3 and -rc6...
> > > 
> > > I'm pretty sure it worked in 2.6.25; I don't know if it worked in
> > > -rc3, or not.
> > > 
> > > I don't even see note about card insertion in dmesg, so I figured out
> > > it is probably pcmcia-core problem (or something deeper).
> > 
> > Well, even since 2.6.25 not much changed in PCMCIA-land, so...
> 
> Actually, it is worse. On thinkpad, PCMCIA card is only detected
> once. If I remove it and reinsert it, it will not be detected, and
> machine will not reboot.
> 
> Thinkpad X60.

Hmm, but with -rc8, I actually got some useful info:

kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
debug: unmapping init memory c099f000..c09ef000
Write protecting the kernel text: 5320k
Write protecting the kernel read-only data: 1916k
Failed to execute /tmp/swsusp-init.  Attempting defaults...
EXT3 FS on sda4, internal journal
Adding 987988k swap on /dev/sda1.  Priority:-1 extents:1 across:987988k
kjournald starting.  Commit interval 5 seconds
EXT3 FS on sda2, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
pcmcia: Detected deprecated PCMCIA ioctl usage from process: hwclock.
pcmcia: This interface will soon be removed from the kernel; please expect breakage unless you upgrade to new tools.
pcmcia: see http://www.kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html for details.
eth0: Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
coda_read_super: Bad mount data
coda_read_super: device index: 0
coda_read_super: rootfid is (01234567.ffffffff.08051a38.00000000)
coda: Unexpected interruption.
Failure of coda_cnode_make for root: error -4
pccard: PCMCIA card inserted into slot 0
cs: memory probe 0x0c0000-0x0fffff: excluding 0xc0000-0xd3fff 0xdc000-0xfffff
cs: memory probe 0x60000000-0x60ffffff: excluding 0x60000000-0x60ffffff
cs: memory probe 0xe0000000-0xe3ffffff: excluding 0xe0000000-0xe3ffffff
cs: memory probe 0xe4300000-0xe7ffffff: excluding 0xe4300000-0xe46cffff 0xe4e70000-0xe523ffff 0xe5db0000-0xe617ffff 0xe6cf0000-0xe70bffff
pcmcia: registering new device pcmcia0.0
Probing IDE interface ide1...
hdc: SunDisk SDP3B-20, CFA DISK drive
hdd: SunDisk SDP3B-20, CFA DISK drive
ide-probe: ignoring undecoded slave
ide1 at 0x9100-0x9107,0x910e on irq 16
hdc: max request size: 128KiB
hdc: 40960 sectors (20 MB) w/1KiB Cache, CHS=640/2/32
 hdc:hdc: set_geometry_intr: status=0x51 { DriveReady SeekComplete Error }
hdc: set_geometry_intr: error=0x04 { DriveStatusError }
ide: failed opcode was: unknown
 hdc1 hdc3
ide-cs: hdc: Vpp = 0.0
Clocksource tsc unstable (delta = -68835537 ns)
pccard: card ejected from slot 0
INFO: task pccardd:1121 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
pccardd       D f6dd1e1c     0  1121      2
       f6dd1e30 00000086 00000002 f6dd1e1c f6dd1e10 00000000 c2015e80 c2015e80 
       c09113e0 00000286 00000286 f72d13b8 f72d1618 c2015e80 f6dd0000 f6afedc0 
       ffff03a9 f6bcb458 00000000 c02bd187 00000000 f6dd1e4c 00000003 00000000 
Call Trace:
 [<c02bd187>] sysfs_addrm_finish+0x1a7/0x1e0
 [<c072edec>] schedule_timeout+0x7c/0xd0
 [<c02bd1e7>] remove_dir+0x27/0x40
 [<c0730b9a>] _spin_lock_irq+0x2a/0x40
 [<c072e240>] wait_for_common+0xc0/0x130
 [<c021f5c0>] default_wake_function+0x0/0x10
 [<c04d489f>] ide_unregister+0xcf/0x150
 [<c04e5671>] ide_release+0x21/0x40
 [<c04e56b9>] ide_detach+0x29/0x80
 [<c0520146>] pcmcia_device_remove+0x36/0xe0
 [<c0423116>] __device_release_driver+0x56/0x90
 [<c0423210>] device_release_driver+0x20/0x40
 [<c04225bb>] bus_remove_device+0x6b/0x90
 [<c04210cf>] device_del+0xcf/0x140
 [<c0421148>] device_unregister+0x8/0x10
 [<c051fb7c>] pcmcia_card_remove+0x6c/0x80
 [<c0520a34>] ds_event+0x64/0xb0
 [<c051c12f>] pccardd+0x16f/0x2a0
 [<c051b7fb>] send_event+0x4b/0x80
 [<c051ba6b>] socket_shutdown+0xb/0xd0
 [<c051bb4c>] socket_remove+0x1c/0x30
 [<c051c1fe>] pccardd+0x23e/0x2a0
 [<c021f5c0>] default_wake_function+0x0/0x10
 [<c051bfc0>] pccardd+0x0/0x2a0
 [<c023c3f2>] kthread+0x42/0x70
 [<c023c3b0>] kthread+0x0/0x70
 [<c02047ab>] kernel_thread_helper+0x7/0x1c
 [<c04216f2>] device_create_vargs+0x42/0xd0
 =======================
no locks held by pccardd/1121.
INFO: task pccardd:1121 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
pccardd       D f6dd1e1c     0  1121      2
       f6dd1e30 00000086 00000002 f6dd1e1c f6dd1e10 00000000 c2015e80 c2015e80 
       c09113e0 00000286 00000286 f72d13b8 f72d1618 c2015e80 f6dd0000 f6afedc0 
       ffff03a9 f6bcb458 00000000 c02bd187 00000000 f6dd1e4c 00000003 00000000 
Call Trace:
 [<c02bd187>] sysfs_addrm_finish+0x1a7/0x1e0
 [<c072edec>] schedule_timeout+0x7c/0xd0
 [<c02bd1e7>] remove_dir+0x27/0x40
 [<c0730b9a>] _spin_lock_irq+0x2a/0x40
 [<c072e240>] wait_for_common+0xc0/0x130
 [<c021f5c0>] default_wake_function+0x0/0x10
 [<c04d489f>] ide_unregister+0xcf/0x150
 [<c04e5671>] ide_release+0x21/0x40
 [<c04e56b9>] ide_detach+0x29/0x80
 [<c0520146>] pcmcia_device_remove+0x36/0xe0
 [<c0423116>] __device_release_driver+0x56/0x90
 [<c0423210>] device_release_driver+0x20/0x40
 [<c04225bb>] bus_remove_device+0x6b/0x90
 [<c04210cf>] device_del+0xcf/0x140
 [<c0421148>] device_unregister+0x8/0x10
 [<c051fb7c>] pcmcia_card_remove+0x6c/0x80
 [<c0520a34>] ds_event+0x64/0xb0
 [<c051c12f>] pccardd+0x16f/0x2a0
 [<c051b7fb>] send_event+0x4b/0x80
 [<c051ba6b>] socket_shutdown+0xb/0xd0
 [<c051bb4c>] socket_remove+0x1c/0x30
 [<c051c1fe>] pccardd+0x23e/0x2a0
 [<c021f5c0>] default_wake_function+0x0/0x10
 [<c051bfc0>] pccardd+0x0/0x2a0
 [<c023c3f2>] kthread+0x42/0x70
 [<c023c3b0>] kthread+0x0/0x70
 [<c02047ab>] kernel_thread_helper+0x7/0x1c
 [<c04216f2>] device_create_vargs+0x42/0xd0
 =======================
no locks held by pccardd/1121.


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [regression] Re: 2.6.26-rc6: pcmcia stopped working
  2008-06-25 11:01         ` Pavel Machek
@ 2008-06-25 12:03           ` Tejun Heo
  2008-06-25 21:53           ` Pavel Machek
  1 sibling, 0 replies; 14+ messages in thread
From: Tejun Heo @ 2008-06-25 12:03 UTC (permalink / raw)
  To: Pavel Machek
  Cc: kernel list, Rafael J. Wysocki, linux-pcmcia, bzolnier, linux-ide

Hello, Pavel.

Pavel Machek wrote:
> pccardd       D f6dd1e1c     0  1121      2
>        f6dd1e30 00000086 00000002 f6dd1e1c f6dd1e10 00000000 c2015e80 c2015e80 
>        c09113e0 00000286 00000286 f72d13b8 f72d1618 c2015e80 f6dd0000 f6afedc0 
>        ffff03a9 f6bcb458 00000000 c02bd187 00000000 f6dd1e4c 00000003 00000000 
> Call Trace:
>  [<c02bd187>] sysfs_addrm_finish+0x1a7/0x1e0
>  [<c072edec>] schedule_timeout+0x7c/0xd0
>  [<c02bd1e7>] remove_dir+0x27/0x40

Strange.  sysfs_addrm_finish() releases resources and is unlikely to
block.  Can you please translate the PC to source line?

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [regression] Re: 2.6.26-rc6: pcmcia stopped working
  2008-06-25 11:01         ` Pavel Machek
  2008-06-25 12:03           ` Tejun Heo
@ 2008-06-25 21:53           ` Pavel Machek
  2008-06-25 22:09             ` Pavel Machek
  1 sibling, 1 reply; 14+ messages in thread
From: Pavel Machek @ 2008-06-25 21:53 UTC (permalink / raw)
  To: kernel list, Rafael J. Wysocki, linux-pcmcia, bzolnier,
	linux-ide, Greg KH

On Wed 2008-06-25 13:01:05, Pavel Machek wrote:
> On Wed 2008-06-25 12:23:47, Pavel Machek wrote:
> > On Mon 2008-06-23 10:30:46, Dominik Brodowski wrote:
> > > On Mon, Jun 23, 2008 at 10:18:11AM +0200, Pavel Machek wrote:
> > > > Hi!
> > > > 
> > > > > > After s2ram and resume, CF card in PCMCIA-to-CF slot is no longer
> > > > > > detected.
> > > > > 
> > > > > might this be related to:
> > > > > http://bugzilla.kernel.org/show_bug.cgi?id=10957 ? There didn't change
> > > > > anything with regard to pcmcia between -rc3 and -rc6...
> > > > 
> > > > I'm pretty sure it worked in 2.6.25; I don't know if it worked in
> > > > -rc3, or not.
> > > > 
> > > > I don't even see note about card insertion in dmesg, so I figured out
> > > > it is probably pcmcia-core problem (or something deeper).
> > > 
> > > Well, even since 2.6.25 not much changed in PCMCIA-land, so...
> > 
> > Actually, it is worse. On thinkpad, PCMCIA card is only detected
> > once. If I remove it and reinsert it, it will not be detected, and
> > machine will not reboot.
> > 
> > Thinkpad X60.
> 
> Hmm, but with -rc8, I actually got some useful info:
> 
> kjournald starting.  Commit interval 5 seconds
> EXT3-fs: mounted filesystem with ordered data mode.
> VFS: Mounted root (ext3 filesystem) readonly.
> debug: unmapping init memory c099f000..c09ef000
> Write protecting the kernel text: 5320k
> Write protecting the kernel read-only data: 1916k
> Failed to execute /tmp/swsusp-init.  Attempting defaults...
> EXT3 FS on sda4, internal journal
> Adding 987988k swap on /dev/sda1.  Priority:-1 extents:1 across:987988k
> kjournald starting.  Commit interval 5 seconds
> EXT3 FS on sda2, internal journal
> EXT3-fs: mounted filesystem with ordered data mode.
> pcmcia: Detected deprecated PCMCIA ioctl usage from process: hwclock.
> pcmcia: This interface will soon be removed from the kernel; please expect breakage unless you upgrade to new tools.
> pcmcia: see http://www.kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html for details.
> eth0: Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
> coda_read_super: Bad mount data
> coda_read_super: device index: 0
> coda_read_super: rootfid is (01234567.ffffffff.08051a38.00000000)
> coda: Unexpected interruption.
> Failure of coda_cnode_make for root: error -4
> pccard: PCMCIA card inserted into slot 0
> cs: memory probe 0x0c0000-0x0fffff: excluding 0xc0000-0xd3fff 0xdc000-0xfffff
> cs: memory probe 0x60000000-0x60ffffff: excluding 0x60000000-0x60ffffff
> cs: memory probe 0xe0000000-0xe3ffffff: excluding 0xe0000000-0xe3ffffff
> cs: memory probe 0xe4300000-0xe7ffffff: excluding 0xe4300000-0xe46cffff 0xe4e70000-0xe523ffff 0xe5db0000-0xe617ffff 0xe6cf0000-0xe70bffff
> pcmcia: registering new device pcmcia0.0
> Probing IDE interface ide1...
> hdc: SunDisk SDP3B-20, CFA DISK drive
> hdd: SunDisk SDP3B-20, CFA DISK drive
> ide-probe: ignoring undecoded slave
> ide1 at 0x9100-0x9107,0x910e on irq 16
> hdc: max request size: 128KiB
> hdc: 40960 sectors (20 MB) w/1KiB Cache, CHS=640/2/32
>  hdc:hdc: set_geometry_intr: status=0x51 { DriveReady SeekComplete Error }
> hdc: set_geometry_intr: error=0x04 { DriveStatusError }
> ide: failed opcode was: unknown
>  hdc1 hdc3
> ide-cs: hdc: Vpp = 0.0
> Clocksource tsc unstable (delta = -68835537 ns)
> pccard: card ejected from slot 0
> INFO: task pccardd:1121 blocked for more than 120 seconds.
> "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
> pccardd       D f6dd1e1c     0  1121      2
>        f6dd1e30 00000086 00000002 f6dd1e1c f6dd1e10 00000000 c2015e80 c2015e80 
>        c09113e0 00000286 00000286 f72d13b8 f72d1618 c2015e80 f6dd0000 f6afedc0 
>        ffff03a9 f6bcb458 00000000 c02bd187 00000000 f6dd1e4c 00000003 00000000 
> Call Trace:
>  [<c02bd187>] sysfs_addrm_finish+0x1a7/0x1e0
>  [<c072edec>] schedule_timeout+0x7c/0xd0
>  [<c02bd1e7>] remove_dir+0x27/0x40
>  [<c0730b9a>] _spin_lock_irq+0x2a/0x40
>  [<c072e240>] wait_for_common+0xc0/0x130
>  [<c021f5c0>] default_wake_function+0x0/0x10
>  [<c04d489f>] ide_unregister+0xcf/0x150
>  [<c04e5671>] ide_release+0x21/0x40
>  [<c04e56b9>] ide_detach+0x29/0x80
>  [<c0520146>] pcmcia_device_remove+0x36/0xe0
>  [<c0423116>] __device_release_driver+0x56/0x90
>  [<c0423210>] device_release_driver+0x20/0x40
>  [<c04225bb>] bus_remove_device+0x6b/0x90
>  [<c04210cf>] device_del+0xcf/0x140
>  [<c0421148>] device_unregister+0x8/0x10
>  [<c051fb7c>] pcmcia_card_remove+0x6c/0x80
>  [<c0520a34>] ds_event+0x64/0xb0
>  [<c051c12f>] pccardd+0x16f/0x2a0
>  [<c051b7fb>] send_event+0x4b/0x80
>  [<c051ba6b>] socket_shutdown+0xb/0xd0
>  [<c051bb4c>] socket_remove+0x1c/0x30
>  [<c051c1fe>] pccardd+0x23e/0x2a0
>  [<c021f5c0>] default_wake_function+0x0/0x10
>  [<c051bfc0>] pccardd+0x0/0x2a0
>  [<c023c3f2>] kthread+0x42/0x70
>  [<c023c3b0>] kthread+0x0/0x70
>  [<c02047ab>] kernel_thread_helper+0x7/0x1c
>  [<c04216f2>] device_create_vargs+0x42/0xd0
>  =======================
> no locks held by pccardd/1121.
> INFO: task pccardd:1121 blocked for more than 120 seconds.
> "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
> pccardd       D f6dd1e1c     0  1121      2
>        f6dd1e30 00000086 00000002 f6dd1e1c f6dd1e10 00000000 c2015e80 c2015e80 
>        c09113e0 00000286 00000286 f72d13b8 f72d1618 c2015e80 f6dd0000 f6afedc0 
>        ffff03a9 f6bcb458 00000000 c02bd187 00000000 f6dd1e4c 00000003 00000000 
> Call Trace:
>  [<c02bd187>] sysfs_addrm_finish+0x1a7/0x1e0
>  [<c072edec>] schedule_timeout+0x7c/0xd0
>  [<c02bd1e7>] remove_dir+0x27/0x40
>  [<c0730b9a>] _spin_lock_irq+0x2a/0x40
>  [<c072e240>] wait_for_common+0xc0/0x130
>  [<c021f5c0>] default_wake_function+0x0/0x10
>  [<c04d489f>] ide_unregister+0xcf/0x150
>  [<c04e5671>] ide_release+0x21/0x40
>  [<c04e56b9>] ide_detach+0x29/0x80
>  [<c0520146>] pcmcia_device_remove+0x36/0xe0
>  [<c0423116>] __device_release_driver+0x56/0x90
>  [<c0423210>] device_release_driver+0x20/0x40
>  [<c04225bb>] bus_remove_device+0x6b/0x90
>  [<c04210cf>] device_del+0xcf/0x140
>  [<c0421148>] device_unregister+0x8/0x10
>  [<c051fb7c>] pcmcia_card_remove+0x6c/0x80
>  [<c0520a34>] ds_event+0x64/0xb0
>  [<c051c12f>] pccardd+0x16f/0x2a0
>  [<c051b7fb>] send_event+0x4b/0x80
>  [<c051ba6b>] socket_shutdown+0xb/0xd0
>  [<c051bb4c>] socket_remove+0x1c/0x30
>  [<c051c1fe>] pccardd+0x23e/0x2a0
>  [<c021f5c0>] default_wake_function+0x0/0x10
>  [<c051bfc0>] pccardd+0x0/0x2a0
>  [<c023c3f2>] kthread+0x42/0x70
>  [<c023c3b0>] kthread+0x0/0x70
>  [<c02047ab>] kernel_thread_helper+0x7/0x1c
>  [<c04216f2>] device_create_vargs+0x42/0xd0
>  =======================
> no locks held by pccardd/1121.
> 

Hmm, hitting sysrq-w produces no blocked task until I eject pcmcia
card. Backtrace there is:

Greg, I believe some traces lead to sysfs, can you help here?

								Pavel 


SysRq : Show Blocked State
  task                PC stack   pid father
pccardd       D f7fb53b8     0  1121      2
       f6d37e30 00000086 00000000 f7fb53b8 00000002 f7c71ef0 c2015e80
c2015e80
       00000282 834ba19e 0000001a f7fb53b8 f7fb5618 c2015e80 f6d36000
f68ccdc0
       f6d37e08 00013c4d 00000000 c085d5dd 00000000 f6d37e4c 00000000
00000000
Call Trace:
 [<c072ee3c>] schedule_timeout+0x7c/0xd0
 [<c02bd237>] remove_dir+0x27/0x40
 [<c0730bea>] _spin_lock_irq+0x2a/0x40
 [<c072e290>] wait_for_common+0xc0/0x130
 [<c021f5c0>] default_wake_function+0x0/0x10
 [<c04d48ef>] ide_unregister+0xcf/0x150
 [<c04e56c1>] ide_release+0x21/0x40
 [<c04e5709>] ide_detach+0x29/0x80
 [<c0520196>] pcmcia_device_remove+0x36/0xe0
 [<c0423166>] __device_release_driver+0x56/0x90
 [<c0423260>] device_release_driver+0x20/0x40
 [<c042260b>] bus_remove_device+0x6b/0x90
 [<c042111f>] device_del+0xcf/0x140
 [<c0421198>] device_unregister+0x8/0x10
 [<c051fbcc>] pcmcia_card_remove+0x6c/0x80
 [<c0520a84>] ds_event+0x64/0xb0
 [<c051c17f>] pccardd+0x16f/0x2a0
 [<c051b84b>] send_event+0x4b/0x80
 [<c051babb>] socket_shutdown+0xb/0xd0
 [<c051bb9c>] socket_remove+0x1c/0x30
 [<c051c24e>] pccardd+0x23e/0x2a0
 [<c021f5c0>] default_wake_function+0x0/0x10
 [<c051c010>] pccardd+0x0/0x2a0
 [<c023c3f2>] kthread+0x42/0x70
 [<c023c3b0>] kthread+0x0/0x70
 [<c02047ab>] kernel_thread_helper+0x7/0x1c
 [<c0376762>] blk_alloc_queue_node+0x12/0x90
 =======================
Sched Debug Version: v0.07, 2.6.26-rc8 #308
now at 162851.680956 msecs


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [regression] Re: 2.6.26-rc6: pcmcia stopped working
  2008-06-25 21:53           ` Pavel Machek
@ 2008-06-25 22:09             ` Pavel Machek
  2008-06-25 22:15               ` Pavel Machek
  0 siblings, 1 reply; 14+ messages in thread
From: Pavel Machek @ 2008-06-25 22:09 UTC (permalink / raw)
  To: kernel list, Rafael J. Wysocki, linux-pcmcia, bzolnier,
	linux-ide, Greg KH

Hi!

> > > Thinkpad X60.
> > 
> > Hmm, but with -rc8, I actually got some useful info:
> > 
> > kjournald starting.  Commit interval 5 seconds
> > EXT3-fs: mounted filesystem with ordered data mode.
> > VFS: Mounted root (ext3 filesystem) readonly.
> > debug: unmapping init memory c099f000..c09ef000
> > Write protecting the kernel text: 5320k
> > Write protecting the kernel read-only data: 1916k
> > Failed to execute /tmp/swsusp-init.  Attempting defaults...
> > EXT3 FS on sda4, internal journal
> > Adding 987988k swap on /dev/sda1.  Priority:-1 extents:1 across:987988k
> > kjournald starting.  Commit interval 5 seconds
> > EXT3 FS on sda2, internal journal
> > EXT3-fs: mounted filesystem with ordered data mode.
> > pcmcia: Detected deprecated PCMCIA ioctl usage from process: hwclock.
> > pcmcia: This interface will soon be removed from the kernel; please expect breakage unless you upgrade to new tools.
> > pcmcia: see http://www.kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html for details.
> > eth0: Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
> > coda_read_super: Bad mount data
> > coda_read_super: device index: 0
> > coda_read_super: rootfid is (01234567.ffffffff.08051a38.00000000)
> > coda: Unexpected interruption.
> > Failure of coda_cnode_make for root: error -4
> > pccard: PCMCIA card inserted into slot 0
> > cs: memory probe 0x0c0000-0x0fffff: excluding 0xc0000-0xd3fff 0xdc000-0xfffff
> > cs: memory probe 0x60000000-0x60ffffff: excluding 0x60000000-0x60ffffff
> > cs: memory probe 0xe0000000-0xe3ffffff: excluding 0xe0000000-0xe3ffffff
> > cs: memory probe 0xe4300000-0xe7ffffff: excluding 0xe4300000-0xe46cffff 0xe4e70000-0xe523ffff 0xe5db0000-0xe617ffff 0xe6cf0000-0xe70bffff
> > pcmcia: registering new device pcmcia0.0
> > Probing IDE interface ide1...
> > hdc: SunDisk SDP3B-20, CFA DISK drive
> > hdd: SunDisk SDP3B-20, CFA DISK drive
> > ide-probe: ignoring undecoded slave
> > ide1 at 0x9100-0x9107,0x910e on irq 16
> > hdc: max request size: 128KiB
> > hdc: 40960 sectors (20 MB) w/1KiB Cache, CHS=640/2/32
> >  hdc:hdc: set_geometry_intr: status=0x51 { DriveReady SeekComplete Error }
> > hdc: set_geometry_intr: error=0x04 { DriveStatusError }
> > ide: failed opcode was: unknown
> >  hdc1 hdc3
> > ide-cs: hdc: Vpp = 0.0
> > Clocksource tsc unstable (delta = -68835537 ns)
> > pccard: card ejected from slot 0
> > INFO: task pccardd:1121 blocked for more than 120 seconds.
> > "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
> > pccardd       D f6dd1e1c     0  1121      2
> >        f6dd1e30 00000086 00000002 f6dd1e1c f6dd1e10 00000000 c2015e80 c2015e80 
> >        c09113e0 00000286 00000286 f72d13b8 f72d1618 c2015e80 f6dd0000 f6afedc0 
> >        ffff03a9 f6bcb458 00000000 c02bd187 00000000 f6dd1e4c 00000003 00000000 
> > Call Trace:
> >  [<c02bd187>] sysfs_addrm_finish+0x1a7/0x1e0
> >  [<c072edec>] schedule_timeout+0x7c/0xd0
> >  [<c02bd1e7>] remove_dir+0x27/0x40
> >  [<c0730b9a>] _spin_lock_irq+0x2a/0x40
> >  [<c072e240>] wait_for_common+0xc0/0x130
> >  [<c021f5c0>] default_wake_function+0x0/0x10
> >  [<c04d489f>] ide_unregister+0xcf/0x150
> >  [<c04e5671>] ide_release+0x21/0x40
> >  [<c04e56b9>] ide_detach+0x29/0x80
> >  [<c0520146>] pcmcia_device_remove+0x36/0xe0
> >  [<c0423116>] __device_release_driver+0x56/0x90
> >  [<c0423210>] device_release_driver+0x20/0x40
> >  [<c04225bb>] bus_remove_device+0x6b/0x90
> >  [<c04210cf>] device_del+0xcf/0x140
> >  [<c0421148>] device_unregister+0x8/0x10
> >  [<c051fb7c>] pcmcia_card_remove+0x6c/0x80
> >  [<c0520a34>] ds_event+0x64/0xb0
> >  [<c051c12f>] pccardd+0x16f/0x2a0
> >  [<c051b7fb>] send_event+0x4b/0x80
> >  [<c051ba6b>] socket_shutdown+0xb/0xd0
> >  [<c051bb4c>] socket_remove+0x1c/0x30
> >  [<c051c1fe>] pccardd+0x23e/0x2a0
> >  [<c021f5c0>] default_wake_function+0x0/0x10
> >  [<c051bfc0>] pccardd+0x0/0x2a0
> >  [<c023c3f2>] kthread+0x42/0x70
> >  [<c023c3b0>] kthread+0x0/0x70
> >  [<c02047ab>] kernel_thread_helper+0x7/0x1c
> >  [<c04216f2>] device_create_vargs+0x42/0xd0
> >  =======================
> > no locks held by pccardd/1121.
> > INFO: task pccardd:1121 blocked for more than 120 seconds.
> > "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
> > pccardd       D f6dd1e1c     0  1121      2
> >        f6dd1e30 00000086 00000002 f6dd1e1c f6dd1e10 00000000 c2015e80 c2015e80 
> >        c09113e0 00000286 00000286 f72d13b8 f72d1618 c2015e80 f6dd0000 f6afedc0 
> >        ffff03a9 f6bcb458 00000000 c02bd187 00000000 f6dd1e4c 00000003 00000000 
> > Call Trace:
> >  [<c02bd187>] sysfs_addrm_finish+0x1a7/0x1e0
> >  [<c072edec>] schedule_timeout+0x7c/0xd0
> >  [<c02bd1e7>] remove_dir+0x27/0x40
> >  [<c0730b9a>] _spin_lock_irq+0x2a/0x40
> >  [<c072e240>] wait_for_common+0xc0/0x130
> >  [<c021f5c0>] default_wake_function+0x0/0x10
> >  [<c04d489f>] ide_unregister+0xcf/0x150
> >  [<c04e5671>] ide_release+0x21/0x40
> >  [<c04e56b9>] ide_detach+0x29/0x80
> >  [<c0520146>] pcmcia_device_remove+0x36/0xe0
> >  [<c0423116>] __device_release_driver+0x56/0x90
> >  [<c0423210>] device_release_driver+0x20/0x40
> >  [<c04225bb>] bus_remove_device+0x6b/0x90
> >  [<c04210cf>] device_del+0xcf/0x140
> >  [<c0421148>] device_unregister+0x8/0x10
> >  [<c051fb7c>] pcmcia_card_remove+0x6c/0x80
> >  [<c0520a34>] ds_event+0x64/0xb0
> >  [<c051c12f>] pccardd+0x16f/0x2a0
> >  [<c051b7fb>] send_event+0x4b/0x80
> >  [<c051ba6b>] socket_shutdown+0xb/0xd0
> >  [<c051bb4c>] socket_remove+0x1c/0x30
> >  [<c051c1fe>] pccardd+0x23e/0x2a0
> >  [<c021f5c0>] default_wake_function+0x0/0x10
> >  [<c051bfc0>] pccardd+0x0/0x2a0
> >  [<c023c3f2>] kthread+0x42/0x70
> >  [<c023c3b0>] kthread+0x0/0x70
> >  [<c02047ab>] kernel_thread_helper+0x7/0x1c
> >  [<c04216f2>] device_create_vargs+0x42/0xd0
> >  =======================
> > no locks held by pccardd/1121.
> > 
> 
> Hmm, hitting sysrq-w produces no blocked task until I eject pcmcia
> card. Backtrace there is:
> 
> Greg, I believe some traces lead to sysfs, can you help here?

ide_unregister() does not complete :-(.

        device_unregister(&hwif->gendev);
+       printk("ide_unregister: waiting for rel_comp\n");
        wait_for_completion(&hwif->gendev_rel_comp);

...that wait_for_completion never returns.


I added some debug prints:

Jun 25 23:59:21 amd cardmgr[1389]: start cmd exited with status 1
Jun 25 23:59:25 amd kernel: pccard: card ejected from slot 0
Jun 25 23:59:25 amd kernel: ide_unregister
Jun 25 23:59:25 amd kernel: ide_unregister: have lock
Jun 25 23:59:25 amd kernel: ide_unregister: have spinlock
Jun 25 23:59:25 amd kernel: ide_unregister: port_unregister
Jun 25 23:59:25 amd kernel: ide_unregister: proc_unregister
Jun 25 23:59:25 amd kernel: ide_unregister: free_irq
Jun 25 23:59:25 amd kernel: ide_unregister: remove from hwgroup
Jun 25 23:59:25 amd kernel: ide_unregister: waiting for rel_comp
Jun 25 23:59:26 amd kernel: Clocksource tsc unstable (delta = -63083806 ns)

diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index c758dcb..2c4dc7e 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -313,17 +313,22 @@ void ide_unregister(ide_hwif_t *hwif)
 	ide_hwgroup_t *hwgroup;
 	int irq_count = 0;
 
+	printk("ide_unregister\n");
 	BUG_ON(in_interrupt());
 	BUG_ON(irqs_disabled());
 	mutex_lock(&ide_cfg_mtx);
+	printk("ide_unregister: have lock\n");
 	spin_lock_irq(&ide_lock);
+	printk("ide_unregister: have spinlock\n");
 	if (!hwif->present)
 		goto abort;
+	printk("ide_unregister: port_unregister\n");
 	__ide_port_unregister_devices(hwif);
 	hwif->present = 0;
 
 	spin_unlock_irq(&ide_lock);
 
+	printk("ide_unregister: proc_unregister\n");
 	ide_proc_unregister_port(hwif);
 
 	hwgroup = hwif->hwgroup;
@@ -336,29 +341,37 @@ void ide_unregister(ide_hwif_t *hwif)
 			++irq_count;
 		g = g->next;
 	} while (g != hwgroup->hwif);
+	printk("ide_unregister: free_irq\n");
 	if (irq_count == 1)
 		free_irq(hwif->irq, hwgroup);
 
+	printk("ide_unregister: remove from hwgroup\n");
 	ide_remove_port_from_hwgroup(hwif);
 
 	device_unregister(hwif->portdev);
 	device_unregister(&hwif->gendev);
+	printk("ide_unregister: waiting for rel_comp\n");
 	wait_for_completion(&hwif->gendev_rel_comp);
 
 	/*
 	 * Remove us from the kernel's knowledge
 	 */
+	printk("ide_unregister: blk unregister\n");
 	blk_unregister_region(MKDEV(hwif->major, 0), MAX_DRIVES<<PARTN_BITS);
 	kfree(hwif->sg_table);
 	unregister_blkdev(hwif->major, hwif->name);
 	spin_lock_irq(&ide_lock);
 
+	printk("ide_unregister: dma engine\n");
 	if (hwif->dma_base)
 		ide_release_dma_engine(hwif);
 
+	printk("ide_unregister: reset port_data\n");
 	/* restore hwif data to pristine status */
 	ide_init_port_data(hwif, hwif->index);
 
+	printk("ide_unregister: done\n");
+
 abort:
 	spin_unlock_irq(&ide_lock);
 	mutex_unlock(&ide_cfg_mtx);



-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [regression] Re: 2.6.26-rc6: pcmcia stopped working
  2008-06-25 22:09             ` Pavel Machek
@ 2008-06-25 22:15               ` Pavel Machek
  2008-07-05 12:48                 ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 14+ messages in thread
From: Pavel Machek @ 2008-06-25 22:15 UTC (permalink / raw)
  To: kernel list, Rafael J. Wysocki, linux-pcmcia, bzolnier,
	linux-ide, Greg KH

Hi!

> > Hmm, hitting sysrq-w produces no blocked task until I eject pcmcia
> > card. Backtrace there is:
> > 
> > Greg, I believe some traces lead to sysfs, can you help here?
> 
> ide_unregister() does not complete :-(.
> 
>         device_unregister(&hwif->gendev);
> +       printk("ide_unregister: waiting for rel_comp\n");
>         wait_for_completion(&hwif->gendev_rel_comp);
> 
> ...that wait_for_completion never returns.

...and this fixes PCMCIA/IDE for me... (Pseudopatch)

								Pavel

diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -336,29 +341,38 @@ void ide_unregister(ide_hwif_t *hwif)
 			++irq_count;
 		g = g->next;
 	} while (g != hwgroup->hwif);
 	if (irq_count == 1)
 		free_irq(hwif->irq, hwgroup);
 
 	ide_remove_port_from_hwgroup(hwif);
 
 	device_unregister(hwif->portdev);
 	device_unregister(&hwif->gendev);
-	wait_for_completion(&hwif->gendev_rel_comp);
+//	wait_for_completion(&hwif->gendev_rel_comp);
+	msleep(1000);
 
 	/*
 	 * Remove us from the kernel's knowledge
 	 */

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [regression] Re: 2.6.26-rc6: pcmcia stopped working
  2008-06-25 22:15               ` Pavel Machek
@ 2008-07-05 12:48                 ` Bartlomiej Zolnierkiewicz
  2008-07-05 22:46                   ` Pavel Machek
  0 siblings, 1 reply; 14+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-07-05 12:48 UTC (permalink / raw)
  To: Pavel Machek
  Cc: kernel list, Rafael J. Wysocki, linux-pcmcia, linux-ide, Greg KH


Hi,

On Thursday 26 June 2008, Pavel Machek wrote:
> Hi!
> 
> > > Hmm, hitting sysrq-w produces no blocked task until I eject pcmcia
> > > card. Backtrace there is:
> > > 
> > > Greg, I believe some traces lead to sysfs, can you help here?
> > 
> > ide_unregister() does not complete :-(.
> > 
> >         device_unregister(&hwif->gendev);
> > +       printk("ide_unregister: waiting for rel_comp\n");
> >         wait_for_completion(&hwif->gendev_rel_comp);
> > 
> > ...that wait_for_completion never returns.

[...]

Thanks for narrowing it down to wait_for_completion() call,
it was an useful hint.

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] ide: fix hwif->gendev refcounting

class->dev_release is called by device_release() iff dev->release
is not present so ide_port_class_release() is never called and the
last hwif->gendev reference is not dropped.

Fix it by removing ide_port_class_release() and get_device() call
from ide_register_port() (device_create_drvdata() takes a hwif->gendev
reference anyway).

This patch fixes hang on wait_for_completion(&hwif->gendev_rel_comp)
in ide_unregister() reported by Pavel Machek.

Cc: Pavel Machek <pavel@suse.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide-probe.c |    2 --
 drivers/ide/ide.c       |    8 --------
 2 files changed, 10 deletions(-)

Index: b/drivers/ide/ide-probe.c
===================================================================
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -646,8 +646,6 @@ static int ide_register_port(ide_hwif_t 
 		goto out;
 	}
 
-	get_device(&hwif->gendev);
-
 	hwif->portdev = device_create_drvdata(ide_port_class, &hwif->gendev,
 					      MKDEV(0, 0), hwif, hwif->name);
 	if (IS_ERR(hwif->portdev)) {
Index: b/drivers/ide/ide.c
===================================================================
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -1094,13 +1094,6 @@ struct bus_type ide_bus_type = {
 
 EXPORT_SYMBOL_GPL(ide_bus_type);
 
-static void ide_port_class_release(struct device *portdev)
-{
-	ide_hwif_t *hwif = dev_get_drvdata(portdev);
-
-	put_device(&hwif->gendev);
-}
-
 int ide_vlb_clk;
 EXPORT_SYMBOL_GPL(ide_vlb_clk);
 
@@ -1305,7 +1298,6 @@ static int __init ide_init(void)
 		ret = PTR_ERR(ide_port_class);
 		goto out_port_class;
 	}
-	ide_port_class->dev_release = ide_port_class_release;
 
 	init_ide_data();
 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [regression] Re: 2.6.26-rc6: pcmcia stopped working
  2008-07-05 12:48                 ` Bartlomiej Zolnierkiewicz
@ 2008-07-05 22:46                   ` Pavel Machek
  2008-07-06 12:35                     ` Pavel Machek
  2008-07-08 18:06                     ` Bartlomiej Zolnierkiewicz
  0 siblings, 2 replies; 14+ messages in thread
From: Pavel Machek @ 2008-07-05 22:46 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: kernel list

Hi!

> > > > Hmm, hitting sysrq-w produces no blocked task until I eject pcmcia
> > > > card. Backtrace there is:
> > > > 
> > > > Greg, I believe some traces lead to sysfs, can you help here?
> > > 
> > > ide_unregister() does not complete :-(.
> > > 
> > >         device_unregister(&hwif->gendev);
> > > +       printk("ide_unregister: waiting for rel_comp\n");
> > >         wait_for_completion(&hwif->gendev_rel_comp);
> > > 
> > > ...that wait_for_completion never returns.
> 
> [...]
> 
> Thanks for narrowing it down to wait_for_completion() call,
> it was an useful hint.

Thanks for a patch, I'll test it soon. Here are two really trivial
patches... maybe too trivial?

---

Small whitespace fixes for drivers/ide.

Signed-off-by: Pavel Machek <pavel@suse.cz>

diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 380fa0c..df70d36 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -617,7 +617,7 @@ static inline u8 probe_for_drive (ide_dr
 	return drive->present;
 }
 
-static void hwif_release_dev (struct device *dev)
+static void hwif_release_dev(struct device *dev)
 {
 	ide_hwif_t *hwif = container_of(dev, ide_hwif_t, gendev);
 
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index c758dcb..846bcfb 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -1,6 +1,6 @@
 /*
  *  Copyright (C) 1994-1998	    Linus Torvalds & authors (see below)
- *  Copyrifht (C) 2003-2005, 2007   Bartlomiej Zolnierkiewicz
+ *  Copyright (C) 2003-2005, 2007   Bartlomiej Zolnierkiewicz
  */
 
 /*


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [regression] Re: 2.6.26-rc6: pcmcia stopped working
  2008-07-05 22:46                   ` Pavel Machek
@ 2008-07-06 12:35                     ` Pavel Machek
  2008-07-08 18:06                     ` Bartlomiej Zolnierkiewicz
  1 sibling, 0 replies; 14+ messages in thread
From: Pavel Machek @ 2008-07-06 12:35 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: kernel list, Rafael J. Wysocki

On Sun 2008-07-06 00:46:31, Pavel Machek wrote:
> Hi!
> 
> > > > > Hmm, hitting sysrq-w produces no blocked task until I eject pcmcia
> > > > > card. Backtrace there is:
> > > > > 
> > > > > Greg, I believe some traces lead to sysfs, can you help here?
> > > > 
> > > > ide_unregister() does not complete :-(.
> > > > 
> > > >         device_unregister(&hwif->gendev);
> > > > +       printk("ide_unregister: waiting for rel_comp\n");
> > > >         wait_for_completion(&hwif->gendev_rel_comp);
> > > > 
> > > > ...that wait_for_completion never returns.
> > 
> > [...]
> > 
> > Thanks for narrowing it down to wait_for_completion() call,
> > it was an useful hint.

Patched version seems to work here, thanks.

Tested-by: Pavel Machek <pavel@suse.cz>

There's still some funny stuff going on: Trying to free nonexistent
resource <> seems to indicate a code problem somewhere, and "hdc:
set_geometry_intr: error" is slightly scary, but the flash card seems
to work ok.
								Pavel

PM: Resume from disk failed.
Probing IDE interface ide1...
hdc: SunDisk SDP3B-20, CFA DISK drive
hdd: SunDisk SDP3B-20, CFA DISK drive
ide-probe: ignoring undecoded slave
ide1 at 0x9100-0x9107,0x910e on irq 16
hdc: max request size: 128KiB
hdc: 40960 sectors (20 MB) w/1KiB Cache, CHS=640/2/32
 hdc:hdc: set_geometry_intr: status=0x51 { DriveReady SeekComplete
Error }
hdc: set_geometry_intr: error=0x04 { DriveStatusError }
ide: failed opcode was: unknown
 hdc1 hdc3
ide-cs: hdc: Vpp = 0.0
md: Autodetecting RAID arrays.
md: Scanned 0 and added 0 devices.
md: autorun ...
md: ... autorun DONE.
...
Failure of coda_cnode_make for root: error -4
pccard: card ejected from slot 0
Trying to free nonexistent resource <000000000000910e-000000000000910e>
Trying to free nonexistent resource <0000000000009100-0000000000009107>
pccard: PCMCIA card inserted into slot 0
pcmcia: registering new device pcmcia0.0
Probing IDE interface ide1...
hdc: SunDisk SDP3B-20, CFA DISK drive
hdd: SunDisk SDP3B-20, CFA DISK drive
ide-probe: ignoring undecoded slave
ide1 at 0x9100-0x9107,0x910e on irq 16
hdc: max request size: 128KiB
hdc: 40960 sectors (20 MB) w/1KiB Cache, CHS=640/2/32
 hdc:hdc: set_geometry_intr: status=0x51 { DriveReady SeekComplete Error }
hdc: set_geometry_intr: error=0x04 { DriveStatusError }
ide: failed opcode was: unknown
 hdc1 hdc3
ide-cs: hdc: Vpp = 0.0
Clocksource tsc unstable (delta = -63722496 ns)





-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [regression] Re: 2.6.26-rc6: pcmcia stopped working
  2008-07-05 22:46                   ` Pavel Machek
  2008-07-06 12:35                     ` Pavel Machek
@ 2008-07-08 18:06                     ` Bartlomiej Zolnierkiewicz
  1 sibling, 0 replies; 14+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-07-08 18:06 UTC (permalink / raw)
  To: Pavel Machek; +Cc: kernel list

On Sunday 06 July 2008, Pavel Machek wrote:
> Hi!
> 
> > > > > Hmm, hitting sysrq-w produces no blocked task until I eject pcmcia
> > > > > card. Backtrace there is:
> > > > > 
> > > > > Greg, I believe some traces lead to sysfs, can you help here?
> > > > 
> > > > ide_unregister() does not complete :-(.
> > > > 
> > > >         device_unregister(&hwif->gendev);
> > > > +       printk("ide_unregister: waiting for rel_comp\n");
> > > >         wait_for_completion(&hwif->gendev_rel_comp);
> > > > 
> > > > ...that wait_for_completion never returns.
> > 
> > [...]
> > 
> > Thanks for narrowing it down to wait_for_completion() call,
> > it was an useful hint.
> 
> Thanks for a patch, I'll test it soon. Here are two really trivial
> patches... maybe too trivial?

there are no too trivial patches in the git era :)

> ---
> 
> Small whitespace fixes for drivers/ide.
> 
> Signed-off-by: Pavel Machek <pavel@suse.cz>

applied

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-07-08 18:51 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-22 22:40 2.6.26-rc6: pcmcia stopped working after resume Pavel Machek
2008-06-23  8:13 ` Dominik Brodowski
2008-06-23  8:18   ` Pavel Machek
2008-06-23  8:30     ` Dominik Brodowski
2008-06-25 10:23       ` [regression] Re: 2.6.26-rc6: pcmcia stopped working Pavel Machek
2008-06-25 11:01         ` Pavel Machek
2008-06-25 12:03           ` Tejun Heo
2008-06-25 21:53           ` Pavel Machek
2008-06-25 22:09             ` Pavel Machek
2008-06-25 22:15               ` Pavel Machek
2008-07-05 12:48                 ` Bartlomiej Zolnierkiewicz
2008-07-05 22:46                   ` Pavel Machek
2008-07-06 12:35                     ` Pavel Machek
2008-07-08 18:06                     ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).