greybus: connection: drop the svc quiescing operation

Connection tear down is being reworked, and the SVC quiescing operation
is going away.

Let's remove this operation now along with the coupled second ping from
our intermediate tear down implementation.

This both avoids unnecessary noise in the logs resulting from the fact
that the SVC side of the quiescing operation was never merged, and
speeds up connection tear down slightly.

Testing done: Tested on EVT2 using runtime PM.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Sandeep Patil <sspatil@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Johan Hovold 2016-07-19 17:21:27 +02:00 коммит произвёл Greg Kroah-Hartman
Родитель d53cc1c37e
Коммит 042fd749ab
4 изменённых файлов: 0 добавлений и 64 удалений

Просмотреть файл

@ -417,21 +417,6 @@ gb_connection_svc_connection_destroy(struct gb_connection *connection)
connection->intf_cport_id); connection->intf_cport_id);
} }
static void
gb_connection_svc_connection_quiescing(struct gb_connection *connection)
{
struct gb_host_device *hd = connection->hd;
if (gb_connection_is_static(connection))
return;
gb_svc_connection_quiescing(hd->svc,
hd->svc->ap_intf_id,
connection->hd_cport_id,
connection->intf->interface_id,
connection->intf_cport_id);
}
/* Inform Interface about active CPorts */ /* Inform Interface about active CPorts */
static int gb_connection_control_connected(struct gb_connection *connection) static int gb_connection_control_connected(struct gb_connection *connection)
{ {
@ -686,8 +671,6 @@ err_control_disconnecting:
gb_connection_ping(connection); gb_connection_ping(connection);
gb_connection_hd_cport_features_disable(connection); gb_connection_hd_cport_features_disable(connection);
gb_connection_svc_connection_quiescing(connection);
gb_connection_ping(connection);
gb_connection_control_disconnected(connection); gb_connection_control_disconnected(connection);
connection->state = GB_CONNECTION_STATE_DISABLED; connection->state = GB_CONNECTION_STATE_DISABLED;
err_svc_connection_destroy: err_svc_connection_destroy:
@ -795,8 +778,6 @@ void gb_connection_disable(struct gb_connection *connection)
gb_connection_ping(connection); gb_connection_ping(connection);
gb_connection_hd_cport_features_disable(connection); gb_connection_hd_cport_features_disable(connection);
gb_connection_svc_connection_quiescing(connection);
gb_connection_ping(connection);
gb_connection_control_disconnected(connection); gb_connection_control_disconnected(connection);

Просмотреть файл

@ -1036,7 +1036,6 @@ struct gb_spi_transfer_response {
#define GB_SVC_TYPE_TIMESYNC_WAKE_PINS_ACQUIRE 0x18 #define GB_SVC_TYPE_TIMESYNC_WAKE_PINS_ACQUIRE 0x18
#define GB_SVC_TYPE_TIMESYNC_WAKE_PINS_RELEASE 0x19 #define GB_SVC_TYPE_TIMESYNC_WAKE_PINS_RELEASE 0x19
#define GB_SVC_TYPE_TIMESYNC_PING 0x1a #define GB_SVC_TYPE_TIMESYNC_PING 0x1a
#define GB_SVC_TYPE_CONN_QUIESCING 0x1e
#define GB_SVC_TYPE_MODULE_INSERTED 0x1f #define GB_SVC_TYPE_MODULE_INSERTED 0x1f
#define GB_SVC_TYPE_MODULE_REMOVED 0x20 #define GB_SVC_TYPE_MODULE_REMOVED 0x20
#define GB_SVC_TYPE_INTF_VSYS_ENABLE 0x21 #define GB_SVC_TYPE_INTF_VSYS_ENABLE 0x21
@ -1386,17 +1385,6 @@ struct gb_svc_intf_mailbox_event_request {
} __packed; } __packed;
/* intf_mailbox_event response has no payload */ /* intf_mailbox_event response has no payload */
struct gb_svc_conn_quiescing_request {
__u8 intf1_id;
__le16 cport1_id;
__u8 intf2_id;
__le16 cport2_id;
} __packed;
struct gb_svc_conn_quiescing_response {
__u8 status;
} __packed;
/* RAW */ /* RAW */

Просмотреть файл

@ -470,37 +470,6 @@ int gb_svc_connection_create(struct gb_svc *svc,
} }
EXPORT_SYMBOL_GPL(gb_svc_connection_create); EXPORT_SYMBOL_GPL(gb_svc_connection_create);
void gb_svc_connection_quiescing(struct gb_svc *svc, u8 intf1_id, u16 cport1_id,
u8 intf2_id, u16 cport2_id)
{
struct gb_svc_conn_quiescing_request request;
struct gb_svc_conn_quiescing_response response;
int ret;
dev_dbg(&svc->dev, "%s - (%u:%u %u:%u)\n", __func__,
intf1_id, cport1_id, intf2_id, cport2_id);
request.intf1_id = intf1_id;
request.cport1_id = cpu_to_le16(cport1_id);
request.intf2_id = intf2_id;
request.cport2_id = cpu_to_le16(cport2_id);
ret = gb_operation_sync(svc->connection, GB_SVC_TYPE_CONN_QUIESCING,
&request, sizeof(request),
&response, sizeof(response));
if (ret < 0)
return;
if (response.status != GB_SVC_OP_SUCCESS) {
dev_err(&svc->dev, "quiescing connection failed (%u:%u %u:%u): %u\n",
intf1_id, cport1_id, intf2_id, cport2_id,
response.status);
return;
}
return;
}
EXPORT_SYMBOL_GPL(gb_svc_connection_quiescing);
void gb_svc_connection_destroy(struct gb_svc *svc, u8 intf1_id, u16 cport1_id, void gb_svc_connection_destroy(struct gb_svc *svc, u8 intf1_id, u16 cport1_id,
u8 intf2_id, u16 cport2_id) u8 intf2_id, u16 cport2_id)
{ {

Просмотреть файл

@ -62,8 +62,6 @@ int gb_svc_route_create(struct gb_svc *svc, u8 intf1_id, u8 dev1_id,
void gb_svc_route_destroy(struct gb_svc *svc, u8 intf1_id, u8 intf2_id); void gb_svc_route_destroy(struct gb_svc *svc, u8 intf1_id, u8 intf2_id);
int gb_svc_connection_create(struct gb_svc *svc, u8 intf1_id, u16 cport1_id, int gb_svc_connection_create(struct gb_svc *svc, u8 intf1_id, u16 cport1_id,
u8 intf2_id, u16 cport2_id, u8 cport_flags); u8 intf2_id, u16 cport2_id, u8 cport_flags);
void gb_svc_connection_quiescing(struct gb_svc *svc, u8 intf1_id, u16 cport1_id,
u8 intf2_id, u16 cport2_id);
void gb_svc_connection_destroy(struct gb_svc *svc, u8 intf1_id, u16 cport1_id, void gb_svc_connection_destroy(struct gb_svc *svc, u8 intf1_id, u16 cport1_id,
u8 intf2_id, u16 cport2_id); u8 intf2_id, u16 cport2_id);
int gb_svc_intf_eject(struct gb_svc *svc, u8 intf_id); int gb_svc_intf_eject(struct gb_svc *svc, u8 intf_id);