aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/hwa-hc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/hwa-hc.c')
-rw-r--r--drivers/usb/host/hwa-hc.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/usb/host/hwa-hc.c b/drivers/usb/host/hwa-hc.c
index ada0a52797b1..f0b97bb08791 100644
--- a/drivers/usb/host/hwa-hc.c
+++ b/drivers/usb/host/hwa-hc.c
@@ -86,7 +86,7 @@ static int __hwahc_set_cluster_id(struct hwahc *hwahc, u8 cluster_id)
86 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 86 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
87 cluster_id, 87 cluster_id,
88 wa->usb_iface->cur_altsetting->desc.bInterfaceNumber, 88 wa->usb_iface->cur_altsetting->desc.bInterfaceNumber,
89 NULL, 0, 1000 /* FIXME: arbitrary */); 89 NULL, 0, USB_CTRL_SET_TIMEOUT);
90 if (result < 0) 90 if (result < 0)
91 dev_err(dev, "Cannot set WUSB Cluster ID to 0x%02x: %d\n", 91 dev_err(dev, "Cannot set WUSB Cluster ID to 0x%02x: %d\n",
92 cluster_id, result); 92 cluster_id, result);
@@ -106,7 +106,7 @@ static int __hwahc_op_set_num_dnts(struct wusbhc *wusbhc, u8 interval, u8 slots)
106 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 106 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
107 interval << 8 | slots, 107 interval << 8 | slots,
108 wa->usb_iface->cur_altsetting->desc.bInterfaceNumber, 108 wa->usb_iface->cur_altsetting->desc.bInterfaceNumber,
109 NULL, 0, 1000 /* FIXME: arbitrary */); 109 NULL, 0, USB_CTRL_SET_TIMEOUT);
110} 110}
111 111
112/* 112/*
@@ -224,7 +224,7 @@ static int hwahc_op_urb_dequeue(struct usb_hcd *usb_hcd, struct urb *urb,
224 struct wusbhc *wusbhc = usb_hcd_to_wusbhc(usb_hcd); 224 struct wusbhc *wusbhc = usb_hcd_to_wusbhc(usb_hcd);
225 struct hwahc *hwahc = container_of(wusbhc, struct hwahc, wusbhc); 225 struct hwahc *hwahc = container_of(wusbhc, struct hwahc, wusbhc);
226 226
227 return wa_urb_dequeue(&hwahc->wa, urb); 227 return wa_urb_dequeue(&hwahc->wa, urb, status);
228} 228}
229 229
230/* 230/*
@@ -281,7 +281,7 @@ static void __hwahc_op_wusbhc_stop(struct wusbhc *wusbhc, int delay)
281 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 281 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
282 delay * 1000, 282 delay * 1000,
283 iface_no, 283 iface_no,
284 NULL, 0, 1000 /* FIXME: arbitrary */); 284 NULL, 0, USB_CTRL_SET_TIMEOUT);
285 if (ret == 0) 285 if (ret == 0)
286 msleep(delay); 286 msleep(delay);
287 287
@@ -310,7 +310,7 @@ static int __hwahc_op_bwa_set(struct wusbhc *wusbhc, s8 stream_index,
310 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 310 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
311 stream_index, 311 stream_index,
312 wa->usb_iface->cur_altsetting->desc.bInterfaceNumber, 312 wa->usb_iface->cur_altsetting->desc.bInterfaceNumber,
313 NULL, 0, 1000 /* FIXME: arbitrary */); 313 NULL, 0, USB_CTRL_SET_TIMEOUT);
314 if (result < 0) { 314 if (result < 0) {
315 dev_err(dev, "Cannot set WUSB stream index: %d\n", result); 315 dev_err(dev, "Cannot set WUSB stream index: %d\n", result);
316 goto out; 316 goto out;
@@ -321,7 +321,7 @@ static int __hwahc_op_bwa_set(struct wusbhc *wusbhc, s8 stream_index,
321 WUSB_REQ_SET_WUSB_MAS, 321 WUSB_REQ_SET_WUSB_MAS,
322 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 322 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
323 0, wa->usb_iface->cur_altsetting->desc.bInterfaceNumber, 323 0, wa->usb_iface->cur_altsetting->desc.bInterfaceNumber,
324 mas_le, 32, 1000 /* FIXME: arbitrary */); 324 mas_le, 32, USB_CTRL_SET_TIMEOUT);
325 if (result < 0) 325 if (result < 0)
326 dev_err(dev, "Cannot set WUSB MAS allocation: %d\n", result); 326 dev_err(dev, "Cannot set WUSB MAS allocation: %d\n", result);
327out: 327out:
@@ -355,7 +355,7 @@ static int __hwahc_op_mmcie_add(struct wusbhc *wusbhc, u8 interval,
355 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 355 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
356 interval << 8 | repeat_cnt, 356 interval << 8 | repeat_cnt,
357 handle << 8 | iface_no, 357 handle << 8 | iface_no,
358 wuie, wuie->bLength, 1000 /* FIXME: arbitrary */); 358 wuie, wuie->bLength, USB_CTRL_SET_TIMEOUT);
359} 359}
360 360
361/* 361/*
@@ -372,7 +372,7 @@ static int __hwahc_op_mmcie_rm(struct wusbhc *wusbhc, u8 handle)
372 WUSB_REQ_REMOVE_MMC_IE, 372 WUSB_REQ_REMOVE_MMC_IE,
373 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 373 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
374 0, handle << 8 | iface_no, 374 0, handle << 8 | iface_no,
375 NULL, 0, 1000 /* FIXME: arbitrary */); 375 NULL, 0, USB_CTRL_SET_TIMEOUT);
376} 376}
377 377
378/* 378/*
@@ -415,7 +415,7 @@ static int __hwahc_op_dev_info_set(struct wusbhc *wusbhc,
415 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 415 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
416 0, wusb_dev->port_idx << 8 | iface_no, 416 0, wusb_dev->port_idx << 8 | iface_no,
417 dev_info, sizeof(struct hwa_dev_info), 417 dev_info, sizeof(struct hwa_dev_info),
418 1000 /* FIXME: arbitrary */); 418 USB_CTRL_SET_TIMEOUT);
419 kfree(dev_info); 419 kfree(dev_info);
420 return ret; 420 return ret;
421} 421}
@@ -455,7 +455,7 @@ static int __hwahc_dev_set_key(struct wusbhc *wusbhc, u8 port_idx, u32 tkid,
455 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 455 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
456 USB_DT_KEY << 8 | key_idx, 456 USB_DT_KEY << 8 | key_idx,
457 port_idx << 8 | iface_no, 457 port_idx << 8 | iface_no,
458 keyd, keyd_len, 1000 /* FIXME: arbitrary */); 458 keyd, keyd_len, USB_CTRL_SET_TIMEOUT);
459 459
460 kzfree(keyd); /* clear keys etc. */ 460 kzfree(keyd); /* clear keys etc. */
461 return result; 461 return result;
@@ -497,7 +497,7 @@ static int __hwahc_op_set_ptk(struct wusbhc *wusbhc, u8 port_idx, u32 tkid,
497 USB_REQ_SET_ENCRYPTION, 497 USB_REQ_SET_ENCRYPTION,
498 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 498 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
499 encryption_value, port_idx << 8 | iface_no, 499 encryption_value, port_idx << 8 | iface_no,
500 NULL, 0, 1000 /* FIXME: arbitrary */); 500 NULL, 0, USB_CTRL_SET_TIMEOUT);
501 if (result < 0) 501 if (result < 0)
502 dev_err(wusbhc->dev, "Can't set host's WUSB encryption for " 502 dev_err(wusbhc->dev, "Can't set host's WUSB encryption for "
503 "port index %u to %s (value %d): %d\n", port_idx, 503 "port index %u to %s (value %d): %d\n", port_idx,
@@ -791,6 +791,7 @@ static int hwahc_probe(struct usb_interface *usb_iface,
791 dev_err(dev, "Cannot add HCD: %d\n", result); 791 dev_err(dev, "Cannot add HCD: %d\n", result);
792 goto error_add_hcd; 792 goto error_add_hcd;
793 } 793 }
794 device_wakeup_enable(usb_hcd->self.controller);
794 result = wusbhc_b_create(&hwahc->wusbhc); 795 result = wusbhc_b_create(&hwahc->wusbhc);
795 if (result < 0) { 796 if (result < 0) {
796 dev_err(dev, "Cannot setup phase B of WUSBHC: %d\n", result); 797 dev_err(dev, "Cannot setup phase B of WUSBHC: %d\n", result);