diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-05 02:11:33 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-05 02:11:33 -0400 |
commit | 0d69ae5fb7eb9ba3b54cf0ba4ef5ae591f31eef7 (patch) | |
tree | be441bfa1e76035c00b66a3b06fea66cfd63d594 /drivers | |
parent | 13d1ef29bc5125d7b77c5f6cdfde5ed31226005c (diff) | |
parent | 9bc39bec87ee3e35897fe27441e979e7c208f624 (diff) |
Merge branch 'master'
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_main.c | 45 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 | ||||
-rw-r--r-- | drivers/net/tokenring/ibmtr.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco.c | 14 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas.c | 1 | ||||
-rw-r--r-- | drivers/serial/sunsu.c | 4 |
6 files changed, 33 insertions, 40 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c index ffbcd40418d5..23a3f56c7899 100644 --- a/drivers/infiniband/hw/mthca/mthca_main.c +++ b/drivers/infiniband/hw/mthca/mthca_main.c | |||
@@ -503,6 +503,25 @@ err_free_aux: | |||
503 | return err; | 503 | return err; |
504 | } | 504 | } |
505 | 505 | ||
506 | static void mthca_free_icms(struct mthca_dev *mdev) | ||
507 | { | ||
508 | u8 status; | ||
509 | |||
510 | mthca_free_icm_table(mdev, mdev->mcg_table.table); | ||
511 | if (mdev->mthca_flags & MTHCA_FLAG_SRQ) | ||
512 | mthca_free_icm_table(mdev, mdev->srq_table.table); | ||
513 | mthca_free_icm_table(mdev, mdev->cq_table.table); | ||
514 | mthca_free_icm_table(mdev, mdev->qp_table.rdb_table); | ||
515 | mthca_free_icm_table(mdev, mdev->qp_table.eqp_table); | ||
516 | mthca_free_icm_table(mdev, mdev->qp_table.qp_table); | ||
517 | mthca_free_icm_table(mdev, mdev->mr_table.mpt_table); | ||
518 | mthca_free_icm_table(mdev, mdev->mr_table.mtt_table); | ||
519 | mthca_unmap_eq_icm(mdev); | ||
520 | |||
521 | mthca_UNMAP_ICM_AUX(mdev, &status); | ||
522 | mthca_free_icm(mdev, mdev->fw.arbel.aux_icm); | ||
523 | } | ||
524 | |||
506 | static int __devinit mthca_init_arbel(struct mthca_dev *mdev) | 525 | static int __devinit mthca_init_arbel(struct mthca_dev *mdev) |
507 | { | 526 | { |
508 | struct mthca_dev_lim dev_lim; | 527 | struct mthca_dev_lim dev_lim; |
@@ -580,18 +599,7 @@ static int __devinit mthca_init_arbel(struct mthca_dev *mdev) | |||
580 | return 0; | 599 | return 0; |
581 | 600 | ||
582 | err_free_icm: | 601 | err_free_icm: |
583 | if (mdev->mthca_flags & MTHCA_FLAG_SRQ) | 602 | mthca_free_icms(mdev); |
584 | mthca_free_icm_table(mdev, mdev->srq_table.table); | ||
585 | mthca_free_icm_table(mdev, mdev->cq_table.table); | ||
586 | mthca_free_icm_table(mdev, mdev->qp_table.rdb_table); | ||
587 | mthca_free_icm_table(mdev, mdev->qp_table.eqp_table); | ||
588 | mthca_free_icm_table(mdev, mdev->qp_table.qp_table); | ||
589 | mthca_free_icm_table(mdev, mdev->mr_table.mpt_table); | ||
590 | mthca_free_icm_table(mdev, mdev->mr_table.mtt_table); | ||
591 | mthca_unmap_eq_icm(mdev); | ||
592 | |||
593 | mthca_UNMAP_ICM_AUX(mdev, &status); | ||
594 | mthca_free_icm(mdev, mdev->fw.arbel.aux_icm); | ||
595 | 603 | ||
596 | err_stop_fw: | 604 | err_stop_fw: |
597 | mthca_UNMAP_FA(mdev, &status); | 605 | mthca_UNMAP_FA(mdev, &status); |
@@ -611,18 +619,7 @@ static void mthca_close_hca(struct mthca_dev *mdev) | |||
611 | mthca_CLOSE_HCA(mdev, 0, &status); | 619 | mthca_CLOSE_HCA(mdev, 0, &status); |
612 | 620 | ||
613 | if (mthca_is_memfree(mdev)) { | 621 | if (mthca_is_memfree(mdev)) { |
614 | if (mdev->mthca_flags & MTHCA_FLAG_SRQ) | 622 | mthca_free_icms(mdev); |
615 | mthca_free_icm_table(mdev, mdev->srq_table.table); | ||
616 | mthca_free_icm_table(mdev, mdev->cq_table.table); | ||
617 | mthca_free_icm_table(mdev, mdev->qp_table.rdb_table); | ||
618 | mthca_free_icm_table(mdev, mdev->qp_table.eqp_table); | ||
619 | mthca_free_icm_table(mdev, mdev->qp_table.qp_table); | ||
620 | mthca_free_icm_table(mdev, mdev->mr_table.mpt_table); | ||
621 | mthca_free_icm_table(mdev, mdev->mr_table.mtt_table); | ||
622 | mthca_unmap_eq_icm(mdev); | ||
623 | |||
624 | mthca_UNMAP_ICM_AUX(mdev, &status); | ||
625 | mthca_free_icm(mdev, mdev->fw.arbel.aux_icm); | ||
626 | 623 | ||
627 | mthca_UNMAP_FA(mdev, &status); | 624 | mthca_UNMAP_FA(mdev, &status); |
628 | mthca_free_icm(mdev, mdev->fw.arbel.fw_icm); | 625 | mthca_free_icm(mdev, mdev->fw.arbel.fw_icm); |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 704f48e0b6a7..6c5bf07489f4 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
@@ -474,7 +474,7 @@ err: | |||
474 | spin_unlock(&priv->lock); | 474 | spin_unlock(&priv->lock); |
475 | } | 475 | } |
476 | 476 | ||
477 | static void path_lookup(struct sk_buff *skb, struct net_device *dev) | 477 | static void ipoib_path_lookup(struct sk_buff *skb, struct net_device *dev) |
478 | { | 478 | { |
479 | struct ipoib_dev_priv *priv = netdev_priv(skb->dev); | 479 | struct ipoib_dev_priv *priv = netdev_priv(skb->dev); |
480 | 480 | ||
@@ -569,7 +569,7 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
569 | 569 | ||
570 | if (skb->dst && skb->dst->neighbour) { | 570 | if (skb->dst && skb->dst->neighbour) { |
571 | if (unlikely(!*to_ipoib_neigh(skb->dst->neighbour))) { | 571 | if (unlikely(!*to_ipoib_neigh(skb->dst->neighbour))) { |
572 | path_lookup(skb, dev); | 572 | ipoib_path_lookup(skb, dev); |
573 | goto out; | 573 | goto out; |
574 | } | 574 | } |
575 | 575 | ||
diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c index 8154bbbb7792..9f491563944e 100644 --- a/drivers/net/tokenring/ibmtr.c +++ b/drivers/net/tokenring/ibmtr.c | |||
@@ -531,7 +531,6 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr) | |||
531 | if (!time_after(jiffies, timeout)) continue; | 531 | if (!time_after(jiffies, timeout)) continue; |
532 | DPRINTK( "Hardware timeout during initialization.\n"); | 532 | DPRINTK( "Hardware timeout during initialization.\n"); |
533 | iounmap(t_mmio); | 533 | iounmap(t_mmio); |
534 | kfree(ti); | ||
535 | return -ENODEV; | 534 | return -ENODEV; |
536 | } | 535 | } |
537 | ti->sram_phys = | 536 | ti->sram_phys = |
@@ -645,7 +644,6 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr) | |||
645 | DPRINTK("Unknown shared ram paging info %01X\n", | 644 | DPRINTK("Unknown shared ram paging info %01X\n", |
646 | ti->shared_ram_paging); | 645 | ti->shared_ram_paging); |
647 | iounmap(t_mmio); | 646 | iounmap(t_mmio); |
648 | kfree(ti); | ||
649 | return -ENODEV; | 647 | return -ENODEV; |
650 | break; | 648 | break; |
651 | } /*end switch shared_ram_paging */ | 649 | } /*end switch shared_ram_paging */ |
@@ -675,7 +673,6 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr) | |||
675 | "driver limit (%05x), adapter not started.\n", | 673 | "driver limit (%05x), adapter not started.\n", |
676 | chk_base, ibmtr_mem_base + IBMTR_SHARED_RAM_SIZE); | 674 | chk_base, ibmtr_mem_base + IBMTR_SHARED_RAM_SIZE); |
677 | iounmap(t_mmio); | 675 | iounmap(t_mmio); |
678 | kfree(ti); | ||
679 | return -ENODEV; | 676 | return -ENODEV; |
680 | } else { /* seems cool, record what we have figured out */ | 677 | } else { /* seems cool, record what we have figured out */ |
681 | ti->sram_base = new_base >> 12; | 678 | ti->sram_base = new_base >> 12; |
@@ -690,7 +687,6 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr) | |||
690 | DPRINTK("Could not grab irq %d. Halting Token Ring driver.\n", | 687 | DPRINTK("Could not grab irq %d. Halting Token Ring driver.\n", |
691 | irq); | 688 | irq); |
692 | iounmap(t_mmio); | 689 | iounmap(t_mmio); |
693 | kfree(ti); | ||
694 | return -ENODEV; | 690 | return -ENODEV; |
695 | } | 691 | } |
696 | /*?? Now, allocate some of the PIO PORTs for this driver.. */ | 692 | /*?? Now, allocate some of the PIO PORTs for this driver.. */ |
@@ -699,7 +695,6 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr) | |||
699 | DPRINTK("Could not grab PIO range. Halting driver.\n"); | 695 | DPRINTK("Could not grab PIO range. Halting driver.\n"); |
700 | free_irq(dev->irq, dev); | 696 | free_irq(dev->irq, dev); |
701 | iounmap(t_mmio); | 697 | iounmap(t_mmio); |
702 | kfree(ti); | ||
703 | return -EBUSY; | 698 | return -EBUSY; |
704 | } | 699 | } |
705 | 700 | ||
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index 78afbc7f08be..da4c5e94a959 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -490,9 +490,14 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) | |||
490 | return 0; | 490 | return 0; |
491 | } | 491 | } |
492 | 492 | ||
493 | /* Length of the packet body */ | 493 | /* Check packet length, pad short packets, round up odd length */ |
494 | /* FIXME: what if the skb is smaller than this? */ | 494 | len = max_t(int, ALIGN(skb->len, 2), ETH_ZLEN); |
495 | len = max_t(int,skb->len - ETH_HLEN, ETH_ZLEN - ETH_HLEN); | 495 | if (skb->len < len) { |
496 | skb = skb_padto(skb, len); | ||
497 | if (skb == NULL) | ||
498 | goto fail; | ||
499 | } | ||
500 | len -= ETH_HLEN; | ||
496 | 501 | ||
497 | eh = (struct ethhdr *)skb->data; | 502 | eh = (struct ethhdr *)skb->data; |
498 | 503 | ||
@@ -544,8 +549,7 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) | |||
544 | p = skb->data; | 549 | p = skb->data; |
545 | } | 550 | } |
546 | 551 | ||
547 | /* Round up for odd length packets */ | 552 | err = hermes_bap_pwrite(hw, USER_BAP, p, data_len, |
548 | err = hermes_bap_pwrite(hw, USER_BAP, p, ALIGN(data_len, 2), | ||
549 | txfid, data_off); | 553 | txfid, data_off); |
550 | if (err) { | 554 | if (err) { |
551 | printk(KERN_ERR "%s: Error %d writing packet to BAP\n", | 555 | printk(KERN_ERR "%s: Error %d writing packet to BAP\n", |
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c index 1b3148e842af..c3f637395734 100644 --- a/drivers/scsi/megaraid/megaraid_sas.c +++ b/drivers/scsi/megaraid/megaraid_sas.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
35 | #include <linux/uio.h> | 35 | #include <linux/uio.h> |
36 | #include <asm/uaccess.h> | 36 | #include <asm/uaccess.h> |
37 | #include <linux/fs.h> | ||
37 | #include <linux/compat.h> | 38 | #include <linux/compat.h> |
38 | 39 | ||
39 | #include <scsi/scsi.h> | 40 | #include <scsi/scsi.h> |
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 5959e6755a81..656c0e8d160e 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
@@ -518,11 +518,7 @@ static void sunsu_change_mouse_baud(struct uart_sunsu_port *up) | |||
518 | 518 | ||
519 | quot = up->port.uartclk / (16 * new_baud); | 519 | quot = up->port.uartclk / (16 * new_baud); |
520 | 520 | ||
521 | spin_unlock(&up->port.lock); | ||
522 | |||
523 | sunsu_change_speed(&up->port, up->cflag, 0, quot); | 521 | sunsu_change_speed(&up->port, up->cflag, 0, quot); |
524 | |||
525 | spin_lock(&up->port.lock); | ||
526 | } | 522 | } |
527 | 523 | ||
528 | static void receive_kbd_ms_chars(struct uart_sunsu_port *up, struct pt_regs *regs, int is_break) | 524 | static void receive_kbd_ms_chars(struct uart_sunsu_port *up, struct pt_regs *regs, int is_break) |