/* ARPC requests */
-#define ARPC_TYPE_CPORT_RESET 0x00
#define ARPC_TYPE_CPORT_CONNECTED 0x01
#define ARPC_TYPE_CPORT_QUIESCE 0x02
#define ARPC_TYPE_CPORT_CLEAR 0x03
#define ARPC_TYPE_CPORT_FLUSH 0x04
#define ARPC_TYPE_CPORT_SHUTDOWN 0x05
-struct arpc_cport_reset_req {
- __le16 cport_id;
-} __packed;
-
struct arpc_cport_connected_req {
__le16 cport_id;
} __packed;
usb_free_urb(urb);
}
-static int cport_reset(struct gb_host_device *hd, u16 cport_id)
-{
- struct es2_ap_dev *es2 = hd_to_es2(hd);
- struct usb_device *udev = es2->usb_dev;
- struct arpc_cport_reset_req req;
- int retval;
- int result;
-
- switch (cport_id) {
- case GB_SVC_CPORT_ID:
- case ES2_CPORT_CDSI0:
- case ES2_CPORT_CDSI1:
- return 0;
- }
-
- req.cport_id = cpu_to_le16(cport_id);
- retval = arpc_sync(es2, ARPC_TYPE_CPORT_RESET, &req, sizeof(req),
- &result, ES2_ARPC_CPORT_TIMEOUT);
- if (retval == -EREMOTEIO) {
- dev_err(&udev->dev, "failed to reset cport %u: %d\n", cport_id,
- result);
- }
-
- return retval;
-}
-
static int es2_cport_allocate(struct gb_host_device *hd, int cport_id,
unsigned long flags)
{
return ret;
}
-static int cport_disable(struct gb_host_device *hd, u16 cport_id)
-{
- int retval;
-
- retval = cport_reset(hd, cport_id);
- if (retval)
- return retval;
-
- return 0;
-}
-
static int es2_cport_connected(struct gb_host_device *hd, u16 cport_id)
{
struct es2_ap_dev *es2 = hd_to_es2(hd);
.cport_allocate = es2_cport_allocate,
.cport_release = es2_cport_release,
.cport_enable = cport_enable,
- .cport_disable = cport_disable,
.cport_connected = es2_cport_connected,
.cport_flush = es2_cport_flush,
.cport_shutdown = es2_cport_shutdown,