Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40594
b: refs/heads/master
c: 4b1c46a
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Nov 1, 2006
1 parent 2508f34 commit dac437a
Show file tree
Hide file tree
Showing 18 changed files with 72 additions and 102 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: 4393c4f6788cee65095dd838cfeca6edefbfeb52
refs/heads/master: 4b1c46a383aafc137bc91a0f9698bfc11e062d1b
38 changes: 6 additions & 32 deletions trunk/drivers/ata/ata_piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ enum {
ich6_sata = 7,
ich6_sata_ahci = 8,
ich6m_sata_ahci = 9,
ich7m_sata_ahci = 10,
ich8_sata_ahci = 11,
ich8_sata_ahci = 10,

/* constants for mapping table */
P0 = 0, /* port 0 */
Expand Down Expand Up @@ -169,6 +168,7 @@ static const struct pci_device_id piix_pci_tbl[] = {
#ifdef ATA_ENABLE_PATA
/* Intel PIIX4 for the 430TX/440BX/MX chipset: UDMA 33 */
/* Also PIIX4E (fn3 rev 2) and PIIX4M (fn3 rev 3) */
{ 0x8086, 0x7110, PCI_ANY_ID, PCI_ANY_ID, 0, 0, piix_pata_33 },
{ 0x8086, 0x7111, PCI_ANY_ID, PCI_ANY_ID, 0, 0, piix_pata_33 },
{ 0x8086, 0x24db, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
{ 0x8086, 0x25a2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
Expand Down Expand Up @@ -227,7 +227,7 @@ static const struct pci_device_id piix_pci_tbl[] = {
/* 82801GB/GR/GH (ICH7, identical to ICH6) */
{ 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
/* 2801GBM/GHM (ICH7M, identical to ICH6M) */
{ 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich7m_sata_ahci },
{ 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6m_sata_ahci },
/* Enterprise Southbridge 2 (where's the datasheet?) */
{ 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
/* SATA Controller 1 IDE (ICH8, no datasheet yet) */
Expand Down Expand Up @@ -399,23 +399,10 @@ static const struct piix_map_db ich6m_map_db = {
.mask = 0x3,
.port_enable = 0x5,
.present_shift = 4,
.map = {
/* PM PS SM SS MAP */
{ P0, P2, RV, RV }, /* 00b */
{ RV, RV, RV, RV },
{ P0, P2, IDE, IDE }, /* 10b */
{ RV, RV, RV, RV },
},
};

static const struct piix_map_db ich7m_map_db = {
.mask = 0x3,
.port_enable = 0x5,
.present_shift = 4,

/* Map 01b isn't specified in the doc but some notebooks use
* it anyway. ATM, the only case spotted carries subsystem ID
* 1025:0107. This is the only difference from ich6m.
* it anyway. MAP 01b have been spotted on both ICH6M and
* ICH7M.
*/
.map = {
/* PM PS SM SS MAP */
Expand Down Expand Up @@ -445,7 +432,6 @@ static const struct piix_map_db *piix_map_db_table[] = {
[ich6_sata] = &ich6_map_db,
[ich6_sata_ahci] = &ich6_map_db,
[ich6m_sata_ahci] = &ich6m_map_db,
[ich7m_sata_ahci] = &ich7m_map_db,
[ich8_sata_ahci] = &ich8_map_db,
};

Expand Down Expand Up @@ -556,19 +542,7 @@ static struct ata_port_info piix_port_info[] = {
.port_ops = &piix_sata_ops,
},

/* ich7m_sata_ahci: 10 */
{
.sht = &piix_sht,
.flags = ATA_FLAG_SATA |
PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR |
PIIX_FLAG_AHCI,
.pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */
.udma_mask = 0x7f, /* udma0-6 */
.port_ops = &piix_sata_ops,
},

/* ich8_sata_ahci: 11 */
/* ich8_sata_ahci: 10 */
{
.sht = &piix_sht,
.flags = ATA_FLAG_SATA |
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -6122,7 +6122,6 @@ EXPORT_SYMBOL_GPL(ata_std_prereset);
EXPORT_SYMBOL_GPL(ata_std_softreset);
EXPORT_SYMBOL_GPL(sata_std_hardreset);
EXPORT_SYMBOL_GPL(ata_std_postreset);
EXPORT_SYMBOL_GPL(ata_dev_revalidate);
EXPORT_SYMBOL_GPL(ata_dev_classify);
EXPORT_SYMBOL_GPL(ata_dev_pair);
EXPORT_SYMBOL_GPL(ata_port_disable);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/ata/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ extern unsigned ata_exec_internal(struct ata_device *dev,
extern unsigned int ata_do_simple_cmd(struct ata_device *dev, u8 cmd);
extern int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
int post_reset, u16 *id);
extern int ata_dev_revalidate(struct ata_device *dev, int post_reset);
extern int ata_dev_configure(struct ata_device *dev, int print_info);
extern int sata_down_spd_limit(struct ata_port *ap);
extern int sata_set_spd_needed(struct ata_port *ap);
Expand Down
21 changes: 10 additions & 11 deletions trunk/drivers/ata/sata_sis.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
struct ata_probe_ent *probe_ent = NULL;
int rc;
u32 genctl;
struct ata_port_info *ppi[2];
struct ata_port_info pi = sis_port_info, *ppi[2] = { &pi, &pi };
int pci_dev_busy = 0;
u8 pmr;
u8 port2_start;
Expand All @@ -265,27 +265,20 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
if (rc)
goto err_out_regions;

ppi[0] = ppi[1] = &sis_port_info;
probe_ent = ata_pci_init_native_mode(pdev, ppi, ATA_PORT_PRIMARY | ATA_PORT_SECONDARY);
if (!probe_ent) {
rc = -ENOMEM;
goto err_out_regions;
}

/* check and see if the SCRs are in IO space or PCI cfg space */
pci_read_config_dword(pdev, SIS_GENCTL, &genctl);
if ((genctl & GENCTL_IOMAPPED_SCR) == 0)
probe_ent->port_flags |= SIS_FLAG_CFGSCR;
pi.flags |= SIS_FLAG_CFGSCR;

/* if hardware thinks SCRs are in IO space, but there are
* no IO resources assigned, change to PCI cfg space.
*/
if ((!(probe_ent->port_flags & SIS_FLAG_CFGSCR)) &&
if ((!(pi.flags & SIS_FLAG_CFGSCR)) &&
((pci_resource_start(pdev, SIS_SCR_PCI_BAR) == 0) ||
(pci_resource_len(pdev, SIS_SCR_PCI_BAR) < 128))) {
genctl &= ~GENCTL_IOMAPPED_SCR;
pci_write_config_dword(pdev, SIS_GENCTL, genctl);
probe_ent->port_flags |= SIS_FLAG_CFGSCR;
pi.flags |= SIS_FLAG_CFGSCR;
}

pci_read_config_byte(pdev, SIS_PMR, &pmr);
Expand All @@ -306,6 +299,12 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
port2_start = 0x20;
}

probe_ent = ata_pci_init_native_mode(pdev, ppi, ATA_PORT_PRIMARY | ATA_PORT_SECONDARY);
if (!probe_ent) {
rc = -ENOMEM;
goto err_out_regions;
}

if (!(probe_ent->port_flags & SIS_FLAG_CFGSCR)) {
probe_ent->port[0].scr_addr =
pci_resource_start(pdev, SIS_SCR_PCI_BAR);
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2112,16 +2112,16 @@ config SKGE

config SKY2
tristate "SysKonnect Yukon2 support (EXPERIMENTAL)"
depends on PCI && EXPERIMENTAL
depends on PCI
select CRC32
---help---
This driver supports Gigabit Ethernet adapters based on the
Marvell Yukon 2 chipset:
Marvell 88E8021/88E8022/88E8035/88E8036/88E8038/88E8050/88E8052/
88E8053/88E8055/88E8061/88E8062, SysKonnect SK-9E21D/SK-9S21

This driver does not support the original Yukon chipset: a seperate
driver, skge, is provided for Yukon-based adapters.
There is companion driver for the older Marvell Yukon and
Genesis based adapters: skge.

To compile this driver as a module, choose M here: the module
will be called sky2. This is recommended.
Expand Down
40 changes: 10 additions & 30 deletions trunk/drivers/net/arm/ep93xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,9 @@ static struct net_device_stats *ep93xx_get_stats(struct net_device *dev)
static int ep93xx_rx(struct net_device *dev, int *budget)
{
struct ep93xx_priv *ep = netdev_priv(dev);
int tail_offset;
int rx_done;
int processed;

tail_offset = rdl(ep, REG_RXSTSQCURADD) - ep->descs_dma_addr;

rx_done = 0;
processed = 0;
while (*budget > 0) {
Expand All @@ -211,36 +208,28 @@ static int ep93xx_rx(struct net_device *dev, int *budget)

entry = ep->rx_pointer;
rstat = ep->descs->rstat + entry;
if ((void *)rstat - (void *)ep->descs == tail_offset) {

rstat0 = rstat->rstat0;
rstat1 = rstat->rstat1;
if (!(rstat0 & RSTAT0_RFP) || !(rstat1 & RSTAT1_RFP)) {
rx_done = 1;
break;
}

rstat0 = rstat->rstat0;
rstat1 = rstat->rstat1;
rstat->rstat0 = 0;
rstat->rstat1 = 0;

if (!(rstat0 & RSTAT0_RFP))
printk(KERN_CRIT "ep93xx_rx: buffer not done "
" %.8x %.8x\n", rstat0, rstat1);
if (!(rstat0 & RSTAT0_EOF))
printk(KERN_CRIT "ep93xx_rx: not end-of-frame "
" %.8x %.8x\n", rstat0, rstat1);
if (!(rstat0 & RSTAT0_EOB))
printk(KERN_CRIT "ep93xx_rx: not end-of-buffer "
" %.8x %.8x\n", rstat0, rstat1);
if (!(rstat1 & RSTAT1_RFP))
printk(KERN_CRIT "ep93xx_rx: buffer1 not done "
" %.8x %.8x\n", rstat0, rstat1);
if ((rstat1 & RSTAT1_BUFFER_INDEX) >> 16 != entry)
printk(KERN_CRIT "ep93xx_rx: entry mismatch "
" %.8x %.8x\n", rstat0, rstat1);

if (!(rstat0 & RSTAT0_RWE)) {
printk(KERN_NOTICE "ep93xx_rx: receive error "
" %.8x %.8x\n", rstat0, rstat1);

ep->stats.rx_errors++;
if (rstat0 & RSTAT0_OE)
ep->stats.rx_fifo_errors++;
Expand Down Expand Up @@ -301,13 +290,8 @@ static int ep93xx_rx(struct net_device *dev, int *budget)

static int ep93xx_have_more_rx(struct ep93xx_priv *ep)
{
struct ep93xx_rstat *rstat;
int tail_offset;

rstat = ep->descs->rstat + ep->rx_pointer;
tail_offset = rdl(ep, REG_RXSTSQCURADD) - ep->descs_dma_addr;

return !((void *)rstat - (void *)ep->descs == tail_offset);
struct ep93xx_rstat *rstat = ep->descs->rstat + ep->rx_pointer;
return !!((rstat->rstat0 & RSTAT0_RFP) && (rstat->rstat1 & RSTAT1_RFP));
}

static int ep93xx_poll(struct net_device *dev, int *budget)
Expand Down Expand Up @@ -347,7 +331,7 @@ static int ep93xx_xmit(struct sk_buff *skb, struct net_device *dev)
struct ep93xx_priv *ep = netdev_priv(dev);
int entry;

if (unlikely(skb->len) > MAX_PKT_SIZE) {
if (unlikely(skb->len > MAX_PKT_SIZE)) {
ep->stats.tx_dropped++;
dev_kfree_skb(skb);
return NETDEV_TX_OK;
Expand Down Expand Up @@ -379,10 +363,8 @@ static int ep93xx_xmit(struct sk_buff *skb, struct net_device *dev)
static void ep93xx_tx_complete(struct net_device *dev)
{
struct ep93xx_priv *ep = netdev_priv(dev);
int tail_offset;
int wake;

tail_offset = rdl(ep, REG_TXSTSQCURADD) - ep->descs_dma_addr;
wake = 0;

spin_lock(&ep->tx_pending_lock);
Expand All @@ -393,15 +375,13 @@ static void ep93xx_tx_complete(struct net_device *dev)

entry = ep->tx_clean_pointer;
tstat = ep->descs->tstat + entry;
if ((void *)tstat - (void *)ep->descs == tail_offset)
break;

tstat0 = tstat->tstat0;
if (!(tstat0 & TSTAT0_TXFP))
break;

tstat->tstat0 = 0;

if (!(tstat0 & TSTAT0_TXFP))
printk(KERN_CRIT "ep93xx_tx_complete: buffer not done "
" %.8x\n", tstat0);
if (tstat0 & TSTAT0_FA)
printk(KERN_CRIT "ep93xx_tx_complete: frame aborted "
" %.8x\n", tstat0);
Expand Down
11 changes: 5 additions & 6 deletions trunk/drivers/net/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ int ehea_sense_port_attr(struct ehea_port *port)
u64 hret;
struct hcp_ehea_port_cb0 *cb0;

cb0 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL);
if (!cb0) {
cb0 = kzalloc(H_CB_ALIGNMENT, GFP_ATOMIC); /* May be called via */
if (!cb0) { /* ehea_neq_tasklet() */
ehea_error("no mem for cb0");
ret = -ENOMEM;
goto out;
Expand Down Expand Up @@ -765,8 +765,7 @@ static void ehea_parse_eqe(struct ehea_adapter *adapter, u64 eqe)

if (EHEA_BMASK_GET(NEQE_PORT_UP, eqe)) {
if (!netif_carrier_ok(port->netdev)) {
ret = ehea_sense_port_attr(
port);
ret = ehea_sense_port_attr(port);
if (ret) {
ehea_error("failed resensing port "
"attributes");
Expand Down Expand Up @@ -1502,7 +1501,7 @@ static void ehea_promiscuous(struct net_device *dev, int enable)
if ((enable && port->promisc) || (!enable && !port->promisc))
return;

cb7 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL);
cb7 = kzalloc(H_CB_ALIGNMENT, GFP_ATOMIC);
if (!cb7) {
ehea_error("no mem for cb7");
goto out;
Expand Down Expand Up @@ -1606,7 +1605,7 @@ static void ehea_add_multicast_entry(struct ehea_port* port, u8* mc_mac_addr)
struct ehea_mc_list *ehea_mcl_entry;
u64 hret;

ehea_mcl_entry = kzalloc(sizeof(*ehea_mcl_entry), GFP_KERNEL);
ehea_mcl_entry = kzalloc(sizeof(*ehea_mcl_entry), GFP_ATOMIC);
if (!ehea_mcl_entry) {
ehea_error("no mem for mcl_entry");
return;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/net/irda/stir4200.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* the Free Software Foundation; either version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/myri10ge/myri10ge.c
Original file line number Diff line number Diff line change
Expand Up @@ -2416,7 +2416,6 @@ static void myri10ge_enable_ecrc(struct myri10ge_priv *mgp)
* firmware image, and set tx.boundary to 4KB.
*/

#define PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE 0x0132
#define PCI_DEVICE_ID_INTEL_E5000_PCIE23 0x25f7
#define PCI_DEVICE_ID_INTEL_E5000_PCIE47 0x25fa

Expand Down
11 changes: 10 additions & 1 deletion trunk/drivers/net/s2io.c
Original file line number Diff line number Diff line change
Expand Up @@ -5985,6 +5985,11 @@ static int set_rxd_buffer_pointer(nic_t *sp, RxD_t *rxdp, buffAdd_t *ba,
((RxD3_t*)rxdp)->Buffer1_ptr = *temp1;
} else {
*skb = dev_alloc_skb(size);
if (!(*skb)) {
DBG_PRINT(ERR_DBG, "%s: dev_alloc_skb failed\n",
dev->name);
return -ENOMEM;
}
((RxD3_t*)rxdp)->Buffer2_ptr = *temp2 =
pci_map_single(sp->pdev, (*skb)->data,
dev->mtu + 4,
Expand All @@ -6007,7 +6012,11 @@ static int set_rxd_buffer_pointer(nic_t *sp, RxD_t *rxdp, buffAdd_t *ba,
((RxD3_t*)rxdp)->Buffer2_ptr = *temp2;
} else {
*skb = dev_alloc_skb(size);

if (!(*skb)) {
DBG_PRINT(ERR_DBG, "%s: dev_alloc_skb failed\n",
dev->name);
return -ENOMEM;
}
((RxD3_t*)rxdp)->Buffer0_ptr = *temp0 =
pci_map_single(sp->pdev, ba->ba_0, BUF0_LEN,
PCI_DMA_FROMDEVICE);
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/net/skge.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* the Free Software Foundation; either version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand Down
9 changes: 6 additions & 3 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* the Free Software Foundation; either version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand Down Expand Up @@ -3239,7 +3238,11 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw,
dev->poll = sky2_poll;
dev->weight = NAPI_WEIGHT;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = sky2_netpoll;
/* Network console (only works on port 0)
* because netpoll makes assumptions about NAPI
*/
if (port == 0)
dev->poll_controller = sky2_netpoll;
#endif

sky2 = netdev_priv(dev);
Expand Down
Loading

0 comments on commit dac437a

Please sign in to comment.