core.c (eb793e2c9286cca415423edff4942e4ba28e3cd4) core.c (07bfcd09a288551b4377836a11c6250e1fd01e6d)
1/*
2 * NVM Express device driver
3 * Copyright (c) 2011-2014, Intel Corporation.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *

--- 1164 unchanged lines hidden (view full) ---

1173 ctrl->max_hw_sectors = min(max_hw_sectors,
1174 ctrl->max_hw_sectors);
1175 } else {
1176 ctrl->max_hw_sectors = max_hw_sectors;
1177 }
1178 }
1179
1180 nvme_set_queue_limits(ctrl, ctrl->admin_q);
1/*
2 * NVM Express device driver
3 * Copyright (c) 2011-2014, Intel Corporation.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *

--- 1164 unchanged lines hidden (view full) ---

1173 ctrl->max_hw_sectors = min(max_hw_sectors,
1174 ctrl->max_hw_sectors);
1175 } else {
1176 ctrl->max_hw_sectors = max_hw_sectors;
1177 }
1178 }
1179
1180 nvme_set_queue_limits(ctrl, ctrl->admin_q);
1181 ctrl->sgls = le32_to_cpu(id->sgls);
1181
1182
1183 if (ctrl->ops->is_fabrics) {
1184 ctrl->icdoff = le16_to_cpu(id->icdoff);
1185 ctrl->ioccsz = le32_to_cpu(id->ioccsz);
1186 ctrl->iorcsz = le32_to_cpu(id->iorcsz);
1187 ctrl->maxcmd = le16_to_cpu(id->maxcmd);
1188
1189 /*
1190 * In fabrics we need to verify the cntlid matches the
1191 * admin connect
1192 */
1193 if (ctrl->cntlid != le16_to_cpu(id->cntlid))
1194 ret = -EINVAL;
1195 } else {
1196 ctrl->cntlid = le16_to_cpu(id->cntlid);
1197 }
1198
1182 kfree(id);
1199 kfree(id);
1183 return 0;
1200 return ret;
1184}
1185EXPORT_SYMBOL_GPL(nvme_init_identify);
1186
1187static int nvme_dev_open(struct inode *inode, struct file *file)
1188{
1189 struct nvme_ctrl *ctrl;
1190 int instance = iminor(inode);
1191 int ret = -ENODEV;

--- 817 unchanged lines hidden ---
1201}
1202EXPORT_SYMBOL_GPL(nvme_init_identify);
1203
1204static int nvme_dev_open(struct inode *inode, struct file *file)
1205{
1206 struct nvme_ctrl *ctrl;
1207 int instance = iminor(inode);
1208 int ret = -ENODEV;

--- 817 unchanged lines hidden ---