History log of /linux-master/drivers/scsi/pcmcia/nsp_cs.c
Revision Date Author Comments
# 25ad6f63 24-Oct-2022 Colin Ian King <colin.i.king@gmail.com>

scsi: pcmcia: nsp_cs: Remove unused variable i

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>


# ea39700f 18-Feb-2022 Bart Van Assche <bvanassche@acm.org>

scsi: nsp_cs: Move the SCSI pointer to private command data

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>


# 53555fb7 18-Feb-2022 Bart Van Assche <bvanassche@acm.org>

scsi: Remove drivers/scsi/scsi.h

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>


# dfab1e53 18-Feb-2022 Bart Van Assche <bvanassche@acm.org>

scsi: nsp_cs: Use true and false instead of TRUE and FALSE

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>


# 72961735 18-Feb-2022 Bart Van Assche <bvanassche@acm.org>

scsi: nsp_cs: Change the return type of two functions into 'void'

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>


# 2576e153 29-Dec-2021 Jiasheng Jiang <jiasheng@iscas.ac.cn>

scsi: nsp_cs: Check of ioremap return value

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>


# af049dfd 07-Oct-2021 Bart Van Assche <bvanassche@acm.org>

scsi: core: Remove the 'done' argument from SCSI queuecommand_lck functions

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>


# ca0d62d2 07-Oct-2021 Bart Van Assche <bvanassche@acm.org>

scsi: pcmcia: Call scsi_done() directly

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>


# 50207148 27-May-2021 Hannes Reinecke <hare@suse.de>

scsi: pcmcia: nsp_cs: Use SAM_STAT_CHECK_CONDITION

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>


# 6417f031 16-Mar-2021 Leon Romanovsky <leon@kernel.org>

module: remove never implemented MODULE_SUPPORTED_DEVICE

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>


# 1c9eb798 13-Jan-2021 Hannes Reinecke <hare@suse.de>

scsi: nsp_cs: Drop internal SCSI message definition

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>


# 170b7d2d 19-Oct-2020 Tom Rix <trix@redhat.com>

scsi: Remove unneeded break statements

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>


# df561f66 23-Aug-2020 Gustavo A. R. Silva <gustavoars@kernel.org>

treewide: Use fallthrough pseudo-keyword

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>


# 97a33483 07-Jul-2020 Lee Jones <lee.jones@linaro.org>

scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'

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>


# af0b55d0 07-Jul-2020 Lee Jones <lee.jones@linaro.org>

scsi: pcmcia: nsp_cs: Use new __printf() format notation

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>


# 4bdc0d67 06-Jan-2020 Christoph Hellwig <hch@lst.de>

remove ioremap_nocache and devm_ioremap_nocache

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>


# 63cb70a1 05-Nov-2019 Johan Hovold <johan@kernel.org>

scsi: nsp_cs: drop redundant MODULE_LICENSE ifdef

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>


# 1b3a4640 17-Jun-2019 Ming Lei <ming.lei@redhat.com>

scsi: pcmcia: nsp_cs: use sg helper to iterate over scatterlist

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>


# 7e1c99e5 10-Dec-2018 Nathan Chancellor <nathan@kernel.org>

scsi: pcmcia: nsp_cs: Remove unnecessary parentheses

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>


# 4af14d11 13-Dec-2018 Christoph Hellwig <hch@lst.de>

scsi: remove the use_clustering flag

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>


# dc245cfa 03-Jul-2015 Vaishali Thakkar <vthakkar1994@gmail.com>

pcmcia: Use module_pcmcia_driver for scsi drivers

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>


# b84b1d52 29-Apr-2015 Hannes Reinecke <hare@suse.de>

scsi: Do not set cmd_per_lun to 1 in the host template

'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>


# f50332ff 02-Dec-2014 Rasmus Villemoes <linux@rasmusvillemoes.dk>

scsi: print single-character strings with seq_putc

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>


# 3d30079c 02-Dec-2014 Rasmus Villemoes <linux@rasmusvillemoes.dk>

scsi: merge consecutive seq_puts calls

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>


# 91c40f24 02-Dec-2014 Rasmus Villemoes <linux@rasmusvillemoes.dk>

