mirror of
https://github.com/t2linux/kernel.git
synced 2026-04-30 13:48:59 -07:00
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley: "This is a set of nine fixes (and one author update). The libsas one should fix discovery in eSATA devices, the WRITE_SAME one is the largest, but it should fix a lot of problems we've been getting with the emulated RAID devices (they've been effectively lying about support and then firmware has been choking on the commands). The rest are various crash, hang or warn driver fixes" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: [SCSI] bfa: Fix crash when symb name set for offline vport [SCSI] enclosure: fix WARN_ON in dual path device removing [SCSI] pm80xx: Tasklets synchronization fix. [SCSI] pm80xx: Resetting the phy state. [SCSI] pm80xx: Fix for direct attached device. [SCSI] pm80xx: Module author addition [SCSI] hpsa: return 0 from driver probe function on success, not 1 [SCSI] hpsa: do not discard scsi status on aborted commands [SCSI] Disable WRITE SAME for RAID and virtual host adapter drivers [SCSI] libsas: fix usage of ata_tf_to_fis
This commit is contained in:
@@ -3625,6 +3625,7 @@ int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht)
|
||||
shost->max_lun = 1;
|
||||
shost->max_channel = 1;
|
||||
shost->max_cmd_len = 16;
|
||||
shost->no_write_same = 1;
|
||||
|
||||
/* Schedule policy is determined by ->qc_defer()
|
||||
* callback and it needs to see every deferred qc.
|
||||
|
||||
@@ -1623,6 +1623,7 @@ static struct scsi_host_template scsi_driver_template = {
|
||||
.cmd_per_lun = 1,
|
||||
.can_queue = 1,
|
||||
.sdev_attrs = sbp2_scsi_sysfs_attrs,
|
||||
.no_write_same = 1,
|
||||
};
|
||||
|
||||
MODULE_AUTHOR("Kristian Hoegsberg <krh@bitplanet.net>");
|
||||
|
||||
@@ -198,6 +198,13 @@ static void enclosure_remove_links(struct enclosure_component *cdev)
|
||||
{
|
||||
char name[ENCLOSURE_NAME_SIZE];
|
||||
|
||||
/*
|
||||
* In odd circumstances, like multipath devices, something else may
|
||||
* already have removed the links, so check for this condition first.
|
||||
*/
|
||||
if (!cdev->dev->kobj.sd)
|
||||
return;
|
||||
|
||||
enclosure_link_name(cdev, name);
|
||||
sysfs_remove_link(&cdev->dev->kobj, name);
|
||||
sysfs_remove_link(&cdev->cdev.kobj, "device");
|
||||
|
||||
@@ -2025,7 +2025,8 @@ static struct scsi_host_template driver_template = {
|
||||
.cmd_per_lun = TW_MAX_CMDS_PER_LUN,
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.shost_attrs = twa_host_attrs,
|
||||
.emulated = 1
|
||||
.emulated = 1,
|
||||
.no_write_same = 1,
|
||||
};
|
||||
|
||||
/* This function will probe and initialize a card */
|
||||
|
||||
@@ -1600,7 +1600,8 @@ static struct scsi_host_template driver_template = {
|
||||
.cmd_per_lun = TW_MAX_CMDS_PER_LUN,
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.shost_attrs = twl_host_attrs,
|
||||
.emulated = 1
|
||||
.emulated = 1,
|
||||
.no_write_same = 1,
|
||||
};
|
||||
|
||||
/* This function will probe and initialize a card */
|
||||
|
||||
@@ -2279,7 +2279,8 @@ static struct scsi_host_template driver_template = {
|
||||
.cmd_per_lun = TW_MAX_CMDS_PER_LUN,
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.shost_attrs = tw_host_attrs,
|
||||
.emulated = 1
|
||||
.emulated = 1,
|
||||
.no_write_same = 1,
|
||||
};
|
||||
|
||||
/* This function will probe and initialize a card */
|
||||
|
||||
@@ -1081,6 +1081,7 @@ static struct scsi_host_template aac_driver_template = {
|
||||
#endif
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.emulated = 1,
|
||||
.no_write_same = 1,
|
||||
};
|
||||
|
||||
static void __aac_shutdown(struct aac_dev * aac)
|
||||
|
||||
@@ -137,6 +137,7 @@ static struct scsi_host_template arcmsr_scsi_host_template = {
|
||||
.cmd_per_lun = ARCMSR_MAX_CMD_PERLUN,
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.shost_attrs = arcmsr_host_attrs,
|
||||
.no_write_same = 1,
|
||||
};
|
||||
static struct pci_device_id arcmsr_device_id_table[] = {
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_ARECA, PCI_DEVICE_ID_ARECA_1110)},
|
||||
|
||||
@@ -296,6 +296,7 @@ wwn_t bfa_fcs_lport_get_rport(struct bfa_fcs_lport_s *port, wwn_t wwn,
|
||||
struct bfa_fcs_lport_s *bfa_fcs_lookup_port(struct bfa_fcs_s *fcs,
|
||||
u16 vf_id, wwn_t lpwwn);
|
||||
|
||||
void bfa_fcs_lport_set_symname(struct bfa_fcs_lport_s *port, char *symname);
|
||||
void bfa_fcs_lport_get_info(struct bfa_fcs_lport_s *port,
|
||||
struct bfa_lport_info_s *port_info);
|
||||
void bfa_fcs_lport_get_attr(struct bfa_fcs_lport_s *port,
|
||||
|
||||
@@ -1097,6 +1097,17 @@ bfa_fcs_lport_init(struct bfa_fcs_lport_s *lport,
|
||||
bfa_sm_send_event(lport, BFA_FCS_PORT_SM_CREATE);
|
||||
}
|
||||
|
||||
void
|
||||
bfa_fcs_lport_set_symname(struct bfa_fcs_lport_s *port,
|
||||
char *symname)
|
||||
{
|
||||
strcpy(port->port_cfg.sym_name.symname, symname);
|
||||
|
||||
if (bfa_sm_cmp_state(port, bfa_fcs_lport_sm_online))
|
||||
bfa_fcs_lport_ns_util_send_rspn_id(
|
||||
BFA_FCS_GET_NS_FROM_PORT(port), NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* fcs_lport_api
|
||||
*/
|
||||
@@ -5140,9 +5151,6 @@ bfa_fcs_lport_ns_util_send_rspn_id(void *cbarg, struct bfa_fcxp_s *fcxp_alloced)
|
||||
u8 *psymbl = &symbl[0];
|
||||
int len;
|
||||
|
||||
if (!bfa_sm_cmp_state(port, bfa_fcs_lport_sm_online))
|
||||
return;
|
||||
|
||||
/* Avoid sending RSPN in the following states. */
|
||||
if (bfa_sm_cmp_state(ns, bfa_fcs_lport_ns_sm_offline) ||
|
||||
bfa_sm_cmp_state(ns, bfa_fcs_lport_ns_sm_plogi_sending) ||
|
||||
|
||||
@@ -593,11 +593,8 @@ bfad_im_vport_set_symbolic_name(struct fc_vport *fc_vport)
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&bfad->bfad_lock, flags);
|
||||
if (strlen(sym_name) > 0) {
|
||||
strcpy(fcs_vport->lport.port_cfg.sym_name.symname, sym_name);
|
||||
bfa_fcs_lport_ns_util_send_rspn_id(
|
||||
BFA_FCS_GET_NS_FROM_PORT((&fcs_vport->lport)), NULL);
|
||||
}
|
||||
if (strlen(sym_name) > 0)
|
||||
bfa_fcs_lport_set_symname(&fcs_vport->lport, sym_name);
|
||||
spin_unlock_irqrestore(&bfad->bfad_lock, flags);
|
||||
}
|
||||
|
||||
|
||||
@@ -4684,6 +4684,7 @@ static struct scsi_host_template gdth_template = {
|
||||
.cmd_per_lun = GDTH_MAXC_P_L,
|
||||
.unchecked_isa_dma = 1,
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.no_write_same = 1,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ISA
|
||||
|
||||
@@ -395,6 +395,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
|
||||
shost->use_clustering = sht->use_clustering;
|
||||
shost->ordered_tag = sht->ordered_tag;
|
||||
shost->eh_deadline = shost_eh_deadline * HZ;
|
||||
shost->no_write_same = sht->no_write_same;
|
||||
|
||||
if (sht->supported_mode == MODE_UNKNOWN)
|
||||
/* means we didn't set it ... default to INITIATOR */
|
||||
|
||||
+3
-2
@@ -561,6 +561,7 @@ static struct scsi_host_template hpsa_driver_template = {
|
||||
.sdev_attrs = hpsa_sdev_attrs,
|
||||
.shost_attrs = hpsa_shost_attrs,
|
||||
.max_sectors = 8192,
|
||||
.no_write_same = 1,
|
||||
};
|
||||
|
||||
|
||||
@@ -1288,7 +1289,7 @@ static void complete_scsi_command(struct CommandList *cp)
|
||||
"has check condition: aborted command: "
|
||||
"ASC: 0x%x, ASCQ: 0x%x\n",
|
||||
cp, asc, ascq);
|
||||
cmd->result = DID_SOFT_ERROR << 16;
|
||||
cmd->result |= DID_SOFT_ERROR << 16;
|
||||
break;
|
||||
}
|
||||
/* Must be some other type of check condition */
|
||||
@@ -4925,7 +4926,7 @@ reinit_after_soft_reset:
|
||||
hpsa_hba_inquiry(h);
|
||||
hpsa_register_scsi(h); /* hook ourselves into SCSI subsystem */
|
||||
start_controller_lockup_detector(h);
|
||||
return 1;
|
||||
return 0;
|
||||
|
||||
clean4:
|
||||
hpsa_free_sg_chain_blocks(h);
|
||||
|
||||
+2
-1
@@ -6305,7 +6305,8 @@ static struct scsi_host_template driver_template = {
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.shost_attrs = ipr_ioa_attrs,
|
||||
.sdev_attrs = ipr_dev_attrs,
|
||||
.proc_name = IPR_NAME
|
||||
.proc_name = IPR_NAME,
|
||||
.no_write_same = 1,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -374,6 +374,7 @@ static struct scsi_host_template ips_driver_template = {
|
||||
.sg_tablesize = IPS_MAX_SG,
|
||||
.cmd_per_lun = 3,
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.no_write_same = 1,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc)
|
||||
qc->tf.nsect = 0;
|
||||
}
|
||||
|
||||
ata_tf_to_fis(&qc->tf, 1, 0, (u8*)&task->ata_task.fis);
|
||||
ata_tf_to_fis(&qc->tf, qc->dev->link->pmp, 1, (u8 *)&task->ata_task.fis);
|
||||
task->uldd_task = qc;
|
||||
if (ata_is_atapi(qc->tf.protocol)) {
|
||||
memcpy(task->ata_task.atapi_packet, qc->cdb, qc->dev->cdb_len);
|
||||
|
||||
@@ -4244,6 +4244,7 @@ static struct scsi_host_template megaraid_template = {
|
||||
.eh_device_reset_handler = megaraid_reset,
|
||||
.eh_bus_reset_handler = megaraid_reset,
|
||||
.eh_host_reset_handler = megaraid_reset,
|
||||
.no_write_same = 1,
|
||||
};
|
||||
|
||||
static int
|
||||
|
||||
@@ -367,6 +367,7 @@ static struct scsi_host_template megaraid_template_g = {
|
||||
.eh_host_reset_handler = megaraid_reset_handler,
|
||||
.change_queue_depth = megaraid_change_queue_depth,
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.no_write_same = 1,
|
||||
.sdev_attrs = megaraid_sdev_attrs,
|
||||
.shost_attrs = megaraid_shost_attrs,
|
||||
};
|
||||
|
||||
@@ -2148,6 +2148,7 @@ static struct scsi_host_template megasas_template = {
|
||||
.bios_param = megasas_bios_param,
|
||||
.use_clustering = ENABLE_CLUSTERING,
|
||||
.change_queue_depth = megasas_change_queue_depth,
|
||||
.no_write_same = 1,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user