Difference between revisions of "Unit SMSC95XX"

From Ultibo.org
Jump to: navigation, search
 
(11 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
'''SMSC LAN95xx USB Ethernet Driver unit'''
 
'''SMSC LAN95xx USB Ethernet Driver unit'''
  
The SMSC LAN95xx has an integrated USB Hub and is technically a compound device. Here we instead use the vendor ID and product ID of the vendor specific class device attached to the hub that is the device we actually need to communicate with. The hub will be detected and bound by the default USB Hub driver when it is enumerated by the USB core.
+
The SMSC LAN95xx has an integrated USB Hub and is technically a compound device. Here we instead use the vendor Id and product Id of the vendor specific class device attached to the hub that is the device we actually need to communicate with. The hub will be detected and bound by the default USB Hub driver when it is enumerated by the USB core.
  
 
=== Constants ===
 
=== Constants ===
Line 17: Line 17:
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code> SMSC95XX_NETWORK_DESCRIPTION = 'SMSC LAN95XX USB Ethernet Adapter';</code>
 +
| Description of SMSC95XX device
 +
|-
 +
|colspan="2"|&nbsp;
 
|-
 
|-
 
| <code>SMSC95XX_DRIVER_NAME = 'SMSC LAN95XX USB Ethernet Adapter Driver';</code>
 
| <code>SMSC95XX_DRIVER_NAME = 'SMSC LAN95XX USB Ethernet Adapter Driver';</code>
Line 42: Line 47:
 
|-
 
|-
 
| <code>SMSC95XX_MAX_EEPROM_SIZE = 512;</code>
 
| <code>SMSC95XX_MAX_EEPROM_SIZE = 512;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>SMSC95XX_INTERNAL_PHY_ID = 1;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>SMSC95XX_PHY_ID_MASK = $1F;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SMSC95XX_REG_INDEX_MASK = $1F;</code>
 
| &nbsp;
 
| &nbsp;
 
|-
 
|-
Line 48: Line 66:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX device id constants''' <code> MSC95XX_DEVICE_ID_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX device Id''' <code> MSC95XX_DEVICE_ID_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
 
| <code>SMSC95XX_DEVICE_ID_COUNT = 5;</code>
 
| <code>SMSC95XX_DEVICE_ID_COUNT = 5;</code>
| Number of supported Device IDs
+
| Number of supported Device Ids
 
|-
 
|-
 
|colspan="2"|&nbsp;  
 
|colspan="2"|&nbsp;  
Line 78: Line 96:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX transmit/receive constants ''' <code> SMSC95XX_TX_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX transmit and receive''' <code> SMSC95XX_TX_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 92: Line 110:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX USB packet size constants''' <code> SMSC95XX_*_USB_PKT_SIZE </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX USB packet size''' <code> SMSC95XX_*_USB_PKT_SIZE </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 106: Line 124:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX burst size constants''' <code> SMSC95XX_DEFAULT_*_BURST_CAP_SIZE </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX burst size''' <code> SMSC95XX_DEFAULT_*_BURST_CAP_SIZE </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 120: Line 138:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX transmit command constants''' <code> SMSC95XX_TX_COMMAND_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX transmit command''' <code> SMSC95XX_TX_COMMAND_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 162: Line 180:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX receive status constants''' <code> SMSC95XX_RX_STATUS_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX receive status''' <code> SMSC95XX_RX_STATUS_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 216: Line 234:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX ID revision constants''' <code> SMSC95XX_ID_REVISION_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX Id revision''' <code> SMSC95XX_ID_REVISION_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 255: Line 273:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX interrupt status constants''' <code> SMSC95XX_INTERRUPT_STATUS_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX interrupt status''' <code> SMSC95XX_INTERRUPT_STATUS_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 293: Line 311:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX receive configuration constants''' <code> SMSC95XX_RX_CONFIG_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX receive configuration''' <code> SMSC95XX_RX_CONFIG_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 307: Line 325:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX transmit configuration constants''' <code> SMSC95XX_TX_CONFIG_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX transmit configuration''' <code> SMSC95XX_TX_CONFIG_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 315: Line 333:
 
|-
 
|-
 
| <code>SMSC95XX_TX_CONFIG_ON = $00000004;</code>
 
| <code>SMSC95XX_TX_CONFIG_ON = $00000004;</code>
| Transmit On flag. Software can write 1 here to enable transmit functionality (at the PHY layer?). Writing 0 is ignored. Reads as current on (1) / off (0) state. However, to actually allow packets to be transmitted, software also must set the MAC_CONTROL_TXEN flag in the MAC_CONTROL register.
+
| Transmit On flag. Software can write 1 here to enable transmit functionality (at the PHY layer). Writing 0 is ignored. Reads as current on (1)/off (0) state. However, to actually allow packets to be transmitted, software also must set the MAC_CONTROL_TXEN flag in the MAC_CONTROL register.
 
|-
 
|-
 
| <code>SMSC95XX_TX_CONFIG_STOP = $00000002;</code>
 
| <code>SMSC95XX_TX_CONFIG_STOP = $00000002;</code>
Line 327: Line 345:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX hardware configuration constants''' <code> SMSC95XX_HW_CONFIG_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX hardware configuration''' <code> SMSC95XX_HW_CONFIG_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 371: Line 389:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX RX FIFO constants''' <code> SMSC95XX_RX_FIFO_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX RX FIFO''' <code> SMSC95XX_RX_FIFO_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 382: Line 400:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX power management control constants''' <code> SMSC95XX_PM_CONTROL_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX power management control''' <code> SMSC95XX_PM_CONTROL_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 440: Line 458:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX LED GPIO configuration constants''' <code> SMSC95XX_LED_GPIO_CONFIG_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX LED GPIO configuration''' <code> SMSC95XX_LED_GPIO_CONFIG_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 460: Line 478:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX GPIO configuration constants''' <code> SMSC95XX_GPIO_CONFIG_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX GPIO configuration''' <code> SMSC95XX_GPIO_CONFIG_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 471: Line 489:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX advanced flow control configuration constants''' <code> SMSC95XX_AFC_CONFIG_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX advanced flow control configuration''' <code> SMSC95XX_AFC_CONFIG_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
|colspan="2"|Default 0)
+
|colspan="2"|Default 0
 
|-
 
|-
 
|colspan="2"|&nbsp;
 
|colspan="2"|&nbsp;
 
|-
 
|-
 
| <code>SMSC95XX_AFC_CONFIG = $2C;</code>
 
| <code>SMSC95XX_AFC_CONFIG = $2C;</code>
| style="width: 50%;"|&nbsp;
+
| Value written to AFC_CFG by the Linux driver, with the following explanation:
 +
Hi watermark = 15.5Kb (~10 mtu pkts)
 +
<br />low watermark = 3k (~2 mtu pkts)
 +
<br />backpressure duration = ~ 350us
 +
<br />Apply FC on any frame
 
|-
 
|-
 
|colspan="2"|&nbsp;
 
|colspan="2"|&nbsp;
Line 491: Line 513:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX E2P command constants''' <code> SMSC95XX_E2P_COMMAND_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX EEPROM command''' <code> SMSC95XX_E2P_COMMAND_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 545: Line 567:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX E2P data constants''' <code> SMSC95XX_E2P_DATA_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX EEPROM data''' <code> SMSC95XX_E2P_DATA_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 563: Line 585:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX burst cap constants''' <code> SMSC95XX_BURST_CAP_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX burst cap''' <code> SMSC95XX_BURST_CAP_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 580: Line 602:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX GPIO wake constants''' <code> SMSC95XX_GPIO_WAKE_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX GPIO wake''' <code> SMSC95XX_GPIO_WAKE_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 591: Line 613:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX interrupt endpoint control constants''' <code> SMSC95XX_INT_EP_CONTROL_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX interrupt endpoint control''' <code> SMSC95XX_INT_EP_CONTROL_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 632: Line 654:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX bulk in delay constants''' <code> SMSC95XX_BULK_IN_DELAY_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX bulk in delay''' <code> SMSC95XX_BULK_IN_DELAY_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 649: Line 671:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX media access control constants''' <code> SMSC95XX_MAC_CONTROL_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX media access control''' <code> SMSC95XX_MAC_CONTROL_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 707: Line 729:
 
|-
 
|-
 
| <code>SMSC95XX_MAC_CONTROL_TX_ENABLE = $00000008;</code>
 
| <code>SMSC95XX_MAC_CONTROL_TX_ENABLE = $00000008;</code>
| Transmit enabled (MAC layer). 1 to enable / 0 to disable (Must also set the SMSC95XX_TX_CONFIG_ON flag in the SMSC95XX_TX_CONFIG register).
+
| Transmit enabled (MAC layer). 1 to enable/0 to disable (Must also set the SMSC95XX_TX_CONFIG_ON flag in the SMSC95XX_TX_CONFIG register).
 
|-
 
|-
 
| <code>SMSC95XX_MAC_CONTROL_RX_ENABLE = $00000004;</code>
 
| <code>SMSC95XX_MAC_CONTROL_RX_ENABLE = $00000004;</code>
| Receive enabled. 1 to enable / 0 to disable.
+
| Receive enabled. 1 to enable/0 to disable.
 
|-
 
|-
 
|}
 
|}
Line 716: Line 738:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX MAC address constants''' <code> SMSC95XX_MAC_ADDRESS_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX MAC address''' <code> SMSC95XX_MAC_ADDRESS_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 739: Line 761:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX hash constants''' <code> SMSC95XX_HASH_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX hash''' <code> SMSC95XX_HASH_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 757: Line 779:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX MII constants''' <code> SMSC95XX_MII_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX MII data''' <code> SMSC95XX_MII_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 786: Line 808:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX flow constants ''' <code> SMSC95XX_FLOW_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX flow''' <code> SMSC95XX_FLOW_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 813: Line 835:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX VLAN constants''' <code> SMSC95XX_VLAN* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX VLAN''' <code> SMSC95XX_VLAN* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 833: Line 855:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX WUFF constants''' <code> SMSC95XX_WUFF_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX WUFF''' <code> SMSC95XX_WUFF_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 854: Line 876:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX WUCSR constants''' <code> SMSC95XX_WUCSR_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX wakeup control and status''' <code> SMSC95XX_WUCSR_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 884: Line 906:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX checksum offload engine/enable control constants''' <code> SMSC95XX_COE_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX checksum offload engine/enable control''' <code> SMSC95XX_COE_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 892: Line 914:
 
|-
 
|-
 
| <code>SMSC95XX_TX_COE_ENABLE = $00010000;</code>
 
| <code>SMSC95XX_TX_COE_ENABLE = $00010000;</code>
| Transmit checksum offload enabled. 1 to enable / 0 to disable (Default 0).
+
| Transmit checksum offload enabled. 1 to enable/0 to disable (Default 0).
 
|-
 
|-
 
| <code>SMSC95XX_RX_COE_MODE = $00000002;</code>
 
| <code>SMSC95XX_RX_COE_MODE = $00000002;</code>
Line 898: Line 920:
 
|-
 
|-
 
| <code>SMSC95XX_RX_COE_ENABLE = $00000001;</code>
 
| <code>SMSC95XX_RX_COE_ENABLE = $00000001;</code>
| Receive checksum offload enabled. 1 to enable / 0 to disable (Default 0).
+
| Receive checksum offload enabled. 1 to enable/0 to disable (Default 0).
 
|-
 
|-
 
|}
 
|}
Line 904: Line 926:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX vendor-specific physical constants''' <code> SMSC95XX_PHY_EDPD_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX vendor-specific physical''' <code> SMSC95XX_PHY_EDPD_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
|colspan="2"|EDPD NLP / crossover time configuration (LAN9500A only)
+
|colspan="2"|EDPD NLP/crossover time configuration (LAN9500A only)
 
|-
 
|-
 
|colspan="2"|&nbsp;
 
|colspan="2"|&nbsp;
Line 955: Line 977:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX mode control/status constants''' <code> SMSC95XX_MODE_CTRL_STS_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX mode control and status''' <code> SMSC95XX_MODE_CTRL_STS_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 972: Line 994:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX special control/status constants''' <code> SMSC95XX_SPECIAL_CTRL_STS_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX special control and status''' <code> SMSC95XX_SPECIAL_CTRL_STS_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 992: Line 1,014:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX physical interrupt source constants''' <code> SMSC95XX_PHY_INT_SRC_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX physical interrupt source''' <code> SMSC95XX_PHY_INT_SRC_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 1,015: Line 1,037:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX physical interrupt mask constants''' <code> SMSC95XX_PHY_INT_MASK_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX physical interrupt mask''' <code> SMSC95XX_PHY_INT_MASK_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 1,041: Line 1,063:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX physical special constants''' <code> SMSC95XX_PHY_SPECIAL_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX physical special''' <code> SMSC95XX_PHY_SPECIAL_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 1,067: Line 1,089:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX USB vendor request constants''' <code> SMSC95XX_VENDOR_REQUEST_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX USB vendor request''' <code> SMSC95XX_VENDOR_REQUEST_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 1,094: Line 1,116:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX interrupt endpoint status word constants''' <code> SMSC95XX_INT_ENP_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMSC95XX interrupt endpoint status word''' <code> SMSC95XX_INT_ENP_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 1,127: Line 1,149:
  
  
'''SMSC95XX network device'''
+
'''SMSC95XX network'''
  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
<code>PSMSC95XXNetworkDevice = ^TSMSC95XXNetworkDevice;</code>
+
<code>PSMSC95XXNetwork = ^TSMSC95XXNetwork;</code>
  
<code>TSMSC95XXNetworkDevice = record</code>
+
<code>TSMSC95XXNetwork = record</code>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 1,184: Line 1,206:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">procedure SMSC95XXInit;</pre>
 
<pre style="border: 0; padding-bottom:0px;">procedure SMSC95XXInit;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Initialize the SMSC95XX unit, create and register the driver</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| None documented
+
| Called only during system startup
 
|-
 
|-
 
|}
 
|}
Line 1,198: Line 1,220:
  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function SMSC95XXDeviceOpen(Network:PNetworkDevice):LongWord;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function SMSC95XXNetworkOpen(Network:PNetworkDevice):LongWord;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of NetworkDeviceOpen for the SMSC95XX device</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of NetworkDeviceOpen for the SMSC95XX device</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| None documented
+
| Not intended to be called directly by applications, use NetworkDeviceOpen instead.
 
|-
 
|-
 
|}
 
|}
Line 1,210: Line 1,232:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function SMSC95XXDeviceClose(Network:PNetworkDevice):LongWord;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function SMSC95XXNetworkClose(Network:PNetworkDevice):LongWord;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of NetworkDeviceClose for the SMSC95XX device</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of NetworkDeviceClose for the SMSC95XX device</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| None documented
+
| Not intended to be called directly by applications, use NetworkDeviceClose instead.
 
|-
 
|-
 
|}
 
|}
Line 1,222: Line 1,244:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
<pre style="border: 0; padding-bottom:0px;">function SMSC95XXDeviceRead(Network:PNetworkDevice; Buffer:Pointer; Size:LongWord; var Length:LongWord):LongWord;</pre>
+
<pre style="border: 0; padding-bottom:0px;">function SMSC95XXNetworkControl(Network:PNetworkDevice; Request:Integer; Argument1:PtrUInt; var Argument2:PtrUInt):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of NetworkDeviceRead for the SMSC95XX device</div>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
|-
+
! '''Note'''
+
| None documented
+
|-
+
|}
+
</div></div>
+
<br />
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
+
<pre style="border: 0; padding-bottom:0px;">function SMSC95XXDeviceWrite(Network:PNetworkDevice; Buffer:Pointer; Size:LongWord; var Length:LongWord):LongWord;</pre>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of NetworkDeviceWrite for the SMSC95XX device</div>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
|-
+
! '''Note'''
+
| None documented
+
|-
+
|}
+
</div></div>
+
<br />
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
+
<pre style="border: 0; padding-bottom:0px;">function SMSC95XXDeviceControl(Network:PNetworkDevice; Request:Integer; Argument1:PtrUInt; var Argument2:PtrUInt):LongWord;</pre>
+
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of NetworkDeviceControl for the SMSC95XX device</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of NetworkDeviceControl for the SMSC95XX device</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| None documented
+
| Not intended to be called directly by applications, use NetworkDeviceControl instead.
 
|-
 
|-
 
|}
 
