diff options
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/c101.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/cosa.c | 4 | ||||
-rw-r--r-- | drivers/net/wan/farsync.c | 37 | ||||
-rw-r--r-- | drivers/net/wan/lmc/lmc_main.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/n2.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/pc300too.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/pci200syn.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/wanxl.c | 54 |
8 files changed, 51 insertions, 54 deletions
diff --git a/drivers/net/wan/c101.c b/drivers/net/wan/c101.c index cb57f9124ab1..c354a5143e99 100644 --- a/drivers/net/wan/c101.c +++ b/drivers/net/wan/c101.c @@ -4,7 +4,7 @@ * * Copyright (C) 2000-2003 Krzysztof Halasa <khc@pm.waw.pl> * - * For information see <http://www.kernel.org/pub/linux/utils/net/hdlc/> + * For information see <https://www.kernel.org/pub/linux/utils/net/hdlc/> * * Sources of information: * Hitachi HD64570 SCA User's Manual diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c index 5d6532ad6b78..f8aed0696d77 100644 --- a/drivers/net/wan/cosa.c +++ b/drivers/net/wan/cosa.c @@ -12,7 +12,7 @@ * HARDWARE INFO * * Both cards are developed at the Institute of Computer Science, - * Masaryk University (http://www.ics.muni.cz/). The hardware is + * Masaryk University (https://www.ics.muni.cz/). The hardware is * developed by Jiri Novotny <novotny@ics.muni.cz>. More information * and the photo of both cards is available at * http://www.pavoucek.cz/cosa.html. The card documentation, firmwares @@ -35,7 +35,7 @@ * * SOFTWARE INFO * - * The homepage of the Linux driver is at http://www.fi.muni.cz/~kas/cosa/. + * The homepage of the Linux driver is at https://www.fi.muni.cz/~kas/cosa/. * The CVS tree of Linux driver can be viewed there, as well as the * firmware binaries and user-space utilities for downloading the firmware * into the card and setting up the card. diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index f5198a391417..b50cf11d197d 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c @@ -124,7 +124,7 @@ module_param_array(fst_excluded_list, int, NULL, 0); /* The Am186CH/CC processors support a SmartDMA mode using circular pools * of buffer descriptors. The structure is almost identical to that used * in the LANCE Ethernet controllers. Details available as PDF from the - * AMD web site: http://www.amd.com/products/epd/processors/\ + * AMD web site: https://www.amd.com/products/epd/processors/\ * 2.16bitcont/3.am186cxfa/a21914/21914.pdf */ struct txdesc { /* Transmit descriptor */ @@ -2553,16 +2553,16 @@ fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent) * Allocate a dma buffer for transmit and receives */ card->rx_dma_handle_host = - pci_alloc_consistent(card->device, FST_MAX_MTU, - &card->rx_dma_handle_card); + dma_alloc_coherent(&card->device->dev, FST_MAX_MTU, + &card->rx_dma_handle_card, GFP_KERNEL); if (card->rx_dma_handle_host == NULL) { pr_err("Could not allocate rx dma buffer\n"); err = -ENOMEM; goto rx_dma_fail; } card->tx_dma_handle_host = - pci_alloc_consistent(card->device, FST_MAX_MTU, - &card->tx_dma_handle_card); + dma_alloc_coherent(&card->device->dev, FST_MAX_MTU, + &card->tx_dma_handle_card, GFP_KERNEL); if (card->tx_dma_handle_host == NULL) { pr_err("Could not allocate tx dma buffer\n"); err = -ENOMEM; @@ -2572,9 +2572,8 @@ fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent) return 0; /* Success */ tx_dma_fail: - pci_free_consistent(card->device, FST_MAX_MTU, - card->rx_dma_handle_host, - card->rx_dma_handle_card); + dma_free_coherent(&card->device->dev, FST_MAX_MTU, + card->rx_dma_handle_host, card->rx_dma_handle_card); rx_dma_fail: fst_disable_intr(card); for (i = 0 ; i < card->nports ; i++) @@ -2625,23 +2624,21 @@ fst_remove_one(struct pci_dev *pdev) /* * Free dma buffers */ - pci_free_consistent(card->device, FST_MAX_MTU, - card->rx_dma_handle_host, - card->rx_dma_handle_card); - pci_free_consistent(card->device, FST_MAX_MTU, - card->tx_dma_handle_host, - card->tx_dma_handle_card); + dma_free_coherent(&card->device->dev, FST_MAX_MTU, + card->rx_dma_handle_host, + card->rx_dma_handle_card); + dma_free_coherent(&card->device->dev, FST_MAX_MTU, + card->tx_dma_handle_host, + card->tx_dma_handle_card); } fst_card_array[card->card_no] = NULL; } static struct pci_driver fst_driver = { - .name = FST_NAME, - .id_table = fst_pci_dev_id, - .probe = fst_add_one, - .remove = fst_remove_one, - .suspend = NULL, - .resume = NULL, + .name = FST_NAME, + .id_table = fst_pci_dev_id, + .probe = fst_add_one, + .remove = fst_remove_one, }; static int __init diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index a20f467ca48a..842def21e089 100644 --- a/drivers/net/wan/lmc/lmc_main.c +++ b/drivers/net/wan/lmc/lmc_main.c @@ -2063,7 +2063,7 @@ static void lmc_driver_timeout(struct net_device *dev, unsigned int txqueue) /* * Chip seems to have locked up * Reset it - * This whips out all our decriptor + * This whips out all our descriptor * table and starts from scartch */ diff --git a/drivers/net/wan/n2.c b/drivers/net/wan/n2.c index f9e7fc7e9978..5bf4463873b1 100644 --- a/drivers/net/wan/n2.c +++ b/drivers/net/wan/n2.c @@ -4,7 +4,7 @@ * * Copyright (C) 1998-2003 Krzysztof Halasa <khc@pm.waw.pl> * - * For information see <http://www.kernel.org/pub/linux/utils/net/hdlc/> + * For information see <https://www.kernel.org/pub/linux/utils/net/hdlc/> * * Note: integrated CSU/DSU/DDS are not supported by this driver * diff --git a/drivers/net/wan/pc300too.c b/drivers/net/wan/pc300too.c index 190735604b2e..001fd378d417 100644 --- a/drivers/net/wan/pc300too.c +++ b/drivers/net/wan/pc300too.c @@ -4,7 +4,7 @@ * * Copyright (C) 2000-2008 Krzysztof Halasa <khc@pm.waw.pl> * - * For information see <http://www.kernel.org/pub/linux/utils/net/hdlc/>. + * For information see <https://www.kernel.org/pub/linux/utils/net/hdlc/>. * * Sources of information: * Hitachi HD64572 SCA-II User's Manual diff --git a/drivers/net/wan/pci200syn.c b/drivers/net/wan/pci200syn.c index b5f8aaca5f06..d0062224b216 100644 --- a/drivers/net/wan/pci200syn.c +++ b/drivers/net/wan/pci200syn.c @@ -4,7 +4,7 @@ * * Copyright (C) 2002-2008 Krzysztof Halasa <khc@pm.waw.pl> * - * For information see <http://www.kernel.org/pub/linux/utils/net/hdlc/> + * For information see <https://www.kernel.org/pub/linux/utils/net/hdlc/> * * Sources of information: * Hitachi HD64572 SCA-II User's Manual diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index 499f7cd19a4a..a83133388de9 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c @@ -99,7 +99,7 @@ static inline port_status_t *get_status(struct port *port) static inline dma_addr_t pci_map_single_debug(struct pci_dev *pdev, void *ptr, size_t size, int direction) { - dma_addr_t addr = pci_map_single(pdev, ptr, size, direction); + dma_addr_t addr = dma_map_single(&pdev->dev, ptr, size, direction); if (addr + size > 0x100000000LL) pr_crit("%s: pci_map_single() returned memory at 0x%llx!\n", pci_name(pdev), (unsigned long long)addr); @@ -180,8 +180,8 @@ static inline void wanxl_tx_intr(struct port *port) dev->stats.tx_bytes += skb->len; } desc->stat = PACKET_EMPTY; /* Free descriptor */ - pci_unmap_single(port->card->pdev, desc->address, skb->len, - PCI_DMA_TODEVICE); + dma_unmap_single(&port->card->pdev->dev, desc->address, + skb->len, DMA_TO_DEVICE); dev_consume_skb_irq(skb); port->tx_in = (port->tx_in + 1) % TX_BUFFERS; } @@ -207,9 +207,9 @@ static inline void wanxl_rx_intr(struct card *card) if (!skb) dev->stats.rx_dropped++; else { - pci_unmap_single(card->pdev, desc->address, - BUFFER_LENGTH, - PCI_DMA_FROMDEVICE); + dma_unmap_single(&card->pdev->dev, + desc->address, BUFFER_LENGTH, + DMA_FROM_DEVICE); skb_put(skb, desc->length); #ifdef DEBUG_PKT @@ -227,9 +227,10 @@ static inline void wanxl_rx_intr(struct card *card) if (!skb) { skb = dev_alloc_skb(BUFFER_LENGTH); desc->address = skb ? - pci_map_single(card->pdev, skb->data, + dma_map_single(&card->pdev->dev, + skb->data, BUFFER_LENGTH, - PCI_DMA_FROMDEVICE) : 0; + DMA_FROM_DEVICE) : 0; card->rx_skbs[card->rx_in] = skb; } } @@ -291,8 +292,8 @@ static netdev_tx_t wanxl_xmit(struct sk_buff *skb, struct net_device *dev) #endif port->tx_skbs[port->tx_out] = skb; - desc->address = pci_map_single(port->card->pdev, skb->data, skb->len, - PCI_DMA_TODEVICE); + desc->address = dma_map_single(&port->card->pdev->dev, skb->data, + skb->len, DMA_TO_DEVICE); desc->length = skb->len; desc->stat = PACKET_FULL; writel(1 << (DOORBELL_TO_CARD_TX_0 + port->node), @@ -451,9 +452,9 @@ static int wanxl_close(struct net_device *dev) if (desc->stat != PACKET_EMPTY) { desc->stat = PACKET_EMPTY; - pci_unmap_single(port->card->pdev, desc->address, - port->tx_skbs[i]->len, - PCI_DMA_TODEVICE); + dma_unmap_single(&port->card->pdev->dev, + desc->address, port->tx_skbs[i]->len, + DMA_TO_DEVICE); dev_kfree_skb(port->tx_skbs[i]); } } @@ -524,9 +525,9 @@ static void wanxl_pci_remove_one(struct pci_dev *pdev) for (i = 0; i < RX_QUEUE_LENGTH; i++) if (card->rx_skbs[i]) { - pci_unmap_single(card->pdev, + dma_unmap_single(&card->pdev->dev, card->status->rx_descs[i].address, - BUFFER_LENGTH, PCI_DMA_FROMDEVICE); + BUFFER_LENGTH, DMA_FROM_DEVICE); dev_kfree_skb(card->rx_skbs[i]); } @@ -534,8 +535,8 @@ static void wanxl_pci_remove_one(struct pci_dev *pdev) iounmap(card->plx); if (card->status) - pci_free_consistent(pdev, sizeof(struct card_status), - card->status, card->status_address); + dma_free_coherent(&pdev->dev, sizeof(struct card_status), + card->status, card->status_address); pci_release_regions(pdev); pci_disable_device(pdev); @@ -579,8 +580,8 @@ static int wanxl_pci_init_one(struct pci_dev *pdev, We set both dma_mask and consistent_dma_mask to 28 bits and pray pci_alloc_consistent() will use this info. It should work on most platforms */ - if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(28)) || - pci_set_dma_mask(pdev, DMA_BIT_MASK(28))) { + if (dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(28)) || + dma_set_mask(&pdev->dev, DMA_BIT_MASK(28))) { pr_err("No usable DMA configuration\n"); pci_disable_device(pdev); return -EIO; @@ -608,9 +609,9 @@ static int wanxl_pci_init_one(struct pci_dev *pdev, pci_set_drvdata(pdev, card); card->pdev = pdev; - card->status = pci_alloc_consistent(pdev, - sizeof(struct card_status), - &card->status_address); + card->status = dma_alloc_coherent(&pdev->dev, + sizeof(struct card_status), + &card->status_address, GFP_KERNEL); if (card->status == NULL) { wanxl_pci_remove_one(pdev); return -ENOBUFS; @@ -625,8 +626,8 @@ static int wanxl_pci_init_one(struct pci_dev *pdev, /* FIXME when PCI/DMA subsystems are fixed. We set both dma_mask and consistent_dma_mask back to 32 bits to indicate the card can do 32-bit DMA addressing */ - if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)) || - pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { + if (dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)) || + dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) { pr_err("No usable DMA configuration\n"); wanxl_pci_remove_one(pdev); return -EIO; @@ -699,9 +700,8 @@ static int wanxl_pci_init_one(struct pci_dev *pdev, card->rx_skbs[i] = skb; if (skb) card->status->rx_descs[i].address = - pci_map_single(card->pdev, skb->data, - BUFFER_LENGTH, - PCI_DMA_FROMDEVICE); + dma_map_single(&card->pdev->dev, skb->data, + BUFFER_LENGTH, DMA_FROM_DEVICE); } mem = ioremap(mem_phy, PDM_OFFSET + sizeof(firmware)); |