forked from Minki/linux
r8152: support new chip 8050
The settings of the new chip are the same with RTL8152, except that its product ID is 0x8050. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
18b6e7955d
commit
c27b32c2a4
@ -659,6 +659,7 @@ enum rtl_version {
|
|||||||
RTL_VER_04,
|
RTL_VER_04,
|
||||||
RTL_VER_05,
|
RTL_VER_05,
|
||||||
RTL_VER_06,
|
RTL_VER_06,
|
||||||
|
RTL_VER_07,
|
||||||
RTL_VER_MAX
|
RTL_VER_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -4183,6 +4184,7 @@ static int rtl8152_get_coalesce(struct net_device *netdev,
|
|||||||
switch (tp->version) {
|
switch (tp->version) {
|
||||||
case RTL_VER_01:
|
case RTL_VER_01:
|
||||||
case RTL_VER_02:
|
case RTL_VER_02:
|
||||||
|
case RTL_VER_07:
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -4202,6 +4204,7 @@ static int rtl8152_set_coalesce(struct net_device *netdev,
|
|||||||
switch (tp->version) {
|
switch (tp->version) {
|
||||||
case RTL_VER_01:
|
case RTL_VER_01:
|
||||||
case RTL_VER_02:
|
case RTL_VER_02:
|
||||||
|
case RTL_VER_07:
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -4301,6 +4304,7 @@ static int rtl8152_change_mtu(struct net_device *dev, int new_mtu)
|
|||||||
switch (tp->version) {
|
switch (tp->version) {
|
||||||
case RTL_VER_01:
|
case RTL_VER_01:
|
||||||
case RTL_VER_02:
|
case RTL_VER_02:
|
||||||
|
case RTL_VER_07:
|
||||||
dev->mtu = new_mtu;
|
dev->mtu = new_mtu;
|
||||||
return 0;
|
return 0;
|
||||||
default:
|
default:
|
||||||
@ -4370,6 +4374,7 @@ static int rtl_ops_init(struct r8152 *tp)
|
|||||||
switch (tp->version) {
|
switch (tp->version) {
|
||||||
case RTL_VER_01:
|
case RTL_VER_01:
|
||||||
case RTL_VER_02:
|
case RTL_VER_02:
|
||||||
|
case RTL_VER_07:
|
||||||
ops->init = r8152b_init;
|
ops->init = r8152b_init;
|
||||||
ops->enable = rtl8152_enable;
|
ops->enable = rtl8152_enable;
|
||||||
ops->disable = rtl8152_disable;
|
ops->disable = rtl8152_disable;
|
||||||
@ -4448,6 +4453,9 @@ static u8 rtl_get_version(struct usb_interface *intf)
|
|||||||
case 0x5c30:
|
case 0x5c30:
|
||||||
version = RTL_VER_06;
|
version = RTL_VER_06;
|
||||||
break;
|
break;
|
||||||
|
case 0x4800:
|
||||||
|
version = RTL_VER_07;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
version = RTL_VER_UNKNOWN;
|
version = RTL_VER_UNKNOWN;
|
||||||
dev_info(&intf->dev, "Unknown version 0x%04x\n", ocp_data);
|
dev_info(&intf->dev, "Unknown version 0x%04x\n", ocp_data);
|
||||||
@ -4495,6 +4503,7 @@ static int rtl8152_probe(struct usb_interface *intf,
|
|||||||
switch (version) {
|
switch (version) {
|
||||||
case RTL_VER_01:
|
case RTL_VER_01:
|
||||||
case RTL_VER_02:
|
case RTL_VER_02:
|
||||||
|
case RTL_VER_07:
|
||||||
tp->mii.supports_gmii = 0;
|
tp->mii.supports_gmii = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -4629,6 +4638,7 @@ static void rtl8152_disconnect(struct usb_interface *intf)
|
|||||||
|
|
||||||
/* table of devices that work with this driver */
|
/* table of devices that work with this driver */
|
||||||
static struct usb_device_id rtl8152_table[] = {
|
static struct usb_device_id rtl8152_table[] = {
|
||||||
|
{REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8050)},
|
||||||
{REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8152)},
|
{REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8152)},
|
||||||
{REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8153)},
|
{REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8153)},
|
||||||
{REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07ab)},
|
{REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07ab)},
|
||||||
|
Loading…
Reference in New Issue
Block a user