mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-08-18 02:22:47 -07:00
Merge remote-tracking branch 'scsi-queue/drivers-for-3.19' into for-linus
This commit is contained in:
commit
e617457691
49 files changed
+147
-365
No files matched your search
@@ -2740,7 +2740,6 @@ static struct scsi_host_template srp_template = {
|
||||
.info = srp_target_info,
|
||||
.queuecommand = srp_queuecommand,
|
||||
.change_queue_depth = srp_change_queue_depth,
|
||||
.change_queue_type = scsi_change_queue_type,
|
||||
.eh_abort_handler = srp_abort,
|
||||
.eh_device_reset_handler = srp_reset_device,
|
||||
.eh_host_reset_handler = srp_reset_host,
|
||||
|
||||
@@ -1708,17 +1708,17 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch,
|
||||
|
||||
switch (srp_cmd->task_attr) {
|
||||
case SRP_CMD_SIMPLE_Q:
|
||||
cmd->sam_task_attr = MSG_SIMPLE_TAG;
|
||||
cmd->sam_task_attr = TCM_SIMPLE_TAG;
|
||||
break;
|
||||
case SRP_CMD_ORDERED_Q:
|
||||
default:
|
||||
cmd->sam_task_attr = MSG_ORDERED_TAG;
|
||||
cmd->sam_task_attr = TCM_ORDERED_TAG;
|
||||
break;
|
||||
case SRP_CMD_HEAD_OF_Q:
|
||||
cmd->sam_task_attr = MSG_HEAD_TAG;
|
||||
cmd->sam_task_attr = TCM_HEAD_TAG;
|
||||
break;
|
||||
case SRP_CMD_ACA:
|
||||
cmd->sam_task_attr = MSG_ACA_TAG;
|
||||
cmd->sam_task_attr = TCM_ACA_TAG;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1733,7 +1733,7 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch,
|
||||
sizeof(srp_cmd->lun));
|
||||
rc = target_submit_cmd(cmd, ch->sess, srp_cmd->cdb,
|
||||
&send_ioctx->sense_data[0], unpacked_lun, data_len,
|
||||
MSG_SIMPLE_TAG, dir, TARGET_SCF_ACK_KREF);
|
||||
TCM_SIMPLE_TAG, dir, TARGET_SCF_ACK_KREF);
|
||||
if (rc != 0) {
|
||||
ret = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
|
||||
goto send_sense;
|
||||
|
||||
+3
-38
@@ -176,7 +176,6 @@ STATIC int NCR_700_slave_alloc(struct scsi_device *SDpnt);
|
||||
STATIC int NCR_700_slave_configure(struct scsi_device *SDpnt);
|
||||
STATIC void NCR_700_slave_destroy(struct scsi_device *SDpnt);
|
||||
static int NCR_700_change_queue_depth(struct scsi_device *SDpnt, int depth);
|
||||
static int NCR_700_change_queue_type(struct scsi_device *SDpnt, int depth);
|
||||
|
||||
STATIC struct device_attribute *NCR_700_dev_attrs[];
|
||||
|
||||
@@ -326,7 +325,6 @@ NCR_700_detect(struct scsi_host_template *tpnt,
|
||||
tpnt->slave_destroy = NCR_700_slave_destroy;
|
||||
tpnt->slave_alloc = NCR_700_slave_alloc;
|
||||
tpnt->change_queue_depth = NCR_700_change_queue_depth;
|
||||
tpnt->change_queue_type = NCR_700_change_queue_type;
|
||||
tpnt->use_blk_tags = 1;
|
||||
|
||||
if(tpnt->name == NULL)
|
||||
@@ -904,8 +902,8 @@ process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata
|
||||
hostdata->tag_negotiated &= ~(1<<scmd_id(SCp));
|
||||
|
||||
SCp->device->tagged_supported = 0;
|
||||
SCp->device->simple_tags = 0;
|
||||
scsi_change_queue_depth(SCp->device, host->cmd_per_lun);
|
||||
scsi_set_tag_type(SCp->device, 0);
|
||||
} else {
|
||||
shost_printk(KERN_WARNING, host,
|
||||
"(%d:%d) Unexpected REJECT Message %s\n",
|
||||
@@ -1818,8 +1816,8 @@ NCR_700_queuecommand_lck(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)
|
||||
hostdata->tag_negotiated &= ~(1<<scmd_id(SCp));
|
||||
}
|
||||
|
||||
if((hostdata->tag_negotiated &(1<<scmd_id(SCp)))
|
||||
&& scsi_get_tag_type(SCp->device)) {
|
||||
if ((hostdata->tag_negotiated & (1<<scmd_id(SCp))) &&
|
||||
SCp->device->simple_tags) {
|
||||
slot->tag = SCp->request->tag;
|
||||
CDEBUG(KERN_DEBUG, SCp, "sending out tag %d, slot %p\n",
|
||||
slot->tag, slot);
|
||||
@@ -2082,39 +2080,6 @@ NCR_700_change_queue_depth(struct scsi_device *SDp, int depth)
|
||||
return scsi_change_queue_depth(SDp, depth);
|
||||
}
|
||||
|
||||
static int NCR_700_change_queue_type(struct scsi_device *SDp, int tag_type)
|
||||
{
|
||||
int change_tag = ((tag_type ==0 && scsi_get_tag_type(SDp) != 0)
|
||||
|| (tag_type != 0 && scsi_get_tag_type(SDp) == 0));
|
||||
struct NCR_700_Host_Parameters *hostdata =
|
||||
(struct NCR_700_Host_Parameters *)SDp->host->hostdata[0];
|
||||
|
||||
/* We have a global (per target) flag to track whether TCQ is
|
||||
* enabled, so we'll be turning it off for the entire target here.
|
||||
* our tag algorithm will fail if we mix tagged and untagged commands,
|
||||
* so quiesce the device before doing this */
|
||||
if (change_tag)
|
||||
scsi_target_quiesce(SDp->sdev_target);
|
||||
|
||||
scsi_set_tag_type(SDp, tag_type);
|
||||
if (!tag_type) {
|
||||
/* shift back to the default unqueued number of commands
|
||||
* (the user can still raise this) */
|
||||
scsi_change_queue_depth(SDp, SDp->host->cmd_per_lun);
|
||||
hostdata->tag_negotiated &= ~(1 << sdev_id(SDp));
|
||||
} else {
|
||||
/* Here, we cleared the negotiation flag above, so this
|
||||
* will force the driver to renegotiate */
|
||||
scsi_change_queue_depth(SDp, SDp->queue_depth);
|
||||
if (change_tag)
|
||||
NCR_700_set_tag_neg_state(SDp, NCR_700_START_TAG_NEGOTIATION);
|
||||
}
|
||||
if (change_tag)
|
||||
scsi_target_resume(SDp->sdev_target);
|
||||
|
||||
return tag_type;
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
NCR_700_show_active_tags(struct device *dev, struct device_attribute *attr, char *buf)
|
||||
{
|
||||
|
||||
@@ -1462,18 +1462,17 @@ config SCSI_WD719X
|
||||
SCSI controllers (based on WD33C296A chip).
|
||||
|
||||
config SCSI_DEBUG
|
||||
tristate "SCSI debugging host simulator"
|
||||
tristate "SCSI debugging host and device simulator"
|
||||
depends on SCSI
|
||||
select CRC_T10DIF
|
||||
help
|
||||
This is a host adapter simulator that can simulate multiple hosts
|
||||
each with multiple dummy SCSI devices (disks). It defaults to one
|
||||
host adapter with one dummy SCSI disk. Each dummy disk uses kernel
|
||||
RAM as storage (i.e. it is a ramdisk). To save space when multiple
|
||||
dummy disks are simulated, they share the same kernel RAM for
|
||||
their storage. See <http://sg.danny.cz/sg/sdebug26.html> for more
|
||||
information. This driver is primarily of use to those testing the
|
||||
SCSI and block subsystems. If unsure, say N.
|
||||
This pseudo driver simulates one or more hosts (SCSI initiators),
|
||||
each with one or more targets, each with one or more logical units.
|
||||
Defaults to one of each, creating a small RAM disk device. Many
|
||||
parameters found in the /sys/bus/pseudo/drivers/scsi_debug
|
||||
directory can be tweaked at run time.
|
||||
See <http://sg.danny.cz/sg/sdebug26.html> for more information.
|
||||
Mainly used for testing and best as a module. If unsure, say N.
|
||||
|
||||
config SCSI_MESH
|
||||
tristate "MESH (Power Mac internal SCSI) support"
|
||||
|
||||
@@ -7921,9 +7921,9 @@ static int asc_build_req(struct asc_board *boardp, struct scsi_cmnd *scp,
|
||||
*/
|
||||
if ((asc_dvc->cur_dvc_qng[scp->device->id] > 0) &&
|
||||
(boardp->reqcnt[scp->device->id] % 255) == 0) {
|
||||
asc_scsi_q->q2.tag_code = MSG_ORDERED_TAG;
|
||||
asc_scsi_q->q2.tag_code = ORDERED_QUEUE_TAG;
|
||||
} else {
|
||||
asc_scsi_q->q2.tag_code = MSG_SIMPLE_TAG;
|
||||
asc_scsi_q->q2.tag_code = SIMPLE_QUEUE_TAG;
|
||||
}
|
||||
|
||||
/* Build ASC_SCSI_Q */
|
||||
@@ -8351,7 +8351,7 @@ static int AscPutReadyQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq, uchar q_no)
|
||||
}
|
||||
q_addr = ASC_QNO_TO_QADDR(q_no);
|
||||
if ((scsiq->q1.target_id & asc_dvc->use_tagged_qng) == 0) {
|
||||
scsiq->q2.tag_code &= ~MSG_SIMPLE_TAG;
|
||||
scsiq->q2.tag_code &= ~SIMPLE_QUEUE_TAG;
|
||||
}
|
||||
scsiq->q1.status = QS_FREE;
|
||||
AscMemWordCopyPtrToLram(iop_base,
|
||||
@@ -8669,7 +8669,7 @@ static int AscExeScsiQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq)
|
||||
}
|
||||
}
|
||||
if (disable_syn_offset_one_fix) {
|
||||
scsiq->q2.tag_code &= ~MSG_SIMPLE_TAG;
|
||||
scsiq->q2.tag_code &= ~SIMPLE_QUEUE_TAG;
|
||||
scsiq->q2.tag_code |= (ASC_TAG_FLAG_DISABLE_ASYN_USE_SYN_FIX |
|
||||
ASC_TAG_FLAG_DISABLE_DISCONNECT);
|
||||
} else {
|
||||
|
||||
@@ -63,7 +63,6 @@ static struct scsi_host_template aic94xx_sht = {
|
||||
.scan_finished = asd_scan_finished,
|
||||
.scan_start = asd_scan_start,
|
||||
.change_queue_depth = sas_change_queue_depth,
|
||||
.change_queue_type = sas_change_queue_type,
|
||||
.bios_param = sas_bios_param,
|
||||
.can_queue = 1,
|
||||
.cmd_per_lun = 1,
|
||||
|
||||
@@ -2792,7 +2792,6 @@ static struct scsi_host_template bnx2fc_shost_template = {
|
||||
.eh_host_reset_handler = fc_eh_host_reset,
|
||||
.slave_alloc = fc_slave_alloc,
|
||||
.change_queue_depth = scsi_change_queue_depth,
|
||||
.change_queue_type = scsi_change_queue_type,
|
||||
.this_id = -1,
|
||||
.cmd_per_lun = 3,
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
|
||||
@@ -1737,11 +1737,7 @@ void bnx2fc_build_fcp_cmnd(struct bnx2fc_cmd *io_req,
|
||||
fcp_cmnd->fc_pri_ta = 0;
|
||||
fcp_cmnd->fc_tm_flags = io_req->mp_req.tm_flags;
|
||||
fcp_cmnd->fc_flags = io_req->io_req_flags;
|
||||
|
||||
if (sc_cmd->flags & SCMD_TAGGED)
|
||||
fcp_cmnd->fc_pri_ta = FCP_PTA_SIMPLE;
|
||||
else
|
||||
fcp_cmnd->fc_pri_ta = 0;
|
||||
fcp_cmnd->fc_pri_ta = FCP_PTA_SIMPLE;
|
||||
}
|
||||
|
||||
static void bnx2fc_parse_fcp_rsp(struct bnx2fc_cmd *io_req,
|
||||
|
||||
@@ -172,10 +172,7 @@ csio_scsi_fcp_cmnd(struct csio_ioreq *req, void *addr)
|
||||
fcp_cmnd->fc_cmdref = 0;
|
||||
|
||||
memcpy(fcp_cmnd->fc_cdb, scmnd->cmnd, 16);
|
||||
if (scmnd->flags & SCMD_TAGGED)
|
||||
fcp_cmnd->fc_pri_ta = FCP_PTA_SIMPLE;
|
||||
else
|
||||
fcp_cmnd->fc_pri_ta = 0;
|
||||
fcp_cmnd->fc_pri_ta = FCP_PTA_SIMPLE;
|
||||
fcp_cmnd->fc_dl = cpu_to_be32(scsi_bufflen(scmnd));
|
||||
|
||||
if (req->nsge)
|
||||
|
||||
@@ -684,9 +684,9 @@ static u16 calc_fi_checksum(struct esas2r_flash_context *fc)
|
||||
* 1) verify the fi_version is correct
|
||||
* 2) verify the checksum of the entire image.
|
||||
* 3) validate the adap_typ, action and length fields.
|
||||
* 4) valdiate each component header. check the img_type and
|
||||
* 4) validate each component header. check the img_type and
|
||||
* length fields
|
||||
* 5) valdiate each component image. validate signatures and
|
||||
* 5) validate each component image. validate signatures and
|
||||
* local checksums
|
||||
*/
|
||||
static bool verify_fi(struct esas2r_adapter *a,
|
||||
|
||||
@@ -255,7 +255,6 @@ static struct scsi_host_template driver_template = {
|
||||
.emulated = 0,
|
||||
.proc_name = ESAS2R_DRVR_NAME,
|
||||
.change_queue_depth = scsi_change_queue_depth,
|
||||
.change_queue_type = scsi_change_queue_type,
|
||||
.max_sectors = 0xFFFF,
|
||||
.use_blk_tags = 1,
|
||||
};
|
||||
|
||||
@@ -281,7 +281,6 @@ static struct scsi_host_template fcoe_shost_template = {
|
||||
.eh_host_reset_handler = fc_eh_host_reset,
|
||||
.slave_alloc = fc_slave_alloc,
|
||||
.change_queue_depth = scsi_change_queue_depth,
|
||||
.change_queue_type = scsi_change_queue_type,
|
||||
.this_id = -1,
|
||||
.cmd_per_lun = 3,
|
||||
.can_queue = FCOE_MAX_OUTSTANDING_COMMANDS,
|
||||
|
||||
@@ -111,7 +111,6 @@ static struct scsi_host_template fnic_host_template = {
|
||||
.eh_host_reset_handler = fnic_host_reset,
|
||||
.slave_alloc = fnic_slave_alloc,
|
||||
.change_queue_depth = scsi_change_queue_depth,
|
||||
.change_queue_type = scsi_change_queue_type,
|
||||
.this_id = -1,
|
||||
.cmd_per_lun = 3,
|
||||
.can_queue = FNIC_DFLT_IO_REQ,
|
||||
|
||||
@@ -1615,7 +1615,6 @@ static int ibmvfc_queuecommand_lck(struct scsi_cmnd *cmnd,
|
||||
struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));
|
||||
struct ibmvfc_cmd *vfc_cmd;
|
||||
struct ibmvfc_event *evt;
|
||||
u8 tag[2];
|
||||
int rc;
|
||||
|
||||
if (unlikely((rc = fc_remote_port_chkready(rport))) ||
|
||||
@@ -3089,7 +3088,6 @@ static struct scsi_host_template driver_template = {
|
||||
.target_alloc = ibmvfc_target_alloc,
|
||||
.scan_finished = ibmvfc_scan_finished,
|
||||
.change_queue_depth = ibmvfc_change_queue_depth,
|
||||
.change_queue_type = scsi_change_queue_type,
|
||||
.cmd_per_lun = 16,
|
||||
.can_queue = IBMVFC_MAX_REQUESTS_DEFAULT,
|
||||
.this_id = -1,
|
||||
|
||||
+45
-71
@@ -1426,16 +1426,14 @@ static void ipr_handle_config_change(struct ipr_ioa_cfg *ioa_cfg,
|
||||
if (res->sdev) {
|
||||
res->del_from_ml = 1;
|
||||
res->res_handle = IPR_INVALID_RES_HANDLE;
|
||||
if (ioa_cfg->allow_ml_add_del)
|
||||
schedule_work(&ioa_cfg->work_q);
|
||||
schedule_work(&ioa_cfg->work_q);
|
||||
} else {
|
||||
ipr_clear_res_target(res);
|
||||
list_move_tail(&res->queue, &ioa_cfg->free_res_q);
|
||||
}
|
||||
} else if (!res->sdev || res->del_from_ml) {
|
||||
res->add_to_ml = 1;
|
||||
if (ioa_cfg->allow_ml_add_del)
|
||||
schedule_work(&ioa_cfg->work_q);
|
||||
schedule_work(&ioa_cfg->work_q);
|
||||
}
|
||||
|
||||
ipr_send_hcam(ioa_cfg, IPR_HCAM_CDB_OP_CODE_CONFIG_CHANGE, hostrcb);
|
||||
@@ -3273,8 +3271,7 @@ static void ipr_worker_thread(struct work_struct *work)
|
||||
restart:
|
||||
do {
|
||||
did_work = 0;
|
||||
if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].allow_cmds ||
|
||||
!ioa_cfg->allow_ml_add_del) {
|
||||
if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].allow_cmds) {
|
||||
spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
|
||||
return;
|
||||
}
|
||||
@@ -3311,6 +3308,7 @@ restart:
|
||||
}
|
||||
}
|
||||
|
||||
ioa_cfg->scan_done = 1;
|
||||
spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
|
||||
kobject_uevent(&ioa_cfg->host->shost_dev.kobj, KOBJ_CHANGE);
|
||||
LEAVE;
|
||||
@@ -4345,30 +4343,6 @@ static int ipr_change_queue_depth(struct scsi_device *sdev, int qdepth)
|
||||
return sdev->queue_depth;
|
||||
}
|
||||
|
||||
/**
|
||||
* ipr_change_queue_type - Change the device's queue type
|
||||
* @dsev: scsi device struct
|
||||
* @tag_type: type of tags to use
|
||||
*
|
||||
* Return value:
|
||||
* actual queue type set
|
||||
**/
|
||||
static int ipr_change_queue_type(struct scsi_device *sdev, int tag_type)
|
||||
{
|
||||
struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata;
|
||||
struct ipr_resource_entry *res;
|
||||
unsigned long lock_flags = 0;
|
||||
|
||||
spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
|
||||
res = (struct ipr_resource_entry *)sdev->hostdata;
|
||||
if (res && ipr_is_gscsi(res))
|
||||
tag_type = scsi_change_queue_type(sdev, tag_type);
|
||||
else
|
||||
tag_type = 0;
|
||||
spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
|
||||
return tag_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* ipr_show_adapter_handle - Show the adapter's resource handle for this device
|
||||
* @dev: device struct
|
||||
@@ -4739,6 +4713,7 @@ static int ipr_slave_configure(struct scsi_device *sdev)
|
||||
sdev->no_uld_attach = 1;
|
||||
}
|
||||
if (ipr_is_vset_device(res)) {
|
||||
sdev->scsi_level = SCSI_SPC_3;
|
||||
blk_queue_rq_timeout(sdev->request_queue,
|
||||
IPR_VSET_RW_TIMEOUT);
|
||||
blk_queue_max_hw_sectors(sdev->request_queue, IPR_VSET_MAX_SECTORS);
|
||||
@@ -5231,6 +5206,28 @@ static int ipr_cancel_op(struct scsi_cmnd *scsi_cmd)
|
||||
* @scsi_cmd: scsi command struct
|
||||
*
|
||||
* Return value:
|
||||
* 0 if scan in progress / 1 if scan is complete
|
||||
**/
|
||||
static int ipr_scan_finished(struct Scsi_Host *shost, unsigned long elapsed_time)
|
||||
{
|
||||
unsigned long lock_flags;
|
||||
struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) shost->hostdata;
|
||||
int rc = 0;
|
||||
|
||||
spin_lock_irqsave(shost->host_lock, lock_flags);
|
||||
if (ioa_cfg->hrrq[IPR_INIT_HRRQ].ioa_is_dead || ioa_cfg->scan_done)
|
||||
rc = 1;
|
||||
if ((elapsed_time/HZ) > (ioa_cfg->transop_timeout * 2))
|
||||
rc = 1;
|
||||
spin_unlock_irqrestore(shost->host_lock, lock_flags);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* ipr_eh_host_reset - Reset the host adapter
|
||||
* @scsi_cmd: scsi command struct
|
||||
*
|
||||
* Return value:
|
||||
* SUCCESS / FAILED
|
||||
**/
|
||||
static int ipr_eh_abort(struct scsi_cmnd *scsi_cmd)
|
||||
@@ -5779,7 +5776,7 @@ static void ipr_erp_cancel_all(struct ipr_cmnd *ipr_cmd)
|
||||
|
||||
ipr_reinit_ipr_cmnd_for_erp(ipr_cmd);
|
||||
|
||||
if (!scsi_get_tag_type(scsi_cmd->device)) {
|
||||
if (!scsi_cmd->device->simple_tags) {
|
||||
ipr_erp_request_sense(ipr_cmd);
|
||||
return;
|
||||
}
|
||||
@@ -6299,10 +6296,10 @@ static struct scsi_host_template driver_template = {
|
||||
.slave_alloc = ipr_slave_alloc,
|
||||
.slave_configure = ipr_slave_configure,
|
||||
.slave_destroy = ipr_slave_destroy,
|
||||
.scan_finished = ipr_scan_finished,
|
||||
.target_alloc = ipr_target_alloc,
|
||||
.target_destroy = ipr_target_destroy,
|
||||
.change_queue_depth = ipr_change_queue_depth,
|
||||
.change_queue_type = ipr_change_queue_type,
|
||||
.bios_param = ipr_biosparam,
|
||||
.can_queue = IPR_MAX_COMMANDS,
|
||||
.this_id = -1,
|
||||
@@ -6841,7 +6838,7 @@ static int ipr_ioa_reset_done(struct ipr_cmnd *ipr_cmd)
|
||||
ioa_cfg->doorbell |= IPR_RUNTIME_RESET;
|
||||
|
||||
list_for_each_entry(res, &ioa_cfg->used_res_q, queue) {
|
||||
if (ioa_cfg->allow_ml_add_del && (res->add_to_ml || res->del_from_ml)) {
|
||||
if (res->add_to_ml || res->del_from_ml) {
|
||||
ipr_trace;
|
||||
break;
|
||||
}
|
||||
@@ -6870,6 +6867,7 @@ static int ipr_ioa_reset_done(struct ipr_cmnd *ipr_cmd)
|
||||
if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].allow_cmds)
|
||||
scsi_block_requests(ioa_cfg->host);
|
||||
|
||||
schedule_work(&ioa_cfg->work_q);
|
||||
LEAVE;
|
||||
return IPR_RC_JOB_RETURN;
|
||||
}
|
||||
@@ -7610,6 +7608,19 @@ static int ipr_ioafp_page0_inquiry(struct ipr_cmnd *ipr_cmd)
|
||||
type[4] = '\0';
|
||||
ioa_cfg->type = simple_strtoul((char *)type, NULL, 16);
|
||||
|
||||
if (ipr_invalid_adapter(ioa_cfg)) {
|
||||
dev_err(&ioa_cfg->pdev->dev,
|
||||
"Adapter not supported in this hardware configuration.\n");
|
||||
|
||||
if (!ipr_testmode) {
|
||||
ioa_cfg->reset_retries += IPR_NUM_RESET_RELOAD_RETRIES;
|
||||
ipr_initiate_ioa_reset(ioa_cfg, IPR_SHUTDOWN_NONE);
|
||||
list_add_tail(&ipr_cmd->queue,
|
||||
&ioa_cfg->hrrq->hrrq_free_q);
|
||||
return IPR_RC_JOB_RETURN;
|
||||
}
|
||||
}
|
||||
|
||||
ipr_cmd->job_step = ipr_ioafp_page3_inquiry;
|
||||
|
||||
ipr_ioafp_inquiry(ipr_cmd, 1, 0,
|
||||
@@ -8797,20 +8808,6 @@ static int ipr_probe_ioa_part2(struct ipr_ioa_cfg *ioa_cfg)
|
||||
_ipr_initiate_ioa_reset(ioa_cfg, ipr_reset_enable_ioa,
|
||||
IPR_SHUTDOWN_NONE);
|
||||
spin_unlock_irqrestore(ioa_cfg->host->host_lock, host_lock_flags);
|
||||
wait_event(ioa_cfg->reset_wait_q, !ioa_cfg->in_reset_reload);
|
||||
spin_lock_irqsave(ioa_cfg->host->host_lock, host_lock_flags);
|
||||
|
||||
if (ioa_cfg->hrrq[IPR_INIT_HRRQ].ioa_is_dead) {
|
||||
rc = -EIO;
|
||||
} else if (ipr_invalid_adapter(ioa_cfg)) {
|
||||
if (!ipr_testmode)
|
||||
rc = -EIO;
|
||||
|
||||
dev_err(&ioa_cfg->pdev->dev,
|
||||
"Adapter not supported in this hardware configuration.\n");
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(ioa_cfg->host->host_lock, host_lock_flags);
|
||||
|
||||
LEAVE;
|
||||
return rc;
|
||||
@@ -9264,7 +9261,7 @@ static void ipr_init_ioa_cfg(struct ipr_ioa_cfg *ioa_cfg,
|
||||
* ioa_cfg->max_devs_supported)));
|
||||
}
|
||||
|
||||
host->max_channel = IPR_MAX_BUS_TO_SCAN;
|
||||
host->max_channel = IPR_VSET_BUS;
|
||||
host->unique_id = host->host_no;
|
||||
host->max_cmd_len = IPR_MAX_CDB_LEN;
|
||||
host->can_queue = ioa_cfg->max_cmds;
|
||||
@@ -9763,25 +9760,6 @@ out_scsi_host_put:
|
||||
goto out;
|
||||
}
|
||||
|
||||
/**
|
||||
* ipr_scan_vsets - Scans for VSET devices
|
||||
* @ioa_cfg: ioa config struct
|
||||
*
|
||||
* Description: Since the VSET resources do not follow SAM in that we can have
|
||||
* sparse LUNs with no LUN 0, we have to scan for these ourselves.
|
||||
*
|
||||
* Return value:
|
||||
* none
|
||||
**/
|
||||
static void ipr_scan_vsets(struct ipr_ioa_cfg *ioa_cfg)
|
||||
{
|
||||
int target, lun;
|
||||
|
||||
for (target = 0; target < IPR_MAX_NUM_TARGETS_PER_BUS; target++)
|
||||
for (lun = 0; lun < IPR_MAX_NUM_VSET_LUNS_PER_TARGET; lun++)
|
||||
scsi_add_device(ioa_cfg->host, IPR_VSET_BUS, target, lun);
|
||||
}
|
||||
|
||||
/**
|
||||
* ipr_initiate_ioa_bringdown - Bring down an adapter
|
||||
* @ioa_cfg: ioa config struct
|
||||
@@ -9937,10 +9915,6 @@ static int ipr_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)
|
||||
}
|
||||
|
||||
scsi_scan_host(ioa_cfg->host);
|
||||
ipr_scan_vsets(ioa_cfg);
|
||||
scsi_add_device(ioa_cfg->host, IPR_IOA_BUS, IPR_IOA_TARGET, IPR_IOA_LUN);
|
||||
ioa_cfg->allow_ml_add_del = 1;
|
||||
ioa_cfg->host->max_channel = IPR_VSET_BUS;
|
||||
ioa_cfg->iopoll_weight = ioa_cfg->chip_cfg->iopoll_weight;
|
||||
|
||||
if (ioa_cfg->iopoll_weight && ioa_cfg->sis64 && ioa_cfg->nvectors > 1) {
|
||||
|
||||
+1
-3
@@ -157,13 +157,11 @@
|
||||
|
||||
#define IPR_MAX_NUM_TARGETS_PER_BUS 256
|
||||
#define IPR_MAX_NUM_LUNS_PER_TARGET 256
|
||||
#define IPR_MAX_NUM_VSET_LUNS_PER_TARGET 8
|
||||
#define IPR_VSET_BUS 0xff
|
||||
#define IPR_IOA_BUS 0xff
|
||||
#define IPR_IOA_TARGET 0xff
|
||||
#define IPR_IOA_LUN 0xff
|
||||
#define IPR_MAX_NUM_BUSES 16
|
||||
#define IPR_MAX_BUS_TO_SCAN IPR_MAX_NUM_BUSES
|
||||
|
||||
#define IPR_NUM_RESET_RELOAD_RETRIES 3
|
||||
|
||||
@@ -1453,7 +1451,7 @@ struct ipr_ioa_cfg {
|
||||
u8 in_ioa_bringdown:1;
|
||||
u8 ioa_unit_checked:1;
|
||||
u8 dump_taken:1;
|
||||
u8 allow_ml_add_del:1;
|
||||
u8 scan_done:1;
|
||||
u8 needs_hard_reset:1;
|
||||
u8 dual_raid:1;
|
||||
u8 needs_warm_reset:1;
|
||||
|
||||
@@ -158,7 +158,6 @@ static struct scsi_host_template isci_sht = {
|
||||
.scan_finished = isci_host_scan_finished,
|
||||
.scan_start = isci_host_start,
|
||||
.change_queue_depth = sas_change_queue_depth,
|
||||
.change_queue_type = sas_change_queue_type,
|
||||
.bios_param = sas_bios_param,
|
||||
.can_queue = ISCI_CAN_QUEUE_VAL,
|
||||
.cmd_per_lun = 1,
|
||||
|
||||
@@ -906,13 +906,6 @@ int sas_change_queue_depth(struct scsi_device *sdev, int depth)
|
||||
return scsi_change_queue_depth(sdev, depth);
|
||||
}
|
||||
|
||||
int sas_change_queue_type(struct scsi_device *scsi_dev, int type)
|
||||
{
|
||||
if (dev_is_sata(sdev_to_domain_dev(scsi_dev)))
|
||||
return -EINVAL;
|
||||
return scsi_change_queue_type(scsi_dev, type);
|
||||
}
|
||||
|
||||
int sas_bios_param(struct scsi_device *scsi_dev,
|
||||
struct block_device *bdev,
|
||||
sector_t capacity, int *hsc)
|
||||
@@ -1011,7 +1004,6 @@ EXPORT_SYMBOL_GPL(sas_queuecommand);
|
||||
EXPORT_SYMBOL_GPL(sas_target_alloc);
|
||||
EXPORT_SYMBOL_GPL(sas_slave_configure);
|
||||
EXPORT_SYMBOL_GPL(sas_change_queue_depth);
|
||||
EXPORT_SYMBOL_GPL(sas_change_queue_type);
|
||||
EXPORT_SYMBOL_GPL(sas_bios_param);
|
||||
EXPORT_SYMBOL_GPL(sas_task_abort);
|
||||
EXPORT_SYMBOL_GPL(sas_phy_reset);
|
||||
|
||||
@@ -5879,7 +5879,6 @@ struct scsi_host_template lpfc_template = {
|
||||
.max_sectors = 0xFFFF,
|
||||
.vendor_id = LPFC_NL_VENDOR_ID,
|
||||
.change_queue_depth = scsi_change_queue_depth,
|
||||
.change_queue_type = scsi_change_queue_type,
|
||||
.use_blk_tags = 1,
|
||||
.track_queue_depth = 1,
|
||||
};
|
||||
@@ -5904,7 +5903,6 @@ struct scsi_host_template lpfc_vport_template = {
|
||||
.shost_attrs = lpfc_vport_attrs,
|
||||
.max_sectors = 0xFFFF,
|
||||
.change_queue_depth = scsi_change_queue_depth,
|
||||
.change_queue_type = scsi_change_queue_type,
|
||||
.use_blk_tags = 1,
|
||||
.track_queue_depth = 1,
|
||||
};
|
||||
@@ -7592,7 +7592,6 @@ static struct scsi_host_template scsih_driver_template = {
|
||||
.scan_finished = _scsih_scan_finished,
|
||||
.scan_start = _scsih_scan_start,
|
||||
.change_queue_depth = _scsih_change_queue_depth,
|
||||
.change_queue_type = scsi_change_queue_type,
|
||||
.eh_abort_handler = _scsih_abort,
|
||||
.eh_device_reset_handler = _scsih_dev_reset,
|
||||
.eh_target_reset_handler = _scsih_target_reset,
|
||||
|
||||
Loaded 20 of 49 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user