summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pcmcia/nsp_cs.c
Commit message (Collapse)AuthorAgeFilesLines
* scsi: pcmcia: nsp_cs: Remove unused variable iColin Ian King2022-10-271-3/+1
| | | | | | | | | Variable i is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20221024141101.2161167-1-colin.i.king@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: nsp_cs: Move the SCSI pointer to private command dataBart Van Assche2022-02-221-88/+112
| | | | | | | | | | | Set .cmd_size in the SCSI host template instead of using the SCSI pointer in struct scsi_cmnd. This patch prepares for removal of the SCSI pointer from struct scsi_cmnd. Link: https://lore.kernel.org/r/20220218195117.25689-39-bvanassche@acm.org Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: Remove drivers/scsi/scsi.hBart Van Assche2022-02-221-3/+2
| | | | | | | | | | | | | | | | | | | | The following two header files have the same file name: include/scsi/scsi.h and drivers/scsi/scsi.h. This is confusing. Remove the latter since the following note was added in drivers/scsi/scsi.h in 2004: "NOTE: this file only contains compatibility glue for old drivers. All these wrappers will be removed sooner or later. For new code please use the interfaces declared in the headers in include/scsi/" Link: https://lore.kernel.org/r/20220218195117.25689-7-bvanassche@acm.org Cc: Christoph Hellwig <hch@lst.de> Cc: Ming Lei <ming.lei@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: nsp_cs: Use true and false instead of TRUE and FALSEBart Van Assche2022-02-221-13/+13
| | | | | | | | | | | | | This patch prepares for removal of the drivers/scsi/scsi.h header file. That header file defines the 'TRUE' and 'FALSE' constants. Link: https://lore.kernel.org/r/20220218195117.25689-6-bvanassche@acm.org Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com> Cc: John Garry <john.garry@huawei.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: nsp_cs: Change the return type of two functions into 'void'Bart Van Assche2022-02-221-12/+5
| | | | | | | | | | | | | nsp_reselected() and nsphw_init() always return TRUE. Change the return type of these functions into 'void'. Link: https://lore.kernel.org/r/20220218195117.25689-5-bvanassche@acm.org Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com> Cc: John Garry <john.garry@huawei.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: nsp_cs: Check of ioremap return valueJiasheng Jiang2022-01-101-0/+3
| | | | | | | | | | Since it is possible for ioremap() to fail, 'data->MmioAddress' could be NULL. Skip entry if ioremap() fails. Link: https://lore.kernel.org/r/20211230021137.1823352-1-jiasheng@iscas.ac.cn Fixes: 0e6f9d270840 ("pcmcia: use pcmcia_loop_config in scsi pcmcia drivers") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: core: Remove the 'done' argument from SCSI queuecommand_lck functionsBart Van Assche2021-10-161-2/+1
| | | | | | | | | | | | The DEF_SCSI_QCMD() macro passes the addresses of the SCSI host lock and also that of the scsi_done function to the queuecommand_lck() function implementations. Remove the 'scsi_done' argument since its address is now a constant and instead call 'scsi_done' directly from inside the queuecommand_lck() functions. Link: https://lore.kernel.org/r/20211007204618.2196847-14-bvanassche@acm.org Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: pcmcia: Call scsi_done() directlyBart Van Assche2021-10-161-3/+1
| | | | | | | | | Conditional statements are faster than indirect calls. Hence call scsi_done() directly. Link: https://lore.kernel.org/r/20211007202923.2174984-60-bvanassche@acm.org Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: pcmcia: nsp_cs: Use SAM_STAT_CHECK_CONDITIONHannes Reinecke2021-05-311-1/+1
| | | | | | | | | The nsp_cs driver stores the SAM status values in SCp.Status, so we need to use the non-shifted version SAM_STAT_CHECK_CONDITION. Link: https://lore.kernel.org/r/20210527072217.117126-1-hare@suse.de Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* module: remove never implemented MODULE_SUPPORTED_DEVICELeon Romanovsky2021-03-171-1/+0
| | | | | | | | | | MODULE_SUPPORTED_DEVICE was added in pre-git era and never was implemented. We can safely remove it, because the kernel has grown to have many more reliable mechanisms to determine if device is supported or not. Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* scsi: nsp_cs: Drop internal SCSI message definitionHannes Reinecke2021-01-221-6/+6
| | | | | | | | | | Use the standard SCSI message definitions instead of the driver-internal ones. Link: https://lore.kernel.org/r/20210113090500.129644-19-hare@suse.de Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: Remove unneeded break statementsTom Rix2020-10-261-2/+0
| | | | | | | | A break is not needed if it is preceded by a return or goto. Link: https://lore.kernel.org/r/20201019142333.16584-1-trix@redhat.com Signed-off-by: Tom Rix <trix@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* treewide: Use fallthrough pseudo-keywordGustavo A. R. Silva2020-08-231-1/+1
| | | | | | | | | | Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
* scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'Lee Jones2020-07-081-2/+2
| | | | | | | | | | | | | | | | | There is no need to populate an unused variable, even if the read is required. Fixes the following W=1 kernel build warning(s): drivers/scsi/pcmcia/nsp_cs.c: In function ‘nsp_cs_message’: drivers/scsi/pcmcia/nsp_cs.c:143:2: warning: function ‘nsp_cs_message’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] drivers/scsi/pcmcia/nsp_cs.c: In function ‘nsp_fifo_count’: drivers/scsi/pcmcia/nsp_cs.c:692:24: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20200707140055.2956235-9-lee.jones@linaro.org Cc: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: pcmcia: nsp_cs: Use new __printf() format notationLee Jones2020-07-081-0/+1
| | | | | | | | | | | | | | Fixes the following W=1 kernel build warning(s): drivers/scsi/pcmcia/nsp_cs.c: In function ‘nsp_cs_message’: drivers/scsi/pcmcia/nsp_cs.c:143:2: warning: function ‘nsp_cs_message’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] drivers/scsi/pcmcia/nsp_cs.c: In function ‘nsp_fifo_count’: drivers/scsi/pcmcia/nsp_cs.c:692:24: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20200707140055.2956235-8-lee.jones@linaro.org Cc: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* remove ioremap_nocache and devm_ioremap_nocacheChristoph Hellwig2020-01-061-1/+1
| | | | | | | | ioremap has provided non-cached semantics by default since the Linux 2.6 days, so remove the additional ioremap_nocache interface. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Arnd Bergmann <arnd@arndb.de>
* scsi: nsp_cs: drop redundant MODULE_LICENSE ifdefJohan Hovold2019-11-121-2/+0
| | | | | | | | | The MODULE_LICENSE macro is unconditionally defined in module.h, no need to ifdef its use. Link: https://lore.kernel.org/r/20191105085609.2338-2-johan@kernel.org Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: pcmcia: nsp_cs: use sg helper to iterate over scatterlistMing Lei2019-06-201-2/+2
| | | | | | | | | | | | | | | | | | | | | Unlike the legacy I/O path, scsi-mq preallocates a large array to hold the scatterlist for each request. This static allocation can consume substantial amounts of memory on modern controllers which support a large number of concurrently outstanding requests. To facilitate a switch to a smaller static allocation combined with a dynamic allocation for requests that need it, we need to make sure all SCSI drivers handle chained scatterlists correctly. Convert remaining drivers that directly dereference the scatterlist array to using the iterator functions. [mkp: clarified commit message] Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: pcmcia: nsp_cs: Remove unnecessary parenthesesNathan Chancellor2019-01-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | Clang warns: drivers/scsi/pcmcia/nsp_cs.c:1137:27: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((tmpSC->SCp.Message == MSG_COMMAND_COMPLETE)) { ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/pcmcia/nsp_cs.c:1137:27: note: remove extraneous parentheses around the comparison to silence this warning if ((tmpSC->SCp.Message == MSG_COMMAND_COMPLETE)) { ~ ^ ~ drivers/scsi/pcmcia/nsp_cs.c:1137:27: note: use '=' to turn this equality comparison into an assignment if ((tmpSC->SCp.Message == MSG_COMMAND_COMPLETE)) { ^~ = 1 warning generated. Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: remove the use_clustering flagChristoph Hellwig2018-12-181-1/+1
| | | | | | | | | | | | The same effects can be achieved by setting the dma_boundary to PAGE_SIZE - 1 and the max_segment_size to PAGE_SIZE, so shift those settings into the drivers. Note that in many cases the setting might be bogus, but this keeps the status quo. [mkp: fix myrs and myrb] Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* pcmcia: Use module_pcmcia_driver for scsi driversVaishali Thakkar2018-10-011-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use module_pcmcia_driver for drivers whose init and exit functions only register and unregister, respectively. A simplified version of the Coccinelle semantic patch that performs this transformation is as follows: @a@ identifier f, x; @@ -static f(...) { return pcmcia_register_driver(&x); } @b depends on a@ identifier e, a.x; @@ -static e(...) { pcmcia_unregister_driver(&x); } @c depends on a && b@ identifier a.f; declarer name module_init; @@ -module_init(f); @d depends on a && b && c@ identifier b.e, a.x; declarer name module_exit; declarer name module_pcmcia_driver; @@ -module_exit(e); +module_pcmcia_driver(x); Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Cc: James E.J. Bottomley <jejb@linux.vnet.ibm.com> Cc: Martin K. Petersen <martin.petersen@oracle.com> Cc: linux-scsi@vger.kernel.org [linux@dominikbrodowski.net: - updated commit message - drop change to fdomain which got removed in the meantime] Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* scsi: Do not set cmd_per_lun to 1 in the host templateHannes Reinecke2015-05-311-1/+0
| | | | | | | | | | '0' is now used as the default cmd_per_lun value, so there's no need to explicitly set it to '1' in the host template. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* scsi: print single-character strings with seq_putcRasmus Villemoes2015-02-021-2/+2
| | | | | | | | | Using seq_putc to print a single character saves at least a strlen() call and a memory access, and may also give a small .text reduction. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Reviewed-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Christoph Hellwig <hch@lst.de>
* scsi: merge consecutive seq_puts callsRasmus Villemoes2015-02-021-2/+2
| | | | | | | | | Consecutive seq_puts calls with literal strings may be replaced by a single call, saving a little .text. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Reviewed-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Christoph Hellwig <hch@lst.de>
* scsi: replace seq_printf with seq_putsRasmus Villemoes2015-02-021-15/+15
| | | | | | | | | | Using seq_printf to print a simple string is a lot more expensive than it needs to be, since seq_puts exists. Replace seq_printf with seq_puts when possible. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Reviewed-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Christoph Hellwig <hch@lst.de>
* scsi: remove SPRINTF macroRasmus Villemoes2015-02-021-27/+23
| | | | | | | | | | The macro SPRINTF doesn't save a lot of typing or make the code more readable, and depending on a specific identifier (m) in the surrounding scope is generally frowned upon. Nuke it. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Reviewed-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Christoph Hellwig <hch@lst.de>
* treewide: Fix typo in printkMasanari Iida2014-08-261-1/+1
| | | | | | | | | This patch fix spelling typo in printk within vairous part of the code. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* scsi: use 64-bit LUNsHannes Reinecke2014-07-171-1/+1
| | | | | | | | | | | | | The SCSI standard defines 64-bit values for LUNs, and large arrays employing large or hierarchical LUN numbers become more and more common. So update the linux SCSI stack to use 64-bit LUN numbers. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Christoph Hellwig <hch@infradead.org> Reviewed-by: Ewan Milne <emilne@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* nsp_cs: switch to ->show_info()Al Viro2013-04-091-31/+5
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* module_param: make bool parameters really bool (drivers & misc)Rusty Russell2012-01-131-1/+1
| | | | | | | | | | | | module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* pcmcia: Convert pcmcia_device_id declarations to constJoe Perches2011-05-061-1/+1
| | | | | | | | | | | | | Saves about 50KB of data. Old/new size of all objects: text data bss dec hex filename 563015 80096 130684 773795 bcea3 (TOTALS) 610916 32256 130632 773804 bceac (TOTALS) Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Kurt Van Dijck <kurt.van.dijck@eia.be> (for drivers/net/can/softing/softing_cs.c) Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* Fix common misspellingsLucas De Marchi2011-03-311-1/+1
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* SCSI host lock push-downJeff Garzik2010-11-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Move the mid-layer's ->queuecommand() invocation from being locked with the host lock to being unlocked to facilitate speeding up the critical path for drivers who don't need this lock taken anyway. The patch below presents a simple SCSI host lock push-down as an equivalent transformation. No locking or other behavior should change with this patch. All existing bugs and locking orders are preserved. Additionally, add one parameter to queuecommand, struct Scsi_Host * and remove one parameter from queuecommand, void (*done)(struct scsi_cmnd *) Scsi_Host* is a convenient pointer that most host drivers need anyway, and 'done' is redundant to struct scsi_cmnd->scsi_done. Minimal code disturbance was attempted with this change. Most drivers needed only two one-line modifications for their host lock push-down. Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Acked-by: James Bottomley <James.Bottomley@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* pcmcia: remove obsolete and wrong commentsDominik Brodowski2010-09-291-26/+0
| | | | | | | | | | | | | What's worse than no comment? A wrong comment. Several PCMCIA device drivers contained the same comments, which were based on how the PCMCIA subsystem worked in the old days of 2.4., and which were originally part of a "dummy_cs" driver. These comments no longer matched at all what is happening now, and therefore should be removed. Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: avoid messages on module (un)loadingDominik Brodowski2010-09-291-3/+0
| | | | | | | | printk() statements on module load or unload are frowned upon. Also, add a few __init or __exit declarations. Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: move driver name to struct pcmcia_driverDominik Brodowski2010-09-291-3/+1
| | | | | Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: remove the "Finally, report what we've done" messageDominik Brodowski2010-09-291-15/+0
| | | | | | | | | | | | Remove this unnecessary message -- this info is either available in sysfs or by enabling dynamic debug from the PCMCIA core. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-scsi@vger.kernel.org CC: linux-usb@vger.kernel.org Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: use autoconfiguration feature for ioports and iomemDominik Brodowski2010-09-291-38/+9
| | | | | | | | | | | | | | | | | | | | | | When CONF_AUTO_SET_IO or CONF_AUTO_SET_IOMEM are set, the corresponding fields in struct pcmcia_device *p_dev->resource[0,1,2] are set accordinly. Drivers wishing to override certain settings may do so in the callback function, but they no longer need to parse the CIS entries stored in cistpl_cftable_entry_t themselves. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: linux-bluetooth@vger.kernel.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> CC: linux-scsi@vger.kernel.org Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: introduce autoconfiguration featureDominik Brodowski2010-09-291-68/+42
| | | | | | | | | | | | | | | | | | | | | | | | Introduce an autoconfiguration feature to set certain values in pcmcia_loop_config(), instead of copying the same code over and over in each PCMCIA driver. At first, introduce the following options: CONF_AUTO_CHECK_VCC check or matching Vcc entry CONF_AUTO_SET_VPP set Vpp CONF_AUTO_AUDIO enable the speaker line CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> CC: linux-scsi@vger.kernel.org Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth) Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: convert pcmcia_request_configuration to pcmcia_enable_deviceDominik Brodowski2010-09-291-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | pcmcia_enable_device() now replaces pcmcia_request_configuration(). Instead of config_req_t, all necessary flags are either passed as a parameter to pcmcia_enable_device(), or (in rare circumstances) set in struct pcmcia_device -> flags. With the last remaining user of include/pcmcia/cs.h gone, remove all references. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> CC: linux-scsi@vger.kernel.org Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth) Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: move config_{base,index,regs} to struct pcmcia_deviceDominik Brodowski2010-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | Several drivers prefer to explicitly set config_{base,index,regs}, formerly known as ConfigBase, ConfigIndex and Present. Instead of passing these values inside config_req_t, store it in struct pcmcia_device. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> CC: linux-scsi@vger.kernel.org Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth) Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: simplify IntTypeDominik Brodowski2010-09-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | IntType was only set to INT_MEMORY (driver pcmciamtd) or INT_MEMORY_AND_IO (all other drivers). As this flags seems to relate to ioport access, make it conditional to the driver having requested IO port access. There are two drivers which do not request IO ports, but did set INT_MEMORY_AND_IO: ray_cs and b43. For those, we consistently only set INT_MEMORY in future. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> CC: linux-scsi@vger.kernel.org Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth) Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: simplify Status, ExtStatus register accessDominik Brodowski2010-09-291-3/+1
| | | | | | | | | | | | | | | The Status (CISREG_CCSR) and ExtStatus (CISREG_ESR) registers were only accessed to enable audio output for some drivers and IRQ for serial_cs.c. The former also required setting config_req_t.Attributes to CONF_ENABLE_SPKR; the latter can be simplified to setting this field to CONF_ENABLE_ESR. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-serial@vger.kernel.org CC: linux-scsi@vger.kernel.org Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: move Vpp setup to struct pcmcia_deviceDominik Brodowski2010-09-291-4/+4
| | | | | | | | | | | | | | | | Some drivers prefer to explicitly set Vpp. Instead of passing the voltage inside config_req_t, store it in struct pcmcia_device. CC: linux-ide@vger.kernel.org CC: netdev@vger.kernel.org CC: linux-mtd@lists.infradead.org CC: linux-wireless@vger.kernel.org CC: linux-serial@vger.kernel.org CC: linux-usb@vger.kernel.org CC: linux-scsi@vger.kernel.org Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth) Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: do not use win_req_t when calling pcmcia_request_window()Dominik Brodowski2010-09-291-30/+19
| | | | | | | | | | | | | | | Instead of win_req_t, drivers are now requested to fill out struct pcmcia_device *p_dev->resource[2,3,4,5] for up to four iomem ranges. After a call to pcmcia_request_window(), the windows found there are reserved and may be used until pcmcia_release_window() is called. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-mtd@lists.infradead.org CC: Jiri Kosina <jkosina@suse.cz> CC: linux-scsi@vger.kernel.org Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: remove memreq_tDominik Brodowski2010-08-031-3/+2
| | | | | | | | | | | | | | | | | Page already had to be set to 0; Offset can easily be passed as parameter to pcmcia_map_mem_page. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: linux-bluetooth@vger.kernel.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org CC: Michael Buesch <mb@bu3sch.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: do not use io_req_t when calling pcmcia_request_io()Dominik Brodowski2010-08-031-16/+14
| | | | | | | | | | | | | | | | | | | | Instead of io_req_t, drivers are now requested to fill out struct pcmcia_device *p_dev->resource[0,1] for up to two ioport ranges. After a call to pcmcia_request_io(), the ports found there are reserved, after calling pcmcia_request_configuration(), they may be used. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org CC: Michael Buesch <mb@bu3sch.de> Acked-by: Marcel Holtmann <marcel@holtmann.org> (for drivers/bluetooth/) Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: do not use io_req_t after call to pcmcia_request_io()Dominik Brodowski2010-08-031-13/+12
| | | | | | | | | | | | | | | | After pcmcia_request_io(), do not make use of the values stored in io_req_t, but instead use those found in struct pcmcia_device->resource[]. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org Acked-by: Marcel Holtmann <marcel@holtmann.org> (for drivers/bluetooth/) Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: remove cs_types.hDominik Brodowski2010-07-301-1/+0
| | | | | | | | | | | | | | | | Remove cs_types.h which is no longer needed: Most definitions aren't used at all, a few can be made away with, and two remaining definitions (typedefs, unfortunatley) may be moved to more specific places. CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org Acked-by: Marcel Holtmann <marcel@holtmann.org> (for drivers/bluetooth/) Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: dev_node removal (write-only drivers)Dominik Brodowski2010-05-101-3/+0
| | | | | | | | | | | | | | | | | | | dev_node_t was only used to transport some minor/major numbers from the PCMCIA device drivers to deprecated userspace helpers. However, only a few drivers made use of it, and the userspace helpers are deprecated anyways. Therefore, get rid of dev_node_t . As a first step, remove any usage of dev_node_t from drivers which only wrote to this typedef/struct, but did not make use of it. CC: linux-bluetooth@vger.kernel.org CC: Harald Welte <laforge@gnumonks.org> CC: linux-mtd@lists.infradead.org CC: linux-wireless@vger.kernel.org CC: netdev@vger.kernel.org CC: linux-serial@vger.kernel.org CC: alsa-devel@alsa-project.org Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>