History log of /linux-master/drivers/scsi/esas2r/esas2r.h
Revision Date Author Comments
# 5f2d8c36 02-Nov-2020 Vaibhav Gupta <vaibhavgupta40@gmail.com>

scsi: esas2r: Use generic power management

Drivers should do only device-specific jobs. But in general, drivers using
legacy PCI PM framework for .suspend()/.resume() have to manage many PCI
PM-related tasks themselves which can be done by PCI Core itself. This
brings extra load on the driver and it directly calls PCI helper functions
to handle them.

Switch to the new generic framework by updating function signatures and
define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove
unnecessary calls to the PCI Helper functions along with the legacy
.suspend & .resume bindings.

Link: https://lore.kernel.org/r/20201102164730.324035-12-vaibhavgupta40@gmail.com
Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# e36e0427 23-Jul-2020 Lee Jones <lee.jones@linaro.org>

scsi: esas2r: Add braces around the one-line if()

In certain configurations esas2r_bugon() is sometimes NULLed by the compiler.

Fixes the following W=1 kernel build warning(s):

In file included from drivers/scsi/esas2r/esas2r_log.c:44:
drivers/scsi/esas2r/esas2r.h: In function ‘esas2r_rq_init_request’:
drivers/scsi/esas2r/esas2r.h:1229:17: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
1229 | esas2r_bugon();
| ^
NB: Lots of these - snipped for brevity

Link: https://lore.kernel.org/r/20200723122446.1329773-33-lee.jones@linaro.org
Cc: Bradley Grove <linuxdrivers@attotech.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 6f4e626f 07-Feb-2019 Nathan Chancellor <nathan@kernel.org>

scsi: ata: Use unsigned int for cmd's type in ioctls in scsi_host_template

Clang warns several times in the scsi subsystem (trimmed for brevity):

drivers/scsi/hpsa.c:6209:7: warning: overflow converting case value to
switch condition type (2147762695 to 18446744071562347015) [-Wswitch]
case CCISS_GETBUSTYPES:
^
drivers/scsi/hpsa.c:6208:7: warning: overflow converting case value to
switch condition type (2147762694 to 18446744071562347014) [-Wswitch]
case CCISS_GETHEARTBEAT:
^

The root cause is that the _IOC macro can generate really large numbers,
which don't fit into type 'int', which is used for the cmd parameter in
the ioctls in scsi_host_template. My research into how GCC and Clang are
handling this at a low level didn't prove fruitful. However, looking at
the rest of the kernel tree, all ioctls use an 'unsigned int' for the
cmd parameter, which will fit all of the _IOC values in the scsi/ata
subsystems.

Make that change because none of the ioctls expect a negative value for
any command, it brings the ioctls inline with the reset of the kernel,
and it removes ambiguity, which is never good when dealing with compilers.

Link: https://github.com/ClangBuiltLinux/linux/issues/85
Link: https://github.com/ClangBuiltLinux/linux/issues/154
Link: https://github.com/ClangBuiltLinux/linux/issues/157
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Bradley Grove <bgrove@attotech.com>
Acked-by: Don Brace <don.brace@microsemi.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 5785bfad 19-Mar-2018 Christoph Hellwig <hch@lst.de>

scsi: esas2r: remove initialization / cleanup dead wood

esas2r has been converted to hotplug style initialization long ago, but
kept various remant of the old-style scsi_module.c initialization
around. Remove those.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 249cf320 08-Jun-2017 Binoy Jayan <binoy.jayan@linaro.org>

scsi: esas2r: Replace semaphore fs_api_semaphore with mutex

The semaphore 'fs_api_semaphore' is used as a simple mutex, so it should
be written as one. Semaphores are going away in the future.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 74d2fd48 08-Jun-2017 Binoy Jayan <binoy.jayan@linaro.org>

scsi: esas2r: Replace semaphore fm_api_semaphore with mutex

The semaphore 'fm_api_semaphore' is used as a simple mutex, so it should
be written as one. Semaphores are going away in the future.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# db5ed4df 13-Nov-2014 Christoph Hellwig <hch@lst.de>

scsi: drop reason argument from ->change_queue_depth

Drop the now unused reason argument from the ->change_queue_depth method.
Also add a return value to scsi_adjust_queue_depth, and rename it to
scsi_change_queue_depth now that it can be used as the default
->change_queue_depth implementation.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Reviewed-by: Hannes Reinecke <hare@suse.de>


# c8b09f6f 03-Nov-2014 Christoph Hellwig <hch@lst.de>

scsi: don't set tagging state from scsi_adjust_queue_depth

Remove the tagged argument from scsi_adjust_queue_depth, and just let it
handle the queue depth. For most drivers those two are fairly separate,
given that most modern drivers don't care about the SCSI "tagged" status
of a command at all, and many old drivers allow queuing of multiple
untagged commands in the driver.

Instead we start out with the ->simple_tags flag set before calling
->slave_configure, which is how all drivers actually looking at
->simple_tags except for one worke anyway. The one other case looks
broken, but I've kept the behavior as-is for now.

Except for that we only change ->simple_tags from the ->change_queue_type,
and when rejecting a tag message in a single driver, so keeping this
churn out of scsi_adjust_queue_depth is a clear win.

Now that the usage of scsi_adjust_queue_depth is more obvious we can
also remove all the trivial instances in ->slave_alloc or ->slave_configure
that just set it to the cmd_per_lun default.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>


# a62182f3 02-Oct-2014 Christoph Hellwig <hch@lst.de>

scsi: provide a generic change_queue_type method

Most drivers use exactly the same implementation, so provide it as a
library function.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>


# 8e65e2f0 01-Oct-2013 Bradley Grove <bgrove@attotech.com>

[SCSI] esas2r: Fixes for big-endian platforms

In esas2r_format_init_msg(), sgl_page_size and epoch_time params
are converted to little endian and the firmware version read from
the hba is converted to cpu endianess.

In esas2r_rq_init_request, correct and simplify the construction
of the SCSI handle.

These fixes are the result of testing on a PPC64 machine.

Signed-off-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 9588d24e 01-Oct-2013 Bradley Grove <bgrove@attotech.com>

[SCSI] esas2r: Directly call kernel functions for atomic bit operations

Previously the code embedded the kernel's test_bit/clear_bit
functions in wrappers that accepted u32 parameters. The
wrapper cast these parameters to longs before passing them
to the kernel's bit functions. This did not work properly
on platforms with 64-bit longs.

Signed-off-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 26780d9e 23-Aug-2013 Bradley Grove <bgrove@attotech.com>

[SCSI] esas2r: ATTO Technology ExpressSAS 6G SAS/SATA RAID Adapter Driver

This is a new driver for ATTO Technology's ExpressSAS series of hardware RAID
adapters. It supports the following adapters:

- ExpressSAS R60F
- ExpressSAS R680
- ExpressSAS R608
- ExpressSAS R644

Signed-off-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>