[PATCH] pcmcia: new socket initialization interface
Russell King
rmk at arm.linux.org.uk
Mon May 26 00:14:24 BST 2003
On Sat, May 17, 2003 at 10:14:04PM +0200, Dominik Brodowski wrote:
> @@ -409,85 +466,78 @@
> /**
> * pcmcia_register_socket - add a new pcmcia socket device
> */
> -int pcmcia_register_socket(struct class_device *class_dev)
> +unsigned int pcmcia_register_socket(struct pcmcia_socket *socket)
Why this change? We still return -ENOMEM from here, so we shouldn't
change this to unsigned.
Also, with all these patches applied, I'm seeing a deadlock in
get_s_info_by_nr() - we have taken the lock in pcmcia_socket_dev_suspend().
Would a read/write lock be more appropriate for pcmcia_socket_list_lock?
[<c0237270>] (schedule+0x0/0x45c) from [<c02256a0>] (__down+0xe0/0x170)
[<c02255c0>] (__down+0x0/0x170) from [<c02259ac>] (__down_failed+0xc/0x20)
[<c033fed0>] (get_s_info_by_nr+0x0/0xcc) from [<c034234c>] (pcmcia_release_configuration+0x6c/0x140)
[<c03422e0>] (pcmcia_release_configuration+0x0/0x140) from [<c0343804>] (CardServices+0x27c/0x398)
[<c0343588>] (CardServices+0x0/0x398) from [<c03216b4>] (pcnet_event+0x25c/0x268)
[<c0321458>] (pcnet_event+0x0/0x268) from [<c0340800>] (send_event+0x70/0x80)
[<c0340790>] (send_event+0x0/0x80) from [<c0340d20>] (socket_suspend+0x34/0x60)
[<c0340cec>] (socket_suspend+0x0/0x60) from [<c034006c>] (pcmcia_socket_dev_suspend+0xd0/0x100)
[<c033ff9c>] (pcmcia_socket_dev_suspend+0x0/0x100) from [<c02ea204>] (device_suspend+0x88/0xb8)
[<c02ea17c>] (device_suspend+0x0/0xb8) from [<c0229184>] (suspend+0x80/0xf4)
[<c0229104>] (suspend+0x0/0xf4) from [<c0229240>] (pm_sysctl_proc_handler+0x48/0x50)
[<c02291f8>] (pm_sysctl_proc_handler+0x0/0x50) from [<c024147c>] (do_rw_proc+0x9c/0xa8)
[<c02413e0>] (do_rw_proc+0x0/0xa8) from [<c02414f4>] (proc_writesys+0x34/0x38)
[<c02414c0>] (proc_writesys+0x0/0x38) from [<c0275a14>] (vfs_write+0xd8/0x124)
[<c027593c>] (vfs_write+0x0/0x124) from [<c0275ae4>] (sys_write+0x38/0x4c)
[<c0275aac>] (sys_write+0x0/0x4c) from [<c0222300>] (ret_fast_syscall+0x0/0x30)
--
Russell King (rmk at arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
More information about the linux-pcmcia
mailing list