equal
deleted
inserted
replaced
646 struct delayed_work thread; |
646 struct delayed_work thread; |
647 |
647 |
648 struct mii_if_info mii; |
648 struct mii_if_info mii; |
649 unsigned int regs_len; |
649 unsigned int regs_len; |
650 unsigned long fifo_copy_timeout; |
650 unsigned long fifo_copy_timeout; |
651 |
651 |
652 ec_device_t *ecdev; |
652 ec_device_t *ecdev; |
653 }; |
653 }; |
654 |
654 |
655 MODULE_AUTHOR("Florian Pose <fp@igh-essen.com>"); |
655 MODULE_AUTHOR("Florian Pose <fp@igh-essen.com>"); |
656 MODULE_DESCRIPTION("RealTek RTL-8139 EtherCAT driver"); |
656 MODULE_DESCRIPTION("RealTek RTL-8139 EtherCAT driver"); |
1133 |
1133 |
1134 /* Put the chip into low-power mode. */ |
1134 /* Put the chip into low-power mode. */ |
1135 if (rtl_chip_info[tp->chipset].flags & HasHltClk) |
1135 if (rtl_chip_info[tp->chipset].flags & HasHltClk) |
1136 RTL_W8 (HltClk, 'H'); /* 'R' would leave the clock running. */ |
1136 RTL_W8 (HltClk, 'H'); /* 'R' would leave the clock running. */ |
1137 |
1137 |
1138 if (tp->ecdev && ecdev_open(tp->ecdev)) { |
1138 if (tp->ecdev) { |
1139 ecdev_withdraw(tp->ecdev); |
1139 i = ecdev_open(tp->ecdev); |
1140 goto err_out; |
1140 if (i) { |
|
1141 ecdev_withdraw(tp->ecdev); |
|
1142 goto err_out; |
|
1143 } |
1141 } |
1144 } |
1142 |
1145 |
1143 return 0; |
1146 return 0; |
1144 |
1147 |
1145 err_out: |
1148 err_out: |
1798 |
1801 |
1799 if (tp->ecdev) { |
1802 if (tp->ecdev) { |
1800 wmb(); |
1803 wmb(); |
1801 RTL_W32_F (TxStatus0 + (entry * sizeof (u32)), |
1804 RTL_W32_F (TxStatus0 + (entry * sizeof (u32)), |
1802 tp->tx_flag | max(len, (unsigned int)ETH_ZLEN)); |
1805 tp->tx_flag | max(len, (unsigned int)ETH_ZLEN)); |
1803 |
1806 |
1804 dev->trans_start = jiffies; |
1807 dev->trans_start = jiffies; |
1805 |
1808 |
1806 tp->cur_tx++; |
1809 tp->cur_tx++; |
1807 } else { |
1810 } else { |
1808 spin_lock_irqsave(&tp->lock, flags); |
1811 spin_lock_irqsave(&tp->lock, flags); |
1809 /* |
1812 /* |
1810 * Writing to TxStatus triggers a DMA transfer of the data |
1813 * Writing to TxStatus triggers a DMA transfer of the data |