aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2013-09-04dma: edma: Remove limits on number of slotsJoel Fernandes1-6/+0
With this series, this check is no longer required and we shouldn't need to reject drivers DMA'ing more than the MAX number of slots. Signed-off-by: Joel Fernandes <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-09-04dma: edma: Leave linked to Null slot instead of DUMMY slotJoel Fernandes1-3/+8
Dummy slot has been used as a way for missed-events not to be reported as missing. This has been particularly troublesome for cases where we might want to temporarily pause all incoming events. For EDMA DMAC, there is no way to do any such pausing of events as the occurence of the "next" event is not software controlled. Using "edma_pause" in IRQ handlers doesn't help as by then the event in concern from the slave is already missed. Linking a dummy slot, is seen to absorb these events which we didn't want to miss. So we don't link to dummy, but instead leave it linked to NULL set, allow an error condition and detect the channel that missed it. Consider the case where we have a scatter-list like: SG1->SG2->SG3->SG4->SG5->SG6->Null For ex, for a MAX_NR_SG of 2, earlier we were splitting this as: SG1->SG2->Null SG3->SG4->Null SG5->SG6->Null Now we split it as SG1->SG2->Null SG3->SG4->Null SG5->SG6->Dummy This approach results in lesser unwanted interrupts that occur for the last list split. The Dummy slot has the property of not raising an error condition if events are missed unlike the Null slot. We are OK with this as we're done with processing the whole list once we reach Dummy. Signed-off-by: Joel Fernandes <[email protected]> [modifed duplicate s-o-b & patch title] Signed-off-by: Vinod Koul <[email protected]>
2013-09-04dma: edma: Find missed events and issue themJoel Fernandes1-1/+49
In an effort to move to using Scatter gather lists of any size with EDMA as discussed at [1] instead of placing limitations on the driver, we work through the limitations of the EDMAC hardware to find missed events and issue them. The sequence of events that require this are: For the scenario where MAX slots for an EDMA channel is 3: SG1 -> SG2 -> SG3 -> SG4 -> SG5 -> SG6 -> Null The above SG list will have to be DMA'd in 2 sets: (1) SG1 -> SG2 -> SG3 -> Null (2) SG4 -> SG5 -> SG6 -> Null After (1) is succesfully transferred, the events from the MMC controller donot stop coming and are missed by the time we have setup the transfer for (2). So here, we catch the events missed as an error condition and issue them manually. In the second part of the patch, we make handle the NULL slot cases: For crypto IP, we continue to receive events even continuously in NULL slot, the setup of the next set of SG elements happens after the error handler executes. This is results in some recursion problems. Due to this, we continously receive error interrupts when we manually trigger an event from the error handler. We fix this, by first detecting if the Channel is currently transferring from a NULL slot or not, that's where the edma_read_slot in the error callback from interrupt handler comes in. With this we can determine if the set up of the next SG list has completed, and we manually trigger only in this case. If the setup has _not_ completed, we are still in NULL so we just set a missed flag and allow the manual triggerring to happen in edma_execute which will be eventually called. This fixes the above mentioned race conditions seen with the crypto drivers. [1] http://marc.info/?l=linux-omap&m=137416733628831&w=2 Signed-off-by: Joel Fernandes <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-09-04dma: edma: Write out and handle MAX_NR_SG at a given timeJoel Fernandes1-26/+51
Process SG-elements in batches of MAX_NR_SG if they are greater than MAX_NR_SG. Due to this, at any given time only those many slots will be used in the given channel no matter how long the scatter list is. We keep track of how much has been written inorder to process the next batch of elements in the scatter-list and detect completion. For such intermediate transfer completions (one batch of MAX_NR_SG), make use of pause and resume functions instead of start and stop when such intermediate transfer is in progress or completed as we donot want to clear any pending events. Signed-off-by: Joel Fernandes <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-09-04dma: edma: Setup parameters to DMA MAX_NR_SG at a timeJoel Fernandes1-3/+15
Changes are made here for configuring existing parameters to support DMA'ing them out in batches as needed. Also allocate as many as slots as needed by the SG list, but not more than MAX_NR_SG. Then these slots will be reused accordingly. For ex, if MAX_NR_SG=10, and number of SG entries is 40, still only 10 slots will be allocated to DMA the entire SG list of size 40. Also enable TC interrupts for slots that are a last in a current iteration, or that fall on a MAX_NR_SG boundary. Signed-off-by: Joel Fernandes <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
2013-09-04Merge branch 'topic/api_caps' into for-linusVinod Koul1-7/+8
2013-09-04igb: Update version numberAkeem G Abodunrin1-1/+1
This patch updates igb driver version to 5.0.5 Signed-off-by: Akeem G Abodunrin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-04igb: Implementation to report advertised/supported link on i354 devicesAkeem G Abodunrin1-11/+15
This patch changes the way we report supported/advertised link for i354 devices, especially for 2.5 GB. Instead of reporting 2.5 GB for all i354 devices erroneously, check first, if it is 2.5 GB capable. Signed-off-by: Akeem G Abodunrin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-04igb: Get speed and duplex for 1G non_copper devicesAkeem G Abodunrin1-1/+26
This patch changes how we get speed/duplex for non_copper devices; it now uses pcs register to get current speed and duplex instead of using generic status register that we use to detect speed/duplex for copper devices. Signed-off-by: Akeem G Abodunrin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-04gpio: return -ENOTSUPP if debounce cannot be setLinus Walleij1-2/+5
It appears some drivers are using gpio_set_debounce() opportunistically, i.e. without knowing whether it works or not. (Example: input/keyboard/gpio_keys.c) to account for this use case, return -ENOTSUPP and do not print any warnings in this case. Took a round over the other gpio_set_debounce() consumers to make sure that none of them are relying on the returned error code to be something specific. Signed-off-by: Linus Walleij <[email protected]>
2013-09-04igb: Support to get 2_5G link status for appropriate media typeAkeem G Abodunrin2-18/+18
Since i354 2.5Gb devices are not Copper media type but SerDes, so this patch changes the way we detect speed/duplex link info for this device. Signed-off-by: Akeem G Abodunrin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-04igb: No PHPM support in i354 devicesAkeem G Abodunrin1-2/+9
PHY Power Management does not exist for i354 device. So, there is no need to read and write this register or clear go link Disconnect bit, which could cause a lot of issues. Signed-off-by: Akeem G Abodunrin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-04igb: M88E1543 PHY downshift implementationAkeem G Abodunrin1-9/+20
This patch implements downshift mechanism for M88E1543 PHY, so that downshift is disabled first during link setup process, and later enabled if we are master and downshift link is negotiated. Also cleaned up return code implementation. Signed-off-by: Akeem G Abodunrin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-04igb: New PHY_ID for i354 deviceAkeem G Abodunrin3-14/+14
This patch changes PHY_ID for i354 device, now using M88E1543 instead of M88E1545. Signed-off-by: Akeem G Abodunrin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-04igb: Implementation of 1-sec delay for i210 devicesAkeem G Abodunrin2-3/+32
This patch adds 1 sec delay mechanism to i210 device family, in order to avoid erroneous link issue with the link partner. Signed-off-by: Akeem G Abodunrin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-04i2c: rcar: add rcar-H2 supportNguyen Viet Dung1-2/+33
This patch modify I2C driver of rcar-H1 to usable on both rcar-H1 and rcar-H2. Signed-off-by: Nguyen Viet Dung <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2013-09-04igb: Don't look for a PBA in the iNVM when flashlessTodd Fujinaka1-1/+8
When a part is flashless, do not look for a PBA in the iNVM. Signed-off-by: Todd Fujinaka <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2013-09-04treewide: Convert retrun typos to returnJoe Perches6-6/+6
Tyops should be fixed. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-09-04HID: hid-sensor-hub: change kmalloc + memcpy by kmemdupAndy Shevchenko1-4/+3
The patch substitutes kmemdup for kmalloc followed by memcpy. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-09-04HID: hid-sensor-hub: move to devm_kzallocAndy Shevchenko1-12/+5
devm_kzalloc() will manage resources freeing and allows to make error path smaller and nicer. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-09-04HID: hid-sensor-hub: fix indentation accross the codeAndy Shevchenko1-16/+15
Patch just rearranges lines to be more compact and/or readable. Additionally it converts double space to one in several places. There is no functional change. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-09-04Merge branch 'for-3.11/CVE-2013-2888' into for-3.12/upstreamJiri Kosina1-3/+7
This one didn't make it for 3.11 due to being applied too close to release, queue it for 3.12 merge window. Signed-off-by: Jiri Kosina <[email protected]>
2013-09-04HID: check for NULL field when setting valuesKees Cook1-1/+6
Defensively check that the field to be worked on is not NULL. Signed-off-by: Kees Cook <[email protected]> Cc: [email protected] Signed-off-by: Jiri Kosina <[email protected]>
2013-09-04HID: picolcd_core: validate output report detailsKees Cook1-1/+1
A HID device could send a malicious output report that would cause the picolcd HID driver to trigger a NULL dereference during attr file writing. [[email protected]: changed report->maxfield < 1 to report->maxfield != 1 as suggested by Bruno]. CVE-2013-2899 Signed-off-by: Kees Cook <[email protected]> Cc: [email protected] Reviewed-by: Bruno PrĂ©mont <[email protected]> Acked-by: Bruno PrĂ©mont <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-09-04HID: sensor-hub: validate feature report detailsKees Cook1-1/+2
A HID device could send a malicious feature report that would cause the sensor-hub HID driver to read past the end of heap allocation, leaking kernel memory contents to the caller. CVE-2013-2898 Signed-off-by: Kees Cook <[email protected]> Cc: [email protected] Reviewed-by: Mika Westerberg <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-09-04HID: ntrig: validate feature report detailsKees Cook1-1/+2
A HID device could send a malicious feature report that would cause the ntrig HID driver to trigger a NULL dereference during initialization: [57383.031190] usb 3-1: New USB device found, idVendor=1b96, idProduct=0001 ... [57383.315193] BUG: unable to handle kernel NULL pointer dereference at 0000000000000030 [57383.315308] IP: [<ffffffffa08102de>] ntrig_probe+0x25e/0x420 [hid_ntrig] CVE-2013-2896 Signed-off-by: Kees Cook <[email protected]> Cc: [email protected] Signed-off-by: Rafi Rubin <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-09-04HID: pantherlord: validate output report detailsKees Cook1-2/+8
A HID device could send a malicious output report that would cause the pantherlord HID driver to write beyond the output report allocation during initialization, causing a heap overflow: [ 310.939483] usb 1-1: New USB device found, idVendor=0e8f, idProduct=0003 ... [ 315.980774] BUG kmalloc-192 (Tainted: G W ): Redzone overwritten CVE-2013-2892 Signed-off-by: Kees Cook <[email protected]> Cc: [email protected] Signed-off-by: Jiri Kosina <[email protected]>
2013-09-04HID: hid-wiimote: print small buffers via %*phCAndy Shevchenko1-11/+6
Instead of passing each byte through stack let's use %*phC specifier to dump buffer as a hex string. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: David Herrmann <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-09-04HID: Correct the USB IDs for the new Macbook Air 6Henrik Rydberg2-6/+6
A recent patch (9d9a04ee) added support for the new machine, but got the sequence of USB ids wrong. Reports from both Ian and Linus T show that the 0x0291 id is for ISO, not ANSI, which should have the missing number 0x0290. This patchs moves the three numbers accordingly, fixing the problem. Reported-and-tested-by: Ian Munsie <[email protected]> Tested-by: Linus G Thiel <[email protected]> Signed-off-by: Henrik Rydberg <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-09-04Merge branch 'master' into for-3.12/upstreamJiri Kosina2683-152920/+219937
Sync with Linus' tree to be able to apply fixup patch on top of 9d9a04ee75 ("HID: apple: Add support for the 2013 Macbook Air") Signed-off-by: Jiri Kosina <[email protected]>
2013-09-04HID: wiimote: add support for Guitar-Hero guitarsNicolas Adenis-Lamarre3-0/+182
Apart from drums, Guitar-Hero also ships with guitars. Use the recently introduced input ABS/BTN-bits to report this to user-space. Devices are reported as "Nintendo Wii Remote Guitar". If I ever get my hands on "RockBand" guitars, I will try to report them via the same interface so user-space does not have to bother which device it deals with. Signed-off-by: Nicolas.Adenis-Lamarre <[email protected]> (add commit-msg and adjust to new BTN_* IDs) Signed-off-by: David Herrmann <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-09-04HID: wiimote: add support for Guitar-Hero drumsDavid Herrmann3-0/+227
Guitar-Hero comes with a drums extension. Use the newly introduced input drums-bits to report this back to user-space. This is a usual extension like any other device. Nothing special to take care of. We report this to user-space as "Nintendo Wii Remote Drums". There are other drums (like "RockBand" drums) which we currently do not support and maybe will at some point. However, it is quite likely that we can report these via the same interface. This allows user-space to work with them without knowing the exact branding. I couldn't find anyone who owns a "RockBand" device, though. Initial-work-by: Nicolas Adenis-Lamarre <[email protected]> Signed-off-by: David Herrmann <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-09-03rbd: fix null dereference in doutJosh Durgin1-3/+5
The order parameter is sometimes NULL in _rbd_dev_v2_snap_size(), but the dout() always derefences it. Move this to another dout() protected by a check that order is non-NULL. Signed-off-by: Josh Durgin <[email protected]> Reviewed-by: Sage Weil <[email protected]> Reviewed-by: Alex Elder <[email protected]>
2013-09-03rbd: fix buffer size for writes to images with snapshotsJosh Durgin1-5/+5
rbd_osd_req_create() needs to know the snapshot context size to create a buffer large enough to send it with the message front. It gets this from the img_request, which was not set for the obj_request yet. This resulted in trying to write past the end of the front payload, hitting this BUG: libceph: BUG_ON(p > msg->front.iov_base + msg->front.iov_len); Fix this by associating the obj_request with its img_request immediately after it's created, before the osd request is created. Fixes: http://tracker.ceph.com/issues/5760 Suggested-by: Alex Elder <[email protected]> Signed-off-by: Josh Durgin <[email protected]> Reviewed-by: Alex Elder <[email protected]>
2013-09-03rbd: fix I/O error propagation for readsJosh Durgin1-7/+7
When a request returns an error, the driver needs to report the entire extent of the request as completed. Writes already did this, since they always set xferred = length, but reads were skipping that step if an error other than -ENOENT occurred. Instead, rbd would end up passing 0 xferred to blk_end_request(), which would always report needing more data. This resulted in an assert failing when more data was required by the block layer, but all the object requests were done: [ 1868.719077] rbd: obj_request read result -108 xferred 0 [ 1868.719077] [ 1868.719518] end_request: I/O error, dev rbd1, sector 0 [ 1868.719739] [ 1868.719739] Assertion failure in rbd_img_obj_callback() at line 1736: [ 1868.719739] [ 1868.719739] rbd_assert(more ^ (which == img_request->obj_request_count)); Without this assert, reads that hit errors would hang forever, since the block layer considered them incomplete. Fixes: http://tracker.ceph.com/issues/5647 CC: [email protected] # v3.10 Signed-off-by: Josh Durgin <[email protected]> Reviewed-by: Alex Elder <[email protected]>
2013-09-04qlcnic: remove a stray semicolonDan Carpenter1-1/+1
Just remove a small semicolon. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Himanshu Madhani <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04qlcnic: Fix sparse warning.Sucheta Chakraborty1-1/+1
This patch fixes warning "warning: symbol 'qlcnic_set_dcb_ops' was not declared. Should it be static?" Signed-off-by: Sucheta Chakraborty <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04caif: add a sanity check to the tty nameDan Carpenter1-1/+3
"tty->name" and "name" are a 64 character buffers. My static checker complains because we add the "cf" on the front so it look like we are copying a 66 character string into a 64 character buffer. Also if the name is larger than IFNAMSIZ (16) it triggers a BUG_ON() inside the call to alloc_netdev(). This is all under CAP_SYS_ADMIN so it's not a security fix, it just adds a little robustness. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04ibmveth: Fix little endian issuesAnton Blanchard2-5/+18
The hypervisor is big endian, so little endian kernel builds need to byteswap. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04net: netx-eth: remove unnecessary castingJingoo Han1-1/+1
Casting from 'void *' is unnecessary, because casting from 'void *' to any pointer type is automatic. Reported-by: Sergei Shtylyov <[email protected]> Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04cnic: Update version to 2.5.18.Michael Chan1-2/+2
Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04cnic: Eliminate local copy of pfid.Michael Chan2-18/+12
Use bp->pfid from bnx2x instead to avoid duplication. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04cnic: Eliminate CNIC_PORT macro and port_mode in local struct.Michael Chan2-9/+6
Use BP_PORT and chip_port_mode directly from bnx2x.h to avoid duplication. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04cnic: Redefine BNX2X_HW_CID using existing bnx2x macrosMichael Chan2-12/+18
to avoid duplication of the same logic. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04cnic: Use CHIP_NUM macros from bnx2x.hMichael Chan2-67/+29
This eliminates duplication and ensures that all bnx2x chips will be supported. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04tunnels: harmonize cleanup done on skb on xmit pathNicolas Dichtel1-2/+4
The goal of this patch is to harmonize cleanup done on a skbuff on xmit path. Before this patch, behaviors were different depending of the tunnel type. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04vxlan: remove net arg from vxlan[6]_xmit_skb()Nicolas Dichtel1-4/+4
This argument is not used, let's remove it. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04iptunnels: remove net arg from iptunnel_xmit()Nicolas Dichtel1-2/+1
This argument is not used, let's remove it. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04bonding: drop read_lock in bond_compute_features[email protected]1-7/+3
bond_compute_features is always called with RTNL held, so we can safely drop the read bond->lock. Signed-off-by: Nikolay Aleksandrov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-09-04bonding: drop read_lock in bond_fix_features[email protected]1-7/+3
We're protected by RTNL so nothing can happen and we can safely drop the read bond->lock. Signed-off-by: Nikolay Aleksandrov <[email protected]> Signed-off-by: David S. Miller <[email protected]>