|}
Line 1,263: Line 1,261:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| None documented
+
| Not intended to be called directly by applications, use NetworkBufferAllocate instead.
 
|-
 
|-
 
|}
 
|}
Line 1,275: Line 1,273:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| None documented
+
| Not intended to be called directly by applications, use NetworkBufferRelease instead.
 
|-
 
|-
 
|}
 
|}
Line 1,287: Line 1,285:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| None documented
+
| Not intended to be called directly by applications, use NetworkBufferReceive instead.
 
|-
 
|-
 
|}
 
|}
Line 1,299: Line 1,297:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| None documented
+
| Not intended to be called directly by applications, use NetworkBufferTransmit instead.
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">procedure SMSC95XXTransmitStart(Network:PSMSC95XXNetwork);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Transmit start function for the SMSC95XX Network device</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| Not intended to be called directly by applications
 +
Caller must hold the network lock
 
|-
 
|-
 
|}
 
|}
Line 1,314: Line 1,325:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Device'''
+
! Device
 
| The USB device to attempt to bind to
 
| The USB device to attempt to bind to
 
|-
 
|-
! '''Interrface'''
+
! Interrface
 
| The USB interface to attempt to bind to (or nil for whole device)
 
| The USB interface to attempt to bind to (or nil for whole device)
 
|-
 
|-
! '''Return'''
+
! Return
| USB_STATUS_SUCCESS if completed, USB_STATUS_DEVICE_UNSUPPORTED if unsupported or another error code on failure
+
| USB_STATUS_SUCCESS if completed, USB_STATUS_DEVICE_UNSUPPORTED if unsupported or another error code on failure.
 
|-
 
|-
 
|}
 
|}
Line 1,332: Line 1,343:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Device'''
+
! Device
 
| The USB device to unbind from
 
| The USB device to unbind from
 
|-
 
|-
! '''Interrface'''
+
! Interrface
 
| The USB interface to unbind from (or nil for whole device)
 
| The USB interface to unbind from (or nil for whole device)
 
|-
 
|-
! '''Return'''
+
! Return
 
| USB_STATUS_SUCCESS if completed or another error code on failure
 
| USB_STATUS_SUCCESS if completed or another error code on failure
 
|-
 
|-
Line 1,350: Line 1,361:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Request'''
+
! Request
 
| The USB request which has completed
 
| The USB request which has completed
 
|-
 
|-
Line 1,362: Line 1,373:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Request'''
+
! Request
 
| The USB request which has completed
 
| The USB request which has completed
 
|-
 
|-
! '''Note'''
+
! Note
 
| Request is passed to worker thread for processing to prevent blocking the USB completion
 
| Request is passed to worker thread for processing to prevent blocking the USB completion
 
|-
 
|-
Line 1,377: Line 1,388:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Request'''
+
! Request
 
| The USB request which has completed
 
| The USB request which has completed
 
|-
 
|-
Line 1,389: Line 1,400:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Request'''
+
! Request
 
| The USB request which has completed
 
| The USB request which has completed
 
|-
 
|-
! '''Note'''
+
! Note
 
| Request is passed to worker thread for processing to prevent blocking the USB completion
 
| Request is passed to worker thread for processing to prevent blocking the USB completion
 
|-
 
|-
Line 1,404: Line 1,415:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Request'''
+
! Request
 
| The USB request which has completed
 
| The USB request which has completed
 
|-
 
|-
Line 1,416: Line 1,427:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Request'''
+
! Request
 
| The USB request which has completed
 
| The USB request which has completed
 
|-
 
|-
! '''Note'''
+
! Note
 
| Request is passed to worker thread for processing to prevent blocking the USB completion
 
| Request is passed to worker thread for processing to prevent blocking the USB completion
 
|-
 
|-
Line 1,430: Line 1,441:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function SMSC95XXCheckDevice(Device:PUSBDevice):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function SMSC95XXCheckDevice(Device:PUSBDevice):LongWord;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check the Vendor and Device ID against the supported devices</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check the Vendor and Device Id against the supported devices</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Device'''
+
! Device
 
| USB device to check
 
| USB device to check
 
|-
 
|-
! '''Return'''
+
! Return
 
| USB_STATUS_SUCCESS if completed or another error code on failure
 
| USB_STATUS_SUCCESS if completed or another error code on failure
 
|-
 
|-
Line 1,449: Line 1,460:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Device'''
+
! Device
 
| USB device to read from
 
| USB device to read from
 
|-
 
|-
! '''Index'''
+
! Index
 
| Index of the register to read
 
| Index of the register to read
 
|-
 
|-
! '''Data'''
+
! Data
 
| Value to return to registers contents
 
| Value to return to registers contents
 
|-
 
|-
! '''Return'''
+
! Return
 
| USB_STATUS_SUCCESS if completed or another error code on failure
 
| USB_STATUS_SUCCESS if completed or another error code on failure
 
|-
 
|-
Line 1,470: Line 1,481:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Device'''
+
! Device
 
| USB device to write to
 
| USB device to write to
 
|-
 
|-
! '''Index'''
+
! Index
 
| Index of the register to write
 
| Index of the register to write
 
|-
 
|-
! '''Data'''
+
! Data
 
| Value to write to the register
 
| Value to write to the register
 
|-
 
|-
! '''Return'''
+
! Return
 
| USB_STATUS_SUCCESS if completed or another error code on failure
 
| USB_STATUS_SUCCESS if completed or another error code on failure
 
|-
 
|-
Line 1,491: Line 1,502:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Device'''
+
! Device
 
| USB device to modify
 
| USB device to modify
 
|-
 
|-
! '''Index'''
+
! Index
 
| Index of the register to modify
 
| Index of the register to modify
 
|-
 
|-
! '''Mask'''
+
! Mask
| Mask that contains 1 for the bits where the old value in the register will be kept rather than cleared (unless those bits also appear in Value, in which case they will still be set)
+
| Mask that contains 1 for the bits where the old value in the register will be kept rather than cleared (unless those bits also appear in Value, in which case they will still be set).
 
|-
 
|-
! '''Value'''
+
! Value
 
| Mask of bits to set in the register
 
| Mask of bits to set in the register
 
|-
 
|-
! '''Return'''
+
! Return
 
| USB_STATUS_SUCCESS if completed or another error code on failure
 
| USB_STATUS_SUCCESS if completed or another error code on failure
 
|-
 
|-
Line 1,515: Line 1,526:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Device'''
+
! Device
 
| USB device to write to
 
| USB device to write to
 
|-
 
|-
! '''Index'''
+
! Index
 
| Index of the register to modify
 
| Index of the register to modify
 
|-
 
|-
! '''Value'''
+
! Value
| Bits to set in the register. At positions where there is a 0, the old value in the register will be written
+
| Bits to set in the register. At positions where there is a 0, the old value in the register will be written.
 
|-
 
|-
! '''Return'''
+
! Return
 
| USB_STATUS_SUCCESS if completed or another error code on failure
 
| USB_STATUS_SUCCESS if completed or another error code on failure
 
|-
 
|-
Line 1,536: Line 1,547:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Device'''
+
! Device
 
| USB device to write to
 
| USB device to write to
 
|-
 
|-
! '''Index'''
+
! Index
 
| Index of the register to modify
 
| Index of the register to modify
 
|-
 
|-
! '''Value'''
+
! Value
| Bits to clear in the register. At positions where there is a 0, the old value in the register will be written
+
| Bits to clear in the register. At positions where there is a 0, the old value in the register will be written.
 
|-
 
|-
! '''Return'''
+
! Return
 
| USB_STATUS_SUCCESS if completed or another error code on failure
 
| USB_STATUS_SUCCESS if completed or another error code on failure
 
|-
 
|-
Line 1,551: Line 1,562:
 
</div></div>
 
</div></div>
 
<br />  
 
<br />  
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SMSC95XXPHYRead(Device:PUSBDevice; Index:LongWord; var Value:Word):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read a register from the MII Management serial interface on a SMSC95XX USB Ethernet Adapter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Device
 +
| USB device to read from
 +
|-
 +
! Index
 +
| Index of the register to read
 +
|-
 +
! Value
 +
| Value to return the register contents
 +
|-
 +
! Return
 +
| USB_STATUS_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SMSC95XXPHYWrite(Device:PUSBDevice; Index:LongWord; Value:Word):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Write a register to the MII Management serial interface on a SMSC95XX USB Ethernet Adapter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Device
 +
