forked from luck/tmp_suning_uos_patched
SCSI fixes on 20170823
Six minor and error leg fixes, plus one major change: the reversion of scsi-mq as the default. We're doing the latter temporarily (with a backport to stable) to give us time to fix all the issues that turned up with this default before trying again. Signed-off-by: James E.J. Bottomley <jejb@linux.vnet.ibm.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABAgAGBQJZnSOUAAoJEAVr7HOZEZN4W/4QAJ4YCDZaS1QH2Yud7IpPA/tb 1A9r5YY0KDqqONiha4u2NbKiCQDr+RupA+r5ZdlO4upFk7ilV4d90EwCbl4L10HL 4wXAhedO8LXcz4bmAx9xWrBD6JXfG92H4UnM3ciWOhNV5eW4e4t3IikxWeYnZBuM uLNwSIMVKMvz5VXZmItDny0izFjcWbfYIld/7wXSX+naOx5Z1ianeURj7S3kpapb 54olbUjSQfzW325gFRbyvXa78uWVfRmY7wF2KyMBv5DrrJz0mEAEGN84NzGPcOwR bcHhYRDUNzF1eODRWjtw5lHu+mngtEWILbw3uIjLEuJXnox9cSGgrd+AK96sEuKr teahjszEsN93MORDafllZylreGdWn+G/DJnF+b6CGKY0h4XsEX/rFIAmvF06hMc/ pBemzjIUJQgXXzMBtPTzciNvYxOAFe4JVrY8AB6FTuvJY6F90HPA71bnmDUnvjhl wrysqtuSTJoFlCgnO0e0i2koPnxNmuImKoln3VjpDNeW3rBBMJlcMtWueegbOHUh r5Xc/HQZ2L/8ihB0oqPpnwYmD2czpkldMmEiRMvhJ/f89RxaPub4tmFndbiW8gxs 5wZxFDkN9Fi/+MCjDUZQ2dMfubWmwRpPXm0MWyUQ4rG8+bM+17yci7Be1TGPwQMA Ito9txXbsdMSE6fTgtk7 =aB/i -----END PGP SIGNATURE----- Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Six minor and error leg fixes, plus one major change: the reversion of scsi-mq as the default. We're doing the latter temporarily (with a backport to stable) to give us time to fix all the issues that turned up with this default before trying again" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: cxgb4i: call neigh_event_send() to update MAC address Revert "scsi: default to scsi-mq" scsi: sd_zbc: Write unlock zone from sd_uninit_cmnd() scsi: aacraid: Fix out of bounds in aac_get_name_resp scsi: csiostor: fail probe if fw does not support FCoE scsi: megaraid_sas: fix error handle in megasas_probe_one
This commit is contained in:
commit
55652400fd
|
@ -47,6 +47,17 @@ config SCSI_NETLINK
|
|||
default n
|
||||
depends on NET
|
||||
|
||||
config SCSI_MQ_DEFAULT
|
||||
bool "SCSI: use blk-mq I/O path by default"
|
||||
depends on SCSI
|
||||
---help---
|
||||
This option enables the new blk-mq based I/O path for SCSI
|
||||
devices by default. With the option the scsi_mod.use_blk_mq
|
||||
module/boot option defaults to Y, without it to N, but it can
|
||||
still be overridden either way.
|
||||
|
||||
If unsure say N.
|
||||
|
||||
config SCSI_PROC_FS
|
||||
bool "legacy /proc/scsi/ support"
|
||||
depends on SCSI && PROC_FS
|
||||
|
|
|
@ -549,7 +549,9 @@ static void get_container_name_callback(void *context, struct fib * fibptr)
|
|||
if ((le32_to_cpu(get_name_reply->status) == CT_OK)
|
||||
&& (get_name_reply->data[0] != '\0')) {
|
||||
char *sp = get_name_reply->data;
|
||||
sp[sizeof(((struct aac_get_name_resp *)NULL)->data)] = '\0';
|
||||
int data_size = FIELD_SIZEOF(struct aac_get_name_resp, data);
|
||||
|
||||
sp[data_size - 1] = '\0';
|
||||
while (*sp == ' ')
|
||||
++sp;
|
||||
if (*sp) {
|
||||
|
@ -579,12 +581,15 @@ static void get_container_name_callback(void *context, struct fib * fibptr)
|
|||
static int aac_get_container_name(struct scsi_cmnd * scsicmd)
|
||||
{
|
||||
int status;
|
||||
int data_size;
|
||||
struct aac_get_name *dinfo;
|
||||
struct fib * cmd_fibcontext;
|
||||
struct aac_dev * dev;
|
||||
|
||||
dev = (struct aac_dev *)scsicmd->device->host->hostdata;
|
||||
|
||||
data_size = FIELD_SIZEOF(struct aac_get_name_resp, data);
|
||||
|
||||
cmd_fibcontext = aac_fib_alloc_tag(dev, scsicmd);
|
||||
|
||||
aac_fib_init(cmd_fibcontext);
|
||||
|
@ -593,7 +598,7 @@ static int aac_get_container_name(struct scsi_cmnd * scsicmd)
|
|||
dinfo->command = cpu_to_le32(VM_ContainerConfig);
|
||||
dinfo->type = cpu_to_le32(CT_READ_NAME);
|
||||
dinfo->cid = cpu_to_le32(scmd_id(scsicmd));
|
||||
dinfo->count = cpu_to_le32(sizeof(((struct aac_get_name_resp *)NULL)->data));
|
||||
dinfo->count = cpu_to_le32(data_size - 1);
|
||||
|
||||
status = aac_fib_send(ContainerCommand,
|
||||
cmd_fibcontext,
|
||||
|
|
|
@ -2274,7 +2274,7 @@ struct aac_get_name_resp {
|
|||
__le32 parm3;
|
||||
__le32 parm4;
|
||||
__le32 parm5;
|
||||
u8 data[16];
|
||||
u8 data[17];
|
||||
};
|
||||
|
||||
#define CT_CID_TO_32BITS_UID 165
|
||||
|
|
|
@ -3845,8 +3845,10 @@ csio_hw_start(struct csio_hw *hw)
|
|||
|
||||
if (csio_is_hw_ready(hw))
|
||||
return 0;
|
||||
else
|
||||
else if (csio_match_state(hw, csio_hws_uninit))
|
||||
return -EINVAL;
|
||||
else
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -969,10 +969,14 @@ static int csio_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
|
||||
pci_set_drvdata(pdev, hw);
|
||||
|
||||
if (csio_hw_start(hw) != 0) {
|
||||
dev_err(&pdev->dev,
|
||||
"Failed to start FW, continuing in debug mode.\n");
|
||||
return 0;
|
||||
rv = csio_hw_start(hw);
|
||||
if (rv) {
|
||||
if (rv == -EINVAL) {
|
||||
dev_err(&pdev->dev,
|
||||
"Failed to start FW, continuing in debug mode.\n");
|
||||
return 0;
|
||||
}
|
||||
goto err_lnode_exit;
|
||||
}
|
||||
|
||||
sprintf(hw->fwrev_str, "%u.%u.%u.%u\n",
|
||||
|
|
|
@ -1635,6 +1635,9 @@ static int init_act_open(struct cxgbi_sock *csk)
|
|||
goto rel_resource;
|
||||
}
|
||||
|
||||
if (!(n->nud_state & NUD_VALID))
|
||||
neigh_event_send(n, NULL);
|
||||
|
||||
csk->atid = cxgb4_alloc_atid(lldi->tids, csk);
|
||||
if (csk->atid < 0) {
|
||||
pr_err("%s, NO atid available.\n", ndev->name);
|
||||
|
|
|
@ -6228,8 +6228,8 @@ static int megasas_probe_one(struct pci_dev *pdev,
|
|||
fail_start_aen:
|
||||
fail_io_attach:
|
||||
megasas_mgmt_info.count--;
|
||||
megasas_mgmt_info.instance[megasas_mgmt_info.max_index] = NULL;
|
||||
megasas_mgmt_info.max_index--;
|
||||
megasas_mgmt_info.instance[megasas_mgmt_info.max_index] = NULL;
|
||||
|
||||
instance->instancet->disable_intr(instance);
|
||||
megasas_destroy_irqs(instance);
|
||||
|
|
|
@ -800,7 +800,11 @@ MODULE_LICENSE("GPL");
|
|||
module_param(scsi_logging_level, int, S_IRUGO|S_IWUSR);
|
||||
MODULE_PARM_DESC(scsi_logging_level, "a bit mask of logging levels");
|
||||
|
||||
#ifdef CONFIG_SCSI_MQ_DEFAULT
|
||||
bool scsi_use_blk_mq = true;
|
||||
#else
|
||||
bool scsi_use_blk_mq = false;
|
||||
#endif
|
||||
module_param_named(use_blk_mq, scsi_use_blk_mq, bool, S_IWUSR | S_IRUGO);
|
||||
|
||||
static int __init init_scsi(void)
|
||||
|
|
|
@ -1277,6 +1277,9 @@ static void sd_uninit_command(struct scsi_cmnd *SCpnt)
|
|||
{
|
||||
struct request *rq = SCpnt->request;
|
||||
|
||||
if (SCpnt->flags & SCMD_ZONE_WRITE_LOCK)
|
||||
sd_zbc_write_unlock_zone(SCpnt);
|
||||
|
||||
if (rq->rq_flags & RQF_SPECIAL_PAYLOAD)
|
||||
__free_page(rq->special_vec.bv_page);
|
||||
|
||||
|
|
|
@ -294,6 +294,9 @@ int sd_zbc_write_lock_zone(struct scsi_cmnd *cmd)
|
|||
test_and_set_bit(zno, sdkp->zones_wlock))
|
||||
return BLKPREP_DEFER;
|
||||
|
||||
WARN_ON_ONCE(cmd->flags & SCMD_ZONE_WRITE_LOCK);
|
||||
cmd->flags |= SCMD_ZONE_WRITE_LOCK;
|
||||
|
||||
return BLKPREP_OK;
|
||||
}
|
||||
|
||||
|
@ -302,9 +305,10 @@ void sd_zbc_write_unlock_zone(struct scsi_cmnd *cmd)
|
|||
struct request *rq = cmd->request;
|
||||
struct scsi_disk *sdkp = scsi_disk(rq->rq_disk);
|
||||
|
||||
if (sdkp->zones_wlock) {
|
||||
if (sdkp->zones_wlock && cmd->flags & SCMD_ZONE_WRITE_LOCK) {
|
||||
unsigned int zno = sd_zbc_zone_no(sdkp, blk_rq_pos(rq));
|
||||
WARN_ON_ONCE(!test_bit(zno, sdkp->zones_wlock));
|
||||
cmd->flags &= ~SCMD_ZONE_WRITE_LOCK;
|
||||
clear_bit_unlock(zno, sdkp->zones_wlock);
|
||||
smp_mb__after_atomic();
|
||||
}
|
||||
|
@ -335,9 +339,6 @@ void sd_zbc_complete(struct scsi_cmnd *cmd,
|
|||
case REQ_OP_WRITE_ZEROES:
|
||||
case REQ_OP_WRITE_SAME:
|
||||
|
||||
/* Unlock the zone */
|
||||
sd_zbc_write_unlock_zone(cmd);
|
||||
|
||||
if (result &&
|
||||
sshdr->sense_key == ILLEGAL_REQUEST &&
|
||||
sshdr->asc == 0x21)
|
||||
|
|
|
@ -57,6 +57,7 @@ struct scsi_pointer {
|
|||
/* for scmd->flags */
|
||||
#define SCMD_TAGGED (1 << 0)
|
||||
#define SCMD_UNCHECKED_ISA_DMA (1 << 1)
|
||||
#define SCMD_ZONE_WRITE_LOCK (1 << 2)
|
||||
|
||||
struct scsi_cmnd {
|
||||
struct scsi_request req;
|
||||
|
|
Loading…
Reference in New Issue
Block a user