summaryrefslogtreecommitdiffstats
path: root/drivers/usb/atm/cxacru.c
Commit message (Collapse)AuthorAgeFilesLines
* USB: atm: fix up some remaining DEVICE_ATTR() usageGreg Kroah-Hartman2018-01-241-10/+8Star
| | | | | | | | | There's no need to have DEVICE_ATTR() in these crazy macros, so use the proper DEVICE_ATTR_*() versions intead. Cc: Matthieu CASTET <castet.matthieu@free.fr> Cc: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: usbatm: Convert timers to use timer_setup()Kees Cook2017-11-221-7/+16
| | | | | | | | | | | | | | | In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Additionally corrects and on-stack timer usage. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Duncan Sands <duncan.sands@free.fr> Cc: "Gustavo A. R. Silva" <garsilva@embeddedor.com> Cc: accessrunner-general@lists.sourceforge.net Cc: linux-usb@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Allen Pais <allen.lkml@gmail.com>
* USB: atm: Remove redundant license textGreg Kroah-Hartman2017-11-041-15/+0Star
| | | | | | | | | | | | | | | | Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Duncan Sands <duncan.sands@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: add SPDX identifiers to all remaining files in drivers/usb/Greg Kroah-Hartman2017-11-041-0/+1
| | | | | | | | | | | | | | | | | | | | | It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/usb/ and include/linux/usb* files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: atm: cxacru: mark expected switch fall-throughsGustavo A. R. Silva2017-10-271-0/+2
| | | | | | | | In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers: usb: atm: cxacru: use setup_timer() helper.Allen Pais2017-10-041-3/+1Star
| | | | | | | | Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais <allen.lkml@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: atm: remove unneeded MODULE_VERSION() usageGreg Kroah-Hartman2017-07-221-2/+0Star
| | | | | | | | | MODULE_VERSION is useless for in-kernel drivers, so just remove all usage of it in the USB ATM drivers. Along with this, some DRIVER_VERSION macros were removed as they are also pointless. Cc: Duncan Sands <duncan.sands@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: atm: remove unnecessary codeGustavo A. R. Silva2017-03-161-1/+1
| | | | | | | | | 'index' is an unsigned variable, and less-than-zero comparison of an unsigned variable is never true. Addresses-Coverity-ID: 115396 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: atm: cxacru: don't print on ENOMEMWolfram Sang2016-08-301-3/+1Star
| | | | | | | All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: atm: cxacru: don't print error when allocating urb failsWolfram Sang2016-08-151-2/+0Star
| | | | | | | kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: cxacru: fix an bounds check warningDan Carpenter2016-02-031-0/+2
| | | | | | | | | | This is a privileged operation so it doesn't matter much. We use "tmp" as an offset into an array. If it were invalid we could read out of bounds and trigger an oops if the memory is not mapped. Plus it makes static checkers complain. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: atm: cxacru: fix blank line after declarationAaron Raimist2015-07-221-1/+6
| | | | | | | Fixed a coding style issue. Adds blank lines after declarations. Signed-off-by: Aaron Raimist <aaronraimist@riseup.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: delete non-required instances of include <linux/init.h>Paul Gortmaker2014-01-091-1/+0Star
| | | | | | | | | | None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: cxacru: potential underflow in cxacru_cm_get_array()Dan Carpenter2013-05-201-1/+2
| | | | | | | | | | The value of "offd" comes off the instance->rcv_buf[] and we used it as the offset into an array. The problem is that we check the upper bound but not for negative values. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: cxacru.c: remove dbg() usageGreg Kroah-Hartman2012-05-021-17/+17
| | | | | | | | | dbg() was a very old USB-specific macro that should no longer be used. This patch removes it from being used in the driver and uses dev_dbg() instead. CC: Simon Arlott <cxacru@fire.lp0.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: convert drivers/usb/* to use module_usb_driver()Greg Kroah-Hartman2011-11-181-12/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts the drivers in drivers/usb/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: Simon Arlott <cxacru@fire.lp0.eu> Cc: Duncan Sands <duncan.sands@free.fr> Cc: Matthieu CASTET <castet.matthieu@free.fr> Cc: Stanislaw Gruszka <stf_xl@wp.pl> Cc: Pete Zaitcev <zaitcev@redhat.com> Cc: Oliver Neukum <oliver@neukum.name> Cc: Juergen Stuber <starblue@users.sourceforge.net> Cc: Cesar Miquel <miquel@df.uba.ar> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Cc: Matthew Wilcox <willy@linux.intel.com> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: Michael Hund <mhund@ld-didactic.de> Cc: Zack Parsons <k3bacon@gmail.com> Cc: Melchior FRANZ <mfranz@aon.at> Cc: Tomoki Sekiyama <tomoki.sekiyama@gmail.com> Cc: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* workqueue: convert cancel_rearming_delayed_work[queue]() users to ↵Tejun Heo2010-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cancel_delayed_work_sync() cancel_rearming_delayed_work[queue]() has been superceded by cancel_delayed_work_sync() quite some time ago. Convert all the in-kernel users. The conversions are completely equivalent and trivial. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: "David S. Miller" <davem@davemloft.net> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: netdev@vger.kernel.org Cc: Anton Vorontsov <cbou@mail.ru> Cc: David Woodhouse <dwmw2@infradead.org> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: Neil Brown <neilb@suse.de> Cc: Alex Elder <aelder@sgi.com> Cc: xfs-masters@oss.sgi.com Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: netfilter-devel@vger.kernel.org Cc: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: linux-nfs@vger.kernel.org
* Merge branch 'master' of ↵David S. Miller2010-09-101-2/+22
|\ | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: net/mac80211/main.c
| * USB: cxacru: Use a bulk/int URB to access the command endpointSimon Arlott2010-09-041-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The command endpoint is either a bulk or interrupt endpoint, but using the wrong type of transfer causes an error if CONFIG_USB_DEBUG is enabled after commit f661c6f8c67bd55e93348f160d590ff9edf08904, which checks for this mismatch. Detect which type of endpoint it is and use a bulk/int URB as appropriate. There are other function calls specifying a bulk pipe, but usb_clear_halt doesn't use the pipe type (only the endpoint) and usb_bulk_msg auto-detects interrupt transfers. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Cc: stable <stable@kernel.org> [.34 and newer] Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | cxacru: ignore cx82310_eth devicesOndrej Zary2010-09-091-1/+17
|/ | | | | | | | | | | | | Ignore ADSL routers, which can have the same vendor and product IDs as ADSL modems but should be handled by the cx82310_eth driver. This intentionally ignores device IDs that aren't currently handled by cx82310_eth. There may be other device IDs that perhaps shouldn't be claimed by cxacru. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: David S. Miller <davem@davemloft.net>
* usb: conexant: fixed spacing and brace coding style issuesNicolas Kaiser2010-08-101-6/+5Star
| | | | | | | | Fixed spacing and brace coding style issues. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb/atm/cxacru.c: call atm_dev_signal_change() when signal changes.Karl Hiramoto2010-07-091-9/+9
| | | | | | | Propagate signal changes to upper atm layer. Signed-off-by: Karl Hiramoto <karl@hiramoto.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* USB: cxacru: increment driver versionSimon Arlott2010-03-021-1/+2
| | | | | | | | | | | | | | Changes: Return an empty string for modulation when there is no connection Fix sysfs unload race conditions Log firmware load process, remove delay Add new configuration interface Remove cxacru-cf.bin Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cxacru: remove cxacru-cf.bin loaderSimon Arlott2010-03-021-28/+3Star
| | | | | | | | | | | | | | | | | | | | This has never worked properly because wsize passed to cxacru_cm() is incorrectly set to the number of values instead of the data bytes. The maximum number of values that can be set at once is 7 which means the device will not get enough data to work with and none of the configuration values will be used. At least one existing cxacru-cf.bin file contains invalid data which will prevent the modem from syncing properly. Fixing it is likely to break existing systems, and the new sysfs interface for setting configuration parameters can provide the same functionality. A script is provided to convert from the original format. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cxacru: add write-only sysfs attribute for modem configurationSimon Arlott2010-03-021-1/+75
| | | | | | | | | | | | | | | | | | | The modem can be configured using CM_REQUEST_CARD_DATA_SET, although CM_REQUEST_CARD_DATA_GET does not return any data. Tested by setting the modulation (0x0a) option. There is a list of parameters in the following archive, but the meaning of many of them is not well documented: http://sourceforge.net/project/shownotes.php?release_id=301825 This source also indicates that the highest parameter set is 0x4a but this varies by model so an arbitrary limit of 0x7f has been used (the index is a 32-bit integer). Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cxacru: firmware writes on OHCI are slow, log progressSimon Arlott2010-03-021-2/+6
| | | | | | | | | | | | | | | | Firmware writing takes 256ms per 4KB with OHCI, which is very slow compared to 7ms per 4KB with UHCI. Until I have access to a hardware USB analyser it may not be possible to determine why this happens. Instead of appearing to do nothing, log progress when writing firmware and then log the ATM device information when finished. Remove an unnecessary 4 second delay. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cxacru: document how to interact with the flash memorySimon Arlott2010-03-021-0/+20
| | | | | | | | | | | | | These commands were found by accident... fortunately it still works even if the flash memory is erased, despite having no USB device IDs. Some example sysfs code for raw command access: http://simon.arlott.org/pub/cxacru/raw.c Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cxacru: check device isn't being removed during sysfs callsSimon Arlott2010-03-021-20/+28
| | | | | | | | | | | | | | | | | It is possible for usb_get_intfdata() to return NULL if sysfs is accessed while the module is being unloaded or the device is being removed. Move the access code to an inline function in usbatm.h, and return -ENODEV if any of the pointers are NULL. It should not be possible for the instance data or atm device to be invalid until after unbind() completes and the sysfs attributes have been removed. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cxacru: check data length is not negativeSimon Arlott2010-03-021-1/+1
| | | | | | | | | | | | | | When attempting to read data that is not actually an array of values, the length may be negative which causes an Oops due to a likely access off the end of the data array. This bug should not occur under normal use unless the device returns an invalid response. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cxacru: return an empty value for modulation if there is no connectionSimon Arlott2010-03-021-2/+2
| | | | | | | | | When there is no connection, return an empty string instead of "0" for the connection modulation. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cxacru: Fix negative dB outputSimon Arlott2009-05-091-2/+8
| | | | | | | | | | Values of dB between -0.99 and -0.01 will be output with the wrong sign. This converts the negative value to positive and outputs it with a "-" prefix. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: atm/cxacru, fix lock imbalanceJiri Slaby2009-03-171-1/+2
| | | | | | | | | | We do not hold mutex in one place in cxacru_cm, but unlock it on fail path. Fix this. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Simon Arlott <cxacru@fire.lp0.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* net: convert more to %pMJohannes Berg2008-10-281-3/+1Star
| | | | | | | | | A number of places still use %02x:...:%02x because it's in debug statements or for no real reason. Make a few of them use %pM. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* USB: cxacru: Fix printk format flag in error messageSimon Arlott2008-08-141-1/+1
| | | | | | | | "#%x" should have been "%#x" Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: AccessRunner: avoid unnecessary memsetChristophe Jaillet2008-07-221-1/+0Star
| | | | | | | | | | Remove an explicit memset(.., 0, ...) to a variable allocated with kzalloc (i.e. 'card_info' array of the structure 'instance'). Signed-off-by: Christophe Jaillet <christophe.jaillet@wanadoo.fr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* cxacru: treat firmware data as constDavid Woodhouse2008-07-101-1/+1
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* drivers/usb annotations and fixesAl Viro2008-04-281-5/+7
| | | | | | | | | | | | * endianness annotations * endianness fixes * missing get_unaligned/put_unaligned It's pretty much all over the place, changes to different files are independent. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Serial-parts-Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* USB: remove unnecessary type casting of urb->contextMing Lei2008-04-251-1/+1
| | | | | | | | urb->context code cleanup Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cxacru: Use appropriate logging for errorsSimon Arlott2007-10-121-15/+28
| | | | | | | | | | | | | | | | When an error occurs, existing logging uses dbg() so the cause of a problem is hard to determine. Error conditions shouldn't only be properly reported with debugging enabled. A side effect of this change is that when an uninitialised device is started, a log message similar to the following is sent: cxacru 5-2:1.0: receive of cm 0x90 failed (-104) This is normal - the device did not respond so firmware will be loaded. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Acked-by: Duncan Sands <baldrick@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: unkill cxacru atm driverOliver Neukum2007-08-221-2/+1Star
| | | | | | | | | | | it seems like you overdid it a bit in your quest to clean up the use of urb->status. In this driver you read it the first thing, which means that you are in a race against URB completion you'll usually lose, returning -EINPROGRESS. This kills the driver. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: atm: cxacru: clean up urb->status usageGreg Kroah-Hartman2007-07-201-2/+1Star
| | | | | | | | This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cxacru: Cleanup sysfs attribute codeSimon Arlott2007-07-131-42/+31Star
| | | | | | | | | | | | | This changes the format of unknown status values to be less verbose and uses an array instead of several different snprintf calls. Since only enum values are assigned to it, poll_state is changed from int to enum. Use abs() for dB values instead of two almost identical return lines. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Acked-by: Duncan Sands <duncan.sands@math.u-psud.fr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cxacru: ignore error trying to start ADSL in atm_startSimon Arlott2007-06-091-6/+1Star
| | | | | | | | | | | | | | | | | | | | The sysfs adsl_status attribute ignores (aside from returning -EIO to the user) any error sending a START/STOP command to the device and there is at least one firmware which never sends a response but appears to work regardless. Therefore atm_start should also continue if an error is received so that such firmware is usable. The official Conexant driver doesn't expect a reply either but this is for another device (E2 router) and a commonly used firmware does respond. Also, there is no point in changing -ECONNRESET to -ETIMEDOUT since nothing ever checks for either of these values. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Cc: Duncan Sands <duncan.sands@math.u-psud.fr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cxacru: create sysfs attributes in atm_start instead of bindSimon Arlott2007-06-091-20/+25
| | | | | | | | | | | | | | | | | | | | | | Since usbatm doesn't set the usb_interface driver data until after calling bind and heavy_init, it would be NULL when the sysfs attributes are read. Reading the MAC address from atm_dev before atm_dev exists would have been be possible too. Calling create_device_file in atm_start will avoid this problem, and the data is useless until the first status poll runs. However, it must be ready before a status poll does a printk on line status change otherwise userspace could react before the files exist. For completeness I've moved remove_device_file to atm_stop so it's not called in unbind when it's not needed. There's no point starting ADSL if atm_start could still fail either. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Cc: Duncan Sands <duncan.sands@math.u-psud.fr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cxacru: ADSL state managementSimon Arlott2007-04-271-9/+227
| | | | | | | | | | | | | | | | | The device has commands to start/stop the ADSL function, so this adds a sysfs attribute to allow it to be started/stopped/restarted. It also stops polling the device for status when the ADSL function is disabled. There are no problems with sending multiple start or stop commands, even with a fast loop of them the device still works. There is no need to protect the restart process from further user actions while it's waiting for 1.5s. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Cc: Duncan Sands <duncan.sands@math.u-psud.fr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cxacru: export detailed device info through sysfsSimon Arlott2007-04-271-5/+176
| | | | | | | | | | | | | | | When the device is polled for status there is a lot of useful status information available that is ignored. This patch stores the device info array when the status is polled and adds sysfs files to the usb device to allow userspace to query it. Since the device updates its status internally once a second the poll time is changed to this, and round_jiffies_relative is used to avoid waking the cpu unnecessarily. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Cc: Duncan Sands <duncan.sands@free.fr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* WorkStruct: make allyesconfigDavid Howells2006-11-221-5/+7
| | | | | | Fix up for make allyesconfig. Signed-Off-By: David Howells <dhowells@redhat.com>
* cxacru: add the ZTE ZXDSL 852Duncan Sands2006-10-171-0/+3
| | | | | | | | From http://doc.ubuntu-fr.org/materiel/zxdsl852. Signed-off-by: Duncan Sands <baldrick@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells2006-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
* [PATCH] USBATM: semaphore to mutex conversionArjan van de Ven2006-02-011-4/+5
| | | | | | | | | | | | This is the usbatm part of the Arjan, Jes and Ingo mass semaphore to mutex conversion, reworked to apply on top of the patches I just sent to you. This time, with correct attribution and signed-off lines. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Duncan Sands <baldrick@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>