dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

310462 Commits

Author SHA1 Message Date
Michal Nazarewicz 48a31af744 usb: gadget: mass_storage: make "file" and "ro" read only in some cases
The “file” sysfs entry for LUNs was writable even for non-removable
LUNs and the fsg_store_file() function did not check whether LUN is
removable or not.  This made it possible to change or even close
LUN's backing file.

The same is true for “ro” sysfs entry and LUNs simulating CD-ROM.
For those LUNs, the file should not be writable.

This commit introduces two new device_attribute structures for those
two special cases so that the file/ro sysfs entries are made
non-writable when not desired.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-07-02 10:36:55 +03:00
Kevin Cernekee 31bde1ceaa usb: gadget: Fix g_ether interface link status
A "usb0" interface that has never been connected to a host has an unknown
operstate, and therefore the IFF_RUNNING flag is (incorrectly) asserted
when queried by ifconfig, ifplugd, etc.  This is a result of calling
netif_carrier_off() too early in the probe function; it should be called
after register_netdev().

Similar problems have been fixed in many other drivers, e.g.:

    e826eafa6 (bonding: Call netif_carrier_off after register_netdevice)
    0d672e9f8 (drivers/net: Call netif_carrier_off at the end of the probe)
    6a3c869a6 (cxgb4: fix reported state of interfaces without link)

Fix is to move netif_carrier_off() to the end of the function.

