aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-11-13 06:42:04 -0500
committerChristoph Hellwig <hch@lst.de>2014-11-24 08:44:28 -0500
commit89dac7bb3b0494685241369951f95494e86ee61f (patch)
treecb1b25572b58caae96da709aac649ed92140cfe1 /drivers/scsi/lpfc
parentaa00832b4ca6491c3540ef637ee89a7394711858 (diff)
lpfc: remove queue_depth events
James Smart said the userspace to consume these events never emerged. Given that these get in the way of the following patches remove support for them. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de> Acked-by: James Smart <james.smart@emulex.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c66
1 files changed, 0 insertions, 66 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 8533ee9b818d..80351fff1a07 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -243,60 +243,6 @@ lpfc_update_stats(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd)
243} 243}
244 244
245/** 245/**
246 * lpfc_send_sdev_queuedepth_change_event - Posts a queuedepth change event
247 * @phba: Pointer to HBA context object.
248 * @vport: Pointer to vport object.
249 * @ndlp: Pointer to FC node associated with the target.
250 * @lun: Lun number of the scsi device.
251 * @old_val: Old value of the queue depth.
252 * @new_val: New value of the queue depth.
253 *
254 * This function sends an event to the mgmt application indicating
255 * there is a change in the scsi device queue depth.
256 **/
257static void
258lpfc_send_sdev_queuedepth_change_event(struct lpfc_hba *phba,
259 struct lpfc_vport *vport,
260 struct lpfc_nodelist *ndlp,
261 uint64_t lun,
262 uint32_t old_val,
263 uint32_t new_val)
264{
265 struct lpfc_fast_path_event *fast_path_evt;
266 unsigned long flags;
267
268 fast_path_evt = lpfc_alloc_fast_evt(phba);
269 if (!fast_path_evt)
270 return;
271
272 fast_path_evt->un.queue_depth_evt.scsi_event.event_type =
273 FC_REG_SCSI_EVENT;
274 fast_path_evt->un.queue_depth_evt.scsi_event.subcategory =
275 LPFC_EVENT_VARQUEDEPTH;
276
277 /* Report all luns with change in queue depth */
278 fast_path_evt->un.queue_depth_evt.scsi_event.lun = lun;
279 if (ndlp && NLP_CHK_NODE_ACT(ndlp)) {
280 memcpy(&fast_path_evt->un.queue_depth_evt.scsi_event.wwpn,
281 &ndlp->nlp_portname, sizeof(struct lpfc_name));
282 memcpy(&fast_path_evt->un.queue_depth_evt.scsi_event.wwnn,
283 &ndlp->nlp_nodename, sizeof(struct lpfc_name));
284 }
285
286 fast_path_evt->un.queue_depth_evt.oldval = old_val;
287 fast_path_evt->un.queue_depth_evt.newval = new_val;
288 fast_path_evt->vport = vport;
289
290 fast_path_evt->work_evt.evt = LPFC_EVT_FASTPATH_MGMT_EVT;
291 spin_lock_irqsave(&phba->hbalock, flags);
292 list_add_tail(&fast_path_evt->work_evt.evt_listp, &phba->work_list);
293 spin_unlock_irqrestore(&phba->hbalock, flags);
294 lpfc_worker_wake_up(phba);
295
296 return;
297}
298
299/**
300 * lpfc_change_queue_depth - Alter scsi device queue depth 246 * lpfc_change_queue_depth - Alter scsi device queue depth
301 * @sdev: Pointer the scsi device on which to change the queue depth. 247 * @sdev: Pointer the scsi device on which to change the queue depth.
302 * @qdepth: New queue depth to set the sdev to. 248 * @qdepth: New queue depth to set the sdev to.
@@ -310,11 +256,6 @@ static int
310lpfc_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason) 256lpfc_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason)
311{ 257{
312 struct lpfc_vport *vport = (struct lpfc_vport *) sdev->host->hostdata; 258 struct lpfc_vport *vport = (struct lpfc_vport *) sdev->host->hostdata;
313 struct lpfc_hba *phba = vport->phba;
314 struct lpfc_rport_data *rdata;
315 unsigned long new_queue_depth, old_queue_depth;
316
317 old_queue_depth = sdev->queue_depth;
318 259
319 switch (reason) { 260 switch (reason) {
320 case SCSI_QDEPTH_DEFAULT: 261 case SCSI_QDEPTH_DEFAULT:
@@ -334,13 +275,6 @@ lpfc_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason)
334 return -EOPNOTSUPP; 275 return -EOPNOTSUPP;
335 } 276 }
336 277
337 new_queue_depth = sdev->queue_depth;
338 rdata = lpfc_rport_data_from_scsi_device(sdev);
339 if (rdata)
340 lpfc_send_sdev_queuedepth_change_event(phba, vport,
341 rdata->pnode, sdev->lun,
342 old_queue_depth,
343 new_queue_depth);
344 return sdev->queue_depth; 278 return sdev->queue_depth;
345} 279}
346 280