]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'for-4.4/lightnvm' into for-next
authorJens Axboe <axboe@fb.com>
Thu, 29 Oct 2015 19:37:37 +0000 (04:37 +0900)
committerJens Axboe <axboe@fb.com>
Thu, 29 Oct 2015 19:37:37 +0000 (04:37 +0900)
1  2 
drivers/nvme/host/pci.c

index 01c0bc780ddf22b9acd19964e1e55226e179b32a,ff47a8b62f6881d14af9059190606e5754f2bea2..73b156fe0c2c6eeeff1a1c35dd6538a2a3e588ea
@@@ -2031,10 -2057,13 +2044,12 @@@ static int nvme_revalidate_disk(struct 
        ns->pi_type = pi_type;
        blk_queue_logical_block_size(ns->queue, bs);
  
 -      if (ns->ms && !blk_get_integrity(disk) && (disk->flags & GENHD_FL_UP) &&
 -                                                              !ns->ext)
 +      if (ns->ms && !ns->ext)
                nvme_init_integrity(ns);
  
-       if (ns->ms && !(ns->ms == 8 && ns->pi_type) && !blk_get_integrity(disk))
+       if ((ns->ms && !(ns->ms == 8 && ns->pi_type) &&
+                                               !blk_get_integrity(disk)) ||
+                                               ns->type == NVME_NS_LIGHTNVM)
                set_capacity(disk, 0);
        else
                set_capacity(disk, le64_to_cpup(&id->nsze) << (ns->lba_shift - 9));