Pat LaVarre [Fri, 16 Jul 2004 04:17:27 +0000 (21:17 -0700)]
[PATCH] fix cdrom mt rainier probe
Writing to RAM capable media was broken by the moving of write flag
detection from probe to drive open time. The media would stay
terminally RO due to the set_disk_ro() call.
This fixes the code to do the right thing - the detection stays at open
time (which it must, since it depends on the media), and we fail with
-EROFS if the media can't be written.
David Woodhouse [Thu, 15 Jul 2004 13:07:49 +0000 (06:07 -0700)]
[PATCH] ppc32: Fix UART initialisation on WindRiver SBC8560.
The UART tristates its IRQ output when the OUT2 bit in the MCR isn't
set. For reasons not known to civilised man, the hardware engineers
stopped it from floating by pulling it _high_ instead of low, so if
anybody requests that IRQ before OUT2 is turned on, we die in an IRQ
storm. The serial8250 driver does precisely that thing, with precisely
that effect.
ALPHA_KLUDGE_MCR was designed to fix exactly this kind of problem, so we
use it here as intended. Ideally ALPHA_KLUDGE_MCR would go away and be
replaced with something like UPF_FORCE_OUT2 and UPF_FORCE_OUT1 flags,
but now is not the time to get me started on a cleanup of everything
about serial8250 that offends me.
Just unearthed another of my warcrimes: reading a 17-page sparse file,
I mean holey file, hits the in_interrupt panic in do_exit on a current
highmem kernel (but 2.6.7 is okay). Fix mismatched preempt count from
shmem_swp_alloc's swapindex hole case by mapping an empty_zero_page.
David Woodhouse [Thu, 15 Jul 2004 19:32:25 +0000 (20:32 +0100)]
NOR flash drivers update
- Handle cached access to flash chips on supporting platforms
- Handle arrangements of chips larger than a single bus width
- Clean up the AMD/Fujitsu chip driver
- Update board 'mapping' drivers to match
- New mapping drivers for new platforms.
David Woodhouse [Thu, 15 Jul 2004 19:27:17 +0000 (20:27 +0100)]
MTD core include and device code cleanup
- Move user-visible bits from headers to include/mtd/ directory.
- Update old DiskOnChip drivers for newer hardware.
- Switch NFTL and INFTL support to work with new DiskOnChip/NAND code.
- New phram driver, reimplenting the ugly slram driver.
- Bug fixes in partitioning code
David Woodhouse [Thu, 15 Jul 2004 19:11:45 +0000 (20:11 +0100)]
NAND flash driver updates.
Update the core NAND code:
- support multiple chips
- support bad block tables
- improved generic ECC support and 'spare area' usage.
- 16-bit NAND
- Large-block NAND devices
- Renesas AG-AND devices
- M-Systems DiskOnChip devices
- Other new board support wrappers
Most of the work was done by Thomas Gleixner.
Signed-Off-By: David Woodhouse <dwmw2@infradead.org>
[PATCH] CFQ: allocation under lock, missing memset on allocation
This fixes two issues in the CFQ IO-scheduler:
o Still a bad allocation under the queue lock
o We need to clear crq after mempool_alloc(), otherwise the rbtree
pointers can contain garbage if slab poisoning is enabled. This causes
crashes on front/back merges because rb_next() returns crap.
[PATCH] ide: use "normal" handlers for "flagged" taskfiles (ide-taskfile.c)
This fixes following issues for PIO-in:
- shared PCI IRQs handling
- fail request if the last status is bad
and PIO-out:
- set hwgroup->handler/timer in prehandlers
- handle drive->unmask in prehandlers
- check for !rq->nr_sectors and DRQ_STAT bit set
- use drive->bad_wstat instead of BAD_W_STAT
[PATCH] ide: merge CONFIG_IDE_TASKFILE_IO=y|n PIO handlers together
This fixes a couple of CONFIG_IDE_TASKFILE_IO=n issues:
- check status after last sector for PIO-in transfers
- handle drive->unmask properly in PIO-out prehandlers
- use rq->[hard]_nr_sectors where appropriate
[PATCH] ide: no partial completions for PIO (CONFIG_IDE_TASKFILE_IO=y)
Don't do partial completions but instead acknowledge already transferred
sectors with verified good status on error. This allows us to complete
"good" sectors to block layer even if bio they belong to wasn't finished
and simplifies code.
drive_is_ready() reads STATUS register if CONFIG_IDEPCI_SHARE_IRQ is not
defined and ALTSTATUS register if it is defined. Therefore drive_is_ready()
in pre_task_mulout_intr() only makes sense if we can't trust STATUS register
(because we call ide_wait_stat() which reads STATUS register earlier).
Remove this "workaround" for now as it is not present in ide-disk.c
and whole multi PIO-out code (CONFIG_IDE_TASKFILE_IO=n) was buggy before.
Setup handler and output first data block directly from ->prehandler()
instead of calling ->handler(). The only change in functionality is that
we no longer check DRIVE_READY status bits (there is no need to do it).
[PATCH] ide: PIO-out fixes for ide-taskfile.c (CONFIG_IDE_TASKFILE_IO=n)
- in task_out_intr() fix off-by-1 bug and (stat & DRQ_STAT) check,
previously "if" was always true for rq->current_nr_sectors == 1
- fail request if DRQ_STAT is not set and rq->current_nr_sectors != 0
(instead of setting handler and waiting for the next IRQ) or if DRQ_STAT
is set but !rq->current_nr_sectors (in task_mulout_intr() this was OK)
- in task_mulout_intr() check also DRIVE_READY and WRERR_STAT status bits
This patch adds a /block/*/removeable sysfs attribute. A value of 1
indicates the media can change anytime. This is a hint for userland
to poll such devices for possible media changes, and leave all others alone.
There is currently no way to see if a connected usb-storage device is a
disk or a card reader. It will also show 1 for CD and ZIP drives.
It was done by Patrick Mansfield a while ago. I can probably not
sigh-off his work. ;)
[PATCH] Driver core: Fix OOPS in device_platform_unregister
Driver core: platform_device_unregister should release resources first
and only then call device_unregister, otherwise if there
are no more references to the device it will be freed and
the fucntion will try to access freed memory.
[PATCH] I2C: patch quirks.c - SMBus hidden on hp laptop
This patch unhides the SMBus on the hp nc8000 and nc6000 laptops. The
patch has been co-written by Jean Delvare and Rudolf Marek. I've only
tested this on nc8000, but it should work for the nc6000 too.
Unfortunatley, we had to little information to fix the problem described
in the reported bug below, as is probably the same problem. But if we're
very lucky it might solve it too.
http://bugzilla.kernel.org/show_bug.cgi?id=2976
Adrian Bunk [Wed, 14 Jul 2004 08:08:37 +0000 (01:08 -0700)]
[PATCH] USB: USB w9968cf compile error
On Tue, Jul 13, 2004 at 06:25:59PM -0700, Andrew Morton wrote:
>...
> All 252 patches:
>...
> bk-usb.patch
>...
This patch marks w9968cf_valid_depth as inline, although it's used
before it's defined.
gcc 3.4 therefore correctly fails with:
<-- snip -->
...
CC drivers/usb/media/w9968cf.o
drivers/usb/media/w9968cf.c: In function `w9968cf_set_picture':
drivers/usb/media/w9968cf.c:487: sorry, unimplemented: inlining failed
in call to 'w9968cf_valid_depth': function body not available
drivers/usb/media/w9968cf.c:1722: sorry, unimplemented: called from here
make[3]: *** [drivers/usb/media/w9968cf.o] Error 1
<-- snip -->
This patch moves w9968cf_valid_depth above it's first user (it also uses
two other functions to keep the ordering of functions a bit more
consistent).
Signed-off-by: Adrian Bunk <bunk@fs.tum.de> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
David Brownell [Wed, 14 Jul 2004 08:07:48 +0000 (01:07 -0700)]
[PATCH] USB: usb host side updates, mostly for suspend
This adds some of the infrastructure needed to support some more
USB capabilities:
- CONFIG_USB_SUSPEND, so Linux can put individual devices
into the USB "suspend" state. They can (sometimes) use
"remote wakeup" to resume the host; or they can each be
resumed by the host.
+ New usbcore device selective suspend/resume APIs
* Define them, as stubs for now
* Call them on the paths sysfs uses (renamed functions)
+ HCD support
* Define root hub suspend calls; delegate them to HCDs.
* OHCI and EHCI can suspend/resume root hubs that way.
* Not called yet, until suspend/resume calls exist
- CONFIG_USB_OTG, which depends on the selective suspend APIs
to allow devices to switch roles (host to peripheral, etc).
This patch just adds a few key flags in usb_bus, needed by
usbcore (during enumeration) and by HCD and OTG controllers
on OTG-capable boards.
- Related bugfix: power budgeting is supposed to place a
100mA per port (non-OTG) for bus-powered devices.
This patch changes no behavior; later patches will do that,
and they'll be smaller because of this.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Ian Abbott [Wed, 14 Jul 2004 08:07:29 +0000 (01:07 -0700)]
[PATCH] USB: ftdi_sio VID/PID updates
Greg,
This patch adds various VID/PIDs to the ftdi_sio driver that I've
accumulated from the ftdi-usb-sio-devel mailing list, and one from
the 2.4 kernel sources:
* Interbiometrics USB I/O boards VID/PIDs from 2.4 kernel (Rudolf
Gugler).
* Intrepid Control Systems ValueCAN and NeoVI VID/PIDs from Scott
Wolchok.
* Falcom Twist USB GPRS modem VID/PID from Justin Schoeman.
* Suunto Sports instrument PID from Panu Kekalainen.
Also a few minor clean-ups:
* Removed a stray PID macro constant FTDI_GUDEADS_889_PID.
* Copied the Inside Accesso VID/PID into the FT232BM ID table so
that the "combined" table is a proper union of the others (unless I've
missed something else).
* Added a comment that the OCT US101 is also rebadged as a SIIG Inc.
US2308.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Olaf Hering [Wed, 14 Jul 2004 08:02:24 +0000 (01:02 -0700)]
[PATCH] USB: fix SN9C10[12] driver for ia64
On Sun, Jul 11, Luca Risolia wrote:
> This single patch contains some updates and cleanups for
> the W996[87]CF driver and a new experimental V4L2 driver
> for SONiX SN9C10[12] PC Camera Controllers connected to various
> image sensors. I have not divided the patch in two logical
> sub-patches becouse of two independent changes in one common
> file, KConfigure. Since this mailing list refused the patch,
> due to its size, I have uploaded it here, as
> Documentation/SubmittingPatches suggests:
I need this patch for x86_64.
CC [M] drivers/usb/media/sn9c102_core.o
In file included from drivers/usb/media/sn9c102.h:34,
from drivers/usb/media/sn9c102_core.c:43:
include/asm/rwsem.h:55: error: redefinition of `struct rw_semaphore'
In file included from drivers/usb/media/sn9c102.h:34,
from drivers/usb/media/sn9c102_core.c:43:
include/asm/rwsem.h:79:1: warning: "__RWSEM_INITIALIZER" redefined
In file included from include/linux/rwsem.h:25,
from include/asm/semaphore.h:43,
from include/linux/sched.h:18,
from include/linux/module.h:10,
from drivers/usb/media/sn9c102_core.c:21:
include/linux/rwsem-spinlock.h:49:1: warning: this is the location of the previous definition
include/asm/rwsem.h:87: warning: static declaration for `init_rwsem' follows non-static
include/asm/rwsem.h:100: warning: `__down_read' declared inline after being called
include/asm/rwsem.h:100: warning: static declaration for `__down_read' follows non-static
include/asm/rwsem.h:122: warning: `__down_read_trylock' declared inline after being called
include/asm/rwsem.h:122: warning: static declaration for `__down_read_trylock' follows non-static
include/asm/rwsem.h:146: warning: `__down_write' declared inline after being called
include/asm/rwsem.h:146: warning: static declaration for `__down_write' follows non-static
include/asm/rwsem.h:171: warning: `__down_write_trylock' declared inline after being called
include/asm/rwsem.h:171: warning: static declaration for `__down_write_trylock' follows non-static
include/asm/rwsem.h:184: warning: `__up_read' declared inline after being called
include/asm/rwsem.h:184: warning: static declaration for `__up_read' follows non-static
include/asm/rwsem.h:208: warning: `__up_write' declared inline after being called
include/asm/rwsem.h:208: warning: static declaration for `__up_write' follows non-static
include/asm/rwsem.h:233: warning: `__downgrade_write' declared inline after being called
include/asm/rwsem.h:233: warning: static declaration for `__downgrade_write' follows non-static
make[3]: *** [drivers/usb/media/sn9c102_core.o] Error 1
This involved reworking the usb_serial_debug_data() function too.
Based on a request from SuSE, and numerous user confusions with how
to enable this option. Now that all usb-serial drivers are using
module_param() it can be set from the boot command line if the drivers
are built into the kernel.
[PATCH] Updates for W99[87]CF and new SN9C10[12] driver
This single patch contains some updates and cleanups for
the W996[87]CF driver and a new experimental V4L2 driver
for SONiX SN9C10[12] PC Camera Controllers connected to various
image sensors. I have not divided the patch in two logical
sub-patches becouse of two independent changes in one common
file, KConfigure.
More informations about the SN9C10[12] can be found below in the
documentation. The driver is marked as "EXPERIMENTAL", meaning
that there are no known bugs, but further testing is necessary
before considering it stable. This the first driver using the new
SBGGR8 video format, which has been recently added to the mainline
kernel, so there are no available user application at the moment:
this is one more reason why it should be in the kernel now.
Changes in W996[87]CF:
- remove w9968cf_externaldef.h now that ovcamchip.h is in the kernel;
- mark user pointers with __user in a cleaner way to avoid sparse
warnings;
- use appropriate exclusive wait macro during open();
- replace info(), err(), warn() with dev_info(), dev_err(), dev_warn(),
pr_debug(), pr_info();
- replace usb_unlink_urb() + wait_for_completion() with usb_kill_urb();
- fix memory offsets for buffers in the chip to be used with generic
image sensors;
- 'vppmod_load', 'debug', 'specific_debug' and 'simcams' module
parameters are now writeable by default;
- fix possible race conditions between disconnect() and open();
- add automatic 'ovcamchip' module loading option with 'ovmod_load'
module parameter;
- get rid of deprecated intermodule communication routines and use the
correct module registration/unregistration approach;
- remove period at the end of kernel messages;
- fix several typos;
- use MODULE_VERSION() macro;
- other small internal cleanups;
- documentation updates.
David Brownell [Wed, 14 Jul 2004 08:00:36 +0000 (01:00 -0700)]
[PATCH] USB: usb ethernet gadget, minor fixes + basic OTG support
Update CDC Ethernet/RNDIS gadget driver to the latest:
- Basics of OTG support: providing the OTG descriptor
in each configuration (as needed). No HNP yet.
- Stop issuing partial-packet reads. There's some hardware that
only counts reads in packets, not bytes, so let's not bother.
There are still software checks to catch framing gone wild.
- Fix a small bug that crept in with a memory leak fix: after
RNDIS requests, ep0 responses would use the RNDIS completion
handler even for non-RNDIS requests.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
David Brownell [Wed, 14 Jul 2004 08:00:19 +0000 (01:00 -0700)]
[PATCH] USB: usb gadget zero, basic OTG updates
This patch teaches "gadget zero" enough about OTG to pass simple USBCV
tests, mostly by including OTG descriptors in each configuration. It
tests and reports OTG status, as reported by the USB controller driver.
It also adds an option to build gadget zero to act as the designated
OTG "HNP Test Device", which exists primarily to trigger HNP. However,
it won't currently request HNP.
Includes other minor tweaks: delete a timer on disconnect, reset
the req->zero flag, don't autoresume after disconnect.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
David Brownell [Wed, 14 Jul 2004 08:00:02 +0000 (01:00 -0700)]
[PATCH] USB: usb gadget API updates
Gadget API updates, including new features:
- Adds several new optional calls that can be made to the
USB peripheral controller:
* VBUS session reporting, for use mostly by external
transcievers (such as isp1301). Detection of VBUS
power is the first step in enumeration, and usually
corresponds to a device being plugged into a hub.
* "Soft Connect" feature, wherein the D+ pullup is under
gadget driver control. This is a second step during
enumeration, which lets the hub see the new device.
(Based on a patch by Alex Sanks <alex@netchip.com>.)
* Control over VBUS current draw. So for example this is
what a gadget driver uses during SET_CONFIGURATION to
say "it's OK to draw 300 mA from VBUS to recharge".
- Basic interfaces to support device-side USB OTG. Feature
flags and descriptors are in <linux/usb_ch9.h> already.
* Reports whether the device has a Mini-AB port, so
that OTG support (desriptors etc) is required.
* Reports OTG device feature flags for HNP. (The OTG
spec requires user interfaces to report this stuff.)
Say if this is a B-Peripheral or an A-Peripheral.
* Says that usb_gadget_wakeup() is how to access SRP,
and usb_gadget_disconnect() is how to access HNP.
- Minor updates/cleanups to comments (Linux 2.5-->2.6 etc)
Currently there's no support for SRP-only OTG devices.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
David Brownell [Wed, 14 Jul 2004 07:59:25 +0000 (00:59 -0700)]
[PATCH] USB: usb serial gadget, add omap_udc
This lets the serial gadget work with another controller.
Tell serial about omap_udc. This driver still needs updating to
use the endpoint autoconfig suppport; like Gadget Zero, it
really shouldn't need _any_ hardware-specific #ifdeffery.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Anton Blanchard [Wed, 14 Jul 2004 11:00:50 +0000 (07:00 -0400)]
[PATCH] tg3 bug
During receive processing, the tg3 card updates rx_producer (the
hardware position in the receive ring) and the opaque cookie. Due to PCI
rules the stores happen in order. However the cpu may reorder the reads.
In these sort of cases there is usually a data dependency between
reading the index and looking up the data (since we use the index to
load the data). I think all cpus except alpha guarantee the reads
happen in order in this case.
However in this particular case we load hw_idx, compare it to sw_idx and
then use sw_idx to locate the opaque cookie. There is no data dependency
in this case. We need a read memory barrier between the read of
rx_producer and the opaque cookie to enforce ordering.
Thanks to Olof Johansson, Michael Chan and Broadcom for their assistance
in finding this bug.
Andrew Morton [Wed, 14 Jul 2004 10:42:35 +0000 (06:42 -0400)]
[PATCH] fix airo oops-on-removal
From: Bill Nottingham <notting@redhat.com>
airo creates /proc/driver/aironet/<device name> on device activation.
However, the device can be renamed - then on teardown it tries to remove
the wrong directory. The removal of /proc/driver/aironet then runs afoul
of the BUG_ON() in remove_proc_entry.
This fixes it by keeping a copy of the name of the directory it created.
(It doesn't actually solve the problem of the stats directory still being
/proc/driver/aironet/eth0 when you rename the device to, say, 'joe'. But
that patch would be a little less trivial.)
2004-07-12 Margit Schubert-While <margitsw@t-online.de>
* The OID type for BSSID was incorrectly set to type SSID.
It should be type RAW. This lead to interesting reporting
by "iwpriv ethX g_bssid".
(Which caused garbage output and possibly an out of bound)
* Be ultra-cautious in reporting SSID by changing the "%s"
to "%.*s" and passing the length. (Prompted by the false
type above, whereby length = 0 and a %s on a garbage field)
Pavel Roskin [Wed, 14 Jul 2004 10:25:46 +0000 (06:25 -0400)]
[netdrvr pci-skeleton] refresh
Here it is. The patch fixes all compile errors and warnings in
pci-skeleton.c. The "debug" parameter lacks corresponding variable,
so I removed it to avoid a warning on module load. Obsolete
pci_power_on() and pci_power_off() have been replaced with the new
code using pci_set_power_state(), pci_save_state() and
pci_restore_state(). The driver has been tested by compiling it as
module and as part of the kernel.
David T. Hollis [Wed, 14 Jul 2004 07:51:11 +0000 (00:51 -0700)]
[PATCH] USB: ax8817x_unbind does not free the interrupt URB after unlinking
ax8817x_unbind does not free the interrupt URB after unlinking.
Noticed that the net->status already has a flag for link so my
private structure variable for link was redundant. Worked around
this and was able to kill off the unique ax8817x_get_link() function
in the process.
Signed-off-by: David Hollis <dhollis@davehollis.com> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
David T. Hollis [Wed, 14 Jul 2004 07:48:36 +0000 (00:48 -0700)]
[PATCH] USB: usbnet:ax8817x - use interrupt URB for link detection
This patch uses the interrupt URB on the ax8817x for link detection.
This allows the driver to notify userspace when link drops/comes back
so it can take action such as run dhclient, etc.
I was also able to reduce the bind function by using some of the stock
mii_xxx calls as well as my own for handling initial link negotiation.
Signed-off-by: David Hollis <dhollis@davehollis.com> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Alan Stern [Wed, 14 Jul 2004 07:48:19 +0000 (00:48 -0700)]
[PATCH] USB: Allow NULL argument in usb_unlink_urb() and usb_kill_urb()
It makes sense for APIs involved in cleanup activities (like kfree()) to
accept NULL arguments. Doing so frees drivers from the responsibility of
checking whether each resource was actually acquired before trying to
release it. Accordingly, this patch makes usb_unlink_urb() and
usb_kill_urb() accept a NULL pointer (which used to be acceptable until I
changed it) and notes explicitly in the kerneldoc that such arguments are
permitted.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Dan Streetman [Wed, 14 Jul 2004 07:47:36 +0000 (00:47 -0700)]
[PATCH] USB: fix usbfs mount options ignored bug
Ok here is a patch to make the mount options work. In addition to
implementing the remount function, it removes the parse_options() call
from usb_fill_super and adds a "ignore" flag around the mounting that gets
done in create_special_files. The parse_options call in usb_fill_super is
removed because it is not needed when remount is implemented. The
ignore_mount flag is needed because the simple_pin_fs function calls
remount with no mount options - i.e. it's not a real mount. So the mount
options would be cleared out. The ignore_mount flag causes the remount
function to only act on real mounts.
Alan Stern [Wed, 14 Jul 2004 07:46:59 +0000 (00:46 -0700)]
[PATCH] USB: Fix endianness bug in UHCI driver
This patch fixes a byte-swapping error in the UHCI driver. It has been
present since 2.6.6 and only got tracked down just now! Thanks a lot to
Michel Roelofs for all his help and testing.
This should be pushed through to Linus in time to appear in 2.6.8, if
possible.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Mika Kukkonen [Wed, 14 Jul 2004 07:46:38 +0000 (00:46 -0700)]
[PATCH] USB: Trivial fix to include/linux/usb.h
Hi Greg!
I am compiling allmodconfig with some extra gcc warnings enabled
(-W -Wno-unused -Wno-sign-compare -Winline -Wundef) and got this one:
CC [M] security/root_plug.o
In file included from security/root_plug.c:30:
include/linux/usb.h:358: warning: `inline' is not at beginning of declaration
Alan Stern [Wed, 14 Jul 2004 07:42:40 +0000 (00:42 -0700)]
[PATCH] USB: Remove hub's children upon unbinding
This patch fixes a logical hole in the hub driver. It's possible for the
driver to be unbound from a hub without physically unplugging the hub.
For example, writing 0 into the bConfigurationValue attribute file will
have this effect. When this happens, we need to make sure that all the
child devices of the hub are logically disconnected and their ports
disabled.
That's what this patch does. It's a little bit tricky because we can't
simply call usb_disconnect() from within the hub driver's disconnect()
routine. While that routine is running it holds the usb bus writelock,
but usb_disconnect() would try to acquire it again. Instead
schedule_work() is used, so after a brief delay the children will be
removed.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Alan Stern [Wed, 14 Jul 2004 07:41:28 +0000 (00:41 -0700)]
[PATCH] USB: Store pointer to usb_device in private hub structure
This patch adds a pointer to the hub's usb_device into the usb_hub private
structure. It's a small change, and permits a small amount of
simplification in a few spots, i.e., avoid calling interface_to_usbdev().
This doesn't really do much in itself, but it's a prerequisite for the
next patch. (A situation arises where we can't use the interface pointer
to find the usb_device because the interface might not exist.)
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Alan Stern [Wed, 14 Jul 2004 07:36:54 +0000 (00:36 -0700)]
[PATCH] USB: Don't ask for string descriptor lengths
Okay, here's a revised patch (as332b). This tries first to ask for 255
bytes, and if that fails then it asks for the length and the full
descriptor. Hopefully nobody will object to applying this version...
You know, it occurs to me that the have_langid field in usb_device could
easily be eliminated. Just set string_langid to -1 during initialization
and test for whether or not it is >= 0. I'll do that some other time.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Alan Stern [Wed, 14 Jul 2004 07:29:19 +0000 (00:29 -0700)]
[PATCH] USB: Make hub driver use usb_kill_urb()
This is a rerun of as278, updated to match the current source. It changes
the hub driver, replacing calls to synchronous usb_unlink_urb() with
usb_kill_urb() and removing the machinery formerly needed to synchronize
the status URB handler with the rest of the driver.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Alan Stern [Wed, 14 Jul 2004 07:28:52 +0000 (00:28 -0700)]
[PATCH] USB: Add usb_kill_urb()
This patch is a slightly revised version of as277c, updated to match the
current source. The only difference from the older version is that this
makes urb->use_count into an atomic_t, to avoid the overhead of an extra
locking step each time an URB is submitted and given back. The important
features of this patch are:
-EPERM added to Documentation/usb/error-codes.txt.
Failure to use URB_ASYNC_UNLINK with usb_unlink_urb() is
deprecated in the documentation.
New ->reject and ->use_count fields added to struct urb.
The reject field is protected by urb->lock, and locking is
required only in usb_kill_urb() which doesn't have to be fast.
Single wait_queue used for all processes waiting inside
usb_kill_urb(). The wait queue is woken up only when an URB
is given back with ->reject set.
usb_rh_status_dequeue() changed to return int. It looks like
this function should be declared static; it's not used outside
the hcd.c file.
Prototype for unlink_urb() in struct usb_operations is changed
to include a status code argument. This is necessary so that
the different unlink paths can return -ENOENT and -ECONNRESET
as appropriate.
Support for synchronous usb_unlink_urb() has been removed;
such calls are passed to usb_kill_urb().
Kerneldoc for usb_unlink_urb() is updated.
usb_kill_urb() added to urb.c.
hc_simple() host driver is partially updated -- it should
compile but it won't really work right.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Jean Delvare [Wed, 14 Jul 2004 04:51:29 +0000 (21:51 -0700)]
[PATCH] I2C: Refine detection of LM75 chips
The LM75 detection method was a bit loose so far and would accept
non-LM75-compatible chips from times to times. It should be better now.
Additionally, the help for the lm75 driver was reworked because we now
know that the LM75 and the LM77 are not compatible.
Signed-off-by: Jean Delvare <khali at linux-fr dot org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
[PATCH] mconf.c: Honor $LINES and $COLUMNS if TIOCGWINSZ failed
While reading code, I found this buglet. If the TIOCGWINSZ fails,
mconf.c assumes 24/80 as screen size, without honoring the LINES and
COLUMNS environment variables. This is the shorter and IMHO more
correct version.