Commit 9080c924 authored by Sebastian Ott's avatar Sebastian Ott Committed by Martin Schwidefsky

s390/qdio: obtain subchannel_id via ccw_device_get_schid()

We want to get rid of the copy of struct subchannel_id maintained in
ccw_device_private, so obtain it using ccw_device_get_schid().
Signed-off-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: default avatarUrsula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 7de6a63c
...@@ -1066,10 +1066,12 @@ void qdio_int_handler(struct ccw_device *cdev, unsigned long intparm, ...@@ -1066,10 +1066,12 @@ void qdio_int_handler(struct ccw_device *cdev, unsigned long intparm,
struct irb *irb) struct irb *irb)
{ {
struct qdio_irq *irq_ptr = cdev->private->qdio_data; struct qdio_irq *irq_ptr = cdev->private->qdio_data;
struct subchannel_id schid;
int cstat, dstat; int cstat, dstat;
if (!intparm || !irq_ptr) { if (!intparm || !irq_ptr) {
DBF_ERROR("qint:%4x", cdev->private->schid.sch_no); ccw_device_get_schid(cdev, &schid);
DBF_ERROR("qint:%4x", schid.sch_no);
return; return;
} }
...@@ -1122,12 +1124,14 @@ void qdio_int_handler(struct ccw_device *cdev, unsigned long intparm, ...@@ -1122,12 +1124,14 @@ void qdio_int_handler(struct ccw_device *cdev, unsigned long intparm,
int qdio_get_ssqd_desc(struct ccw_device *cdev, int qdio_get_ssqd_desc(struct ccw_device *cdev,
struct qdio_ssqd_desc *data) struct qdio_ssqd_desc *data)
{ {
struct subchannel_id schid;
if (!cdev || !cdev->private) if (!cdev || !cdev->private)
return -EINVAL; return -EINVAL;
DBF_EVENT("get ssqd:%4x", cdev->private->schid.sch_no); ccw_device_get_schid(cdev, &schid);
return qdio_setup_get_ssqd(NULL, &cdev->private->schid, data); DBF_EVENT("get ssqd:%4x", schid.sch_no);
return qdio_setup_get_ssqd(NULL, &schid, data);
} }
EXPORT_SYMBOL_GPL(qdio_get_ssqd_desc); EXPORT_SYMBOL_GPL(qdio_get_ssqd_desc);
...@@ -1154,6 +1158,7 @@ static void qdio_shutdown_queues(struct ccw_device *cdev) ...@@ -1154,6 +1158,7 @@ static void qdio_shutdown_queues(struct ccw_device *cdev)
int qdio_shutdown(struct ccw_device *cdev, int how) int qdio_shutdown(struct ccw_device *cdev, int how)
{ {
struct qdio_irq *irq_ptr = cdev->private->qdio_data; struct qdio_irq *irq_ptr = cdev->private->qdio_data;
struct subchannel_id schid;
int rc; int rc;
unsigned long flags; unsigned long flags;
...@@ -1161,7 +1166,8 @@ int qdio_shutdown(struct ccw_device *cdev, int how) ...@@ -1161,7 +1166,8 @@ int qdio_shutdown(struct ccw_device *cdev, int how)
return -ENODEV; return -ENODEV;
WARN_ON_ONCE(irqs_disabled()); WARN_ON_ONCE(irqs_disabled());
DBF_EVENT("qshutdown:%4x", cdev->private->schid.sch_no); ccw_device_get_schid(cdev, &schid);
DBF_EVENT("qshutdown:%4x", schid.sch_no);
mutex_lock(&irq_ptr->setup_mutex); mutex_lock(&irq_ptr->setup_mutex);
/* /*
...@@ -1228,11 +1234,13 @@ EXPORT_SYMBOL_GPL(qdio_shutdown); ...@@ -1228,11 +1234,13 @@ EXPORT_SYMBOL_GPL(qdio_shutdown);
int qdio_free(struct ccw_device *cdev) int qdio_free(struct ccw_device *cdev)
{ {
struct qdio_irq *irq_ptr = cdev->private->qdio_data; struct qdio_irq *irq_ptr = cdev->private->qdio_data;
struct subchannel_id schid;
if (!irq_ptr) if (!irq_ptr)
return -ENODEV; return -ENODEV;
DBF_EVENT("qfree:%4x", cdev->private->schid.sch_no); ccw_device_get_schid(cdev, &schid);
DBF_EVENT("qfree:%4x", schid.sch_no);
DBF_DEV_EVENT(DBF_ERR, irq_ptr, "dbf abandoned"); DBF_DEV_EVENT(DBF_ERR, irq_ptr, "dbf abandoned");
mutex_lock(&irq_ptr->setup_mutex); mutex_lock(&irq_ptr->setup_mutex);
...@@ -1251,9 +1259,11 @@ EXPORT_SYMBOL_GPL(qdio_free); ...@@ -1251,9 +1259,11 @@ EXPORT_SYMBOL_GPL(qdio_free);
*/ */
int qdio_allocate(struct qdio_initialize *init_data) int qdio_allocate(struct qdio_initialize *init_data)
{ {
struct subchannel_id schid;
struct qdio_irq *irq_ptr; struct qdio_irq *irq_ptr;
DBF_EVENT("qallocate:%4x", init_data->cdev->private->schid.sch_no); ccw_device_get_schid(init_data->cdev, &schid);
DBF_EVENT("qallocate:%4x", schid.sch_no);
if ((init_data->no_input_qs && !init_data->input_handler) || if ((init_data->no_input_qs && !init_data->input_handler) ||
(init_data->no_output_qs && !init_data->output_handler)) (init_data->no_output_qs && !init_data->output_handler))
...@@ -1331,12 +1341,14 @@ static void qdio_detect_hsicq(struct qdio_irq *irq_ptr) ...@@ -1331,12 +1341,14 @@ static void qdio_detect_hsicq(struct qdio_irq *irq_ptr)
*/ */
int qdio_establish(struct qdio_initialize *init_data) int qdio_establish(struct qdio_initialize *init_data)
{ {
struct qdio_irq *irq_ptr;
struct ccw_device *cdev = init_data->cdev; struct ccw_device *cdev = init_data->cdev;
struct subchannel_id schid;
struct qdio_irq *irq_ptr;
unsigned long saveflags; unsigned long saveflags;
int rc; int rc;
DBF_EVENT("qestablish:%4x", cdev->private->schid.sch_no); ccw_device_get_schid(cdev, &schid);
DBF_EVENT("qestablish:%4x", schid.sch_no);
irq_ptr = cdev->private->qdio_data; irq_ptr = cdev->private->qdio_data;
if (!irq_ptr) if (!irq_ptr)
...@@ -1407,11 +1419,13 @@ EXPORT_SYMBOL_GPL(qdio_establish); ...@@ -1407,11 +1419,13 @@ EXPORT_SYMBOL_GPL(qdio_establish);
*/ */
int qdio_activate(struct ccw_device *cdev) int qdio_activate(struct ccw_device *cdev)
{ {
struct subchannel_id schid;
struct qdio_irq *irq_ptr; struct qdio_irq *irq_ptr;
int rc; int rc;
unsigned long saveflags; unsigned long saveflags;
DBF_EVENT("qactivate:%4x", cdev->private->schid.sch_no); ccw_device_get_schid(cdev, &schid);
DBF_EVENT("qactivate:%4x", schid.sch_no);
irq_ptr = cdev->private->qdio_data; irq_ptr = cdev->private->qdio_data;
if (!irq_ptr) if (!irq_ptr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment