Skip to content

Commit 0aa78d1

Browse files
committed
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley: "Three minor fixes, all in drivers" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: mpt3sas: Fix incorrectly assigned error return and check scsi: storvsc: Log TEST_UNIT_READY errors as warnings scsi: lpfc: Move initialization of phba->poll_list earlier to avoid crash
2 parents 7ba34c0 + 40d3272 commit 0aa78d1

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

drivers/scsi/lpfc/lpfc_init.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13193,6 +13193,8 @@ lpfc_pci_probe_one_s4(struct pci_dev *pdev, const struct pci_device_id *pid)
1319313193
if (!phba)
1319413194
return -ENOMEM;
1319513195

13196+
INIT_LIST_HEAD(&phba->poll_list);
13197+
1319613198
/* Perform generic PCI device enabling operation */
1319713199
error = lpfc_enable_pci_dev(phba);
1319813200
if (error)
@@ -13327,7 +13329,6 @@ lpfc_pci_probe_one_s4(struct pci_dev *pdev, const struct pci_device_id *pid)
1332713329
/* Enable RAS FW log support */
1332813330
lpfc_sli4_ras_setup(phba);
1332913331

13330-
INIT_LIST_HEAD(&phba->poll_list);
1333113332
timer_setup(&phba->cpuhp_poll_timer, lpfc_sli4_poll_hbtimer, 0);
1333213333
cpuhp_state_add_instance_nocalls(lpfc_cpuhp_state, &phba->cpuhp);
1333313334

drivers/scsi/mpt3sas/mpt3sas_base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7851,7 +7851,7 @@ _base_make_ioc_operational(struct MPT3SAS_ADAPTER *ioc)
78517851
return r;
78527852
}
78537853

7854-
rc = _base_static_config_pages(ioc);
7854+
r = _base_static_config_pages(ioc);
78557855
if (r)
78567856
return r;
78577857

drivers/scsi/storvsc_drv.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,14 +1199,24 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device,
11991199
vstor_packet->vm_srb.sense_info_length);
12001200

12011201
if (vstor_packet->vm_srb.scsi_status != 0 ||
1202-
vstor_packet->vm_srb.srb_status != SRB_STATUS_SUCCESS)
1203-
storvsc_log(device, STORVSC_LOGGING_ERROR,
1202+
vstor_packet->vm_srb.srb_status != SRB_STATUS_SUCCESS) {
1203+
1204+
/*
1205+
* Log TEST_UNIT_READY errors only as warnings. Hyper-V can
1206+
* return errors when detecting devices using TEST_UNIT_READY,
1207+
* and logging these as errors produces unhelpful noise.
1208+
*/
1209+
int loglevel = (stor_pkt->vm_srb.cdb[0] == TEST_UNIT_READY) ?
1210+
STORVSC_LOGGING_WARN : STORVSC_LOGGING_ERROR;
1211+
1212+
storvsc_log(device, loglevel,
12041213
"tag#%d cmd 0x%x status: scsi 0x%x srb 0x%x hv 0x%x\n",
12051214
request->cmd->request->tag,
12061215
stor_pkt->vm_srb.cdb[0],
12071216
vstor_packet->vm_srb.scsi_status,
12081217
vstor_packet->vm_srb.srb_status,
12091218
vstor_packet->status);
1219+
}
12101220

12111221
if (vstor_packet->vm_srb.scsi_status == SAM_STAT_CHECK_CONDITION &&
12121222
(vstor_packet->vm_srb.srb_status & SRB_STATUS_AUTOSENSE_VALID))

0 commit comments

Comments
 (0)