hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/scsi/snic/snic_main.c
....@@ -127,7 +127,6 @@
127127 .this_id = -1,
128128 .cmd_per_lun = SNIC_DFLT_QUEUE_DEPTH,
129129 .can_queue = SNIC_MAX_IO_REQ,
130
- .use_clustering = ENABLE_CLUSTERING,
131130 .sg_tablesize = SNIC_MAX_SG_DESC_CNT,
132131 .max_sectors = 0x800,
133132 .shost_attrs = snic_attrs,
....@@ -398,12 +397,7 @@
398397 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn));
399398 #ifdef CONFIG_SCSI_SNIC_DEBUG_FS
400399 /* Per snic debugfs init */
401
- ret = snic_stats_debugfs_init(snic);
402
- if (ret) {
403
- SNIC_HOST_ERR(snic->shost,
404
- "Failed to initialize debugfs stats\n");
405
- snic_stats_debugfs_remove(snic);
406
- }
400
+ snic_stats_debugfs_init(snic);
407401 #endif
408402
409403 /* Setup PCI Resources */
....@@ -435,36 +429,16 @@
435429 * limitation for the device. Try 43-bit first, and
436430 * fail to 32-bit.
437431 */
438
- ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(43));
432
+ ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(43));
439433 if (ret) {
440
- ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
434
+ ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
441435 if (ret) {
442436 SNIC_HOST_ERR(shost,
443437 "No Usable DMA Configuration, aborting %d\n",
444438 ret);
445
-
446
- goto err_rel_regions;
447
- }
448
-
449
- ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
450
- if (ret) {
451
- SNIC_HOST_ERR(shost,
452
- "Unable to obtain 32-bit DMA for consistent allocations, aborting: %d\n",
453
- ret);
454
-
455
- goto err_rel_regions;
456
- }
457
- } else {
458
- ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(43));
459
- if (ret) {
460
- SNIC_HOST_ERR(shost,
461
- "Unable to obtain 43-bit DMA for consistent allocations. aborting: %d\n",
462
- ret);
463
-
464439 goto err_rel_regions;
465440 }
466441 }
467
-
468442
469443 /* Map vNIC resources from BAR0 */
470444 if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) {
....@@ -871,12 +845,7 @@
871845 #ifdef CONFIG_SCSI_SNIC_DEBUG_FS
872846 /* Debugfs related Initialization */
873847 /* Create debugfs entries for snic */
874
- ret = snic_debugfs_init();
875
- if (ret < 0) {
876
- SNIC_ERR("Failed to create sysfs dir for tracing and stats.\n");
877
- snic_debugfs_term();
878
- /* continue even if it fails */
879
- }
848
+ snic_debugfs_init();
880849
881850 /* Trace related Initialization */
882851 /* Allocate memory for trace buffer */