summaryrefslogtreecommitdiff
path: root/sys/dev/usb/if_kue.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-01-09 16:30:09 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-01-09 16:30:09 +0000
commit04a88e2557d02403f0a4bc571e34ed71b28ba7d2 (patch)
tree4e295b3260dc79b24eb922178d5c69cb0c773c50 /sys/dev/usb/if_kue.c
parentb75f7cc2bfc915e46c1c7e578baa6c720d0c031e (diff)
network byte order firmware, so that firmware files are the same on
all architectures YOU HAVE TO INSTALL NEW FIRMWARE BEFORE BOOTING A NEW KERNEL
Diffstat (limited to 'sys/dev/usb/if_kue.c')
-rw-r--r--sys/dev/usb/if_kue.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c
index 40c73d80b59..a2a0937d570 100644
--- a/sys/dev/usb/if_kue.c
+++ b/sys/dev/usb/if_kue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_kue.c,v 1.42 2006/06/23 06:27:11 miod Exp $ */
+/* $OpenBSD: if_kue.c,v 1.43 2007/01/09 16:30:08 deraadt Exp $ */
/* $NetBSD: if_kue.c,v 1.50 2002/07/16 22:00:31 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -284,7 +284,7 @@ kue_load_fw(struct kue_softc *sc)
DPRINTFN(1,("%s: kue_load_fw: download code_seg\n",
USBDEVNAME(sc->kue_dev)));
err = kue_ctl(sc, KUE_CTL_WRITE, KUE_CMD_SEND_SCAN,
- 0, (void *)&fw->data[0], fw->codeseglen);
+ 0, (void *)&fw->data[0], ntohl(fw->codeseglen));
if (err) {
printf("%s: failed to load code segment: %s\n",
USBDEVNAME(sc->kue_dev), usbd_errstr(err));
@@ -296,7 +296,7 @@ kue_load_fw(struct kue_softc *sc)
DPRINTFN(1,("%s: kue_load_fw: download fix_seg\n",
USBDEVNAME(sc->kue_dev)));
err = kue_ctl(sc, KUE_CTL_WRITE, KUE_CMD_SEND_SCAN,
- 0, (void *)&fw->data[fw->codeseglen], fw->fixseglen);
+ 0, (void *)&fw->data[ntohl(fw->codeseglen)], ntohl(fw->fixseglen));
if (err) {
printf("%s: failed to load fixup segment: %s\n",
USBDEVNAME(sc->kue_dev), usbd_errstr(err));
@@ -308,8 +308,8 @@ kue_load_fw(struct kue_softc *sc)
DPRINTFN(1,("%s: kue_load_fw: download trig_seg\n",
USBDEVNAME(sc->kue_dev)));
err = kue_ctl(sc, KUE_CTL_WRITE, KUE_CMD_SEND_SCAN,
- 0, (void *)&fw->data[fw->codeseglen + fw->fixseglen],
- fw->trigseglen);
+ 0, (void *)&fw->data[ntohl(fw->codeseglen) + ntohl(fw->fixseglen)],
+ ntohl(fw->trigseglen));
if (err) {
printf("%s: failed to load trigger segment: %s\n",
USBDEVNAME(sc->kue_dev), usbd_errstr(err));