sysdev: Pass the attribute to the low level sysdev show/store function
This allow to dynamically generate attributes and share show/store
functions between attributes. Right now most attributes are generated
by special macros and lots of duplicated code. With the attribute
passed it's instead possible to attach some data to the attribute
and then use that in shared low level functions to do different things.
I need this for the dynamically generated bank attributes in the x86
machine check code, but it'll allow some further cleanups.
I converted all users in tree to the new show/store prototype. It's a single
huge patch to avoid unbisectable sections.
Cornelia Huck [Tue, 10 Jun 2008 09:09:08 +0000 (11:09 +0200)]
driver core: Suppress sysfs warnings for device_rename().
driver core: Suppress sysfs warnings for device_rename().
Renaming network devices to an already existing name is not
something we want sysfs to print a scary warning for, since the
callers can deal with this correctly. So let's introduce
sysfs_create_link_nowarn() which gets rid of the common warning.
Wang Chen [Tue, 24 Jun 2008 08:59:02 +0000 (16:59 +0800)]
kobject: Transmit return value of call_usermodehelper() to caller
kobject_uevent_env() drops the return value of call_usermodehelper().
It will make upper caller, such as dm_send_uevents(), to lose error
information.
BTW, Previously kobject_uevent_env() transmitted return of
call_usermodehelper() to callers, but
commit 5f123fbd80f4f788554636f02bf73e40f914e0d6
"[PATCH] merge kobject_uevent and kobject_hotplug" removed it.
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Cc: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The first paragraph of this document implies that user space developers
shouldn't use sysfs at all, but then it goes on to describe rules that
developers should follow when accessing sysfs. Not only is this somewhat
self-contradictory, it has been shown to discourage developers from using
established sysfs interfaces.
A note of caution is more appropriate than a blanket "sysfs will never
be stable" assertion.
Signed-off-by: Nathan Lynch <ntl@pobox.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
debugfs_remove_recursive() will remove a dentry and all its children.
Drivers can use this to zap their whole debugfs tree so that they don't
need to keep track of every single debugfs dentry they created.
It may fail to remove the whole tree in certain cases:
sh-3.2# rmmod atmel-mci < /sys/kernel/debug/mmc0/ios/clock
mmc0: card b368 removed
atmel_mci atmel_mci.0: Lost dma0chan1, falling back to PIO
sh-3.2# ls /sys/kernel/debug/mmc0/
ios
But I'm not sure if that case can be handled in any sane manner.
Adrian Bunk [Tue, 10 Jun 2008 16:04:08 +0000 (19:04 +0300)]
always enable FW_LOADER unless EMBEDDED=y
James Bottomley recently discovered that we have
{request,release}_firmware() dummies for the case of the actual
functions not being available and has a fix for the bug that was
actually causing build errors for built-in users with
CONFIG_FW_LOADER=m.
But now missing selects on FW_LOADER are no longer visible at
compile-time at all and can become runtime problems.
FW_LOADER is infrastructure with relatively small codesize we can safely
enable for everyone, and only for people who really need small kernels
(and can be expected to know what they are doing) it matters being able
to disable it.
This patch therefore always sets FW_LOADER=y and allows users only to
disable it with EMBEDDED=y.
As a bonus, we can then get rid of all "select FW_LOADER" plus the due
to it required "depends on HOTPLUG" which removes some complexity from
our Kconfig files.
Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mike Frysinger [Tue, 24 Jun 2008 21:25:00 +0000 (14:25 -0700)]
uio-howto.tmpl: use unique output names
The Userspace I/O HOWTO template sets two different sections with the same
html output name (about.html). This clearly won't work, so change the
first one to a unique "aboutthis.html" to prevent clobbering.
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Hans J. Koch <hjk@linutronix.de> Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mike Frysinger [Tue, 24 Jun 2008 21:24:57 +0000 (14:24 -0700)]
uio-howto.tmpl: use standard copyright/legal markings
The Userspace I/O HOWTO document uses straight <sect1> tags and plain text
to describe copyright/legal information. It should instead use the
<copyright> and <legalnotice> tags like all other documents in the kernel.
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Hans J. Koch <hjk@linutronix.de> Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Miklos Szeredi [Mon, 16 Jun 2008 11:46:47 +0000 (13:46 +0200)]
sysfs: don't call notify_change
sysfs_chmod_file() calls notify_change() to change the permission bits
on a sysfs file. Replace with explicit call to sysfs_setattr() and
fsnotify_change().
This is equivalent, except that security_inode_setattr() is not
called. This function is called by drivers, so the security checks do
not make any sense.
Ben Dooks [Thu, 12 Jun 2008 18:00:34 +0000 (19:00 +0100)]
sysdev: fix debugging statements in registration code.
The systdev_class_register() and sysdev_register() functions have
pr_debug() statements which are enabled when the user selects the
driver core debug. Both of these routines do not produce the
correct output, as they make assumptions about data which has not
been initialised.
In sysdev_class_register() the code uses the kobject_name(&cls->kset.kobj)
at the start of the function, but this is not setup until later in the
same call. Change this to use cls->name which is passed in from the caller.
The sysdev_register() function tries to get the name of the sysdev by
kobject_name(&sysdev->kobj), but that isn't setup until later in the same
function so change this message to use the name of the sysdev's class and
add another message once the name is initialised.
Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Uwe Kleine-König [Sat, 31 May 2008 09:37:27 +0000 (11:37 +0200)]
UIO: add generic UIO platform driver
This patch adds a generic UIO platform driver. It eliminates the need for a
dedicated kernel module for simple platform devices. Users only need to
implement their irq handler in platform code and fill a struct uio_info
there. This helps avoiding code duplication as UIO platform drivers often
share a lot of common code.
Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Signed-off-by: Hans J. Koch <hjk@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Hans J. Koch [Fri, 23 May 2008 11:50:14 +0000 (13:50 +0200)]
UIO: Add write function to allow irq masking
Sometimes it is necessary to enable/disable the interrupt of a UIO device
from the userspace part of the driver. With this patch, the UIO kernel driver
can implement an "irqcontrol()" function that does this. Userspace can write
an s32 value to /dev/uioX (usually 0 or 1 to turn the irq off or on). The
UIO core will then call the driver's irqcontrol function.
Signed-off-by: Hans J. Koch <hjk@linutronix.de> Acked-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Acked-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Uwe Kleine-König [Sat, 31 May 2008 09:37:27 +0000 (11:37 +0200)]
UIO: fix UIO Kconfig dependencies
ae210f188614bb3d1ee3f19c64e28e3cdd44877c introduced a big "if UIO"/"endif"
where all uio drivers are defined. So know there is no need for them to
depend explicitly on UIO.
Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Signed-off-by: Hans J. Koch <hjk@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kay Sievers [Wed, 28 May 2008 21:06:47 +0000 (23:06 +0200)]
pnp: add acpi:* modalias entries
Along with the non-modalias conformant "pnp:*" aliases, we add "acpi:*"
entries to PNP drivers, to allow module autoloading by ACPI PNP device
entries, which export proper modalias information, without any specific
userspace modprobe mangling.
Cc: Adam Belay <ambx1@neo.rr.com> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
There is no such thing as a "device id size" in the driver core, so
remove the define and fix up any users of this odd define in the rest of
the kernel.
Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kay Sievers [Fri, 2 May 2008 04:02:41 +0000 (06:02 +0200)]
driver core: remove DEVICE_NAME_SIZE define
There is no such thing as a "device name size" in the driver core, so
remove the define and fix up any users of this odd define in the rest of
the kernel.
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dave Young [Wed, 28 May 2008 16:28:39 +0000 (09:28 -0700)]
class: change internal semaphore to a mutex
Now that the lockdep infrastructure in the class core is in place, we
should be able to properly change the internal class semaphore to be a
mutex.
David wrote the original patch, and Greg fixed it up to apply properly
due to all of the recent changes in this area.
From: Dave Young <hidave.darkstar@gmail.com> Cc: Matthew Wilcox <matthew@wil.cx> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Matthew Wilcox [Wed, 28 May 2008 16:28:39 +0000 (09:28 -0700)]
class: add lockdep infrastructure
This adds the infrastructure to properly handle lockdep issues when the
internal class semaphore is changed to a mutex.
Matthew wrote the original patch, and Greg fixed it up to work properly
with the class_create() function.
From: Matthew Wilcox <matthew@wil.cx> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Dave Young <hidave.darkstar@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
class: rename "sem" to "class_sem" in internal class structure
This renames the struct class "sem" field to be "class_sem" to make
things easier when struct bus_type and struct class merge in the future.
It also makes grepping for fields easier as well.
Based on an idea from Kay.
Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
class: rename "subsys" to "class_subsys" in internal class structure
This renames the struct class "subsys" field to be "class_subsys" to
make things easier when struct bus_type and struct class merge in the
future. It also makes grepping for fields easier as well.
Based on an idea from Kay.
Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
class: rename "interfaces" to "class_interfaces" in internal class structure
This renames the struct class "interfaces" field to be
"class_interfaces" to make things easier when struct bus_type and struct
class merge in the future. It also makes grepping for fields easier as
well.
Based on an idea from Kay.
Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
class: rename "devices" to "class_devices" in internal class structure
This renames the struct class "devices" field to be "class_devices" to
make things easier when struct bus_type and struct class merge in the
future. It also makes grepping for fields easier as well.
Based on an idea from Kay.
Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
class: move driver core specific parts to a private structure
This moves the portions of struct class that are dynamic (kobject and
lock and lists) out of the main structure and into a dynamic, private,
structure.
Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
bluetooth: remove improper bluetooth class symlinks.
Don't create symlinks in a class to a device that is not owned by the
class. If the bluetooth subsystem really wants to point to all of the
devices it controls, it needs to create real devices, not fake symlinks.
infiniband: make cm_device use a struct device and not a kobject.
This object really should be a struct device, or at least contain a
pointer to a struct device, as it is trying to create a separate device
tree outside of the main device tree. This patch fixes this problem.
It is needed for the class core rework that is being done in the driver
core.
Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Roland Dreier <rolandd@cisco.com> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
infiniband: rename "device" to "ib_device" in cm_device
This pointer really is a struct ib_device, not a struct device, so name
it properly to help prevent confusion.
This makes the followon patch in this series much smaller and easier to
understand as well.
Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Roland Dreier <rolandd@cisco.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Acked-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
block: move header for /proc/partitions to seq_start
The seq_start call is the better place for the header for the file, that
way we don't have to be mucking in the class structure to try to figure
out if this is the first partition or not.
Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Fri, 6 Jun 2008 20:48:07 +0000 (15:48 -0500)]
device create: spi: convert device_create to device_create_drvdata
Switch over to use the shiny new device_create_drvdata() call
instead of the original device_create() calls, so this continues
to work after device_create() is removed.
Note that this driver never had the race which motivated removing
the original call; it locked correctly.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dan Williams [Mon, 21 Apr 2008 17:51:07 +0000 (10:51 -0700)]
sysfs: add /sys/dev/{char,block} to lookup sysfs path by major:minor
Why?:
There are occasions where userspace would like to access sysfs
attributes for a device but it may not know how sysfs has named the
device or the path. For example what is the sysfs path for
/dev/disk/by-id/ata-ST3160827AS_5MT004CK? With this change a call to
stat(2) returns the major:minor then userspace can see that
/sys/dev/block/8:32 links to /sys/block/sdc.
What are the alternatives?:
1/ Add an ioctl to return the path: Doable, but sysfs is meant to reduce
the need to proliferate ioctl interfaces into the kernel, so this
seems counter productive.
2/ Use udev to create these symlinks: Also doable, but it adds a
udev dependency to utilities that might be running in a limited
environment like an initramfs.
Cc: Neil Brown <neilb@suse.de> Cc: Tejun Heo <htejun@gmail.com> Acked-by: Kay Sievers <kay.sievers@vrfy.org> Reviewed-by: SL Baur <steve@xemacs.org> Acked-by: Kay Sievers <kay.sievers@vrfy.org> Acked-by: Mark Lord <lkml@rtr.ca> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (100 commits)
usb-storage: revert DMA-alignment change for Wireless USB
USB: use reset_resume when normal resume fails
usb_gadget: composite cdc gadget fault handling
usb gadget: minor USBCV fix for composite framework
USB: Fix bug with byte order in isp116x-hcd.c fio write/read
USB: fix double kfree in ipaq in error case
USB: fix build error in cdc-acm for CONFIG_PM=n
USB: remove board-specific UP2OCR configuration from pxa27x-udc
USB: EHCI: Reconciling USB register differences on MPC85xx vs MPC83xx
USB: Fix pointer/int cast in USB devio code
usb gadget: g_cdc dependso on NET
USB: Au1xxx-usb: suspend/resume support.
USB: Au1xxx-usb: clean up ohci/ehci bus glue sources.
usbfs: don't store bad pointers in registration
usbfs: fix race between open and unregister
usbfs: simplify the lookup-by-minor routines
usbfs: send disconnect signals when device is unregistered
USB: Force unbinding of drivers lacking reset_resume or other methods
USB: ohci-pnx4008: I2C cleanups and fixes
USB: debug port converter does not accept more than 8 byte packets
...
Alan Stern [Mon, 30 Jun 2008 17:39:59 +0000 (13:39 -0400)]
usb-storage: revert DMA-alignment change for Wireless USB
This patch (as1110) reverts an earlier patch meant to help with
Wireless USB host controllers. These controllers can have bulk
maxpacket values larger than 512, which puts unusual constraints on
the sizes of scatter-gather list elements. However it turns out that
the block layer does not provide the support we need to enforce these
constraints; merely changing the DMA alignment mask doesn't help.
Hence there's no reason to keep the original patch. The Wireless USB
problem will have to be solved a different way.
In addition, there is a reason to get rid of the earlier patch. By
dereferencing a pointer stored in the ep_in array of struct
usb_device, the current code risks an invalid memory access when it
runs concurrently with device removal. The members of that array are
cleared before the driver's disconnect method is called, so it should
not try to use them.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Mon, 30 Jun 2008 15:14:43 +0000 (11:14 -0400)]
USB: use reset_resume when normal resume fails
This patch (as1109b) makes USB-Persist more resilient to errors. With
the current code, if a normal resume fails, it's an unrecoverable
error. With the patch, if a normal resume fails (and if the device is
enabled for USB-Persist) then a reset-resume is tried.
This fixes the problem reported in Bugzilla #10977.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Tue, 1 Jul 2008 20:18:20 +0000 (13:18 -0700)]
usb_gadget: composite cdc gadget fault handling
These two fixes ensure the new "CDC Composite Device" gadget
fails cleanly when it's loaded on hardware that can't support
this particular gadget driver.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
USB: EHCI: Reconciling USB register differences on MPC85xx vs MPC83xx
A couple of USB register initializations had to be changed on MPC85xx
platforms. This is due to the internal SoC buses being different on
MPC83xx SoCs vs MPC85xx SoCs.
We currently handle this via an ifdef since 83xx and 85xx are mutually
exclusive kernel builds.
David Howells [Wed, 2 Jul 2008 11:28:55 +0000 (12:28 +0100)]
USB: Fix pointer/int cast in USB devio code
Fix pointer/int cast in USB devio code, and thus avoid a compiler warning.
A void* data argument passed to bus_find_device() and thence to match_devt()
is used to carry a 32-bit datum. However, casting directly between a u32 and
a pointer is not permitted - there must be an intermediate cast via (unsigned)
long.
This patch (as1105) simplifies the lookup-by-minor-number code in
usbfs. Instead of passing the minor number to the callback, which
must then reconstruct the entire dev_t value, the patch passes the
dev_t value directly.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: David Howells <dhowells@redhat.com> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Tue, 24 Jun 2008 18:47:29 +0000 (14:47 -0400)]
usbfs: don't store bad pointers in registration
This patch (as1107) fixes a small bug in the usbfs registration and
unregistration code. It avoids leaving an error value stored in the
device's usb_classdev field and it avoids trying to unregister a NULL
pointer. (It also fixes a rather extreme overuse of whitespace.)
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Tue, 24 Jun 2008 18:47:19 +0000 (14:47 -0400)]
usbfs: fix race between open and unregister
This patch (as1106) fixes a race between opening and unregistering
device files in usbfs. The current code drops its reference to the
device and then reacquires it, ignoring the possibility that the
device structure might have been removed in the meantime. It also
doesn't check whether the device is already in the NOTATTACHED state
when the file is opened.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Tue, 24 Jun 2008 18:47:12 +0000 (14:47 -0400)]
usbfs: simplify the lookup-by-minor routines
This patch (as1105) simplifies the lookup-by-minor-number code in
usbfs. Instead of passing the minor number to the callback, which
must then reconstruct the entire dev_t value, the patch passes the
dev_t value directly.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Tue, 24 Jun 2008 18:47:04 +0000 (14:47 -0400)]
usbfs: send disconnect signals when device is unregistered
USB device files are accessible in two ways: as files in usbfs and as
character device nodes. The two paths are supposed to behave
identically, but they don't. When the underlying USB device is
unplugged, disconnect signals are sent to processes with open usbfs
files (if they requested these signals) but not to processes with open
device node files.
This patch (as1104) fixes the bug by moving the disconnect-signalling
code into a common subroutine which is called from both paths.
Putting this subroutine in devio.c removes the only out-of-file
reference to struct dev_state, and so the structure's declaration can
be moved from usb.h into devio.c.
Finally, the new subroutine performs one extra action: It kills all
the outstanding async URBs. (I'd kill the outstanding synchronous
URBs too, if there was any way to do it.) In the past this hasn't
mattered much, because devices were unregistered from usbfs only
when they were disconnected. But now the unregistration can also
occur whenever devices are unbound from the usb_generic driver. At
any rate, killing URBs when a device is unregistered from usbfs seems
like a good thing to do.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Mon, 23 Jun 2008 20:00:40 +0000 (16:00 -0400)]
USB: Force unbinding of drivers lacking reset_resume or other methods
This patch (as1024) takes care of a FIXME issue: Drivers that don't
have the necessary suspend, resume, reset_resume, pre_reset, or
post_reset methods will be unbound and their interface reprobed when
one of the unsupported events occurs.
This is made slightly more difficult by the fact that bind operations
won't work during a system sleep transition. So instead the code has
to defer the operation until the transition ends.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jean Delvare [Wed, 18 Jun 2008 12:46:27 +0000 (14:46 +0200)]
USB: ohci-pnx4008: I2C cleanups and fixes
Various cleanups and fixes to the i2c code in ohci-pnx4008:
* Delete empty isp1301_command. The i2c driver command implementation
is optional, so there's no point in providing an empty
implementation.
* Give a name to isp1301_driver. I'm surprised that i2c-core accepted
to register this driver at all. I've chosen "isp1301_pnx" as the
name, because it's not a generic ISP1301 driver (much like the
isp1301_omap driver.) We might want to make the name even more
specific (but "isp1301_ohci_pnx4008" doesn't fit.)
* The ISP1301 is definitely not a hardware monitoring device.
* Fix a memory leak on failure in isp1301_attach. If
i2c_attach_client fails, the client is not registered so
isp1301_detach is never called and the i2c_client memory is lost.
* Use strlcpy instead of strcpy.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Vitaly Wool <vitalywool@gmail.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Aleksey Gorelov [Thu, 19 Jun 2008 22:22:17 +0000 (15:22 -0700)]
USB: debug port converter does not accept more than 8 byte packets
USB debug port only supports 8 byte rx/tx packets. Although spec implies that
"if a packet larger than eight bytes is received from the remote computer, the
device must break the larger packet into eight-byte packets before sending the
data to the Debug Port", the real PLX NET20DC device does not handle it right -
data is corrupted on debug port end if serial interface sends >8 byte urbs.
Patch below fixes the issue by limiting tx urb to 8 byte.
Signed off by: Aleks Gorelov <dared1st@yahoo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Oliver Neukum [Wed, 25 Jun 2008 11:32:49 +0000 (13:32 +0200)]
USB: fix usb serial pm counter decrement for disconnected interfaces
usb serial decrements the pm counter even if an interface has been
disconnected. If it was a logical disconnect the interface may belong
already to another driver. This patch introduces a check for disconnected
interfaces.
Ben Collins [Fri, 27 Jun 2008 00:08:16 +0000 (20:08 -0400)]
USB: keyspan: Remove duplicate device entries
The 28xb, as documented in comments, has the same ID's as the 28x.
Remove the duplicated ID's from the device tables, and expand the
comment to document this.
Signed-off-by: Ben Collins <ben.collins@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>