linux-stable/drivers
Richard Ash 713e5f69d0 Staging: quatech_usb2: close, read, and some ioctl support
This patch implements close(), read(), write() and some ioctls, and
fixes some implementation issues in open(). Compared to the previous
patch it doesn't suffer an oops in the module code, however if you try
to open any of the serial devices a second time then an oops occurs in
tty_open(), presumably because my code isn't playing nicely on the
previous close():

Aug 13 11:44:01 [kernel] WARNING: at drivers/char/tty_io.c:1268 tty_open+0x3e5/0x46d()
Aug 13 11:44:01 [kernel] Hardware name: HP Compaq dc5100 MT(PW097ET)
Aug 13 11:44:01 [kernel] Modules linked in: quatech_usb2(C) usbserial snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss nls_iso8859_1 cifs xt_limit xt_NFLOG nfnetlink_log nfnetlink xt_tcpudp nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack iptable_filter ip_tables x_tables i915 fb drm i2c_algo_bit cfbcopyarea i2c_core video backlight output cfbimgblt cfbfillrect snd_intel8x0 snd_ac97_codec ehci_hcd ac97_bus uhci_hcd snd_pcm snd_timer usbcore snd ohci1394 psmouse ide_cd_mod cdrom tg3 soundcore snd_page_alloc ieee1394 libphy intel_agp agpgart floppy evdev [last unloaded: usbserial]
Aug 13 11:44:01 [kernel] Pid: 26765, comm: stty Tainted: G         C 2.6.31-rc5-git3-gkh #7
Aug 13 11:44:01 [kernel] Call Trace:
Aug 13 11:44:01 [kernel]  [<c11dbef8>] ? tty_open+0x3e5/0x46d
Aug 13 11:44:01 [kernel]  [<c10264e2>] warn_slowpath_common+0x88/0xb0
Aug 13 11:44:01 [kernel]  [<c11dbef8>] ? tty_open+0x3e5/0x46d
Aug 13 11:44:01 [kernel]  [<c102652b>] warn_slowpath_null+0x21/0x3b
Aug 13 11:44:01 [kernel]  [<c11dbef8>] tty_open+0x3e5/0x46d
Aug 13 11:44:01 [kernel]  [<c10883d1>] chrdev_open+0x77/0x113
Aug 13 11:44:01 [kernel]  [<c1083a5d>] __dentry_open+0xb8/0x230
Aug 13 11:44:01 [kernel]  [<c108835a>] ? chrdev_open+0x0/0x113
Aug 13 11:44:01 [kernel]  [<c1084993>] nameidata_to_filp+0x61/0x6a
Aug 13 11:44:01 [kernel]  [<c1091144>] do_filp_open+0x248/0x7cd
Aug 13 11:44:01 [kernel]  [<c106f14f>] ? __do_fault+0x2ba/0x3b2
Aug 13 11:44:01 [kernel]  [<c109a337>] ? alloc_fd+0x6a/0xf1
Aug 13 11:44:01 [kernel]  [<c1083804>] do_sys_open+0x5f/0x12b
Aug 13 11:44:01 [kernel]  [<c1083947>] sys_open+0x2e/0x47
Aug 13 11:44:01 [kernel]  [<c1002e4f>] sysenter_do_call+0x12/0x26
Aug 13 11:44:01 [kernel] ---[ end trace 1d6b9e2cd7636394 ]---
Aug 13 11:44:01 [kernel] BUG: unable to handle kernel NULL pointer dereference at 00000004
Aug 13 11:44:01 [kernel] IP: [<c1086538>] file_move+0x26/0x47
Aug 13 11:44:01 [kernel] *pde = 00000000 
Aug 13 11:44:01 [kernel] Modules linked in: quatech_usb2(C) usbserial snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss nls_iso8859_1 cifs xt_limit xt_NFLOG nfnetlink_log nfnetlink xt_tcpudp nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack iptable_filter ip_tables x_tables i915 fb drm i2c_algo_bit cfbcopyarea i2c_core video backlight output cfbimgblt cfbfillrect snd_intel8x0 snd_ac97_codec ehci_hcd ac97_bus uhci_hcd snd_pcm snd_timer usbcore snd ohci1394 psmouse ide_cd_mod cdrom tg3 soundcore snd_page_alloc ieee1394 libphy intel_agp agpgart floppy evdev [last unloaded: usbserial]
Aug 13 11:44:01 [kernel] Pid: 26765, comm: stty Tainted: G        WC (2.6.31-rc5-git3-gkh #7) HP Compaq dc5100 MT(PW097ET)
Aug 13 11:44:01 [kernel] EIP: 0060:[<c1086538>] EFLAGS: 00010282 CPU: 0
Aug 13 11:44:01 [kernel] EIP is at file_move+0x26/0x47
Aug 13 11:44:01 [kernel] EAX: 00000000 EBX: e593b508 ECX: ea7e9900 EDX: f734a888
Aug 13 11:44:01 [kernel] ESI: 00000000 EDI: 0bc00004 EBP: d8923e10 ESP: d8923e08
Aug 13 11:44:01 [kernel]  DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068
Aug 13 11:44:01 [kernel]  2ba6efc8 c8c93180 d8923e48 c11dbca7 ea7e9900 eed37e6c 00000000 00008800
Aug 13 11:44:01 [kernel] <0> 00000000 e593b400 e593b400 00000004 2ba6efc8 c8c93188 00000000 eed37e6c
Aug 13 11:44:01 [kernel] <0> d8923e68 c10883d1 ea7e9900 2ba6efc8 2ba6efc8 ea7e9900 eed37e6c ffffffe9
Aug 13 11:44:01 [kernel]  [<c11dbca7>] ? tty_open+0x194/0x46d
Aug 13 11:44:01 [kernel]  [<c10883d1>] ? chrdev_open+0x77/0x113
Aug 13 11:44:01 [kernel]  [<c1083a5d>] ? __dentry_open+0xb8/0x230
Aug 13 11:44:01 [kernel]  [<c108835a>] ? chrdev_open+0x0/0x113
Aug 13 11:44:01 [kernel]  [<c1084993>] ? nameidata_to_filp+0x61/0x6a
Aug 13 11:44:01 [kernel]  [<c1091144>] ? do_filp_open+0x248/0x7cd
Aug 13 11:44:01 [kernel]  [<c106f14f>] ? __do_fault+0x2ba/0x3b2
Aug 13 11:44:01 [kernel]  [<c109a337>] ? alloc_fd+0x6a/0xf1
Aug 13 11:44:01 [kernel]  [<c1083804>] ? do_sys_open+0x5f/0x12b
Aug 13 11:44:01 [kernel]  [<c1083947>] ? sys_open+0x2e/0x47
Aug 13 11:44:01 [kernel]  [<c1002e4f>] ? sysenter_do_call+0x12/0x26
Aug 13 11:44:01 [kernel] ---[ end trace 1d6b9e2cd7636395 ]---

Read and Write also do not work at the moment, and I'm fairly sure that
the URB completion callbacks are not running. Why this is I don't know,
and haven't tried to investigate.

Signed-off-by: Richard Ash <richard@audacityteam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:35 -07:00
..
accessibility
acpi Merge branch 'x86-txt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-15 09:19:20 -07:00
amba Merge branches 'arm', 'at91', 'bcmring', 'ep93xx', 'mach-types', 'misc' and 'w90x900' into devel 2009-09-12 12:01:34 +01:00
ata pata_rz1000: use printk_once 2009-09-11 02:33:59 -04:00
atm
auxdisplay
base PM: Reset transition_started at dpm_resume_noirq 2009-09-14 20:27:00 +02:00
block Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-09-15 09:51:09 -07:00
bluetooth
cdrom
char Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-09-15 09:51:09 -07:00
clocksource
connector
cpufreq Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2009-09-15 09:39:44 -07:00
cpuidle
crypto
dca
dio
dma at_hdmac: Rework suspend_late()/resume_early() 2009-09-14 20:27:00 +02:00
edac EDAC, AMD: decode FR MCEs 2009-09-14 19:01:37 +02:00
eisa
firewire Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2009-09-14 10:37:28 -07:00
firmware dmi: extend dmi_get_year() to dmi_get_date() 2009-09-08 21:17:48 -04:00
gpio
gpu i915: disable interrupts before tearing down GEM state 2009-09-08 17:09:24 -07:00
hid Merge branches 'upstream', 'upstream-fixes' and 'debugfs' into for-linus 2009-09-13 20:09:41 +02:00
hwmon
i2c
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-next-2.6 2009-09-15 10:01:16 -07:00
idle
ieee1394 drivers: Kill now superfluous ->last_rx stores 2009-09-02 23:07:36 -07:00
ieee802154 netdev: convert bulk of drivers to netdev_tx_t 2009-09-01 01:14:07 -07:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2009-09-14 10:37:28 -07:00
input Nicolas Pitre has a new email address 2009-09-15 09:37:12 -07:00
isdn isdn: convert to netdev_tx_t 2009-09-01 01:13:16 -07:00
leds
lguest
macintosh Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-09-15 09:51:09 -07:00
mca
md Merge branch 'for-2.6.32' of git://git.kernel.dk/linux-2.6-block 2009-09-14 17:55:15 -07:00
media Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 2009-09-15 09:22:18 -07:00
memstick
message Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2009-09-14 17:53:36 -07:00
mfd
misc Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2009-09-14 17:53:36 -07:00
mmc Merge branch 'master' into devel 2009-09-12 12:04:37 +01:00
mtd Nicolas Pitre has a new email address 2009-09-15 09:37:12 -07:00
net Nicolas Pitre has a new email address 2009-09-15 09:37:12 -07:00
nubus
of
oprofile
parisc
parport
pci Merge branch 'x86-txt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-15 09:19:20 -07:00
pcmcia
platform hp-wmi: Switch driver to dev_pm_ops 2009-09-14 20:26:59 +02:00
pnp
power
pps
ps3 powerpc/ps3: Workaround for flash memory I/O error 2009-09-11 11:28:00 +10:00
rapidio
regulator
rtc Nicolas Pitre has a new email address 2009-09-15 09:37:12 -07:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2009-09-14 17:53:36 -07:00
sbus
scsi Merge branch 'for-2.6.32' of git://git.kernel.dk/linux-2.6-block 2009-09-14 17:55:15 -07:00
serial Merge branch 'master' into devel 2009-09-12 12:04:37 +01:00
sh
sn
spi Merge branch 'master' into devel 2009-09-12 12:04:37 +01:00
ssb ssb: Implement SDIO host bus support 2009-09-09 11:19:00 -04:00
staging Staging: quatech_usb2: close, read, and some ioctl support 2009-09-15 12:01:35 -07:00
tc
telephony
thermal
uio
usb Merge branch 'master' into for-linus 2009-09-14 20:26:05 +02:00
uwb uwb: convert to netdev_tx_t 2009-09-01 01:13:44 -07:00
video Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-09-15 09:51:09 -07:00
virtio
vlynq
w1
watchdog
xen Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2009-09-15 09:39:44 -07:00
zorro
Kconfig
Makefile