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

Sync up with Linus #95

Merged
merged 67 commits into from
Aug 21, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
3661df1
iw_cxgb4: gracefully handle unknown CQE status errors
Jul 27, 2015
8b34fe5
ata: ahci_brcmstb: Fix warnings with CONFIG_PM_SLEEP=n
ffainelli Jul 14, 2015
9450918
target: Perform RCU callback barrier before backend/fabric unload
Jul 30, 2015
9547308
target/iscsi: Fix double free of a TUR followed by a solicited NOPOUT
alexeipstg Jul 21, 2015
9c39517
target: REPORT LUNS should return LUN 0 even for dynamic ACLs
rolandd Jul 24, 2015
fe16d4f
Revert "libata-eh: Set 'information' field for autosense"
htejun Aug 3, 2015
84ded2f
Revert "libata: Implement support for sense data reporting"
htejun Aug 3, 2015
74a80d6
Revert "libata: Implement NCQ autosense"
htejun Aug 3, 2015
bb44e15
sata_sx4: Check return code from pdc20621_i2c_read()
tomerb Aug 3, 2015
f9114d3
ata: ahci_brcmstb: Fix misuse of IS_ENABLED
AxelLin Aug 6, 2015
24ee3cf
cpuset: use trialcs->mems_allowed as a temp variable
alban Aug 6, 2015
4772ff0
drm/dp/mst: Remove port after removing connector.
mlankhorst Aug 11, 2015
7ccb0a9
ALSA: hda - Fix the white noise on Dell laptop
Aug 13, 2015
e8fa427
drm/i915: Only dither on 6bpc panels
danvet Aug 12, 2015
f0fdc55
drm/i915: calculate primary visibility changes instead of calling fro…
mlankhorst Aug 11, 2015
d2944cf
drm/i915: Commit planes on each crtc separately.
mlankhorst Aug 11, 2015
f5eeb5f
mac80211: fix invalid read in minstrel_sort_best_tp_rates()
schischi Jul 28, 2015
a516993
net: fix wrong skb_get() usage / crash in IGMP/MLD parsing code
T-X Aug 13, 2015
25b97c0
ipv4: off-by-one in continuation handling in /proc/net/route
Aug 13, 2015
2a4eebf
gianfar: Restore link state settings after MAC reset
claudiu-m Aug 13, 2015
cf736ea
thermal: power_allocator: do not use devm* interfaces
dtor Aug 4, 2015
83fccfc
inet: fix potential deadlock in reqsk_queue_unlink()
Aug 13, 2015
7231ed1
ACPI / video: Fix circular lock dependency issue in the video-detect …
jwrdegoede Aug 13, 2015
62c3f2f
cpufreq: exynos: Fix for memory leak in case SoC name does not match
Shailendra221188 Aug 4, 2015
02373d7
thermal: cpu_cooling: fix lockdep problems in cpu_cooling
Aug 12, 2015
76fd38c
thermal/cpu_cooling: No need to initialize max_freq to 0
vireshk Jul 30, 2015
166529c
thermal/cpu_cooling: quit early after updating policy
vireshk Jul 30, 2015
a24af23
thermal/cpu_cooling: convert 'switch' block to 'if' block in notifier
vireshk Jul 30, 2015
59f0d21
thermal/cpu_cooling: rename cpufreq_val as clipped_freq
vireshk Jul 30, 2015
abcbcc2
thermal/cpu_cooling: rename max_freq as clipped_freq in notifier
vireshk Jul 30, 2015
1afb9c5
thermal/cpu_cooling: update policy limits if clipped_freq < policy->max
vireshk Jul 30, 2015
3acceca
Merge tag 'drm-intel-fixes-2015-08-14' of git://anongit.freedesktop.o…
airlied Aug 15, 2015
7945dc5
Merge tag 'topic/drm-fixes-2015-08-14' of git://anongit.freedesktop.o…
airlied Aug 15, 2015
05aa1a7
dmaengine: fix balance of privatecnt inc/dec operations
Aug 7, 2015
5d37852
Revert "net: limit tcp/udp rmem/wmem to SOCK_{RCV,SND}BUF_MIN"
jcalvinowens Aug 13, 2015
11e122c
net: phy: fix PHY_RUNNING in phy_state_machine
Aug 14, 2015
8cb775b
ppp: fix device unregistration upon netns deletion
Aug 14, 2015
2902bc6
net: ethernet: micrel: fix an error code
Aug 14, 2015
a27cc68
Merge tag 'mac80211-for-davem-2015-08-14' of git://git.kernel.org/pub…
davem330 Aug 17, 2015
776829d
net: phy: workaround for buggy cable detection by LAN8700 after cable…
Aug 14, 2015
ad70686
ipv6: Remove un-used argument from ip6_dst_alloc()
iamkafai Aug 14, 2015
a73e419
ipv6: Add rt6_make_pcpu_route()
iamkafai Aug 14, 2015
9c7370a
ipv6: Fix a potential deadlock when creating pcpu rt
iamkafai Aug 14, 2015
1f979b1
Merge branch 'ipv6_percpu_rt_deadlock'
davem330 Aug 17, 2015
af19e68
be2net: avoid vxlan offloading on multichannel configs
Aug 14, 2015
a807909
net: qmi_wwan: add HP lt4111 LTE/EV-DO/HSPA+ Gobi 4G Module
dpward Aug 16, 2015
ff94c74
net: phy: fix semicolon.cocci warnings
Aug 17, 2015
e9ab22d
Merge branch 'for-4.2-fixes' of git://git.kernel.org/pub/scm/linux/ke…
torvalds Aug 17, 2015
4e7fca0
Merge branch 'for-4.2-fixes' of git://git.kernel.org/pub/scm/linux/ke…
torvalds Aug 17, 2015
bf67402
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/gi…
torvalds Aug 17, 2015
78b50f3
ASoC: topology: Add Kconfig option for topology
broonie Aug 15, 2015
f4566ed
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
torvalds Aug 18, 2015
8c90503
ASoC: topology: Disable use from userspace
broonie Aug 18, 2015
1b647a1
Merge tag 'dmaengine-fix-4.2-rc8' of git://git.infradead.org/users/vk…
torvalds Aug 18, 2015
fd7dec2
batman-adv: Fix memory leak on tt add with invalid vlan
ecsv Aug 18, 2015
0f69a38
target: Fix handling of small allocation lengths in REPORT LUNS
rolandd Aug 14, 2015
9003ebb
ALSA: usb-audio: Fix runtime PM unbalance
tiwai Aug 19, 2015
59a51a6
ALSA: hda - Add dock support for Thinkpad W541 (17aa:2211)
shermdog Aug 19, 2015
e24b6c0
Merge tag 'asoc-v4.2-disable-topology' of git://git.kernel.org/pub/sc…
tiwai Aug 19, 2015
87ffd2b
x86/xen: make CONFIG_XEN depend on CONFIG_X86_LOCAL_APIC
Aug 20, 2015
3bd8f7d
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git…
torvalds Aug 20, 2015
3243f50
Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
torvalds Aug 20, 2015
a971dbc
Merge tag 'sound-4.2' of git://git.kernel.org/pub/scm/linux/kernel/gi…
torvalds Aug 20, 2015
3d3e66b
Merge tag 'for-linus-4.2-rc7-tag' of git://git.kernel.org/pub/scm/lin…
torvalds Aug 20, 2015
28e55d0
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
torvalds Aug 20, 2015
b8a1171
Merge branches 'acpi-video' and 'cpufreq-fixes'
rafaeljw Aug 20, 2015
0bad909
Merge tag 'pm+acpi-4.2-rc8' of git://git.kernel.org/pub/scm/linux/ker…
torvalds Aug 21, 2015
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
4 changes: 2 additions & 2 deletions arch/x86/xen/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ config XEN
select PARAVIRT_CLOCK
select XEN_HAVE_PVMMU
depends on X86_64 || (X86_32 && X86_PAE)
depends on X86_TSC
depends on X86_LOCAL_APIC && X86_TSC
help
This is the Linux Xen port. Enabling this will allow the
kernel to boot in a paravirtualized environment under the
Expand All @@ -17,7 +17,7 @@ config XEN
config XEN_DOM0
def_bool y
depends on XEN && PCI_XEN && SWIOTLB_XEN
depends on X86_LOCAL_APIC && X86_IO_APIC && ACPI && PCI
depends on X86_IO_APIC && ACPI && PCI

config XEN_PVHVM
def_bool y
Expand Down
16 changes: 13 additions & 3 deletions drivers/acpi/video_detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/types.h>
#include <linux/workqueue.h>
#include <acpi/video.h>

ACPI_MODULE_NAME("video");
Expand All @@ -41,6 +42,7 @@ void acpi_video_unregister_backlight(void);

static bool backlight_notifier_registered;
static struct notifier_block backlight_nb;
static struct work_struct backlight_notify_work;

static enum acpi_backlight_type acpi_backlight_cmdline = acpi_backlight_undef;
static enum acpi_backlight_type acpi_backlight_dmi = acpi_backlight_undef;
Expand Down Expand Up @@ -262,16 +264,22 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
{ },
};

/* This uses a workqueue to avoid various locking ordering issues */
static void acpi_video_backlight_notify_work(struct work_struct *work)
{
if (acpi_video_get_backlight_type() != acpi_backlight_video)
acpi_video_unregister_backlight();
}

static int acpi_video_backlight_notify(struct notifier_block *nb,
unsigned long val, void *bd)
{
struct backlight_device *backlight = bd;

/* A raw bl registering may change video -> native */
if (backlight->props.type == BACKLIGHT_RAW &&
val == BACKLIGHT_REGISTERED &&
acpi_video_get_backlight_type() != acpi_backlight_video)
acpi_video_unregister_backlight();
val == BACKLIGHT_REGISTERED)
schedule_work(&backlight_notify_work);

return NOTIFY_OK;
}
Expand Down Expand Up @@ -304,6 +312,8 @@ enum acpi_backlight_type acpi_video_get_backlight_type(void)
acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX, find_video, NULL,
&video_caps, NULL);
INIT_WORK(&backlight_notify_work,
acpi_video_backlight_notify_work);
backlight_nb.notifier_call = acpi_video_backlight_notify;
backlight_nb.priority = 0;
if (backlight_register_notifier(&backlight_nb) == 0)
Expand Down
6 changes: 4 additions & 2 deletions drivers/ata/ahci_brcmstb.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static inline u32 brcm_sata_readreg(void __iomem *addr)
* Other architectures (e.g., ARM) either do not support big endian, or
* else leave I/O in little endian mode.
*/
if (IS_ENABLED(CONFIG_MIPS) && IS_ENABLED(__BIG_ENDIAN))
if (IS_ENABLED(CONFIG_MIPS) && IS_ENABLED(CONFIG_CPU_BIG_ENDIAN))
return __raw_readl(addr);
else
return readl_relaxed(addr);
Expand All @@ -101,7 +101,7 @@ static inline u32 brcm_sata_readreg(void __iomem *addr)
static inline void brcm_sata_writereg(u32 val, void __iomem *addr)
{
/* See brcm_sata_readreg() comments */
if (IS_ENABLED(CONFIG_MIPS) && IS_ENABLED(__BIG_ENDIAN))
if (IS_ENABLED(CONFIG_MIPS) && IS_ENABLED(CONFIG_CPU_BIG_ENDIAN))
__raw_writel(val, addr);
else
writel_relaxed(val, addr);
Expand Down Expand Up @@ -209,6 +209,7 @@ static void brcm_sata_init(struct brcm_ahci_priv *priv)
priv->top_ctrl + SATA_TOP_CTRL_BUS_CTRL);
}

#ifdef CONFIG_PM_SLEEP
static int brcm_ahci_suspend(struct device *dev)
{
struct ata_host *host = dev_get_drvdata(dev);
Expand All @@ -231,6 +232,7 @@ static int brcm_ahci_resume(struct device *dev)
brcm_sata_phys_enable(priv);
return ahci_platform_resume(dev);
}
#endif

