When using the remove sysfs file, the device configuration is set to -1
(unconfigured). This eventually unbind drivers with the bandwidth_mutex
held. Some drivers may call functions that hold said mutex, like
usb_reset_device. This is the case for rtl8187, for example. This will
lead to the same process holding the mutex twice, which deadlocks.
Besides, according to Alan Stern:
"The deadlock problem probably could be handled somehow, but there's a
separate issue: Until the usb_disable_device call finishes unbinding
the drivers, the drivers are free to continue using their allocated
bandwidth. We musn't change the bandwidth allocations until after the
unbinding is done. So this patch is indeed necessary."
Unbinding the driver before holding the bandwidth_mutex solves the
problem. If any operation after that fails, drivers are not bound again.
But that would be a problem anyway that the user may solve resetting the
device configuration to one that works, just like he would need to do in
most other failure cases.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Sarah Sharp <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Randy Dunlap has reported that building classmate-laptop fails when
CONFIG_RFKILL=m and CONFIG_ACPI_CMPC=y. He suggested depending on
RFKILL, but, then, it will not be possible to select classmate-laptop
when RFKILL is off. There's no known problem with building and using
classmate-laptop with RFKILL off. So depend on RFKILL or RFKILL=n.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
Reported-by: Randy Dunlap <[email protected]>
Cc: Randy Dunlap <[email protected]>
Cc: [email protected]
Cc: Daniel Oliveira Nascimento <[email protected]>
Commit f601441916 ("imxfb: add support for
i.MX25:) has inserted the symbol HAVE_FB_IMX, which does not depend on FB
after the menuconfig FB. This breaks the menu, presenting most of the
drivers outside of it, when using menuconfig.
Moving the symbol to the start of the file, just like HAVE_FB_ATMEL, fixes
the problem without breaking it for iMX25 configurations (tested with
ARCH=arm, no build).
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: Sascha Hauer <[email protected]>
Acked-by: Uwe Kleine-König <[email protected]>
Acked-by: Baruch Siach <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Randy Dunlap <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
The RFKILL device shares the same ACPI device used for backlight. So, it
required a new struct sharing both a backlight_device and a rfkill
device.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Replace the introduced i_sem by an i_mutex in the filesystem locking
documentation. This was introduced [1] after all occurrences were
already replaced in the same text [2]. However, the term "inode
semaphore" has not been replaced then, and it's replaced now.
[1] afddba49d1
[2] a7bc02f4f4
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: Artem Bityutskiy <[email protected]>
Cc: Randy Dunlap <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
serio_raw open function already uses a mutex. Also change formatting
a bit.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
There's no need for BKL in mousedev, relevan protection is provided by
a private mutex.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Some new devices have extra keys, which we add to our list. Currently,
they all generate events that allow us to use a simple table/array,
without need for the sparse keymap.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Instead of a MODULE_DEVICE_TABLE for every acpi_driver ids table, we
create a table containing all ids to export to get a module alias for
each one.
This will fix automatic loading of the driver when one of the ACPI
devices is not present (like the accelerometer, which is not present in
some models).
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
This will save 64K bytes from memory when loading linux if DMI is
disabled, which is good for embedded systems.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: H. Peter Anvin <[email protected]>
As discussed in linux-wireless mailing list, adding and removing
stations for mesh topologies is not necessary. Since doing it triggers
bugs, the sugestion was to simply disable it.
Tested using a custom iw command "station new". Works only after using
hostapd. "station del" command also works.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: Johannes Berg <[email protected]>
Cc: Simon Raffeiner <[email protected]>
Cc: Andrey Yurovsky <[email protected]>
Cc: Javier Cardona <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
This device generates ABS_Z and ABS_RX events, while it should be
generating ABS_X and ABS_Y instead. Using the MULTI_INPUT quirk solves
this issue.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Daniel Oliveira Nascimento <[email protected]>
[[email protected]: fixed blacklist ordering while resolving conflict]
[[email protected]: fixed typo to make it compile]
Signed-off-by: Jiri Kosina <[email protected]>
One ioctl has been forgotten when the BKL was push down into irnet_ppp
ioctl function.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Add the missing unlock_kernel in one ioctl operation.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This is the counterpart to cba767175b
("pktcdvd: remove broken dev_t export of class devices"). Device is not
registered using dev_t, so it should not be destroyed using device_destroy
which looks up the device by dev_t. This will fail and adding the device
again will fail with the "duplicate name" error. This is fixed using
device_unregister instead of device_destroy.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: Kay Sievers <[email protected]>
Cc: Peter Osterlund <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This device generates ABS_Z and ABS_RX events, while it should be
generating ABS_X and ABS_Y instead. Using the MULTI_INPUT quirk solves
this issue.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Daniel Oliveira Nascimento <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Instead of padding with blanks and printing "number=0x a", print
"number=0x0a".
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Commit 8702965848 pushed down the BKL
into uinput open function. However, there's nothing that needs locking
in there.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
dev_dbg outputs dev_name, which is released with device_unregister. This bug
resulted in output like this:
i2c Xy2�0: adapter [SMBus I801 adapter at 1880] unregistered
The right output would be:
i2c i2c-0: adapter [SMBus I801 adapter at 1880] unregistered
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
This is needed for built-in drivers which are built before the sound directory,
like thinkpad_acpi.
Otherwise, registering a card fails.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
This add supports for devices like keyboard, backlight, tablet and
accelerometer.
This work is supported by International Syst S/A.
[[email protected]: cmpc_acpi: depends on ACPI]
[[email protected]: readability tweaks]
[[email protected]: coding-style fixes]
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Len Brown <[email protected]>
Use DECLARE_BITMAP(), find_first_zero_bit(), set_bit() and clear_bit()
instead of rewriting code to do it with the minor number dynamic
allocation bitmap.
We need to invert the bit position to keep the code behaviour of using the
last minor numbers first, since we don't have a find_last_zero_bit.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Alan Cox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
If there's a failure creating the device (because there's already one with
the same name, for example), the current implementation does not clear the
bit for the allocated minor and that number is lost for future
allocations.
Second, the test currently in misc_deregister is broken, since it does not
test for the 0 minor.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Alan Cox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit 8c8709334c has removed the
pmu_device_init call from misc_init, but unlike other similar commits,
has not removed its declaration.
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This section pointed out to compilation options which no longer exist.
VERBOSE_IDE_CD_ERRORS has been replace by config option
CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS.
STANDARD_ATAPI is no longer needed, since the non-standard drivers, which
required bcd2bin are now detected, and there's a flag for them.
NO_DOOR_LOCKING is now a sysctl parameter for cdrom drivers.
CDROM_NBLOCKS_BUFFER is not used anymore. The READAUDIO is now in cdrom.c and it
allocates as much as user space has requested to read, backing off if it fails.
TEST is not there anymore or in cdrom either. ide allows to send ATA commands
through ioctl, although it may be helpful to send MMC packets through the cdrom
layer directly.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Add exofs.txt to filesystems Documentation index and fix some typos,
identation and grammar.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Boaz Harrosh <[email protected]>
fix some typos and punctuation in comments
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
fix some typos and punctuation in comments
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
[bart: ported the change from the older patch for rt2800usb & rt61pci]
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
fix some typos and punctuation in comments
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
Commit 3b073eda has removed pci_find_slot, so there's no point in
mentioning it in the config description as one of the deprecated APIs
there are enabled by PCI_LEGACY and still used by some drivers.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jesse Barnes <[email protected]>
Although the same label name is used somewhere else in the file, this
particular label was consistently typoed in all of its uses.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
If we change the inverted attribute to another value, the LED will not be
inverted until we change the GPIO state.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: Samuel R. C. Vale <[email protected]>
Cc: Richard Purdie <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
When setting the same GPIO number, multiple IRQ shared requests will be
done without freing the previous request. It will also try to free a
failed request or an already freed IRQ if 0 was written to the gpio file.
All these oops and leaks were fixed with the following solution: keep the
previous allocated GPIO (if any) still allocated in case the new request
fails. The alternative solution would desallocate the previous allocated
GPIO and set gpio as 0.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Samuel R. C. Vale <[email protected]>
Cc: Richard Purdie <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
rtc-cmos has two drivers, one PNP and one platform. When PNP has not
succeeded probing, platform is registered. However, it tries to
unregister both drivers unconditionally, instead of only unregistering
those that were successfully registered. This causes runtime warnings to
be emitted from the driver core code.
Fix this with a boolean variable for each driver indicating whether
registering was successful.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: David Brownell <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: David Brownell <[email protected]>
Cc: Kay Sievers <[email protected]>
Cc: Greg KH <[email protected]>
Cc: Ozan Caglayan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Serio ports are not being restarted any longer because resume operations
after hibernate do nothing, since the device has not been marked as
suspended. This happens because suspend is only considering the SUSPEND
event but not the FREEZE event.
Note that this driver has still to migrate to dev_pm_ops, but this fixes
this particular bug now.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
This commit 335f8514f2 has stopped
properly checking if there is any usb serial associated with the tty in
the close function. It happens the close function is called by releasing
the terminal right after opening the device fails.
As an example, open fails with a non-existing device, when probe has
never been called, because the device has never been plugged. This is
common in systems with static modules and no udev.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit 10077d4a66 has stopped
checking if there was a valid acm device associated to the tty, which is
not true right after open fails and tty subsystem tries to close the
device.
As an example, open fails with a non-existing device, when probe has
never been called, because the device has never been plugged. This is
common in systems with static modules and no udev.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This is required, otherwise a user will get a EINVAL while opening a
non-existing device, instead of ENODEV.
This is what I get with this patch applied now instead of an "Invalid
argument".
cascardo@vespa:~$ cat /dev/ttyACM0
cat: /dev/ttyACM0: No such device
cascardo@vespa:~$
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit 69423d99fc ("[MTD] update internal
API to support 64-bit device size") has changed some structure values
to 64-bit and has not updated this debug message, since it's not built
by default.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
For evdev, joydev and mousedev, instead of having a separate character array
holding name of the handle, use struct devce's name which is the same.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
After experimenting with kexec with the last merges after 2.6.29, I've
had some problems when probing e100. It would not read the eeprom. After
some bisects, I realized this has been like that since forever (at least
2.6.18). The problem is that shutdown is doing the same thing that
suspend does and puts the device in D3 state. I couldn't find a way to
get the device back to a sane state in the probe function. So, based on
some similar patches from Rafael J. Wysocki for e1000, e1000e, and ixgbe,
I wrote this one for e100.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Acked-by: "Rafael J. Wysocki" <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
cgroup documentation was moved to Documentation/cgroups/. There are some
places that still refer to Documentation/controllers/,
Documentation/cgroups.txt and Documentation/cpusets.txt. Fix those.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Reviewed-by: Li Zefan <[email protected]>
Acked-by: Paul Menage <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
While the Documentation example creates /cgroup/test, it removes
/test/cgroup, which is clearly not the intended path. Change that to
/cgroup/test.
Acked-by: KAMEZAWA Hiroyuki <[email protected]>
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
While debugging some code paths in AC97 codec patches and its suspend
and resume functions, getting to know the flags has proved useful to
follow those code paths.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Check in a quirk list if it should do cold reset when AC97 power saving
is enabled. Some devices do not resume properly when cold reset,
although power saving works OK.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
When bg_free_blocks_count was renamed to bg_free_blocks_count_lo in
560671a0, its uses under EXT4FS_DEBUG were not changed to the helper
ext4_free_blks_count.
Another commit, 498e5f24, also did not change everything needed under
EXT4FS_DEBUG, thus making it spill some warnings related to printing
format.
This commit fixes both issues and makes ext4 build again when
EXT4FS_DEBUG is enabled.
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: "Theodore Ts'o" <[email protected]>