From: Greg Kroah-Hartman Date: Wed, 15 Sep 2010 19:25:25 +0000 (-0700) Subject: .32 patches X-Git-Tag: v2.6.27.54~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e8f93558b229e49a4862219091d6a2e2f3d2f1c5;p=thirdparty%2Fkernel%2Fstable-queue.git .32 patches --- diff --git a/queue-2.6.32/ath9k_hw-fix-parsing-of-ht40-5-ghz-ctls.patch b/queue-2.6.32/ath9k_hw-fix-parsing-of-ht40-5-ghz-ctls.patch new file mode 100644 index 00000000000..7f5799d657e --- /dev/null +++ b/queue-2.6.32/ath9k_hw-fix-parsing-of-ht40-5-ghz-ctls.patch @@ -0,0 +1,47 @@ +From 904879748d7439a6dabdc6be9aad983e216b027d Mon Sep 17 00:00:00 2001 +From: Luis R. Rodriguez +Date: Mon, 30 Aug 2010 19:26:33 -0400 +Subject: ath9k_hw: fix parsing of HT40 5 GHz CTLs + +From: Luis R. Rodriguez + +commit 904879748d7439a6dabdc6be9aad983e216b027d upstream. + +The 5 GHz CTL indexes were not being read for all hardware +devices due to the masking out through the CTL_MODE_M mask +being one bit too short. Without this the calibrated regulatory +maximum values were not being picked up when devices operate +on 5 GHz in HT40 mode. The final output power used for Atheros +devices is the minimum between the calibrated CTL values and +what CRDA provides. + +Signed-off-by: Luis R. Rodriguez +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath9k/eeprom.h | 2 +- + drivers/net/wireless/ath/regd.h | 1 - + 2 files changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/net/wireless/ath/ath9k/eeprom.h ++++ b/drivers/net/wireless/ath/ath9k/eeprom.h +@@ -60,7 +60,7 @@ + + #define SD_NO_CTL 0xE0 + #define NO_CTL 0xff +-#define CTL_MODE_M 7 ++#define CTL_MODE_M 0xf + #define CTL_11A 0 + #define CTL_11B 1 + #define CTL_11G 2 +--- a/drivers/net/wireless/ath/regd.h ++++ b/drivers/net/wireless/ath/regd.h +@@ -31,7 +31,6 @@ enum ctl_group { + #define NO_CTL 0xff + #define SD_NO_CTL 0xE0 + #define NO_CTL 0xff +-#define CTL_MODE_M 7 + #define CTL_11A 0 + #define CTL_11B 1 + #define CTL_11G 2 diff --git a/queue-2.6.32/fuse-flush-background-queue-on-connection-close.patch b/queue-2.6.32/fuse-flush-background-queue-on-connection-close.patch new file mode 100644 index 00000000000..22590917739 --- /dev/null +++ b/queue-2.6.32/fuse-flush-background-queue-on-connection-close.patch @@ -0,0 +1,78 @@ +From 595afaf9e6ee1b48e13ec4b8bcc8c7dee888161a Mon Sep 17 00:00:00 2001 +From: Miklos Szeredi +Date: Tue, 7 Sep 2010 13:42:41 +0200 +Subject: fuse: flush background queue on connection close + +From: Miklos Szeredi + +commit 595afaf9e6ee1b48e13ec4b8bcc8c7dee888161a upstream. + +David Bartly reported that fuse can hang in fuse_get_req_nofail() when +the connection to the filesystem server is no longer active. + +If bg_queue is not empty then flush_bg_queue() called from +request_end() can put more requests on to the pending queue. If this +happens while ending requests on the processing queue then those +background requests will be queued to the pending list and never +ended. + +Another problem is that fuse_dev_release() didn't wake up processes +sleeping on blocked_waitq. + +Solve this by: + + a) flushing the background queue before calling end_requests() on the + pending and processing queues + + b) setting blocked = 0 and waking up processes waiting on + blocked_waitq() + +Thanks to David for an excellent bug report. + +Reported-by: David Bartley +Signed-off-by: Miklos Szeredi +Signed-off-by: Greg Kroah-Hartman + +--- + fs/fuse/dev.c | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +--- a/fs/fuse/dev.c ++++ b/fs/fuse/dev.c +@@ -1158,6 +1158,14 @@ __acquires(&fc->lock) + } + } + ++static void end_queued_requests(struct fuse_conn *fc) ++{ ++ fc->max_background = UINT_MAX; ++ flush_bg_queue(fc); ++ end_requests(fc, &fc->pending); ++ end_requests(fc, &fc->processing); ++} ++ + /* + * Abort all requests. + * +@@ -1184,8 +1192,7 @@ void fuse_abort_conn(struct fuse_conn *f + fc->connected = 0; + fc->blocked = 0; + end_io_requests(fc); +- end_requests(fc, &fc->pending); +- end_requests(fc, &fc->processing); ++ end_queued_requests(fc); + wake_up_all(&fc->waitq); + wake_up_all(&fc->blocked_waitq); + kill_fasync(&fc->fasync, SIGIO, POLL_IN); +@@ -1200,8 +1207,9 @@ int fuse_dev_release(struct inode *inode + if (fc) { + spin_lock(&fc->lock); + fc->connected = 0; +- end_requests(fc, &fc->pending); +- end_requests(fc, &fc->processing); ++ fc->blocked = 0; ++ end_queued_requests(fc); ++ wake_up_all(&fc->blocked_waitq); + spin_unlock(&fc->lock); + fuse_conn_put(fc); + } diff --git a/queue-2.6.32/ocfs2-fix-incorrect-checksum-validation-error.patch b/queue-2.6.32/ocfs2-fix-incorrect-checksum-validation-error.patch new file mode 100644 index 00000000000..d21d8229049 --- /dev/null +++ b/queue-2.6.32/ocfs2-fix-incorrect-checksum-validation-error.patch @@ -0,0 +1,43 @@ +From f5ce5a08a40f2086435858ddc80cb40394b082eb Mon Sep 17 00:00:00 2001 +From: Sunil Mushran +Date: Thu, 12 Aug 2010 16:24:26 -0700 +Subject: ocfs2: Fix incorrect checksum validation error + +From: Sunil Mushran + +commit f5ce5a08a40f2086435858ddc80cb40394b082eb upstream. + +For local mounts, ocfs2_read_locked_inode() calls ocfs2_read_blocks_sync() to +read the inode off the disk. The latter first checks to see if that block is +cached in the journal, and, if so, returns that block. That is ok. + +But ocfs2_read_locked_inode() goes wrong when it tries to validate the checksum +of such blocks. Blocks that are cached in the journal may not have had their +checksum computed as yet. We should not validate the checksums of such blocks. + +Fixes ossbz#1282 +http://oss.oracle.com/bugzilla/show_bug.cgi?id=1282 + +Signed-off-by: Sunil Mushran +Singed-off-by: Tao Ma +Signed-off-by: Greg Kroah-Hartman + +--- + fs/ocfs2/inode.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/fs/ocfs2/inode.c ++++ b/fs/ocfs2/inode.c +@@ -485,7 +485,11 @@ static int ocfs2_read_locked_inode(struc + OCFS2_BH_IGNORE_CACHE); + } else { + status = ocfs2_read_blocks_sync(osb, args->fi_blkno, 1, &bh); +- if (!status) ++ /* ++ * If buffer is in jbd, then its checksum may not have been ++ * computed as yet. ++ */ ++ if (!status && !buffer_jbd(bh)) + status = ocfs2_validate_inode_block(osb->sb, bh); + } + if (status < 0) { diff --git a/queue-2.6.32/series b/queue-2.6.32/series index 4d28dac883f..92dd861d284 100644 --- a/queue-2.6.32/series +++ b/queue-2.6.32/series @@ -11,3 +11,15 @@ staging-hv-fixed-bounce-kmap-problem-by-using-correct-index.patch staging-hv-fixed-the-value-of-the-64bit-hole-inside-ring-buffer.patch staging-hv-increased-storvsc-ringbuffer-and-max_io_requests.patch staging-hv-fixed-lockup-problem-with-bounce_buffer-scatter-list.patch +fuse-flush-background-queue-on-connection-close.patch +ath9k_hw-fix-parsing-of-ht40-5-ghz-ctls.patch +ocfs2-fix-incorrect-checksum-validation-error.patch +usb-ehci-ppc-of-problems-in-unwind.patch +usb-fix-kernel-oops-with-g_ether-and-windows.patch +usb-cp210x-add-new-device-id.patch +usb-cp210x-add-b-g-h3000-link-cable-id.patch +usb-ftdi_sio-added-custom-pids-for-chamsys-products.patch +usb-serial-extra-device-vendor-id-for-mos7840-driver.patch +usb-serial-mos7840-add-usb-id-to-support-the-b-b-electronics-usoptl4-2p.patch +usb-mos7840-fix-dma-buffers-on-stack-and-endianess-bugs.patch +usb-serial-mos7840-add-usb-ids-to-support-more-b-b-usb-rs485-converters.patch diff --git a/queue-2.6.32/usb-cp210x-add-b-g-h3000-link-cable-id.patch b/queue-2.6.32/usb-cp210x-add-b-g-h3000-link-cable-id.patch new file mode 100644 index 00000000000..90658a016ca --- /dev/null +++ b/queue-2.6.32/usb-cp210x-add-b-g-h3000-link-cable-id.patch @@ -0,0 +1,29 @@ +From 0bf7a81c5d447c21db434be35363c44c0a30f598 Mon Sep 17 00:00:00 2001 +From: Jason Detring +Date: Thu, 26 Aug 2010 15:08:54 -0500 +Subject: USB: cp210x: Add B&G H3000 link cable ID + +From: Jason Detring + +commit 0bf7a81c5d447c21db434be35363c44c0a30f598 upstream. + +This is the cable between an H3000 navigation unit and a multi-function display. +http://www.bandg.com/en/Products/H3000/Spares-and-Accessories/Cables/H3000-CPU-USB-Cable-Pack/ + +Signed-off-by: Jason Detring +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/cp210x.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/serial/cp210x.c ++++ b/drivers/usb/serial/cp210x.c +@@ -90,6 +90,7 @@ static struct usb_device_id id_table [] + { USB_DEVICE(0x10C4, 0x8149) }, /* West Mountain Radio Computerized Battery Analyzer */ + { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */ + { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */ ++ { USB_DEVICE(0x10C4, 0x8156) }, /* B&G H3000 link cable */ + { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ + { USB_DEVICE(0x10C4, 0x818B) }, /* AVIT Research USB to TTL */ + { USB_DEVICE(0x10C4, 0x819F) }, /* MJS USB Toslink Switcher */ diff --git a/queue-2.6.32/usb-cp210x-add-new-device-id.patch b/queue-2.6.32/usb-cp210x-add-new-device-id.patch new file mode 100644 index 00000000000..7b114f04f3d --- /dev/null +++ b/queue-2.6.32/usb-cp210x-add-new-device-id.patch @@ -0,0 +1,47 @@ +From 541e05ec3add5ab5bcf238d60161b53480280b20 Mon Sep 17 00:00:00 2001 +From: Craig Shelley +Date: Mon, 23 Aug 2010 20:50:57 +0100 +Subject: USB: CP210x Add new device ID + +From: Craig Shelley + +commit 541e05ec3add5ab5bcf238d60161b53480280b20 upstream. + +New device ID added for Balluff RFID reader. + +Signed-off-by: Craig Shelley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/cp210x.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +--- a/drivers/usb/serial/cp210x.c ++++ b/drivers/usb/serial/cp210x.c +@@ -111,6 +111,7 @@ static struct usb_device_id id_table [] + { USB_DEVICE(0x10C4, 0x83A8) }, /* Amber Wireless AMB2560 */ + { USB_DEVICE(0x10C4, 0x8411) }, /* Kyocera GPS Module */ + { USB_DEVICE(0x10C4, 0x846E) }, /* BEI USB Sensor Interface (VCP) */ ++ { USB_DEVICE(0x10C4, 0x8477) }, /* Balluff RFID */ + { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ + { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ + { USB_DEVICE(0x10C4, 0xEA71) }, /* Infinity GPS-MIC-1 Radio Monophone */ +@@ -124,14 +125,14 @@ static struct usb_device_id id_table [] + { USB_DEVICE(0x1555, 0x0004) }, /* Owen AC4 USB-RS485 Converter */ + { USB_DEVICE(0x166A, 0x0303) }, /* Clipsal 5500PCU C-Bus USB interface */ + { USB_DEVICE(0x16D6, 0x0001) }, /* Jablotron serial interface */ +- { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ +- { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ +- { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ +- { USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */ + { USB_DEVICE(0x16DC, 0x0010) }, /* W-IE-NE-R Plein & Baus GmbH PL512 Power Supply */ + { USB_DEVICE(0x16DC, 0x0011) }, /* W-IE-NE-R Plein & Baus GmbH RCM Remote Control for MARATON Power Supply */ + { USB_DEVICE(0x16DC, 0x0012) }, /* W-IE-NE-R Plein & Baus GmbH MPOD Multi Channel Power Supply */ + { USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */ ++ { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ ++ { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ ++ { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ ++ { USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */ + { } /* Terminating Entry */ + }; + diff --git a/queue-2.6.32/usb-ehci-ppc-of-problems-in-unwind.patch b/queue-2.6.32/usb-ehci-ppc-of-problems-in-unwind.patch new file mode 100644 index 00000000000..62c5f61b2b0 --- /dev/null +++ b/queue-2.6.32/usb-ehci-ppc-of-problems-in-unwind.patch @@ -0,0 +1,53 @@ +From 08a3b3b1c2e622e378d9086aee9e2e42ce37591d Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Sat, 14 Aug 2010 11:06:19 +0200 +Subject: USB: ehci-ppc-of: problems in unwind + +From: Dan Carpenter + +commit 08a3b3b1c2e622e378d9086aee9e2e42ce37591d upstream. + +The iounmap(ehci->ohci_hcctrl_reg); should be the first thing we do +because the ioremap() was the last thing we did. Also if we hit any of +the goto statements in the original code then it would have led to a +NULL dereference of "ehci". This bug was introduced in: 796bcae7361c +"USB: powerpc: Workaround for the PPC440EPX USBH_23 errata [take 3]" + +I modified the few lines in front a little so that my code didn't +obscure the return success code path. + +Signed-off-by: Dan Carpenter +Reviewed-by: Grant Likely +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/ehci-ppc-of.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +--- a/drivers/usb/host/ehci-ppc-of.c ++++ b/drivers/usb/host/ehci-ppc-of.c +@@ -192,17 +192,19 @@ ehci_hcd_ppc_of_probe(struct of_device * + } + + rv = usb_add_hcd(hcd, irq, 0); +- if (rv == 0) +- return 0; ++ if (rv) ++ goto err_ehci; + ++ return 0; ++ ++err_ehci: ++ if (ehci->has_amcc_usb23) ++ iounmap(ehci->ohci_hcctrl_reg); + iounmap(hcd->regs); + err_ioremap: + irq_dispose_mapping(irq); + err_irq: + release_mem_region(hcd->rsrc_start, hcd->rsrc_len); +- +- if (ehci->has_amcc_usb23) +- iounmap(ehci->ohci_hcctrl_reg); + err_rmr: + usb_put_hcd(hcd); + diff --git a/queue-2.6.32/usb-fix-kernel-oops-with-g_ether-and-windows.patch b/queue-2.6.32/usb-fix-kernel-oops-with-g_ether-and-windows.patch new file mode 100644 index 00000000000..58e0d858350 --- /dev/null +++ b/queue-2.6.32/usb-fix-kernel-oops-with-g_ether-and-windows.patch @@ -0,0 +1,39 @@ +From 037d3656adbd7e8cb848f01cf5dec423ed76bbe7 Mon Sep 17 00:00:00 2001 +From: Maxim Osipov +Date: Sat, 21 Aug 2010 14:54:06 +0400 +Subject: USB: Fix kernel oops with g_ether and Windows + +From: Maxim Osipov + +commit 037d3656adbd7e8cb848f01cf5dec423ed76bbe7 upstream. + +Please find attached patch for +https://bugzilla.kernel.org/show_bug.cgi?id=16023 problem. + + +Signed-off-by: Maxim Osipov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/gadget/rndis.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +--- a/drivers/usb/gadget/rndis.c ++++ b/drivers/usb/gadget/rndis.c +@@ -291,9 +291,13 @@ gen_ndis_query_resp (int configNr, u32 O + /* mandatory */ + case OID_GEN_VENDOR_DESCRIPTION: + pr_debug("%s: OID_GEN_VENDOR_DESCRIPTION\n", __func__); +- length = strlen (rndis_per_dev_params [configNr].vendorDescr); +- memcpy (outbuf, +- rndis_per_dev_params [configNr].vendorDescr, length); ++ if ( rndis_per_dev_params [configNr].vendorDescr ) { ++ length = strlen (rndis_per_dev_params [configNr].vendorDescr); ++ memcpy (outbuf, ++ rndis_per_dev_params [configNr].vendorDescr, length); ++ } else { ++ outbuf[0] = 0; ++ } + retval = 0; + break; + diff --git a/queue-2.6.32/usb-ftdi_sio-added-custom-pids-for-chamsys-products.patch b/queue-2.6.32/usb-ftdi_sio-added-custom-pids-for-chamsys-products.patch new file mode 100644 index 00000000000..986833f6814 --- /dev/null +++ b/queue-2.6.32/usb-ftdi_sio-added-custom-pids-for-chamsys-products.patch @@ -0,0 +1,57 @@ +From 657373883417b2618023fd4135d251ba06a2c30a Mon Sep 17 00:00:00 2001 +From: Luke Lowrey +Date: Thu, 2 Sep 2010 11:39:49 +0100 +Subject: USB: ftdi_sio: Added custom PIDs for ChamSys products + +From: Luke Lowrey + +commit 657373883417b2618023fd4135d251ba06a2c30a upstream. + +Added the 0xDAF8 to 0xDAFF PID range for ChamSys limited USB interface/wing products + +Signed-off-by: Luke Lowrey +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 8 ++++++++ + drivers/usb/serial/ftdi_sio_ids.h | 12 ++++++++++++ + 2 files changed, 20 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -759,6 +759,14 @@ static struct usb_device_id id_table_com + { USB_DEVICE(FTDI_VID, SEGWAY_RMP200_PID) }, + { USB_DEVICE(IONICS_VID, IONICS_PLUGCOMPUTER_PID), + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, ++ { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_24_MASTER_WING_PID) }, ++ { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_PC_WING_PID) }, ++ { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_USB_DMX_PID) }, ++ { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_MIDI_TIMECODE_PID) }, ++ { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_MINI_WING_PID) }, ++ { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_MAXI_WING_PID) }, ++ { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_MEDIA_WING_PID) }, ++ { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_WING_PID) }, + { }, /* Optional parameter entry */ + { } /* Terminating entry */ + }; +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -135,6 +135,18 @@ + #define FTDI_NDI_AURORA_SCU_PID 0xDA74 /* NDI Aurora SCU */ + + /* ++ * ChamSys Limited (www.chamsys.co.uk) USB wing/interface product IDs ++ */ ++#define FTDI_CHAMSYS_24_MASTER_WING_PID 0xDAF8 ++#define FTDI_CHAMSYS_PC_WING_PID 0xDAF9 ++#define FTDI_CHAMSYS_USB_DMX_PID 0xDAFA ++#define FTDI_CHAMSYS_MIDI_TIMECODE_PID 0xDAFB ++#define FTDI_CHAMSYS_MINI_WING_PID 0xDAFC ++#define FTDI_CHAMSYS_MAXI_WING_PID 0xDAFD ++#define FTDI_CHAMSYS_MEDIA_WING_PID 0xDAFE ++#define FTDI_CHAMSYS_WING_PID 0xDAFF ++ ++/* + * Westrex International devices submitted by Cory Lee + */ + #define FTDI_WESTREX_MODEL_777_PID 0xDC00 /* Model 777 */ diff --git a/queue-2.6.32/usb-mos7840-fix-dma-buffers-on-stack-and-endianess-bugs.patch b/queue-2.6.32/usb-mos7840-fix-dma-buffers-on-stack-and-endianess-bugs.patch new file mode 100644 index 00000000000..75a76a6f1c5 --- /dev/null +++ b/queue-2.6.32/usb-mos7840-fix-dma-buffers-on-stack-and-endianess-bugs.patch @@ -0,0 +1,66 @@ +From 9e221a35f82cbef0397d81fed588bafba95b550c Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Mon, 28 Dec 2009 23:01:55 +0100 +Subject: USB: mos7840: fix DMA buffers on stack and endianess bugs + +From: Johan Hovold + +commit 9e221a35f82cbef0397d81fed588bafba95b550c upstream. + +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/mos7840.c | 22 ++++++++++++++++++---- + 1 file changed, 18 insertions(+), 4 deletions(-) + +--- a/drivers/usb/serial/mos7840.c ++++ b/drivers/usb/serial/mos7840.c +@@ -286,12 +286,19 @@ static int mos7840_get_reg_sync(struct u + { + struct usb_device *dev = port->serial->dev; + int ret = 0; ++ u8 *buf; ++ ++ buf = kmalloc(VENDOR_READ_LENGTH, GFP_KERNEL); ++ if (!buf) ++ return -ENOMEM; + + ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), MCS_RDREQ, +- MCS_RD_RTYPE, 0, reg, val, VENDOR_READ_LENGTH, ++ MCS_RD_RTYPE, 0, reg, buf, VENDOR_READ_LENGTH, + MOS_WDR_TIMEOUT); ++ *val = buf[0]; + dbg("mos7840_get_reg_sync offset is %x, return val %x", reg, *val); +- *val = (*val) & 0x00ff; ++ ++ kfree(buf); + return ret; + } + +@@ -344,6 +351,11 @@ static int mos7840_get_uart_reg(struct u + struct usb_device *dev = port->serial->dev; + int ret = 0; + __u16 Wval; ++ u8 *buf; ++ ++ buf = kmalloc(VENDOR_READ_LENGTH, GFP_KERNEL); ++ if (!buf) ++ return -ENOMEM; + + /* dbg("application number is %4x", + (((__u16)port->number - (__u16)(port->serial->minor))+1)<<8); */ +@@ -367,9 +379,11 @@ static int mos7840_get_uart_reg(struct u + } + } + ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), MCS_RDREQ, +- MCS_RD_RTYPE, Wval, reg, val, VENDOR_READ_LENGTH, ++ MCS_RD_RTYPE, Wval, reg, buf, VENDOR_READ_LENGTH, + MOS_WDR_TIMEOUT); +- *val = (*val) & 0x00ff; ++ *val = buf[0]; ++ ++ kfree(buf); + return ret; + } + diff --git a/queue-2.6.32/usb-serial-extra-device-vendor-id-for-mos7840-driver.patch b/queue-2.6.32/usb-serial-extra-device-vendor-id-for-mos7840-driver.patch new file mode 100644 index 00000000000..e49c769dcc4 --- /dev/null +++ b/queue-2.6.32/usb-serial-extra-device-vendor-id-for-mos7840-driver.patch @@ -0,0 +1,46 @@ +From 27f1281d5f72e4f161e215ccad3d7d86b9e624a9 Mon Sep 17 00:00:00 2001 +From: Blaise Gassend +Date: Fri, 18 Dec 2009 15:23:38 -0800 +Subject: USB: serial: Extra device/vendor ID for mos7840 driver + +From: Blaise Gassend + +commit 27f1281d5f72e4f161e215ccad3d7d86b9e624a9 upstream. + +Signed-off-by: Blaise Gassend +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/mos7840.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/drivers/usb/serial/mos7840.c ++++ b/drivers/usb/serial/mos7840.c +@@ -127,8 +127,9 @@ + #define BANDB_DEVICE_ID_US9ML2_4 0xAC30 + #define BANDB_DEVICE_ID_USPTL4_2 0xAC31 + #define BANDB_DEVICE_ID_USPTL4_4 0xAC32 +-#define BANDB_DEVICE_ID_USOPTL4_2 0xAC42 +-#define BANDB_DEVICE_ID_USOPTL4_4 0xAC44 ++#define BANDB_DEVICE_ID_USOPTL4_2 0xAC42 ++#define BANDB_DEVICE_ID_USOPTL4_4 0xAC44 ++#define BANDB_DEVICE_ID_USOPTL2_4 0xAC24 + + /* This driver also supports + * ATEN UC2324 device using Moschip MCS7840 +@@ -191,6 +192,7 @@ static struct usb_device_id moschip_port + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USPTL4_4)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4)}, ++ {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL2_4)}, + {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2324)}, + {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2322)}, + {} /* terminating entry */ +@@ -207,6 +209,7 @@ static __devinitdata struct usb_device_i + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USPTL4_4)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4)}, ++ {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL2_4)}, + {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2324)}, + {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2322)}, + {} /* terminating entry */ diff --git a/queue-2.6.32/usb-serial-mos7840-add-usb-id-to-support-the-b-b-electronics-usoptl4-2p.patch b/queue-2.6.32/usb-serial-mos7840-add-usb-id-to-support-the-b-b-electronics-usoptl4-2p.patch new file mode 100644 index 00000000000..60bb8482b97 --- /dev/null +++ b/queue-2.6.32/usb-serial-mos7840-add-usb-id-to-support-the-b-b-electronics-usoptl4-2p.patch @@ -0,0 +1,45 @@ +From caf3a636a9f809fdca5fa746e6687096457accb1 Mon Sep 17 00:00:00 2001 +From: Dave Ludlow +Date: Tue, 31 Aug 2010 14:26:17 -0400 +Subject: usb: serial: mos7840: Add USB ID to support the B&B Electronics USOPTL4-2P. + +From: Dave Ludlow + +commit caf3a636a9f809fdca5fa746e6687096457accb1 upstream. + +Add the USB ID needed to support B&B Electronic's 2-port, optically-isolated, +powered, USB to RS485 converter. + +Signed-off-by: Dave Ludlow +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/mos7840.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/usb/serial/mos7840.c ++++ b/drivers/usb/serial/mos7840.c +@@ -130,6 +130,7 @@ + #define BANDB_DEVICE_ID_USOPTL4_2 0xAC42 + #define BANDB_DEVICE_ID_USOPTL4_4 0xAC44 + #define BANDB_DEVICE_ID_USOPTL2_4 0xAC24 ++#define BANDB_DEVICE_ID_USOPTL4_2P 0xBC02 + + /* This driver also supports + * ATEN UC2324 device using Moschip MCS7840 +@@ -193,6 +194,7 @@ static struct usb_device_id moschip_port + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL2_4)}, ++ {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL2_4P)}, + {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2324)}, + {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2322)}, + {} /* terminating entry */ +@@ -210,6 +212,7 @@ static __devinitdata struct usb_device_i + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL2_4)}, ++ {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL2_4P)}, + {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2324)}, + {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2322)}, + {} /* terminating entry */ diff --git a/queue-2.6.32/usb-serial-mos7840-add-usb-ids-to-support-more-b-b-usb-rs485-converters.patch b/queue-2.6.32/usb-serial-mos7840-add-usb-ids-to-support-more-b-b-usb-rs485-converters.patch new file mode 100644 index 00000000000..85a9018df7d --- /dev/null +++ b/queue-2.6.32/usb-serial-mos7840-add-usb-ids-to-support-more-b-b-usb-rs485-converters.patch @@ -0,0 +1,94 @@ +From 870408c8291015872a7a0b583673a9e56b3e73f4 Mon Sep 17 00:00:00 2001 +From: Dave Ludlow +Date: Wed, 1 Sep 2010 12:33:30 -0400 +Subject: usb: serial: mos7840: Add USB IDs to support more B&B USB/RS485 converters. + +From: Dave Ludlow + +commit 870408c8291015872a7a0b583673a9e56b3e73f4 upstream. + +Add the USB IDs needed to support the B&B USOPTL4-4P, USO9ML2-2P, and +USO9ML2-4P. This patch expands and corrects a typo in the patch sent +on 08-31-2010. + +Signed-off-by: Dave Ludlow +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/mos7840.c | 35 ++++++++++++++++++++++------------- + 1 file changed, 22 insertions(+), 13 deletions(-) + +--- a/drivers/usb/serial/mos7840.c ++++ b/drivers/usb/serial/mos7840.c +@@ -120,17 +120,20 @@ + * by making a change here, in moschip_port_id_table, and in + * moschip_id_table_combined + */ +-#define USB_VENDOR_ID_BANDB 0x0856 +-#define BANDB_DEVICE_ID_USO9ML2_2 0xAC22 +-#define BANDB_DEVICE_ID_USO9ML2_4 0xAC24 +-#define BANDB_DEVICE_ID_US9ML2_2 0xAC29 +-#define BANDB_DEVICE_ID_US9ML2_4 0xAC30 +-#define BANDB_DEVICE_ID_USPTL4_2 0xAC31 +-#define BANDB_DEVICE_ID_USPTL4_4 0xAC32 +-#define BANDB_DEVICE_ID_USOPTL4_2 0xAC42 +-#define BANDB_DEVICE_ID_USOPTL4_4 0xAC44 +-#define BANDB_DEVICE_ID_USOPTL2_4 0xAC24 +-#define BANDB_DEVICE_ID_USOPTL4_2P 0xBC02 ++#define USB_VENDOR_ID_BANDB 0x0856 ++#define BANDB_DEVICE_ID_USO9ML2_2 0xAC22 ++#define BANDB_DEVICE_ID_USO9ML2_2P 0xBC00 ++#define BANDB_DEVICE_ID_USO9ML2_4 0xAC24 ++#define BANDB_DEVICE_ID_USO9ML2_4P 0xBC01 ++#define BANDB_DEVICE_ID_US9ML2_2 0xAC29 ++#define BANDB_DEVICE_ID_US9ML2_4 0xAC30 ++#define BANDB_DEVICE_ID_USPTL4_2 0xAC31 ++#define BANDB_DEVICE_ID_USPTL4_4 0xAC32 ++#define BANDB_DEVICE_ID_USOPTL4_2 0xAC42 ++#define BANDB_DEVICE_ID_USOPTL4_2P 0xBC02 ++#define BANDB_DEVICE_ID_USOPTL4_4 0xAC44 ++#define BANDB_DEVICE_ID_USOPTL4_4P 0xBC03 ++#define BANDB_DEVICE_ID_USOPTL2_4 0xAC24 + + /* This driver also supports + * ATEN UC2324 device using Moschip MCS7840 +@@ -186,15 +189,18 @@ static struct usb_device_id moschip_port + {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7840)}, + {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7820)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USO9ML2_2)}, ++ {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USO9ML2_2P)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USO9ML2_4)}, ++ {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USO9ML2_4P)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_US9ML2_2)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_US9ML2_4)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USPTL4_2)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USPTL4_4)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2)}, ++ {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2P)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4)}, ++ {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4P)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL2_4)}, +- {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL2_4P)}, + {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2324)}, + {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2322)}, + {} /* terminating entry */ +@@ -204,15 +210,18 @@ static __devinitdata struct usb_device_i + {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7840)}, + {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7820)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USO9ML2_2)}, ++ {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USO9ML2_2P)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USO9ML2_4)}, ++ {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USO9ML2_4P)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_US9ML2_2)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_US9ML2_4)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USPTL4_2)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USPTL4_4)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2)}, ++ {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_2P)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4)}, ++ {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL4_4P)}, + {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL2_4)}, +- {USB_DEVICE(USB_VENDOR_ID_BANDB, BANDB_DEVICE_ID_USOPTL2_4P)}, + {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2324)}, + {USB_DEVICE(USB_VENDOR_ID_ATENINTL, ATENINTL_DEVICE_ID_UC2322)}, + {} /* terminating entry */