static struct scsi_host_template ahci_platform_sht = {
AHCI_SHT(DRV_NAME),
Expand Down
24 changes: 3 additions & 21 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,11 +694,11 @@ static int ata_rwcmd_protocol(struct ata_taskfile *tf, struct ata_device *dev)
* RETURNS:
* Block address read from @tf.
*/
u64 ata_tf_read_block(const struct ata_taskfile *tf, struct ata_device *dev)
u64 ata_tf_read_block(struct ata_taskfile *tf, struct ata_device *dev)
{
u64 block = 0;

if (!dev || tf->flags & ATA_TFLAG_LBA) {
if (tf->flags & ATA_TFLAG_LBA) {
if (tf->flags & ATA_TFLAG_LBA48) {
block |= (u64)tf->hob_lbah << 40;
block |= (u64)tf->hob_lbam << 32;
Expand Down Expand Up @@ -2147,24 +2147,6 @@ static int ata_dev_config_ncq(struct ata_device *dev,
return 0;
}

static void ata_dev_config_sense_reporting(struct ata_device *dev)
{
unsigned int err_mask;

if (!ata_id_has_sense_reporting(dev->id))
return;

if (ata_id_sense_reporting_enabled(dev->id))
return;

err_mask = ata_dev_set_feature(dev, SETFEATURE_SENSE_DATA, 0x1);
if (err_mask) {
ata_dev_dbg(dev,
"failed to enable Sense Data Reporting, Emask 0x%x\n",
err_mask);
}
}

/**
* ata_dev_configure - Configure the specified ATA/ATAPI device
* @dev: Target device to configure
Expand Down Expand Up @@ -2387,7 +2369,7 @@ int ata_dev_configure(struct ata_device *dev)
dev->devslp_timing[i] = sata_setting[j];
}
}
ata_dev_config_sense_reporting(dev);

dev->cdb_len = 16;
}

Expand Down
105 changes: 2 additions & 103 deletions drivers/ata/libata-eh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1592,8 +1592,6 @@ static int ata_eh_read_log_10h(struct ata_device *dev,
tf->hob_lbah = buf[10];
tf->nsect = buf[12];
tf->hob_nsect = buf[13];
if (ata_id_has_ncq_autosense(dev->id))
tf->auxiliary = buf[14] << 16 | buf[15] << 8 | buf[16];

return 0;
}
Expand Down Expand Up @@ -1629,70 +1627,6 @@ unsigned int atapi_eh_tur(struct ata_device *dev, u8 *r_sense_key)
return err_mask;
}

/**
* ata_eh_request_sense - perform REQUEST_SENSE_DATA_EXT
* @dev: device to perform REQUEST_SENSE_SENSE_DATA_EXT to
* @sense_buf: result sense data buffer (SCSI_SENSE_BUFFERSIZE bytes long)
* @dfl_sense_key: default sense key to use
*
* Perform REQUEST_SENSE_DATA_EXT after the device reported CHECK
* SENSE. This function is EH helper.
*
* LOCKING:
* Kernel thread context (may sleep).
*
* RETURNS:
* encoded sense data on success, 0 on failure or if sense data
* is not available.
*/
static u32 ata_eh_request_sense(struct ata_queued_cmd *qc,
struct scsi_cmnd *cmd)
{
struct ata_device *dev = qc->dev;
struct ata_taskfile tf;
unsigned int err_mask;

if (!cmd)
return 0;

DPRINTK("ATA request sense\n");
ata_dev_warn(dev, "request sense\n");
if (!ata_id_sense_reporting_enabled(dev->id)) {
ata_dev_warn(qc->dev, "sense data reporting disabled\n");
return 0;
}
ata_tf_init(dev, &tf);

tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
tf.flags |= ATA_TFLAG_LBA | ATA_TFLAG_LBA48;
tf.command = ATA_CMD_REQ_SENSE_DATA;
tf.protocol = ATA_PROT_NODATA;

err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0);
/*
* ACS-4 states:
* The device may set the SENSE DATA AVAILABLE bit to one in the
* STATUS field and clear the ERROR bit to zero in the STATUS field
* to indicate that the command returned completion without an error
* and the sense data described in table 306 is available.
*
* IOW the 'ATA_SENSE' bit might not be set even though valid
* sense data is available.
* So check for both.
*/
if ((tf.command & ATA_SENSE) ||
tf.lbah != 0 || tf.lbam != 0 || tf.lbal != 0) {
ata_scsi_set_sense(cmd, tf.lbah, tf.lbam, tf.lbal);
qc->flags |= ATA_QCFLAG_SENSE_VALID;
ata_dev_warn(dev, "sense data %02x/%02x/%02x\n",
tf.lbah, tf.lbam, tf.lbal);
} else {
ata_dev_warn(dev, "request sense failed stat %02x emask %x\n",
tf.command, err_mask);
}
return err_mask;
}

/**
* atapi_eh_request_sense - perform ATAPI REQUEST_SENSE
* @dev: device to perform REQUEST_SENSE to
Expand Down Expand Up @@ -1855,19 +1789,6 @@ void ata_eh_analyze_ncq_error(struct ata_link *link)
memcpy(&qc->result_tf, &tf, sizeof(tf));
qc->result_tf.flags = ATA_TFLAG_ISADDR | ATA_TFLAG_LBA | ATA_TFLAG_LBA48;
qc->err_mask |= AC_ERR_DEV | AC_ERR_NCQ;
if (qc->result_tf.auxiliary) {
char sense_key, asc, ascq;

sense_key = (qc->result_tf.auxiliary >> 16) & 0xff;
asc = (qc->result_tf.auxiliary >> 8) & 0xff;
ascq = qc->result_tf.auxiliary & 0xff;
ata_dev_dbg(dev, "NCQ Autosense %02x/%02x/%02x\n",
sense_key, asc, ascq);
ata_scsi_set_sense(qc->scsicmd, sense_key, asc, ascq);
ata_scsi_set_sense_information(qc->scsicmd, &qc->result_tf);
qc->flags |= ATA_QCFLAG_SENSE_VALID;
}

ehc->i.err_mask &= ~AC_ERR_DEV;
}

Expand Down Expand Up @@ -1897,27 +1818,6 @@ static unsigned int ata_eh_analyze_tf(struct ata_queued_cmd *qc,
return ATA_EH_RESET;
}

/*
* Sense data reporting does not work if the
* device fault bit is set.
*/
if ((stat & ATA_SENSE) && !(stat & ATA_DF) &&
!(qc->flags & ATA_QCFLAG_SENSE_VALID)) {
if (!(qc->ap->pflags & ATA_PFLAG_FROZEN)) {
tmp = ata_eh_request_sense(qc, qc->scsicmd);
if (tmp)
qc->err_mask |= tmp;
else
ata_scsi_set_sense_information(qc->scsicmd, tf);
} else {
ata_dev_warn(qc->dev, "sense data available but port frozen\n");
}
}

/* Set by NCQ autosense or request sense above */
if (qc->flags & ATA_QCFLAG_SENSE_VALID)
return 0;

if (stat & (ATA_ERR | ATA_DF))
qc->err_mask |= AC_ERR_DEV;
else
Expand Down Expand Up @@ -2661,15 +2561,14 @@ static void ata_eh_link_report(struct ata_link *link)

#ifdef CONFIG_ATA_VERBOSE_ERROR
if (res->command & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ |
ATA_SENSE | ATA_ERR)) {
ATA_ERR)) {
if (res->command & ATA_BUSY)
ata_dev_err(qc->dev, "status: { Busy }\n");
else
ata_dev_err(qc->dev, "status: { %s%s%s%s%s}\n",
ata_dev_err(qc->dev, "status: { %s%s%s%s}\n",
res->command & ATA_DRDY ? "DRDY " : "",
res->command & ATA_DF ? "DF " : "",
res->command & ATA_DRQ ? "DRQ " : "",
res->command & ATA_SENSE ? "SENSE " : "",
res->command & ATA_ERR ? "ERR " : "");
}

Expand Down
21 changes: 2 additions & 19 deletions drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,28 +270,13 @@ DEVICE_ATTR(unload_heads, S_IRUGO | S_IWUSR,
ata_scsi_park_show, ata_scsi_park_store);
EXPORT_SYMBOL_GPL(dev_attr_unload_heads);

void ata_scsi_set_sense(struct scsi_cmnd *cmd, u8 sk, u8 asc, u8 ascq)
static void ata_scsi_set_sense(struct scsi_cmnd *cmd, u8 sk, u8 asc, u8 ascq)
{
if (!cmd)
return;

cmd->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION;

scsi_build_sense_buffer(0, cmd->sense_buffer, sk, asc, ascq);
}

void ata_scsi_set_sense_information(struct scsi_cmnd *cmd,
const struct ata_taskfile *tf)
{
u64 information;

if (!cmd)
return;

information = ata_tf_read_block(tf, NULL);
scsi_set_sense_information(cmd->sense_buffer, information);
}

static ssize_t
ata_scsi_em_message_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
Expand Down Expand Up @@ -1792,9 +1777,7 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc)
((cdb[2] & 0x20) || need_sense)) {
ata_gen_passthru_sense(qc);
} else {
if (qc->flags & ATA_QCFLAG_SENSE_VALID) {
cmd->result = SAM_STAT_CHECK_CONDITION;
} else if (!need_sense) {
if (!need_sense) {
cmd->result = SAM_STAT_GOOD;
} else {
/* TODO: decide which descriptor format to use
Expand Down
6 changes: 1 addition & 5 deletions drivers/ata/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev, int tag);
extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev,
u64 block, u32 n_block, unsigned int tf_flags,
unsigned int tag);
extern u64 ata_tf_read_block(const struct ata_taskfile *tf,
struct ata_device *dev);
extern u64 ata_tf_read_block(struct ata_taskfile *tf, struct ata_device *dev);
extern unsigned ata_exec_internal(struct ata_device *dev,
struct ata_taskfile *tf, const u8 *cdb,
int dma_dir, void *buf, unsigned int buflen,
Expand Down Expand Up @@ -138,9 +137,6 @@ extern int ata_scsi_add_hosts(struct ata_host *host,
struct scsi_host_template *sht);
extern void ata_scsi_scan_host(struct ata_port *ap, int sync);
extern int ata_scsi_offline_dev(struct ata_device *dev);
extern void ata_scsi_set_sense(struct scsi_cmnd *cmd, u8 sk, u8 asc, u8 ascq);
extern void ata_scsi_set_sense_information(struct scsi_cmnd *cmd,
const struct ata_taskfile *tf);
extern void ata_scsi_media_change_notify(struct ata_device *dev);
extern void ata_scsi_hotplug(struct work_struct *work);
extern void ata_schedule_scsi_eh(struct Scsi_Host *shost);
Expand Down
16 changes: 12 additions & 4 deletions drivers/ata/sata_sx4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1238,8 +1238,12 @@ static unsigned int pdc20621_prog_dimm_global(struct ata_host *host)
readl(mmio + PDC_SDRAM_CONTROL);

/* Turn on for ECC */
pdc20621_i2c_read(host, PDC_DIMM0_SPD_DEV_ADDRESS,
PDC_DIMM_SPD_TYPE, &spd0);
if (!pdc20621_i2c_read(host, PDC_DIMM0_SPD_DEV_ADDRESS,
PDC_DIMM_SPD_TYPE, &spd0)) {
pr_err("Failed in i2c read: device=%#x, subaddr=%#x\n",
PDC_DIMM0_SPD_DEV_ADDRESS, PDC_DIMM_SPD_TYPE);
return 1;
}
if (spd0 == 0x02) {
data |= (0x01 << 16);
writel(data, mmio + PDC_SDRAM_CONTROL);
Expand Down Expand Up @@ -1380,8 +1384,12 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host)

/* ECC initiliazation. */

pdc20621_i2c_read(host, PDC_DIMM0_SPD_DEV_ADDRESS,
PDC_DIMM_SPD_TYPE, &spd0);
if (!pdc20621_i2c_read(host, PDC_DIMM0_SPD_DEV_ADDRESS,
PDC_DIMM_SPD_TYPE, &spd0)) {
pr_err("Failed in i2c read: device=%#x, subaddr=%#x\n",
PDC_DIMM0_SPD_DEV_ADDRESS, PDC_DIMM_SPD_TYPE);
return 1;
}
if (spd0 == 0x02) {
void *buf;
VPRINTK("Start ECC initialization\n");
Expand Down
Loading