scsi: replace seq_printf with seq_puts

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>


# 0c3de38f 02-Dec-2014 Rasmus Villemoes <linux@rasmusvillemoes.dk>

scsi: remove SPRINTF macro

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>


# 9b13494c 06-Aug-2014 Masanari Iida <standby24x7@gmail.com>

treewide: Fix typo in printk

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>


# 9cb78c16 25-Jun-2014 Hannes Reinecke <hare@suse.de>

scsi: use 64-bit LUNs

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>


# 3a189b3b 17-Apr-2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Revert "drivers/scsi: use module_pcmcia_driver() in pcmcia drivers"

This reverts commit 3e13ea450b6a4714ee05ba4d61e5b32821cde550.

It should go through the scsi tree instead.

Cc: kbuild test robot <fengguang.wu@intel.com>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 63fd57cb 31-Mar-2013 Al Viro <viro@zeniv.linux.org.uk>

nsp_cs: switch to ->show_info()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# 3e13ea45 06-Mar-2013 H Hartley Sweeten <hsweeten@visionengravers.com>

drivers/scsi: use module_pcmcia_driver() in pcmcia drivers

Use the new module_pcmcia_driver() macro to remove the boilerplate
module init/exit code in the pcmcia drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 90ab5ee9 12-Jan-2012 Rusty Russell <rusty@rustcorp.com.au>

module_param: make bool parameters really bool (drivers & misc)

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>


# 25f8f54f 03-May-2011 Joe Perches <joe@perches.com>

pcmcia: Convert pcmcia_device_id declarations to const

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>


# 25985edc 30-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi>

Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>


# f281233d 16-Nov-2010 Jeff Garzik <jeff@garzik.org>

SCSI host lock push-down

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>


# 2262054e 15-Aug-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: remove obsolete and wrong comments

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>


# 06b3a1d1 07-Aug-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: avoid messages on module (un)loading

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>


# 2e9b981a 08-Aug-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: move driver name to struct pcmcia_driver

Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# 1cc745d1 01-Aug-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: remove the "Finally, report what we've done" message

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>


# 00990e7c 30-Jul-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: use autoconfiguration feature for ioports and iomem

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>


# 440eed43 30-Jul-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: introduce autoconfiguration feature

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>


# 1ac71e5a 29-Jul-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: convert pcmcia_request_configuration to pcmcia_enable_device

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>


# 7feabb64 29-Jul-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: move config_{base,index,regs} to struct pcmcia_device

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>


# 37979e15 29-Jul-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: simplify IntType

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>


# fc301101 29-Jul-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: simplify Status, ExtStatus register access

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>


# e8405f0f 29-Jul-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: move Vpp setup to struct pcmcia_device

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>


# cdb13808 28-Jul-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: do not use win_req_t when calling pcmcia_request_window()

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>


# b5cb259e 24-Jul-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: remove memreq_t

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>


# 90abdc3b 24-Jul-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: do not use io_req_t when calling pcmcia_request_io()

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>


# 9a017a91 24-Jul-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: do not use io_req_t after call to pcmcia_request_io()

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>


# ac8b4228 21-Jul-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: remove cs_types.h

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>


# 317b6d63 20-Mar-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: dev_node removal (write-only drivers)

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>


# eb14120f 06-Mar-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: re-work pcmcia_request_irq()

Instead of the old pcmcia_request_irq() interface, drivers may now
choose between:

- calling request_irq/free_irq directly. Use the IRQ from *p_dev->irq.

- use pcmcia_request_irq(p_dev, handler_t); the PCMCIA core will
clean up automatically on calls to pcmcia_disable_device() or
device ejection.

- drivers still not capable of IRQF_SHARED (or not telling us so) may
use the deprecated pcmcia_request_exclusive_irq() for the time
being; they might receive a shared IRQ nonetheless.

CC: linux-bluetooth@vger.kernel.org
CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-serial@vger.kernel.org
CC: alsa-devel@alsa-project.org
CC: linux-usb@vger.kernel.org
CC: linux-ide@vger.kernel.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# e794c01b 15-Mar-2010 Dan Carpenter <error27@gmail.com>

pcmcia: add important if statement

There was a problem introduced in Jul 2008 by:
0e6f9d270840 pcmcia: use pcmcia_loop_config in scsi pcmcia drivers

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# 5fa9167a 08-Nov-2009 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: rework the irq_req_t typedef

Most of the irq_req_t typedef'd struct can be re-worked quite
easily:

(1) IRQInfo2 was unused in any case, so drop it.

(2) IRQInfo1 was used write-only, so drop it.

(3) Instance (private data to be passed to the IRQ handler):
Most PCMCIA drivers using pcmcia_request_irq() to actually
register an IRQ handler set the "dev_id" to the same pointer
as the "priv" pointer in struct pcmcia_device. Modify the two
exceptions (ipwireless, ibmtr_cs) to also work this waym and
set the IRQ handler's "dev_id" to p_dev->priv unconditionally.

(4) Handler is to be of type irq_handler_t.

(5) Handler != NULL already tells whether an IRQ handler is present.
Therefore, we do not need the IRQ_HANDLER_PRESENT flag in
irq_req_t.Attributes.

CC: netdev@vger.kernel.org
CC: linux-bluetooth@vger.kernel.org
CC: linux-ide@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-scsi@vger.kernel.org
CC: alsa-devel@alsa-project.org
CC: Jaroslav Kysela <perex@perex.cz>
CC: Jiri Kosina <jkosina@suse.cz>
CC: Karsten Keil <isdn@linux-pingi.de>
for the Bluetooth parts: Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# 6838b03f 02-Nov-2009 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: pcmcia_request_window() doesn't need a pointer to a pointer

pcmcia_request_window() only needs a pointer to struct pcmcia_device, not
a pointer to a pointer.

CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-scsi@vger.kernel.org
CC: Jiri Kosina <jkosina@suse.cz>
Acked-by: Karsten Keil <keil@b1-systems.de> (for ISDN)
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# 868575d1 13-Dec-2006 Magnus Damm <damm@opensource.se>

pcmcia: Pass struct pcmcia_device to pcmcia_map_mem_page()

No logic changes, just pass struct pcmcia_device to pcmcia_map_mem_page()

[linux@dominikbrodowski.net: update to 2.6.31]
CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-scsi@vger.kernel.org
CC: Jiri Kosina <jkosina@suse.cz>
Acked-by: Karsten Keil <keil@b1-systems.de> (for ISDN)
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# edced191 08-Aug-2009 Jiri Slaby <jirislaby@kernel.org>

[SCSI] nsp_cs: fix buf overflow

In nsp_cs_config there is a wrong struct nsp_cs_configdata allocation.
It allocates only sizeof(pointer to nsp_cs_configdata) for a whole
structure. Add a dereference to the sizeof to allocate
sizeof(nsp_cs_configdata).

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>


# 0454c740 10-Jun-2009 Roel Kluin <roel.kluin@gmail.com>

[SCSI] nsp_cs: time_out reaches -1

With a postfix decrement timeouts will reach -1 rather than 0, so the
errors do not appear.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 7a8fc9b2 17-Aug-2008 Adrian Bunk <bunk@kernel.org>

removed unused #include <linux/version.h>'s

This patch lets the files using linux/version.h match the files that
#include it.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# ad913c11 02-Aug-2008 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: pcmcia_config_loop() improvement by passing vcc

By passing the current Vcc setting to the pcmcia_config_loop callback
function, we can remove pcmcia_get_configuration_info() calls from many
drivers.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# 8e2fc39d 02-Aug-2008 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: pcmcia_config_loop() default CIS entry handling

Many drivers use the default CIS entry within their pcmcia_config_loop()
callback function. Therefore, factor the default CIS entry handling out.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# 498ac189 02-Aug-2008 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: pcmcia_config_loop() ConfigIndex unification

Almost all drivers set p_dev->conf.ConfigIndex to cfg->index in
the pcmcia_config_loop() callback function. Therefore, factor it out.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# 0e6f9d27 29-Jul-2008 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: use pcmcia_loop_config in scsi pcmcia drivers

Use the config loop helper in scsi pcmcia drivers.

CC: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
CC: linux-scsi@vger.kernel.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# cadbd4a5 04-Jul-2008 Harvey Harrison <harvey.harrison@gmail.com>

[SCSI] replace __FUNCTION__ with __func__

[jejb: fixed up a ton of missed conversions.

All of you are on notice this has happened, driver trees will now
need to be rebased]

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: SCSI List <linux-scsi@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 040cd232 16-Aug-2007 Boaz Harrosh <bharrosh@panasas.com>

[SCSI] nsp_cs: convert to data accessors and !use_sg cleanup

- use scsi data accessors
- cleanup !use_sg code paths
- TODO: use next_sg() for Jens's sglist branch. Look for 2
places with "SCp.buffer++"

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>


# 774251ef 02-Oct-2007 Adrian Bunk <bunk@stusta.de>

[SCSI] nsp_cs: remove kernel 2.4 code

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# dd00cc48 19-Jul-2007 Yoann Padioleau <padator@wanadoo.fr>

some kmalloc/memset ->kzalloc (tree wide)

Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).

Here is a short excerpt of the semantic patch performing
this transformation:

@@
type T2;
expression x;
identifier f,fld;
expression E;
expression E1,E2;
expression e1,e2,e3,y;
statement S;
@@

x =
- kmalloc
+ kzalloc
(E1,E2)
... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
- memset((T2)x,0,E1);

@@
expression E1,E2,E3;
@@

- kzalloc(E1 * E2,E3)
+ kcalloc(E1,E2,E3)

[akpm@linux-foundation.org: get kcalloc args the right way around]
Signed-off-by: Yoann Padioleau <padator@wanadoo.fr>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Cc: Bryan Wu <bryan.wu@analog.com>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Dave Airlie <airlied@linux.ie>
Acked-by: Roland Dreier <rolandd@cisco.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Acked-by: Pierre Ossman <drzeus-list@drzeus.cx>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: "David S. Miller" <davem@davemloft.net>
Acked-by: Greg KH <greg@kroah.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# cd354f1a 14-Feb-2007 Tim Schmielau <tim@physik3.uni-rostock.de>

[PATCH] remove many unneeded #includes of sched.h

After Al Viro (finally) succeeded in removing the sched.h #include in module.h
recently, it makes sense again to remove other superfluous sched.h includes.
There are quite a lot of files which include it but don't actually need
anything defined in there. Presumably these includes were once needed for
macros that used to live in sched.h, but moved to other header files in the
course of cleaning it up.

To ease the pain, this time I did not fiddle with any header files and only
removed #includes from .c-files, which tend to cause less trouble.

Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
configs in arch/arm/configs on arm. I also checked that no new warnings were
introduced by the patch (actually, some warnings are removed that were emitted
by unnecessarily included header files).

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# e176d397 08-Dec-2006 Daniel Ritz <daniel.ritz-ml@swissonline.ch>

[PATCH] PCMCIA: fix drivers broken by recent cleanup

Setting .ConfigBase and .Present is now done at the pcmcia core.

The driver cleanup missed a few places where the driver did set .Present
to PRESENT_OPTION and later to the values from the CIS. Setting to
PRESENT_OPTION now overrides the values from the CIS. So just remove
those lines.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# af2b3b50 25-Oct-2006 Dominik Brodowski <linux@dominikbrodowski.net>

[PATCH] pcmcia: conf.ConfigBase and conf.Present consolidation

struct pcmcia_device *p_dev->conf.ConfigBase and .Present are set in almost
all PCMICA driver right at the beginning, using the same calls but slightly
different implementations. Unfiy this in the PCMCIA core.

Includes a small bugfix ("drivers/net/pcmcia/xirc2ps_cs.c: remove unused
label") from and Signed-off-by Adrian Bunk <bunk@stusta.de>

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# 0fc82d5e 10-Oct-2006 Henrik Kretzschmar <henne@nachtwindheim.de>

[SCSI] convert ninja driver to struct scsi_cmnd

Changes the obsolete typedefd Scsi_Cmnd to struct scsi_cmnd in
the ninja scsi pcmcia driver.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 7d12e780 05-Oct-2006 David Howells <dhowells@redhat.com>

IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

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)


# de77aaff 04-Oct-2006 Henrik Kretzschmar <henne@nachtwindheim.de>

[SCSI] scsi: remove hosts.h