Cc: stable@vger.kernel.org
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-25 14:14:42 +03:00
Lukasz Majewski a188b6897e usb: gadget: hsotg: pullup method implementation for s3c-hsotg UDC driver
This commit adds pullup method implementation for UDC s3c-hsotg driver.
It is needed for e.g. CCG - Configurable Composite Gadget, when user space
configuration change request device disconnection from USB bus (done via
calling usb_gadget_connect/disconnect, which calls UDC's pullup method).

Implementation of pullup method has caused removal of phy_enable and
core_init methods from udc_start to pullup.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-22 13:25:02 +03:00
Michal Nazarewicz d6e16a8957 usb: gadget: mass_storage: fail fsg_store_file() early if colud not open file
Currently, when a new value is stored to the “file” sysfs entry,
fsg_store_file() will release existing backing file and only then attempt to
open a new one.  If that fails, no new backing file is open.

This commit changes the fsg_lun_open() so that it closes existing backing file
only after the new backing file has been successfully opened.  With that
change, fsg_store_file() may use it to perform an atomic open operation with
guarantee that logical unit will either point to the new backing file or still
to the old one.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-22 13:19:37 +03:00
Michal Nazarewicz f87cabf4d5 usb: gadget: storage_common: remove FSG_BUFFHD_STATIC_BUFFER support
Since f_mass_storage stopped using FSG_BUFFHD_STATIC_BUFFER (because it
caused buffers not to be page aligned which did not work well with at
least some UDCs), no code was using it.  Removing not to bloat the code
too much.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-22 13:19:22 +03:00
Steve Bennett 6f47209b27 usb: gadget: acm_ms: need to set max_speed
Failing to set max_speed prevents g_acm_ms working with many drivers which
check for driver->max_speed < USB_SPEED_FULL, including pxa25x_udc

Signed-off-by: Steve Bennett <steveb@workware.net.au>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-22 13:10:10 +03:00
Alexandre Pereira da Silva 508566998b usb: gadget: lpc32xx_udc: move clock init to clock framework
Moves clock initialization to the clock framework.

Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Acked-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-22 13:10:03 +03:00
Fabio Estevam ba789170d2 usb: gadget: fsl_mxc_udc: do not depend on grouped clocks
With the new common clock infrastructure, the following clocks should be
used on i.MX drivers: ipg, per and ahb.

Adapt fsl_mxc_udc to follow this new behaviour to fix the following probe error:

Freescale High-Speed USB SOC Device Controller driver (Apr 20, 2007)
fsl-usb2-udc fsl-usb2-udc: clk_get("usb") failed
fsl-usb2-udc: probe of fsl-usb2-udc failed with error -2

Reported-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-22 13:09:52 +03:00
Yu Xu 3d4eb9dfa3 usb: gadget: mv: Add USB 3.0 device driver for Marvell PXA2128 chip.
It supports Marvell USB 3.0 device controller for PXA2128 chip.

Signed-off-by: Yu Xu <yuxu@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-22 13:08:21 +03:00
Lukasz Majewski 5ad1d31609 usb: hsotg: samsung: smp Provide *_lock functions abstraction layer for SMP SoCs
For SMP processors the spin_lock_irqsave is _only_ able to disable interrupt
on a core on which it is executed.

Therefore there may be a situation when other cores raise s3c-hsotg IRQ.
Then there are several places where critical sections can be overwritten.

To protect the above thread, a spin_lock in the interrupt handler has been
added. Due to coherent memory view (especially L1 cache) the spin lock
variable control access to IRQ handler only for one CPU core. In this way
serialization to access this driver is provided and hence several spin_lock_*
routines could be removed from IRQ handler's related functions.

The complete_request_lock function has been removed since all its calls
are performed from interrupt (spin lock protected) context.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-15 14:38:07 +03:00
Lukasz Majewski 2b19a52cc8 usb: hsotg: samsung: Protect the udc_stop routine with spinlock
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-15 14:37:50 +03:00
Lukasz Majewski 22258f4906 usb: hsotg: samsung: Replace endpoint specific locks with a global lock
The endpoint specific locks are replaced with a global lock.
This is crucial for running s3c-hsotg driver on a SMP SoC.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-15 14:37:24 +03:00
Daniel Mack 99c5150058 usb: gadget: hidg: register OUT INT endpoint for SET_REPORT
The hidg function driver currently handles its SET_REPORT calls via EP0.
This is the implicit behaviour when no OUT interrupt endpoint is
configured and generally works fine.

The problem is that due to EP0's role in the gadget framework, we cannot
hold back packets and control traffic flow to sync it to the char device,
and hence there's a high risk of loosing packets with this
implementation.

This patch adds an OUT interrupt endpoint to the interface and queues a
fix number of request to catch SET_REPORT events. According to the
specs, host drivers should always use the dedicated OUT endpoint when
present.

The char device's read implementation was rewritten to retrieve data
from the list of completed output requests.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-15 14:34:53 +03:00
Michal Nazarewicz a8287a4ed5 usb: gadget: mass_storage: add documentation
This commit adds Documentation/usb/mass-storage.txt file.  It contains
description of how to use the mass storage gadget from user space.  It
elaborates on madule parameters and sysfs interface more then it was
written in the comments in the source code.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-15 14:32:30 +03:00
Michal Nazarewicz 1a12af1a75 usb: gadget: mass_storage: remove unused options
This commit removes thread_name and lun_name_format fields from the
fsg_config structure.  Those fields are not used by any in-tree code
and their usefulness is rather theoretical.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-15 14:32:18 +03:00
Fabio Estevam 2b97fb5a60 usb: imx21-hcd.c: Use clk_prepare_enable/clk_disable_unprepare
Prepare the clock before enabling it.

Cc: <linux-usb@vger.kernel.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-12 13:31:03 +03:00
Fabio Estevam 8194fea0fc usb: imx_udc.c: Use clk_prepare_enable/clk_disable_unprepare
Prepare the clock before enabling it.

Cc: <linux-usb@vger.kernel.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-12 13:30:59 +03:00
Fabio Estevam 1c7f6cd3f9 usb: fsl_mxc_udc.c : Use clk_prepare_enable/clk_disable_unprepare
Prepare the clock before enabling it.

Cc: <linux-usb@vger.kernel.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-12 13:30:48 +03:00
Felipe Balbi b785ea7ce6 usb: gadget: composite: fix ep->maxburst initialization
bMaxBurst field on endpoint companion descriptor
is supposed to contain the number of burst minus
1. When passing that to controller drivers, we
should be passing the real number instead (by
incrementing 1).

While doing that, also fix the assumption on
dwc3 that value comes decremented by one.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-12 13:30:25 +03:00
Bhupesh Sharma fbcaba0e3d usb: gadget: uvc: Add super-speed support to UVC webcam gadget
This patch adds super-speed support to UVC webcam gadget.

Also in this patch:
	- We add the configurability to pass bInterval, bMaxBurst, mult
	  factors for video streaming endpoint (ISOC IN) through module
	  parameters.

	- We use config_ep_by_speed helper routine to configure video
	  streaming endpoint.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:12:36 +03:00
Bhupesh Sharma 5797663674 usb: gadget: uvc: Use macro for interrupt endpoint status size instead of using a MAGIC number
This patch adds a MACRO for the UVC video control status (interrupt) endpoint and
removes the magic number which was being used earlier.

Some UDCs have issues supporting an interrupt IN endpoint having a max packet
size less than a particular value (say 32). It is easier in that case to simply
change the MACRO value instead of changing the max packet size value at a
number of locations.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:12:31 +03:00
Bhupesh Sharma 3de6e63f78 usb: gadget: uvc: Fix string descriptor STALL issue when multiple uvc functions are added to a configuration
This patch solved the string descriptor STALL issue when we add multiple UVC
functions in a single configuration using a 'webcam.c' like composite driver.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:12:25 +03:00
Joe Perches 0a00790ff4 usb: gadget: pch_udc: Fix likely misuse of | for &
Using | with a constant is always true.
Likely this should have be &.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:12:06 +03:00
Koen Beel 560f118799 usb: gadget: ffs: add HID descriptor support.
When writing the descriptors to the ep0 file of functionfs, the HID descriptors where not recognized which caused the initialization from user space to fail.

Signed-off-by: Koen Beel <koen.beel@barco.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:11:59 +03:00
Kuninori Morimoto d3c568c302 usb: renesas_usbhs: add DMAEngine ID specification note
renesas_usbhs DMAEngine uses D0FIFO/D1FIFO,
but the data transfer direction should be fixed for keeping consistency.
This patch explain about it on renesas_usbhs.h

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:11:42 +03:00
Michal Nazarewicz fa84c57516 usb: gadget: f_mass_storage: change default value of the removable parameter
This commit changes the default value of the removable module parameter
from “y” to “n”.  This comes with line with file_storag's default and
seems to be a better default.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:11:35 +03:00
Sachin Kamat 338edabcd8 usb: s3c-hsotg: Use devm_* functions in s3c-hsotg.c file
devm_* functions are used to replace kzalloc, request_mem_region, ioremap
and request_irq functions in probe call. With the usage of devm_* functions
explicit freeing and unmapping is not required.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-04 18:07:45 +03:00
Felipe Balbi dd8e93814a usb: gadget: omap_udc: use generic map/unmap routines
This patch makes use of the generic map/unmap
routines on the omap_udc driver. Removes
some useless and duplicated code.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:11:35 +03:00
Felipe Balbi 23673d7d26 usb: gadget: omap_udc: kfree(NULL) is safe
we don't need to check for _req because
kfree(NULL) is safe. Also, if someone
actually passes a NULL pointer to be freed
by usb_ep_free_request(), he deserves any
issue he faces.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:11:34 +03:00
Felipe Balbi 70617db7ad usb: gadget: omap_udc: remove possiblity of NULL pointer de-reference
when allocating a request, it's better programming
practice to make sure we return NULL if allocation
failed.

This will ensure that, if struct usb_request isn't
the first member on our structure, we don't cheat
the gadget driver into thinking allocating worked
because pointer isn't 0.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:11:33 +03:00
Felipe Balbi dc1737cdd7 usb: gadget: omap_udc: let it work as a module
this also helps removing a few lines of boilerplate
code.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:11:32 +03:00
Felipe Balbi 5b6d84b789 usb: gadget: omap_udc: remove useless print
that print isn't needed at all. Remove it
and move the use_dma reinitialization to
probe() function.

Note that ideally we would drop all
cpu_is_* and machine_is_* checks from
this driver instead. Later patches will
come to get rid of those.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:11:30 +03:00
Felipe Balbi 80dd1358d3 usb: gadget: omap_udc: make checkpatch.pl happy
This patch is just a cleanup patch to make
checkpatch.pl a little happier with the
omap_udc.c driver.

No functional changes.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:11:29 +03:00
Tony Lindgren ae3725716e usb: gadget: omap_udc: Remove omap2 support
There are no active users of this code for omap2 as
the boards in use have either TUSB or MUSB controller.

While at it, also fix warnings related to uninitialized
dc_clk and hhc_clk.

Cc: linux-usb@vger.kernel.org
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-06-03 23:11:27 +03:00
Linus Torvalds f8f5701bda Linux 3.5-rc1 2012-06-02 18:29:26 -07:00
Linus Torvalds 912afc3616 Improve multipath's retrying mechanism in some defined circumstances
and provide a simple reserve/release mechanism for userspace tools to
 access thin provisioning metadata while the pool is in use.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPyqIdAAoJEK2W1qbAHj1nSPoQAJvAb/6UHufTWC/lufbEyo7t
 ft6uwZZ4S/VV1Gdx8V5YXo3rxkVIZj/CV0hiJIDctmDMKGPMlzup39kCgjD/rOUF
 mzcFAE8sEr3QEavkfjSWw2RHIIlhnJpvqVnb8nu3p/mSgAB4qYGgaDjBpi+W60PV
 aqQSSWgwH1uNhfGDBIxQoJ8OIjjYvKPIf2Ir2FAXam/dNi9chWO9nzFdj3q2LccP
 nZir094BDsFac1BF0FYW3J+rgT1FfPO7RRGAQct6WNJ197IZlYWYjKH3XehxnUHE
 wgiJmjfUO8vrho1hhWmWDOesKJPPWFN67EQnl5FqAu9itP7c7k8bd7Ay4jWgtZQU
 QIx10uiAgAuFUmTdWGK1fLlE8HGKUFINYLp63N5n5NZ4TDJrgo8e7CIID3rvYf/O
 EtmL7HzAyztL9Uc6oaXzCK6TgMUtd/ht8OJCDFhjitzQTNjbrfAGz6m+RHnEZyyj
 dtOVK7WBlmuKEANl2vDFGuVVF0+MwJLTlvPx1/b/ejFvnHI/R5Wuk9EH7t/DO4LB
 nCmiwzB6uWMzU3y3vnZG72AYSF5NTKSvnAl5B8U/0rI1MZU+6PehjeviJNx6ddJN
 2YheHBLU4vbBV/LF4XIpaHK2aiHN1ltaKCp8INo3EKhCwpR4ZdlVvnAGU9ocf9+c
 qoaFTOP7zGD9zgPeGjoG
 =wCpY
 -----END PGP SIGNATURE-----

Merge tag 'dm-3.5-changes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm

Pull device-mapper updates from Alasdair G Kergon:
 "Improve multipath's retrying mechanism in some defined circumstances
  and provide a simple reserve/release mechanism for userspace tools to
  access thin provisioning metadata while the pool is in use."

* tag 'dm-3.5-changes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm:
  dm thin: provide userspace access to pool metadata
  dm thin: use slab mempools
  dm mpath: allow ioctls to trigger pg init
  dm mpath: delay retry of bypassed pg
  dm mpath: reduce size of struct multipath
2012-06-02 17:39:40 -07:00
Joe Thornber cc8394d86f dm thin: provide userspace access to pool metadata
This patch implements two new messages that can be sent to the thin
pool target allowing it to take a snapshot of the _metadata_.  This,
read-only snapshot can be accessed by userland, concurrently with the
live target.

Only one metadata snapshot can be held at a time.  The pool's status
line will give the block location for the current msnap.

Since version 0.1.5 of the userland thin provisioning tools, the
thin_dump program displays the msnap as follows:

    thin_dump -m <msnap root> <metadata dev>

Available here: https://github.com/jthornber/thin-provisioning-tools

Now that userland can access the metadata we can do various things
that have traditionally been kernel side tasks:

     i) Incremental backups.

     By using metadata snapshots we can work out what blocks have
     changed over time.  Combined with data snapshots we can ensure
     the data doesn't change while we back it up.

     A short proof of concept script can be found here:

     https://github.com/jthornber/thinp-test-suite/blob/master/incremental_backup_example.rb

     ii) Migration of thin devices from one pool to another.

     iii) Merging snapshots back into an external origin.

     iv) Asyncronous replication.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2012-06-03 00:30:01 +01:00
