forked from Minki/linux
Merge branch 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/shemminger/netdev-2.6
* 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/shemminger/netdev-2.6: sis900: phy for FoxCon motherboard dl2k: use DMA_48BIT_MASK constant phy: mdiobus_register(): initialize all phy_map entries sky2: ifdown kills irq mask
This commit is contained in:
commit
6314410dd1
@ -765,7 +765,7 @@ rio_free_tx (struct net_device *dev, int irq)
|
||||
break;
|
||||
skb = np->tx_skbuff[entry];
|
||||
pci_unmap_single (np->pdev,
|
||||
np->tx_ring[entry].fraginfo & 0xffffffffffff,
|
||||
np->tx_ring[entry].fraginfo & DMA_48BIT_MASK,
|
||||
skb->len, PCI_DMA_TODEVICE);
|
||||
if (irq)
|
||||
dev_kfree_skb_irq (skb);
|
||||
@ -893,7 +893,7 @@ receive_packet (struct net_device *dev)
|
||||
/* Small skbuffs for short packets */
|
||||
if (pkt_len > copy_thresh) {
|
||||
pci_unmap_single (np->pdev,
|
||||
desc->fraginfo & 0xffffffffffff,
|
||||
desc->fraginfo & DMA_48BIT_MASK,
|
||||
np->rx_buf_sz,
|
||||
PCI_DMA_FROMDEVICE);
|
||||
skb_put (skb = np->rx_skbuff[entry], pkt_len);
|
||||
@ -901,7 +901,7 @@ receive_packet (struct net_device *dev)
|
||||
} else if ((skb = dev_alloc_skb (pkt_len + 2)) != NULL) {
|
||||
pci_dma_sync_single_for_cpu(np->pdev,
|
||||
desc->fraginfo &
|
||||
0xffffffffffff,
|
||||
DMA_48BIT_MASK,
|
||||
np->rx_buf_sz,
|
||||
PCI_DMA_FROMDEVICE);
|
||||
skb->dev = dev;
|
||||
@ -913,7 +913,7 @@ receive_packet (struct net_device *dev)
|
||||
skb_put (skb, pkt_len);
|
||||
pci_dma_sync_single_for_device(np->pdev,
|
||||
desc->fraginfo &
|
||||
0xffffffffffff,
|
||||
DMA_48BIT_MASK,
|
||||
np->rx_buf_sz,
|
||||
PCI_DMA_FROMDEVICE);
|
||||
}
|
||||
@ -1800,7 +1800,7 @@ rio_close (struct net_device *dev)
|
||||
skb = np->rx_skbuff[i];
|
||||
if (skb) {
|
||||
pci_unmap_single(np->pdev,
|
||||
np->rx_ring[i].fraginfo & 0xffffffffffff,
|
||||
np->rx_ring[i].fraginfo & DMA_48BIT_MASK,
|
||||
skb->len, PCI_DMA_FROMDEVICE);
|
||||
dev_kfree_skb (skb);
|
||||
np->rx_skbuff[i] = NULL;
|
||||
@ -1810,7 +1810,7 @@ rio_close (struct net_device *dev)
|
||||
skb = np->tx_skbuff[i];
|
||||
if (skb) {
|
||||
pci_unmap_single(np->pdev,
|
||||
np->tx_ring[i].fraginfo & 0xffffffffffff,
|
||||
np->tx_ring[i].fraginfo & DMA_48BIT_MASK,
|
||||
skb->len, PCI_DMA_TODEVICE);
|
||||
dev_kfree_skb (skb);
|
||||
np->tx_skbuff[i] = NULL;
|
||||
|
@ -60,8 +60,10 @@ int mdiobus_register(struct mii_bus *bus)
|
||||
for (i = 0; i < PHY_MAX_ADDR; i++) {
|
||||
struct phy_device *phydev;
|
||||
|
||||
if (bus->phy_mask & (1 << i))
|
||||
if (bus->phy_mask & (1 << i)) {
|
||||
bus->phy_map[i] = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
phydev = get_phy_device(bus, i);
|
||||
|
||||
|
@ -127,6 +127,7 @@ static const struct mii_chip_info {
|
||||
} mii_chip_table[] = {
|
||||
{ "SiS 900 Internal MII PHY", 0x001d, 0x8000, LAN },
|
||||
{ "SiS 7014 Physical Layer Solution", 0x0016, 0xf830, LAN },
|
||||
{ "SiS 900 on Foxconn 661 7MI", 0x0143, 0xBC70, LAN },
|
||||
{ "Altimata AC101LF PHY", 0x0022, 0x5520, LAN },
|
||||
{ "ADM 7001 LAN PHY", 0x002e, 0xcc60, LAN },
|
||||
{ "AMD 79C901 10BASE-T PHY", 0x0000, 0x6B70, LAN },
|
||||
|
@ -128,6 +128,7 @@ MODULE_DEVICE_TABLE(pci, sky2_id_table);
|
||||
/* Avoid conditionals by using array */
|
||||
static const unsigned txqaddr[] = { Q_XA1, Q_XA2 };
|
||||
static const unsigned rxqaddr[] = { Q_R1, Q_R2 };
|
||||
static const u32 portirq_msk[] = { Y2_IS_PORT_1, Y2_IS_PORT_2 };
|
||||
|
||||
/* This driver supports yukon2 chipset only */
|
||||
static const char *yukon2_name[] = {
|
||||
@ -1084,7 +1085,7 @@ static int sky2_up(struct net_device *dev)
|
||||
|
||||
/* Enable interrupts from phy/mac for port */
|
||||
imask = sky2_read32(hw, B0_IMSK);
|
||||
imask |= (port == 0) ? Y2_IS_PORT_1 : Y2_IS_PORT_2;
|
||||
imask |= portirq_msk[port];
|
||||
sky2_write32(hw, B0_IMSK, imask);
|
||||
|
||||
return 0;
|
||||
@ -1435,7 +1436,7 @@ static int sky2_down(struct net_device *dev)
|
||||
|
||||
/* Disable port IRQ */
|
||||
imask = sky2_read32(hw, B0_IMSK);
|
||||
imask &= ~(sky2->port == 0) ? Y2_IS_PORT_1 : Y2_IS_PORT_2;
|
||||
imask &= ~portirq_msk[port];
|
||||
sky2_write32(hw, B0_IMSK, imask);
|
||||
|
||||
/* turn off LED's */
|
||||
|
@ -14,6 +14,7 @@ enum dma_data_direction {
|
||||
};
|
||||
|
||||
#define DMA_64BIT_MASK 0xffffffffffffffffULL
|
||||
#define DMA_48BIT_MASK 0x0000ffffffffffffULL
|
||||
#define DMA_40BIT_MASK 0x000000ffffffffffULL
|
||||
#define DMA_39BIT_MASK 0x0000007fffffffffULL
|
||||
#define DMA_32BIT_MASK 0x00000000ffffffffULL
|
||||
|
Loading…
Reference in New Issue
Block a user