summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/isp1760-if.c
Commit message (Collapse)AuthorAgeFilesLines
* USB: remove optional bus bindings in isp1760, fixing runtime warningSebastian Andrzej Siewior2008-11-131-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Roland Reported the following: | kmem_cache_create: duplicate cache isp1760_qtd | Pid: 461, comm: modprobe Tainted: G W 2.6.28-rc2-git3-default #4 | Call Trace: | [<c017540e>] kmem_cache_create+0xc9/0x3a3 | [<c0159a8d>] free_pages_bulk+0x16c/0x1c9 | [<f165c05f>] isp1760_init+0x0/0xb [isp1760] | [<f165c018>] init_kmem_once+0x18/0x5f [isp1760] | [<f165c064>] isp1760_init+0x5/0xb [isp1760] | [<c010113d>] _stext+0x4d/0x148 | [<c0142936>] load_module+0x12cd/0x142e | [<c01743c4>] kmem_cache_destroy+0x0/0xd7 | [<c0142b1e>] sys_init_module+0x87/0x176 | [<c01039eb>] sysenter_do_call+0x12/0x2f The reason, is that ret is initialized with ENODEV instead of 0 _or_ the kmem cache is not freed in error case with no bus binding. The difference between OF+PCI and OF only is | 15148 804 32 15984 3e70 isp1760-of-pci.o | 13748 676 8 14432 3860 isp1760-of.o about 1.5 KiB. Until there is a checkbox where the user *must* select atleast one item, and may select multiple entries I don't make it selectable anymore. Having a driver which can't be used under any circumstances is broken anyway and I've seen distros shipping it that way. Reported-by: Roland Kletzing <devzero@web.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>a Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: remove err() macro from more usb driversGreg Kroah-Hartman2008-10-171-1/+1
| | | | | | | | | USB should not be having it's own printk macros, so remove err() and use the system-wide standard of dev_err() wherever possible. In the few places that will not work out, use a basic printk(). Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: isp1760: Use an IS_ERR test rather than a NULL testJulien Brunel2008-10-171-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of error, the function isp1760_register returns an ERR pointer, but never returns a NULL pointer. So after a call to this function, a NULL test should be replaced by an IS_ERR test. Moreover, we have noticed that: (1) the result of isp1760_register is assigned through the function pci_set_drvdata without an error test, (2) if the call to isp1760_register fails, the current function (isp1761_pci_probe) returns 0, and if it succeeds, it returns -ENOMEM, which seems odd. Thus, we suggest to move the test before the call to pci_set_drvdata to correct (1), and to turn it into a non IS_ERR test to correct (2). The semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @bad_null_test@ expression x,E; statement S1, S2; @@ x = isp1760_register(...) ... when != x = E * if (x == NULL) S1 else S2 // </smpl> Signed-off-by: Julien Brunel <brunel@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: isp1760: Support board-specific hardware configurationsNate Case2008-07-211-2/+33
| | | | | | | | | | | | | | This adds support for hardware configurations that don't match the chip default register settings (e.g., 16-bit data bus, DACK and DREQ pulled up instead of down, analog overcurrent mode). These settings are passed in via the OF device tree. The PCI interface still assumes the same default values. Signed-off-by: Nate Case <ncase@xes-inc.com> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: usb dev_name() instead of dev->bus_idKay Sievers2008-07-211-3/+3
| | | | | | | | The bus_id field is going away, use the dev_name() function instead. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* isp1760-if iomem annotationsAl Viro2008-06-041-2/+2
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* usb: fix compile warning in isp1760Sebastian Siewior2008-05-141-1/+1
| | | | | | | | drivers/usb/host/isp1760-if.c:275: warning: 'ret' is used uninitialized in this function Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ISP1760 HCD driverSebastian Siewior2008-05-021-0/+298
This driver has been written from scratch and supports the ISP1760. ISP1761 might (should) work as well but the OTG isn't supported. Also ISO packets are not. However, it works on my little PowerPC board. Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud