|
@@ -32,7 +32,7 @@
|
|
#define NETNEXT_VERSION "08"
|
|
#define NETNEXT_VERSION "08"
|
|
|
|
|
|
/* Information for net */
|
|
/* Information for net */
|
|
-#define NET_VERSION "8"
|
|
|
|
|
|
+#define NET_VERSION "9"
|
|
|
|
|
|
#define DRIVER_VERSION "v1." NETNEXT_VERSION "." NET_VERSION
|
|
#define DRIVER_VERSION "v1." NETNEXT_VERSION "." NET_VERSION
|
|
#define DRIVER_AUTHOR "Realtek linux nic maintainers <nic_swsd@realtek.com>"
|
|
#define DRIVER_AUTHOR "Realtek linux nic maintainers <nic_swsd@realtek.com>"
|
|
@@ -501,6 +501,8 @@ enum rtl_register_content {
|
|
#define RTL8153_RMS RTL8153_MAX_PACKET
|
|
#define RTL8153_RMS RTL8153_MAX_PACKET
|
|
#define RTL8152_TX_TIMEOUT (5 * HZ)
|
|
#define RTL8152_TX_TIMEOUT (5 * HZ)
|
|
#define RTL8152_NAPI_WEIGHT 64
|
|
#define RTL8152_NAPI_WEIGHT 64
|
|
|
|
+#define rx_reserved_size(x) ((x) + VLAN_ETH_HLEN + CRC_SIZE + \
|
|
|
|
+ sizeof(struct rx_desc) + RX_ALIGN)
|
|
|
|
|
|
/* rtl8152 flags */
|
|
/* rtl8152 flags */
|
|
enum rtl8152_flags {
|
|
enum rtl8152_flags {
|
|
@@ -2253,8 +2255,7 @@ static void r8153_set_rx_early_timeout(struct r8152 *tp)
|
|
|
|
|
|
static void r8153_set_rx_early_size(struct r8152 *tp)
|
|
static void r8153_set_rx_early_size(struct r8152 *tp)
|
|
{
|
|
{
|
|
- u32 mtu = tp->netdev->mtu;
|
|
|
|
- u32 ocp_data = (agg_buf_sz - mtu - VLAN_ETH_HLEN - VLAN_HLEN) / 8;
|
|
|
|
|
|
+ u32 ocp_data = (agg_buf_sz - rx_reserved_size(tp->netdev->mtu)) / 4;
|
|
|
|
|
|
ocp_write_word(tp, MCU_TYPE_USB, USB_RX_EARLY_SIZE, ocp_data);
|
|
ocp_write_word(tp, MCU_TYPE_USB, USB_RX_EARLY_SIZE, ocp_data);
|
|
}
|
|
}
|