aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorOlav Kongas <ok@artecdesign.ee>2005-04-21 10:12:59 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-27 17:43:42 -0400
commit589a0083a3c9e9610e54984998a46c07a2584b55 (patch)
tree285700641afef15c85a9c7ab275dd7d376fb05e0 /drivers
parent4808a1c0261176f9c7e28e7f108d41a381a7d0fc (diff)
[PATCH] USB: Fix oops at rmmod after failed probe in isp116x-hcd
This patch fixes an oops triggered at rmmod of isp116x-hcd after the probe() has failed. Also, it extends the error message printed, if the driver cannot detect "Chip's Clock Ready" after a software reset. As Ian Campbell recently reported, this happens if the chip's H_WAKEUP pin is not pulled low during software reset. Several people have already had this issue, hence the update to the error message. Also, extend the error message about the failed clock detection after the software reset. Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/isp116x-hcd.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c
index 69e7433d9ce8..1183988fdf54 100644
--- a/drivers/usb/host/isp116x-hcd.c
+++ b/drivers/usb/host/isp116x-hcd.c
@@ -1501,6 +1501,12 @@ static int isp116x_reset(struct usb_hcd *hcd)
1501 } 1501 }
1502 if (!clkrdy) { 1502 if (!clkrdy) {
1503 ERR("Clock not ready after 20ms\n"); 1503 ERR("Clock not ready after 20ms\n");
1504 /* After sw_reset the clock won't report to be ready, if
1505 H_WAKEUP pin is high. */
1506 if (!isp116x->board || !isp116x->board->reset)
1507 ERR("The driver does not support hardware wakeup.\n");
1508 ERR("Please make sure that the H_WAKEUP pin "
1509 "is pulled low!\n");
1504 ret = -ENODEV; 1510 ret = -ENODEV;
1505 } 1511 }
1506 return ret; 1512 return ret;
@@ -1678,10 +1684,13 @@ static struct hc_driver isp116x_hc_driver = {
1678static int __init_or_module isp116x_remove(struct device *dev) 1684static int __init_or_module isp116x_remove(struct device *dev)
1679{ 1685{
1680 struct usb_hcd *hcd = dev_get_drvdata(dev); 1686 struct usb_hcd *hcd = dev_get_drvdata(dev);
1681 struct isp116x *isp116x = hcd_to_isp116x(hcd); 1687 struct isp116x *isp116x;
1682 struct platform_device *pdev; 1688 struct platform_device *pdev;
1683 struct resource *res; 1689 struct resource *res;
1684 1690
1691 if(!hcd)
1692 return 0;
1693 isp116x = hcd_to_isp116x(hcd);
1685 pdev = container_of(dev, struct platform_device, dev); 1694 pdev = container_of(dev, struct platform_device, dev);
1686 remove_debug_file(isp116x); 1695 remove_debug_file(isp116x);
1687 usb_remove_hcd(hcd); 1696 usb_remove_hcd(hcd);