Jump to content
Форум по продукции MOXA

noonv

Пользователи
  • Posts

    6
  • Joined

  • Last visited

Контакты

  • Сайт
    http://robocraft.ru

Информация

  • Пол
    Мужчина
  • Интересы
    AI, robotics, computer vision

noonv's Achievements

Новичок

Новичок (1/5)

0

Reputation

  1. разумеется - моя вина diff -Naur ./mxu11x0_orig//driver/mxu11x0.c ./mxu11x0/driver/mxu11x0.c --- ./mxu11x0_orig//driver/mxu11x0.c 2012-09-12 07:18:52.000000000 +0400 +++ ./mxu11x0/driver/mxu11x0.c 2013-06-10 11:04:43.572601465 +0400 @@ -914,9 +914,12 @@ #if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) if (port->tty) port->tty->low_latency = MXU1_DEFAULT_LOW_LATENCY; -#else +#elif(LINUX_VERSION_CODE < KERNEL_VERSION(3,5,3)) if (port->port.tty) port->port.tty->low_latency = MXU1_DEFAULT_LOW_LATENCY; +#else + if (port->port.tty) + port->port.tty->port->low_latency = MXU1_DEFAULT_LOW_LATENCY; #endif @@ -1428,13 +1431,22 @@ dbg("%s - port %d", __FUNCTION__, port->number); - if (!tty || !tty->termios) { +#if(LINUX_VERSION_CODE < KERNEL_VERSION(3,5,3)) + if (!tty || tty->termios) { +#else + if (!tty) { +#endif dbg("%s - no tty or termios", __FUNCTION__); return; } +#if(LINUX_VERSION_CODE < KERNEL_VERSION(3,5,3)) cflag = tty->termios->c_cflag; iflag = tty->termios->c_iflag; +#else + cflag = tty->termios.c_cflag; + iflag = tty->termios.c_iflag; +#endif if (old_termios && cflag == old_termios->c_cflag && iflag == old_termios->c_iflag) { @@ -1810,9 +1822,12 @@ #if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9)) usb_serial_debug_data(dev->driver->name, __FUNCTION__, urb->actual_length, urb->transfer_buffer); -#else +#elif(LINUX_VERSION_CODE < KERNEL_VERSION(3,5,3)) usb_serial_debug_data(debug, dev, __FUNCTION__, urb->actual_length, urb->transfer_buffer); +#else + usb_serial_debug_data(dev, __FUNCTION__, + urb->actual_length, urb->transfer_buffer); #endif if (!mxport->mxp_is_open) @@ -1904,7 +1919,11 @@ break; } +#if(LINUX_VERSION_CODE < KERNEL_VERSION(3,5,3)) cnt = tty_buffer_request_room(tty, length); +#else + cnt = tty_buffer_request_room(tty->port, length); +#endif if(cnt < length){ dbg("%s - [2] dropping data, %d bytes lost\n", __FUNCTION__, length); @@ -1913,11 +1932,20 @@ cnt = length; +#if(LINUX_VERSION_CODE < KERNEL_VERSION(3,5,3)) tty_insert_flip_string(tty, data, cnt); +#else + tty_insert_flip_string(tty->port, data, cnt); +#endif length -= cnt; +#if(LINUX_VERSION_CODE < KERNEL_VERSION(3,5,3)) tty_flip_buffer_push(tty); +#else + tty_flip_buffer_push(tty->port); +#endif + }while(length > 0); @@ -2044,8 +2072,10 @@ spin_unlock_irqrestore(&mxport->mxp_lock, flags); #if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9)) usb_serial_debug_data(&port->number, __FUNCTION__, count, port->write_urb->transfer_buffer); -#else +#elif(LINUX_VERSION_CODE < KERNEL_VERSION(3,5,3)) usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, port->write_urb->transfer_buffer); +#else + usb_serial_debug_data(&port->dev, __FUNCTION__, count, port->write_urb->transfer_buffer); #endif usb_fill_bulk_urb(port->write_urb, port->serial->dev, только от вас о нём узнал - но он таки не собирается под 3.9.4
  2. внёс изменения в driv_linux_uport1p_v1.3.3_build_12091213.tgz для сборки модуля драйвера под последним стабильным ядром - 3.9.4 diff -r mxu11x0_orig/driver/mxu11x0.c mxu11x0/driver/mxu11x0.c 917c917 < #else --- > #elif(LINUX_VERSION_CODE < KERNEL_VERSION(3,5,3)) 919a920,922 > #else > if (port->port.tty) > port->port.tty->port->low_latency = MXU1_DEFAULT_LOW_LATENCY; 1431c1434,1438 < if (!tty || !tty->termios) { --- > #if(LINUX_VERSION_CODE < KERNEL_VERSION(3,5,3)) > if (!tty || tty->termios) { > #else > if (!tty) { > #endif 1435a1443 > #if(LINUX_VERSION_CODE < KERNEL_VERSION(3,5,3)) 1437a1446,1449 > #else > cflag = tty->termios.c_cflag; > iflag = tty->termios.c_iflag; > #endif 1813c1825 < #else --- > #elif(LINUX_VERSION_CODE < KERNEL_VERSION(3,5,3)) 1815a1828,1830 > #else > usb_serial_debug_data(dev, __FUNCTION__, > urb->actual_length, urb->transfer_buffer); 1906a1922 > #if(LINUX_VERSION_CODE < KERNEL_VERSION(3,5,3)) 1907a1924,1926 > #else > cnt = tty_buffer_request_room(tty->port, length); > #endif 1915a1935 > #if(LINUX_VERSION_CODE < KERNEL_VERSION(3,5,3)) 1916a1937,1939 > #else > tty_insert_flip_string(tty->port, data, cnt); > #endif 1919a1943 > #if(LINUX_VERSION_CODE < KERNEL_VERSION(3,5,3)) 1920a1945,1948 > #else > tty_flip_buffer_push(tty->port); > #endif > 2047c2075 < #else --- > #elif(LINUX_VERSION_CODE < KERNEL_VERSION(3,5,3)) 2048a2077,2078 > #else > usb_serial_debug_data(&port->dev, __FUNCTION__, count, port->write_urb->transfer_buffer);
  3. всё разобрался - порты заработали
  4. использую разъёмы со встроенными трансформаторами, подключаю по вашей документации, но на подключение сетевого кабеля модуль никак не реагирует.
  5. вопрос про модуль EOM-104 на нём установлен только один согласующий трансформатор (20PT1024SX - 10/100 BASE DUAL PORT TRANSFORMERS), который развязывает порты 1 и 2. Как осуществляется развязка портов 3 и 4? Т.е. возможно ли прямое подключение к модулю EOM-104 Ethernet-карточек, без использования дополнительных модулей (EOM-104 Evaluation Kit)?
×
×
  • Create New...