diff options
| -rw-r--r-- | drivers/net/ethernet/realtek/r8169.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 5360f6de2b0a..3e07fa6ee063 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c | |||
| @@ -743,8 +743,8 @@ struct rtl8169_private { | |||
| 743 | } jumbo_ops; | 743 | } jumbo_ops; |
| 744 | 744 | ||
| 745 | struct csi_ops { | 745 | struct csi_ops { |
| 746 | void (*write)(void __iomem *, int, int); | 746 | void (*write)(struct rtl8169_private *, int, int); |
| 747 | u32 (*read)(void __iomem *, int); | 747 | u32 (*read)(struct rtl8169_private *, int); |
| 748 | } csi_ops; | 748 | } csi_ops; |
| 749 | 749 | ||
| 750 | int (*set_speed)(struct net_device *, u8 aneg, u16 sp, u8 dpx, u32 adv); | 750 | int (*set_speed)(struct net_device *, u8 aneg, u16 sp, u8 dpx, u32 adv); |
| @@ -4398,15 +4398,12 @@ static void rtl_hw_start_8169(struct net_device *dev) | |||
| 4398 | static void rtl_csi_write(struct rtl8169_private *tp, int addr, int value) | 4398 | static void rtl_csi_write(struct rtl8169_private *tp, int addr, int value) |
| 4399 | { | 4399 | { |
| 4400 | if (tp->csi_ops.write) | 4400 | if (tp->csi_ops.write) |
| 4401 | tp->csi_ops.write(tp->mmio_addr, addr, value); | 4401 | tp->csi_ops.write(tp, addr, value); |
| 4402 | } | 4402 | } |
| 4403 | 4403 | ||
| 4404 | static u32 rtl_csi_read(struct rtl8169_private *tp, int addr) | 4404 | static u32 rtl_csi_read(struct rtl8169_private *tp, int addr) |
| 4405 | { | 4405 | { |
| 4406 | if (tp->csi_ops.read) | 4406 | return tp->csi_ops.read ? tp->csi_ops.read(tp, addr) : ~0; |
| 4407 | return tp->csi_ops.read(tp->mmio_addr, addr); | ||
| 4408 | else | ||
| 4409 | return ~0; | ||
| 4410 | } | 4407 | } |
| 4411 | 4408 | ||
| 4412 | static void rtl_csi_access_enable(struct rtl8169_private *tp, u32 bits) | 4409 | static void rtl_csi_access_enable(struct rtl8169_private *tp, u32 bits) |
| @@ -4427,8 +4424,9 @@ static void rtl_csi_access_enable_2(struct rtl8169_private *tp) | |||
| 4427 | rtl_csi_access_enable(tp, 0x27000000); | 4424 | rtl_csi_access_enable(tp, 0x27000000); |
| 4428 | } | 4425 | } |
| 4429 | 4426 | ||
| 4430 | static void r8169_csi_write(void __iomem *ioaddr, int addr, int value) | 4427 | static void r8169_csi_write(struct rtl8169_private *tp, int addr, int value) |
| 4431 | { | 4428 | { |
| 4429 | void __iomem *ioaddr = tp->mmio_addr; | ||
| 4432 | unsigned int i; | 4430 | unsigned int i; |
| 4433 | 4431 | ||
| 4434 | RTL_W32(CSIDR, value); | 4432 | RTL_W32(CSIDR, value); |
| @@ -4442,8 +4440,9 @@ static void r8169_csi_write(void __iomem *ioaddr, int addr, int value) | |||
| 4442 | } | 4440 | } |
| 4443 | } | 4441 | } |
| 4444 | 4442 | ||
| 4445 | static u32 r8169_csi_read(void __iomem *ioaddr, int addr) | 4443 | static u32 r8169_csi_read(struct rtl8169_private *tp, int addr) |
| 4446 | { | 4444 | { |
| 4445 | void __iomem *ioaddr = tp->mmio_addr; | ||
| 4447 | u32 value = ~0x00; | 4446 | u32 value = ~0x00; |
| 4448 | unsigned int i; | 4447 | unsigned int i; |
| 4449 | 4448 | ||
| @@ -4461,8 +4460,9 @@ static u32 r8169_csi_read(void __iomem *ioaddr, int addr) | |||
| 4461 | return value; | 4460 | return value; |
| 4462 | } | 4461 | } |
| 4463 | 4462 | ||
| 4464 | static void r8402_csi_write(void __iomem *ioaddr, int addr, int value) | 4463 | static void r8402_csi_write(struct rtl8169_private *tp, int addr, int value) |
| 4465 | { | 4464 | { |
| 4465 | void __iomem *ioaddr = tp->mmio_addr; | ||
| 4466 | unsigned int i; | 4466 | unsigned int i; |
| 4467 | 4467 | ||
| 4468 | RTL_W32(CSIDR, value); | 4468 | RTL_W32(CSIDR, value); |
| @@ -4477,8 +4477,9 @@ static void r8402_csi_write(void __iomem *ioaddr, int addr, int value) | |||
| 4477 | } | 4477 | } |
| 4478 | } | 4478 | } |
| 4479 | 4479 | ||
| 4480 | static u32 r8402_csi_read(void __iomem *ioaddr, int addr) | 4480 | static u32 r8402_csi_read(struct rtl8169_private *tp, int addr) |
| 4481 | { | 4481 | { |
| 4482 | void __iomem *ioaddr = tp->mmio_addr; | ||
| 4482 | u32 value = ~0x00; | 4483 | u32 value = ~0x00; |
| 4483 | unsigned int i; | 4484 | unsigned int i; |
| 4484 | 4485 | ||
