[linux-usb-devel] I love you!
your big love, ;-) Dangerous Attachment has been Removed. The file story_linux-usb-devel.zip has been removed because of a virus. It was infected with the W32/[EMAIL PROTECTED] virus. File quarantined as: . http://www.fortinet.com/VirusEncyclopedia/search/encyclopediaSearch.do?method=quickSearchDirectlyvirusName=W32%2FNetsky.P%40mm- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] How to write a user-space application for usb_skeleton?
Oliver Neukum wrote: Am Donnerstag 02 August 2007 schrieb Thaens Tim: I've compiled the usb_skeleton.c module and loaded this module. I've managed to open a USB-device, but that's it. How can I write a application that uses this module? Can I only use the file-operations like (owner, read, write, open and release)? Yes. Or you can instead use libusb. That allows you do most of the things you can do from a driver, but instead from userspace. -- Phil Dibowitz [EMAIL PROTECTED] Open Source software and tech docsInsanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/ Never write it in C if you can do it in 'awk'; Never do it in 'awk' if 'sed' can handle it; Never use 'sed' when 'tr' can do the job; Never invoke 'tr' when 'cat' is sufficient; Avoid using 'cat' whenever possible -- Taylor's Laws of Programming signature.asc Description: OpenPGP digital signature - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Disable autosuspend for scanners/printers
-Original Message- From: Greg KH [EMAIL PROTECTED] Sent: 10/08/07 04:30 =There's no way we could ever get a list of all good or all bad printers, =so no matter what we do, we'd miss some :( But better to miss suspend on some than miss working altogether on others surely? I never heard an outcry on lack if suspend that compares to that from those whose USB devices stopped working when their distro upgraded the kernel. Sam - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] [PATCH] USB: make HCDs responsible for managing endpoint queues
Hi, Alan Please test the changes to your respective drivers. I don't have the necessary hardware. I applied this patch. I tested USB testing driver and some usb device and I confirmed it is working. Thanks, Yoshihiro Shimoda - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Disable autosuspend for scanners/printers
On Fri, 10 Aug 2007, Sam Liddicott wrote: From: Greg KH [EMAIL PROTECTED] Sent: 10/08/07 04:30 =There's no way we could ever get a list of all good or all bad printers, =so no matter what we do, we'd miss some :( But better to miss suspend on some than miss working altogether on others surely? I never heard an outcry on lack if suspend that compares to that from those whose USB devices stopped working when their distro upgraded the kernel. Even if we don't handle printers right now, it would help to cover all scanners with a single class-wide quirks entry instead of lots of individual device entries. Alan Stern - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] Question about hub_thread
On Fri, 10 Aug 2007, jidong xiao wrote: Here are the piece of code from 2.6.22.1, 2817 static int hub_thread(void *__unused) 2818 { 2819 do { 2820 hub_events(); 2821 wait_event_interruptible(khubd_wait, 2822 !list_empty(hub_event_list) || 2823 kthread_should_stop()); 2824 try_to_freeze(); 2825 } while (!kthread_should_stop() || !list_empty(hub_event_list)); 2826 2827 pr_debug(%s: khubd exiting\n, usbcore_name); 2828 return 0; 2829 } I have a question. try_to_freeze should be the only way for this thread to go suspended. If we have already gone sleeping via wait_event_interruptible(), then if there is signal to wakeup this thread and ask it to go to suspended,then wait_event_interruptible will return and try_to_freeze() will be invoked and hence this thread will go into refrigerator. But if we are still running inside hub_events(),then if we received any signal, what will happen?still try_to_freeze will be executed?why? Nothing will happen. The thread will continue to run inside hub_events() and it won't freeze until hub_events() returns. Alan Stern - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] [PATCH] USB: make HCDs responsible for managing endpoint queues
On Fri, 10 Aug 2007, Yoshihiro Shimoda wrote: Hi, Alan Please test the changes to your respective drivers. I don't have the necessary hardware. I applied this patch. I tested USB testing driver and some usb device and I confirmed it is working. Good. Thank you for testing. Alan Stern - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] is the hiddev* allocation order guaranteed?
On Friday 10 August 2007, Folkert van Heusden wrote: My question now is: will each device always have the same node? Will device A always get for example /dev/usb/hiddev0? and C always /dev/usb/hiddev2? Not as a rule, although you might notice they don't differ a lot in some cases. I'd certainly not depend on hitting those cases! Example, putting some other HID devices onto the system could very easily resequence things. And if that is not the case, how can I then find those? Will it work if I use busnum, devnum and ifnum? Observe the P: lines in /proc/bus/input/devices ... those will stay the same unless you re-wire things, since they express the physical topology not which-showed-up-first. That value is in hid-phys. - Dave - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] patch usb-remove-debug-definition-from-dummy_hcd.patch added to gregkh-2.6 tree
This is a note to let you know that I've just added the patch titled Subject: USB: remove DEBUG definition from dummy_hcd to my gregkh-2.6 tree. Its filename is usb-remove-debug-definition-from-dummy_hcd.patch This tree can be found at http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/ From [EMAIL PROTECTED] Fri Aug 10 11:08:05 2007 From: Alan Stern [EMAIL PROTECTED] Date: Wed, 8 Aug 2007 17:16:12 -0400 (EDT) Subject: USB: remove DEBUG definition from dummy_hcd To: Greg KH [EMAIL PROTECTED] Cc: Gabriel C [EMAIL PROTECTED], USB development list linux-usb-devel@lists.sourceforge.net Message-ID: [EMAIL PROTECTED] This patch (as958) removes an unneeded and unwanted #define line from dummy_hcd. Signed-off-by: Alan Stern [EMAIL PROTECTED] Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED] --- drivers/usb/gadget/dummy_hcd.c |2 -- 1 file changed, 2 deletions(-) --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c @@ -34,8 +34,6 @@ * bypassing some hardware (and driver) issues. UML could help too. */ -#define DEBUG - #include linux/module.h #include linux/kernel.h #include linux/delay.h Patches currently in gregkh-2.6 which might be from [EMAIL PROTECTED] are driver/sysfs-fix-locking-in-sysfs_lookup-and-sysfs_rename_dir.patch driver/sysfs-remove-first-pass-at-shadow-directory-support.patch driver/sysfs-cosmetic-changes-in-sysfs_lookup.patch driver/sysfs-make-sysfs_add-remove_one-call-link-unlink_sibling-implictly.patch driver/sysfs-make-sysfs_add_one-automatically-check-for-duplicate-entry.patch driver/sysfs-make-sysfs_addrm_finish-return-void.patch driver/sysfs-simplify-sysfs_rename_dir.patch usb/usb-add-ep-enable.patch usb/usb-fix-bug-with-ehci-cpufreq-patch-on-nvidia-controllers.patch usb/usb-add-direction-bit-to-urb-transfer_flags.patch usb/usb-add-urb-ep.patch usb/usb-address-0-handling-during-device-initialization.patch usb/usb-avoid-urb-pipe-in-usbfs.patch usb/usb-avoid-urb-pipe-in-usbmon.patch usb/usb-avoid-using-urb-pipe-in-usbcore.patch usb/usb-cdc-acm-fix-sysfs-attribute-registration-bug.patch usb/usb-cleanup-for-previous-patches.patch usb/usb-gadget-file-storage-gadget-cleanups.patch usb/usb-separate-out-endpoint-queue-management-and-dma-mapping-routines.patch usb/usb-update-spinlock-usage-for-root-hub-urbs.patch usb/usb-stall-control-endpoint-when-file-storage-class-request-wvalue-0.patch usb/usb-cleanups-for-g_file_storage.patch usb/usb-don-t-touch-sysfs-stuff-when-altsetting-is-unchanged.patch usb/usb-make-hcds-responsible-for-managing-endpoint-queues.patch usb/usb-remove-debug-definition-from-dummy_hcd.patch - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] patch usb-don-t-touch-sysfs-stuff-when-altsetting-is-unchanged.patch added to gregkh-2.6 tree
This is a note to let you know that I've just added the patch titled Subject: USB: don't touch sysfs stuff when altsetting is unchanged to my gregkh-2.6 tree. Its filename is usb-don-t-touch-sysfs-stuff-when-altsetting-is-unchanged.patch This tree can be found at http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/ From [EMAIL PROTECTED] Fri Aug 10 11:06:57 2007 From: Alan Stern [EMAIL PROTECTED] Date: Wed, 8 Aug 2007 11:59:18 -0400 (EDT) Subject: USB: don't touch sysfs stuff when altsetting is unchanged To: Greg KH [EMAIL PROTECTED] Cc: USB development list linux-usb-devel@lists.sourceforge.net Message-ID: [EMAIL PROTECTED] This patch (as955) prevents the interface-related sysfs files and endpoint pseudo-devices from being deleted and recreated when a call to usb_set_interface() specifies the current altsetting. Since the altsetting doesn't get changed, there's no need to do anything. Furthermore, avoiding changes to the endpoint devices will be necessary in the future. This code is called from usb_reset_device(), which gets invoked for reset-resume processing, but upcoming changes to the PM and driver cores will make it impossible to register devices while a suspend/resume transition is in progress. Since we don't need to re-register those endpoint devices anyhow, it's best to skip the whole thing. Signed-off-by: Alan Stern [EMAIL PROTECTED] Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED] --- drivers/usb/core/message.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -1173,6 +1173,7 @@ int usb_set_interface(struct usb_device struct usb_host_interface *alt; int ret; int manual = 0; + int changed; if (dev-state == USB_STATE_SUSPENDED) return -EHOSTUNREACH; @@ -1212,7 +1213,8 @@ int usb_set_interface(struct usb_device */ /* prevent submissions using previous endpoint settings */ - if (device_is_registered(iface-dev)) + changed = (iface-cur_altsetting != alt); + if (changed device_is_registered(iface-dev)) usb_remove_sysfs_intf_files(iface); usb_disable_interface(dev, iface); @@ -1249,7 +1251,7 @@ int usb_set_interface(struct usb_device * (Likewise, EP0 never halts on well designed devices.) */ usb_enable_interface(dev, iface); - if (device_is_registered(iface-dev)) + if (changed device_is_registered(iface-dev)) usb_create_sysfs_intf_files(iface); return 0; Patches currently in gregkh-2.6 which might be from [EMAIL PROTECTED] are driver/sysfs-fix-locking-in-sysfs_lookup-and-sysfs_rename_dir.patch driver/sysfs-remove-first-pass-at-shadow-directory-support.patch driver/sysfs-cosmetic-changes-in-sysfs_lookup.patch driver/sysfs-make-sysfs_add-remove_one-call-link-unlink_sibling-implictly.patch driver/sysfs-make-sysfs_add_one-automatically-check-for-duplicate-entry.patch driver/sysfs-make-sysfs_addrm_finish-return-void.patch driver/sysfs-simplify-sysfs_rename_dir.patch usb/usb-add-ep-enable.patch usb/usb-fix-bug-with-ehci-cpufreq-patch-on-nvidia-controllers.patch usb/usb-add-direction-bit-to-urb-transfer_flags.patch usb/usb-add-urb-ep.patch usb/usb-address-0-handling-during-device-initialization.patch usb/usb-avoid-urb-pipe-in-usbfs.patch usb/usb-avoid-urb-pipe-in-usbmon.patch usb/usb-avoid-using-urb-pipe-in-usbcore.patch usb/usb-cdc-acm-fix-sysfs-attribute-registration-bug.patch usb/usb-cleanup-for-previous-patches.patch usb/usb-gadget-file-storage-gadget-cleanups.patch usb/usb-separate-out-endpoint-queue-management-and-dma-mapping-routines.patch usb/usb-update-spinlock-usage-for-root-hub-urbs.patch usb/usb-stall-control-endpoint-when-file-storage-class-request-wvalue-0.patch usb/usb-cleanups-for-g_file_storage.patch usb/usb-don-t-touch-sysfs-stuff-when-altsetting-is-unchanged.patch usb/usb-make-hcds-responsible-for-managing-endpoint-queues.patch usb/usb-remove-debug-definition-from-dummy_hcd.patch - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] [PATCH 0/9] SisUSB2VGA Cleanups
Hi, On 8/10/07, Felipe Balbi [EMAIL PROTECTED] wrote: The following patch series implements a series of cleanups in the sisusbvga driver. Still some stuff to do, but at least we can have better readability on the code. If anyone has any comments, please do. TODO: * Remove unnecessary cleanups Noted an error here... I meant #defines Sorry * Lots of ifdefs * Remove 2 warnings * Convert hex constants into more meaninful defines * Use static inline {} on ifdef'ed functions and put them on header files * Too many char *str = string; Try to find a better way of doing this * Remove undef's * int *ptr's can become int i's * Others to come. Best Regards, Felipe Balbi [EMAIL PROTECTED] +55 92 2126-1003 Kernel Developers Team - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel -- Best Regards, Felipe Balbi [EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] [PATCH 8/9] USB: SisUSB2VGA: Lindent drivers/usb/misc/sisusbvga/sisusb_init.c
From: Felipe Balbi [EMAIL PROTECTED] Better indentation Signed-off-by: Felipe Balbi [EMAIL PROTECTED] --- drivers/usb/misc/sisusbvga/sisusb_init.c | 262 +++--- 1 files changed, 133 insertions(+), 129 deletions(-) diff --git a/drivers/usb/misc/sisusbvga/sisusb_init.c b/drivers/usb/misc/sisusbvga/sisusb_init.c index 5d83582..273de5d 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_init.c +++ b/drivers/usb/misc/sisusbvga/sisusb_init.c @@ -55,18 +55,17 @@ /* POINTER INITIALIZATION*/ /*/ -static void -SiSUSB_InitPtr(struct SiS_Private *SiS_Pr) +static void SiSUSB_InitPtr(struct SiS_Private *SiS_Pr) { - SiS_Pr-SiS_ModeResInfo = SiSUSB_ModeResInfo; - SiS_Pr-SiS_StandTable= SiSUSB_StandTable; + SiS_Pr-SiS_ModeResInfo = SiSUSB_ModeResInfo; + SiS_Pr-SiS_StandTable = SiSUSB_StandTable; - SiS_Pr-SiS_SModeIDTable = SiSUSB_SModeIDTable; - SiS_Pr-SiS_EModeIDTable = SiSUSB_EModeIDTable; - SiS_Pr-SiS_RefIndex = SiSUSB_RefIndex; - SiS_Pr-SiS_CRT1Table = SiSUSB_CRT1Table; + SiS_Pr-SiS_SModeIDTable = SiSUSB_SModeIDTable; + SiS_Pr-SiS_EModeIDTable = SiSUSB_EModeIDTable; + SiS_Pr-SiS_RefIndex = SiSUSB_RefIndex; + SiS_Pr-SiS_CRT1Table = SiSUSB_CRT1Table; - SiS_Pr-SiS_VCLKData = SiSUSB_VCLKData; + SiS_Pr-SiS_VCLKData = SiSUSB_VCLKData; } /*/ @@ -75,21 +74,20 @@ SiSUSB_InitPtr(struct SiS_Private *SiS_Pr) static void SiS_SetReg(struct SiS_Private *SiS_Pr, unsigned long port, - unsigned short index, unsigned short data) + unsigned short index, unsigned short data) { sisusb_setidxreg(SiS_Pr-sisusb, port, index, data); } static void SiS_SetRegByte(struct SiS_Private *SiS_Pr, unsigned long port, - unsigned short data) + unsigned short data) { sisusb_setreg(SiS_Pr-sisusb, port, data); } static unsigned char -SiS_GetReg(struct SiS_Private *SiS_Pr, unsigned long port, - unsigned short index) +SiS_GetReg(struct SiS_Private *SiS_Pr, unsigned long port, unsigned short index) { u8 data; @@ -110,22 +108,22 @@ SiS_GetRegByte(struct SiS_Private *SiS_Pr, unsigned long port) static void SiS_SetRegANDOR(struct SiS_Private *SiS_Pr, unsigned long port, - unsigned short index, unsigned short DataAND, - unsigned short DataOR) + unsigned short index, unsigned short DataAND, + unsigned short DataOR) { sisusb_setidxregandor(SiS_Pr-sisusb, port, index, DataAND, DataOR); } static void SiS_SetRegAND(struct SiS_Private *SiS_Pr, unsigned long port, - unsigned short index, unsigned short DataAND) + unsigned short index, unsigned short DataAND) { sisusb_setidxregand(SiS_Pr-sisusb, port, index, DataAND); } static void -SiS_SetRegOR(struct SiS_Private *SiS_Pr,unsigned long port, - unsigned short index, unsigned short DataOR) +SiS_SetRegOR(struct SiS_Private *SiS_Pr, unsigned long port, +unsigned short index, unsigned short DataOR) { sisusb_setidxregor(SiS_Pr-sisusb, port, index, DataOR); } @@ -134,8 +132,7 @@ SiS_SetRegOR(struct SiS_Private *SiS_Pr,unsigned long port, /* HELPER: DisplayOn, DisplayOff*/ /*/ -static void -SiS_DisplayOn(struct SiS_Private *SiS_Pr) +static void SiS_DisplayOn(struct SiS_Private *SiS_Pr) { SiS_SetRegAND(SiS_Pr, SiS_Pr-SiS_P3c4, 0x01, 0xDF); } @@ -144,8 +141,7 @@ SiS_DisplayOn(struct SiS_Private *SiS_Pr) /*HELPER: Init Port Addresses*/ /*/ -static void -SiSUSBRegInit(struct SiS_Private *SiS_Pr, unsigned long BaseAddr) +static void SiSUSBRegInit(struct SiS_Private *SiS_Pr, unsigned long BaseAddr) { SiS_Pr-SiS_P3c4 = BaseAddr + 0x14; SiS_Pr-SiS_P3d4 = BaseAddr + 0x24; @@ -168,8 +164,7 @@ SiSUSBRegInit(struct SiS_Private *SiS_Pr, unsigned long BaseAddr) /* HELPER: GetSysFlags */ /*/ -static void -SiS_GetSysFlags(struct SiS_Private *SiS_Pr) +static void SiS_GetSysFlags(struct SiS_Private *SiS_Pr) { SiS_Pr-SiS_MyCR63 = 0x63; } @@ -178,8 +173,7 @@ SiS_GetSysFlags(struct SiS_Private *SiS_Pr) /* HELPER: Init PCI Engines*/ /*/ -static void -SiSInitPCIetc(struct SiS_Private *SiS_Pr) +static void SiSInitPCIetc(struct SiS_Private *SiS_Pr) { SiS_SetReg(SiS_Pr, SiS_Pr-SiS_P3c4, 0x20, 0xa1); /* - Enable 2D (0x40) @@ -195,8 +189,7 @@ SiSInitPCIetc(struct SiS_Private *SiS_Pr) /*HELPER: SET SEGMENT
[linux-usb-devel] [PATCH 3/9] USB: SisUSB2VGA: Remove if 0'ed code
From: Felipe Balbi [EMAIL PROTECTED] Unused code should be removed. We don't need to increase the size of the file with dead code inside if 0 statements. Signed-off-by: Felipe Balbi [EMAIL PROTECTED] --- drivers/usb/misc/sisusbvga/sisusb.c | 57 --- drivers/usb/misc/sisusbvga/sisusb.h |4 +- drivers/usb/misc/sisusbvga/sisusb_con.c | 47 --- drivers/usb/misc/sisusbvga/sisusb_init.c | 90 -- 4 files changed, 1 insertions(+), 197 deletions(-) diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index c33b121..4676520 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c @@ -1255,47 +1255,6 @@ static int sisusb_read_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr, addr += 4; length -= 4; } -#if 0 /* That does not work, as EP 2 is an OUT EP! */ - default: - CLEARPACKET(packet); - packet.header = 0x001f; - packet.address = 0x01a0; - packet.data= 0x0006; - ret |= sisusb_send_bridge_packet(sisusb, 10, - packet, 0); - packet.header = 0x001f; - packet.address = 0x01b0; - packet.data= (length ~3) | 0x4000; - ret |= sisusb_send_bridge_packet(sisusb, 10, - packet, 0); - packet.header = 0x001f; - packet.address = 0x01b4; - packet.data= addr; - ret |= sisusb_send_bridge_packet(sisusb, 10, - packet, 0); - packet.header = 0x001f; - packet.address = 0x01a4; - packet.data= 0x0001; - ret |= sisusb_send_bridge_packet(sisusb, 10, - packet, 0); - if (userbuffer) { - ret |= sisusb_recv_bulk_msg(sisusb, - SISUSB_EP_GFX_BULK_IN, - (length ~3), - NULL, userbuffer, - bytes_read, 0); - if (!ret) userbuffer += (*bytes_read); - } else { - ret |= sisusb_recv_bulk_msg(sisusb, - SISUSB_EP_GFX_BULK_IN, - (length ~3), - kernbuffer, NULL, - bytes_read, 0); - if (!ret) kernbuffer += (*bytes_read); - } - addr += (*bytes_read); - length -= (*bytes_read); -#endif } if (ret) @@ -1395,22 +1354,6 @@ sisusb_readb(struct sisusb_usb_data *sisusb, u32 adr, u8 *data) return(sisusb_read_memio_byte(sisusb, SISUSB_TYPE_MEM, adr, data)); } -#if 0 - -int -sisusb_writew(struct sisusb_usb_data *sisusb, u32 adr, u16 data) -{ - return(sisusb_write_memio_word(sisusb, SISUSB_TYPE_MEM, adr, data)); -} - -int -sisusb_readw(struct sisusb_usb_data *sisusb, u32 adr, u16 *data) -{ - return(sisusb_read_memio_word(sisusb, SISUSB_TYPE_MEM, adr, data)); -} - -#endif /* 0 */ - int sisusb_copy_memory(struct sisusb_usb_data *sisusb, char *src, u32 dest, int length, size_t *bytes_written) diff --git a/drivers/usb/misc/sisusbvga/sisusb.h b/drivers/usb/misc/sisusbvga/sisusb.h index 555fed0..dc04739 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.h +++ b/drivers/usb/misc/sisusbvga/sisusb.h @@ -46,9 +46,7 @@ /* For older kernels, support for text consoles is by default * off. To ensable text console support, change the following: */ -#if 0 -#define CONFIG_USB_SISUSBVGA_CON -#endif +/* #define CONFIG_USB_SISUSBVGA_CON */ /* Version Information */ diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c index a2bf4cf..aca13b8 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_con.c +++ b/drivers/usb/misc/sisusbvga/sisusb_con.c @@ -373,14 +373,6 @@ sisusbcon_putc(struct vc_data *c, int ch, int y, int x) return; /* sisusb-lock is down */ - - /* Don't need to put the character into buffer ourselves, -* because the vt does this BEFORE calling us. -
[linux-usb-devel] [PATCH 4/9] USB: SisUSB2VGA: Mis-spelled word
From: Felipe Balbi [EMAIL PROTECTED] Trivial fix Signed-off-by: Felipe Balbi [EMAIL PROTECTED] --- drivers/usb/misc/sisusbvga/sisusb.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/misc/sisusbvga/sisusb.h b/drivers/usb/misc/sisusbvga/sisusb.h index dc04739..7183e76 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.h +++ b/drivers/usb/misc/sisusbvga/sisusb.h @@ -44,7 +44,7 @@ #include linux/mutex.h /* For older kernels, support for text consoles is by default - * off. To ensable text console support, change the following: + * off. To enable text console support, change the following: */ /* #define CONFIG_USB_SISUSBVGA_CON */ -- 1.5.3.rc4.24.g5b56a - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] [PATCH 2/9] USB: SisUSB2VGA: Convert printk to dev_* macros
From: Felipe Balbi [EMAIL PROTECTED] This patch convert printk entries to dev_* macros, this provide better debugging and better readability to the code. Signed-off-by: Felipe Balbi [EMAIL PROTECTED] --- drivers/usb/misc/sisusbvga/sisusb.c | 111 +-- drivers/usb/misc/sisusbvga/sisusb_con.c | 10 +-- 2 files changed, 34 insertions(+), 87 deletions(-) diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index 3db48d0..c33b121 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c @@ -1003,16 +1003,10 @@ static int sisusb_write_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr, if (ret) { msgcount++; if (msgcount 500) - printk(KERN_ERR - sisusbvga[%d]: Wrote %zd of - %d bytes, error %d\n, - sisusb-minor, *bytes_written, - length, ret); + dev_err(sisusb-sisusb_dev-dev, Wrote %zd of %d bytes, error %d\n, + *bytes_written, length, ret); else if (msgcount == 500) - printk(KERN_ERR - sisusbvga[%d]: Too many errors - , logging stopped\n, - sisusb-minor); + dev_err(sisusb-sisusb_dev-dev, Too many errors, logging stopped\n); } addr += (*bytes_written); length -= (*bytes_written); @@ -1446,10 +1440,10 @@ sisusb_testreadwrite(struct sisusb_usb_data *sisusb) sisusb_copy_memory(sisusb, srcbuffer, sisusb-vrambase, 7, dummy); for(i = 1; i = 7; i++) { -printk(KERN_DEBUG sisusb: rwtest %d bytes\n, i); +dev_dbg(sisusb-sisusb_dev-dev, sisusb: rwtest %d bytes\n, i); sisusb_read_memory(sisusb, destbuffer, sisusb-vrambase, i, dummy); for(j = 0; j i; j++) { -printk(KERN_DEBUG sisusb: rwtest read[%d] = %x\n, j, destbuffer[j]); +dev_dbg(sisusb-sisusb_dev-dev, rwtest read[%d] = %x\n, j, destbuffer[j]); } } } @@ -2168,17 +2162,12 @@ sisusb_init_gfxcore(struct sisusb_usb_data *sisusb) if (ramtype = 1) { ret |= sisusb_get_sdram_size(sisusb, iret, bw, chab); if (iret) { - printk(KERN_ERR sisusbvga[%d]: RAM size - detection failed, - assuming 8MB video RAM\n, - sisusb-minor); + dev_err(sisusb-sisusb_dev-dev,RAM size detection failed, assuming 8MB video RAM\n); ret |= SETIREG(SISSR,0x14,0x31); /* TODO */ } } else { - printk(KERN_ERR sisusbvga[%d]: DDR RAM device found, - assuming 8MB video RAM\n, - sisusb-minor); + dev_err(sisusb-sisusb_dev-dev, DDR RAM device found, assuming 8MB video RAM\n); ret |= SETIREG(SISSR,0x14,0x31); /* *** TODO *** */ } @@ -2249,8 +2238,7 @@ sisusb_get_ramconfig(struct sisusb_usb_data *sisusb) break; } - printk(KERN_INFO sisusbvga[%d]: %dMB %s %s, bus width %d\n, - sisusb-minor, (sisusb-vramsize 20), ramtypetext1, + dev_info(sisusb-sisusb_dev-dev, %dMB %s %s, bus width %d\n, (sisusb-vramsize 20), ramtypetext1, ramtypetext2[ramtype], bw); } @@ -2510,8 +2498,7 @@ sisusb_open(struct inode *inode, struct file *file) int subminor = iminor(inode); if (!(interface = usb_find_interface(sisusb_driver, subminor))) { - printk(KERN_ERR sisusb[%d]: Failed to find interface\n, - subminor); + dev_err(sisusb-sisusb_dev-dev, Failed to find interface\n); return -ENODEV; } @@ -2534,18 +2521,12 @@ sisusb_open(struct inode *inode, struct file *file) if (sisusb-sisusb_dev-speed == USB_SPEED_HIGH) { if (sisusb_init_gfxdevice(sisusb, 0)) { mutex_unlock(sisusb-lock); - printk(KERN_ERR - sisusbvga[%d]: Failed to initialize - device\n, -
[linux-usb-devel] [PATCH 0/9] SisUSB2VGA Cleanups
The following patch series implements a series of cleanups in the sisusbvga driver. Still some stuff to do, but at least we can have better readability on the code. If anyone has any comments, please do. TODO: * Remove unnecessary cleanups * Lots of ifdefs * Remove 2 warnings * Convert hex constants into more meaninful defines * Use static inline {} on ifdef'ed functions and put them on header files * Too many char *str = string; Try to find a better way of doing this * Remove undef's * int *ptr's can become int i's * Others to come. Best Regards, Felipe Balbi [EMAIL PROTECTED] +55 92 2126-1003 Kernel Developers Team - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] EHCI Regression in 2.6.23-rc2
Jiri Kosina wrote: On Fri, 10 Aug 2007, Daniel Exner wrote: Please CC me, as I'm currently not subscribed to this list, thx. Please also don't forget to CC relevant people/lists when reporting bugs, thanks. Guess its ok, now? Thanks anyway :) After some serious hangs with 2.6.23-rc2 I did some bisects and this was the result: 196705c9bbc03540429b0f7cf9ee35c2f928a534 is first bad commit commit 196705c9bbc03540429b0f7cf9ee35c2f928a534 Author: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Thu May 3 08:58:49 2007 -0700 I guess that the patch attached to bug 8535 in kernel.org bugzilla -- http://bugzilla.kernel.org/attachment.cgi?id=12228action=view -- solves your issues, right? Nope, this does _not_ fix my issue. Anything else I could try, or some files you need? I tried finding some clue in my logs, but without any results so far. Greetings Daniel Exner - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] is the hiddev* allocation order guaranteed?
Hi, I have 3 the same devices of the same brand, e.g. their vendor, product and version fields in struct hiddev_devinfo are all the same. Two of them are on the same bus, the third on some other bus. USB PORT 1 USB PORT 2 | | | | device B device C device A Using udev these devices get a /dev/usb/hiddev[0-15] node allocated. My question now is: will each device always have the same node? Will device A always get for example /dev/usb/hiddev0? and C always /dev/usb/hiddev2? And if that is not the case, how can I then find those? Will it work if I use busnum, devnum and ifnum? Folkert van Heusden -- MultiTail è uno flexible tool per seguire di logfiles e effettuazione di commissioni. Feltrare, provedere da colore, merge, 'diff-view', etc. http://www.vanheusden.com/multitail/ -- Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] hiddev
On Fri, 10 Aug 2007, Folkert van Heusden wrote: HIDIOCGSTRING - struct hiddev_string_descriptor (read/write) Gets a string descriptor from the device. The caller must fill in the index field to indicate which descriptor should be returned. Can you please tell me in what range this index is? Please refer to USB specification. The string descriptor indexes are fully optional and are referenced by the other descriptors (device descriptors, configuration descriptors, etc). So the valid range differs from device to device and depends of how much of the descriptor information has available the corresponding string (human readable) representation. -- Jiri Kosina - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] EHCI Regression in 2.6.23-rc2
On Fri, 10 Aug 2007, Daniel Exner wrote: Please CC me, as I'm currently not subscribed to this list, thx. Please also don't forget to CC relevant people/lists when reporting bugs, thanks. After some serious hangs with 2.6.23-rc2 I did some bisects and this was the result: 196705c9bbc03540429b0f7cf9ee35c2f928a534 is first bad commit commit 196705c9bbc03540429b0f7cf9ee35c2f928a534 Author: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Thu May 3 08:58:49 2007 -0700 I guess that the patch attached to bug 8535 in kernel.org bugzilla -- http://bugzilla.kernel.org/attachment.cgi?id=12228action=view -- solves your issues, right? Stuart, did you submit this fix for upstream already please? -- Jiri Kosina - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] [PATCH] USB: SisUSB2VGA: Lindent drivers/usb/misc/sisusbvga/sisusb_struct.h
From: Felipe Balbi [EMAIL PROTECTED] Better indentation Signed-off-by: Felipe Balbi [EMAIL PROTECTED] --- drivers/usb/misc/sisusbvga/sisusb_struct.h | 142 +--- 1 files changed, 67 insertions(+), 75 deletions(-) diff --git a/drivers/usb/misc/sisusbvga/sisusb_struct.h b/drivers/usb/misc/sisusbvga/sisusb_struct.h index 9def598..1c4240e 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_struct.h +++ b/drivers/usb/misc/sisusbvga/sisusb_struct.h @@ -52,85 +52,78 @@ #define _SISUSB_STRUCT_H_ struct SiS_St { - unsigned char St_ModeID; - unsigned short St_ModeFlag; - unsigned char St_StTableIndex; - unsigned char St_CRT2CRTC; - unsigned char St_ResInfo; - unsigned char VB_StTVFlickerIndex; - unsigned char VB_StTVEdgeIndex; - unsigned char VB_StTVYFilterIndex; - unsigned char St_PDC; + unsigned char St_ModeID; + unsigned short St_ModeFlag; + unsigned char St_StTableIndex; + unsigned char St_CRT2CRTC; + unsigned char St_ResInfo; + unsigned char VB_StTVFlickerIndex; + unsigned char VB_StTVEdgeIndex; + unsigned char VB_StTVYFilterIndex; + unsigned char St_PDC; }; -struct SiS_StandTable -{ - unsigned char CRT_COLS; - unsigned char ROWS; - unsigned char CHAR_HEIGHT; - unsigned short CRT_LEN; - unsigned char SR[4]; - unsigned char MISC; - unsigned char CRTC[0x19]; - unsigned char ATTR[0x14]; - unsigned char GRC[9]; +struct SiS_StandTable { + unsigned char CRT_COLS; + unsigned char ROWS; + unsigned char CHAR_HEIGHT; + unsigned short CRT_LEN; + unsigned char SR[4]; + unsigned char MISC; + unsigned char CRTC[0x19]; + unsigned char ATTR[0x14]; + unsigned char GRC[9]; }; struct SiS_StResInfo_S { - unsigned short HTotal; - unsigned short VTotal; + unsigned short HTotal; + unsigned short VTotal; }; -struct SiS_Ext -{ - unsigned char Ext_ModeID; - unsigned short Ext_ModeFlag; - unsigned short Ext_VESAID; - unsigned char Ext_RESINFO; - unsigned char VB_ExtTVFlickerIndex; - unsigned char VB_ExtTVEdgeIndex; - unsigned char VB_ExtTVYFilterIndex; - unsigned char VB_ExtTVYFilterIndexROM661; - unsigned char REFindex; - charROMMODEIDX661; +struct SiS_Ext { + unsigned char Ext_ModeID; + unsigned short Ext_ModeFlag; + unsigned short Ext_VESAID; + unsigned char Ext_RESINFO; + unsigned char VB_ExtTVFlickerIndex; + unsigned char VB_ExtTVEdgeIndex; + unsigned char VB_ExtTVYFilterIndex; + unsigned char VB_ExtTVYFilterIndexROM661; + unsigned char REFindex; + char ROMMODEIDX661; }; -struct SiS_Ext2 -{ - unsigned short Ext_InfoFlag; - unsigned char Ext_CRT1CRTC; - unsigned char Ext_CRTVCLK; - unsigned char Ext_CRT2CRTC; - unsigned char Ext_CRT2CRTC_NS; - unsigned char ModeID; - unsigned short XRes; - unsigned short YRes; - unsigned char Ext_PDC; - unsigned char Ext_FakeCRT2CRTC; - unsigned char Ext_FakeCRT2Clk; +struct SiS_Ext2 { + unsigned short Ext_InfoFlag; + unsigned char Ext_CRT1CRTC; + unsigned char Ext_CRTVCLK; + unsigned char Ext_CRT2CRTC; + unsigned char Ext_CRT2CRTC_NS; + unsigned char ModeID; + unsigned short XRes; + unsigned short YRes; + unsigned char Ext_PDC; + unsigned char Ext_FakeCRT2CRTC; + unsigned char Ext_FakeCRT2Clk; }; -struct SiS_CRT1Table -{ - unsigned char CR[17]; +struct SiS_CRT1Table { + unsigned char CR[17]; }; -struct SiS_VCLKData -{ - unsigned char SR2B,SR2C; - unsigned short CLOCK; +struct SiS_VCLKData { + unsigned char SR2B, SR2C; + unsigned short CLOCK; }; -struct SiS_ModeResInfo -{ - unsigned short HTotal; - unsigned short VTotal; - unsigned char XChar; - unsigned char YChar; +struct SiS_ModeResInfo { + unsigned short HTotal; + unsigned short VTotal; + unsigned char XChar; + unsigned char YChar; }; -struct SiS_Private -{ +struct SiS_Private { void *sisusb; unsigned long IOAddress; @@ -151,19 +144,18 @@ struct SiS_Private unsigned long SiS_P3da; unsigned long SiS_Part1Port; - unsigned char SiS_MyCR63; - unsigned short SiS_CRT1Mode; - unsigned short SiS_ModeType; - unsigned short SiS_SetFlag; - - const struct SiS_StandTable *SiS_StandTable; - const struct SiS_St *SiS_SModeIDTable; - const struct SiS_Ext*SiS_EModeIDTable; - const struct SiS_Ext2 *SiS_RefIndex; - const struct SiS_CRT1Table *SiS_CRT1Table; - const struct SiS_VCLKData *SiS_VCLKData; -
Re: [linux-usb-devel] [PATCH] OHCI suspend/resume issue.
On Thu, Aug 09, 2007 at 02:56:08PM -0400, Alan Stern wrote: On Thu, 9 Aug 2007, Zephaniah E. Hull wrote: Urgh, I definitely need some sleep, yes, it's a . Which, from the debugging statements from previous failed runs, we have something odder. reset_resume == 0, udev-state == USB_STATE_CONFIGURED. This is an even more bizarre state then I thought. After you get up :-), check udev-state at the end of usb_suspend_device(). It should be USB_STATE_SUSPENDED, and nothing should change it until usb_resume_device() runs. Are you maybe seeing ohci_rh_resume() get called twice in a row? Got side tracked while tracking down the issue below. We are not calling ohci_rh_resume twice, and in usb_hcd_pci_suspend we are in USB_STATE_CONFIGURED. Throwing in a few more debugging statements to figure out if we ever set to USB_STATE_SUSPENDED, and if so, where we unset it. Nothing should. You might want to add a debugging printk to ohci_pci_resume() or prepare_for_handover() to see what the value is at the start of the resume. Maybe the firmware sets it incorrectly before the driver does anything. Perhaps, we seem to have a lot of very odd state at the time that we try to resume the OHCI root hub. Agreed. I now have a better idea of what we are currently doing on resume. I don't have a good idea of what we should be doing on resume. When the OLPC comes up from suspend, a small bit of Open Firmware code gets run, this writes 1 to HcCommandStatus, resetting the OHCI chip into Suspend mode, then writes into HcRhDescriptorB and HcRhPortStatus*, bringing up the power to the USB ports. After that the OS gets started, so by the time the Linux OHCI code sees things, we're already in suspend mode and the power to the ports is on, but otherwise we're fresh from chip power on. However since the chip isn't actually in reset, ohci_rh_resume doesn't jump through the right hoops. Changing what OFW does on resume is possible, if it's flatly not doing what it should. But a driver fix would be preferred in some ways. Any thoughts? Zephaniah E. Hull. -- 1024D/E65A7801 Zephaniah E. Hull [EMAIL PROTECTED] 92ED 94E4 B1E6 3624 226D 5727 4453 008B E65A 7801 CCs of replies from mailing lists are requested. signature.asc Description: Digital signature - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] Question about hub_thread
Here are the piece of code from 2.6.22.1, 2817 static int hub_thread(void *__unused) 2818 { 2819 do { 2820 hub_events(); 2821 wait_event_interruptible(khubd_wait, 2822 !list_empty(hub_event_list) || 2823 kthread_should_stop()); 2824 try_to_freeze(); 2825 } while (!kthread_should_stop() || !list_empty(hub_event_list)); 2826 2827 pr_debug(%s: khubd exiting\n, usbcore_name); 2828 return 0; 2829 } I have a question. try_to_freeze should be the only way for this thread to go suspended. If we have already gone sleeping via wait_event_interruptible(), then if there is signal to wakeup this thread and ask it to go to suspended,then wait_event_interruptible will return and try_to_freeze() will be invoked and hence this thread will go into refrigerator. But if we are still running inside hub_events(),then if we received any signal, what will happen?still try_to_freeze will be executed?why? Regards Jason - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] hiddev
Hi, In linux/Documentation/usb/hiddev.txt I read the following: HIDIOCGSTRING - struct hiddev_string_descriptor (read/write) Gets a string descriptor from the device. The caller must fill in the index field to indicate which descriptor should be returned. Can you please tell me in what range this index is? Thank you, Folkert van Heusden -- MultiTail is een flexibele tool voor het volgen van logfiles en uitvoer van commando's. Filteren, van kleur voorzien, mergen, 'diff-view', etc. http://www.vanheusden.com/multitail/ -- Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] hiddev
HIDIOCGSTRING - struct hiddev_string_descriptor (read/write) Gets a string descriptor from the device. The caller must fill in the index field to indicate which descriptor should be returned. Can you please tell me in what range this index is? Please refer to USB specification. The string descriptor indexes are fully optional and are referenced by the other descriptors (device descriptors, configuration descriptors, etc). So the valid range differs from device to device and depends of how much of the descriptor information has available the corresponding string (human readable) representation. Yes I understood that. I needed this info to investigate an USB device for which no documentation exists. But I think I found the information that I need: in linux/drivers/usb/core/message.c there's the following code snippet: result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), USB_REQ_GET_DESCRIPTOR, USB_DIR_IN, (USB_DT_STRING 8) + index, langid, buf, size, That means that index may not be bigger then 255 as else it would garble the value of 'USB_DT_STRING 8'. Folkert van Heusden -- Multitail - gibkaja utilita po sledovaniju log-fajlov i vyvoda kommand. Fil'trovanie, raskraivanie, slijanie, vizual'noe sravnenie, i t.d. http://www.vanheusden.com/multitail/ -- Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] [PATCH] OHCI suspend/resume issue.
On Fri, 10 Aug 2007, Zephaniah E. Hull wrote: After you get up :-), check udev-state at the end of usb_suspend_device(). It should be USB_STATE_SUSPENDED, and nothing should change it until usb_resume_device() runs. Are you maybe seeing ohci_rh_resume() get called twice in a row? Got side tracked while tracking down the issue below. We are not calling ohci_rh_resume twice, and in usb_hcd_pci_suspend we are in USB_STATE_CONFIGURED. Throwing in a few more debugging statements to figure out if we ever set to USB_STATE_SUSPENDED, and if so, where we unset it. udev-state is supposed to get set to USB_STATE_SUSPENDED in hcd_bus_suspend() in core/hcd.c. (This is before usb_hcd_pci_suspend() gets called.) Does something go wrong there? I now have a better idea of what we are currently doing on resume. I don't have a good idea of what we should be doing on resume. When the OLPC comes up from suspend, a small bit of Open Firmware code gets run, this writes 1 to HcCommandStatus, resetting the OHCI chip into Suspend mode, then writes into HcRhDescriptorB and HcRhPortStatus*, bringing up the power to the USB ports. After that the OS gets started, so by the time the Linux OHCI code sees things, we're already in suspend mode and the power to the ports is on, but otherwise we're fresh from chip power on. However since the chip isn't actually in reset, ohci_rh_resume doesn't jump through the right hoops. This is a problem. The code in ohci-hcd isn't very sophisticated about checking for interference from the firmware. Maybe because there are so many different implementations of OHCI floating around, it's hard to know what approach will work on all of them. And maybe because there aren't many settings which can be checked. Changing what OFW does on resume is possible, if it's flatly not doing what it should. But a driver fix would be preferred in some ways. Any thoughts? I'd say OFW is flatly not doing what it should. In fact, from your description it goes out of its way to fool Linux into thinking the controller was powered on the whole time when in fact it wasn't. Because the power was off the controller has just gone through a hardware reset; there's absolutely no need to pile a software reset on top of that. Of course you can always work around this by making an OLPC-specific change to the driver. I can't think of any general way to detect this sort of thing that would be suitable for the standard kernel, however. Alan Stern - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] EHCI Regression in 2.6.23-rc2
Jiri Kosina wrote: On Fri, 10 Aug 2007, Daniel Exner wrote: After some serious hangs with 2.6.23-rc2 I did some bisects and this was the result: 196705c9bbc03540429b0f7cf9ee35c2f928a534 is first bad commit commit 196705c9bbc03540429b0f7cf9ee35c2f928a534 Author: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Thu May 3 08:58:49 2007 -0700 I guess that the patch attached to bug 8535 in kernel.org bugzilla -- http://bugzilla.kernel.org/attachment.cgi?id=12228action=view -- solves your issues, right? Stuart, did you submit this fix for upstream already please? Yes... http://marc.info/?l=linux-usb-develm=118598561010046w=2 However, I have not tested this with a VIA EHCI controller (though it's been tested with Intel, Broadcom, and nVidia). This patch uses the inactivate bit in the QH, which wasn't previously used by the linux kernel, and I found that the different vendors of EHCI controllers (Intel, Broadcom, nVidia) all handle this a little differently. There's probably something about the way VIA controllers respond to seeing this bit set that is breaking things. I'll try to get my hands on a VIA EHCI controller so I can look at this... if you happen to know of an add-in card that has one of these, please let me know! It would be a lot easier for me to debug this myself here than to try to get someone else to run test kernels for me... - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] patch usb-cleanups-for-g_file_storage.patch added to gregkh-2.6 tree
This is a note to let you know that I've just added the patch titled Subject: USB: cleanups for g_file_storage to my gregkh-2.6 tree. Its filename is usb-cleanups-for-g_file_storage.patch This tree can be found at http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/ From [EMAIL PROTECTED] Fri Aug 10 11:07:40 2007 From: Alan Stern [EMAIL PROTECTED] Date: Wed, 8 Aug 2007 17:10:11 -0400 (EDT) Subject: USB: cleanups for g_file_storage To: Greg KH [EMAIL PROTECTED] Cc: USB development list linux-usb-devel@lists.sourceforge.net Message-ID: [EMAIL PROTECTED] This patch (as957) makes some minor cleanups to the g_file_storage driver: Update the copyright date and version string; Uniformize the logging macros for the gadget and the LUNs; Remove inline markers -- nowadays we rely on the compiler to decide which routines are best inlined; Use the print_hex_dump() library routines; Remove some unnecessary assignments within conditionals and fix some close-brace indenting levels; Fix some column-80 violations. Signed-off-by: Alan Stern [EMAIL PROTECTED] Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED] --- drivers/usb/gadget/file_storage.c | 129 ++ 1 file changed, 62 insertions(+), 67 deletions(-) --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c @@ -1,7 +1,7 @@ /* * file_storage.c -- File-backed USB Storage Gadget, for USB development * - * Copyright (C) 2003-2005 Alan Stern + * Copyright (C) 2003-2007 Alan Stern * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -218,7 +218,7 @@ /* #define VERBOSE_DEBUG */ -#undef DUMP_MSGS +/* #define DUMP_MSGS */ #include linux/blkdev.h @@ -249,7 +249,7 @@ #define DRIVER_DESCFile-backed Storage Gadget #define DRIVER_NAMEg_file_storage -#define DRIVER_VERSION 28 November 2005 +#define DRIVER_VERSION 7 August 2007 static const char longname[] = DRIVER_DESC; static const char shortname[] = DRIVER_NAME; @@ -275,12 +275,9 @@ MODULE_LICENSE(Dual BSD/GPL); /*-*/ -#define yprintk(l,level,fmt,args...) \ - dev_printk(level , (l)-dev , fmt , ## args) - #ifdef DEBUG #define LDBG(lun,fmt,args...) \ - yprintk(lun , KERN_DEBUG , fmt , ## args) + dev_dbg((lun)-dev , fmt , ## args) #define MDBG(fmt,args...) \ printk(KERN_DEBUG DRIVER_NAME : fmt , ## args) #else @@ -300,11 +297,11 @@ MODULE_LICENSE(Dual BSD/GPL); #endif /* VERBOSE_DEBUG */ #define LERROR(lun,fmt,args...) \ - yprintk(lun , KERN_ERR , fmt , ## args) + dev_err((lun)-dev , fmt , ## args) #define LWARN(lun,fmt,args...) \ - yprintk(lun , KERN_WARNING , fmt , ## args) + dev_warn((lun)-dev , fmt , ## args) #define LINFO(lun,fmt,args...) \ - yprintk(lun , KERN_INFO , fmt , ## args) + dev_info((lun)-dev , fmt , ## args) #define MINFO(fmt,args...) \ printk(KERN_INFO DRIVER_NAME : fmt , ## args) @@ -558,7 +555,7 @@ struct lun { #define backing_file_is_open(curlun) ((curlun)-filp != NULL) -static inline struct lun *dev_to_lun(struct device *dev) +static struct lun *dev_to_lun(struct device *dev) { return container_of(dev, struct lun, dev); } @@ -692,13 +689,13 @@ struct fsg_dev { typedef void (*fsg_routine_t)(struct fsg_dev *); -static int inline exception_in_progress(struct fsg_dev *fsg) +static int exception_in_progress(struct fsg_dev *fsg) { return (fsg-state FSG_STATE_IDLE); } /* Make bulk-out requests be divisible by the maxpacket size */ -static void inline set_bulk_out_req_length(struct fsg_dev *fsg, +static void set_bulk_out_req_length(struct fsg_dev *fsg, struct fsg_buffhd *bh, unsigned int length) { unsigned intrem; @@ -724,50 +721,36 @@ static void close_all_backing_files(stru static void dump_msg(struct fsg_dev *fsg, const char *label, const u8 *buf, unsigned int length) { - unsigned intstart, num, i; - charline[52], *p; - - if (length = 512) - return; - DBG(fsg, %s, length %u:\n, label, length); - - start = 0; - while (length 0) { - num = min(length, 16u); - p = line; - for (i = 0; i num; ++i) { - if (i == 8) - *p++ = ' '; - sprintf(p, %02x, buf[i]); - p += 3; - } - *p = 0; - printk(KERN_DEBUG %6x: %s\n, start, line); - buf += num; - start += num; - length -= num; + if (length 512) { + DBG(fsg, %s, length %u:\n, label, length); + print_hex_dump(KERN_DEBUG, ,
[linux-usb-devel] [PATCH 7/9] USB: SisUSB2VGA: Lindent drivers/usb/misc/sisusbvga/sisusb_con.c
From: Felipe Balbi [EMAIL PROTECTED] Better indentation Signed-off-by: Felipe Balbi [EMAIL PROTECTED] --- drivers/usb/misc/sisusbvga/sisusb_con.c | 493 +++ 1 files changed, 231 insertions(+), 262 deletions(-) diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c index aca13b8..dbf8603 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_con.c +++ b/drivers/usb/misc/sisusbvga/sisusb_con.c @@ -82,16 +82,14 @@ static struct sisusb_usb_data *mysisusbs[MAX_NR_CONSOLES]; /* Forward declaration */ static const struct consw sisusb_con; -static inline void -sisusbcon_memsetw(u16 *s, u16 c, unsigned int count) +static inline void sisusbcon_memsetw(u16 * s, u16 c, unsigned int count) { count /= 2; while (count--) sisusbcon_writew(c, s++); } -static inline void -sisusb_initialize(struct sisusb_usb_data *sisusb) +static inline void sisusb_initialize(struct sisusb_usb_data *sisusb) { /* Reset cursor and start address */ if (sisusb_setidxreg(sisusb, SISCR, 0x0c, 0x00)) @@ -112,8 +110,7 @@ sisusbcon_set_start_address(struct sisusb_usb_data *sisusb, struct vc_data *c) sisusb_setidxreg(sisusb, SISCR, 0x0d, (sisusb-cur_start_addr 0xff)); } -void -sisusb_set_cursor(struct sisusb_usb_data *sisusb, unsigned int location) +void sisusb_set_cursor(struct sisusb_usb_data *sisusb, unsigned int location) { if (sisusb-sisusb_cursor_loc == location) return; @@ -141,14 +138,12 @@ sisusb_set_cursor(struct sisusb_usb_data *sisusb, unsigned int location) sisusb_setidxreg(sisusb, SISCR, 0x0f, (location 0xff)); } -static inline struct sisusb_usb_data * -sisusb_get_sisusb(unsigned short console) +static inline struct sisusb_usb_data *sisusb_get_sisusb(unsigned short console) { return mysisusbs[console]; } -static inline int -sisusb_sisusb_valid(struct sisusb_usb_data *sisusb) +static inline int sisusb_sisusb_valid(struct sisusb_usb_data *sisusb) { if (!sisusb-present || !sisusb-ready || !sisusb-sisusb_dev) return 0; @@ -156,8 +151,8 @@ sisusb_sisusb_valid(struct sisusb_usb_data *sisusb) return 1; } -static struct sisusb_usb_data * -sisusb_get_sisusb_lock_and_check(unsigned short console) +static struct sisusb_usb_data *sisusb_get_sisusb_lock_and_check(unsigned short + console) { struct sisusb_usb_data *sisusb; @@ -174,8 +169,7 @@ sisusb_get_sisusb_lock_and_check(unsigned short console) mutex_lock(sisusb-lock); - if (!sisusb_sisusb_valid(sisusb) || - !sisusb-havethisconsole[console]) { + if (!sisusb_sisusb_valid(sisusb) || !sisusb-havethisconsole[console]) { mutex_unlock(sisusb-lock); return NULL; } @@ -183,27 +177,23 @@ sisusb_get_sisusb_lock_and_check(unsigned short console) return sisusb; } -static int -sisusb_is_inactive(struct vc_data *c, struct sisusb_usb_data *sisusb) +static int sisusb_is_inactive(struct vc_data *c, struct sisusb_usb_data *sisusb) { if (sisusb-is_gfx || - sisusb-textmodedestroyed || - c-vc_mode != KD_TEXT) + sisusb-textmodedestroyed || c-vc_mode != KD_TEXT) return 1; return 0; } /* con_startup console interface routine */ -static const char * -sisusbcon_startup(void) +static const char *sisusbcon_startup(void) { return SISUSBCON; } /* con_init console interface routine */ -static void -sisusbcon_init(struct vc_data *c, int init) +static void sisusbcon_init(struct vc_data *c, int init) { struct sisusb_usb_data *sisusb; int cols, rows; @@ -267,8 +257,7 @@ sisusbcon_init(struct vc_data *c, int init) } /* con_deinit console interface routine */ -static void -sisusbcon_deinit(struct vc_data *c) +static void sisusbcon_deinit(struct vc_data *c) { struct sisusb_usb_data *sisusb; int i; @@ -289,7 +278,7 @@ sisusbcon_deinit(struct vc_data *c) /* Free our font buffer if all consoles are gone */ if (sisusb-font_backup) { - for(i = 0; i MAX_NR_CONSOLES; i++) { + for (i = 0; i MAX_NR_CONSOLES; i++) { if (sisusb-havethisconsole[c-vc_num]) break; } @@ -308,7 +297,7 @@ sisusbcon_deinit(struct vc_data *c) /* interface routine */ static u8 sisusbcon_build_attr(struct vc_data *c, u8 color, u8 intensity, - u8 blink, u8 underline, u8 reverse, u8 unused) +u8 blink, u8 underline, u8 reverse, u8 unused) { u8 attr = color; @@ -319,8 +308,7 @@ sisusbcon_build_attr(struct vc_data *c, u8 color, u8 intensity, if (reverse) attr = ((attr) 0x88) | - attr) 4) | - ((attr) 4)) 0x77); +
[linux-usb-devel] [PATCH 1/9] USB: SisUSB2VGA: Whitespace Cleanups
From: Felipe Balbi [EMAIL PROTECTED] This patches clean some trailing whitespaces in sisusb2vga driver. Signed-off-by: Felipe Balbi [EMAIL PROTECTED] --- drivers/usb/misc/sisusbvga/sisusb.c| 26 +- drivers/usb/misc/sisusbvga/sisusb.h|6 +++--- drivers/usb/misc/sisusbvga/sisusb_init.c |2 +- drivers/usb/misc/sisusbvga/sisusb_init.h |4 ++-- drivers/usb/misc/sisusbvga/sisusb_struct.h |2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index 9f37ba4..3db48d0 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c @@ -32,7 +32,7 @@ * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * Author: Thomas Winischhofer [EMAIL PROTECTED] + * Author: Thomas Winischhofer [EMAIL PROTECTED] * */ @@ -962,12 +962,12 @@ static int sisusb_write_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr, packet.address = 0x0194; packet.data= addr; ret = sisusb_send_bridge_packet(sisusb, 10, - packet, 0); + packet, 0); packet.header = 0x001f; packet.address = 0x0190; packet.data= (length ~3); ret |= sisusb_send_bridge_packet(sisusb, 10, - packet, 0); + packet, 0); if (sisusb-flagb0 != 0x16) { packet.header = 0x001f; packet.address = 0x0180; @@ -1019,7 +1019,7 @@ static int sisusb_write_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr, } if (ret) - break; + break; } @@ -1305,7 +1305,7 @@ static int sisusb_read_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr, } if (ret) - break; + break; } return ret; @@ -1533,9 +1533,9 @@ sisusb_clear_vram(struct sisusb_usb_data *sisusb, u32 address, int length) #define SETIREGAND(r,i,a) sisusb_setidxregand(sisusb, r, i, a) #define SETIREGANDOR(r,i,a,o) sisusb_setidxregandor(sisusb, r, i, a, o) #define READL(a,d) sisusb_read_memio_long(sisusb, SISUSB_TYPE_MEM, a, d) -#define WRITEL(a,d)sisusb_write_memio_long(sisusb, SISUSB_TYPE_MEM, a, d) +#define WRITEL(a,d)sisusb_write_memio_long(sisusb, SISUSB_TYPE_MEM, a, d) #define READB(a,d) sisusb_read_memio_byte(sisusb, SISUSB_TYPE_MEM, a, d) -#define WRITEB(a,d)sisusb_write_memio_byte(sisusb, SISUSB_TYPE_MEM, a, d) +#define WRITEB(a,d)sisusb_write_memio_byte(sisusb, SISUSB_TYPE_MEM, a, d) static int sisusb_triggersr16(struct sisusb_usb_data *sisusb, u8 ramtype) @@ -2008,7 +2008,7 @@ sisusb_set_default_mode(struct sisusb_usb_data *sisusb, int touchengines) SETIREG(SISSR, 0x26, 0x00); } - SETIREG(SISCR, 0x34, 0x44); /* we just set std mode #44 */ + SETIREG(SISCR, 0x34, 0x44); /* we just set std mode #44 */ return ret; } @@ -2942,7 +2942,7 @@ static int sisusb_handle_command(struct sisusb_usb_data *sisusb, struct sisusb_command *y, unsigned long arg) { - int retval, port, length; + int retval, port, length; u32 address; /* All our commands require the device @@ -3065,12 +3065,12 @@ sisusb_handle_command(struct sisusb_usb_data *sisusb, struct sisusb_command *y, static int sisusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg) + unsigned long arg) { struct sisusb_usb_data *sisusb; struct sisusb_info x; struct sisusb_command y; - int retval = 0; + int retval = 0; u32 __user *argp = (u32 __user *)arg; if (!(sisusb = (struct sisusb_usb_data *)file-private_data)) @@ -3095,7 +3095,7 @@ sisusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, case SISUSB_GET_CONFIG: - x.sisusb_id = SISUSB_ID; + x.sisusb_id = SISUSB_ID; x.sisusb_version= SISUSB_VERSION; x.sisusb_revision = SISUSB_REVISION; x.sisusb_patchlevel = SISUSB_PATCHLEVEL; @@ -3164,7 +3164,7 @@ static const struct file_operations usb_sisusb_fops = {
[linux-usb-devel] [RFC] Accept single-byte Device Status responses
I've seen two reports of devices that wrongly send a 1-byte reply to Get-Device-Status requests instead of a 2-byte reply. One was a printer and the other a mass-storage device. This bug causes problems during USB resume, because finish_port_resume() checks the device status and concludes that something has gone wrong if it doesn't get a proper 2-byte reply. When autosuspend starts kicking in and at each autoresume the kernel thinks the device has gone away, obviously we're heading for trouble. In theory, lack of the second byte shouldn't matter much. According to the USB 2.0 spec it must always be equal to 0. So maybe we don't need to be such sticklers about insisting that it always be present. Does anybody object to the patch below? (Note that usb_get_status() returns the actual_length of the reply.) If there's no response, I'll submit it to Greg after a few days. Dave, you might want to try this with your printers. It might enable some of them to work with autosuspend. Alan Stern Index: usb-2.6/drivers/usb/core/hub.c === --- usb-2.6.orig/drivers/usb/core/hub.c +++ usb-2.6/drivers/usb/core/hub.c @@ -1764,9 +1764,10 @@ static int finish_port_resume(struct usb * and device drivers will know about any resume quirks. */ if (status == 0) { + devstatus = 0; status = usb_get_status(udev, USB_RECIP_DEVICE, 0, devstatus); if (status = 0) - status = (status == 2 ? 0 : -ENODEV); + status = (status 0 ? 0 : -ENODEV); } if (status) { - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] [PATCH 6/9] USB: SisUSB2VGA: Lindent drivers/usb/misc/sisusbvga/sisusb.h
From: Felipe Balbi [EMAIL PROTECTED] Better indentation Signed-off-by: Felipe Balbi [EMAIL PROTECTED] --- drivers/usb/misc/sisusbvga/sisusb.h | 118 +-- 1 files changed, 58 insertions(+), 60 deletions(-) diff --git a/drivers/usb/misc/sisusbvga/sisusb.h b/drivers/usb/misc/sisusbvga/sisusb.h index 7183e76..d2d7872 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.h +++ b/drivers/usb/misc/sisusbvga/sisusb.h @@ -8,27 +8,27 @@ * * Otherwise, the following license terms apply: * - * * Redistribution and use in source and binary forms, with or without - * * modification, are permitted provided that the following conditions - * * are met: - * * 1) Redistributions of source code must retain the above copyright - * *notice, this list of conditions and the following disclaimer. - * * 2) Redistributions in binary form must reproduce the above copyright - * *notice, this list of conditions and the following disclaimer in the - * *documentation and/or other materials provided with the distribution. - * * 3) The name of the author may not be used to endorse or promote products - * *derived from this software without specific prior written permission. - * * - * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR - * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1) Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2) Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * 3) The name of the author may not be used to endorse or promote products + *derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Author: Thomas Winischhofer [EMAIL PROTECTED] * @@ -72,7 +72,7 @@ #define SISUSB_IBUF_SIZE 0x01000 #define SISUSB_OBUF_SIZE 0x1 /* fixed */ -#define NUMOBUFS 8 /* max number of output buffers/output URBs */ +#define NUMOBUFS 8 /* max number of output buffers/output URBs */ /* About endianness: * @@ -103,7 +103,7 @@ struct sisusb_usb_data; -struct sisusb_urb_context {/* urb-context for outbound bulk URBs */ +struct sisusb_urb_context {/* urb-context for outbound bulk URBs */ struct sisusb_usb_data *sisusb; int urbindex; int *actual_length; @@ -114,16 +114,16 @@ struct sisusb_usb_data { struct usb_interface *interface; struct kref kref; wait_queue_head_t wait_q; /* for syncind and timeouts */ - struct mutex lock; /* general race avoidance */ - unsigned int ifnum; /* interface number of the USB device */ - int minor; /* minor (for logging clarity) */ - int isopen; /* !=0 if open */ - int present;/* !=0 if device is present on the bus */ - int ready; /* !=0 if device is ready for userland */ + struct mutex lock; /* general race avoidance */ + unsigned int ifnum; /* interface number of the USB device */ + int minor; /* minor (for logging clarity) */ + int isopen; /* !=0 if open */ + int present;/* !=0 if device is
[linux-usb-devel] patch usb-make-hcds-responsible-for-managing-endpoint-queues.patch added to gregkh-2.6 tree
This is a note to let you know that I've just added the patch titled Subject: USB: make HCDs responsible for managing endpoint queues to my gregkh-2.6 tree. Its filename is usb-make-hcds-responsible-for-managing-endpoint-queues.patch This tree can be found at http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/ From [EMAIL PROTECTED] Fri Aug 10 11:06:39 2007 From: Alan Stern [EMAIL PROTECTED] Date: Wed, 8 Aug 2007 11:48:02 -0400 (EDT) Subject: USB: make HCDs responsible for managing endpoint queues To: Greg KH [EMAIL PROTECTED] Cc: David Brownell [EMAIL PROTECTED], Olav Kongas [EMAIL PROTECTED], Tony Olech [EMAIL PROTECTED], Yoshihiro Shimoda [EMAIL PROTECTED], USB development list linux-usb-devel@lists.sourceforge.net Message-ID: [EMAIL PROTECTED] This patch (as954) implements a suggestion of David Brownell's. Now the host controller drivers are responsible for linking and unlinking URBs to/from their endpoint queues. This eliminates the possiblity of strange situations where usbcore thinks an URB is linked but the HCD thinks it isn't. It also means HCDs no longer have to check for URBs being dequeued before they were fully enqueued. In addition to the core changes, this requires changing every host controller driver and the root-hub URB handler. For the most part the required changes are fairly small; drivers have to call usb_hcd_link_urb_to_ep() in their urb_enqueue method, usb_hcd_check_unlink_urb() in their urb_dequeue method, and usb_hcd_unlink_urb_from_ep() before giving URBs back. A few HCDs make matters more complicated by the way they split up the flow of control. In addition some method interfaces get changed. The endpoint argument for urb_enqueue is now redundant so it is removed. The unlink status is required by usb_hcd_check_unlink_urb(), so it has been added to urb_dequeue. Signed-off-by: Alan Stern [EMAIL PROTECTED] CC: David Brownell [EMAIL PROTECTED] CC: Olav Kongas [EMAIL PROTECTED] CC: Tony Olech [EMAIL PROTECTED] CC: Yoshihiro Shimoda [EMAIL PROTECTED] Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED] --- drivers/usb/core/hcd.c | 255 drivers/usb/core/hcd.h | 14 +- drivers/usb/gadget/dummy_hcd.c | 22 ++- drivers/usb/host/ehci-hcd.c | 14 +- drivers/usb/host/ehci-q.c | 14 +- drivers/usb/host/ehci-sched.c | 43 -- drivers/usb/host/isp116x-hcd.c | 31 +++- drivers/usb/host/ohci-hcd.c | 32 ++--- drivers/usb/host/ohci-q.c |1 drivers/usb/host/r8a66597-hcd.c | 37 +++-- drivers/usb/host/sl811-hcd.c| 26 ++-- drivers/usb/host/u132-hcd.c | 170 ++ drivers/usb/host/uhci-q.c | 32 ++--- 13 files changed, 420 insertions(+), 271 deletions(-) --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -356,11 +356,17 @@ static int rh_call_control (struct usb_h const u8*bufp = tbuf; int len = 0; int patch_wakeup = 0; - int status = 0; + int status; int n; might_sleep(); + spin_lock_irq(hcd_root_hub_lock); + status = usb_hcd_link_urb_to_ep(hcd, urb); + spin_unlock_irq(hcd_root_hub_lock); + if (status) + return status; + cmd = (struct usb_ctrlrequest *) urb-setup_packet; typeReq = (cmd-bRequestType 8) | cmd-bRequest; wValue = le16_to_cpu (cmd-wValue); @@ -525,10 +531,9 @@ error: /* any errors get returned through the urb completion */ spin_lock_irq(hcd_root_hub_lock); - spin_lock(urb-lock); if (urb-status == -EINPROGRESS) urb-status = status; - spin_unlock(urb-lock); + usb_hcd_unlink_urb_from_ep(hcd, urb); /* This peculiar use of spinlocks echoes what real HC drivers do. * Avoiding calls to local_irq_disable/enable makes the code @@ -571,26 +576,21 @@ void usb_hcd_poll_rh_status(struct usb_h spin_lock_irqsave(hcd_root_hub_lock, flags); urb = hcd-status_urb; if (urb) { - spin_lock(urb-lock); - if (urb-status == -EINPROGRESS) { - hcd-poll_pending = 0; - hcd-status_urb = NULL; - urb-status = 0; - urb-hcpriv = NULL; - urb-actual_length = length; - memcpy(urb-transfer_buffer, buffer, length); - } else /* urb has been unlinked */ - length = 0; - spin_unlock(urb-lock); + hcd-poll_pending = 0; + hcd-status_urb = NULL; + urb-status = 0; + urb-hcpriv = NULL; +
[linux-usb-devel] [patch 2/8] NIKON D50 is an unusual device
From: Milinevsky Dmitry [EMAIL PROTECTED] This short patch allows NIKON D50 to be mounted as UMS[unusual device] on Linux niam 2.6.22-rc7-cfs-v18 #2 PREEMPT Tue Jul 3 22:35:53 EEST 2007 i686 Intel(R) Celeron(R) M processor 1.50GHz GenuineIntel GNU/Linux, some previous kernels... lsusb -v Bus 001 Device 006: ID 04b0:0409 Nikon Corp. Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize064 idVendor 0x04b0 Nikon Corp. idProduct 0x0409 bcdDevice1.00 iManufacturer 1 NIKON iProduct2 NIKON DSC D50 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 32 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower2mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk (Zip) iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Device Qualifier (for other device speed): bLength10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize064 bNumConfigurations 1 Device Status: 0x0001 Self Powered Signed-off-by: Milinevsky Dmitry [EMAIL PROTECTED] Cc: Greg KH [EMAIL PROTECTED] Cc: Oliver Neukum [EMAIL PROTECTED] Cc: Alan Stern [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- drivers/usb/storage/unusual_devs.h |7 +++ 1 files changed, 7 insertions(+) diff -puN drivers/usb/storage/unusual_devs.h~nikon-d50-is-an-unusual-device drivers/usb/storage/unusual_devs.h --- a/drivers/usb/storage/unusual_devs.h~nikon-d50-is-an-unusual-device +++ a/drivers/usb/storage/unusual_devs.h @@ -327,6 +327,13 @@ UNUSUAL_DEV( 0x04b0, 0x0409, 0x0100, 0x US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), +/* Reported by Milinevsky Dmitry [EMAIL PROTECTED] */ +UNUSUAL_DEV( 0x04b0, 0x0409, 0x0100, 0x0100, + NIKON, + NIKON DSC D50, + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_FIX_CAPACITY), + /* Reported by Andreas Bockhold [EMAIL PROTECTED] */ UNUSUAL_DEV( 0x04b0, 0x0405, 0x0100, 0x0100, NIKON, _ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] [patch 1/8] usb: typo in usb R8A66597 HCD config
From: M4rkusXXL [EMAIL PROTECTED] Cc: Greg KH [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- drivers/usb/host/Kconfig |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/usb/host/Kconfig~usb-typo-in-usb-r8a66597-hcd-config drivers/usb/host/Kconfig --- a/drivers/usb/host/Kconfig~usb-typo-in-usb-r8a66597-hcd-config +++ a/drivers/usb/host/Kconfig @@ -237,7 +237,7 @@ config USB_SL811_CS module will be called sl811_cs. config USB_R8A66597_HCD - tristate R8A66597 HCD suppoort + tristate R8A66597 HCD support depends on USB help The R8A66597 is a USB 2.0 host and peripheral controller. _ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] [patch 3/8] kl5kusb105: witch to new speed API
From: Alan Cox [EMAIL PROTECTED] Signed-off-by: Alan Cox [EMAIL PROTECTED] Cc: Greg KH [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- drivers/usb/serial/kl5kusb105.c | 28 ++-- 1 files changed, 18 insertions(+), 10 deletions(-) diff -puN drivers/usb/serial/kl5kusb105.c~kl5kusb105-switch-to-new-speed-api drivers/usb/serial/kl5kusb105.c --- a/drivers/usb/serial/kl5kusb105.c~kl5kusb105-switch-to-new-speed-api +++ a/drivers/usb/serial/kl5kusb105.c @@ -728,24 +728,32 @@ static void klsi_105_set_termios (struct #endif } - switch(cflag CBAUD) { - case B0: /* handled below */ + switch(tty_get_baud_rate(port-tty)) { + case 0: /* handled below */ break; - case B1200: priv-cfg.baudrate = kl5kusb105a_sio_b1200; + case 1200: + priv-cfg.baudrate = kl5kusb105a_sio_b1200; break; - case B2400: priv-cfg.baudrate = kl5kusb105a_sio_b2400; + case 2400: + priv-cfg.baudrate = kl5kusb105a_sio_b2400; break; - case B4800: priv-cfg.baudrate = kl5kusb105a_sio_b4800; + case 4800: + priv-cfg.baudrate = kl5kusb105a_sio_b4800; break; - case B9600: priv-cfg.baudrate = kl5kusb105a_sio_b9600; + case 9600: + priv-cfg.baudrate = kl5kusb105a_sio_b9600; break; - case B19200: priv-cfg.baudrate = kl5kusb105a_sio_b19200; + case 19200: + priv-cfg.baudrate = kl5kusb105a_sio_b19200; break; - case B38400: priv-cfg.baudrate = kl5kusb105a_sio_b38400; + case 38400: + priv-cfg.baudrate = kl5kusb105a_sio_b38400; break; - case B57600: priv-cfg.baudrate = kl5kusb105a_sio_b57600; + case 57600: + priv-cfg.baudrate = kl5kusb105a_sio_b57600; break; - case B115200: priv-cfg.baudrate = kl5kusb105a_sio_b115200; + case 115200: + priv-cfg.baudrate = kl5kusb105a_sio_b115200; break; default: err(KLSI USB-Serial converter: _ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] [patch 5/8] drivers/usb/misc/ftdi-elan.c: kmalloc + memset conversion to kzalloc
From: Mariusz Kozlowski [EMAIL PROTECTED] drivers/usb/misc/ftdi-elan.c | 121253 - 121196 (-57 bytes) drivers/usb/misc/ftdi-elan.o | 209425 - 209265 (-160 bytes) Signed-off-by: Mariusz Kozlowski [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- drivers/usb/misc/ftdi-elan.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff -puN drivers/usb/misc/ftdi-elan.c~drivers-usb-misc-ftdi-elanc-kmalloc-memset-conversion-to-kzalloc drivers/usb/misc/ftdi-elan.c --- a/drivers/usb/misc/ftdi-elan.c~drivers-usb-misc-ftdi-elanc-kmalloc-memset-conversion-to-kzalloc +++ a/drivers/usb/misc/ftdi-elan.c @@ -2777,12 +2777,14 @@ static int ftdi_elan_probe(struct usb_in size_t buffer_size; int i; int retval = -ENOMEM; -struct usb_ftdi *ftdi = kmalloc(sizeof(struct usb_ftdi), GFP_KERNEL); -if (ftdi == NULL) { +struct usb_ftdi *ftdi; + + ftdi = kzalloc(sizeof(struct usb_ftdi), GFP_KERNEL); + if (!ftdi) { printk(KERN_ERR Out of memory\n); return -ENOMEM; } -memset(ftdi, 0x00, sizeof(struct usb_ftdi)); + mutex_lock(ftdi_module_lock); list_add_tail(ftdi-ftdi_list, ftdi_static_list); ftdi-sequence_num = ++ftdi_instances; _ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] [patch 8/8] usb: remove redundant memset from amd5536udc
From: Mariusz Kozlowski [EMAIL PROTECTED] Remove redundant memset() call from udc_pci_probe(). No functional change. Signed-off-by: Mariusz Kozlowski [EMAIL PROTECTED] Cc: Greg KH [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- drivers/usb/gadget/amd5536udc.c |1 - 1 files changed, 1 deletion(-) diff -puN drivers/usb/gadget/amd5536udc.c~usb-remove-redundant-memset-from-amd5536udc drivers/usb/gadget/amd5536udc.c --- a/drivers/usb/gadget/amd5536udc.c~usb-remove-redundant-memset-from-amd5536udc +++ a/drivers/usb/gadget/amd5536udc.c @@ -3244,7 +3244,6 @@ static int udc_pci_probe( retval = -ENOMEM; goto finished; } - memset(dev, 0, sizeof(struct udc)); /* pci setup */ if (pci_enable_device(pdev) 0) { _ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] [patch 4/8] mct_u232-convert-to-proper-speed-handling-api-fix
From: Andrew Morton [EMAIL PROTECTED] Make Pete happy Cc: Alan Cox [EMAIL PROTECTED] Cc: Greg KH [EMAIL PROTECTED] Cc: Pete Zaitcev [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- drivers/usb/serial/mct_u232.c | 28 ++-- 1 files changed, 14 insertions(+), 14 deletions(-) diff -puN drivers/usb/serial/mct_u232.c~mct_u232-convert-to-proper-speed-handling-api-fix drivers/usb/serial/mct_u232.c --- a/drivers/usb/serial/mct_u232.c~mct_u232-convert-to-proper-speed-handling-api-fix +++ a/drivers/usb/serial/mct_u232.c @@ -206,20 +206,20 @@ static int mct_u232_calculate_baud_rate( } } else { switch (value) { - case 300: break; - case 600: break; - case 1200: break; - case 2400: break; - case 4800: break; - case 9600: break; - case 19200: break; - case 38400: break; - case 57600: break; - case 115200: break; - default: - err(MCT USB-RS232: unsupported baudrate request 0x%x, -using default of B9600, value); - value = 9600; + case 300: break; + case 600: break; + case 1200: break; + case 2400: break; + case 4800: break; + case 9600: break; + case 19200: break; + case 38400: break; + case 57600: break; + case 115200: break; + default: + err(MCT USB-RS232: unsupported baudrate request 0x%x, +using default of B9600, value); + value = 9600; } return 115200/value; } _ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] [patch 7/8] usb: r8a66597-hcd: Clean up error path.
From: Paul Mundt [EMAIL PROTECTED] Currently when registration fails we're left with a stray reference to release_mem_region(), this leads to the following case: r8a66597_hcd r8a66597_hcd: irq 13, io base 0x1804 drivers/usb/host/r8a66597-hcd.c: register access fail. r8a66597_hcd r8a66597_hcd: startup error -6 r8a66597_hcd r8a66597_hcd: USB bus 1 deregistered drivers/usb/host/r8a66597-hcd.c: Failed to add hcd Trying to free nonexistent resource 1804-1804 This fixes it up. Signed-off-by: Paul Mundt [EMAIL PROTECTED] Cc: Greg KH [EMAIL PROTECTED] Cc: Alan Stern [EMAIL PROTECTED] Cc: Yoshihiro Shimoda [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- drivers/usb/host/r8a66597-hcd.c |2 -- 1 files changed, 2 deletions(-) diff -puN drivers/usb/host/r8a66597-hcd.c~usb-r8a66597-hcd-clean-up-error-path drivers/usb/host/r8a66597-hcd.c --- a/drivers/usb/host/r8a66597-hcd.c~usb-r8a66597-hcd-clean-up-error-path +++ a/drivers/usb/host/r8a66597-hcd.c @@ -2208,8 +2208,6 @@ static int __init r8a66597_probe(struct clean_up: if (reg) iounmap(reg); - if (res) - release_mem_region(res-start, 1); return ret; } _ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] [patch 6/8] usb: enable hcd support on SH unconditionally.
From: Paul Mundt [EMAIL PROTECTED] Previous boards were likely seeing USB_ARCH_HAS_HCD selected by way of PCMCIA or PCI, though none of those are required for hcd support on SH. Enable support unconditionally. Signed-off-by: Paul Mundt [EMAIL PROTECTED] Cc: Greg KH [EMAIL PROTECTED] Cc: Alan Stern [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- drivers/usb/Kconfig |1 + 1 files changed, 1 insertion(+) diff -puN drivers/usb/Kconfig~usb-enable-hcd-support-on-sh-unconditionally drivers/usb/Kconfig --- a/drivers/usb/Kconfig~usb-enable-hcd-support-on-sh-unconditionally +++ a/drivers/usb/Kconfig @@ -18,6 +18,7 @@ config USB_ARCH_HAS_HCD default y if USB_ARCH_HAS_EHCI default y if PCMCIA !M32R# sl811_cs default y if ARM# SL-811 + default y if SUPERH # r8a66597-hcd default PCI # many non-PCI SOC chips embed OHCI _ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] [PATCH] OHCI suspend/resume issue.
On Friday 10 August 2007, Alan Stern wrote: When the OLPC comes up from suspend, a small bit of Open Firmware code gets run, this writes 1 to HcCommandStatus, resetting the OHCI chip into Suspend mode, then writes into HcRhDescriptorB and HcRhPortStatus*, bringing up the power to the USB ports. After that the OS gets started, so by the time the Linux OHCI code sees things, we're already in suspend mode and the power to the ports is on, but otherwise we're fresh from chip power on. However since the chip isn't actually in reset, ohci_rh_resume doesn't jump through the right hoops. This is a problem. Yes. The code in ohci-hcd isn't very sophisticated about checking for interference from the firmware. Maybe because there are so many different implementations of OHCI floating around, it's hard to know what approach will work on all of them. And maybe because there aren't many settings which can be checked. On the contrary ... it's relatively sophisticated, precisely since there ARE so many different hardware variations. The problem is that OF is creating a new beastie here ... something which is neither a true suspend (as seen with ACPI, APM, and various embedded Linuxes) *nor* a true poweroff. Either one alone should be OK. But this thing *isn't* OK. Changing what OFW does on resume is possible, if it's flatly not doing what it should. But a driver fix would be preferred in some ways. Any thoughts? I'd say OFW is flatly not doing what it should. In fact, from your description it goes out of its way to fool Linux into thinking the controller was powered on the whole time when in fact it wasn't. Because the power was off the controller has just gone through a hardware reset; there's absolutely no need to pile a software reset on top of that. Right, and I saw Mitch's why it's doing that comment. I'll followup there. - Dave - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] [patch 6/8] usb: enable hcd support on SH unconditionally.
On Friday 10 August 2007, [EMAIL PROTECTED] wrote: Previous boards were likely seeing USB_ARCH_HAS_HCD selected by way of PCMCIA or PCI, though none of those are required for hcd support on SH. Enable support unconditionally. In fact, maybe that ARCH_HAS_HCD switch should vanish. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] [PATCH] USB: SisUSB2VGA: Lindent drivers/usb/misc/sisusbvga/sisusb_struct.h
On Friday 10 August 2007, Felipe Balbi wrote: Better indentation I don't think so. This whole patch seems to make one type of change: - unsigned char St_ModeID; - unsigned short St_ModeFlag; - unsigned char St_StTableIndex; - unsigned char St_CRT2CRTC; - unsigned char St_ResInfo; - unsigned char VB_StTVFlickerIndex; - unsigned char VB_StTVEdgeIndex; - unsigned char VB_StTVYFilterIndex; - unsigned char St_PDC; ... all neatly indented so the fields line up. TheProblemISeeWithThatCodeIsThatItUsesCamelCase. + unsigned char St_ModeID; + unsigned short St_ModeFlag; + unsigned char St_StTableIndex; + unsigned char St_CRT2CRTC; + unsigned char St_ResInfo; + unsigned char VB_StTVFlickerIndex; + unsigned char VB_StTVEdgeIndex; + unsigned char VB_StTVYFilterIndex; + unsigned char St_PDC; ... the fields stopped lining up. In that particular stretch it's not all that much worse, although it does seem harder to find the member names. However, overall I couldn't agree this is an improvement. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[linux-usb-devel] Proofreading your professional documents
Dear Professor/Lecturer Please excuse us for contacting you directly. We are offering an efficient service to help you ensure your academic and professional work is written in perfect English. We will check the grammar and style of your work and return it to you to meet your requirements and deadlines. Proof-Reading-Service.com can provide you with a professional proofreading service at a very reasonable rate. All our proofreaders are highly qualified native English speakers. Many work as leading academics in their fields and all have extensive experience of proofreading to the highest standards. If you are interested in our service, please take a look at our website: www.proof-reading-service.com All you have to do is send us your document as a word attachment with the deadline and we will guarantee delivery of a perfectly written document to give you complete confidence when you submit your work. The fee is worked out on a flat rate (£6.95 per thousand words or 0.695 pence per word), so you know exactly how much the proofreading will cost in advance. Once we have received your document(s) we will confirm the word count, the price and the deadline. If you have not heard from us within 2 hours during normal business hours after you have sent your work please resend it from a different email account or send the file to [EMAIL PROTECTED] We look forward to hearing from you! Yours faithfully Proof-Reading-Service.com - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel