aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/mmc_block.c2
-rw-r--r--drivers/net/sky2.c19
2 files changed, 17 insertions, 4 deletions
diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c
index e39cc05c64c2..587458b370b9 100644
--- a/drivers/mmc/mmc_block.c
+++ b/drivers/mmc/mmc_block.c
@@ -353,7 +353,7 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
353 */ 353 */
354 printk(KERN_ERR "%s: unable to select block size for " 354 printk(KERN_ERR "%s: unable to select block size for "
355 "writing (rb%u wb%u rp%u wp%u)\n", 355 "writing (rb%u wb%u rp%u wp%u)\n",
356 md->disk->disk_name, 356 mmc_card_id(card),
357 1 << card->csd.read_blkbits, 357 1 << card->csd.read_blkbits,
358 1 << card->csd.write_blkbits, 358 1 << card->csd.write_blkbits,
359 card->csd.read_partial, 359 card->csd.read_partial,
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 60779ebf2ff6..959109609d85 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -979,6 +979,7 @@ static int sky2_rx_start(struct sky2_port *sky2)
979 struct sky2_hw *hw = sky2->hw; 979 struct sky2_hw *hw = sky2->hw;
980 unsigned rxq = rxqaddr[sky2->port]; 980 unsigned rxq = rxqaddr[sky2->port];
981 int i; 981 int i;
982 unsigned thresh;
982 983
983 sky2->rx_put = sky2->rx_next = 0; 984 sky2->rx_put = sky2->rx_next = 0;
984 sky2_qset(hw, rxq); 985 sky2_qset(hw, rxq);
@@ -1003,9 +1004,21 @@ static int sky2_rx_start(struct sky2_port *sky2)
1003 sky2_rx_add(sky2, re->mapaddr); 1004 sky2_rx_add(sky2, re->mapaddr);
1004 } 1005 }
1005 1006
1006 /* Truncate oversize frames */ 1007
1007 sky2_write16(hw, SK_REG(sky2->port, RX_GMF_TR_THR), sky2->rx_bufsize - 8); 1008 /*
1008 sky2_write32(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), RX_TRUNC_ON); 1009 * The receiver hangs if it receives frames larger than the
1010 * packet buffer. As a workaround, truncate oversize frames, but
1011 * the register is limited to 9 bits, so if you do frames > 2052
1012 * you better get the MTU right!
1013 */
1014 thresh = (sky2->rx_bufsize - 8) / sizeof(u32);
1015 if (thresh > 0x1ff)
1016 sky2_write32(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), RX_TRUNC_OFF);
1017 else {
1018 sky2_write16(hw, SK_REG(sky2->port, RX_GMF_TR_THR), thresh);
1019 sky2_write32(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), RX_TRUNC_ON);
1020 }
1021
1009 1022
1010 /* Tell chip about available buffers */ 1023 /* Tell chip about available buffers */
1011 sky2_write16(hw, Y2_QADDR(rxq, PREF_UNIT_PUT_IDX), sky2->rx_put); 1024 sky2_write16(hw, Y2_QADDR(rxq, PREF_UNIT_PUT_IDX), sky2->rx_put);