Skip to content

Commit 5d766d5

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: "One core fix for an oops which can occur if the error handling thread fails to start for some reason and the driver is removed. The other fixes are all minor ones in drivers" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: core: Add missing host_lock in ufshcd_vops_setup_xfer_req() scsi: mpi3mr: Fix W=1 compilation warnings scsi: pm8001: Clean up kernel-doc and comments scsi: zfcp: Report port fc_security as unknown early during remote cable pull scsi: core: Fix bad pointer dereference when ehandler kthread is invalid scsi: fas216: Fix a build error scsi: core: Fix the documentation of the scsi_execute() time parameter
2 parents 44cb60b + 053c16a commit 5d766d5

File tree

11 files changed

+115
-101
lines changed

11 files changed

+115
-101
lines changed

drivers/s390/scsi/zfcp_sysfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,7 @@ static ssize_t zfcp_sysfs_port_fc_security_show(struct device *dev,
487487
if (0 == (status & ZFCP_STATUS_COMMON_OPEN) ||
488488
0 == (status & ZFCP_STATUS_COMMON_UNBLOCKED) ||
489489
0 == (status & ZFCP_STATUS_PORT_PHYS_OPEN) ||
490+
0 != (status & ZFCP_STATUS_PORT_LINK_TEST) ||
490491
0 != (status & ZFCP_STATUS_COMMON_ERP_FAILED) ||
491492
0 != (status & ZFCP_STATUS_COMMON_ACCESS_BOXED))
492493
i = sprintf(buf, "unknown\n");

drivers/scsi/arm/fas216.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2010,7 +2010,7 @@ static void fas216_rq_sns_done(FAS216_Info *info, struct scsi_cmnd *SCpnt,
20102010
"request sense complete, result=0x%04x%02x%02x",
20112011
result, SCpnt->SCp.Message, SCpnt->SCp.Status);
20122012

2013-
if (result != DID_OK || SCpnt->SCp.Status != GOOD)
2013+
if (result != DID_OK || SCpnt->SCp.Status != SAM_STAT_GOOD)
20142014
/*
20152015
* Something went wrong. Make sure that we don't
20162016
* have valid data in the sense buffer that could

drivers/scsi/hosts.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
488488
shost_printk(KERN_WARNING, shost,
489489
"error handler thread failed to spawn, error = %ld\n",
490490
PTR_ERR(shost->ehandler));
491+
shost->ehandler = NULL;
491492
goto fail;
492493
}
493494

drivers/scsi/mpi3mr/mpi3mr_fw.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2607,14 +2607,13 @@ static int mpi3mr_issue_iocinit(struct mpi3mr_ioc *mrioc)
26072607
goto out;
26082608
}
26092609
drv_info->information_length = cpu_to_le32(data_len);
2610-
strncpy(drv_info->driver_signature, "Broadcom", sizeof(drv_info->driver_signature));
2611-
strncpy(drv_info->os_name, utsname()->sysname, sizeof(drv_info->os_name));
2612-
drv_info->os_name[sizeof(drv_info->os_name) - 1] = 0;
2613-
strncpy(drv_info->os_version, utsname()->release, sizeof(drv_info->os_version));
2614-
drv_info->os_version[sizeof(drv_info->os_version) - 1] = 0;
2615-
strncpy(drv_info->driver_name, MPI3MR_DRIVER_NAME, sizeof(drv_info->driver_name));
2616-
strncpy(drv_info->driver_version, MPI3MR_DRIVER_VERSION, sizeof(drv_info->driver_version));
2617-
strncpy(drv_info->driver_release_date, MPI3MR_DRIVER_RELDATE, sizeof(drv_info->driver_release_date));
2610+
strscpy(drv_info->driver_signature, "Broadcom", sizeof(drv_info->driver_signature));
2611+
strscpy(drv_info->os_name, utsname()->sysname, sizeof(drv_info->os_name));
2612+
strscpy(drv_info->os_version, utsname()->release, sizeof(drv_info->os_version));
2613+
strscpy(drv_info->driver_name, MPI3MR_DRIVER_NAME, sizeof(drv_info->driver_name));
2614+
strscpy(drv_info->driver_version, MPI3MR_DRIVER_VERSION, sizeof(drv_info->driver_version));
2615+
strscpy(drv_info->driver_release_date, MPI3MR_DRIVER_RELDATE,
2616+
sizeof(drv_info->driver_release_date));
26182617
drv_info->driver_capabilities = 0;
26192618
memcpy((u8 *)&mrioc->driver_info, (u8 *)drv_info,
26202619
sizeof(mrioc->driver_info));

drivers/scsi/pm8001/pm8001_ctl.c

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ DEVICE_ATTR(interface_rev, S_IRUGO, pm8001_ctl_mpi_interface_rev_show, NULL);
7777
* @attr: device attribute (unused)
7878
* @buf: the buffer returned
7979
*
80-
* A sysfs 'read only' shost attribute.
80+
* A sysfs 'read-only' shost attribute.
8181
*/
8282
static ssize_t controller_fatal_error_show(struct device *cdev,
8383
struct device_attribute *attr, char *buf)
@@ -149,7 +149,7 @@ static ssize_t pm8001_ctl_ila_version_show(struct device *cdev,
149149
static DEVICE_ATTR(ila_version, 0444, pm8001_ctl_ila_version_show, NULL);
150150

151151
/**
152-
* pm8001_ctl_inactive_fw_version_show - Inacative firmware version number
152+
* pm8001_ctl_inactive_fw_version_show - Inactive firmware version number
153153
* @cdev: pointer to embedded class device
154154
* @attr: device attribute (unused)
155155
* @buf: the buffer returned
@@ -396,6 +396,7 @@ static DEVICE_ATTR(aap_log, S_IRUGO, pm8001_ctl_aap_log_show, NULL);
396396
* @cdev:pointer to embedded class device
397397
* @attr: device attribute (unused)
398398
* @buf: the buffer returned
399+
*
399400
* A sysfs 'read-only' shost attribute.
400401
*/
401402
static ssize_t pm8001_ctl_ib_queue_log_show(struct device *cdev,
@@ -430,6 +431,7 @@ static DEVICE_ATTR(ib_log, S_IRUGO, pm8001_ctl_ib_queue_log_show, NULL);
430431
* @cdev:pointer to embedded class device
431432
* @attr: device attribute (unused)
432433
* @buf: the buffer returned
434+
*
433435
* A sysfs 'read-only' shost attribute.
434436
*/
435437

@@ -464,6 +466,7 @@ static DEVICE_ATTR(ob_log, S_IRUGO, pm8001_ctl_ob_queue_log_show, NULL);
464466
* @cdev:pointer to embedded class device
465467
* @attr: device attribute (unused)
466468
* @buf:the buffer returned
469+
*
467470
* A sysfs 'read-only' shost attribute.
468471
*/
469472
static ssize_t pm8001_ctl_bios_version_show(struct device *cdev,
@@ -555,13 +558,13 @@ static ssize_t pm8001_ctl_iop_log_show(struct device *cdev,
555558
static DEVICE_ATTR(iop_log, S_IRUGO, pm8001_ctl_iop_log_show, NULL);
556559

557560
/**
558-
** pm8001_ctl_fatal_log_show - fatal error logging
559-
** @cdev:pointer to embedded class device
560-
** @attr: device attribute
561-
** @buf: the buffer returned
562-
**
563-
** A sysfs 'read-only' shost attribute.
564-
**/
561+
* pm8001_ctl_fatal_log_show - fatal error logging
562+
* @cdev:pointer to embedded class device
563+
* @attr: device attribute
564+
* @buf: the buffer returned
565+
*
566+
* A sysfs 'read-only' shost attribute.
567+
*/
565568

566569
static ssize_t pm8001_ctl_fatal_log_show(struct device *cdev,
567570
struct device_attribute *attr, char *buf)
@@ -575,13 +578,13 @@ static ssize_t pm8001_ctl_fatal_log_show(struct device *cdev,
575578
static DEVICE_ATTR(fatal_log, S_IRUGO, pm8001_ctl_fatal_log_show, NULL);
576579

577580
/**
578-
** non_fatal_log_show - non fatal error logging
579-
** @cdev:pointer to embedded class device
580-
** @attr: device attribute
581-
** @buf: the buffer returned
582-
**
583-
** A sysfs 'read-only' shost attribute.
584-
**/
581+
* non_fatal_log_show - non fatal error logging
582+
* @cdev:pointer to embedded class device
583+
* @attr: device attribute
584+
* @buf: the buffer returned
585+
*
586+
* A sysfs 'read-only' shost attribute.
587+
*/
585588
static ssize_t non_fatal_log_show(struct device *cdev,
586589
struct device_attribute *attr, char *buf)
587590
{
@@ -620,12 +623,13 @@ static ssize_t non_fatal_count_store(struct device *cdev,
620623
static DEVICE_ATTR_RW(non_fatal_count);
621624

622625
/**
623-
** pm8001_ctl_gsm_log_show - gsm dump collection
624-
** @cdev:pointer to embedded class device
625-
** @attr: device attribute (unused)
626-
** @buf: the buffer returned
627-
** A sysfs 'read-only' shost attribute.
628-
**/
626+
* pm8001_ctl_gsm_log_show - gsm dump collection
627+
* @cdev:pointer to embedded class device
628+
* @attr: device attribute (unused)
629+
* @buf: the buffer returned
630+
*
631+
* A sysfs 'read-only' shost attribute.
632+
*/
629633
static ssize_t pm8001_ctl_gsm_log_show(struct device *cdev,
630634
struct device_attribute *attr, char *buf)
631635
{

drivers/scsi/pm8001/pm8001_hwi.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ static void update_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha,
384384

385385
/**
386386
* pm8001_bar4_shift - function is called to shift BAR base address
387-
* @pm8001_ha : our hba card infomation
387+
* @pm8001_ha : our hba card information
388388
* @shiftValue : shifting value in memory bar.
389389
*/
390390
int pm8001_bar4_shift(struct pm8001_hba_info *pm8001_ha, u32 shiftValue)
@@ -1151,7 +1151,7 @@ static void pm8001_hw_chip_rst(struct pm8001_hba_info *pm8001_ha)
11511151
}
11521152

11531153
/**
1154-
* pm8001_chip_iounmap - which maped when initialized.
1154+
* pm8001_chip_iounmap - which mapped when initialized.
11551155
* @pm8001_ha: our hba card information
11561156
*/
11571157
void pm8001_chip_iounmap(struct pm8001_hba_info *pm8001_ha)
@@ -1187,10 +1187,10 @@ pm8001_chip_intx_interrupt_enable(struct pm8001_hba_info *pm8001_ha)
11871187
pm8001_cw32(pm8001_ha, 0, MSGU_ODCR, ODCR_CLEAR_ALL);
11881188
}
11891189

1190-
/**
1191-
* pm8001_chip_intx_interrupt_disable- disable PM8001 chip interrupt
1192-
* @pm8001_ha: our hba card information
1193-
*/
1190+
/**
1191+
* pm8001_chip_intx_interrupt_disable - disable PM8001 chip interrupt
1192+
* @pm8001_ha: our hba card information
1193+
*/
11941194
static void
11951195
pm8001_chip_intx_interrupt_disable(struct pm8001_hba_info *pm8001_ha)
11961196
{
@@ -1876,8 +1876,8 @@ static void pm8001_send_read_log(struct pm8001_hba_info *pm8001_ha,
18761876
* @piomb: the message contents of this outbound message.
18771877
*
18781878
* When FW has completed a ssp request for example a IO request, after it has
1879-
* filled the SG data with the data, it will trigger this event represent
1880-
* that he has finished the job,please check the coresponding buffer.
1879+
* filled the SG data with the data, it will trigger this event representing
1880+
* that he has finished the job; please check the corresponding buffer.
18811881
* So we will tell the caller who maybe waiting the result to tell upper layer
18821882
* that the task has been finished.
18831883
*/
@@ -3522,7 +3522,7 @@ hw_event_phy_down(struct pm8001_hba_info *pm8001_ha, void *piomb)
35223522
*
35233523
* when sas layer find a device it will notify LLDD, then the driver register
35243524
* the domain device to FW, this event is the return device ID which the FW
3525-
* has assigned, from now,inter-communication with FW is no longer using the
3525+
* has assigned, from now, inter-communication with FW is no longer using the
35263526
* SAS address, use device ID which FW assigned.
35273527
*/
35283528
int pm8001_mpi_reg_resp(struct pm8001_hba_info *pm8001_ha, void *piomb)

drivers/scsi/pm8001/pm8001_init.c

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ static irqreturn_t pm8001_interrupt_handler_msix(int irq, void *opaque)
233233
/**
234234
* pm8001_interrupt_handler_intx - main INTx interrupt handler.
235235
* @irq: interrupt number
236-
* @dev_id: sas_ha structure. The HBA is retrieved from sas_has structure.
236+
* @dev_id: sas_ha structure. The HBA is retrieved from sas_ha structure.
237237
*/
238238

239239
static irqreturn_t pm8001_interrupt_handler_intx(int irq, void *dev_id)
@@ -439,9 +439,9 @@ static int pm8001_alloc(struct pm8001_hba_info *pm8001_ha,
439439
}
440440

441441
/**
442-
* pm8001_ioremap - remap the pci high physical address to kernal virtual
442+
* pm8001_ioremap - remap the pci high physical address to kernel virtual
443443
* address so that we can access them.
444-
* @pm8001_ha:our hba structure.
444+
* @pm8001_ha: our hba structure.
445445
*/
446446
static int pm8001_ioremap(struct pm8001_hba_info *pm8001_ha)
447447
{
@@ -652,7 +652,7 @@ static void pm8001_post_sas_ha_init(struct Scsi_Host *shost,
652652
* pm8001_init_sas_add - initialize sas address
653653
* @pm8001_ha: our ha struct.
654654
*
655-
* Currently we just set the fixed SAS address to our HBA,for manufacture,
655+
* Currently we just set the fixed SAS address to our HBA, for manufacture,
656656
* it should read from the EEPROM
657657
*/
658658
static void pm8001_init_sas_add(struct pm8001_hba_info *pm8001_ha)
@@ -790,7 +790,7 @@ struct pm8001_mpi3_phy_pg_trx_config {
790790
};
791791

792792
/**
793-
* pm8001_get_internal_phy_settings : Retrieves the internal PHY settings
793+
* pm8001_get_internal_phy_settings - Retrieves the internal PHY settings
794794
* @pm8001_ha : our adapter
795795
* @phycfg : PHY config page to populate
796796
*/
@@ -810,7 +810,7 @@ void pm8001_get_internal_phy_settings(struct pm8001_hba_info *pm8001_ha,
810810
}
811811

812812
/**
813-
* pm8001_get_external_phy_settings : Retrieves the external PHY settings
813+
* pm8001_get_external_phy_settings - Retrieves the external PHY settings
814814
* @pm8001_ha : our adapter
815815
* @phycfg : PHY config page to populate
816816
*/
@@ -830,7 +830,7 @@ void pm8001_get_external_phy_settings(struct pm8001_hba_info *pm8001_ha,
830830
}
831831

832832
/**
833-
* pm8001_get_phy_mask : Retrieves the mask that denotes if a PHY is int/ext
833+
* pm8001_get_phy_mask - Retrieves the mask that denotes if a PHY is int/ext
834834
* @pm8001_ha : our adapter
835835
* @phymask : The PHY mask
836836
*/
@@ -868,7 +868,7 @@ void pm8001_get_phy_mask(struct pm8001_hba_info *pm8001_ha, int *phymask)
868868
}
869869

870870
/**
871-
* pm8001_set_phy_settings_ven_117c_12G() : Configure ATTO 12Gb PHY settings
871+
* pm8001_set_phy_settings_ven_117c_12G() - Configure ATTO 12Gb PHY settings
872872
* @pm8001_ha : our adapter
873873
*/
874874
static
@@ -903,7 +903,7 @@ int pm8001_set_phy_settings_ven_117c_12G(struct pm8001_hba_info *pm8001_ha)
903903
}
904904

905905
/**
906-
* pm8001_configure_phy_settings : Configures PHY settings based on vendor ID.
906+
* pm8001_configure_phy_settings - Configures PHY settings based on vendor ID.
907907
* @pm8001_ha : our hba.
908908
*/
909909
static int pm8001_configure_phy_settings(struct pm8001_hba_info *pm8001_ha)
@@ -1053,8 +1053,8 @@ static u32 pm8001_request_irq(struct pm8001_hba_info *pm8001_ha)
10531053
* @ent: pci device id
10541054
*
10551055
* This function is the main initialization function, when register a new
1056-
* pci driver it is invoked, all struct an hardware initilization should be done
1057-
* here, also, register interrupt
1056+
* pci driver it is invoked, all struct and hardware initialization should be
1057+
* done here, also, register interrupt.
10581058
*/
10591059
static int pm8001_pci_probe(struct pci_dev *pdev,
10601060
const struct pci_device_id *ent)
@@ -1172,10 +1172,11 @@ static int pm8001_pci_probe(struct pci_dev *pdev,
11721172
return rc;
11731173
}
11741174

1175-
/*
1175+
/**
11761176
* pm8001_init_ccb_tag - allocate memory to CCB and tag.
11771177
* @pm8001_ha: our hba card information.
11781178
* @shost: scsi host which has been allocated outside.
1179+
* @pdev: pci device.
11791180
*/
11801181
static int
11811182
pm8001_init_ccb_tag(struct pm8001_hba_info *pm8001_ha, struct Scsi_Host *shost,
@@ -1270,7 +1271,7 @@ static void pm8001_pci_remove(struct pci_dev *pdev)
12701271
* pm8001_pci_suspend - power management suspend main entry point
12711272
* @dev: Device struct
12721273
*
1273-
* Returns 0 success, anything else error.
1274+
* Return: 0 on success, anything else on error.
12741275
*/
12751276
static int __maybe_unused pm8001_pci_suspend(struct device *dev)
12761277
{
@@ -1315,7 +1316,7 @@ static int __maybe_unused pm8001_pci_suspend(struct device *dev)
13151316
* pm8001_pci_resume - power management resume main entry point
13161317
* @dev: Device struct
13171318
*
1318-
* Returns 0 success, anything else error.
1319+
* Return: 0 on success, anything else on error.
13191320
*/
13201321
static int __maybe_unused pm8001_pci_resume(struct device *dev)
13211322
{

drivers/scsi/pm8001/pm8001_sas.c

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,16 @@ void pm8001_tag_init(struct pm8001_hba_info *pm8001_ha)
9898
pm8001_tag_free(pm8001_ha, i);
9999
}
100100

101-
/**
102-
* pm8001_mem_alloc - allocate memory for pm8001.
103-
* @pdev: pci device.
104-
* @virt_addr: the allocated virtual address
105-
* @pphys_addr_hi: the physical address high byte address.
106-
* @pphys_addr_lo: the physical address low byte address.
107-
* @mem_size: memory size.
108-
*/
101+
/**
102+
* pm8001_mem_alloc - allocate memory for pm8001.
103+
* @pdev: pci device.
104+
* @virt_addr: the allocated virtual address
105+
* @pphys_addr: DMA address for this device
106+
* @pphys_addr_hi: the physical address high byte address.
107+
* @pphys_addr_lo: the physical address low byte address.
108+
* @mem_size: memory size.
109+
* @align: requested byte alignment
110+
*/
109111
int pm8001_mem_alloc(struct pci_dev *pdev, void **virt_addr,
110112
dma_addr_t *pphys_addr, u32 *pphys_addr_hi,
111113
u32 *pphys_addr_lo, u32 mem_size, u32 align)
@@ -339,7 +341,7 @@ static int pm8001_task_prep_ssp_tm(struct pm8001_hba_info *pm8001_ha,
339341
}
340342

341343
/**
342-
* pm8001_task_prep_ssp - the dispatcher function,prepare ssp data for ssp task
344+
* pm8001_task_prep_ssp - the dispatcher function, prepare ssp data for ssp task
343345
* @pm8001_ha: our hba card information
344346
* @ccb: the ccb which attached to ssp task
345347
*/
@@ -554,10 +556,10 @@ void pm8001_ccb_task_free(struct pm8001_hba_info *pm8001_ha,
554556
pm8001_tag_free(pm8001_ha, ccb_idx);
555557
}
556558

557-
/**
558-
* pm8001_alloc_dev - find a empty pm8001_device
559-
* @pm8001_ha: our hba card information
560-
*/
559+
/**
560+
* pm8001_alloc_dev - find a empty pm8001_device
561+
* @pm8001_ha: our hba card information
562+
*/
561563
static struct pm8001_device *pm8001_alloc_dev(struct pm8001_hba_info *pm8001_ha)
562564
{
563565
u32 dev;
@@ -705,7 +707,7 @@ static void pm8001_tmf_timedout(struct timer_list *t)
705707
* @parameter: ssp task parameter.
706708
*
707709
* when errors or exception happened, we may want to do something, for example
708-
* abort the issued task which result in this execption, it is done by calling
710+
* abort the issued task which result in this exception, it is done by calling
709711
* this function, note it is also with the task execute interface.
710712
*/
711713
static int pm8001_exec_internal_tmf_task(struct domain_device *dev,
@@ -984,11 +986,12 @@ void pm8001_open_reject_retry(
984986
}
985987

986988
/**
987-
* pm8001_I_T_nexus_reset()
988-
* Standard mandates link reset for ATA (type 0) and hard reset for
989-
* SSP (type 1) , only for RECOVERY
990-
* @dev: the device structure for the device to reset.
991-
*/
989+
* pm8001_I_T_nexus_reset() - reset the initiator/target connection
990+
* @dev: the device structure for the device to reset.
991+
*
992+
* Standard mandates link reset for ATA (type 0) and hard reset for
993+
* SSP (type 1), only for RECOVERY
994+
*/
992995
int pm8001_I_T_nexus_reset(struct domain_device *dev)
993996
{
994997
int rc = TMF_RESP_FUNC_FAILED;

0 commit comments

Comments
 (0)