Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
"Driver fixes plus core sd.c fix are all small and obvious.

The larger change to hosts.c is less obvious, but required to avoid
data corruption caused by bio splitting"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: ufs: core: Fix spelling of a sysfs attribute name
scsi: core: Enforce unlimited max_segment_size when virt_boundary_mask is set
scsi: RDMA/srp: Don't set a max_segment_size when virt_boundary_mask is set
scsi: sd: Fix VPD page 0xb7 length check
scsi: qla4xxx: Fix missing DMA mapping error in qla4xxx_alloc_pdu()
scsi: qla2xxx: Fix DMA mapping test in qla24xx_get_port_database()

+21 -14
+1 -1
Documentation/ABI/testing/sysfs-driver-ufs
··· 711 711 712 712 The file is read only. 713 713 714 - What: /sys/class/scsi_device/*/device/unit_descriptor/physical_memory_resourse_count 714 + What: /sys/class/scsi_device/*/device/unit_descriptor/physical_memory_resource_count 715 715 Date: February 2018 716 716 Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com> 717 717 Description: This file shows the total physical memory resources. This is
+3 -2
drivers/infiniband/ulp/srp/ib_srp.c
··· 3705 3705 target_host->max_id = 1; 3706 3706 target_host->max_lun = -1LL; 3707 3707 target_host->max_cmd_len = sizeof ((struct srp_cmd *) (void *) 0L)->cdb; 3708 - target_host->max_segment_size = ib_dma_max_seg_size(ibdev); 3709 3708 3710 - if (!(ibdev->attrs.kernel_cap_flags & IBK_SG_GAPS_REG)) 3709 + if (ibdev->attrs.kernel_cap_flags & IBK_SG_GAPS_REG) 3710 + target_host->max_segment_size = ib_dma_max_seg_size(ibdev); 3711 + else 3711 3712 target_host->virt_boundary_mask = ~srp_dev->mr_page_mask; 3712 3713 3713 3714 target = host_to_target(target_host);
+11 -7
drivers/scsi/hosts.c
··· 473 473 else 474 474 shost->max_sectors = SCSI_DEFAULT_MAX_SECTORS; 475 475 476 - if (sht->max_segment_size) 477 - shost->max_segment_size = sht->max_segment_size; 478 - else 479 - shost->max_segment_size = BLK_MAX_SEGMENT_SIZE; 476 + shost->virt_boundary_mask = sht->virt_boundary_mask; 477 + if (shost->virt_boundary_mask) { 478 + WARN_ON_ONCE(sht->max_segment_size && 479 + sht->max_segment_size != UINT_MAX); 480 + shost->max_segment_size = UINT_MAX; 481 + } else { 482 + if (sht->max_segment_size) 483 + shost->max_segment_size = sht->max_segment_size; 484 + else 485 + shost->max_segment_size = BLK_MAX_SEGMENT_SIZE; 486 + } 480 487 481 488 /* 32-byte (dword) is a common minimum for HBAs. */ 482 489 if (sht->dma_alignment) ··· 498 491 shost->dma_boundary = sht->dma_boundary; 499 492 else 500 493 shost->dma_boundary = 0xffffffff; 501 - 502 - if (sht->virt_boundary_mask) 503 - shost->virt_boundary_mask = sht->virt_boundary_mask; 504 494 505 495 device_initialize(&shost->shost_gendev); 506 496 dev_set_name(&shost->shost_gendev, "host%d", shost->host_no);
+1 -1
drivers/scsi/qla2xxx/qla_mbx.c
··· 2147 2147 2148 2148 pdb_dma = dma_map_single(&vha->hw->pdev->dev, pdb, 2149 2149 sizeof(*pdb), DMA_FROM_DEVICE); 2150 - if (!pdb_dma) { 2150 + if (dma_mapping_error(&vha->hw->pdev->dev, pdb_dma)) { 2151 2151 ql_log(ql_log_warn, vha, 0x1116, "Failed to map dma buffer.\n"); 2152 2152 return QLA_MEMORY_ALLOC_FAILED; 2153 2153 }
+2
drivers/scsi/qla4xxx/ql4_os.c
··· 3420 3420 task_data->data_dma = dma_map_single(&ha->pdev->dev, task->data, 3421 3421 task->data_count, 3422 3422 DMA_TO_DEVICE); 3423 + if (dma_mapping_error(&ha->pdev->dev, task_data->data_dma)) 3424 + return -ENOMEM; 3423 3425 } 3424 3426 3425 3427 DEBUG2(ql4_printk(KERN_INFO, ha, "%s: MaxRecvLen %u, iscsi hrd %d\n",
+1 -1
drivers/scsi/sd.c
··· 3384 3384 3385 3385 rcu_read_lock(); 3386 3386 vpd = rcu_dereference(sdkp->device->vpd_pgb7); 3387 - if (vpd && vpd->len >= 2) 3387 + if (vpd && vpd->len >= 6) 3388 3388 sdkp->rscs = vpd->data[5] & 1; 3389 3389 rcu_read_unlock(); 3390 3390 }
+2 -2
drivers/ufs/core/ufs-sysfs.c
··· 1808 1808 UFS_UNIT_DESC_PARAM(logical_block_count, _LOGICAL_BLK_COUNT, 8); 1809 1809 UFS_UNIT_DESC_PARAM(erase_block_size, _ERASE_BLK_SIZE, 4); 1810 1810 UFS_UNIT_DESC_PARAM(provisioning_type, _PROVISIONING_TYPE, 1); 1811 - UFS_UNIT_DESC_PARAM(physical_memory_resourse_count, _PHY_MEM_RSRC_CNT, 8); 1811 + UFS_UNIT_DESC_PARAM(physical_memory_resource_count, _PHY_MEM_RSRC_CNT, 8); 1812 1812 UFS_UNIT_DESC_PARAM(context_capabilities, _CTX_CAPABILITIES, 2); 1813 1813 UFS_UNIT_DESC_PARAM(large_unit_granularity, _LARGE_UNIT_SIZE_M1, 1); 1814 1814 UFS_UNIT_DESC_PARAM(wb_buf_alloc_units, _WB_BUF_ALLOC_UNITS, 4); ··· 1825 1825 &dev_attr_logical_block_count.attr, 1826 1826 &dev_attr_erase_block_size.attr, 1827 1827 &dev_attr_provisioning_type.attr, 1828 - &dev_attr_physical_memory_resourse_count.attr, 1828 + &dev_attr_physical_memory_resource_count.attr, 1829 1829 &dev_attr_context_capabilities.attr, 1830 1830 &dev_attr_large_unit_granularity.attr, 1831 1831 &dev_attr_wb_buf_alloc_units.attr,