Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143615
b: refs/heads/master
c: fca10c8
h: refs/heads/master
i:
  143613: 9e43f7a
  143611: 4f21aef
  143607: 85dd00c
  143599: 829d6db
  143583: e2aba05
  143551: be243ce
  143487: 3139489
  143359: 808b3c9
v: v3
  • Loading branch information
David Vrabel authored and Greg Kroah-Hartman committed Apr 17, 2009
1 parent 31974a5 commit 643c9b9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5936ac7f93965931c508e1928d142076998ce65d
refs/heads/master: fca10c81d99ff9956179058460dfddc0418f3902
26 changes: 12 additions & 14 deletions trunk/drivers/usb/wusbcore/wusbhc.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,33 +88,31 @@ static DEVICE_ATTR(wusb_trust_timeout, 0644, wusb_trust_timeout_show,
wusb_trust_timeout_store);

/*
* Show & store the current WUSB CHID
* Show the current WUSB CHID.
*/
static ssize_t wusb_chid_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct wusbhc *wusbhc = usbhc_dev_to_wusbhc(dev);
const struct wusb_ckhdid *chid;
ssize_t result = 0;

if (wusbhc->wuie_host_info != NULL)
result += ckhdid_printf(buf, PAGE_SIZE,
&wusbhc->wuie_host_info->CHID);
chid = &wusbhc->wuie_host_info->CHID;
else
chid = &wusb_ckhdid_zero;

result += ckhdid_printf(buf, PAGE_SIZE, chid);
result += sprintf(buf + result, "\n");

return result;
}

/*
* Store a new CHID
*
* This will (FIXME) trigger many changes.
*
* - Send an all zeros CHID and it will stop the controller
* - Send a non-zero CHID and it will start it
* (unless it was started, it will just change the CHID,
* diconnecting all devices first).
* Store a new CHID.
*
* So first we scan the MMC we are sent and then we act on it. We
* read it in the same format as we print it, an ASCII string of 16
* hex bytes.
* - Write an all zeros CHID and it will stop the controller
* - Write a non-zero CHID and it will start it.
*
* See wusbhc_chid_set() for more info.
*/
Expand Down

0 comments on commit 643c9b9

Please sign in to comment.