Mike Snitzer a24c25696b dm thin: use slab mempools
Use dedicated caches prefixed with a "dm_" name rather than relying on
kmalloc mempools backed by generic slab caches so the memory usage of
thin provisioning (and any leaks) can be accounted for independently.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2012-06-03 00:30:00 +01:00
Mikulas Patocka 35991652ba dm mpath: allow ioctls to trigger pg init
After the failure of a group of paths, any alternative paths that
need initialising do not become available until further I/O is sent to
the device.  Until this has happened, ioctls return -EAGAIN.

With this patch, new paths are made available in response to an ioctl
too.  The processing of the ioctl gets delayed until this has happened.

Instead of returning an error, we submit a work item to kmultipathd
(that will potentially activate the new path) and retry in ten
milliseconds.

Note that the patch doesn't retry an ioctl if the ioctl itself fails due
to a path failure.  Such retries should be handled intelligently by the
code that generated the ioctl in the first place, noting that some SCSI
commands should not be retried because they are not idempotent (XOR write
commands).  For commands that could be retried, there is a danger that
if the device rejected the SCSI command, the path could be errorneously
marked as failed, and the request would be retried on another path which
might fail too.  It can be determined if the failure happens on the
device or on the SCSI controller, but there is no guarantee that all
SCSI drivers set these flags correctly.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2012-06-03 00:29:58 +01:00
Mike Christie f220fd4efb dm mpath: delay retry of bypassed pg
If I/O needs retrying and only bypassed priority groups are available,
set the pg_init_delay_retry flag to wait before retrying.

