diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/xen-blkfront.c | 10 | ||||
-rw-r--r-- | drivers/cdrom/viocd.c | 2 | ||||
-rw-r--r-- | drivers/char/random.c | 2 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_bios.c | 3 | ||||
-rw-r--r-- | drivers/crypto/ixp4xx_crypto.c | 33 | ||||
-rw-r--r-- | drivers/crypto/padlock-aes.c | 2 | ||||
-rw-r--r-- | drivers/mfd/pcf50633-core.c | 2 | ||||
-rw-r--r-- | drivers/mfd/wm8350-core.c | 8 | ||||
-rw-r--r-- | drivers/mtd/devices/mtd_dataflash.c | 2 | ||||
-rw-r--r-- | drivers/net/benet/be.h | 14 | ||||
-rw-r--r-- | drivers/net/benet/be_main.c | 10 | ||||
-rw-r--r-- | drivers/net/bonding/bond_3ad.c | 11 | ||||
-rw-r--r-- | drivers/net/meth.c | 27 | ||||
-rw-r--r-- | drivers/net/mlx4/en_cq.c | 4 | ||||
-rw-r--r-- | drivers/net/mv643xx_eth.c | 41 | ||||
-rw-r--r-- | drivers/net/vxge/vxge-traffic.c | 2 | ||||
-rw-r--r-- | drivers/net/wimax/i2400m/rx.c | 5 | ||||
-rw-r--r-- | drivers/regulator/da903x.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 9 |
19 files changed, 116 insertions, 73 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 8f905089b72b..a6cbf7b808e6 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c | |||
@@ -934,8 +934,6 @@ static void blkfront_closing(struct xenbus_device *dev) | |||
934 | 934 | ||
935 | spin_lock_irqsave(&blkif_io_lock, flags); | 935 | spin_lock_irqsave(&blkif_io_lock, flags); |
936 | 936 | ||
937 | del_gendisk(info->gd); | ||
938 | |||
939 | /* No more blkif_request(). */ | 937 | /* No more blkif_request(). */ |
940 | blk_stop_queue(info->rq); | 938 | blk_stop_queue(info->rq); |
941 | 939 | ||
@@ -949,6 +947,8 @@ static void blkfront_closing(struct xenbus_device *dev) | |||
949 | blk_cleanup_queue(info->rq); | 947 | blk_cleanup_queue(info->rq); |
950 | info->rq = NULL; | 948 | info->rq = NULL; |
951 | 949 | ||
950 | del_gendisk(info->gd); | ||
951 | |||
952 | out: | 952 | out: |
953 | xenbus_frontend_closed(dev); | 953 | xenbus_frontend_closed(dev); |
954 | } | 954 | } |
@@ -977,8 +977,10 @@ static void backend_changed(struct xenbus_device *dev, | |||
977 | break; | 977 | break; |
978 | 978 | ||
979 | case XenbusStateClosing: | 979 | case XenbusStateClosing: |
980 | if (info->gd == NULL) | 980 | if (info->gd == NULL) { |
981 | xenbus_dev_fatal(dev, -ENODEV, "gd is NULL"); | 981 | xenbus_frontend_closed(dev); |
982 | break; | ||
983 | } | ||
982 | bd = bdget_disk(info->gd, 0); | 984 | bd = bdget_disk(info->gd, 0); |
983 | if (bd == NULL) | 985 | if (bd == NULL) |
984 | xenbus_dev_fatal(dev, -ENODEV, "bdget failed"); | 986 | xenbus_dev_fatal(dev, -ENODEV, "bdget failed"); |
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index 13929356135c..9b1624e0ddeb 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c | |||
@@ -587,7 +587,7 @@ static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id) | |||
587 | struct device_node *node = vdev->dev.archdata.of_node; | 587 | struct device_node *node = vdev->dev.archdata.of_node; |
588 | 588 | ||
589 | deviceno = vdev->unit_address; | 589 | deviceno = vdev->unit_address; |
590 | if (deviceno > VIOCD_MAX_CD) | 590 | if (deviceno >= VIOCD_MAX_CD) |
591 | return -ENODEV; | 591 | return -ENODEV; |
592 | if (!node) | 592 | if (!node) |
593 | return -ENODEV; | 593 | return -ENODEV; |
diff --git a/drivers/char/random.c b/drivers/char/random.c index b2ced39d76b2..8c7444857a4b 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c | |||
@@ -1673,7 +1673,7 @@ unsigned int get_random_int(void) | |||
1673 | int ret; | 1673 | int ret; |
1674 | 1674 | ||
1675 | keyptr = get_keyptr(); | 1675 | keyptr = get_keyptr(); |
1676 | hash[0] += current->pid + jiffies + get_cycles() + (int)(long)&ret; | 1676 | hash[0] += current->pid + jiffies + get_cycles(); |
1677 | 1677 | ||
1678 | ret = half_md4_transform(hash, keyptr->secret); | 1678 | ret = half_md4_transform(hash, keyptr->secret); |
1679 | put_cpu_var(get_random_int_hash); | 1679 | put_cpu_var(get_random_int_hash); |
diff --git a/drivers/char/tpm/tpm_bios.c b/drivers/char/tpm/tpm_bios.c index ed306eb1057f..0c2f55a38b95 100644 --- a/drivers/char/tpm/tpm_bios.c +++ b/drivers/char/tpm/tpm_bios.c | |||
@@ -212,7 +212,8 @@ static int get_event_name(char *dest, struct tcpa_event *event, | |||
212 | unsigned char * event_entry) | 212 | unsigned char * event_entry) |
213 | { | 213 | { |
214 | const char *name = ""; | 214 | const char *name = ""; |
215 | char data[40] = ""; | 215 | /* 41 so there is room for 40 data and 1 nul */ |
216 | char data[41] = ""; | ||
216 | int i, n_len = 0, d_len = 0; | 217 | int i, n_len = 0, d_len = 0; |
217 | struct tcpa_pc_event *pc_event; | 218 | struct tcpa_pc_event *pc_event; |
218 | 219 | ||
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index f9f05d7a707d..6c6656d3b1e2 100644 --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c | |||
@@ -415,6 +415,7 @@ static void crypto_done_action(unsigned long arg) | |||
415 | static int init_ixp_crypto(void) | 415 | static int init_ixp_crypto(void) |
416 | { | 416 | { |
417 | int ret = -ENODEV; | 417 | int ret = -ENODEV; |
418 | u32 msg[2] = { 0, 0 }; | ||
418 | 419 | ||
419 | if (! ( ~(*IXP4XX_EXP_CFG2) & (IXP4XX_FEATURE_HASH | | 420 | if (! ( ~(*IXP4XX_EXP_CFG2) & (IXP4XX_FEATURE_HASH | |
420 | IXP4XX_FEATURE_AES | IXP4XX_FEATURE_DES))) { | 421 | IXP4XX_FEATURE_AES | IXP4XX_FEATURE_DES))) { |
@@ -426,9 +427,35 @@ static int init_ixp_crypto(void) | |||
426 | return ret; | 427 | return ret; |
427 | 428 | ||
428 | if (!npe_running(npe_c)) { | 429 | if (!npe_running(npe_c)) { |
429 | npe_load_firmware(npe_c, npe_name(npe_c), dev); | 430 | ret = npe_load_firmware(npe_c, npe_name(npe_c), dev); |
431 | if (ret) { | ||
432 | return ret; | ||
433 | } | ||
434 | if (npe_recv_message(npe_c, msg, "STATUS_MSG")) | ||
435 | goto npe_error; | ||
436 | } else { | ||
437 | if (npe_send_message(npe_c, msg, "STATUS_MSG")) | ||
438 | goto npe_error; | ||
439 | |||
440 | if (npe_recv_message(npe_c, msg, "STATUS_MSG")) | ||
441 | goto npe_error; | ||
430 | } | 442 | } |
431 | 443 | ||
444 | switch ((msg[1]>>16) & 0xff) { | ||
445 | case 3: | ||
446 | printk(KERN_WARNING "Firmware of %s lacks AES support\n", | ||
447 | npe_name(npe_c)); | ||
448 | support_aes = 0; | ||
449 | break; | ||
450 | case 4: | ||
451 | case 5: | ||
452 | support_aes = 1; | ||
453 | break; | ||
454 | default: | ||
455 | printk(KERN_ERR "Firmware of %s lacks crypto support\n", | ||
456 | npe_name(npe_c)); | ||
457 | return -ENODEV; | ||
458 | } | ||
432 | /* buffer_pool will also be used to sometimes store the hmac, | 459 | /* buffer_pool will also be used to sometimes store the hmac, |
433 | * so assure it is large enough | 460 | * so assure it is large enough |
434 | */ | 461 | */ |
@@ -459,6 +486,10 @@ static int init_ixp_crypto(void) | |||
459 | 486 | ||
460 | qmgr_enable_irq(RECV_QID); | 487 | qmgr_enable_irq(RECV_QID); |
461 | return 0; | 488 | return 0; |
489 | |||
490 | npe_error: | ||
491 | printk(KERN_ERR "%s not responding\n", npe_name(npe_c)); | ||
492 | ret = -EIO; | ||
462 | err: | 493 | err: |
463 | if (ctx_pool) | 494 | if (ctx_pool) |
464 | dma_pool_destroy(ctx_pool); | 495 | dma_pool_destroy(ctx_pool); |
diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c index 3f0fdd18255d..856b3cc25583 100644 --- a/drivers/crypto/padlock-aes.c +++ b/drivers/crypto/padlock-aes.c | |||
@@ -489,4 +489,4 @@ MODULE_DESCRIPTION("VIA PadLock AES algorithm support"); | |||
489 | MODULE_LICENSE("GPL"); | 489 | MODULE_LICENSE("GPL"); |
490 | MODULE_AUTHOR("Michal Ludvig"); | 490 | MODULE_AUTHOR("Michal Ludvig"); |
491 | 491 | ||
492 | MODULE_ALIAS("aes-all"); | 492 | MODULE_ALIAS("aes"); |
diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c index 7793932a513b..11a6248cc1c1 100644 --- a/drivers/mfd/pcf50633-core.c +++ b/drivers/mfd/pcf50633-core.c | |||
@@ -443,7 +443,7 @@ static irqreturn_t pcf50633_irq(int irq, void *data) | |||
443 | dev_dbg(pcf->dev, "pcf50633_irq\n"); | 443 | dev_dbg(pcf->dev, "pcf50633_irq\n"); |
444 | 444 | ||
445 | get_device(pcf->dev); | 445 | get_device(pcf->dev); |
446 | disable_irq(pcf->irq); | 446 | disable_irq_nosync(pcf->irq); |
447 | schedule_work(&pcf->irq_work); | 447 | schedule_work(&pcf->irq_work); |
448 | 448 | ||
449 | return IRQ_HANDLED; | 449 | return IRQ_HANDLED; |
diff --git a/drivers/mfd/wm8350-core.c b/drivers/mfd/wm8350-core.c index c2be3088e2e1..fe24079387c5 100644 --- a/drivers/mfd/wm8350-core.c +++ b/drivers/mfd/wm8350-core.c | |||
@@ -79,10 +79,6 @@ static int wm8350_phys_read(struct wm8350 *wm8350, u8 reg, int num_regs, | |||
79 | /* Cache is CPU endian */ | 79 | /* Cache is CPU endian */ |
80 | dest[i - reg] = be16_to_cpu(dest[i - reg]); | 80 | dest[i - reg] = be16_to_cpu(dest[i - reg]); |
81 | 81 | ||
82 | /* Satisfy non-volatile bits from cache */ | ||
83 | dest[i - reg] &= wm8350_reg_io_map[i].vol; | ||
84 | dest[i - reg] |= wm8350->reg_cache[i]; | ||
85 | |||
86 | /* Mask out non-readable bits */ | 82 | /* Mask out non-readable bits */ |
87 | dest[i - reg] &= wm8350_reg_io_map[i].readable; | 83 | dest[i - reg] &= wm8350_reg_io_map[i].readable; |
88 | } | 84 | } |
@@ -182,9 +178,6 @@ static int wm8350_write(struct wm8350 *wm8350, u8 reg, int num_regs, u16 *src) | |||
182 | (wm8350->reg_cache[i] & ~wm8350_reg_io_map[i].writable) | 178 | (wm8350->reg_cache[i] & ~wm8350_reg_io_map[i].writable) |
183 | | src[i - reg]; | 179 | | src[i - reg]; |
184 | 180 | ||
185 | /* Don't store volatile bits */ | ||
186 | wm8350->reg_cache[i] &= ~wm8350_reg_io_map[i].vol; | ||
187 | |||
188 | src[i - reg] = cpu_to_be16(src[i - reg]); | 181 | src[i - reg] = cpu_to_be16(src[i - reg]); |
189 | } | 182 | } |
190 | 183 | ||
@@ -1261,7 +1254,6 @@ static int wm8350_create_cache(struct wm8350 *wm8350, int type, int mode) | |||
1261 | (i < WM8350_CLOCK_CONTROL_1 || i > WM8350_AIF_TEST)) { | 1254 | (i < WM8350_CLOCK_CONTROL_1 || i > WM8350_AIF_TEST)) { |
1262 | value = be16_to_cpu(wm8350->reg_cache[i]); | 1255 | value = be16_to_cpu(wm8350->reg_cache[i]); |
1263 | value &= wm8350_reg_io_map[i].readable; | 1256 | value &= wm8350_reg_io_map[i].readable; |
1264 | value &= ~wm8350_reg_io_map[i].vol; | ||
1265 | wm8350->reg_cache[i] = value; | 1257 | wm8350->reg_cache[i] = value; |
1266 | } else | 1258 | } else |
1267 | wm8350->reg_cache[i] = reg_map[i]; | 1259 | wm8350->reg_cache[i] = reg_map[i]; |
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index 62dee54af0a5..43976aa4dbb1 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c | |||
@@ -178,7 +178,7 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr) | |||
178 | /* Calculate flash page address; use block erase (for speed) if | 178 | /* Calculate flash page address; use block erase (for speed) if |
179 | * we're at a block boundary and need to erase the whole block. | 179 | * we're at a block boundary and need to erase the whole block. |
180 | */ | 180 | */ |
181 | pageaddr = div_u64(instr->len, priv->page_size); | 181 | pageaddr = div_u64(instr->addr, priv->page_size); |
182 | do_block = (pageaddr & 0x7) == 0 && instr->len >= blocksize; | 182 | do_block = (pageaddr & 0x7) == 0 && instr->len >= blocksize; |
183 | pageaddr = pageaddr << priv->page_offset; | 183 | pageaddr = pageaddr << priv->page_offset; |
184 | 184 | ||
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h index c49ddd08b2aa..b4bb06fdf307 100644 --- a/drivers/net/benet/be.h +++ b/drivers/net/benet/be.h | |||
@@ -35,8 +35,22 @@ | |||
35 | #define DRV_VER "2.0.348" | 35 | #define DRV_VER "2.0.348" |
36 | #define DRV_NAME "be2net" | 36 | #define DRV_NAME "be2net" |
37 | #define BE_NAME "ServerEngines BladeEngine2 10Gbps NIC" | 37 | #define BE_NAME "ServerEngines BladeEngine2 10Gbps NIC" |
38 | #define OC_NAME "Emulex OneConnect 10Gbps NIC" | ||
38 | #define DRV_DESC BE_NAME "Driver" | 39 | #define DRV_DESC BE_NAME "Driver" |
39 | 40 | ||
41 | #define BE_VENDOR_ID 0x19a2 | ||
42 | #define BE_DEVICE_ID1 0x211 | ||
43 | #define OC_DEVICE_ID1 0x700 | ||
44 | #define OC_DEVICE_ID2 0x701 | ||
45 | |||
46 | static inline char *nic_name(struct pci_dev *pdev) | ||
47 | { | ||
48 | if (pdev->device == OC_DEVICE_ID1 || pdev->device == OC_DEVICE_ID2) | ||
49 | return OC_NAME; | ||
50 | else | ||
51 | return BE_NAME; | ||
52 | } | ||
53 | |||
40 | /* Number of bytes of an RX frame that are copied to skb->data */ | 54 | /* Number of bytes of an RX frame that are copied to skb->data */ |
41 | #define BE_HDR_LEN 64 | 55 | #define BE_HDR_LEN 64 |
42 | #define BE_MAX_JUMBO_FRAME_SIZE 9018 | 56 | #define BE_MAX_JUMBO_FRAME_SIZE 9018 |
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 30d0c81c989e..5c378b5e8e41 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -28,10 +28,10 @@ static unsigned int rx_frag_size = 2048; | |||
28 | module_param(rx_frag_size, uint, S_IRUGO); | 28 | module_param(rx_frag_size, uint, S_IRUGO); |
29 | MODULE_PARM_DESC(rx_frag_size, "Size of a fragment that holds rcvd data."); | 29 | MODULE_PARM_DESC(rx_frag_size, "Size of a fragment that holds rcvd data."); |
30 | 30 | ||
31 | #define BE_VENDOR_ID 0x19a2 | ||
32 | #define BE2_DEVICE_ID_1 0x0211 | ||
33 | static DEFINE_PCI_DEVICE_TABLE(be_dev_ids) = { | 31 | static DEFINE_PCI_DEVICE_TABLE(be_dev_ids) = { |
34 | { PCI_DEVICE(BE_VENDOR_ID, BE2_DEVICE_ID_1) }, | 32 | { PCI_DEVICE(BE_VENDOR_ID, BE_DEVICE_ID1) }, |
33 | { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID1) }, | ||
34 | { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID2) }, | ||
35 | { 0 } | 35 | { 0 } |
36 | }; | 36 | }; |
37 | MODULE_DEVICE_TABLE(pci, be_dev_ids); | 37 | MODULE_DEVICE_TABLE(pci, be_dev_ids); |
@@ -1859,7 +1859,7 @@ static int __devinit be_probe(struct pci_dev *pdev, | |||
1859 | if (status != 0) | 1859 | if (status != 0) |
1860 | goto stats_clean; | 1860 | goto stats_clean; |
1861 | 1861 | ||
1862 | dev_info(&pdev->dev, BE_NAME " port %d\n", adapter->port_num); | 1862 | dev_info(&pdev->dev, "%s port %d\n", nic_name(pdev), adapter->port_num); |
1863 | return 0; | 1863 | return 0; |
1864 | 1864 | ||
1865 | stats_clean: | 1865 | stats_clean: |
@@ -1873,7 +1873,7 @@ rel_reg: | |||
1873 | disable_dev: | 1873 | disable_dev: |
1874 | pci_disable_device(pdev); | 1874 | pci_disable_device(pdev); |
1875 | do_none: | 1875 | do_none: |
1876 | dev_warn(&pdev->dev, BE_NAME " initialization failed\n"); | 1876 | dev_err(&pdev->dev, "%s initialization failed\n", nic_name(pdev)); |
1877 | return status; | 1877 | return status; |
1878 | } | 1878 | } |
1879 | 1879 | ||
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 8c2e5ab51f08..faf094abef7f 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
@@ -1465,6 +1465,12 @@ static struct aggregator *ad_agg_selection_test(struct aggregator *best, | |||
1465 | return best; | 1465 | return best; |
1466 | } | 1466 | } |
1467 | 1467 | ||
1468 | static int agg_device_up(const struct aggregator *agg) | ||
1469 | { | ||
1470 | return (netif_running(agg->slave->dev) && | ||
1471 | netif_carrier_ok(agg->slave->dev)); | ||
1472 | } | ||
1473 | |||
1468 | /** | 1474 | /** |
1469 | * ad_agg_selection_logic - select an aggregation group for a team | 1475 | * ad_agg_selection_logic - select an aggregation group for a team |
1470 | * @aggregator: the aggregator we're looking at | 1476 | * @aggregator: the aggregator we're looking at |
@@ -1496,14 +1502,13 @@ static void ad_agg_selection_logic(struct aggregator *agg) | |||
1496 | struct port *port; | 1502 | struct port *port; |
1497 | 1503 | ||
1498 | origin = agg; | 1504 | origin = agg; |
1499 | |||
1500 | active = __get_active_agg(agg); | 1505 | active = __get_active_agg(agg); |
1501 | best = active; | 1506 | best = (active && agg_device_up(active)) ? active : NULL; |
1502 | 1507 | ||
1503 | do { | 1508 | do { |
1504 | agg->is_active = 0; | 1509 | agg->is_active = 0; |
1505 | 1510 | ||
1506 | if (agg->num_of_ports) | 1511 | if (agg->num_of_ports && agg_device_up(agg)) |
1507 | best = ad_agg_selection_test(best, agg); | 1512 | best = ad_agg_selection_test(best, agg); |
1508 | 1513 | ||
1509 | } while ((agg = __get_next_agg(agg))); | 1514 | } while ((agg = __get_next_agg(agg))); |
diff --git a/drivers/net/meth.c b/drivers/net/meth.c index aa08987f6e81..dbd3436912b8 100644 --- a/drivers/net/meth.c +++ b/drivers/net/meth.c | |||
@@ -127,11 +127,11 @@ static unsigned long mdio_read(struct meth_private *priv, unsigned long phyreg) | |||
127 | static int mdio_probe(struct meth_private *priv) | 127 | static int mdio_probe(struct meth_private *priv) |
128 | { | 128 | { |
129 | int i; | 129 | int i; |
130 | unsigned long p2, p3; | 130 | unsigned long p2, p3, flags; |
131 | /* check if phy is detected already */ | 131 | /* check if phy is detected already */ |
132 | if(priv->phy_addr>=0&&priv->phy_addr<32) | 132 | if(priv->phy_addr>=0&&priv->phy_addr<32) |
133 | return 0; | 133 | return 0; |
134 | spin_lock(&priv->meth_lock); | 134 | spin_lock_irqsave(&priv->meth_lock, flags); |
135 | for (i=0;i<32;++i){ | 135 | for (i=0;i<32;++i){ |
136 | priv->phy_addr=i; | 136 | priv->phy_addr=i; |
137 | p2=mdio_read(priv,2); | 137 | p2=mdio_read(priv,2); |
@@ -157,7 +157,7 @@ static int mdio_probe(struct meth_private *priv) | |||
157 | break; | 157 | break; |
158 | } | 158 | } |
159 | } | 159 | } |
160 | spin_unlock(&priv->meth_lock); | 160 | spin_unlock_irqrestore(&priv->meth_lock, flags); |
161 | if(priv->phy_addr<32) { | 161 | if(priv->phy_addr<32) { |
162 | return 0; | 162 | return 0; |
163 | } | 163 | } |
@@ -373,14 +373,14 @@ static int meth_release(struct net_device *dev) | |||
373 | static void meth_rx(struct net_device* dev, unsigned long int_status) | 373 | static void meth_rx(struct net_device* dev, unsigned long int_status) |
374 | { | 374 | { |
375 | struct sk_buff *skb; | 375 | struct sk_buff *skb; |
376 | unsigned long status; | 376 | unsigned long status, flags; |
377 | struct meth_private *priv = netdev_priv(dev); | 377 | struct meth_private *priv = netdev_priv(dev); |
378 | unsigned long fifo_rptr = (int_status & METH_INT_RX_RPTR_MASK) >> 8; | 378 | unsigned long fifo_rptr = (int_status & METH_INT_RX_RPTR_MASK) >> 8; |
379 | 379 | ||
380 | spin_lock(&priv->meth_lock); | 380 | spin_lock_irqsave(&priv->meth_lock, flags); |
381 | priv->dma_ctrl &= ~METH_DMA_RX_INT_EN; | 381 | priv->dma_ctrl &= ~METH_DMA_RX_INT_EN; |
382 | mace->eth.dma_ctrl = priv->dma_ctrl; | 382 | mace->eth.dma_ctrl = priv->dma_ctrl; |
383 | spin_unlock(&priv->meth_lock); | 383 | spin_unlock_irqrestore(&priv->meth_lock, flags); |
384 | 384 | ||
385 | if (int_status & METH_INT_RX_UNDERFLOW) { | 385 | if (int_status & METH_INT_RX_UNDERFLOW) { |
386 | fifo_rptr = (fifo_rptr - 1) & 0x0f; | 386 | fifo_rptr = (fifo_rptr - 1) & 0x0f; |
@@ -452,12 +452,12 @@ static void meth_rx(struct net_device* dev, unsigned long int_status) | |||
452 | mace->eth.rx_fifo = priv->rx_ring_dmas[priv->rx_write]; | 452 | mace->eth.rx_fifo = priv->rx_ring_dmas[priv->rx_write]; |
453 | ADVANCE_RX_PTR(priv->rx_write); | 453 | ADVANCE_RX_PTR(priv->rx_write); |
454 | } | 454 | } |
455 | spin_lock(&priv->meth_lock); | 455 | spin_lock_irqsave(&priv->meth_lock, flags); |
456 | /* In case there was underflow, and Rx DMA was disabled */ | 456 | /* In case there was underflow, and Rx DMA was disabled */ |
457 | priv->dma_ctrl |= METH_DMA_RX_INT_EN | METH_DMA_RX_EN; | 457 | priv->dma_ctrl |= METH_DMA_RX_INT_EN | METH_DMA_RX_EN; |
458 | mace->eth.dma_ctrl = priv->dma_ctrl; | 458 | mace->eth.dma_ctrl = priv->dma_ctrl; |
459 | mace->eth.int_stat = METH_INT_RX_THRESHOLD; | 459 | mace->eth.int_stat = METH_INT_RX_THRESHOLD; |
460 | spin_unlock(&priv->meth_lock); | 460 | spin_unlock_irqrestore(&priv->meth_lock, flags); |
461 | } | 461 | } |
462 | 462 | ||
463 | static int meth_tx_full(struct net_device *dev) | 463 | static int meth_tx_full(struct net_device *dev) |
@@ -470,11 +470,11 @@ static int meth_tx_full(struct net_device *dev) | |||
470 | static void meth_tx_cleanup(struct net_device* dev, unsigned long int_status) | 470 | static void meth_tx_cleanup(struct net_device* dev, unsigned long int_status) |
471 | { | 471 | { |
472 | struct meth_private *priv = netdev_priv(dev); | 472 | struct meth_private *priv = netdev_priv(dev); |
473 | unsigned long status; | 473 | unsigned long status, flags; |
474 | struct sk_buff *skb; | 474 | struct sk_buff *skb; |
475 | unsigned long rptr = (int_status&TX_INFO_RPTR) >> 16; | 475 | unsigned long rptr = (int_status&TX_INFO_RPTR) >> 16; |
476 | 476 | ||
477 | spin_lock(&priv->meth_lock); | 477 | spin_lock_irqsave(&priv->meth_lock, flags); |
478 | 478 | ||
479 | /* Stop DMA notification */ | 479 | /* Stop DMA notification */ |
480 | priv->dma_ctrl &= ~(METH_DMA_TX_INT_EN); | 480 | priv->dma_ctrl &= ~(METH_DMA_TX_INT_EN); |
@@ -527,12 +527,13 @@ static void meth_tx_cleanup(struct net_device* dev, unsigned long int_status) | |||
527 | } | 527 | } |
528 | 528 | ||
529 | mace->eth.int_stat = METH_INT_TX_EMPTY | METH_INT_TX_PKT; | 529 | mace->eth.int_stat = METH_INT_TX_EMPTY | METH_INT_TX_PKT; |
530 | spin_unlock(&priv->meth_lock); | 530 | spin_unlock_irqrestore(&priv->meth_lock, flags); |
531 | } | 531 | } |
532 | 532 | ||
533 | static void meth_error(struct net_device* dev, unsigned status) | 533 | static void meth_error(struct net_device* dev, unsigned status) |
534 | { | 534 | { |
535 | struct meth_private *priv = netdev_priv(dev); | 535 | struct meth_private *priv = netdev_priv(dev); |
536 | unsigned long flags; | ||
536 | 537 | ||
537 | printk(KERN_WARNING "meth: error status: 0x%08x\n",status); | 538 | printk(KERN_WARNING "meth: error status: 0x%08x\n",status); |
538 | /* check for errors too... */ | 539 | /* check for errors too... */ |
@@ -547,7 +548,7 @@ static void meth_error(struct net_device* dev, unsigned status) | |||
547 | printk(KERN_WARNING "meth: Rx overflow\n"); | 548 | printk(KERN_WARNING "meth: Rx overflow\n"); |
548 | if (status & (METH_INT_RX_UNDERFLOW)) { | 549 | if (status & (METH_INT_RX_UNDERFLOW)) { |
549 | printk(KERN_WARNING "meth: Rx underflow\n"); | 550 | printk(KERN_WARNING "meth: Rx underflow\n"); |
550 | spin_lock(&priv->meth_lock); | 551 | spin_lock_irqsave(&priv->meth_lock, flags); |
551 | mace->eth.int_stat = METH_INT_RX_UNDERFLOW; | 552 | mace->eth.int_stat = METH_INT_RX_UNDERFLOW; |
552 | /* more underflow interrupts will be delivered, | 553 | /* more underflow interrupts will be delivered, |
553 | * effectively throwing us into an infinite loop. | 554 | * effectively throwing us into an infinite loop. |
@@ -555,7 +556,7 @@ static void meth_error(struct net_device* dev, unsigned status) | |||
555 | priv->dma_ctrl &= ~METH_DMA_RX_EN; | 556 | priv->dma_ctrl &= ~METH_DMA_RX_EN; |
556 | mace->eth.dma_ctrl = priv->dma_ctrl; | 557 | mace->eth.dma_ctrl = priv->dma_ctrl; |
557 | DPRINTK("Disabled meth Rx DMA temporarily\n"); | 558 | DPRINTK("Disabled meth Rx DMA temporarily\n"); |
558 | spin_unlock(&priv->meth_lock); | 559 | spin_unlock_irqrestore(&priv->meth_lock, flags); |
559 | } | 560 | } |
560 | mace->eth.int_stat = METH_INT_ERROR; | 561 | mace->eth.int_stat = METH_INT_ERROR; |
561 | } | 562 | } |
diff --git a/drivers/net/mlx4/en_cq.c b/drivers/net/mlx4/en_cq.c index 91f50de84be9..a276125b709b 100644 --- a/drivers/net/mlx4/en_cq.c +++ b/drivers/net/mlx4/en_cq.c | |||
@@ -125,8 +125,10 @@ void mlx4_en_deactivate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq) | |||
125 | 125 | ||
126 | if (cq->is_tx) | 126 | if (cq->is_tx) |
127 | del_timer(&cq->timer); | 127 | del_timer(&cq->timer); |
128 | else | 128 | else { |
129 | napi_disable(&cq->napi); | 129 | napi_disable(&cq->napi); |
130 | netif_napi_del(&cq->napi); | ||
131 | } | ||
130 | 132 | ||
131 | mlx4_cq_free(mdev->dev, &cq->mcq); | 133 | mlx4_cq_free(mdev->dev, &cq->mcq); |
132 | } | 134 | } |
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index a400d7115f78..6bb5af35eda6 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -569,7 +569,7 @@ static int rxq_process(struct rx_queue *rxq, int budget) | |||
569 | if (rxq->rx_curr_desc == rxq->rx_ring_size) | 569 | if (rxq->rx_curr_desc == rxq->rx_ring_size) |
570 | rxq->rx_curr_desc = 0; | 570 | rxq->rx_curr_desc = 0; |
571 | 571 | ||
572 | dma_unmap_single(NULL, rx_desc->buf_ptr, | 572 | dma_unmap_single(mp->dev->dev.parent, rx_desc->buf_ptr, |
573 | rx_desc->buf_size, DMA_FROM_DEVICE); | 573 | rx_desc->buf_size, DMA_FROM_DEVICE); |
574 | rxq->rx_desc_count--; | 574 | rxq->rx_desc_count--; |
575 | rx++; | 575 | rx++; |
@@ -678,8 +678,9 @@ static int rxq_refill(struct rx_queue *rxq, int budget) | |||
678 | 678 | ||
679 | rx_desc = rxq->rx_desc_area + rx; | 679 | rx_desc = rxq->rx_desc_area + rx; |
680 | 680 | ||
681 | rx_desc->buf_ptr = dma_map_single(NULL, skb->data, | 681 | rx_desc->buf_ptr = dma_map_single(mp->dev->dev.parent, |
682 | mp->skb_size, DMA_FROM_DEVICE); | 682 | skb->data, mp->skb_size, |
683 | DMA_FROM_DEVICE); | ||
683 | rx_desc->buf_size = mp->skb_size; | 684 | rx_desc->buf_size = mp->skb_size; |
684 | rxq->rx_skb[rx] = skb; | 685 | rxq->rx_skb[rx] = skb; |
685 | wmb(); | 686 | wmb(); |
@@ -718,6 +719,7 @@ static inline unsigned int has_tiny_unaligned_frags(struct sk_buff *skb) | |||
718 | 719 | ||
719 | static void txq_submit_frag_skb(struct tx_queue *txq, struct sk_buff *skb) | 720 | static void txq_submit_frag_skb(struct tx_queue *txq, struct sk_buff *skb) |
720 | { | 721 | { |
722 | struct mv643xx_eth_private *mp = txq_to_mp(txq); | ||
721 | int nr_frags = skb_shinfo(skb)->nr_frags; | 723 | int nr_frags = skb_shinfo(skb)->nr_frags; |
722 | int frag; | 724 | int frag; |
723 | 725 | ||
@@ -746,10 +748,10 @@ static void txq_submit_frag_skb(struct tx_queue *txq, struct sk_buff *skb) | |||
746 | 748 | ||
747 | desc->l4i_chk = 0; | 749 | desc->l4i_chk = 0; |
748 | desc->byte_cnt = this_frag->size; | 750 | desc->byte_cnt = this_frag->size; |
749 | desc->buf_ptr = dma_map_page(NULL, this_frag->page, | 751 | desc->buf_ptr = dma_map_page(mp->dev->dev.parent, |
750 | this_frag->page_offset, | 752 | this_frag->page, |
751 | this_frag->size, | 753 | this_frag->page_offset, |
752 | DMA_TO_DEVICE); | 754 | this_frag->size, DMA_TO_DEVICE); |
753 | } | 755 | } |
754 | } | 756 | } |
755 | 757 | ||
@@ -826,7 +828,8 @@ no_csum: | |||
826 | 828 | ||
827 | desc->l4i_chk = l4i_chk; | 829 | desc->l4i_chk = l4i_chk; |
828 | desc->byte_cnt = length; | 830 | desc->byte_cnt = length; |
829 | desc->buf_ptr = dma_map_single(NULL, skb->data, length, DMA_TO_DEVICE); | 831 | desc->buf_ptr = dma_map_single(mp->dev->dev.parent, skb->data, |
832 | length, DMA_TO_DEVICE); | ||
830 | 833 | ||
831 | __skb_queue_tail(&txq->tx_skb, skb); | 834 | __skb_queue_tail(&txq->tx_skb, skb); |
832 | 835 | ||
@@ -956,10 +959,10 @@ static int txq_reclaim(struct tx_queue *txq, int budget, int force) | |||
956 | } | 959 | } |
957 | 960 | ||
958 | if (cmd_sts & TX_FIRST_DESC) { | 961 | if (cmd_sts & TX_FIRST_DESC) { |
959 | dma_unmap_single(NULL, desc->buf_ptr, | 962 | dma_unmap_single(mp->dev->dev.parent, desc->buf_ptr, |
960 | desc->byte_cnt, DMA_TO_DEVICE); | 963 | desc->byte_cnt, DMA_TO_DEVICE); |
961 | } else { | 964 | } else { |
962 | dma_unmap_page(NULL, desc->buf_ptr, | 965 | dma_unmap_page(mp->dev->dev.parent, desc->buf_ptr, |
963 | desc->byte_cnt, DMA_TO_DEVICE); | 966 | desc->byte_cnt, DMA_TO_DEVICE); |
964 | } | 967 | } |
965 | 968 | ||
@@ -1894,9 +1897,9 @@ static int rxq_init(struct mv643xx_eth_private *mp, int index) | |||
1894 | mp->rx_desc_sram_size); | 1897 | mp->rx_desc_sram_size); |
1895 | rxq->rx_desc_dma = mp->rx_desc_sram_addr; | 1898 | rxq->rx_desc_dma = mp->rx_desc_sram_addr; |
1896 | } else { | 1899 | } else { |
1897 | rxq->rx_desc_area = dma_alloc_coherent(NULL, size, | 1900 | rxq->rx_desc_area = dma_alloc_coherent(mp->dev->dev.parent, |
1898 | &rxq->rx_desc_dma, | 1901 | size, &rxq->rx_desc_dma, |
1899 | GFP_KERNEL); | 1902 | GFP_KERNEL); |
1900 | } | 1903 | } |
1901 | 1904 | ||
1902 | if (rxq->rx_desc_area == NULL) { | 1905 | if (rxq->rx_desc_area == NULL) { |
@@ -1947,7 +1950,7 @@ out_free: | |||
1947 | if (index == 0 && size <= mp->rx_desc_sram_size) | 1950 | if (index == 0 && size <= mp->rx_desc_sram_size) |
1948 | iounmap(rxq->rx_desc_area); | 1951 | iounmap(rxq->rx_desc_area); |
1949 | else | 1952 | else |
1950 | dma_free_coherent(NULL, size, | 1953 | dma_free_coherent(mp->dev->dev.parent, size, |
1951 | rxq->rx_desc_area, | 1954 | rxq->rx_desc_area, |
1952 | rxq->rx_desc_dma); | 1955 | rxq->rx_desc_dma); |
1953 | 1956 | ||
@@ -1979,7 +1982,7 @@ static void rxq_deinit(struct rx_queue *rxq) | |||
1979 | rxq->rx_desc_area_size <= mp->rx_desc_sram_size) | 1982 | rxq->rx_desc_area_size <= mp->rx_desc_sram_size) |
1980 | iounmap(rxq->rx_desc_area); | 1983 | iounmap(rxq->rx_desc_area); |
1981 | else | 1984 | else |
1982 | dma_free_coherent(NULL, rxq->rx_desc_area_size, | 1985 | dma_free_coherent(mp->dev->dev.parent, rxq->rx_desc_area_size, |
1983 | rxq->rx_desc_area, rxq->rx_desc_dma); | 1986 | rxq->rx_desc_area, rxq->rx_desc_dma); |
1984 | 1987 | ||
1985 | kfree(rxq->rx_skb); | 1988 | kfree(rxq->rx_skb); |
@@ -2007,9 +2010,9 @@ static int txq_init(struct mv643xx_eth_private *mp, int index) | |||
2007 | mp->tx_desc_sram_size); | 2010 | mp->tx_desc_sram_size); |
2008 | txq->tx_desc_dma = mp->tx_desc_sram_addr; | 2011 | txq->tx_desc_dma = mp->tx_desc_sram_addr; |
2009 | } else { | 2012 | } else { |
2010 | txq->tx_desc_area = dma_alloc_coherent(NULL, size, | 2013 | txq->tx_desc_area = dma_alloc_coherent(mp->dev->dev.parent, |
2011 | &txq->tx_desc_dma, | 2014 | size, &txq->tx_desc_dma, |
2012 | GFP_KERNEL); | 2015 | GFP_KERNEL); |
2013 | } | 2016 | } |
2014 | 2017 | ||
2015 | if (txq->tx_desc_area == NULL) { | 2018 | if (txq->tx_desc_area == NULL) { |
@@ -2053,7 +2056,7 @@ static void txq_deinit(struct tx_queue *txq) | |||
2053 | txq->tx_desc_area_size <= mp->tx_desc_sram_size) | 2056 | txq->tx_desc_area_size <= mp->tx_desc_sram_size) |
2054 | iounmap(txq->tx_desc_area); | 2057 | iounmap(txq->tx_desc_area); |
2055 | else | 2058 | else |
2056 | dma_free_coherent(NULL, txq->tx_desc_area_size, | 2059 | dma_free_coherent(mp->dev->dev.parent, txq->tx_desc_area_size, |
2057 | txq->tx_desc_area, txq->tx_desc_dma); | 2060 | txq->tx_desc_area, txq->tx_desc_dma); |
2058 | } | 2061 | } |
2059 | 2062 | ||
diff --git a/drivers/net/vxge/vxge-traffic.c b/drivers/net/vxge/vxge-traffic.c index 7be0ae10d69b..c2eeac4125f3 100644 --- a/drivers/net/vxge/vxge-traffic.c +++ b/drivers/net/vxge/vxge-traffic.c | |||
@@ -115,7 +115,7 @@ enum vxge_hw_status vxge_hw_vpath_intr_enable(struct __vxge_hw_vpath_handle *vp) | |||
115 | VXGE_HW_KDFCCTL_ERRORS_REG_KDFCCTL_FIFO1_POISON| | 115 | VXGE_HW_KDFCCTL_ERRORS_REG_KDFCCTL_FIFO1_POISON| |
116 | VXGE_HW_KDFCCTL_ERRORS_REG_KDFCCTL_FIFO2_POISON| | 116 | VXGE_HW_KDFCCTL_ERRORS_REG_KDFCCTL_FIFO2_POISON| |
117 | VXGE_HW_KDFCCTL_ERRORS_REG_KDFCCTL_FIFO1_DMA_ERR| | 117 | VXGE_HW_KDFCCTL_ERRORS_REG_KDFCCTL_FIFO1_DMA_ERR| |
118 | VXGE_HW_KDFCCTL_ERRORS_REG_KDFCCTL_FIFO1_DMA_ERR), 0, 32), | 118 | VXGE_HW_KDFCCTL_ERRORS_REG_KDFCCTL_FIFO2_DMA_ERR), 0, 32), |
119 | &vp_reg->kdfcctl_errors_mask); | 119 | &vp_reg->kdfcctl_errors_mask); |
120 | 120 | ||
121 | __vxge_hw_pio_mem_write32_upper(0, &vp_reg->vpath_ppif_int_mask); | 121 | __vxge_hw_pio_mem_write32_upper(0, &vp_reg->vpath_ppif_int_mask); |
diff --git a/drivers/net/wimax/i2400m/rx.c b/drivers/net/wimax/i2400m/rx.c index 02419bfd64b5..f9fc38902322 100644 --- a/drivers/net/wimax/i2400m/rx.c +++ b/drivers/net/wimax/i2400m/rx.c | |||
@@ -819,10 +819,9 @@ void i2400m_roq_queue_update_ws(struct i2400m *i2400m, struct i2400m_roq *roq, | |||
819 | roq_data = (struct i2400m_roq_data *) &skb->cb; | 819 | roq_data = (struct i2400m_roq_data *) &skb->cb; |
820 | i2400m_net_erx(i2400m, skb, roq_data->cs); | 820 | i2400m_net_erx(i2400m, skb, roq_data->cs); |
821 | } | 821 | } |
822 | else { | 822 | else |
823 | __i2400m_roq_queue(i2400m, roq, skb, sn, nsn); | 823 | __i2400m_roq_queue(i2400m, roq, skb, sn, nsn); |
824 | __i2400m_roq_update_ws(i2400m, roq, sn + 1); | 824 | __i2400m_roq_update_ws(i2400m, roq, sn + 1); |
825 | } | ||
826 | i2400m_roq_log_add(i2400m, roq, I2400M_RO_TYPE_PACKET_WS, | 825 | i2400m_roq_log_add(i2400m, roq, I2400M_RO_TYPE_PACKET_WS, |
827 | old_ws, len, sn, nsn, roq->ws); | 826 | old_ws, len, sn, nsn, roq->ws); |
828 | } | 827 | } |
diff --git a/drivers/regulator/da903x.c b/drivers/regulator/da903x.c index 72b15495183c..c6628f5a0af7 100644 --- a/drivers/regulator/da903x.c +++ b/drivers/regulator/da903x.c | |||
@@ -497,7 +497,7 @@ static struct platform_driver da903x_regulator_driver = { | |||
497 | .owner = THIS_MODULE, | 497 | .owner = THIS_MODULE, |
498 | }, | 498 | }, |
499 | .probe = da903x_regulator_probe, | 499 | .probe = da903x_regulator_probe, |
500 | .remove = da903x_regulator_remove, | 500 | .remove = __devexit_p(da903x_regulator_remove), |
501 | }; | 501 | }; |
502 | 502 | ||
503 | static int __init da903x_regulator_init(void) | 503 | static int __init da903x_regulator_init(void) |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 0ab8474b00cb..d9fcdaedf389 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -1487,14 +1487,7 @@ static int ftdi_sio_port_remove(struct usb_serial_port *port) | |||
1487 | 1487 | ||
1488 | remove_sysfs_attrs(port); | 1488 | remove_sysfs_attrs(port); |
1489 | 1489 | ||
1490 | /* all open ports are closed at this point | 1490 | kref_put(&priv->kref, ftdi_sio_priv_release); |
1491 | * (by usbserial.c:__serial_close, which calls ftdi_close) | ||
1492 | */ | ||
1493 | |||
1494 | if (priv) { | ||
1495 | usb_set_serial_port_data(port, NULL); | ||
1496 | kref_put(&priv->kref, ftdi_sio_priv_release); | ||
1497 | } | ||
1498 | 1491 | ||
1499 | return 0; | 1492 | return 0; |
1500 | } | 1493 | } |