Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
USB: musb: MAINTAINERS: Fix my mail address
USB: serial/mos*: prevent reading uninitialized stack memory
USB: otg: twl4030: fix phy initialization(v1)
USB: EHCI: Disable langwell/penwell LPM capability
usb: musb_debugfs: don't use the struct file private_data field with seq_files

+68 -34
+2 -2
MAINTAINERS
··· 3942 3942 F: include/linux/isicom.h 3943 3943 3944 3944 MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER 3945 - M: Felipe Balbi <felipe.balbi@nokia.com> 3945 + M: Felipe Balbi <balbi@ti.com> 3946 3946 L: linux-usb@vger.kernel.org 3947 3947 T: git git://gitorious.org/usb/usb.git 3948 3948 S: Maintained ··· 4240 4240 F: drivers/char/hw_random/omap-rng.c 4241 4241 4242 4242 OMAP USB SUPPORT 4243 - M: Felipe Balbi <felipe.balbi@nokia.com> 4243 + M: Felipe Balbi <balbi@ti.com> 4244 4244 M: David Brownell <dbrownell@users.sourceforge.net> 4245 4245 L: linux-usb@vger.kernel.org 4246 4246 L: linux-omap@vger.kernel.org
+5
drivers/usb/host/ehci-pci.c
··· 119 119 ehci->broken_periodic = 1; 120 120 ehci_info(ehci, "using broken periodic workaround\n"); 121 121 } 122 + if (pdev->device == 0x0806 || pdev->device == 0x0811 123 + || pdev->device == 0x0829) { 124 + ehci_info(ehci, "disable lpm for langwell/penwell\n"); 125 + ehci->has_lpm = 0; 126 + } 122 127 break; 123 128 case PCI_VENDOR_ID_TDI: 124 129 if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {
+2 -3
drivers/usb/musb/musb_debugfs.c
··· 195 195 196 196 static int musb_test_mode_open(struct inode *inode, struct file *file) 197 197 { 198 - file->private_data = inode->i_private; 199 - 200 198 return single_open(file, musb_test_mode_show, inode->i_private); 201 199 } 202 200 203 201 static ssize_t musb_test_mode_write(struct file *file, 204 202 const char __user *ubuf, size_t count, loff_t *ppos) 205 203 { 206 - struct musb *musb = file->private_data; 204 + struct seq_file *s = file->private_data; 205 + struct musb *musb = s->private; 207 206 u8 test = 0; 208 207 char buf[18]; 209 208
+53 -29
drivers/usb/otg/twl4030-usb.c
··· 347 347 } 348 348 } 349 349 350 + static void __twl4030_phy_power(struct twl4030_usb *twl, int on) 351 + { 352 + u8 pwr = twl4030_usb_read(twl, PHY_PWR_CTRL); 353 + 354 + if (on) 355 + pwr &= ~PHY_PWR_PHYPWD; 356 + else 357 + pwr |= PHY_PWR_PHYPWD; 358 + 359 + WARN_ON(twl4030_usb_write_verify(twl, PHY_PWR_CTRL, pwr) < 0); 360 + } 361 + 350 362 static void twl4030_phy_power(struct twl4030_usb *twl, int on) 351 363 { 352 - u8 pwr; 353 - 354 - pwr = twl4030_usb_read(twl, PHY_PWR_CTRL); 355 364 if (on) { 356 365 regulator_enable(twl->usb3v1); 357 366 regulator_enable(twl->usb1v8); ··· 374 365 twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0, 375 366 VUSB_DEDICATED2); 376 367 regulator_enable(twl->usb1v5); 377 - pwr &= ~PHY_PWR_PHYPWD; 378 - WARN_ON(twl4030_usb_write_verify(twl, PHY_PWR_CTRL, pwr) < 0); 368 + __twl4030_phy_power(twl, 1); 379 369 twl4030_usb_write(twl, PHY_CLK_CTRL, 380 370 twl4030_usb_read(twl, PHY_CLK_CTRL) | 381 371 (PHY_CLK_CTRL_CLOCKGATING_EN | 382 372 PHY_CLK_CTRL_CLK32K_EN)); 383 - } else { 384 - pwr |= PHY_PWR_PHYPWD; 385 - WARN_ON(twl4030_usb_write_verify(twl, PHY_PWR_CTRL, pwr) < 0); 373 + } else { 374 + __twl4030_phy_power(twl, 0); 386 375 regulator_disable(twl->usb1v5); 387 376 regulator_disable(twl->usb1v8); 388 377 regulator_disable(twl->usb3v1); ··· 394 387 395 388 twl4030_phy_power(twl, 0); 396 389 twl->asleep = 1; 390 + dev_dbg(twl->dev, "%s\n", __func__); 391 + } 392 + 393 + static void __twl4030_phy_resume(struct twl4030_usb *twl) 394 + { 395 + twl4030_phy_power(twl, 1); 396 + twl4030_i2c_access(twl, 1); 397 + twl4030_usb_set_mode(twl, twl->usb_mode); 398 + if (twl->usb_mode == T2_USB_MODE_ULPI) 399 + twl4030_i2c_access(twl, 0); 397 400 } 398 401 399 402 static void twl4030_phy_resume(struct twl4030_usb *twl) 400 403 { 401 404 if (!twl->asleep) 402 405 return; 403 - 404 - twl4030_phy_power(twl, 1); 405 - twl4030_i2c_access(twl, 1); 406 - twl4030_usb_set_mode(twl, twl->usb_mode); 407 - if (twl->usb_mode == T2_USB_MODE_ULPI) 408 - twl4030_i2c_access(twl, 0); 406 + __twl4030_phy_resume(twl); 409 407 twl->asleep = 0; 408 + dev_dbg(twl->dev, "%s\n", __func__); 410 409 } 411 410 412 411 static int twl4030_usb_ldo_init(struct twl4030_usb *twl) ··· 421 408 twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, 0xC0, PROTECT_KEY); 422 409 twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, 0x0C, PROTECT_KEY); 423 410 424 - /* put VUSB3V1 LDO in active state */ 425 - twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0, VUSB_DEDICATED2); 411 + /* Keep VUSB3V1 LDO in sleep state until VBUS/ID change detected*/ 412 + /*twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0, VUSB_DEDICATED2);*/ 426 413 427 414 /* input to VUSB3V1 LDO is from VBAT, not VBUS */ 428 415 twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x14, VUSB_DEDICATED1); ··· 515 502 return IRQ_HANDLED; 516 503 } 517 504 505 + static void twl4030_usb_phy_init(struct twl4030_usb *twl) 506 + { 507 + int status; 508 + 509 + status = twl4030_usb_linkstat(twl); 510 + if (status >= 0) { 511 + if (status == USB_EVENT_NONE) { 512 + __twl4030_phy_power(twl, 0); 513 + twl->asleep = 1; 514 + } else { 515 + __twl4030_phy_resume(twl); 516 + twl->asleep = 0; 517 + } 518 + 519 + blocking_notifier_call_chain(&twl->otg.notifier, status, 520 + twl->otg.gadget); 521 + } 522 + sysfs_notify(&twl->dev->kobj, NULL, "vbus"); 523 + } 524 + 518 525 static int twl4030_set_suspend(struct otg_transceiver *x, int suspend) 519 526 { 520 527 struct twl4030_usb *twl = xceiv_to_twl(x); ··· 583 550 struct twl4030_usb_data *pdata = pdev->dev.platform_data; 584 551 struct twl4030_usb *twl; 585 552 int status, err; 586 - u8 pwr; 587 553 588 554 if (!pdata) { 589 555 dev_dbg(&pdev->dev, "platform_data not available\n"); ··· 601 569 twl->otg.set_peripheral = twl4030_set_peripheral; 602 570 twl->otg.set_suspend = twl4030_set_suspend; 603 571 twl->usb_mode = pdata->usb_mode; 604 - 605 - pwr = twl4030_usb_read(twl, PHY_PWR_CTRL); 606 - 607 - twl->asleep = (pwr & PHY_PWR_PHYPWD); 572 + twl->asleep = 1; 608 573 609 574 /* init spinlock for workqueue */ 610 575 spin_lock_init(&twl->lock); ··· 639 610 return status; 640 611 } 641 612 642 - /* The IRQ handler just handles changes from the previous states 643 - * of the ID and VBUS pins ... in probe() we must initialize that 644 - * previous state. The easy way: fake an IRQ. 645 - * 646 - * REVISIT: a real IRQ might have happened already, if PREEMPT is 647 - * enabled. Else the IRQ may not yet be configured or enabled, 648 - * because of scheduling delays. 613 + /* Power down phy or make it work according to 614 + * current link state. 649 615 */ 650 - twl4030_usb_irq(twl->irq, twl); 616 + twl4030_usb_phy_init(twl); 651 617 652 618 dev_info(&pdev->dev, "Initialized TWL4030 USB module\n"); 653 619 return 0;
+3
drivers/usb/serial/mos7720.c
··· 2024 2024 2025 2025 case TIOCGICOUNT: 2026 2026 cnow = mos7720_port->icount; 2027 + 2028 + memset(&icount, 0, sizeof(struct serial_icounter_struct)); 2029 + 2027 2030 icount.cts = cnow.cts; 2028 2031 icount.dsr = cnow.dsr; 2029 2032 icount.rng = cnow.rng;
+3
drivers/usb/serial/mos7840.c
··· 2285 2285 case TIOCGICOUNT: 2286 2286 cnow = mos7840_port->icount; 2287 2287 smp_rmb(); 2288 + 2289 + memset(&icount, 0, sizeof(struct serial_icounter_struct)); 2290 + 2288 2291 icount.cts = cnow.cts; 2289 2292 icount.dsr = cnow.dsr; 2290 2293 icount.rng = cnow.rng;