aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wimax
Commit message (Collapse)AuthorAgeFilesLines
* Merge 3.0.60Pawit Pornkitprasan2013-01-222-0/+9
|\ | | | | | | Change-Id: I00b211aba537823b54ad68971ebb9032a6bf78f7
| * i2400m: add Intel 6150 device IDsDan Williams2013-01-172-0/+9
| | | | | | | | | | | | | | | | | | | | | | commit 999a7c5776a0ed2133645fa7e008bec05bda9254 upstream. Add device IDs for WiMAX function of Intel 6150 cards. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | net: wimax: suspend and resume issue in JBsangamanatha2012-05-101-0/+18
| | | | | | | | | | | | | | Added suspend and resume handlers in wimax driver. This will avoid sdio power off during suspend. Signed-off-by: sangamanatha <sangam.swamy@samsung.com>
* | Merge remote-tracking branch 'common/android-3.0' into ↵JP Abgrall2012-05-041-1/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | android-samsung-30-wip-mergedown * common/android-3.0: (135 commits) net: wireless: bcmdhd: Avoid turning radio UP twice on start cpufreq: interactive: add boost pulse interface net: wireless: bcmdhd: Set MMC_PM_KEEP_POWER flag on suspend net: wireless: bcmdhd: Update to Version 5.90.195.61 net: wireless: bcmdhd: Turn OFF wlan power if interface UP fails ARM: vfp: only clear vfp state for current cpu in vfp_pm_suspend arm: vfp: Fix memory corruption on PM suspend Linux 3.0.30 tcp: fix TCP_MAXSEG for established IPv6 passive sockets net ax25: Reorder ax25_exit to remove races. ksz884x: don't copy too much in netdev_set_mac_address() netns: do not leak net_generic data on failed init tcp: fix tcp_grow_window() for large incoming frames dummy: Add ndo_uninit(). net: usb: smsc75xx: fix mtu net_sched: gred: Fix oops in gred_dump() in WRED mode net/ethernet: ks8851_mll fix rx frame buffer overflow net: smsc911x: fix skb handling in receive path 8139cp: set intr mask after its handler is registered atl1: fix kernel panic in case of DMA errors ...
| * wimax: i2400m - prevent a possible kernel bug due to missing fw_name stringPhil Sutter2012-04-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | [ Upstream commit 4eee6a3a04e8bb53fbe7de0f64d0524d3fbe3f80 ] This happened on a machine with a custom hotplug script calling nameif, probably due to slow firmware loading. At the time nameif uses ethtool to gather interface information, i2400m->fw_name is zero and so a null pointer dereference occurs from within i2400m_get_drvinfo(). Signed-off-by: Phil Sutter <phil.sutter@viprinet.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | net: wimax: Padding problem fix.JP Abgrall2012-04-091-3/+1
| | | | | | | | | | | | | | | | skb.len adjustment on 64 byte boundary is not needed. Some sites and ping test resulted in packet send fail. Change-Id: Ic2cb5db9c732838ba4ca0c5ba44078bbecae75e7 Signed-off-by: sangamanatha <sangam.swamy@samsung.com>
* | net: wimax: driver panic because of mmc debug logsangamanatha2012-04-092-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wimax driver probe function set the firmware download timeout to 5sec. The debug logs in mmc/sdhc, results into f/w download timeout. But the receive thread continue to download the f/w image which is freed in probe function. 1. Increased the firmware download timeout to 12sec to include the debug output delays. 2. Released the receive thread immediately in case of f/w download timeout and before freeing the f/w image(wimax_image.data). Change-Id: Ibc39ace5a1b1a0e8df237d5df68d425bad9f29e7 Signed-off-by: sangamanatha <sangam.swamy@samsung.com>
* | net: wimax: fix system process not responding ANR.JP Abgrall2012-04-095-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the issue "5704273 system process not responding ANR every time after soft reboot of device". Issue can be reproduced by soft rebooting the device: adb root adb shell stop adb shell start The ANR was due to wimax power on fail due to wimax firmware download failure. The modem was not responding after driver send MSG_DRIVER_OK_REQ during f/w download process. The issue is fixed by retrying the MSG_DRIVER_OK_REQ again after waiting for 100ms, in case failed to get MSG_DRIVER_OK_RESP. Change-Id: Id6c9e4ae53dfcf9f1755cd8c9b5946f8a2c926aa Signed-off-by: sangamanatha <sangam.swamy@samsung.com>
* | net: wimax: redundant wakeup_assert removed.sangamanatha2011-11-171-2/+0
| | | | | | | | | | | | | | | | wakeup_assert will be done in send thread after queuing the packet, no need to do in control_send function. Change-Id: Icea139c3129df4bf90328ef3c948bae6156f3df0 Signed-off-by: sangamanatha <sangam.swamy@samsung.com>
* | net: wimax: prevent dpm timeout during device busysangamanatha2011-11-172-2/+11
| | | | | | | | | | | | | | | | Added mutex_trylock to check device busy state. added wake_lock to avoid suspend during send. Change-Id: Iaae7c952b3718e66e50eb26639415e4afc4b3d22 Signed-off-by: sangamanatha <sangam.swamy@samsung.com>
* | Revert "net: wimax: prevent dpm timeout in send during suspend"sangamanatha2011-11-172-8/+10
| | | | | | | | | | | | | | | | | | The removed mutex has an importance in maintaining concurrency in send and suspend code. So will be keeping the mutex and adding mutex_trylock in suspend code. This reverts commit 7b3fa7a7bf7027a8effa3cbe927e59d553a4503b.
* | net: wimax: prevent dpm timeout in send during suspendsangamanatha2011-11-172-10/+8
| | | | | | | | | | | | | | | | | | removed the mutex lock in wimax suspend which might hold driver suspend for long time causing dpm timeout. packet send error not handled in case data send during suspend. Change-Id: I28f24e14dd6451db3065d0a170b8d2ec035e4112 Signed-off-by: sangamanatha <sangam.swamy@samsung.com>
* | net: wimax: cmc7xx: alloc with GFP_ATOMIC in ctrlRom Lemarchand2011-11-171-2/+2
| | | | | | | | | | | | | | Using ATOMIC in control_send as it is scheduled under atomic. Change-Id: I44840db77b9867b8e53f87f245aa062b35824cba Signed-off-by: sangamanatha <sangam.swamy@samsung.com>
* | net: wimax: cmc7xx: alloc with GFP_ATOMIC in xmitsangamanatha2011-11-171-2/+2
| | | | | | | | | | Change-Id: Ibf65e0c0f9d93b2a09a56a908380e96807edb473 Signed-off-by: sangamanatha <sangam.swamy@samsung.com>
* | net: wimax: cmc7xx wimax modem state recoverysangamanatha2011-11-172-3/+10
| | | | | | | | | | | | | | | | | | Added error handling code to recover from the modem Idle state. mutex unlock set during error return case. Change-Id: Ic512283412c72d5d0a09dec4f308ec9704323e75 Signed-off-by: sangamanatha <sangam.swamy@samsung.com>
* | net: wimax: cmc7xx: release host when data send failssangamanatha2011-11-171-0/+1
| | | | | | | | | | Change-Id: Iaf20886b8541f227c1f36a714b1dc4b40c8ae5ec Signed-off-by: sangamanatha <sangam.swamy@samsung.com>
* | net: wimax: cmc7xx improved error handlingsangamanatha2011-11-172-6/+12
| | | | | | | | | | | | | | | | | | | | Driver changes to handle the modem Idle Wakeup fail condition. It will prevent the driver to go into unusable state in case modem did not wakeup. State change avoided in send.c as it will not affect operation Indentation changed. Code cleanup. Change-Id: I92e72abfe30a15d1b765dd119c34d7447ce88ea8 Signed-off-by: sangamanatha <sangam.swamy@samsung.com>
* | net:wimax: Wimax Driver code clean upsangamanatha2011-11-1714-767/+590
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed Kconfig in Wimax driver for debug enabling Added the new config flag for wimax driver debug logs. uwbrdev_open race condition removed check, which is not needed. Fixed the Index error in passing platform device data. Added for loop to passing driver platform data to different device id's. Removed all the global variables : g_pdata, g_adapter, g_wimax_image are removed and data passed through the id and used containerof(). Resume and Suspend Handlers: Implemented Resume and Suspend handlers for Wimax driver through platform device. Fixed the Kernel error message when WiMAX is enabled. Added wimax log enabling. Removed the global variable used for f/w download, and added file headers. Used the standard linux api for the linked list. Removed buffer.h and redundant codes. Change-Id: I022ae6bb1eb13947fe1b41bf1f4915997dbbf560 Signed-off-by: sangamanatha <sangam.swamy@samsung.com>
* | net: cmc7xx: fix NOHZ local_softirq_pending 08 warningRom Lemarchand2011-11-171-1/+1
| | | | | | | | | | | | | | | | This patch replaces netif_rx() with netif_rx_ni() since that call is not made from interrupt context which was the reason for all the warnings in the logs. Change-Id: Id65a619b8de05806448bba4cb203c4cadf04a48e Signed-off-by: Rom Lemarchand <rlemarchand@sta.samsung.com>
* | net: wimax: CMC732 WiMax chip driversangamanatha2011-11-1716-0/+2816
|/ | | | | | | Initial support for the CMC732 WiMax chip. Change-Id: I0689033bcfcfeb04d8f8b7a3b14ec5eec9dc8fbe Signed-off-by: Rom Lemarchand <rlemarchand@sta.samsung.com>
* Fix common misspellingsLucas De Marchi2011-03-3112-21/+21
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* Merge branch 'for-next' of ↵Linus Torvalds2011-01-132-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) Documentation/trace/events.txt: Remove obsolete sched_signal_send. writeback: fix global_dirty_limits comment runtime -> real-time ppc: fix comment typo singal -> signal drivers: fix comment typo diable -> disable. m68k: fix comment typo diable -> disable. wireless: comment typo fix diable -> disable. media: comment typo fix diable -> disable. remove doc for obsolete dynamic-printk kernel-parameter remove extraneous 'is' from Documentation/iostats.txt Fix spelling milisec -> ms in snd_ps3 module parameter description Fix spelling mistakes in comments Revert conflicting V4L changes i7core_edac: fix typos in comments mm/rmap.c: fix comment sound, ca0106: Fix assignment to 'channel'. hrtimer: fix a typo in comment init/Kconfig: fix typo anon_inodes: fix wrong function name in comment fix comment typos concerning "consistent" poll: fix a typo in comment ... Fix up trivial conflicts in: - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c) - fs/ext4/ext4.h Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.
| * fix comment typos concerning "consistent"Uwe Kleine-König2010-12-101-1/+1
| | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * tree-wide: fix comment/printk typosUwe Kleine-König2010-11-012-2/+2
| | | | | | | | | | | | | | | | | | | | "gadget", "through", "command", "maintain", "maintain", "controller", "address", "between", "initiali[zs]e", "instead", "function", "select", "already", "equal", "access", "management", "hierarchy", "registration", "interest", "relative", "memory", "offset", "already", Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Merge branch 'usb-next' of ↵Linus Torvalds2011-01-071-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 * 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (144 commits) USB: add support for Dream Cheeky DL100B Webmail Notifier (1d34:0004) USB: serial: ftdi_sio: add support for TIOCSERGETLSR USB: ehci-mxc: Setup portsc register prior to accessing OTG viewport USB: atmel_usba_udc: fix freeing irq in usba_udc_remove() usb: ehci-omap: fix tll channel enable mask usb: ohci-omap3: fix trivial typo USB: gadget: ci13xxx: don't assume that PAGE_SIZE is 4096 USB: gadget: ci13xxx: fix complete() callback for no_interrupt rq's USB: gadget: update ci13xxx to work with g_ether USB: gadgets: ci13xxx: fix probing of compiled-in gadget drivers Revert "USB: musb: pm: don't rely fully on clock support" Revert "USB: musb: blackfin: pm: make it work" USB: uas: Use GFP_NOIO instead of GFP_KERNEL in I/O submission path USB: uas: Ensure we only bind to a UAS interface USB: uas: Rename sense pipe and sense urb to status pipe and status urb USB: uas: Use kzalloc instead of kmalloc USB: uas: Fix up the Sense IU usb: musb: core: kill unneeded #include's DA8xx: assign name to MUSB IRQ resource usb: gadget: g_ncm added ... Manually fix up trivial conflicts in USB Kconfig changes in: arch/arm/mach-omap2/Kconfig arch/sh/Kconfig drivers/usb/Kconfig drivers/usb/host/ehci-hcd.c and annoying chip clock data conflicts in: arch/arm/mach-omap2/clock3xxx_data.c arch/arm/mach-omap2/clock44xx_data.c
| * | USB: fix leftover references to udev->autosuspend_delayAlan Stern2010-11-171-1/+1
| |/ | | | | | | | | | | | | | | | | This patch (as1436) takes care of leftover references to udev->autosuspend_delay that didn't get removed during the earlier conversion to the runtime-PM autosuspend API. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | i2400m: drop i2400m_schedule_work()Tejun Heo2010-12-124-96/+21
|/ | | | | | | | | | | | | | | | | | i2400m implements dynamic work allocation and queueing mechanism in i2400_schedule_work(); however, this is only used for reset and recovery which can be served equally well with preallocated per device works. Replace i2400m_schedule_work() with two work structs in struct i2400m. These works are explicitly canceled when the device is released making calls to flush_scheduled_work(), which is being deprecated, unnecessary. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Cc: linux-wimax@intel.com Cc: netdev@vger.kernel.org
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6Linus Torvalds2010-10-236-23/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1699 commits) bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL. vlan: Calling vlan_hwaccel_do_receive() is always valid. tproxy: use the interface primary IP address as a default value for --on-ip tproxy: added IPv6 support to the socket match cxgb3: function namespace cleanup tproxy: added IPv6 support to the TPROXY target tproxy: added IPv6 socket lookup function to nf_tproxy_core be2net: Changes to use only priority codes allowed by f/w tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled tproxy: added tproxy sockopt interface in the IPV6 layer tproxy: added udp6_lib_lookup function tproxy: added const specifiers to udp lookup functions tproxy: split off ipv6 defragmentation to a separate module l2tp: small cleanup nf_nat: restrict ICMP translation for embedded header can: mcp251x: fix generation of error frames can: mcp251x: fix endless loop in interrupt handler if CANINTF_MERRF is set can-raw: add msg_flags to distinguish local traffic 9p: client code cleanup rds: make local functions/variables static ... Fix up conflicts in net/core/dev.c, drivers/net/pcmcia/smc91c92_cs.c and drivers/net/wireless/ath/ath9k/debug.c as per David
| * Merge branch 'master' of ↵David S. Miller2010-10-111-13/+13
| |\ | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: net/core/ethtool.c
| * | wimax: make functions localstephen hemminger2010-10-056-23/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make wimax variables and functions local if possible. Compile tested only. This also removes a couple of unused EXPORT_SYMBOL. If this breaks some out of tree code, please fix that by putting the code in the kernel tree. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bklLinus Torvalds2010-10-221-0/+2
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl: vfs: make no_llseek the default vfs: don't use BKL in default_llseek llseek: automatically add .llseek fop libfs: use generic_file_llseek for simple_attr mac80211: disallow seeks in minstrel debug code lirc: make chardev nonseekable viotape: use noop_llseek raw: use explicit llseek file operations ibmasmfs: use generic_file_llseek spufs: use llseek in all file operations arm/omap: use generic_file_llseek in iommu_debug lkdtm: use generic_file_llseek in debugfs net/wireless: use generic_file_llseek in debugfs drm: use noop_llseek
| * | llseek: automatically add .llseek fopArnd Bergmann2010-10-151-0/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All file_operations should get a .llseek operation so we can make nonseekable_open the default for future file operations without a .llseek pointer. The three cases that we can automatically detect are no_llseek, seq_lseek and default_llseek. For cases where we can we can automatically prove that the file offset is always ignored, we use noop_llseek, which maintains the current behavior of not returning an error from a seek. New drivers should normally not use noop_llseek but instead use no_llseek and call nonseekable_open at open time. Existing drivers can be converted to do the same when the maintainer knows for certain that no user code relies on calling seek on the device file. The generated code is often incorrectly indented and right now contains comments that clarify for each added line why a specific variant was chosen. In the version that gets submitted upstream, the comments will be gone and I will manually fix the indentation, because there does not seem to be a way to do that using coccinelle. Some amount of new code is currently sitting in linux-next that should get the same modifications, which I will do at the end of the merge window. Many thanks to Julia Lawall for helping me learn to write a semantic patch that does all this. ===== begin semantic patch ===== // This adds an llseek= method to all file operations, // as a preparation for making no_llseek the default. // // The rules are // - use no_llseek explicitly if we do nonseekable_open // - use seq_lseek for sequential files // - use default_llseek if we know we access f_pos // - use noop_llseek if we know we don't access f_pos, // but we still want to allow users to call lseek // @ open1 exists @ identifier nested_open; @@ nested_open(...) { <+... nonseekable_open(...) ...+> } @ open exists@ identifier open_f; identifier i, f; identifier open1.nested_open; @@ int open_f(struct inode *i, struct file *f) { <+... ( nonseekable_open(...) | nested_open(...) ) ...+> } @ read disable optional_qualifier exists @ identifier read_f; identifier f, p, s, off; type ssize_t, size_t, loff_t; expression E; identifier func; @@ ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off) { <+... ( *off = E | *off += E | func(..., off, ...) | E = *off ) ...+> } @ read_no_fpos disable optional_qualifier exists @ identifier read_f; identifier f, p, s, off; type ssize_t, size_t, loff_t; @@ ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off) { ... when != off } @ write @ identifier write_f; identifier f, p, s, off; type ssize_t, size_t, loff_t; expression E; identifier func; @@ ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off) { <+... ( *off = E | *off += E | func(..., off, ...) | E = *off ) ...+> } @ write_no_fpos @ identifier write_f; identifier f, p, s, off; type ssize_t, size_t, loff_t; @@ ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off) { ... when != off } @ fops0 @ identifier fops; @@ struct file_operations fops = { ... }; @ has_llseek depends on fops0 @ identifier fops0.fops; identifier llseek_f; @@ struct file_operations fops = { ... .llseek = llseek_f, ... }; @ has_read depends on fops0 @ identifier fops0.fops; identifier read_f; @@ struct file_operations fops = { ... .read = read_f, ... }; @ has_write depends on fops0 @ identifier fops0.fops; identifier write_f; @@ struct file_operations fops = { ... .write = write_f, ... }; @ has_open depends on fops0 @ identifier fops0.fops; identifier open_f; @@ struct file_operations fops = { ... .open = open_f, ... }; // use no_llseek if we call nonseekable_open //////////////////////////////////////////// @ nonseekable1 depends on !has_llseek && has_open @ identifier fops0.fops; identifier nso ~= "nonseekable_open"; @@ struct file_operations fops = { ... .open = nso, ... +.llseek = no_llseek, /* nonseekable */ }; @ nonseekable2 depends on !has_llseek @ identifier fops0.fops; identifier open.open_f; @@ struct file_operations fops = { ... .open = open_f, ... +.llseek = no_llseek, /* open uses nonseekable */ }; // use seq_lseek for sequential files ///////////////////////////////////// @ seq depends on !has_llseek @ identifier fops0.fops; identifier sr ~= "seq_read"; @@ struct file_operations fops = { ... .read = sr, ... +.llseek = seq_lseek, /* we have seq_read */ }; // use default_llseek if there is a readdir /////////////////////////////////////////// @ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier readdir_e; @@ // any other fop is used that changes pos struct file_operations fops = { ... .readdir = readdir_e, ... +.llseek = default_llseek, /* readdir is present */ }; // use default_llseek if at least one of read/write touches f_pos ///////////////////////////////////////////////////////////////// @ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier read.read_f; @@ // read fops use offset struct file_operations fops = { ... .read = read_f, ... +.llseek = default_llseek, /* read accesses f_pos */ }; @ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier write.write_f; @@ // write fops use offset struct file_operations fops = { ... .write = write_f, ... + .llseek = default_llseek, /* write accesses f_pos */ }; // Use noop_llseek if neither read nor write accesses f_pos /////////////////////////////////////////////////////////// @ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier read_no_fpos.read_f; identifier write_no_fpos.write_f; @@ // write fops use offset struct file_operations fops = { ... .write = write_f, .read = read_f, ... +.llseek = noop_llseek, /* read and write both use no f_pos */ }; @ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier write_no_fpos.write_f; @@ struct file_operations fops = { ... .write = write_f, ... +.llseek = noop_llseek, /* write uses no f_pos */ }; @ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier read_no_fpos.read_f; @@ struct file_operations fops = { ... .read = read_f, ... +.llseek = noop_llseek, /* read uses no f_pos */ }; @ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; @@ struct file_operations fops = { ... +.llseek = noop_llseek, /* no read or write fn */ }; ===== End semantic patch ===== Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Julia Lawall <julia@diku.dk> Cc: Christoph Hellwig <hch@infradead.org>
* | NET: wimax, fix use after freeJiri Slaby2010-10-111-13/+13
|/ | | | | | | | | | | | | | Stanse found that i2400m_rx frees skb, but still uses skb->len even though it has skb_len defined. So use skb_len properly in the code. And also define it unsinged int rather than size_t to solve compilation warnings. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Cc: linux-wimax@intel.com Acked-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'for-next' of ↵Linus Torvalds2010-08-041-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (48 commits) Documentation: update broken web addresses. fix comment typo "choosed" -> "chosen" hostap:hostap_hw.c Fix typo in comment Fix spelling contorller -> controller in comments Kconfig.debug: FAIL_IO_TIMEOUT: typo Faul -> Fault fs/Kconfig: Fix typo Userpace -> Userspace Removing dead MACH_U300_BS26 drivers/infiniband: Remove unnecessary casts of private_data fs/ocfs2: Remove unnecessary casts of private_data libfc: use ARRAY_SIZE scsi: bfa: use ARRAY_SIZE drm: i915: use ARRAY_SIZE drm: drm_edid: use ARRAY_SIZE synclink: use ARRAY_SIZE block: cciss: use ARRAY_SIZE comment typo fixes: charater => character fix comment typos concerning "challenge" arm: plat-spear: fix typo in kerneldoc reiserfs: typo comment fix update email address ...
| * Merge branch 'master' into for-nextJiri Kosina2010-08-042-0/+3
| |\
| * \ Merge branch 'master' into for-nextJiri Kosina2010-06-162-3/+3
| |\ \
| * | | fix typos concerning "initiali[zs]e"Uwe Kleine-König2010-06-161-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | | Merge branch 'master' of ↵David S. Miller2010-07-272-0/+3
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/bnx2x_main.c Merge bnx2x bug fixes in by hand... :-/ Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | Merge branch 'wimax-2.6.35.y' of ↵David S. Miller2010-07-242-0/+3
| |\ \ \ | | |_|/ | |/| | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimax
| | * | wimax/i2400m: Add PID & VID for Intel WiMAX 6250Alexey Shvetsov2010-07-222-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | This version of intel wimax device was found in my IBM ThinkPad x201 Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
* | | | Merge branch 'master' of ↵David S. Miller2010-06-111-1/+1
|\ \ \ \ | |/ / / | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
| * | | Merge branch 'wimax-2.6.35.y' of ↵David S. Miller2010-06-111-1/+1
| |\ \ \ | | |/ / | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimax
| | * | wimax/i2400m: fix missing endian correction read in fw loaderInaky Perez-Gonzalez2010-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | i2400m_fw_hdr_check() was accessing hardware field bcf_hdr->module_type (little endian 32) without converting to host byte sex. Reported-by: Данилин Михаил <mdanilin@nsg.net.ru> Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
* | | | drivers/net: use __packed annotationEric Dumazet2010-06-033-6/+6
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | cleanup patch. Use new __packed annotation in drivers/net/ Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | Merge branch 'wimax-2.6.35.y' of ↵David S. Miller2010-05-251-2/+2
|\ \ \ | |/ / | | / | |/ |/| git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimax
| * wimax/i2400m: fix bad race condition check in RX pathInaky Perez-Gonzalez2010-05-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The i2400m->rx_roq data structure is protected against race conditions with a reference count (i2400m->rx_roq_refcount); the pointer can be read-referenced under the i2400m->rx_lock spinlock. The code in i2400m_rx_edata() wasn't properly following access protocol, performing an invalid check on i2400m->rx_roq (which is cleared to NULL when the refcount drops to zero). As such, it was missing to detect when the data structure is no longer valid and oopsing with a NULL pointer dereference. This commit fixes said check by verifying, under the rx_lock spinlock, that i2400m->rx_roq is non-NULL and then increasing the reference count before dropping the spinlock. Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds2010-05-201-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (229 commits) USB: remove unused usb_buffer_alloc and usb_buffer_free macros usb: musb: update gfp/slab.h includes USB: ftdi_sio: fix legacy SIO-device header USB: kl5usb105: reimplement using generic framework USB: kl5usb105: minor clean ups USB: kl5usb105: fix memory leak USB: io_ti: use kfifo to implement write buffering USB: io_ti: remove unsused private counter USB: ti_usb: use kfifo to implement write buffering USB: ir-usb: fix incorrect write-buffer length USB: aircable: fix incorrect write-buffer length USB: safe_serial: straighten out read processing USB: safe_serial: reimplement read using generic framework USB: safe_serial: reimplement write using generic framework usb-storage: always print quirks USB: usb-storage: trivial debug improvements USB: oti6858: use port write fifo USB: oti6858: use kfifo to implement write buffering USB: cypress_m8: use kfifo to implement write buffering USB: cypress_m8: remove unused drain define ... Fix up conflicts (due to usb_buffer_alloc/free renaming) in drivers/input/tablet/acecad.c drivers/input/tablet/kbtab.c drivers/input/tablet/wacom_sys.c drivers/media/video/gspca/gspca.c sound/usb/usbaudio.c
| * | USB: remove leftover references to udev->autosuspend_disabledAlan Stern2010-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch (as1373) fixes a couple of drivers outside the USB subtree. Devices are now disabled or enabled for autosuspend by calling a core function instead of setting a flag. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | | drivers/net: remove useless semicolonsJoe Perches2010-05-171-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | switch and while statements don't need semicolons at end of statement [ Fixup minor conflicts with recent wimax merge... -DaveM ] Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | Merge branch 'master' of ↵David S. Miller2010-05-1510-116/+479
|\ \ \ | | |/ | |/| | | | git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimax