scsi: Rename .device_configure() into .sdev_configure()

Improve naming consistency with the .sdev_prep() and .sdev_destroy()
methods by renaming .device_configure() into .sdev_configure().

Cc: Christoph Hellwig <hch@lst.de>
Acked-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20241022180839.2712439-3-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Bart Van Assche 2024-10-22 11:07:54 -07:00 committed by Martin K. Petersen
parent ed638918f4
commit 47c2e30afc
28 changed files with 90 additions and 96 deletions

View File

@ -397,7 +397,7 @@ extern const struct attribute_group *ahci_sdev_groups[];
.sdev_groups = ahci_sdev_groups, \
.change_queue_depth = ata_scsi_change_queue_depth, \
.tag_alloc_policy = BLK_TAG_ALLOC_RR, \
.device_configure = ata_scsi_device_configure
.sdev_configure = ata_scsi_sdev_configure
extern struct ata_port_operations ahci_ops;
extern struct ata_port_operations ahci_platform_ops;

View File

@ -1313,7 +1313,7 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth)
EXPORT_SYMBOL_GPL(ata_scsi_change_queue_depth);
/**
* ata_sas_device_configure - Default device_configure routine for libata
* ata_sas_sdev_configure - Default sdev_configure routine for libata
* devices
* @sdev: SCSI device to configure
* @lim: queue limits
@ -1323,14 +1323,14 @@ EXPORT_SYMBOL_GPL(ata_scsi_change_queue_depth);
* Zero.
*/
int ata_sas_device_configure(struct scsi_device *sdev, struct queue_limits *lim,
struct ata_port *ap)
int ata_sas_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim,
struct ata_port *ap)
{
ata_scsi_sdev_config(sdev);
return ata_scsi_dev_config(sdev, lim, ap->link.device);
}
EXPORT_SYMBOL_GPL(ata_sas_device_configure);
EXPORT_SYMBOL_GPL(ata_sas_sdev_configure);
/**
* ata_sas_queuecmd - Issue SCSI cdb to libata-managed device

View File

@ -1169,7 +1169,7 @@ int ata_scsi_sdev_init(struct scsi_device *sdev)
EXPORT_SYMBOL_GPL(ata_scsi_sdev_init);
/**
* ata_scsi_device_configure - Set SCSI device attributes
* ata_scsi_sdev_configure - Set SCSI device attributes
* @sdev: SCSI device to examine
* @lim: queue limits
*
@ -1181,8 +1181,7 @@ EXPORT_SYMBOL_GPL(ata_scsi_sdev_init);
* Defined by SCSI layer. We don't really care.
*/
int ata_scsi_device_configure(struct scsi_device *sdev,
struct queue_limits *lim)
int ata_scsi_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim)
{
struct ata_port *ap = ata_shost_to_port(sdev->host);
struct ata_device *dev = __ata_scsi_find_dev(ap, sdev);
@ -1192,7 +1191,7 @@ int ata_scsi_device_configure(struct scsi_device *sdev,
return 0;
}
EXPORT_SYMBOL_GPL(ata_scsi_device_configure);
EXPORT_SYMBOL_GPL(ata_scsi_sdev_configure);
/**
* ata_scsi_sdev_destroy - SCSI device is about to be destroyed

View File

@ -812,8 +812,8 @@ static void pata_macio_reset_hw(struct pata_macio_priv *priv, int resume)
/* Hook the standard slave config to fixup some HW related alignment
* restrictions
*/
static int pata_macio_device_configure(struct scsi_device *sdev,
struct queue_limits *lim)
static int pata_macio_sdev_configure(struct scsi_device *sdev,
struct queue_limits *lim)
{
struct ata_port *ap = ata_shost_to_port(sdev->host);
struct pata_macio_priv *priv = ap->private_data;
@ -822,7 +822,7 @@ static int pata_macio_device_configure(struct scsi_device *sdev,
int rc;
/* First call original */
rc = ata_scsi_device_configure(sdev, lim);
rc = ata_scsi_sdev_configure(sdev, lim);
if (rc)
return rc;
@ -932,7 +932,7 @@ static const struct scsi_host_template pata_macio_sht = {
/* We may not need that strict one */
.dma_boundary = ATA_DMA_BOUNDARY,
.max_segment_size = PATA_MACIO_MAX_SEGMENT_SIZE,
.device_configure = pata_macio_device_configure,
.sdev_configure = pata_macio_sdev_configure,
.sdev_groups = ata_common_sdev_groups,
.can_queue = ATA_DEF_QUEUE,
.tag_alloc_policy = BLK_TAG_ALLOC_RR,

View File

@ -673,7 +673,7 @@ static const struct scsi_host_template mv6_sht = {
.sdev_groups = ata_ncq_sdev_groups,
.change_queue_depth = ata_scsi_change_queue_depth,
.tag_alloc_policy = BLK_TAG_ALLOC_RR,
.device_configure = ata_scsi_device_configure
.sdev_configure = ata_scsi_sdev_configure
};
static struct ata_port_operations mv5_ops = {

View File

@ -296,8 +296,8 @@ static void nv_nf2_freeze(struct ata_port *ap);
static void nv_nf2_thaw(struct ata_port *ap);
static void nv_ck804_freeze(struct ata_port *ap);
static void nv_ck804_thaw(struct ata_port *ap);
static int nv_adma_device_configure(struct scsi_device *sdev,
struct queue_limits *lim);
static int nv_adma_sdev_configure(struct scsi_device *sdev,
struct queue_limits *lim);
static int nv_adma_check_atapi_dma(struct ata_queued_cmd *qc);
static enum ata_completion_errors nv_adma_qc_prep(struct ata_queued_cmd *qc);
static unsigned int nv_adma_qc_issue(struct ata_queued_cmd *qc);
@ -319,8 +319,8 @@ static void nv_adma_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
static void nv_mcp55_thaw(struct ata_port *ap);
static void nv_mcp55_freeze(struct ata_port *ap);
static void nv_swncq_error_handler(struct ata_port *ap);
static int nv_swncq_device_configure(struct scsi_device *sdev,
struct queue_limits *lim);
static int nv_swncq_sdev_configure(struct scsi_device *sdev,
struct queue_limits *lim);
static int nv_swncq_port_start(struct ata_port *ap);
static enum ata_completion_errors nv_swncq_qc_prep(struct ata_queued_cmd *qc);
static void nv_swncq_fill_sg(struct ata_queued_cmd *qc);
@ -382,7 +382,7 @@ static const struct scsi_host_template nv_adma_sht = {
.can_queue = NV_ADMA_MAX_CPBS,
.sg_tablesize = NV_ADMA_SGTBL_TOTAL_LEN,
.dma_boundary = NV_ADMA_DMA_BOUNDARY,
.device_configure = nv_adma_device_configure,
.sdev_configure = nv_adma_sdev_configure,
.sdev_groups = ata_ncq_sdev_groups,
.change_queue_depth = ata_scsi_change_queue_depth,
.tag_alloc_policy = BLK_TAG_ALLOC_RR,
@ -393,7 +393,7 @@ static const struct scsi_host_template nv_swncq_sht = {
.can_queue = ATA_MAX_QUEUE - 1,
.sg_tablesize = LIBATA_MAX_PRD,
.dma_boundary = ATA_DMA_BOUNDARY,
.device_configure = nv_swncq_device_configure,
.sdev_configure = nv_swncq_sdev_configure,
.sdev_groups = ata_ncq_sdev_groups,
.change_queue_depth = ata_scsi_change_queue_depth,
.tag_alloc_policy = BLK_TAG_ALLOC_RR,
@ -663,8 +663,8 @@ static void nv_adma_mode(struct ata_port *ap)
pp->flags &= ~NV_ADMA_PORT_REGISTER_MODE;
}
static int nv_adma_device_configure(struct scsi_device *sdev,
struct queue_limits *lim)
static int nv_adma_sdev_configure(struct scsi_device *sdev,
struct queue_limits *lim)
{
struct ata_port *ap = ata_shost_to_port(sdev->host);
struct nv_adma_port_priv *pp = ap->private_data;
@ -676,7 +676,7 @@ static int nv_adma_device_configure(struct scsi_device *sdev,
int adma_enable;
u32 current_reg, new_reg, config_mask;
rc = ata_scsi_device_configure(sdev, lim);
rc = ata_scsi_sdev_configure(sdev, lim);
if (sdev->id >= ATA_MAX_DEVICES || sdev->channel || sdev->lun)
/* Not a proper libata device, ignore */
@ -1871,8 +1871,8 @@ static void nv_swncq_host_init(struct ata_host *host)
writel(~0x0, mmio + NV_INT_STATUS_MCP55);
}
static int nv_swncq_device_configure(struct scsi_device *sdev,
struct queue_limits *lim)
static int nv_swncq_sdev_configure(struct scsi_device *sdev,
struct queue_limits *lim)
{
struct ata_port *ap = ata_shost_to_port(sdev->host);
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
@ -1882,7 +1882,7 @@ static int nv_swncq_device_configure(struct scsi_device *sdev,
u8 check_maxtor = 0;
unsigned char model_num[ATA_ID_PROD_LEN + 1];
rc = ata_scsi_device_configure(sdev, lim);
rc = ata_scsi_sdev_configure(sdev, lim);
if (sdev->id >= ATA_MAX_DEVICES || sdev->channel || sdev->lun)
/* Not a proper libata device, ignore */
return rc;

View File

@ -381,7 +381,7 @@ static const struct scsi_host_template sil24_sht = {
.tag_alloc_policy = BLK_TAG_ALLOC_FIFO,
.sdev_groups = ata_ncq_sdev_groups,
.change_queue_depth = ata_scsi_change_queue_depth,
.device_configure = ata_scsi_device_configure
.sdev_configure = ata_scsi_sdev_configure
};
static struct ata_port_operations sil24_ops = {

View File

@ -1506,8 +1506,8 @@ static int sbp2_scsi_sdev_init(struct scsi_device *sdev)
return 0;
}
static int sbp2_scsi_device_configure(struct scsi_device *sdev,
struct queue_limits *lim)
static int sbp2_scsi_sdev_configure(struct scsi_device *sdev,
struct queue_limits *lim)
{
struct sbp2_logical_unit *lu = sdev->hostdata;
@ -1591,7 +1591,7 @@ static const struct scsi_host_template scsi_driver_template = {
.proc_name = "sbp2",
.queuecommand = sbp2_scsi_queuecommand,
.sdev_init = sbp2_scsi_sdev_init,
.device_configure = sbp2_scsi_device_configure,
.sdev_configure = sbp2_scsi_sdev_configure,
.eh_abort_handler = sbp2_scsi_abort,
.this_id = -1,
.sg_tablesize = SG_ALL,

View File

@ -644,8 +644,7 @@ extern int hisi_sas_probe(struct platform_device *pdev,
const struct hisi_sas_hw *ops);
extern void hisi_sas_remove(struct platform_device *pdev);
int hisi_sas_device_configure(struct scsi_device *sdev,
struct queue_limits *lim);
int hisi_sas_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim);
extern int hisi_sas_sdev_init(struct scsi_device *sdev);
extern int hisi_sas_scan_finished(struct Scsi_Host *shost, unsigned long time);
extern void hisi_sas_scan_start(struct Scsi_Host *shost);

View File

@ -868,11 +868,10 @@ static int hisi_sas_dev_found(struct domain_device *device)
return rc;
}
int hisi_sas_device_configure(struct scsi_device *sdev,
struct queue_limits *lim)
int hisi_sas_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim)
{
struct domain_device *dev = sdev_to_domain_dev(sdev);
int ret = sas_device_configure(sdev, lim);
int ret = sas_sdev_configure(sdev, lim);
if (ret)
return ret;
@ -881,7 +880,7 @@ int hisi_sas_device_configure(struct scsi_device *sdev,
return 0;
}
EXPORT_SYMBOL_GPL(hisi_sas_device_configure);
EXPORT_SYMBOL_GPL(hisi_sas_sdev_configure);
void hisi_sas_scan_start(struct Scsi_Host *shost)
{

View File

@ -1753,7 +1753,7 @@ static int check_fw_info_v1_hw(struct hisi_hba *hisi_hba)
static const struct scsi_host_template sht_v1_hw = {
LIBSAS_SHT_BASE_NO_SLAVE_INIT
.device_configure = hisi_sas_device_configure,
.sdev_configure = hisi_sas_sdev_configure,
.scan_finished = hisi_sas_scan_finished,
.scan_start = hisi_sas_scan_start,
.sg_tablesize = HISI_SAS_SGE_PAGE_CNT,

View File

@ -3585,7 +3585,7 @@ static int check_fw_info_v2_hw(struct hisi_hba *hisi_hba)
static const struct scsi_host_template sht_v2_hw = {
LIBSAS_SHT_BASE_NO_SLAVE_INIT
.device_configure = hisi_sas_device_configure,
.sdev_configure = hisi_sas_sdev_configure,
.scan_finished = hisi_sas_scan_finished,
.scan_start = hisi_sas_scan_start,
.sg_tablesize = HISI_SAS_SGE_PAGE_CNT,

View File

@ -2908,12 +2908,12 @@ static ssize_t iopoll_q_cnt_v3_hw_show(struct device *dev,
}
static DEVICE_ATTR_RO(iopoll_q_cnt_v3_hw);
static int device_configure_v3_hw(struct scsi_device *sdev,
struct queue_limits *lim)
static int sdev_configure_v3_hw(struct scsi_device *sdev,
struct queue_limits *lim)
{
struct Scsi_Host *shost = dev_to_shost(&sdev->sdev_gendev);
struct hisi_hba *hisi_hba = shost_priv(shost);
int ret = hisi_sas_device_configure(sdev, lim);
int ret = hisi_sas_sdev_configure(sdev, lim);
struct device *dev = hisi_hba->dev;
if (ret)
@ -3336,7 +3336,7 @@ static void hisi_sas_map_queues(struct Scsi_Host *shost)
static const struct scsi_host_template sht_v3_hw = {
LIBSAS_SHT_BASE_NO_SLAVE_INIT
.device_configure = device_configure_v3_hw,
.sdev_configure = sdev_configure_v3_hw,
.scan_finished = hisi_sas_scan_finished,
.scan_start = hisi_sas_scan_start,
.map_queues = hisi_sas_map_queues,

View File

@ -1151,8 +1151,8 @@ static struct attribute *hptiop_host_attrs[] = {
ATTRIBUTE_GROUPS(hptiop_host);
static int hptiop_device_configure(struct scsi_device *sdev,
struct queue_limits *lim)
static int hptiop_sdev_configure(struct scsi_device *sdev,
struct queue_limits *lim)
{
if (sdev->type == TYPE_TAPE)
lim->max_hw_sectors = 8192;
@ -1168,7 +1168,7 @@ static const struct scsi_host_template driver_template = {
.emulated = 0,
.proc_name = driver_name,
.shost_groups = hptiop_host_groups,
.device_configure = hptiop_device_configure,
.sdev_configure = hptiop_sdev_configure,
.this_id = -1,
.change_queue_depth = hptiop_adjust_disk_queue_depth,
.cmd_size = sizeof(struct hpt_cmd_priv),

View File

@ -4769,7 +4769,7 @@ static void ipr_sdev_destroy(struct scsi_device *sdev)
}
/**
* ipr_device_configure - Configure a SCSI device
* ipr_sdev_configure - Configure a SCSI device
* @sdev: scsi device struct
* @lim: queue limits
*
@ -4778,8 +4778,8 @@ static void ipr_sdev_destroy(struct scsi_device *sdev)
* Return value:
* 0 on success
**/
static int ipr_device_configure(struct scsi_device *sdev,
struct queue_limits *lim)
static int ipr_sdev_configure(struct scsi_device *sdev,
struct queue_limits *lim)
{
struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata;
struct ipr_resource_entry *res;
@ -6399,7 +6399,7 @@ static const struct scsi_host_template driver_template = {
.eh_device_reset_handler = ipr_eh_dev_reset,
.eh_host_reset_handler = ipr_eh_host_reset,
.sdev_init = ipr_sdev_init,
.device_configure = ipr_device_configure,
.sdev_configure = ipr_sdev_configure,
.sdev_destroy = ipr_sdev_destroy,
.scan_finished = ipr_scan_finished,
.target_destroy = ipr_target_destroy,

View File

@ -1057,8 +1057,8 @@ static umode_t iscsi_sw_tcp_attr_is_visible(int param_type, int param)
return 0;
}
static int iscsi_sw_tcp_device_configure(struct scsi_device *sdev,
struct queue_limits *lim)
static int iscsi_sw_tcp_sdev_configure(struct scsi_device *sdev,
struct queue_limits *lim)
{
struct iscsi_sw_tcp_host *tcp_sw_host = iscsi_host_priv(sdev->host);
struct iscsi_session *session = tcp_sw_host->session;
@ -1083,7 +1083,7 @@ static const struct scsi_host_template iscsi_sw_tcp_sht = {
.eh_device_reset_handler= iscsi_eh_device_reset,
.eh_target_reset_handler = iscsi_eh_recover_target,
.dma_boundary = PAGE_SIZE - 1,
.device_configure = iscsi_sw_tcp_device_configure,
.sdev_configure = iscsi_sw_tcp_sdev_configure,
.proc_name = "iscsi_tcp",
.this_id = -1,
.track_queue_depth = 1,

View File

@ -804,15 +804,14 @@ EXPORT_SYMBOL_GPL(sas_target_alloc);
#define SAS_DEF_QD 256
int sas_device_configure(struct scsi_device *scsi_dev,
struct queue_limits *lim)
int sas_sdev_configure(struct scsi_device *scsi_dev, struct queue_limits *lim)
{
struct domain_device *dev = sdev_to_domain_dev(scsi_dev);
BUG_ON(dev->rphy->identify.device_type != SAS_END_DEVICE);
if (dev_is_sata(dev)) {
ata_sas_device_configure(scsi_dev, lim, dev->sata_dev.ap);
ata_sas_sdev_configure(scsi_dev, lim, dev->sata_dev.ap);
return 0;
}
@ -830,7 +829,7 @@ int sas_device_configure(struct scsi_device *scsi_dev,
return 0;
}
EXPORT_SYMBOL_GPL(sas_device_configure);
EXPORT_SYMBOL_GPL(sas_sdev_configure);
int sas_change_queue_depth(struct scsi_device *sdev, int depth)
{

View File

@ -2068,8 +2068,8 @@ static void megasas_set_static_target_properties(struct scsi_device *sdev,
}
static int megasas_device_configure(struct scsi_device *sdev,
struct queue_limits *lim)
static int megasas_sdev_configure(struct scsi_device *sdev,
struct queue_limits *lim)
{
u16 pd_index = 0;
struct megasas_instance *instance;
@ -3510,7 +3510,7 @@ static const struct scsi_host_template megasas_template = {
.module = THIS_MODULE,
.name = "Avago SAS based MegaRAID driver",
.proc_name = "megaraid_sas",
.device_configure = megasas_device_configure,
.sdev_configure = megasas_sdev_configure,
.sdev_init = megasas_sdev_init,
.sdev_destroy = megasas_sdev_destroy,
.queuecommand = megasas_queue_command,

View File

@ -4552,7 +4552,7 @@ static void mpi3mr_target_destroy(struct scsi_target *starget)
}
/**
* mpi3mr_device_configure - Slave configure callback handler
* mpi3mr_sdev_configure - Slave configure callback handler
* @sdev: SCSI device reference
* @lim: queue limits
*
@ -4561,8 +4561,8 @@ static void mpi3mr_target_destroy(struct scsi_target *starget)
*
* Return: 0 always.
*/
static int mpi3mr_device_configure(struct scsi_device *sdev,
struct queue_limits *lim)
static int mpi3mr_sdev_configure(struct scsi_device *sdev,
struct queue_limits *lim)
{
struct scsi_target *starget;
struct Scsi_Host *shost;
@ -5063,7 +5063,7 @@ static const struct scsi_host_template mpi3mr_driver_template = {
.queuecommand = mpi3mr_qcmd,
.target_alloc = mpi3mr_target_alloc,
.sdev_init = mpi3mr_sdev_init,
.device_configure = mpi3mr_device_configure,
.sdev_configure = mpi3mr_sdev_configure,
.target_destroy = mpi3mr_target_destroy,
.sdev_destroy = mpi3mr_sdev_destroy,
.scan_finished = mpi3mr_scan_finished,

View File

@ -2497,7 +2497,7 @@ _scsih_enable_tlr(struct MPT3SAS_ADAPTER *ioc, struct scsi_device *sdev)
}
/**
* scsih_device_configure - device configure routine.
* scsih_sdev_configure - device configure routine.
* @sdev: scsi device struct
* @lim: queue limits
*
@ -2505,7 +2505,7 @@ _scsih_enable_tlr(struct MPT3SAS_ADAPTER *ioc, struct scsi_device *sdev)
* the device is ignored.
*/
static int
scsih_device_configure(struct scsi_device *sdev, struct queue_limits *lim)
scsih_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim)
{
struct Scsi_Host *shost = sdev->host;
struct MPT3SAS_ADAPTER *ioc = shost_priv(shost);
@ -11906,7 +11906,7 @@ static const struct scsi_host_template mpt2sas_driver_template = {
.queuecommand = scsih_qcmd,
.target_alloc = scsih_target_alloc,
.sdev_init = scsih_sdev_init,
.device_configure = scsih_device_configure,
.sdev_configure = scsih_sdev_configure,
.target_destroy = scsih_target_destroy,
.sdev_destroy = scsih_sdev_destroy,
.scan_finished = scsih_scan_finished,
@ -11944,7 +11944,7 @@ static const struct scsi_host_template mpt3sas_driver_template = {
.queuecommand = scsih_qcmd,
.target_alloc = scsih_target_alloc,
.sdev_init = scsih_sdev_init,
.device_configure = scsih_device_configure,
.sdev_configure = scsih_sdev_configure,
.target_destroy = scsih_target_destroy,
.sdev_destroy = scsih_sdev_destroy,
.scan_finished = scsih_scan_finished,

View File

@ -197,7 +197,7 @@ static int pmcraid_sdev_init(struct scsi_device *scsi_dev)
}
/**
* pmcraid_device_configure - Configures a SCSI device
* pmcraid_sdev_configure - Configures a SCSI device
* @scsi_dev: scsi device struct
* @lim: queue limits
*
@ -210,8 +210,8 @@ static int pmcraid_sdev_init(struct scsi_device *scsi_dev)
* Return value:
* 0 on success
*/
static int pmcraid_device_configure(struct scsi_device *scsi_dev,
struct queue_limits *lim)
static int pmcraid_sdev_configure(struct scsi_device *scsi_dev,
struct queue_limits *lim)
{
struct pmcraid_resource_entry *res = scsi_dev->hostdata;
@ -3669,7 +3669,7 @@ static const struct scsi_host_template pmcraid_host_template = {
.eh_host_reset_handler = pmcraid_eh_host_reset_handler,
.sdev_init = pmcraid_sdev_init,
.device_configure = pmcraid_device_configure,
.sdev_configure = pmcraid_sdev_configure,
.sdev_destroy = pmcraid_sdev_destroy,
.change_queue_depth = pmcraid_change_queue_depth,
.can_queue = PMCRAID_MAX_IO_CMD,

View File

@ -227,7 +227,7 @@ static int scsi_realloc_sdev_budget_map(struct scsi_device *sdev,
/*
* realloc if new shift is calculated, which is caused by setting
* up one new default queue depth after calling ->device_configure
* up one new default queue depth after calling ->sdev_configure
*/
if (!need_alloc && new_shift != sdev->budget_map.shift)
need_alloc = need_free = true;
@ -1074,8 +1074,8 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
else if (*bflags & BLIST_MAX_1024)
lim.max_hw_sectors = 1024;
if (hostt->device_configure)
ret = hostt->device_configure(sdev, &lim);
if (hostt->sdev_configure)
ret = hostt->sdev_configure(sdev, &lim);
else if (hostt->slave_configure)
ret = hostt->slave_configure(sdev);
if (ret) {
@ -1097,12 +1097,12 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
}
/*
* The queue_depth is often changed in ->device_configure.
* The queue_depth is often changed in ->sdev_configure.
*
* Set up budget map again since memory consumption of the map depends
* on actual queue depth.
*/
if (hostt->device_configure || hostt->slave_configure)
if (hostt->sdev_configure || hostt->slave_configure)
scsi_realloc_sdev_budget_map(sdev, sdev->queue_depth);
if (sdev->scsi_level >= SCSI_3)

View File

@ -5206,14 +5206,14 @@ static int ufshcd_change_queue_depth(struct scsi_device *sdev, int depth)
}
/**
* ufshcd_device_configure - adjust SCSI device configurations
* ufshcd_sdev_configure - adjust SCSI device configurations
* @sdev: pointer to SCSI device
* @lim: queue limits
*
* Return: 0 (success).
*/
static int ufshcd_device_configure(struct scsi_device *sdev,
struct queue_limits *lim)
static int ufshcd_sdev_configure(struct scsi_device *sdev,
struct queue_limits *lim)
{
struct ufs_hba *hba = shost_priv(sdev->host);
struct request_queue *q = sdev->request_queue;
@ -8931,7 +8931,7 @@ static const struct scsi_host_template ufshcd_driver_template = {
.queuecommand = ufshcd_queuecommand,
.mq_poll = ufshcd_poll,
.sdev_init = ufshcd_sdev_init,
.device_configure = ufshcd_device_configure,
.sdev_configure = ufshcd_sdev_configure,
.sdev_destroy = ufshcd_sdev_destroy,
.change_queue_depth = ufshcd_change_queue_depth,
.eh_abort_handler = ufshcd_abort,

View File

@ -88,7 +88,7 @@ static int sdev_init (struct scsi_device *sdev)
return 0;
}
static int device_configure(struct scsi_device *sdev, struct queue_limits *lim)
static int sdev_configure(struct scsi_device *sdev, struct queue_limits *lim)
{
struct us_data *us = host_to_us(sdev->host);
struct device *dev = us->pusb_dev->bus->sysdev;
@ -638,7 +638,7 @@ static const struct scsi_host_template usb_stor_host_template = {
.this_id = -1,
.sdev_init = sdev_init,
.device_configure = device_configure,
.sdev_configure = sdev_configure,
.target_alloc = target_alloc,
/* lots of sg segments can be handled */

View File

@ -832,8 +832,8 @@ static int uas_sdev_init(struct scsi_device *sdev)
return 0;
}
static int uas_device_configure(struct scsi_device *sdev,
struct queue_limits *lim)
static int uas_sdev_configure(struct scsi_device *sdev,
struct queue_limits *lim)
{
struct uas_dev_info *devinfo = sdev->hostdata;
@ -906,7 +906,7 @@ static const struct scsi_host_template uas_host_template = {
.queuecommand = uas_queuecommand,
.target_alloc = uas_target_alloc,
.sdev_init = uas_sdev_init,
.device_configure = uas_device_configure,
.sdev_configure = uas_sdev_configure,
.eh_abort_handler = uas_eh_abort_handler,
.eh_device_reset_handler = uas_eh_device_reset_handler,
.this_id = -1,

View File

@ -1200,8 +1200,7 @@ extern int ata_std_bios_param(struct scsi_device *sdev,
sector_t capacity, int geom[]);
extern void ata_scsi_unlock_native_capacity(struct scsi_device *sdev);
extern int ata_scsi_sdev_init(struct scsi_device *sdev);
int ata_scsi_device_configure(struct scsi_device *sdev,
struct queue_limits *lim);
int ata_scsi_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim);
extern void ata_scsi_sdev_destroy(struct scsi_device *sdev);
extern int ata_scsi_change_queue_depth(struct scsi_device *sdev,
int queue_depth);
@ -1301,8 +1300,8 @@ extern struct ata_port *ata_port_alloc(struct ata_host *host);
extern void ata_port_free(struct ata_port *ap);
extern int ata_tport_add(struct device *parent, struct ata_port *ap);
extern void ata_tport_delete(struct ata_port *ap);
int ata_sas_device_configure(struct scsi_device *sdev, struct queue_limits *lim,
struct ata_port *ap);
int ata_sas_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim,
struct ata_port *ap);
extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap);
extern void ata_tf_to_fis(const struct ata_taskfile *tf,
u8 pmp, int is_cmd, u8 *fis);
@ -1468,13 +1467,13 @@ extern const struct attribute_group *ata_common_sdev_groups[];
__ATA_BASE_SHT(drv_name), \
.can_queue = ATA_DEF_QUEUE, \
.tag_alloc_policy = BLK_TAG_ALLOC_RR, \
.device_configure = ata_scsi_device_configure
.sdev_configure = ata_scsi_sdev_configure
#define ATA_SUBBASE_SHT_QD(drv_name, drv_qd) \
__ATA_BASE_SHT(drv_name), \
.can_queue = drv_qd, \
.tag_alloc_policy = BLK_TAG_ALLOC_RR, \
.device_configure = ata_scsi_device_configure
.sdev_configure = ata_scsi_sdev_configure
#define ATA_BASE_SHT(drv_name) \
ATA_SUBBASE_SHT(drv_name), \

View File

@ -683,8 +683,7 @@ int sas_phy_reset(struct sas_phy *phy, int hard_reset);
int sas_phy_enable(struct sas_phy *phy, int enable);
extern int sas_queuecommand(struct Scsi_Host *, struct scsi_cmnd *);
extern int sas_target_alloc(struct scsi_target *);
int sas_device_configure(struct scsi_device *dev,
struct queue_limits *lim);
int sas_sdev_configure(struct scsi_device *dev, struct queue_limits *lim);
extern int sas_change_queue_depth(struct scsi_device *, int new_depth);
extern int sas_bios_param(struct scsi_device *, struct block_device *,
sector_t capacity, int *hsc);
@ -750,7 +749,7 @@ void sas_notify_phy_event(struct asd_sas_phy *phy, enum phy_event event,
#endif
#define LIBSAS_SHT_BASE _LIBSAS_SHT_BASE \
.device_configure = sas_device_configure, \
.sdev_configure = sas_sdev_configure, \
.sdev_init = sas_sdev_init, \
#define LIBSAS_SHT_BASE_NO_SLAVE_INIT _LIBSAS_SHT_BASE

View File

@ -212,10 +212,10 @@ struct scsi_host_template {
*
* Status: OPTIONAL
*
* Note: slave_configure is the legacy version, use device_configure for
* Note: slave_configure is the legacy version, use sdev_configure for
* all new code. A driver must never define both.
*/
int (* device_configure)(struct scsi_device *, struct queue_limits *lim);
int (* sdev_configure)(struct scsi_device *, struct queue_limits *lim);
int (* slave_configure)(struct scsi_device *);
/*