printk ("%02x ", (unsigned char)(tbuf)[j]); 
printk("%02x ", (unsigned char)(tbuf)[j]); 
static int proc_control(struct dev_state *ps, void __user *arg){	struct usb_device *dev = ps->dev;	struct usbdevfs_ctrltransfer ctrl;	unsigned int tmo;	unsigned char *tbuf;	int i, j, ret;	if (copy_from_user(&ctrl, arg, sizeof(ctrl)))		return -EFAULT;	if ((ret = check_ctrlrecip(ps, ctrl.bRequestType, ctrl.wIndex)))		return ret;	if (ctrl.wLength > PAGE_SIZE)		return -EINVAL;	if (!(tbuf = (unsigned char *)__get_free_page(GFP_KERNEL)))		return -ENOMEM;	tmo = ctrl.timeout;	if (ctrl.bRequestType & 0x80) {		if (ctrl.wLength && !access_ok(VERIFY_WRITE, ctrl.data, ctrl.wLength)) {			free_page((unsigned long)tbuf);			return -EINVAL;		}		snoop(&dev->dev, "control read: bRequest=%02x "				"bRrequestType=%02x wValue=%04x "				"wIndex=%04x wLength=%04x\n",			ctrl.bRequest, ctrl.bRequestType, ctrl.wValue,				ctrl.wIndex, ctrl.wLength);		usb_unlock_device(dev);		i = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), ctrl.bRequest, ctrl.bRequestType,				       ctrl.wValue, ctrl.wIndex, tbuf, ctrl.wLength, tmo);		usb_lock_device(dev);		if ((i > 0) && ctrl.wLength) {			if (usbfs_snoop) {				dev_info(&dev->dev, "control read: data ");				for (j = 0; j < i; ++j)					printk ("%02x ", (unsigned char)(tbuf)[j]);				printk("\n");			}			if (copy_to_user(ctrl.data, tbuf, i)) {				free_page((unsigned long)tbuf);				return -EFAULT;			}		}	} else {		if (ctrl.wLength) {			if (copy_from_user(tbuf, ctrl.data, ctrl.wLength)) {				free_page((unsigned long)tbuf);				return -EFAULT;			}		}		snoop(&dev->dev, "control write: bRequest=%02x "				"bRrequestType=%02x wValue=%04x "				"wIndex=%04x wLength=%04x\n",			ctrl.bRequest, ctrl.bRequestType, ctrl.wValue,				ctrl.wIndex, ctrl.wLength);		if (usbfs_snoop) {			dev_info(&dev->dev, "control write: data: ");			for (j = 0; j < ctrl.wLength; ++j)				printk ("%02x ", (unsigned char)(tbuf)[j]);			printk("\n");		}		usb_unlock_device(dev);		i = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), ctrl.bRequest, ctrl.bRequestType,				       ctrl.wValue, ctrl.wIndex, tbuf, ctrl.wLength, tmo);		usb_lock_device(dev);	}	free_page((unsigned long)tbuf);	if (i<0 && i != -EPIPE) {		dev_printk(KERN_DEBUG, &dev->dev, "usbfs: USBDEVFS_CONTROL "			   "failed cmd %s rqt %u rq %u len %u ret %d\n",			   current->comm, ctrl.bRequestType, ctrl.bRequest,			   ctrl.wLength, i);	}	return i;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/e639dd3f4edd4847d160899b19e95ee1a06a6dcb/devio.c/buggy/drivers/usb/core/devio.c