|
@@ -7294,9 +7294,12 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
|
|
if (err)
|
|
if (err)
|
|
return err;
|
|
return err;
|
|
|
|
|
|
- if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5784 &&
|
|
|
|
- GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5761 &&
|
|
|
|
- GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5717) {
|
|
|
|
|
|
+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) {
|
|
|
|
+ val = tr32(TG3PCI_DMA_RW_CTRL) &
|
|
|
|
+ ~DMA_RWCTRL_DIS_CACHE_ALIGNMENT;
|
|
|
|
+ tw32(TG3PCI_DMA_RW_CTRL, val | tp->dma_rwctrl);
|
|
|
|
+ } else if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5784 &&
|
|
|
|
+ GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5761) {
|
|
/* This value is determined during the probe time DMA
|
|
/* This value is determined during the probe time DMA
|
|
* engine test, tg3_test_dma.
|
|
* engine test, tg3_test_dma.
|
|
*/
|
|
*/
|
|
@@ -13329,6 +13332,11 @@ static u32 __devinit tg3_calc_dma_bndry(struct tg3 *tp, u32 val)
|
|
#endif
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) {
|
|
|
|
+ val = goal ? 0 : DMA_RWCTRL_DIS_CACHE_ALIGNMENT;
|
|
|
|
+ goto out;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (!goal)
|
|
if (!goal)
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
@@ -13523,7 +13531,7 @@ static int __devinit tg3_test_dma(struct tg3 *tp)
|
|
{
|
|
{
|
|
dma_addr_t buf_dma;
|
|
dma_addr_t buf_dma;
|
|
u32 *buf, saved_dma_rwctrl;
|
|
u32 *buf, saved_dma_rwctrl;
|
|
- int ret;
|
|
|
|
|
|
+ int ret = 0;
|
|
|
|
|
|
buf = pci_alloc_consistent(tp->pdev, TEST_BUFFER_SIZE, &buf_dma);
|
|
buf = pci_alloc_consistent(tp->pdev, TEST_BUFFER_SIZE, &buf_dma);
|
|
if (!buf) {
|
|
if (!buf) {
|
|
@@ -13536,6 +13544,9 @@ static int __devinit tg3_test_dma(struct tg3 *tp)
|
|
|
|
|
|
tp->dma_rwctrl = tg3_calc_dma_bndry(tp, tp->dma_rwctrl);
|
|
tp->dma_rwctrl = tg3_calc_dma_bndry(tp, tp->dma_rwctrl);
|
|
|
|
|
|
|
|
+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717)
|
|
|
|
+ goto out;
|
|
|
|
+
|
|
if (tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) {
|
|
if (tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) {
|
|
/* DMA read watermark not used on PCIE */
|
|
/* DMA read watermark not used on PCIE */
|
|
tp->dma_rwctrl |= 0x00180000;
|
|
tp->dma_rwctrl |= 0x00180000;
|
|
@@ -13608,7 +13619,6 @@ static int __devinit tg3_test_dma(struct tg3 *tp)
|
|
tg3_switch_clocks(tp);
|
|
tg3_switch_clocks(tp);
|
|
#endif
|
|
#endif
|
|
|
|
|
|
- ret = 0;
|
|
|
|
if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700 &&
|
|
if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700 &&
|
|
GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701)
|
|
GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701)
|
|
goto out;
|
|
goto out;
|