* [linux-stable-rc:linux-4.19.y 1170/9999] drivers/nvme/host/pci.c:1173:12: warning: this statement may fall through
@ 2021-04-24 20:56 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-04-24 20:56 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5699 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
head: e864f43593ccf9180c61738abdf1c1dde091367d
commit: 52d7b067fadf8b66eabd6101338a871e14e872df [1170/9999] nvme-pci: shutdown on timeout during deletion
config: alpha-randconfig-r035-20210424 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=52d7b067fadf8b66eabd6101338a871e14e872df
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-4.19.y
git checkout 52d7b067fadf8b66eabd6101338a871e14e872df
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/nvme/host/pci.c: In function 'nvme_timeout':
>> drivers/nvme/host/pci.c:1173:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
1173 | shutdown = true;
| ~~~~~~~~~^~~~~~
drivers/nvme/host/pci.c:1174:2: note: here
1174 | case NVME_CTRL_CONNECTING:
| ^~~~
drivers/nvme/host/pci.c:1260: warning: Function parameter or member 'nvmeq' not described in 'nvme_suspend_queue'
vim +1173 drivers/nvme/host/pci.c
1127
1128 static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
1129 {
1130 struct nvme_iod *iod = blk_mq_rq_to_pdu(req);
1131 struct nvme_queue *nvmeq = iod->nvmeq;
1132 struct nvme_dev *dev = nvmeq->dev;
1133 struct request *abort_req;
1134 struct nvme_command cmd;
1135 bool shutdown = false;
1136 u32 csts = readl(dev->bar + NVME_REG_CSTS);
1137
1138 /* If PCI error recovery process is happening, we cannot reset or
1139 * the recovery mechanism will surely fail.
1140 */
1141 mb();
1142 if (pci_channel_offline(to_pci_dev(dev->dev)))
1143 return BLK_EH_RESET_TIMER;
1144
1145 /*
1146 * Reset immediately if the controller is failed
1147 */
1148 if (nvme_should_reset(dev, csts)) {
1149 nvme_warn_reset(dev, csts);
1150 nvme_dev_disable(dev, false);
1151 nvme_reset_ctrl(&dev->ctrl);
1152 return BLK_EH_DONE;
1153 }
1154
1155 /*
1156 * Did we miss an interrupt?
1157 */
1158 if (__nvme_poll(nvmeq, req->tag)) {
1159 dev_warn(dev->ctrl.device,
1160 "I/O %d QID %d timeout, completion polled\n",
1161 req->tag, nvmeq->qid);
1162 return BLK_EH_DONE;
1163 }
1164
1165 /*
1166 * Shutdown immediately if controller times out while starting. The
1167 * reset work will see the pci device disabled when it gets the forced
1168 * cancellation error. All outstanding requests are completed on
1169 * shutdown, so we return BLK_EH_DONE.
1170 */
1171 switch (dev->ctrl.state) {
1172 case NVME_CTRL_DELETING:
> 1173 shutdown = true;
1174 case NVME_CTRL_CONNECTING:
1175 case NVME_CTRL_RESETTING:
1176 dev_warn_ratelimited(dev->ctrl.device,
1177 "I/O %d QID %d timeout, disable controller\n",
1178 req->tag, nvmeq->qid);
1179 nvme_dev_disable(dev, shutdown);
1180 nvme_req(req)->flags |= NVME_REQ_CANCELLED;
1181 return BLK_EH_DONE;
1182 default:
1183 break;
1184 }
1185
1186 /*
1187 * Shutdown the controller immediately and schedule a reset if the
1188 * command was already aborted once before and still hasn't been
1189 * returned to the driver, or if this is the admin queue.
1190 */
1191 if (!nvmeq->qid || iod->aborted) {
1192 dev_warn(dev->ctrl.device,
1193 "I/O %d QID %d timeout, reset controller\n",
1194 req->tag, nvmeq->qid);
1195 nvme_dev_disable(dev, false);
1196 nvme_reset_ctrl(&dev->ctrl);
1197
1198 nvme_req(req)->flags |= NVME_REQ_CANCELLED;
1199 return BLK_EH_DONE;
1200 }
1201
1202 if (atomic_dec_return(&dev->ctrl.abort_limit) < 0) {
1203 atomic_inc(&dev->ctrl.abort_limit);
1204 return BLK_EH_RESET_TIMER;
1205 }
1206 iod->aborted = 1;
1207
1208 memset(&cmd, 0, sizeof(cmd));
1209 cmd.abort.opcode = nvme_admin_abort_cmd;
1210 cmd.abort.cid = req->tag;
1211 cmd.abort.sqid = cpu_to_le16(nvmeq->qid);
1212
1213 dev_warn(nvmeq->dev->ctrl.device,
1214 "I/O %d QID %d timeout, aborting\n",
1215 req->tag, nvmeq->qid);
1216
1217 abort_req = nvme_alloc_request(dev->ctrl.admin_q, &cmd,
1218 BLK_MQ_REQ_NOWAIT, NVME_QID_ANY);
1219 if (IS_ERR(abort_req)) {
1220 atomic_inc(&dev->ctrl.abort_limit);
1221 return BLK_EH_RESET_TIMER;
1222 }
1223
1224 abort_req->timeout = ADMIN_TIMEOUT;
1225 abort_req->end_io_data = NULL;
1226 blk_execute_rq_nowait(abort_req->q, NULL, abort_req, 0, abort_endio);
1227
1228 /*
1229 * The aborted req will be completed on receiving the abort req.
1230 * We enable the timer again. If hit twice, it'll cause a device reset,
1231 * as the device then is in a faulty state.
1232 */
1233 return BLK_EH_RESET_TIMER;
1234 }
1235
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 23106 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-04-24 20:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-24 20:56 [linux-stable-rc:linux-4.19.y 1170/9999] drivers/nvme/host/pci.c:1173:12: warning: this statement may fall through kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.