If, for example, the reason for the bypass is that the controller is
getting reset or there is a firmware upgrade happening, retrying right
away would cause a flood of log messages and retries for what could be a
few seconds or even several minutes.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2012-06-03 00:29:45 +01:00
Mike Snitzer 1fbdd2b3a3 dm mpath: reduce size of struct multipath
Move multipath structure's 'lock' and 'queue_size' members to eliminate
two 4-byte holes.  Also use a bit within a single unsigned int for each
existing flag (saves 8-bytes).  This allows future flags to be added
without each consuming an unsigned int.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2012-06-03 00:29:43 +01:00
Linus Torvalds 4fc3acf291 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking updates from David Miller:

 1) Make syn floods consume significantly less resources by

    a) Not pre-COW'ing routing metrics for SYN/ACKs
    b) Mirroring the device queue mapping of the SYN for the SYN/ACK
       reply.

    Both from Eric Dumazet.

 2) Fix calculation errors in Byte Queue Limiting, from Hiroaki SHIMODA.

 3) Validate the length requested when building a paged SKB for a
    socket, so we don't overrun the page vector accidently.  From Jason
    Wang.

 4) When netlabel is disabled, we abort all IP option processing when we
    see a CIPSO option.  This isn't the right thing to do, we should
    simply skip over it and continue processing the remaining options
    (if any).  Fix from Paul Moore.

 5) SRIOV fixes for the mellanox driver from Jack orgenstein and Marcel
    Apfelbaum.

 6) 8139cp enables the receiver before the ring address is properly
    programmed, which potentially lets the device crap over random
    memory.  Fix from Jason Wang.

 7) e1000/e1000e fixes for i217 RST handling, and an improper buffer
    address reference in jumbo RX frame processing from Bruce Allan and
    Sebastian Andrzej Siewior, respectively.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  fec_mpc52xx: fix timestamp filtering
  mcs7830: Implement link state detection
  e1000e: fix Rapid Start Technology support for i217
  e1000: look into the page instead of skb->data for e1000_tbi_adjust_stats()
  r8169: call netif_napi_del at errpaths and at driver unload
  tcp: reflect SYN queue_mapping into SYNACK packets
  tcp: do not create inetpeer on SYNACK message
  8139cp/8139too: terminate the eeprom access with the right opmode
  8139cp: set ring address before enabling receiver
  cipso: handle CIPSO options correctly when NetLabel is disabled
  net: sock: validate data_len before allocating skb in sock_alloc_send_pskb()
  bql: Avoid possible inconsistent calculation.
  bql: Avoid unneeded limit decrement.
  bql: Fix POSDIFF() to integer overflow aware.
  net/mlx4_core: Fix obscure mlx4_cmd_box parameter in QUERY_DEV_CAP
  net/mlx4_core: Check port out-of-range before using in mlx4_slave_cap
  net/mlx4_core: Fixes for VF / Guest startup flow
  net/mlx4_en: Fix improper use of "port" parameter in mlx4_en_event
  net/mlx4_core: Fix number of EQs used in ICM initialisation
  net/mlx4_core: Fix the slave_id out-of-range test in mlx4_eq_int