Remove the obsolete hosts.h file under drivers/scsi.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 1d6f359a 01-Jul-2006 Thomas Gleixner <tglx@linutronix.de>

[PATCH] irq-flags: scsi: Use the new IRQF_ constants

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 99d19bb7 25-Jun-2006 Matt Mackall <mpm@selenic.com>

[SCSI] random: remove redundant SA_SAMPLE_RANDOM from NinjaSCSI

The scsi layer is already calling add_disk_randomness in scsi_end_request.

Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# e2d40963 01-Mar-2006 Dominik Brodowski <linux@dominikbrodowski.net>

[PATCH] pcmcia: use bitfield instead of p_state and state

Instead of the two status values struct pcmcia_device->p_state and state,
use descriptive bitfields. Most value-checking in drivers was invalid, as
the core now only calls the ->remove() (a.k.a. detach) function in case the
attachement _and_ configuration was successful.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# 15b99ac1 31-Mar-2006 Dominik Brodowski <linux@dominikbrodowski.net>

[PATCH] pcmcia: add return value to _config() functions

Most of the driver initialization isn't done in the .probe function, but in
the internal _config() functions. Make them return a value, so that .probe
can properly report whether the probing of the device succeeded or not.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# fba395ee 31-Mar-2006 Dominik Brodowski <linux@dominikbrodowski.net>

[PATCH] pcmcia: remove dev_link_t and client_handle_t indirection

dev_link_t * and client_handle_t both mean struct pcmcai_device * by now.
Therefore, remove all such indirections.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# fd238232 05-Mar-2006 Dominik Brodowski <linux@dominikbrodowski.net>

[PATCH] pcmcia: embed dev_link_t into struct pcmcia_device

Embed dev_link_t into struct pcmcia_device(), as they basically address the
same entity. The actual contents of dev_link_t will be cleaned up step by step.
This patch includes a bugfix from and signed-off-by Andrew Morton.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# 70294b46 14-Jan-2006 Dominik Brodowski <linux@dominikbrodowski.net>

[PATCH] pcmcia: remove unneeded Vcc pseudo setting

As we do not allow setting Vcc in the pcmcia core, and Vpp1 and
Vpp2 can only be set to the same value, a lot of code can be
streamlined.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# 8661bb5b 01-Mar-2006 Dominik Brodowski <linux@dominikbrodowski.net>

[PATCH] pcmcia: default suspend and resume handling

In all but one case, the suspend and resume functions of PCMCIA drivers
contain mostly of calls to pcmcia_release_configuration() and
pcmcia_request_configuration(). Therefore, move this code out of the
drivers and into the core.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# 50db3fdb 15-Jan-2006 Dominik Brodowski <linux@dominikbrodowski.net>

[PATCH] pcmcia: convert remaining users of pcmcia_release_io and _irq

Convert the remaining drivers which use pcmcia_release_io or
pcmcia_release_irq, and remove the EXPORT of these symbols.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# 5f2a71fc 15-Jan-2006 Dominik Brodowski <linux@dominikbrodowski.net>

[PATCH] pcmcia: add pcmcia_disable_device

pcmcia_disable_device(struct pcmcia_device *p_dev) performs the necessary
cleanups upon device or driver removal: it calls the appropriate
pcmcia_release_* functions, and can replace (most) of the current drivers'
_release() functions.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# f8cfa618 14-Nov-2005 Dominik Brodowski <linux@dominikbrodowski.net>

[PATCH] pcmcia: unify attach, EVENT_CARD_INSERTION handlers into one probe callback

Unify the EVENT_CARD_INSERTION and "attach" callbacks to one unified
probe() callback. As all in-kernel drivers are changed to this new
callback, there will be no temporary backwards-compatibility. Inside a
probe() function, each driver _must_ set struct pcmcia_device
*p_dev->instance and instance->handle correctly.

With these patches, the basic driver interface for 16-bit PCMCIA drivers
now has the classic four callbacks known also from other buses:

int (*probe) (struct pcmcia_device *dev);
void (*remove) (struct pcmcia_device *dev);

int (*suspend) (struct pcmcia_device *dev);
int (*resume) (struct pcmcia_device *dev);

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# b4635811 14-Nov-2005 Dominik Brodowski <linux@dominikbrodowski.net>

