| Age | Commit message (Collapse) | Author |
|
Dell supplied me with the following test:
#include<stdio.h>
#include<errno.h>
#include<sys/ioctl.h>
#include<fcntl.h>
#include<linux/usbdevice_fs.h>
main(int argc,char*argv[])
{
struct usbdevfs_hub_portinfo hubPortInfo = {0};
struct usbdevfs_ioctl command = {0};
command.ifno = 0;
command.ioctl_code = USBDEVFS_HUB_PORTINFO;
command.data = (void*)&hubPortInfo;
int fd, ret;
if(argc != 2) {
fprintf(stderr,"Usage: %s /proc/bus/usb/<BusNo>/<HubID>\n",argv[0]);
fprintf(stderr,"Example: %s /proc/bus/usb/001/001\n",argv[0]);
exit(1);
}
errno = 0;
fd = open(argv[1],O_RDWR);
if(fd < 0) {
perror("open failed:");
exit(errno);
}
errno = 0;
ret = ioctl(fd,USBDEVFS_IOCTL,&command);
printf("IOCTL return status:%d\n",ret);
if(ret<0) {
perror("IOCTL failed:");
close(fd);
exit(3);
} else {
printf("IOCTL passed:Num of ports %d\n",hubPortInfo.nports);
close(fd);
exit(0);
}
return 0;
}
I have verified that it breaks if built in 32 bit mode on x86_64 and that
the patch below fixes it.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
[USBDEVFS] fix inclusion of <linux/compat.h> to avoud header mess
Without moving the include of compat.h down, userspace programs that use
usbdevice_fs.h end up including half the kernel includes (and eventually
fail to compile).
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
From: Christopher Li <chrisl@vmware.com>
- Let usbdevfs directly handle 32 bit URB ioctl. More specifically:
USBDEVFS_SUBMITURB32, USBDEVFS_REAPURB32 and USBDEVFS_REAPURBNDELAY32.
Those asynchronous ioctls are too complicate to handle by the
compatible layer.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
|
|
This has been publicised for years now, and the usvfs name will work just
fine with a 2.4 kernel, so we are not breaking backwards compatibility.
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
|
|
usb ioctls in compat_ioctl.c switched to compat_alloc_user_space()
and cleaned up; ioctl structures annotated.
|
|
devio.c | 43 +++++++++++++++++++++++--------------------
usbdevice_fs.h | 1 -
2 files changed, 23 insertions(+), 21 deletions(-)
|
|
|
|
This has minor usbcore cleanups:
DOC:
- the changes passing a usb_interface to driver probe() and disconnect()
weren't reflected in their adjacent docs. likewise they still said
it was possible to get a null usb_device_id (no more).
- the (root) hub API restrictions from rmk's ARM patch weren't
flagged
- mention the non-dma-coherent cache issue for usb_buffer_alloc()
- mention disconnect() cleanup issue with usb_{control,bulk}_msg()
[ you can't cancel those urbs from disconnect() ]
CODE
- make driver ioctl() use 'usb_interface' too ... this update
also resolves an old 'one instance per device' bad assumption
- module locking on driver->ioctl() was goofy, kept BKL way too
long and didn't try_inc_mod_count() like the rest of usbcore
- hcd unlink code treated iso inappropriately like interrupt;
only interrupt still wants that automagic mode
- move iso init out of ohci into shared submit_urb logic
- remove interrupt transfer length restriction; hcds that don't
handle packetization (just like bulk :) should be updated,
but device drivers won't care for now.
|
|
This patch fixes two problems that have already been discussed
on this list:
- USB_QUEUE_BULK is rather pointless (and UHCI-specific).
If drivers really want only one bulk urb queued at a time,
they just shouldn't issue such urbs till others complete.
FIX: remove it entirely.
- USB_DISABLE_SPD is horribly named (based on a UHCI flag).
What it really does is turn non-ISO short reads into errors.
FIX: rename it. Now it's URB_SHORT_NOT_OK.
I changed all the drivers using these two flags, including
corresponding changes in the "usbfs" API.
Most of the patch by volume is doc updates:
- Documentation/usb/URB.txt hadn't been updated in two years (!)
and was pretty out of date. It also had many details that were
inappropriately specific to usb-uhci.
- Most of the URB flags weren't even commented as to intent.
- DISABLE_SPD was often documented as if it were SHORT_IS_OK.
- There was still some doc saying how iso should use urb->next.
There are also some related updates:
- Some of the submit sanity checks for transfer flags were
overly broad ... SHORT_NOT_OK is only for reads, NO_FSBR
is for non-periodic requests, ZERO_PACKET only for writes.
- The ohci-hcd code thought SHORT_NOT_OK worked for ISO.
- The uhci-hcd code thought QUEUE_BULK applied to non-bulk
Note that this patch doesn't update any of the "old" HCDs,
including usb-ohci-hcd.
In the case of usb-uhci{,-hcd} it'd have been painful to fix
the QUEUE_BULK logic. That logic was, I think, the original
reason to have that flag! So I count switching to "uhci-hcd"
as a win already ... :)
|
|
This was originally created by David many months ago and posted to the
list, but not put into the kernel.
I modified the original patch to:
-patch against the 2.5.7 kernel
-use the 'real' interface number, not position (to do this I added 2
methods in usb.c)
|
|
- Kai Germaschewski: ISDN updates
- Al Viro: start moving buffer cache indexing to "struct block_device *"
- Greg KH: USB update
- Russell King: fix up some ARM merge issues
- Ingo Molnar: scalable scheduler
|
|
- Davide Libenzi: nicer timeslices for scheduler
- Arnaldo: wd7000 scsi driver cleanups and bio update
- Greg KH: USB update (including initial 2.0 support)
- me: strict typechecking on "kdev_t"
|
|
- merge with Alan (USB, zoran, sony motion-eye, rio, dmi-scan)
|
|
|