Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from base #12

Merged
merged 2,341 commits into from
Jan 31, 2018
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
2341 commits
Select commit Hold shift + click to select a range
21ead9f
SUNRPC: Micro-optimize __rpc_execute
chucklever Jan 3, 2018
a8e4c0a
arm64: Move BP hardening to check_and_switch_context
Jan 19, 2018
20d5902
block: Set BIO_TRACE_COMPLETION on new bio during split
goldwynr Jan 23, 2018
55b35d0
arm64: Run enable method for errata work arounds on late CPUs
Jan 17, 2018
83b5753
mm/memory_failure: Remove unused trapno from memory_failure
ebiederm Jul 9, 2017
c0f4555
signal/memory-failure: Use force_sig_mceerr and send_sig_mceerr
ebiederm Aug 2, 2017
0be283f
SUNRPC: Fix null rpc_clnt dereference in rpc_task_queued tracepoint
bcodding-rh Jan 23, 2018
62314e4
nvme-pci: Fix queue double allocations
Jan 23, 2018
8f39fce
Merge tag 'nfs-rdma-for-4.16-1' of git://git.linux-nfs.org/projects/a…
trondmy Jan 23, 2018
f3d795d
arm64: Branch predictor hardening for Cavium ThunderX2
jchandra-cavm Jan 19, 2018
0ba2e29
arm64: Turn on KPTI only on CPUs that need it
jchandra-cavm Jan 19, 2018
c5baa1b
irqdomain: Kill CONFIG_IRQ_DOMAIN_DEBUG
Jan 17, 2018
fe6daab
x86/centaur: Mark TSC invariant
Jan 22, 2018
310eb25
mmc: mmci: fix error return code in mmci_probe()
Jan 23, 2018
162f8de
spi: a3700: Remove endianness swapping functions when accessing FIFOs
Jan 24, 2018
34b1fca
spi: a3700: Remove endianness swapping for full-duplex transfers
Jan 24, 2018
6b136a2
blk-mq-debugfs: don't allow write on attributes with seq_operations set
Jan 23, 2018
3124b65
bsg: use pr_debug instead of hand crafted macros
Jan 24, 2018
9d48533
regulator: qcom_spmi: Use regmap helpers for enable/disable/is_enable…
AxelLin Nov 29, 2017
535cb8f
lockd: Fix server refcounting
trondmy Jan 24, 2018
83b7739
cifs: Add smb2_send_recv
Nov 9, 2017
13cacea
cifs: remove rfc1002 header from smb2_negotiate_req
Nov 20, 2017
45305ed
cifs: remove rfc1002 header from smb2_logoff_req
Nov 9, 2017
4eecf4c
cifs: remove rfc1002 header from smb2_tree_disconnect_req
Nov 9, 2017
afcccef
cifs: remove rfc1002 header from smb2_close_req
Nov 9, 2017
9775468
cifs: remove rfc1002 header from smb2_ioctl_req
Nov 9, 2017
7f7ae75
cifs: remove rfc1002 header from smb2_echo_req
Nov 9, 2017
661bb94
cifs: remove rfc1002 header from smb2_tree_connect_req
Nov 9, 2017
88ea5cb
cifs: remove rfc1002 header from smb2_sess_setup_req
Nov 20, 2017
4f33bc3
cifs: remove rfc1002 header from smb2_create_req
Nov 20, 2017
1f444e4
cifs: remove rfc1002 header from smb2_flush_req
Nov 20, 2017
ced9367
cifs: remove rfc1002 header from smb2_lock_req
Nov 20, 2017
f5688a6
cifs: remove rfc1002 header from smb2 read/write requests
Nov 20, 2017
2fc803e
cifs: remove rfc1002 header from smb2_set_info_req
Nov 20, 2017
7c00c3a
cifs: remove rfc1002 header from smb2_query_directory_req
Nov 20, 2017
b2fb7fe
cifs: remove rfc1002 header from smb2_query_info_req
Nov 20, 2017
21ad948
cifs: remove rfc1002 header from smb2_oplock_break we get from server
Nov 20, 2017
5dfe69a
cifs: remove unused variable from SMB2_read
Nov 20, 2017
8eb7998
cifs: remove rfc1002 header from smb2_lease_ack
Nov 21, 2017
305428a
cifs: remove small_smb2_init
Nov 21, 2017
3cecf48
cifs: avoid a kmalloc in smb2_send_recv/SendReceive2 for the common case
Nov 21, 2017
2dabfd5
CIFS: SMBD: Add parameter rdata to smb2_new_read_req
longlimsft Nov 7, 2017
2b6ed88
CIFS: SMBD: Introduce kernel config option CONFIG_CIFS_SMB_DIRECT
longlimsft Nov 7, 2017
8339dd3
CIFS: SMBD: Add rdma mount option
longlimsft Nov 7, 2017
03bee01
CIFS: SMBD: Add SMB Direct protocol initial values and constants
longlimsft Nov 7, 2017
f198186
CIFS: SMBD: Establish SMB Direct connection
longlimsft Nov 5, 2017
399f953
CIFS: SMBD: Implement function to create a SMB Direct connection
longlimsft Nov 18, 2017
d8ec913
CIFS: SMBD: export protocol initial values
longlimsft Nov 7, 2017
f04a703
cifs: Fix missing put_xid in cifs_file_strict_mmap
Dec 15, 2017
0933d6f
cifs: fix build errors for SMB_DIRECT
rddunlap Jan 2, 2018
2f89464
CIFS: SMBD: Upper layer connects to SMBDirect session
longlimsft Nov 23, 2017
ad57b8e
CIFS: SMBD: Implement function to reconnect to a SMB Direct transport
longlimsft Nov 23, 2017
781a805
CIFS: SMBD: Upper layer reconnects to SMB Direct session
longlimsft Nov 23, 2017
8ef130f
CIFS: SMBD: Implement function to destroy a SMB Direct connection
longlimsft Nov 23, 2017
bce9ce7
CIFS: SMBD: Upper layer destroys SMB Direct session on shutdown or um…
longlimsft Nov 23, 2017
09902f8
CIFS: SMBD: Set SMB Direct maximum read or write size for I/O
longlimsft Nov 23, 2017
f64b78f
CIFS: SMBD: Implement function to receive data via RDMA receive
longlimsft Nov 23, 2017
2fef137
CIFS: SMBD: Upper layer receives data via RDMA receive
longlimsft Nov 23, 2017
d649e1b
CIFS: SMBD: Implement function to send data via RDMA send
longlimsft Nov 23, 2017
9762c2d
CIFS: SMBD: Upper layer sends data via RDMA send
longlimsft Nov 23, 2017
c739858
CIFS: SMBD: Implement RDMA memory registration
longlimsft Nov 23, 2017
db223a5
CIFS: SMBD: Upper layer performs SMB write via RDMA read through memo…
longlimsft Nov 23, 2017
74dcf41
CIFS: SMBD: Read correct returned data length for RDMA write (SMB rea…
longlimsft Nov 23, 2017
bd3dcc6
CIFS: SMBD: Upper layer performs SMB read via RDMA write through memo…
longlimsft Nov 23, 2017
08a3b96
CIFS: SMBD: Add SMB Direct debug counters
longlimsft Nov 23, 2017
8801e90
CIFS: SMBD: Disable signing on SMB direct transport
longlimsft Nov 23, 2017
9084432
CIFS: SMBD: _smbd_get_connection() can be static
Dec 18, 2017
9aca7e4
cifs: Fix autonegotiate security settings mismatch
Jan 11, 2018
e36c048
CIFS: SMBD: work around gcc -Wmaybe-uninitialized warning
arndb Jan 10, 2018
37e12f5
cifs: remove redundant duplicated assignment of pointer 'node'
Jan 17, 2018
4c7e95b
mtd: nand: gpmi: Fix subpage reads
Jan 23, 2018
f4c6cd1
mtd: nand: sunxi: Fix ECC strength choice
miquelraynal Jan 24, 2018
617ab45
x86/hyperv: Stop suppressing X86_FEATURE_PCID
vittyvk Jan 24, 2018
782bf20
x86: Remove unused IOMMU_STRESS Kconfig
montjoie Jan 24, 2018
b3ab8ad
perf vendor events intel: Update Broadwell events to V22
Jan 18, 2018
97d00f2
perf vendor events intel: Update BroadwellX events to V13
Jan 18, 2018
03da89c
perf vendor events intel: Update Goldmont events to V12
Jan 18, 2018
ca3a2d0
perf vendor events intel: Update Haswell events to V27
Jan 18, 2018
032c16b
perf vendor events intel: Update HaswellX events to V19
Jan 18, 2018
c955cd2
perf vendor events intel: Update IvyBridge events to V20
Jan 18, 2018
194b6fa
perf vendor events intel: Update IvyTown events to V20
Jan 18, 2018
ffaa6f2
perf vendor events intel: Update Silvermont events to V14
Jan 18, 2018
c93240a
perf vendor events intel: Update Skylake events to V36
Jan 18, 2018
1716021
perf vendor events intel: Update SkylakeX events to V1.06
Jan 18, 2018
fae0a4d
perf vendor events intel: Update BroadwellDE events to V7
Jan 18, 2018
f5b5bdd
perf vendor events intel: Update IvyBridge files to V20
Jan 18, 2018
5b50758
perf vendor events intel: Update IvyTown files to V20
Jan 18, 2018
aa6292f
perf tools: Integrating the CoreSight decoding library
mathieupoirier Jan 17, 2018
440a23b
perf tools: Add initial entry point for decoder CoreSight traces
mathieupoirier Jan 17, 2018
cd8bfd8
perf tools: Add processing of coresight metadata
tor-jeremiassen Jan 17, 2018
68ffe39
perf tools: Add decoder mechanic to support dumping trace data
mathieupoirier Jan 17, 2018
c9a01a1
perf tools: Add support for decoding CoreSight trace data
mathieupoirier Jan 17, 2018
290598b
perf tools: Add functionality to communicate with the openCSD decoder
mathieupoirier Jan 17, 2018
20d9c47
pert tools: Add queue management functionality
mathieupoirier Jan 17, 2018
9f878b2
perf tools: Add full support for CoreSight trace decoding
mathieupoirier Jan 17, 2018
b12235b
perf tools: Add mechanic to synthesise CoreSight trace packets
mathieupoirier Jan 17, 2018
8046bf0
MAINTAINERS: Adding entry for CoreSight trace decoding
tor-jeremiassen Jan 17, 2018
78c4369
perf bpf: Remove misplaced __maybe_unused attribute
acmel Jan 22, 2018
591421e
perf trace: Add --print-sample
acmel Jan 22, 2018
522283f
perf trace: Do not print from time delta for interrupted syscall lines
acmel Jan 22, 2018
3258abe
perf trace beauty futex: Beautify FUTEX_BITSET_MATCH_ANY
acmel Jan 22, 2018
bafae98
perf evlist: Remove fcntl.h from evlist.h
acmel Jan 22, 2018
c19d084
perf trace beauty flock: Move to separate object file
acmel Jan 22, 2018
1a29b5b
KVM: x86: Make indirect calls in emulator speculation safe
Jan 25, 2018
c940a3f
KVM: VMX: Make indirect call speculation safe
Jan 25, 2018
ee9aebb
nvme-pci: Suspend queues after deleting them
Jan 24, 2018
e72685d
ata: sata_mv: Replace mdelay with usleep_range in mv_reset_channel
XidianGeneral Jan 25, 2018
eada859
ata: pata_it821x: Replace mdelay with usleep_range in it821x_firmware…
XidianGeneral Jan 25, 2018
b3506c7
ata: pata_pdc2027x: Replace mdelay with msleep
XidianGeneral Jan 25, 2018
6e49412
nvme: don't free uuid pointer before printing it
Jan 25, 2018
1dad3a6
nvme-rdma: remove redundant boolean for inline_data
Dec 6, 2017
2882d34
f2fs: use GFP_F2FS_ZERO for cleanup
chaseyu Jan 25, 2018
6819b88
f2fs: clean up duplicated assignment in init_discard_policy
chaseyu Jan 25, 2018
3b60d80
f2fs: stop issuing discard if fs is readonly
chaseyu Jan 25, 2018
068c3cd
f2fs: rebuild sit page from sit info in mem
Jan 25, 2018
b396047
pnfs/blocklayout: pnfs_block_dev_map uses bytes, not sectors
bcodding-rh Jan 25, 2018
f34462c
pnfs/blocklayout: Ensure disk address in block device map
bcodding-rh Jan 25, 2018
1c1d35d
f2fs: support inode creation time
chaseyu Jan 25, 2018
ad70062
nvme-pci: introduce RECONNECTING state to mark initializing procedure
Jan 22, 2018
3d030e4
nvme: add tracepoint for nvme_setup_cmd
Jan 26, 2018
ca5554a
nvme: add tracepoint for nvme_complete_rq
Jan 26, 2018
479c03a
spi: orion: Fix a resource leak if the optional "axi" clk is deferred
tititiou36 Jan 25, 2018
caf7501
module/retpoline: Warn about missing retpoline in module
Jan 25, 2018
057c764
regulator: added support for suspend states
Jan 26, 2018
c360a6d
regulator: make regulator voltage be an array to support more states
Jan 26, 2018
72069f9
regulator: leave one item to record whether regulator is enabled
Jan 26, 2018
aa27bbc
regulator: empty the old suspend functions
Jan 26, 2018
f7efad1
regulator: add PM suspend and resume hooks
Jan 26, 2018
993181e
spi: dw: Remove unused members from struct chip_data
jhnikula Jan 26, 2018
95ca0ee
x86/cpufeatures: Add CPUID_7_EDX CPUID leaf
dwmw2 Jan 25, 2018
fc67dd7
x86/cpufeatures: Add Intel feature bits for Speculation Control
dwmw2 Jan 25, 2018
5d10cbc
x86/cpufeatures: Add AMD feature bits for Speculation Control
dwmw2 Jan 25, 2018
1e340c6
x86/msr: Add definitions for new speculation control MSRs
dwmw2 Jan 25, 2018
fec9434
x86/pti: Do not enable PTI on CPUs which are not vulnerable to Meltdown
dwmw2 Jan 25, 2018
a5b2966
x86/cpufeature: Blacklist SPEC_CTRL/PRED_CMD on early Spectre v2 micr…
dwmw2 Jan 25, 2018
20ffa1c
x86/speculation: Add basic IBPB (Indirect Branch Prediction Barrier) …
dwmw2 Jan 25, 2018
0e6c16c
x86/alternative: Print unadorned pointers
suryasaimadhu Jan 26, 2018
7a32fc5
x86/nospec: Fix header guards names
suryasaimadhu Jan 26, 2018
55fa19d
x86/bugs: Drop one "mitigation" from dmesg
suryasaimadhu Jan 26, 2018
148096a
regulator: core: Move of_find_regulator_by_node() to of_regulator.c
Jan 22, 2018
3d67fe9
regulator: core: Refactor regulator_list_voltage()
Jan 22, 2018
285c22d
Merge branch 'topic/suspend' of https://git.kernel.org/pub/scm/linux/…
broonie Jan 26, 2018
00cb9f4
regulator: Fix build error
broonie Jan 26, 2018
73d8003
Merge remote-tracking branch 'regulator/topic/core' into regulator-next
broonie Jan 26, 2018
2755646
Merge remote-tracking branch 'regulator/topic/qcom_spmi' into regulat…
broonie Jan 26, 2018
cf1ba3b
Merge remote-tracking branches 'regulator/topic/doc' and 'regulator/t…
broonie Jan 26, 2018
4e79f3f
Merge remote-tracking branch 'regulator/topic/tps65218' into regulato…
broonie Jan 26, 2018
7a4e28a
Merge remote-tracking branches 'spi/fix/imx' and 'spi/fix/sh-msiof' i…
broonie Jan 26, 2018
ae324b2
Merge remote-tracking branches 'spi/topic/a3700', 'spi/topic/atmel', …
broonie Jan 26, 2018
33c58c1
Merge remote-tracking branches 'spi/topic/fsl-dspi', 'spi/topic/imx',…
broonie Jan 26, 2018
977b06d
Merge remote-tracking branches 'spi/topic/pxa2xx', 'spi/topic/s3c64xx…
broonie Jan 26, 2018
35a8f1a
Merge remote-tracking branch 'spi/topic/xilinx' into spi-next
broonie Jan 26, 2018
b16791d
Merge branch 'nvme-4.16' of git://git.infradead.org/nvme into for-4.1…
axboe Jan 26, 2018
ec89ab5
arm64: Fix TTBR + PAN + 52-bit PA logic in cpu_do_switch_mm
stevecapperarm Jan 24, 2018
796baee
block: remove smart1,2.h
montjoie Jan 26, 2018
b327a71
CIFS: make IPC a regular tcon
aaptel Jan 24, 2018
63a83b8
CIFS: use tcon_ipc instead of use_ipc parameter of SMB2_ioctl
aaptel Jan 24, 2018
02cf590
CIFS: dump IPC tcon in debug proc file
aaptel Jan 24, 2018
2026b06
Cleanup some minor endian issues in smb3 rdma
smfrench Jan 25, 2018
97f4b72
CIFS: zero sensitive data when freeing
aaptel Jan 25, 2018
6b31471
move a few externs to smbdirect.h to eliminate warning
smfrench Jan 25, 2018
4a1360d
CIFS: document tcon/ses/server refcount dance
aaptel Jan 25, 2018
cd1aca2
cifs: add .splice_write
andsouto Dec 28, 2017
ab2c643
update internal version number for cifs.ko
smfrench Jan 26, 2018
303c146
Merge branch 'timers/urgent' into timers/core
KAGA-KOKO Jan 27, 2018
e383095
x86/cpu/bugs: Make retpoline module warning conditional
KAGA-KOKO Jan 27, 2018
836ad11
hwmon: (dell-smm) Enable broken functionality via "force" module param
pali Jan 27, 2018
f480ea9
hwmon: (dell-smm) Disable fan support for Dell Inspiron 7720
pali Jan 27, 2018
6fbc423
hwmon: (dell-smm) Disable fan support for Dell Vostro 3360
pfactum Jan 27, 2018
2961298
x86/cpufeatures: Clean up Spectre v2 related CPUID flags
dwmw2 Jan 27, 2018
1dde741
x86/retpoline: Simplify vmexit_fill_RSB()
bp3tk0v Jan 27, 2018
64e1672
x86/speculation: Simplify indirect_branch_prediction_barrier()
suryasaimadhu Jan 27, 2018
128159f
NFS: Remove a redundant call to unmap_mapping_range()
trondmypd Jan 28, 2018
36c7ce4
fs/cifs/cifsacl.c Fixes typo in a comment
Jan 28, 2018
e4c1091
Merge tag 'perf-core-for-mingo-4.16-20180125' of git://git.kernel.org…
Jan 28, 2018
e231c68
NFS: Fix a race between mmap() and O_DIRECT
trondmypd Jan 28, 2018
c8f22b0
Merge tag 'spi-nor/for-4.16' of git://git.infradead.org/linux-mtd int…
Jan 29, 2018
571cb17
Merge tag 'nand/for-4.16' of git://git.infradead.org/linux-mtd into m…
Jan 29, 2018
ae5e165
fs: new API for handling inode->i_version
jtlayton Jan 29, 2018
7594c46
fs: don't take the i_lock in inode_inc_iversion
jtlayton Dec 18, 2017
2489dba
fat: convert to new i_version API
jtlayton Dec 11, 2017
9dffe56
affs: convert to new i_version API
jtlayton Dec 11, 2017
a01179e
afs: convert to new i_version API
jtlayton Dec 11, 2017
c7f88c4
btrfs: convert to new i_version API
jtlayton Dec 11, 2017
317bc94
exofs: switch to new i_version API
jtlayton Dec 11, 2017
e1d747d
ext2: convert to new i_version API
jtlayton Dec 11, 2017
ee73f9a
ext4: convert to new i_version API
jtlayton Jan 9, 2018
1eb5d98
nfs: convert to new i_version API
jtlayton Jan 9, 2018
1f15a55
nfsd: convert to new i_version API
jtlayton Dec 11, 2017
cc56c33
ocfs2: convert to new i_version API
jtlayton Dec 11, 2017
bb8c2d6
ufs: use new i_version API
jtlayton Dec 11, 2017
f0e2828
xfs: convert to new i_version API
jtlayton Dec 11, 2017
3b370b2
IMA: switch IMA over to new i_version API
jtlayton Dec 11, 2017
e38cf30
fs: only set S_VERSION when updating times if necessary
jtlayton Dec 11, 2017
d17260f
xfs: avoid setting XFS_ILOG_CORE if i_version doesn't need incrementing
jtlayton Dec 11, 2017
3a8c723
btrfs: only dirty the inode in btrfs_update_time if something was cha…
jtlayton Dec 11, 2017
f02a9ad
fs: handle inode->i_version more efficiently
jtlayton Dec 21, 2017
49f9c35
Merge tag 'init_task-20180117' of git://git.kernel.org/pub/scm/linux/…
torvalds Jan 29, 2018
1c1f395
Merge tag 'sound-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kern…
torvalds Jan 29, 2018
7f3fdd4
Merge tag 'pm-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/…
torvalds Jan 29, 2018
1a9a126
Merge tag 'acpi-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kerne…
torvalds Jan 29, 2018
e124ece
btrfs: get device pointer from device_list_add()
asj Jan 18, 2018
3acbcbf
btrfs: drop devid as device_list_add() arg
asj Jan 18, 2018
1c7385d
Merge tag 'pnp-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel…
torvalds Jan 29, 2018
bc4e118
Merge tag 'mfd-next-4.16' of git://git.kernel.org/pub/scm/linux/kerne…
torvalds Jan 29, 2018
aa5e75b
Merge tag 'for-backlight-next-4.16' of git://git.kernel.org/pub/scm/l…
torvalds Jan 29, 2018
0fc7e74
Merge tag 'mtd/for-4.16' of git://git.infradead.org/linux-mtd
torvalds Jan 29, 2018
47d5cc5
Merge tag 'hwmon-for-linus-v4.16' of git://git.kernel.org/pub/scm/lin…
torvalds Jan 29, 2018
0bae60f
Merge tag 'mmc-v4.16' of git://git.kernel.org/pub/scm/linux/kernel/gi…
torvalds Jan 29, 2018
8e32647
Merge tag 'spi-v4.16' of git://git.kernel.org/pub/scm/linux/kernel/gi…
torvalds Jan 29, 2018
dc38787
Merge tag 'regulator-v4.16' of git://git.kernel.org/pub/scm/linux/ker…
torvalds Jan 29, 2018
b5856f9
Merge tag 'regmap-v4.16' of git://git.kernel.org/pub/scm/linux/kernel…
torvalds Jan 29, 2018
9697e9d
Merge tag 'edac_for_4.16' of git://git.kernel.org/pub/scm/linux/kerne…
torvalds Jan 29, 2018
0a4b6e2
Merge branch 'for-4.16/block' of git://git.kernel.dk/linux-block
torvalds Jan 29, 2018
d1de762
Merge tag 'upstream-4.16-rc1' of git://git.infradead.org/linux-ubifs
torvalds Jan 29, 2018
a4b7fd7
Merge tag 'iversion-v4.16-1' of git://git.kernel.org/pub/scm/linux/ke…
torvalds Jan 29, 2018
6787dc2
Merge tag '4.16-rc-SMB3' of git://git.samba.org/sfrench/cifs-2.6
torvalds Jan 29, 2018
31466f3
Merge tag 'for-4.16-tag' of git://git.kernel.org/pub/scm/linux/kernel…
torvalds Jan 29, 2018
aca21de
Merge tag 'm68k-for-v4.16-tag1' of git://git.kernel.org/pub/scm/linux…
torvalds Jan 30, 2018
d0bd31d
Merge tag 'xtensa-20180129' of git://github.com/jcmvbkbc/linux-xtensa
torvalds Jan 30, 2018
7bcd342
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/lin…
torvalds Jan 30, 2018
a46d3f9
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/…
torvalds Jan 30, 2018
f0b1342
Merge branch 'x86-cache-for-linus' of git://git.kernel.org/pub/scm/li…
torvalds Jan 30, 2018
669c0f7
Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm…
torvalds Jan 30, 2018
36c289e
Merge branch 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/l…
torvalds Jan 30, 2018
9426335
Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux…
torvalds Jan 30, 2018
6304672
Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linu…
torvalds Jan 30, 2018
03eac8b
Documentation: Fix 'file_mapped' -> 'mapped_file'
Jan 30, 2018
c148879
Merge branch 'core-debug-for-linus' of git://git.kernel.org/pub/scm/l…
torvalds Jan 30, 2018
d772794
Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/lin…
torvalds Jan 30, 2018
b8dbf73
Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/lin…
torvalds Jan 30, 2018
5e7481a
Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm…
torvalds Jan 30, 2018
d8b91dd
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/li…
torvalds Jan 30, 2018
a1c75e1
Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/lin…
torvalds Jan 30, 2018
af8c5e2
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/l…
torvalds Jan 30, 2018
5289d30
Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/lin…
torvalds Jan 30, 2018
3ccabd6
Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm…
torvalds Jan 30, 2018
72906f3
Merge branch 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/l…
torvalds Jan 30, 2018
0aebc6a
Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kern…
torvalds Jan 30, 2018
d417302
Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/ke…
torvalds Jan 30, 2018
2afe738
Merge branch 'userns-linus' of git://git.kernel.org/pub/scm/linux/ker…
torvalds Jan 30, 2018
f8cc87b
Merge branch 'for-4.16' of git://git.kernel.org/pub/scm/linux/kernel/…
torvalds Jan 30, 2018
76a250f
Merge branch 'for-4.16' of git://git.kernel.org/pub/scm/linux/kernel/…
torvalds Jan 30, 2018
289104c
Merge branch 'for-4.16' of git://git.kernel.org/pub/scm/linux/kernel/…
torvalds Jan 30, 2018
13ddd16
Merge branch 'for-4.16' of git://git.kernel.org/pub/scm/linux/kernel/…
torvalds Jan 30, 2018
168fe32
Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel…
torvalds Jan 31, 2018
8b0fdf6
Merge branch 'work.mqueue' of git://git.kernel.org/pub/scm/linux/kern…
torvalds Jan 31, 2018
1ed2d76
Merge branch 'work.sock_recvmsg' of git://git.kernel.org/pub/scm/linu…
torvalds Jan 31, 2018
efd52b5
Merge tag 'nfs-for-4.16-1' of git://git.linux-nfs.org/projects/trondm…
torvalds Jan 31, 2018
3da90b1
Merge tag 'f2fs-for-4.16-rc1' of git://git.kernel.org/pub/scm/linux/k…
torvalds Jan 31, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions drivers/ata/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,25 @@ config SATA_AHCI

If unsure, say N.

config SATA_MOBILE_LPM_POLICY
int "Default SATA Link Power Management policy for mobile chipsets"
range 0 4
default 0
depends on SATA_AHCI
help
Select the Default SATA Link Power Management (LPM) policy to use
for mobile / laptop variants of chipsets / "South Bridges".

The value set has the following meanings:
0 => Keep firmware settings
1 => Maximum performance
2 => Medium power
3 => Medium power with Device Initiated PM enabled
4 => Minimum power

Note "Minimum power" is known to cause issues, including disk
corruption, with some disks and should not be used.

config SATA_AHCI_PLATFORM
tristate "Platform AHCI SATA support"
help
Expand Down Expand Up @@ -925,15 +944,6 @@ endif # ATA_BMDMA

comment "PIO-only SFF controllers"

config PATA_AT32
tristate "Atmel AVR32 PATA support (Experimental)"
depends on AVR32 && PLATFORM_AT32AP
help
This option enables support for the IDE devices on the
Atmel AT32AP platform.

If unsure, say N.

config PATA_CMD640_PCI
tristate "CMD640 PCI PATA support (Experimental)"
depends on PCI
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ obj-$(CONFIG_PATA_VIA) += pata_via.o
obj-$(CONFIG_PATA_WINBOND) += pata_sl82c105.o

# SFF PIO only
obj-$(CONFIG_PATA_AT32) += pata_at32.o
obj-$(CONFIG_PATA_CMD640_PCI) += pata_cmd640.o
obj-$(CONFIG_PATA_FALCON) += pata_falcon.o
obj-$(CONFIG_PATA_ISAPNP) += pata_isapnp.o
Expand Down
94 changes: 57 additions & 37 deletions drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ enum board_ids {
/* board IDs by feature in alphabetical order */
board_ahci,
board_ahci_ign_iferr,
board_ahci_mobile,
board_ahci_nomsi,
board_ahci_noncq,
board_ahci_nosntf,
Expand Down Expand Up @@ -140,6 +141,13 @@ static const struct ata_port_info ahci_port_info[] = {
.udma_mask = ATA_UDMA6,
.port_ops = &ahci_ops,
},
[board_ahci_mobile] = {
AHCI_HFLAGS (AHCI_HFLAG_IS_MOBILE),
.flags = AHCI_FLAG_COMMON,
.pio_mask = ATA_PIO4,
.udma_mask = ATA_UDMA6,
.port_ops = &ahci_ops,
},
[board_ahci_nomsi] = {
AHCI_HFLAGS (AHCI_HFLAG_NO_MSI),
.flags = AHCI_FLAG_COMMON,
Expand Down Expand Up @@ -252,13 +260,13 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, 0x2924), board_ahci }, /* ICH9 */
{ PCI_VDEVICE(INTEL, 0x2925), board_ahci }, /* ICH9 */
{ PCI_VDEVICE(INTEL, 0x2927), board_ahci }, /* ICH9 */
{ PCI_VDEVICE(INTEL, 0x2929), board_ahci }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x292a), board_ahci }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x292b), board_ahci }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x292c), board_ahci }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x292f), board_ahci }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x2929), board_ahci_mobile }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x292a), board_ahci_mobile }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x292b), board_ahci_mobile }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x292c), board_ahci_mobile }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x292f), board_ahci_mobile }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x294d), board_ahci }, /* ICH9 */
{ PCI_VDEVICE(INTEL, 0x294e), board_ahci }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x294e), board_ahci_mobile }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x502a), board_ahci }, /* Tolapai */
{ PCI_VDEVICE(INTEL, 0x502b), board_ahci }, /* Tolapai */
{ PCI_VDEVICE(INTEL, 0x3a05), board_ahci }, /* ICH10 */
Expand All @@ -268,9 +276,9 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, 0x3b23), board_ahci }, /* PCH AHCI */
{ PCI_VDEVICE(INTEL, 0x3b24), board_ahci }, /* PCH RAID */
{ PCI_VDEVICE(INTEL, 0x3b25), board_ahci }, /* PCH RAID */
{ PCI_VDEVICE(INTEL, 0x3b29), board_ahci }, /* PCH AHCI */
{ PCI_VDEVICE(INTEL, 0x3b29), board_ahci_mobile }, /* PCH M AHCI */
{ PCI_VDEVICE(INTEL, 0x3b2b), board_ahci }, /* PCH RAID */
{ PCI_VDEVICE(INTEL, 0x3b2c), board_ahci }, /* PCH RAID */
{ PCI_VDEVICE(INTEL, 0x3b2c), board_ahci_mobile }, /* PCH M RAID */
{ PCI_VDEVICE(INTEL, 0x3b2f), board_ahci }, /* PCH AHCI */
{ PCI_VDEVICE(INTEL, 0x19b0), board_ahci }, /* DNV AHCI */
{ PCI_VDEVICE(INTEL, 0x19b1), board_ahci }, /* DNV AHCI */
Expand All @@ -293,9 +301,9 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, 0x19cE), board_ahci }, /* DNV AHCI */
{ PCI_VDEVICE(INTEL, 0x19cF), board_ahci }, /* DNV AHCI */
{ PCI_VDEVICE(INTEL, 0x1c02), board_ahci }, /* CPT AHCI */
{ PCI_VDEVICE(INTEL, 0x1c03), board_ahci }, /* CPT AHCI */
{ PCI_VDEVICE(INTEL, 0x1c03), board_ahci_mobile }, /* CPT M AHCI */
{ PCI_VDEVICE(INTEL, 0x1c04), board_ahci }, /* CPT RAID */
{ PCI_VDEVICE(INTEL, 0x1c05), board_ahci }, /* CPT RAID */
{ PCI_VDEVICE(INTEL, 0x1c05), board_ahci_mobile }, /* CPT M RAID */
{ PCI_VDEVICE(INTEL, 0x1c06), board_ahci }, /* CPT RAID */
{ PCI_VDEVICE(INTEL, 0x1c07), board_ahci }, /* CPT RAID */
{ PCI_VDEVICE(INTEL, 0x1d02), board_ahci }, /* PBG AHCI */
Expand All @@ -304,28 +312,28 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, 0x2826), board_ahci }, /* PBG RAID */
{ PCI_VDEVICE(INTEL, 0x2323), board_ahci }, /* DH89xxCC AHCI */
{ PCI_VDEVICE(INTEL, 0x1e02), board_ahci }, /* Panther Point AHCI */
{ PCI_VDEVICE(INTEL, 0x1e03), board_ahci }, /* Panther Point AHCI */
{ PCI_VDEVICE(INTEL, 0x1e03), board_ahci_mobile }, /* Panther M AHCI */
{ PCI_VDEVICE(INTEL, 0x1e04), board_ahci }, /* Panther Point RAID */
{ PCI_VDEVICE(INTEL, 0x1e05), board_ahci }, /* Panther Point RAID */
{ PCI_VDEVICE(INTEL, 0x1e06), board_ahci }, /* Panther Point RAID */
{ PCI_VDEVICE(INTEL, 0x1e07), board_ahci }, /* Panther Point RAID */
{ PCI_VDEVICE(INTEL, 0x1e07), board_ahci_mobile }, /* Panther M RAID */
{ PCI_VDEVICE(INTEL, 0x1e0e), board_ahci }, /* Panther Point RAID */
{ PCI_VDEVICE(INTEL, 0x8c02), board_ahci }, /* Lynx Point AHCI */
{ PCI_VDEVICE(INTEL, 0x8c03), board_ahci }, /* Lynx Point AHCI */
{ PCI_VDEVICE(INTEL, 0x8c03), board_ahci_mobile }, /* Lynx M AHCI */
{ PCI_VDEVICE(INTEL, 0x8c04), board_ahci }, /* Lynx Point RAID */
{ PCI_VDEVICE(INTEL, 0x8c05), board_ahci }, /* Lynx Point RAID */
{ PCI_VDEVICE(INTEL, 0x8c05), board_ahci_mobile }, /* Lynx M RAID */
{ PCI_VDEVICE(INTEL, 0x8c06), board_ahci }, /* Lynx Point RAID */
{ PCI_VDEVICE(INTEL, 0x8c07), board_ahci }, /* Lynx Point RAID */
{ PCI_VDEVICE(INTEL, 0x8c07), board_ahci_mobile }, /* Lynx M RAID */
{ PCI_VDEVICE(INTEL, 0x8c0e), board_ahci }, /* Lynx Point RAID */
{ PCI_VDEVICE(INTEL, 0x8c0f), board_ahci }, /* Lynx Point RAID */
{ PCI_VDEVICE(INTEL, 0x9c02), board_ahci }, /* Lynx Point-LP AHCI */
{ PCI_VDEVICE(INTEL, 0x9c03), board_ahci }, /* Lynx Point-LP AHCI */
{ PCI_VDEVICE(INTEL, 0x9c04), board_ahci }, /* Lynx Point-LP RAID */
{ PCI_VDEVICE(INTEL, 0x9c05), board_ahci }, /* Lynx Point-LP RAID */
{ PCI_VDEVICE(INTEL, 0x9c06), board_ahci }, /* Lynx Point-LP RAID */
{ PCI_VDEVICE(INTEL, 0x9c07), board_ahci }, /* Lynx Point-LP RAID */
{ PCI_VDEVICE(INTEL, 0x9c0e), board_ahci }, /* Lynx Point-LP RAID */
{ PCI_VDEVICE(INTEL, 0x9c0f), board_ahci }, /* Lynx Point-LP RAID */
{ PCI_VDEVICE(INTEL, 0x8c0f), board_ahci_mobile }, /* Lynx M RAID */
{ PCI_VDEVICE(INTEL, 0x9c02), board_ahci_mobile }, /* Lynx LP AHCI */
{ PCI_VDEVICE(INTEL, 0x9c03), board_ahci_mobile }, /* Lynx LP AHCI */
{ PCI_VDEVICE(INTEL, 0x9c04), board_ahci_mobile }, /* Lynx LP RAID */
{ PCI_VDEVICE(INTEL, 0x9c05), board_ahci_mobile }, /* Lynx LP RAID */
{ PCI_VDEVICE(INTEL, 0x9c06), board_ahci_mobile }, /* Lynx LP RAID */
{ PCI_VDEVICE(INTEL, 0x9c07), board_ahci_mobile }, /* Lynx LP RAID */
{ PCI_VDEVICE(INTEL, 0x9c0e), board_ahci_mobile }, /* Lynx LP RAID */
{ PCI_VDEVICE(INTEL, 0x9c0f), board_ahci_mobile }, /* Lynx LP RAID */
{ PCI_VDEVICE(INTEL, 0x1f22), board_ahci }, /* Avoton AHCI */
{ PCI_VDEVICE(INTEL, 0x1f23), board_ahci }, /* Avoton AHCI */
{ PCI_VDEVICE(INTEL, 0x1f24), board_ahci }, /* Avoton RAID */
Expand Down Expand Up @@ -353,26 +361,26 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, 0x8d66), board_ahci }, /* Wellsburg RAID */
{ PCI_VDEVICE(INTEL, 0x8d6e), board_ahci }, /* Wellsburg RAID */
{ PCI_VDEVICE(INTEL, 0x23a3), board_ahci }, /* Coleto Creek AHCI */
{ PCI_VDEVICE(INTEL, 0x9c83), board_ahci }, /* Wildcat Point-LP AHCI */
{ PCI_VDEVICE(INTEL, 0x9c85), board_ahci }, /* Wildcat Point-LP RAID */
{ PCI_VDEVICE(INTEL, 0x9c87), board_ahci }, /* Wildcat Point-LP RAID */
{ PCI_VDEVICE(INTEL, 0x9c8f), board_ahci }, /* Wildcat Point-LP RAID */
{ PCI_VDEVICE(INTEL, 0x9c83), board_ahci_mobile }, /* Wildcat LP AHCI */
{ PCI_VDEVICE(INTEL, 0x9c85), board_ahci_mobile }, /* Wildcat LP RAID */
{ PCI_VDEVICE(INTEL, 0x9c87), board_ahci_mobile }, /* Wildcat LP RAID */
{ PCI_VDEVICE(INTEL, 0x9c8f), board_ahci_mobile }, /* Wildcat LP RAID */
{ PCI_VDEVICE(INTEL, 0x8c82), board_ahci }, /* 9 Series AHCI */
{ PCI_VDEVICE(INTEL, 0x8c83), board_ahci }, /* 9 Series AHCI */
{ PCI_VDEVICE(INTEL, 0x8c83), board_ahci_mobile }, /* 9 Series M AHCI */
{ PCI_VDEVICE(INTEL, 0x8c84), board_ahci }, /* 9 Series RAID */
{ PCI_VDEVICE(INTEL, 0x8c85), board_ahci }, /* 9 Series RAID */
{ PCI_VDEVICE(INTEL, 0x8c85), board_ahci_mobile }, /* 9 Series M RAID */
{ PCI_VDEVICE(INTEL, 0x8c86), board_ahci }, /* 9 Series RAID */
{ PCI_VDEVICE(INTEL, 0x8c87), board_ahci }, /* 9 Series RAID */
{ PCI_VDEVICE(INTEL, 0x8c87), board_ahci_mobile }, /* 9 Series M RAID */
{ PCI_VDEVICE(INTEL, 0x8c8e), board_ahci }, /* 9 Series RAID */
{ PCI_VDEVICE(INTEL, 0x8c8f), board_ahci }, /* 9 Series RAID */
{ PCI_VDEVICE(INTEL, 0x9d03), board_ahci }, /* Sunrise Point-LP AHCI */
{ PCI_VDEVICE(INTEL, 0x9d05), board_ahci }, /* Sunrise Point-LP RAID */
{ PCI_VDEVICE(INTEL, 0x9d07), board_ahci }, /* Sunrise Point-LP RAID */
{ PCI_VDEVICE(INTEL, 0x8c8f), board_ahci_mobile }, /* 9 Series M RAID */
{ PCI_VDEVICE(INTEL, 0x9d03), board_ahci_mobile }, /* Sunrise LP AHCI */
{ PCI_VDEVICE(INTEL, 0x9d05), board_ahci_mobile }, /* Sunrise LP RAID */
{ PCI_VDEVICE(INTEL, 0x9d07), board_ahci_mobile }, /* Sunrise LP RAID */
{ PCI_VDEVICE(INTEL, 0xa102), board_ahci }, /* Sunrise Point-H AHCI */
{ PCI_VDEVICE(INTEL, 0xa103), board_ahci }, /* Sunrise Point-H AHCI */
{ PCI_VDEVICE(INTEL, 0xa103), board_ahci_mobile }, /* Sunrise M AHCI */
{ PCI_VDEVICE(INTEL, 0xa105), board_ahci }, /* Sunrise Point-H RAID */
{ PCI_VDEVICE(INTEL, 0xa106), board_ahci }, /* Sunrise Point-H RAID */
{ PCI_VDEVICE(INTEL, 0xa107), board_ahci }, /* Sunrise Point-H RAID */
{ PCI_VDEVICE(INTEL, 0xa107), board_ahci_mobile }, /* Sunrise M RAID */
{ PCI_VDEVICE(INTEL, 0xa10f), board_ahci }, /* Sunrise Point-H RAID */
{ PCI_VDEVICE(INTEL, 0x2822), board_ahci }, /* Lewisburg RAID*/
{ PCI_VDEVICE(INTEL, 0x2823), board_ahci }, /* Lewisburg AHCI*/
Expand All @@ -386,6 +394,11 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, 0xa206), board_ahci }, /* Lewisburg RAID*/
{ PCI_VDEVICE(INTEL, 0xa252), board_ahci }, /* Lewisburg RAID*/
{ PCI_VDEVICE(INTEL, 0xa256), board_ahci }, /* Lewisburg RAID*/
{ PCI_VDEVICE(INTEL, 0xa356), board_ahci }, /* Cannon Lake PCH-H RAID */
{ PCI_VDEVICE(INTEL, 0x0f22), board_ahci_mobile }, /* Bay Trail AHCI */
{ PCI_VDEVICE(INTEL, 0x0f23), board_ahci_mobile }, /* Bay Trail AHCI */
{ PCI_VDEVICE(INTEL, 0x22a3), board_ahci_mobile }, /* Cherry Tr. AHCI */
{ PCI_VDEVICE(INTEL, 0x5ae3), board_ahci_mobile }, /* ApolloLake AHCI */