| USB device to write to
 +
|-
 +
! Index
 +
| Index of the register to write
 +
|-
 +
! Value
 +
| Value to write to the register
 +
|-
 +
! Return
 +
| USB_STATUS_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />   
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SMSC95XXPHYInitialize(Device:PUSBDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Initialize default MII Management serial interface options on a SMSC95XX USB Ethernet Adapter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Device
 +
| USB device to initialize
 +
|-
 +
! Return
 +
| USB_STATUS_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SMSC95XXPHYWaitNotBusy(Device:PUSBDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Wait for the MII Management serial interface to be not busy on a SMSC95XX USB Ethernet Adapter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Device
 +
| USB device to wait for
 +
|-
 +
! Return
 +
| USB_STATUS_SUCCESS if completed or another error code on failure
 +
|-
 +
! Note
 +
| Caller must hold the PHY Lock
 +
|-
 +
|}
 +
</div></div>
 +
<br /> 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SMSC95XXWaitEEPROM(Device:PUSBDevice):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Wait for the EEPROM (if present) to be not busy on a SMSC95XX USB Ethernet Adapter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Device
 +
| USB device to wait for
 +
|-
 +
! Return
 +
| USB_STATUS_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />   
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SMSC95XXReadEEPROM(Device:PUSBDevice; Offset,Length:LongWord; Data:PByte):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Read from the EEPROM (if present) on a SMSC95XX USB Ethernet Adapter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Device
 +
| USB device to read from
 +
|-
 +
! Offset
 +
| The byte offset to start reading
 +
|-
 +
! Length
 +
| The number of bytes to read
 +
|-
 +
! Data
 +
| Pointer to a buffer to receive the data
 +
|-
 +
! Return
 +
| USB_STATUS_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 +
<pre style="border: 0; padding-bottom:0px;">function SMSC95XXWriteEEPROM(Device:PUSBDevice; Offset,Length:LongWord; Data:PByte):LongWord;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Write to the EEPROM (if present) on a SMSC95XX USB Ethernet Adapter</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Device
 +
| USB device to write to
 +
|-
 +
! Offset
 +
| The byte offset to start writing
 +
|-
 +
! Length
 +
| The number of bytes to write
 +
|-
 +
! Data
 +
| Pointer to a buffer containing the data
 +
|-
 +
! Return
 +
| USB_STATUS_SUCCESS if completed or another error code on failure
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<pre style="border: 0; padding-bottom:0px;">function SMSC95XXSetMacAddress(Device:PUSBDevice; Address:PHardwareAddress):LongWord;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function SMSC95XXSetMacAddress(Device:PUSBDevice; Address:PHardwareAddress):LongWord;</pre>
Line 1,557: Line 1,706:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Device'''
+
! Device
 
| USB device to write to
 
| USB device to write to
 
|-
 
|-
! '''Address'''
+
! Address
 
| MAC address value to set
 
| MAC address value to set
 
|-
 
|-
! '''Return'''
+
! Return
 
| USB_STATUS_SUCCESS if completed or another error code on failure
 
| USB_STATUS_SUCCESS if completed or another error code on failure
 
|-
 
|-
Line 1,575: Line 1,724:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Device'''
+
! Device
 
| USB device read from
 
| USB device read from
 
|-
 
|-
! '''Address'''
+
! Address
 
| Value to read the MAC address into
 
| Value to read the MAC address into
 
|-
 
|-
! '''Return'''
+
! Return
 
| USB_STATUS_SUCCESS if completed or another error code on failure
 
| USB_STATUS_SUCCESS if completed or another error code on failure
 
|-
 
|-

Latest revision as of 05:31, 17 June 2021

Return to Unit Reference


Description


SMSC LAN95xx USB Ethernet Driver unit

The SMSC LAN95xx has an integrated USB Hub and is technically a compound device. Here we instead use the vendor Id and product Id of the vendor specific class device attached to the hub that is the device we actually need to communicate with. The hub will be detected and bound by the default USB Hub driver when it is enumerated by the USB core.

Constants



SMSC95XX specific constants SMSC95XX_*
SMSC95XX_NETWORK_DESCRIPTION = 'SMSC LAN95XX USB Ethernet Adapter'; Description of SMSC95XX device
 
SMSC95XX_DRIVER_NAME = 'SMSC LAN95XX USB Ethernet Adapter Driver'; Name of SMSC95XX driver
 
SMSC95XX_MAX_SINGLE_PACKET_SIZE = 2048; Maximum size of a bulk IN receive when burst cap and multiple frames is not in use
 
SMSC95XX_DEFAULT_BULK_IN_DELAY = $2000;  
 
SMSC95XX_MAX_TX_REQUESTS = 1;  
SMSC95XX_MAX_RX_REQUESTS = 1; ((60 * 1518) div SMSC95XX_DEFAULT_HS_BURST_CAP_SIZE) + 1; SMSC95XX_MAX_RX_REQUESTS (DIV_ROUND_UP(60 * 1518, SMSC95XX_DEFAULT_HS_BURST_CAP_SIZE))
 
SMSC95XX_MAX_EEPROM_SIZE = 512;  
 
SMSC95XX_INTERNAL_PHY_ID = 1;  
 
SMSC95XX_PHY_ID_MASK = $1F;  
SMSC95XX_REG_INDEX_MASK = $1F;  


SMSC95XX device Id MSC95XX_DEVICE_ID_*
SMSC95XX_DEVICE_ID_COUNT = 5; Number of supported Device Ids
 
SMSC95XX_DEVICE_ID:array[0..SMSC95XX_DEVICE_ID_COUNT - 1] of TUSBDeviceId = (
(idVendor:$0424;idProduct:$ec00), LAN9512/LAN9514 Ethernet
(idVendor:$0424;idProduct:$9500), LAN9500 Ethernet
(idVendor:$0424;idProduct:$9730), LAN9730 Ethernet (HSIC)
(idVendor:$0424;idProduct:$9900), SMSC9500 USB Ethernet Device (SAL10)
(idVendor:$0424;idProduct:$9e00)); LAN9500A Ethernet


SMSC95XX transmit and receive SMSC95XX_TX_*
SMSC95XX_TX_OVERHEAD = 8;  
SMSC95XX_RX_OVERHEAD = 4;  


SMSC95XX USB packet size SMSC95XX_*_USB_PKT_SIZE
SMSC95XX_HS_USB_PKT_SIZE = 512;  
SMSC95XX_FS_USB_PKT_SIZE = 64;  


SMSC95XX burst size SMSC95XX_DEFAULT_*_BURST_CAP_SIZE
SMSC95XX_DEFAULT_HS_BURST_CAP_SIZE = (16 * 1024) + (5 * SMSC95XX_HS_USB_PKT_SIZE);  
SMSC95XX_DEFAULT_FS_BURST_CAP_SIZE = (6 * 1024) + (33 * SMSC95XX_FS_USB_PKT_SIZE);  


SMSC95XX transmit command SMSC95XX_TX_COMMAND_*
Transmitted Ethernet frames (To the Bulk OUT endpoint) must be prefixed with an 8-byte header containing the "Tx command word A" followed by the "Tx command word B".
 
TX Command word A
SMSC95XX_TX_COMMAND_A_DATA_OFFSET = $001F0000;  
SMSC95XX_TX_COMMAND_A_FIRST_SEG = $00002000;  
SMSC95XX_TX_COMMAND_A_LAST_SEG = $00001000;  
SMSC95XX_TX_COMMAND_A_BUF_SIZE = $000007FF;  
 
TX Command word B
SMSC95XX_TX_COMMAND_B_CSUM_ENABLE = $00004000;  
SMSC95XX_TX_COMMAND_B_ADD_CRC_DISABLE = $00002000;  
SMSC95XX_TX_COMMAND_B_DISABLE_PADDING = $00001000;  
SMSC95XX_TX_COMMAND_B_PKT_BYTE_LENGTH = $000007FF;  


SMSC95XX receive status SMSC95XX_RX_STATUS_*
Received Ethernet frames (From the Bulk IN endpoint) are prefixed with a 4-byte Rx Status word containing the flags below. A single USB Bulk IN transfer may contain multiple Ethernet frames (provided that HW_CONFIG_MEF is set in HW_CONFIG), each of which is prepended by a Rx Status word and padded to a 4-byte boundary.
 
SMSC95XX_RX_STATUS_FF = $40000000; Filter Fail
SMSC95XX_RX_STATUS_FL = $3FFF0000; Frame Length
SMSC95XX_RX_STATUS_ES = $00008000; Error Summary
SMSC95XX_RX_STATUS_BF = $00002000; Broadcast Frame
SMSC95XX_RX_STATUS_LE = $00001000; Length Error
SMSC95XX_RX_STATUS_RF = $00000800; Runt Frame
SMSC95XX_RX_STATUS_MF = $00000400; Multicast Frame
SMSC95XX_RX_STATUS_TL = $00000080; Frame too long
SMSC95XX_RX_STATUS_CS = $00000040; Collision Seen
SMSC95XX_RX_STATUS_FT = $00000020; Frame Type
SMSC95XX_RX_STATUS_RW = $00000010; Receive Watchdog
SMSC95XX_RX_STATUS_ME = $00000008; Mii Error
SMSC95XX_RX_STATUS_DB = $00000004; Dribbling
SMSC95XX_RX_STATUS_CRC = $00000002; CRC Error


SMSC95XX Id revision SMSC95XX_ID_REVISION_*
Read/Write Register Definitions
 
SMSC95XX_ID_REVISION = $00;  
SMSC95XX_ID_REVISION_CHIP_ID_MASK = $FFFF0000;  
SMSC95XX_ID_REVISION_CHIP_REV_MASK = $0000FFFF;  
SMSC95XX_ID_REVISION_CHIP_ID_9500 = $9500;  
SMSC95XX_ID_REVISION_CHIP_ID_9500A = $9E00;  
SMSC95XX_ID_REVISION_CHIP_ID_9512 = $EC00;  
SMSC95XX_ID_REVISION_CHIP_ID_9530 = $9530;  
SMSC95XX_ID_REVISION_CHIP_ID_89530 = $9E08;  
SMSC95XX_ID_REVISION_CHIP_ID_9730 = $9730;  


SMSC95XX interrupt status SMSC95XX_INTERRUPT_STATUS_*
SMSC95XX_INTERRUPT_STATUS = $08;  
SMSC95XX_INTERRUPT_STATUS_TX_STOP = $00020000;  
SMSC95XX_INTERRUPT_STATUS_RX_STOP = $00010000;  
SMSC95XX_INTERRUPT_STATUS_PHY_INT = $00008000;  
SMSC95XX_INTERRUPT_STATUS_TXE = $00004000;  
SMSC95XX_INTERRUPT_STATUS_TDFU = $00002000;  
SMSC95XX_INTERRUPT_STATUS_TDFO = $00001000;  
SMSC95XX_INTERRUPT_STATUS_RXDF = $00000800;  
SMSC95XX_INTERRUPT_STATUS_GPIOS = $000007FF;  
SMSC95XX_INTERRUPT_STATUS_CLEAR_ALL = $FFFFFFFF;  


SMSC95XX receive configuration SMSC95XX_RX_CONFIG_*
SMSC95XX_RX_CONFIG = $0C;  
SMSC95XX_RX_CONFIG_FIFO_FLUSH = $00000001; Most likely, software can write 1 to this flag discard all the Rx packets currently buffered by the device.


SMSC95XX transmit configuration SMSC95XX_TX_CONFIG_*
SMSC95XX_TX_CONFIG = $10;  
SMSC95XX_TX_CONFIG_ON = $00000004; Transmit On flag. Software can write 1 here to enable transmit functionality (at the PHY layer). Writing 0 is ignored. Reads as current on (1)/off (0) state. However, to actually allow packets to be transmitted, software also must set the MAC_CONTROL_TXEN flag in the MAC_CONTROL register.
SMSC95XX_TX_CONFIG_STOP = $00000002; Transmit Stop flag. Software can write 1 here to turn transmit functionality off. Writing 0 is ignored. Always reads as 0.
SMSC95XX_TX_CONFIG_FIFO_FLUSH = $00000001; Most likely, software can write 1 to this flag to discard all the Tx packets currently buffered by the device.


SMSC95XX hardware configuration SMSC95XX_HW_CONFIG_*
This contains a number of flags that software can modify to configure the Ethernet Adapter (Default 0).
 
SMSC95XX_HW_CONFIG = $14;  
SMSC95XX_HW_CONFIG_BIR = $00001000;  
SMSC95XX_HW_CONFIG_LEDB = $00000800;  
SMSC95XX_HW_CONFIG_RXDOFF = $00000600; Rx packet offset: Software can modify this 2-bit field to cause Rx packets to be offset by the specified number of bytes. This is apparently intended to allow software to align the IP header on a 4 byte boundary.
SMSC95XX_HW_CONFIG_DRP = $00000040;  
 
SMSC95XX_HW_CONFIG_MEF = $00000020; Multiple Ethernet Frames: Software can set this flag in HW_CONFIG to allow multiple Ethernet frames to be received in a single USB Bulk In transfer. The default value after reset is 0, meaning that the hardware will by default provide each received Ethernet frame in a separate USB Bulk In transfer.
SMSC95XX_HW_CONFIG_LRST = $00000008;  
SMSC95XX_HW_CONFIG_PSEL = $00000004;  
SMSC95XX_HW_CONFIG_BCE = $00000002;  
SMSC95XX_HW_CONFIG_SRST = $00000001;  


SMSC95XX RX FIFO SMSC95XX_RX_FIFO_*
SMSC95XX_RX_FIFO_INF = $18;  


SMSC95XX power management control SMSC95XX_PM_CONTROL_*
SMSC95XX_PM_CONTROL = $20;  
SMSC95XX_PM_CONTROL_RES_CLR_WKP_STS = $00000200;  
SMSC95XX_PM_CONTROL_DEV_RDY = $00000080;  
SMSC95XX_PM_CONTROL_SUS_MODE = $00000060;  
SMSC95XX_PM_CONTROL_SUS_MODE_0 = $00000000;  
SMSC95XX_PM_CONTROL_SUS_MODE_1 = $00000020;  
SMSC95XX_PM_CONTROL_SUS_MODE_2 = $00000040;  
SMSC95XX_PM_CONTROL_SUS_MODE_3 = $00000060;  
 
SMSC95XX_PM_CONTROL_PHY_RST = $00000010; PHY Reset flag: Write 1 to start a PHY reset on the device. Automatically cleared when the PHY has reset (less than 1 second).
SMSC95XX_PM_CONTROL_WOL_EN = $00000008;  
SMSC95XX_PM_CONTROL_ED_EN = $00000004;  
SMSC95XX_PM_CONTROL_WUPS = $00000003;  
SMSC95XX_PM_CONTROL_WUPS_NO = $00000000;  
SMSC95XX_PM_CONTROL_WUPS_ED = $00000001;  
SMSC95XX_PM_CONTROL_WUPS_WOL = $00000002;  
SMSC95XX_PM_CONTROL_WUPS_MULTI = $00000003;  


SMSC95XX LED GPIO configuration SMSC95XX_LED_GPIO_CONFIG_*
SMSC95XX_LED_GPIO_CONFIG = $24;  
SMSC95XX_LED_GPIO_CONFIG_SPD_LED = $01000000;  
SMSC95XX_LED_GPIO_CONFIG_LNK_LED = $00100000;  
SMSC95XX_LED_GPIO_CONFIG_FDX_LED = $00010000;  


SMSC95XX GPIO configuration SMSC95XX_GPIO_CONFIG_*
SMSC95XX_GPIO_CONFIG = $28;  


SMSC95XX advanced flow control configuration SMSC95XX_AFC_CONFIG_*
Default 0
 
SMSC95XX_AFC_CONFIG = $2C; Value written to AFC_CFG by the Linux driver, with the following explanation:

Hi watermark = 15.5Kb (~10 mtu pkts)
low watermark = 3k (~2 mtu pkts)
backpressure duration = ~ 350us
Apply FC on any frame

 
SMSC95XX_AFC_CONFIG_DEFAULT = $00F830A1;  


SMSC95XX EEPROM command SMSC95XX_E2P_COMMAND_*
Unknown Register
 
SMSC95XX_E2P_COMMAND = $30;  
SMSC95XX_E2P_COMMAND_BUSY= $80000000;  
SMSC95XX_E2P_COMMAND_MASK= $70000000;  
SMSC95XX_E2P_COMMAND_READ = $00000000;  
SMSC95XX_E2P_COMMAND_EWDS= $10000000;  
SMSC95XX_E2P_COMMAND_EWEN = $20000000;  
SMSC95XX_E2P_COMMAND_WRITE = $30000000;  
SMSC95XX_E2P_COMMAND_WRAL = $40000000;  
SMSC95XX_E2P_COMMAND_ERASE = $50000000;  
SMSC95XX_E2P_COMMAND_ERAL = $60000000;  
SMSC95XX_E2P_COMMAND_RELOAD = $70000000;  
SMSC95XX_E2P_COMMAND_TIMEOUT = $00000400;  
SMSC95XX_E2P_COMMAND_LOADED = $00000200;  
SMSC95XX_E2P_COMMAND_ADDR = $000001FF;  


SMSC95XX EEPROM data SMSC95XX_E2P_DATA_*
Unknown Register
 
SMSC95XX_E2P_DATA = $34;  
SMSC95XX_E2P_DATA_MASK = $000000FF;  


SMSC95XX burst cap SMSC95XX_BURST_CAP_*
When multiple Ethernet frames per USB bulk transfer are enabled, this register must be set by software to specify the maximum number of USB (not networking!) packets the hardware will provide in a single Bulk In transfer.
This register is ignored if HW_CONFIG_MEF is not set. Otherwise, this must be set to at least 5, which represents a maximum of 5 * 512 = 2560 bytes of data per transfer from the high speed Bulk In endpoint.
 
SMSC95XX_BURST_CAP = $38;  


SMSC95XX GPIO wake SMSC95XX_GPIO_WAKE_*
SMSC95XX_GPIO_WAKE = $64;  


SMSC95XX interrupt endpoint control SMSC95XX_INT_EP_CONTROL_*
SMSC95XX_INT_EP_CONTROL = $68;  
SMSC95XX_INT_EP_CONTROL_INTEP = $80000000;  
SMSC95XX_INT_EP_CONTROL_MACRTO = $00080000;  
SMSC95XX_INT_EP_CONTROL_TX_STOP = $00020000;  
SMSC95XX_INT_EP_CONTROL_RX_STOP = $00010000;  
SMSC95XX_INT_EP_CONTROL_PHY_INT = $00008000;  
SMSC95XX_INT_EP_CONTROL_TXE = $00004000;  
SMSC95XX_INT_EP_CONTROL_TDFU = $00002000;  
SMSC95XX_INT_EP_CONTROL_TDFO = $00001000;  
SMSC95XX_INT_EP_CONTROL_RXDF = $00000800;  
SMSC95XX_INT_EP_CONTROL_GPIOS = $000007FF;  


SMSC95XX bulk in delay SMSC95XX_BULK_IN_DELAY_*
The low 16 bits of this register contain a value that indicates the maximum amount of time the hardware waits for additional packets before responding to a Bulk In request once a packet has been received. From experiment, the time is specified on a linear scale where each unit is approximately 17 nanoseconds. The default value in this register after reset is 0x800 which indicates a delay of about 34.8 microseconds, assuming that the scale is 0-based. SMSC's Linux driver changes this to 0x2000, or a delay of about 139 microseconds.
The value in this register no effect if HW_CONFIG_MEF is not set in the HW_CONFIG register.
 
SMSC95XX_BULK_IN_DELAY = $6C;  


SMSC95XX media access control SMSC95XX_MAC_CONTROL_*
SMSC95XX_MAC_CONTROL = $100;  
 
SMSC95XX_MAC_CONTROL_RXALL = $80000000;  
SMSC95XX_MAC_CONTROL_RCVOWN = $00800000; Half duplex mode
SMSC95XX_MAC_CONTROL_LOOPBK = $00200000; Loopback mode
SMSC95XX_MAC_CONTROL_FDPX = $00100000; Full duplex mode
SMSC95XX_MAC_CONTROL_MCPAS = $00080000; Multicast pass: receive all multicast packets
SMSC95XX_MAC_CONTROL_PRMS = $00040000; Promiscuous mode
SMSC95XX_MAC_CONTROL_INVFILT = $00020000; Inverse filtering
SMSC95XX_MAC_CONTROL_PASSBAD = $00010000; Pass on bad frames
SMSC95XX_MAC_CONTROL_HFILT = $00008000;  
SMSC95XX_MAC_CONTROL_HPFILT = $00002000; Filter received multicast packets by the set of addresses specified by HASH_HIGH and HASH_LOW
SMSC95XX_MAC_CONTROL_LCOLL = $00001000;  
SMSC95XX_MAC_CONTROL_BCAST = $00000800; Receive broadcast packets
SMSC95XX_MAC_CONTROL_DISRTY = $00000400;  
SMSC95XX_MAC_CONTROL_PADSTR = $00000100;  
SMSC95XX_MAC_CONTROL_BOLMT_MASK = $000000C0;  
SMSC95XX_MAC_CONTROL_DFCHK = $00000020;  
SMSC95XX_MAC_CONTROL_TX_ENABLE = $00000008; Transmit enabled (MAC layer). 1 to enable/0 to disable (Must also set the SMSC95XX_TX_CONFIG_ON flag in the SMSC95XX_TX_CONFIG register).
SMSC95XX_MAC_CONTROL_RX_ENABLE = $00000004; Receive enabled. 1 to enable/0 to disable.


SMSC95XX MAC address SMSC95XX_MAC_ADDRESS_*
This contains the high 2 bytes of the MAC address used by the device, stored in little endian order.

As they are not part of the MAC address, the hardware ignores the values written to the upper 2 bytes of this register and always reads them as 0.

Software can change the MAC address used by the device by writing to the MAC_ADDRESS_HIGH and MAC_ADDRESS_LOW registers, and it can retrieve the current MAC address by reading them. On reset, the device will read its MAC address from the EEPROM if one is attached; otherwise it will set its MAC address to 0xFFFFFFFFFFFF.
 
SMSC95XX_MAC_ADDRESS_HIGH = $104;  
This contains the low 4 bytes of the MAC address used by the device, stored in little endian order. See MAC_ADDRESS_HIGH.
SMSC95XX_MAC_ADDRESS_LOW = $108;  


SMSC95XX hash SMSC95XX_HASH_*
Used together with HASH_LOW to filter specific multicast packets
SMSC95XX_HASH_HIGH = $10C;  
Used together with HASH_HIGH to filter specific multicast packets
SMSC95XX_HASH_LOW = $110;  


SMSC95XX MII data SMSC95XX_MII_*
Unknown Register
 
SMSC95XX_MII_ADDR = $114;  
SMSC95XX_MII_WRITE = $02;  
SMSC95XX_MII_BUSY = $01;  
SMSC95XX_MII_READ = $00; ~of MII Write bit
 
SMSC95XX_MII_DATA = $118;  


SMSC95XX flow SMSC95XX_FLOW_*
Unknown Register,(Default 0)
 
SMSC95XX_FLOW = $11C;  
SMSC95XX_FLOW_FCPT = $FFFF0000;  
SMSC95XX_FLOW_FCPASS = $00000004;  
SMSC95XX_FLOW_FCEN = $00000002;  
SMSC95XX_FLOW_FCBSY = $00000001;  


SMSC95XX VLAN SMSC95XX_VLAN*
Unknown Register
 
SMSC95XX_VLAN1 = $120;  
 
SMSC95XX_VLAN2 = $124;  


SMSC95XX WUFF SMSC95XX_WUFF_*
Unknown Register
 
SMSC95XX_WUFF = $128;  
SMSC95XX_LAN9500_WUFF_NUM = 4;  
SMSC95XX_LAN9500A_WUFF_NUM = 8;  


SMSC95XX wakeup control and status SMSC95XX_WUCSR_*
Unknown Register
 
SMSC95XX_WUCSR = $12C;  
SMSC95XX_WUCSR_WFF_PTR_RST = $80000000;  
SMSC95XX_WUCSR_GUE = $00000200;  
SMSC95XX_WUCSR_WUFR = $00000040;  
SMSC95XX_WUCSR_WAKE_EN = $00000004;  
SMSC95XX_WUCSR_MPEN = $00000002;  


SMSC95XX checksum offload engine/enable control SMSC95XX_COE_*
SMSC95XX_COE_CONTROL = $130;  
SMSC95XX_TX_COE_ENABLE = $00010000; Transmit checksum offload enabled. 1 to enable/0 to disable (Default 0).
SMSC95XX_RX_COE_MODE = $00000002; Unknown (Default 0)
SMSC95XX_RX_COE_ENABLE = $00000001; Receive checksum offload enabled. 1 to enable/0 to disable (Default 0).


SMSC95XX vendor-specific physical SMSC95XX_PHY_EDPD_*
EDPD NLP/crossover time configuration (LAN9500A only)
 
SMSC95XX_PHY_EDPD_CONFIG = 16;  
SMSC95XX_PHY_EDPD_CONFIG_TX_NLP_EN = $8000;  
SMSC95XX_PHY_EDPD_CONFIG_TX_NLP_1000 = $0000;  
SMSC95XX_PHY_EDPD_CONFIG_TX_NLP_768 = $2000;  
SMSC95XX_PHY_EDPD_CONFIG_TX_NLP_512 = $4000;  
SMSC95XX_PHY_EDPD_CONFIG_TX_NLP_256 = $6000;  
SMSC95XX_PHY_EDPD_CONFIG_RX_1_NLP = $1000;  
SMSC95XX_PHY_EDPD_CONFIG_RX_NLP_64 = $0000;  
SMSC95XX_PHY_EDPD_CONFIG_RX_NLP_256 = $0400;  
SMSC95XX_PHY_EDPD_CONFIG_RX_NLP_512 = $0800;  
SMSC95XX_PHY_EDPD_CONFIG_RX_NLP_1000 = $0C00;  
SMSC95XX_PHY_EDPD_CONFIG_EXT_CROSSOVER = $0001;  
SMSC95XX_PHY_EDPD_CONFIG_DEFAULT = (SMSC95XX_PHY_EDPD_CONFIG_TX_NLP_EN or SMSC95XX_PHY_EDPD_CONFIG_TX_NLP_768 or SMSC95XX_PHY_EDPD_CONFIG_RX_1_NLP);  


SMSC95XX mode control and status SMSC95XX_MODE_CTRL_STS_*
SMSC95XX_PHY_MODE_CTRL_STS = 17;  
SMSC95XX_MODE_CTRL_STS_EDPWRDOWN = $2000;  
SMSC95XX_MODE_CTRL_STS_ENERGYON = $0002;  


SMSC95XX special control and status SMSC95XX_SPECIAL_CTRL_STS_*
SMSC95XX_SPECIAL_CTRL_STS = 27;  
SMSC95XX_SPECIAL_CTRL_STS_OVRRD_AMDIX = $8000;  
SMSC95XX_SPECIAL_CTRL_STS_AMDIX_ENABLE = $4000;  
SMSC95XX_SPECIAL_CTRL_STS_AMDIX_STATE = $2000;  


SMSC95XX physical interrupt source SMSC95XX_PHY_INT_SRC_*
SMSC95XX_PHY_INT_SRC = 29;  
SMSC95XX_PHY_INT_SRC_ENERGY_ON = $0080;  
SMSC95XX_PHY_INT_SRC_ANEG_COMP = $0040;  
SMSC95XX_PHY_INT_SRC_REMOTE_FAULT = $0020;  
SMSC95XX_PHY_INT_SRC_LINK_DOWN = $0010;  


SMSC95XX physical interrupt mask SMSC95XX_PHY_INT_MASK_*
SMSC95XX_PHY_INT_MASK = 30;  
SMSC95XX_PHY_INT_MASK_ENERGY_ON = $0080;  
SMSC95XX_PHY_INT_MASK_ANEG_COMP = $0040;  
SMSC95XX_PHY_INT_MASK_REMOTE_FAULT = $0020;  
SMSC95XX_PHY_INT_MASK_LINK_DOWN = $0010;  
SMSC95XX_PHY_INT_MASK_DEFAULT = (SMSC95XX_PHY_INT_MASK_ANEG_COMP or SMSC95XX_PHY_INT_MASK_LINK_DOWN);  


SMSC95XX physical special SMSC95XX_PHY_SPECIAL_*
SMSC95XX_PHY_SPECIAL = 31;  
SMSC95XX_PHY_SPECIAL_SPD = $001C;  
SMSC95XX_PHY_SPECIAL_SPD_10HALF = $0004;  
SMSC95XX_PHY_SPECIAL_SPD_10FULL = $0014;  
SMSC95XX_PHY_SPECIAL_SPD_100HALF = $0008;  
SMSC95XX_PHY_SPECIAL_SPD_100FULL = $0018;  


SMSC95XX USB vendor request SMSC95XX_VENDOR_REQUEST_*
Write Register: Specify as bRequest of a USB control message to write a register on the SMSC LAN95XX. bmRequestType must specify a vendor-specific request in the host-to-device direction, wIndex must specify the register, and the transfer data must be 4 bytes containing the value to write.
SMSC95XX_VENDOR_REQUEST_WRITE_REGISTER = $A0;  
 
Read Register: Specify as bRequest of a USB control message to read a register from the SMSC LAN95XX. bmRequestType must specify a vendor-specific request in the device-to-host direction, wIndex must specify the register, and the transfer data must be a 4 byte location to read the value.
SMSC95XX_VENDOR_REQUEST_READ_REGISTER = $A1;  
 
Get Statistics
SMSC95XX_VENDOR_REQUEST_GET_STATS = $A2;  


SMSC95XX interrupt endpoint status word SMSC95XX_INT_ENP_*
SMSC95XX_INT_ENP_TX_STOP = $00000001 shl 17;  
SMSC95XX_INT_ENP_RX_STOP = $00000001 shl 16;  
SMSC95XX_INT_ENP_PHY_INT = $00000001 shl 15;  
SMSC95XX_INT_ENP_TXE = $00000001 shl 14;  
SMSC95XX_INT_ENP_TDFU = $00000001 shl 13;  
SMSC95XX_INT_ENP_TDFO = $00000001 shl 12;  
SMSC95XX_INT_ENP_RXDF = $00000001 shl 11;  


Type definitions



SMSC95XX network

PSMSC95XXNetwork = ^TSMSC95XXNetwork;

TSMSC95XXNetwork = record

Network Properties
Network:TNetworkDevice;  
USB Properties
ReceiveRequests:array[0..SMSC95XX_MAX_RX_REQUESTS - 1] of PUSBRequest; USB requests for packet receive data
TransmitRequests:array[0..SMSC95XX_MAX_TX_REQUESTS - 1] of PUSBRequest; USB requests for packet transmit data
InterruptRequest:PUSBRequest; USB request for interrupt data
ReceiveEndpoint:PUSBEndpointDescriptor; Bulk IN Endpoint
TransmitEndpoint:PUSBEndpointDescriptor; Bulk OUT Endpoint
InterruptEndpoint:PUSBEndpointDescriptor; Interrupt IN Endpoint
PendingCount:LongWord; Number of USB requests pending for this network
WaiterThread:TThreadId; Thread waiting for pending requests to complete (for network close)


Public variables


None defined

Function declarations



Initialization functions

procedure SMSC95XXInit;
Description: Initialize the SMSC95XX unit, create and register the driver
Note Called only during system startup


SMSC95XX network functions

function SMSC95XXNetworkOpen(Network:PNetworkDevice):LongWord;
Description: Implementation of NetworkDeviceOpen for the SMSC95XX device
Note Not intended to be called directly by applications, use NetworkDeviceOpen instead.


function SMSC95XXNetworkClose(Network:PNetworkDevice):LongWord;
Description: Implementation of NetworkDeviceClose for the SMSC95XX device
Note Not intended to be called directly by applications, use NetworkDeviceClose instead.


function SMSC95XXNetworkControl(Network:PNetworkDevice; Request:Integer; Argument1:PtrUInt; var Argument2:PtrUInt):LongWord;
Description: Implementation of NetworkDeviceControl for the SMSC95XX device
Note Not intended to be called directly by applications, use NetworkDeviceControl instead.


function SMSC95XXBufferAllocate(Network:PNetworkDevice; var Entry:PNetworkEntry):LongWord;
Description: Implementation of NetworkBufferAllocate for the SMSC95XX device
Note Not intended to be called directly by applications, use NetworkBufferAllocate instead.


function SMSC95XXBufferRelease(Network:PNetworkDevice; Entry:PNetworkEntry):LongWord;
Description: Implementation of NetworkBufferRelease for the SMSC95XX device
Note Not intended to be called directly by applications, use NetworkBufferRelease instead.


function SMSC95XXBufferReceive(Network:PNetworkDevice; var Entry:PNetworkEntry):LongWord;
Description: Implementation of NetworkBufferReceive for the SMSC95XX device
Note Not intended to be called directly by applications, use NetworkBufferReceive instead.


function SMSC95XXBufferTransmit(Network:PNetworkDevice; Entry:PNetworkEntry):LongWord;
Description: Implementation of NetworkBufferTransmit for the SMSC95XX device
Note Not intended to be called directly by applications, use NetworkBufferTransmit instead.


procedure SMSC95XXTransmitStart(Network:PSMSC95XXNetwork);
Description: Transmit start function for the SMSC95XX Network device
Note Not intended to be called directly by applications

Caller must hold the network lock


SMSC95XX USB functions

function SMSC95XXDriverBind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
Description: Bind the SMSC95XX driver to a USB device if it is suitable
Device The USB device to attempt to bind to
Interrface The USB interface to attempt to bind to (or nil for whole device)
Return USB_STATUS_SUCCESS if completed, USB_STATUS_DEVICE_UNSUPPORTED if unsupported or another error code on failure.


function SMSC95XXDriverUnbind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
Description: Unbind the SMSC95XX driver from a USB device
Device The USB device to unbind from
Interrface The USB interface to unbind from (or nil for whole device)
Return USB_STATUS_SUCCESS if completed or another error code on failure


procedure SMSC95XXReceiveWorker(Request:PUSBRequest);
Description: Called (by a Worker thread) to process a completed USB request from the SMSC95XX bulk IN endpoint
Request The USB request which has completed


procedure SMSC95XXReceiveComplete(Request:PUSBRequest);
Description: Called when a USB request from the SMSC95XX bulk IN endpoint completes
Request The USB request which has completed
Note Request is passed to worker thread for processing to prevent blocking the USB completion


procedure SMSC95XXTransmitWorker(Request:PUSBRequest);
Description: Called (by a Worker thread) to process a completed USB request to the SMSC95XX bulk OUT endpoint
Request The USB request which has completed


procedure SMSC95XXTransmitComplete(Request:PUSBRequest);
Description: Called when a USB request to the SMSC95XX bulk OUT endpoint completes
Request The USB request which has completed
Note Request is passed to worker thread for processing to prevent blocking the USB completion


procedure SMSC95XXInterruptWorker(Request:PUSBRequest);
Description: Called (by a Worker thread) to process a completed USB request from the SMSC95XX interrupt IN endpoint
Request The USB request which has completed


procedure SMSC95XXInterruptComplete(Request:PUSBRequest);
Description: Called when a USB request from the SMSC95XX interrupt IN endpoint completes
Request The USB request which has completed
Note Request is passed to worker thread for processing to prevent blocking the USB completion


SMSC95XX helper functions

function SMSC95XXCheckDevice(Device:PUSBDevice):LongWord;
Description: Check the Vendor and Device Id against the supported devices
Device USB device to check
Return USB_STATUS_SUCCESS if completed or another error code on failure


function SMSC95XXReadRegister(Device:PUSBDevice; Index:LongWord; var Data:LongWord):LongWord;
Description: Read from a register on the SMSC95XX USB Ethernet Adapter
Device USB device to read from
Index Index of the register to read
Data Value to return to registers contents
Return USB_STATUS_SUCCESS if completed or another error code on failure


function SMSC95XXWriteRegister(Device:PUSBDevice; Index,Data:LongWord):LongWord;
Description: Write to a register on the SMSC95XX USB Ethernet Adapter
Device USB device to write to
Index Index of the register to write
Data Value to write to the register
Return USB_STATUS_SUCCESS if completed or another error code on failure


function SMSC95XXModifyRegister(Device:PUSBDevice; Index,Mask,Value:LongWord):LongWord;
Description: Modify the value contained in a register on the SMSC LAN95XX USB Ethernet Adapter
Device USB device to modify
Index Index of the register to modify
Mask Mask that contains 1 for the bits where the old value in the register will be kept rather than cleared (unless those bits also appear in Value, in which case they will still be set).
Value Mask of bits to set in the register
Return USB_STATUS_SUCCESS if completed or another error code on failure


function SMSC95XXSetRegisterBits(Device:PUSBDevice; Index,Value:LongWord):LongWord;
Description: Set bits in a register on the SMSC95XX USB Ethernet Adapter
Device USB device to write to
Index Index of the register to modify
Value Bits to set in the register. At positions where there is a 0, the old value in the register will be written.
Return USB_STATUS_SUCCESS if completed or another error code on failure


function SMSC95XXClearRegisterBits(Device:PUSBDevice; Index,Value:LongWord):LongWord;
Description: Clear bits in a register on the SMSC95XX USB Ethernet Adapter
Device USB device to write to
Index Index of the register to modify
Value Bits to clear in the register. At positions where there is a 0, the old value in the register will be written.
Return USB_STATUS_SUCCESS if completed or another error code on failure


function SMSC95XXPHYRead(Device:PUSBDevice; Index:LongWord; var Value:Word):LongWord;
Description: Read a register from the MII Management serial interface on a SMSC95XX USB Ethernet Adapter
Device USB device to read from
Index Index of the register to read
Value Value to return the register contents
Return USB_STATUS_SUCCESS if completed or another error code on failure


function SMSC95XXPHYWrite(Device:PUSBDevice; Index:LongWord; Value:Word):LongWord;
Description: Write a register to the MII Management serial interface on a SMSC95XX USB Ethernet Adapter
Device USB device to write to
Index Index of the register to write
Value Value to write to the register
Return USB_STATUS_SUCCESS if completed or another error code on failure


function SMSC95XXPHYInitialize(Device:PUSBDevice):LongWord;
Description: Initialize default MII Management serial interface options on a SMSC95XX USB Ethernet Adapter
Device USB device to initialize
Return USB_STATUS_SUCCESS if completed or another error code on failure


function SMSC95XXPHYWaitNotBusy(Device:PUSBDevice):LongWord;
Description: Wait for the MII Management serial interface to be not busy on a SMSC95XX USB Ethernet Adapter
Device USB device to wait for
Return USB_STATUS_SUCCESS if completed or another error code on failure
Note Caller must hold the PHY Lock


function SMSC95XXWaitEEPROM(Device:PUSBDevice):LongWord;
Description: Wait for the EEPROM (if present) to be not busy on a SMSC95XX USB Ethernet Adapter
Device USB device to wait for
Return USB_STATUS_SUCCESS if completed or another error code on failure


function SMSC95XXReadEEPROM(Device:PUSBDevice; Offset,Length:LongWord; Data:PByte):LongWord;
Description: Read from the EEPROM (if present) on a SMSC95XX USB Ethernet Adapter
Device USB device to read from
Offset The byte offset to start reading
Length The number of bytes to read
Data Pointer to a buffer to receive the data
Return USB_STATUS_SUCCESS if completed or another error code on failure


function SMSC95XXWriteEEPROM(Device:PUSBDevice; Offset,Length:LongWord; Data:PByte):LongWord;
Description: Write to the EEPROM (if present) on a SMSC95XX USB Ethernet Adapter
Device USB device to write to
Offset The byte offset to start writing
Length The number of bytes to write
Data Pointer to a buffer containing the data
Return USB_STATUS_SUCCESS if completed or another error code on failure


function SMSC95XXSetMacAddress(Device:PUSBDevice; Address:PHardwareAddress):LongWord;
Description: Set the MAC address of the SMSC95XX USB Ethernet Adapter
Device USB device to write to
Address MAC address value to set
Return USB_STATUS_SUCCESS if completed or another error code on failure


function SMSC95XXGetMacAddress(Device:PUSBDevice; Address:PHardwareAddress):LongWord;
Description: Get the MAC address of the SMSC95XX USB Ethernet Adapter
Device USB device read from
Address Value to read the MAC address into
Return USB_STATUS_SUCCESS if completed or another error code on failure


Return to Unit Reference