2012-06-02 16:22:51 -07:00
Linus Torvalds 63004afa71 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull straggler x86 fixes from Peter Anvin:
 "Three groups of patches:

  - EFI boot stub documentation and the ability to print error messages;
  - Removal for PTRACE_ARCH_PRCTL for x32 (obsolete interface which
    should never have been ported, and the port is broken and
    potentially dangerous.)
  - ftrace stack corruption fixes.  I'm not super-happy about the
    technical implementation, but it is probably the least invasive in
    the short term.  In the future I would like a single method for
    nesting the debug stack, however."

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, x32, ptrace: Remove PTRACE_ARCH_PRCTL for x32
  x86, efi: Add EFI boot stub documentation
  x86, efi; Add EFI boot stub console support
  x86, efi: Only close open files in error path
  ftrace/x86: Do not change stacks in DEBUG when calling lockdep
  x86: Allow nesting of the debug stack IDT setting
  x86: Reset the debug_stack update counter
  ftrace: Use breakpoint method to update ftrace caller
  ftrace: Synchronize variable setting with breakpoints
2012-06-02 16:17:03 -07:00
Linus Torvalds f309532bf3 tty: Revert the tty locking series, it needs more work
This reverts the tty layer change to use per-tty locking, because it's
not correct yet, and fixing it will require some more deep surgery.

