Commit 5d766d55 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents 44cb60b4 053c16ac
...@@ -487,6 +487,7 @@ static ssize_t zfcp_sysfs_port_fc_security_show(struct device *dev, ...@@ -487,6 +487,7 @@ static ssize_t zfcp_sysfs_port_fc_security_show(struct device *dev,
if (0 == (status & ZFCP_STATUS_COMMON_OPEN) || if (0 == (status & ZFCP_STATUS_COMMON_OPEN) ||
0 == (status & ZFCP_STATUS_COMMON_UNBLOCKED) || 0 == (status & ZFCP_STATUS_COMMON_UNBLOCKED) ||
0 == (status & ZFCP_STATUS_PORT_PHYS_OPEN) || 0 == (status & ZFCP_STATUS_PORT_PHYS_OPEN) ||
0 != (status & ZFCP_STATUS_PORT_LINK_TEST) ||
0 != (status & ZFCP_STATUS_COMMON_ERP_FAILED) || 0 != (status & ZFCP_STATUS_COMMON_ERP_FAILED) ||
0 != (status & ZFCP_STATUS_COMMON_ACCESS_BOXED)) 0 != (status & ZFCP_STATUS_COMMON_ACCESS_BOXED))
i = sprintf(buf, "unknown\n"); i = sprintf(buf, "unknown\n");
......
...@@ -2010,7 +2010,7 @@ static void fas216_rq_sns_done(FAS216_Info *info, struct scsi_cmnd *SCpnt, ...@@ -2010,7 +2010,7 @@ static void fas216_rq_sns_done(FAS216_Info *info, struct scsi_cmnd *SCpnt,
"request sense complete, result=0x%04x%02x%02x", "request sense complete, result=0x%04x%02x%02x",
result, SCpnt->SCp.Message, SCpnt->SCp.Status); result, SCpnt->SCp.Message, SCpnt->SCp.Status);
if (result != DID_OK || SCpnt->SCp.Status != GOOD) if (result != DID_OK || SCpnt->SCp.Status != SAM_STAT_GOOD)
/* /*
* Something went wrong. Make sure that we don't * Something went wrong. Make sure that we don't
* have valid data in the sense buffer that could * have valid data in the sense buffer that could
......
...@@ -488,6 +488,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) ...@@ -488,6 +488,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
shost_printk(KERN_WARNING, shost, shost_printk(KERN_WARNING, shost,
"error handler thread failed to spawn, error = %ld\n", "error handler thread failed to spawn, error = %ld\n",
PTR_ERR(shost->ehandler)); PTR_ERR(shost->ehandler));
shost->ehandler = NULL;
goto fail; goto fail;
} }
......
...@@ -2607,14 +2607,13 @@ static int mpi3mr_issue_iocinit(struct mpi3mr_ioc *mrioc) ...@@ -2607,14 +2607,13 @@ static int mpi3mr_issue_iocinit(struct mpi3mr_ioc *mrioc)
goto out; goto out;
} }
drv_info->information_length = cpu_to_le32(data_len); drv_info->information_length = cpu_to_le32(data_len);
strncpy(drv_info->driver_signature, "Broadcom", sizeof(drv_info->driver_signature)); strscpy(drv_info->driver_signature, "Broadcom", sizeof(drv_info->driver_signature));
strncpy(drv_info->os_name, utsname()->sysname, sizeof(drv_info->os_name)); strscpy(drv_info->os_name, utsname()->sysname, sizeof(drv_info->os_name));
drv_info->os_name[sizeof(drv_info->os_name) - 1] = 0; strscpy(drv_info->os_version, utsname()->release, sizeof(drv_info->os_version));
strncpy(drv_info->os_version, utsname()->release, sizeof(drv_info->os_version)); strscpy(drv_info->driver_name, MPI3MR_DRIVER_NAME, sizeof(drv_info->driver_name));
drv_info->os_version[sizeof(drv_info->os_version) - 1] = 0; strscpy(drv_info->driver_version, MPI3MR_DRIVER_VERSION, sizeof(drv_info->driver_version));
strncpy(drv_info->driver_name, MPI3MR_DRIVER_NAME, sizeof(drv_info->driver_name)); strscpy(drv_info->driver_release_date, MPI3MR_DRIVER_RELDATE,
strncpy(drv_info->driver_version, MPI3MR_DRIVER_VERSION, sizeof(drv_info->driver_version)); sizeof(drv_info->driver_release_date));
strncpy(drv_info->driver_release_date, MPI3MR_DRIVER_RELDATE, sizeof(drv_info->driver_release_date));
drv_info->driver_capabilities = 0; drv_info->driver_capabilities = 0;
memcpy((u8 *)&mrioc->driver_info, (u8 *)drv_info, memcpy((u8 *)&mrioc->driver_info, (u8 *)drv_info,
sizeof(mrioc->driver_info)); sizeof(mrioc->driver_info));
......
...@@ -77,7 +77,7 @@ DEVICE_ATTR(interface_rev, S_IRUGO, pm8001_ctl_mpi_interface_rev_show, NULL); ...@@ -77,7 +77,7 @@ DEVICE_ATTR(interface_rev, S_IRUGO, pm8001_ctl_mpi_interface_rev_show, NULL);
* @attr: device attribute (unused) * @attr: device attribute (unused)
* @buf: the buffer returned * @buf: the buffer returned
* *
* A sysfs 'read only' shost attribute. * A sysfs 'read-only' shost attribute.
*/ */
static ssize_t controller_fatal_error_show(struct device *cdev, static ssize_t controller_fatal_error_show(struct device *cdev,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
...@@ -149,7 +149,7 @@ static ssize_t pm8001_ctl_ila_version_show(struct device *cdev, ...@@ -149,7 +149,7 @@ static ssize_t pm8001_ctl_ila_version_show(struct device *cdev,
static DEVICE_ATTR(ila_version, 0444, pm8001_ctl_ila_version_show, NULL); static DEVICE_ATTR(ila_version, 0444, pm8001_ctl_ila_version_show, NULL);
/** /**
* pm8001_ctl_inactive_fw_version_show - Inacative firmware version number * pm8001_ctl_inactive_fw_version_show - Inactive firmware version number
* @cdev: pointer to embedded class device * @cdev: pointer to embedded class device
* @attr: device attribute (unused) * @attr: device attribute (unused)
* @buf: the buffer returned * @buf: the buffer returned
...@@ -396,6 +396,7 @@ static DEVICE_ATTR(aap_log, S_IRUGO, pm8001_ctl_aap_log_show, NULL); ...@@ -396,6 +396,7 @@ static DEVICE_ATTR(aap_log, S_IRUGO, pm8001_ctl_aap_log_show, NULL);
* @cdev:pointer to embedded class device * @cdev:pointer to embedded class device
* @attr: device attribute (unused) * @attr: device attribute (unused)
* @buf: the buffer returned * @buf: the buffer returned
*
* A sysfs 'read-only' shost attribute. * A sysfs 'read-only' shost attribute.
*/ */
static ssize_t pm8001_ctl_ib_queue_log_show(struct device *cdev, 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); ...@@ -430,6 +431,7 @@ static DEVICE_ATTR(ib_log, S_IRUGO, pm8001_ctl_ib_queue_log_show, NULL);
* @cdev:pointer to embedded class device * @cdev:pointer to embedded class device
* @attr: device attribute (unused) * @attr: device attribute (unused)
* @buf: the buffer returned * @buf: the buffer returned
*
* A sysfs 'read-only' shost attribute. * A sysfs 'read-only' shost attribute.
*/ */
...@@ -464,6 +466,7 @@ static DEVICE_ATTR(ob_log, S_IRUGO, pm8001_ctl_ob_queue_log_show, NULL); ...@@ -464,6 +466,7 @@ static DEVICE_ATTR(ob_log, S_IRUGO, pm8001_ctl_ob_queue_log_show, NULL);
* @cdev:pointer to embedded class device * @cdev:pointer to embedded class device
* @attr: device attribute (unused) * @attr: device attribute (unused)
* @buf:the buffer returned * @buf:the buffer returned
*
* A sysfs 'read-only' shost attribute. * A sysfs 'read-only' shost attribute.
*/ */
static ssize_t pm8001_ctl_bios_version_show(struct device *cdev, 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, ...@@ -555,13 +558,13 @@ static ssize_t pm8001_ctl_iop_log_show(struct device *cdev,
static DEVICE_ATTR(iop_log, S_IRUGO, pm8001_ctl_iop_log_show, NULL); static DEVICE_ATTR(iop_log, S_IRUGO, pm8001_ctl_iop_log_show, NULL);
/** /**
** pm8001_ctl_fatal_log_show - fatal error logging * pm8001_ctl_fatal_log_show - fatal error logging
** @cdev:pointer to embedded class device * @cdev:pointer to embedded class device
** @attr: device attribute * @attr: device attribute
** @buf: the buffer returned * @buf: the buffer returned
** *
** A sysfs 'read-only' shost attribute. * A sysfs 'read-only' shost attribute.
**/ */
static ssize_t pm8001_ctl_fatal_log_show(struct device *cdev, static ssize_t pm8001_ctl_fatal_log_show(struct device *cdev,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
...@@ -575,13 +578,13 @@ static ssize_t pm8001_ctl_fatal_log_show(struct device *cdev, ...@@ -575,13 +578,13 @@ static ssize_t pm8001_ctl_fatal_log_show(struct device *cdev,
static DEVICE_ATTR(fatal_log, S_IRUGO, pm8001_ctl_fatal_log_show, NULL); static DEVICE_ATTR(fatal_log, S_IRUGO, pm8001_ctl_fatal_log_show, NULL);
/** /**
** non_fatal_log_show - non fatal error logging * non_fatal_log_show - non fatal error logging
** @cdev:pointer to embedded class device * @cdev:pointer to embedded class device
** @attr: device attribute * @attr: device attribute
** @buf: the buffer returned * @buf: the buffer returned
** *
** A sysfs 'read-only' shost attribute. * A sysfs 'read-only' shost attribute.
**/ */
static ssize_t non_fatal_log_show(struct device *cdev, static ssize_t non_fatal_log_show(struct device *cdev,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
{ {
...@@ -620,12 +623,13 @@ static ssize_t non_fatal_count_store(struct device *cdev, ...@@ -620,12 +623,13 @@ static ssize_t non_fatal_count_store(struct device *cdev,
static DEVICE_ATTR_RW(non_fatal_count); static DEVICE_ATTR_RW(non_fatal_count);
/** /**
** pm8001_ctl_gsm_log_show - gsm dump collection * pm8001_ctl_gsm_log_show - gsm dump collection
** @cdev:pointer to embedded class device * @cdev:pointer to embedded class device
** @attr: device attribute (unused) * @attr: device attribute (unused)
** @buf: the buffer returned * @buf: the buffer returned
** A sysfs 'read-only' shost attribute. *
**/ * A sysfs 'read-only' shost attribute.
*/
static ssize_t pm8001_ctl_gsm_log_show(struct device *cdev, static ssize_t pm8001_ctl_gsm_log_show(struct device *cdev,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
{ {
......
...@@ -384,7 +384,7 @@ static void update_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha, ...@@ -384,7 +384,7 @@ static void update_outbnd_queue_table(struct pm8001_hba_info *pm8001_ha,
/** /**
* pm8001_bar4_shift - function is called to shift BAR base address * pm8001_bar4_shift - function is called to shift BAR base address
* @pm8001_ha : our hba card infomation * @pm8001_ha : our hba card information
* @shiftValue : shifting value in memory bar. * @shiftValue : shifting value in memory bar.
*/ */
int pm8001_bar4_shift(struct pm8001_hba_info *pm8001_ha, u32 shiftValue) 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) ...@@ -1151,7 +1151,7 @@ static void pm8001_hw_chip_rst(struct pm8001_hba_info *pm8001_ha)
} }
/** /**
* pm8001_chip_iounmap - which maped when initialized. * pm8001_chip_iounmap - which mapped when initialized.
* @pm8001_ha: our hba card information * @pm8001_ha: our hba card information
*/ */
void pm8001_chip_iounmap(struct pm8001_hba_info *pm8001_ha) 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) ...@@ -1187,10 +1187,10 @@ pm8001_chip_intx_interrupt_enable(struct pm8001_hba_info *pm8001_ha)
pm8001_cw32(pm8001_ha, 0, MSGU_ODCR, ODCR_CLEAR_ALL); pm8001_cw32(pm8001_ha, 0, MSGU_ODCR, ODCR_CLEAR_ALL);
} }
/** /**
* pm8001_chip_intx_interrupt_disable- disable PM8001 chip interrupt * pm8001_chip_intx_interrupt_disable - disable PM8001 chip interrupt
* @pm8001_ha: our hba card information * @pm8001_ha: our hba card information
*/ */
static void static void
pm8001_chip_intx_interrupt_disable(struct pm8001_hba_info *pm8001_ha) pm8001_chip_intx_interrupt_disable(struct pm8001_hba_info *pm8001_ha)
{ {
...@@ -1876,8 +1876,8 @@ static void pm8001_send_read_log(struct pm8001_hba_info *pm8001_ha, ...@@ -1876,8 +1876,8 @@ static void pm8001_send_read_log(struct pm8001_hba_info *pm8001_ha,
* @piomb: the message contents of this outbound message. * @piomb: the message contents of this outbound message.
* *
* When FW has completed a ssp request for example a IO request, after it has * When FW has completed a ssp request for example a IO request, after it has
* filled the SG data with the data, it will trigger this event represent * filled the SG data with the data, it will trigger this event representing
* that he has finished the job,please check the coresponding buffer. * that he has finished the job; please check the corresponding buffer.
* So we will tell the caller who maybe waiting the result to tell upper layer * So we will tell the caller who maybe waiting the result to tell upper layer
* that the task has been finished. * that the task has been finished.
*/ */
...@@ -3522,7 +3522,7 @@ hw_event_phy_down(struct pm8001_hba_info *pm8001_ha, void *piomb) ...@@ -3522,7 +3522,7 @@ hw_event_phy_down(struct pm8001_hba_info *pm8001_ha, void *piomb)
* *
* when sas layer find a device it will notify LLDD, then the driver register * when sas layer find a device it will notify LLDD, then the driver register
* the domain device to FW, this event is the return device ID which the FW * the domain device to FW, this event is the return device ID which the FW
* has assigned, from now,inter-communication with FW is no longer using the * has assigned, from now, inter-communication with FW is no longer using the
* SAS address, use device ID which FW assigned. * SAS address, use device ID which FW assigned.
*/ */
int pm8001_mpi_reg_resp(struct pm8001_hba_info *pm8001_ha, void *piomb) int pm8001_mpi_reg_resp(struct pm8001_hba_info *pm8001_ha, void *piomb)
......
...@@ -233,7 +233,7 @@ static irqreturn_t pm8001_interrupt_handler_msix(int irq, void *opaque) ...@@ -233,7 +233,7 @@ static irqreturn_t pm8001_interrupt_handler_msix(int irq, void *opaque)
/** /**
* pm8001_interrupt_handler_intx - main INTx interrupt handler. * pm8001_interrupt_handler_intx - main INTx interrupt handler.
* @irq: interrupt number * @irq: interrupt number
* @dev_id: sas_ha structure. The HBA is retrieved from sas_has structure. * @dev_id: sas_ha structure. The HBA is retrieved from sas_ha structure.
*/ */
static irqreturn_t pm8001_interrupt_handler_intx(int irq, void *dev_id) 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, ...@@ -439,9 +439,9 @@ static int pm8001_alloc(struct pm8001_hba_info *pm8001_ha,
} }
/** /**
* pm8001_ioremap - remap the pci high physical address to kernal virtual * pm8001_ioremap - remap the pci high physical address to kernel virtual
* address so that we can access them. * address so that we can access them.
* @pm8001_ha:our hba structure. * @pm8001_ha: our hba structure.
*/ */
static int pm8001_ioremap(struct pm8001_hba_info *pm8001_ha) static int pm8001_ioremap(struct pm8001_hba_info *pm8001_ha)
{ {
...@@ -652,7 +652,7 @@ static void pm8001_post_sas_ha_init(struct Scsi_Host *shost, ...@@ -652,7 +652,7 @@ static void pm8001_post_sas_ha_init(struct Scsi_Host *shost,
* pm8001_init_sas_add - initialize sas address * pm8001_init_sas_add - initialize sas address
* @pm8001_ha: our ha struct. * @pm8001_ha: our ha struct.
* *
* Currently we just set the fixed SAS address to our HBA,for manufacture, * Currently we just set the fixed SAS address to our HBA, for manufacture,
* it should read from the EEPROM * it should read from the EEPROM
*/ */
static void pm8001_init_sas_add(struct pm8001_hba_info *pm8001_ha) static void pm8001_init_sas_add(struct pm8001_hba_info *pm8001_ha)
...@@ -790,7 +790,7 @@ struct pm8001_mpi3_phy_pg_trx_config { ...@@ -790,7 +790,7 @@ struct pm8001_mpi3_phy_pg_trx_config {
}; };
/** /**
* pm8001_get_internal_phy_settings : Retrieves the internal PHY settings * pm8001_get_internal_phy_settings - Retrieves the internal PHY settings
* @pm8001_ha : our adapter * @pm8001_ha : our adapter
* @phycfg : PHY config page to populate * @phycfg : PHY config page to populate
*/ */
...@@ -810,7 +810,7 @@ void pm8001_get_internal_phy_settings(struct pm8001_hba_info *pm8001_ha, ...@@ -810,7 +810,7 @@ void pm8001_get_internal_phy_settings(struct pm8001_hba_info *pm8001_ha,
} }
/** /**
* pm8001_get_external_phy_settings : Retrieves the external PHY settings * pm8001_get_external_phy_settings - Retrieves the external PHY settings
* @pm8001_ha : our adapter * @pm8001_ha : our adapter
* @phycfg : PHY config page to populate * @phycfg : PHY config page to populate
*/ */
...@@ -830,7 +830,7 @@ void pm8001_get_external_phy_settings(struct pm8001_hba_info *pm8001_ha, ...@@ -830,7 +830,7 @@ void pm8001_get_external_phy_settings(struct pm8001_hba_info *pm8001_ha,
} }
/** /**
* pm8001_get_phy_mask : Retrieves the mask that denotes if a PHY is int/ext * pm8001_get_phy_mask - Retrieves the mask that denotes if a PHY is int/ext
* @pm8001_ha : our adapter * @pm8001_ha : our adapter
* @phymask : The PHY mask * @phymask : The PHY mask
*/ */
...@@ -868,7 +868,7 @@ void pm8001_get_phy_mask(struct pm8001_hba_info *pm8001_ha, int *phymask) ...@@ -868,7 +868,7 @@ void pm8001_get_phy_mask(struct pm8001_hba_info *pm8001_ha, int *phymask)
} }
/** /**
* pm8001_set_phy_settings_ven_117c_12G() : Configure ATTO 12Gb PHY settings * pm8001_set_phy_settings_ven_117c_12G() - Configure ATTO 12Gb PHY settings
* @pm8001_ha : our adapter * @pm8001_ha : our adapter
*/ */
static static
...@@ -903,7 +903,7 @@ int pm8001_set_phy_settings_ven_117c_12G(struct pm8001_hba_info *pm8001_ha) ...@@ -903,7 +903,7 @@ int pm8001_set_phy_settings_ven_117c_12G(struct pm8001_hba_info *pm8001_ha)
} }
/** /**
* pm8001_configure_phy_settings : Configures PHY settings based on vendor ID. * pm8001_configure_phy_settings - Configures PHY settings based on vendor ID.
* @pm8001_ha : our hba. * @pm8001_ha : our hba.
*/ */
static int pm8001_configure_phy_settings(struct pm8001_hba_info *pm8001_ha) 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) ...@@ -1053,8 +1053,8 @@ static u32 pm8001_request_irq(struct pm8001_hba_info *pm8001_ha)
* @ent: pci device id * @ent: pci device id
* *
* This function is the main initialization function, when register a new * This function is the main initialization function, when register a new
* pci driver it is invoked, all struct an hardware initilization should be done * pci driver it is invoked, all struct and hardware initialization should be
* here, also, register interrupt * done here, also, register interrupt.
*/ */
static int pm8001_pci_probe(struct pci_dev *pdev, static int pm8001_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *ent) const struct pci_device_id *ent)
...@@ -1172,10 +1172,11 @@ static int pm8001_pci_probe(struct pci_dev *pdev, ...@@ -1172,10 +1172,11 @@ static int pm8001_pci_probe(struct pci_dev *pdev,
return rc; return rc;
} }
/* /**
* pm8001_init_ccb_tag - allocate memory to CCB and tag. * pm8001_init_ccb_tag - allocate memory to CCB and tag.
* @pm8001_ha: our hba card information. * @pm8001_ha: our hba card information.
* @shost: scsi host which has been allocated outside. * @shost: scsi host which has been allocated outside.
* @pdev: pci device.
*/ */
static int static int
pm8001_init_ccb_tag(struct pm8001_hba_info *pm8001_ha, struct Scsi_Host *shost, 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) ...@@ -1270,7 +1271,7 @@ static void pm8001_pci_remove(struct pci_dev *pdev)
* pm8001_pci_suspend - power management suspend main entry point * pm8001_pci_suspend - power management suspend main entry point
* @dev: Device struct * @dev: Device struct
* *
* Returns 0 success, anything else error. * Return: 0 on success, anything else on error.
*/ */
static int __maybe_unused pm8001_pci_suspend(struct device *dev) static int __maybe_unused pm8001_pci_suspend(struct device *dev)
{ {
...@@ -1315,7 +1316,7 @@ static int __maybe_unused pm8001_pci_suspend(struct device *dev) ...@@ -1315,7 +1316,7 @@ static int __maybe_unused pm8001_pci_suspend(struct device *dev)
* pm8001_pci_resume - power management resume main entry point * pm8001_pci_resume - power management resume main entry point
* @dev: Device struct * @dev: Device struct
* *
* Returns 0 success, anything else error. * Return: 0 on success, anything else on error.
*/ */
static int __maybe_unused pm8001_pci_resume(struct device *dev) static int __maybe_unused pm8001_pci_resume(struct device *dev)
{ {
......
...@@ -98,14 +98,16 @@ void pm8001_tag_init(struct pm8001_hba_info *pm8001_ha) ...@@ -98,14 +98,16 @@ void pm8001_tag_init(struct pm8001_hba_info *pm8001_ha)
pm8001_tag_free(pm8001_ha, i); pm8001_tag_free(pm8001_ha, i);
} }
/** /**
* pm8001_mem_alloc - allocate memory for pm8001. * pm8001_mem_alloc - allocate memory for pm8001.
* @pdev: pci device. * @pdev: pci device.
* @virt_addr: the allocated virtual address * @virt_addr: the allocated virtual address
* @pphys_addr_hi: the physical address high byte address. * @pphys_addr: DMA address for this device
* @pphys_addr_lo: the physical address low byte address. * @pphys_addr_hi: the physical address high byte address.
* @mem_size: memory size. * @pphys_addr_lo: the physical address low byte address.
*/ * @mem_size: memory size.
* @align: requested byte alignment
*/
int pm8001_mem_alloc(struct pci_dev *pdev, void **virt_addr, int pm8001_mem_alloc(struct pci_dev *pdev, void **virt_addr,
dma_addr_t *pphys_addr, u32 *pphys_addr_hi, dma_addr_t *pphys_addr, u32 *pphys_addr_hi,
u32 *pphys_addr_lo, u32 mem_size, u32 align) 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, ...@@ -339,7 +341,7 @@ static int pm8001_task_prep_ssp_tm(struct pm8001_hba_info *pm8001_ha,
} }
/** /**
* pm8001_task_prep_ssp - the dispatcher function,prepare ssp data for ssp task * pm8001_task_prep_ssp - the dispatcher function, prepare ssp data for ssp task
* @pm8001_ha: our hba card information * @pm8001_ha: our hba card information
* @ccb: the ccb which attached to ssp task * @ccb: the ccb which attached to ssp task
*/ */
...@@ -554,10 +556,10 @@ void pm8001_ccb_task_free(struct pm8001_hba_info *pm8001_ha, ...@@ -554,10 +556,10 @@ void pm8001_ccb_task_free(struct pm8001_hba_info *pm8001_ha,
pm8001_tag_free(pm8001_ha, ccb_idx); pm8001_tag_free(pm8001_ha, ccb_idx);
} }
/** /**
* pm8001_alloc_dev - find a empty pm8001_device * pm8001_alloc_dev - find a empty pm8001_device
* @pm8001_ha: our hba card information * @pm8001_ha: our hba card information
*/ */
static struct pm8001_device *pm8001_alloc_dev(struct pm8001_hba_info *pm8001_ha) static struct pm8001_device *pm8001_alloc_dev(struct pm8001_hba_info *pm8001_ha)
{ {
u32 dev; u32 dev;
...@@ -705,7 +707,7 @@ static void pm8001_tmf_timedout(struct timer_list *t) ...@@ -705,7 +707,7 @@ static void pm8001_tmf_timedout(struct timer_list *t)
* @parameter: ssp task parameter. * @parameter: ssp task parameter.
* *
* when errors or exception happened, we may want to do something, for example * when errors or exception happened, we may want to do something, for example
* abort the issued task which result in this execption, it is done by calling * abort the issued task which result in this exception, it is done by calling
* this function, note it is also with the task execute interface. * this function, note it is also with the task execute interface.
*/ */
static int pm8001_exec_internal_tmf_task(struct domain_device *dev, static int pm8001_exec_internal_tmf_task(struct domain_device *dev,
...@@ -984,11 +986,12 @@ void pm8001_open_reject_retry( ...@@ -984,11 +986,12 @@ void pm8001_open_reject_retry(
} }
/** /**
* pm8001_I_T_nexus_reset() * pm8001_I_T_nexus_reset() - reset the initiator/target connection
* Standard mandates link reset for ATA (type 0) and hard reset for * @dev: the device structure for the device to reset.
* SSP (type 1) , only for RECOVERY *
* @dev: the device structure for the device to reset. * Standard mandates link reset for ATA (type 0) and hard reset for
*/ * SSP (type 1), only for RECOVERY
*/
int pm8001_I_T_nexus_reset(struct domain_device *dev) int pm8001_I_T_nexus_reset(struct domain_device *dev)
{ {
int rc = TMF_RESP_FUNC_FAILED; int rc = TMF_RESP_FUNC_FAILED;
......
...@@ -140,7 +140,7 @@ ssize_t pm80xx_get_fatal_dump(struct device *cdev, ...@@ -140,7 +140,7 @@ ssize_t pm80xx_get_fatal_dump(struct device *cdev,
pm8001_ha->fatal_bar_loc = 0; pm8001_ha->fatal_bar_loc = 0;
} }
/* Read until accum_len is retrived */ /* Read until accum_len is retrieved */
accum_len = pm8001_mr32(fatal_table_address, accum_len = pm8001_mr32(fatal_table_address,
MPI_FATAL_EDUMP_TABLE_ACCUM_LEN); MPI_FATAL_EDUMP_TABLE_ACCUM_LEN);
/* Determine length of data between previously stored transfer length /* Determine length of data between previously stored transfer length
...@@ -1011,7 +1011,7 @@ static int mpi_init_check(struct pm8001_hba_info *pm8001_ha) ...@@ -1011,7 +1011,7 @@ static int mpi_init_check(struct pm8001_hba_info *pm8001_ha)
value); value);
return -EBUSY; return -EBUSY;
} }
/* check the MPI-State for initialization upto 100ms*/ /* check the MPI-State for initialization up to 100ms*/
max_wait_count = 5;/* 100 msec */ max_wait_count = 5;/* 100 msec */
do { do {
msleep(FW_READY_INTERVAL); msleep(FW_READY_INTERVAL);
...@@ -1093,7 +1093,7 @@ static int init_pci_device_addresses(struct pm8001_hba_info *pm8001_ha) ...@@ -1093,7 +1093,7 @@ static int init_pci_device_addresses(struct pm8001_hba_info *pm8001_ha)
value = pm8001_cr32(pm8001_ha, 0, MSGU_SCRATCH_PAD_0); value = pm8001_cr32(pm8001_ha, 0, MSGU_SCRATCH_PAD_0);
/** /*
* lower 26 bits of SCRATCHPAD0 register describes offset within the * lower 26 bits of SCRATCHPAD0 register describes offset within the
* PCIe BAR where the MPI configuration table is present * PCIe BAR where the MPI configuration table is present
*/ */
...@@ -1101,7 +1101,7 @@ static int init_pci_device_addresses(struct pm8001_hba_info *pm8001_ha) ...@@ -1101,7 +1101,7 @@ static int init_pci_device_addresses(struct pm8001_hba_info *pm8001_ha)
pm8001_dbg(pm8001_ha, DEV, "Scratchpad 0 Offset: 0x%x value 0x%x\n", pm8001_dbg(pm8001_ha, DEV, "Scratchpad 0 Offset: 0x%x value 0x%x\n",
offset, value); offset, value);
/** /*
* Upper 6 bits describe the offset within PCI config space where BAR * Upper 6 bits describe the offset within PCI config space where BAR
* is located. * is located.
*/ */
...@@ -1109,7 +1109,7 @@ static int init_pci_device_addresses(struct pm8001_hba_info *pm8001_ha) ...@@ -1109,7 +1109,7 @@ static int init_pci_device_addresses(struct pm8001_hba_info *pm8001_ha)
pcibar = get_pci_bar_index(pcilogic); pcibar = get_pci_bar_index(pcilogic);
pm8001_dbg(pm8001_ha, INIT, "Scratchpad 0 PCI BAR: %d\n", pcibar); pm8001_dbg(pm8001_ha, INIT, "Scratchpad 0 PCI BAR: %d\n", pcibar);
/** /*
* Make sure the offset falls inside the ioremapped PCI BAR * Make sure the offset falls inside the ioremapped PCI BAR
*/ */
if (offset > pm8001_ha->io_mem[pcibar].memsize) { if (offset > pm8001_ha->io_mem[pcibar].memsize) {
...@@ -1121,7 +1121,7 @@ static int init_pci_device_addresses(struct pm8001_hba_info *pm8001_ha) ...@@ -1121,7 +1121,7 @@ static int init_pci_device_addresses(struct pm8001_hba_info *pm8001_ha)
pm8001_ha->main_cfg_tbl_addr = base_addr = pm8001_ha->main_cfg_tbl_addr = base_addr =
pm8001_ha->io_mem[pcibar].memvirtaddr + offset; pm8001_ha->io_mem[pcibar].memvirtaddr + offset;
/** /*
* Validate main configuration table address: first DWord should read * Validate main configuration table address: first DWord should read
* "PMCS" * "PMCS"