Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90863
b: refs/heads/master
c: 10c6462
h: refs/heads/master
i:
  90861: 31e0cbe
  90859: f24e409
  90855: 32b9d30
  90847: 0b33288
v: v3
  • Loading branch information
Peter Horton authored and Jeff Garzik committed Apr 17, 2008
1 parent 43f23bf commit 3716ca6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 48dd59e398455b58910910bc272e0da85f11bd98
refs/heads/master: 10c6462090cccb643f31e26a14cb933bc31d8666
7 changes: 6 additions & 1 deletion trunk/drivers/net/tulip/tulip.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,12 @@ enum t21143_csr6_bits {
#define RX_RING_SIZE 128
#define MEDIA_MASK 31

#define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer. */
/* The receiver on the DC21143 rev 65 can fail to close the last
* receive descriptor in certain circumstances (see errata) when
* using MWI. This can only occur if the receive buffer ends on
* a cache line boundary, so the "+ 4" below ensures it doesn't.
*/
#define PKT_BUF_SZ (1536 + 4) /* Size of each temporary Rx buffer. */

#define TULIP_MIN_CACHE_LINE 8 /* in units of 32-bit words */

Expand Down
19 changes: 5 additions & 14 deletions trunk/drivers/net/tulip/tulip_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1154,18 +1154,13 @@ static void __devinit tulip_mwi_config (struct pci_dev *pdev,

tp->csr0 = csr0 = 0;

/* if we have any cache line size at all, we can do MRM */
csr0 |= MRM;
/* if we have any cache line size at all, we can do MRM and MWI */
csr0 |= MRM | MWI;

/* ...and barring hardware bugs, MWI */
if (!(tp->chip_id == DC21143 && tp->revision == 65))
csr0 |= MWI;

/* set or disable MWI in the standard PCI command bit.
* Check for the case where mwi is desired but not available
/* Enable MWI in the standard PCI command bit.
* Check for the case where MWI is desired but not available
*/
if (csr0 & MWI) pci_try_set_mwi(pdev);
else pci_clear_mwi(pdev);
pci_try_set_mwi(pdev);

/* read result from hardware (in case bit refused to enable) */
pci_read_config_word(pdev, PCI_COMMAND, &pci_command);
Expand Down Expand Up @@ -1401,10 +1396,6 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
#ifdef CONFIG_TULIP_MWI
if (!force_csr0 && (tp->flags & HAS_PCI_MWI))
tulip_mwi_config (pdev, dev);
#else
/* MWI is broken for DC21143 rev 65... */
if (chip_idx == DC21143 && pdev->revision == 65)
tp->csr0 &= ~MWI;
#endif

/* Stop the chip's Tx and Rx processes. */
Expand Down

0 comments on commit 3716ca6

Please sign in to comment.