3.6.11.2-stable review (update)
Subsystems (78)
Steven Rostedt
maintainercover 3.6.11.2-stable review (update)
As recommend by Eric W. Biederman, I removed:
ipc: Restrict mounting the mqueue filesystem
[a636b702ed1805e988ad3d8ff8b52c060f8b341c]
vfs: Add a mount flag to lock read only bind mounts
[90563b198e4c6674c63672fae1923da467215f45]As recommend by Bing Zhao, I removed:
mwifiex: fix race when queuing commands
[00d7ea11ff0783e24fe70778f3141270b561aaa1]
mwifiex: skip pending commands after function shutdown
As recommended by Ben Hutchings, I added:
Ben Hutchings (8):
sfc: Disable soft interrupt handling during efx_device_detach_sync()
sfc: Really disable flow control while flushing
sfc: Convert firmware subtypes to native byte order in efx_mcdi_get_board_cfg()
sfc: Add parentheses around use of bitfield macro arguments
sfc: Fix MCDI structure field lookup
sfc: Avoid generating over-length MC_CMD_FLUSH_RX_QUEUES request
sfc: Correctly initialise reset_method in siena_test_chip()
sfc: Fix timekeeping in efx_mcdi_poll()
Daniel Pieczko (1):
sfc: Work-around flush timeout when flushes have completed
----
drivers/net/ethernet/sfc/bitfield.h | 22 ++++++------ drivers/net/ethernet/sfc/efx.h | 4 +-- drivers/net/ethernet/sfc/falcon.c | 2 ++ drivers/net/ethernet/sfc/mcdi.c | 33 +++++++++++------- drivers/net/ethernet/sfc/mcdi.h | 6 ++-- drivers/net/ethernet/sfc/net_driver.h | 3 ++ drivers/net/ethernet/sfc/nic.c | 59 ++++++++++++++++++++++++++++---- drivers/net/ethernet/sfc/nic.h | 2 ++ drivers/net/ethernet/sfc/siena.c | 17 +++++++-- drivers/net/ethernet/sfc/siena_sriov.c | 13 ++++--- 10 files changed, 121 insertions(+), 40 deletions(-)
Steven Rostedt
maintainerPATCH 1/9 sfc: Disable soft interrupt handling during efx_device_detach_sync()
From: Ben Hutchings <[email protected]>
[ Upstream commit 35205b211c8d17a8a0b5e8926cb7c73e9a7ef1ad ]
efx_device_detach_sync() locks all TX queues before marking the device detached and thus disabling further TX scheduling. But it can still be interrupted by TX completions which then result in TX scheduling in soft interrupt context. This will deadlock when it tries to acquire a TX queue lock that efx_device_detach_sync() already acquired.
To avoid deadlock, we must use netif_tx_{,un}lock_bh().
--- drivers/net/ethernet/sfc/efx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/sfc/efx.h +2 -2
@@ -170,9 +170,9 @@ static inline void efx_device_detach_sync(struct efx_nic *efx)* TX scheduler is stopped when we're done and before * netif_device_present() becomes false. */ -netif_tx_lock (dev); +netif_tx_lock_bh (dev);netif_device_detach (dev); - netif_tx_unlock(dev); + netif_tx_unlock_bh(dev); }#endif /* EFX_EFX_H */
Signature · 1 line
1.7.10.4
Steven Rostedt
maintainerPATCH 2/9 sfc: Really disable flow control while flushing
In reply to Steven RostedtFrom: Ben Hutchings <[email protected]>
[ Upstream commit d5e8cc6c946e0857826dcfbb3585068858445bfe ]
Receiving pause frames can block TX queue flushes. Earlier changes work around this by reconfiguring the MAC during flushes for VFs, but during flushes for the PF we would only change the fc_disable counter. Unless the MAC is reconfigured for some other reason during the flush (which I would not expect to happen) this had no effect at all.
--- drivers/net/ethernet/sfc/falcon.c | 2 ++ drivers/net/ethernet/sfc/net_driver.h | 2 ++ drivers/net/ethernet/sfc/nic.c | 3 +-- drivers/net/ethernet/sfc/nic.h | 2 ++ drivers/net/ethernet/sfc/siena.c | 15 ++++++++++++++- drivers/net/ethernet/sfc/siena_sriov.c | 6 ++---- 6 files changed, 23 insertions(+), 7 deletions(-)
drivers/net/ethernet/sfc/falcon.c +2 -0
@@ -1792,6 +1792,7 @@ const struct efx_nic_type falcon_a1_nic_type = { .remove_port = falcon_remove_port, .handle_global_event = falcon_handle_global_event, .prepare_flush = falcon_prepare_flush, + .finish_flush = efx_port_dummy_op_void, .update_stats = falcon_update_nic_stats, .start_stats = falcon_start_nic_stats, .stop_stats = falcon_stop_nic_stats,
@@ -1834,6 +1835,7 @@ const struct efx_nic_type falcon_b0_nic_type = { .remove_port = falcon_remove_port, .handle_global_event = falcon_handle_global_event, .prepare_flush = falcon_prepare_flush, + .finish_flush = efx_port_dummy_op_void, .update_stats = falcon_update_nic_stats, .start_stats = falcon_start_nic_stats, .stop_stats = falcon_stop_nic_stats,
drivers/net/ethernet/sfc/net_driver.h +2 -0
@@ -893,6 +893,7 @@ static inline unsigned int efx_port_num(struct efx_nic *efx)* @remove_port: Free resources allocated by probe_port() * @handle_global_event: Handle a "global" event (may be %NULL) * @prepare_flush: Prepare the hardware for flushing the DMA queues +* @finish_flush: Clean up after flushing the DMA queues * @update_stats: Update statistics not provided by event handling * @start_stats: Start the regular fetching of statistics * @stop_stats: Stop the regular fetching of statistics
@@ -940,6 +941,7 @@ struct efx_nic_type {void (*remove_port)(struct efx_nic *efx);bool (*handle_global_event)(struct efx_channel *channel,efx_qword_t *);void (*prepare_flush)(struct efx_nic *efx); +void (*finish_flush)(struct efx_nic *efx);void (*update_stats)(struct efx_nic *efx);void (*start_stats)(struct efx_nic *efx);void (*stop_stats)(struct efx_nic *efx);
drivers/net/ethernet/sfc/nic.c +1 -2
@@ -679,7 +679,6 @@ int efx_nic_flush_queues(struct efx_nic *efx)struct efx_tx_queue *tx_queue;int rc =0 ; - efx->fc_disable++; efx->type->prepare_flush (efx);efx_for_each_channel (channel, efx) {
@@ -741,7 +740,7 @@ int efx_nic_flush_queues(struct efx_nic *efx)atomic_set (&efx->rxq_flush_outstanding,0 ); } - efx->fc_disable--; + efx->type->finish_flush (efx);return rc; }
drivers/net/ethernet/sfc/nic.h +2 -0
@@ -334,6 +334,8 @@ static inline int efx_nic_irq_test_irq_cpu(struct efx_nic *efx)/* Global Resources */ extern int efx_nic_flush_queues (struct efx_nic *efx); +extern void siena_prepare_flush (struct efx_nic *efx); +extern void siena_finish_flush (struct efx_nic *efx);extern void falcon_start_nic_stats (struct efx_nic *efx);extern void falcon_stop_nic_stats (struct efx_nic *efx);extern void falcon_setup_xaui (struct efx_nic *efx);
drivers/net/ethernet/sfc/siena.c +14 -1
@@ -127,6 +127,18 @@ static void siena_remove_port(struct efx_nic *efx)efx_nic_free_buffer (efx, &efx->stats_buffer); } +void siena_prepare_flush (struct efx_nic *efx) +{ +if (efx->fc_disable++ ==0 ) +efx_mcdi_set_mac (efx); +} + +void siena_finish_flush (struct efx_nic *efx) +{ +if (--efx->fc_disable ==0 ) +efx_mcdi_set_mac (efx); +} +static const struct efx_nic_register_test siena_register_tests[] = { {FR_AZ_ADR_REGION ,EFX_OWORD32 (0x0003FFFF ,0x0003FFFF ,0x0003FFFF ,0x0003FFFF ) },
@@ -658,7 +670,8 @@ const struct efx_nic_type siena_a0_nic_type = { .reset = siena_reset_hw, .probe_port = siena_probe_port, .remove_port = siena_remove_port, - .prepare_flush = efx_port_dummy_op_void, + .prepare_flush = siena_prepare_flush, + .finish_flush = siena_finish_flush, .update_stats = siena_update_nic_stats, .start_stats = siena_start_nic_stats, .stop_stats = siena_stop_nic_stats,
drivers/net/ethernet/sfc/siena_sriov.c +2 -4
@@ -688,8 +688,7 @@ static int efx_vfdi_fini_all_queues(struct efx_vf *vf)return VFDI_RC_ENOMEM ;rtnl_lock (); -if (efx->fc_disable++ ==0 ) -efx_mcdi_set_mac (efx); +siena_prepare_flush (efx);rtnl_unlock ();/* Flush all the initialized queues */
@@ -726,8 +725,7 @@ static int efx_vfdi_fini_all_queues(struct efx_vf *vf) }rtnl_lock (); -if (--efx->fc_disable ==0 ) -efx_mcdi_set_mac (efx); +siena_finish_flush (efx);rtnl_unlock ();/* Irrespective of success/failure, fini the queues */
Signature · 1 line
1.7.10.4
Steven Rostedt
maintainerPATCH 3/9 sfc: Convert firmware subtypes to native byte order in efx_mcdi_get_board_cfg()
In reply to Steven RostedtFrom: Ben Hutchings <[email protected]>
[ Upstream commit bfeed902946a31692e7a24ed355b6d13ac37d014 ]
On big-endian systems the MTD partition names currently have mangled subtype numbers and are not recognised by the firmware update tool (sfupdate).
--- drivers/net/ethernet/sfc/mcdi.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
drivers/net/ethernet/sfc/mcdi.c +11 -7
@@ -641,9 +641,8 @@ int efx_mcdi_get_board_cfg(struct efx_nic *efx, u8 *mac_address, u16 *fw_subtype_list, u32 *capabilities) {uint8_t outbuf[MC_CMD_GET_BOARD_CFG_OUT_LENMIN ]; -size_t outlen; +size_t outlen, offset, i;int port_num =efx_port_num (efx); -int offset;int rc;BUILD_BUG_ON (MC_CMD_GET_BOARD_CFG_IN_LEN !=0 );
@@ -663,11 +662,16 @@ int efx_mcdi_get_board_cfg(struct efx_nic *efx, u8 *mac_address, : MC_CMD_GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT0_OFST;if (mac_address)memcpy (mac_address, outbuf + offset,ETH_ALEN ); -if (fw_subtype_list) -memcpy (fw_subtype_list, - outbuf +MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST , -MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MINNUM * -sizeof (fw_subtype_list[0 ])); +if (fw_subtype_list) { + offset =MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST ; +for (i =0 ; + i <MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MINNUM ; + i++) { + fw_subtype_list[i] = +le16_to_cpup ((__le16 *)(outbuf + offset)); + offset +=2 ; + } + }if (capabilities) {if (port_num) *capabilities = MCDI_DWORD(outbuf,
Signature · 1 line
1.7.10.4
Steven Rostedt
maintainerPATCH 4/9 sfc: Add parentheses around use of bitfield macro arguments
In reply to Steven RostedtFrom: Ben Hutchings <[email protected]>
[ Upstream commit 9724a8504c875145f5a513bb8eca50671cee23b4 ]
--- drivers/net/ethernet/sfc/bitfield.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/net/ethernet/sfc/bitfield.h +11 -11
@@ -120,10 +120,10 @@ typedef union efx_oword {* [0,high-low), with garbage in bits [high-low+1,...). */ #define EFX_EXTRACT_NATIVE (native_element, min, max, low, high) \ - (((low > max) || (high < min)) ? 0 : \ - ((low > min) ? \ - ((native_element) >> (low - min)) : \ - ((native_element) << (min - low)))) + ((low) > (max) || (high) < (min) ? 0 : \ + (low) > (min) ? \ + (native_element) >> ((low) - (min)) : \ + (native_element) << ((min) - (low)))/* * Extract bit field portion [low,high) from the 64-bit little-endian
@@ -142,27 +142,27 @@ typedef union efx_oword {#define EFX_EXTRACT_OWORD64 (oword, low, high) \ ((EFX_EXTRACT64((oword).u64[0], 0, 63, low, high) | \ EFX_EXTRACT64((oword).u64[1], 64, 127, low, high)) & \ - EFX_MASK64(high + 1 - low)) + EFX_MASK64((high) + 1 - (low)))#define EFX_EXTRACT_QWORD64 (qword, low, high) \ (EFX_EXTRACT64((qword).u64[0], 0, 63, low, high) & \ - EFX_MASK64(high + 1 - low)) + EFX_MASK64((high) + 1 - (low)))#define EFX_EXTRACT_OWORD32 (oword, low, high) \ ((EFX_EXTRACT32((oword).u32[0], 0, 31, low, high) | \ EFX_EXTRACT32((oword).u32[1], 32, 63, low, high) | \ EFX_EXTRACT32((oword).u32[2], 64, 95, low, high) | \ EFX_EXTRACT32((oword).u32[3], 96, 127, low, high)) & \ - EFX_MASK32(high + 1 - low)) + EFX_MASK32((high) + 1 - (low)))#define EFX_EXTRACT_QWORD32 (qword, low, high) \ ((EFX_EXTRACT32((qword).u32[0], 0, 31, low, high) | \ EFX_EXTRACT32((qword).u32[1], 32, 63, low, high)) & \ - EFX_MASK32(high + 1 - low)) + EFX_MASK32((high) + 1 - (low)))#define EFX_EXTRACT_DWORD (dword, low, high) \ (EFX_EXTRACT32((dword).u32[0], 0, 31, low, high) & \ - EFX_MASK32(high + 1 - low)) + EFX_MASK32((high) + 1 - (low)))#define EFX_OWORD_FIELD64 (oword, field) \ EFX_EXTRACT_OWORD64(oword, EFX_LOW_BIT(field), \
@@ -442,10 +442,10 @@ typedef union efx_oword { cpu_to_le32(EFX_INSERT_NATIVE(min, max, low, high, value))#define EFX_INPLACE_MASK64 (min, max, low, high) \ - EFX_INSERT64(min, max, low, high, EFX_MASK64(high + 1 - low)) + EFX_INSERT64(min, max, low, high, EFX_MASK64((high) + 1 - (low)))#define EFX_INPLACE_MASK32 (min, max, low, high) \ - EFX_INSERT32(min, max, low, high, EFX_MASK32(high + 1 - low)) + EFX_INSERT32(min, max, low, high, EFX_MASK32((high) + 1 - (low)))#define EFX_SET_OWORD64 (oword, low, high, value) do { \ (oword).u64[0] = (((oword).u64[0] \
Signature · 1 line
1.7.10.4
Steven Rostedt
maintainerPATCH 5/9 sfc: Fix MCDI structure field lookup
In reply to Steven RostedtFrom: Ben Hutchings <[email protected]>
[ Upstream commit 0a6e5008a9df678b48f8d4e57601aa4270df6c14 ]
The least significant bit number (LBN) of a field within an MCDI structure is counted from the start of the structure, not the containing dword. In MCDI_ARRAY_FIELD() we need to mask it rather than using the usual EFX_DWORD_FIELD() macro.
--- drivers/net/ethernet/sfc/mcdi.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/ethernet/sfc/mcdi.h +4 -2
@@ -107,11 +107,13 @@ extern void efx_mcdi_sensor_event(struct efx_nic *efx, efx_qword_t *ev);#define MCDI_EVENT_FIELD (_ev, _field) \ EFX_QWORD_FIELD(_ev, MCDI_EVENT_ ## _field)#define MCDI_ARRAY_FIELD (_buf, _field1, _type, _index, _field2) \ - EFX_DWORD_FIELD( \ + EFX_EXTRACT_DWORD( \ *((efx_dword_t *) \ (MCDI_ARRAY_PTR(_buf, _field1, _type, _index) + \ (MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _OFST & ~3))), \ - MC_CMD_ ## _type ## _TYPEDEF_ ## _field2) + MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _LBN & 0x1f, \ + (MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _LBN & 0x1f) + \ + MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _WIDTH - 1)extern void efx_mcdi_print_fwver (struct efx_nic *efx,char *buf,size_t len); extern int efx_mcdi_drv_attach(struct efx_nic *efx, bool driver_operating,
Signature · 1 line
1.7.10.4
Steven Rostedt
maintainerPATCH 6/9 sfc: Avoid generating over-length MC_CMD_FLUSH_RX_QUEUES request
In reply to Steven RostedtFrom: Ben Hutchings <[email protected]>
[ Upstream commit 450783747f42dfa3883920acfad4acdd93ce69af ]
MCDI supports requests up to 252 bytes long, which is only enough to pass 63 RX queue IDs to MC_CMD_FLUSH_RX_QUEUES. However a VF may have up to 64 RX queues, and if we try to flush them all we will generate an over-length request and BUG() in efx_mcdi_copyin(). Currently all VF drivers limit themselves to 32 RX queues, so reducing the limit to 63 does no harm.
Also add a BUILD_BUG_ON in efx_mcdi_flush_rxqs() so we remember to deal with the same problem there if EFX_MAX_CHANNELS is increased.
--- drivers/net/ethernet/sfc/mcdi.c | 3 +++ drivers/net/ethernet/sfc/siena_sriov.c | 7 +++++++ 2 files changed, 10 insertions(+)
drivers/net/ethernet/sfc/mcdi.c +3 -0
@@ -1173,6 +1173,9 @@ int efx_mcdi_flush_rxqs(struct efx_nic *efx)__le32 *qid;int rc, count; +BUILD_BUG_ON (EFX_MAX_CHANNELS > +MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_MAXNUM ); + qid =kmalloc (EFX_MAX_CHANNELS *sizeof (*qid),GFP_KERNEL );if (qid ==NULL )return -ENOMEM ;
drivers/net/ethernet/sfc/siena_sriov.c +7 -0
@@ -21,6 +21,9 @@/* Number of longs required to track all the VIs in a VF */ #define VI_MASK_LENGTH BITS_TO_LONGS(1 << EFX_VI_SCALE_MAX) +/* Maximum number of RX queues supported */ +#define VF_MAX_RX_QUEUES 63 +/** * enum efx_vf_tx_filter_mode - TX MAC filtering behaviour * @VF_TX_FILTER_OFF: Disabled
@@ -578,6 +581,7 @@ static int efx_vfdi_init_rxq(struct efx_vf *vf)efx_oword_t reg;if (bad_vf_index (efx, vf_evq) ||bad_vf_index (efx, vf_rxq) || + vf_rxq >=VF_MAX_RX_QUEUES ||bad_buf_count (buf_count,EFX_MAX_DMAQ_SIZE )) {if (net_ratelimit ()) netif_err(efx, hw, efx->net_dev,
@@ -683,6 +687,9 @@ static int efx_vfdi_fini_all_queues(struct efx_vf *vf)__le32 *rxqs;int rc; +BUILD_BUG_ON (VF_MAX_RX_QUEUES > +MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_MAXNUM ); + rxqs =kmalloc (count *sizeof (*rxqs),GFP_KERNEL );if (rxqs ==NULL )return VFDI_RC_ENOMEM ;
Signature · 1 line
1.7.10.4
Steven Rostedt
maintainerPATCH 7/9 sfc: Work-around flush timeout when flushes have completed
In reply to Steven RostedtFrom: Daniel Pieczko <[email protected]>
[ Upstream commit 525d9e824018cd7cc8d8d44832ddcd363abfe6e1 ]
We sometimes hit a "failed to flush" timeout on some TX queues, but the flushes have completed and the flush completion events seem to go missing. In this case, we can check the TX_DESC_PTR_TBL register and drain the queues if the flushes had finished.
--- drivers/net/ethernet/sfc/net_driver.h | 1 + drivers/net/ethernet/sfc/nic.c | 56 ++++++++++++++++++++++++++++++--- 2 files changed, 53 insertions(+), 4 deletions(-)
drivers/net/ethernet/sfc/net_driver.h +1 -0
@@ -196,6 +196,7 @@ struct efx_tx_queue {/* Members shared between paths and sometimes updated */ unsigned int empty_read_count____cacheline_aligned_in_smp ;#define EFX_EMPTY_COUNT_VALID 0x80000000 +atomic_t flush_outstanding; };/**
drivers/net/ethernet/sfc/nic.c +52 -4
86 lines not on this page · raw message
Signature · 1 line
1.7.10.4
Steven Rostedt
maintainerPATCH 8/9 sfc: Correctly initialise reset_method in siena_test_chip()
In reply to Steven RostedtFrom: Ben Hutchings <[email protected]>
[ Upstream commit ef492f11efed9a6a1686bf914fb74468df59385c ]
--- drivers/net/ethernet/sfc/siena.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/sfc/siena.c +1 -1
@@ -170,7 +170,7 @@ static const struct efx_nic_register_test siena_register_tests[] = {static int siena_test_chip (struct efx_nic *efx,struct efx_self_tests *tests) { -enum reset_type reset_method = reset_method; +enum reset_type reset_method =RESET_TYPE_ALL ;int rc, rc2;efx_reset_down (efx, reset_method);
Signature · 1 line
1.7.10.4
Steven Rostedt
maintainerPATCH 9/9 sfc: Fix timekeeping in efx_mcdi_poll()
In reply to Steven RostedtFrom: Ben Hutchings <[email protected]>
[ Upstream commit ebf98e797b4e26ad52ace1511a0b503ee60a6cd4 ]
efx_mcdi_poll() uses get_seconds() to read the current time and to implement a polling timeout. The use of this function was chosen partly because it could easily be replaced in a co-sim environment with a macro that read the simulated time.
Unfortunately the real get_seconds() returns the system time (real time) which is subject to adjustment by e.g. ntpd. If the system time is adjusted forward during a polled MCDI operation, the effective timeout can be shorter than the intended 10 seconds, resulting in a spurious failure. It is also possible for a backward adjustment to delay detection of a areal failure.
Use jiffies instead, and change MCDI_RPC_TIMEOUT to be denominated in jiffies. Also correct rounding of the timeout: check time > finish (or rather time_after(time, finish)) and not time >= finish.
--- drivers/net/ethernet/sfc/mcdi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/net/ethernet/sfc/mcdi.c +6 -6
@@ -22,7 +22,7 @@************************************************************************** */ -#define MCDI_RPC_TIMEOUT 10/*seconds */ +#define MCDI_RPC_TIMEOUT (10 * HZ)#define MCDI_PDU (efx) \ (efx_port_num(efx) ? MC_SMEM_P1_PDU_OFST : MC_SMEM_P0_PDU_OFST)
@@ -120,7 +120,7 @@ static void efx_mcdi_copyout(struct efx_nic *efx, u8 *outbuf, size_t outlen)static int efx_mcdi_poll (struct efx_nic *efx) {struct efx_mcdi_iface *mcdi =efx_mcdi (efx); -unsigned int time, finish; +unsigned long time, finish;unsigned int respseq, respcmd, error;unsigned int pdu =FR_CZ_MC_TREG_SMEM +MCDI_PDU (efx);unsigned int rc, spins;
@@ -136,7 +136,7 @@ static int efx_mcdi_poll(struct efx_nic *efx)* and poll once a jiffy (approximately) */ spins =TICK_USEC ; - finish =get_seconds () +MCDI_RPC_TIMEOUT ; + finish = jiffies +MCDI_RPC_TIMEOUT ;while (1 ) {if (spins !=0 ) {
@@ -146,7 +146,7 @@ static int efx_mcdi_poll(struct efx_nic *efx)schedule_timeout_uninterruptible (1 ); } - time =get_seconds (); + time = jiffies;rmb ();efx_readd (efx, ®, pdu);
@@ -158,7 +158,7 @@ static int efx_mcdi_poll(struct efx_nic *efx) EFX_DWORD_FIELD(reg, MCDI_HEADER_RESPONSE)) break; -if (time >= finish) +if (time_after (time, finish))return -ETIMEDOUT ; }
@@ -250,7 +250,7 @@ static int efx_mcdi_await_completion(struct efx_nic *efx)if (wait_event_timeout ( mcdi->wq,atomic_read (&mcdi->state) ==MCDI_STATE_COMPLETED , -msecs_to_jiffies (MCDI_RPC_TIMEOUT *1000 )) ==0 ) +MCDI_RPC_TIMEOUT ) ==0 )return -ETIMEDOUT ;/* Check if efx_mcdi_set_mode() switched us back to polled completions.
Signature · 1 line
1.7.10.4
Steven Rostedt
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 3 PATCHLEVEL = 6 SUBLEVEL = 11 -EXTRAVERSION = .1 +EXTRAVERSION = .2 NAME = Terrified Chipmunk # *DOCUMENTATION*
arch/arm/boot/dts/kirkwood-goflexnet.dts +1 -0
@@ -22,6 +22,7 @@ }; nand@3000000 { + chip-delay = <40>; status = "okay"; partition@0 {
arch/arm/mach-cns3xxx/core.c +3 -13
@@ -22,19 +22,9 @@static struct map_desc cns3xxx_io_desc[]__initdata = { { - .virtual =CNS3XXX_TC11MP_TWD_BASE_VIRT , - .pfn =__phys_to_pfn (CNS3XXX_TC11MP_TWD_BASE ), - .length =SZ_4K , - .type =MT_DEVICE , - }, { - .virtual =CNS3XXX_TC11MP_GIC_CPU_BASE_VIRT , - .pfn =__phys_to_pfn (CNS3XXX_TC11MP_GIC_CPU_BASE ), - .length =SZ_4K , - .type =MT_DEVICE , - }, { - .virtual =CNS3XXX_TC11MP_GIC_DIST_BASE_VIRT , - .pfn =__phys_to_pfn (CNS3XXX_TC11MP_GIC_DIST_BASE ), - .length =SZ_4K , + .virtual =CNS3XXX_TC11MP_SCU_BASE_VIRT , + .pfn =__phys_to_pfn (CNS3XXX_TC11MP_SCU_BASE ), + .length =SZ_8K , .type =MT_DEVICE , }, { .virtual =CNS3XXX_TIMER1_2_3_BASE_VIRT ,
arch/arm/mach-cns3xxx/include/mach/cns3xxx.h +8 -8
@@ -94,10 +94,10 @@#define RTC_INTR_STS_OFFSET 0x34#define CNS3XXX_MISC_BASE 0x76000000/* Misc Control */ -#define CNS3XXX_MISC_BASE_VIRT 0xFFF07000/* Misc Control */ +#define CNS3XXX_MISC_BASE_VIRT 0xFB000000/* Misc Control */ #define CNS3XXX_PM_BASE 0x77000000/* Power Management Control */ -#define CNS3XXX_PM_BASE_VIRT 0xFFF08000 +#define CNS3XXX_PM_BASE_VIRT 0xFB001000#define PM_CLK_GATE_OFFSET 0x00#define PM_SOFT_RST_OFFSET 0x04
@@ -109,7 +109,7 @@#define PM_PLL_HM_PD_OFFSET 0x1C#define CNS3XXX_UART0_BASE 0x78000000/* UART 0 */ -#define CNS3XXX_UART0_BASE_VIRT 0xFFF09000 +#define CNS3XXX_UART0_BASE_VIRT 0xFB002000#define CNS3XXX_UART1_BASE 0x78400000/* UART 1 */ #define CNS3XXX_UART1_BASE_VIRT 0xFFF0A000
@@ -130,7 +130,7 @@#define CNS3XXX_I2S_BASE_VIRT 0xFFF10000#define CNS3XXX_TIMER1_2_3_BASE 0x7C800000/* Timer */ -#define CNS3XXX_TIMER1_2_3_BASE_VIRT 0xFFF10800 +#define CNS3XXX_TIMER1_2_3_BASE_VIRT 0xFB003000#define TIMER1_COUNTER_OFFSET 0x00#define TIMER1_AUTO_RELOAD_OFFSET 0x04
@@ -227,16 +227,16 @@* Testchip peripheral and fpga gic regions */ #define CNS3XXX_TC11MP_SCU_BASE 0x90000000/* IRQ, Test chip */ -#define CNS3XXX_TC11MP_SCU_BASE_VIRT 0xFF000000 +#define CNS3XXX_TC11MP_SCU_BASE_VIRT 0xFB004000#define CNS3XXX_TC11MP_GIC_CPU_BASE 0x90000100/* Test chip interrupt controller CPU interface */ -#define CNS3XXX_TC11MP_GIC_CPU_BASE_VIRT 0xFF000100 +#define CNS3XXX_TC11MP_GIC_CPU_BASE_VIRT (CNS3XXX_TC11MP_SCU_BASE_VIRT + 0x100)#define CNS3XXX_TC11MP_TWD_BASE 0x90000600 -#define CNS3XXX_TC11MP_TWD_BASE_VIRT 0xFF000600 +#define CNS3XXX_TC11MP_TWD_BASE_VIRT (CNS3XXX_TC11MP_SCU_BASE_VIRT + 0x600)#define CNS3XXX_TC11MP_GIC_DIST_BASE 0x90001000/* Test chip interrupt controller distributor */ -#define CNS3XXX_TC11MP_GIC_DIST_BASE_VIRT 0xFF001000 +#define CNS3XXX_TC11MP_GIC_DIST_BASE_VIRT (CNS3XXX_TC11MP_SCU_BASE_VIRT + 0x1000)#define CNS3XXX_TC11MP_L220_BASE 0x92002000/* L220 registers */ #define CNS3XXX_TC11MP_L220_BASE_VIRT 0xFF002000
arch/arm/mm/dma-mapping.c +3 -2
@@ -311,6 +311,7 @@ static int __init atomic_pool_init(void) {struct dma_pool *pool = &atomic_pool;pgprot_t prot =pgprot_dmacoherent (pgprot_kernel); +gfp_t gfp =GFP_KERNEL |GFP_DMA ;unsigned long nr_pages = pool->size >>PAGE_SHIFT ;unsigned long *bitmap;struct page *page;
@@ -329,8 +330,8 @@ static int __init atomic_pool_init(void)if (IS_ENABLED (CONFIG_CMA )) ptr =__alloc_from_contiguous (NULL , pool->size, prot, &page);else - ptr =__alloc_remap_buffer (NULL , pool->size,GFP_KERNEL , prot, - &page,NULL ); + ptr =__alloc_remap_buffer (NULL , pool->size, gfp, prot, &page, +NULL );if (ptr) {int i;
arch/tile/kernel/setup.c +12 -13
@@ -999,15 +999,8 @@ void __cpuinit setup_cpu(int boot)#ifdef CONFIG_BLK_DEV_INITRD -/* -* Note that the kernel can potentially support other compression -* techniques than gz, though we don't do so by default. If we ever -* decide to do so we can either look for other filename extensions, -* or just allow a file with this name to be compressed with an -* arbitrary compressor (somewhat counterintuitively). -*/ static int __initdata set_initramfs_file; -static char __initdata initramfs_file[128 ] ="initramfs.cpio.gz" ; +static char __initdata initramfs_file[128 ] ="initramfs" ;static int __init setup_initramfs_file (char *str) {
@@ -1021,9 +1014,9 @@ static int __init setup_initramfs_file(char *str)early_param ("initramfs_file" , setup_initramfs_file);/* -* We look for an "initramfs.cpio.gz" file in the hvfs. -* If there is one, we allocate some memory for it and it will be -* unpacked to the initramfs. +* We look for a file called "initramfs" in the hvfs. If there is one, we +* allocate some memory for it and it will be unpacked to the initramfs. +* If it's compressed, the initd code will uncompress it first. */ static void __init load_hv_initrd (void ) {
@@ -1033,10 +1026,16 @@ static void __init load_hv_initrd(void) fd =hv_fs_findfile ((HV_VirtAddr ) initramfs_file);if (fd ==HV_ENOENT ) { -if (set_initramfs_file) +if (set_initramfs_file) {pr_warning ("No such hvfs initramfs file '%s'\n" , initramfs_file); -return ; +return ; + }else { +/* Try old backwards-compatible name. */ + fd =hv_fs_findfile ((HV_VirtAddr )"initramfs.cpio.gz" ); +if (fd ==HV_ENOENT ) +return ; + } }BUG_ON (fd <0 ); stat =hv_fs_fstat (fd);
arch/x86/lib/usercopy_64.c +2 -2
@@ -72,10 +72,10 @@ copy_user_handle_tail(char *to, char *from, unsigned len, unsigned zerorest)char c;unsigned zero_len; -for (; len; --len) { +for (; len; --len, to++) {if (__get_user_nocheck (c, from++,sizeof (char )))break ; -if (__put_user_nocheck (c, to++,sizeof (char ))) +if (__put_user_nocheck (c, to,sizeof (char )))break ; }
drivers/acpi/glue.c +13 -22
@@ -88,40 +88,31 @@ static int acpi_find_bridge_device(struct device *dev, acpi_handle * handle)return ret; } -/* Get device's handler per its address under its parent */ -struct acpi_find_child { -acpi_handle handle; -u64 address; -}; - -static acpi_status -do_acpi_find_child (acpi_handle handle,u32 lvl,void *context,void **rv) +static acpi_status do_acpi_find_child (acpi_handle handle,u32 lvl_not_used, +void *addr_p,void **ret_p) { +unsigned long long addr;acpi_status status; -struct acpi_device_info *info; -struct acpi_find_child *find = context; - - status =acpi_get_object_info (handle, &info); -if (ACPI_SUCCESS (status)) { -if ((info->address == find->address) - && (info->valid &ACPI_VALID_ADR )) - find->handle = handle; -kfree (info); + + status =acpi_evaluate_integer (handle,METHOD_NAME__ADR ,NULL , &addr); +if (ACPI_SUCCESS (status) && addr == *((u64 *)addr_p)) { + *ret_p = handle; +return AE_CTRL_TERMINATE ; }return AE_OK ; }acpi_handle acpi_get_child (acpi_handle parent,u64 address) { -struct acpi_find_child find = {NULL , address }; +void *ret =NULL ;if (!parent)return NULL ; -acpi_walk_namespace (ACPI_TYPE_DEVICE , parent, -1 , do_acpi_find_child,NULL , &find,NULL ); -return find.handle; -} +acpi_walk_namespace (ACPI_TYPE_DEVICE , parent,1 ,NULL , + do_acpi_find_child, &address, &ret); +return (acpi_handle )ret; +}EXPORT_SYMBOL (acpi_get_child);/* Link ACPI devices with physical devices */
drivers/block/aoe/aoecmd.c +2 -1
@@ -30,8 +30,9 @@ new_skb(ulong len) {struct sk_buff *skb; - skb =alloc_skb (len,GFP_ATOMIC ); + skb =alloc_skb (len +MAX_HEADER ,GFP_ATOMIC );if (skb) { +skb_reserve (skb,MAX_HEADER );skb_reset_mac_header (skb);skb_reset_network_header (skb); skb->protocol =__constant_htons (ETH_P_AOE );
drivers/block/loop.c +8 -1
@@ -908,6 +908,11 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode, lo->lo_flags |=LO_FLAGS_PARTSCAN ;if (lo->lo_flags &LO_FLAGS_PARTSCAN )ioctl_by_bdev (bdev,BLKRRPART ,0 ); + +/* Grab the block_device to prevent its destruction after we +* put /dev/loopXX inode. Later in loop_clr_fd() we bdput(bdev). +*/ +bdgrab (bdev);return 0 ; out_clr:
@@ -1004,8 +1009,10 @@ static int loop_clr_fd(struct loop_device *lo)memset (lo->lo_encrypt_key,0 ,LO_KEY_SIZE );memset (lo->lo_crypt_name,0 ,LO_NAME_SIZE );memset (lo->lo_file_name,0 ,LO_NAME_SIZE ); -if (bdev) +if (bdev) { +bdput (bdev);invalidate_bdev (bdev); + }set_capacity (lo->lo_disk,0 );loop_sysfs_exit (lo);if (bdev) {
drivers/block/xen-blkback/blkback.c +28 -10
@@ -422,6 +422,16 @@ static int dispatch_discard_io(struct xen_blkif *blkif,return err; } +static int dispatch_other_io (struct xen_blkif *blkif, +struct blkif_request *req, +struct pending_req *pending_req) +{ +free_req (pending_req); +make_response (blkif, req->u.other.id, req->operation, +BLKIF_RSP_EOPNOTSUPP ); +return -EIO ; +} +static void xen_blk_drain_io (struct xen_blkif *blkif) {atomic_set (&blkif->drain,1 );
@@ -543,17 +553,30 @@ __do_block_io_op(struct xen_blkif *blkif)/* Apply all sanity checks to /private copy/ of request. */ barrier (); -if (unlikely (req.operation ==BLKIF_OP_DISCARD )) { + +switch (req.operation) { +case BLKIF_OP_READ : +case BLKIF_OP_WRITE : +case BLKIF_OP_WRITE_BARRIER : +case BLKIF_OP_FLUSH_DISKCACHE : +if (dispatch_rw_block_io (blkif, &req, pending_req)) + goto done; +break ; +case BLKIF_OP_DISCARD :free_req (pending_req);if (dispatch_discard_io (blkif, &req)) -break ; - }else if (dispatch_rw_block_io (blkif, &req, pending_req)) + goto done;break ; +default : +if (dispatch_other_io (blkif, &req, pending_req)) + goto done; +break ; + }/* Yield point for this unbounded loop. */ cond_resched (); } - +done:return more_to_do; }
@@ -720,13 +743,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif, bio->bi_end_io = end_block_io_op; } -/* -* We set it one so that the last submit_bio does not have to call -* atomic_inc. -*/ atomic_set (&pending_req->pendcnt, nbio); - -/* Get a reference count for the disk queue and start sending I/O */ blk_start_plug (&plug);for (i =0 ; i < nbio; i++)
@@ -754,6 +771,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif, fail_put_bio:for (i =0 ; i < nbio; i++)bio_put (biolist[i]); +atomic_set (&pending_req->pendcnt,1 );__end_block_io_op (pending_req, -EINVAL );msleep (1 );/* back off a bit */ return -EIO ;
drivers/block/xen-blkback/common.h +25 -0
@@ -76,11 +76,18 @@ struct blkif_x86_32_request_discard {uint64_t nr_sectors; } __attribute__((__packed__)); +struct blkif_x86_32_request_other { +uint8_t _pad1; +blkif_vdev_t _pad2; +uint64_t id;/* private guest value, echoed in resp */ +} __attribute__((__packed__ )); +struct blkif_x86_32_request {uint8_t operation;/* BLKIF_OP_??? */ union {struct blkif_x86_32_request_rw rw;struct blkif_x86_32_request_discard discard; +struct blkif_x86_32_request_other other; } u; } __attribute__((__packed__ ));
@@ -112,11 +119,19 @@ struct blkif_x86_64_request_discard {uint64_t nr_sectors; } __attribute__((__packed__)); +struct blkif_x86_64_request_other { +uint8_t _pad1; +blkif_vdev_t _pad2; +uint32_t _pad3;/* offsetof(blkif_..,u.discard.id)==8 */ +uint64_t id;/* private guest value, echoed in resp */ +} __attribute__((__packed__ )); +struct blkif_x86_64_request {uint8_t operation;/* BLKIF_OP_??? */ union {struct blkif_x86_64_request_rw rw;struct blkif_x86_64_request_discard discard; +struct blkif_x86_64_request_other other; } u; } __attribute__((__packed__ ));
@@ -262,6 +277,11 @@ static inline void blkif_get_x86_32_req(struct blkif_request *dst, dst->u.discard.nr_sectors = src->u.discard.nr_sectors;break ;default : +/* +* Don't know how to translate this op. Only get the +* ID so failure can be reported to the frontend. +*/ + dst->u.other.id = src->u.other.id;break ; } }
@@ -293,6 +313,11 @@ static inline void blkif_get_x86_64_req(struct blkif_request *dst, dst->u.discard.nr_sectors = src->u.discard.nr_sectors;break ;default : +/* +* Don't know how to translate this op. Only get the +* ID so failure can be reported to the frontend. +*/ + dst->u.other.id = src->u.other.id;break ; } }
drivers/bluetooth/ath3k.c +4 -0
@@ -72,8 +72,10 @@ static struct usb_device_id ath3k_table[] = { { USB_DEVICE(0x03F0, 0x311D) },/* Atheros AR3012 with sflash firmware*/ + { USB_DEVICE(0x0CF3, 0x0036) }, { USB_DEVICE(0x0CF3, 0x3004) }, { USB_DEVICE(0x0CF3, 0x311D) }, + { USB_DEVICE(0x0CF3, 0x817a) }, { USB_DEVICE(0x13d3, 0x3375) }, { USB_DEVICE(0x04CA, 0x3005) }, { USB_DEVICE(0x13d3, 0x3362) },
@@ -99,8 +101,10 @@ MODULE_DEVICE_TABLE(usb, ath3k_table);static struct usb_device_id ath3k_blist_tbl[] = {/* Atheros AR3012 with sflash firmware*/ + {USB_DEVICE (0x0CF3 ,0x0036 ), .driver_info =BTUSB_ATH3012 }, {USB_DEVICE (0x0cf3 ,0x3004 ), .driver_info =BTUSB_ATH3012 }, {USB_DEVICE (0x0cf3 ,0x311D ), .driver_info =BTUSB_ATH3012 }, + {USB_DEVICE (0x0CF3 ,0x817a ), .driver_info =BTUSB_ATH3012 }, {USB_DEVICE (0x13d3 ,0x3375 ), .driver_info =BTUSB_ATH3012 }, {USB_DEVICE (0x04ca ,0x3005 ), .driver_info =BTUSB_ATH3012 }, {USB_DEVICE (0x13d3 ,0x3362 ), .driver_info =BTUSB_ATH3012 },
drivers/bluetooth/btusb.c +2 -0
@@ -128,8 +128,10 @@ static struct usb_device_id blacklist_table[] = { { USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE }, /* Atheros 3012 with sflash firmware */ + { USB_DEVICE(0x0cf3, 0x0036), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0cf3, 0x311d), .driver_info = BTUSB_ATH3012 }, + { USB_DEVICE(0x0cf3, 0x817a), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 },
drivers/char/virtio_console.c +14 -8
@@ -131,7 +131,8 @@ struct ports_device {spinlock_t ports_lock;/* To protect the vq operations for the control channel */ -spinlock_t cvq_lock; +spinlock_t c_ivq_lock; +spinlock_t c_ovq_lock;/* The current config space is stored here */ struct virtio_console_config config;
@@ -457,11 +458,14 @@ static ssize_t __send_control_msg(struct ports_device *portdev, u32 port_id, vq = portdev->c_ovq;sg_init_one (sg, &cpkt,sizeof (cpkt)); + +spin_lock (&portdev->c_ovq_lock);if (virtqueue_add_buf (vq, sg,1 ,0 , &cpkt,GFP_ATOMIC ) >=0 ) {virtqueue_kick (vq);while (!virtqueue_get_buf (vq, &len))cpu_relax (); } +spin_unlock (&portdev->c_ovq_lock);return 0 ; }
@@ -1465,23 +1469,23 @@ static void control_work_handler(struct work_struct *work) portdev = container_of(work, struct ports_device, control_work); vq = portdev->c_ivq; -spin_lock (&portdev->cvq_lock); +spin_lock (&portdev->c_ivq_lock);while ((buf =virtqueue_get_buf (vq, &len))) { -spin_unlock (&portdev->cvq_lock); +spin_unlock (&portdev->c_ivq_lock); buf->len = len; buf->offset =0 ;handle_control_message (portdev, buf); -spin_lock (&portdev->cvq_lock); +spin_lock (&portdev->c_ivq_lock);if (add_inbuf (portdev->c_ivq, buf) <0 ) {dev_warn (&portdev->vdev->dev,"Error adding buffer to queue\n" );free_buf (buf); } } -spin_unlock (&portdev->cvq_lock); +spin_unlock (&portdev->c_ivq_lock); }static void out_intr (struct virtqueue *vq)
@@ -1742,10 +1746,12 @@ static int __devinit virtcons_probe(struct virtio_device *vdev)if (multiport) {unsigned int nr_added_bufs; -spin_lock_init (&portdev->cvq_lock); +spin_lock_init (&portdev->c_ivq_lock); +spin_lock_init (&portdev->c_ovq_lock);INIT_WORK (&portdev->control_work, &control_work_handler); - nr_added_bufs =fill_queue (portdev->c_ivq, &portdev->cvq_lock); + nr_added_bufs =fill_queue (portdev->c_ivq, + &portdev->c_ivq_lock);if (!nr_added_bufs) {dev_err (&vdev->dev,"Error allocating buffers for control queue\n" );
@@ -1885,7 +1891,7 @@ static int virtcons_restore(struct virtio_device *vdev)return ret;if (use_multiport (portdev)) -fill_queue (portdev->c_ivq, &portdev->cvq_lock); +fill_queue (portdev->c_ivq, &portdev->c_ivq_lock);list_for_each_entry (port, &portdev->ports, list) { port->in_vq = portdev->in_vqs[port->id];
drivers/gpu/drm/drm_edid.c +2 -1
@@ -879,7 +879,7 @@ static struct drm_display_mode *drm_mode_detailed(struct drm_device *dev,unsigned vblank = (pt->vactive_vblank_hi &0xf ) <<8 | pt->vblank_lo;unsigned hsync_offset = (pt->hsync_vsync_offset_pulse_width_hi &0xc0 ) <<2 | pt->hsync_offset_lo;unsigned hsync_pulse_width = (pt->hsync_vsync_offset_pulse_width_hi &0x30 ) <<4 | pt->hsync_pulse_width_lo; -unsigned vsync_offset = (pt->hsync_vsync_offset_pulse_width_hi &0xc ) >>2 | pt->vsync_offset_pulse_width_lo >>4 ; +unsigned vsync_offset = (pt->hsync_vsync_offset_pulse_width_hi &0xc ) <<2 | pt->vsync_offset_pulse_width_lo >>4 ;unsigned vsync_pulse_width = (pt->hsync_vsync_offset_pulse_width_hi &0x3 ) <<4 | (pt->vsync_offset_pulse_width_lo &0xf );/* ignore tiny modes */
@@ -960,6 +960,7 @@ set_size: } mode->type =DRM_MODE_TYPE_DRIVER ; + mode->vrefresh =drm_mode_vrefresh (mode);drm_mode_set_name (mode);return mode;
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
@@ -121,7 +121,7 @@ static const char *cache_level_str(int type)static void describe_obj (struct seq_file *m,struct drm_i915_gem_object *obj) { - seq_printf(m, "%p: %s%s %8zdKiB %04x %04x %d %d%s%s%s", + seq_printf(m, "%pK: %s%s %8zdKiB %04x %04x %d %d%s%s%s", &obj->base, get_pin_flag(obj), get_tiling_flag(obj),
drivers/gpu/drm/i915/i915_gem_execbuffer.c +8 -3
@@ -910,15 +910,20 @@ validate_exec_list(struct drm_i915_gem_exec_object2 *exec, int count) {int i; +int relocs_total =0 ; +int relocs_max =INT_MAX /sizeof (struct drm_i915_gem_relocation_entry );for (i =0 ; i < count; i++) {char __user *ptr = (char __user *)(uintptr_t )exec[i].relocs_ptr;int length;/* limited by fault_in_pages_readable() */ -/* First check for malicious input causing overflow */ -if (exec[i].relocation_count > -INT_MAX /sizeof (struct drm_i915_gem_relocation_entry )) +/* First check for malicious input causing overflow in +* the worst case where we need to allocate the entire +* relocation tree as a single array. +*/ +if (exec[i].relocation_count > relocs_max - relocs_total)return -EINVAL ; + relocs_total += exec[i].relocation_count; length = exec[i].relocation_count *sizeof (struct drm_i915_gem_relocation_entry );
drivers/gpu/drm/i915/intel_display.c +4 -7
@@ -6459,8 +6459,8 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, {struct drm_device *dev = crtc->dev;struct drm_i915_private *dev_priv = dev->dev_private; -struct intel_framebuffer *intel_fb; -struct drm_i915_gem_object *obj; +struct drm_framebuffer *old_fb = crtc->fb; +struct drm_i915_gem_object *obj =to_intel_framebuffer (fb)->obj;struct intel_crtc *intel_crtc =to_intel_crtc (crtc);struct intel_unpin_work *work;unsigned long flags;
@@ -6485,8 +6485,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, work->event = event; work->dev = crtc->dev; - intel_fb =to_intel_framebuffer (crtc->fb); - work->old_fb_obj = intel_fb->obj; + work->old_fb_obj =to_intel_framebuffer (old_fb)->obj;INIT_WORK (&work->work, intel_unpin_work_fn); ret =drm_vblank_get (dev, intel_crtc->pipe);
@@ -6506,9 +6505,6 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, intel_crtc->unpin_work = work;spin_unlock_irqrestore (&dev->event_lock, flags); - intel_fb =to_intel_framebuffer (fb); - obj = intel_fb->obj; - ret =i915_mutex_lock_interruptible (dev);if (ret) goto cleanup;
@@ -6542,6 +6538,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, cleanup_pending:atomic_sub (1 << intel_crtc->plane, &work->old_fb_obj->pending_flip); + crtc->fb = old_fb;drm_gem_object_unreference (&work->old_fb_obj->base);drm_gem_object_unreference (&obj->base);mutex_unlock (&dev->struct_mutex);
drivers/gpu/drm/i915/intel_dp.c +12 -2
@@ -800,6 +800,7 @@ intel_dp_set_m_n(struct drm_crtc *crtc, struct drm_display_mode *mode,int lane_count =4 ;struct intel_dp_m_n m_n;int pipe = intel_crtc->pipe; +int target_clock;/* * Find the lane count in the intel_encoder private
@@ -815,13 +816,22 @@ intel_dp_set_m_n(struct drm_crtc *crtc, struct drm_display_mode *mode, } } + target_clock = mode->clock; +for_each_encoder_on_crtc (dev, crtc, encoder) { +if (encoder->type ==INTEL_OUTPUT_EDP ) { + target_clock =intel_edp_target_clock (encoder, + mode); +break ; + } + } +/* * Compute the GMCH and Link ratios. The '3' here is * the number of bytes_per_pixel post-LUT, which we always * set up for 8-bits of R/G/B, or 3 bytes total. */ intel_dp_compute_m_n (intel_crtc->bpp, lane_count, - mode->clock, adjusted_mode->clock, &m_n); + target_clock, adjusted_mode->clock, &m_n);if (HAS_PCH_SPLIT (dev)) { I915_WRITE(TRANSDATA_M1(pipe),
@@ -1771,7 +1781,7 @@ intel_dp_start_link_train(struct intel_dp *intel_dp)for (i =0 ; i < intel_dp->lane_count; i++)if ((intel_dp->train_set[i] &DP_TRAIN_MAX_SWING_REACHED ) ==0 )break ; -if (i == intel_dp->lane_count && voltage_tries ==5 ) { +if (i == intel_dp->lane_count) { ++loop_tries;if (loop_tries ==5 ) {DRM_DEBUG_KMS ("too many full retries, give up\n" );
drivers/gpu/drm/mgag200/mgag200_mode.c +5 -5
@@ -383,19 +383,19 @@ static int mga_g200eh_set_plls(struct mga_device *mdev, long clock) m = n = p =0 ; vcomax =800000 ; vcomin =400000 ; - pllreffreq =3333 ; + pllreffreq =33333 ; delta =0xffffffff ; permitteddelta = clock *5 /1000 ; -for (testp =16 ; testp >0 ; testp--) { +for (testp =16 ; testp >0 ; testp >>=1 ) {if (clock * testp > vcomax)continue ;if (clock * testp < vcomin)continue ;for (testm =1 ; testm <33 ; testm++) { -for (testn =1 ; testn <257 ; testn++) { +for (testn =17 ; testn <257 ; testn++) { computed = (pllreffreq * testn) / (testm * testp);if (computed > clock)
@@ -405,11 +405,11 @@ static int mga_g200eh_set_plls(struct mga_device *mdev, long clock)if (tmpdelta < delta) { delta = tmpdelta; n = testn -1 ; - m = (testm -1 ) | ((n >>1 ) &0x80 ); + m = (testm -1 ); p = testp -1 ; }if ((clock * testp) >=600000 ) - p |=80 ; + p |=0x80 ; } } }
drivers/gpu/drm/radeon/ni.c +10 -1
@@ -466,13 +466,19 @@ static void cayman_gpu_init(struct radeon_device *rdev) (rdev->pdev->device ==0x9907 ) || (rdev->pdev->device ==0x9908 ) || (rdev->pdev->device ==0x9909 ) || + (rdev->pdev->device ==0x990B ) || + (rdev->pdev->device ==0x990C ) || + (rdev->pdev->device ==0x990F ) || (rdev->pdev->device ==0x9910 ) || - (rdev->pdev->device == 0x9917)) { + (rdev->pdev->device ==0x9917 ) || + (rdev->pdev->device == 0x9999)) { rdev->config.cayman.max_simds_per_se = 6; rdev->config.cayman.max_backends_per_se =2 ; } else if ((rdev->pdev->device == 0x9903) || (rdev->pdev->device ==0x9904 ) || (rdev->pdev->device ==0x990A ) || + (rdev->pdev->device ==0x990D ) || + (rdev->pdev->device ==0x990E ) || (rdev->pdev->device ==0x9913 ) || (rdev->pdev->device ==0x9918 )) { rdev->config.cayman.max_simds_per_se =4 ;
@@ -481,6 +487,9 @@ static void cayman_gpu_init(struct radeon_device *rdev) (rdev->pdev->device ==0x9990 ) || (rdev->pdev->device ==0x9991 ) || (rdev->pdev->device ==0x9994 ) || + (rdev->pdev->device ==0x9995 ) || + (rdev->pdev->device ==0x9996 ) || + (rdev->pdev->device ==0x999A ) || (rdev->pdev->device == 0x99A0)) { rdev->config.cayman.max_simds_per_se = 3; rdev->config.cayman.max_backends_per_se =1 ;
drivers/gpu/drm/radeon/radeon_benchmark.c +9 -7
@@ -135,13 +135,15 @@ static void radeon_benchmark_move(struct radeon_device *rdev, unsigned size, sdomain, ddomain, "dma"); } - time =radeon_benchmark_do_move (rdev, size, saddr, daddr, -RADEON_BENCHMARK_COPY_BLIT , n); -if (time <0 ) - goto out_cleanup; -if (time >0 ) -radeon_benchmark_log_results (n, size, time, - sdomain, ddomain,"blit" ); +if (rdev->asic->copy.blit) { + time =radeon_benchmark_do_move (rdev, size, saddr, daddr, +RADEON_BENCHMARK_COPY_BLIT , n); +if (time <0 ) + goto out_cleanup; +if (time >0 ) +radeon_benchmark_log_results (n, size, time, + sdomain, ddomain,"blit" ); + } out_cleanup:if (sobj) {
drivers/hid/hid-ids.h +6 -0
@@ -566,6 +566,9 @@#define USB_VENDOR_ID_MONTEREY 0x0566#define USB_DEVICE_ID_GENIUS_KB29E 0x3004 +#define USB_VENDOR_ID_MSI 0x1770 +#define USB_DEVICE_ID_MSI_GX680R_LED_PANEL 0xff00 +#define USB_VENDOR_ID_NATIONAL_SEMICONDUCTOR 0x0400#define USB_DEVICE_ID_N_S_HARMONY 0xc359
@@ -657,6 +660,9 @@#define USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3008 0x3008#define USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN 0x3001 +#define USB_VENDOR_ID_REALTEK 0x0bda +#define USB_DEVICE_ID_REALTEK_READER 0x0152 +#define USB_VENDOR_ID_ROCCAT 0x1e7d#define USB_DEVICE_ID_ROCCAT_ARVO 0x30d4#define USB_DEVICE_ID_ROCCAT_ISKU 0x319c
drivers/hid/usbhid/hid-quirks.c +2 -0
@@ -72,12 +72,14 @@ static const struct hid_blacklist { { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, { USB_VENDOR_ID_FREESCALE, USB_DEVICE_ID_FREESCALE_MX28, HID_QUIRK_NOGET }, { USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GX680R_LED_PANEL, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN1, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN2, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_PRODIGE, USB_DEVICE_ID_PRODIGE_CORDLESS, HID_QUIRK_NOGET }, { USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN, HID_QUIRK_NOGET }, { USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3008, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_REALTEK, USB_DEVICE_ID_REALTEK_READER, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_SENNHEISER, USB_DEVICE_ID_SENNHEISER_BTD500USB, HID_QUIRK_NOGET }, { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET }, { USB_VENDOR_ID_SYMBOL, USB_DEVICE_ID_SYMBOL_SCANNER_1, HID_QUIRK_NOGET },
drivers/infiniband/ulp/ipoib/ipoib_cm.c +6 -2
@@ -755,9 +755,13 @@ void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_if (++priv->tx_outstanding == ipoib_sendq_size) {ipoib_dbg (priv,"TX ring 0x%x full, stopping kernel net queue\n" , tx->qp->qp_num); -if (ib_req_notify_cq (priv->send_cq,IB_CQ_NEXT_COMP )) -ipoib_warn (priv,"request notify on send CQ failed\n" );netif_stop_queue (dev); + rc =ib_req_notify_cq (priv->send_cq, +IB_CQ_NEXT_COMP |IB_CQ_REPORT_MISSED_EVENTS ); +if (rc <0 ) +ipoib_warn (priv,"request notify on send CQ failed\n" ); +else if (rc) +ipoib_send_comp_handler (priv->send_cq, dev); } } }
drivers/iommu/amd_iommu.c +10 -12
@@ -2337,18 +2337,16 @@ static int device_change_notifier(struct notifier_block *nb,/* allocate a protection domain if a device is added */ dma_domain =find_protection_domain (devid); -if (dma_domain) - goto out; - dma_domain =dma_ops_domain_alloc (); -if (!dma_domain) - goto out; - dma_domain->target_dev = devid; - -spin_lock_irqsave (&iommu_pd_list_lock, flags); -list_add_tail (&dma_domain->list, &iommu_pd_list); -spin_unlock_irqrestore (&iommu_pd_list_lock, flags); - - dev_data =get_dev_data (dev); +if (!dma_domain) { + dma_domain =dma_ops_domain_alloc (); +if (!dma_domain) + goto out; + dma_domain->target_dev = devid; + +spin_lock_irqsave (&iommu_pd_list_lock, flags); +list_add_tail (&dma_domain->list, &iommu_pd_list); +spin_unlock_irqrestore (&iommu_pd_list_lock, flags); + } dev->archdata.dma_ops = &amd_iommu_dma_ops;
drivers/md/dm-bufio.c +2 -0
@@ -1029,6 +1029,8 @@ void dm_bufio_prefetch(struct dm_bufio_client *c, {struct blk_plug plug; +BUG_ON (dm_bufio_in_request ()); +blk_start_plug (&plug);dm_bufio_lock (c);
drivers/md/dm-verity.c +34 -5
@@ -95,6 +95,13 @@ struct dm_verity_io {*/ }; +struct dm_verity_prefetch_work { +struct work_struct work; +struct dm_verity *v; +sector_t block; +unsigned n_blocks; +}; +static struct shash_desc *io_hash_desc (struct dm_verity *v,struct dm_verity_io *io) {return (struct shash_desc *)(io +1 );
@@ -428,15 +435,18 @@ static void verity_end_io(struct bio *bio, int error)* The root buffer is not prefetched, it is assumed that it will be cached * all the time. */ -static void verity_prefetch_io (struct dm_verity *v,struct dm_verity_io *io) +static void verity_prefetch_io (struct work_struct *work) { +struct dm_verity_prefetch_work *pw = + container_of(work, struct dm_verity_prefetch_work, work); +struct dm_verity *v = pw->v;int i;for (i = v->levels -2 ; i >=0 ; i--) {sector_t hash_block_start;sector_t hash_block_end; -verity_hash_at_level (v, io->block, i, &hash_block_start,NULL ); -verity_hash_at_level (v, io->block + io->n_blocks -1 , i, &hash_block_end,NULL ); +verity_hash_at_level (v, pw->block, i, &hash_block_start,NULL ); +verity_hash_at_level (v, pw->block + pw->n_blocks -1 , i, &hash_block_end,NULL );if (!i) {unsigned cluster = *(volatile unsigned *)&dm_verity_prefetch_cluster;
@@ -456,6 +466,25 @@ no_prefetch_cluster:dm_bufio_prefetch (v->bufio, hash_block_start, hash_block_end - hash_block_start +1 ); } + +kfree (pw); +} + +static void verity_submit_prefetch (struct dm_verity *v,struct dm_verity_io *io) +{ +struct dm_verity_prefetch_work *pw; + + pw =kmalloc (sizeof (struct dm_verity_prefetch_work ), +GFP_NOIO | __GFP_NORETRY | __GFP_NOMEMALLOC | __GFP_NOWARN); + +if (!pw) +return ; + +INIT_WORK (&pw->work, verity_prefetch_io); + pw->v = v; + pw->block = io->block; + pw->n_blocks = io->n_blocks; +queue_work (v->verify_wq, &pw->work); }/*
@@ -504,7 +533,7 @@ static int verity_map(struct dm_target *ti, struct bio *bio,memcpy (io->io_vec,bio_iovec (bio), io->io_vec_size *sizeof (struct bio_vec )); -verity_prefetch_io (v, io); +verity_submit_prefetch (v, io);generic_make_request (bio);
@@ -875,7 +904,7 @@ bad:static struct target_type verity_target = { .name ="verity" , - .version = {1 ,0 ,0 }, + .version = {1 ,2 ,0 }, .module =THIS_MODULE , .ctr = verity_ctr, .dtr = verity_dtr,
drivers/net/bonding/bond_main.c +29 -68
170 lines not on this page · raw message
drivers/net/bonding/bond_sysfs.c +58 -63
185 lines not on this page · raw message
drivers/net/can/sja1000/plx_pci.c +2 -2
@@ -329,7 +329,7 @@ static inline int plx_pci_check_sja1000(const struct sja1000_priv *priv)*/ if ((priv->read_reg (priv,REG_CR ) ®_CR_BASICCAN_INITIAL_MASK ) ==REG_CR_BASICCAN_INITIAL && - (priv->read_reg (priv,REG_SR ) ==REG_SR_BASICCAN_INITIAL ) && + (priv->read_reg (priv,SJA1000_REG_SR ) ==REG_SR_BASICCAN_INITIAL ) && (priv->read_reg (priv,REG_IR ) ==REG_IR_BASICCAN_INITIAL )) flag =1 ;
@@ -341,7 +341,7 @@ static inline int plx_pci_check_sja1000(const struct sja1000_priv *priv)* See states on p. 23 of the Datasheet. */ if (priv->read_reg (priv,REG_MOD ) ==REG_MOD_PELICAN_INITIAL && - priv->read_reg (priv,REG_SR ) ==REG_SR_PELICAN_INITIAL && + priv->read_reg (priv,SJA1000_REG_SR ) ==REG_SR_PELICAN_INITIAL && priv->read_reg (priv,REG_IR ) ==REG_IR_PELICAN_INITIAL )return flag;
drivers/net/can/sja1000/sja1000.c +3 -3
@@ -91,7 +91,7 @@ static void sja1000_write_cmdreg(struct sja1000_priv *priv, u8 val)*/ spin_lock_irqsave (&priv->cmdreg_lock, flags); priv->write_reg (priv,REG_CMR , val); - priv->read_reg (priv,REG_SR ); + priv->read_reg (priv,SJA1000_REG_SR );spin_unlock_irqrestore (&priv->cmdreg_lock, flags); }
@@ -496,7 +496,7 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)while ((isrc = priv->read_reg (priv,REG_IR )) && (n <SJA1000_MAX_IRQ )) { n++; - status = priv->read_reg (priv,REG_SR ); + status = priv->read_reg (priv,SJA1000_REG_SR );/* check for absent controller due to hw unplug */ if (status ==0xFF &&sja1000_is_absent (priv))return IRQ_NONE ;
@@ -515,7 +515,7 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)/* receive interrupt */ while (status &SR_RBS ) {sja1000_rx (dev); - status = priv->read_reg (priv,REG_SR ); + status = priv->read_reg (priv,SJA1000_REG_SR );/* check for absent controller */ if (status ==0xFF &&sja1000_is_absent (priv))return IRQ_NONE ;
drivers/net/can/sja1000/sja1000.h +1 -1
@@ -56,7 +56,7 @@/* SJA1000 registers - manual section 6.4 (Pelican Mode) */ #define REG_MOD 0x00#define REG_CMR 0x01 -#define REG_SR 0x02 +#define SJA1000_REG_SR 0x02#define REG_IR 0x03#define REG_IER 0x04#define REG_ALC 0x0B
drivers/net/ethernet/atheros/atl1e/atl1e.h +0 -1
@@ -438,7 +438,6 @@ struct atl1e_adapter {struct atl1e_hw hw;struct atl1e_hw_stats hw_stats; -bool have_msi;u32 wol;u16 link_speed;u16 link_duplex;
drivers/net/ethernet/atheros/atl1e/atl1e_main.c +2 -17
@@ -1851,34 +1851,19 @@ static void atl1e_free_irq(struct atl1e_adapter *adapter)struct net_device *netdev = adapter->netdev;free_irq (adapter->pdev->irq, netdev); - -if (adapter->have_msi) -pci_disable_msi (adapter->pdev); }static int atl1e_request_irq (struct atl1e_adapter *adapter) {struct pci_dev *pdev = adapter->pdev;struct net_device *netdev = adapter->netdev; -int flags =0 ;int err =0 ; - adapter->have_msi = true; - err =pci_enable_msi (pdev); -if (err) { -netdev_dbg (netdev, -"Unable to allocate MSI interrupt Error: %d\n" , err); - adapter->have_msi = false; - } - -if (!adapter->have_msi) - flags |=IRQF_SHARED ; - err =request_irq (pdev->irq, atl1e_intr, flags, netdev->name, netdev); + err =request_irq (pdev->irq, atl1e_intr,IRQF_SHARED , netdev->name, + netdev);if (err) {netdev_dbg (adapter->netdev,"Unable to allocate interrupt Error: %d\n" , err); -if (adapter->have_msi) -pci_disable_msi (pdev);return err; }netdev_dbg (netdev,"atl1e_request_irq OK\n" );
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +1 -0
@@ -2323,6 +2323,7 @@ load_error2: bp->port.pmf =0 ; load_error1:bnx2x_napi_disable (bp); +bnx2x_del_all_napi (bp);/* clear pf_load status, as it was already set */ bnx2x_clear_pf_load (bp); load_error0:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.h +2 -1
@@ -453,8 +453,9 @@ struct bnx2x_fw_port_stats_old {#define UPDATE_QSTAT (s, t) \ do { \ - qstats->t##_hi = qstats_old->t##_hi + le32_to_cpu(s.hi); \ qstats->t##_lo = qstats_old->t##_lo + le32_to_cpu(s.lo); \ + qstats->t##_hi = qstats_old->t##_hi + le32_to_cpu(s.hi) \ + + ((qstats->t##_lo < qstats_old->t##_lo) ? 1 : 0); \ } while (0)#define UPDATE_QSTAT_OLD (f) \
drivers/net/ethernet/broadcom/tg3.c +13 -2
@@ -4055,6 +4055,14 @@ static void tg3_phy_copper_begin(struct tg3 *tp) tp->link_config.active_speed = tp->link_config.speed; tp->link_config.active_duplex = tp->link_config.duplex; +if (GET_ASIC_REV (tp->pci_chip_rev_id) ==ASIC_REV_5714 ) { +/* With autoneg disabled, 5715 only links up when the +* advertisement register has the configured speed +* enabled. +*/ +tg3_writephy (tp,MII_ADVERTISE ,ADVERTISE_ALL ); + } + bmcr =0 ;switch (tp->link_config.speed) {default :
@@ -13859,8 +13867,11 @@ static void __devinit tg3_read_vpd(struct tg3 *tp)if (j + len > block_end) goto partno; -memcpy (tp->fw_ver, &vpd_data[j], len); -strncat (tp->fw_ver," bc " , vpdlen - len -1 ); +if (len >=sizeof (tp->fw_ver)) + len =sizeof (tp->fw_ver) -1 ; +memset (tp->fw_ver,0 ,sizeof (tp->fw_ver)); +snprintf (tp->fw_ver,sizeof (tp->fw_ver),"%.*s bc " , len, + &vpd_data[j]); } partno:
drivers/net/ethernet/davicom/dm9000.c +110 -104
238 lines not on this page · raw message
drivers/net/ethernet/davicom/dm9000.h +10 -1
@@ -69,7 +69,9 @@#define NCR_WAKEEN (1<<6)#define NCR_FCOL (1<<4)#define NCR_FDX (1<<3) -#define NCR_LBK (3<<1) + +#define NCR_RESERVED (3<<1) +#define NCR_MAC_LBK (1<<1)#define NCR_RST (1<<0)#define NSR_SPEED (1<<7)
@@ -167,5 +169,12 @@#define ISR_LNKCHNG (1<<5)#define ISR_UNDERRUN (1<<4) +/* Davicom MII registers. +*/ + +#define MII_DM_DSPCR 0x1b/* DSP Control Register */ + +#define DSPCR_INIT_PARAM 0xE100/* DSP init parameter */ +#endif /* _DM9000X_H_ */
drivers/net/ethernet/marvell/sky2.c +1 -1
@@ -1067,7 +1067,7 @@ static void sky2_ramset(struct sky2_hw *hw, u16 q, u32 start, u32 space)sky2_write32 (hw,RB_ADDR (q,RB_RX_UTHP ), tp);sky2_write32 (hw,RB_ADDR (q,RB_RX_LTHP ), space/2 ); - tp = space -2048 /8 ; + tp = space -8192 /8 ;sky2_write32 (hw,RB_ADDR (q,RB_RX_UTPP ), tp);sky2_write32 (hw,RB_ADDR (q,RB_RX_LTPP ), space/4 ); }else {
drivers/net/ethernet/marvell/sky2.h +1 -1
@@ -2074,7 +2074,7 @@ enum {GM_IS_RX_FF_OR =1 <<1 ,/* Receive FIFO Overrun */ GM_IS_RX_COMPL =1 <<0 ,/* Frame Reception Complete */ -#define GMAC_DEF_MSK GM_IS_TX_FF_UR +#define GMAC_DEF_MSK (GM_IS_TX_FF_UR | GM_IS_RX_FF_OR) };/* GMAC_LINK_CTRL 16 bit GMAC Link Control Reg (YUKON only) */
drivers/net/ethernet/micrel/ks8851.c +1 -1
@@ -547,7 +547,7 @@ static void ks8851_rx_pkts(struct ks8851_net *ks)for (; rxfc !=0 ; rxfc--) { rxh =ks8851_rdreg32 (ks,KS_RXFHSR ); rxstat = rxh &0xffff ; - rxlen = rxh >>16 ; + rxlen = (rxh >>16 ) &0xfff ;netif_dbg (ks, rx_status, ks->netdev,"rx: stat 0x%04x, len 0x%04x\n" , rxstat, rxlen);
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +2 -2
@@ -1777,9 +1777,9 @@ pch_gbe_clean_rx(struct pch_gbe_adapter *adapter, skb->protocol =eth_type_trans (skb, netdev);if (tcp_ip_status &PCH_GBE_RXD_ACC_STAT_TCPIPOK ) - skb->ip_summed =CHECKSUM_NONE ; -else skb->ip_summed =CHECKSUM_UNNECESSARY ; +else + skb->ip_summed =CHECKSUM_NONE ;napi_gro_receive (&adapter->napi, skb); (*work_done)++;
drivers/net/ethernet/sfc/bitfield.h +11 -11
@@ -120,10 +120,10 @@ typedef union efx_oword {* [0,high-low), with garbage in bits [high-low+1,...). */ #define EFX_EXTRACT_NATIVE (native_element, min, max, low, high) \ - (((low > max) || (high < min)) ? 0 : \ - ((low > min) ? \ - ((native_element) >> (low - min)) : \ - ((native_element) << (min - low)))) + ((low) > (max) || (high) < (min) ? 0 : \ + (low) > (min) ? \ + (native_element) >> ((low) - (min)) : \ + (native_element) << ((min) - (low)))/* * Extract bit field portion [low,high) from the 64-bit little-endian
@@ -142,27 +142,27 @@ typedef union efx_oword {#define EFX_EXTRACT_OWORD64 (oword, low, high) \ ((EFX_EXTRACT64((oword).u64[0], 0, 63, low, high) | \ EFX_EXTRACT64((oword).u64[1], 64, 127, low, high)) & \ - EFX_MASK64(high + 1 - low)) + EFX_MASK64((high) + 1 - (low)))#define EFX_EXTRACT_QWORD64 (qword, low, high) \ (EFX_EXTRACT64((qword).u64[0], 0, 63, low, high) & \ - EFX_MASK64(high + 1 - low)) + EFX_MASK64((high) + 1 - (low)))#define EFX_EXTRACT_OWORD32 (oword, low, high) \ ((EFX_EXTRACT32((oword).u32[0], 0, 31, low, high) | \ EFX_EXTRACT32((oword).u32[1], 32, 63, low, high) | \ EFX_EXTRACT32((oword).u32[2], 64, 95, low, high) | \ EFX_EXTRACT32((oword).u32[3], 96, 127, low, high)) & \ - EFX_MASK32(high + 1 - low)) + EFX_MASK32((high) + 1 - (low)))#define EFX_EXTRACT_QWORD32 (qword, low, high) \ ((EFX_EXTRACT32((qword).u32[0], 0, 31, low, high) | \ EFX_EXTRACT32((qword).u32[1], 32, 63, low, high)) & \ - EFX_MASK32(high + 1 - low)) + EFX_MASK32((high) + 1 - (low)))#define EFX_EXTRACT_DWORD (dword, low, high) \ (EFX_EXTRACT32((dword).u32[0], 0, 31, low, high) & \ - EFX_MASK32(high + 1 - low)) + EFX_MASK32((high) + 1 - (low)))#define EFX_OWORD_FIELD64 (oword, field) \ EFX_EXTRACT_OWORD64(oword, EFX_LOW_BIT(field), \
@@ -442,10 +442,10 @@ typedef union efx_oword { cpu_to_le32(EFX_INSERT_NATIVE(min, max, low, high, value))#define EFX_INPLACE_MASK64 (min, max, low, high) \ - EFX_INSERT64(min, max, low, high, EFX_MASK64(high + 1 - low)) + EFX_INSERT64(min, max, low, high, EFX_MASK64((high) + 1 - (low)))#define EFX_INPLACE_MASK32 (min, max, low, high) \ - EFX_INSERT32(min, max, low, high, EFX_MASK32(high + 1 - low)) + EFX_INSERT32(min, max, low, high, EFX_MASK32((high) + 1 - (low)))#define EFX_SET_OWORD64 (oword, low, high, value) do { \ (oword).u64[0] = (((oword).u64[0] \
drivers/net/ethernet/sfc/efx.c +14 -6
@@ -754,6 +754,7 @@ efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries) tx_queue->txd.entries); } +efx_device_detach_sync (efx);efx_stop_all (efx);efx_stop_interrupts (efx, true);
@@ -807,6 +808,7 @@ out:efx_start_interrupts (efx, true);efx_start_all (efx); +netif_device_attach (efx->net_dev);return rc; rollback:
@@ -1601,8 +1603,12 @@ static void efx_stop_all(struct efx_nic *efx)/* Flush efx_mac_work(), refill_workqueue, monitor_work */ efx_flush_all (efx); -/* Stop the kernel transmit interface late, so the watchdog -* timer isn't ticking over the flush */ +/* Stop the kernel transmit interface. This is only valid if +* the device is stopped or detached; otherwise the watchdog +* may fire immediately. +*/ +WARN_ON (netif_running (efx->net_dev) && +netif_device_present (efx->net_dev));netif_tx_disable (efx->net_dev);efx_stop_datapath (efx);
@@ -1921,10 +1927,11 @@ static int efx_change_mtu(struct net_device *net_dev, int new_mtu)if (new_mtu >EFX_MAX_MTU )return -EINVAL ; -efx_stop_all (efx); -netif_dbg (efx, drv, efx->net_dev,"changing MTU to %d\n" , new_mtu); +efx_device_detach_sync (efx); +efx_stop_all (efx); +mutex_lock (&efx->mac_lock);/* Reconfigure the MAC before enabling the dma queues so that * the RX buffers don't overflow */
@@ -1933,6 +1940,7 @@ static int efx_change_mtu(struct net_device *net_dev, int new_mtu)mutex_unlock (&efx->mac_lock);efx_start_all (efx); +netif_device_attach (efx->net_dev);return 0 ; }
@@ -2224,7 +2232,7 @@ int efx_reset(struct efx_nic *efx, enum reset_type method)netif_info (efx, drv, efx->net_dev,"resetting (%s)\n" ,RESET_TYPE (method)); -netif_device_detach (efx->net_dev); +efx_device_detach_sync (efx);efx_reset_down (efx, method); rc = efx->type->reset (efx, method);
@@ -2719,7 +2727,7 @@ static int efx_pm_freeze(struct device *dev) efx->state =STATE_FINI ; -netif_device_detach (efx->net_dev); +efx_device_detach_sync (efx);efx_stop_all (efx);efx_stop_interrupts (efx, false);
drivers/net/ethernet/sfc/efx.h +13 -0
@@ -162,4 +162,17 @@ extern void efx_link_status_changed(struct efx_nic *efx);extern void efx_link_set_advertising (struct efx_nic *efx,u32 );extern void efx_link_set_wanted_fc (struct efx_nic *efx,u8 ); +static inline void efx_device_detach_sync (struct efx_nic *efx) +{ +struct net_device *dev = efx->net_dev; + +/* Lock/freeze all TX queues so that we can be sure the +* TX scheduler is stopped when we're done and before +* netif_device_present() becomes false. +*/ +netif_tx_lock_bh (dev); +netif_device_detach (dev); +netif_tx_unlock_bh (dev); +} +#endif /* EFX_EFX_H */
drivers/net/ethernet/sfc/falcon.c +2 -0
@@ -1792,6 +1792,7 @@ const struct efx_nic_type falcon_a1_nic_type = { .remove_port = falcon_remove_port, .handle_global_event = falcon_handle_global_event, .prepare_flush = falcon_prepare_flush, + .finish_flush = efx_port_dummy_op_void, .update_stats = falcon_update_nic_stats, .start_stats = falcon_start_nic_stats, .stop_stats = falcon_stop_nic_stats,
@@ -1834,6 +1835,7 @@ const struct efx_nic_type falcon_b0_nic_type = { .remove_port = falcon_remove_port, .handle_global_event = falcon_handle_global_event, .prepare_flush = falcon_prepare_flush, + .finish_flush = efx_port_dummy_op_void, .update_stats = falcon_update_nic_stats, .start_stats = falcon_start_nic_stats, .stop_stats = falcon_stop_nic_stats,
drivers/net/ethernet/sfc/mcdi.c +20 -13
@@ -22,7 +22,7 @@************************************************************************** */ -#define MCDI_RPC_TIMEOUT 10/*seconds */ +#define MCDI_RPC_TIMEOUT (10 * HZ)#define MCDI_PDU (efx) \ (efx_port_num(efx) ? MC_SMEM_P1_PDU_OFST : MC_SMEM_P0_PDU_OFST)
@@ -120,7 +120,7 @@ static void efx_mcdi_copyout(struct efx_nic *efx, u8 *outbuf, size_t outlen)static int efx_mcdi_poll (struct efx_nic *efx) {struct efx_mcdi_iface *mcdi =efx_mcdi (efx); -unsigned int time, finish; +unsigned long time, finish;unsigned int respseq, respcmd, error;unsigned int pdu =FR_CZ_MC_TREG_SMEM +MCDI_PDU (efx);unsigned int rc, spins;
@@ -136,7 +136,7 @@ static int efx_mcdi_poll(struct efx_nic *efx)* and poll once a jiffy (approximately) */ spins =TICK_USEC ; - finish =get_seconds () +MCDI_RPC_TIMEOUT ; + finish = jiffies +MCDI_RPC_TIMEOUT ;while (1 ) {if (spins !=0 ) {
@@ -146,7 +146,7 @@ static int efx_mcdi_poll(struct efx_nic *efx)schedule_timeout_uninterruptible (1 ); } - time =get_seconds (); + time = jiffies;rmb ();efx_readd (efx, ®, pdu);
@@ -158,7 +158,7 @@ static int efx_mcdi_poll(struct efx_nic *efx) EFX_DWORD_FIELD(reg, MCDI_HEADER_RESPONSE)) break; -if (time >= finish) +if (time_after (time, finish))return -ETIMEDOUT ; }
@@ -250,7 +250,7 @@ static int efx_mcdi_await_completion(struct efx_nic *efx)if (wait_event_timeout ( mcdi->wq,atomic_read (&mcdi->state) ==MCDI_STATE_COMPLETED , -msecs_to_jiffies (MCDI_RPC_TIMEOUT *1000 )) ==0 ) +MCDI_RPC_TIMEOUT ) ==0 )return -ETIMEDOUT ;/* Check if efx_mcdi_set_mode() switched us back to polled completions.
@@ -641,9 +641,8 @@ int efx_mcdi_get_board_cfg(struct efx_nic *efx, u8 *mac_address, u16 *fw_subtype_list, u32 *capabilities) {uint8_t outbuf[MC_CMD_GET_BOARD_CFG_OUT_LENMIN ]; -size_t outlen; +size_t outlen, offset, i;int port_num =efx_port_num (efx); -int offset;int rc;BUILD_BUG_ON (MC_CMD_GET_BOARD_CFG_IN_LEN !=0 );
@@ -663,11 +662,16 @@ int efx_mcdi_get_board_cfg(struct efx_nic *efx, u8 *mac_address, : MC_CMD_GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT0_OFST;if (mac_address)memcpy (mac_address, outbuf + offset,ETH_ALEN ); -if (fw_subtype_list) -memcpy (fw_subtype_list, - outbuf +MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST , -MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MINNUM * -sizeof (fw_subtype_list[0 ])); +if (fw_subtype_list) { + offset =MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST ; +for (i =0 ; + i <MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MINNUM ; + i++) { + fw_subtype_list[i] = +le16_to_cpup ((__le16 *)(outbuf + offset)); + offset +=2 ; + } + }if (capabilities) {if (port_num) *capabilities = MCDI_DWORD(outbuf,
@@ -1169,6 +1173,9 @@ int efx_mcdi_flush_rxqs(struct efx_nic *efx)__le32 *qid;int rc, count; +BUILD_BUG_ON (EFX_MAX_CHANNELS > +MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_MAXNUM ); + qid =kmalloc (EFX_MAX_CHANNELS *sizeof (*qid),GFP_KERNEL );if (qid ==NULL )return -ENOMEM ;
drivers/net/ethernet/sfc/mcdi.h +4 -2
@@ -107,11 +107,13 @@ extern void efx_mcdi_sensor_event(struct efx_nic *efx, efx_qword_t *ev);#define MCDI_EVENT_FIELD (_ev, _field) \ EFX_QWORD_FIELD(_ev, MCDI_EVENT_ ## _field)#define MCDI_ARRAY_FIELD (_buf, _field1, _type, _index, _field2) \ - EFX_DWORD_FIELD( \ + EFX_EXTRACT_DWORD( \ *((efx_dword_t *) \ (MCDI_ARRAY_PTR(_buf, _field1, _type, _index) + \ (MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _OFST & ~3))), \ - MC_CMD_ ## _type ## _TYPEDEF_ ## _field2) + MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _LBN & 0x1f, \ + (MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _LBN & 0x1f) + \ + MC_CMD_ ## _type ## _TYPEDEF_ ## _field2 ## _WIDTH - 1)extern void efx_mcdi_print_fwver (struct efx_nic *efx,char *buf,size_t len); extern int efx_mcdi_drv_attach(struct efx_nic *efx, bool driver_operating,
drivers/net/ethernet/sfc/net_driver.h +6 -1
@@ -196,6 +196,7 @@ struct efx_tx_queue {/* Members shared between paths and sometimes updated */ unsigned int empty_read_count____cacheline_aligned_in_smp ;#define EFX_EMPTY_COUNT_VALID 0x80000000 +atomic_t flush_outstanding; };/**
@@ -205,6 +206,7 @@ struct efx_tx_queue {* Will be %NULL if the buffer slot is currently free. * @page: The associated page buffer. Valif iff @flags & %EFX_RX_BUF_PAGE. * Will be %NULL if the buffer slot is currently free. +* @page_offset: Offset within page. Valid iff @flags & %EFX_RX_BUF_PAGE. * @len: Buffer length, in bytes. * @flags: Flags for buffer and packet state. */
@@ -214,7 +216,8 @@ struct efx_rx_buffer {struct sk_buff *skb;struct page *page; } u; -unsigned int len; +u16 page_offset; +u16 len;u16 flags; };#define EFX_RX_BUF_PAGE 0x0001
@@ -891,6 +894,7 @@ static inline unsigned int efx_port_num(struct efx_nic *efx)* @remove_port: Free resources allocated by probe_port() * @handle_global_event: Handle a "global" event (may be %NULL) * @prepare_flush: Prepare the hardware for flushing the DMA queues +* @finish_flush: Clean up after flushing the DMA queues * @update_stats: Update statistics not provided by event handling * @start_stats: Start the regular fetching of statistics * @stop_stats: Stop the regular fetching of statistics
@@ -938,6 +942,7 @@ struct efx_nic_type {void (*remove_port)(struct efx_nic *efx);bool (*handle_global_event)(struct efx_channel *channel,efx_qword_t *);void (*prepare_flush)(struct efx_nic *efx); +void (*finish_flush)(struct efx_nic *efx);void (*update_stats)(struct efx_nic *efx);void (*start_stats)(struct efx_nic *efx);void (*stop_stats)(struct efx_nic *efx);
drivers/net/ethernet/sfc/nic.c +55 -7
110 lines not on this page · raw message
drivers/net/ethernet/sfc/nic.h +2 -0
@@ -334,6 +334,8 @@ static inline int efx_nic_irq_test_irq_cpu(struct efx_nic *efx)/* Global Resources */ extern int efx_nic_flush_queues (struct efx_nic *efx); +extern void siena_prepare_flush (struct efx_nic *efx); +extern void siena_finish_flush (struct efx_nic *efx);extern void falcon_start_nic_stats (struct efx_nic *efx);extern void falcon_stop_nic_stats (struct efx_nic *efx);extern void falcon_setup_xaui (struct efx_nic *efx);
drivers/net/ethernet/sfc/rx.c +15 -10
@@ -90,11 +90,7 @@ static unsigned int rx_refill_threshold;static inline unsigned int efx_rx_buf_offset (struct efx_nic *efx,struct efx_rx_buffer *buf) { -/* Offset is always within one page, so we don't need to consider -* the page order. -*/ -return ((unsigned int ) buf->dma_addr & (PAGE_SIZE -1 )) + - efx->type->rx_buffer_hash_size; +return buf->page_offset + efx->type->rx_buffer_hash_size; }static inline unsigned int efx_rx_buf_size (struct efx_nic *efx) {
@@ -187,6 +183,7 @@ static int efx_init_rx_buffers_page(struct efx_rx_queue *rx_queue)struct efx_nic *efx = rx_queue->efx;struct efx_rx_buffer *rx_buf;struct page *page; +unsigned int page_offset;void *page_addr;struct efx_rx_page_state *state;dma_addr_t dma_addr;
@@ -214,12 +211,14 @@ static int efx_init_rx_buffers_page(struct efx_rx_queue *rx_queue) page_addr +=sizeof (struct efx_rx_page_state ); dma_addr +=sizeof (struct efx_rx_page_state ); + page_offset =sizeof (struct efx_rx_page_state ); split: index = rx_queue->added_count & rx_queue->ptr_mask; rx_buf =efx_rx_buffer (rx_queue, index); rx_buf->dma_addr = dma_addr +EFX_PAGE_IP_ALIGN ; rx_buf->u.page = page; + rx_buf->page_offset = page_offset +EFX_PAGE_IP_ALIGN ; rx_buf->len = efx->rx_buffer_len -EFX_PAGE_IP_ALIGN ; rx_buf->flags =EFX_RX_BUF_PAGE ; ++rx_queue->added_count;
@@ -230,6 +229,7 @@ static int efx_init_rx_buffers_page(struct efx_rx_queue *rx_queue)/* Use the second half of the page */ get_page (page); dma_addr += (PAGE_SIZE >>1 ); + page_offset += (PAGE_SIZE >>1 ); page_addr += (PAGE_SIZE >>1 ); ++count; goto split;
@@ -240,7 +240,8 @@ static int efx_init_rx_buffers_page(struct efx_rx_queue *rx_queue) }static void efx_unmap_rx_buffer (struct efx_nic *efx, -struct efx_rx_buffer *rx_buf) +struct efx_rx_buffer *rx_buf, +unsigned int used_len) {if ((rx_buf->flags &EFX_RX_BUF_PAGE ) && rx_buf->u.page) {struct efx_rx_page_state *state;
@@ -251,6 +252,10 @@ static void efx_unmap_rx_buffer(struct efx_nic *efx, state->dma_addr,efx_rx_buf_size (efx), DMA_FROM_DEVICE); + }else if (used_len) { +dma_sync_single_for_cpu (&efx->pci_dev->dev, + rx_buf->dma_addr, used_len, +DMA_FROM_DEVICE ); } }else if (!(rx_buf->flags &EFX_RX_BUF_PAGE ) && rx_buf->u.skb) { dma_unmap_single(&efx->pci_dev->dev, rx_buf->dma_addr,
@@ -273,7 +278,7 @@ static void efx_free_rx_buffer(struct efx_nic *efx,static void efx_fini_rx_buffer (struct efx_rx_queue *rx_queue,struct efx_rx_buffer *rx_buf) { -efx_unmap_rx_buffer (rx_queue->efx, rx_buf); +efx_unmap_rx_buffer (rx_queue->efx, rx_buf,0 );efx_free_rx_buffer (rx_queue->efx, rx_buf); }
@@ -539,10 +544,10 @@ void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index, goto out; } -/* Release card resources - assumes all RX buffers consumed in-order -* per RX queue +/* Release and/or sync DMA mapping - assumes all RX buffers +* consumed in-order per RX queue */ -efx_unmap_rx_buffer (efx, rx_buf); +efx_unmap_rx_buffer (efx, rx_buf, len);/* Prefetch nice and early so data will (hopefully) be in cache by * the time we look at it.
drivers/net/ethernet/sfc/selftest.c +1 -1
@@ -721,7 +721,7 @@ int efx_selftest(struct efx_nic *efx, struct efx_self_tests *tests,/* Detach the device so the kernel doesn't transmit during the * loopback test and the watchdog timeout doesn't fire. */ -netif_device_detach (efx->net_dev); +efx_device_detach_sync (efx);if (efx->type->test_chip) { rc_reset = efx->type->test_chip (efx, tests);
drivers/net/ethernet/sfc/siena.c +15 -2
@@ -127,6 +127,18 @@ static void siena_remove_port(struct efx_nic *efx)efx_nic_free_buffer (efx, &efx->stats_buffer); } +void siena_prepare_flush (struct efx_nic *efx) +{ +if (efx->fc_disable++ ==0 ) +efx_mcdi_set_mac (efx); +} + +void siena_finish_flush (struct efx_nic *efx) +{ +if (--efx->fc_disable ==0 ) +efx_mcdi_set_mac (efx); +} +static const struct efx_nic_register_test siena_register_tests[] = { {FR_AZ_ADR_REGION ,EFX_OWORD32 (0x0003FFFF ,0x0003FFFF ,0x0003FFFF ,0x0003FFFF ) },
@@ -158,7 +170,7 @@ static const struct efx_nic_register_test siena_register_tests[] = {static int siena_test_chip (struct efx_nic *efx,struct efx_self_tests *tests) { -enum reset_type reset_method = reset_method; +enum reset_type reset_method =RESET_TYPE_ALL ;int rc, rc2;efx_reset_down (efx, reset_method);
@@ -658,7 +670,8 @@ const struct efx_nic_type siena_a0_nic_type = { .reset = siena_reset_hw, .probe_port = siena_probe_port, .remove_port = siena_remove_port, - .prepare_flush = efx_port_dummy_op_void, + .prepare_flush = siena_prepare_flush, + .finish_flush = siena_finish_flush, .update_stats = siena_update_nic_stats, .start_stats = siena_start_nic_stats, .stop_stats = siena_stop_nic_stats,
drivers/net/ethernet/sfc/siena_sriov.c +9 -4
@@ -21,6 +21,9 @@/* Number of longs required to track all the VIs in a VF */ #define VI_MASK_LENGTH BITS_TO_LONGS(1 << EFX_VI_SCALE_MAX) +/* Maximum number of RX queues supported */ +#define VF_MAX_RX_QUEUES 63 +/** * enum efx_vf_tx_filter_mode - TX MAC filtering behaviour * @VF_TX_FILTER_OFF: Disabled
@@ -578,6 +581,7 @@ static int efx_vfdi_init_rxq(struct efx_vf *vf)efx_oword_t reg;if (bad_vf_index (efx, vf_evq) ||bad_vf_index (efx, vf_rxq) || + vf_rxq >=VF_MAX_RX_QUEUES ||bad_buf_count (buf_count,EFX_MAX_DMAQ_SIZE )) {if (net_ratelimit ()) netif_err(efx, hw, efx->net_dev,
@@ -683,13 +687,15 @@ static int efx_vfdi_fini_all_queues(struct efx_vf *vf)__le32 *rxqs;int rc; +BUILD_BUG_ON (VF_MAX_RX_QUEUES > +MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_MAXNUM ); + rxqs =kmalloc (count *sizeof (*rxqs),GFP_KERNEL );if (rxqs ==NULL )return VFDI_RC_ENOMEM ;rtnl_lock (); -if (efx->fc_disable++ ==0 ) -efx_mcdi_set_mac (efx); +siena_prepare_flush (efx);rtnl_unlock ();/* Flush all the initialized queues */
@@ -726,8 +732,7 @@ static int efx_vfdi_fini_all_queues(struct efx_vf *vf) }rtnl_lock (); -if (--efx->fc_disable ==0 ) -efx_mcdi_set_mac (efx); +siena_finish_flush (efx);rtnl_unlock ();/* Irrespective of success/failure, fini the queues */
drivers/net/ethernet/ti/cpsw.c +1 -1
@@ -250,7 +250,7 @@ void cpsw_tx_handler(void *token, int len, int status)struct cpsw_priv *priv =netdev_priv (ndev);if (unlikely (netif_queue_stopped (ndev))) -netif_start_queue (ndev); +netif_wake_queue (ndev); priv->stats.tx_packets++; priv->stats.tx_bytes += len;dev_kfree_skb_any (skb);
drivers/net/ethernet/ti/davinci_emac.c +1 -1
@@ -1055,7 +1055,7 @@ static void emac_tx_handler(void *token, int len, int status)atomic_dec (&priv->cur_tx);if (unlikely (netif_queue_stopped (ndev))) -netif_start_queue (ndev); +netif_wake_queue (ndev); ndev->stats.tx_packets++; ndev->stats.tx_bytes += len;dev_kfree_skb_any (skb);
drivers/net/netconsole.c +9 -6
@@ -626,6 +626,7 @@ static int netconsole_netdev_event(struct notifier_block *this, goto done;spin_lock_irqsave (&target_list_lock, flags); +restart:list_for_each_entry (nt, &target_list, list) {netconsole_target_get (nt);if (nt->np.dev == dev) {
@@ -638,15 +639,17 @@ static int netconsole_netdev_event(struct notifier_block *this,case NETDEV_UNREGISTER :/* * rtnl_lock already held +* we might sleep in __netpoll_cleanup() */ -if (nt->np.dev) { -__netpoll_cleanup (&nt->np); -dev_put (nt->np.dev); - nt->np.dev =NULL ; - } +spin_unlock_irqrestore (&target_list_lock, flags); +__netpoll_cleanup (&nt->np); +spin_lock_irqsave (&target_list_lock, flags); +dev_put (nt->np.dev); + nt->np.dev =NULL ; nt->enabled =0 ; stopped = true; -break ; +netconsole_target_put (nt); + goto restart; } }netconsole_target_put (nt);
drivers/net/ppp/ppp_generic.c +0 -8
@@ -1021,15 +1021,7 @@ ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)return err; } -static struct lock_class_key ppp_tx_busylock; -static int ppp_dev_init (struct net_device *dev) -{ - dev->qdisc_tx_busylock = &ppp_tx_busylock; -return 0 ; -} -static const struct net_device_ops ppp_netdev_ops = { - .ndo_init = ppp_dev_init, .ndo_start_xmit = ppp_start_xmit, .ndo_do_ioctl = ppp_net_ioctl, };
drivers/net/usb/smsc75xx.c +8 -4
@@ -724,8 +724,12 @@ static int smsc75xx_set_rx_max_frame_length(struct usbnet *dev, int size)static int smsc75xx_change_mtu (struct net_device *netdev,int new_mtu) {struct usbnet *dev =netdev_priv (netdev); +int ret; + +if (new_mtu >MAX_SINGLE_PACKET_SIZE ) +return -EINVAL ; -int ret =smsc75xx_set_rx_max_frame_length (dev, new_mtu); + ret =smsc75xx_set_rx_max_frame_length (dev, new_mtu +ETH_HLEN );check_warn_return (ret,"Failed to set mac rx frame length" );return usbnet_change_mtu (netdev, new_mtu);
@@ -983,7 +987,7 @@ static int smsc75xx_reset(struct usbnet *dev)netif_dbg (dev, ifup, dev->net,"FCT_TX_CTL set to 0x%08x" , buf); - ret =smsc75xx_set_rx_max_frame_length (dev,1514 ); + ret =smsc75xx_set_rx_max_frame_length (dev, dev->net->mtu +ETH_HLEN );check_warn_return (ret,"Failed to set max rx frame length" ); ret =smsc75xx_read_reg (dev,MAC_RX , &buf);
@@ -1127,8 +1131,8 @@ static int smsc75xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb)else if (rx_cmd_a & (RX_CMD_A_LONG |RX_CMD_A_RUNT )) dev->net->stats.rx_frame_errors++; }else { -/* ETH_FRAME_LEN + 4(CRC) + 2(COE) + 4(Vlan) */ -if (unlikely (size > (ETH_FRAME_LEN +12 ))) { +/* MAX_SINGLE_PACKET_SIZE + 4(CRC) + 2(COE) + 4(Vlan) */ +if (unlikely (size > (MAX_SINGLE_PACKET_SIZE +ETH_HLEN +12 ))) {netif_dbg (dev, rx_err, dev->net,"size err rx_cmd_a=0x%08x" , rx_cmd_a);return 0 ;
drivers/net/wireless/ath/ath9k/link.c +15 -14
@@ -31,21 +31,21 @@ void ath_tx_complete_poll_work(struct work_struct *work) sc->tx_complete_poll_work_seen++;#endif -for (i =0 ; i <ATH9K_NUM_TX_QUEUES ; i++) -if (ATH_TXQ_SETUP (sc, i)) { - txq = &sc->tx.txq[i]; -ath_txq_lock (sc, txq); -if (txq->axq_depth) { -if (txq->axq_tx_inprogress) { - needreset = true; -ath_txq_unlock (sc, txq); -break ; - }else { - txq->axq_tx_inprogress = true; - } +for (i =0 ; i <IEEE80211_NUM_ACS ; i++) { + txq = sc->tx.txq_map[i]; + +ath_txq_lock (sc, txq); +if (txq->axq_depth) { +if (txq->axq_tx_inprogress) { + needreset = true; +ath_txq_unlock (sc, txq); +break ; + }else { + txq->axq_tx_inprogress = true; } -ath_txq_unlock_complete (sc, txq); } +ath_txq_unlock_complete (sc, txq); + }if (needreset) { ath_dbg(ath9k_hw_common(sc->sc_ah), RESET,
@@ -173,7 +173,8 @@ void ath_rx_poll(unsigned long data) {struct ath_softc *sc = (struct ath_softc *)data; -ieee80211_queue_work (sc->hw, &sc->hw_check_work); +if (!test_bit (SC_OP_INVALID , &sc->sc_flags)) +ieee80211_queue_work (sc->hw, &sc->hw_check_work); }/*
drivers/net/wireless/b43/dma.c +53 -12
114 lines not on this page · raw message
drivers/net/wireless/b43/phy_n.c +4 -4
@@ -1320,7 +1320,7 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev)u16 clip_off[2 ] = {0xFFFF ,0xFFFF };u8 vcm_final =0 ; -s8 offset[4 ]; +s32 offset[4 ];s32 results[8 ][4 ] = { };s32 results_min[4 ] = { };s32 poll_results[4 ] = { };
@@ -1371,7 +1371,7 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev) }for (i =0 ; i <4 ; i +=2 ) {s32 curr; -s32 mind =40 ; +s32 mind =0x100000 ;s32 minpoll =249 ;u8 minvcm =0 ;if (2 * core != i)
@@ -1488,7 +1488,7 @@ static void b43_nphy_rev2_rssi_cal(struct b43_wldev *dev, u8 type)u8 regs_save_radio[2 ];u16 regs_save_phy[2 ]; -s8 offset[4 ]; +s32 offset[4 ];u8 core;u8 rail;
@@ -1555,7 +1555,7 @@ static void b43_nphy_rev2_rssi_cal(struct b43_wldev *dev, u8 type) }for (i =0 ; i <4 ; i++) { -s32 mind =40 ; +s32 mind =0x100000 ;u8 minvcm =0 ;s32 minpoll =249 ;s32 curr;
drivers/net/wireless/iwlwifi/dvm/lib.c +9 -0
@@ -1263,6 +1263,15 @@ int iwl_dvm_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) }/* +* This can happen upon FW ASSERT: we clear the STATUS_FW_ERROR flag +* in iwl_down but cancel the workers only later. +*/ +if (!priv->ucode_loaded) { +IWL_ERR (priv,"Fw not loaded - dropping CMD: %x\n" , cmd->id); +return -EIO ; + } + +/* * Synchronous commands from this op-mode must hold * the mutex, this ensures we don't try to send two * (or more) synchronous commands at a time.
drivers/net/wireless/iwlwifi/dvm/ucode.c +2 -2
@@ -450,6 +450,8 @@ int iwl_load_ucode_wait_alive(struct iwl_priv *priv,return -EIO ; } + priv->ucode_loaded = true; +/* * This step takes a long time (60-80ms!!) and * WoWLAN image should be loaded quickly, so
@@ -474,8 +476,6 @@ int iwl_load_ucode_wait_alive(struct iwl_priv *priv,return ret; } - priv->ucode_loaded = true; -return 0 ; }
drivers/net/wireless/mwifiex/join.c +3 -4
@@ -1093,10 +1093,9 @@ mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private *priv, adhoc_join->bss_descriptor.bssid, adhoc_join->bss_descriptor.ssid); -for (i =0 ; bss_desc->supported_rates[i] && - i <MWIFIEX_SUPPORTED_RATES ; - i++) - ; +for (i =0 ; i <MWIFIEX_SUPPORTED_RATES && + bss_desc->supported_rates[i]; i++) + ; rates_size = i;/* Copy Data Rates from the Rates recorded in scan response */
drivers/net/wireless/rtlwifi/rtl8192cu/hw.c +35 -54
117 lines not on this page · raw message
drivers/net/wireless/rtlwifi/usb.c +1 -0
@@ -842,6 +842,7 @@ static void _rtl_usb_transmit(struct ieee80211_hw *hw, struct sk_buff *skb,if (unlikely (!_urb)) {RT_TRACE (rtlpriv,COMP_ERR ,DBG_EMERG ,"Can't allocate urb. Drop skb!\n" ); +kfree_skb (skb);return ; } urb_list = &rtlusb->tx_pending[ep_num];
drivers/staging/comedi/drivers/s626.c +1 -1
@@ -1509,7 +1509,7 @@ static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)case TRIG_NONE :/* continous acquisition */ devpriv->ai_continous =1 ; - devpriv->ai_sample_count =0 ; + devpriv->ai_sample_count =1 ;break ; }
drivers/target/iscsi/iscsi_target_auth.c +4 -1
@@ -166,6 +166,7 @@ static int chap_server_compute_md5( {char *endptr;unsigned long id; +unsigned char id_as_uchar;unsigned char digest[MD5_SIGNATURE_SIZE ];unsigned char type, response[MD5_SIGNATURE_SIZE *2 +2 ];unsigned char identifier[10 ], *challenge =NULL ;
@@ -355,7 +356,9 @@ static int chap_server_compute_md5( goto out; } -sg_init_one (&sg, &id,1 ); +/* To handle both endiannesses */ + id_as_uchar = id; +sg_init_one (&sg, &id_as_uchar,1 ); ret =crypto_hash_update (&desc, &sg,1 );if (ret <0 ) {pr_err ("crypto_hash_update() failed for id\n" );
drivers/target/target_core_file.h +1 -1
@@ -7,7 +7,7 @@#define FD_DEVICE_QUEUE_DEPTH 32#define FD_MAX_DEVICE_QUEUE_DEPTH 128#define FD_BLOCKSIZE 512 -#define FD_MAX_SECTORS 1024 +#define FD_MAX_SECTORS 2048#define RRF_EMULATE_CDB 0x01#define RRF_GOT_LBA 0x02
drivers/tty/serial/atmel_serial.c +5 -6
@@ -159,7 +159,7 @@ struct atmel_uart_port { };static struct atmel_uart_port atmel_ports[ATMEL_MAX_UART ]; -static unsigned long atmel_ports_in_use; +static DECLARE_BITMAP(atmel_ports_in_use, ATMEL_MAX_UART);#ifdef SUPPORT_SYSRQ static struct console atmel_console;
@@ -1785,15 +1785,14 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev)if (ret <0 )/* port id not found in platform data nor device-tree aliases: * auto-enumerate it */ - ret =find_first_zero_bit (&atmel_ports_in_use, -sizeof (atmel_ports_in_use)); + ret =find_first_zero_bit (atmel_ports_in_use,ATMEL_MAX_UART ); -if (ret >ATMEL_MAX_UART ) { +if (ret >=ATMEL_MAX_UART ) { ret = -ENODEV ; goto err; } -if (test_and_set_bit (ret, &atmel_ports_in_use)) { +if (test_and_set_bit (ret, atmel_ports_in_use)) {/* port already in use */ ret = -EBUSY ; goto err;
@@ -1867,7 +1866,7 @@ static int __devexit atmel_serial_remove(struct platform_device *pdev)/* "port" is allocated statically, so we shouldn't free it */ -clear_bit (port->line, &atmel_ports_in_use); +clear_bit (port->line, atmel_ports_in_use);clk_put (atmel_port->clk);
drivers/tty/serial/sunsu.c +9 -12
@@ -968,6 +968,7 @@ static struct uart_ops sunsu_pops = {#define UART_NR 4static struct uart_sunsu_port sunsu_ports[UART_NR ]; +static int nr_inst;/* Number of already registered ports */ #ifdef CONFIG_SERIO
@@ -1337,13 +1338,8 @@ static int __init sunsu_console_setup(struct console *co, char *options)printk ("Console: ttyS%d (SU)\n" , (sunsu_reg.minor -64 ) + co->index); -/* -* Check whether an invalid uart number has been specified, and -* if so, search for the first available port that does have -* console support. -*/ -if (co->index >=UART_NR ) - co->index =0 ; +if (co->index > nr_inst) +return -ENODEV ; port = &sunsu_ports[co->index].port;/*
@@ -1408,7 +1404,6 @@ static enum su_type __devinit su_get_type(struct device_node *dp)static int __devinit su_probe (struct platform_device *op) { -static int inst;struct device_node *dp = op->dev.of_node;struct uart_sunsu_port *up;struct resource *rp;
@@ -1418,16 +1413,16 @@ static int __devinit su_probe(struct platform_device *op) type =su_get_type (dp);if (type ==SU_PORT_PORT ) { -if (inst >=UART_NR ) +if (nr_inst >=UART_NR )return -EINVAL ; - up = &sunsu_ports[inst]; + up = &sunsu_ports[nr_inst]; }else { up =kzalloc (sizeof (*up),GFP_KERNEL );if (!up)return -ENOMEM ; } - up->port.line = inst; + up->port.line = nr_inst;spin_lock_init (&up->port.lock);
@@ -1461,6 +1456,8 @@ static int __devinit su_probe(struct platform_device *op) }dev_set_drvdata (&op->dev, up); + nr_inst++; +return 0 ; }
@@ -1488,7 +1485,7 @@ static int __devinit su_probe(struct platform_device *op)dev_set_drvdata (&op->dev, up); - inst++; + nr_inst++;return 0 ;
drivers/tty/vt/vc_screen.c +4 -2
@@ -93,7 +93,7 @@ vcs_poll_data_free(struct vcs_poll_data *poll)static struct vcs_poll_data *vcs_poll_data_get (struct file *file) { -struct vcs_poll_data *poll = file->private_data; +struct vcs_poll_data *poll = file->private_data, *kill =NULL ;if (poll)return poll;
@@ -122,10 +122,12 @@ vcs_poll_data_get(struct file *file) file->private_data = poll; }else {/* someone else raced ahead of us */ -vcs_poll_data_free (poll); + kill = poll; poll = file->private_data; }spin_unlock (&file->f_lock); +if (kill) +vcs_poll_data_free (kill);return poll; }
drivers/usb/class/cdc-acm.c +2 -1
@@ -601,7 +601,6 @@ static void acm_port_destruct(struct tty_port *port)dev_dbg (&acm->control->dev,"%s\n" , __func__); -tty_unregister_device (acm_tty_driver, acm->minor);acm_release_minor (acm);usb_put_intf (acm->control);kfree (acm->country_codes);
@@ -1418,6 +1417,8 @@ static void acm_disconnect(struct usb_interface *intf)stop_data_traffic (acm); +tty_unregister_device (acm_tty_driver, acm->minor); +usb_free_urb (acm->ctrlurb);for (i =0 ; i <ACM_NW ; i++)usb_free_urb (acm->wb[i].urb);
drivers/usb/core/hcd-pci.c +14 -9
@@ -173,6 +173,7 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)struct hc_driver *driver;struct usb_hcd *hcd;int retval; +int hcd_irq =0 ;if (usb_disabled ())return -ENODEV ;
@@ -187,15 +188,19 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)return -ENODEV ; dev->current_state =PCI_D0 ; -/* The xHCI driver supports MSI and MSI-X, -* so don't fail if the BIOS doesn't provide a legacy IRQ. +/* +* The xHCI driver has its own irq management +* make sure irq setup is not touched for xhci in generic hcd code */ -if (!dev->irq && (driver->flags &HCD_MASK ) !=HCD_USB3 ) { -dev_err (&dev->dev, -"Found HC with no IRQ. Check BIOS/PCI %s setup!\n" , -pci_name (dev)); - retval = -ENODEV ; - goto disable_pci; +if ((driver->flags &HCD_MASK ) !=HCD_USB3 ) { +if (!dev->irq) { +dev_err (&dev->dev, +"Found HC with no IRQ. Check BIOS/PCI %s setup!\n" , +pci_name (dev)); + retval = -ENODEV ; + goto disable_pci; + } + hcd_irq = dev->irq; } hcd =usb_create_hcd (driver, &dev->dev,pci_name (dev));
@@ -245,7 +250,7 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)pci_set_master (dev); - retval =usb_add_hcd (hcd, dev->irq,IRQF_SHARED ); + retval =usb_add_hcd (hcd, hcd_irq,IRQF_SHARED );if (retval !=0 ) goto unmap_registers;set_hs_companion (dev, hcd);
drivers/usb/gadget/g_ffs.c +2 -2
@@ -358,7 +358,7 @@ static int gfs_bind(struct usb_composite_dev *cdev)if (unlikely (ret <0 )) goto error; -for (i = func_num; --i; ) { +for (i = func_num; i--; ) { ret =functionfs_bind (ffs_tab[i].ffs_data, cdev);if (unlikely (ret <0 )) {while (++i < func_num)
@@ -413,7 +413,7 @@ static int gfs_unbind(struct usb_composite_dev *cdev)gether_cleanup (); gfs_ether_setup = false; -for (i = func_num; --i; ) +for (i = func_num; i--; )if (ffs_tab[i].ffs_data)functionfs_unbind (ffs_tab[i].ffs_data);
drivers/usb/gadget/udc-core.c +1 -1
@@ -265,7 +265,7 @@ static void usb_gadget_remove_driver(struct usb_udc *udc) udc->driver->disconnect (udc->gadget);usb_gadget_disconnect (udc->gadget); udc->driver->unbind (udc->gadget); -usb_gadget_udc_stop (udc->gadget, udc->driver); +usb_gadget_udc_stop (udc->gadget,NULL ); }else {usb_gadget_stop (udc->gadget, udc->driver); }
drivers/usb/host/ehci-sched.c +2 -0
@@ -1237,6 +1237,7 @@ itd_urb_transaction (memset (itd,0 ,sizeof *itd); itd->itd_dma = itd_dma; + itd->frame =9999 ;/* an invalid value */ list_add (&itd->itd_list, &sched->td_list); }spin_unlock_irqrestore (&ehci->lock, flags);
@@ -1931,6 +1932,7 @@ sitd_urb_transaction (memset (sitd,0 ,sizeof *sitd); sitd->sitd_dma = sitd_dma; + sitd->frame =9999 ;/* an invalid value */ list_add (&sitd->sitd_list, &iso_sched->td_list); }
drivers/usb/host/ehci-timer.c +1 -1
@@ -304,7 +304,7 @@ static void ehci_iaa_watchdog(struct ehci_hcd *ehci)* (a) SMP races against real IAA firing and retriggering, and * (b) clean HC shutdown, when IAA watchdog was pending. */ -if (ehci->async_iaa) { +if (1 ) {u32 cmd, status;/* If we get here, IAA is *REALLY* late. It's barely
drivers/usb/host/xhci-ring.c +12 -12
@@ -2018,8 +2018,8 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td,if (event_trb != ep_ring->dequeue && event_trb != td->last_trb) td->urb->actual_length = - td->urb->transfer_buffer_length - -TRB_LEN (le32_to_cpu (event->transfer_len)); + td->urb->transfer_buffer_length - +EVENT_TRB_LEN (le32_to_cpu (event->transfer_len));else td->urb->actual_length =0 ;
@@ -2051,7 +2051,7 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td,/* Maybe the event was for the data stage? */ td->urb->actual_length = td->urb->transfer_buffer_length - -TRB_LEN (le32_to_cpu (event->transfer_len)); +EVENT_TRB_LEN (le32_to_cpu (event->transfer_len));xhci_dbg (xhci,"Waiting for status " "stage event\n" );return 0 ;
@@ -2087,7 +2087,7 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td,/* handle completion code */ switch (trb_comp_code) {case COMP_SUCCESS : -if (TRB_LEN (le32_to_cpu (event->transfer_len)) ==0 ) { +if (EVENT_TRB_LEN (le32_to_cpu (event->transfer_len)) ==0 ) { frame->status =0 ;break ; }
@@ -2132,7 +2132,7 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td, len +=TRB_LEN (le32_to_cpu (cur_trb->generic.field[2 ])); } len +=TRB_LEN (le32_to_cpu (cur_trb->generic.field[2 ])) - -TRB_LEN (le32_to_cpu (event->transfer_len)); +EVENT_TRB_LEN (le32_to_cpu (event->transfer_len));if (trb_comp_code !=COMP_STOP_INVAL ) { frame->actual_length = len;
@@ -2190,7 +2190,7 @@ static int process_bulk_intr_td(struct xhci_hcd *xhci, struct xhci_td *td,case COMP_SUCCESS :/* Double check that the HW transferred everything. */ if (event_trb != td->last_trb || -TRB_LEN (le32_to_cpu (event->transfer_len)) !=0 ) { +EVENT_TRB_LEN (le32_to_cpu (event->transfer_len)) !=0 ) {xhci_warn (xhci,"WARN Successful completion " "on short TX\n" );if (td->urb->transfer_flags &URB_SHORT_NOT_OK )
@@ -2218,18 +2218,18 @@ static int process_bulk_intr_td(struct xhci_hcd *xhci, struct xhci_td *td,"%d bytes untransferred\n" , td->urb->ep->desc.bEndpointAddress, td->urb->transfer_buffer_length, - TRB_LEN(le32_to_cpu(event->transfer_len))); + EVENT_TRB_LEN(le32_to_cpu(event->transfer_len)));/* Fast path - was this the last TRB in the TD for this URB? */ if (event_trb == td->last_trb) { -if (TRB_LEN (le32_to_cpu (event->transfer_len)) !=0 ) { +if (EVENT_TRB_LEN (le32_to_cpu (event->transfer_len)) !=0 ) { td->urb->actual_length = td->urb->transfer_buffer_length - -TRB_LEN (le32_to_cpu (event->transfer_len)); +EVENT_TRB_LEN (le32_to_cpu (event->transfer_len));if (td->urb->transfer_buffer_length < td->urb->actual_length) {xhci_warn (xhci,"HC gave bad length " "of %d bytes left\n" , -TRB_LEN (le32_to_cpu (event->transfer_len))); +EVENT_TRB_LEN (le32_to_cpu (event->transfer_len))); td->urb->actual_length =0 ;if (td->urb->transfer_flags &URB_SHORT_NOT_OK ) *status = -EREMOTEIO ;
@@ -2271,7 +2271,7 @@ static int process_bulk_intr_td(struct xhci_hcd *xhci, struct xhci_td *td,if (trb_comp_code !=COMP_STOP_INVAL ) td->urb->actual_length +=TRB_LEN (le32_to_cpu (cur_trb->generic.field[2 ])) - -TRB_LEN (le32_to_cpu (event->transfer_len)); +EVENT_TRB_LEN (le32_to_cpu (event->transfer_len)); }return finish_td (xhci, td, event_trb, event, ep, status, false);
@@ -2357,7 +2357,7 @@ static int handle_tx_event(struct xhci_hcd *xhci,* transfer type */ case COMP_SUCCESS : -if (TRB_LEN (le32_to_cpu (event->transfer_len)) ==0 ) +if (EVENT_TRB_LEN (le32_to_cpu (event->transfer_len)) ==0 )break ;if (xhci->quirks &XHCI_TRUST_TX_LENGTH ) trb_comp_code =COMP_SHORT_TX ;
drivers/usb/host/xhci.c +2 -1
@@ -350,7 +350,7 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd)* generate interrupts. Don't even try to enable MSI. */ if (xhci->quirks &XHCI_BROKEN_MSI ) -return 0 ; + goto legacy_irq;/* unregister the legacy interrupt */ if (hcd->irq)
@@ -371,6 +371,7 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd)return -EINVAL ; } + legacy_irq:/* fall back to legacy interrupt*/ ret =request_irq (pdev->irq, &usb_hcd_irq,IRQF_SHARED , hcd->irq_descr, hcd);
drivers/usb/host/xhci.h +6 -2
@@ -206,8 +206,8 @@ struct xhci_op_regs {/* bits 12:31 are reserved (and should be preserved on writes). */
Lines of this file are not shown. View the raw message.
fs/btrfs/extent-tree.c +42 -7
49 lines not on this page · raw message
fs/cifs/asn1.c +5 -48
53 lines not on this page · raw message
fs/nfs/pnfs.c +45 -9
54 lines not on this page · raw message
kernel/trace/trace.c +47 -14
61 lines not on this page · raw message
net/ipv6/netfilter/nf_conntrack_reasm.c +6 -6
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.