[haiku-commits] haiku: hrev49165 - src/add-ons/kernel/drivers/common build/jam/packages

  • From: jerome.duval@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 12 May 2015 20:17:04 +0200 (CEST)

hrev49165 adds 2 changesets to branch 'master'
old head: c2bc264987488c3f8419aa1b06b7d0bd014c5cad
new head: 06e2e74f41b7cafc4e67fbf8dcbd24155841e7c1
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=06e2e74f41b7+%5Ec2bc26498748

----------------------------------------------------------------------------

b4c466459f1a: Update Huawei in usb_modeswitch

Signed-off-by: Jérôme Duval <jerome.duval@xxxxxxxxx>

[ haiqu <judd@xxxxxxxxxx> ]

06e2e74f41b7: usb_modeswitch: fixed gcc4/64bit build.

[ Jérôme Duval <jerome.duval@xxxxxxxxx> ]

----------------------------------------------------------------------------

2 files changed, 57 insertions(+), 37 deletions(-)
build/jam/packages/Haiku | 2 +-
.../kernel/drivers/common/usb_modeswitch.cpp | 92 ++++++++++++--------

############################################################################

Commit: b4c466459f1a70c0659708e239e9b644abfe1317
URL: http://cgit.haiku-os.org/haiku/commit/?id=b4c466459f1a
Author: haiqu <judd@xxxxxxxxxx>
Date: Sat May 9 07:45:18 2015 UTC
Committer: Jérôme Duval <jerome.duval@xxxxxxxxx>
Commit-Date: Tue May 12 18:16:31 2015 UTC

Update Huawei in usb_modeswitch

Signed-off-by: Jérôme Duval <jerome.duval@xxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/build/jam/packages/Haiku b/build/jam/packages/Haiku
index 704b5ce..055c730 100644
--- a/build/jam/packages/Haiku
+++ b/build/jam/packages/Haiku
@@ -68,7 +68,7 @@ AddNewDriversToPackage power :
$(SYSTEM_ADD_ONS_DRIVERS_POWER) ;
#AddNewDriversToPackage display : display_adapter@x86 ;

# legacy drivers
-AddDriversToPackage : console dprintf null
<driver>tty zero ;
+AddDriversToPackage : console dprintf null
<driver>tty usb_modeswitch zero ;
AddDriversToPackage audio hmulti : $(SYSTEM_ADD_ONS_DRIVERS_AUDIO) ;
AddDriversToPackage audio old : $(SYSTEM_ADD_ONS_DRIVERS_AUDIO_OLD) ;
AddDriversToPackage midi :
$(SYSTEM_ADD_ONS_DRIVERS_MIDI) ;
diff --git a/src/add-ons/kernel/drivers/common/usb_modeswitch.cpp
b/src/add-ons/kernel/drivers/common/usb_modeswitch.cpp
index f1e3c85..e82f968 100644
--- a/src/add-ons/kernel/drivers/common/usb_modeswitch.cpp
+++ b/src/add-ons/kernel/drivers/common/usb_modeswitch.cpp
@@ -8,6 +8,7 @@

/*
Devices and messages reference: usb-modeswitch-data-20100826
+ Huawei devices updated to usb-modeswitch-data-20150115
*/

#include <ByteOrder.h>
@@ -64,7 +65,7 @@ unsigned char kDevicesMsg[][31] = {
{ /* MSG_HUAWEI_3 */
0x55, 0x53, 0x42, 0x43, 0x12, 0x34, 0x56, 0x78,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11,
- 0x06, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x06, 0x20, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
},
{ /* MSG_NOKIA_1 */
@@ -122,7 +123,7 @@ unsigned char kDevicesMsg[][31] = {
#define NOKIA_VENDOR 0x0421
#define NOVATEL_VENDOR 0x1410
#define ZYDAS_VENDOR 0x0ace
-#define ZTE_VENDOR 0x19d2
+#define ZTE_VENDOR 0x19d2
#define OLIVETTI_VENDOR 0x0b3c
#define OPTION_VENDOR 0x0af0
#define ATHEROS_VENDOR 0x0cf3
@@ -133,33 +134,52 @@ static const struct {
msgType type, type2, type3;
} kDevices[] = {
{{ 0, 0, 0, HUAWEI_VENDOR, 0x101e}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x1446}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x1449}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x14ad}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x14b5}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x14b7}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x14ba}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x14c1}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x14c3}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x14c4}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x14c5}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x14d1}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x14fe}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x1505}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x151a}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x1520}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x1521}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x1523}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x1526}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x1553}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x1557}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x155b}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x1c0b}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR, 0x1c24}, MSG_HUAWEI_1},
- {{ 0, 0, 0, HUAWEI_VENDOR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G_HUAWEI_3},
+ {{ 0, 0, 0, HUAWEI_VENDOR, 0x1f1b}, MSG_HUAWEI_3},
+ {{ 0, 0, 0, HUAWEI_VENDOR, 0x1f1c}, MSG_HUAWEI_3},
+ {{ 0, 0, 0, HUAWEI_VENDOR, 0x1f1d}, MSG_HUAWEI_3},
+ {{ 0, 0, 0, HUAWEI_VENDOR, 0x1f1e}, MSG_HUAWEI_3},
{{ 0, 0, 0, NOKIA_VENDOR, 0x060c}, MSG_NOKIA_1},
{{ 0, 0, 0, NOKIA_VENDOR, 0x0610}, MSG_NOKIA_1},
{{ 0, 0, 0, NOKIA_VENDOR, 0x061d}, MSG_NOKIA_1},
@@ -388,7 +408,7 @@ my_get_msg_type(const usb_device_descriptor *desc, int
index)
case 2:
return kDevices[i].type3;
}
-
+
}

