You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag '4.4-scsi-mkp' into misc
SCSI queue for 4.4. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
* Qualcomm Technologies Inc Universal Flash Storage (UFS) PHY
|
||||
|
||||
UFSPHY nodes are defined to describe on-chip UFS PHY hardware macro.
|
||||
Each UFS PHY node should have its own node.
|
||||
|
||||
To bind UFS PHY with UFS host controller, the controller node should
|
||||
contain a phandle reference to UFS PHY node.
|
||||
|
||||
Required properties:
|
||||
- compatible : compatible list, contains "qcom,ufs-phy-qmp-20nm"
|
||||
or "qcom,ufs-phy-qmp-14nm" according to the relevant phy in use.
|
||||
- reg : should contain PHY register address space (mandatory),
|
||||
- reg-names : indicates various resources passed to driver (via reg proptery) by name.
|
||||
Required "reg-names" is "phy_mem".
|
||||
- #phy-cells : This property shall be set to 0
|
||||
- vdda-phy-supply : phandle to main PHY supply for analog domain
|
||||
- vdda-pll-supply : phandle to PHY PLL and Power-Gen block power supply
|
||||
- clocks : List of phandle and clock specifier pairs
|
||||
- clock-names : List of clock input name strings sorted in the same
|
||||
order as the clocks property. "ref_clk_src", "ref_clk",
|
||||
"tx_iface_clk" & "rx_iface_clk" are mandatory but
|
||||
"ref_clk_parent" is optional
|
||||
|
||||
Optional properties:
|
||||
- vdda-phy-max-microamp : specifies max. load that can be drawn from phy supply
|
||||
- vdda-pll-max-microamp : specifies max. load that can be drawn from pll supply
|
||||
- vddp-ref-clk-supply : phandle to UFS device ref_clk pad power supply
|
||||
- vddp-ref-clk-max-microamp : specifies max. load that can be drawn from this supply
|
||||
- vddp-ref-clk-always-on : specifies if this supply needs to be kept always on
|
||||
|
||||
Example:
|
||||
|
||||
ufsphy1: ufsphy@0xfc597000 {
|
||||
compatible = "qcom,ufs-phy-qmp-20nm";
|
||||
reg = <0xfc597000 0x800>;
|
||||
reg-names = "phy_mem";
|
||||
#phy-cells = <0>;
|
||||
vdda-phy-supply = <&pma8084_l4>;
|
||||
vdda-pll-supply = <&pma8084_l12>;
|
||||
vdda-phy-max-microamp = <50000>;
|
||||
vdda-pll-max-microamp = <1000>;
|
||||
clock-names = "ref_clk_src",
|
||||
"ref_clk_parent",
|
||||
"ref_clk",
|
||||
"tx_iface_clk",
|
||||
"rx_iface_clk";
|
||||
clocks = <&clock_rpm clk_ln_bb_clk>,
|
||||
<&clock_gcc clk_pcie_1_phy_ldo >,
|
||||
<&clock_gcc clk_ufs_phy_ldo>,
|
||||
<&clock_gcc clk_gcc_ufs_tx_cfg_clk>,
|
||||
<&clock_gcc clk_gcc_ufs_rx_cfg_clk>;
|
||||
};
|
||||
|
||||
ufshc@0xfc598000 {
|
||||
...
|
||||
phys = <&ufsphy1>;
|
||||
phy-names = "ufsphy";
|
||||
};
|
||||
@@ -4,11 +4,18 @@ UFSHC nodes are defined to describe on-chip UFS host controllers.
|
||||
Each UFS controller instance should have its own node.
|
||||
|
||||
Required properties:
|
||||
- compatible : compatible list, contains "jedec,ufs-1.1"
|
||||
- compatible : must contain "jedec,ufs-1.1", may also list one or more
|
||||
of the following:
|
||||
"qcom,msm8994-ufshc"
|
||||
"qcom,msm8996-ufshc"
|
||||
"qcom,ufshc"
|
||||
- interrupts : <interrupt mapping for UFS host controller IRQ>
|
||||
- reg : <registers mapping>
|
||||
|
||||
Optional properties:
|
||||
- phys : phandle to UFS PHY node
|
||||
- phy-names : the string "ufsphy" when is found in a node, along
|
||||
with "phys" attribute, provides phandle to UFS PHY node
|
||||
- vdd-hba-supply : phandle to UFS host controller supply regulator node
|
||||
- vcc-supply : phandle to VCC supply regulator node
|
||||
- vccq-supply : phandle to VCCQ supply regulator node
|
||||
@@ -54,4 +61,6 @@ Example:
|
||||
clocks = <&core 0>, <&ref 0>, <&iface 0>;
|
||||
clock-names = "core_clk", "ref_clk", "iface_clk";
|
||||
freq-table-hz = <100000000 200000000>, <0 0>, <0 0>;
|
||||
phys = <&ufsphy1>;
|
||||
phy-names = "ufsphy";
|
||||
};
|
||||
|
||||
@@ -1038,6 +1038,10 @@ kbuf_alloc_2_sgl(int bytes, u32 sgdir, int sge_offset, int *frags,
|
||||
int i, buflist_ent;
|
||||
int sg_spill = MAX_FRAGS_SPILL1;
|
||||
int dir;
|
||||
|
||||
if (bytes < 0)
|
||||
return NULL;
|
||||
|
||||
/* initialization */
|
||||
*frags = 0;
|
||||
*blp = NULL;
|
||||
|
||||
@@ -432,6 +432,7 @@ out_disable_src:
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ufs_qcom_phy_enable_ref_clk);
|
||||
|
||||
static
|
||||
int ufs_qcom_phy_disable_vreg(struct phy *phy,
|
||||
@@ -474,6 +475,7 @@ void ufs_qcom_phy_disable_ref_clk(struct phy *generic_phy)
|
||||
phy->is_ref_clk_enabled = false;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ufs_qcom_phy_disable_ref_clk);
|
||||
|
||||
#define UFS_REF_CLK_EN (1 << 5)
|
||||
|
||||
@@ -517,11 +519,13 @@ void ufs_qcom_phy_enable_dev_ref_clk(struct phy *generic_phy)
|
||||
{
|
||||
ufs_qcom_phy_dev_ref_clk_ctrl(generic_phy, true);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ufs_qcom_phy_enable_dev_ref_clk);
|
||||
|
||||
void ufs_qcom_phy_disable_dev_ref_clk(struct phy *generic_phy)
|
||||
{
|
||||
ufs_qcom_phy_dev_ref_clk_ctrl(generic_phy, false);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ufs_qcom_phy_disable_dev_ref_clk);
|
||||
|
||||
/* Turn ON M-PHY RMMI interface clocks */
|
||||
int ufs_qcom_phy_enable_iface_clk(struct phy *generic_phy)
|
||||
@@ -550,6 +554,7 @@ int ufs_qcom_phy_enable_iface_clk(struct phy *generic_phy)
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ufs_qcom_phy_enable_iface_clk);
|
||||
|
||||
/* Turn OFF M-PHY RMMI interface clocks */
|
||||
void ufs_qcom_phy_disable_iface_clk(struct phy *generic_phy)
|
||||
@@ -562,6 +567,7 @@ void ufs_qcom_phy_disable_iface_clk(struct phy *generic_phy)
|
||||
phy->is_iface_clk_enabled = false;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ufs_qcom_phy_disable_iface_clk);
|
||||
|
||||
int ufs_qcom_phy_start_serdes(struct phy *generic_phy)
|
||||
{
|
||||
@@ -578,6 +584,7 @@ int ufs_qcom_phy_start_serdes(struct phy *generic_phy)
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ufs_qcom_phy_start_serdes);
|
||||
|
||||
int ufs_qcom_phy_set_tx_lane_enable(struct phy *generic_phy, u32 tx_lanes)
|
||||
{
|
||||
@@ -595,6 +602,7 @@ int ufs_qcom_phy_set_tx_lane_enable(struct phy *generic_phy, u32 tx_lanes)
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ufs_qcom_phy_set_tx_lane_enable);
|
||||
|
||||
void ufs_qcom_phy_save_controller_version(struct phy *generic_phy,
|
||||
u8 major, u16 minor, u16 step)
|
||||
@@ -605,6 +613,7 @@ void ufs_qcom_phy_save_controller_version(struct phy *generic_phy,
|
||||
ufs_qcom_phy->host_ctrl_rev_minor = minor;
|
||||
ufs_qcom_phy->host_ctrl_rev_step = step;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ufs_qcom_phy_save_controller_version);
|
||||
|
||||
int ufs_qcom_phy_calibrate_phy(struct phy *generic_phy, bool is_rate_B)
|
||||
{
|
||||
@@ -625,6 +634,7 @@ int ufs_qcom_phy_calibrate_phy(struct phy *generic_phy, bool is_rate_B)
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ufs_qcom_phy_calibrate_phy);
|
||||
|
||||
int ufs_qcom_phy_remove(struct phy *generic_phy,
|
||||
struct ufs_qcom_phy *ufs_qcom_phy)
|
||||
@@ -662,6 +672,7 @@ int ufs_qcom_phy_is_pcs_ready(struct phy *generic_phy)
|
||||
return ufs_qcom_phy->phy_spec_ops->
|
||||
is_physical_coding_sublayer_ready(ufs_qcom_phy);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ufs_qcom_phy_is_pcs_ready);
|
||||
|
||||
int ufs_qcom_phy_power_on(struct phy *generic_phy)
|
||||
{
|
||||
|
||||
@@ -541,7 +541,6 @@ config SCSI_ARCMSR
|
||||
|
||||
source "drivers/scsi/esas2r/Kconfig"
|
||||
source "drivers/scsi/megaraid/Kconfig.megaraid"
|
||||
source "drivers/scsi/mpt2sas/Kconfig"
|
||||
source "drivers/scsi/mpt3sas/Kconfig"
|
||||
source "drivers/scsi/ufs/Kconfig"
|
||||
|
||||
|
||||
@@ -106,7 +106,6 @@ obj-$(CONFIG_CXLFLASH) += cxlflash/
|
||||
obj-$(CONFIG_MEGARAID_LEGACY) += megaraid.o
|
||||
obj-$(CONFIG_MEGARAID_NEWGEN) += megaraid/
|
||||
obj-$(CONFIG_MEGARAID_SAS) += megaraid/
|
||||
obj-$(CONFIG_SCSI_MPT2SAS) += mpt2sas/
|
||||
obj-$(CONFIG_SCSI_MPT3SAS) += mpt3sas/
|
||||
obj-$(CONFIG_SCSI_UFSHCD) += ufs/
|
||||
obj-$(CONFIG_SCSI_ACARD) += atp870u.o
|
||||
|
||||
@@ -703,10 +703,10 @@ static int asd_unregister_sas_ha(struct asd_ha_struct *asd_ha)
|
||||
{
|
||||
int err;
|
||||
|
||||
scsi_remove_host(asd_ha->sas_ha.core.shost);
|
||||
err = sas_unregister_ha(&asd_ha->sas_ha);
|
||||
|
||||
sas_remove_host(asd_ha->sas_ha.core.shost);
|
||||
scsi_remove_host(asd_ha->sas_ha.core.shost);
|
||||
scsi_host_put(asd_ha->sas_ha.core.shost);
|
||||
|
||||
kfree(asd_ha->sas_ha.sas_phy);
|
||||
|
||||
@@ -3186,7 +3186,7 @@ be_sgl_create_contiguous(void *virtual_address,
|
||||
{
|
||||
WARN_ON(!virtual_address);
|
||||
WARN_ON(!physical_address);
|
||||
WARN_ON(!length > 0);
|
||||
WARN_ON(!length);
|
||||
WARN_ON(!sgl);
|
||||
|
||||
sgl->va = virtual_address;
|
||||
|
||||
+1077
-259
File diff suppressed because it is too large
Load Diff
+41
-6
@@ -33,12 +33,38 @@ struct access_method {
|
||||
unsigned long (*command_completed)(struct ctlr_info *h, u8 q);
|
||||
};
|
||||
|
||||
/* for SAS hosts and SAS expanders */
|
||||
struct hpsa_sas_node {
|
||||
struct device *parent_dev;
|
||||
struct list_head port_list_head;
|
||||
};
|
||||
|
||||
struct hpsa_sas_port {
|
||||
struct list_head port_list_entry;
|
||||
u64 sas_address;
|
||||
struct sas_port *port;
|
||||
int next_phy_index;
|
||||
struct list_head phy_list_head;
|
||||
struct hpsa_sas_node *parent_node;
|
||||
struct sas_rphy *rphy;
|
||||
};
|
||||
|
||||
struct hpsa_sas_phy {
|
||||
struct list_head phy_list_entry;
|
||||
struct sas_phy *phy;
|
||||
struct hpsa_sas_port *parent_port;
|
||||
bool added_to_port;
|
||||
};
|
||||
|
||||
struct hpsa_scsi_dev_t {
|
||||
int devtype;
|
||||
unsigned int devtype;
|
||||
int bus, target, lun; /* as presented to the OS */
|
||||
unsigned char scsi3addr[8]; /* as presented to the HW */
|
||||
u8 physical_device : 1;
|
||||
u8 expose_device;
|
||||
#define RAID_CTLR_LUNID "\0\0\0\0\0\0\0\0"
|
||||
unsigned char device_id[16]; /* from inquiry pg. 0x83 */
|
||||
u64 sas_address;
|
||||
unsigned char vendor[8]; /* bytes 8-15 of inquiry data */
|
||||
unsigned char model[16]; /* bytes 16-31 of inquiry data */
|
||||
unsigned char raid_level; /* from inquiry page 0xC1 */
|
||||
@@ -75,11 +101,8 @@ struct hpsa_scsi_dev_t {
|
||||
struct hpsa_scsi_dev_t *phys_disk[RAID_MAP_MAX_ENTRIES];
|
||||
int nphysical_disks;
|
||||
int supports_aborts;
|
||||
#define HPSA_DO_NOT_EXPOSE 0x0
|
||||
#define HPSA_SG_ATTACH 0x1
|
||||
#define HPSA_ULD_ATTACH 0x2
|
||||
#define HPSA_SCSI_ADD (HPSA_SG_ATTACH | HPSA_ULD_ATTACH)
|
||||
u8 expose_state;
|
||||
struct hpsa_sas_port *sas_port;
|
||||
int external; /* 1-from external array 0-not <0-unknown */
|
||||
};
|
||||
|
||||
struct reply_queue_buffer {
|
||||
@@ -136,6 +159,7 @@ struct ctlr_info {
|
||||
char *product_name;
|
||||
struct pci_dev *pdev;
|
||||
u32 board_id;
|
||||
u64 sas_address;
|
||||
void __iomem *vaddr;
|
||||
unsigned long paddr;
|
||||
int nr_cmds; /* Number of commands allowed on this controller */
|
||||
@@ -262,7 +286,10 @@ struct ctlr_info {
|
||||
spinlock_t offline_device_lock;
|
||||
struct list_head offline_device_list;
|
||||
int acciopath_status;
|
||||
int drv_req_rescan;
|
||||
int raid_offload_debug;
|
||||
int discovery_polling;
|
||||
struct ReportLUNdata *lastlogicals;
|
||||
int needs_abort_tags_swizzled;
|
||||
struct workqueue_struct *resubmit_wq;
|
||||
struct workqueue_struct *rescan_ctlr_wq;
|
||||
@@ -270,6 +297,8 @@ struct ctlr_info {
|
||||
wait_queue_head_t abort_cmd_wait_queue;
|
||||
wait_queue_head_t event_sync_wait_queue;
|
||||
struct mutex reset_mutex;
|
||||
u8 reset_in_progress;
|
||||
struct hpsa_sas_node *sas_host;
|
||||
};
|
||||
|
||||
struct offline_device_entry {
|
||||
@@ -283,6 +312,7 @@ struct offline_device_entry {
|
||||
#define HPSA_RESET_TYPE_BUS 0x01
|
||||
#define HPSA_RESET_TYPE_TARGET 0x03
|
||||
#define HPSA_RESET_TYPE_LUN 0x04
|
||||
#define HPSA_PHYS_TARGET_RESET 0x99 /* not defined by cciss spec */
|
||||
#define HPSA_MSG_SEND_RETRY_LIMIT 10
|
||||
#define HPSA_MSG_SEND_RETRY_INTERVAL_MSECS (10000)
|
||||
|
||||
@@ -367,6 +397,11 @@ struct offline_device_entry {
|
||||
#define IOACCEL2_INBOUND_POSTQ_64_LOW 0xd0
|
||||
#define IOACCEL2_INBOUND_POSTQ_64_HI 0xd4
|
||||
|
||||
#define HPSA_PHYSICAL_DEVICE_BUS 0
|
||||
#define HPSA_RAID_VOLUME_BUS 1
|
||||
#define HPSA_EXTERNAL_RAID_VOLUME_BUS 2
|
||||
#define HPSA_HBA_BUS 3
|
||||
|
||||
/*
|
||||
Send the command to the hardware
|
||||
*/
|
||||
|
||||
+28
-2
@@ -260,8 +260,6 @@ struct ext_report_lun_entry {
|
||||
u8 wwid[8];
|
||||
u8 device_type;
|
||||
u8 device_flags;
|
||||
#define NON_DISK_PHYS_DEV(x) ((x)[17] & 0x01)
|
||||
#define PHYS_IOACCEL(x) ((x)[17] & 0x08)
|
||||
u8 lun_count; /* multi-lun device, how many luns */
|
||||
u8 redundant_paths;
|
||||
u32 ioaccel_handle; /* ioaccel1 only uses lower 16 bits */
|
||||
@@ -288,6 +286,11 @@ struct SenseSubsystem_info {
|
||||
#define BMIC_FLASH_FIRMWARE 0xF7
|
||||
#define BMIC_SENSE_CONTROLLER_PARAMETERS 0x64
|
||||
#define BMIC_IDENTIFY_PHYSICAL_DEVICE 0x15
|
||||
#define BMIC_IDENTIFY_CONTROLLER 0x11
|
||||
#define BMIC_SET_DIAG_OPTIONS 0xF4
|
||||
#define BMIC_SENSE_DIAG_OPTIONS 0xF5
|
||||
#define HPSA_DIAG_OPTS_DISABLE_RLD_CACHING 0x40000000
|
||||
#define BMIC_SENSE_SUBSYSTEM_INFORMATION 0x66
|
||||
|
||||
/* Command List Structure */
|
||||
union SCSI3Addr {
|
||||
@@ -684,6 +687,16 @@ struct hpsa_pci_info {
|
||||
u32 board_id;
|
||||
};
|
||||
|
||||
struct bmic_identify_controller {
|
||||
u8 configured_logical_drive_count; /* offset 0 */
|
||||
u8 pad1[153];
|
||||
__le16 extended_logical_unit_count; /* offset 154 */
|
||||
u8 pad2[136];
|
||||
u8 controller_mode; /* offset 292 */
|
||||
u8 pad3[32];
|
||||
};
|
||||
|
||||
|
||||
struct bmic_identify_physical_device {
|
||||
u8 scsi_bus; /* SCSI Bus number on controller */
|
||||
u8 scsi_id; /* SCSI ID on this bus */
|
||||
@@ -816,5 +829,18 @@ struct bmic_identify_physical_device {
|
||||
u8 padding[112];
|
||||
};
|
||||
|
||||
struct bmic_sense_subsystem_info {
|
||||
u8 primary_slot_number;
|
||||
u8 reserved[3];
|
||||
u8 chasis_serial_number[32];
|
||||
u8 primary_world_wide_id[8];
|
||||
u8 primary_array_serial_number[32]; /* NULL terminated */
|
||||
u8 primary_cache_serial_number[32]; /* NULL terminated */
|
||||
u8 reserved_2[8];
|
||||
u8 secondary_array_serial_number[32];
|
||||
u8 secondary_cache_serial_number[32];
|
||||
u8 pad[332];
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
#endif /* HPSA_CMD_H */
|
||||
|
||||
@@ -106,9 +106,9 @@ MODULE_LICENSE("GPL");
|
||||
MODULE_VERSION(IBMVSCSI_VERSION);
|
||||
|
||||
module_param_named(max_id, max_id, int, S_IRUGO | S_IWUSR);
|
||||
MODULE_PARM_DESC(max_id, "Largest ID value for each channel");
|
||||
MODULE_PARM_DESC(max_id, "Largest ID value for each channel [Default=64]");
|
||||
module_param_named(max_channel, max_channel, int, S_IRUGO | S_IWUSR);
|
||||
MODULE_PARM_DESC(max_channel, "Largest channel value");
|
||||
MODULE_PARM_DESC(max_channel, "Largest channel value [Default=3]");
|
||||
module_param_named(init_timeout, init_timeout, int, S_IRUGO | S_IWUSR);
|
||||
MODULE_PARM_DESC(init_timeout, "Initialization timeout in seconds");
|
||||
module_param_named(max_requests, max_requests, int, S_IRUGO);
|
||||
@@ -2289,11 +2289,15 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id)
|
||||
goto init_pool_failed;
|
||||
}
|
||||
|
||||
host->max_lun = 8;
|
||||
host->max_lun = IBMVSCSI_MAX_LUN;
|
||||
host->max_id = max_id;
|
||||
host->max_channel = max_channel;
|
||||
host->max_cmd_len = 16;
|
||||
|
||||
dev_info(dev,
|
||||
"Maximum ID: %d Maximum LUN: %llu Maximum Channel: %d\n",
|
||||
host->max_id, host->max_lun, host->max_channel);
|
||||
|
||||
if (scsi_add_host(hostdata->host, hostdata->dev))
|
||||
goto add_host_failed;
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ struct Scsi_Host;
|
||||
#define IBMVSCSI_CMDS_PER_LUN_DEFAULT 16
|
||||
#define IBMVSCSI_MAX_SECTORS_DEFAULT 256 /* 32 * 8 = default max I/O 32 pages */
|
||||
#define IBMVSCSI_MAX_CMDS_PER_LUN 64
|
||||
#define IBMVSCSI_MAX_LUN 32
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
* Data Structures
|
||||
|
||||
+137
-16
@@ -6363,15 +6363,19 @@ static int ipr_queuecommand(struct Scsi_Host *shost,
|
||||
ipr_cmd->scsi_cmd = scsi_cmd;
|
||||
ipr_cmd->done = ipr_scsi_eh_done;
|
||||
|
||||
if (ipr_is_gscsi(res) || ipr_is_vset_device(res)) {
|
||||
if (ipr_is_gscsi(res)) {
|
||||
if (scsi_cmd->underflow == 0)
|
||||
ioarcb->cmd_pkt.flags_hi |= IPR_FLAGS_HI_NO_ULEN_CHK;
|
||||
|
||||
ioarcb->cmd_pkt.flags_hi |= IPR_FLAGS_HI_NO_LINK_DESC;
|
||||
if (ipr_is_gscsi(res) && res->reset_occurred) {
|
||||
if (res->reset_occurred) {
|
||||
res->reset_occurred = 0;
|
||||
ioarcb->cmd_pkt.flags_lo |= IPR_FLAGS_LO_DELAY_AFTER_RST;
|
||||
}
|
||||
}
|
||||
|
||||
if (ipr_is_gscsi(res) || ipr_is_vset_device(res)) {
|
||||
ioarcb->cmd_pkt.flags_hi |= IPR_FLAGS_HI_NO_LINK_DESC;
|
||||
|
||||
ioarcb->cmd_pkt.flags_lo |= IPR_FLAGS_LO_ALIGNED_BFR;
|
||||
if (scsi_cmd->flags & SCMD_TAGGED)
|
||||
ioarcb->cmd_pkt.flags_lo |= IPR_FLAGS_LO_SIMPLE_TASK;
|
||||
@@ -7670,6 +7674,63 @@ static int ipr_ioafp_query_ioa_cfg(struct ipr_cmnd *ipr_cmd)
|
||||
return IPR_RC_JOB_RETURN;
|
||||
}
|
||||
|
||||
static int ipr_ioa_service_action_failed(struct ipr_cmnd *ipr_cmd)
|
||||
{
|
||||
u32 ioasc = be32_to_cpu(ipr_cmd->s.ioasa.hdr.ioasc);
|
||||
|
||||
if (ioasc == IPR_IOASC_IR_INVALID_REQ_TYPE_OR_PKT)
|
||||
return IPR_RC_JOB_CONTINUE;
|
||||
|
||||
return ipr_reset_cmd_failed(ipr_cmd);
|
||||
}
|
||||
|
||||
static void ipr_build_ioa_service_action(struct ipr_cmnd *ipr_cmd,
|
||||
__be32 res_handle, u8 sa_code)
|
||||
{
|
||||
struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
|
||||
|
||||
ioarcb->res_handle = res_handle;
|
||||
ioarcb->cmd_pkt.cdb[0] = IPR_IOA_SERVICE_ACTION;
|
||||
ioarcb->cmd_pkt.cdb[1] = sa_code;
|
||||
ioarcb->cmd_pkt.request_type = IPR_RQTYPE_IOACMD;
|
||||
}
|
||||
|
||||
/**
|
||||
* ipr_ioafp_set_caching_parameters - Issue Set Cache parameters service
|
||||
* action
|
||||
*
|
||||
* Return value:
|
||||
* none
|
||||
**/
|
||||
static int ipr_ioafp_set_caching_parameters(struct ipr_cmnd *ipr_cmd)
|
||||
{
|
||||
struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb;
|
||||
struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
|
||||
struct ipr_inquiry_pageC4 *pageC4 = &ioa_cfg->vpd_cbs->pageC4_data;
|
||||
|
||||
ENTER;
|
||||
|
||||
ipr_cmd->job_step = ipr_ioafp_query_ioa_cfg;
|
||||
|
||||
if (pageC4->cache_cap[0] & IPR_CAP_SYNC_CACHE) {
|
||||
ipr_build_ioa_service_action(ipr_cmd,
|
||||
cpu_to_be32(IPR_IOA_RES_HANDLE),
|
||||
IPR_IOA_SA_CHANGE_CACHE_PARAMS);
|
||||
|
||||
ioarcb->cmd_pkt.cdb[2] = 0x40;
|
||||
|
||||
ipr_cmd->job_step_failed = ipr_ioa_service_action_failed;
|
||||
ipr_do_req(ipr_cmd, ipr_reset_ioa_job, ipr_timeout,
|
||||
IPR_SET_SUP_DEVICE_TIMEOUT);
|
||||
|
||||
LEAVE;
|
||||
return IPR_RC_JOB_RETURN;
|
||||
}
|
||||
|
||||
LEAVE;
|
||||
return IPR_RC_JOB_CONTINUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* ipr_ioafp_inquiry - Send an Inquiry to the adapter.
|
||||
* @ipr_cmd: ipr command struct
|
||||
@@ -7720,6 +7781,39 @@ static int ipr_inquiry_page_supported(struct ipr_inquiry_page0 *page0, u8 page)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ipr_ioafp_pageC4_inquiry - Send a Page 0xC4 Inquiry to the adapter.
|
||||
* @ipr_cmd: ipr command struct
|
||||
*
|
||||
* This function sends a Page 0xC4 inquiry to the adapter
|
||||
* to retrieve software VPD information.
|
||||
*
|
||||
* Return value:
|
||||
* IPR_RC_JOB_CONTINUE / IPR_RC_JOB_RETURN
|
||||
**/
|
||||
static int ipr_ioafp_pageC4_inquiry(struct ipr_cmnd *ipr_cmd)
|
||||
{
|
||||
struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
|
||||
struct ipr_inquiry_page0 *page0 = &ioa_cfg->vpd_cbs->page0_data;
|
||||
struct ipr_inquiry_pageC4 *pageC4 = &ioa_cfg->vpd_cbs->pageC4_data;
|
||||
|
||||
ENTER;
|
||||
ipr_cmd->job_step = ipr_ioafp_set_caching_parameters;
|
||||
memset(pageC4, 0, sizeof(*pageC4));
|
||||
|
||||
if (ipr_inquiry_page_supported(page0, 0xC4)) {
|
||||
ipr_ioafp_inquiry(ipr_cmd, 1, 0xC4,
|
||||
(ioa_cfg->vpd_cbs_dma
|
||||
+ offsetof(struct ipr_misc_cbs,
|
||||
pageC4_data)),
|
||||
sizeof(struct ipr_inquiry_pageC4));
|
||||
return IPR_RC_JOB_RETURN;
|
||||
}
|
||||
|
||||
LEAVE;
|
||||
return IPR_RC_JOB_CONTINUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* ipr_ioafp_cap_inquiry - Send a Page 0xD0 Inquiry to the adapter.
|
||||
* @ipr_cmd: ipr command struct
|
||||
@@ -7737,7 +7831,7 @@ static int ipr_ioafp_cap_inquiry(struct ipr_cmnd *ipr_cmd)
|
||||
struct ipr_inquiry_cap *cap = &ioa_cfg->vpd_cbs->cap;
|
||||
|
||||
ENTER;
|
||||
ipr_cmd->job_step = ipr_ioafp_query_ioa_cfg;
|
||||
ipr_cmd->job_step = ipr_ioafp_pageC4_inquiry;
|
||||
memset(cap, 0, sizeof(*cap));
|
||||
|
||||
if (ipr_inquiry_page_supported(page0, 0xD0)) {
|
||||
@@ -8276,6 +8370,42 @@ static int ipr_reset_get_unit_check_job(struct ipr_cmnd *ipr_cmd)
|
||||
return IPR_RC_JOB_RETURN;
|
||||
}
|
||||
|
||||
static int ipr_dump_mailbox_wait(struct ipr_cmnd *ipr_cmd)
|
||||
{
|
||||
struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
|
||||
|
||||
ENTER;
|
||||
|
||||
if (ioa_cfg->sdt_state != GET_DUMP)
|
||||
return IPR_RC_JOB_RETURN;
|
||||
|
||||
if (!ioa_cfg->sis64 || !ipr_cmd->u.time_left ||
|
||||
(readl(ioa_cfg->regs.sense_interrupt_reg) &
|
||||
IPR_PCII_MAILBOX_STABLE)) {
|
||||
|
||||
if (!ipr_cmd->u.time_left)
|
||||
dev_err(&ioa_cfg->pdev->dev,
|
||||
"Timed out waiting for Mailbox register.\n");
|
||||
|
||||
ioa_cfg->sdt_state = READ_DUMP;
|
||||
ioa_cfg->dump_timeout = 0;
|
||||
if (ioa_cfg->sis64)
|
||||
ipr_reset_start_timer(ipr_cmd, IPR_SIS64_DUMP_TIMEOUT);
|
||||
else
|
||||
ipr_reset_start_timer(ipr_cmd, IPR_SIS32_DUMP_TIMEOUT);
|
||||
ipr_cmd->job_step = ipr_reset_wait_for_dump;
|
||||
schedule_work(&ioa_cfg->work_q);
|
||||
|
||||
} else {
|
||||
ipr_cmd->u.time_left -= IPR_CHECK_FOR_RESET_TIMEOUT;
|
||||
ipr_reset_start_timer(ipr_cmd,
|
||||
IPR_CHECK_FOR_RESET_TIMEOUT);
|
||||
}
|
||||
|
||||
LEAVE;
|
||||
return IPR_RC_JOB_RETURN;
|
||||
}
|
||||
|
||||
/**
|
||||
* ipr_reset_restore_cfg_space - Restore PCI config space.
|
||||
* @ipr_cmd: ipr command struct
|
||||
@@ -8325,20 +8455,11 @@ static int ipr_reset_restore_cfg_space(struct ipr_cmnd *ipr_cmd)
|
||||
|
||||
if (ioa_cfg->in_ioa_bringdown) {
|
||||
ipr_cmd->job_step = ipr_ioa_bringdown_done;
|
||||
} else if (ioa_cfg->sdt_state == GET_DUMP) {
|
||||
ipr_cmd->job_step = ipr_dump_mailbox_wait;
|
||||
ipr_cmd->u.time_left = IPR_WAIT_FOR_MAILBOX;
|
||||
} else {
|
||||
ipr_cmd->job_step = ipr_reset_enable_ioa;
|
||||
|
||||
if (GET_DUMP == ioa_cfg->sdt_state) {
|
||||
ioa_cfg->sdt_state = READ_DUMP;
|
||||
ioa_cfg->dump_timeout = 0;
|
||||
if (ioa_cfg->sis64)
|
||||
ipr_reset_start_timer(ipr_cmd, IPR_SIS64_DUMP_TIMEOUT);
|
||||
else
|
||||
ipr_reset_start_timer(ipr_cmd, IPR_SIS32_DUMP_TIMEOUT);
|
||||
ipr_cmd->job_step = ipr_reset_wait_for_dump;
|
||||
schedule_work(&ioa_cfg->work_q);
|
||||
return IPR_RC_JOB_RETURN;
|
||||
}
|
||||
}
|
||||
|
||||
LEAVE;
|
||||
|
||||
+20
-2
@@ -39,8 +39,8 @@
|
||||
/*
|
||||
* Literals
|
||||
*/
|
||||
#define IPR_DRIVER_VERSION "2.6.2"
|
||||
#define IPR_DRIVER_DATE "(June 11, 2015)"
|
||||
#define IPR_DRIVER_VERSION "2.6.3"
|
||||
#define IPR_DRIVER_DATE "(October 17, 2015)"
|
||||
|
||||
/*
|
||||
* IPR_MAX_CMD_PER_LUN: This defines the maximum number of outstanding
|
||||
@@ -216,6 +216,10 @@
|
||||
#define IPR_SET_ALL_SUPPORTED_DEVICES 0x80
|
||||
#define IPR_IOA_SHUTDOWN 0xF7
|
||||
#define IPR_WR_BUF_DOWNLOAD_AND_SAVE 0x05
|
||||
#define IPR_IOA_SERVICE_ACTION 0xD2
|
||||
|
||||
/* IOA Service Actions */
|
||||
#define IPR_IOA_SA_CHANGE_CACHE_PARAMS 0x14
|
||||
|
||||
/*
|
||||
* Timeouts
|
||||
@@ -279,6 +283,9 @@
|
||||
#define IPR_IPL_INIT_STAGE_TIME_MASK 0x0000ffff
|
||||
#define IPR_PCII_IPL_STAGE_CHANGE (0x80000000 >> 0)
|
||||
|
||||
#define IPR_PCII_MAILBOX_STABLE (0x80000000 >> 4)
|
||||
#define IPR_WAIT_FOR_MAILBOX (2 * HZ)
|
||||
|
||||
#define IPR_PCII_IOA_TRANS_TO_OPER (0x80000000 >> 0)
|
||||
#define IPR_PCII_IOARCB_XFER_FAILED (0x80000000 >> 3)
|
||||
#define IPR_PCII_IOA_UNIT_CHECKED (0x80000000 >> 4)
|
||||
@@ -846,6 +853,16 @@ struct ipr_inquiry_page0 {
|
||||
u8 page[IPR_INQUIRY_PAGE0_ENTRIES];
|
||||
}__attribute__((packed));
|
||||
|
||||
struct ipr_inquiry_pageC4 {
|
||||
u8 peri_qual_dev_type;
|
||||
u8 page_code;
|
||||
u8 reserved1;
|
||||
u8 len;
|
||||
u8 cache_cap[4];
|
||||
#define IPR_CAP_SYNC_CACHE 0x08
|
||||
u8 reserved2[20];
|
||||
} __packed;
|
||||
|
||||
struct ipr_hostrcb_device_data_entry {
|
||||
struct ipr_vpd vpd;
|
||||
struct ipr_res_addr dev_res_addr;
|
||||
@@ -1319,6 +1336,7 @@ struct ipr_misc_cbs {
|
||||
struct ipr_inquiry_page0 page0_data;
|
||||
struct ipr_inquiry_page3 page3_data;
|
||||
struct ipr_inquiry_cap cap;
|
||||
struct ipr_inquiry_pageC4 pageC4_data;
|
||||
struct ipr_mode_pages mode_pages;
|
||||
struct ipr_supported_device supp_dev;
|
||||
};
|
||||
|
||||
@@ -271,11 +271,11 @@ static void isci_unregister(struct isci_host *isci_host)
|
||||
if (!isci_host)
|
||||
return;
|
||||
|
||||
shost = to_shost(isci_host);
|
||||
scsi_remove_host(shost);
|
||||
sas_unregister_ha(&isci_host->sas_ha);
|
||||
|
||||
shost = to_shost(isci_host);
|
||||
sas_remove_host(shost);
|
||||
scsi_remove_host(shost);
|
||||
scsi_host_put(shost);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
/*
|
||||
* MegaRAID SAS Driver meta data
|
||||
*/
|
||||
#define MEGASAS_VERSION "06.807.10.00-rc1"
|
||||
#define MEGASAS_RELDATE "March 6, 2015"
|
||||
#define MEGASAS_VERSION "06.808.16.00-rc1"
|
||||
#define MEGASAS_RELDATE "Oct. 8, 2015"
|
||||
|
||||
/*
|
||||
* Device IDs
|
||||
@@ -52,6 +52,10 @@
|
||||
#define PCI_DEVICE_ID_LSI_PLASMA 0x002f
|
||||
#define PCI_DEVICE_ID_LSI_INVADER 0x005d
|
||||
#define PCI_DEVICE_ID_LSI_FURY 0x005f
|
||||
#define PCI_DEVICE_ID_LSI_INTRUDER 0x00ce
|
||||
#define PCI_DEVICE_ID_LSI_INTRUDER_24 0x00cf
|
||||
#define PCI_DEVICE_ID_LSI_CUTLASS_52 0x0052
|
||||
#define PCI_DEVICE_ID_LSI_CUTLASS_53 0x0053
|
||||
|
||||
/*
|
||||
* Intel HBA SSDIDs
|
||||
@@ -62,6 +66,14 @@
|
||||
#define MEGARAID_INTEL_RS3MC044_SSDID 0x9381
|
||||
#define MEGARAID_INTEL_RS3WC080_SSDID 0x9341
|
||||
#define MEGARAID_INTEL_RS3WC040_SSDID 0x9343
|
||||
#define MEGARAID_INTEL_RMS3BC160_SSDID 0x352B
|
||||
|
||||
/*
|
||||
* Intruder HBA SSDIDs
|
||||
*/
|
||||
#define MEGARAID_INTRUDER_SSDID1 0x9371
|
||||
#define MEGARAID_INTRUDER_SSDID2 0x9390
|
||||
#define MEGARAID_INTRUDER_SSDID3 0x9370
|
||||
|
||||
/*
|
||||
* Intel HBA branding
|
||||
@@ -78,6 +90,8 @@
|
||||
"Intel(R) RAID Controller RS3WC080"
|
||||
#define MEGARAID_INTEL_RS3WC040_BRANDING \
|
||||
"Intel(R) RAID Controller RS3WC040"
|
||||
#define MEGARAID_INTEL_RMS3BC160_BRANDING \
|
||||
"Intel(R) Integrated RAID Module RMS3BC160"
|
||||
|
||||
/*
|
||||
* =====================================
|
||||
@@ -273,6 +287,16 @@ enum MFI_STAT {
|
||||
MFI_STAT_INVALID_STATUS = 0xFF
|
||||
};
|
||||
|
||||
enum mfi_evt_class {
|
||||
MFI_EVT_CLASS_DEBUG = -2,
|
||||
MFI_EVT_CLASS_PROGRESS = -1,
|
||||
MFI_EVT_CLASS_INFO = 0,
|
||||
MFI_EVT_CLASS_WARNING = 1,
|
||||
MFI_EVT_CLASS_CRITICAL = 2,
|
||||
MFI_EVT_CLASS_FATAL = 3,
|
||||
MFI_EVT_CLASS_DEAD = 4
|
||||
};
|
||||
|
||||
/*
|
||||
* Crash dump related defines
|
||||
*/
|
||||
@@ -364,6 +388,8 @@ enum MR_EVT_ARGS {
|
||||
MR_EVT_ARGS_GENERIC,
|
||||
};
|
||||
|
||||
|
||||
#define SGE_BUFFER_SIZE 4096
|
||||
/*
|
||||
* define constants for device list query options
|
||||
*/
|
||||
@@ -394,6 +420,7 @@ enum MR_LD_QUERY_TYPE {
|
||||
#define MR_EVT_FOREIGN_CFG_IMPORTED 0x00db
|
||||
#define MR_EVT_LD_OFFLINE 0x00fc
|
||||
#define MR_EVT_CTRL_HOST_BUS_SCAN_REQUESTED 0x0152
|
||||
#define MR_EVT_CTRL_PROP_CHANGED 0x012f
|
||||
|
||||
enum MR_PD_STATE {
|
||||
MR_PD_STATE_UNCONFIGURED_GOOD = 0x00,
|
||||
@@ -973,7 +1000,12 @@ struct megasas_ctrl_info {
|
||||
|
||||
struct {
|
||||
#if defined(__BIG_ENDIAN_BITFIELD)
|
||||
u32 reserved:12;
|
||||
u32 reserved:7;
|
||||
u32 useSeqNumJbodFP:1;
|
||||
u32 supportExtendedSSCSize:1;
|
||||
u32 supportDiskCacheSettingForSysPDs:1;
|
||||
u32 supportCPLDUpdate:1;
|
||||
u32 supportTTYLogCompression:1;
|
||||
u32 discardCacheDuringLDDelete:1;
|
||||
u32 supportSecurityonJBOD:1;
|
||||
u32 supportCacheBypassModes:1;
|
||||
@@ -1013,7 +1045,12 @@ struct megasas_ctrl_info {
|
||||
u32 supportCacheBypassModes:1;
|
||||
u32 supportSecurityonJBOD:1;
|
||||
u32 discardCacheDuringLDDelete:1;
|
||||
u32 reserved:12;
|
||||
u32 supportTTYLogCompression:1;
|
||||
u32 supportCPLDUpdate:1;
|
||||
u32 supportDiskCacheSettingForSysPDs:1;
|
||||
u32 supportExtendedSSCSize:1;
|
||||
u32 useSeqNumJbodFP:1;
|
||||
u32 reserved:7;
|
||||
#endif
|
||||
} adapterOperations3;
|
||||
|
||||
@@ -1229,7 +1266,9 @@ union megasas_sgl_frame {
|
||||
typedef union _MFI_CAPABILITIES {
|
||||
struct {
|
||||
#if defined(__BIG_ENDIAN_BITFIELD)
|
||||
u32 reserved:25;
|
||||
u32 reserved:23;
|
||||
u32 support_ext_io_size:1;
|
||||
u32 support_ext_queue_depth:1;
|
||||
u32 security_protocol_cmds_fw:1;
|
||||
u32 support_core_affinity:1;
|
||||
u32 support_ndrive_r1_lb:1;
|
||||
@@ -1245,7 +1284,9 @@ typedef union _MFI_CAPABILITIES {
|
||||
u32 support_ndrive_r1_lb:1;
|
||||
u32 support_core_affinity:1;
|
||||
u32 security_protocol_cmds_fw:1;
|
||||
u32 reserved:25;
|
||||
u32 support_ext_queue_depth:1;
|
||||
u32 support_ext_io_size:1;
|
||||
u32 reserved:23;
|
||||
#endif
|
||||
} mfi_capabilities;
|
||||
__le32 reg;
|
||||
@@ -1690,6 +1731,7 @@ struct megasas_instance {
|
||||
u32 crash_dump_drv_support;
|
||||
u32 crash_dump_app_support;
|
||||
u32 secure_jbod_support;
|
||||
bool use_seqnum_jbod_fp; /* Added for PD sequence */
|
||||
spinlock_t crashdump_lock;
|
||||
|
||||
struct megasas_register_set __iomem *reg_set;
|
||||
@@ -1748,6 +1790,7 @@ struct megasas_instance {
|
||||
u8 UnevenSpanSupport;
|
||||
|
||||
u8 supportmax256vd;
|
||||
u8 allow_fw_scan;
|
||||
u16 fw_supported_vd_count;
|
||||
u16 fw_supported_pd_count;
|
||||
|
||||
@@ -1769,7 +1812,9 @@ struct megasas_instance {
|
||||
struct msix_entry msixentry[MEGASAS_MAX_MSIX_QUEUES];
|
||||
struct megasas_irq_context irq_context[MEGASAS_MAX_MSIX_QUEUES];
|
||||
u64 map_id;
|
||||
u64 pd_seq_map_id;
|
||||
struct megasas_cmd *map_update_cmd;
|
||||
struct megasas_cmd *jbod_seq_cmd;
|
||||
unsigned long bar;
|
||||
long reset_flags;
|
||||
struct mutex reset_mutex;
|
||||
@@ -1780,6 +1825,7 @@ struct megasas_instance {
|
||||
char mpio;
|
||||
u16 throttlequeuedepth;
|
||||
u8 mask_interrupts;
|
||||
u16 max_chain_frame_sz;
|
||||
u8 is_imr;
|
||||
bool dev_handle;
|
||||
};
|
||||
@@ -1985,6 +2031,9 @@ __le16 get_updated_dev_handle(struct megasas_instance *instance,
|
||||
void mr_update_load_balance_params(struct MR_DRV_RAID_MAP_ALL *map,
|
||||
struct LD_LOAD_BALANCE_INFO *lbInfo);
|
||||
int megasas_get_ctrl_info(struct megasas_instance *instance);
|
||||
/* PD sequence */
|
||||
int
|
||||
megasas_sync_pd_seq_num(struct megasas_instance *instance, bool pend);
|
||||
int megasas_set_crash_dump_params(struct megasas_instance *instance,
|
||||
u8 crash_buf_state);
|
||||
void megasas_free_host_crash_buffer(struct megasas_instance *instance);
|
||||
@@ -2000,5 +2049,6 @@ void __megasas_return_cmd(struct megasas_instance *instance,
|
||||
void megasas_return_mfi_mpt_pthr(struct megasas_instance *instance,
|
||||
struct megasas_cmd *cmd_mfi, struct megasas_cmd_fusion *cmd_fusion);
|
||||
int megasas_cmd_type(struct scsi_cmnd *cmd);
|
||||
void megasas_setup_jbod_map(struct megasas_instance *instance);
|
||||
|
||||
#endif /*LSI_MEGARAID_SAS_H */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -741,14 +741,12 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld,
|
||||
u8 physArm, span;
|
||||
u64 row;
|
||||
u8 retval = TRUE;
|
||||
u8 do_invader = 0;
|
||||
u64 *pdBlock = &io_info->pdBlock;
|
||||
__le16 *pDevHandle = &io_info->devHandle;
|
||||
u32 logArm, rowMod, armQ, arm;
|
||||
struct fusion_context *fusion;
|
||||
|
||||
if ((instance->pdev->device == PCI_DEVICE_ID_LSI_INVADER ||
|
||||
instance->pdev->device == PCI_DEVICE_ID_LSI_FURY))
|
||||
do_invader = 1;
|
||||
fusion = instance->ctrl_context;
|
||||
|
||||
/*Get row and span from io_info for Uneven Span IO.*/
|
||||
row = io_info->start_row;
|
||||
@@ -779,7 +777,8 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld,
|
||||
else {
|
||||
*pDevHandle = cpu_to_le16(MR_PD_INVALID);
|
||||
if ((raid->level >= 5) &&
|
||||
(!do_invader || (do_invader &&
|
||||
((fusion->adapter_type == THUNDERBOLT_SERIES) ||
|
||||
((fusion->adapter_type == INVADER_SERIES) &&
|
||||
(raid->regTypeReqOnRead != REGION_TYPE_UNUSED))))
|
||||
pRAID_Context->regLockFlags = REGION_TYPE_EXCLUSIVE;
|
||||
else if (raid->level == 1) {
|
||||
@@ -823,13 +822,12 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
|
||||
u8 physArm, span;
|
||||
u64 row;
|
||||
u8 retval = TRUE;
|
||||
u8 do_invader = 0;
|
||||
u64 *pdBlock = &io_info->pdBlock;
|
||||
__le16 *pDevHandle = &io_info->devHandle;
|
||||
struct fusion_context *fusion;
|
||||
|
||||
fusion = instance->ctrl_context;
|
||||
|
||||
if ((instance->pdev->device == PCI_DEVICE_ID_LSI_INVADER ||
|
||||
instance->pdev->device == PCI_DEVICE_ID_LSI_FURY))
|
||||
do_invader = 1;
|
||||
|
||||
row = mega_div64_32(stripRow, raid->rowDataSize);
|
||||
|
||||
@@ -875,7 +873,8 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
|
||||
/* set dev handle as invalid. */
|
||||
*pDevHandle = cpu_to_le16(MR_PD_INVALID);
|
||||
if ((raid->level >= 5) &&
|
||||
(!do_invader || (do_invader &&
|
||||
((fusion->adapter_type == THUNDERBOLT_SERIES) ||
|
||||
((fusion->adapter_type == INVADER_SERIES) &&
|
||||
(raid->regTypeReqOnRead != REGION_TYPE_UNUSED))))
|
||||
pRAID_Context->regLockFlags = REGION_TYPE_EXCLUSIVE;
|
||||
else if (raid->level == 1) {
|
||||
@@ -909,6 +908,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
|
||||
struct RAID_CONTEXT *pRAID_Context,
|
||||
struct MR_DRV_RAID_MAP_ALL *map, u8 **raidLUN)
|
||||
{
|
||||
struct fusion_context *fusion;
|
||||
struct MR_LD_RAID *raid;
|
||||
u32 ld, stripSize, stripe_mask;
|
||||
u64 endLba, endStrip, endRow, start_row, start_strip;
|
||||
@@ -929,6 +929,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
|
||||
isRead = io_info->isRead;
|
||||
io_info->IoforUnevenSpan = 0;
|
||||
io_info->start_span = SPAN_INVALID;
|
||||
fusion = instance->ctrl_context;
|
||||
|
||||
ld = MR_TargetIdToLdGet(ldTgtId, map);
|
||||
raid = MR_LdRaidGet(ld, map);
|
||||
@@ -1092,8 +1093,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
|
||||
cpu_to_le16(raid->fpIoTimeoutForLd ?
|
||||
raid->fpIoTimeoutForLd :
|
||||
map->raidMap.fpPdIoTimeoutSec);
|
||||
if ((instance->pdev->device == PCI_DEVICE_ID_LSI_INVADER) ||
|
||||
(instance->pdev->device == PCI_DEVICE_ID_LSI_FURY))
|
||||
if (fusion->adapter_type == INVADER_SERIES)
|
||||
pRAID_Context->regLockFlags = (isRead) ?
|
||||
raid->regTypeReqOnRead : raid->regTypeReqOnWrite;
|
||||
else
|
||||
@@ -1198,10 +1198,6 @@ void mr_update_span_set(struct MR_DRV_RAID_MAP_ALL *map,
|
||||
span_row_width +=
|
||||
MR_LdSpanPtrGet
|
||||
(ld, count, map)->spanRowDataSize;
|
||||
printk(KERN_INFO "megasas:"
|
||||
"span %x rowDataSize %x\n",
|
||||
count, MR_LdSpanPtrGet
|
||||
(ld, count, map)->spanRowDataSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user