.. | .. |
---|
127 | 127 | .this_id = -1, |
---|
128 | 128 | .cmd_per_lun = SNIC_DFLT_QUEUE_DEPTH, |
---|
129 | 129 | .can_queue = SNIC_MAX_IO_REQ, |
---|
130 | | - .use_clustering = ENABLE_CLUSTERING, |
---|
131 | 130 | .sg_tablesize = SNIC_MAX_SG_DESC_CNT, |
---|
132 | 131 | .max_sectors = 0x800, |
---|
133 | 132 | .shost_attrs = snic_attrs, |
---|
.. | .. |
---|
398 | 397 | PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); |
---|
399 | 398 | #ifdef CONFIG_SCSI_SNIC_DEBUG_FS |
---|
400 | 399 | /* 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); |
---|
407 | 401 | #endif |
---|
408 | 402 | |
---|
409 | 403 | /* Setup PCI Resources */ |
---|
.. | .. |
---|
435 | 429 | * limitation for the device. Try 43-bit first, and |
---|
436 | 430 | * fail to 32-bit. |
---|
437 | 431 | */ |
---|
438 | | - ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(43)); |
---|
| 432 | + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(43)); |
---|
439 | 433 | 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)); |
---|
441 | 435 | if (ret) { |
---|
442 | 436 | SNIC_HOST_ERR(shost, |
---|
443 | 437 | "No Usable DMA Configuration, aborting %d\n", |
---|
444 | 438 | 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 | | - |
---|
464 | 439 | goto err_rel_regions; |
---|
465 | 440 | } |
---|
466 | 441 | } |
---|
467 | | - |
---|
468 | 442 | |
---|
469 | 443 | /* Map vNIC resources from BAR0 */ |
---|
470 | 444 | if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) { |
---|
.. | .. |
---|
871 | 845 | #ifdef CONFIG_SCSI_SNIC_DEBUG_FS |
---|
872 | 846 | /* Debugfs related Initialization */ |
---|
873 | 847 | /* 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(); |
---|
880 | 849 | |
---|
881 | 850 | /* Trace related Initialization */ |
---|
882 | 851 | /* Allocate memory for trace buffer */ |
---|