/* JMicron 360/1/3/5/6, match class to avoid IDE function */
{ PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
Expand Down Expand Up @@ -593,6 +606,9 @@ static int marvell_enable = 1;
module_param(marvell_enable, int, 0644);
MODULE_PARM_DESC(marvell_enable, "Marvell SATA via AHCI (1 = enabled)");

static int mobile_lpm_policy = CONFIG_SATA_MOBILE_LPM_POLICY;
module_param(mobile_lpm_policy, int, 0644);
MODULE_PARM_DESC(mobile_lpm_policy, "Default LPM policy for mobile chipsets");

static void ahci_pci_save_initial_config(struct pci_dev *pdev,
struct ahci_host_priv *hpriv)
Expand Down Expand Up @@ -1728,6 +1744,10 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
if (ap->flags & ATA_FLAG_EM)
ap->em_message_type = hpriv->em_msg_type;

if ((hpriv->flags & AHCI_HFLAG_IS_MOBILE) &&
mobile_lpm_policy >= ATA_LPM_UNKNOWN &&
mobile_lpm_policy <= ATA_LPM_MIN_POWER)
ap->target_lpm_policy = mobile_lpm_policy;

/* disabled/not-implemented port */
if (!(hpriv->port_map & (1 << i)))
Expand Down
3 changes: 3 additions & 0 deletions drivers/ata/ahci.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,9 @@ enum {
AHCI_HFLAG_YES_ALPM = (1 << 23), /* force ALPM cap on */
AHCI_HFLAG_NO_WRITE_TO_RO = (1 << 24), /* don't write to read
only registers */
AHCI_HFLAG_IS_MOBILE = (1 << 25), /* mobile chipset, use
SATA_MOBILE_LPM_POLICY
as default lpm_policy */

/* ap->flags bits */

Expand Down
120 changes: 102 additions & 18 deletions drivers/ata/ahci_brcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@
(DATA_ENDIAN << DMADESC_ENDIAN_SHIFT) | \
(MMIO_ENDIAN << MMIO_ENDIAN_SHIFT))

#define BUS_CTRL_ENDIAN_NSP_CONF \
(0x02 << DMADATA_ENDIAN_SHIFT | 0x02 << DMADESC_ENDIAN_SHIFT)

#define BUS_CTRL_ENDIAN_CONF_MASK \
(0x3 << MMIO_ENDIAN_SHIFT | 0x3 << DMADESC_ENDIAN_SHIFT | \
0x3 << DMADATA_ENDIAN_SHIFT | 0x3 << PIODATA_ENDIAN_SHIFT)

enum brcm_ahci_version {
BRCM_SATA_BCM7425 = 1,
BRCM_SATA_BCM7445,
Expand All @@ -89,14 +96,6 @@ struct brcm_ahci_priv {
enum brcm_ahci_version version;
};

static const struct ata_port_info ahci_brcm_port_info = {
.flags = AHCI_FLAG_COMMON | ATA_FLAG_NO_DIPM,
.link_flags = ATA_LFLAG_NO_DB_DELAY,
.pio_mask = ATA_PIO4,
.udma_mask = ATA_UDMA6,
.port_ops = &ahci_platform_ops,
};

static inline u32 brcm_sata_readreg(void __iomem *addr)
{
/*
Expand Down Expand Up @@ -250,20 +249,105 @@ static u32 brcm_ahci_get_portmask(struct platform_device *pdev,
static void brcm_sata_init(struct brcm_ahci_priv *priv)
{
void __iomem *ctrl = priv->top_ctrl + SATA_TOP_CTRL_BUS_CTRL;
u32 data;

/* Configure endianness */
if (priv->version == BRCM_SATA_NSP) {
u32 data = brcm_sata_readreg(ctrl);

data &= ~((0x03 << DMADATA_ENDIAN_SHIFT) |
(0x03 << DMADESC_ENDIAN_SHIFT));
data |= (0x02 << DMADATA_ENDIAN_SHIFT) |
(0x02 << DMADESC_ENDIAN_SHIFT);
brcm_sata_writereg(data, ctrl);
} else
brcm_sata_writereg(BUS_CTRL_ENDIAN_CONF, ctrl);
data = brcm_sata_readreg(ctrl);
data &= ~BUS_CTRL_ENDIAN_CONF_MASK;
if (priv->version == BRCM_SATA_NSP)
data |= BUS_CTRL_ENDIAN_NSP_CONF;
else
data |= BUS_CTRL_ENDIAN_CONF;
brcm_sata_writereg(data, ctrl);
}

static unsigned int brcm_ahci_read_id(struct ata_device *dev,
struct ata_taskfile *tf, u16 *id)
{
struct ata_port *ap = dev->link->ap;
struct ata_host *host = ap->host;
struct ahci_host_priv *hpriv = host->private_data;
struct brcm_ahci_priv *priv = hpriv->plat_data;
void __iomem *mmio = hpriv->mmio;
unsigned int err_mask;
unsigned long flags;
int i, rc;
u32 ctl;

/* Try to read the device ID and, if this fails, proceed with the
* recovery sequence below
*/
err_mask = ata_do_dev_read_id(dev, tf, id);
if (likely(!err_mask))
return err_mask;

/* Disable host interrupts */
spin_lock_irqsave(&host->lock, flags);
ctl = readl(mmio + HOST_CTL);
ctl &= ~HOST_IRQ_EN;
writel(ctl, mmio + HOST_CTL);
readl(mmio + HOST_CTL); /* flush */
spin_unlock_irqrestore(&host->lock, flags);

/* Perform the SATA PHY reset sequence */
brcm_sata_phy_disable(priv, ap->port_no);

/* Bring the PHY back on */
brcm_sata_phy_enable(priv, ap->port_no);

/* Re-initialize and calibrate the PHY */
for (i = 0; i < hpriv->nports; i++) {
rc = phy_init(hpriv->phys[i]);
if (rc)
goto disable_phys;

rc = phy_calibrate(hpriv->phys[i]);
if (rc) {
phy_exit(hpriv->phys[i]);
goto disable_phys;
}
}

/* Re-enable host interrupts */
spin_lock_irqsave(&host->lock, flags);
ctl = readl(mmio + HOST_CTL);
ctl |= HOST_IRQ_EN;
writel(ctl, mmio + HOST_CTL);
readl(mmio + HOST_CTL); /* flush */
spin_unlock_irqrestore(&host->lock, flags);

return ata_do_dev_read_id(dev, tf, id);

disable_phys:
while (--i >= 0) {
phy_power_off(hpriv->phys[i]);
phy_exit(hpriv->phys[i]);
}

return AC_ERR_OTHER;
}

static void brcm_ahci_host_stop(struct ata_host *host)
{
struct ahci_host_priv *hpriv = host->private_data;

ahci_platform_disable_resources(hpriv);
}

static struct ata_port_operations ahci_brcm_platform_ops = {
.inherits = &ahci_ops,
.host_stop = brcm_ahci_host_stop,
.read_id = brcm_ahci_read_id,
};

static const struct ata_port_info ahci_brcm_port_info = {
.flags = AHCI_FLAG_COMMON | ATA_FLAG_NO_DIPM,
.link_flags = ATA_LFLAG_NO_DB_DELAY,
.pio_mask = ATA_PIO4,
.udma_mask = ATA_UDMA6,
.port_ops = &ahci_brcm_platform_ops,
};

#ifdef CONFIG_PM_SLEEP
static int brcm_ahci_suspend(struct device *dev)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/ata/ata_piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ static const struct piix_map_db *piix_map_db_table[] = {
[ich8_2port_sata_byt] = &ich8_2port_map_db,
};

static struct pci_bits piix_enable_bits[] = {
static const struct pci_bits piix_enable_bits[] = {
{ 0x41U, 1U, 0x80UL, 0x80UL }, /* port 0 */
{ 0x43U, 1U, 0x80UL, 0x80UL }, /* port 1 */
};
Expand Down
Loading