@@ -296,7 +296,8 @@ static void nv_nf2_freeze(struct ata_port *ap);
296296static void nv_nf2_thaw (struct ata_port * ap );
297297static void nv_ck804_freeze (struct ata_port * ap );
298298static void nv_ck804_thaw (struct ata_port * ap );
299- static int nv_adma_slave_config (struct scsi_device * sdev );
299+ static int nv_adma_device_configure (struct scsi_device * sdev ,
300+ struct queue_limits * lim );
300301static int nv_adma_check_atapi_dma (struct ata_queued_cmd * qc );
301302static enum ata_completion_errors nv_adma_qc_prep (struct ata_queued_cmd * qc );
302303static unsigned int nv_adma_qc_issue (struct ata_queued_cmd * qc );
@@ -318,7 +319,8 @@ static void nv_adma_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
318319static void nv_mcp55_thaw (struct ata_port * ap );
319320static void nv_mcp55_freeze (struct ata_port * ap );
320321static void nv_swncq_error_handler (struct ata_port * ap );
321- static int nv_swncq_slave_config (struct scsi_device * sdev );
322+ static int nv_swncq_device_configure (struct scsi_device * sdev ,
323+ struct queue_limits * lim );
322324static int nv_swncq_port_start (struct ata_port * ap );
323325static enum ata_completion_errors nv_swncq_qc_prep (struct ata_queued_cmd * qc );
324326static void nv_swncq_fill_sg (struct ata_queued_cmd * qc );
@@ -380,7 +382,7 @@ static const struct scsi_host_template nv_adma_sht = {
380382 .can_queue = NV_ADMA_MAX_CPBS ,
381383 .sg_tablesize = NV_ADMA_SGTBL_TOTAL_LEN ,
382384 .dma_boundary = NV_ADMA_DMA_BOUNDARY ,
383- .slave_configure = nv_adma_slave_config ,
385+ .device_configure = nv_adma_device_configure ,
384386 .sdev_groups = ata_ncq_sdev_groups ,
385387 .change_queue_depth = ata_scsi_change_queue_depth ,
386388 .tag_alloc_policy = BLK_TAG_ALLOC_RR ,
@@ -391,7 +393,7 @@ static const struct scsi_host_template nv_swncq_sht = {
391393 .can_queue = ATA_MAX_QUEUE - 1 ,
392394 .sg_tablesize = LIBATA_MAX_PRD ,
393395 .dma_boundary = ATA_DMA_BOUNDARY ,
394- .slave_configure = nv_swncq_slave_config ,
396+ .device_configure = nv_swncq_device_configure ,
395397 .sdev_groups = ata_ncq_sdev_groups ,
396398 .change_queue_depth = ata_scsi_change_queue_depth ,
397399 .tag_alloc_policy = BLK_TAG_ALLOC_RR ,
@@ -661,7 +663,8 @@ static void nv_adma_mode(struct ata_port *ap)
661663 pp -> flags &= ~NV_ADMA_PORT_REGISTER_MODE ;
662664}
663665
664- static int nv_adma_slave_config (struct scsi_device * sdev )
666+ static int nv_adma_device_configure (struct scsi_device * sdev ,
667+ struct queue_limits * lim )
665668{
666669 struct ata_port * ap = ata_shost_to_port (sdev -> host );
667670 struct nv_adma_port_priv * pp = ap -> private_data ;
@@ -740,8 +743,8 @@ static int nv_adma_slave_config(struct scsi_device *sdev)
740743 rc = dma_set_mask (& pdev -> dev , pp -> adma_dma_mask );
741744 }
742745
743- blk_queue_segment_boundary ( sdev -> request_queue , segment_boundary ) ;
744- blk_queue_max_segments ( sdev -> request_queue , sg_tablesize ) ;
746+ lim -> seg_boundary_mask = segment_boundary ;
747+ lim -> max_segments = sg_tablesize ;
745748 ata_port_info (ap ,
746749 "DMA mask 0x%llX, segment boundary 0x%lX, hw segs %hu\n" ,
747750 (unsigned long long )* ap -> host -> dev -> dma_mask ,
@@ -1868,7 +1871,8 @@ static void nv_swncq_host_init(struct ata_host *host)
18681871 writel (~0x0 , mmio + NV_INT_STATUS_MCP55 );
18691872}
18701873
1871- static int nv_swncq_slave_config (struct scsi_device * sdev )
1874+ static int nv_swncq_device_configure (struct scsi_device * sdev ,
1875+ struct queue_limits * lim )
18721876{
18731877 struct ata_port * ap = ata_shost_to_port (sdev -> host );
18741878 struct pci_dev * pdev = to_pci_dev (ap -> host -> dev );
0 commit comments