[PATCH] pcmcia: remove dev_list from drivers

The linked list of devices managed by each PCMCIA driver is, in very most
cases, unused. Therefore, remove it from many drivers.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# cc3b4866 14-Nov-2005 Dominik Brodowski <linux@dominikbrodowski.net>

[PATCH] pcmcia: unify detach, REMOVAL_EVENT handlers into one remove callback

Unify the "detach" and REMOVAL_EVENT handlers to one "remove" function.
Old functionality is preserved, for the moment.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# 98e4c28b 14-Nov-2005 Dominik Brodowski <linux@dominikbrodowski.net>

[PATCH] pcmcia: new suspend core

Move the suspend and resume methods out of the event handler, and into
special functions. Also use these functions for pre- and post-reset, as
almost all drivers already do, and the remaining ones can easily be
converted.

Bugfix to include/pcmcia/ds.c
Signed-off-by: Andrew Morton <akpm@osdl.org>

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# f64a181d 31-Oct-2005 Christoph Hellwig <hch@lst.de>

[SCSI] remove Scsi_Device typedef

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# d0be4a7d 31-Oct-2005 Christoph Hellwig <hch@lst.de>

[SCSI] remove Scsi_Host_Template typedef

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 422c0d61 24-Oct-2005 Jeff Garzik <jgarzik@pobox.com>

[SCSI] use scmd_id(), scmd_channel() throughout code

Wrap a highly common idiom. Makes the code easier to read, helps pave
the way for sdev->{id,channel} removal, and adds a token that can easily
by grepped-for in the future.

There are a couple sdev_id() and scmd_printk() updates thrown in as well.

Rejections fixed up and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 44670d2b 07-Jul-2005 Dominik Brodowski <linux@dominikbrodowski.net>

[PATCH] pcmcia: remove references to pcmcia/version.h

As a follow-up, remove the inclusion of pcmcia/version.h in many files.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 2ffe6e28 07-Jul-2005 Pavel Roskin <proski@gnu.org>

[PATCH] pcmcia: remove client services version (fix)

One correction is needed. Changes are not needed for
drivers/scsi/pcmcia/nsp_cs.c because it uses versioning in the
compatibility part, which is never used in 2.6 kernels. The only right
thing we could to that compatibility code would be to remove it throughout
the file, but that would be a separate patch.

Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# a00db1ba 07-Jul-2005 Pavel Roskin <proski@gnu.org>

[PATCH] pcmcia: remove client services version

The Linux PCMCIA code has some data that was apparently used (or meant to be
used) to ensure that only proper client drivers are loaded. This is now
ensured (to a certain degree) by the fact that the most client drivers are
part of the kernel. Also, the version information has not been updated
despite major changes in PCMCIA API. This has made it meaningless.

This patch removes servinfo_t and pcmcia_get_card_services_info. They are not
used in any userspace utilities such as pcmcia-cs and pcmciautils.
drivers/pcmcia/pcmcia_ioctl.c is adjusted accordingly.

CS_RELEASE and CS_RELEASE_CODE are removed. include/pcmcia/version.h is empty
now. It will be removed later, but for now it's left in the tree to avoid
touching all PCMCIA clients.

The only driver that needs to be changed is drivers/scsi/pcmcia/nsp_cs.c,
which uses CS_RELEASE_CODE.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 1e212f36 07-Jul-2005 Dominik Brodowski <linux@dominikbrodowski.net>

[PATCH] pcmcia: move event handler

Move the "event handler" to struct pcmcia_driver -- the unified event handler
will disappear really soon, but switching it to struct pcmcia_driver in the
meantime allows for better "step-by-step" patches.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# aba14100 27-Jun-2005 Dominik Brodowski <linux@dominikbrodowski.net>

[PATCH] pcmcia: id_table for nsp_cs.c

Add pcmcia_device_id table.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 3471c288 28-May-2005 Jeff Garzik <jgarzik@pobox.com>

[SCSI] Remove no-op implementations of SCSI EH hooks

Drivers need not implement a hook that returns FAILED, and does nothing
else, since the SCSI midlayer code will do that for us.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


# 1da177e4 16-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org>

Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!