mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI updates from James Bottomley: "Updates to the usual drivers (ufs, lpfc, qla2xxx, mpi3mr, libsas) and the usual minor updates and bug fixes but no significant core changes" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (116 commits) scsi: storvsc: Handle additional SRB status values scsi: libsas: Delete sas_ata_task.retry_count scsi: libsas: Delete sas_ata_task.stp_affil_pol scsi: libsas: Delete sas_ata_task.set_affil_pol scsi: libsas: Delete sas_ssp_task.task_prio scsi: libsas: Delete sas_ssp_task.enable_first_burst scsi: libsas: Delete sas_ssp_task.retry_count scsi: libsas: Delete struct scsi_core scsi: libsas: Delete enum sas_phy_type scsi: libsas: Delete enum sas_class scsi: libsas: Delete sas_ha_struct.lldd_module scsi: target: Fix write perf due to unneeded throttling scsi: lpfc: Do not abuse UUID APIs and LPFC_COMPRESS_VMID_SIZE scsi: pm8001: Remove unused declarations scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock scsi: elx: sli4: Remove code duplication scsi: bfa: Replace one-element array with flexible-array member in struct fc_rscn_pl_s scsi: qla2xxx: Remove unused declarations scsi: pmcraid: Use pci_dev_id() to simplify the code scsi: pm80xx: Set RETFIS when requested by libsas ...
This commit is contained in:
@@ -1437,180 +1437,6 @@ Description:
|
||||
If avail_wb_buff < wb_flush_threshold, it indicates that WriteBooster buffer needs to
|
||||
be flushed, otherwise it is not necessary.
|
||||
|
||||
What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/hpb_version
|
||||
What: /sys/bus/platform/devices/*.ufs/device_descriptor/hpb_version
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: This entry shows the HPB specification version.
|
||||
The full information about the descriptor can be found in the UFS
|
||||
HPB (Host Performance Booster) Extension specifications.
|
||||
Example: version 1.2.3 = 0123h
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/bus/platform/drivers/ufshcd/*/device_descriptor/hpb_control
|
||||
What: /sys/bus/platform/devices/*.ufs/device_descriptor/hpb_control
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: This entry shows an indication of the HPB control mode.
|
||||
00h: Host control mode
|
||||
01h: Device control mode
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_region_size
|
||||
What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/hpb_region_size
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: This entry shows the bHPBRegionSize which can be calculated
|
||||
as in the following (in bytes):
|
||||
HPB Region size = 512B * 2^bHPBRegionSize
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_number_lu
|
||||
What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/hpb_number_lu
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: This entry shows the maximum number of HPB LU supported by
|
||||
the device.
|
||||
00h: HPB is not supported by the device.
|
||||
01h ~ 20h: Maximum number of HPB LU supported by the device
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_subregion_size
|
||||
What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/hpb_subregion_size
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: This entry shows the bHPBSubRegionSize, which can be
|
||||
calculated as in the following (in bytes) and shall be a multiple of
|
||||
logical block size:
|
||||
HPB Sub-Region size = 512B x 2^bHPBSubRegionSize
|
||||
bHPBSubRegionSize shall not exceed bHPBRegionSize.
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/bus/platform/drivers/ufshcd/*/geometry_descriptor/hpb_max_active_regions
|
||||
What: /sys/bus/platform/devices/*.ufs/geometry_descriptor/hpb_max_active_regions
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: This entry shows the maximum number of active HPB regions that
|
||||
is supported by the device.
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/unit_descriptor/hpb_lu_max_active_regions
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: This entry shows the maximum number of HPB regions assigned to
|
||||
the HPB logical unit.
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/unit_descriptor/hpb_pinned_region_start_offset
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: This entry shows the start offset of HPB pinned region.
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/unit_descriptor/hpb_number_pinned_regions
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: This entry shows the number of HPB pinned regions assigned to
|
||||
the HPB logical unit.
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/hpb_stats/hit_cnt
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: This entry shows the number of reads that changed to HPB read.
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/hpb_stats/miss_cnt
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: This entry shows the number of reads that cannot be changed to
|
||||
HPB read.
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/hpb_stats/rcmd_noti_cnt
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: This entry shows the number of response UPIUs that has
|
||||
recommendations for activating sub-regions and/or inactivating region.
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/hpb_stats/rcmd_active_cnt
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: For the HPB device control mode, this entry shows the number of
|
||||
active sub-regions recommended by response UPIUs. For the HPB host control
|
||||
mode, this entry shows the number of active sub-regions recommended by the
|
||||
HPB host control mode heuristic algorithm.
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/hpb_stats/rcmd_inactive_cnt
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: For the HPB device control mode, this entry shows the number of
|
||||
inactive regions recommended by response UPIUs. For the HPB host control
|
||||
mode, this entry shows the number of inactive regions recommended by the
|
||||
HPB host control mode heuristic algorithm.
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/hpb_stats/map_req_cnt
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: This entry shows the number of read buffer commands for
|
||||
activating sub-regions recommended by response UPIUs.
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/hpb_params/requeue_timeout_ms
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: This entry shows the requeue timeout threshold for write buffer
|
||||
command in ms. The value can be changed by writing an integer to
|
||||
this entry.
|
||||
|
||||
What: /sys/bus/platform/drivers/ufshcd/*/attributes/max_data_size_hpb_single_cmd
|
||||
What: /sys/bus/platform/devices/*.ufs/attributes/max_data_size_hpb_single_cmd
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: This entry shows the maximum HPB data size for using a single HPB
|
||||
command.
|
||||
|
||||
=== ========
|
||||
00h 4KB
|
||||
01h 8KB
|
||||
02h 12KB
|
||||
...
|
||||
FFh 1024KB
|
||||
=== ========
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/bus/platform/drivers/ufshcd/*/flags/hpb_enable
|
||||
What: /sys/bus/platform/devices/*.ufs/flags/hpb_enable
|
||||
Date: June 2021
|
||||
Contact: Daejun Park <daejun7.park@samsung.com>
|
||||
Description: This entry shows the status of HPB.
|
||||
|
||||
== ============================
|
||||
0 HPB is not enabled.
|
||||
1 HPB is enabled
|
||||
== ============================
|
||||
|
||||
The file is read only.
|
||||
|
||||
Contact: Daniil Lunev <dlunev@chromium.org>
|
||||
What: /sys/bus/platform/drivers/ufshcd/*/capabilities/
|
||||
What: /sys/bus/platform/devices/*.ufs/capabilities/
|
||||
@@ -1648,76 +1474,3 @@ Description: Indicates status of Write Booster.
|
||||
|
||||
The file is read only.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/activation_thld
|
||||
Date: February 2021
|
||||
Contact: Avri Altman <avri.altman@wdc.com>
|
||||
Description: In host control mode, reads are the major source of activation
|
||||
trials. Once this threshold hs met, the region is added to the
|
||||
"to-be-activated" list. Since we reset the read counter upon
|
||||
write, this include sending a rb command updating the region
|
||||
ppn as well.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/normalization_factor
|
||||
Date: February 2021
|
||||
Contact: Avri Altman <avri.altman@wdc.com>
|
||||
Description: In host control mode, we think of the regions as "buckets".
|
||||
Those buckets are being filled with reads, and emptied on write.
|
||||
We use entries_per_srgn - the amount of blocks in a subregion as
|
||||
our bucket size. This applies because HPB1.0 only handles
|
||||
single-block reads. Once the bucket size is crossed, we trigger
|
||||
a normalization work - not only to avoid overflow, but mainly
|
||||
because we want to keep those counters normalized, as we are
|
||||
using those reads as a comparative score, to make various decisions.
|
||||
The normalization is dividing (shift right) the read counter by
|
||||
the normalization_factor. If during consecutive normalizations
|
||||
an active region has exhausted its reads - inactivate it.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/eviction_thld_enter
|
||||
Date: February 2021
|
||||
Contact: Avri Altman <avri.altman@wdc.com>
|
||||
Description: Region deactivation is often due to the fact that eviction took
|
||||
place: A region becomes active at the expense of another. This is
|
||||
happening when the max-active-regions limit has been crossed.
|
||||
In host mode, eviction is considered an extreme measure. We
|
||||
want to verify that the entering region has enough reads, and
|
||||
the exiting region has much fewer reads. eviction_thld_enter is
|
||||
the min reads that a region must have in order to be considered
|
||||
a candidate for evicting another region.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/eviction_thld_exit
|
||||
Date: February 2021
|
||||
Contact: Avri Altman <avri.altman@wdc.com>
|
||||
Description: Same as above for the exiting region. A region is considered to
|
||||
be a candidate for eviction only if it has fewer reads than
|
||||
eviction_thld_exit.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/read_timeout_ms
|
||||
Date: February 2021
|
||||
Contact: Avri Altman <avri.altman@wdc.com>
|
||||
Description: In order not to hang on to "cold" regions, we inactivate
|
||||
a region that has no READ access for a predefined amount of
|
||||
time - read_timeout_ms. If read_timeout_ms has expired, and the
|
||||
region is dirty, it is less likely that we can make any use of
|
||||
HPB reading it so we inactivate it. Still, deactivation has
|
||||
its overhead, and we may still benefit from HPB reading this
|
||||
region if it is clean - see read_timeout_expiries.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/read_timeout_expiries
|
||||
Date: February 2021
|
||||
Contact: Avri Altman <avri.altman@wdc.com>
|
||||
Description: If the region read timeout has expired, but the region is clean,
|
||||
just re-wind its timer for another spin. Do that as long as it
|
||||
is clean and did not exhaust its read_timeout_expiries threshold.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/timeout_polling_interval_ms
|
||||
Date: February 2021
|
||||
Contact: Avri Altman <avri.altman@wdc.com>
|
||||
Description: The frequency with which the delayed worker that checks the
|
||||
read_timeouts is awakened.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/hpb_param_sysfs/inflight_map_req
|
||||
Date: February 2021
|
||||
Contact: Avri Altman <avri.altman@wdc.com>
|
||||
Description: In host control mode the host is the originator of map requests.
|
||||
To avoid flooding the device with map requests, use a simple throttling
|
||||
mechanism that limits the number of inflight map requests.
|
||||
|
||||
@@ -1190,11 +1190,11 @@ Members of interest:
|
||||
- pointer to scsi_device object that this command is
|
||||
associated with.
|
||||
resid
|
||||
- an LLD should set this signed integer to the requested
|
||||
- an LLD should set this unsigned integer to the requested
|
||||
transfer length (i.e. 'request_bufflen') less the number
|
||||
of bytes that are actually transferred. 'resid' is
|
||||
preset to 0 so an LLD can ignore it if it cannot detect
|
||||
underruns (overruns should be rare). If possible an LLD
|
||||
underruns (overruns should not be reported). An LLD
|
||||
should set 'resid' prior to invoking 'done'. The most
|
||||
interesting case is data transfers from a SCSI target
|
||||
device (e.g. READs) that underrun.
|
||||
|
||||
@@ -1979,12 +1979,8 @@ static void srp_process_rsp(struct srp_rdma_ch *ch, struct srp_rsp *rsp)
|
||||
|
||||
if (unlikely(rsp->flags & SRP_RSP_FLAG_DIUNDER))
|
||||
scsi_set_resid(scmnd, be32_to_cpu(rsp->data_in_res_cnt));
|
||||
else if (unlikely(rsp->flags & SRP_RSP_FLAG_DIOVER))
|
||||
scsi_set_resid(scmnd, -be32_to_cpu(rsp->data_in_res_cnt));
|
||||
else if (unlikely(rsp->flags & SRP_RSP_FLAG_DOUNDER))
|
||||
scsi_set_resid(scmnd, be32_to_cpu(rsp->data_out_res_cnt));
|
||||
else if (unlikely(rsp->flags & SRP_RSP_FLAG_DOOVER))
|
||||
scsi_set_resid(scmnd, -be32_to_cpu(rsp->data_out_res_cnt));
|
||||
|
||||
srp_free_req(ch, req, scmnd,
|
||||
be32_to_cpu(rsp->req_lim_delta));
|
||||
|
||||
@@ -836,7 +836,7 @@ config SCSI_IMM
|
||||
|
||||
config SCSI_IZIP_EPP16
|
||||
bool "ppa/imm option - Use slow (but safe) EPP-16"
|
||||
depends on SCSI_PPA || SCSI_IMM
|
||||
depends on SCSI_IMM
|
||||
help
|
||||
EPP (Enhanced Parallel Port) is a standard for parallel ports which
|
||||
allows them to act as expansion buses that can handle up to 64
|
||||
|
||||
@@ -61,23 +61,11 @@ $(OUTDIR)/aicdb.h:
|
||||
clean:
|
||||
rm -f $(clean-files)
|
||||
|
||||
# Create a dependency chain in generated files
|
||||
# to avoid concurrent invocations of the single
|
||||
# rule that builds them all.
|
||||
$(OUTDIR)/aicasm_gram.c: $(OUTDIR)/aicasm_gram.h
|
||||
$(OUTDIR)/aicasm_gram.c $(OUTDIR)/aicasm_gram.h: aicasm_gram.y
|
||||
$(YACC) $(YFLAGS) -b $(<:.y=) $<
|
||||
mv $(<:.y=).tab.c $(OUTDIR)/$(<:.y=.c)
|
||||
mv $(<:.y=).tab.h $(OUTDIR)/$(<:.y=.h)
|
||||
$(YACC) $(YFLAGS) -b $(<:.y=) $< -o $(OUTDIR)/$(<:.y=.c)
|
||||
|
||||
# Create a dependency chain in generated files
|
||||
# to avoid concurrent invocations of the single
|
||||
# rule that builds them all.
|
||||
$(OUTDIR)/aicasm_macro_gram.c: $(OUTDIR)/aicasm_macro_gram.h
|
||||
$(OUTDIR)/aicasm_macro_gram.c $(OUTDIR)/aicasm_macro_gram.h: aicasm_macro_gram.y
|
||||
$(YACC) $(YFLAGS) -b $(<:.y=) -p mm $<
|
||||
mv $(<:.y=).tab.c $(OUTDIR)/$(<:.y=.c)
|
||||
mv $(<:.y=).tab.h $(OUTDIR)/$(<:.y=.h)
|
||||
$(YACC) $(YFLAGS) -b $(<:.y=) -p mm $< -o $(OUTDIR)/$(<:.y=.c)
|
||||
|
||||
$(OUTDIR)/aicasm_scan.c: aicasm_scan.l
|
||||
$(LEX) $(LFLAGS) -o $@ $<
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sysexits.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "aicasm_symbol.h"
|
||||
#include "aicasm.h"
|
||||
|
||||
@@ -28,7 +28,7 @@ static int asd_get_user_sas_addr(struct asd_ha_struct *asd_ha)
|
||||
if (asd_ha->hw_prof.sas_addr[0])
|
||||
return 0;
|
||||
|
||||
return sas_request_addr(asd_ha->sas_ha.core.shost,
|
||||
return sas_request_addr(asd_ha->sas_ha.shost,
|
||||
asd_ha->hw_prof.sas_addr);
|
||||
}
|
||||
|
||||
@@ -72,10 +72,8 @@ static int asd_init_phy(struct asd_phy *phy)
|
||||
struct asd_sas_phy *sas_phy = &phy->sas_phy;
|
||||
|
||||
sas_phy->enabled = 1;
|
||||
sas_phy->class = SAS;
|
||||
sas_phy->iproto = SAS_PROTOCOL_ALL;
|
||||
sas_phy->tproto = 0;
|
||||
sas_phy->type = PHY_TYPE_PHYSICAL;
|
||||
sas_phy->role = PHY_ROLE_INITIATOR;
|
||||
sas_phy->oob_mode = OOB_NOT_CONNECTED;
|
||||
sas_phy->linkrate = SAS_LINK_RATE_UNKNOWN;
|
||||
|
||||
@@ -667,7 +667,6 @@ static int asd_register_sas_ha(struct asd_ha_struct *asd_ha)
|
||||
}
|
||||
|
||||
asd_ha->sas_ha.sas_ha_name = (char *) asd_ha->name;
|
||||
asd_ha->sas_ha.lldd_module = THIS_MODULE;
|
||||
asd_ha->sas_ha.sas_addr = &asd_ha->hw_prof.sas_addr[0];
|
||||
|
||||
for (i = 0; i < ASD_MAX_PHYS; i++) {
|
||||
@@ -688,8 +687,8 @@ static int asd_unregister_sas_ha(struct asd_ha_struct *asd_ha)
|
||||
|
||||
err = sas_unregister_ha(&asd_ha->sas_ha);
|
||||
|
||||
sas_remove_host(asd_ha->sas_ha.core.shost);
|
||||
scsi_host_put(asd_ha->sas_ha.core.shost);
|
||||
sas_remove_host(asd_ha->sas_ha.shost);
|
||||
scsi_host_put(asd_ha->sas_ha.shost);
|
||||
|
||||
kfree(asd_ha->sas_ha.sas_phy);
|
||||
kfree(asd_ha->sas_ha.sas_port);
|
||||
@@ -739,7 +738,7 @@ static int asd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
asd_printk("found %s, device %s\n", asd_ha->name, pci_name(dev));
|
||||
|
||||
SHOST_TO_SAS_HA(shost) = &asd_ha->sas_ha;
|
||||
asd_ha->sas_ha.core.shost = shost;
|
||||
asd_ha->sas_ha.shost = shost;
|
||||
shost->transportt = aic94xx_transport_template;
|
||||
shost->max_id = ~0;
|
||||
shost->max_lun = ~0;
|
||||
|
||||
@@ -388,14 +388,9 @@ static int asd_build_ata_ascb(struct asd_ascb *ascb, struct sas_task *task,
|
||||
flags |= data_dir_flags[task->data_dir];
|
||||
scb->ata_task.ata_flags = flags;
|
||||
|
||||
scb->ata_task.retry_count = task->ata_task.retry_count;
|
||||
scb->ata_task.retry_count = 0;
|
||||
|
||||
flags = 0;
|
||||
if (task->ata_task.set_affil_pol)
|
||||
flags |= SET_AFFIL_POLICY;
|
||||
if (task->ata_task.stp_affil_pol)
|
||||
flags |= STP_AFFIL_POLICY;
|
||||
scb->ata_task.flags = flags;
|
||||
scb->ata_task.flags = 0;
|
||||
}
|
||||
ascb->tasklet_complete = asd_task_tasklet_complete;
|
||||
|
||||
@@ -485,9 +480,6 @@ static int asd_build_ssp_ascb(struct asd_ascb *ascb, struct sas_task *task,
|
||||
scb->ssp_task.ssp_frame.tptt = cpu_to_be16(0xFFFF);
|
||||
|
||||
memcpy(scb->ssp_task.ssp_cmd.lun, task->ssp_task.LUN, 8);
|
||||
if (task->ssp_task.enable_first_burst)
|
||||
scb->ssp_task.ssp_cmd.efb_prio_attr |= EFB_MASK;
|
||||
scb->ssp_task.ssp_cmd.efb_prio_attr |= (task->ssp_task.task_prio << 3);
|
||||
scb->ssp_task.ssp_cmd.efb_prio_attr |= (task->ssp_task.task_attr & 7);
|
||||
memcpy(scb->ssp_task.ssp_cmd.cdb, task->ssp_task.cmd->cmnd,
|
||||
task->ssp_task.cmd->cmd_len);
|
||||
|
||||
@@ -1715,14 +1715,14 @@ static void arcmsr_shutdown(struct pci_dev *pdev)
|
||||
arcmsr_flush_adapter_cache(acb);
|
||||
}
|
||||
|
||||
static int arcmsr_module_init(void)
|
||||
static int __init arcmsr_module_init(void)
|
||||
{
|
||||
int error = 0;
|
||||
error = pci_register_driver(&arcmsr_pci_driver);
|
||||
return error;
|
||||
}
|
||||
|
||||
static void arcmsr_module_exit(void)
|
||||
static void __exit arcmsr_module_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&arcmsr_pci_driver);
|
||||
}
|
||||
|
||||
@@ -450,6 +450,10 @@ int beiscsi_iface_set_param(struct Scsi_Host *shost,
|
||||
}
|
||||
|
||||
nla_for_each_attr(attrib, data, dt_len, rm_len) {
|
||||
/* ignore nla_type as it is never used */
|
||||
if (nla_len(attrib) < sizeof(*iface_param))
|
||||
return -EINVAL;
|
||||
|
||||
iface_param = nla_data(attrib);
|
||||
|
||||
if (iface_param->param_type != ISCSI_NET_PARAM)
|
||||
|
||||
@@ -800,7 +800,7 @@ struct fc_rscn_pl_s {
|
||||
u8 command;
|
||||
u8 pagelen;
|
||||
__be16 payldlen;
|
||||
struct fc_rscn_event_s event[1];
|
||||
struct fc_rscn_event_s event[];
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -1051,7 +1051,7 @@ fc_rscn_build(struct fchs_s *fchs, struct fc_rscn_pl_s *rscn,
|
||||
rscn->event[0].format = FC_RSCN_FORMAT_PORTID;
|
||||
rscn->event[0].portid = s_id;
|
||||
|
||||
return sizeof(struct fc_rscn_pl_s);
|
||||
return struct_size(rscn, event, 1);
|
||||
}
|
||||
|
||||
u16
|
||||
|
||||
@@ -2317,12 +2317,8 @@ sli_xmit_bls_rsp64_wqe(struct sli4 *sli, void *buf,
|
||||
SLI4_GENERIC_CONTEXT_VPI << SLI4_BLS_RSP_WQE_CT_SHFT;
|
||||
bls->context_tag = cpu_to_le16(params->vpi);
|
||||
|
||||
if (params->s_id != U32_MAX)
|
||||
bls->local_n_port_id_dword |=
|
||||
cpu_to_le32(params->s_id & 0x00ffffff);
|
||||
else
|
||||
bls->local_n_port_id_dword |=
|
||||
cpu_to_le32(params->s_id & 0x00ffffff);
|
||||
bls->local_n_port_id_dword |=
|
||||
cpu_to_le32(params->s_id & 0x00ffffff);
|
||||
|
||||
dw_ridflags = (dw_ridflags & ~SLI4_BLS_RSP_RID) |
|
||||
(params->d_id & SLI4_BLS_RSP_RID);
|
||||
|
||||
@@ -319,16 +319,17 @@ static void fcoe_ctlr_announce(struct fcoe_ctlr *fip)
|
||||
{
|
||||
struct fcoe_fcf *sel;
|
||||
struct fcoe_fcf *fcf;
|
||||
unsigned long flags;
|
||||
|
||||
mutex_lock(&fip->ctlr_mutex);
|
||||
spin_lock_bh(&fip->ctlr_lock);
|
||||
spin_lock_irqsave(&fip->ctlr_lock, flags);
|
||||
|
||||
kfree_skb(fip->flogi_req);
|
||||
fip->flogi_req = NULL;
|
||||
list_for_each_entry(fcf, &fip->fcfs, list)
|
||||
fcf->flogi_sent = 0;
|
||||
|
||||
spin_unlock_bh(&fip->ctlr_lock);
|
||||
spin_unlock_irqrestore(&fip->ctlr_lock, flags);
|
||||
sel = fip->sel_fcf;
|
||||
|
||||
if (sel && ether_addr_equal(sel->fcf_mac, fip->dest_addr))
|
||||
@@ -699,6 +700,7 @@ int fcoe_ctlr_els_send(struct fcoe_ctlr *fip, struct fc_lport *lport,
|
||||
{
|
||||
struct fc_frame *fp;
|
||||
struct fc_frame_header *fh;
|
||||
unsigned long flags;
|
||||
u16 old_xid;
|
||||
u8 op;
|
||||
u8 mac[ETH_ALEN];
|
||||
@@ -732,11 +734,11 @@ int fcoe_ctlr_els_send(struct fcoe_ctlr *fip, struct fc_lport *lport,
|
||||
op = FIP_DT_FLOGI;
|
||||
if (fip->mode == FIP_MODE_VN2VN)
|
||||
break;
|
||||
spin_lock_bh(&fip->ctlr_lock);
|
||||
spin_lock_irqsave(&fip->ctlr_lock, flags);
|
||||
kfree_skb(fip->flogi_req);
|
||||
fip->flogi_req = skb;
|
||||
fip->flogi_req_send = 1;
|
||||
spin_unlock_bh(&fip->ctlr_lock);
|
||||
spin_unlock_irqrestore(&fip->ctlr_lock, flags);
|
||||
schedule_work(&fip->timer_work);
|
||||
return -EINPROGRESS;
|
||||
case ELS_FDISC:
|
||||
@@ -1705,10 +1707,11 @@ static int fcoe_ctlr_flogi_send_locked(struct fcoe_ctlr *fip)
|
||||
static int fcoe_ctlr_flogi_retry(struct fcoe_ctlr *fip)
|
||||
{
|
||||
struct fcoe_fcf *fcf;
|
||||
unsigned long flags;
|
||||
int error;
|
||||
|
||||
mutex_lock(&fip->ctlr_mutex);
|
||||
spin_lock_bh(&fip->ctlr_lock);
|
||||
spin_lock_irqsave(&fip->ctlr_lock, flags);
|
||||
LIBFCOE_FIP_DBG(fip, "re-sending FLOGI - reselect\n");
|
||||
fcf = fcoe_ctlr_select(fip);
|
||||
if (!fcf || fcf->flogi_sent) {
|
||||
@@ -1719,7 +1722,7 @@ static int fcoe_ctlr_flogi_retry(struct fcoe_ctlr *fip)
|
||||
fcoe_ctlr_solicit(fip, NULL);
|
||||
error = fcoe_ctlr_flogi_send_locked(fip);
|
||||
}
|
||||
spin_unlock_bh(&fip->ctlr_lock);
|
||||
spin_unlock_irqrestore(&fip->ctlr_lock, flags);
|
||||
mutex_unlock(&fip->ctlr_mutex);
|
||||
return error;
|
||||
}
|
||||
@@ -1736,8 +1739,9 @@ static int fcoe_ctlr_flogi_retry(struct fcoe_ctlr *fip)
|
||||
static void fcoe_ctlr_flogi_send(struct fcoe_ctlr *fip)
|
||||
{
|
||||
struct fcoe_fcf *fcf;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_bh(&fip->ctlr_lock);
|
||||
spin_lock_irqsave(&fip->ctlr_lock, flags);
|
||||
fcf = fip->sel_fcf;
|
||||
if (!fcf || !fip->flogi_req_send)
|
||||
goto unlock;
|
||||
@@ -1764,7 +1768,7 @@ static void fcoe_ctlr_flogi_send(struct fcoe_ctlr *fip)
|
||||
} else /* XXX */
|
||||
LIBFCOE_FIP_DBG(fip, "No FCF selected - defer send\n");
|
||||
unlock:
|
||||
spin_unlock_bh(&fip->ctlr_lock);
|
||||
spin_unlock_irqrestore(&fip->ctlr_lock, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -50,11 +50,6 @@ static irqreturn_t gvp11_intr(int irq, void *data)
|
||||
|
||||
static int gvp11_xfer_mask = 0;
|
||||
|
||||
void gvp11_setup(char *str, int *ints)
|
||||
{
|
||||
gvp11_xfer_mask = ints[1];
|
||||
}
|
||||
|
||||
static int dma_setup(struct scsi_cmnd *cmd, int dir_in)
|
||||
{
|
||||
struct scsi_pointer *scsi_pointer = WD33C93_scsi_pointer(cmd);
|
||||
|
||||
@@ -1018,10 +1018,8 @@ static void hisi_sas_phy_init(struct hisi_hba *hisi_hba, int phy_no)
|
||||
phy->minimum_linkrate = SAS_LINK_RATE_1_5_GBPS;
|
||||
phy->maximum_linkrate = hisi_hba->hw->phy_get_max_linkrate();
|
||||
sas_phy->enabled = (phy_no < hisi_hba->n_phy) ? 1 : 0;
|
||||
sas_phy->class = SAS;
|
||||
sas_phy->iproto = SAS_PROTOCOL_ALL;
|
||||
sas_phy->tproto = 0;
|
||||
sas_phy->type = PHY_TYPE_PHYSICAL;
|
||||
sas_phy->role = PHY_ROLE_INITIATOR;
|
||||
sas_phy->oob_mode = OOB_NOT_CONNECTED;
|
||||
sas_phy->linkrate = SAS_LINK_RATE_UNKNOWN;
|
||||
@@ -1065,23 +1063,18 @@ EXPORT_SYMBOL_GPL(hisi_sas_phy_enable);
|
||||
|
||||
static void hisi_sas_port_notify_formed(struct asd_sas_phy *sas_phy)
|
||||
{
|
||||
struct sas_ha_struct *sas_ha = sas_phy->ha;
|
||||
struct hisi_hba *hisi_hba = sas_ha->lldd_ha;
|
||||
struct hisi_sas_phy *phy = sas_phy->lldd_phy;
|
||||
struct asd_sas_port *sas_port = sas_phy->port;
|
||||
struct hisi_sas_port *port;
|
||||
unsigned long flags;
|
||||
|
||||
if (!sas_port)
|
||||
return;
|
||||
|
||||
port = to_hisi_sas_port(sas_port);
|
||||
spin_lock_irqsave(&hisi_hba->lock, flags);
|
||||
port->port_attached = 1;
|
||||
port->id = phy->port_id;
|
||||
phy->port = port;
|
||||
sas_port->lldd_port = port;
|
||||
spin_unlock_irqrestore(&hisi_hba->lock, flags);
|
||||
}
|
||||
|
||||
static void hisi_sas_do_release_task(struct hisi_hba *hisi_hba, struct sas_task *task,
|
||||
@@ -2519,10 +2512,9 @@ int hisi_sas_probe(struct platform_device *pdev,
|
||||
|
||||
sha->sas_ha_name = DRV_NAME;
|
||||
sha->dev = hisi_hba->dev;
|
||||
sha->lldd_module = THIS_MODULE;
|
||||
sha->sas_addr = &hisi_hba->sas_addr[0];
|
||||
sha->num_phys = hisi_hba->n_phy;
|
||||
sha->core.shost = hisi_hba->shost;
|
||||
sha->shost = hisi_hba->shost;
|
||||
|
||||
for (i = 0; i < hisi_hba->n_phy; i++) {
|
||||
sha->sas_phy[i] = &hisi_hba->phy[i].sas_phy;
|
||||
@@ -2564,12 +2556,12 @@ void hisi_sas_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct sas_ha_struct *sha = platform_get_drvdata(pdev);
|
||||
struct hisi_hba *hisi_hba = sha->lldd_ha;
|
||||
struct Scsi_Host *shost = sha->core.shost;
|
||||
struct Scsi_Host *shost = sha->shost;
|
||||
|
||||
del_timer_sync(&hisi_hba->timer);
|
||||
|
||||
sas_unregister_ha(sha);
|
||||
sas_remove_host(sha->core.shost);
|
||||
sas_remove_host(shost);
|
||||
|
||||
hisi_sas_free(hisi_hba);
|
||||
scsi_host_put(shost);
|
||||
|
||||
@@ -960,7 +960,7 @@ static void prep_ssp_v1_hw(struct hisi_hba *hisi_hba,
|
||||
struct scsi_cmnd *scsi_cmnd = ssp_task->cmd;
|
||||
struct sas_tmf_task *tmf = slot->tmf;
|
||||
int has_data = 0, priority = !!tmf;
|
||||
u8 *buf_cmd, fburst = 0;
|
||||
u8 *buf_cmd;
|
||||
u32 dw1, dw2;
|
||||
|
||||
/* create header */
|
||||
@@ -1018,16 +1018,11 @@ static void prep_ssp_v1_hw(struct hisi_hba *hisi_hba,
|
||||
|
||||
buf_cmd = hisi_sas_cmd_hdr_addr_mem(slot) +
|
||||
sizeof(struct ssp_frame_hdr);
|
||||
if (task->ssp_task.enable_first_burst) {
|
||||
fburst = (1 << 7);
|
||||
dw2 |= 1 << CMD_HDR_FIRST_BURST_OFF;
|
||||
}
|
||||
hdr->dw2 = cpu_to_le32(dw2);
|
||||
|
||||
memcpy(buf_cmd, &task->ssp_task.LUN, 8);
|
||||
if (!tmf) {
|
||||
buf_cmd[9] = fburst | task->ssp_task.task_attr |
|
||||
(task->ssp_task.task_prio << 3);
|
||||
buf_cmd[9] = task->ssp_task.task_attr;
|
||||
memcpy(buf_cmd + 12, task->ssp_task.cmd->cmnd,
|
||||
task->ssp_task.cmd->cmd_len);
|
||||
} else {
|
||||
|
||||
@@ -1798,8 +1798,7 @@ static void prep_ssp_v2_hw(struct hisi_hba *hisi_hba,
|
||||
|
||||
memcpy(buf_cmd, &task->ssp_task.LUN, 8);
|
||||
if (!tmf) {
|
||||
buf_cmd[9] = task->ssp_task.task_attr |
|
||||
(task->ssp_task.task_prio << 3);
|
||||
buf_cmd[9] = task->ssp_task.task_attr;
|
||||
memcpy(buf_cmd + 12, task->ssp_task.cmd->cmnd,
|
||||
task->ssp_task.cmd->cmd_len);
|
||||
} else {
|
||||
@@ -2026,6 +2025,11 @@ static void slot_err_v2_hw(struct hisi_hba *hisi_hba,
|
||||
u16 dma_tx_err_type = le16_to_cpu(err_record->dma_tx_err_type);
|
||||
u16 sipc_rx_err_type = le16_to_cpu(err_record->sipc_rx_err_type);
|
||||
u32 dma_rx_err_type = le32_to_cpu(err_record->dma_rx_err_type);
|
||||
struct hisi_sas_complete_v2_hdr *complete_queue =
|
||||
hisi_hba->complete_hdr[slot->cmplt_queue];
|
||||
struct hisi_sas_complete_v2_hdr *complete_hdr =
|
||||
&complete_queue[slot->cmplt_queue_slot];
|
||||
u32 dw0 = le32_to_cpu(complete_hdr->dw0);
|
||||
int error = -1;
|
||||
|
||||
if (err_phase == 1) {
|
||||
@@ -2310,7 +2314,8 @@ static void slot_err_v2_hw(struct hisi_hba *hisi_hba,
|
||||
break;
|
||||
}
|
||||
}
|
||||
hisi_sas_sata_done(task, slot);
|
||||
if (dw0 & CMPLT_HDR_RSPNS_XFRD_MSK)
|
||||
hisi_sas_sata_done(task, slot);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -2443,7 +2448,8 @@ static void slot_complete_v2_hw(struct hisi_hba *hisi_hba,
|
||||
case SAS_PROTOCOL_SATA | SAS_PROTOCOL_STP:
|
||||
{
|
||||
ts->stat = SAS_SAM_STAT_GOOD;
|
||||
hisi_sas_sata_done(task, slot);
|
||||
if (dw0 & CMPLT_HDR_RSPNS_XFRD_MSK)
|
||||
hisi_sas_sata_done(task, slot);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@@ -1326,7 +1326,7 @@ static void prep_ssp_v3_hw(struct hisi_hba *hisi_hba,
|
||||
|
||||
memcpy(buf_cmd, &task->ssp_task.LUN, 8);
|
||||
if (!tmf) {
|
||||
buf_cmd[9] = ssp_task->task_attr | (ssp_task->task_prio << 3);
|
||||
buf_cmd[9] = ssp_task->task_attr;
|
||||
memcpy(buf_cmd + 12, scsi_cmnd->cmnd, scsi_cmnd->cmd_len);
|
||||
} else {
|
||||
buf_cmd[10] = tmf->tmf;
|
||||
@@ -2257,7 +2257,8 @@ slot_err_v3_hw(struct hisi_hba *hisi_hba, struct sas_task *task,
|
||||
ts->stat = SAS_OPEN_REJECT;
|
||||
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
|
||||
}
|
||||
hisi_sas_sata_done(task, slot);
|
||||
if (dw0 & CMPLT_HDR_RSPNS_XFRD_MSK)
|
||||
hisi_sas_sata_done(task, slot);
|
||||
break;
|
||||
case SAS_PROTOCOL_SMP:
|
||||
ts->stat = SAS_SAM_STAT_CHECK_CONDITION;
|
||||
@@ -2384,7 +2385,8 @@ static void slot_complete_v3_hw(struct hisi_hba *hisi_hba,
|
||||
case SAS_PROTOCOL_STP:
|
||||
case SAS_PROTOCOL_SATA | SAS_PROTOCOL_STP:
|
||||
ts->stat = SAS_SAM_STAT_GOOD;
|
||||
hisi_sas_sata_done(task, slot);
|
||||
if (dw0 & CMPLT_HDR_RSPNS_XFRD_MSK)
|
||||
hisi_sas_sata_done(task, slot);
|
||||
break;
|
||||
default:
|
||||
ts->stat = SAS_SAM_STAT_CHECK_CONDITION;
|
||||
@@ -3104,21 +3106,25 @@ static const struct hisi_sas_debugfs_reg debugfs_ras_reg = {
|
||||
|
||||
static void debugfs_snapshot_prepare_v3_hw(struct hisi_hba *hisi_hba)
|
||||
{
|
||||
set_bit(HISI_SAS_REJECT_CMD_BIT, &hisi_hba->flags);
|
||||
|
||||
hisi_sas_write32(hisi_hba, DLVRY_QUEUE_ENABLE, 0);
|
||||
struct Scsi_Host *shost = hisi_hba->shost;
|
||||
|
||||
scsi_block_requests(shost);
|
||||
wait_cmds_complete_timeout_v3_hw(hisi_hba, 100, 5000);
|
||||
|
||||
set_bit(HISI_SAS_REJECT_CMD_BIT, &hisi_hba->flags);
|
||||
hisi_sas_sync_cqs(hisi_hba);
|
||||
hisi_sas_write32(hisi_hba, DLVRY_QUEUE_ENABLE, 0);
|
||||
}
|
||||
|
||||
static void debugfs_snapshot_restore_v3_hw(struct hisi_hba *hisi_hba)
|
||||
{
|
||||
struct Scsi_Host *shost = hisi_hba->shost;
|
||||
|
||||
hisi_sas_write32(hisi_hba, DLVRY_QUEUE_ENABLE,
|
||||
(u32)((1ULL << hisi_hba->queue_count) - 1));
|
||||
|
||||
clear_bit(HISI_SAS_REJECT_CMD_BIT, &hisi_hba->flags);
|
||||
scsi_unblock_requests(shost);
|
||||
}
|
||||
|
||||
static void read_iost_itct_cache_v3_hw(struct hisi_hba *hisi_hba,
|
||||
@@ -4576,7 +4582,7 @@ static int debugfs_fifo_data_v3_hw_show(struct seq_file *s, void *p)
|
||||
debugfs_read_fifo_data_v3_hw(phy);
|
||||
|
||||
debugfs_show_row_32_v3_hw(s, 0, HISI_SAS_FIFO_DATA_DW_SIZE * 4,
|
||||
phy->fifo.rd_data);
|
||||
(__le32 *)phy->fifo.rd_data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -4950,7 +4956,7 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
|
||||
sha->sas_phy = arr_phy;
|
||||
sha->sas_port = arr_port;
|
||||
sha->core.shost = shost;
|
||||
sha->shost = shost;
|
||||
sha->lldd_ha = hisi_hba;
|
||||
|
||||
shost->transportt = hisi_sas_stt;
|
||||
@@ -4967,7 +4973,6 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
|
||||
sha->sas_ha_name = DRV_NAME;
|
||||
sha->dev = dev;
|
||||
sha->lldd_module = THIS_MODULE;
|
||||
sha->sas_addr = &hisi_hba->sas_addr[0];
|
||||
sha->num_phys = hisi_hba->n_phy;
|
||||
|
||||
@@ -5055,14 +5060,14 @@ static void hisi_sas_v3_remove(struct pci_dev *pdev)
|
||||
struct device *dev = &pdev->dev;
|
||||
struct sas_ha_struct *sha = dev_get_drvdata(dev);
|
||||
struct hisi_hba *hisi_hba = sha->lldd_ha;
|
||||
struct Scsi_Host *shost = sha->core.shost;
|
||||
struct Scsi_Host *shost = sha->shost;
|
||||
|
||||
pm_runtime_get_noresume(dev);
|
||||
del_timer_sync(&hisi_hba->timer);
|
||||
|
||||
sas_unregister_ha(sha);
|
||||
flush_workqueue(hisi_hba->wq);
|
||||
sas_remove_host(sha->core.shost);
|
||||
sas_remove_host(shost);
|
||||
|
||||
hisi_sas_v3_destroy_irqs(pdev, hisi_hba);
|
||||
hisi_sas_free(hisi_hba);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user