···10351035 * @pdev: the PCI device that received the packet10361036 * @fl: the SGE free list holding the packet10371037 * @len: the actual packet length, excluding any SGE padding10381038- * @dma_pad: padding at beginning of buffer left by SGE DMA10391039- * @skb_pad: padding to be used if the packet is copied10401040- * @copy_thres: length threshold under which a packet should be copied10411041- * @drop_thres: # of remaining buffers before we start dropping packets10421038 *10431039 * Get the next packet from a free list and complete setup of the10441040 * sk_buff. If the packet is small we make a copy and recycle the
-1
drivers/net/e1000e/netdev.c
···343343/**344344 * e1000_alloc_jumbo_rx_buffers - Replace used jumbo receive buffers345345 * @adapter: address of board private structure346346- * @rx_ring: pointer to receive ring structure347346 * @cleaned_count: number of buffers to allocate this pass348347 **/349348
···778778 PCMCIA_DEVICE_PROD_ID12("IO DATA", "ETXPCM", 0x547e66dc, 0x233adac2),779779 PCMCIA_DEVICE_PROD_ID12("Linksys", "EtherFast 10/100 PC Card (PCMPC100 V3)", 0x0733cc81, 0x232019a8),780780 PCMCIA_DEVICE_PROD_ID12("MELCO", "LPC3-TX", 0x481e0094, 0xf91af609),781781+ PCMCIA_DEVICE_PROD_ID12("NETGEAR", "FA411", 0x9aa79dc3, 0x40fad875),781782 PCMCIA_DEVICE_PROD_ID12("PCMCIA", "100BASE", 0x281f1c5d, 0x7c2add04),782783 PCMCIA_DEVICE_PROD_ID12("PCMCIA", "FastEtherCard", 0x281f1c5d, 0x7ef26116),783784 PCMCIA_DEVICE_PROD_ID12("PCMCIA", "FEP501", 0x281f1c5d, 0x2e272058),···11741173 * ax_interrupt - handle the interrupts from an 839011751174 * @irq: interrupt number11761175 * @dev_id: a pointer to the net_device11771177- * @regs: unused11781176 *11791177 * Handle the ether interface interrupts. We pull packets from11801178 * the 8390 via the card specific functions and fire them at the networking
···227227 if (r)228228 return ERR_PTR(r);229229230230- /* If the phy_id is all Fs or all 0s, there is no device there */231231- if ((0xffff == phy_id) || (0x00 == phy_id))230230+ /* If the phy_id is mostly Fs, there is no device there */231231+ if ((phy_id & 0x1fffffff) == 0x1fffffff)232232+ return NULL;233233+234234+ /*235235+ * Broken hardware is sometimes missing the pull down resistor on the236236+ * MDIO line, which results in reads to non-existent devices returning237237+ * 0 rather than 0xffff. Catch this here and treat 0 as a non-existent238238+ * device as well.239239+ */240240+ if (phy_id == 0)232241 return NULL;233242234243 dev = phy_device_create(bus, addr, phy_id);
+55-9
drivers/net/phy/vitesse.c
···3434#define MII_VSC8244_IMASK_DUPLEX 0x10003535#define MII_VSC8244_IMASK_MASK 0xf00036363737+#define MII_VSC8221_IMASK_MASK 0xa0003838+3739/* Vitesse Interrupt Status Register */3840#define MII_VSC8244_ISTAT 0x1a3941#define MII_VSC8244_ISTAT_STATUS 0x8000···5048#define MII_VSC8244_AUXCONSTAT_SPEED 0x00185149#define MII_VSC8244_AUXCONSTAT_GBIT 0x00105250#define MII_VSC8244_AUXCONSTAT_100 0x00085151+5252+#define MII_VSC8221_AUXCONSTAT_INIT 0x0004 /* need to set this bit? */5353+#define MII_VSC8221_AUXCONSTAT_RESERVED 0x00045454+5555+#define PHY_ID_VSC8244 0x000fc6c05656+#define PHY_ID_VSC8221 0x000fc55053575458MODULE_DESCRIPTION("Vitesse PHY driver");5559MODULE_AUTHOR("Kriston Carson");···10395 return (err < 0) ? err : 0;10496}10597106106-static int vsc824x_config_intr(struct phy_device *phydev)9898+static int vsc82xx_config_intr(struct phy_device *phydev)10799{108100 int err;109101110102 if (phydev->interrupts == PHY_INTERRUPT_ENABLED)111103 err = phy_write(phydev, MII_VSC8244_IMASK,112112- MII_VSC8244_IMASK_MASK);104104+ phydev->drv->phy_id == PHY_ID_VSC8244 ?105105+ MII_VSC8244_IMASK_MASK :106106+ MII_VSC8221_IMASK_MASK);113107 else {114108 /*115109 * The Vitesse PHY cannot clear the interrupt···130120131121/* Vitesse 824x */132122static struct phy_driver vsc8244_driver = {133133- .phy_id = 0x000fc6c0,123123+ .phy_id = PHY_ID_VSC8244,134124 .name = "Vitesse VSC8244",135125 .phy_id_mask = 0x000fffc0,136126 .features = PHY_GBIT_FEATURES,···139129 .config_aneg = &genphy_config_aneg,140130 .read_status = &genphy_read_status,141131 .ack_interrupt = &vsc824x_ack_interrupt,142142- .config_intr = &vsc824x_config_intr,132132+ .config_intr = &vsc82xx_config_intr,143133 .driver = { .owner = THIS_MODULE,},144134};145135146146-static int __init vsc8244_init(void)136136+static int vsc8221_config_init(struct phy_device *phydev)147137{148148- return phy_driver_register(&vsc8244_driver);138138+ int err;139139+140140+ err = phy_write(phydev, MII_VSC8244_AUX_CONSTAT,141141+ MII_VSC8221_AUXCONSTAT_INIT);142142+ return err;143143+144144+ /* Perhaps we should set EXT_CON1 based on the interface?145145+ Options are 802.3Z SerDes or SGMII */149146}150147151151-static void __exit vsc8244_exit(void)148148+/* Vitesse 8221 */149149+static struct phy_driver vsc8221_driver = {150150+ .phy_id = PHY_ID_VSC8221,151151+ .phy_id_mask = 0x000ffff0,152152+ .name = "Vitesse VSC8221",153153+ .features = PHY_GBIT_FEATURES,154154+ .flags = PHY_HAS_INTERRUPT,155155+ .config_init = &vsc8221_config_init,156156+ .config_aneg = &genphy_config_aneg,157157+ .read_status = &genphy_read_status,158158+ .ack_interrupt = &vsc824x_ack_interrupt,159159+ .config_intr = &vsc82xx_config_intr,160160+ .driver = { .owner = THIS_MODULE,},161161+};162162+163163+static int __init vsc82xx_init(void)164164+{165165+ int err;166166+167167+ err = phy_driver_register(&vsc8244_driver);168168+ if (err < 0)169169+ return err;170170+ err = phy_driver_register(&vsc8221_driver);171171+ if (err < 0)172172+ phy_driver_unregister(&vsc8244_driver);173173+ return err;174174+}175175+176176+static void __exit vsc82xx_exit(void)152177{153178 phy_driver_unregister(&vsc8244_driver);179179+ phy_driver_unregister(&vsc8221_driver);154180}155181156156-module_init(vsc8244_init);157157-module_exit(vsc8244_exit);182182+module_init(vsc82xx_init);183183+module_exit(vsc82xx_exit);
-1
drivers/net/sis900.c
···16341634 * sis900_interrupt - sis900 interrupt handler16351635 * @irq: the irq number16361636 * @dev_instance: the client data object16371637- * @regs: snapshot of processor context16381637 *16391638 * The interrupt handler does all of the Rx thread work,16401639 * and cleans up after the Tx thread
-4
drivers/net/spider_net.c
···672672/**673673 * spider_net_prepare_tx_descr - fill tx descriptor with skb data674674 * @card: card structure675675- * @descr: descriptor structure to fill out676675 * @skb: packet to use677676 *678677 * returns 0 on success, <0 on failure.···866867/**867868 * spider_net_kick_tx_dma - enables TX DMA processing868869 * @card: card structure869869- * @descr: descriptor address to enable TX processing at870870 *871871 * This routine will start the transmit DMA running if872872 * it is not already running. This routine ned only be···16351637 * spider_net_interrupt - interrupt handler for spider_net16361638 * @irq: interrupt number16371639 * @ptr: pointer to net_device16381638- * @regs: PU registers16391640 *16401641 * returns IRQ_HANDLED, if interrupt was for driver, or IRQ_NONE, if no16411642 * interrupt found raised by card.···2416241924172420/**24182421 * spider_net_setup_pci_dev - sets up the device in terms of PCI operations24192419- * @card: card structure24202422 * @pdev: PCI device24212423 *24222424 * Returns the card structure or NULL if any errors occur
+1-1
drivers/net/sungem.c
···17131713 /* Reset PCS unit. */17141714 val = readl(gp->regs + PCS_MIICTRL);17151715 val |= PCS_MIICTRL_RST;17161716- writeb(val, gp->regs + PCS_MIICTRL);17161716+ writel(val, gp->regs + PCS_MIICTRL);1717171717181718 limit = 32;17191719 while (readl(gp->regs + PCS_MIICTRL) & PCS_MIICTRL_RST) {
···4141 ASSERT(skb != NULL);4242 ds->ds_vdata = skb->data;43434444- /* setup rx descriptors */4545- ath9k_hw_setuprxdesc(ah, ds,4646- skb_tailroom(skb), /* buffer size */4444+ /* setup rx descriptors. The sc_rxbufsize here tells the harware4545+ * how much data it can DMA to us and that we are prepared4646+ * to process */4747+ ath9k_hw_setuprxdesc(ah,4848+ ds,4949+ sc->sc_rxbufsize,4750 0);48514952 if (sc->sc_rxlink == NULL)···9188 * in rx'd frames.9289 */93909191+ /* Note: the kernel can allocate a value greater than9292+ * what we ask it to give us. We really only need 4 KB as that9393+ * is this hardware supports and in fact we need at least 38499494+ * as that is the MAX AMSDU size this hardware supports.9595+ * Unfortunately this means we may get 8 KB here from the9696+ * kernel... and that is actually what is observed on some9797+ * systems :( */9498 skb = dev_alloc_skb(len + sc->sc_cachelsz - 1);9599 if (skb != NULL) {96100 off = ((unsigned long) skb->data) % sc->sc_cachelsz;···308298309299 bf->bf_mpdu = skb;310300 bf->bf_buf_addr = pci_map_single(sc->pdev, skb->data,311311- skb_end_pointer(skb) - skb->head,301301+ sc->sc_rxbufsize,312302 PCI_DMA_FROMDEVICE);313303 bf->bf_dmacontext = bf->bf_buf_addr;314304 }···554544 if (!requeue_skb)555545 goto requeue;556546557557- /* Sync and unmap the frame */558558- pci_dma_sync_single_for_cpu(sc->pdev, bf->bf_buf_addr,559559- skb_tailroom(skb),547547+ pci_dma_sync_single_for_cpu(sc->pdev,548548+ bf->bf_buf_addr,549549+ sc->sc_rxbufsize,560550 PCI_DMA_FROMDEVICE);561551 pci_unmap_single(sc->pdev, bf->bf_buf_addr,562552 sc->sc_rxbufsize,
+5-3
drivers/net/wireless/iwlwifi/iwl-agn.c
···1228122812291229 rxq->queue[i] = NULL;1230123012311231- pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->aligned_dma_addr,12321232- priv->hw_params.rx_buf_size,12331233- PCI_DMA_FROMDEVICE);12311231+ dma_sync_single_range_for_cpu(12321232+ &priv->pci_dev->dev, rxb->real_dma_addr,12331233+ rxb->aligned_dma_addr - rxb->real_dma_addr,12341234+ priv->hw_params.rx_buf_size,12351235+ PCI_DMA_FROMDEVICE);12341236 pkt = (struct iwl_rx_packet *)rxb->skb->data;1235123712361238 /* Reclaim a command buffer only if this packet is a response
+17
drivers/pci/quirks.c
···2222#include <linux/delay.h>2323#include <linux/acpi.h>2424#include <linux/kallsyms.h>2525+#include <linux/dmi.h>2526#include "pci.h"26272728int isa_dma_bridge_buggy;···18281827DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS,18291828 PCI_DEVICE_ID_SERVERWORKS_HT1000_PXB,18301829 ht_enable_msi_mapping);18301830+18311831+/* The P5N32-SLI Premium motherboard from Asus has a problem with msi18321832+ * for the MCP55 NIC. It is not yet determined whether the msi problem18331833+ * also affects other devices. As for now, turn off msi for this device.18341834+ */18351835+static void __devinit nvenet_msi_disable(struct pci_dev *dev)18361836+{18371837+ if (dmi_name_in_vendors("P5N32-SLI PREMIUM")) {18381838+ dev_info(&dev->dev,18391839+ "Disabling msi for MCP55 NIC on P5N32-SLI Premium\n");18401840+ dev->no_msi = 1;18411841+ }18421842+}18431843+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA,18441844+ PCI_DEVICE_ID_NVIDIA_NVENET_15,18451845+ nvenet_msi_disable);1831184618321847static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev)18331848{
···10721072 unsigned char *asmptr;10731073 int n, size, qbit = 0;1074107410751075+ /* ROSE empty frame has no meaning : don't send */10761076+ if (len == 0)10771077+ return 0;10781078+10751079 if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT))10761080 return -EINVAL;10771081···1268126412691265 skb_reset_transport_header(skb);12701266 copied = skb->len;12671267+12681268+ /* ROSE empty frame has no meaning : ignore it */12691269+ if (copied == 0) {12701270+ skb_free_datagram(sk, skb);12711271+ return copied;12721272+ }1271127312721274 if (copied > size) {12731275 copied = size;