The main revert is d29f3ef39b ("tty_lock: Localise the lock"), but
there are several smaller commits that built upon it, they also get
reverted here. The list of reverted commits is:

  fde86d3108 - tty: add lockdep annotations
  8f6576ad47 - tty: fix ldisc lock inversion trace
  d3ca8b64b9 - pty: Fix lock inversion
  b1d679afd7 - tty: drop the pty lock during hangup
  abcefe5fc3 - tty/amiserial: Add missing argument for tty_unlock()
  fd11b42e35 - cris: fix missing tty arg in wait_event_interruptible_tty call
  d29f3ef39b - tty_lock: Localise the lock

The revert had a trivial conflict in the 68360serial.c staging driver
that got removed in the meantime.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-06-02 15:21:43 -07:00
Stephan Gatzka 9ca3cc6f30 fec_mpc52xx: fix timestamp filtering
skb_defer_rx_timestamp was called with a freshly allocated skb but must
be called with rskb instead.

Signed-off-by: Stephan Gatzka <stephan@gatzka.org>
Cc: stable <stable@vger.kernel.org>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-02 17:09:08 -04:00
Ondrej Zary b1ff4f96fd mcs7830: Implement link state detection
Add .status callback that detects link state changes.
Tested with MCS7832CV-AA chip (9710:7830, identified as rev.C by the driver).
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=28532

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-02 17:09:08 -04:00
Linus Torvalds 233e562eac Merge 'for-linus' branches from git://git.kernel.org/pub/scm/linux/kernel/git/viro/{vfs,signal}
Pull vfs fix and a fix from the signal changes for frv from Al Viro.

The __kernel_nlink_t for powerpc got scrogged because 64-bit powerpc
actually depended on the default "unsigned long", while 32-bit powerpc
had an explicit override to "unsigned short".  Al didn't notice, and
made both of them be the unsigned short.

The frv signal fix is fallout from simplifying the do_notify_resume()
code, and leaving an extra parenthesis.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  powerpc: Fix size of st_nlink on 64bit

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal:
  frv: Remove bogus closing parenthesis
2012-06-02 09:03:54 -07:00
Anton Blanchard 0fd7bee1e9 powerpc: Fix size of st_nlink on 64bit
commit e57f93cc53 (powerpc: get rid of nlink_t uses, switch to
explicitly-sized type) changed the size of st_nlink on ppc64 from
a long to a short, resulting in boot failures.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-06-02 10:44:11 -04:00
Geert Uytterhoeven a393624969 frv: Remove bogus closing parenthesis
Introduced by commit 6fd84c0831
("TIF_RESTORE_SIGMASK can be set only when TIF_SIGPENDING is set")

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-06-02 10:38:19 -04:00
Bruce Allan 6d7407bfba e1000e: fix Rapid Start Technology support for i217
The definition of I217_PROXY_CTRL must use the BM_PHY_REG() macro instead
of the PHY_REG() macro for PHY page 800 register 70 since it is for a PHY
register greater than the maximum allowed by the latter macro, and fix a
typo setting the I217_MEMPWR register in e1000_suspend_workarounds_ich8lan.

Also for clarity, rename a few defines as bit definitions instead of masks.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-06-02 00:12:33 -07:00