Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI updates from James Bottomley:
"Final round of fixes that came in too late to send in the first
request.

It's nine bug fixes and one version update (because of a bug fix) and
one set of PCI ID additions. There's one bug fix in the core which is
really a one liner (except that an additional sdev pointer was added
for convenience) and the rest are in drivers"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: target: core: Add TMF to tmr_list handling
scsi: core: Kick the requeue list after inserting when flushing
scsi: fnic: unlock on error path in fnic_queuecommand()
scsi: fcoe: Fix unsigned comparison with zero in store_ctlr_mode()
scsi: mpi3mr: Fix mpi3mr_fw.c kernel-doc warnings
scsi: smartpqi: Bump driver version to 2.1.26-030
scsi: smartpqi: Fix logical volume rescan race condition
scsi: smartpqi: Add new controller PCI IDs
scsi: ufs: qcom: Remove unnecessary goto statement from ufs_qcom_config_esi()
scsi: ufs: core: Remove the ufshcd_hba_exit() call from ufshcd_async_scan()
scsi: ufs: core: Simplify power management during async scan

+103 -39
+4 -2
drivers/scsi/fcoe/fcoe_sysfs.c
··· 263 263 const char *buf, size_t count) 264 264 { 265 265 struct fcoe_ctlr_device *ctlr = dev_to_ctlr(dev); 266 + int res; 266 267 267 268 if (count > FCOE_MAX_MODENAME_LEN) 268 269 return -EINVAL; ··· 280 279 return -ENOTSUPP; 281 280 } 282 281 283 - ctlr->mode = sysfs_match_string(fip_conn_type_names, buf); 284 - if (ctlr->mode < 0 || ctlr->mode == FIP_CONN_TYPE_UNKNOWN) { 282 + res = sysfs_match_string(fip_conn_type_names, buf); 283 + if (res < 0 || res == FIP_CONN_TYPE_UNKNOWN) { 285 284 LIBFCOE_SYSFS_DBG(ctlr, "Unknown mode %s provided.\n", 286 285 buf); 287 286 return -EINVAL; 288 287 } 288 + ctlr->mode = res; 289 289 290 290 ctlr->f->set_fcoe_ctlr_mode(ctlr); 291 291 LIBFCOE_SYSFS_DBG(ctlr, "Mode changed to %s.\n", buf);
+1
drivers/scsi/fnic/fnic_scsi.c
··· 546 546 if (fnic->sw_copy_wq[hwq].io_req_table[blk_mq_unique_tag_to_tag(mqtag)] != NULL) { 547 547 WARN(1, "fnic<%d>: %s: hwq: %d tag 0x%x already exists\n", 548 548 fnic->fnic_num, __func__, hwq, blk_mq_unique_tag_to_tag(mqtag)); 549 + spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags); 549 550 return SCSI_MLQUEUE_HOST_BUSY; 550 551 } 551 552
+2 -4
drivers/scsi/mpi3mr/mpi3mr_fw.c
··· 475 475 * @op_reply_q: op_reply_qinfo object 476 476 * @reply_ci: operational reply descriptor's queue consumer index 477 477 * 478 - * Returns reply descriptor frame address 478 + * Returns: reply descriptor frame address 479 479 */ 480 480 static inline struct mpi3_default_reply_descriptor * 481 481 mpi3mr_get_reply_desc(struct op_reply_qinfo *op_reply_q, u32 reply_ci) ··· 1063 1063 * @mrioc: Adapter instance reference 1064 1064 * 1065 1065 * Free the DMA memory allocated for IOCTL handling purpose. 1066 - 1067 1066 * 1068 1067 * Return: None 1069 1068 */ ··· 1105 1106 /** 1106 1107 * mpi3mr_alloc_ioctl_dma_memory - Alloc memory for ioctl dma 1107 1108 * @mrioc: Adapter instance reference 1108 - 1109 1109 * 1110 1110 * This function allocates dmaable memory required to handle the 1111 1111 * application issued MPI3 IOCTL requests. ··· 1239 1241 * during reset/resume 1240 1242 * @mrioc: Adapter instance reference 1241 1243 * 1242 - * Return zero if the new IOCFacts parameters value is compatible with 1244 + * Return: zero if the new IOCFacts parameters value is compatible with 1243 1245 * older values else return -EPERM 1244 1246 */ 1245 1247 static int
+6 -3
drivers/scsi/scsi_error.c
··· 2197 2197 struct scsi_cmnd *scmd, *next; 2198 2198 2199 2199 list_for_each_entry_safe(scmd, next, done_q, eh_entry) { 2200 + struct scsi_device *sdev = scmd->device; 2201 + 2200 2202 list_del_init(&scmd->eh_entry); 2201 - if (scsi_device_online(scmd->device) && 2202 - !scsi_noretry_cmd(scmd) && scsi_cmd_retry_allowed(scmd) && 2203 - scsi_eh_should_retry_cmd(scmd)) { 2203 + if (scsi_device_online(sdev) && !scsi_noretry_cmd(scmd) && 2204 + scsi_cmd_retry_allowed(scmd) && 2205 + scsi_eh_should_retry_cmd(scmd)) { 2204 2206 SCSI_LOG_ERROR_RECOVERY(3, 2205 2207 scmd_printk(KERN_INFO, scmd, 2206 2208 "%s: flush retry cmd\n", 2207 2209 current->comm)); 2208 2210 scsi_queue_insert(scmd, SCSI_MLQUEUE_EH_RETRY); 2211 + blk_mq_kick_requeue_list(sdev->request_queue); 2209 2212 } else { 2210 2213 /* 2211 2214 * If just we got sense for the device (called
-1
drivers/scsi/smartpqi/smartpqi.h
··· 1347 1347 bool controller_online; 1348 1348 bool block_requests; 1349 1349 bool scan_blocked; 1350 - u8 logical_volume_rescan_needed : 1; 1351 1350 u8 inbound_spanning_supported : 1; 1352 1351 u8 outbound_spanning_supported : 1; 1353 1352 u8 pqi_mode_enabled : 1;
+79 -10
drivers/scsi/smartpqi/smartpqi_init.c
··· 33 33 #define BUILD_TIMESTAMP 34 34 #endif 35 35 36 - #define DRIVER_VERSION "2.1.24-046" 36 + #define DRIVER_VERSION "2.1.26-030" 37 37 #define DRIVER_MAJOR 2 38 38 #define DRIVER_MINOR 1 39 - #define DRIVER_RELEASE 24 40 - #define DRIVER_REVISION 46 39 + #define DRIVER_RELEASE 26 40 + #define DRIVER_REVISION 30 41 41 42 42 #define DRIVER_NAME "Microchip SmartPQI Driver (v" \ 43 43 DRIVER_VERSION BUILD_TIMESTAMP ")" ··· 2093 2093 if (existing_device->devtype == TYPE_DISK) { 2094 2094 existing_device->raid_level = new_device->raid_level; 2095 2095 existing_device->volume_status = new_device->volume_status; 2096 - if (ctrl_info->logical_volume_rescan_needed) 2097 - existing_device->rescan = true; 2098 2096 memset(existing_device->next_bypass_group, 0, sizeof(existing_device->next_bypass_group)); 2099 2097 if (!pqi_raid_maps_equal(existing_device->raid_map, new_device->raid_map)) { 2100 2098 kfree(existing_device->raid_map); ··· 2160 2162 2161 2163 for (lun = 0, tmf_work = device->tmf_work; lun < PQI_MAX_LUNS_PER_DEVICE; lun++, tmf_work++) 2162 2164 INIT_WORK(&tmf_work->work_struct, pqi_tmf_worker); 2165 + } 2166 + 2167 + static inline bool pqi_volume_rescan_needed(struct pqi_scsi_dev *device) 2168 + { 2169 + if (pqi_device_in_remove(device)) 2170 + return false; 2171 + 2172 + if (device->sdev == NULL) 2173 + return false; 2174 + 2175 + if (!scsi_device_online(device->sdev)) 2176 + return false; 2177 + 2178 + return device->rescan; 2163 2179 } 2164 2180 2165 2181 static void pqi_update_device_list(struct pqi_ctrl_info *ctrl_info, ··· 2296 2284 if (device->sdev && device->queue_depth != device->advertised_queue_depth) { 2297 2285 device->advertised_queue_depth = device->queue_depth; 2298 2286 scsi_change_queue_depth(device->sdev, device->advertised_queue_depth); 2299 - if (device->rescan) { 2300 - scsi_rescan_device(device->sdev); 2287 + spin_lock_irqsave(&ctrl_info->scsi_device_list_lock, flags); 2288 + if (pqi_volume_rescan_needed(device)) { 2301 2289 device->rescan = false; 2290 + spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags); 2291 + scsi_rescan_device(device->sdev); 2292 + } else { 2293 + spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags); 2302 2294 } 2303 2295 } 2304 2296 } ··· 2323 2307 } 2324 2308 } 2325 2309 } 2326 - 2327 - ctrl_info->logical_volume_rescan_needed = false; 2328 2310 2329 2311 } 2330 2312 ··· 3716 3702 return ack_event; 3717 3703 } 3718 3704 3705 + static void pqi_mark_volumes_for_rescan(struct pqi_ctrl_info *ctrl_info) 3706 + { 3707 + unsigned long flags; 3708 + struct pqi_scsi_dev *device; 3709 + 3710 + spin_lock_irqsave(&ctrl_info->scsi_device_list_lock, flags); 3711 + 3712 + list_for_each_entry(device, &ctrl_info->scsi_device_list, scsi_device_list_entry) { 3713 + if (pqi_is_logical_device(device) && device->devtype == TYPE_DISK) 3714 + device->rescan = true; 3715 + } 3716 + 3717 + spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags); 3718 + } 3719 + 3719 3720 static void pqi_disable_raid_bypass(struct pqi_ctrl_info *ctrl_info) 3720 3721 { 3721 3722 unsigned long flags; ··· 3771 3742 ack_event = true; 3772 3743 rescan_needed = true; 3773 3744 if (event->event_type == PQI_EVENT_TYPE_LOGICAL_DEVICE) 3774 - ctrl_info->logical_volume_rescan_needed = true; 3745 + pqi_mark_volumes_for_rescan(ctrl_info); 3775 3746 else if (event->event_type == PQI_EVENT_TYPE_AIO_STATE_CHANGE) 3776 3747 pqi_disable_raid_bypass(ctrl_info); 3777 3748 } ··· 10173 10144 }, 10174 10145 { 10175 10146 PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 10147 + 0x1137, 0x02f8) 10148 + }, 10149 + { 10150 + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 10151 + 0x1137, 0x02f9) 10152 + }, 10153 + { 10154 + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 10155 + 0x1137, 0x02fa) 10156 + }, 10157 + { 10158 + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 10176 10159 0x1e93, 0x1000) 10177 10160 }, 10178 10161 { ··· 10238 10197 { 10239 10198 PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 10240 10199 0x1f51, 0x100a) 10200 + }, 10201 + { 10202 + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 10203 + 0x1f51, 0x100e) 10204 + }, 10205 + { 10206 + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 10207 + 0x1f51, 0x100f) 10208 + }, 10209 + { 10210 + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 10211 + 0x1f51, 0x1010) 10212 + }, 10213 + { 10214 + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 10215 + 0x1f51, 0x1011) 10216 + }, 10217 + { 10218 + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 10219 + 0x1f51, 0x1043) 10220 + }, 10221 + { 10222 + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 10223 + 0x1f51, 0x1044) 10224 + }, 10225 + { 10226 + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, 10227 + 0x1f51, 0x1045) 10241 10228 }, 10242 10229 { 10243 10230 PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
-5
drivers/target/target_core_device.c
··· 147 147 struct se_session *se_sess = se_cmd->se_sess; 148 148 struct se_node_acl *nacl = se_sess->se_node_acl; 149 149 struct se_tmr_req *se_tmr = se_cmd->se_tmr_req; 150 - unsigned long flags; 151 150 152 151 rcu_read_lock(); 153 152 deve = target_nacl_find_deve(nacl, se_cmd->orig_fe_lun); ··· 176 177 } 177 178 se_cmd->se_dev = rcu_dereference_raw(se_lun->lun_se_dev); 178 179 se_tmr->tmr_dev = rcu_dereference_raw(se_lun->lun_se_dev); 179 - 180 - spin_lock_irqsave(&se_tmr->tmr_dev->se_tmr_lock, flags); 181 - list_add_tail(&se_tmr->tmr_list, &se_tmr->tmr_dev->dev_tmr_list); 182 - spin_unlock_irqrestore(&se_tmr->tmr_dev->se_tmr_lock, flags); 183 180 184 181 return 0; 185 182 }
+4
drivers/target/target_core_transport.c
··· 3629 3629 unsigned long flags; 3630 3630 bool aborted = false; 3631 3631 3632 + spin_lock_irqsave(&cmd->se_dev->se_tmr_lock, flags); 3633 + list_add_tail(&cmd->se_tmr_req->tmr_list, &cmd->se_dev->dev_tmr_list); 3634 + spin_unlock_irqrestore(&cmd->se_dev->se_tmr_lock, flags); 3635 + 3632 3636 spin_lock_irqsave(&cmd->t_state_lock, flags); 3633 3637 if (cmd->transport_state & CMD_T_ABORTED) { 3634 3638 aborted = true;
+5 -9
drivers/ufs/core/ufshcd.c
··· 8725 8725 8726 8726 ufs_bsg_probe(hba); 8727 8727 scsi_scan_host(hba->host); 8728 - pm_runtime_put_sync(hba->dev); 8729 8728 8730 8729 out: 8731 8730 return ret; ··· 8993 8994 8994 8995 /* Probe and add UFS logical units */ 8995 8996 ret = ufshcd_add_lus(hba); 8997 + 8996 8998 out: 8997 - /* 8998 - * If we failed to initialize the device or the device is not 8999 - * present, turn off the power/clocks etc. 9000 - */ 9001 - if (ret) { 9002 - pm_runtime_put_sync(hba->dev); 9003 - ufshcd_hba_exit(hba); 9004 - } 8999 + pm_runtime_put_sync(hba->dev); 9000 + 9001 + if (ret) 9002 + dev_err(hba->dev, "%s failed: %d\n", __func__, ret); 9005 9003 } 9006 9004 9007 9005 static enum scsi_timeout_action ufshcd_eh_timed_out(struct scsi_cmnd *scmd)
+2 -5
drivers/ufs/host/ufs-qcom.c
··· 1716 1716 ufs_qcom_write_msi_msg); 1717 1717 if (ret) { 1718 1718 dev_err(hba->dev, "Failed to request Platform MSI %d\n", ret); 1719 - goto out; 1719 + return ret; 1720 1720 } 1721 1721 1722 1722 msi_lock_descs(hba->dev); ··· 1750 1750 FIELD_PREP(ESI_VEC_MASK, MAX_ESI_VEC - 1), 1751 1751 REG_UFS_CFG3); 1752 1752 ufshcd_mcq_enable_esi(hba); 1753 - } 1754 - 1755 - out: 1756 - if (!ret) 1757 1753 host->esi_enabled = true; 1754 + } 1758 1755 1759 1756 return ret; 1760 1757 }