Age | Commit message (Collapse) | Author | Files | Lines |
|
Fixed getting wrong configuration data of adapter type B and type D.
Signed-off-by: Ching Huang <[email protected]>
Reviewed-by: Hannes Reinicke <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Use scsi_host_{get,put}() instead of open-coding these functions.
Compile-tested only.
[mkp: Dropped CC:stable and fixed James Smart's email address]
Signed-off-by: Bart Van Assche <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Cc: James Smart <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Even for signed types we have to check for bigger positive value first.
Otherwise it will be never happened.
Signed-off-by: Andy Shevchenko <[email protected]>
Acked-by: Douglas Gilbert <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Reviewed-by: Ewan Milne <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
The VPD page information might change, so we need to be able to update
it. This patch implements a VPD page rescan whenever the 'rescan' sysfs
attribute is triggered.
Signed-off-by: Hannes Reinecke <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Reviewed-by: Shane Seymour <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Signed-off-by: Fengguang Wu <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Reviewed-by: Mahesh Rajashekhara <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
do_div is the wrong way to divide a sector_t, as it is less efficient
when sector_t is 32-bit wide. With the upcoming do_div optimizations,
the kernel starts warning about this:
drivers/scsi/scsi_debug.c: In function 'dif_store':
include/asm-generic/div64.h:207:28: warning: comparison of distinct pointer types lacks a cast
This changes the code to use sector_div instead, which always produces
optimal code.
Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinicke <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Originally the driver would use of_irq_count to calculate how much
memory is required for storing the interrupt names, since the number of
interrupt sources for the controller is variable. Since of_irq_count
cannot be used by the driver, use fixed names.
Signed-off-by: John Garry <[email protected]>
Signed-off-by: Zhangfei Gao <[email protected]>
Acked-by: Rob Herring <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Add maintainer for HiSilicon SAS driver.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Add handlers for fatal interrupts.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Add method for lldd_control_phy. Currently link rate control and spinup
hold is unsupported.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Add function methods for tmf's.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Add functions for scsi host template scan_finished and scan_start
methods.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Add support for smp function, which allows devices attached by expander
to be controlled.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
This is for expander broadcast event.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Add abnormal irq handler. This handler is concerned with phy down event.
Also add port formed and port deformed handlers.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Add functions to deal with lldd_dev_found and lldd_dev_gone.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Add cq interrupt handler and also slot error handler function.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Add path to send ssp command to HW.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Add code to interrupts, so now we can get a phy up interrupt when a disk
is connected.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Add module init code for v1 hw.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Include initialisation.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
The SAS address for the HBA comes from the device tree.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Each completion queue has a structure. This is mainly for passing to irq
handler so we know which queue the irq occured on.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Add functionality to init slot indexing.
Slot indexing is for the host to track which slots (or tags) are free
and which are used.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
This patch also includes relevant memory/pool freeing and sas/scsi host
removal.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Allocate DMA and non-DMA memories for the controller. Also create DMA
pools.
These include:
- Delivery queues
- Completion queues
- Command status buffer
- Command table
- ITCT (For device context)
- Host slot info
- IO status
- Breakpoint
- host slot indexing
- SG data
- FIS
- interrupts names
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Scan the device tree for all properties. Also do this:
- do ioremap for SAS registers
- allocate memory for interrupt names
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Add functionality to register device as a scsi host.
The SAS domain transport ops are empty at this point.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
This patch adds the initial bare main driver for the HiSilicon SAS
HBA. This only introduces the changes to build and load the main driver
module.
The complete driver consists of the core main module and also a module
platform driver for driving the hw.
The HBA is a platform device.
Signed-off-by: John Garry <[email protected]>
Signed-off-by: Zhangfei Gao <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Add devicetree bindings for HiSilicon SAS driver.
Signed-off-by: John Garry <[email protected]>
Signed-off-by: Zhangfei Gao <[email protected]>
Acked-by: Rob Herring <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
The xfer_rdy, command, and task frame's iu structures are not available
in <scsi/sas.h>, but only aic94xx driver folder. Add them to
include/scsi/sas.h
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Move 870-specific init code to a separate function atp870_init()
Signed-off-by: Ondrej Zary <[email protected]>
Reviewed-by: Hannes Reinicke <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Move 885-specific init code to a separate function atp885_init()
Signed-off-by: Ondrej Zary <[email protected]>
Reviewed-by: Hannes Reinicke <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Move 880-specific init code to a separate function atp880_init()
Signed-off-by: Ondrej Zary <[email protected]>
Reviewed-by: Hannes Reinicke <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Call _init_tables before chip-specific initialization. This avoids code
duplication and fixes a bug(?) in 880 init where the values read from flash
into atpdev->sp are then overwritten by calling init_tables.
Signed-off-by: Ondrej Zary <[email protected]>
Reviewed-by: Hannes Reinicke <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
scam_on is used only during probe, no need to keep it later.
Signed-off-by: Ondrej Zary <[email protected]>
Reviewed-by: Hannes Reinicke <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Allocate IRQ later during probe to avoid code duplication and also
remove the need for weird locking in _probe.
(It was probably there to prevent race with the IRQ handler?)
Signed-off-by: Ondrej Zary <[email protected]>
Reviewed-by: Hannes Reinicke <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Use pci_request_regions and do it before accessing the I/O ports.
Also add missing pci_disable_device() call to atp870u_remove().
Signed-off-by: Ondrej Zary <[email protected]>
Reviewed-by: Hannes Reinicke <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Introduce chip type inline functions to simplify code, allowing to delete
dev_id from struct atp_unit.
Signed-off-by: Ondrej Zary <[email protected]>
Reviewed-by: Hannes Reinicke <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Move shpnt common code to the top, remove base_io, use pci_resource_len.
Signed-off-by: Ondrej Zary <[email protected]>
Reviewed-by: Hannes Reinicke <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
chip_ver is used for wide chip detection only. Remove it and use a local
variable instead (for 870; 880 and 885 are always wide).
Signed-off-by: Ondrej Zary <[email protected]>
Reviewed-by: Hannes Reinicke <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|
|
Signed-off-by: Ondrej Zary <[email protected]>
Reviewed-by: Hannes Reinicke <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
|