return MSG_NONE;
@@ -412,7 +432,7 @@ my_modeswitch(my_device* device)
TRACE_ALWAYS("send message %d failed\n", i + 1);
return err;
}
-
+
TRACE("device switched: %p\n", device);

char data[36];
@@ -422,9 +442,9 @@ my_modeswitch(my_device* device)
i + 1, device->status);
return err;
}
- TRACE("device switched (response length %ld)\n",
device->actual_length);
+ TRACE("device switched (response length %ld)\n",
device->actual_length);
}
-
+
TRACE("device switched: %p\n", device);

return B_OK;

############################################################################

Revision: hrev49165
Commit: 06e2e74f41b7cafc4e67fbf8dcbd24155841e7c1
URL: http://cgit.haiku-os.org/haiku/commit/?id=06e2e74f41b7
Author: Jérôme Duval <jerome.duval@xxxxxxxxx>
Date: Tue May 12 17:41:30 2015 UTC

usb_modeswitch: fixed gcc4/64bit build.

----------------------------------------------------------------------------

diff --git a/src/add-ons/kernel/drivers/common/usb_modeswitch.cpp
b/src/add-ons/kernel/drivers/common/usb_modeswitch.cpp
index e82f968..5c03ab4 100644
--- a/src/add-ons/kernel/drivers/common/usb_modeswitch.cpp
+++ b/src/add-ons/kernel/drivers/common/usb_modeswitch.cpp
@@ -25,11 +25,11 @@

#define TRACE_USB_MODESWITCH 1
#ifdef TRACE_USB_MODESWITCH
-#define TRACE(x...) dprintf(DRIVER_NAME": "x)
+#define TRACE(x...) dprintf(DRIVER_NAME ": " x)
#else
#define TRACE(x...) /* nothing */
#endif
-#define TRACE_ALWAYS(x...) dprintf(DRIVER_NAME": "x)
+#define TRACE_ALWAYS(x...) dprintf(DRIVER_NAME ": " x)
#define ENTER() TRACE("%s", __FUNCTION__)


@@ -438,7 +438,7 @@ my_modeswitch(my_device* device)
char data[36];
err = my_transfer_data(device, true, data, sizeof(data));
if (err != B_OK) {
- TRACE_ALWAYS("receive response %d failed 0x%lx\n",
+ TRACE_ALWAYS("receive response %d failed 0x%" B_PRIx32
"\n",
i + 1, device->status);
return err;
}
@@ -459,7 +459,7 @@ my_modeswitch(my_device* device)
static status_t
my_device_added(usb_device newDevice, void **cookie)
{
- TRACE("device_added(0x%08lx)\n", newDevice);
+ TRACE("device_added(0x%08" B_PRIx32 ")\n", newDevice);
my_device *device = (my_device *)malloc(sizeof(my_device));
device->device = newDevice;
device->removed = false;
@@ -552,7 +552,7 @@ my_device_added(usb_device newDevice, void **cookie)
static status_t
my_device_removed(void *cookie)
{
- TRACE("device_removed(0x%08lx)\n", (uint32)cookie);
+ TRACE("device_removed(%p)\n", cookie);
my_device *device = (my_device *)cookie;

mutex_lock(&gDeviceListLock);
@@ -611,7 +611,7 @@ init_driver()
status_t result = get_module(B_USB_MODULE_NAME,
(module_info **)&gUSBModule);
if (result < B_OK) {
- TRACE_ALWAYS("getting module failed 0x%08lx\n", result);
+ TRACE_ALWAYS("getting module failed 0x%08" B_PRIx32 "\n",
result);
mutex_destroy(&gDeviceListLock);
return result;
}


Other related posts:

  • » [haiku-commits] haiku: hrev49165 - src/add-ons/kernel/drivers/common build/jam/packages - jerome . duval