android_kernel_xiaomi_sm7250/drivers
Pete Zaitcev c36fc889b5 [PATCH] usb: Patch for USBDEVFS_IOCTL from 32-bit programs
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>
2005-10-28 16:47:46 -07:00
..
acorn
acpi
atm
base [PATCH] root hub changes (lesser half) 2005-10-28 16:47:40 -07:00
block [PATCH] ub: suppress gcc warnings for pointer casts 2005-10-28 16:47:38 -07:00
bluetooth [Bluetooth] Ignore additional interfaces of BPA 100/105 devices 2005-10-28 19:20:57 +02:00
cdrom
char Merge ../bleed-2.6 2005-10-28 10:13:16 -07:00
connector
cpufreq [PATCH] cpufreq: SMP fix for conservative governor 2005-10-27 16:29:24 -07:00
crypto
dio
eisa
fc4
firmware
hwmon [PATCH] hwmon: smsc47m1 documentation update 2005-10-28 14:02:14 -07:00
i2c [PATCH] I2C: remove devfs support from i2c-dev driver 2005-10-28 14:02:14 -07:00
ide [PATCH] Driver Core: fix up all callers of class_device_create() 2005-10-28 09:52:52 -07:00
ieee1394 Merge ../bleed-2.6 2005-10-28 10:13:16 -07:00
infiniband Merge ../bleed-2.6 2005-10-28 10:13:16 -07:00
input Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6 2005-10-28 13:09:47 -07:00
isdn [PATCH] Driver Core: fix up all callers of class_device_create() 2005-10-28 09:52:52 -07:00
macintosh [PATCH] Input: convert drivers/macintosh to dynamic input_dev allocation 2005-10-28 09:52:53 -07:00
mca
md [PATCH] gfp_t: remaining bits of drivers/* 2005-10-28 08:16:51 -07:00
media [PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks 2005-10-28 09:52:56 -07:00
message [PATCH] Driver Core: fix up all callers of class_device_create() 2005-10-28 09:52:52 -07:00
mfd [PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks 2005-10-28 09:52:56 -07:00
misc
mmc [MMC] wbsd suspend support 2005-10-28 21:37:29 +01:00
mtd Merge ../bleed-2.6 2005-10-28 10:13:16 -07:00
net Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6 2005-10-28 13:09:47 -07:00
nubus
oprofile
parisc Auto-update from upstream 2005-10-28 12:18:07 -04:00
parport [PARISC] Convert parisc_device to use struct resource for hpa 2005-10-21 22:36:40 -04:00
pci [PATCH] USB: move handoff code 2005-10-28 16:47:38 -07:00
pcmcia pcmcia: add socket register data to sysfs for yenta devices 2005-10-28 13:55:08 -07:00
pnp
s390 Merge ../bleed-2.6 2005-10-28 10:13:16 -07:00
sbus
scsi [PATCH] PCI: Convert megaraid to use pci_driver shutdown method 2005-10-28 15:37:01 -07:00
serial Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6 2005-10-28 13:09:47 -07:00
sh
sn
tc
telephony
usb [PATCH] usb: Patch for USBDEVFS_IOCTL from 32-bit programs 2005-10-28 16:47:46 -07:00
video [PATCH] pci_ids: macros: replace partial with whole symbols 2005-10-28 15:36:59 -07:00
w1
zorro
Kconfig
Makefile [PATCH] USB: move handoff code 2005-10-28 16:47:38 -07:00